diff --git a/buildbot/configure.sh b/buildbot/configure.sh index ef5f758f51029..40209e41d16ab 100755 --- a/buildbot/configure.sh +++ b/buildbot/configure.sh @@ -26,7 +26,10 @@ done && shift $(($OPTIND - 1)) # we're in llvm.obj dir BUILD_DIR=${PWD} -cmake -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_PROJECTS=clang -DLLVM_EXTERNAL_PROJECTS="sycl;llvm-spirv" \ - -DLLVM_EXTERNAL_SYCL_SOURCE_DIR=../llvm.src/sycl -DLLVM_EXTERNAL_LLVM_SPIRV_SOURCE_DIR=../llvm.src/llvm-spirv \ - -DLLVM_TOOL_SYCL_BUILD=ON -DLLVM_TOOL_LLVM_SPIRV_BUILD=ON -DOpenCL_INCLUDE_DIR="OpenCL-Headers" \ - -DOpenCL_LIBRARY="OpenCL-ICD-Loader/build/lib/libOpenCL.so" ../llvm.src/llvm +cmake -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_PROJECTS=clang \ + -DLLVM_EXTERNAL_SYCL_SOURCE_DIR=../llvm.src/sycl \ + -DLLVM_EXTERNAL_LLVM_SPIRV_SOURCE_DIR=../llvm.src/llvm-spirv \ + -DLLVM_TOOL_SYCL_BUILD=ON -DLLVM_TOOL_LLVM_SPIRV_BUILD=ON \ + -DOpenCL_INCLUDE_DIR="OpenCL-Headers" \ + -DOpenCL_LIBRARY="OpenCL-ICD-Loader/build/lib/libOpenCL.so" \ + ../llvm.src/llvm diff --git a/buildbot/dependency.sh b/buildbot/dependency.sh index 261ad0f774b10..d108dad24d3f3 100755 --- a/buildbot/dependency.sh +++ b/buildbot/dependency.sh @@ -1,8 +1,10 @@ -#!/bin/bash +#!/bin/bash -x BRANCH= BUILD_NUMBER= PR_NUMBER= +SRC_DIR="../llvm.src" +DST_DIR="." # $1 exit code # $2 error message @@ -15,10 +17,12 @@ exit_if_err() } unset OPTIND -while getopts ":b:r:n:" option; do +while getopts ":b:r:n:s:d" option; do case $option in b) BRANCH=$OPTARG ;; n) BUILD_NUMBER=$OPTARG ;; + s) SRC_DIR=$OPTARG ;; + d) DST_DIR=$OPTARG ;; r) PR_NUMBER=$OPTARG ;; esac done && shift $(($OPTIND - 1)) @@ -26,6 +30,25 @@ done && shift $(($OPTIND - 1)) # we're in llvm.obj dir BUILD_DIR=${PWD} +# Get changed build script files +cd ${SRC_DIR} +git fetch -t origin refs/pull/${PR_NUMBER}/merge +exit_if_err $? "fail to get tags" +git checkout -B refs/pull/${PR_NUMBER}/merge +exit_if_err $? "fail to get tags" +base_commit=`git merge-base origin/sycl refs/pull/${PR_NUMBER}/merge` +exit_if_err $? "fail to get base commit" + +BUILD_SCRIPT=`git --no-pager diff ${base_commit} refs/pull/${PR_NUMBER}/merge --name-only buildbot` +cd - + +## Clean up build directory if build scripts has changed +cd ${DST_DIR} +if [ -n "$BUILD_SCRIPT" ]; then + rm -rf * +fi +cd - + ## GET dependencies if [ ! -d "OpenCL-Headers" ]; then git clone https://github.com/KhronosGroup/OpenCL-Headers OpenCL-Headers diff --git a/clang-tools-extra/change-namespace/tool/ClangChangeNamespace.cpp b/clang-tools-extra/change-namespace/tool/ClangChangeNamespace.cpp index 0d515029606e4..d5f06552e391b 100644 --- a/clang-tools-extra/change-namespace/tool/ClangChangeNamespace.cpp +++ b/clang-tools-extra/change-namespace/tool/ClangChangeNamespace.cpp @@ -1,4 +1,4 @@ -//===-- ClangIncludeFixer.cpp - Standalone change namespace ---------------===// +//===-- ClangChangeNamespace.cpp - Standalone change namespace ------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/clang-tools-extra/clang-doc/Generators.cpp b/clang-tools-extra/clang-doc/Generators.cpp index e57a2617b70b6..e3b672ada2924 100644 --- a/clang-tools-extra/clang-doc/Generators.cpp +++ b/clang-tools-extra/clang-doc/Generators.cpp @@ -1,4 +1,4 @@ -//===---- Generator.cpp - Generator Registry ---------------------*- C++-*-===// +//===-- Generators.cpp - Generator Registry ----------------------*- C++-*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/clang-tools-extra/clang-doc/Serialize.cpp b/clang-tools-extra/clang-doc/Serialize.cpp index 897fed560ba63..2bd54cf2d9810 100644 --- a/clang-tools-extra/clang-doc/Serialize.cpp +++ b/clang-tools-extra/clang-doc/Serialize.cpp @@ -1,4 +1,4 @@ -//===-- Serializer.cpp - ClangDoc Serializer --------------------*- C++ -*-===// +//===-- Serialize.cpp - ClangDoc Serializer ---------------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/clang-tools-extra/clang-doc/YAMLGenerator.cpp b/clang-tools-extra/clang-doc/YAMLGenerator.cpp index ceb42153b7350..94fb9f9864534 100644 --- a/clang-tools-extra/clang-doc/YAMLGenerator.cpp +++ b/clang-tools-extra/clang-doc/YAMLGenerator.cpp @@ -1,4 +1,4 @@ -//===-- ClangDocYAML.cpp - ClangDoc YAML -----------------------*- C++ -*-===// +//===-- YAMLGenerator.cpp - ClangDoc YAML -----------------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/clang-tools-extra/clang-move/HelperDeclRefGraph.cpp b/clang-tools-extra/clang-move/HelperDeclRefGraph.cpp index 93a0f879e0804..205a42dcaa7d8 100644 --- a/clang-tools-extra/clang-move/HelperDeclRefGraph.cpp +++ b/clang-tools-extra/clang-move/HelperDeclRefGraph.cpp @@ -1,4 +1,4 @@ -//===-- UsedHelperDeclFinder.cpp - AST-based call graph for helper decls --===// +//===-- HelperDeclRefGraph.cpp - AST-based call graph for helper decls ----===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/clang-tools-extra/clang-tidy/abseil/AbseilTidyModule.cpp b/clang-tools-extra/clang-tidy/abseil/AbseilTidyModule.cpp index b05318bb25c64..514b7f7851ef2 100644 --- a/clang-tools-extra/clang-tidy/abseil/AbseilTidyModule.cpp +++ b/clang-tools-extra/clang-tidy/abseil/AbseilTidyModule.cpp @@ -16,12 +16,14 @@ #include "DurationFactoryFloatCheck.h" #include "DurationFactoryScaleCheck.h" #include "DurationSubtractionCheck.h" +#include "DurationUnnecessaryConversionCheck.h" #include "FasterStrsplitDelimiterCheck.h" #include "NoInternalDependenciesCheck.h" #include "NoNamespaceCheck.h" #include "RedundantStrcatCallsCheck.h" #include "StringFindStartswithCheck.h" #include "StrCatAppendCheck.h" +#include "TimeSubtractionCheck.h" #include "UpgradeDurationConversionsCheck.h" namespace clang { @@ -45,6 +47,8 @@ class AbseilModule : public ClangTidyModule { "abseil-duration-factory-scale"); CheckFactories.registerCheck( "abseil-duration-subtraction"); + CheckFactories.registerCheck( + "abseil-duration-unnecessary-conversion"); CheckFactories.registerCheck( "abseil-faster-strsplit-delimiter"); CheckFactories.registerCheck( @@ -56,6 +60,8 @@ class AbseilModule : public ClangTidyModule { "abseil-str-cat-append"); CheckFactories.registerCheck( "abseil-string-find-startswith"); + CheckFactories.registerCheck( + "abseil-time-subtraction"); CheckFactories.registerCheck( "abseil-upgrade-duration-conversions"); } diff --git a/clang-tools-extra/clang-tidy/abseil/CMakeLists.txt b/clang-tools-extra/clang-tidy/abseil/CMakeLists.txt index 68247ba4bf158..f06160304c91c 100644 --- a/clang-tools-extra/clang-tidy/abseil/CMakeLists.txt +++ b/clang-tools-extra/clang-tidy/abseil/CMakeLists.txt @@ -10,12 +10,14 @@ add_clang_library(clangTidyAbseilModule DurationFactoryScaleCheck.cpp DurationRewriter.cpp DurationSubtractionCheck.cpp + DurationUnnecessaryConversionCheck.cpp FasterStrsplitDelimiterCheck.cpp NoInternalDependenciesCheck.cpp NoNamespaceCheck.cpp RedundantStrcatCallsCheck.cpp StrCatAppendCheck.cpp StringFindStartswithCheck.cpp + TimeSubtractionCheck.cpp UpgradeDurationConversionsCheck.cpp LINK_LIBS diff --git a/clang-tools-extra/clang-tidy/abseil/DurationRewriter.cpp b/clang-tools-extra/clang-tidy/abseil/DurationRewriter.cpp index c3e407896a1a7..ceee2ec861814 100644 --- a/clang-tools-extra/clang-tidy/abseil/DurationRewriter.cpp +++ b/clang-tools-extra/clang-tidy/abseil/DurationRewriter.cpp @@ -84,6 +84,22 @@ rewriteInverseDurationCall(const MatchFinder::MatchResult &Result, return llvm::None; } +/// If `Node` is a call to the inverse of `Scale`, return that inverse's +/// argument, otherwise None. +static llvm::Optional +rewriteInverseTimeCall(const MatchFinder::MatchResult &Result, + DurationScale Scale, const Expr &Node) { + llvm::StringRef InverseFunction = getTimeInverseForScale(Scale); + if (const auto *MaybeCallArg = selectFirst( + "e", match(callExpr(callee(functionDecl(hasName(InverseFunction))), + hasArgument(0, expr().bind("e"))), + Node, *Result.Context))) { + return tooling::fixit::getText(*MaybeCallArg, *Result.Context).str(); + } + + return llvm::None; +} + /// Returns the factory function name for a given `Scale`. llvm::StringRef getDurationFactoryForScale(DurationScale Scale) { switch (Scale) { @@ -103,6 +119,24 @@ llvm::StringRef getDurationFactoryForScale(DurationScale Scale) { llvm_unreachable("unknown scaling factor"); } +llvm::StringRef getTimeFactoryForScale(DurationScale Scale) { + switch (Scale) { + case DurationScale::Hours: + return "absl::FromUnixHours"; + case DurationScale::Minutes: + return "absl::FromUnixMinutes"; + case DurationScale::Seconds: + return "absl::FromUnixSeconds"; + case DurationScale::Milliseconds: + return "absl::FromUnixMillis"; + case DurationScale::Microseconds: + return "absl::FromUnixMicros"; + case DurationScale::Nanoseconds: + return "absl::FromUnixNanos"; + } + llvm_unreachable("unknown scaling factor"); +} + /// Returns the Time factory function name for a given `Scale`. llvm::StringRef getTimeInverseForScale(DurationScale scale) { switch (scale) { @@ -250,6 +284,24 @@ std::string rewriteExprFromNumberToDuration( .str(); } +std::string rewriteExprFromNumberToTime( + const ast_matchers::MatchFinder::MatchResult &Result, DurationScale Scale, + const Expr *Node) { + const Expr &RootNode = *Node->IgnoreParenImpCasts(); + + // First check to see if we can undo a complimentary function call. + if (llvm::Optional MaybeRewrite = + rewriteInverseTimeCall(Result, Scale, RootNode)) + return *MaybeRewrite; + + if (IsLiteralZero(Result, RootNode)) + return std::string("absl::UnixEpoch()"); + + return (llvm::Twine(getTimeFactoryForScale(Scale)) + "(" + + tooling::fixit::getText(RootNode, *Result.Context) + ")") + .str(); +} + bool isNotInMacro(const MatchFinder::MatchResult &Result, const Expr *E) { if (!E->getBeginLoc().isMacroID()) return true; diff --git a/clang-tools-extra/clang-tidy/abseil/DurationRewriter.h b/clang-tools-extra/clang-tidy/abseil/DurationRewriter.h index 54a60f6003bde..5b4689f3f0866 100644 --- a/clang-tools-extra/clang-tidy/abseil/DurationRewriter.h +++ b/clang-tools-extra/clang-tidy/abseil/DurationRewriter.h @@ -31,6 +31,10 @@ enum class DurationScale : std::uint8_t { /// constructing a `Duration` for that scale. llvm::StringRef getDurationFactoryForScale(DurationScale Scale); +/// Given a 'Scale', return the appropriate factory function call for +/// constructing a `Time` for that scale. +llvm::StringRef getTimeFactoryForScale(DurationScale scale); + // Determine if `Node` represents a literal floating point or integral zero. bool IsLiteralZero(const ast_matchers::MatchFinder::MatchResult &Result, const Expr &Node); @@ -81,6 +85,12 @@ std::string rewriteExprFromNumberToDuration( const ast_matchers::MatchFinder::MatchResult &Result, DurationScale Scale, const Expr *Node); +/// Assuming `Node` has a type `int` representing a time instant of `Scale` +/// since The Epoch, return the expression to make it a suitable `Time`. +std::string rewriteExprFromNumberToTime( + const ast_matchers::MatchFinder::MatchResult &Result, DurationScale Scale, + const Expr *Node); + /// Return `true` if `E` is a either: not a macro at all; or an argument to /// one. In the both cases, we often want to do the transformation. bool isNotInMacro(const ast_matchers::MatchFinder::MatchResult &Result, diff --git a/clang-tools-extra/clang-tidy/abseil/DurationUnnecessaryConversionCheck.cpp b/clang-tools-extra/clang-tidy/abseil/DurationUnnecessaryConversionCheck.cpp new file mode 100644 index 0000000000000..83650cd105d25 --- /dev/null +++ b/clang-tools-extra/clang-tidy/abseil/DurationUnnecessaryConversionCheck.cpp @@ -0,0 +1,58 @@ +//===--- DurationUnnecessaryConversionCheck.cpp - clang-tidy +//-----------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#include "DurationUnnecessaryConversionCheck.h" +#include "DurationRewriter.h" +#include "clang/AST/ASTContext.h" +#include "clang/ASTMatchers/ASTMatchFinder.h" +#include "clang/Tooling/FixIt.h" + +using namespace clang::ast_matchers; + +namespace clang { +namespace tidy { +namespace abseil { + +void DurationUnnecessaryConversionCheck::registerMatchers(MatchFinder *Finder) { + for (const auto &Scale : {"Hours", "Minutes", "Seconds", "Milliseconds", + "Microseconds", "Nanoseconds"}) { + std::string DurationFactory = (llvm::Twine("::absl::") + Scale).str(); + std::string FloatConversion = + (llvm::Twine("::absl::ToDouble") + Scale).str(); + std::string IntegerConversion = + (llvm::Twine("::absl::ToInt64") + Scale).str(); + + Finder->addMatcher( + callExpr( + callee(functionDecl(hasName(DurationFactory))), + hasArgument(0, callExpr(callee(functionDecl(hasAnyName( + FloatConversion, IntegerConversion))), + hasArgument(0, expr().bind("arg"))))) + .bind("call"), + this); + } +} + +void DurationUnnecessaryConversionCheck::check( + const MatchFinder::MatchResult &Result) { + const auto *OuterCall = Result.Nodes.getNodeAs("call"); + const auto *Arg = Result.Nodes.getNodeAs("arg"); + + if (!isNotInMacro(Result, OuterCall)) + return; + + diag(OuterCall->getBeginLoc(), "remove unnecessary absl::Duration conversions") + << FixItHint::CreateReplacement( + OuterCall->getSourceRange(), + tooling::fixit::getText(*Arg, *Result.Context)); +} + +} // namespace abseil +} // namespace tidy +} // namespace clang diff --git a/clang-tools-extra/clang-tidy/abseil/DurationUnnecessaryConversionCheck.h b/clang-tools-extra/clang-tidy/abseil/DurationUnnecessaryConversionCheck.h new file mode 100644 index 0000000000000..180613388918e --- /dev/null +++ b/clang-tools-extra/clang-tidy/abseil/DurationUnnecessaryConversionCheck.h @@ -0,0 +1,35 @@ +//===--- DurationUnnecessaryConversionCheck.h - clang-tidy ------*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ABSEIL_TIMEDOUBLECONVERSIONCHECK_H +#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ABSEIL_TIMEDOUBLECONVERSIONCHECK_H + +#include "../ClangTidy.h" + +namespace clang { +namespace tidy { +namespace abseil { + +/// Finds and fixes cases where ``absl::Duration`` values are being converted +/// to numeric types and back again. +/// +/// For the user-facing documentation see: +/// http://clang.llvm.org/extra/clang-tidy/checks/abseil-duration-unnecessary-conversion.html +class DurationUnnecessaryConversionCheck : public ClangTidyCheck { +public: + DurationUnnecessaryConversionCheck(StringRef Name, ClangTidyContext *Context) + : ClangTidyCheck(Name, Context) {} + void registerMatchers(ast_matchers::MatchFinder *Finder) override; + void check(const ast_matchers::MatchFinder::MatchResult &Result) override; +}; + +} // namespace abseil +} // namespace tidy +} // namespace clang + +#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ABSEIL_TIMEDOUBLECONVERSIONCHECK_H diff --git a/clang-tools-extra/clang-tidy/abseil/TimeSubtractionCheck.cpp b/clang-tools-extra/clang-tidy/abseil/TimeSubtractionCheck.cpp new file mode 100644 index 0000000000000..0a7c4016b5b16 --- /dev/null +++ b/clang-tools-extra/clang-tidy/abseil/TimeSubtractionCheck.cpp @@ -0,0 +1,181 @@ +//===--- TimeSubtractionCheck.cpp - clang-tidy ----------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#include "TimeSubtractionCheck.h" +#include "DurationRewriter.h" +#include "clang/AST/ASTContext.h" +#include "clang/ASTMatchers/ASTMatchFinder.h" +#include "clang/Tooling/FixIt.h" + +using namespace clang::ast_matchers; + +namespace clang { +namespace tidy { +namespace abseil { + +// Returns `true` if `Range` is inside a macro definition. +static bool InsideMacroDefinition(const MatchFinder::MatchResult &Result, + SourceRange Range) { + return !clang::Lexer::makeFileCharRange( + clang::CharSourceRange::getCharRange(Range), + *Result.SourceManager, Result.Context->getLangOpts()) + .isValid(); +} + +static bool isConstructorAssignment(const MatchFinder::MatchResult &Result, + const Expr *Node) { + return selectFirst( + "e", match(expr(hasParent(materializeTemporaryExpr(hasParent( + cxxConstructExpr(hasParent(exprWithCleanups( + hasParent(varDecl())))))))) + .bind("e"), + *Node, *Result.Context)) != nullptr; +} + +static bool isArgument(const MatchFinder::MatchResult &Result, + const Expr *Node) { + return selectFirst( + "e", + match(expr(hasParent( + materializeTemporaryExpr(hasParent(cxxConstructExpr( + hasParent(callExpr()), + unless(hasParent(cxxOperatorCallExpr()))))))) + .bind("e"), + *Node, *Result.Context)) != nullptr; +} + +static bool isReturn(const MatchFinder::MatchResult &Result, const Expr *Node) { + return selectFirst( + "e", match(expr(hasParent(materializeTemporaryExpr(hasParent( + cxxConstructExpr(hasParent(exprWithCleanups( + hasParent(returnStmt())))))))) + .bind("e"), + *Node, *Result.Context)) != nullptr; +} + +static bool parensRequired(const MatchFinder::MatchResult &Result, + const Expr *Node) { + // TODO: Figure out any more contexts in which we can omit the surrounding + // parentheses. + return !(isConstructorAssignment(Result, Node) || isArgument(Result, Node) || + isReturn(Result, Node)); +} + +void TimeSubtractionCheck::emitDiagnostic(const Expr *Node, + llvm::StringRef Replacement) { + diag(Node->getBeginLoc(), "perform subtraction in the time domain") + << FixItHint::CreateReplacement(Node->getSourceRange(), Replacement); +} + +void TimeSubtractionCheck::registerMatchers(MatchFinder *Finder) { + for (auto ScaleName : + {"Hours", "Minutes", "Seconds", "Millis", "Micros", "Nanos"}) { + std::string TimeInverse = (llvm::Twine("ToUnix") + ScaleName).str(); + llvm::Optional Scale = getScaleForTimeInverse(TimeInverse); + assert(Scale && "Unknow scale encountered"); + + auto TimeInverseMatcher = callExpr(callee( + functionDecl(hasName((llvm::Twine("::absl::") + TimeInverse).str())) + .bind("func_decl"))); + + // Match the cases where we know that the result is a 'Duration' and the + // first argument is a 'Time'. Just knowing the type of the first operand + // is not sufficient, since the second operand could be either a 'Time' or + // a 'Duration'. If we know the result is a 'Duration', we can then infer + // that the second operand must be a 'Time'. + auto CallMatcher = + callExpr( + callee(functionDecl(hasName(getDurationFactoryForScale(*Scale)))), + hasArgument(0, binaryOperator(hasOperatorName("-"), + hasLHS(TimeInverseMatcher)) + .bind("binop"))) + .bind("outer_call"); + Finder->addMatcher(CallMatcher, this); + + // Match cases where we know the second operand is a 'Time'. Since + // subtracting a 'Time' from a 'Duration' is not defined, in these cases, + // we always know the first operand is a 'Time' if the second is a 'Time'. + auto OperandMatcher = + binaryOperator(hasOperatorName("-"), hasRHS(TimeInverseMatcher)) + .bind("binop"); + Finder->addMatcher(OperandMatcher, this); + } +} + +void TimeSubtractionCheck::check(const MatchFinder::MatchResult &Result) { + const auto *BinOp = Result.Nodes.getNodeAs("binop"); + std::string InverseName = + Result.Nodes.getNodeAs("func_decl")->getNameAsString(); + if (InsideMacroDefinition(Result, BinOp->getSourceRange())) + return; + + llvm::Optional Scale = getScaleForTimeInverse(InverseName); + if (!Scale) + return; + + const auto *OuterCall = Result.Nodes.getNodeAs("outer_call"); + if (OuterCall) { + if (InsideMacroDefinition(Result, OuterCall->getSourceRange())) + return; + + // We're working with the first case of matcher, and need to replace the + // entire 'Duration' factory call. (Which also means being careful about + // our order-of-operations and optionally putting in some parenthesis. + bool NeedParens = parensRequired(Result, OuterCall); + + emitDiagnostic( + OuterCall, + (llvm::Twine(NeedParens ? "(" : "") + + rewriteExprFromNumberToTime(Result, *Scale, BinOp->getLHS()) + " - " + + rewriteExprFromNumberToTime(Result, *Scale, BinOp->getRHS()) + + (NeedParens ? ")" : "")) + .str()); + } else { + // We're working with the second case of matcher, and either just need to + // change the arguments, or perhaps remove an outer function call. In the + // latter case (addressed first), we also need to worry about parenthesis. + const auto *MaybeCallArg = selectFirst( + "arg", match(expr(hasAncestor( + callExpr(callee(functionDecl(hasName( + getDurationFactoryForScale(*Scale))))) + .bind("arg"))), + *BinOp, *Result.Context)); + if (MaybeCallArg && MaybeCallArg->getArg(0)->IgnoreImpCasts() == BinOp && + !InsideMacroDefinition(Result, MaybeCallArg->getSourceRange())) { + // Handle the case where the matched expression is inside a call which + // converts it from the inverse to a Duration. In this case, we replace + // the outer with just the subtraction expresison, which gives the right + // type and scale, taking care again about parenthesis. + bool NeedParens = parensRequired(Result, MaybeCallArg); + + emitDiagnostic( + MaybeCallArg, + (llvm::Twine(NeedParens ? "(" : "") + + rewriteExprFromNumberToTime(Result, *Scale, BinOp->getLHS()) + + " - " + + rewriteExprFromNumberToTime(Result, *Scale, BinOp->getRHS()) + + (NeedParens ? ")" : "")) + .str()); + } else { + // In the last case, just convert the arguments and wrap the result in + // the correct inverse function. + emitDiagnostic( + BinOp, + (llvm::Twine( + getDurationInverseForScale(*Scale).second.str().substr(2)) + + "(" + rewriteExprFromNumberToTime(Result, *Scale, BinOp->getLHS()) + + " - " + + rewriteExprFromNumberToTime(Result, *Scale, BinOp->getRHS()) + ")") + .str()); + } + } +} + +} // namespace abseil +} // namespace tidy +} // namespace clang diff --git a/clang-tools-extra/clang-tidy/abseil/TimeSubtractionCheck.h b/clang-tools-extra/clang-tidy/abseil/TimeSubtractionCheck.h new file mode 100644 index 0000000000000..4e3cd3b5bee5c --- /dev/null +++ b/clang-tools-extra/clang-tidy/abseil/TimeSubtractionCheck.h @@ -0,0 +1,38 @@ +//===--- TimeSubtractionCheck.h - clang-tidy --------------------*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ABSEIL_TIMESUBTRACTIONCHECK_H +#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ABSEIL_TIMESUBTRACTIONCHECK_H + +#include "../ClangTidy.h" + +namespace clang { +namespace tidy { +namespace abseil { + +/// Finds and fixes `absl::Time` subtraction expressions to do subtraction +/// in the time domain instead of the numeric domain. +/// +/// For the user-facing documentation see: +/// http://clang.llvm.org/extra/clang-tidy/checks/abseil-time-subtraction.html +class TimeSubtractionCheck : public ClangTidyCheck { +public: + TimeSubtractionCheck(StringRef Name, ClangTidyContext *Context) + : ClangTidyCheck(Name, Context) {} + void registerMatchers(ast_matchers::MatchFinder *Finder) override; + void check(const ast_matchers::MatchFinder::MatchResult &Result) override; + +private: + void emitDiagnostic(const Expr* Node, llvm::StringRef Replacement); +}; + +} // namespace abseil +} // namespace tidy +} // namespace clang + +#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ABSEIL_TIMESUBTRACTIONCHECK_H diff --git a/clang-tools-extra/clang-tidy/bugprone/ArgumentCommentCheck.cpp b/clang-tools-extra/clang-tidy/bugprone/ArgumentCommentCheck.cpp index f939aa0ecc457..5d6c7c9a4ca3c 100644 --- a/clang-tools-extra/clang-tidy/bugprone/ArgumentCommentCheck.cpp +++ b/clang-tools-extra/clang-tidy/bugprone/ArgumentCommentCheck.cpp @@ -11,6 +11,7 @@ #include "clang/ASTMatchers/ASTMatchFinder.h" #include "clang/Lex/Lexer.h" #include "clang/Lex/Token.h" + #include "../utils/LexerUtils.h" using namespace clang::ast_matchers; @@ -23,17 +24,37 @@ ArgumentCommentCheck::ArgumentCommentCheck(StringRef Name, ClangTidyContext *Context) : ClangTidyCheck(Name, Context), StrictMode(Options.getLocalOrGlobal("StrictMode", 0) != 0), + CommentBoolLiterals(Options.getLocalOrGlobal("CommentBoolLiterals", 0) != + 0), + CommentIntegerLiterals( + Options.getLocalOrGlobal("CommentIntegerLiterals", 0) != 0), + CommentFloatLiterals( + Options.getLocalOrGlobal("CommentFloatLiterals", 0) != 0), + CommentStringLiterals( + Options.getLocalOrGlobal("CommentStringLiterals", 0) != 0), + CommentUserDefinedLiterals( + Options.getLocalOrGlobal("CommentUserDefinedLiterals", 0) != 0), + CommentCharacterLiterals( + Options.getLocalOrGlobal("CommentCharacterLiterals", 0) != 0), + CommentNullPtrs(Options.getLocalOrGlobal("CommentNullPtrs", 0) != 0), IdentRE("^(/\\* *)([_A-Za-z][_A-Za-z0-9]*)( *= *\\*/)$") {} void ArgumentCommentCheck::storeOptions(ClangTidyOptions::OptionMap &Opts) { Options.store(Opts, "StrictMode", StrictMode); + Options.store(Opts, "CommentBoolLiterals", CommentBoolLiterals); + Options.store(Opts, "CommentIntegerLiterals", CommentIntegerLiterals); + Options.store(Opts, "CommentFloatLiterals", CommentFloatLiterals); + Options.store(Opts, "CommentStringLiterals", CommentStringLiterals); + Options.store(Opts, "CommentUserDefinedLiterals", CommentUserDefinedLiterals); + Options.store(Opts, "CommentCharacterLiterals", CommentCharacterLiterals); + Options.store(Opts, "CommentNullPtrs", CommentNullPtrs); } void ArgumentCommentCheck::registerMatchers(MatchFinder *Finder) { Finder->addMatcher( callExpr(unless(cxxOperatorCallExpr()), - // NewCallback's arguments relate to the pointed function, don't - // check them against NewCallback's parameter names. + // NewCallback's arguments relate to the pointed function, + // don't check them against NewCallback's parameter names. // FIXME: Make this configurable. unless(hasDeclaration(functionDecl( hasAnyName("NewCallback", "NewPermanentCallback"))))) @@ -126,8 +147,8 @@ static bool isLikelyTypo(llvm::ArrayRef Params, const unsigned Threshold = 2; // Other parameters must be an edit distance at least Threshold more away - // from this parameter. This gives us greater confidence that this is a typo - // of this parameter and not one with a similar name. + // from this parameter. This gives us greater confidence that this is a + // typo of this parameter and not one with a similar name. unsigned OtherED = ArgNameLower.edit_distance(II->getName().lower(), /*AllowReplacements=*/true, ThisED + Threshold); @@ -180,8 +201,8 @@ static const CXXMethodDecl *findMockedMethod(const CXXMethodDecl *Method) { } return nullptr; } - if (const auto *Next = dyn_cast_or_null( - Method->getNextDeclInContext())) { + if (const auto *Next = + dyn_cast_or_null(Method->getNextDeclInContext())) { if (looksLikeExpectMethod(Next) && areMockAndExpectMethods(Method, Next)) return Method; } @@ -206,6 +227,21 @@ static const FunctionDecl *resolveMocks(const FunctionDecl *Func) { return Func; } +// Given the argument type and the options determine if we should +// be adding an argument comment. +bool ArgumentCommentCheck::shouldAddComment(const Expr *Arg) const { + if (Arg->getExprLoc().isMacroID()) + return false; + Arg = Arg->IgnoreImpCasts(); + return (CommentBoolLiterals && isa(Arg)) || + (CommentIntegerLiterals && isa(Arg)) || + (CommentFloatLiterals && isa(Arg)) || + (CommentUserDefinedLiterals && isa(Arg)) || + (CommentCharacterLiterals && isa(Arg)) || + (CommentStringLiterals && isa(Arg)) || + (CommentNullPtrs && isa(Arg)); +} + void ArgumentCommentCheck::checkCallArgs(ASTContext *Ctx, const FunctionDecl *OriginalCallee, SourceLocation ArgBeginLoc, @@ -219,7 +255,7 @@ void ArgumentCommentCheck::checkCallArgs(ASTContext *Ctx, if (NumArgs == 0) return; - auto makeFileCharRange = [Ctx](SourceLocation Begin, SourceLocation End) { + auto MakeFileCharRange = [Ctx](SourceLocation Begin, SourceLocation End) { return Lexer::makeFileCharRange(CharSourceRange::getCharRange(Begin, End), Ctx->getSourceManager(), Ctx->getLangOpts()); @@ -242,7 +278,7 @@ void ArgumentCommentCheck::checkCallArgs(ASTContext *Ctx, } CharSourceRange BeforeArgument = - makeFileCharRange(ArgBeginLoc, Args[I]->getBeginLoc()); + MakeFileCharRange(ArgBeginLoc, Args[I]->getBeginLoc()); ArgBeginLoc = Args[I]->getEndLoc(); std::vector> Comments; @@ -250,7 +286,7 @@ void ArgumentCommentCheck::checkCallArgs(ASTContext *Ctx, Comments = getCommentsInRange(Ctx, BeforeArgument); } else { // Fall back to parsing back from the start of the argument. - CharSourceRange ArgsRange = makeFileCharRange( + CharSourceRange ArgsRange = MakeFileCharRange( Args[I]->getBeginLoc(), Args[NumArgs - 1]->getEndLoc()); Comments = getCommentsBeforeLoc(Ctx, ArgsRange.getBegin()); } @@ -277,8 +313,19 @@ void ArgumentCommentCheck::checkCallArgs(ASTContext *Ctx, } } } + + // If the argument comments are missing for literals add them. + if (Comments.empty() && shouldAddComment(Args[I])) { + std::string ArgComment = + (llvm::Twine("/*") + II->getName() + "=*/").str(); + DiagnosticBuilder Diag = + diag(Args[I]->getBeginLoc(), + "argument comment missing for literal argument %0") + << II + << FixItHint::CreateInsertion(Args[I]->getBeginLoc(), ArgComment); + } } -} +} // namespace bugprone void ArgumentCommentCheck::check(const MatchFinder::MatchResult &Result) { const auto *E = Result.Nodes.getNodeAs("expr"); diff --git a/clang-tools-extra/clang-tidy/bugprone/ArgumentCommentCheck.h b/clang-tools-extra/clang-tidy/bugprone/ArgumentCommentCheck.h index 2eee74d6b6de4..451b309cec597 100644 --- a/clang-tools-extra/clang-tidy/bugprone/ArgumentCommentCheck.h +++ b/clang-tools-extra/clang-tidy/bugprone/ArgumentCommentCheck.h @@ -26,7 +26,8 @@ namespace bugprone { /// /// ... /// f(/*bar=*/true); -/// // warning: argument name 'bar' in comment does not match parameter name 'foo' +/// // warning: argument name 'bar' in comment does not match parameter name +/// 'foo' /// \endcode /// /// The check tries to detect typos and suggest automated fixes for them. @@ -39,12 +40,21 @@ class ArgumentCommentCheck : public ClangTidyCheck { void storeOptions(ClangTidyOptions::OptionMap &Opts) override; private: - const bool StrictMode; + const unsigned StrictMode : 1; + const unsigned CommentBoolLiterals : 1; + const unsigned CommentIntegerLiterals : 1; + const unsigned CommentFloatLiterals : 1; + const unsigned CommentStringLiterals : 1; + const unsigned CommentUserDefinedLiterals : 1; + const unsigned CommentCharacterLiterals : 1; + const unsigned CommentNullPtrs : 1; llvm::Regex IdentRE; void checkCallArgs(ASTContext *Ctx, const FunctionDecl *Callee, SourceLocation ArgBeginLoc, llvm::ArrayRef Args); + + bool shouldAddComment(const Expr *Arg) const; }; } // namespace bugprone diff --git a/clang-tools-extra/clang-tidy/bugprone/DanglingHandleCheck.cpp b/clang-tools-extra/clang-tidy/bugprone/DanglingHandleCheck.cpp index 9cefc20f6fb90..74ad2e7535fc2 100644 --- a/clang-tools-extra/clang-tidy/bugprone/DanglingHandleCheck.cpp +++ b/clang-tools-extra/clang-tidy/bugprone/DanglingHandleCheck.cpp @@ -163,9 +163,8 @@ void DanglingHandleCheck::registerMatchersForReturn(MatchFinder *Finder) { // Return a temporary. Finder->addMatcher( - returnStmt( - has(ignoringParenImpCasts(exprWithCleanups(has(ignoringParenImpCasts( - handleFrom(IsAHandle, handleFromTemporaryValue(IsAHandle)))))))) + returnStmt(has(exprWithCleanups(has(ignoringParenImpCasts(handleFrom( + IsAHandle, handleFromTemporaryValue(IsAHandle))))))) .bind("bad_stmt"), this); } diff --git a/clang-tools-extra/clang-tidy/bugprone/ExceptionEscapeCheck.cpp b/clang-tools-extra/clang-tidy/bugprone/ExceptionEscapeCheck.cpp index 0849e2e7f585d..951c6f1e391f6 100644 --- a/clang-tools-extra/clang-tidy/bugprone/ExceptionEscapeCheck.cpp +++ b/clang-tools-extra/clang-tidy/bugprone/ExceptionEscapeCheck.cpp @@ -42,6 +42,7 @@ ExceptionEscapeCheck::ExceptionEscapeCheck(StringRef Name, IgnoredExceptions.insert(IgnoredExceptionsVec.begin(), IgnoredExceptionsVec.end()); Tracer.ignoreExceptions(std::move(IgnoredExceptions)); + Tracer.ignoreBadAlloc(true); } void ExceptionEscapeCheck::storeOptions(ClangTidyOptions::OptionMap &Opts) { @@ -70,7 +71,8 @@ void ExceptionEscapeCheck::check(const MatchFinder::MatchResult &Result) { if (!MatchedDecl) return; - if (Tracer.throwsException(MatchedDecl)) + if (Tracer.analyze(MatchedDecl).getBehaviour() == + utils::ExceptionAnalyzer::State::Throwing) // FIXME: We should provide more information about the exact location where // the exception is thrown, maybe the full path the exception escapes diag(MatchedDecl->getLocation(), diff --git a/clang-tools-extra/clang-tidy/bugprone/StringConstructorCheck.cpp b/clang-tools-extra/clang-tidy/bugprone/StringConstructorCheck.cpp index 3a4e75bcda8e8..a4b83ada98d7c 100644 --- a/clang-tools-extra/clang-tidy/bugprone/StringConstructorCheck.cpp +++ b/clang-tools-extra/clang-tidy/bugprone/StringConstructorCheck.cpp @@ -138,7 +138,8 @@ void StringConstructorCheck::check(const MatchFinder::MatchResult &Result) { } } else if (const auto *Ptr = Result.Nodes.getNodeAs("from-ptr")) { Expr::EvalResult ConstPtr; - if (Ptr->EvaluateAsRValue(ConstPtr, Ctx) && + if (!Ptr->isInstantiationDependent() && + Ptr->EvaluateAsRValue(ConstPtr, Ctx) && ((ConstPtr.Val.isInt() && ConstPtr.Val.getInt().isNullValue()) || (ConstPtr.Val.isLValue() && ConstPtr.Val.isNullPointer()))) { diag(Loc, "constructing string from nullptr is undefined behaviour"); diff --git a/clang-tools-extra/clang-tidy/bugprone/StringIntegerAssignmentCheck.cpp b/clang-tools-extra/clang-tidy/bugprone/StringIntegerAssignmentCheck.cpp index cce0de9f818ad..389ddc1caf335 100644 --- a/clang-tools-extra/clang-tidy/bugprone/StringIntegerAssignmentCheck.cpp +++ b/clang-tools-extra/clang-tidy/bugprone/StringIntegerAssignmentCheck.cpp @@ -26,20 +26,59 @@ void StringIntegerAssignmentCheck::registerMatchers(MatchFinder *Finder) { hasOverloadedOperatorName("+=")), callee(cxxMethodDecl(ofClass(classTemplateSpecializationDecl( hasName("::std::basic_string"), - hasTemplateArgument(0, refersToType(qualType().bind("type"))))))), - hasArgument(1, - ignoringImpCasts(expr(hasType(isInteger()), - unless(hasType(isAnyCharacter()))) - .bind("expr"))), + hasTemplateArgument(0, refersToType(hasCanonicalType( + qualType().bind("type")))))))), + hasArgument( + 1, + ignoringImpCasts( + expr(hasType(isInteger()), unless(hasType(isAnyCharacter())), + // Ignore calls to tolower/toupper (see PR27723). + unless(callExpr(callee(functionDecl( + hasAnyName("tolower", "std::tolower", "toupper", + "std::toupper"))))), + // Do not warn if assigning e.g. `CodePoint` to + // `basic_string` + unless(hasType(qualType( + hasCanonicalType(equalsBoundNode("type")))))) + .bind("expr"))), unless(isInTemplateInstantiation())), this); } +static bool isLikelyCharExpression(const Expr *Argument, + const ASTContext &Ctx) { + const auto *BinOp = dyn_cast(Argument); + if (!BinOp) + return false; + const auto *LHS = BinOp->getLHS()->IgnoreParenImpCasts(); + const auto *RHS = BinOp->getRHS()->IgnoreParenImpCasts(); + // & , mask is a compile time constant. + Expr::EvalResult RHSVal; + if (BinOp->getOpcode() == BO_And && + (RHS->EvaluateAsInt(RHSVal, Ctx, Expr::SE_AllowSideEffects) || + LHS->EvaluateAsInt(RHSVal, Ctx, Expr::SE_AllowSideEffects))) + return true; + // + ( % ), where is a char literal. + const auto IsCharPlusModExpr = [](const Expr *L, const Expr *R) { + const auto *ROp = dyn_cast(R); + return ROp && ROp->getOpcode() == BO_Rem && isa(L); + }; + if (BinOp->getOpcode() == BO_Add) { + if (IsCharPlusModExpr(LHS, RHS) || IsCharPlusModExpr(RHS, LHS)) + return true; + } + return false; +} + void StringIntegerAssignmentCheck::check( const MatchFinder::MatchResult &Result) { const auto *Argument = Result.Nodes.getNodeAs("expr"); SourceLocation Loc = Argument->getBeginLoc(); + // Try to detect a few common expressions to reduce false positives. + if (isLikelyCharExpression(Argument, *Result.Context)) + return; + auto Diag = diag(Loc, "an integer is interpreted as a character code when assigning " "it to a string; if this is intended, cast the integer to the " diff --git a/clang-tools-extra/clang-tidy/cert/CommandProcessorCheck.cpp b/clang-tools-extra/clang-tidy/cert/CommandProcessorCheck.cpp index cfc2f37341169..72b39d18f9f18 100644 --- a/clang-tools-extra/clang-tidy/cert/CommandProcessorCheck.cpp +++ b/clang-tools-extra/clang-tidy/cert/CommandProcessorCheck.cpp @@ -1,4 +1,4 @@ -//===--- Env33CCheck.cpp - clang-tidy--------------------------------------===// +//===-- CommandProcessorCheck.cpp - clang-tidy ----------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/clang-tools-extra/clang-tidy/cert/StrToNumCheck.cpp b/clang-tools-extra/clang-tidy/cert/StrToNumCheck.cpp index 38e2dc005b513..9d26060c51a56 100644 --- a/clang-tools-extra/clang-tidy/cert/StrToNumCheck.cpp +++ b/clang-tools-extra/clang-tidy/cert/StrToNumCheck.cpp @@ -1,4 +1,4 @@ -//===--- Err34CCheck.cpp - clang-tidy--------------------------------------===// +//===-- StrToNumCheck.cpp - clang-tidy ------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/clang-tools-extra/clang-tidy/cert/VariadicFunctionDefCheck.cpp b/clang-tools-extra/clang-tidy/cert/VariadicFunctionDefCheck.cpp index 4fe6b7af4a420..8ee67f9124227 100644 --- a/clang-tools-extra/clang-tidy/cert/VariadicFunctionDefCheck.cpp +++ b/clang-tools-extra/clang-tidy/cert/VariadicFunctionDefCheck.cpp @@ -1,4 +1,4 @@ -//===--- VariadicfunctiondefCheck.cpp - clang-tidy-------------------------===// +//===-- VariadicFunctionDefCheck.cpp - clang-tidy -------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/clang-tools-extra/clang-tidy/cppcoreguidelines/CppCoreGuidelinesTidyModule.cpp b/clang-tools-extra/clang-tidy/cppcoreguidelines/CppCoreGuidelinesTidyModule.cpp index fdf2880b869ec..7c7fd1b72cb78 100644 --- a/clang-tools-extra/clang-tidy/cppcoreguidelines/CppCoreGuidelinesTidyModule.cpp +++ b/clang-tools-extra/clang-tidy/cppcoreguidelines/CppCoreGuidelinesTidyModule.cpp @@ -1,4 +1,4 @@ -//===--- CppCoreGuidelinesModule.cpp - clang-tidy -------------------------===// +//===-- CppCoreGuidelinesTidyModule.cpp - clang-tidy ----------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -12,6 +12,7 @@ #include "../misc/NonPrivateMemberVariablesInClassesCheck.h" #include "../misc/UnconventionalAssignOperatorCheck.h" #include "../modernize/AvoidCArraysCheck.h" +#include "../modernize/UseOverrideCheck.h" #include "../readability/MagicNumbersCheck.h" #include "AvoidGotoCheck.h" #include "InterfacesGlobalInitCheck.h" @@ -46,6 +47,8 @@ class CppCoreGuidelinesModule : public ClangTidyModule { "cppcoreguidelines-avoid-goto"); CheckFactories.registerCheck( "cppcoreguidelines-avoid-magic-numbers"); + CheckFactories.registerCheck( + "cppcoreguidelines-explicit-virtual-functions"); CheckFactories.registerCheck( "cppcoreguidelines-interfaces-global-init"); CheckFactories.registerCheck( @@ -91,6 +94,9 @@ class CppCoreGuidelinesModule : public ClangTidyModule { Opts["cppcoreguidelines-non-private-member-variables-in-classes." "IgnoreClassesWithAllMemberVariablesBeingPublic"] = "1"; + Opts["cppcoreguidelines-explicit-virtual-functions." + "IgnoreDestructors"] = "1"; + return Options; } }; diff --git a/clang-tools-extra/clang-tidy/google/FunctionNamingCheck.cpp b/clang-tools-extra/clang-tidy/google/FunctionNamingCheck.cpp index 3eeb6fa620d26..8096d65d7f164 100644 --- a/clang-tools-extra/clang-tidy/google/FunctionNamingCheck.cpp +++ b/clang-tools-extra/clang-tidy/google/FunctionNamingCheck.cpp @@ -93,12 +93,16 @@ void FunctionNamingCheck::registerMatchers(MatchFinder *Finder) { if (!getLangOpts().ObjC) return; - // Match function declarations that are not in system headers and are not - // main. + // Enforce Objective-C function naming conventions on all functions except: + // • Functions defined in system headers. + // • C++ member functions. + // • Namespaced functions. + // • Implicitly defined functions. + // • The main function. Finder->addMatcher( functionDecl( unless(anyOf(isExpansionInSystemHeader(), cxxMethodDecl(), - hasAncestor(namespaceDecl()), isMain(), + hasAncestor(namespaceDecl()), isMain(), isImplicit(), matchesName(validFunctionNameRegex(true)), allOf(isStaticStorageClass(), matchesName(validFunctionNameRegex(false)))))) diff --git a/clang-tools-extra/clang-tidy/modernize/AvoidBindCheck.cpp b/clang-tools-extra/clang-tidy/modernize/AvoidBindCheck.cpp index 44174243c6c8f..c51b6e86b3f61 100644 --- a/clang-tools-extra/clang-tidy/modernize/AvoidBindCheck.cpp +++ b/clang-tools-extra/clang-tidy/modernize/AvoidBindCheck.cpp @@ -169,7 +169,7 @@ void AvoidBindCheck::check(const MatchFinder::MatchResult &Result) { Ref->printPretty(Stream, nullptr, Result.Context->getPrintingPolicy()); Stream << "("; addFunctionCallArgs(Args, Stream); - Stream << "); };"; + Stream << "); }"; Diag << FixItHint::CreateReplacement(MatchedDecl->getSourceRange(), Stream.str()); diff --git a/clang-tools-extra/clang-tidy/modernize/AvoidCArraysCheck.cpp b/clang-tools-extra/clang-tidy/modernize/AvoidCArraysCheck.cpp index bceda5c26911e..e3dffd0698f5b 100644 --- a/clang-tools-extra/clang-tidy/modernize/AvoidCArraysCheck.cpp +++ b/clang-tools-extra/clang-tidy/modernize/AvoidCArraysCheck.cpp @@ -30,6 +30,12 @@ AST_MATCHER(clang::RecordDecl, isExternCContext) { return Node.isExternCContext(); } +AST_MATCHER(clang::ParmVarDecl, isArgvOfMain) { + const clang::DeclContext *DC = Node.getDeclContext(); + const auto *FD = llvm::dyn_cast(DC); + return FD ? FD->isMain() : false; +} + } // namespace namespace clang { @@ -43,7 +49,8 @@ void AvoidCArraysCheck::registerMatchers(MatchFinder *Finder) { Finder->addMatcher( typeLoc(hasValidBeginLoc(), hasType(arrayType()), - unless(anyOf(hasParent(varDecl(isExternC())), + unless(anyOf(hasParent(parmVarDecl(isArgvOfMain())), + hasParent(varDecl(isExternC())), hasParent(fieldDecl( hasParent(recordDecl(isExternCContext())))), hasAncestor(functionDecl(isExternC()))))) diff --git a/clang-tools-extra/clang-tidy/modernize/UseDefaultMemberInitCheck.cpp b/clang-tools-extra/clang-tidy/modernize/UseDefaultMemberInitCheck.cpp index e2ab13b84a128..3c2e0e90111f4 100644 --- a/clang-tools-extra/clang-tidy/modernize/UseDefaultMemberInitCheck.cpp +++ b/clang-tools-extra/clang-tidy/modernize/UseDefaultMemberInitCheck.cpp @@ -255,17 +255,20 @@ void UseDefaultMemberInitCheck::checkDefaultInit( CharSourceRange InitRange = CharSourceRange::getCharRange(LParenEnd, Init->getRParenLoc()); + bool ValueInit = isa(Init->getInit()); + bool CanAssign = UseAssignment && (!ValueInit || !Init->getInit()->getType()->isEnumeralType()); + auto Diag = diag(Field->getLocation(), "use default member initializer for %0") << Field - << FixItHint::CreateInsertion(FieldEnd, UseAssignment ? " = " : "{") + << FixItHint::CreateInsertion(FieldEnd, CanAssign ? " = " : "{") << FixItHint::CreateInsertionFromRange(FieldEnd, InitRange); - if (UseAssignment && isa(Init->getInit())) + if (CanAssign && ValueInit) Diag << FixItHint::CreateInsertion( FieldEnd, getValueOfValueInit(Init->getInit()->getType())); - if (!UseAssignment) + if (!CanAssign) Diag << FixItHint::CreateInsertion(FieldEnd, "}"); Diag << FixItHint::CreateRemoval(Init->getSourceRange()); @@ -273,7 +276,7 @@ void UseDefaultMemberInitCheck::checkDefaultInit( void UseDefaultMemberInitCheck::checkExistingInit( const MatchFinder::MatchResult &Result, const CXXCtorInitializer *Init) { - const FieldDecl *Field = Init->getMember(); + const FieldDecl *Field = Init->getAnyMember(); if (!sameValue(Field->getInClassInitializer(), Init->getInit())) return; diff --git a/clang-tools-extra/clang-tidy/modernize/UseOverrideCheck.cpp b/clang-tools-extra/clang-tidy/modernize/UseOverrideCheck.cpp index 6b065955f3516..2f15213dca8c9 100644 --- a/clang-tools-extra/clang-tidy/modernize/UseOverrideCheck.cpp +++ b/clang-tools-extra/clang-tidy/modernize/UseOverrideCheck.cpp @@ -17,9 +17,28 @@ namespace clang { namespace tidy { namespace modernize { +UseOverrideCheck::UseOverrideCheck(StringRef Name, ClangTidyContext *Context) + : ClangTidyCheck(Name, Context), + IgnoreDestructors(Options.get("IgnoreDestructors", false)), + OverrideSpelling(Options.get("OverrideSpelling", "override")), + FinalSpelling(Options.get("FinalSpelling", "final")) {} + +void UseOverrideCheck::storeOptions(ClangTidyOptions::OptionMap &Opts) { + Options.store(Opts, "IgnoreDestructors", IgnoreDestructors); + Options.store(Opts, "OverrideSpelling", OverrideSpelling); + Options.store(Opts, "FinalSpelling", FinalSpelling); +} + void UseOverrideCheck::registerMatchers(MatchFinder *Finder) { // Only register the matcher for C++11. - if (getLangOpts().CPlusPlus11) + if (!getLangOpts().CPlusPlus11) + return; + + if (IgnoreDestructors) + Finder->addMatcher( + cxxMethodDecl(isOverride(), unless(cxxDestructorDecl())).bind("method"), + this); + else Finder->addMatcher(cxxMethodDecl(isOverride()).bind("method"), this); } @@ -67,6 +86,8 @@ void UseOverrideCheck::check(const MatchFinder::MatchResult &Result) { const auto *Method = Result.Nodes.getNodeAs("method"); const SourceManager &Sources = *Result.SourceManager; + ASTContext &Context = *Result.Context; + assert(Method != nullptr); if (Method->getInstantiatedFromMemberFunction() != nullptr) Method = Method->getInstantiatedFromMemberFunction(); @@ -86,25 +107,24 @@ void UseOverrideCheck::check(const MatchFinder::MatchResult &Result) { return; // Nothing to do. std::string Message; - if (OnlyVirtualSpecified) { - Message = - "prefer using 'override' or (rarely) 'final' instead of 'virtual'"; + Message = "prefer using '%0' or (rarely) '%1' instead of 'virtual'"; } else if (KeywordCount == 0) { - Message = "annotate this function with 'override' or (rarely) 'final'"; + Message = "annotate this function with '%0' or (rarely) '%1'"; } else { StringRef Redundant = - HasVirtual ? (HasOverride && HasFinal ? "'virtual' and 'override' are" + HasVirtual ? (HasOverride && HasFinal ? "'virtual' and '%0' are" : "'virtual' is") - : "'override' is"; - StringRef Correct = HasFinal ? "'final'" : "'override'"; + : "'%0' is"; + StringRef Correct = HasFinal ? "'%1'" : "'%0'"; Message = (llvm::Twine(Redundant) + " redundant since the function is already declared " + Correct) .str(); } - DiagnosticBuilder Diag = diag(Method->getLocation(), Message); + auto Diag = diag(Method->getLocation(), Message) + << OverrideSpelling << FinalSpelling; CharSourceRange FileRange = Lexer::makeFileCharRange( CharSourceRange::getTokenRange(Method->getSourceRange()), Sources, @@ -121,7 +141,7 @@ void UseOverrideCheck::check(const MatchFinder::MatchResult &Result) { // Add 'override' on inline declarations that don't already have it. if (!HasFinal && !HasOverride) { SourceLocation InsertLoc; - StringRef ReplacementText = "override "; + std::string ReplacementText = OverrideSpelling + " "; SourceLocation MethodLoc = Method->getLocation(); for (Token T : Tokens) { @@ -151,7 +171,7 @@ void UseOverrideCheck::check(const MatchFinder::MatchResult &Result) { // end of the declaration of the function, but prefer to put it on the // same line as the declaration if the beginning brace for the start of // the body falls on the next line. - ReplacementText = " override"; + ReplacementText = " " + OverrideSpelling; auto LastTokenIter = std::prev(Tokens.end()); // When try statement is used instead of compound statement as // method body - insert override keyword before it. @@ -164,23 +184,30 @@ void UseOverrideCheck::check(const MatchFinder::MatchResult &Result) { // For declarations marked with "= 0" or "= [default|delete]", the end // location will point until after those markings. Therefore, the override // keyword shouldn't be inserted at the end, but before the '='. - if (Tokens.size() > 2 && (GetText(Tokens.back(), Sources) == "0" || - Tokens.back().is(tok::kw_default) || - Tokens.back().is(tok::kw_delete)) && + if (Tokens.size() > 2 && + (GetText(Tokens.back(), Sources) == "0" || + Tokens.back().is(tok::kw_default) || + Tokens.back().is(tok::kw_delete)) && GetText(Tokens[Tokens.size() - 2], Sources) == "=") { InsertLoc = Tokens[Tokens.size() - 2].getLocation(); // Check if we need to insert a space. if ((Tokens[Tokens.size() - 2].getFlags() & Token::LeadingSpace) == 0) - ReplacementText = " override "; - } else if (GetText(Tokens.back(), Sources) == "ABSTRACT") { + ReplacementText = " " + OverrideSpelling + " "; + } else if (GetText(Tokens.back(), Sources) == "ABSTRACT") InsertLoc = Tokens.back().getLocation(); - } } if (!InsertLoc.isValid()) { InsertLoc = FileRange.getEnd(); - ReplacementText = " override"; + ReplacementText = " " + OverrideSpelling; } + + // If the override macro has been specified just ensure it exists, + // if not don't apply a fixit but keep the warning. + if (OverrideSpelling != "override" && + !Context.Idents.get(OverrideSpelling).hasMacroDefinition()) + return; + Diag << FixItHint::CreateInsertion(InsertLoc, ReplacementText); } diff --git a/clang-tools-extra/clang-tidy/modernize/UseOverrideCheck.h b/clang-tools-extra/clang-tidy/modernize/UseOverrideCheck.h index 0f316095a8e8c..976a7ae873754 100644 --- a/clang-tools-extra/clang-tidy/modernize/UseOverrideCheck.h +++ b/clang-tools-extra/clang-tidy/modernize/UseOverrideCheck.h @@ -18,10 +18,16 @@ namespace modernize { /// Use C++11's `override` and remove `virtual` where applicable. class UseOverrideCheck : public ClangTidyCheck { public: - UseOverrideCheck(StringRef Name, ClangTidyContext *Context) - : ClangTidyCheck(Name, Context) {} + UseOverrideCheck(StringRef Name, ClangTidyContext *Context); + void registerMatchers(ast_matchers::MatchFinder *Finder) override; void check(const ast_matchers::MatchFinder::MatchResult &Result) override; + void storeOptions(ClangTidyOptions::OptionMap &Opts) override; + +private: + const bool IgnoreDestructors; + const std::string OverrideSpelling; + const std::string FinalSpelling; }; } // namespace modernize diff --git a/clang-tools-extra/clang-tidy/objc/PropertyDeclarationCheck.cpp b/clang-tools-extra/clang-tidy/objc/PropertyDeclarationCheck.cpp index 653c6bb86944b..094c193c15ccc 100644 --- a/clang-tools-extra/clang-tidy/objc/PropertyDeclarationCheck.cpp +++ b/clang-tools-extra/clang-tidy/objc/PropertyDeclarationCheck.cpp @@ -80,7 +80,8 @@ std::string validPropertyNameRegex(bool UsedInMatcher) { } bool hasCategoryPropertyPrefix(llvm::StringRef PropertyName) { - auto RegexExp = llvm::Regex("^[a-zA-Z]+_[a-zA-Z0-9][a-zA-Z0-9_]+$"); + auto RegexExp = + llvm::Regex("^[a-zA-Z][a-zA-Z0-9]*_[a-zA-Z0-9][a-zA-Z0-9_]+$"); return RegexExp.match(PropertyName); } @@ -91,31 +92,21 @@ bool prefixedPropertyNameValid(llvm::StringRef PropertyName) { if (Prefix.lower() != Prefix) { return false; } - auto RegexExp = - llvm::Regex(llvm::StringRef(validPropertyNameRegex(false))); + auto RegexExp = llvm::Regex(llvm::StringRef(validPropertyNameRegex(false))); return RegexExp.match(PropertyName.substr(Start + 1)); } } // namespace -PropertyDeclarationCheck::PropertyDeclarationCheck(StringRef Name, - ClangTidyContext *Context) - : ClangTidyCheck(Name, Context), - SpecialAcronyms( - utils::options::parseStringList(Options.get("Acronyms", ""))), - IncludeDefaultAcronyms(Options.get("IncludeDefaultAcronyms", true)), - EscapedAcronyms() {} - void PropertyDeclarationCheck::registerMatchers(MatchFinder *Finder) { // this check should only be applied to ObjC sources. if (!getLangOpts().ObjC) return; - Finder->addMatcher( - objcPropertyDecl( - // the property name should be in Lower Camel Case like - // 'lowerCamelCase' - unless(matchesName(validPropertyNameRegex(true)))) - .bind("property"), - this); + Finder->addMatcher(objcPropertyDecl( + // the property name should be in Lower Camel Case like + // 'lowerCamelCase' + unless(matchesName(validPropertyNameRegex(true)))) + .bind("property"), + this); } void PropertyDeclarationCheck::check(const MatchFinder::MatchResult &Result) { @@ -145,12 +136,6 @@ void PropertyDeclarationCheck::check(const MatchFinder::MatchResult &Result) { << generateFixItHint(MatchedDecl, StandardProperty); } -void PropertyDeclarationCheck::storeOptions(ClangTidyOptions::OptionMap &Opts) { - Options.store(Opts, "Acronyms", - utils::options::serializeStringList(SpecialAcronyms)); - Options.store(Opts, "IncludeDefaultAcronyms", IncludeDefaultAcronyms); -} - } // namespace objc } // namespace tidy } // namespace clang diff --git a/clang-tools-extra/clang-tidy/objc/PropertyDeclarationCheck.h b/clang-tools-extra/clang-tidy/objc/PropertyDeclarationCheck.h index d28bde40adaf3..49af5df5fcd29 100644 --- a/clang-tools-extra/clang-tidy/objc/PropertyDeclarationCheck.h +++ b/clang-tools-extra/clang-tidy/objc/PropertyDeclarationCheck.h @@ -10,8 +10,6 @@ #define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_OBJC_PROPERTY_DECLARATION_H #include "../ClangTidy.h" -#include -#include namespace clang { namespace tidy { @@ -27,15 +25,10 @@ namespace objc { /// http://clang.llvm.org/extra/clang-tidy/checks/objc-property-declaration.html class PropertyDeclarationCheck : public ClangTidyCheck { public: - PropertyDeclarationCheck(StringRef Name, ClangTidyContext *Context); + PropertyDeclarationCheck(StringRef Name, ClangTidyContext *Context) + : ClangTidyCheck(Name, Context) {} void registerMatchers(ast_matchers::MatchFinder *Finder) override; void check(const ast_matchers::MatchFinder::MatchResult &Result) override; - void storeOptions(ClangTidyOptions::OptionMap &Options) override; - -private: - const std::vector SpecialAcronyms; - const bool IncludeDefaultAcronyms; - std::vector EscapedAcronyms; }; } // namespace objc diff --git a/clang-tools-extra/clang-tidy/performance/PerformanceTidyModule.cpp b/clang-tools-extra/clang-tidy/performance/PerformanceTidyModule.cpp index 0a5a0be2efb03..f4b620a14f850 100644 --- a/clang-tools-extra/clang-tidy/performance/PerformanceTidyModule.cpp +++ b/clang-tools-extra/clang-tidy/performance/PerformanceTidyModule.cpp @@ -1,4 +1,4 @@ -//===--- PeformanceTidyModule.cpp - clang-tidy ----------------------------===// +//===-- PerformanceTidyModule.cpp - clang-tidy ----------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/clang-tools-extra/clang-tidy/readability/ConstReturnTypeCheck.cpp b/clang-tools-extra/clang-tidy/readability/ConstReturnTypeCheck.cpp index 9d936d8a866e4..0f237ec8ee1d6 100644 --- a/clang-tools-extra/clang-tidy/readability/ConstReturnTypeCheck.cpp +++ b/clang-tools-extra/clang-tidy/readability/ConstReturnTypeCheck.cpp @@ -22,8 +22,8 @@ namespace readability { // Finds the location of the qualifying `const` token in the `FunctionDecl`'s // return type. Returns `None` when the return type is not `const`-qualified or -// `const` does not appear in `Def`'s source like when the type is an alias or a -// macro. +// `const` does not appear in `Def`'s source, like when the type is an alias or +// a macro. static llvm::Optional findConstToRemove(const FunctionDecl *Def, const MatchFinder::MatchResult &Result) { diff --git a/clang-tools-extra/clang-tidy/readability/FunctionSizeCheck.cpp b/clang-tools-extra/clang-tidy/readability/FunctionSizeCheck.cpp index 7be502bfc98ae..d98bec2ebdf1f 100644 --- a/clang-tools-extra/clang-tidy/readability/FunctionSizeCheck.cpp +++ b/clang-tools-extra/clang-tidy/readability/FunctionSizeCheck.cpp @@ -1,4 +1,4 @@ -//===--- FunctionSize.cpp - clang-tidy ------------------------------------===// +//===-- FunctionSizeCheck.cpp - clang-tidy --------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/clang-tools-extra/clang-tidy/readability/SimplifyBooleanExprCheck.cpp b/clang-tools-extra/clang-tidy/readability/SimplifyBooleanExprCheck.cpp index aa58ad1157a73..ef88d44f205a7 100644 --- a/clang-tools-extra/clang-tidy/readability/SimplifyBooleanExprCheck.cpp +++ b/clang-tools-extra/clang-tidy/readability/SimplifyBooleanExprCheck.cpp @@ -1,4 +1,4 @@ -//===--- SimplifyBooleanExpr.cpp clang-tidy ---------------------*- C++ -*-===// +//===-- SimplifyBooleanExprCheck.cpp - clang-tidy -------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/clang-tools-extra/clang-tidy/readability/StringCompareCheck.cpp b/clang-tools-extra/clang-tidy/readability/StringCompareCheck.cpp index 395f406abf1e8..1064c3a8ea4a3 100644 --- a/clang-tools-extra/clang-tidy/readability/StringCompareCheck.cpp +++ b/clang-tools-extra/clang-tidy/readability/StringCompareCheck.cpp @@ -1,4 +1,4 @@ -//===--- MiscStringCompare.cpp - clang-tidy--------------------------------===// +//===-- StringCompareCheck.cpp - clang-tidy--------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/clang-tools-extra/clang-tidy/tool/CMakeLists.txt b/clang-tools-extra/clang-tidy/tool/CMakeLists.txt index f58cfea55189a..41107355cb939 100644 --- a/clang-tools-extra/clang-tidy/tool/CMakeLists.txt +++ b/clang-tools-extra/clang-tidy/tool/CMakeLists.txt @@ -9,7 +9,7 @@ add_clang_tool(clang-tidy ClangTidyMain.cpp ) add_dependencies(clang-tidy - clang-headers + clang-resource-headers ) target_link_libraries(clang-tidy PRIVATE diff --git a/clang-tools-extra/clang-tidy/utils/ExceptionAnalyzer.cpp b/clang-tools-extra/clang-tidy/utils/ExceptionAnalyzer.cpp index 7f1ca52966769..9614cebd1249a 100644 --- a/clang-tools-extra/clang-tidy/utils/ExceptionAnalyzer.cpp +++ b/clang-tools-extra/clang-tidy/utils/ExceptionAnalyzer.cpp @@ -8,10 +8,44 @@ #include "ExceptionAnalyzer.h" -#include "clang/AST/ASTContext.h" -#include "clang/ASTMatchers/ASTMatchFinder.h" - namespace clang { +namespace tidy { +namespace utils { + +void ExceptionAnalyzer::ExceptionInfo::registerException( + const Type *ExceptionType) { + assert(ExceptionType != nullptr && "Only valid types are accepted"); + Behaviour = State::Throwing; + ThrownExceptions.insert(ExceptionType); +} + +void ExceptionAnalyzer::ExceptionInfo::registerExceptions( + const Throwables &Exceptions) { + if (Exceptions.size() == 0) + return; + Behaviour = State::Throwing; + ThrownExceptions.insert(Exceptions.begin(), Exceptions.end()); +} + +ExceptionAnalyzer::ExceptionInfo &ExceptionAnalyzer::ExceptionInfo::merge( + const ExceptionAnalyzer::ExceptionInfo &Other) { + // Only the following two cases require an update to the local + // 'Behaviour'. If the local entity is already throwing there will be no + // change and if the other entity is throwing the merged entity will throw + // as well. + // If one of both entities is 'Unknown' and the other one does not throw + // the merged entity is 'Unknown' as well. + if (Other.Behaviour == State::Throwing) + Behaviour = State::Throwing; + else if (Other.Behaviour == State::Unknown && Behaviour == State::NotThrowing) + Behaviour = State::Unknown; + + ContainsUnknown = ContainsUnknown || Other.ContainsUnknown; + ThrownExceptions.insert(Other.ThrownExceptions.begin(), + Other.ThrownExceptions.end()); + return *this; +} + static bool isBaseOf(const Type *DerivedType, const Type *BaseType) { const auto *DerivedClass = DerivedType->getAsCXXRecordDecl(); const auto *BaseClass = BaseType->getAsCXXRecordDecl(); @@ -22,36 +56,87 @@ static bool isBaseOf(const Type *DerivedType, const Type *BaseType) { [BaseClass](const CXXRecordDecl *Cur) { return Cur != BaseClass; }); } -namespace tidy { -namespace utils { +bool ExceptionAnalyzer::ExceptionInfo::filterByCatch(const Type *BaseClass) { + llvm::SmallVector TypesToDelete; + for (const Type *T : ThrownExceptions) { + if (T == BaseClass || isBaseOf(T, BaseClass)) + TypesToDelete.push_back(T); + } + + for (const Type *T : TypesToDelete) + ThrownExceptions.erase(T); + + reevaluateBehaviour(); + return TypesToDelete.size() > 0; +} + +ExceptionAnalyzer::ExceptionInfo & +ExceptionAnalyzer::ExceptionInfo::filterIgnoredExceptions( + const llvm::StringSet<> &IgnoredTypes, bool IgnoreBadAlloc) { + llvm::SmallVector TypesToDelete; + // Note: Using a 'SmallSet' with 'llvm::remove_if()' is not possible. + // Therefore this slightly hacky implementation is required. + for (const Type *T : ThrownExceptions) { + if (const auto *TD = T->getAsTagDecl()) { + if (TD->getDeclName().isIdentifier()) { + if ((IgnoreBadAlloc && + (TD->getName() == "bad_alloc" && TD->isInStdNamespace())) || + (IgnoredTypes.count(TD->getName()) > 0)) + TypesToDelete.push_back(T); + } + } + } + for (const Type *T : TypesToDelete) + ThrownExceptions.erase(T); -ExceptionAnalyzer::TypeVec ExceptionAnalyzer::throwsException( + reevaluateBehaviour(); + return *this; +} + +void ExceptionAnalyzer::ExceptionInfo::clear() { + Behaviour = State::NotThrowing; + ContainsUnknown = false; + ThrownExceptions.clear(); +} + +void ExceptionAnalyzer::ExceptionInfo::reevaluateBehaviour() { + if (ThrownExceptions.size() == 0) + if (ContainsUnknown) + Behaviour = State::Unknown; + else + Behaviour = State::NotThrowing; + else + Behaviour = State::Throwing; +} + +ExceptionAnalyzer::ExceptionInfo ExceptionAnalyzer::throwsException( const FunctionDecl *Func, llvm::SmallSet &CallStack) { if (CallStack.count(Func)) - return TypeVec(); + return ExceptionInfo::createNonThrowing(); if (const Stmt *Body = Func->getBody()) { CallStack.insert(Func); - const TypeVec Result = throwsException(Body, TypeVec(), CallStack); + ExceptionInfo Result = + throwsException(Body, ExceptionInfo::Throwables(), CallStack); CallStack.erase(Func); return Result; } - TypeVec Result; + auto Result = ExceptionInfo::createUnknown(); if (const auto *FPT = Func->getType()->getAs()) { - for (const QualType Ex : FPT->exceptions()) { - Result.push_back(Ex.getTypePtr()); - } + for (const QualType Ex : FPT->exceptions()) + Result.registerException(Ex.getTypePtr()); } return Result; } -ExceptionAnalyzer::TypeVec ExceptionAnalyzer::throwsException( - const Stmt *St, const TypeVec &Caught, +/// Analyzes a single statment on it's throwing behaviour. This is in principle +/// possible except some 'Unknown' functions are called. +ExceptionAnalyzer::ExceptionInfo ExceptionAnalyzer::throwsException( + const Stmt *St, const ExceptionInfo::Throwables &Caught, llvm::SmallSet &CallStack) { - TypeVec Results; - + auto Results = ExceptionInfo::createNonThrowing(); if (!St) return Results; @@ -59,28 +144,28 @@ ExceptionAnalyzer::TypeVec ExceptionAnalyzer::throwsException( if (const auto *ThrownExpr = Throw->getSubExpr()) { const auto *ThrownType = ThrownExpr->getType()->getUnqualifiedDesugaredType(); - if (ThrownType->isReferenceType()) { + if (ThrownType->isReferenceType()) ThrownType = ThrownType->castAs() ->getPointeeType() ->getUnqualifiedDesugaredType(); - } - if (const auto *TD = ThrownType->getAsTagDecl()) { - if (TD->getDeclName().isIdentifier() && TD->getName() == "bad_alloc" && - TD->isInStdNamespace()) - return Results; - } - Results.push_back(ThrownExpr->getType()->getUnqualifiedDesugaredType()); - } else { - Results.append(Caught.begin(), Caught.end()); - } + Results.registerException( + ThrownExpr->getType()->getUnqualifiedDesugaredType()); + } else + // A rethrow of a caught exception happens which makes it possible + // to throw all exception that are caught in the 'catch' clause of + // the parent try-catch block. + Results.registerExceptions(Caught); } else if (const auto *Try = dyn_cast(St)) { - TypeVec Uncaught = throwsException(Try->getTryBlock(), Caught, CallStack); + ExceptionInfo Uncaught = + throwsException(Try->getTryBlock(), Caught, CallStack); for (unsigned i = 0; i < Try->getNumHandlers(); ++i) { const CXXCatchStmt *Catch = Try->getHandler(i); + + // Everything is catched through 'catch(...)'. if (!Catch->getExceptionDecl()) { - const TypeVec Rethrown = - throwsException(Catch->getHandlerBlock(), Uncaught, CallStack); - Results.append(Rethrown.begin(), Rethrown.end()); + ExceptionInfo Rethrown = throwsException( + Catch->getHandlerBlock(), Uncaught.getExceptionTypes(), CallStack); + Results.merge(Rethrown); Uncaught.clear(); } else { const auto *CaughtType = @@ -90,64 +175,62 @@ ExceptionAnalyzer::TypeVec ExceptionAnalyzer::throwsException( ->getPointeeType() ->getUnqualifiedDesugaredType(); } - auto NewEnd = - llvm::remove_if(Uncaught, [&CaughtType](const Type *ThrownType) { - return ThrownType == CaughtType || - isBaseOf(ThrownType, CaughtType); - }); - if (NewEnd != Uncaught.end()) { - Uncaught.erase(NewEnd, Uncaught.end()); - const TypeVec Rethrown = throwsException( - Catch->getHandlerBlock(), TypeVec(1, CaughtType), CallStack); - Results.append(Rethrown.begin(), Rethrown.end()); + + // If the caught exception will catch multiple previously potential + // thrown types (because it's sensitive to inheritance) the throwing + // situation changes. First of all filter the exception types and + // analyze if the baseclass-exception is rethrown. + if (Uncaught.filterByCatch(CaughtType)) { + ExceptionInfo::Throwables CaughtExceptions; + CaughtExceptions.insert(CaughtType); + ExceptionInfo Rethrown = throwsException(Catch->getHandlerBlock(), + CaughtExceptions, CallStack); + Results.merge(Rethrown); } } } - Results.append(Uncaught.begin(), Uncaught.end()); + Results.merge(Uncaught); } else if (const auto *Call = dyn_cast(St)) { if (const FunctionDecl *Func = Call->getDirectCallee()) { - TypeVec Excs = throwsException(Func, CallStack); - Results.append(Excs.begin(), Excs.end()); + ExceptionInfo Excs = throwsException(Func, CallStack); + Results.merge(Excs); } } else { for (const Stmt *Child : St->children()) { - TypeVec Excs = throwsException(Child, Caught, CallStack); - Results.append(Excs.begin(), Excs.end()); + ExceptionInfo Excs = throwsException(Child, Caught, CallStack); + Results.merge(Excs); } } return Results; } -bool ExceptionAnalyzer::throwsException(const FunctionDecl *Func) { - // Check if the function has already been analyzed and reuse that result. - if (FunctionCache.count(Func) > 0) - return FunctionCache[Func]; +ExceptionAnalyzer::ExceptionInfo +ExceptionAnalyzer::analyze(const FunctionDecl *Func) { + ExceptionInfo ExceptionList; - llvm::SmallSet CallStack; - TypeVec ExceptionList = throwsException(Func, CallStack); + // Check if the function has already been analyzed and reuse that result. + if (FunctionCache.count(Func) == 0) { + llvm::SmallSet CallStack; + ExceptionList = throwsException(Func, CallStack); + + // Cache the result of the analysis. This is done prior to filtering + // because it is best to keep as much information as possible. + // The results here might be relevant to different analysis passes + // with different needs as well. + FunctionCache.insert(std::make_pair(Func, ExceptionList)); + } else + ExceptionList = FunctionCache[Func]; + + if (ExceptionList.getBehaviour() == State::NotThrowing || + ExceptionList.getBehaviour() == State::Unknown) + return ExceptionList; // Remove all ignored exceptions from the list of exceptions that can be // thrown. - auto NewEnd = llvm::remove_if(ExceptionList, [this](const Type *Exception) { - return isIgnoredExceptionType(Exception); - }); - ExceptionList.erase(NewEnd, ExceptionList.end()); + ExceptionList.filterIgnoredExceptions(IgnoredExceptions, IgnoreBadAlloc); - // Cache the result of the analysis. - bool FunctionThrows = ExceptionList.size() > 0; - FunctionCache.insert(std::make_pair(Func, FunctionThrows)); - - return FunctionThrows; + return ExceptionList; } - -bool ExceptionAnalyzer::isIgnoredExceptionType(const Type *Exception) { - if (const auto *TD = Exception->getAsTagDecl()) { - if (TD->getDeclName().isIdentifier()) - return IgnoredExceptions.count(TD->getName()) > 0; - } - return false; -} - } // namespace utils } // namespace tidy diff --git a/clang-tools-extra/clang-tidy/utils/ExceptionAnalyzer.h b/clang-tools-extra/clang-tidy/utils/ExceptionAnalyzer.h index 327da30020e41..5902e5afecfb3 100644 --- a/clang-tools-extra/clang-tidy/utils/ExceptionAnalyzer.h +++ b/clang-tools-extra/clang-tidy/utils/ExceptionAnalyzer.h @@ -10,6 +10,7 @@ #define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_UTILS_EXCEPTION_ANALYZER_H #include "clang/AST/ASTContext.h" +#include "clang/ASTMatchers/ASTMatchFinder.h" #include "llvm/ADT/SmallSet.h" #include "llvm/ADT/StringSet.h" @@ -17,29 +18,129 @@ namespace clang { namespace tidy { namespace utils { -/// This class analysis if a `FunctionDecl` can in principle throw an exception, -/// either directly or indirectly. -/// It can be configured to ignore custom exception types. +/// This class analysis if a `FunctionDecl` can in principle throw an +/// exception, either directly or indirectly. It can be configured to ignore +/// custom exception types. class ExceptionAnalyzer { public: + enum class State : std::int8_t { + Throwing = 0, ///< The function can definitly throw given an AST. + NotThrowing = 1, ///< This function can not throw, given an AST. + Unknown = 2, ///< This can happen for extern functions without available + ///< definition. + }; + + /// Bundle the gathered information about an entity like a function regarding + /// it's exception behaviour. The 'NonThrowing'-state can be considered as the + /// neutral element in terms of information propagation. + /// In the case of 'Throwing' state it is possible that 'getExceptionTypes' + /// does not include *ALL* possible types as there is the possibility that + /// an 'Unknown' function is called that might throw a previously unknown + /// exception at runtime. + class ExceptionInfo { + public: + using Throwables = llvm::SmallSet; + static ExceptionInfo createUnknown() { + return ExceptionInfo(State::Unknown); + } + static ExceptionInfo createNonThrowing() { + return ExceptionInfo(State::Throwing); + } + + /// By default the exception situation is unknown and must be + /// clarified step-wise. + ExceptionInfo() : Behaviour(State::NotThrowing), ContainsUnknown(false) {} + ExceptionInfo(State S) + : Behaviour(S), ContainsUnknown(S == State::Unknown) {} + + ExceptionInfo(const ExceptionInfo &) = default; + ExceptionInfo &operator=(const ExceptionInfo &) = default; + ExceptionInfo(ExceptionInfo &&) = default; + ExceptionInfo &operator=(ExceptionInfo &&) = default; + + State getBehaviour() const { return Behaviour; } + + /// Register a single exception type as recognized potential exception to be + /// thrown. + void registerException(const Type *ExceptionType); + + /// Registers a `SmallVector` of exception types as recognized potential + /// exceptions to be thrown. + void registerExceptions(const Throwables &Exceptions); + + /// Updates the local state according to the other state. That means if + /// for example a function contains multiple statements the 'ExceptionInfo' + /// for the final function is the merged result of each statement. + /// If one of these statements throws the whole function throws and if one + /// part is unknown and the rest is non-throwing the result will be + /// unknown. + ExceptionInfo &merge(const ExceptionInfo &Other); + + /// This method is useful in case 'catch' clauses are analyzed as it is + /// possible to catch multiple exception types by one 'catch' if they + /// are a subclass of the 'catch'ed exception type. + /// Returns 'true' if some exceptions were filtered, otherwise 'false'. + bool filterByCatch(const Type *BaseClass); + + /// Filter the set of thrown exception type against a set of ignored + /// types that shall not be considered in the exception analysis. + /// This includes explicit `std::bad_alloc` ignoring as separate option. + ExceptionInfo & + filterIgnoredExceptions(const llvm::StringSet<> &IgnoredTypes, + bool IgnoreBadAlloc); + + /// Clear the state to 'NonThrowing' to make the corresponding entity + /// neutral. + void clear(); + + /// References the set of known exception types that can escape from the + /// corresponding entity. + const Throwables &getExceptionTypes() const { return ThrownExceptions; } + + /// Signal if the there is any 'Unknown' element within the scope of + /// the related entity. This might be relevant if the entity is 'Throwing' + /// and to ensure that no other exception then 'getExceptionTypes' can + /// occur. If there is an 'Unknown' element this can not be guaranteed. + bool containsUnknownElements() const { return ContainsUnknown; } + + private: + /// Recalculate the 'Behaviour' for example after filtering. + void reevaluateBehaviour(); + + /// Keep track if the entity related to this 'ExceptionInfo' can in princple + /// throw, if it's unknown or if it won't throw. + State Behaviour; + + /// Keep track if the entity contains any unknown elements to keep track + /// of the certainty of decisions and/or correct 'Behaviour' transition + /// after filtering. + bool ContainsUnknown; + + /// 'ThrownException' is empty if the 'Behaviour' is either 'NotThrowing' or + /// 'Unknown'. + Throwables ThrownExceptions; + }; + ExceptionAnalyzer() = default; - bool throwsException(const FunctionDecl *Func); + void ignoreBadAlloc(bool ShallIgnore) { IgnoreBadAlloc = ShallIgnore; } void ignoreExceptions(llvm::StringSet<> ExceptionNames) { IgnoredExceptions = std::move(ExceptionNames); } -private: - using TypeVec = llvm::SmallVector; + ExceptionInfo analyze(const FunctionDecl *Func); - TypeVec throwsException(const FunctionDecl *Func, - llvm::SmallSet &CallStack); - TypeVec throwsException(const Stmt *St, const TypeVec &Caught, - llvm::SmallSet &CallStack); - bool isIgnoredExceptionType(const Type *Exception); +private: + ExceptionInfo + throwsException(const FunctionDecl *Func, + llvm::SmallSet &CallStack); + ExceptionInfo + throwsException(const Stmt *St, const ExceptionInfo::Throwables &Caught, + llvm::SmallSet &CallStack); + bool IgnoreBadAlloc = true; llvm::StringSet<> IgnoredExceptions; - llvm::DenseMap FunctionCache; + std::map FunctionCache; }; } // namespace utils } // namespace tidy diff --git a/clang-tools-extra/clang-tidy/utils/OptionsUtils.cpp b/clang-tools-extra/clang-tidy/utils/OptionsUtils.cpp index 30b76643f3321..36f4b6fc973fc 100644 --- a/clang-tools-extra/clang-tidy/utils/OptionsUtils.cpp +++ b/clang-tools-extra/clang-tidy/utils/OptionsUtils.cpp @@ -1,4 +1,4 @@ -//===--- DanglingHandleCheck.cpp - clang-tidy------------------------------===// +//===-- OptionsUtils.cpp - clang-tidy -------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/clang-tools-extra/clangd/AST.h b/clang-tools-extra/clangd/AST.h index 15c46a4fe14e4..7798f1feb36de 100644 --- a/clang-tools-extra/clangd/AST.h +++ b/clang-tools-extra/clangd/AST.h @@ -13,9 +13,10 @@ #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_AST_H_ #define LLVM_CLANG_TOOLS_EXTRA_CLANGD_AST_H_ -#include "index/Index.h" +#include "index/SymbolID.h" #include "clang/AST/Decl.h" #include "clang/Basic/SourceLocation.h" +#include "clang/Lex/MacroInfo.h" namespace clang { class SourceManager; diff --git a/clang-tools-extra/clangd/CMakeLists.txt b/clang-tools-extra/clangd/CMakeLists.txt index 6db78920e3501..5152d5fc86676 100644 --- a/clang-tools-extra/clangd/CMakeLists.txt +++ b/clang-tools-extra/clangd/CMakeLists.txt @@ -62,9 +62,13 @@ add_clang_library(clangDaemon index/IndexAction.cpp index/MemIndex.cpp index/Merge.cpp - index/SymbolID.cpp + index/Ref.cpp index/Serialization.cpp + index/Symbol.cpp index/SymbolCollector.cpp + index/SymbolID.cpp + index/SymbolLocation.cpp + index/SymbolOrigin.cpp index/YAMLSerialization.cpp index/dex/Dex.cpp diff --git a/clang-tools-extra/clangd/ClangdServer.cpp b/clang-tools-extra/clangd/ClangdServer.cpp index 595e0758513ba..9dc332806dea3 100644 --- a/clang-tools-extra/clangd/ClangdServer.cpp +++ b/clang-tools-extra/clangd/ClangdServer.cpp @@ -13,6 +13,7 @@ #include "Headers.h" #include "SourceCode.h" #include "Trace.h" +#include "index/CanonicalIncludes.h" #include "index/FileIndex.h" #include "index/Merge.h" #include "refactor/Tweak.h" @@ -69,9 +70,10 @@ struct UpdateIndexCallbacks : public ParsingCallbacks { : FIndex(FIndex), DiagConsumer(DiagConsumer) {} void onPreambleAST(PathRef Path, ASTContext &Ctx, - std::shared_ptr PP) override { + std::shared_ptr PP, + const CanonicalIncludes &CanonIncludes) override { if (FIndex) - FIndex->updatePreamble(Path, Ctx, std::move(PP)); + FIndex->updatePreamble(Path, Ctx, std::move(PP), CanonIncludes); } void onMainAST(PathRef Path, ParsedAST &AST) override { @@ -360,8 +362,9 @@ void ClangdServer::enumerateTweaks(PathRef File, Range Sel, void ClangdServer::applyTweak(PathRef File, Range Sel, StringRef TweakID, Callback CB) { - auto Action = [Sel](decltype(CB) CB, std::string File, std::string TweakID, - Expected InpAST) { + auto Action = [Sel](decltype(CB) CB, std::string File, + std::string TweakID, + Expected InpAST) { if (!InpAST) return CB(InpAST.takeError()); auto Selection = tweakSelection(Sel, *InpAST); @@ -370,8 +373,15 @@ void ClangdServer::applyTweak(PathRef File, Range Sel, StringRef TweakID, auto A = prepareTweak(TweakID, *Selection); if (!A) return CB(A.takeError()); - // FIXME: run formatter on top of resulting replacements. - return CB((*A)->apply(*Selection)); + auto RawReplacements = (*A)->apply(*Selection); + if (!RawReplacements) + return CB(RawReplacements.takeError()); + // FIXME: this function has I/O operations (find .clang-format file), figure + // out a way to cache the format style. + auto Style = getFormatStyleForFile(File, InpAST->Inputs.Contents, + InpAST->Inputs.FS.get()); + return CB( + cleanupAndFormat(InpAST->Inputs.Contents, *RawReplacements, Style)); }; WorkScheduler.runWithAST( "ApplyTweak", File, diff --git a/clang-tools-extra/clangd/ClangdUnit.cpp b/clang-tools-extra/clangd/ClangdUnit.cpp index 6b5e17640c302..b07abd9afbb5f 100644 --- a/clang-tools-extra/clangd/ClangdUnit.cpp +++ b/clang-tools-extra/clangd/ClangdUnit.cpp @@ -16,6 +16,7 @@ #include "Logger.h" #include "SourceCode.h" #include "Trace.h" +#include "index/CanonicalIncludes.h" #include "index/Index.h" #include "clang/AST/ASTContext.h" #include "clang/Basic/LangOptions.h" @@ -95,15 +96,19 @@ class ClangdFrontendAction : public SyntaxOnlyAction { class CppFilePreambleCallbacks : public PreambleCallbacks { public: CppFilePreambleCallbacks(PathRef File, PreambleParsedCallback ParsedCallback) - : File(File), ParsedCallback(ParsedCallback) {} + : File(File), ParsedCallback(ParsedCallback) { + addSystemHeadersMapping(&CanonIncludes); + } IncludeStructure takeIncludes() { return std::move(Includes); } + CanonicalIncludes takeCanonicalIncludes() { return std::move(CanonIncludes); } + void AfterExecute(CompilerInstance &CI) override { if (!ParsedCallback) return; trace::Span Tracer("Running PreambleCallback"); - ParsedCallback(CI.getASTContext(), CI.getPreprocessorPtr()); + ParsedCallback(CI.getASTContext(), CI.getPreprocessorPtr(), CanonIncludes); } void BeforeExecute(CompilerInstance &CI) override { @@ -115,10 +120,17 @@ class CppFilePreambleCallbacks : public PreambleCallbacks { return collectIncludeStructureCallback(*SourceMgr, &Includes); } + CommentHandler *getCommentHandler() override { + IWYUHandler = collectIWYUHeaderMaps(&CanonIncludes); + return IWYUHandler.get(); + } + private: PathRef File; PreambleParsedCallback ParsedCallback; IncludeStructure Includes; + CanonicalIncludes CanonIncludes; + std::unique_ptr IWYUHandler = nullptr; SourceManager *SourceMgr = nullptr; }; @@ -310,6 +322,7 @@ ParsedAST::build(std::unique_ptr CI, const clang::Diagnostic &Info) { return FixIncludes->fix(DiagLevl, Info); }); + Clang->setExternalSemaSource(FixIncludes->unresolvedNameRecorder()); } // Copy over the includes from the preamble, then combine with the @@ -324,6 +337,17 @@ ParsedAST::build(std::unique_ptr CI, Clang->getPreprocessor().addPPCallbacks( collectIncludeStructureCallback(Clang->getSourceManager(), &Includes)); + // Copy over the includes from the preamble, then combine with the + // non-preamble includes below. + CanonicalIncludes CanonIncludes; + if (Preamble) + CanonIncludes = Preamble->CanonIncludes; + else + addSystemHeadersMapping(&CanonIncludes); + std::unique_ptr IWYUHandler = + collectIWYUHeaderMaps(&CanonIncludes); + Clang->getPreprocessor().addCommentHandler(IWYUHandler.get()); + if (!Action->Execute()) log("Execute() failed when building AST for {0}", MainInput.getFile()); @@ -353,7 +377,7 @@ ParsedAST::build(std::unique_ptr CI, Diags.insert(Diags.begin(), Preamble->Diags.begin(), Preamble->Diags.end()); return ParsedAST(std::move(Preamble), std::move(Clang), std::move(Action), std::move(ParsedDecls), std::move(Diags), - std::move(Includes)); + std::move(Includes), std::move(CanonIncludes)); } ParsedAST::ParsedAST(ParsedAST &&Other) = default; @@ -429,21 +453,28 @@ const IncludeStructure &ParsedAST::getIncludeStructure() const { return Includes; } +const CanonicalIncludes &ParsedAST::getCanonicalIncludes() const { + return CanonIncludes; +} + PreambleData::PreambleData(PrecompiledPreamble Preamble, std::vector Diags, IncludeStructure Includes, - std::unique_ptr StatCache) + std::unique_ptr StatCache, + CanonicalIncludes CanonIncludes) : Preamble(std::move(Preamble)), Diags(std::move(Diags)), - Includes(std::move(Includes)), StatCache(std::move(StatCache)) {} + Includes(std::move(Includes)), StatCache(std::move(StatCache)), + CanonIncludes(std::move(CanonIncludes)) {} ParsedAST::ParsedAST(std::shared_ptr Preamble, std::unique_ptr Clang, std::unique_ptr Action, std::vector LocalTopLevelDecls, - std::vector Diags, IncludeStructure Includes) + std::vector Diags, IncludeStructure Includes, + CanonicalIncludes CanonIncludes) : Preamble(std::move(Preamble)), Clang(std::move(Clang)), Action(std::move(Action)), Diags(std::move(Diags)), LocalTopLevelDecls(std::move(LocalTopLevelDecls)), - Includes(std::move(Includes)) { + Includes(std::move(Includes)), CanonIncludes(std::move(CanonIncludes)) { assert(this->Clang); assert(this->Action); } @@ -510,7 +541,8 @@ buildPreamble(PathRef FileName, CompilerInvocation &CI, FileName); return std::make_shared( std::move(*BuiltPreamble), PreambleDiagnostics.take(), - SerializedDeclsCollector.takeIncludes(), std::move(StatCache)); + SerializedDeclsCollector.takeIncludes(), std::move(StatCache), + SerializedDeclsCollector.takeCanonicalIncludes()); } else { elog("Could not build a preamble for file {0}", FileName); return nullptr; @@ -534,10 +566,10 @@ buildAST(PathRef FileName, std::unique_ptr Invocation, // dirs. } - return ParsedAST::build( - llvm::make_unique(*Invocation), Preamble, - llvm::MemoryBuffer::getMemBufferCopy(Inputs.Contents), PCHs, - std::move(VFS), Inputs.Index ? Inputs.Index : nullptr, Inputs.Opts); + return ParsedAST::build(llvm::make_unique(*Invocation), + Preamble, + llvm::MemoryBuffer::getMemBufferCopy(Inputs.Contents), + PCHs, std::move(VFS), Inputs.Index, Inputs.Opts); } SourceLocation getBeginningOfIdentifier(ParsedAST &Unit, const Position &Pos, diff --git a/clang-tools-extra/clangd/ClangdUnit.h b/clang-tools-extra/clangd/ClangdUnit.h index f4883fd57871a..d5bdd1ab55fd0 100644 --- a/clang-tools-extra/clangd/ClangdUnit.h +++ b/clang-tools-extra/clangd/ClangdUnit.h @@ -16,6 +16,7 @@ #include "Headers.h" #include "Path.h" #include "Protocol.h" +#include "index/CanonicalIncludes.h" #include "index/Index.h" #include "clang/Frontend/FrontendAction.h" #include "clang/Frontend/PrecompiledPreamble.h" @@ -48,7 +49,8 @@ namespace clangd { struct PreambleData { PreambleData(PrecompiledPreamble Preamble, std::vector Diags, IncludeStructure Includes, - std::unique_ptr StatCache); + std::unique_ptr StatCache, + CanonicalIncludes CanonIncludes); tooling::CompileCommand CompileCommand; PrecompiledPreamble Preamble; @@ -59,6 +61,7 @@ struct PreambleData { // Cache of FS operations performed when building the preamble. // When reusing a preamble, this cache can be consumed to save IO. std::unique_ptr StatCache; + CanonicalIncludes CanonIncludes; }; /// Stores and provides access to parsed AST. @@ -100,13 +103,14 @@ class ParsedAST { /// bytes. Does not include the size of the preamble. std::size_t getUsedBytes() const; const IncludeStructure &getIncludeStructure() const; + const CanonicalIncludes &getCanonicalIncludes() const; private: ParsedAST(std::shared_ptr Preamble, std::unique_ptr Clang, std::unique_ptr Action, std::vector LocalTopLevelDecls, std::vector Diags, - IncludeStructure Includes); + IncludeStructure Includes, CanonicalIncludes CanonIncludes); // In-memory preambles must outlive the AST, it is important that this member // goes before Clang and Action. @@ -125,10 +129,12 @@ class ParsedAST { // top-level decls from the preamble. std::vector LocalTopLevelDecls; IncludeStructure Includes; + CanonicalIncludes CanonIncludes; }; using PreambleParsedCallback = - std::function)>; + std::function, + const CanonicalIncludes &)>; /// Rebuild the preamble for the new inputs unless the old one can be reused. /// If \p OldPreamble can be reused, it is returned unchanged. diff --git a/clang-tools-extra/clangd/CodeComplete.cpp b/clang-tools-extra/clangd/CodeComplete.cpp index 83dcfb7af65d8..91a5dac595a05 100644 --- a/clang-tools-extra/clangd/CodeComplete.cpp +++ b/clang-tools-extra/clangd/CodeComplete.cpp @@ -34,6 +34,7 @@ #include "Trace.h" #include "URI.h" #include "index/Index.h" +#include "index/Symbol.h" #include "clang/AST/Decl.h" #include "clang/AST/DeclBase.h" #include "clang/Basic/LangOptions.h" @@ -48,6 +49,7 @@ #include "llvm/ADT/None.h" #include "llvm/ADT/Optional.h" #include "llvm/ADT/SmallVector.h" +#include "llvm/ADT/StringRef.h" #include "llvm/Support/Error.h" #include "llvm/Support/Format.h" #include "llvm/Support/FormatVariadic.h" @@ -526,7 +528,7 @@ struct SpecifiedScope { std::set Results; for (llvm::StringRef AS : AccessibleScopes) Results.insert( - ((UnresolvedQualifier ? *UnresolvedQualifier : "") + AS).str()); + (AS + (UnresolvedQualifier ? *UnresolvedQualifier : "")).str()); return {Results.begin(), Results.end()}; } }; @@ -570,16 +572,15 @@ getQueryScopes(CodeCompletionContext &CCContext, const Sema &CCSema, } // Unresolved qualifier. - // FIXME: When Sema can resolve part of a scope chain (e.g. - // "known::unknown::id"), we should expand the known part ("known::") rather - // than treating the whole thing as unknown. - SpecifiedScope Info; - Info.AccessibleScopes.push_back(""); // global namespace + SpecifiedScope Info = GetAllAccessibleScopes(CCContext); + Info.AccessibleScopes.push_back(""); // Make sure global scope is included. - Info.UnresolvedQualifier = + llvm::StringRef SpelledSpecifier = Lexer::getSourceText(CharSourceRange::getCharRange((*SS)->getRange()), - CCSema.SourceMgr, clang::LangOptions()) - .ltrim("::"); + CCSema.SourceMgr, clang::LangOptions()); + if (SpelledSpecifier.consume_front("::")) + Info.AccessibleScopes = {""}; + Info.UnresolvedQualifier = SpelledSpecifier; // Sema excludes the trailing "::". if (!Info.UnresolvedQualifier->empty()) *Info.UnresolvedQualifier += "::"; @@ -1333,6 +1334,8 @@ class CodeCompleteFlow { Req.AnyScope = AllScopes; // FIXME: we should send multiple weighted paths here. Req.ProximityPaths.push_back(FileName); + if (PreferredType) + Req.PreferredTypes.push_back(PreferredType->raw()); vlog("Code complete: fuzzyFind({0:2})", toJSON(Req)); if (SpecFuzzyFind) diff --git a/clang-tools-extra/clangd/CodeComplete.h b/clang-tools-extra/clangd/CodeComplete.h index 081513790c776..c57a2afba4fe8 100644 --- a/clang-tools-extra/clangd/CodeComplete.h +++ b/clang-tools-extra/clangd/CodeComplete.h @@ -21,6 +21,8 @@ #include "Path.h" #include "Protocol.h" #include "index/Index.h" +#include "index/Symbol.h" +#include "index/SymbolOrigin.h" #include "clang/Frontend/PrecompiledPreamble.h" #include "clang/Sema/CodeCompleteConsumer.h" #include "clang/Sema/CodeCompleteOptions.h" diff --git a/clang-tools-extra/clangd/Diagnostics.cpp b/clang-tools-extra/clangd/Diagnostics.cpp index 83876217b09ee..210539532a342 100644 --- a/clang-tools-extra/clangd/Diagnostics.cpp +++ b/clang-tools-extra/clangd/Diagnostics.cpp @@ -161,11 +161,11 @@ std::string capitalize(std::string Message) { /// /// dir1/dir2/dir3/../../dir4/header.h:12:23 /// note: candidate function not viable: requires 3 arguments -std::string mainMessage(const Diag &D) { +std::string mainMessage(const Diag &D, bool DisplayFixesCount) { std::string Result; llvm::raw_string_ostream OS(Result); OS << D.Message; - if (!D.Fixes.empty()) + if (DisplayFixesCount && !D.Fixes.empty()) OS << " (" << (D.Fixes.size() > 1 ? "fixes" : "fix") << " available)"; for (auto &Note : D.Notes) { OS << "\n\n"; @@ -252,7 +252,7 @@ void toLSPDiags( { clangd::Diagnostic Main = FillBasicFields(D); - Main.message = mainMessage(D); + Main.message = mainMessage(D, Opts.DisplayFixesCount); if (Opts.EmbedFixesInDiagnostics) { Main.codeActions.emplace(); for (const auto &Fix : D.Fixes) @@ -335,6 +335,11 @@ void StoreDiags::HandleDiagnostic(DiagnosticsEngine::Level DiagLevel, llvm::SmallVector Edits; for (auto &FixIt : Info.getFixItHints()) { + // Follow clang's behavior, don't apply FixIt to the code in macros, + // we are less certain it is the right fix. + if (FixIt.RemoveRange.getBegin().isMacroID() || + FixIt.RemoveRange.getEnd().isMacroID()) + return false; if (!isInsideMainFile(FixIt.RemoveRange.getBegin(), Info.getSourceManager())) return false; diff --git a/clang-tools-extra/clangd/Diagnostics.h b/clang-tools-extra/clangd/Diagnostics.h index 9130ad5644c58..095590b9a865d 100644 --- a/clang-tools-extra/clangd/Diagnostics.h +++ b/clang-tools-extra/clangd/Diagnostics.h @@ -32,6 +32,10 @@ struct ClangdDiagnosticOptions { /// stage during which the issue was produced, e.g. "Semantic Issue" or "Parse /// Issue". bool SendDiagnosticCategory = false; + + /// If true, Clangd will add a number of available fixes to the diagnostic's + /// message. + bool DisplayFixesCount = true; }; /// Contains basic information about a diagnostic. diff --git a/clang-tools-extra/clangd/ExpectedTypes.cpp b/clang-tools-extra/clangd/ExpectedTypes.cpp index 59d9e149162a6..886b5db0cd0c6 100644 --- a/clang-tools-extra/clangd/ExpectedTypes.cpp +++ b/clang-tools-extra/clangd/ExpectedTypes.cpp @@ -1,3 +1,11 @@ +//===--- ExpectedTypes.cpp ---------------------------------------*- C++-*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + #include "ExpectedTypes.h" #include "clang/AST/ASTContext.h" #include "clang/AST/Type.h" diff --git a/clang-tools-extra/clangd/FSProvider.cpp b/clang-tools-extra/clangd/FSProvider.cpp index be9157408d66d..5d1434bf6f0bf 100644 --- a/clang-tools-extra/clangd/FSProvider.cpp +++ b/clang-tools-extra/clangd/FSProvider.cpp @@ -74,9 +74,10 @@ clang::clangd::RealFileSystemProvider::getFileSystem() const { // FIXME: Try to use a similar approach in Sema instead of relying on // propagation of the 'isVolatile' flag through all layers. #ifdef _WIN32 - return new VolatileFileSystem(llvm::vfs::getRealFileSystem()); + return new VolatileFileSystem( + llvm::vfs::createPhysicalFileSystem().release()); #else - return llvm::vfs::getRealFileSystem(); + return llvm::vfs::createPhysicalFileSystem().release(); #endif } } // namespace clangd diff --git a/clang-tools-extra/clangd/Headers.h b/clang-tools-extra/clangd/Headers.h index e29f7f6be4596..ab44191dc6bcb 100644 --- a/clang-tools-extra/clangd/Headers.h +++ b/clang-tools-extra/clangd/Headers.h @@ -12,7 +12,7 @@ #include "Path.h" #include "Protocol.h" #include "SourceCode.h" -#include "index/Index.h" +#include "index/Symbol.h" #include "clang/Format/Format.h" #include "clang/Lex/HeaderSearch.h" #include "clang/Lex/PPCallbacks.h" diff --git a/clang-tools-extra/clangd/IncludeFixer.cpp b/clang-tools-extra/clangd/IncludeFixer.cpp index 0f49888465394..978e35f7a233e 100644 --- a/clang-tools-extra/clangd/IncludeFixer.cpp +++ b/clang-tools-extra/clangd/IncludeFixer.cpp @@ -13,25 +13,63 @@ #include "SourceCode.h" #include "Trace.h" #include "index/Index.h" +#include "index/Symbol.h" #include "clang/AST/Decl.h" +#include "clang/AST/DeclBase.h" +#include "clang/AST/NestedNameSpecifier.h" #include "clang/AST/Type.h" #include "clang/Basic/Diagnostic.h" #include "clang/Basic/DiagnosticSema.h" +#include "clang/Basic/LangOptions.h" +#include "clang/Basic/SourceLocation.h" +#include "clang/Basic/SourceManager.h" +#include "clang/Basic/TokenKinds.h" +#include "clang/Lex/Lexer.h" +#include "clang/Sema/DeclSpec.h" +#include "clang/Sema/Lookup.h" +#include "clang/Sema/Scope.h" +#include "clang/Sema/Sema.h" +#include "clang/Sema/TypoCorrection.h" +#include "llvm/ADT/ArrayRef.h" +#include "llvm/ADT/DenseMap.h" #include "llvm/ADT/None.h" +#include "llvm/ADT/Optional.h" +#include "llvm/ADT/StringRef.h" +#include "llvm/ADT/StringSet.h" #include "llvm/Support/Error.h" #include "llvm/Support/FormatVariadic.h" +#include namespace clang { namespace clangd { +namespace { + +// Collects contexts visited during a Sema name lookup. +class VisitedContextCollector : public VisibleDeclConsumer { +public: + void EnteredContext(DeclContext *Ctx) override { Visited.push_back(Ctx); } + + void FoundDecl(NamedDecl *ND, NamedDecl *Hiding, DeclContext *Ctx, + bool InBaseClass) override {} + + std::vector takeVisitedContexts() { + return std::move(Visited); + } + +private: + std::vector Visited; +}; + +} // namespace + std::vector IncludeFixer::fix(DiagnosticsEngine::Level DiagLevel, const clang::Diagnostic &Info) const { - if (IndexRequestCount >= IndexRequestLimit) - return {}; // Avoid querying index too many times in a single parse. switch (Info.getID()) { case diag::err_incomplete_type: case diag::err_incomplete_member_access: case diag::err_incomplete_base_class: + case diag::err_incomplete_nested_name_spec: // Incomplete type diagnostics should have a QualType argument for the // incomplete type. for (unsigned Idx = 0; Idx < Info.getNumArgs(); ++Idx) { @@ -42,6 +80,34 @@ std::vector IncludeFixer::fix(DiagnosticsEngine::Level DiagLevel, return fixIncompleteType(*T); } } + break; + case diag::err_unknown_typename: + case diag::err_unknown_typename_suggest: + case diag::err_typename_nested_not_found: + case diag::err_no_template: + case diag::err_no_template_suggest: + case diag::err_undeclared_use: + case diag::err_undeclared_use_suggest: + case diag::err_undeclared_var_use: + case diag::err_undeclared_var_use_suggest: + case diag::err_no_member: // Could be no member in namespace. + case diag::err_no_member_suggest: + if (LastUnresolvedName) { + // Try to fix unresolved name caused by missing declaraion. + // E.g. + // clang::SourceManager SM; + // ~~~~~~~~~~~~~ + // UnresolvedName + // or + // namespace clang { SourceManager SM; } + // ~~~~~~~~~~~~~ + // UnresolvedName + // We only attempt to recover a diagnostic if it has the same location as + // the last seen unresolved name. + if (DiagLevel >= DiagnosticsEngine::Error && + LastUnresolvedName->Loc == Info.getLocation()) + return fixUnresolvedName(); + } } return {}; } @@ -59,26 +125,22 @@ std::vector IncludeFixer::fixIncompleteType(const Type &T) const { auto ID = getSymbolID(TD); if (!ID) return {}; - ++IndexRequestCount; - // FIXME: consider batching the requests for all diagnostics. - // FIXME: consider caching the lookup results. - LookupRequest Req; - Req.IDs.insert(*ID); - llvm::Optional Matched; - Index.lookup(Req, [&](const Symbol &Sym) { - if (Matched) - return; - Matched = Sym; - }); - - if (!Matched || Matched->IncludeHeaders.empty() || !Matched->Definition || - Matched->CanonicalDeclaration.FileURI != Matched->Definition.FileURI) + llvm::Optional Symbols = lookupCached(*ID); + if (!Symbols) return {}; - return fixesForSymbol(*Matched); + const SymbolSlab &Syms = **Symbols; + std::vector Fixes; + if (!Syms.empty()) { + auto &Matched = *Syms.begin(); + if (!Matched.IncludeHeaders.empty() && Matched.Definition && + Matched.CanonicalDeclaration.FileURI == Matched.Definition.FileURI) + Fixes = fixesForSymbols(Syms); + } + return Fixes; } -std::vector IncludeFixer::fixesForSymbol(const Symbol &Sym) const { - auto Inserted = [&](llvm::StringRef Header) +std::vector IncludeFixer::fixesForSymbols(const SymbolSlab &Syms) const { + auto Inserted = [&](const Symbol &Sym, llvm::StringRef Header) -> llvm::Expected> { auto ResolvedDeclaring = toHeaderFile(Sym.CanonicalDeclaration.FileURI, File); @@ -93,21 +155,298 @@ std::vector IncludeFixer::fixesForSymbol(const Symbol &Sym) const { }; std::vector Fixes; - for (const auto &Inc : getRankedIncludes(Sym)) { - if (auto ToInclude = Inserted(Inc)) { - if (ToInclude->second) - if (auto Edit = Inserter->insert(ToInclude->first)) - Fixes.push_back( - Fix{llvm::formatv("Add include {0} for symbol {1}{2}", - ToInclude->first, Sym.Scope, Sym.Name), - {std::move(*Edit)}}); - } else { - vlog("Failed to calculate include insertion for {0} into {1}: {2}", File, - Inc, ToInclude.takeError()); + // Deduplicate fixes by include headers. This doesn't distiguish symbols in + // different scopes from the same header, but this case should be rare and is + // thus ignored. + llvm::StringSet<> InsertedHeaders; + for (const auto &Sym : Syms) { + for (const auto &Inc : getRankedIncludes(Sym)) { + if (auto ToInclude = Inserted(Sym, Inc)) { + if (ToInclude->second) { + auto I = InsertedHeaders.try_emplace(ToInclude->first); + if (!I.second) + continue; + if (auto Edit = Inserter->insert(ToInclude->first)) + Fixes.push_back( + Fix{llvm::formatv("Add include {0} for symbol {1}{2}", + ToInclude->first, Sym.Scope, Sym.Name), + {std::move(*Edit)}}); + } + } else { + vlog("Failed to calculate include insertion for {0} into {1}: {2}", + File, Inc, ToInclude.takeError()); + } } } return Fixes; } +// Returns the identifiers qualified by an unresolved name. \p Loc is the +// start location of the unresolved name. For the example below, this returns +// "::X::Y" that is qualified by unresolved name "clangd": +// clang::clangd::X::Y +// ~ +llvm::Optional qualifiedByUnresolved(const SourceManager &SM, + SourceLocation Loc, + const LangOptions &LangOpts) { + std::string Result; + + SourceLocation NextLoc = Loc; + while (auto CCTok = Lexer::findNextToken(NextLoc, SM, LangOpts)) { + if (!CCTok->is(tok::coloncolon)) + break; + auto IDTok = Lexer::findNextToken(CCTok->getLocation(), SM, LangOpts); + if (!IDTok || !IDTok->is(tok::raw_identifier)) + break; + Result.append(("::" + IDTok->getRawIdentifier()).str()); + NextLoc = IDTok->getLocation(); + } + if (Result.empty()) + return llvm::None; + return Result; +} + +// An unresolved name and its scope information that can be extracted cheaply. +struct CheapUnresolvedName { + std::string Name; + // This is the part of what was typed that was resolved, and it's in its + // resolved form not its typed form (think `namespace clang { clangd::x }` --> + // `clang::clangd::`). + llvm::Optional ResolvedScope; + + // Unresolved part of the scope. When the unresolved name is a specifier, we + // use the name that comes after it as the alternative name to resolve and use + // the specifier as the extra scope in the accessible scopes. + llvm::Optional UnresolvedScope; +}; + +// Extracts unresolved name and scope information around \p Unresolved. +// FIXME: try to merge this with the scope-wrangling code in CodeComplete. +llvm::Optional extractUnresolvedNameCheaply( + const SourceManager &SM, const DeclarationNameInfo &Unresolved, + CXXScopeSpec *SS, const LangOptions &LangOpts, bool UnresolvedIsSpecifier) { + bool Invalid = false; + llvm::StringRef Code = SM.getBufferData( + SM.getDecomposedLoc(Unresolved.getBeginLoc()).first, &Invalid); + if (Invalid) + return llvm::None; + CheapUnresolvedName Result; + Result.Name = Unresolved.getAsString(); + if (SS && SS->isNotEmpty()) { // "::" or "ns::" + if (auto *Nested = SS->getScopeRep()) { + if (Nested->getKind() == NestedNameSpecifier::Global) + Result.ResolvedScope = ""; + else if (const auto *NS = Nested->getAsNamespace()) { + auto SpecifiedNS = printNamespaceScope(*NS); + + // Check the specifier spelled in the source. + // If the resolved scope doesn't end with the spelled scope. The + // resolved scope can come from a sema typo correction. For example, + // sema assumes that "clangd::" is a typo of "clang::" and uses + // "clang::" as the specified scope in: + // namespace clang { clangd::X; } + // In this case, we use the "typo" specifier as extra scope instead + // of using the scope assumed by sema. + auto B = SM.getFileOffset(SS->getBeginLoc()); + auto E = SM.getFileOffset(SS->getEndLoc()); + std::string Spelling = (Code.substr(B, E - B) + "::").str(); + if (llvm::StringRef(SpecifiedNS).endswith(Spelling)) + Result.ResolvedScope = SpecifiedNS; + else + Result.UnresolvedScope = Spelling; + } else if (const auto *ANS = Nested->getAsNamespaceAlias()) { + Result.ResolvedScope = printNamespaceScope(*ANS->getNamespace()); + } else { + // We don't fix symbols in scopes that are not top-level e.g. class + // members, as we don't collect includes for them. + return llvm::None; + } + } + } + + if (UnresolvedIsSpecifier) { + // If the unresolved name is a specifier e.g. + // clang::clangd::X + // ~~~~~~ + // We try to resolve clang::clangd::X instead of clang::clangd. + // FIXME: We won't be able to fix include if the specifier is what we + // should resolve (e.g. it's a class scope specifier). Collecting include + // headers for nested types could make this work. + + // Not using the end location as it doesn't always point to the end of + // identifier. + if (auto QualifiedByUnresolved = + qualifiedByUnresolved(SM, Unresolved.getBeginLoc(), LangOpts)) { + auto Split = splitQualifiedName(*QualifiedByUnresolved); + if (!Result.UnresolvedScope) + Result.UnresolvedScope.emplace(); + // If UnresolvedSpecifiedScope is already set, we simply append the + // extra scope. Suppose the unresolved name is "index" in the following + // example: + // namespace clang { clangd::index::X; } + // ~~~~~~ ~~~~~ + // "clangd::" is assumed to be clang:: by Sema, and we would have used + // it as extra scope. With "index" being a specifier, we append "index::" + // to the extra scope. + Result.UnresolvedScope->append((Result.Name + Split.first).str()); + Result.Name = Split.second; + } + } + return Result; +} + +class IncludeFixer::UnresolvedNameRecorder : public ExternalSemaSource { +public: + UnresolvedNameRecorder(llvm::Optional &LastUnresolvedName) + : LastUnresolvedName(LastUnresolvedName) {} + + void InitializeSema(Sema &S) override { this->SemaPtr = &S; } + + // Captures the latest typo and treat it as an unresolved name that can + // potentially be fixed by adding #includes. + TypoCorrection CorrectTypo(const DeclarationNameInfo &Typo, int LookupKind, + Scope *S, CXXScopeSpec *SS, + CorrectionCandidateCallback &CCC, + DeclContext *MemberContext, bool EnteringContext, + const ObjCObjectPointerType *OPT) override { + assert(SemaPtr && "Sema must have been set."); + if (SemaPtr->isSFINAEContext()) + return TypoCorrection(); + if (!SemaPtr->SourceMgr.isWrittenInMainFile(Typo.getLoc())) + return clang::TypoCorrection(); + + // This is not done lazily because `SS` can get out of scope and it's + // relatively cheap. + auto Extracted = extractUnresolvedNameCheaply( + SemaPtr->SourceMgr, Typo, SS, SemaPtr->LangOpts, + static_cast(LookupKind) == + Sema::LookupNameKind::LookupNestedNameSpecifierName); + if (!Extracted) + return TypoCorrection(); + auto CheapUnresolved = std::move(*Extracted); + UnresolvedName Unresolved; + Unresolved.Name = CheapUnresolved.Name; + Unresolved.Loc = Typo.getBeginLoc(); + + if (!CheapUnresolved.ResolvedScope && !S) // Give up if no scope available. + return TypoCorrection(); + + auto *Sem = SemaPtr; // Avoid capturing `this`. + Unresolved.GetScopes = [Sem, CheapUnresolved, S, LookupKind]() { + std::vector Scopes; + if (CheapUnresolved.ResolvedScope) { + Scopes.push_back(*CheapUnresolved.ResolvedScope); + } else { + assert(S); + // No scope specifier is specified. Collect all accessible scopes in the + // context. + VisitedContextCollector Collector; + Sem->LookupVisibleDecls( + S, static_cast(LookupKind), Collector, + /*IncludeGlobalScope=*/false, + /*LoadExternal=*/false); + + Scopes.push_back(""); + for (const auto *Ctx : Collector.takeVisitedContexts()) + if (isa(Ctx)) + Scopes.push_back(printNamespaceScope(*Ctx)); + } + + if (CheapUnresolved.UnresolvedScope) + for (auto &Scope : Scopes) + Scope.append(*CheapUnresolved.UnresolvedScope); + return Scopes; + }; + LastUnresolvedName = std::move(Unresolved); + + // Never return a valid correction to try to recover. Our suggested fixes + // always require a rebuild. + return TypoCorrection(); + } + +private: + Sema *SemaPtr = nullptr; + + llvm::Optional &LastUnresolvedName; +}; + +llvm::IntrusiveRefCntPtr +IncludeFixer::unresolvedNameRecorder() { + return new UnresolvedNameRecorder(LastUnresolvedName); +} + +std::vector IncludeFixer::fixUnresolvedName() const { + assert(LastUnresolvedName.hasValue()); + auto &Unresolved = *LastUnresolvedName; + std::vector Scopes = Unresolved.GetScopes(); + vlog("Trying to fix unresolved name \"{0}\" in scopes: [{1}]", + Unresolved.Name, llvm::join(Scopes.begin(), Scopes.end(), ", ")); + + FuzzyFindRequest Req; + Req.AnyScope = false; + Req.Query = Unresolved.Name; + Req.Scopes = Scopes; + Req.RestrictForCodeCompletion = true; + Req.Limit = 100; + + if (llvm::Optional Syms = fuzzyFindCached(Req)) + return fixesForSymbols(**Syms); + + return {}; +} + + +llvm::Optional +IncludeFixer::fuzzyFindCached(const FuzzyFindRequest &Req) const { + auto ReqStr = llvm::formatv("{0}", toJSON(Req)).str(); + auto I = FuzzyFindCache.find(ReqStr); + if (I != FuzzyFindCache.end()) + return &I->second; + + if (IndexRequestCount >= IndexRequestLimit) + return llvm::None; + IndexRequestCount++; + + SymbolSlab::Builder Matches; + Index.fuzzyFind(Req, [&](const Symbol &Sym) { + if (Sym.Name != Req.Query) + return; + if (!Sym.IncludeHeaders.empty()) + Matches.insert(Sym); + }); + auto Syms = std::move(Matches).build(); + auto E = FuzzyFindCache.try_emplace(ReqStr, std::move(Syms)); + return &E.first->second; +} + +llvm::Optional +IncludeFixer::lookupCached(const SymbolID &ID) const { + LookupRequest Req; + Req.IDs.insert(ID); + + auto I = LookupCache.find(ID); + if (I != LookupCache.end()) + return &I->second; + + if (IndexRequestCount >= IndexRequestLimit) + return llvm::None; + IndexRequestCount++; + + // FIXME: consider batching the requests for all diagnostics. + SymbolSlab::Builder Matches; + Index.lookup(Req, [&](const Symbol &Sym) { Matches.insert(Sym); }); + auto Syms = std::move(Matches).build(); + + std::vector Fixes; + if (!Syms.empty()) { + auto &Matched = *Syms.begin(); + if (!Matched.IncludeHeaders.empty() && Matched.Definition && + Matched.CanonicalDeclaration.FileURI == Matched.Definition.FileURI) + Fixes = fixesForSymbols(Syms); + } + auto E = LookupCache.try_emplace(ID, std::move(Syms)); + return &E.first->second; +} + } // namespace clangd } // namespace clang diff --git a/clang-tools-extra/clangd/IncludeFixer.h b/clang-tools-extra/clangd/IncludeFixer.h index 740710cf4ea11..aafb384bfe9a8 100644 --- a/clang-tools-extra/clangd/IncludeFixer.h +++ b/clang-tools-extra/clangd/IncludeFixer.h @@ -12,8 +12,17 @@ #include "Diagnostics.h" #include "Headers.h" #include "index/Index.h" +#include "index/Symbol.h" #include "clang/AST/Type.h" #include "clang/Basic/Diagnostic.h" +#include "clang/Basic/SourceLocation.h" +#include "clang/Sema/ExternalSemaSource.h" +#include "clang/Sema/Sema.h" +#include "llvm/ADT/ArrayRef.h" +#include "llvm/ADT/DenseMap.h" +#include "llvm/ADT/IntrusiveRefCntPtr.h" +#include "llvm/ADT/Optional.h" +#include "llvm/ADT/StringMap.h" #include "llvm/ADT/StringRef.h" #include @@ -34,18 +43,55 @@ class IncludeFixer { std::vector fix(DiagnosticsEngine::Level DiagLevel, const clang::Diagnostic &Info) const; + /// Returns an ExternalSemaSource that records failed name lookups in Sema. + /// This allows IncludeFixer to suggest inserting headers that define those + /// names. + llvm::IntrusiveRefCntPtr unresolvedNameRecorder(); + private: /// Attempts to recover diagnostic caused by an incomplete type \p T. std::vector fixIncompleteType(const Type &T) const; - /// Generates header insertion fixes for \p Sym. - std::vector fixesForSymbol(const Symbol &Sym) const; + /// Generates header insertion fixes for all symbols. Fixes are deduplicated. + std::vector fixesForSymbols(const SymbolSlab &Syms) const; + + struct UnresolvedName { + std::string Name; // E.g. "X" in foo::X. + SourceLocation Loc; // Start location of the unresolved name. + // Lazily get the possible scopes of the unresolved name. `Sema` must be + // alive when this is called. + std::function()> GetScopes; + }; + + /// Records the last unresolved name seen by Sema. + class UnresolvedNameRecorder; + + /// Attempts to fix the unresolved name associated with the current + /// diagnostic. We assume a diagnostic is caused by a unresolved name when + /// they have the same source location and the unresolved name is the last + /// one we've seen during the Sema run. + std::vector fixUnresolvedName() const; std::string File; std::shared_ptr Inserter; const SymbolIndex &Index; const unsigned IndexRequestLimit; // Make at most 5 index requests. mutable unsigned IndexRequestCount = 0; + + // These collect the last unresolved name so that we can associate it with the + // diagnostic. + llvm::Optional LastUnresolvedName; + + // There can be multiple diagnostics that are caused by the same unresolved + // name or incomplete type in one parse, especially when code is + // copy-and-pasted without #includes. We cache the index results based on + // index requests. + mutable llvm::StringMap FuzzyFindCache; + mutable llvm::DenseMap LookupCache; + // Returns None if the number of index requests has reached the limit. + llvm::Optional + fuzzyFindCached(const FuzzyFindRequest &Req) const; + llvm::Optional lookupCached(const SymbolID &ID) const; }; } // namespace clangd diff --git a/clang-tools-extra/clangd/Protocol.cpp b/clang-tools-extra/clangd/Protocol.cpp index ef6f491a1f741..4864eedcb8728 100644 --- a/clang-tools-extra/clangd/Protocol.cpp +++ b/clang-tools-extra/clangd/Protocol.cpp @@ -13,7 +13,6 @@ #include "Protocol.h" #include "Logger.h" #include "URI.h" -#include "index/Index.h" #include "clang/Basic/LLVM.h" #include "llvm/ADT/Hashing.h" #include "llvm/ADT/SmallString.h" diff --git a/clang-tools-extra/clangd/Quality.cpp b/clang-tools-extra/clangd/Quality.cpp index 50e3f7ee9ec23..124ae4c1091d2 100644 --- a/clang-tools-extra/clangd/Quality.cpp +++ b/clang-tools-extra/clangd/Quality.cpp @@ -5,11 +5,12 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// + #include "Quality.h" #include "AST.h" #include "FileDistance.h" #include "URI.h" -#include "index/Index.h" +#include "index/Symbol.h" #include "clang/AST/ASTContext.h" #include "clang/AST/Decl.h" #include "clang/AST/DeclCXX.h" diff --git a/clang-tools-extra/clangd/Selection.cpp b/clang-tools-extra/clangd/Selection.cpp index ada7989130e54..233a4369b2752 100644 --- a/clang-tools-extra/clangd/Selection.cpp +++ b/clang-tools-extra/clangd/Selection.cpp @@ -1,4 +1,4 @@ -//===--- Selection.h ------------------------------------------------------===// +//===--- Selection.cpp ----------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -51,7 +51,7 @@ class SelectionVisitor : public RecursiveASTVisitor { // - those that can't be stored in DynTypedNode. // We're missing some interesting things like Attr due to the latter. bool TraverseDecl(Decl *X) { - if (isa(X)) + if (X && isa(X)) return Base::TraverseDecl(X); // Already pushed by constructor. return traverseNode(X, [&] { return Base::TraverseDecl(X); }); } @@ -198,11 +198,10 @@ class SelectionVisitor : public RecursiveASTVisitor { auto E = SM.getDecomposedLoc(R.getEnd()); if (B.first != SelFile || E.first != SelFile) continue; - assert(R.isTokenRange()); // Try to cover up to the next token, spaces between children don't count. if (auto Tok = Lexer::findNextToken(R.getEnd(), SM, LangOpts)) E.second = SM.getFileOffset(Tok->getLocation()); - else + else if (R.isTokenRange()) E.second += Lexer::MeasureTokenLength(R.getEnd(), SM, LangOpts); ChildRanges.push_back({B.second, E.second}); } diff --git a/clang-tools-extra/clangd/SourceCode.cpp b/clang-tools-extra/clangd/SourceCode.cpp index a4af1a9d73558..86146758a5416 100644 --- a/clang-tools-extra/clangd/SourceCode.cpp +++ b/clang-tools-extra/clangd/SourceCode.cpp @@ -335,5 +335,14 @@ format::FormatStyle getFormatStyleForFile(llvm::StringRef File, return *Style; } +llvm::Expected +cleanupAndFormat(StringRef Code, const tooling::Replacements &Replaces, + const format::FormatStyle &Style) { + auto CleanReplaces = cleanupAroundReplacements(Code, Replaces, Style); + if (!CleanReplaces) + return CleanReplaces; + return formatReplacements(Code, std::move(*CleanReplaces), Style); +} + } // namespace clangd } // namespace clang diff --git a/clang-tools-extra/clangd/SourceCode.h b/clang-tools-extra/clangd/SourceCode.h index 37b7b166a8161..e6ce8c3be5da8 100644 --- a/clang-tools-extra/clangd/SourceCode.h +++ b/clang-tools-extra/clangd/SourceCode.h @@ -144,6 +144,11 @@ format::FormatStyle getFormatStyleForFile(llvm::StringRef File, llvm::StringRef Content, llvm::vfs::FileSystem *FS); +// Cleanup and format the given replacements. +llvm::Expected +cleanupAndFormat(StringRef Code, const tooling::Replacements &Replaces, + const format::FormatStyle &Style); + } // namespace clangd } // namespace clang #endif diff --git a/clang-tools-extra/clangd/TUScheduler.cpp b/clang-tools-extra/clangd/TUScheduler.cpp index 14319ab901bb3..c7730827384be 100644 --- a/clang-tools-extra/clangd/TUScheduler.cpp +++ b/clang-tools-extra/clangd/TUScheduler.cpp @@ -45,6 +45,7 @@ #include "Cancellation.h" #include "Logger.h" #include "Trace.h" +#include "index/CanonicalIncludes.h" #include "clang/Frontend/CompilerInvocation.h" #include "clang/Frontend/PCHContainerOperations.h" #include "llvm/ADT/ScopeExit.h" @@ -385,8 +386,9 @@ void ASTWorker::update(ParseInputs Inputs, WantDiagnostics WantDiags) { std::shared_ptr NewPreamble = buildPreamble( FileName, *Invocation, OldPreamble, OldCommand, Inputs, PCHs, StorePreambleInMemory, - [this](ASTContext &Ctx, std::shared_ptr PP) { - Callbacks.onPreambleAST(FileName, Ctx, std::move(PP)); + [this](ASTContext &Ctx, std::shared_ptr PP, + const CanonicalIncludes &CanonIncludes) { + Callbacks.onPreambleAST(FileName, Ctx, std::move(PP), CanonIncludes); }); bool CanReuseAST = InputsAreTheSame && (OldPreamble == NewPreamble); diff --git a/clang-tools-extra/clangd/TUScheduler.h b/clang-tools-extra/clangd/TUScheduler.h index cd0c4c78d8208..abcf4aa37063d 100644 --- a/clang-tools-extra/clangd/TUScheduler.h +++ b/clang-tools-extra/clangd/TUScheduler.h @@ -12,6 +12,7 @@ #include "ClangdUnit.h" #include "Function.h" #include "Threading.h" +#include "index/CanonicalIncludes.h" #include "llvm/ADT/StringMap.h" #include @@ -91,7 +92,8 @@ class ParsingCallbacks { /// contains only AST nodes from the #include directives at the start of the /// file. AST node in the current file should be observed on onMainAST call. virtual void onPreambleAST(PathRef Path, ASTContext &Ctx, - std::shared_ptr PP) {} + std::shared_ptr PP, + const CanonicalIncludes &) {} /// Called on the AST built for the file itself. Note that preamble AST nodes /// are not deserialized and should be processed in the onPreambleAST call /// instead. diff --git a/clang-tools-extra/clangd/Threading.cpp b/clang-tools-extra/clangd/Threading.cpp index 139fcc2f878d9..733267c0e706c 100644 --- a/clang-tools-extra/clangd/Threading.cpp +++ b/clang-tools-extra/clangd/Threading.cpp @@ -7,6 +7,10 @@ #include #ifdef __USE_POSIX #include +#elif defined(__APPLE__) +#include +#elif defined (_WIN32) +#include #endif namespace clang { @@ -121,6 +125,17 @@ void setCurrentThreadPriority(ThreadPriority Priority) { Priority == ThreadPriority::Low && !AvoidThreadStarvation ? SCHED_IDLE : SCHED_OTHER, &priority); +#elif defined(__APPLE__) + // https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man2/getpriority.2.html + setpriority(PRIO_DARWIN_THREAD, 0, + Priority == ThreadPriority::Low && !AvoidThreadStarvation + ? PRIO_DARWIN_BG + : 0); +#elif defined(_WIN32) + SetThreadPriority(GetCurrentThread(), + Priority == ThreadPriority::Low && !AvoidThreadStarvation + ? THREAD_MODE_BACKGROUND_BEGIN + : THREAD_MODE_BACKGROUND_END); #endif } diff --git a/clang-tools-extra/clangd/XRefs.cpp b/clang-tools-extra/clangd/XRefs.cpp index 74ededc676fda..be4df73b9cf6e 100644 --- a/clang-tools-extra/clangd/XRefs.cpp +++ b/clang-tools-extra/clangd/XRefs.cpp @@ -10,6 +10,8 @@ #include "Logger.h" #include "SourceCode.h" #include "URI.h" +#include "index/Merge.h" +#include "index/SymbolLocation.h" #include "clang/AST/DeclTemplate.h" #include "clang/AST/RecursiveASTVisitor.h" #include "clang/Index/IndexDataConsumer.h" @@ -37,7 +39,8 @@ const Decl *getDefinition(const Decl *D) { if (const auto *FD = dyn_cast(D)) return FD->getDefinition(); // Only a single declaration is allowed. - if (isa(D)) // except cases above + if (isa(D) || isa(D) || + isa(D)) // except cases above return D; // Multiple definitions are allowed. return nullptr; // except cases above @@ -77,25 +80,40 @@ llvm::Optional toLSPLocation(const SymbolLocation &Loc, return LSPLoc; } +SymbolLocation toIndexLocation(const Location &Loc, std::string &URIStorage) { + SymbolLocation SymLoc; + URIStorage = Loc.uri.uri(); + SymLoc.FileURI = URIStorage.c_str(); + SymLoc.Start.setLine(Loc.range.start.line); + SymLoc.Start.setColumn(Loc.range.start.character); + SymLoc.End.setLine(Loc.range.end.line); + SymLoc.End.setColumn(Loc.range.end.character); + return SymLoc; +} + +// Returns the preferred location between an AST location and an index location. +SymbolLocation getPreferredLocation(const Location &ASTLoc, + const SymbolLocation &IdxLoc, + std::string &Scratch) { + // Also use a dummy symbol for the index location so that other fields (e.g. + // definition) are not factored into the preferrence. + Symbol ASTSym, IdxSym; + ASTSym.ID = IdxSym.ID = SymbolID("dummy_id"); + ASTSym.CanonicalDeclaration = toIndexLocation(ASTLoc, Scratch); + IdxSym.CanonicalDeclaration = IdxLoc; + auto Merged = mergeSymbol(ASTSym, IdxSym); + return Merged.CanonicalDeclaration; +} + struct MacroDecl { llvm::StringRef Name; const MacroInfo *Info; }; -struct DeclInfo { - const Decl *D; - // Indicates the declaration is referenced by an explicit AST node. - bool IsReferencedExplicitly = false; -}; - /// Finds declarations locations that a given source location refers to. class DeclarationAndMacrosFinder : public index::IndexDataConsumer { std::vector MacroInfos; - // The value of the map indicates whether the declaration has been referenced - // explicitly in the code. - // True means the declaration is explicitly referenced at least once; false - // otherwise. - llvm::DenseMap Decls; + llvm::DenseSet Decls; const SourceLocation &SearchedLocation; const ASTContext &AST; Preprocessor &PP; @@ -105,22 +123,14 @@ class DeclarationAndMacrosFinder : public index::IndexDataConsumer { ASTContext &AST, Preprocessor &PP) : SearchedLocation(SearchedLocation), AST(AST), PP(PP) {} - // Get all DeclInfo of the found declarations. - // The results are sorted by "IsReferencedExplicitly" and declaration - // location. - std::vector getFoundDecls() const { - std::vector Result; - for (auto It : Decls) { - Result.emplace_back(); - Result.back().D = It.first; - Result.back().IsReferencedExplicitly = It.second; - } + // The results are sorted by declaration location. + std::vector getFoundDecls() const { + std::vector Result; + for (const Decl *D : Decls) + Result.push_back(D); - // Sort results. Declarations being referenced explicitly come first. - llvm::sort(Result, [](const DeclInfo &L, const DeclInfo &R) { - if (L.IsReferencedExplicitly != R.IsReferencedExplicitly) - return L.IsReferencedExplicitly > R.IsReferencedExplicitly; - return L.D->getBeginLoc() < R.D->getBeginLoc(); + llvm::sort(Result, [](const Decl *L, const Decl *R) { + return L->getBeginLoc() < R->getBeginLoc(); }); return Result; } @@ -152,21 +162,21 @@ class DeclarationAndMacrosFinder : public index::IndexDataConsumer { // clang) if it has an invalid paren/brace location, since such // experssion is impossible to write down. if (const auto *CtorExpr = dyn_cast(E)) - return CtorExpr->getNumArgs() > 0 && - CtorExpr->getParenOrBraceRange().isInvalid(); + return CtorExpr->getParenOrBraceRange().isInvalid(); return isa(E); }; - bool IsExplicit = !IsImplicitExpr(ASTNode.OrigE); + if (IsImplicitExpr(ASTNode.OrigE)) + return true; // Find and add definition declarations (for GoToDefinition). // We don't use parameter `D`, as Parameter `D` is the canonical // declaration, which is the first declaration of a redeclarable // declaration, and it could be a forward declaration. if (const auto *Def = getDefinition(D)) { - Decls[Def] |= IsExplicit; + Decls.insert(Def); } else { // Couldn't find a definition, fall back to use `D`. - Decls[D] |= IsExplicit; + Decls.insert(D); } } return true; @@ -204,7 +214,7 @@ class DeclarationAndMacrosFinder : public index::IndexDataConsumer { }; struct IdentifiedSymbol { - std::vector Decls; + std::vector Decls; std::vector Macros; }; @@ -215,6 +225,8 @@ IdentifiedSymbol getSymbolAtPosition(ParsedAST &AST, SourceLocation Pos) { IndexOpts.SystemSymbolFilter = index::IndexingOptions::SystemSymbolFilterKind::All; IndexOpts.IndexFunctionLocals = true; + IndexOpts.IndexParametersInDeclarations = true; + IndexOpts.IndexTemplateParameters = true; indexTopLevelDecls(AST.getASTContext(), AST.getPreprocessor(), AST.getLocalTopLevelDecls(), DeclMacrosFinder, IndexOpts); @@ -299,8 +311,7 @@ std::vector locateSymbolAt(ParsedAST &AST, Position Pos, llvm::DenseMap ResultIndex; // Emit all symbol locations (declaration or definition) from AST. - for (const DeclInfo &DI : Symbols.Decls) { - const Decl *D = DI.D; + for (const Decl *D : Symbols.Decls) { auto Loc = makeLocation(AST, findNameLoc(D), *MainFilePath); if (!Loc) continue; @@ -323,17 +334,29 @@ std::vector locateSymbolAt(ParsedAST &AST, Position Pos, LookupRequest QueryRequest; for (auto It : ResultIndex) QueryRequest.IDs.insert(It.first); + std::string Scratch; Index->lookup(QueryRequest, [&](const Symbol &Sym) { auto &R = Result[ResultIndex.lookup(Sym.ID)]; // Special case: if the AST yielded a definition, then it may not be // the right *declaration*. Prefer the one from the index. - if (R.Definition) // from AST + if (R.Definition) { // from AST if (auto Loc = toLSPLocation(Sym.CanonicalDeclaration, *MainFilePath)) R.PreferredDeclaration = *Loc; - - if (!R.Definition) + } else { R.Definition = toLSPLocation(Sym.Definition, *MainFilePath); + + if (Sym.CanonicalDeclaration) { + // Use merge logic to choose AST or index declaration. + // We only do this for declarations as definitions from AST + // is generally preferred (e.g. definitions in main file). + if (auto Loc = toLSPLocation( + getPreferredLocation(R.PreferredDeclaration, + Sym.CanonicalDeclaration, Scratch), + *MainFilePath)) + R.PreferredDeclaration = *Loc; + } + } }); } @@ -400,6 +423,8 @@ findRefs(const std::vector &Decls, ParsedAST &AST) { IndexOpts.SystemSymbolFilter = index::IndexingOptions::SystemSymbolFilterKind::All; IndexOpts.IndexFunctionLocals = true; + IndexOpts.IndexParametersInDeclarations = true; + IndexOpts.IndexTemplateParameters = true; indexTopLevelDecls(AST.getASTContext(), AST.getPreprocessor(), AST.getLocalTopLevelDecls(), RefFinder, IndexOpts); return std::move(RefFinder).take(); @@ -412,11 +437,7 @@ std::vector findDocumentHighlights(ParsedAST &AST, const SourceManager &SM = AST.getASTContext().getSourceManager(); auto Symbols = getSymbolAtPosition( AST, getBeginningOfIdentifier(AST, Pos, SM.getMainFileID())); - std::vector TargetDecls; - for (const DeclInfo &DI : Symbols.Decls) { - TargetDecls.push_back(DI.D); - } - auto References = findRefs(TargetDecls, AST); + auto References = findRefs(Symbols.Decls, AST); std::vector Result; for (const auto &Ref : References) { @@ -537,13 +558,30 @@ static Hover getHoverContents(QualType T, ASTContext &ASTCtx) { return H; } -/// Generate a \p Hover object given the macro \p MacroInf. -static Hover getHoverContents(llvm::StringRef MacroName) { - Hover H; - - H.contents.value = "#define "; - H.contents.value += MacroName; +/// Generate a \p Hover object given the macro \p MacroDecl. +static Hover getHoverContents(MacroDecl Decl, ParsedAST &AST) { + SourceManager &SM = AST.getASTContext().getSourceManager(); + std::string Definition = Decl.Name; + + // Try to get the full definition, not just the name + SourceLocation StartLoc = Decl.Info->getDefinitionLoc(); + SourceLocation EndLoc = Decl.Info->getDefinitionEndLoc(); + if (EndLoc.isValid()) { + EndLoc = Lexer::getLocForEndOfToken(EndLoc, 0, SM, + AST.getASTContext().getLangOpts()); + bool Invalid; + StringRef Buffer = SM.getBufferData(SM.getFileID(StartLoc), &Invalid); + if (!Invalid) { + unsigned StartOffset = SM.getFileOffset(StartLoc); + unsigned EndOffset = SM.getFileOffset(EndLoc); + if (EndOffset <= Buffer.size() && StartOffset < EndOffset) + Definition = Buffer.substr(StartOffset, EndOffset - StartOffset).str(); + } + } + Hover H; + H.contents.kind = MarkupKind::PlainText; + H.contents.value = "#define " + Definition; return H; } @@ -667,10 +705,10 @@ llvm::Optional getHover(ParsedAST &AST, Position Pos) { auto Symbols = getSymbolAtPosition(AST, SourceLocationBeg); if (!Symbols.Macros.empty()) - return getHoverContents(Symbols.Macros[0].Name); + return getHoverContents(Symbols.Macros[0], AST); if (!Symbols.Decls.empty()) - return getHoverContents(Symbols.Decls[0].D); + return getHoverContents(Symbols.Decls[0]); auto DeducedType = getDeducedType(AST, SourceLocationBeg); if (DeducedType && !DeducedType->isNull()) @@ -694,15 +732,9 @@ std::vector findReferences(ParsedAST &AST, Position Pos, auto Loc = getBeginningOfIdentifier(AST, Pos, SM.getMainFileID()); auto Symbols = getSymbolAtPosition(AST, Loc); - std::vector TargetDecls; - for (const DeclInfo &DI : Symbols.Decls) { - if (DI.IsReferencedExplicitly) - TargetDecls.push_back(DI.D); - } - // We traverse the AST to find references in the main file. // TODO: should we handle macros, too? - auto MainFileRefs = findRefs(TargetDecls, AST); + auto MainFileRefs = findRefs(Symbols.Decls, AST); for (const auto &Ref : MainFileRefs) { Location Result; Result.range = getTokenRange(AST, Ref.Loc); @@ -715,7 +747,7 @@ std::vector findReferences(ParsedAST &AST, Position Pos, RefsRequest Req; Req.Limit = Limit; - for (const Decl *D : TargetDecls) { + for (const Decl *D : Symbols.Decls) { // Not all symbols can be referenced from outside (e.g. function-locals). // TODO: we could skip TU-scoped symbols here (e.g. static functions) if // we know this file isn't a header. The details might be tricky. @@ -746,9 +778,9 @@ std::vector getSymbolInfo(ParsedAST &AST, Position Pos) { std::vector Results; - for (const auto &Sym : Symbols.Decls) { + for (const Decl *D : Symbols.Decls) { SymbolDetails NewSymbol; - if (const NamedDecl *ND = dyn_cast(Sym.D)) { + if (const NamedDecl *ND = dyn_cast(D)) { std::string QName = printQualifiedName(*ND); std::tie(NewSymbol.containerName, NewSymbol.name) = splitQualifiedName(QName); @@ -760,7 +792,7 @@ std::vector getSymbolInfo(ParsedAST &AST, Position Pos) { } } llvm::SmallString<32> USR; - if (!index::generateUSRForDecl(Sym.D, USR)) { + if (!index::generateUSRForDecl(D, USR)) { NewSymbol.USR = USR.str(); NewSymbol.ID = SymbolID(NewSymbol.USR); } diff --git a/clang-tools-extra/clangd/clients/clangd-vscode/.gitignore b/clang-tools-extra/clangd/clients/clangd-vscode/.gitignore index 1294fe2655533..5df8049bff2cc 100644 --- a/clang-tools-extra/clangd/clients/clangd-vscode/.gitignore +++ b/clang-tools-extra/clangd/clients/clangd-vscode/.gitignore @@ -1,3 +1,2 @@ out node_modules -package-lock.json diff --git a/clang-tools-extra/clangd/clients/clangd-vscode/package-lock.json b/clang-tools-extra/clangd/clients/clangd-vscode/package-lock.json new file mode 100644 index 0000000000000..90685912f1995 --- /dev/null +++ b/clang-tools-extra/clangd/clients/clangd-vscode/package-lock.json @@ -0,0 +1,2027 @@ +{ + "name": "vscode-clangd", + "version": "0.0.10", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@types/mocha": { + "version": "2.2.48", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-2.2.48.tgz", + "integrity": "sha512-nlK/iyETgafGli8Zh9zJVCTicvU3iajSkRwOh3Hhiva598CMqNJ4NcVCGMTGKpGpTYj/9R8RLzS9NAykSSCqGw==", + "dev": true + }, + "@types/node": { + "version": "6.14.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-6.14.2.tgz", + "integrity": "sha512-JWB3xaVfsfnFY8Ofc9rTB/op0fqqTSqy4vBcVk1LuRJvta7KTX+D//fCkiTMeLGhdr2EbFZzQjC97gvmPilk9Q==", + "dev": true + }, + "ajv": { + "version": "6.8.1", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.8.1.tgz", + "integrity": "sha512-eqxCp82P+JfqL683wwsL73XmFs1eG6qjw+RD3YHx+Jll1r0jNd4dh8QG9NYAeNGA/hnZjeEDgtTskgJULbxpWQ==", + "dev": true, + "requires": { + "fast-deep-equal": "^2.0.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "ansi-cyan": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ansi-cyan/-/ansi-cyan-0.1.1.tgz", + "integrity": "sha1-U4rlKK+JgvKK4w2G8vF0VtJgmHM=", + "dev": true, + "requires": { + "ansi-wrap": "0.1.0" + } + }, + "ansi-red": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ansi-red/-/ansi-red-0.1.1.tgz", + "integrity": "sha1-jGOPnRCAgAo1PJwoyKgcpHBdlGw=", + "dev": true, + "requires": { + "ansi-wrap": "0.1.0" + } + }, + "ansi-wrap": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/ansi-wrap/-/ansi-wrap-0.1.0.tgz", + "integrity": "sha1-qCJQ3bABXponyoLoLqYDu/pF768=", + "dev": true + }, + "append-buffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/append-buffer/-/append-buffer-1.0.2.tgz", + "integrity": "sha1-2CIM9GYIFSXv6lBhTz3mUU36WPE=", + "dev": true, + "requires": { + "buffer-equal": "^1.0.0" + } + }, + "arr-diff": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-1.1.0.tgz", + "integrity": "sha1-aHwydYFjWI/vfeezb6vklesaOZo=", + "dev": true, + "requires": { + "arr-flatten": "^1.0.1", + "array-slice": "^0.2.3" + } + }, + "arr-flatten": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", + "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", + "dev": true + }, + "arr-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-2.1.0.tgz", + "integrity": "sha1-IPnqtexw9cfSFbEHexw5Fh0pLH0=", + "dev": true + }, + "array-differ": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-differ/-/array-differ-1.0.0.tgz", + "integrity": "sha1-7/UuN1gknTO+QCuLuOVkuytdQDE=", + "dev": true + }, + "array-slice": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-0.2.3.tgz", + "integrity": "sha1-3Tz7gO15c6dRF82sabC5nshhhvU=", + "dev": true + }, + "array-union": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", + "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", + "dev": true, + "requires": { + "array-uniq": "^1.0.1" + } + }, + "array-uniq": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", + "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=", + "dev": true + }, + "arrify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", + "dev": true + }, + "asn1": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", + "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", + "dev": true, + "requires": { + "safer-buffer": "~2.1.0" + } + }, + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", + "dev": true + }, + "aws-sign2": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", + "dev": true + }, + "aws4": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz", + "integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==", + "dev": true + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true + }, + "bcrypt-pbkdf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", + "dev": true, + "requires": { + "tweetnacl": "^0.14.3" + } + }, + "block-stream": { + "version": "0.0.9", + "resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz", + "integrity": "sha1-E+v+d4oDIFz+A3UUgeu0szAMEmo=", + "dev": true, + "requires": { + "inherits": "~2.0.0" + } + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "browser-stdout": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.0.tgz", + "integrity": "sha1-81HTKWnTL6XXpVZxVCY9korjvR8=", + "dev": true + }, + "buffer-crc32": { + "version": "0.2.13", + "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", + "integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=", + "dev": true + }, + "buffer-equal": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/buffer-equal/-/buffer-equal-1.0.0.tgz", + "integrity": "sha1-WWFrSYME1Var1GaWayLu2j7KX74=", + "dev": true + }, + "buffer-from": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", + "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", + "dev": true + }, + "caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", + "dev": true + }, + "clone": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/clone/-/clone-0.2.0.tgz", + "integrity": "sha1-xhJqkK1Pctv1rNskPMN3JP6T/B8=", + "dev": true + }, + "clone-buffer": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/clone-buffer/-/clone-buffer-1.0.0.tgz", + "integrity": "sha1-4+JbIHrE5wGvch4staFnksrD3Fg=", + "dev": true + }, + "clone-stats": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-0.0.1.tgz", + "integrity": "sha1-uI+UqCzzi4eR1YBG6kAprYjKmdE=", + "dev": true + }, + "cloneable-readable": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/cloneable-readable/-/cloneable-readable-1.1.2.tgz", + "integrity": "sha512-Bq6+4t+lbM8vhTs/Bef5c5AdEMtapp/iFb6+s4/Hh9MVTt8OLKH7ZOOZSCT+Ys7hsHvqv0GuMPJ1lnQJVHvxpg==", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "process-nextick-args": "^2.0.0", + "readable-stream": "^2.3.5" + } + }, + "combined-stream": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.7.tgz", + "integrity": "sha512-brWl9y6vOB1xYPZcpZde3N9zDByXTosAeMDo4p1wzo6UMOX4vumB+TP1RZ76sfE6Md68Q0NJSrE/gbezd4Ul+w==", + "dev": true, + "requires": { + "delayed-stream": "~1.0.0" + } + }, + "commander": { + "version": "2.15.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.15.1.tgz", + "integrity": "sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag==", + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "convert-source-map": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.6.0.tgz", + "integrity": "sha512-eFu7XigvxdZ1ETfbgPBohgyQ/Z++C0eEhTor0qRwBw9unw+L0/6V8wkSuGgzdThkiS5lSpdptOQPD8Ak40a+7A==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.1" + } + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "dev": true + }, + "dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0" + } + }, + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "deep-assign": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/deep-assign/-/deep-assign-1.0.0.tgz", + "integrity": "sha1-sJJ0O+hCfcYh6gBnzex+cN0Z83s=", + "dev": true, + "requires": { + "is-obj": "^1.0.0" + } + }, + "define-properties": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", + "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", + "dev": true, + "requires": { + "object-keys": "^1.0.12" + } + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "dev": true + }, + "diff": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", + "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", + "dev": true + }, + "duplexer": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz", + "integrity": "sha1-rOb/gIwc5mtX0ev5eXessCM0z8E=", + "dev": true + }, + "duplexify": { + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.7.1.tgz", + "integrity": "sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g==", + "dev": true, + "requires": { + "end-of-stream": "^1.0.0", + "inherits": "^2.0.1", + "readable-stream": "^2.0.0", + "stream-shift": "^1.0.0" + } + }, + "ecc-jsbn": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", + "dev": true, + "requires": { + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" + } + }, + "end-of-stream": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", + "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", + "dev": true, + "requires": { + "once": "^1.4.0" + } + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "event-stream": { + "version": "3.3.4", + "resolved": "https://registry.npmjs.org/event-stream/-/event-stream-3.3.4.tgz", + "integrity": "sha1-SrTJoPWlTbkzi0w02Gv86PSzVXE=", + "dev": true, + "requires": { + "duplexer": "~0.1.1", + "from": "~0", + "map-stream": "~0.1.0", + "pause-stream": "0.0.11", + "split": "0.3", + "stream-combiner": "~0.0.4", + "through": "~2.3.1" + } + }, + "extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", + "dev": true + }, + "extend-shallow": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-1.1.4.tgz", + "integrity": "sha1-Gda/lN/AnXa6cR85uHLSH/TdkHE=", + "dev": true, + "requires": { + "kind-of": "^1.1.0" + } + }, + "extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", + "dev": true + }, + "fast-deep-equal": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", + "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", + "dev": true + }, + "fast-json-stable-stringify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", + "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=", + "dev": true + }, + "fd-slicer": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", + "integrity": "sha1-JcfInLH5B3+IkbvmHY85Dq4lbx4=", + "dev": true, + "requires": { + "pend": "~1.2.0" + } + }, + "flush-write-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.1.0.tgz", + "integrity": "sha512-6MHED/cmsyux1G4/Cek2Z776y9t7WCNd3h2h/HW91vFeU7pzMhA8XvAlDhHcanG5IWuIh/xcC7JASY4WQpG6xg==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "readable-stream": "^3.1.1" + }, + "dependencies": { + "readable-stream": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.1.1.tgz", + "integrity": "sha512-DkN66hPyqDhnIQ6Jcsvx9bFjhw214O4poMBcIMgPVpQvNy9a0e0Uhg5SqySyDKAmUlwt8LonTBz1ezOnM8pUdA==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + } + } + }, + "forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", + "dev": true + }, + "form-data": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "dev": true, + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + } + }, + "from": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/from/-/from-0.1.7.tgz", + "integrity": "sha1-g8YK/Fi5xWmXAH7Rp2izqzA6RP4=", + "dev": true + }, + "fs-mkdirp-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-mkdirp-stream/-/fs-mkdirp-stream-1.0.0.tgz", + "integrity": "sha1-C3gV/DIBxqaeFNuYzgmMFpNSWes=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.11", + "through2": "^2.0.3" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "fstream": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.11.tgz", + "integrity": "sha1-XB+x8RdHcRTwYyoOtLcbPLD9MXE=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "inherits": "~2.0.0", + "mkdirp": ">=0.5 0", + "rimraf": "2" + } + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0" + } + }, + "glob": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", + "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "glob-parent": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", + "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", + "dev": true, + "requires": { + "is-glob": "^3.1.0", + "path-dirname": "^1.0.0" + } + }, + "glob-stream": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/glob-stream/-/glob-stream-6.1.0.tgz", + "integrity": "sha1-cEXJlBOz65SIjYOrRtC0BMx73eQ=", + "dev": true, + "requires": { + "extend": "^3.0.0", + "glob": "^7.1.1", + "glob-parent": "^3.1.0", + "is-negated-glob": "^1.0.0", + "ordered-read-streams": "^1.0.0", + "pumpify": "^1.3.5", + "readable-stream": "^2.1.5", + "remove-trailing-separator": "^1.0.1", + "to-absolute-glob": "^2.0.0", + "unique-stream": "^2.0.2" + }, + "dependencies": { + "glob": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", + "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + } + } + }, + "graceful-fs": { + "version": "4.1.15", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz", + "integrity": "sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==", + "dev": true + }, + "growl": { + "version": "1.10.5", + "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", + "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", + "dev": true + }, + "gulp-chmod": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/gulp-chmod/-/gulp-chmod-2.0.0.tgz", + "integrity": "sha1-AMOQuSigeZslGsz2MaoJ4BzGKZw=", + "dev": true, + "requires": { + "deep-assign": "^1.0.0", + "stat-mode": "^0.2.0", + "through2": "^2.0.0" + } + }, + "gulp-filter": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/gulp-filter/-/gulp-filter-5.1.0.tgz", + "integrity": "sha1-oF4Rr/sHz33PQafeHLe2OsN4PnM=", + "dev": true, + "requires": { + "multimatch": "^2.0.0", + "plugin-error": "^0.1.2", + "streamfilter": "^1.0.5" + } + }, + "gulp-gunzip": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/gulp-gunzip/-/gulp-gunzip-1.0.0.tgz", + "integrity": "sha1-FbdBFF6Dqcb1CIYkG1fMWHHxUak=", + "dev": true, + "requires": { + "through2": "~0.6.5", + "vinyl": "~0.4.6" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + }, + "readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true + }, + "through2": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", + "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=", + "dev": true, + "requires": { + "readable-stream": ">=1.0.33-1 <1.1.0-0", + "xtend": ">=4.0.0 <4.1.0-0" + } + } + } + }, + "gulp-remote-src-vscode": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/gulp-remote-src-vscode/-/gulp-remote-src-vscode-0.5.1.tgz", + "integrity": "sha512-mw4OGjtC/jlCWJFhbcAlel4YPvccChlpsl3JceNiB/DLJi24/UPxXt53/N26lgI3dknEqd4ErfdHrO8sJ5bATQ==", + "dev": true, + "requires": { + "event-stream": "3.3.4", + "node.extend": "^1.1.2", + "request": "^2.79.0", + "through2": "^2.0.3", + "vinyl": "^2.0.1" + }, + "dependencies": { + "clone": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", + "integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=", + "dev": true + }, + "clone-stats": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-1.0.0.tgz", + "integrity": "sha1-s3gt/4u1R04Yuba/D9/ngvh3doA=", + "dev": true + }, + "vinyl": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-2.2.0.tgz", + "integrity": "sha512-MBH+yP0kC/GQ5GwBqrTPTzEfiiLjta7hTtvQtbxBgTeSXsmKQRQecjibMbxIXzVT3Y9KJK+drOz1/k+vsu8Nkg==", + "dev": true, + "requires": { + "clone": "^2.1.1", + "clone-buffer": "^1.0.0", + "clone-stats": "^1.0.0", + "cloneable-readable": "^1.0.0", + "remove-trailing-separator": "^1.0.1", + "replace-ext": "^1.0.0" + } + } + } + }, + "gulp-untar": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/gulp-untar/-/gulp-untar-0.0.7.tgz", + "integrity": "sha512-0QfbCH2a1k2qkTLWPqTX+QO4qNsHn3kC546YhAP3/n0h+nvtyGITDuDrYBMDZeW4WnFijmkOvBWa5HshTic1tw==", + "dev": true, + "requires": { + "event-stream": "~3.3.4", + "streamifier": "~0.1.1", + "tar": "^2.2.1", + "through2": "~2.0.3", + "vinyl": "^1.2.0" + }, + "dependencies": { + "clone": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", + "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=", + "dev": true + }, + "replace-ext": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-0.0.1.tgz", + "integrity": "sha1-KbvZIHinOfC8zitO5B6DeVNSKSQ=", + "dev": true + }, + "vinyl": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-1.2.0.tgz", + "integrity": "sha1-XIgDbPVl5d8FVYv8kR+GVt8hiIQ=", + "dev": true, + "requires": { + "clone": "^1.0.0", + "clone-stats": "^0.0.1", + "replace-ext": "0.0.1" + } + } + } + }, + "gulp-vinyl-zip": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/gulp-vinyl-zip/-/gulp-vinyl-zip-2.1.2.tgz", + "integrity": "sha512-wJn09jsb8PyvUeyFF7y7ImEJqJwYy40BqL9GKfJs6UGpaGW9A+N68Q+ajsIpb9AeR6lAdjMbIdDPclIGo1/b7Q==", + "dev": true, + "requires": { + "event-stream": "3.3.4", + "queue": "^4.2.1", + "through2": "^2.0.3", + "vinyl": "^2.0.2", + "vinyl-fs": "^3.0.3", + "yauzl": "^2.2.1", + "yazl": "^2.2.1" + }, + "dependencies": { + "clone": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", + "integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=", + "dev": true + }, + "clone-stats": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-1.0.0.tgz", + "integrity": "sha1-s3gt/4u1R04Yuba/D9/ngvh3doA=", + "dev": true + }, + "vinyl": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-2.2.0.tgz", + "integrity": "sha512-MBH+yP0kC/GQ5GwBqrTPTzEfiiLjta7hTtvQtbxBgTeSXsmKQRQecjibMbxIXzVT3Y9KJK+drOz1/k+vsu8Nkg==", + "dev": true, + "requires": { + "clone": "^2.1.1", + "clone-buffer": "^1.0.0", + "clone-stats": "^1.0.0", + "cloneable-readable": "^1.0.0", + "remove-trailing-separator": "^1.0.1", + "replace-ext": "^1.0.0" + } + } + } + }, + "har-schema": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", + "dev": true + }, + "har-validator": { + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.3.tgz", + "integrity": "sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==", + "dev": true, + "requires": { + "ajv": "^6.5.5", + "har-schema": "^2.0.0" + } + }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "requires": { + "function-bind": "^1.1.1" + } + }, + "has-flag": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", + "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=", + "dev": true + }, + "has-symbols": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz", + "integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=", + "dev": true + }, + "he": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/he/-/he-1.1.1.tgz", + "integrity": "sha1-k0EP0hsAlzUVH4howvJx80J+I/0=", + "dev": true + }, + "http-signature": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + } + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "dev": true + }, + "is": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/is/-/is-3.3.0.tgz", + "integrity": "sha512-nW24QBoPcFGGHJGUwnfpI7Yc5CdqWNdsyHQszVE/z2pKHXzh7FZ5GWhJqSyaQ9wMkQnsTx+kAI8bHlCX4tKdbg==", + "dev": true + }, + "is-absolute": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-1.0.0.tgz", + "integrity": "sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA==", + "dev": true, + "requires": { + "is-relative": "^1.0.0", + "is-windows": "^1.0.1" + } + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true + }, + "is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "dev": true, + "requires": { + "is-extglob": "^2.1.0" + } + }, + "is-negated-glob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-negated-glob/-/is-negated-glob-1.0.0.tgz", + "integrity": "sha1-aRC8pdqMleeEtXUbl2z1oQ/uNtI=", + "dev": true + }, + "is-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", + "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=", + "dev": true + }, + "is-relative": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-1.0.0.tgz", + "integrity": "sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA==", + "dev": true, + "requires": { + "is-unc-path": "^1.0.0" + } + }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", + "dev": true + }, + "is-unc-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-1.0.0.tgz", + "integrity": "sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ==", + "dev": true, + "requires": { + "unc-path-regex": "^0.1.2" + } + }, + "is-utf8": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", + "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", + "dev": true + }, + "is-valid-glob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-valid-glob/-/is-valid-glob-1.0.0.tgz", + "integrity": "sha1-Kb8+/3Ab4tTTFdusw5vDn+j2Aao=", + "dev": true + }, + "is-windows": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "dev": true + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", + "dev": true + }, + "jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", + "dev": true + }, + "json-schema": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", + "dev": true + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", + "dev": true + }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", + "dev": true + }, + "jsprim": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", + "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", + "dev": true, + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.2.3", + "verror": "1.10.0" + } + }, + "kind-of": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-1.1.0.tgz", + "integrity": "sha1-FAo9LUGjbS78+pN3tiwk+ElaXEQ=", + "dev": true + }, + "lazystream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lazystream/-/lazystream-1.0.0.tgz", + "integrity": "sha1-9plf4PggOS9hOWvolGJAe7dxaOQ=", + "dev": true, + "requires": { + "readable-stream": "^2.0.5" + } + }, + "lead": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lead/-/lead-1.0.0.tgz", + "integrity": "sha1-bxT5mje+Op3XhPVJVpDlkDRm7kI=", + "dev": true, + "requires": { + "flush-write-stream": "^1.0.2" + } + }, + "map-stream": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/map-stream/-/map-stream-0.1.0.tgz", + "integrity": "sha1-5WqpTEyAVaFkBKBnS3jyFffI4ZQ=", + "dev": true + }, + "mime-db": { + "version": "1.37.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.37.0.tgz", + "integrity": "sha512-R3C4db6bgQhlIhPU48fUtdVmKnflq+hRdad7IyKhtFj06VPNVdk2RhiYL3UjQIlso8L+YxAtFkobT0VK+S/ybg==", + "dev": true + }, + "mime-types": { + "version": "2.1.21", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.21.tgz", + "integrity": "sha512-3iL6DbwpyLzjR3xHSFNFeb9Nz/M8WDkX33t1GFQnFOllWk8pOrh/LSrB5OXlnlW5P9LH73X6loW/eogc+F5lJg==", + "dev": true, + "requires": { + "mime-db": "~1.37.0" + } + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", + "dev": true + }, + "mkdirp": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "dev": true, + "requires": { + "minimist": "0.0.8" + } + }, + "mocha": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-5.2.0.tgz", + "integrity": "sha512-2IUgKDhc3J7Uug+FxMXuqIyYzH7gJjXECKe/w43IGgQHTSj3InJi+yAA7T24L9bQMRKiUEHxEX37G5JpVUGLcQ==", + "dev": true, + "requires": { + "browser-stdout": "1.3.1", + "commander": "2.15.1", + "debug": "3.1.0", + "diff": "3.5.0", + "escape-string-regexp": "1.0.5", + "glob": "7.1.2", + "growl": "1.10.5", + "he": "1.1.1", + "minimatch": "3.0.4", + "mkdirp": "0.5.1", + "supports-color": "5.4.0" + }, + "dependencies": { + "browser-stdout": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", + "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", + "dev": true + } + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "multimatch": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/multimatch/-/multimatch-2.1.0.tgz", + "integrity": "sha1-nHkGoi+0wCkZ4vX3UWG0zb1LKis=", + "dev": true, + "requires": { + "array-differ": "^1.0.0", + "array-union": "^1.0.1", + "arrify": "^1.0.0", + "minimatch": "^3.0.0" + }, + "dependencies": { + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + } + } + }, + "node.extend": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/node.extend/-/node.extend-1.1.8.tgz", + "integrity": "sha512-L/dvEBwyg3UowwqOUTyDsGBU6kjBQOpOhshio9V3i3BMPv5YUb9+mWNN8MK0IbWqT0AqaTSONZf0aTuMMahWgA==", + "dev": true, + "requires": { + "has": "^1.0.3", + "is": "^3.2.1" + } + }, + "normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "dev": true, + "requires": { + "remove-trailing-separator": "^1.0.1" + } + }, + "now-and-later": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/now-and-later/-/now-and-later-2.0.0.tgz", + "integrity": "sha1-vGHLtFbXnLMiB85HygUTb/Ln1u4=", + "dev": true, + "requires": { + "once": "^1.3.2" + } + }, + "oauth-sign": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", + "dev": true + }, + "object-keys": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.12.tgz", + "integrity": "sha512-FTMyFUm2wBcGHnH2eXmz7tC6IwlqQZ6mVZ+6dm6vZ4IQIHjs6FdNsQBuKGPuUUUY6NfJw2PshC08Tn6LzLDOag==", + "dev": true + }, + "object.assign": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", + "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", + "dev": true, + "requires": { + "define-properties": "^1.1.2", + "function-bind": "^1.1.1", + "has-symbols": "^1.0.0", + "object-keys": "^1.0.11" + } + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "ordered-read-streams": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/ordered-read-streams/-/ordered-read-streams-1.0.1.tgz", + "integrity": "sha1-d8DLN8QVJdZBZtmQ/61+xqDhNj4=", + "dev": true, + "requires": { + "readable-stream": "^2.0.1" + } + }, + "path-dirname": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", + "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=", + "dev": true + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true + }, + "pause-stream": { + "version": "0.0.11", + "resolved": "https://registry.npmjs.org/pause-stream/-/pause-stream-0.0.11.tgz", + "integrity": "sha1-/lo0sMvOErWqaitAPuLnO2AvFEU=", + "dev": true, + "requires": { + "through": "~2.3" + } + }, + "pend": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", + "integrity": "sha1-elfrVQpng/kRUzH89GY9XI4AelA=", + "dev": true + }, + "performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", + "dev": true + }, + "plugin-error": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/plugin-error/-/plugin-error-0.1.2.tgz", + "integrity": "sha1-O5uzM1zPAPQl4HQ34ZJ2ln2kes4=", + "dev": true, + "requires": { + "ansi-cyan": "^0.1.1", + "ansi-red": "^0.1.1", + "arr-diff": "^1.0.1", + "arr-union": "^2.0.1", + "extend-shallow": "^1.1.2" + } + }, + "process-nextick-args": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", + "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", + "dev": true + }, + "psl": { + "version": "1.1.31", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.1.31.tgz", + "integrity": "sha512-/6pt4+C+T+wZUieKR620OpzN/LlnNKuWjy1iFLQ/UG35JqHlR/89MP1d96dUfkf6Dne3TuLQzOYEYshJ+Hx8mw==", + "dev": true + }, + "pump": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz", + "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==", + "dev": true, + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "pumpify": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.5.1.tgz", + "integrity": "sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ==", + "dev": true, + "requires": { + "duplexify": "^3.6.0", + "inherits": "^2.0.3", + "pump": "^2.0.0" + } + }, + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true + }, + "qs": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", + "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", + "dev": true + }, + "querystringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.1.0.tgz", + "integrity": "sha512-sluvZZ1YiTLD5jsqZcDmFyV2EwToyXZBfpoVOmktMmW+VEnhgakFHnasVph65fOjGPTWN0Nw3+XQaSeMayr0kg==", + "dev": true + }, + "queue": { + "version": "4.5.1", + "resolved": "https://registry.npmjs.org/queue/-/queue-4.5.1.tgz", + "integrity": "sha512-AMD7w5hRXcFSb8s9u38acBZ+309u6GsiibP4/0YacJeaurRshogB7v/ZcVPxP5gD5+zIw6ixRHdutiYUJfwKHw==", + "dev": true, + "requires": { + "inherits": "~2.0.0" + } + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "remove-bom-buffer": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/remove-bom-buffer/-/remove-bom-buffer-3.0.0.tgz", + "integrity": "sha512-8v2rWhaakv18qcvNeli2mZ/TMTL2nEyAKRvzo1WtnZBl15SHyEhrCu2/xKlJyUFKHiHgfXIyuY6g2dObJJycXQ==", + "dev": true, + "requires": { + "is-buffer": "^1.1.5", + "is-utf8": "^0.2.1" + } + }, + "remove-bom-stream": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/remove-bom-stream/-/remove-bom-stream-1.2.0.tgz", + "integrity": "sha1-BfGlk/FuQuH7kOv1nejlaVJflSM=", + "dev": true, + "requires": { + "remove-bom-buffer": "^3.0.0", + "safe-buffer": "^5.1.0", + "through2": "^2.0.3" + } + }, + "remove-trailing-separator": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", + "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", + "dev": true + }, + "replace-ext": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-1.0.0.tgz", + "integrity": "sha1-3mMSg3P8v3w8z6TeWkgMRaZ5WOs=", + "dev": true + }, + "request": { + "version": "2.88.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz", + "integrity": "sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==", + "dev": true, + "requires": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "har-validator": "~5.1.0", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.4.3", + "tunnel-agent": "^0.6.0", + "uuid": "^3.3.2" + } + }, + "requires-port": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", + "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=", + "dev": true + }, + "resolve-options": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/resolve-options/-/resolve-options-1.1.0.tgz", + "integrity": "sha1-MrueOcBtZzONyTeMDW1gdFZq0TE=", + "dev": true, + "requires": { + "value-or-function": "^3.0.0" + } + }, + "rimraf": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + }, + "dependencies": { + "glob": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", + "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + } + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true + }, + "semver": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz", + "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==" + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, + "source-map-support": { + "version": "0.5.10", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.10.tgz", + "integrity": "sha512-YfQ3tQFTK/yzlGJuX8pTwa4tifQj4QS2Mj7UegOu8jAz59MqIiMGPXxQhVQiIMNzayuUSF/jEuVnfFF5JqybmQ==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "split": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/split/-/split-0.3.3.tgz", + "integrity": "sha1-zQ7qXmOiEd//frDwkcQTPi0N0o8=", + "dev": true, + "requires": { + "through": "2" + } + }, + "sshpk": { + "version": "1.16.1", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", + "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==", + "dev": true, + "requires": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" + } + }, + "stat-mode": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/stat-mode/-/stat-mode-0.2.2.tgz", + "integrity": "sha1-5sgLYjEj19gM8TLOU480YokHJQI=", + "dev": true + }, + "stream-combiner": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/stream-combiner/-/stream-combiner-0.0.4.tgz", + "integrity": "sha1-TV5DPBhSYd3mI8o/RMWGvPXErRQ=", + "dev": true, + "requires": { + "duplexer": "~0.1.1" + } + }, + "stream-shift": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.0.tgz", + "integrity": "sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI=", + "dev": true + }, + "streamfilter": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/streamfilter/-/streamfilter-1.0.7.tgz", + "integrity": "sha512-Gk6KZM+yNA1JpW0KzlZIhjo3EaBJDkYfXtYSbOwNIQ7Zd6006E6+sCFlW1NDvFG/vnXhKmw6TJJgiEQg/8lXfQ==", + "dev": true, + "requires": { + "readable-stream": "^2.0.2" + } + }, + "streamifier": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/streamifier/-/streamifier-0.1.1.tgz", + "integrity": "sha1-l+mNj6TRBdYqJpHR3AfoINuN/E8=", + "dev": true + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "supports-color": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + }, + "dependencies": { + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + } + } + }, + "tar": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.1.tgz", + "integrity": "sha1-jk0qJWwOIYXGsYrWlK7JaLg8sdE=", + "dev": true, + "requires": { + "block-stream": "*", + "fstream": "^1.0.2", + "inherits": "2" + } + }, + "through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", + "dev": true + }, + "through2": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", + "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", + "dev": true, + "requires": { + "readable-stream": "~2.3.6", + "xtend": "~4.0.1" + } + }, + "through2-filter": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/through2-filter/-/through2-filter-3.0.0.tgz", + "integrity": "sha512-jaRjI2WxN3W1V8/FMZ9HKIBXixtiqs3SQSX4/YGIiP3gL6djW48VoZq9tDqeCWs3MT8YY5wb/zli8VW8snY1CA==", + "dev": true, + "requires": { + "through2": "~2.0.0", + "xtend": "~4.0.0" + } + }, + "to-absolute-glob": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/to-absolute-glob/-/to-absolute-glob-2.0.2.tgz", + "integrity": "sha1-GGX0PZ50sIItufFFt4z/fQ98hJs=", + "dev": true, + "requires": { + "is-absolute": "^1.0.0", + "is-negated-glob": "^1.0.0" + } + }, + "to-through": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-through/-/to-through-2.0.0.tgz", + "integrity": "sha1-/JKtq6ByZHvAtn1rA2ZKoZUJOvY=", + "dev": true, + "requires": { + "through2": "^2.0.3" + } + }, + "tough-cookie": { + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz", + "integrity": "sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==", + "dev": true, + "requires": { + "psl": "^1.1.24", + "punycode": "^1.4.1" + }, + "dependencies": { + "punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", + "dev": true + } + } + }, + "tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "dev": true, + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", + "dev": true + }, + "typescript": { + "version": "2.9.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.9.2.tgz", + "integrity": "sha512-Gr4p6nFNaoufRIY4NMdpQRNmgxVIGMs4Fcu/ujdYk3nAZqk7supzBE9idmvfZIlH/Cuj//dvi+019qEue9lV0w==", + "dev": true + }, + "unc-path-regex": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz", + "integrity": "sha1-5z3T17DXxe2G+6xrCufYxqadUPo=", + "dev": true + }, + "unique-stream": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/unique-stream/-/unique-stream-2.3.1.tgz", + "integrity": "sha512-2nY4TnBE70yoxHkDli7DMazpWiP7xMdCYqU2nBRO0UB+ZpEkGsSija7MvmvnZFUeC+mrgiUfcHSr3LmRFIg4+A==", + "dev": true, + "requires": { + "json-stable-stringify-without-jsonify": "^1.0.1", + "through2-filter": "^3.0.0" + } + }, + "uri-js": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", + "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", + "dev": true, + "requires": { + "punycode": "^2.1.0" + } + }, + "url-parse": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.4.4.tgz", + "integrity": "sha512-/92DTTorg4JjktLNLe6GPS2/RvAd/RGr6LuktmWSMLEOa6rjnlrFXNgSbSmkNvCoL2T028A0a1JaJLzRMlFoHg==", + "dev": true, + "requires": { + "querystringify": "^2.0.0", + "requires-port": "^1.0.0" + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "dev": true + }, + "uuid": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", + "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==", + "dev": true + }, + "value-or-function": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/value-or-function/-/value-or-function-3.0.0.tgz", + "integrity": "sha1-HCQ6ULWVwb5Up1S/7OhWO5/42BM=", + "dev": true + }, + "verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + } + }, + "vinyl": { + "version": "0.4.6", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.4.6.tgz", + "integrity": "sha1-LzVsh6VQolVGHza76ypbqL94SEc=", + "dev": true, + "requires": { + "clone": "^0.2.0", + "clone-stats": "^0.0.1" + } + }, + "vinyl-fs": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/vinyl-fs/-/vinyl-fs-3.0.3.tgz", + "integrity": "sha512-vIu34EkyNyJxmP0jscNzWBSygh7VWhqun6RmqVfXePrOwi9lhvRs//dOaGOTRUQr4tx7/zd26Tk5WeSVZitgng==", + "dev": true, + "requires": { + "fs-mkdirp-stream": "^1.0.0", + "glob-stream": "^6.1.0", + "graceful-fs": "^4.0.0", + "is-valid-glob": "^1.0.0", + "lazystream": "^1.0.0", + "lead": "^1.0.0", + "object.assign": "^4.0.4", + "pumpify": "^1.3.5", + "readable-stream": "^2.3.3", + "remove-bom-buffer": "^3.0.0", + "remove-bom-stream": "^1.2.0", + "resolve-options": "^1.1.0", + "through2": "^2.0.0", + "to-through": "^2.0.0", + "value-or-function": "^3.0.0", + "vinyl": "^2.0.0", + "vinyl-sourcemap": "^1.1.0" + }, + "dependencies": { + "clone": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", + "integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=", + "dev": true + }, + "clone-stats": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-1.0.0.tgz", + "integrity": "sha1-s3gt/4u1R04Yuba/D9/ngvh3doA=", + "dev": true + }, + "vinyl": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-2.2.0.tgz", + "integrity": "sha512-MBH+yP0kC/GQ5GwBqrTPTzEfiiLjta7hTtvQtbxBgTeSXsmKQRQecjibMbxIXzVT3Y9KJK+drOz1/k+vsu8Nkg==", + "dev": true, + "requires": { + "clone": "^2.1.1", + "clone-buffer": "^1.0.0", + "clone-stats": "^1.0.0", + "cloneable-readable": "^1.0.0", + "remove-trailing-separator": "^1.0.1", + "replace-ext": "^1.0.0" + } + } + } + }, + "vinyl-source-stream": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vinyl-source-stream/-/vinyl-source-stream-1.1.2.tgz", + "integrity": "sha1-YrU6E1YQqJbpjKlr7jqH8Aio54A=", + "dev": true, + "requires": { + "through2": "^2.0.3", + "vinyl": "^0.4.3" + } + }, + "vinyl-sourcemap": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/vinyl-sourcemap/-/vinyl-sourcemap-1.1.0.tgz", + "integrity": "sha1-kqgAWTo4cDqM2xHYswCtS+Y7PhY=", + "dev": true, + "requires": { + "append-buffer": "^1.0.2", + "convert-source-map": "^1.5.0", + "graceful-fs": "^4.1.6", + "normalize-path": "^2.1.1", + "now-and-later": "^2.0.0", + "remove-bom-buffer": "^3.0.0", + "vinyl": "^2.0.0" + }, + "dependencies": { + "clone": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", + "integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=", + "dev": true + }, + "clone-stats": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-1.0.0.tgz", + "integrity": "sha1-s3gt/4u1R04Yuba/D9/ngvh3doA=", + "dev": true + }, + "vinyl": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-2.2.0.tgz", + "integrity": "sha512-MBH+yP0kC/GQ5GwBqrTPTzEfiiLjta7hTtvQtbxBgTeSXsmKQRQecjibMbxIXzVT3Y9KJK+drOz1/k+vsu8Nkg==", + "dev": true, + "requires": { + "clone": "^2.1.1", + "clone-buffer": "^1.0.0", + "clone-stats": "^1.0.0", + "cloneable-readable": "^1.0.0", + "remove-trailing-separator": "^1.0.1", + "replace-ext": "^1.0.0" + } + } + } + }, + "vscode": { + "version": "1.1.28", + "resolved": "https://registry.npmjs.org/vscode/-/vscode-1.1.28.tgz", + "integrity": "sha512-vxpRMKVa/DgSihyy8I7puRZKiwQm9NK/e5oDTEFDtughhEHrspi0UaXKe795b1DFgO3XJe6KLiXzC8mJonvvWw==", + "dev": true, + "requires": { + "glob": "^7.1.2", + "gulp-chmod": "^2.0.0", + "gulp-filter": "^5.0.1", + "gulp-gunzip": "1.0.0", + "gulp-remote-src-vscode": "^0.5.1", + "gulp-untar": "^0.0.7", + "gulp-vinyl-zip": "^2.1.2", + "mocha": "^4.0.1", + "request": "^2.88.0", + "semver": "^5.4.1", + "source-map-support": "^0.5.0", + "url-parse": "^1.4.3", + "vinyl-fs": "^3.0.3", + "vinyl-source-stream": "^1.1.0" + }, + "dependencies": { + "commander": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.11.0.tgz", + "integrity": "sha512-b0553uYA5YAEGgyYIGYROzKQ7X5RAqedkfjiZxwi0kL1g3bOaBNNZfYkzt/CL0umgD5wc9Jec2FbB98CjkMRvQ==", + "dev": true + }, + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "diff": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.3.1.tgz", + "integrity": "sha512-MKPHZDMB0o6yHyDryUOScqZibp914ksXwAMYMTHj6KO8UeKsRYNJD3oNCKjTqZon+V488P7N/HzXF8t7ZR95ww==", + "dev": true + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "glob": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", + "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "growl": { + "version": "1.10.3", + "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.3.tgz", + "integrity": "sha512-hKlsbA5Vu3xsh1Cg3J7jSmX/WaW6A5oBeqzM88oNbCRQFz+zUaXm6yxS4RVytp1scBoJzSYl4YAEOQIt6O8V1Q==", + "dev": true + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "mocha": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-4.1.0.tgz", + "integrity": "sha512-0RVnjg1HJsXY2YFDoTNzcc1NKhYuXKRrBAG2gDygmJJA136Cs2QlRliZG1mA0ap7cuaT30mw16luAeln+4RiNA==", + "dev": true, + "requires": { + "browser-stdout": "1.3.0", + "commander": "2.11.0", + "debug": "3.1.0", + "diff": "3.3.1", + "escape-string-regexp": "1.0.5", + "glob": "7.1.2", + "growl": "1.10.3", + "he": "1.1.1", + "mkdirp": "0.5.1", + "supports-color": "4.4.0" + }, + "dependencies": { + "glob": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", + "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + } + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "supports-color": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.4.0.tgz", + "integrity": "sha512-rKC3+DyXWgK0ZLKwmRsrkyHVZAjNkfzeehuFWdGGcqGDTZFH73+RH6S/RDAAxl9GusSjZSUWYLmT9N5pzXFOXQ==", + "dev": true, + "requires": { + "has-flag": "^2.0.0" + } + } + } + }, + "vscode-jsonrpc": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-4.0.0.tgz", + "integrity": "sha512-perEnXQdQOJMTDFNv+UF3h1Y0z4iSiaN9jIlb0OqIYgosPCZGYh/MCUlkFtV2668PL69lRDO32hmvL2yiidUYg==" + }, + "vscode-languageclient": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/vscode-languageclient/-/vscode-languageclient-5.2.1.tgz", + "integrity": "sha512-7jrS/9WnV0ruqPamN1nE7qCxn0phkH5LjSgSp9h6qoJGoeAKzwKz/PF6M+iGA/aklx4GLZg1prddhEPQtuXI1Q==", + "requires": { + "semver": "^5.5.0", + "vscode-languageserver-protocol": "3.14.1" + } + }, + "vscode-languageserver": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/vscode-languageserver/-/vscode-languageserver-5.2.1.tgz", + "integrity": "sha512-GuayqdKZqAwwaCUjDvMTAVRPJOp/SLON3mJ07eGsx/Iq9HjRymhKWztX41rISqDKhHVVyFM+IywICyZDla6U3A==", + "requires": { + "vscode-languageserver-protocol": "3.14.1", + "vscode-uri": "^1.0.6" + } + }, + "vscode-languageserver-protocol": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.14.1.tgz", + "integrity": "sha512-IL66BLb2g20uIKog5Y2dQ0IiigW0XKrvmWiOvc0yXw80z3tMEzEnHjaGAb3ENuU7MnQqgnYJ1Cl2l9RvNgDi4g==", + "requires": { + "vscode-jsonrpc": "^4.0.0", + "vscode-languageserver-types": "3.14.0" + } + }, + "vscode-languageserver-types": { + "version": "3.14.0", + "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.14.0.tgz", + "integrity": "sha512-lTmS6AlAlMHOvPQemVwo3CezxBp0sNB95KNPkqp3Nxd5VFEnuG1ByM0zlRWos0zjO3ZWtkvhal0COgiV1xIA4A==" + }, + "vscode-uri": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/vscode-uri/-/vscode-uri-1.0.6.tgz", + "integrity": "sha512-sLI2L0uGov3wKVb9EB+vIQBl9tVP90nqRvxSoJ35vI3NjxE8jfsE5DSOhWgSunHSZmKS4OCi2jrtfxK7uyp2ww==" + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + }, + "xtend": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", + "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=", + "dev": true + }, + "yauzl": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", + "integrity": "sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk=", + "dev": true, + "requires": { + "buffer-crc32": "~0.2.3", + "fd-slicer": "~1.1.0" + } + }, + "yazl": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/yazl/-/yazl-2.5.1.tgz", + "integrity": "sha512-phENi2PLiHnHb6QBVot+dJnaAZ0xosj7p3fWl+znIjBDlnMI2PsZCJZ306BPTFOaHf5qdDEI8x5qFrSOBN5vrw==", + "dev": true, + "requires": { + "buffer-crc32": "~0.2.3" + } + } + } +} diff --git a/clang-tools-extra/clangd/clients/clangd-vscode/package.json b/clang-tools-extra/clangd/clients/clangd-vscode/package.json index bea965374449d..f9ac9222e5a57 100644 --- a/clang-tools-extra/clangd/clients/clangd-vscode/package.json +++ b/clang-tools-extra/clangd/clients/clangd-vscode/package.json @@ -2,7 +2,7 @@ "name": "vscode-clangd", "displayName": "vscode-clangd", "description": "Clang Language Server", - "version": "0.0.10", + "version": "0.0.11", "publisher": "llvm-vs-code-extensions", "homepage": "https://clang.llvm.org/extra/clangd.html", "engines": { @@ -21,8 +21,10 @@ "LLVM" ], "activationEvents": [ + "onLanguage:c", "onLanguage:cpp", - "onLanguage:c" + "onLanguage:objective-c", + "onLanguage:objective-cpp" ], "main": "./out/src/extension", "scripts": { @@ -36,11 +38,11 @@ "vscode-languageserver": "^5.2.0" }, "devDependencies": { - "typescript": "^2.0.3", - "vscode": "^1.1.0", - "mocha": "^2.3.3", + "@types/mocha": "^2.2.32", "@types/node": "^6.0.40", - "@types/mocha": "^2.2.32" + "mocha": "^5.2.0", + "typescript": "^2.0.3", + "vscode": "^1.1.0" }, "repository": { "type": "svn", diff --git a/clang-tools-extra/clangd/index/Background.cpp b/clang-tools-extra/clangd/index/Background.cpp index ddb0ec43ae133..40ff8d7e91239 100644 --- a/clang-tools-extra/clangd/index/Background.cpp +++ b/clang-tools-extra/clangd/index/Background.cpp @@ -11,6 +11,7 @@ #include "Compiler.h" #include "Logger.h" #include "SourceCode.h" +#include "Symbol.h" #include "Threading.h" #include "Trace.h" #include "URI.h" diff --git a/clang-tools-extra/clangd/index/Background.h b/clang-tools-extra/clangd/index/Background.h index ea8ab5812f18f..4874353062307 100644 --- a/clang-tools-extra/clangd/index/Background.h +++ b/clang-tools-extra/clangd/index/Background.h @@ -54,7 +54,7 @@ class BackgroundIndexStorage { llvm::unique_function; // Creates an Index Storage that saves shards into disk. Index storage uses - // CDBDirectory + ".clangd-index/" as the folder to save shards. + // CDBDirectory + ".clangd/index/" as the folder to save shards. static Factory createDiskBackedStorageFactory(); }; @@ -67,11 +67,12 @@ class BackgroundIndex : public SwapIndex { /// If BuildIndexPeriodMs is greater than 0, the symbol index will only be /// rebuilt periodically (one per \p BuildIndexPeriodMs); otherwise, index is /// rebuilt for each indexed file. - BackgroundIndex(Context BackgroundContext, const FileSystemProvider &, - const GlobalCompilationDatabase &CDB, - BackgroundIndexStorage::Factory IndexStorageFactory, - size_t BuildIndexPeriodMs = 0, - size_t ThreadPoolSize = llvm::hardware_concurrency()); + BackgroundIndex( + Context BackgroundContext, const FileSystemProvider &, + const GlobalCompilationDatabase &CDB, + BackgroundIndexStorage::Factory IndexStorageFactory, + size_t BuildIndexPeriodMs = 0, + size_t ThreadPoolSize = llvm::heavyweight_hardware_concurrency()); ~BackgroundIndex(); // Blocks while the current task finishes. // Enqueue translation units for indexing. diff --git a/clang-tools-extra/clangd/index/BackgroundIndexStorage.cpp b/clang-tools-extra/clangd/index/BackgroundIndexStorage.cpp index 266b18ce5fef8..85941264f5ccc 100644 --- a/clang-tools-extra/clangd/index/BackgroundIndexStorage.cpp +++ b/clang-tools-extra/clangd/index/BackgroundIndexStorage.cpp @@ -63,19 +63,19 @@ writeAtomically(llvm::StringRef OutPath, } // Uses disk as a storage for index shards. Creates a directory called -// ".clangd-index/" under the path provided during construction. +// ".clangd/index/" under the path provided during construction. class DiskBackedIndexStorage : public BackgroundIndexStorage { std::string DiskShardRoot; public: - // Sets DiskShardRoot to (Directory + ".clangd-index/") which is the base + // Sets DiskShardRoot to (Directory + ".clangd/index/") which is the base // directory for all shard files. DiskBackedIndexStorage(llvm::StringRef Directory) { llvm::SmallString<128> CDBDirectory(Directory); - llvm::sys::path::append(CDBDirectory, ".clangd-index/"); + llvm::sys::path::append(CDBDirectory, ".clangd", "index"); DiskShardRoot = CDBDirectory.str(); std::error_code OK; - std::error_code EC = llvm::sys::fs::create_directory(DiskShardRoot); + std::error_code EC = llvm::sys::fs::create_directories(DiskShardRoot); if (EC != OK) { elog("Failed to create directory {0} for index storage: {1}", DiskShardRoot, EC.message()); diff --git a/clang-tools-extra/clangd/index/FileIndex.cpp b/clang-tools-extra/clangd/index/FileIndex.cpp index 8ce42b51f3340..7eca85e22e008 100644 --- a/clang-tools-extra/clangd/index/FileIndex.cpp +++ b/clang-tools-extra/clangd/index/FileIndex.cpp @@ -10,9 +10,11 @@ #include "ClangdUnit.h" #include "Logger.h" #include "SymbolCollector.h" +#include "index/CanonicalIncludes.h" #include "index/Index.h" #include "index/MemIndex.h" #include "index/Merge.h" +#include "index/SymbolOrigin.h" #include "index/dex/Dex.h" #include "clang/Index/IndexingAction.h" #include "clang/Lex/MacroInfo.h" @@ -28,14 +30,11 @@ namespace clangd { static std::pair indexSymbols(ASTContext &AST, std::shared_ptr PP, - llvm::ArrayRef DeclsToIndex, bool IsIndexMainAST) { + llvm::ArrayRef DeclsToIndex, + const CanonicalIncludes &Includes, bool IsIndexMainAST) { SymbolCollector::Options CollectorOpts; - // FIXME(ioeric): we might also want to collect include headers. We would need - // to make sure all includes are canonicalized (with CanonicalIncludes), which - // is not trivial given the current way of collecting symbols: we only have - // AST at this point, but we also need preprocessor callbacks (e.g. - // CommentHandler for IWYU pragma) to canonicalize includes. - CollectorOpts.CollectIncludePath = false; + CollectorOpts.CollectIncludePath = true; + CollectorOpts.Includes = &Includes; CollectorOpts.CountReferences = false; CollectorOpts.Origin = SymbolOrigin::Dynamic; @@ -47,9 +46,13 @@ indexSymbols(ASTContext &AST, std::shared_ptr PP, if (IsIndexMainAST) { // We only collect refs when indexing main AST. CollectorOpts.RefFilter = RefKind::All; - }else { + // Comments for main file can always be obtained from sema, do not store + // them in the index. + CollectorOpts.StoreAllDocumentation = false; + } else { IndexOpts.IndexMacrosInPreprocessor = true; CollectorOpts.CollectMacro = true; + CollectorOpts.StoreAllDocumentation = true; } SymbolCollector Collector(std::move(CollectorOpts)); @@ -72,16 +75,16 @@ indexSymbols(ASTContext &AST, std::shared_ptr PP, std::pair indexMainDecls(ParsedAST &AST) { return indexSymbols(AST.getASTContext(), AST.getPreprocessorPtr(), - AST.getLocalTopLevelDecls(), + AST.getLocalTopLevelDecls(), AST.getCanonicalIncludes(), /*IsIndexMainAST=*/true); } -SymbolSlab indexHeaderSymbols(ASTContext &AST, - std::shared_ptr PP) { +SymbolSlab indexHeaderSymbols(ASTContext &AST, std::shared_ptr PP, + const CanonicalIncludes &Includes) { std::vector DeclsToIndex( AST.getTranslationUnitDecl()->decls().begin(), AST.getTranslationUnitDecl()->decls().end()); - return indexSymbols(AST, std::move(PP), DeclsToIndex, + return indexSymbols(AST, std::move(PP), DeclsToIndex, Includes, /*IsIndexMainAST=*/false) .first; } @@ -195,8 +198,9 @@ FileIndex::FileIndex(bool UseDex) MainFileIndex(llvm::make_unique()) {} void FileIndex::updatePreamble(PathRef Path, ASTContext &AST, - std::shared_ptr PP) { - auto Symbols = indexHeaderSymbols(AST, std::move(PP)); + std::shared_ptr PP, + const CanonicalIncludes &Includes) { + auto Symbols = indexHeaderSymbols(AST, std::move(PP), Includes); PreambleSymbols.update(Path, llvm::make_unique(std::move(Symbols)), llvm::make_unique()); diff --git a/clang-tools-extra/clangd/index/FileIndex.h b/clang-tools-extra/clangd/index/FileIndex.h index 74563276740c7..d9bee8885d194 100644 --- a/clang-tools-extra/clangd/index/FileIndex.h +++ b/clang-tools-extra/clangd/index/FileIndex.h @@ -19,6 +19,8 @@ #include "Index.h" #include "MemIndex.h" #include "Merge.h" +#include "index/CanonicalIncludes.h" +#include "index/Symbol.h" #include "clang/Lex/Preprocessor.h" #include @@ -84,7 +86,8 @@ class FileIndex : public MergedIndex { /// Update preamble symbols of file \p Path with all declarations in \p AST /// and macros in \p PP. void updatePreamble(PathRef Path, ASTContext &AST, - std::shared_ptr PP); + std::shared_ptr PP, + const CanonicalIncludes &Includes); /// Update symbols and references from main file \p Path with /// `indexMainDecls`. @@ -124,8 +127,8 @@ std::pair indexMainDecls(ParsedAST &AST); /// Idex declarations from \p AST and macros from \p PP that are declared in /// included headers. -SymbolSlab indexHeaderSymbols(ASTContext &AST, - std::shared_ptr PP); +SymbolSlab indexHeaderSymbols(ASTContext &AST, std::shared_ptr PP, + const CanonicalIncludes &Includes); } // namespace clangd } // namespace clang diff --git a/clang-tools-extra/clangd/index/Index.cpp b/clang-tools-extra/clangd/index/Index.cpp index c773cd6917373..a5bfc672096d6 100644 --- a/clang-tools-extra/clangd/index/Index.cpp +++ b/clang-tools-extra/clangd/index/Index.cpp @@ -12,152 +12,11 @@ #include "llvm/ADT/StringRef.h" #include "llvm/Support/Error.h" #include "llvm/Support/raw_ostream.h" +#include namespace clang { namespace clangd { -constexpr uint32_t SymbolLocation::Position::MaxLine; -constexpr uint32_t SymbolLocation::Position::MaxColumn; -void SymbolLocation::Position::setLine(uint32_t L) { - if (L > MaxLine) { - Line = MaxLine; - return; - } - Line = L; -} -void SymbolLocation::Position::setColumn(uint32_t Col) { - if (Col > MaxColumn) { - Column = MaxColumn; - return; - } - Column = Col; -} - -llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, const SymbolLocation &L) { - if (!L) - return OS << "(none)"; - return OS << L.FileURI << "[" << L.Start.line() << ":" << L.Start.column() - << "-" << L.End.line() << ":" << L.End.column() << ")"; -} - -llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, SymbolOrigin O) { - if (O == SymbolOrigin::Unknown) - return OS << "unknown"; - constexpr static char Sigils[] = "ADSM4567"; - for (unsigned I = 0; I < sizeof(Sigils); ++I) - if (static_cast(O) & 1u << I) - OS << Sigils[I]; - return OS; -} - -llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, Symbol::SymbolFlag F) { - if (F == Symbol::None) - return OS << "None"; - std::string S; - if (F & Symbol::Deprecated) - S += "deprecated|"; - if (F & Symbol::IndexedForCodeCompletion) - S += "completion|"; - return OS << llvm::StringRef(S).rtrim('|'); -} - -llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, const Symbol &S) { - return OS << S.Scope << S.Name; -} - -float quality(const Symbol &S) { - // This avoids a sharp gradient for tail symbols, and also neatly avoids the - // question of whether 0 references means a bad symbol or missing data. - if (S.References < 3) - return 1; - return std::log(S.References); -} - -SymbolSlab::const_iterator SymbolSlab::find(const SymbolID &ID) const { - auto It = std::lower_bound( - Symbols.begin(), Symbols.end(), ID, - [](const Symbol &S, const SymbolID &I) { return S.ID < I; }); - if (It != Symbols.end() && It->ID == ID) - return It; - return Symbols.end(); -} - -// Copy the underlying data of the symbol into the owned arena. -static void own(Symbol &S, llvm::UniqueStringSaver &Strings) { - visitStrings(S, [&](llvm::StringRef &V) { V = Strings.save(V); }); -} - -void SymbolSlab::Builder::insert(const Symbol &S) { - auto R = SymbolIndex.try_emplace(S.ID, Symbols.size()); - if (R.second) { - Symbols.push_back(S); - own(Symbols.back(), UniqueStrings); - } else { - auto &Copy = Symbols[R.first->second] = S; - own(Copy, UniqueStrings); - } -} - -SymbolSlab SymbolSlab::Builder::build() && { - Symbols = {Symbols.begin(), Symbols.end()}; // Force shrink-to-fit. - // Sort symbols so the slab can binary search over them. - llvm::sort(Symbols, - [](const Symbol &L, const Symbol &R) { return L.ID < R.ID; }); - // We may have unused strings from overwritten symbols. Build a new arena. - llvm::BumpPtrAllocator NewArena; - llvm::UniqueStringSaver Strings(NewArena); - for (auto &S : Symbols) - own(S, Strings); - return SymbolSlab(std::move(NewArena), std::move(Symbols)); -} - -llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, RefKind K) { - if (K == RefKind::Unknown) - return OS << "Unknown"; - static const std::vector Messages = {"Decl", "Def", "Ref"}; - bool VisitedOnce = false; - for (unsigned I = 0; I < Messages.size(); ++I) { - if (static_cast(K) & 1u << I) { - if (VisitedOnce) - OS << ", "; - OS << Messages[I]; - VisitedOnce = true; - } - } - return OS; -} - -llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, const Ref &R) { - return OS << R.Location << ":" << R.Kind; -} - -void RefSlab::Builder::insert(const SymbolID &ID, const Ref &S) { - auto &M = Refs[ID]; - M.push_back(S); - M.back().Location.FileURI = - UniqueStrings.save(M.back().Location.FileURI).data(); -} - -RefSlab RefSlab::Builder::build() && { - // We can reuse the arena, as it only has unique strings and we need them all. - // Reallocate refs on the arena to reduce waste and indirections when reading. - std::vector>> Result; - Result.reserve(Refs.size()); - size_t NumRefs = 0; - for (auto &Sym : Refs) { - auto &SymRefs = Sym.second; - llvm::sort(SymRefs); - // FIXME: do we really need to dedup? - SymRefs.erase(std::unique(SymRefs.begin(), SymRefs.end()), SymRefs.end()); - - NumRefs += SymRefs.size(); - auto *Array = Arena.Allocate(SymRefs.size()); - std::uninitialized_copy(SymRefs.begin(), SymRefs.end(), Array); - Result.emplace_back(Sym.first, llvm::ArrayRef(Array, SymRefs.size())); - } - return RefSlab(std::move(Result), std::move(Arena), NumRefs); -} - void SwapIndex::reset(std::unique_ptr Index) { // Keep the old index alive, so we don't destroy it under lock (may be slow). std::shared_ptr Pin; @@ -179,7 +38,8 @@ bool fromJSON(const llvm::json::Value &Parameters, FuzzyFindRequest &Request) { O && O.map("Query", Request.Query) && O.map("Scopes", Request.Scopes) && O.map("AnyScope", Request.AnyScope) && O.map("Limit", Limit) && O.map("RestrictForCodeCompletion", Request.RestrictForCodeCompletion) && - O.map("ProximityPaths", Request.ProximityPaths); + O.map("ProximityPaths", Request.ProximityPaths) && + O.map("PreferredTypes", Request.PreferredTypes); if (OK && Limit <= std::numeric_limits::max()) Request.Limit = Limit; return OK; @@ -193,6 +53,7 @@ llvm::json::Value toJSON(const FuzzyFindRequest &Request) { {"Limit", Request.Limit}, {"RestrictForCodeCompletion", Request.RestrictForCodeCompletion}, {"ProximityPaths", llvm::json::Array{Request.ProximityPaths}}, + {"PreferredTypes", llvm::json::Array{Request.PreferredTypes}}, }; } diff --git a/clang-tools-extra/clangd/index/Index.h b/clang-tools-extra/clangd/index/Index.h index d36dd2992d9f0..2954b387bccbb 100644 --- a/clang-tools-extra/clangd/index/Index.h +++ b/clang-tools-extra/clangd/index/Index.h @@ -9,429 +9,19 @@ #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_INDEX_INDEX_H #define LLVM_CLANG_TOOLS_EXTRA_CLANGD_INDEX_INDEX_H -#include "ExpectedTypes.h" +#include "Ref.h" +#include "Symbol.h" #include "SymbolID.h" -#include "clang/Index/IndexSymbol.h" -#include "clang/Lex/Lexer.h" -#include "llvm/ADT/DenseMap.h" #include "llvm/ADT/DenseSet.h" #include "llvm/ADT/Optional.h" -#include "llvm/ADT/SmallVector.h" #include "llvm/ADT/StringExtras.h" -#include "llvm/ADT/StringRef.h" #include "llvm/Support/JSON.h" -#include "llvm/Support/StringSaver.h" -#include -#include #include #include -#include namespace clang { namespace clangd { -struct SymbolLocation { - // Specify a position (Line, Column) of symbol. Using Line/Column allows us to - // build LSP responses without reading the file content. - // - // Position is encoded into 32 bits to save space. - // If Line/Column overflow, the value will be their maximum value. - struct Position { - Position() : Line(0), Column(0) {} - void setLine(uint32_t Line); - uint32_t line() const { return Line; } - void setColumn(uint32_t Column); - uint32_t column() const { return Column; } - - bool hasOverflow() const { - return Line >= MaxLine || Column >= MaxColumn; - } - - static constexpr uint32_t MaxLine = (1 << 20) - 1; - static constexpr uint32_t MaxColumn = (1 << 12) - 1; - - private: - uint32_t Line : 20; // 0-based - // Using UTF-16 code units. - uint32_t Column : 12; // 0-based - }; - - /// The symbol range, using half-open range [Start, End). - Position Start; - Position End; - - explicit operator bool() const { return !StringRef(FileURI).empty(); } - - // The URI of the source file where a symbol occurs. - // The string must be null-terminated. - // - // We avoid using llvm::StringRef here to save memory. - // WARNING: unless you know what you are doing, it is recommended to use it - // via llvm::StringRef. - const char *FileURI = ""; -}; -inline bool operator==(const SymbolLocation::Position &L, - const SymbolLocation::Position &R) { - return std::make_tuple(L.line(), L.column()) == - std::make_tuple(R.line(), R.column()); -} -inline bool operator<(const SymbolLocation::Position &L, - const SymbolLocation::Position &R) { - return std::make_tuple(L.line(), L.column()) < - std::make_tuple(R.line(), R.column()); -} -inline bool operator==(const SymbolLocation &L, const SymbolLocation &R) { - assert(L.FileURI && R.FileURI); - return !std::strcmp(L.FileURI, R.FileURI) && - std::tie(L.Start, L.End) == std::tie(R.Start, R.End); -} -inline bool operator<(const SymbolLocation &L, const SymbolLocation &R) { - assert(L.FileURI && R.FileURI); - int Cmp = std::strcmp(L.FileURI, R.FileURI); - if (Cmp != 0) - return Cmp < 0; - return std::tie(L.Start, L.End) < std::tie(R.Start, R.End); -} -llvm::raw_ostream &operator<<(llvm::raw_ostream &, const SymbolLocation &); - -} // namespace clangd -} // namespace clang -namespace llvm { -// Support SymbolIDs as DenseMap keys. -template <> struct DenseMapInfo { - static inline clang::clangd::SymbolID getEmptyKey() { - static clang::clangd::SymbolID EmptyKey("EMPTYKEY"); - return EmptyKey; - } - static inline clang::clangd::SymbolID getTombstoneKey() { - static clang::clangd::SymbolID TombstoneKey("TOMBSTONEKEY"); - return TombstoneKey; - } - static unsigned getHashValue(const clang::clangd::SymbolID &Sym) { - return hash_value(Sym); - } - static bool isEqual(const clang::clangd::SymbolID &LHS, - const clang::clangd::SymbolID &RHS) { - return LHS == RHS; - } -}; -} // namespace llvm -namespace clang { -namespace clangd { - -// Describes the source of information about a symbol. -// Mainly useful for debugging, e.g. understanding code completion reuslts. -// This is a bitfield as information can be combined from several sources. -enum class SymbolOrigin : uint8_t { - Unknown = 0, - AST = 1 << 0, // Directly from the AST (indexes should not set this). - Dynamic = 1 << 1, // From the dynamic index of opened files. - Static = 1 << 2, // From the static, externally-built index. - Merge = 1 << 3, // A non-trivial index merge was performed. - // Remaining bits reserved for index implementations. -}; -inline SymbolOrigin operator|(SymbolOrigin A, SymbolOrigin B) { - return static_cast(static_cast(A) | - static_cast(B)); -} -inline SymbolOrigin &operator|=(SymbolOrigin &A, SymbolOrigin B) { - return A = A | B; -} -inline SymbolOrigin operator&(SymbolOrigin A, SymbolOrigin B) { - return static_cast(static_cast(A) & - static_cast(B)); -} -raw_ostream &operator<<(raw_ostream &, SymbolOrigin); - -// The class presents a C++ symbol, e.g. class, function. -// -// WARNING: Symbols do not own much of their underlying data - typically strings -// are owned by a SymbolSlab. They should be treated as non-owning references. -// Copies are shallow. -// When adding new unowned data fields to Symbol, remember to update: -// - SymbolSlab::Builder in Index.cpp, to copy them to the slab's storage. -// - mergeSymbol in Merge.cpp, to properly combine two Symbols. -// -// A fully documented symbol can be split as: -// size_type std::map::count(const K& key) const -// | Return | Scope |Name| Signature | -// We split up these components to allow display flexibility later. -struct Symbol { - // The ID of the symbol. - SymbolID ID; - // The symbol information, like symbol kind. - index::SymbolInfo SymInfo; - // The unqualified name of the symbol, e.g. "bar" (for ns::bar). - llvm::StringRef Name; - // The containing namespace. e.g. "" (global), "ns::" (top-level namespace). - llvm::StringRef Scope; - // The location of the symbol's definition, if one was found. - // This just covers the symbol name (e.g. without class/function body). - SymbolLocation Definition; - // The location of the preferred declaration of the symbol. - // This just covers the symbol name. - // This may be the same as Definition. - // - // A C++ symbol may have multiple declarations, and we pick one to prefer. - // * For classes, the canonical declaration should be the definition. - // * For non-inline functions, the canonical declaration typically appears - // in the ".h" file corresponding to the definition. - SymbolLocation CanonicalDeclaration; - // The number of translation units that reference this symbol from their main - // file. This number is only meaningful if aggregated in an index. - unsigned References = 0; - /// Where this symbol came from. Usually an index provides a constant value. - SymbolOrigin Origin = SymbolOrigin::Unknown; - /// A brief description of the symbol that can be appended in the completion - /// candidate list. For example, "(X x, Y y) const" is a function signature. - /// Only set when the symbol is indexed for completion. - llvm::StringRef Signature; - /// What to insert when completing this symbol, after the symbol name. - /// This is in LSP snippet syntax (e.g. "({$0})" for a no-args function). - /// (When snippets are disabled, the symbol name alone is used). - /// Only set when the symbol is indexed for completion. - llvm::StringRef CompletionSnippetSuffix; - /// Documentation including comment for the symbol declaration. - llvm::StringRef Documentation; - /// Type when this symbol is used in an expression. (Short display form). - /// e.g. return type of a function, or type of a variable. - /// Only set when the symbol is indexed for completion. - llvm::StringRef ReturnType; - - /// Raw representation of the OpaqueType of the symbol, used for scoring - /// purposes. - /// Only set when the symbol is indexed for completion. - llvm::StringRef Type; - - struct IncludeHeaderWithReferences { - IncludeHeaderWithReferences() = default; - - IncludeHeaderWithReferences(llvm::StringRef IncludeHeader, - unsigned References) - : IncludeHeader(IncludeHeader), References(References) {} - - /// This can be either a URI of the header to be #include'd - /// for this symbol, or a literal header quoted with <> or "" that is - /// suitable to be included directly. When it is a URI, the exact #include - /// path needs to be calculated according to the URI scheme. - /// - /// Note that the include header is a canonical include for the symbol and - /// can be different from FileURI in the CanonicalDeclaration. - llvm::StringRef IncludeHeader = ""; - /// The number of translation units that reference this symbol and include - /// this header. This number is only meaningful if aggregated in an index. - unsigned References = 0; - }; - /// One Symbol can potentially be incuded via different headers. - /// - If we haven't seen a definition, this covers all declarations. - /// - If we have seen a definition, this covers declarations visible from - /// any definition. - /// Only set when the symbol is indexed for completion. - llvm::SmallVector IncludeHeaders; - - enum SymbolFlag : uint8_t { - None = 0, - /// Whether or not this symbol is meant to be used for the code completion. - /// See also isIndexedForCodeCompletion(). - /// Note that we don't store completion information (signature, snippet, - /// type, inclues) if the symbol is not indexed for code completion. - IndexedForCodeCompletion = 1 << 0, - /// Indicates if the symbol is deprecated. - Deprecated = 1 << 1, - // Symbol is an implementation detail. - ImplementationDetail = 1 << 2, - // Symbol is visible to other files (not e.g. a static helper function). - VisibleOutsideFile = 1 << 3, - }; - - SymbolFlag Flags = SymbolFlag::None; - /// FIXME: also add deprecation message and fixit? -}; -inline Symbol::SymbolFlag operator|(Symbol::SymbolFlag A, Symbol::SymbolFlag B) { - return static_cast(static_cast(A) | - static_cast(B)); -} -inline Symbol::SymbolFlag &operator|=(Symbol::SymbolFlag &A, Symbol::SymbolFlag B) { - return A = A | B; -} -llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, const Symbol &S); -raw_ostream &operator<<(raw_ostream &, Symbol::SymbolFlag); - -// Invokes Callback with each StringRef& contained in the Symbol. -// Useful for deduplicating backing strings. -template void visitStrings(Symbol &S, const Callback &CB) { - CB(S.Name); - CB(S.Scope); - CB(S.Signature); - CB(S.CompletionSnippetSuffix); - CB(S.Documentation); - CB(S.ReturnType); - CB(S.Type); - auto RawCharPointerCB = [&CB](const char *&P) { - llvm::StringRef S(P); - CB(S); - assert(!S.data()[S.size()] && "Visited StringRef must be null-terminated"); - P = S.data(); - }; - RawCharPointerCB(S.CanonicalDeclaration.FileURI); - RawCharPointerCB(S.Definition.FileURI); - - for (auto &Include : S.IncludeHeaders) - CB(Include.IncludeHeader); -} - -// Computes query-independent quality score for a Symbol. -// This currently falls in the range [1, ln(#indexed documents)]. -// FIXME: this should probably be split into symbol -> signals -// and signals -> score, so it can be reused for Sema completions. -float quality(const Symbol &S); - -// An immutable symbol container that stores a set of symbols. -// The container will maintain the lifetime of the symbols. -class SymbolSlab { -public: - using const_iterator = std::vector::const_iterator; - using iterator = const_iterator; - using value_type = Symbol; - - SymbolSlab() = default; - - const_iterator begin() const { return Symbols.begin(); } - const_iterator end() const { return Symbols.end(); } - const_iterator find(const SymbolID &SymID) const; - - size_t size() const { return Symbols.size(); } - bool empty() const { return Symbols.empty(); } - // Estimates the total memory usage. - size_t bytes() const { - return sizeof(*this) + Arena.getTotalMemory() + - Symbols.capacity() * sizeof(Symbol); - } - - // SymbolSlab::Builder is a mutable container that can 'freeze' to SymbolSlab. - // The frozen SymbolSlab will use less memory. - class Builder { - public: - Builder() : UniqueStrings(Arena) {} - - // Adds a symbol, overwriting any existing one with the same ID. - // This is a deep copy: underlying strings will be owned by the slab. - void insert(const Symbol &S); - - // Returns the symbol with an ID, if it exists. Valid until next insert(). - const Symbol *find(const SymbolID &ID) { - auto I = SymbolIndex.find(ID); - return I == SymbolIndex.end() ? nullptr : &Symbols[I->second]; - } - - // Consumes the builder to finalize the slab. - SymbolSlab build() &&; - - private: - llvm::BumpPtrAllocator Arena; - // Intern table for strings. Contents are on the arena. - llvm::UniqueStringSaver UniqueStrings; - std::vector Symbols; - // Values are indices into Symbols vector. - llvm::DenseMap SymbolIndex; - }; - -private: - SymbolSlab(llvm::BumpPtrAllocator Arena, std::vector Symbols) - : Arena(std::move(Arena)), Symbols(std::move(Symbols)) {} - - llvm::BumpPtrAllocator Arena; // Owns Symbol data that the Symbols do not. - std::vector Symbols; // Sorted by SymbolID to allow lookup. -}; - -// Describes the kind of a cross-reference. -// -// This is a bitfield which can be combined from different kinds. -enum class RefKind : uint8_t { - Unknown = 0, - Declaration = static_cast(index::SymbolRole::Declaration), - Definition = static_cast(index::SymbolRole::Definition), - Reference = static_cast(index::SymbolRole::Reference), - All = Declaration | Definition | Reference, -}; -inline RefKind operator|(RefKind L, RefKind R) { - return static_cast(static_cast(L) | - static_cast(R)); -} -inline RefKind &operator|=(RefKind &L, RefKind R) { return L = L | R; } -inline RefKind operator&(RefKind A, RefKind B) { - return static_cast(static_cast(A) & - static_cast(B)); -} -llvm::raw_ostream &operator<<(llvm::raw_ostream &, RefKind); - -// Represents a symbol occurrence in the source file. -// Despite the name, it could be a declaration/definition/reference. -// -// WARNING: Location does not own the underlying data - Copies are shallow. -struct Ref { - // The source location where the symbol is named. - SymbolLocation Location; - RefKind Kind = RefKind::Unknown; -}; -inline bool operator<(const Ref &L, const Ref &R) { - return std::tie(L.Location, L.Kind) < std::tie(R.Location, R.Kind); -} -inline bool operator==(const Ref &L, const Ref &R) { - return std::tie(L.Location, L.Kind) == std::tie(R.Location, R.Kind); -} -llvm::raw_ostream &operator<<(llvm::raw_ostream &, const Ref &); - -// An efficient structure of storing large set of symbol references in memory. -// Filenames are deduplicated. -class RefSlab { -public: - using value_type = std::pair>; - using const_iterator = std::vector::const_iterator; - using iterator = const_iterator; - - RefSlab() = default; - RefSlab(RefSlab &&Slab) = default; - RefSlab &operator=(RefSlab &&RHS) = default; - - const_iterator begin() const { return Refs.begin(); } - const_iterator end() const { return Refs.end(); } - /// Gets the number of symbols. - size_t size() const { return Refs.size(); } - size_t numRefs() const { return NumRefs; } - bool empty() const { return Refs.empty(); } - - size_t bytes() const { - return sizeof(*this) + Arena.getTotalMemory() + - sizeof(value_type) * Refs.size(); - } - - // RefSlab::Builder is a mutable container that can 'freeze' to RefSlab. - class Builder { - public: - Builder() : UniqueStrings(Arena) {} - // Adds a ref to the slab. Deep copy: Strings will be owned by the slab. - void insert(const SymbolID &ID, const Ref &S); - // Consumes the builder to finalize the slab. - RefSlab build() &&; - - private: - llvm::BumpPtrAllocator Arena; - llvm::UniqueStringSaver UniqueStrings; // Contents on the arena. - llvm::DenseMap> Refs; - }; - -private: - RefSlab(std::vector Refs, llvm::BumpPtrAllocator Arena, - size_t NumRefs) - : Arena(std::move(Arena)), Refs(std::move(Refs)), NumRefs(NumRefs) {} - - llvm::BumpPtrAllocator Arena; - std::vector Refs; - // Number of all references. - size_t NumRefs = 0; -}; - struct FuzzyFindRequest { /// \brief A query string for the fuzzy find. This is matched against symbols' /// un-qualified identifiers and should not contain qualifiers like "::". @@ -454,14 +44,15 @@ struct FuzzyFindRequest { /// Contextually relevant files (e.g. the file we're code-completing in). /// Paths should be absolute. std::vector ProximityPaths; - - // FIXME(ibiryukov): add expected type to the request. + /// Preferred types of symbols. These are raw representation of `OpaqueType`. + std::vector PreferredTypes; bool operator==(const FuzzyFindRequest &Req) const { return std::tie(Query, Scopes, Limit, RestrictForCodeCompletion, - ProximityPaths) == + ProximityPaths, PreferredTypes) == std::tie(Req.Query, Req.Scopes, Req.Limit, - Req.RestrictForCodeCompletion, Req.ProximityPaths); + Req.RestrictForCodeCompletion, Req.ProximityPaths, + Req.PreferredTypes); } bool operator!=(const FuzzyFindRequest &Req) const { return !(*this == Req); } }; diff --git a/clang-tools-extra/clangd/index/IndexAction.cpp b/clang-tools-extra/clangd/index/IndexAction.cpp index a6df64b7be3e8..96c007d4a8ff7 100644 --- a/clang-tools-extra/clangd/index/IndexAction.cpp +++ b/clang-tools-extra/clangd/index/IndexAction.cpp @@ -1,4 +1,13 @@ +//===--- IndexAction.cpp -----------------------------------------*- C++-*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + #include "IndexAction.h" +#include "index/SymbolOrigin.h" #include "clang/Frontend/CompilerInstance.h" #include "clang/Index/IndexDataConsumer.h" #include "clang/Index/IndexingAction.h" @@ -175,6 +184,7 @@ std::unique_ptr createStaticIndexingAction( Opts.CollectIncludePath = true; Opts.CountReferences = true; Opts.Origin = SymbolOrigin::Static; + Opts.StoreAllDocumentation = false; if (RefsCallback != nullptr) { Opts.RefFilter = RefKind::All; Opts.RefsInHeaders = true; diff --git a/clang-tools-extra/clangd/index/Merge.cpp b/clang-tools-extra/clangd/index/Merge.cpp index d967db8a7feb1..a5945a7dd17b7 100644 --- a/clang-tools-extra/clangd/index/Merge.cpp +++ b/clang-tools-extra/clangd/index/Merge.cpp @@ -9,9 +9,15 @@ #include "Merge.h" #include "Logger.h" #include "Trace.h" +#include "index/Symbol.h" +#include "index/SymbolLocation.h" +#include "index/SymbolOrigin.h" #include "llvm/ADT/STLExtras.h" +#include "llvm/ADT/StringRef.h" #include "llvm/ADT/StringSet.h" #include "llvm/Support/raw_ostream.h" +#include +#include namespace clang { namespace clangd { @@ -114,6 +120,23 @@ void MergedIndex::refs(const RefsRequest &Req, }); } +// Returns true if \p L is (strictly) preferred to \p R (e.g. by file paths). If +// neither is preferred, this returns false. +bool prefer(const SymbolLocation &L, const SymbolLocation &R) { + if (!L) + return false; + if (!R) + return true; + auto HasCodeGenSuffix = [](const SymbolLocation &Loc) { + constexpr static const char *CodegenSuffixes[] = {".proto"}; + return std::any_of(std::begin(CodegenSuffixes), std::end(CodegenSuffixes), + [&](llvm::StringRef Suffix) { + return llvm::StringRef(Loc.FileURI).endswith(Suffix); + }); + }; + return HasCodeGenSuffix(L) && !HasCodeGenSuffix(R); +} + Symbol mergeSymbol(const Symbol &L, const Symbol &R) { assert(L.ID == R.ID); // We prefer information from TUs that saw the definition. @@ -128,12 +151,11 @@ Symbol mergeSymbol(const Symbol &L, const Symbol &R) { Symbol S = PreferR ? R : L; // The target symbol we're merging into. const Symbol &O = PreferR ? L : R; // The "other" less-preferred symbol. - // For each optional field, fill it from O if missing in S. - // (It might be missing in O too, but that's a no-op). - if (!S.Definition) - S.Definition = O.Definition; - if (!S.CanonicalDeclaration) + // Only use locations in \p O if it's (strictly) preferred. + if (prefer(O.CanonicalDeclaration, S.CanonicalDeclaration)) S.CanonicalDeclaration = O.CanonicalDeclaration; + if (prefer(O.Definition, S.Definition)) + S.Definition = O.Definition; S.References += O.References; if (S.Signature == "") S.Signature = O.Signature; diff --git a/clang-tools-extra/clangd/index/Ref.cpp b/clang-tools-extra/clangd/index/Ref.cpp new file mode 100644 index 0000000000000..3f0fea5602a1c --- /dev/null +++ b/clang-tools-extra/clangd/index/Ref.cpp @@ -0,0 +1,60 @@ +//===--- Ref.cpp -------------------------------------------------*- C++-*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#include "Ref.h" + +namespace clang { +namespace clangd { + +llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, RefKind K) { + if (K == RefKind::Unknown) + return OS << "Unknown"; + static const std::vector Messages = {"Decl", "Def", "Ref"}; + bool VisitedOnce = false; + for (unsigned I = 0; I < Messages.size(); ++I) { + if (static_cast(K) & 1u << I) { + if (VisitedOnce) + OS << ", "; + OS << Messages[I]; + VisitedOnce = true; + } + } + return OS; +} + +llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, const Ref &R) { + return OS << R.Location << ":" << R.Kind; +} + +void RefSlab::Builder::insert(const SymbolID &ID, const Ref &S) { + auto &M = Refs[ID]; + M.push_back(S); + M.back().Location.FileURI = + UniqueStrings.save(M.back().Location.FileURI).data(); +} + +RefSlab RefSlab::Builder::build() && { + // We can reuse the arena, as it only has unique strings and we need them all. + // Reallocate refs on the arena to reduce waste and indirections when reading. + std::vector>> Result; + Result.reserve(Refs.size()); + size_t NumRefs = 0; + for (auto &Sym : Refs) { + auto &SymRefs = Sym.second; + llvm::sort(SymRefs); + // FIXME: do we really need to dedup? + SymRefs.erase(std::unique(SymRefs.begin(), SymRefs.end()), SymRefs.end()); + + NumRefs += SymRefs.size(); + Result.emplace_back(Sym.first, llvm::ArrayRef(SymRefs).copy(Arena)); + } + return RefSlab(std::move(Result), std::move(Arena), NumRefs); +} + +} // namespace clangd +} // namespace clang diff --git a/clang-tools-extra/clangd/index/Ref.h b/clang-tools-extra/clangd/index/Ref.h new file mode 100644 index 0000000000000..738be7b92e1e1 --- /dev/null +++ b/clang-tools-extra/clangd/index/Ref.h @@ -0,0 +1,119 @@ +//===--- Ref.h ---------------------------------------------------*- C++-*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_INDEX_REF_H +#define LLVM_CLANG_TOOLS_EXTRA_CLANGD_INDEX_REF_H + +#include "SymbolID.h" +#include "SymbolLocation.h" +#include "clang/Index/IndexSymbol.h" +#include "llvm/ADT/DenseMap.h" +#include "llvm/Support/StringSaver.h" +#include "llvm/Support/raw_ostream.h" +#include +#include + +namespace clang { +namespace clangd { + +/// Describes the kind of a cross-reference. +/// +/// This is a bitfield which can be combined from different kinds. +enum class RefKind : uint8_t { + Unknown = 0, + Declaration = static_cast(index::SymbolRole::Declaration), + Definition = static_cast(index::SymbolRole::Definition), + Reference = static_cast(index::SymbolRole::Reference), + All = Declaration | Definition | Reference, +}; + +inline RefKind operator|(RefKind L, RefKind R) { + return static_cast(static_cast(L) | + static_cast(R)); +} +inline RefKind &operator|=(RefKind &L, RefKind R) { return L = L | R; } +inline RefKind operator&(RefKind A, RefKind B) { + return static_cast(static_cast(A) & + static_cast(B)); +} + +llvm::raw_ostream &operator<<(llvm::raw_ostream &, RefKind); + +/// Represents a symbol occurrence in the source file. +/// Despite the name, it could be a declaration/definition/reference. +/// +/// WARNING: Location does not own the underlying data - Copies are shallow. +struct Ref { + /// The source location where the symbol is named. + SymbolLocation Location; + RefKind Kind = RefKind::Unknown; +}; + +inline bool operator<(const Ref &L, const Ref &R) { + return std::tie(L.Location, L.Kind) < std::tie(R.Location, R.Kind); +} +inline bool operator==(const Ref &L, const Ref &R) { + return std::tie(L.Location, L.Kind) == std::tie(R.Location, R.Kind); +} + +llvm::raw_ostream &operator<<(llvm::raw_ostream &, const Ref &); + +/// An efficient structure of storing large set of symbol references in memory. +/// Filenames are deduplicated. +class RefSlab { +public: + using value_type = std::pair>; + using const_iterator = std::vector::const_iterator; + using iterator = const_iterator; + + RefSlab() = default; + RefSlab(RefSlab &&Slab) = default; + RefSlab &operator=(RefSlab &&RHS) = default; + + const_iterator begin() const { return Refs.begin(); } + const_iterator end() const { return Refs.end(); } + /// Gets the number of symbols. + size_t size() const { return Refs.size(); } + size_t numRefs() const { return NumRefs; } + bool empty() const { return Refs.empty(); } + + size_t bytes() const { + return sizeof(*this) + Arena.getTotalMemory() + + sizeof(value_type) * Refs.size(); + } + + /// RefSlab::Builder is a mutable container that can 'freeze' to RefSlab. + class Builder { + public: + Builder() : UniqueStrings(Arena) {} + /// Adds a ref to the slab. Deep copy: Strings will be owned by the slab. + void insert(const SymbolID &ID, const Ref &S); + /// Consumes the builder to finalize the slab. + RefSlab build() &&; + + private: + llvm::BumpPtrAllocator Arena; + llvm::UniqueStringSaver UniqueStrings; // Contents on the arena. + llvm::DenseMap> Refs; + }; + +private: + RefSlab(std::vector Refs, llvm::BumpPtrAllocator Arena, + size_t NumRefs) + : Arena(std::move(Arena)), Refs(std::move(Refs)), NumRefs(NumRefs) {} + + llvm::BumpPtrAllocator Arena; + std::vector Refs; + /// Number of all references. + size_t NumRefs = 0; +}; + +} // namespace clangd +} // namespace clang + +#endif // LLVM_CLANG_TOOLS_EXTRA_CLANGD_INDEX_REF_H diff --git a/clang-tools-extra/clangd/index/Serialization.cpp b/clang-tools-extra/clangd/index/Serialization.cpp index 20c43ab09f4e6..c7c23c27eb5e8 100644 --- a/clang-tools-extra/clangd/index/Serialization.cpp +++ b/clang-tools-extra/clangd/index/Serialization.cpp @@ -7,9 +7,10 @@ //===----------------------------------------------------------------------===// #include "Serialization.h" -#include "Index.h" #include "Logger.h" #include "RIFF.h" +#include "SymbolLocation.h" +#include "SymbolOrigin.h" #include "Trace.h" #include "dex/Dex.h" #include "llvm/Support/Compression.h" diff --git a/clang-tools-extra/clangd/index/Serialization.h b/clang-tools-extra/clangd/index/Serialization.h index d81b8968b184e..3788693e04246 100644 --- a/clang-tools-extra/clangd/index/Serialization.h +++ b/clang-tools-extra/clangd/index/Serialization.h @@ -23,8 +23,10 @@ #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_INDEX_RIFF_H #define LLVM_CLANG_TOOLS_EXTRA_CLANGD_INDEX_RIFF_H + #include "Headers.h" #include "Index.h" +#include "index/Symbol.h" #include "llvm/Support/Error.h" namespace clang { diff --git a/clang-tools-extra/clangd/index/Symbol.cpp b/clang-tools-extra/clangd/index/Symbol.cpp new file mode 100644 index 0000000000000..5753571676f88 --- /dev/null +++ b/clang-tools-extra/clangd/index/Symbol.cpp @@ -0,0 +1,76 @@ +//===--- Symbol.cpp ----------------------------------------------*- C++-*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#include "Symbol.h" + +namespace clang { +namespace clangd { + +llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, Symbol::SymbolFlag F) { + if (F == Symbol::None) + return OS << "None"; + std::string S; + if (F & Symbol::Deprecated) + S += "deprecated|"; + if (F & Symbol::IndexedForCodeCompletion) + S += "completion|"; + return OS << llvm::StringRef(S).rtrim('|'); +} + +llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, const Symbol &S) { + return OS << S.Scope << S.Name; +} + +float quality(const Symbol &S) { + // This avoids a sharp gradient for tail symbols, and also neatly avoids the + // question of whether 0 references means a bad symbol or missing data. + if (S.References < 3) + return 1; + return std::log(S.References); +} + +SymbolSlab::const_iterator SymbolSlab::find(const SymbolID &ID) const { + auto It = std::lower_bound( + Symbols.begin(), Symbols.end(), ID, + [](const Symbol &S, const SymbolID &I) { return S.ID < I; }); + if (It != Symbols.end() && It->ID == ID) + return It; + return Symbols.end(); +} + +// Copy the underlying data of the symbol into the owned arena. +static void own(Symbol &S, llvm::UniqueStringSaver &Strings) { + visitStrings(S, [&](llvm::StringRef &V) { V = Strings.save(V); }); +} + +void SymbolSlab::Builder::insert(const Symbol &S) { + auto R = SymbolIndex.try_emplace(S.ID, Symbols.size()); + if (R.second) { + Symbols.push_back(S); + own(Symbols.back(), UniqueStrings); + } else { + auto &Copy = Symbols[R.first->second] = S; + own(Copy, UniqueStrings); + } +} + +SymbolSlab SymbolSlab::Builder::build() && { + Symbols = {Symbols.begin(), Symbols.end()}; // Force shrink-to-fit. + // Sort symbols so the slab can binary search over them. + llvm::sort(Symbols, + [](const Symbol &L, const Symbol &R) { return L.ID < R.ID; }); + // We may have unused strings from overwritten symbols. Build a new arena. + llvm::BumpPtrAllocator NewArena; + llvm::UniqueStringSaver Strings(NewArena); + for (auto &S : Symbols) + own(S, Strings); + return SymbolSlab(std::move(NewArena), std::move(Symbols)); +} + +} // namespace clangd +} // namespace clang diff --git a/clang-tools-extra/clangd/index/Symbol.h b/clang-tools-extra/clangd/index/Symbol.h new file mode 100644 index 0000000000000..a3e4fb91e1b93 --- /dev/null +++ b/clang-tools-extra/clangd/index/Symbol.h @@ -0,0 +1,231 @@ +//===--- Symbol.h ------------------------------------------------*- C++-*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_INDEX_SYMBOL_H +#define LLVM_CLANG_TOOLS_EXTRA_CLANGD_INDEX_SYMBOL_H + +#include "SymbolID.h" +#include "SymbolLocation.h" +#include "SymbolOrigin.h" +#include "clang/Index/IndexSymbol.h" +#include "llvm/ADT/StringRef.h" +#include "llvm/Support/StringSaver.h" + +namespace clang { +namespace clangd { + +/// The class presents a C++ symbol, e.g. class, function. +/// +/// WARNING: Symbols do not own much of their underlying data - typically +/// strings are owned by a SymbolSlab. They should be treated as non-owning +/// references. Copies are shallow. +/// +/// When adding new unowned data fields to Symbol, remember to update: +/// - SymbolSlab::Builder in Index.cpp, to copy them to the slab's storage. +/// - mergeSymbol in Merge.cpp, to properly combine two Symbols. +/// +/// A fully documented symbol can be split as: +/// size_type std::map::count(const K& key) const +/// | Return | Scope |Name| Signature | +/// We split up these components to allow display flexibility later. +struct Symbol { + /// The ID of the symbol. + SymbolID ID; + /// The symbol information, like symbol kind. + index::SymbolInfo SymInfo; + /// The unqualified name of the symbol, e.g. "bar" (for ns::bar). + llvm::StringRef Name; + /// The containing namespace. e.g. "" (global), "ns::" (top-level namespace). + llvm::StringRef Scope; + /// The location of the symbol's definition, if one was found. + /// This just covers the symbol name (e.g. without class/function body). + SymbolLocation Definition; + /// The location of the preferred declaration of the symbol. + /// This just covers the symbol name. + /// This may be the same as Definition. + /// + /// A C++ symbol may have multiple declarations, and we pick one to prefer. + /// * For classes, the canonical declaration should be the definition. + /// * For non-inline functions, the canonical declaration typically appears + /// in the ".h" file corresponding to the definition. + SymbolLocation CanonicalDeclaration; + /// The number of translation units that reference this symbol from their main + /// file. This number is only meaningful if aggregated in an index. + unsigned References = 0; + /// Where this symbol came from. Usually an index provides a constant value. + SymbolOrigin Origin = SymbolOrigin::Unknown; + /// A brief description of the symbol that can be appended in the completion + /// candidate list. For example, "(X x, Y y) const" is a function signature. + /// Only set when the symbol is indexed for completion. + llvm::StringRef Signature; + /// What to insert when completing this symbol, after the symbol name. + /// This is in LSP snippet syntax (e.g. "({$0})" for a no-args function). + /// (When snippets are disabled, the symbol name alone is used). + /// Only set when the symbol is indexed for completion. + llvm::StringRef CompletionSnippetSuffix; + /// Documentation including comment for the symbol declaration. + llvm::StringRef Documentation; + /// Type when this symbol is used in an expression. (Short display form). + /// e.g. return type of a function, or type of a variable. + /// Only set when the symbol is indexed for completion. + llvm::StringRef ReturnType; + + /// Raw representation of the OpaqueType of the symbol, used for scoring + /// purposes. + /// Only set when the symbol is indexed for completion. + llvm::StringRef Type; + + struct IncludeHeaderWithReferences { + IncludeHeaderWithReferences() = default; + + IncludeHeaderWithReferences(llvm::StringRef IncludeHeader, + unsigned References) + : IncludeHeader(IncludeHeader), References(References) {} + + /// This can be either a URI of the header to be #include'd + /// for this symbol, or a literal header quoted with <> or "" that is + /// suitable to be included directly. When it is a URI, the exact #include + /// path needs to be calculated according to the URI scheme. + /// + /// Note that the include header is a canonical include for the symbol and + /// can be different from FileURI in the CanonicalDeclaration. + llvm::StringRef IncludeHeader = ""; + /// The number of translation units that reference this symbol and include + /// this header. This number is only meaningful if aggregated in an index. + unsigned References = 0; + }; + /// One Symbol can potentially be incuded via different headers. + /// - If we haven't seen a definition, this covers all declarations. + /// - If we have seen a definition, this covers declarations visible from + /// any definition. + /// Only set when the symbol is indexed for completion. + llvm::SmallVector IncludeHeaders; + + enum SymbolFlag : uint8_t { + None = 0, + /// Whether or not this symbol is meant to be used for the code completion. + /// See also isIndexedForCodeCompletion(). + /// Note that we don't store completion information (signature, snippet, + /// type, inclues) if the symbol is not indexed for code completion. + IndexedForCodeCompletion = 1 << 0, + /// Indicates if the symbol is deprecated. + Deprecated = 1 << 1, + /// Symbol is an implementation detail. + ImplementationDetail = 1 << 2, + /// Symbol is visible to other files (not e.g. a static helper function). + VisibleOutsideFile = 1 << 3, + }; + + SymbolFlag Flags = SymbolFlag::None; + /// FIXME: also add deprecation message and fixit? +}; + +inline Symbol::SymbolFlag operator|(Symbol::SymbolFlag A, + Symbol::SymbolFlag B) { + return static_cast(static_cast(A) | + static_cast(B)); +} +inline Symbol::SymbolFlag &operator|=(Symbol::SymbolFlag &A, + Symbol::SymbolFlag B) { + return A = A | B; +} + +llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, const Symbol &S); +llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, Symbol::SymbolFlag); + +/// Invokes Callback with each StringRef& contained in the Symbol. +/// Useful for deduplicating backing strings. +template void visitStrings(Symbol &S, const Callback &CB) { + CB(S.Name); + CB(S.Scope); + CB(S.Signature); + CB(S.CompletionSnippetSuffix); + CB(S.Documentation); + CB(S.ReturnType); + CB(S.Type); + auto RawCharPointerCB = [&CB](const char *&P) { + llvm::StringRef S(P); + CB(S); + assert(!S.data()[S.size()] && "Visited StringRef must be null-terminated"); + P = S.data(); + }; + RawCharPointerCB(S.CanonicalDeclaration.FileURI); + RawCharPointerCB(S.Definition.FileURI); + + for (auto &Include : S.IncludeHeaders) + CB(Include.IncludeHeader); +} + +/// Computes query-independent quality score for a Symbol. +/// This currently falls in the range [1, ln(#indexed documents)]. +/// FIXME: this should probably be split into symbol -> signals +/// and signals -> score, so it can be reused for Sema completions. +float quality(const Symbol &S); + +/// An immutable symbol container that stores a set of symbols. +/// The container will maintain the lifetime of the symbols. +class SymbolSlab { +public: + using const_iterator = std::vector::const_iterator; + using iterator = const_iterator; + using value_type = Symbol; + + SymbolSlab() = default; + + const_iterator begin() const { return Symbols.begin(); } + const_iterator end() const { return Symbols.end(); } + const_iterator find(const SymbolID &SymID) const; + + size_t size() const { return Symbols.size(); } + bool empty() const { return Symbols.empty(); } + // Estimates the total memory usage. + size_t bytes() const { + return sizeof(*this) + Arena.getTotalMemory() + + Symbols.capacity() * sizeof(Symbol); + } + + /// SymbolSlab::Builder is a mutable container that can 'freeze' to + /// SymbolSlab. The frozen SymbolSlab will use less memory. + class Builder { + public: + Builder() : UniqueStrings(Arena) {} + + /// Adds a symbol, overwriting any existing one with the same ID. + /// This is a deep copy: underlying strings will be owned by the slab. + void insert(const Symbol &S); + + /// Returns the symbol with an ID, if it exists. Valid until next insert(). + const Symbol *find(const SymbolID &ID) { + auto I = SymbolIndex.find(ID); + return I == SymbolIndex.end() ? nullptr : &Symbols[I->second]; + } + + /// Consumes the builder to finalize the slab. + SymbolSlab build() &&; + + private: + llvm::BumpPtrAllocator Arena; + /// Intern table for strings. Contents are on the arena. + llvm::UniqueStringSaver UniqueStrings; + std::vector Symbols; + /// Values are indices into Symbols vector. + llvm::DenseMap SymbolIndex; + }; + +private: + SymbolSlab(llvm::BumpPtrAllocator Arena, std::vector Symbols) + : Arena(std::move(Arena)), Symbols(std::move(Symbols)) {} + + llvm::BumpPtrAllocator Arena; // Owns Symbol data that the Symbols do not. + std::vector Symbols; // Sorted by SymbolID to allow lookup. +}; + +} // namespace clangd +} // namespace clang + +#endif // LLVM_CLANG_TOOLS_EXTRA_CLANGD_INDEX_SYMBOL_H diff --git a/clang-tools-extra/clangd/index/SymbolCollector.cpp b/clang-tools-extra/clangd/index/SymbolCollector.cpp index cbbbd50576219..686b67b2dfbbc 100644 --- a/clang-tools-extra/clangd/index/SymbolCollector.cpp +++ b/clang-tools-extra/clangd/index/SymbolCollector.cpp @@ -11,8 +11,10 @@ #include "CanonicalIncludes.h" #include "CodeComplete.h" #include "CodeCompletionStrings.h" +#include "ExpectedTypes.h" #include "Logger.h" #include "SourceCode.h" +#include "SymbolLocation.h" #include "URI.h" #include "clang/AST/Decl.h" #include "clang/AST/DeclBase.h" @@ -566,18 +568,13 @@ const Symbol *SymbolCollector::addDeclaration(const NamedDecl &ND, std::string Documentation = formatDocumentation(*CCS, getDocComment(Ctx, SymbolCompletion, /*CommentsFromHeaders=*/true)); - // For symbols not indexed for completion (class members), we also store their - // docs in the index, because Sema doesn't load the docs from the preamble, we - // rely on the index to get the docs. - // FIXME: this can be optimized by only storing the docs in dynamic index -- - // dynamic index should index these symbols when Sema completes a member - // completion. - S.Documentation = Documentation; if (!(S.Flags & Symbol::IndexedForCodeCompletion)) { + if (Opts.StoreAllDocumentation) + S.Documentation = Documentation; Symbols.insert(S); return Symbols.find(S.ID); } - + S.Documentation = Documentation; std::string Signature; std::string SnippetSuffix; getSignature(*CCS, &Signature, &SnippetSuffix); diff --git a/clang-tools-extra/clangd/index/SymbolCollector.h b/clang-tools-extra/clangd/index/SymbolCollector.h index 1b10df4c90d2c..e6d479d2e1f4d 100644 --- a/clang-tools-extra/clangd/index/SymbolCollector.h +++ b/clang-tools-extra/clangd/index/SymbolCollector.h @@ -10,6 +10,7 @@ #include "CanonicalIncludes.h" #include "Index.h" +#include "SymbolOrigin.h" #include "clang/AST/ASTContext.h" #include "clang/AST/Decl.h" #include "clang/Basic/SourceLocation.h" @@ -75,6 +76,10 @@ class SymbolCollector : public index::IndexDataConsumer { /// Collect symbols local to main-files, such as static functions /// and symbols inside an anonymous namespace. bool CollectMainFileSymbols = true; + /// If set to true, SymbolCollector will collect doc for all symbols. + /// Note that documents of symbols being indexed for completion will always + /// be collected regardless of this option. + bool StoreAllDocumentation = false; /// If this is set, only collect symbols/references from a file if /// `FileFilter(SM, FID)` is true. If not set, all files are indexed. std::function FileFilter = nullptr; @@ -139,4 +144,5 @@ class SymbolCollector : public index::IndexDataConsumer { } // namespace clangd } // namespace clang + #endif diff --git a/clang-tools-extra/clangd/index/SymbolID.h b/clang-tools-extra/clangd/index/SymbolID.h index 0e4fc663fde05..d715f4d0266c7 100644 --- a/clang-tools-extra/clangd/index/SymbolID.h +++ b/clang-tools-extra/clangd/index/SymbolID.h @@ -9,6 +9,7 @@ #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_INDEX_SYMBOLID_H #define LLVM_CLANG_TOOLS_EXTRA_CLANGD_INDEX_SYMBOLID_H +#include "llvm/ADT/DenseMap.h" #include "llvm/ADT/Hashing.h" #include "llvm/ADT/StringRef.h" #include "llvm/Support/Error.h" @@ -61,4 +62,25 @@ llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, const SymbolID &ID); } // namespace clangd } // namespace clang +namespace llvm { +// Support SymbolIDs as DenseMap keys. +template <> struct DenseMapInfo { + static inline clang::clangd::SymbolID getEmptyKey() { + static clang::clangd::SymbolID EmptyKey("EMPTYKEY"); + return EmptyKey; + } + static inline clang::clangd::SymbolID getTombstoneKey() { + static clang::clangd::SymbolID TombstoneKey("TOMBSTONEKEY"); + return TombstoneKey; + } + static unsigned getHashValue(const clang::clangd::SymbolID &Sym) { + return hash_value(Sym); + } + static bool isEqual(const clang::clangd::SymbolID &LHS, + const clang::clangd::SymbolID &RHS) { + return LHS == RHS; + } +}; +} // namespace llvm + #endif // LLVM_CLANG_TOOLS_EXTRA_CLANGD_INDEX_SYMBOLID_H diff --git a/clang-tools-extra/clangd/index/SymbolLocation.cpp b/clang-tools-extra/clangd/index/SymbolLocation.cpp new file mode 100644 index 0000000000000..aac55703c35f9 --- /dev/null +++ b/clang-tools-extra/clangd/index/SymbolLocation.cpp @@ -0,0 +1,40 @@ +//===--- SymbolLocation.cpp --------------------------------------*- C++-*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#include "SymbolLocation.h" + +namespace clang { +namespace clangd { + +constexpr uint32_t SymbolLocation::Position::MaxLine; +constexpr uint32_t SymbolLocation::Position::MaxColumn; + +void SymbolLocation::Position::setLine(uint32_t L) { + if (L > MaxLine) { + Line = MaxLine; + return; + } + Line = L; +} +void SymbolLocation::Position::setColumn(uint32_t Col) { + if (Col > MaxColumn) { + Column = MaxColumn; + return; + } + Column = Col; +} + +llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, const SymbolLocation &L) { + if (!L) + return OS << "(none)"; + return OS << L.FileURI << "[" << L.Start.line() << ":" << L.Start.column() + << "-" << L.End.line() << ":" << L.End.column() << ")"; +} + +} // namespace clangd +} // namespace clang diff --git a/clang-tools-extra/clangd/index/SymbolLocation.h b/clang-tools-extra/clangd/index/SymbolLocation.h new file mode 100644 index 0000000000000..f1b7ffd5e0b70 --- /dev/null +++ b/clang-tools-extra/clangd/index/SymbolLocation.h @@ -0,0 +1,88 @@ +//===--- SymbolLocation.h ----------------------------------------*- C++-*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_INDEX_SYMBOL_LOCATION_H +#define LLVM_CLANG_TOOLS_EXTRA_CLANGD_INDEX_SYMBOL_LOCATION_H + +#include "llvm/ADT/StringRef.h" +#include "llvm/Support/raw_ostream.h" +#include + +namespace clang { +namespace clangd { + +struct SymbolLocation { + // Specify a position (Line, Column) of symbol. Using Line/Column allows us to + // build LSP responses without reading the file content. + // + // Position is encoded into 32 bits to save space. + // If Line/Column overflow, the value will be their maximum value. + struct Position { + Position() : Line(0), Column(0) {} + void setLine(uint32_t Line); + uint32_t line() const { return Line; } + void setColumn(uint32_t Column); + uint32_t column() const { return Column; } + + bool hasOverflow() const { + return Line >= MaxLine || Column >= MaxColumn; + } + + static constexpr uint32_t MaxLine = (1 << 20) - 1; + static constexpr uint32_t MaxColumn = (1 << 12) - 1; + + private: + uint32_t Line : 20; // 0-based + // Using UTF-16 code units. + uint32_t Column : 12; // 0-based + }; + + /// The symbol range, using half-open range [Start, End). + Position Start; + Position End; + + explicit operator bool() const { return !llvm::StringRef(FileURI).empty(); } + + // The URI of the source file where a symbol occurs. + // The string must be null-terminated. + // + // We avoid using llvm::StringRef here to save memory. + // WARNING: unless you know what you are doing, it is recommended to use it + // via llvm::StringRef. + const char *FileURI = ""; +}; + +inline bool operator==(const SymbolLocation::Position &L, + const SymbolLocation::Position &R) { + return std::make_tuple(L.line(), L.column()) == + std::make_tuple(R.line(), R.column()); +} +inline bool operator<(const SymbolLocation::Position &L, + const SymbolLocation::Position &R) { + return std::make_tuple(L.line(), L.column()) < + std::make_tuple(R.line(), R.column()); +} +inline bool operator==(const SymbolLocation &L, const SymbolLocation &R) { + assert(L.FileURI && R.FileURI); + return !std::strcmp(L.FileURI, R.FileURI) && + std::tie(L.Start, L.End) == std::tie(R.Start, R.End); +} +inline bool operator<(const SymbolLocation &L, const SymbolLocation &R) { + assert(L.FileURI && R.FileURI); + int Cmp = std::strcmp(L.FileURI, R.FileURI); + if (Cmp != 0) + return Cmp < 0; + return std::tie(L.Start, L.End) < std::tie(R.Start, R.End); +} + +llvm::raw_ostream &operator<<(llvm::raw_ostream &, const SymbolLocation &); + +} // namespace clangd +} // namespace clang + +#endif // LLVM_CLANG_TOOLS_EXTRA_CLANGD_INDEX_SYMBOL_LOCATION_H diff --git a/clang-tools-extra/clangd/index/SymbolOrigin.cpp b/clang-tools-extra/clangd/index/SymbolOrigin.cpp new file mode 100644 index 0000000000000..93fc69f0613ed --- /dev/null +++ b/clang-tools-extra/clangd/index/SymbolOrigin.cpp @@ -0,0 +1,25 @@ +//===--- SymbolOrigin.cpp ----------------------------------------*- C++-*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#include "SymbolOrigin.h" + +namespace clang { +namespace clangd { + +llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, SymbolOrigin O) { + if (O == SymbolOrigin::Unknown) + return OS << "unknown"; + constexpr static char Sigils[] = "ADSM4567"; + for (unsigned I = 0; I < sizeof(Sigils); ++I) + if (static_cast(O) & 1u << I) + OS << Sigils[I]; + return OS; +} + +} // namespace clangd +} // namespace clang diff --git a/clang-tools-extra/clangd/index/SymbolOrigin.h b/clang-tools-extra/clangd/index/SymbolOrigin.h new file mode 100644 index 0000000000000..4541e4c71cbf9 --- /dev/null +++ b/clang-tools-extra/clangd/index/SymbolOrigin.h @@ -0,0 +1,47 @@ +//===--- SymbolOrigin.h ------------------------------------------*- C++-*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_INDEX_SYMBOL_ORIGIN_H +#define LLVM_CLANG_TOOLS_EXTRA_CLANGD_INDEX_SYMBOL_ORIGIN_H + +#include "llvm/Support/raw_ostream.h" +#include + +namespace clang { +namespace clangd { + +// Describes the source of information about a symbol. +// Mainly useful for debugging, e.g. understanding code completion reuslts. +// This is a bitfield as information can be combined from several sources. +enum class SymbolOrigin : uint8_t { + Unknown = 0, + AST = 1 << 0, // Directly from the AST (indexes should not set this). + Dynamic = 1 << 1, // From the dynamic index of opened files. + Static = 1 << 2, // From the static, externally-built index. + Merge = 1 << 3, // A non-trivial index merge was performed. + // Remaining bits reserved for index implementations. +}; + +inline SymbolOrigin operator|(SymbolOrigin A, SymbolOrigin B) { + return static_cast(static_cast(A) | + static_cast(B)); +} +inline SymbolOrigin &operator|=(SymbolOrigin &A, SymbolOrigin B) { + return A = A | B; +} +inline SymbolOrigin operator&(SymbolOrigin A, SymbolOrigin B) { + return static_cast(static_cast(A) & + static_cast(B)); +} + +llvm::raw_ostream &operator<<(llvm::raw_ostream &, SymbolOrigin); + +} // namespace clangd +} // namespace clang + +#endif // LLVM_CLANG_TOOLS_EXTRA_CLANGD_INDEX_SYMBOL_ORIGIN_H diff --git a/clang-tools-extra/clangd/index/YAMLSerialization.cpp b/clang-tools-extra/clangd/index/YAMLSerialization.cpp index 7aab39f4c76b0..84d6cd9983109 100644 --- a/clang-tools-extra/clangd/index/YAMLSerialization.cpp +++ b/clang-tools-extra/clangd/index/YAMLSerialization.cpp @@ -1,4 +1,4 @@ -//===--- SymbolYAML.cpp ------------------------------------------*- C++-*-===// +//===-- YAMLSerialization.cpp ------------------------------------*- C++-*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -14,6 +14,8 @@ #include "Index.h" #include "Serialization.h" +#include "SymbolLocation.h" +#include "SymbolOrigin.h" #include "Trace.h" #include "dex/Dex.h" #include "llvm/ADT/Optional.h" diff --git a/clang-tools-extra/clangd/index/dex/Dex.cpp b/clang-tools-extra/clangd/index/dex/Dex.cpp index b4db113629c9e..d767bb517c2b5 100644 --- a/clang-tools-extra/clangd/index/dex/Dex.cpp +++ b/clang-tools-extra/clangd/index/dex/Dex.cpp @@ -42,7 +42,6 @@ const Token RestrictedForCodeCompletion = // Returns the tokens which are given symbols's characteristics. For example, // trigrams and scopes. // FIXME(kbobyrev): Support more token types: -// * Types // * Namespace proximity std::vector generateSearchTokens(const Symbol &Sym) { std::vector Result = generateIdentifierTrigrams(Sym.Name); @@ -54,49 +53,11 @@ std::vector generateSearchTokens(const Symbol &Sym) { Result.emplace_back(Token::Kind::ProximityURI, ProximityURI); if (Sym.Flags & Symbol::IndexedForCodeCompletion) Result.emplace_back(RestrictedForCodeCompletion); + if (!Sym.Type.empty()) + Result.emplace_back(Token::Kind::Type, Sym.Type); return Result; } -// Constructs BOOST iterators for Path Proximities. -std::unique_ptr createFileProximityIterator( - llvm::ArrayRef ProximityPaths, - const llvm::DenseMap &InvertedIndex, - const Corpus &Corpus) { - std::vector> BoostingIterators; - // Deduplicate parent URIs extracted from the ProximityPaths. - llvm::StringSet<> ParentURIs; - llvm::StringMap Sources; - for (const auto &Path : ProximityPaths) { - Sources[Path] = SourceParams(); - auto PathURI = URI::create(Path); - const auto PathProximityURIs = generateProximityURIs(PathURI.toString()); - for (const auto &ProximityURI : PathProximityURIs) - ParentURIs.insert(ProximityURI); - } - // Use SymbolRelevanceSignals for symbol relevance evaluation: use defaults - // for all parameters except for Proximity Path distance signal. - SymbolRelevanceSignals PathProximitySignals; - // DistanceCalculator will find the shortest distance from ProximityPaths to - // any URI extracted from the ProximityPaths. - URIDistance DistanceCalculator(Sources); - PathProximitySignals.FileProximityMatch = &DistanceCalculator; - // Try to build BOOST iterator for each Proximity Path provided by - // ProximityPaths. Boosting factor should depend on the distance to the - // Proximity Path: the closer processed path is, the higher boosting factor. - for (const auto &ParentURI : ParentURIs.keys()) { - Token Tok(Token::Kind::ProximityURI, ParentURI); - const auto It = InvertedIndex.find(Tok); - if (It != InvertedIndex.end()) { - // FIXME(kbobyrev): Append LIMIT on top of every BOOST iterator. - PathProximitySignals.SymbolURI = ParentURI; - BoostingIterators.push_back(Corpus.boost( - It->second.iterator(&It->first), PathProximitySignals.evaluate())); - } - } - BoostingIterators.push_back(Corpus.all()); - return Corpus.unionOf(std::move(BoostingIterators)); -} - } // namespace void Dex::buildIndex() { @@ -141,6 +102,57 @@ std::unique_ptr Dex::iterator(const Token &Tok) const { : It->second.iterator(&It->first); } +// Constructs BOOST iterators for Path Proximities. +std::unique_ptr Dex::createFileProximityIterator( + llvm::ArrayRef ProximityPaths) const { + std::vector> BoostingIterators; + // Deduplicate parent URIs extracted from the ProximityPaths. + llvm::StringSet<> ParentURIs; + llvm::StringMap Sources; + for (const auto &Path : ProximityPaths) { + Sources[Path] = SourceParams(); + auto PathURI = URI::create(Path); + const auto PathProximityURIs = generateProximityURIs(PathURI.toString()); + for (const auto &ProximityURI : PathProximityURIs) + ParentURIs.insert(ProximityURI); + } + // Use SymbolRelevanceSignals for symbol relevance evaluation: use defaults + // for all parameters except for Proximity Path distance signal. + SymbolRelevanceSignals PathProximitySignals; + // DistanceCalculator will find the shortest distance from ProximityPaths to + // any URI extracted from the ProximityPaths. + URIDistance DistanceCalculator(Sources); + PathProximitySignals.FileProximityMatch = &DistanceCalculator; + // Try to build BOOST iterator for each Proximity Path provided by + // ProximityPaths. Boosting factor should depend on the distance to the + // Proximity Path: the closer processed path is, the higher boosting factor. + for (const auto &ParentURI : ParentURIs.keys()) { + // FIXME(kbobyrev): Append LIMIT on top of every BOOST iterator. + auto It = iterator(Token(Token::Kind::ProximityURI, ParentURI)); + if (It->kind() != Iterator::Kind::False) { + PathProximitySignals.SymbolURI = ParentURI; + BoostingIterators.push_back( + Corpus.boost(std::move(It), PathProximitySignals.evaluate())); + } + } + BoostingIterators.push_back(Corpus.all()); + return Corpus.unionOf(std::move(BoostingIterators)); +} + +// Constructs BOOST iterators for preferred types. +std::unique_ptr +Dex::createTypeBoostingIterator(llvm::ArrayRef Types) const { + std::vector> BoostingIterators; + SymbolRelevanceSignals PreferredTypeSignals; + PreferredTypeSignals.TypeMatchesPreferred = true; + auto Boost = PreferredTypeSignals.evaluate(); + for (const auto &T : Types) + BoostingIterators.push_back( + Corpus.boost(iterator(Token(Token::Kind::Type, T)), Boost)); + BoostingIterators.push_back(Corpus.all()); + return Corpus.unionOf(std::move(BoostingIterators)); +} + /// Constructs iterators over tokens extracted from the query and exhausts it /// while applying Callback to each symbol in the order of decreasing quality /// of the matched symbols. @@ -174,8 +186,9 @@ bool Dex::fuzzyFind(const FuzzyFindRequest &Req, Criteria.push_back(Corpus.unionOf(move(ScopeIterators))); // Add proximity paths boosting (all symbols, some boosted). - Criteria.push_back( - createFileProximityIterator(Req.ProximityPaths, InvertedIndex, Corpus)); + Criteria.push_back(createFileProximityIterator(Req.ProximityPaths)); + // Add boosting for preferred types. + Criteria.push_back(createTypeBoostingIterator(Req.PreferredTypes)); if (Req.RestrictForCodeCompletion) Criteria.push_back(iterator(RestrictedForCodeCompletion)); diff --git a/clang-tools-extra/clangd/index/dex/Dex.h b/clang-tools-extra/clangd/index/dex/Dex.h index 71814e433c149..fb80ca0391f03 100644 --- a/clang-tools-extra/clangd/index/dex/Dex.h +++ b/clang-tools-extra/clangd/index/dex/Dex.h @@ -77,6 +77,10 @@ class Dex : public SymbolIndex { private: void buildIndex(); std::unique_ptr iterator(const Token &Tok) const; + std::unique_ptr + createFileProximityIterator(llvm::ArrayRef ProximityPaths) const; + std::unique_ptr + createTypeBoostingIterator(llvm::ArrayRef Types) const; /// Stores symbols sorted in the descending order of symbol quality.. std::vector Symbols; diff --git a/clang-tools-extra/clangd/index/dex/Token.h b/clang-tools-extra/clangd/index/dex/Token.h index 4c67e9fab1557..37859bcf1f287 100644 --- a/clang-tools-extra/clangd/index/dex/Token.h +++ b/clang-tools-extra/clangd/index/dex/Token.h @@ -62,11 +62,11 @@ struct Token { /// Example: "file:///path/to/clang-tools-extra/clangd/index/SymbolIndex.h" /// and some amount of its parents. ProximityURI, + /// Type of symbol (see `Symbol::Type`). + Type, /// Internal Token type for invalid/special tokens, e.g. empty tokens for /// llvm::DenseMap. Sentinel, - /// FIXME(kbobyrev): Add other Token Kinds - /// * Type with qualified type name or its USR }; Token(Kind TokenKind, llvm::StringRef Data) @@ -91,6 +91,9 @@ struct Token { case Kind::ProximityURI: OS << "U="; break; + case Kind::Type: + OS << "Ty="; + break; case Kind::Sentinel: OS << "?="; break; diff --git a/clang-tools-extra/clangd/indexer/IndexerMain.cpp b/clang-tools-extra/clangd/indexer/IndexerMain.cpp index 1621e8f9c5903..de29fc360a985 100644 --- a/clang-tools-extra/clangd/indexer/IndexerMain.cpp +++ b/clang-tools-extra/clangd/indexer/IndexerMain.cpp @@ -10,10 +10,11 @@ // //===----------------------------------------------------------------------===// -#include "index/Index.h" #include "index/IndexAction.h" #include "index/Merge.h" +#include "index/Ref.h" #include "index/Serialization.h" +#include "index/Symbol.h" #include "index/SymbolCollector.h" #include "clang/Tooling/CommonOptionsParser.h" #include "clang/Tooling/Execution.h" diff --git a/clang-tools-extra/clangd/refactor/Tweak.h b/clang-tools-extra/clangd/refactor/Tweak.h index 94164bc7ba13b..35c3ce8a93c25 100644 --- a/clang-tools-extra/clangd/refactor/Tweak.h +++ b/clang-tools-extra/clangd/refactor/Tweak.h @@ -56,8 +56,8 @@ class Tweak { /// defining the Tweak. Definition is provided automatically by /// REGISTER_TWEAK. virtual const char *id() const = 0; - /// Run the first stage of the action. The non-None result indicates that the - /// action is available and should be shown to the user. Returns None if the + /// Run the first stage of the action. Returns true indicating that the + /// action is available and should be shown to the user. Returns false if the /// action is not available. /// This function should be fast, if the action requires non-trivial work it /// should be moved into 'apply'. diff --git a/clang-tools-extra/clangd/tool/ClangdMain.cpp b/clang-tools-extra/clangd/tool/ClangdMain.cpp index 69732ebff4fb1..53f7264e565bd 100644 --- a/clang-tools-extra/clangd/tool/ClangdMain.cpp +++ b/clang-tools-extra/clangd/tool/ClangdMain.cpp @@ -31,7 +31,7 @@ namespace clangd { static llvm::cl::opt UseDex("use-dex-index", llvm::cl::desc("Use experimental Dex dynamic index."), - llvm::cl::init(false), llvm::cl::Hidden); + llvm::cl::init(true), llvm::cl::Hidden); static llvm::cl::opt CompileCommandsDir( "compile-commands-dir", @@ -163,7 +163,7 @@ static llvm::cl::opt IndexFile( "index-file", llvm::cl::desc( "Index file to build the static index. The file must have been created " - "by a compatible clangd-index.\n" + "by a compatible clangd-indexer.\n" "WARNING: This option is experimental only, and will be removed " "eventually. Don't rely on it."), llvm::cl::init(""), llvm::cl::Hidden); @@ -203,15 +203,21 @@ static llvm::cl::opt EnableFunctionArgSnippets( static llvm::cl::opt ClangTidyChecks( "clang-tidy-checks", - llvm::cl::desc("List of clang-tidy checks to run (this will override " - ".clang-tidy files)"), + llvm::cl::desc( + "List of clang-tidy checks to run (this will override " + ".clang-tidy files). Only meaningful when -clang-tidy flag is on."), llvm::cl::init("")); +static llvm::cl::opt EnableClangTidy( + "clang-tidy", + llvm::cl::desc("Enable clang-tidy diagnostics."), + llvm::cl::init(false)); + static llvm::cl::opt SuggestMissingIncludes( "suggest-missing-includes", llvm::cl::desc("Attempts to fix diagnostic errors caused by missing " "includes using index."), - llvm::cl::init(false)); + llvm::cl::init(true)); namespace { @@ -441,13 +447,16 @@ int main(int argc, char *argv[]) { } // Create an empty clang-tidy option. - auto OverrideClangTidyOptions = tidy::ClangTidyOptions::getDefaults(); - OverrideClangTidyOptions.Checks = ClangTidyChecks; - tidy::FileOptionsProvider ClangTidyOptProvider( - tidy::ClangTidyGlobalOptions(), - /* Default */ tidy::ClangTidyOptions::getDefaults(), - /* Override */ OverrideClangTidyOptions, FSProvider.getFileSystem()); - Opts.ClangTidyOptProvider = &ClangTidyOptProvider; + std::unique_ptr ClangTidyOptProvider; + if (EnableClangTidy) { + auto OverrideClangTidyOptions = tidy::ClangTidyOptions::getDefaults(); + OverrideClangTidyOptions.Checks = ClangTidyChecks; + ClangTidyOptProvider = llvm::make_unique( + tidy::ClangTidyGlobalOptions(), + /* Default */ tidy::ClangTidyOptions::getDefaults(), + /* Override */ OverrideClangTidyOptions, FSProvider.getFileSystem()); + } + Opts.ClangTidyOptProvider = ClangTidyOptProvider.get(); Opts.SuggestMissingIncludes = SuggestMissingIncludes; ClangdLSPServer LSPServer( *TransportLayer, FSProvider, CCOpts, CompileCommandsDirPath, diff --git a/clang-tools-extra/clangd/xpc/CMakeLists.txt b/clang-tools-extra/clangd/xpc/CMakeLists.txt index 788a66f5abfd4..f05767c86b21b 100644 --- a/clang-tools-extra/clangd/xpc/CMakeLists.txt +++ b/clang-tools-extra/clangd/xpc/CMakeLists.txt @@ -20,10 +20,10 @@ set(LLVM_OPTIONAL_SOURCES Conversion.cpp XPCTransport.cpp) add_clang_library(clangdXpcJsonConversions Conversion.cpp + LINK_LIBS clangDaemon ) add_clang_library(clangdXpcTransport XPCTransport.cpp - DEPENDS clangdXpcJsonConversions - LINK_LIBS clangdXpcJsonConversions + LINK_LIBS clangDaemon clangdXpcJsonConversions ) diff --git a/clang-tools-extra/clangd/xpc/framework/ClangdXPC.cpp b/clang-tools-extra/clangd/xpc/framework/ClangdXPC.cpp index 6c68f5cdbb772..3b86164ec153f 100644 --- a/clang-tools-extra/clangd/xpc/framework/ClangdXPC.cpp +++ b/clang-tools-extra/clangd/xpc/framework/ClangdXPC.cpp @@ -1,3 +1,10 @@ +//===-- ClangdXPC.cpp --------------------------------------------*- C++-*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// /// Returns the bundle identifier of the Clangd XPC service. extern "C" const char *clangd_xpc_get_bundle_identifier() { diff --git a/clang-tools-extra/clangd/xpc/test-client/ClangdXPCTestClient.cpp b/clang-tools-extra/clangd/xpc/test-client/ClangdXPCTestClient.cpp index da204a6925aca..06ecddecc5f76 100644 --- a/clang-tools-extra/clangd/xpc/test-client/ClangdXPCTestClient.cpp +++ b/clang-tools-extra/clangd/xpc/test-client/ClangdXPCTestClient.cpp @@ -1,3 +1,11 @@ +//===-- ClangdXPCTestClient.cpp ----------------------------------*- C++-*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + #include "xpc/Conversion.h" #include "clang/Basic/LLVM.h" #include "llvm/ADT/SmallString.h" diff --git a/clang-tools-extra/docs/README.txt b/clang-tools-extra/docs/README.txt index 4b60777583017..cebbf63bcd6a7 100644 --- a/clang-tools-extra/docs/README.txt +++ b/clang-tools-extra/docs/README.txt @@ -1,11 +1,10 @@ -------------------------------------------------------------- -Documentation for the tools of clang-tools-extra repo project -------------------------------------------------------------- +---------------------------------- +Documentation in clang-tools-extra +---------------------------------- -Sphinx and doxygen documentation is generated by executing make. +To generate documentation in HTML format from files in clang-tools-extra/docs, +build the docs-clang-tools-html target. -Sphinx html files can be generated separately using make html. +To generate documentation from the source code using Doxygen, build the +doxygen-clang-tools target. -Doxygen html files can also be generated using make doxygen. - -The generated documentation will be placed in _build/html. diff --git a/clang-tools-extra/docs/ReleaseNotes.rst b/clang-tools-extra/docs/ReleaseNotes.rst index 1f6889ac4a2ac..3d3edef360022 100644 --- a/clang-tools-extra/docs/ReleaseNotes.rst +++ b/clang-tools-extra/docs/ReleaseNotes.rst @@ -79,6 +79,18 @@ Improvements to clang-tidy Checks for casts of ``absl::Duration`` conversion functions, and recommends the right conversion function instead. +- New :doc:`abseil-duration-unnecessary-conversion + ` check. + + Finds and fixes cases where ``absl::Duration`` values are being converted to + numeric types and back again. + +- New :doc:`abseil-time-subtraction + ` check. + + Finds and fixes ``absl::Time`` subtraction expressions to do subtraction + in the Time domain instead of the numeric domain. + - New :doc:`google-readability-avoid-underscore-in-googletest-name ` check. @@ -86,6 +98,25 @@ Improvements to clang-tidy Checks whether there are underscores in googletest test and test case names in test macros, which is prohibited by the Googletest FAQ. +- New alias :doc:`cppcoreguidelines-explicit-virtual-functions + ` to + :doc:`modernize-use-override + ` was added. + +- The :doc:`bugprone-argument-comment + ` now supports + `CommentBoolLiterals`, `CommentIntegerLiterals`, `CommentFloatLiterals`, + `CommentUserDefiniedLiterals`, `CommentStringLiterals`, + `CommentCharacterLiterals` & `CommentNullPtrs` options. + +- The `Acronyms` and `IncludeDefaultAcronyms` options for the + :doc:`objc-property-declaration ` + check have been removed. + +- The :doc:`modernize-use-override + ` now supports `OverrideSpelling` + and `FinalSpelling` options. + Improvements to include-fixer ----------------------------- diff --git a/clang-tools-extra/docs/_static/clang-tools-extra-styles.css b/clang-tools-extra/docs/_static/clang-tools-extra-styles.css new file mode 100644 index 0000000000000..1a6cd710e483a --- /dev/null +++ b/clang-tools-extra/docs/_static/clang-tools-extra-styles.css @@ -0,0 +1,23 @@ +details { + background-color: rgba(50, 150, 220, 0.08); + margin-bottom: 0.5em; + padding: 0 1em; + overflow-y: hidden; /* Suppress margin-collapsing */ +} +details[open] { + border-bottom: 1px solid rgba(0, 0, 128, 0.2); + margin-bottom: 1em; +} +details summary { + font-weight: bold; + background-color: rgba(50, 150, 220, 0.1); + border-color: rgba(0, 0, 128, 0.2); + border-width: 1px; + border-style: solid none; + padding: 0.2em; + margin: 0 -1em; +} +details summary:hover { + background-color: rgba(50, 150, 220, 0.2); + cursor: pointer; +} diff --git a/clang-tools-extra/docs/_templates/layout.html b/clang-tools-extra/docs/_templates/layout.html new file mode 100644 index 0000000000000..b4f5b4e1ebd0d --- /dev/null +++ b/clang-tools-extra/docs/_templates/layout.html @@ -0,0 +1,3 @@ +{% extends "!layout.html" %} + +{% set css_files = css_files + ['_static/clang-tools-extra-styles.css'] %} diff --git a/clang-tools-extra/docs/clang-tidy/checks/abseil-duration-subtraction.rst b/clang-tools-extra/docs/clang-tidy/checks/abseil-duration-subtraction.rst index 884eeb2cbede3..b570931b92b01 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/abseil-duration-subtraction.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/abseil-duration-subtraction.rst @@ -21,7 +21,6 @@ Examples: // Suggestion - Subtraction in the absl::Duration domain instead double result = absl::ToDoubleSeconds(d - absl::Seconds(x)); - // Original - Subtraction of two Durations in the double domain absl::Duration d1, d2; double result = absl::ToDoubleSeconds(d1) - absl::ToDoubleSeconds(d2); @@ -29,6 +28,7 @@ Examples: // Suggestion - Subtraction in the absl::Duration domain instead double result = absl::ToDoubleSeconds(d1 - d2); + Note: As with other ``clang-tidy`` checks, it is possible that multiple fixes may overlap (as in the case of nested expressions), so not all occurences can be transformed in one run. In particular, this may occur for nested subtraction diff --git a/clang-tools-extra/docs/clang-tidy/checks/abseil-duration-unnecessary-conversion.rst b/clang-tools-extra/docs/clang-tidy/checks/abseil-duration-unnecessary-conversion.rst new file mode 100644 index 0000000000000..938c46d5affdc --- /dev/null +++ b/clang-tools-extra/docs/clang-tidy/checks/abseil-duration-unnecessary-conversion.rst @@ -0,0 +1,31 @@ +.. title:: clang-tidy - abseil-duration-unnecessary-conversion + +abseil-duration-unnecessary-conversion +====================================== + +Finds and fixes cases where ``absl::Duration`` values are being converted to +numeric types and back again. + +Examples: + +.. code-block:: c++ + + // Original - Conversion to double and back again + absl::Duration d1; + absl::Duration d2 = absl::Seconds(absl::ToDoubleSeconds(d1)); + + // Suggestion - Remove unnecessary conversions + absl::Duration d2 = d1; + + + // Original - Conversion to integer and back again + absl::Duration d1; + absl::Duration d2 = absl::Hours(absl::ToInt64Hours(d1)); + + // Suggestion - Remove unnecessary conversions + absl::Duration d2 = d1; + +Note: Converting to an integer and back to an ``absl::Duration`` might be a +truncating operation if the value is not aligned to the scale of conversion. +In the rare case where this is the intended result, callers should use +``absl::Trunc`` to truncate explicitly. diff --git a/clang-tools-extra/docs/clang-tidy/checks/abseil-time-subtraction.rst b/clang-tools-extra/docs/clang-tidy/checks/abseil-time-subtraction.rst new file mode 100644 index 0000000000000..196c07362ffc4 --- /dev/null +++ b/clang-tools-extra/docs/clang-tidy/checks/abseil-time-subtraction.rst @@ -0,0 +1,39 @@ +.. title:: clang-tidy - abseil-time-subtraction + +abseil-time-subtraction +======================= + +Finds and fixes ``absl::Time`` subtraction expressions to do subtraction +in the Time domain instead of the numeric domain. + +There are two cases of Time subtraction in which deduce additional type +information: + +- When the result is an ``absl::Duration`` and the first argument is an + ``absl::Time``. +- When the second argument is a ``absl::Time``. + +In the first case, we must know the result of the operation, since without that +the second operand could be either an ``absl::Time`` or an ``absl::Duration``. +In the second case, the first operand *must* be an ``absl::Time``, because +subtracting an ``absl::Time`` from an ``absl::Duration`` is not defined. + +Examples: + +.. code-block:: c++ + + int x; + absl::Time t; + + // Original - absl::Duration result and first operand is a absl::Time. + absl::Duration d = absl::Seconds(absl::ToUnixSeconds(t) - x); + + // Suggestion - Perform subtraction in the Time domain instead. + absl::Duration d = t - absl::FromUnixSeconds(x); + + + // Original - Second operand is an absl::Time. + int i = x - absl::ToUnixSeconds(t); + + // Suggestion - Perform subtraction in the Time domain instead. + int i = absl::ToInt64Seconds(absl::FromUnixSeconds(x) - t); diff --git a/clang-tools-extra/docs/clang-tidy/checks/bugprone-argument-comment.rst b/clang-tools-extra/docs/clang-tidy/checks/bugprone-argument-comment.rst index 5f7e5f0d5a9b2..afc12186c99d7 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/bugprone-argument-comment.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/bugprone-argument-comment.rst @@ -27,3 +27,158 @@ Options When zero (default value), the check will ignore leading and trailing underscores and case when comparing names -- otherwise they are taken into account. + +.. option:: CommentBoolLiterals + + When true, the check will add argument comments in the format + ``/*ParameterName=*/`` right before the boolean literal argument. + +Before: + +.. code-block:: c++ + + void foo(bool TurnKey, bool PressButton); + + foo(true, false); + +After: + +.. code-block:: c++ + + void foo(bool TurnKey, bool PressButton); + + foo(/*TurnKey=*/true, /*PressButton=*/false); + +.. option:: CommentIntegerLiterals + + When true, the check will add argument comments in the format + ``/*ParameterName=*/`` right before the integer literal argument. + +Before: + +.. code-block:: c++ + + void foo(int MeaningOfLife); + + foo(42); + +After: + +.. code-block:: c++ + + void foo(int MeaningOfLife); + + foo(/*MeaningOfLife=*/42); + +.. option:: CommentFloatLiterals + + When true, the check will add argument comments in the format + ``/*ParameterName=*/`` right before the float/double literal argument. + +Before: + +.. code-block:: c++ + + void foo(float Pi); + + foo(3.14159); + +After: + +.. code-block:: c++ + + void foo(float Pi); + + foo(/*Pi=*/3.14159); + +.. option:: CommentStringLiterals + + When true, the check will add argument comments in the format + ``/*ParameterName=*/`` right before the string literal argument. + +Before: + +.. code-block:: c++ + + void foo(const char *String); + void foo(const wchar_t *WideString); + + foo("Hello World"); + foo(L"Hello World"); + +After: + +.. code-block:: c++ + + void foo(const char *String); + void foo(const wchar_t *WideString); + + foo(/*String=*/"Hello World"); + foo(/*WideString=*/L"Hello World"); + +.. option:: CommentCharacterLiterals + + When true, the check will add argument comments in the format + ``/*ParameterName=*/`` right before the character literal argument. + +Before: + +.. code-block:: c++ + + void foo(char *Character); + + foo('A'); + +After: + +.. code-block:: c++ + + void foo(char *Character); + + foo(/*Character=*/'A'); + +.. option:: CommentUserDefinedLiterals + + When true, the check will add argument comments in the format + ``/*ParameterName=*/`` right before the user defined literal argument. + +Before: + +.. code-block:: c++ + + void foo(double Distance); + + double operator"" _km(long double); + + foo(402.0_km); + +After: + +.. code-block:: c++ + + void foo(double Distance); + + double operator"" _km(long double); + + foo(/*Distance=*/402.0_km); + +.. option:: CommentNullPtrs + + When true, the check will add argument comments in the format + ``/*ParameterName=*/`` right before the nullptr literal argument. + +Before: + +.. code-block:: c++ + + void foo(A* Value); + + foo(nullptr); + +After: + +.. code-block:: c++ + + void foo(A* Value); + + foo(/*Value=*/nullptr); diff --git a/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines-explicit-virtual-functions.rst b/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines-explicit-virtual-functions.rst new file mode 100644 index 0000000000000..87a8fe2df409d --- /dev/null +++ b/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines-explicit-virtual-functions.rst @@ -0,0 +1,10 @@ +.. title:: clang-tidy - cppcoreguidelines-explicit-virtual-functions +.. meta:: + :http-equiv=refresh: 5;URL=modernize-use-override.html + +cppcoreguidelines-explicit-virtual-functions +============================================ + +The cppcoreguidelines-explicit-virtual-functions check is an alias, please see +`modernize-use-override `_ +for more information. diff --git a/clang-tools-extra/docs/clang-tidy/checks/list.rst b/clang-tools-extra/docs/clang-tidy/checks/list.rst index 487f682884486..353ea3762cc12 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/list.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/list.rst @@ -11,12 +11,14 @@ Clang-Tidy Checks abseil-duration-factory-float abseil-duration-factory-scale abseil-duration-subtraction + abseil-duration-unnecessary-conversion abseil-faster-strsplit-delimiter abseil-no-internal-dependencies abseil-no-namespace abseil-redundant-strcat-calls abseil-str-cat-append abseil-string-find-startswith + abseil-time-subtraction abseil-upgrade-duration-conversions android-cloexec-accept android-cloexec-accept4 @@ -97,6 +99,7 @@ Clang-Tidy Checks cppcoreguidelines-avoid-goto cppcoreguidelines-avoid-magic-numbers (redirects to readability-magic-numbers) cppcoreguidelines-c-copy-assignment-signature (redirects to misc-unconventional-assign-operator) + cppcoreguidelines-explicit-virtual-functions (redirects to modernize-use-override) cppcoreguidelines-interfaces-global-init cppcoreguidelines-macro-usage cppcoreguidelines-narrowing-conversions diff --git a/clang-tools-extra/docs/clang-tidy/checks/modernize-avoid-c-arrays.rst b/clang-tools-extra/docs/clang-tidy/checks/modernize-avoid-c-arrays.rst index 8f856a524b2d5..d7bc7474e27f8 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/modernize-avoid-c-arrays.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/modernize-avoid-c-arrays.rst @@ -54,3 +54,7 @@ such headers between C code, and C++ code. } } + +Similarly, the ``main()`` function is ignored. Its second and third parameters +can be either ``char* argv[]`` or ``char** argv``, but can not be +``std::array<>``. diff --git a/clang-tools-extra/docs/clang-tidy/checks/modernize-use-override.rst b/clang-tools-extra/docs/clang-tidy/checks/modernize-use-override.rst index f2c778aaae17c..4273c6e57708e 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/modernize-use-override.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/modernize-use-override.rst @@ -3,5 +3,42 @@ modernize-use-override ====================== +Adds ``override`` (introduced in C++11) to overridden virtual functions and +removes ``virtual`` from those functions as it is not required. -Use C++11's ``override`` and remove ``virtual`` where applicable. +``virtual`` on non base class implementations was used to help indiciate to the +user that a function was virtual. C++ compilers did not use the presence of +this to signify an overriden function. + +In C++ 11 ``override`` and ``final`` keywords were introduced to allow +overridden functions to be marked appropriately. Their presence allows +compilers to verify that an overridden function correctly overrides a base +class implementation. + +This can be useful as compilers can generate a compile time error when: + + - The base class implementation function signature changes. + - The user has not created the override with the correct signature. + +Options +------- + +.. option:: IgnoreDestructors + + If set to non-zero, this check will not diagnose destructors. Default is `0`. + +.. option:: OverrideSpelling + + Specifies a macro to use instead of ``override``. This is useful when + maintaining source code that also needs to compile with a pre-C++11 + compiler. + +.. option:: FinalSpelling + + Specifies a macro to use instead of ``final``. This is useful when + maintaining source code that also needs to compile with a pre-C++11 + compiler. + +.. note:: + + For more information on the use of ``override`` see https://en.cppreference.com/w/cpp/language/override diff --git a/clang-tools-extra/docs/clang-tidy/checks/objc-property-declaration.rst b/clang-tools-extra/docs/clang-tidy/checks/objc-property-declaration.rst index 49df51020965d..60b9c82e9f926 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/objc-property-declaration.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/objc-property-declaration.rst @@ -40,15 +40,3 @@ lowercase letters followed by a '_' to avoid naming conflict. For example: @property(nonatomic, assign) int abc_lowerCamelCase; The corresponding style rule: https://developer.apple.com/library/content/qa/qa1908/_index.html - - -Options -------- - -.. option:: Acronyms - - This option is deprecated and ignored. - -.. option:: IncludeDefaultAcronyms - - This option is deprecated and ignored. diff --git a/clang-tools-extra/docs/clang-tidy/index.rst b/clang-tools-extra/docs/clang-tidy/index.rst index 720c581d463ec..12a32dfbd8818 100644 --- a/clang-tools-extra/docs/clang-tidy/index.rst +++ b/clang-tools-extra/docs/clang-tidy/index.rst @@ -262,25 +262,47 @@ Suppressing Undesired Diagnostics :program:`clang-tidy` diagnostics are intended to call out code that does not adhere to a coding standard, or is otherwise problematic in some way. However, -if it is known that the code is correct, the check-specific ways to silence the -diagnostics could be used, if they are available (e.g. bugprone-use-after-move -can be silenced by re-initializing the variable after it has been moved out, -bugprone-string-integer-assignment can be suppressed by explicitly casting the -integer to ``char``, readability-implicit-bool-conversion can also be suppressed -by using explicit casts, etc.). If they are not available or if changing the -semantics of the code is not desired, the ``NOLINT`` or ``NOLINTNEXTLINE`` -comments can be used instead. For example: +if the code is known to be correct, it may be useful to silence the warning. +Some clang-tidy checks provide a check-specific way to silence the diagnostics, +e.g. `bugprone-use-after-move `_ can be +silenced by re-initializing the variable after it has been moved out, +`bugprone-string-integer-assignment +`_ can be suppressed by +explicitly casting the integer to ``char``, +`readability-implicit-bool-conversion +`_ can also be suppressed by +using explicit casts, etc. + +If a specific suppression mechanism is not available for a certain warning, or +its use is not desired for some reason, :program:`clang-tidy` has a generic +mechanism to suppress diagnostics using ``NOLINT`` or ``NOLINTNEXTLINE`` +comments. + +The ``NOLINT`` comment instructs :program:`clang-tidy` to ignore warnings on the +*same line* (it doesn't apply to a function, a block of code or any other +language construct, it applies to the line of code it is on). If introducing the +comment in the same line would change the formatting in undesired way, the +``NOLINTNEXTLINE`` comment allows to suppress clang-tidy warnings on the *next +line*. + +Both comments can be followed by an optional list of check names in parentheses +(see below for the formal syntax). + +For example: .. code-block:: c++ class Foo { - // Silent all the diagnostics for the line + // Suppress all the diagnostics for the line Foo(int param); // NOLINT - // Silent only the specified checks for the line + // Consider explaining the motivation to suppress the warning. + Foo(char param); // NOLINT: Allow implicit conversion from `char`, because . + + // Silence only the specified checks for the line Foo(double param); // NOLINT(google-explicit-constructor, google-runtime-int) - // Silent only the specified diagnostics for the next line + // Silence only the specified diagnostics for the next line // NOLINTNEXTLINE(google-explicit-constructor, google-runtime-int) Foo(bool param); }; diff --git a/clang-tools-extra/docs/clangd.rst b/clang-tools-extra/docs/clangd.rst index 84696e3bb8dbb..768c5da5e2960 100644 --- a/clang-tools-extra/docs/clangd.rst +++ b/clang-tools-extra/docs/clangd.rst @@ -1,161 +1,3 @@ -============ -Clangd -============ +:orphan: -.. contents:: - -.. toctree:: - :maxdepth: 1 - -:program:`Clangd` is an implementation of the `Language Server Protocol -`_ leveraging Clang. -Clangd's goal is to provide language "smartness" features like code completion, -find references, etc. for clients such as C/C++ Editors. - -Using Clangd -================== - -:program:`Clangd` is not meant to be used by C/C++ developers directly but -rather from a client implementing the protocol. A client would be typically -implemented in an IDE or an editor. - -At the moment, `Visual Studio Code `_ is mainly -used in order to test :program:`Clangd` but more clients are likely to make -use of :program:`Clangd` in the future as it matures and becomes a production -quality tool. If you are interested in trying :program:`Clangd` in combination -with Visual Studio Code, you can start by `installing Clangd`_ or -`building Clangd`_, then open Visual Studio Code in the clangd-vscode folder and -launch the extension. - -Installing Clangd -================== - -Packages are available for debian-based distributions, see the `LLVM packages -page `_. :program:`Clangd` is included in the -`clang-tools` package. -However, it is a good idea to check your distribution's packaging system first -as it might already be available. - -Otherwise, you can install :program:`Clangd` by `building Clangd`_ first. - -Building Clangd -================== - -You can follow the instructions for `building Clang -`_ but "extra Clang tools" is **not** -optional. - -Current Status -================== - -Many features could be implemented in :program:`Clangd`. -Here is a list of features that could be useful with the status of whether or -not they are already implemented in :program:`Clangd` and specified in the -Language Server Protocol. Note that for some of the features, it is not clear -whether or not they should be part of the Language Server Protocol, so those -features might be eventually developed outside :program:`Clangd` or as an -extension to the protocol. - -+-------------------------------------+------------+----------+ -| C/C++ Editor feature | LSP | Clangd | -+=====================================+============+==========+ -| Formatting | Yes | Yes | -+-------------------------------------+------------+----------+ -| Completion | Yes | Yes | -+-------------------------------------+------------+----------+ -| Diagnostics | Yes | Yes | -+-------------------------------------+------------+----------+ -| Fix-its | Yes | Yes | -+-------------------------------------+------------+----------+ -| Go to Definition | Yes | Yes | -+-------------------------------------+------------+----------+ -| Signature Help | Yes | Yes | -+-------------------------------------+------------+----------+ -| Document Highlights | Yes | Yes | -+-------------------------------------+------------+----------+ -| Rename | Yes | Yes | -+-------------------------------------+------------+----------+ -| Source hover | Yes | Yes | -+-------------------------------------+------------+----------+ -| Find References | Yes | No | -+-------------------------------------+------------+----------+ -| Code Lens | Yes | No | -+-------------------------------------+------------+----------+ -| Document Symbols | Yes | Yes | -+-------------------------------------+------------+----------+ -| Workspace Symbols | Yes | Yes | -+-------------------------------------+------------+----------+ -| Syntax and Semantic Coloring | No | No | -+-------------------------------------+------------+----------+ -| Code folding | No | No | -+-------------------------------------+------------+----------+ -| Call hierarchy | No | No | -+-------------------------------------+------------+----------+ -| Type hierarchy | No | No | -+-------------------------------------+------------+----------+ -| Organize Includes | No | No | -+-------------------------------------+------------+----------+ -| Quick Assist | No | No | -+-------------------------------------+------------+----------+ -| Extract Local Variable | No | No | -+-------------------------------------+------------+----------+ -| Extract Function/Method | No | No | -+-------------------------------------+------------+----------+ -| Hide Method | No | No | -+-------------------------------------+------------+----------+ -| Implement Method | No | No | -+-------------------------------------+------------+----------+ -| Gen. Getters/Setters | No | No | -+-------------------------------------+------------+----------+ - -Editor Integration -================== - -Any full-featured Language Server Protocol Client implementation should work -with :program:`Clangd`. This `list -`_ contains information about -extensions and plugins that are known to work for different editors. - -Vim Integration ---------------- - -LanguageClient-neovim -~~~~~~~~~~~~~~~~~~~~~ - -One of the options of using :program:`Clangd` in :program:`vim` (or -:program:`nvim`) is to utilize `LanguageClient-neovim -`_ plugin. Please see the -`Clangd Wiki page -`_ for -instructions. - -VSCode Integration ------------------- - -:program:`VSCode` provides `vscode-clangd -`_ -which is published in Visual Studio Marketplace and can be installed direcetly -from :program:`VSCode`. - -Emacs Integration ------------------ - -:program:`Emacs` provides `lsp-mode `_ and -`Eglot `_ plugins for LSP integration. - -Getting Involved -================== - -A good place for interested contributors is the `Clangd developer mailing list -`_. For discussions with the -broader community on topics not only related to Clangd, use -`Clang developer mailing list -`_. -If you're also interested in contributing patches to :program:`Clangd`, take a -look at the `LLVM Developer Policy -`_ and `Code Reviews -`_ page. Contributions of new features -to the `Language Server Protocol -`_ itself would also be -very useful, so that :program:`Clangd` can eventually implement them in a -conforming way. +All :program:`clangd` documentation was moved to the :doc:`clangd/index` pages. diff --git a/clang-tools-extra/docs/clangd/ApplyClangTidyFixInVSCode.gif b/clang-tools-extra/docs/clangd/ApplyClangTidyFixInVSCode.gif new file mode 100644 index 0000000000000..b07bdeb437df2 Binary files /dev/null and b/clang-tools-extra/docs/clangd/ApplyClangTidyFixInVSCode.gif differ diff --git a/clang-tools-extra/docs/clangd/ApplyFixInVSCode.gif b/clang-tools-extra/docs/clangd/ApplyFixInVSCode.gif new file mode 100644 index 0000000000000..929a98c31798e Binary files /dev/null and b/clang-tools-extra/docs/clangd/ApplyFixInVSCode.gif differ diff --git a/clang-tools-extra/docs/clangd/CodeCompletionInEmacsCompanyMode.png b/clang-tools-extra/docs/clangd/CodeCompletionInEmacsCompanyMode.png new file mode 100644 index 0000000000000..1accc5af57713 Binary files /dev/null and b/clang-tools-extra/docs/clangd/CodeCompletionInEmacsCompanyMode.png differ diff --git a/clang-tools-extra/docs/clangd/CodeCompletionInSublimeText.png b/clang-tools-extra/docs/clangd/CodeCompletionInSublimeText.png new file mode 100644 index 0000000000000..b09fed3bdfa26 Binary files /dev/null and b/clang-tools-extra/docs/clangd/CodeCompletionInSublimeText.png differ diff --git a/clang-tools-extra/docs/clangd/CodeCompletionInVSCode.png b/clang-tools-extra/docs/clangd/CodeCompletionInVSCode.png new file mode 100644 index 0000000000000..bc42e9dd73216 Binary files /dev/null and b/clang-tools-extra/docs/clangd/CodeCompletionInVSCode.png differ diff --git a/clang-tools-extra/docs/clangd/CodeCompletionInYCM.png b/clang-tools-extra/docs/clangd/CodeCompletionInYCM.png new file mode 100644 index 0000000000000..b74508d6dfaf7 Binary files /dev/null and b/clang-tools-extra/docs/clangd/CodeCompletionInYCM.png differ diff --git a/clang-tools-extra/docs/clangd/CodeCompletionInsertsNamespaceQualifiersInVSCode.gif b/clang-tools-extra/docs/clangd/CodeCompletionInsertsNamespaceQualifiersInVSCode.gif new file mode 100644 index 0000000000000..f0d49d630787c Binary files /dev/null and b/clang-tools-extra/docs/clangd/CodeCompletionInsertsNamespaceQualifiersInVSCode.gif differ diff --git a/clang-tools-extra/docs/clangd/DeveloperDocumentation.rst b/clang-tools-extra/docs/clangd/DeveloperDocumentation.rst new file mode 100644 index 0000000000000..75843279ef6f4 --- /dev/null +++ b/clang-tools-extra/docs/clangd/DeveloperDocumentation.rst @@ -0,0 +1,29 @@ +================================== +Developer documentation for clangd +================================== + +.. toctree:: + :maxdepth: 1 + + Extensions + +Compiling clangd +================ + +To build clangd from source, please follow the instructions for `building Clang +`_ and include LLVM, Clang, and the +"extra Clang tools" in your build. + +Contributing to clangd +====================== + +A good place for interested contributors is the `Clangd developer mailing list +`_. For discussions with +the broader community on topics not only related to Clangd, use `Clang +developer mailing list `_. If +you're also interested in contributing patches to clangd, take a look at the +`LLVM Developer Policy `_ and `Code +Reviews `_ page. Contributions of new +features to the `Language Server Protocol +`_ itself would also be +very useful, so that clangd can eventually implement them in a conforming way. diff --git a/clang-tools-extra/docs/clangd/DiagnosticsInEmacsEglot.png b/clang-tools-extra/docs/clangd/DiagnosticsInEmacsEglot.png new file mode 100644 index 0000000000000..f5be84bf5ac79 Binary files /dev/null and b/clang-tools-extra/docs/clangd/DiagnosticsInEmacsEglot.png differ diff --git a/clang-tools-extra/docs/clangd/ErrorsInVSCode.png b/clang-tools-extra/docs/clangd/ErrorsInVSCode.png new file mode 100644 index 0000000000000..52de402962703 Binary files /dev/null and b/clang-tools-extra/docs/clangd/ErrorsInVSCode.png differ diff --git a/clang-tools-extra/docs/clangd/Extensions.rst b/clang-tools-extra/docs/clangd/Extensions.rst new file mode 100644 index 0000000000000..4ff0525045847 --- /dev/null +++ b/clang-tools-extra/docs/clangd/Extensions.rst @@ -0,0 +1,173 @@ +=================== +Protocol extensions +=================== + +clangd supports some features that are not in the official +`Language Server Protocol specification +`__. + +We cautious about adding extensions. The most important considerations are: + +- **Editor support**: How many users will the feature be available to? +- **Standardization**: Is the feature stable? Is it likely to be adopted by more + editors over time? +- **Utility**: Does the feature provide a lot of value? +- **Complexity**: Is this hard to implement in clangd, or constrain future work? + Is the protocol complicated? + +These extensions may evolve or disappear over time. If you use them, try to +recover gracefully if the structures aren't what's expected. + +Switch between the implementation file and the header +===================================================== + +*This extension is supported in clangd 6 and newer.* + +Switching between the implementation file and the header is an important +feature for C++. A language server that understands C++ can do a better job +than the editor. + +**New client->server request**: ``textDocument/switchSourceHeader``. + +Lets editors switch between the main source file (``*.cpp``) and header (``*.h``). + +Parameter: ``TextDocumentIdentifier``: an open file. + +Result: ``string``: the URI of the corresponding header (if a source file was +provided) or source file (if a header was provided). + +If the corresponding file can't be determined, ``""`` is returned. + +File status +=========== + +*This extension is supported in clangd 8 and newer.* + +It is important to provide feedback to the user when the UI is not responsive. + +This extension provides information about activity on clangd's per-file worker +thread. This information can be displayed to users to let them know that the +language server is busy with something. For example, in clangd, building the +AST blocks many other operations. + +**New server->client notification**: ``textDocument/clangd.fileStatus`` + +Sent when the current activity for a file changes. Replaces previous activity +for that file. + +Parameter: ``FileStatus`` object with properties: + +- ``uri : string``: the document whose status is being updated. +- ``state : string``: human-readable information about current activity. + +**New initialization option**: ``initializationOptions.clangdFileStatus : bool`` + +Enables receiving ``textDocument/clangd.fileStatus`` notifications. + +Compilation commands +==================== + +*This extension is supported in clangd 8 and newer.* + +clangd relies on knowing accurate compilation options to correctly interpret a +file. Typically they are found in a ``compile_commands.json`` file in a +directory that contains the file, or an ancestor directory. The following +extensions allow editors to supply the commands over LSP instead. + +**New initialization option**: ``initializationOptions.compilationDatabasePath : string`` + +Specifies the directory containing the compilation database (e.g., +``compile_commands.json``). This path will be used for all files, instead of +searching their ancestor directories. + +**New initialization option**: ``initializationOptions.fallbackFlags : string[]`` + +Controls the flags used when no specific compile command is found. The compile +command will be approximately ``clang $FILE $fallbackFlags`` in this case. + +**New configuration setting**: ``settings.compilationDatabaseChanges : {string: CompileCommand}`` + +Provides compile commands for files. This can also be provided on startup as +``initializationOptions.compilationDatabaseChanges``. + +Keys are file paths (Not URIs!) + +Values are ``{workingDirectory: string, compilationCommand: string[]}``. + +Force diagnostics generation +============================ + +*This extension is supported in clangd 7 and newer.* + +Clangd does not regenerate diagnostics for every version of a file (e.g., after +every keystroke), as that would be too slow. Its heuristics ensure: + +- diagnostics do not get too stale, +- if you stop editing, diagnostics will catch up. + +This extension allows editors to force diagnostics to be generated or not +generated at a particular revision. + +**New property of** ``textDocument/didChange`` **request**: ``wantDiagnostics : bool`` + +- if true, diagnostics will be produced for exactly this version. +- if false, diagnostics will not be produced for this version, even if there + are no further edits. +- if unset, diagnostics will be produced for this version or some subsequent + one in a bounded amount of time. + +Diagnostic categories +===================== + +*This extension is supported in clangd 8 and newer.* + +Clang compiler groups diagnostics into categories (e.g., "Inline Assembly +Issue"). Clangd can emit these categories for interested editors. + +**New property of** ``Diagnostic`` **object**: ``category : string``: + +A human-readable name for a group of related diagnostics. Diagnostics with the +same code will always have the same category. + +**New client capability**: ``textDocument.publishDiagnostics.categorySupport``: + +Requests that clangd send ``Diagnostic.category``. + +Inline fixes for diagnostics +============================ + +*This extension is supported in clangd 8 and newer.* + +LSP specifies that code actions for diagnostics (fixes) are retrieved +asynchronously using ``textDocument/codeAction``. clangd always computes fixes +eagerly. Providing them alongside diagnostics can improve the UX in editors. + +**New property of** ``Diagnostic`` **object**: ``codeActions : CodeAction[]``: + +All the code actions that address this diagnostic. + +**New client capability**: ``textDocument.publishDiagnostics.codeActionsInline : bool`` + +Requests clangd to send ``Diagnostic.codeActions``. + +Symbol info request +=================== + +*This extension is supported in clangd 8 and newer.* + +**New client->server request**: ``textDocument/symbolInfo``: + +This request attempts to resolve the symbol under the cursor, without +retrieving further information (like definition location, which may require +consulting an index). This request was added to support integration with +indexes outside clangd. + +Parameter: ``TextDocumentPositionParams`` + +Response: ``SymbolDetails``, an object with properties: + +- ``name : string`` the unqualified name of the symbol +- ``containerName : string`` the enclosing namespace, class etc (without + trailing ``::``) +- ``usr : string``: the clang-specific "unified symbol resolution" identifier +- ``id : string?``: the clangd-specific opaque symbol ID diff --git a/clang-tools-extra/docs/clangd/Features.rst b/clang-tools-extra/docs/clangd/Features.rst new file mode 100644 index 0000000000000..cb7a6251e7c81 --- /dev/null +++ b/clang-tools-extra/docs/clangd/Features.rst @@ -0,0 +1,265 @@ +======== +Features +======== + +.. role:: raw-html(raw) + :format: html + +Here is what clangd can do for you. Screenshots below show `VSCode +`__; the available features and UI depend on +the editor. + +Errors and warnings +=================== + +clangd runs the clang compiler on your code as you type, and shows errors and +warnings in-place. Some errors are suppressed: diagnostics that require +expanding templates in headers are disabled for performance reasons. + +:raw-html:`
Screenshot` + +.. image:: ErrorsInVSCode.png + :align: center + :alt: Demonstration of errors + +:raw-html:`
` + +Fixes in errors and warnings +---------------------------- + +The compiler can suggest fixes for many common problems automatically, and +clangd can update the code for you. + +:raw-html:`
Animated demo` + +.. image:: ApplyFixInVSCode.gif + :align: center + :alt: Applying a fix suggested by the compiler + +:raw-html:`
` + +**(New in v9)** +If a missing symbol was seen in a file you've edited recently, clangd will +suggest inserting it. + +clang-tidy checks +----------------- + +**(New in v9)** +clangd embeds `clang-tidy `__ +which provides extra hints about code problems: bug-prone patterns, +performance traps, and style issues. + +:raw-html:`
Animated demo` + +.. image:: ApplyClangTidyFixInVSCode.gif + :align: center + :alt: Applying a fix suggested by the compiler + +:raw-html:`
` + +clangd respects your project's ``.clang-tidy`` file which controls the checks +to run. Not all checks work within clangd. You must pass the ``-clang-tidy`` +flag to enable this feature. + +Code completion +=============== + +You'll see suggestions as you type based on what methods, variables, etc are +available in this context. + +:raw-html:`
Screenshot` + +.. image:: CodeCompletionInVSCode.png + :align: center + :alt: Code completion demonstration + +:raw-html:`
` + +Abbreviating words may help you find the right result faster. If you type in +``camelCase`` but the function you're looking for is ``snake_case``, that's OK. + +Insertion of namespace qualifiers and includes +---------------------------------------------- + +**(New in v8)** +clangd will sometimes suggest results from other files and namespaces. In this +case the correct qualifier and ``#include`` directive will be inserted. + +:raw-html:`
Animated demo` + +.. image:: CodeCompletionInsertsNamespaceQualifiersInVSCode.gif + :align: center + :alt: Code completion inserts namespace qualifiers + +:raw-html:`
` + +Signature help +-------------- + +Some editors will show you the parameters of the function you're calling, as +you fill them in. + +:raw-html:`
Animated demo` + +.. image:: SignatureHelpInVSCode.gif + :align: center + :alt: Demonstration of the signature help feature + +:raw-html:`
` + +Cross-references +================ + +The following features let you navigate your codebase. + +If there is no project-wide index, cross-references work across the files +you have opened. + +**(New in v9)** +clangd will also automatically index your whole project. + +Find definition/declaration +--------------------------- + +Jump to the definition or declaration of a symbol under the cursor. + +:raw-html:`
Animated demo` + +.. image:: GoToDefinitionInVSCode.gif + :align: center + :alt: Demonstration of the "Go to definition" feature + +:raw-html:`
` + +**(New in v9)** +Some editors only expose "find definition"; use "find definition" on the +definition to jump to the declaration. + +"Find definition" also works on ``#include`` lines, to jump to the included +file. + +Find references +--------------- + +Show all references to a symbol under the cursor. + +:raw-html:`
Animated demo` + +.. image:: FindAllReferencesInVSCode.gif + :align: center + :alt: Demonstration of the "Find all references" feature + +:raw-html:`
` + +Some editors will automatically highlight local references to the selected +symbol as you move around a file. + +Navigation +========== + +clangd informs the editor of the code structure in the current file. +Some editors use this to present an outline view: + +:raw-html:`
Screenshot` + +.. image:: OutlineInVSCode.png + :align: center + :alt: Outline of a file + +:raw-html:`
` + +In VSCode, the outline is also presented as breadcrumbs that allow jumping to a +symbol within the current file. Searching for symbols within the scope of the +whole project is also possible. + +:raw-html:`
Animated demo` + +.. image:: NavigationWithBreadcrumbsInVSCode.gif + :align: center + :alt: Navigation with breadcrumbs + +:raw-html:`
` + +Formatting +========== + +clangd embeds `clang-format `__, +which can reformat your code: fixing indentation, breaking lines, and reflowing +comments. + +:raw-html:`
Animated demo` + +.. image:: FormatSelectionInVSCode.gif + :align: center + :alt: Formatting selected code + +:raw-html:`
` + +clangd respects your project's ``.clang-format`` file which controls styling +options. + +Format-as-you-type is experimental and doesn't work well yet. + +Complete list of features +========================= + +Here is a list of features that could be useful for editors, together with the +implementation status in clangd, and specification in the Language Server +Protocol. + +It is not clear whether or not some of the features mentioned below should be a +part of the Language Server Protocol; those features might be eventually +developed outside clangd or become clangd extensions to LSP. + ++-------------------------------------+------------+----------+ +| C/C++ Editor feature | LSP | Clangd | ++=====================================+============+==========+ +| Formatting | Yes | Yes | ++-------------------------------------+------------+----------+ +| Completion | Yes | Yes | ++-------------------------------------+------------+----------+ +| Diagnostics | Yes | Yes | ++-------------------------------------+------------+----------+ +| Fix-its | Yes | Yes | ++-------------------------------------+------------+----------+ +| Go to Definition | Yes | Yes | ++-------------------------------------+------------+----------+ +| Signature Help | Yes | Yes | ++-------------------------------------+------------+----------+ +| Document Highlights | Yes | Yes | ++-------------------------------------+------------+----------+ +| Rename | Yes | Yes | ++-------------------------------------+------------+----------+ +| Source hover | Yes | Yes | ++-------------------------------------+------------+----------+ +| Find References | Yes | Yes | ++-------------------------------------+------------+----------+ +| Document Symbols | Yes | Yes | ++-------------------------------------+------------+----------+ +| Workspace Symbols | Yes | Yes | ++-------------------------------------+------------+----------+ +| Code Lens | Yes | No | ++-------------------------------------+------------+----------+ +| Code folding | Yes | No | ++-------------------------------------+------------+----------+ +| Extract Local Variable | Yes | No | ++-------------------------------------+------------+----------+ +| Extract Function/Method | Yes | No | ++-------------------------------------+------------+----------+ +| Quick Assist | Yes | No | ++-------------------------------------+------------+----------+ +| Hide Method | Yes | No | ++-------------------------------------+------------+----------+ +| Implement Method | Yes | No | ++-------------------------------------+------------+----------+ +| Gen. Getters/Setters | Yes | No | ++-------------------------------------+------------+----------+ +| Syntax and Semantic Coloring | No | No | ++-------------------------------------+------------+----------+ +| Call hierarchy | No | No | ++-------------------------------------+------------+----------+ +| Type hierarchy | No | No | ++-------------------------------------+------------+----------+ +| Organize Includes | No | No | ++-------------------------------------+------------+----------+ diff --git a/clang-tools-extra/docs/clangd/FindAllReferencesInVSCode.gif b/clang-tools-extra/docs/clangd/FindAllReferencesInVSCode.gif new file mode 100644 index 0000000000000..b9eecf3c86429 Binary files /dev/null and b/clang-tools-extra/docs/clangd/FindAllReferencesInVSCode.gif differ diff --git a/clang-tools-extra/docs/clangd/FormatSelectionInVSCode.gif b/clang-tools-extra/docs/clangd/FormatSelectionInVSCode.gif new file mode 100644 index 0000000000000..1d4be410b4c68 Binary files /dev/null and b/clang-tools-extra/docs/clangd/FormatSelectionInVSCode.gif differ diff --git a/clang-tools-extra/docs/clangd/GoToDefinitionInVSCode.gif b/clang-tools-extra/docs/clangd/GoToDefinitionInVSCode.gif new file mode 100644 index 0000000000000..396966f7ae3a4 Binary files /dev/null and b/clang-tools-extra/docs/clangd/GoToDefinitionInVSCode.gif differ diff --git a/clang-tools-extra/docs/clangd/Installation.rst b/clang-tools-extra/docs/clangd/Installation.rst new file mode 100644 index 0000000000000..2daf42ba5328d --- /dev/null +++ b/clang-tools-extra/docs/clangd/Installation.rst @@ -0,0 +1,369 @@ +=========================== +Getting started with clangd +=========================== + +.. role:: raw-html(raw) + :format: html + +To use clangd, you need to: + +- install clangd, +- install a plugin for your editor, +- tell clangd how your project is built. + +Installing clangd +================= + +You need a **recent** version of clangd: 7.0 was the first usable release, and +8.0 is much better. + +After installing, ``clangd --version`` should print ``clangd version 7.0.0`` or +later. + +:raw-html:`
macOS` + +`Homebrew `__ can install clangd along with LLVM: + +.. code-block:: console + + $ brew install llvm + +If you don't want to use Homebrew, you can download the a binary release of +LLVM from `releases.llvm.org `__. +Alongside ``bin/clangd`` you will need at least ``lib/clang/*/include``: + +.. code-block:: console + + $ cp clang+llvm-7.0.0/bin/clangd /usr/local/bin/clangd + $ cp -r clang+llvm-7.0.0/lib/clang/ /usr/local/lib/ + +:raw-html:`
` + +:raw-html:`
Windows` + +Download and run the LLVM installer from `releases.llvm.org +`__. + +:raw-html:`
` + +:raw-html:`
Debian/Ubuntu` + +The ``clang-tools`` package usually contains an old version of clangd. + +Try to install the latest release (8.0): + +.. code-block:: console + + $ sudo apt-get install clang-tools-8 + +If that is not found, at least ``clang-tools-7`` should be available. + +The ``clangd`` executable will be installed as ``/usr/bin/clangd-8``. Make it +the default ``clangd``: + +.. code-block:: console + + $ sudo update-alternatives --install /usr/bin/clangd clangd /usr/bin/clangd-8 100 + +:raw-html:`
` + +:raw-html:`
Other systems` + +Most distributions include clangd in a ``clang-tools`` package, or in the full +``llvm`` distribution. + +For some platforms, binaries are also avaliable at `releases.llvm.org +`__. + +:raw-html:`
` + +Editor plugins +============== + +Language Server plugins are available for many editors. In principle, clangd +should work with any of them, though the feature set and UI may vary. + +Here are some plugins we know work well with clangd. + +:raw-html:`
YouCompleteMe for Vim` + +`YouCompleteMe `__ supports clangd. +However, clangd support is not turned on by default, so you must install +YouCompleteMe with ``install.py --clangd-completer``. + +We recommend changing a couple of YCM's default settings. In ``.vimrc`` add: + +:: + + " Let clangd fully control code completion + let g:ycm_clangd_uses_ycmd_caching = 0 + " Use installed clangd, not YCM-bundled clangd which doesn't get updates. + let g:ycm_clangd_binary_path = exepath("clangd") + +You should see errors highlighted and code completions as you type. + +.. image:: CodeCompletionInYCM.png + :align: center + :alt: Code completion in YouCompleteMe + +YouCompleteMe supports many of clangd's features: + +- code completion, +- diagnostics and fixes (``:YcmCompleter FixIt``), +- find declarations, references, and definitions (``:YcmCompleter GoTo`` etc), +- rename symbol (``:YcmCompleter RefactorRename``). + +**Under the hood** + +- **Debug logs**: run ``:YcmDebugInfo`` to see clangd status, and ``:YcmToggleLogs`` + to view clangd's debug logs. +- **Command-line flags**: Set ``g:ycm_clangd_args`` in ``.vimrc``, e.g.: + + :: + + let g:ycm_clangd_args = ['-log=verbose', '-pretty'] + +- **Alternate clangd binary**: set ``g:ycm_clangd_binary_path`` in ``.vimrc``. + +:raw-html:`
` + +:raw-html:`
LanguageClient for Vim and Neovim` + +`LanguageClient-neovim `__ +has `instructions for using clangd +`__, and **may** +be easier to install than YouCompleteMe. + +:raw-html:`
` + +:raw-html:`
Eglot for Emacs` + +`eglot `__ can be configured to work with +clangd. + +Install eglot with ``M-x package-install RET eglot RET``. + +Add the following to ``~/.emacs`` to enable clangd: + +:: + + (require 'eglot) + (add-to-list 'eglot-server-programs '((c++-mode c-mode) "clangd")) + (add-hook 'c-mode-hook 'eglot-ensure) + (add-hook 'c++-mode-hook 'eglot-ensure) + +After restarting you should see diagnostics for errors in your code, and ``M-x +completion-at-point`` should work. + +.. image:: DiagnosticsInEmacsEglot.png + :align: center + :alt: Diagnostics in Emacs + +eglot supports many of clangd's features, with caveats: + +- code completion, though the interaction is quite poor (even with + ``company-mode``, see below), +- diagnostics and fixes, +- find definitions and references (``M-x xref-find-definitions`` etc), +- hover and highlights, +- code actions (``M-x eglot-code-actions``). + +**company-mode** + +eglot does have basic integration with company-mode, which provides a more +fluent completion UI. + +You can install it with ``M-x package-install RET company RET``, and enable it +with ``M-x company-mode``. + +**company-clang is enabled by default**, and will interfere with clangd. +Disable it in ``M-x customize-variable RET company-backends RET``. + +Completion still has some major limitations: + +- completions are alphabetically sorted, not ranked. +- only pure-prefix completions are shown - no fuzzy matches. +- completion triggering seems to be a bit hit-and-miss. + +.. image:: CodeCompletionInEmacsCompanyMode.png + :align: center + :alt: Completion in company-mode + +**Under the hood** + +- **Debug logs**: available in the ``EGLOT stderr`` buffer. +- **Command-line flags and alternate binary**: instead of adding ``"clangd"`` + to ``eglot-server-programs``, add ``("/path/to/clangd" "-log=verbose")`` etc. + +:raw-html:`
` + +:raw-html:`
Visual Studio Code` + +The official extension is `vscode-clangd +`__ +and can be installed from within VSCode. + +Choose **View** --> **Extensions**, then search for "clangd". (Make sure the +Microsoft C/C++ extension is **not** installed). + +After restarting, you should see red underlines underneath errors, and you +should get rich code completions including e.g. function parameters. + +.. image:: CodeCompletionInVSCode.png + :align: center + :alt: Code completion in VSCode + +vscode-clangd has excellent support for all clangd features, including: + +- code completion +- diagnostics and fixes +- find declarations, references, and definitions +- find symbol in file (``Ctrl-P @foo``) or workspace (``Ctrl-P #foo``) +- hover and highlights +- code actions + +**Under the hood** + +- **Debug logs**: when clangd is running, you should see "Clang Language + Server" in the dropdown of the Output panel (**View** -> **Output**). + +- **Command-line flags**: these can be passed in the ``clangd.arguments`` array + in your ``settings.json``. (**File** -> **Preferences** -> **Settings**). + +- **Alternate clangd binary**: set the ``clangd.path`` string in + ``settings.json``. + +:raw-html:`
` + +:raw-html:`
Sublime Text` + +`tomv564/LSP `__ works with clangd out of the box. + +Select **Tools** --> **Install Package Control** (if you haven't installed it +yet). + +Press ``Ctrl-Shift-P`` and select **Package Control: Install Package**. Select +**LSP**. + +Press ``Ctrl-Shift-P`` and select **LSP: Enable Language Server Globally**. +Select **clangd**. + +Open a C++ file, and you should see diagnostics and completion: + +.. image:: CodeCompletionInSublimeText.png + :align: center + :alt: Code completion in Sublime Text + + +The LSP package has excellent support for all most clangd features, including: + +- code completion (a bit noisy due to how snippets are presented) +- diagnostics and fixes +- find definition and references +- hover and highlights +- code actions + +**Under the hood** + +Settings can be tweaked under **Preferences** --> **Package Settings** --> +**LSP**. + +- **Debug logs**: add ``"log_stderr": true`` +- **Command-line flags and alternate clangd binary**: inside the ``"clients": + {"clangd": { ... } }`` section, add ``"command": ["/path/to/clangd", + "-log=verbose"]`` etc. + +:raw-html:`
` + +:raw-html:`
Other editors` + +There is a directory of LSP clients at `langserver.org +`__. + +A generic client should be configured to run the command ``clangd``, and +communicate via the language server protocol on standard input/output. + +If you don't have strong feelings about an editor, we suggest you try out +`VSCode `__, it has excellent language server +support and most faithfully demonstrates what clangd can do. + +:raw-html:`
` + +Project setup +============= + +To understand source code in your project, clangd needs to know the build +flags. (This is just a fact of life in C++, source files are not +self-contained.) + +By default, clangd will assume that source code is built as ``clang +some_file.cc``, and you'll probably get spurious errors about missing +``#include``\ d files, etc. There are a couple of ways to fix this. + +``compile_commands.json`` +------------------------- + +``compile_commands.json`` file provides compile commands for all source files +in the project. This file is usually generated by the build system, or tools +integrated with the build system. Clangd will look for this file in the parent +directories of the files you edit. + +:raw-html:`
CMake-based projects` + +If your project builds with CMake, it can generate ``compile_commands.json``. +You should enable it with: + +:: + + $ cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=1 + +``compile_commands.json`` will be written to your build directory. You should +symlink it (or copy it) to the root of your source tree, if they are different. + +:: + + $ ln -s ~/myproject/compile_commands.json ~/myproject-build/ + +:raw-html:`
` + +:raw-html:`
Other build systems, using Bear` + +`Bear `__ is a tool that generates a +``compile_commands.json`` file by recording a complete build. + +For a ``make``-based build, you can run ``make clean; bear make`` to generate the +file (and run a clean build!) + +:raw-html:`
` + +Other tools can also generate this file. See `the compile_commands.json +specification `__. + +``compile_flags.txt`` +--------------------- + +If all files in a project use the same build flags, you can put those flags, +one flag per line, in ``compile_flags.txt`` in your source root. + +Clangd will assume the compile command is ``clang $FLAGS some_file.cc``. + +Creating this file by hand is a reasonable place to start if your project is +quite simple. + +Project-wide Index +================== + +By default clangd only has a view on symbols coming from files you are +currently editing. You can extend this view to whole project by providing a +project-wide index to clangd. There are two ways to do this. + +- Pass an experimental `-background-index` command line argument. With + this feature enabled, clangd incrementally builds an index of projects + that you work on and uses the just-built index automatically. + +- Generate an index file using `clangd-indexer + `__ + Then you can pass generated index file to clangd using + `-index-file=/path/to/index_file`. *Note that clangd-indexer isn't + included alongside clangd in the Debian clang-tools package. You will + likely have to build clangd from source to use this option.* diff --git a/clang-tools-extra/docs/clangd/NavigationWithBreadcrumbsInVSCode.gif b/clang-tools-extra/docs/clangd/NavigationWithBreadcrumbsInVSCode.gif new file mode 100644 index 0000000000000..499f5c1af8468 Binary files /dev/null and b/clang-tools-extra/docs/clangd/NavigationWithBreadcrumbsInVSCode.gif differ diff --git a/clang-tools-extra/docs/clangd/OutlineInVSCode.png b/clang-tools-extra/docs/clangd/OutlineInVSCode.png new file mode 100644 index 0000000000000..570a80de8b71c Binary files /dev/null and b/clang-tools-extra/docs/clangd/OutlineInVSCode.png differ diff --git a/clang-tools-extra/docs/clangd/SignatureHelpInVSCode.gif b/clang-tools-extra/docs/clangd/SignatureHelpInVSCode.gif new file mode 100644 index 0000000000000..e5700f22b57db Binary files /dev/null and b/clang-tools-extra/docs/clangd/SignatureHelpInVSCode.gif differ diff --git a/clang-tools-extra/docs/clangd/index.rst b/clang-tools-extra/docs/clangd/index.rst new file mode 100644 index 0000000000000..46939062876f1 --- /dev/null +++ b/clang-tools-extra/docs/clangd/index.rst @@ -0,0 +1,27 @@ +====== +clangd +====== + +.. toctree:: + :maxdepth: 1 + + Installation + Features + +What is clangd? +=============== + +clangd understands your C++ code and adds smart features to your editor: code +completion, compile errors, go-to-definition and more. + +clangd is a language server that implements the `Language Server Protocol +`__; it can work with +many editors through a plugin. Here's Visual Studio Code with the clangd +plugin, demonstrating code completion: + +.. image:: CodeCompletionInVSCode.png + :align: center + :alt: Code completion in VSCode + +clangd is based on the `Clang `__ C++ compiler, and is +part of the `LLVM `__ project. diff --git a/clang-tools-extra/docs/conf.py b/clang-tools-extra/docs/conf.py index a79558f05fdea..16e81051f7538 100644 --- a/clang-tools-extra/docs/conf.py +++ b/clang-tools-extra/docs/conf.py @@ -121,7 +121,7 @@ # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = [] +html_static_path = ['_static'] # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, # using the given strftime format. diff --git a/clang-tools-extra/docs/index.rst b/clang-tools-extra/docs/index.rst index 8e6beb35a6091..86ba5cb7afebe 100644 --- a/clang-tools-extra/docs/index.rst +++ b/clang-tools-extra/docs/index.rst @@ -1,14 +1,9 @@ -.. Extra Clang Tools documentation master file, created by - sphinx-quickstart on Wed Feb 13 10:00:18 2013. - You can adapt this file completely to your liking, but it should at least - contain the root `toctree` directive. - .. title:: Welcome to Extra Clang Tools's documentation! Introduction ============ Welcome to the clang-tools-extra project which contains extra tools built using -Clang's tooling API's. +Clang's tooling APIs. .. toctree:: :maxdepth: 1 @@ -25,7 +20,8 @@ Contents modularize pp-trace clang-rename - clangd + clangd/index + clangd/DeveloperDocumentation clang-doc diff --git a/clang-tools-extra/test/CMakeLists.txt b/clang-tools-extra/test/CMakeLists.txt index adeb0368f8934..ac8d459b39928 100644 --- a/clang-tools-extra/test/CMakeLists.txt +++ b/clang-tools-extra/test/CMakeLists.txt @@ -59,7 +59,7 @@ set(CLANG_TOOLS_TEST_DEPS # For the clang-tidy libclang integration test. c-index-test # clang-tidy tests require it. - clang-headers + clang-resource-headers clang-tidy ) diff --git a/clang-tools-extra/test/clang-tidy/Inputs/Headers/stdio.h b/clang-tools-extra/test/clang-tidy/Inputs/Headers/stdio.h new file mode 100644 index 0000000000000..eebe9fd914ad0 --- /dev/null +++ b/clang-tools-extra/test/clang-tidy/Inputs/Headers/stdio.h @@ -0,0 +1,18 @@ +//===--- stdio.h - Stub header for tests ------------------------*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#ifndef _STDIO_H_ +#define _STDIO_H_ + +// A header intended to contain C standard input and output library +// declarations. + +int printf(const char *, ...); + +#endif // _STDIO_H_ + diff --git a/clang-tools-extra/test/clang-tidy/Inputs/absl/time/time.h b/clang-tools-extra/test/clang-tidy/Inputs/absl/time/time.h index 385eed82f6409..9c6c3aee7d008 100644 --- a/clang-tools-extra/test/clang-tidy/Inputs/absl/time/time.h +++ b/clang-tools-extra/test/clang-tidy/Inputs/absl/time/time.h @@ -14,6 +14,8 @@ class Duration { Duration &operator/=(float r); Duration &operator/=(double r); template Duration &operator/=(T r); + + Duration &operator+(Duration d); }; template Duration operator*(Duration lhs, T rhs); @@ -68,6 +70,8 @@ Time FromUnixMillis(int64_t); Time FromUnixMicros(int64_t); Time FromUnixNanos(int64_t); +Time Now(); + // Relational Operators constexpr bool operator<(Duration lhs, Duration rhs); constexpr bool operator>(Duration lhs, Duration rhs); diff --git a/clang-tools-extra/test/clang-tidy/abseil-duration-unnecessary-conversion.cpp b/clang-tools-extra/test/clang-tidy/abseil-duration-unnecessary-conversion.cpp new file mode 100644 index 0000000000000..9414182c8c97d --- /dev/null +++ b/clang-tools-extra/test/clang-tidy/abseil-duration-unnecessary-conversion.cpp @@ -0,0 +1,69 @@ +// RUN: %check_clang_tidy %s abseil-duration-unnecessary-conversion %t -- -- -I%S/Inputs + +#include "absl/time/time.h" + +void f() { + absl::Duration d1, d2; + + // Floating point + d2 = absl::Hours(absl::ToDoubleHours(d1)); + // CHECK-MESSAGES: [[@LINE-1]]:8: warning: remove unnecessary absl::Duration conversions [abseil-duration-unnecessary-conversion] + // CHECK-FIXES: d1 + d2 = absl::Minutes(absl::ToDoubleMinutes(d1)); + // CHECK-MESSAGES: [[@LINE-1]]:8: warning: remove unnecessary absl::Duration conversions [abseil-duration-unnecessary-conversion] + // CHECK-FIXES: d1 + d2 = absl::Seconds(absl::ToDoubleSeconds(d1)); + // CHECK-MESSAGES: [[@LINE-1]]:8: warning: remove unnecessary absl::Duration conversions [abseil-duration-unnecessary-conversion] + // CHECK-FIXES: d1 + d2 = absl::Milliseconds(absl::ToDoubleMilliseconds(d1)); + // CHECK-MESSAGES: [[@LINE-1]]:8: warning: remove unnecessary absl::Duration conversions [abseil-duration-unnecessary-conversion] + // CHECK-FIXES: d1 + d2 = absl::Microseconds(absl::ToDoubleMicroseconds(d1)); + // CHECK-MESSAGES: [[@LINE-1]]:8: warning: remove unnecessary absl::Duration conversions [abseil-duration-unnecessary-conversion] + // CHECK-FIXES: d1 + d2 = absl::Nanoseconds(absl::ToDoubleNanoseconds(d1)); + // CHECK-MESSAGES: [[@LINE-1]]:8: warning: remove unnecessary absl::Duration conversions [abseil-duration-unnecessary-conversion] + // CHECK-FIXES: d1 + + // Integer point + d2 = absl::Hours(absl::ToInt64Hours(d1)); + // CHECK-MESSAGES: [[@LINE-1]]:8: warning: remove unnecessary absl::Duration conversions [abseil-duration-unnecessary-conversion] + // CHECK-FIXES: d1 + d2 = absl::Minutes(absl::ToInt64Minutes(d1)); + // CHECK-MESSAGES: [[@LINE-1]]:8: warning: remove unnecessary absl::Duration conversions [abseil-duration-unnecessary-conversion] + // CHECK-FIXES: d1 + d2 = absl::Seconds(absl::ToInt64Seconds(d1)); + // CHECK-MESSAGES: [[@LINE-1]]:8: warning: remove unnecessary absl::Duration conversions [abseil-duration-unnecessary-conversion] + // CHECK-FIXES: d1 + d2 = absl::Milliseconds(absl::ToInt64Milliseconds(d1)); + // CHECK-MESSAGES: [[@LINE-1]]:8: warning: remove unnecessary absl::Duration conversions [abseil-duration-unnecessary-conversion] + // CHECK-FIXES: d1 + d2 = absl::Microseconds(absl::ToInt64Microseconds(d1)); + // CHECK-MESSAGES: [[@LINE-1]]:8: warning: remove unnecessary absl::Duration conversions [abseil-duration-unnecessary-conversion] + // CHECK-FIXES: d1 + d2 = absl::Nanoseconds(absl::ToInt64Nanoseconds(d1)); + // CHECK-MESSAGES: [[@LINE-1]]:8: warning: remove unnecessary absl::Duration conversions [abseil-duration-unnecessary-conversion] + // CHECK-FIXES: d1 + + // As macro argument +#define PLUS_FIVE_S(x) x + absl::Seconds(5) + d2 = PLUS_FIVE_S(absl::Seconds(absl::ToInt64Seconds(d1))); + // CHECK-MESSAGES: [[@LINE-1]]:20: warning: remove unnecessary absl::Duration conversions [abseil-duration-unnecessary-conversion] + // CHECK-FIXES: PLUS_FIVE_S(d1) +#undef PLUS_FIVE_S + + // Split by macro: should not change +#define TOSECONDS(x) absl::Seconds(x) + d2 = TOSECONDS(absl::ToInt64Seconds(d1)); +#undef TOSECONDS + + // Don't change something inside a macro definition +#define VALUE(x) absl::Hours(absl::ToInt64Hours(x)); + d2 = VALUE(d1); +#undef VALUE + + // These should not match + d2 = absl::Seconds(absl::ToDoubleMilliseconds(d1)); + d2 = absl::Seconds(4); + int i = absl::ToInt64Milliseconds(d1); +} diff --git a/clang-tools-extra/test/clang-tidy/abseil-time-subtraction.cpp b/clang-tools-extra/test/clang-tidy/abseil-time-subtraction.cpp new file mode 100644 index 0000000000000..6f5d4b45af976 --- /dev/null +++ b/clang-tools-extra/test/clang-tidy/abseil-time-subtraction.cpp @@ -0,0 +1,117 @@ +// RUN: %check_clang_tidy %s abseil-time-subtraction %t -- -- -I%S/Inputs + +#include "absl/time/time.h" + +void g(absl::Duration d); + +void f() { + absl::Time t; + int x, y; + absl::Duration d; + + d = absl::Hours(absl::ToUnixHours(t) - x); + // CHECK-MESSAGES: [[@LINE-1]]:7: warning: perform subtraction in the time domain [abseil-time-subtraction] + // CHECK-FIXES: d = (t - absl::FromUnixHours(x)); + d = absl::Minutes(absl::ToUnixMinutes(t) - x); + // CHECK-MESSAGES: [[@LINE-1]]:7: warning: perform subtraction in the time domain [abseil-time-subtraction] + // CHECK-FIXES: d = (t - absl::FromUnixMinutes(x)); + d = absl::Seconds(absl::ToUnixSeconds(t) - x); + // CHECK-MESSAGES: [[@LINE-1]]:7: warning: perform subtraction in the time domain [abseil-time-subtraction] + // CHECK-FIXES: d = (t - absl::FromUnixSeconds(x)); + d = absl::Milliseconds(absl::ToUnixMillis(t) - x); + // CHECK-MESSAGES: [[@LINE-1]]:7: warning: perform subtraction in the time domain [abseil-time-subtraction] + // CHECK-FIXES: d = (t - absl::FromUnixMillis(x)); + d = absl::Microseconds(absl::ToUnixMicros(t) - x); + // CHECK-MESSAGES: [[@LINE-1]]:7: warning: perform subtraction in the time domain [abseil-time-subtraction] + // CHECK-FIXES: d = (t - absl::FromUnixMicros(x)); + d = absl::Nanoseconds(absl::ToUnixNanos(t) - x); + // CHECK-MESSAGES: [[@LINE-1]]:7: warning: perform subtraction in the time domain [abseil-time-subtraction] + // CHECK-FIXES: d = (t - absl::FromUnixNanos(x)); + + y = x - absl::ToUnixHours(t); + // CHECK-MESSAGES: [[@LINE-1]]:7: warning: perform subtraction in the time domain [abseil-time-subtraction] + // CHECK-FIXES: y = absl::ToInt64Hours(absl::FromUnixHours(x) - t); + y = x - absl::ToUnixMinutes(t); + // CHECK-MESSAGES: [[@LINE-1]]:7: warning: perform subtraction in the time domain [abseil-time-subtraction] + // CHECK-FIXES: y = absl::ToInt64Minutes(absl::FromUnixMinutes(x) - t); + y = x - absl::ToUnixSeconds(t); + // CHECK-MESSAGES: [[@LINE-1]]:7: warning: perform subtraction in the time domain [abseil-time-subtraction] + // CHECK-FIXES: y = absl::ToInt64Seconds(absl::FromUnixSeconds(x) - t); + y = x - absl::ToUnixMillis(t); + // CHECK-MESSAGES: [[@LINE-1]]:7: warning: perform subtraction in the time domain [abseil-time-subtraction] + // CHECK-FIXES: y = absl::ToInt64Milliseconds(absl::FromUnixMillis(x) - t); + y = x - absl::ToUnixMicros(t); + // CHECK-MESSAGES: [[@LINE-1]]:7: warning: perform subtraction in the time domain [abseil-time-subtraction] + // CHECK-FIXES: y = absl::ToInt64Microseconds(absl::FromUnixMicros(x) - t); + y = x - absl::ToUnixNanos(t); + // CHECK-MESSAGES: [[@LINE-1]]:7: warning: perform subtraction in the time domain [abseil-time-subtraction] + // CHECK-FIXES: y = absl::ToInt64Nanoseconds(absl::FromUnixNanos(x) - t); + + // Check parenthesis placement + d = 5 * absl::Seconds(absl::ToUnixSeconds(t) - x); + // CHECK-MESSAGES: [[@LINE-1]]:11: warning: perform subtraction in the time domain [abseil-time-subtraction] + // CHECK-FIXES: d = 5 * (t - absl::FromUnixSeconds(x)); + d = absl::Seconds(absl::ToUnixSeconds(t) - x) / 5; + // CHECK-MESSAGES: [[@LINE-1]]:7: warning: perform subtraction in the time domain [abseil-time-subtraction] + // CHECK-FIXES: d = (t - absl::FromUnixSeconds(x)) / 5; + + // No extra parens around arguments + g(absl::Seconds(absl::ToUnixSeconds(t) - x)); + // CHECK-MESSAGES: [[@LINE-1]]:5: warning: perform subtraction in the time domain [abseil-time-subtraction] + // CHECK-FIXES: g(t - absl::FromUnixSeconds(x)); + g(absl::Seconds(x - absl::ToUnixSeconds(t))); + // CHECK-MESSAGES: [[@LINE-1]]:5: warning: perform subtraction in the time domain [abseil-time-subtraction] + // CHECK-FIXES: g(absl::FromUnixSeconds(x) - t); + + // More complex subexpressions + d = absl::Hours(absl::ToUnixHours(t) - 5 * x); + // CHECK-MESSAGES: [[@LINE-1]]:7: warning: perform subtraction in the time domain [abseil-time-subtraction] + // CHECK-FIXES: d = (t - absl::FromUnixHours(5 * x)); + + // These should not trigger; they are likely bugs + d = absl::Milliseconds(absl::ToUnixSeconds(t) - x); + d = absl::Seconds(absl::ToUnixMicros(t) - x); + + // Various macro scenarios +#define SUB(z, t1) z - absl::ToUnixSeconds(t1) + y = SUB(x, t); +#undef SUB + +#define MILLIS(t1) absl::ToUnixMillis(t1) + y = x - MILLIS(t); +#undef MILLIS + +#define HOURS(z) absl::Hours(z) + d = HOURS(absl::ToUnixHours(t) - x); +#undef HOURS + + // This should match the expression inside the macro invocation. +#define SECONDS(z) absl::Seconds(z) + d = SECONDS(x - absl::ToUnixSeconds(t)); + // CHECK-MESSAGES: [[@LINE-1]]:15: warning: perform subtraction in the time domain [abseil-time-subtraction] + // CHECK-FIXES: SECONDS(absl::ToInt64Seconds(absl::FromUnixSeconds(x) - t)) +#undef SECONDS +} + +template +void func(absl::Time t, T x) { + absl::Duration d = absl::Seconds(absl::ToUnixSeconds(t) - x); + // CHECK-MESSAGES: [[@LINE-1]]:22: warning: perform subtraction in the time domain [abseil-time-subtraction] + // CHECK-FIXES: absl::Duration d = t - absl::FromUnixSeconds(x); +} + +void g() { + func(absl::Now(), 5); +} + +absl::Duration parens_in_return() { + absl::Time t; + int x; + + return absl::Seconds(absl::ToUnixSeconds(t) - x); + // CHECK-MESSAGES: [[@LINE-1]]:10: warning: perform subtraction in the time domain [abseil-time-subtraction] + // CHECK-FIXES: return t - absl::FromUnixSeconds(x); + return absl::Seconds(x - absl::ToUnixSeconds(t)); + // CHECK-MESSAGES: [[@LINE-1]]:10: warning: perform subtraction in the time domain [abseil-time-subtraction] + // CHECK-FIXES: return absl::FromUnixSeconds(x) - t; +} diff --git a/clang-tools-extra/test/clang-tidy/bugprone-argument-comment-literals.cpp b/clang-tools-extra/test/clang-tidy/bugprone-argument-comment-literals.cpp new file mode 100644 index 0000000000000..739c9a59397c9 --- /dev/null +++ b/clang-tools-extra/test/clang-tidy/bugprone-argument-comment-literals.cpp @@ -0,0 +1,124 @@ +// RUN: %check_clang_tidy %s bugprone-argument-comment %t -- \ +// RUN: -config="{CheckOptions: [{key: CommentBoolLiterals, value: 1},{key: CommentIntegerLiterals, value: 1}, {key: CommentFloatLiterals, value: 1}, {key: CommentUserDefinedLiterals, value: 1}, {key: CommentStringLiterals, value: 1}, {key: CommentNullPtrs, value: 1}, {key: CommentCharacterLiterals, value: 1}]}" -- + +struct A { + void foo(bool abc); + void foo(bool abc, bool cde); + void foo(const char *, bool abc); + void foo(int iabc); + void foo(float fabc); + void foo(double dabc); + void foo(const char *strabc); + void fooW(const wchar_t *wstrabc); + void fooPtr(A *ptrabc); + void foo(char chabc); +}; + +#define FOO 1 + +void g(int a); +void h(double b); +void i(const char *c); + +double operator"" _km(long double); + +void test() { + A a; + + a.foo(true); + // CHECK-MESSAGES: [[@LINE-1]]:9: warning: argument comment missing for literal argument 'abc' [bugprone-argument-comment] + // CHECK-FIXES: a.foo(/*abc=*/true); + + a.foo(false); + // CHECK-MESSAGES: [[@LINE-1]]:9: warning: argument comment missing for literal argument 'abc' [bugprone-argument-comment] + // CHECK-FIXES: a.foo(/*abc=*/false); + + a.foo(true, false); + // CHECK-MESSAGES: [[@LINE-1]]:9: warning: argument comment missing for literal argument 'abc' [bugprone-argument-comment] + // CHECK-MESSAGES: [[@LINE-2]]:15: warning: argument comment missing for literal argument 'cde' [bugprone-argument-comment] + // CHECK-FIXES: a.foo(/*abc=*/true, /*cde=*/false); + + a.foo(false, true); + // CHECK-MESSAGES: [[@LINE-1]]:9: warning: argument comment missing for literal argument 'abc' [bugprone-argument-comment] + // CHECK-MESSAGES: [[@LINE-2]]:16: warning: argument comment missing for literal argument 'cde' [bugprone-argument-comment] + // CHECK-FIXES: a.foo(/*abc=*/false, /*cde=*/true); + + a.foo(/*abc=*/false, true); + // CHECK-MESSAGES: [[@LINE-1]]:24: warning: argument comment missing for literal argument 'cde' [bugprone-argument-comment] + // CHECK-FIXES: a.foo(/*abc=*/false, /*cde=*/true); + + a.foo(false, /*cde=*/true); + // CHECK-MESSAGES: [[@LINE-1]]:9: warning: argument comment missing for literal argument 'abc' [bugprone-argument-comment] + // CHECK-FIXES: a.foo(/*abc=*/false, /*cde=*/true); + + bool val1 = true; + bool val2 = false; + a.foo(val1, val2); + + a.foo("", true); + // CHECK-MESSAGES: [[@LINE-1]]:13: warning: argument comment missing for literal argument 'abc' [bugprone-argument-comment] + // CHECK-FIXES: a.foo("", /*abc=*/true); + + a.foo(0); + // CHECK-MESSAGES: [[@LINE-1]]:9: warning: argument comment missing for literal argument 'iabc' [bugprone-argument-comment] + // CHECK-FIXES: a.foo(/*iabc=*/0); + + a.foo(1.0f); + // CHECK-MESSAGES: [[@LINE-1]]:9: warning: argument comment missing for literal argument 'fabc' [bugprone-argument-comment] + // CHECK-FIXES: a.foo(/*fabc=*/1.0f); + + a.foo(1.0); + // CHECK-MESSAGES: [[@LINE-1]]:9: warning: argument comment missing for literal argument 'dabc' [bugprone-argument-comment] + // CHECK-FIXES: a.foo(/*dabc=*/1.0); + + int val3 = 10; + a.foo(val3); + + float val4 = 10.0; + a.foo(val4); + + double val5 = 10.0; + a.foo(val5); + + a.foo("Hello World"); + // CHECK-MESSAGES: [[@LINE-1]]:9: warning: argument comment missing for literal argument 'strabc' [bugprone-argument-comment] + // CHECK-FIXES: a.foo(/*strabc=*/"Hello World"); + // + a.fooW(L"Hello World"); + // CHECK-MESSAGES: [[@LINE-1]]:10: warning: argument comment missing for literal argument 'wstrabc' [bugprone-argument-comment] + // CHECK-FIXES: a.fooW(/*wstrabc=*/L"Hello World"); + + a.fooPtr(nullptr); + // CHECK-MESSAGES: [[@LINE-1]]:12: warning: argument comment missing for literal argument 'ptrabc' [bugprone-argument-comment] + // CHECK-FIXES: a.fooPtr(/*ptrabc=*/nullptr); + + a.foo(402.0_km); + // CHECK-MESSAGES: [[@LINE-1]]:9: warning: argument comment missing for literal argument 'dabc' [bugprone-argument-comment] + // CHECK-FIXES: a.foo(/*dabc=*/402.0_km); + + a.foo('A'); + // CHECK-MESSAGES: [[@LINE-1]]:9: warning: argument comment missing for literal argument 'chabc' [bugprone-argument-comment] + // CHECK-FIXES: a.foo(/*chabc=*/'A'); + + g(FOO); + h(1.0f); + // CHECK-MESSAGES: [[@LINE-1]]:5: warning: argument comment missing for literal argument 'b' [bugprone-argument-comment] + // CHECK-FIXES: h(/*b=*/1.0f); + i(__FILE__); + + // FIXME Would like the below to add argument comments. + g((1)); + // FIXME But we should not add argument comments here. + g(_Generic(0, int : 0)); +} + +void f(bool _with_underscores_); +void ignores_underscores() { + f(false); + // CHECK-MESSAGES: [[@LINE-1]]:5: warning: argument comment missing for literal argument '_with_underscores_' [bugprone-argument-comment] + // CHECK-FIXES: f(/*_with_underscores_=*/false); + + f(true); + // CHECK-MESSAGES: [[@LINE-1]]:5: warning: argument comment missing for literal argument + // CHECK-FIXES: f(/*_with_underscores_=*/true); +} diff --git a/clang-tools-extra/test/clang-tidy/bugprone-string-constructor.cpp b/clang-tools-extra/test/clang-tidy/bugprone-string-constructor.cpp index 3ab4f42408754..9e11a32a018d4 100644 --- a/clang-tools-extra/test/clang-tidy/bugprone-string-constructor.cpp +++ b/clang-tools-extra/test/clang-tidy/bugprone-string-constructor.cpp @@ -65,3 +65,11 @@ void Valid() { std::string s2("test", 3); std::string s3("test"); } + +namespace instantiation_dependent_exprs { +template +struct S { + bool x; + std::string f() { return x ? "a" : "b"; } +}; +} diff --git a/clang-tools-extra/test/clang-tidy/bugprone-string-integer-assignment.cpp b/clang-tools-extra/test/clang-tidy/bugprone-string-integer-assignment.cpp index c4e13fc4c68cc..dbf3a5c5e6025 100644 --- a/clang-tools-extra/test/clang-tidy/bugprone-string-integer-assignment.cpp +++ b/clang-tools-extra/test/clang-tidy/bugprone-string-integer-assignment.cpp @@ -11,8 +11,14 @@ struct basic_string { typedef basic_string string; typedef basic_string wstring; + +int tolower(int i); +int toupper(int i); } +int tolower(int i); +int toupper(int i); + typedef int MyArcaneChar; int main() { @@ -47,7 +53,17 @@ int main() { std::basic_string as; as = 6; -// CHECK-MESSAGES: :[[@LINE-1]]:8: warning: an integer is interpreted as a chara -// CHECK-FIXES: {{^}} as = 6;{{$}} + as = static_cast(6); + as = 'a'; + + s += toupper(x); + s += tolower(x); + s += std::tolower(x); + + // Likely character expressions. + s += x & 0xff; + s += 0xff & x; + s += 'a' + (x % 26); + s += (x % 10) + 'b'; } diff --git a/clang-tools-extra/test/clang-tidy/clang-tidy-mac-libcxx.cpp b/clang-tools-extra/test/clang-tidy/clang-tidy-mac-libcxx.cpp index 153a5d6e91f86..d124a344ec7aa 100644 --- a/clang-tools-extra/test/clang-tidy/clang-tidy-mac-libcxx.cpp +++ b/clang-tools-extra/test/clang-tidy/clang-tidy-mac-libcxx.cpp @@ -8,7 +8,7 @@ // RUN: cp -r %S/Inputs/mock-libcxx %t/ // // Pretend clang is installed beside the mock library that we provided. -// RUN: echo '[{"directory":"%t","command":"%t/mock-libcxx/bin/clang++ -stdlib=libc++ -target x86_64-apple-darwin -c test.cpp","file":"test.cpp"}]' | sed -e 's/\\/\//g' > %t/compile_commands.json +// RUN: echo '[{"directory":"%t","command":"%t/mock-libcxx/bin/clang++ -stdlib=libc++ -std=c++11 -target x86_64-apple-darwin -c test.cpp","file":"test.cpp"}]' | sed -e 's/\\/\//g' > %t/compile_commands.json // RUN: cp "%s" "%t/test.cpp" // RUN: clang-tidy -header-filter='.*' -system-headers -checks='-*,modernize-use-using' "%t/test.cpp" | FileCheck %s // CHECK: mock_vector:{{[0-9]+}}:{{[0-9]+}}: warning: use 'using' instead of 'typedef' diff --git a/clang-tools-extra/test/clang-tidy/google-objc-function-naming.m b/clang-tools-extra/test/clang-tidy/google-objc-function-naming.m index d0336d267cf06..01433d9fa1ad7 100644 --- a/clang-tools-extra/test/clang-tidy/google-objc-function-naming.m +++ b/clang-tools-extra/test/clang-tidy/google-objc-function-naming.m @@ -1,4 +1,12 @@ -// RUN: %check_clang_tidy %s google-objc-function-naming %t +// RUN: %check_clang_tidy %s google-objc-function-naming %t -- -- -isystem %S/Inputs/Headers + +#include + +static void TestImplicitFunctionDeclaration(int a) { + // Call a builtin function so that the compiler generates an implicit + // function declaration. + printf("%d", a); +} typedef _Bool bool; diff --git a/clang-tools-extra/test/clang-tidy/modernize-avoid-bind.cpp b/clang-tools-extra/test/clang-tidy/modernize-avoid-bind.cpp index 1c78b9e630568..721801bef11d0 100644 --- a/clang-tools-extra/test/clang-tidy/modernize-avoid-bind.cpp +++ b/clang-tools-extra/test/clang-tidy/modernize-avoid-bind.cpp @@ -77,3 +77,47 @@ void n() { // CHECK-MESSAGES: :[[@LINE-1]]:14: warning: prefer a lambda to std::bind // CHECK-FIXES: auto clj = [] { return C::add(1, 1); }; } + +// Let's fake a minimal std::function-like facility. +namespace std { +template +_Tp declval(); + +template +struct __res { + template + static decltype(declval<_Functor>()(_Args()...)) _S_test(int); + + template + static void _S_test(...); + + using type = decltype(_S_test<_ArgTypes...>(0)); +}; + +template +struct function; + +template +struct function { + template ::type> + function(_Functor) {} +}; +} // namespace std + +struct Thing {}; +void UseThing(Thing *); + +struct Callback { + Callback(); + Callback(std::function); + void Reset(std::function); +}; + +void test(Thing *t) { + Callback cb; + if (t) + cb.Reset(std::bind(UseThing, t)); + // CHECK-MESSAGES: :[[@LINE-1]]:14: warning: prefer a lambda to std::bind + // CHECK-FIXES: cb.Reset([=] { return UseThing(t); }); +} diff --git a/clang-tools-extra/test/clang-tidy/modernize-avoid-c-arrays-ignores-main.cpp b/clang-tools-extra/test/clang-tidy/modernize-avoid-c-arrays-ignores-main.cpp new file mode 100644 index 0000000000000..6549422f393aa --- /dev/null +++ b/clang-tools-extra/test/clang-tidy/modernize-avoid-c-arrays-ignores-main.cpp @@ -0,0 +1,18 @@ +// RUN: %check_clang_tidy %s modernize-avoid-c-arrays %t + +int not_main(int argc, char *argv[]) { + // CHECK-MESSAGES: :[[@LINE-1]]:24: warning: do not declare C-style arrays, use std::array<> instead + int f4[] = {1, 2}; + // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: do not declare C-style arrays, use std::array<> instead +} + +int main(int argc, char *argv[]) { + int f5[] = {1, 2}; + // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: do not declare C-style arrays, use std::array<> instead + + auto not_main = [](int argc, char *argv[]) { + // CHECK-MESSAGES: :[[@LINE-1]]:32: warning: do not declare C-style arrays, use std::array<> instead + int f6[] = {1, 2}; + // CHECK-MESSAGES: :[[@LINE-1]]:5: warning: do not declare C-style arrays, use std::array<> instead + }; +} diff --git a/clang-tools-extra/test/clang-tidy/modernize-avoid-c-arrays-ignores-three-arg-main.cpp b/clang-tools-extra/test/clang-tidy/modernize-avoid-c-arrays-ignores-three-arg-main.cpp new file mode 100644 index 0000000000000..22a4016f79f4d --- /dev/null +++ b/clang-tools-extra/test/clang-tidy/modernize-avoid-c-arrays-ignores-three-arg-main.cpp @@ -0,0 +1,20 @@ +// RUN: %check_clang_tidy %s modernize-avoid-c-arrays %t + +int not_main(int argc, char *argv[], char *argw[]) { + // CHECK-MESSAGES: :[[@LINE-1]]:24: warning: do not declare C-style arrays, use std::array<> instead + // CHECK-MESSAGES: :[[@LINE-2]]:38: warning: do not declare C-style arrays, use std::array<> instead + int f4[] = {1, 2}; + // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: do not declare C-style arrays, use std::array<> instead +} + +int main(int argc, char *argv[], char *argw[]) { + int f5[] = {1, 2}; + // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: do not declare C-style arrays, use std::array<> instead + + auto not_main = [](int argc, char *argv[], char *argw[]) { + // CHECK-MESSAGES: :[[@LINE-1]]:32: warning: do not declare C-style arrays, use std::array<> instead + // CHECK-MESSAGES: :[[@LINE-2]]:46: warning: do not declare C-style arrays, use std::array<> instead + int f6[] = {1, 2}; + // CHECK-MESSAGES: :[[@LINE-1]]:5: warning: do not declare C-style arrays, use std::array<> instead + }; +} diff --git a/clang-tools-extra/test/clang-tidy/modernize-use-default-member-init-assignment.cpp b/clang-tools-extra/test/clang-tidy/modernize-use-default-member-init-assignment.cpp index fdc0db185fba6..b98055c9f44ad 100644 --- a/clang-tools-extra/test/clang-tidy/modernize-use-default-member-init-assignment.cpp +++ b/clang-tools-extra/test/clang-tidy/modernize-use-default-member-init-assignment.cpp @@ -166,6 +166,14 @@ struct PositiveEnum { // CHECK-FIXES: Enum e = Foo; }; +struct PositiveValueEnum { + PositiveValueEnum() : e() {} + // CHECK-FIXES: PositiveValueEnum() {} + Enum e; + // CHECK-MESSAGES: :[[@LINE-1]]:8: warning: use default member initializer for 'e' + // CHECK-FIXES: Enum e{}; +}; + struct PositiveString { PositiveString() : s("foo") {} // CHECK-FIXES: PositiveString() {} diff --git a/clang-tools-extra/test/clang-tidy/modernize-use-default-member-init.cpp b/clang-tools-extra/test/clang-tidy/modernize-use-default-member-init.cpp index 0ed65df3ed644..825bfa0bfbeed 100644 --- a/clang-tools-extra/test/clang-tidy/modernize-use-default-member-init.cpp +++ b/clang-tools-extra/test/clang-tidy/modernize-use-default-member-init.cpp @@ -165,6 +165,14 @@ struct PositiveEnum { // CHECK-FIXES: Enum e{Foo}; }; +struct PositiveValueEnum { + PositiveValueEnum() : e() {} + // CHECK-FIXES: PositiveValueEnum() {} + Enum e; + // CHECK-MESSAGES: :[[@LINE-1]]:8: warning: use default member initializer for 'e' + // CHECK-FIXES: Enum e{}; +}; + struct PositiveString { PositiveString() : s("foo") {} // CHECK-FIXES: PositiveString() {} @@ -382,6 +390,16 @@ struct ExistingString { const char *e4 = "bar"; }; +struct UnionExisting { + UnionExisting() : e(5.0) {} + // CHECK-MESSAGES: :[[@LINE-1]]:21: warning: member initializer for 'e' is redundant + // CHECK-FIXES: UnionExisting() {} + union { + int i; + double e = 5.0; + }; +}; + template struct NegativeTemplateExisting { NegativeTemplateExisting(int) : t(0) {} diff --git a/clang-tools-extra/test/clang-tidy/modernize-use-override-no-destructors.cpp b/clang-tools-extra/test/clang-tidy/modernize-use-override-no-destructors.cpp new file mode 100644 index 0000000000000..eaadb07b947b3 --- /dev/null +++ b/clang-tools-extra/test/clang-tidy/modernize-use-override-no-destructors.cpp @@ -0,0 +1,16 @@ +// RUN: %check_clang_tidy %s modernize-use-override %t -- \ +// RUN: -config="{CheckOptions: [{key: modernize-use-override.IgnoreDestructors, value: 1}]}" \ +// RUN: -- -std=c++11 + +struct Base { + virtual ~Base(); + virtual void f(); +}; + +struct Simple : public Base { + virtual ~Simple(); + // CHECK-MESSAGES-NOT: warning: + virtual void f(); + // CHECK-MESSAGES: :[[@LINE-1]]:16: warning: prefer using + // CHECK-FIXES: {{^}} void f() override; +}; diff --git a/clang-tools-extra/test/clang-tidy/modernize-use-override-with-macro.cpp b/clang-tools-extra/test/clang-tidy/modernize-use-override-with-macro.cpp new file mode 100644 index 0000000000000..ad682f1559136 --- /dev/null +++ b/clang-tools-extra/test/clang-tidy/modernize-use-override-with-macro.cpp @@ -0,0 +1,70 @@ +// RUN: %check_clang_tidy %s modernize-use-override %t -- \ +// RUN: -config="{CheckOptions: [{key: modernize-use-override.OverrideSpelling, value: 'OVERRIDE'},{key: modernize-use-override.FinalSpelling, value: 'FINAL'}]}" \ +// RUN: -- -std=c++11 + +#define ABSTRACT = 0 + +#define OVERRIDE override +#define FINAL final +#define VIRTUAL virtual +#define NOT_VIRTUAL +#define NOT_OVERRIDE + +#define MUST_USE_RESULT __attribute__((warn_unused_result)) +#define UNUSED __attribute__((unused)) + +struct Base { + virtual ~Base() {} + virtual void a(); + virtual void b(); + virtual void c(); + virtual void e() = 0; + virtual void f2() const = 0; + virtual void g() = 0; + virtual void j() const; + virtual void k() = 0; + virtual void l() const; +}; + +struct SimpleCases : public Base { +public: + virtual ~SimpleCases(); + // CHECK-MESSAGES: :[[@LINE-1]]:11: warning: prefer using 'OVERRIDE' or (rarely) 'FINAL' instead of 'virtual' [modernize-use-override] + // CHECK-FIXES: {{^}} ~SimpleCases() OVERRIDE; + + void a(); + // CHECK-MESSAGES: :[[@LINE-1]]:8: warning: annotate this function with 'OVERRIDE' or (rarely) 'FINAL' [modernize-use-override] + // CHECK-FIXES: {{^}} void a() OVERRIDE; + + virtual void b(); + // CHECK-MESSAGES: :[[@LINE-1]]:16: warning: prefer using 'OVERRIDE' or (rarely) 'FINAL' instead of 'virtual' [modernize-use-override] + // CHECK-FIXES: {{^}} void b() OVERRIDE; + + virtual void c(); + // CHECK-MESSAGES: :[[@LINE-1]]:16: warning: prefer using + // CHECK-FIXES: {{^}} void c() OVERRIDE; + + virtual void e() = 0; + // CHECK-MESSAGES: :[[@LINE-1]]:16: warning: prefer using + // CHECK-FIXES: {{^}} void e() OVERRIDE = 0; + + virtual void f2() const = 0; + // CHECK-MESSAGES: :[[@LINE-1]]:16: warning: prefer using + // CHECK-FIXES: {{^}} void f2() const OVERRIDE = 0; + + virtual void g() ABSTRACT; + // CHECK-MESSAGES: :[[@LINE-1]]:16: warning: prefer using + // CHECK-FIXES: {{^}} void g() OVERRIDE ABSTRACT; + + virtual void j() const; + // CHECK-MESSAGES: :[[@LINE-1]]:16: warning: prefer using + // CHECK-FIXES: {{^}} void j() const OVERRIDE; + + virtual void k() OVERRIDE; + // CHECK-MESSAGES: :[[@LINE-1]]:16: warning: 'virtual' is redundant since the function is already declared 'OVERRIDE' [modernize-use-override] + // CHECK-FIXES: {{^}} void k() OVERRIDE; + + virtual void l() const OVERRIDE; + // CHECK-MESSAGES: :[[@LINE-1]]:16: warning: 'virtual' is redundant since the function is already declared 'OVERRIDE' [modernize-use-override] + // CHECK-FIXES: {{^}} void l() const OVERRIDE; +}; diff --git a/clang-tools-extra/test/clang-tidy/modernize-use-override-with-no-macro-inscope.cpp b/clang-tools-extra/test/clang-tidy/modernize-use-override-with-no-macro-inscope.cpp new file mode 100644 index 0000000000000..97b71053d333f --- /dev/null +++ b/clang-tools-extra/test/clang-tidy/modernize-use-override-with-no-macro-inscope.cpp @@ -0,0 +1,28 @@ +// RUN: %check_clang_tidy %s modernize-use-override %t -- \ +// RUN: -config="{CheckOptions: [{key: modernize-use-override.OverrideSpelling, value: 'CUSTOM_OVERRIDE'},{key: modernize-use-override.FinalSpelling, value: 'CUSTOM_FINAL'}]}" \ +// RUN: -- -std=c++11 + +// As if the macro was not defined. +//#define CUSTOM_OVERRIDE override +//#define CUSTOM_FINAL override + +struct Base { + virtual ~Base() {} + virtual void a(); + virtual void b(); +}; + +struct SimpleCases : public Base { +public: + virtual ~SimpleCases(); + // CHECK-MESSAGES: :[[@LINE-1]]:11: warning: prefer using 'CUSTOM_OVERRIDE' or (rarely) 'CUSTOM_FINAL' instead of 'virtual' [modernize-use-override] + // CHECK-FIXES: {{^}} virtual ~SimpleCases(); + + void a(); + // CHECK-MESSAGES: :[[@LINE-1]]:8: warning: annotate this function with 'CUSTOM_OVERRIDE' or (rarely) 'CUSTOM_FINAL' [modernize-use-override] + // CHECK-FIXES: {{^}} void a(); + + virtual void b(); + // CHECK-MESSAGES: :[[@LINE-1]]:16: warning: prefer using 'CUSTOM_OVERRIDE' or (rarely) 'CUSTOM_FINAL' instead of 'virtual' [modernize-use-override] + // CHECK-FIXES: {{^}} virtual void b(); +}; diff --git a/clang-tools-extra/test/clang-tidy/objc-property-declaration.m b/clang-tools-extra/test/clang-tidy/objc-property-declaration.m index 07a062053021a..b56bdcd186c44 100644 --- a/clang-tools-extra/test/clang-tidy/objc-property-declaration.m +++ b/clang-tools-extra/test/clang-tidy/objc-property-declaration.m @@ -46,6 +46,7 @@ @interface Foo (Bar) @property(strong, nonatomic) NSString *URLStr; @property(assign, nonatomic) int abc_camelCase; @property(strong, nonatomic) NSString *abc_URL; +@property(strong, nonatomic) NSString *opac2_sourceComponent; @end @interface Foo () diff --git a/clang-tools-extra/test/clangd/Inputs/background-index/definition.jsonrpc b/clang-tools-extra/test/clangd/Inputs/background-index/definition.jsonrpc index 89d50482300d7..933e7791320e5 100644 --- a/clang-tools-extra/test/clangd/Inputs/background-index/definition.jsonrpc +++ b/clang-tools-extra/test/clangd/Inputs/background-index/definition.jsonrpc @@ -44,7 +44,7 @@ } } } -# CHECK: "uri": "file://DIRECTORY/foo.cpp" +# CHECK: "uri": "file://{{.*}}/foo.cpp" --- {"jsonrpc":"2.0","id":3,"method":"shutdown"} --- diff --git a/clang-tools-extra/test/clangd/background-index.test b/clang-tools-extra/test/clangd/background-index.test index 34c419ac68299..1d11736dfe821 100644 --- a/clang-tools-extra/test/clangd/background-index.test +++ b/clang-tools-extra/test/clangd/background-index.test @@ -13,7 +13,7 @@ # RUN: clangd -background-index -background-index-rebuild-period=0 -lit-test < %t/definition.jsonrpc | FileCheck %t/definition.jsonrpc # Test that the index is writing files in the expected location. -# RUN: ls %t/.clangd-index/foo.cpp.*.idx +# RUN: ls %t/.clangd/index/foo.cpp.*.idx # Test the index is read from disk: delete code and restart clangd. # RUN: rm %t/foo.cpp diff --git a/clang-tools-extra/test/clangd/tweaks-format.test b/clang-tools-extra/test/clangd/tweaks-format.test new file mode 100644 index 0000000000000..8fe7a112acf7e --- /dev/null +++ b/clang-tools-extra/test/clangd/tweaks-format.test @@ -0,0 +1,50 @@ +# RUN: clangd -lit-test < %s | FileCheck %s +{"jsonrpc":"2.0","id":0,"method":"initialize","params":{"processId":123,"rootPath":"clangd","capabilities":{},"trace":"off"}} +--- +{"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"uri":"test:///main.cc","languageId":"cpp","version":1,"text":"int f() { if (true) { return 1; } else {} }"}}} +--- +{"jsonrpc":"2.0","id":5,"method":"textDocument/codeAction","params":{"textDocument":{"uri":"test:///main.cc"},"range":{"start":{"line":0,"character":11},"end":{"line":0,"character":11}},"context":{"diagnostics":[]}}} +--- +{"jsonrpc":"2.0","id":6,"method":"workspace/executeCommand","params":{"command":"clangd.applyTweak","arguments":[{"file":"test:///main.cc","selection":{"end":{"character":11,"line":0},"start":{"character":11,"line":0}},"tweakID":"SwapIfBranches"}]}} +# CHECK: "newText": "\n ", +# CHECK-NEXT: "range": { +# CHECK-NEXT: "end": { +# CHECK-NEXT: "character": 10, +# CHECK-NEXT: "line": 0 +# CHECK-NEXT: }, +# CHECK-NEXT: "start": { +# CHECK-NEXT: "character": 9, +# CHECK-NEXT: "line": 0 +# CHECK-NEXT: } +# CHECK-NEXT: } +# CHECK-NEXT: }, +# CHECK-NEXT: { +# CHECK-NEXT: "newText": "{\n }", +# CHECK-NEXT: "range": { +# CHECK-NEXT: "end": { +# CHECK-NEXT: "character": 33, +# CHECK-NEXT: "line": 0 +# CHECK-NEXT: }, +# CHECK-NEXT: "start": { +# CHECK-NEXT: "character": 20, +# CHECK-NEXT: "line": 0 +# CHECK-NEXT: } +# CHECK-NEXT: } +# CHECK-NEXT: }, +# CHECK-NEXT: { +# CHECK-NEXT: "newText": "{\n return 1;\n }\n", +# CHECK-NEXT: "range": { +# CHECK-NEXT: "end": { +# CHECK-NEXT: "character": 42, +# CHECK-NEXT: "line": 0 +# CHECK-NEXT: }, +# CHECK-NEXT: "start": { +# CHECK-NEXT: "character": 39, +# CHECK-NEXT: "line": 0 +# CHECK-NEXT: } +# CHECK-NEXT: } +# CHECK-NEXT: } +--- +{"jsonrpc":"2.0","id":3,"method":"shutdown"} +--- +{"jsonrpc":"2.0","method":"exit"} diff --git a/clang-tools-extra/unittests/clang-move/ClangMoveTests.cpp b/clang-tools-extra/unittests/clang-move/ClangMoveTests.cpp index 0385a799e04f0..7b005cdd50f18 100644 --- a/clang-tools-extra/unittests/clang-move/ClangMoveTests.cpp +++ b/clang-tools-extra/unittests/clang-move/ClangMoveTests.cpp @@ -1,4 +1,4 @@ -//===-- ClangMoveTest.cpp - clang-move unit tests -------------------------===// +//===-- ClangMoveTests.cpp - clang-move unit tests ------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/clang-tools-extra/unittests/clang-query/QueryEngineTest.cpp b/clang-tools-extra/unittests/clang-query/QueryEngineTest.cpp index df3be130f2fcb..6d728ceeba00d 100644 --- a/clang-tools-extra/unittests/clang-query/QueryEngineTest.cpp +++ b/clang-tools-extra/unittests/clang-query/QueryEngineTest.cpp @@ -1,4 +1,4 @@ -//===---- QueryTest.cpp - clang-query test --------------------------------===// +//===-- QueryEngineTest.cpp - clang-query test ----------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/clang-tools-extra/unittests/clangd/CodeCompleteTests.cpp b/clang-tools-extra/unittests/clangd/CodeCompleteTests.cpp index ba539fc291592..16d8efcf8105a 100644 --- a/clang-tools-extra/unittests/clangd/CodeCompleteTests.cpp +++ b/clang-tools-extra/unittests/clangd/CodeCompleteTests.cpp @@ -17,6 +17,7 @@ #include "SyncAPI.h" #include "TestFS.h" #include "TestIndex.h" +#include "TestTU.h" #include "index/MemIndex.h" #include "clang/Sema/CodeCompleteConsumer.h" #include "llvm/Support/Error.h" @@ -645,6 +646,36 @@ TEST(CompletionTest, CompletionInPreamble) { EXPECT_THAT(Results, ElementsAre(Named("ifndef"))); } +TEST(CompletionTest, DynamicIndexIncludeInsertion) { + MockFSProvider FS; + MockCompilationDatabase CDB; + IgnoreDiagnostics DiagConsumer; + ClangdServer::Options Opts = ClangdServer::optsForTest(); + Opts.BuildDynamicSymbolIndex = true; + ClangdServer Server(CDB, FS, DiagConsumer, Opts); + + FS.Files[testPath("foo_header.h")] = R"cpp( + struct Foo { + // Member doc + int foo(); + }; + )cpp"; + const std::string FileContent(R"cpp( + #include "foo_header.h" + int Foo::foo() { + return 42; + } + )cpp"); + Server.addDocument(testPath("foo_impl.cpp"), FileContent); + // Wait for the dynamic index being built. + ASSERT_TRUE(Server.blockUntilIdleForTest()); + EXPECT_THAT( + completions(Server, "Foo^ foo;").Completions, + ElementsAre(AllOf(Named("Foo"), + HasInclude('"' + testPath("foo_header.h") + '"'), + InsertInclude()))); +} + TEST(CompletionTest, DynamicIndexMultiFile) { MockFSProvider FS; MockCompilationDatabase CDB; @@ -1064,8 +1095,10 @@ TEST(CompletionTest, UnresolvedQualifierIdQuery) { } // namespace ns )cpp"); - EXPECT_THAT(Requests, ElementsAre(Field(&FuzzyFindRequest::Scopes, - UnorderedElementsAre("bar::")))); + EXPECT_THAT(Requests, + ElementsAre(Field( + &FuzzyFindRequest::Scopes, + UnorderedElementsAre("a::bar::", "ns::bar::", "bar::")))); } TEST(CompletionTest, UnresolvedNestedQualifierIdQuery) { @@ -2284,6 +2317,55 @@ TEST(CompletionTest, WorksWithNullType) { EXPECT_THAT(R.Completions, ElementsAre(Named("loopVar"))); } +TEST(CompletionTest, UsingDecl) { + const char *Header(R"cpp( + void foo(int); + namespace std { + using ::foo; + })cpp"); + const char *Source(R"cpp( + void bar() { + std::^; + })cpp"); + auto Index = TestTU::withHeaderCode(Header).index(); + clangd::CodeCompleteOptions Opts; + Opts.Index = Index.get(); + Opts.AllScopes = true; + auto R = completions(Source, {}, Opts); + EXPECT_THAT(R.Completions, + ElementsAre(AllOf(Scope("std::"), Named("foo"), + Kind(CompletionItemKind::Reference)))); +} + +TEST(CompletionTest, ScopeIsUnresolved) { + clangd::CodeCompleteOptions Opts = {}; + Opts.AllScopes = true; + + auto Results = completions(R"cpp( + namespace a { + void f() { b::X^ } + } + )cpp", + {cls("a::b::XYZ")}, Opts); + EXPECT_THAT(Results.Completions, + UnorderedElementsAre(AllOf(Qualifier(""), Named("XYZ")))); +} + +TEST(CompletionTest, NestedScopeIsUnresolved) { + clangd::CodeCompleteOptions Opts = {}; + Opts.AllScopes = true; + + auto Results = completions(R"cpp( + namespace a { + namespace b {} + void f() { b::c::X^ } + } + )cpp", + {cls("a::b::c::XYZ")}, Opts); + EXPECT_THAT(Results.Completions, + UnorderedElementsAre(AllOf(Qualifier(""), Named("XYZ")))); +} + } // namespace } // namespace clangd } // namespace clang diff --git a/clang-tools-extra/unittests/clangd/DexTests.cpp b/clang-tools-extra/unittests/clangd/DexTests.cpp index ce318e2e6e45e..cd52daaca2902 100644 --- a/clang-tools-extra/unittests/clangd/DexTests.cpp +++ b/clang-tools-extra/unittests/clangd/DexTests.cpp @@ -688,6 +688,28 @@ TEST(DexTests, Refs) { EXPECT_THAT(Files, ElementsAre(AnyOf("foo.h", "foo.cc"))); } +TEST(DexTest, PreferredTypesBoosting) { + auto Sym1 = symbol("t1"); + Sym1.Type = "T1"; + auto Sym2 = symbol("t2"); + Sym2.Type = "T2"; + + std::vector Symbols{Sym1, Sym2}; + Dex I(Symbols, RefSlab()); + + FuzzyFindRequest Req; + Req.AnyScope = true; + Req.Query = "t"; + // The best candidate can change depending on the preferred type. + Req.Limit = 1; + + Req.PreferredTypes = {Sym1.Type}; + EXPECT_THAT(match(I, Req), ElementsAre("t1")); + + Req.PreferredTypes = {Sym2.Type}; + EXPECT_THAT(match(I, Req), ElementsAre("t2")); +} + } // namespace } // namespace dex } // namespace clangd diff --git a/clang-tools-extra/unittests/clangd/DiagnosticsTests.cpp b/clang-tools-extra/unittests/clangd/DiagnosticsTests.cpp index ca544013f1c5b..4bbc7c742ffd2 100644 --- a/clang-tools-extra/unittests/clangd/DiagnosticsTests.cpp +++ b/clang-tools-extra/unittests/clangd/DiagnosticsTests.cpp @@ -20,6 +20,7 @@ namespace clang { namespace clangd { namespace { +using testing::_; using testing::ElementsAre; using testing::Field; using testing::IsEmpty; @@ -30,6 +31,11 @@ testing::Matcher WithFix(testing::Matcher FixMatcher) { return Field(&Diag::Fixes, ElementsAre(FixMatcher)); } +testing::Matcher WithFix(testing::Matcher FixMatcher1, + testing::Matcher FixMatcher2) { + return Field(&Diag::Fixes, UnorderedElementsAre(FixMatcher1, FixMatcher2)); +} + testing::Matcher WithNote(testing::Matcher NoteMatcher) { return Field(&Diag::Notes, ElementsAre(NoteMatcher)); } @@ -209,6 +215,18 @@ TEST(DiagnosticsTest, InsideMacros) { "'int *' with an rvalue of type 'int'"))); } +TEST(DiagnosticsTest, NoFixItInMacro) { + Annotations Test(R"cpp( + #define Define(name) void name() {} + + [[Define]](main) + )cpp"); + auto TU = TestTU::withCode(Test.code()); + EXPECT_THAT(TU.build().getDiagnostics(), + ElementsAre(AllOf(Diag(Test.range(), "'main' must return 'int'"), + Not(WithFix(_))))); +} + TEST(DiagnosticsTest, ToLSP) { clangd::Diag D; D.Message = "something terrible happened"; @@ -281,10 +299,31 @@ main.cpp:2:3: error: something terrible happened)"); Pair(EqualToLSPDiag(NoteInMainLSP), IsEmpty()))); } +struct SymbolWithHeader { + std::string QName; + std::string DeclaringFile; + std::string IncludeHeader; +}; + +std::unique_ptr +buildIndexWithSymbol(llvm::ArrayRef Syms) { + SymbolSlab::Builder Slab; + for (const auto &S : Syms) { + Symbol Sym = cls(S.QName); + Sym.Flags |= Symbol::IndexedForCodeCompletion; + Sym.CanonicalDeclaration.FileURI = S.DeclaringFile.c_str(); + Sym.Definition.FileURI = S.DeclaringFile.c_str(); + Sym.IncludeHeaders.emplace_back(S.IncludeHeader, 1); + Slab.insert(Sym); + } + return MemIndex::build(std::move(Slab).build(), RefSlab()); +} + TEST(IncludeFixerTest, IncompleteType) { Annotations Test(R"cpp( $insert[[]]namespace ns { class X; + $nested[[X::]]Nested n; } class Y : $base[[public ns::X]] {}; int main() { @@ -293,20 +332,17 @@ int main() { } )cpp"); auto TU = TestTU::withCode(Test.code()); - Symbol Sym = cls("ns::X"); - Sym.Flags |= Symbol::IndexedForCodeCompletion; - Sym.CanonicalDeclaration.FileURI = "unittest:///x.h"; - Sym.Definition.FileURI = "unittest:///x.h"; - Sym.IncludeHeaders.emplace_back("\"x.h\"", 1); - - SymbolSlab::Builder Slab; - Slab.insert(Sym); - auto Index = MemIndex::build(std::move(Slab).build(), RefSlab()); + auto Index = buildIndexWithSymbol( + {SymbolWithHeader{"ns::X", "unittest:///x.h", "\"x.h\""}}); TU.ExternalIndex = Index.get(); EXPECT_THAT( TU.build().getDiagnostics(), UnorderedElementsAre( + AllOf(Diag(Test.range("nested"), + "incomplete type 'ns::X' named in nested name specifier"), + WithFix(Fix(Test.range("insert"), "#include \"x.h\"\n", + "Add include \"x.h\" for symbol ns::X"))), AllOf(Diag(Test.range("base"), "base class has incomplete type"), WithFix(Fix(Test.range("insert"), "#include \"x.h\"\n", "Add include \"x.h\" for symbol ns::X"))), @@ -346,6 +382,210 @@ int main() { "member access into incomplete type 'ns::X'"))); } +TEST(IncludeFixerTest, Typo) { + Annotations Test(R"cpp( +$insert[[]]namespace ns { +void foo() { + $unqualified1[[X]] x; + // No fix if the unresolved type is used as specifier. (ns::)X::Nested will be + // considered the unresolved type. + $unqualified2[[X]]::Nested n; +} +} +void bar() { + ns::$qualified1[[X]] x; // ns:: is valid. + ns::$qualified2[[X]](); // Error: no member in namespace + + ::$global[[Global]] glob; +} + )cpp"); + auto TU = TestTU::withCode(Test.code()); + auto Index = buildIndexWithSymbol( + {SymbolWithHeader{"ns::X", "unittest:///x.h", "\"x.h\""}, + SymbolWithHeader{"Global", "unittest:///global.h", "\"global.h\""}}); + TU.ExternalIndex = Index.get(); + + EXPECT_THAT( + TU.build().getDiagnostics(), + UnorderedElementsAre( + AllOf(Diag(Test.range("unqualified1"), "unknown type name 'X'"), + WithFix(Fix(Test.range("insert"), "#include \"x.h\"\n", + "Add include \"x.h\" for symbol ns::X"))), + Diag(Test.range("unqualified2"), "use of undeclared identifier 'X'"), + AllOf(Diag(Test.range("qualified1"), + "no type named 'X' in namespace 'ns'"), + WithFix(Fix(Test.range("insert"), "#include \"x.h\"\n", + "Add include \"x.h\" for symbol ns::X"))), + AllOf(Diag(Test.range("qualified2"), + "no member named 'X' in namespace 'ns'"), + WithFix(Fix(Test.range("insert"), "#include \"x.h\"\n", + "Add include \"x.h\" for symbol ns::X"))), + AllOf(Diag(Test.range("global"), + "no type named 'Global' in the global namespace"), + WithFix(Fix(Test.range("insert"), "#include \"global.h\"\n", + "Add include \"global.h\" for symbol Global"))))); +} + +TEST(IncludeFixerTest, MultipleMatchedSymbols) { + Annotations Test(R"cpp( +$insert[[]]namespace na { +namespace nb { +void foo() { + $unqualified[[X]] x; +} +} +} + )cpp"); + auto TU = TestTU::withCode(Test.code()); + auto Index = buildIndexWithSymbol( + {SymbolWithHeader{"na::X", "unittest:///a.h", "\"a.h\""}, + SymbolWithHeader{"na::nb::X", "unittest:///b.h", "\"b.h\""}}); + TU.ExternalIndex = Index.get(); + + EXPECT_THAT(TU.build().getDiagnostics(), + UnorderedElementsAre(AllOf( + Diag(Test.range("unqualified"), "unknown type name 'X'"), + WithFix(Fix(Test.range("insert"), "#include \"a.h\"\n", + "Add include \"a.h\" for symbol na::X"), + Fix(Test.range("insert"), "#include \"b.h\"\n", + "Add include \"b.h\" for symbol na::nb::X"))))); +} + +TEST(IncludeFixerTest, NoCrashMemebrAccess) { + Annotations Test(R"cpp( + struct X { int xyz; }; + void g() { X x; x.$[[xy]] } + )cpp"); + auto TU = TestTU::withCode(Test.code()); + auto Index = buildIndexWithSymbol( + SymbolWithHeader{"na::X", "unittest:///a.h", "\"a.h\""}); + TU.ExternalIndex = Index.get(); + + EXPECT_THAT( + TU.build().getDiagnostics(), + UnorderedElementsAre(Diag(Test.range(), "no member named 'xy' in 'X'"))); +} + +TEST(IncludeFixerTest, UseCachedIndexResults) { + // As index results for the identical request are cached, more than 5 fixes + // are generated. + Annotations Test(R"cpp( +$insert[[]]void foo() { + $x1[[X]] x; + $x2[[X]] x; + $x3[[X]] x; + $x4[[X]] x; + $x5[[X]] x; + $x6[[X]] x; + $x7[[X]] x; +} + +class X; +void bar(X *x) { + x$a1[[->]]f(); + x$a2[[->]]f(); + x$a3[[->]]f(); + x$a4[[->]]f(); + x$a5[[->]]f(); + x$a6[[->]]f(); + x$a7[[->]]f(); +} + )cpp"); + auto TU = TestTU::withCode(Test.code()); + auto Index = + buildIndexWithSymbol(SymbolWithHeader{"X", "unittest:///a.h", "\"a.h\""}); + TU.ExternalIndex = Index.get(); + + auto Parsed = TU.build(); + for (const auto &D : Parsed.getDiagnostics()) { + EXPECT_EQ(D.Fixes.size(), 1u); + EXPECT_EQ(D.Fixes[0].Message, + std::string("Add include \"a.h\" for symbol X")); + } +} + +TEST(IncludeFixerTest, UnresolvedNameAsSpecifier) { + Annotations Test(R"cpp( +$insert[[]]namespace ns { +} +void g() { ns::$[[scope]]::X_Y(); } + )cpp"); + auto TU = TestTU::withCode(Test.code()); + auto Index = buildIndexWithSymbol( + SymbolWithHeader{"ns::scope::X_Y", "unittest:///x.h", "\"x.h\""}); + TU.ExternalIndex = Index.get(); + + EXPECT_THAT( + TU.build().getDiagnostics(), + UnorderedElementsAre(AllOf( + Diag(Test.range(), "no member named 'scope' in namespace 'ns'"), + WithFix(Fix(Test.range("insert"), "#include \"x.h\"\n", + "Add include \"x.h\" for symbol ns::scope::X_Y"))))); +} + +TEST(IncludeFixerTest, UnresolvedSpecifierWithSemaCorrection) { + Annotations Test(R"cpp( +$insert[[]]namespace clang { +void f() { + // "clangd::" will be corrected to "clang::" by Sema. + $q1[[clangd]]::$x[[X]] x; + $q2[[clangd]]::$ns[[ns]]::Y y; +} +} + )cpp"); + auto TU = TestTU::withCode(Test.code()); + auto Index = buildIndexWithSymbol( + {SymbolWithHeader{"clang::clangd::X", "unittest:///x.h", "\"x.h\""}, + SymbolWithHeader{"clang::clangd::ns::Y", "unittest:///y.h", "\"y.h\""}}); + TU.ExternalIndex = Index.get(); + + EXPECT_THAT( + TU.build().getDiagnostics(), + UnorderedElementsAre( + AllOf( + Diag(Test.range("q1"), "use of undeclared identifier 'clangd'; " + "did you mean 'clang'?"), + WithFix(_, // change clangd to clang + Fix(Test.range("insert"), "#include \"x.h\"\n", + "Add include \"x.h\" for symbol clang::clangd::X"))), + AllOf( + Diag(Test.range("x"), "no type named 'X' in namespace 'clang'"), + WithFix(Fix(Test.range("insert"), "#include \"x.h\"\n", + "Add include \"x.h\" for symbol clang::clangd::X"))), + AllOf( + Diag(Test.range("q2"), "use of undeclared identifier 'clangd'; " + "did you mean 'clang'?"), + WithFix( + _, // change clangd to clangd + Fix(Test.range("insert"), "#include \"y.h\"\n", + "Add include \"y.h\" for symbol clang::clangd::ns::Y"))), + AllOf(Diag(Test.range("ns"), + "no member named 'ns' in namespace 'clang'"), + WithFix(Fix( + Test.range("insert"), "#include \"y.h\"\n", + "Add include \"y.h\" for symbol clang::clangd::ns::Y"))))); +} + +TEST(IncludeFixerTest, SpecifiedScopeIsNamespaceAlias) { + Annotations Test(R"cpp( +$insert[[]]namespace a {} +namespace b = a; +namespace c { + b::$[[X]] x; +} + )cpp"); + auto TU = TestTU::withCode(Test.code()); + auto Index = buildIndexWithSymbol( + SymbolWithHeader{"a::X", "unittest:///x.h", "\"x.h\""}); + TU.ExternalIndex = Index.get(); + + EXPECT_THAT(TU.build().getDiagnostics(), + UnorderedElementsAre(AllOf( + Diag(Test.range(), "no type named 'X' in namespace 'a'"), + WithFix(Fix(Test.range("insert"), "#include \"x.h\"\n", + "Add include \"x.h\" for symbol a::X"))))); +} + } // namespace } // namespace clangd } // namespace clang diff --git a/clang-tools-extra/unittests/clangd/FileIndexTests.cpp b/clang-tools-extra/unittests/clangd/FileIndexTests.cpp index 898dd64db0ab7..5667cb8fd5974 100644 --- a/clang-tools-extra/unittests/clangd/FileIndexTests.cpp +++ b/clang-tools-extra/unittests/clangd/FileIndexTests.cpp @@ -12,6 +12,7 @@ #include "SyncAPI.h" #include "TestFS.h" #include "TestTU.h" +#include "index/CanonicalIncludes.h" #include "index/FileIndex.h" #include "index/Index.h" #include "clang/Frontend/CompilerInvocation.h" @@ -147,8 +148,8 @@ void update(FileIndex &M, llvm::StringRef Basename, llvm::StringRef Code) { File.HeaderFilename = (Basename + ".h").str(); File.HeaderCode = Code; auto AST = File.build(); - M.updatePreamble(File.Filename, AST.getASTContext(), - AST.getPreprocessorPtr()); + M.updatePreamble(File.Filename, AST.getASTContext(), AST.getPreprocessorPtr(), + AST.getCanonicalIncludes()); } TEST(FileIndexTest, CustomizedURIScheme) { @@ -199,13 +200,49 @@ TEST(FileIndexTest, ClassMembers) { QName("X::f"))); } -TEST(FileIndexTest, NoIncludeCollected) { +TEST(FileIndexTest, IncludeCollected) { FileIndex M; - update(M, "f", "class string {};"); + update( + M, "f", + "// IWYU pragma: private, include \nclass string {};"); auto Symbols = runFuzzyFind(M, ""); EXPECT_THAT(Symbols, ElementsAre(_)); - EXPECT_THAT(Symbols.begin()->IncludeHeaders, IsEmpty()); + EXPECT_THAT(Symbols.begin()->IncludeHeaders.front().IncludeHeader, + ""); +} + +TEST(FileIndexTest, HasSystemHeaderMappingsInPreamble) { + FileIndex Index; + const std::string Header = R"cpp( + class Foo {}; + )cpp"; + auto MainFile = testPath("foo.cpp"); + auto HeaderFile = testPath("algorithm"); + std::vector Cmd = {"clang", "-xc++", MainFile.c_str(), + "-include", HeaderFile.c_str()}; + // Preparse ParseInputs. + ParseInputs PI; + PI.CompileCommand.Directory = testRoot(); + PI.CompileCommand.Filename = MainFile; + PI.CompileCommand.CommandLine = {Cmd.begin(), Cmd.end()}; + PI.Contents = ""; + PI.FS = buildTestFS({{MainFile, ""}, {HeaderFile, Header}}); + + // Prepare preamble. + auto CI = buildCompilerInvocation(PI); + auto PreambleData = buildPreamble( + MainFile, *buildCompilerInvocation(PI), /*OldPreamble=*/nullptr, + tooling::CompileCommand(), PI, std::make_shared(), + /*StoreInMemory=*/true, + [&](ASTContext &Ctx, std::shared_ptr PP, + const CanonicalIncludes &Includes) { + Index.updatePreamble(MainFile, Ctx, PP, Includes); + }); + auto Symbols = runFuzzyFind(Index, ""); + EXPECT_THAT(Symbols, ElementsAre(_)); + EXPECT_THAT(Symbols.begin()->IncludeHeaders.front().IncludeHeader, + ""); } TEST(FileIndexTest, TemplateParamsInLabel) { @@ -270,10 +307,11 @@ TEST(FileIndexTest, RebuildWithPreamble) { buildPreamble( FooCpp, *CI, /*OldPreamble=*/nullptr, tooling::CompileCommand(), PI, std::make_shared(), /*StoreInMemory=*/true, - [&](ASTContext &Ctx, std::shared_ptr PP) { + [&](ASTContext &Ctx, std::shared_ptr PP, + const CanonicalIncludes &CanonIncludes) { EXPECT_FALSE(IndexUpdated) << "Expected only a single index update"; IndexUpdated = true; - Index.updatePreamble(FooCpp, Ctx, std::move(PP)); + Index.updatePreamble(FooCpp, Ctx, std::move(PP), CanonIncludes); }); ASSERT_TRUE(IndexUpdated); @@ -358,7 +396,8 @@ TEST(FileIndexTest, ReferencesInMainFileWithPreamble) { MainFile, *buildCompilerInvocation(PI), /*OldPreamble=*/nullptr, tooling::CompileCommand(), PI, std::make_shared(), /*StoreInMemory=*/true, - [&](ASTContext &Ctx, std::shared_ptr PP) {}); + [&](ASTContext &Ctx, std::shared_ptr PP, + const CanonicalIncludes &) {}); // Build AST for main file with preamble. auto AST = ParsedAST::build(createInvocationFromCommandLine(Cmd), PreambleData, diff --git a/clang-tools-extra/unittests/clangd/FindSymbolsTests.cpp b/clang-tools-extra/unittests/clangd/FindSymbolsTests.cpp index 78447f35e319d..05fa42e9f6f69 100644 --- a/clang-tools-extra/unittests/clangd/FindSymbolsTests.cpp +++ b/clang-tools-extra/unittests/clangd/FindSymbolsTests.cpp @@ -368,9 +368,6 @@ TEST_F(DocumentSymbolsTest, BasicSymbols) { // Namespace alias namespace baz = bar; - // FIXME: using declaration is not supported as the IndexAction will ignore - // implicit declarations (the implicit using shadow declaration) by default, - // and there is no way to customize this behavior at the moment. using bar::v2; } // namespace foo )"); @@ -415,7 +412,7 @@ TEST_F(DocumentSymbolsTest, BasicSymbols) { Children()))), AllOf(WithName("baz"), WithKind(SymbolKind::Namespace), Children()), - AllOf(WithName("v2"), WithKind(SymbolKind::Variable))))})); + AllOf(WithName("v2"), WithKind(SymbolKind::Namespace))))})); } TEST_F(DocumentSymbolsTest, DeclarationDefinition) { diff --git a/clang-tools-extra/unittests/clangd/FunctionTests.cpp b/clang-tools-extra/unittests/clangd/FunctionTests.cpp index dc12186d08ff7..0cd8b7910463f 100644 --- a/clang-tools-extra/unittests/clangd/FunctionTests.cpp +++ b/clang-tools-extra/unittests/clangd/FunctionTests.cpp @@ -1,4 +1,4 @@ -//===-- FunctionsTests.cpp ------------------------------------------------===// +//===-- FunctionTests.cpp -------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/clang-tools-extra/unittests/clangd/IndexTests.cpp b/clang-tools-extra/unittests/clangd/IndexTests.cpp index 4ca88cae50cc1..7d60ede1c38c8 100644 --- a/clang-tools-extra/unittests/clangd/IndexTests.cpp +++ b/clang-tools-extra/unittests/clangd/IndexTests.cpp @@ -253,6 +253,22 @@ TEST(MergeTest, PreferSymbolWithDefn) { EXPECT_EQ(M.Name, "right"); } +TEST(MergeTest, PreferSymbolLocationInCodegenFile) { + Symbol L, R; + + L.ID = R.ID = SymbolID("hello"); + L.CanonicalDeclaration.FileURI = "file:/x.proto.h"; + R.CanonicalDeclaration.FileURI = "file:/x.proto"; + + Symbol M = mergeSymbol(L, R); + EXPECT_EQ(StringRef(M.CanonicalDeclaration.FileURI), "file:/x.proto"); + + // Prefer L if both have codegen suffix. + L.CanonicalDeclaration.FileURI = "file:/y.proto"; + M = mergeSymbol(L, R); + EXPECT_EQ(StringRef(M.CanonicalDeclaration.FileURI), "file:/y.proto"); +} + TEST(MergeIndexTest, Refs) { FileIndex Dyn; FileIndex StaticIndex; diff --git a/clang-tools-extra/unittests/clangd/QualityTests.cpp b/clang-tools-extra/unittests/clangd/QualityTests.cpp index e2fe8f3a94d88..b797a48f7c79e 100644 --- a/clang-tools-extra/unittests/clangd/QualityTests.cpp +++ b/clang-tools-extra/unittests/clangd/QualityTests.cpp @@ -1,4 +1,4 @@ -//===-- SourceCodeTests.cpp ------------------------------------*- C++ -*-===// +//===-- QualityTests.cpp ----------------------------------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/clang-tools-extra/unittests/clangd/SelectionTests.cpp b/clang-tools-extra/unittests/clangd/SelectionTests.cpp index 6cfee5d2e4610..2d962712dbb28 100644 --- a/clang-tools-extra/unittests/clangd/SelectionTests.cpp +++ b/clang-tools-extra/unittests/clangd/SelectionTests.cpp @@ -1,4 +1,4 @@ -//===-- RIFFTests.cpp - Binary container unit tests -----------------------===// +//===-- SelectionTests.cpp - ----------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -176,6 +176,16 @@ TEST(SelectionTest, CommonAncestor) { // Node types that have caused problems in the past. {"template void foo() { [[^T]] t; }", "TypeLoc"}, + + // No crash + { + R"cpp( + template struct Foo {}; + template <[[template class /*cursor here*/^U]]> + struct Foo*> {}; + )cpp", + "TemplateTemplateParmDecl" + }, }; for (const Case &C : Cases) { Annotations Test(C.Code); @@ -222,6 +232,11 @@ TEST(SelectionTest, Selected) { }]]]] } )cpp", + R"cpp( + template + struct unique_ptr {}; + void foo(^$C[[unique_ptr>]]^ a) {} + )cpp", }; for (const char *C : Cases) { Annotations Test(C); diff --git a/clang-tools-extra/unittests/clangd/SymbolCollectorTests.cpp b/clang-tools-extra/unittests/clangd/SymbolCollectorTests.cpp index 258cfa9dc673c..d795286fd799e 100644 --- a/clang-tools-extra/unittests/clangd/SymbolCollectorTests.cpp +++ b/clang-tools-extra/unittests/clangd/SymbolCollectorTests.cpp @@ -212,6 +212,12 @@ class SymbolIndexActionFactory : public tooling::FrontendActionFactory { return WrapperFrontendAction::CreateASTConsumer(CI, InFile); } + bool BeginInvocation(CompilerInstance &CI) override { + // Make the compiler parse all comments. + CI.getLangOpts().CommentOpts.ParseAllComments = true; + return WrapperFrontendAction::BeginInvocation(CI); + } + private: index::IndexingOptions IndexOpts; CommentHandler *PragmaHandler; @@ -325,9 +331,6 @@ TEST_F(SymbolCollectorTest, CollectSymbols) { // Namespace alias namespace baz = bar; - // FIXME: using declaration is not supported as the IndexAction will ignore - // implicit declarations (the implicit using shadow declaration) by default, - // and there is no way to customize this behavior at the moment. using bar::v2; } // namespace foo )"; @@ -354,6 +357,7 @@ TEST_F(SymbolCollectorTest, CollectSymbols) { AllOf(QName("foo::int32_t"), ForCodeCompletion(true)), AllOf(QName("foo::v1"), ForCodeCompletion(true)), AllOf(QName("foo::bar::v2"), ForCodeCompletion(true)), + AllOf(QName("foo::v2"), ForCodeCompletion(true)), AllOf(QName("foo::baz"), ForCodeCompletion(true))})); } @@ -710,6 +714,31 @@ TEST_F(SymbolCollectorTest, SymbolsInMainFile) { QName("main_f"))); } +TEST_F(SymbolCollectorTest, Documentation) { + const std::string Header = R"( + // Doc Foo + class Foo { + // Doc f + int f(); + }; + )"; + CollectorOpts.StoreAllDocumentation = false; + runSymbolCollector(Header, /* Main */ ""); + EXPECT_THAT(Symbols, + UnorderedElementsAre( + AllOf(QName("Foo"), Doc("Doc Foo"), ForCodeCompletion(true)), + AllOf(QName("Foo::f"), Doc(""), ReturnType(""), + ForCodeCompletion(false)))); + + CollectorOpts.StoreAllDocumentation = true; + runSymbolCollector(Header, /* Main */ ""); + EXPECT_THAT(Symbols, + UnorderedElementsAre( + AllOf(QName("Foo"), Doc("Doc Foo"), ForCodeCompletion(true)), + AllOf(QName("Foo::f"), Doc("Doc f"), ReturnType(""), + ForCodeCompletion(false)))); +} + TEST_F(SymbolCollectorTest, ClassMembers) { const std::string Header = R"( class Foo { @@ -1118,6 +1147,16 @@ TEST_F(SymbolCollectorTest, ImplementationDetail) { AllOf(QName("Public"), Not(ImplementationDetail())))); } +TEST_F(SymbolCollectorTest, UsingDecl) { + const char *Header = R"( + void foo(); + namespace std { + using ::foo; + })"; + runSymbolCollector(Header, /**/ ""); + EXPECT_THAT(Symbols, Contains(QName("std::foo"))); +} + } // namespace } // namespace clangd } // namespace clang diff --git a/clang-tools-extra/unittests/clangd/SymbolInfoTests.cpp b/clang-tools-extra/unittests/clangd/SymbolInfoTests.cpp index 69a27f2339433..e0a9ecdc1f8a7 100644 --- a/clang-tools-extra/unittests/clangd/SymbolInfoTests.cpp +++ b/clang-tools-extra/unittests/clangd/SymbolInfoTests.cpp @@ -167,7 +167,8 @@ TEST(SymbolInfoTests, All) { )cpp", {CreateExpectedSymbolDetails("foo", "", "c:@F@foo#"), CreateExpectedSymbolDetails("foo", "", "c:@F@foo#b#"), - CreateExpectedSymbolDetails("foo", "", "c:@F@foo#I#")}}, + CreateExpectedSymbolDetails("foo", "", "c:@F@foo#I#"), + CreateExpectedSymbolDetails("foo", "bar::", "c:@N@bar@UD@foo")}}, { R"cpp( // Multiple symbols returned - implicit conversion struct foo {}; @@ -180,12 +181,8 @@ TEST(SymbolInfoTests, All) { func_baz1(f^f); } )cpp", - { - CreateExpectedSymbolDetails( - "ff", "func_baz2", "c:TestTU.cpp@218@F@func_baz2#@ff"), - CreateExpectedSymbolDetails( - "bar", "bar::", "c:@S@bar@F@bar#&1$@S@foo#"), - }}, + {CreateExpectedSymbolDetails( + "ff", "func_baz2", "c:TestTU.cpp@218@F@func_baz2#@ff")}}, { R"cpp( // Type reference - declaration struct foo; @@ -213,14 +210,14 @@ TEST(SymbolInfoTests, All) { T^T t; }; )cpp", - {/* not implemented */}}, + {CreateExpectedSymbolDetails("TT", "bar::", "c:TestTU.cpp@65")}}, { R"cpp( // Template parameter reference - type param template struct bar { int a = N^N; }; )cpp", - {/* not implemented */}}, + {CreateExpectedSymbolDetails("NN", "bar::", "c:TestTU.cpp@65")}}, { R"cpp( // Class member reference - objec struct foo { @@ -301,6 +298,12 @@ TEST(SymbolInfoTests, All) { } )cpp", {CreateExpectedSymbolDetails("bar", "foo::", "c:@E@foo@bar")}}, + { + R"cpp( // Parameters in declarations + void foo(int ba^r); + )cpp", + {CreateExpectedSymbolDetails("bar", "foo", + "c:TestTU.cpp@50@F@foo#I#@bar")}}, { R"cpp( // Type inferrence with auto keyword struct foo {}; diff --git a/clang-tools-extra/unittests/clangd/TestIndex.cpp b/clang-tools-extra/unittests/clangd/TestIndex.cpp index 877bb75e75361..89e9646f7386a 100644 --- a/clang-tools-extra/unittests/clangd/TestIndex.cpp +++ b/clang-tools-extra/unittests/clangd/TestIndex.cpp @@ -1,4 +1,4 @@ -//===-- IndexHelpers.cpp ----------------------------------------*- C++ -*-===// +//===-- TestIndex.cpp -------------------------------------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/clang-tools-extra/unittests/clangd/TestTU.cpp b/clang-tools-extra/unittests/clangd/TestTU.cpp index 8c61bb8005353..c2f0d897a0e83 100644 --- a/clang-tools-extra/unittests/clangd/TestTU.cpp +++ b/clang-tools-extra/unittests/clangd/TestTU.cpp @@ -59,13 +59,15 @@ ParsedAST TestTU::build() const { SymbolSlab TestTU::headerSymbols() const { auto AST = build(); - return indexHeaderSymbols(AST.getASTContext(), AST.getPreprocessorPtr()); + return indexHeaderSymbols(AST.getASTContext(), AST.getPreprocessorPtr(), + AST.getCanonicalIncludes()); } std::unique_ptr TestTU::index() const { auto AST = build(); auto Idx = llvm::make_unique(/*UseDex=*/true); - Idx->updatePreamble(Filename, AST.getASTContext(), AST.getPreprocessorPtr()); + Idx->updatePreamble(Filename, AST.getASTContext(), AST.getPreprocessorPtr(), + AST.getCanonicalIncludes()); Idx->updateMain(Filename, AST); return std::move(Idx); } diff --git a/clang-tools-extra/unittests/clangd/TweakTests.cpp b/clang-tools-extra/unittests/clangd/TweakTests.cpp index f747c9919d881..baa60292e3dfa 100644 --- a/clang-tools-extra/unittests/clangd/TweakTests.cpp +++ b/clang-tools-extra/unittests/clangd/TweakTests.cpp @@ -1,9 +1,8 @@ //===-- TweakTests.cpp ------------------------------------------*- C++ -*-===// // -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// diff --git a/clang-tools-extra/unittests/clangd/XRefsTests.cpp b/clang-tools-extra/unittests/clangd/XRefsTests.cpp index e68790a2c0897..df795b1c55298 100644 --- a/clang-tools-extra/unittests/clangd/XRefsTests.cpp +++ b/clang-tools-extra/unittests/clangd/XRefsTests.cpp @@ -86,6 +86,10 @@ TEST(HighlightsTest, All) { auto *X = &[[foo]]; } )cpp", + + R"cpp(// Function parameter in decl + void foo(int [[^bar]]); + )cpp", }; for (const char *Test : Tests) { Annotations T(Test); @@ -180,6 +184,26 @@ TEST(LocateSymbol, WithIndex) { ElementsAre(Sym("Forward", SymbolHeader.range("forward"), Test.range()))); } +TEST(LocateSymbol, WithIndexPreferredLocation) { + Annotations SymbolHeader(R"cpp( + class $[[Proto]] {}; + )cpp"); + TestTU TU; + TU.HeaderCode = SymbolHeader.code(); + TU.HeaderFilename = "x.proto"; // Prefer locations in codegen files. + auto Index = TU.index(); + + Annotations Test(R"cpp(// only declaration in AST. + // Shift to make range different. + class [[Proto]]; + P^roto* create(); + )cpp"); + + auto AST = TestTU::withCode(Test.code()).build(); + auto Locs = clangd::locateSymbolAt(AST, Test.point(), Index.get()); + EXPECT_THAT(Locs, ElementsAre(Sym("Proto", SymbolHeader.range()))); +} + TEST(LocateSymbol, All) { // Ranges in tests: // $decl is the declaration location (if absent, no symbol is located) @@ -261,11 +285,15 @@ TEST(LocateSymbol, All) { } )cpp", - /* FIXME: clangIndex doesn't handle template type parameters R"cpp(// Template type parameter - template <[[typename T]]> + template void foo() { ^T t; } - )cpp", */ + )cpp", + + R"cpp(// Template template type parameter + template class [[T]]> + void foo() { ^T t; } + )cpp", R"cpp(// Namespace namespace $decl[[ns]] { @@ -326,6 +354,68 @@ TEST(LocateSymbol, All) { FF(); void f() { T^est a; } )cpp", + + R"cpp(// explicit template specialization + template + struct Foo { void bar() {} }; + + template <> + struct [[Foo]] { void bar() {} }; + + void foo() { + Foo abc; + Fo^o b; + } + )cpp", + + R"cpp(// implicit template specialization + template + struct [[Foo]] { void bar() {} }; + template <> + struct Foo { void bar() {} }; + void foo() { + Fo^o abc; + Foo b; + } + )cpp", + + R"cpp(// partial template specialization + template + struct Foo { void bar() {} }; + template + struct [[Foo]] { void bar() {} }; + ^Foo x; + )cpp", + + R"cpp(// function template specializations + template + void foo(T) {} + template <> + void [[foo]](int) {} + void bar() { + fo^o(10); + } + )cpp", + + R"cpp(// variable template decls + template + T var = T(); + + template <> + double [[var]] = 10; + + double y = va^r; + )cpp", + + R"cpp(// No implicit constructors + class X { + X(X&& x) = default; + }; + X [[makeX]]() {} + void foo() { + auto x = m^akeX(); + } + )cpp", }; for (const char *Test : Tests) { Annotations T(Test); @@ -373,20 +463,25 @@ TEST(LocateSymbol, Ambiguous) { Foo c = $3^f(); $4^g($5^f()); g($6^str); + Foo ab$7^c; + Foo ab$8^cd("asdf"); + Foo foox = Fo$9^o("asdf"); } )cpp"); auto AST = TestTU::withCode(T.code()).build(); // Ordered assertions are deliberate: we expect a predictable order. - EXPECT_THAT(locateSymbolAt(AST, T.point("1")), - ElementsAre(Sym("str"), Sym("Foo"))); + EXPECT_THAT(locateSymbolAt(AST, T.point("1")), ElementsAre(Sym("str"))); EXPECT_THAT(locateSymbolAt(AST, T.point("2")), ElementsAre(Sym("str"))); - EXPECT_THAT(locateSymbolAt(AST, T.point("3")), - ElementsAre(Sym("f"), Sym("Foo"))); + EXPECT_THAT(locateSymbolAt(AST, T.point("3")), ElementsAre(Sym("f"))); EXPECT_THAT(locateSymbolAt(AST, T.point("4")), ElementsAre(Sym("g"))); - EXPECT_THAT(locateSymbolAt(AST, T.point("5")), - ElementsAre(Sym("f"), Sym("Foo"))); - EXPECT_THAT(locateSymbolAt(AST, T.point("6")), - ElementsAre(Sym("str"), Sym("Foo"), Sym("Foo"))); + EXPECT_THAT(locateSymbolAt(AST, T.point("5")), ElementsAre(Sym("f"))); + EXPECT_THAT(locateSymbolAt(AST, T.point("6")), ElementsAre(Sym("str"))); + EXPECT_THAT(locateSymbolAt(AST, T.point("7")), ElementsAre(Sym("abc"))); + EXPECT_THAT(locateSymbolAt(AST, T.point("8")), + ElementsAre(Sym("Foo"), Sym("abcd"))); + EXPECT_THAT(locateSymbolAt(AST, T.point("9")), + // First one is class definition, second is the constructor. + ElementsAre(Sym("Foo"), Sym("Foo"))); } TEST(LocateSymbol, RelPathsInCompileCommand) { @@ -648,7 +743,25 @@ TEST(Hover, All) { #define MACRO 2 #undef macro )cpp", - "#define MACRO", + "#define MACRO 1", + }, + { + R"cpp(// Macro + #define MACRO 0 + #define MACRO2 ^MACRO + )cpp", + "#define MACRO 0", + }, + { + R"cpp(// Macro + #define MACRO {\ + return 0;\ + } + int main() ^MACRO + )cpp", + R"cpp(#define MACRO {\ + return 0;\ + })cpp", }, { R"cpp(// Forward class declaration diff --git a/clang/CMakeLists.txt b/clang/CMakeLists.txt index 1cd764e3e1f39..6f3462459e629 100644 --- a/clang/CMakeLists.txt +++ b/clang/CMakeLists.txt @@ -75,6 +75,11 @@ if( CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR ) set(LIBRARY_DIR ${LLVM_LIBRARY_DIR}) set(INCLUDE_DIR ${LLVM_INCLUDE_DIR}) set(LLVM_OBJ_DIR ${LLVM_BINARY_DIR}) + # The LLVM_CMAKE_PATH variable is set when doing non-standalone builds and + # used in this project, so we need to make sure we set this value. + # FIXME: LLVM_CMAKE_DIR comes from LLVMConfig.cmake. We should rename + # LLVM_CMAKE_PATH to LLVM_CMAKE_DIR throughout the project. + set(LLVM_CMAKE_PATH ${LLVM_CMAKE_DIR}) endif() set(LLVM_TOOLS_BINARY_DIR ${TOOLS_BINARY_DIR} CACHE PATH "Path to llvm/bin") @@ -546,6 +551,27 @@ if( CLANG_INCLUDE_DOCS ) add_subdirectory(docs) endif() +# Custom target to install all clang libraries. +add_custom_target(clang-libraries) +set_target_properties(clang-libraries PROPERTIES FOLDER "Misc") + +if(NOT LLVM_ENABLE_IDE) + add_llvm_install_targets(install-clang-libraries + DEPENDS clang-libraries + COMPONENT clang-libraries) +endif() + +get_property(CLANG_LIBS GLOBAL PROPERTY CLANG_LIBS) +if(CLANG_LIBS) + list(REMOVE_DUPLICATES CLANG_LIBS) + foreach(lib ${CLANG_LIBS}) + add_dependencies(clang-libraries ${lib}) + if(NOT LLVM_ENABLE_IDE) + add_dependencies(install-clang-libraries install-${lib}) + endif() + endforeach() +endif() + add_subdirectory(cmake/modules) if(CLANG_STAGE) diff --git a/clang/bindings/python/clang/cindex.py b/clang/bindings/python/clang/cindex.py index 2c97d01a104a7..d9684db17512b 100644 --- a/clang/bindings/python/clang/cindex.py +++ b/clang/bindings/python/clang/cindex.py @@ -1342,6 +1342,9 @@ def __repr__(self): CursorKind.DLLEXPORT_ATTR = CursorKind(418) CursorKind.DLLIMPORT_ATTR = CursorKind(419) +CursorKind.CONVERGENT_ATTR = CursorKind(438) +CursorKind.WARN_UNUSED_ATTR = CursorKind(439) +CursorKind.WARN_UNUSED_RESULT_ATTR = CursorKind(440) ### # Preprocessing diff --git a/clang/cmake/caches/Apple-stage2.cmake b/clang/cmake/caches/Apple-stage2.cmake index c7f3f04b420aa..996c64e62212a 100644 --- a/clang/cmake/caches/Apple-stage2.cmake +++ b/clang/cmake/caches/Apple-stage2.cmake @@ -60,8 +60,9 @@ set(LLVM_DISTRIBUTION_COMPONENTS clang LTO clang-format - clang-headers + clang-resource-headers cxx-headers + Remarks ${LLVM_TOOLCHAIN_TOOLS} CACHE STRING "") diff --git a/clang/cmake/caches/BaremetalARM.cmake b/clang/cmake/caches/BaremetalARM.cmake index d9d2efcbb4bb5..85295d9db392a 100644 --- a/clang/cmake/caches/BaremetalARM.cmake +++ b/clang/cmake/caches/BaremetalARM.cmake @@ -41,7 +41,7 @@ set(LLVM_TOOLCHAIN_TOOLS set(LLVM_DISTRIBUTION_COMPONENTS clang lld - clang-headers + clang-resource-headers builtins-armv6m-none-eabi builtins-armv7m-none-eabi builtins-armv7em-none-eabi diff --git a/clang/cmake/caches/DistributionExample-stage2.cmake b/clang/cmake/caches/DistributionExample-stage2.cmake index 600ba56e45634..305139cdc4ad2 100644 --- a/clang/cmake/caches/DistributionExample-stage2.cmake +++ b/clang/cmake/caches/DistributionExample-stage2.cmake @@ -23,7 +23,7 @@ set(LLVM_DISTRIBUTION_COMPONENTS clang LTO clang-format - clang-headers + clang-resource-headers builtins runtimes ${LLVM_TOOLCHAIN_TOOLS} diff --git a/clang/cmake/caches/Fuchsia-stage2.cmake b/clang/cmake/caches/Fuchsia-stage2.cmake index 62fef7bb908bd..51efb2ddb8dfe 100644 --- a/clang/cmake/caches/Fuchsia-stage2.cmake +++ b/clang/cmake/caches/Fuchsia-stage2.cmake @@ -163,12 +163,11 @@ set(LLVM_TOOLCHAIN_TOOLS set(LLVM_DISTRIBUTION_COMPONENTS clang - libclang lld LTO clang-apply-replacements clang-format - clang-headers + clang-resource-headers clang-include-fixer clang-refactor clang-tidy diff --git a/clang/cmake/caches/Fuchsia.cmake b/clang/cmake/caches/Fuchsia.cmake index e4a130ecfcfec..6b4fefcb04804 100644 --- a/clang/cmake/caches/Fuchsia.cmake +++ b/clang/cmake/caches/Fuchsia.cmake @@ -74,6 +74,12 @@ if(BOOTSTRAP_CMAKE_SYSTEM_NAME) endif() endif() +if(UNIX) + set(BOOTSTRAP_CMAKE_SHARED_LINKER_FLAGS "-ldl -lpthread" CACHE STRING "") + set(BOOTSTRAP_CMAKE_MODULE_LINKER_FLAGS "-ldl -lpthread" CACHE STRING "") + set(BOOTSTRAP_CMAKE_EXE_LINKER_FLAGS "-ldl -lpthread" CACHE STRING "") +endif() + set(BOOTSTRAP_LLVM_ENABLE_LTO ON CACHE BOOL "") if(NOT APPLE) set(BOOTSTRAP_LLVM_ENABLE_LLD ON CACHE BOOL "") diff --git a/clang/cmake/modules/AddClang.cmake b/clang/cmake/modules/AddClang.cmake index 7e22f16f365b0..76ff6b1f152d8 100644 --- a/clang/cmake/modules/AddClang.cmake +++ b/clang/cmake/modules/AddClang.cmake @@ -91,6 +91,7 @@ macro(add_clang_library name) if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY OR ${name} STREQUAL "libclang") if(${name} IN_LIST LLVM_DISTRIBUTION_COMPONENTS OR + "clang-libraries" IN_LIST LLVM_DISTRIBUTION_COMPONENTS OR NOT LLVM_DISTRIBUTION_COMPONENTS) set(export_to_clangtargets EXPORT ClangTargets) set_property(GLOBAL PROPERTY CLANG_HAS_EXPORTS True) @@ -103,11 +104,13 @@ macro(add_clang_library name) ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX} RUNTIME DESTINATION bin) - if (${ARG_SHARED} AND NOT CMAKE_CONFIGURATION_TYPES) + if (NOT LLVM_ENABLE_IDE) add_llvm_install_targets(install-${name} DEPENDS ${name} COMPONENT ${name}) endif() + + set_property(GLOBAL APPEND PROPERTY CLANG_LIBS ${name}) endif() set_property(GLOBAL APPEND PROPERTY CLANG_EXPORTS ${name}) else() @@ -131,7 +134,7 @@ macro(add_clang_tool name) endif() add_clang_executable(${name} ${ARGN}) - add_dependencies(${name} clang-headers) + add_dependencies(${name} clang-resource-headers) if (CLANG_BUILD_TOOLS) if(${name} IN_LIST LLVM_DISTRIBUTION_COMPONENTS OR @@ -145,7 +148,7 @@ macro(add_clang_tool name) RUNTIME DESTINATION bin COMPONENT ${name}) - if(NOT CMAKE_CONFIGURATION_TYPES) + if(NOT LLVM_ENABLE_IDE) add_llvm_install_targets(install-${name} DEPENDS ${name} COMPONENT ${name}) diff --git a/clang/cmake/modules/CMakeLists.txt b/clang/cmake/modules/CMakeLists.txt index be6d1d7257bc1..d233f552f01f9 100644 --- a/clang/cmake/modules/CMakeLists.txt +++ b/clang/cmake/modules/CMakeLists.txt @@ -55,10 +55,19 @@ set(CLANG_CONFIG_EXPORTS_FILE) if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY) get_property(clang_has_exports GLOBAL PROPERTY CLANG_HAS_EXPORTS) if(clang_has_exports) - install(EXPORT ClangTargets DESTINATION ${CLANG_INSTALL_PACKAGE_DIR}) + install(EXPORT ClangTargets DESTINATION ${CLANG_INSTALL_PACKAGE_DIR} + COMPONENT clang-cmake-exports) endif() install(FILES ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/ClangConfig.cmake - DESTINATION ${CLANG_INSTALL_PACKAGE_DIR}) + DESTINATION ${CLANG_INSTALL_PACKAGE_DIR} + COMPONENT clang-cmake-exports) + + if(NOT LLVM_ENABLE_IDE) + # Add a dummy target so this can be used with LLVM_DISTRIBUTION_COMPONENTS + add_custom_target(clang-cmake-exports) + add_llvm_install_targets(install-clang-cmake-exports + COMPONENT clang-cmake-exports) + endif() endif() diff --git a/clang/docs/ClangFormatStyleOptions.rst b/clang/docs/ClangFormatStyleOptions.rst index ce821ba9c10f2..582b9d938cc19 100644 --- a/clang/docs/ClangFormatStyleOptions.rst +++ b/clang/docs/ClangFormatStyleOptions.rst @@ -925,19 +925,28 @@ the configuration (without a prefix: ``Auto``). .. code-block:: c++ - try { + try + { foo(); } - catch () { + catch () + { } void foo() { bar(); } - class foo { + class foo + { }; - if (foo()) { + if (foo()) + { } - else { + else + { } - enum X : int { A, B }; + enum X : int + { + A, + B + }; * ``BS_GNU`` (in configuration: ``GNU``) Always break before braces and add an extra level of indentation to diff --git a/clang/docs/ClangStaticAnalyzer.rst b/clang/docs/ClangStaticAnalyzer.rst new file mode 100644 index 0000000000000..f18fd81384e5a --- /dev/null +++ b/clang/docs/ClangStaticAnalyzer.rst @@ -0,0 +1,19 @@ +===================== +Clang Static Analyzer +===================== + +The Clang Static Analyzer is a source code analysis tool that finds bugs in C, C++, and Objective-C programs. +It implements *path-sensitive*, *inter-procedural analysis* based on *symbolic execution* technique. + +This is the Static Analyzer documentation page. + +See the `Official Tool Page `_. + +.. toctree:: + :caption: Table of Contents + :numbered: + :maxdepth: 2 + + analyzer/checkers + analyzer/developer-docs + diff --git a/clang/docs/HardwareAssistedAddressSanitizerDesign.rst b/clang/docs/HardwareAssistedAddressSanitizerDesign.rst index 6bbfcb7192cb4..12e2cc25256fe 100644 --- a/clang/docs/HardwareAssistedAddressSanitizerDesign.rst +++ b/clang/docs/HardwareAssistedAddressSanitizerDesign.rst @@ -131,7 +131,8 @@ HWASAN: https://www.kernel.org/doc/Documentation/arm64/tagged-pointers.txt). * **Does not require redzones to detect buffer overflows**, but the buffer overflow detection is probabilistic, with roughly - `(2**TS-1)/(2**TS)` probability of catching a bug. + `1/(2**TS)` chance of missing a bug (6.25% or 0.39% with 4 and 8-bit TS + respectively). * **Does not require quarantine to detect heap-use-after-free, or stack-use-after-return**. The detection is similarly probabilistic. diff --git a/clang/docs/LibASTMatchersReference.html b/clang/docs/LibASTMatchersReference.html index 2af0a7c9e33dd..d2984844a4dd6 100644 --- a/clang/docs/LibASTMatchersReference.html +++ b/clang/docs/LibASTMatchersReference.html @@ -788,6 +788,11 @@

Node Matchers

+Matcher<Stmt>chooseExprMatcher<ChooseExpr>... +
Matches GNU __builtin_choose_expr.
+
+ + Matcher<Stmt>compoundLiteralExprMatcher<CompoundLiteralExpr>...
Matches compound (i.e. non-scalar) literals
 
@@ -4810,16 +4815,20 @@ 

AST Traversal Matchers

Matcher<CXXDependentScopeMemberExpr>hasObjectExpressionMatcher<Expr> InnerMatcher -
Matches a member expression where the object expression is
-matched by a given matcher.
+
Matches a member expression where the object expression is matched by a
+given matcher. Implicit object expressions are included; that is, it matches
+use of implicit `this`.
 
 Given
-  struct X { int m; };
-  void f(X x) { x.m; m; }
-memberExpr(hasObjectExpression(hasType(cxxRecordDecl(hasName("X")))))))
-  matches "x.m" and "m"
-with hasObjectExpression(...)
-  matching "x" and the implicit object expression of "m" which has type X*.
+  struct X {
+    int m;
+    int f(X x) { x.m; return m; }
+  };
+memberExpr(hasObjectExpression(hasType(cxxRecordDecl(hasName("X")))))
+  matches `x.m`, but not `m`; however,
+memberExpr(hasObjectExpression(hasType(pointsTo(
+     cxxRecordDecl(hasName("X"))))))
+  matches `m` (aka. `this->m`), but not `x.m`.
 
@@ -4857,16 +4866,39 @@

AST Traversal Matchers

Matcher<CXXMemberCallExpr>onImplicitObjectArgumentMatcher<Expr> InnerMatcher -

+
Matches on the implicit object argument of a member call expression. Unlike
+`on`, matches the argument directly without stripping away anything.
+
+Given
+  class Y { public: void m(); };
+  Y g();
+  class X : public Y { void g(); };
+  void z(Y y, X x) { y.m(); x.m(); x.g(); (g()).m(); }
+cxxMemberCallExpr(onImplicitObjectArgument(hasType(
+    cxxRecordDecl(hasName("Y")))))
+  matches `y.m()`, `x.m()` and (g()).m(), but not `x.g()`.
+cxxMemberCallExpr(on(callExpr()))
+  does not match `(g()).m()`, because the parens are not ignored.
+
+FIXME: Overload to allow directly matching types?
+
Matcher<CXXMemberCallExpr>onMatcher<Expr> InnerMatcher -
Matches on the implicit object argument of a member call expression.
+
Matches on the implicit object argument of a member call expression, after
+stripping off any parentheses or implicit casts.
 
-Example matches y.x()
-  (matcher = cxxMemberCallExpr(on(hasType(cxxRecordDecl(hasName("Y"))))))
-  class Y { public: void x(); };
-  void z() { Y y; y.x(); }
+Given
+  class Y { public: void m(); };
+  Y g();
+  class X : public Y {};
+  void z(Y y, X x) { y.m(); (g()).m(); x.m(); }
+cxxMemberCallExpr(on(hasType(cxxRecordDecl(hasName("Y")))))
+  matches `y.m()` and `(g()).m()`.
+cxxMemberCallExpr(on(hasType(cxxRecordDecl(hasName("X")))))
+  matches `x.m()`.
+cxxMemberCallExpr(on(callExpr()))
+  matches `(g()).m()`.
 
 FIXME: Overload to allow directly matching types?
 
@@ -4878,8 +4910,20 @@

AST Traversal Matchers

Matcher<CXXMemberCallExpr>thisPointerTypeMatcher<QualType> InnerMatcher -
Matches if the expression's type either matches the specified
-matcher, or is a pointer to a type that matches the InnerMatcher.
+
Matches if the type of the expression's implicit object argument either
+matches the InnerMatcher, or is a pointer to a type that matches the
+InnerMatcher.
+
+Given
+  class Y { public: void m(); };
+  class X : public Y { void g(); };
+  void z() { Y y; y.m(); Y *p; p->m(); X x; x.m(); x.g(); }
+cxxMemberCallExpr(thisPointerType(hasDeclaration(
+    cxxRecordDecl(hasName("Y")))))
+  matches `y.m()`, `p->m()` and `x.m()`.
+cxxMemberCallExpr(thisPointerType(hasDeclaration(
+    cxxRecordDecl(hasName("X")))))
+  matches `x.g()`.
 
@@ -5984,16 +6028,20 @@

AST Traversal Matchers

Matcher<MemberExpr>hasObjectExpressionMatcher<Expr> InnerMatcher -
Matches a member expression where the object expression is
-matched by a given matcher.
+
Matches a member expression where the object expression is matched by a
+given matcher. Implicit object expressions are included; that is, it matches
+use of implicit `this`.
 
 Given
-  struct X { int m; };
-  void f(X x) { x.m; m; }
-memberExpr(hasObjectExpression(hasType(cxxRecordDecl(hasName("X")))))))
-  matches "x.m" and "m"
-with hasObjectExpression(...)
-  matching "x" and the implicit object expression of "m" which has type X*.
+  struct X {
+    int m;
+    int f(X x) { x.m; return m; }
+  };
+memberExpr(hasObjectExpression(hasType(cxxRecordDecl(hasName("X")))))
+  matches `x.m`, but not `m`; however,
+memberExpr(hasObjectExpression(hasType(pointsTo(
+     cxxRecordDecl(hasName("X"))))))
+  matches `m` (aka. `this->m`), but not `x.m`.
 
@@ -6805,16 +6853,20 @@

AST Traversal Matchers

Matcher<UnresolvedMemberExpr>hasObjectExpressionMatcher<Expr> InnerMatcher -
Matches a member expression where the object expression is
-matched by a given matcher.
+
Matches a member expression where the object expression is matched by a
+given matcher. Implicit object expressions are included; that is, it matches
+use of implicit `this`.
 
 Given
-  struct X { int m; };
-  void f(X x) { x.m; m; }
-memberExpr(hasObjectExpression(hasType(cxxRecordDecl(hasName("X")))))))
-  matches "x.m" and "m"
-with hasObjectExpression(...)
-  matching "x" and the implicit object expression of "m" which has type X*.
+  struct X {
+    int m;
+    int f(X x) { x.m; return m; }
+  };
+memberExpr(hasObjectExpression(hasType(cxxRecordDecl(hasName("X")))))
+  matches `x.m`, but not `m`; however,
+memberExpr(hasObjectExpression(hasType(pointsTo(
+     cxxRecordDecl(hasName("X"))))))
+  matches `m` (aka. `this->m`), but not `x.m`.
 
diff --git a/clang/docs/LibTooling.rst b/clang/docs/LibTooling.rst index 498baa2c46c3a..2aaa508a136b0 100644 --- a/clang/docs/LibTooling.rst +++ b/clang/docs/LibTooling.rst @@ -187,8 +187,8 @@ Clang tools need their builtin headers and search for them the same way Clang does. Thus, the default location to look for builtin headers is in a path ``$(dirname /path/to/tool)/../lib/clang/3.3/include`` relative to the tool binary. This works out-of-the-box for tools running from llvm's toplevel -binary directory after building clang-headers, or if the tool is running from -the binary directory of a clang install next to the clang binary. +binary directory after building clang-resource-headers, or if the tool is +running from the binary directory of a clang install next to the clang binary. Tips: if your tool fails to find ``stddef.h`` or similar headers, call the tool with ``-v`` and look at the search paths it looks through. diff --git a/clang/docs/OpenMPSupport.rst b/clang/docs/OpenMPSupport.rst index 7b567c966ee53..a8bfddce63abe 100644 --- a/clang/docs/OpenMPSupport.rst +++ b/clang/docs/OpenMPSupport.rst @@ -101,7 +101,7 @@ between the threads in the parallel regions. Collapsed loop nest counter --------------------------- -When using the collapse clause on a loop nest the default behaviour is to +When using the collapse clause on a loop nest the default behavior is to automatically extend the representation of the loop counter to 64 bits for the cases where the sizes of the collapsed loops are not known at compile time. To prevent this conservative choice and use at most 32 bits, @@ -124,5 +124,8 @@ Features not supported or with limited support for Cuda devices - Automatic translation of math functions in target regions to device-specific math functions is not implemented yet. -- Debug information for OpenMP target regions is not supported yet. +- Debug information for OpenMP target regions is supported, but sometimes it may + be required to manually specify the address class of the inspected variables. + In some cases the local variables are actually allocated in the global memory, + but the debug info may be not aware of it. diff --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst index 67472f2a5067b..1ca6218ac64f1 100644 --- a/clang/docs/ReleaseNotes.rst +++ b/clang/docs/ReleaseNotes.rst @@ -131,13 +131,14 @@ ABI Changes in Clang - ... OpenMP Support in Clang ----------------------------------- +----------------------- -- ... +- Added emission of the debug information for NVPTX target devices. CUDA Support in Clang --------------------- +- Added emission of the debug information for the device code. Internal API Changes -------------------- @@ -146,6 +147,17 @@ These are major API changes that have happened since the 8.0.0 release of Clang. If upgrading an external codebase that uses Clang as a library, this section should help get you past the largest hurdles of upgrading. +Build System Changes +-------------------- + +These are major changes to the build system that have happened since the 8.0.0 +release of Clang. Users of the build system should adjust accordingly. + +- In 8.0.0 and below, the install-clang-headers target would install clang's + resource directory headers. This installation is now performed by the + install-clang-resource-headers target. Users of the old install-clang-headers + target should switch to the new install-clang-resource-headers target. + - ... AST Matchers diff --git a/clang/docs/ShadowCallStack.rst b/clang/docs/ShadowCallStack.rst index da609dcd9de47..c1284f7c2dea3 100644 --- a/clang/docs/ShadowCallStack.rst +++ b/clang/docs/ShadowCallStack.rst @@ -8,28 +8,45 @@ ShadowCallStack Introduction ============ -ShadowCallStack is an **experimental** instrumentation pass, currently only -implemented for x86_64 and aarch64, that protects programs against return -address overwrites (e.g. stack buffer overflows.) It works by saving a -function's return address to a separately allocated 'shadow call stack' -in the function prolog and checking the return address on the stack against -the shadow call stack in the function epilog. +ShadowCallStack is an instrumentation pass, currently only implemented for +aarch64 and x86_64, that protects programs against return address overwrites +(e.g. stack buffer overflows.) It works by saving a function's return address +to a separately allocated 'shadow call stack' in the function prolog in +non-leaf functions and loading the return address from the shadow call stack +in the function epilog. The return address is also stored on the regular stack +for compatibility with unwinders, but is otherwise unused. + +The aarch64 implementation is considered production ready, and +an `implementation of the runtime`_ has been added to Android's libc +(bionic). The x86_64 implementation was evaluated using Chromium and was +found to have critical performance and security deficiencies, and may be +removed in a future release of the compiler. This document only describes +the aarch64 implementation; details on the x86_64 implementation are found +in the `Clang 7.0.1 documentation`_. + +.. _`implementation of the runtime`: https://android.googlesource.com/platform/bionic/+/808d176e7e0dd727c7f929622ec017f6e065c582/libc/bionic/pthread_create.cpp#128 +.. _`Clang 7.0.1 documentation`: https://releases.llvm.org/7.0.1/tools/clang/docs/ShadowCallStack.html Comparison ---------- -To optimize for memory consumption and cache locality, the shadow call stack -stores an index followed by an array of return addresses. This is in contrast -to other schemes, like :doc:`SafeStack`, that mirror the entire stack and -trade-off consuming more memory for shorter function prologs and epilogs with -fewer memory accesses. Similarly, `Return Flow Guard`_ consumes more memory with -shorter function prologs and epilogs than ShadowCallStack but suffers from the -same race conditions (see `Security`_). Intel `Control-flow Enforcement Technology`_ -(CET) is a proposed hardware extension that would add native support to -use a shadow stack to store/check return addresses at call/return time. It -would not suffer from race conditions at calls and returns and not incur the -overhead of function instrumentation, but it does require operating system -support. +To optimize for memory consumption and cache locality, the shadow call +stack stores only an array of return addresses. This is in contrast to other +schemes, like :doc:`SafeStack`, that mirror the entire stack and trade-off +consuming more memory for shorter function prologs and epilogs with fewer +memory accesses. + +`Return Flow Guard`_ is a pure software implementation of shadow call stacks +on x86_64. It is similar to the ShadowCallStack x86_64 implementation but +trades off higher memory usage for a shorter prologue and epilogue. Like +x86_64 ShadowCallStack, it is inherently racy due to the architecture's use +of the stack for calls and returns. + +Intel `Control-flow Enforcement Technology`_ (CET) is a proposed hardware +extension that would add native support to use a shadow stack to store/check +return addresses at call/return time. Being a hardware implementation, it +would not suffer from race conditions and would not incur the overhead of +function instrumentation, but it does require operating system support. .. _`Return Flow Guard`: https://xlab.tencent.com/en/2016/11/02/return-flow-guard/ .. _`Control-flow Enforcement Technology`: https://software.intel.com/sites/default/files/managed/4d/2a/control-flow-enforcement-technology-preview.pdf @@ -37,57 +54,96 @@ support. Compatibility ------------- -ShadowCallStack currently only supports x86_64 and aarch64. A runtime is not -currently provided in compiler-rt so one must be provided by the compiled -application. - -On aarch64, the instrumentation makes use of the platform register ``x18``. -On some platforms, ``x18`` is reserved, and on others, it is designated as -a scratch register. This generally means that any code that may run on the -same thread as code compiled with ShadowCallStack must either target one -of the platforms whose ABI reserves ``x18`` (currently Darwin, Fuchsia and -Windows) or be compiled with the flag ``-ffixed-x18``. +A runtime is not provided in compiler-rt so one must be provided by the +compiled application or the operating system. Integrating the runtime into +the operating system should be preferred since otherwise all thread creation +and destruction would need to be intercepted by the application. + +The instrumentation makes use of the platform register ``x18``. On some +platforms, ``x18`` is reserved, and on others, it is designated as a scratch +register. This generally means that any code that may run on the same thread +as code compiled with ShadowCallStack must either target one of the platforms +whose ABI reserves ``x18`` (currently Android, Darwin, Fuchsia and Windows) +or be compiled with the flag ``-ffixed-x18``. If absolutely necessary, code +compiled without ``-ffixed-x18`` may be run on the same thread as code that +uses ShadowCallStack by saving the register value temporarily on the stack +(`example in Android`_) but this should be done with care since it risks +leaking the shadow call stack address. + +.. _`example in Android`: https://android-review.googlesource.com/c/platform/frameworks/base/+/803717 + +Because of the use of register ``x18``, the ShadowCallStack feature is +incompatible with any other feature that may use ``x18``. However, there +is no inherent reason why ShadowCallStack needs to use register ``x18`` +specifically; in principle, a platform could choose to reserve and use another +register for ShadowCallStack, but this would be incompatible with the AAPCS64. + +Special unwind information is required on functions that are compiled +with ShadowCallStack and that may be unwound, i.e. functions compiled with +``-fexceptions`` (which is the default in C++). Some unwinders (such as the +libgcc 4.9 unwinder) do not understand this unwind info and will segfault +when encountering it. LLVM libunwind processes this unwind info correctly, +however. This means that if exceptions are used together with ShadowCallStack, +the program must use a compatible unwinder. Security ======== ShadowCallStack is intended to be a stronger alternative to ``-fstack-protector``. It protects from non-linear overflows and arbitrary -memory writes to the return address slot; however, similarly to -``-fstack-protector`` this protection suffers from race conditions because of -the call-return semantics on x86_64. There is a short race between the call -instruction and the first instruction in the function that reads the return -address where an attacker could overwrite the return address and bypass -ShadowCallStack. Similarly, there is a time-of-check-to-time-of-use race in the -function epilog where an attacker could overwrite the return address after it -has been checked and before it has been returned to. Modifying the call-return -semantics to fix this on x86_64 would incur an unacceptable performance overhead -due to return branch prediction. - -The instrumentation makes use of the ``gs`` segment register on x86_64, -or the ``x18`` register on aarch64, to reference the shadow call stack -meaning that references to the shadow call stack do not have to be stored in -memory. This makes it possible to implement a runtime that avoids exposing -the address of the shadow call stack to attackers that can read arbitrary -memory. However, attackers could still try to exploit side channels exposed -by the operating system `[1]`_ `[2]`_ or processor `[3]`_ to discover the -address of the shadow call stack. +memory writes to the return address slot. + +The instrumentation makes use of the ``x18`` register to reference the shadow +call stack, meaning that references to the shadow call stack do not have +to be stored in memory. This makes it possible to implement a runtime that +avoids exposing the address of the shadow call stack to attackers that can +read arbitrary memory. However, attackers could still try to exploit side +channels exposed by the operating system `[1]`_ `[2]`_ or processor `[3]`_ +to discover the address of the shadow call stack. .. _`[1]`: https://eyalitkin.wordpress.com/2017/09/01/cartography-lighting-up-the-shadows/ .. _`[2]`: https://www.blackhat.com/docs/eu-16/materials/eu-16-Goktas-Bypassing-Clangs-SafeStack.pdf .. _`[3]`: https://www.vusec.net/projects/anc/ -On x86_64, leaf functions are optimized to store the return address in a -free register and avoid writing to the shadow call stack if a register is -available. Very short leaf functions are uninstrumented if their execution -is judged to be shorter than the race condition window intrinsic to the -instrumentation. - -On aarch64, the architecture's call and return instructions (``bl`` and -``ret``) operate on a register rather than the stack, which means that -leaf functions are generally protected from return address overwrites even -without ShadowCallStack. It also means that ShadowCallStack on aarch64 is not -vulnerable to the same types of time-of-check-to-time-of-use races as x86_64. +Unless care is taken when allocating the shadow call stack, it may be +possible for an attacker to guess its address using the addresses of +other allocations. Therefore, the address should be chosen to make this +difficult. One way to do this is to allocate a large guard region without +read/write permissions, randomly select a small region within it to be +used as the address of the shadow call stack and mark only that region as +read/write. This also mitigates somewhat against processor side channels. +The intent is that the Android runtime `will do this`_, but the platform will +first need to be `changed`_ to avoid using ``setrlimit(RLIMIT_AS)`` to limit +memory allocations in certain processes, as this also limits the number of +guard regions that can be allocated. + +.. _`will do this`: https://android-review.googlesource.com/c/platform/bionic/+/891622 +.. _`changed`: https://android-review.googlesource.com/c/platform/frameworks/av/+/837745 + +The runtime will need the address of the shadow call stack in order to +deallocate it when destroying the thread. If the entire program is compiled +with ``-ffixed-x18``, this is trivial: the address can be derived from the +value stored in ``x18`` (e.g. by masking out the lower bits). If a guard +region is used, the address of the start of the guard region could then be +stored at the start of the shadow call stack itself. But if it is possible +for code compiled without ``-ffixed-x18`` to run on a thread managed by the +runtime, which is the case on Android for example, the address must be stored +somewhere else instead. On Android we store the address of the start of the +guard region in TLS and deallocate the entire guard region including the +shadow call stack at thread exit. This is considered acceptable given that +the address of the start of the guard region is already somewhat guessable. + +One way in which the address of the shadow call stack could leak is in the +``jmp_buf`` data structure used by ``setjmp`` and ``longjmp``. The Android +runtime `avoids this`_ by only storing the low bits of ``x18`` in the +``jmp_buf``, which requires the address of the shadow call stack to be +aligned to its size. + +.. _`avoids this`: https://android.googlesource.com/platform/bionic/+/808d176e7e0dd727c7f929622ec017f6e065c582/libc/arch-arm64/bionic/setjmp.S#49 + +The architecture's call and return instructions (``bl`` and ``ret``) operate on +a register rather than the stack, which means that leaf functions are generally +protected from return address overwrites even without ShadowCallStack. Usage ===== @@ -132,17 +188,7 @@ The following example code: return bar() + 1; } -Generates the following x86_64 assembly when compiled with ``-O2``: - -.. code-block:: gas - - push %rax - callq bar - add $0x1,%eax - pop %rcx - retq - -or the following aarch64 assembly: +Generates the following aarch64 assembly when compiled with ``-O2``: .. code-block:: none @@ -153,33 +199,7 @@ or the following aarch64 assembly: ldp x29, x30, [sp], #16 ret - -Adding ``-fsanitize=shadow-call-stack`` would output the following x86_64 -assembly: - -.. code-block:: gas - - mov (%rsp),%r10 - xor %r11,%r11 - addq $0x8,%gs:(%r11) - mov %gs:(%r11),%r11 - mov %r10,%gs:(%r11) - push %rax - callq bar - add $0x1,%eax - pop %rcx - xor %r11,%r11 - mov %gs:(%r11),%r10 - mov %gs:(%r10),%r10 - subq $0x8,%gs:(%r11) - cmp %r10,(%rsp) - jne trap - retq - - trap: - ud2 - -or the following aarch64 assembly: +Adding ``-fsanitize=shadow-call-stack`` would output the following assembly: .. code-block:: none diff --git a/clang/docs/ThreadSanitizer.rst b/clang/docs/ThreadSanitizer.rst index 0d039bd5b25a9..ca5dfaafb45e8 100644 --- a/clang/docs/ThreadSanitizer.rst +++ b/clang/docs/ThreadSanitizer.rst @@ -19,9 +19,11 @@ Supported Platforms ThreadSanitizer is supported on the following OS: -* Linux -* NetBSD +* Android aarch64, x86_64 +* Darwin arm64, x86_64 * FreeBSD +* Linux aarch64, x86_64, powerpc64, powerpc64le +* NetBSD Support for other 64-bit architectures is possible, contributions are welcome. Support for 32-bit platforms is problematic and is not planned. diff --git a/clang/docs/UsersManual.rst b/clang/docs/UsersManual.rst index f004f20909b0e..88cb72c9b61f1 100644 --- a/clang/docs/UsersManual.rst +++ b/clang/docs/UsersManual.rst @@ -1745,7 +1745,8 @@ controlled by the GCC-compatible flags ``-fprofile-generate`` and ``-fprofile-use``. Although these flags are semantically equivalent to their GCC counterparts, they *do not* handle GCC-compatible profiles. They are only meant to implement GCC's semantics with respect to -profile creation and use. +profile creation and use. Flag ``-fcs-profile-generate`` also instruments +programs using the same instrumentation method as ``-fprofile-generate``. .. option:: -fprofile-generate[=] @@ -1778,6 +1779,45 @@ profile creation and use. ``LLVM_PROFILE_FILE`` can still be used to override the directory and filename for the profile file at runtime. +.. option:: -fcs-profile-generate[=] + + The ``-fcs-profile-generate`` and ``-fcs-profile-generate=`` flags will use + the same instrumentation method, and generate the same profile as in the + ``-fprofile-generate`` and ``-fprofile-generate=`` flags. The difference is + that the instrumentation is performed after inlining so that the resulted + profile has a better context sensitive information. They cannot be used + together with ``-fprofile-generate`` and ``-fprofile-generate=`` flags. + They are typically used in conjunction with ``-fprofile-use`` flag. + The profile generated by ``-fcs-profile-generate`` and ``-fprofile-generate`` + can be merged by llvm-profdata. A use example: + + .. code-block:: console + + $ clang++ -O2 -fprofile-generate=yyy/zzz code.cc -o code + $ ./code + $ llvm-profdata merge -output=code.profdata yyy/zzz/ + + The first few steps are the same as that in ``-fprofile-generate`` + compilation. Then perform a second round of instrumentation. + + .. code-block:: console + + $ clang++ -O2 -fprofile-use=code.profdata -fcs-profile-generate=sss/ttt \ + -o cs_code + $ ./cs_code + $ llvm-profdata merge -output=cs_code.profdata sss/ttt code.profdata + + The resulted ``cs_code.prodata`` combines ``code.profdata`` and the profile + generated from binary ``cs_code``. Profile ``cs_code.profata`` can be used by + ``-fprofile-use`` compilaton. + + .. code-block:: console + + $ clang++ -O2 -fprofile-use=cs_code.profdata + + The above command will read both profiles to the compiler at the identical + point of instrumenations. + .. option:: -fprofile-use[=] Without any other arguments, ``-fprofile-use`` behaves identically to diff --git a/clang/docs/analyzer/DesignDiscussions/InitializerLists.rst b/clang/docs/analyzer/DesignDiscussions/InitializerLists.rst deleted file mode 100644 index a8bb82476995c..0000000000000 --- a/clang/docs/analyzer/DesignDiscussions/InitializerLists.rst +++ /dev/null @@ -1,321 +0,0 @@ -This discussion took place in https://reviews.llvm.org/D35216 -"Escape symbols when creating std::initializer_list". - -It touches problems of modelling C++ standard library constructs in general, -including modelling implementation-defined fields within C++ standard library -objects, in particular constructing objects into pointers held by such fields, -and separation of responsibilities between analyzer's core and checkers. - -**Artem:** - -I've seen a few false positives that appear because we construct -C++11 std::initializer_list objects with brace initializers, and such -construction is not properly modeled. For instance, if a new object is -constructed on the heap only to be put into a brace-initialized STL container, -the object is reported to be leaked. - -Approach (0): This can be trivially fixed by this patch, which causes pointers -passed into initializer list expressions to immediately escape. - -This fix is overly conservative though. So i did a bit of investigation as to -how model std::initializer_list better. - -According to the standard, std::initializer_list is an object that has -methods begin(), end(), and size(), where begin() returns a pointer to continuous -array of size() objects of type T, and end() is equal to begin() plus size(). -The standard does hint that it should be possible to implement -std::initializer_list as a pair of pointers, or as a pointer and a size -integer, however specific fields that the object would contain are an -implementation detail. - -Ideally, we should be able to model the initializer list's methods precisely. -Or, at least, it should be possible to explain to the analyzer that the list -somehow "takes hold" of the values put into it. Initializer lists can also be -copied, which is a separate story that i'm not trying to address here. - -The obvious approach to modeling std::initializer_list in a checker would be to -construct a SymbolMetadata for the memory region of the initializer list object, -which would be of type T* and represent begin(), so we'd trivially model begin() -as a function that returns this symbol. The array pointed to by that symbol -would be bindLoc()ed to contain the list's contents (probably as a CompoundVal -to produce less bindings in the store). Extent of this array would represent -size() and would be equal to the length of the list as written. - -So this sounds good, however apparently it does nothing to address our false -positives: when the list escapes, our RegionStoreManager is not magically -guessing that the metadata symbol attached to it, together with its contents, -should also escape. In fact, it's impossible to trigger a pointer escape from -within the checker. - -Approach (1): If only we enabled ProgramState::bindLoc(..., notifyChanges=true) -to cause pointer escapes (not only region changes) (which sounds like the right -thing to do anyway) such checker would be able to solve the false positives by -triggering escapes when binding list elements to the list. However, it'd be as -conservative as the current patch's solution. Ideally, we do not want escapes to -happen so early. Instead, we'd prefer them to be delayed until the list itself -escapes. - -So i believe that escaping metadata symbols whenever their base regions escape -would be the right thing to do. Currently we didn't think about that because we -had neither pointer-type metadatas nor non-pointer escapes. - -Approach (2): We could teach the Store to scan itself for bindings to -metadata-symbolic-based regions during scanReachableSymbols() whenever a region -turns out to be reachable. This requires no work on checker side, but it sounds -performance-heavy. - -Approach (3): We could let checkers maintain the set of active metadata symbols -in the program state (ideally somewhere in the Store, which sounds weird but -causes the smallest amount of layering violations), so that the core knew what -to escape. This puts a stress on the checkers, but with a smart data map it -wouldn't be a problem. - -Approach (4): We could allow checkers to trigger pointer escapes in arbitrary -moments. If we allow doing this within checkPointerEscape callback itself, we -would be able to express facts like "when this region escapes, that metadata -symbol attached to it should also escape". This sounds like an ultimate freedom, -with maximum stress on the checkers - still not too much stress when we have -smart data maps. - -I'm personally liking the approach (2) - it should be possible to avoid -performance overhead, and clarity seems nice. - -**Gabor:** - -At this point, I am a bit wondering about two questions. - -- When should something belong to a checker and when should something belong -to the engine? Sometimes we model library aspects in the engine and model -language constructs in checkers. -- What is the checker programming model that we are aiming for? Maximum -freedom or more easy checker development? - -I think if we aim for maximum freedom, we do not need to worry about the -potential stress on checkers, and we can introduce abstractions to mitigate that -later on. -If we want to simplify the API, then maybe it makes more sense to move language -construct modeling to the engine when the checker API is not sufficient instead -of complicating the API. - -Right now I have no preference or objections between the alternatives but there -are some random thoughts: - -- Maybe it would be great to have a guideline how to evolve the analyzer and -follow it, so it can help us to decide in similar situations -- I do care about performance in this case. The reason is that we have a -limited performance budget. And I think we should not expect most of the checker -writers to add modeling of language constructs. So, in my opinion, it is ok to -have less nice/more verbose API for language modeling if we can have better -performance this way, since it only needs to be done once, and is done by the -framework developers. - -**Artem:** These are some great questions, i guess it'd be better to discuss -them more openly. As a quick dump of my current mood: - -- To me it seems obvious that we need to aim for a checker API that is both -simple and powerful. This can probably by keeping the API as powerful as -necessary while providing a layer of simple ready-made solutions on top of it. -Probably a few reusable components for assembling checkers. And this layer -should ideally be pleasant enough to work with, so that people would prefer to -extend it when something is lacking, instead of falling back to the complex -omnipotent API. I'm thinking of AST matchers vs. AST visitors as a roughly -similar situation: matchers are not omnipotent, but they're so nice. - -- Separation between core and checkers is usually quite strange. Once we have -shared state traits, i generally wouldn't mind having region store or range -constraint manager as checkers (though it's probably not worth it to transform -them - just a mood). The main thing to avoid here would be the situation when -the checker overwrites stuff written by the core because it thinks it has a -better idea what's going on, so the core should provide a good default behavior. - -- Yeah, i totally care about performance as well, and if i try to implement -approach, i'd make sure it's good. - -**Artem:** - -> Approach (2): We could teach the Store to scan itself for bindings to -> metadata-symbolic-based regions during scanReachableSymbols() whenever -> a region turns out to be reachable. This requires no work on checker side, -> but it sounds performance-heavy. - -Nope, this approach is wrong. Metadata symbols may become out-of-date: when the -object changes, metadata symbols attached to it aren't changing (because symbols -simply don't change). The same metadata may have different symbols to denote its -value in different moments of time, but at most one of them represents the -actual metadata value. So we'd be escaping more stuff than necessary. - -If only we had "ghost fields" -(https://lists.llvm.org/pipermail/cfe-dev/2016-May/049000.html), it would have -been much easier, because the ghost field would only contain the actual -metadata, and the Store would always know about it. This example adds to my -belief that ghost fields are exactly what we need for most C++ checkers. - -**Devin:** - -In this case, I would be fine with some sort of -AbstractStorageMemoryRegion that meant "here is a memory region and somewhere -reachable from here exists another region of type T". Or even multiple regions -with different identifiers. This wouldn't specify how the memory is reachable, -but it would allow for transfer functions to get at those regions and it would -allow for invalidation. - -For std::initializer_list this reachable region would the region for the backing -array and the transfer functions for begin() and end() yield the beginning and -end element regions for it. - -In my view this differs from ghost variables in that (1) this storage does -actually exist (it is just a library implementation detail where that storage -lives) and (2) it is perfectly valid for a pointer into that storage to be -returned and for another part of the program to read or write from that storage. -(Well, in this case just read since it is allowed to be read-only memory). - -What I'm not OK with is modeling abstract analysis state (for example, the count -of a NSMutableArray or the typestate of a file handle) as a value stored in some -ginned up region in the store. This takes an easy problem that the analyzer does -well at (modeling typestate) and turns it into a hard one that the analyzer is -bad at (reasoning about the contents of the heap). - -I think the key criterion here is: "is the region accessible from outside the -library". That is, does the library expose the region as a pointer that can be -read to or written from in the client program? If so, then it makes sense for -this to be in the store: we are modeling reachable storage as storage. But if -we're just modeling arbitrary analysis facts that need to be invalidated when a -pointer escapes then we shouldn't try to gin up storage for them just to get -invalidation for free. - -**Artem:** - -> In this case, I would be fine with some sort of AbstractStorageMemoryRegion -> that meant "here is a memory region and somewhere reachable from here exists -> another region of type T". Or even multiple regions with different -> identifiers. This wouldn't specify how the memory is reachable, but it would -> allow for transfer functions to get at those regions and it would allow for -> invalidation. - -Yeah, this is what we can easily implement now as a -symbolic-region-based-on-a-metadata-symbol (though we can make a new region -class for that if we eg. want it typed). The problem is that the relation -between such storage region and its parent object region is essentially -immaterial, similarly to the relation between SymbolRegionValue and its parent -region. Region contents are mutable: today the abstract storage is reachable -from its parent object, tomorrow it's not, and maybe something else becomes -reachable, something that isn't even abstract. So the parent region for the -abstract storage is most of the time at best a "nice to know" thing - we cannot -rely on it to do any actual work. We'd anyway need to rely on the checker to do -the job. - -> For std::initializer_list this reachable region would the region for the -> backing array and the transfer functions for begin() and end() yield the -> beginning and end element regions for it. - -So maybe in fact for std::initializer_list it may work fine because you cannot -change the data after the object is constructed - so this region's contents are -essentially immutable. For the future, i feel as if it is a dead end. - -I'd like to consider another funny example. Suppose we're trying to model -std::unique_ptr. Consider:: - - void bar(const std::unique_ptr &x); - - void foo(std::unique_ptr &x) { - int *a = x.get(); // (a, 0, direct): &AbstractStorageRegion - *a = 1; // (AbstractStorageRegion, 0, direct): 1 S32b - int *b = new int; - *b = 2; // (SymRegion{conj_$0}, 0 ,direct): 2 S32b - x.reset(b); // Checker map: x -> SymRegion{conj_$0} - bar(x); // 'a' doesn't escape (the pointer was unique), 'b' does. - clang_analyzer_eval(*a == 1); // Making this true is up to the checker. - clang_analyzer_eval(*b == 2); // Making this unknown is up to the checker. - } - -The checker doesn't totally need to ensure that *a == 1 passes - even though the -pointer was unique, it could theoretically have .get()-ed above and the code -could of course break the uniqueness invariant (though we'd probably want it). -The checker can say that "even if *a did escape, it was not because it was -stuffed directly into bar()". - -The checker's direct responsibility, however, is to solve the *b == 2 thing -(which is in fact the problem we're dealing with in this patch - escaping the -storage region of the object). - -So we're talking about one more operation over the program state (scanning -reachable symbols and regions) that cannot work without checker support. - -We can probably add a new callback "checkReachableSymbols" to solve this. This -is in fact also related to the dead symbols problem (we're scanning for live -symbols in the store and in the checkers separately, but we need to do so -simultaneously with a single worklist). Hmm, in fact this sounds like a good -idea; we can replace checkLiveSymbols with checkReachableSymbols. - -Or we could just have ghost member variables, and no checker support required at -all. For ghost member variables, the relation with their parent region (which -would be their superregion) is actually useful, the mutability of their contents -is expressed naturally, and the store automagically sees reachable symbols, live -symbols, escapes, invalidations, whatever. - -> In my view this differs from ghost variables in that (1) this storage does -> actually exist (it is just a library implementation detail where that storage -> lives) and (2) it is perfectly valid for a pointer into that storage to be -> returned and for another part of the program to read or write from that -> storage. (Well, in this case just read since it is allowed to be read-only -> memory). - -> What I'm not OK with is modeling abstract analysis state (for example, the -> count of a NSMutableArray or the typestate of a file handle) as a value stored -> in some ginned up region in the store.This takes an easy problem that the -> analyzer does well at (modeling typestate) and turns it into a hard one that -> the analyzer is bad at (reasoning about the contents of the heap). - -Yeah, i tend to agree on that. For simple typestates, this is probably an -overkill, so let's definitely put aside the idea of "ghost symbolic regions" -that i had earlier. - -But, to summarize a bit, in our current case, however, the typestate we're -looking for is the contents of the heap. And when we try to model such -typestates (complex in this specific manner, i.e. heap-like) in any checker, we -have a choice between re-doing this modeling in every such checker (which is -something analyzer is indeed good at, but at a price of making checkers heavy) -or instead relying on the Store to do exactly what it's designed to do. - -> I think the key criterion here is: "is the region accessible from outside -> the library". That is, does the library expose the region as a pointer that -> can be read to or written from in the client program? If so, then it makes -> sense for this to be in the store: we are modeling reachable storage as -> storage. But if we're just modeling arbitrary analysis facts that need to be -> invalidated when a pointer escapes then we shouldn't try to gin up storage -> for them just to get invalidation for free. - -As a metaphor, i'd probably compare it to body farms - the difference between -ghost member variables and metadata symbols seems to me like the difference -between body farms and evalCall. Both are nice to have, and body farms are very -pleasant to work with, even if not omnipotent. I think it's fine for a -FunctionDecl's body in a body farm to have a local variable, even if such -variable doesn't actually exist, even if it cannot be seen from outside the -function call. I'm not seeing immediate practical difference between "it does -actually exist" and "it doesn't actually exist, just a handy abstraction". -Similarly, i think it's fine if we have a CXXRecordDecl with -implementation-defined contents, and try to farm up a member variable as a handy -abstraction (we don't even need to know its name or offset, only that it's there -somewhere). - -**Artem:** - -We've discussed it in person with Devin, and he provided more points to think -about: - -- If the initializer list consists of non-POD data, constructors of list's -objects need to take the sub-region of the list's region as this-region In the -current (v2) version of this patch, these objects are constructed elsewhere and -then trivial-copied into the list's metadata pointer region, which may be -incorrect. This is our overall problem with C++ constructors, which manifests in -this case as well. Additionally, objects would need to be constructed in the -analyzer's core, which would not be able to predict that it needs to take a -checker-specific region as this-region, which makes it harder, though it might -be mitigated by sharing the checker state traits. - -- Because "ghost variables" are not material to the user, we need to somehow -make super sure that they don't make it into the diagnostic messages. - -So, because this needs further digging into overall C++ support and rises too -many questions, i'm delaying a better approach to this problem and will fall -back to the original trivial patch. diff --git a/clang/docs/analyzer/IPA.txt b/clang/docs/analyzer/IPA.txt deleted file mode 100644 index 3842075fcd6a4..0000000000000 --- a/clang/docs/analyzer/IPA.txt +++ /dev/null @@ -1,386 +0,0 @@ -Inlining -======== - -There are several options that control which calls the analyzer will consider for -inlining. The major one is -analyzer-config ipa: - - -analyzer-config ipa=none - All inlining is disabled. This is the only mode - available in LLVM 3.1 and earlier and in Xcode 4.3 and earlier. - - -analyzer-config ipa=basic-inlining - Turns on inlining for C functions, C++ - static member functions, and blocks -- essentially, the calls that behave - like simple C function calls. This is essentially the mode used in - Xcode 4.4. - - -analyzer-config ipa=inlining - Turns on inlining when we can confidently find - the function/method body corresponding to the call. (C functions, static - functions, devirtualized C++ methods, Objective-C class methods, Objective-C - instance methods when ExprEngine is confident about the dynamic type of the - instance). - - -analyzer-config ipa=dynamic - Inline instance methods for which the type is - determined at runtime and we are not 100% sure that our type info is - correct. For virtual calls, inline the most plausible definition. - - -analyzer-config ipa=dynamic-bifurcate - Same as -analyzer-config ipa=dynamic, - but the path is split. We inline on one branch and do not inline on the - other. This mode does not drop the coverage in cases when the parent class - has code that is only exercised when some of its methods are overridden. - -Currently, -analyzer-config ipa=dynamic-bifurcate is the default mode. - -While -analyzer-config ipa determines in general how aggressively the analyzer -will try to inline functions, several additional options control which types of -functions can inlined, in an all-or-nothing way. These options use the -analyzer's configuration table, so they are all specified as follows: - - -analyzer-config OPTION=VALUE - -### c++-inlining ### - -This option controls which C++ member functions may be inlined. - - -analyzer-config c++-inlining=[none | methods | constructors | destructors] - -Each of these modes implies that all the previous member function kinds will be -inlined as well; it doesn't make sense to inline destructors without inlining -constructors, for example. - -The default c++-inlining mode is 'destructors', meaning that all member -functions with visible definitions will be considered for inlining. In some -cases the analyzer may still choose not to inline the function. - -Note that under 'constructors', constructors for types with non-trivial -destructors will not be inlined. Additionally, no C++ member functions will be -inlined under -analyzer-config ipa=none or -analyzer-config ipa=basic-inlining, -regardless of the setting of the c++-inlining mode. - -### c++-template-inlining ### - -This option controls whether C++ templated functions may be inlined. - - -analyzer-config c++-template-inlining=[true | false] - -Currently, template functions are considered for inlining by default. - -The motivation behind this option is that very generic code can be a source -of false positives, either by considering paths that the caller considers -impossible (by some unstated precondition), or by inlining some but not all -of a deep implementation of a function. - -### c++-stdlib-inlining ### - -This option controls whether functions from the C++ standard library, including -methods of the container classes in the Standard Template Library, should be -considered for inlining. - - -analyzer-config c++-stdlib-inlining=[true | false] - -Currently, C++ standard library functions are considered for inlining by -default. - -The standard library functions and the STL in particular are used ubiquitously -enough that our tolerance for false positives is even lower here. A false -positive due to poor modeling of the STL leads to a poor user experience, since -most users would not be comfortable adding assertions to system headers in order -to silence analyzer warnings. - -### c++-container-inlining ### - -This option controls whether constructors and destructors of "container" types -should be considered for inlining. - - -analyzer-config c++-container-inlining=[true | false] - -Currently, these constructors and destructors are NOT considered for inlining -by default. - -The current implementation of this setting checks whether a type has a member -named 'iterator' or a member named 'begin'; these names are idiomatic in C++, -with the latter specified in the C++11 standard. The analyzer currently does a -fairly poor job of modeling certain data structure invariants of container-like -objects. For example, these three expressions should be equivalent: - - std::distance(c.begin(), c.end()) == 0 - c.begin() == c.end() - c.empty()) - -Many of these issues are avoided if containers always have unknown, symbolic -state, which is what happens when their constructors are treated as opaque. -In the future, we may decide specific containers are "safe" to model through -inlining, or choose to model them directly using checkers instead. - - -Basics of Implementation ------------------------ - -The low-level mechanism of inlining a function is handled in -ExprEngine::inlineCall and ExprEngine::processCallExit. - -If the conditions are right for inlining, a CallEnter node is created and added -to the analysis work list. The CallEnter node marks the change to a new -LocationContext representing the called function, and its state includes the -contents of the new stack frame. When the CallEnter node is actually processed, -its single successor will be a edge to the first CFG block in the function. - -Exiting an inlined function is a bit more work, fortunately broken up into -reasonable steps: - -1. The CoreEngine realizes we're at the end of an inlined call and generates a - CallExitBegin node. - -2. ExprEngine takes over (in processCallExit) and finds the return value of the - function, if it has one. This is bound to the expression that triggered the - call. (In the case of calls without origin expressions, such as destructors, - this step is skipped.) - -3. Dead symbols and bindings are cleaned out from the state, including any local - bindings. - -4. A CallExitEnd node is generated, which marks the transition back to the - caller's LocationContext. - -5. Custom post-call checks are processed and the final nodes are pushed back - onto the work list, so that evaluation of the caller can continue. - -Retry Without Inlining ----------------------- - -In some cases, we would like to retry analysis without inlining a particular -call. - -Currently, we use this technique to recover coverage in case we stop -analyzing a path due to exceeding the maximum block count inside an inlined -function. - -When this situation is detected, we walk up the path to find the first node -before inlining was started and enqueue it on the WorkList with a special -ReplayWithoutInlining bit added to it (ExprEngine::replayWithoutInlining). The -path is then re-analyzed from that point without inlining that particular call. - -Deciding When to Inline ------------------------ - -In general, the analyzer attempts to inline as much as possible, since it -provides a better summary of what actually happens in the program. There are -some cases, however, where the analyzer chooses not to inline: - -- If there is no definition available for the called function or method. In - this case, there is no opportunity to inline. - -- If the CFG cannot be constructed for a called function, or the liveness - cannot be computed. These are prerequisites for analyzing a function body, - with or without inlining. - -- If the LocationContext chain for a given ExplodedNode reaches a maximum cutoff - depth. This prevents unbounded analysis due to infinite recursion, but also - serves as a useful cutoff for performance reasons. - -- If the function is variadic. This is not a hard limitation, but an engineering - limitation. - - Tracked by: Support inlining of variadic functions - -- In C++, constructors are not inlined unless the destructor call will be - processed by the ExprEngine. Thus, if the CFG was built without nodes for - implicit destructors, or if the destructors for the given object are not - represented in the CFG, the constructor will not be inlined. (As an exception, - constructors for objects with trivial constructors can still be inlined.) - See "C++ Caveats" below. - -- In C++, ExprEngine does not inline custom implementations of operator 'new' - or operator 'delete', nor does it inline the constructors and destructors - associated with these. See "C++ Caveats" below. - -- Calls resulting in "dynamic dispatch" are specially handled. See more below. - -- The FunctionSummaries map stores additional information about declarations, - some of which is collected at runtime based on previous analyses. - We do not inline functions which were not profitable to inline in a different - context (for example, if the maximum block count was exceeded; see - "Retry Without Inlining"). - - -Dynamic Calls and Devirtualization ----------------------------------- - -"Dynamic" calls are those that are resolved at runtime, such as C++ virtual -method calls and Objective-C message sends. Due to the path-sensitive nature of -the analysis, the analyzer may be able to reason about the dynamic type of the -object whose method is being called and thus "devirtualize" the call. - -This path-sensitive devirtualization occurs when the analyzer can determine what -method would actually be called at runtime. This is possible when the type -information is constrained enough for a simulated C++/Objective-C object that -the analyzer can make such a decision. - - == DynamicTypeInfo == - -As the analyzer analyzes a path, it may accrue information to refine the -knowledge about the type of an object. This can then be used to make better -decisions about the target method of a call. - -Such type information is tracked as DynamicTypeInfo. This is path-sensitive -data that is stored in ProgramState, which defines a mapping from MemRegions to -an (optional) DynamicTypeInfo. - -If no DynamicTypeInfo has been explicitly set for a MemRegion, it will be lazily -inferred from the region's type or associated symbol. Information from symbolic -regions is weaker than from true typed regions. - - EXAMPLE: A C++ object declared "A obj" is known to have the class 'A', but a - reference "A &ref" may dynamically be a subclass of 'A'. - -The DynamicTypePropagation checker gathers and propagates DynamicTypeInfo, -updating it as information is observed along a path that can refine that type -information for a region. - - WARNING: Not all of the existing analyzer code has been retrofitted to use - DynamicTypeInfo, nor is it universally appropriate. In particular, - DynamicTypeInfo always applies to a region with all casts stripped - off, but sometimes the information provided by casts can be useful. - - - == RuntimeDefinition == - -The basis of devirtualization is CallEvent's getRuntimeDefinition() method, -which returns a RuntimeDefinition object. When asked to provide a definition, -the CallEvents for dynamic calls will use the DynamicTypeInfo in their -ProgramState to attempt to devirtualize the call. In the case of no dynamic -dispatch, or perfectly constrained devirtualization, the resulting -RuntimeDefinition contains a Decl corresponding to the definition of the called -function, and RuntimeDefinition::mayHaveOtherDefinitions will return FALSE. - -In the case of dynamic dispatch where our information is not perfect, CallEvent -can make a guess, but RuntimeDefinition::mayHaveOtherDefinitions will return -TRUE. The RuntimeDefinition object will then also include a MemRegion -corresponding to the object being called (i.e., the "receiver" in Objective-C -parlance), which ExprEngine uses to decide whether or not the call should be -inlined. - - == Inlining Dynamic Calls == - -The -analyzer-config ipa option has five different modes: none, basic-inlining, -inlining, dynamic, and dynamic-bifurcate. Under -analyzer-config ipa=dynamic, -all dynamic calls are inlined, whether we are certain or not that this will -actually be the definition used at runtime. Under -analyzer-config ipa=inlining, -only "near-perfect" devirtualized calls are inlined*, and other dynamic calls -are evaluated conservatively (as if no definition were available). - -* Currently, no Objective-C messages are not inlined under - -analyzer-config ipa=inlining, even if we are reasonably confident of the type - of the receiver. We plan to enable this once we have tested our heuristics - more thoroughly. - -The last option, -analyzer-config ipa=dynamic-bifurcate, behaves similarly to -"dynamic", but performs a conservative invalidation in the general virtual case -in *addition* to inlining. The details of this are discussed below. - -As stated above, -analyzer-config ipa=basic-inlining does not inline any C++ -member functions or Objective-C method calls, even if they are non-virtual or -can be safely devirtualized. - - -Bifurcation ------------ - -ExprEngine::BifurcateCall implements the -analyzer-config ipa=dynamic-bifurcate -mode. - -When a call is made on an object with imprecise dynamic type information -(RuntimeDefinition::mayHaveOtherDefinitions() evaluates to TRUE), ExprEngine -bifurcates the path and marks the object's region (retrieved from the -RuntimeDefinition object) with a path-sensitive "mode" in the ProgramState. - -Currently, there are 2 modes: - - DynamicDispatchModeInlined - Models the case where the dynamic type information - of the receiver (MemoryRegion) is assumed to be perfectly constrained so - that a given definition of a method is expected to be the code actually - called. When this mode is set, ExprEngine uses the Decl from - RuntimeDefinition to inline any dynamically dispatched call sent to this - receiver because the function definition is considered to be fully resolved. - - DynamicDispatchModeConservative - Models the case where the dynamic type - information is assumed to be incorrect, for example, implies that the method - definition is overridden in a subclass. In such cases, ExprEngine does not - inline the methods sent to the receiver (MemoryRegion), even if a candidate - definition is available. This mode is conservative about simulating the - effects of a call. - -Going forward along the symbolic execution path, ExprEngine consults the mode -of the receiver's MemRegion to make decisions on whether the calls should be -inlined or not, which ensures that there is at most one split per region. - -At a high level, "bifurcation mode" allows for increased semantic coverage in -cases where the parent method contains code which is only executed when the -class is subclassed. The disadvantages of this mode are a (considerable?) -performance hit and the possibility of false positives on the path where the -conservative mode is used. - -Objective-C Message Heuristics ------------------------------- - -ExprEngine relies on a set of heuristics to partition the set of Objective-C -method calls into those that require bifurcation and those that do not. Below -are the cases when the DynamicTypeInfo of the object is considered precise -(cannot be a subclass): - - - If the object was created with +alloc or +new and initialized with an -init - method. - - - If the calls are property accesses using dot syntax. This is based on the - assumption that children rarely override properties, or do so in an - essentially compatible way. - - - If the class interface is declared inside the main source file. In this case - it is unlikely that it will be subclassed. - - - If the method is not declared outside of main source file, either by the - receiver's class or by any superclasses. - -C++ Caveats --------------------- - -C++11 [class.cdtor]p4 describes how the vtable of an object is modified as it is -being constructed or destructed; that is, the type of the object depends on -which base constructors have been completed. This is tracked using -DynamicTypeInfo in the DynamicTypePropagation checker. - -There are several limitations in the current implementation: - -- Temporaries are poorly modeled right now because we're not confident in the - placement of their destructors in the CFG. We currently won't inline their - constructors unless the destructor is trivial, and don't process their - destructors at all, not even to invalidate the region. - -- 'new' is poorly modeled due to some nasty CFG/design issues. This is tracked - in PR12014. 'delete' is not modeled at all. - -- Arrays of objects are modeled very poorly right now. ExprEngine currently - only simulates the first constructor and first destructor. Because of this, - ExprEngine does not inline any constructors or destructors for arrays. - - -CallEvent -========= - -A CallEvent represents a specific call to a function, method, or other body of -code. It is path-sensitive, containing both the current state (ProgramStateRef) -and stack space (LocationContext), and provides uniform access to the argument -values and return type of a call, no matter how the call is written in the -source or what sort of code body is being invoked. - - NOTE: For those familiar with Cocoa, CallEvent is roughly equivalent to - NSInvocation. - -CallEvent should be used whenever there is logic dealing with function calls -that does not care how the call occurred. - -Examples include checking that arguments satisfy preconditions (such as -__attribute__((nonnull))), and attempting to inline a call. - -CallEvents are reference-counted objects managed by a CallEventManager. While -there is no inherent issue with persisting them (say, in a ProgramState's GDM), -they are intended for short-lived use, and can be recreated from CFGElements or -non-top-level StackFrameContexts fairly easily. diff --git a/clang/docs/analyzer/RegionStore.txt b/clang/docs/analyzer/RegionStore.txt deleted file mode 100644 index ef994b6401e26..0000000000000 --- a/clang/docs/analyzer/RegionStore.txt +++ /dev/null @@ -1,171 +0,0 @@ -The analyzer "Store" represents the contents of memory regions. It is an opaque -functional data structure stored in each ProgramState; the only class that can -modify the store is its associated StoreManager. - -Currently (Feb. 2013), the only StoreManager implementation being used is -RegionStoreManager. This store records bindings to memory regions using a "base -region + offset" key. (This allows `*p` and `p[0]` to map to the same location, -among other benefits.) - -Regions are grouped into "clusters", which roughly correspond to "regions with -the same base region". This allows certain operations to be more efficient, -such as invalidation. - -Regions that do not have a known offset use a special "symbolic" offset. These -keys store both the original region, and the "concrete offset region" -- the -last region whose offset is entirely concrete. (For example, in the expression -`foo.bar[1][i].baz`, the concrete offset region is the array `foo.bar[1]`, -since that has a known offset from the start of the top-level `foo` struct.) - - -Binding Invalidation -==================== - -Supporting both concrete and symbolic offsets makes things a bit tricky. Here's -an example: - - foo[0] = 0; - foo[1] = 1; - foo[i] = i; - -After the third assignment, nothing can be said about the value of `foo[0]`, -because `foo[i]` may have overwritten it! Thus, *binding to a region with a -symbolic offset invalidates the entire concrete offset region.* We know -`foo[i]` is somewhere within `foo`, so we don't have to invalidate anything -else, but we do have to be conservative about all other bindings within `foo`. - -Continuing the example: - - foo[i] = i; - foo[0] = 0; - -After this latest assignment, nothing can be said about the value of `foo[i]`, -because `foo[0]` may have overwritten it! *Binding to a region R with a -concrete offset invalidates any symbolic offset bindings whose concrete offset -region is a super-region **or** sub-region of R.* All we know about `foo[i]` is -that it is somewhere within `foo`, so changing *anything* within `foo` might -change `foo[i]`, and changing *all* of `foo` (or its base region) will -*definitely* change `foo[i]`. - -This logic could be improved by using the current constraints on `i`, at the -cost of speed. The latter case could also be improved by matching region kinds, -i.e. changing `foo[0].a` is unlikely to affect `foo[i].b`, no matter what `i` -is. - -For more detail, read through RegionStoreManager::removeSubRegionBindings in -RegionStore.cpp. - - -ObjCIvarRegions -=============== - -Objective-C instance variables require a bit of special handling. Like struct -fields, they are not base regions, and when their parent object region is -invalidated, all the instance variables must be invalidated as well. However, -they have no concrete compile-time offsets (in the modern, "non-fragile" -runtime), and so cannot easily be represented as an offset from the start of -the object in the analyzer. Moreover, this means that invalidating a single -instance variable should *not* invalidate the rest of the object, since unlike -struct fields or array elements there is no way to perform pointer arithmetic -to access another instance variable. - -Consequently, although the base region of an ObjCIvarRegion is the entire -object, RegionStore offsets are computed from the start of the instance -variable. Thus it is not valid to assume that all bindings with non-symbolic -offsets start from the base region! - - -Region Invalidation -=================== - -Unlike binding invalidation, region invalidation occurs when the entire -contents of a region may have changed---say, because it has been passed to a -function the analyzer can model, like memcpy, or because its address has -escaped, usually as an argument to an opaque function call. In these cases we -need to throw away not just all bindings within the region itself, but within -its entire cluster, since neighboring regions may be accessed via pointer -arithmetic. - -Region invalidation typically does even more than this, however. Because it -usually represents the complete escape of a region from the analyzer's model, -its *contents* must also be transitively invalidated. (For example, if a region -'p' of type 'int **' is invalidated, the contents of '*p' and '**p' may have -changed as well.) The algorithm that traverses this transitive closure of -accessible regions is known as ClusterAnalysis, and is also used for finding -all live bindings in the store (in order to throw away the dead ones). The name -"ClusterAnalysis" predates the cluster-based organization of bindings, but -refers to the same concept: during invalidation and liveness analysis, all -bindings within a cluster must be treated in the same way for a conservative -model of program behavior. - - -Default Bindings -================ - -Most bindings in RegionStore are simple scalar values -- integers and pointers. -These are known as "Direct" bindings. However, RegionStore supports a second -type of binding called a "Default" binding. These are used to provide values to -all the elements of an aggregate type (struct or array) without having to -explicitly specify a binding for each individual element. - -When there is no Direct binding for a particular region, the store manager -looks at each super-region in turn to see if there is a Default binding. If so, -this value is used as the value of the original region. The search ends when -the base region is reached, at which point the RegionStore will pick an -appropriate default value for the region (usually a symbolic value, but -sometimes zero, for static data, or "uninitialized", for stack variables). - - int manyInts[10]; - manyInts[1] = 42; // Creates a Direct binding for manyInts[1]. - print(manyInts[1]); // Retrieves the Direct binding for manyInts[1]; - print(manyInts[0]); // There is no Direct binding for manyInts[0]. - // Is there a Default binding for the entire array? - // There is not, but it is a stack variable, so we use - // "uninitialized" as the default value (and emit a - // diagnostic!). - -NOTE: The fact that bindings are stored as a base region plus an offset limits -the Default Binding strategy, because in C aggregates can contain other -aggregates. In the current implementation of RegionStore, there is no way to -distinguish a Default binding for an entire aggregate from a Default binding -for the sub-aggregate at offset 0. - - -Lazy Bindings (LazyCompoundVal) -=============================== - -RegionStore implements an optimization for copying aggregates (structs and -arrays) called "lazy bindings", implemented using a special SVal called -LazyCompoundVal. When the store is asked for the "binding" for an entire -aggregate (i.e. for an lvalue-to-rvalue conversion), it returns a -LazyCompoundVal instead. When this value is then stored into a variable, it is -bound as a Default value. This makes copying arrays and structs much cheaper -than if they had required memberwise access. - -Under the hood, a LazyCompoundVal is implemented as a uniqued pair of (region, -store), representing "the value of the region during this 'snapshot' of the -store". This has important implications for any sort of liveness or -reachability analysis, which must take the bindings in the old store into -account. - -Retrieving a value from a lazy binding happens in the same way as any other -Default binding: since there is no direct binding, the store manager falls back -to super-regions to look for an appropriate default binding. LazyCompoundVal -differs from a normal default binding, however, in that it contains several -different values, instead of one value that will appear several times. Because -of this, the store manager has to reconstruct the subregion chain on top of the -LazyCompoundVal region, and look up *that* region in the previous store. - -Here's a concrete example: - - CGPoint p; - p.x = 42; // A Direct binding is made to the FieldRegion 'p.x'. - CGPoint p2 = p; // A LazyCompoundVal is created for 'p', along with a - // snapshot of the current store state. This value is then - // used as a Default binding for the VarRegion 'p2'. - return p2.x; // The binding for FieldRegion 'p2.x' is requested. - // There is no Direct binding, so we look for a Default - // binding to 'p2' and find the LCV. - // Because it's a LCV, we look at our requested region - // and see that it's the '.x' field. We ask for the value - // of 'p.x' within the snapshot, and get back 42. diff --git a/clang/docs/analyzer/checkers.rst b/clang/docs/analyzer/checkers.rst new file mode 100644 index 0000000000000..16bc36a2c0702 --- /dev/null +++ b/clang/docs/analyzer/checkers.rst @@ -0,0 +1,2014 @@ +================== +Available Checkers +================== + +The analyzer performs checks that are categorized into families or "checkers". + +The default set of checkers covers a variety of checks targeted at finding security and API usage bugs, +dead code, and other logic errors. See the :ref:`default-checkers` checkers list below. + +In addition to these, the analyzer contains a number of :ref:`alpha-checkers` (aka *alpha* checkers). +These checkers are under development and are switched off by default. They may crash or emit a higher number of false positives. + +The :ref:`debug-checkers` package contains checkers for analyzer developers for debugging purposes. + +.. contents:: Table of Contents + :depth: 4 + + +.. _default-checkers: + +Default Checkers +---------------- + +.. _core-checkers: + +core +^^^^ +Models core language features and contains general-purpose checkers such as division by zero, +null pointer dereference, usage of uninitialized values, etc. +*These checkers must be always switched on as other checker rely on them.* + +core.CallAndMessage (C, C++, ObjC) +"""""""""""""""""""""""""""""""""" + Check for logical errors for function calls and Objective-C message expressions (e.g., uninitialized arguments, null function pointers). + +.. literalinclude:: checkers/callandmessage_example.c + :language: objc + +core.DivideZero (C, C++, ObjC) +"""""""""""""""""""""""""""""" + Check for division by zero. + +.. literalinclude:: checkers/dividezero_example.c + :language: c + +core.NonNullParamChecker (C, C++, ObjC) +""""""""""""""""""""""""""""""""""""""" +Check for null pointers passed as arguments to a function whose arguments are references or marked with the 'nonnull' attribute. + +.. code-block:: cpp + + int f(int *p) __attribute__((nonnull)); + + void test(int *p) { + if (!p) + f(p); // warn + } + +core.NullDereference (C, C++, ObjC) +""""""""""""""""""""""""""""""""""" +Check for dereferences of null pointers. + +.. code-block:: objc + + // C + void test(int *p) { + if (p) + return; + + int x = p[0]; // warn + } + + // C + void test(int *p) { + if (!p) + *p = 0; // warn + } + + // C++ + class C { + public: + int x; + }; + + void test() { + C *pc = 0; + int k = pc->x; // warn + } + + // Objective-C + @interface MyClass { + @public + int x; + } + @end + + void test() { + MyClass *obj = 0; + obj->x = 1; // warn + } + +core.StackAddressEscape (C) +""""""""""""""""""""""""""" +Check that addresses to stack memory do not escape the function. + +.. code-block:: c + + char const *p; + + void test() { + char const str[] = "string"; + p = str; // warn + } + + void* test() { + return __builtin_alloca(12); // warn + } + + void test() { + static int *x; + int y; + x = &y; // warn + } + + +core.UndefinedBinaryOperatorResult (C) +"""""""""""""""""""""""""""""""""""""" +Check for undefined results of binary operators. + +.. code-block:: c + + void test() { + int x; + int y = x + 1; // warn: left operand is garbage + } + +core.VLASize (C) +"""""""""""""""" +Check for declarations of Variable Length Arrays of undefined or zero size. + + Check for declarations of VLA of undefined or zero size. + +.. code-block:: c + + void test() { + int x; + int vla1[x]; // warn: garbage as size + } + + void test() { + int x = 0; + int vla2[x]; // warn: zero size + } + +core.uninitialized.ArraySubscript (C) +""""""""""""""""""""""""""""""""""""" +Check for uninitialized values used as array subscripts. + +.. code-block:: c + + void test() { + int i, a[10]; + int x = a[i]; // warn: array subscript is undefined + } + +core.uninitialized.Assign (C) +""""""""""""""""""""""""""""" +Check for assigning uninitialized values. + +.. code-block:: c + + void test() { + int x; + x |= 1; // warn: left expression is uninitialized + } + +core.uninitialized.Branch (C) +""""""""""""""""""""""""""""" +Check for uninitialized values used as branch conditions. + +.. code-block:: c + + void test() { + int x; + if (x) // warn + return; + } + +core.uninitialized.CapturedBlockVariable (C) +"""""""""""""""""""""""""""""""""""""""""""" +Check for blocks that capture uninitialized values. + +.. code-block:: c + + void test() { + int x; + ^{ int y = x; }(); // warn + } + +core.uninitialized.UndefReturn (C) +"""""""""""""""""""""""""""""""""" +Check for uninitialized values being returned to the caller. + +.. code-block:: c + + int test() { + int x; + return x; // warn + } + +.. _cplusplus-checkers: + + +cpluslus +^^^^^^^^ + +C++ Checkers. + +cplusplus.InnerPointer +"""""""""""""""""""""" +Check for inner pointers of C++ containers used after re/deallocation. + +cplusplus.NewDelete (C++) +""""""""""""""""""""""""" +Check for double-free and use-after-free problems. Traces memory managed by new/delete. + +.. literalinclude:: checkers/newdelete_example.cpp + :language: cpp + +cplusplus.NewDeleteLeaks (C++) +"""""""""""""""""""""""""""""" +Check for memory leaks. Traces memory managed by new/delete. + +.. code-block:: cpp + + void test() { + int *p = new int; + } // warn + + +cplusplus.SelfAssignment (C++) +"""""""""""""""""""""""""""""" +Checks C++ copy and move assignment operators for self assignment. + +.. _deadcode-checkers: + +deadcode +^^^^^^^^ + +Dead Code Checkers. + +deadcode.DeadStores (C) +""""""""""""""""""""""" +Check for values stored to variables that are never read afterwards. + +.. code-block:: c + + void test() { + int x; + x = 1; // warn + } + +.. _nullability-checkers: + +nullability +^^^^^^^^^^^ + +Objective C checkers that warn for null pointer passing and dereferencing errors. + +nullability.NullPassedToNonnull (ObjC) +"""""""""""""""""""""""""""""""""""""" +Warns when a null pointer is passed to a pointer which has a _Nonnull type. + +.. code-block:: objc + + if (name != nil) + return; + // Warning: nil passed to a callee that requires a non-null 1st parameter + NSString *greeting = [@"Hello " stringByAppendingString:name]; + +nullability.NullReturnedFromNonnull (ObjC) +"""""""""""""""""""""""""""""""""""""""""" +Warns when a null pointer is returned from a function that has _Nonnull return type. + +.. code-block:: objc + + - (nonnull id)firstChild { + id result = nil; + if ([_children count] > 0) + result = _children[0]; + + // Warning: nil returned from a method that is expected + // to return a non-null value + return result; + } + +nullability.NullableDereferenced (ObjC) +""""""""""""""""""""""""""""""""""""""" +Warns when a nullable pointer is dereferenced. + +.. code-block:: objc + + struct LinkedList { + int data; + struct LinkedList *next; + }; + + struct LinkedList * _Nullable getNext(struct LinkedList *l); + + void updateNextData(struct LinkedList *list, int newData) { + struct LinkedList *next = getNext(list); + // Warning: Nullable pointer is dereferenced + next->data = 7; + } + +nullability.NullablePassedToNonnull (ObjC) +"""""""""""""""""""""""""""""""""""""""""" +Warns when a nullable pointer is passed to a pointer which has a _Nonnull type. + +.. code-block:: objc + + typedef struct Dummy { int val; } Dummy; + Dummy *_Nullable returnsNullable(); + void takesNonnull(Dummy *_Nonnull); + + void test() { + Dummy *p = returnsNullable(); + takesNonnull(p); // warn + } + +nullability.NullableReturnedFromNonnull (ObjC) +"""""""""""""""""""""""""""""""""""""""""""""" +Warns when a nullable pointer is returned from a function that has _Nonnull return type. + +.. _optin-checkers: + +optin +^^^^^ + +Checkers for portability, performance or coding style specific rules. + +optin.cplusplus.VirtualCall (C++) +""""""""""""""""""""""""""""""""" +Check virtual function calls during construction or destruction. + +.. code-block:: cpp + + class A { + public: + A() { + f(); // warn + } + virtual void f(); + }; + + class A { + public: + ~A() { + this->f(); // warn + } + virtual void f(); + }; + +optin.mpi.MPI-Checker (C) +""""""""""""""""""""""""" +Checks MPI code. + +.. code-block:: c + + void test() { + double buf = 0; + MPI_Request sendReq1; + MPI_Ireduce(MPI_IN_PLACE, &buf, 1, MPI_DOUBLE, MPI_SUM, + 0, MPI_COMM_WORLD, &sendReq1); + } // warn: request 'sendReq1' has no matching wait. + + void test() { + double buf = 0; + MPI_Request sendReq; + MPI_Isend(&buf, 1, MPI_DOUBLE, 0, 0, MPI_COMM_WORLD, &sendReq); + MPI_Irecv(&buf, 1, MPI_DOUBLE, 0, 0, MPI_COMM_WORLD, &sendReq); // warn + MPI_Isend(&buf, 1, MPI_DOUBLE, 0, 0, MPI_COMM_WORLD, &sendReq); // warn + MPI_Wait(&sendReq, MPI_STATUS_IGNORE); + } + + void missingNonBlocking() { + int rank = 0; + MPI_Comm_rank(MPI_COMM_WORLD, &rank); + MPI_Request sendReq1[10][10][10]; + MPI_Wait(&sendReq1[1][7][9], MPI_STATUS_IGNORE); // warn + } + +optin.osx.cocoa.localizability.EmptyLocalizationContextChecker (ObjC) +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +Check that NSLocalizedString macros include a comment for context. + +.. code-block:: objc + + - (void)test { + NSString *string = NSLocalizedString(@"LocalizedString", nil); // warn + NSString *string2 = NSLocalizedString(@"LocalizedString", @" "); // warn + NSString *string3 = NSLocalizedStringWithDefaultValue( + @"LocalizedString", nil, [[NSBundle alloc] init], nil,@""); // warn + } + +optin.osx.cocoa.localizability.NonLocalizedStringChecker (ObjC) +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +Warns about uses of non-localized NSStrings passed to UI methods expecting localized NSStrings. + +.. code-block:: objc + + NSString *alarmText = + NSLocalizedString(@"Enabled", @"Indicates alarm is turned on"); + if (!isEnabled) { + alarmText = @"Disabled"; + } + UILabel *alarmStateLabel = [[UILabel alloc] init]; + + // Warning: User-facing text should use localized string macro + [alarmStateLabel setText:alarmText]; + +optin.performance.GCDAntipattern +"""""""""""""""""""""""""""""""" +Check for performance anti-patterns when using Grand Central Dispatch. + +optin.performance.Padding +""""""""""""""""""""""""" +Check for excessively padded structs. + +optin.portability.UnixAPI +""""""""""""""""""""""""" +Finds implementation-defined behavior in UNIX/Posix functions. + + +.. _security-checkers: + +security +^^^^^^^^ + +Security related checkers. + +security.FloatLoopCounter (C) +""""""""""""""""""""""""""""" +Warn on using a floating point value as a loop counter (CERT: FLP30-C, FLP30-CPP). + +.. code-block:: c + + void test() { + for (float x = 0.1f; x <= 1.0f; x += 0.1f) {} // warn + } + +security.insecureAPI.UncheckedReturn (C) +"""""""""""""""""""""""""""""""""""""""" +Warn on uses of functions whose return values must be always checked. + +.. code-block:: c + + void test() { + setuid(1); // warn + } + +security.insecureAPI.bcmp (C) +""""""""""""""""""""""""""""" +Warn on uses of the 'bcmp' function. + +.. code-block:: c + + void test() { + bcmp(ptr0, ptr1, n); // warn + } + +security.insecureAPI.bcopy (C) +"""""""""""""""""""""""""""""" +Warn on uses of the 'bcopy' function. + +.. code-block:: c + + void test() { + bcopy(src, dst, n); // warn + } + +security.insecureAPI.bzero (C) +"""""""""""""""""""""""""""""" +Warn on uses of the 'bzero' function. + +.. code-block:: c + + void test() { + bzero(ptr, n); // warn + } + +security.insecureAPI.getpw (C) +"""""""""""""""""""""""""""""" +Warn on uses of the 'getpw' function. + +.. code-block:: c + + void test() { + char buff[1024]; + getpw(2, buff); // warn + } + +security.insecureAPI.gets (C) +""""""""""""""""""""""""""""" +Warn on uses of the 'gets' function. + +.. code-block:: c + + void test() { + char buff[1024]; + gets(buff); // warn + } + +security.insecureAPI.mkstemp (C) +"""""""""""""""""""""""""""""""" +Warn when 'mkstemp' is passed fewer than 6 X's in the format string. + +.. code-block:: c + + void test() { + mkstemp("XX"); // warn + } + +security.insecureAPI.mktemp (C) +""""""""""""""""""""""""""""""" +Warn on uses of the ``mktemp`` function. + +.. code-block:: c + + void test() { + char *x = mktemp("/tmp/zxcv"); // warn: insecure, use mkstemp + } + +security.insecureAPI.rand (C) +""""""""""""""""""""""""""""" +Warn on uses of inferior random number generating functions (only if arc4random function is available): +``drand48, erand48, jrand48, lcong48, lrand48, mrand48, nrand48, random, rand_r``. + +.. code-block:: c + + void test() { + random(); // warn + } + +security.insecureAPI.strcpy (C) +""""""""""""""""""""""""""""""" +Warn on uses of the ``strcpy`` and ``strcat`` functions. + +.. code-block:: c + + void test() { + char x[4]; + char *y = "abcd"; + + strcpy(x, y); // warn + } + + +security.insecureAPI.vfork (C) +"""""""""""""""""""""""""""""" + Warn on uses of the 'vfork' function. + +.. code-block:: c + + void test() { + vfork(); // warn + } + +security.insecureAPI.DeprecatedOrUnsafeBufferHandling (C) +""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + Warn on occurrences of unsafe or deprecated buffer handling functions, which now have a secure variant: ``sprintf, vsprintf, scanf, wscanf, fscanf, fwscanf, vscanf, vwscanf, vfscanf, vfwscanf, sscanf, swscanf, vsscanf, vswscanf, swprintf, snprintf, vswprintf, vsnprintf, memcpy, memmove, strncpy, strncat, memset`` + +.. code-block:: c + + void test() { + char buf [5]; + strncpy(buf, "a", 1); // warn + } + +.. _unix-checkers: + +unix +^^^^ +POSIX/Unix checkers. + +unix.API (C) +"""""""""""" +Check calls to various UNIX/Posix functions: ``open, pthread_once, calloc, malloc, realloc, alloca``. + +.. literalinclude:: checkers/unix_api_example.c + :language: c + +unix.Malloc (C) +""""""""""""""" +Check for memory leaks, double free, and use-after-free problems. Traces memory managed by malloc()/free(). + +.. literalinclude:: checkers/unix_malloc_example.c + :language: c + +unix.MallocSizeof (C) +""""""""""""""""""""" +Check for dubious ``malloc`` arguments involving ``sizeof``. + +.. code-block:: c + + void test() { + long *p = malloc(sizeof(short)); + // warn: result is converted to 'long *', which is + // incompatible with operand type 'short' + free(p); + } + +unix.MismatchedDeallocator (C, C++) +""""""""""""""""""""""""""""""""""" +Check for mismatched deallocators. + +.. literalinclude:: checkers/mismatched_deallocator_example.cpp + :language: c + +unix.Vfork (C) +"""""""""""""" +Check for proper usage of ``vfork``. + +.. code-block:: c + + int test(int x) { + pid_t pid = vfork(); // warn + if (pid != 0) + return 0; + + switch (x) { + case 0: + pid = 1; + execl("", "", 0); + _exit(1); + break; + case 1: + x = 0; // warn: this assignment is prohibited + break; + case 2: + foo(); // warn: this function call is prohibited + break; + default: + return 0; // warn: return is prohibited + } + + while(1); + } + +unix.cstring.BadSizeArg (C) +""""""""""""""""""""""""""" +Check the size argument passed into C string functions for common erroneous patterns. Use ``-Wno-strncat-size`` compiler option to mute other ``strncat``-related compiler warnings. + +.. code-block:: c + + void test() { + char dest[3]; + strncat(dest, """""""""""""""""""""""""*", sizeof(dest)); + // warn: potential buffer overflow + } + +unix.cstrisng.NullArg (C) +""""""""""""""""""""""""" +Check for null pointers being passed as arguments to C string functions: +``strlen, strnlen, strcpy, strncpy, strcat, strncat, strcmp, strncmp, strcasecmp, strncasecmp``. + +.. code-block:: c + + int test() { + return strlen(0); // warn + } + +.. _osx-checkers: + +osx +^^^ +OS X checkers. + +osx.API (C) +""""""""""" +Check for proper uses of various Apple APIs. + +.. code-block:: objc + + void test() { + dispatch_once_t pred = 0; + dispatch_once(&pred, ^(){}); // warn: dispatch_once uses local + } + +osx.NumberObjectConversion (C, C++, ObjC) +""""""""""""""""""""""""""""""""""""""""" +Check for erroneous conversions of objects representing numbers into numbers. + +.. code-block:: objc + + NSNumber *photoCount = [albumDescriptor objectForKey:@"PhotoCount"]; + // Warning: Comparing a pointer value of type 'NSNumber *' + // to a scalar integer value + if (photoCount > 0) { + [self displayPhotos]; + } + +osx.ObjCProperty (ObjC) +""""""""""""""""""""""" +Check for proper uses of Objective-C properties. + +.. code-block:: objc + + NSNumber *photoCount = [albumDescriptor objectForKey:@"PhotoCount"]; + // Warning: Comparing a pointer value of type 'NSNumber *' + // to a scalar integer value + if (photoCount > 0) { + [self displayPhotos]; + } + + +osx.SecKeychainAPI (C) +"""""""""""""""""""""" +Check for proper uses of Secure Keychain APIs. + +.. literalinclude:: checkers/seckeychainapi_example.m + :language: objc + +osx.cocoa.AtSync (ObjC) +""""""""""""""""""""""" +Check for nil pointers used as mutexes for @synchronized. + +.. code-block:: objc + + void test(id x) { + if (!x) + @synchronized(x) {} // warn: nil value used as mutex + } + + void test() { + id y; + @synchronized(y) {} // warn: uninitialized value used as mutex + } + +osx.cocoa.AutoreleaseWrite +"""""""""""""""""""""""""" +Warn about potentially crashing writes to autoreleasing objects from different autoreleasing pools in Objective-C. + +osx.cocoa.ClassRelease (ObjC) +""""""""""""""""""""""""""""" +Check for sending 'retain', 'release', or 'autorelease' directly to a Class. + +.. code-block:: objc + + @interface MyClass : NSObject + @end + + void test(void) { + [MyClass release]; // warn + } + +osx.cocoa.Dealloc (ObjC) +"""""""""""""""""""""""" +Warn about Objective-C classes that lack a correct implementation of -dealloc + +.. literalinclude:: checkers/dealloc_example.m + :language: objc + +osx.cocoa.IncompatibleMethodTypes (ObjC) +"""""""""""""""""""""""""""""""""""""""" +Warn about Objective-C method signatures with type incompatibilities. + +.. code-block:: objc + + @interface MyClass1 : NSObject + - (int)foo; + @end + + @implementation MyClass1 + - (int)foo { return 1; } + @end + + @interface MyClass2 : MyClass1 + - (float)foo; + @end + + @implementation MyClass2 + - (float)foo { return 1.0; } // warn + @end + +osx.cocoa.Loops +""""""""""""""" +Improved modeling of loops using Cocoa collection types. + +osx.cocoa.MissingSuperCall (ObjC) +""""""""""""""""""""""""""""""""" +Warn about Objective-C methods that lack a necessary call to super. + +.. code-block:: objc + + @interface Test : UIViewController + @end + @implementation test + - (void)viewDidLoad {} // warn + @end + + +osx.cocoa.NSAutoreleasePool (ObjC) +"""""""""""""""""""""""""""""""""" +Warn for suboptimal uses of NSAutoreleasePool in Objective-C GC mode. + +.. code-block:: objc + + void test() { + NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; + [pool release]; // warn + } + +osx.cocoa.NSError (ObjC) +"""""""""""""""""""""""" +Check usage of NSError parameters. + +.. code-block:: objc + + @interface A : NSObject + - (void)foo:(NSError """""""""""""""""""""""")error; + @end + + @implementation A + - (void)foo:(NSError """""""""""""""""""""""")error { + // warn: method accepting NSError"""""""""""""""""""""""" should have a non-void + // return value + } + @end + + @interface A : NSObject + - (BOOL)foo:(NSError """""""""""""""""""""""")error; + @end + + @implementation A + - (BOOL)foo:(NSError """""""""""""""""""""""")error { + *error = 0; // warn: potential null dereference + return 0; + } + @end + +osx.cocoa.NilArg (ObjC) +""""""""""""""""""""""" +Check for prohibited nil arguments to ObjC method calls. + + - caseInsensitiveCompare: + - compare: + - compare:options: + - compare:options:range: + - compare:options:range:locale: + - componentsSeparatedByCharactersInSet: + - initWithFormat: + +.. code-block:: objc + + NSComparisonResult test(NSString *s) { + NSString *aString = nil; + return [s caseInsensitiveCompare:aString]; + // warn: argument to 'NSString' method + // 'caseInsensitiveCompare:' cannot be nil + } + + +osx.cocoa.NonNilReturnValue +""""""""""""""""""""""""""" +Models the APIs that are guaranteed to return a non-nil value. + +osx.cocoa.ObjCGenerics (ObjC) +""""""""""""""""""""""""""""" +Check for type errors when using Objective-C generics. + +.. code-block:: objc + + NSMutableArray *names = [NSMutableArray array]; + NSMutableArray *birthDates = names; + + // Warning: Conversion from value of type 'NSDate *' + // to incompatible type 'NSString *' + [birthDates addObject: [NSDate date]]; + +osx.cocoa.RetainCount (ObjC) +"""""""""""""""""""""""""""" +Check for leaks and improper reference count management + +.. code-block:: objc + + void test() { + NSString *s = [[NSString alloc] init]; // warn + } + + CFStringRef test(char *bytes) { + return CFStringCreateWithCStringNoCopy( + 0, bytes, NSNEXTSTEPStringEncoding, 0); // warn + } + + +osx.cocoa.RunLoopAutoreleaseLeak +"""""""""""""""""""""""""""""""" +Check for leaked memory in autorelease pools that will never be drained. + +osx.cocoa.SelfInit (ObjC) +""""""""""""""""""""""""" +Check that 'self' is properly initialized inside an initializer method. + +.. code-block:: objc + + @interface MyObj : NSObject { + id x; + } + - (id)init; + @end + + @implementation MyObj + - (id)init { + [super init]; + x = 0; // warn: instance variable used while 'self' is not + // initialized + return 0; + } + @end + + @interface MyObj : NSObject + - (id)init; + @end + + @implementation MyObj + - (id)init { + [super init]; + return self; // warn: returning uninitialized 'self' + } + @end + +osx.cocoa.SuperDealloc (ObjC) +""""""""""""""""""""""""""""" +Warn about improper use of '[super dealloc]' in Objective-C. + +.. code-block:: objc + + @interface SuperDeallocThenReleaseIvarClass : NSObject { + NSObject *_ivar; + } + @end + + @implementation SuperDeallocThenReleaseIvarClass + - (void)dealloc { + [super dealloc]; + [_ivar release]; // warn + } + @end + +osx.cocoa.UnusedIvars (ObjC) +"""""""""""""""""""""""""""" +Warn about private ivars that are never used. + +.. code-block:: objc + + @interface MyObj : NSObject { + @private + id x; // warn + } + @end + + @implementation MyObj + @end + +osx.cocoa.VariadicMethodTypes (ObjC) +"""""""""""""""""""""""""""""""""""" +Check for passing non-Objective-C types to variadic collection +initialization methods that expect only Objective-C types. + +.. code-block:: objc + + void test() { + [NSSet setWithObjects:@"Foo", "Bar", nil]; + // warn: argument should be an ObjC pointer type, not 'char *' + } + +osx.coreFoundation.CFError (C) +"""""""""""""""""""""""""""""" +Check usage of CFErrorRef* parameters + +.. code-block:: c + + void test(CFErrorRef *error) { + // warn: function accepting CFErrorRef* should have a + // non-void return + } + + int foo(CFErrorRef *error) { + *error = 0; // warn: potential null dereference + return 0; + } + +osx.coreFoundation.CFNumber (C) +""""""""""""""""""""""""""""""" +Check for proper uses of CFNumber APIs. + +.. code-block:: c + + CFNumberRef test(unsigned char x) { + return CFNumberCreate(0, kCFNumberSInt16Type, &x); + // warn: 8 bit integer is used to initialize a 16 bit integer + } + +osx.coreFoundation.CFRetainRelease (C) +"""""""""""""""""""""""""""""""""""""" +Check for null arguments to CFRetain/CFRelease/CFMakeCollectable. + +.. code-block:: c + + void test(CFTypeRef p) { + if (!p) + CFRetain(p); // warn + } + + void test(int x, CFTypeRef p) { + if (p) + return; + + CFRelease(p); // warn + } + +osx.coreFoundation.containers.OutOfBounds (C) +""""""""""""""""""""""""""""""""""""""""""""" +Checks for index out-of-bounds when using 'CFArray' API. + +.. code-block:: c + + void test() { + CFArrayRef A = CFArrayCreate(0, 0, 0, &kCFTypeArrayCallBacks); + CFArrayGetValueAtIndex(A, 0); // warn + } + +osx.coreFoundation.containers.PointerSizedValues (C) +"""""""""""""""""""""""""""""""""""""""""""""""""""" +Warns if 'CFArray', 'CFDictionary', 'CFSet' are created with non-pointer-size values. + +.. code-block:: c + + void test() { + int x[] = { 1 }; + CFArrayRef A = CFArrayCreate(0, (const void """""""""""""""""""""""")x, 1, + &kCFTypeArrayCallBacks); // warn + } + + +.. _alpha-checkers: + +Experimental Checkers +--------------------- + +*These are checkers with known issues or limitations that keep them from being on by default. They are likely to have false positives. Bug reports and especially patches are welcome.* + +alpha.clone +^^^^^^^^^^^ + +alpha.clone.CloneChecker (C, C++, ObjC) +""""""""""""""""""""""""""""""""""""""" +Reports similar pieces of code. + +.. code-block:: c + + void log(); + + int max(int a, int b) { // warn + log(); + if (a > b) + return a; + return b; + } + + int maxClone(int x, int y) { // similar code here + log(); + if (x > y) + return x; + return y; + } + +alpha.core.BoolAssignment (ObjC) +"""""""""""""""""""""""""""""""" +Warn about assigning non-{0,1} values to boolean variables. + +.. code-block:: objc + + void test() { + BOOL b = -1; // warn + } + +alpha.core +^^^^^^^^^^ + +alpha.core.CallAndMessageUnInitRefArg (C,C++, ObjC) +""""""""""""""""""""""""""""""""""""""""""""""""""" +Check for logical errors for function calls and Objective-C +message expressions (e.g., uninitialized arguments, null function pointers, and pointer to undefined variables). + +.. code-block:: c + + void test(void) { + int t; + int &p = t; + int &s = p; + int &q = s; + foo(q); // warn + } + + void test(void) { + int x; + foo(&x); // warn + } + +alpha.core.CastSize (C) +""""""""""""""""""""""" +Check when casting a malloc'ed type ``T``, whether the size is a multiple of the size of ``T``. + +.. code-block:: c + + void test() { + int *x = (int *) malloc(11); // warn + } + +alpha.core.CastToStruct (C, C++) +"""""""""""""""""""""""""""""""" +Check for cast from non-struct pointer to struct pointer. + +.. code-block:: cpp + + // C + struct s {}; + + void test(int *p) { + struct s *ps = (struct s *) p; // warn + } + + // C++ + class c {}; + + void test(int *p) { + c *pc = (c *) p; // warn + } + +alpha.core.Conversion (C, C++, ObjC) +"""""""""""""""""""""""""""""""""""" +Loss of sign/precision in implicit conversions. + +.. code-block:: c + + void test(unsigned U, signed S) { + if (S > 10) { + if (U < S) { + } + } + if (S < -10) { + if (U < S) { // warn (loss of sign) + } + } + } + + void test() { + long long A = 1LL << 60; + short X = A; // warn (loss of precision) + } + +alpha.core.DynamicTypeChecker (ObjC) +"""""""""""""""""""""""""""""""""""" +Check for cases where the dynamic and the static type of an object are unrelated. + + +.. code-block:: objc + + id date = [NSDate date]; + + // Warning: Object has a dynamic type 'NSDate *' which is + // incompatible with static type 'NSNumber *'" + NSNumber *number = date; + [number doubleValue]; + +alpha.core.FixedAddr (C) +"""""""""""""""""""""""" +Check for assignment of a fixed address to a pointer. + +.. code-block:: c + + void test() { + int *p; + p = (int *) 0x10000; // warn + } + +alpha.core.IdenticalExpr (C, C++) +""""""""""""""""""""""""""""""""" +Warn about unintended use of identical expressions in operators. + +.. code-block:: cpp + + // C + void test() { + int a = 5; + int b = a | 4 | a; // warn: identical expr on both sides + } + + // C++ + bool f(void); + + void test(bool b) { + int i = 10; + if (f()) { // warn: true and false branches are identical + do { + i--; + } while (f()); + } else { + do { + i--; + } while (f()); + } + } + +alpha.core.PointerArithm (C) +"""""""""""""""""""""""""""" +Check for pointer arithmetic on locations other than array elements. + +.. code-block:: c + + void test() { + int x; + int *p; + p = &x + 1; // warn + } + +alpha.core.PointerSub (C) +""""""""""""""""""""""""" +Check for pointer subtractions on two pointers pointing to different memory chunks. + +.. code-block:: c + + void test() { + int x, y; + int d = &y - &x; // warn + } + +alpha.core.SizeofPtr (C) +"""""""""""""""""""""""" +Warn about unintended use of ``sizeof()`` on pointer expressions. + +.. code-block:: c + + struct s {}; + + int test(struct s *p) { + return sizeof(p); + // warn: sizeof(ptr) can produce an unexpected result + } + +alpha.core.StackAddressAsyncEscape (C) +"""""""""""""""""""""""""""""""""""""" +Check that addresses to stack memory do not escape the function that involves dispatch_after or dispatch_async. +This checker is a part of ``core.StackAddressEscape``, but is temporarily disabled until some false positives are fixed. + +.. code-block:: c + + dispatch_block_t test_block_inside_block_async_leak() { + int x = 123; + void (^inner)(void) = ^void(void) { + int y = x; + ++y; + }; + void (^outer)(void) = ^void(void) { + int z = x; + ++z; + inner(); + }; + return outer; // warn: address of stack-allocated block is captured by a + // returned block + } + +alpha.core.TestAfterDivZero (C) +""""""""""""""""""""""""""""""" +Check for division by variable that is later compared against 0. +Either the comparison is useless or there is division by zero. + +.. code-block:: c + + void test(int x) { + var = 77 / x; + if (x == 0) { } // warn + } + +alpha.cplusplus +^^^^^^^^^^^^^^^ + +alpha.cplusplus.DeleteWithNonVirtualDtor (C++) +"""""""""""""""""""""""""""""""""""""""""""""" +Reports destructions of polymorphic objects with a non-virtual destructor in their base class. + +.. code-block:: cpp + + NonVirtual *create() { + NonVirtual *x = new NVDerived(); // note: conversion from derived to base + // happened here + return x; + } + + void sink(NonVirtual *x) { + delete x; // warn: destruction of a polymorphic object with no virtual + // destructor + } + +alpha.cplusplus.EnumCastOutOfRange (C++) +"""""""""""""""""""""""""""""""""""""""" +Check for integer to enumeration casts that could result in undefined values. + +.. code-block:: cpp + + enum TestEnum { + A = 0 + }; + + void foo() { + TestEnum t = static_cast(-1); + // warn: the value provided to the cast expression is not in + the valid range of values for the enum + +alpha.cplusplus.InvalidatedIterator (C++) +""""""""""""""""""""""""""""""""""""""""" +Check for use of invalidated iterators. + +.. code-block:: cpp + + void bad_copy_assign_operator_list1(std::list &L1, + const std::list &L2) { + auto i0 = L1.cbegin(); + L1 = L2; + *i0; // warn: invalidated iterator accessed + } + + +alpha.cplusplus.IteratorRange (C++) +""""""""""""""""""""""""""""""""""" +Check for iterators used outside their valid ranges. + +.. code-block:: cpp + + void simple_bad_end(const std::vector &v) { + auto i = v.end(); + *i; // warn: iterator accessed outside of its range + } + +alpha.cplusplus.MismatchedIterator (C++) +"""""""""""""""""""""""""""""""""""""""" +Check for use of iterators of different containers where iterators of the same container are expected. + +.. code-block:: cpp + + void bad_insert3(std::vector &v1, std::vector &v2) { + v2.insert(v1.cbegin(), v2.cbegin(), v2.cend()); // warn: container accessed + // using foreign + // iterator argument + v1.insert(v1.cbegin(), v1.cbegin(), v2.cend()); // warn: iterators of + // different containers + // used where the same + // container is + // expected + v1.insert(v1.cbegin(), v2.cbegin(), v1.cend()); // warn: iterators of + // different containers + // used where the same + // container is + // expected + } + +alpha.cplusplus.MisusedMovedObject (C++) +"""""""""""""""""""""""""""""""""""""""" +Method calls on a moved-from object and copying a moved-from object will be reported. + + +.. code-block:: cpp + + struct A { + void foo() {} + }; + + void f() { + A a; + A b = std::move(a); // note: 'a' became 'moved-from' here + a.foo(); // warn: method call on a 'moved-from' object 'a' + } + +alpha.cplusplus.UninitializedObject (C++) +""""""""""""""""""""""""""""""""""""""""" + +This checker reports uninitialized fields in objects created after a constructor call. +It doesn't only find direct uninitialized fields, but rather makes a deep inspection +of the object, analyzing all of it's fields subfields. +The checker regards inherited fields as direct fields, so one will +recieve warnings for uninitialized inherited data members as well. + +.. code-block:: cpp + + // With Pedantic and CheckPointeeInitialization set to true + + struct A { + struct B { + int x; // note: uninitialized field 'this->b.x' + // note: uninitialized field 'this->bptr->x' + int y; // note: uninitialized field 'this->b.y' + // note: uninitialized field 'this->bptr->y' + }; + int *iptr; // note: uninitialized pointer 'this->iptr' + B b; + B *bptr; + char *cptr; // note: uninitialized pointee 'this->cptr' + + A (B *bptr, char *cptr) : bptr(bptr), cptr(cptr) {} + }; + + void f() { + A::B b; + char c; + A a(&b, &c); // warning: 6 uninitialized fields + // after the constructor call + } + + // With Pedantic set to false and + // CheckPointeeInitialization set to true + // (every field is uninitialized) + + struct A { + struct B { + int x; + int y; + }; + int *iptr; + B b; + B *bptr; + char *cptr; + + A (B *bptr, char *cptr) : bptr(bptr), cptr(cptr) {} + }; + + void f() { + A::B b; + char c; + A a(&b, &c); // no warning + } + + // With Pedantic set to true and + // CheckPointeeInitialization set to false + // (pointees are regarded as initialized) + + struct A { + struct B { + int x; // note: uninitialized field 'this->b.x' + int y; // note: uninitialized field 'this->b.y' + }; + int *iptr; // note: uninitialized pointer 'this->iptr' + B b; + B *bptr; + char *cptr; + + A (B *bptr, char *cptr) : bptr(bptr), cptr(cptr) {} + }; + + void f() { + A::B b; + char c; + A a(&b, &c); // warning: 3 uninitialized fields + // after the constructor call + } + + +**Options** + +This checker has several options which can be set from command line (e.g. ``-analyzer-config alpha.cplusplus.UninitializedObject:Pedantic=true``): + +* ``Pedantic`` (boolean). If to false, the checker won't emit warnings for objects that don't have at least one initialized field. Defaults to false. + +* ``NotesAsWarnings`` (boolean). If set to true, the checker will emit a warning for each uninitalized field, as opposed to emitting one warning per constructor call, and listing the uninitialized fields that belongs to it in notes. *Defaults to false.*. + +* ``CheckPointeeInitialization`` (boolean). If set to false, the checker will not analyze the pointee of pointer/reference fields, and will only check whether the object itself is initialized. *Defaults to false.*. + +* ``IgnoreRecordsWithField`` (string). If supplied, the checker will not analyze structures that have a field with a name or type name that matches the given pattern. *Defaults to ""*. Can be set with ``-analyzer-config alpha.cplusplus.UninitializedObject:IgnoreRecordsWithField="[Tt]ag|[Kk]ind"``. + + +alpha.deadcode +^^^^^^^^^^^^^^ +alpha.deadcode.UnreachableCode (C, C++) +""""""""""""""""""""""""""""""""""""""" +Check unreachable code. + +.. code-block:: cpp + + // C + int test() { + int x = 1; + while(x); + return x; // warn + } + + // C++ + void test() { + int a = 2; + + while (a > 1) + a--; + + if (a > 1) + a++; // warn + } + + // Objective-C + void test(id x) { + return; + [x retain]; // warn + } + +alpha.llvm +^^^^^^^^^^ + +alpha.llvm.Conventions +"""""""""""""""""""""" + +Check code for LLVM codebase conventions: + +* A StringRef should not be bound to a temporary std::string whose lifetime is shorter than the StringRef's. +* Clang AST nodes should not have fields that can allocate memory. + + +alpha.osx +^^^^^^^^^ + +alpha.osx.cocoa.DirectIvarAssignment (ObjC) +""""""""""""""""""""""""""""""""""""""""""" +Check for direct assignments to instance variables. + + +.. code-block:: objc + + @interface MyClass : NSObject {} + @property (readonly) id A; + - (void) foo; + @end + + @implementation MyClass + - (void) foo { + _A = 0; // warn + } + @end + +alpha.osx.cocoa.DirectIvarAssignmentForAnnotatedFunctions (ObjC) +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +Check for direct assignments to instance variables in +the methods annotated with ``objc_no_direct_instance_variable_assignment``. + +.. code-block:: objc + + @interface MyClass : NSObject {} + @property (readonly) id A; + - (void) fAnnotated __attribute__(( + annotate("objc_no_direct_instance_variable_assignment"))); + - (void) fNotAnnotated; + @end + + @implementation MyClass + - (void) fAnnotated { + _A = 0; // warn + } + - (void) fNotAnnotated { + _A = 0; // no warn + } + @end + + +alpha.osx.cocoa.InstanceVariableInvalidation (ObjC) +""""""""""""""""""""""""""""""""""""""""""""""""""" +Check that the invalidatable instance variables are +invalidated in the methods annotated with objc_instance_variable_invalidator. + +.. code-block:: objc + + @protocol Invalidation + - (void) invalidate + __attribute__((annotate("objc_instance_variable_invalidator"))); + @end + + @interface InvalidationImpObj : NSObject + @end + + @interface SubclassInvalidationImpObj : InvalidationImpObj { + InvalidationImpObj *var; + } + - (void)invalidate; + @end + + @implementation SubclassInvalidationImpObj + - (void) invalidate {} + @end + // warn: var needs to be invalidated or set to nil + +alpha.osx.cocoa.MissingInvalidationMethod (ObjC) +"""""""""""""""""""""""""""""""""""""""""""""""" +Check that the invalidation methods are present in classes that contain invalidatable instance variables. + +.. code-block:: objc + + @protocol Invalidation + - (void)invalidate + __attribute__((annotate("objc_instance_variable_invalidator"))); + @end + + @interface NeedInvalidation : NSObject + @end + + @interface MissingInvalidationMethodDecl : NSObject { + NeedInvalidation *Var; // warn + } + @end + + @implementation MissingInvalidationMethodDecl + @end + +alpha.osx.cocoa.localizability.PluralMisuseChecker (ObjC) +""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +Warns against using one vs. many plural pattern in code when generating localized strings. + +.. code-block:: objc + + NSString *reminderText = + NSLocalizedString(@"None", @"Indicates no reminders"); + if (reminderCount == 1) { + // Warning: Plural cases are not supported across all languages. + // Use a .stringsdict file instead + reminderText = + NSLocalizedString(@"1 Reminder", @"Indicates single reminder"); + } else if (reminderCount >= 2) { + // Warning: Plural cases are not supported across all languages. + // Use a .stringsdict file instead + reminderText = + [NSString stringWithFormat: + NSLocalizedString(@"%@ Reminders", @"Indicates multiple reminders"), + reminderCount]; + } + +alpha.security +^^^^^^^^^^^^^^ +alpha.security.ArrayBound (C) +""""""""""""""""""""""""""""" +Warn about buffer overflows (older checker). + +.. code-block:: c + + void test() { + char *s = ""; + char c = s[1]; // warn + } + + struct seven_words { + int c[7]; + }; + + void test() { + struct seven_words a, *p; + p = &a; + p[0] = a; + p[1] = a; + p[2] = a; // warn + } + + // note: requires unix.Malloc or + // alpha.unix.MallocWithAnnotations checks enabled. + void test() { + int *p = malloc(12); + p[3] = 4; // warn + } + + void test() { + char a[2]; + int *b = (int*)a; + b[1] = 3; // warn + } + +alpha.security.ArrayBoundV2 (C) +""""""""""""""""""""""""""""""" +Warn about buffer overflows (newer checker). + +.. code-block:: c + + void test() { + char *s = ""; + char c = s[1]; // warn + } + + void test() { + int buf[100]; + int *p = buf; + p = p + 99; + p[1] = 1; // warn + } + + // note: compiler has internal check for this. + // Use -Wno-array-bounds to suppress compiler warning. + void test() { + int buf[100][100]; + buf[0][-1] = 1; // warn + } + + // note: requires alpha.security.taint check turned on. + void test() { + char s[] = "abc"; + int x = getchar(); + char c = s[x]; // warn: index is tainted + } + +alpha.security.MallocOverflow (C) +""""""""""""""""""""""""""""""""" +Check for overflows in the arguments to malloc(). + +.. code-block:: c + + void test(int n) { + void *p = malloc(n * sizeof(int)); // warn + } + +alpha.security.MmapWriteExec (C) +"""""""""""""""""""""""""""""""" +Warn on mmap() calls that are both writable and executable. + +.. code-block:: c + + void test(int n) { + void *c = mmap(NULL, 32, PROT_READ | PROT_WRITE | PROT_EXEC, + MAP_PRIVATE | MAP_ANON, -1, 0); + // warn: Both PROT_WRITE and PROT_EXEC flags are set. This can lead to + // exploitable memory regions, which could be overwritten with malicious + // code + } + +alpha.security.ReturnPtrRange (C) +""""""""""""""""""""""""""""""""" +Check for an out-of-bound pointer being returned to callers. + +.. code-block:: c + + static int A[10]; + + int *test() { + int *p = A + 10; + return p; // warn + } + + int test(void) { + int x; + return x; // warn: undefined or garbage returned + } + +alpha.security.taint.TaintPropagation (C, C++) +"""""""""""""""""""""""""""""""""""""""""""""" +Generate taint information used by other checkers. +A data is tainted when it comes from an unreliable source. + +.. code-block:: c + + void test() { + char x = getchar(); // 'x' marked as tainted + system(&x); // warn: untrusted data is passed to a system call + } + + // note: compiler internally checks if the second param to + // sprintf is a string literal or not. + // Use -Wno-format-security to suppress compiler warning. + void test() { + char s[10], buf[10]; + fscanf(stdin, "%s", s); // 's' marked as tainted + + sprintf(buf, s); // warn: untrusted data as a format string + } + + void test() { + size_t ts; + scanf("%zd", &ts); // 'ts' marked as tainted + int *p = (int *)malloc(ts * sizeof(int)); + // warn: untrusted data as buffer size + } + +alpha.unix +^^^^^^^^^^^ + +alpha.unix.BlockInCriticalSection (C) +""""""""""""""""""""""""""""""""""""" +Check for calls to blocking functions inside a critical section. +Applies to: ``lock, unlock, sleep, getc, fgets, read, recv, pthread_mutex_lock,`` +`` pthread_mutex_unlock, mtx_lock, mtx_timedlock, mtx_trylock, mtx_unlock, lock_guard, unique_lock`` + +.. code-block:: c + + void test() { + std::mutex m; + m.lock(); + sleep(3); // warn: a blocking function sleep is called inside a critical + // section + m.unlock(); + } + +alpha.unix.Chroot (C) +""""""""""""""""""""" +Check improper use of chroot. + +.. code-block:: c + + void f(); + + void test() { + chroot("/usr/local"); + f(); // warn: no call of chdir("/") immediately after chroot + } + +alpha.unix.PthreadLock (C) +"""""""""""""""""""""""""" +Simple lock -> unlock checker. +Applies to: ``pthread_mutex_lock, pthread_rwlock_rdlock, pthread_rwlock_wrlock, lck_mtx_lock, lck_rw_lock_exclusive`` +``lck_rw_lock_shared, pthread_mutex_trylock, pthread_rwlock_tryrdlock, pthread_rwlock_tryrwlock, lck_mtx_try_lock, +lck_rw_try_lock_exclusive, lck_rw_try_lock_shared, pthread_mutex_unlock, pthread_rwlock_unlock, lck_mtx_unlock, lck_rw_done``. + + +.. code-block:: c + + pthread_mutex_t mtx; + + void test() { + pthread_mutex_lock(&mtx); + pthread_mutex_lock(&mtx); + // warn: this lock has already been acquired + } + + lck_mtx_t lck1, lck2; + + void test() { + lck_mtx_lock(&lck1); + lck_mtx_lock(&lck2); + lck_mtx_unlock(&lck1); + // warn: this was not the most recently acquired lock + } + + lck_mtx_t lck1, lck2; + + void test() { + if (lck_mtx_try_lock(&lck1) == 0) + return; + + lck_mtx_lock(&lck2); + lck_mtx_unlock(&lck1); + // warn: this was not the most recently acquired lock + } + +alpha.unix.SimpleStream (C) +""""""""""""""""""""""""""" +Check for misuses of stream APIs. Check for misuses of stream APIs: ``fopen, fclose`` +(demo checker, the subject of the demo (`Slides `_ , +`Video `_) by Anna Zaks and Jordan Rose presented at the +`2012 LLVM Developers' Meeting `_). + +.. code-block:: c + + void test() { + FILE *F = fopen("myfile.txt", "w"); + } // warn: opened file is never closed + + void test() { + FILE *F = fopen("myfile.txt", "w"); + + if (F) + fclose(F); + + fclose(F); // warn: closing a previously closed file stream + } + +alpha.unix.Stream (C) +""""""""""""""""""""" +Check stream handling functions: ``fopen, tmpfile, fclose, fread, fwrite, fseek, ftell, rewind, fgetpos,`` +``fsetpos, clearerr, feof, ferror, fileno``. + +.. code-block:: c + + void test() { + FILE *p = fopen("foo", "r"); + } // warn: opened file is never closed + + void test() { + FILE *p = fopen("foo", "r"); + fseek(p, 1, SEEK_SET); // warn: stream pointer might be NULL + fclose(p); + } + + void test() { + FILE *p = fopen("foo", "r"); + + if (p) + fseek(p, 1, 3); + // warn: third arg should be SEEK_SET, SEEK_END, or SEEK_CUR + + fclose(p); + } + + void test() { + FILE *p = fopen("foo", "r"); + fclose(p); + fclose(p); // warn: already closed + } + + void test() { + FILE *p = tmpfile(); + ftell(p); // warn: stream pointer might be NULL + fclose(p); + } + + +alpha.unix.cstring.BufferOverlap (C) +"""""""""""""""""""""""""""""""""""" +Checks for overlap in two buffer arguments. Applies to: ``memcpy, mempcpy``. + +.. code-block:: c + + void test() { + int a[4] = {0}; + memcpy(a + 2, a + 1, 8); // warn + } + +alpha.unix.cstring.NotNullTerminated (C) +"""""""""""""""""""""""""""""""""""""""" +Check for arguments which are not null-terminated strings; applies to: ``strlen, strnlen, strcpy, strncpy, strcat, strncat``. + +.. code-block:: c + + void test() { + int y = strlen((char *)&test); // warn + } + +alpha.unix.cstring.OutOfBounds (C) +"""""""""""""""""""""""""""""""""" +Check for out-of-bounds access in string functions; applies to:`` strncopy, strncat``. + + +.. code-block:: c + + void test() { + int y = strlen((char *)&test); // warn + } + + +Debug Checkers +--------------- + +.. _debug-checkers: + + +debug +^^^^^ + +Checkers used for debugging the analyzer. +:doc:`developer-docs/DebugChecks` page contains a detailed description. + +debug.AnalysisOrder +""""""""""""""""""" +Print callbacks that are called during analysis in order. + +debug.ConfigDumper +"""""""""""""""""" +Dump config table. + +debug.DumpCFG Display +""""""""""""""""""""" +Control-Flow Graphs. + +debug.DumpCallGraph +""""""""""""""""""" +Display Call Graph. + +debug.DumpCalls +""""""""""""""" +Print calls as they are traversed by the engine. + +debug.DumpDominators +"""""""""""""""""""" +Print the dominance tree for a given CFG. + +debug.DumpLiveVars +"""""""""""""""""" +Print results of live variable analysis. + +debug.DumpTraversal +""""""""""""""""""" +Print branch conditions as they are traversed by the engine. + +debug.ExprInspection +"""""""""""""""""""" +Check the analyzer's understanding of expressions. + +debug.Stats +""""""""""" +Emit warnings with analyzer statistics. + +debug.TaintTest +""""""""""""""" +Mark tainted symbols as such. + +debug.ViewCFG +""""""""""""" +View Control-Flow Graphs using GraphViz. + +debug.ViewCallGraph +""""""""""""""""""" +View Call Graph using GraphViz. + +debug.ViewExplodedGraph +""""""""""""""""""""""" +View Exploded Graphs using GraphViz. + diff --git a/clang/docs/analyzer/checkers/callandmessage_example.c b/clang/docs/analyzer/checkers/callandmessage_example.c new file mode 100644 index 0000000000000..7e14fbe464fcb --- /dev/null +++ b/clang/docs/analyzer/checkers/callandmessage_example.c @@ -0,0 +1,66 @@ +//C +void test() { + void (*foo)(void); + foo = 0; + foo(); // warn: function pointer is null + } + + // C++ + class C { + public: + void f(); + }; + + void test() { + C *pc; + pc->f(); // warn: object pointer is uninitialized + } + + // C++ + class C { + public: + void f(); + }; + + void test() { + C *pc = 0; + pc->f(); // warn: object pointer is null + } + + // Objective-C + @interface MyClass : NSObject + @property (readwrite,assign) id x; + - (long double)longDoubleM; + @end + + void test() { + MyClass *obj1; + long double ld1 = [obj1 longDoubleM]; + // warn: receiver is uninitialized + } + + // Objective-C + @interface MyClass : NSObject + @property (readwrite,assign) id x; + - (long double)longDoubleM; + @end + + void test() { + MyClass *obj1; + id i = obj1.x; // warn: uninitialized object pointer + } + + // Objective-C + @interface Subscriptable : NSObject + - (id)objectAtIndexedSubscript:(unsigned int)index; + @end + + @interface MyClass : Subscriptable + @property (readwrite,assign) id x; + - (long double)longDoubleM; + @end + + void test() { + MyClass *obj1; + id i = obj1[0]; // warn: uninitialized object pointer + } diff --git a/clang/docs/analyzer/checkers/dealloc_example.m b/clang/docs/analyzer/checkers/dealloc_example.m new file mode 100644 index 0000000000000..ac51911aff16b --- /dev/null +++ b/clang/docs/analyzer/checkers/dealloc_example.m @@ -0,0 +1,49 @@ + + +@interface MyObject : NSObject { + id _myproperty; +} +@end + +@implementation MyObject // warn: lacks 'dealloc' +@end + +@interface MyObject : NSObject {} +@property(assign) id myproperty; +@end + +@implementation MyObject // warn: does not send 'dealloc' to super +- (void)dealloc { + self.myproperty = 0; +} +@end + +@interface MyObject : NSObject { + id _myproperty; +} +@property(retain) id myproperty; +@end + +@implementation MyObject +@synthesize myproperty = _myproperty; + // warn: var was retained but wasn't released +- (void)dealloc { + [super dealloc]; +} +@end + +@interface MyObject : NSObject { + id _myproperty; +} +@property(assign) id myproperty; +@end + +@implementation MyObject +@synthesize myproperty = _myproperty; + // warn: var wasn't retained but was released +- (void)dealloc { + [_myproperty release]; + [super dealloc]; +} +@end + diff --git a/clang/docs/analyzer/checkers/dividezero_example.c b/clang/docs/analyzer/checkers/dividezero_example.c new file mode 100644 index 0000000000000..00ffaac491e50 --- /dev/null +++ b/clang/docs/analyzer/checkers/dividezero_example.c @@ -0,0 +1,9 @@ +void test(int z) { + if (z == 0) + int x = 1 / z; // warn +} + +void test() { + int x = 1; + int y = x % 0; // warn +} diff --git a/clang/docs/analyzer/checkers/mismatched_deallocator_example.cpp b/clang/docs/analyzer/checkers/mismatched_deallocator_example.cpp new file mode 100644 index 0000000000000..2a4103240fe81 --- /dev/null +++ b/clang/docs/analyzer/checkers/mismatched_deallocator_example.cpp @@ -0,0 +1,56 @@ +// C, C++ +void test() { + int *p = (int *)malloc(sizeof(int)); + delete p; // warn +} + +// C, C++ +void __attribute((ownership_returns(malloc))) *user_malloc(size_t); + +void test() { + int *p = (int *)user_malloc(sizeof(int)); + delete p; // warn +} + +// C, C++ +void test() { + int *p = new int; + free(p); // warn +} + +// C, C++ +void test() { + int *p = new int[1]; + realloc(p, sizeof(long)); // warn +} + +// C, C++ +template +struct SimpleSmartPointer { + T *ptr; + + explicit SimpleSmartPointer(T *p = 0) : ptr(p) {} + ~SimpleSmartPointer() { + delete ptr; // warn + } +}; + +void test() { + SimpleSmartPointer a((int *)malloc(4)); +} + +// C++ +void test() { + int *p = (int *)operator new(0); + delete[] p; // warn +} + +// Objective-C, C++ +void test(NSUInteger dataLength) { + int *p = new int; + NSData *d = [NSData dataWithBytesNoCopy:p + length:sizeof(int) freeWhenDone:1]; + // warn +dataWithBytesNoCopy:length:freeWhenDone: cannot take + // ownership of memory allocated by 'new' +} + diff --git a/clang/docs/analyzer/checkers/newdelete_example.cpp b/clang/docs/analyzer/checkers/newdelete_example.cpp new file mode 100644 index 0000000000000..b26ddcb3d964e --- /dev/null +++ b/clang/docs/analyzer/checkers/newdelete_example.cpp @@ -0,0 +1,41 @@ +void f(int *p); + +void testUseMiddleArgAfterDelete(int *p) { + delete p; + f(p); // warn: use after free +} + +class SomeClass { +public: + void f(); +}; + +void test() { + SomeClass *c = new SomeClass; + delete c; + c->f(); // warn: use after free +} + +void test() { + int *p = (int *)__builtin_alloca(sizeof(int)); + delete p; // warn: deleting memory allocated by alloca +} + +void test() { + int *p = new int; + delete p; + delete p; // warn: attempt to free released +} + +void test() { + int i; + delete &i; // warn: delete address of local +} + +void test() { + int *p = new int[1]; + delete[] (++p); + // warn: argument to 'delete[]' is offset by 4 bytes + // from the start of memory allocated by 'new[]' +} + diff --git a/clang/docs/analyzer/checkers/seckeychainapi_example.m b/clang/docs/analyzer/checkers/seckeychainapi_example.m new file mode 100644 index 0000000000000..979a5d97c7704 --- /dev/null +++ b/clang/docs/analyzer/checkers/seckeychainapi_example.m @@ -0,0 +1,64 @@ + + +void test() { + unsigned int *ptr = 0; + UInt32 length; + + SecKeychainItemFreeContent(ptr, &length); + // warn: trying to free data which has not been allocated +} + +void test() { + unsigned int *ptr = 0; + UInt32 *length = 0; + void *outData; + + OSStatus st = + SecKeychainItemCopyContent(2, ptr, ptr, length, outData); + // warn: data is not released +} + +void test() { + unsigned int *ptr = 0; + UInt32 *length = 0; + void *outData; + + OSStatus st = + SecKeychainItemCopyContent(2, ptr, ptr, length, &outData); + + SecKeychainItemFreeContent(ptr, outData); + // warn: only call free if a non-NULL buffer was returned +} + +void test() { + unsigned int *ptr = 0; + UInt32 *length = 0; + void *outData; + + OSStatus st = + SecKeychainItemCopyContent(2, ptr, ptr, length, &outData); + + st = SecKeychainItemCopyContent(2, ptr, ptr, length, &outData); + // warn: release data before another call to the allocator + + if (st == noErr) + SecKeychainItemFreeContent(ptr, outData); +} + +void test() { + SecKeychainItemRef itemRef = 0; + SecKeychainAttributeInfo *info = 0; + SecItemClass *itemClass = 0; + SecKeychainAttributeList *attrList = 0; + UInt32 *length = 0; + void *outData = 0; + + OSStatus st = + SecKeychainItemCopyAttributesAndData(itemRef, info, + itemClass, &attrList, + length, &outData); + + SecKeychainItemFreeContent(attrList, outData); + // warn: deallocator doesn't match the allocator +} + diff --git a/clang/docs/analyzer/checkers/unix_api_example.c b/clang/docs/analyzer/checkers/unix_api_example.c new file mode 100644 index 0000000000000..66ed56fd8663b --- /dev/null +++ b/clang/docs/analyzer/checkers/unix_api_example.c @@ -0,0 +1,37 @@ + +// Currently the check is performed for apple targets only. +void test(const char *path) { + int fd = open(path, O_CREAT); + // warn: call to 'open' requires a third argument when the + // 'O_CREAT' flag is set +} + +void f(); + +void test() { + pthread_once_t pred = {0x30B1BCBA, {0}}; + pthread_once(&pred, f); + // warn: call to 'pthread_once' uses the local variable +} + +void test() { + void *p = malloc(0); // warn: allocation size of 0 bytes +} + +void test() { + void *p = calloc(0, 42); // warn: allocation size of 0 bytes +} + +void test() { + void *p = malloc(1); + p = realloc(p, 0); // warn: allocation size of 0 bytes +} + +void test() { + void *p = alloca(0); // warn: allocation size of 0 bytes +} + +void test() { + void *p = valloc(0); // warn: allocation size of 0 bytes +} + diff --git a/clang/docs/analyzer/checkers/unix_malloc_example.c b/clang/docs/analyzer/checkers/unix_malloc_example.c new file mode 100644 index 0000000000000..68c5a4a8f1c5f --- /dev/null +++ b/clang/docs/analyzer/checkers/unix_malloc_example.c @@ -0,0 +1,30 @@ + +void test() { + int *p = malloc(1); + free(p); + free(p); // warn: attempt to free released memory +} + +void test() { + int *p = malloc(sizeof(int)); + free(p); + *p = 1; // warn: use after free +} + +void test() { + int *p = malloc(1); + if (p) + return; // warn: memory is never released +} + +void test() { + int a[] = { 1 }; + free(a); // warn: argument is not allocated by malloc +} + +void test() { + int *p = malloc(sizeof(char)); + p = p - 1; + free(p); // warn: argument to free() is offset by -4 bytes +} + diff --git a/clang/docs/analyzer/developer-docs.rst b/clang/docs/analyzer/developer-docs.rst new file mode 100644 index 0000000000000..a3d74a765f933 --- /dev/null +++ b/clang/docs/analyzer/developer-docs.rst @@ -0,0 +1,14 @@ +Developer Docs +============== + +Contents: + +.. toctree:: + :maxdepth: 2 + + developer-docs/DebugChecks + developer-docs/IPA + developer-docs/InitializerLists + developer-docs/nullability + developer-docs/RegionStore + \ No newline at end of file diff --git a/clang/docs/analyzer/DebugChecks.rst b/clang/docs/analyzer/developer-docs/DebugChecks.rst similarity index 100% rename from clang/docs/analyzer/DebugChecks.rst rename to clang/docs/analyzer/developer-docs/DebugChecks.rst diff --git a/clang/docs/analyzer/developer-docs/IPA.rst b/clang/docs/analyzer/developer-docs/IPA.rst new file mode 100644 index 0000000000000..2e8fe37055b33 --- /dev/null +++ b/clang/docs/analyzer/developer-docs/IPA.rst @@ -0,0 +1,396 @@ +Inlining +======== + +There are several options that control which calls the analyzer will consider for +inlining. The major one is ``-analyzer-config ipa``: + +* ``analyzer-config ipa=none`` - All inlining is disabled. This is the only mode + available in LLVM 3.1 and earlier and in Xcode 4.3 and earlier. + +* ``analyzer-config ipa=basic-inlining`` - Turns on inlining for C functions, C++ + static member functions, and blocks -- essentially, the calls that behave + like simple C function calls. This is essentially the mode used in + Xcode 4.4. + +* ``analyzer-config ipa=inlining`` - Turns on inlining when we can confidently find + the function/method body corresponding to the call. (C functions, static + functions, devirtualized C++ methods, Objective-C class methods, Objective-C + instance methods when ExprEngine is confident about the dynamic type of the + instance). + +* ``analyzer-config ipa=dynamic`` - Inline instance methods for which the type is + determined at runtime and we are not 100% sure that our type info is + correct. For virtual calls, inline the most plausible definition. + +* ``analyzer-config ipa=dynamic-bifurcate`` - Same as -analyzer-config ipa=dynamic, + but the path is split. We inline on one branch and do not inline on the + other. This mode does not drop the coverage in cases when the parent class + has code that is only exercised when some of its methods are overridden. + +Currently, ``-analyzer-config ipa=dynamic-bifurcate`` is the default mode. + +While ``-analyzer-config ipa`` determines in general how aggressively the analyzer +will try to inline functions, several additional options control which types of +functions can inlined, in an all-or-nothing way. These options use the +analyzer's configuration table, so they are all specified as follows: + + ``-analyzer-config OPTION=VALUE`` + +c++-inlining +------------ + +This option controls which C++ member functions may be inlined. + + ``-analyzer-config c++-inlining=[none | methods | constructors | destructors]`` + +Each of these modes implies that all the previous member function kinds will be +inlined as well; it doesn't make sense to inline destructors without inlining +constructors, for example. + +The default c++-inlining mode is 'destructors', meaning that all member +functions with visible definitions will be considered for inlining. In some +cases the analyzer may still choose not to inline the function. + +Note that under 'constructors', constructors for types with non-trivial +destructors will not be inlined. Additionally, no C++ member functions will be +inlined under -analyzer-config ipa=none or -analyzer-config ipa=basic-inlining, +regardless of the setting of the c++-inlining mode. + +c++-template-inlining +^^^^^^^^^^^^^^^^^^^^^ + +This option controls whether C++ templated functions may be inlined. + + ``-analyzer-config c++-template-inlining=[true | false]`` + +Currently, template functions are considered for inlining by default. + +The motivation behind this option is that very generic code can be a source +of false positives, either by considering paths that the caller considers +impossible (by some unstated precondition), or by inlining some but not all +of a deep implementation of a function. + +c++-stdlib-inlining +^^^^^^^^^^^^^^^^^^^ + +This option controls whether functions from the C++ standard library, including +methods of the container classes in the Standard Template Library, should be +considered for inlining. + + ``-analyzer-config c++-stdlib-inlining=[true | false]`` + +Currently, C++ standard library functions are considered for inlining by +default. + +The standard library functions and the STL in particular are used ubiquitously +enough that our tolerance for false positives is even lower here. A false +positive due to poor modeling of the STL leads to a poor user experience, since +most users would not be comfortable adding assertions to system headers in order +to silence analyzer warnings. + +c++-container-inlining +^^^^^^^^^^^^^^^^^^^^^^ + +This option controls whether constructors and destructors of "container" types +should be considered for inlining. + + ``-analyzer-config c++-container-inlining=[true | false]`` + +Currently, these constructors and destructors are NOT considered for inlining +by default. + +The current implementation of this setting checks whether a type has a member +named 'iterator' or a member named 'begin'; these names are idiomatic in C++, +with the latter specified in the C++11 standard. The analyzer currently does a +fairly poor job of modeling certain data structure invariants of container-like +objects. For example, these three expressions should be equivalent: + + +.. code-block:: cpp + + std::distance(c.begin(), c.end()) == 0 + c.begin() == c.end() + c.empty() + +Many of these issues are avoided if containers always have unknown, symbolic +state, which is what happens when their constructors are treated as opaque. +In the future, we may decide specific containers are "safe" to model through +inlining, or choose to model them directly using checkers instead. + + +Basics of Implementation +------------------------ + +The low-level mechanism of inlining a function is handled in +ExprEngine::inlineCall and ExprEngine::processCallExit. + +If the conditions are right for inlining, a CallEnter node is created and added +to the analysis work list. The CallEnter node marks the change to a new +LocationContext representing the called function, and its state includes the +contents of the new stack frame. When the CallEnter node is actually processed, +its single successor will be a edge to the first CFG block in the function. + +Exiting an inlined function is a bit more work, fortunately broken up into +reasonable steps: + +1. The CoreEngine realizes we're at the end of an inlined call and generates a + CallExitBegin node. + +2. ExprEngine takes over (in processCallExit) and finds the return value of the + function, if it has one. This is bound to the expression that triggered the + call. (In the case of calls without origin expressions, such as destructors, + this step is skipped.) + +3. Dead symbols and bindings are cleaned out from the state, including any local + bindings. + +4. A CallExitEnd node is generated, which marks the transition back to the + caller's LocationContext. + +5. Custom post-call checks are processed and the final nodes are pushed back + onto the work list, so that evaluation of the caller can continue. + +Retry Without Inlining +^^^^^^^^^^^^^^^^^^^^^^ + +In some cases, we would like to retry analysis without inlining a particular +call. + +Currently, we use this technique to recover coverage in case we stop +analyzing a path due to exceeding the maximum block count inside an inlined +function. + +When this situation is detected, we walk up the path to find the first node +before inlining was started and enqueue it on the WorkList with a special +ReplayWithoutInlining bit added to it (ExprEngine::replayWithoutInlining). The +path is then re-analyzed from that point without inlining that particular call. + +Deciding When to Inline +^^^^^^^^^^^^^^^^^^^^^^^ + +In general, the analyzer attempts to inline as much as possible, since it +provides a better summary of what actually happens in the program. There are +some cases, however, where the analyzer chooses not to inline: + +- If there is no definition available for the called function or method. In + this case, there is no opportunity to inline. + +- If the CFG cannot be constructed for a called function, or the liveness + cannot be computed. These are prerequisites for analyzing a function body, + with or without inlining. + +- If the LocationContext chain for a given ExplodedNode reaches a maximum cutoff + depth. This prevents unbounded analysis due to infinite recursion, but also + serves as a useful cutoff for performance reasons. + +- If the function is variadic. This is not a hard limitation, but an engineering + limitation. + + Tracked by: Support inlining of variadic functions + +- In C++, constructors are not inlined unless the destructor call will be + processed by the ExprEngine. Thus, if the CFG was built without nodes for + implicit destructors, or if the destructors for the given object are not + represented in the CFG, the constructor will not be inlined. (As an exception, + constructors for objects with trivial constructors can still be inlined.) + See "C++ Caveats" below. + +- In C++, ExprEngine does not inline custom implementations of operator 'new' + or operator 'delete', nor does it inline the constructors and destructors + associated with these. See "C++ Caveats" below. + +- Calls resulting in "dynamic dispatch" are specially handled. See more below. + +- The FunctionSummaries map stores additional information about declarations, + some of which is collected at runtime based on previous analyses. + We do not inline functions which were not profitable to inline in a different + context (for example, if the maximum block count was exceeded; see + "Retry Without Inlining"). + + +Dynamic Calls and Devirtualization +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +"Dynamic" calls are those that are resolved at runtime, such as C++ virtual +method calls and Objective-C message sends. Due to the path-sensitive nature of +the analysis, the analyzer may be able to reason about the dynamic type of the +object whose method is being called and thus "devirtualize" the call. + +This path-sensitive devirtualization occurs when the analyzer can determine what +method would actually be called at runtime. This is possible when the type +information is constrained enough for a simulated C++/Objective-C object that +the analyzer can make such a decision. + +DynamicTypeInfo +^^^^^^^^^^^^^^^ + +As the analyzer analyzes a path, it may accrue information to refine the +knowledge about the type of an object. This can then be used to make better +decisions about the target method of a call. + +Such type information is tracked as DynamicTypeInfo. This is path-sensitive +data that is stored in ProgramState, which defines a mapping from MemRegions to +an (optional) DynamicTypeInfo. + +If no DynamicTypeInfo has been explicitly set for a MemRegion, it will be lazily +inferred from the region's type or associated symbol. Information from symbolic +regions is weaker than from true typed regions. + + EXAMPLE: A C++ object declared "A obj" is known to have the class 'A', but a + reference "A &ref" may dynamically be a subclass of 'A'. + +The DynamicTypePropagation checker gathers and propagates DynamicTypeInfo, +updating it as information is observed along a path that can refine that type +information for a region. + + WARNING: Not all of the existing analyzer code has been retrofitted to use + DynamicTypeInfo, nor is it universally appropriate. In particular, + DynamicTypeInfo always applies to a region with all casts stripped + off, but sometimes the information provided by casts can be useful. + + +RuntimeDefinition +^^^^^^^^^^^^^^^^^ + +The basis of devirtualization is CallEvent's getRuntimeDefinition() method, +which returns a RuntimeDefinition object. When asked to provide a definition, +the CallEvents for dynamic calls will use the DynamicTypeInfo in their +ProgramState to attempt to devirtualize the call. In the case of no dynamic +dispatch, or perfectly constrained devirtualization, the resulting +RuntimeDefinition contains a Decl corresponding to the definition of the called +function, and RuntimeDefinition::mayHaveOtherDefinitions will return FALSE. + +In the case of dynamic dispatch where our information is not perfect, CallEvent +can make a guess, but RuntimeDefinition::mayHaveOtherDefinitions will return +TRUE. The RuntimeDefinition object will then also include a MemRegion +corresponding to the object being called (i.e., the "receiver" in Objective-C +parlance), which ExprEngine uses to decide whether or not the call should be +inlined. + +Inlining Dynamic Calls +^^^^^^^^^^^^^^^^^^^^^^ + +The -analyzer-config ipa option has five different modes: none, basic-inlining, +inlining, dynamic, and dynamic-bifurcate. Under -analyzer-config ipa=dynamic, +all dynamic calls are inlined, whether we are certain or not that this will +actually be the definition used at runtime. Under -analyzer-config ipa=inlining, +only "near-perfect" devirtualized calls are inlined*, and other dynamic calls +are evaluated conservatively (as if no definition were available). + +* Currently, no Objective-C messages are not inlined under + -analyzer-config ipa=inlining, even if we are reasonably confident of the type + of the receiver. We plan to enable this once we have tested our heuristics + more thoroughly. + +The last option, -analyzer-config ipa=dynamic-bifurcate, behaves similarly to +"dynamic", but performs a conservative invalidation in the general virtual case +in *addition* to inlining. The details of this are discussed below. + +As stated above, -analyzer-config ipa=basic-inlining does not inline any C++ +member functions or Objective-C method calls, even if they are non-virtual or +can be safely devirtualized. + + +Bifurcation +^^^^^^^^^^^ + +ExprEngine::BifurcateCall implements the ``-analyzer-config ipa=dynamic-bifurcate`` +mode. + +When a call is made on an object with imprecise dynamic type information +(RuntimeDefinition::mayHaveOtherDefinitions() evaluates to TRUE), ExprEngine +bifurcates the path and marks the object's region (retrieved from the +RuntimeDefinition object) with a path-sensitive "mode" in the ProgramState. + +Currently, there are 2 modes: + +* ``DynamicDispatchModeInlined`` - Models the case where the dynamic type information + of the receiver (MemoryRegion) is assumed to be perfectly constrained so + that a given definition of a method is expected to be the code actually + called. When this mode is set, ExprEngine uses the Decl from + RuntimeDefinition to inline any dynamically dispatched call sent to this + receiver because the function definition is considered to be fully resolved. + +* ``DynamicDispatchModeConservative`` - Models the case where the dynamic type + information is assumed to be incorrect, for example, implies that the method + definition is overridden in a subclass. In such cases, ExprEngine does not + inline the methods sent to the receiver (MemoryRegion), even if a candidate + definition is available. This mode is conservative about simulating the + effects of a call. + +Going forward along the symbolic execution path, ExprEngine consults the mode +of the receiver's MemRegion to make decisions on whether the calls should be +inlined or not, which ensures that there is at most one split per region. + +At a high level, "bifurcation mode" allows for increased semantic coverage in +cases where the parent method contains code which is only executed when the +class is subclassed. The disadvantages of this mode are a (considerable?) +performance hit and the possibility of false positives on the path where the +conservative mode is used. + +Objective-C Message Heuristics +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +ExprEngine relies on a set of heuristics to partition the set of Objective-C +method calls into those that require bifurcation and those that do not. Below +are the cases when the DynamicTypeInfo of the object is considered precise +(cannot be a subclass): + + - If the object was created with +alloc or +new and initialized with an -init + method. + + - If the calls are property accesses using dot syntax. This is based on the + assumption that children rarely override properties, or do so in an + essentially compatible way. + + - If the class interface is declared inside the main source file. In this case + it is unlikely that it will be subclassed. + + - If the method is not declared outside of main source file, either by the + receiver's class or by any superclasses. + +C++ Caveats +^^^^^^^^^^^ + +C++11 [class.cdtor]p4 describes how the vtable of an object is modified as it is +being constructed or destructed; that is, the type of the object depends on +which base constructors have been completed. This is tracked using +DynamicTypeInfo in the DynamicTypePropagation checker. + +There are several limitations in the current implementation: + +* Temporaries are poorly modeled right now because we're not confident in the + placement of their destructors in the CFG. We currently won't inline their + constructors unless the destructor is trivial, and don't process their + destructors at all, not even to invalidate the region. + +* 'new' is poorly modeled due to some nasty CFG/design issues. This is tracked + in PR12014. 'delete' is not modeled at all. + +* Arrays of objects are modeled very poorly right now. ExprEngine currently + only simulates the first constructor and first destructor. Because of this, + ExprEngine does not inline any constructors or destructors for arrays. + + +CallEvent +^^^^^^^^^ + +A CallEvent represents a specific call to a function, method, or other body of +code. It is path-sensitive, containing both the current state (ProgramStateRef) +and stack space (LocationContext), and provides uniform access to the argument +values and return type of a call, no matter how the call is written in the +source or what sort of code body is being invoked. + + NOTE: For those familiar with Cocoa, CallEvent is roughly equivalent to + NSInvocation. + +CallEvent should be used whenever there is logic dealing with function calls +that does not care how the call occurred. + +Examples include checking that arguments satisfy preconditions (such as +__attribute__((nonnull))), and attempting to inline a call. + +CallEvents are reference-counted objects managed by a CallEventManager. While +there is no inherent issue with persisting them (say, in a ProgramState's GDM), +they are intended for short-lived use, and can be recreated from CFGElements or +non-top-level StackFrameContexts fairly easily. diff --git a/clang/docs/analyzer/developer-docs/InitializerLists.rst b/clang/docs/analyzer/developer-docs/InitializerLists.rst new file mode 100644 index 0000000000000..c9dc7a048921e --- /dev/null +++ b/clang/docs/analyzer/developer-docs/InitializerLists.rst @@ -0,0 +1,327 @@ +================ +Initializer List +================ +This discussion took place in https://reviews.llvm.org/D35216 +"Escape symbols when creating std::initializer_list". + +It touches problems of modelling C++ standard library constructs in general, +including modelling implementation-defined fields within C++ standard library +objects, in particular constructing objects into pointers held by such fields, +and separation of responsibilities between analyzer's core and checkers. + +**Artem:** + +I've seen a few false positives that appear because we construct +C++11 std::initializer_list objects with brace initializers, and such +construction is not properly modeled. For instance, if a new object is +constructed on the heap only to be put into a brace-initialized STL container, +the object is reported to be leaked. + +Approach (0): This can be trivially fixed by this patch, which causes pointers +passed into initializer list expressions to immediately escape. + +This fix is overly conservative though. So i did a bit of investigation as to +how model std::initializer_list better. + +According to the standard, ``std::initializer_list`` is an object that has +methods ``begin(), end(), and size()``, where ``begin()`` returns a pointer to continuous +array of ``size()`` objects of type T, and end() is equal to begin() plus size(). +The standard does hint that it should be possible to implement +``std::initializer_list`` as a pair of pointers, or as a pointer and a size +integer, however specific fields that the object would contain are an +implementation detail. + +Ideally, we should be able to model the initializer list's methods precisely. +Or, at least, it should be possible to explain to the analyzer that the list +somehow "takes hold" of the values put into it. Initializer lists can also be +copied, which is a separate story that i'm not trying to address here. + +The obvious approach to modeling ``std::initializer_list`` in a checker would be to +construct a SymbolMetadata for the memory region of the initializer list object, +which would be of type ``T*`` and represent ``begin()``, so we'd trivially model ``begin()`` +as a function that returns this symbol. The array pointed to by that symbol +would be ``bindLoc()``ed to contain the list's contents (probably as a ``CompoundVal`` +to produce less bindings in the store). Extent of this array would represent +``size()`` and would be equal to the length of the list as written. + +So this sounds good, however apparently it does nothing to address our false +positives: when the list escapes, our ``RegionStoreManager`` is not magically +guessing that the metadata symbol attached to it, together with its contents, +should also escape. In fact, it's impossible to trigger a pointer escape from +within the checker. + +Approach (1): If only we enabled ``ProgramState::bindLoc(..., notifyChanges=true)`` +to cause pointer escapes (not only region changes) (which sounds like the right +thing to do anyway) such checker would be able to solve the false positives by +triggering escapes when binding list elements to the list. However, it'd be as +conservative as the current patch's solution. Ideally, we do not want escapes to +happen so early. Instead, we'd prefer them to be delayed until the list itself +escapes. + +So i believe that escaping metadata symbols whenever their base regions escape +would be the right thing to do. Currently we didn't think about that because we +had neither pointer-type metadatas nor non-pointer escapes. + +Approach (2): We could teach the Store to scan itself for bindings to +metadata-symbolic-based regions during scanReachableSymbols() whenever a region +turns out to be reachable. This requires no work on checker side, but it sounds +performance-heavy. + +Approach (3): We could let checkers maintain the set of active metadata symbols +in the program state (ideally somewhere in the Store, which sounds weird but +causes the smallest amount of layering violations), so that the core knew what +to escape. This puts a stress on the checkers, but with a smart data map it +wouldn't be a problem. + +Approach (4): We could allow checkers to trigger pointer escapes in arbitrary +moments. If we allow doing this within ``checkPointerEscape`` callback itself, we +would be able to express facts like "when this region escapes, that metadata +symbol attached to it should also escape". This sounds like an ultimate freedom, +with maximum stress on the checkers - still not too much stress when we have +smart data maps. + +I'm personally liking the approach (2) - it should be possible to avoid +performance overhead, and clarity seems nice. + +**Gabor:** + +At this point, I am a bit wondering about two questions. + +* When should something belong to a checker and when should something belong to the engine? + Sometimes we model library aspects in the engine and model language constructs in checkers. + +* What is the checker programming model that we are aiming for? Maximum freedom or more easy checker development? + +I think if we aim for maximum freedom, we do not need to worry about the +potential stress on checkers, and we can introduce abstractions to mitigate that +later on. +If we want to simplify the API, then maybe it makes more sense to move language +construct modeling to the engine when the checker API is not sufficient instead +of complicating the API. + +Right now I have no preference or objections between the alternatives but there +are some random thoughts: + +* Maybe it would be great to have a guideline how to evolve the analyzer and + follow it, so it can help us to decide in similar situations + +* I do care about performance in this case. The reason is that we have a + limited performance budget. And I think we should not expect most of the checker + writers to add modeling of language constructs. So, in my opinion, it is ok to + have less nice/more verbose API for language modeling if we can have better + performance this way, since it only needs to be done once, and is done by the + framework developers. + +**Artem:** These are some great questions, i guess it'd be better to discuss +them more openly. As a quick dump of my current mood: + +* To me it seems obvious that we need to aim for a checker API that is both + simple and powerful. This can probably by keeping the API as powerful as + necessary while providing a layer of simple ready-made solutions on top of it. + Probably a few reusable components for assembling checkers. And this layer + should ideally be pleasant enough to work with, so that people would prefer to + extend it when something is lacking, instead of falling back to the complex + omnipotent API. I'm thinking of AST matchers vs. AST visitors as a roughly + similar situation: matchers are not omnipotent, but they're so nice. + +* Separation between core and checkers is usually quite strange. Once we have + shared state traits, i generally wouldn't mind having region store or range + constraint manager as checkers (though it's probably not worth it to transform + them - just a mood). The main thing to avoid here would be the situation when + the checker overwrites stuff written by the core because it thinks it has a + better idea what's going on, so the core should provide a good default behavior. + +* Yeah, i totally care about performance as well, and if i try to implement + approach, i'd make sure it's good. + +**Artem:** + +> Approach (2): We could teach the Store to scan itself for bindings to +> metadata-symbolic-based regions during scanReachableSymbols() whenever +> a region turns out to be reachable. This requires no work on checker side, +> but it sounds performance-heavy. + +Nope, this approach is wrong. Metadata symbols may become out-of-date: when the +object changes, metadata symbols attached to it aren't changing (because symbols +simply don't change). The same metadata may have different symbols to denote its +value in different moments of time, but at most one of them represents the +actual metadata value. So we'd be escaping more stuff than necessary. + +If only we had "ghost fields" +(https://lists.llvm.org/pipermail/cfe-dev/2016-May/049000.html), it would have +been much easier, because the ghost field would only contain the actual +metadata, and the Store would always know about it. This example adds to my +belief that ghost fields are exactly what we need for most C++ checkers. + +**Devin:** + +In this case, I would be fine with some sort of +AbstractStorageMemoryRegion that meant "here is a memory region and somewhere +reachable from here exists another region of type T". Or even multiple regions +with different identifiers. This wouldn't specify how the memory is reachable, +but it would allow for transfer functions to get at those regions and it would +allow for invalidation. + +For ``std::initializer_list`` this reachable region would the region for the backing +array and the transfer functions for begin() and end() yield the beginning and +end element regions for it. + +In my view this differs from ghost variables in that (1) this storage does +actually exist (it is just a library implementation detail where that storage +lives) and (2) it is perfectly valid for a pointer into that storage to be +returned and for another part of the program to read or write from that storage. +(Well, in this case just read since it is allowed to be read-only memory). + +What I'm not OK with is modeling abstract analysis state (for example, the count +of a NSMutableArray or the typestate of a file handle) as a value stored in some +ginned up region in the store. This takes an easy problem that the analyzer does +well at (modeling typestate) and turns it into a hard one that the analyzer is +bad at (reasoning about the contents of the heap). + +I think the key criterion here is: "is the region accessible from outside the +library". That is, does the library expose the region as a pointer that can be +read to or written from in the client program? If so, then it makes sense for +this to be in the store: we are modeling reachable storage as storage. But if +we're just modeling arbitrary analysis facts that need to be invalidated when a +pointer escapes then we shouldn't try to gin up storage for them just to get +invalidation for free. + +**Artem:** + +> In this case, I would be fine with some sort of ``AbstractStorageMemoryRegion`` +> that meant "here is a memory region and somewhere reachable from here exists +> another region of type T". Or even multiple regions with different +> identifiers. This wouldn't specify how the memory is reachable, but it would +> allow for transfer functions to get at those regions and it would allow for +> invalidation. + +Yeah, this is what we can easily implement now as a +symbolic-region-based-on-a-metadata-symbol (though we can make a new region +class for that if we eg. want it typed). The problem is that the relation +between such storage region and its parent object region is essentially +immaterial, similarly to the relation between ``SymbolRegionValue`` and its parent +region. Region contents are mutable: today the abstract storage is reachable +from its parent object, tomorrow it's not, and maybe something else becomes +reachable, something that isn't even abstract. So the parent region for the +abstract storage is most of the time at best a "nice to know" thing - we cannot +rely on it to do any actual work. We'd anyway need to rely on the checker to do +the job. + +> For std::initializer_list this reachable region would the region for the +> backing array and the transfer functions for begin() and end() yield the +> beginning and end element regions for it. + +So maybe in fact for std::initializer_list it may work fine because you cannot +change the data after the object is constructed - so this region's contents are +essentially immutable. For the future, i feel as if it is a dead end. + +I'd like to consider another funny example. Suppose we're trying to model + +.. code-block:: cpp + + std::unique_ptr. Consider:: + + void bar(const std::unique_ptr &x); + + void foo(std::unique_ptr &x) { + int *a = x.get(); // (a, 0, direct): &AbstractStorageRegion + *a = 1; // (AbstractStorageRegion, 0, direct): 1 S32b + int *b = new int; + *b = 2; // (SymRegion{conj_$0}, 0 ,direct): 2 S32b + x.reset(b); // Checker map: x -> SymRegion{conj_$0} + bar(x); // 'a' doesn't escape (the pointer was unique), 'b' does. + clang_analyzer_eval(*a == 1); // Making this true is up to the checker. + clang_analyzer_eval(*b == 2); // Making this unknown is up to the checker. + } + +The checker doesn't totally need to ensure that ``*a == 1`` passes - even though the +pointer was unique, it could theoretically have ``.get()``-ed above and the code +could of course break the uniqueness invariant (though we'd probably want it). +The checker can say that "even if ``*a`` did escape, it was not because it was +stuffed directly into bar()". + +The checker's direct responsibility, however, is to solve the ``*b == 2`` thing +(which is in fact the problem we're dealing with in this patch - escaping the +storage region of the object). + +So we're talking about one more operation over the program state (scanning +reachable symbols and regions) that cannot work without checker support. + +We can probably add a new callback "checkReachableSymbols" to solve this. This +is in fact also related to the dead symbols problem (we're scanning for live +symbols in the store and in the checkers separately, but we need to do so +simultaneously with a single worklist). Hmm, in fact this sounds like a good +idea; we can replace checkLiveSymbols with checkReachableSymbols. + +Or we could just have ghost member variables, and no checker support required at +all. For ghost member variables, the relation with their parent region (which +would be their superregion) is actually useful, the mutability of their contents +is expressed naturally, and the store automagically sees reachable symbols, live +symbols, escapes, invalidations, whatever. + +> In my view this differs from ghost variables in that (1) this storage does +> actually exist (it is just a library implementation detail where that storage +> lives) and (2) it is perfectly valid for a pointer into that storage to be +> returned and for another part of the program to read or write from that +> storage. (Well, in this case just read since it is allowed to be read-only +> memory). + +> What I'm not OK with is modeling abstract analysis state (for example, the +> count of a NSMutableArray or the typestate of a file handle) as a value stored +> in some ginned up region in the store.This takes an easy problem that the +> analyzer does well at (modeling typestate) and turns it into a hard one that +> the analyzer is bad at (reasoning about the contents of the heap). + +Yeah, i tend to agree on that. For simple typestates, this is probably an +overkill, so let's definitely put aside the idea of "ghost symbolic regions" +that i had earlier. + +But, to summarize a bit, in our current case, however, the typestate we're +looking for is the contents of the heap. And when we try to model such +typestates (complex in this specific manner, i.e. heap-like) in any checker, we +have a choice between re-doing this modeling in every such checker (which is +something analyzer is indeed good at, but at a price of making checkers heavy) +or instead relying on the Store to do exactly what it's designed to do. + +> I think the key criterion here is: "is the region accessible from outside +> the library". That is, does the library expose the region as a pointer that +> can be read to or written from in the client program? If so, then it makes +> sense for this to be in the store: we are modeling reachable storage as +> storage. But if we're just modeling arbitrary analysis facts that need to be +> invalidated when a pointer escapes then we shouldn't try to gin up storage +> for them just to get invalidation for free. + +As a metaphor, i'd probably compare it to body farms - the difference between +ghost member variables and metadata symbols seems to me like the difference +between body farms and evalCall. Both are nice to have, and body farms are very +pleasant to work with, even if not omnipotent. I think it's fine for a +FunctionDecl's body in a body farm to have a local variable, even if such +variable doesn't actually exist, even if it cannot be seen from outside the +function call. I'm not seeing immediate practical difference between "it does +actually exist" and "it doesn't actually exist, just a handy abstraction". +Similarly, i think it's fine if we have a ``CXXRecordDecl`` with +implementation-defined contents, and try to farm up a member variable as a handy +abstraction (we don't even need to know its name or offset, only that it's there +somewhere). + +**Artem:** + +We've discussed it in person with Devin, and he provided more points to think +about: + +* If the initializer list consists of non-POD data, constructors of list's + objects need to take the sub-region of the list's region as this-region In the + current (v2) version of this patch, these objects are constructed elsewhere and + then trivial-copied into the list's metadata pointer region, which may be + incorrect. This is our overall problem with C++ constructors, which manifests in + this case as well. Additionally, objects would need to be constructed in the + analyzer's core, which would not be able to predict that it needs to take a + checker-specific region as this-region, which makes it harder, though it might + be mitigated by sharing the checker state traits. + +* Because "ghost variables" are not material to the user, we need to somehow + make super sure that they don't make it into the diagnostic messages. + +So, because this needs further digging into overall C++ support and rises too +many questions, i'm delaying a better approach to this problem and will fall +back to the original trivial patch. diff --git a/clang/docs/analyzer/developer-docs/RegionStore.rst b/clang/docs/analyzer/developer-docs/RegionStore.rst new file mode 100644 index 0000000000000..c963e5b720fe6 --- /dev/null +++ b/clang/docs/analyzer/developer-docs/RegionStore.rst @@ -0,0 +1,183 @@ +============ +Region Store +============ +The analyzer "Store" represents the contents of memory regions. It is an opaque +functional data structure stored in each ``ProgramState``; the only class that +can modify the store is its associated StoreManager. + +Currently (Feb. 2013), the only StoreManager implementation being used is +``RegionStoreManager``. This store records bindings to memory regions using a +"base region + offset" key. (This allows ``*p`` and ``p[0]`` to map to the same +location, among other benefits.) + +Regions are grouped into "clusters", which roughly correspond to "regions with +the same base region". This allows certain operations to be more efficient, +such as invalidation. + +Regions that do not have a known offset use a special "symbolic" offset. These +keys store both the original region, and the "concrete offset region" -- the +last region whose offset is entirely concrete. (For example, in the expression +``foo.bar[1][i].baz``, the concrete offset region is the array ``foo.bar[1]``, +since that has a known offset from the start of the top-level ``foo`` struct.) + + +Binding Invalidation +-------------------- + +Supporting both concrete and symbolic offsets makes things a bit tricky. Here's +an example: + +.. code-block:: cpp + + foo[0] = 0; + foo[1] = 1; + foo[i] = i; + +After the third assignment, nothing can be said about the value of ``foo[0]``, +because ``foo[i]`` may have overwritten it! Thus, *binding to a region with a +symbolic offset invalidates the entire concrete offset region.* We know +``foo[i]`` is somewhere within ``foo``, so we don't have to invalidate +anything else, but we do have to be conservative about all other bindings within +``foo``. + +Continuing the example: + +.. code-block:: cpp + + foo[i] = i; + foo[0] = 0; + +After this latest assignment, nothing can be said about the value of ``foo[i]``, +because ``foo[0]`` may have overwritten it! *Binding to a region R with a +concrete offset invalidates any symbolic offset bindings whose concrete offset +region is a super-region **or** sub-region of R.* All we know about ``foo[i]`` +is that it is somewhere within ``foo``, so changing *anything* within ``foo`` +might change ``foo[i]``, and changing *all* of ``foo`` (or its base region) will +*definitely* change ``foo[i]``. + +This logic could be improved by using the current constraints on ``i``, at the +cost of speed. The latter case could also be improved by matching region kinds, +i.e. changing ``foo[0].a`` is unlikely to affect ``foo[i].b``, no matter what +``i`` is. + +For more detail, read through ``RegionStoreManager::removeSubRegionBindings`` in +RegionStore.cpp. + + +ObjCIvarRegions +--------------- + +Objective-C instance variables require a bit of special handling. Like struct +fields, they are not base regions, and when their parent object region is +invalidated, all the instance variables must be invalidated as well. However, +they have no concrete compile-time offsets (in the modern, "non-fragile" +runtime), and so cannot easily be represented as an offset from the start of +the object in the analyzer. Moreover, this means that invalidating a single +instance variable should *not* invalidate the rest of the object, since unlike +struct fields or array elements there is no way to perform pointer arithmetic +to access another instance variable. + +Consequently, although the base region of an ObjCIvarRegion is the entire +object, RegionStore offsets are computed from the start of the instance +variable. Thus it is not valid to assume that all bindings with non-symbolic +offsets start from the base region! + + +Region Invalidation +------------------- + +Unlike binding invalidation, region invalidation occurs when the entire +contents of a region may have changed---say, because it has been passed to a +function the analyzer can model, like memcpy, or because its address has +escaped, usually as an argument to an opaque function call. In these cases we +need to throw away not just all bindings within the region itself, but within +its entire cluster, since neighboring regions may be accessed via pointer +arithmetic. + +Region invalidation typically does even more than this, however. Because it +usually represents the complete escape of a region from the analyzer's model, +its *contents* must also be transitively invalidated. (For example, if a region +``p`` of type ``int **`` is invalidated, the contents of ``*p`` and ``**p`` may +have changed as well.) The algorithm that traverses this transitive closure of +accessible regions is known as ClusterAnalysis, and is also used for finding +all live bindings in the store (in order to throw away the dead ones). The name +"ClusterAnalysis" predates the cluster-based organization of bindings, but +refers to the same concept: during invalidation and liveness analysis, all +bindings within a cluster must be treated in the same way for a conservative +model of program behavior. + + +Default Bindings +---------------- + +Most bindings in RegionStore are simple scalar values -- integers and pointers. +These are known as "Direct" bindings. However, RegionStore supports a second +type of binding called a "Default" binding. These are used to provide values to +all the elements of an aggregate type (struct or array) without having to +explicitly specify a binding for each individual element. + +When there is no Direct binding for a particular region, the store manager +looks at each super-region in turn to see if there is a Default binding. If so, +this value is used as the value of the original region. The search ends when +the base region is reached, at which point the RegionStore will pick an +appropriate default value for the region (usually a symbolic value, but +sometimes zero, for static data, or "uninitialized", for stack variables). + +.. code-block:: cpp + + int manyInts[10]; + manyInts[1] = 42; // Creates a Direct binding for manyInts[1]. + print(manyInts[1]); // Retrieves the Direct binding for manyInts[1]; + print(manyInts[0]); // There is no Direct binding for manyInts[0]. + // Is there a Default binding for the entire array? + // There is not, but it is a stack variable, so we use + // "uninitialized" as the default value (and emit a + // diagnostic!). + +NOTE: The fact that bindings are stored as a base region plus an offset limits +the Default Binding strategy, because in C aggregates can contain other +aggregates. In the current implementation of RegionStore, there is no way to +distinguish a Default binding for an entire aggregate from a Default binding +for the sub-aggregate at offset 0. + + +Lazy Bindings (LazyCompoundVal) +------------------------------- + +RegionStore implements an optimization for copying aggregates (structs and +arrays) called "lazy bindings", implemented using a special SVal called +LazyCompoundVal. When the store is asked for the "binding" for an entire +aggregate (i.e. for an lvalue-to-rvalue conversion), it returns a +LazyCompoundVal instead. When this value is then stored into a variable, it is +bound as a Default value. This makes copying arrays and structs much cheaper +than if they had required memberwise access. + +Under the hood, a LazyCompoundVal is implemented as a uniqued pair of (region, +store), representing "the value of the region during this 'snapshot' of the +store". This has important implications for any sort of liveness or +reachability analysis, which must take the bindings in the old store into +account. + +Retrieving a value from a lazy binding happens in the same way as any other +Default binding: since there is no direct binding, the store manager falls back +to super-regions to look for an appropriate default binding. LazyCompoundVal +differs from a normal default binding, however, in that it contains several +different values, instead of one value that will appear several times. Because +of this, the store manager has to reconstruct the subregion chain on top of the +LazyCompoundVal region, and look up *that* region in the previous store. + +Here's a concrete example: + +.. code-block:: cpp + + CGPoint p; + p.x = 42; // A Direct binding is made to the FieldRegion 'p.x'. + CGPoint p2 = p; // A LazyCompoundVal is created for 'p', along with a + // snapshot of the current store state. This value is then + // used as a Default binding for the VarRegion 'p2'. + return p2.x; // The binding for FieldRegion 'p2.x' is requested. + // There is no Direct binding, so we look for a Default + // binding to 'p2' and find the LCV. + // Because it's a LCV, we look at our requested region + // and see that it's the '.x' field. We ask for the value + // of 'p.x' within the snapshot, and get back 42. diff --git a/clang/docs/analyzer/developer-docs/nullability.rst b/clang/docs/analyzer/developer-docs/nullability.rst new file mode 100644 index 0000000000000..be6f473dbdf69 --- /dev/null +++ b/clang/docs/analyzer/developer-docs/nullability.rst @@ -0,0 +1,107 @@ +================== +Nullability Checks +================== + +This document is a high level description of the nullablility checks. +These checks intended to use the annotations that is described in this +RFC: http://lists.cs.uiuc.edu/pipermail/cfe-dev/2015-March/041798.html. + +Let's consider the following 2 categories: + +**1) nullable** + +If a pointer ``p`` has a nullable annotation and no explicit null check or assert, we should warn in the following cases: + +* ``p`` gets implicitly converted into nonnull pointer, for example, we are passing it to a function that takes a nonnull parameter. +* ``p`` gets dereferenced + +Taking a branch on nullable pointers are the same like taking branch on null unspecified pointers. + +Explicit cast from nullable to nonnul: + +.. code-block:: cpp + + __nullable id foo; + id bar = foo; + takesNonNull((_nonnull) bar); // should not warn here (backward compatibility hack) + anotherTakesNonNull(bar); // would be great to warn here, but not necessary(*) + +Because bar corresponds to the same symbol all the time it is not easy to implement the checker that way the cast only suppress the first call but not the second. For this reason in the first implementation after a contradictory cast happens, I will treat bar as nullable unspecified, this way all of the warnings will be suppressed. Treating the symbol as nullable unspecified also has an advantage that in case the takesNonNull function body is being inlined, the will be no warning, when the symbol is dereferenced. In case I have time after the initial version I might spend additional time to try to find a more sophisticated solution, in which we would produce the second warning (*). + +**2) nonnull** + +* Dereferencing a nonnull, or sending message to it is ok. +* Converting nonnull to nullable is Ok. +* When there is an explicit cast from nonnull to nullable I will trust the cast (it is probable there for a reason, because this cast does not suppress any warnings or errors). +* But what should we do about null checks?: + +.. code-block:: cpp + + __nonnull id takesNonnull(__nonnull id x) { + if (x == nil) { + // Defensive backward compatible code: + .... + return nil; // Should the analyzer cover this piece of code? Should we require the cast (__nonnull)nil? + } + .... + } + +There are these directions: + +* We can either take the branch; this way the branch is analyzed +* Should we not warn about any nullability issues in that branch? Probably not, it is ok to break the nullability postconditions when the nullability preconditions are violated. +* We can assume that these pointers are not null and we lose coverage with the analyzer. (This can be implemented either in constraint solver or in the checker itself.) + +Other Issues to keep in mind/take care of: + +* Messaging: + + * Sending a message to a nullable pointer + + * Even though the method might return a nonnull pointer, when it was sent to a nullable pointer the return type will be nullable. + * The result is nullable unless the receiver is known to be non null. + + * Sending a message to a unspecified or nonnull pointer + + * If the pointer is not assumed to be nil, we should be optimistic and use the nullability implied by the method. + + * This will not happen automatically, since the AST will have null unspecified in this case. + +Inlining +-------- + +A symbol may need to be treated differently inside an inlined body. For example, consider these conversions from nonnull to nullable in presence of inlining: + +.. code-block:: cpp + + id obj = getNonnull(); + takesNullable(obj); + takesNonnull(obj); + + void takesNullable(nullable id obj) { + obj->ivar // we should assume obj is nullable and warn here + } + +With no special treatment, when the takesNullable is inlined the analyzer will not warn when the obj symbol is dereferenced. One solution for this is to reanalyze takesNullable as a top level function to get possible violations. The alternative method, deducing nullability information from the arguments after inlining is not robust enough (for example there might be more parameters with different nullability, but in the given path the two parameters might end up being the same symbol or there can be nested functions that take different view of the nullability of the same symbol). So the symbol will remain nonnull to avoid false positives but the functions that takes nullable parameters will be analyzed separately as well without inlining. + +Annotations on multi level pointers +----------------------------------- + +Tracking multiple levels of annotations for pointers pointing to pointers would make the checker more complicated, because this way a vector of nullability qualifiers would be needed to be tracked for each symbol. This is not a big caveat, since once the top level pointer is dereferenced, the symvol for the inner pointer will have the nullability information. The lack of multi level annotation tracking only observable, when multiple levels of pointers are passed to a function which has a parameter with multiple levels of annotations. So for now the checker support the top level nullability qualifiers only.: + +.. code-block:: cpp + + int * __nonnull * __nullable p; + int ** q = p; + takesStarNullableStarNullable(q); + +Implementation notes +-------------------- + +What to track? + +* The checker would track memory regions, and to each relevant region a qualifier information would be attached which is either nullable, nonnull or null unspecified (or contradicted to suppress warnings for a specific region). +* On a branch, where a nullable pointer is known to be non null, the checker treat it as a same way as a pointer annotated as nonnull. +* When there is an explicit cast from a null unspecified to either nonnull or nullable I will trust the cast. +* Unannotated pointers are treated the same way as pointers annotated with nullability unspecified qualifier, unless the region is wrapped in ASSUME_NONNULL macros. +* We might want to implement a callback for entry points to top level functions, where the pointer nullability assumptions would be made. diff --git a/clang/docs/analyzer/index.rst b/clang/docs/analyzer/index.rst deleted file mode 100644 index 767567f22fdc8..0000000000000 --- a/clang/docs/analyzer/index.rst +++ /dev/null @@ -1,23 +0,0 @@ -.. Clang Static Analyzer documentation master file, created by - sphinx-quickstart on Wed Jan 2 15:54:28 2013. - You can adapt this file completely to your liking, but it should at least - contain the root `toctree` directive. - -Welcome to Clang Static Analyzer's documentation! -================================================= - -Contents: - -.. toctree:: - :maxdepth: 2 - - DebugChecks - - -Indices and tables -================== - -* :ref:`genindex` -* :ref:`modindex` -* :ref:`search` - diff --git a/clang/docs/analyzer/nullability.rst b/clang/docs/analyzer/nullability.rst deleted file mode 100644 index 93909d0f25dee..0000000000000 --- a/clang/docs/analyzer/nullability.rst +++ /dev/null @@ -1,92 +0,0 @@ -============ -Nullability Checks -============ - -This document is a high level description of the nullablility checks. -These checks intended to use the annotations that is described in this -RFC: http://lists.cs.uiuc.edu/pipermail/cfe-dev/2015-March/041798.html. - -Let's consider the following 2 categories: - -1) nullable -============ - -If a pointer 'p' has a nullable annotation and no explicit null check or assert, we should warn in the following cases: -- 'p' gets implicitly converted into nonnull pointer, for example, we are passing it to a function that takes a nonnull parameter. -- 'p' gets dereferenced - -Taking a branch on nullable pointers are the same like taking branch on null unspecified pointers. - -Explicit cast from nullable to nonnul:: - - __nullable id foo; - id bar = foo; - takesNonNull((_nonnull) bar); <— should not warn here (backward compatibility hack) - anotherTakesNonNull(bar); <— would be great to warn here, but not necessary(*) - -Because bar corresponds to the same symbol all the time it is not easy to implement the checker that way the cast only suppress the first call but not the second. For this reason in the first implementation after a contradictory cast happens, I will treat bar as nullable unspecified, this way all of the warnings will be suppressed. Treating the symbol as nullable unspecified also has an advantage that in case the takesNonNull function body is being inlined, the will be no warning, when the symbol is dereferenced. In case I have time after the initial version I might spend additional time to try to find a more sophisticated solution, in which we would produce the second warning (*). - -2) nonnull -============ - -- Dereferencing a nonnull, or sending message to it is ok. -- Converting nonnull to nullable is Ok. -- When there is an explicit cast from nonnull to nullable I will trust the cast (it is probable there for a reason, because this cast does not suppress any warnings or errors). -- But what should we do about null checks?:: - - __nonnull id takesNonnull(__nonnull id x) { - if (x == nil) { - // Defensive backward compatible code: - .... - return nil; <- Should the analyzer cover this piece of code? Should we require the cast (__nonnull)nil? - } - .... - } - -There are these directions: -- We can either take the branch; this way the branch is analyzed - - Should we not warn about any nullability issues in that branch? Probably not, it is ok to break the nullability postconditions when the nullability preconditions are violated. -- We can assume that these pointers are not null and we lose coverage with the analyzer. (This can be implemented either in constraint solver or in the checker itself.) - -Other Issues to keep in mind/take care of: -Messaging: -- Sending a message to a nullable pointer - - Even though the method might return a nonnull pointer, when it was sent to a nullable pointer the return type will be nullable. - - The result is nullable unless the receiver is known to be non null. -- Sending a message to a unspecified or nonnull pointer - - If the pointer is not assumed to be nil, we should be optimistic and use the nullability implied by the method. - - This will not happen automatically, since the AST will have null unspecified in this case. - -Inlining -============ - -A symbol may need to be treated differently inside an inlined body. For example, consider these conversions from nonnull to nullable in presence of inlining:: - - id obj = getNonnull(); - takesNullable(obj); - takesNonnull(obj); - - void takesNullable(nullable id obj) { - obj->ivar // we should assume obj is nullable and warn here - } - -With no special treatment, when the takesNullable is inlined the analyzer will not warn when the obj symbol is dereferenced. One solution for this is to reanalyze takesNullable as a top level function to get possible violations. The alternative method, deducing nullability information from the arguments after inlining is not robust enough (for example there might be more parameters with different nullability, but in the given path the two parameters might end up being the same symbol or there can be nested functions that take different view of the nullability of the same symbol). So the symbol will remain nonnull to avoid false positives but the functions that takes nullable parameters will be analyzed separately as well without inlining. - -Annotations on multi level pointers -============ - -Tracking multiple levels of annotations for pointers pointing to pointers would make the checker more complicated, because this way a vector of nullability qualifiers would be needed to be tracked for each symbol. This is not a big caveat, since once the top level pointer is dereferenced, the symvol for the inner pointer will have the nullability information. The lack of multi level annotation tracking only observable, when multiple levels of pointers are passed to a function which has a parameter with multiple levels of annotations. So for now the checker support the top level nullability qualifiers only.:: - - int * __nonnull * __nullable p; - int ** q = p; - takesStarNullableStarNullable(q); - -Implementation notes -============ - -What to track? -- The checker would track memory regions, and to each relevant region a qualifier information would be attached which is either nullable, nonnull or null unspecified (or contradicted to suppress warnings for a specific region). -- On a branch, where a nullable pointer is known to be non null, the checker treat it as a same way as a pointer annotated as nonnull. -- When there is an explicit cast from a null unspecified to either nonnull or nullable I will trust the cast. -- Unannotated pointers are treated the same way as pointers annotated with nullability unspecified qualifier, unless the region is wrapped in ASSUME_NONNULL macros. -- We might want to implement a callback for entry points to top level functions, where the pointer nullability assumptions would be made. diff --git a/clang/docs/conf.py b/clang/docs/conf.py index f603686e5f41d..dab70266d9d95 100644 --- a/clang/docs/conf.py +++ b/clang/docs/conf.py @@ -66,7 +66,7 @@ # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. -exclude_patterns = ['_build', 'analyzer'] +exclude_patterns = ['_build'] # The reST default role (used for this markup: `text`) to use for all documents. #default_role = None diff --git a/clang/docs/index.rst b/clang/docs/index.rst index 3eb1d160c756a..73468705bcf7b 100644 --- a/clang/docs/index.rst +++ b/clang/docs/index.rst @@ -23,6 +23,7 @@ Using Clang as a Compiler AttributeReference DiagnosticsReference CrossCompilation + ClangStaticAnalyzer ThreadSafetyAnalysis AddressSanitizer ThreadSanitizer diff --git a/clang/examples/clang-interpreter/CMakeLists.txt b/clang/examples/clang-interpreter/CMakeLists.txt index b69a82e0541bc..ae2c0876c85b2 100644 --- a/clang/examples/clang-interpreter/CMakeLists.txt +++ b/clang/examples/clang-interpreter/CMakeLists.txt @@ -16,7 +16,7 @@ add_clang_executable(clang-interpreter ) add_dependencies(clang-interpreter - clang-headers + clang-resource-headers ) target_link_libraries(clang-interpreter diff --git a/clang/include/clang-c/Index.h b/clang/include/clang-c/Index.h index 3dd8432609d23..a5ef2d2058780 100644 --- a/clang/include/clang-c/Index.h +++ b/clang/include/clang-c/Index.h @@ -32,7 +32,7 @@ * compatible, thus CINDEX_VERSION_MAJOR is expected to remain stable. */ #define CINDEX_VERSION_MAJOR 0 -#define CINDEX_VERSION_MINOR 50 +#define CINDEX_VERSION_MINOR 53 #define CINDEX_VERSION_ENCODE(major, minor) ( \ ((major) * 10000) \ @@ -2586,7 +2586,10 @@ enum CXCursorKind { CXCursor_ObjCRuntimeVisible = 435, CXCursor_ObjCBoxable = 436, CXCursor_FlagEnum = 437, - CXCursor_LastAttr = CXCursor_FlagEnum, + CXCursor_ConvergentAttr = 438, + CXCursor_WarnUnusedAttr = 439, + CXCursor_WarnUnusedResultAttr = 440, + CXCursor_LastAttr = CXCursor_WarnUnusedResultAttr, /* Preprocessing */ CXCursor_PreprocessingDirective = 500, @@ -3838,7 +3841,11 @@ enum CXTypeLayoutError { /** * The Field name is not valid for this record. */ - CXTypeLayoutError_InvalidFieldName = -5 + CXTypeLayoutError_InvalidFieldName = -5, + /** + * The type is undeduced. + */ + CXTypeLayoutError_Undeduced = -6 }; /** diff --git a/clang/include/clang/AST/ASTContext.h b/clang/include/clang/AST/ASTContext.h index fe52f818ea402..5832c290f6b87 100644 --- a/clang/include/clang/AST/ASTContext.h +++ b/clang/include/clang/AST/ASTContext.h @@ -2237,7 +2237,8 @@ class ASTContext : public RefCountedBase { VTableContextBase *getVTableContext(); - MangleContext *createMangleContext(); + /// If \p T is null pointer, assume the target in ASTContext. + MangleContext *createMangleContext(const TargetInfo *T = nullptr); void DeepCollectObjCIvars(const ObjCInterfaceDecl *OI, bool leafClass, SmallVectorImpl &Ivars) const; @@ -2500,6 +2501,11 @@ class ASTContext : public RefCountedBase { /// \p LHS < \p RHS, return -1. int getFloatingTypeOrder(QualType LHS, QualType RHS) const; + /// Compare the rank of two floating point types as above, but compare equal + /// if both types have the same floating-point semantics on the target (i.e. + /// long double and double on AArch64 will return 0). + int getFloatingTypeSemanticOrder(QualType LHS, QualType RHS) const; + /// Return a real floating point or a complex type (based on /// \p typeDomain/\p typeSize). /// @@ -2803,46 +2809,46 @@ class ASTContext : public RefCountedBase { //===--------------------------------------------------------------------===// /// The number of implicitly-declared default constructors. - static unsigned NumImplicitDefaultConstructors; + unsigned NumImplicitDefaultConstructors = 0; /// The number of implicitly-declared default constructors for /// which declarations were built. - static unsigned NumImplicitDefaultConstructorsDeclared; + unsigned NumImplicitDefaultConstructorsDeclared = 0; /// The number of implicitly-declared copy constructors. - static unsigned NumImplicitCopyConstructors; + unsigned NumImplicitCopyConstructors = 0; /// The number of implicitly-declared copy constructors for /// which declarations were built. - static unsigned NumImplicitCopyConstructorsDeclared; + unsigned NumImplicitCopyConstructorsDeclared = 0; /// The number of implicitly-declared move constructors. - static unsigned NumImplicitMoveConstructors; + unsigned NumImplicitMoveConstructors = 0; /// The number of implicitly-declared move constructors for /// which declarations were built. - static unsigned NumImplicitMoveConstructorsDeclared; + unsigned NumImplicitMoveConstructorsDeclared = 0; /// The number of implicitly-declared copy assignment operators. - static unsigned NumImplicitCopyAssignmentOperators; + unsigned NumImplicitCopyAssignmentOperators = 0; /// The number of implicitly-declared copy assignment operators for /// which declarations were built. - static unsigned NumImplicitCopyAssignmentOperatorsDeclared; + unsigned NumImplicitCopyAssignmentOperatorsDeclared = 0; /// The number of implicitly-declared move assignment operators. - static unsigned NumImplicitMoveAssignmentOperators; + unsigned NumImplicitMoveAssignmentOperators = 0; /// The number of implicitly-declared move assignment operators for /// which declarations were built. - static unsigned NumImplicitMoveAssignmentOperatorsDeclared; + unsigned NumImplicitMoveAssignmentOperatorsDeclared = 0; /// The number of implicitly-declared destructors. - static unsigned NumImplicitDestructors; + unsigned NumImplicitDestructors = 0; /// The number of implicitly-declared destructors for which /// declarations were built. - static unsigned NumImplicitDestructorsDeclared; + unsigned NumImplicitDestructorsDeclared = 0; public: /// Initialize built-in types. diff --git a/clang/include/clang/AST/ASTImporter.h b/clang/include/clang/AST/ASTImporter.h index dd872b1123bfe..ee8194ab3c78c 100644 --- a/clang/include/clang/AST/ASTImporter.h +++ b/clang/include/clang/AST/ASTImporter.h @@ -32,6 +32,7 @@ namespace clang { class ASTContext; +class Attr; class ASTImporterLookupTable; class CXXBaseSpecifier; class CXXCtorInitializer; @@ -42,8 +43,8 @@ class FileManager; class NamedDecl; class Stmt; class TagDecl; +class TranslationUnitDecl; class TypeSourceInfo; -class Attr; class ImportError : public llvm::ErrorInfo { public: @@ -115,6 +116,10 @@ class Attr; /// context to the corresponding declarations in the "to" context. llvm::DenseMap ImportedDecls; + /// Mapping from the already-imported declarations in the "to" + /// context to the corresponding declarations in the "from" context. + llvm::DenseMap ImportedFromDecls; + /// Mapping from the already-imported statements in the "from" /// context to the corresponding statements in the "to" context. llvm::DenseMap ImportedStmts; @@ -226,9 +231,13 @@ class Attr; /// Return the copy of the given declaration in the "to" context if /// it has already been imported from the "from" context. Otherwise return - /// NULL. + /// nullptr. Decl *GetAlreadyImportedOrNull(const Decl *FromD) const; + /// Return the translation unit from where the declaration was + /// imported. If it does not exist nullptr is returned. + TranslationUnitDecl *GetFromTU(Decl *ToD); + /// Import the given declaration context from the "from" /// AST context into the "to" AST context. /// @@ -328,9 +337,9 @@ class Attr; /// /// \returns The equivalent file ID in the source manager of the "to" /// context, or the import error. - llvm::Expected Import_New(FileID); + llvm::Expected Import_New(FileID, bool IsBuiltin = false); // FIXME: Remove this version. - FileID Import(FileID); + FileID Import(FileID, bool IsBuiltin = false); /// Import the given C++ constructor initializer from the "from" /// context into the "to" context. diff --git a/clang/include/clang/AST/Decl.h b/clang/include/clang/AST/Decl.h index 933166691a014..2499efb849935 100644 --- a/clang/include/clang/AST/Decl.h +++ b/clang/include/clang/AST/Decl.h @@ -3851,7 +3851,7 @@ class FileScopeAsmDecl : public Decl { static bool classofKind(Kind K) { return K == FileScopeAsm; } }; -/// Pepresents a block literal declaration, which is like an +/// Represents a block literal declaration, which is like an /// unnamed FunctionDecl. For example: /// ^{ statement-body } or ^(int arg1, float arg2){ statement-body } class BlockDecl : public Decl, public DeclContext { @@ -4008,6 +4008,13 @@ class BlockDecl : public Decl, public DeclContext { bool doesNotEscape() const { return BlockDeclBits.DoesNotEscape; } void setDoesNotEscape(bool B = true) { BlockDeclBits.DoesNotEscape = B; } + bool canAvoidCopyToHeap() const { + return BlockDeclBits.CanAvoidCopyToHeap; + } + void setCanAvoidCopyToHeap(bool B = true) { + BlockDeclBits.CanAvoidCopyToHeap = B; + } + bool capturesVariable(const VarDecl *var) const; void setCaptures(ASTContext &Context, ArrayRef Captures, diff --git a/clang/include/clang/AST/DeclBase.h b/clang/include/clang/AST/DeclBase.h index 9117f53487d65..4b63e540d5d48 100644 --- a/clang/include/clang/AST/DeclBase.h +++ b/clang/include/clang/AST/DeclBase.h @@ -1665,6 +1665,11 @@ class DeclContext { /// A bit that indicates this block is passed directly to a function as a /// non-escaping parameter. uint64_t DoesNotEscape : 1; + + /// A bit that indicates whether it's possible to avoid coying this block to + /// the heap when it initializes or is assigned to a local variable with + /// automatic storage. + uint64_t CanAvoidCopyToHeap : 1; }; /// Number of non-inherited bits in BlockDeclBitfields. diff --git a/clang/include/clang/AST/DeclOpenMP.h b/clang/include/clang/AST/DeclOpenMP.h index 12332a2b9b4e3..6bdb4ddbacbca 100644 --- a/clang/include/clang/AST/DeclOpenMP.h +++ b/clang/include/clang/AST/DeclOpenMP.h @@ -217,7 +217,7 @@ class OMPDeclareReductionDecl final : public ValueDecl, public DeclContext { class OMPDeclareMapperDecl final : public ValueDecl, public DeclContext { friend class ASTDeclReader; - /// Clauses assoicated with this mapper declaration + /// Clauses associated with this mapper declaration MutableArrayRef Clauses; /// Mapper variable, which is 'v' in the example above diff --git a/clang/include/clang/AST/Expr.h b/clang/include/clang/AST/Expr.h index daf33de16a161..e0b20f74dd8ba 100644 --- a/clang/include/clang/AST/Expr.h +++ b/clang/include/clang/AST/Expr.h @@ -105,13 +105,13 @@ struct SubobjectAdjustment { /// This represents one expression. Note that Expr's are subclasses of Stmt. /// This allows an expression to be transparently used any place a Stmt is /// required. -class Expr : public Stmt { +class Expr : public ValueStmt { QualType TR; protected: Expr(StmtClass SC, QualType T, ExprValueKind VK, ExprObjectKind OK, bool TD, bool VD, bool ID, bool ContainsUnexpandedParameterPack) - : Stmt(SC) + : ValueStmt(SC) { ExprBits.TypeDependent = TD; ExprBits.ValueDependent = VD; @@ -124,7 +124,7 @@ class Expr : public Stmt { } /// Construct an empty expression. - explicit Expr(StmtClass SC, EmptyShell) : Stmt(SC) { } + explicit Expr(StmtClass SC, EmptyShell) : ValueStmt(SC) { } public: QualType getType() const { return TR; } @@ -794,7 +794,7 @@ class Expr : public Stmt { /// IgnoreParens() + IgnoreImpCasts() until reaching a fixed point. However /// this is currently not the case. Instead IgnoreParenImpCasts() skips: /// * What IgnoreParens() skips - /// * ImplicitCastExpr + /// * What IgnoreImpCasts() skips /// * MaterializeTemporaryExpr /// * SubstNonTypeTemplateParmExpr Expr *IgnoreParenImpCasts() LLVM_READONLY; @@ -2610,6 +2610,11 @@ class CallExpr : public Expr { NumArgs = NewNumArgs; } + /// Bluntly set a new number of arguments without doing any checks whatsoever. + /// Only used during construction of a CallExpr in a few places in Sema. + /// FIXME: Find a way to remove it. + void setNumArgsUnsafe(unsigned NewNumArgs) { NumArgs = NewNumArgs; } + typedef ExprIterator arg_iterator; typedef ConstExprIterator const_arg_iterator; typedef llvm::iterator_range arg_range; diff --git a/clang/include/clang/AST/OpenMPClause.h b/clang/include/clang/AST/OpenMPClause.h index becb2a17066b2..1aa1c82b1a999 100644 --- a/clang/include/clang/AST/OpenMPClause.h +++ b/clang/include/clang/AST/OpenMPClause.h @@ -156,6 +156,20 @@ class OMPClauseWithPostUpdate : public OMPClauseWithPreInit { static const OMPClauseWithPostUpdate *get(const OMPClause *C); }; +/// This structure contains most locations needed for by an OMPVarListClause. +struct OMPVarListLocTy { + /// Starting location of the clause (the clause keyword). + SourceLocation StartLoc; + /// Location of '('. + SourceLocation LParenLoc; + /// Ending location of the clause. + SourceLocation EndLoc; + OMPVarListLocTy() = default; + OMPVarListLocTy(SourceLocation StartLoc, SourceLocation LParenLoc, + SourceLocation EndLoc) + : StartLoc(StartLoc), LParenLoc(LParenLoc), EndLoc(EndLoc) {} +}; + /// This represents clauses with the list of variables like 'private', /// 'firstprivate', 'copyin', 'shared', or 'reduction' clauses in the /// '#pragma omp ...' directives. @@ -3595,6 +3609,24 @@ class OMPClauseMappableExprCommon { getUniqueDeclarationsTotalNumber(ArrayRef Declarations); }; +/// This structure contains all sizes needed for by an +/// OMPMappableExprListClause. +struct OMPMappableExprListSizeTy { + /// Number of expressions listed. + unsigned NumVars; + /// Number of unique base declarations. + unsigned NumUniqueDeclarations; + /// Number of component lists. + unsigned NumComponentLists; + /// Total number of expression components. + unsigned NumComponents; + OMPMappableExprListSizeTy() = default; + OMPMappableExprListSizeTy(unsigned NumVars, unsigned NumUniqueDeclarations, + unsigned NumComponentLists, unsigned NumComponents) + : NumVars(NumVars), NumUniqueDeclarations(NumUniqueDeclarations), + NumComponentLists(NumComponentLists), NumComponents(NumComponents) {} +}; + /// This represents clauses with a list of expressions that are mappable. /// Examples of these clauses are 'map' in /// '#pragma omp target [enter|exit] [data]...' directives, and 'to' and 'from @@ -3613,28 +3645,44 @@ class OMPMappableExprListClause : public OMPVarListClause, /// Total number of components in this clause. unsigned NumComponents; + /// C++ nested name specifier for the associated user-defined mapper. + NestedNameSpecifierLoc MapperQualifierLoc; + + /// The associated user-defined mapper identifier information. + DeclarationNameInfo MapperIdInfo; + protected: /// Build a clause for \a NumUniqueDeclarations declarations, \a /// NumComponentLists total component lists, and \a NumComponents total /// components. /// /// \param K Kind of the clause. - /// \param StartLoc Starting location of the clause (the clause keyword). - /// \param LParenLoc Location of '('. - /// \param EndLoc Ending location of the clause. - /// \param NumVars Number of expressions listed in the clause. - /// \param NumUniqueDeclarations Number of unique base declarations in this - /// clause. - /// \param NumComponentLists Number of component lists in this clause - one - /// list for each expression in the clause. - /// \param NumComponents Total number of expression components in the clause. - OMPMappableExprListClause(OpenMPClauseKind K, SourceLocation StartLoc, - SourceLocation LParenLoc, SourceLocation EndLoc, - unsigned NumVars, unsigned NumUniqueDeclarations, - unsigned NumComponentLists, unsigned NumComponents) - : OMPVarListClause(K, StartLoc, LParenLoc, EndLoc, NumVars), - NumUniqueDeclarations(NumUniqueDeclarations), - NumComponentLists(NumComponentLists), NumComponents(NumComponents) {} + /// \param Locs Locations needed to build a mappable clause. It includes 1) + /// StartLoc: starting location of the clause (the clause keyword); 2) + /// LParenLoc: location of '('; 3) EndLoc: ending location of the clause. + /// \param Sizes All required sizes to build a mappable clause. It includes 1) + /// NumVars: number of expressions listed in this clause; 2) + /// NumUniqueDeclarations: number of unique base declarations in this clause; + /// 3) NumComponentLists: number of component lists in this clause; and 4) + /// NumComponents: total number of expression components in the clause. + /// \param MapperQualifierLocPtr C++ nested name specifier for the associated + /// user-defined mapper. + /// \param MapperIdInfoPtr The identifier of associated user-defined mapper. + OMPMappableExprListClause( + OpenMPClauseKind K, const OMPVarListLocTy &Locs, + const OMPMappableExprListSizeTy &Sizes, + NestedNameSpecifierLoc *MapperQualifierLocPtr = nullptr, + DeclarationNameInfo *MapperIdInfoPtr = nullptr) + : OMPVarListClause(K, Locs.StartLoc, Locs.LParenLoc, Locs.EndLoc, + Sizes.NumVars), + NumUniqueDeclarations(Sizes.NumUniqueDeclarations), + NumComponentLists(Sizes.NumComponentLists), + NumComponents(Sizes.NumComponents) { + if (MapperQualifierLocPtr) + MapperQualifierLoc = *MapperQualifierLocPtr; + if (MapperIdInfoPtr) + MapperIdInfo = *MapperIdInfoPtr; + } /// Get the unique declarations that are in the trailing objects of the /// class. @@ -3815,6 +3863,42 @@ class OMPMappableExprListClause : public OMPVarListClause, } } + /// Set the nested name specifier of associated user-defined mapper. + void setMapperQualifierLoc(NestedNameSpecifierLoc NNSL) { + MapperQualifierLoc = NNSL; + } + + /// Set the name of associated user-defined mapper. + void setMapperIdInfo(DeclarationNameInfo MapperId) { + MapperIdInfo = MapperId; + } + + /// Get the user-defined mapper references that are in the trailing objects of + /// the class. + MutableArrayRef getUDMapperRefs() { + return llvm::makeMutableArrayRef( + static_cast(this)->template getTrailingObjects() + + OMPVarListClause::varlist_size(), + OMPVarListClause::varlist_size()); + } + + /// Get the user-defined mappers references that are in the trailing objects + /// of the class. + ArrayRef getUDMapperRefs() const { + return llvm::makeArrayRef( + static_cast(this)->template getTrailingObjects() + + OMPVarListClause::varlist_size(), + OMPVarListClause::varlist_size()); + } + + /// Set the user-defined mappers that are in the trailing objects of the + /// class. + void setUDMapperRefs(ArrayRef DMDs) { + assert(DMDs.size() == OMPVarListClause::varlist_size() && + "Unexpected number of user-defined mappers."); + std::copy(DMDs.begin(), DMDs.end(), getUDMapperRefs().begin()); + } + public: /// Return the number of unique base declarations in this clause. unsigned getUniqueDeclarationsNum() const { return NumUniqueDeclarations; } @@ -3826,6 +3910,14 @@ class OMPMappableExprListClause : public OMPVarListClause, /// clause. unsigned getTotalComponentsNum() const { return NumComponents; } + /// Gets the nested name specifier for associated user-defined mapper. + NestedNameSpecifierLoc getMapperQualifierLoc() const { + return MapperQualifierLoc; + } + + /// Gets the name info for associated user-defined mapper. + const DeclarationNameInfo &getMapperIdInfo() const { return MapperIdInfo; } + /// Iterator that browse the components by lists. It also allows /// browsing components of a single declaration. class const_component_lists_iterator @@ -4029,6 +4121,27 @@ class OMPMappableExprListClause : public OMPVarListClause, auto A = getComponentsRef(); return const_all_components_range(A.begin(), A.end()); } + + using mapperlist_iterator = MutableArrayRef::iterator; + using mapperlist_const_iterator = ArrayRef::iterator; + using mapperlist_range = llvm::iterator_range; + using mapperlist_const_range = + llvm::iterator_range; + + mapperlist_iterator mapperlist_begin() { return getUDMapperRefs().begin(); } + mapperlist_iterator mapperlist_end() { return getUDMapperRefs().end(); } + mapperlist_const_iterator mapperlist_begin() const { + return getUDMapperRefs().begin(); + } + mapperlist_const_iterator mapperlist_end() const { + return getUDMapperRefs().end(); + } + mapperlist_range mapperlists() { + return mapperlist_range(mapperlist_begin(), mapperlist_end()); + } + mapperlist_const_range mapperlists() const { + return mapperlist_const_range(mapperlist_begin(), mapperlist_end()); + } }; /// This represents clause 'map' in the '#pragma omp ...' @@ -4051,7 +4164,9 @@ class OMPMapClause final : public OMPMappableExprListClause, /// Define the sizes of each trailing object array except the last one. This /// is required for TrailingObjects to work properly. size_t numTrailingObjects(OverloadToken) const { - return varlist_size(); + // There are varlist_size() of expressions, and varlist_size() of + // user-defined mappers. + return 2 * varlist_size(); } size_t numTrailingObjects(OverloadToken) const { return getUniqueDeclarationsNum(); @@ -4068,9 +4183,9 @@ class OMPMapClause final : public OMPMappableExprListClause, private: /// Map-type-modifiers for the 'map' clause. OpenMPMapModifierKind MapTypeModifiers[NumberOfModifiers] = { - OMPC_MAP_MODIFIER_unknown, OMPC_MAP_MODIFIER_unknown - }; - + OMPC_MAP_MODIFIER_unknown, OMPC_MAP_MODIFIER_unknown, + OMPC_MAP_MODIFIER_unknown}; + /// Location of map-type-modifiers for the 'map' clause. SourceLocation MapTypeModifiersLoc[NumberOfModifiers]; @@ -4092,50 +4207,49 @@ class OMPMapClause final : public OMPMappableExprListClause, /// /// \param MapModifiers Map-type-modifiers. /// \param MapModifiersLoc Locations of map-type-modifiers. + /// \param MapperQualifierLoc C++ nested name specifier for the associated + /// user-defined mapper. + /// \param MapperIdInfo The identifier of associated user-defined mapper. /// \param MapType Map type. /// \param MapTypeIsImplicit Map type is inferred implicitly. /// \param MapLoc Location of the map type. - /// \param StartLoc Starting location of the clause. - /// \param EndLoc Ending location of the clause. - /// \param NumVars Number of expressions listed in this clause. - /// \param NumUniqueDeclarations Number of unique base declarations in this - /// clause. - /// \param NumComponentLists Number of component lists in this clause. - /// \param NumComponents Total number of expression components in the clause. + /// \param Locs Locations needed to build a mappable clause. It includes 1) + /// StartLoc: starting location of the clause (the clause keyword); 2) + /// LParenLoc: location of '('; 3) EndLoc: ending location of the clause. + /// \param Sizes All required sizes to build a mappable clause. It includes 1) + /// NumVars: number of expressions listed in this clause; 2) + /// NumUniqueDeclarations: number of unique base declarations in this clause; + /// 3) NumComponentLists: number of component lists in this clause; and 4) + /// NumComponents: total number of expression components in the clause. explicit OMPMapClause(ArrayRef MapModifiers, ArrayRef MapModifiersLoc, + NestedNameSpecifierLoc MapperQualifierLoc, + DeclarationNameInfo MapperIdInfo, OpenMPMapClauseKind MapType, bool MapTypeIsImplicit, - SourceLocation MapLoc, SourceLocation StartLoc, - SourceLocation LParenLoc, SourceLocation EndLoc, - unsigned NumVars, unsigned NumUniqueDeclarations, - unsigned NumComponentLists, unsigned NumComponents) - : OMPMappableExprListClause(OMPC_map, StartLoc, LParenLoc, EndLoc, - NumVars, NumUniqueDeclarations, - NumComponentLists, NumComponents), - MapType(MapType), MapTypeIsImplicit(MapTypeIsImplicit), - MapLoc(MapLoc) { - assert(llvm::array_lengthof(MapTypeModifiers) == MapModifiers.size() - && "Unexpected number of map type modifiers."); - llvm::copy(MapModifiers, std::begin(MapTypeModifiers)); - - assert(llvm::array_lengthof(MapTypeModifiersLoc) == - MapModifiersLoc.size() && - "Unexpected number of map type modifier locations."); - llvm::copy(MapModifiersLoc, std::begin(MapTypeModifiersLoc)); + SourceLocation MapLoc, const OMPVarListLocTy &Locs, + const OMPMappableExprListSizeTy &Sizes) + : OMPMappableExprListClause(OMPC_map, Locs, Sizes, &MapperQualifierLoc, + &MapperIdInfo), + MapType(MapType), MapTypeIsImplicit(MapTypeIsImplicit), MapLoc(MapLoc) { + assert(llvm::array_lengthof(MapTypeModifiers) == MapModifiers.size() && + "Unexpected number of map type modifiers."); + llvm::copy(MapModifiers, std::begin(MapTypeModifiers)); + + assert(llvm::array_lengthof(MapTypeModifiersLoc) == + MapModifiersLoc.size() && + "Unexpected number of map type modifier locations."); + llvm::copy(MapModifiersLoc, std::begin(MapTypeModifiersLoc)); } /// Build an empty clause. /// - /// \param NumVars Number of expressions listed in this clause. - /// \param NumUniqueDeclarations Number of unique base declarations in this - /// clause. - /// \param NumComponentLists Number of component lists in this clause. - /// \param NumComponents Total number of expression components in the clause. - explicit OMPMapClause(unsigned NumVars, unsigned NumUniqueDeclarations, - unsigned NumComponentLists, unsigned NumComponents) - : OMPMappableExprListClause( - OMPC_map, SourceLocation(), SourceLocation(), SourceLocation(), - NumVars, NumUniqueDeclarations, NumComponentLists, NumComponents) {} + /// \param Sizes All required sizes to build a mappable clause. It includes 1) + /// NumVars: number of expressions listed in this clause; 2) + /// NumUniqueDeclarations: number of unique base declarations in this clause; + /// 3) NumComponentLists: number of component lists in this clause; and 4) + /// NumComponents: total number of expression components in the clause. + explicit OMPMapClause(const OMPMappableExprListSizeTy &Sizes) + : OMPMappableExprListClause(OMPC_map, OMPVarListLocTy(), Sizes) {} /// Set map-type-modifier for the clause. /// @@ -4174,41 +4288,44 @@ class OMPMapClause final : public OMPMappableExprListClause, /// Creates clause with a list of variables \a VL. /// /// \param C AST context. - /// \param StartLoc Starting location of the clause. - /// \param EndLoc Ending location of the clause. + /// \param Locs Locations needed to build a mappable clause. It includes 1) + /// StartLoc: starting location of the clause (the clause keyword); 2) + /// LParenLoc: location of '('; 3) EndLoc: ending location of the clause. /// \param Vars The original expression used in the clause. /// \param Declarations Declarations used in the clause. /// \param ComponentLists Component lists used in the clause. + /// \param UDMapperRefs References to user-defined mappers associated with + /// expressions used in the clause. /// \param MapModifiers Map-type-modifiers. /// \param MapModifiersLoc Location of map-type-modifiers. + /// \param UDMQualifierLoc C++ nested name specifier for the associated + /// user-defined mapper. + /// \param MapperId The identifier of associated user-defined mapper. /// \param Type Map type. /// \param TypeIsImplicit Map type is inferred implicitly. /// \param TypeLoc Location of the map type. - static OMPMapClause *Create(const ASTContext &C, SourceLocation StartLoc, - SourceLocation LParenLoc, SourceLocation EndLoc, - ArrayRef Vars, - ArrayRef Declarations, - MappableExprComponentListsRef ComponentLists, - ArrayRef MapModifiers, - ArrayRef MapModifiersLoc, - OpenMPMapClauseKind Type, bool TypeIsImplicit, - SourceLocation TypeLoc); + static OMPMapClause * + Create(const ASTContext &C, const OMPVarListLocTy &Locs, + ArrayRef Vars, ArrayRef Declarations, + MappableExprComponentListsRef ComponentLists, + ArrayRef UDMapperRefs, + ArrayRef MapModifiers, + ArrayRef MapModifiersLoc, + NestedNameSpecifierLoc UDMQualifierLoc, DeclarationNameInfo MapperId, + OpenMPMapClauseKind Type, bool TypeIsImplicit, SourceLocation TypeLoc); /// Creates an empty clause with the place for \a NumVars original /// expressions, \a NumUniqueDeclarations declarations, \NumComponentLists /// lists, and \a NumComponents expression components. /// /// \param C AST context. - /// \param NumVars Number of expressions listed in the clause. - /// \param NumUniqueDeclarations Number of unique base declarations in this - /// clause. - /// \param NumComponentLists Number of unique base declarations in this - /// clause. - /// \param NumComponents Total number of expression components in the clause. - static OMPMapClause *CreateEmpty(const ASTContext &C, unsigned NumVars, - unsigned NumUniqueDeclarations, - unsigned NumComponentLists, - unsigned NumComponents); + /// \param Sizes All required sizes to build a mappable clause. It includes 1) + /// NumVars: number of expressions listed in this clause; 2) + /// NumUniqueDeclarations: number of unique base declarations in this clause; + /// 3) NumComponentLists: number of component lists in this clause; and 4) + /// NumComponents: total number of expression components in the clause. + static OMPMapClause *CreateEmpty(const ASTContext &C, + const OMPMappableExprListSizeTy &Sizes); /// Fetches mapping kind for the clause. OpenMPMapClauseKind getMapType() const LLVM_READONLY { return MapType; } @@ -4232,7 +4349,7 @@ class OMPMapClause final : public OMPMappableExprListClause, /// Fetches the map-type-modifier location at 'Cnt' index of array of /// modifiers' locations. /// - /// \param Cnt index for map-type-modifier location. + /// \param Cnt index for map-type-modifier location. SourceLocation getMapTypeModifierLoc(unsigned Cnt) const LLVM_READONLY { assert(Cnt < NumberOfModifiers && "Requested modifier location exceeds total number of modifiers."); @@ -4243,7 +4360,7 @@ class OMPMapClause final : public OMPMappableExprListClause, ArrayRef getMapTypeModifiers() const LLVM_READONLY { return llvm::makeArrayRef(MapTypeModifiers); } - + /// Fetches ArrayRef of location of map-type-modifiers. ArrayRef getMapTypeModifiersLoc() const LLVM_READONLY { return llvm::makeArrayRef(MapTypeModifiersLoc); @@ -4859,38 +4976,40 @@ class OMPToClause final : public OMPMappableExprListClause, /// Build clause with number of variables \a NumVars. /// - /// \param StartLoc Starting location of the clause. - /// \param EndLoc Ending location of the clause. - /// \param NumVars Number of expressions listed in this clause. - /// \param NumUniqueDeclarations Number of unique base declarations in this - /// clause. - /// \param NumComponentLists Number of component lists in this clause. - /// \param NumComponents Total number of expression components in the clause. - explicit OMPToClause(SourceLocation StartLoc, SourceLocation LParenLoc, - SourceLocation EndLoc, unsigned NumVars, - unsigned NumUniqueDeclarations, - unsigned NumComponentLists, unsigned NumComponents) - : OMPMappableExprListClause(OMPC_to, StartLoc, LParenLoc, EndLoc, NumVars, - NumUniqueDeclarations, NumComponentLists, - NumComponents) {} + /// \param MapperQualifierLoc C++ nested name specifier for the associated + /// user-defined mapper. + /// \param MapperIdInfo The identifier of associated user-defined mapper. + /// \param Locs Locations needed to build a mappable clause. It includes 1) + /// StartLoc: starting location of the clause (the clause keyword); 2) + /// LParenLoc: location of '('; 3) EndLoc: ending location of the clause. + /// \param Sizes All required sizes to build a mappable clause. It includes 1) + /// NumVars: number of expressions listed in this clause; 2) + /// NumUniqueDeclarations: number of unique base declarations in this clause; + /// 3) NumComponentLists: number of component lists in this clause; and 4) + /// NumComponents: total number of expression components in the clause. + explicit OMPToClause(NestedNameSpecifierLoc MapperQualifierLoc, + DeclarationNameInfo MapperIdInfo, + const OMPVarListLocTy &Locs, + const OMPMappableExprListSizeTy &Sizes) + : OMPMappableExprListClause(OMPC_to, Locs, Sizes, &MapperQualifierLoc, + &MapperIdInfo) {} /// Build an empty clause. /// - /// \param NumVars Number of expressions listed in this clause. - /// \param NumUniqueDeclarations Number of unique base declarations in this - /// clause. - /// \param NumComponentLists Number of component lists in this clause. - /// \param NumComponents Total number of expression components in the clause. - explicit OMPToClause(unsigned NumVars, unsigned NumUniqueDeclarations, - unsigned NumComponentLists, unsigned NumComponents) - : OMPMappableExprListClause( - OMPC_to, SourceLocation(), SourceLocation(), SourceLocation(), - NumVars, NumUniqueDeclarations, NumComponentLists, NumComponents) {} + /// \param Sizes All required sizes to build a mappable clause. It includes 1) + /// NumVars: number of expressions listed in this clause; 2) + /// NumUniqueDeclarations: number of unique base declarations in this clause; + /// 3) NumComponentLists: number of component lists in this clause; and 4) + /// NumComponents: total number of expression components in the clause. + explicit OMPToClause(const OMPMappableExprListSizeTy &Sizes) + : OMPMappableExprListClause(OMPC_to, OMPVarListLocTy(), Sizes) {} /// Define the sizes of each trailing object array except the last one. This /// is required for TrailingObjects to work properly. size_t numTrailingObjects(OverloadToken) const { - return varlist_size(); + // There are varlist_size() of expressions, and varlist_size() of + // user-defined mappers. + return 2 * varlist_size(); } size_t numTrailingObjects(OverloadToken) const { return getUniqueDeclarationsNum(); @@ -4903,30 +5022,35 @@ class OMPToClause final : public OMPMappableExprListClause, /// Creates clause with a list of variables \a Vars. /// /// \param C AST context. - /// \param StartLoc Starting location of the clause. - /// \param EndLoc Ending location of the clause. + /// \param Locs Locations needed to build a mappable clause. It includes 1) + /// StartLoc: starting location of the clause (the clause keyword); 2) + /// LParenLoc: location of '('; 3) EndLoc: ending location of the clause. /// \param Vars The original expression used in the clause. /// \param Declarations Declarations used in the clause. /// \param ComponentLists Component lists used in the clause. - static OMPToClause *Create(const ASTContext &C, SourceLocation StartLoc, - SourceLocation LParenLoc, SourceLocation EndLoc, + /// \param UDMapperRefs References to user-defined mappers associated with + /// expressions used in the clause. + /// \param UDMQualifierLoc C++ nested name specifier for the associated + /// user-defined mapper. + /// \param MapperId The identifier of associated user-defined mapper. + static OMPToClause *Create(const ASTContext &C, const OMPVarListLocTy &Locs, ArrayRef Vars, ArrayRef Declarations, - MappableExprComponentListsRef ComponentLists); + MappableExprComponentListsRef ComponentLists, + ArrayRef UDMapperRefs, + NestedNameSpecifierLoc UDMQualifierLoc, + DeclarationNameInfo MapperId); /// Creates an empty clause with the place for \a NumVars variables. /// /// \param C AST context. - /// \param NumVars Number of expressions listed in the clause. - /// \param NumUniqueDeclarations Number of unique base declarations in this - /// clause. - /// \param NumComponentLists Number of unique base declarations in this - /// clause. - /// \param NumComponents Total number of expression components in the clause. - static OMPToClause *CreateEmpty(const ASTContext &C, unsigned NumVars, - unsigned NumUniqueDeclarations, - unsigned NumComponentLists, - unsigned NumComponents); + /// \param Sizes All required sizes to build a mappable clause. It includes 1) + /// NumVars: number of expressions listed in this clause; 2) + /// NumUniqueDeclarations: number of unique base declarations in this clause; + /// 3) NumComponentLists: number of component lists in this clause; and 4) + /// NumComponents: total number of expression components in the clause. + static OMPToClause *CreateEmpty(const ASTContext &C, + const OMPMappableExprListSizeTy &Sizes); child_range children() { return child_range(reinterpret_cast(varlist_begin()), @@ -4958,38 +5082,40 @@ class OMPFromClause final /// Build clause with number of variables \a NumVars. /// - /// \param StartLoc Starting location of the clause. - /// \param EndLoc Ending location of the clause. - /// \param NumVars Number of expressions listed in this clause. - /// \param NumUniqueDeclarations Number of unique base declarations in this - /// clause. - /// \param NumComponentLists Number of component lists in this clause. - /// \param NumComponents Total number of expression components in the clause. - explicit OMPFromClause(SourceLocation StartLoc, SourceLocation LParenLoc, - SourceLocation EndLoc, unsigned NumVars, - unsigned NumUniqueDeclarations, - unsigned NumComponentLists, unsigned NumComponents) - : OMPMappableExprListClause(OMPC_from, StartLoc, LParenLoc, EndLoc, - NumVars, NumUniqueDeclarations, - NumComponentLists, NumComponents) {} + /// \param MapperQualifierLoc C++ nested name specifier for the associated + /// user-defined mapper. + /// \param MapperIdInfo The identifier of associated user-defined mapper. + /// \param Locs Locations needed to build a mappable clause. It includes 1) + /// StartLoc: starting location of the clause (the clause keyword); 2) + /// LParenLoc: location of '('; 3) EndLoc: ending location of the clause. + /// \param Sizes All required sizes to build a mappable clause. It includes 1) + /// NumVars: number of expressions listed in this clause; 2) + /// NumUniqueDeclarations: number of unique base declarations in this clause; + /// 3) NumComponentLists: number of component lists in this clause; and 4) + /// NumComponents: total number of expression components in the clause. + explicit OMPFromClause(NestedNameSpecifierLoc MapperQualifierLoc, + DeclarationNameInfo MapperIdInfo, + const OMPVarListLocTy &Locs, + const OMPMappableExprListSizeTy &Sizes) + : OMPMappableExprListClause(OMPC_from, Locs, Sizes, &MapperQualifierLoc, + &MapperIdInfo) {} /// Build an empty clause. /// - /// \param NumVars Number of expressions listed in this clause. - /// \param NumUniqueDeclarations Number of unique base declarations in this - /// clause. - /// \param NumComponentLists Number of component lists in this clause. - /// \param NumComponents Total number of expression components in the clause. - explicit OMPFromClause(unsigned NumVars, unsigned NumUniqueDeclarations, - unsigned NumComponentLists, unsigned NumComponents) - : OMPMappableExprListClause( - OMPC_from, SourceLocation(), SourceLocation(), SourceLocation(), - NumVars, NumUniqueDeclarations, NumComponentLists, NumComponents) {} + /// \param Sizes All required sizes to build a mappable clause. It includes 1) + /// NumVars: number of expressions listed in this clause; 2) + /// NumUniqueDeclarations: number of unique base declarations in this clause; + /// 3) NumComponentLists: number of component lists in this clause; and 4) + /// NumComponents: total number of expression components in the clause. + explicit OMPFromClause(const OMPMappableExprListSizeTy &Sizes) + : OMPMappableExprListClause(OMPC_from, OMPVarListLocTy(), Sizes) {} /// Define the sizes of each trailing object array except the last one. This /// is required for TrailingObjects to work properly. size_t numTrailingObjects(OverloadToken) const { - return varlist_size(); + // There are varlist_size() of expressions, and varlist_size() of + // user-defined mappers. + return 2 * varlist_size(); } size_t numTrailingObjects(OverloadToken) const { return getUniqueDeclarationsNum(); @@ -5002,30 +5128,35 @@ class OMPFromClause final /// Creates clause with a list of variables \a Vars. /// /// \param C AST context. - /// \param StartLoc Starting location of the clause. - /// \param EndLoc Ending location of the clause. + /// \param Locs Locations needed to build a mappable clause. It includes 1) + /// StartLoc: starting location of the clause (the clause keyword); 2) + /// LParenLoc: location of '('; 3) EndLoc: ending location of the clause. /// \param Vars The original expression used in the clause. /// \param Declarations Declarations used in the clause. /// \param ComponentLists Component lists used in the clause. - static OMPFromClause *Create(const ASTContext &C, SourceLocation StartLoc, - SourceLocation LParenLoc, SourceLocation EndLoc, + /// \param UDMapperRefs References to user-defined mappers associated with + /// expressions used in the clause. + /// \param UDMQualifierLoc C++ nested name specifier for the associated + /// user-defined mapper. + /// \param MapperId The identifier of associated user-defined mapper. + static OMPFromClause *Create(const ASTContext &C, const OMPVarListLocTy &Locs, ArrayRef Vars, ArrayRef Declarations, - MappableExprComponentListsRef ComponentLists); + MappableExprComponentListsRef ComponentLists, + ArrayRef UDMapperRefs, + NestedNameSpecifierLoc UDMQualifierLoc, + DeclarationNameInfo MapperId); /// Creates an empty clause with the place for \a NumVars variables. /// /// \param C AST context. - /// \param NumVars Number of expressions listed in the clause. - /// \param NumUniqueDeclarations Number of unique base declarations in this - /// clause. - /// \param NumComponentLists Number of unique base declarations in this - /// clause. - /// \param NumComponents Total number of expression components in the clause. - static OMPFromClause *CreateEmpty(const ASTContext &C, unsigned NumVars, - unsigned NumUniqueDeclarations, - unsigned NumComponentLists, - unsigned NumComponents); + /// \param Sizes All required sizes to build a mappable clause. It includes 1) + /// NumVars: number of expressions listed in this clause; 2) + /// NumUniqueDeclarations: number of unique base declarations in this clause; + /// 3) NumComponentLists: number of component lists in this clause; and 4) + /// NumComponents: total number of expression components in the clause. + static OMPFromClause *CreateEmpty(const ASTContext &C, + const OMPMappableExprListSizeTy &Sizes); child_range children() { return child_range(reinterpret_cast(varlist_begin()), @@ -5057,38 +5188,28 @@ class OMPUseDevicePtrClause final /// Build clause with number of variables \a NumVars. /// - /// \param StartLoc Starting location of the clause. - /// \param EndLoc Ending location of the clause. - /// \param NumVars Number of expressions listed in this clause. - /// \param NumUniqueDeclarations Number of unique base declarations in this - /// clause. - /// \param NumComponentLists Number of component lists in this clause. - /// \param NumComponents Total number of expression components in the clause. - explicit OMPUseDevicePtrClause(SourceLocation StartLoc, - SourceLocation LParenLoc, - SourceLocation EndLoc, unsigned NumVars, - unsigned NumUniqueDeclarations, - unsigned NumComponentLists, - unsigned NumComponents) - : OMPMappableExprListClause(OMPC_use_device_ptr, StartLoc, LParenLoc, - EndLoc, NumVars, NumUniqueDeclarations, - NumComponentLists, NumComponents) {} + /// \param Locs Locations needed to build a mappable clause. It includes 1) + /// StartLoc: starting location of the clause (the clause keyword); 2) + /// LParenLoc: location of '('; 3) EndLoc: ending location of the clause. + /// \param Sizes All required sizes to build a mappable clause. It includes 1) + /// NumVars: number of expressions listed in this clause; 2) + /// NumUniqueDeclarations: number of unique base declarations in this clause; + /// 3) NumComponentLists: number of component lists in this clause; and 4) + /// NumComponents: total number of expression components in the clause. + explicit OMPUseDevicePtrClause(const OMPVarListLocTy &Locs, + const OMPMappableExprListSizeTy &Sizes) + : OMPMappableExprListClause(OMPC_use_device_ptr, Locs, Sizes) {} /// Build an empty clause. /// - /// \param NumVars Number of expressions listed in this clause. - /// \param NumUniqueDeclarations Number of unique base declarations in this - /// clause. - /// \param NumComponentLists Number of component lists in this clause. - /// \param NumComponents Total number of expression components in the clause. - explicit OMPUseDevicePtrClause(unsigned NumVars, - unsigned NumUniqueDeclarations, - unsigned NumComponentLists, - unsigned NumComponents) - : OMPMappableExprListClause(OMPC_use_device_ptr, SourceLocation(), - SourceLocation(), SourceLocation(), NumVars, - NumUniqueDeclarations, NumComponentLists, - NumComponents) {} + /// \param Sizes All required sizes to build a mappable clause. It includes 1) + /// NumVars: number of expressions listed in this clause; 2) + /// NumUniqueDeclarations: number of unique base declarations in this clause; + /// 3) NumComponentLists: number of component lists in this clause; and 4) + /// NumComponents: total number of expression components in the clause. + explicit OMPUseDevicePtrClause(const OMPMappableExprListSizeTy &Sizes) + : OMPMappableExprListClause(OMPC_use_device_ptr, OMPVarListLocTy(), + Sizes) {} /// Define the sizes of each trailing object array except the last one. This /// is required for TrailingObjects to work properly. @@ -5134,34 +5255,30 @@ class OMPUseDevicePtrClause final /// Creates clause with a list of variables \a Vars. /// /// \param C AST context. - /// \param StartLoc Starting location of the clause. - /// \param EndLoc Ending location of the clause. + /// \param Locs Locations needed to build a mappable clause. It includes 1) + /// StartLoc: starting location of the clause (the clause keyword); 2) + /// LParenLoc: location of '('; 3) EndLoc: ending location of the clause. /// \param Vars The original expression used in the clause. /// \param PrivateVars Expressions referring to private copies. /// \param Inits Expressions referring to private copy initializers. /// \param Declarations Declarations used in the clause. /// \param ComponentLists Component lists used in the clause. static OMPUseDevicePtrClause * - Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation LParenLoc, - SourceLocation EndLoc, ArrayRef Vars, - ArrayRef PrivateVars, ArrayRef Inits, - ArrayRef Declarations, + Create(const ASTContext &C, const OMPVarListLocTy &Locs, + ArrayRef Vars, ArrayRef PrivateVars, + ArrayRef Inits, ArrayRef Declarations, MappableExprComponentListsRef ComponentLists); /// Creates an empty clause with the place for \a NumVars variables. /// /// \param C AST context. - /// \param NumVars Number of expressions listed in the clause. - /// \param NumUniqueDeclarations Number of unique base declarations in this - /// clause. - /// \param NumComponentLists Number of unique base declarations in this - /// clause. - /// \param NumComponents Total number of expression components in the clause. - static OMPUseDevicePtrClause *CreateEmpty(const ASTContext &C, - unsigned NumVars, - unsigned NumUniqueDeclarations, - unsigned NumComponentLists, - unsigned NumComponents); + /// \param Sizes All required sizes to build a mappable clause. It includes 1) + /// NumVars: number of expressions listed in this clause; 2) + /// NumUniqueDeclarations: number of unique base declarations in this clause; + /// 3) NumComponentLists: number of component lists in this clause; and 4) + /// NumComponents: total number of expression components in the clause. + static OMPUseDevicePtrClause * + CreateEmpty(const ASTContext &C, const OMPMappableExprListSizeTy &Sizes); using private_copies_iterator = MutableArrayRef::iterator; using private_copies_const_iterator = ArrayRef::iterator; @@ -5222,38 +5339,28 @@ class OMPIsDevicePtrClause final /// Build clause with number of variables \a NumVars. /// - /// \param StartLoc Starting location of the clause. - /// \param EndLoc Ending location of the clause. - /// \param NumVars Number of expressions listed in this clause. - /// \param NumUniqueDeclarations Number of unique base declarations in this - /// clause. - /// \param NumComponentLists Number of component lists in this clause. - /// \param NumComponents Total number of expression components in the clause. - explicit OMPIsDevicePtrClause(SourceLocation StartLoc, - SourceLocation LParenLoc, SourceLocation EndLoc, - unsigned NumVars, - unsigned NumUniqueDeclarations, - unsigned NumComponentLists, - unsigned NumComponents) - : OMPMappableExprListClause(OMPC_is_device_ptr, StartLoc, LParenLoc, - EndLoc, NumVars, NumUniqueDeclarations, - NumComponentLists, NumComponents) {} + /// \param Locs Locations needed to build a mappable clause. It includes 1) + /// StartLoc: starting location of the clause (the clause keyword); 2) + /// LParenLoc: location of '('; 3) EndLoc: ending location of the clause. + /// \param Sizes All required sizes to build a mappable clause. It includes 1) + /// NumVars: number of expressions listed in this clause; 2) + /// NumUniqueDeclarations: number of unique base declarations in this clause; + /// 3) NumComponentLists: number of component lists in this clause; and 4) + /// NumComponents: total number of expression components in the clause. + explicit OMPIsDevicePtrClause(const OMPVarListLocTy &Locs, + const OMPMappableExprListSizeTy &Sizes) + : OMPMappableExprListClause(OMPC_is_device_ptr, Locs, Sizes) {} /// Build an empty clause. /// - /// \param NumVars Number of expressions listed in this clause. - /// \param NumUniqueDeclarations Number of unique base declarations in this - /// clause. - /// \param NumComponentLists Number of component lists in this clause. - /// \param NumComponents Total number of expression components in the clause. - explicit OMPIsDevicePtrClause(unsigned NumVars, - unsigned NumUniqueDeclarations, - unsigned NumComponentLists, - unsigned NumComponents) - : OMPMappableExprListClause(OMPC_is_device_ptr, SourceLocation(), - SourceLocation(), SourceLocation(), NumVars, - NumUniqueDeclarations, NumComponentLists, - NumComponents) {} + /// \param Sizes All required sizes to build a mappable clause. It includes 1) + /// NumVars: number of expressions listed in this clause; 2) + /// NumUniqueDeclarations: number of unique base declarations in this clause; + /// 3) NumComponentLists: number of component lists in this clause; and 4) + /// NumComponents: total number of expression components in the clause. + explicit OMPIsDevicePtrClause(const OMPMappableExprListSizeTy &Sizes) + : OMPMappableExprListClause(OMPC_is_device_ptr, OMPVarListLocTy(), + Sizes) {} /// Define the sizes of each trailing object array except the last one. This /// is required for TrailingObjects to work properly. @@ -5271,31 +5378,27 @@ class OMPIsDevicePtrClause final /// Creates clause with a list of variables \a Vars. /// /// \param C AST context. - /// \param StartLoc Starting location of the clause. - /// \param EndLoc Ending location of the clause. + /// \param Locs Locations needed to build a mappable clause. It includes 1) + /// StartLoc: starting location of the clause (the clause keyword); 2) + /// LParenLoc: location of '('; 3) EndLoc: ending location of the clause. /// \param Vars The original expression used in the clause. /// \param Declarations Declarations used in the clause. /// \param ComponentLists Component lists used in the clause. static OMPIsDevicePtrClause * - Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation LParenLoc, - SourceLocation EndLoc, ArrayRef Vars, - ArrayRef Declarations, + Create(const ASTContext &C, const OMPVarListLocTy &Locs, + ArrayRef Vars, ArrayRef Declarations, MappableExprComponentListsRef ComponentLists); /// Creates an empty clause with the place for \a NumVars variables. /// /// \param C AST context. - /// \param NumVars Number of expressions listed in the clause. - /// \param NumUniqueDeclarations Number of unique base declarations in this - /// clause. - /// \param NumComponentLists Number of unique base declarations in this - /// clause. - /// \param NumComponents Total number of expression components in the clause. - static OMPIsDevicePtrClause *CreateEmpty(const ASTContext &C, - unsigned NumVars, - unsigned NumUniqueDeclarations, - unsigned NumComponentLists, - unsigned NumComponents); + /// \param Sizes All required sizes to build a mappable clause. It includes 1) + /// NumVars: number of expressions listed in this clause; 2) + /// NumUniqueDeclarations: number of unique base declarations in this clause; + /// 3) NumComponentLists: number of component lists in this clause; and 4) + /// NumComponents: total number of expression components in the clause. + static OMPIsDevicePtrClause * + CreateEmpty(const ASTContext &C, const OMPMappableExprListSizeTy &Sizes); child_range children() { return child_range(reinterpret_cast(varlist_begin()), diff --git a/clang/include/clang/AST/OperationKinds.def b/clang/include/clang/AST/OperationKinds.def index d8b286e35c90f..c61f085a58fa9 100644 --- a/clang/include/clang/AST/OperationKinds.def +++ b/clang/include/clang/AST/OperationKinds.def @@ -200,6 +200,14 @@ CAST_OPERATION(IntegralToFloating) /// (_Accum) 0.5r CAST_OPERATION(FixedPointCast) +/// CK_FixedPointToIntegral - Fixed point to integral. +/// (int) 2.0k +CAST_OPERATION(FixedPointToIntegral) + +/// CK_IntegralToFixedPoint - Integral to a fixed point. +/// (_Accum) 2 +CAST_OPERATION(IntegralToFixedPoint) + /// CK_FixedPointToBoolean - Fixed point to boolean. /// (bool) 0.5r CAST_OPERATION(FixedPointToBoolean) diff --git a/clang/include/clang/AST/Stmt.h b/clang/include/clang/AST/Stmt.h index b892d852060bd..e63354c263178 100644 --- a/clang/include/clang/AST/Stmt.h +++ b/clang/include/clang/AST/Stmt.h @@ -1584,21 +1584,44 @@ Stmt *SwitchCase::getSubStmt() { llvm_unreachable("SwitchCase is neither a CaseStmt nor a DefaultStmt!"); } +/// Represents a statement that could possibly have a value and type. This +/// covers expression-statements, as well as labels and attributed statements. +/// +/// Value statements have a special meaning when they are the last non-null +/// statement in a GNU statement expression, where they determine the value +/// of the statement expression. +class ValueStmt : public Stmt { +protected: + using Stmt::Stmt; + +public: + const Expr *getExprStmt() const; + Expr *getExprStmt() { + const ValueStmt *ConstThis = this; + return const_cast(ConstThis->getExprStmt()); + } + + static bool classof(const Stmt *T) { + return T->getStmtClass() >= firstValueStmtConstant && + T->getStmtClass() <= lastValueStmtConstant; + } +}; + /// LabelStmt - Represents a label, which has a substatement. For example: /// foo: return; -class LabelStmt : public Stmt { +class LabelStmt : public ValueStmt { LabelDecl *TheDecl; Stmt *SubStmt; public: /// Build a label statement. LabelStmt(SourceLocation IL, LabelDecl *D, Stmt *substmt) - : Stmt(LabelStmtClass), TheDecl(D), SubStmt(substmt) { + : ValueStmt(LabelStmtClass), TheDecl(D), SubStmt(substmt) { setIdentLoc(IL); } /// Build an empty label statement. - explicit LabelStmt(EmptyShell Empty) : Stmt(LabelStmtClass, Empty) {} + explicit LabelStmt(EmptyShell Empty) : ValueStmt(LabelStmtClass, Empty) {} SourceLocation getIdentLoc() const { return LabelStmtBits.IdentLoc; } void setIdentLoc(SourceLocation L) { LabelStmtBits.IdentLoc = L; } @@ -1627,7 +1650,7 @@ class LabelStmt : public Stmt { /// Represents an attribute applied to a statement. For example: /// [[omp::for(...)]] for (...) { ... } class AttributedStmt final - : public Stmt, + : public ValueStmt, private llvm::TrailingObjects { friend class ASTStmtReader; friend TrailingObjects; @@ -1636,14 +1659,14 @@ class AttributedStmt final AttributedStmt(SourceLocation Loc, ArrayRef Attrs, Stmt *SubStmt) - : Stmt(AttributedStmtClass), SubStmt(SubStmt) { + : ValueStmt(AttributedStmtClass), SubStmt(SubStmt) { AttributedStmtBits.NumAttrs = Attrs.size(); AttributedStmtBits.AttrLoc = Loc; std::copy(Attrs.begin(), Attrs.end(), getAttrArrayPtr()); } explicit AttributedStmt(EmptyShell Empty, unsigned NumAttrs) - : Stmt(AttributedStmtClass, Empty) { + : ValueStmt(AttributedStmtClass, Empty) { AttributedStmtBits.NumAttrs = NumAttrs; AttributedStmtBits.AttrLoc = SourceLocation{}; std::fill_n(getAttrArrayPtr(), NumAttrs, nullptr); diff --git a/clang/include/clang/AST/Type.h b/clang/include/clang/AST/Type.h index 126733d66cb97..1a74278edafd7 100644 --- a/clang/include/clang/AST/Type.h +++ b/clang/include/clang/AST/Type.h @@ -1126,6 +1126,12 @@ class QualType { PCK_Struct }; + /// Check if this is a non-trivial type that would cause a C struct + /// transitively containing this type to be non-trivial. This function can be + /// used to determine whether a field of this type can be declared inside a C + /// union. + bool isNonTrivialPrimitiveCType(const ASTContext &Ctx) const; + /// Check if this is a non-trivial type that would cause a C struct /// transitively containing this type to be non-trivial to copy and return the /// kind. diff --git a/clang/include/clang/ASTMatchers/ASTMatchers.h b/clang/include/clang/ASTMatchers/ASTMatchers.h index cd12b870917c0..1f3e1f936d4c5 100644 --- a/clang/include/clang/ASTMatchers/ASTMatchers.h +++ b/clang/include/clang/ASTMatchers/ASTMatchers.h @@ -2158,6 +2158,10 @@ extern const internal::VariadicDynCastAllOfMatcher extern const internal::VariadicDynCastAllOfMatcher cxxNullPtrLiteralExpr; +/// Matches GNU __builtin_choose_expr. +extern const internal::VariadicDynCastAllOfMatcher + chooseExpr; + /// Matches GNU __null expression. extern const internal::VariadicDynCastAllOfMatcher gnuNullExpr; @@ -2886,14 +2890,22 @@ AST_MATCHER_P(NamedDecl, hasUnderlyingDecl, internal::Matcher, InnerMatcher.matches(*UnderlyingDecl, Finder, Builder); } -/// Matches on the implicit object argument of a member call expression. +/// Matches on the implicit object argument of a member call expression, after +/// stripping off any parentheses or implicit casts. /// -/// Example matches y.x() -/// (matcher = cxxMemberCallExpr(on(hasType(cxxRecordDecl(hasName("Y")))))) +/// Given /// \code -/// class Y { public: void x(); }; -/// void z() { Y y; y.x(); } +/// class Y { public: void m(); }; +/// Y g(); +/// class X : public Y {}; +/// void z(Y y, X x) { y.m(); (g()).m(); x.m(); } /// \endcode +/// cxxMemberCallExpr(on(hasType(cxxRecordDecl(hasName("Y"))))) +/// matches `y.m()` and `(g()).m()`. +/// cxxMemberCallExpr(on(hasType(cxxRecordDecl(hasName("X"))))) +/// matches `x.m()`. +/// cxxMemberCallExpr(on(callExpr())) +/// matches `(g()).m()`. /// /// FIXME: Overload to allow directly matching types? AST_MATCHER_P(CXXMemberCallExpr, on, internal::Matcher, @@ -3253,6 +3265,23 @@ AST_MATCHER_P_OVERLOAD(QualType, references, internal::Matcher, .matches(Node, Finder, Builder); } +/// Matches on the implicit object argument of a member call expression. Unlike +/// `on`, matches the argument directly without stripping away anything. +/// +/// Given +/// \code +/// class Y { public: void m(); }; +/// Y g(); +/// class X : public Y { void g(); }; +/// void z(Y y, X x) { y.m(); x.m(); x.g(); (g()).m(); } +/// \endcode +/// cxxMemberCallExpr(onImplicitObjectArgument(hasType( +/// cxxRecordDecl(hasName("Y"))))) +/// matches `y.m()`, `x.m()` and (g()).m(), but not `x.g()`. +/// cxxMemberCallExpr(on(callExpr())) +/// does not match `(g()).m()`, because the parens are not ignored. +/// +/// FIXME: Overload to allow directly matching types? AST_MATCHER_P(CXXMemberCallExpr, onImplicitObjectArgument, internal::Matcher, InnerMatcher) { const Expr *ExprNode = Node.getImplicitObjectArgument(); @@ -3260,8 +3289,22 @@ AST_MATCHER_P(CXXMemberCallExpr, onImplicitObjectArgument, InnerMatcher.matches(*ExprNode, Finder, Builder)); } -/// Matches if the expression's type either matches the specified -/// matcher, or is a pointer to a type that matches the InnerMatcher. +/// Matches if the type of the expression's implicit object argument either +/// matches the InnerMatcher, or is a pointer to a type that matches the +/// InnerMatcher. +/// +/// Given +/// \code +/// class Y { public: void m(); }; +/// class X : public Y { void g(); }; +/// void z() { Y y; y.m(); Y *p; p->m(); X x; x.m(); x.g(); } +/// \endcode +/// cxxMemberCallExpr(thisPointerType(hasDeclaration( +/// cxxRecordDecl(hasName("Y"))))) +/// matches `y.m()`, `p->m()` and `x.m()`. +/// cxxMemberCallExpr(thisPointerType(hasDeclaration( +/// cxxRecordDecl(hasName("X"))))) +/// matches `x.g()`. AST_MATCHER_P_OVERLOAD(CXXMemberCallExpr, thisPointerType, internal::Matcher, InnerMatcher, 0) { return onImplicitObjectArgument( @@ -4963,18 +5006,22 @@ AST_MATCHER_P(MemberExpr, member, return InnerMatcher.matches(*Node.getMemberDecl(), Finder, Builder); } -/// Matches a member expression where the object expression is -/// matched by a given matcher. +/// Matches a member expression where the object expression is matched by a +/// given matcher. Implicit object expressions are included; that is, it matches +/// use of implicit `this`. /// /// Given /// \code -/// struct X { int m; }; -/// void f(X x) { x.m; m; } +/// struct X { +/// int m; +/// int f(X x) { x.m; return m; } +/// }; /// \endcode -/// memberExpr(hasObjectExpression(hasType(cxxRecordDecl(hasName("X"))))))) -/// matches "x.m" and "m" -/// with hasObjectExpression(...) -/// matching "x" and the implicit object expression of "m" which has type X*. +/// memberExpr(hasObjectExpression(hasType(cxxRecordDecl(hasName("X"))))) +/// matches `x.m`, but not `m`; however, +/// memberExpr(hasObjectExpression(hasType(pointsTo( +// cxxRecordDecl(hasName("X")))))) +/// matches `m` (aka. `this->m`), but not `x.m`. AST_POLYMORPHIC_MATCHER_P( hasObjectExpression, AST_POLYMORPHIC_SUPPORTED_TYPES(MemberExpr, UnresolvedMemberExpr, diff --git a/clang/include/clang/ASTMatchers/ASTMatchersInternal.h b/clang/include/clang/ASTMatchers/ASTMatchersInternal.h index 6a71d41a42df1..474987748c54f 100644 --- a/clang/include/clang/ASTMatchers/ASTMatchersInternal.h +++ b/clang/include/clang/ASTMatchers/ASTMatchersInternal.h @@ -1547,8 +1547,7 @@ inline bool ValueEqualsMatcher::matchesNode( /// given matchers, if SourceT can be dynamically casted into TargetT. /// /// For example: -/// const VariadicDynCastAllOfMatcher< -/// Decl, CXXRecordDecl> record; +/// const VariadicDynCastAllOfMatcher record; /// Creates a functor record(...) that creates a Matcher given /// a variable number of arguments of type Matcher. /// The returned matcher matches if the given Decl can by dynamically diff --git a/clang/include/clang/Analysis/AnyCall.h b/clang/include/clang/Analysis/AnyCall.h index a9098adcbfa22..97a94d299e64c 100644 --- a/clang/include/clang/Analysis/AnyCall.h +++ b/clang/include/clang/Analysis/AnyCall.h @@ -173,6 +173,7 @@ class AnyCall { case Deallocator: return cast(D)->getReturnType(); } + llvm_unreachable("Unknown AnyCall::Kind"); } /// \returns Function identifier if it is a named declaration, diff --git a/clang/include/clang/Analysis/CallGraph.h b/clang/include/clang/Analysis/CallGraph.h index 49c04490fed2c..dae2b58ffc102 100644 --- a/clang/include/clang/Analysis/CallGraph.h +++ b/clang/include/clang/Analysis/CallGraph.h @@ -131,6 +131,7 @@ class CallGraph : public RecursiveASTVisitor { bool shouldWalkTypesOfTypeLocs() const { return false; } bool shouldVisitTemplateInstantiations() const { return true; } + bool shouldVisitImplicitCode() const { return true; } private: /// Add the given declaration to the call graph. diff --git a/clang/include/clang/Basic/Attr.td b/clang/include/clang/Basic/Attr.td index 0aee72cc1f7a3..4fb4fb4a0744a 100644 --- a/clang/include/clang/Basic/Attr.td +++ b/clang/include/clang/Basic/Attr.td @@ -102,13 +102,6 @@ def ObjCInstanceMethod : SubsetSubjectisInstanceMethod()}], "Objective-C instance methods">; -def ObjCInterfaceDeclInitMethod : SubsetSubjectgetMethodFamily() == OMF_init && - (isa(S->getDeclContext()) || - (isa(S->getDeclContext()) && - cast(S->getDeclContext())->IsClassExtension()))}], - "init methods of interface or class extension declarations">; - def Struct : SubsetSubjectisUnion()}], "structs">; @@ -296,7 +289,7 @@ class LangOpt { def MicrosoftExt : LangOpt<"MicrosoftExt">; def Borland : LangOpt<"Borland">; def CUDA : LangOpt<"CUDA">; -def SYCL : LangOpt<"SYCL">; +def SYCL : LangOpt<"SYCLIsDevice">; def COnly : LangOpt<"CPlusPlus", 1>; def CPlusPlus : LangOpt<"CPlusPlus">; def OpenCL : LangOpt<"OpenCL">; @@ -1322,6 +1315,12 @@ def MayAlias : InheritableAttr { let Documentation = [Undocumented]; } +def MIGServerRoutine : InheritableAttr { + let Spellings = [Clang<"mig_server_routine">]; + let Subjects = SubjectList<[Function, ObjCMethod, Block]>; + let Documentation = [MIGConventionDocs]; +} + def MSABI : DeclOrTypeAttr { let Spellings = [GCC<"ms_abi">]; // let Subjects = [Function, ObjCMethod]; @@ -1388,6 +1387,93 @@ def Mode : Attr { let PragmaAttributeSupport = 0; } +def IntelFPGAConstVar : SubsetSubjectgetKind() != Decl::ImplicitParam && + S->getKind() != Decl::ParmVar && + S->getKind() != Decl::NonTypeTemplateParm && + (S->getType().isConstQualified() || + S->getType().getAddressSpace() == + LangAS::opencl_constant)}], + "constant variables">; + +def IntelFPGALocalStaticSlaveMemVar : SubsetSubjectgetKind() != Decl::ImplicitParam && + S->getKind() != Decl::NonTypeTemplateParm && + (S->getStorageClass() == SC_Static || + S->hasLocalStorage())}], + "local variables, static variables, slave memory arguments">; + +def IntelFPGALocalOrStaticVar : SubsetSubjectgetKind() != Decl::ImplicitParam && + S->getKind() != Decl::ParmVar && + S->getKind() != Decl::NonTypeTemplateParm && + (S->getStorageClass() == SC_Static || + S->hasLocalStorage())}], + "local variables, static variables">; + +def IntelFPGAMemory : Attr { + let Spellings = [GNU<"memory">, CXX11<"intelfpga", "memory">]; + let Args = [EnumArgument<"Kind", "MemoryKind", + ["MLAB", "BLOCK_RAM", ""], + ["MLAB", "BlockRAM", "Default"], 1>]; + let AdditionalMembers = [{ + static void generateValidStrings(SmallString<256> &Str) { + auto Last = BlockRAM; + for (int I = 0; I <= Last; ++I) { + Str += ConvertMemoryKindToStr(static_cast(I)); + if (I != Last) Str += " "; + } + } + }]; + let Subjects = SubjectList<[IntelFPGAConstVar, IntelFPGALocalStaticSlaveMemVar, + Field], ErrorDiag>; + let LangOpts = [SYCL]; + let Documentation = [IntelFPGAMemoryAttrDocs]; +} + +def IntelFPGARegister : Attr { + let Spellings = [GNU<"register">, CXX11<"intelfpga", "register">]; + let Subjects = SubjectList<[IntelFPGAConstVar, IntelFPGALocalOrStaticVar, + Field], ErrorDiag>; + let LangOpts = [SYCL]; + let Documentation = [IntelFPGARegisterAttrDocs]; +} + +// One integral argument. +def IntelFPGABankWidth : Attr { + let Spellings = [GNU<"bankwidth">, CXX11<"intelfpga","bankwidth">]; + let Args = [ExprArgument<"Value">]; + let Subjects = SubjectList<[IntelFPGAConstVar, IntelFPGALocalStaticSlaveMemVar, + Field], ErrorDiag>; + let LangOpts = [SYCL]; + let Documentation = [IntelFPGABankWidthAttrDocs]; + let AdditionalMembers = [{ + static unsigned getMinValue() { + return 1; + } + static unsigned getMaxValue() { + return 1024*1024; + } + }]; +} + +def IntelFPGANumBanks : Attr { + let Spellings = [GNU<"numbanks">, CXX11<"intelfpga","numbanks">]; + let Args = [ExprArgument<"Value">]; + let Subjects = SubjectList<[IntelFPGAConstVar, IntelFPGALocalStaticSlaveMemVar, + Field], ErrorDiag>; + let LangOpts = [SYCL]; + let Documentation = [IntelFPGANumBanksAttrDocs]; + let AdditionalMembers = [{ + static unsigned getMinValue() { + return 1; + } + static unsigned getMaxValue() { + return 1024*1024; + } + }]; +} + def Naked : InheritableAttr { let Spellings = [GCC<"naked">, Declspec<"naked">]; let Subjects = SubjectList<[Function]>; @@ -1500,14 +1586,14 @@ def RISCVInterrupt : InheritableAttr, TargetSpecificAttr { def AMDGPUFlatWorkGroupSize : InheritableAttr { let Spellings = [Clang<"amdgpu_flat_work_group_size", 0>]; - let Args = [UnsignedArgument<"Min">, UnsignedArgument<"Max">]; + let Args = [ExprArgument<"Min">, ExprArgument<"Max">]; let Documentation = [AMDGPUFlatWorkGroupSizeDocs]; let Subjects = SubjectList<[Function], ErrorDiag, "kernel functions">; } def AMDGPUWavesPerEU : InheritableAttr { let Spellings = [Clang<"amdgpu_waves_per_eu", 0>]; - let Args = [UnsignedArgument<"Min">, UnsignedArgument<"Max", 1>]; + let Args = [ExprArgument<"Min">, ExprArgument<"Max", 1>]; let Documentation = [AMDGPUWavesPerEUDocs]; let Subjects = SubjectList<[Function], ErrorDiag, "kernel functions">; } @@ -1582,6 +1668,13 @@ def PassObjectSize : InheritableParamAttr { let Documentation = [PassObjectSizeDocs]; } +def FortifyStdLib : InheritableAttr { + let Spellings = [Clang<"fortify_stdlib">]; + let Args = [IntArgument<"Type">, IntArgument<"Flag">]; + let Subjects = SubjectList<[Function]>; + let Documentation = [FortifyStdLibDocs]; +} + // Nullability type attributes. def TypeNonNull : TypeAttr { let Spellings = [Keyword<"_Nonnull">]; @@ -1773,6 +1866,13 @@ def ObjCRootClass : InheritableAttr { let Documentation = [Undocumented]; } +def ObjCNonLazyClass : Attr { + let Spellings = [Clang<"objc_nonlazy_class">]; + let Subjects = SubjectList<[ObjCInterface], ErrorDiag>; + let LangOpts = [ObjC]; + let Documentation = [ObjCNonLazyClassDocs]; +} + def ObjCSubclassingRestricted : InheritableAttr { let Spellings = [Clang<"objc_subclassing_restricted">]; let Subjects = SubjectList<[ObjCInterface], ErrorDiag>; @@ -1787,7 +1887,7 @@ def ObjCExplicitProtocolImpl : InheritableAttr { def ObjCDesignatedInitializer : Attr { let Spellings = [Clang<"objc_designated_initializer">]; - let Subjects = SubjectList<[ObjCInterfaceDeclInitMethod], ErrorDiag>; + let Subjects = SubjectList<[ObjCMethod], ErrorDiag>; let Documentation = [Undocumented]; } @@ -2368,7 +2468,7 @@ def NoSanitize : InheritableAttr { let Documentation = [NoSanitizeDocs]; let AdditionalMembers = [{ SanitizerMask getMask() const { - SanitizerMask Mask = 0; + SanitizerMask Mask; for (auto SanitizerName : sanitizers()) { SanitizerMask ParsedMask = parseSanitizerValue(SanitizerName, /*AllowGroups=*/true); diff --git a/clang/include/clang/Basic/AttrDocs.td b/clang/include/clang/Basic/AttrDocs.td index d316993223a4e..b38462b53ad40 100644 --- a/clang/include/clang/Basic/AttrDocs.td +++ b/clang/include/clang/Basic/AttrDocs.td @@ -965,6 +965,43 @@ of the condition. }]; } +def FortifyStdLibDocs : Documentation { + let Category = DocCatFunction; + let Content = [{ +The ``fortify_stdlib`` attribute applies to declarations of C stdlib functions +(memcpy, sprintf, ...), and causes clang to emit calls to their fortified +variants with ``__builtin_object_size``. This attribute is intended for use +within standard C library implementations and should not generally be used for +user applications. For instance: + +.. code-block:: c + + __attribute__((fortify_stdlib(0, 0))) + int sprintf(char *buf, const char *fmt, ...); + + int main() { + char buf[5]; + sprintf(buf, "%f", 42.0); + // Clang generates code equivalent to: + // __sprintf_chk(buf, 0, __builtin_object_size(0), "%f", 42.0); + } + +The first argument to the attribute is the integer `type` argument passed to +`__builtin_object_size` (you can read more about `__builtin_object_size` +`here `_), +The second argument to this attribute is the flag that the fortified format +functions accept. + +Only a specific set of standard library functions are supported: + - memcpy, memmove, memset + - stpcpy, strcat, strcpy + - strlcat, strlcpy + - strncat, strncpy, stpncpy + - snprintf, vsnprintf, sprintf, vsprintf + - fprintf, vfprintf, printf, vprintf +}]; +} + def ConvergentDocs : Documentation { let Category = DocCatFunction; let Content = [{ @@ -1631,6 +1668,47 @@ as ``-mlong-calls`` and ``-mno-long-calls``. }]; } +def IntelFPGAMemoryAttrDocs : Documentation { + let Category = DocCatVariable; + let Heading = "memory (IntelFGPA)"; + let Content = [{ +This attribute may be attached to a variable or struct member declaration and +instructs the backend to implement the variable or struct member in memory +rather than promoting to register(s). If the optional parameter is specified +it indicates what type of memory to use. + }]; +} + +def IntelFPGARegisterAttrDocs : Documentation { + let Category = DocCatVariable; + let Heading = "register (IntelFGPA)"; + let Content = [{ +This attribute may be attached to a variable or struct member declaration and +instructs the backend to promote the variable or struct member to register(s) +if possible. + }]; +} + +def IntelFPGABankWidthAttrDocs : Documentation { + let Category = DocCatVariable; + let Heading = "bankwidth (IntelFGPA)"; + let Content = [{ +This attribute may be attached to a variable or struct member declaration and +instructs the backend to implement the variable or struct member in a memory +with banks that are N bytes wide. + }]; +} + +def IntelFPGANumBanksAttrDocs : Documentation { + let Category = DocCatVariable; + let Heading = "numbanks (IntelFGPA)"; + let Content = [{ +This attribute may be attached to a variable or struct member declaration and +instructs the backend to implement the variable or struct member in a memory +with N banks. + }]; +} + def RISCVInterruptDocs : Documentation { let Category = DocCatFunction; let Heading = "interrupt (RISCV)"; @@ -3699,6 +3777,19 @@ ensure that this class cannot be subclassed. }]; } +def ObjCNonLazyClassDocs : Documentation { + let Category = DocCatType; + let Content = [{ +This attribute can be added to an Objective-C ``@interface`` declaration to +add the class to the list of non-lazily initialized classes. A non-lazy class +will be initialized eagerly when the Objective-C runtime is loaded. This is +required for certain system classes which have instances allocated in +non-standard ways, such as the classes for blocks and constant strings. Adding +this attribute is essentially equivalent to providing a trivial `+load` method +but avoids the (fairly small) load-time overheads associated with defining and +calling such a method. + }]; +} def SelectAnyDocs : Documentation { let Category = DocCatType; @@ -3929,13 +4020,13 @@ The ``gnu_inline`` changes the meaning of ``extern inline`` to use GNU inline semantics, meaning: * If any declaration that is declared ``inline`` is not declared ``extern``, -then the ``inline`` keyword is just a hint. In particular, an out-of-line -definition is still emitted for a function with external linkage, even if all -call sites are inlined, unlike in C99 and C++ inline semantics. + then the ``inline`` keyword is just a hint. In particular, an out-of-line + definition is still emitted for a function with external linkage, even if all + call sites are inlined, unlike in C99 and C++ inline semantics. * If all declarations that are declared ``inline`` are also declared -``extern``, then the function body is present only for inlining and no -out-of-line version is emitted. + ``extern``, then the function body is present only for inlining and no + out-of-line version is emitted. Some important consequences: ``static inline`` emits an out-of-line version if needed, a plain ``inline`` definition emits an out-of-line version @@ -4045,3 +4136,24 @@ Likewise, when applied to a strong local variable, that variable becomes When compiled without ``-fobjc-arc``, this attribute is ignored. }]; } + +def MIGConventionDocs : Documentation { + let Category = DocCatType; + let Content = [{ + The Mach Interface Generator release-on-success convention dictates +functions that follow it to only release arguments passed to them when they +return "success" (a ``kern_return_t`` error code that indicates that +no errors have occured). Otherwise the release is performed by the MIG client +that called the function. The annotation ``__attribute__((mig_server_routine))`` +is applied in order to specify which functions are expected to follow the +convention. This allows the Static Analyzer to find bugs caused by violations of +that convention. The attribute would normally appear on the forward declaration +of the actual server routine in the MIG server header, but it may also be +added to arbitrary functions that need to follow the same convention - for +example, a user can add them to auxiliary functions called by the server routine +that have their return value of type ``kern_return_t`` unconditionally returned +from the routine. The attribute can be applied to C++ methods, and in this case +it will be automatically applied to overrides if the method is virtual. The +attribute can also be written using C++11 syntax: ``[[mig::server_routine]]``. +}]; +} diff --git a/clang/include/clang/Basic/Builtins.def b/clang/include/clang/Basic/Builtins.def index 2e8c6d971211e..45d3d89690a86 100644 --- a/clang/include/clang/Basic/Builtins.def +++ b/clang/include/clang/Basic/Builtins.def @@ -448,7 +448,7 @@ BUILTIN(__builtin_va_end, "vA", "n") BUILTIN(__builtin_va_copy, "vAA", "n") BUILTIN(__builtin_stdarg_start, "vA.", "n") BUILTIN(__builtin_assume_aligned, "v*vC*z.", "nc") -BUILTIN(__builtin_bcmp, "iv*v*z", "Fn") +BUILTIN(__builtin_bcmp, "ivC*vC*z", "Fn") BUILTIN(__builtin_bcopy, "vv*v*z", "n") BUILTIN(__builtin_bzero, "vv*z", "nF") BUILTIN(__builtin_fprintf, "iP*cC*.", "Fp:1:") @@ -830,13 +830,13 @@ LANGBUILTIN(__popcnt64, "UWiUWi", "nc", ALL_MS_LANGUAGES) LANGBUILTIN(_ReturnAddress, "v*", "n", ALL_MS_LANGUAGES) LANGBUILTIN(_rotl8, "UcUcUc", "n", ALL_MS_LANGUAGES) LANGBUILTIN(_rotl16, "UsUsUc", "n", ALL_MS_LANGUAGES) -LANGBUILTIN(_rotl, "UiUii", "n", ALL_MS_LANGUAGES) -LANGBUILTIN(_lrotl, "UNiUNii", "n", ALL_MS_LANGUAGES) +BUILTIN(_rotl, "UiUii", "n") +BUILTIN(_lrotl, "ULiULii", "n") LANGBUILTIN(_rotl64, "UWiUWii", "n", ALL_MS_LANGUAGES) LANGBUILTIN(_rotr8, "UcUcUc", "n", ALL_MS_LANGUAGES) LANGBUILTIN(_rotr16, "UsUsUc", "n", ALL_MS_LANGUAGES) -LANGBUILTIN(_rotr, "UiUii", "n", ALL_MS_LANGUAGES) -LANGBUILTIN(_lrotr, "UNiUNii", "n", ALL_MS_LANGUAGES) +BUILTIN(_rotr, "UiUii", "n") +BUILTIN(_lrotr, "ULiULii", "n") LANGBUILTIN(_rotr64, "UWiUWii", "n", ALL_MS_LANGUAGES) LANGBUILTIN(__va_start, "vc**.", "nt", ALL_MS_LANGUAGES) LANGBUILTIN(__fastfail, "vUi", "nr", ALL_MS_LANGUAGES) @@ -953,6 +953,7 @@ LIBBUILTIN(strndup, "c*cC*z", "f", "string.h", ALL_GNU_LANGUAGES) LIBBUILTIN(index, "c*cC*i", "f", "strings.h", ALL_GNU_LANGUAGES) LIBBUILTIN(rindex, "c*cC*i", "f", "strings.h", ALL_GNU_LANGUAGES) LIBBUILTIN(bzero, "vv*z", "f", "strings.h", ALL_GNU_LANGUAGES) +LIBBUILTIN(bcmp, "ivC*vC*z", "f", "strings.h", ALL_GNU_LANGUAGES) // In some systems str[n]casejmp is a macro that expands to _str[n]icmp. // We undefine then here to avoid wrong name. #undef strcasecmp diff --git a/clang/include/clang/Basic/Builtins.h b/clang/include/clang/Basic/Builtins.h index fed0dae201932..b3d6e456fb289 100644 --- a/clang/include/clang/Basic/Builtins.h +++ b/clang/include/clang/Basic/Builtins.h @@ -242,7 +242,13 @@ class Context { const char *Fmt) const; }; -} +/// For a given BuiltinID, return the ID of the fortified variant function. For +/// instance, if Builtin::BIsprintf is passed, this function will return +/// Builtin::BI__builtin___sprintf_chk. If BuiltinID doesn't have a fortified +/// variant, 0 is returned. +unsigned getFortifiedVariantFunction(unsigned BuiltinID); + +} // end namespace Builtin /// Kinds of BuiltinTemplateDecl. enum BuiltinTemplateKind : int { diff --git a/clang/include/clang/Basic/BuiltinsAArch64.def b/clang/include/clang/Basic/BuiltinsAArch64.def index e15811f9ae44a..e9a8a2c44ca92 100644 --- a/clang/include/clang/Basic/BuiltinsAArch64.def +++ b/clang/include/clang/Basic/BuiltinsAArch64.def @@ -203,8 +203,8 @@ TARGET_HEADER_BUILTIN(_InterlockedDecrement64_rel, "LLiLLiD*", "nh", "intrin.h", TARGET_HEADER_BUILTIN(_ReadWriteBarrier, "v", "nh", "intrin.h", ALL_MS_LANGUAGES, "") TARGET_HEADER_BUILTIN(__getReg, "ULLii", "nh", "intrin.h", ALL_MS_LANGUAGES, "") -TARGET_HEADER_BUILTIN(_ReadStatusReg, "ii", "nh", "intrin.h", ALL_MS_LANGUAGES, "") -TARGET_HEADER_BUILTIN(_WriteStatusReg, "vii", "nh", "intrin.h", ALL_MS_LANGUAGES, "") +TARGET_HEADER_BUILTIN(_ReadStatusReg, "LLii", "nh", "intrin.h", ALL_MS_LANGUAGES, "") +TARGET_HEADER_BUILTIN(_WriteStatusReg, "viLLi", "nh", "intrin.h", ALL_MS_LANGUAGES, "") TARGET_HEADER_BUILTIN(_AddressOfReturnAddress, "v*", "nh", "intrin.h", ALL_MS_LANGUAGES, "") #undef BUILTIN diff --git a/clang/include/clang/Basic/BuiltinsAMDGPU.def b/clang/include/clang/Basic/BuiltinsAMDGPU.def index fa3db618be7ce..20592c7bf25fc 100644 --- a/clang/include/clang/Basic/BuiltinsAMDGPU.def +++ b/clang/include/clang/Basic/BuiltinsAMDGPU.def @@ -145,13 +145,13 @@ TARGET_BUILTIN(__builtin_amdgcn_fmed3h, "hhhh", "nc", "gfx9-insts") // Deep learning builtins. //===----------------------------------------------------------------------===// -TARGET_BUILTIN(__builtin_amdgcn_fdot2, "fV2hV2hfIb", "nc", "dot-insts") -TARGET_BUILTIN(__builtin_amdgcn_sdot2, "SiV2SsV2SsSiIb", "nc", "dot-insts") -TARGET_BUILTIN(__builtin_amdgcn_udot2, "UiV2UsV2UsUiIb", "nc", "dot-insts") -TARGET_BUILTIN(__builtin_amdgcn_sdot4, "SiSiSiSiIb", "nc", "dot-insts") -TARGET_BUILTIN(__builtin_amdgcn_udot4, "UiUiUiUiIb", "nc", "dot-insts") -TARGET_BUILTIN(__builtin_amdgcn_sdot8, "SiSiSiSiIb", "nc", "dot-insts") -TARGET_BUILTIN(__builtin_amdgcn_udot8, "UiUiUiUiIb", "nc", "dot-insts") +TARGET_BUILTIN(__builtin_amdgcn_fdot2, "fV2hV2hfIb", "nc", "dot2-insts") +TARGET_BUILTIN(__builtin_amdgcn_sdot2, "SiV2SsV2SsSiIb", "nc", "dot2-insts") +TARGET_BUILTIN(__builtin_amdgcn_udot2, "UiV2UsV2UsUiIb", "nc", "dot2-insts") +TARGET_BUILTIN(__builtin_amdgcn_sdot4, "SiSiSiSiIb", "nc", "dot1-insts") +TARGET_BUILTIN(__builtin_amdgcn_udot4, "UiUiUiUiIb", "nc", "dot2-insts") +TARGET_BUILTIN(__builtin_amdgcn_sdot8, "SiSiSiSiIb", "nc", "dot1-insts") +TARGET_BUILTIN(__builtin_amdgcn_udot8, "UiUiUiUiIb", "nc", "dot2-insts") //===----------------------------------------------------------------------===// // Special builtins. diff --git a/clang/include/clang/Basic/BuiltinsWebAssembly.def b/clang/include/clang/Basic/BuiltinsWebAssembly.def index b8f1a0b4351c7..0241436b5b871 100644 --- a/clang/include/clang/Basic/BuiltinsWebAssembly.def +++ b/clang/include/clang/Basic/BuiltinsWebAssembly.def @@ -25,6 +25,10 @@ BUILTIN(__builtin_wasm_memory_size, "zIi", "n") BUILTIN(__builtin_wasm_memory_grow, "zIiz", "n") +// Bulk memory builtins +TARGET_BUILTIN(__builtin_wasm_memory_init, "vIUiIUiv*UiUi", "", "bulk-memory") +TARGET_BUILTIN(__builtin_wasm_data_drop, "vIUi", "", "bulk-memory") + // Floating point min/max BUILTIN(__builtin_wasm_min_f32, "fff", "nc") BUILTIN(__builtin_wasm_max_f32, "fff", "nc") diff --git a/clang/include/clang/Basic/CodeGenOptions.h b/clang/include/clang/Basic/CodeGenOptions.h index 5c8abe359ebfe..fc284f8c67746 100644 --- a/clang/include/clang/Basic/CodeGenOptions.h +++ b/clang/include/clang/Basic/CodeGenOptions.h @@ -100,6 +100,7 @@ class CodeGenOptions : public CodeGenOptionsBase { ProfileClangInstr, // Clang instrumentation to generate execution counts // to use with PGO. ProfileIRInstr, // IR level PGO instrumentation in LLVM. + ProfileCSIRInstr, // IR level PGO context sensitive instrumentation in LLVM. }; enum EmbedBitcodeKind { @@ -203,8 +204,8 @@ class CodeGenOptions : public CodeGenOptionsBase { /// A list of linker options to embed in the object file. std::vector LinkerOptions; - /// Name of the profile file to use as output for -fprofile-instr-generate - /// and -fprofile-generate. + /// Name of the profile file to use as output for -fprofile-instr-generate, + /// -fprofile-generate, and -fcs-profile-generate. std::string InstrProfileOutput; /// Name of the profile file to use with -fprofile-sample-use. @@ -318,6 +319,11 @@ class CodeGenOptions : public CodeGenOptionsBase { return getProfileInstr() == ProfileIRInstr; } + /// Check if CS IR level profile instrumentation is on. + bool hasProfileCSIRInstr() const { + return getProfileInstr() == ProfileCSIRInstr; + } + /// Check if Clang profile use is on. bool hasProfileClangUse() const { return getProfileUse() == ProfileClangInstr; @@ -325,9 +331,12 @@ class CodeGenOptions : public CodeGenOptionsBase { /// Check if IR level profile use is on. bool hasProfileIRUse() const { - return getProfileUse() == ProfileIRInstr; + return getProfileUse() == ProfileIRInstr || + getProfileUse() == ProfileCSIRInstr; } + /// Check if CSIR profile use is on. + bool hasProfileCSIRUse() const { return getProfileUse() == ProfileCSIRInstr; } }; } // end namespace clang diff --git a/clang/include/clang/Basic/Cuda.h b/clang/include/clang/Basic/Cuda.h index 532c23098eef4..d96c7e0972f99 100644 --- a/clang/include/clang/Basic/Cuda.h +++ b/clang/include/clang/Basic/Cuda.h @@ -25,7 +25,8 @@ enum class CudaVersion { CUDA_91, CUDA_92, CUDA_100, - LATEST = CUDA_100, + CUDA_101, + LATEST = CUDA_101, }; const char *CudaVersionToString(CudaVersion V); // Input is "Major.Minor" @@ -107,6 +108,8 @@ CudaVersion MaxVersionForCudaArch(CudaArch A); enum class CudaFeature { // CUDA-9.2+ uses a new API for launching kernels. CUDA_USES_NEW_LAUNCH, + // CUDA-10.1+ needs explicit end of GPU binary registration. + CUDA_USES_FATBIN_REGISTER_END, }; bool CudaFeatureEnabled(llvm::VersionTuple, CudaFeature); diff --git a/clang/include/clang/Basic/DiagnosticDriverKinds.td b/clang/include/clang/Basic/DiagnosticDriverKinds.td index 32614d91a5283..713d768529412 100644 --- a/clang/include/clang/Basic/DiagnosticDriverKinds.td +++ b/clang/include/clang/Basic/DiagnosticDriverKinds.td @@ -100,6 +100,8 @@ def err_drv_clang_unsupported : Error< "the clang compiler does not support '%0'">; def err_drv_clang_unsupported_opt_cxx_darwin_i386 : Error< "the clang compiler does not support '%0' for C++ on Darwin/i386">; +def err_drv_clang_unsupported_opt_pg_darwin: Error< + "the clang compiler does not support -pg option on %select{Darwin|versions of OS X 10.9 and later}0">; def err_drv_clang_unsupported_opt_faltivec : Error< "the clang compiler does not support '%0', %1">; def err_drv_command_failed : Error< diff --git a/clang/include/clang/Basic/DiagnosticGroups.td b/clang/include/clang/Basic/DiagnosticGroups.td index 38bc2214db0f4..4405e2aae0e92 100644 --- a/clang/include/clang/Basic/DiagnosticGroups.td +++ b/clang/include/clang/Basic/DiagnosticGroups.td @@ -351,6 +351,7 @@ def MismatchedReturnTypes : DiagGroup<"mismatched-return-types">; def MismatchedTags : DiagGroup<"mismatched-tags">; def MissingFieldInitializers : DiagGroup<"missing-field-initializers">; def ModuleBuild : DiagGroup<"module-build">; +def ModuleImport : DiagGroup<"module-import">; def ModuleConflict : DiagGroup<"module-conflict">; def ModuleFileExtension : DiagGroup<"module-file-extension">; def NewlineEOF : DiagGroup<"newline-eof">; diff --git a/clang/include/clang/Basic/DiagnosticLexKinds.td b/clang/include/clang/Basic/DiagnosticLexKinds.td index 684251678eec6..da73e62c9d2e8 100644 --- a/clang/include/clang/Basic/DiagnosticLexKinds.td +++ b/clang/include/clang/Basic/DiagnosticLexKinds.td @@ -391,6 +391,7 @@ def warn_cxx98_compat_empty_fnmacro_arg : Warning< "empty macro arguments are incompatible with C++98">, InGroup, DefaultIgnore; def note_macro_here : Note<"macro %0 defined here">; +def note_macro_expansion_here : Note<"expansion of macro %0 requested here">; def err_pp_opencl_variadic_macros : Error<"variadic macros not supported in OpenCL">; @@ -418,6 +419,8 @@ def err_pp_file_not_found_angled_include_not_fatal : Error< "'%0' file not found with include; use \"quotes\" instead">; def err_pp_file_not_found_typo_not_fatal : Error<"'%0' file not found, did you mean '%1'?">; +def note_pp_framework_without_header : Note< + "did not find header '%0' in framework '%1' (loaded from '%2')">; def err_pp_error_opening_file : Error< "error opening file '%0': %1">, DefaultFatal; def err_pp_empty_filename : Error<"empty filename">; diff --git a/clang/include/clang/Basic/DiagnosticParseKinds.td b/clang/include/clang/Basic/DiagnosticParseKinds.td index e6eb3040a5211..5ddae84cae306 100644 --- a/clang/include/clang/Basic/DiagnosticParseKinds.td +++ b/clang/include/clang/Basic/DiagnosticParseKinds.td @@ -1133,8 +1133,6 @@ def err_opencl_logical_exclusive_or : Error< // OpenCL C++. def err_openclcxx_virtual_function : Error< "virtual functions are not supported in OpenCL C++">; -def err_openclcxx_reserved : Error< - "'%0' is a reserved keyword in OpenCL C++">; // OpenMP support. def warn_pragma_omp_ignored : Warning< @@ -1163,7 +1161,7 @@ def err_omp_decl_in_declare_simd : Error< def err_omp_unknown_map_type : Error< "incorrect map type, expected one of 'to', 'from', 'tofrom', 'alloc', 'release', or 'delete'">; def err_omp_unknown_map_type_modifier : Error< - "incorrect map type modifier, expected 'always' or 'close'">; + "incorrect map type modifier, expected 'always', 'close', or 'mapper'">; def err_omp_map_type_missing : Error< "missing map type">; def err_omp_map_type_modifier_missing : Error< @@ -1177,7 +1175,7 @@ def err_omp_declare_target_unexpected_clause: Error< def err_omp_expected_clause: Error< "expected at least one clause on '#pragma omp %0' directive">; def err_omp_mapper_illegal_identifier : Error< - "illegal identifier on 'omp declare mapper' directive">; + "illegal OpenMP user-defined mapper identifier">; def err_omp_mapper_expected_declarator : Error< "expected declarator on 'omp declare mapper' directive">; diff --git a/clang/include/clang/Basic/DiagnosticSemaKinds.td b/clang/include/clang/Basic/DiagnosticSemaKinds.td index 664d26e8a9cb6..49d476f16df68 100644 --- a/clang/include/clang/Basic/DiagnosticSemaKinds.td +++ b/clang/include/clang/Basic/DiagnosticSemaKinds.td @@ -123,6 +123,12 @@ def warn_double_const_requires_fp64 : Warning< def err_half_const_requires_fp16 : Error< "half precision constant requires cl_khr_fp16">; +// Intel FPGA extensions +def err_attribute_argument_not_power_of_two : Error< + "%0 attribute argument must be a constant power of two greater than zero">; +def err_intel_fpga_memory_arg_invalid : Error< + "%0 attribute requires either no argument or one of: %1">; + // C99 variable-length arrays def ext_vla : Extension<"variable length arrays are a C99 feature">, InGroup; @@ -609,6 +615,8 @@ def warn_cstruct_memaccess : Warning< InGroup; def note_nontrivial_field : Note< "field is non-trivial to %select{copy|default-initialize}0">; +def err_nontrivial_primitive_type_in_union : Error< + "non-trivial C types are disallowed in union">; def warn_dyn_class_memaccess : Warning< "%select{destination for|source of|first operand of|second operand of}0 this " "%1 call is a pointer to %select{|class containing a }2dynamic class %3; " @@ -2525,7 +2533,7 @@ def err_attribute_argument_n_type : Error< def err_attribute_argument_type : Error< "%0 attribute requires %select{int or bool|an integer " "constant|a string|an identifier}1">; -def err_attribute_argument_outof_range : Error< +def err_attribute_argument_out_of_range : Error< "%0 attribute requires integer constant between %1 and %2 inclusive">; def err_init_priority_object_attr : Error< "can only use 'init_priority' attribute on file-scope definitions " @@ -3021,7 +3029,7 @@ def warn_thread_attribute_decl_not_lockable : Warning< def warn_thread_attribute_decl_not_pointer : Warning< "%0 only applies to pointer types; type here is %1">, InGroup, DefaultIgnore; -def err_attribute_argument_out_of_range : Error< +def err_attribute_argument_out_of_bounds_extra_info : Error< "%0 attribute parameter %1 is out of bounds: " "%plural{0:no parameters to index into|" "1:can only be 1, since there is one parameter|" @@ -3479,6 +3487,9 @@ def warn_objc_secondary_init_missing_init_call : Warning< def warn_objc_implementation_missing_designated_init_override : Warning< "method override for the designated initializer of the superclass %objcinstance0 not found">, InGroup; +def err_designated_init_attr_non_init : Error< + "'objc_designated_initializer' attribute only applies to init methods " + "of interface or class extension declarations">; // objc_bridge attribute diagnostics. def err_objc_attr_not_id : Error< @@ -4818,6 +4829,8 @@ def ext_ms_forward_ref_enum : ExtWarn< def ext_forward_ref_enum_def : Extension< "redeclaration of already-defined enum %0 is a GNU extension">, InGroup; +def err_fortify_std_lib_bad_decl : Error< + "'fortify_stdlib' attribute applied to an unknown function">; def err_redefinition_of_enumerator : Error<"redefinition of enumerator %0">; def err_duplicate_member : Error<"duplicate member %0">; @@ -8699,6 +8712,11 @@ def err_opencl_builtin_expected_type : Error< def ext_opencl_ext_vector_type_rgba_selector: ExtWarn< "vector component name '%0' is an OpenCL version 2.2 feature">, InGroup; + +// MIG routine annotations. +def warn_mig_server_routine_does_not_return_kern_return_t : Warning< + "'mig_server_routine' attribute only applies to routines that return a kern_return_t">, + InGroup; } // end of sema category let CategoryName = "OpenMP Issue" in { @@ -8986,6 +9004,8 @@ def err_omp_declare_mapper_wrong_var : Error< "only variable %0 is allowed in map clauses of this 'omp declare mapper' directive">; def err_omp_declare_mapper_redefinition : Error< "redefinition of user-defined mapper for type %0 with name %1">; +def err_omp_invalid_mapper: Error< + "cannot find a valid user-defined mapper for type %0 with name %1">; def err_omp_array_section_use : Error<"OpenMP array section is not allowed here">; def err_omp_typecheck_section_value : Error< "subscripted value is not an array or pointer">; diff --git a/clang/include/clang/Basic/DiagnosticSerializationKinds.td b/clang/include/clang/Basic/DiagnosticSerializationKinds.td index 3c5a06acfd10a..43ba19b5853e2 100644 --- a/clang/include/clang/Basic/DiagnosticSerializationKinds.td +++ b/clang/include/clang/Basic/DiagnosticSerializationKinds.td @@ -72,6 +72,10 @@ def note_module_file_imported_by : Note< def err_module_file_not_module : Error< "AST file '%0' was not built as a module">, DefaultFatal; +def remark_module_import : Remark< + "importing module '%0'%select{| into '%3'}2 from '%1'">, + InGroup; + def err_imported_module_not_found : Error< "module '%0' in AST file '%1' (imported by AST file '%2') " "is not defined in any loaded module map file; " diff --git a/clang/include/clang/Basic/FileManager.h b/clang/include/clang/Basic/FileManager.h index 88c1467bbd554..6547f8a4c493a 100644 --- a/clang/include/clang/Basic/FileManager.h +++ b/clang/include/clang/Basic/FileManager.h @@ -67,7 +67,6 @@ class FileEntry { unsigned UID; // A unique (small) ID for the file. llvm::sys::fs::UniqueID UniqueID; bool IsNamedPipe; - bool InPCH; bool IsValid; // Is this \c FileEntry initialized and valid? /// The open file, if it is owned by the \p FileEntry. @@ -75,7 +74,7 @@ class FileEntry { public: FileEntry() - : UniqueID(0, 0), IsNamedPipe(false), InPCH(false), IsValid(false) + : UniqueID(0, 0), IsNamedPipe(false), IsValid(false) {} FileEntry(const FileEntry &) = delete; @@ -87,7 +86,6 @@ class FileEntry { off_t getSize() const { return Size; } unsigned getUID() const { return UID; } const llvm::sys::fs::UniqueID &getUniqueID() const { return UniqueID; } - bool isInPCH() const { return InPCH; } time_t getModificationTime() const { return ModTime; } /// Return the directory the file lives in. @@ -108,8 +106,6 @@ class FileEntry { bool isOpenForTests() const { return File != nullptr; } }; -struct FileData; - /// Implements support for file system lookup, file system caching, /// and directory search management. /// @@ -168,7 +164,7 @@ class FileManager : public RefCountedBase { // Caching. std::unique_ptr StatCache; - bool getStatValue(StringRef Path, FileData &Data, bool isFile, + bool getStatValue(StringRef Path, llvm::vfs::Status &Status, bool isFile, std::unique_ptr *F); /// Add all ancestors of the given path (pointing to either a file diff --git a/clang/include/clang/Basic/FileSystemStatCache.h b/clang/include/clang/Basic/FileSystemStatCache.h index 0ae6a9eb44fe9..3a49398e0fa90 100644 --- a/clang/include/clang/Basic/FileSystemStatCache.h +++ b/clang/include/clang/Basic/FileSystemStatCache.h @@ -19,40 +19,15 @@ #include "llvm/ADT/StringRef.h" #include "llvm/Support/Allocator.h" #include "llvm/Support/FileSystem.h" +#include "llvm/Support/VirtualFileSystem.h" #include #include #include #include #include -namespace llvm { - -namespace vfs { - -class File; -class FileSystem; - -} // namespace vfs -} // namespace llvm - namespace clang { -// FIXME: should probably replace this with vfs::Status -struct FileData { - std::string Name; - uint64_t Size = 0; - time_t ModTime = 0; - llvm::sys::fs::UniqueID UniqueID; - bool IsDirectory = false; - bool IsNamedPipe = false; - bool InPCH = false; - - // FIXME: remove this when files support multiple names - bool IsVFSMapped = false; - - FileData() = default; -}; - /// Abstract interface for introducing a FileManager cache for 'stat' /// system calls, which is used by precompiled and pretokenized headers to /// improve performance. @@ -80,7 +55,7 @@ class FileSystemStatCache { /// success for directories (not files). On a successful file lookup, the /// implementation can optionally fill in \p F with a valid \p File object and /// the client guarantees that it will close it. - static bool get(StringRef Path, FileData &Data, bool isFile, + static bool get(StringRef Path, llvm::vfs::Status &Status, bool isFile, std::unique_ptr *F, FileSystemStatCache *Cache, llvm::vfs::FileSystem &FS); @@ -88,7 +63,8 @@ class FileSystemStatCache { // FIXME: The pointer here is a non-owning/optional reference to the // unique_ptr. Optional&> might be nicer, but // Optional needs some work to support references so this isn't possible yet. - virtual LookupResult getStat(StringRef Path, FileData &Data, bool isFile, + virtual LookupResult getStat(StringRef Path, llvm::vfs::Status &Status, + bool isFile, std::unique_ptr *F, llvm::vfs::FileSystem &FS) = 0; }; @@ -99,15 +75,16 @@ class FileSystemStatCache { class MemorizeStatCalls : public FileSystemStatCache { public: /// The set of stat() calls that have been seen. - llvm::StringMap StatCalls; + llvm::StringMap StatCalls; using iterator = - llvm::StringMap::const_iterator; + llvm::StringMap::const_iterator; iterator begin() const { return StatCalls.begin(); } iterator end() const { return StatCalls.end(); } - LookupResult getStat(StringRef Path, FileData &Data, bool isFile, + LookupResult getStat(StringRef Path, llvm::vfs::Status &Status, bool isFile, std::unique_ptr *F, llvm::vfs::FileSystem &FS) override; }; diff --git a/clang/include/clang/Basic/FixedPoint.h b/clang/include/clang/Basic/FixedPoint.h index f68ed56884700..a931e21e18f17 100644 --- a/clang/include/clang/Basic/FixedPoint.h +++ b/clang/include/clang/Basic/FixedPoint.h @@ -141,6 +141,8 @@ class APFixedPoint { return APFixedPoint(Val << Amt, Sema); } + /// Return the integral part of this fixed point number, rounded towards + /// zero. (-2.5k -> -2) llvm::APSInt getIntPart() const { if (Val < 0 && Val != -Val) // Cover the case when we have the min val return -(-Val >> getScale()); @@ -148,6 +150,17 @@ class APFixedPoint { return Val >> getScale(); } + /// Return the integral part of this fixed point number, rounded towards + /// zero. The value is stored into an APSInt with the provided width and sign. + /// If the overflow parameter is provided, and the integral value is not able + /// to be fully stored in the provided width and sign, the overflow parameter + /// is set to true. + /// + /// If the overflow parameter is provided, set this value to true or false to + /// indicate if this operation results in an overflow. + llvm::APSInt convertToInt(unsigned DstWidth, bool DstSign, + bool *Overflow = nullptr) const; + void toString(llvm::SmallVectorImpl &Str) const; std::string toString() const { llvm::SmallString<40> S; @@ -175,6 +188,14 @@ class APFixedPoint { static APFixedPoint getMax(const FixedPointSemantics &Sema); static APFixedPoint getMin(const FixedPointSemantics &Sema); + /// Create an APFixedPoint with a value equal to that of the provided integer, + /// and in the same semantics as the provided target semantics. If the value + /// is not able to fit in the specified fixed point semantics, and the + /// overflow parameter is provided, it is set to true. + static APFixedPoint getFromIntValue(const llvm::APSInt &Value, + const FixedPointSemantics &DstFXSema, + bool *Overflow = nullptr); + private: llvm::APSInt Val; FixedPointSemantics Sema; diff --git a/clang/include/clang/Basic/LangOptions.def b/clang/include/clang/Basic/LangOptions.def index 5862c3bf5c6ca..fbc541668c01c 100644 --- a/clang/include/clang/Basic/LangOptions.def +++ b/clang/include/clang/Basic/LangOptions.def @@ -136,7 +136,7 @@ LANGOPT(Freestanding, 1, 0, "freestanding implementation") LANGOPT(NoBuiltin , 1, 0, "disable builtin functions") LANGOPT(NoMathBuiltin , 1, 0, "disable math builtin functions") LANGOPT(GNUAsm , 1, 1, "GNU-style inline assembly") -LANGOPT(CoroutinesTS , 1, 0, "C++ coroutines TS") +LANGOPT(Coroutines , 1, 0, "C++20 coroutines") LANGOPT(DllExportInlines , 1, 1, "dllexported classes dllexport inline methods") LANGOPT(RelaxedTemplateTemplateArgs, 1, 0, "C++17 relaxed matching of template template arguments") @@ -170,6 +170,8 @@ VALUE_LANGOPT(MaxTypeAlign , 32, 0, VALUE_LANGOPT(AlignDouble , 1, 0, "Controls if doubles should be aligned to 8 bytes (x86 only)") COMPATIBLE_VALUE_LANGOPT(PICLevel , 2, 0, "__PIC__ level") COMPATIBLE_VALUE_LANGOPT(PIE , 1, 0, "is pie") +LANGOPT(ROPI , 1, 0, "Read-only position independence") +LANGOPT(RWPI , 1, 0, "Read-write position independence") COMPATIBLE_LANGOPT(GNUInline , 1, 0, "GNU inline semantics") COMPATIBLE_LANGOPT(NoInlineDefine , 1, 0, "__NO_INLINE__ predefined macro") COMPATIBLE_LANGOPT(Deprecated , 1, 0, "__DEPRECATED predefined macro") @@ -203,9 +205,9 @@ LANGOPT(OpenMPUseTLS , 1, 0, "Use TLS for threadprivates or runtime calls") LANGOPT(OpenMPIsDevice , 1, 0, "Generate code only for OpenMP target device") LANGOPT(OpenMPCUDAMode , 1, 0, "Generate code for OpenMP pragmas in SIMT/SPMD mode") LANGOPT(OpenMPCUDAForceFullRuntime , 1, 0, "Force to use full runtime in all constructs when offloading to CUDA devices") -LANGOPT(OpenMPHostCXXExceptions , 1, 0, "C++ exceptions handling in the host code.") LANGOPT(OpenMPCUDANumSMs , 32, 0, "Number of SMs for CUDA devices.") LANGOPT(OpenMPCUDABlocksPerSM , 32, 0, "Number of blocks per SM for CUDA devices.") +LANGOPT(OpenMPCUDAReductionBufNum , 32, 1024, "Number of the reduction records in the intermediate reduction buffer used for the teams reductions.") LANGOPT(OpenMPOptimisticCollapse , 1, 0, "Use at most 32 bits to represent the collapsed loop nest counter.") LANGOPT(RenderScript , 1, 0, "RenderScript") @@ -215,8 +217,9 @@ LANGOPT(CUDAHostDeviceConstexpr, 1, 1, "treating unattributed constexpr function LANGOPT(CUDADeviceApproxTranscendentals, 1, 0, "using approximate transcendental functions") LANGOPT(GPURelocatableDeviceCode, 1, 0, "generate relocatable device code") -LANGOPT(SYCL , 1, 0, "Generate code for SYCL device") -LANGOPT(SYCLUseBitcode , 1, 0, "Generate bitcode for SYCL") +LANGOPT(SYCLIsDevice , 1, 0, "Generate code for SYCL device") +LANGOPT(SYCLAllowFuncPtr , 1, 0, "Allow function pointers in SYCL device code") + LANGOPT(SizedDeallocation , 1, 0, "sized deallocation") LANGOPT(AlignedAllocation , 1, 0, "aligned allocation") LANGOPT(AlignedAllocationUnavailable, 1, 0, "aligned allocation functions are unavailable") diff --git a/clang/include/clang/Basic/LangOptions.h b/clang/include/clang/Basic/LangOptions.h index becbccae51201..f3014afb4a06e 100644 --- a/clang/include/clang/Basic/LangOptions.h +++ b/clang/include/clang/Basic/LangOptions.h @@ -215,7 +215,7 @@ class LangOptions : public LangOptionsBase { /// If none is specified, abort (GCC-compatible behaviour). std::string OverflowHandler; - /// The module currently being compiled as speficied by -fmodule-name. + /// The module currently being compiled as specified by -fmodule-name. std::string ModuleName; /// The name of the current module, of which the main source file diff --git a/clang/include/clang/Basic/ObjCRuntime.h b/clang/include/clang/Basic/ObjCRuntime.h index 921df689e4971..fc87f20d562d4 100644 --- a/clang/include/clang/Basic/ObjCRuntime.h +++ b/clang/include/clang/Basic/ObjCRuntime.h @@ -246,6 +246,22 @@ class ObjCRuntime { llvm_unreachable("bad kind"); } + /// Does this runtime provide the objc_alloc_init entrypoint? This can apply + /// the same optimization as objc_alloc, but also sends an -init message, + /// reducing code size on the caller. + bool shouldUseRuntimeFunctionForCombinedAllocInit() const { + switch (getKind()) { + case MacOSX: + return getVersion() >= VersionTuple(10, 14, 4); + case iOS: + return getVersion() >= VersionTuple(12, 2); + case WatchOS: + return getVersion() >= VersionTuple(5, 2); + default: + return false; + } + } + /// Does this runtime supports optimized setter entrypoints? bool hasOptimizedSetter() const { switch (getKind()) { diff --git a/clang/include/clang/Basic/OpenCLOptions.h b/clang/include/clang/Basic/OpenCLOptions.h index 7397efeb8aee3..47310da1d6d95 100644 --- a/clang/include/clang/Basic/OpenCLOptions.h +++ b/clang/include/clang/Basic/OpenCLOptions.h @@ -14,6 +14,7 @@ #ifndef LLVM_CLANG_BASIC_OPENCLOPTIONS_H #define LLVM_CLANG_BASIC_OPENCLOPTIONS_H +#include "clang/Basic/LangOptions.h" #include "llvm/ADT/StringMap.h" namespace clang { @@ -41,25 +42,29 @@ class OpenCLOptions { // Is supported as either an extension or an (optional) core feature for // OpenCL version \p CLVer. - bool isSupported(llvm::StringRef Ext, unsigned CLVer) const { + bool isSupported(llvm::StringRef Ext, LangOptions LO) const { + // In C++ mode all extensions should work at least as in v2.0. + auto CLVer = LO.OpenCLCPlusPlus ? 200 : LO.OpenCLVersion; auto I = OptMap.find(Ext)->getValue(); return I.Supported && I.Avail <= CLVer; } // Is supported (optional) OpenCL core features for OpenCL version \p CLVer. // For supported extension, return false. - bool isSupportedCore(llvm::StringRef Ext, unsigned CLVer) const { + bool isSupportedCore(llvm::StringRef Ext, LangOptions LO) const { + // In C++ mode all extensions should work at least as in v2.0. + auto CLVer = LO.OpenCLCPlusPlus ? 200 : LO.OpenCLVersion; auto I = OptMap.find(Ext)->getValue(); - return I.Supported && I.Avail <= CLVer && - I.Core != ~0U && CLVer >= I.Core; + return I.Supported && I.Avail <= CLVer && I.Core != ~0U && CLVer >= I.Core; } // Is supported OpenCL extension for OpenCL version \p CLVer. // For supported (optional) core feature, return false. - bool isSupportedExtension(llvm::StringRef Ext, unsigned CLVer) const { + bool isSupportedExtension(llvm::StringRef Ext, LangOptions LO) const { + // In C++ mode all extensions should work at least as in v2.0. + auto CLVer = LO.OpenCLCPlusPlus ? 200 : LO.OpenCLVersion; auto I = OptMap.find(Ext)->getValue(); - return I.Supported && I.Avail <= CLVer && - (I.Core == ~0U || CLVer < I.Core); + return I.Supported && I.Avail <= CLVer && (I.Core == ~0U || CLVer < I.Core); } void enable(llvm::StringRef Ext, bool V = true) { @@ -121,10 +126,10 @@ class OpenCLOptions { I->second.Enabled = false; } - void enableSupportedCore(unsigned CLVer) { - for (llvm::StringMap::iterator I = OptMap.begin(), - E = OptMap.end(); I != E; ++I) - if (isSupportedCore(I->getKey(), CLVer)) + void enableSupportedCore(LangOptions LO) { + for (llvm::StringMap::iterator I = OptMap.begin(), E = OptMap.end(); + I != E; ++I) + if (isSupportedCore(I->getKey(), LO)) I->second.Enabled = true; } @@ -132,6 +137,6 @@ class OpenCLOptions { friend class ASTReader; }; -} // end namespace clang +} // end namespace clang #endif diff --git a/clang/include/clang/Basic/OpenMPKinds.def b/clang/include/clang/Basic/OpenMPKinds.def index ecb2c8d1b1983..b8de5df02ca5c 100644 --- a/clang/include/clang/Basic/OpenMPKinds.def +++ b/clang/include/clang/Basic/OpenMPKinds.def @@ -122,6 +122,12 @@ #ifndef OPENMP_MAP_MODIFIER_KIND #define OPENMP_MAP_MODIFIER_KIND(Name) #endif +#ifndef OPENMP_TO_MODIFIER_KIND +#define OPENMP_TO_MODIFIER_KIND(Name) +#endif +#ifndef OPENMP_FROM_MODIFIER_KIND +#define OPENMP_FROM_MODIFIER_KIND(Name) +#endif #ifndef OPENMP_DIST_SCHEDULE_KIND #define OPENMP_DIST_SCHEDULE_KIND(Name) #endif @@ -576,6 +582,13 @@ OPENMP_MAP_KIND(release) // Map-type-modifiers for 'map' clause. OPENMP_MAP_MODIFIER_KIND(always) OPENMP_MAP_MODIFIER_KIND(close) +OPENMP_MAP_MODIFIER_KIND(mapper) + +// Modifiers for 'to' clause. +OPENMP_TO_MODIFIER_KIND(mapper) + +// Modifiers for 'from' clause. +OPENMP_FROM_MODIFIER_KIND(mapper) // Clauses allowed for OpenMP directive 'taskloop'. OPENMP_TASKLOOP_CLAUSE(if) @@ -933,6 +946,8 @@ OPENMP_DECLARE_MAPPER_CLAUSE(map) #undef OPENMP_FOR_SIMD_CLAUSE #undef OPENMP_MAP_KIND #undef OPENMP_MAP_MODIFIER_KIND +#undef OPENMP_TO_MODIFIER_KIND +#undef OPENMP_FROM_MODIFIER_KIND #undef OPENMP_DISTRIBUTE_CLAUSE #undef OPENMP_DIST_SCHEDULE_KIND #undef OPENMP_DEFAULTMAP_KIND diff --git a/clang/include/clang/Basic/OpenMPKinds.h b/clang/include/clang/Basic/OpenMPKinds.h index 17e66a5314f04..01bd860f19cac 100644 --- a/clang/include/clang/Basic/OpenMPKinds.h +++ b/clang/include/clang/Basic/OpenMPKinds.h @@ -105,6 +105,22 @@ enum OpenMPMapModifierKind { OMPC_MAP_MODIFIER_last }; +/// OpenMP modifier kind for 'to' clause. +enum OpenMPToModifierKind { +#define OPENMP_TO_MODIFIER_KIND(Name) \ + OMPC_TO_MODIFIER_##Name, +#include "clang/Basic/OpenMPKinds.def" + OMPC_TO_MODIFIER_unknown +}; + +/// OpenMP modifier kind for 'from' clause. +enum OpenMPFromModifierKind { +#define OPENMP_FROM_MODIFIER_KIND(Name) \ + OMPC_FROM_MODIFIER_##Name, +#include "clang/Basic/OpenMPKinds.def" + OMPC_FROM_MODIFIER_unknown +}; + /// OpenMP attributes for 'dist_schedule' clause. enum OpenMPDistScheduleClauseKind { #define OPENMP_DIST_SCHEDULE_KIND(Name) OMPC_DIST_SCHEDULE_##Name, diff --git a/clang/include/clang/Basic/Sanitizers.def b/clang/include/clang/Basic/Sanitizers.def index 34bd6fc5f02a7..98e9aaa5b8b06 100644 --- a/clang/include/clang/Basic/Sanitizers.def +++ b/clang/include/clang/Basic/Sanitizers.def @@ -177,7 +177,7 @@ SANITIZER("scudo", Scudo) // Magic group, containing all sanitizers. For example, "-fno-sanitize=all" // can be used to disable all the sanitizers. -SANITIZER_GROUP("all", All, ~0ULL) +SANITIZER_GROUP("all", All, ~SanitizerMask()) #undef SANITIZER #undef SANITIZER_GROUP diff --git a/clang/include/clang/Basic/Sanitizers.h b/clang/include/clang/Basic/Sanitizers.h index f2cfadbee0491..d0f48b703266b 100644 --- a/clang/include/clang/Basic/Sanitizers.h +++ b/clang/include/clang/Basic/Sanitizers.h @@ -20,45 +20,146 @@ #include #include +namespace llvm { +class hash_code; +} + namespace clang { -using SanitizerMask = uint64_t; +class SanitizerMask { + // NOTE: this class assumes kNumElem == 2 in most of the constexpr functions, + // in order to work within the C++11 constexpr function constraints. If you + // change kNumElem, you'll need to update those member functions as well. -namespace SanitizerKind { + /// Number of array elements. + static constexpr unsigned kNumElem = 2; + /// Mask value initialized to 0. + uint64_t maskLoToHigh[kNumElem]{}; + /// Number of bits in a mask. + static constexpr unsigned kNumBits = sizeof(decltype(maskLoToHigh)) * 8; + /// Number of bits in a mask element. + static constexpr unsigned kNumBitElem = sizeof(decltype(maskLoToHigh[0])) * 8; -// Assign ordinals to possible values of -fsanitize= flag, which we will use as -// bit positions. -enum SanitizerOrdinal : uint64_t { -#define SANITIZER(NAME, ID) SO_##ID, -#define SANITIZER_GROUP(NAME, ID, ALIAS) SO_##ID##Group, -#include "clang/Basic/Sanitizers.def" - SO_Count + constexpr SanitizerMask(uint64_t mask1, uint64_t mask2) + : maskLoToHigh{mask1, mask2} {} + +public: + SanitizerMask() = default; + + static constexpr bool checkBitPos(const unsigned Pos) { + return Pos < kNumBits; + } + + /// Create a mask with a bit enabled at position Pos. + static constexpr SanitizerMask bitPosToMask(const unsigned Pos) { + return SanitizerMask((Pos < kNumBitElem) ? 1ULL << Pos % kNumBitElem : 0, + (Pos >= kNumBitElem && Pos < kNumBitElem * 2) + ? 1ULL << Pos % kNumBitElem + : 0); + } + + unsigned countPopulation() const { + unsigned total = 0; + for (const auto &Val : maskLoToHigh) + total += llvm::countPopulation(Val); + return total; + } + + void flipAllBits() { + for (auto &Val : maskLoToHigh) + Val = ~Val; + } + + bool isPowerOf2() const { + return countPopulation() == 1; + } + + llvm::hash_code hash_value() const; + + constexpr explicit operator bool() const { + return maskLoToHigh[0] || maskLoToHigh[1]; + } + + constexpr bool operator==(const SanitizerMask &V) const { + return maskLoToHigh[0] == V.maskLoToHigh[0] && + maskLoToHigh[1] == V.maskLoToHigh[1]; + } + + SanitizerMask &operator&=(const SanitizerMask &RHS) { + for (unsigned k = 0; k < kNumElem; k++) + maskLoToHigh[k] &= RHS.maskLoToHigh[k]; + return *this; + } + + SanitizerMask &operator|=(const SanitizerMask &RHS) { + for (unsigned k = 0; k < kNumElem; k++) + maskLoToHigh[k] |= RHS.maskLoToHigh[k]; + return *this; + } + + constexpr bool operator!() const { return !bool(*this); } + + constexpr bool operator!=(const SanitizerMask &RHS) const { + return !((*this) == RHS); + } + + friend constexpr inline SanitizerMask operator~(SanitizerMask v) { + return SanitizerMask(~v.maskLoToHigh[0], ~v.maskLoToHigh[1]); + } + + friend constexpr inline SanitizerMask operator&(SanitizerMask a, + const SanitizerMask &b) { + return SanitizerMask(a.maskLoToHigh[0] & b.maskLoToHigh[0], + a.maskLoToHigh[1] & b.maskLoToHigh[1]); + } + + friend constexpr inline SanitizerMask operator|(SanitizerMask a, + const SanitizerMask &b) { + return SanitizerMask(a.maskLoToHigh[0] | b.maskLoToHigh[0], + a.maskLoToHigh[1] | b.maskLoToHigh[1]); + } }; +// Declaring in clang namespace so that it can be found by ADL. +llvm::hash_code hash_value(const clang::SanitizerMask &Arg); + // Define the set of sanitizer kinds, as well as the set of sanitizers each // sanitizer group expands into. -#define SANITIZER(NAME, ID) \ - const SanitizerMask ID = 1ULL << SO_##ID; -#define SANITIZER_GROUP(NAME, ID, ALIAS) \ - const SanitizerMask ID = ALIAS; \ - const SanitizerMask ID##Group = 1ULL << SO_##ID##Group; +struct SanitizerKind { + // Assign ordinals to possible values of -fsanitize= flag, which we will use + // as bit positions. + enum SanitizerOrdinal : uint64_t { +#define SANITIZER(NAME, ID) SO_##ID, +#define SANITIZER_GROUP(NAME, ID, ALIAS) SO_##ID##Group, #include "clang/Basic/Sanitizers.def" - -} // namespace SanitizerKind + SO_Count + }; + +#define SANITIZER(NAME, ID) \ + static constexpr SanitizerMask ID = SanitizerMask::bitPosToMask(SO_##ID); \ + static_assert(SanitizerMask::checkBitPos(SO_##ID), "Bit position too big."); +#define SANITIZER_GROUP(NAME, ID, ALIAS) \ + static constexpr SanitizerMask ID = SanitizerMask(ALIAS); \ + static constexpr SanitizerMask ID##Group = \ + SanitizerMask::bitPosToMask(SO_##ID##Group); \ + static_assert(SanitizerMask::checkBitPos(SO_##ID##Group), \ + "Bit position too big."); +#include "clang/Basic/Sanitizers.def" +}; // SanitizerKind struct SanitizerSet { /// Check if a certain (single) sanitizer is enabled. bool has(SanitizerMask K) const { - assert(llvm::isPowerOf2_64(K)); - return Mask & K; + assert(K.isPowerOf2() && "Has to be a single sanitizer."); + return static_cast(Mask & K); } /// Check if one or more sanitizers are enabled. - bool hasOneOf(SanitizerMask K) const { return Mask & K; } + bool hasOneOf(SanitizerMask K) const { return static_cast(Mask & K); } /// Enable or disable a certain (single) sanitizer. void set(SanitizerMask K, bool Value) { - assert(llvm::isPowerOf2_64(K)); + assert(K.isPowerOf2() && "Has to be a single sanitizer."); Mask = Value ? (Mask | K) : (Mask & ~K); } @@ -66,10 +167,10 @@ struct SanitizerSet { void clear(SanitizerMask K = SanitizerKind::All) { Mask &= ~K; } /// Returns true if no sanitizers are enabled. - bool empty() const { return Mask == 0; } + bool empty() const { return !Mask; } /// Bitmask of enabled sanitizers. - SanitizerMask Mask = 0; + SanitizerMask Mask; }; /// Parse a single value from a -fsanitize= or -fno-sanitize= value list. diff --git a/clang/include/clang/Basic/SourceManager.h b/clang/include/clang/Basic/SourceManager.h index b45357e6452ab..2bdf1d5e39f96 100644 --- a/clang/include/clang/Basic/SourceManager.h +++ b/clang/include/clang/Basic/SourceManager.h @@ -1458,17 +1458,15 @@ class SourceManager : public RefCountedBase { /// Returns whether \p Loc is expanded from a macro in a system header. bool isInSystemMacro(SourceLocation loc) const { - if(!loc.isMacroID()) + if (!loc.isMacroID()) return false; // This happens when the macro is the result of a paste, in that case // its spelling is the scratch memory, so we take the parent context. - if (isWrittenInScratchSpace(getSpellingLoc(loc))) { + if (isWrittenInScratchSpace(getSpellingLoc(loc))) return isInSystemHeader(getSpellingLoc(getImmediateMacroCallerLoc(loc))); - } - else { - return isInSystemHeader(getSpellingLoc(loc)); - } + + return isInSystemHeader(getSpellingLoc(loc)); } /// The size of the SLocEntry that \p FID represents. diff --git a/clang/include/clang/Basic/StmtNodes.td b/clang/include/clang/Basic/StmtNodes.td index 9054fb11a6ff5..2dbbee7bbfcbb 100644 --- a/clang/include/clang/Basic/StmtNodes.td +++ b/clang/include/clang/Basic/StmtNodes.td @@ -11,8 +11,6 @@ class DStmt : Stmt { // Statements def NullStmt : Stmt; def CompoundStmt : Stmt; -def LabelStmt : Stmt; -def AttributedStmt : Stmt; def IfStmt : Stmt; def SwitchStmt : Stmt; def WhileStmt : Stmt; @@ -29,6 +27,12 @@ def CaseStmt : DStmt; def DefaultStmt : DStmt; def CapturedStmt : Stmt; +// Statements that might produce a value (for example, as the last non-null +// statement in a GNU statement-expression). +def ValueStmt : Stmt<1>; +def LabelStmt : DStmt; +def AttributedStmt : DStmt; + // Asm statements def AsmStmt : Stmt<1>; def GCCAsmStmt : DStmt; @@ -53,7 +57,7 @@ def CoroutineBodyStmt : Stmt; def CoreturnStmt : Stmt; // Expressions -def Expr : Stmt<1>; +def Expr : DStmt; def PredefinedExpr : DStmt; def DeclRefExpr : DStmt; def IntegerLiteral : DStmt; diff --git a/clang/include/clang/Basic/TargetInfo.h b/clang/include/clang/Basic/TargetInfo.h index 7a3dc3f60c128..7b9f9d9565d06 100644 --- a/clang/include/clang/Basic/TargetInfo.h +++ b/clang/include/clang/Basic/TargetInfo.h @@ -816,6 +816,7 @@ class TargetInfo : public virtual TransferrableTargetInfo, struct { int Min; int Max; + bool isConstrained; } ImmRange; llvm::SmallSet ImmSet; @@ -826,6 +827,7 @@ class TargetInfo : public virtual TransferrableTargetInfo, : Flags(0), TiedOperand(-1), ConstraintStr(ConstraintStr.str()), Name(Name.str()) { ImmRange.Min = ImmRange.Max = 0; + ImmRange.isConstrained = false; } const std::string &getConstraintStr() const { return ConstraintStr; } @@ -854,8 +856,11 @@ class TargetInfo : public virtual TransferrableTargetInfo, return (Flags & CI_ImmediateConstant) != 0; } bool isValidAsmImmediate(const llvm::APInt &Value) const { - return (Value.sge(ImmRange.Min) && Value.sle(ImmRange.Max)) || - ImmSet.count(Value.getZExtValue()) != 0; + if (!ImmSet.empty()) + return Value.isSignedIntN(32) && + ImmSet.count(Value.getZExtValue()) != 0; + return !ImmRange.isConstrained || + (Value.sge(ImmRange.Min) && Value.sle(ImmRange.Max)); } void setIsReadWrite() { Flags |= CI_ReadWrite; } @@ -867,6 +872,7 @@ class TargetInfo : public virtual TransferrableTargetInfo, Flags |= CI_ImmediateConstant; ImmRange.Min = Min; ImmRange.Max = Max; + ImmRange.isConstrained = true; } void setRequiresImmediate(llvm::ArrayRef Exacts) { Flags |= CI_ImmediateConstant; @@ -879,8 +885,6 @@ class TargetInfo : public virtual TransferrableTargetInfo, } void setRequiresImmediate() { Flags |= CI_ImmediateConstant; - ImmRange.Min = INT_MIN; - ImmRange.Max = INT_MAX; } /// Indicate that this is an input operand that is tied to diff --git a/clang/include/clang/Basic/TokenKinds.def b/clang/include/clang/Basic/TokenKinds.def index 580bb9350f72a..90a70bc10d633 100644 --- a/clang/include/clang/Basic/TokenKinds.def +++ b/clang/include/clang/Basic/TokenKinds.def @@ -32,6 +32,9 @@ #ifndef CONCEPTS_KEYWORD #define CONCEPTS_KEYWORD(X) CXX2A_KEYWORD(X,KEYCONCEPTS) #endif +#ifndef COROUTINES_KEYWORD +#define COROUTINES_KEYWORD(X) CXX2A_KEYWORD(X,KEYCOROUTINES) +#endif #ifndef MODULES_KEYWORD #define MODULES_KEYWORD(X) KEYWORD(X,KEYMODULES) #endif @@ -243,6 +246,7 @@ PUNCTUATOR(caretcaret, "^^") // are enabled. // KEYGNU - This is a keyword if GNU extensions are enabled // KEYMS - This is a keyword if Microsoft extensions are enabled +// KEYMSCOMPAT - This is a keyword if Microsoft compatibility mode is enabled // KEYNOMS18 - This is a keyword that must never be enabled under // MSVC <= v18. // KEYOPENCLC - This is a keyword in OpenCL C @@ -254,8 +258,7 @@ PUNCTUATOR(caretcaret, "^^") // KEYZVECTOR - This is a keyword for the System z vector extensions, // which are heavily based on AltiVec // KEYBORLAND - This is a keyword if Borland extensions are enabled -// KEYCOROUTINES - This is a keyword if support for the C++ coroutines -// TS is enabled +// KEYCOROUTINES - This is a keyword if support for C++ coroutines is enabled // BOOLSUPPORT - This is a keyword if 'bool' is a built-in type // HALFSUPPORT - This is a keyword if 'half' is a built-in type // WCHARSUPPORT - This is a keyword if 'wchar_t' is a built-in type @@ -364,24 +367,24 @@ CXX11_KEYWORD(constexpr , 0) CXX11_KEYWORD(decltype , 0) CXX11_KEYWORD(noexcept , 0) CXX11_KEYWORD(nullptr , 0) -CXX11_KEYWORD(static_assert , 0) +CXX11_KEYWORD(static_assert , KEYMSCOMPAT) CXX11_KEYWORD(thread_local , 0) // C++2a / concepts TS keywords CONCEPTS_KEYWORD(concept) CONCEPTS_KEYWORD(requires) -// C++ coroutines TS keywords -KEYWORD(co_await , KEYCOROUTINES) -KEYWORD(co_return , KEYCOROUTINES) -KEYWORD(co_yield , KEYCOROUTINES) +// C++2a / coroutines TS keywords +COROUTINES_KEYWORD(co_await) +COROUTINES_KEYWORD(co_return) +COROUTINES_KEYWORD(co_yield) // C++ modules TS keywords MODULES_KEYWORD(module) MODULES_KEYWORD(import) // C++ char8_t proposal -KEYWORD(char8_t , CHAR8SUPPORT) +CXX2A_KEYWORD(char8_t , CHAR8SUPPORT) // C11 Extension KEYWORD(_Float16 , KEYALL) @@ -551,9 +554,9 @@ ALIAS("read_only", __read_only , KEYOPENCLC | KEYOPENCLCXX) ALIAS("write_only", __write_only , KEYOPENCLC | KEYOPENCLCXX) ALIAS("read_write", __read_write , KEYOPENCLC | KEYOPENCLCXX) // OpenCL builtins -KEYWORD(__builtin_astype , KEYOPENCLC) +KEYWORD(__builtin_astype , KEYOPENCLC | KEYOPENCLCXX) KEYWORD(vec_step , KEYOPENCLC | KEYALTIVEC | KEYZVECTOR) -#define GENERIC_IMAGE_TYPE(ImgType, Id) KEYWORD(ImgType##_t, KEYOPENCLC) +#define GENERIC_IMAGE_TYPE(ImgType, Id) KEYWORD(ImgType##_t, KEYOPENCLC | KEYOPENCLCXX) #include "clang/Basic/OpenCLImageTypes.def" // OpenMP Type Traits diff --git a/clang/include/clang/Basic/X86Target.def b/clang/include/clang/Basic/X86Target.def index c6719ff2aff0f..5776f6484c955 100644 --- a/clang/include/clang/Basic/X86Target.def +++ b/clang/include/clang/Basic/X86Target.def @@ -236,6 +236,7 @@ PROC_WITH_FEAT(BDVER4, "bdver4", PROC_64_BIT, FEATURE_AVX2) /// Zen architecture processors. //@{ PROC_WITH_FEAT(ZNVER1, "znver1", PROC_64_BIT, FEATURE_AVX2) +PROC_WITH_FEAT(ZNVER2, "znver2", PROC_64_BIT, FEATURE_AVX2) //@} /// This specification is deprecated and will be removed in the future. diff --git a/clang/include/clang/Basic/arm_neon.td b/clang/include/clang/Basic/arm_neon.td index 39607f96ac8fc..626db9ae39fe2 100644 --- a/clang/include/clang/Basic/arm_neon.td +++ b/clang/include/clang/Basic/arm_neon.td @@ -1651,18 +1651,18 @@ let ArchGuard = "defined(__ARM_FEATURE_DOTPROD) && defined(__aarch64__)" in { // v8.2-A FP16 fused multiply-add long instructions. let ArchGuard = "defined(__ARM_FEATURE_FP16FML) && defined(__aarch64__)" in { - def VFMLAL_LOW : SInst<"vfmlal_low", "ffHH", "UiQUi">; - def VFMLSL_LOW : SInst<"vfmlsl_low", "ffHH", "UiQUi">; - def VFMLAL_HIGH : SInst<"vfmlal_high", "ffHH", "UiQUi">; - def VFMLSL_HIGH : SInst<"vfmlsl_high", "ffHH", "UiQUi">; - - def VFMLAL_LANE_LOW : SOpInst<"vfmlal_lane_low", "ffH0i", "UiQUi", OP_FMLAL_LN>; - def VFMLSL_LANE_LOW : SOpInst<"vfmlsl_lane_low", "ffH0i", "UiQUi", OP_FMLSL_LN>; - def VFMLAL_LANE_HIGH : SOpInst<"vfmlal_lane_high", "ffH0i", "UiQUi", OP_FMLAL_LN_Hi>; - def VFMLSL_LANE_HIGH : SOpInst<"vfmlsl_lane_high", "ffH0i", "UiQUi", OP_FMLSL_LN_Hi>; - - def VFMLAL_LANEQ_LOW : SOpInst<"vfmlal_laneq_low", "ffH1i", "UiQUi", OP_FMLAL_LN>; - def VFMLSL_LANEQ_LOW : SOpInst<"vfmlsl_laneq_low", "ffH1i", "UiQUi", OP_FMLSL_LN>; - def VFMLAL_LANEQ_HIGH : SOpInst<"vfmlal_laneq_high", "ffH1i", "UiQUi", OP_FMLAL_LN_Hi>; - def VFMLSL_LANEQ_HIGH : SOpInst<"vfmlsl_laneq_high", "ffH1i", "UiQUi", OP_FMLSL_LN_Hi>; + def VFMLAL_LOW : SInst<"vfmlal_low", "ffHH", "hQh">; + def VFMLSL_LOW : SInst<"vfmlsl_low", "ffHH", "hQh">; + def VFMLAL_HIGH : SInst<"vfmlal_high", "ffHH", "hQh">; + def VFMLSL_HIGH : SInst<"vfmlsl_high", "ffHH", "hQh">; + + def VFMLAL_LANE_LOW : SOpInst<"vfmlal_lane_low", "ffH0i", "hQh", OP_FMLAL_LN>; + def VFMLSL_LANE_LOW : SOpInst<"vfmlsl_lane_low", "ffH0i", "hQh", OP_FMLSL_LN>; + def VFMLAL_LANE_HIGH : SOpInst<"vfmlal_lane_high", "ffH0i", "hQh", OP_FMLAL_LN_Hi>; + def VFMLSL_LANE_HIGH : SOpInst<"vfmlsl_lane_high", "ffH0i", "hQh", OP_FMLSL_LN_Hi>; + + def VFMLAL_LANEQ_LOW : SOpInst<"vfmlal_laneq_low", "ffH1i", "hQh", OP_FMLAL_LN>; + def VFMLSL_LANEQ_LOW : SOpInst<"vfmlsl_laneq_low", "ffH1i", "hQh", OP_FMLSL_LN>; + def VFMLAL_LANEQ_HIGH : SOpInst<"vfmlal_laneq_high", "ffH1i", "hQh", OP_FMLAL_LN_Hi>; + def VFMLSL_LANEQ_HIGH : SOpInst<"vfmlsl_laneq_high", "ffH1i", "hQh", OP_FMLSL_LN_Hi>; } diff --git a/clang/include/clang/CodeGen/BackendUtil.h b/clang/include/clang/CodeGen/BackendUtil.h index afda09cb6793c..01b1f5bbd6ee1 100644 --- a/clang/include/clang/CodeGen/BackendUtil.h +++ b/clang/include/clang/CodeGen/BackendUtil.h @@ -30,7 +30,6 @@ namespace clang { enum BackendAction { Backend_EmitAssembly, ///< Emit native assembly files Backend_EmitBC, ///< Emit LLVM bitcode files - Backend_EmitSPIRV, ///< Emit SPIR-V bitcode files Backend_EmitLL, ///< Emit human-readable LLVM assembly Backend_EmitNothing, ///< Don't emit anything (benchmarking mode) Backend_EmitMCNull, ///< Run CodeGen, but don't emit anything diff --git a/clang/include/clang/CodeGen/CodeGenAction.h b/clang/include/clang/CodeGen/CodeGenAction.h index ef0b65131fa9e..1db904ea974c3 100644 --- a/clang/include/clang/CodeGen/CodeGenAction.h +++ b/clang/include/clang/CodeGen/CodeGenAction.h @@ -92,12 +92,6 @@ class EmitBCAction : public CodeGenAction { EmitBCAction(llvm::LLVMContext *_VMContext = nullptr); }; -class EmitSPIRVAction : public CodeGenAction { - virtual void anchor(); -public: - EmitSPIRVAction(llvm::LLVMContext *_VMContext = nullptr); -}; - class EmitLLVMAction : public CodeGenAction { virtual void anchor(); public: diff --git a/clang/include/clang/CrossTU/CrossTranslationUnit.h b/clang/include/clang/CrossTU/CrossTranslationUnit.h index 507cf2889d3a3..bbbba7ad7b447 100644 --- a/clang/include/clang/CrossTU/CrossTranslationUnit.h +++ b/clang/include/clang/CrossTU/CrossTranslationUnit.h @@ -43,7 +43,8 @@ enum class index_error_code { failed_to_get_external_ast, failed_to_generate_usr, triple_mismatch, - lang_mismatch + lang_mismatch, + lang_dialect_mismatch }; class IndexError : public llvm::ErrorInfo { diff --git a/clang/include/clang/Driver/Action.h b/clang/include/clang/Driver/Action.h index 027d80f6d8939..df82e4c0ec450 100644 --- a/clang/include/clang/Driver/Action.h +++ b/clang/include/clang/Driver/Action.h @@ -72,9 +72,10 @@ class Action { OffloadBundlingJobClass, OffloadUnbundlingJobClass, OffloadWrappingJobClass, + SPIRVTranslatorJobClass, JobClassFirst = PreprocessJobClass, - JobClassLast = OffloadWrappingJobClass + JobClassLast = SPIRVTranslatorJobClass }; // The offloading kind determines if this action is binded to a particular @@ -626,6 +627,17 @@ class OffloadWrappingJobAction : public JobAction { } }; +class SPIRVTranslatorJobAction : public JobAction { + void anchor() override; + +public: + SPIRVTranslatorJobAction(Action *Input, types::ID OutputType); + + static bool classof(const Action *A) { + return A->getKind() == SPIRVTranslatorJobClass; + } +}; + } // namespace driver } // namespace clang diff --git a/clang/include/clang/Driver/CC1Options.td b/clang/include/clang/Driver/CC1Options.td index 17b0dcb109d09..232ffd985f158 100644 --- a/clang/include/clang/Driver/CC1Options.td +++ b/clang/include/clang/Driver/CC1Options.td @@ -849,6 +849,9 @@ def fsycl_int_header : Separate<["-"], "fsycl-int-header">, HelpText<"Generate SYCL integration header into this file.">; def fsycl_int_header_EQ : Joined<["-"], "fsycl-int-header=">, Alias; +def fsycl_allow_func_ptr : Flag<["-"], "fsycl-allow-func-ptr">, + HelpText<"Allow function pointers in SYCL device.">; +def fno_sycl_allow_func_ptr : Flag<["-"], "fno-sycl-allow-func-ptr">; } // let Flags = [CC1Option] diff --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td index e149448de0e3c..ccddb3d224c91 100644 --- a/clang/include/clang/Driver/Options.td +++ b/clang/include/clang/Driver/Options.td @@ -556,9 +556,9 @@ def cuda_compile_host_device : Flag<["--"], "cuda-compile-host-device">, HelpText<"Compile CUDA code for both host and device (default). Has no " "effect on non-CUDA compilations.">; def cuda_include_ptx_EQ : Joined<["--"], "cuda-include-ptx=">, Flags<[DriverOption]>, - HelpText<"Include PTX for the follwing GPU architecture (e.g. sm_35) or 'all'. May be specified more than once.">; + HelpText<"Include PTX for the following GPU architecture (e.g. sm_35) or 'all'. May be specified more than once.">; def no_cuda_include_ptx_EQ : Joined<["--"], "no-cuda-include-ptx=">, Flags<[DriverOption]>, - HelpText<"Do not include PTX for the follwing GPU architecture (e.g. sm_35) or 'all'. May be specified more than once.">; + HelpText<"Do not include PTX for the following GPU architecture (e.g. sm_35) or 'all'. May be specified more than once.">; def cuda_gpu_arch_EQ : Joined<["--"], "cuda-gpu-arch=">, Flags<[DriverOption]>, HelpText<"CUDA GPU architecture (e.g. sm_35). May be specified more than once.">; def hip_link : Flag<["--"], "hip-link">, @@ -752,6 +752,12 @@ def fprofile_generate : Flag<["-"], "fprofile-generate">, def fprofile_generate_EQ : Joined<["-"], "fprofile-generate=">, Group, Flags<[DriverOption]>, MetaVarName<"">, HelpText<"Generate instrumented code to collect execution counts into /default.profraw (overridden by LLVM_PROFILE_FILE env var)">; +def fcs_profile_generate : Flag<["-"], "fcs-profile-generate">, + Group, Flags<[DriverOption]>, + HelpText<"Generate instrumented code to collect context sensitive execution counts into default.profraw (overridden by LLVM_PROFILE_FILE env var)">; +def fcs_profile_generate_EQ : Joined<["-"], "fcs-profile-generate=">, + Group, Flags<[DriverOption]>, MetaVarName<"">, + HelpText<"Generate instrumented code to collect context sensitive execution counts into /default.profraw (overridden by LLVM_PROFILE_FILE env var)">; def fprofile_use : Flag<["-"], "fprofile-use">, Group, Alias; def fprofile_use_EQ : Joined<["-"], "fprofile-use=">, @@ -774,6 +780,9 @@ def fprofile_filter_files_EQ : Joined<["-"], "fprofile-filter-files=">, def fprofile_exclude_files_EQ : Joined<["-"], "fprofile-exclude-files=">, Group, Flags<[CC1Option, CoreOption]>, HelpText<"Instrument only functions from files where names don't match all the regexes separated by a semi-colon">; +def forder_file_instrumentation : Flag<["-"], "forder-file-instrumentation">, + Group, Flags<[CC1Option, CoreOption]>, + HelpText<"Generate instrumented code to collect order file into default.profraw file (overridden by '=' form of option or LLVM_PROFILE_FILE env var)">; def faddrsig : Flag<["-"], "faddrsig">, Group, Flags<[CoreOption, CC1Option]>, HelpText<"Emit an address-significance table">; @@ -906,7 +915,7 @@ def fno_fast_math : Flag<["-"], "fno-fast-math">, Group; def fmath_errno : Flag<["-"], "fmath-errno">, Group, Flags<[CC1Option]>, HelpText<"Require math functions to indicate errors by setting errno">; def fno_math_errno : Flag<["-"], "fno-math-errno">, Group; -def fbracket_depth_EQ : Joined<["-"], "fbracket-depth=">, Group; +def fbracket_depth_EQ : Joined<["-"], "fbracket-depth=">, Group, Flags<[CoreOption]>; def fsignaling_math : Flag<["-"], "fsignaling-math">, Group; def fno_signaling_math : Flag<["-"], "fno-signaling-math">, Group; def fjump_tables : Flag<["-"], "fjump-tables">, Group; @@ -1578,6 +1587,8 @@ def fopenmp_cuda_number_of_sm_EQ : Joined<["-"], "fopenmp-cuda-number-of-sm=">, Flags<[CC1Option, NoArgumentUnused, HelpHidden]>; def fopenmp_cuda_blocks_per_sm_EQ : Joined<["-"], "fopenmp-cuda-blocks-per-sm=">, Group, Flags<[CC1Option, NoArgumentUnused, HelpHidden]>; +def fopenmp_cuda_teams_reduction_recs_num_EQ : Joined<["-"], "fopenmp-cuda-teams-reduction-recs-num=">, Group, + Flags<[CC1Option, NoArgumentUnused, HelpHidden]>; def fopenmp_optimistic_collapse : Flag<["-"], "fopenmp-optimistic-collapse">, Group, Flags<[CC1Option, NoArgumentUnused, HelpHidden]>; def fno_openmp_optimistic_collapse : Flag<["-"], "fno-openmp-optimistic-collapse">, Group, @@ -1611,9 +1622,9 @@ def fplt : Flag<["-"], "fplt">, Group, Flags<[CC1Option]>, HelpText<"Use the PLT to make function calls">; def fno_plt : Flag<["-"], "fno-plt">, Group, Flags<[CC1Option]>, HelpText<"Do not use the PLT to make function calls">; -def fropi : Flag<["-"], "fropi">, Group; +def fropi : Flag<["-"], "fropi">, Group, Flags<[CC1Option]>; def fno_ropi : Flag<["-"], "fno-ropi">, Group; -def frwpi : Flag<["-"], "frwpi">, Group; +def frwpi : Flag<["-"], "frwpi">, Group, Flags<[CC1Option]>; def fno_rwpi : Flag<["-"], "fno-rwpi">, Group; def fplugin_EQ : Joined<["-"], "fplugin=">, Group, Flags<[DriverOption]>, MetaVarName<"">, HelpText<"Load the named plugin (dynamic shared object)">; @@ -2152,7 +2163,7 @@ def mfix_cortex_a53_835769 : Flag<["-"], "mfix-cortex-a53-835769">, def mno_fix_cortex_a53_835769 : Flag<["-"], "mno-fix-cortex-a53-835769">, Group, HelpText<"Don't workaround Cortex-A53 erratum 835769 (AArch64 only)">; -foreach i = {1-7,18,20} in +foreach i = {1-7,9-15,18,20-28} in def ffixed_x#i : Flag<["-"], "ffixed-x"#i>, Group, HelpText<"Reserve the "#i#" register (AArch64 only)">; @@ -2176,6 +2187,8 @@ def msign_ext : Flag<["-"], "msign-ext">, Group; def mno_sign_ext : Flag<["-"], "mno-sign-ext">, Group; def mexception_handing : Flag<["-"], "mexception-handling">, Group; def mno_exception_handing : Flag<["-"], "mno-exception-handling">, Group; +def matomics : Flag<["-"], "matomics">, Group; +def mno_atomics : Flag<["-"], "mno-atomics">, Group; def mbulk_memory : Flag<["-"], "mbulk-memory">, Group; def mno_bulk_memory : Flag<["-"], "mno-bulk-memory">, Group; @@ -2524,6 +2537,7 @@ def pthread : Flag<["-"], "pthread">, Flags<[CC1Option]>, def no_pthread : Flag<["-"], "no-pthread">, Flags<[CC1Option]>; def p : Flag<["-"], "p">; def pie : Flag<["-"], "pie">; +def static_pie : Flag<["-"], "static-pie">; def read__only__relocs : Separate<["-"], "read_only_relocs">; def remap : Flag<["-"], "remap">; def rewrite_objc : Flag<["-"], "rewrite-objc">, Flags<[DriverOption,CC1Option]>, diff --git a/clang/include/clang/Driver/ToolChain.h b/clang/include/clang/Driver/ToolChain.h index dde0ec627ab4e..c3b3356c82db6 100644 --- a/clang/include/clang/Driver/ToolChain.h +++ b/clang/include/clang/Driver/ToolChain.h @@ -130,6 +130,7 @@ class ToolChain { mutable std::unique_ptr Link; mutable std::unique_ptr OffloadBundler; mutable std::unique_ptr OffloadWrapper; + mutable std::unique_ptr SPIRVTranslator; Tool *getClang() const; Tool *getAssemble() const; @@ -137,6 +138,7 @@ class ToolChain { Tool *getClangAs() const; Tool *getOffloadBundler() const; Tool *getOffloadWrapper() const; + Tool *getSPIRVTranslator() const; mutable std::unique_ptr SanitizerArguments; mutable std::unique_ptr XRayArguments; @@ -567,7 +569,9 @@ class ToolChain { virtual SanitizerMask getSupportedSanitizers() const; /// Return sanitizers which are enabled by default. - virtual SanitizerMask getDefaultSanitizers() const { return 0; } + virtual SanitizerMask getDefaultSanitizers() const { + return SanitizerMask(); + } }; /// Set a ToolChain's effective triple. Reset it when the registration object diff --git a/clang/include/clang/Format/Format.h b/clang/include/clang/Format/Format.h index 4bc0a5c472540..94cceb30dcaa7 100644 --- a/clang/include/clang/Format/Format.h +++ b/clang/include/clang/Format/Format.h @@ -1849,7 +1849,8 @@ struct FormatStyle { /// Returns a format style complying with the LLVM coding standards: /// http://llvm.org/docs/CodingStandards.html. -FormatStyle getLLVMStyle(); +FormatStyle getLLVMStyle( + FormatStyle::LanguageKind Language = FormatStyle::LanguageKind::LK_Cpp); /// Returns a format style complying with one of Google's style guides: /// http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml. diff --git a/clang/include/clang/Frontend/FrontendOptions.h b/clang/include/clang/Frontend/FrontendOptions.h index 40565b84b80e3..4c4ed96d1cacb 100644 --- a/clang/include/clang/Frontend/FrontendOptions.h +++ b/clang/include/clang/Frontend/FrontendOptions.h @@ -57,9 +57,6 @@ enum ActionKind { /// Emit a .bc file. EmitBC, - /// Emit a .spv file. - EmitSPIRV, - /// Translate input source into HTML. EmitHTML, diff --git a/clang/include/clang/Frontend/Utils.h b/clang/include/clang/Frontend/Utils.h index 58c5a39a88a0d..124d4a9933077 100644 --- a/clang/include/clang/Frontend/Utils.h +++ b/clang/include/clang/Frontend/Utils.h @@ -145,18 +145,18 @@ class ModuleDependencyCollector : public DependencyCollector { ~ModuleDependencyCollector() override { writeFileMap(); } StringRef getDest() { return DestDir; } - bool insertSeen(StringRef Filename) { return Seen.insert(Filename).second; } - void addFile(StringRef Filename, StringRef FileDst = {}); + virtual bool insertSeen(StringRef Filename) { return Seen.insert(Filename).second; } + virtual void addFile(StringRef Filename, StringRef FileDst = {}); - void addFileMapping(StringRef VPath, StringRef RPath) { + virtual void addFileMapping(StringRef VPath, StringRef RPath) { VFSWriter.addFileMapping(VPath, RPath); } void attachToPreprocessor(Preprocessor &PP) override; void attachToASTReader(ASTReader &R) override; - void writeFileMap(); - bool hasErrors() { return HasErrors; } + virtual void writeFileMap(); + virtual bool hasErrors() { return HasErrors; } }; /// AttachDependencyGraphGen - Create a dependency graph generator, and attach diff --git a/clang/include/clang/Index/DeclOccurrence.h b/clang/include/clang/Index/DeclOccurrence.h new file mode 100644 index 0000000000000..16f03a84579ec --- /dev/null +++ b/clang/include/clang/Index/DeclOccurrence.h @@ -0,0 +1,41 @@ +//===- DeclOccurrence.h - An occurrence of a decl within a file -*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_CLANG_INDEX_DECLOCCURRENCE_H +#define LLVM_CLANG_INDEX_DECLOCCURRENCE_H + +#include "clang/Basic/LLVM.h" +#include "clang/Index/IndexSymbol.h" +#include "llvm/ADT/ArrayRef.h" +#include "llvm/ADT/SmallVector.h" + +namespace clang { +class Decl; + +namespace index { + +struct DeclOccurrence { + SymbolRoleSet Roles; + unsigned Offset; + const Decl *Dcl; + SmallVector Relations; + + DeclOccurrence(SymbolRoleSet R, unsigned Offset, const Decl *D, + ArrayRef Relations) + : Roles(R), Offset(Offset), Dcl(D), + Relations(Relations.begin(), Relations.end()) {} + + friend bool operator<(const DeclOccurrence &LHS, const DeclOccurrence &RHS) { + return LHS.Offset < RHS.Offset; + } +}; + +} // namespace index +} // namespace clang + +#endif // LLVM_CLANG_INDEX_DECLOCCURRENCE_H diff --git a/clang/include/clang/Index/IndexingAction.h b/clang/include/clang/Index/IndexingAction.h index 36b3c75a65ff2..9756f3c539e65 100644 --- a/clang/include/clang/Index/IndexingAction.h +++ b/clang/include/clang/Index/IndexingAction.h @@ -44,6 +44,9 @@ struct IndexingOptions { // callback is not available (e.g. after parsing has finished). Note that // macro references are not available in Proprocessor. bool IndexMacrosInPreprocessor = false; + // Has no effect if IndexFunctionLocals are false. + bool IndexParametersInDeclarations = false; + bool IndexTemplateParameters = false; }; /// Creates a frontend action that indexes all symbols (macros and AST decls). diff --git a/clang/include/clang/Lex/DirectoryLookup.h b/clang/include/clang/Lex/DirectoryLookup.h index 6b22f8fb3fcc5..7c556ac351758 100644 --- a/clang/include/clang/Lex/DirectoryLookup.h +++ b/clang/include/clang/Lex/DirectoryLookup.h @@ -170,6 +170,9 @@ class DirectoryLookup { /// set to true if the file is located in a framework that has been /// user-specified to be treated as a system framework. /// + /// \param [out] IsFrameworkFound For a framework directory set to true if + /// specified '.framework' directory is found. + /// /// \param [out] MappedName if this is a headermap which maps the filename to /// a framework include ("Foo.h" -> "Foo/Foo.h"), set the new name to this /// vector and point Filename to it. @@ -180,6 +183,7 @@ class DirectoryLookup { Module *RequestingModule, ModuleMap::KnownHeader *SuggestedModule, bool &InUserSpecifiedSystemFramework, + bool &IsFrameworkFound, bool &HasBeenMapped, SmallVectorImpl &MappedName) const; @@ -190,7 +194,8 @@ class DirectoryLookup { SmallVectorImpl *RelativePath, Module *RequestingModule, ModuleMap::KnownHeader *SuggestedModule, - bool &InUserSpecifiedSystemFramework) const; + bool &InUserSpecifiedSystemFramework, + bool &IsFrameworkFound) const; }; diff --git a/clang/include/clang/Lex/HeaderSearch.h b/clang/include/clang/Lex/HeaderSearch.h index 53821672ef491..879d24d0c6538 100644 --- a/clang/include/clang/Lex/HeaderSearch.h +++ b/clang/include/clang/Lex/HeaderSearch.h @@ -142,22 +142,22 @@ class ExternalHeaderFileInfoSource { virtual HeaderFileInfo GetHeaderFileInfo(const FileEntry *FE) = 0; }; +/// This structure is used to record entries in our framework cache. +struct FrameworkCacheEntry { + /// The directory entry which should be used for the cached framework. + const DirectoryEntry *Directory; + + /// Whether this framework has been "user-specified" to be treated as if it + /// were a system framework (even if it was found outside a system framework + /// directory). + bool IsUserSpecifiedSystemFramework; +}; + /// Encapsulates the information needed to find the file referenced /// by a \#include or \#include_next, (sub-)framework lookup, etc. class HeaderSearch { friend class DirectoryLookup; - /// This structure is used to record entries in our framework cache. - struct FrameworkCacheEntry { - /// The directory entry which should be used for the cached framework. - const DirectoryEntry *Directory; - - /// Whether this framework has been "user-specified" to be treated as if it - /// were a system framework (even if it was found outside a system framework - /// directory). - bool IsUserSpecifiedSystemFramework; - }; - /// Header-search options used to initialize this header search. std::shared_ptr HSOpts; @@ -390,13 +390,18 @@ class HeaderSearch { /// /// \param IsMapped If non-null, and the search involved header maps, set to /// true. + /// + /// \param IsFrameworkFound If non-null, will be set to true if a framework is + /// found in any of searched SearchDirs. Doesn't guarantee the requested file + /// is found. const FileEntry *LookupFile( StringRef Filename, SourceLocation IncludeLoc, bool isAngled, const DirectoryLookup *FromDir, const DirectoryLookup *&CurDir, ArrayRef> Includers, SmallVectorImpl *SearchPath, SmallVectorImpl *RelativePath, Module *RequestingModule, ModuleMap::KnownHeader *SuggestedModule, - bool *IsMapped, bool SkipCache = false, bool BuildSystemModule = false); + bool *IsMapped, bool *IsFrameworkFound, bool SkipCache = false, + bool BuildSystemModule = false); /// Look up a subframework for the specified \#include file. /// diff --git a/clang/include/clang/Lex/Preprocessor.h b/clang/include/clang/Lex/Preprocessor.h index dc99753ae961a..29d42504906f0 100644 --- a/clang/include/clang/Lex/Preprocessor.h +++ b/clang/include/clang/Lex/Preprocessor.h @@ -173,6 +173,9 @@ class Preprocessor { IdentifierInfo *Ident__is_target_os; // __is_target_os IdentifierInfo *Ident__is_target_environment; // __is_target_environment + // Weak, only valid (and set) while InMacroArgs is true. + Token* ArgMacro; + SourceLocation DATELoc, TIMELoc; // Next __COUNTER__ value, starts at 0. @@ -1854,7 +1857,8 @@ class Preprocessor { SmallVectorImpl *SearchPath, SmallVectorImpl *RelativePath, ModuleMap::KnownHeader *SuggestedModule, - bool *IsMapped, bool SkipCache = false); + bool *IsMapped, bool *IsFrameworkFound, + bool SkipCache = false); /// Get the DirectoryLookup structure used to find the current /// FileEntry, if CurLexer is non-null and if applicable. diff --git a/clang/include/clang/Parse/Parser.h b/clang/include/clang/Parse/Parser.h index f5c70e71b8adb..e8975dc834c56 100644 --- a/clang/include/clang/Parse/Parser.h +++ b/clang/include/clang/Parse/Parser.h @@ -363,10 +363,28 @@ class Parser : public CodeCompletionHandler { /// just a regular sub-expression. SourceLocation ExprStatementTokLoc; - /// Tests whether an expression value is discarded based on token lookahead. - /// It will return true if the lexer is currently processing the }) - /// terminating a GNU statement expression and false otherwise. - bool isExprValueDiscarded(); + /// Flags describing a context in which we're parsing a statement. + enum class ParsedStmtContext { + /// This context permits declarations in language modes where declarations + /// are not statements. + AllowDeclarationsInC = 0x1, + /// This context permits standalone OpenMP directives. + AllowStandaloneOpenMPDirectives = 0x2, + /// This context is at the top level of a GNU statement expression. + InStmtExpr = 0x4, + + /// The context of a regular substatement. + SubStmt = 0, + /// The context of a compound-statement. + Compound = AllowDeclarationsInC | AllowStandaloneOpenMPDirectives, + + LLVM_MARK_AS_BITMASK_ENUM(InStmtExpr) + }; + + /// Act on an expression statement that might be the last statement in a + /// GNU statement expression. Checks whether we are actually at the end of + /// a statement expression and builds a suitable expression statement. + StmtResult handleExprStmt(ExprResult E, ParsedStmtContext StmtCtx); public: Parser(Preprocessor &PP, Sema &Actions, bool SkipFunctionBodies); @@ -1662,10 +1680,10 @@ class Parser : public CodeCompletionHandler { typedef SmallVector CommaLocsTy; /// ParseExpressionList - Used for C/C++ (argument-)expression-list. - bool ParseExpressionList( - SmallVectorImpl &Exprs, - SmallVectorImpl &CommaLocs, - llvm::function_ref Completer = llvm::function_ref()); + bool ParseExpressionList(SmallVectorImpl &Exprs, + SmallVectorImpl &CommaLocs, + llvm::function_ref ExpressionStarts = + llvm::function_ref()); /// ParseSimpleExpressionList - A simple comma-separated list of expressions, /// used for misc language extensions. @@ -1873,29 +1891,24 @@ class Parser : public CodeCompletionHandler { /// A SmallVector of types. typedef SmallVector TypeVector; - StmtResult ParseStatement(SourceLocation *TrailingElseLoc = nullptr, - bool AllowOpenMPStandalone = false); - enum AllowedConstructsKind { - /// Allow any declarations, statements, OpenMP directives. - ACK_Any, - /// Allow only statements and non-standalone OpenMP directives. - ACK_StatementsOpenMPNonStandalone, - /// Allow statements and all executable OpenMP directives - ACK_StatementsOpenMPAnyExecutable - }; StmtResult - ParseStatementOrDeclaration(StmtVector &Stmts, AllowedConstructsKind Allowed, - SourceLocation *TrailingElseLoc = nullptr); + ParseStatement(SourceLocation *TrailingElseLoc = nullptr, + ParsedStmtContext StmtCtx = ParsedStmtContext::SubStmt); + StmtResult ParseStatementOrDeclaration( + StmtVector &Stmts, ParsedStmtContext StmtCtx, + SourceLocation *TrailingElseLoc = nullptr); StmtResult ParseStatementOrDeclarationAfterAttributes( StmtVector &Stmts, - AllowedConstructsKind Allowed, + ParsedStmtContext StmtCtx, SourceLocation *TrailingElseLoc, ParsedAttributesWithRange &Attrs); - StmtResult ParseExprStatement(); - StmtResult ParseLabeledStatement(ParsedAttributesWithRange &attrs); - StmtResult ParseCaseStatement(bool MissingCase = false, + StmtResult ParseExprStatement(ParsedStmtContext StmtCtx); + StmtResult ParseLabeledStatement(ParsedAttributesWithRange &attrs, + ParsedStmtContext StmtCtx); + StmtResult ParseCaseStatement(ParsedStmtContext StmtCtx, + bool MissingCase = false, ExprResult Expr = ExprResult()); - StmtResult ParseDefaultStatement(); + StmtResult ParseDefaultStatement(ParsedStmtContext StmtCtx); StmtResult ParseCompoundStatement(bool isStmtExpr = false); StmtResult ParseCompoundStatement(bool isStmtExpr, unsigned ScopeFlags); @@ -1918,7 +1931,7 @@ class Parser : public CodeCompletionHandler { StmtResult ParseAsmStatement(bool &msAsm); StmtResult ParseMicrosoftAsmStatement(SourceLocation AsmLoc); StmtResult ParsePragmaLoopHint(StmtVector &Stmts, - AllowedConstructsKind Allowed, + ParsedStmtContext StmtCtx, SourceLocation *TrailingElseLoc, ParsedAttributesWithRange &Attrs); @@ -1984,7 +1997,8 @@ class Parser : public CodeCompletionHandler { //===--------------------------------------------------------------------===// // Objective-C Statements - StmtResult ParseObjCAtStatement(SourceLocation atLoc); + StmtResult ParseObjCAtStatement(SourceLocation atLoc, + ParsedStmtContext StmtCtx); StmtResult ParseObjCTryStmt(SourceLocation atLoc); StmtResult ParseObjCThrowStmt(SourceLocation atLoc); StmtResult ParseObjCSynchronizedStmt(SourceLocation atLoc); @@ -2824,13 +2838,9 @@ class Parser : public CodeCompletionHandler { bool AllowScopeSpecifier); /// Parses declarative or executable directive. /// - /// \param Allowed ACK_Any, if any directives are allowed, - /// ACK_StatementsOpenMPAnyExecutable - if any executable directives are - /// allowed, ACK_StatementsOpenMPNonStandalone - if only non-standalone - /// executable directives are allowed. - /// + /// \param StmtCtx The context in which we're parsing the directive. StmtResult - ParseOpenMPDeclarativeOrExecutableDirective(AllowedConstructsKind Allowed); + ParseOpenMPDeclarativeOrExecutableDirective(ParsedStmtContext StmtCtx); /// Parses clause of kind \a CKind for directive of a kind \a Kind. /// /// \param DKind Kind of current directive. @@ -2891,8 +2901,8 @@ class Parser : public CodeCompletionHandler { Expr *TailExpr = nullptr; SourceLocation ColonLoc; SourceLocation RLoc; - CXXScopeSpec ReductionIdScopeSpec; - DeclarationNameInfo ReductionId; + CXXScopeSpec ReductionOrMapperIdScopeSpec; + DeclarationNameInfo ReductionOrMapperId; OpenMPDependClauseKind DepKind = OMPC_DEPEND_unknown; OpenMPLinearClauseKind LinKind = OMPC_LINEAR_val; SmallVector @@ -2915,6 +2925,12 @@ class Parser : public CodeCompletionHandler { ParsedType ObjectType, SourceLocation *TemplateKWLoc, UnqualifiedId &Result); + /// Parses the mapper modifier in map, to, and from clauses. + bool parseMapperModifier(OpenMPVarListDataTy &Data); + /// Parses map-type-modifiers in map clause. + /// map([ [map-type-modifier[,] [map-type-modifier[,] ...] map-type : ] list) + /// where, map-type-modifier ::= always | close | mapper(mapper-identifier) + bool parseMapTypeModifiers(OpenMPVarListDataTy &Data); private: //===--------------------------------------------------------------------===// diff --git a/clang/include/clang/Sema/Lookup.h b/clang/include/clang/Sema/Lookup.h index 990005f1ccc45..0466d06d753b6 100644 --- a/clang/include/clang/Sema/Lookup.h +++ b/clang/include/clang/Sema/Lookup.h @@ -172,7 +172,8 @@ class LookupResult { : SemaPtr(Other.SemaPtr), NameInfo(Other.NameInfo), LookupKind(Other.LookupKind), IDNS(Other.IDNS), Redecl(Other.Redecl), ExternalRedecl(Other.ExternalRedecl), HideTags(Other.HideTags), - AllowHidden(Other.AllowHidden) {} + AllowHidden(Other.AllowHidden), + TemplateNameLookup(Other.TemplateNameLookup) {} // FIXME: Remove these deleted methods once the default build includes // -Wdeprecated. @@ -193,7 +194,8 @@ class LookupResult { HideTags(std::move(Other.HideTags)), Diagnose(std::move(Other.Diagnose)), AllowHidden(std::move(Other.AllowHidden)), - Shadowed(std::move(Other.Shadowed)) { + Shadowed(std::move(Other.Shadowed)), + TemplateNameLookup(std::move(Other.TemplateNameLookup)) { Other.Paths = nullptr; Other.Diagnose = false; } @@ -216,6 +218,7 @@ class LookupResult { Diagnose = std::move(Other.Diagnose); AllowHidden = std::move(Other.AllowHidden); Shadowed = std::move(Other.Shadowed); + TemplateNameLookup = std::move(Other.TemplateNameLookup); Other.Paths = nullptr; Other.Diagnose = false; return *this; @@ -286,6 +289,15 @@ class LookupResult { HideTags = Hide; } + /// Sets whether this is a template-name lookup. For template-name lookups, + /// injected-class-names are treated as naming a template rather than a + /// template specialization. + void setTemplateNameLookup(bool TemplateName) { + TemplateNameLookup = TemplateName; + } + + bool isTemplateNameLookup() const { return TemplateNameLookup; } + bool isAmbiguous() const { return getResultKind() == Ambiguous; } @@ -739,6 +751,9 @@ class LookupResult { /// declaration that we skipped. This only happens when \c LookupKind /// is \c LookupRedeclarationWithLinkage. bool Shadowed = false; + + /// True if we're looking up a template-name. + bool TemplateNameLookup = false; }; /// Consumes visible declarations found when searching for diff --git a/clang/include/clang/Sema/Sema.h b/clang/include/clang/Sema/Sema.h index b817b676cd598..b4288f487bfc6 100644 --- a/clang/include/clang/Sema/Sema.h +++ b/clang/include/clang/Sema/Sema.h @@ -156,6 +156,7 @@ namespace clang { class OMPDeclareReductionDecl; class OMPDeclareSimdDecl; class OMPClause; + struct OMPVarListLocTy; struct OverloadCandidate; class OverloadCandidateSet; class OverloadExpr; @@ -399,6 +400,14 @@ class PreferredTypeBuilder { void enterCondition(Sema &S, SourceLocation Tok); void enterReturn(Sema &S, SourceLocation Tok); void enterVariableInit(SourceLocation Tok, Decl *D); + /// Computing a type for the function argument may require running + /// overloading, so we postpone its computation until it is actually needed. + /// + /// Clients should be very careful when using this funciton, as it stores a + /// function_ref, clients should make sure all calls to get() with the same + /// location happen while function_ref is alive. + void enterFunctionArgument(SourceLocation Tok, + llvm::function_ref ComputeType); void enterParenExpr(SourceLocation Tok, SourceLocation LParLoc); void enterUnary(Sema &S, SourceLocation Tok, tok::TokenKind OpKind, @@ -410,8 +419,12 @@ class PreferredTypeBuilder { void enterTypeCast(SourceLocation Tok, QualType CastType); QualType get(SourceLocation Tok) const { - if (Tok == ExpectedLoc) + if (Tok != ExpectedLoc) + return QualType(); + if (!Type.isNull()) return Type; + if (ComputeType) + return ComputeType(); return QualType(); } @@ -420,6 +433,9 @@ class PreferredTypeBuilder { SourceLocation ExpectedLoc; /// Expected type for a token starting at ExpectedLoc. QualType Type; + /// A function to compute expected type at ExpectedLoc. It is only considered + /// if Type is null. + llvm::function_ref ComputeType; }; /// Sema - This implements semantic analysis and AST building for C. @@ -1517,7 +1533,6 @@ class Sema { void PopCompoundScope(); sema::CompoundScopeInfo &getCurCompoundScope() const; - bool isCurCompoundStmtAStmtExpr() const; bool hasAnyUnrecoverableErrorsInThisFunction() const; @@ -4647,6 +4662,8 @@ class Sema { void ActOnStartStmtExpr(); ExprResult ActOnStmtExpr(SourceLocation LPLoc, Stmt *SubStmt, SourceLocation RPLoc); // "({..})" + // Handle the final expression in a statement expression. + ExprResult ActOnStmtExprResult(ExprResult E); void ActOnStmtExprError(); // __builtin_offsetof(type, identifier(.identifier|[expr])*) @@ -6325,9 +6342,21 @@ class Sema { // C++ Templates [C++ 14] // void FilterAcceptableTemplateNames(LookupResult &R, - bool AllowFunctionTemplates = true); + bool AllowFunctionTemplates = true, + bool AllowDependent = true); bool hasAnyAcceptableTemplateNames(LookupResult &R, - bool AllowFunctionTemplates = true); + bool AllowFunctionTemplates = true, + bool AllowDependent = true); + /// Try to interpret the lookup result D as a template-name. + /// + /// \param D A declaration found by name lookup. + /// \param AllowFunctionTemplates Whether function templates should be + /// considered valid results. + /// \param AllowDependent Whether unresolved using declarations (that might + /// name templates) should be considered valid results. + NamedDecl *getAsTemplateNameDecl(NamedDecl *D, + bool AllowFunctionTemplates = true, + bool AllowDependent = true); bool LookupTemplateName(LookupResult &R, Scope *S, CXXScopeSpec &SS, QualType ObjectType, bool EnteringContext, @@ -8722,6 +8751,13 @@ class Sema { /// attribute to be added (usually because of a pragma). void AddOptnoneAttributeIfNoConflicts(FunctionDecl *FD, SourceLocation Loc); + template + bool checkRangedIntegralArgument(Expr *E, const AttrType *TmpAttr, + ExprResult &Result); + template + void AddOneConstantPowerTwoValueAttr(SourceRange AttrRange, Decl *D, Expr *E, + unsigned SpellingListIndex); + /// AddAlignedAttr - Adds an aligned attribute to a particular declaration. void AddAlignedAttr(SourceRange AttrRange, Decl *D, Expr *E, unsigned SpellingListIndex, bool IsPackExpansion); @@ -8759,6 +8795,16 @@ class Sema { void AddXConsumedAttr(Decl *D, SourceRange SR, unsigned SpellingIndex, RetainOwnershipKind K, bool IsTemplateInstantiation); + /// addAMDGPUFlatWorkGroupSizeAttr - Adds an amdgpu_flat_work_group_size + /// attribute to a particular declaration. + void addAMDGPUFlatWorkGroupSizeAttr(SourceRange AttrRange, Decl *D, Expr *Min, + Expr *Max, unsigned SpellingListIndex); + + /// addAMDGPUWavePersEUAttr - Adds an amdgpu_waves_per_eu attribute to a + /// particular declaration. + void addAMDGPUWavesPerEUAttr(SourceRange AttrRange, Decl *D, Expr *Min, + Expr *Max, unsigned SpellingListIndex); + bool checkNSReturnsRetainedReturnType(SourceLocation loc, QualType type); //===--------------------------------------------------------------------===// @@ -8877,6 +8923,13 @@ class Sema { /// Pop OpenMP function region for non-capturing function. void popOpenMPFunctionRegion(const sema::FunctionScopeInfo *OldFSI); + /// Check whether we're allowed to call Callee from the current function. + void checkOpenMPDeviceFunction(SourceLocation Loc, FunctionDecl *Callee); + + /// Check if the expression is allowed to be used in expressions for the + /// OpenMP devices. + void checkOpenMPDeviceExpr(const Expr *E); + /// Checks if a type or a declaration is disabled due to the owning extension /// being disabled, and emits diagnostic messages if it is disabled. /// \param D type or declaration to be checked. @@ -9377,7 +9430,7 @@ class Sema { SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc); - + OMPClause *ActOnOpenMPSingleExprWithArgClause( OpenMPClauseKind Kind, ArrayRef Arguments, Expr *Expr, SourceLocation StartLoc, SourceLocation LParenLoc, @@ -9432,7 +9485,7 @@ class Sema { /// Called on well-formed 'unified_address' clause. OMPClause *ActOnOpenMPUnifiedSharedMemoryClause(SourceLocation StartLoc, SourceLocation EndLoc); - + /// Called on well-formed 'reverse_offload' clause. OMPClause *ActOnOpenMPReverseOffloadClause(SourceLocation StartLoc, SourceLocation EndLoc); @@ -9448,15 +9501,13 @@ class Sema { OMPClause *ActOnOpenMPVarListClause( OpenMPClauseKind Kind, ArrayRef Vars, Expr *TailExpr, - SourceLocation StartLoc, SourceLocation LParenLoc, - SourceLocation ColonLoc, SourceLocation EndLoc, - CXXScopeSpec &ReductionIdScopeSpec, - const DeclarationNameInfo &ReductionId, OpenMPDependClauseKind DepKind, + const OMPVarListLocTy &Locs, SourceLocation ColonLoc, + CXXScopeSpec &ReductionOrMapperIdScopeSpec, + DeclarationNameInfo &ReductionOrMapperId, OpenMPDependClauseKind DepKind, OpenMPLinearClauseKind LinKind, ArrayRef MapTypeModifiers, - ArrayRef MapTypeModifiersLoc, - OpenMPMapClauseKind MapType, bool IsMapTypeImplicit, - SourceLocation DepLinMapLoc); + ArrayRef MapTypeModifiersLoc, OpenMPMapClauseKind MapType, + bool IsMapTypeImplicit, SourceLocation DepLinMapLoc); /// Called on well-formed 'private' clause. OMPClause *ActOnOpenMPPrivateClause(ArrayRef VarList, SourceLocation StartLoc, @@ -9540,10 +9591,12 @@ class Sema { OMPClause * ActOnOpenMPMapClause(ArrayRef MapTypeModifiers, ArrayRef MapTypeModifiersLoc, + CXXScopeSpec &MapperIdScopeSpec, + DeclarationNameInfo &MapperId, OpenMPMapClauseKind MapType, bool IsMapTypeImplicit, SourceLocation MapLoc, SourceLocation ColonLoc, - ArrayRef VarList, SourceLocation StartLoc, - SourceLocation LParenLoc, SourceLocation EndLoc); + ArrayRef VarList, const OMPVarListLocTy &Locs, + ArrayRef UnresolvedMappers = llvm::None); /// Called on well-formed 'num_teams' clause. OMPClause *ActOnOpenMPNumTeamsClause(Expr *NumTeams, SourceLocation StartLoc, SourceLocation LParenLoc, @@ -9568,25 +9621,22 @@ class Sema { SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation MLoc, SourceLocation KindLoc, SourceLocation EndLoc); /// Called on well-formed 'to' clause. - OMPClause *ActOnOpenMPToClause(ArrayRef VarList, - SourceLocation StartLoc, - SourceLocation LParenLoc, - SourceLocation EndLoc); + OMPClause * + ActOnOpenMPToClause(ArrayRef VarList, CXXScopeSpec &MapperIdScopeSpec, + DeclarationNameInfo &MapperId, + const OMPVarListLocTy &Locs, + ArrayRef UnresolvedMappers = llvm::None); /// Called on well-formed 'from' clause. - OMPClause *ActOnOpenMPFromClause(ArrayRef VarList, - SourceLocation StartLoc, - SourceLocation LParenLoc, - SourceLocation EndLoc); + OMPClause *ActOnOpenMPFromClause( + ArrayRef VarList, CXXScopeSpec &MapperIdScopeSpec, + DeclarationNameInfo &MapperId, const OMPVarListLocTy &Locs, + ArrayRef UnresolvedMappers = llvm::None); /// Called on well-formed 'use_device_ptr' clause. OMPClause *ActOnOpenMPUseDevicePtrClause(ArrayRef VarList, - SourceLocation StartLoc, - SourceLocation LParenLoc, - SourceLocation EndLoc); + const OMPVarListLocTy &Locs); /// Called on well-formed 'is_device_ptr' clause. OMPClause *ActOnOpenMPIsDevicePtrClause(ArrayRef VarList, - SourceLocation StartLoc, - SourceLocation LParenLoc, - SourceLocation EndLoc); + const OMPVarListLocTy &Locs); /// The kind of conversion being performed. enum CheckedConversionKind { @@ -10221,7 +10271,7 @@ class Sema { /// compilation, this is currently only enabled for CUDA compilations. llvm::DenseMap, std::vector> - CUDADeferredDiags; + DeviceDeferredDiags; /// A pair of a canonical FunctionDecl and a SourceLocation. When used as the /// key in a hashtable, both the FD and location are hashed. @@ -10242,21 +10292,22 @@ class Sema { /// map. llvm::DenseMap, /* Caller = */ FunctionDeclAndLoc> - CUDAKnownEmittedFns; + DeviceKnownEmittedFns; - /// A partial call graph maintained during CUDA compilation to support - /// deferred diagnostics. + /// A partial call graph maintained during CUDA/OpenMP device code compilation + /// to support deferred diagnostics. /// /// Functions are only added here if, at the time they're considered, they are /// not known-emitted. As soon as we discover that a function is /// known-emitted, we remove it and everything it transitively calls from this - /// set and add those functions to CUDAKnownEmittedFns. + /// set and add those functions to DeviceKnownEmittedFns. llvm::DenseMap, /* Callees = */ llvm::MapVector, SourceLocation>> - CUDACallGraph; + DeviceCallGraph; - /// Diagnostic builder for CUDA errors which may or may not be deferred. + /// Diagnostic builder for CUDA/OpenMP devices errors which may or may not be + /// deferred. /// /// In CUDA, there exist constructs (e.g. variable-length arrays, try/catch) /// which are not allowed to appear inside __device__ functions and are @@ -10270,7 +10321,7 @@ class Sema { /// diagnostic, or no diagnostic at all, according to an argument you pass to /// its constructor, thus simplifying the process of creating these "maybe /// deferred" diagnostics. - class CUDADiagBuilder { + class DeviceDiagBuilder { public: enum Kind { /// Emit no diagnostics. @@ -10287,29 +10338,32 @@ class Sema { K_Deferred }; - CUDADiagBuilder(Kind K, SourceLocation Loc, unsigned DiagID, - FunctionDecl *Fn, Sema &S); - ~CUDADiagBuilder(); + DeviceDiagBuilder(Kind K, SourceLocation Loc, unsigned DiagID, + FunctionDecl *Fn, Sema &S); + DeviceDiagBuilder(DeviceDiagBuilder &&D); + DeviceDiagBuilder(const DeviceDiagBuilder &) = default; + ~DeviceDiagBuilder(); /// Convertible to bool: True if we immediately emitted an error, false if /// we didn't emit an error or we created a deferred error. /// /// Example usage: /// - /// if (CUDADiagBuilder(...) << foo << bar) + /// if (DeviceDiagBuilder(...) << foo << bar) /// return ExprError(); /// /// But see CUDADiagIfDeviceCode() and CUDADiagIfHostCode() -- you probably - /// want to use these instead of creating a CUDADiagBuilder yourself. + /// want to use these instead of creating a DeviceDiagBuilder yourself. operator bool() const { return ImmediateDiag.hasValue(); } template - friend const CUDADiagBuilder &operator<<(const CUDADiagBuilder &Diag, - const T &Value) { + friend const DeviceDiagBuilder &operator<<(const DeviceDiagBuilder &Diag, + const T &Value) { if (Diag.ImmediateDiag.hasValue()) *Diag.ImmediateDiag << Value; - else if (Diag.PartialDiag.hasValue()) - *Diag.PartialDiag << Value; + else if (Diag.PartialDiagId.hasValue()) + Diag.S.DeviceDeferredDiags[Diag.Fn][*Diag.PartialDiagId].second + << Value; return Diag; } @@ -10323,10 +10377,18 @@ class Sema { // Invariant: At most one of these Optionals has a value. // FIXME: Switch these to a Variant once that exists. llvm::Optional ImmediateDiag; - llvm::Optional PartialDiag; + llvm::Optional PartialDiagId; }; - /// Creates a CUDADiagBuilder that emits the diagnostic if the current context + /// Indicate that this function (and thus everything it transtively calls) + /// will be codegen'ed, and emit any deferred diagnostics on this function and + /// its (transitive) callees. + void markKnownEmitted( + Sema &S, FunctionDecl *OrigCaller, FunctionDecl *OrigCallee, + SourceLocation OrigLoc, + const llvm::function_ref IsKnownEmitted); + + /// Creates a DeviceDiagBuilder that emits the diagnostic if the current context /// is "used as device code". /// /// - If CurContext is a __host__ function, does not emit any diagnostics. @@ -10342,13 +10404,32 @@ class Sema { /// if (CUDADiagIfDeviceCode(Loc, diag::err_cuda_vla) << CurrentCUDATarget()) /// return ExprError(); /// // Otherwise, continue parsing as normal. - CUDADiagBuilder CUDADiagIfDeviceCode(SourceLocation Loc, unsigned DiagID); + DeviceDiagBuilder CUDADiagIfDeviceCode(SourceLocation Loc, unsigned DiagID); - /// Creates a CUDADiagBuilder that emits the diagnostic if the current context + /// Creates a DeviceDiagBuilder that emits the diagnostic if the current context /// is "used as host code". /// /// Same as CUDADiagIfDeviceCode, with "host" and "device" switched. - CUDADiagBuilder CUDADiagIfHostCode(SourceLocation Loc, unsigned DiagID); + DeviceDiagBuilder CUDADiagIfHostCode(SourceLocation Loc, unsigned DiagID); + + /// Creates a DeviceDiagBuilder that emits the diagnostic if the current + /// context is "used as device code". + /// + /// - If CurContext is a `declare target` function or it is known that the + /// function is emitted for the device, emits the diagnostics immediately. + /// - If CurContext is a non-`declare target` function and we are compiling + /// for the device, creates a diagnostic which is emitted if and when we + /// realize that the function will be codegen'ed. + /// + /// Example usage: + /// + /// // Variable-length arrays are not allowed in NVPTX device code. + /// if (diagIfOpenMPDeviceCode(Loc, diag::err_vla_unsupported)) + /// return ExprError(); + /// // Otherwise, continue parsing as normal. + DeviceDiagBuilder diagIfOpenMPDeviceCode(SourceLocation Loc, unsigned DiagID); + + DeviceDiagBuilder targetDiag(SourceLocation Loc, unsigned DiagID); enum CUDAFunctionTarget { CFT_Device, @@ -11072,6 +11153,7 @@ class Sema { } void ConstructSYCLKernel(FunctionDecl *KernelCallerFunc); + void MarkDevice(void); }; /// RAII object that enters a new expression evaluation context. diff --git a/clang/include/clang/StaticAnalyzer/Checkers/Checkers.td b/clang/include/clang/StaticAnalyzer/Checkers/Checkers.td index 91ad404835421..072f54c408ee1 100644 --- a/clang/include/clang/StaticAnalyzer/Checkers/Checkers.td +++ b/clang/include/clang/StaticAnalyzer/Checkers/Checkers.td @@ -508,6 +508,7 @@ def ValistBase : Checker<"ValistBase">, def UninitializedChecker : Checker<"Uninitialized">, HelpText<"Check for usages of uninitialized (or already released) va_lists.">, + Dependencies<[ValistBase]>, Documentation; def UnterminatedChecker : Checker<"Unterminated">, @@ -622,6 +623,13 @@ def UncheckedReturn : Checker<"UncheckedReturn">, Dependencies<[SecuritySyntaxChecker]>, Documentation; +def DeprecatedOrUnsafeBufferHandling : + Checker<"DeprecatedOrUnsafeBufferHandling">, + HelpText<"Warn on uses of unsecure or deprecated buffer manipulating " + "functions">, + Dependencies<[SecuritySyntaxChecker]>, + Documentation; + } // end "security.insecureAPI" let ParentPackage = Security in { @@ -704,6 +712,11 @@ def MacOSKeychainAPIChecker : Checker<"SecKeychainAPI">, HelpText<"Check for proper uses of Secure Keychain APIs">, Documentation; +def MIGChecker : Checker<"MIG">, + HelpText<"Find violations of the Mach Interface Generator " + "calling convention">, + Documentation; + def ObjCPropertyChecker : Checker<"ObjCProperty">, HelpText<"Check for proper uses of Objective-C properties">, Documentation; @@ -812,6 +825,14 @@ def GCDAntipattern : Checker<"GCDAntipattern">, Documentation; } // end "optin.performance" +let ParentPackage = OSXOptIn in { + +def OSObjectCStyleCast : Checker<"OSObjectCStyleCast">, + HelpText<"Checker for C-style casts of OSObjects">, + Documentation; + +} // end "optin.osx" + let ParentPackage = CocoaAlpha in { def IvarInvalidationModeling : Checker<"IvarInvalidationModeling">, diff --git a/clang/include/clang/StaticAnalyzer/Core/AnalyzerOptions.h b/clang/include/clang/StaticAnalyzer/Core/AnalyzerOptions.h index 775f0dd449352..b8d92132f1969 100644 --- a/clang/include/clang/StaticAnalyzer/Core/AnalyzerOptions.h +++ b/clang/include/clang/StaticAnalyzer/Core/AnalyzerOptions.h @@ -272,54 +272,74 @@ class AnalyzerOptions : public RefCountedBase { /// interpreted as true and the "false" string is interpreted as false. /// /// If an option value is not provided, returns the given \p DefaultVal. - /// @param [in] Name Name for option to retrieve. + /// @param [in] CheckerName The *full name* of the checker. One may retrieve + /// this from the checker object's field \c Name, or through \c + /// CheckerManager::getCurrentCheckName within the checker's registry + /// function. + /// Checker options are retrieved in the following format: + /// `-analyzer-config CheckerName:OptionName=Value. + /// @param [in] OptionName Name for option to retrieve. /// @param [in] DefaultVal Default value returned if no such option was /// specified. - /// @param [in] C The checker object the option belongs to. Checker options - /// are retrieved in the following format: - /// `-analyzer-config :OptionName=Value. /// @param [in] SearchInParents If set to true and the searched option was not /// specified for the given checker the options for the parent packages will /// be searched as well. The inner packages take precedence over the outer /// ones. - bool getCheckerBooleanOption(StringRef Name, bool DefaultVal, - const ento::CheckerBase *C, - bool SearchInParents = false) const; + bool getCheckerBooleanOption(StringRef CheckerName, StringRef OptionName, + bool DefaultVal, + bool SearchInParents = false) const; + bool getCheckerBooleanOption(const ento::CheckerBase *C, StringRef OptionName, + bool DefaultVal, + bool SearchInParents = false) const; /// Interprets an option's string value as an integer value. /// /// If an option value is not provided, returns the given \p DefaultVal. - /// @param [in] Name Name for option to retrieve. + /// @param [in] CheckerName The *full name* of the checker. One may retrieve + /// this from the checker object's field \c Name, or through \c + /// CheckerManager::getCurrentCheckName within the checker's registry + /// function. + /// Checker options are retrieved in the following format: + /// `-analyzer-config CheckerName:OptionName=Value. + /// @param [in] OptionName Name for option to retrieve. /// @param [in] DefaultVal Default value returned if no such option was /// specified. - /// @param [in] C The checker object the option belongs to. Checker options - /// are retrieved in the following format: - /// `-analyzer-config :OptionName=Value. /// @param [in] SearchInParents If set to true and the searched option was not /// specified for the given checker the options for the parent packages will /// be searched as well. The inner packages take precedence over the outer /// ones. - int getCheckerIntegerOption(StringRef Name, int DefaultVal, - const ento::CheckerBase *C, - bool SearchInParents = false) const; + int getCheckerIntegerOption(StringRef CheckerName, StringRef OptionName, + int DefaultVal, + bool SearchInParents = false) const; + + int getCheckerIntegerOption(const ento::CheckerBase *C, StringRef OptionName, + int DefaultVal, + bool SearchInParents = false) const; /// Query an option's string value. /// /// If an option value is not provided, returns the given \p DefaultVal. - /// @param [in] Name Name for option to retrieve. + /// @param [in] CheckerName The *full name* of the checker. One may retrieve + /// this from the checker object's field \c Name, or through \c + /// CheckerManager::getCurrentCheckName within the checker's registry + /// function. + /// Checker options are retrieved in the following format: + /// `-analyzer-config CheckerName:OptionName=Value. + /// @param [in] OptionName Name for option to retrieve. /// @param [in] DefaultVal Default value returned if no such option was /// specified. - /// @param [in] C The checker object the option belongs to. Checker options - /// are retrieved in the following format: - /// `-analyzer-config :OptionName=Value. /// @param [in] SearchInParents If set to true and the searched option was not /// specified for the given checker the options for the parent packages will /// be searched as well. The inner packages take precedence over the outer /// ones. - StringRef getCheckerStringOption(StringRef Name, StringRef DefaultVal, - const ento::CheckerBase *C, - bool SearchInParents = false) const; + StringRef getCheckerStringOption(StringRef CheckerName, StringRef OptionName, + StringRef DefaultVal, + bool SearchInParents = false) const; + + StringRef getCheckerStringOption(const ento::CheckerBase *C, + StringRef OptionName, StringRef DefaultVal, + bool SearchInParents = false) const; /// Retrieves and sets the UserMode. This is a high-level option, /// which is used to set other low-level options. It is not accessible diff --git a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h index 2121b5bc04ff1..071e35085a5f9 100644 --- a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h +++ b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h @@ -773,9 +773,6 @@ class SymbolicRegion : public SubRegion { assert(s->getType()->isAnyPointerType() || s->getType()->isReferenceType() || s->getType()->isBlockPointerType()); - - // populateWorklistFromSymbol() relies on this assertion, and needs to be - // updated if more cases are introduced. assert(isa(sreg) || isa(sreg)); } @@ -911,7 +908,7 @@ class DeclRegion : public TypedValueRegion { DeclRegion(const ValueDecl *d, const MemRegion *sReg, Kind k) : TypedValueRegion(sReg, k), D(d) { assert(classof(this)); - assert(d); + assert(d && d->isCanonicalDecl()); } static void ProfileRegion(llvm::FoldingSetNodeID& ID, const Decl *D, diff --git a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SMTAPI.h b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SMTAPI.h new file mode 100644 index 0000000000000..5164892183c88 --- /dev/null +++ b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SMTAPI.h @@ -0,0 +1,405 @@ +//===- SMTAPI.h -------------------------------------------------*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// +// This file defines a SMT generic Solver API, which will be the base class +// for every SMT solver specific class. +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_CLANG_STATICANALYZER_CORE_PATHSENSITIVE_SMTSOLVER_H +#define LLVM_CLANG_STATICANALYZER_CORE_PATHSENSITIVE_SMTSOLVER_H + +#include "clang/Basic/TargetInfo.h" +#include "llvm/ADT/APSInt.h" +#include "llvm/ADT/FoldingSet.h" + +namespace clang { +namespace ento { + +/// Generic base class for SMT sorts +class SMTSort { +public: + SMTSort() = default; + virtual ~SMTSort() = default; + + /// Returns true if the sort is a bitvector, calls isBitvectorSortImpl(). + virtual bool isBitvectorSort() const { return isBitvectorSortImpl(); } + + /// Returns true if the sort is a floating-point, calls isFloatSortImpl(). + virtual bool isFloatSort() const { return isFloatSortImpl(); } + + /// Returns true if the sort is a boolean, calls isBooleanSortImpl(). + virtual bool isBooleanSort() const { return isBooleanSortImpl(); } + + /// Returns the bitvector size, fails if the sort is not a bitvector + /// Calls getBitvectorSortSizeImpl(). + virtual unsigned getBitvectorSortSize() const { + assert(isBitvectorSort() && "Not a bitvector sort!"); + unsigned Size = getBitvectorSortSizeImpl(); + assert(Size && "Size is zero!"); + return Size; + }; + + /// Returns the floating-point size, fails if the sort is not a floating-point + /// Calls getFloatSortSizeImpl(). + virtual unsigned getFloatSortSize() const { + assert(isFloatSort() && "Not a floating-point sort!"); + unsigned Size = getFloatSortSizeImpl(); + assert(Size && "Size is zero!"); + return Size; + }; + + virtual void Profile(llvm::FoldingSetNodeID &ID) const = 0; + + bool operator<(const SMTSort &Other) const { + llvm::FoldingSetNodeID ID1, ID2; + Profile(ID1); + Other.Profile(ID2); + return ID1 < ID2; + } + + friend bool operator==(SMTSort const &LHS, SMTSort const &RHS) { + return LHS.equal_to(RHS); + } + + virtual void print(raw_ostream &OS) const = 0; + + LLVM_DUMP_METHOD void dump() const { print(llvm::errs()); } + +protected: + /// Query the SMT solver and returns true if two sorts are equal (same kind + /// and bit width). This does not check if the two sorts are the same objects. + virtual bool equal_to(SMTSort const &other) const = 0; + + /// Query the SMT solver and checks if a sort is bitvector. + virtual bool isBitvectorSortImpl() const = 0; + + /// Query the SMT solver and checks if a sort is floating-point. + virtual bool isFloatSortImpl() const = 0; + + /// Query the SMT solver and checks if a sort is boolean. + virtual bool isBooleanSortImpl() const = 0; + + /// Query the SMT solver and returns the sort bit width. + virtual unsigned getBitvectorSortSizeImpl() const = 0; + + /// Query the SMT solver and returns the sort bit width. + virtual unsigned getFloatSortSizeImpl() const = 0; +}; + +/// Shared pointer for SMTSorts, used by SMTSolver API. +using SMTSortRef = const SMTSort *; + +/// Generic base class for SMT exprs +class SMTExpr { +public: + SMTExpr() = default; + virtual ~SMTExpr() = default; + + bool operator<(const SMTExpr &Other) const { + llvm::FoldingSetNodeID ID1, ID2; + Profile(ID1); + Other.Profile(ID2); + return ID1 < ID2; + } + + virtual void Profile(llvm::FoldingSetNodeID &ID) const = 0; + + friend bool operator==(SMTExpr const &LHS, SMTExpr const &RHS) { + return LHS.equal_to(RHS); + } + + virtual void print(raw_ostream &OS) const = 0; + + LLVM_DUMP_METHOD void dump() const { print(llvm::errs()); } + +protected: + /// Query the SMT solver and returns true if two sorts are equal (same kind + /// and bit width). This does not check if the two sorts are the same objects. + virtual bool equal_to(SMTExpr const &other) const = 0; +}; + +/// Shared pointer for SMTExprs, used by SMTSolver API. +using SMTExprRef = const SMTExpr *; + +/// Generic base class for SMT Solvers +/// +/// This class is responsible for wrapping all sorts and expression generation, +/// through the mk* methods. It also provides methods to create SMT expressions +/// straight from clang's AST, through the from* methods. +class SMTSolver { +public: + SMTSolver() = default; + virtual ~SMTSolver() = default; + + LLVM_DUMP_METHOD void dump() const { print(llvm::errs()); } + + // Returns an appropriate floating-point sort for the given bitwidth. + SMTSortRef getFloatSort(unsigned BitWidth) { + switch (BitWidth) { + case 16: + return getFloat16Sort(); + case 32: + return getFloat32Sort(); + case 64: + return getFloat64Sort(); + case 128: + return getFloat128Sort(); + default:; + } + llvm_unreachable("Unsupported floating-point bitwidth!"); + } + + // Returns a boolean sort. + virtual SMTSortRef getBoolSort() = 0; + + // Returns an appropriate bitvector sort for the given bitwidth. + virtual SMTSortRef getBitvectorSort(const unsigned BitWidth) = 0; + + // Returns a floating-point sort of width 16 + virtual SMTSortRef getFloat16Sort() = 0; + + // Returns a floating-point sort of width 32 + virtual SMTSortRef getFloat32Sort() = 0; + + // Returns a floating-point sort of width 64 + virtual SMTSortRef getFloat64Sort() = 0; + + // Returns a floating-point sort of width 128 + virtual SMTSortRef getFloat128Sort() = 0; + + // Returns an appropriate sort for the given AST. + virtual SMTSortRef getSort(const SMTExprRef &AST) = 0; + + /// Given a constraint, adds it to the solver + virtual void addConstraint(const SMTExprRef &Exp) const = 0; + + /// Creates a bitvector addition operation + virtual SMTExprRef mkBVAdd(const SMTExprRef &LHS, const SMTExprRef &RHS) = 0; + + /// Creates a bitvector subtraction operation + virtual SMTExprRef mkBVSub(const SMTExprRef &LHS, const SMTExprRef &RHS) = 0; + + /// Creates a bitvector multiplication operation + virtual SMTExprRef mkBVMul(const SMTExprRef &LHS, const SMTExprRef &RHS) = 0; + + /// Creates a bitvector signed modulus operation + virtual SMTExprRef mkBVSRem(const SMTExprRef &LHS, const SMTExprRef &RHS) = 0; + + /// Creates a bitvector unsigned modulus operation + virtual SMTExprRef mkBVURem(const SMTExprRef &LHS, const SMTExprRef &RHS) = 0; + + /// Creates a bitvector signed division operation + virtual SMTExprRef mkBVSDiv(const SMTExprRef &LHS, const SMTExprRef &RHS) = 0; + + /// Creates a bitvector unsigned division operation + virtual SMTExprRef mkBVUDiv(const SMTExprRef &LHS, const SMTExprRef &RHS) = 0; + + /// Creates a bitvector logical shift left operation + virtual SMTExprRef mkBVShl(const SMTExprRef &LHS, const SMTExprRef &RHS) = 0; + + /// Creates a bitvector arithmetic shift right operation + virtual SMTExprRef mkBVAshr(const SMTExprRef &LHS, const SMTExprRef &RHS) = 0; + + /// Creates a bitvector logical shift right operation + virtual SMTExprRef mkBVLshr(const SMTExprRef &LHS, const SMTExprRef &RHS) = 0; + + /// Creates a bitvector negation operation + virtual SMTExprRef mkBVNeg(const SMTExprRef &Exp) = 0; + + /// Creates a bitvector not operation + virtual SMTExprRef mkBVNot(const SMTExprRef &Exp) = 0; + + /// Creates a bitvector xor operation + virtual SMTExprRef mkBVXor(const SMTExprRef &LHS, const SMTExprRef &RHS) = 0; + + /// Creates a bitvector or operation + virtual SMTExprRef mkBVOr(const SMTExprRef &LHS, const SMTExprRef &RHS) = 0; + + /// Creates a bitvector and operation + virtual SMTExprRef mkBVAnd(const SMTExprRef &LHS, const SMTExprRef &RHS) = 0; + + /// Creates a bitvector unsigned less-than operation + virtual SMTExprRef mkBVUlt(const SMTExprRef &LHS, const SMTExprRef &RHS) = 0; + + /// Creates a bitvector signed less-than operation + virtual SMTExprRef mkBVSlt(const SMTExprRef &LHS, const SMTExprRef &RHS) = 0; + + /// Creates a bitvector unsigned greater-than operation + virtual SMTExprRef mkBVUgt(const SMTExprRef &LHS, const SMTExprRef &RHS) = 0; + + /// Creates a bitvector signed greater-than operation + virtual SMTExprRef mkBVSgt(const SMTExprRef &LHS, const SMTExprRef &RHS) = 0; + + /// Creates a bitvector unsigned less-equal-than operation + virtual SMTExprRef mkBVUle(const SMTExprRef &LHS, const SMTExprRef &RHS) = 0; + + /// Creates a bitvector signed less-equal-than operation + virtual SMTExprRef mkBVSle(const SMTExprRef &LHS, const SMTExprRef &RHS) = 0; + + /// Creates a bitvector unsigned greater-equal-than operation + virtual SMTExprRef mkBVUge(const SMTExprRef &LHS, const SMTExprRef &RHS) = 0; + + /// Creates a bitvector signed greater-equal-than operation + virtual SMTExprRef mkBVSge(const SMTExprRef &LHS, const SMTExprRef &RHS) = 0; + + /// Creates a boolean not operation + virtual SMTExprRef mkNot(const SMTExprRef &Exp) = 0; + + /// Creates a boolean equality operation + virtual SMTExprRef mkEqual(const SMTExprRef &LHS, const SMTExprRef &RHS) = 0; + + /// Creates a boolean and operation + virtual SMTExprRef mkAnd(const SMTExprRef &LHS, const SMTExprRef &RHS) = 0; + + /// Creates a boolean or operation + virtual SMTExprRef mkOr(const SMTExprRef &LHS, const SMTExprRef &RHS) = 0; + + /// Creates a boolean ite operation + virtual SMTExprRef mkIte(const SMTExprRef &Cond, const SMTExprRef &T, + const SMTExprRef &F) = 0; + + /// Creates a bitvector sign extension operation + virtual SMTExprRef mkBVSignExt(unsigned i, const SMTExprRef &Exp) = 0; + + /// Creates a bitvector zero extension operation + virtual SMTExprRef mkBVZeroExt(unsigned i, const SMTExprRef &Exp) = 0; + + /// Creates a bitvector extract operation + virtual SMTExprRef mkBVExtract(unsigned High, unsigned Low, + const SMTExprRef &Exp) = 0; + + /// Creates a bitvector concat operation + virtual SMTExprRef mkBVConcat(const SMTExprRef &LHS, + const SMTExprRef &RHS) = 0; + + /// Creates a floating-point negation operation + virtual SMTExprRef mkFPNeg(const SMTExprRef &Exp) = 0; + + /// Creates a floating-point isInfinite operation + virtual SMTExprRef mkFPIsInfinite(const SMTExprRef &Exp) = 0; + + /// Creates a floating-point isNaN operation + virtual SMTExprRef mkFPIsNaN(const SMTExprRef &Exp) = 0; + + /// Creates a floating-point isNormal operation + virtual SMTExprRef mkFPIsNormal(const SMTExprRef &Exp) = 0; + + /// Creates a floating-point isZero operation + virtual SMTExprRef mkFPIsZero(const SMTExprRef &Exp) = 0; + + /// Creates a floating-point multiplication operation + virtual SMTExprRef mkFPMul(const SMTExprRef &LHS, const SMTExprRef &RHS) = 0; + + /// Creates a floating-point division operation + virtual SMTExprRef mkFPDiv(const SMTExprRef &LHS, const SMTExprRef &RHS) = 0; + + /// Creates a floating-point remainder operation + virtual SMTExprRef mkFPRem(const SMTExprRef &LHS, const SMTExprRef &RHS) = 0; + + /// Creates a floating-point addition operation + virtual SMTExprRef mkFPAdd(const SMTExprRef &LHS, const SMTExprRef &RHS) = 0; + + /// Creates a floating-point subtraction operation + virtual SMTExprRef mkFPSub(const SMTExprRef &LHS, const SMTExprRef &RHS) = 0; + + /// Creates a floating-point less-than operation + virtual SMTExprRef mkFPLt(const SMTExprRef &LHS, const SMTExprRef &RHS) = 0; + + /// Creates a floating-point greater-than operation + virtual SMTExprRef mkFPGt(const SMTExprRef &LHS, const SMTExprRef &RHS) = 0; + + /// Creates a floating-point less-than-or-equal operation + virtual SMTExprRef mkFPLe(const SMTExprRef &LHS, const SMTExprRef &RHS) = 0; + + /// Creates a floating-point greater-than-or-equal operation + virtual SMTExprRef mkFPGe(const SMTExprRef &LHS, const SMTExprRef &RHS) = 0; + + /// Creates a floating-point equality operation + virtual SMTExprRef mkFPEqual(const SMTExprRef &LHS, + const SMTExprRef &RHS) = 0; + + /// Creates a floating-point conversion from floatint-point to floating-point + /// operation + virtual SMTExprRef mkFPtoFP(const SMTExprRef &From, const SMTSortRef &To) = 0; + + /// Creates a floating-point conversion from signed bitvector to + /// floatint-point operation + virtual SMTExprRef mkSBVtoFP(const SMTExprRef &From, + const SMTSortRef &To) = 0; + + /// Creates a floating-point conversion from unsigned bitvector to + /// floatint-point operation + virtual SMTExprRef mkUBVtoFP(const SMTExprRef &From, + const SMTSortRef &To) = 0; + + /// Creates a floating-point conversion from floatint-point to signed + /// bitvector operation + virtual SMTExprRef mkFPtoSBV(const SMTExprRef &From, unsigned ToWidth) = 0; + + /// Creates a floating-point conversion from floatint-point to unsigned + /// bitvector operation + virtual SMTExprRef mkFPtoUBV(const SMTExprRef &From, unsigned ToWidth) = 0; + + /// Creates a new symbol, given a name and a sort + virtual SMTExprRef mkSymbol(const char *Name, SMTSortRef Sort) = 0; + + // Returns an appropriate floating-point rounding mode. + virtual SMTExprRef getFloatRoundingMode() = 0; + + // If the a model is available, returns the value of a given bitvector symbol + virtual llvm::APSInt getBitvector(const SMTExprRef &Exp, unsigned BitWidth, + bool isUnsigned) = 0; + + // If the a model is available, returns the value of a given boolean symbol + virtual bool getBoolean(const SMTExprRef &Exp) = 0; + + /// Constructs an SMTExprRef from a boolean. + virtual SMTExprRef mkBoolean(const bool b) = 0; + + /// Constructs an SMTExprRef from a finite APFloat. + virtual SMTExprRef mkFloat(const llvm::APFloat Float) = 0; + + /// Constructs an SMTExprRef from an APSInt and its bit width + virtual SMTExprRef mkBitvector(const llvm::APSInt Int, unsigned BitWidth) = 0; + + /// Given an expression, extract the value of this operand in the model. + virtual bool getInterpretation(const SMTExprRef &Exp, llvm::APSInt &Int) = 0; + + /// Given an expression extract the value of this operand in the model. + virtual bool getInterpretation(const SMTExprRef &Exp, + llvm::APFloat &Float) = 0; + + /// Check if the constraints are satisfiable + virtual Optional check() const = 0; + + /// Push the current solver state + virtual void push() = 0; + + /// Pop the previous solver state + virtual void pop(unsigned NumStates = 1) = 0; + + /// Reset the solver and remove all constraints. + virtual void reset() = 0; + + /// Checks if the solver supports floating-points. + virtual bool isFPSupported() = 0; + + virtual void print(raw_ostream &OS) const = 0; +}; + +/// Shared pointer for SMTSolvers. +using SMTSolverRef = std::shared_ptr; + +/// Convenience method to create and Z3Solver object +SMTSolverRef CreateZ3Solver(); + +} // namespace ento +} // namespace clang + +#endif diff --git a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SMTConstraintManager.h b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SMTConstraintManager.h index a407c77c32e43..72f36014edc1d 100644 --- a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SMTConstraintManager.h +++ b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SMTConstraintManager.h @@ -17,17 +17,20 @@ #include "clang/StaticAnalyzer/Core/PathSensitive/RangedConstraintManager.h" #include "clang/StaticAnalyzer/Core/PathSensitive/SMTConv.h" +typedef llvm::ImmutableSet< + std::pair> + ConstraintSMTType; +REGISTER_TRAIT_WITH_PROGRAMSTATE(ConstraintSMT, ConstraintSMTType) + namespace clang { namespace ento { -template class SMTConstraintManager : public clang::ento::SimpleConstraintManager { - SMTSolverRef &Solver; + mutable SMTSolverRef Solver = CreateZ3Solver(); public: - SMTConstraintManager(clang::ento::SubEngine *SE, clang::ento::SValBuilder &SB, - SMTSolverRef &S) - : SimpleConstraintManager(SE, SB), Solver(S) {} + SMTConstraintManager(clang::ento::SubEngine *SE, clang::ento::SValBuilder &SB) + : SimpleConstraintManager(SE, SB) {} virtual ~SMTConstraintManager() = default; //===------------------------------------------------------------------===// @@ -212,7 +215,7 @@ class SMTConstraintManager : public clang::ento::SimpleConstraintManager { OS << nl << sep << "Constraints:"; for (auto I = CZ.begin(), E = CZ.end(); I != E; ++I) { OS << nl << ' ' << I->first << " : "; - I->second.print(OS); + I->second->print(OS); } OS << nl; } @@ -272,8 +275,7 @@ class SMTConstraintManager : public clang::ento::SimpleConstraintManager { const SMTExprRef &Exp) { // Check the model, avoid simplifying AST to save time if (checkModel(State, Sym, Exp).isConstrainedTrue()) - return State->add( - std::make_pair(Sym, static_cast(*Exp))); + return State->add(std::make_pair(Sym, Exp)); return nullptr; } @@ -289,9 +291,9 @@ class SMTConstraintManager : public clang::ento::SimpleConstraintManager { if (I != IE) { std::vector ASTs; - SMTExprRef Constraint = Solver->newExprRef(I++->second); + SMTExprRef Constraint = I++->second; while (I != IE) { - Constraint = Solver->mkAnd(Constraint, Solver->newExprRef(I++->second)); + Constraint = Solver->mkAnd(Constraint, I++->second); } Solver->addConstraint(Constraint); @@ -301,8 +303,8 @@ class SMTConstraintManager : public clang::ento::SimpleConstraintManager { // Generate and check a Z3 model, using the given constraint. ConditionTruthVal checkModel(ProgramStateRef State, SymbolRef Sym, const SMTExprRef &Exp) const { - ProgramStateRef NewState = State->add( - std::make_pair(Sym, static_cast(*Exp))); + ProgramStateRef NewState = + State->add(std::make_pair(Sym, Exp)); llvm::FoldingSetNodeID ID; NewState->get().Profile(ID); diff --git a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SMTConv.h b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SMTConv.h index 955f0a36a02b0..f5145699c1e8f 100644 --- a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SMTConv.h +++ b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SMTConv.h @@ -15,7 +15,7 @@ #include "clang/AST/Expr.h" #include "clang/StaticAnalyzer/Core/PathSensitive/APSIntType.h" -#include "clang/StaticAnalyzer/Core/PathSensitive/SMTSolver.h" +#include "clang/StaticAnalyzer/Core/PathSensitive/SMTAPI.h" #include "clang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h" namespace clang { diff --git a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SMTExpr.h b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SMTExpr.h deleted file mode 100644 index 1b975e1a43e4e..0000000000000 --- a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SMTExpr.h +++ /dev/null @@ -1,61 +0,0 @@ -//== SMTExpr.h --------------------------------------------------*- C++ -*--==// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// -// -// This file defines a SMT generic Expr API, which will be the base class -// for every SMT solver expr specific class. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CLANG_STATICANALYZER_CORE_PATHSENSITIVE_SMTEXPR_H -#define LLVM_CLANG_STATICANALYZER_CORE_PATHSENSITIVE_SMTEXPR_H - -#include "clang/Basic/TargetInfo.h" -#include "llvm/ADT/FoldingSet.h" - -namespace clang { -namespace ento { - -/// Generic base class for SMT exprs -class SMTExpr { -public: - SMTExpr() = default; - virtual ~SMTExpr() = default; - - bool operator<(const SMTExpr &Other) const { - llvm::FoldingSetNodeID ID1, ID2; - Profile(ID1); - Other.Profile(ID2); - return ID1 < ID2; - } - - virtual void Profile(llvm::FoldingSetNodeID &ID) const { - static int Tag = 0; - ID.AddPointer(&Tag); - } - - friend bool operator==(SMTExpr const &LHS, SMTExpr const &RHS) { - return LHS.equal_to(RHS); - } - - virtual void print(raw_ostream &OS) const = 0; - - LLVM_DUMP_METHOD void dump() const { print(llvm::errs()); } - -protected: - /// Query the SMT solver and returns true if two sorts are equal (same kind - /// and bit width). This does not check if the two sorts are the same objects. - virtual bool equal_to(SMTExpr const &other) const = 0; -}; - -/// Shared pointer for SMTExprs, used by SMTSolver API. -using SMTExprRef = std::shared_ptr; - -} // namespace ento -} // namespace clang - -#endif diff --git a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SMTSolver.h b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SMTSolver.h deleted file mode 100644 index e5d71ade7d46e..0000000000000 --- a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SMTSolver.h +++ /dev/null @@ -1,302 +0,0 @@ -//== SMTSolver.h ------------------------------------------------*- C++ -*--==// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// -// -// This file defines a SMT generic Solver API, which will be the base class -// for every SMT solver specific class. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CLANG_STATICANALYZER_CORE_PATHSENSITIVE_SMTSOLVER_H -#define LLVM_CLANG_STATICANALYZER_CORE_PATHSENSITIVE_SMTSOLVER_H - -#include "clang/StaticAnalyzer/Core/PathSensitive/SMTExpr.h" -#include "clang/StaticAnalyzer/Core/PathSensitive/SMTSort.h" -#include "llvm/ADT/APSInt.h" - -namespace clang { -namespace ento { - -/// Generic base class for SMT Solvers -/// -/// This class is responsible for wrapping all sorts and expression generation, -/// through the mk* methods. It also provides methods to create SMT expressions -/// straight from clang's AST, through the from* methods. -class SMTSolver { -public: - SMTSolver() = default; - virtual ~SMTSolver() = default; - - LLVM_DUMP_METHOD void dump() const { print(llvm::errs()); } - - // Returns an appropriate floating-point sort for the given bitwidth. - SMTSortRef getFloatSort(unsigned BitWidth) { - switch (BitWidth) { - case 16: - return getFloat16Sort(); - case 32: - return getFloat32Sort(); - case 64: - return getFloat64Sort(); - case 128: - return getFloat128Sort(); - default:; - } - llvm_unreachable("Unsupported floating-point bitwidth!"); - } - - // Returns a boolean sort. - virtual SMTSortRef getBoolSort() = 0; - - // Returns an appropriate bitvector sort for the given bitwidth. - virtual SMTSortRef getBitvectorSort(const unsigned BitWidth) = 0; - - // Returns a floating-point sort of width 16 - virtual SMTSortRef getFloat16Sort() = 0; - - // Returns a floating-point sort of width 32 - virtual SMTSortRef getFloat32Sort() = 0; - - // Returns a floating-point sort of width 64 - virtual SMTSortRef getFloat64Sort() = 0; - - // Returns a floating-point sort of width 128 - virtual SMTSortRef getFloat128Sort() = 0; - - // Returns an appropriate sort for the given AST. - virtual SMTSortRef getSort(const SMTExprRef &AST) = 0; - - // Returns a new SMTExprRef from an SMTExpr - virtual SMTExprRef newExprRef(const SMTExpr &E) const = 0; - - /// Given a constraint, adds it to the solver - virtual void addConstraint(const SMTExprRef &Exp) const = 0; - - /// Creates a bitvector addition operation - virtual SMTExprRef mkBVAdd(const SMTExprRef &LHS, const SMTExprRef &RHS) = 0; - - /// Creates a bitvector subtraction operation - virtual SMTExprRef mkBVSub(const SMTExprRef &LHS, const SMTExprRef &RHS) = 0; - - /// Creates a bitvector multiplication operation - virtual SMTExprRef mkBVMul(const SMTExprRef &LHS, const SMTExprRef &RHS) = 0; - - /// Creates a bitvector signed modulus operation - virtual SMTExprRef mkBVSRem(const SMTExprRef &LHS, const SMTExprRef &RHS) = 0; - - /// Creates a bitvector unsigned modulus operation - virtual SMTExprRef mkBVURem(const SMTExprRef &LHS, const SMTExprRef &RHS) = 0; - - /// Creates a bitvector signed division operation - virtual SMTExprRef mkBVSDiv(const SMTExprRef &LHS, const SMTExprRef &RHS) = 0; - - /// Creates a bitvector unsigned division operation - virtual SMTExprRef mkBVUDiv(const SMTExprRef &LHS, const SMTExprRef &RHS) = 0; - - /// Creates a bitvector logical shift left operation - virtual SMTExprRef mkBVShl(const SMTExprRef &LHS, const SMTExprRef &RHS) = 0; - - /// Creates a bitvector arithmetic shift right operation - virtual SMTExprRef mkBVAshr(const SMTExprRef &LHS, const SMTExprRef &RHS) = 0; - - /// Creates a bitvector logical shift right operation - virtual SMTExprRef mkBVLshr(const SMTExprRef &LHS, const SMTExprRef &RHS) = 0; - - /// Creates a bitvector negation operation - virtual SMTExprRef mkBVNeg(const SMTExprRef &Exp) = 0; - - /// Creates a bitvector not operation - virtual SMTExprRef mkBVNot(const SMTExprRef &Exp) = 0; - - /// Creates a bitvector xor operation - virtual SMTExprRef mkBVXor(const SMTExprRef &LHS, const SMTExprRef &RHS) = 0; - - /// Creates a bitvector or operation - virtual SMTExprRef mkBVOr(const SMTExprRef &LHS, const SMTExprRef &RHS) = 0; - - /// Creates a bitvector and operation - virtual SMTExprRef mkBVAnd(const SMTExprRef &LHS, const SMTExprRef &RHS) = 0; - - /// Creates a bitvector unsigned less-than operation - virtual SMTExprRef mkBVUlt(const SMTExprRef &LHS, const SMTExprRef &RHS) = 0; - - /// Creates a bitvector signed less-than operation - virtual SMTExprRef mkBVSlt(const SMTExprRef &LHS, const SMTExprRef &RHS) = 0; - - /// Creates a bitvector unsigned greater-than operation - virtual SMTExprRef mkBVUgt(const SMTExprRef &LHS, const SMTExprRef &RHS) = 0; - - /// Creates a bitvector signed greater-than operation - virtual SMTExprRef mkBVSgt(const SMTExprRef &LHS, const SMTExprRef &RHS) = 0; - - /// Creates a bitvector unsigned less-equal-than operation - virtual SMTExprRef mkBVUle(const SMTExprRef &LHS, const SMTExprRef &RHS) = 0; - - /// Creates a bitvector signed less-equal-than operation - virtual SMTExprRef mkBVSle(const SMTExprRef &LHS, const SMTExprRef &RHS) = 0; - - /// Creates a bitvector unsigned greater-equal-than operation - virtual SMTExprRef mkBVUge(const SMTExprRef &LHS, const SMTExprRef &RHS) = 0; - - /// Creates a bitvector signed greater-equal-than operation - virtual SMTExprRef mkBVSge(const SMTExprRef &LHS, const SMTExprRef &RHS) = 0; - - /// Creates a boolean not operation - virtual SMTExprRef mkNot(const SMTExprRef &Exp) = 0; - - /// Creates a boolean equality operation - virtual SMTExprRef mkEqual(const SMTExprRef &LHS, const SMTExprRef &RHS) = 0; - - /// Creates a boolean and operation - virtual SMTExprRef mkAnd(const SMTExprRef &LHS, const SMTExprRef &RHS) = 0; - - /// Creates a boolean or operation - virtual SMTExprRef mkOr(const SMTExprRef &LHS, const SMTExprRef &RHS) = 0; - - /// Creates a boolean ite operation - virtual SMTExprRef mkIte(const SMTExprRef &Cond, const SMTExprRef &T, - const SMTExprRef &F) = 0; - - /// Creates a bitvector sign extension operation - virtual SMTExprRef mkBVSignExt(unsigned i, const SMTExprRef &Exp) = 0; - - /// Creates a bitvector zero extension operation - virtual SMTExprRef mkBVZeroExt(unsigned i, const SMTExprRef &Exp) = 0; - - /// Creates a bitvector extract operation - virtual SMTExprRef mkBVExtract(unsigned High, unsigned Low, - const SMTExprRef &Exp) = 0; - - /// Creates a bitvector concat operation - virtual SMTExprRef mkBVConcat(const SMTExprRef &LHS, - const SMTExprRef &RHS) = 0; - - /// Creates a floating-point negation operation - virtual SMTExprRef mkFPNeg(const SMTExprRef &Exp) = 0; - - /// Creates a floating-point isInfinite operation - virtual SMTExprRef mkFPIsInfinite(const SMTExprRef &Exp) = 0; - - /// Creates a floating-point isNaN operation - virtual SMTExprRef mkFPIsNaN(const SMTExprRef &Exp) = 0; - - /// Creates a floating-point isNormal operation - virtual SMTExprRef mkFPIsNormal(const SMTExprRef &Exp) = 0; - - /// Creates a floating-point isZero operation - virtual SMTExprRef mkFPIsZero(const SMTExprRef &Exp) = 0; - - /// Creates a floating-point multiplication operation - virtual SMTExprRef mkFPMul(const SMTExprRef &LHS, const SMTExprRef &RHS) = 0; - - /// Creates a floating-point division operation - virtual SMTExprRef mkFPDiv(const SMTExprRef &LHS, const SMTExprRef &RHS) = 0; - - /// Creates a floating-point remainder operation - virtual SMTExprRef mkFPRem(const SMTExprRef &LHS, const SMTExprRef &RHS) = 0; - - /// Creates a floating-point addition operation - virtual SMTExprRef mkFPAdd(const SMTExprRef &LHS, const SMTExprRef &RHS) = 0; - - /// Creates a floating-point subtraction operation - virtual SMTExprRef mkFPSub(const SMTExprRef &LHS, const SMTExprRef &RHS) = 0; - - /// Creates a floating-point less-than operation - virtual SMTExprRef mkFPLt(const SMTExprRef &LHS, const SMTExprRef &RHS) = 0; - - /// Creates a floating-point greater-than operation - virtual SMTExprRef mkFPGt(const SMTExprRef &LHS, const SMTExprRef &RHS) = 0; - - /// Creates a floating-point less-than-or-equal operation - virtual SMTExprRef mkFPLe(const SMTExprRef &LHS, const SMTExprRef &RHS) = 0; - - /// Creates a floating-point greater-than-or-equal operation - virtual SMTExprRef mkFPGe(const SMTExprRef &LHS, const SMTExprRef &RHS) = 0; - - /// Creates a floating-point equality operation - virtual SMTExprRef mkFPEqual(const SMTExprRef &LHS, - const SMTExprRef &RHS) = 0; - - /// Creates a floating-point conversion from floatint-point to floating-point - /// operation - virtual SMTExprRef mkFPtoFP(const SMTExprRef &From, const SMTSortRef &To) = 0; - - /// Creates a floating-point conversion from signed bitvector to - /// floatint-point operation - virtual SMTExprRef mkSBVtoFP(const SMTExprRef &From, - const SMTSortRef &To) = 0; - - /// Creates a floating-point conversion from unsigned bitvector to - /// floatint-point operation - virtual SMTExprRef mkUBVtoFP(const SMTExprRef &From, - const SMTSortRef &To) = 0; - - /// Creates a floating-point conversion from floatint-point to signed - /// bitvector operation - virtual SMTExprRef mkFPtoSBV(const SMTExprRef &From, unsigned ToWidth) = 0; - - /// Creates a floating-point conversion from floatint-point to unsigned - /// bitvector operation - virtual SMTExprRef mkFPtoUBV(const SMTExprRef &From, unsigned ToWidth) = 0; - - /// Creates a new symbol, given a name and a sort - virtual SMTExprRef mkSymbol(const char *Name, SMTSortRef Sort) = 0; - - // Returns an appropriate floating-point rounding mode. - virtual SMTExprRef getFloatRoundingMode() = 0; - - // If the a model is available, returns the value of a given bitvector symbol - virtual llvm::APSInt getBitvector(const SMTExprRef &Exp, unsigned BitWidth, - bool isUnsigned) = 0; - - // If the a model is available, returns the value of a given boolean symbol - virtual bool getBoolean(const SMTExprRef &Exp) = 0; - - /// Constructs an SMTExprRef from a boolean. - virtual SMTExprRef mkBoolean(const bool b) = 0; - - /// Constructs an SMTExprRef from a finite APFloat. - virtual SMTExprRef mkFloat(const llvm::APFloat Float) = 0; - - /// Constructs an SMTExprRef from an APSInt and its bit width - virtual SMTExprRef mkBitvector(const llvm::APSInt Int, unsigned BitWidth) = 0; - - /// Given an expression, extract the value of this operand in the model. - virtual bool getInterpretation(const SMTExprRef &Exp, llvm::APSInt &Int) = 0; - - /// Given an expression extract the value of this operand in the model. - virtual bool getInterpretation(const SMTExprRef &Exp, - llvm::APFloat &Float) = 0; - - /// Check if the constraints are satisfiable - virtual Optional check() const = 0; - - /// Push the current solver state - virtual void push() = 0; - - /// Pop the previous solver state - virtual void pop(unsigned NumStates = 1) = 0; - - /// Reset the solver and remove all constraints. - virtual void reset() = 0; - - /// Checks if the solver supports floating-points. - virtual bool isFPSupported() = 0; - - virtual void print(raw_ostream &OS) const = 0; -}; - -/// Shared pointer for SMTSolvers. -using SMTSolverRef = std::shared_ptr; - -/// Convenience method to create and Z3Solver object -SMTSolverRef CreateZ3Solver(); - -} // namespace ento -} // namespace clang - -#endif diff --git a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SMTSort.h b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SMTSort.h deleted file mode 100644 index cbafb8469e507..0000000000000 --- a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SMTSort.h +++ /dev/null @@ -1,90 +0,0 @@ -//== SMTSort.h --------------------------------------------------*- C++ -*--==// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// -// -// This file defines a SMT generic Sort API, which will be the base class -// for every SMT solver sort specific class. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CLANG_STATICANALYZER_CORE_PATHSENSITIVE_SMTSORT_H -#define LLVM_CLANG_STATICANALYZER_CORE_PATHSENSITIVE_SMTSORT_H - -#include "clang/Basic/TargetInfo.h" - -namespace clang { -namespace ento { - -/// Generic base class for SMT sorts -class SMTSort { -public: - SMTSort() = default; - virtual ~SMTSort() = default; - - /// Returns true if the sort is a bitvector, calls isBitvectorSortImpl(). - virtual bool isBitvectorSort() const { return isBitvectorSortImpl(); } - - /// Returns true if the sort is a floating-point, calls isFloatSortImpl(). - virtual bool isFloatSort() const { return isFloatSortImpl(); } - - /// Returns true if the sort is a boolean, calls isBooleanSortImpl(). - virtual bool isBooleanSort() const { return isBooleanSortImpl(); } - - /// Returns the bitvector size, fails if the sort is not a bitvector - /// Calls getBitvectorSortSizeImpl(). - virtual unsigned getBitvectorSortSize() const { - assert(isBitvectorSort() && "Not a bitvector sort!"); - unsigned Size = getBitvectorSortSizeImpl(); - assert(Size && "Size is zero!"); - return Size; - }; - - /// Returns the floating-point size, fails if the sort is not a floating-point - /// Calls getFloatSortSizeImpl(). - virtual unsigned getFloatSortSize() const { - assert(isFloatSort() && "Not a floating-point sort!"); - unsigned Size = getFloatSortSizeImpl(); - assert(Size && "Size is zero!"); - return Size; - }; - - friend bool operator==(SMTSort const &LHS, SMTSort const &RHS) { - return LHS.equal_to(RHS); - } - - virtual void print(raw_ostream &OS) const = 0; - - LLVM_DUMP_METHOD void dump() const { print(llvm::errs()); } - -protected: - /// Query the SMT solver and returns true if two sorts are equal (same kind - /// and bit width). This does not check if the two sorts are the same objects. - virtual bool equal_to(SMTSort const &other) const = 0; - - /// Query the SMT solver and checks if a sort is bitvector. - virtual bool isBitvectorSortImpl() const = 0; - - /// Query the SMT solver and checks if a sort is floating-point. - virtual bool isFloatSortImpl() const = 0; - - /// Query the SMT solver and checks if a sort is boolean. - virtual bool isBooleanSortImpl() const = 0; - - /// Query the SMT solver and returns the sort bit width. - virtual unsigned getBitvectorSortSizeImpl() const = 0; - - /// Query the SMT solver and returns the sort bit width. - virtual unsigned getFloatSortSizeImpl() const = 0; -}; - -/// Shared pointer for SMTSorts, used by SMTSolver API. -using SMTSortRef = std::shared_ptr; - -} // namespace ento -} // namespace clang - -#endif diff --git a/clang/lib/ARCMigrate/ARCMT.cpp b/clang/lib/ARCMigrate/ARCMT.cpp index d057dfcdf966b..a0b9dc0f2e3b2 100644 --- a/clang/lib/ARCMigrate/ARCMT.cpp +++ b/clang/lib/ARCMigrate/ARCMT.cpp @@ -35,10 +35,10 @@ bool CapturedDiagList::clearDiagnostic(ArrayRef IDs, while (I != List.end()) { FullSourceLoc diagLoc = I->getLocation(); if ((IDs.empty() || // empty means clear all diagnostics in the range. - std::find(IDs.begin(), IDs.end(), I->getID()) != IDs.end()) && + llvm::is_contained(IDs, I->getID())) && !diagLoc.isBeforeInTranslationUnitThan(range.getBegin()) && (diagLoc == range.getEnd() || - diagLoc.isBeforeInTranslationUnitThan(range.getEnd()))) { + diagLoc.isBeforeInTranslationUnitThan(range.getEnd()))) { cleared = true; ListTy::iterator eraseS = I++; if (eraseS->getLevel() != DiagnosticsEngine::Note) diff --git a/clang/lib/ARCMigrate/TransEmptyStatementsAndDealloc.cpp b/clang/lib/ARCMigrate/TransEmptyStatementsAndDealloc.cpp index a113ca95692aa..74d59338689e9 100644 --- a/clang/lib/ARCMigrate/TransEmptyStatementsAndDealloc.cpp +++ b/clang/lib/ARCMigrate/TransEmptyStatementsAndDealloc.cpp @@ -1,4 +1,4 @@ -//===--- TransEmptyStatements.cpp - Transformations to ARC mode -----------===// +//===-- TransEmptyStatementsAndDealloc.cpp - Transformations to ARC mode --===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/clang/lib/ARCMigrate/TransformActions.cpp b/clang/lib/ARCMigrate/TransformActions.cpp index f76cc2c130f7f..2c48e479dce8c 100644 --- a/clang/lib/ARCMigrate/TransformActions.cpp +++ b/clang/lib/ARCMigrate/TransformActions.cpp @@ -1,4 +1,4 @@ -//===--- ARCMT.cpp - Migration to ARC mode --------------------------------===// +//===-- TransformActions.cpp - Migration to ARC mode ----------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp index c42bfe01d93d1..9db6e327837c7 100644 --- a/clang/lib/AST/ASTContext.cpp +++ b/clang/lib/AST/ASTContext.cpp @@ -94,19 +94,6 @@ using namespace clang; -unsigned ASTContext::NumImplicitDefaultConstructors; -unsigned ASTContext::NumImplicitDefaultConstructorsDeclared; -unsigned ASTContext::NumImplicitCopyConstructors; -unsigned ASTContext::NumImplicitCopyConstructorsDeclared; -unsigned ASTContext::NumImplicitMoveConstructors; -unsigned ASTContext::NumImplicitMoveConstructorsDeclared; -unsigned ASTContext::NumImplicitCopyAssignmentOperators; -unsigned ASTContext::NumImplicitCopyAssignmentOperatorsDeclared; -unsigned ASTContext::NumImplicitMoveAssignmentOperators; -unsigned ASTContext::NumImplicitMoveAssignmentOperatorsDeclared; -unsigned ASTContext::NumImplicitDestructors; -unsigned ASTContext::NumImplicitDestructorsDeclared; - enum FloatingRank { Float16Rank, HalfRank, FloatRank, DoubleRank, LongDoubleRank, Float128Rank }; @@ -763,7 +750,7 @@ static const LangASMap *getAddressSpaceMap(const TargetInfo &T, 1, // sycl_global 3, // sycl_local 2, // sycl_constant - 5, // sycl_private + 0, // sycl_private 4, // sycl_generic }; return &FakeAddrSpaceMap; @@ -1920,8 +1907,16 @@ TypeInfo ASTContext::getTypeInfoImpl(const Type *T) const { break; case BuiltinType::Float16: case BuiltinType::Half: - Width = Target->getHalfWidth(); - Align = Target->getHalfAlign(); + if (Target->hasFloat16Type() || !getLangOpts().OpenMP || + !getLangOpts().OpenMPIsDevice) { + Width = Target->getHalfWidth(); + Align = Target->getHalfAlign(); + } else { + assert(getLangOpts().OpenMP && getLangOpts().OpenMPIsDevice && + "Expected OpenMP device compilation."); + Width = AuxTarget->getHalfWidth(); + Align = AuxTarget->getHalfAlign(); + } break; case BuiltinType::Float: Width = Target->getFloatWidth(); @@ -1936,8 +1931,16 @@ TypeInfo ASTContext::getTypeInfoImpl(const Type *T) const { Align = Target->getLongDoubleAlign(); break; case BuiltinType::Float128: - Width = Target->getFloat128Width(); - Align = Target->getFloat128Align(); + if (Target->hasFloat128Type() || !getLangOpts().OpenMP || + !getLangOpts().OpenMPIsDevice) { + Width = Target->getFloat128Width(); + Align = Target->getFloat128Align(); + } else { + assert(getLangOpts().OpenMP && getLangOpts().OpenMPIsDevice && + "Expected OpenMP device compilation."); + Width = AuxTarget->getFloat128Width(); + Align = AuxTarget->getFloat128Align(); + } break; case BuiltinType::NullPtr: Width = Target->getPointerWidth(0); // C++ 3.9.1p11: sizeof(nullptr_t) @@ -2776,7 +2779,7 @@ QualType ASTContext::getFunctionTypeWithExceptionSpec( // Anything else must be a function type. Rebuild it with the new exception // specification. - const auto *Proto = cast(Orig); + const auto *Proto = Orig->getAs(); return getFunctionType( Proto->getReturnType(), Proto->getParamTypes(), Proto->getExtProtoInfo().withExceptionSpec(ESI)); @@ -5613,6 +5616,12 @@ int ASTContext::getFloatingTypeOrder(QualType LHS, QualType RHS) const { return -1; } +int ASTContext::getFloatingTypeSemanticOrder(QualType LHS, QualType RHS) const { + if (&getFloatTypeSemantics(LHS) == &getFloatTypeSemantics(RHS)) + return 0; + return getFloatingTypeOrder(LHS, RHS); +} + /// getIntegerRank - Return an integer conversion rank (C99 6.3.1.1p1). This /// routine will assert if passed a built-in type that isn't an integer or enum, /// or if it is not canonicalized. @@ -9561,10 +9570,12 @@ QualType ASTContext::GetBuiltinType(unsigned Id, assert((TypeStr[0] != '.' || TypeStr[1] == 0) && "'.' should only occur at end of builtin type list!"); - FunctionType::ExtInfo EI(CC_C); + bool Variadic = (TypeStr[0] == '.'); + + FunctionType::ExtInfo EI( + getDefaultCallingConvention(Variadic, /*IsCXXMethod=*/false)); if (BuiltinInfo.isNoReturn(Id)) EI = EI.withNoReturn(true); - bool Variadic = (TypeStr[0] == '.'); // We really shouldn't be making a no-proto type here. if (ArgTypes.empty() && Variadic && !getLangOpts().CPlusPlus) @@ -9941,7 +9952,7 @@ void ASTContext::forEachMultiversionedFunctionVersion( CallingConv ASTContext::getDefaultCallingConvention(bool IsVariadic, bool IsCXXMethod) const { // Pass through to the C++ ABI object - if (IsCXXMethod && !LangOpts.SYCL) + if (IsCXXMethod && !LangOpts.SYCLIsDevice) return ABI->getDefaultMethodCallConv(IsVariadic); switch (LangOpts.getDefaultCallingConv()) { @@ -9986,8 +9997,10 @@ VTableContextBase *ASTContext::getVTableContext() { return VTContext.get(); } -MangleContext *ASTContext::createMangleContext() { - switch (Target->getCXXABI().getKind()) { +MangleContext *ASTContext::createMangleContext(const TargetInfo *T) { + if (!T) + T = Target; + switch (T->getCXXABI().getKind()) { case TargetCXXABI::GenericAArch64: case TargetCXXABI::GenericItanium: case TargetCXXABI::GenericARM: diff --git a/clang/lib/AST/ASTImporter.cpp b/clang/lib/AST/ASTImporter.cpp index 76407d54415e2..3b484f94003f4 100644 --- a/clang/lib/AST/ASTImporter.cpp +++ b/clang/lib/AST/ASTImporter.cpp @@ -439,6 +439,9 @@ namespace clang { Error ImportFunctionDeclBody(FunctionDecl *FromFD, FunctionDecl *ToFD); + template + bool hasSameVisibilityContext(T *Found, T *From); + bool IsStructuralMatch(Decl *From, Decl *To, bool Complain); bool IsStructuralMatch(RecordDecl *FromRecord, RecordDecl *ToRecord, bool Complain = true); @@ -549,6 +552,7 @@ namespace clang { // Importing expressions ExpectedStmt VisitExpr(Expr *E); ExpectedStmt VisitVAArgExpr(VAArgExpr *E); + ExpectedStmt VisitChooseExpr(ChooseExpr *E); ExpectedStmt VisitGNUNullExpr(GNUNullExpr *E); ExpectedStmt VisitPredefinedExpr(PredefinedExpr *E); ExpectedStmt VisitDeclRefExpr(DeclRefExpr *E); @@ -2549,26 +2553,6 @@ ExpectedDecl ASTNodeImporter::VisitRecordDecl(RecordDecl *D) { Decl::FOK_None; } - // If this record has a definition in the translation unit we're coming from, - // but this particular declaration is not that definition, import the - // definition and map to that. - TagDecl *Definition = D->getDefinition(); - if (Definition && Definition != D && - // Friend template declaration must be imported on its own. - !IsFriendTemplate && - // In contrast to a normal CXXRecordDecl, the implicit - // CXXRecordDecl of ClassTemplateSpecializationDecl is its redeclaration. - // The definition of the implicit CXXRecordDecl in this case is the - // ClassTemplateSpecializationDecl itself. Thus, we start with an extra - // condition in order to be able to import the implict Decl. - !D->isImplicit()) { - ExpectedDecl ImportedDefOrErr = import(Definition); - if (!ImportedDefOrErr) - return ImportedDefOrErr.takeError(); - - return Importer.MapImported(D, *ImportedDefOrErr); - } - // Import the major distinguishing characteristics of this record. DeclContext *DC, *LexicalDC; DeclarationName Name; @@ -2597,7 +2581,8 @@ ExpectedDecl ASTNodeImporter::VisitRecordDecl(RecordDecl *D) { auto FoundDecls = Importer.findDeclsInToCtx(DC, SearchName); if (!FoundDecls.empty()) { - // We're going to have to compare D against potentially conflicting Decls, so complete it. + // We're going to have to compare D against potentially conflicting Decls, + // so complete it. if (D->hasExternalLexicalStorage() && !D->isCompleteDefinition()) D->getASTContext().getExternalSource()->CompleteType(D); } @@ -2957,6 +2942,19 @@ Error ASTNodeImporter::ImportFunctionDeclBody(FunctionDecl *FromFD, return Error::success(); } +template +bool ASTNodeImporter::hasSameVisibilityContext(T *Found, T *From) { + if (From->hasExternalFormalLinkage()) + return Found->hasExternalFormalLinkage(); + if (Importer.GetFromTU(Found) != From->getTranslationUnitDecl()) + return false; + if (From->isInAnonymousNamespace()) + return Found->isInAnonymousNamespace(); + else + return !Found->isInAnonymousNamespace() && + !Found->hasExternalFormalLinkage(); +} + ExpectedDecl ASTNodeImporter::VisitFunctionDecl(FunctionDecl *D) { SmallVector Redecls = getCanonicalForwardRedeclChain(D); @@ -3010,33 +3008,30 @@ ExpectedDecl ASTNodeImporter::VisitFunctionDecl(FunctionDecl *D) { continue; if (auto *FoundFunction = dyn_cast(FoundDecl)) { - if (FoundFunction->hasExternalFormalLinkage() && - D->hasExternalFormalLinkage()) { - if (IsStructuralMatch(D, FoundFunction)) { - const FunctionDecl *Definition = nullptr; - if (D->doesThisDeclarationHaveABody() && - FoundFunction->hasBody(Definition)) { - return Importer.MapImported( - D, const_cast(Definition)); - } - FoundByLookup = FoundFunction; - break; - } - - // FIXME: Check for overloading more carefully, e.g., by boosting - // Sema::IsOverload out to the AST library. + if (!hasSameVisibilityContext(FoundFunction, D)) + continue; + + if (IsStructuralMatch(D, FoundFunction)) { + const FunctionDecl *Definition = nullptr; + if (D->doesThisDeclarationHaveABody() && + FoundFunction->hasBody(Definition)) + return Importer.MapImported(D, + const_cast(Definition)); + FoundByLookup = FoundFunction; + break; + } + // FIXME: Check for overloading more carefully, e.g., by boosting + // Sema::IsOverload out to the AST library. - // Function overloading is okay in C++. - if (Importer.getToContext().getLangOpts().CPlusPlus) - continue; + // Function overloading is okay in C++. + if (Importer.getToContext().getLangOpts().CPlusPlus) + continue; - // Complain about inconsistent function types. - Importer.ToDiag(Loc, diag::err_odr_function_type_inconsistent) + // Complain about inconsistent function types. + Importer.ToDiag(Loc, diag::err_odr_function_type_inconsistent) << Name << D->getType() << FoundFunction->getType(); - Importer.ToDiag(FoundFunction->getLocation(), - diag::note_odr_value_here) + Importer.ToDiag(FoundFunction->getLocation(), diag::note_odr_value_here) << FoundFunction->getType(); - } } ConflictingDecls.push_back(FoundDecl); @@ -3609,58 +3604,56 @@ ExpectedDecl ASTNodeImporter::VisitVarDecl(VarDecl *D) { continue; if (auto *FoundVar = dyn_cast(FoundDecl)) { - // We have found a variable that we may need to merge with. Check it. - if (FoundVar->hasExternalFormalLinkage() && - D->hasExternalFormalLinkage()) { - if (Importer.IsStructurallyEquivalent(D->getType(), - FoundVar->getType())) { - - // The VarDecl in the "From" context has a definition, but in the - // "To" context we already have a definition. - VarDecl *FoundDef = FoundVar->getDefinition(); - if (D->isThisDeclarationADefinition() && FoundDef) - // FIXME Check for ODR error if the two definitions have - // different initializers? - return Importer.MapImported(D, FoundDef); - - // The VarDecl in the "From" context has an initializer, but in the - // "To" context we already have an initializer. - const VarDecl *FoundDInit = nullptr; - if (D->getInit() && FoundVar->getAnyInitializer(FoundDInit)) - // FIXME Diagnose ODR error if the two initializers are different? - return Importer.MapImported(D, const_cast(FoundDInit)); + if (!hasSameVisibilityContext(FoundVar, D)) + continue; + if (Importer.IsStructurallyEquivalent(D->getType(), + FoundVar->getType())) { + + // The VarDecl in the "From" context has a definition, but in the + // "To" context we already have a definition. + VarDecl *FoundDef = FoundVar->getDefinition(); + if (D->isThisDeclarationADefinition() && FoundDef) + // FIXME Check for ODR error if the two definitions have + // different initializers? + return Importer.MapImported(D, FoundDef); + + // The VarDecl in the "From" context has an initializer, but in the + // "To" context we already have an initializer. + const VarDecl *FoundDInit = nullptr; + if (D->getInit() && FoundVar->getAnyInitializer(FoundDInit)) + // FIXME Diagnose ODR error if the two initializers are different? + return Importer.MapImported(D, const_cast(FoundDInit)); + + FoundByLookup = FoundVar; + break; + } + + const ArrayType *FoundArray + = Importer.getToContext().getAsArrayType(FoundVar->getType()); + const ArrayType *TArray + = Importer.getToContext().getAsArrayType(D->getType()); + if (FoundArray && TArray) { + if (isa(FoundArray) && + isa(TArray)) { + // Import the type. + if (auto TyOrErr = import(D->getType())) + FoundVar->setType(*TyOrErr); + else + return TyOrErr.takeError(); FoundByLookup = FoundVar; break; + } else if (isa(TArray) && + isa(FoundArray)) { + FoundByLookup = FoundVar; + break; } - - const ArrayType *FoundArray - = Importer.getToContext().getAsArrayType(FoundVar->getType()); - const ArrayType *TArray - = Importer.getToContext().getAsArrayType(D->getType()); - if (FoundArray && TArray) { - if (isa(FoundArray) && - isa(TArray)) { - // Import the type. - if (auto TyOrErr = import(D->getType())) - FoundVar->setType(*TyOrErr); - else - return TyOrErr.takeError(); - - FoundByLookup = FoundVar; - break; - } else if (isa(TArray) && - isa(FoundArray)) { - FoundByLookup = FoundVar; - break; - } - } - - Importer.ToDiag(Loc, diag::err_odr_variable_type_inconsistent) - << Name << D->getType() << FoundVar->getType(); - Importer.ToDiag(FoundVar->getLocation(), diag::note_odr_value_here) - << FoundVar->getType(); } + + Importer.ToDiag(Loc, diag::err_odr_variable_type_inconsistent) + << Name << D->getType() << FoundVar->getType(); + Importer.ToDiag(FoundVar->getLocation(), diag::note_odr_value_here) + << FoundVar->getType(); } ConflictingDecls.push_back(FoundDecl); @@ -4964,17 +4957,6 @@ static ClassTemplateDecl *getDefinition(ClassTemplateDecl *D) { ExpectedDecl ASTNodeImporter::VisitClassTemplateDecl(ClassTemplateDecl *D) { bool IsFriend = D->getFriendObjectKind() != Decl::FOK_None; - // If this template has a definition in the translation unit we're coming - // from, but this particular declaration is not that definition, import the - // definition and map to that. - ClassTemplateDecl *Definition = getDefinition(D); - if (Definition && Definition != D && !IsFriend) { - if (ExpectedDecl ImportedDefOrErr = import(Definition)) - return Importer.MapImported(D, *ImportedDefOrErr); - else - return ImportedDefOrErr.takeError(); - } - // Import the major distinguishing characteristics of this class template. DeclContext *DC, *LexicalDC; DeclarationName Name; @@ -5529,7 +5511,7 @@ ASTNodeImporter::VisitFunctionTemplateDecl(FunctionTemplateDecl *D) { // Try to find a function in our own ("to") context with the same name, same // type, and in the same context as the function we're importing. if (!LexicalDC->isFunctionOrMethod()) { - unsigned IDNS = Decl::IDNS_Ordinary; + unsigned IDNS = Decl::IDNS_Ordinary | Decl::IDNS_OrdinaryFriend; auto FoundDecls = Importer.findDeclsInToCtx(DC, Name); for (auto *FoundDecl : FoundDecls) { if (!FoundDecl->isInIdentifierNamespace(IDNS)) @@ -6124,6 +6106,33 @@ ExpectedStmt ASTNodeImporter::VisitVAArgExpr(VAArgExpr *E) { E->isMicrosoftABI()); } +ExpectedStmt ASTNodeImporter::VisitChooseExpr(ChooseExpr *E) { + auto Imp = importSeq(E->getCond(), E->getLHS(), E->getRHS(), + E->getBuiltinLoc(), E->getRParenLoc(), E->getType()); + if (!Imp) + return Imp.takeError(); + + Expr *ToCond; + Expr *ToLHS; + Expr *ToRHS; + SourceLocation ToBuiltinLoc, ToRParenLoc; + QualType ToType; + std::tie(ToCond, ToLHS, ToRHS, ToBuiltinLoc, ToRParenLoc, ToType) = *Imp; + + ExprValueKind VK = E->getValueKind(); + ExprObjectKind OK = E->getObjectKind(); + + bool TypeDependent = ToCond->isTypeDependent(); + bool ValueDependent = ToCond->isValueDependent(); + + // The value of CondIsTrue only matters if the value is not + // condition-dependent. + bool CondIsTrue = !E->isConditionDependent() && E->isConditionTrue(); + + return new (Importer.getToContext()) + ChooseExpr(ToBuiltinLoc, ToCond, ToLHS, ToRHS, ToType, VK, OK, + ToRParenLoc, CondIsTrue, TypeDependent, ValueDependent); +} ExpectedStmt ASTNodeImporter::VisitGNUNullExpr(GNUNullExpr *E) { ExpectedType TypeOrErr = import(E->getType()); @@ -7382,13 +7391,9 @@ ExpectedStmt ASTNodeImporter::VisitLambdaExpr(LambdaExpr *E) { // NOTE: lambda classes are created with BeingDefined flag set up. // It means that ImportDefinition doesn't work for them and we should fill it // manually. - if (ToClass->isBeingDefined()) { - for (auto FromField : FromClass->fields()) { - auto ToFieldOrErr = import(FromField); - if (!ToFieldOrErr) - return ToFieldOrErr.takeError(); - } - } + if (ToClass->isBeingDefined()) + if (Error Err = ImportDeclContext(FromClass, /*ForceImport = */ true)) + return std::move(Err); auto ToCallOpOrErr = import(E->getCallOperator()); if (!ToCallOpOrErr) @@ -7791,6 +7796,13 @@ Decl *ASTImporter::GetAlreadyImportedOrNull(const Decl *FromD) const { return nullptr; } +TranslationUnitDecl *ASTImporter::GetFromTU(Decl *ToD) { + auto FromDPos = ImportedFromDecls.find(ToD); + if (FromDPos == ImportedFromDecls.end()) + return nullptr; + return FromDPos->second->getTranslationUnitDecl(); +} + Expected ASTImporter::Import_New(Decl *FromD) { Decl *ToD = Import(FromD); if (!ToD && FromD) @@ -8187,9 +8199,10 @@ SourceLocation ASTImporter::Import(SourceLocation FromLoc) { return {}; SourceManager &FromSM = FromContext.getSourceManager(); + bool IsBuiltin = FromSM.isWrittenInBuiltinFile(FromLoc); std::pair Decomposed = FromSM.getDecomposedLoc(FromLoc); - FileID ToFileID = Import(Decomposed.first); + FileID ToFileID = Import(Decomposed.first, IsBuiltin); if (ToFileID.isInvalid()) return {}; SourceManager &ToSM = ToContext.getSourceManager(); @@ -8204,13 +8217,13 @@ SourceRange ASTImporter::Import(SourceRange FromRange) { return SourceRange(Import(FromRange.getBegin()), Import(FromRange.getEnd())); } -Expected ASTImporter::Import_New(FileID FromID) { - FileID ToID = Import(FromID); +Expected ASTImporter::Import_New(FileID FromID, bool IsBuiltin) { + FileID ToID = Import(FromID, IsBuiltin); if (ToID.isInvalid() && FromID.isValid()) return llvm::make_error(); return ToID; } -FileID ASTImporter::Import(FileID FromID) { +FileID ASTImporter::Import(FileID FromID, bool IsBuiltin) { llvm::DenseMap::iterator Pos = ImportedFileIDs.find(FromID); if (Pos != ImportedFileIDs.end()) return Pos->second; @@ -8236,25 +8249,36 @@ FileID ASTImporter::Import(FileID FromID) { } ToID = ToSM.getFileID(MLoc); } else { - // Include location of this file. - SourceLocation ToIncludeLoc = Import(FromSLoc.getFile().getIncludeLoc()); - const SrcMgr::ContentCache *Cache = FromSLoc.getFile().getContentCache(); - if (Cache->OrigEntry && Cache->OrigEntry->getDir()) { - // FIXME: We probably want to use getVirtualFile(), so we don't hit the - // disk again - // FIXME: We definitely want to re-use the existing MemoryBuffer, rather - // than mmap the files several times. - const FileEntry *Entry = - ToFileManager.getFile(Cache->OrigEntry->getName()); - if (!Entry) - return {}; - ToID = ToSM.createFileID(Entry, ToIncludeLoc, - FromSLoc.getFile().getFileCharacteristic()); - } else { + + if (!IsBuiltin) { + // Include location of this file. + SourceLocation ToIncludeLoc = Import(FromSLoc.getFile().getIncludeLoc()); + + if (Cache->OrigEntry && Cache->OrigEntry->getDir()) { + // FIXME: We probably want to use getVirtualFile(), so we don't hit the + // disk again + // FIXME: We definitely want to re-use the existing MemoryBuffer, rather + // than mmap the files several times. + const FileEntry *Entry = + ToFileManager.getFile(Cache->OrigEntry->getName()); + // FIXME: The filename may be a virtual name that does probably not + // point to a valid file and we get no Entry here. In this case try with + // the memory buffer below. + if (Entry) + ToID = ToSM.createFileID(Entry, ToIncludeLoc, + FromSLoc.getFile().getFileCharacteristic()); + } + } + + if (ToID.isInvalid() || IsBuiltin) { // FIXME: We want to re-use the existing MemoryBuffer! - const llvm::MemoryBuffer *FromBuf = - Cache->getBuffer(FromContext.getDiagnostics(), FromSM); + bool Invalid = true; + const llvm::MemoryBuffer *FromBuf = Cache->getBuffer( + FromContext.getDiagnostics(), FromSM, SourceLocation{}, &Invalid); + if (!FromBuf || Invalid) + return {}; + std::unique_ptr ToBuf = llvm::MemoryBuffer::getMemBufferCopy(FromBuf->getBuffer(), FromBuf->getBufferIdentifier()); @@ -8263,6 +8287,8 @@ FileID ASTImporter::Import(FileID FromID) { } } + assert(ToID.isValid() && "Unexpected invalid fileID was created."); + ImportedFileIDs[FromID] = ToID; return ToID; } @@ -8541,6 +8567,9 @@ Decl *ASTImporter::MapImported(Decl *From, Decl *To) { if (Pos != ImportedDecls.end()) return Pos->second; ImportedDecls[From] = To; + // This mapping should be maintained only in this function. Therefore do not + // check for additional consistency. + ImportedFromDecls[To] = From; return To; } diff --git a/clang/lib/AST/ASTStructuralEquivalence.cpp b/clang/lib/AST/ASTStructuralEquivalence.cpp index 9f83c5110f629..4a1f6da14e3e5 100644 --- a/clang/lib/AST/ASTStructuralEquivalence.cpp +++ b/clang/lib/AST/ASTStructuralEquivalence.cpp @@ -1650,6 +1650,12 @@ bool StructuralEquivalenceContext::CheckKindSpecificEquivalence( } } else if (FunctionDecl *FD1 = dyn_cast(D1)) { if (FunctionDecl *FD2 = dyn_cast(D2)) { + if (FD1->isOverloadedOperator()) { + if (!FD2->isOverloadedOperator()) + return false; + if (FD1->getOverloadedOperator() != FD2->getOverloadedOperator()) + return false; + } if (!::IsStructurallyEquivalent(FD1->getIdentifier(), FD2->getIdentifier())) return false; diff --git a/clang/lib/AST/Decl.cpp b/clang/lib/AST/Decl.cpp index 98962461a7e1f..78501f5e3a97d 100644 --- a/clang/lib/AST/Decl.cpp +++ b/clang/lib/AST/Decl.cpp @@ -3672,6 +3672,10 @@ unsigned FunctionDecl::getMemoryFunctionKind() const { case Builtin::BImemcmp: return Builtin::BImemcmp; + case Builtin::BI__builtin_bcmp: + case Builtin::BIbcmp: + return Builtin::BIbcmp; + case Builtin::BI__builtin_strncpy: case Builtin::BI__builtin___strncpy_chk: case Builtin::BIstrncpy: @@ -3712,6 +3716,8 @@ unsigned FunctionDecl::getMemoryFunctionKind() const { return Builtin::BImemmove; else if (FnInfo->isStr("memcmp")) return Builtin::BImemcmp; + else if (FnInfo->isStr("bcmp")) + return Builtin::BIbcmp; else if (FnInfo->isStr("strncpy")) return Builtin::BIstrncpy; else if (FnInfo->isStr("strncmp")) @@ -4259,6 +4265,7 @@ BlockDecl::BlockDecl(DeclContext *DC, SourceLocation CaretLoc) setBlockMissingReturnType(true); setIsConversionFromLambda(false); setDoesNotEscape(false); + setCanAvoidCopyToHeap(false); } void BlockDecl::setParams(ArrayRef NewParamInfo) { diff --git a/clang/lib/AST/Expr.cpp b/clang/lib/AST/Expr.cpp index 6d3ad377a3ed0..6c69ca31c0e6c 100644 --- a/clang/lib/AST/Expr.cpp +++ b/clang/lib/AST/Expr.cpp @@ -1358,6 +1358,8 @@ Decl *Expr::getReferencedDeclOfCallee() { return DRE->getDecl(); if (MemberExpr *ME = dyn_cast(CEE)) return ME->getMemberDecl(); + if (auto *BE = dyn_cast(CEE)) + return BE->getBlockDecl(); return nullptr; } @@ -1716,6 +1718,8 @@ bool CastExpr::CastConsistency() const { case CK_ZeroToOCLOpaqueType: case CK_IntToOCLSampler: case CK_FixedPointCast: + case CK_FixedPointToIntegral: + case CK_IntegralToFixedPoint: assert(!getType()->isBooleanType() && "unheralded conversion to bool"); goto CheckNoBasePath; @@ -2556,185 +2560,173 @@ QualType Expr::findBoundMemberType(const Expr *expr) { return QualType(); } -Expr *Expr::IgnoreImpCasts() { - Expr *E = this; - while (true) { - if (auto *ICE = dyn_cast(E)) - E = ICE->getSubExpr(); - else if (auto *FE = dyn_cast(E)) - E = FE->getSubExpr(); - else - break; - } +static Expr *IgnoreImpCastsSingleStep(Expr *E) { + if (auto *ICE = dyn_cast(E)) + return ICE->getSubExpr(); + + if (auto *FE = dyn_cast(E)) + return FE->getSubExpr(); + return E; } -Expr *Expr::IgnoreImplicit() { - Expr *E = this; - Expr *LastE = nullptr; - while (E != LastE) { - LastE = E; +static Expr *IgnoreImpCastsExtraSingleStep(Expr *E) { + // FIXME: Skip MaterializeTemporaryExpr and SubstNonTypeTemplateParmExpr in + // addition to what IgnoreImpCasts() skips to account for the current + // behaviour of IgnoreParenImpCasts(). + Expr *SubE = IgnoreImpCastsSingleStep(E); + if (SubE != E) + return SubE; - if (auto *ICE = dyn_cast(E)) - E = ICE->getSubExpr(); + if (auto *MTE = dyn_cast(E)) + return MTE->GetTemporaryExpr(); - if (auto *FE = dyn_cast(E)) - E = FE->getSubExpr(); + if (auto *NTTP = dyn_cast(E)) + return NTTP->getReplacement(); - if (auto *MTE = dyn_cast(E)) - E = MTE->GetTemporaryExpr(); + return E; +} + +static Expr *IgnoreCastsSingleStep(Expr *E) { + if (auto *CE = dyn_cast(E)) + return CE->getSubExpr(); + + if (auto *FE = dyn_cast(E)) + return FE->getSubExpr(); + + if (auto *MTE = dyn_cast(E)) + return MTE->GetTemporaryExpr(); + + if (auto *NTTP = dyn_cast(E)) + return NTTP->getReplacement(); - if (auto *BTE = dyn_cast(E)) - E = BTE->getSubExpr(); - } return E; } -Expr *Expr::IgnoreParens() { - Expr *E = this; - while (true) { - if (auto *PE = dyn_cast(E)) { - E = PE->getSubExpr(); - continue; - } - if (auto *UO = dyn_cast(E)) { - if (UO->getOpcode() == UO_Extension) { - E = UO->getSubExpr(); - continue; - } - } - if (auto *GSE = dyn_cast(E)) { - if (!GSE->isResultDependent()) { - E = GSE->getResultExpr(); - continue; - } - } - if (auto *CE = dyn_cast(E)) { - if (!CE->isConditionDependent()) { - E = CE->getChosenSubExpr(); - continue; - } - } - if (auto *CE = dyn_cast(E)) { - E = CE->getSubExpr(); - continue; - } - return E; - } +static Expr *IgnoreLValueCastsSingleStep(Expr *E) { + // Skip what IgnoreCastsSingleStep skips, except that only + // lvalue-to-rvalue casts are skipped. + if (auto *CE = dyn_cast(E)) + if (CE->getCastKind() != CK_LValueToRValue) + return E; + + return IgnoreCastsSingleStep(E); } -/// IgnoreParenCasts - Ignore parentheses and casts. Strip off any ParenExpr -/// or CastExprs or ImplicitCastExprs, returning their operand. -Expr *Expr::IgnoreParenCasts() { - Expr *E = this; - while (true) { - E = E->IgnoreParens(); - if (auto *CE = dyn_cast(E)) { - E = CE->getSubExpr(); - continue; - } - if (auto *MTE = dyn_cast(E)) { - E = MTE->GetTemporaryExpr(); - continue; - } - if (auto *NTTP = dyn_cast(E)) { - E = NTTP->getReplacement(); - continue; - } - if (auto *FE = dyn_cast(E)) { - E = FE->getSubExpr(); - continue; - } - return E; - } +static Expr *IgnoreBaseCastsSingleStep(Expr *E) { + if (auto *CE = dyn_cast(E)) + if (CE->getCastKind() == CK_DerivedToBase || + CE->getCastKind() == CK_UncheckedDerivedToBase || + CE->getCastKind() == CK_NoOp) + return CE->getSubExpr(); + + return E; } -Expr *Expr::IgnoreCasts() { - Expr *E = this; - while (true) { - if (auto *CE = dyn_cast(E)) { - E = CE->getSubExpr(); - continue; - } - if (auto *MTE = dyn_cast(E)) { - E = MTE->GetTemporaryExpr(); - continue; - } - if (auto *NTTP = dyn_cast(E)) { - E = NTTP->getReplacement(); - continue; - } - if (auto *FE = dyn_cast(E)) { - E = FE->getSubExpr(); - continue; - } - return E; +static Expr *IgnoreImplicitSingleStep(Expr *E) { + Expr *SubE = IgnoreImpCastsSingleStep(E); + if (SubE != E) + return SubE; + + if (auto *MTE = dyn_cast(E)) + return MTE->GetTemporaryExpr(); + + if (auto *BTE = dyn_cast(E)) + return BTE->getSubExpr(); + + return E; +} + +static Expr *IgnoreParensSingleStep(Expr *E) { + if (auto *PE = dyn_cast(E)) + return PE->getSubExpr(); + + if (auto *UO = dyn_cast(E)) { + if (UO->getOpcode() == UO_Extension) + return UO->getSubExpr(); + } + + else if (auto *GSE = dyn_cast(E)) { + if (!GSE->isResultDependent()) + return GSE->getResultExpr(); + } + + else if (auto *CE = dyn_cast(E)) { + if (!CE->isConditionDependent()) + return CE->getChosenSubExpr(); } + + else if (auto *CE = dyn_cast(E)) + return CE->getSubExpr(); + + return E; } -/// IgnoreParenLValueCasts - Ignore parentheses and lvalue-to-rvalue -/// casts. This is intended purely as a temporary workaround for code -/// that hasn't yet been rewritten to do the right thing about those -/// casts, and may disappear along with the last internal use. -Expr *Expr::IgnoreParenLValueCasts() { - Expr *E = this; - while (true) { - E = E->IgnoreParens(); - if (auto *CE = dyn_cast(E)) { - if (CE->getCastKind() == CK_LValueToRValue) { - E = CE->getSubExpr(); - continue; - } - } else if (auto *MTE = dyn_cast(E)) { - E = MTE->GetTemporaryExpr(); - continue; - } else if (auto *NTTP = dyn_cast(E)) { - E = NTTP->getReplacement(); - continue; - } else if (auto *FE = dyn_cast(E)) { - E = FE->getSubExpr(); - continue; - } - break; +static Expr *IgnoreNoopCastsSingleStep(const ASTContext &Ctx, Expr *E) { + if (auto *CE = dyn_cast(E)) { + // We ignore integer <-> casts that are of the same width, ptr<->ptr and + // ptr<->int casts of the same width. We also ignore all identity casts. + Expr *SubExpr = CE->getSubExpr(); + bool IsIdentityCast = + Ctx.hasSameUnqualifiedType(E->getType(), SubExpr->getType()); + bool IsSameWidthCast = + (E->getType()->isPointerType() || E->getType()->isIntegralType(Ctx)) && + (SubExpr->getType()->isPointerType() || + SubExpr->getType()->isIntegralType(Ctx)) && + (Ctx.getTypeSize(E->getType()) == Ctx.getTypeSize(SubExpr->getType())); + + if (IsIdentityCast || IsSameWidthCast) + return SubExpr; } + + else if (auto *NTTP = dyn_cast(E)) + return NTTP->getReplacement(); + return E; } -Expr *Expr::ignoreParenBaseCasts() { - Expr *E = this; - while (true) { - E = E->IgnoreParens(); - if (auto *CE = dyn_cast(E)) { - if (CE->getCastKind() == CK_DerivedToBase || - CE->getCastKind() == CK_UncheckedDerivedToBase || - CE->getCastKind() == CK_NoOp) { - E = CE->getSubExpr(); - continue; - } - } +static Expr *IgnoreExprNodesImpl(Expr *E) { return E; } +template +static Expr *IgnoreExprNodesImpl(Expr *E, FnTy &&Fn, FnTys &&... Fns) { + return IgnoreExprNodesImpl(Fn(E), std::forward(Fns)...); +} - return E; +/// Given an expression E and functions Fn_1,...,Fn_n : Expr * -> Expr *, +/// Recursively apply each of the functions to E until reaching a fixed point. +/// Note that a null E is valid; in this case nothing is done. +template +static Expr *IgnoreExprNodes(Expr *E, FnTys &&... Fns) { + Expr *LastE = nullptr; + while (E != LastE) { + LastE = E; + E = IgnoreExprNodesImpl(E, std::forward(Fns)...); } + return E; +} + +Expr *Expr::IgnoreImpCasts() { + return IgnoreExprNodes(this, IgnoreImpCastsSingleStep); +} + +Expr *Expr::IgnoreCasts() { + return IgnoreExprNodes(this, IgnoreCastsSingleStep); +} + +Expr *Expr::IgnoreImplicit() { + return IgnoreExprNodes(this, IgnoreImplicitSingleStep); +} + +Expr *Expr::IgnoreParens() { + return IgnoreExprNodes(this, IgnoreParensSingleStep); } Expr *Expr::IgnoreParenImpCasts() { - Expr *E = this; - while (true) { - E = E->IgnoreParens(); - if (auto *ICE = dyn_cast(E)) { - E = ICE->getSubExpr(); - continue; - } - if (auto *MTE = dyn_cast(E)) { - E = MTE->GetTemporaryExpr(); - continue; - } - if (auto *NTTP = dyn_cast(E)) { - E = NTTP->getReplacement(); - continue; - } - return E; - } + return IgnoreExprNodes(this, IgnoreParensSingleStep, + IgnoreImpCastsExtraSingleStep); +} + +Expr *Expr::IgnoreParenCasts() { + return IgnoreExprNodes(this, IgnoreParensSingleStep, IgnoreCastsSingleStep); } Expr *Expr::IgnoreConversionOperator() { @@ -2745,41 +2737,20 @@ Expr *Expr::IgnoreConversionOperator() { return this; } -/// IgnoreParenNoopCasts - Ignore parentheses and casts that do not change the -/// value (including ptr->int casts of the same size). Strip off any -/// ParenExpr or CastExprs, returning their operand. -Expr *Expr::IgnoreParenNoopCasts(const ASTContext &Ctx) { - Expr *E = this; - while (true) { - E = E->IgnoreParens(); - - if (auto *CE = dyn_cast(E)) { - // We ignore integer <-> casts that are of the same width, ptr<->ptr and - // ptr<->int casts of the same width. We also ignore all identity casts. - Expr *SE = CE->getSubExpr(); - - if (Ctx.hasSameUnqualifiedType(E->getType(), SE->getType())) { - E = SE; - continue; - } - - if ((E->getType()->isPointerType() || - E->getType()->isIntegralType(Ctx)) && - (SE->getType()->isPointerType() || - SE->getType()->isIntegralType(Ctx)) && - Ctx.getTypeSize(E->getType()) == Ctx.getTypeSize(SE->getType())) { - E = SE; - continue; - } - } +Expr *Expr::IgnoreParenLValueCasts() { + return IgnoreExprNodes(this, IgnoreParensSingleStep, + IgnoreLValueCastsSingleStep); +} - if (auto *NTTP = dyn_cast(E)) { - E = NTTP->getReplacement(); - continue; - } +Expr *Expr::ignoreParenBaseCasts() { + return IgnoreExprNodes(this, IgnoreParensSingleStep, + IgnoreBaseCastsSingleStep); +} - return E; - } +Expr *Expr::IgnoreParenNoopCasts(const ASTContext &Ctx) { + return IgnoreExprNodes(this, IgnoreParensSingleStep, [&Ctx](Expr *E) { + return IgnoreNoopCastsSingleStep(Ctx, E); + }); } bool Expr::isDefaultArgument() const { diff --git a/clang/lib/AST/ExprConstant.cpp b/clang/lib/AST/ExprConstant.cpp index 8f20e12a51633..1a21ad2539da5 100644 --- a/clang/lib/AST/ExprConstant.cpp +++ b/clang/lib/AST/ExprConstant.cpp @@ -2688,9 +2688,11 @@ static APSInt extractStringLiteralCharacter(EvalInfo &Info, const Expr *Lit, } // Expand a string literal into an array of characters. -static void expandStringLiteral(EvalInfo &Info, const Expr *Lit, +// +// FIXME: This is inefficient; we should probably introduce something similar +// to the LLVM ConstantDataArray to make this cheaper. +static void expandStringLiteral(EvalInfo &Info, const StringLiteral *S, APValue &Result) { - const StringLiteral *S = cast(Lit); const ConstantArrayType *CAT = Info.Ctx.getAsConstantArrayType(S->getType()); assert(CAT && "string literal isn't an array"); @@ -2884,18 +2886,6 @@ findSubobject(EvalInfo &Info, const Expr *E, const CompleteObject &Obj, ObjType = CAT->getElementType(); - // An array object is represented as either an Array APValue or as an - // LValue which refers to a string literal. - if (O->isLValue()) { - assert(I == N - 1 && "extracting subobject of character?"); - assert(!O->hasLValuePath() || O->getLValuePath().empty()); - if (handler.AccessKind != AK_Read) - expandStringLiteral(Info, O->getLValueBase().get(), - *O); - else - return handler.foundString(*O, ObjType, Index); - } - if (O->getArrayInitializedElts() > Index) O = &O->getArrayInitializedElt(Index); else if (handler.AccessKind != AK_Read) { @@ -3008,11 +2998,6 @@ struct ExtractSubobjectHandler { Result = APValue(Value); return true; } - bool foundString(APValue &Subobj, QualType SubobjType, uint64_t Character) { - Result = APValue(extractStringLiteralCharacter( - Info, Subobj.getLValueBase().get(), Character)); - return true; - } }; } // end anonymous namespace @@ -3070,9 +3055,6 @@ struct ModifySubobjectHandler { Value = NewVal.getFloat(); return true; } - bool foundString(APValue &Subobj, QualType SubobjType, uint64_t Character) { - llvm_unreachable("shouldn't encounter string elements with ExpandArrays"); - } }; } // end anonymous namespace @@ -3386,12 +3368,27 @@ static bool handleLValueToRValueConversion(EvalInfo &Info, const Expr *Conv, CompleteObject LitObj(&Lit, Base->getType(), false); return extractSubobject(Info, Conv, LitObj, LVal.Designator, RVal); } else if (isa(Base) || isa(Base)) { - // We represent a string literal array as an lvalue pointing at the - // corresponding expression, rather than building an array of chars. - // FIXME: Support ObjCEncodeExpr, MakeStringConstant - APValue Str(Base, CharUnits::Zero(), APValue::NoLValuePath(), 0); - CompleteObject StrObj(&Str, Base->getType(), false); - return extractSubobject(Info, Conv, StrObj, LVal.Designator, RVal); + // Special-case character extraction so we don't have to construct an + // APValue for the whole string. + assert(LVal.Designator.Entries.size() <= 1 && + "Can only read characters from string literals"); + if (LVal.Designator.Entries.empty()) { + // Fail for now for LValue to RValue conversion of an array. + // (This shouldn't show up in C/C++, but it could be triggered by a + // weird EvaluateAsRValue call from a tool.) + Info.FFDiag(Conv); + return false; + } + if (LVal.Designator.isOnePastTheEnd()) { + if (Info.getLangOpts().CPlusPlus11) + Info.FFDiag(Conv, diag::note_constexpr_access_past_end) << AK_Read; + else + Info.FFDiag(Conv); + return false; + } + uint64_t CharIndex = LVal.Designator.Entries[0].ArrayIndex; + RVal = APValue(extractStringLiteralCharacter(Info, Base, CharIndex)); + return true; } } @@ -3517,9 +3514,6 @@ struct CompoundAssignSubobjectHandler { LVal.moveInto(Subobj); return true; } - bool foundString(APValue &Subobj, QualType SubobjType, uint64_t Character) { - llvm_unreachable("shouldn't encounter string elements here"); - } }; } // end anonymous namespace @@ -3668,9 +3662,6 @@ struct IncDecSubobjectHandler { LVal.moveInto(Subobj); return true; } - bool foundString(APValue &Subobj, QualType SubobjType, uint64_t Character) { - llvm_unreachable("shouldn't encounter string elements here"); - } }; } // end anonymous namespace @@ -7150,8 +7141,7 @@ namespace { : ExprEvaluatorBaseTy(Info), This(This), Result(Result) {} bool Success(const APValue &V, const Expr *E) { - assert((V.isArray() || V.isLValue()) && - "expected array or string literal"); + assert(V.isArray() && "expected array"); Result = V; return true; } @@ -7182,6 +7172,10 @@ namespace { bool VisitCXXConstructExpr(const CXXConstructExpr *E, const LValue &Subobject, APValue *Value, QualType Type); + bool VisitStringLiteral(const StringLiteral *E) { + expandStringLiteral(Info, E, Result); + return true; + } }; } // end anonymous namespace @@ -7214,14 +7208,8 @@ bool ArrayExprEvaluator::VisitInitListExpr(const InitListExpr *E) { // C++11 [dcl.init.string]p1: A char array [...] can be initialized by [...] // an appropriately-typed string literal enclosed in braces. - if (E->isStringLiteralInit()) { - LValue LV; - if (!EvaluateLValue(E->getInit(0), LV, Info)) - return false; - APValue Val; - LV.moveInto(Val); - return Success(Val, E); - } + if (E->isStringLiteralInit()) + return Visit(E->getInit(0)); bool Success = true; @@ -8438,6 +8426,7 @@ bool IntExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E, case Builtin::BIstrncmp: case Builtin::BIwcsncmp: case Builtin::BImemcmp: + case Builtin::BIbcmp: case Builtin::BIwmemcmp: // A call to strlen is not a constant expression. if (Info.getLangOpts().CPlusPlus11) @@ -8452,6 +8441,7 @@ bool IntExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E, case Builtin::BI__builtin_strncmp: case Builtin::BI__builtin_wcsncmp: case Builtin::BI__builtin_memcmp: + case Builtin::BI__builtin_bcmp: case Builtin::BI__builtin_wmemcmp: { LValue String1, String2; if (!EvaluatePointer(E->getArg(0), String1, Info) || @@ -8482,7 +8472,9 @@ bool IntExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E, QualType CharTy2 = String2.Designator.getType(Info.Ctx); bool IsRawByte = BuiltinOp == Builtin::BImemcmp || - BuiltinOp == Builtin::BI__builtin_memcmp; + BuiltinOp == Builtin::BIbcmp || + BuiltinOp == Builtin::BI__builtin_memcmp || + BuiltinOp == Builtin::BI__builtin_bcmp; assert(IsRawByte || (Info.Ctx.hasSameUnqualifiedType( @@ -8550,10 +8542,12 @@ bool IntExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E, return Success(0, E); } - bool StopAtNull = (BuiltinOp != Builtin::BImemcmp && - BuiltinOp != Builtin::BIwmemcmp && - BuiltinOp != Builtin::BI__builtin_memcmp && - BuiltinOp != Builtin::BI__builtin_wmemcmp); + bool StopAtNull = + (BuiltinOp != Builtin::BImemcmp && BuiltinOp != Builtin::BIbcmp && + BuiltinOp != Builtin::BIwmemcmp && + BuiltinOp != Builtin::BI__builtin_memcmp && + BuiltinOp != Builtin::BI__builtin_bcmp && + BuiltinOp != Builtin::BI__builtin_wmemcmp); bool IsWide = BuiltinOp == Builtin::BIwcscmp || BuiltinOp == Builtin::BIwcsncmp || BuiltinOp == Builtin::BIwmemcmp || @@ -9150,6 +9144,22 @@ EvaluateComparisonBinaryOperator(EvalInfo &Info, const BinaryOperator *E, return Success(CCR::Equal, E); } + if (LHSTy->isFixedPointType() || RHSTy->isFixedPointType()) { + APFixedPoint LHSFX(Info.Ctx.getFixedPointSemantics(LHSTy)); + APFixedPoint RHSFX(Info.Ctx.getFixedPointSemantics(RHSTy)); + + bool LHSOK = EvaluateFixedPointOrInteger(E->getLHS(), LHSFX, Info); + if (!LHSOK && !Info.noteFailure()) + return false; + if (!EvaluateFixedPointOrInteger(E->getRHS(), RHSFX, Info) || !LHSOK) + return false; + if (LHSFX < RHSFX) + return Success(CCR::Less, E); + if (LHSFX > RHSFX) + return Success(CCR::Greater, E); + return Success(CCR::Equal, E); + } + if (LHSTy->isAnyComplexType() || RHSTy->isAnyComplexType()) { ComplexValue LHS, RHS; bool LHSOK; @@ -9766,6 +9776,7 @@ bool IntExprEvaluator::VisitCastExpr(const CastExpr *E) { case CK_AddressSpaceConversion: case CK_IntToOCLSampler: case CK_FixedPointCast: + case CK_IntegralToFixedPoint: llvm_unreachable("invalid cast kind for integral value"); case CK_BitCast: @@ -9800,6 +9811,19 @@ bool IntExprEvaluator::VisitCastExpr(const CastExpr *E) { return Success(IntResult, E); } + case CK_FixedPointToIntegral: { + APFixedPoint Src(Info.Ctx.getFixedPointSemantics(SrcType)); + if (!EvaluateFixedPoint(SubExpr, Src, Info)) + return false; + bool Overflowed; + llvm::APSInt Result = Src.convertToInt( + Info.Ctx.getIntWidth(DestType), + DestType->isSignedIntegerOrEnumerationType(), &Overflowed); + if (Overflowed && !HandleOverflow(Info, E, Result, DestType)) + return false; + return Success(Result, E); + } + case CK_FixedPointToBoolean: { // Unsigned padding does not affect this. APValue Val; @@ -9960,6 +9984,20 @@ bool FixedPointExprEvaluator::VisitCastExpr(const CastExpr *E) { return false; return Success(Result, E); } + case CK_IntegralToFixedPoint: { + APSInt Src; + if (!EvaluateInteger(SubExpr, Src, Info)) + return false; + + bool Overflowed; + APFixedPoint IntResult = APFixedPoint::getFromIntValue( + Src, Info.Ctx.getFixedPointSemantics(DestType), &Overflowed); + + if (Overflowed && !HandleOverflow(Info, E, IntResult, DestType)) + return false; + + return Success(IntResult, E); + } case CK_NoOp: case CK_LValueToRValue: return ExprEvaluatorBaseTy::VisitCastExpr(E); @@ -10361,6 +10399,8 @@ bool ComplexExprEvaluator::VisitCastExpr(const CastExpr *E) { case CK_IntToOCLSampler: case CK_FixedPointCast: case CK_FixedPointToBoolean: + case CK_FixedPointToIntegral: + case CK_IntegralToFixedPoint: llvm_unreachable("invalid cast kind for complex value"); case CK_LValueToRValue: diff --git a/clang/lib/AST/ItaniumMangle.cpp b/clang/lib/AST/ItaniumMangle.cpp index 7ed29358ee679..269926dec0f65 100644 --- a/clang/lib/AST/ItaniumMangle.cpp +++ b/clang/lib/AST/ItaniumMangle.cpp @@ -2224,7 +2224,7 @@ void CXXNameMangler::mangleQualifiers(Qualifiers Quals, const DependentAddressSp if (Context.getASTContext().addressSpaceMapManglingFor(AS)) { // ::= "AS" unsigned TargetAS = Context.getASTContext().getTargetAddressSpace(AS); - if (TargetAS != 0 || (Context.getASTContext().getLangOpts().SYCL)) + if (TargetAS != 0 || (Context.getASTContext().getLangOpts().SYCLIsDevice)) ASString = "AS" + llvm::utostr(TargetAS); } else { switch (AS) { diff --git a/clang/lib/AST/MicrosoftMangle.cpp b/clang/lib/AST/MicrosoftMangle.cpp index b2d961a439673..9112af30666a4 100644 --- a/clang/lib/AST/MicrosoftMangle.cpp +++ b/clang/lib/AST/MicrosoftMangle.cpp @@ -1937,8 +1937,9 @@ void MicrosoftCXXNameMangler::mangleType(const BuiltinType *T, Qualifiers, // ::= _M # unsigned __int128 // ::= _N # bool // _O # - // ::= _T # __float80 (Intel) + // ::= _Q # char8_t // ::= _S # char16_t + // ::= _T # __float80 (Intel) // ::= _U # char32_t // ::= _W # wchar_t // ::= _Z # __float80 (Digital Mars) @@ -1999,6 +2000,9 @@ void MicrosoftCXXNameMangler::mangleType(const BuiltinType *T, Qualifiers, case BuiltinType::Bool: Out << "_N"; break; + case BuiltinType::Char8: + Out << "_Q"; + break; case BuiltinType::Char16: Out << "_S"; break; @@ -2094,7 +2098,6 @@ void MicrosoftCXXNameMangler::mangleType(const BuiltinType *T, Qualifiers, case BuiltinType::SatUShortFract: case BuiltinType::SatUFract: case BuiltinType::SatULongFract: - case BuiltinType::Char8: case BuiltinType::Float128: { DiagnosticsEngine &Diags = Context.getDiags(); unsigned DiagID = Diags.getCustomDiagID( diff --git a/clang/lib/AST/OpenMPClause.cpp b/clang/lib/AST/OpenMPClause.cpp index 1640995cea028..b02a888a8cd62 100644 --- a/clang/lib/AST/OpenMPClause.cpp +++ b/clang/lib/AST/OpenMPClause.cpp @@ -791,24 +791,23 @@ unsigned OMPClauseMappableExprCommon::getUniqueDeclarationsTotalNumber( return TotalNum; } -OMPMapClause * -OMPMapClause::Create(const ASTContext &C, SourceLocation StartLoc, - SourceLocation LParenLoc, SourceLocation EndLoc, - ArrayRef Vars, ArrayRef Declarations, - MappableExprComponentListsRef ComponentLists, - ArrayRef MapModifiers, - ArrayRef MapModifiersLoc, - OpenMPMapClauseKind Type, bool TypeIsImplicit, - SourceLocation TypeLoc) { - unsigned NumVars = Vars.size(); - unsigned NumUniqueDeclarations = - getUniqueDeclarationsTotalNumber(Declarations); - unsigned NumComponentLists = ComponentLists.size(); - unsigned NumComponents = getComponentsTotalNumber(ComponentLists); +OMPMapClause *OMPMapClause::Create( + const ASTContext &C, const OMPVarListLocTy &Locs, ArrayRef Vars, + ArrayRef Declarations, + MappableExprComponentListsRef ComponentLists, ArrayRef UDMapperRefs, + ArrayRef MapModifiers, + ArrayRef MapModifiersLoc, + NestedNameSpecifierLoc UDMQualifierLoc, DeclarationNameInfo MapperId, + OpenMPMapClauseKind Type, bool TypeIsImplicit, SourceLocation TypeLoc) { + OMPMappableExprListSizeTy Sizes; + Sizes.NumVars = Vars.size(); + Sizes.NumUniqueDeclarations = getUniqueDeclarationsTotalNumber(Declarations); + Sizes.NumComponentLists = ComponentLists.size(); + Sizes.NumComponents = getComponentsTotalNumber(ComponentLists); // We need to allocate: - // NumVars x Expr* - we have an original list expression for each clause list - // entry. + // 2 x NumVars x Expr* - we have an original list expression and an associated + // user-defined mapper for each clause list entry. // NumUniqueDeclarations x ValueDecl* - unique base declarations associated // with each component list. // (NumUniqueDeclarations + NumComponentLists) x unsigned - we specify the @@ -819,47 +818,47 @@ OMPMapClause::Create(const ASTContext &C, SourceLocation StartLoc, void *Mem = C.Allocate( totalSizeToAlloc( - NumVars, NumUniqueDeclarations, - NumUniqueDeclarations + NumComponentLists, NumComponents)); - OMPMapClause *Clause = new (Mem) OMPMapClause( - MapModifiers, MapModifiersLoc, Type, TypeIsImplicit, TypeLoc, StartLoc, - LParenLoc, EndLoc, NumVars, NumUniqueDeclarations, NumComponentLists, - NumComponents); + 2 * Sizes.NumVars, Sizes.NumUniqueDeclarations, + Sizes.NumUniqueDeclarations + Sizes.NumComponentLists, + Sizes.NumComponents)); + OMPMapClause *Clause = new (Mem) + OMPMapClause(MapModifiers, MapModifiersLoc, UDMQualifierLoc, MapperId, + Type, TypeIsImplicit, TypeLoc, Locs, Sizes); Clause->setVarRefs(Vars); + Clause->setUDMapperRefs(UDMapperRefs); Clause->setClauseInfo(Declarations, ComponentLists); Clause->setMapType(Type); Clause->setMapLoc(TypeLoc); return Clause; } -OMPMapClause *OMPMapClause::CreateEmpty(const ASTContext &C, unsigned NumVars, - unsigned NumUniqueDeclarations, - unsigned NumComponentLists, - unsigned NumComponents) { +OMPMapClause * +OMPMapClause::CreateEmpty(const ASTContext &C, + const OMPMappableExprListSizeTy &Sizes) { void *Mem = C.Allocate( totalSizeToAlloc( - NumVars, NumUniqueDeclarations, - NumUniqueDeclarations + NumComponentLists, NumComponents)); - return new (Mem) OMPMapClause(NumVars, NumUniqueDeclarations, - NumComponentLists, NumComponents); -} - -OMPToClause *OMPToClause::Create(const ASTContext &C, SourceLocation StartLoc, - SourceLocation LParenLoc, - SourceLocation EndLoc, ArrayRef Vars, - ArrayRef Declarations, - MappableExprComponentListsRef ComponentLists) { - unsigned NumVars = Vars.size(); - unsigned NumUniqueDeclarations = - getUniqueDeclarationsTotalNumber(Declarations); - unsigned NumComponentLists = ComponentLists.size(); - unsigned NumComponents = getComponentsTotalNumber(ComponentLists); + 2 * Sizes.NumVars, Sizes.NumUniqueDeclarations, + Sizes.NumUniqueDeclarations + Sizes.NumComponentLists, + Sizes.NumComponents)); + return new (Mem) OMPMapClause(Sizes); +} + +OMPToClause *OMPToClause::Create( + const ASTContext &C, const OMPVarListLocTy &Locs, ArrayRef Vars, + ArrayRef Declarations, + MappableExprComponentListsRef ComponentLists, ArrayRef UDMapperRefs, + NestedNameSpecifierLoc UDMQualifierLoc, DeclarationNameInfo MapperId) { + OMPMappableExprListSizeTy Sizes; + Sizes.NumVars = Vars.size(); + Sizes.NumUniqueDeclarations = getUniqueDeclarationsTotalNumber(Declarations); + Sizes.NumComponentLists = ComponentLists.size(); + Sizes.NumComponents = getComponentsTotalNumber(ComponentLists); // We need to allocate: - // NumVars x Expr* - we have an original list expression for each clause list - // entry. + // 2 x NumVars x Expr* - we have an original list expression and an associated + // user-defined mapper for each clause list entry. // NumUniqueDeclarations x ValueDecl* - unique base declarations associated // with each component list. // (NumUniqueDeclarations + NumComponentLists) x unsigned - we specify the @@ -870,45 +869,43 @@ OMPToClause *OMPToClause::Create(const ASTContext &C, SourceLocation StartLoc, void *Mem = C.Allocate( totalSizeToAlloc( - NumVars, NumUniqueDeclarations, - NumUniqueDeclarations + NumComponentLists, NumComponents)); + 2 * Sizes.NumVars, Sizes.NumUniqueDeclarations, + Sizes.NumUniqueDeclarations + Sizes.NumComponentLists, + Sizes.NumComponents)); - OMPToClause *Clause = new (Mem) - OMPToClause(StartLoc, LParenLoc, EndLoc, NumVars, NumUniqueDeclarations, - NumComponentLists, NumComponents); + auto *Clause = new (Mem) OMPToClause(UDMQualifierLoc, MapperId, Locs, Sizes); Clause->setVarRefs(Vars); + Clause->setUDMapperRefs(UDMapperRefs); Clause->setClauseInfo(Declarations, ComponentLists); return Clause; } -OMPToClause *OMPToClause::CreateEmpty(const ASTContext &C, unsigned NumVars, - unsigned NumUniqueDeclarations, - unsigned NumComponentLists, - unsigned NumComponents) { +OMPToClause *OMPToClause::CreateEmpty(const ASTContext &C, + const OMPMappableExprListSizeTy &Sizes) { void *Mem = C.Allocate( totalSizeToAlloc( - NumVars, NumUniqueDeclarations, - NumUniqueDeclarations + NumComponentLists, NumComponents)); - return new (Mem) OMPToClause(NumVars, NumUniqueDeclarations, - NumComponentLists, NumComponents); -} - -OMPFromClause * -OMPFromClause::Create(const ASTContext &C, SourceLocation StartLoc, - SourceLocation LParenLoc, SourceLocation EndLoc, - ArrayRef Vars, ArrayRef Declarations, - MappableExprComponentListsRef ComponentLists) { - unsigned NumVars = Vars.size(); - unsigned NumUniqueDeclarations = - getUniqueDeclarationsTotalNumber(Declarations); - unsigned NumComponentLists = ComponentLists.size(); - unsigned NumComponents = getComponentsTotalNumber(ComponentLists); + 2 * Sizes.NumVars, Sizes.NumUniqueDeclarations, + Sizes.NumUniqueDeclarations + Sizes.NumComponentLists, + Sizes.NumComponents)); + return new (Mem) OMPToClause(Sizes); +} + +OMPFromClause *OMPFromClause::Create( + const ASTContext &C, const OMPVarListLocTy &Locs, ArrayRef Vars, + ArrayRef Declarations, + MappableExprComponentListsRef ComponentLists, ArrayRef UDMapperRefs, + NestedNameSpecifierLoc UDMQualifierLoc, DeclarationNameInfo MapperId) { + OMPMappableExprListSizeTy Sizes; + Sizes.NumVars = Vars.size(); + Sizes.NumUniqueDeclarations = getUniqueDeclarationsTotalNumber(Declarations); + Sizes.NumComponentLists = ComponentLists.size(); + Sizes.NumComponents = getComponentsTotalNumber(ComponentLists); // We need to allocate: - // NumVars x Expr* - we have an original list expression for each clause list - // entry. + // 2 x NumVars x Expr* - we have an original list expression and an associated + // user-defined mapper for each clause list entry. // NumUniqueDeclarations x ValueDecl* - unique base declarations associated // with each component list. // (NumUniqueDeclarations + NumComponentLists) x unsigned - we specify the @@ -919,29 +916,29 @@ OMPFromClause::Create(const ASTContext &C, SourceLocation StartLoc, void *Mem = C.Allocate( totalSizeToAlloc( - NumVars, NumUniqueDeclarations, - NumUniqueDeclarations + NumComponentLists, NumComponents)); + 2 * Sizes.NumVars, Sizes.NumUniqueDeclarations, + Sizes.NumUniqueDeclarations + Sizes.NumComponentLists, + Sizes.NumComponents)); - OMPFromClause *Clause = new (Mem) - OMPFromClause(StartLoc, LParenLoc, EndLoc, NumVars, NumUniqueDeclarations, - NumComponentLists, NumComponents); + auto *Clause = + new (Mem) OMPFromClause(UDMQualifierLoc, MapperId, Locs, Sizes); Clause->setVarRefs(Vars); + Clause->setUDMapperRefs(UDMapperRefs); Clause->setClauseInfo(Declarations, ComponentLists); return Clause; } -OMPFromClause *OMPFromClause::CreateEmpty(const ASTContext &C, unsigned NumVars, - unsigned NumUniqueDeclarations, - unsigned NumComponentLists, - unsigned NumComponents) { +OMPFromClause * +OMPFromClause::CreateEmpty(const ASTContext &C, + const OMPMappableExprListSizeTy &Sizes) { void *Mem = C.Allocate( totalSizeToAlloc( - NumVars, NumUniqueDeclarations, - NumUniqueDeclarations + NumComponentLists, NumComponents)); - return new (Mem) OMPFromClause(NumVars, NumUniqueDeclarations, - NumComponentLists, NumComponents); + 2 * Sizes.NumVars, Sizes.NumUniqueDeclarations, + Sizes.NumUniqueDeclarations + Sizes.NumComponentLists, + Sizes.NumComponents)); + return new (Mem) OMPFromClause(Sizes); } void OMPUseDevicePtrClause::setPrivateCopies(ArrayRef VL) { @@ -957,15 +954,15 @@ void OMPUseDevicePtrClause::setInits(ArrayRef VL) { } OMPUseDevicePtrClause *OMPUseDevicePtrClause::Create( - const ASTContext &C, SourceLocation StartLoc, SourceLocation LParenLoc, - SourceLocation EndLoc, ArrayRef Vars, ArrayRef PrivateVars, - ArrayRef Inits, ArrayRef Declarations, + const ASTContext &C, const OMPVarListLocTy &Locs, ArrayRef Vars, + ArrayRef PrivateVars, ArrayRef Inits, + ArrayRef Declarations, MappableExprComponentListsRef ComponentLists) { - unsigned NumVars = Vars.size(); - unsigned NumUniqueDeclarations = - getUniqueDeclarationsTotalNumber(Declarations); - unsigned NumComponentLists = ComponentLists.size(); - unsigned NumComponents = getComponentsTotalNumber(ComponentLists); + OMPMappableExprListSizeTy Sizes; + Sizes.NumVars = Vars.size(); + Sizes.NumUniqueDeclarations = getUniqueDeclarationsTotalNumber(Declarations); + Sizes.NumComponentLists = ComponentLists.size(); + Sizes.NumComponents = getComponentsTotalNumber(ComponentLists); // We need to allocate: // 3 x NumVars x Expr* - we have an original list expression for each clause @@ -980,12 +977,11 @@ OMPUseDevicePtrClause *OMPUseDevicePtrClause::Create( void *Mem = C.Allocate( totalSizeToAlloc( - 3 * NumVars, NumUniqueDeclarations, - NumUniqueDeclarations + NumComponentLists, NumComponents)); + 3 * Sizes.NumVars, Sizes.NumUniqueDeclarations, + Sizes.NumUniqueDeclarations + Sizes.NumComponentLists, + Sizes.NumComponents)); - OMPUseDevicePtrClause *Clause = new (Mem) OMPUseDevicePtrClause( - StartLoc, LParenLoc, EndLoc, NumVars, NumUniqueDeclarations, - NumComponentLists, NumComponents); + OMPUseDevicePtrClause *Clause = new (Mem) OMPUseDevicePtrClause(Locs, Sizes); Clause->setVarRefs(Vars); Clause->setPrivateCopies(PrivateVars); @@ -994,29 +990,28 @@ OMPUseDevicePtrClause *OMPUseDevicePtrClause::Create( return Clause; } -OMPUseDevicePtrClause *OMPUseDevicePtrClause::CreateEmpty( - const ASTContext &C, unsigned NumVars, unsigned NumUniqueDeclarations, - unsigned NumComponentLists, unsigned NumComponents) { +OMPUseDevicePtrClause * +OMPUseDevicePtrClause::CreateEmpty(const ASTContext &C, + const OMPMappableExprListSizeTy &Sizes) { void *Mem = C.Allocate( totalSizeToAlloc( - 3 * NumVars, NumUniqueDeclarations, - NumUniqueDeclarations + NumComponentLists, NumComponents)); - return new (Mem) OMPUseDevicePtrClause(NumVars, NumUniqueDeclarations, - NumComponentLists, NumComponents); + 3 * Sizes.NumVars, Sizes.NumUniqueDeclarations, + Sizes.NumUniqueDeclarations + Sizes.NumComponentLists, + Sizes.NumComponents)); + return new (Mem) OMPUseDevicePtrClause(Sizes); } OMPIsDevicePtrClause * -OMPIsDevicePtrClause::Create(const ASTContext &C, SourceLocation StartLoc, - SourceLocation LParenLoc, SourceLocation EndLoc, +OMPIsDevicePtrClause::Create(const ASTContext &C, const OMPVarListLocTy &Locs, ArrayRef Vars, ArrayRef Declarations, MappableExprComponentListsRef ComponentLists) { - unsigned NumVars = Vars.size(); - unsigned NumUniqueDeclarations = - getUniqueDeclarationsTotalNumber(Declarations); - unsigned NumComponentLists = ComponentLists.size(); - unsigned NumComponents = getComponentsTotalNumber(ComponentLists); + OMPMappableExprListSizeTy Sizes; + Sizes.NumVars = Vars.size(); + Sizes.NumUniqueDeclarations = getUniqueDeclarationsTotalNumber(Declarations); + Sizes.NumComponentLists = ComponentLists.size(); + Sizes.NumComponents = getComponentsTotalNumber(ComponentLists); // We need to allocate: // NumVars x Expr* - we have an original list expression for each clause list @@ -1031,28 +1026,27 @@ OMPIsDevicePtrClause::Create(const ASTContext &C, SourceLocation StartLoc, void *Mem = C.Allocate( totalSizeToAlloc( - NumVars, NumUniqueDeclarations, - NumUniqueDeclarations + NumComponentLists, NumComponents)); + Sizes.NumVars, Sizes.NumUniqueDeclarations, + Sizes.NumUniqueDeclarations + Sizes.NumComponentLists, + Sizes.NumComponents)); - OMPIsDevicePtrClause *Clause = new (Mem) OMPIsDevicePtrClause( - StartLoc, LParenLoc, EndLoc, NumVars, NumUniqueDeclarations, - NumComponentLists, NumComponents); + OMPIsDevicePtrClause *Clause = new (Mem) OMPIsDevicePtrClause(Locs, Sizes); Clause->setVarRefs(Vars); Clause->setClauseInfo(Declarations, ComponentLists); return Clause; } -OMPIsDevicePtrClause *OMPIsDevicePtrClause::CreateEmpty( - const ASTContext &C, unsigned NumVars, unsigned NumUniqueDeclarations, - unsigned NumComponentLists, unsigned NumComponents) { +OMPIsDevicePtrClause * +OMPIsDevicePtrClause::CreateEmpty(const ASTContext &C, + const OMPMappableExprListSizeTy &Sizes) { void *Mem = C.Allocate( totalSizeToAlloc( - NumVars, NumUniqueDeclarations, - NumUniqueDeclarations + NumComponentLists, NumComponents)); - return new (Mem) OMPIsDevicePtrClause(NumVars, NumUniqueDeclarations, - NumComponentLists, NumComponents); + Sizes.NumVars, Sizes.NumUniqueDeclarations, + Sizes.NumUniqueDeclarations + Sizes.NumComponentLists, + Sizes.NumComponents)); + return new (Mem) OMPIsDevicePtrClause(Sizes); } //===----------------------------------------------------------------------===// @@ -1432,6 +1426,14 @@ void OMPClausePrinter::VisitOMPMapClause(OMPMapClause *Node) { if (Node->getMapTypeModifier(I) != OMPC_MAP_MODIFIER_unknown) { OS << getOpenMPSimpleClauseTypeName(OMPC_map, Node->getMapTypeModifier(I)); + if (Node->getMapTypeModifier(I) == OMPC_MAP_MODIFIER_mapper) { + OS << '('; + NestedNameSpecifier *MapperNNS = + Node->getMapperQualifierLoc().getNestedNameSpecifier(); + if (MapperNNS) + MapperNNS->print(OS, Policy); + OS << Node->getMapperIdInfo() << ')'; + } OS << ','; } } @@ -1446,7 +1448,19 @@ void OMPClausePrinter::VisitOMPMapClause(OMPMapClause *Node) { void OMPClausePrinter::VisitOMPToClause(OMPToClause *Node) { if (!Node->varlist_empty()) { OS << "to"; - VisitOMPClauseList(Node, '('); + DeclarationNameInfo MapperId = Node->getMapperIdInfo(); + if (MapperId.getName() && !MapperId.getName().isEmpty()) { + OS << '('; + OS << "mapper("; + NestedNameSpecifier *MapperNNS = + Node->getMapperQualifierLoc().getNestedNameSpecifier(); + if (MapperNNS) + MapperNNS->print(OS, Policy); + OS << MapperId << "):"; + VisitOMPClauseList(Node, ' '); + } else { + VisitOMPClauseList(Node, '('); + } OS << ")"; } } @@ -1454,7 +1468,19 @@ void OMPClausePrinter::VisitOMPToClause(OMPToClause *Node) { void OMPClausePrinter::VisitOMPFromClause(OMPFromClause *Node) { if (!Node->varlist_empty()) { OS << "from"; - VisitOMPClauseList(Node, '('); + DeclarationNameInfo MapperId = Node->getMapperIdInfo(); + if (MapperId.getName() && !MapperId.getName().isEmpty()) { + OS << '('; + OS << "mapper("; + NestedNameSpecifier *MapperNNS = + Node->getMapperQualifierLoc().getNestedNameSpecifier(); + if (MapperNNS) + MapperNNS->print(OS, Policy); + OS << MapperId << "):"; + VisitOMPClauseList(Node, ' '); + } else { + VisitOMPClauseList(Node, '('); + } OS << ")"; } } diff --git a/clang/lib/AST/RecordLayoutBuilder.cpp b/clang/lib/AST/RecordLayoutBuilder.cpp index be759e52a1c8e..99b7cbd02240a 100644 --- a/clang/lib/AST/RecordLayoutBuilder.cpp +++ b/clang/lib/AST/RecordLayoutBuilder.cpp @@ -254,7 +254,7 @@ void EmptySubobjectMap::AddSubobjectAtOffset(const CXXRecordDecl *RD, // If we have empty structures inside a union, we can assign both // the same offset. Just avoid pushing them twice in the list. ClassVectorTy &Classes = EmptyClassOffsets[Offset]; - if (std::find(Classes.begin(), Classes.end(), RD) != Classes.end()) + if (llvm::is_contained(Classes, RD)) return; Classes.push_back(RD); diff --git a/clang/lib/AST/Stmt.cpp b/clang/lib/AST/Stmt.cpp index d1a4dc074bd48..f2bb289719f0a 100644 --- a/clang/lib/AST/Stmt.cpp +++ b/clang/lib/AST/Stmt.cpp @@ -320,6 +320,23 @@ CompoundStmt *CompoundStmt::CreateEmpty(const ASTContext &C, return New; } +const Expr *ValueStmt::getExprStmt() const { + const Stmt *S = this; + do { + if (const auto *E = dyn_cast(S)) + return E; + + if (const auto *LS = dyn_cast(S)) + S = LS->getSubStmt(); + else if (const auto *AS = dyn_cast(S)) + S = AS->getSubStmt(); + else + llvm_unreachable("unknown kind of ValueStmt"); + } while (isa(S)); + + return nullptr; +} + const char *LabelStmt::getName() const { return getDecl()->getIdentifier()->getNameStart(); } diff --git a/clang/lib/AST/TextNodeDumper.cpp b/clang/lib/AST/TextNodeDumper.cpp index 9e6f7216e5f72..86219d2466792 100644 --- a/clang/lib/AST/TextNodeDumper.cpp +++ b/clang/lib/AST/TextNodeDumper.cpp @@ -1377,6 +1377,10 @@ void TextNodeDumper::VisitCapturedDecl(const CapturedDecl *D) { void TextNodeDumper::VisitImportDecl(const ImportDecl *D) { OS << ' ' << D->getImportedModule()->getFullModuleName(); + + for (Decl *InitD : + D->getASTContext().getModuleInitializers(D->getImportedModule())) + dumpDeclRef(InitD, "initializer"); } void TextNodeDumper::VisitPragmaCommentDecl(const PragmaCommentDecl *D) { diff --git a/clang/lib/AST/Type.cpp b/clang/lib/AST/Type.cpp index 452ff6201a22f..adffe92f95f90 100644 --- a/clang/lib/AST/Type.cpp +++ b/clang/lib/AST/Type.cpp @@ -22,6 +22,7 @@ #include "clang/AST/DeclTemplate.h" #include "clang/AST/Expr.h" #include "clang/AST/NestedNameSpecifier.h" +#include "clang/AST/NonTrivialTypeVisitor.h" #include "clang/AST/PrettyPrinter.h" #include "clang/AST/TemplateBase.h" #include "clang/AST/TemplateName.h" @@ -722,25 +723,30 @@ const ObjCObjectPointerType *ObjCObjectPointerType::stripObjCKindOfTypeAndQuals( return ctx.getObjCObjectPointerType(obj)->castAs(); } -template -static QualType simpleTransform(ASTContext &ctx, QualType type, F &&f); - namespace { -/// Visitor used by simpleTransform() to perform the transformation. -template -struct SimpleTransformVisitor - : public TypeVisitor, QualType> { +/// Visitor used to perform a simple type transformation that does not change +/// the semantics of the type. +template +struct SimpleTransformVisitor : public TypeVisitor { ASTContext &Ctx; - F &&TheFunc; QualType recurse(QualType type) { - return simpleTransform(Ctx, type, std::move(TheFunc)); + // Split out the qualifiers from the type. + SplitQualType splitType = type.split(); + + // Visit the type itself. + QualType result = static_cast(this)->Visit(splitType.Ty); + if (result.isNull()) + return result; + + // Reconstruct the transformed type by applying the local qualifiers + // from the split type. + return Ctx.getQualifiedType(result, splitType.Quals); } public: - SimpleTransformVisitor(ASTContext &ctx, F &&f) - : Ctx(ctx), TheFunc(std::move(f)) {} + explicit SimpleTransformVisitor(ASTContext &ctx) : Ctx(ctx) {} // None of the clients of this transformation can occur where // there are dependent types, so skip dependent types. @@ -751,6 +757,17 @@ struct SimpleTransformVisitor #define TRIVIAL_TYPE_CLASS(Class) \ QualType Visit##Class##Type(const Class##Type *T) { return QualType(T, 0); } +#define SUGARED_TYPE_CLASS(Class) \ + QualType Visit##Class##Type(const Class##Type *T) { \ + if (!T->isSugared()) \ + return QualType(T, 0); \ + QualType desugaredType = recurse(T->desugar()); \ + if (desugaredType.isNull()) \ + return {}; \ + if (desugaredType.getAsOpaquePtr() == T->desugar().getAsOpaquePtr()) \ + return QualType(T, 0); \ + return desugaredType; \ + } TRIVIAL_TYPE_CLASS(Builtin) @@ -954,8 +971,8 @@ struct SimpleTransformVisitor return Ctx.getParenType(innerType); } - TRIVIAL_TYPE_CLASS(Typedef) - TRIVIAL_TYPE_CLASS(ObjCTypeParam) + SUGARED_TYPE_CLASS(Typedef) + SUGARED_TYPE_CLASS(ObjCTypeParam) QualType VisitAdjustedType(const AdjustedType *T) { QualType originalType = recurse(T->getOriginalType()); @@ -986,15 +1003,15 @@ struct SimpleTransformVisitor return Ctx.getDecayedType(originalType); } - TRIVIAL_TYPE_CLASS(TypeOfExpr) - TRIVIAL_TYPE_CLASS(TypeOf) - TRIVIAL_TYPE_CLASS(Decltype) - TRIVIAL_TYPE_CLASS(UnaryTransform) + SUGARED_TYPE_CLASS(TypeOfExpr) + SUGARED_TYPE_CLASS(TypeOf) + SUGARED_TYPE_CLASS(Decltype) + SUGARED_TYPE_CLASS(UnaryTransform) TRIVIAL_TYPE_CLASS(Record) TRIVIAL_TYPE_CLASS(Enum) // FIXME: Non-trivial to implement, but important for C++ - TRIVIAL_TYPE_CLASS(Elaborated) + SUGARED_TYPE_CLASS(Elaborated) QualType VisitAttributedType(const AttributedType *T) { QualType modifiedType = recurse(T->getModifiedType()); @@ -1029,7 +1046,7 @@ struct SimpleTransformVisitor } // FIXME: Non-trivial to implement, but important for C++ - TRIVIAL_TYPE_CLASS(TemplateSpecialization) + SUGARED_TYPE_CLASS(TemplateSpecialization) QualType VisitAutoType(const AutoType *T) { if (!T->isDeduced()) @@ -1048,7 +1065,7 @@ struct SimpleTransformVisitor } // FIXME: Non-trivial to implement, but important for C++ - TRIVIAL_TYPE_CLASS(PackExpansion) + SUGARED_TYPE_CLASS(PackExpansion) QualType VisitObjCObjectType(const ObjCObjectType *T) { QualType baseType = recurse(T->getBaseType()); @@ -1106,222 +1123,245 @@ struct SimpleTransformVisitor } #undef TRIVIAL_TYPE_CLASS +#undef SUGARED_TYPE_CLASS }; -} // namespace - -/// Perform a simple type transformation that does not change the -/// semantics of the type. -template -static QualType simpleTransform(ASTContext &ctx, QualType type, F &&f) { - // Transform the type. If it changed, return the transformed result. - QualType transformed = f(type); - if (transformed.getAsOpaquePtr() != type.getAsOpaquePtr()) - return transformed; - - // Split out the qualifiers from the type. - SplitQualType splitType = type.split(); - - // Visit the type itself. - SimpleTransformVisitor visitor(ctx, std::forward(f)); - QualType result = visitor.Visit(splitType.Ty); - if (result.isNull()) - return result; +struct SubstObjCTypeArgsVisitor + : public SimpleTransformVisitor { + using BaseType = SimpleTransformVisitor; - // Reconstruct the transformed type by applying the local qualifiers - // from the split type. - return ctx.getQualifiedType(result, splitType.Quals); -} + ArrayRef TypeArgs; + ObjCSubstitutionContext SubstContext; -/// Substitute the given type arguments for Objective-C type -/// parameters within the given type, recursively. -QualType QualType::substObjCTypeArgs( - ASTContext &ctx, - ArrayRef typeArgs, - ObjCSubstitutionContext context) const { - return simpleTransform(ctx, *this, - [&](QualType type) -> QualType { - SplitQualType splitType = type.split(); + SubstObjCTypeArgsVisitor(ASTContext &ctx, ArrayRef typeArgs, + ObjCSubstitutionContext context) + : BaseType(ctx), TypeArgs(typeArgs), SubstContext(context) {} + QualType VisitObjCTypeParamType(const ObjCTypeParamType *OTPTy) { // Replace an Objective-C type parameter reference with the corresponding // type argument. - if (const auto *OTPTy = dyn_cast(splitType.Ty)) { - ObjCTypeParamDecl *typeParam = OTPTy->getDecl(); - // If we have type arguments, use them. - if (!typeArgs.empty()) { - QualType argType = typeArgs[typeParam->getIndex()]; - if (OTPTy->qual_empty()) - return ctx.getQualifiedType(argType, splitType.Quals); - - // Apply protocol lists if exists. - bool hasError; - SmallVector protocolsVec; - protocolsVec.append(OTPTy->qual_begin(), - OTPTy->qual_end()); - ArrayRef protocolsToApply = protocolsVec; - QualType resultTy = ctx.applyObjCProtocolQualifiers(argType, - protocolsToApply, hasError, true/*allowOnPointerType*/); - - return ctx.getQualifiedType(resultTy, splitType.Quals); - } + ObjCTypeParamDecl *typeParam = OTPTy->getDecl(); + // If we have type arguments, use them. + if (!TypeArgs.empty()) { + QualType argType = TypeArgs[typeParam->getIndex()]; + if (OTPTy->qual_empty()) + return argType; + + // Apply protocol lists if exists. + bool hasError; + SmallVector protocolsVec; + protocolsVec.append(OTPTy->qual_begin(), OTPTy->qual_end()); + ArrayRef protocolsToApply = protocolsVec; + return Ctx.applyObjCProtocolQualifiers( + argType, protocolsToApply, hasError, true/*allowOnPointerType*/); + } - switch (context) { - case ObjCSubstitutionContext::Ordinary: - case ObjCSubstitutionContext::Parameter: - case ObjCSubstitutionContext::Superclass: - // Substitute the bound. - return ctx.getQualifiedType(typeParam->getUnderlyingType(), - splitType.Quals); - - case ObjCSubstitutionContext::Result: - case ObjCSubstitutionContext::Property: { - // Substitute the __kindof form of the underlying type. - const auto *objPtr = typeParam->getUnderlyingType() - ->castAs(); - - // __kindof types, id, and Class don't need an additional - // __kindof. - if (objPtr->isKindOfType() || objPtr->isObjCIdOrClassType()) - return ctx.getQualifiedType(typeParam->getUnderlyingType(), - splitType.Quals); - - // Add __kindof. - const auto *obj = objPtr->getObjectType(); - QualType resultTy = ctx.getObjCObjectType(obj->getBaseType(), - obj->getTypeArgsAsWritten(), - obj->getProtocols(), - /*isKindOf=*/true); - - // Rebuild object pointer type. - resultTy = ctx.getObjCObjectPointerType(resultTy); - return ctx.getQualifiedType(resultTy, splitType.Quals); - } - } + switch (SubstContext) { + case ObjCSubstitutionContext::Ordinary: + case ObjCSubstitutionContext::Parameter: + case ObjCSubstitutionContext::Superclass: + // Substitute the bound. + return typeParam->getUnderlyingType(); + + case ObjCSubstitutionContext::Result: + case ObjCSubstitutionContext::Property: { + // Substitute the __kindof form of the underlying type. + const auto *objPtr = + typeParam->getUnderlyingType()->castAs(); + + // __kindof types, id, and Class don't need an additional + // __kindof. + if (objPtr->isKindOfType() || objPtr->isObjCIdOrClassType()) + return typeParam->getUnderlyingType(); + + // Add __kindof. + const auto *obj = objPtr->getObjectType(); + QualType resultTy = Ctx.getObjCObjectType( + obj->getBaseType(), obj->getTypeArgsAsWritten(), obj->getProtocols(), + /*isKindOf=*/true); + + // Rebuild object pointer type. + return Ctx.getObjCObjectPointerType(resultTy); + } + } + llvm_unreachable("Unexpected ObjCSubstitutionContext!"); + } + + QualType VisitFunctionType(const FunctionType *funcType) { + // If we have a function type, update the substitution context + // appropriately. + + //Substitute result type. + QualType returnType = funcType->getReturnType().substObjCTypeArgs( + Ctx, TypeArgs, ObjCSubstitutionContext::Result); + if (returnType.isNull()) + return {}; + + // Handle non-prototyped functions, which only substitute into the result + // type. + if (isa(funcType)) { + // If the return type was unchanged, do nothing. + if (returnType.getAsOpaquePtr() == + funcType->getReturnType().getAsOpaquePtr()) + return BaseType::VisitFunctionType(funcType); + + // Otherwise, build a new type. + return Ctx.getFunctionNoProtoType(returnType, funcType->getExtInfo()); } - // If we have a function type, update the context appropriately. - if (const auto *funcType = dyn_cast(splitType.Ty)) { - // Substitute result type. - QualType returnType = funcType->getReturnType().substObjCTypeArgs( - ctx, - typeArgs, - ObjCSubstitutionContext::Result); - if (returnType.isNull()) + const auto *funcProtoType = cast(funcType); + + // Transform parameter types. + SmallVector paramTypes; + bool paramChanged = false; + for (auto paramType : funcProtoType->getParamTypes()) { + QualType newParamType = paramType.substObjCTypeArgs( + Ctx, TypeArgs, ObjCSubstitutionContext::Parameter); + if (newParamType.isNull()) return {}; - // Handle non-prototyped functions, which only substitute into the result - // type. - if (isa(funcType)) { - // If the return type was unchanged, do nothing. - if (returnType.getAsOpaquePtr() - == funcType->getReturnType().getAsOpaquePtr()) - return type; + if (newParamType.getAsOpaquePtr() != paramType.getAsOpaquePtr()) + paramChanged = true; - // Otherwise, build a new type. - return ctx.getFunctionNoProtoType(returnType, funcType->getExtInfo()); - } + paramTypes.push_back(newParamType); + } - const auto *funcProtoType = cast(funcType); - - // Transform parameter types. - SmallVector paramTypes; - bool paramChanged = false; - for (auto paramType : funcProtoType->getParamTypes()) { - QualType newParamType = paramType.substObjCTypeArgs( - ctx, - typeArgs, - ObjCSubstitutionContext::Parameter); - if (newParamType.isNull()) + // Transform extended info. + FunctionProtoType::ExtProtoInfo info = funcProtoType->getExtProtoInfo(); + bool exceptionChanged = false; + if (info.ExceptionSpec.Type == EST_Dynamic) { + SmallVector exceptionTypes; + for (auto exceptionType : info.ExceptionSpec.Exceptions) { + QualType newExceptionType = exceptionType.substObjCTypeArgs( + Ctx, TypeArgs, ObjCSubstitutionContext::Ordinary); + if (newExceptionType.isNull()) return {}; - if (newParamType.getAsOpaquePtr() != paramType.getAsOpaquePtr()) - paramChanged = true; + if (newExceptionType.getAsOpaquePtr() != exceptionType.getAsOpaquePtr()) + exceptionChanged = true; - paramTypes.push_back(newParamType); + exceptionTypes.push_back(newExceptionType); } - // Transform extended info. - FunctionProtoType::ExtProtoInfo info = funcProtoType->getExtProtoInfo(); - bool exceptionChanged = false; - if (info.ExceptionSpec.Type == EST_Dynamic) { - SmallVector exceptionTypes; - for (auto exceptionType : info.ExceptionSpec.Exceptions) { - QualType newExceptionType = exceptionType.substObjCTypeArgs( - ctx, - typeArgs, - ObjCSubstitutionContext::Ordinary); - if (newExceptionType.isNull()) - return {}; - - if (newExceptionType.getAsOpaquePtr() - != exceptionType.getAsOpaquePtr()) - exceptionChanged = true; - - exceptionTypes.push_back(newExceptionType); - } - - if (exceptionChanged) { - info.ExceptionSpec.Exceptions = - llvm::makeArrayRef(exceptionTypes).copy(ctx); - } + if (exceptionChanged) { + info.ExceptionSpec.Exceptions = + llvm::makeArrayRef(exceptionTypes).copy(Ctx); } + } - if (returnType.getAsOpaquePtr() - == funcProtoType->getReturnType().getAsOpaquePtr() && - !paramChanged && !exceptionChanged) - return type; + if (returnType.getAsOpaquePtr() == + funcProtoType->getReturnType().getAsOpaquePtr() && + !paramChanged && !exceptionChanged) + return BaseType::VisitFunctionType(funcType); - return ctx.getFunctionType(returnType, paramTypes, info); - } + return Ctx.getFunctionType(returnType, paramTypes, info); + } + QualType VisitObjCObjectType(const ObjCObjectType *objcObjectType) { // Substitute into the type arguments of a specialized Objective-C object // type. - if (const auto *objcObjectType = dyn_cast(splitType.Ty)) { - if (objcObjectType->isSpecializedAsWritten()) { - SmallVector newTypeArgs; - bool anyChanged = false; - for (auto typeArg : objcObjectType->getTypeArgsAsWritten()) { - QualType newTypeArg = typeArg.substObjCTypeArgs( - ctx, typeArgs, - ObjCSubstitutionContext::Ordinary); - if (newTypeArg.isNull()) - return {}; - - if (newTypeArg.getAsOpaquePtr() != typeArg.getAsOpaquePtr()) { - // If we're substituting based on an unspecialized context type, - // produce an unspecialized type. - ArrayRef protocols( - objcObjectType->qual_begin(), - objcObjectType->getNumProtocols()); - if (typeArgs.empty() && - context != ObjCSubstitutionContext::Superclass) { - return ctx.getObjCObjectType( - objcObjectType->getBaseType(), {}, - protocols, - objcObjectType->isKindOfTypeAsWritten()); - } - - anyChanged = true; + if (objcObjectType->isSpecializedAsWritten()) { + SmallVector newTypeArgs; + bool anyChanged = false; + for (auto typeArg : objcObjectType->getTypeArgsAsWritten()) { + QualType newTypeArg = typeArg.substObjCTypeArgs( + Ctx, TypeArgs, ObjCSubstitutionContext::Ordinary); + if (newTypeArg.isNull()) + return {}; + + if (newTypeArg.getAsOpaquePtr() != typeArg.getAsOpaquePtr()) { + // If we're substituting based on an unspecialized context type, + // produce an unspecialized type. + ArrayRef protocols( + objcObjectType->qual_begin(), objcObjectType->getNumProtocols()); + if (TypeArgs.empty() && + SubstContext != ObjCSubstitutionContext::Superclass) { + return Ctx.getObjCObjectType( + objcObjectType->getBaseType(), {}, protocols, + objcObjectType->isKindOfTypeAsWritten()); } - newTypeArgs.push_back(newTypeArg); + anyChanged = true; } - if (anyChanged) { - ArrayRef protocols( - objcObjectType->qual_begin(), - objcObjectType->getNumProtocols()); - return ctx.getObjCObjectType(objcObjectType->getBaseType(), - newTypeArgs, protocols, - objcObjectType->isKindOfTypeAsWritten()); - } + newTypeArgs.push_back(newTypeArg); } - return type; + if (anyChanged) { + ArrayRef protocols( + objcObjectType->qual_begin(), objcObjectType->getNumProtocols()); + return Ctx.getObjCObjectType(objcObjectType->getBaseType(), newTypeArgs, + protocols, + objcObjectType->isKindOfTypeAsWritten()); + } } - return type; - }); + return BaseType::VisitObjCObjectType(objcObjectType); + } + + QualType VisitAttributedType(const AttributedType *attrType) { + QualType newType = BaseType::VisitAttributedType(attrType); + if (newType.isNull()) + return {}; + + const auto *newAttrType = dyn_cast(newType.getTypePtr()); + if (!newAttrType || newAttrType->getAttrKind() != attr::ObjCKindOf) + return newType; + + // Find out if it's an Objective-C object or object pointer type; + QualType newEquivType = newAttrType->getEquivalentType(); + const ObjCObjectPointerType *ptrType = + newEquivType->getAs(); + const ObjCObjectType *objType = ptrType + ? ptrType->getObjectType() + : newEquivType->getAs(); + if (!objType) + return newType; + + // Rebuild the "equivalent" type, which pushes __kindof down into + // the object type. + newEquivType = Ctx.getObjCObjectType( + objType->getBaseType(), objType->getTypeArgsAsWritten(), + objType->getProtocols(), + // There is no need to apply kindof on an unqualified id type. + /*isKindOf=*/objType->isObjCUnqualifiedId() ? false : true); + + // If we started with an object pointer type, rebuild it. + if (ptrType) + newEquivType = Ctx.getObjCObjectPointerType(newEquivType); + + // Rebuild the attributed type. + return Ctx.getAttributedType(newAttrType->getAttrKind(), + newAttrType->getModifiedType(), newEquivType); + } +}; + +struct StripObjCKindOfTypeVisitor + : public SimpleTransformVisitor { + using BaseType = SimpleTransformVisitor; + + explicit StripObjCKindOfTypeVisitor(ASTContext &ctx) : BaseType(ctx) {} + + QualType VisitObjCObjectType(const ObjCObjectType *objType) { + if (!objType->isKindOfType()) + return BaseType::VisitObjCObjectType(objType); + + QualType baseType = objType->getBaseType().stripObjCKindOfType(Ctx); + return Ctx.getObjCObjectType(baseType, objType->getTypeArgsAsWritten(), + objType->getProtocols(), + /*isKindOf=*/false); + } +}; + +} // namespace + +/// Substitute the given type arguments for Objective-C type +/// parameters within the given type, recursively. +QualType QualType::substObjCTypeArgs(ASTContext &ctx, + ArrayRef typeArgs, + ObjCSubstitutionContext context) const { + SubstObjCTypeArgsVisitor visitor(ctx, typeArgs, context); + return visitor.recurse(*this); } QualType QualType::substObjCMemberType(QualType objectType, @@ -1336,25 +1376,8 @@ QualType QualType::substObjCMemberType(QualType objectType, QualType QualType::stripObjCKindOfType(const ASTContext &constCtx) const { // FIXME: Because ASTContext::getAttributedType() is non-const. auto &ctx = const_cast(constCtx); - return simpleTransform(ctx, *this, - [&](QualType type) -> QualType { - SplitQualType splitType = type.split(); - if (auto *objType = splitType.Ty->getAs()) { - if (!objType->isKindOfType()) - return type; - - QualType baseType - = objType->getBaseType().stripObjCKindOfType(ctx); - return ctx.getQualifiedType( - ctx.getObjCObjectType(baseType, - objType->getTypeArgsAsWritten(), - objType->getProtocols(), - /*isKindOf=*/false), - splitType.Quals); - } - - return type; - }); + StripObjCKindOfTypeVisitor visitor(ctx); + return visitor.recurse(*this); } QualType QualType::getAtomicUnqualifiedType() const { @@ -2244,6 +2267,62 @@ bool QualType::isNonWeakInMRRWithObjCWeak(const ASTContext &Context) const { getObjCLifetime() != Qualifiers::OCL_Weak; } +namespace { +// Helper class that determines whether this is a type that is non-trivial to +// primitive copy or move, or is a struct type that has a field of such type. +template +struct IsNonTrivialCopyMoveVisitor + : CopiedTypeVisitor, IsMove, bool> { + using Super = + CopiedTypeVisitor, IsMove, bool>; + IsNonTrivialCopyMoveVisitor(const ASTContext &C) : Ctx(C) {} + void preVisit(QualType::PrimitiveCopyKind PCK, QualType QT) {} + + bool visitWithKind(QualType::PrimitiveCopyKind PCK, QualType QT) { + if (const auto *AT = this->Ctx.getAsArrayType(QT)) + return this->asDerived().visit(Ctx.getBaseElementType(AT)); + return Super::visitWithKind(PCK, QT); + } + + bool visitARCStrong(QualType QT) { return true; } + bool visitARCWeak(QualType QT) { return true; } + bool visitTrivial(QualType QT) { return false; } + // Volatile fields are considered trivial. + bool visitVolatileTrivial(QualType QT) { return false; } + + bool visitStruct(QualType QT) { + const RecordDecl *RD = QT->castAs()->getDecl(); + // We don't want to apply the C restriction in C++ because C++ + // (1) can apply the restriction at a finer grain by banning copying or + // destroying the union, and + // (2) allows users to override these restrictions by declaring explicit + // constructors/etc, which we're not proposing to add to C. + if (isa(RD)) + return false; + for (const FieldDecl *FD : RD->fields()) + if (this->asDerived().visit(FD->getType())) + return true; + return false; + } + + const ASTContext &Ctx; +}; + +} // namespace + +bool QualType::isNonTrivialPrimitiveCType(const ASTContext &Ctx) const { + if (isNonTrivialToPrimitiveDefaultInitialize()) + return true; + DestructionKind DK = isDestructedType(); + if (DK != DK_none && DK != DK_cxx_destructor) + return true; + if (IsNonTrivialCopyMoveVisitor(Ctx).visit(*this)) + return true; + if (IsNonTrivialCopyMoveVisitor(Ctx).visit(*this)) + return true; + return false; +} + QualType::PrimitiveDefaultInitializeKind QualType::isNonTrivialToPrimitiveDefaultInitialize() const { if (const auto *RT = diff --git a/clang/lib/ASTMatchers/ASTMatchersInternal.cpp b/clang/lib/ASTMatchers/ASTMatchersInternal.cpp index 8c5425680dc55..8c75b76156729 100644 --- a/clang/lib/ASTMatchers/ASTMatchersInternal.cpp +++ b/clang/lib/ASTMatchers/ASTMatchersInternal.cpp @@ -727,6 +727,7 @@ const internal::VariadicDynCastAllOfMatcher compoundLiteralExpr; const internal::VariadicDynCastAllOfMatcher cxxNullPtrLiteralExpr; +const internal::VariadicDynCastAllOfMatcher chooseExpr; const internal::VariadicDynCastAllOfMatcher gnuNullExpr; const internal::VariadicDynCastAllOfMatcher atomicExpr; const internal::VariadicDynCastAllOfMatcher stmtExpr; diff --git a/clang/lib/ASTMatchers/Dynamic/Registry.cpp b/clang/lib/ASTMatchers/Dynamic/Registry.cpp index 8405cabcce0e9..5a417c9dd6968 100644 --- a/clang/lib/ASTMatchers/Dynamic/Registry.cpp +++ b/clang/lib/ASTMatchers/Dynamic/Registry.cpp @@ -147,6 +147,7 @@ RegistryMaps::RegistryMaps() { REGISTER_MATCHER(caseStmt); REGISTER_MATCHER(castExpr); REGISTER_MATCHER(characterLiteral); + REGISTER_MATCHER(chooseExpr); REGISTER_MATCHER(classTemplateDecl); REGISTER_MATCHER(classTemplateSpecializationDecl); REGISTER_MATCHER(complexType); diff --git a/clang/lib/Analysis/CallGraph.cpp b/clang/lib/Analysis/CallGraph.cpp index 7eda80ea0505e..f79acca907c96 100644 --- a/clang/lib/Analysis/CallGraph.cpp +++ b/clang/lib/Analysis/CallGraph.cpp @@ -79,6 +79,30 @@ class CGBuilder : public StmtVisitor { VisitChildren(CE); } + void VisitLambdaExpr(LambdaExpr *LE) { + if (CXXMethodDecl *MD = LE->getCallOperator()) + G->VisitFunctionDecl(MD); + } + + void VisitCXXNewExpr(CXXNewExpr *E) { + if (FunctionDecl *FD = E->getOperatorNew()) + addCalledDecl(FD); + VisitChildren(E); + } + + void VisitCXXConstructExpr(CXXConstructExpr *E) { + CXXConstructorDecl *Ctor = E->getConstructor(); + if (FunctionDecl *Def = Ctor->getDefinition()) + addCalledDecl(Def); + const auto *ConstructedType = Ctor->getParent(); + if (ConstructedType->hasUserDeclaredDestructor()) { + CXXDestructorDecl *Dtor = ConstructedType->getDestructor(); + if (FunctionDecl *Def = Dtor->getDefinition()) + addCalledDecl(Def); + } + VisitChildren(E); + } + // Adds may-call edges for the ObjC message sends. void VisitObjCMessageExpr(ObjCMessageExpr *ME) { if (ObjCInterfaceDecl *IDecl = ME->getReceiverInterface()) { diff --git a/clang/lib/Analysis/ReachableCode.cpp b/clang/lib/Analysis/ReachableCode.cpp index cc64efa7f07fb..f3bc0c7d8a531 100644 --- a/clang/lib/Analysis/ReachableCode.cpp +++ b/clang/lib/Analysis/ReachableCode.cpp @@ -1,4 +1,4 @@ -//=- ReachableCodePathInsensitive.cpp ---------------------------*- C++ --*-==// +//===-- ReachableCode.cpp - Code Reachability Analysis --------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/clang/lib/Analysis/RetainSummaryManager.cpp b/clang/lib/Analysis/RetainSummaryManager.cpp index abaaffa78e39f..2eee01ca6a622 100644 --- a/clang/lib/Analysis/RetainSummaryManager.cpp +++ b/clang/lib/Analysis/RetainSummaryManager.cpp @@ -499,19 +499,19 @@ RetainSummaryManager::generateSummary(const FunctionDecl *FD, if (const RetainSummary *S = getSummaryForOSObject(FD, FName, RetTy)) return S; - if (TrackObjCAndCFObjects) - if (const RetainSummary *S = - getSummaryForObjCOrCFObject(FD, FName, RetTy, FT, AllowAnnotations)) - return S; - if (const auto *MD = dyn_cast(FD)) - if (!(TrackOSObjects && isOSObjectRelated(MD))) + if (!isOSObjectRelated(MD)) return getPersistentSummary(RetEffect::MakeNoRet(), ArgEffects(AF.getEmptyMap()), ArgEffect(DoNothing), ArgEffect(StopTracking), ArgEffect(DoNothing)); + if (TrackObjCAndCFObjects) + if (const RetainSummary *S = + getSummaryForObjCOrCFObject(FD, FName, RetTy, FT, AllowAnnotations)) + return S; + return getDefaultSummary(); } diff --git a/clang/lib/Basic/Builtins.cpp b/clang/lib/Basic/Builtins.cpp index f04bc1f216b03..4d4c2ff0ae55b 100644 --- a/clang/lib/Basic/Builtins.cpp +++ b/clang/lib/Basic/Builtins.cpp @@ -188,3 +188,28 @@ bool Builtin::Context::canBeRedeclared(unsigned ID) const { (!hasReferenceArgsOrResult(ID) && !hasCustomTypechecking(ID)); } + +unsigned Builtin::getFortifiedVariantFunction(unsigned BuiltinID) { + switch (BuiltinID) { + case Builtin::BImemcpy: return Builtin::BI__builtin___memcpy_chk; + case Builtin::BImemmove: return Builtin::BI__builtin___memmove_chk; + case Builtin::BImemset: return Builtin::BI__builtin___memset_chk; + case Builtin::BIstpcpy: return Builtin::BI__builtin___stpcpy_chk; + case Builtin::BIstrcat: return Builtin::BI__builtin___strcat_chk; + case Builtin::BIstrcpy: return Builtin::BI__builtin___strcpy_chk; + case Builtin::BIstrlcat: return Builtin::BI__builtin___strlcat_chk; + case Builtin::BIstrlcpy: return Builtin::BI__builtin___strlcpy_chk; + case Builtin::BIstrncat: return Builtin::BI__builtin___strncat_chk; + case Builtin::BIstrncpy: return Builtin::BI__builtin___strncpy_chk; + case Builtin::BIstpncpy: return Builtin::BI__builtin___stpncpy_chk; + case Builtin::BIsnprintf: return Builtin::BI__builtin___snprintf_chk; + case Builtin::BIvsnprintf: return Builtin::BI__builtin___vsnprintf_chk; + case Builtin::BIsprintf: return Builtin::BI__builtin___sprintf_chk; + case Builtin::BIvsprintf: return Builtin::BI__builtin___vsprintf_chk; + case Builtin::BIfprintf: return Builtin::BI__builtin___fprintf_chk; + case Builtin::BIvfprintf: return Builtin::BI__builtin___vfprintf_chk; + case Builtin::BIprintf: return Builtin::BI__builtin___printf_chk; + case Builtin::BIvprintf: return Builtin::BI__builtin___vprintf_chk; + default: return 0; + } +} diff --git a/clang/lib/Basic/CMakeLists.txt b/clang/lib/Basic/CMakeLists.txt index 8b3aa0f1e972c..2770cd31c91fa 100644 --- a/clang/lib/Basic/CMakeLists.txt +++ b/clang/lib/Basic/CMakeLists.txt @@ -4,45 +4,37 @@ set(LLVM_LINK_COMPONENTS Support ) -find_first_existing_vc_file(llvm_vc "${LLVM_MAIN_SRC_DIR}") -find_first_existing_vc_file(clang_vc "${CLANG_SOURCE_DIR}") +find_first_existing_vc_file("${LLVM_MAIN_SRC_DIR}" llvm_vc) +find_first_existing_vc_file("${CLANG_SOURCE_DIR}" clang_vc) # The VC revision include that we want to generate. -set(version_inc "${CMAKE_CURRENT_BINARY_DIR}/SVNVersion.inc") +set(version_inc "${CMAKE_CURRENT_BINARY_DIR}/VCSVersion.inc") -set(get_svn_script "${LLVM_CMAKE_PATH}/GetSVN.cmake") +set(generate_vcs_version_script "${LLVM_CMAKE_PATH}/GenerateVersionFromVCS.cmake") -if(DEFINED llvm_vc AND DEFINED clang_vc) - # Create custom target to generate the VC revision include. - add_custom_command(OUTPUT "${version_inc}" - DEPENDS "${llvm_vc}" "${clang_vc}" "${get_svn_script}" - COMMAND - ${CMAKE_COMMAND} "-DFIRST_SOURCE_DIR=${LLVM_MAIN_SRC_DIR}" - "-DFIRST_NAME=LLVM" - "-DSECOND_SOURCE_DIR=${CLANG_SOURCE_DIR}" - "-DSECOND_NAME=SVN" - "-DHEADER_FILE=${version_inc}" - -P "${get_svn_script}") +if(llvm_vc) + set(llvm_source_dir ${LLVM_MAIN_SRC_DIR}) +endif() +if(clang_vc) + set(clang_source_dir ${CLANG_SOURCE_DIR}) +endif() - # Mark the generated header as being generated. - set_source_files_properties("${version_inc}" - PROPERTIES GENERATED TRUE - HEADER_FILE_ONLY TRUE) +# Create custom target to generate the VC revision include. +add_custom_command(OUTPUT "${version_inc}" + DEPENDS "${llvm_vc}" "${clang_vc}" "${generate_vcs_version_script}" + COMMAND ${CMAKE_COMMAND} "-DNAMES=\"LLVM;CLANG\"" + "-DLLVM_SOURCE_DIR=${llvm_source_dir}" + "-DCLANG_SOURCE_DIR=${clang_source_dir}" + "-DHEADER_FILE=${version_inc}" + -P "${generate_vcs_version_script}") - # Tell Version.cpp that it needs to build with -DHAVE_SVN_VERSION_INC. - set_source_files_properties(Version.cpp - PROPERTIES COMPILE_DEFINITIONS "HAVE_SVN_VERSION_INC") -else() - # Not producing a VC revision include. - set(version_inc) +# Mark the generated header as being generated. +set_source_files_properties("${version_inc}" + PROPERTIES GENERATED TRUE + HEADER_FILE_ONLY TRUE) - # Being able to force-set the SVN revision in cases where it isn't available - # is useful for performance tracking, and matches compatibility from autoconf. - if(SVN_REVISION) - set_source_files_properties(Version.cpp - PROPERTIES COMPILE_DEFINITIONS "SVN_REVISION=\"${SVN_REVISION}\"") - endif() -endif() +set_property(SOURCE Version.cpp APPEND PROPERTY + COMPILE_DEFINITIONS "HAVE_VCS_VERSION_INC") add_clang_library(clangBasic Attributes.cpp diff --git a/clang/lib/Basic/Cuda.cpp b/clang/lib/Basic/Cuda.cpp index 6ba9a8437e2c9..4bc8d8c5b42e5 100644 --- a/clang/lib/Basic/Cuda.cpp +++ b/clang/lib/Basic/Cuda.cpp @@ -25,6 +25,8 @@ const char *CudaVersionToString(CudaVersion V) { return "9.2"; case CudaVersion::CUDA_100: return "10.0"; + case CudaVersion::CUDA_101: + return "10.1"; } llvm_unreachable("invalid enum"); } @@ -37,7 +39,8 @@ CudaVersion CudaStringToVersion(llvm::StringRef S) { .Case("9.0", CudaVersion::CUDA_90) .Case("9.1", CudaVersion::CUDA_91) .Case("9.2", CudaVersion::CUDA_92) - .Case("10.0", CudaVersion::CUDA_100); + .Case("10.0", CudaVersion::CUDA_100) + .Case("10.1", CudaVersion::CUDA_101); } const char *CudaArchToString(CudaArch A) { @@ -352,6 +355,8 @@ static CudaVersion ToCudaVersion(llvm::VersionTuple Version) { return CudaVersion::CUDA_92; case 100: return CudaVersion::CUDA_100; + case 101: + return CudaVersion::CUDA_101; default: return CudaVersion::UNKNOWN; } @@ -365,6 +370,8 @@ bool CudaFeatureEnabled(CudaVersion Version, CudaFeature Feature) { switch (Feature) { case CudaFeature::CUDA_USES_NEW_LAUNCH: return Version >= CudaVersion::CUDA_92; + case CudaFeature::CUDA_USES_FATBIN_REGISTER_END: + return Version >= CudaVersion::CUDA_101; } llvm_unreachable("Unknown CUDA feature."); } diff --git a/clang/lib/Basic/FileManager.cpp b/clang/lib/Basic/FileManager.cpp index 75caff95559e6..0926376cf1035 100644 --- a/clang/lib/Basic/FileManager.cpp +++ b/clang/lib/Basic/FileManager.cpp @@ -144,8 +144,8 @@ const DirectoryEntry *FileManager::getDirectory(StringRef DirName, StringRef InterndDirName = NamedDirEnt.first(); // Check to see if the directory exists. - FileData Data; - if (getStatValue(InterndDirName, Data, false, nullptr /*directory lookup*/)) { + llvm::vfs::Status Status; + if (getStatValue(InterndDirName, Status, false, nullptr /*directory lookup*/)) { // There's no real directory at the given path. if (!CacheFailure) SeenDirEntries.erase(DirName); @@ -156,7 +156,7 @@ const DirectoryEntry *FileManager::getDirectory(StringRef DirName, // same inode (this occurs on Unix-like systems when one dir is // symlinked to another, for example) or the same path (on // Windows). - DirectoryEntry &UDE = UniqueRealDirs[Data.UniqueID]; + DirectoryEntry &UDE = UniqueRealDirs[Status.getUniqueID()]; NamedDirEnt.second = &UDE; if (UDE.getName().empty()) { @@ -205,8 +205,8 @@ const FileEntry *FileManager::getFile(StringRef Filename, bool openFile, // Check to see if the file exists. std::unique_ptr F; - FileData Data; - if (getStatValue(InterndFileName, Data, true, openFile ? &F : nullptr)) { + llvm::vfs::Status Status; + if (getStatValue(InterndFileName, Status, true, openFile ? &F : nullptr)) { // There's no real file at the given path. if (!CacheFailure) SeenFileEntries.erase(Filename); @@ -218,14 +218,15 @@ const FileEntry *FileManager::getFile(StringRef Filename, bool openFile, // It exists. See if we have already opened a file with the same inode. // This occurs when one dir is symlinked to another, for example. - FileEntry &UFE = UniqueRealFiles[Data.UniqueID]; + FileEntry &UFE = UniqueRealFiles[Status.getUniqueID()]; NamedFileEnt.second = &UFE; // If the name returned by getStatValue is different than Filename, re-intern // the name. - if (Data.Name != Filename) { - auto &NamedFileEnt = *SeenFileEntries.insert({Data.Name, &UFE}).first; + if (Status.getName() != Filename) { + auto &NamedFileEnt = + *SeenFileEntries.insert({Status.getName(), &UFE}).first; assert(NamedFileEnt.second == &UFE && "filename from getStatValue() refers to wrong file"); InterndFileName = NamedFileEnt.first().data(); @@ -239,7 +240,7 @@ const FileEntry *FileManager::getFile(StringRef Filename, bool openFile, // module's structure when its headers/module map are mapped in the VFS. // We should remove this as soon as we can properly support a file having // multiple names. - if (DirInfo != UFE.Dir && Data.IsVFSMapped) + if (DirInfo != UFE.Dir && Status.IsVFSMapped) UFE.Dir = DirInfo; // Always update the name to use the last name by which a file was accessed. @@ -254,19 +255,21 @@ const FileEntry *FileManager::getFile(StringRef Filename, bool openFile, // Otherwise, we don't have this file yet, add it. UFE.Name = InterndFileName; - UFE.Size = Data.Size; - UFE.ModTime = Data.ModTime; + UFE.Size = Status.getSize(); + UFE.ModTime = llvm::sys::toTimeT(Status.getLastModificationTime()); UFE.Dir = DirInfo; UFE.UID = NextFileUID++; - UFE.UniqueID = Data.UniqueID; - UFE.IsNamedPipe = Data.IsNamedPipe; - UFE.InPCH = Data.InPCH; + UFE.UniqueID = Status.getUniqueID(); + UFE.IsNamedPipe = Status.getType() == llvm::sys::fs::file_type::fifo_file; UFE.File = std::move(F); UFE.IsValid = true; if (UFE.File) { if (auto PathName = UFE.File->getName()) fillRealPathName(&UFE, *PathName); + } else if (!openFile) { + // We should still fill the path even if we aren't opening the file. + fillRealPathName(&UFE, InterndFileName); } return &UFE; } @@ -295,12 +298,15 @@ FileManager::getVirtualFile(StringRef Filename, off_t Size, "The directory of a virtual file should already be in the cache."); // Check to see if the file exists. If so, drop the virtual file - FileData Data; + llvm::vfs::Status Status; const char *InterndFileName = NamedFileEnt.first().data(); - if (getStatValue(InterndFileName, Data, true, nullptr) == 0) { - Data.Size = Size; - Data.ModTime = ModificationTime; - UFE = &UniqueRealFiles[Data.UniqueID]; + if (getStatValue(InterndFileName, Status, true, nullptr) == 0) { + UFE = &UniqueRealFiles[Status.getUniqueID()]; + Status = llvm::vfs::Status( + Status.getName(), Status.getUniqueID(), + llvm::sys::toTimePoint(ModificationTime), + Status.getUser(), Status.getGroup(), Size, + Status.getType(), Status.getPermissions()); NamedFileEnt.second = UFE; @@ -314,10 +320,9 @@ FileManager::getVirtualFile(StringRef Filename, off_t Size, if (UFE->isValid()) return UFE; - UFE->UniqueID = Data.UniqueID; - UFE->IsNamedPipe = Data.IsNamedPipe; - UFE->InPCH = Data.InPCH; - fillRealPathName(UFE, Data.Name); + UFE->UniqueID = Status.getUniqueID(); + UFE->IsNamedPipe = Status.getType() == llvm::sys::fs::file_type::fifo_file; + fillRealPathName(UFE, Status.getName()); } else { VirtualFileEntries.push_back(llvm::make_unique()); UFE = VirtualFileEntries.back().get(); @@ -418,17 +423,18 @@ FileManager::getBufferForFile(StringRef Filename, bool isVolatile) { /// if the path points to a virtual file or does not exist, or returns /// false if it's an existent real file. If FileDescriptor is NULL, /// do directory look-up instead of file look-up. -bool FileManager::getStatValue(StringRef Path, FileData &Data, bool isFile, +bool FileManager::getStatValue(StringRef Path, llvm::vfs::Status &Status, + bool isFile, std::unique_ptr *F) { // FIXME: FileSystemOpts shouldn't be passed in here, all paths should be // absolute! if (FileSystemOpts.WorkingDir.empty()) - return FileSystemStatCache::get(Path, Data, isFile, F,StatCache.get(), *FS); + return FileSystemStatCache::get(Path, Status, isFile, F,StatCache.get(), *FS); SmallString<128> FilePath(Path); FixupRelativePath(FilePath); - return FileSystemStatCache::get(FilePath.c_str(), Data, isFile, F, + return FileSystemStatCache::get(FilePath.c_str(), Status, isFile, F, StatCache.get(), *FS); } diff --git a/clang/lib/Basic/FileSystemStatCache.cpp b/clang/lib/Basic/FileSystemStatCache.cpp index d29ebb750fc6f..2d21c424445c3 100644 --- a/clang/lib/Basic/FileSystemStatCache.cpp +++ b/clang/lib/Basic/FileSystemStatCache.cpp @@ -21,18 +21,6 @@ using namespace clang; void FileSystemStatCache::anchor() {} -static void copyStatusToFileData(const llvm::vfs::Status &Status, - FileData &Data) { - Data.Name = Status.getName(); - Data.Size = Status.getSize(); - Data.ModTime = llvm::sys::toTimeT(Status.getLastModificationTime()); - Data.UniqueID = Status.getUniqueID(); - Data.IsDirectory = Status.isDirectory(); - Data.IsNamedPipe = Status.getType() == llvm::sys::fs::file_type::fifo_file; - Data.InPCH = false; - Data.IsVFSMapped = Status.IsVFSMapped; -} - /// FileSystemStatCache::get - Get the 'stat' information for the specified /// path, using the cache to accelerate it if possible. This returns true if /// the path does not exist or false if it exists. @@ -42,7 +30,8 @@ static void copyStatusToFileData(const llvm::vfs::Status &Status, /// success for directories (not files). On a successful file lookup, the /// implementation can optionally fill in FileDescriptor with a valid /// descriptor and the client guarantees that it will close it. -bool FileSystemStatCache::get(StringRef Path, FileData &Data, bool isFile, +bool FileSystemStatCache::get(StringRef Path, llvm::vfs::Status &Status, + bool isFile, std::unique_ptr *F, FileSystemStatCache *Cache, llvm::vfs::FileSystem &FS) { @@ -51,16 +40,16 @@ bool FileSystemStatCache::get(StringRef Path, FileData &Data, bool isFile, // If we have a cache, use it to resolve the stat query. if (Cache) - R = Cache->getStat(Path, Data, isFile, F, FS); + R = Cache->getStat(Path, Status, isFile, F, FS); else if (isForDir || !F) { // If this is a directory or a file descriptor is not needed and we have // no cache, just go to the file system. - llvm::ErrorOr Status = FS.status(Path); - if (!Status) { + llvm::ErrorOr StatusOrErr = FS.status(Path); + if (!StatusOrErr) { R = CacheMissing; } else { R = CacheExists; - copyStatusToFileData(*Status, Data); + Status = *StatusOrErr; } } else { // Otherwise, we have to go to the filesystem. We can always just use @@ -79,10 +68,10 @@ bool FileSystemStatCache::get(StringRef Path, FileData &Data, bool isFile, // Otherwise, the open succeeded. Do an fstat to get the information // about the file. We'll end up returning the open file descriptor to the // client to do what they please with it. - llvm::ErrorOr Status = (*OwnedFile)->status(); - if (Status) { + llvm::ErrorOr StatusOrErr = (*OwnedFile)->status(); + if (StatusOrErr) { R = CacheExists; - copyStatusToFileData(*Status, Data); + Status = *StatusOrErr; *F = std::move(*OwnedFile); } else { // fstat rarely fails. If it does, claim the initial open didn't @@ -98,7 +87,7 @@ bool FileSystemStatCache::get(StringRef Path, FileData &Data, bool isFile, // If the path exists, make sure that its "directoryness" matches the clients // demands. - if (Data.IsDirectory != isForDir) { + if (Status.isDirectory() != isForDir) { // If not, close the file if opened. if (F) *F = nullptr; @@ -110,10 +99,11 @@ bool FileSystemStatCache::get(StringRef Path, FileData &Data, bool isFile, } MemorizeStatCalls::LookupResult -MemorizeStatCalls::getStat(StringRef Path, FileData &Data, bool isFile, +MemorizeStatCalls::getStat(StringRef Path, llvm::vfs::Status &Status, + bool isFile, std::unique_ptr *F, llvm::vfs::FileSystem &FS) { - if (get(Path, Data, isFile, F, nullptr, FS)) { + if (get(Path, Status, isFile, F, nullptr, FS)) { // Do not cache failed stats, it is easy to construct common inconsistent // situations if we do, and they are not important for PCH performance // (which currently only needs the stats to construct the initial @@ -122,8 +112,8 @@ MemorizeStatCalls::getStat(StringRef Path, FileData &Data, bool isFile, } // Cache file 'stat' results and directories with absolutely paths. - if (!Data.IsDirectory || llvm::sys::path::is_absolute(Path)) - StatCalls[Path] = Data; + if (!Status.isDirectory() || llvm::sys::path::is_absolute(Path)) + StatCalls[Path] = Status; return CacheExists; } diff --git a/clang/lib/Basic/FixedPoint.cpp b/clang/lib/Basic/FixedPoint.cpp index ca84a0cf48392..f049e6f64a502 100644 --- a/clang/lib/Basic/FixedPoint.cpp +++ b/clang/lib/Basic/FixedPoint.cpp @@ -218,4 +218,41 @@ APFixedPoint APFixedPoint::negate(bool *Overflow) const { return APFixedPoint(Sema); } +llvm::APSInt APFixedPoint::convertToInt(unsigned DstWidth, bool DstSign, + bool *Overflow) const { + llvm::APSInt Result = getIntPart(); + unsigned SrcWidth = getWidth(); + + llvm::APSInt DstMin = llvm::APSInt::getMinValue(DstWidth, !DstSign); + llvm::APSInt DstMax = llvm::APSInt::getMaxValue(DstWidth, !DstSign); + + if (SrcWidth < DstWidth) { + Result = Result.extend(DstWidth); + } else if (SrcWidth > DstWidth) { + DstMin = DstMin.extend(SrcWidth); + DstMax = DstMax.extend(SrcWidth); + } + + if (Overflow) { + if (Result.isSigned() && !DstSign) { + *Overflow = Result.isNegative() || Result.ugt(DstMax); + } else if (Result.isUnsigned() && DstSign) { + *Overflow = Result.ugt(DstMax); + } else { + *Overflow = Result < DstMin || Result > DstMax; + } + } + + Result.setIsSigned(DstSign); + return Result.extOrTrunc(DstWidth); +} + +APFixedPoint APFixedPoint::getFromIntValue(const llvm::APSInt &Value, + const FixedPointSemantics &DstFXSema, + bool *Overflow) { + FixedPointSemantics IntFXSema = FixedPointSemantics::GetIntegerSemantics( + Value.getBitWidth(), Value.isSigned()); + return APFixedPoint(Value, IntFXSema).convert(DstFXSema, Overflow); +} + } // namespace clang diff --git a/clang/lib/Basic/IdentifierTable.cpp b/clang/lib/Basic/IdentifierTable.cpp index e266e5eabcef2..0270c8cdb5e53 100644 --- a/clang/lib/Basic/IdentifierTable.cpp +++ b/clang/lib/Basic/IdentifierTable.cpp @@ -99,6 +99,7 @@ namespace { KEYMODULES = 0x100000, KEYCXX2A = 0x200000, KEYOPENCLCXX = 0x400000, + KEYMSCOMPAT = 0x800000, KEYSYCL = 0x1000000, KEYALLCXX = KEYSYCL | KEYCXX | KEYCXX11 | KEYCXX2A, KEYALL = (0x1ffffff & ~KEYNOMS18 & @@ -126,6 +127,7 @@ static KeywordStatus getKeywordStatus(const LangOptions &LangOpts, if (LangOpts.C99 && (Flags & KEYC99)) return KS_Enabled; if (LangOpts.GNUKeywords && (Flags & KEYGNU)) return KS_Extension; if (LangOpts.MicrosoftExt && (Flags & KEYMS)) return KS_Extension; + if (LangOpts.MSVCCompat && (Flags & KEYMSCOMPAT)) return KS_Enabled; if (LangOpts.Borland && (Flags & KEYBORLAND)) return KS_Extension; if (LangOpts.Bool && (Flags & BOOLSUPPORT)) return KS_Enabled; if (LangOpts.Half && (Flags & HALFSUPPORT)) return KS_Enabled; @@ -136,14 +138,14 @@ static KeywordStatus getKeywordStatus(const LangOptions &LangOpts, if (LangOpts.OpenCL && !LangOpts.OpenCLCPlusPlus && (Flags & KEYOPENCLC)) return KS_Enabled; if (LangOpts.OpenCLCPlusPlus && (Flags & KEYOPENCLCXX)) return KS_Enabled; - if (LangOpts.SYCL && (Flags & KEYSYCL)) return KS_Enabled; + if (LangOpts.SYCLIsDevice && (Flags & KEYSYCL)) return KS_Enabled; if (!LangOpts.CPlusPlus && (Flags & KEYNOCXX)) return KS_Enabled; if (LangOpts.C11 && (Flags & KEYC11)) return KS_Enabled; // We treat bridge casts as objective-C keywords so we can warn on them // in non-arc mode. if (LangOpts.ObjC && (Flags & KEYOBJC)) return KS_Enabled; if (LangOpts.ConceptsTS && (Flags & KEYCONCEPTS)) return KS_Enabled; - if (LangOpts.CoroutinesTS && (Flags & KEYCOROUTINES)) return KS_Enabled; + if (LangOpts.Coroutines && (Flags & KEYCOROUTINES)) return KS_Enabled; if (LangOpts.ModulesTS && (Flags & KEYMODULES)) return KS_Enabled; if (LangOpts.CPlusPlus && (Flags & KEYALLCXX)) return KS_Future; return KS_Disabled; diff --git a/clang/lib/Basic/Module.cpp b/clang/lib/Basic/Module.cpp index 52583250dac93..b405ab621d31e 100644 --- a/clang/lib/Basic/Module.cpp +++ b/clang/lib/Basic/Module.cpp @@ -108,7 +108,7 @@ static bool hasFeature(StringRef Feature, const LangOptions &LangOpts, bool HasFeature = llvm::StringSwitch(Feature) .Case("altivec", LangOpts.AltiVec) .Case("blocks", LangOpts.Blocks) - .Case("coroutines", LangOpts.CoroutinesTS) + .Case("coroutines", LangOpts.Coroutines) .Case("cplusplus", LangOpts.CPlusPlus) .Case("cplusplus11", LangOpts.CPlusPlus11) .Case("cplusplus14", LangOpts.CPlusPlus14) diff --git a/clang/lib/Basic/OpenMPKinds.cpp b/clang/lib/Basic/OpenMPKinds.cpp index ea8a46b4953ca..b10c6d2498ed2 100644 --- a/clang/lib/Basic/OpenMPKinds.cpp +++ b/clang/lib/Basic/OpenMPKinds.cpp @@ -116,6 +116,18 @@ unsigned clang::getOpenMPSimpleClauseType(OpenMPClauseKind Kind, .Case(#Name, static_cast(OMPC_MAP_MODIFIER_##Name)) #include "clang/Basic/OpenMPKinds.def" .Default(OMPC_MAP_unknown); + case OMPC_to: + return llvm::StringSwitch(Str) +#define OPENMP_TO_MODIFIER_KIND(Name) \ + .Case(#Name, static_cast(OMPC_TO_MODIFIER_##Name)) +#include "clang/Basic/OpenMPKinds.def" + .Default(OMPC_TO_MODIFIER_unknown); + case OMPC_from: + return llvm::StringSwitch(Str) +#define OPENMP_FROM_MODIFIER_KIND(Name) \ + .Case(#Name, static_cast(OMPC_FROM_MODIFIER_##Name)) +#include "clang/Basic/OpenMPKinds.def" + .Default(OMPC_FROM_MODIFIER_unknown); case OMPC_dist_schedule: return llvm::StringSwitch(Str) #define OPENMP_DIST_SCHEDULE_KIND(Name) .Case(#Name, OMPC_DIST_SCHEDULE_##Name) @@ -174,8 +186,6 @@ unsigned clang::getOpenMPSimpleClauseType(OpenMPClauseKind Kind, case OMPC_num_tasks: case OMPC_hint: case OMPC_uniform: - case OMPC_to: - case OMPC_from: case OMPC_use_device_ptr: case OMPC_is_device_ptr: case OMPC_unified_address: @@ -260,6 +270,30 @@ const char *clang::getOpenMPSimpleClauseTypeName(OpenMPClauseKind Kind, break; } llvm_unreachable("Invalid OpenMP 'map' clause type"); + case OMPC_to: + switch (Type) { + case OMPC_TO_MODIFIER_unknown: + return "unknown"; +#define OPENMP_TO_MODIFIER_KIND(Name) \ + case OMPC_TO_MODIFIER_##Name: \ + return #Name; +#include "clang/Basic/OpenMPKinds.def" + default: + break; + } + llvm_unreachable("Invalid OpenMP 'to' clause type"); + case OMPC_from: + switch (Type) { + case OMPC_FROM_MODIFIER_unknown: + return "unknown"; +#define OPENMP_FROM_MODIFIER_KIND(Name) \ + case OMPC_FROM_MODIFIER_##Name: \ + return #Name; +#include "clang/Basic/OpenMPKinds.def" + default: + break; + } + llvm_unreachable("Invalid OpenMP 'from' clause type"); case OMPC_dist_schedule: switch (Type) { case OMPC_DIST_SCHEDULE_unknown: @@ -333,8 +367,6 @@ const char *clang::getOpenMPSimpleClauseTypeName(OpenMPClauseKind Kind, case OMPC_num_tasks: case OMPC_hint: case OMPC_uniform: - case OMPC_to: - case OMPC_from: case OMPC_use_device_ptr: case OMPC_is_device_ptr: case OMPC_unified_address: diff --git a/clang/lib/Basic/SanitizerSpecialCaseList.cpp b/clang/lib/Basic/SanitizerSpecialCaseList.cpp index e042db92b4c6f..5fb0f9660b152 100644 --- a/clang/lib/Basic/SanitizerSpecialCaseList.cpp +++ b/clang/lib/Basic/SanitizerSpecialCaseList.cpp @@ -36,7 +36,7 @@ SanitizerSpecialCaseList::createOrDie(const std::vector &Paths) { void SanitizerSpecialCaseList::createSanitizerSections() { for (auto &S : Sections) { - SanitizerMask Mask = 0; + SanitizerMask Mask; #define SANITIZER(NAME, ID) \ if (S.SectionMatcher->match(NAME)) \ diff --git a/clang/lib/Basic/Sanitizers.cpp b/clang/lib/Basic/Sanitizers.cpp index dd0fddbdc7dee..f5f81b5fb3e5e 100644 --- a/clang/lib/Basic/Sanitizers.cpp +++ b/clang/lib/Basic/Sanitizers.cpp @@ -11,17 +11,26 @@ //===----------------------------------------------------------------------===// #include "clang/Basic/Sanitizers.h" +#include "llvm/ADT/Hashing.h" #include "llvm/ADT/StringSwitch.h" using namespace clang; +// Once LLVM switches to C++17, the constexpr variables can be inline and we +// won't need this. +#define SANITIZER(NAME, ID) constexpr SanitizerMask SanitizerKind::ID; +#define SANITIZER_GROUP(NAME, ID, ALIAS) \ + constexpr SanitizerMask SanitizerKind::ID; \ + constexpr SanitizerMask SanitizerKind::ID##Group; +#include "clang/Basic/Sanitizers.def" + SanitizerMask clang::parseSanitizerValue(StringRef Value, bool AllowGroups) { SanitizerMask ParsedKind = llvm::StringSwitch(Value) #define SANITIZER(NAME, ID) .Case(NAME, SanitizerKind::ID) #define SANITIZER_GROUP(NAME, ID, ALIAS) \ - .Case(NAME, AllowGroups ? SanitizerKind::ID##Group : 0) + .Case(NAME, AllowGroups ? SanitizerKind::ID##Group : SanitizerMask()) #include "clang/Basic/Sanitizers.def" - .Default(0); + .Default(SanitizerMask()); return ParsedKind; } @@ -33,3 +42,13 @@ SanitizerMask clang::expandSanitizerGroups(SanitizerMask Kinds) { #include "clang/Basic/Sanitizers.def" return Kinds; } + +llvm::hash_code SanitizerMask::hash_value() const { + return llvm::hash_combine_range(&maskLoToHigh[0], &maskLoToHigh[kNumElem]); +} + +namespace clang { +llvm::hash_code hash_value(const clang::SanitizerMask &Arg) { + return Arg.hash_value(); +} +} // namespace clang diff --git a/clang/lib/Basic/TargetInfo.cpp b/clang/lib/Basic/TargetInfo.cpp index 79678ac6edcdf..5a75b857c21d0 100644 --- a/clang/lib/Basic/TargetInfo.cpp +++ b/clang/lib/Basic/TargetInfo.cpp @@ -456,7 +456,7 @@ bool TargetInfo::isValidGCCRegisterName(StringRef Name) const { } // Check register names. - if (std::find(Names.begin(), Names.end(), Name) != Names.end()) + if (llvm::is_contained(Names, Name)) return true; // Check any additional names that we have. diff --git a/clang/lib/Basic/Targets/AMDGPU.cpp b/clang/lib/Basic/Targets/AMDGPU.cpp index 8700af2bb8268..ef51c9875d170 100644 --- a/clang/lib/Basic/Targets/AMDGPU.cpp +++ b/clang/lib/Basic/Targets/AMDGPU.cpp @@ -146,7 +146,8 @@ bool AMDGPUTargetInfo::initFeatureMap( switch (llvm::AMDGPU::parseArchAMDGCN(CPU)) { case GK_GFX906: Features["dl-insts"] = true; - Features["dot-insts"] = true; + Features["dot1-insts"] = true; + Features["dot2-insts"] = true; LLVM_FALLTHROUGH; case GK_GFX909: case GK_GFX904: diff --git a/clang/lib/Basic/Targets/ARM.cpp b/clang/lib/Basic/Targets/ARM.cpp index f0ebfdd5f71ec..61a520bd5e0b0 100644 --- a/clang/lib/Basic/Targets/ARM.cpp +++ b/clang/lib/Basic/Targets/ARM.cpp @@ -652,6 +652,12 @@ void ARMTargetInfo::getTargetDefines(const LangOptions &Opts, if (SoftFloat) Builder.defineMacro("__SOFTFP__"); + // ACLE position independent code macros. + if (Opts.ROPI) + Builder.defineMacro("__ARM_ROPI", "1"); + if (Opts.RWPI) + Builder.defineMacro("__ARM_RWPI", "1"); + if (ArchKind == llvm::ARM::ArchKind::XSCALE) Builder.defineMacro("__XSCALE__"); diff --git a/clang/lib/Basic/Targets/BPF.cpp b/clang/lib/Basic/Targets/BPF.cpp index ec5e6ad637f10..e0527db59c979 100644 --- a/clang/lib/Basic/Targets/BPF.cpp +++ b/clang/lib/Basic/Targets/BPF.cpp @@ -25,7 +25,7 @@ void BPFTargetInfo::getTargetDefines(const LangOptions &Opts, } static constexpr llvm::StringLiteral ValidCPUNames[] = {"generic", "v1", "v2", - "probe"}; + "v3", "probe"}; bool BPFTargetInfo::isValidCPUName(StringRef Name) const { return llvm::find(ValidCPUNames, Name) != std::end(ValidCPUNames); diff --git a/clang/lib/Basic/Targets/Mips.cpp b/clang/lib/Basic/Targets/Mips.cpp index 840ad1bc627a2..2cafbe87a996b 100644 --- a/clang/lib/Basic/Targets/Mips.cpp +++ b/clang/lib/Basic/Targets/Mips.cpp @@ -215,6 +215,14 @@ ArrayRef MipsTargetInfo::getTargetBuiltins() const { Builtin::FirstTSBuiltin); } +unsigned MipsTargetInfo::getUnwindWordWidth() const { + return llvm::StringSwitch(ABI) + .Case("o32", 32) + .Case("n32", 64) + .Case("n64", 64) + .Default(getPointerWidth(0)); +} + bool MipsTargetInfo::validateTarget(DiagnosticsEngine &Diags) const { // microMIPS64R6 backend was removed. if (getTriple().isMIPS64() && IsMicromips && (ABI == "n32" || ABI == "n64")) { diff --git a/clang/lib/Basic/Targets/Mips.h b/clang/lib/Basic/Targets/Mips.h index ca0a5bf59654d..474cda84a40ec 100644 --- a/clang/lib/Basic/Targets/Mips.h +++ b/clang/lib/Basic/Targets/Mips.h @@ -401,6 +401,8 @@ class LLVM_LIBRARY_VISIBILITY MipsTargetInfo : public TargetInfo { return (ABI == "n32" || ABI == "n64") || getTargetOpts().ForceEnableInt128; } + unsigned getUnwindWordWidth() const override; + bool validateTarget(DiagnosticsEngine &Diags) const override; }; } // namespace targets diff --git a/clang/lib/Basic/Targets/NVPTX.h b/clang/lib/Basic/Targets/NVPTX.h index 52d54c5bb30d6..038a6601f0daf 100644 --- a/clang/lib/Basic/Targets/NVPTX.h +++ b/clang/lib/Basic/Targets/NVPTX.h @@ -36,11 +36,21 @@ static const unsigned NVPTXAddrSpaceMap[] = { 1, // sycl_global 3, // sycl_local 4, // sycl_constant - 5, // sycl_private + 0, // sycl_private // FIXME: generic has to be added to the target 0, // sycl_generic }; +/// The DWARF address class. Taken from +/// https://docs.nvidia.com/cuda/archive/10.0/ptx-writers-guide-to-interoperability/index.html#cuda-specific-dwarf +static const int NVPTXDWARFAddrSpaceMap[] = { + -1, // Default, opencl_private or opencl_generic - not defined + 5, // opencl_global + -1, + 8, // opencl_local or cuda_shared + 4, // opencl_constant or cuda_constant +}; + class LLVM_LIBRARY_VISIBILITY NVPTXTargetInfo : public TargetInfo { static const char *const GCCRegNames[]; static const Builtin::Info BuiltinInfo[]; @@ -130,6 +140,20 @@ class LLVM_LIBRARY_VISIBILITY NVPTXTargetInfo : public TargetInfo { Opts.support("cl_khr_local_int32_extended_atomics"); } + /// \returns If a target requires an address within a target specific address + /// space \p AddressSpace to be converted in order to be used, then return the + /// corresponding target specific DWARF address space. + /// + /// \returns Otherwise return None and no conversion will be emitted in the + /// DWARF. + Optional + getDWARFAddressSpace(unsigned AddressSpace) const override { + if (AddressSpace >= llvm::array_lengthof(NVPTXDWARFAddrSpaceMap) || + NVPTXDWARFAddrSpaceMap[AddressSpace] < 0) + return llvm::None; + return NVPTXDWARFAddrSpaceMap[AddressSpace]; + } + CallingConvCheckResult checkCallingConvention(CallingConv CC) const override { // CUDA compilations support all of the host's calling conventions. // diff --git a/clang/lib/Basic/Targets/PPC.h b/clang/lib/Basic/Targets/PPC.h index aef580df803b0..ecfc1bc1d4aed 100644 --- a/clang/lib/Basic/Targets/PPC.h +++ b/clang/lib/Basic/Targets/PPC.h @@ -131,19 +131,18 @@ class LLVM_LIBRARY_VISIBILITY PPCTargetInfo : public TargetInfo { ArchDefinePwr5 | ArchDefinePwr4 | ArchDefinePpcgr | ArchDefinePpcsq) .Cases("power7", "pwr7", - ArchDefinePwr7 | ArchDefinePwr6x | ArchDefinePwr6 | - ArchDefinePwr5x | ArchDefinePwr5 | ArchDefinePwr4 | - ArchDefinePpcgr | ArchDefinePpcsq) + ArchDefinePwr7 | ArchDefinePwr6 | ArchDefinePwr5x | + ArchDefinePwr5 | ArchDefinePwr4 | ArchDefinePpcgr | + ArchDefinePpcsq) // powerpc64le automatically defaults to at least power8. .Cases("power8", "pwr8", "ppc64le", - ArchDefinePwr8 | ArchDefinePwr7 | ArchDefinePwr6x | - ArchDefinePwr6 | ArchDefinePwr5x | ArchDefinePwr5 | - ArchDefinePwr4 | ArchDefinePpcgr | ArchDefinePpcsq) + ArchDefinePwr8 | ArchDefinePwr7 | ArchDefinePwr6 | + ArchDefinePwr5x | ArchDefinePwr5 | ArchDefinePwr4 | + ArchDefinePpcgr | ArchDefinePpcsq) .Cases("power9", "pwr9", - ArchDefinePwr9 | ArchDefinePwr8 | ArchDefinePwr7 | - ArchDefinePwr6x | ArchDefinePwr6 | ArchDefinePwr5x | - ArchDefinePwr5 | ArchDefinePwr4 | ArchDefinePpcgr | - ArchDefinePpcsq) + ArchDefinePwr9 | ArchDefinePwr8 | ArchDefinePwr7 | + ArchDefinePwr6 | ArchDefinePwr5x | ArchDefinePwr5 | + ArchDefinePwr4 | ArchDefinePpcgr | ArchDefinePpcsq) .Default(ArchDefineNone); } return CPUKnown; @@ -330,9 +329,15 @@ class LLVM_LIBRARY_VISIBILITY PPC32TargetInfo : public PPCTargetInfo { break; } - if (getTriple().isOSFreeBSD()) { + switch (getTriple().getOS()) { + case llvm::Triple::FreeBSD: + case llvm::Triple::NetBSD: + case llvm::Triple::OpenBSD: LongDoubleWidth = LongDoubleAlign = 64; LongDoubleFormat = &llvm::APFloat::IEEEdouble(); + break; + default: + break; } // PPC32 supports atomics up to 4 bytes. diff --git a/clang/lib/Basic/Targets/SPIR.h b/clang/lib/Basic/Targets/SPIR.h index 905469725ade3..6eb129436f337 100644 --- a/clang/lib/Basic/Targets/SPIR.h +++ b/clang/lib/Basic/Targets/SPIR.h @@ -34,7 +34,7 @@ static const unsigned SPIRAddrSpaceMap[] = { 1, // sycl_global 3, // sycl_local 2, // sycl_constant - 5, // sycl_private + 0, // sycl_private 4, // sycl_generic }; diff --git a/clang/lib/Basic/Targets/TCE.h b/clang/lib/Basic/Targets/TCE.h index a912274c26282..b131fe26f9b5f 100644 --- a/clang/lib/Basic/Targets/TCE.h +++ b/clang/lib/Basic/Targets/TCE.h @@ -43,7 +43,7 @@ static const unsigned TCEOpenCLAddrSpaceMap[] = { 3, // sycl_global 4, // sycl_local 5, // sycl_constant - 5, // sycl_private + 0, // sycl_private // FIXME: generic has to be added to the target 0, // sycl_generic }; diff --git a/clang/lib/Basic/Targets/WebAssembly.cpp b/clang/lib/Basic/Targets/WebAssembly.cpp index 48edaded51257..4e22abaaa8b7a 100644 --- a/clang/lib/Basic/Targets/WebAssembly.cpp +++ b/clang/lib/Basic/Targets/WebAssembly.cpp @@ -41,6 +41,7 @@ bool WebAssemblyTargetInfo::hasFeature(StringRef Feature) const { .Case("sign-ext", HasSignExt) .Case("exception-handling", HasExceptionHandling) .Case("bulk-memory", HasBulkMemory) + .Case("atomics", HasAtomics) .Default(false); } @@ -68,6 +69,8 @@ void WebAssemblyTargetInfo::getTargetDefines(const LangOptions &Opts, Builder.defineMacro("__wasm_exception_handling__"); if (HasBulkMemory) Builder.defineMacro("__wasm_bulk_memory__"); + if (HasAtomics) + Builder.defineMacro("__wasm_atomics__"); } void WebAssemblyTargetInfo::setSIMDLevel(llvm::StringMap &Features, @@ -90,6 +93,7 @@ bool WebAssemblyTargetInfo::initFeatureMap( if (CPU == "bleeding-edge") { Features["nontrapping-fptoint"] = true; Features["sign-ext"] = true; + Features["atomics"] = true; setSIMDLevel(Features, SIMD128); } // Other targets do not consider user-configured features here, but while we @@ -104,6 +108,8 @@ bool WebAssemblyTargetInfo::initFeatureMap( Features["exception-handling"] = true; if (HasBulkMemory) Features["bulk-memory"] = true; + if (HasAtomics) + Features["atomics"] = true; return TargetInfo::initFeatureMap(Features, Diags, CPU, FeaturesVec); } @@ -159,6 +165,14 @@ bool WebAssemblyTargetInfo::handleTargetFeatures( HasBulkMemory = false; continue; } + if (Feature == "+atomics") { + HasAtomics = true; + continue; + } + if (Feature == "-atomics") { + HasAtomics = false; + continue; + } Diags.Report(diag::err_opt_not_valid_with_opt) << Feature << "-target-feature"; diff --git a/clang/lib/Basic/Targets/WebAssembly.h b/clang/lib/Basic/Targets/WebAssembly.h index 1d41f2011bb1e..efd32c7acf9db 100644 --- a/clang/lib/Basic/Targets/WebAssembly.h +++ b/clang/lib/Basic/Targets/WebAssembly.h @@ -34,6 +34,7 @@ class LLVM_LIBRARY_VISIBILITY WebAssemblyTargetInfo : public TargetInfo { bool HasSignExt = false; bool HasExceptionHandling = false; bool HasBulkMemory = false; + bool HasAtomics = false; public: explicit WebAssemblyTargetInfo(const llvm::Triple &T, const TargetOptions &) diff --git a/clang/lib/Basic/Targets/X86.cpp b/clang/lib/Basic/Targets/X86.cpp index f59dc0151149d..69a766cd4a687 100644 --- a/clang/lib/Basic/Targets/X86.cpp +++ b/clang/lib/Basic/Targets/X86.cpp @@ -347,6 +347,11 @@ bool X86TargetInfo::initFeatureMap( setFeatureEnabledImpl(Features, "sahf", true); break; + case CK_ZNVER2: + setFeatureEnabledImpl(Features, "clwb", true); + setFeatureEnabledImpl(Features, "rdpid", true); + setFeatureEnabledImpl(Features, "wbnoinvd", true); + LLVM_FALLTHROUGH; case CK_ZNVER1: setFeatureEnabledImpl(Features, "adx", true); setFeatureEnabledImpl(Features, "aes", true); @@ -864,6 +869,9 @@ bool X86TargetInfo::handleTargetFeatures(std::vector &Features, /// definitions for this particular subtarget. void X86TargetInfo::getTargetDefines(const LangOptions &Opts, MacroBuilder &Builder) const { + // Inline assembly supports X86 flag outputs. + Builder.defineMacro("__GCC_ASM_FLAG_OUTPUTS__"); + std::string CodeModel = getTargetOpts().CodeModel; if (CodeModel == "default") CodeModel = "small"; @@ -1027,6 +1035,9 @@ void X86TargetInfo::getTargetDefines(const LangOptions &Opts, case CK_ZNVER1: defineCPUMacros(Builder, "znver1"); break; + case CK_ZNVER2: + defineCPUMacros(Builder, "znver2"); + break; case CK_Geode: defineCPUMacros(Builder, "geode"); break; @@ -1553,6 +1564,40 @@ bool X86TargetInfo::validateCpuIs(StringRef FeatureStr) const { .Default(false); } +static unsigned matchAsmCCConstraint(const char *&Name) { + auto RV = llvm::StringSwitch(Name) + .Case("@cca", 4) + .Case("@ccae", 5) + .Case("@ccb", 4) + .Case("@ccbe", 5) + .Case("@ccc", 4) + .Case("@cce", 4) + .Case("@ccz", 4) + .Case("@ccg", 4) + .Case("@ccge", 5) + .Case("@ccl", 4) + .Case("@ccle", 5) + .Case("@ccna", 5) + .Case("@ccnae", 6) + .Case("@ccnb", 5) + .Case("@ccnbe", 6) + .Case("@ccnc", 5) + .Case("@ccne", 5) + .Case("@ccnz", 5) + .Case("@ccng", 5) + .Case("@ccnge", 6) + .Case("@ccnl", 5) + .Case("@ccnle", 6) + .Case("@ccno", 5) + .Case("@ccnp", 5) + .Case("@ccns", 5) + .Case("@cco", 4) + .Case("@ccp", 4) + .Case("@ccs", 4) + .Default(0); + return RV; +} + bool X86TargetInfo::validateAsmConstraint( const char *&Name, TargetInfo::ConstraintInfo &Info) const { switch (*Name) { @@ -1635,6 +1680,14 @@ bool X86TargetInfo::validateAsmConstraint( case 'C': // SSE floating point constant. case 'G': // x87 floating point constant. return true; + case '@': + // CC condition changes. + if (auto Len = matchAsmCCConstraint(Name)) { + Name += Len - 1; + Info.setAllowsRegister(); + return true; + } + return false; } } @@ -1706,6 +1759,13 @@ bool X86TargetInfo::validateOperandSize(StringRef Constraint, std::string X86TargetInfo::convertConstraint(const char *&Constraint) const { switch (*Constraint) { + case '@': + if (auto Len = matchAsmCCConstraint(Constraint)) { + std::string Converted = "{" + std::string(Constraint, Len) + "}"; + Constraint += Len - 1; + return Converted; + } + return std::string(1, *Constraint); case 'a': return std::string("{ax}"); case 'b': diff --git a/clang/lib/Basic/Targets/X86.h b/clang/lib/Basic/Targets/X86.h index 2b126268beb14..b69a050d237ee 100644 --- a/clang/lib/Basic/Targets/X86.h +++ b/clang/lib/Basic/Targets/X86.h @@ -198,7 +198,7 @@ class LLVM_LIBRARY_VISIBILITY X86TargetInfo : public TargetInfo { StringRef Expression) const override { StringRef::iterator I, E; for (I = Constraint.begin(), E = Constraint.end(); I != E; ++I) { - if (isalpha(*I)) + if (isalpha(*I) || *I == '@') break; } if (I == E) diff --git a/clang/lib/Basic/Version.cpp b/clang/lib/Basic/Version.cpp index 4ed081d2779e9..d6564582e7726 100644 --- a/clang/lib/Basic/Version.cpp +++ b/clang/lib/Basic/Version.cpp @@ -17,8 +17,8 @@ #include #include -#ifdef HAVE_SVN_VERSION_INC -# include "SVNVersion.inc" +#ifdef HAVE_VCS_VERSION_INC +#include "VCSVersion.inc" #endif namespace clang { @@ -27,13 +27,13 @@ std::string getClangRepositoryPath() { #if defined(CLANG_REPOSITORY_STRING) return CLANG_REPOSITORY_STRING; #else -#ifdef SVN_REPOSITORY - StringRef URL(SVN_REPOSITORY); +#ifdef CLANG_REPOSITORY + StringRef URL(CLANG_REPOSITORY); #else StringRef URL(""); #endif - // If the SVN_REPOSITORY is empty, try to use the SVN keyword. This helps us + // If the CLANG_REPOSITORY is empty, try to use the SVN keyword. This helps us // pick up a tag in an SVN export, for example. StringRef SVNRepository("$URL$"); if (URL.empty()) { @@ -71,8 +71,8 @@ std::string getLLVMRepositoryPath() { } std::string getClangRevision() { -#ifdef SVN_REVISION - return SVN_REVISION; +#ifdef CLANG_REVISION + return CLANG_REVISION; #else return ""; #endif diff --git a/clang/lib/Basic/XRayLists.cpp b/clang/lib/Basic/XRayLists.cpp index d88dc830bbe0b..eb549436710aa 100644 --- a/clang/lib/Basic/XRayLists.cpp +++ b/clang/lib/Basic/XRayLists.cpp @@ -1,4 +1,4 @@ -//===--- XRayFunctionFilter.cpp - XRay automatic-attribution --------------===// +//===-- XRayLists.cpp - XRay automatic-attribution ------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/clang/lib/CodeGen/BackendUtil.cpp b/clang/lib/CodeGen/BackendUtil.cpp index 365d96ead65e8..6e6d6556e94d6 100644 --- a/clang/lib/CodeGen/BackendUtil.cpp +++ b/clang/lib/CodeGen/BackendUtil.cpp @@ -55,6 +55,7 @@ #include "llvm/Transforms/IPO/ThinLTOBitcodeWriter.h" #include "llvm/Transforms/InstCombine/InstCombine.h" #include "llvm/Transforms/Instrumentation.h" +#include "llvm/Transforms/Instrumentation/AddressSanitizer.h" #include "llvm/Transforms/Instrumentation/BoundsChecking.h" #include "llvm/Transforms/Instrumentation/GCOVProfiler.h" #include "llvm/Transforms/Instrumentation/MemorySanitizer.h" @@ -69,7 +70,6 @@ #include "llvm/SYCL/ASFixer.h" #include -#include "LLVMSPIRVLib.h" namespace SPIRV { extern llvm::cl::opt SPIRVNoDerefAttr; } @@ -252,15 +252,15 @@ static void addAddressSanitizerPasses(const PassManagerBuilder &Builder, bool UseGlobalsGC = asanUseGlobalsGC(T, CGOpts); PM.add(createAddressSanitizerFunctionPass(/*CompileKernel*/ false, Recover, UseAfterScope)); - PM.add(createAddressSanitizerModulePass(/*CompileKernel*/ false, Recover, - UseGlobalsGC, UseOdrIndicator)); + PM.add(createModuleAddressSanitizerLegacyPassPass( + /*CompileKernel*/ false, Recover, UseGlobalsGC, UseOdrIndicator)); } static void addKernelAddressSanitizerPasses(const PassManagerBuilder &Builder, legacy::PassManagerBase &PM) { PM.add(createAddressSanitizerFunctionPass( /*CompileKernel*/ true, /*Recover*/ true, /*UseAfterScope*/ false)); - PM.add(createAddressSanitizerModulePass( + PM.add(createModuleAddressSanitizerLegacyPassPass( /*CompileKernel*/ true, /*Recover*/ true, /*UseGlobalsGC*/ true, /*UseOdrIndicator*/ false)); } @@ -288,7 +288,8 @@ static void addGeneralOptsForMemorySanitizer(const PassManagerBuilder &Builder, const CodeGenOptions &CGOpts = BuilderWrapper.getCGOpts(); int TrackOrigins = CGOpts.SanitizeMemoryTrackOrigins; bool Recover = CGOpts.SanitizeRecover.has(SanitizerKind::Memory); - PM.add(createMemorySanitizerLegacyPassPass(TrackOrigins, Recover, CompileKernel)); + PM.add(createMemorySanitizerLegacyPassPass( + MemorySanitizerOptions{TrackOrigins, Recover, CompileKernel})); // MemorySanitizer inserts complex instrumentation that mostly follows // the logic of the original code, but operates on "shadow" values. @@ -588,7 +589,7 @@ void EmitAssemblyHelper::CreatePasses(legacy::PassManager &MPM, addObjCARCOptPass); } - if (LangOpts.CoroutinesTS) + if (LangOpts.Coroutines) addCoroutinePassesToExtensionPoints(PMBuilder); if (LangOpts.Sanitize.has(SanitizerKind::LocalBounds)) { @@ -694,17 +695,33 @@ void EmitAssemblyHelper::CreatePasses(legacy::PassManager &MPM, // the driver level. Options.Atomic = LangOpts.Sanitize.has(SanitizerKind::Thread); - MPM.add(createInstrProfilingLegacyPass(Options)); + MPM.add(createInstrProfilingLegacyPass(Options, false)); } + bool hasIRInstr = false; if (CodeGenOpts.hasProfileIRInstr()) { PMBuilder.EnablePGOInstrGen = true; + hasIRInstr = true; + } + if (CodeGenOpts.hasProfileCSIRInstr()) { + assert(!CodeGenOpts.hasProfileCSIRUse() && + "Cannot have both CSProfileUse pass and CSProfileGen pass at the " + "same time"); + assert(!hasIRInstr && + "Cannot have both ProfileGen pass and CSProfileGen pass at the " + "same time"); + PMBuilder.EnablePGOCSInstrGen = true; + hasIRInstr = true; + } + if (hasIRInstr) { if (!CodeGenOpts.InstrProfileOutput.empty()) PMBuilder.PGOInstrGen = CodeGenOpts.InstrProfileOutput; else PMBuilder.PGOInstrGen = DefaultProfileGenName; } - if (CodeGenOpts.hasProfileIRUse()) + if (CodeGenOpts.hasProfileIRUse()) { PMBuilder.PGOInstrUse = CodeGenOpts.ProfileInstrumentUsePath; + PMBuilder.EnablePGOCSInstrUse = CodeGenOpts.hasProfileCSIRUse(); + } if (!CodeGenOpts.SampleProfileFile.empty()) PMBuilder.PGOSampleUse = CodeGenOpts.SampleProfileFile; @@ -789,7 +806,6 @@ void EmitAssemblyHelper::EmitAssembly(BackendAction Action, bool UsesCodeGen = (Action != Backend_EmitNothing && Action != Backend_EmitBC && - Action != Backend_EmitSPIRV && Action != Backend_EmitLL); CreateTargetMachine(UsesCodeGen); @@ -806,7 +822,7 @@ void EmitAssemblyHelper::EmitAssembly(BackendAction Action, PerFunctionPasses.add( createTargetTransformInfoWrapperPass(getTargetIRAnalysis())); - if (LangOpts.SYCL) { + if (LangOpts.SYCLIsDevice) { PerModulePasses.add(createOclCxxBifNameReflowerPass()); } @@ -823,6 +839,10 @@ void EmitAssemblyHelper::EmitAssembly(BackendAction Action, break; case Backend_EmitBC: + if (LangOpts.SYCLIsDevice) { + PerModulePasses.add(createASFixerPass()); + PerModulePasses.add(createDeadCodeEliminationPass()); + } if (CodeGenOpts.PrepareForThinLTO && !CodeGenOpts.DisableLLVMPasses) { if (!CodeGenOpts.ThinLinkBitcodeFile.empty()) { ThinLinkOS = openOutputFile(CodeGenOpts.ThinLinkBitcodeFile); @@ -853,24 +873,6 @@ void EmitAssemblyHelper::EmitAssembly(BackendAction Action, } break; - case Backend_EmitSPIRV: - if (LangOpts.SYCL) { - // TODO: SPIRVNoDerefAttr is not modeled when using the bitcode pass - SPIRV::SPIRVNoDerefAttr = true; - // TODO: this pass added to work around missing linkonce_odr in SPIR-V - PerModulePasses.add( - createAlwaysInlinerLegacyPass(true /*InsertLifetimeIntrinsics*/)); - PerModulePasses.add(createASFixerPass()); - PerModulePasses.add(createDeadCodeEliminationPass()); - } - if (LangOpts.SYCLUseBitcode) - PerModulePasses.add( - createBitcodeWriterPass(*OS, CodeGenOpts.EmitLLVMUseLists, false)); - else - PerModulePasses.add(createSPIRVWriterPass(*OS)); - - break; - case Backend_EmitLL: PerModulePasses.add( createPrintModulePass(*OS, "", CodeGenOpts.EmitLLVMUseLists)); @@ -948,6 +950,30 @@ static PassBuilder::OptimizationLevel mapToLevel(const CodeGenOptions &Opts) { } } +void addSanitizersAtO0(ModulePassManager &MPM, const Triple &TargetTriple, + const LangOptions &LangOpts, + const CodeGenOptions &CodeGenOpts) { + if (LangOpts.Sanitize.has(SanitizerKind::Address)) { + MPM.addPass(RequireAnalysisPass()); + bool Recover = CodeGenOpts.SanitizeRecover.has(SanitizerKind::Address); + MPM.addPass(createModuleToFunctionPassAdaptor( + AddressSanitizerPass(/*CompileKernel=*/false, Recover, + CodeGenOpts.SanitizeAddressUseAfterScope))); + bool ModuleUseAfterScope = asanUseGlobalsGC(TargetTriple, CodeGenOpts); + MPM.addPass(ModuleAddressSanitizerPass( + /*CompileKernel=*/false, Recover, ModuleUseAfterScope, + CodeGenOpts.SanitizeAddressUseOdrIndicator)); + } + + if (LangOpts.Sanitize.has(SanitizerKind::Memory)) { + MPM.addPass(createModuleToFunctionPassAdaptor(MemorySanitizerPass({}))); + } + + if (LangOpts.Sanitize.has(SanitizerKind::Thread)) { + MPM.addPass(createModuleToFunctionPassAdaptor(ThreadSanitizerPass())); + } +} + /// A clean version of `EmitAssembly` that uses the new pass manager. /// /// Not all features are currently supported in this system, but where @@ -976,21 +1002,48 @@ void EmitAssemblyHelper::EmitAssemblyWithNewPassManager( PGOOpt = PGOOptions(CodeGenOpts.InstrProfileOutput.empty() ? DefaultProfileGenName : CodeGenOpts.InstrProfileOutput, - "", "", "", true, + "", "", PGOOptions::IRInstr, PGOOptions::NoCSAction, CodeGenOpts.DebugInfoForProfiling); - else if (CodeGenOpts.hasProfileIRUse()) + else if (CodeGenOpts.hasProfileIRUse()) { // -fprofile-use. - PGOOpt = PGOOptions("", CodeGenOpts.ProfileInstrumentUsePath, "", - CodeGenOpts.ProfileRemappingFile, false, - CodeGenOpts.DebugInfoForProfiling); - else if (!CodeGenOpts.SampleProfileFile.empty()) + auto CSAction = CodeGenOpts.hasProfileCSIRUse() ? PGOOptions::CSIRUse + : PGOOptions::NoCSAction; + PGOOpt = PGOOptions(CodeGenOpts.ProfileInstrumentUsePath, "", + CodeGenOpts.ProfileRemappingFile, PGOOptions::IRUse, + CSAction, CodeGenOpts.DebugInfoForProfiling); + } else if (!CodeGenOpts.SampleProfileFile.empty()) // -fprofile-sample-use - PGOOpt = PGOOptions("", "", CodeGenOpts.SampleProfileFile, - CodeGenOpts.ProfileRemappingFile, false, - CodeGenOpts.DebugInfoForProfiling); + PGOOpt = + PGOOptions(CodeGenOpts.SampleProfileFile, "", + CodeGenOpts.ProfileRemappingFile, PGOOptions::SampleUse, + PGOOptions::NoCSAction, CodeGenOpts.DebugInfoForProfiling); else if (CodeGenOpts.DebugInfoForProfiling) // -fdebug-info-for-profiling - PGOOpt = PGOOptions("", "", "", "", false, true); + PGOOpt = PGOOptions("", "", "", PGOOptions::NoAction, + PGOOptions::NoCSAction, true); + + // Check to see if we want to generate a CS profile. + if (CodeGenOpts.hasProfileCSIRInstr()) { + assert(!CodeGenOpts.hasProfileCSIRUse() && + "Cannot have both CSProfileUse pass and CSProfileGen pass at " + "the same time"); + if (PGOOpt.hasValue()) { + assert(PGOOpt->Action != PGOOptions::IRInstr && + PGOOpt->Action != PGOOptions::SampleUse && + "Cannot run CSProfileGen pass with ProfileGen or SampleUse " + " pass"); + PGOOpt->CSProfileGenFile = CodeGenOpts.InstrProfileOutput.empty() + ? DefaultProfileGenName + : CodeGenOpts.InstrProfileOutput; + PGOOpt->CSAction = PGOOptions::CSIRInstr; + } else + PGOOpt = PGOOptions("", + CodeGenOpts.InstrProfileOutput.empty() + ? DefaultProfileGenName + : CodeGenOpts.InstrProfileOutput, + "", PGOOptions::NoAction, PGOOptions::CSIRInstr, + CodeGenOpts.DebugInfoForProfiling); + } PassBuilder PB(TM.get(), PGOOpt); @@ -1067,13 +1120,36 @@ void EmitAssemblyHelper::EmitAssemblyWithNewPassManager( if (LangOpts.Sanitize.has(SanitizerKind::Memory)) PB.registerOptimizerLastEPCallback( [](FunctionPassManager &FPM, PassBuilder::OptimizationLevel Level) { - FPM.addPass(MemorySanitizerPass()); + FPM.addPass(MemorySanitizerPass({})); }); if (LangOpts.Sanitize.has(SanitizerKind::Thread)) PB.registerOptimizerLastEPCallback( [](FunctionPassManager &FPM, PassBuilder::OptimizationLevel Level) { FPM.addPass(ThreadSanitizerPass()); }); + if (LangOpts.Sanitize.has(SanitizerKind::Address)) { + PB.registerPipelineStartEPCallback([&](ModulePassManager &MPM) { + MPM.addPass( + RequireAnalysisPass()); + }); + bool Recover = CodeGenOpts.SanitizeRecover.has(SanitizerKind::Address); + bool UseAfterScope = CodeGenOpts.SanitizeAddressUseAfterScope; + PB.registerOptimizerLastEPCallback( + [Recover, UseAfterScope](FunctionPassManager &FPM, + PassBuilder::OptimizationLevel Level) { + FPM.addPass(AddressSanitizerPass( + /*CompileKernel=*/false, Recover, UseAfterScope)); + }); + bool ModuleUseAfterScope = asanUseGlobalsGC(TargetTriple, CodeGenOpts); + bool UseOdrIndicator = CodeGenOpts.SanitizeAddressUseOdrIndicator; + PB.registerPipelineStartEPCallback( + [Recover, ModuleUseAfterScope, + UseOdrIndicator](ModulePassManager &MPM) { + MPM.addPass(ModuleAddressSanitizerPass( + /*CompileKernel=*/false, Recover, ModuleUseAfterScope, + UseOdrIndicator)); + }); + } if (Optional Options = getGCOVOptions(CodeGenOpts)) PB.registerPipelineStartEPCallback([Options](ModulePassManager &MPM) { MPM.addPass(GCOVProfilerPass(*Options)); @@ -1094,6 +1170,9 @@ void EmitAssemblyHelper::EmitAssemblyWithNewPassManager( CodeGenOpts.DebugPassManager); } } + + if (CodeGenOpts.OptimizationLevel == 0) + addSanitizersAtO0(MPM, TargetTriple, LangOpts, CodeGenOpts); } // FIXME: We still use the legacy pass manager to do code generation. We @@ -1108,6 +1187,10 @@ void EmitAssemblyHelper::EmitAssemblyWithNewPassManager( break; case Backend_EmitBC: + if (LangOpts.SYCLIsDevice) { + CodeGenPasses.add(createASFixerPass()); + CodeGenPasses.add(createDeadCodeEliminationPass()); + } if (CodeGenOpts.PrepareForThinLTO && !CodeGenOpts.DisableLLVMPasses) { if (!CodeGenOpts.ThinLinkBitcodeFile.empty()) { ThinLinkOS = openOutputFile(CodeGenOpts.ThinLinkBitcodeFile); @@ -1137,18 +1220,6 @@ void EmitAssemblyHelper::EmitAssemblyWithNewPassManager( } break; - case Backend_EmitSPIRV: - if (LangOpts.SYCL) { - SPIRV::SPIRVNoDerefAttr = true; - // TODO: this pass added to work around missing linkonce_odr in SPIR-V - CodeGenPasses.add( - createAlwaysInlinerLegacyPass(true /*InsertLifetimeIntrinsics*/)); - CodeGenPasses.add(createASFixerPass()); - CodeGenPasses.add(createDeadCodeEliminationPass()); - } - CodeGenPasses.add(createSPIRVWriterPass(*OS)); - break; - case Backend_EmitLL: MPM.addPass(PrintModulePass(*OS, "", CodeGenOpts.EmitLLVMUseLists)); break; @@ -1294,6 +1365,16 @@ static void runThinLTOBackend(ModuleSummaryIndex *CombinedIndex, Module *M, Conf.CGOptLevel = getCGOptLevel(CGOpts); initTargetOptions(Conf.Options, CGOpts, TOpts, LOpts, HeaderOpts); Conf.SampleProfile = std::move(SampleProfile); + + // Context sensitive profile. + if (CGOpts.hasProfileCSIRInstr()) { + Conf.RunCSIRInstr = true; + Conf.CSIRProfile = std::move(CGOpts.InstrProfileOutput); + } else if (CGOpts.hasProfileCSIRUse()) { + Conf.RunCSIRInstr = false; + Conf.CSIRProfile = std::move(CGOpts.ProfileInstrumentUsePath); + } + Conf.ProfileRemapping = std::move(ProfileRemapping); Conf.UseNewPM = CGOpts.ExperimentalNewPassManager; Conf.DebugPassManager = CGOpts.DebugPassManager; diff --git a/clang/lib/CodeGen/CGAtomic.cpp b/clang/lib/CodeGen/CGAtomic.cpp index 0f7f5cc70bbc4..1d18e57b0e904 100644 --- a/clang/lib/CodeGen/CGAtomic.cpp +++ b/clang/lib/CodeGen/CGAtomic.cpp @@ -201,7 +201,7 @@ namespace { assert(LVal.isSimple()); Address addr = getAtomicAddress(); if (hasPadding()) - addr = CGF.Builder.CreateStructGEP(addr, 0, CharUnits()); + addr = CGF.Builder.CreateStructGEP(addr, 0); return LValue::MakeAddr(addr, getValueType(), CGF.getContext(), LVal.getBaseInfo(), LVal.getTBAAInfo()); @@ -307,7 +307,7 @@ static RValue emitAtomicLibcall(CodeGenFunction &CGF, const CGFunctionInfo &fnInfo = CGF.CGM.getTypes().arrangeBuiltinFunctionCall(resultType, args); llvm::FunctionType *fnTy = CGF.CGM.getTypes().GetFunctionType(fnInfo); - llvm::Constant *fn = CGF.CGM.CreateRuntimeFunction(fnTy, fnName); + llvm::FunctionCallee fn = CGF.CGM.CreateRuntimeFunction(fnTy, fnName); auto callee = CGCallee::forDirect(fn); return CGF.EmitCall(fnInfo, callee, ReturnValueSlot(), args); } @@ -1356,7 +1356,7 @@ RValue AtomicInfo::convertAtomicTempToRValue(Address addr, // Drill into the padding structure if we have one. if (hasPadding()) - addr = CGF.Builder.CreateStructGEP(addr, 0, CharUnits()); + addr = CGF.Builder.CreateStructGEP(addr, 0); // Otherwise, just convert the temporary to an r-value using the // normal conversion routine. diff --git a/clang/lib/CodeGen/CGBlocks.cpp b/clang/lib/CodeGen/CGBlocks.cpp index 4df46eb9b5a55..1c10c46baa2ed 100644 --- a/clang/lib/CodeGen/CGBlocks.cpp +++ b/clang/lib/CodeGen/CGBlocks.cpp @@ -836,9 +836,8 @@ static void enterBlockScope(CodeGenFunction &CGF, BlockDecl *block) { } // GEP down to the address. - Address addr = CGF.Builder.CreateStructGEP(blockInfo.LocalAddress, - capture.getIndex(), - capture.getOffset()); + Address addr = + CGF.Builder.CreateStructGEP(blockInfo.LocalAddress, capture.getIndex()); // We can use that GEP as the dominating IP. if (!blockInfo.DominatingIP) @@ -975,27 +974,24 @@ llvm::Value *CodeGenFunction::EmitBlockLiteral(const CGBlockInfo &blockInfo) { flags |= BLOCK_IS_NOESCAPE | BLOCK_IS_GLOBAL; } - auto projectField = - [&](unsigned index, CharUnits offset, const Twine &name) -> Address { - return Builder.CreateStructGEP(blockAddr, index, offset, name); - }; - auto storeField = - [&](llvm::Value *value, unsigned index, CharUnits offset, - const Twine &name) { - Builder.CreateStore(value, projectField(index, offset, name)); - }; + auto projectField = [&](unsigned index, const Twine &name) -> Address { + return Builder.CreateStructGEP(blockAddr, index, name); + }; + auto storeField = [&](llvm::Value *value, unsigned index, const Twine &name) { + Builder.CreateStore(value, projectField(index, name)); + }; // Initialize the block header. { // We assume all the header fields are densely packed. unsigned index = 0; CharUnits offset; - auto addHeaderField = - [&](llvm::Value *value, CharUnits size, const Twine &name) { - storeField(value, index, offset, name); - offset += size; - index++; - }; + auto addHeaderField = [&](llvm::Value *value, CharUnits size, + const Twine &name) { + storeField(value, index, name); + offset += size; + index++; + }; if (!IsOpenCL) { addHeaderField(isa, getPointerSize(), "block.isa"); @@ -1031,8 +1027,8 @@ llvm::Value *CodeGenFunction::EmitBlockLiteral(const CGBlockInfo &blockInfo) { // First, 'this'. if (blockDecl->capturesCXXThis()) { - Address addr = projectField(blockInfo.CXXThisIndex, blockInfo.CXXThisOffset, - "block.captured-this.addr"); + Address addr = + projectField(blockInfo.CXXThisIndex, "block.captured-this.addr"); Builder.CreateStore(LoadCXXThis(), addr); } @@ -1048,8 +1044,7 @@ llvm::Value *CodeGenFunction::EmitBlockLiteral(const CGBlockInfo &blockInfo) { // This will be a [[type]]*, except that a byref entry will just be // an i8**. - Address blockField = - projectField(capture.getIndex(), capture.getOffset(), "block.captured"); + Address blockField = projectField(capture.getIndex(), "block.captured"); // Compute the address of the thing we're going to move into the // block literal. @@ -1068,7 +1063,6 @@ llvm::Value *CodeGenFunction::EmitBlockLiteral(const CGBlockInfo &blockInfo) { // This is a [[type]]*, except that a byref entry will just be an i8**. src = Builder.CreateStructGEP(LoadBlockStruct(), enclosingCapture.getIndex(), - enclosingCapture.getOffset(), "block.capture.addr"); } else { auto I = LocalDeclMap.find(variable); @@ -1259,52 +1253,49 @@ RValue CodeGenFunction::EmitBlockCallExpr(const CallExpr *E, ReturnValueSlot ReturnValue) { const BlockPointerType *BPT = E->getCallee()->getType()->getAs(); - llvm::Value *BlockPtr = EmitScalarExpr(E->getCallee()); - - // Get a pointer to the generic block literal. - // For OpenCL we generate generic AS void ptr to be able to reuse the same - // block definition for blocks with captures generated as private AS local - // variables and without captures generated as global AS program scope - // variables. - unsigned AddrSpace = 0; - if (getLangOpts().OpenCL) - AddrSpace = getContext().getTargetAddressSpace(LangAS::opencl_generic); - - llvm::Type *BlockLiteralTy = - llvm::PointerType::get(CGM.getGenericBlockLiteralType(), AddrSpace); - - // Bitcast the callee to a block literal. - BlockPtr = - Builder.CreatePointerCast(BlockPtr, BlockLiteralTy, "block.literal"); - - // Get the function pointer from the literal. - llvm::Value *FuncPtr = - Builder.CreateStructGEP(CGM.getGenericBlockLiteralType(), BlockPtr, - CGM.getLangOpts().OpenCL ? 2 : 3); - - // Add the block literal. + llvm::Type *GenBlockTy = CGM.getGenericBlockLiteralType(); + llvm::Value *Func = nullptr; + QualType FnType = BPT->getPointeeType(); + ASTContext &Ctx = getContext(); CallArgList Args; - QualType VoidPtrQualTy = getContext().VoidPtrTy; - llvm::Type *GenericVoidPtrTy = VoidPtrTy; if (getLangOpts().OpenCL) { - GenericVoidPtrTy = CGM.getOpenCLRuntime().getGenericVoidPointerType(); - VoidPtrQualTy = - getContext().getPointerType(getContext().getAddrSpaceQualType( - getContext().VoidTy, LangAS::opencl_generic)); - } - - BlockPtr = Builder.CreatePointerCast(BlockPtr, GenericVoidPtrTy); - Args.add(RValue::get(BlockPtr), VoidPtrQualTy); - - QualType FnType = BPT->getPointeeType(); + // For OpenCL, BlockPtr is already casted to generic block literal. + + // First argument of a block call is a generic block literal casted to + // generic void pointer, i.e. i8 addrspace(4)* + llvm::Value *BlockDescriptor = Builder.CreatePointerCast( + BlockPtr, CGM.getOpenCLRuntime().getGenericVoidPointerType()); + QualType VoidPtrQualTy = Ctx.getPointerType( + Ctx.getAddrSpaceQualType(Ctx.VoidTy, LangAS::opencl_generic)); + Args.add(RValue::get(BlockDescriptor), VoidPtrQualTy); + // And the rest of the arguments. + EmitCallArgs(Args, FnType->getAs(), E->arguments()); + + // We *can* call the block directly unless it is a function argument. + if (!isa(E->getCalleeDecl())) + Func = CGM.getOpenCLRuntime().getInvokeFunction(E->getCallee()); + else { + llvm::Value *FuncPtr = Builder.CreateStructGEP(GenBlockTy, BlockPtr, 2); + Func = Builder.CreateAlignedLoad(FuncPtr, getPointerAlign()); + } + } else { + // Bitcast the block literal to a generic block literal. + BlockPtr = Builder.CreatePointerCast( + BlockPtr, llvm::PointerType::get(GenBlockTy, 0), "block.literal"); + // Get pointer to the block invoke function + llvm::Value *FuncPtr = Builder.CreateStructGEP(GenBlockTy, BlockPtr, 3); - // And the rest of the arguments. - EmitCallArgs(Args, FnType->getAs(), E->arguments()); + // First argument is a block literal casted to a void pointer + BlockPtr = Builder.CreatePointerCast(BlockPtr, VoidPtrTy); + Args.add(RValue::get(BlockPtr), Ctx.VoidPtrTy); + // And the rest of the arguments. + EmitCallArgs(Args, FnType->getAs(), E->arguments()); - // Load the function. - llvm::Value *Func = Builder.CreateAlignedLoad(FuncPtr, getPointerAlign()); + // Load the function. + Func = Builder.CreateAlignedLoad(FuncPtr, getPointerAlign()); + } const FunctionType *FuncTy = FnType->castAs(); const CGFunctionInfo &FnInfo = @@ -1330,9 +1321,8 @@ Address CodeGenFunction::GetAddrOfBlockDecl(const VarDecl *variable) { // Handle constant captures. if (capture.isConstant()) return LocalDeclMap.find(variable)->second; - Address addr = - Builder.CreateStructGEP(LoadBlockStruct(), capture.getIndex(), - capture.getOffset(), "block.capture.addr"); + Address addr = Builder.CreateStructGEP(LoadBlockStruct(), capture.getIndex(), + "block.capture.addr"); if (variable->isEscapingByref()) { // addr should be a void** right now. Load, then cast the result @@ -1615,9 +1605,8 @@ CodeGenFunction::GenerateBlockFunction(GlobalDecl GD, // If we have a C++ 'this' reference, go ahead and force it into // existence now. if (blockDecl->capturesCXXThis()) { - Address addr = - Builder.CreateStructGEP(LoadBlockStruct(), blockInfo.CXXThisIndex, - blockInfo.CXXThisOffset, "block.captured-this"); + Address addr = Builder.CreateStructGEP( + LoadBlockStruct(), blockInfo.CXXThisIndex, "block.captured-this"); CXXThisValue = Builder.CreateLoad(addr, "this"); } @@ -2027,6 +2016,8 @@ CodeGenFunction::GenerateCopyHelperFunction(const CGBlockInfo &blockInfo) { llvm::Function *Fn = llvm::Function::Create(LTy, llvm::GlobalValue::LinkOnceODRLinkage, FuncName, &CGM.getModule()); + if (CGM.supportsCOMDAT()) + Fn->setComdat(CGM.getModule().getOrInsertComdat(FuncName)); IdentifierInfo *II = &C.Idents.get(FuncName); @@ -2060,8 +2051,8 @@ CodeGenFunction::GenerateCopyHelperFunction(const CGBlockInfo &blockInfo) { BlockFieldFlags flags = CopiedCapture.CopyFlags; unsigned index = capture.getIndex(); - Address srcField = Builder.CreateStructGEP(src, index, capture.getOffset()); - Address dstField = Builder.CreateStructGEP(dst, index, capture.getOffset()); + Address srcField = Builder.CreateStructGEP(src, index); + Address dstField = Builder.CreateStructGEP(dst, index); switch (CopiedCapture.CopyKind) { case BlockCaptureEntityKind::CXXRecord: @@ -2218,6 +2209,8 @@ CodeGenFunction::GenerateDestroyHelperFunction(const CGBlockInfo &blockInfo) { llvm::Function *Fn = llvm::Function::Create(LTy, llvm::GlobalValue::LinkOnceODRLinkage, FuncName, &CGM.getModule()); + if (CGM.supportsCOMDAT()) + Fn->setComdat(CGM.getModule().getOrInsertComdat(FuncName)); IdentifierInfo *II = &C.Idents.get(FuncName); @@ -2249,8 +2242,7 @@ CodeGenFunction::GenerateDestroyHelperFunction(const CGBlockInfo &blockInfo) { const CGBlockInfo::Capture &capture = *DestroyedCapture.Capture; BlockFieldFlags flags = DestroyedCapture.DisposeFlags; - Address srcField = - Builder.CreateStructGEP(src, capture.getIndex(), capture.getOffset()); + Address srcField = Builder.CreateStructGEP(src, capture.getIndex()); pushCaptureCleanup(DestroyedCapture.DisposeKind, srcField, CI.getVariable()->getType(), flags, @@ -2284,7 +2276,7 @@ class ObjectByrefHelpers final : public BlockByrefHelpers { unsigned flags = (Flags | BLOCK_BYREF_CALLER).getBitMask(); llvm::Value *flagsVal = llvm::ConstantInt::get(CGF.Int32Ty, flags); - llvm::Value *fn = CGF.CGM.getBlockObjectAssign(); + llvm::FunctionCallee fn = CGF.CGM.getBlockObjectAssign(); llvm::Value *args[] = { destField.getPointer(), srcValue, flagsVal }; CGF.EmitNounwindRuntimeCall(fn, args); @@ -2710,13 +2702,11 @@ Address CodeGenFunction::emitBlockByrefAddress(Address baseAddr, const llvm::Twine &name) { // Chase the forwarding address if requested. if (followForward) { - Address forwardingAddr = - Builder.CreateStructGEP(baseAddr, 1, getPointerSize(), "forwarding"); + Address forwardingAddr = Builder.CreateStructGEP(baseAddr, 1, "forwarding"); baseAddr = Address(Builder.CreateLoad(forwardingAddr), info.ByrefAlignment); } - return Builder.CreateStructGEP(baseAddr, info.FieldIndex, - info.FieldOffset, name); + return Builder.CreateStructGEP(baseAddr, info.FieldIndex, name); } /// BuildByrefInfo - This routine changes a __block variable declared as T x @@ -2834,8 +2824,7 @@ void CodeGenFunction::emitByrefStructureInit(const AutoVarEmission &emission) { CharUnits nextHeaderOffset; auto storeHeaderField = [&](llvm::Value *value, CharUnits fieldSize, const Twine &name) { - auto fieldAddr = Builder.CreateStructGEP(addr, nextHeaderIndex, - nextHeaderOffset, name); + auto fieldAddr = Builder.CreateStructGEP(addr, nextHeaderIndex, name); Builder.CreateStore(value, fieldAddr); nextHeaderIndex++; @@ -2931,7 +2920,7 @@ void CodeGenFunction::emitByrefStructureInit(const AutoVarEmission &emission) { void CodeGenFunction::BuildBlockRelease(llvm::Value *V, BlockFieldFlags flags, bool CanThrow) { - llvm::Value *F = CGM.getBlockObjectDispose(); + llvm::FunctionCallee F = CGM.getBlockObjectDispose(); llvm::Value *args[] = { Builder.CreateBitCast(V, Int8PtrTy), llvm::ConstantInt::get(Int32Ty, flags.getBitMask()) @@ -2987,7 +2976,7 @@ static void configureBlocksRuntimeObject(CodeGenModule &CGM, CGM.setDSOLocal(GV); } -llvm::Constant *CodeGenModule::getBlockObjectDispose() { +llvm::FunctionCallee CodeGenModule::getBlockObjectDispose() { if (BlockObjectDispose) return BlockObjectDispose; @@ -2995,11 +2984,12 @@ llvm::Constant *CodeGenModule::getBlockObjectDispose() { llvm::FunctionType *fty = llvm::FunctionType::get(VoidTy, args, false); BlockObjectDispose = CreateRuntimeFunction(fty, "_Block_object_dispose"); - configureBlocksRuntimeObject(*this, BlockObjectDispose); + configureBlocksRuntimeObject( + *this, cast(BlockObjectDispose.getCallee())); return BlockObjectDispose; } -llvm::Constant *CodeGenModule::getBlockObjectAssign() { +llvm::FunctionCallee CodeGenModule::getBlockObjectAssign() { if (BlockObjectAssign) return BlockObjectAssign; @@ -3007,7 +2997,8 @@ llvm::Constant *CodeGenModule::getBlockObjectAssign() { llvm::FunctionType *fty = llvm::FunctionType::get(VoidTy, args, false); BlockObjectAssign = CreateRuntimeFunction(fty, "_Block_object_assign"); - configureBlocksRuntimeObject(*this, BlockObjectAssign); + configureBlocksRuntimeObject( + *this, cast(BlockObjectAssign.getCallee())); return BlockObjectAssign; } diff --git a/clang/lib/CodeGen/CGBuilder.h b/clang/lib/CodeGen/CGBuilder.h index bc2f2eee05fee..50ef853b8300a 100644 --- a/clang/lib/CodeGen/CGBuilder.h +++ b/clang/lib/CodeGen/CGBuilder.h @@ -167,19 +167,25 @@ class CGBuilderTy : public CGBuilderBaseTy { return Address(Ptr, Addr.getAlignment()); } + /// Given + /// %addr = {T1, T2...}* ... + /// produce + /// %name = getelementptr inbounds %addr, i32 0, i32 index + /// + /// This API assumes that drilling into a struct like this is always an + /// inbounds operation. using CGBuilderBaseTy::CreateStructGEP; - Address CreateStructGEP(Address Addr, unsigned Index, CharUnits Offset, + Address CreateStructGEP(Address Addr, unsigned Index, const llvm::Twine &Name = "") { + llvm::StructType *ElTy = cast(Addr.getElementType()); + const llvm::DataLayout &DL = BB->getParent()->getParent()->getDataLayout(); + const llvm::StructLayout *Layout = DL.getStructLayout(ElTy); + auto Offset = CharUnits::fromQuantity(Layout->getElementOffset(Index)); + return Address(CreateStructGEP(Addr.getElementType(), Addr.getPointer(), Index, Name), Addr.getAlignment().alignmentAtOffset(Offset)); } - Address CreateStructGEP(Address Addr, unsigned Index, - const llvm::StructLayout *Layout, - const llvm::Twine &Name = "") { - auto Offset = CharUnits::fromQuantity(Layout->getElementOffset(Index)); - return CreateStructGEP(Addr, Index, Offset, Name); - } /// Given /// %addr = [n x T]* ... @@ -189,15 +195,17 @@ class CGBuilderTy : public CGBuilderBaseTy { /// /// This API assumes that drilling into an array like this is always /// an inbounds operation. - /// - /// \param EltSize - the size of the type T in bytes - Address CreateConstArrayGEP(Address Addr, uint64_t Index, CharUnits EltSize, + Address CreateConstArrayGEP(Address Addr, uint64_t Index, const llvm::Twine &Name = "") { - return Address(CreateInBoundsGEP(Addr.getPointer(), - {getSize(CharUnits::Zero()), - getSize(Index)}, - Name), - Addr.getAlignment().alignmentAtOffset(Index * EltSize)); + llvm::ArrayType *ElTy = cast(Addr.getElementType()); + const llvm::DataLayout &DL = BB->getParent()->getParent()->getDataLayout(); + CharUnits EltSize = + CharUnits::fromQuantity(DL.getTypeAllocSize(ElTy->getElementType())); + + return Address( + CreateInBoundsGEP(Addr.getPointer(), + {getSize(CharUnits::Zero()), getSize(Index)}, Name), + Addr.getAlignment().alignmentAtOffset(Index * EltSize)); } /// Given @@ -205,11 +213,12 @@ class CGBuilderTy : public CGBuilderBaseTy { /// produce /// %name = getelementptr inbounds %addr, i64 index /// where i64 is actually the target word size. - /// - /// \param EltSize - the size of the type T in bytes Address CreateConstInBoundsGEP(Address Addr, uint64_t Index, - CharUnits EltSize, const llvm::Twine &Name = "") { + llvm::Type *ElTy = Addr.getElementType(); + const llvm::DataLayout &DL = BB->getParent()->getParent()->getDataLayout(); + CharUnits EltSize = CharUnits::fromQuantity(DL.getTypeAllocSize(ElTy)); + return Address(CreateInBoundsGEP(Addr.getElementType(), Addr.getPointer(), getSize(Index), Name), Addr.getAlignment().alignmentAtOffset(Index * EltSize)); @@ -220,10 +229,12 @@ class CGBuilderTy : public CGBuilderBaseTy { /// produce /// %name = getelementptr inbounds %addr, i64 index /// where i64 is actually the target word size. - /// - /// \param EltSize - the size of the type T in bytes - Address CreateConstGEP(Address Addr, uint64_t Index, CharUnits EltSize, + Address CreateConstGEP(Address Addr, uint64_t Index, const llvm::Twine &Name = "") { + const llvm::DataLayout &DL = BB->getParent()->getParent()->getDataLayout(); + CharUnits EltSize = + CharUnits::fromQuantity(DL.getTypeAllocSize(Addr.getElementType())); + return Address(CreateGEP(Addr.getElementType(), Addr.getPointer(), getSize(Index), Name), Addr.getAlignment().alignmentAtOffset(Index * EltSize)); @@ -244,9 +255,10 @@ class CGBuilderTy : public CGBuilderBaseTy { } using CGBuilderBaseTy::CreateConstInBoundsGEP2_32; - Address CreateConstInBoundsGEP2_32(Address Addr, unsigned Idx0, - unsigned Idx1, const llvm::DataLayout &DL, - const llvm::Twine &Name = "") { + Address CreateConstInBoundsGEP2_32(Address Addr, unsigned Idx0, unsigned Idx1, + const llvm::Twine &Name = "") { + const llvm::DataLayout &DL = BB->getParent()->getParent()->getDataLayout(); + auto *GEP = cast(CreateConstInBoundsGEP2_32( Addr.getElementType(), Addr.getPointer(), Idx0, Idx1, Name)); llvm::APInt Offset( @@ -258,17 +270,6 @@ class CGBuilderTy : public CGBuilderBaseTy { CharUnits::fromQuantity(Offset.getSExtValue()))); } - llvm::Value *CreateConstInBoundsByteGEP(llvm::Value *Ptr, CharUnits Offset, - const llvm::Twine &Name = "") { - assert(Ptr->getType()->getPointerElementType() == TypeCache.Int8Ty); - return CreateInBoundsGEP(Ptr, getSize(Offset), Name); - } - llvm::Value *CreateConstByteGEP(llvm::Value *Ptr, CharUnits Offset, - const llvm::Twine &Name = "") { - assert(Ptr->getType()->getPointerElementType() == TypeCache.Int8Ty); - return CreateGEP(Ptr, getSize(Offset), Name); - } - using CGBuilderBaseTy::CreateMemCpy; llvm::CallInst *CreateMemCpy(Address Dest, Address Src, llvm::Value *Size, bool IsVolatile = false) { diff --git a/clang/lib/CodeGen/CGBuiltin.cpp b/clang/lib/CodeGen/CGBuiltin.cpp index 0a38d5ba7a5ab..43c8020450f4a 100644 --- a/clang/lib/CodeGen/CGBuiltin.cpp +++ b/clang/lib/CodeGen/CGBuiltin.cpp @@ -794,7 +794,7 @@ static RValue EmitMSVCRTSetJmp(CodeGenFunction &CGF, MSVCSetJmpKind SJKind, llvm::AttributeList ReturnsTwiceAttr = llvm::AttributeList::get( CGF.getLLVMContext(), llvm::AttributeList::FunctionIndex, llvm::Attribute::ReturnsTwice); - llvm::Constant *SetJmpFn = CGF.CGM.CreateRuntimeFunction( + llvm::FunctionCallee SetJmpFn = CGF.CGM.CreateRuntimeFunction( llvm::FunctionType::get(CGF.IntTy, ArgTypes, IsVarArg), Name, ReturnsTwiceAttr, /*Local=*/true); @@ -997,6 +997,9 @@ Value *CodeGenFunction::EmitMSVCBuiltinExpr(MSVCIntrin BuiltinID, Asm = "udf #251"; Constraints = "{r0}"; break; + case llvm::Triple::aarch64: + Asm = "brk #0xF003"; + Constraints = "{w0}"; } llvm::FunctionType *FTy = llvm::FunctionType::get(VoidTy, {Int32Ty}, false); llvm::InlineAsm *IA = @@ -1331,8 +1334,8 @@ EmitCheckedMixedSignMultiply(CodeGenFunction &CGF, const clang::Expr *Op1, } static llvm::Value *dumpRecord(CodeGenFunction &CGF, QualType RType, - Value *&RecordPtr, CharUnits Align, Value *Func, - int Lvl) { + Value *&RecordPtr, CharUnits Align, + llvm::FunctionCallee Func, int Lvl) { const auto *RT = RType->getAs(); ASTContext &Context = CGF.getContext(); RecordDecl *RD = RT->getDecl()->getDefinition(); @@ -1471,6 +1474,86 @@ RValue CodeGenFunction::emitRotate(const CallExpr *E, bool IsRotateRight) { return RValue::get(Builder.CreateCall(F, { Src, Src, ShiftAmt })); } +/// For a call to a builtin C standard library function, emit a call to a +/// fortified variant using __builtin_object_size. For instance, instead of +/// emitting `sprintf(buf, "%d", 32)`, this function would emit +/// `__sprintf_chk(buf, Flag, __builtin_object_size(buf, 0), "%d", 32)`. +RValue CodeGenFunction::emitFortifiedStdLibCall(CodeGenFunction &CGF, + const CallExpr *CE, + unsigned BuiltinID, + unsigned BOSType, + unsigned Flag) { + SmallVector ArgVals; + for (const Expr *Arg : CE->arguments()) + ArgVals.push_back(EmitScalarExpr(Arg)); + + llvm::Value *FlagVal = llvm::ConstantInt::get(IntTy, Flag); + auto emitObjSize = [&]() { + return evaluateOrEmitBuiltinObjectSize(CE->getArg(0), BOSType, SizeTy, + ArgVals[0], false); + }; + + unsigned FortifiedVariantID = Builtin::getFortifiedVariantFunction(BuiltinID); + assert(FortifiedVariantID != 0 && "Should be diagnosed in Sema"); + + // Adjust ArgVals to include a __builtin_object_size(n) or flag argument at + // the right position. Variadic printf-like functions take a flag and object + // size (if they're printing to a string) before the format string, and all + // other functions just take the object size as their last argument. The + // object size, if present, always corresponds to the first argument. + switch (BuiltinID) { + case Builtin::BImemcpy: + case Builtin::BImemmove: + case Builtin::BImemset: + case Builtin::BIstpcpy: + case Builtin::BIstrcat: + case Builtin::BIstrcpy: + case Builtin::BIstrlcat: + case Builtin::BIstrlcpy: + case Builtin::BIstrncat: + case Builtin::BIstrncpy: + case Builtin::BIstpncpy: + ArgVals.push_back(emitObjSize()); + break; + + case Builtin::BIsnprintf: + case Builtin::BIvsnprintf: + ArgVals.insert(ArgVals.begin() + 2, FlagVal); + ArgVals.insert(ArgVals.begin() + 3, emitObjSize()); + break; + + case Builtin::BIsprintf: + case Builtin::BIvsprintf: + ArgVals.insert(ArgVals.begin() + 1, FlagVal); + ArgVals.insert(ArgVals.begin() + 2, emitObjSize()); + break; + + case Builtin::BIfprintf: + case Builtin::BIvfprintf: + ArgVals.insert(ArgVals.begin() + 1, FlagVal); + break; + + case Builtin::BIprintf: + case Builtin::BIvprintf: + ArgVals.insert(ArgVals.begin(), FlagVal); + break; + + default: + llvm_unreachable("Unknown fortified builtin?"); + } + + ASTContext::GetBuiltinTypeError Err; + QualType VariantTy = getContext().GetBuiltinType(FortifiedVariantID, Err); + assert(Err == ASTContext::GE_None && "Should not codegen an error"); + auto *LLVMVariantTy = cast(ConvertType(VariantTy)); + StringRef VariantName = getContext().BuiltinInfo.getName(FortifiedVariantID) + + strlen("__builtin_"); + + llvm::Value *V = Builder.CreateCall( + CGM.CreateRuntimeFunction(LLVMVariantTy, VariantName), ArgVals); + return RValue::get(V); +} + RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID, const CallExpr *E, ReturnValueSlot ReturnValue) { @@ -1487,6 +1570,10 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID, Result.Val.getFloat())); } + if (const auto *FortifyAttr = FD->getAttr()) + return emitFortifiedStdLibCall(*this, E, BuiltinID, FortifyAttr->getType(), + FortifyAttr->getFlag()); + // There are LLVM math intrinsics/instructions corresponding to math library // functions except the LLVM op will never set errno while the math library // might. Also, math builtins have the same semantics as their math library @@ -1736,6 +1823,10 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID, } case Builtin::BI__builtin_dump_struct: { + llvm::Type *LLVMIntTy = getTypes().ConvertType(getContext().IntTy); + llvm::FunctionType *LLVMFuncType = llvm::FunctionType::get( + LLVMIntTy, {llvm::Type::getInt8PtrTy(getLLVMContext())}, true); + Value *Func = EmitScalarExpr(E->getArg(1)->IgnoreImpCasts()); CharUnits Arg0Align = EmitPointerWithAlignment(E->getArg(0)).getAlignment(); @@ -1743,7 +1834,8 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID, QualType Arg0Type = Arg0->getType()->getPointeeType(); Value *RecordPtr = EmitScalarExpr(Arg0); - Value *Res = dumpRecord(*this, Arg0Type, RecordPtr, Arg0Align, Func, 0); + Value *Res = dumpRecord(*this, Arg0Type, RecordPtr, Arg0Align, + {LLVMFuncType, Func}, 0); return RValue::get(Res); } @@ -1914,7 +2006,8 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID, ConstantInt *AlignmentCI = cast(AlignmentValue); unsigned Alignment = (unsigned)AlignmentCI->getZExtValue(); - EmitAlignmentAssumption(PtrValue, Ptr, /*The expr loc is sufficient.*/ SourceLocation(), + EmitAlignmentAssumption(PtrValue, Ptr, + /*The expr loc is sufficient.*/ SourceLocation(), Alignment, OffsetValue); return RValue::get(PtrValue); } @@ -1974,6 +2067,12 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID, return RValue::get(ConstantInt::get(ResultType, 0)); Value *ArgValue = EmitScalarExpr(Arg); + if (ArgType->isObjCObjectPointerType()) { + // Convert Objective-C objects to id because we cannot distinguish between + // LLVM types for Obj-C classes as they are opaque. + ArgType = CGM.getContext().getObjCIdType(); + ArgValue = Builder.CreateBitCast(ArgValue, ConvertType(ArgType)); + } Function *F = CGM.getIntrinsic(Intrinsic::is_constant, ConvertType(ArgType)); Value *Result = Builder.CreateCall(F, ArgValue); @@ -2513,8 +2612,7 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID, // Store the stack pointer to the setjmp buffer. Value *StackAddr = Builder.CreateCall(CGM.getIntrinsic(Intrinsic::stacksave)); - Address StackSaveSlot = - Builder.CreateConstInBoundsGEP(Buf, 2, getPointerSize()); + Address StackSaveSlot = Builder.CreateConstInBoundsGEP(Buf, 2); Builder.CreateStore(StackAddr, StackSaveSlot); // Call LLVM's EH setjmp, which is lightweight. @@ -2734,7 +2832,7 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID, const CGFunctionInfo &FuncInfo = CGM.getTypes().arrangeBuiltinFunctionCall(E->getType(), Args); llvm::FunctionType *FTy = CGM.getTypes().GetFunctionType(FuncInfo); - llvm::Constant *Func = CGM.CreateRuntimeFunction(FTy, LibCallName); + llvm::FunctionCallee Func = CGM.CreateRuntimeFunction(FTy, LibCallName); return EmitCall(FuncInfo, CGCallee::forDirect(Func), ReturnValueSlot(), Args); } @@ -7068,19 +7166,16 @@ Value *CodeGenFunction::EmitAArch64BuiltinExpr(unsigned BuiltinID, llvm::Value *Metadata = llvm::MetadataAsValue::get(Context, RegName); llvm::Type *RegisterType = Int64Ty; - llvm::Type *ValueType = Int32Ty; llvm::Type *Types[] = { RegisterType }; if (BuiltinID == AArch64::BI_ReadStatusReg) { llvm::Function *F = CGM.getIntrinsic(llvm::Intrinsic::read_register, Types); - llvm::Value *Call = Builder.CreateCall(F, Metadata); - return Builder.CreateTrunc(Call, ValueType); + return Builder.CreateCall(F, Metadata); } llvm::Function *F = CGM.getIntrinsic(llvm::Intrinsic::write_register, Types); llvm::Value *ArgValue = EmitScalarExpr(E->getArg(1)); - ArgValue = Builder.CreateZExt(ArgValue, RegisterType); return Builder.CreateCall(F, { Metadata, ArgValue }); } @@ -9739,10 +9834,11 @@ llvm::Value *CodeGenFunction::EmitX86CpuSupports(uint64_t FeaturesMask) { Value *CodeGenFunction::EmitX86CpuInit() { llvm::FunctionType *FTy = llvm::FunctionType::get(VoidTy, /*Variadic*/ false); - llvm::Constant *Func = CGM.CreateRuntimeFunction(FTy, "__cpu_indicator_init"); - cast(Func)->setDSOLocal(true); - cast(Func)->setDLLStorageClass( - llvm::GlobalValue::DefaultStorageClass); + llvm::FunctionCallee Func = + CGM.CreateRuntimeFunction(FTy, "__cpu_indicator_init"); + cast(Func.getCallee())->setDSOLocal(true); + cast(Func.getCallee()) + ->setDLLStorageClass(llvm::GlobalValue::DefaultStorageClass); return Builder.CreateCall(Func); } @@ -11759,9 +11855,10 @@ Value *CodeGenFunction::EmitX86BuiltinExpr(unsigned BuiltinID, // Ops[2] = Builder.CreateZExt(Ops[2], Int64Ty); // return Builder.CreateCall(F, Ops); llvm::Type *Int128Ty = Builder.getInt128Ty(); - Value *Val = Builder.CreateOr( - Builder.CreateShl(Builder.CreateZExt(Ops[1], Int128Ty), 64), - Builder.CreateZExt(Ops[0], Int128Ty)); + Value *HighPart128 = + Builder.CreateShl(Builder.CreateZExt(Ops[1], Int128Ty), 64); + Value *LowPart128 = Builder.CreateZExt(Ops[0], Int128Ty); + Value *Val = Builder.CreateOr(HighPart128, LowPart128); Value *Amt = Builder.CreateAnd(Builder.CreateZExt(Ops[2], Int128Ty), llvm::ConstantInt::get(Int128Ty, 0x3f)); Value *Res; @@ -13470,6 +13567,30 @@ Value *CodeGenFunction::EmitWebAssemblyBuiltinExpr(unsigned BuiltinID, Function *Callee = CGM.getIntrinsic(Intrinsic::wasm_memory_grow, ResultType); return Builder.CreateCall(Callee, Args); } + case WebAssembly::BI__builtin_wasm_memory_init: { + llvm::APSInt SegConst; + if (!E->getArg(0)->isIntegerConstantExpr(SegConst, getContext())) + llvm_unreachable("Constant arg isn't actually constant?"); + llvm::APSInt MemConst; + if (!E->getArg(1)->isIntegerConstantExpr(MemConst, getContext())) + llvm_unreachable("Constant arg isn't actually constant?"); + if (!MemConst.isNullValue()) + ErrorUnsupported(E, "non-zero memory index"); + Value *Args[] = {llvm::ConstantInt::get(getLLVMContext(), SegConst), + llvm::ConstantInt::get(getLLVMContext(), MemConst), + EmitScalarExpr(E->getArg(2)), EmitScalarExpr(E->getArg(3)), + EmitScalarExpr(E->getArg(4))}; + Function *Callee = CGM.getIntrinsic(Intrinsic::wasm_memory_init); + return Builder.CreateCall(Callee, Args); + } + case WebAssembly::BI__builtin_wasm_data_drop: { + llvm::APSInt SegConst; + if (!E->getArg(0)->isIntegerConstantExpr(SegConst, getContext())) + llvm_unreachable("Constant arg isn't actually constant?"); + Value *Arg = llvm::ConstantInt::get(getLLVMContext(), SegConst); + Function *Callee = CGM.getIntrinsic(Intrinsic::wasm_data_drop); + return Builder.CreateCall(Callee, {Arg}); + } case WebAssembly::BI__builtin_wasm_throw: { Value *Tag = EmitScalarExpr(E->getArg(0)); Value *Obj = EmitScalarExpr(E->getArg(1)); diff --git a/clang/lib/CodeGen/CGCUDANV.cpp b/clang/lib/CodeGen/CGCUDANV.cpp index 276b5d40d6d80..0602601f5e11a 100644 --- a/clang/lib/CodeGen/CGCUDANV.cpp +++ b/clang/lib/CodeGen/CGCUDANV.cpp @@ -42,17 +42,28 @@ class CGNVCUDARuntime : public CGCUDARuntime { /// Convenience reference to the current module llvm::Module &TheModule; /// Keeps track of kernel launch stubs emitted in this module - llvm::SmallVector EmittedKernels; - llvm::SmallVector, 16> DeviceVars; + struct KernelInfo { + llvm::Function *Kernel; + const Decl *D; + }; + llvm::SmallVector EmittedKernels; + struct VarInfo { + llvm::GlobalVariable *Var; + const VarDecl *D; + unsigned Flag; + }; + llvm::SmallVector DeviceVars; /// Keeps track of variable containing handle of GPU binary. Populated by /// ModuleCtorFunction() and used to create corresponding cleanup calls in /// ModuleDtorFunction() llvm::GlobalVariable *GpuBinaryHandle = nullptr; /// Whether we generate relocatable device code. bool RelocatableDeviceCode; + /// Mangle context for device. + std::unique_ptr DeviceMC; - llvm::Constant *getSetupArgumentFn() const; - llvm::Constant *getLaunchFn() const; + llvm::FunctionCallee getSetupArgumentFn() const; + llvm::FunctionCallee getLaunchFn() const; llvm::FunctionType *getRegisterGlobalsFnTy() const; llvm::FunctionType *getCallbackFnTy() const; @@ -106,13 +117,15 @@ class CGNVCUDARuntime : public CGCUDARuntime { void emitDeviceStubBodyLegacy(CodeGenFunction &CGF, FunctionArgList &Args); void emitDeviceStubBodyNew(CodeGenFunction &CGF, FunctionArgList &Args); + std::string getDeviceSideName(const Decl *ND); public: CGNVCUDARuntime(CodeGenModule &CGM); void emitDeviceStub(CodeGenFunction &CGF, FunctionArgList &Args) override; - void registerDeviceVar(llvm::GlobalVariable &Var, unsigned Flags) override { - DeviceVars.push_back(std::make_pair(&Var, Flags)); + void registerDeviceVar(const VarDecl *VD, llvm::GlobalVariable &Var, + unsigned Flags) override { + DeviceVars.push_back({&Var, VD, Flags}); } /// Creates module constructor function @@ -138,7 +151,9 @@ CGNVCUDARuntime::addUnderscoredPrefixToName(StringRef FuncName) const { CGNVCUDARuntime::CGNVCUDARuntime(CodeGenModule &CGM) : CGCUDARuntime(CGM), Context(CGM.getLLVMContext()), TheModule(CGM.getModule()), - RelocatableDeviceCode(CGM.getLangOpts().GPURelocatableDeviceCode) { + RelocatableDeviceCode(CGM.getLangOpts().GPURelocatableDeviceCode), + DeviceMC(CGM.getContext().createMangleContext( + CGM.getContext().getAuxTargetInfo())) { CodeGen::CodeGenTypes &Types = CGM.getTypes(); ASTContext &Ctx = CGM.getContext(); @@ -151,7 +166,7 @@ CGNVCUDARuntime::CGNVCUDARuntime(CodeGenModule &CGM) VoidPtrPtrTy = VoidPtrTy->getPointerTo(); } -llvm::Constant *CGNVCUDARuntime::getSetupArgumentFn() const { +llvm::FunctionCallee CGNVCUDARuntime::getSetupArgumentFn() const { // cudaError_t cudaSetupArgument(void *, size_t, size_t) llvm::Type *Params[] = {VoidPtrTy, SizeTy, SizeTy}; return CGM.CreateRuntimeFunction( @@ -159,7 +174,7 @@ llvm::Constant *CGNVCUDARuntime::getSetupArgumentFn() const { addPrefixToName("SetupArgument")); } -llvm::Constant *CGNVCUDARuntime::getLaunchFn() const { +llvm::FunctionCallee CGNVCUDARuntime::getLaunchFn() const { if (CGM.getLangOpts().HIP) { // hipError_t hipLaunchByPtr(char *); return CGM.CreateRuntimeFunction( @@ -187,9 +202,27 @@ llvm::FunctionType *CGNVCUDARuntime::getRegisterLinkedBinaryFnTy() const { return llvm::FunctionType::get(VoidTy, Params, false); } +std::string CGNVCUDARuntime::getDeviceSideName(const Decl *D) { + auto *ND = cast(D); + std::string DeviceSideName; + if (DeviceMC->shouldMangleDeclName(ND)) { + SmallString<256> Buffer; + llvm::raw_svector_ostream Out(Buffer); + DeviceMC->mangleName(ND, Out); + DeviceSideName = Out.str(); + } else + DeviceSideName = ND->getIdentifier()->getName(); + return DeviceSideName; +} + void CGNVCUDARuntime::emitDeviceStub(CodeGenFunction &CGF, FunctionArgList &Args) { - EmittedKernels.push_back(CGF.CurFn); + assert(getDeviceSideName(CGF.CurFuncDecl) == CGF.CurFn->getName() || + getDeviceSideName(CGF.CurFuncDecl) + ".stub" == CGF.CurFn->getName() || + CGF.CGM.getContext().getTargetInfo().getCXXABI() != + CGF.CGM.getContext().getAuxTargetInfo()->getCXXABI()); + + EmittedKernels.push_back({CGF.CurFn, CGF.CurFuncDecl}); if (CudaFeatureEnabled(CGM.getTarget().getSDKVersion(), CudaFeature::CUDA_USES_NEW_LAUNCH)) emitDeviceStubBodyNew(CGF, Args); @@ -249,7 +282,7 @@ void CGNVCUDARuntime::emitDeviceStubBodyNew(CodeGenFunction &CGF, CGF.CreateTempAlloca(SizeTy, CGM.getSizeAlign(), "shmem_size"); Address Stream = CGF.CreateTempAlloca(VoidPtrTy, CGM.getPointerAlign(), "stream"); - llvm::Constant *cudaPopConfigFn = CGM.CreateRuntimeFunction( + llvm::FunctionCallee cudaPopConfigFn = CGM.CreateRuntimeFunction( llvm::FunctionType::get(IntTy, {/*gridDim=*/GridDim.getType(), /*blockDim=*/BlockDim.getType(), @@ -283,7 +316,7 @@ void CGNVCUDARuntime::emitDeviceStubBodyNew(CodeGenFunction &CGF, const CGFunctionInfo &FI = CGM.getTypes().arrangeFunctionDeclaration(cudaLaunchKernelFD); - llvm::Constant *cudaLaunchKernelFn = + llvm::FunctionCallee cudaLaunchKernelFn = CGM.CreateRuntimeFunction(FTy, "cudaLaunchKernel"); CGF.EmitCall(FI, CGCallee::forDirect(cudaLaunchKernelFn), ReturnValueSlot(), LaunchKernelArgs); @@ -295,7 +328,7 @@ void CGNVCUDARuntime::emitDeviceStubBodyNew(CodeGenFunction &CGF, void CGNVCUDARuntime::emitDeviceStubBodyLegacy(CodeGenFunction &CGF, FunctionArgList &Args) { // Emit a call to cudaSetupArgument for each arg in Args. - llvm::Constant *cudaSetupArgFn = getSetupArgumentFn(); + llvm::FunctionCallee cudaSetupArgFn = getSetupArgumentFn(); llvm::BasicBlock *EndBlock = CGF.createBasicBlock("setup.end"); CharUnits Offset = CharUnits::Zero(); for (const VarDecl *A : Args) { @@ -319,7 +352,7 @@ void CGNVCUDARuntime::emitDeviceStubBodyLegacy(CodeGenFunction &CGF, } // Emit the call to cudaLaunch - llvm::Constant *cudaLaunchFn = getLaunchFn(); + llvm::FunctionCallee cudaLaunchFn = getLaunchFn(); llvm::Value *Arg = CGF.Builder.CreatePointerCast(CGF.CurFn, CharPtrTy); CGF.EmitRuntimeCallOrInvoke(cudaLaunchFn, Arg); CGF.EmitBranch(EndBlock); @@ -359,7 +392,7 @@ llvm::Function *CGNVCUDARuntime::makeRegisterGlobalsFn() { llvm::Type *RegisterFuncParams[] = { VoidPtrPtrTy, CharPtrTy, CharPtrTy, CharPtrTy, IntTy, VoidPtrTy, VoidPtrTy, VoidPtrTy, VoidPtrTy, IntTy->getPointerTo()}; - llvm::Constant *RegisterFunc = CGM.CreateRuntimeFunction( + llvm::FunctionCallee RegisterFunc = CGM.CreateRuntimeFunction( llvm::FunctionType::get(IntTy, RegisterFuncParams, false), addUnderscoredPrefixToName("RegisterFunction")); @@ -367,13 +400,19 @@ llvm::Function *CGNVCUDARuntime::makeRegisterGlobalsFn() { // __cuda_register_globals() and generate __cudaRegisterFunction() call for // each emitted kernel. llvm::Argument &GpuBinaryHandlePtr = *RegisterKernelsFunc->arg_begin(); - for (llvm::Function *Kernel : EmittedKernels) { - llvm::Constant *KernelName = makeConstantString(Kernel->getName()); + for (auto &&I : EmittedKernels) { + llvm::Constant *KernelName = makeConstantString(getDeviceSideName(I.D)); llvm::Constant *NullPtr = llvm::ConstantPointerNull::get(VoidPtrTy); llvm::Value *Args[] = { - &GpuBinaryHandlePtr, Builder.CreateBitCast(Kernel, VoidPtrTy), - KernelName, KernelName, llvm::ConstantInt::get(IntTy, -1), NullPtr, - NullPtr, NullPtr, NullPtr, + &GpuBinaryHandlePtr, + Builder.CreateBitCast(I.Kernel, VoidPtrTy), + KernelName, + KernelName, + llvm::ConstantInt::get(IntTy, -1), + NullPtr, + NullPtr, + NullPtr, + NullPtr, llvm::ConstantPointerNull::get(IntTy->getPointerTo())}; Builder.CreateCall(RegisterFunc, Args); } @@ -383,13 +422,13 @@ llvm::Function *CGNVCUDARuntime::makeRegisterGlobalsFn() { llvm::Type *RegisterVarParams[] = {VoidPtrPtrTy, CharPtrTy, CharPtrTy, CharPtrTy, IntTy, IntTy, IntTy, IntTy}; - llvm::Constant *RegisterVar = CGM.CreateRuntimeFunction( + llvm::FunctionCallee RegisterVar = CGM.CreateRuntimeFunction( llvm::FunctionType::get(IntTy, RegisterVarParams, false), addUnderscoredPrefixToName("RegisterVar")); - for (auto &Pair : DeviceVars) { - llvm::GlobalVariable *Var = Pair.first; - unsigned Flags = Pair.second; - llvm::Constant *VarName = makeConstantString(Var->getName()); + for (auto &&Info : DeviceVars) { + llvm::GlobalVariable *Var = Info.Var; + unsigned Flags = Info.Flag; + llvm::Constant *VarName = makeConstantString(getDeviceSideName(Info.D)); uint64_t VarSize = CGM.getDataLayout().getTypeAllocSize(Var->getValueType()); llvm::Value *Args[] = { @@ -442,7 +481,7 @@ llvm::Function *CGNVCUDARuntime::makeModuleCtorFunction() { RegisterGlobalsFunc = makeDummyFunction(getRegisterGlobalsFnTy()); // void ** __{cuda|hip}RegisterFatBinary(void *); - llvm::Constant *RegisterFatbinFunc = CGM.CreateRuntimeFunction( + llvm::FunctionCallee RegisterFatbinFunc = CGM.CreateRuntimeFunction( llvm::FunctionType::get(VoidPtrPtrTy, VoidPtrTy, false), addUnderscoredPrefixToName("RegisterFatBinary")); // struct { int magic, int version, void * gpu_binary, void * dont_care }; @@ -616,6 +655,16 @@ llvm::Function *CGNVCUDARuntime::makeModuleCtorFunction() { // Call __cuda_register_globals(GpuBinaryHandle); if (RegisterGlobalsFunc) CtorBuilder.CreateCall(RegisterGlobalsFunc, RegisterFatbinCall); + + // Call __cudaRegisterFatBinaryEnd(Handle) if this CUDA version needs it. + if (CudaFeatureEnabled(CGM.getTarget().getSDKVersion(), + CudaFeature::CUDA_USES_FATBIN_REGISTER_END)) { + // void __cudaRegisterFatBinaryEnd(void **); + llvm::FunctionCallee RegisterFatbinEndFunc = CGM.CreateRuntimeFunction( + llvm::FunctionType::get(VoidTy, VoidPtrPtrTy, false), + "__cudaRegisterFatBinaryEnd"); + CtorBuilder.CreateCall(RegisterFatbinEndFunc, RegisterFatbinCall); + } } else { // Generate a unique module ID. SmallString<64> ModuleID; @@ -632,7 +681,7 @@ llvm::Function *CGNVCUDARuntime::makeModuleCtorFunction() { // void *, void (*)(void **)) SmallString<128> RegisterLinkedBinaryName("__cudaRegisterLinkedBinary"); RegisterLinkedBinaryName += ModuleID; - llvm::Constant *RegisterLinkedBinaryFunc = CGM.CreateRuntimeFunction( + llvm::FunctionCallee RegisterLinkedBinaryFunc = CGM.CreateRuntimeFunction( getRegisterLinkedBinaryFnTy(), RegisterLinkedBinaryName); assert(RegisterGlobalsFunc && "Expecting at least dummy function!"); @@ -650,7 +699,7 @@ llvm::Function *CGNVCUDARuntime::makeModuleCtorFunction() { // extern "C" int atexit(void (*f)(void)); llvm::FunctionType *AtExitTy = llvm::FunctionType::get(IntTy, CleanupFn->getType(), false); - llvm::Constant *AtExitFunc = + llvm::FunctionCallee AtExitFunc = CGM.CreateRuntimeFunction(AtExitTy, "atexit", llvm::AttributeList(), /*Local=*/true); CtorBuilder.CreateCall(AtExitFunc, CleanupFn); @@ -685,7 +734,7 @@ llvm::Function *CGNVCUDARuntime::makeModuleDtorFunction() { return nullptr; // void __cudaUnregisterFatBinary(void ** handle); - llvm::Constant *UnregisterFatbinFunc = CGM.CreateRuntimeFunction( + llvm::FunctionCallee UnregisterFatbinFunc = CGM.CreateRuntimeFunction( llvm::FunctionType::get(VoidTy, VoidPtrPtrTy, false), addUnderscoredPrefixToName("UnregisterFatBinary")); diff --git a/clang/lib/CodeGen/CGCUDARuntime.h b/clang/lib/CodeGen/CGCUDARuntime.h index e0e096bdcf9af..ada6734a564ea 100644 --- a/clang/lib/CodeGen/CGCUDARuntime.h +++ b/clang/lib/CodeGen/CGCUDARuntime.h @@ -23,6 +23,7 @@ class GlobalVariable; namespace clang { class CUDAKernelCallExpr; +class VarDecl; namespace CodeGen { @@ -52,7 +53,8 @@ class CGCUDARuntime { /// Emits a kernel launch stub. virtual void emitDeviceStub(CodeGenFunction &CGF, FunctionArgList &Args) = 0; - virtual void registerDeviceVar(llvm::GlobalVariable &Var, unsigned Flags) = 0; + virtual void registerDeviceVar(const VarDecl *VD, llvm::GlobalVariable &Var, + unsigned Flags) = 0; /// Constructs and returns a module initialization function or nullptr if it's /// not needed. Must be called after all kernels have been emitted. diff --git a/clang/lib/CodeGen/CGCXX.cpp b/clang/lib/CodeGen/CGCXX.cpp index e434a5c9499ff..576b60da583ec 100644 --- a/clang/lib/CodeGen/CGCXX.cpp +++ b/clang/lib/CodeGen/CGCXX.cpp @@ -227,10 +227,11 @@ llvm::Function *CodeGenModule::codegenCXXStructor(const CXXMethodDecl *MD, return Fn; } -llvm::Constant *CodeGenModule::getAddrOfCXXStructor( +llvm::FunctionCallee CodeGenModule::getAddrAndTypeOfCXXStructor( const CXXMethodDecl *MD, StructorType Type, const CGFunctionInfo *FnInfo, llvm::FunctionType *FnType, bool DontDefer, ForDefinition_t IsForDefinition) { + GlobalDecl GD; if (auto *CD = dyn_cast(MD)) { GD = GlobalDecl(CD, toCXXCtorType(Type)); @@ -249,9 +250,10 @@ llvm::Constant *CodeGenModule::getAddrOfCXXStructor( FnType = getTypes().GetFunctionType(*FnInfo); } - return GetOrCreateLLVMFunction( + llvm::Constant *Ptr = GetOrCreateLLVMFunction( getMangledName(GD), FnType, GD, /*ForVTable=*/false, DontDefer, /*isThunk=*/false, /*ExtraAttrs=*/llvm::AttributeList(), IsForDefinition); + return {FnType, Ptr}; } static CGCallee BuildAppleKextVirtualCall(CodeGenFunction &CGF, diff --git a/clang/lib/CodeGen/CGCXXABI.h b/clang/lib/CodeGen/CGCXXABI.h index d7e38b270bf0c..edec5db7638f1 100644 --- a/clang/lib/CodeGen/CGCXXABI.h +++ b/clang/lib/CodeGen/CGCXXABI.h @@ -556,7 +556,7 @@ class CGCXXABI { /// \param Dtor - a function taking a single pointer argument /// \param Addr - a pointer to pass to the destructor function. virtual void registerGlobalDtor(CodeGenFunction &CGF, const VarDecl &D, - llvm::Constant *Dtor, + llvm::FunctionCallee Dtor, llvm::Constant *Addr) = 0; /*************************** thread_local initialization ********************/ diff --git a/clang/lib/CodeGen/CGCall.cpp b/clang/lib/CodeGen/CGCall.cpp index fe58f3b19ca15..2a47d9bb993f8 100644 --- a/clang/lib/CodeGen/CGCall.cpp +++ b/clang/lib/CodeGen/CGCall.cpp @@ -67,10 +67,17 @@ unsigned CodeGenTypes::ClangCallConvToLLVMCallConv(CallingConv CC) { } /// Derives the 'this' type for codegen purposes, i.e. ignoring method CVR -/// qualification. -static CanQualType GetThisType(ASTContext &Context, const CXXRecordDecl *RD, - const CXXMethodDecl *MD) { - QualType RecTy = Context.getTagDeclType(RD)->getCanonicalTypeInternal(); +/// qualification. Either or both of RD and MD may be null. A null RD indicates +/// that there is no meaningful 'this' type, and a null MD can occur when +/// calling a method pointer. +CanQualType CodeGenTypes::DeriveThisType(const CXXRecordDecl *RD, + const CXXMethodDecl *MD) { + QualType RecTy; + if (RD) + RecTy = Context.getTagDeclType(RD)->getCanonicalTypeInternal(); + else + RecTy = Context.VoidTy; + if (MD) RecTy = Context.getAddrSpaceQualType(RecTy, MD->getMethodQualifiers().getAddressSpace()); return Context.getPointerType(CanQualType::CreateUnsafe(RecTy)); @@ -235,7 +242,7 @@ static CallingConv getCallingConventionForDecl(const Decl *D, bool IsWindows) { /// Arrange the argument and result information for a call to an /// unknown C++ non-static member function of the given abstract type. -/// (Zero value of RD means we don't have any meaningful "this" argument type, +/// (A null RD means we don't have any meaningful "this" argument type, /// so fall back to a generic pointer type). /// The member function must be an ordinary function, i.e. not a /// constructor or destructor. @@ -246,10 +253,7 @@ CodeGenTypes::arrangeCXXMethodType(const CXXRecordDecl *RD, SmallVector argTypes; // Add the 'this' pointer. - if (RD) - argTypes.push_back(GetThisType(Context, RD, MD)); - else - argTypes.push_back(Context.VoidPtrTy); + argTypes.push_back(DeriveThisType(RD, MD)); return ::arrangeLLVMFunctionInfo( *this, true, argTypes, @@ -303,7 +307,7 @@ CodeGenTypes::arrangeCXXStructorDeclaration(const CXXMethodDecl *MD, SmallVector argTypes; SmallVector paramInfos; - argTypes.push_back(GetThisType(Context, MD->getParent(), MD)); + argTypes.push_back(DeriveThisType(MD->getParent(), MD)); bool PassParams = true; @@ -403,8 +407,11 @@ CodeGenTypes::arrangeCXXConstructorCall(const CallArgList &args, unsigned TotalPrefixArgs = 1 + ExtraPrefixArgs; CanQual FPT = GetFormalType(D); - RequiredArgs Required = - RequiredArgs::forPrototypePlus(FPT, TotalPrefixArgs + ExtraSuffixArgs); + RequiredArgs Required = PassProtoArgs + ? RequiredArgs::forPrototypePlus( + FPT, TotalPrefixArgs + ExtraSuffixArgs) + : RequiredArgs::All; + GlobalDecl GD(D, CtorKind); CanQualType ResultType = TheCXXABI.HasThisReturn(GD) ? ArgTypes.front() @@ -530,7 +537,7 @@ const CGFunctionInfo & CodeGenTypes::arrangeUnprototypedMustTailThunk(const CXXMethodDecl *MD) { assert(MD->isVirtual() && "only methods have thunks"); CanQual FTP = GetFormalType(MD); - CanQualType ArgTys[] = { GetThisType(Context, MD->getParent(), MD) }; + CanQualType ArgTys[] = {DeriveThisType(MD->getParent(), MD)}; return arrangeLLVMFunctionInfo(Context.VoidTy, /*instanceMethod=*/false, /*chainCall=*/false, ArgTys, FTP->getExtInfo(), {}, RequiredArgs(1)); @@ -544,7 +551,7 @@ CodeGenTypes::arrangeMSCtorClosure(const CXXConstructorDecl *CD, CanQual FTP = GetFormalType(CD); SmallVector ArgTys; const CXXRecordDecl *RD = CD->getParent(); - ArgTys.push_back(GetThisType(Context, RD, CD)); + ArgTys.push_back(DeriveThisType(RD, CD)); if (CT == Ctor_CopyingClosure) ArgTys.push_back(*FTP->param_type_begin()); if (RD->getNumVBases() > 0) @@ -577,7 +584,7 @@ arrangeFreeFunctionLikeCall(CodeGenTypes &CGT, // extra prefix plus the arguments in the prototype. if (const FunctionProtoType *proto = dyn_cast(fnType)) { if (proto->isVariadic()) - required = RequiredArgs(proto->getNumParams() + numExtraRequiredArgs); + required = RequiredArgs::forPrototypePlus(proto, numExtraRequiredArgs); if (proto->hasExtParameterInfos()) addExtParameterInfosForCall(paramInfos, proto, numExtraRequiredArgs, @@ -802,6 +809,8 @@ CGFunctionInfo *CGFunctionInfo::create(unsigned llvmCC, ArrayRef argTypes, RequiredArgs required) { assert(paramInfos.empty() || paramInfos.size() == argTypes.size()); + assert(!required.allowsOptionalArgs() || + required.getNumRequiredArgs() <= argTypes.size()); void *buffer = operator new(totalSizeToAlloc( @@ -1142,7 +1151,7 @@ EnterStructPointerForCoercedAccess(Address SrcPtr, return SrcPtr; // GEP into the first element. - SrcPtr = CGF.Builder.CreateStructGEP(SrcPtr, 0, CharUnits(), "coerce.dive"); + SrcPtr = CGF.Builder.CreateStructGEP(SrcPtr, 0, "coerce.dive"); // If the first element is a struct, recurse. llvm::Type *SrcTy = SrcPtr.getElementType(); @@ -1270,12 +1279,8 @@ static void BuildAggStore(CodeGenFunction &CGF, llvm::Value *Val, // Prefer scalar stores to first-class aggregate stores. if (llvm::StructType *STy = dyn_cast(Val->getType())) { - const llvm::StructLayout *Layout = - CGF.CGM.getDataLayout().getStructLayout(STy); - for (unsigned i = 0, e = STy->getNumElements(); i != e; ++i) { - auto EltOffset = CharUnits::fromQuantity(Layout->getElementOffset(i)); - Address EltPtr = CGF.Builder.CreateStructGEP(Dest, i, EltOffset); + Address EltPtr = CGF.Builder.CreateStructGEP(Dest, i); llvm::Value *Elt = CGF.Builder.CreateExtractValue(Val, i); CGF.Builder.CreateStore(Elt, EltPtr, DestIsVolatile); } @@ -2262,9 +2267,7 @@ void CodeGenFunction::EmitFunctionProlog(const CGFunctionInfo &FI, // If we're using inalloca, all the memory arguments are GEPs off of the last // parameter, which is a pointer to the complete memory area. Address ArgStruct = Address::invalid(); - const llvm::StructLayout *ArgStructLayout = nullptr; if (IRFunctionArgs.hasInallocaArg()) { - ArgStructLayout = CGM.getDataLayout().getStructLayout(FI.getArgStruct()); ArgStruct = Address(FnArgs[IRFunctionArgs.getInallocaArgNo()], FI.getArgStructAlignment()); @@ -2313,10 +2316,8 @@ void CodeGenFunction::EmitFunctionProlog(const CGFunctionInfo &FI, case ABIArgInfo::InAlloca: { assert(NumIRArgs == 0); auto FieldIndex = ArgI.getInAllocaFieldIndex(); - CharUnits FieldOffset = - CharUnits::fromQuantity(ArgStructLayout->getElementOffset(FieldIndex)); - Address V = Builder.CreateStructGEP(ArgStruct, FieldIndex, FieldOffset, - Arg->getName()); + Address V = + Builder.CreateStructGEP(ArgStruct, FieldIndex, Arg->getName()); ArgVals.push_back(ParamValue::forIndirect(V)); break; } @@ -2476,7 +2477,6 @@ void CodeGenFunction::EmitFunctionProlog(const CGFunctionInfo &FI, llvm::StructType *STy = dyn_cast(ArgI.getCoerceToType()); if (ArgI.isDirect() && ArgI.getCanBeFlattened() && STy && STy->getNumElements() > 1) { - auto SrcLayout = CGM.getDataLayout().getStructLayout(STy); uint64_t SrcSize = CGM.getDataLayout().getTypeAllocSize(STy); llvm::Type *DstTy = Ptr.getElementType(); uint64_t DstSize = CGM.getDataLayout().getTypeAllocSize(DstTy); @@ -2493,9 +2493,7 @@ void CodeGenFunction::EmitFunctionProlog(const CGFunctionInfo &FI, for (unsigned i = 0, e = STy->getNumElements(); i != e; ++i) { auto AI = FnArgs[FirstIRArg + i]; AI->setName(Arg->getName() + ".coerce" + Twine(i)); - auto Offset = CharUnits::fromQuantity(SrcLayout->getElementOffset(i)); - Address EltPtr = - Builder.CreateStructGEP(AddrToStoreInto, i, Offset); + Address EltPtr = Builder.CreateStructGEP(AddrToStoreInto, i); Builder.CreateStore(AI, EltPtr); } @@ -2531,7 +2529,6 @@ void CodeGenFunction::EmitFunctionProlog(const CGFunctionInfo &FI, auto coercionType = ArgI.getCoerceAndExpandType(); alloca = Builder.CreateElementBitCast(alloca, coercionType); - auto layout = CGM.getDataLayout().getStructLayout(coercionType); unsigned argIndex = FirstIRArg; for (unsigned i = 0, e = coercionType->getNumElements(); i != e; ++i) { @@ -2539,7 +2536,7 @@ void CodeGenFunction::EmitFunctionProlog(const CGFunctionInfo &FI, if (ABIArgInfo::isPaddingForCoerceAndExpand(eltType)) continue; - auto eltAddr = Builder.CreateStructGEP(alloca, i, layout); + auto eltAddr = Builder.CreateStructGEP(alloca, i); auto elt = FnArgs[argIndex++]; Builder.CreateStore(elt, eltAddr); } @@ -2944,7 +2941,6 @@ void CodeGenFunction::EmitFunctionEpilog(const CGFunctionInfo &FI, case ABIArgInfo::CoerceAndExpand: { auto coercionType = RetAI.getCoerceAndExpandType(); - auto layout = CGM.getDataLayout().getStructLayout(coercionType); // Load all of the coerced elements out into results. llvm::SmallVector results; @@ -2954,7 +2950,7 @@ void CodeGenFunction::EmitFunctionEpilog(const CGFunctionInfo &FI, if (ABIArgInfo::isPaddingForCoerceAndExpand(coercedEltType)) continue; - auto eltAddr = Builder.CreateStructGEP(addr, i, layout); + auto eltAddr = Builder.CreateStructGEP(addr, i); auto elt = Builder.CreateLoad(eltAddr); results.push_back(elt); } @@ -3679,15 +3675,15 @@ CodeGenFunction::AddObjCARCExceptionMetadata(llvm::Instruction *Inst) { /// Emits a call to the given no-arguments nounwind runtime function. llvm::CallInst * -CodeGenFunction::EmitNounwindRuntimeCall(llvm::Value *callee, +CodeGenFunction::EmitNounwindRuntimeCall(llvm::FunctionCallee callee, const llvm::Twine &name) { return EmitNounwindRuntimeCall(callee, None, name); } /// Emits a call to the given nounwind runtime function. llvm::CallInst * -CodeGenFunction::EmitNounwindRuntimeCall(llvm::Value *callee, - ArrayRef args, +CodeGenFunction::EmitNounwindRuntimeCall(llvm::FunctionCallee callee, + ArrayRef args, const llvm::Twine &name) { llvm::CallInst *call = EmitRuntimeCall(callee, args, name); call->setDoesNotThrow(); @@ -3696,9 +3692,8 @@ CodeGenFunction::EmitNounwindRuntimeCall(llvm::Value *callee, /// Emits a simple call (never an invoke) to the given no-arguments /// runtime function. -llvm::CallInst * -CodeGenFunction::EmitRuntimeCall(llvm::Value *callee, - const llvm::Twine &name) { +llvm::CallInst *CodeGenFunction::EmitRuntimeCall(llvm::FunctionCallee callee, + const llvm::Twine &name) { return EmitRuntimeCall(callee, None, name); } @@ -3722,21 +3717,20 @@ CodeGenFunction::getBundlesForFunclet(llvm::Value *Callee) { } /// Emits a simple call (never an invoke) to the given runtime function. -llvm::CallInst * -CodeGenFunction::EmitRuntimeCall(llvm::Value *callee, - ArrayRef args, - const llvm::Twine &name) { - llvm::CallInst *call = - Builder.CreateCall(callee, args, getBundlesForFunclet(callee), name); +llvm::CallInst *CodeGenFunction::EmitRuntimeCall(llvm::FunctionCallee callee, + ArrayRef args, + const llvm::Twine &name) { + llvm::CallInst *call = Builder.CreateCall( + callee, args, getBundlesForFunclet(callee.getCallee()), name); call->setCallingConv(getRuntimeCC()); return call; } /// Emits a call or invoke to the given noreturn runtime function. -void CodeGenFunction::EmitNoreturnRuntimeCallOrInvoke(llvm::Value *callee, - ArrayRef args) { +void CodeGenFunction::EmitNoreturnRuntimeCallOrInvoke( + llvm::FunctionCallee callee, ArrayRef args) { SmallVector BundleList = - getBundlesForFunclet(callee); + getBundlesForFunclet(callee.getCallee()); if (getInvokeDest()) { llvm::InvokeInst *invoke = @@ -3756,14 +3750,17 @@ void CodeGenFunction::EmitNoreturnRuntimeCallOrInvoke(llvm::Value *callee, } /// Emits a call or invoke instruction to the given nullary runtime function. -llvm::CallBase *CodeGenFunction::EmitRuntimeCallOrInvoke(llvm::Value *callee, - const Twine &name) { +llvm::CallBase * +CodeGenFunction::EmitRuntimeCallOrInvoke(llvm::FunctionCallee callee, + const Twine &name) { return EmitRuntimeCallOrInvoke(callee, None, name); } /// Emits a call or invoke instruction to the given runtime function. -llvm::CallBase *CodeGenFunction::EmitRuntimeCallOrInvoke( - llvm::Value *callee, ArrayRef args, const Twine &name) { +llvm::CallBase * +CodeGenFunction::EmitRuntimeCallOrInvoke(llvm::FunctionCallee callee, + ArrayRef args, + const Twine &name) { llvm::CallBase *call = EmitCallOrInvoke(callee, args, name); call->setCallingConv(getRuntimeCC()); return call; @@ -3771,12 +3768,12 @@ llvm::CallBase *CodeGenFunction::EmitRuntimeCallOrInvoke( /// Emits a call or invoke instruction to the given function, depending /// on the current state of the EH stack. -llvm::CallBase *CodeGenFunction::EmitCallOrInvoke(llvm::Value *Callee, +llvm::CallBase *CodeGenFunction::EmitCallOrInvoke(llvm::FunctionCallee Callee, ArrayRef Args, const Twine &Name) { llvm::BasicBlock *InvokeDest = getInvokeDest(); SmallVector BundleList = - getBundlesForFunclet(Callee); + getBundlesForFunclet(Callee.getCallee()); llvm::CallBase *Inst; if (!InvokeDest) @@ -3816,17 +3813,34 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo &CallInfo, QualType RetTy = CallInfo.getReturnType(); const ABIArgInfo &RetAI = CallInfo.getReturnInfo(); - llvm::FunctionType *IRFuncTy = Callee.getFunctionType(); + llvm::FunctionType *IRFuncTy = getTypes().GetFunctionType(CallInfo); + +#ifndef NDEBUG + if (!(CallInfo.isVariadic() && CallInfo.getArgStruct())) { + // For an inalloca varargs function, we don't expect CallInfo to match the + // function pointer's type, because the inalloca struct a will have extra + // fields in it for the varargs parameters. Code later in this function + // bitcasts the function pointer to the type derived from CallInfo. + // + // In other cases, we assert that the types match up (until pointers stop + // having pointee types). + llvm::Type *TypeFromVal; + if (Callee.isVirtual()) + TypeFromVal = Callee.getVirtualFunctionType(); + else + TypeFromVal = + Callee.getFunctionPointer()->getType()->getPointerElementType(); + assert(IRFuncTy == TypeFromVal); + } +#endif // 1. Set up the arguments. // If we're using inalloca, insert the allocation after the stack save. // FIXME: Do this earlier rather than hacking it in here! Address ArgMemory = Address::invalid(); - const llvm::StructLayout *ArgMemoryLayout = nullptr; if (llvm::StructType *ArgStruct = CallInfo.getArgStruct()) { const llvm::DataLayout &DL = CGM.getDataLayout(); - ArgMemoryLayout = DL.getStructLayout(ArgStruct); llvm::Instruction *IP = CallArgs.getStackBase(); llvm::AllocaInst *AI; if (IP) { @@ -3843,13 +3857,6 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo &CallInfo, ArgMemory = Address(AI, Align); } - // Helper function to drill into the inalloca allocation. - auto createInAllocaStructGEP = [&](unsigned FieldIndex) -> Address { - auto FieldOffset = - CharUnits::fromQuantity(ArgMemoryLayout->getElementOffset(FieldIndex)); - return Builder.CreateStructGEP(ArgMemory, FieldIndex, FieldOffset); - }; - ClangToLLVMArgMapping IRFunctionArgs(CGM.getContext(), CallInfo); SmallVector IRCallArgs(IRFunctionArgs.totalIRArgs()); @@ -3872,7 +3879,8 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo &CallInfo, if (IRFunctionArgs.hasSRetArg()) { IRCallArgs[IRFunctionArgs.getSRetArgNo()] = SRetPtr.getPointer(); } else if (RetAI.isInAlloca()) { - Address Addr = createInAllocaStructGEP(RetAI.getInAllocaFieldIndex()); + Address Addr = + Builder.CreateStructGEP(ArgMemory, RetAI.getInAllocaFieldIndex()); Builder.CreateStore(SRetPtr.getPointer(), Addr); } } @@ -3910,12 +3918,14 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo &CallInfo, cast(Addr.getPointer()); CGBuilderTy::InsertPoint IP = Builder.saveIP(); Builder.SetInsertPoint(Placeholder); - Addr = createInAllocaStructGEP(ArgInfo.getInAllocaFieldIndex()); + Addr = + Builder.CreateStructGEP(ArgMemory, ArgInfo.getInAllocaFieldIndex()); Builder.restoreIP(IP); deferPlaceholderReplacement(Placeholder, Addr.getPointer()); } else { // Store the RValue into the argument struct. - Address Addr = createInAllocaStructGEP(ArgInfo.getInAllocaFieldIndex()); + Address Addr = + Builder.CreateStructGEP(ArgMemory, ArgInfo.getInAllocaFieldIndex()); unsigned AS = Addr.getType()->getPointerAddressSpace(); llvm::Type *MemType = ConvertTypeForMem(I->Ty)->getPointerTo(AS); // There are some cases where a trivial bitcast is not avoidable. The @@ -4107,11 +4117,9 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo &CallInfo, STy->getPointerTo(Src.getAddressSpace())); } - auto SrcLayout = CGM.getDataLayout().getStructLayout(STy); assert(NumIRArgs == STy->getNumElements()); for (unsigned i = 0, e = STy->getNumElements(); i != e; ++i) { - auto Offset = CharUnits::fromQuantity(SrcLayout->getElementOffset(i)); - Address EltPtr = Builder.CreateStructGEP(Src, i, Offset); + Address EltPtr = Builder.CreateStructGEP(Src, i); llvm::Value *LI = Builder.CreateLoad(EltPtr); IRCallArgs[FirstIRArg + i] = LI; } @@ -4161,7 +4169,7 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo &CallInfo, for (unsigned i = 0, e = coercionType->getNumElements(); i != e; ++i) { llvm::Type *eltType = coercionType->getElementType(i); if (ABIArgInfo::isPaddingForCoerceAndExpand(eltType)) continue; - Address eltAddr = Builder.CreateStructGEP(addr, i, layout); + Address eltAddr = Builder.CreateStructGEP(addr, i); llvm::Value *elt = Builder.CreateLoad(eltAddr); IRCallArgs[IRArgPos++] = elt; } @@ -4194,8 +4202,8 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo &CallInfo, // cases, we can't do any parameter mismatch checks. Give up and bitcast // the callee. unsigned CalleeAS = CalleePtr->getType()->getPointerAddressSpace(); - auto FnTy = getTypes().GetFunctionType(CallInfo)->getPointerTo(CalleeAS); - CalleePtr = Builder.CreateBitCast(CalleePtr, FnTy); + CalleePtr = + Builder.CreateBitCast(CalleePtr, IRFuncTy->getPointerTo(CalleeAS)); } else { llvm::Type *LastParamTy = IRFuncTy->getParamType(IRFuncTy->getNumParams() - 1); @@ -4227,19 +4235,20 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo &CallInfo, // // This makes the IR nicer, but more importantly it ensures that we // can inline the function at -O0 if it is marked always_inline. - auto simplifyVariadicCallee = [](llvm::Value *Ptr) -> llvm::Value* { - llvm::FunctionType *CalleeFT = - cast(Ptr->getType()->getPointerElementType()); + auto simplifyVariadicCallee = [](llvm::FunctionType *CalleeFT, + llvm::Value *Ptr) -> llvm::Function * { if (!CalleeFT->isVarArg()) - return Ptr; + return nullptr; - llvm::ConstantExpr *CE = dyn_cast(Ptr); - if (!CE || CE->getOpcode() != llvm::Instruction::BitCast) - return Ptr; + // Get underlying value if it's a bitcast + if (llvm::ConstantExpr *CE = dyn_cast(Ptr)) { + if (CE->getOpcode() == llvm::Instruction::BitCast) + Ptr = CE->getOperand(0); + } - llvm::Function *OrigFn = dyn_cast(CE->getOperand(0)); + llvm::Function *OrigFn = dyn_cast(Ptr); if (!OrigFn) - return Ptr; + return nullptr; llvm::FunctionType *OrigFT = OrigFn->getFunctionType(); @@ -4248,15 +4257,19 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo &CallInfo, if (OrigFT->isVarArg() || OrigFT->getNumParams() != CalleeFT->getNumParams() || OrigFT->getReturnType() != CalleeFT->getReturnType()) - return Ptr; + return nullptr; for (unsigned i = 0, e = OrigFT->getNumParams(); i != e; ++i) if (OrigFT->getParamType(i) != CalleeFT->getParamType(i)) - return Ptr; + return nullptr; return OrigFn; }; - CalleePtr = simplifyVariadicCallee(CalleePtr); + + if (llvm::Function *OrigFn = simplifyVariadicCallee(IRFuncTy, CalleePtr)) { + CalleePtr = OrigFn; + IRFuncTy = OrigFn->getFunctionType(); + } // 3. Perform the actual call. @@ -4351,10 +4364,10 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo &CallInfo, // Emit the actual call/invoke instruction. llvm::CallBase *CI; if (!InvokeDest) { - CI = Builder.CreateCall(CalleePtr, IRCallArgs, BundleList); + CI = Builder.CreateCall(IRFuncTy, CalleePtr, IRCallArgs, BundleList); } else { llvm::BasicBlock *Cont = createBasicBlock("invoke.cont"); - CI = Builder.CreateInvoke(CalleePtr, Cont, InvokeDest, IRCallArgs, + CI = Builder.CreateInvoke(IRFuncTy, CalleePtr, Cont, InvokeDest, IRCallArgs, BundleList); EmitBlock(Cont); } @@ -4414,12 +4427,14 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo &CallInfo, // Avoid incompatibility with ASan which relies on the `noreturn` // attribute to insert handler calls. - if (SanOpts.has(SanitizerKind::Address)) { + if (SanOpts.hasOneOf(SanitizerKind::Address | + SanitizerKind::KernelAddress)) { SanitizerScope SanScope(this); llvm::IRBuilder<>::InsertPointGuard IPGuard(Builder); Builder.SetInsertPoint(CI); auto *FnType = llvm::FunctionType::get(CGM.VoidTy, /*isVarArg=*/false); - auto *Fn = CGM.CreateRuntimeFunction(FnType, "__asan_handle_no_return"); + llvm::FunctionCallee Fn = + CGM.CreateRuntimeFunction(FnType, "__asan_handle_no_return"); EmitNounwindRuntimeCall(Fn); } } @@ -4456,7 +4471,6 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo &CallInfo, switch (RetAI.getKind()) { case ABIArgInfo::CoerceAndExpand: { auto coercionType = RetAI.getCoerceAndExpandType(); - auto layout = CGM.getDataLayout().getStructLayout(coercionType); Address addr = SRetPtr; addr = Builder.CreateElementBitCast(addr, coercionType); @@ -4468,7 +4482,7 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo &CallInfo, for (unsigned i = 0, e = coercionType->getNumElements(); i != e; ++i) { llvm::Type *eltType = coercionType->getElementType(i); if (ABIArgInfo::isPaddingForCoerceAndExpand(eltType)) continue; - Address eltAddr = Builder.CreateStructGEP(addr, i, layout); + Address eltAddr = Builder.CreateStructGEP(addr, i); llvm::Value *elt = CI; if (requiresExtract) elt = Builder.CreateExtractValue(elt, unpaddedIndex++); @@ -4576,7 +4590,7 @@ CGCallee CGCallee::prepareConcreteCallee(CodeGenFunction &CGF) const { if (isVirtual()) { const CallExpr *CE = getVirtualCallExpr(); return CGF.CGM.getCXXABI().getVirtualFunctionPointer( - CGF, getVirtualMethodDecl(), getThisAddress(), getFunctionType(), + CGF, getVirtualMethodDecl(), getThisAddress(), getVirtualFunctionType(), CE ? CE->getBeginLoc() : SourceLocation()); } diff --git a/clang/lib/CodeGen/CGCall.h b/clang/lib/CodeGen/CGCall.h index 2ca865a74d38e..cc11ded704abb 100644 --- a/clang/lib/CodeGen/CGCall.h +++ b/clang/lib/CodeGen/CGCall.h @@ -135,6 +135,12 @@ class CGCalleeInfo { return CGCallee(abstractInfo, functionPtr); } + static CGCallee + forDirect(llvm::FunctionCallee functionPtr, + const CGCalleeInfo &abstractInfo = CGCalleeInfo()) { + return CGCallee(abstractInfo, functionPtr.getCallee()); + } + static CGCallee forVirtual(const CallExpr *CE, GlobalDecl MD, Address Addr, llvm::FunctionType *FTy) { CGCallee result(SpecialKind::Virtual); @@ -198,12 +204,9 @@ class CGCalleeInfo { assert(isVirtual()); return VirtualInfo.Addr; } - - llvm::FunctionType *getFunctionType() const { - if (isVirtual()) - return VirtualInfo.FTy; - return cast( - getFunctionPointer()->getType()->getPointerElementType()); + llvm::FunctionType *getVirtualFunctionType() const { + assert(isVirtual()); + return VirtualInfo.FTy; } /// If this is a delayed callee computation of some sort, prepare diff --git a/clang/lib/CodeGen/CGClass.cpp b/clang/lib/CodeGen/CGClass.cpp index 748475ea9ec79..f45b28098558d 100644 --- a/clang/lib/CodeGen/CGClass.cpp +++ b/clang/lib/CodeGen/CGClass.cpp @@ -792,7 +792,7 @@ void CodeGenFunction::EmitAsanPrologueOrEpilogue(bool Prologue) { llvm::Type *Args[2] = {IntPtrTy, IntPtrTy}; llvm::FunctionType *FTy = llvm::FunctionType::get(CGM.VoidTy, Args, false); - llvm::Constant *F = CGM.CreateRuntimeFunction( + llvm::FunctionCallee F = CGM.CreateRuntimeFunction( FTy, Prologue ? "__asan_poison_intra_object_redzone" : "__asan_unpoison_intra_object_redzone"); @@ -1626,7 +1626,7 @@ namespace { llvm::FunctionType *FnType = llvm::FunctionType::get(CGF.VoidTy, ArgTypes, false); - llvm::Value *Fn = + llvm::FunctionCallee Fn = CGF.CGM.CreateRuntimeFunction(FnType, "__sanitizer_dtor_callback"); CGF.EmitNounwindRuntimeCall(Fn, Args); } diff --git a/clang/lib/CodeGen/CGCleanup.cpp b/clang/lib/CodeGen/CGCleanup.cpp index 4b13b316bea4b..5594f3030229d 100644 --- a/clang/lib/CodeGen/CGCleanup.cpp +++ b/clang/lib/CodeGen/CGCleanup.cpp @@ -52,12 +52,8 @@ DominatingValue::saved_type::save(CodeGenFunction &CGF, RValue rv) { llvm::Type *ComplexTy = llvm::StructType::get(V.first->getType(), V.second->getType()); Address addr = CGF.CreateDefaultAlignTempAlloca(ComplexTy, "saved-complex"); - CGF.Builder.CreateStore(V.first, - CGF.Builder.CreateStructGEP(addr, 0, CharUnits())); - CharUnits offset = CharUnits::fromQuantity( - CGF.CGM.getDataLayout().getTypeAllocSize(V.first->getType())); - CGF.Builder.CreateStore(V.second, - CGF.Builder.CreateStructGEP(addr, 1, offset)); + CGF.Builder.CreateStore(V.first, CGF.Builder.CreateStructGEP(addr, 0)); + CGF.Builder.CreateStore(V.second, CGF.Builder.CreateStructGEP(addr, 1)); return saved_type(addr.getPointer(), ComplexAddress); } @@ -95,12 +91,10 @@ RValue DominatingValue::saved_type::restore(CodeGenFunction &CGF) { } case ComplexAddress: { Address address = getSavingAddress(Value); - llvm::Value *real = CGF.Builder.CreateLoad( - CGF.Builder.CreateStructGEP(address, 0, CharUnits())); - CharUnits offset = CharUnits::fromQuantity( - CGF.CGM.getDataLayout().getTypeAllocSize(real->getType())); - llvm::Value *imag = CGF.Builder.CreateLoad( - CGF.Builder.CreateStructGEP(address, 1, offset)); + llvm::Value *real = + CGF.Builder.CreateLoad(CGF.Builder.CreateStructGEP(address, 0)); + llvm::Value *imag = + CGF.Builder.CreateLoad(CGF.Builder.CreateStructGEP(address, 1)); return RValue::getComplex(real, imag); } } diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp index a142625c42199..4fc2a35d50b07 100644 --- a/clang/lib/CodeGen/CGDebugInfo.cpp +++ b/clang/lib/CodeGen/CGDebugInfo.cpp @@ -450,8 +450,8 @@ CGDebugInfo::createFile(StringRef FileName, for (; CurDirIt != CurDirE && *CurDirIt == *FileIt; ++CurDirIt, ++FileIt) llvm::sys::path::append(DirBuf, *CurDirIt); if (std::distance(llvm::sys::path::begin(CurDir), CurDirIt) == 1) { - // The common prefix only the root; stripping it would cause - // LLVM diagnostic locations to be more confusing. + // Don't strip the common prefix if it is only the root "/" + // since that would make LLVM diagnostic locations confusing. Dir = {}; File = RemappedFile; } else { @@ -2296,7 +2296,14 @@ CGDebugInfo::getOrCreateModuleRef(ExternalASTSource::ASTSourceDescriptor Mod, } bool IsRootModule = M ? !M->Parent : true; - if (CreateSkeletonCU && IsRootModule) { + // When a module name is specified as -fmodule-name, that module gets a + // clang::Module object, but it won't actually be built or imported; it will + // be textual. + if (CreateSkeletonCU && IsRootModule && Mod.getASTFile().empty() && M) + assert(StringRef(M->Name).startswith(CGM.getLangOpts().ModuleName) && + "clang module without ASTFile must be specified by -fmodule-name"); + + if (CreateSkeletonCU && IsRootModule && !Mod.getASTFile().empty()) { // PCH files don't have a signature field in the control block, // but LLVM detects skeleton CUs by looking for a non-zero DWO id. // We use the lower 64 bits for debug info. @@ -2313,6 +2320,7 @@ CGDebugInfo::getOrCreateModuleRef(ExternalASTSource::ASTSourceDescriptor Mod, Signature); DIB.finalize(); } + llvm::DIModule *Parent = IsRootModule ? nullptr : getOrCreateModuleRef( @@ -3023,6 +3031,8 @@ llvm::DICompositeType *CGDebugInfo::CreateLimitedType(const RecordType *Ty) { // Record if a C++ record is trivial type. if (CXXRD->isTrivial()) Flags |= llvm::DINode::FlagTrivial; + else + Flags |= llvm::DINode::FlagNonTrivial; } llvm::DICompositeType *RealDecl = DBuilder.createReplaceableCompositeType( @@ -4232,6 +4242,14 @@ void CGDebugInfo::EmitGlobalVariable(llvm::GlobalVariable *Var, SmallVector Expr; unsigned AddressSpace = CGM.getContext().getTargetAddressSpace(D->getType()); + if (CGM.getLangOpts().CUDA && CGM.getLangOpts().CUDAIsDevice) { + if (D->hasAttr()) + AddressSpace = + CGM.getContext().getTargetAddressSpace(LangAS::cuda_shared); + else if (D->hasAttr()) + AddressSpace = + CGM.getContext().getTargetAddressSpace(LangAS::cuda_constant); + } AppendAddressSpaceXDeref(AddressSpace, Expr); GVE = DBuilder.createGlobalVariableExpression( diff --git a/clang/lib/CodeGen/CGDecl.cpp b/clang/lib/CodeGen/CGDecl.cpp index 2a4bc51256382..d9809db1c652f 100644 --- a/clang/lib/CodeGen/CGDecl.cpp +++ b/clang/lib/CodeGen/CGDecl.cpp @@ -917,9 +917,8 @@ static void emitStoresForInitAfterBZero(CodeGenModule &CGM, // If necessary, get a pointer to the element and emit it. if (!Elt->isNullValue() && !isa(Elt)) emitStoresForInitAfterBZero( - CGM, Elt, - Builder.CreateConstInBoundsGEP2_32(Loc, 0, i, CGM.getDataLayout()), - isVolatile, Builder); + CGM, Elt, Builder.CreateConstInBoundsGEP2_32(Loc, 0, i), isVolatile, + Builder); } return; } @@ -932,10 +931,9 @@ static void emitStoresForInitAfterBZero(CodeGenModule &CGM, // If necessary, get a pointer to the element and emit it. if (!Elt->isNullValue() && !isa(Elt)) - emitStoresForInitAfterBZero( - CGM, Elt, - Builder.CreateConstInBoundsGEP2_32(Loc, 0, i, CGM.getDataLayout()), - isVolatile, Builder); + emitStoresForInitAfterBZero(CGM, Elt, + Builder.CreateConstInBoundsGEP2_32(Loc, 0, i), + isVolatile, Builder); } } @@ -971,6 +969,20 @@ static llvm::Value *shouldUseMemSetToInitialize(llvm::Constant *Init, return llvm::isBytewiseValue(Init); } +/// Decide whether we want to split a constant structure store into a sequence +/// of its fields' stores. This may cost us code size and compilation speed, +/// but plays better with store optimizations. +static bool shouldSplitStructStore(CodeGenModule &CGM, + uint64_t GlobalByteSize) { + // Don't break structures that occupy more than one cacheline. + uint64_t ByteSizeLimit = 64; + if (CGM.getCodeGenOpts().OptimizationLevel == 0) + return false; + if (GlobalByteSize <= ByteSizeLimit) + return true; + return false; +} + static llvm::Constant *patternFor(CodeGenModule &CGM, llvm::Type *Ty) { // The following value is a guaranteed unmappable pointer value and has a // repeated byte-pattern which makes it easier to synthesize. We use it for @@ -1050,6 +1062,98 @@ static llvm::Constant *patternFor(CodeGenModule &CGM, llvm::Type *Ty) { return llvm::ConstantStruct::get(StructTy, Struct); } +enum class IsPattern { No, Yes }; + +/// Generate a constant filled with either a pattern or zeroes. +static llvm::Constant *patternOrZeroFor(CodeGenModule &CGM, IsPattern isPattern, + llvm::Type *Ty) { + if (isPattern == IsPattern::Yes) + return patternFor(CGM, Ty); + else + return llvm::Constant::getNullValue(Ty); +} + +static llvm::Constant *constWithPadding(CodeGenModule &CGM, IsPattern isPattern, + llvm::Constant *constant); + +/// Helper function for constWithPadding() to deal with padding in structures. +static llvm::Constant *constStructWithPadding(CodeGenModule &CGM, + IsPattern isPattern, + llvm::StructType *STy, + llvm::Constant *constant) { + const llvm::DataLayout &DL = CGM.getDataLayout(); + const llvm::StructLayout *Layout = DL.getStructLayout(STy); + llvm::Type *Int8Ty = llvm::IntegerType::getInt8Ty(CGM.getLLVMContext()); + unsigned SizeSoFar = 0; + SmallVector Values; + bool NestedIntact = true; + for (unsigned i = 0, e = STy->getNumElements(); i != e; i++) { + unsigned CurOff = Layout->getElementOffset(i); + if (SizeSoFar < CurOff) { + assert(!STy->isPacked()); + auto *PadTy = llvm::ArrayType::get(Int8Ty, CurOff - SizeSoFar); + Values.push_back(patternOrZeroFor(CGM, isPattern, PadTy)); + } + llvm::Constant *CurOp; + if (constant->isZeroValue()) + CurOp = llvm::Constant::getNullValue(STy->getElementType(i)); + else + CurOp = cast(constant->getAggregateElement(i)); + auto *NewOp = constWithPadding(CGM, isPattern, CurOp); + if (CurOp != NewOp) + NestedIntact = false; + Values.push_back(NewOp); + SizeSoFar = CurOff + DL.getTypeAllocSize(CurOp->getType()); + } + unsigned TotalSize = Layout->getSizeInBytes(); + if (SizeSoFar < TotalSize) { + auto *PadTy = llvm::ArrayType::get(Int8Ty, TotalSize - SizeSoFar); + Values.push_back(patternOrZeroFor(CGM, isPattern, PadTy)); + } + if (NestedIntact && Values.size() == STy->getNumElements()) + return constant; + return llvm::ConstantStruct::getAnon(Values); +} + +/// Replace all padding bytes in a given constant with either a pattern byte or +/// 0x00. +static llvm::Constant *constWithPadding(CodeGenModule &CGM, IsPattern isPattern, + llvm::Constant *constant) { + llvm::Type *OrigTy = constant->getType(); + if (const auto STy = dyn_cast(OrigTy)) + return constStructWithPadding(CGM, isPattern, STy, constant); + if (auto *STy = dyn_cast(OrigTy)) { + llvm::SmallVector Values; + unsigned Size = STy->getNumElements(); + if (!Size) + return constant; + llvm::Type *ElemTy = STy->getElementType(); + bool ZeroInitializer = constant->isZeroValue(); + llvm::Constant *OpValue, *PaddedOp; + if (ZeroInitializer) { + OpValue = llvm::Constant::getNullValue(ElemTy); + PaddedOp = constWithPadding(CGM, isPattern, OpValue); + } + for (unsigned Op = 0; Op != Size; ++Op) { + if (!ZeroInitializer) { + OpValue = constant->getAggregateElement(Op); + PaddedOp = constWithPadding(CGM, isPattern, OpValue); + } + Values.push_back(PaddedOp); + } + auto *NewElemTy = Values[0]->getType(); + if (NewElemTy == ElemTy) + return constant; + if (OrigTy->isArrayTy()) { + auto *ArrayTy = llvm::ArrayType::get(NewElemTy, Size); + return llvm::ConstantArray::get(ArrayTy, Values); + } else { + return llvm::ConstantVector::get(Values); + } + } + return constant; +} + static Address createUnnamedGlobalFrom(CodeGenModule &CGM, const VarDecl &D, CGBuilderTy &Builder, llvm::Constant *Constant, @@ -1111,6 +1215,8 @@ static void emitStoresForConstant(CodeGenModule &CGM, const VarDecl &D, // If the initializer is all or mostly the same, codegen with bzero / memset // then do a few stores afterward. uint64_t ConstantSize = CGM.getDataLayout().getTypeAllocSize(Ty); + if (!ConstantSize) + return; auto *SizeVal = llvm::ConstantInt::get(IntPtrTy, ConstantSize); if (shouldUseBZeroPlusStoresToInitialize(constant, ConstantSize)) { Builder.CreateMemSet(Loc, llvm::ConstantInt::get(Int8Ty, 0), SizeVal, @@ -1138,6 +1244,20 @@ static void emitStoresForConstant(CodeGenModule &CGM, const VarDecl &D, return; } + llvm::StructType *STy = dyn_cast(Ty); + // FIXME: handle the case when STy != Loc.getElementType(). + // FIXME: handle non-struct aggregate types. + if (STy && (STy == Loc.getElementType()) && + shouldSplitStructStore(CGM, ConstantSize)) { + for (unsigned i = 0; i != constant->getNumOperands(); i++) { + Address EltPtr = Builder.CreateStructGEP(Loc, i); + emitStoresForConstant( + CGM, D, EltPtr, isVolatile, Builder, + cast(Builder.CreateExtractValue(constant, i))); + } + return; + } + Builder.CreateMemCpy( Loc, createUnnamedGlobalFrom(CGM, D, Builder, constant, Loc.getAlignment()), @@ -1148,7 +1268,8 @@ static void emitStoresForZeroInit(CodeGenModule &CGM, const VarDecl &D, Address Loc, bool isVolatile, CGBuilderTy &Builder) { llvm::Type *ElTy = Loc.getElementType(); - llvm::Constant *constant = llvm::Constant::getNullValue(ElTy); + llvm::Constant *constant = + constWithPadding(CGM, IsPattern::No, llvm::Constant::getNullValue(ElTy)); emitStoresForConstant(CGM, D, Loc, isVolatile, Builder, constant); } @@ -1156,7 +1277,8 @@ static void emitStoresForPatternInit(CodeGenModule &CGM, const VarDecl &D, Address Loc, bool isVolatile, CGBuilderTy &Builder) { llvm::Type *ElTy = Loc.getElementType(); - llvm::Constant *constant = patternFor(CGM, ElTy); + llvm::Constant *constant = + constWithPadding(CGM, IsPattern::Yes, patternFor(CGM, ElTy)); assert(!isa(constant)); emitStoresForConstant(CGM, D, Loc, isVolatile, Builder, constant); } @@ -1172,13 +1294,11 @@ static bool containsUndef(llvm::Constant *constant) { return false; } -static llvm::Constant *replaceUndef(llvm::Constant *constant) { - // FIXME: when doing pattern initialization, replace undef with 0xAA instead. - // FIXME: also replace padding between values by creating a new struct type - // which has no padding. +static llvm::Constant *replaceUndef(CodeGenModule &CGM, IsPattern isPattern, + llvm::Constant *constant) { auto *Ty = constant->getType(); if (isa(constant)) - return llvm::Constant::getNullValue(Ty); + return patternOrZeroFor(CGM, isPattern, Ty); if (!(Ty->isStructTy() || Ty->isArrayTy() || Ty->isVectorTy())) return constant; if (!containsUndef(constant)) @@ -1186,7 +1306,7 @@ static llvm::Constant *replaceUndef(llvm::Constant *constant) { llvm::SmallVector Values(constant->getNumOperands()); for (unsigned Op = 0, NumOp = constant->getNumOperands(); Op != NumOp; ++Op) { auto *OpValue = cast(constant->getOperand(Op)); - Values[Op] = replaceUndef(OpValue); + Values[Op] = replaceUndef(CGM, isPattern, OpValue); } if (Ty->isStructTy()) return llvm::ConstantStruct::get(cast(Ty), Values); @@ -1487,7 +1607,19 @@ CodeGenFunction::EmitAutoVarAlloca(const VarDecl &D) { (void)DI->EmitDeclareOfAutoVariable(&D, address.getPointer(), Builder); } - if (D.hasAttr()) + // Emit Intel FPGA attribute annotation for a local variable. + if (getLangOpts().SYCLIsDevice) { + SmallString<256> AnnotStr; + CGM.generateIntelFPGAAnnotation(&D, AnnotStr); + if (!AnnotStr.empty()) { + llvm::Value *V = address.getPointer(); + EmitAnnotationCall(CGM.getIntrinsic(llvm::Intrinsic::var_annotation), + Builder.CreateBitCast(V, CGM.Int8PtrTy, V->getName()), + AnnotStr, D.getLocation()); + } + } + + if (D.hasAttr() && HaveInsertPoint()) EmitVarAnnotations(&D, address.getPointer()); // Make sure we call @llvm.lifetime.end. @@ -1622,8 +1754,9 @@ void CodeGenFunction::EmitAutoVarInit(const AutoVarEmission &emission) { bool capturedByInit = Init && emission.IsEscapingByRef && isCapturedBy(D, Init); - Address Loc = - capturedByInit ? emission.Addr : emission.getObjectAddress(*this); + bool locIsByrefHeader = !capturedByInit; + const Address Loc = + locIsByrefHeader ? emission.getObjectAddress(*this) : emission.Addr; // Note: constexpr already initializes everything correctly. LangOptions::TrivialAutoVarInitKind trivialAutoVarInit = @@ -1633,11 +1766,15 @@ void CodeGenFunction::EmitAutoVarInit(const AutoVarEmission &emission) { ? LangOptions::TrivialAutoVarInitKind::Uninitialized : getContext().getLangOpts().getTrivialAutoVarInit())); - auto initializeWhatIsTechnicallyUninitialized = [&]() { + auto initializeWhatIsTechnicallyUninitialized = [&](Address Loc) { if (trivialAutoVarInit == LangOptions::TrivialAutoVarInitKind::Uninitialized) return; + // Only initialize a __block's storage: we always initialize the header. + if (emission.IsEscapingByRef && !locIsByrefHeader) + Loc = emitBlockByrefAddress(Loc, &D, /*follow=*/false); + CharUnits Size = getContext().getTypeSizeInChars(type); if (!Size.isZero()) { switch (trivialAutoVarInit) { @@ -1658,8 +1795,7 @@ void CodeGenFunction::EmitAutoVarInit(const AutoVarEmission &emission) { // Technically zero-sized or negative-sized VLAs are undefined, and UBSan // will catch that code, but there exists code which generates zero-sized // VLAs. Be nice and initialize whatever they requested. - const VariableArrayType *VlaType = - dyn_cast_or_null(getContext().getAsArrayType(type)); + const auto *VlaType = getContext().getAsVariableArrayType(type); if (!VlaType) return; auto VlaSize = getVLASize(VlaType); @@ -1678,7 +1814,8 @@ void CodeGenFunction::EmitAutoVarInit(const AutoVarEmission &emission) { case LangOptions::TrivialAutoVarInitKind::Pattern: { llvm::Type *ElTy = Loc.getElementType(); - llvm::Constant *Constant = patternFor(CGM, ElTy); + llvm::Constant *Constant = + constWithPadding(CGM, IsPattern::Yes, patternFor(CGM, ElTy)); CharUnits ConstantAlign = getContext().getTypeAlignInChars(VlaSize.Type); llvm::BasicBlock *SetupBB = createBasicBlock("vla-setup.loop"); llvm::BasicBlock *LoopBB = createBasicBlock("vla-init.loop"); @@ -1715,7 +1852,7 @@ void CodeGenFunction::EmitAutoVarInit(const AutoVarEmission &emission) { }; if (isTrivialInitializer(Init)) { - initializeWhatIsTechnicallyUninitialized(); + initializeWhatIsTechnicallyUninitialized(Loc); return; } @@ -1724,12 +1861,18 @@ void CodeGenFunction::EmitAutoVarInit(const AutoVarEmission &emission) { assert(!capturedByInit && "constant init contains a capturing block?"); constant = ConstantEmitter(*this).tryEmitAbstractForInitializer(D); if (constant && trivialAutoVarInit != - LangOptions::TrivialAutoVarInitKind::Uninitialized) - constant = replaceUndef(constant); + LangOptions::TrivialAutoVarInitKind::Uninitialized) { + IsPattern isPattern = + (trivialAutoVarInit == LangOptions::TrivialAutoVarInitKind::Pattern) + ? IsPattern::Yes + : IsPattern::No; + constant = constWithPadding(CGM, isPattern, + replaceUndef(CGM, isPattern, constant)); + } } if (!constant) { - initializeWhatIsTechnicallyUninitialized(); + initializeWhatIsTechnicallyUninitialized(Loc); LValue lv = MakeAddrLValue(Loc, type); lv.setNonGC(true); return EmitExprAsInit(Init, &D, lv, capturedByInit); @@ -1743,10 +1886,9 @@ void CodeGenFunction::EmitAutoVarInit(const AutoVarEmission &emission) { } llvm::Type *BP = CGM.Int8Ty->getPointerTo(Loc.getAddressSpace()); - if (Loc.getType() != BP) - Loc = Builder.CreateBitCast(Loc, BP); - - emitStoresForConstant(CGM, D, Loc, isVolatile, Builder, constant); + emitStoresForConstant( + CGM, D, (Loc.getType() == BP) ? Loc : Builder.CreateBitCast(Loc, BP), + isVolatile, Builder, constant); } /// Emit an expression as an initializer for an object (variable, field, etc.) @@ -2201,7 +2343,7 @@ void CodeGenFunction::pushRegularPartialArrayCleanup(llvm::Value *arrayBegin, } /// Lazily declare the @llvm.lifetime.start intrinsic. -llvm::Constant *CodeGenModule::getLLVMLifetimeStartFn() { +llvm::Function *CodeGenModule::getLLVMLifetimeStartFn() { if (LifetimeStartFn) return LifetimeStartFn; LifetimeStartFn = llvm::Intrinsic::getDeclaration(&getModule(), @@ -2210,7 +2352,7 @@ llvm::Constant *CodeGenModule::getLLVMLifetimeStartFn() { } /// Lazily declare the @llvm.lifetime.end intrinsic. -llvm::Constant *CodeGenModule::getLLVMLifetimeEndFn() { +llvm::Function *CodeGenModule::getLLVMLifetimeEndFn() { if (LifetimeEndFn) return LifetimeEndFn; LifetimeEndFn = llvm::Intrinsic::getDeclaration(&getModule(), diff --git a/clang/lib/CodeGen/CGDeclCXX.cpp b/clang/lib/CodeGen/CGDeclCXX.cpp index d527aa93d3275..febeb45f1971e 100644 --- a/clang/lib/CodeGen/CGDeclCXX.cpp +++ b/clang/lib/CodeGen/CGDeclCXX.cpp @@ -97,7 +97,7 @@ static void EmitDeclDestroy(CodeGenFunction &CGF, const VarDecl &D, return; } - llvm::Constant *Func; + llvm::FunctionCallee Func; llvm::Constant *Argument; // Special-case non-array C++ destructors, if they have the right signature. @@ -117,7 +117,7 @@ static void EmitDeclDestroy(CodeGenFunction &CGF, const VarDecl &D, assert(!Record->hasTrivialDestructor()); CXXDestructorDecl *Dtor = Record->getDestructor(); - Func = CGM.getAddrOfCXXStructor(Dtor, StructorType::Complete); + Func = CGM.getAddrAndTypeOfCXXStructor(Dtor, StructorType::Complete); Argument = llvm::ConstantExpr::getBitCast( Addr.getPointer(), CGF.getTypes().ConvertType(Type)->getPointerTo()); @@ -214,8 +214,8 @@ void CodeGenFunction::EmitCXXGlobalVarDeclInit(const VarDecl &D, /// Create a stub function, suitable for being passed to atexit, /// which passes the given address to the given destructor function. -llvm::Constant *CodeGenFunction::createAtExitStub(const VarDecl &VD, - llvm::Constant *dtor, +llvm::Function *CodeGenFunction::createAtExitStub(const VarDecl &VD, + llvm::FunctionCallee dtor, llvm::Constant *addr) { // Get the destructor function type, void(*)(void). llvm::FunctionType *ty = llvm::FunctionType::get(CGM.VoidTy, false); @@ -238,7 +238,7 @@ llvm::Constant *CodeGenFunction::createAtExitStub(const VarDecl &VD, // Make sure the call and the callee agree on calling convention. if (llvm::Function *dtorFn = - dyn_cast(dtor->stripPointerCasts())) + dyn_cast(dtor.getCallee()->stripPointerCasts())) call->setCallingConv(dtorFn->getCallingConv()); CGF.FinishFunction(); @@ -248,7 +248,7 @@ llvm::Constant *CodeGenFunction::createAtExitStub(const VarDecl &VD, /// Register a global destructor using the C atexit runtime function. void CodeGenFunction::registerGlobalDtorWithAtExit(const VarDecl &VD, - llvm::Constant *dtor, + llvm::FunctionCallee dtor, llvm::Constant *addr) { // Create a function which calls the destructor. llvm::Constant *dtorStub = createAtExitStub(VD, dtor, addr); @@ -260,10 +260,10 @@ void CodeGenFunction::registerGlobalDtorWithAtExit(llvm::Constant *dtorStub) { llvm::FunctionType *atexitTy = llvm::FunctionType::get(IntTy, dtorStub->getType(), false); - llvm::Constant *atexit = + llvm::FunctionCallee atexit = CGM.CreateRuntimeFunction(atexitTy, "atexit", llvm::AttributeList(), /*Local=*/true); - if (llvm::Function *atexitFn = dyn_cast(atexit)) + if (llvm::Function *atexitFn = dyn_cast(atexit.getCallee())) atexitFn->setDoesNotThrow(); EmitNounwindRuntimeCall(atexit, dtorStub); @@ -681,8 +681,8 @@ CodeGenFunction::GenerateCXXGlobalInitFunc(llvm::Function *Fn, void CodeGenFunction::GenerateCXXGlobalDtorsFunc( llvm::Function *Fn, - const std::vector> - &DtorsAndObjects) { + const std::vector> &DtorsAndObjects) { { auto NL = ApplyDebugLocation::CreateEmpty(*this); StartFunction(GlobalDecl(), getContext().VoidTy, Fn, @@ -692,9 +692,11 @@ void CodeGenFunction::GenerateCXXGlobalDtorsFunc( // Emit the dtors, in reverse order from construction. for (unsigned i = 0, e = DtorsAndObjects.size(); i != e; ++i) { - llvm::Value *Callee = DtorsAndObjects[e - i - 1].first; - llvm::CallInst *CI = Builder.CreateCall(Callee, - DtorsAndObjects[e - i - 1].second); + llvm::FunctionType *CalleeTy; + llvm::Value *Callee; + llvm::Constant *Arg; + std::tie(CalleeTy, Callee, Arg) = DtorsAndObjects[e - i - 1]; + llvm::CallInst *CI = Builder.CreateCall(CalleeTy, Callee, Arg); // Make sure the call and the callee agree on calling convention. if (llvm::Function *F = dyn_cast(Callee)) CI->setCallingConv(F->getCallingConv()); diff --git a/clang/lib/CodeGen/CGException.cpp b/clang/lib/CodeGen/CGException.cpp index 800d82b4a737a..8335c9f6878ee 100644 --- a/clang/lib/CodeGen/CGException.cpp +++ b/clang/lib/CodeGen/CGException.cpp @@ -28,7 +28,7 @@ using namespace clang; using namespace CodeGen; -static llvm::Constant *getFreeExceptionFn(CodeGenModule &CGM) { +static llvm::FunctionCallee getFreeExceptionFn(CodeGenModule &CGM) { // void __cxa_free_exception(void *thrown_exception); llvm::FunctionType *FTy = @@ -37,7 +37,7 @@ static llvm::Constant *getFreeExceptionFn(CodeGenModule &CGM) { return CGM.CreateRuntimeFunction(FTy, "__cxa_free_exception"); } -static llvm::Constant *getUnexpectedFn(CodeGenModule &CGM) { +static llvm::FunctionCallee getUnexpectedFn(CodeGenModule &CGM) { // void __cxa_call_unexpected(void *thrown_exception); llvm::FunctionType *FTy = @@ -46,7 +46,7 @@ static llvm::Constant *getUnexpectedFn(CodeGenModule &CGM) { return CGM.CreateRuntimeFunction(FTy, "__cxa_call_unexpected"); } -llvm::Constant *CodeGenModule::getTerminateFn() { +llvm::FunctionCallee CodeGenModule::getTerminateFn() { // void __terminate(); llvm::FunctionType *FTy = @@ -72,8 +72,8 @@ llvm::Constant *CodeGenModule::getTerminateFn() { return CreateRuntimeFunction(FTy, name); } -static llvm::Constant *getCatchallRethrowFn(CodeGenModule &CGM, - StringRef Name) { +static llvm::FunctionCallee getCatchallRethrowFn(CodeGenModule &CGM, + StringRef Name) { llvm::FunctionType *FTy = llvm::FunctionType::get(CGM.VoidTy, CGM.Int8PtrTy, /*IsVarArgs=*/false); @@ -238,8 +238,8 @@ const EHPersonality &EHPersonality::get(CodeGenFunction &CGF) { return get(CGF.CGM, dyn_cast_or_null(FD)); } -static llvm::Constant *getPersonalityFn(CodeGenModule &CGM, - const EHPersonality &Personality) { +static llvm::FunctionCallee getPersonalityFn(CodeGenModule &CGM, + const EHPersonality &Personality) { return CGM.CreateRuntimeFunction(llvm::FunctionType::get(CGM.Int32Ty, true), Personality.PersonalityFn, llvm::AttributeList(), /*Local=*/true); @@ -247,12 +247,13 @@ static llvm::Constant *getPersonalityFn(CodeGenModule &CGM, static llvm::Constant *getOpaquePersonalityFn(CodeGenModule &CGM, const EHPersonality &Personality) { - llvm::Constant *Fn = getPersonalityFn(CGM, Personality); + llvm::FunctionCallee Fn = getPersonalityFn(CGM, Personality); llvm::PointerType* Int8PtrTy = llvm::PointerType::get( llvm::Type::getInt8Ty(CGM.getLLVMContext()), CGM.getDataLayout().getProgramAddressSpace()); - return llvm::ConstantExpr::getBitCast(Fn, Int8PtrTy); + return llvm::ConstantExpr::getBitCast(cast(Fn.getCallee()), + Int8PtrTy); } /// Check whether a landingpad instruction only uses C++ features. @@ -343,12 +344,13 @@ void CodeGenModule::SimplifyPersonality() { // Create the C++ personality function and kill off the old // function. - llvm::Constant *CXXFn = getPersonalityFn(*this, CXX); + llvm::FunctionCallee CXXFn = getPersonalityFn(*this, CXX); // This can happen if the user is screwing with us. - if (Fn->getType() != CXXFn->getType()) return; + if (Fn->getType() != CXXFn.getCallee()->getType()) + return; - Fn->replaceAllUsesWith(CXXFn); + Fn->replaceAllUsesWith(CXXFn.getCallee()); Fn->eraseFromParent(); } @@ -1267,9 +1269,10 @@ void CodeGenFunction::ExitCXXTryStmt(const CXXTryStmt &S, bool IsFnTryBlock) { namespace { struct CallEndCatchForFinally final : EHScopeStack::Cleanup { llvm::Value *ForEHVar; - llvm::Value *EndCatchFn; - CallEndCatchForFinally(llvm::Value *ForEHVar, llvm::Value *EndCatchFn) - : ForEHVar(ForEHVar), EndCatchFn(EndCatchFn) {} + llvm::FunctionCallee EndCatchFn; + CallEndCatchForFinally(llvm::Value *ForEHVar, + llvm::FunctionCallee EndCatchFn) + : ForEHVar(ForEHVar), EndCatchFn(EndCatchFn) {} void Emit(CodeGenFunction &CGF, Flags flags) override { llvm::BasicBlock *EndCatchBB = CGF.createBasicBlock("finally.endcatch"); @@ -1288,15 +1291,15 @@ namespace { struct PerformFinally final : EHScopeStack::Cleanup { const Stmt *Body; llvm::Value *ForEHVar; - llvm::Value *EndCatchFn; - llvm::Value *RethrowFn; + llvm::FunctionCallee EndCatchFn; + llvm::FunctionCallee RethrowFn; llvm::Value *SavedExnVar; PerformFinally(const Stmt *Body, llvm::Value *ForEHVar, - llvm::Value *EndCatchFn, - llvm::Value *RethrowFn, llvm::Value *SavedExnVar) - : Body(Body), ForEHVar(ForEHVar), EndCatchFn(EndCatchFn), - RethrowFn(RethrowFn), SavedExnVar(SavedExnVar) {} + llvm::FunctionCallee EndCatchFn, + llvm::FunctionCallee RethrowFn, llvm::Value *SavedExnVar) + : Body(Body), ForEHVar(ForEHVar), EndCatchFn(EndCatchFn), + RethrowFn(RethrowFn), SavedExnVar(SavedExnVar) {} void Emit(CodeGenFunction &CGF, Flags flags) override { // Enter a cleanup to call the end-catch function if one was provided. @@ -1358,12 +1361,11 @@ namespace { /// Enters a finally block for an implementation using zero-cost /// exceptions. This is mostly general, but hard-codes some /// language/ABI-specific behavior in the catch-all sections. -void CodeGenFunction::FinallyInfo::enter(CodeGenFunction &CGF, - const Stmt *body, - llvm::Constant *beginCatchFn, - llvm::Constant *endCatchFn, - llvm::Constant *rethrowFn) { - assert((beginCatchFn != nullptr) == (endCatchFn != nullptr) && +void CodeGenFunction::FinallyInfo::enter(CodeGenFunction &CGF, const Stmt *body, + llvm::FunctionCallee beginCatchFn, + llvm::FunctionCallee endCatchFn, + llvm::FunctionCallee rethrowFn) { + assert((!!beginCatchFn) == (!!endCatchFn) && "begin/end catch functions not paired"); assert(rethrowFn && "rethrow function is required"); @@ -1375,9 +1377,7 @@ void CodeGenFunction::FinallyInfo::enter(CodeGenFunction &CGF, // In the latter case we need to pass it the exception object. // But we can't use the exception slot because the @finally might // have a landing pad (which would overwrite the exception slot). - llvm::FunctionType *rethrowFnTy = - cast( - cast(rethrowFn->getType())->getElementType()); + llvm::FunctionType *rethrowFnTy = rethrowFn.getFunctionType(); SavedExnVar = nullptr; if (rethrowFnTy->getNumParams()) SavedExnVar = CGF.CreateTempAlloca(CGF.Int8PtrTy, "finally.exn"); diff --git a/clang/lib/CodeGen/CGExpr.cpp b/clang/lib/CodeGen/CGExpr.cpp index 77be915a8444f..6b559455fde30 100644 --- a/clang/lib/CodeGen/CGExpr.cpp +++ b/clang/lib/CodeGen/CGExpr.cpp @@ -330,7 +330,7 @@ pushTemporaryCleanup(CodeGenFunction &CGF, const MaterializeTemporaryExpr *M, switch (M->getStorageDuration()) { case SD_Static: case SD_Thread: { - llvm::Constant *CleanupFn; + llvm::FunctionCallee CleanupFn; llvm::Constant *CleanupArg; if (E->getType()->isArrayType()) { CleanupFn = CodeGenFunction(CGF.CGM).generateDestroyHelper( @@ -339,8 +339,8 @@ pushTemporaryCleanup(CodeGenFunction &CGF, const MaterializeTemporaryExpr *M, dyn_cast_or_null(M->getExtendingDecl())); CleanupArg = llvm::Constant::getNullValue(CGF.Int8PtrTy); } else { - CleanupFn = CGF.CGM.getAddrOfCXXStructor(ReferenceTemporaryDtor, - StructorType::Complete); + CleanupFn = CGF.CGM.getAddrAndTypeOfCXXStructor(ReferenceTemporaryDtor, + StructorType::Complete); CleanupArg = cast(ReferenceTemporary.getPointer()); } CGF.CGM.getCXXABI().registerGlobalDtor( @@ -1884,7 +1884,6 @@ Address CodeGenFunction::EmitExtVectorElementLValue(LValue LV) { Address VectorBasePtrPlusIx = Builder.CreateConstInBoundsGEP(CastToPointerElement, ix, - getContext().getTypeSizeInChars(EQT), "vector.elt"); return VectorBasePtrPlusIx; @@ -2856,16 +2855,13 @@ enum class CheckRecoverableKind { } static CheckRecoverableKind getRecoverableKind(SanitizerMask Kind) { - assert(llvm::countPopulation(Kind) == 1); - switch (Kind) { - case SanitizerKind::Vptr: + assert(Kind.countPopulation() == 1); + if (Kind == SanitizerKind::Vptr) return CheckRecoverableKind::AlwaysRecoverable; - case SanitizerKind::Return: - case SanitizerKind::Unreachable: + else if (Kind == SanitizerKind::Return || Kind == SanitizerKind::Unreachable) return CheckRecoverableKind::Unrecoverable; - default: + else return CheckRecoverableKind::Recoverable; - } } namespace { @@ -2915,7 +2911,7 @@ static void emitCheckHandlerCall(CodeGenFunction &CGF, } B.addAttribute(llvm::Attribute::UWTable); - llvm::Value *Fn = CGF.CGM.CreateRuntimeFunction( + llvm::FunctionCallee Fn = CGF.CGM.CreateRuntimeFunction( FnType, FnName, llvm::AttributeList::get(CGF.getLLVMContext(), llvm::AttributeList::FunctionIndex, B), @@ -3258,7 +3254,7 @@ Address CodeGenFunction::EmitArrayToPointerDecay(const Expr *E, if (!E->getType()->isVariableArrayType()) { assert(isa(Addr.getElementType()) && "Expected pointer to array"); - Addr = Builder.CreateStructGEP(Addr, 0, CharUnits::Zero(), "arraydecay"); + Addr = Builder.CreateConstArrayGEP(Addr, 0, "arraydecay"); } // The result of this decay conversion points to an array element within the @@ -3535,8 +3531,7 @@ static Address emitOMPArraySectionBase(CodeGenFunction &CGF, const Expr *Base, if (!BaseTy->isVariableArrayType()) { assert(isa(Addr.getElementType()) && "Expected pointer to array"); - Addr = CGF.Builder.CreateStructGEP(Addr, 0, CharUnits::Zero(), - "arraydecay"); + Addr = CGF.Builder.CreateConstArrayGEP(Addr, 0, "arraydecay"); } return CGF.Builder.CreateElementBitCast(Addr, @@ -3825,20 +3820,7 @@ static Address emitAddrOfFieldStorage(CodeGenFunction &CGF, Address base, unsigned idx = CGF.CGM.getTypes().getCGRecordLayout(rec).getLLVMFieldNo(field); - CharUnits offset; - // Adjust the alignment down to the given offset. - // As a special case, if the LLVM field index is 0, we know that this - // is zero. - assert((idx != 0 || CGF.getContext().getASTRecordLayout(rec) - .getFieldOffset(field->getFieldIndex()) == 0) && - "LLVM field at index zero had non-zero offset?"); - if (idx != 0) { - auto &recLayout = CGF.getContext().getASTRecordLayout(rec); - auto offsetInBits = recLayout.getFieldOffset(field->getFieldIndex()); - offset = CGF.getContext().toCharUnitsFromBits(offsetInBits); - } - - return CGF.Builder.CreateStructGEP(base, idx, offset, field->getName()); + return CGF.Builder.CreateStructGEP(base, idx, field->getName()); } static bool hasAnyVptr(const QualType Type, const ASTContext &Context) { @@ -3872,8 +3854,7 @@ LValue CodeGenFunction::EmitLValueForField(LValue base, unsigned Idx = RL.getLLVMFieldNo(field); if (Idx != 0) // For structs, we GEP to the field that the record layout suggests. - Addr = Builder.CreateStructGEP(Addr, Idx, Info.StorageOffset, - field->getName()); + Addr = Builder.CreateStructGEP(Addr, Idx, field->getName()); // Get the access type. llvm::Type *FieldIntTy = llvm::Type::getIntNTy(getLLVMContext(), Info.StorageSize); @@ -3977,6 +3958,14 @@ LValue CodeGenFunction::EmitLValueForField(LValue base, if (field->hasAttr()) addr = EmitFieldAnnotations(field, addr); + // Emit attribute annotation for a field. + if (getLangOpts().SYCLIsDevice) { + SmallString<256> AnnotStr; + CGM.generateIntelFPGAAnnotation(field, AnnotStr); + if (!AnnotStr.empty()) + addr = EmitIntelFPGAFieldAnnotations(field, addr, AnnotStr); + } + LValue LV = MakeAddrLValue(addr, FieldType, FieldBaseInfo, FieldTBAAInfo); LV.getQuals().addCVRQualifiers(RecordCVR); @@ -4181,6 +4170,8 @@ LValue CodeGenFunction::EmitCastLValue(const CastExpr *E) { case CK_IntToOCLSampler: case CK_FixedPointCast: case CK_FixedPointToBoolean: + case CK_FixedPointToIntegral: + case CK_IntegralToFixedPoint: return EmitUnsupportedLValue(E, "unexpected cast lvalue"); case CK_Dependent: diff --git a/clang/lib/CodeGen/CGExprAgg.cpp b/clang/lib/CodeGen/CGExprAgg.cpp index ae34b3d11bb21..161d6ed34eb23 100644 --- a/clang/lib/CodeGen/CGExprAgg.cpp +++ b/clang/lib/CodeGen/CGExprAgg.cpp @@ -759,8 +759,7 @@ void AggExprEmitter::VisitCastExpr(CastExpr *E) { // Build a GEP to refer to the subobject. Address valueAddr = - CGF.Builder.CreateStructGEP(valueDest.getAddress(), 0, - CharUnits()); + CGF.Builder.CreateStructGEP(valueDest.getAddress(), 0); valueDest = AggValueSlot::forAddr(valueAddr, valueDest.getQualifiers(), valueDest.isExternallyDestructed(), @@ -780,8 +779,7 @@ void AggExprEmitter::VisitCastExpr(CastExpr *E) { CGF.CreateAggTemp(atomicType, "atomic-to-nonatomic.temp"); CGF.EmitAggExpr(E->getSubExpr(), atomicSlot); - Address valueAddr = - Builder.CreateStructGEP(atomicSlot.getAddress(), 0, CharUnits()); + Address valueAddr = Builder.CreateStructGEP(atomicSlot.getAddress(), 0); RValue rvalue = RValue::getAggregate(valueAddr, atomicSlot.isVolatile()); return EmitFinalDestCopy(valueType, rvalue); } @@ -855,6 +853,8 @@ void AggExprEmitter::VisitCastExpr(CastExpr *E) { case CK_IntToOCLSampler: case CK_FixedPointCast: case CK_FixedPointToBoolean: + case CK_FixedPointToIntegral: + case CK_IntegralToFixedPoint: llvm_unreachable("cast kind invalid for aggregate types"); } } diff --git a/clang/lib/CodeGen/CGExprCXX.cpp b/clang/lib/CodeGen/CGExprCXX.cpp index 86ec18dbe2a41..e5cc22a119637 100644 --- a/clang/lib/CodeGen/CGExprCXX.cpp +++ b/clang/lib/CodeGen/CGExprCXX.cpp @@ -40,13 +40,11 @@ commonEmitCXXMemberOrOperatorCall(CodeGenFunction &CGF, const CXXMethodDecl *MD, isa(CE)); assert(MD->isInstance() && "Trying to emit a member or operator call expr on a static method!"); - ASTContext &C = CGF.getContext(); // Push the this ptr. const CXXRecordDecl *RD = CGF.CGM.getCXXABI().getThisArgumentTypeForMethod(MD); - Args.add(RValue::get(This), - RD ? C.getPointerType(C.getTypeDeclType(RD)) : C.VoidPtrTy); + Args.add(RValue::get(This), CGF.getTypes().DeriveThisType(RD, MD)); // If there is an implicit parameter (e.g. VTT), emit it. if (ImplicitParam) { @@ -251,13 +249,25 @@ RValue CodeGenFunction::EmitCXXMemberOrOperatorMemberCallExpr( This = EmitLValue(Base); } + if (const CXXConstructorDecl *Ctor = dyn_cast(MD)) { + // This is the MSVC p->Ctor::Ctor(...) extension. We assume that's + // constructing a new complete object of type Ctor. + assert(!RtlArgs); + assert(ReturnValue.isNull() && "Constructor shouldn't have return value"); + CallArgList Args; + commonEmitCXXMemberOrOperatorCall( + *this, Ctor, This.getPointer(), /*ImplicitParam=*/nullptr, + /*ImplicitParamTy=*/QualType(), CE, Args, nullptr); + + EmitCXXConstructorCall(Ctor, Ctor_Complete, /*ForVirtualBase=*/false, + /*Delegating=*/false, This.getAddress(), Args, + AggValueSlot::DoesNotOverlap, CE->getExprLoc(), + /*NewPointerIsChecked=*/false); + return RValue::get(nullptr); + } if (MD->isTrivial() || (MD->isDefaulted() && MD->getParent()->isUnion())) { if (isa(MD)) return RValue::get(nullptr); - if (isa(MD) && - cast(MD)->isDefaultConstructor()) - return RValue::get(nullptr); - if (!MD->getParent()->mayInsertExtraPadding()) { if (MD->isCopyAssignmentOperator() || MD->isMoveAssignmentOperator()) { // We don't like to generate the trivial copy/move assignment operator @@ -270,20 +280,6 @@ RValue CodeGenFunction::EmitCXXMemberOrOperatorMemberCallExpr( EmitAggregateAssign(This, RHS, CE->getType()); return RValue::get(This.getPointer()); } - - if (isa(MD) && - cast(MD)->isCopyOrMoveConstructor()) { - // Trivial move and copy ctor are the same. - assert(CE->getNumArgs() == 1 && "unexpected argcount for trivial ctor"); - const Expr *Arg = *CE->arg_begin(); - LValue RHS = EmitLValue(Arg); - LValue Dest = MakeAddrLValue(This.getAddress(), Arg->getType()); - // This is the MSVC p->Ctor::Ctor(...) extension. We assume that's - // constructing a new complete object of type Ctor. - EmitAggregateCopy(Dest, RHS, Arg->getType(), - AggValueSlot::DoesNotOverlap); - return RValue::get(This.getPointer()); - } llvm_unreachable("unknown trivial member function"); } } @@ -295,9 +291,6 @@ RValue CodeGenFunction::EmitCXXMemberOrOperatorMemberCallExpr( if (const auto *Dtor = dyn_cast(CalleeDecl)) FInfo = &CGM.getTypes().arrangeCXXStructorDeclaration( Dtor, StructorType::Complete); - else if (const auto *Ctor = dyn_cast(CalleeDecl)) - FInfo = &CGM.getTypes().arrangeCXXStructorDeclaration( - Ctor, StructorType::Complete); else FInfo = &CGM.getTypes().arrangeCXXMethodDeclaration(CalleeDecl); @@ -320,14 +313,9 @@ RValue CodeGenFunction::EmitCXXMemberOrOperatorMemberCallExpr( if (IsImplicitObjectCXXThis || isa(IOA)) SkippedChecks.set(SanitizerKind::Null, true); } - EmitTypeCheck( - isa(CalleeDecl) ? CodeGenFunction::TCK_ConstructorCall - : CodeGenFunction::TCK_MemberCall, - CallLoc, This.getPointer(), C.getRecordType(CalleeDecl->getParent()), - /*Alignment=*/CharUnits::Zero(), SkippedChecks); - - // FIXME: Uses of 'MD' past this point need to be audited. We may need to use - // 'CalleeDecl' instead. + EmitTypeCheck(CodeGenFunction::TCK_MemberCall, CallLoc, This.getPointer(), + C.getRecordType(CalleeDecl->getParent()), + /*Alignment=*/CharUnits::Zero(), SkippedChecks); // C++ [class.virtual]p12: // Explicit qualification with the scope operator (5.1) suppresses the @@ -337,7 +325,7 @@ RValue CodeGenFunction::EmitCXXMemberOrOperatorMemberCallExpr( // because then we know what the type is. bool UseVirtualCall = CanUseVirtualCall && !DevirtualizedMethod; - if (const CXXDestructorDecl *Dtor = dyn_cast(MD)) { + if (const CXXDestructorDecl *Dtor = dyn_cast(CalleeDecl)) { assert(CE->arg_begin() == CE->arg_end() && "Destructor shouldn't have explicit parameters"); assert(ReturnValue.isNull() && "Destructor shouldn't have return value"); @@ -347,32 +335,31 @@ RValue CodeGenFunction::EmitCXXMemberOrOperatorMemberCallExpr( cast(CE)); } else { CGCallee Callee; - if (getLangOpts().AppleKext && MD->isVirtual() && HasQualifier) - Callee = BuildAppleKextVirtualCall(MD, Qualifier, Ty); + if (getLangOpts().AppleKext && Dtor->isVirtual() && HasQualifier) + Callee = BuildAppleKextVirtualCall(Dtor, Qualifier, Ty); else if (!DevirtualizedMethod) Callee = CGCallee::forDirect( CGM.getAddrOfCXXStructor(Dtor, StructorType::Complete, FInfo, Ty), GlobalDecl(Dtor, Dtor_Complete)); else { - const CXXDestructorDecl *DDtor = - cast(DevirtualizedMethod); Callee = CGCallee::forDirect( - CGM.GetAddrOfFunction(GlobalDecl(DDtor, Dtor_Complete), Ty), - GlobalDecl(DDtor, Dtor_Complete)); + CGM.GetAddrOfFunction(GlobalDecl(Dtor, Dtor_Complete), Ty), + GlobalDecl(Dtor, Dtor_Complete)); } - EmitCXXMemberOrOperatorCall( - CalleeDecl, Callee, ReturnValue, This.getPointer(), - /*ImplicitParam=*/nullptr, QualType(), CE, nullptr); + + EmitCXXDestructorCall(Dtor, Callee, This.getPointer(), + /*ImplicitParam=*/nullptr, + /*ImplicitParamTy=*/QualType(), nullptr, + getFromDtorType(Dtor_Complete)); } return RValue::get(nullptr); } + // FIXME: Uses of 'MD' past this point need to be audited. We may need to use + // 'CalleeDecl' instead. + CGCallee Callee; - if (const CXXConstructorDecl *Ctor = dyn_cast(MD)) { - Callee = CGCallee::forDirect( - CGM.GetAddrOfFunction(GlobalDecl(Ctor, Ctor_Complete), Ty), - GlobalDecl(Ctor, Ctor_Complete)); - } else if (UseVirtualCall) { + if (UseVirtualCall) { Callee = CGCallee::forVirtual(CE, MD, This.getAddress(), Ty); } else { if (SanOpts.has(SanitizerKind::CFINVCall) && diff --git a/clang/lib/CodeGen/CGExprComplex.cpp b/clang/lib/CodeGen/CGExprComplex.cpp index 0e4b1e8a96452..3ae08edd5ae0e 100644 --- a/clang/lib/CodeGen/CGExprComplex.cpp +++ b/clang/lib/CodeGen/CGExprComplex.cpp @@ -327,15 +327,12 @@ class ComplexExprEmitter Address CodeGenFunction::emitAddrOfRealComponent(Address addr, QualType complexType) { - CharUnits offset = CharUnits::Zero(); - return Builder.CreateStructGEP(addr, 0, offset, addr.getName() + ".realp"); + return Builder.CreateStructGEP(addr, 0, addr.getName() + ".realp"); } Address CodeGenFunction::emitAddrOfImagComponent(Address addr, QualType complexType) { - QualType eltType = complexType->castAs()->getElementType(); - CharUnits offset = getContext().getTypeSizeInChars(eltType); - return Builder.CreateStructGEP(addr, 1, offset, addr.getName() + ".imagp"); + return Builder.CreateStructGEP(addr, 1, addr.getName() + ".imagp"); } /// EmitLoadOfLValue - Given an RValue reference for a complex, emit code to @@ -512,6 +509,8 @@ ComplexPairTy ComplexExprEmitter::EmitCast(CastKind CK, Expr *Op, case CK_IntToOCLSampler: case CK_FixedPointCast: case CK_FixedPointToBoolean: + case CK_FixedPointToIntegral: + case CK_IntegralToFixedPoint: llvm_unreachable("invalid cast kind for complex value"); case CK_FloatingRealToComplex: @@ -627,7 +626,8 @@ ComplexPairTy ComplexExprEmitter::EmitComplexBinOpLibCall(StringRef LibCallName, Args, cast(FQTy.getTypePtr()), false); llvm::FunctionType *FTy = CGF.CGM.getTypes().GetFunctionType(FuncInfo); - llvm::Constant *Func = CGF.CGM.CreateBuiltinFunction(FTy, LibCallName); + llvm::FunctionCallee Func = CGF.CGM.CreateRuntimeFunction( + FTy, LibCallName, llvm::AttributeList(), true); CGCallee Callee = CGCallee::forDirect(Func, FQTy->getAs()); llvm::CallBase *Call; diff --git a/clang/lib/CodeGen/CGExprConstant.cpp b/clang/lib/CodeGen/CGExprConstant.cpp index 48ab2522e83f2..64ad582c58111 100644 --- a/clang/lib/CodeGen/CGExprConstant.cpp +++ b/clang/lib/CodeGen/CGExprConstant.cpp @@ -700,10 +700,12 @@ EmitArrayConstant(CodeGenModule &CGM, const ConstantArrayType *DestType, return llvm::ConstantStruct::get(SType, Elements); } -/// This class only needs to handle two cases: -/// 1) Literals (this is used by APValue emission to emit literals). -/// 2) Arrays, structs and unions (outside C++11 mode, we don't currently -/// constant fold these types). +// This class only needs to handle arrays, structs and unions. Outside C++11 +// mode, we don't currently constant fold those types. All other types are +// handled by constant folding. +// +// Constant folding is currently missing support for a few features supported +// here: CK_ToUnion, CK_ReinterpretMemberPointer, and DesignatedInitUpdateExpr. class ConstExprEmitter : public StmtVisitor { CodeGenModule &CGM; @@ -874,6 +876,8 @@ class ConstExprEmitter : case CK_FloatingCast: case CK_FixedPointCast: case CK_FixedPointToBoolean: + case CK_FixedPointToIntegral: + case CK_IntegralToFixedPoint: case CK_ZeroToOCLOpaqueType: return nullptr; } @@ -1076,6 +1080,7 @@ class ConstExprEmitter : } llvm::Constant *VisitStringLiteral(StringLiteral *E, QualType T) { + // This is a string literal initializing an array in an initializer. return CGM.GetConstantArrayFromStringLiteral(E); } @@ -1649,17 +1654,7 @@ class ConstantLValueEmitter : public ConstStmtVisitorisArrayType()) { - assert(!hasNonZeroOffset() && "offset on array initializer"); - auto expr = const_cast(base.get()); - return ConstExprEmitter(Emitter).Visit(expr, DestType); - } - - // Otherwise, the destination type should be a pointer or reference + // The destination type should be a pointer or reference // type, but it might also be a cast thereof. // // FIXME: the chain of casts required should be reflected in the APValue. diff --git a/clang/lib/CodeGen/CGExprScalar.cpp b/clang/lib/CodeGen/CGExprScalar.cpp index 29d153b7278d5..83e9349492a0e 100644 --- a/clang/lib/CodeGen/CGExprScalar.cpp +++ b/clang/lib/CodeGen/CGExprScalar.cpp @@ -125,11 +125,19 @@ struct BinOpInfo { return true; } - /// Check if either operand is a fixed point type, in which case, this + /// Check if either operand is a fixed point type or integer type, with at + /// least one being a fixed point type. In any case, this /// operation did not follow usual arithmetic conversion and both operands may /// not be the same. bool isFixedPointBinOp() const { - return isa(E) && Ty->isFixedPointType(); + // We cannot simply check the result type since comparison operations return + // an int. + if (const auto *BinOp = dyn_cast(E)) { + QualType LHSType = BinOp->getLHS()->getType(); + QualType RHSType = BinOp->getRHS()->getType(); + return LHSType->isFixedPointType() || RHSType->isFixedPointType(); + } + return false; } }; @@ -355,11 +363,14 @@ class ScalarExprEmitter SourceLocation Loc, ScalarConversionOpts Opts = ScalarConversionOpts()); + /// Convert between either a fixed point and other fixed point or fixed point + /// and an integer. Value *EmitFixedPointConversion(Value *Src, QualType SrcTy, QualType DstTy, SourceLocation Loc); Value *EmitFixedPointConversion(Value *Src, FixedPointSemantics &SrcFixedSema, FixedPointSemantics &DstFixedSema, - SourceLocation Loc); + SourceLocation Loc, + bool DstIsInteger = false); /// Emit a conversion from the specified complex type to the specified /// destination type, where the destination type is an LLVM scalar type. @@ -1217,17 +1228,25 @@ Value *ScalarExprEmitter::EmitScalarConversion(Value *Src, QualType SrcType, // TODO(leonardchan): When necessary, add another if statement checking for // conversions to fixed point types from other types. if (SrcType->isFixedPointType()) { - if (DstType->isFixedPointType()) { - return EmitFixedPointConversion(Src, SrcType, DstType, Loc); - } else if (DstType->isBooleanType()) { + if (DstType->isBooleanType()) + // It is important that we check this before checking if the dest type is + // an integer because booleans are technically integer types. // We do not need to check the padding bit on unsigned types if unsigned // padding is enabled because overflow into this bit is undefined // behavior. return Builder.CreateIsNotNull(Src, "tobool"); - } + if (DstType->isFixedPointType() || DstType->isIntegerType()) + return EmitFixedPointConversion(Src, SrcType, DstType, Loc); llvm_unreachable( - "Unhandled scalar conversion involving a fixed point type."); + "Unhandled scalar conversion from a fixed point type to another type."); + } else if (DstType->isFixedPointType()) { + if (SrcType->isIntegerType()) + // This also includes converting booleans and enums to fixed point types. + return EmitFixedPointConversion(Src, SrcType, DstType, Loc); + + llvm_unreachable( + "Unhandled scalar conversion to a fixed point type from another type."); } QualType NoncanonicalSrcType = SrcType; @@ -1435,19 +1454,17 @@ Value *ScalarExprEmitter::EmitScalarConversion(Value *Src, QualType SrcType, Value *ScalarExprEmitter::EmitFixedPointConversion(Value *Src, QualType SrcTy, QualType DstTy, SourceLocation Loc) { - assert(SrcTy->isFixedPointType()); - assert(DstTy->isFixedPointType()); - FixedPointSemantics SrcFPSema = CGF.getContext().getFixedPointSemantics(SrcTy); FixedPointSemantics DstFPSema = CGF.getContext().getFixedPointSemantics(DstTy); - return EmitFixedPointConversion(Src, SrcFPSema, DstFPSema, Loc); + return EmitFixedPointConversion(Src, SrcFPSema, DstFPSema, Loc, + DstTy->isIntegerType()); } Value *ScalarExprEmitter::EmitFixedPointConversion( Value *Src, FixedPointSemantics &SrcFPSema, FixedPointSemantics &DstFPSema, - SourceLocation Loc) { + SourceLocation Loc, bool DstIsInteger) { using llvm::APInt; using llvm::ConstantInt; using llvm::Value; @@ -1464,13 +1481,26 @@ Value *ScalarExprEmitter::EmitFixedPointConversion( Value *Result = Src; unsigned ResultWidth = SrcWidth; - if (!DstFPSema.isSaturated()) { - // Downscale. - if (DstScale < SrcScale) - Result = SrcIsSigned ? - Builder.CreateAShr(Result, SrcScale - DstScale, "downscale") : - Builder.CreateLShr(Result, SrcScale - DstScale, "downscale"); + // Downscale. + if (DstScale < SrcScale) { + // When converting to integers, we round towards zero. For negative numbers, + // right shifting rounds towards negative infinity. In this case, we can + // just round up before shifting. + if (DstIsInteger && SrcIsSigned) { + Value *Zero = llvm::Constant::getNullValue(Result->getType()); + Value *IsNegative = Builder.CreateICmpSLT(Result, Zero); + Value *LowBits = ConstantInt::get( + CGF.getLLVMContext(), APInt::getLowBitsSet(ResultWidth, SrcScale)); + Value *Rounded = Builder.CreateAdd(Result, LowBits); + Result = Builder.CreateSelect(IsNegative, Rounded, Result); + } + + Result = SrcIsSigned + ? Builder.CreateAShr(Result, SrcScale - DstScale, "downscale") + : Builder.CreateLShr(Result, SrcScale - DstScale, "downscale"); + } + if (!DstFPSema.isSaturated()) { // Resize. Result = Builder.CreateIntCast(Result, DstIntTy, SrcIsSigned, "resize"); @@ -1485,10 +1515,6 @@ Value *ScalarExprEmitter::EmitFixedPointConversion( llvm::Type *UpscaledTy = Builder.getIntNTy(ResultWidth); Result = Builder.CreateIntCast(Result, UpscaledTy, SrcIsSigned, "resize"); Result = Builder.CreateShl(Result, DstScale - SrcScale, "upscale"); - } else if (DstScale < SrcScale) { - Result = SrcIsSigned ? - Builder.CreateAShr(Result, SrcScale - DstScale, "downscale") : - Builder.CreateLShr(Result, SrcScale - DstScale, "downscale"); } // Handle saturation. @@ -2220,6 +2246,21 @@ Value *ScalarExprEmitter::VisitCastExpr(CastExpr *CE) { return EmitScalarConversion(Visit(E), E->getType(), DestTy, CE->getExprLoc()); + case CK_FixedPointToIntegral: + assert(E->getType()->isFixedPointType() && + "Expected src type to be fixed point type"); + assert(DestTy->isIntegerType() && "Expected dest type to be an integer"); + return EmitScalarConversion(Visit(E), E->getType(), DestTy, + CE->getExprLoc()); + + case CK_IntegralToFixedPoint: + assert(E->getType()->isIntegerType() && + "Expected src type to be an integer"); + assert(DestTy->isFixedPointType() && + "Expected dest type to be fixed point type"); + return EmitScalarConversion(Visit(E), E->getType(), DestTy, + CE->getExprLoc()); + case CK_IntegralCast: { ScalarConversionOpts Opts; if (auto *ICE = dyn_cast(CE)) { @@ -2547,14 +2588,14 @@ ScalarExprEmitter::EmitScalarPrePostIncDec(const UnaryOperator *E, LValue LV, } if (atomicPHI) { - llvm::BasicBlock *opBB = Builder.GetInsertBlock(); + llvm::BasicBlock *curBlock = Builder.GetInsertBlock(); llvm::BasicBlock *contBB = CGF.createBasicBlock("atomic_cont", CGF.CurFn); auto Pair = CGF.EmitAtomicCompareExchange( LV, RValue::get(atomicPHI), RValue::get(value), E->getExprLoc()); llvm::Value *old = CGF.EmitToMemory(Pair.first.getScalarVal(), type); llvm::Value *success = Pair.second; - atomicPHI->addIncoming(old, opBB); - Builder.CreateCondBr(success, contBB, opBB); + atomicPHI->addIncoming(old, curBlock); + Builder.CreateCondBr(success, contBB, atomicPHI->getParent()); Builder.SetInsertPoint(contBB); return isPre ? value : input; } @@ -2901,14 +2942,14 @@ LValue ScalarExprEmitter::EmitCompoundAssignLValue( Loc, ScalarConversionOpts(CGF.SanOpts)); if (atomicPHI) { - llvm::BasicBlock *opBB = Builder.GetInsertBlock(); + llvm::BasicBlock *curBlock = Builder.GetInsertBlock(); llvm::BasicBlock *contBB = CGF.createBasicBlock("atomic_cont", CGF.CurFn); auto Pair = CGF.EmitAtomicCompareExchange( LHSLV, RValue::get(atomicPHI), RValue::get(Result), E->getExprLoc()); llvm::Value *old = CGF.EmitToMemory(Pair.first.getScalarVal(), LHSTy); llvm::Value *success = Pair.second; - atomicPHI->addIncoming(old, opBB); - Builder.CreateCondBr(success, contBB, opBB); + atomicPHI->addIncoming(old, curBlock); + Builder.CreateCondBr(success, contBB, atomicPHI->getParent()); Builder.SetInsertPoint(contBB); return LHSLV; } @@ -3110,7 +3151,8 @@ Value *ScalarExprEmitter::EmitOverflowCheckedBinOp(const BinOpInfo &Ops) { llvm::Type *argTypes[] = { CGF.Int64Ty, CGF.Int64Ty, Int8Ty, Int8Ty }; llvm::FunctionType *handlerTy = llvm::FunctionType::get(CGF.Int64Ty, argTypes, true); - llvm::Value *handler = CGF.CGM.CreateRuntimeFunction(handlerTy, *handlerName); + llvm::FunctionCallee handler = + CGF.CGM.CreateRuntimeFunction(handlerTy, *handlerName); // Sign extend the args to 64-bit, so that we can use the same handler for // all types of overflow. @@ -3371,8 +3413,6 @@ Value *ScalarExprEmitter::EmitFixedPointBinOp(const BinOpInfo &op) { using llvm::ConstantInt; const auto *BinOp = cast(op.E); - assert((BinOp->getOpcode() == BO_Add || BinOp->getOpcode() == BO_Sub) && - "Expected operation to be addition or subtraction"); // The result is a fixed point type and at least one of the operands is fixed // point while the other is either fixed point or an int. This resulting type @@ -3420,17 +3460,30 @@ Value *ScalarExprEmitter::EmitFixedPointBinOp(const BinOpInfo &op) { } break; } - case BO_Mul: - case BO_Div: - case BO_Shl: - case BO_Shr: - case BO_Cmp: case BO_LT: + return CommonFixedSema.isSigned() ? Builder.CreateICmpSLT(FullLHS, FullRHS) + : Builder.CreateICmpULT(FullLHS, FullRHS); case BO_GT: + return CommonFixedSema.isSigned() ? Builder.CreateICmpSGT(FullLHS, FullRHS) + : Builder.CreateICmpUGT(FullLHS, FullRHS); case BO_LE: + return CommonFixedSema.isSigned() ? Builder.CreateICmpSLE(FullLHS, FullRHS) + : Builder.CreateICmpULE(FullLHS, FullRHS); case BO_GE: + return CommonFixedSema.isSigned() ? Builder.CreateICmpSGE(FullLHS, FullRHS) + : Builder.CreateICmpUGE(FullLHS, FullRHS); case BO_EQ: + // For equality operations, we assume any padding bits on unsigned types are + // zero'd out. They could be overwritten through non-saturating operations + // that cause overflow, but this leads to undefined behavior. + return Builder.CreateICmpEQ(FullLHS, FullRHS); case BO_NE: + return Builder.CreateICmpNE(FullLHS, FullRHS); + case BO_Mul: + case BO_Div: + case BO_Shl: + case BO_Shr: + case BO_Cmp: case BO_LAnd: case BO_LOr: case BO_MulAssign: @@ -3713,8 +3766,9 @@ Value *ScalarExprEmitter::EmitCompare(const BinaryOperator *E, Result = CGF.CGM.getCXXABI().EmitMemberPointerComparison( CGF, LHS, RHS, MPT, E->getOpcode() == BO_NE); } else if (!LHSTy->isAnyComplexType() && !RHSTy->isAnyComplexType()) { - Value *LHS = Visit(E->getLHS()); - Value *RHS = Visit(E->getRHS()); + BinOpInfo BOInfo = EmitBinOps(E); + Value *LHS = BOInfo.LHS; + Value *RHS = BOInfo.RHS; // If AltiVec, the comparison results in a numeric type, so we use // intrinsics comparing vectors and giving 0 or 1 as a result @@ -3792,7 +3846,9 @@ Value *ScalarExprEmitter::EmitCompare(const BinaryOperator *E, E->getExprLoc()); } - if (LHS->getType()->isFPOrFPVectorTy()) { + if (BOInfo.isFixedPointBinOp()) { + Result = EmitFixedPointBinOp(BOInfo); + } else if (LHS->getType()->isFPOrFPVectorTy()) { Result = Builder.CreateFCmp(FCmpOpc, LHS, RHS, "cmp"); } else if (LHSTy->hasSignedIntegerRepresentation()) { Result = Builder.CreateICmp(SICmpOpc, LHS, RHS, "cmp"); diff --git a/clang/lib/CodeGen/CGNonTrivialStruct.cpp b/clang/lib/CodeGen/CGNonTrivialStruct.cpp index f7fe62bc4b0ea..a1649e4fb7b0b 100644 --- a/clang/lib/CodeGen/CGNonTrivialStruct.cpp +++ b/clang/lib/CodeGen/CGNonTrivialStruct.cpp @@ -413,8 +413,7 @@ template struct GenFuncBase { if (Offset.getQuantity() == 0) return Addr; Addr = CGF->Builder.CreateBitCast(Addr, CGF->CGM.Int8PtrTy); - Addr = CGF->Builder.CreateConstInBoundsGEP(Addr, Offset.getQuantity(), - CharUnits::One()); + Addr = CGF->Builder.CreateConstInBoundsGEP(Addr, Offset.getQuantity()); return CGF->Builder.CreateBitCast(Addr, CGF->CGM.Int8PtrPtrTy); } diff --git a/clang/lib/CodeGen/CGObjC.cpp b/clang/lib/CodeGen/CGObjC.cpp index 9a212969f4a33..7063517efc35d 100644 --- a/clang/lib/CodeGen/CGObjC.cpp +++ b/clang/lib/CodeGen/CGObjC.cpp @@ -158,9 +158,8 @@ llvm::Value *CodeGenFunction::EmitObjCCollectionLiteral(const Expr *E, if (ALE) { // Emit the element and store it to the appropriate array slot. const Expr *Rhs = ALE->getElement(i); - LValue LV = MakeAddrLValue( - Builder.CreateConstArrayGEP(Objects, i, getPointerSize()), - ElementType, AlignmentSource::Decl); + LValue LV = MakeAddrLValue(Builder.CreateConstArrayGEP(Objects, i), + ElementType, AlignmentSource::Decl); llvm::Value *value = EmitScalarExpr(Rhs); EmitStoreThroughLValue(RValue::get(value), LV, true); @@ -170,17 +169,15 @@ llvm::Value *CodeGenFunction::EmitObjCCollectionLiteral(const Expr *E, } else { // Emit the key and store it to the appropriate array slot. const Expr *Key = DLE->getKeyValueElement(i).Key; - LValue KeyLV = MakeAddrLValue( - Builder.CreateConstArrayGEP(Keys, i, getPointerSize()), - ElementType, AlignmentSource::Decl); + LValue KeyLV = MakeAddrLValue(Builder.CreateConstArrayGEP(Keys, i), + ElementType, AlignmentSource::Decl); llvm::Value *keyValue = EmitScalarExpr(Key); EmitStoreThroughLValue(RValue::get(keyValue), KeyLV, /*isInit=*/true); // Emit the value and store it to the appropriate array slot. const Expr *Value = DLE->getKeyValueElement(i).Value; - LValue ValueLV = MakeAddrLValue( - Builder.CreateConstArrayGEP(Objects, i, getPointerSize()), - ElementType, AlignmentSource::Decl); + LValue ValueLV = MakeAddrLValue(Builder.CreateConstArrayGEP(Objects, i), + ElementType, AlignmentSource::Decl); llvm::Value *valueValue = EmitScalarExpr(Value); EmitStoreThroughLValue(RValue::get(valueValue), ValueLV, /*isInit=*/true); if (TrackNeededObjects) { @@ -425,6 +422,41 @@ tryGenerateSpecializedMessageSend(CodeGenFunction &CGF, QualType ResultType, return None; } +/// Instead of '[[MyClass alloc] init]', try to generate +/// 'objc_alloc_init(MyClass)'. This provides a code size improvement on the +/// caller side, as well as the optimized objc_alloc. +static Optional +tryEmitSpecializedAllocInit(CodeGenFunction &CGF, const ObjCMessageExpr *OME) { + auto &Runtime = CGF.getLangOpts().ObjCRuntime; + if (!Runtime.shouldUseRuntimeFunctionForCombinedAllocInit()) + return None; + + // Match the exact pattern '[[MyClass alloc] init]'. + Selector Sel = OME->getSelector(); + if (OME->getReceiverKind() != ObjCMessageExpr::Instance || + !OME->getType()->isObjCObjectPointerType() || !Sel.isUnarySelector() || + Sel.getNameForSlot(0) != "init") + return None; + + // Okay, this is '[receiver init]', check if 'receiver' is '[cls alloc]'. + auto *SubOME = + dyn_cast(OME->getInstanceReceiver()->IgnoreParens()); + if (!SubOME) + return None; + Selector SubSel = SubOME->getSelector(); + if (SubOME->getReceiverKind() != ObjCMessageExpr::Class || + !SubOME->getType()->isObjCObjectPointerType() || + !SubSel.isUnarySelector() || SubSel.getNameForSlot(0) != "alloc") + return None; + + QualType ReceiverType = SubOME->getClassReceiver(); + const ObjCObjectType *ObjTy = ReceiverType->getAs(); + const ObjCInterfaceDecl *ID = ObjTy->getInterface(); + assert(ID && "null interface should be impossible here"); + llvm::Value *Receiver = CGF.CGM.getObjCRuntime().GetClass(CGF, ID); + return CGF.EmitObjCAllocInit(Receiver, CGF.ConvertType(OME->getType())); +} + RValue CodeGenFunction::EmitObjCMessageExpr(const ObjCMessageExpr *E, ReturnValueSlot Return) { // Only the lookup mechanism and first two arguments of the method @@ -446,6 +478,9 @@ RValue CodeGenFunction::EmitObjCMessageExpr(const ObjCMessageExpr *E, } } + if (Optional Val = tryEmitSpecializedAllocInit(*this, E)) + return AdjustObjCObjectType(*this, E->getType(), RValue::get(*Val)); + // We don't retain the receiver in delegate init calls, and this is // safe because the receiver value is always loaded from 'self', // which we zero out. We don't want to Block_copy block receivers, @@ -683,7 +718,7 @@ static void emitStructGetterCall(CodeGenFunction &CGF, ObjCIvarDecl *ivar, args.add(RValue::get(CGF.Builder.getInt1(isAtomic)), Context.BoolTy); args.add(RValue::get(CGF.Builder.getInt1(hasStrong)), Context.BoolTy); - llvm::Constant *fn = CGF.CGM.getObjCRuntime().GetGetStructFunction(); + llvm::FunctionCallee fn = CGF.CGM.getObjCRuntime().GetGetStructFunction(); CGCallee callee = CGCallee::forDirect(fn); CGF.EmitCall(CGF.getTypes().arrangeBuiltinFunctionCall(Context.VoidTy, args), callee, ReturnValueSlot(), args); @@ -947,8 +982,8 @@ static void emitCPPObjectAtomicGetterCall(CodeGenFunction &CGF, // Third argument is the helper function. args.add(RValue::get(AtomicHelperFn), CGF.getContext().VoidPtrTy); - llvm::Constant *copyCppAtomicObjectFn = - CGF.CGM.getObjCRuntime().GetCppAtomicObjectGetFunction(); + llvm::FunctionCallee copyCppAtomicObjectFn = + CGF.CGM.getObjCRuntime().GetCppAtomicObjectGetFunction(); CGCallee callee = CGCallee::forDirect(copyCppAtomicObjectFn); CGF.EmitCall( CGF.getTypes().arrangeBuiltinFunctionCall(CGF.getContext().VoidTy, args), @@ -1024,8 +1059,8 @@ CodeGenFunction::generateObjCGetterBody(const ObjCImplementationDecl *classImpl, } case PropertyImplStrategy::GetSetProperty: { - llvm::Constant *getPropertyFn = - CGM.getObjCRuntime().GetPropertyGetFunction(); + llvm::FunctionCallee getPropertyFn = + CGM.getObjCRuntime().GetPropertyGetFunction(); if (!getPropertyFn) { CGM.ErrorUnsupported(propImpl, "Obj-C getter requiring atomic copy"); return; @@ -1051,9 +1086,9 @@ CodeGenFunction::generateObjCGetterBody(const ObjCImplementationDecl *classImpl, // FIXME: We shouldn't need to get the function info here, the // runtime already should have computed it to build the function. llvm::CallBase *CallInstruction; - RValue RV = EmitCall( - getTypes().arrangeBuiltinFunctionCall(propType, args), - callee, ReturnValueSlot(), args, &CallInstruction); + RValue RV = EmitCall(getTypes().arrangeBuiltinFunctionCall( + getContext().getObjCIdType(), args), + callee, ReturnValueSlot(), args, &CallInstruction); if (llvm::CallInst *call = dyn_cast(CallInstruction)) call->setTailCall(); @@ -1168,7 +1203,7 @@ static void emitStructSetterCall(CodeGenFunction &CGF, ObjCMethodDecl *OMD, // FIXME: should this really always be false? args.add(RValue::get(CGF.Builder.getFalse()), CGF.getContext().BoolTy); - llvm::Constant *fn = CGF.CGM.getObjCRuntime().GetSetStructFunction(); + llvm::FunctionCallee fn = CGF.CGM.getObjCRuntime().GetSetStructFunction(); CGCallee callee = CGCallee::forDirect(fn); CGF.EmitCall( CGF.getTypes().arrangeBuiltinFunctionCall(CGF.getContext().VoidTy, args), @@ -1205,8 +1240,8 @@ static void emitCPPObjectAtomicSetterCall(CodeGenFunction &CGF, // Third argument is the helper function. args.add(RValue::get(AtomicHelperFn), CGF.getContext().VoidPtrTy); - llvm::Constant *fn = - CGF.CGM.getObjCRuntime().GetCppAtomicObjectSetFunction(); + llvm::FunctionCallee fn = + CGF.CGM.getObjCRuntime().GetCppAtomicObjectSetFunction(); CGCallee callee = CGCallee::forDirect(fn); CGF.EmitCall( CGF.getTypes().arrangeBuiltinFunctionCall(CGF.getContext().VoidTy, args), @@ -1300,14 +1335,13 @@ CodeGenFunction::generateObjCSetterBody(const ObjCImplementationDecl *classImpl, case PropertyImplStrategy::GetSetProperty: case PropertyImplStrategy::SetPropertyAndExpressionGet: { - llvm::Constant *setOptimizedPropertyFn = nullptr; - llvm::Constant *setPropertyFn = nullptr; + llvm::FunctionCallee setOptimizedPropertyFn = nullptr; + llvm::FunctionCallee setPropertyFn = nullptr; if (UseOptimizedSetter(CGM)) { // 10.8 and iOS 6.0 code and GC is off setOptimizedPropertyFn = - CGM.getObjCRuntime() - .GetOptimizedPropertySetFunction(strategy.isAtomic(), - strategy.isCopy()); + CGM.getObjCRuntime().GetOptimizedPropertySetFunction( + strategy.isAtomic(), strategy.isCopy()); if (!setOptimizedPropertyFn) { CGM.ErrorUnsupported(propImpl, "Obj-C optimized setter - NYI"); return; @@ -1558,8 +1592,8 @@ QualType CodeGenFunction::TypeOfSelfObject() { } void CodeGenFunction::EmitObjCForCollectionStmt(const ObjCForCollectionStmt &S){ - llvm::Constant *EnumerationMutationFnPtr = - CGM.getObjCRuntime().EnumerationMutationFunction(); + llvm::FunctionCallee EnumerationMutationFnPtr = + CGM.getObjCRuntime().EnumerationMutationFunction(); if (!EnumerationMutationFnPtr) { CGM.ErrorUnsupported(&S, "Obj-C fast enumeration for this runtime"); return; @@ -1667,8 +1701,8 @@ void CodeGenFunction::EmitObjCForCollectionStmt(const ObjCForCollectionStmt &S){ // Save the initial mutations value. This is the value at an // address that was written into the state object by // countByEnumeratingWithState:objects:count:. - Address StateMutationsPtrPtr = Builder.CreateStructGEP( - StatePtr, 2, 2 * getPointerSize(), "mutationsptr.ptr"); + Address StateMutationsPtrPtr = + Builder.CreateStructGEP(StatePtr, 2, "mutationsptr.ptr"); llvm::Value *StateMutationsPtr = Builder.CreateLoad(StateMutationsPtrPtr, "mutationsptr"); @@ -1749,8 +1783,8 @@ void CodeGenFunction::EmitObjCForCollectionStmt(const ObjCForCollectionStmt &S){ // Fetch the buffer out of the enumeration state. // TODO: this pointer should actually be invariant between // refreshes, which would help us do certain loop optimizations. - Address StateItemsPtr = Builder.CreateStructGEP( - StatePtr, 1, getPointerSize(), "stateitems.ptr"); + Address StateItemsPtr = + Builder.CreateStructGEP(StatePtr, 1, "stateitems.ptr"); llvm::Value *EnumStateItems = Builder.CreateLoad(StateItemsPtr, "stateitems"); @@ -1889,7 +1923,7 @@ llvm::Value *CodeGenFunction::EmitObjCExtendObjectLifetime(QualType type, /// Given a number of pointers, inform the optimizer that they're /// being intrinsically used up until this point in the program. void CodeGenFunction::EmitARCIntrinsicUse(ArrayRef values) { - llvm::Constant *&fn = CGM.getObjCEntrypoints().clang_arc_use; + llvm::Function *&fn = CGM.getObjCEntrypoints().clang_arc_use; if (!fn) fn = CGM.getIntrinsic(llvm::Intrinsic::objc_clang_arc_use); @@ -1898,8 +1932,7 @@ void CodeGenFunction::EmitARCIntrinsicUse(ArrayRef values) { EmitNounwindRuntimeCall(fn, values); } -static void setARCRuntimeFunctionLinkage(CodeGenModule &CGM, - llvm::Constant *RTF) { +static void setARCRuntimeFunctionLinkage(CodeGenModule &CGM, llvm::Value *RTF) { if (auto *F = dyn_cast(RTF)) { // If the target runtime doesn't naturally support ARC, emit weak // references to the runtime support library. We don't really @@ -1911,15 +1944,18 @@ static void setARCRuntimeFunctionLinkage(CodeGenModule &CGM, } } +static void setARCRuntimeFunctionLinkage(CodeGenModule &CGM, + llvm::FunctionCallee RTF) { + setARCRuntimeFunctionLinkage(CGM, RTF.getCallee()); +} + /// Perform an operation having the signature /// i8* (i8*) /// where a null input causes a no-op and returns null. -static llvm::Value *emitARCValueOperation(CodeGenFunction &CGF, - llvm::Value *value, - llvm::Type *returnType, - llvm::Constant *&fn, - llvm::Intrinsic::ID IntID, - bool isTailCall = false) { +static llvm::Value * +emitARCValueOperation(CodeGenFunction &CGF, llvm::Value *value, + llvm::Type *returnType, llvm::Function *&fn, + llvm::Intrinsic::ID IntID, bool isTailCall = false) { if (isa(value)) return value; @@ -1943,9 +1979,8 @@ static llvm::Value *emitARCValueOperation(CodeGenFunction &CGF, /// Perform an operation having the following signature: /// i8* (i8**) -static llvm::Value *emitARCLoadOperation(CodeGenFunction &CGF, - Address addr, - llvm::Constant *&fn, +static llvm::Value *emitARCLoadOperation(CodeGenFunction &CGF, Address addr, + llvm::Function *&fn, llvm::Intrinsic::ID IntID) { if (!fn) { fn = CGF.CGM.getIntrinsic(IntID); @@ -1968,10 +2003,9 @@ static llvm::Value *emitARCLoadOperation(CodeGenFunction &CGF, /// Perform an operation having the following signature: /// i8* (i8**, i8*) -static llvm::Value *emitARCStoreOperation(CodeGenFunction &CGF, - Address addr, +static llvm::Value *emitARCStoreOperation(CodeGenFunction &CGF, Address addr, llvm::Value *value, - llvm::Constant *&fn, + llvm::Function *&fn, llvm::Intrinsic::ID IntID, bool ignored) { assert(addr.getElementType() == value->getType()); @@ -1996,10 +2030,8 @@ static llvm::Value *emitARCStoreOperation(CodeGenFunction &CGF, /// Perform an operation having the following signature: /// void (i8**, i8**) -static void emitARCCopyOperation(CodeGenFunction &CGF, - Address dst, - Address src, - llvm::Constant *&fn, +static void emitARCCopyOperation(CodeGenFunction &CGF, Address dst, Address src, + llvm::Function *&fn, llvm::Intrinsic::ID IntID) { assert(dst.getType() == src.getType()); @@ -2021,9 +2053,8 @@ static void emitARCCopyOperation(CodeGenFunction &CGF, static llvm::Value *emitObjCValueOperation(CodeGenFunction &CGF, llvm::Value *value, llvm::Type *returnType, - llvm::Constant *&fn, - StringRef fnName, - bool MayThrow) { + llvm::FunctionCallee &fn, + StringRef fnName, bool MayThrow) { if (isa(value)) return value; @@ -2033,7 +2064,7 @@ static llvm::Value *emitObjCValueOperation(CodeGenFunction &CGF, fn = CGF.CGM.CreateRuntimeFunction(fnType, fnName); // We have Native ARC, so set nonlazybind attribute for performance - if (llvm::Function *f = dyn_cast(fn)) + if (llvm::Function *f = dyn_cast(fn.getCallee())) if (fnName == "objc_retain") f->addFnAttr(llvm::Attribute::NonLazyBind); } @@ -2176,7 +2207,7 @@ void CodeGenFunction::EmitARCRelease(llvm::Value *value, ARCPreciseLifetime_t precise) { if (isa(value)) return; - llvm::Constant *&fn = CGM.getObjCEntrypoints().objc_release; + llvm::Function *&fn = CGM.getObjCEntrypoints().objc_release; if (!fn) { fn = CGM.getIntrinsic(llvm::Intrinsic::objc_release); setARCRuntimeFunctionLinkage(CGM, fn); @@ -2222,7 +2253,7 @@ llvm::Value *CodeGenFunction::EmitARCStoreStrongCall(Address addr, bool ignored) { assert(addr.getElementType() == value->getType()); - llvm::Constant *&fn = CGM.getObjCEntrypoints().objc_storeStrong; + llvm::Function *&fn = CGM.getObjCEntrypoints().objc_storeStrong; if (!fn) { fn = CGM.getIntrinsic(llvm::Intrinsic::objc_storeStrong); setARCRuntimeFunctionLinkage(CGM, fn); @@ -2378,7 +2409,7 @@ void CodeGenFunction::EmitARCInitWeak(Address addr, llvm::Value *value) { /// void \@objc_destroyWeak(i8** %addr) /// Essentially objc_storeWeak(addr, nil). void CodeGenFunction::EmitARCDestroyWeak(Address addr) { - llvm::Constant *&fn = CGM.getObjCEntrypoints().objc_destroyWeak; + llvm::Function *&fn = CGM.getObjCEntrypoints().objc_destroyWeak; if (!fn) { fn = CGM.getIntrinsic(llvm::Intrinsic::objc_destroyWeak); setARCRuntimeFunctionLinkage(CGM, fn); @@ -2426,7 +2457,7 @@ void CodeGenFunction::emitARCMoveAssignWeak(QualType Ty, Address DstAddr, /// Produce the code to do a objc_autoreleasepool_push. /// call i8* \@objc_autoreleasePoolPush(void) llvm::Value *CodeGenFunction::EmitObjCAutoreleasePoolPush() { - llvm::Constant *&fn = CGM.getObjCEntrypoints().objc_autoreleasePoolPush; + llvm::Function *&fn = CGM.getObjCEntrypoints().objc_autoreleasePoolPush; if (!fn) { fn = CGM.getIntrinsic(llvm::Intrinsic::objc_autoreleasePoolPush); setARCRuntimeFunctionLinkage(CGM, fn); @@ -2442,8 +2473,8 @@ void CodeGenFunction::EmitObjCAutoreleasePoolPop(llvm::Value *value) { if (getInvokeDest()) { // Call the runtime method not the intrinsic if we are handling exceptions - llvm::Constant *&fn = - CGM.getObjCEntrypoints().objc_autoreleasePoolPopInvoke; + llvm::FunctionCallee &fn = + CGM.getObjCEntrypoints().objc_autoreleasePoolPopInvoke; if (!fn) { llvm::FunctionType *fnType = llvm::FunctionType::get(Builder.getVoidTy(), Int8PtrTy, false); @@ -2454,7 +2485,7 @@ void CodeGenFunction::EmitObjCAutoreleasePoolPop(llvm::Value *value) { // objc_autoreleasePoolPop can throw. EmitRuntimeCallOrInvoke(fn, value); } else { - llvm::Constant *&fn = CGM.getObjCEntrypoints().objc_autoreleasePoolPop; + llvm::FunctionCallee &fn = CGM.getObjCEntrypoints().objc_autoreleasePoolPop; if (!fn) { fn = CGM.getIntrinsic(llvm::Intrinsic::objc_autoreleasePoolPop); setARCRuntimeFunctionLinkage(CGM, fn); @@ -2510,6 +2541,13 @@ llvm::Value *CodeGenFunction::EmitObjCAllocWithZone(llvm::Value *value, "objc_allocWithZone", /*MayThrow=*/true); } +llvm::Value *CodeGenFunction::EmitObjCAllocInit(llvm::Value *value, + llvm::Type *resultType) { + return emitObjCValueOperation(*this, value, resultType, + CGM.getObjCEntrypoints().objc_alloc_init, + "objc_alloc_init", /*MayThrow=*/true); +} + /// Produce the code to do a primitive release. /// [tmp drain]; void CodeGenFunction::EmitObjCMRRAutoreleasePoolPop(llvm::Value *Arg) { @@ -2570,17 +2608,16 @@ void CodeGenFunction::EmitObjCRelease(llvm::Value *value, ARCPreciseLifetime_t precise) { if (isa(value)) return; - llvm::Constant *&fn = CGM.getObjCEntrypoints().objc_release; + llvm::FunctionCallee &fn = + CGM.getObjCEntrypoints().objc_releaseRuntimeFunction; if (!fn) { - if (!fn) { - llvm::FunctionType *fnType = + llvm::FunctionType *fnType = llvm::FunctionType::get(Builder.getVoidTy(), Int8PtrTy, false); - fn = CGM.CreateRuntimeFunction(fnType, "objc_release"); - setARCRuntimeFunctionLinkage(CGM, fn); - // We have Native ARC, so set nonlazybind attribute for performance - if (llvm::Function *f = dyn_cast(fn)) - f->addFnAttr(llvm::Attribute::NonLazyBind); - } + fn = CGM.CreateRuntimeFunction(fnType, "objc_release"); + setARCRuntimeFunctionLinkage(CGM, fn); + // We have Native ARC, so set nonlazybind attribute for performance + if (llvm::Function *f = dyn_cast(fn.getCallee())) + f->addFnAttr(llvm::Attribute::NonLazyBind); } // Cast the argument to 'id'. @@ -2834,6 +2871,7 @@ template class ARCExprEmitter { Result visit(const Expr *e); Result visitCastExpr(const CastExpr *e); Result visitPseudoObjectExpr(const PseudoObjectExpr *e); + Result visitBlockExpr(const BlockExpr *e); Result visitBinaryOperator(const BinaryOperator *e); Result visitBinAssign(const BinaryOperator *e); Result visitBinAssignUnsafeUnretained(const BinaryOperator *e); @@ -2909,6 +2947,12 @@ ARCExprEmitter::visitPseudoObjectExpr(const PseudoObjectExpr *E) { return result; } +template +Result ARCExprEmitter::visitBlockExpr(const BlockExpr *e) { + // The default implementation just forwards the expression to visitExpr. + return asImpl().visitExpr(e); +} + template Result ARCExprEmitter::visitCastExpr(const CastExpr *e) { switch (e->getCastKind()) { @@ -3052,7 +3096,8 @@ Result ARCExprEmitter::visit(const Expr *e) { // Look through pseudo-object expressions. } else if (const PseudoObjectExpr *pseudo = dyn_cast(e)) { return asImpl().visitPseudoObjectExpr(pseudo); - } + } else if (auto *be = dyn_cast(e)) + return asImpl().visitBlockExpr(be); return asImpl().visitExpr(e); } @@ -3087,6 +3132,15 @@ struct ARCRetainExprEmitter : return TryEmitResult(result, true); } + TryEmitResult visitBlockExpr(const BlockExpr *e) { + TryEmitResult result = visitExpr(e); + // Avoid the block-retain if this is a block literal that doesn't need to be + // copied to the heap. + if (e->getBlockDecl()->canAvoidCopyToHeap()) + result.setInt(true); + return result; + } + /// Block extends are net +0. Naively, we could just recurse on /// the subexpression, but actually we need to ensure that the /// value is copied as a block, so there's a little filter here. @@ -3389,11 +3443,10 @@ void CodeGenFunction::EmitExtendGCLifetime(llvm::Value *object) { // We just use an inline assembly. llvm::FunctionType *extenderType = llvm::FunctionType::get(VoidTy, VoidPtrTy, RequiredArgs::All); - llvm::Value *extender - = llvm::InlineAsm::get(extenderType, - /* assembly */ "", - /* constraints */ "r", - /* side effects */ true); + llvm::InlineAsm *extender = llvm::InlineAsm::get(extenderType, + /* assembly */ "", + /* constraints */ "r", + /* side effects */ true); object = Builder.CreateBitCast(object, VoidPtrTy); EmitNounwindRuntimeCall(extender, object); @@ -3652,19 +3705,25 @@ void CodeGenModule::emitAtAvailableLinkGuard() { // CoreFoundation is linked into the final binary. llvm::FunctionType *FTy = llvm::FunctionType::get(Int32Ty, {VoidPtrTy}, false); - llvm::Constant *CFFunc = + llvm::FunctionCallee CFFunc = CreateRuntimeFunction(FTy, "CFBundleGetVersionNumber"); llvm::FunctionType *CheckFTy = llvm::FunctionType::get(VoidTy, {}, false); - llvm::Function *CFLinkCheckFunc = cast(CreateBuiltinFunction( - CheckFTy, "__clang_at_available_requires_core_foundation_framework")); - CFLinkCheckFunc->setLinkage(llvm::GlobalValue::LinkOnceAnyLinkage); - CFLinkCheckFunc->setVisibility(llvm::GlobalValue::HiddenVisibility); - CodeGenFunction CGF(*this); - CGF.Builder.SetInsertPoint(CGF.createBasicBlock("", CFLinkCheckFunc)); - CGF.EmitNounwindRuntimeCall(CFFunc, llvm::Constant::getNullValue(VoidPtrTy)); - CGF.Builder.CreateUnreachable(); - addCompilerUsedGlobal(CFLinkCheckFunc); + llvm::FunctionCallee CFLinkCheckFuncRef = CreateRuntimeFunction( + CheckFTy, "__clang_at_available_requires_core_foundation_framework", + llvm::AttributeList(), /*IsLocal=*/true); + llvm::Function *CFLinkCheckFunc = + cast(CFLinkCheckFuncRef.getCallee()->stripPointerCasts()); + if (CFLinkCheckFunc->empty()) { + CFLinkCheckFunc->setLinkage(llvm::GlobalValue::LinkOnceAnyLinkage); + CFLinkCheckFunc->setVisibility(llvm::GlobalValue::HiddenVisibility); + CodeGenFunction CGF(*this); + CGF.Builder.SetInsertPoint(CGF.createBasicBlock("", CFLinkCheckFunc)); + CGF.EmitNounwindRuntimeCall(CFFunc, + llvm::Constant::getNullValue(VoidPtrTy)); + CGF.Builder.CreateUnreachable(); + addCompilerUsedGlobal(CFLinkCheckFunc); + } } CGObjCRuntime::~CGObjCRuntime() {} diff --git a/clang/lib/CodeGen/CGObjCGNU.cpp b/clang/lib/CodeGen/CGObjCGNU.cpp index 7e2ac8184352f..ccf73cbfc8903 100644 --- a/clang/lib/CodeGen/CGObjCGNU.cpp +++ b/clang/lib/CodeGen/CGObjCGNU.cpp @@ -58,7 +58,7 @@ class LazyRuntimeFunction { CodeGenModule *CGM; llvm::FunctionType *FTy; const char *FunctionName; - llvm::Constant *Function; + llvm::FunctionCallee Function; public: /// Constructor leaves this class uninitialized, because it is intended to @@ -88,7 +88,7 @@ class LazyRuntimeFunction { /// Overloaded cast operator, allows the class to be implicitly cast to an /// LLVM constant. - operator llvm::Constant *() { + operator llvm::FunctionCallee() { if (!Function) { if (!FunctionName) return nullptr; @@ -96,9 +96,6 @@ class LazyRuntimeFunction { } return Function; } - operator llvm::Function *() { - return cast((llvm::Constant *)*this); - } }; @@ -612,15 +609,15 @@ class CGObjCGNU : public CGObjCRuntime { const ObjCProtocolDecl *PD) override; void GenerateProtocol(const ObjCProtocolDecl *PD) override; llvm::Function *ModuleInitFunction() override; - llvm::Constant *GetPropertyGetFunction() override; - llvm::Constant *GetPropertySetFunction() override; - llvm::Constant *GetOptimizedPropertySetFunction(bool atomic, - bool copy) override; - llvm::Constant *GetSetStructFunction() override; - llvm::Constant *GetGetStructFunction() override; - llvm::Constant *GetCppAtomicObjectGetFunction() override; - llvm::Constant *GetCppAtomicObjectSetFunction() override; - llvm::Constant *EnumerationMutationFunction() override; + llvm::FunctionCallee GetPropertyGetFunction() override; + llvm::FunctionCallee GetPropertySetFunction() override; + llvm::FunctionCallee GetOptimizedPropertySetFunction(bool atomic, + bool copy) override; + llvm::FunctionCallee GetSetStructFunction() override; + llvm::FunctionCallee GetGetStructFunction() override; + llvm::FunctionCallee GetCppAtomicObjectGetFunction() override; + llvm::FunctionCallee GetCppAtomicObjectSetFunction() override; + llvm::FunctionCallee EnumerationMutationFunction() override; void EmitTryStmt(CodeGenFunction &CGF, const ObjCAtTryStmt &S) override; @@ -748,7 +745,7 @@ class CGObjCGNUstep : public CGObjCGNU { llvm::Value *cmd, llvm::MDNode *node, MessageSendInfo &MSI) override { CGBuilderTy &Builder = CGF.Builder; - llvm::Function *LookupFn = SlotLookupFn; + llvm::FunctionCallee LookupFn = SlotLookupFn; // Store the receiver on the stack so that we can reload it later Address ReceiverPtr = @@ -764,7 +761,8 @@ class CGObjCGNUstep : public CGObjCGNU { } // The lookup function is guaranteed not to capture the receiver pointer. - LookupFn->addParamAttr(0, llvm::Attribute::NoCapture); + if (auto *LookupFn2 = dyn_cast(LookupFn.getCallee())) + LookupFn2->addParamAttr(0, llvm::Attribute::NoCapture); llvm::Value *args[] = { EnforceType(Builder, ReceiverPtr.getPointer(), PtrToIdTy), @@ -856,7 +854,7 @@ class CGObjCGNUstep : public CGObjCGNU { PtrTy, PtrTy); } - llvm::Constant *GetCppAtomicObjectGetFunction() override { + llvm::FunctionCallee GetCppAtomicObjectGetFunction() override { // The optimised functions were added in version 1.7 of the GNUstep // runtime. assert (CGM.getLangOpts().ObjCRuntime.getVersion() >= @@ -864,7 +862,7 @@ class CGObjCGNUstep : public CGObjCGNU { return CxxAtomicObjectGetFn; } - llvm::Constant *GetCppAtomicObjectSetFunction() override { + llvm::FunctionCallee GetCppAtomicObjectSetFunction() override { // The optimised functions were added in version 1.7 of the GNUstep // runtime. assert (CGM.getLangOpts().ObjCRuntime.getVersion() >= @@ -872,8 +870,8 @@ class CGObjCGNUstep : public CGObjCGNU { return CxxAtomicObjectSetFn; } - llvm::Constant *GetOptimizedPropertySetFunction(bool atomic, - bool copy) override { + llvm::FunctionCallee GetOptimizedPropertySetFunction(bool atomic, + bool copy) override { // The optimised property functions omit the GC check, and so are not // safe to use in GC mode. The standard functions are fast in GC mode, // so there is less advantage in using them. @@ -951,7 +949,7 @@ class CGObjCGNUstep2 : public CGObjCGNUstep { Types.push_back(Arg->getType()); llvm::FunctionType *FT = llvm::FunctionType::get(B.getVoidTy(), Types, false); - llvm::Value *Fn = CGM.CreateRuntimeFunction(FT, FunctionName); + llvm::FunctionCallee Fn = CGM.CreateRuntimeFunction(FT, FunctionName); B.CreateCall(Fn, Args); } @@ -2169,9 +2167,8 @@ llvm::Value *CGObjCGNU::GetClassNamed(CodeGenFunction &CGF, if (!isWeak) EmitClassRef(Name); - llvm::Constant *ClassLookupFn = - CGM.CreateRuntimeFunction(llvm::FunctionType::get(IdTy, PtrToInt8Ty, true), - "objc_lookup_class"); + llvm::FunctionCallee ClassLookupFn = CGM.CreateRuntimeFunction( + llvm::FunctionType::get(IdTy, PtrToInt8Ty, true), "objc_lookup_class"); return CGF.EmitNounwindRuntimeCall(ClassLookupFn, ClassName); } @@ -2427,7 +2424,7 @@ CGObjCGNU::GenerateMessageSendSuper(CodeGenFunction &CGF, ReceiverClass = EnforceType(Builder, ReceiverClass, IdTy); } else { if (isCategoryImpl) { - llvm::Constant *classLookupFunction = nullptr; + llvm::FunctionCallee classLookupFunction = nullptr; if (IsClassMessage) { classLookupFunction = CGM.CreateRuntimeFunction(llvm::FunctionType::get( IdTy, PtrTy, true), "objc_get_meta_class"); @@ -2476,10 +2473,8 @@ CGObjCGNU::GenerateMessageSendSuper(CodeGenFunction &CGF, Address ObjCSuper = CGF.CreateTempAlloca(ObjCSuperTy, CGF.getPointerAlign()); - Builder.CreateStore(Receiver, - Builder.CreateStructGEP(ObjCSuper, 0, CharUnits::Zero())); - Builder.CreateStore(ReceiverClass, - Builder.CreateStructGEP(ObjCSuper, 1, CGF.getPointerSize())); + Builder.CreateStore(Receiver, Builder.CreateStructGEP(ObjCSuper, 0)); + Builder.CreateStore(ReceiverClass, Builder.CreateStructGEP(ObjCSuper, 1)); ObjCSuper = EnforceType(Builder, ObjCSuper, PtrToObjCSuperTy); @@ -2590,16 +2585,21 @@ CGObjCGNU::GenerateMessageSend(CodeGenFunction &CGF, case CodeGenOptions::Mixed: case CodeGenOptions::NonLegacy: if (CGM.ReturnTypeUsesFPRet(ResultType)) { - imp = CGM.CreateRuntimeFunction(llvm::FunctionType::get(IdTy, IdTy, true), - "objc_msgSend_fpret"); + imp = + CGM.CreateRuntimeFunction(llvm::FunctionType::get(IdTy, IdTy, true), + "objc_msgSend_fpret") + .getCallee(); } else if (CGM.ReturnTypeUsesSRet(MSI.CallInfo)) { // The actual types here don't matter - we're going to bitcast the // function anyway - imp = CGM.CreateRuntimeFunction(llvm::FunctionType::get(IdTy, IdTy, true), - "objc_msgSend_stret"); + imp = + CGM.CreateRuntimeFunction(llvm::FunctionType::get(IdTy, IdTy, true), + "objc_msgSend_stret") + .getCallee(); } else { - imp = CGM.CreateRuntimeFunction(llvm::FunctionType::get(IdTy, IdTy, true), - "objc_msgSend"); + imp = CGM.CreateRuntimeFunction( + llvm::FunctionType::get(IdTy, IdTy, true), "objc_msgSend") + .getCallee(); } } @@ -3692,7 +3692,8 @@ llvm::Function *CGObjCGNU::ModuleInitFunction() { llvm::FunctionType *FT = llvm::FunctionType::get(Builder.getVoidTy(), module->getType(), true); - llvm::Value *Register = CGM.CreateRuntimeFunction(FT, "__objc_exec_class"); + llvm::FunctionCallee Register = + CGM.CreateRuntimeFunction(FT, "__objc_exec_class"); Builder.CreateCall(Register, module); if (!ClassAliases.empty()) { @@ -3761,36 +3762,36 @@ llvm::Function *CGObjCGNU::GenerateMethod(const ObjCMethodDecl *OMD, return Method; } -llvm::Constant *CGObjCGNU::GetPropertyGetFunction() { +llvm::FunctionCallee CGObjCGNU::GetPropertyGetFunction() { return GetPropertyFn; } -llvm::Constant *CGObjCGNU::GetPropertySetFunction() { +llvm::FunctionCallee CGObjCGNU::GetPropertySetFunction() { return SetPropertyFn; } -llvm::Constant *CGObjCGNU::GetOptimizedPropertySetFunction(bool atomic, - bool copy) { +llvm::FunctionCallee CGObjCGNU::GetOptimizedPropertySetFunction(bool atomic, + bool copy) { return nullptr; } -llvm::Constant *CGObjCGNU::GetGetStructFunction() { +llvm::FunctionCallee CGObjCGNU::GetGetStructFunction() { return GetStructPropertyFn; } -llvm::Constant *CGObjCGNU::GetSetStructFunction() { +llvm::FunctionCallee CGObjCGNU::GetSetStructFunction() { return SetStructPropertyFn; } -llvm::Constant *CGObjCGNU::GetCppAtomicObjectGetFunction() { +llvm::FunctionCallee CGObjCGNU::GetCppAtomicObjectGetFunction() { return nullptr; } -llvm::Constant *CGObjCGNU::GetCppAtomicObjectSetFunction() { +llvm::FunctionCallee CGObjCGNU::GetCppAtomicObjectSetFunction() { return nullptr; } -llvm::Constant *CGObjCGNU::EnumerationMutationFunction() { +llvm::FunctionCallee CGObjCGNU::EnumerationMutationFunction() { return EnumerationMutationFn; } @@ -3857,8 +3858,7 @@ llvm::Value * CGObjCGNU::EmitObjCWeakRead(CodeGenFunction &CGF, Address AddrWeakObj) { CGBuilderTy &B = CGF.Builder; AddrWeakObj = EnforceType(B, AddrWeakObj, PtrToIdTy); - return B.CreateCall(WeakReadFn.getType(), WeakReadFn, - AddrWeakObj.getPointer()); + return B.CreateCall(WeakReadFn, AddrWeakObj.getPointer()); } void CGObjCGNU::EmitObjCWeakAssign(CodeGenFunction &CGF, @@ -3866,8 +3866,7 @@ void CGObjCGNU::EmitObjCWeakAssign(CodeGenFunction &CGF, CGBuilderTy &B = CGF.Builder; src = EnforceType(B, src, IdTy); dst = EnforceType(B, dst, PtrToIdTy); - B.CreateCall(WeakAssignFn.getType(), WeakAssignFn, - {src, dst.getPointer()}); + B.CreateCall(WeakAssignFn, {src, dst.getPointer()}); } void CGObjCGNU::EmitObjCGlobalAssign(CodeGenFunction &CGF, @@ -3878,8 +3877,7 @@ void CGObjCGNU::EmitObjCGlobalAssign(CodeGenFunction &CGF, dst = EnforceType(B, dst, PtrToIdTy); // FIXME. Add threadloca assign API assert(!threadlocal && "EmitObjCGlobalAssign - Threal Local API NYI"); - B.CreateCall(GlobalAssignFn.getType(), GlobalAssignFn, - {src, dst.getPointer()}); + B.CreateCall(GlobalAssignFn, {src, dst.getPointer()}); } void CGObjCGNU::EmitObjCIvarAssign(CodeGenFunction &CGF, @@ -3888,8 +3886,7 @@ void CGObjCGNU::EmitObjCIvarAssign(CodeGenFunction &CGF, CGBuilderTy &B = CGF.Builder; src = EnforceType(B, src, IdTy); dst = EnforceType(B, dst, IdTy); - B.CreateCall(IvarAssignFn.getType(), IvarAssignFn, - {src, dst.getPointer(), ivarOffset}); + B.CreateCall(IvarAssignFn, {src, dst.getPointer(), ivarOffset}); } void CGObjCGNU::EmitObjCStrongCastAssign(CodeGenFunction &CGF, @@ -3897,8 +3894,7 @@ void CGObjCGNU::EmitObjCStrongCastAssign(CodeGenFunction &CGF, CGBuilderTy &B = CGF.Builder; src = EnforceType(B, src, IdTy); dst = EnforceType(B, dst, PtrToIdTy); - B.CreateCall(StrongCastAssignFn.getType(), StrongCastAssignFn, - {src, dst.getPointer()}); + B.CreateCall(StrongCastAssignFn, {src, dst.getPointer()}); } void CGObjCGNU::EmitGCMemmoveCollectable(CodeGenFunction &CGF, @@ -3909,8 +3905,7 @@ void CGObjCGNU::EmitGCMemmoveCollectable(CodeGenFunction &CGF, DestPtr = EnforceType(B, DestPtr, PtrTy); SrcPtr = EnforceType(B, SrcPtr, PtrTy); - B.CreateCall(MemMoveFn.getType(), MemMoveFn, - {DestPtr.getPointer(), SrcPtr.getPointer(), Size}); + B.CreateCall(MemMoveFn, {DestPtr.getPointer(), SrcPtr.getPointer(), Size}); } llvm::GlobalVariable *CGObjCGNU::ObjCIvarOffsetVariable( diff --git a/clang/lib/CodeGen/CGObjCMac.cpp b/clang/lib/CodeGen/CGObjCMac.cpp index 20b5a86cae4a4..b045ac781a373 100644 --- a/clang/lib/CodeGen/CGObjCMac.cpp +++ b/clang/lib/CodeGen/CGObjCMac.cpp @@ -59,7 +59,7 @@ class ObjCCommonTypesHelper { /// /// The default messenger, used for sends whose ABI is unchanged from /// the all-integer/pointer case. - llvm::Constant *getMessageSendFn() const { + llvm::FunctionCallee getMessageSendFn() const { // Add the non-lazy-bind attribute, since objc_msgSend is likely to // be called a lot. llvm::Type *params[] = { ObjectPtrTy, SelectorPtrTy }; @@ -75,12 +75,11 @@ class ObjCCommonTypesHelper { /// The messenger used when the return value is an aggregate returned /// by indirect reference in the first argument, and therefore the /// self and selector parameters are shifted over by one. - llvm::Constant *getMessageSendStretFn() const { + llvm::FunctionCallee getMessageSendStretFn() const { llvm::Type *params[] = { ObjectPtrTy, SelectorPtrTy }; return CGM.CreateRuntimeFunction(llvm::FunctionType::get(CGM.VoidTy, params, true), "objc_msgSend_stret"); - } /// [double | long double] objc_msgSend_fpret(id self, SEL op, ...) @@ -88,12 +87,11 @@ class ObjCCommonTypesHelper { /// The messenger used when the return value is returned on the x87 /// floating-point stack; without a special entrypoint, the nil case /// would be unbalanced. - llvm::Constant *getMessageSendFpretFn() const { + llvm::FunctionCallee getMessageSendFpretFn() const { llvm::Type *params[] = { ObjectPtrTy, SelectorPtrTy }; return CGM.CreateRuntimeFunction(llvm::FunctionType::get(CGM.DoubleTy, params, true), "objc_msgSend_fpret"); - } /// _Complex long double objc_msgSend_fp2ret(id self, SEL op, ...) @@ -101,7 +99,7 @@ class ObjCCommonTypesHelper { /// The messenger used when the return value is returned in two values on the /// x87 floating point stack; without a special entrypoint, the nil case /// would be unbalanced. Only used on 64-bit X86. - llvm::Constant *getMessageSendFp2retFn() const { + llvm::FunctionCallee getMessageSendFp2retFn() const { llvm::Type *params[] = { ObjectPtrTy, SelectorPtrTy }; llvm::Type *longDoubleType = llvm::Type::getX86_FP80Ty(VMContext); llvm::Type *resultType = @@ -117,7 +115,7 @@ class ObjCCommonTypesHelper { /// The messenger used for super calls, which have different dispatch /// semantics. The class passed is the superclass of the current /// class. - llvm::Constant *getMessageSendSuperFn() const { + llvm::FunctionCallee getMessageSendSuperFn() const { llvm::Type *params[] = { SuperPtrTy, SelectorPtrTy }; return CGM.CreateRuntimeFunction(llvm::FunctionType::get(ObjectPtrTy, params, true), @@ -128,7 +126,7 @@ class ObjCCommonTypesHelper { /// /// A slightly different messenger used for super calls. The class /// passed is the current class. - llvm::Constant *getMessageSendSuperFn2() const { + llvm::FunctionCallee getMessageSendSuperFn2() const { llvm::Type *params[] = { SuperPtrTy, SelectorPtrTy }; return CGM.CreateRuntimeFunction(llvm::FunctionType::get(ObjectPtrTy, params, true), @@ -139,7 +137,7 @@ class ObjCCommonTypesHelper { /// SEL op, ...) /// /// The messenger used for super calls which return an aggregate indirectly. - llvm::Constant *getMessageSendSuperStretFn() const { + llvm::FunctionCallee getMessageSendSuperStretFn() const { llvm::Type *params[] = { Int8PtrTy, SuperPtrTy, SelectorPtrTy }; return CGM.CreateRuntimeFunction( llvm::FunctionType::get(CGM.VoidTy, params, true), @@ -150,19 +148,19 @@ class ObjCCommonTypesHelper { /// SEL op, ...) /// /// objc_msgSendSuper_stret with the super2 semantics. - llvm::Constant *getMessageSendSuperStretFn2() const { + llvm::FunctionCallee getMessageSendSuperStretFn2() const { llvm::Type *params[] = { Int8PtrTy, SuperPtrTy, SelectorPtrTy }; return CGM.CreateRuntimeFunction( llvm::FunctionType::get(CGM.VoidTy, params, true), "objc_msgSendSuper2_stret"); } - llvm::Constant *getMessageSendSuperFpretFn() const { + llvm::FunctionCallee getMessageSendSuperFpretFn() const { // There is no objc_msgSendSuper_fpret? How can that work? return getMessageSendSuperFn(); } - llvm::Constant *getMessageSendSuperFpretFn2() const { + llvm::FunctionCallee getMessageSendSuperFpretFn2() const { // There is no objc_msgSendSuper_fpret? How can that work? return getMessageSendSuperFn2(); } @@ -231,7 +229,7 @@ class ObjCCommonTypesHelper { /// CachePtrTy - LLVM type for struct objc_cache *. llvm::PointerType *CachePtrTy; - llvm::Constant *getGetPropertyFn() { + llvm::FunctionCallee getGetPropertyFn() { CodeGen::CodeGenTypes &Types = CGM.getTypes(); ASTContext &Ctx = CGM.getContext(); // id objc_getProperty (id, SEL, ptrdiff_t, bool) @@ -246,7 +244,7 @@ class ObjCCommonTypesHelper { return CGM.CreateRuntimeFunction(FTy, "objc_getProperty"); } - llvm::Constant *getSetPropertyFn() { + llvm::FunctionCallee getSetPropertyFn() { CodeGen::CodeGenTypes &Types = CGM.getTypes(); ASTContext &Ctx = CGM.getContext(); // void objc_setProperty (id, SEL, ptrdiff_t, id, bool, bool) @@ -265,7 +263,7 @@ class ObjCCommonTypesHelper { return CGM.CreateRuntimeFunction(FTy, "objc_setProperty"); } - llvm::Constant *getOptimizedSetPropertyFn(bool atomic, bool copy) { + llvm::FunctionCallee getOptimizedSetPropertyFn(bool atomic, bool copy) { CodeGen::CodeGenTypes &Types = CGM.getTypes(); ASTContext &Ctx = CGM.getContext(); // void objc_setProperty_atomic(id self, SEL _cmd, @@ -300,7 +298,7 @@ class ObjCCommonTypesHelper { return CGM.CreateRuntimeFunction(FTy, name); } - llvm::Constant *getCopyStructFn() { + llvm::FunctionCallee getCopyStructFn() { CodeGen::CodeGenTypes &Types = CGM.getTypes(); ASTContext &Ctx = CGM.getContext(); // void objc_copyStruct (void *, const void *, size_t, bool, bool) @@ -320,7 +318,7 @@ class ObjCCommonTypesHelper { /// void objc_copyCppObjectAtomic( /// void *dest, const void *src, /// void (*copyHelper) (void *dest, const void *source)); - llvm::Constant *getCppAtomicObjectFunction() { + llvm::FunctionCallee getCppAtomicObjectFunction() { CodeGen::CodeGenTypes &Types = CGM.getTypes(); ASTContext &Ctx = CGM.getContext(); /// void objc_copyCppObjectAtomic(void *dest, const void *src, void *helper); @@ -334,7 +332,7 @@ class ObjCCommonTypesHelper { return CGM.CreateRuntimeFunction(FTy, "objc_copyCppObjectAtomic"); } - llvm::Constant *getEnumerationMutationFn() { + llvm::FunctionCallee getEnumerationMutationFn() { CodeGen::CodeGenTypes &Types = CGM.getTypes(); ASTContext &Ctx = CGM.getContext(); // void objc_enumerationMutation (id) @@ -346,7 +344,7 @@ class ObjCCommonTypesHelper { return CGM.CreateRuntimeFunction(FTy, "objc_enumerationMutation"); } - llvm::Constant *getLookUpClassFn() { + llvm::FunctionCallee getLookUpClassFn() { CodeGen::CodeGenTypes &Types = CGM.getTypes(); ASTContext &Ctx = CGM.getContext(); // Class objc_lookUpClass (const char *) @@ -361,7 +359,7 @@ class ObjCCommonTypesHelper { } /// GcReadWeakFn -- LLVM objc_read_weak (id *src) function. - llvm::Constant *getGcReadWeakFn() { + llvm::FunctionCallee getGcReadWeakFn() { // id objc_read_weak (id *) llvm::Type *args[] = { ObjectPtrTy->getPointerTo() }; llvm::FunctionType *FTy = @@ -370,7 +368,7 @@ class ObjCCommonTypesHelper { } /// GcAssignWeakFn -- LLVM objc_assign_weak function. - llvm::Constant *getGcAssignWeakFn() { + llvm::FunctionCallee getGcAssignWeakFn() { // id objc_assign_weak (id, id *) llvm::Type *args[] = { ObjectPtrTy, ObjectPtrTy->getPointerTo() }; llvm::FunctionType *FTy = @@ -379,7 +377,7 @@ class ObjCCommonTypesHelper { } /// GcAssignGlobalFn -- LLVM objc_assign_global function. - llvm::Constant *getGcAssignGlobalFn() { + llvm::FunctionCallee getGcAssignGlobalFn() { // id objc_assign_global(id, id *) llvm::Type *args[] = { ObjectPtrTy, ObjectPtrTy->getPointerTo() }; llvm::FunctionType *FTy = @@ -388,7 +386,7 @@ class ObjCCommonTypesHelper { } /// GcAssignThreadLocalFn -- LLVM objc_assign_threadlocal function. - llvm::Constant *getGcAssignThreadLocalFn() { + llvm::FunctionCallee getGcAssignThreadLocalFn() { // id objc_assign_threadlocal(id src, id * dest) llvm::Type *args[] = { ObjectPtrTy, ObjectPtrTy->getPointerTo() }; llvm::FunctionType *FTy = @@ -397,7 +395,7 @@ class ObjCCommonTypesHelper { } /// GcAssignIvarFn -- LLVM objc_assign_ivar function. - llvm::Constant *getGcAssignIvarFn() { + llvm::FunctionCallee getGcAssignIvarFn() { // id objc_assign_ivar(id, id *, ptrdiff_t) llvm::Type *args[] = { ObjectPtrTy, ObjectPtrTy->getPointerTo(), CGM.PtrDiffTy }; @@ -407,7 +405,7 @@ class ObjCCommonTypesHelper { } /// GcMemmoveCollectableFn -- LLVM objc_memmove_collectable function. - llvm::Constant *GcMemmoveCollectableFn() { + llvm::FunctionCallee GcMemmoveCollectableFn() { // void *objc_memmove_collectable(void *dst, const void *src, size_t size) llvm::Type *args[] = { Int8PtrTy, Int8PtrTy, LongTy }; llvm::FunctionType *FTy = llvm::FunctionType::get(Int8PtrTy, args, false); @@ -415,7 +413,7 @@ class ObjCCommonTypesHelper { } /// GcAssignStrongCastFn -- LLVM objc_assign_strongCast function. - llvm::Constant *getGcAssignStrongCastFn() { + llvm::FunctionCallee getGcAssignStrongCastFn() { // id objc_assign_strongCast(id, id *) llvm::Type *args[] = { ObjectPtrTy, ObjectPtrTy->getPointerTo() }; llvm::FunctionType *FTy = @@ -424,7 +422,7 @@ class ObjCCommonTypesHelper { } /// ExceptionThrowFn - LLVM objc_exception_throw function. - llvm::Constant *getExceptionThrowFn() { + llvm::FunctionCallee getExceptionThrowFn() { // void objc_exception_throw(id) llvm::Type *args[] = { ObjectPtrTy }; llvm::FunctionType *FTy = @@ -433,14 +431,14 @@ class ObjCCommonTypesHelper { } /// ExceptionRethrowFn - LLVM objc_exception_rethrow function. - llvm::Constant *getExceptionRethrowFn() { + llvm::FunctionCallee getExceptionRethrowFn() { // void objc_exception_rethrow(void) llvm::FunctionType *FTy = llvm::FunctionType::get(CGM.VoidTy, false); return CGM.CreateRuntimeFunction(FTy, "objc_exception_rethrow"); } /// SyncEnterFn - LLVM object_sync_enter function. - llvm::Constant *getSyncEnterFn() { + llvm::FunctionCallee getSyncEnterFn() { // int objc_sync_enter (id) llvm::Type *args[] = { ObjectPtrTy }; llvm::FunctionType *FTy = @@ -449,7 +447,7 @@ class ObjCCommonTypesHelper { } /// SyncExitFn - LLVM object_sync_exit function. - llvm::Constant *getSyncExitFn() { + llvm::FunctionCallee getSyncExitFn() { // int objc_sync_exit (id) llvm::Type *args[] = { ObjectPtrTy }; llvm::FunctionType *FTy = @@ -457,35 +455,35 @@ class ObjCCommonTypesHelper { return CGM.CreateRuntimeFunction(FTy, "objc_sync_exit"); } - llvm::Constant *getSendFn(bool IsSuper) const { + llvm::FunctionCallee getSendFn(bool IsSuper) const { return IsSuper ? getMessageSendSuperFn() : getMessageSendFn(); } - llvm::Constant *getSendFn2(bool IsSuper) const { + llvm::FunctionCallee getSendFn2(bool IsSuper) const { return IsSuper ? getMessageSendSuperFn2() : getMessageSendFn(); } - llvm::Constant *getSendStretFn(bool IsSuper) const { + llvm::FunctionCallee getSendStretFn(bool IsSuper) const { return IsSuper ? getMessageSendSuperStretFn() : getMessageSendStretFn(); } - llvm::Constant *getSendStretFn2(bool IsSuper) const { + llvm::FunctionCallee getSendStretFn2(bool IsSuper) const { return IsSuper ? getMessageSendSuperStretFn2() : getMessageSendStretFn(); } - llvm::Constant *getSendFpretFn(bool IsSuper) const { + llvm::FunctionCallee getSendFpretFn(bool IsSuper) const { return IsSuper ? getMessageSendSuperFpretFn() : getMessageSendFpretFn(); } - llvm::Constant *getSendFpretFn2(bool IsSuper) const { + llvm::FunctionCallee getSendFpretFn2(bool IsSuper) const { return IsSuper ? getMessageSendSuperFpretFn2() : getMessageSendFpretFn(); } - llvm::Constant *getSendFp2retFn(bool IsSuper) const { + llvm::FunctionCallee getSendFp2retFn(bool IsSuper) const { return IsSuper ? getMessageSendSuperFn() : getMessageSendFp2retFn(); } - llvm::Constant *getSendFp2RetFn2(bool IsSuper) const { + llvm::FunctionCallee getSendFp2RetFn2(bool IsSuper) const { return IsSuper ? getMessageSendSuperFn2() : getMessageSendFp2retFn(); } @@ -551,7 +549,7 @@ class ObjCTypesHelper : public ObjCCommonTypesHelper { llvm::StructType *ExceptionDataTy; /// ExceptionTryEnterFn - LLVM objc_exception_try_enter function. - llvm::Constant *getExceptionTryEnterFn() { + llvm::FunctionCallee getExceptionTryEnterFn() { llvm::Type *params[] = { ExceptionDataTy->getPointerTo() }; return CGM.CreateRuntimeFunction( llvm::FunctionType::get(CGM.VoidTy, params, false), @@ -559,7 +557,7 @@ class ObjCTypesHelper : public ObjCCommonTypesHelper { } /// ExceptionTryExitFn - LLVM objc_exception_try_exit function. - llvm::Constant *getExceptionTryExitFn() { + llvm::FunctionCallee getExceptionTryExitFn() { llvm::Type *params[] = { ExceptionDataTy->getPointerTo() }; return CGM.CreateRuntimeFunction( llvm::FunctionType::get(CGM.VoidTy, params, false), @@ -567,7 +565,7 @@ class ObjCTypesHelper : public ObjCCommonTypesHelper { } /// ExceptionExtractFn - LLVM objc_exception_extract function. - llvm::Constant *getExceptionExtractFn() { + llvm::FunctionCallee getExceptionExtractFn() { llvm::Type *params[] = { ExceptionDataTy->getPointerTo() }; return CGM.CreateRuntimeFunction(llvm::FunctionType::get(ObjectPtrTy, params, false), @@ -575,7 +573,7 @@ class ObjCTypesHelper : public ObjCCommonTypesHelper { } /// ExceptionMatchFn - LLVM objc_exception_match function. - llvm::Constant *getExceptionMatchFn() { + llvm::FunctionCallee getExceptionMatchFn() { llvm::Type *params[] = { ClassPtrTy, ObjectPtrTy }; return CGM.CreateRuntimeFunction( llvm::FunctionType::get(CGM.Int32Ty, params, false), @@ -583,7 +581,7 @@ class ObjCTypesHelper : public ObjCCommonTypesHelper { } /// SetJmpFn - LLVM _setjmp function. - llvm::Constant *getSetJmpFn() { + llvm::FunctionCallee getSetJmpFn() { // This is specifically the prototype for x86. llvm::Type *params[] = { CGM.Int32Ty->getPointerTo() }; return CGM.CreateRuntimeFunction( @@ -669,7 +667,7 @@ class ObjCNonFragileABITypesHelper : public ObjCCommonTypesHelper { // SuperMessageRefPtrTy - LLVM for struct _super_message_ref_t* llvm::PointerType *SuperMessageRefPtrTy; - llvm::Constant *getMessageSendFixupFn() { + llvm::FunctionCallee getMessageSendFixupFn() { // id objc_msgSend_fixup(id, struct message_ref_t*, ...) llvm::Type *params[] = { ObjectPtrTy, MessageRefPtrTy }; return CGM.CreateRuntimeFunction(llvm::FunctionType::get(ObjectPtrTy, @@ -677,7 +675,7 @@ class ObjCNonFragileABITypesHelper : public ObjCCommonTypesHelper { "objc_msgSend_fixup"); } - llvm::Constant *getMessageSendFpretFixupFn() { + llvm::FunctionCallee getMessageSendFpretFixupFn() { // id objc_msgSend_fpret_fixup(id, struct message_ref_t*, ...) llvm::Type *params[] = { ObjectPtrTy, MessageRefPtrTy }; return CGM.CreateRuntimeFunction(llvm::FunctionType::get(ObjectPtrTy, @@ -685,7 +683,7 @@ class ObjCNonFragileABITypesHelper : public ObjCCommonTypesHelper { "objc_msgSend_fpret_fixup"); } - llvm::Constant *getMessageSendStretFixupFn() { + llvm::FunctionCallee getMessageSendStretFixupFn() { // id objc_msgSend_stret_fixup(id, struct message_ref_t*, ...) llvm::Type *params[] = { ObjectPtrTy, MessageRefPtrTy }; return CGM.CreateRuntimeFunction(llvm::FunctionType::get(ObjectPtrTy, @@ -693,7 +691,7 @@ class ObjCNonFragileABITypesHelper : public ObjCCommonTypesHelper { "objc_msgSend_stret_fixup"); } - llvm::Constant *getMessageSendSuper2FixupFn() { + llvm::FunctionCallee getMessageSendSuper2FixupFn() { // id objc_msgSendSuper2_fixup (struct objc_super *, // struct _super_message_ref_t*, ...) llvm::Type *params[] = { SuperPtrTy, SuperMessageRefPtrTy }; @@ -702,7 +700,7 @@ class ObjCNonFragileABITypesHelper : public ObjCCommonTypesHelper { "objc_msgSendSuper2_fixup"); } - llvm::Constant *getMessageSendSuper2StretFixupFn() { + llvm::FunctionCallee getMessageSendSuper2StretFixupFn() { // id objc_msgSendSuper2_stret_fixup(struct objc_super *, // struct _super_message_ref_t*, ...) llvm::Type *params[] = { SuperPtrTy, SuperMessageRefPtrTy }; @@ -711,13 +709,12 @@ class ObjCNonFragileABITypesHelper : public ObjCCommonTypesHelper { "objc_msgSendSuper2_stret_fixup"); } - llvm::Constant *getObjCEndCatchFn() { + llvm::FunctionCallee getObjCEndCatchFn() { return CGM.CreateRuntimeFunction(llvm::FunctionType::get(CGM.VoidTy, false), "objc_end_catch"); - } - llvm::Constant *getObjCBeginCatchFn() { + llvm::FunctionCallee getObjCBeginCatchFn() { llvm::Type *params[] = { Int8PtrTy }; return CGM.CreateRuntimeFunction(llvm::FunctionType::get(Int8PtrTy, params, false), @@ -1323,15 +1320,15 @@ class CGObjCMac : public CGObjCCommonMac { llvm::Value *GenerateProtocolRef(CodeGenFunction &CGF, const ObjCProtocolDecl *PD) override; - llvm::Constant *GetPropertyGetFunction() override; - llvm::Constant *GetPropertySetFunction() override; - llvm::Constant *GetOptimizedPropertySetFunction(bool atomic, - bool copy) override; - llvm::Constant *GetGetStructFunction() override; - llvm::Constant *GetSetStructFunction() override; - llvm::Constant *GetCppAtomicObjectGetFunction() override; - llvm::Constant *GetCppAtomicObjectSetFunction() override; - llvm::Constant *EnumerationMutationFunction() override; + llvm::FunctionCallee GetPropertyGetFunction() override; + llvm::FunctionCallee GetPropertySetFunction() override; + llvm::FunctionCallee GetOptimizedPropertySetFunction(bool atomic, + bool copy) override; + llvm::FunctionCallee GetGetStructFunction() override; + llvm::FunctionCallee GetSetStructFunction() override; + llvm::FunctionCallee GetCppAtomicObjectGetFunction() override; + llvm::FunctionCallee GetCppAtomicObjectSetFunction() override; + llvm::FunctionCallee EnumerationMutationFunction() override; void EmitTryStmt(CodeGen::CodeGenFunction &CGF, const ObjCAtTryStmt &S) override; @@ -1605,35 +1602,35 @@ class CGObjCNonFragileABIMac : public CGObjCCommonMac { llvm::Constant *GetEHType(QualType T) override; - llvm::Constant *GetPropertyGetFunction() override { + llvm::FunctionCallee GetPropertyGetFunction() override { return ObjCTypes.getGetPropertyFn(); } - llvm::Constant *GetPropertySetFunction() override { + llvm::FunctionCallee GetPropertySetFunction() override { return ObjCTypes.getSetPropertyFn(); } - llvm::Constant *GetOptimizedPropertySetFunction(bool atomic, - bool copy) override { + llvm::FunctionCallee GetOptimizedPropertySetFunction(bool atomic, + bool copy) override { return ObjCTypes.getOptimizedSetPropertyFn(atomic, copy); } - llvm::Constant *GetSetStructFunction() override { + llvm::FunctionCallee GetSetStructFunction() override { return ObjCTypes.getCopyStructFn(); } - llvm::Constant *GetGetStructFunction() override { + llvm::FunctionCallee GetGetStructFunction() override { return ObjCTypes.getCopyStructFn(); } - llvm::Constant *GetCppAtomicObjectSetFunction() override { + llvm::FunctionCallee GetCppAtomicObjectSetFunction() override { return ObjCTypes.getCppAtomicObjectFunction(); } - llvm::Constant *GetCppAtomicObjectGetFunction() override { + llvm::FunctionCallee GetCppAtomicObjectGetFunction() override { return ObjCTypes.getCppAtomicObjectFunction(); } - llvm::Constant *EnumerationMutationFunction() override { + llvm::FunctionCallee EnumerationMutationFunction() override { return ObjCTypes.getEnumerationMutationFn(); } @@ -2011,9 +2008,8 @@ CGObjCMac::GenerateMessageSendSuper(CodeGen::CodeGenFunction &CGF, "objc_super"); llvm::Value *ReceiverAsObject = CGF.Builder.CreateBitCast(Receiver, ObjCTypes.ObjectPtrTy); - CGF.Builder.CreateStore( - ReceiverAsObject, - CGF.Builder.CreateStructGEP(ObjCSuper, 0, CharUnits::Zero())); + CGF.Builder.CreateStore(ReceiverAsObject, + CGF.Builder.CreateStructGEP(ObjCSuper, 0)); // If this is a class message the metaclass is passed as the target. llvm::Value *Target; @@ -2048,8 +2044,7 @@ CGObjCMac::GenerateMessageSendSuper(CodeGen::CodeGenFunction &CGF, llvm::Type *ClassTy = CGM.getTypes().ConvertType(CGF.getContext().getObjCClassType()); Target = CGF.Builder.CreateBitCast(Target, ClassTy); - CGF.Builder.CreateStore(Target, - CGF.Builder.CreateStructGEP(ObjCSuper, 1, CGF.getPointerSize())); + CGF.Builder.CreateStore(Target, CGF.Builder.CreateStructGEP(ObjCSuper, 1)); return EmitMessageSend(CGF, Return, ResultType, EmitSelector(CGF, Sel), ObjCSuper.getPointer(), ObjCTypes.SuperPtrCTy, @@ -2136,7 +2131,7 @@ CGObjCCommonMac::EmitMessageSend(CodeGen::CodeGenFunction &CGF, bool RequiresNullCheck = false; - llvm::Constant *Fn = nullptr; + llvm::FunctionCallee Fn = nullptr; if (CGM.ReturnSlotInterferesWithArgs(MSI.CallInfo)) { if (ReceiverCanBeNull) RequiresNullCheck = true; Fn = (ObjCABI == 2) ? ObjCTypes.getSendStretFn2(IsSuper) @@ -2156,6 +2151,10 @@ CGObjCCommonMac::EmitMessageSend(CodeGen::CodeGenFunction &CGF, : ObjCTypes.getSendFn(IsSuper); } + // Cast function to proper signature + llvm::Constant *BitcastFn = cast( + CGF.Builder.CreateBitCast(Fn.getCallee(), MSI.MessengerType)); + // We don't need to emit a null check to zero out an indirect result if the // result is ignored. if (Return.isUnused()) @@ -2177,8 +2176,7 @@ CGObjCCommonMac::EmitMessageSend(CodeGen::CodeGenFunction &CGF, } llvm::CallBase *CallSite; - Fn = llvm::ConstantExpr::getBitCast(Fn, MSI.MessengerType); - CGCallee Callee = CGCallee::forDirect(Fn); + CGCallee Callee = CGCallee::forDirect(BitcastFn); RValue rvalue = CGF.EmitCall(MSI.CallInfo, Callee, Return, ActualArgs, &CallSite); @@ -2961,7 +2959,7 @@ llvm::Value *CGObjCCommonMac::EmitClassRefViaRuntime( CodeGenFunction &CGF, const ObjCInterfaceDecl *ID, ObjCCommonTypesHelper &ObjCTypes) { - llvm::Constant *lookUpClassFn = ObjCTypes.getLookUpClassFn(); + llvm::FunctionCallee lookUpClassFn = ObjCTypes.getLookUpClassFn(); llvm::Value *className = CGF.CGM.GetAddrOfConstantCString(ID->getObjCRuntimeNameAsString()) @@ -4018,36 +4016,36 @@ llvm::Function *CGObjCMac::ModuleInitFunction() { return nullptr; } -llvm::Constant *CGObjCMac::GetPropertyGetFunction() { +llvm::FunctionCallee CGObjCMac::GetPropertyGetFunction() { return ObjCTypes.getGetPropertyFn(); } -llvm::Constant *CGObjCMac::GetPropertySetFunction() { +llvm::FunctionCallee CGObjCMac::GetPropertySetFunction() { return ObjCTypes.getSetPropertyFn(); } -llvm::Constant *CGObjCMac::GetOptimizedPropertySetFunction(bool atomic, - bool copy) { +llvm::FunctionCallee CGObjCMac::GetOptimizedPropertySetFunction(bool atomic, + bool copy) { return ObjCTypes.getOptimizedSetPropertyFn(atomic, copy); } -llvm::Constant *CGObjCMac::GetGetStructFunction() { +llvm::FunctionCallee CGObjCMac::GetGetStructFunction() { return ObjCTypes.getCopyStructFn(); } -llvm::Constant *CGObjCMac::GetSetStructFunction() { +llvm::FunctionCallee CGObjCMac::GetSetStructFunction() { return ObjCTypes.getCopyStructFn(); } -llvm::Constant *CGObjCMac::GetCppAtomicObjectGetFunction() { +llvm::FunctionCallee CGObjCMac::GetCppAtomicObjectGetFunction() { return ObjCTypes.getCppAtomicObjectFunction(); } -llvm::Constant *CGObjCMac::GetCppAtomicObjectSetFunction() { +llvm::FunctionCallee CGObjCMac::GetCppAtomicObjectSetFunction() { return ObjCTypes.getCppAtomicObjectFunction(); } -llvm::Constant *CGObjCMac::EnumerationMutationFunction() { +llvm::FunctionCallee CGObjCMac::EnumerationMutationFunction() { return ObjCTypes.getEnumerationMutationFn(); } @@ -6261,9 +6259,10 @@ CGObjCNonFragileABIMac::BuildClassObject(const ObjCInterfaceDecl *CI, return GV; } -bool -CGObjCNonFragileABIMac::ImplementationIsNonLazy(const ObjCImplDecl *OD) const { - return OD->getClassMethod(GetNullarySelector("load")) != nullptr; +bool CGObjCNonFragileABIMac::ImplementationIsNonLazy( + const ObjCImplDecl *OD) const { + return OD->getClassMethod(GetNullarySelector("load")) != nullptr || + OD->getClassInterface()->hasAttr(); } void CGObjCNonFragileABIMac::GetClassSizeInfo(const ObjCImplementationDecl *OID, @@ -7090,7 +7089,7 @@ CGObjCNonFragileABIMac::EmitVTableMessageSend(CodeGenFunction &CGF, // The runtime currently never uses vtable dispatch for anything // except normal, non-super message-sends. // FIXME: don't use this for that. - llvm::Constant *fn = nullptr; + llvm::FunctionCallee fn = nullptr; std::string messageRefName("\01l_"); if (CGM.ReturnSlotInterferesWithArgs(MSI.CallInfo)) { if (isSuper) { @@ -7126,7 +7125,7 @@ CGObjCNonFragileABIMac::EmitVTableMessageSend(CodeGenFunction &CGF, // Build the message ref structure. ConstantInitBuilder builder(CGM); auto values = builder.beginStruct(); - values.add(fn); + values.add(cast(fn.getCallee())); values.add(GetMethodVarName(selector)); messageRef = values.finishAndCreateGlobal(messageRefName, CharUnits::fromQuantity(16), @@ -7155,8 +7154,7 @@ CGObjCNonFragileABIMac::EmitVTableMessageSend(CodeGenFunction &CGF, args[1].setRValue(RValue::get(mref.getPointer())); // Load the function to call from the message ref table. - Address calleeAddr = - CGF.Builder.CreateStructGEP(mref, 0, CharUnits::Zero()); + Address calleeAddr = CGF.Builder.CreateStructGEP(mref, 0); llvm::Value *calleePtr = CGF.Builder.CreateLoad(calleeAddr, "msgSend_fn"); calleePtr = CGF.Builder.CreateBitCast(calleePtr, MSI.MessengerType); @@ -7353,9 +7351,8 @@ CGObjCNonFragileABIMac::GenerateMessageSendSuper(CodeGen::CodeGenFunction &CGF, llvm::Value *ReceiverAsObject = CGF.Builder.CreateBitCast(Receiver, ObjCTypes.ObjectPtrTy); - CGF.Builder.CreateStore( - ReceiverAsObject, - CGF.Builder.CreateStructGEP(ObjCSuper, 0, CharUnits::Zero())); + CGF.Builder.CreateStore(ReceiverAsObject, + CGF.Builder.CreateStructGEP(ObjCSuper, 0)); // If this is a class message the metaclass is passed as the target. llvm::Value *Target; @@ -7369,8 +7366,7 @@ CGObjCNonFragileABIMac::GenerateMessageSendSuper(CodeGen::CodeGenFunction &CGF, llvm::Type *ClassTy = CGM.getTypes().ConvertType(CGF.getContext().getObjCClassType()); Target = CGF.Builder.CreateBitCast(Target, ClassTy); - CGF.Builder.CreateStore( - Target, CGF.Builder.CreateStructGEP(ObjCSuper, 1, CGF.getPointerSize())); + CGF.Builder.CreateStore(Target, CGF.Builder.CreateStructGEP(ObjCSuper, 1)); return (isVTableDispatchedSelector(Sel)) ? EmitVTableMessageSend(CGF, Return, ResultType, Sel, @@ -7530,9 +7526,8 @@ void CGObjCNonFragileABIMac::EmitObjCGlobalAssign(CodeGen::CodeGenFunction &CGF, void CGObjCNonFragileABIMac::EmitSynchronizedStmt(CodeGen::CodeGenFunction &CGF, const ObjCAtSynchronizedStmt &S) { - EmitAtSynchronizedStmt(CGF, S, - cast(ObjCTypes.getSyncEnterFn()), - cast(ObjCTypes.getSyncExitFn())); + EmitAtSynchronizedStmt(CGF, S, ObjCTypes.getSyncEnterFn(), + ObjCTypes.getSyncExitFn()); } llvm::Constant * @@ -7563,10 +7558,9 @@ CGObjCNonFragileABIMac::GetEHType(QualType T) { void CGObjCNonFragileABIMac::EmitTryStmt(CodeGen::CodeGenFunction &CGF, const ObjCAtTryStmt &S) { - EmitTryCatchStmt(CGF, S, - cast(ObjCTypes.getObjCBeginCatchFn()), - cast(ObjCTypes.getObjCEndCatchFn()), - cast(ObjCTypes.getExceptionRethrowFn())); + EmitTryCatchStmt(CGF, S, ObjCTypes.getObjCBeginCatchFn(), + ObjCTypes.getObjCEndCatchFn(), + ObjCTypes.getExceptionRethrowFn()); } /// EmitThrowStmt - Generate code for a throw statement. diff --git a/clang/lib/CodeGen/CGObjCRuntime.cpp b/clang/lib/CodeGen/CGObjCRuntime.cpp index 6b9634c9e4047..f8b831d0e9bed 100644 --- a/clang/lib/CodeGen/CGObjCRuntime.cpp +++ b/clang/lib/CodeGen/CGObjCRuntime.cpp @@ -125,10 +125,10 @@ namespace { }; struct CallObjCEndCatch final : EHScopeStack::Cleanup { - CallObjCEndCatch(bool MightThrow, llvm::Value *Fn) + CallObjCEndCatch(bool MightThrow, llvm::FunctionCallee Fn) : MightThrow(MightThrow), Fn(Fn) {} bool MightThrow; - llvm::Value *Fn; + llvm::FunctionCallee Fn; void Emit(CodeGenFunction &CGF, Flags flags) override { if (MightThrow) @@ -139,12 +139,11 @@ namespace { }; } - void CGObjCRuntime::EmitTryCatchStmt(CodeGenFunction &CGF, const ObjCAtTryStmt &S, - llvm::Constant *beginCatchFn, - llvm::Constant *endCatchFn, - llvm::Constant *exceptionRethrowFn) { + llvm::FunctionCallee beginCatchFn, + llvm::FunctionCallee endCatchFn, + llvm::FunctionCallee exceptionRethrowFn) { // Jump destination for falling out of catch bodies. CodeGenFunction::JumpDest Cont; if (S.getNumCatchStmts()) @@ -311,10 +310,10 @@ void CGObjCRuntime::EmitInitOfCatchParam(CodeGenFunction &CGF, namespace { struct CallSyncExit final : EHScopeStack::Cleanup { - llvm::Value *SyncExitFn; + llvm::FunctionCallee SyncExitFn; llvm::Value *SyncArg; - CallSyncExit(llvm::Value *SyncExitFn, llvm::Value *SyncArg) - : SyncExitFn(SyncExitFn), SyncArg(SyncArg) {} + CallSyncExit(llvm::FunctionCallee SyncExitFn, llvm::Value *SyncArg) + : SyncExitFn(SyncExitFn), SyncArg(SyncArg) {} void Emit(CodeGenFunction &CGF, Flags flags) override { CGF.EmitNounwindRuntimeCall(SyncExitFn, SyncArg); @@ -324,8 +323,8 @@ namespace { void CGObjCRuntime::EmitAtSynchronizedStmt(CodeGenFunction &CGF, const ObjCAtSynchronizedStmt &S, - llvm::Function *syncEnterFn, - llvm::Function *syncExitFn) { + llvm::FunctionCallee syncEnterFn, + llvm::FunctionCallee syncExitFn) { CodeGenFunction::RunCleanupsScope cleanups(CGF); // Evaluate the lock operand. This is guaranteed to dominate the diff --git a/clang/lib/CodeGen/CGObjCRuntime.h b/clang/lib/CodeGen/CGObjCRuntime.h index 51d52ae1731f1..471816cb5988e 100644 --- a/clang/lib/CodeGen/CGObjCRuntime.h +++ b/clang/lib/CodeGen/CGObjCRuntime.h @@ -95,11 +95,10 @@ class CGObjCRuntime { /// used to rethrow exceptions. If the begin and end catch functions are /// NULL, then the function assumes that the EH personality function provides /// the thrown object directly. - void EmitTryCatchStmt(CodeGenFunction &CGF, - const ObjCAtTryStmt &S, - llvm::Constant *beginCatchFn, - llvm::Constant *endCatchFn, - llvm::Constant *exceptionRethrowFn); + void EmitTryCatchStmt(CodeGenFunction &CGF, const ObjCAtTryStmt &S, + llvm::FunctionCallee beginCatchFn, + llvm::FunctionCallee endCatchFn, + llvm::FunctionCallee exceptionRethrowFn); void EmitInitOfCatchParam(CodeGenFunction &CGF, llvm::Value *exn, const VarDecl *paramDecl); @@ -109,9 +108,9 @@ class CGObjCRuntime { /// the object. This function can be called by subclasses that use /// zero-cost exception handling. void EmitAtSynchronizedStmt(CodeGenFunction &CGF, - const ObjCAtSynchronizedStmt &S, - llvm::Function *syncEnterFn, - llvm::Function *syncExitFn); + const ObjCAtSynchronizedStmt &S, + llvm::FunctionCallee syncEnterFn, + llvm::FunctionCallee syncExitFn); public: virtual ~CGObjCRuntime(); @@ -207,25 +206,25 @@ class CGObjCRuntime { const ObjCContainerDecl *CD) = 0; /// Return the runtime function for getting properties. - virtual llvm::Constant *GetPropertyGetFunction() = 0; + virtual llvm::FunctionCallee GetPropertyGetFunction() = 0; /// Return the runtime function for setting properties. - virtual llvm::Constant *GetPropertySetFunction() = 0; + virtual llvm::FunctionCallee GetPropertySetFunction() = 0; /// Return the runtime function for optimized setting properties. - virtual llvm::Constant *GetOptimizedPropertySetFunction(bool atomic, - bool copy) = 0; + virtual llvm::FunctionCallee GetOptimizedPropertySetFunction(bool atomic, + bool copy) = 0; // API for atomic copying of qualified aggregates in getter. - virtual llvm::Constant *GetGetStructFunction() = 0; + virtual llvm::FunctionCallee GetGetStructFunction() = 0; // API for atomic copying of qualified aggregates in setter. - virtual llvm::Constant *GetSetStructFunction() = 0; + virtual llvm::FunctionCallee GetSetStructFunction() = 0; /// API for atomic copying of qualified aggregates with non-trivial copy /// assignment (c++) in setter. - virtual llvm::Constant *GetCppAtomicObjectSetFunction() = 0; + virtual llvm::FunctionCallee GetCppAtomicObjectSetFunction() = 0; /// API for atomic copying of qualified aggregates with non-trivial copy /// assignment (c++) in getter. - virtual llvm::Constant *GetCppAtomicObjectGetFunction() = 0; + virtual llvm::FunctionCallee GetCppAtomicObjectGetFunction() = 0; /// GetClass - Return a reference to the class for the given /// interface decl. @@ -239,7 +238,7 @@ class CGObjCRuntime { /// EnumerationMutationFunction - Return the function that's called by the /// compiler when a mutation is detected during foreach iteration. - virtual llvm::Constant *EnumerationMutationFunction() = 0; + virtual llvm::FunctionCallee EnumerationMutationFunction() = 0; virtual void EmitSynchronizedStmt(CodeGen::CodeGenFunction &CGF, const ObjCAtSynchronizedStmt &S) = 0; diff --git a/clang/lib/CodeGen/CGOpenCLRuntime.cpp b/clang/lib/CodeGen/CGOpenCLRuntime.cpp index 95732e93d5a9e..191a95c629922 100644 --- a/clang/lib/CodeGen/CGOpenCLRuntime.cpp +++ b/clang/lib/CodeGen/CGOpenCLRuntime.cpp @@ -122,6 +122,23 @@ llvm::PointerType *CGOpenCLRuntime::getGenericVoidPointerType() { CGM.getContext().getTargetAddressSpace(LangAS::opencl_generic)); } +// Get the block literal from an expression derived from the block expression. +// OpenCL v2.0 s6.12.5: +// Block variable declarations are implicitly qualified with const. Therefore +// all block variables must be initialized at declaration time and may not be +// reassigned. +static const BlockExpr *getBlockExpr(const Expr *E) { + const Expr *Prev = nullptr; // to make sure we do not stuck in infinite loop. + while(!isa(E) && E != Prev) { + Prev = E; + E = E->IgnoreCasts(); + if (auto DR = dyn_cast(E)) { + E = cast(DR->getDecl())->getInit(); + } + } + return cast(E); +} + /// Record emitted llvm invoke function and llvm block literal for the /// corresponding block expression. void CGOpenCLRuntime::recordBlockInfo(const BlockExpr *E, @@ -136,20 +153,17 @@ void CGOpenCLRuntime::recordBlockInfo(const BlockExpr *E, EnqueuedBlockMap[E].Kernel = nullptr; } +llvm::Function *CGOpenCLRuntime::getInvokeFunction(const Expr *E) { + return EnqueuedBlockMap[getBlockExpr(E)].InvokeFunc; +} + CGOpenCLRuntime::EnqueuedBlockInfo CGOpenCLRuntime::emitOpenCLEnqueuedBlock(CodeGenFunction &CGF, const Expr *E) { CGF.EmitScalarExpr(E); // The block literal may be assigned to a const variable. Chasing down // to get the block literal. - if (auto DR = dyn_cast(E)) { - E = cast(DR->getDecl())->getInit(); - } - E = E->IgnoreImplicit(); - if (auto Cast = dyn_cast(E)) { - E = Cast->getSubExpr(); - } - auto *Block = cast(E); + const BlockExpr *Block = getBlockExpr(E); assert(EnqueuedBlockMap.find(Block) != EnqueuedBlockMap.end() && "Block expression not emitted"); diff --git a/clang/lib/CodeGen/CGOpenCLRuntime.h b/clang/lib/CodeGen/CGOpenCLRuntime.h index 937b2a6c2ada7..3f7aa9b0d8dc1 100644 --- a/clang/lib/CodeGen/CGOpenCLRuntime.h +++ b/clang/lib/CodeGen/CGOpenCLRuntime.h @@ -91,6 +91,10 @@ class CGOpenCLRuntime { /// \param Block block literal emitted for the block expression. void recordBlockInfo(const BlockExpr *E, llvm::Function *InvokeF, llvm::Value *Block); + + /// \return LLVM block invoke function emitted for an expression derived from + /// the block expression. + llvm::Function *getInvokeFunction(const Expr *E); }; } diff --git a/clang/lib/CodeGen/CGOpenMPRuntime.cpp b/clang/lib/CodeGen/CGOpenMPRuntime.cpp index 9058c42a4d130..64fdefd9a6fe8 100644 --- a/clang/lib/CodeGen/CGOpenMPRuntime.cpp +++ b/clang/lib/CodeGen/CGOpenMPRuntime.cpp @@ -1338,7 +1338,7 @@ CGOpenMPRuntime::getUserDefinedReduction(const OMPDeclareReductionDecl *D) { return UDRMap.lookup(D); } -static llvm::Value *emitParallelOrTeamsOutlinedFunction( +static llvm::Function *emitParallelOrTeamsOutlinedFunction( CodeGenModule &CGM, const OMPExecutableDirective &D, const CapturedStmt *CS, const VarDecl *ThreadIDVar, OpenMPDirectiveKind InnermostKind, const StringRef OutlinedHelperName, const RegionCodeGenTy &CodeGen) { @@ -1368,7 +1368,7 @@ static llvm::Value *emitParallelOrTeamsOutlinedFunction( return CGF.GenerateOpenMPCapturedStmtFunction(*CS); } -llvm::Value *CGOpenMPRuntime::emitParallelOutlinedFunction( +llvm::Function *CGOpenMPRuntime::emitParallelOutlinedFunction( const OMPExecutableDirective &D, const VarDecl *ThreadIDVar, OpenMPDirectiveKind InnermostKind, const RegionCodeGenTy &CodeGen) { const CapturedStmt *CS = D.getCapturedStmt(OMPD_parallel); @@ -1376,7 +1376,7 @@ llvm::Value *CGOpenMPRuntime::emitParallelOutlinedFunction( CGM, D, CS, ThreadIDVar, InnermostKind, getOutlinedHelperName(), CodeGen); } -llvm::Value *CGOpenMPRuntime::emitTeamsOutlinedFunction( +llvm::Function *CGOpenMPRuntime::emitTeamsOutlinedFunction( const OMPExecutableDirective &D, const VarDecl *ThreadIDVar, OpenMPDirectiveKind InnermostKind, const RegionCodeGenTy &CodeGen) { const CapturedStmt *CS = D.getCapturedStmt(OMPD_teams); @@ -1384,7 +1384,7 @@ llvm::Value *CGOpenMPRuntime::emitTeamsOutlinedFunction( CGM, D, CS, ThreadIDVar, InnermostKind, getOutlinedHelperName(), CodeGen); } -llvm::Value *CGOpenMPRuntime::emitTaskOutlinedFunction( +llvm::Function *CGOpenMPRuntime::emitTaskOutlinedFunction( const OMPExecutableDirective &D, const VarDecl *ThreadIDVar, const VarDecl *PartIDVar, const VarDecl *TaskTVar, OpenMPDirectiveKind InnermostKind, const RegionCodeGenTy &CodeGen, @@ -1415,7 +1415,7 @@ llvm::Value *CGOpenMPRuntime::emitTaskOutlinedFunction( InnermostKind, TD ? TD->hasCancel() : false, Action); CodeGenFunction::CGCapturedStmtRAII CapInfoRAII(CGF, &CGInfo); - llvm::Value *Res = CGF.GenerateCapturedStmtFunction(*CS); + llvm::Function *Res = CGF.GenerateCapturedStmtFunction(*CS); if (!Tied) NumberOfParts = Action.getNumberOfParts(); return Res; @@ -1663,9 +1663,8 @@ llvm::Type *CGOpenMPRuntime::getKmpc_MicroPointerTy() { return llvm::PointerType::getUnqual(Kmpc_MicroTy); } -llvm::Constant * -CGOpenMPRuntime::createRuntimeFunction(unsigned Function) { - llvm::Constant *RTLFn = nullptr; +llvm::FunctionCallee CGOpenMPRuntime::createRuntimeFunction(unsigned Function) { + llvm::FunctionCallee RTLFn = nullptr; switch (static_cast(Function)) { case OMPRTL__kmpc_fork_call: { // Build void __kmpc_fork_call(ident_t *loc, kmp_int32 argc, kmpc_micro @@ -1675,7 +1674,7 @@ CGOpenMPRuntime::createRuntimeFunction(unsigned Function) { auto *FnTy = llvm::FunctionType::get(CGM.VoidTy, TypeParams, /*isVarArg*/ true); RTLFn = CGM.CreateRuntimeFunction(FnTy, "__kmpc_fork_call"); - if (auto *F = dyn_cast(RTLFn)) { + if (auto *F = dyn_cast(RTLFn.getCallee())) { if (!F->hasMetadata(llvm::LLVMContext::MD_callback)) { llvm::LLVMContext &Ctx = F->getContext(); llvm::MDBuilder MDB(Ctx); @@ -2098,7 +2097,7 @@ CGOpenMPRuntime::createRuntimeFunction(unsigned Function) { auto *FnTy = llvm::FunctionType::get(CGM.VoidTy, TypeParams, /*isVarArg*/ true); RTLFn = CGM.CreateRuntimeFunction(FnTy, "__kmpc_fork_teams"); - if (auto *F = dyn_cast(RTLFn)) { + if (auto *F = dyn_cast(RTLFn.getCallee())) { if (!F->hasMetadata(llvm::LLVMContext::MD_callback)) { llvm::LLVMContext &Ctx = F->getContext(); llvm::MDBuilder MDB(Ctx); @@ -2385,8 +2384,8 @@ CGOpenMPRuntime::createRuntimeFunction(unsigned Function) { return RTLFn; } -llvm::Constant *CGOpenMPRuntime::createForStaticInitFunction(unsigned IVSize, - bool IVSigned) { +llvm::FunctionCallee +CGOpenMPRuntime::createForStaticInitFunction(unsigned IVSize, bool IVSigned) { assert((IVSize == 32 || IVSize == 64) && "IV size is not compatible with the omp runtime"); StringRef Name = IVSize == 32 ? (IVSigned ? "__kmpc_for_static_init_4" @@ -2411,8 +2410,8 @@ llvm::Constant *CGOpenMPRuntime::createForStaticInitFunction(unsigned IVSize, return CGM.CreateRuntimeFunction(FnTy, Name); } -llvm::Constant *CGOpenMPRuntime::createDispatchInitFunction(unsigned IVSize, - bool IVSigned) { +llvm::FunctionCallee +CGOpenMPRuntime::createDispatchInitFunction(unsigned IVSize, bool IVSigned) { assert((IVSize == 32 || IVSize == 64) && "IV size is not compatible with the omp runtime"); StringRef Name = @@ -2433,8 +2432,8 @@ llvm::Constant *CGOpenMPRuntime::createDispatchInitFunction(unsigned IVSize, return CGM.CreateRuntimeFunction(FnTy, Name); } -llvm::Constant *CGOpenMPRuntime::createDispatchFiniFunction(unsigned IVSize, - bool IVSigned) { +llvm::FunctionCallee +CGOpenMPRuntime::createDispatchFiniFunction(unsigned IVSize, bool IVSigned) { assert((IVSize == 32 || IVSize == 64) && "IV size is not compatible with the omp runtime"); StringRef Name = @@ -2450,8 +2449,8 @@ llvm::Constant *CGOpenMPRuntime::createDispatchFiniFunction(unsigned IVSize, return CGM.CreateRuntimeFunction(FnTy, Name); } -llvm::Constant *CGOpenMPRuntime::createDispatchNextFunction(unsigned IVSize, - bool IVSigned) { +llvm::FunctionCallee +CGOpenMPRuntime::createDispatchNextFunction(unsigned IVSize, bool IVSigned) { assert((IVSize == 32 || IVSize == 64) && "IV size is not compatible with the omp runtime"); StringRef Name = @@ -2866,7 +2865,7 @@ void CGOpenMPRuntime::emitOMPIfClause(CodeGenFunction &CGF, const Expr *Cond, } void CGOpenMPRuntime::emitParallelCall(CodeGenFunction &CGF, SourceLocation Loc, - llvm::Value *OutlinedFn, + llvm::Function *OutlinedFn, ArrayRef CapturedVars, const Expr *IfCond) { if (!CGF.HaveInsertPoint()) @@ -2884,7 +2883,8 @@ void CGOpenMPRuntime::emitParallelCall(CodeGenFunction &CGF, SourceLocation Loc, RealArgs.append(std::begin(Args), std::end(Args)); RealArgs.append(CapturedVars.begin(), CapturedVars.end()); - llvm::Value *RTLFn = RT.createRuntimeFunction(OMPRTL__kmpc_fork_call); + llvm::FunctionCallee RTLFn = + RT.createRuntimeFunction(OMPRTL__kmpc_fork_call); CGF.EmitRuntimeCall(RTLFn, RealArgs); }; auto &&ElseGen = [OutlinedFn, CapturedVars, RTLoc, Loc](CodeGenFunction &CGF, @@ -2945,9 +2945,8 @@ Address CGOpenMPRuntime::emitThreadIDAddress(CodeGenFunction &CGF, return ThreadIDTemp; } -llvm::Constant * -CGOpenMPRuntime::getOrCreateInternalVariable(llvm::Type *Ty, - const llvm::Twine &Name) { +llvm::Constant *CGOpenMPRuntime::getOrCreateInternalVariable( + llvm::Type *Ty, const llvm::Twine &Name, unsigned AddressSpace) { SmallString<256> Buffer; llvm::raw_svector_ostream Out(Buffer); Out << Name; @@ -2962,7 +2961,8 @@ CGOpenMPRuntime::getOrCreateInternalVariable(llvm::Type *Ty, return Elem.second = new llvm::GlobalVariable( CGM.getModule(), Ty, /*IsConstant*/ false, llvm::GlobalValue::CommonLinkage, llvm::Constant::getNullValue(Ty), - Elem.first()); + Elem.first(), /*InsertBefore=*/nullptr, + llvm::GlobalValue::NotThreadLocal, AddressSpace); } llvm::Value *CGOpenMPRuntime::getCriticalRegionLock(StringRef CriticalName) { @@ -2974,17 +2974,18 @@ llvm::Value *CGOpenMPRuntime::getCriticalRegionLock(StringRef CriticalName) { namespace { /// Common pre(post)-action for different OpenMP constructs. class CommonActionTy final : public PrePostActionTy { - llvm::Value *EnterCallee; + llvm::FunctionCallee EnterCallee; ArrayRef EnterArgs; - llvm::Value *ExitCallee; + llvm::FunctionCallee ExitCallee; ArrayRef ExitArgs; bool Conditional; llvm::BasicBlock *ContBlock = nullptr; public: - CommonActionTy(llvm::Value *EnterCallee, ArrayRef EnterArgs, - llvm::Value *ExitCallee, ArrayRef ExitArgs, - bool Conditional = false) + CommonActionTy(llvm::FunctionCallee EnterCallee, + ArrayRef EnterArgs, + llvm::FunctionCallee ExitCallee, + ArrayRef ExitArgs, bool Conditional = false) : EnterCallee(EnterCallee), EnterArgs(EnterArgs), ExitCallee(ExitCallee), ExitArgs(ExitArgs), Conditional(Conditional) {} void Enter(CodeGenFunction &CGF) override { @@ -3089,8 +3090,7 @@ void CGOpenMPRuntime::emitTaskgroupRegion(CodeGenFunction &CGF, static Address emitAddrOfVarFromArray(CodeGenFunction &CGF, Address Array, unsigned Index, const VarDecl *Var) { // Pull out the pointer to the variable. - Address PtrAddr = - CGF.Builder.CreateConstArrayGEP(Array, Index, CGF.getPointerSize()); + Address PtrAddr = CGF.Builder.CreateConstArrayGEP(Array, Index); llvm::Value *Ptr = CGF.Builder.CreateLoad(PtrAddr); Address Addr = Address(Ptr, CGF.getContext().getDeclAlign(Var)); @@ -3206,8 +3206,7 @@ void CGOpenMPRuntime::emitSingleRegion(CodeGenFunction &CGF, Address CopyprivateList = CGF.CreateMemTemp(CopyprivateArrayTy, ".omp.copyprivate.cpr_list"); for (unsigned I = 0, E = CopyprivateVars.size(); I < E; ++I) { - Address Elem = CGF.Builder.CreateConstArrayGEP( - CopyprivateList, I, CGF.getPointerSize()); + Address Elem = CGF.Builder.CreateConstArrayGEP(CopyprivateList, I); CGF.Builder.CreateStore( CGF.Builder.CreatePointerBitCastOrAddrSpaceCast( CGF.EmitLValue(CopyprivateVars[I]).getPointer(), CGF.VoidPtrTy), @@ -3442,7 +3441,7 @@ void CGOpenMPRuntime::emitForDispatchInit( static void emitForStaticInitCall( CodeGenFunction &CGF, llvm::Value *UpdateLocation, llvm::Value *ThreadId, - llvm::Constant *ForStaticInitFunction, OpenMPSchedType Schedule, + llvm::FunctionCallee ForStaticInitFunction, OpenMPSchedType Schedule, OpenMPScheduleClauseModifier M1, OpenMPScheduleClauseModifier M2, const CGOpenMPRuntime::StaticRTInput &Values) { if (!CGF.HaveInsertPoint()) @@ -3503,7 +3502,7 @@ void CGOpenMPRuntime::emitForStaticInit(CodeGenFunction &CGF, ? OMP_IDENT_WORK_LOOP : OMP_IDENT_WORK_SECTIONS); llvm::Value *ThreadId = getThreadID(CGF, Loc); - llvm::Constant *StaticInitFunction = + llvm::FunctionCallee StaticInitFunction = createForStaticInitFunction(Values.IVSize, Values.IVSigned); emitForStaticInitCall(CGF, UpdatedLocation, ThreadId, StaticInitFunction, ScheduleNum, ScheduleKind.M1, ScheduleKind.M2, Values); @@ -3518,7 +3517,7 @@ void CGOpenMPRuntime::emitDistributeStaticInit( llvm::Value *UpdatedLocation = emitUpdateLocation(CGF, Loc, OMP_IDENT_WORK_DISTRIBUTE); llvm::Value *ThreadId = getThreadID(CGF, Loc); - llvm::Constant *StaticInitFunction = + llvm::FunctionCallee StaticInitFunction = createForStaticInitFunction(Values.IVSize, Values.IVSigned); emitForStaticInitCall(CGF, UpdatedLocation, ThreadId, StaticInitFunction, ScheduleNum, OMPC_SCHEDULE_MODIFIER_unknown, @@ -4394,12 +4393,12 @@ createKmpTaskTWithPrivatesRecordDecl(CodeGenModule &CGM, QualType KmpTaskTQTy, /// return 0; /// } /// \endcode -static llvm::Value * +static llvm::Function * emitProxyTaskFunction(CodeGenModule &CGM, SourceLocation Loc, OpenMPDirectiveKind Kind, QualType KmpInt32Ty, QualType KmpTaskTWithPrivatesPtrQTy, QualType KmpTaskTWithPrivatesQTy, QualType KmpTaskTQTy, - QualType SharedsPtrTy, llvm::Value *TaskFunction, + QualType SharedsPtrTy, llvm::Function *TaskFunction, llvm::Value *TaskPrivatesMap) { ASTContext &C = CGM.getContext(); FunctionArgList Args; @@ -4867,7 +4866,7 @@ checkDestructorsRequired(const RecordDecl *KmpTaskTWithPrivatesQTyRD) { CGOpenMPRuntime::TaskResultTy CGOpenMPRuntime::emitTaskInit(CodeGenFunction &CGF, SourceLocation Loc, const OMPExecutableDirective &D, - llvm::Value *TaskFunction, QualType SharedsTy, + llvm::Function *TaskFunction, QualType SharedsTy, Address Shareds, const OMPTaskDataTy &Data) { ASTContext &C = CGM.getContext(); llvm::SmallVector Privates; @@ -4941,7 +4940,7 @@ CGOpenMPRuntime::emitTaskInit(CodeGenFunction &CGF, SourceLocation Loc, // Emit initial values for private copies (if any). llvm::Value *TaskPrivatesMap = nullptr; llvm::Type *TaskPrivatesMapTy = - std::next(cast(TaskFunction)->arg_begin(), 3)->getType(); + std::next(TaskFunction->arg_begin(), 3)->getType(); if (!Privates.empty()) { auto FI = std::next(KmpTaskTWithPrivatesQTyRD->field_begin()); TaskPrivatesMap = emitTaskPrivateMappingFunction( @@ -4955,7 +4954,7 @@ CGOpenMPRuntime::emitTaskInit(CodeGenFunction &CGF, SourceLocation Loc, } // Build a proxy function kmp_int32 .omp_task_entry.(kmp_int32 gtid, // kmp_task_t *tt); - llvm::Value *TaskEntry = emitProxyTaskFunction( + llvm::Function *TaskEntry = emitProxyTaskFunction( CGM, Loc, D.getDirectiveKind(), KmpInt32Ty, KmpTaskTWithPrivatesPtrQTy, KmpTaskTWithPrivatesQTy, KmpTaskTQTy, SharedsPtrTy, TaskFunction, TaskPrivatesMap); @@ -5067,7 +5066,7 @@ CGOpenMPRuntime::emitTaskInit(CodeGenFunction &CGF, SourceLocation Loc, void CGOpenMPRuntime::emitTaskCall(CodeGenFunction &CGF, SourceLocation Loc, const OMPExecutableDirective &D, - llvm::Value *TaskFunction, + llvm::Function *TaskFunction, QualType SharedsTy, Address Shareds, const Expr *IfCond, const OMPTaskDataTy &Data) { @@ -5077,7 +5076,7 @@ void CGOpenMPRuntime::emitTaskCall(CodeGenFunction &CGF, SourceLocation Loc, TaskResultTy Result = emitTaskInit(CGF, Loc, D, TaskFunction, SharedsTy, Shareds, Data); llvm::Value *NewTask = Result.NewTask; - llvm::Value *TaskEntry = Result.TaskEntry; + llvm::Function *TaskEntry = Result.TaskEntry; llvm::Value *NewTaskNewTaskTTy = Result.NewTaskNewTaskTTy; LValue TDBase = Result.TDBase; const RecordDecl *KmpTaskTQTyRD = Result.KmpTaskTQTyRD; @@ -5104,7 +5103,6 @@ void CGOpenMPRuntime::emitTaskCall(CodeGenFunction &CGF, SourceLocation Loc, } else { KmpDependInfoRD = cast(KmpDependInfoTy->getAsTagDecl()); } - CharUnits DependencySize = C.getTypeSizeInChars(KmpDependInfoTy); // Define type kmp_depend_info[]; QualType KmpDependInfoArrayTy = C.getConstantArrayType( KmpDependInfoTy, llvm::APInt(/*numBits=*/64, NumDependencies), @@ -5131,7 +5129,7 @@ void CGOpenMPRuntime::emitTaskCall(CodeGenFunction &CGF, SourceLocation Loc, Size = CGF.getTypeSize(Ty); } LValue Base = CGF.MakeAddrLValue( - CGF.Builder.CreateConstArrayGEP(DependenciesArray, I, DependencySize), + CGF.Builder.CreateConstArrayGEP(DependenciesArray, I), KmpDependInfoTy); // deps[i].base_addr = &; LValue BaseAddrLVal = CGF.EmitLValueForField( @@ -5168,8 +5166,7 @@ void CGOpenMPRuntime::emitTaskCall(CodeGenFunction &CGF, SourceLocation Loc, FlagsLVal); } DependenciesArray = CGF.Builder.CreatePointerBitCastOrAddrSpaceCast( - CGF.Builder.CreateStructGEP(DependenciesArray, 0, CharUnits::Zero()), - CGF.VoidPtrTy); + CGF.Builder.CreateConstArrayGEP(DependenciesArray, 0), CGF.VoidPtrTy); } // NOTE: routine and part_id fields are initialized by __kmpc_omp_task_alloc() @@ -5264,7 +5261,7 @@ void CGOpenMPRuntime::emitTaskCall(CodeGenFunction &CGF, SourceLocation Loc, void CGOpenMPRuntime::emitTaskLoopCall(CodeGenFunction &CGF, SourceLocation Loc, const OMPLoopDirective &D, - llvm::Value *TaskFunction, + llvm::Function *TaskFunction, QualType SharedsTy, Address Shareds, const Expr *IfCond, const OMPTaskDataTy &Data) { @@ -5444,7 +5441,7 @@ static void emitReductionCombiner(CodeGenFunction &CGF, CGF.EmitIgnoredExpr(ReductionOp); } -llvm::Value *CGOpenMPRuntime::emitReductionFunction( +llvm::Function *CGOpenMPRuntime::emitReductionFunction( CodeGenModule &CGM, SourceLocation Loc, llvm::Type *ArgsType, ArrayRef Privates, ArrayRef LHSExprs, ArrayRef RHSExprs, ArrayRef ReductionOps) { @@ -5499,8 +5496,7 @@ llvm::Value *CGOpenMPRuntime::emitReductionFunction( if (PrivTy->isVariablyModifiedType()) { // Get array size and emit VLA type. ++Idx; - Address Elem = - CGF.Builder.CreateConstArrayGEP(LHS, Idx, CGF.getPointerSize()); + Address Elem = CGF.Builder.CreateConstArrayGEP(LHS, Idx); llvm::Value *Ptr = CGF.Builder.CreateLoad(Elem); const VariableArrayType *VLA = CGF.getContext().getAsVariableArrayType(PrivTy); @@ -5638,8 +5634,7 @@ void CGOpenMPRuntime::emitReduction(CodeGenFunction &CGF, SourceLocation Loc, auto IPriv = Privates.begin(); unsigned Idx = 0; for (unsigned I = 0, E = RHSExprs.size(); I < E; ++I, ++IPriv, ++Idx) { - Address Elem = - CGF.Builder.CreateConstArrayGEP(ReductionList, Idx, CGF.getPointerSize()); + Address Elem = CGF.Builder.CreateConstArrayGEP(ReductionList, Idx); CGF.Builder.CreateStore( CGF.Builder.CreatePointerBitCastOrAddrSpaceCast( CGF.EmitLValue(RHSExprs[I]).getPointer(), CGF.VoidPtrTy), @@ -5647,8 +5642,7 @@ void CGOpenMPRuntime::emitReduction(CodeGenFunction &CGF, SourceLocation Loc, if ((*IPriv)->getType()->isVariablyModifiedType()) { // Store array size. ++Idx; - Elem = CGF.Builder.CreateConstArrayGEP(ReductionList, Idx, - CGF.getPointerSize()); + Elem = CGF.Builder.CreateConstArrayGEP(ReductionList, Idx); llvm::Value *Size = CGF.Builder.CreateIntCast( CGF.getVLASize( CGF.getContext().getAsVariableArrayType((*IPriv)->getType())) @@ -5660,7 +5654,7 @@ void CGOpenMPRuntime::emitReduction(CodeGenFunction &CGF, SourceLocation Loc, } // 2. Emit reduce_func(). - llvm::Value *ReductionFn = emitReductionFunction( + llvm::Function *ReductionFn = emitReductionFunction( CGM, Loc, CGF.ConvertTypeForMem(ReductionArrayTy)->getPointerTo(), Privates, LHSExprs, RHSExprs, ReductionOps); @@ -7168,7 +7162,7 @@ class MappableExprsHandler { Address HB = CGF.Builder.CreateConstGEP( CGF.Builder.CreatePointerBitCastOrAddrSpaceCast(LB, CGF.VoidPtrTy), - TypeSize.getQuantity() - 1, CharUnits::One()); + TypeSize.getQuantity() - 1); PartialStruct.HighestElem = { std::numeric_limits::max(), @@ -7202,15 +7196,13 @@ class MappableExprsHandler { Pointers.push_back(LB.getPointer()); Sizes.push_back(Size); Types.push_back(Flags); - LB = CGF.Builder.CreateConstGEP(ComponentLB, 1, - CGF.getPointerSize()); + LB = CGF.Builder.CreateConstGEP(ComponentLB, 1); } BasePointers.push_back(BP.getPointer()); Pointers.push_back(LB.getPointer()); Size = CGF.Builder.CreatePtrDiff( CGF.EmitCastToVoidPtr( - CGF.Builder.CreateConstGEP(HB, 1, CharUnits::One()) - .getPointer()), + CGF.Builder.CreateConstGEP(HB, 1).getPointer()), CGF.EmitCastToVoidPtr(LB.getPointer())); Sizes.push_back(Size); Types.push_back(Flags); @@ -7293,9 +7285,14 @@ class MappableExprsHandler { // A first private variable captured by reference will use only the // 'private ptr' and 'map to' flag. Return the right flags if the captured // declaration is known as first-private in this handler. - if (FirstPrivateDecls.count(Cap.getCapturedVar())) + if (FirstPrivateDecls.count(Cap.getCapturedVar())) { + if (Cap.getCapturedVar()->getType().isConstant(CGF.getContext()) && + Cap.getCaptureKind() == CapturedStmt::VCK_ByRef) + return MappableExprsHandler::OMP_MAP_ALWAYS | + MappableExprsHandler::OMP_MAP_TO; return MappableExprsHandler::OMP_MAP_PRIVATE | MappableExprsHandler::OMP_MAP_TO; + } return MappableExprsHandler::OMP_MAP_TO | MappableExprsHandler::OMP_MAP_FROM; } @@ -7922,9 +7919,6 @@ class MappableExprsHandler { } } else { assert(CI.capturesVariable() && "Expected captured reference."); - CurBasePointers.push_back(CV); - CurPointers.push_back(CV); - const auto *PtrTy = cast(RI.getType().getTypePtr()); QualType ElementType = PtrTy->getPointeeType(); CurSizes.push_back(CGF.getTypeSize(ElementType)); @@ -7932,6 +7926,24 @@ class MappableExprsHandler { // default the value doesn't have to be retrieved. For an aggregate // type, the default is 'tofrom'. CurMapTypes.push_back(getMapModifiersForPrivateClauses(CI)); + const VarDecl *VD = CI.getCapturedVar(); + if (FirstPrivateDecls.count(VD) && + VD->getType().isConstant(CGF.getContext())) { + llvm::Constant *Addr = + CGF.CGM.getOpenMPRuntime().registerTargetFirstprivateCopy(CGF, VD); + // Copy the value of the original variable to the new global copy. + CGF.Builder.CreateMemCpy( + CGF.MakeNaturalAlignAddrLValue(Addr, ElementType).getAddress(), + Address(CV, CGF.getContext().getTypeAlignInChars(ElementType)), + CurSizes.back(), + /*isVolatile=*/false); + // Use new global variable as the base pointers. + CurBasePointers.push_back(Addr); + CurPointers.push_back(Addr); + } else { + CurBasePointers.push_back(CV); + CurPointers.push_back(CV); + } } // Every default map produces a single argument which is a target parameter. CurMapTypes.back() |= OMP_MAP_TARGET_PARAM; @@ -8278,7 +8290,7 @@ void CGOpenMPRuntime::emitTargetNumIterationsCall( void CGOpenMPRuntime::emitTargetCall(CodeGenFunction &CGF, const OMPExecutableDirective &D, - llvm::Value *OutlinedFn, + llvm::Function *OutlinedFn, llvm::Value *OutlinedFnID, const Expr *IfCond, const Expr *Device) { if (!CGF.HaveInsertPoint()) @@ -8733,6 +8745,40 @@ bool CGOpenMPRuntime::emitTargetGlobalVariable(GlobalDecl GD) { return false; } +llvm::Constant * +CGOpenMPRuntime::registerTargetFirstprivateCopy(CodeGenFunction &CGF, + const VarDecl *VD) { + assert(VD->getType().isConstant(CGM.getContext()) && + "Expected constant variable."); + StringRef VarName; + llvm::Constant *Addr; + llvm::GlobalValue::LinkageTypes Linkage; + QualType Ty = VD->getType(); + SmallString<128> Buffer; + { + unsigned DeviceID; + unsigned FileID; + unsigned Line; + getTargetEntryUniqueInfo(CGM.getContext(), VD->getLocation(), DeviceID, + FileID, Line); + llvm::raw_svector_ostream OS(Buffer); + OS << "__omp_offloading_firstprivate_" << llvm::format("_%x", DeviceID) + << llvm::format("_%x_", FileID) << VD->getName() << "_l" << Line; + VarName = OS.str(); + } + Linkage = llvm::GlobalValue::InternalLinkage; + Addr = + getOrCreateInternalVariable(CGM.getTypes().ConvertTypeForMem(Ty), VarName, + getDefaultFirstprivateAddressSpace()); + cast(Addr)->setLinkage(Linkage); + CharUnits VarSize = CGM.getContext().getTypeSizeInChars(Ty); + CGM.addCompilerUsedGlobal(cast(Addr)); + OffloadEntriesInfoManager.registerDeviceGlobalVarEntryInfo( + VarName, Addr, VarSize, + OffloadEntriesInfoManagerTy::OMPTargetGlobalVarEntryTo, Linkage); + return Addr; +} + void CGOpenMPRuntime::registerTargetGlobalVariable(const VarDecl *VD, llvm::Constant *Addr) { llvm::Optional Res = @@ -8871,7 +8917,7 @@ llvm::Function *CGOpenMPRuntime::emitRegistrationFunction() { void CGOpenMPRuntime::emitTeamsCall(CodeGenFunction &CGF, const OMPExecutableDirective &D, SourceLocation Loc, - llvm::Value *OutlinedFn, + llvm::Function *OutlinedFn, ArrayRef CapturedVars) { if (!CGF.HaveInsertPoint()) return; @@ -8888,7 +8934,7 @@ void CGOpenMPRuntime::emitTeamsCall(CodeGenFunction &CGF, RealArgs.append(std::begin(Args), std::end(Args)); RealArgs.append(CapturedVars.begin(), CapturedVars.end()); - llvm::Value *RTLFn = createRuntimeFunction(OMPRTL__kmpc_fork_teams); + llvm::FunctionCallee RTLFn = createRuntimeFunction(OMPRTL__kmpc_fork_teams); CGF.EmitRuntimeCall(RTLFn, RealArgs); } @@ -9439,11 +9485,12 @@ class DoacrossCleanupTy final : public EHScopeStack::Cleanup { static const int DoacrossFinArgs = 2; private: - llvm::Value *RTLFn; + llvm::FunctionCallee RTLFn; llvm::Value *Args[DoacrossFinArgs]; public: - DoacrossCleanupTy(llvm::Value *RTLFn, ArrayRef CallArgs) + DoacrossCleanupTy(llvm::FunctionCallee RTLFn, + ArrayRef CallArgs) : RTLFn(RTLFn) { assert(CallArgs.size() == DoacrossFinArgs); std::copy(CallArgs.begin(), CallArgs.end(), std::begin(Args)); @@ -9490,10 +9537,8 @@ void CGOpenMPRuntime::emitDoacrossInit(CodeGenFunction &CGF, enum { LowerFD = 0, UpperFD, StrideFD }; // Fill dims with data. for (unsigned I = 0, E = NumIterations.size(); I < E; ++I) { - LValue DimsLVal = - CGF.MakeAddrLValue(CGF.Builder.CreateConstArrayGEP( - DimsAddr, I, C.getTypeSizeInChars(KmpDimTy)), - KmpDimTy); + LValue DimsLVal = CGF.MakeAddrLValue( + CGF.Builder.CreateConstArrayGEP(DimsAddr, I), KmpDimTy); // dims.upper = num_iterations; LValue UpperLVal = CGF.EmitLValueForField( DimsLVal, *std::next(RD->field_begin(), UpperFD)); @@ -9516,16 +9561,16 @@ void CGOpenMPRuntime::emitDoacrossInit(CodeGenFunction &CGF, getThreadID(CGF, D.getBeginLoc()), llvm::ConstantInt::getSigned(CGM.Int32Ty, NumIterations.size()), CGF.Builder.CreatePointerBitCastOrAddrSpaceCast( - CGF.Builder - .CreateConstArrayGEP(DimsAddr, 0, C.getTypeSizeInChars(KmpDimTy)) - .getPointer(), + CGF.Builder.CreateConstArrayGEP(DimsAddr, 0).getPointer(), CGM.VoidPtrTy)}; - llvm::Value *RTLFn = createRuntimeFunction(OMPRTL__kmpc_doacross_init); + llvm::FunctionCallee RTLFn = + createRuntimeFunction(OMPRTL__kmpc_doacross_init); CGF.EmitRuntimeCall(RTLFn, Args); llvm::Value *FiniArgs[DoacrossCleanupTy::DoacrossFinArgs] = { emitUpdateLocation(CGF, D.getEndLoc()), getThreadID(CGF, D.getEndLoc())}; - llvm::Value *FiniRTLFn = createRuntimeFunction(OMPRTL__kmpc_doacross_fini); + llvm::FunctionCallee FiniRTLFn = + createRuntimeFunction(OMPRTL__kmpc_doacross_fini); CGF.EHStack.pushCleanup(NormalAndEHCleanup, FiniRTLFn, llvm::makeArrayRef(FiniArgs)); } @@ -9544,20 +9589,14 @@ void CGOpenMPRuntime::emitDoacrossOrdered(CodeGenFunction &CGF, llvm::Value *CntVal = CGF.EmitScalarConversion( CGF.EmitScalarExpr(CounterVal), CounterVal->getType(), Int64Ty, CounterVal->getExprLoc()); - CGF.EmitStoreOfScalar( - CntVal, - CGF.Builder.CreateConstArrayGEP( - CntAddr, I, CGM.getContext().getTypeSizeInChars(Int64Ty)), - /*Volatile=*/false, Int64Ty); + CGF.EmitStoreOfScalar(CntVal, CGF.Builder.CreateConstArrayGEP(CntAddr, I), + /*Volatile=*/false, Int64Ty); } llvm::Value *Args[] = { emitUpdateLocation(CGF, C->getBeginLoc()), getThreadID(CGF, C->getBeginLoc()), - CGF.Builder - .CreateConstArrayGEP(CntAddr, 0, - CGM.getContext().getTypeSizeInChars(Int64Ty)) - .getPointer()}; - llvm::Value *RTLFn; + CGF.Builder.CreateConstArrayGEP(CntAddr, 0).getPointer()}; + llvm::FunctionCallee RTLFn; if (C->getDependencyKind() == OMPC_DEPEND_source) { RTLFn = createRuntimeFunction(OMPRTL__kmpc_doacross_post); } else { @@ -9568,12 +9607,12 @@ void CGOpenMPRuntime::emitDoacrossOrdered(CodeGenFunction &CGF, } void CGOpenMPRuntime::emitCall(CodeGenFunction &CGF, SourceLocation Loc, - llvm::Value *Callee, + llvm::FunctionCallee Callee, ArrayRef Args) const { assert(Loc.isValid() && "Outlined function call location must be valid."); auto DL = ApplyDebugLocation::CreateDefaultArtificial(CGF, Loc); - if (auto *Fn = dyn_cast(Callee)) { + if (auto *Fn = dyn_cast(Callee.getCallee())) { if (Fn->doesNotThrow()) { CGF.EmitNounwindRuntimeCall(Fn, Args); return; @@ -9583,7 +9622,7 @@ void CGOpenMPRuntime::emitCall(CodeGenFunction &CGF, SourceLocation Loc, } void CGOpenMPRuntime::emitOutlinedFunctionCall( - CodeGenFunction &CGF, SourceLocation Loc, llvm::Value *OutlinedFn, + CodeGenFunction &CGF, SourceLocation Loc, llvm::FunctionCallee OutlinedFn, ArrayRef Args) const { emitCall(CGF, Loc, OutlinedFn, Args); } @@ -9599,19 +9638,19 @@ Address CGOpenMPRuntime::getAddressOfLocalVariable(CodeGenFunction &CGF, return Address::invalid(); } -llvm::Value *CGOpenMPSIMDRuntime::emitParallelOutlinedFunction( +llvm::Function *CGOpenMPSIMDRuntime::emitParallelOutlinedFunction( const OMPExecutableDirective &D, const VarDecl *ThreadIDVar, OpenMPDirectiveKind InnermostKind, const RegionCodeGenTy &CodeGen) { llvm_unreachable("Not supported in SIMD-only mode"); } -llvm::Value *CGOpenMPSIMDRuntime::emitTeamsOutlinedFunction( +llvm::Function *CGOpenMPSIMDRuntime::emitTeamsOutlinedFunction( const OMPExecutableDirective &D, const VarDecl *ThreadIDVar, OpenMPDirectiveKind InnermostKind, const RegionCodeGenTy &CodeGen) { llvm_unreachable("Not supported in SIMD-only mode"); } -llvm::Value *CGOpenMPSIMDRuntime::emitTaskOutlinedFunction( +llvm::Function *CGOpenMPSIMDRuntime::emitTaskOutlinedFunction( const OMPExecutableDirective &D, const VarDecl *ThreadIDVar, const VarDecl *PartIDVar, const VarDecl *TaskTVar, OpenMPDirectiveKind InnermostKind, const RegionCodeGenTy &CodeGen, @@ -9621,7 +9660,7 @@ llvm::Value *CGOpenMPSIMDRuntime::emitTaskOutlinedFunction( void CGOpenMPSIMDRuntime::emitParallelCall(CodeGenFunction &CGF, SourceLocation Loc, - llvm::Value *OutlinedFn, + llvm::Function *OutlinedFn, ArrayRef CapturedVars, const Expr *IfCond) { llvm_unreachable("Not supported in SIMD-only mode"); @@ -9752,7 +9791,7 @@ void CGOpenMPSIMDRuntime::emitFlush(CodeGenFunction &CGF, void CGOpenMPSIMDRuntime::emitTaskCall(CodeGenFunction &CGF, SourceLocation Loc, const OMPExecutableDirective &D, - llvm::Value *TaskFunction, + llvm::Function *TaskFunction, QualType SharedsTy, Address Shareds, const Expr *IfCond, const OMPTaskDataTy &Data) { @@ -9761,7 +9800,7 @@ void CGOpenMPSIMDRuntime::emitTaskCall(CodeGenFunction &CGF, SourceLocation Loc, void CGOpenMPSIMDRuntime::emitTaskLoopCall( CodeGenFunction &CGF, SourceLocation Loc, const OMPLoopDirective &D, - llvm::Value *TaskFunction, QualType SharedsTy, Address Shareds, + llvm::Function *TaskFunction, QualType SharedsTy, Address Shareds, const Expr *IfCond, const OMPTaskDataTy &Data) { llvm_unreachable("Not supported in SIMD-only mode"); } @@ -9821,9 +9860,10 @@ void CGOpenMPSIMDRuntime::emitTargetOutlinedFunction( void CGOpenMPSIMDRuntime::emitTargetCall(CodeGenFunction &CGF, const OMPExecutableDirective &D, - llvm::Value *OutlinedFn, + llvm::Function *OutlinedFn, llvm::Value *OutlinedFnID, - const Expr *IfCond, const Expr *Device) { + const Expr *IfCond, + const Expr *Device) { llvm_unreachable("Not supported in SIMD-only mode"); } @@ -9846,7 +9886,7 @@ llvm::Function *CGOpenMPSIMDRuntime::emitRegistrationFunction() { void CGOpenMPSIMDRuntime::emitTeamsCall(CodeGenFunction &CGF, const OMPExecutableDirective &D, SourceLocation Loc, - llvm::Value *OutlinedFn, + llvm::Function *OutlinedFn, ArrayRef CapturedVars) { llvm_unreachable("Not supported in SIMD-only mode"); } diff --git a/clang/lib/CodeGen/CGOpenMPRuntime.h b/clang/lib/CodeGen/CGOpenMPRuntime.h index b23eba9fb4800..58a2358e75444 100644 --- a/clang/lib/CodeGen/CGOpenMPRuntime.h +++ b/clang/lib/CodeGen/CGOpenMPRuntime.h @@ -271,7 +271,8 @@ class CGOpenMPRuntime { virtual StringRef getOutlinedHelperName() const { return ".omp_outlined."; } /// Emits \p Callee function call with arguments \p Args with location \p Loc. - void emitCall(CodeGenFunction &CGF, SourceLocation Loc, llvm::Value *Callee, + void emitCall(CodeGenFunction &CGF, SourceLocation Loc, + llvm::FunctionCallee Callee, ArrayRef Args = llvm::None) const; /// Emits address of the word in a memory where current thread id is @@ -671,23 +672,27 @@ class CGOpenMPRuntime { /// Returns specified OpenMP runtime function. /// \param Function OpenMP runtime function. /// \return Specified function. - llvm::Constant *createRuntimeFunction(unsigned Function); + llvm::FunctionCallee createRuntimeFunction(unsigned Function); /// Returns __kmpc_for_static_init_* runtime function for the specified /// size \a IVSize and sign \a IVSigned. - llvm::Constant *createForStaticInitFunction(unsigned IVSize, bool IVSigned); + llvm::FunctionCallee createForStaticInitFunction(unsigned IVSize, + bool IVSigned); /// Returns __kmpc_dispatch_init_* runtime function for the specified /// size \a IVSize and sign \a IVSigned. - llvm::Constant *createDispatchInitFunction(unsigned IVSize, bool IVSigned); + llvm::FunctionCallee createDispatchInitFunction(unsigned IVSize, + bool IVSigned); /// Returns __kmpc_dispatch_next_* runtime function for the specified /// size \a IVSize and sign \a IVSigned. - llvm::Constant *createDispatchNextFunction(unsigned IVSize, bool IVSigned); + llvm::FunctionCallee createDispatchNextFunction(unsigned IVSize, + bool IVSigned); /// Returns __kmpc_dispatch_fini_* runtime function for the specified /// size \a IVSize and sign \a IVSigned. - llvm::Constant *createDispatchFiniFunction(unsigned IVSize, bool IVSigned); + llvm::FunctionCallee createDispatchFiniFunction(unsigned IVSize, + bool IVSigned); /// If the specified mangled name is not in the module, create and /// return threadprivate cache object. This object is a pointer's worth of @@ -703,7 +708,8 @@ class CGOpenMPRuntime { /// must be the same. /// \param Name Name of the variable. llvm::Constant *getOrCreateInternalVariable(llvm::Type *Ty, - const llvm::Twine &Name); + const llvm::Twine &Name, + unsigned AddressSpace = 0); /// Set of threadprivate variables with the generated initializer. llvm::StringSet<> ThreadPrivateWithDefinition; @@ -723,7 +729,7 @@ class CGOpenMPRuntime { struct TaskResultTy { llvm::Value *NewTask = nullptr; - llvm::Value *TaskEntry = nullptr; + llvm::Function *TaskEntry = nullptr; llvm::Value *NewTaskNewTaskTTy = nullptr; LValue TDBase; const RecordDecl *KmpTaskTQTyRD = nullptr; @@ -753,9 +759,13 @@ class CGOpenMPRuntime { /// state, list of privates etc. TaskResultTy emitTaskInit(CodeGenFunction &CGF, SourceLocation Loc, const OMPExecutableDirective &D, - llvm::Value *TaskFunction, QualType SharedsTy, + llvm::Function *TaskFunction, QualType SharedsTy, Address Shareds, const OMPTaskDataTy &Data); + /// Returns default address space for the constant firstprivates, 0 by + /// default. + virtual unsigned getDefaultFirstprivateAddressSpace() const { return 0; } + public: explicit CGOpenMPRuntime(CodeGenModule &CGM) : CGOpenMPRuntime(CGM, ".", ".") {} @@ -780,7 +790,7 @@ class CGOpenMPRuntime { /// \param InnermostKind Kind of innermost directive (for simple directives it /// is a directive itself, for combined - its innermost directive). /// \param CodeGen Code generation sequence for the \a D directive. - virtual llvm::Value *emitParallelOutlinedFunction( + virtual llvm::Function *emitParallelOutlinedFunction( const OMPExecutableDirective &D, const VarDecl *ThreadIDVar, OpenMPDirectiveKind InnermostKind, const RegionCodeGenTy &CodeGen); @@ -792,7 +802,7 @@ class CGOpenMPRuntime { /// \param InnermostKind Kind of innermost directive (for simple directives it /// is a directive itself, for combined - its innermost directive). /// \param CodeGen Code generation sequence for the \a D directive. - virtual llvm::Value *emitTeamsOutlinedFunction( + virtual llvm::Function *emitTeamsOutlinedFunction( const OMPExecutableDirective &D, const VarDecl *ThreadIDVar, OpenMPDirectiveKind InnermostKind, const RegionCodeGenTy &CodeGen); @@ -811,7 +821,7 @@ class CGOpenMPRuntime { /// \param NumberOfParts Number of parts in untied task. Ignored for tied /// tasks. /// - virtual llvm::Value *emitTaskOutlinedFunction( + virtual llvm::Function *emitTaskOutlinedFunction( const OMPExecutableDirective &D, const VarDecl *ThreadIDVar, const VarDecl *PartIDVar, const VarDecl *TaskTVar, OpenMPDirectiveKind InnermostKind, const RegionCodeGenTy &CodeGen, @@ -832,7 +842,7 @@ class CGOpenMPRuntime { /// specified, nullptr otherwise. /// virtual void emitParallelCall(CodeGenFunction &CGF, SourceLocation Loc, - llvm::Value *OutlinedFn, + llvm::Function *OutlinedFn, ArrayRef CapturedVars, const Expr *IfCond); @@ -1161,7 +1171,7 @@ class CGOpenMPRuntime { /// state, list of privates etc. virtual void emitTaskCall(CodeGenFunction &CGF, SourceLocation Loc, const OMPExecutableDirective &D, - llvm::Value *TaskFunction, QualType SharedsTy, + llvm::Function *TaskFunction, QualType SharedsTy, Address Shareds, const Expr *IfCond, const OMPTaskDataTy &Data); @@ -1194,10 +1204,11 @@ class CGOpenMPRuntime { /// otherwise. /// \param Data Additional data for task generation like tiednsee, final /// state, list of privates etc. - virtual void emitTaskLoopCall( - CodeGenFunction &CGF, SourceLocation Loc, const OMPLoopDirective &D, - llvm::Value *TaskFunction, QualType SharedsTy, Address Shareds, - const Expr *IfCond, const OMPTaskDataTy &Data); + virtual void emitTaskLoopCall(CodeGenFunction &CGF, SourceLocation Loc, + const OMPLoopDirective &D, + llvm::Function *TaskFunction, + QualType SharedsTy, Address Shareds, + const Expr *IfCond, const OMPTaskDataTy &Data); /// Emit code for the directive that does not require outlining. /// @@ -1218,12 +1229,12 @@ class CGOpenMPRuntime { /// \param RHSExprs List of RHS in \a ReductionOps reduction operations. /// \param ReductionOps List of reduction operations in form 'LHS binop RHS' /// or 'operator binop(LHS, RHS)'. - llvm::Value *emitReductionFunction(CodeGenModule &CGM, SourceLocation Loc, - llvm::Type *ArgsType, - ArrayRef Privates, - ArrayRef LHSExprs, - ArrayRef RHSExprs, - ArrayRef ReductionOps); + llvm::Function *emitReductionFunction(CodeGenModule &CGM, SourceLocation Loc, + llvm::Type *ArgsType, + ArrayRef Privates, + ArrayRef LHSExprs, + ArrayRef RHSExprs, + ArrayRef ReductionOps); /// Emits single reduction combiner void emitSingleReductionCombiner(CodeGenFunction &CGF, @@ -1388,7 +1399,7 @@ class CGOpenMPRuntime { /// target directive, or null if no device clause is used. virtual void emitTargetCall(CodeGenFunction &CGF, const OMPExecutableDirective &D, - llvm::Value *OutlinedFn, + llvm::Function *OutlinedFn, llvm::Value *OutlinedFnID, const Expr *IfCond, const Expr *Device); @@ -1408,6 +1419,11 @@ class CGOpenMPRuntime { virtual void registerTargetGlobalVariable(const VarDecl *VD, llvm::Constant *Addr); + /// Registers provided target firstprivate variable as global on the + /// target. + llvm::Constant *registerTargetFirstprivateCopy(CodeGenFunction &CGF, + const VarDecl *VD); + /// Emit the global \a GD if it is meaningful for the target. Returns /// if it was emitted successfully. /// \param GD Global to scan. @@ -1428,7 +1444,7 @@ class CGOpenMPRuntime { /// virtual void emitTeamsCall(CodeGenFunction &CGF, const OMPExecutableDirective &D, - SourceLocation Loc, llvm::Value *OutlinedFn, + SourceLocation Loc, llvm::Function *OutlinedFn, ArrayRef CapturedVars); /// Emits call to void __kmpc_push_num_teams(ident_t *loc, kmp_int32 @@ -1555,7 +1571,7 @@ class CGOpenMPRuntime { /// translating these arguments to correct target-specific arguments. virtual void emitOutlinedFunctionCall(CodeGenFunction &CGF, SourceLocation Loc, - llvm::Value *OutlinedFn, + llvm::FunctionCallee OutlinedFn, ArrayRef Args = llvm::None) const; /// Emits OpenMP-specific function prolog. @@ -1599,7 +1615,7 @@ class CGOpenMPSIMDRuntime final : public CGOpenMPRuntime { /// \param InnermostKind Kind of innermost directive (for simple directives it /// is a directive itself, for combined - its innermost directive). /// \param CodeGen Code generation sequence for the \a D directive. - llvm::Value * + llvm::Function * emitParallelOutlinedFunction(const OMPExecutableDirective &D, const VarDecl *ThreadIDVar, OpenMPDirectiveKind InnermostKind, @@ -1613,7 +1629,7 @@ class CGOpenMPSIMDRuntime final : public CGOpenMPRuntime { /// \param InnermostKind Kind of innermost directive (for simple directives it /// is a directive itself, for combined - its innermost directive). /// \param CodeGen Code generation sequence for the \a D directive. - llvm::Value * + llvm::Function * emitTeamsOutlinedFunction(const OMPExecutableDirective &D, const VarDecl *ThreadIDVar, OpenMPDirectiveKind InnermostKind, @@ -1634,7 +1650,7 @@ class CGOpenMPSIMDRuntime final : public CGOpenMPRuntime { /// \param NumberOfParts Number of parts in untied task. Ignored for tied /// tasks. /// - llvm::Value *emitTaskOutlinedFunction( + llvm::Function *emitTaskOutlinedFunction( const OMPExecutableDirective &D, const VarDecl *ThreadIDVar, const VarDecl *PartIDVar, const VarDecl *TaskTVar, OpenMPDirectiveKind InnermostKind, const RegionCodeGenTy &CodeGen, @@ -1651,7 +1667,7 @@ class CGOpenMPSIMDRuntime final : public CGOpenMPRuntime { /// specified, nullptr otherwise. /// void emitParallelCall(CodeGenFunction &CGF, SourceLocation Loc, - llvm::Value *OutlinedFn, + llvm::Function *OutlinedFn, ArrayRef CapturedVars, const Expr *IfCond) override; @@ -1877,8 +1893,9 @@ class CGOpenMPSIMDRuntime final : public CGOpenMPRuntime { /// \param Data Additional data for task generation like tiednsee, final /// state, list of privates etc. void emitTaskCall(CodeGenFunction &CGF, SourceLocation Loc, - const OMPExecutableDirective &D, llvm::Value *TaskFunction, - QualType SharedsTy, Address Shareds, const Expr *IfCond, + const OMPExecutableDirective &D, + llvm::Function *TaskFunction, QualType SharedsTy, + Address Shareds, const Expr *IfCond, const OMPTaskDataTy &Data) override; /// Emit task region for the taskloop directive. The taskloop region is @@ -1911,7 +1928,7 @@ class CGOpenMPSIMDRuntime final : public CGOpenMPRuntime { /// \param Data Additional data for task generation like tiednsee, final /// state, list of privates etc. void emitTaskLoopCall(CodeGenFunction &CGF, SourceLocation Loc, - const OMPLoopDirective &D, llvm::Value *TaskFunction, + const OMPLoopDirective &D, llvm::Function *TaskFunction, QualType SharedsTy, Address Shareds, const Expr *IfCond, const OMPTaskDataTy &Data) override; @@ -2054,7 +2071,7 @@ class CGOpenMPSIMDRuntime final : public CGOpenMPRuntime { /// \param Device Expression evaluated in device clause associated with the /// target directive, or null if no device clause is used. void emitTargetCall(CodeGenFunction &CGF, const OMPExecutableDirective &D, - llvm::Value *OutlinedFn, llvm::Value *OutlinedFnID, + llvm::Function *OutlinedFn, llvm::Value *OutlinedFnID, const Expr *IfCond, const Expr *Device) override; /// Emit the target regions enclosed in \a GD function definition or @@ -2087,7 +2104,7 @@ class CGOpenMPSIMDRuntime final : public CGOpenMPRuntime { /// variables used in \a OutlinedFn function. /// void emitTeamsCall(CodeGenFunction &CGF, const OMPExecutableDirective &D, - SourceLocation Loc, llvm::Value *OutlinedFn, + SourceLocation Loc, llvm::Function *OutlinedFn, ArrayRef CapturedVars) override; /// Emits call to void __kmpc_push_num_teams(ident_t *loc, kmp_int32 diff --git a/clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp b/clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp index ca9673096ecdb..534f91cd3559c 100644 --- a/clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp +++ b/clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp @@ -60,13 +60,19 @@ enum OpenMPRTLFunctionNVPTX { /// void (*kmp_ShuffleReductFctPtr)(void *rhsData, int16_t lane_id, int16_t /// lane_offset, int16_t shortCircuit), /// void (*kmp_InterWarpCopyFctPtr)(void* src, int32_t warp_num)); - OMPRTL_NVPTX__kmpc_parallel_reduce_nowait_v2, - /// Call to __kmpc_nvptx_teams_reduce_nowait_simple(ident_t *loc, kmp_int32 - /// global_tid, kmp_critical_name *lck) - OMPRTL_NVPTX__kmpc_nvptx_teams_reduce_nowait_simple, - /// Call to __kmpc_nvptx_teams_end_reduce_nowait_simple(ident_t *loc, - /// kmp_int32 global_tid, kmp_critical_name *lck) - OMPRTL_NVPTX__kmpc_nvptx_teams_end_reduce_nowait_simple, + OMPRTL_NVPTX__kmpc_nvptx_parallel_reduce_nowait_v2, + /// Call to __kmpc_nvptx_teams_reduce_nowait_v2(ident_t *loc, kmp_int32 + /// global_tid, void *global_buffer, int32_t num_of_records, void* + /// reduce_data, + /// void (*kmp_ShuffleReductFctPtr)(void *rhsData, int16_t lane_id, int16_t + /// lane_offset, int16_t shortCircuit), + /// void (*kmp_InterWarpCopyFctPtr)(void* src, int32_t warp_num), void + /// (*kmp_ListToGlobalCpyFctPtr)(void *buffer, int idx, void *reduce_data), + /// void (*kmp_GlobalToListCpyFctPtr)(void *buffer, int idx, + /// void *reduce_data), void (*kmp_GlobalToListCpyPtrsFctPtr)(void *buffer, + /// int idx, void *reduce_data), void (*kmp_GlobalToListRedFctPtr)(void + /// *buffer, int idx, void *reduce_data)); + OMPRTL_NVPTX__kmpc_nvptx_teams_reduce_nowait_v2, /// Call to __kmpc_nvptx_end_reduce_nowait(int32_t global_tid); OMPRTL_NVPTX__kmpc_end_reduce_nowait, /// Call to void __kmpc_data_sharing_init_stack(); @@ -105,17 +111,18 @@ enum OpenMPRTLFunctionNVPTX { /// Pre(post)-action for different OpenMP constructs specialized for NVPTX. class NVPTXActionTy final : public PrePostActionTy { - llvm::Value *EnterCallee = nullptr; + llvm::FunctionCallee EnterCallee = nullptr; ArrayRef EnterArgs; - llvm::Value *ExitCallee = nullptr; + llvm::FunctionCallee ExitCallee = nullptr; ArrayRef ExitArgs; bool Conditional = false; llvm::BasicBlock *ContBlock = nullptr; public: - NVPTXActionTy(llvm::Value *EnterCallee, ArrayRef EnterArgs, - llvm::Value *ExitCallee, ArrayRef ExitArgs, - bool Conditional = false) + NVPTXActionTy(llvm::FunctionCallee EnterCallee, + ArrayRef EnterArgs, + llvm::FunctionCallee ExitCallee, + ArrayRef ExitArgs, bool Conditional = false) : EnterCallee(EnterCallee), EnterArgs(EnterArgs), ExitCallee(ExitCallee), ExitArgs(ExitArgs), Conditional(Conditional) {} void Enter(CodeGenFunction &CGF) override { @@ -223,7 +230,7 @@ static RecordDecl *buildRecordForGlobalizedVars( ASTContext &C, ArrayRef EscapedDecls, ArrayRef EscapedDeclsForTeams, llvm::SmallDenseMap - &MappedDeclsFields) { + &MappedDeclsFields, int BufSize) { if (EscapedDecls.empty() && EscapedDeclsForTeams.empty()) return nullptr; SmallVector GlobalizedVars; @@ -269,7 +276,7 @@ static RecordDecl *buildRecordForGlobalizedVars( Field->addAttr(*I); } } else { - llvm::APInt ArraySize(32, WarpSize); + llvm::APInt ArraySize(32, BufSize); Type = C.getConstantArrayType(Type, ArraySize, ArrayType::Normal, 0); Field = FieldDecl::Create( C, GlobalizedRD, Loc, Loc, VD->getIdentifier(), Type, @@ -418,7 +425,7 @@ class CheckVarsEscapingDeclContext final EscapedDeclsForParallel = EscapedDecls.getArrayRef(); GlobalizedRD = ::buildRecordForGlobalizedVars( CGF.getContext(), EscapedDeclsForParallel, EscapedDeclsForTeams, - MappedDeclsFields); + MappedDeclsFields, WarpSize); } public: @@ -1515,14 +1522,14 @@ void CGOpenMPRuntimeNVPTX::emitWorkerLoop(CodeGenFunction &CGF, // directive. auto *ParallelFnTy = llvm::FunctionType::get(CGM.VoidTy, {CGM.Int16Ty, CGM.Int32Ty}, - /*isVarArg=*/false) - ->getPointerTo(); - llvm::Value *WorkFnCast = Bld.CreateBitCast(WorkID, ParallelFnTy); + /*isVarArg=*/false); + llvm::Value *WorkFnCast = + Bld.CreateBitCast(WorkID, ParallelFnTy->getPointerTo()); // Insert call to work function via shared wrapper. The shared // wrapper takes two arguments: // - the parallelism level; // - the thread ID; - emitCall(CGF, WST.Loc, WorkFnCast, + emitCall(CGF, WST.Loc, {ParallelFnTy, WorkFnCast}, {Bld.getInt16(/*ParallelLevel=*/0), getThreadID(CGF, WST.Loc)}); // Go to end of parallel region. CGF.EmitBranch(TerminateBB); @@ -1550,9 +1557,9 @@ void CGOpenMPRuntimeNVPTX::emitWorkerLoop(CodeGenFunction &CGF, /// implementation. Specialized for the NVPTX device. /// \param Function OpenMP runtime function. /// \return Specified function. -llvm::Constant * +llvm::FunctionCallee CGOpenMPRuntimeNVPTX::createNVPTXRuntimeFunction(unsigned Function) { - llvm::Constant *RTLFn = nullptr; + llvm::FunctionCallee RTLFn = nullptr; switch (static_cast(Function)) { case OMPRTL_NVPTX__kmpc_kernel_init: { // Build void __kmpc_kernel_init(kmp_int32 thread_limit, int16_t @@ -1650,7 +1657,7 @@ CGOpenMPRuntimeNVPTX::createNVPTXRuntimeFunction(unsigned Function) { RTLFn = CGM.CreateRuntimeFunction(FnTy, "__kmpc_shuffle_int64"); break; } - case OMPRTL_NVPTX__kmpc_parallel_reduce_nowait_v2: { + case OMPRTL_NVPTX__kmpc_nvptx_parallel_reduce_nowait_v2: { // Build int32_t kmpc_nvptx_parallel_reduce_nowait_v2(ident_t *loc, // kmp_int32 global_tid, kmp_int32 num_vars, size_t reduce_size, void* // reduce_data, void (*kmp_ShuffleReductFctPtr)(void *rhsData, int16_t @@ -1687,28 +1694,47 @@ CGOpenMPRuntimeNVPTX::createNVPTXRuntimeFunction(unsigned Function) { FnTy, /*Name=*/"__kmpc_nvptx_end_reduce_nowait"); break; } - case OMPRTL_NVPTX__kmpc_nvptx_teams_reduce_nowait_simple: { - // Build __kmpc_nvptx_teams_reduce_nowait_simple(ident_t *loc, kmp_int32 - // global_tid, kmp_critical_name *lck) - llvm::Type *TypeParams[] = { - getIdentTyPointerTy(), CGM.Int32Ty, - llvm::PointerType::getUnqual(getKmpCriticalNameTy())}; + case OMPRTL_NVPTX__kmpc_nvptx_teams_reduce_nowait_v2: { + // Build int32_t __kmpc_nvptx_teams_reduce_nowait_v2(ident_t *loc, kmp_int32 + // global_tid, void *global_buffer, int32_t num_of_records, void* + // reduce_data, + // void (*kmp_ShuffleReductFctPtr)(void *rhsData, int16_t lane_id, int16_t + // lane_offset, int16_t shortCircuit), + // void (*kmp_InterWarpCopyFctPtr)(void* src, int32_t warp_num), void + // (*kmp_ListToGlobalCpyFctPtr)(void *buffer, int idx, void *reduce_data), + // void (*kmp_GlobalToListCpyFctPtr)(void *buffer, int idx, + // void *reduce_data), void (*kmp_GlobalToListCpyPtrsFctPtr)(void *buffer, + // int idx, void *reduce_data), void (*kmp_GlobalToListRedFctPtr)(void + // *buffer, int idx, void *reduce_data)); + llvm::Type *ShuffleReduceTypeParams[] = {CGM.VoidPtrTy, CGM.Int16Ty, + CGM.Int16Ty, CGM.Int16Ty}; + auto *ShuffleReduceFnTy = + llvm::FunctionType::get(CGM.VoidTy, ShuffleReduceTypeParams, + /*isVarArg=*/false); + llvm::Type *InterWarpCopyTypeParams[] = {CGM.VoidPtrTy, CGM.Int32Ty}; + auto *InterWarpCopyFnTy = + llvm::FunctionType::get(CGM.VoidTy, InterWarpCopyTypeParams, + /*isVarArg=*/false); + llvm::Type *GlobalListTypeParams[] = {CGM.VoidPtrTy, CGM.IntTy, + CGM.VoidPtrTy}; + auto *GlobalListFnTy = + llvm::FunctionType::get(CGM.VoidTy, GlobalListTypeParams, + /*isVarArg=*/false); + llvm::Type *TypeParams[] = {getIdentTyPointerTy(), + CGM.Int32Ty, + CGM.VoidPtrTy, + CGM.Int32Ty, + CGM.VoidPtrTy, + ShuffleReduceFnTy->getPointerTo(), + InterWarpCopyFnTy->getPointerTo(), + GlobalListFnTy->getPointerTo(), + GlobalListFnTy->getPointerTo(), + GlobalListFnTy->getPointerTo(), + GlobalListFnTy->getPointerTo()}; auto *FnTy = llvm::FunctionType::get(CGM.Int32Ty, TypeParams, /*isVarArg=*/false); RTLFn = CGM.CreateRuntimeFunction( - FnTy, /*Name=*/"__kmpc_nvptx_teams_reduce_nowait_simple"); - break; - } - case OMPRTL_NVPTX__kmpc_nvptx_teams_end_reduce_nowait_simple: { - // Build __kmpc_nvptx_teams_end_reduce_nowait_simple(ident_t *loc, kmp_int32 - // global_tid, kmp_critical_name *lck) - llvm::Type *TypeParams[] = { - getIdentTyPointerTy(), CGM.Int32Ty, - llvm::PointerType::getUnqual(getKmpCriticalNameTy())}; - auto *FnTy = - llvm::FunctionType::get(CGM.VoidTy, TypeParams, /*isVarArg=*/false); - RTLFn = CGM.CreateRuntimeFunction( - FnTy, /*Name=*/"__kmpc_nvptx_teams_end_reduce_nowait_simple"); + FnTy, /*Name=*/"__kmpc_nvptx_teams_reduce_nowait_v2"); break; } case OMPRTL_NVPTX__kmpc_data_sharing_init_stack: { @@ -1809,7 +1835,8 @@ CGOpenMPRuntimeNVPTX::createNVPTXRuntimeFunction(unsigned Function) { auto *FnTy = llvm::FunctionType::get(CGM.VoidTy, TypeParams, /*isVarArg*/ false); RTLFn = CGM.CreateRuntimeFunction(FnTy, /*Name*/ "__kmpc_barrier"); - cast(RTLFn)->addFnAttr(llvm::Attribute::Convergent); + cast(RTLFn.getCallee()) + ->addFnAttr(llvm::Attribute::Convergent); break; } case OMPRTL__kmpc_barrier_simple_spmd: { @@ -1820,7 +1847,8 @@ CGOpenMPRuntimeNVPTX::createNVPTXRuntimeFunction(unsigned Function) { llvm::FunctionType::get(CGM.VoidTy, TypeParams, /*isVarArg*/ false); RTLFn = CGM.CreateRuntimeFunction(FnTy, /*Name*/ "__kmpc_barrier_simple_spmd"); - cast(RTLFn)->addFnAttr(llvm::Attribute::Convergent); + cast(RTLFn.getCallee()) + ->addFnAttr(llvm::Attribute::Convergent); break; } } @@ -1931,7 +1959,7 @@ void CGOpenMPRuntimeNVPTX::emitNumTeamsClause(CodeGenFunction &CGF, const Expr *ThreadLimit, SourceLocation Loc) {} -llvm::Value *CGOpenMPRuntimeNVPTX::emitParallelOutlinedFunction( +llvm::Function *CGOpenMPRuntimeNVPTX::emitParallelOutlinedFunction( const OMPExecutableDirective &D, const VarDecl *ThreadIDVar, OpenMPDirectiveKind InnermostKind, const RegionCodeGenTy &CodeGen) { // Emit target region as a standalone region. @@ -2008,7 +2036,7 @@ getTeamsReductionVars(ASTContext &Ctx, const OMPExecutableDirective &D, } } -llvm::Value *CGOpenMPRuntimeNVPTX::emitTeamsOutlinedFunction( +llvm::Function *CGOpenMPRuntimeNVPTX::emitTeamsOutlinedFunction( const OMPExecutableDirective &D, const VarDecl *ThreadIDVar, OpenMPDirectiveKind InnermostKind, const RegionCodeGenTy &CodeGen) { SourceLocation Loc = D.getBeginLoc(); @@ -2017,13 +2045,14 @@ llvm::Value *CGOpenMPRuntimeNVPTX::emitTeamsOutlinedFunction( llvm::SmallVector LastPrivatesReductions; llvm::SmallDenseMap MappedDeclsFields; // Globalize team reductions variable unconditionally in all modes. - getTeamsReductionVars(CGM.getContext(), D, LastPrivatesReductions); + if (getExecutionMode() != CGOpenMPRuntimeNVPTX::EM_SPMD) + getTeamsReductionVars(CGM.getContext(), D, LastPrivatesReductions); if (getExecutionMode() == CGOpenMPRuntimeNVPTX::EM_SPMD) { getDistributeLastprivateVars(CGM.getContext(), D, LastPrivatesReductions); if (!LastPrivatesReductions.empty()) { GlobalizedRD = ::buildRecordForGlobalizedVars( CGM.getContext(), llvm::None, LastPrivatesReductions, - MappedDeclsFields); + MappedDeclsFields, WarpSize); } } else if (!LastPrivatesReductions.empty()) { assert(!TeamAndReductions.first && @@ -2071,9 +2100,8 @@ llvm::Value *CGOpenMPRuntimeNVPTX::emitTeamsOutlinedFunction( } } Action(Loc, GlobalizedRD, MappedDeclsFields); CodeGen.setAction(Action); - llvm::Value *OutlinedFunVal = CGOpenMPRuntime::emitTeamsOutlinedFunction( + llvm::Function *OutlinedFun = CGOpenMPRuntime::emitTeamsOutlinedFunction( D, ThreadIDVar, InnermostKind, CodeGen); - llvm::Function *OutlinedFun = cast(OutlinedFunVal); OutlinedFun->removeFnAttr(llvm::Attribute::NoInline); OutlinedFun->removeFnAttr(llvm::Attribute::OptimizeNone); OutlinedFun->addFnAttr(llvm::Attribute::AlwaysInline); @@ -2238,8 +2266,7 @@ void CGOpenMPRuntimeNVPTX::emitGenericVarsProlog(CodeGenFunction &CGF, .getPointerType(CGM.getContext().VoidPtrTy) .castAs()); llvm::Value *GlobalRecValue = - Bld.CreateConstInBoundsGEP(FrameAddr, Offset, CharUnits::One()) - .getPointer(); + Bld.CreateConstInBoundsGEP(FrameAddr, Offset).getPointer(); I->getSecond().GlobalRecordAddr = GlobalRecValue; I->getSecond().IsInSPMDModeFlag = nullptr; GlobalRecCastAddr = Bld.CreatePointerBitCastOrAddrSpaceCast( @@ -2432,7 +2459,7 @@ void CGOpenMPRuntimeNVPTX::emitGenericVarsEpilog(CodeGenFunction &CGF, void CGOpenMPRuntimeNVPTX::emitTeamsCall(CodeGenFunction &CGF, const OMPExecutableDirective &D, SourceLocation Loc, - llvm::Value *OutlinedFn, + llvm::Function *OutlinedFn, ArrayRef CapturedVars) { if (!CGF.HaveInsertPoint()) return; @@ -2449,7 +2476,7 @@ void CGOpenMPRuntimeNVPTX::emitTeamsCall(CodeGenFunction &CGF, } void CGOpenMPRuntimeNVPTX::emitParallelCall( - CodeGenFunction &CGF, SourceLocation Loc, llvm::Value *OutlinedFn, + CodeGenFunction &CGF, SourceLocation Loc, llvm::Function *OutlinedFn, ArrayRef CapturedVars, const Expr *IfCond) { if (!CGF.HaveInsertPoint()) return; @@ -2539,8 +2566,7 @@ void CGOpenMPRuntimeNVPTX::emitNonSPMDParallelCall( SharedArgs, Ctx.getPointerType(Ctx.getPointerType(Ctx.VoidPtrTy)) .castAs()); for (llvm::Value *V : CapturedVars) { - Address Dst = Bld.CreateConstInBoundsGEP(SharedArgListAddress, Idx, - CGF.getPointerSize()); + Address Dst = Bld.CreateConstInBoundsGEP(SharedArgListAddress, Idx); llvm::Value *PtrV; if (V->getType()->isIntegerTy()) PtrV = Bld.CreateIntToPtr(V, CGF.VoidPtrTy); @@ -2628,7 +2654,7 @@ void CGOpenMPRuntimeNVPTX::emitNonSPMDParallelCall( } void CGOpenMPRuntimeNVPTX::emitSPMDParallelCall( - CodeGenFunction &CGF, SourceLocation Loc, llvm::Value *OutlinedFn, + CodeGenFunction &CGF, SourceLocation Loc, llvm::Function *OutlinedFn, ArrayRef CapturedVars, const Expr *IfCond) { // Just call the outlined function to execute the parallel region. // OutlinedFn(>id, &zero, CapturedStruct); @@ -2849,7 +2875,7 @@ static void shuffleAndStore(CodeGenFunction &CGF, Address SrcAddr, Address ElemPtr = DestAddr; Address Ptr = SrcAddr; Address PtrEnd = Bld.CreatePointerBitCastOrAddrSpaceCast( - Bld.CreateConstGEP(SrcAddr, 1, Size), CGF.VoidPtrTy); + Bld.CreateConstGEP(SrcAddr, 1), CGF.VoidPtrTy); for (int IntSize = 8; IntSize >= 1; IntSize /= 2) { if (Size < CharUnits::fromQuantity(IntSize)) continue; @@ -2884,10 +2910,8 @@ static void shuffleAndStore(CodeGenFunction &CGF, Address SrcAddr, CGF, CGF.EmitLoadOfScalar(Ptr, /*Volatile=*/false, IntType, Loc), IntType, Offset, Loc); CGF.EmitStoreOfScalar(Res, ElemPtr, /*Volatile=*/false, IntType); - Address LocalPtr = - Bld.CreateConstGEP(Ptr, 1, CharUnits::fromQuantity(IntSize)); - Address LocalElemPtr = - Bld.CreateConstGEP(ElemPtr, 1, CharUnits::fromQuantity(IntSize)); + Address LocalPtr = Bld.CreateConstGEP(Ptr, 1); + Address LocalElemPtr = Bld.CreateConstGEP(ElemPtr, 1); PhiSrc->addIncoming(LocalPtr.getPointer(), ThenBB); PhiDest->addIncoming(LocalElemPtr.getPointer(), ThenBB); CGF.EmitBranch(PreCondBB); @@ -2897,9 +2921,8 @@ static void shuffleAndStore(CodeGenFunction &CGF, Address SrcAddr, CGF, CGF.EmitLoadOfScalar(Ptr, /*Volatile=*/false, IntType, Loc), IntType, Offset, Loc); CGF.EmitStoreOfScalar(Res, ElemPtr, /*Volatile=*/false, IntType); - Ptr = Bld.CreateConstGEP(Ptr, 1, CharUnits::fromQuantity(IntSize)); - ElemPtr = - Bld.CreateConstGEP(ElemPtr, 1, CharUnits::fromQuantity(IntSize)); + Ptr = Bld.CreateConstGEP(Ptr, 1); + ElemPtr = Bld.CreateConstGEP(ElemPtr, 1); } Size = Size % IntSize; } @@ -2962,16 +2985,14 @@ static void emitReductionListCopy( switch (Action) { case RemoteLaneToThread: { // Step 1.1: Get the address for the src element in the Reduce list. - Address SrcElementPtrAddr = - Bld.CreateConstArrayGEP(SrcBase, Idx, CGF.getPointerSize()); + Address SrcElementPtrAddr = Bld.CreateConstArrayGEP(SrcBase, Idx); SrcElementAddr = CGF.EmitLoadOfPointer( SrcElementPtrAddr, C.getPointerType(Private->getType())->castAs()); // Step 1.2: Create a temporary to store the element in the destination // Reduce list. - DestElementPtrAddr = - Bld.CreateConstArrayGEP(DestBase, Idx, CGF.getPointerSize()); + DestElementPtrAddr = Bld.CreateConstArrayGEP(DestBase, Idx); DestElementAddr = CGF.CreateMemTemp(Private->getType(), ".omp.reduction.element"); ShuffleInElement = true; @@ -2980,16 +3001,14 @@ static void emitReductionListCopy( } case ThreadCopy: { // Step 1.1: Get the address for the src element in the Reduce list. - Address SrcElementPtrAddr = - Bld.CreateConstArrayGEP(SrcBase, Idx, CGF.getPointerSize()); + Address SrcElementPtrAddr = Bld.CreateConstArrayGEP(SrcBase, Idx); SrcElementAddr = CGF.EmitLoadOfPointer( SrcElementPtrAddr, C.getPointerType(Private->getType())->castAs()); // Step 1.2: Get the address for dest element. The destination // element has already been created on the thread's stack. - DestElementPtrAddr = - Bld.CreateConstArrayGEP(DestBase, Idx, CGF.getPointerSize()); + DestElementPtrAddr = Bld.CreateConstArrayGEP(DestBase, Idx); DestElementAddr = CGF.EmitLoadOfPointer( DestElementPtrAddr, C.getPointerType(Private->getType())->castAs()); @@ -2997,8 +3016,7 @@ static void emitReductionListCopy( } case ThreadToScratchpad: { // Step 1.1: Get the address for the src element in the Reduce list. - Address SrcElementPtrAddr = - Bld.CreateConstArrayGEP(SrcBase, Idx, CGF.getPointerSize()); + Address SrcElementPtrAddr = Bld.CreateConstArrayGEP(SrcBase, Idx); SrcElementAddr = CGF.EmitLoadOfPointer( SrcElementPtrAddr, C.getPointerType(Private->getType())->castAs()); @@ -3033,8 +3051,7 @@ static void emitReductionListCopy( // Step 1.2: Create a temporary to store the element in the destination // Reduce list. - DestElementPtrAddr = - Bld.CreateConstArrayGEP(DestBase, Idx, CGF.getPointerSize()); + DestElementPtrAddr = Bld.CreateConstArrayGEP(DestBase, Idx); DestElementAddr = CGF.CreateMemTemp(Private->getType(), ".omp.reduction.element"); UpdateDestListPtr = true; @@ -3055,18 +3072,31 @@ static void emitReductionListCopy( shuffleAndStore(CGF, SrcElementAddr, DestElementAddr, Private->getType(), RemoteLaneOffset, Private->getExprLoc()); } else { - if (Private->getType()->isScalarType()) { + switch (CGF.getEvaluationKind(Private->getType())) { + case TEK_Scalar: { llvm::Value *Elem = CGF.EmitLoadOfScalar(SrcElementAddr, /*Volatile=*/false, Private->getType(), Private->getExprLoc()); // Store the source element value to the dest element address. CGF.EmitStoreOfScalar(Elem, DestElementAddr, /*Volatile=*/false, Private->getType()); - } else { + break; + } + case TEK_Complex: { + CodeGenFunction::ComplexPairTy Elem = CGF.EmitLoadOfComplex( + CGF.MakeAddrLValue(SrcElementAddr, Private->getType()), + Private->getExprLoc()); + CGF.EmitStoreOfComplex( + Elem, CGF.MakeAddrLValue(DestElementAddr, Private->getType()), + /*isInit=*/false); + break; + } + case TEK_Aggregate: CGF.EmitAggregateCopy( CGF.MakeAddrLValue(DestElementAddr, Private->getType()), CGF.MakeAddrLValue(SrcElementAddr, Private->getType()), Private->getType(), AggValueSlot::DoesNotOverlap); + break; } } @@ -3150,9 +3180,9 @@ static llvm::Value *emitInterWarpCopyFunction(CodeGenModule &CGM, const CGFunctionInfo &CGFI = CGM.getTypes().arrangeBuiltinFunctionDeclaration(C.VoidTy, Args); - auto *Fn = llvm::Function::Create( - CGM.getTypes().GetFunctionType(CGFI), llvm::GlobalValue::InternalLinkage, - "_omp_reduction_inter_warp_copy_func", &CGM.getModule()); + auto *Fn = llvm::Function::Create(CGM.getTypes().GetFunctionType(CGFI), + llvm::GlobalValue::InternalLinkage, + "_omp_reduction_inter_warp_copy_func", &M); CGM.SetInternalFunctionAttributes(GlobalDecl(), Fn, CGFI); Fn->setDoesNotRecurse(); CodeGenFunction CGF(CGM); @@ -3249,8 +3279,7 @@ static llvm::Value *emitInterWarpCopyFunction(CodeGenModule &CGM, CGF.EmitBlock(ThenBB); // Reduce element = LocalReduceList[i] - Address ElemPtrPtrAddr = - Bld.CreateConstArrayGEP(LocalReduceList, Idx, CGF.getPointerSize()); + Address ElemPtrPtrAddr = Bld.CreateConstArrayGEP(LocalReduceList, Idx); llvm::Value *ElemPtrPtr = CGF.EmitLoadOfScalar( ElemPtrPtrAddr, /*Volatile=*/false, C.VoidPtrTy, SourceLocation()); // elemptr = ((CopyType*)(elemptrptr)) + I @@ -3316,8 +3345,7 @@ static llvm::Value *emitInterWarpCopyFunction(CodeGenModule &CGM, SrcMediumPtr = Bld.CreateElementBitCast(SrcMediumPtr, CopyType); // TargetElemPtr = (CopyType*)(SrcDataAddr[i]) + I - Address TargetElemPtrPtr = - Bld.CreateConstArrayGEP(LocalReduceList, Idx, CGF.getPointerSize()); + Address TargetElemPtrPtr = Bld.CreateConstArrayGEP(LocalReduceList, Idx); llvm::Value *TargetElemPtrVal = CGF.EmitLoadOfScalar( TargetElemPtrPtr, /*Volatile=*/false, C.VoidPtrTy, Loc); Address TargetElemPtr = Address(TargetElemPtrVal, Align); @@ -3421,9 +3449,9 @@ static llvm::Value *emitInterWarpCopyFunction(CodeGenModule &CGM, /// (2k+1)th thread is ignored in the value aggregation. Therefore /// we copy the Reduce list from the (2k+1)th lane to (k+1)th lane so /// that the contiguity assumption still holds. -static llvm::Value *emitShuffleAndReduceFunction( +static llvm::Function *emitShuffleAndReduceFunction( CodeGenModule &CGM, ArrayRef Privates, - QualType ReductionArrayTy, llvm::Value *ReduceFn, SourceLocation Loc) { + QualType ReductionArrayTy, llvm::Function *ReduceFn, SourceLocation Loc) { ASTContext &C = CGM.getContext(); // Thread local Reduce list used to host the values of data to be reduced. @@ -3571,6 +3599,406 @@ static llvm::Value *emitShuffleAndReduceFunction( return Fn; } +/// This function emits a helper that copies all the reduction variables from +/// the team into the provided global buffer for the reduction variables. +/// +/// void list_to_global_copy_func(void *buffer, int Idx, void *reduce_data) +/// For all data entries D in reduce_data: +/// Copy local D to buffer.D[Idx] +static llvm::Value *emitListToGlobalCopyFunction( + CodeGenModule &CGM, ArrayRef Privates, + QualType ReductionArrayTy, SourceLocation Loc, + const RecordDecl *TeamReductionRec, + const llvm::SmallDenseMap + &VarFieldMap) { + ASTContext &C = CGM.getContext(); + + // Buffer: global reduction buffer. + ImplicitParamDecl BufferArg(C, /*DC=*/nullptr, Loc, /*Id=*/nullptr, + C.VoidPtrTy, ImplicitParamDecl::Other); + // Idx: index of the buffer. + ImplicitParamDecl IdxArg(C, /*DC=*/nullptr, Loc, /*Id=*/nullptr, C.IntTy, + ImplicitParamDecl::Other); + // ReduceList: thread local Reduce list. + ImplicitParamDecl ReduceListArg(C, /*DC=*/nullptr, Loc, /*Id=*/nullptr, + C.VoidPtrTy, ImplicitParamDecl::Other); + FunctionArgList Args; + Args.push_back(&BufferArg); + Args.push_back(&IdxArg); + Args.push_back(&ReduceListArg); + + const CGFunctionInfo &CGFI = + CGM.getTypes().arrangeBuiltinFunctionDeclaration(C.VoidTy, Args); + auto *Fn = llvm::Function::Create( + CGM.getTypes().GetFunctionType(CGFI), llvm::GlobalValue::InternalLinkage, + "_omp_reduction_list_to_global_copy_func", &CGM.getModule()); + CGM.SetInternalFunctionAttributes(GlobalDecl(), Fn, CGFI); + Fn->setDoesNotRecurse(); + CodeGenFunction CGF(CGM); + CGF.StartFunction(GlobalDecl(), C.VoidTy, Fn, CGFI, Args, Loc, Loc); + + CGBuilderTy &Bld = CGF.Builder; + + Address AddrReduceListArg = CGF.GetAddrOfLocalVar(&ReduceListArg); + Address AddrBufferArg = CGF.GetAddrOfLocalVar(&BufferArg); + Address LocalReduceList( + Bld.CreatePointerBitCastOrAddrSpaceCast( + CGF.EmitLoadOfScalar(AddrReduceListArg, /*Volatile=*/false, + C.VoidPtrTy, Loc), + CGF.ConvertTypeForMem(ReductionArrayTy)->getPointerTo()), + CGF.getPointerAlign()); + QualType StaticTy = C.getRecordType(TeamReductionRec); + llvm::Type *LLVMReductionsBufferTy = + CGM.getTypes().ConvertTypeForMem(StaticTy); + llvm::Value *BufferArrPtr = Bld.CreatePointerBitCastOrAddrSpaceCast( + CGF.EmitLoadOfScalar(AddrBufferArg, /*Volatile=*/false, C.VoidPtrTy, Loc), + LLVMReductionsBufferTy->getPointerTo()); + llvm::Value *Idxs[] = {llvm::ConstantInt::getNullValue(CGF.Int32Ty), + CGF.EmitLoadOfScalar(CGF.GetAddrOfLocalVar(&IdxArg), + /*Volatile=*/false, C.IntTy, + Loc)}; + unsigned Idx = 0; + for (const Expr *Private : Privates) { + // Reduce element = LocalReduceList[i] + Address ElemPtrPtrAddr = Bld.CreateConstArrayGEP(LocalReduceList, Idx); + llvm::Value *ElemPtrPtr = CGF.EmitLoadOfScalar( + ElemPtrPtrAddr, /*Volatile=*/false, C.VoidPtrTy, SourceLocation()); + // elemptr = ((CopyType*)(elemptrptr)) + I + ElemPtrPtr = Bld.CreatePointerBitCastOrAddrSpaceCast( + ElemPtrPtr, CGF.ConvertTypeForMem(Private->getType())->getPointerTo()); + Address ElemPtr = + Address(ElemPtrPtr, C.getTypeAlignInChars(Private->getType())); + const ValueDecl *VD = cast(Private)->getDecl(); + // Global = Buffer.VD[Idx]; + const FieldDecl *FD = VarFieldMap.lookup(VD); + LValue GlobLVal = CGF.EmitLValueForField( + CGF.MakeNaturalAlignAddrLValue(BufferArrPtr, StaticTy), FD); + llvm::Value *BufferPtr = Bld.CreateInBoundsGEP(GlobLVal.getPointer(), Idxs); + GlobLVal.setAddress(Address(BufferPtr, GlobLVal.getAlignment())); + switch (CGF.getEvaluationKind(Private->getType())) { + case TEK_Scalar: { + llvm::Value *V = CGF.EmitLoadOfScalar(ElemPtr, /*Volatile=*/false, + Private->getType(), Loc); + CGF.EmitStoreOfScalar(V, GlobLVal); + break; + } + case TEK_Complex: { + CodeGenFunction::ComplexPairTy V = CGF.EmitLoadOfComplex( + CGF.MakeAddrLValue(ElemPtr, Private->getType()), Loc); + CGF.EmitStoreOfComplex(V, GlobLVal, /*isInit=*/false); + break; + } + case TEK_Aggregate: + CGF.EmitAggregateCopy(GlobLVal, + CGF.MakeAddrLValue(ElemPtr, Private->getType()), + Private->getType(), AggValueSlot::DoesNotOverlap); + break; + } + ++Idx; + } + + CGF.FinishFunction(); + return Fn; +} + +/// This function emits a helper that reduces all the reduction variables from +/// the team into the provided global buffer for the reduction variables. +/// +/// void list_to_global_reduce_func(void *buffer, int Idx, void *reduce_data) +/// void *GlobPtrs[]; +/// GlobPtrs[0] = (void*)&buffer.D0[Idx]; +/// ... +/// GlobPtrs[N] = (void*)&buffer.DN[Idx]; +/// reduce_function(GlobPtrs, reduce_data); +static llvm::Value *emitListToGlobalReduceFunction( + CodeGenModule &CGM, ArrayRef Privates, + QualType ReductionArrayTy, SourceLocation Loc, + const RecordDecl *TeamReductionRec, + const llvm::SmallDenseMap + &VarFieldMap, + llvm::Function *ReduceFn) { + ASTContext &C = CGM.getContext(); + + // Buffer: global reduction buffer. + ImplicitParamDecl BufferArg(C, /*DC=*/nullptr, Loc, /*Id=*/nullptr, + C.VoidPtrTy, ImplicitParamDecl::Other); + // Idx: index of the buffer. + ImplicitParamDecl IdxArg(C, /*DC=*/nullptr, Loc, /*Id=*/nullptr, C.IntTy, + ImplicitParamDecl::Other); + // ReduceList: thread local Reduce list. + ImplicitParamDecl ReduceListArg(C, /*DC=*/nullptr, Loc, /*Id=*/nullptr, + C.VoidPtrTy, ImplicitParamDecl::Other); + FunctionArgList Args; + Args.push_back(&BufferArg); + Args.push_back(&IdxArg); + Args.push_back(&ReduceListArg); + + const CGFunctionInfo &CGFI = + CGM.getTypes().arrangeBuiltinFunctionDeclaration(C.VoidTy, Args); + auto *Fn = llvm::Function::Create( + CGM.getTypes().GetFunctionType(CGFI), llvm::GlobalValue::InternalLinkage, + "_omp_reduction_list_to_global_reduce_func", &CGM.getModule()); + CGM.SetInternalFunctionAttributes(GlobalDecl(), Fn, CGFI); + Fn->setDoesNotRecurse(); + CodeGenFunction CGF(CGM); + CGF.StartFunction(GlobalDecl(), C.VoidTy, Fn, CGFI, Args, Loc, Loc); + + CGBuilderTy &Bld = CGF.Builder; + + Address AddrBufferArg = CGF.GetAddrOfLocalVar(&BufferArg); + QualType StaticTy = C.getRecordType(TeamReductionRec); + llvm::Type *LLVMReductionsBufferTy = + CGM.getTypes().ConvertTypeForMem(StaticTy); + llvm::Value *BufferArrPtr = Bld.CreatePointerBitCastOrAddrSpaceCast( + CGF.EmitLoadOfScalar(AddrBufferArg, /*Volatile=*/false, C.VoidPtrTy, Loc), + LLVMReductionsBufferTy->getPointerTo()); + + // 1. Build a list of reduction variables. + // void *RedList[] = {[0], ..., [-1]}; + Address ReductionList = + CGF.CreateMemTemp(ReductionArrayTy, ".omp.reduction.red_list"); + auto IPriv = Privates.begin(); + llvm::Value *Idxs[] = {llvm::ConstantInt::getNullValue(CGF.Int32Ty), + CGF.EmitLoadOfScalar(CGF.GetAddrOfLocalVar(&IdxArg), + /*Volatile=*/false, C.IntTy, + Loc)}; + unsigned Idx = 0; + for (unsigned I = 0, E = Privates.size(); I < E; ++I, ++IPriv, ++Idx) { + Address Elem = CGF.Builder.CreateConstArrayGEP(ReductionList, Idx); + // Global = Buffer.VD[Idx]; + const ValueDecl *VD = cast(*IPriv)->getDecl(); + const FieldDecl *FD = VarFieldMap.lookup(VD); + LValue GlobLVal = CGF.EmitLValueForField( + CGF.MakeNaturalAlignAddrLValue(BufferArrPtr, StaticTy), FD); + llvm::Value *BufferPtr = Bld.CreateInBoundsGEP(GlobLVal.getPointer(), Idxs); + llvm::Value *Ptr = CGF.EmitCastToVoidPtr(BufferPtr); + CGF.EmitStoreOfScalar(Ptr, Elem, /*Volatile=*/false, C.VoidPtrTy); + if ((*IPriv)->getType()->isVariablyModifiedType()) { + // Store array size. + ++Idx; + Elem = CGF.Builder.CreateConstArrayGEP(ReductionList, Idx); + llvm::Value *Size = CGF.Builder.CreateIntCast( + CGF.getVLASize( + CGF.getContext().getAsVariableArrayType((*IPriv)->getType())) + .NumElts, + CGF.SizeTy, /*isSigned=*/false); + CGF.Builder.CreateStore(CGF.Builder.CreateIntToPtr(Size, CGF.VoidPtrTy), + Elem); + } + } + + // Call reduce_function(GlobalReduceList, ReduceList) + llvm::Value *GlobalReduceList = + CGF.EmitCastToVoidPtr(ReductionList.getPointer()); + Address AddrReduceListArg = CGF.GetAddrOfLocalVar(&ReduceListArg); + llvm::Value *ReducedPtr = CGF.EmitLoadOfScalar( + AddrReduceListArg, /*Volatile=*/false, C.VoidPtrTy, Loc); + CGM.getOpenMPRuntime().emitOutlinedFunctionCall( + CGF, Loc, ReduceFn, {GlobalReduceList, ReducedPtr}); + CGF.FinishFunction(); + return Fn; +} + +/// This function emits a helper that copies all the reduction variables from +/// the team into the provided global buffer for the reduction variables. +/// +/// void list_to_global_copy_func(void *buffer, int Idx, void *reduce_data) +/// For all data entries D in reduce_data: +/// Copy buffer.D[Idx] to local D; +static llvm::Value *emitGlobalToListCopyFunction( + CodeGenModule &CGM, ArrayRef Privates, + QualType ReductionArrayTy, SourceLocation Loc, + const RecordDecl *TeamReductionRec, + const llvm::SmallDenseMap + &VarFieldMap) { + ASTContext &C = CGM.getContext(); + + // Buffer: global reduction buffer. + ImplicitParamDecl BufferArg(C, /*DC=*/nullptr, Loc, /*Id=*/nullptr, + C.VoidPtrTy, ImplicitParamDecl::Other); + // Idx: index of the buffer. + ImplicitParamDecl IdxArg(C, /*DC=*/nullptr, Loc, /*Id=*/nullptr, C.IntTy, + ImplicitParamDecl::Other); + // ReduceList: thread local Reduce list. + ImplicitParamDecl ReduceListArg(C, /*DC=*/nullptr, Loc, /*Id=*/nullptr, + C.VoidPtrTy, ImplicitParamDecl::Other); + FunctionArgList Args; + Args.push_back(&BufferArg); + Args.push_back(&IdxArg); + Args.push_back(&ReduceListArg); + + const CGFunctionInfo &CGFI = + CGM.getTypes().arrangeBuiltinFunctionDeclaration(C.VoidTy, Args); + auto *Fn = llvm::Function::Create( + CGM.getTypes().GetFunctionType(CGFI), llvm::GlobalValue::InternalLinkage, + "_omp_reduction_global_to_list_copy_func", &CGM.getModule()); + CGM.SetInternalFunctionAttributes(GlobalDecl(), Fn, CGFI); + Fn->setDoesNotRecurse(); + CodeGenFunction CGF(CGM); + CGF.StartFunction(GlobalDecl(), C.VoidTy, Fn, CGFI, Args, Loc, Loc); + + CGBuilderTy &Bld = CGF.Builder; + + Address AddrReduceListArg = CGF.GetAddrOfLocalVar(&ReduceListArg); + Address AddrBufferArg = CGF.GetAddrOfLocalVar(&BufferArg); + Address LocalReduceList( + Bld.CreatePointerBitCastOrAddrSpaceCast( + CGF.EmitLoadOfScalar(AddrReduceListArg, /*Volatile=*/false, + C.VoidPtrTy, Loc), + CGF.ConvertTypeForMem(ReductionArrayTy)->getPointerTo()), + CGF.getPointerAlign()); + QualType StaticTy = C.getRecordType(TeamReductionRec); + llvm::Type *LLVMReductionsBufferTy = + CGM.getTypes().ConvertTypeForMem(StaticTy); + llvm::Value *BufferArrPtr = Bld.CreatePointerBitCastOrAddrSpaceCast( + CGF.EmitLoadOfScalar(AddrBufferArg, /*Volatile=*/false, C.VoidPtrTy, Loc), + LLVMReductionsBufferTy->getPointerTo()); + + llvm::Value *Idxs[] = {llvm::ConstantInt::getNullValue(CGF.Int32Ty), + CGF.EmitLoadOfScalar(CGF.GetAddrOfLocalVar(&IdxArg), + /*Volatile=*/false, C.IntTy, + Loc)}; + unsigned Idx = 0; + for (const Expr *Private : Privates) { + // Reduce element = LocalReduceList[i] + Address ElemPtrPtrAddr = Bld.CreateConstArrayGEP(LocalReduceList, Idx); + llvm::Value *ElemPtrPtr = CGF.EmitLoadOfScalar( + ElemPtrPtrAddr, /*Volatile=*/false, C.VoidPtrTy, SourceLocation()); + // elemptr = ((CopyType*)(elemptrptr)) + I + ElemPtrPtr = Bld.CreatePointerBitCastOrAddrSpaceCast( + ElemPtrPtr, CGF.ConvertTypeForMem(Private->getType())->getPointerTo()); + Address ElemPtr = + Address(ElemPtrPtr, C.getTypeAlignInChars(Private->getType())); + const ValueDecl *VD = cast(Private)->getDecl(); + // Global = Buffer.VD[Idx]; + const FieldDecl *FD = VarFieldMap.lookup(VD); + LValue GlobLVal = CGF.EmitLValueForField( + CGF.MakeNaturalAlignAddrLValue(BufferArrPtr, StaticTy), FD); + llvm::Value *BufferPtr = Bld.CreateInBoundsGEP(GlobLVal.getPointer(), Idxs); + GlobLVal.setAddress(Address(BufferPtr, GlobLVal.getAlignment())); + switch (CGF.getEvaluationKind(Private->getType())) { + case TEK_Scalar: { + llvm::Value *V = CGF.EmitLoadOfScalar(GlobLVal, Loc); + CGF.EmitStoreOfScalar(V, ElemPtr, /*Volatile=*/false, Private->getType()); + break; + } + case TEK_Complex: { + CodeGenFunction::ComplexPairTy V = CGF.EmitLoadOfComplex(GlobLVal, Loc); + CGF.EmitStoreOfComplex(V, CGF.MakeAddrLValue(ElemPtr, Private->getType()), + /*isInit=*/false); + break; + } + case TEK_Aggregate: + CGF.EmitAggregateCopy(CGF.MakeAddrLValue(ElemPtr, Private->getType()), + GlobLVal, Private->getType(), + AggValueSlot::DoesNotOverlap); + break; + } + ++Idx; + } + + CGF.FinishFunction(); + return Fn; +} + +/// This function emits a helper that reduces all the reduction variables from +/// the team into the provided global buffer for the reduction variables. +/// +/// void global_to_list_reduce_func(void *buffer, int Idx, void *reduce_data) +/// void *GlobPtrs[]; +/// GlobPtrs[0] = (void*)&buffer.D0[Idx]; +/// ... +/// GlobPtrs[N] = (void*)&buffer.DN[Idx]; +/// reduce_function(reduce_data, GlobPtrs); +static llvm::Value *emitGlobalToListReduceFunction( + CodeGenModule &CGM, ArrayRef Privates, + QualType ReductionArrayTy, SourceLocation Loc, + const RecordDecl *TeamReductionRec, + const llvm::SmallDenseMap + &VarFieldMap, + llvm::Function *ReduceFn) { + ASTContext &C = CGM.getContext(); + + // Buffer: global reduction buffer. + ImplicitParamDecl BufferArg(C, /*DC=*/nullptr, Loc, /*Id=*/nullptr, + C.VoidPtrTy, ImplicitParamDecl::Other); + // Idx: index of the buffer. + ImplicitParamDecl IdxArg(C, /*DC=*/nullptr, Loc, /*Id=*/nullptr, C.IntTy, + ImplicitParamDecl::Other); + // ReduceList: thread local Reduce list. + ImplicitParamDecl ReduceListArg(C, /*DC=*/nullptr, Loc, /*Id=*/nullptr, + C.VoidPtrTy, ImplicitParamDecl::Other); + FunctionArgList Args; + Args.push_back(&BufferArg); + Args.push_back(&IdxArg); + Args.push_back(&ReduceListArg); + + const CGFunctionInfo &CGFI = + CGM.getTypes().arrangeBuiltinFunctionDeclaration(C.VoidTy, Args); + auto *Fn = llvm::Function::Create( + CGM.getTypes().GetFunctionType(CGFI), llvm::GlobalValue::InternalLinkage, + "_omp_reduction_global_to_list_reduce_func", &CGM.getModule()); + CGM.SetInternalFunctionAttributes(GlobalDecl(), Fn, CGFI); + Fn->setDoesNotRecurse(); + CodeGenFunction CGF(CGM); + CGF.StartFunction(GlobalDecl(), C.VoidTy, Fn, CGFI, Args, Loc, Loc); + + CGBuilderTy &Bld = CGF.Builder; + + Address AddrBufferArg = CGF.GetAddrOfLocalVar(&BufferArg); + QualType StaticTy = C.getRecordType(TeamReductionRec); + llvm::Type *LLVMReductionsBufferTy = + CGM.getTypes().ConvertTypeForMem(StaticTy); + llvm::Value *BufferArrPtr = Bld.CreatePointerBitCastOrAddrSpaceCast( + CGF.EmitLoadOfScalar(AddrBufferArg, /*Volatile=*/false, C.VoidPtrTy, Loc), + LLVMReductionsBufferTy->getPointerTo()); + + // 1. Build a list of reduction variables. + // void *RedList[] = {[0], ..., [-1]}; + Address ReductionList = + CGF.CreateMemTemp(ReductionArrayTy, ".omp.reduction.red_list"); + auto IPriv = Privates.begin(); + llvm::Value *Idxs[] = {llvm::ConstantInt::getNullValue(CGF.Int32Ty), + CGF.EmitLoadOfScalar(CGF.GetAddrOfLocalVar(&IdxArg), + /*Volatile=*/false, C.IntTy, + Loc)}; + unsigned Idx = 0; + for (unsigned I = 0, E = Privates.size(); I < E; ++I, ++IPriv, ++Idx) { + Address Elem = CGF.Builder.CreateConstArrayGEP(ReductionList, Idx); + // Global = Buffer.VD[Idx]; + const ValueDecl *VD = cast(*IPriv)->getDecl(); + const FieldDecl *FD = VarFieldMap.lookup(VD); + LValue GlobLVal = CGF.EmitLValueForField( + CGF.MakeNaturalAlignAddrLValue(BufferArrPtr, StaticTy), FD); + llvm::Value *BufferPtr = Bld.CreateInBoundsGEP(GlobLVal.getPointer(), Idxs); + llvm::Value *Ptr = CGF.EmitCastToVoidPtr(BufferPtr); + CGF.EmitStoreOfScalar(Ptr, Elem, /*Volatile=*/false, C.VoidPtrTy); + if ((*IPriv)->getType()->isVariablyModifiedType()) { + // Store array size. + ++Idx; + Elem = CGF.Builder.CreateConstArrayGEP(ReductionList, Idx); + llvm::Value *Size = CGF.Builder.CreateIntCast( + CGF.getVLASize( + CGF.getContext().getAsVariableArrayType((*IPriv)->getType())) + .NumElts, + CGF.SizeTy, /*isSigned=*/false); + CGF.Builder.CreateStore(CGF.Builder.CreateIntToPtr(Size, CGF.VoidPtrTy), + Elem); + } + } + + // Call reduce_function(ReduceList, GlobalReduceList) + llvm::Value *GlobalReduceList = + CGF.EmitCastToVoidPtr(ReductionList.getPointer()); + Address AddrReduceListArg = CGF.GetAddrOfLocalVar(&ReduceListArg); + llvm::Value *ReducedPtr = CGF.EmitLoadOfScalar( + AddrReduceListArg, /*Volatile=*/false, C.VoidPtrTy, Loc); + CGM.getOpenMPRuntime().emitOutlinedFunctionCall( + CGF, Loc, ReduceFn, {ReducedPtr, GlobalReduceList}); + CGF.FinishFunction(); + return Fn; +} + /// /// Design of OpenMP reductions on the GPU /// @@ -3844,57 +4272,55 @@ void CGOpenMPRuntimeNVPTX::emitReduction( llvm::Value *ThreadId = getThreadID(CGF, Loc); llvm::Value *Res; - if (ParallelReduction) { - ASTContext &C = CGM.getContext(); - // 1. Build a list of reduction variables. - // void *RedList[] = {[0], ..., [-1]}; - auto Size = RHSExprs.size(); - for (const Expr *E : Privates) { - if (E->getType()->isVariablyModifiedType()) - // Reserve place for array size. - ++Size; - } - llvm::APInt ArraySize(/*unsigned int numBits=*/32, Size); - QualType ReductionArrayTy = - C.getConstantArrayType(C.VoidPtrTy, ArraySize, ArrayType::Normal, - /*IndexTypeQuals=*/0); - Address ReductionList = - CGF.CreateMemTemp(ReductionArrayTy, ".omp.reduction.red_list"); - auto IPriv = Privates.begin(); - unsigned Idx = 0; - for (unsigned I = 0, E = RHSExprs.size(); I < E; ++I, ++IPriv, ++Idx) { - Address Elem = CGF.Builder.CreateConstArrayGEP(ReductionList, Idx, - CGF.getPointerSize()); - CGF.Builder.CreateStore( - CGF.Builder.CreatePointerBitCastOrAddrSpaceCast( - CGF.EmitLValue(RHSExprs[I]).getPointer(), CGF.VoidPtrTy), - Elem); - if ((*IPriv)->getType()->isVariablyModifiedType()) { - // Store array size. - ++Idx; - Elem = CGF.Builder.CreateConstArrayGEP(ReductionList, Idx, - CGF.getPointerSize()); - llvm::Value *Size = CGF.Builder.CreateIntCast( - CGF.getVLASize( - CGF.getContext().getAsVariableArrayType((*IPriv)->getType())) - .NumElts, - CGF.SizeTy, /*isSigned=*/false); - CGF.Builder.CreateStore(CGF.Builder.CreateIntToPtr(Size, CGF.VoidPtrTy), - Elem); - } + ASTContext &C = CGM.getContext(); + // 1. Build a list of reduction variables. + // void *RedList[] = {[0], ..., [-1]}; + auto Size = RHSExprs.size(); + for (const Expr *E : Privates) { + if (E->getType()->isVariablyModifiedType()) + // Reserve place for array size. + ++Size; + } + llvm::APInt ArraySize(/*unsigned int numBits=*/32, Size); + QualType ReductionArrayTy = + C.getConstantArrayType(C.VoidPtrTy, ArraySize, ArrayType::Normal, + /*IndexTypeQuals=*/0); + Address ReductionList = + CGF.CreateMemTemp(ReductionArrayTy, ".omp.reduction.red_list"); + auto IPriv = Privates.begin(); + unsigned Idx = 0; + for (unsigned I = 0, E = RHSExprs.size(); I < E; ++I, ++IPriv, ++Idx) { + Address Elem = CGF.Builder.CreateConstArrayGEP(ReductionList, Idx); + CGF.Builder.CreateStore( + CGF.Builder.CreatePointerBitCastOrAddrSpaceCast( + CGF.EmitLValue(RHSExprs[I]).getPointer(), CGF.VoidPtrTy), + Elem); + if ((*IPriv)->getType()->isVariablyModifiedType()) { + // Store array size. + ++Idx; + Elem = CGF.Builder.CreateConstArrayGEP(ReductionList, Idx); + llvm::Value *Size = CGF.Builder.CreateIntCast( + CGF.getVLASize( + CGF.getContext().getAsVariableArrayType((*IPriv)->getType())) + .NumElts, + CGF.SizeTy, /*isSigned=*/false); + CGF.Builder.CreateStore(CGF.Builder.CreateIntToPtr(Size, CGF.VoidPtrTy), + Elem); } + } - llvm::Value *ReductionArrayTySize = CGF.getTypeSize(ReductionArrayTy); - llvm::Value *RL = CGF.Builder.CreatePointerBitCastOrAddrSpaceCast( - ReductionList.getPointer(), CGF.VoidPtrTy); - llvm::Value *ReductionFn = emitReductionFunction( - CGM, Loc, CGF.ConvertTypeForMem(ReductionArrayTy)->getPointerTo(), - Privates, LHSExprs, RHSExprs, ReductionOps); - llvm::Value *ShuffleAndReduceFn = emitShuffleAndReduceFunction( - CGM, Privates, ReductionArrayTy, ReductionFn, Loc); - llvm::Value *InterWarpCopyFn = - emitInterWarpCopyFunction(CGM, Privates, ReductionArrayTy, Loc); + llvm::Value *RL = CGF.Builder.CreatePointerBitCastOrAddrSpaceCast( + ReductionList.getPointer(), CGF.VoidPtrTy); + llvm::Function *ReductionFn = emitReductionFunction( + CGM, Loc, CGF.ConvertTypeForMem(ReductionArrayTy)->getPointerTo(), + Privates, LHSExprs, RHSExprs, ReductionOps); + llvm::Value *ReductionArrayTySize = CGF.getTypeSize(ReductionArrayTy); + llvm::Function *ShuffleAndReduceFn = emitShuffleAndReduceFunction( + CGM, Privates, ReductionArrayTy, ReductionFn, Loc); + llvm::Value *InterWarpCopyFn = + emitInterWarpCopyFunction(CGM, Privates, ReductionArrayTy, Loc); + if (ParallelReduction) { llvm::Value *Args[] = {RTLoc, ThreadId, CGF.Builder.getInt32(RHSExprs.size()), @@ -3903,17 +4329,59 @@ void CGOpenMPRuntimeNVPTX::emitReduction( ShuffleAndReduceFn, InterWarpCopyFn}; - Res = CGF.EmitRuntimeCall(createNVPTXRuntimeFunction( - OMPRTL_NVPTX__kmpc_parallel_reduce_nowait_v2), - Args); + Res = CGF.EmitRuntimeCall( + createNVPTXRuntimeFunction( + OMPRTL_NVPTX__kmpc_nvptx_parallel_reduce_nowait_v2), + Args); } else { assert(TeamsReduction && "expected teams reduction."); - std::string Name = getName({"reduction"}); - llvm::Value *Lock = getCriticalRegionLock(Name); - llvm::Value *Args[] = {RTLoc, ThreadId, Lock}; + llvm::SmallDenseMap VarFieldMap; + llvm::SmallVector PrivatesReductions(Privates.size()); + int Cnt = 0; + for (const Expr *DRE : Privates) { + PrivatesReductions[Cnt] = cast(DRE)->getDecl(); + ++Cnt; + } + const RecordDecl *TeamReductionRec = ::buildRecordForGlobalizedVars( + CGM.getContext(), PrivatesReductions, llvm::None, VarFieldMap, + C.getLangOpts().OpenMPCUDAReductionBufNum); + TeamsReductions.push_back(TeamReductionRec); + if (!KernelTeamsReductionPtr) { + KernelTeamsReductionPtr = new llvm::GlobalVariable( + CGM.getModule(), CGM.VoidPtrTy, /*isConstant=*/true, + llvm::GlobalValue::InternalLinkage, nullptr, + "_openmp_teams_reductions_buffer_$_$ptr"); + } + llvm::Value *GlobalBufferPtr = CGF.EmitLoadOfScalar( + Address(KernelTeamsReductionPtr, CGM.getPointerAlign()), + /*Volatile=*/false, C.getPointerType(C.VoidPtrTy), Loc); + llvm::Value *GlobalToBufferCpyFn = ::emitListToGlobalCopyFunction( + CGM, Privates, ReductionArrayTy, Loc, TeamReductionRec, VarFieldMap); + llvm::Value *GlobalToBufferRedFn = ::emitListToGlobalReduceFunction( + CGM, Privates, ReductionArrayTy, Loc, TeamReductionRec, VarFieldMap, + ReductionFn); + llvm::Value *BufferToGlobalCpyFn = ::emitGlobalToListCopyFunction( + CGM, Privates, ReductionArrayTy, Loc, TeamReductionRec, VarFieldMap); + llvm::Value *BufferToGlobalRedFn = ::emitGlobalToListReduceFunction( + CGM, Privates, ReductionArrayTy, Loc, TeamReductionRec, VarFieldMap, + ReductionFn); + + llvm::Value *Args[] = { + RTLoc, + ThreadId, + GlobalBufferPtr, + CGF.Builder.getInt32(C.getLangOpts().OpenMPCUDAReductionBufNum), + RL, + ShuffleAndReduceFn, + InterWarpCopyFn, + GlobalToBufferCpyFn, + GlobalToBufferRedFn, + BufferToGlobalCpyFn, + BufferToGlobalRedFn}; + Res = CGF.EmitRuntimeCall( createNVPTXRuntimeFunction( - OMPRTL_NVPTX__kmpc_nvptx_teams_reduce_nowait_simple), + OMPRTL_NVPTX__kmpc_nvptx_teams_reduce_nowait_v2), Args); } @@ -3944,30 +4412,14 @@ void CGOpenMPRuntimeNVPTX::emitReduction( ++IRHS; } }; - if (ParallelReduction) { - llvm::Value *EndArgs[] = {ThreadId}; - RegionCodeGenTy RCG(CodeGen); - NVPTXActionTy Action( - nullptr, llvm::None, - createNVPTXRuntimeFunction(OMPRTL_NVPTX__kmpc_end_reduce_nowait), - EndArgs); - RCG.setAction(Action); - RCG(CGF); - } else { - assert(TeamsReduction && "expected teams reduction."); - llvm::Value *RTLoc = emitUpdateLocation(CGF, Loc); - std::string Name = getName({"reduction"}); - llvm::Value *Lock = getCriticalRegionLock(Name); - llvm::Value *EndArgs[] = {RTLoc, ThreadId, Lock}; - RegionCodeGenTy RCG(CodeGen); - NVPTXActionTy Action( - nullptr, llvm::None, - createNVPTXRuntimeFunction( - OMPRTL_NVPTX__kmpc_nvptx_teams_end_reduce_nowait_simple), - EndArgs); - RCG.setAction(Action); - RCG(CGF); - } + llvm::Value *EndArgs[] = {ThreadId}; + RegionCodeGenTy RCG(CodeGen); + NVPTXActionTy Action( + nullptr, llvm::None, + createNVPTXRuntimeFunction(OMPRTL_NVPTX__kmpc_end_reduce_nowait), + EndArgs); + RCG.setAction(Action); + RCG(CGF); // There is no need to emit line number for unconditional branch. (void)ApplyDebugLocation::CreateEmpty(CGF); CGF.EmitBlock(ExitBB, /*IsFinished=*/true); @@ -3986,6 +4438,10 @@ CGOpenMPRuntimeNVPTX::translateParameter(const FieldDecl *FD, if (Attr->getCaptureKind() == OMPC_map) { PointeeTy = CGM.getContext().getAddrSpaceQualType(PointeeTy, LangAS::opencl_global); + } else if (Attr->getCaptureKind() == OMPC_firstprivate && + PointeeTy.isConstant(CGM.getContext())) { + PointeeTy = CGM.getContext().getAddrSpaceQualType(PointeeTy, + LangAS::opencl_generic); } } ArgType = CGM.getContext().getPointerType(PointeeTy); @@ -4037,12 +4493,11 @@ CGOpenMPRuntimeNVPTX::getParameterAddress(CodeGenFunction &CGF, } void CGOpenMPRuntimeNVPTX::emitOutlinedFunctionCall( - CodeGenFunction &CGF, SourceLocation Loc, llvm::Value *OutlinedFn, + CodeGenFunction &CGF, SourceLocation Loc, llvm::FunctionCallee OutlinedFn, ArrayRef Args) const { SmallVector TargetArgs; TargetArgs.reserve(Args.size()); - auto *FnType = - cast(OutlinedFn->getType()->getPointerElementType()); + auto *FnType = OutlinedFn.getFunctionType(); for (unsigned I = 0, E = Args.size(); I < E; ++I) { if (FnType->isVarArg() && FnType->getNumParams() <= I) { TargetArgs.append(std::next(Args.begin(), I), Args.end()); @@ -4140,8 +4595,7 @@ llvm::Function *CGOpenMPRuntimeNVPTX::createParallelDataSharingWrapper( } unsigned Idx = 0; if (isOpenMPLoopBoundSharingDirective(D.getDirectiveKind())) { - Address Src = Bld.CreateConstInBoundsGEP(SharedArgListAddress, Idx, - CGF.getPointerSize()); + Address Src = Bld.CreateConstInBoundsGEP(SharedArgListAddress, Idx); Address TypedAddress = Bld.CreatePointerBitCastOrAddrSpaceCast( Src, CGF.SizeTy->getPointerTo()); llvm::Value *LB = CGF.EmitLoadOfScalar( @@ -4151,8 +4605,7 @@ llvm::Function *CGOpenMPRuntimeNVPTX::createParallelDataSharingWrapper( cast(D).getLowerBoundVariable()->getExprLoc()); Args.emplace_back(LB); ++Idx; - Src = Bld.CreateConstInBoundsGEP(SharedArgListAddress, Idx, - CGF.getPointerSize()); + Src = Bld.CreateConstInBoundsGEP(SharedArgListAddress, Idx); TypedAddress = Bld.CreatePointerBitCastOrAddrSpaceCast( Src, CGF.SizeTy->getPointerTo()); llvm::Value *UB = CGF.EmitLoadOfScalar( @@ -4167,8 +4620,7 @@ llvm::Function *CGOpenMPRuntimeNVPTX::createParallelDataSharingWrapper( ASTContext &CGFContext = CGF.getContext(); for (unsigned I = 0, E = CS.capture_size(); I < E; ++I, ++CI, ++CurField) { QualType ElemTy = CurField->getType(); - Address Src = Bld.CreateConstInBoundsGEP(SharedArgListAddress, I + Idx, - CGF.getPointerSize()); + Address Src = Bld.CreateConstInBoundsGEP(SharedArgListAddress, I + Idx); Address TypedAddress = Bld.CreatePointerBitCastOrAddrSpaceCast( Src, CGF.ConvertTypeForMem(CGFContext.getPointerType(ElemTy))); llvm::Value *Arg = CGF.EmitLoadOfScalar(TypedAddress, @@ -4377,6 +4829,10 @@ void CGOpenMPRuntimeNVPTX::adjustTargetSpecificDataForLambdas( } } +unsigned CGOpenMPRuntimeNVPTX::getDefaultFirstprivateAddressSpace() const { + return CGM.getContext().getTargetAddressSpace(LangAS::cuda_constant); +} + // Get current CudaArch and ignore any unknown values static CudaArch getCudaArch(CodeGenModule &CGM) { if (!CGM.getTarget().hasFeature("ptx")) @@ -4617,5 +5073,33 @@ void CGOpenMPRuntimeNVPTX::clear() { } } } + if (!TeamsReductions.empty()) { + ASTContext &C = CGM.getContext(); + RecordDecl *StaticRD = C.buildImplicitRecord( + "_openmp_teams_reduction_type_$_", RecordDecl::TagKind::TTK_Union); + StaticRD->startDefinition(); + for (const RecordDecl *TeamReductionRec : TeamsReductions) { + QualType RecTy = C.getRecordType(TeamReductionRec); + auto *Field = FieldDecl::Create( + C, StaticRD, SourceLocation(), SourceLocation(), nullptr, RecTy, + C.getTrivialTypeSourceInfo(RecTy, SourceLocation()), + /*BW=*/nullptr, /*Mutable=*/false, + /*InitStyle=*/ICIS_NoInit); + Field->setAccess(AS_public); + StaticRD->addDecl(Field); + } + StaticRD->completeDefinition(); + QualType StaticTy = C.getRecordType(StaticRD); + llvm::Type *LLVMReductionsBufferTy = + CGM.getTypes().ConvertTypeForMem(StaticTy); + auto *GV = new llvm::GlobalVariable( + CGM.getModule(), LLVMReductionsBufferTy, + /*isConstant=*/false, llvm::GlobalValue::CommonLinkage, + llvm::Constant::getNullValue(LLVMReductionsBufferTy), + "_openmp_teams_reductions_buffer_$_"); + KernelTeamsReductionPtr->setInitializer( + llvm::ConstantExpr::getPointerBitCastOrAddrSpaceCast(GV, + CGM.VoidPtrTy)); + } CGOpenMPRuntime::clear(); } diff --git a/clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.h b/clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.h index b3f84c013d783..5e59b64ad1523 100644 --- a/clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.h +++ b/clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.h @@ -171,7 +171,7 @@ class CGOpenMPRuntimeNVPTX : public CGOpenMPRuntime { /// specified, nullptr otherwise. /// void emitSPMDParallelCall(CodeGenFunction &CGF, SourceLocation Loc, - llvm::Value *OutlinedFn, + llvm::Function *OutlinedFn, ArrayRef CapturedVars, const Expr *IfCond); @@ -228,7 +228,7 @@ class CGOpenMPRuntimeNVPTX : public CGOpenMPRuntime { /// \param InnermostKind Kind of innermost directive (for simple directives it /// is a directive itself, for combined - its innermost directive). /// \param CodeGen Code generation sequence for the \a D directive. - llvm::Value * + llvm::Function * emitParallelOutlinedFunction(const OMPExecutableDirective &D, const VarDecl *ThreadIDVar, OpenMPDirectiveKind InnermostKind, @@ -243,7 +243,7 @@ class CGOpenMPRuntimeNVPTX : public CGOpenMPRuntime { /// \param InnermostKind Kind of innermost directive (for simple directives it /// is a directive itself, for combined - its innermost directive). /// \param CodeGen Code generation sequence for the \a D directive. - llvm::Value * + llvm::Function * emitTeamsOutlinedFunction(const OMPExecutableDirective &D, const VarDecl *ThreadIDVar, OpenMPDirectiveKind InnermostKind, @@ -258,7 +258,7 @@ class CGOpenMPRuntimeNVPTX : public CGOpenMPRuntime { /// variables used in \a OutlinedFn function. /// void emitTeamsCall(CodeGenFunction &CGF, const OMPExecutableDirective &D, - SourceLocation Loc, llvm::Value *OutlinedFn, + SourceLocation Loc, llvm::Function *OutlinedFn, ArrayRef CapturedVars) override; /// Emits code for parallel or serial call of the \a OutlinedFn with @@ -271,7 +271,7 @@ class CGOpenMPRuntimeNVPTX : public CGOpenMPRuntime { /// \param IfCond Condition in the associated 'if' clause, if it was /// specified, nullptr otherwise. void emitParallelCall(CodeGenFunction &CGF, SourceLocation Loc, - llvm::Value *OutlinedFn, + llvm::Function *OutlinedFn, ArrayRef CapturedVars, const Expr *IfCond) override; @@ -321,7 +321,7 @@ class CGOpenMPRuntimeNVPTX : public CGOpenMPRuntime { /// implementation. Specialized for the NVPTX device. /// \param Function OpenMP runtime function. /// \return Specified function. - llvm::Constant *createNVPTXRuntimeFunction(unsigned Function); + llvm::FunctionCallee createNVPTXRuntimeFunction(unsigned Function); /// Translates the native parameter of outlined function if this is required /// for target. @@ -340,7 +340,7 @@ class CGOpenMPRuntimeNVPTX : public CGOpenMPRuntime { /// Emits call of the outlined function with the provided arguments, /// translating these arguments to correct target-specific arguments. void emitOutlinedFunctionCall( - CodeGenFunction &CGF, SourceLocation Loc, llvm::Value *OutlinedFn, + CodeGenFunction &CGF, SourceLocation Loc, llvm::FunctionCallee OutlinedFn, ArrayRef Args = llvm::None) const override; /// Emits OpenMP-specific function prolog. @@ -386,6 +386,10 @@ class CGOpenMPRuntimeNVPTX : public CGOpenMPRuntime { void checkArchForUnifiedAddressing(CodeGenModule &CGM, const OMPRequiresDecl *D) const override; + /// Returns default address space for the constant firstprivates, __constant__ + /// address space by default. + unsigned getDefaultFirstprivateAddressSpace() const override; + private: /// Track the execution mode when codegening directives within a target /// region. The appropriate mode (SPMD/NON-SPMD) is set on entry to the @@ -461,6 +465,12 @@ class CGOpenMPRuntimeNVPTX : public CGOpenMPRuntime { unsigned RegionCounter = 0; }; llvm::SmallVector GlobalizedRecords; + llvm::GlobalVariable *KernelTeamsReductionPtr = nullptr; + /// List of the records with the list of fields for the reductions across the + /// teams. Used to build the intermediate buffer for the fast teams + /// reductions. + /// All the records are gathered into a union `union.type` is created. + llvm::SmallVector TeamsReductions; /// Shared pointer for the global memory in the global memory buffer used for /// the given kernel. llvm::GlobalVariable *KernelStaticGlobalized = nullptr; diff --git a/clang/lib/CodeGen/CGStmt.cpp b/clang/lib/CodeGen/CGStmt.cpp index db3f4f142dcad..5b5113b1e7e45 100644 --- a/clang/lib/CodeGen/CGStmt.cpp +++ b/clang/lib/CodeGen/CGStmt.cpp @@ -391,26 +391,35 @@ CodeGenFunction::EmitCompoundStmtWithoutScope(const CompoundStmt &S, // at the end of a statement expression, they yield the value of their // subexpression. Handle this by walking through all labels we encounter, // emitting them before we evaluate the subexpr. + // Similar issues arise for attributed statements. const Stmt *LastStmt = S.body_back(); - while (const LabelStmt *LS = dyn_cast(LastStmt)) { - EmitLabel(LS->getDecl()); - LastStmt = LS->getSubStmt(); + while (!isa(LastStmt)) { + if (const auto *LS = dyn_cast(LastStmt)) { + EmitLabel(LS->getDecl()); + LastStmt = LS->getSubStmt(); + } else if (const auto *AS = dyn_cast(LastStmt)) { + // FIXME: Update this if we ever have attributes that affect the + // semantics of an expression. + LastStmt = AS->getSubStmt(); + } else { + llvm_unreachable("unknown value statement"); + } } EnsureInsertPoint(); - QualType ExprTy = cast(LastStmt)->getType(); + const Expr *E = cast(LastStmt); + QualType ExprTy = E->getType(); if (hasAggregateEvaluationKind(ExprTy)) { - EmitAggExpr(cast(LastStmt), AggSlot); + EmitAggExpr(E, AggSlot); } else { // We can't return an RValue here because there might be cleanups at // the end of the StmtExpr. Because of that, we have to emit the result // here into a temporary alloca. RetAlloca = CreateMemTemp(ExprTy); - EmitAnyExprToMem(cast(LastStmt), RetAlloca, Qualifiers(), - /*IsInit*/false); + EmitAnyExprToMem(E, RetAlloca, Qualifiers(), + /*IsInit*/ false); } - } return RetAlloca; diff --git a/clang/lib/CodeGen/CGStmtOpenMP.cpp b/clang/lib/CodeGen/CGStmtOpenMP.cpp index a38e0afc6005f..020f0b224833c 100644 --- a/clang/lib/CodeGen/CGStmtOpenMP.cpp +++ b/clang/lib/CodeGen/CGStmtOpenMP.cpp @@ -725,6 +725,9 @@ bool CodeGenFunction::EmitOMPFirstprivateClause(const OMPExecutableDirective &D, OMPPrivateScope &PrivateScope) { if (!HaveInsertPoint()) return false; + bool DeviceConstTarget = + getLangOpts().OpenMPIsDevice && + isOpenMPTargetExecutionDirective(D.getDirectiveKind()); bool FirstprivateIsLastprivate = false; llvm::DenseSet Lastprivates; for (const auto *C : D.getClausesOfKind()) { @@ -754,6 +757,16 @@ bool CodeGenFunction::EmitOMPFirstprivateClause(const OMPExecutableDirective &D, ++InitsRef; continue; } + // Do not emit copy for firstprivate constant variables in target regions, + // captured by reference. + if (DeviceConstTarget && OrigVD->getType().isConstant(getContext()) && + FD && FD->getType()->isReferenceType()) { + (void)CGM.getOpenMPRuntime().registerTargetFirstprivateCopy(*this, + OrigVD); + ++IRef; + ++InitsRef; + continue; + } FirstprivateIsLastprivate = FirstprivateIsLastprivate || ThisFirstprivateIsLastprivate; if (EmittedAsFirstprivate.insert(OrigVD->getCanonicalDecl()).second) { @@ -1225,7 +1238,7 @@ static void emitCommonOMPParallelDirective( OpenMPDirectiveKind InnermostKind, const RegionCodeGenTy &CodeGen, const CodeGenBoundParametersTy &CodeGenBoundParameters) { const CapturedStmt *CS = S.getCapturedStmt(OMPD_parallel); - llvm::Value *OutlinedFn = + llvm::Function *OutlinedFn = CGF.CGM.getOpenMPRuntime().emitParallelOutlinedFunction( S, *CS->getCapturedDecl()->param_begin(), InnermostKind, CodeGen); if (const auto *NumThreadsClause = S.getSingleClause()) { @@ -2891,6 +2904,8 @@ void CodeGenFunction::EmitOMPTaskBasedDirective( OMPPrivateScope Scope(CGF); if (!Data.PrivateVars.empty() || !Data.FirstprivateVars.empty() || !Data.LastprivateVars.empty()) { + llvm::FunctionType *CopyFnTy = llvm::FunctionType::get( + CGF.Builder.getVoidTy(), {CGF.Builder.getInt8PtrTy()}, true); enum { PrivatesParam = 2, CopyFnParam = 3 }; llvm::Value *CopyFn = CGF.Builder.CreateLoad( CGF.GetAddrOfLocalVar(CS->getCapturedDecl()->getParam(CopyFnParam))); @@ -2923,8 +2938,8 @@ void CodeGenFunction::EmitOMPTaskBasedDirective( PrivatePtrs.emplace_back(VD, PrivatePtr); CallArgs.push_back(PrivatePtr.getPointer()); } - CGF.CGM.getOpenMPRuntime().emitOutlinedFunctionCall(CGF, S.getBeginLoc(), - CopyFn, CallArgs); + CGF.CGM.getOpenMPRuntime().emitOutlinedFunctionCall( + CGF, S.getBeginLoc(), {CopyFnTy, CopyFn}, CallArgs); for (const auto &Pair : LastprivateDstsOrigs) { const auto *OrigVD = cast(Pair.second->getDecl()); DeclRefExpr DRE(CGF.getContext(), const_cast(OrigVD), @@ -3026,7 +3041,7 @@ void CodeGenFunction::EmitOMPTaskBasedDirective( Action.Enter(CGF); BodyGen(CGF); }; - llvm::Value *OutlinedFn = CGM.getOpenMPRuntime().emitTaskOutlinedFunction( + llvm::Function *OutlinedFn = CGM.getOpenMPRuntime().emitTaskOutlinedFunction( S, *I, *PartId, *TaskT, S.getDirectiveKind(), CodeGen, Data.Tied, Data.NumberOfParts); OMPLexicalScope Scope(*this, S); @@ -3125,6 +3140,8 @@ void CodeGenFunction::EmitOMPTargetTaskBasedDirective( // Set proper addresses for generated private copies. OMPPrivateScope Scope(CGF); if (!Data.FirstprivateVars.empty()) { + llvm::FunctionType *CopyFnTy = llvm::FunctionType::get( + CGF.Builder.getVoidTy(), {CGF.Builder.getInt8PtrTy()}, true); enum { PrivatesParam = 2, CopyFnParam = 3 }; llvm::Value *CopyFn = CGF.Builder.CreateLoad( CGF.GetAddrOfLocalVar(CS->getCapturedDecl()->getParam(CopyFnParam))); @@ -3142,8 +3159,8 @@ void CodeGenFunction::EmitOMPTargetTaskBasedDirective( PrivatePtrs.emplace_back(VD, PrivatePtr); CallArgs.push_back(PrivatePtr.getPointer()); } - CGF.CGM.getOpenMPRuntime().emitOutlinedFunctionCall(CGF, S.getBeginLoc(), - CopyFn, CallArgs); + CGF.CGM.getOpenMPRuntime().emitOutlinedFunctionCall( + CGF, S.getBeginLoc(), {CopyFnTy, CopyFn}, CallArgs); for (const auto &Pair : PrivatePtrs) { Address Replacement(CGF.Builder.CreateLoad(Pair.second), CGF.getContext().getDeclAlign(Pair.first)); @@ -3154,18 +3171,18 @@ void CodeGenFunction::EmitOMPTargetTaskBasedDirective( (void)Scope.Privatize(); if (InputInfo.NumberOfTargetItems > 0) { InputInfo.BasePointersArray = CGF.Builder.CreateConstArrayGEP( - CGF.GetAddrOfLocalVar(BPVD), /*Index=*/0, CGF.getPointerSize()); + CGF.GetAddrOfLocalVar(BPVD), /*Index=*/0); InputInfo.PointersArray = CGF.Builder.CreateConstArrayGEP( - CGF.GetAddrOfLocalVar(PVD), /*Index=*/0, CGF.getPointerSize()); + CGF.GetAddrOfLocalVar(PVD), /*Index=*/0); InputInfo.SizesArray = CGF.Builder.CreateConstArrayGEP( - CGF.GetAddrOfLocalVar(SVD), /*Index=*/0, CGF.getSizeSize()); + CGF.GetAddrOfLocalVar(SVD), /*Index=*/0); } Action.Enter(CGF); OMPLexicalScope LexScope(CGF, S, OMPD_task, /*EmitPreInitStmt=*/false); BodyGen(CGF); }; - llvm::Value *OutlinedFn = CGM.getOpenMPRuntime().emitTaskOutlinedFunction( + llvm::Function *OutlinedFn = CGM.getOpenMPRuntime().emitTaskOutlinedFunction( S, *I, *PartId, *TaskT, S.getDirectiveKind(), CodeGen, /*Tied=*/true, Data.NumberOfParts); llvm::APInt TrueOrFalse(32, S.hasClausesOfKind() ? 1 : 0); @@ -3198,7 +3215,7 @@ void CodeGenFunction::EmitOMPTaskDirective(const OMPTaskDirective &S) { CGF.EmitStmt(CS->getCapturedStmt()); }; auto &&TaskGen = [&S, SharedsTy, CapturedStruct, - IfCond](CodeGenFunction &CGF, llvm::Value *OutlinedFn, + IfCond](CodeGenFunction &CGF, llvm::Function *OutlinedFn, const OMPTaskDataTy &Data) { CGF.CGM.getOpenMPRuntime().emitTaskCall(CGF, S.getBeginLoc(), S, OutlinedFn, SharedsTy, CapturedStruct, IfCond, @@ -4123,7 +4140,7 @@ static void emitCommonOMPTeamsDirective(CodeGenFunction &CGF, OpenMPDirectiveKind InnermostKind, const RegionCodeGenTy &CodeGen) { const CapturedStmt *CS = S.getCapturedStmt(OMPD_teams); - llvm::Value *OutlinedFn = + llvm::Function *OutlinedFn = CGF.CGM.getOpenMPRuntime().emitTeamsOutlinedFunction( S, *CS->getCapturedDecl()->param_begin(), InnermostKind, CodeGen); @@ -4969,7 +4986,7 @@ void CodeGenFunction::EmitOMPTaskLoopBasedDirective(const OMPLoopDirective &S) { } }; auto &&TaskGen = [&S, SharedsTy, CapturedStruct, - IfCond](CodeGenFunction &CGF, llvm::Value *OutlinedFn, + IfCond](CodeGenFunction &CGF, llvm::Function *OutlinedFn, const OMPTaskDataTy &Data) { auto &&CodeGen = [&S, OutlinedFn, SharedsTy, CapturedStruct, IfCond, &Data](CodeGenFunction &CGF, PrePostActionTy &) { diff --git a/clang/lib/CodeGen/CGVTables.cpp b/clang/lib/CodeGen/CGVTables.cpp index 702e18daac876..3cb3d35448389 100644 --- a/clang/lib/CodeGen/CGVTables.cpp +++ b/clang/lib/CodeGen/CGVTables.cpp @@ -278,7 +278,7 @@ void CodeGenFunction::FinishThunk() { FinishFunction(); } -void CodeGenFunction::EmitCallAndReturnForThunk(llvm::Constant *CalleePtr, +void CodeGenFunction::EmitCallAndReturnForThunk(llvm::FunctionCallee Callee, const ThunkInfo *Thunk, bool IsUnprototyped) { assert(isa(CurGD.getDecl()) && @@ -303,7 +303,7 @@ void CodeGenFunction::EmitCallAndReturnForThunk(llvm::Constant *CalleePtr, CGM.ErrorUnsupported( MD, "non-trivial argument copy for return-adjusting thunk"); } - EmitMustTailThunk(CurGD, AdjustedThisPtr, CalleePtr); + EmitMustTailThunk(CurGD, AdjustedThisPtr, Callee); return; } @@ -354,8 +354,8 @@ void CodeGenFunction::EmitCallAndReturnForThunk(llvm::Constant *CalleePtr, // Now emit our call. llvm::CallBase *CallOrInvoke; - CGCallee Callee = CGCallee::forDirect(CalleePtr, CurGD); - RValue RV = EmitCall(*CurFnInfo, Callee, Slot, CallArgs, &CallOrInvoke); + RValue RV = EmitCall(*CurFnInfo, CGCallee::forDirect(Callee, CurGD), Slot, + CallArgs, &CallOrInvoke); // Consider return adjustment if we have ThunkInfo. if (Thunk && !Thunk->Return.isEmpty()) @@ -375,7 +375,7 @@ void CodeGenFunction::EmitCallAndReturnForThunk(llvm::Constant *CalleePtr, void CodeGenFunction::EmitMustTailThunk(GlobalDecl GD, llvm::Value *AdjustedThisPtr, - llvm::Value *CalleePtr) { + llvm::FunctionCallee Callee) { // Emitting a musttail call thunk doesn't use any of the CGCall.cpp machinery // to translate AST arguments into LLVM IR arguments. For thunks, we know // that the caller prototype more or less matches the callee prototype with @@ -404,14 +404,14 @@ void CodeGenFunction::EmitMustTailThunk(GlobalDecl GD, // Emit the musttail call manually. Even if the prologue pushed cleanups, we // don't actually want to run them. - llvm::CallInst *Call = Builder.CreateCall(CalleePtr, Args); + llvm::CallInst *Call = Builder.CreateCall(Callee, Args); Call->setTailCallKind(llvm::CallInst::TCK_MustTail); // Apply the standard set of call attributes. unsigned CallingConv; llvm::AttributeList Attrs; - CGM.ConstructAttributeList(CalleePtr->getName(), *CurFnInfo, GD, Attrs, - CallingConv, /*AttrOnCallSite=*/true); + CGM.ConstructAttributeList(Callee.getCallee()->getName(), *CurFnInfo, GD, + Attrs, CallingConv, /*AttrOnCallSite=*/true); Call->setAttributes(Attrs); Call->setCallingConv(static_cast(CallingConv)); @@ -449,7 +449,8 @@ void CodeGenFunction::generateThunk(llvm::Function *Fn, Callee = llvm::ConstantExpr::getBitCast(Callee, Fn->getType()); // Make the call and return the result. - EmitCallAndReturnForThunk(Callee, &Thunk, IsUnprototyped); + EmitCallAndReturnForThunk(llvm::FunctionCallee(Fn->getFunctionType(), Callee), + &Thunk, IsUnprototyped); } static bool shouldEmitVTableThunk(CodeGenModule &CGM, const CXXMethodDecl *MD, @@ -648,7 +649,8 @@ void CodeGenVTables::addVTableComponent( auto getSpecialVirtualFn = [&](StringRef name) { llvm::FunctionType *fnTy = llvm::FunctionType::get(CGM.VoidTy, /*isVarArg=*/false); - llvm::Constant *fn = CGM.CreateRuntimeFunction(fnTy, name); + llvm::Constant *fn = cast( + CGM.CreateRuntimeFunction(fnTy, name).getCallee()); if (auto f = dyn_cast(fn)) f->setUnnamedAddr(llvm::GlobalValue::UnnamedAddr::Global); return llvm::ConstantExpr::getBitCast(fn, CGM.Int8PtrTy); @@ -759,7 +761,6 @@ CodeGenVTables::GenerateConstructionVTable(const CXXRecordDecl *RD, // Create the variable that will hold the construction vtable. llvm::GlobalVariable *VTable = CGM.CreateOrReplaceCXXRuntimeVariable(Name, VTType, Linkage, Align); - CGM.setGVProperties(VTable, RD); // V-tables are always unnamed_addr. VTable->setUnnamedAddr(llvm::GlobalValue::UnnamedAddr::Global); @@ -773,6 +774,11 @@ CodeGenVTables::GenerateConstructionVTable(const CXXRecordDecl *RD, createVTableInitializer(components, *VTLayout, RTTI); components.finishAndSetAsInitializer(VTable); + // Set properties only after the initializer has been set to ensure that the + // GV is treated as definition and not declaration. + assert(!VTable->isDeclaration() && "Shouldn't set properties on declaration"); + CGM.setGVProperties(VTable, RD); + CGM.EmitVTableTypeMetadata(VTable, *VTLayout.get()); return VTable; diff --git a/clang/lib/CodeGen/CMakeLists.txt b/clang/lib/CodeGen/CMakeLists.txt index a3b1069feca54..f83bc04f4eb05 100644 --- a/clang/lib/CodeGen/CMakeLists.txt +++ b/clang/lib/CodeGen/CMakeLists.txt @@ -24,7 +24,6 @@ set(LLVM_LINK_COMPONENTS Target TransformUtils ASFixer - SPIRVLib ) # In a standard Clang+LLVM build, we need to generate intrinsics before diff --git a/clang/lib/CodeGen/CodeGenAction.cpp b/clang/lib/CodeGen/CodeGenAction.cpp index 52d7962bb63e6..0b631f72e6e4a 100644 --- a/clang/lib/CodeGen/CodeGenAction.cpp +++ b/clang/lib/CodeGen/CodeGenAction.cpp @@ -836,8 +836,6 @@ GetOutputStream(CompilerInstance &CI, StringRef InFile, BackendAction Action) { return CI.createDefaultOutputFile(false, InFile, "ll"); case Backend_EmitBC: return CI.createDefaultOutputFile(true, InFile, "bc"); - case Backend_EmitSPIRV: - return CI.createDefaultOutputFile(true, InFile, "spv"); case Backend_EmitNothing: return nullptr; case Backend_EmitMCNull: @@ -1059,10 +1057,6 @@ void EmitBCAction::anchor() { } EmitBCAction::EmitBCAction(llvm::LLVMContext *_VMContext) : CodeGenAction(Backend_EmitBC, _VMContext) {} -void EmitSPIRVAction::anchor() { } -EmitSPIRVAction::EmitSPIRVAction(llvm::LLVMContext *_VMContext) - : CodeGenAction(Backend_EmitSPIRV, _VMContext) {} - void EmitLLVMAction::anchor() { } EmitLLVMAction::EmitLLVMAction(llvm::LLVMContext *_VMContext) : CodeGenAction(Backend_EmitLL, _VMContext) {} diff --git a/clang/lib/CodeGen/CodeGenFunction.cpp b/clang/lib/CodeGen/CodeGenFunction.cpp index 470f8aa5bfeef..a598977526278 100644 --- a/clang/lib/CodeGen/CodeGenFunction.cpp +++ b/clang/lib/CodeGen/CodeGenFunction.cpp @@ -944,7 +944,7 @@ void CodeGenFunction::StartFunction(GlobalDecl GD, if (CGM.getCodeGenOpts().ProfileSampleAccurate) Fn->addFnAttr("profile-sample-accurate"); - if (getLangOpts().OpenCL || getLangOpts().SYCL) { + if (getLangOpts().OpenCL || getLangOpts().SYCLIsDevice) { // Add metadata for a kernel function. if (const FunctionDecl *FD = dyn_cast_or_null(D)) EmitOpenCLKernelMetadata(FD, Fn); @@ -2293,6 +2293,23 @@ Address CodeGenFunction::EmitFieldAnnotations(const FieldDecl *D, return Address(V, Addr.getAlignment()); } +Address CodeGenFunction::EmitIntelFPGAFieldAnnotations(const FieldDecl *D, + Address Addr, + StringRef AnnotStr) { + llvm::Value *V = Addr.getPointer(); + llvm::Type *VTy = V->getType(); + llvm::Function *F = + CGM.getIntrinsic(llvm::Intrinsic::ptr_annotation, CGM.Int8PtrTy); + // FIXME Always emit the cast inst so we can differentiate between + // annotation on the first field of a struct and annotation on the struct + // itself. + if (VTy != CGM.Int8PtrTy) + V = Builder.CreateBitCast(V, CGM.Int8PtrTy); + V = EmitAnnotationCall(F, V, AnnotStr, D->getLocation()); + V = Builder.CreateBitCast(V, VTy); + return Address(V, Addr.getAlignment()); +} + CodeGenFunction::CGCapturedStmtInfo::~CGCapturedStmtInfo() { } CodeGenFunction::SanitizerScope::SanitizerScope(CodeGenFunction *CGF) diff --git a/clang/lib/CodeGen/CodeGenFunction.h b/clang/lib/CodeGen/CodeGenFunction.h index 04195e46a26c7..0f62ed4f7afe6 100644 --- a/clang/lib/CodeGen/CodeGenFunction.h +++ b/clang/lib/CodeGen/CodeGenFunction.h @@ -566,7 +566,7 @@ class CodeGenFunction : public CodeGenTypeCache { JumpDest RethrowDest; /// A function to call to enter the catch. - llvm::Constant *BeginCatchFn; + llvm::FunctionCallee BeginCatchFn; /// An i1 variable indicating whether or not the @finally is /// running for an exception. @@ -578,8 +578,8 @@ class CodeGenFunction : public CodeGenTypeCache { public: void enter(CodeGenFunction &CGF, const Stmt *Finally, - llvm::Constant *beginCatchFn, llvm::Constant *endCatchFn, - llvm::Constant *rethrowFn); + llvm::FunctionCallee beginCatchFn, + llvm::FunctionCallee endCatchFn, llvm::FunctionCallee rethrowFn); void exit(CodeGenFunction &CGF); }; @@ -1852,14 +1852,14 @@ class CodeGenFunction : public CodeGenTypeCache { void StartThunk(llvm::Function *Fn, GlobalDecl GD, const CGFunctionInfo &FnInfo, bool IsUnprototyped); - void EmitCallAndReturnForThunk(llvm::Constant *Callee, const ThunkInfo *Thunk, - bool IsUnprototyped); + void EmitCallAndReturnForThunk(llvm::FunctionCallee Callee, + const ThunkInfo *Thunk, bool IsUnprototyped); void FinishThunk(); /// Emit a musttail call for a thunk with a potentially adjusted this pointer. void EmitMustTailThunk(GlobalDecl GD, llvm::Value *AdjustedThisPtr, - llvm::Value *Callee); + llvm::FunctionCallee Callee); /// Generate a thunk for the given method. void generateThunk(llvm::Function *Fn, const CGFunctionInfo &FnInfo, @@ -3087,7 +3087,7 @@ class CodeGenFunction : public CodeGenTypeCache { bool EmitOMPLinearClauseInit(const OMPLoopDirective &D); typedef const llvm::function_ref TaskGenTy; void EmitOMPTaskBasedDirective(const OMPExecutableDirective &S, @@ -3598,30 +3598,30 @@ class CodeGenFunction : public CodeGenTypeCache { void checkTargetFeatures(const CallExpr *E, const FunctionDecl *TargetDecl); - llvm::CallInst *EmitRuntimeCall(llvm::Value *callee, + llvm::CallInst *EmitRuntimeCall(llvm::FunctionCallee callee, const Twine &name = ""); - llvm::CallInst *EmitRuntimeCall(llvm::Value *callee, - ArrayRef args, + llvm::CallInst *EmitRuntimeCall(llvm::FunctionCallee callee, + ArrayRef args, const Twine &name = ""); - llvm::CallInst *EmitNounwindRuntimeCall(llvm::Value *callee, + llvm::CallInst *EmitNounwindRuntimeCall(llvm::FunctionCallee callee, const Twine &name = ""); - llvm::CallInst *EmitNounwindRuntimeCall(llvm::Value *callee, - ArrayRef args, + llvm::CallInst *EmitNounwindRuntimeCall(llvm::FunctionCallee callee, + ArrayRef args, const Twine &name = ""); SmallVector getBundlesForFunclet(llvm::Value *Callee); - llvm::CallBase *EmitCallOrInvoke(llvm::Value *Callee, + llvm::CallBase *EmitCallOrInvoke(llvm::FunctionCallee Callee, ArrayRef Args, const Twine &Name = ""); - llvm::CallBase *EmitRuntimeCallOrInvoke(llvm::Value *callee, + llvm::CallBase *EmitRuntimeCallOrInvoke(llvm::FunctionCallee callee, ArrayRef args, const Twine &name = ""); - llvm::CallBase *EmitRuntimeCallOrInvoke(llvm::Value *callee, + llvm::CallBase *EmitRuntimeCallOrInvoke(llvm::FunctionCallee callee, const Twine &name = ""); - void EmitNoreturnRuntimeCallOrInvoke(llvm::Value *callee, - ArrayRef args); + void EmitNoreturnRuntimeCallOrInvoke(llvm::FunctionCallee callee, + ArrayRef args); CGCallee BuildAppleKextVirtualCall(const CXXMethodDecl *MD, NestedNameSpecifier *Qual, @@ -3697,6 +3697,10 @@ class CodeGenFunction : public CodeGenTypeCache { RValue EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID, const CallExpr *E, ReturnValueSlot ReturnValue); + RValue emitFortifiedStdLibCall(CodeGenFunction &CGF, const CallExpr *CE, + unsigned BuiltinID, unsigned BOSType, + unsigned Flag); + RValue emitRotate(const CallExpr *E, bool IsRotateRight); /// Emit IR for __builtin_os_log_format. @@ -3827,6 +3831,8 @@ class CodeGenFunction : public CodeGenTypeCache { llvm::Type *returnType); llvm::Value *EmitObjCAllocWithZone(llvm::Value *value, llvm::Type *returnType); + llvm::Value *EmitObjCAllocInit(llvm::Value *value, llvm::Type *resultType); + llvm::Value *EmitObjCThrowOperand(const Expr *expr); llvm::Value *EmitObjCConsumeObject(QualType T, llvm::Value *Ptr); llvm::Value *EmitObjCExtendObjectLifetime(QualType T, llvm::Value *Ptr); @@ -3924,12 +3930,12 @@ class CodeGenFunction : public CodeGenTypeCache { void EmitCXXGlobalVarDeclInit(const VarDecl &D, llvm::Constant *DeclPtr, bool PerformInit); - llvm::Constant *createAtExitStub(const VarDecl &VD, llvm::Constant *Dtor, + llvm::Function *createAtExitStub(const VarDecl &VD, llvm::FunctionCallee Dtor, llvm::Constant *Addr); /// Call atexit() with a function that passes the given argument to /// the given function. - void registerGlobalDtorWithAtExit(const VarDecl &D, llvm::Constant *fn, + void registerGlobalDtorWithAtExit(const VarDecl &D, llvm::FunctionCallee fn, llvm::Constant *addr); /// Call atexit() with function dtorStub. @@ -3962,8 +3968,8 @@ class CodeGenFunction : public CodeGenTypeCache { /// variables. void GenerateCXXGlobalDtorsFunc( llvm::Function *Fn, - const std::vector> - &DtorsAndObjects); + const std::vector> &DtorsAndObjects); void GenerateCXXGlobalVarDeclInitFunc(llvm::Function *Fn, const VarDecl *D, @@ -4003,6 +4009,10 @@ class CodeGenFunction : public CodeGenTypeCache { /// annotation result. Address EmitFieldAnnotations(const FieldDecl *D, Address V); + /// Emit Intel FPGA field annotations for the given field and value. Returns + /// the annotation result. + Address EmitIntelFPGAFieldAnnotations(const FieldDecl *D, Address V, + StringRef AnnotStr); //===--------------------------------------------------------------------===// // Internal Helpers //===--------------------------------------------------------------------===// diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index 0159b7a72bf21..d2bc525f22b8a 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -52,6 +52,7 @@ #include "llvm/IR/Intrinsics.h" #include "llvm/IR/LLVMContext.h" #include "llvm/IR/Module.h" +#include "llvm/IR/ProfileSummary.h" #include "llvm/ProfileData/InstrProfReader.h" #include "llvm/Support/CodeGen.h" #include "llvm/Support/ConvertUTF.h" @@ -417,7 +418,9 @@ void CodeGenModule::Release() { OpenMPRuntime->clear(); } if (PGOReader) { - getModule().setProfileSummary(PGOReader->getSummary().getMD(VMContext)); + getModule().setProfileSummary( + PGOReader->getSummary(/* UseCS */ false).getMD(VMContext), + llvm::ProfileSummary::PSK_Instr); if (PGOStats.hasDiagnostics()) PGOStats.reportDiagnostics(getDiags(), getCodeGenOpts().MainFileName); } @@ -552,7 +555,7 @@ void CodeGenModule::Release() { } // Emit SYCL specific module metadata: OpenCL/SPIR version, OpenCL language. - if (LangOpts.SYCL) { + if (LangOpts.SYCLIsDevice) { llvm::LLVMContext &Ctx = TheModule.getContext(); llvm::Metadata *SPIRVerElts[] = { llvm::ConstantAsMetadata::get(llvm::ConstantInt::get(Int32Ty, 1)), @@ -1067,8 +1070,17 @@ StringRef CodeGenModule::getMangledName(GlobalDecl GD) { // Keep the first result in the case of a mangling collision. const auto *ND = cast(GD.getDecl()); - auto Result = - Manglings.insert(std::make_pair(getMangledNameImpl(*this, GD, ND), GD)); + std::string MangledName = getMangledNameImpl(*this, GD, ND); + + // Postfix kernel stub names with .stub to differentiate them from kernel + // names in device binaries. This is to facilitate the debugger to find + // the correct symbols for kernels in the device binary. + if (auto *FD = dyn_cast(GD.getDecl())) + if (getLangOpts().HIP && !getLangOpts().CUDAIsDevice && + FD->hasAttr()) + MangledName = MangledName + ".stub"; + + auto Result = Manglings.insert(std::make_pair(MangledName, GD)); return MangledDeclNames[CanonicalGD] = Result.first->first(); } @@ -2173,7 +2185,7 @@ void CodeGenModule::EmitGlobal(GlobalDecl GD) { if (Global->hasAttr()) return emitIFuncDefinition(GD); - if (LangOpts.SYCL) { + if (LangOpts.SYCLIsDevice) { if (!Global->hasAttr()) return; } @@ -2998,7 +3010,7 @@ GetRuntimeFunctionDecl(ASTContext &C, StringRef Name) { /// CreateRuntimeFunction - Create a new runtime function with the specified /// type and name. -llvm::Constant * +llvm::FunctionCallee CodeGenModule::CreateRuntimeFunction(llvm::FunctionType *FTy, StringRef Name, llvm::AttributeList ExtraAttrs, bool Local) { @@ -3024,15 +3036,7 @@ CodeGenModule::CreateRuntimeFunction(llvm::FunctionType *FTy, StringRef Name, } } - return C; -} - -/// CreateBuiltinFunction - Create a new builtin function with the specified -/// type and name. -llvm::Constant * -CodeGenModule::CreateBuiltinFunction(llvm::FunctionType *FTy, StringRef Name, - llvm::AttributeList ExtraAttrs) { - return CreateRuntimeFunction(FTy, Name, ExtraAttrs, true); + return {FTy, C}; } /// isTypeConstant - Determine whether an object of this type can be emitted @@ -3244,6 +3248,9 @@ CodeGenModule::GetOrCreateLLVMGlobal(StringRef MangledName, return getTargetCodeGenInfo().performAddrSpaceCast(*this, GV, AddrSpace, ExpectedAS, Ty); + if (GV->isDeclaration()) + getTargetCodeGenInfo().setTargetAttributes(D, GV, *this); + return GV; } @@ -3505,6 +3512,55 @@ void CodeGenModule::maybeSetTrivialComdat(const Decl &D, GO.setComdat(TheModule.getOrInsertComdat(GO.getName())); } +void CodeGenModule::generateIntelFPGAAnnotation( + const Decl *D, llvm::SmallString<256> &AnnotStr) { + llvm::raw_svector_ostream Out(AnnotStr); + if (D->hasAttr()) + Out << "{register:1}"; + if (auto const *MA = D->getAttr()) { + IntelFPGAMemoryAttr::MemoryKind Kind = MA->getKind(); + Out << "{memory:"; + switch (Kind) { + case IntelFPGAMemoryAttr::MLAB: + case IntelFPGAMemoryAttr::BlockRAM: + Out << IntelFPGAMemoryAttr::ConvertMemoryKindToStr(Kind); + break; + case IntelFPGAMemoryAttr::Default: + Out << "DEFAULT"; + break; + } + Out << '}'; + } + if (const auto *BWA = D->getAttr()) { + llvm::APSInt BWAInt = BWA->getValue()->EvaluateKnownConstInt(getContext()); + Out << '{' << BWA->getSpelling() << ':' << BWAInt << '}'; + } + if (const auto *NBA = D->getAttr()) { + llvm::APSInt BWAInt = NBA->getValue()->EvaluateKnownConstInt(getContext()); + Out << '{' << NBA->getSpelling() << ':' << BWAInt << '}'; + } +} + +void CodeGenModule::addGlobalIntelFPGAAnnotation(const VarDecl *VD, + llvm::GlobalValue *GV) { + SmallString<256> AnnotStr; + generateIntelFPGAAnnotation(VD, AnnotStr); + if (!AnnotStr.empty()) { + // Get the globals for file name, annotation, and the line number. + llvm::Constant *AnnoGV = EmitAnnotationString(AnnotStr), + *UnitGV = EmitAnnotationUnit(VD->getLocation()), + *LineNoCst = EmitAnnotationLineNo(VD->getLocation()); + + llvm::Constant *C = + llvm::ConstantExpr::getPointerBitCastOrAddrSpaceCast(GV, Int8PtrTy); + // Create the ConstantStruct for the global annotation. + llvm::Constant *Fields[4] = { + C, llvm::ConstantExpr::getBitCast(AnnoGV, Int8PtrTy), + llvm::ConstantExpr::getBitCast(UnitGV, Int8PtrTy), LineNoCst}; + Annotations.push_back(llvm::ConstantStruct::getAnon(Fields)); + } +} + /// Pass IsTentative as true if you want to create a tentative definition. void CodeGenModule::EmitGlobalVarDefinition(const VarDecl *D, bool IsTentative) { @@ -3631,6 +3687,21 @@ void CodeGenModule::EmitGlobalVarDefinition(const VarDecl *D, if (D->hasAttr()) AddGlobalAnnotations(D, GV); + // Emit Intel FPGA attribute annotation for a file-scope static variable. + if (getLangOpts().SYCLIsDevice) + addGlobalIntelFPGAAnnotation(D, GV); + + if (D->getType().isRestrictQualified()) { + llvm::LLVMContext &Context = getLLVMContext(); + + // Common metadata nodes. + llvm::NamedMDNode *GlobalsRestrict = + getModule().getOrInsertNamedMetadata("globals.restrict"); + llvm::Metadata *Args[] = {llvm::ValueAsMetadata::get(GV)}; + llvm::MDNode *Node = llvm::MDNode::get(Context, Args); + GlobalsRestrict->addOperand(Node); + } + // Set the llvm linkage type as appropriate. llvm::GlobalValue::LinkageTypes Linkage = getLLVMLinkageVarDefinition(D, GV->isConstant()); @@ -3664,7 +3735,7 @@ void CodeGenModule::EmitGlobalVarDefinition(const VarDecl *D, // Extern global variables will be registered in the TU where they are // defined. if (!D->hasExternalStorage()) - getCUDARuntime().registerDeviceVar(*GV, Flags); + getCUDARuntime().registerDeviceVar(D, *GV, Flags); } else if (D->hasAttr()) // __shared__ variables are odd. Shadows do get created, but // they are not registered with the CUDA runtime, so they @@ -3807,13 +3878,15 @@ static bool isVarDeclStrongDefinition(const ASTContext &Context, } } - // Microsoft's link.exe doesn't support alignments greater than 32 for common - // symbols, so symbols with greater alignment requirements cannot be common. + // Microsoft's link.exe doesn't support alignments greater than 32 bytes for + // common symbols, so symbols with greater alignment requirements cannot be + // common. // Other COFF linkers (ld.bfd and LLD) support arbitrary power-of-two // alignments for common symbols via the aligncomm directive, so this // restriction only applies to MSVC environments. if (Context.getTargetInfo().getTriple().isKnownWindowsMSVCEnvironment() && - Context.getTypeAlignIfKnown(D->getType()) > 32) + Context.getTypeAlignIfKnown(D->getType()) > + Context.toBits(CharUnits::fromQuantity(32))) return true; return false; @@ -4549,7 +4622,8 @@ CodeGenModule::GetAddrOfConstantStringFromLiteral(const StringLiteral *S, if (auto GV = *Entry) { if (Alignment.getQuantity() > GV->getAlignment()) GV->setAlignment(Alignment.getQuantity()); - return ConstantAddress(GV, Alignment); + return ConstantAddress(castStringLiteralToDefaultAddressSpace(*this, GV), + Alignment); } } @@ -4611,7 +4685,8 @@ ConstantAddress CodeGenModule::GetAddrOfConstantCString( if (auto GV = *Entry) { if (Alignment.getQuantity() > GV->getAlignment()) GV->setAlignment(Alignment.getQuantity()); - return ConstantAddress(GV, Alignment); + return ConstantAddress(castStringLiteralToDefaultAddressSpace(*this, GV), + Alignment); } } diff --git a/clang/lib/CodeGen/CodeGenModule.h b/clang/lib/CodeGen/CodeGenModule.h index 5d146daee856e..ff246e4196fb1 100644 --- a/clang/lib/CodeGen/CodeGenModule.h +++ b/clang/lib/CodeGen/CodeGenModule.h @@ -119,90 +119,93 @@ struct ObjCEntrypoints { ObjCEntrypoints() { memset(this, 0, sizeof(*this)); } /// void objc_alloc(id); - llvm::Constant *objc_alloc; + llvm::FunctionCallee objc_alloc; /// void objc_allocWithZone(id); - llvm::Constant *objc_allocWithZone; + llvm::FunctionCallee objc_allocWithZone; + + /// void objc_alloc_init(id); + llvm::FunctionCallee objc_alloc_init; /// void objc_autoreleasePoolPop(void*); - llvm::Constant *objc_autoreleasePoolPop; + llvm::FunctionCallee objc_autoreleasePoolPop; /// void objc_autoreleasePoolPop(void*); /// Note this method is used when we are using exception handling - llvm::Constant *objc_autoreleasePoolPopInvoke; + llvm::FunctionCallee objc_autoreleasePoolPopInvoke; /// void *objc_autoreleasePoolPush(void); - llvm::Constant *objc_autoreleasePoolPush; + llvm::Function *objc_autoreleasePoolPush; /// id objc_autorelease(id); - llvm::Constant *objc_autorelease; + llvm::Function *objc_autorelease; /// id objc_autorelease(id); /// Note this is the runtime method not the intrinsic. - llvm::Constant *objc_autoreleaseRuntimeFunction; + llvm::FunctionCallee objc_autoreleaseRuntimeFunction; /// id objc_autoreleaseReturnValue(id); - llvm::Constant *objc_autoreleaseReturnValue; + llvm::Function *objc_autoreleaseReturnValue; /// void objc_copyWeak(id *dest, id *src); - llvm::Constant *objc_copyWeak; + llvm::Function *objc_copyWeak; /// void objc_destroyWeak(id*); - llvm::Constant *objc_destroyWeak; + llvm::Function *objc_destroyWeak; /// id objc_initWeak(id*, id); - llvm::Constant *objc_initWeak; + llvm::Function *objc_initWeak; /// id objc_loadWeak(id*); - llvm::Constant *objc_loadWeak; + llvm::Function *objc_loadWeak; /// id objc_loadWeakRetained(id*); - llvm::Constant *objc_loadWeakRetained; + llvm::Function *objc_loadWeakRetained; /// void objc_moveWeak(id *dest, id *src); - llvm::Constant *objc_moveWeak; + llvm::Function *objc_moveWeak; /// id objc_retain(id); - llvm::Constant *objc_retain; + llvm::Function *objc_retain; /// id objc_retain(id); /// Note this is the runtime method not the intrinsic. - llvm::Constant *objc_retainRuntimeFunction; + llvm::FunctionCallee objc_retainRuntimeFunction; /// id objc_retainAutorelease(id); - llvm::Constant *objc_retainAutorelease; + llvm::Function *objc_retainAutorelease; /// id objc_retainAutoreleaseReturnValue(id); - llvm::Constant *objc_retainAutoreleaseReturnValue; + llvm::Function *objc_retainAutoreleaseReturnValue; /// id objc_retainAutoreleasedReturnValue(id); - llvm::Constant *objc_retainAutoreleasedReturnValue; + llvm::Function *objc_retainAutoreleasedReturnValue; /// id objc_retainBlock(id); - llvm::Constant *objc_retainBlock; + llvm::Function *objc_retainBlock; /// void objc_release(id); - llvm::Constant *objc_release; + llvm::Function *objc_release; /// void objc_release(id); /// Note this is the runtime method not the intrinsic. - llvm::Constant *objc_releaseRuntimeFunction; + llvm::FunctionCallee objc_releaseRuntimeFunction; /// void objc_storeStrong(id*, id); - llvm::Constant *objc_storeStrong; + llvm::Function *objc_storeStrong; /// id objc_storeWeak(id*, id); - llvm::Constant *objc_storeWeak; + llvm::Function *objc_storeWeak; /// id objc_unsafeClaimAutoreleasedReturnValue(id); - llvm::Constant *objc_unsafeClaimAutoreleasedReturnValue; + llvm::Function *objc_unsafeClaimAutoreleasedReturnValue; /// A void(void) inline asm to use to mark that the return value of /// a call will be immediately retain. llvm::InlineAsm *retainAutoreleasedReturnValueMarker; /// void clang.arc.use(...); - llvm::Constant *clang_arc_use; + llvm::Function *clang_arc_use; }; /// This class records statistics on instrumentation based profiling. @@ -451,7 +454,9 @@ class CodeGenModule : public CodeGenTypeCache { SmallVector PrioritizedCXXGlobalInits; /// Global destructor functions and arguments that need to run on termination. - std::vector> CXXGlobalDtors; + std::vector< + std::tuple> + CXXGlobalDtors; /// The complete set of modules that has been imported. llvm::SetVector ImportedModules; @@ -500,8 +505,8 @@ class CodeGenModule : public CodeGenTypeCache { llvm::Constant *NSConcreteGlobalBlock = nullptr; llvm::Constant *NSConcreteStackBlock = nullptr; - llvm::Constant *BlockObjectAssign = nullptr; - llvm::Constant *BlockObjectDispose = nullptr; + llvm::FunctionCallee BlockObjectAssign = nullptr; + llvm::FunctionCallee BlockObjectDispose = nullptr; llvm::Type *BlockDescriptorType = nullptr; llvm::Type *GenericBlockLiteralType = nullptr; @@ -511,10 +516,10 @@ class CodeGenModule : public CodeGenTypeCache { } Block; /// void @llvm.lifetime.start(i64 %size, i8* nocapture ) - llvm::Constant *LifetimeStartFn = nullptr; + llvm::Function *LifetimeStartFn = nullptr; /// void @llvm.lifetime.end(i64 %size, i8* nocapture ) - llvm::Constant *LifetimeEndFn = nullptr; + llvm::Function *LifetimeEndFn = nullptr; GlobalDecl initializedGlobalDecl; @@ -585,7 +590,7 @@ class CodeGenModule : public CodeGenTypeCache { // Version checking function, used to implement ObjC's @available: // i32 @__isOSVersionAtLeast(i32, i32, i32) - llvm::Constant *IsOSVersionAtLeastFn = nullptr; + llvm::FunctionCallee IsOSVersionAtLeastFn = nullptr; InstrProfStats &getPGOStats() { return PGOStats; } llvm::IndexedInstrProfReader *getPGOReader() const { return PGOReader.get(); } @@ -958,7 +963,22 @@ class CodeGenModule : public CodeGenTypeCache { const CGFunctionInfo *FnInfo = nullptr, llvm::FunctionType *FnType = nullptr, bool DontDefer = false, - ForDefinition_t IsForDefinition = NotForDefinition); + ForDefinition_t IsForDefinition = NotForDefinition) { + return cast(getAddrAndTypeOfCXXStructor(MD, Type, FnInfo, + FnType, DontDefer, + IsForDefinition) + .getCallee()); + } + + llvm::FunctionCallee getAddrAndTypeOfCXXStructor( + const CXXMethodDecl *MD, StructorType Type, + const CGFunctionInfo *FnInfo = nullptr, + llvm::FunctionType *FnType = nullptr, bool DontDefer = false, + ForDefinition_t IsForDefinition = NotForDefinition); + + void generateIntelFPGAAnnotation(const Decl *D, + llvm::SmallString<256> &AnnotStr); + void addGlobalIntelFPGAAnnotation(const VarDecl *VD, llvm::GlobalValue *GV); /// Given a builtin id for a function like "__builtin_fabsf", return a /// Function* for "fabsf". @@ -998,20 +1018,18 @@ class CodeGenModule : public CodeGenTypeCache { void addCompilerUsedGlobal(llvm::GlobalValue *GV); /// Add a destructor and object to add to the C++ global destructor function. - void AddCXXDtorEntry(llvm::Constant *DtorFn, llvm::Constant *Object) { - CXXGlobalDtors.emplace_back(DtorFn, Object); + void AddCXXDtorEntry(llvm::FunctionCallee DtorFn, llvm::Constant *Object) { + CXXGlobalDtors.emplace_back(DtorFn.getFunctionType(), DtorFn.getCallee(), + Object); } - /// Create a new runtime function with the specified type and name. - llvm::Constant * + /// Create or return a runtime function declaration with the specified type + /// and name. + llvm::FunctionCallee CreateRuntimeFunction(llvm::FunctionType *Ty, StringRef Name, llvm::AttributeList ExtraAttrs = llvm::AttributeList(), bool Local = false); - /// Create a new compiler builtin function with the specified type and name. - llvm::Constant * - CreateBuiltinFunction(llvm::FunctionType *Ty, StringRef Name, - llvm::AttributeList ExtraAttrs = llvm::AttributeList()); /// Create a new runtime global variable with the specified type and name. llvm::Constant *CreateRuntimeVariable(llvm::Type *Ty, StringRef Name); @@ -1021,13 +1039,13 @@ class CodeGenModule : public CodeGenTypeCache { llvm::Constant *getNSConcreteGlobalBlock(); llvm::Constant *getNSConcreteStackBlock(); - llvm::Constant *getBlockObjectAssign(); - llvm::Constant *getBlockObjectDispose(); + llvm::FunctionCallee getBlockObjectAssign(); + llvm::FunctionCallee getBlockObjectDispose(); ///@} - llvm::Constant *getLLVMLifetimeStartFn(); - llvm::Constant *getLLVMLifetimeEndFn(); + llvm::Function *getLLVMLifetimeStartFn(); + llvm::Function *getLLVMLifetimeEndFn(); // Make sure that this type is translated. void UpdateCompletedType(const TagDecl *TD); @@ -1297,7 +1315,7 @@ class CodeGenModule : public CodeGenTypeCache { getMostBaseClasses(const CXXRecordDecl *RD); /// Get the declaration of std::terminate for the platform. - llvm::Constant *getTerminateFn(); + llvm::FunctionCallee getTerminateFn(); llvm::SanitizerStatReport &getSanStats(); diff --git a/clang/lib/CodeGen/CodeGenPGO.cpp b/clang/lib/CodeGen/CodeGenPGO.cpp index 855e249653559..d10a321dc3d7b 100644 --- a/clang/lib/CodeGen/CodeGenPGO.cpp +++ b/clang/lib/CodeGen/CodeGenPGO.cpp @@ -771,14 +771,14 @@ void CodeGenPGO::assignRegionCounters(GlobalDecl GD, llvm::Function *Fn) { // If so, instrument only base variant, others are implemented by delegation // to the base one, it would be counted twice otherwise. if (CGM.getTarget().getCXXABI().hasConstructorVariants()) { - if (isa(D) && GD.getDtorType() != Dtor_Base) - return; - if (const auto *CCD = dyn_cast(D)) if (GD.getCtorType() != Ctor_Base && CodeGenFunction::IsConstructorDelegationValid(CCD)) return; } + if (isa(D) && GD.getDtorType() != Dtor_Base) + return; + CGM.ClearUnusedCoverageMapping(D); setFuncName(Fn); diff --git a/clang/lib/CodeGen/CodeGenTBAA.cpp b/clang/lib/CodeGen/CodeGenTBAA.cpp index 6e043d8852bf2..a41cfcee4c2c2 100644 --- a/clang/lib/CodeGen/CodeGenTBAA.cpp +++ b/clang/lib/CodeGen/CodeGenTBAA.cpp @@ -1,4 +1,4 @@ -//===--- CodeGenTypes.cpp - TBAA information for LLVM CodeGen -------------===// +//===-- CodeGenTBAA.cpp - TBAA information for LLVM CodeGen ---------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/clang/lib/CodeGen/CodeGenTypes.cpp b/clang/lib/CodeGen/CodeGenTypes.cpp index e8062926c5adb..4c3d8cce7928d 100644 --- a/clang/lib/CodeGen/CodeGenTypes.cpp +++ b/clang/lib/CodeGen/CodeGenTypes.cpp @@ -61,7 +61,7 @@ void CodeGenTypes::addRecordTypeName(const RecordDecl *RD, // // For SYCL, the mangled type name is attached, so it can be // reflown to proper name later. - if (getContext().getLangOpts().SYCL) { + if (getContext().getLangOpts().SYCLIsDevice) { std::unique_ptr MC(getContext().createMangleContext()); auto RDT = getContext().getRecordType(RD); MC->mangleCXXRTTIName(RDT, OS); @@ -649,7 +649,9 @@ llvm::Type *CodeGenTypes::ConvertType(QualType T) { case Type::BlockPointer: { const QualType FTy = cast(Ty)->getPointeeType(); - llvm::Type *PointeeType = ConvertTypeForMem(FTy); + llvm::Type *PointeeType = CGM.getLangOpts().OpenCL + ? CGM.getGenericBlockLiteralType() + : ConvertTypeForMem(FTy); unsigned AS = Context.getTargetAddressSpace(FTy); ResultType = llvm::PointerType::get(PointeeType, AS); break; @@ -731,7 +733,7 @@ llvm::StructType *CodeGenTypes::ConvertRecordDeclType(const RecordDecl *RD) { return Ty; } - assert((!Context.getLangOpts().SYCL || !isa(RD) || + assert((!Context.getLangOpts().SYCLIsDevice || !isa(RD) || !dyn_cast(RD)->isPolymorphic()) && "Types with virtual functions not allowed in SYCL"); diff --git a/clang/lib/CodeGen/CodeGenTypes.h b/clang/lib/CodeGen/CodeGenTypes.h index d7e6edde83194..c5491730cba0c 100644 --- a/clang/lib/CodeGen/CodeGenTypes.h +++ b/clang/lib/CodeGen/CodeGenTypes.h @@ -182,6 +182,10 @@ class CodeGenTypes { /// Convert clang calling convention to LLVM callilng convention. unsigned ClangCallConvToLLVMCallConv(CallingConv CC); + /// Derives the 'this' type for codegen purposes, i.e. ignoring method CVR + /// qualification. + CanQualType DeriveThisType(const CXXRecordDecl *RD, const CXXMethodDecl *MD); + /// ConvertType - Convert type T into a llvm::Type. llvm::Type *ConvertType(QualType T); diff --git a/clang/lib/CodeGen/ItaniumCXXABI.cpp b/clang/lib/CodeGen/ItaniumCXXABI.cpp index 453bd2faa7e66..02cc2f0afdb7b 100644 --- a/clang/lib/CodeGen/ItaniumCXXABI.cpp +++ b/clang/lib/CodeGen/ItaniumCXXABI.cpp @@ -328,7 +328,8 @@ class ItaniumCXXABI : public CodeGen::CGCXXABI { llvm::GlobalVariable *DeclPtr, bool PerformInit) override; void registerGlobalDtor(CodeGenFunction &CGF, const VarDecl &D, - llvm::Constant *dtor, llvm::Constant *addr) override; + llvm::FunctionCallee dtor, + llvm::Constant *addr) override; llvm::Function *getOrCreateThreadLocalWrapper(const VarDecl *VD, llvm::Value *Val); @@ -1156,7 +1157,7 @@ void ItaniumCXXABI::emitRethrow(CodeGenFunction &CGF, bool isNoReturn) { llvm::FunctionType *FTy = llvm::FunctionType::get(CGM.VoidTy, /*IsVarArgs=*/false); - llvm::Constant *Fn = CGM.CreateRuntimeFunction(FTy, "__cxa_rethrow"); + llvm::FunctionCallee Fn = CGM.CreateRuntimeFunction(FTy, "__cxa_rethrow"); if (isNoReturn) CGF.EmitNoreturnRuntimeCallOrInvoke(Fn, None); @@ -1164,7 +1165,7 @@ void ItaniumCXXABI::emitRethrow(CodeGenFunction &CGF, bool isNoReturn) { CGF.EmitRuntimeCallOrInvoke(Fn); } -static llvm::Constant *getAllocateExceptionFn(CodeGenModule &CGM) { +static llvm::FunctionCallee getAllocateExceptionFn(CodeGenModule &CGM) { // void *__cxa_allocate_exception(size_t thrown_size); llvm::FunctionType *FTy = @@ -1173,7 +1174,7 @@ static llvm::Constant *getAllocateExceptionFn(CodeGenModule &CGM) { return CGM.CreateRuntimeFunction(FTy, "__cxa_allocate_exception"); } -static llvm::Constant *getThrowFn(CodeGenModule &CGM) { +static llvm::FunctionCallee getThrowFn(CodeGenModule &CGM) { // void __cxa_throw(void *thrown_exception, std::type_info *tinfo, // void (*dest) (void *)); @@ -1190,7 +1191,7 @@ void ItaniumCXXABI::emitThrow(CodeGenFunction &CGF, const CXXThrowExpr *E) { llvm::Type *SizeTy = CGF.ConvertType(getContext().getSizeType()); uint64_t TypeSize = getContext().getTypeSizeInChars(ThrowType).getQuantity(); - llvm::Constant *AllocExceptionFn = getAllocateExceptionFn(CGM); + llvm::FunctionCallee AllocExceptionFn = getAllocateExceptionFn(CGM); llvm::CallInst *ExceptionPtr = CGF.EmitNounwindRuntimeCall( AllocExceptionFn, llvm::ConstantInt::get(SizeTy, TypeSize), "exception"); @@ -1218,7 +1219,7 @@ void ItaniumCXXABI::emitThrow(CodeGenFunction &CGF, const CXXThrowExpr *E) { CGF.EmitNoreturnRuntimeCallOrInvoke(getThrowFn(CGM), args); } -static llvm::Constant *getItaniumDynamicCastFn(CodeGenFunction &CGF) { +static llvm::FunctionCallee getItaniumDynamicCastFn(CodeGenFunction &CGF) { // void *__dynamic_cast(const void *sub, // const abi::__class_type_info *src, // const abi::__class_type_info *dst, @@ -1241,7 +1242,7 @@ static llvm::Constant *getItaniumDynamicCastFn(CodeGenFunction &CGF) { return CGF.CGM.CreateRuntimeFunction(FTy, "__dynamic_cast", Attrs); } -static llvm::Constant *getBadCastFn(CodeGenFunction &CGF) { +static llvm::FunctionCallee getBadCastFn(CodeGenFunction &CGF) { // void __cxa_bad_cast(); llvm::FunctionType *FTy = llvm::FunctionType::get(CGF.VoidTy, false); return CGF.CGM.CreateRuntimeFunction(FTy, "__cxa_bad_cast"); @@ -1299,7 +1300,7 @@ static CharUnits computeOffsetHint(ASTContext &Context, return Offset; } -static llvm::Constant *getBadTypeidFn(CodeGenFunction &CGF) { +static llvm::FunctionCallee getBadTypeidFn(CodeGenFunction &CGF) { // void __cxa_bad_typeid(); llvm::FunctionType *FTy = llvm::FunctionType::get(CGF.VoidTy, false); @@ -1312,7 +1313,7 @@ bool ItaniumCXXABI::shouldTypeidBeNullChecked(bool IsDeref, } void ItaniumCXXABI::EmitBadTypeidCall(CodeGenFunction &CGF) { - llvm::Value *Fn = getBadTypeidFn(CGF); + llvm::FunctionCallee Fn = getBadTypeidFn(CGF); llvm::CallBase *Call = CGF.EmitRuntimeCallOrInvoke(Fn); Call->setDoesNotReturn(); CGF.Builder.CreateUnreachable(); @@ -1410,7 +1411,7 @@ llvm::Value *ItaniumCXXABI::EmitDynamicCastToVoid(CodeGenFunction &CGF, } bool ItaniumCXXABI::EmitBadCastCall(CodeGenFunction &CGF) { - llvm::Value *Fn = getBadCastFn(CGF); + llvm::FunctionCallee Fn = getBadCastFn(CGF); llvm::CallBase *Call = CGF.EmitRuntimeCallOrInvoke(Fn); Call->setDoesNotReturn(); CGF.Builder.CreateUnreachable(); @@ -1566,9 +1567,8 @@ void ItaniumCXXABI::EmitDestructorCall(CodeGenFunction &CGF, Callee = CGCallee::forDirect( CGM.getAddrOfCXXStructor(DD, getFromDtorType(Type)), GD); - CGF.EmitCXXMemberOrOperatorCall(DD, Callee, ReturnValueSlot(), - This.getPointer(), VTT, VTTTy, - nullptr, nullptr); + CGF.EmitCXXDestructorCall(DD, Callee, This.getPointer(), VTT, VTTTy, nullptr, + getFromDtorType(Type)); } void ItaniumCXXABI::emitVTableDefinitions(CodeGenVTables &CGVT, @@ -1766,9 +1766,8 @@ llvm::Value *ItaniumCXXABI::EmitVirtualDestructorCall( CGCallee Callee = CGCallee::forVirtual(CE, GlobalDecl(Dtor, DtorType), This, Ty); - CGF.EmitCXXMemberOrOperatorCall(Dtor, Callee, ReturnValueSlot(), - This.getPointer(), /*ImplicitParam=*/nullptr, - QualType(), CE, nullptr); + CGF.EmitCXXDestructorCall(Dtor, Callee, This.getPointer(), nullptr, + QualType(), nullptr, getFromDtorType(DtorType)); return nullptr; } @@ -1958,7 +1957,7 @@ Address ItaniumCXXABI::InitializeArrayCookie(CodeGenFunction &CGF, CGM.getSanitizerMetadata()->disableSanitizerForInstruction(SI); llvm::FunctionType *FTy = llvm::FunctionType::get(CGM.VoidTy, NumElementsPtr.getType(), false); - llvm::Constant *F = + llvm::FunctionCallee F = CGM.CreateRuntimeFunction(FTy, "__asan_poison_cxx_array_cookie"); CGF.Builder.CreateCall(F, NumElementsPtr.getPointer()); } @@ -1989,7 +1988,7 @@ llvm::Value *ItaniumCXXABI::readArrayCookieImpl(CodeGenFunction &CGF, // the metadata may be lost. llvm::FunctionType *FTy = llvm::FunctionType::get(CGF.SizeTy, CGF.SizeTy->getPointerTo(0), false); - llvm::Constant *F = + llvm::FunctionCallee F = CGM.CreateRuntimeFunction(FTy, "__asan_load_cxx_array_cookie"); return CGF.Builder.CreateCall(F, numElementsPtr.getPointer()); } @@ -2024,7 +2023,7 @@ Address ARMCXXABI::InitializeArrayCookie(CodeGenFunction &CGF, CGF.Builder.CreateStore(elementSize, cookie); // The second element is the element count. - cookie = CGF.Builder.CreateConstInBoundsGEP(cookie, 1, CGF.getSizeSize()); + cookie = CGF.Builder.CreateConstInBoundsGEP(cookie, 1); CGF.Builder.CreateStore(numElements, cookie); // Finally, compute a pointer to the actual data buffer by skipping @@ -2047,8 +2046,8 @@ llvm::Value *ARMCXXABI::readArrayCookieImpl(CodeGenFunction &CGF, /*********************** Static local initialization **************************/ -static llvm::Constant *getGuardAcquireFn(CodeGenModule &CGM, - llvm::PointerType *GuardPtrTy) { +static llvm::FunctionCallee getGuardAcquireFn(CodeGenModule &CGM, + llvm::PointerType *GuardPtrTy) { // int __cxa_guard_acquire(__guard *guard_object); llvm::FunctionType *FTy = llvm::FunctionType::get(CGM.getTypes().ConvertType(CGM.getContext().IntTy), @@ -2060,8 +2059,8 @@ static llvm::Constant *getGuardAcquireFn(CodeGenModule &CGM, llvm::Attribute::NoUnwind)); } -static llvm::Constant *getGuardReleaseFn(CodeGenModule &CGM, - llvm::PointerType *GuardPtrTy) { +static llvm::FunctionCallee getGuardReleaseFn(CodeGenModule &CGM, + llvm::PointerType *GuardPtrTy) { // void __cxa_guard_release(__guard *guard_object); llvm::FunctionType *FTy = llvm::FunctionType::get(CGM.VoidTy, GuardPtrTy, /*isVarArg=*/false); @@ -2072,8 +2071,8 @@ static llvm::Constant *getGuardReleaseFn(CodeGenModule &CGM, llvm::Attribute::NoUnwind)); } -static llvm::Constant *getGuardAbortFn(CodeGenModule &CGM, - llvm::PointerType *GuardPtrTy) { +static llvm::FunctionCallee getGuardAbortFn(CodeGenModule &CGM, + llvm::PointerType *GuardPtrTy) { // void __cxa_guard_abort(__guard *guard_object); llvm::FunctionType *FTy = llvm::FunctionType::get(CGM.VoidTy, GuardPtrTy, /*isVarArg=*/false); @@ -2286,9 +2285,8 @@ void ItaniumCXXABI::EmitGuardedInit(CodeGenFunction &CGF, /// Register a global destructor using __cxa_atexit. static void emitGlobalDtorWithCXAAtExit(CodeGenFunction &CGF, - llvm::Constant *dtor, - llvm::Constant *addr, - bool TLS) { + llvm::FunctionCallee dtor, + llvm::Constant *addr, bool TLS) { const char *Name = "__cxa_atexit"; if (TLS) { const llvm::Triple &T = CGF.getTarget().getTriple(); @@ -2307,8 +2305,8 @@ static void emitGlobalDtorWithCXAAtExit(CodeGenFunction &CGF, llvm::FunctionType::get(CGF.IntTy, paramTys, false); // Fetch the actual function. - llvm::Constant *atexit = CGF.CGM.CreateRuntimeFunction(atexitTy, Name); - if (llvm::Function *fn = dyn_cast(atexit)) + llvm::FunctionCallee atexit = CGF.CGM.CreateRuntimeFunction(atexitTy, Name); + if (llvm::Function *fn = dyn_cast(atexit.getCallee())) fn->setDoesNotThrow(); // Create a variable that binds the atexit to this shared object. @@ -2324,11 +2322,10 @@ static void emitGlobalDtorWithCXAAtExit(CodeGenFunction &CGF, // function. addr = llvm::Constant::getNullValue(CGF.Int8PtrTy); - llvm::Value *args[] = { - llvm::ConstantExpr::getBitCast(dtor, dtorTy), - llvm::ConstantExpr::getBitCast(addr, CGF.Int8PtrTy), - handle - }; + llvm::Value *args[] = {llvm::ConstantExpr::getBitCast( + cast(dtor.getCallee()), dtorTy), + llvm::ConstantExpr::getBitCast(addr, CGF.Int8PtrTy), + handle}; CGF.EmitNounwindRuntimeCall(atexit, args); } @@ -2377,9 +2374,8 @@ void CodeGenModule::registerGlobalDtorsWithAtExit() { } /// Register a global destructor as best as we know how. -void ItaniumCXXABI::registerGlobalDtor(CodeGenFunction &CGF, - const VarDecl &D, - llvm::Constant *dtor, +void ItaniumCXXABI::registerGlobalDtor(CodeGenFunction &CGF, const VarDecl &D, + llvm::FunctionCallee dtor, llvm::Constant *addr) { if (D.isNoDestroy(CGM.getContext())) return; @@ -2543,6 +2539,8 @@ void ItaniumCXXABI::EmitThreadLocalInitFuncs( getMangleContext().mangleItaniumThreadLocalInit(VD, Out); } + llvm::FunctionType *InitFnTy = llvm::FunctionType::get(CGM.VoidTy, false); + // If we have a definition for the variable, emit the initialization // function as an alias to the global Init function (if any). Otherwise, // produce a declaration of the initialization function. @@ -2561,8 +2559,7 @@ void ItaniumCXXABI::EmitThreadLocalInitFuncs( // This function will not exist if the TU defining the thread_local // variable in question does not need any dynamic initialization for // its thread_local variables. - llvm::FunctionType *FnTy = llvm::FunctionType::get(CGM.VoidTy, false); - Init = llvm::Function::Create(FnTy, + Init = llvm::Function::Create(InitFnTy, llvm::GlobalVariable::ExternalWeakLinkage, InitFnName.str(), &CGM.getModule()); const CGFunctionInfo &FI = CGM.getTypes().arrangeNullaryFunction(); @@ -2580,7 +2577,7 @@ void ItaniumCXXABI::EmitThreadLocalInitFuncs( CGBuilderTy Builder(CGM, Entry); if (InitIsInitFunc) { if (Init) { - llvm::CallInst *CallVal = Builder.CreateCall(Init); + llvm::CallInst *CallVal = Builder.CreateCall(InitFnTy, Init); if (isThreadWrapperReplaceable(VD, CGM)) { CallVal->setCallingConv(llvm::CallingConv::CXX_FAST_TLS); llvm::Function *Fn = @@ -2596,7 +2593,7 @@ void ItaniumCXXABI::EmitThreadLocalInitFuncs( Builder.CreateCondBr(Have, InitBB, ExitBB); Builder.SetInsertPoint(InitBB); - Builder.CreateCall(Init); + Builder.CreateCall(InitFnTy, Init); Builder.CreateBr(ExitBB); Builder.SetInsertPoint(ExitBB); @@ -3915,7 +3912,7 @@ void ItaniumCXXABI::emitCXXStructor(const CXXMethodDecl *MD, } } -static llvm::Constant *getBeginCatchFn(CodeGenModule &CGM) { +static llvm::FunctionCallee getBeginCatchFn(CodeGenModule &CGM) { // void *__cxa_begin_catch(void*); llvm::FunctionType *FTy = llvm::FunctionType::get( CGM.Int8PtrTy, CGM.Int8PtrTy, /*IsVarArgs=*/false); @@ -3923,7 +3920,7 @@ static llvm::Constant *getBeginCatchFn(CodeGenModule &CGM) { return CGM.CreateRuntimeFunction(FTy, "__cxa_begin_catch"); } -static llvm::Constant *getEndCatchFn(CodeGenModule &CGM) { +static llvm::FunctionCallee getEndCatchFn(CodeGenModule &CGM) { // void __cxa_end_catch(); llvm::FunctionType *FTy = llvm::FunctionType::get(CGM.VoidTy, /*IsVarArgs=*/false); @@ -3931,7 +3928,7 @@ static llvm::Constant *getEndCatchFn(CodeGenModule &CGM) { return CGM.CreateRuntimeFunction(FTy, "__cxa_end_catch"); } -static llvm::Constant *getGetExceptionPtrFn(CodeGenModule &CGM) { +static llvm::FunctionCallee getGetExceptionPtrFn(CodeGenModule &CGM) { // void *__cxa_get_exception_ptr(void*); llvm::FunctionType *FTy = llvm::FunctionType::get( CGM.Int8PtrTy, CGM.Int8PtrTy, /*IsVarArgs=*/false); @@ -4206,14 +4203,14 @@ void ItaniumCXXABI::emitBeginCatch(CodeGenFunction &CGF, /// Get or define the following function: /// void @__clang_call_terminate(i8* %exn) nounwind noreturn /// This code is used only in C++. -static llvm::Constant *getClangCallTerminateFn(CodeGenModule &CGM) { +static llvm::FunctionCallee getClangCallTerminateFn(CodeGenModule &CGM) { llvm::FunctionType *fnTy = llvm::FunctionType::get(CGM.VoidTy, CGM.Int8PtrTy, /*IsVarArgs=*/false); - llvm::Constant *fnRef = CGM.CreateRuntimeFunction( - fnTy, "__clang_call_terminate", llvm::AttributeList(), /*Local=*/true); - - llvm::Function *fn = dyn_cast(fnRef); - if (fn && fn->empty()) { + llvm::FunctionCallee fnRef = CGM.CreateRuntimeFunction( + fnTy, "__clang_call_terminate", llvm::AttributeList(), /*IsLocal=*/true); + llvm::Function *fn = + cast(fnRef.getCallee()->stripPointerCasts()); + if (fn->empty()) { fn->setDoesNotThrow(); fn->setDoesNotReturn(); @@ -4231,7 +4228,7 @@ static llvm::Constant *getClangCallTerminateFn(CodeGenModule &CGM) { // Set up the function. llvm::BasicBlock *entry = - llvm::BasicBlock::Create(CGM.getLLVMContext(), "", fn); + llvm::BasicBlock::Create(CGM.getLLVMContext(), "", fn); CGBuilderTy builder(CGM, entry); // Pull the exception pointer out of the parameter list. @@ -4251,7 +4248,6 @@ static llvm::Constant *getClangCallTerminateFn(CodeGenModule &CGM) { // std::terminate cannot return. builder.CreateUnreachable(); } - return fnRef; } diff --git a/clang/lib/CodeGen/MicrosoftCXXABI.cpp b/clang/lib/CodeGen/MicrosoftCXXABI.cpp index a4b67a28095af..cf6d0cf448385 100644 --- a/clang/lib/CodeGen/MicrosoftCXXABI.cpp +++ b/clang/lib/CodeGen/MicrosoftCXXABI.cpp @@ -394,7 +394,8 @@ class MicrosoftCXXABI : public CGCXXABI { llvm::GlobalVariable *DeclPtr, bool PerformInit) override; void registerGlobalDtor(CodeGenFunction &CGF, const VarDecl &D, - llvm::Constant *Dtor, llvm::Constant *Addr) override; + llvm::FunctionCallee Dtor, + llvm::Constant *Addr) override; // ==== Notes on array cookies ========= // @@ -724,18 +725,20 @@ class MicrosoftCXXABI : public CGCXXABI { return ThrowInfoType; } - llvm::Constant *getThrowFn() { + llvm::FunctionCallee getThrowFn() { // _CxxThrowException is passed an exception object and a ThrowInfo object // which describes the exception. llvm::Type *Args[] = {CGM.Int8PtrTy, getThrowInfoType()->getPointerTo()}; llvm::FunctionType *FTy = llvm::FunctionType::get(CGM.VoidTy, Args, /*IsVarArgs=*/false); - auto *Fn = cast( - CGM.CreateRuntimeFunction(FTy, "_CxxThrowException")); + llvm::FunctionCallee Throw = + CGM.CreateRuntimeFunction(FTy, "_CxxThrowException"); // _CxxThrowException is stdcall on 32-bit x86 platforms. - if (CGM.getTarget().getTriple().getArch() == llvm::Triple::x86) - Fn->setCallingConv(llvm::CallingConv::X86_StdCall); - return Fn; + if (CGM.getTarget().getTriple().getArch() == llvm::Triple::x86) { + if (auto *Fn = cast(Throw.getCallee())) + Fn->setCallingConv(llvm::CallingConv::X86_StdCall); + } + return Throw; } llvm::Function *getAddrOfCXXCtorClosure(const CXXConstructorDecl *CD, @@ -851,7 +854,7 @@ void MicrosoftCXXABI::emitRethrow(CodeGenFunction &CGF, bool isNoReturn) { llvm::Value *Args[] = { llvm::ConstantPointerNull::get(CGM.Int8PtrTy), llvm::ConstantPointerNull::get(getThrowInfoType()->getPointerTo())}; - auto *Fn = getThrowFn(); + llvm::FunctionCallee Fn = getThrowFn(); if (isNoReturn) CGF.EmitNoreturnRuntimeCallOrInvoke(Fn, Args); else @@ -931,7 +934,7 @@ static llvm::CallBase *emitRTtypeidCall(CodeGenFunction &CGF, llvm::FunctionType *FTy = llvm::FunctionType::get(CGF.Int8PtrTy, ArgTypes, false); llvm::Value *Args[] = {Argument}; - llvm::Constant *Fn = CGF.CGM.CreateRuntimeFunction(FTy, "__RTtypeid"); + llvm::FunctionCallee Fn = CGF.CGM.CreateRuntimeFunction(FTy, "__RTtypeid"); return CGF.EmitRuntimeCallOrInvoke(Fn, Args); } @@ -983,7 +986,7 @@ llvm::Value *MicrosoftCXXABI::EmitDynamicCastCall( // BOOL isReference) llvm::Type *ArgTypes[] = {CGF.Int8PtrTy, CGF.Int32Ty, CGF.Int8PtrTy, CGF.Int8PtrTy, CGF.Int32Ty}; - llvm::Constant *Function = CGF.CGM.CreateRuntimeFunction( + llvm::FunctionCallee Function = CGF.CGM.CreateRuntimeFunction( llvm::FunctionType::get(CGF.Int8PtrTy, ArgTypes, false), "__RTDynamicCast"); llvm::Value *Args[] = { @@ -1003,7 +1006,7 @@ MicrosoftCXXABI::EmitDynamicCastToVoid(CodeGenFunction &CGF, Address Value, // PVOID __RTCastToVoid( // PVOID inptr) llvm::Type *ArgTypes[] = {CGF.Int8PtrTy}; - llvm::Constant *Function = CGF.CGM.CreateRuntimeFunction( + llvm::FunctionCallee Function = CGF.CGM.CreateRuntimeFunction( llvm::FunctionType::get(CGF.Int8PtrTy, ArgTypes, false), "__RTCastToVoid"); llvm::Value *Args[] = {Value.getPointer()}; @@ -1994,7 +1997,7 @@ MicrosoftCXXABI::EmitVirtualMemPtrThunk(const CXXMethodDecl *MD, llvm::Value *Callee = CGF.Builder.CreateAlignedLoad(VFuncPtr, CGF.getPointerAlign()); - CGF.EmitMustTailThunk(MD, getThisValue(CGF), Callee); + CGF.EmitMustTailThunk(MD, getThisValue(CGF), {ThunkTy, Callee}); return ThunkFn; } @@ -2220,7 +2223,7 @@ Address MicrosoftCXXABI::InitializeArrayCookie(CodeGenFunction &CGF, } static void emitGlobalDtorWithTLRegDtor(CodeGenFunction &CGF, const VarDecl &VD, - llvm::Constant *Dtor, + llvm::FunctionCallee Dtor, llvm::Constant *Addr) { // Create a function which calls the destructor. llvm::Constant *DtorStub = CGF.createAtExitStub(VD, Dtor, Addr); @@ -2229,16 +2232,17 @@ static void emitGlobalDtorWithTLRegDtor(CodeGenFunction &CGF, const VarDecl &VD, llvm::FunctionType *TLRegDtorTy = llvm::FunctionType::get( CGF.IntTy, DtorStub->getType(), /*IsVarArg=*/false); - llvm::Constant *TLRegDtor = CGF.CGM.CreateRuntimeFunction( + llvm::FunctionCallee TLRegDtor = CGF.CGM.CreateRuntimeFunction( TLRegDtorTy, "__tlregdtor", llvm::AttributeList(), /*Local=*/true); - if (llvm::Function *TLRegDtorFn = dyn_cast(TLRegDtor)) + if (llvm::Function *TLRegDtorFn = + dyn_cast(TLRegDtor.getCallee())) TLRegDtorFn->setDoesNotThrow(); CGF.EmitNounwindRuntimeCall(TLRegDtor, DtorStub); } void MicrosoftCXXABI::registerGlobalDtor(CodeGenFunction &CGF, const VarDecl &D, - llvm::Constant *Dtor, + llvm::FunctionCallee Dtor, llvm::Constant *Addr) { if (D.isNoDestroy(CGM.getContext())) return; @@ -2323,7 +2327,7 @@ static ConstantAddress getInitThreadEpochPtr(CodeGenModule &CGM) { return ConstantAddress(GV, Align); } -static llvm::Constant *getInitThreadHeaderFn(CodeGenModule &CGM) { +static llvm::FunctionCallee getInitThreadHeaderFn(CodeGenModule &CGM) { llvm::FunctionType *FTy = llvm::FunctionType::get(llvm::Type::getVoidTy(CGM.getLLVMContext()), CGM.IntTy->getPointerTo(), /*isVarArg=*/false); @@ -2335,7 +2339,7 @@ static llvm::Constant *getInitThreadHeaderFn(CodeGenModule &CGM) { /*Local=*/true); } -static llvm::Constant *getInitThreadFooterFn(CodeGenModule &CGM) { +static llvm::FunctionCallee getInitThreadFooterFn(CodeGenModule &CGM) { llvm::FunctionType *FTy = llvm::FunctionType::get(llvm::Type::getVoidTy(CGM.getLLVMContext()), CGM.IntTy->getPointerTo(), /*isVarArg=*/false); @@ -2347,7 +2351,7 @@ static llvm::Constant *getInitThreadFooterFn(CodeGenModule &CGM) { /*Local=*/true); } -static llvm::Constant *getInitThreadAbortFn(CodeGenModule &CGM) { +static llvm::FunctionCallee getInitThreadAbortFn(CodeGenModule &CGM) { llvm::FunctionType *FTy = llvm::FunctionType::get(llvm::Type::getVoidTy(CGM.getLLVMContext()), CGM.IntTy->getPointerTo(), /*isVarArg=*/false); diff --git a/clang/lib/CodeGen/ModuleBuilder.cpp b/clang/lib/CodeGen/ModuleBuilder.cpp index 4c2b196aff669..b96df1d2b2aaf 100644 --- a/clang/lib/CodeGen/ModuleBuilder.cpp +++ b/clang/lib/CodeGen/ModuleBuilder.cpp @@ -284,7 +284,7 @@ namespace { return; // No VTable usage is legal in SYCL, so don't bother marking them used. - if (Ctx->getLangOpts().SYCL) + if (Ctx->getLangOpts().SYCLIsDevice) return; Builder->EmitVTable(RD); diff --git a/clang/lib/CodeGen/TargetInfo.cpp b/clang/lib/CodeGen/TargetInfo.cpp index d04a012d5eed4..ee8c88953570e 100644 --- a/clang/lib/CodeGen/TargetInfo.cpp +++ b/clang/lib/CodeGen/TargetInfo.cpp @@ -309,10 +309,9 @@ static Address emitVoidPtrDirectVAArg(CodeGenFunction &CGF, // Advance the pointer past the argument, then store that back. CharUnits FullDirectSize = DirectSize.alignTo(SlotSize); - llvm::Value *NextPtr = - CGF.Builder.CreateConstInBoundsByteGEP(Addr.getPointer(), FullDirectSize, - "argp.next"); - CGF.Builder.CreateStore(NextPtr, VAListAddr); + Address NextPtr = + CGF.Builder.CreateConstInBoundsByteGEP(Addr, FullDirectSize, "argp.next"); + CGF.Builder.CreateStore(NextPtr.getPointer(), VAListAddr); // If the argument is smaller than a slot, and this is a big-endian // target, the argument will be right-adjusted in its slot. @@ -3642,8 +3641,8 @@ void X86_64ABIInfo::computeInfo(CGFunctionInfo &FI) const { static Address EmitX86_64VAArgFromMemory(CodeGenFunction &CGF, Address VAListAddr, QualType Ty) { - Address overflow_arg_area_p = CGF.Builder.CreateStructGEP( - VAListAddr, 2, CharUnits::fromQuantity(8), "overflow_arg_area_p"); + Address overflow_arg_area_p = + CGF.Builder.CreateStructGEP(VAListAddr, 2, "overflow_arg_area_p"); llvm::Value *overflow_arg_area = CGF.Builder.CreateLoad(overflow_arg_area_p, "overflow_arg_area"); @@ -3714,18 +3713,14 @@ Address X86_64ABIInfo::EmitVAArg(CodeGenFunction &CGF, Address VAListAddr, Address gp_offset_p = Address::invalid(), fp_offset_p = Address::invalid(); llvm::Value *gp_offset = nullptr, *fp_offset = nullptr; if (neededInt) { - gp_offset_p = - CGF.Builder.CreateStructGEP(VAListAddr, 0, CharUnits::Zero(), - "gp_offset_p"); + gp_offset_p = CGF.Builder.CreateStructGEP(VAListAddr, 0, "gp_offset_p"); gp_offset = CGF.Builder.CreateLoad(gp_offset_p, "gp_offset"); InRegs = llvm::ConstantInt::get(CGF.Int32Ty, 48 - neededInt * 8); InRegs = CGF.Builder.CreateICmpULE(gp_offset, InRegs, "fits_in_gp"); } if (neededSSE) { - fp_offset_p = - CGF.Builder.CreateStructGEP(VAListAddr, 1, CharUnits::fromQuantity(4), - "fp_offset_p"); + fp_offset_p = CGF.Builder.CreateStructGEP(VAListAddr, 1, "fp_offset_p"); fp_offset = CGF.Builder.CreateLoad(fp_offset_p, "fp_offset"); llvm::Value *FitsInFP = llvm::ConstantInt::get(CGF.Int32Ty, 176 - neededSSE * 16); @@ -3754,8 +3749,7 @@ Address X86_64ABIInfo::EmitVAArg(CodeGenFunction &CGF, Address VAListAddr, // loads than necessary. Can we clean this up? llvm::Type *LTy = CGF.ConvertTypeForMem(Ty); llvm::Value *RegSaveArea = CGF.Builder.CreateLoad( - CGF.Builder.CreateStructGEP(VAListAddr, 3, CharUnits::fromQuantity(16)), - "reg_save_area"); + CGF.Builder.CreateStructGEP(VAListAddr, 3), "reg_save_area"); Address RegAddr = Address::invalid(); if (neededInt && neededSSE) { @@ -3781,16 +3775,13 @@ Address X86_64ABIInfo::EmitVAArg(CodeGenFunction &CGF, Address VAListAddr, llvm::Value *V = CGF.Builder.CreateAlignedLoad( TyLo, CGF.Builder.CreateBitCast(RegLoAddr, PTyLo), CharUnits::fromQuantity(getDataLayout().getABITypeAlignment(TyLo))); - CGF.Builder.CreateStore(V, - CGF.Builder.CreateStructGEP(Tmp, 0, CharUnits::Zero())); + CGF.Builder.CreateStore(V, CGF.Builder.CreateStructGEP(Tmp, 0)); // Copy the second element. V = CGF.Builder.CreateAlignedLoad( TyHi, CGF.Builder.CreateBitCast(RegHiAddr, PTyHi), CharUnits::fromQuantity(getDataLayout().getABITypeAlignment(TyHi))); - CharUnits Offset = CharUnits::fromQuantity( - getDataLayout().getStructLayout(ST)->getElementOffset(1)); - CGF.Builder.CreateStore(V, CGF.Builder.CreateStructGEP(Tmp, 1, Offset)); + CGF.Builder.CreateStore(V, CGF.Builder.CreateStructGEP(Tmp, 1)); RegAddr = CGF.Builder.CreateElementBitCast(Tmp, LTy); } else if (neededInt) { @@ -3837,12 +3828,10 @@ Address X86_64ABIInfo::EmitVAArg(CodeGenFunction &CGF, Address VAListAddr, Tmp = CGF.Builder.CreateElementBitCast(Tmp, ST); V = CGF.Builder.CreateLoad(CGF.Builder.CreateElementBitCast( RegAddrLo, ST->getStructElementType(0))); - CGF.Builder.CreateStore(V, - CGF.Builder.CreateStructGEP(Tmp, 0, CharUnits::Zero())); + CGF.Builder.CreateStore(V, CGF.Builder.CreateStructGEP(Tmp, 0)); V = CGF.Builder.CreateLoad(CGF.Builder.CreateElementBitCast( RegAddrHi, ST->getStructElementType(1))); - CGF.Builder.CreateStore(V, - CGF.Builder.CreateStructGEP(Tmp, 1, CharUnits::fromQuantity(8))); + CGF.Builder.CreateStore(V, CGF.Builder.CreateStructGEP(Tmp, 1)); RegAddr = CGF.Builder.CreateElementBitCast(Tmp, LTy); } @@ -4184,9 +4173,9 @@ Address PPC32_SVR4_ABIInfo::EmitVAArg(CodeGenFunction &CGF, Address VAList, // The calling convention either uses 1-2 GPRs or 1 FPR. Address NumRegsAddr = Address::invalid(); if (isInt || IsSoftFloatABI) { - NumRegsAddr = Builder.CreateStructGEP(VAList, 0, CharUnits::Zero(), "gpr"); + NumRegsAddr = Builder.CreateStructGEP(VAList, 0, "gpr"); } else { - NumRegsAddr = Builder.CreateStructGEP(VAList, 1, CharUnits::One(), "fpr"); + NumRegsAddr = Builder.CreateStructGEP(VAList, 1, "fpr"); } llvm::Value *NumRegs = Builder.CreateLoad(NumRegsAddr, "numUsedRegs"); @@ -4214,8 +4203,7 @@ Address PPC32_SVR4_ABIInfo::EmitVAArg(CodeGenFunction &CGF, Address VAList, { CGF.EmitBlock(UsingRegs); - Address RegSaveAreaPtr = - Builder.CreateStructGEP(VAList, 4, CharUnits::fromQuantity(8)); + Address RegSaveAreaPtr = Builder.CreateStructGEP(VAList, 4); RegAddr = Address(Builder.CreateLoad(RegSaveAreaPtr), CharUnits::fromQuantity(8)); assert(RegAddr.getElementType() == CGF.Int8Ty); @@ -4263,8 +4251,7 @@ Address PPC32_SVR4_ABIInfo::EmitVAArg(CodeGenFunction &CGF, Address VAList, Size = CGF.getPointerSize(); } - Address OverflowAreaAddr = - Builder.CreateStructGEP(VAList, 3, CharUnits::fromQuantity(4)); + Address OverflowAreaAddr = Builder.CreateStructGEP(VAList, 3); Address OverflowArea(Builder.CreateLoad(OverflowAreaAddr, "argp.cur"), OverflowAreaAlign); // Round up address of argument to alignment @@ -5304,25 +5291,18 @@ Address AArch64ABIInfo::EmitAAPCSVAArg(Address VAListAddr, Address reg_offs_p = Address::invalid(); llvm::Value *reg_offs = nullptr; int reg_top_index; - CharUnits reg_top_offset; int RegSize = IsIndirect ? 8 : TyInfo.first.getQuantity(); if (!IsFPR) { // 3 is the field number of __gr_offs - reg_offs_p = - CGF.Builder.CreateStructGEP(VAListAddr, 3, CharUnits::fromQuantity(24), - "gr_offs_p"); + reg_offs_p = CGF.Builder.CreateStructGEP(VAListAddr, 3, "gr_offs_p"); reg_offs = CGF.Builder.CreateLoad(reg_offs_p, "gr_offs"); reg_top_index = 1; // field number for __gr_top - reg_top_offset = CharUnits::fromQuantity(8); RegSize = llvm::alignTo(RegSize, 8); } else { // 4 is the field number of __vr_offs. - reg_offs_p = - CGF.Builder.CreateStructGEP(VAListAddr, 4, CharUnits::fromQuantity(28), - "vr_offs_p"); + reg_offs_p = CGF.Builder.CreateStructGEP(VAListAddr, 4, "vr_offs_p"); reg_offs = CGF.Builder.CreateLoad(reg_offs_p, "vr_offs"); reg_top_index = 2; // field number for __vr_top - reg_top_offset = CharUnits::fromQuantity(16); RegSize = 16 * NumRegs; } @@ -5384,8 +5364,8 @@ Address AArch64ABIInfo::EmitAAPCSVAArg(Address VAListAddr, CGF.EmitBlock(InRegBlock); llvm::Value *reg_top = nullptr; - Address reg_top_p = CGF.Builder.CreateStructGEP(VAListAddr, reg_top_index, - reg_top_offset, "reg_top_p"); + Address reg_top_p = + CGF.Builder.CreateStructGEP(VAListAddr, reg_top_index, "reg_top_p"); reg_top = CGF.Builder.CreateLoad(reg_top_p, "reg_top"); Address BaseAddr(CGF.Builder.CreateInBoundsGEP(reg_top, reg_offs), CharUnits::fromQuantity(IsFPR ? 16 : 8)); @@ -5425,8 +5405,7 @@ Address AArch64ABIInfo::EmitAAPCSVAArg(Address VAListAddr, CGF.Builder.CreateConstInBoundsByteGEP(BaseAddr, BaseOffset); LoadAddr = CGF.Builder.CreateElementBitCast(LoadAddr, BaseTy); - Address StoreAddr = - CGF.Builder.CreateConstArrayGEP(Tmp, i, BaseTyInfo.first); + Address StoreAddr = CGF.Builder.CreateConstArrayGEP(Tmp, i); llvm::Value *Elem = CGF.Builder.CreateLoad(LoadAddr); CGF.Builder.CreateStore(Elem, StoreAddr); @@ -5455,8 +5434,7 @@ Address AArch64ABIInfo::EmitAAPCSVAArg(Address VAListAddr, //======================================= CGF.EmitBlock(OnStackBlock); - Address stack_p = CGF.Builder.CreateStructGEP(VAListAddr, 0, - CharUnits::Zero(), "stack_p"); + Address stack_p = CGF.Builder.CreateStructGEP(VAListAddr, 0, "stack_p"); llvm::Value *OnStackPtr = CGF.Builder.CreateLoad(stack_p, "stack"); // Again, stack arguments may need realignment. In this case both integer and @@ -6290,10 +6268,56 @@ class NVPTXTargetCodeGenInfo : public TargetCodeGenInfo { static void addNVVMMetadata(llvm::Function *F, StringRef Name, int Operand); }; +/// Checks if the type is unsupported directly by the current target. +static bool isUnsupportedType(ASTContext &Context, QualType T) { + if (!Context.getTargetInfo().hasFloat16Type() && T->isFloat16Type()) + return true; + if (!Context.getTargetInfo().hasFloat128Type() && T->isFloat128Type()) + return true; + if (!Context.getTargetInfo().hasInt128Type() && T->isIntegerType() && + Context.getTypeSize(T) > 64) + return true; + if (const auto *AT = T->getAsArrayTypeUnsafe()) + return isUnsupportedType(Context, AT->getElementType()); + const auto *RT = T->getAs(); + if (!RT) + return false; + const RecordDecl *RD = RT->getDecl(); + + // If this is a C++ record, check the bases first. + if (const CXXRecordDecl *CXXRD = dyn_cast(RD)) + for (const CXXBaseSpecifier &I : CXXRD->bases()) + if (isUnsupportedType(Context, I.getType())) + return true; + + for (const FieldDecl *I : RD->fields()) + if (isUnsupportedType(Context, I->getType())) + return true; + return false; +} + +/// Coerce the given type into an array with maximum allowed size of elements. +static ABIArgInfo coerceToIntArrayWithLimit(QualType Ty, ASTContext &Context, + llvm::LLVMContext &LLVMContext, + unsigned MaxSize) { + // Alignment and Size are measured in bits. + const uint64_t Size = Context.getTypeSize(Ty); + const uint64_t Alignment = Context.getTypeAlign(Ty); + const unsigned Div = std::min(MaxSize, Alignment); + llvm::Type *IntType = llvm::Type::getIntNTy(LLVMContext, Div); + const uint64_t NumElements = (Size + Div - 1) / Div; + return ABIArgInfo::getDirect(llvm::ArrayType::get(IntType, NumElements)); +} + ABIArgInfo NVPTXABIInfo::classifyReturnType(QualType RetTy) const { if (RetTy->isVoidType()) return ABIArgInfo::getIgnore(); + if (getContext().getLangOpts().OpenMP && + getContext().getLangOpts().OpenMPIsDevice && + isUnsupportedType(getContext(), RetTy)) + return coerceToIntArrayWithLimit(RetTy, getContext(), getVMContext(), 64); + // note: this is different from default ABI if (!RetTy->isScalarType()) return ABIArgInfo::getDirect(); @@ -6599,8 +6623,7 @@ Address SystemZABIInfo::EmitVAArg(CodeGenFunction &CGF, Address VAListAddr, // Vector arguments are always passed in the high bits of a // single (8 byte) or double (16 byte) stack slot. Address OverflowArgAreaPtr = - CGF.Builder.CreateStructGEP(VAListAddr, 2, CharUnits::fromQuantity(16), - "overflow_arg_area_ptr"); + CGF.Builder.CreateStructGEP(VAListAddr, 2, "overflow_arg_area_ptr"); Address OverflowArgArea = Address(CGF.Builder.CreateLoad(OverflowArgAreaPtr, "overflow_arg_area"), TyInfo.second); @@ -6632,9 +6655,8 @@ Address SystemZABIInfo::EmitVAArg(CodeGenFunction &CGF, Address VAListAddr, RegPadding = Padding; // values are passed in the low bits of a GPR } - Address RegCountPtr = CGF.Builder.CreateStructGEP( - VAListAddr, RegCountField, RegCountField * CharUnits::fromQuantity(8), - "reg_count_ptr"); + Address RegCountPtr = + CGF.Builder.CreateStructGEP(VAListAddr, RegCountField, "reg_count_ptr"); llvm::Value *RegCount = CGF.Builder.CreateLoad(RegCountPtr, "reg_count"); llvm::Value *MaxRegsV = llvm::ConstantInt::get(IndexTy, MaxRegs); llvm::Value *InRegs = CGF.Builder.CreateICmpULT(RegCount, MaxRegsV, @@ -6657,8 +6679,7 @@ Address SystemZABIInfo::EmitVAArg(CodeGenFunction &CGF, Address VAListAddr, llvm::Value *RegOffset = CGF.Builder.CreateAdd(ScaledRegCount, RegBase, "reg_offset"); Address RegSaveAreaPtr = - CGF.Builder.CreateStructGEP(VAListAddr, 3, CharUnits::fromQuantity(24), - "reg_save_area_ptr"); + CGF.Builder.CreateStructGEP(VAListAddr, 3, "reg_save_area_ptr"); llvm::Value *RegSaveArea = CGF.Builder.CreateLoad(RegSaveAreaPtr, "reg_save_area"); Address RawRegAddr(CGF.Builder.CreateGEP(RegSaveArea, RegOffset, @@ -6678,8 +6699,8 @@ Address SystemZABIInfo::EmitVAArg(CodeGenFunction &CGF, Address VAListAddr, CGF.EmitBlock(InMemBlock); // Work out the address of a stack argument. - Address OverflowArgAreaPtr = CGF.Builder.CreateStructGEP( - VAListAddr, 2, CharUnits::fromQuantity(16), "overflow_arg_area_ptr"); + Address OverflowArgAreaPtr = + CGF.Builder.CreateStructGEP(VAListAddr, 2, "overflow_arg_area_ptr"); Address OverflowArgArea = Address(CGF.Builder.CreateLoad(OverflowArgAreaPtr, "overflow_arg_area"), PaddedSize); @@ -7788,8 +7809,23 @@ class AMDGPUTargetCodeGenInfo : public TargetCodeGenInfo { }; } +static bool requiresAMDGPUProtectedVisibility(const Decl *D, + llvm::GlobalValue *GV) { + if (GV->getVisibility() != llvm::GlobalValue::HiddenVisibility) + return false; + + return D->hasAttr() || + (isa(D) && D->hasAttr()) || + (isa(D) && D->hasAttr()); +} + void AMDGPUTargetCodeGenInfo::setTargetAttributes( const Decl *D, llvm::GlobalValue *GV, CodeGen::CodeGenModule &M) const { + if (requiresAMDGPUProtectedVisibility(D, GV)) { + GV->setVisibility(llvm::GlobalValue::ProtectedVisibility); + GV->setDSOLocal(true); + } + if (GV->isDeclaration()) return; const FunctionDecl *FD = dyn_cast_or_null(D); @@ -7807,8 +7843,16 @@ void AMDGPUTargetCodeGenInfo::setTargetAttributes( const auto *FlatWGS = FD->getAttr(); if (ReqdWGS || FlatWGS) { - unsigned Min = FlatWGS ? FlatWGS->getMin() : 0; - unsigned Max = FlatWGS ? FlatWGS->getMax() : 0; + unsigned Min = 0; + unsigned Max = 0; + if (FlatWGS) { + Min = FlatWGS->getMin() + ->EvaluateKnownConstInt(M.getContext()) + .getExtValue(); + Max = FlatWGS->getMax() + ->EvaluateKnownConstInt(M.getContext()) + .getExtValue(); + } if (ReqdWGS && Min == 0 && Max == 0) Min = Max = ReqdWGS->getXDim() * ReqdWGS->getYDim() * ReqdWGS->getZDim(); @@ -7822,8 +7866,12 @@ void AMDGPUTargetCodeGenInfo::setTargetAttributes( } if (const auto *Attr = FD->getAttr()) { - unsigned Min = Attr->getMin(); - unsigned Max = Attr->getMax(); + unsigned Min = + Attr->getMin()->EvaluateKnownConstInt(M.getContext()).getExtValue(); + unsigned Max = Attr->getMax() ? Attr->getMax() + ->EvaluateKnownConstInt(M.getContext()) + .getExtValue() + : 0; if (Min != 0) { assert((Max == 0 || Min <= Max) && "Min must be less than or equal Max"); @@ -8211,9 +8259,8 @@ Address SparcV9ABIInfo::EmitVAArg(CodeGenFunction &CGF, Address VAListAddr, } // Update VAList. - llvm::Value *NextPtr = - Builder.CreateConstInBoundsByteGEP(Addr.getPointer(), Stride, "ap.next"); - Builder.CreateStore(NextPtr, VAListAddr); + Address NextPtr = Builder.CreateConstInBoundsByteGEP(Addr, Stride, "ap.next"); + Builder.CreateStore(NextPtr.getPointer(), VAListAddr); return Builder.CreateBitCast(ArgAddr, ArgPtrTy, "arg.addr"); } @@ -8566,9 +8613,8 @@ Address XCoreABIInfo::EmitVAArg(CodeGenFunction &CGF, Address VAListAddr, // Increment the VAList. if (!ArgSize.isZero()) { - llvm::Value *APN = - Builder.CreateConstInBoundsByteGEP(AP.getPointer(), ArgSize); - Builder.CreateStore(APN, VAListAddr); + Address APN = Builder.CreateConstInBoundsByteGEP(AP, ArgSize); + Builder.CreateStore(APN.getPointer(), VAListAddr); } return Val; diff --git a/clang/lib/CrossTU/CrossTranslationUnit.cpp b/clang/lib/CrossTU/CrossTranslationUnit.cpp index a0b83e92e25f8..04c98545ae543 100644 --- a/clang/lib/CrossTU/CrossTranslationUnit.cpp +++ b/clang/lib/CrossTU/CrossTranslationUnit.cpp @@ -42,6 +42,7 @@ STATISTIC(NumGetCTUSuccess, "requested function's body"); STATISTIC(NumTripleMismatch, "The # of triple mismatches"); STATISTIC(NumLangMismatch, "The # of language mismatches"); +STATISTIC(NumLangDialectMismatch, "The # of language dialect mismatches"); // Same as Triple's equality operator, but we check a field only if that is // known in both instances. @@ -99,6 +100,8 @@ class IndexErrorCategory : public std::error_category { return "Triple mismatch"; case index_error_code::lang_mismatch: return "Language mismatch"; + case index_error_code::lang_dialect_mismatch: + return "Language dialect mismatch"; } llvm_unreachable("Unrecognized index_error_code."); } @@ -228,6 +231,7 @@ CrossTranslationUnitContext::getCrossTUDefinition(const FunctionDecl *FD, const auto &LangTo = Context.getLangOpts(); const auto &LangFrom = Unit->getASTContext().getLangOpts(); + // FIXME: Currenty we do not support CTU across C++ and C and across // different dialects of C++. if (LangTo.CPlusPlus != LangFrom.CPlusPlus) { @@ -235,6 +239,28 @@ CrossTranslationUnitContext::getCrossTUDefinition(const FunctionDecl *FD, return llvm::make_error(index_error_code::lang_mismatch); } + // If CPP dialects are different then return with error. + // + // Consider this STL code: + // template + // struct __alloc_traits + // #if __cplusplus >= 201103L + // : std::allocator_traits<_Alloc> + // #endif + // { // ... + // }; + // This class template would create ODR errors during merging the two units, + // since in one translation unit the class template has a base class, however + // in the other unit it has none. + if (LangTo.CPlusPlus11 != LangFrom.CPlusPlus11 || + LangTo.CPlusPlus14 != LangFrom.CPlusPlus14 || + LangTo.CPlusPlus17 != LangFrom.CPlusPlus17 || + LangTo.CPlusPlus2a != LangFrom.CPlusPlus2a) { + ++NumLangDialectMismatch; + return llvm::make_error( + index_error_code::lang_dialect_mismatch); + } + TranslationUnitDecl *TU = Unit->getASTContext().getTranslationUnitDecl(); if (const FunctionDecl *ResultDecl = findFunctionInDeclContext(TU, LookupFnName)) diff --git a/clang/lib/Driver/Action.cpp b/clang/lib/Driver/Action.cpp index 2d926b6cd75fe..6912b89513ea6 100644 --- a/clang/lib/Driver/Action.cpp +++ b/clang/lib/Driver/Action.cpp @@ -415,3 +415,9 @@ void OffloadWrappingJobAction::anchor() {} OffloadWrappingJobAction::OffloadWrappingJobAction(Action *Input, types::ID Type) : JobAction(OffloadWrappingJobClass, Input, Type) {} + +void SPIRVTranslatorJobAction::anchor() {} + +SPIRVTranslatorJobAction::SPIRVTranslatorJobAction(Action *Input, + types::ID Type) + : JobAction(SPIRVTranslatorJobClass, Input, Type) {} diff --git a/clang/lib/Driver/Driver.cpp b/clang/lib/Driver/Driver.cpp index 94ddcb3bbc327..87d76d58bf767 100644 --- a/clang/lib/Driver/Driver.cpp +++ b/clang/lib/Driver/Driver.cpp @@ -1697,8 +1697,7 @@ void Driver::HandleAutocompletions(StringRef PassedFlags) const { // We want to show cc1-only options only when clang is invoked with -cc1 or // -Xclang. - if (std::find(Flags.begin(), Flags.end(), "-Xclang") != Flags.end() || - std::find(Flags.begin(), Flags.end(), "-cc1") != Flags.end()) + if (llvm::is_contained(Flags, "-Xclang") || llvm::is_contained(Flags, "-cc1")) DisableFlags &= ~options::NoDriverOption; StringRef Cur; @@ -2416,6 +2415,9 @@ class OffloadingActionBuilder final { /// Flag that is set to true if this builder acted on the current input. bool IsActive = false; + + /// Flag for -fgpu-rdc. + bool Relocatable = false; public: CudaActionBuilderBase(Compilation &C, DerivedArgList &Args, const Driver::InputList &Inputs, @@ -2461,6 +2463,12 @@ class OffloadingActionBuilder final { // If this is an unbundling action use it as is for each CUDA toolchain. if (auto *UA = dyn_cast(HostAction)) { + + // If -fgpu-rdc is disabled, should not unbundle since there is no + // device code to link. + if (!Relocatable) + return ABRT_Inactive; + CudaDeviceActions.clear(); auto *IA = cast(UA->getInputs().back()); std::string FileName = IA->getInputArg().getAsString(Args); @@ -2532,6 +2540,9 @@ class OffloadingActionBuilder final { !C.hasOffloadToolChain()) return false; + Relocatable = Args.hasFlag(options::OPT_fgpu_rdc, + options::OPT_fno_gpu_rdc, /*Default=*/false); + const ToolChain *HostTC = C.getSingleOffloadToolChain(); assert(HostTC && "No toolchain for host compilation."); if (HostTC->getTriple().isNVPTX() || @@ -2717,13 +2728,11 @@ class OffloadingActionBuilder final { class HIPActionBuilder final : public CudaActionBuilderBase { /// The linker inputs obtained for each device arch. SmallVector DeviceLinkerInputs; - bool Relocatable; public: HIPActionBuilder(Compilation &C, DerivedArgList &Args, const Driver::InputList &Inputs) - : CudaActionBuilderBase(C, Args, Inputs, Action::OFK_HIP), - Relocatable(false) {} + : CudaActionBuilderBase(C, Args, Inputs, Action::OFK_HIP) {} bool canUseBundlerUnbundler() const override { return true; } @@ -2828,13 +2837,6 @@ class OffloadingActionBuilder final { ++I; } } - - bool initialize() override { - Relocatable = Args.hasFlag(options::OPT_fgpu_rdc, - options::OPT_fno_gpu_rdc, /*Default=*/false); - - return CudaActionBuilderBase::initialize(); - } }; /// OpenMP action builder. The host bitcode is passed to the device frontend @@ -3851,7 +3853,15 @@ Action *Driver::ConstructPhaseAction( return C.MakeAction(Input, Output); } if (Args.hasArg(options::OPT_sycl)) { - return C.MakeAction(Input, types::TY_SPIRV); + if (Args.hasFlag(options::OPT_fsycl_use_bitcode, + options::OPT_fno_sycl_use_bitcode, true)) + return C.MakeAction(Input, types::TY_LLVM_BC); + // Use of --sycl creates a bitcode file, we need to translate that to + // a SPIR-V file with -fno-sycl-use-bitcode + auto *BackendAction = + C.MakeAction(Input, types::TY_LLVM_BC); + return C.MakeAction(BackendAction, + types::TY_SPIRV); } return C.MakeAction(Input, types::TY_PP_Asm); } diff --git a/clang/lib/Driver/SanitizerArgs.cpp b/clang/lib/Driver/SanitizerArgs.cpp index 0112416a883c6..e84933bea02cb 100644 --- a/clang/lib/Driver/SanitizerArgs.cpp +++ b/clang/lib/Driver/SanitizerArgs.cpp @@ -21,33 +21,52 @@ #include using namespace clang; -using namespace clang::SanitizerKind; using namespace clang::driver; using namespace llvm::opt; -enum : SanitizerMask { - NeedsUbsanRt = Undefined | Integer | ImplicitConversion | Nullability | CFI, - NeedsUbsanCxxRt = Vptr | CFI, - NotAllowedWithTrap = Vptr, - NotAllowedWithMinimalRuntime = Vptr, - RequiresPIE = DataFlow | HWAddress | Scudo, - NeedsUnwindTables = Address | HWAddress | Thread | Memory | DataFlow, - SupportsCoverage = Address | HWAddress | KernelAddress | KernelHWAddress | - Memory | KernelMemory | Leak | Undefined | Integer | - ImplicitConversion | Nullability | DataFlow | Fuzzer | - FuzzerNoLink, - RecoverableByDefault = Undefined | Integer | ImplicitConversion | Nullability, - Unrecoverable = Unreachable | Return, - AlwaysRecoverable = KernelAddress | KernelHWAddress, - LegacyFsanitizeRecoverMask = Undefined | Integer, - NeedsLTO = CFI, - TrappingSupported = (Undefined & ~Vptr) | UnsignedIntegerOverflow | - ImplicitConversion | Nullability | LocalBounds | CFI, - TrappingDefault = CFI, - CFIClasses = - CFIVCall | CFINVCall | CFIMFCall | CFIDerivedCast | CFIUnrelatedCast, - CompatibleWithMinimalRuntime = TrappingSupported | Scudo | ShadowCallStack, -}; +static const SanitizerMask NeedsUbsanRt = + SanitizerKind::Undefined | SanitizerKind::Integer | + SanitizerKind::ImplicitConversion | SanitizerKind::Nullability | + SanitizerKind::CFI; +static const SanitizerMask NeedsUbsanCxxRt = + SanitizerKind::Vptr | SanitizerKind::CFI; +static const SanitizerMask NotAllowedWithTrap = SanitizerKind::Vptr; +static const SanitizerMask NotAllowedWithMinimalRuntime = SanitizerKind::Vptr; +static const SanitizerMask RequiresPIE = + SanitizerKind::DataFlow | SanitizerKind::HWAddress | SanitizerKind::Scudo; +static const SanitizerMask NeedsUnwindTables = + SanitizerKind::Address | SanitizerKind::HWAddress | SanitizerKind::Thread | + SanitizerKind::Memory | SanitizerKind::DataFlow; +static const SanitizerMask SupportsCoverage = + SanitizerKind::Address | SanitizerKind::HWAddress | + SanitizerKind::KernelAddress | SanitizerKind::KernelHWAddress | + SanitizerKind::Memory | SanitizerKind::KernelMemory | SanitizerKind::Leak | + SanitizerKind::Undefined | SanitizerKind::Integer | + SanitizerKind::ImplicitConversion | SanitizerKind::Nullability | + SanitizerKind::DataFlow | SanitizerKind::Fuzzer | + SanitizerKind::FuzzerNoLink; +static const SanitizerMask RecoverableByDefault = + SanitizerKind::Undefined | SanitizerKind::Integer | + SanitizerKind::ImplicitConversion | SanitizerKind::Nullability; +static const SanitizerMask Unrecoverable = + SanitizerKind::Unreachable | SanitizerKind::Return; +static const SanitizerMask AlwaysRecoverable = + SanitizerKind::KernelAddress | SanitizerKind::KernelHWAddress; +static const SanitizerMask LegacyFsanitizeRecoverMask = + SanitizerKind::Undefined | SanitizerKind::Integer; +static const SanitizerMask NeedsLTO = SanitizerKind::CFI; +static const SanitizerMask TrappingSupported = + (SanitizerKind::Undefined & ~SanitizerKind::Vptr) | + SanitizerKind::UnsignedIntegerOverflow | SanitizerKind::ImplicitConversion | + SanitizerKind::Nullability | SanitizerKind::LocalBounds | + SanitizerKind::CFI; +static const SanitizerMask TrappingDefault = SanitizerKind::CFI; +static const SanitizerMask CFIClasses = + SanitizerKind::CFIVCall | SanitizerKind::CFINVCall | + SanitizerKind::CFIMFCall | SanitizerKind::CFIDerivedCast | + SanitizerKind::CFIUnrelatedCast; +static const SanitizerMask CompatibleWithMinimalRuntime = + TrappingSupported | SanitizerKind::Scudo | SanitizerKind::ShadowCallStack; enum CoverageFeature { CoverageFunc = 1 << 0, @@ -100,13 +119,15 @@ static void addDefaultBlacklists(const Driver &D, SanitizerMask Kinds, struct Blacklist { const char *File; SanitizerMask Mask; - } Blacklists[] = {{"asan_blacklist.txt", Address}, - {"hwasan_blacklist.txt", HWAddress}, - {"msan_blacklist.txt", Memory}, - {"tsan_blacklist.txt", Thread}, - {"dfsan_abilist.txt", DataFlow}, - {"cfi_blacklist.txt", CFI}, - {"ubsan_blacklist.txt", Undefined | Integer | Nullability}}; + } Blacklists[] = {{"asan_blacklist.txt", SanitizerKind::Address}, + {"hwasan_blacklist.txt", SanitizerKind::HWAddress}, + {"msan_blacklist.txt", SanitizerKind::Memory}, + {"tsan_blacklist.txt", SanitizerKind::Thread}, + {"dfsan_abilist.txt", SanitizerKind::DataFlow}, + {"cfi_blacklist.txt", SanitizerKind::CFI}, + {"ubsan_blacklist.txt", SanitizerKind::Undefined | + SanitizerKind::Integer | + SanitizerKind::Nullability}}; for (auto BL : Blacklists) { if (!(Kinds & BL.Mask)) @@ -116,7 +137,7 @@ static void addDefaultBlacklists(const Driver &D, SanitizerMask Kinds, llvm::sys::path::append(Path, "share", BL.File); if (llvm::sys::fs::exists(Path)) BlacklistFiles.push_back(Path.str()); - else if (BL.Mask == CFI) + else if (BL.Mask == SanitizerKind::CFI) // If cfi_blacklist.txt cannot be found in the resource dir, driver // should fail. D.Diag(clang::diag::err_drv_no_such_file) << Path; @@ -136,10 +157,10 @@ static SanitizerMask setGroupBits(SanitizerMask Kinds) { static SanitizerMask parseSanitizeTrapArgs(const Driver &D, const llvm::opt::ArgList &Args) { - SanitizerMask TrapRemove = 0; // During the loop below, the accumulated set of + SanitizerMask TrapRemove; // During the loop below, the accumulated set of // sanitizers disabled by the current sanitizer // argument or any argument after it. - SanitizerMask TrappingKinds = 0; + SanitizerMask TrappingKinds; SanitizerMask TrappingSupportedWithGroups = setGroupBits(TrappingSupported); for (ArgList::const_reverse_iterator I = Args.rbegin(), E = Args.rend(); @@ -163,11 +184,12 @@ static SanitizerMask parseSanitizeTrapArgs(const Driver &D, options::OPT_fsanitize_undefined_trap_on_error)) { Arg->claim(); TrappingKinds |= - expandSanitizerGroups(UndefinedGroup & ~TrapRemove) & ~TrapRemove; + expandSanitizerGroups(SanitizerKind::UndefinedGroup & ~TrapRemove) & + ~TrapRemove; } else if (Arg->getOption().matches( options::OPT_fno_sanitize_undefined_trap_on_error)) { Arg->claim(); - TrapRemove |= expandSanitizerGroups(UndefinedGroup); + TrapRemove |= expandSanitizerGroups(SanitizerKind::UndefinedGroup); } } @@ -189,13 +211,13 @@ bool SanitizerArgs::needsUbsanRt() const { } bool SanitizerArgs::needsCfiRt() const { - return !(Sanitizers.Mask & CFI & ~TrapSanitizers.Mask) && CfiCrossDso && - !ImplicitCfiRuntime; + return !(Sanitizers.Mask & SanitizerKind::CFI & ~TrapSanitizers.Mask) && + CfiCrossDso && !ImplicitCfiRuntime; } bool SanitizerArgs::needsCfiDiagRt() const { - return (Sanitizers.Mask & CFI & ~TrapSanitizers.Mask) && CfiCrossDso && - !ImplicitCfiRuntime; + return (Sanitizers.Mask & SanitizerKind::CFI & ~TrapSanitizers.Mask) && + CfiCrossDso && !ImplicitCfiRuntime; } bool SanitizerArgs::requiresPIE() const { @@ -203,24 +225,26 @@ bool SanitizerArgs::requiresPIE() const { } bool SanitizerArgs::needsUnwindTables() const { - return Sanitizers.Mask & NeedsUnwindTables; + return static_cast(Sanitizers.Mask & NeedsUnwindTables); } -bool SanitizerArgs::needsLTO() const { return Sanitizers.Mask & NeedsLTO; } +bool SanitizerArgs::needsLTO() const { + return static_cast(Sanitizers.Mask & NeedsLTO); +} SanitizerArgs::SanitizerArgs(const ToolChain &TC, const llvm::opt::ArgList &Args) { - SanitizerMask AllRemove = 0; // During the loop below, the accumulated set of + SanitizerMask AllRemove; // During the loop below, the accumulated set of // sanitizers disabled by the current sanitizer // argument or any argument after it. - SanitizerMask AllAddedKinds = 0; // Mask of all sanitizers ever enabled by + SanitizerMask AllAddedKinds; // Mask of all sanitizers ever enabled by // -fsanitize= flags (directly or via group // expansion), some of which may be disabled // later. Used to carefully prune // unused-argument diagnostics. - SanitizerMask DiagnosedKinds = 0; // All Kinds we have diagnosed up to now. + SanitizerMask DiagnosedKinds; // All Kinds we have diagnosed up to now. // Used to deduplicate diagnostics. - SanitizerMask Kinds = 0; + SanitizerMask Kinds; const SanitizerMask Supported = setGroupBits(TC.getSupportedSanitizers()); CfiCrossDso = Args.hasFlag(options::OPT_fsanitize_cfi_cross_dso, @@ -295,12 +319,12 @@ SanitizerArgs::SanitizerArgs(const ToolChain &TC, // identifiers. // Fixing both of those may require changes to the cross-DSO CFI // interface. - if (CfiCrossDso && (Add & CFIMFCall & ~DiagnosedKinds)) { + if (CfiCrossDso && (Add & SanitizerKind::CFIMFCall & ~DiagnosedKinds)) { D.Diag(diag::err_drv_argument_not_allowed_with) << "-fsanitize=cfi-mfcall" << "-fsanitize-cfi-cross-dso"; - Add &= ~CFIMFCall; - DiagnosedKinds |= CFIMFCall; + Add &= ~SanitizerKind::CFIMFCall; + DiagnosedKinds |= SanitizerKind::CFIMFCall; } if (SanitizerMask KindsToDiagnose = Add & ~Supported & ~DiagnosedKinds) { @@ -314,7 +338,7 @@ SanitizerArgs::SanitizerArgs(const ToolChain &TC, // Test for -fno-rtti + explicit -fsanitizer=vptr before expanding groups // so we don't error out if -fno-rtti and -fsanitize=undefined were // passed. - if ((Add & Vptr) && (RTTIMode == ToolChain::RM_Disabled)) { + if ((Add & SanitizerKind::Vptr) && (RTTIMode == ToolChain::RM_Disabled)) { if (const llvm::opt::Arg *NoRTTIArg = TC.getRTTIArg()) { assert(NoRTTIArg->getOption().matches(options::OPT_fno_rtti) && "RTTI disabled without -fno-rtti option?"); @@ -329,7 +353,7 @@ SanitizerArgs::SanitizerArgs(const ToolChain &TC, } // Take out the Vptr sanitizer from the enabled sanitizers - AllRemove |= Vptr; + AllRemove |= SanitizerKind::Vptr; } Add = expandSanitizerGroups(Add); @@ -342,14 +366,14 @@ SanitizerArgs::SanitizerArgs(const ToolChain &TC, Add &= ~NotAllowedWithMinimalRuntime; } if (CfiCrossDso) - Add &= ~CFIMFCall; + Add &= ~SanitizerKind::CFIMFCall; Add &= Supported; - if (Add & Fuzzer) - Add |= FuzzerNoLink; + if (Add & SanitizerKind::Fuzzer) + Add |= SanitizerKind::FuzzerNoLink; // Enable coverage if the fuzzing flag is set. - if (Add & FuzzerNoLink) { + if (Add & SanitizerKind::FuzzerNoLink) { CoverageFeatures |= CoverageInline8bitCounters | CoverageIndirCall | CoverageTraceCmp | CoveragePCTable; // Due to TLS differences, stack depth tracking is only enabled on Linux @@ -366,23 +390,42 @@ SanitizerArgs::SanitizerArgs(const ToolChain &TC, } std::pair IncompatibleGroups[] = { - std::make_pair(Address, Thread | Memory), - std::make_pair(Thread, Memory), - std::make_pair(Leak, Thread | Memory), - std::make_pair(KernelAddress, Address | Leak | Thread | Memory), - std::make_pair(HWAddress, Address | Thread | Memory | KernelAddress), - std::make_pair(Efficiency, Address | HWAddress | Leak | Thread | Memory | - KernelAddress), - std::make_pair(Scudo, Address | HWAddress | Leak | Thread | Memory | - KernelAddress | Efficiency), - std::make_pair(SafeStack, Address | HWAddress | Leak | Thread | Memory | - KernelAddress | Efficiency), - std::make_pair(KernelHWAddress, Address | HWAddress | Leak | Thread | - Memory | KernelAddress | Efficiency | - SafeStack), - std::make_pair(KernelMemory, Address | HWAddress | Leak | Thread | - Memory | KernelAddress | Efficiency | - Scudo | SafeStack)}; + std::make_pair(SanitizerKind::Address, + SanitizerKind::Thread | SanitizerKind::Memory), + std::make_pair(SanitizerKind::Thread, SanitizerKind::Memory), + std::make_pair(SanitizerKind::Leak, + SanitizerKind::Thread | SanitizerKind::Memory), + std::make_pair(SanitizerKind::KernelAddress, + SanitizerKind::Address | SanitizerKind::Leak | + SanitizerKind::Thread | SanitizerKind::Memory), + std::make_pair(SanitizerKind::HWAddress, + SanitizerKind::Address | SanitizerKind::Thread | + SanitizerKind::Memory | SanitizerKind::KernelAddress), + std::make_pair(SanitizerKind::Efficiency, + SanitizerKind::Address | SanitizerKind::HWAddress | + SanitizerKind::Leak | SanitizerKind::Thread | + SanitizerKind::Memory | SanitizerKind::KernelAddress), + std::make_pair(SanitizerKind::Scudo, + SanitizerKind::Address | SanitizerKind::HWAddress | + SanitizerKind::Leak | SanitizerKind::Thread | + SanitizerKind::Memory | SanitizerKind::KernelAddress | + SanitizerKind::Efficiency), + std::make_pair(SanitizerKind::SafeStack, + SanitizerKind::Address | SanitizerKind::HWAddress | + SanitizerKind::Leak | SanitizerKind::Thread | + SanitizerKind::Memory | SanitizerKind::KernelAddress | + SanitizerKind::Efficiency), + std::make_pair(SanitizerKind::KernelHWAddress, + SanitizerKind::Address | SanitizerKind::HWAddress | + SanitizerKind::Leak | SanitizerKind::Thread | + SanitizerKind::Memory | SanitizerKind::KernelAddress | + SanitizerKind::Efficiency | SanitizerKind::SafeStack), + std::make_pair(SanitizerKind::KernelMemory, + SanitizerKind::Address | SanitizerKind::HWAddress | + SanitizerKind::Leak | SanitizerKind::Thread | + SanitizerKind::Memory | SanitizerKind::KernelAddress | + SanitizerKind::Efficiency | SanitizerKind::Scudo | + SanitizerKind::SafeStack)}; // Enable toolchain specific default sanitizers if not explicitly disabled. SanitizerMask Default = TC.getDefaultSanitizers() & ~AllRemove; @@ -398,8 +441,8 @@ SanitizerArgs::SanitizerArgs(const ToolChain &TC, // We disable the vptr sanitizer if it was enabled by group expansion but RTTI // is disabled. - if ((Kinds & Vptr) && (RTTIMode == ToolChain::RM_Disabled)) { - Kinds &= ~Vptr; + if ((Kinds & SanitizerKind::Vptr) && (RTTIMode == ToolChain::RM_Disabled)) { + Kinds &= ~SanitizerKind::Vptr; } // Check that LTO is enabled if we need it. @@ -408,12 +451,12 @@ SanitizerArgs::SanitizerArgs(const ToolChain &TC, << lastArgumentForMask(D, Args, Kinds & NeedsLTO) << "-flto"; } - if ((Kinds & ShadowCallStack) && + if ((Kinds & SanitizerKind::ShadowCallStack) && TC.getTriple().getArch() == llvm::Triple::aarch64 && !llvm::AArch64::isX18ReservedByDefault(TC.getTriple()) && !Args.hasArg(options::OPT_ffixed_x18)) { D.Diag(diag::err_drv_argument_only_allowed_with) - << lastArgumentForMask(D, Args, Kinds & ShadowCallStack) + << lastArgumentForMask(D, Args, Kinds & SanitizerKind::ShadowCallStack) << "-ffixed-x18"; } @@ -421,12 +464,12 @@ SanitizerArgs::SanitizerArgs(const ToolChain &TC, // c++abi-specific parts of UBSan runtime, and they are not provided by the // toolchain. We don't have a good way to check the latter, so we just // check if the toolchan supports vptr. - if (~Supported & Vptr) { + if (~Supported & SanitizerKind::Vptr) { SanitizerMask KindsToDiagnose = Kinds & ~TrappingKinds & NeedsUbsanCxxRt; // The runtime library supports the Microsoft C++ ABI, but only well enough // for CFI. FIXME: Remove this once we support vptr on Windows. if (TC.getTriple().isOSWindows()) - KindsToDiagnose &= ~CFI; + KindsToDiagnose &= ~SanitizerKind::CFI; if (KindsToDiagnose) { SanitizerSet S; S.Mask = KindsToDiagnose; @@ -455,8 +498,8 @@ SanitizerArgs::SanitizerArgs(const ToolChain &TC, // Parse -f(no-)?sanitize-recover flags. SanitizerMask RecoverableKinds = RecoverableByDefault | AlwaysRecoverable; - SanitizerMask DiagnosedUnrecoverableKinds = 0; - SanitizerMask DiagnosedAlwaysRecoverableKinds = 0; + SanitizerMask DiagnosedUnrecoverableKinds; + SanitizerMask DiagnosedAlwaysRecoverableKinds; for (const auto *Arg : Args) { const char *DeprecatedReplacement = nullptr; if (Arg->getOption().matches(options::OPT_fsanitize_recover)) { @@ -539,7 +582,7 @@ SanitizerArgs::SanitizerArgs(const ToolChain &TC, } // Parse -f[no-]sanitize-memory-track-origins[=level] options. - if (AllAddedKinds & Memory) { + if (AllAddedKinds & SanitizerKind::Memory) { if (Arg *A = Args.getLastArg(options::OPT_fsanitize_memory_track_origins_EQ, options::OPT_fsanitize_memory_track_origins, @@ -567,19 +610,19 @@ SanitizerArgs::SanitizerArgs(const ToolChain &TC, MsanUseAfterDtor = false; } - if (AllAddedKinds & Thread) { - TsanMemoryAccess = Args.hasFlag(options::OPT_fsanitize_thread_memory_access, - options::OPT_fno_sanitize_thread_memory_access, - TsanMemoryAccess); - TsanFuncEntryExit = Args.hasFlag(options::OPT_fsanitize_thread_func_entry_exit, - options::OPT_fno_sanitize_thread_func_entry_exit, - TsanFuncEntryExit); - TsanAtomics = Args.hasFlag(options::OPT_fsanitize_thread_atomics, - options::OPT_fno_sanitize_thread_atomics, - TsanAtomics); + if (AllAddedKinds & SanitizerKind::Thread) { + TsanMemoryAccess = Args.hasFlag( + options::OPT_fsanitize_thread_memory_access, + options::OPT_fno_sanitize_thread_memory_access, TsanMemoryAccess); + TsanFuncEntryExit = Args.hasFlag( + options::OPT_fsanitize_thread_func_entry_exit, + options::OPT_fno_sanitize_thread_func_entry_exit, TsanFuncEntryExit); + TsanAtomics = + Args.hasFlag(options::OPT_fsanitize_thread_atomics, + options::OPT_fno_sanitize_thread_atomics, TsanAtomics); } - if (AllAddedKinds & CFI) { + if (AllAddedKinds & SanitizerKind::CFI) { // Without PIE, external function address may resolve to a PLT record, which // can not be verified by the target module. NeedPIE |= CfiCrossDso; @@ -603,7 +646,7 @@ SanitizerArgs::SanitizerArgs(const ToolChain &TC, << "-fsanitize-minimal-runtime" << lastArgumentForMask(D, Args, IncompatibleMask); - SanitizerMask NonTrappingCfi = Kinds & CFI & ~TrappingKinds; + SanitizerMask NonTrappingCfi = Kinds & SanitizerKind::CFI & ~TrappingKinds; if (NonTrappingCfi) D.Diag(clang::diag::err_drv_argument_only_allowed_with) << "fsanitize-minimal-runtime" @@ -691,7 +734,7 @@ SanitizerArgs::SanitizerArgs(const ToolChain &TC, ImplicitCfiRuntime = TC.getTriple().isAndroid(); - if (AllAddedKinds & Address) { + if (AllAddedKinds & SanitizerKind::Address) { NeedPIE |= TC.getTriple().isOSFuchsia(); if (Arg *A = Args.getLastArg(options::OPT_fsanitize_address_field_padding)) { @@ -713,7 +756,7 @@ SanitizerArgs::SanitizerArgs(const ToolChain &TC, case options::OPT__SLASH_LDd: D.Diag(clang::diag::err_drv_argument_not_allowed_with) << WindowsDebugRTArg->getAsString(Args) - << lastArgumentForMask(D, Args, Address); + << lastArgumentForMask(D, Args, SanitizerKind::Address); D.Diag(clang::diag::note_drv_address_sanitizer_debug_runtime); } } @@ -742,7 +785,7 @@ SanitizerArgs::SanitizerArgs(const ToolChain &TC, AsanUseAfterScope = false; } - if (AllAddedKinds & HWAddress) { + if (AllAddedKinds & SanitizerKind::HWAddress) { if (Arg *HwasanAbiArg = Args.getLastArg(options::OPT_fsanitize_hwaddress_abi_EQ)) { HwasanAbi = HwasanAbiArg->getValue(); @@ -754,7 +797,7 @@ SanitizerArgs::SanitizerArgs(const ToolChain &TC, } } - if (AllAddedKinds & SafeStack) { + if (AllAddedKinds & SanitizerKind::SafeStack) { // SafeStack runtime is built into the system on Fuchsia. SafeStackRuntime = !TC.getTriple().isOSFuchsia(); } @@ -774,7 +817,7 @@ SanitizerArgs::SanitizerArgs(const ToolChain &TC, static std::string toString(const clang::SanitizerSet &Sanitizers) { std::string Res; #define SANITIZER(NAME, ID) \ - if (Sanitizers.has(ID)) { \ + if (Sanitizers.has(SanitizerKind::ID)) { \ if (!Res.empty()) \ Res += ","; \ Res += NAME; \ @@ -936,7 +979,8 @@ void SanitizerArgs::addArgs(const ToolChain &TC, const llvm::opt::ArgList &Args, // https://github.com/google/sanitizers/issues/373 // We can't make this conditional on -fsanitize=leak, as that flag shouldn't // affect compilation. - if (Sanitizers.has(Memory) || Sanitizers.has(Address)) + if (Sanitizers.has(SanitizerKind::Memory) || + Sanitizers.has(SanitizerKind::Address)) CmdArgs.push_back("-fno-assume-sane-operator-new"); // Require -fvisibility= flag on non-Windows when compiling if vptr CFI is @@ -959,18 +1003,18 @@ SanitizerMask parseArgValues(const Driver &D, const llvm::opt::Arg *A, A->getOption().matches(options::OPT_fsanitize_trap_EQ) || A->getOption().matches(options::OPT_fno_sanitize_trap_EQ)) && "Invalid argument in parseArgValues!"); - SanitizerMask Kinds = 0; + SanitizerMask Kinds; for (int i = 0, n = A->getNumValues(); i != n; ++i) { const char *Value = A->getValue(i); SanitizerMask Kind; // Special case: don't accept -fsanitize=all. if (A->getOption().matches(options::OPT_fsanitize_EQ) && 0 == strcmp("all", Value)) - Kind = 0; + Kind = SanitizerMask(); // Similarly, don't accept -fsanitize=efficiency-all. else if (A->getOption().matches(options::OPT_fsanitize_EQ) && 0 == strcmp("efficiency-all", Value)) - Kind = 0; + Kind = SanitizerMask(); else Kind = parseSanitizerValue(Value, /*AllowGroups=*/true); diff --git a/clang/lib/Driver/ToolChain.cpp b/clang/lib/Driver/ToolChain.cpp index c261ceac954b0..4c9aa1ab78f3d 100644 --- a/clang/lib/Driver/ToolChain.cpp +++ b/clang/lib/Driver/ToolChain.cpp @@ -291,6 +291,12 @@ Tool *ToolChain::getOffloadWrapper() const { return OffloadWrapper.get(); } +Tool *ToolChain::getSPIRVTranslator() const { + if (!SPIRVTranslator) + SPIRVTranslator.reset(new tools::SPIRVTranslator(*this)); + return SPIRVTranslator.get(); +} + Tool *ToolChain::getTool(Action::ActionClass AC) const { switch (AC) { case Action::AssembleJobClass: @@ -323,6 +329,9 @@ Tool *ToolChain::getTool(Action::ActionClass AC) const { case Action::OffloadWrappingJobClass: return getOffloadWrapper(); + + case Action::SPIRVTranslatorJobClass: + return getSPIRVTranslator(); } llvm_unreachable("Invalid tool kind."); @@ -414,9 +423,12 @@ bool ToolChain::needsProfileRT(const ArgList &Args) { if (needsGCovInstrumentation(Args) || Args.hasArg(options::OPT_fprofile_generate) || Args.hasArg(options::OPT_fprofile_generate_EQ) || + Args.hasArg(options::OPT_fcs_profile_generate) || + Args.hasArg(options::OPT_fcs_profile_generate_EQ) || Args.hasArg(options::OPT_fprofile_instr_generate) || Args.hasArg(options::OPT_fprofile_instr_generate_EQ) || - Args.hasArg(options::OPT_fcreate_profile)) + Args.hasArg(options::OPT_fcreate_profile) || + Args.hasArg(options::OPT_forder_file_instrumentation)) return true; return false; @@ -827,21 +839,23 @@ SanitizerMask ToolChain::getSupportedSanitizers() const { // Return sanitizers which don't require runtime support and are not // platform dependent. - using namespace SanitizerKind; - - SanitizerMask Res = (Undefined & ~Vptr & ~Function) | (CFI & ~CFIICall) | - CFICastStrict | UnsignedIntegerOverflow | - ImplicitConversion | Nullability | LocalBounds; + SanitizerMask Res = (SanitizerKind::Undefined & ~SanitizerKind::Vptr & + ~SanitizerKind::Function) | + (SanitizerKind::CFI & ~SanitizerKind::CFIICall) | + SanitizerKind::CFICastStrict | + SanitizerKind::UnsignedIntegerOverflow | + SanitizerKind::ImplicitConversion | + SanitizerKind::Nullability | SanitizerKind::LocalBounds; if (getTriple().getArch() == llvm::Triple::x86 || getTriple().getArch() == llvm::Triple::x86_64 || getTriple().getArch() == llvm::Triple::arm || getTriple().getArch() == llvm::Triple::aarch64 || getTriple().getArch() == llvm::Triple::wasm32 || getTriple().getArch() == llvm::Triple::wasm64) - Res |= CFIICall; + Res |= SanitizerKind::CFIICall; if (getTriple().getArch() == llvm::Triple::x86_64 || getTriple().getArch() == llvm::Triple::aarch64) - Res |= ShadowCallStack; + Res |= SanitizerKind::ShadowCallStack; return Res; } diff --git a/clang/lib/Driver/ToolChains/AMDGPU.cpp b/clang/lib/Driver/ToolChains/AMDGPU.cpp index b9300bcc42e77..7f6ddabb2ac1d 100644 --- a/clang/lib/Driver/ToolChains/AMDGPU.cpp +++ b/clang/lib/Driver/ToolChains/AMDGPU.cpp @@ -38,15 +38,8 @@ void amdgpu::Linker::ConstructJob(Compilation &C, const JobAction &JA, void amdgpu::getAMDGPUTargetFeatures(const Driver &D, const llvm::opt::ArgList &Args, std::vector &Features) { - if (const Arg *dAbi = Args.getLastArg(options::OPT_mamdgpu_debugger_abi)) { - StringRef value = dAbi->getValue(); - if (value == "1.0") { - Features.push_back("+amdgpu-debugger-insert-nops"); - Features.push_back("+amdgpu-debugger-emit-prologue"); - } else { - D.Diag(diag::err_drv_clang_unsupported) << dAbi->getAsString(Args); - } - } + if (const Arg *dAbi = Args.getLastArg(options::OPT_mamdgpu_debugger_abi)) + D.Diag(diag::err_drv_clang_unsupported) << dAbi->getAsString(Args); handleTargetFeaturesGroup( Args, Features, options::OPT_m_amdgpu_Features_Group); diff --git a/clang/lib/Driver/ToolChains/Arch/AArch64.cpp b/clang/lib/Driver/ToolChains/Arch/AArch64.cpp index 2f1fd29f6feca..e229e4c13cf43 100644 --- a/clang/lib/Driver/ToolChains/Arch/AArch64.cpp +++ b/clang/lib/Driver/ToolChains/Arch/AArch64.cpp @@ -207,7 +207,7 @@ void aarch64::getAArch64TargetFeatures(const Driver &D, // TargetParser rewrite. const auto ItRNoFullFP16 = std::find(Features.rbegin(), Features.rend(), "-fullfp16"); const auto ItRFP16FML = std::find(Features.rbegin(), Features.rend(), "+fp16fml"); - if (std::find(Features.begin(), Features.end(), "+v8.4a") != Features.end()) { + if (llvm::is_contained(Features, "+v8.4a")) { const auto ItRFullFP16 = std::find(Features.rbegin(), Features.rend(), "+fullfp16"); if (ItRFullFP16 < ItRNoFullFP16 && ItRFullFP16 < ItRFP16FML) { // Only entangled feature that can be to the right of this +fullfp16 is -fp16fml. @@ -217,8 +217,7 @@ void aarch64::getAArch64TargetFeatures(const Driver &D, } else goto fp16_fml_fallthrough; - } - else { + } else { fp16_fml_fallthrough: // In both of these cases, putting the 'other' feature on the end of the vector will // result in the same effect as placing it immediately after the current feature. @@ -335,12 +334,57 @@ void aarch64::getAArch64TargetFeatures(const Driver &D, if (Args.hasArg(options::OPT_ffixed_x7)) Features.push_back("+reserve-x7"); + if (Args.hasArg(options::OPT_ffixed_x9)) + Features.push_back("+reserve-x9"); + + if (Args.hasArg(options::OPT_ffixed_x10)) + Features.push_back("+reserve-x10"); + + if (Args.hasArg(options::OPT_ffixed_x11)) + Features.push_back("+reserve-x11"); + + if (Args.hasArg(options::OPT_ffixed_x12)) + Features.push_back("+reserve-x12"); + + if (Args.hasArg(options::OPT_ffixed_x13)) + Features.push_back("+reserve-x13"); + + if (Args.hasArg(options::OPT_ffixed_x14)) + Features.push_back("+reserve-x14"); + + if (Args.hasArg(options::OPT_ffixed_x15)) + Features.push_back("+reserve-x15"); + if (Args.hasArg(options::OPT_ffixed_x18)) Features.push_back("+reserve-x18"); if (Args.hasArg(options::OPT_ffixed_x20)) Features.push_back("+reserve-x20"); + if (Args.hasArg(options::OPT_ffixed_x21)) + Features.push_back("+reserve-x21"); + + if (Args.hasArg(options::OPT_ffixed_x22)) + Features.push_back("+reserve-x22"); + + if (Args.hasArg(options::OPT_ffixed_x23)) + Features.push_back("+reserve-x23"); + + if (Args.hasArg(options::OPT_ffixed_x24)) + Features.push_back("+reserve-x24"); + + if (Args.hasArg(options::OPT_ffixed_x25)) + Features.push_back("+reserve-x25"); + + if (Args.hasArg(options::OPT_ffixed_x26)) + Features.push_back("+reserve-x26"); + + if (Args.hasArg(options::OPT_ffixed_x27)) + Features.push_back("+reserve-x27"); + + if (Args.hasArg(options::OPT_ffixed_x28)) + Features.push_back("+reserve-x28"); + if (Args.hasArg(options::OPT_fcall_saved_x8)) Features.push_back("+call-saved-x8"); diff --git a/clang/lib/Driver/ToolChains/Arch/ARM.cpp b/clang/lib/Driver/ToolChains/Arch/ARM.cpp index 1a6636ac329d1..81aba5471045a 100644 --- a/clang/lib/Driver/ToolChains/Arch/ARM.cpp +++ b/clang/lib/Driver/ToolChains/Arch/ARM.cpp @@ -248,7 +248,7 @@ arm::FloatABI arm::getARMFloatABI(const ToolChain &TC, const ArgList &Args) { ABI = FloatABI::SoftFP; break; case llvm::Triple::Android: - ABI = (SubArch == 7) ? FloatABI::SoftFP : FloatABI::Soft; + ABI = (SubArch >= 7) ? FloatABI::SoftFP : FloatABI::Soft; break; default: // Assume "soft", but warn the user we are guessing. @@ -378,9 +378,7 @@ void arm::getARMTargetFeatures(const ToolChain &TC, } else if (FPUArg) { getARMFPUFeatures(D, FPUArg, Args, FPUArg->getValue(), Features); } else if (Triple.isAndroid() && getARMSubArchVersionNumber(Triple) >= 7) { - // Android mandates minimum FPU requirements based on OS version. - const char *AndroidFPU = - Triple.isAndroidVersionLT(23) ? "vfpv3-d16" : "neon"; + const char *AndroidFPU = "neon"; if (!llvm::ARM::getFPUFeatures(llvm::ARM::parseFPU(AndroidFPU), Features)) D.Diag(clang::diag::err_drv_clang_unsupported) << std::string("-mfpu=") + AndroidFPU; diff --git a/clang/lib/Driver/ToolChains/Arch/PPC.cpp b/clang/lib/Driver/ToolChains/Arch/PPC.cpp index cbefaefcee321..f0a3271564cf6 100644 --- a/clang/lib/Driver/ToolChains/Arch/PPC.cpp +++ b/clang/lib/Driver/ToolChains/Arch/PPC.cpp @@ -115,7 +115,7 @@ ppc::ReadGOTPtrMode ppc::getPPCReadGOTPtrMode(const Driver &D, const llvm::Tripl const ArgList &Args) { if (Args.getLastArg(options::OPT_msecure_plt)) return ppc::ReadGOTPtrMode::SecurePlt; - if (Triple.isOSOpenBSD()) + if (Triple.isOSNetBSD() || Triple.isOSOpenBSD()) return ppc::ReadGOTPtrMode::SecurePlt; else return ppc::ReadGOTPtrMode::Bss; diff --git a/clang/lib/Driver/ToolChains/Arch/RISCV.cpp b/clang/lib/Driver/ToolChains/Arch/RISCV.cpp index 9bcbcf4b79bc6..b5cee381e1f74 100644 --- a/clang/lib/Driver/ToolChains/Arch/RISCV.cpp +++ b/clang/lib/Driver/ToolChains/Arch/RISCV.cpp @@ -170,7 +170,7 @@ static void getExtensionFeatures(const Driver &D, } // Check if duplicated extension. - if (std::find(AllExts.begin(), AllExts.end(), Ext) != AllExts.end()) { + if (llvm::is_contained(AllExts, Ext)) { std::string Error = "duplicated "; Error += Desc; D.Diag(diag::err_drv_invalid_riscv_ext_arch_name) @@ -364,6 +364,18 @@ void riscv::getRISCVTargetFeatures(const Driver &D, const ArgList &Args, getExtensionFeatures(D, Args, Features, MArch, OtherExts); } + // -mrelax is default, unless -mno-relax is specified. + bool Relax = true; + if (auto *A = Args.getLastArg(options::OPT_mrelax, options::OPT_mno_relax)) { + if (A->getOption().matches(options::OPT_mno_relax)) { + Relax = false; + Features.push_back("-relax"); + } + } + + if (Relax) + Features.push_back("+relax"); + // Now add any that the user explicitly requested on the command line, // which may override the defaults. handleTargetFeaturesGroup(Args, Features, options::OPT_m_riscv_Features_Group); diff --git a/clang/lib/Driver/ToolChains/BareMetal.cpp b/clang/lib/Driver/ToolChains/BareMetal.cpp index 9dbda69b37a8e..1544727050f4f 100644 --- a/clang/lib/Driver/ToolChains/BareMetal.cpp +++ b/clang/lib/Driver/ToolChains/BareMetal.cpp @@ -1,4 +1,4 @@ -//===--- BaremMetal.cpp - Bare Metal ToolChain ------------------*- C++ -*-===// +//===-- BareMetal.cpp - Bare Metal ToolChain --------------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/clang/lib/Driver/ToolChains/Clang.cpp b/clang/lib/Driver/ToolChains/Clang.cpp index dd2e214175f73..eb0ee7ecb8ee8 100644 --- a/clang/lib/Driver/ToolChains/Clang.cpp +++ b/clang/lib/Driver/ToolChains/Clang.cpp @@ -1,4 +1,4 @@ -//===--- LLVM.cpp - Clang+LLVM ToolChain Implementations --------*- C++ -*-===// +//===-- Clang.cpp - Clang+LLVM ToolChain Implementations --------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -526,6 +526,7 @@ static bool useFramePointerForTargetByDefault(const ArgList &Args, case llvm::Triple::xcore: case llvm::Triple::wasm32: case llvm::Triple::wasm64: + case llvm::Triple::msp430: // XCore never wants frame pointers, regardless of OS. // WebAssembly never wants frame pointers. return false; @@ -735,6 +736,13 @@ static void addPGOAndCoverageFlags(Compilation &C, const Driver &D, PGOGenerateArg->getOption().matches(options::OPT_fno_profile_generate)) PGOGenerateArg = nullptr; + auto *CSPGOGenerateArg = Args.getLastArg(options::OPT_fcs_profile_generate, + options::OPT_fcs_profile_generate_EQ, + options::OPT_fno_profile_generate); + if (CSPGOGenerateArg && + CSPGOGenerateArg->getOption().matches(options::OPT_fno_profile_generate)) + CSPGOGenerateArg = nullptr; + auto *ProfileGenerateArg = Args.getLastArg( options::OPT_fprofile_instr_generate, options::OPT_fprofile_instr_generate_EQ, @@ -758,6 +766,10 @@ static void addPGOAndCoverageFlags(Compilation &C, const Driver &D, D.Diag(diag::err_drv_argument_not_allowed_with) << ProfileGenerateArg->getSpelling() << ProfileUseArg->getSpelling(); + if (CSPGOGenerateArg && PGOGenerateArg) + D.Diag(diag::err_drv_argument_not_allowed_with) + << CSPGOGenerateArg->getSpelling() << PGOGenerateArg->getSpelling(); + if (ProfileGenerateArg) { if (ProfileGenerateArg->getOption().matches( options::OPT_fprofile_instr_generate_EQ)) @@ -767,11 +779,22 @@ static void addPGOAndCoverageFlags(Compilation &C, const Driver &D, CmdArgs.push_back("-fprofile-instrument=clang"); } + Arg *PGOGenArg = nullptr; if (PGOGenerateArg) { + assert(!CSPGOGenerateArg); + PGOGenArg = PGOGenerateArg; CmdArgs.push_back("-fprofile-instrument=llvm"); - if (PGOGenerateArg->getOption().matches( - options::OPT_fprofile_generate_EQ)) { - SmallString<128> Path(PGOGenerateArg->getValue()); + } + if (CSPGOGenerateArg) { + assert(!PGOGenerateArg); + PGOGenArg = CSPGOGenerateArg; + CmdArgs.push_back("-fprofile-instrument=csllvm"); + } + if (PGOGenArg) { + if (PGOGenArg->getOption().matches( + PGOGenerateArg ? options::OPT_fprofile_generate_EQ + : options::OPT_fcs_profile_generate_EQ)) { + SmallString<128> Path(PGOGenArg->getValue()); llvm::sys::path::append(Path, "default_%m.profraw"); CmdArgs.push_back( Args.MakeArgString(Twine("-fprofile-instrument-path=") + Path)); @@ -3523,9 +3546,9 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, CmdArgs.push_back("-aux-triple"); CmdArgs.push_back(Args.MakeArgString(NormalizedTriple)); CmdArgs.push_back("-disable-llvm-passes"); - if (Args.hasFlag(options::OPT_fsycl_use_bitcode, - options::OPT_fno_sycl_use_bitcode, true)) { - CmdArgs.push_back("-fsycl-use-bitcode"); + if (Args.hasFlag(options::OPT_fsycl_allow_func_ptr, + options::OPT_fno_sycl_allow_func_ptr, false)) { + CmdArgs.push_back("-fsycl-allow-func-ptr"); } } @@ -3573,7 +3596,7 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, } } else if (isa(JA)) { if (IsSYCLOffloadDevice && IsSYCLDevice) { - CmdArgs.push_back("-emit-spirv"); + CmdArgs.push_back("-emit-llvm-bc"); } else { CmdArgs.push_back("-emit-obj"); CollectArgsForIntegratedAssembler(C, Args, CmdArgs, D); @@ -3616,8 +3639,6 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, } else if (JA.getType() == types::TY_RewrittenLegacyObjC) { CmdArgs.push_back("-rewrite-objc"); rewriteKind = RK_Fragile; - } else if (JA.getType() == types::TY_SPIRV) { - CmdArgs.push_back("-emit-spirv"); } else { assert(JA.getType() == types::TY_PP_Asm && "Unexpected output type!"); } @@ -3857,6 +3878,13 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, CmdArgs.push_back("-pic-is-pie"); } + if (RelocationModel == llvm::Reloc::ROPI || + RelocationModel == llvm::Reloc::ROPI_RWPI) + CmdArgs.push_back("-fropi"); + if (RelocationModel == llvm::Reloc::RWPI || + RelocationModel == llvm::Reloc::ROPI_RWPI) + CmdArgs.push_back("-frwpi"); + if (Arg *A = Args.getLastArg(options::OPT_meabi)) { CmdArgs.push_back("-meabi"); CmdArgs.push_back(A->getValue()); @@ -4504,6 +4532,8 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, Args.AddAllArgs(CmdArgs, options::OPT_fopenmp_version_EQ); Args.AddAllArgs(CmdArgs, options::OPT_fopenmp_cuda_number_of_sm_EQ); Args.AddAllArgs(CmdArgs, options::OPT_fopenmp_cuda_blocks_per_sm_EQ); + Args.AddAllArgs(CmdArgs, + options::OPT_fopenmp_cuda_teams_reduction_recs_num_EQ); if (Args.hasFlag(options::OPT_fopenmp_optimistic_collapse, options::OPT_fno_openmp_optimistic_collapse, /*Default=*/false)) @@ -4651,6 +4681,14 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, // Forward -f options with positive and negative forms; we translate // these by hand. if (Arg *A = getLastProfileSampleUseArg(Args)) { + auto *PGOArg = Args.getLastArg( + options::OPT_fprofile_generate, options::OPT_fprofile_generate_EQ, + options::OPT_fcs_profile_generate, options::OPT_fcs_profile_generate_EQ, + options::OPT_fprofile_use, options::OPT_fprofile_use_EQ); + if (PGOArg) + D.Diag(diag::err_drv_argument_not_allowed_with) + << "SampleUse with PGO options"; + StringRef fname = A->getValue(); if (!llvm::sys::fs::exists(fname)) D.Diag(diag::err_drv_no_such_file) << fname; @@ -5379,6 +5417,17 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, } } + if (Args.hasArg(options::OPT_forder_file_instrumentation)) { + CmdArgs.push_back("-forder-file-instrumentation"); + // Enable order file instrumentation when ThinLTO is not on. When ThinLTO is + // on, we need to pass these flags as linker flags and that will be handled + // outside of the compiler. + if (!D.isUsingLTO()) { + CmdArgs.push_back("-mllvm"); + CmdArgs.push_back("-enable-order-file-instrumentation"); + } + } + if (Arg *A = Args.getLastArg(options::OPT_fforce_enable_int128, options::OPT_fno_force_enable_int128)) { if (A->getOption().matches(options::OPT_fforce_enable_int128)) @@ -6321,7 +6370,10 @@ void OffloadWrapper::ConstructJob(Compilation &C, const JobAction &JA, // The wrapper command looks like this: // clang-offload-wrapper // -o=.bc - // -target=sycl-x86_64-pc-linux-gnu .spv + // -host=x86_64-pc-linux-gnu -kind=sycl + // -format=spirv .spv (optional) + // -format=spirv .spv (optional) + // ... ArgStringList WrapperArgs; std::string OutTmpName = C.getDriver().GetTemporaryPath("wrapper", "bc"); @@ -6330,20 +6382,25 @@ void OffloadWrapper::ConstructJob(Compilation &C, const JobAction &JA, SmallString<128> OutOpt("-o="); OutOpt += WrapperFileName; WrapperArgs.push_back(C.getArgs().MakeArgString(OutOpt)); + + SmallString<128> HostTripleOpt("-host="); + HostTripleOpt += getToolChain().getAuxTriple()->str(); + WrapperArgs.push_back(C.getArgs().MakeArgString(HostTripleOpt)); + + // TODO forcing offload kind is a simplification which assumes wrapper used + // only with SYCL. Device binary format (-format=xxx) option should also come + // from the command line and/or the native compiler. Should be fixed together + // with supporting AOT in the driver. + // If format is not set, the default is "none" which means runtime must try + // to determine it automatically. + StringRef Kind = Action::GetOffloadKindName(JA.getOffloadingDeviceKind()); + WrapperArgs.push_back( + C.getArgs().MakeArgString(Twine("-kind=") + Twine(Kind))); + for (auto I : Inputs) { WrapperArgs.push_back(I.getFilename()); } - SmallString<128> TargetOpt("-target="); - TargetOpt += Action::GetOffloadKindName(JA.getOffloadingDeviceKind()); - TargetOpt += '-'; - TargetOpt += getToolChain().getAuxTriple()->str(); - WrapperArgs.push_back(C.getArgs().MakeArgString(TargetOpt)); - - // For SYCL, do not emit entry tables - if (JA.isOffloading(Action::OFK_SYCL)) - WrapperArgs.push_back("-emit-entry-table=0"); - C.addCommand(llvm::make_unique(JA, *this, TCArgs.MakeArgString(getToolChain().GetProgramPath(getShortName())), WrapperArgs, None)); @@ -6369,3 +6426,30 @@ void OffloadWrapper::ConstructJob(Compilation &C, const JobAction &JA, C.addCommand(llvm::make_unique(JA, *this, Llc, LlcArgs, None)); } +// Begin SPIRVTranslator + +void SPIRVTranslator::ConstructJob(Compilation &C, const JobAction &JA, + const InputInfo &Output, + const InputInfoList &Inputs, + const llvm::opt::ArgList &TCArgs, + const char *LinkingOutput) const { + // Construct llvm-spirv command. + assert(isa(JA) && "Expecting Translator job!"); + + // The translator command looks like this: + // llvm-spirv -o .spv .bc + ArgStringList TranslatorArgs; + + TranslatorArgs.push_back("-o"); + TranslatorArgs.push_back(Output.getFilename()); + if (getToolChain().getTriple().isSYCLDeviceEnvironment()) + TranslatorArgs.push_back("-spirv-no-deref-attr"); + for (auto I : Inputs) { + TranslatorArgs.push_back(I.getFilename()); + } + + C.addCommand(llvm::make_unique(JA, *this, + TCArgs.MakeArgString(getToolChain().GetProgramPath(getShortName())), + TranslatorArgs, None)); +} + diff --git a/clang/lib/Driver/ToolChains/Clang.h b/clang/lib/Driver/ToolChains/Clang.h index 2f4eab1e9ad3c..fd808d1d21522 100644 --- a/clang/lib/Driver/ToolChains/Clang.h +++ b/clang/lib/Driver/ToolChains/Clang.h @@ -159,6 +159,19 @@ class LLVM_LIBRARY_VISIBILITY OffloadWrapper final : public Tool { const llvm::opt::ArgList &TCArgs, const char *LinkingOutput) const override; }; + +/// SPIR-V translator tool. +class LLVM_LIBRARY_VISIBILITY SPIRVTranslator final : public Tool { +public: + SPIRVTranslator(const ToolChain &TC) + : Tool("SPIR-V translator", "llvm-spirv", TC) {} + + bool hasIntegratedCPP() const override { return false; } + void ConstructJob(Compilation &C, const JobAction &JA, + const InputInfo &Output, const InputInfoList &Inputs, + const llvm::opt::ArgList &TCArgs, + const char *LinkingOutput) const override; +}; } // end namespace tools } // end namespace driver diff --git a/clang/lib/Driver/ToolChains/CommonArgs.cpp b/clang/lib/Driver/ToolChains/CommonArgs.cpp index 1161e8158d58a..a3d7a603c9f81 100644 --- a/clang/lib/Driver/ToolChains/CommonArgs.cpp +++ b/clang/lib/Driver/ToolChains/CommonArgs.cpp @@ -443,6 +443,31 @@ void tools::AddGoldPlugin(const ToolChain &ToolChain, const ArgList &Args, Args.MakeArgString(Twine("-plugin-opt=sample-profile=") + FName)); } + auto *CSPGOGenerateArg = Args.getLastArg(options::OPT_fcs_profile_generate, + options::OPT_fcs_profile_generate_EQ, + options::OPT_fno_profile_generate); + if (CSPGOGenerateArg && + CSPGOGenerateArg->getOption().matches(options::OPT_fno_profile_generate)) + CSPGOGenerateArg = nullptr; + + auto *ProfileUseArg = getLastProfileUseArg(Args); + + if (CSPGOGenerateArg) { + CmdArgs.push_back(Args.MakeArgString("-plugin-opt=cs-profile-generate")); + if (CSPGOGenerateArg->getOption().matches( + options::OPT_fcs_profile_generate_EQ)) { + SmallString<128> Path(CSPGOGenerateArg->getValue()); + llvm::sys::path::append(Path, "default_%m.profraw"); + CmdArgs.push_back( + Args.MakeArgString(Twine("-plugin-opt=cs-profile-path=") + Path)); + } else + CmdArgs.push_back( + Args.MakeArgString("-plugin-opt=cs-profile-path=default_%m.profraw")); + } else if (ProfileUseArg) { + CmdArgs.push_back(Args.MakeArgString(Twine("-plugin-opt=cs-profile-path=") + + ProfileUseArg->getValue())); + } + // Need this flag to turn on new pass manager via Gold plugin. if (Args.hasFlag(options::OPT_fexperimental_new_pass_manager, options::OPT_fno_experimental_new_pass_manager, @@ -1137,19 +1162,22 @@ static void AddLibgcc(const llvm::Triple &Triple, const Driver &D, bool isCygMing = Triple.isOSCygMing(); bool IsIAMCU = Triple.isOSIAMCU(); bool StaticLibgcc = Args.hasArg(options::OPT_static_libgcc) || - Args.hasArg(options::OPT_static); + Args.hasArg(options::OPT_static) || + Args.hasArg(options::OPT_static_pie); bool SharedLibgcc = Args.hasArg(options::OPT_shared_libgcc); bool UnspecifiedLibgcc = !StaticLibgcc && !SharedLibgcc; // Gcc adds libgcc arguments in various ways: // - // gcc : -lgcc --as-needed -lgcc_s --no-as-needed - // g++ : -lgcc_s -lgcc - // gcc shared: -lgcc_s -lgcc - // g++ shared: -lgcc_s -lgcc - // gcc static: -lgcc -lgcc_eh - // g++ static: -lgcc -lgcc_eh + // gcc : -lgcc --as-needed -lgcc_s --no-as-needed + // g++ : -lgcc_s -lgcc + // gcc shared: -lgcc_s -lgcc + // g++ shared: -lgcc_s -lgcc + // gcc static: -lgcc -lgcc_eh + // g++ static: -lgcc -lgcc_eh + // gcc static-pie: -lgcc -lgcc_eh + // g++ static-pie: -lgcc -lgcc_eh // // Also, certain targets need additional adjustments. diff --git a/clang/lib/Driver/ToolChains/CrossWindows.cpp b/clang/lib/Driver/ToolChains/CrossWindows.cpp index 97e0cfc179b6f..959dfd2ff9b2e 100644 --- a/clang/lib/Driver/ToolChains/CrossWindows.cpp +++ b/clang/lib/Driver/ToolChains/CrossWindows.cpp @@ -1,4 +1,4 @@ -//===--- CrossWindowsToolChain.cpp - Cross Windows Tool Chain -------------===// +//===-- CrossWindows.cpp - Cross Windows Tool Chain -----------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/clang/lib/Driver/ToolChains/Cuda.cpp b/clang/lib/Driver/ToolChains/Cuda.cpp index e3fe84b10181b..7d01f4b48d258 100644 --- a/clang/lib/Driver/ToolChains/Cuda.cpp +++ b/clang/lib/Driver/ToolChains/Cuda.cpp @@ -60,6 +60,8 @@ static CudaVersion ParseCudaVersionFile(llvm::StringRef V) { return CudaVersion::CUDA_92; if (Major == 10 && Minor == 0) return CudaVersion::CUDA_100; + if (Major == 10 && Minor == 1) + return CudaVersion::CUDA_101; return CudaVersion::UNKNOWN; } diff --git a/clang/lib/Driver/ToolChains/Darwin.cpp b/clang/lib/Driver/ToolChains/Darwin.cpp index 582f3f9c4aaad..8cd9263f6511f 100644 --- a/clang/lib/Driver/ToolChains/Darwin.cpp +++ b/clang/lib/Driver/ToolChains/Darwin.cpp @@ -1048,7 +1048,6 @@ void Darwin::addProfileRTLibs(const ArgList &Args, addExportedSymbol(CmdArgs, "___llvm_profile_filename"); addExportedSymbol(CmdArgs, "___llvm_profile_raw_version"); addExportedSymbol(CmdArgs, "_lprofCurFilename"); - addExportedSymbol(CmdArgs, "_lprofMergeValueProfData"); } addExportedSymbol(CmdArgs, "_lprofDirMode"); } @@ -2289,22 +2288,27 @@ void Darwin::addStartObjectFileArgs(const ArgList &Args, } } else { if (Args.hasArg(options::OPT_pg) && SupportsProfiling()) { - if (Args.hasArg(options::OPT_static) || - Args.hasArg(options::OPT_object) || - Args.hasArg(options::OPT_preload)) { - CmdArgs.push_back("-lgcrt0.o"); - } else { - CmdArgs.push_back("-lgcrt1.o"); + if (isTargetMacOS() && isMacosxVersionLT(10, 9)) { + if (Args.hasArg(options::OPT_static) || + Args.hasArg(options::OPT_object) || + Args.hasArg(options::OPT_preload)) { + CmdArgs.push_back("-lgcrt0.o"); + } else { + CmdArgs.push_back("-lgcrt1.o"); - // darwin_crt2 spec is empty. + // darwin_crt2 spec is empty. + } + // By default on OS X 10.8 and later, we don't link with a crt1.o + // file and the linker knows to use _main as the entry point. But, + // when compiling with -pg, we need to link with the gcrt1.o file, + // so pass the -no_new_main option to tell the linker to use the + // "start" symbol as the entry point. + if (isTargetMacOS() && !isMacosxVersionLT(10, 8)) + CmdArgs.push_back("-no_new_main"); + } else { + getDriver().Diag(diag::err_drv_clang_unsupported_opt_pg_darwin) + << isTargetMacOS(); } - // By default on OS X 10.8 and later, we don't link with a crt1.o - // file and the linker knows to use _main as the entry point. But, - // when compiling with -pg, we need to link with the gcrt1.o file, - // so pass the -no_new_main option to tell the linker to use the - // "start" symbol as the entry point. - if (isTargetMacOS() && !isMacosxVersionLT(10, 8)) - CmdArgs.push_back("-no_new_main"); } else { if (Args.hasArg(options::OPT_static) || Args.hasArg(options::OPT_object) || diff --git a/clang/lib/Driver/ToolChains/Fuchsia.cpp b/clang/lib/Driver/ToolChains/Fuchsia.cpp index 1ca52eb62bdaa..0db6d0e15993b 100644 --- a/clang/lib/Driver/ToolChains/Fuchsia.cpp +++ b/clang/lib/Driver/ToolChains/Fuchsia.cpp @@ -148,7 +148,8 @@ void fuchsia::Linker::ConstructJob(Compilation &C, const JobAction &JA, if (Args.hasArg(options::OPT_fsplit_stack)) CmdArgs.push_back("--wrap=pthread_create"); - CmdArgs.push_back("-lc"); + if (!Args.hasArg(options::OPT_nolibc)) + CmdArgs.push_back("-lc"); } C.addCommand(llvm::make_unique(JA, *this, Exec, CmdArgs, Inputs)); diff --git a/clang/lib/Driver/ToolChains/Gnu.cpp b/clang/lib/Driver/ToolChains/Gnu.cpp index e94a895373f70..209a19b6d1e67 100644 --- a/clang/lib/Driver/ToolChains/Gnu.cpp +++ b/clang/lib/Driver/ToolChains/Gnu.cpp @@ -333,6 +333,7 @@ void tools::gnutools::Linker::ConstructJob(Compilation &C, const JobAction &JA, const bool isAndroid = ToolChain.getTriple().isAndroid(); const bool IsIAMCU = ToolChain.getTriple().isOSIAMCU(); const bool IsPIE = getPIE(Args, ToolChain); + const bool IsStaticPIE = Args.hasArg(options::OPT_static_pie); const bool HasCRTBeginEndFiles = ToolChain.getTriple().hasEnvironment() || (ToolChain.getTriple().getVendor() != llvm::Triple::MipsTechnologies); @@ -353,6 +354,12 @@ void tools::gnutools::Linker::ConstructJob(Compilation &C, const JobAction &JA, if (IsPIE) CmdArgs.push_back("-pie"); + if (IsStaticPIE) { + CmdArgs.push_back("-static"); + CmdArgs.push_back("-pie"); + CmdArgs.push_back("--no-dynamic-linker"); + } + if (Args.hasArg(options::OPT_rdynamic)) CmdArgs.push_back("-export-dynamic"); @@ -402,7 +409,7 @@ void tools::gnutools::Linker::ConstructJob(Compilation &C, const JobAction &JA, if (Args.hasArg(options::OPT_rdynamic)) CmdArgs.push_back("-export-dynamic"); - if (!Args.hasArg(options::OPT_shared)) { + if (!Args.hasArg(options::OPT_shared) && !IsStaticPIE) { const std::string Loader = D.DyldPrefix + ToolChain.getDynamicLinker(Args); CmdArgs.push_back("-dynamic-linker"); @@ -421,6 +428,8 @@ void tools::gnutools::Linker::ConstructJob(Compilation &C, const JobAction &JA, crt1 = "gcrt1.o"; else if (IsPIE) crt1 = "Scrt1.o"; + else if (IsStaticPIE) + crt1 = "rcrt1.o"; else crt1 = "crt1.o"; } @@ -438,14 +447,14 @@ void tools::gnutools::Linker::ConstructJob(Compilation &C, const JobAction &JA, crtbegin = isAndroid ? "crtbegin_static.o" : "crtbeginT.o"; else if (Args.hasArg(options::OPT_shared)) crtbegin = isAndroid ? "crtbegin_so.o" : "crtbeginS.o"; - else if (IsPIE) + else if (IsPIE || IsStaticPIE) crtbegin = isAndroid ? "crtbegin_dynamic.o" : "crtbeginS.o"; else crtbegin = isAndroid ? "crtbegin_dynamic.o" : "crtbegin.o"; if (HasCRTBeginEndFiles) CmdArgs.push_back(Args.MakeArgString(ToolChain.GetFilePath(crtbegin))); - } + } // Add crtfastmath.o if available and fast math is enabled. ToolChain.AddFastMathRuntimeIfAvailable(Args, CmdArgs); @@ -489,7 +498,7 @@ void tools::gnutools::Linker::ConstructJob(Compilation &C, const JobAction &JA, if (!Args.hasArg(options::OPT_nostdlib)) { if (!Args.hasArg(options::OPT_nodefaultlibs)) { - if (Args.hasArg(options::OPT_static)) + if (Args.hasArg(options::OPT_static) || IsStaticPIE) CmdArgs.push_back("--start-group"); if (NeedsSanitizerDeps) @@ -512,19 +521,23 @@ void tools::gnutools::Linker::ConstructJob(Compilation &C, const JobAction &JA, AddRunTimeLibs(ToolChain, D, CmdArgs, Args); + if (Args.hasArg(options::OPT_fsycl)) + CmdArgs.push_back("-lsycl"); + if (WantPthread && !isAndroid) CmdArgs.push_back("-lpthread"); if (Args.hasArg(options::OPT_fsplit_stack)) CmdArgs.push_back("--wrap=pthread_create"); - CmdArgs.push_back("-lc"); + if (!Args.hasArg(options::OPT_nolibc)) + CmdArgs.push_back("-lc"); // Add IAMCU specific libs, if needed. if (IsIAMCU) CmdArgs.push_back("-lgloss"); - if (Args.hasArg(options::OPT_static)) + if (Args.hasArg(options::OPT_static) || IsStaticPIE) CmdArgs.push_back("--end-group"); else AddRunTimeLibs(ToolChain, D, CmdArgs, Args); @@ -541,7 +554,7 @@ void tools::gnutools::Linker::ConstructJob(Compilation &C, const JobAction &JA, const char *crtend; if (Args.hasArg(options::OPT_shared)) crtend = isAndroid ? "crtend_so.o" : "crtendS.o"; - else if (IsPIE) + else if (IsPIE || IsStaticPIE) crtend = isAndroid ? "crtend_android.o" : "crtendS.o"; else crtend = isAndroid ? "crtend_android.o" : "crtend.o"; diff --git a/clang/lib/Driver/ToolChains/HIP.cpp b/clang/lib/Driver/ToolChains/HIP.cpp index cd8ed6118fe0a..10be27c354ebc 100644 --- a/clang/lib/Driver/ToolChains/HIP.cpp +++ b/clang/lib/Driver/ToolChains/HIP.cpp @@ -160,7 +160,25 @@ const char *AMDGCN::Linker::constructLlcCommand( // Construct llc command. ArgStringList LlcArgs{InputFileName, "-mtriple=amdgcn-amd-amdhsa", "-filetype=obj", "-mattr=-code-object-v3", - Args.MakeArgString("-mcpu=" + SubArchName), "-o"}; + Args.MakeArgString("-mcpu=" + SubArchName)}; + + // Extract all the -m options + std::vector Features; + handleTargetFeaturesGroup( + Args, Features, options::OPT_m_amdgpu_Features_Group); + + // Add features to mattr such as xnack + std::string MAttrString = "-mattr="; + for(auto OneFeature : Features) { + MAttrString.append(Args.MakeArgString(OneFeature)); + if (OneFeature != Features.back()) + MAttrString.append(","); + } + if(!Features.empty()) + LlcArgs.push_back(Args.MakeArgString(MAttrString)); + + // Add output filename + LlcArgs.push_back("-o"); std::string LlcOutputFileName = C.getDriver().GetTemporaryPath(OutputFilePrefix, "o"); const char *LlcOutputFile = diff --git a/clang/lib/Driver/ToolChains/MSP430.h b/clang/lib/Driver/ToolChains/MSP430.h index 61fd0e1455bd3..b5308a8dd6875 100644 --- a/clang/lib/Driver/ToolChains/MSP430.h +++ b/clang/lib/Driver/ToolChains/MSP430.h @@ -36,6 +36,10 @@ class LLVM_LIBRARY_VISIBILITY MSP430ToolChain : public Generic_ELF { llvm::opt::ArgStringList &CC1Args, Action::OffloadKind) const override; + bool isPICDefault() const override { return false; } + bool isPIEDefault() const override { return false; } + bool isPICDefaultForced() const override { return true; } + protected: Tool *buildLinker() const override; diff --git a/clang/lib/Driver/ToolChains/MSVC.cpp b/clang/lib/Driver/ToolChains/MSVC.cpp index 8909cd01dccf3..f360e5b4ade2f 100644 --- a/clang/lib/Driver/ToolChains/MSVC.cpp +++ b/clang/lib/Driver/ToolChains/MSVC.cpp @@ -1,4 +1,4 @@ -//===--- ToolChains.cpp - ToolChain Implementations -----------------------===// +//===-- MSVC.cpp - MSVC ToolChain Implementations -------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -1407,10 +1407,10 @@ static void TranslateOptArg(Arg *A, llvm::opt::DerivedArgList &DAL, DAL.AddFlagArg( A, Opts.getOption(options::OPT_fno_omit_frame_pointer)); } else { - // Don't warn about /Oy- in 64-bit builds (where + // Don't warn about /Oy- in x86-64 builds (where // SupportsForcingFramePointer is false). The flag having no effect // there is a compiler-internal optimization, and people shouldn't have - // to special-case their build files for 64-bit clang-cl. + // to special-case their build files for x86-64 clang-cl. A->claim(); } break; @@ -1441,8 +1441,8 @@ MSVCToolChain::TranslateArgs(const llvm::opt::DerivedArgList &Args, DerivedArgList *DAL = new DerivedArgList(Args.getBaseArgs()); const OptTable &Opts = getDriver().getOpts(); - // /Oy and /Oy- only has an effect under X86-32. - bool SupportsForcingFramePointer = getArch() == llvm::Triple::x86; + // /Oy and /Oy- don't have an effect on X86-64 + bool SupportsForcingFramePointer = getArch() != llvm::Triple::x86_64; // The -O[12xd] flag actually expands to several flags. We must desugar the // flags so that options embedded can be negated. For example, the '-O2' flag diff --git a/clang/lib/Driver/ToolChains/MinGW.cpp b/clang/lib/Driver/ToolChains/MinGW.cpp index e8eca7325de86..7b2af0cbe3880 100644 --- a/clang/lib/Driver/ToolChains/MinGW.cpp +++ b/clang/lib/Driver/ToolChains/MinGW.cpp @@ -264,6 +264,8 @@ void tools::MinGW::Linker::ConstructJob(Compilation &C, const JobAction &JA, CmdArgs.push_back(Args.MakeArgString("--no-whole-archive")); } + TC.addProfileRTLibs(Args, CmdArgs); + if (!HasWindowsApp) { // Add system libraries. If linking to libwindowsapp.a, that import // library replaces all these and we shouldn't accidentally try to diff --git a/clang/lib/Driver/ToolChains/MipsLinux.cpp b/clang/lib/Driver/ToolChains/MipsLinux.cpp index f029e9ab5f4f3..47d8363fc46bc 100644 --- a/clang/lib/Driver/ToolChains/MipsLinux.cpp +++ b/clang/lib/Driver/ToolChains/MipsLinux.cpp @@ -1,4 +1,4 @@ -//===--- Mips.cpp - Mips ToolChain Implementations --------------*- C++ -*-===// +//===-- MipsLinux.cpp - Mips ToolChain Implementations ----------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/clang/lib/Driver/ToolChains/NetBSD.cpp b/clang/lib/Driver/ToolChains/NetBSD.cpp index ae9564b817c27..53587e2785354 100644 --- a/clang/lib/Driver/ToolChains/NetBSD.cpp +++ b/clang/lib/Driver/ToolChains/NetBSD.cpp @@ -16,6 +16,7 @@ #include "clang/Driver/Options.h" #include "clang/Driver/SanitizerArgs.h" #include "llvm/Option/ArgList.h" +#include "llvm/Support/VirtualFileSystem.h" using namespace clang::driver; using namespace clang::driver::tools; @@ -422,8 +423,23 @@ ToolChain::CXXStdlibType NetBSD::GetDefaultCXXStdlibType() const { void NetBSD::addLibCxxIncludePaths(const llvm::opt::ArgList &DriverArgs, llvm::opt::ArgStringList &CC1Args) const { - addSystemInclude(DriverArgs, CC1Args, - getDriver().SysRoot + "/usr/include/c++/"); + const std::string Candidates[] = { + // directory relative to build tree + getDriver().Dir + "/../include/c++/v1", + // system install with full upstream path + getDriver().SysRoot + "/usr/include/c++/v1", + // system install from src + getDriver().SysRoot + "/usr/include/c++", + }; + + for (const auto &IncludePath : Candidates) { + if (!getVFS().exists(IncludePath + "/__config")) + continue; + + // Use the first candidate that looks valid. + addSystemInclude(DriverArgs, CC1Args, IncludePath); + return; + } } void NetBSD::addLibStdCxxIncludePaths(const llvm::opt::ArgList &DriverArgs, diff --git a/clang/lib/Driver/ToolChains/OpenBSD.cpp b/clang/lib/Driver/ToolChains/OpenBSD.cpp index 91ed706e6d4f0..8441b83c29a93 100644 --- a/clang/lib/Driver/ToolChains/OpenBSD.cpp +++ b/clang/lib/Driver/ToolChains/OpenBSD.cpp @@ -226,9 +226,7 @@ void openbsd::Linker::ConstructJob(Compilation &C, const JobAction &JA, CmdArgs.push_back(Args.MakeArgString(ToolChain.GetFilePath(crtend))); } - const char *Exec = Args.MakeArgString( - !NeedsSanitizerDeps ? ToolChain.GetLinkerPath() - : ToolChain.GetProgramPath("ld.lld")); + const char *Exec = Args.MakeArgString(ToolChain.GetLinkerPath()); C.addCommand(llvm::make_unique(JA, *this, Exec, CmdArgs, Inputs)); } diff --git a/clang/lib/Driver/ToolChains/WebAssembly.cpp b/clang/lib/Driver/ToolChains/WebAssembly.cpp index b89e043d88dab..0104cbbbf4d59 100644 --- a/clang/lib/Driver/ToolChains/WebAssembly.cpp +++ b/clang/lib/Driver/ToolChains/WebAssembly.cpp @@ -123,6 +123,18 @@ void WebAssembly::addClangTargetOptions(const ArgList &DriverArgs, if (DriverArgs.hasFlag(clang::driver::options::OPT_fuse_init_array, options::OPT_fno_use_init_array, true)) CC1Args.push_back("-fuse-init-array"); + + // '-pthread' implies '-target-feature +atomics' + if (DriverArgs.hasFlag(options::OPT_pthread, options::OPT_no_pthread, + false)) { + if (DriverArgs.hasFlag(options::OPT_mno_atomics, options::OPT_matomics, + false)) + getDriver().Diag(diag::err_drv_argument_not_allowed_with) + << "-pthread" + << "-mno-atomics"; + CC1Args.push_back("-target-feature"); + CC1Args.push_back("+atomics"); + } } ToolChain::RuntimeLibType WebAssembly::GetDefaultRuntimeLibType() const { @@ -180,14 +192,6 @@ void WebAssembly::AddCXXStdlibLibArgs(const llvm::opt::ArgList &Args, } } -std::string WebAssembly::getThreadModel() const { - // The WebAssembly MVP does not yet support threads; for now, use the - // "single" threading model, which lowers atomics to non-atomic operations. - // When threading support is standardized and implemented in popular engines, - // this override should be removed. - return "single"; -} - Tool *WebAssembly::buildLinker() const { return new tools::wasm::Linker(*this); } diff --git a/clang/lib/Driver/ToolChains/WebAssembly.h b/clang/lib/Driver/ToolChains/WebAssembly.h index 12126ed422d21..2d9210ac04cb1 100644 --- a/clang/lib/Driver/ToolChains/WebAssembly.h +++ b/clang/lib/Driver/ToolChains/WebAssembly.h @@ -64,7 +64,6 @@ class LLVM_LIBRARY_VISIBILITY WebAssembly final : public ToolChain { llvm::opt::ArgStringList &CC1Args) const override; void AddCXXStdlibLibArgs(const llvm::opt::ArgList &Args, llvm::opt::ArgStringList &CmdArgs) const override; - std::string getThreadModel() const override; const char *getDefaultLinker() const override { return "wasm-ld"; } diff --git a/clang/lib/Edit/RewriteObjCFoundationAPI.cpp b/clang/lib/Edit/RewriteObjCFoundationAPI.cpp index 3a628b9af68c6..4dfe170ed629a 100644 --- a/clang/lib/Edit/RewriteObjCFoundationAPI.cpp +++ b/clang/lib/Edit/RewriteObjCFoundationAPI.cpp @@ -1086,6 +1086,8 @@ static bool rewriteToNumericBoxedExpression(const ObjCMessageExpr *Msg, case CK_FixedPointCast: case CK_FixedPointToBoolean: + case CK_FixedPointToIntegral: + case CK_IntegralToFixedPoint: llvm_unreachable("Fixed point types are disabled for Objective-C"); } } diff --git a/clang/lib/Format/BreakableToken.cpp b/clang/lib/Format/BreakableToken.cpp index c74965a9726e4..ec197aa541a0f 100644 --- a/clang/lib/Format/BreakableToken.cpp +++ b/clang/lib/Format/BreakableToken.cpp @@ -62,12 +62,10 @@ static StringRef getLineCommentIndentPrefix(StringRef Comment, return LongestPrefix; } -static BreakableToken::Split getCommentSplit(StringRef Text, - unsigned ContentStartColumn, - unsigned ColumnLimit, - unsigned TabWidth, - encoding::Encoding Encoding, - const FormatStyle &Style) { +static BreakableToken::Split +getCommentSplit(StringRef Text, unsigned ContentStartColumn, + unsigned ColumnLimit, unsigned TabWidth, + encoding::Encoding Encoding, const FormatStyle &Style) { LLVM_DEBUG(llvm::dbgs() << "Comment split: \"" << Text << "\", Column limit: " << ColumnLimit << ", Content start: " << ContentStartColumn << "\n"); @@ -191,7 +189,7 @@ bool switchesFormatting(const FormatToken &Token) { unsigned BreakableToken::getLengthAfterCompression(unsigned RemainingTokenColumns, - Split Split) const { + Split Split) const { // Example: consider the content // lala lala // - RemainingTokenColumns is the original number of columns, 10; @@ -870,23 +868,20 @@ void BreakableLineCommentSection::reflow(unsigned LineIndex, // the next line. unsigned WhitespaceLength = Lines[LineIndex].data() - tokenAt(LineIndex).TokenText.data() - Offset; - Whitespaces.replaceWhitespaceInToken(*Tokens[LineIndex], - Offset, + Whitespaces.replaceWhitespaceInToken(*Tokens[LineIndex], Offset, /*ReplaceChars=*/WhitespaceLength, /*PreviousPostfix=*/"", /*CurrentPrefix=*/"", /*InPPDirective=*/false, /*Newlines=*/0, /*Spaces=*/0); - } // Replace the indent and prefix of the token with the reflow prefix. unsigned Offset = Lines[LineIndex].data() - tokenAt(LineIndex).TokenText.data(); unsigned WhitespaceLength = Content[LineIndex].data() - Lines[LineIndex].data(); - Whitespaces.replaceWhitespaceInToken(*Tokens[LineIndex], - Offset, + Whitespaces.replaceWhitespaceInToken(*Tokens[LineIndex], Offset, /*ReplaceChars=*/WhitespaceLength, /*PreviousPostfix=*/"", /*CurrentPrefix=*/ReflowPrefix, diff --git a/clang/lib/Format/BreakableToken.h b/clang/lib/Format/BreakableToken.h index 86cb4b71e742a..5fab3f2f1145a 100644 --- a/clang/lib/Format/BreakableToken.h +++ b/clang/lib/Format/BreakableToken.h @@ -146,9 +146,7 @@ class BreakableToken { // * @param loooooooooooooong line // * continuation // */ - virtual unsigned getContentIndent(unsigned LineIndex) const { - return 0; - } + virtual unsigned getContentIndent(unsigned LineIndex) const { return 0; } /// Returns a range (offset, length) at which to break the line at /// \p LineIndex, if previously broken at \p TailOffset. If possible, do not @@ -202,9 +200,7 @@ class BreakableToken { /// Returns whether there will be a line break at the start of the /// token. - virtual bool introducesBreakBeforeToken() const { - return false; - } + virtual bool introducesBreakBeforeToken() const { return false; } /// Replaces the whitespace between \p LineIndex-1 and \p LineIndex. virtual void adaptStartOfLine(unsigned LineIndex, diff --git a/clang/lib/Format/ContinuationIndenter.cpp b/clang/lib/Format/ContinuationIndenter.cpp index cfa7dc7cf82c9..a82c8ce5b5798 100644 --- a/clang/lib/Format/ContinuationIndenter.cpp +++ b/clang/lib/Format/ContinuationIndenter.cpp @@ -403,8 +403,7 @@ bool ContinuationIndenter::mustBreak(const LineState &State) { // FIXME: We should find a more generic solution to this problem. !(State.Column <= NewLineColumn && Style.Language == FormatStyle::LK_JavaScript) && - !(Previous.closesScopeAfterBlock() && - State.Column <= NewLineColumn)) + !(Previous.closesScopeAfterBlock() && State.Column <= NewLineColumn)) return true; // If the template declaration spans multiple lines, force wrap before the @@ -835,8 +834,8 @@ unsigned ContinuationIndenter::addTokenOnNewLine(LineState &State, // about removing empty lines on closing blocks. Special case them here. MaxEmptyLinesToKeep = 1; } - unsigned Newlines = std::max( - 1u, std::min(Current.NewlinesBefore, MaxEmptyLinesToKeep)); + unsigned Newlines = + std::max(1u, std::min(Current.NewlinesBefore, MaxEmptyLinesToKeep)); bool ContinuePPDirective = State.Line->InPPDirective && State.Line->Type != LT_ImportStatement; Whitespaces.replaceWhitespace(Current, Newlines, State.Column, State.Column, @@ -1168,8 +1167,7 @@ unsigned ContinuationIndenter::moveStateToNextToken(LineState &State, State.Column += Current.ColumnWidth; State.NextToken = State.NextToken->Next; - unsigned Penalty = - handleEndOfLine(Current, State, DryRun, AllowBreak); + unsigned Penalty = handleEndOfLine(Current, State, DryRun, AllowBreak); if (Current.Role) Current.Role->formatFromToken(State, this, DryRun); @@ -1530,9 +1528,8 @@ unsigned ContinuationIndenter::reformatRawStringLiteral( // that raw string prefix starts, and // - if the raw string prefix does not start on a newline, it is the current // indent. - unsigned LastStartColumn = Current.NewlinesBefore - ? FirstStartColumn - NewPrefixSize - : CurrentIndent; + unsigned LastStartColumn = + Current.NewlinesBefore ? FirstStartColumn - NewPrefixSize : CurrentIndent; std::pair Fixes = internal::reformat( RawStringStyle, RawText, {tooling::Range(0, RawText.size())}, @@ -1589,8 +1586,9 @@ unsigned ContinuationIndenter::reformatRawStringLiteral( // have to manually add the penalty for the prefix R"delim( over the column // limit. unsigned PrefixExcessCharacters = - StartColumn + NewPrefixSize > Style.ColumnLimit ? - StartColumn + NewPrefixSize - Style.ColumnLimit : 0; + StartColumn + NewPrefixSize > Style.ColumnLimit + ? StartColumn + NewPrefixSize - Style.ColumnLimit + : 0; bool IsMultiline = ContentStartsOnNewline || (NewCode->find('\n') != std::string::npos); if (IsMultiline) { @@ -1708,16 +1706,16 @@ ContinuationIndenter::getRawStringStyle(const FormatToken &Current, return RawStringStyle; } -std::unique_ptr ContinuationIndenter::createBreakableToken( - const FormatToken &Current, LineState &State, bool AllowBreak) { +std::unique_ptr +ContinuationIndenter::createBreakableToken(const FormatToken &Current, + LineState &State, bool AllowBreak) { unsigned StartColumn = State.Column - Current.ColumnWidth; if (Current.isStringLiteral()) { // FIXME: String literal breaking is currently disabled for Java and JS, as // it requires strings to be merged using "+" which we don't support. if (Style.Language == FormatStyle::LK_Java || Style.Language == FormatStyle::LK_JavaScript || - !Style.BreakStringLiterals || - !AllowBreak) + !Style.BreakStringLiterals || !AllowBreak) return nullptr; // Don't break string literals inside preprocessor directives (except for diff --git a/clang/lib/Format/Format.cpp b/clang/lib/Format/Format.cpp index 9575699cf82f4..a56fed9dee1ef 100644 --- a/clang/lib/Format/Format.cpp +++ b/clang/lib/Format/Format.cpp @@ -149,8 +149,8 @@ struct ScalarEnumerationTraits { template <> struct ScalarEnumerationTraits { - static void - enumeration(IO &IO, FormatStyle::BreakInheritanceListStyle &Value) { + static void enumeration(IO &IO, + FormatStyle::BreakInheritanceListStyle &Value) { IO.enumCase(Value, "BeforeColon", FormatStyle::BILS_BeforeColon); IO.enumCase(Value, "BeforeComma", FormatStyle::BILS_BeforeComma); IO.enumCase(Value, "AfterColon", FormatStyle::BILS_AfterColon); @@ -179,7 +179,8 @@ struct ScalarEnumerationTraits { template <> struct ScalarEnumerationTraits { - static void enumeration(IO &IO, FormatStyle::BreakTemplateDeclarationsStyle &Value) { + static void enumeration(IO &IO, + FormatStyle::BreakTemplateDeclarationsStyle &Value) { IO.enumCase(Value, "No", FormatStyle::BTDS_No); IO.enumCase(Value, "MultiLine", FormatStyle::BTDS_MultiLine); IO.enumCase(Value, "Yes", FormatStyle::BTDS_Yes); @@ -361,10 +362,8 @@ template <> struct MappingTraits { IO.mapOptional("BreakBeforeBraces", Style.BreakBeforeBraces); bool BreakBeforeInheritanceComma = false; - IO.mapOptional("BreakBeforeInheritanceComma", - BreakBeforeInheritanceComma); - IO.mapOptional("BreakInheritanceList", - Style.BreakInheritanceList); + IO.mapOptional("BreakBeforeInheritanceComma", BreakBeforeInheritanceComma); + IO.mapOptional("BreakInheritanceList", Style.BreakInheritanceList); // If BreakBeforeInheritanceComma was specified but // BreakInheritance was not, initialize the latter from the // former for backwards compatibility. @@ -618,9 +617,9 @@ static FormatStyle expandPresets(const FormatStyle &Style) { return Expanded; } -FormatStyle getLLVMStyle() { +FormatStyle getLLVMStyle(FormatStyle::LanguageKind Language) { FormatStyle LLVMStyle; - LLVMStyle.Language = FormatStyle::LK_Cpp; + LLVMStyle.Language = Language; LLVMStyle.AccessModifierOffset = -2; LLVMStyle.AlignEscapedNewlines = FormatStyle::ENAS_Right; LLVMStyle.AlignAfterOpenBracket = FormatStyle::BAS_Align; @@ -718,6 +717,11 @@ FormatStyle getLLVMStyle() { LLVMStyle.StatementMacros.push_back("Q_UNUSED"); LLVMStyle.StatementMacros.push_back("QT_REQUIRE_VERSION"); + // Defaults that differ when not C++. + if (Language == FormatStyle::LK_TableGen) { + LLVMStyle.SpacesInContainerLiterals = false; + } + return LLVMStyle; } @@ -729,8 +733,7 @@ FormatStyle getGoogleStyle(FormatStyle::LanguageKind Language) { return GoogleStyle; } - FormatStyle GoogleStyle = getLLVMStyle(); - GoogleStyle.Language = Language; + FormatStyle GoogleStyle = getLLVMStyle(Language); GoogleStyle.AccessModifierOffset = -1; GoogleStyle.AlignEscapedNewlines = FormatStyle::ENAS_Left; @@ -850,15 +853,9 @@ FormatStyle getChromiumStyle(FormatStyle::LanguageKind Language) { // See styleguide for import groups: // https://chromium.googlesource.com/chromium/src/+/master/styleguide/java/java.md#Import-Order ChromiumStyle.JavaImportGroups = { - "android", - "com", - "dalvik", - "junit", - "org", - "com.google.android.apps.chrome", - "org.chromium", - "java", - "javax", + "android", "com", "dalvik", + "junit", "org", "com.google.android.apps.chrome", + "org.chromium", "java", "javax", }; ChromiumStyle.SortIncludes = true; } else if (Language == FormatStyle::LK_JavaScript) { @@ -1059,9 +1056,7 @@ void FormatStyle::FormatStyleSet::Add(FormatStyle Style) { (*Styles)[Style.Language] = std::move(Style); } -void FormatStyle::FormatStyleSet::Clear() { - Styles.reset(); -} +void FormatStyle::FormatStyleSet::Clear() { Styles.reset(); } llvm::Optional FormatStyle::GetLanguageStyle(FormatStyle::LanguageKind Language) const { @@ -1791,9 +1786,10 @@ tooling::Replacements sortCppIncludes(const FormatStyle &Style, StringRef Code, Code.substr(Prev, (Pos != StringRef::npos ? Pos : Code.size()) - Prev); StringRef Trimmed = Line.trim(); - if (Trimmed == "// clang-format off") + if (Trimmed == "// clang-format off" || Trimmed == "/* clang-format off */") FormattingOff = true; - else if (Trimmed == "// clang-format on") + else if (Trimmed == "// clang-format on" || + Trimmed == "/* clang-format on */") FormattingOff = false; const bool EmptyLineSkipped = @@ -1853,7 +1849,7 @@ static unsigned findJavaImportGroup(const FormatStyle &Style, static void sortJavaImports(const FormatStyle &Style, const SmallVectorImpl &Imports, ArrayRef Ranges, StringRef FileName, - tooling::Replacements &Replaces) { + StringRef Code, tooling::Replacements &Replaces) { unsigned ImportsBeginOffset = Imports.front().Offset; unsigned ImportsEndOffset = Imports.back().Offset + Imports.back().Text.size(); @@ -1868,12 +1864,12 @@ static void sortJavaImports(const FormatStyle &Style, findJavaImportGroup(Style, Imports[i].Identifier)); } llvm::sort(Indices, [&](unsigned LHSI, unsigned RHSI) { - // Negating IsStatic to push static imports above non-static imports. - return std::make_tuple(!Imports[LHSI].IsStatic, JavaImportGroups[LHSI], - Imports[LHSI].Identifier) < - std::make_tuple(!Imports[RHSI].IsStatic, JavaImportGroups[RHSI], - Imports[RHSI].Identifier); - }); + // Negating IsStatic to push static imports above non-static imports. + return std::make_tuple(!Imports[LHSI].IsStatic, JavaImportGroups[LHSI], + Imports[LHSI].Identifier) < + std::make_tuple(!Imports[RHSI].IsStatic, JavaImportGroups[RHSI], + Imports[RHSI].Identifier); + }); // Deduplicate imports. Indices.erase(std::unique(Indices.begin(), Indices.end(), @@ -1902,6 +1898,11 @@ static void sortJavaImports(const FormatStyle &Style, CurrentImportGroup = JavaImportGroups[Index]; } + // If the imports are out of order, we generate a single replacement fixing + // the entire block. Otherwise, no replacement is generated. + if (result == Code.substr(Imports.front().Offset, ImportsBlockSize)) + return; + auto Err = Replaces.add(tooling::Replacement(FileName, Imports.front().Offset, ImportsBlockSize, result)); // FIXME: better error handling. For now, just skip the replacement for the @@ -1955,7 +1956,8 @@ tooling::Replacements sortJavaImports(const FormatStyle &Style, StringRef Code, if (Static.contains("static")) { IsStatic = true; } - ImportsInBlock.push_back({Identifier, Line, Prev, AssociatedCommentLines, IsStatic}); + ImportsInBlock.push_back( + {Identifier, Line, Prev, AssociatedCommentLines, IsStatic}); AssociatedCommentLines.clear(); } else if (Trimmed.size() > 0 && !ImportsInBlock.empty()) { // Associating comments within the imports with the nearest import below @@ -1967,7 +1969,7 @@ tooling::Replacements sortJavaImports(const FormatStyle &Style, StringRef Code, SearchFrom = Pos + 1; } if (!ImportsInBlock.empty()) - sortJavaImports(Style, ImportsInBlock, Ranges, FileName, Replaces); + sortJavaImports(Style, ImportsInBlock, Ranges, FileName, Code, Replaces); return Replaces; } @@ -2084,7 +2086,6 @@ fixCppIncludeInsertions(StringRef Code, const tooling::Replacements &Replaces, if (HeaderInsertions.empty() && HeadersToDelete.empty()) return Replaces; - StringRef FileName = Replaces.begin()->getFilePath(); tooling::HeaderIncludes Includes(FileName, Code, Style.IncludeStyle); @@ -2117,7 +2118,8 @@ fixCppIncludeInsertions(StringRef Code, const tooling::Replacements &Replaces, auto Err = Result.add(*Replace); if (Err) { llvm::consumeError(std::move(Err)); - unsigned NewOffset = Result.getShiftedCodePosition(Replace->getOffset()); + unsigned NewOffset = + Result.getShiftedCodePosition(Replace->getOffset()); auto Shifted = tooling::Replacement(FileName, NewOffset, 0, Replace->getReplacementText()); Result = Result.merge(tooling::Replacements(Shifted)); @@ -2338,8 +2340,7 @@ llvm::Expected getStyle(StringRef StyleName, StringRef FileName, if (!FS) { FS = llvm::vfs::getRealFileSystem().get(); } - FormatStyle Style = getLLVMStyle(); - Style.Language = guessLanguage(FileName, Code); + FormatStyle Style = getLLVMStyle(guessLanguage(FileName, Code)); FormatStyle FallbackStyle = getNoStyle(); if (!getPredefinedStyle(FallbackStyleName, Style.Language, &FallbackStyle)) diff --git a/clang/lib/Format/FormatToken.h b/clang/lib/Format/FormatToken.h index 9825b24b019a1..2989c760b677c 100644 --- a/clang/lib/Format/FormatToken.h +++ b/clang/lib/Format/FormatToken.h @@ -489,8 +489,7 @@ struct FormatToken { bool opensBlockOrBlockTypeList(const FormatStyle &Style) const { if (is(TT_TemplateString) && opensScope()) return true; - return is(TT_ArrayInitializerLSquare) || - is(TT_ProtoExtensionLSquare) || + return is(TT_ArrayInitializerLSquare) || is(TT_ProtoExtensionLSquare) || (is(tok::l_brace) && (BlockKind == BK_Block || is(TT_DictLiteral) || (!Style.Cpp11BracedListStyle && NestingLevel == 0))) || diff --git a/clang/lib/Format/FormatTokenLexer.h b/clang/lib/Format/FormatTokenLexer.h index 5caa915049505..61a4c041d1eb0 100644 --- a/clang/lib/Format/FormatTokenLexer.h +++ b/clang/lib/Format/FormatTokenLexer.h @@ -20,8 +20,8 @@ #include "clang/Basic/SourceLocation.h" #include "clang/Basic/SourceManager.h" #include "clang/Format/Format.h" -#include "llvm/Support/Regex.h" #include "llvm/ADT/MapVector.h" +#include "llvm/Support/Regex.h" #include diff --git a/clang/lib/Format/TokenAnnotator.cpp b/clang/lib/Format/TokenAnnotator.cpp index 45896d86ad061..246ac781fd9b3 100644 --- a/clang/lib/Format/TokenAnnotator.cpp +++ b/clang/lib/Format/TokenAnnotator.cpp @@ -61,7 +61,7 @@ class AnnotatingParser { if (NonTemplateLess.count(CurrentToken->Previous)) return false; - const FormatToken &Previous = *CurrentToken->Previous; // The '<'. + const FormatToken &Previous = *CurrentToken->Previous; // The '<'. if (Previous.Previous) { if (Previous.Previous->Tok.isLiteral()) return false; @@ -365,7 +365,7 @@ class AnnotatingParser { // specifier parameter, although this is technically valid: // [[foo(:)]] if (AttrTok->is(tok::colon) || - AttrTok->startsSequence(tok::identifier, tok::identifier) || + AttrTok->startsSequence(tok::identifier, tok::identifier) || AttrTok->startsSequence(tok::r_paren, tok::identifier)) return false; if (AttrTok->is(tok::ellipsis)) @@ -520,6 +520,10 @@ class AnnotatingParser { if (Parent && Parent->is(TT_PointerOrReference)) Parent->Type = TT_BinaryOperator; } + // An arrow after an ObjC method expression is not a lambda arrow. + if (CurrentToken->Type == TT_ObjCMethodExpr && CurrentToken->Next && + CurrentToken->Next->is(TT_LambdaArrow)) + CurrentToken->Next->Type = TT_Unknown; Left->MatchingParen = CurrentToken; CurrentToken->MatchingParen = Left; // FirstObjCSelectorName is set when a colon is found. This does @@ -527,11 +531,11 @@ class AnnotatingParser { // Here, we set FirstObjCSelectorName when the end of the method call is // reached, in case it was not set already. if (!Contexts.back().FirstObjCSelectorName) { - FormatToken* Previous = CurrentToken->getPreviousNonComment(); - if (Previous && Previous->is(TT_SelectorName)) { - Previous->ObjCSelectorNameParts = 1; - Contexts.back().FirstObjCSelectorName = Previous; - } + FormatToken *Previous = CurrentToken->getPreviousNonComment(); + if (Previous && Previous->is(TT_SelectorName)) { + Previous->ObjCSelectorNameParts = 1; + Contexts.back().FirstObjCSelectorName = Previous; + } } else { Left->ParameterCount = Contexts.back().FirstObjCSelectorName->ObjCSelectorNameParts; @@ -1393,7 +1397,8 @@ class AnnotatingParser { Current.Type = Current.Previous->Type; } } else if (canBeObjCSelectorComponent(Current) && - // FIXME(bug 36976): ObjC return types shouldn't use TT_CastRParen. + // FIXME(bug 36976): ObjC return types shouldn't use + // TT_CastRParen. Current.Previous && Current.Previous->is(TT_CastRParen) && Current.Previous->MatchingParen && Current.Previous->MatchingParen->Previous && @@ -2419,9 +2424,9 @@ bool TokenAnnotator::spaceRequiredBetween(const AnnotatedLine &Line, if (Right.isOneOf(tok::semi, tok::comma)) return false; if (Right.is(tok::less) && Line.Type == LT_ObjCDecl) { - bool IsLightweightGeneric = - Right.MatchingParen && Right.MatchingParen->Next && - Right.MatchingParen->Next->is(tok::colon); + bool IsLightweightGeneric = Right.MatchingParen && + Right.MatchingParen->Next && + Right.MatchingParen->Next->is(tok::colon); return !IsLightweightGeneric && Style.ObjCSpaceBeforeProtocolList; } if (Right.is(tok::less) && Left.is(tok::kw_template)) @@ -2543,7 +2548,9 @@ bool TokenAnnotator::spaceRequiredBetween(const AnnotatedLine &Line, (!Left.Previous || Left.Previous->isNot(tok::period))))) || (Style.SpaceBeforeParens == FormatStyle::SBPO_Always && (Left.is(tok::identifier) || Left.isFunctionLikeKeyword() || - Left.is(tok::r_paren)) && + Left.is(tok::r_paren) || + (Left.is(tok::r_square) && Left.MatchingParen && + Left.MatchingParen->is(TT_LambdaLSquare))) && Line.Type != LT_PreprocessorDirective); } if (Left.is(tok::at) && Right.Tok.getObjCKeywordID() != tok::objc_not_keyword) @@ -2606,7 +2613,8 @@ bool TokenAnnotator::spaceRequiredBefore(const AnnotatedLine &Line, // Slashes occur in text protocol extension syntax: [type/type] { ... }. if (Left.is(tok::slash) || Right.is(tok::slash)) return false; - if (Left.MatchingParen && Left.MatchingParen->is(TT_ProtoExtensionLSquare) && + if (Left.MatchingParen && + Left.MatchingParen->is(TT_ProtoExtensionLSquare) && Right.isOneOf(tok::l_brace, tok::less)) return !Style.Cpp11BracedListStyle; // A percent is probably part of a formatting specification, such as %lld. @@ -3123,7 +3131,7 @@ bool TokenAnnotator::canBreakBefore(const AnnotatedLine &Line, // function f(): a is B { ... } // Do not break before is in these cases. if (Right.is(Keywords.kw_is)) { - const FormatToken* Next = Right.getNextNonComment(); + const FormatToken *Next = Right.getNextNonComment(); // If `is` is followed by a colon, it's likely that it's a dict key, so // ignore it for this check. // For example this is common in Polymer: diff --git a/clang/lib/Format/UnwrappedLineFormatter.cpp b/clang/lib/Format/UnwrappedLineFormatter.cpp index 99b7842577615..a62755840df17 100644 --- a/clang/lib/Format/UnwrappedLineFormatter.cpp +++ b/clang/lib/Format/UnwrappedLineFormatter.cpp @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include "NamespaceEndCommentsFixer.h" #include "UnwrappedLineFormatter.h" +#include "NamespaceEndCommentsFixer.h" #include "WhitespaceManager.h" #include "llvm/Support/Debug.h" #include @@ -690,10 +690,8 @@ class LineFormatter { /// Formats an \c AnnotatedLine and returns the penalty. /// /// If \p DryRun is \c false, directly applies the changes. - virtual unsigned formatLine(const AnnotatedLine &Line, - unsigned FirstIndent, - unsigned FirstStartColumn, - bool DryRun) = 0; + virtual unsigned formatLine(const AnnotatedLine &Line, unsigned FirstIndent, + unsigned FirstStartColumn, bool DryRun) = 0; protected: /// If the \p State's next token is an r_brace closing a nested block, @@ -1008,13 +1006,10 @@ class OptimizingLineFormatter : public LineFormatter { } // anonymous namespace -unsigned -UnwrappedLineFormatter::format(const SmallVectorImpl &Lines, - bool DryRun, int AdditionalIndent, - bool FixBadIndentation, - unsigned FirstStartColumn, - unsigned NextStartColumn, - unsigned LastStartColumn) { +unsigned UnwrappedLineFormatter::format( + const SmallVectorImpl &Lines, bool DryRun, + int AdditionalIndent, bool FixBadIndentation, unsigned FirstStartColumn, + unsigned NextStartColumn, unsigned LastStartColumn) { LineJoiner Joiner(Style, Keywords, Lines); // Try to look up already computed penalty in DryRun-mode. diff --git a/clang/lib/Format/UnwrappedLineFormatter.h b/clang/lib/Format/UnwrappedLineFormatter.h index a5110f9cbd017..a1ff16999589f 100644 --- a/clang/lib/Format/UnwrappedLineFormatter.h +++ b/clang/lib/Format/UnwrappedLineFormatter.h @@ -39,10 +39,8 @@ class UnwrappedLineFormatter { /// Format the current block and return the penalty. unsigned format(const SmallVectorImpl &Lines, bool DryRun = false, int AdditionalIndent = 0, - bool FixBadIndentation = false, - unsigned FirstStartColumn = 0, - unsigned NextStartColumn = 0, - unsigned LastStartColumn = 0); + bool FixBadIndentation = false, unsigned FirstStartColumn = 0, + unsigned NextStartColumn = 0, unsigned LastStartColumn = 0); private: /// Add a new line and the required indent before the first Token diff --git a/clang/lib/Format/UnwrappedLineParser.cpp b/clang/lib/Format/UnwrappedLineParser.cpp index f6727fcfa97f7..de7e646b17cf9 100644 --- a/clang/lib/Format/UnwrappedLineParser.cpp +++ b/clang/lib/Format/UnwrappedLineParser.cpp @@ -481,7 +481,7 @@ void UnwrappedLineParser::calculateBraceTypes(bool ExpectClassBody) { break; case tok::identifier: if (!Tok->is(TT_StatementMacro)) - break; + break; LLVM_FALLTHROUGH; case tok::at: case tok::semi: @@ -1166,8 +1166,8 @@ void UnwrappedLineParser::parseStructuralElement() { case tok::objc_synchronized: nextToken(); if (FormatTok->Tok.is(tok::l_paren)) - // Skip synchronization object - parseParens(); + // Skip synchronization object + parseParens(); if (FormatTok->Tok.is(tok::l_brace)) { if (Style.BraceWrapping.AfterControlStatement) addUnwrappedLine(); @@ -1423,9 +1423,33 @@ bool UnwrappedLineParser::tryToParseLambda() { case tok::coloncolon: case tok::kw_mutable: case tok::kw_noexcept: + // Specialization of a template with an integer parameter can contain + // arithmetic, logical, comparison and ternary operators. + case tok::plus: + case tok::minus: + case tok::exclaim: + case tok::tilde: + case tok::slash: + case tok::percent: + case tok::lessless: + case tok::pipe: + case tok::pipepipe: + case tok::ampamp: + case tok::caret: + case tok::equalequal: + case tok::exclaimequal: + case tok::greaterequal: + case tok::lessequal: + case tok::question: + case tok::colon: + case tok::kw_true: + case tok::kw_false: nextToken(); break; case tok::arrow: + // This might or might not actually be a lambda arrow (this could be an + // ObjC method invocation followed by a dereferencing arrow). We might + // reset this back to TT_Unknown in TokenAnnotator. FormatTok->Type = TT_LambdaArrow; nextToken(); break; @@ -2347,8 +2371,7 @@ void UnwrappedLineParser::parseJavaScriptEs6ImportExport() { } } -void UnwrappedLineParser::parseStatementMacro() -{ +void UnwrappedLineParser::parseStatementMacro() { nextToken(); if (FormatTok->is(tok::l_paren)) parseParens(); diff --git a/clang/lib/Format/UnwrappedLineParser.h b/clang/lib/Format/UnwrappedLineParser.h index 153c08527363c..e1b35317c7c0e 100644 --- a/clang/lib/Format/UnwrappedLineParser.h +++ b/clang/lib/Format/UnwrappedLineParser.h @@ -76,8 +76,7 @@ class UnwrappedLineParser { public: UnwrappedLineParser(const FormatStyle &Style, const AdditionalKeywords &Keywords, - unsigned FirstStartColumn, - ArrayRef Tokens, + unsigned FirstStartColumn, ArrayRef Tokens, UnwrappedLineConsumer &Callback); void parse(); diff --git a/clang/lib/Format/WhitespaceManager.cpp b/clang/lib/Format/WhitespaceManager.cpp index 7b649c95fd4f0..9f1ea7022f0de 100644 --- a/clang/lib/Format/WhitespaceManager.cpp +++ b/clang/lib/Format/WhitespaceManager.cpp @@ -432,19 +432,20 @@ void WhitespaceManager::alignConsecutiveAssignments() { if (!Style.AlignConsecutiveAssignments) return; - AlignTokens(Style, - [&](const Change &C) { - // Do not align on equal signs that are first on a line. - if (C.NewlinesBefore > 0) - return false; - - // Do not align on equal signs that are last on a line. - if (&C != &Changes.back() && (&C + 1)->NewlinesBefore > 0) - return false; - - return C.Tok->is(tok::equal); - }, - Changes, /*StartAt=*/0); + AlignTokens( + Style, + [&](const Change &C) { + // Do not align on equal signs that are first on a line. + if (C.NewlinesBefore > 0) + return false; + + // Do not align on equal signs that are last on a line. + if (&C != &Changes.back() && (&C + 1)->NewlinesBefore > 0) + return false; + + return C.Tok->is(tok::equal); + }, + Changes, /*StartAt=*/0); } void WhitespaceManager::alignConsecutiveDeclarations() { @@ -457,15 +458,16 @@ void WhitespaceManager::alignConsecutiveDeclarations() { // const char* const* v1; // float const* v2; // SomeVeryLongType const& v3; - AlignTokens(Style, - [](Change const &C) { - // tok::kw_operator is necessary for aligning operator overload - // definitions. - return C.Tok->is(TT_StartOfName) || - C.Tok->is(TT_FunctionDeclarationName) || - C.Tok->is(tok::kw_operator); - }, - Changes, /*StartAt=*/0); + AlignTokens( + Style, + [](Change const &C) { + // tok::kw_operator is necessary for aligning operator overload + // definitions. + return C.Tok->is(TT_StartOfName) || + C.Tok->is(TT_FunctionDeclarationName) || + C.Tok->is(tok::kw_operator); + }, + Changes, /*StartAt=*/0); } void WhitespaceManager::alignTrailingComments() { @@ -541,11 +543,10 @@ void WhitespaceManager::alignTrailingComments() { MinColumn = std::max(MinColumn, ChangeMinColumn); MaxColumn = std::min(MaxColumn, ChangeMaxColumn); } - BreakBeforeNext = - (i == 0) || (Changes[i].NewlinesBefore > 1) || - // Never start a sequence with a comment at the beginning of - // the line. - (Changes[i].NewlinesBefore == 1 && StartOfSequence == i); + BreakBeforeNext = (i == 0) || (Changes[i].NewlinesBefore > 1) || + // Never start a sequence with a comment at the beginning + // of the line. + (Changes[i].NewlinesBefore == 1 && StartOfSequence == i); Newlines = 0; } alignTrailingComments(StartOfSequence, Changes.size(), MinColumn); @@ -679,11 +680,15 @@ void WhitespaceManager::appendIndentText(std::string &Text, case FormatStyle::UT_Always: { unsigned FirstTabWidth = Style.TabWidth - WhitespaceStartColumn % Style.TabWidth; - // Indent with tabs only when there's at least one full tab. - if (FirstTabWidth + Style.TabWidth <= Spaces) { - Spaces -= FirstTabWidth; - Text.append("\t"); + // Insert only spaces when we want to end up before the next tab. + if (Spaces < FirstTabWidth || Spaces == 1) { + Text.append(Spaces, ' '); + break; } + // Align to the next tab. + Spaces -= FirstTabWidth; + Text.append("\t"); + Text.append(Spaces / Style.TabWidth, '\t'); Text.append(Spaces % Style.TabWidth, ' '); break; diff --git a/clang/lib/Frontend/CompilerInstance.cpp b/clang/lib/Frontend/CompilerInstance.cpp index 856224e55d0b0..88efcb4dac562 100644 --- a/clang/lib/Frontend/CompilerInstance.cpp +++ b/clang/lib/Frontend/CompilerInstance.cpp @@ -912,7 +912,7 @@ bool CompilerInstance::ExecuteAction(FrontendAction &Act) { // Create TargetInfo for the other side of CUDA, SYCL and OpenMP compilation. if ((getLangOpts().CUDA || getLangOpts().OpenMPIsDevice || - getLangOpts().SYCL) && + getLangOpts().SYCLIsDevice) && !getFrontendOpts().AuxTriple.empty()) { auto TO = std::make_shared(); TO->Triple = llvm::Triple::normalize(getFrontendOpts().AuxTriple); diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index 5188d2250f5db..c7a19038608af 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -552,7 +552,7 @@ static void parseSanitizerKinds(StringRef FlagName, DiagnosticsEngine &Diags, SanitizerSet &S) { for (const auto &Sanitizer : Sanitizers) { SanitizerMask K = parseSanitizerValue(Sanitizer, /*AllowGroups=*/false); - if (K == 0) + if (K == SanitizerMask()) Diags.Report(diag::err_drv_invalid_value) << FlagName << Sanitizer; else S.set(K, true); @@ -589,6 +589,7 @@ static void setPGOInstrumentor(CodeGenOptions &Opts, ArgList &Args, .Case("none", CodeGenOptions::ProfileNone) .Case("clang", CodeGenOptions::ProfileClangInstr) .Case("llvm", CodeGenOptions::ProfileIRInstr) + .Case("csllvm", CodeGenOptions::ProfileCSIRInstr) .Default(~0U); if (I == ~0U) { Diags.Report(diag::err_drv_invalid_pgo_instrumentor) << A->getAsString(Args) @@ -611,9 +612,12 @@ static void setPGOUseInstrumentor(CodeGenOptions &Opts, } std::unique_ptr PGOReader = std::move(ReaderOrErr.get()); - if (PGOReader->isIRLevelProfile()) - Opts.setProfileUse(CodeGenOptions::ProfileIRInstr); - else + if (PGOReader->isIRLevelProfile()) { + if (PGOReader->hasCSIRLevelProfile()) + Opts.setProfileUse(CodeGenOptions::ProfileCSIRInstr); + else + Opts.setProfileUse(CodeGenOptions::ProfileIRInstr); + } else Opts.setProfileUse(CodeGenOptions::ProfileClangInstr); } @@ -1186,8 +1190,6 @@ static bool ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, InputKind IK, } } - Opts.EmitOpenCLArgMetadata |= Args.hasArg(OPT_emit_spirv); - if (Arg *A = Args.getLastArg(OPT_fdenormal_fp_math_EQ)) { StringRef Val = A->getValue(); if (Val == "ieee") @@ -1615,8 +1617,6 @@ static InputKind ParseFrontendArgs(FrontendOptions &Opts, ArgList &Args, Opts.ProgramAction = frontend::EmitAssembly; break; case OPT_emit_llvm_bc: Opts.ProgramAction = frontend::EmitBC; break; - case OPT_emit_spirv: - Opts.ProgramAction = frontend::EmitSPIRV; break; case OPT_emit_html: Opts.ProgramAction = frontend::EmitHTML; break; case OPT_emit_llvm: @@ -2584,7 +2584,7 @@ static void ParseLangArgs(LangOptions &Opts, ArgList &Args, InputKind IK, Opts.Blocks = Args.hasArg(OPT_fblocks) || (Opts.OpenCL && Opts.OpenCLVersion == 200); Opts.BlocksRuntimeOptional = Args.hasArg(OPT_fblocks_runtime_optional); - Opts.CoroutinesTS = Args.hasArg(OPT_fcoroutines_ts); + Opts.Coroutines = Opts.CPlusPlus2a || Args.hasArg(OPT_fcoroutines_ts); // Enable [[]] attributes in C++11 by default. Opts.DoubleSquareBracketAttributes = @@ -2669,6 +2669,8 @@ static void ParseLangArgs(LangOptions &Opts, ArgList &Args, InputKind IK, Opts.MaxTypeAlign = getLastArgIntValue(Args, OPT_fmax_type_align_EQ, 0, Diags); Opts.AlignDouble = Args.hasArg(OPT_malign_double); Opts.PICLevel = getLastArgIntValue(Args, OPT_pic_level, 0, Diags); + Opts.ROPI = Args.hasArg(OPT_fropi); + Opts.RWPI = Args.hasArg(OPT_frwpi); Opts.PIE = Args.hasArg(OPT_pic_is_pie); Opts.Static = Args.hasArg(OPT_static_define); Opts.DumpRecordLayoutsSimple = Args.hasArg(OPT_fdump_record_layouts_simple); @@ -2834,7 +2836,6 @@ static void ParseLangArgs(LangOptions &Opts, ArgList &Args, InputKind IK, // Set the flag to prevent the implementation from emitting device exception // handling code for those requiring so. - Opts.OpenMPHostCXXExceptions = Opts.Exceptions && Opts.CXXExceptions; if ((Opts.OpenMPIsDevice && T.isNVPTX()) || Opts.OpenCLCPlusPlus) { Opts.Exceptions = 0; Opts.CXXExceptions = 0; @@ -2846,6 +2847,9 @@ static void ParseLangArgs(LangOptions &Opts, ArgList &Args, InputKind IK, Opts.OpenMPCUDABlocksPerSM = getLastArgIntValue(Args, options::OPT_fopenmp_cuda_blocks_per_sm_EQ, Opts.OpenMPCUDABlocksPerSM, Diags); + Opts.OpenMPCUDAReductionBufNum = getLastArgIntValue( + Args, options::OPT_fopenmp_cuda_teams_reduction_recs_num_EQ, + Opts.OpenMPCUDAReductionBufNum, Diags); } // Prevent auto-widening the representation of loop counters during an @@ -2882,9 +2886,9 @@ static void ParseLangArgs(LangOptions &Opts, ArgList &Args, InputKind IK, << Opts.OMPHostIRFile; } - Opts.SYCL = Args.hasArg(options::OPT_fsycl_is_device); - Opts.SYCLUseBitcode = Args.hasFlag(options::OPT_fsycl_use_bitcode, - options::OPT_fno_sycl_use_bitcode, false); + Opts.SYCLIsDevice = Args.hasArg(options::OPT_fsycl_is_device); + Opts.SYCLAllowFuncPtr = Args.hasFlag(options::OPT_fsycl_allow_func_ptr, + options::OPT_fno_sycl_allow_func_ptr, false); // Set CUDA mode for OpenMP target NVPTX if specified in options Opts.OpenMPCUDAMode = Opts.OpenMPIsDevice && T.isNVPTX() && @@ -3045,7 +3049,6 @@ static bool isStrictlyPreprocessorAction(frontend::ActionKind Action) { case frontend::ASTView: case frontend::EmitAssembly: case frontend::EmitBC: - case frontend::EmitSPIRV: case frontend::EmitHTML: case frontend::EmitLLVM: case frontend::EmitLLVMOnly: diff --git a/clang/lib/Frontend/FrontendActions.cpp b/clang/lib/Frontend/FrontendActions.cpp index 9b9051212ce89..a71d74ec796a8 100644 --- a/clang/lib/Frontend/FrontendActions.cpp +++ b/clang/lib/Frontend/FrontendActions.cpp @@ -286,7 +286,7 @@ bool GenerateHeaderModuleAction::BeginSourceFileAction( const DirectoryLookup *CurDir = nullptr; const FileEntry *FE = HS.LookupFile( Name, SourceLocation(), /*Angled*/ false, nullptr, CurDir, - None, nullptr, nullptr, nullptr, nullptr, nullptr); + None, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr); if (!FE) { CI.getDiagnostics().Report(diag::err_module_header_file_not_found) << Name; diff --git a/clang/lib/Frontend/FrontendTiming.cpp b/clang/lib/Frontend/FrontendTiming.cpp index 51215dab068c4..e3f44c9999f68 100644 --- a/clang/lib/Frontend/FrontendTiming.cpp +++ b/clang/lib/Frontend/FrontendTiming.cpp @@ -1,4 +1,4 @@ -//===- FronendTiming.cpp - Implements Frontend timing utils --------------===// +//===- FrontendTiming.cpp - Implements Frontend timing utils -------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/clang/lib/Frontend/HeaderIncludeGen.cpp b/clang/lib/Frontend/HeaderIncludeGen.cpp index d4261dab58bcd..d60f5333bf5bf 100644 --- a/clang/lib/Frontend/HeaderIncludeGen.cpp +++ b/clang/lib/Frontend/HeaderIncludeGen.cpp @@ -1,4 +1,4 @@ -//===--- HeaderIncludes.cpp - Generate Header Includes --------------------===// +//===-- HeaderIncludeGen.cpp - Generate Header Includes -------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/clang/lib/Frontend/InitHeaderSearch.cpp b/clang/lib/Frontend/InitHeaderSearch.cpp index 6391d7a6ae3fd..d96fa81f73f69 100644 --- a/clang/lib/Frontend/InitHeaderSearch.cpp +++ b/clang/lib/Frontend/InitHeaderSearch.cpp @@ -432,14 +432,6 @@ void InitHeaderSearch::AddDefaultCPlusPlusIncludePaths( case llvm::Triple::DragonFly: AddPath("/usr/include/c++/5.0", CXXSystem, false); break; - case llvm::Triple::OpenBSD: { - std::string t = triple.getTriple(); - if (t.substr(0, 6) == "x86_64") - t.replace(0, 6, "amd64"); - AddGnuCPlusPlusIncludePaths("/usr/include/g++", - t, "", "", triple); - break; - } case llvm::Triple::Minix: AddGnuCPlusPlusIncludePaths("/usr/gnu/include/c++/4.4.3", "", "", "", triple); diff --git a/clang/lib/Frontend/InitPreprocessor.cpp b/clang/lib/Frontend/InitPreprocessor.cpp index 858a033f65afc..f7b6711485195 100644 --- a/clang/lib/Frontend/InitPreprocessor.cpp +++ b/clang/lib/Frontend/InitPreprocessor.cpp @@ -547,7 +547,7 @@ static void InitializeCPlusPlusFeatureTestMacros(const LangOptions &LangOpts, // TS features. if (LangOpts.ConceptsTS) Builder.defineMacro("__cpp_experimental_concepts", "1L"); - if (LangOpts.CoroutinesTS) + if (LangOpts.Coroutines) Builder.defineMacro("__cpp_coroutines", "201703L"); } @@ -830,7 +830,8 @@ static void InitializePredefinedMacros(const TargetInfo &TI, DefineFmt("__UINTPTR", TI.getUIntPtrType(), TI, Builder); DefineTypeWidth("__UINTPTR_WIDTH__", TI.getUIntPtrType(), TI, Builder); - DefineFloatMacros(Builder, "FLT16", &TI.getHalfFormat(), "F16"); + if (TI.hasFloat16Type()) + DefineFloatMacros(Builder, "FLT16", &TI.getHalfFormat(), "F16"); DefineFloatMacros(Builder, "FLT", &TI.getFloatFormat(), "F"); DefineFloatMacros(Builder, "DBL", &TI.getDoubleFormat(), ""); DefineFloatMacros(Builder, "LDBL", &TI.getLongDoubleFormat(), "L"); @@ -1056,16 +1057,17 @@ static void InitializePredefinedMacros(const TargetInfo &TI, Builder.defineMacro("__CLANG_CUDA_APPROX_TRANSCENDENTALS__"); } - if (LangOpts.SYCL) { - Builder.defineMacro("__SYCL_DEVICE_ONLY__"); + // Define a macro indicating that the source file is being compiled with a + // SYCL device compiler which doesn't produce host binary. + if (LangOpts.SYCLIsDevice) { + Builder.defineMacro("__SYCL_DEVICE_ONLY__", "1"); } // OpenCL definitions. if (LangOpts.OpenCL) { -#define OPENCLEXT(Ext) \ - if (TI.getSupportedOpenCLOpts().isSupported(#Ext, \ - LangOpts.OpenCLVersion)) \ - Builder.defineMacro(#Ext); +#define OPENCLEXT(Ext) \ + if (TI.getSupportedOpenCLOpts().isSupported(#Ext, LangOpts)) \ + Builder.defineMacro(#Ext); #include "clang/Basic/OpenCLExtensions.def" auto Arch = TI.getTriple().getArch(); @@ -1108,7 +1110,7 @@ void clang::InitializePreprocessor( if (InitOpts.UsePredefines) { // FIXME: This will create multiple definitions for most of the predefined // macros. This is not the right way to handle this. - if ((LangOpts.CUDA || LangOpts.OpenMPIsDevice || LangOpts.SYCL) && + if ((LangOpts.CUDA || LangOpts.OpenMPIsDevice || LangOpts.SYCLIsDevice) && PP.getAuxTargetInfo()) InitializePredefinedMacros(*PP.getAuxTargetInfo(), LangOpts, FEOpts, Builder); diff --git a/clang/lib/Frontend/Rewrite/InclusionRewriter.cpp b/clang/lib/Frontend/Rewrite/InclusionRewriter.cpp index 4797a64991007..cb4e773aca87a 100644 --- a/clang/lib/Frontend/Rewrite/InclusionRewriter.cpp +++ b/clang/lib/Frontend/Rewrite/InclusionRewriter.cpp @@ -414,7 +414,7 @@ bool InclusionRewriter::HandleHasInclude( // FIXME: Why don't we call PP.LookupFile here? const FileEntry *File = PP.getHeaderSearchInfo().LookupFile( Filename, SourceLocation(), isAngled, Lookup, CurDir, Includers, nullptr, - nullptr, nullptr, nullptr, nullptr); + nullptr, nullptr, nullptr, nullptr, nullptr); FileExists = File != nullptr; return true; diff --git a/clang/lib/Frontend/Rewrite/RewriteModernObjC.cpp b/clang/lib/Frontend/Rewrite/RewriteModernObjC.cpp index fadea9b2a2579..7b1f20408d5e0 100644 --- a/clang/lib/Frontend/Rewrite/RewriteModernObjC.cpp +++ b/clang/lib/Frontend/Rewrite/RewriteModernObjC.cpp @@ -1,4 +1,4 @@ -//===--- RewriteObjC.cpp - Playground for the code rewriter ---------------===// +//===-- RewriteModernObjC.cpp - Playground for the code rewriter ----------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/clang/lib/Frontend/TextDiagnostic.cpp b/clang/lib/Frontend/TextDiagnostic.cpp index 0f7fb501ea3bc..c7ed3f328f92d 100644 --- a/clang/lib/Frontend/TextDiagnostic.cpp +++ b/clang/lib/Frontend/TextDiagnostic.cpp @@ -792,8 +792,6 @@ void TextDiagnostic::emitDiagnosticLoc(FullSourceLoc Loc, PresumedLoc PLoc, const FileEntry *FE = Loc.getFileEntry(); if (FE && FE->isValid()) { emitFilename(FE->getName(), Loc.getManager()); - if (FE->isInPCH()) - OS << " (in PCH)"; OS << ": "; } } @@ -837,7 +835,7 @@ void TextDiagnostic::emitDiagnosticLoc(FullSourceLoc Loc, PresumedLoc PLoc, if (LangOpts.MSCompatibilityVersion && !LangOpts.isCompatibleWithMSVC(LangOptions::MSVC2015)) OS << ' '; - OS << ": "; + OS << ':'; break; } diff --git a/clang/lib/Frontend/VerifyDiagnosticConsumer.cpp b/clang/lib/Frontend/VerifyDiagnosticConsumer.cpp index 33cb1489820a8..95f847cfa4f2e 100644 --- a/clang/lib/Frontend/VerifyDiagnosticConsumer.cpp +++ b/clang/lib/Frontend/VerifyDiagnosticConsumer.cpp @@ -480,7 +480,7 @@ static bool ParseDirective(StringRef S, ExpectedData *ED, SourceManager &SM, const DirectoryLookup *CurDir; const FileEntry *FE = PP->LookupFile(Pos, Filename, false, nullptr, nullptr, CurDir, - nullptr, nullptr, nullptr, nullptr); + nullptr, nullptr, nullptr, nullptr, nullptr); if (!FE) { Diags.Report(Pos.getLocWithOffset(PH.C-PH.Begin), diag::err_verify_missing_file) << Filename << KindStr; diff --git a/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp b/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp index b54887ea57514..c226838786f09 100644 --- a/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp +++ b/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp @@ -51,7 +51,6 @@ CreateFrontendBaseAction(CompilerInstance &CI) { case DumpTokens: return llvm::make_unique(); case EmitAssembly: return llvm::make_unique(); case EmitBC: return llvm::make_unique(); - case EmitSPIRV: return llvm::make_unique(); case EmitHTML: return llvm::make_unique(); case EmitLLVM: return llvm::make_unique(); case EmitLLVMOnly: return llvm::make_unique(); diff --git a/clang/lib/Headers/CMakeLists.txt b/clang/lib/Headers/CMakeLists.txt index 1e1690c120083..2c3735e9ffc9e 100644 --- a/clang/lib/Headers/CMakeLists.txt +++ b/clang/lib/Headers/CMakeLists.txt @@ -129,60 +129,51 @@ set(sycl_wrapper_files ) set(output_dir ${LLVM_LIBRARY_OUTPUT_INTDIR}/clang/${CLANG_VERSION}/include) - -# Generate arm_neon.h -clang_tablegen(arm_neon.h -gen-arm-neon - -I ${CLANG_SOURCE_DIR}/include/clang/Basic/ - SOURCE ${CLANG_SOURCE_DIR}/include/clang/Basic/arm_neon.td) -# Generate arm_fp16.h -clang_tablegen(arm_fp16.h -gen-arm-fp16 - -I ${CLANG_SOURCE_DIR}/include/clang/Basic/ - SOURCE ${CLANG_SOURCE_DIR}/include/clang/Basic/arm_fp16.td) - set(out_files) -foreach( f ${files} ${cuda_wrapper_files} ${sycl_wrapper_files} ) - set( src ${CMAKE_CURRENT_SOURCE_DIR}/${f} ) - set( dst ${output_dir}/${f} ) + +function(copy_header_to_output_dir src_dir file) + set(src ${src_dir}/${file}) + set(dst ${output_dir}/${file}) add_custom_command(OUTPUT ${dst} DEPENDS ${src} COMMAND ${CMAKE_COMMAND} -E copy_if_different ${src} ${dst} - COMMENT "Copying clang's ${f}...") + COMMENT "Copying clang's ${file}...") list(APPEND out_files ${dst}) + set(out_files ${out_files} PARENT_SCOPE) +endfunction(copy_header_to_output_dir) + +function(clang_generate_header td_option td_file out_file) + clang_tablegen(${out_file} ${td_option} + -I ${CLANG_SOURCE_DIR}/include/clang/Basic/ + SOURCE ${CLANG_SOURCE_DIR}/include/clang/Basic/${td_file}) + + copy_header_to_output_dir(${CMAKE_CURRENT_BINARY_DIR} ${out_file}) + set(out_files ${out_files} PARENT_SCOPE) +endfunction(clang_generate_header) + + +# Copy header files from the source directory to the build directory +foreach( f ${files} ${cuda_wrapper_files} ) + copy_header_to_output_dir(${CMAKE_CURRENT_SOURCE_DIR} ${f}) endforeach( f ) -add_custom_command(OUTPUT ${output_dir}/arm_neon.h - DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/arm_neon.h - COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_BINARY_DIR}/arm_neon.h ${output_dir}/arm_neon.h - COMMENT "Copying clang's arm_neon.h...") -list(APPEND out_files ${output_dir}/arm_neon.h) -add_custom_command(OUTPUT ${output_dir}/arm_fp16.h - DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/arm_fp16.h - COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_BINARY_DIR}/arm_fp16.h ${output_dir}/arm_fp16.h - COMMENT "Copying clang's arm_fp16.h...") -list(APPEND out_files ${output_dir}/arm_fp16.h) +# Generate header files and copy them to the build directory +# Generate arm_neon.h +clang_generate_header(-gen-arm-neon arm_neon.td arm_neon.h) +# Generate arm_fp16.h +clang_generate_header(-gen-arm-fp16 arm_fp16.td arm_fp16.h) -add_custom_target(clang-headers ALL DEPENDS ${out_files}) -set_target_properties(clang-headers PROPERTIES +add_custom_target(clang-resource-headers ALL DEPENDS ${out_files}) +set_target_properties(clang-resource-headers PROPERTIES FOLDER "Misc" RUNTIME_OUTPUT_DIRECTORY "${output_dir}") -install( - FILES ${files} ${CMAKE_CURRENT_BINARY_DIR}/arm_neon.h - COMPONENT clang-headers - PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ - DESTINATION lib${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION}/include) +set(header_install_dir lib${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION}) install( - FILES ${files} ${CMAKE_CURRENT_BINARY_DIR}/arm_fp16.h - COMPONENT clang-headers - PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ - DESTINATION lib${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION}/include) - -install( - FILES ${cuda_wrapper_files} - COMPONENT clang-headers - PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ - DESTINATION lib${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION}/include/cuda_wrappers) + DIRECTORY ${output_dir} + DESTINATION ${header_install_dir} + COMPONENT clang-resource-headers) install( FILES ${sycl_wrapper_files} @@ -190,8 +181,8 @@ install( PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ DESTINATION lib${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION}/include/sycl_wrappers) -if (NOT CMAKE_CONFIGURATION_TYPES) # don't add this for IDE's. - add_llvm_install_targets(install-clang-headers - DEPENDS clang-headers - COMPONENT clang-headers) +if (NOT LLVM_ENABLE_IDE) + add_llvm_install_targets(install-clang-resource-headers + DEPENDS clang-resource-headers + COMPONENT clang-resource-headers) endif() diff --git a/clang/lib/Headers/__clang_cuda_runtime_wrapper.h b/clang/lib/Headers/__clang_cuda_runtime_wrapper.h index 4b3672463e614..6b41e1741cb1a 100644 --- a/clang/lib/Headers/__clang_cuda_runtime_wrapper.h +++ b/clang/lib/Headers/__clang_cuda_runtime_wrapper.h @@ -62,7 +62,7 @@ #include "cuda.h" #if !defined(CUDA_VERSION) #error "cuda.h did not define CUDA_VERSION" -#elif CUDA_VERSION < 7000 || CUDA_VERSION > 10000 +#elif CUDA_VERSION < 7000 || CUDA_VERSION > 10010 #error "Unsupported CUDA version!" #endif diff --git a/clang/lib/Headers/avx512bwintrin.h b/clang/lib/Headers/avx512bwintrin.h index a90a255376c04..32fea8d79590a 100644 --- a/clang/lib/Headers/avx512bwintrin.h +++ b/clang/lib/Headers/avx512bwintrin.h @@ -1751,7 +1751,7 @@ static __inline __m512i __DEFAULT_FN_ATTRS512 _mm512_loadu_epi16 (void const *__P) { struct __loadu_epi16 { - __m512i __v; + __m512i_u __v; } __attribute__((__packed__, __may_alias__)); return ((struct __loadu_epi16*)__P)->__v; } @@ -1777,7 +1777,7 @@ static __inline __m512i __DEFAULT_FN_ATTRS512 _mm512_loadu_epi8 (void const *__P) { struct __loadu_epi8 { - __m512i __v; + __m512i_u __v; } __attribute__((__packed__, __may_alias__)); return ((struct __loadu_epi8*)__P)->__v; } @@ -1803,7 +1803,7 @@ static __inline void __DEFAULT_FN_ATTRS512 _mm512_storeu_epi16 (void *__P, __m512i __A) { struct __storeu_epi16 { - __m512i __v; + __m512i_u __v; } __attribute__((__packed__, __may_alias__)); ((struct __storeu_epi16*)__P)->__v = __A; } @@ -1820,7 +1820,7 @@ static __inline void __DEFAULT_FN_ATTRS512 _mm512_storeu_epi8 (void *__P, __m512i __A) { struct __storeu_epi8 { - __m512i __v; + __m512i_u __v; } __attribute__((__packed__, __may_alias__)); ((struct __storeu_epi8*)__P)->__v = __A; } diff --git a/clang/lib/Headers/avx512fintrin.h b/clang/lib/Headers/avx512fintrin.h index 1c19993ff1bb7..55f3fe96098df 100644 --- a/clang/lib/Headers/avx512fintrin.h +++ b/clang/lib/Headers/avx512fintrin.h @@ -40,9 +40,13 @@ typedef unsigned short __v32hu __attribute__((__vector_size__(64))); typedef unsigned long long __v8du __attribute__((__vector_size__(64))); typedef unsigned int __v16su __attribute__((__vector_size__(64))); -typedef float __m512 __attribute__((__vector_size__(64))); -typedef double __m512d __attribute__((__vector_size__(64))); -typedef long long __m512i __attribute__((__vector_size__(64))); +typedef float __m512 __attribute__((__vector_size__(64), __aligned__(64))); +typedef double __m512d __attribute__((__vector_size__(64), __aligned__(64))); +typedef long long __m512i __attribute__((__vector_size__(64), __aligned__(64))); + +typedef float __m512_u __attribute__((__vector_size__(64), __aligned__(1))); +typedef double __m512d_u __attribute__((__vector_size__(64), __aligned__(1))); +typedef long long __m512i_u __attribute__((__vector_size__(64), __aligned__(1))); typedef unsigned char __mmask8; typedef unsigned short __mmask16; @@ -4324,7 +4328,7 @@ static __inline __m512i __DEFAULT_FN_ATTRS512 _mm512_loadu_si512 (void const *__P) { struct __loadu_si512 { - __m512i __v; + __m512i_u __v; } __attribute__((__packed__, __may_alias__)); return ((struct __loadu_si512*)__P)->__v; } @@ -4333,7 +4337,7 @@ static __inline __m512i __DEFAULT_FN_ATTRS512 _mm512_loadu_epi32 (void const *__P) { struct __loadu_epi32 { - __m512i __v; + __m512i_u __v; } __attribute__((__packed__, __may_alias__)); return ((struct __loadu_epi32*)__P)->__v; } @@ -4360,7 +4364,7 @@ static __inline __m512i __DEFAULT_FN_ATTRS512 _mm512_loadu_epi64 (void const *__P) { struct __loadu_epi64 { - __m512i __v; + __m512i_u __v; } __attribute__((__packed__, __may_alias__)); return ((struct __loadu_epi64*)__P)->__v; } @@ -4420,7 +4424,7 @@ static __inline __m512d __DEFAULT_FN_ATTRS512 _mm512_loadu_pd(void const *__p) { struct __loadu_pd { - __m512d __v; + __m512d_u __v; } __attribute__((__packed__, __may_alias__)); return ((struct __loadu_pd*)__p)->__v; } @@ -4429,7 +4433,7 @@ static __inline __m512 __DEFAULT_FN_ATTRS512 _mm512_loadu_ps(void const *__p) { struct __loadu_ps { - __m512 __v; + __m512_u __v; } __attribute__((__packed__, __may_alias__)); return ((struct __loadu_ps*)__p)->__v; } @@ -4504,7 +4508,7 @@ static __inline void __DEFAULT_FN_ATTRS512 _mm512_storeu_epi64 (void *__P, __m512i __A) { struct __storeu_epi64 { - __m512i __v; + __m512i_u __v; } __attribute__((__packed__, __may_alias__)); ((struct __storeu_epi64*)__P)->__v = __A; } @@ -4520,7 +4524,7 @@ static __inline void __DEFAULT_FN_ATTRS512 _mm512_storeu_si512 (void *__P, __m512i __A) { struct __storeu_si512 { - __m512i __v; + __m512i_u __v; } __attribute__((__packed__, __may_alias__)); ((struct __storeu_si512*)__P)->__v = __A; } @@ -4529,7 +4533,7 @@ static __inline void __DEFAULT_FN_ATTRS512 _mm512_storeu_epi32 (void *__P, __m512i __A) { struct __storeu_epi32 { - __m512i __v; + __m512i_u __v; } __attribute__((__packed__, __may_alias__)); ((struct __storeu_epi32*)__P)->__v = __A; } @@ -4551,7 +4555,7 @@ static __inline void __DEFAULT_FN_ATTRS512 _mm512_storeu_pd(void *__P, __m512d __A) { struct __storeu_pd { - __m512d __v; + __m512d_u __v; } __attribute__((__packed__, __may_alias__)); ((struct __storeu_pd*)__P)->__v = __A; } @@ -4567,7 +4571,7 @@ static __inline void __DEFAULT_FN_ATTRS512 _mm512_storeu_ps(void *__P, __m512 __A) { struct __storeu_ps { - __m512 __v; + __m512_u __v; } __attribute__((__packed__, __may_alias__)); ((struct __storeu_ps*)__P)->__v = __A; } diff --git a/clang/lib/Headers/avx512vlbwintrin.h b/clang/lib/Headers/avx512vlbwintrin.h index 87e0023e8b74e..9e85ffd528b18 100644 --- a/clang/lib/Headers/avx512vlbwintrin.h +++ b/clang/lib/Headers/avx512vlbwintrin.h @@ -2301,7 +2301,7 @@ static __inline __m128i __DEFAULT_FN_ATTRS128 _mm_loadu_epi16 (void const *__P) { struct __loadu_epi16 { - __m128i __v; + __m128i_u __v; } __attribute__((__packed__, __may_alias__)); return ((struct __loadu_epi16*)__P)->__v; } @@ -2327,7 +2327,7 @@ static __inline __m256i __DEFAULT_FN_ATTRS256 _mm256_loadu_epi16 (void const *__P) { struct __loadu_epi16 { - __m256i __v; + __m256i_u __v; } __attribute__((__packed__, __may_alias__)); return ((struct __loadu_epi16*)__P)->__v; } @@ -2353,7 +2353,7 @@ static __inline __m128i __DEFAULT_FN_ATTRS128 _mm_loadu_epi8 (void const *__P) { struct __loadu_epi8 { - __m128i __v; + __m128i_u __v; } __attribute__((__packed__, __may_alias__)); return ((struct __loadu_epi8*)__P)->__v; } @@ -2379,7 +2379,7 @@ static __inline __m256i __DEFAULT_FN_ATTRS256 _mm256_loadu_epi8 (void const *__P) { struct __loadu_epi8 { - __m256i __v; + __m256i_u __v; } __attribute__((__packed__, __may_alias__)); return ((struct __loadu_epi8*)__P)->__v; } @@ -2405,7 +2405,7 @@ static __inline void __DEFAULT_FN_ATTRS128 _mm_storeu_epi16 (void *__P, __m128i __A) { struct __storeu_epi16 { - __m128i __v; + __m128i_u __v; } __attribute__((__packed__, __may_alias__)); ((struct __storeu_epi16*)__P)->__v = __A; } @@ -2422,7 +2422,7 @@ static __inline void __DEFAULT_FN_ATTRS256 _mm256_storeu_epi16 (void *__P, __m256i __A) { struct __storeu_epi16 { - __m256i __v; + __m256i_u __v; } __attribute__((__packed__, __may_alias__)); ((struct __storeu_epi16*)__P)->__v = __A; } @@ -2439,7 +2439,7 @@ static __inline void __DEFAULT_FN_ATTRS128 _mm_storeu_epi8 (void *__P, __m128i __A) { struct __storeu_epi8 { - __m128i __v; + __m128i_u __v; } __attribute__((__packed__, __may_alias__)); ((struct __storeu_epi8*)__P)->__v = __A; } @@ -2456,7 +2456,7 @@ static __inline void __DEFAULT_FN_ATTRS256 _mm256_storeu_epi8 (void *__P, __m256i __A) { struct __storeu_epi8 { - __m256i __v; + __m256i_u __v; } __attribute__((__packed__, __may_alias__)); ((struct __storeu_epi8*)__P)->__v = __A; } diff --git a/clang/lib/Headers/avx512vlintrin.h b/clang/lib/Headers/avx512vlintrin.h index a2cdc0a96e59a..a3758e7d333e3 100644 --- a/clang/lib/Headers/avx512vlintrin.h +++ b/clang/lib/Headers/avx512vlintrin.h @@ -5513,7 +5513,7 @@ static __inline __m128i __DEFAULT_FN_ATTRS128 _mm_loadu_epi64 (void const *__P) { struct __loadu_epi64 { - __m128i __v; + __m128i_u __v; } __attribute__((__packed__, __may_alias__)); return ((struct __loadu_epi64*)__P)->__v; } @@ -5539,7 +5539,7 @@ static __inline __m256i __DEFAULT_FN_ATTRS256 _mm256_loadu_epi64 (void const *__P) { struct __loadu_epi64 { - __m256i __v; + __m256i_u __v; } __attribute__((__packed__, __may_alias__)); return ((struct __loadu_epi64*)__P)->__v; } @@ -5565,7 +5565,7 @@ static __inline __m128i __DEFAULT_FN_ATTRS128 _mm_loadu_epi32 (void const *__P) { struct __loadu_epi32 { - __m128i __v; + __m128i_u __v; } __attribute__((__packed__, __may_alias__)); return ((struct __loadu_epi32*)__P)->__v; } @@ -5591,7 +5591,7 @@ static __inline __m256i __DEFAULT_FN_ATTRS256 _mm256_loadu_epi32 (void const *__P) { struct __loadu_epi32 { - __m256i __v; + __m256i_u __v; } __attribute__((__packed__, __may_alias__)); return ((struct __loadu_epi32*)__P)->__v; } @@ -5717,7 +5717,7 @@ static __inline void __DEFAULT_FN_ATTRS128 _mm_storeu_epi64 (void *__P, __m128i __A) { struct __storeu_epi64 { - __m128i __v; + __m128i_u __v; } __attribute__((__packed__, __may_alias__)); ((struct __storeu_epi64*)__P)->__v = __A; } @@ -5734,7 +5734,7 @@ static __inline void __DEFAULT_FN_ATTRS256 _mm256_storeu_epi64 (void *__P, __m256i __A) { struct __storeu_epi64 { - __m256i __v; + __m256i_u __v; } __attribute__((__packed__, __may_alias__)); ((struct __storeu_epi64*)__P)->__v = __A; } @@ -5751,7 +5751,7 @@ static __inline void __DEFAULT_FN_ATTRS128 _mm_storeu_epi32 (void *__P, __m128i __A) { struct __storeu_epi32 { - __m128i __v; + __m128i_u __v; } __attribute__((__packed__, __may_alias__)); ((struct __storeu_epi32*)__P)->__v = __A; } @@ -5768,7 +5768,7 @@ static __inline void __DEFAULT_FN_ATTRS256 _mm256_storeu_epi32 (void *__P, __m256i __A) { struct __storeu_epi32 { - __m256i __v; + __m256i_u __v; } __attribute__((__packed__, __may_alias__)); ((struct __storeu_epi32*)__P)->__v = __A; } diff --git a/clang/lib/Headers/avxintrin.h b/clang/lib/Headers/avxintrin.h index cb15396b3faf3..0a5b23677595e 100644 --- a/clang/lib/Headers/avxintrin.h +++ b/clang/lib/Headers/avxintrin.h @@ -45,9 +45,13 @@ typedef unsigned char __v32qu __attribute__ ((__vector_size__ (32))); * appear in the interface though. */ typedef signed char __v32qs __attribute__((__vector_size__(32))); -typedef float __m256 __attribute__ ((__vector_size__ (32))); -typedef double __m256d __attribute__((__vector_size__(32))); -typedef long long __m256i __attribute__((__vector_size__(32))); +typedef float __m256 __attribute__ ((__vector_size__ (32), __aligned__(32))); +typedef double __m256d __attribute__((__vector_size__(32), __aligned__(32))); +typedef long long __m256i __attribute__((__vector_size__(32), __aligned__(32))); + +typedef float __m256_u __attribute__ ((__vector_size__ (32), __aligned__(1))); +typedef double __m256d_u __attribute__((__vector_size__(32), __aligned__(1))); +typedef long long __m256i_u __attribute__((__vector_size__(32), __aligned__(1))); /* Define the default attributes for the functions in this file. */ #define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("avx"), __min_vector_width__(256))) @@ -3113,7 +3117,7 @@ static __inline __m256d __DEFAULT_FN_ATTRS _mm256_loadu_pd(double const *__p) { struct __loadu_pd { - __m256d __v; + __m256d_u __v; } __attribute__((__packed__, __may_alias__)); return ((struct __loadu_pd*)__p)->__v; } @@ -3133,7 +3137,7 @@ static __inline __m256 __DEFAULT_FN_ATTRS _mm256_loadu_ps(float const *__p) { struct __loadu_ps { - __m256 __v; + __m256_u __v; } __attribute__((__packed__, __may_alias__)); return ((struct __loadu_ps*)__p)->__v; } @@ -3166,10 +3170,10 @@ _mm256_load_si256(__m256i const *__p) /// A pointer to a 256-bit integer vector containing integer values. /// \returns A 256-bit integer vector containing the moved values. static __inline __m256i __DEFAULT_FN_ATTRS -_mm256_loadu_si256(__m256i const *__p) +_mm256_loadu_si256(__m256i_u const *__p) { struct __loadu_si256 { - __m256i __v; + __m256i_u __v; } __attribute__((__packed__, __may_alias__)); return ((struct __loadu_si256*)__p)->__v; } @@ -3246,7 +3250,7 @@ static __inline void __DEFAULT_FN_ATTRS _mm256_storeu_pd(double *__p, __m256d __a) { struct __storeu_pd { - __m256d __v; + __m256d_u __v; } __attribute__((__packed__, __may_alias__)); ((struct __storeu_pd*)__p)->__v = __a; } @@ -3266,7 +3270,7 @@ static __inline void __DEFAULT_FN_ATTRS _mm256_storeu_ps(float *__p, __m256 __a) { struct __storeu_ps { - __m256 __v; + __m256_u __v; } __attribute__((__packed__, __may_alias__)); ((struct __storeu_ps*)__p)->__v = __a; } @@ -3301,10 +3305,10 @@ _mm256_store_si256(__m256i *__p, __m256i __a) /// \param __a /// A 256-bit integer vector containing the values to be moved. static __inline void __DEFAULT_FN_ATTRS -_mm256_storeu_si256(__m256i *__p, __m256i __a) +_mm256_storeu_si256(__m256i_u *__p, __m256i __a) { struct __storeu_si256 { - __m256i __v; + __m256i_u __v; } __attribute__((__packed__, __may_alias__)); ((struct __storeu_si256*)__p)->__v = __a; } @@ -4834,7 +4838,7 @@ _mm256_loadu2_m128d(double const *__addr_hi, double const *__addr_lo) /// address of the memory location does not have to be aligned. /// \returns A 256-bit integer vector containing the concatenated result. static __inline __m256i __DEFAULT_FN_ATTRS -_mm256_loadu2_m128i(__m128i const *__addr_hi, __m128i const *__addr_lo) +_mm256_loadu2_m128i(__m128i_u const *__addr_hi, __m128i_u const *__addr_lo) { __m256i __v256 = _mm256_castsi128_si256(_mm_loadu_si128(__addr_lo)); return _mm256_insertf128_si256(__v256, _mm_loadu_si128(__addr_hi), 1); @@ -4918,7 +4922,7 @@ _mm256_storeu2_m128d(double *__addr_hi, double *__addr_lo, __m256d __a) /// \param __a /// A 256-bit integer vector. static __inline void __DEFAULT_FN_ATTRS -_mm256_storeu2_m128i(__m128i *__addr_hi, __m128i *__addr_lo, __m256i __a) +_mm256_storeu2_m128i(__m128i_u *__addr_hi, __m128i_u *__addr_lo, __m256i __a) { __m128i __v128; diff --git a/clang/lib/Headers/emmintrin.h b/clang/lib/Headers/emmintrin.h index 6d61f97199444..ac2f76921af88 100644 --- a/clang/lib/Headers/emmintrin.h +++ b/clang/lib/Headers/emmintrin.h @@ -26,8 +26,11 @@ #include -typedef double __m128d __attribute__((__vector_size__(16))); -typedef long long __m128i __attribute__((__vector_size__(16))); +typedef double __m128d __attribute__((__vector_size__(16), __aligned__(16))); +typedef long long __m128i __attribute__((__vector_size__(16), __aligned__(16))); + +typedef double __m128d_u __attribute__((__vector_size__(16), __aligned__(1))); +typedef long long __m128i_u __attribute__((__vector_size__(16), __aligned__(1))); /* Type defines. */ typedef double __v2df __attribute__ ((__vector_size__ (16))); @@ -1652,7 +1655,7 @@ static __inline__ __m128d __DEFAULT_FN_ATTRS _mm_loadu_pd(double const *__dp) { struct __loadu_pd { - __m128d __v; + __m128d_u __v; } __attribute__((__packed__, __may_alias__)); return ((struct __loadu_pd*)__dp)->__v; } @@ -2042,7 +2045,7 @@ static __inline__ void __DEFAULT_FN_ATTRS _mm_storeu_pd(double *__dp, __m128d __a) { struct __storeu_pd { - __m128d __v; + __m128d_u __v; } __attribute__((__packed__, __may_alias__)); ((struct __storeu_pd*)__dp)->__v = __a; } @@ -3564,10 +3567,10 @@ _mm_load_si128(__m128i const *__p) /// A pointer to a memory location containing integer values. /// \returns A 128-bit integer vector containing the moved values. static __inline__ __m128i __DEFAULT_FN_ATTRS -_mm_loadu_si128(__m128i const *__p) +_mm_loadu_si128(__m128i_u const *__p) { struct __loadu_si128 { - __m128i __v; + __m128i_u __v; } __attribute__((__packed__, __may_alias__)); return ((struct __loadu_si128*)__p)->__v; } @@ -3585,7 +3588,7 @@ _mm_loadu_si128(__m128i const *__p) /// \returns A 128-bit vector of [2 x i64]. The lower order bits contain the /// moved value. The higher order bits are cleared. static __inline__ __m128i __DEFAULT_FN_ATTRS -_mm_loadl_epi64(__m128i const *__p) +_mm_loadl_epi64(__m128i_u const *__p) { struct __mm_loadl_epi64_struct { long long __u; @@ -4027,10 +4030,10 @@ _mm_store_si128(__m128i *__p, __m128i __b) /// \param __b /// A 128-bit integer vector containing the values to be moved. static __inline__ void __DEFAULT_FN_ATTRS -_mm_storeu_si128(__m128i *__p, __m128i __b) +_mm_storeu_si128(__m128i_u *__p, __m128i __b) { struct __storeu_si128 { - __m128i __v; + __m128i_u __v; } __attribute__((__packed__, __may_alias__)); ((struct __storeu_si128*)__p)->__v = __b; } @@ -4139,7 +4142,7 @@ _mm_maskmoveu_si128(__m128i __d, __m128i __n, char *__p) /// A 128-bit integer vector of [2 x i64]. The lower 64 bits contain the /// value to be stored. static __inline__ void __DEFAULT_FN_ATTRS -_mm_storel_epi64(__m128i *__p, __m128i __a) +_mm_storel_epi64(__m128i_u *__p, __m128i __a) { struct __mm_storel_epi64_struct { long long __u; diff --git a/clang/lib/Headers/float.h b/clang/lib/Headers/float.h index 56215cd624d7f..46a8dae06ab0f 100644 --- a/clang/lib/Headers/float.h +++ b/clang/lib/Headers/float.h @@ -51,7 +51,7 @@ # undef FLT_MANT_DIG # undef DBL_MANT_DIG # undef LDBL_MANT_DIG -# if __STDC_VERSION__ >= 199901L || !defined(__STRICT_ANSI__) +# if __STDC_VERSION__ >= 199901L || !defined(__STRICT_ANSI__) || __cplusplus >= 201103L # undef DECIMAL_DIG # endif # undef FLT_DIG @@ -78,7 +78,7 @@ # undef FLT_MIN # undef DBL_MIN # undef LDBL_MIN -# if __STDC_VERSION__ >= 201112L || !defined(__STRICT_ANSI__) +# if __STDC_VERSION__ >= 201112L || !defined(__STRICT_ANSI__) || __cplusplus >= 201703L # undef FLT_TRUE_MIN # undef DBL_TRUE_MIN # undef LDBL_TRUE_MIN @@ -101,7 +101,7 @@ #define DBL_MANT_DIG __DBL_MANT_DIG__ #define LDBL_MANT_DIG __LDBL_MANT_DIG__ -#if __STDC_VERSION__ >= 199901L || !defined(__STRICT_ANSI__) +#if __STDC_VERSION__ >= 199901L || !defined(__STRICT_ANSI__) || __cplusplus >= 201103L # define DECIMAL_DIG __DECIMAL_DIG__ #endif @@ -137,7 +137,7 @@ #define DBL_MIN __DBL_MIN__ #define LDBL_MIN __LDBL_MIN__ -#if __STDC_VERSION__ >= 201112L || !defined(__STRICT_ANSI__) +#if __STDC_VERSION__ >= 201112L || !defined(__STRICT_ANSI__) || __cplusplus >= 201703L # define FLT_TRUE_MIN __FLT_DENORM_MIN__ # define DBL_TRUE_MIN __DBL_DENORM_MIN__ # define LDBL_TRUE_MIN __LDBL_DENORM_MIN__ diff --git a/clang/lib/Headers/intrin.h b/clang/lib/Headers/intrin.h index aa27707ef53fa..e7508a4c15e94 100644 --- a/clang/lib/Headers/intrin.h +++ b/clang/lib/Headers/intrin.h @@ -554,18 +554,12 @@ __nop(void) { #if defined(__aarch64__) unsigned __int64 __getReg(int); long _InterlockedAdd(long volatile *Addend, long Value); -int _ReadStatusReg(int); -void _WriteStatusReg(int, int); +__int64 _ReadStatusReg(int); +void _WriteStatusReg(int, __int64); -static inline unsigned short _byteswap_ushort (unsigned short val) { - return __builtin_bswap16(val); -} -static inline unsigned long _byteswap_ulong (unsigned long val) { - return __builtin_bswap32(val); -} -static inline unsigned __int64 _byteswap_uint64 (unsigned __int64 val) { - return __builtin_bswap64(val); -} +unsigned short __cdecl _byteswap_ushort(unsigned short val); +unsigned long __cdecl _byteswap_ulong (unsigned long val); +unsigned __int64 __cdecl _byteswap_uint64(unsigned __int64 val); #endif /*----------------------------------------------------------------------------*\ diff --git a/clang/lib/Headers/mmintrin.h b/clang/lib/Headers/mmintrin.h index a73539942a92e..5dc304e451dc5 100644 --- a/clang/lib/Headers/mmintrin.h +++ b/clang/lib/Headers/mmintrin.h @@ -24,7 +24,7 @@ #ifndef __MMINTRIN_H #define __MMINTRIN_H -typedef long long __m64 __attribute__((__vector_size__(8))); +typedef long long __m64 __attribute__((__vector_size__(8), __aligned__(8))); typedef long long __v1di __attribute__((__vector_size__(8))); typedef int __v2si __attribute__((__vector_size__(8))); diff --git a/clang/lib/Headers/unwind.h b/clang/lib/Headers/unwind.h index 0e8317e5b9d90..438f91446ae78 100644 --- a/clang/lib/Headers/unwind.h +++ b/clang/lib/Headers/unwind.h @@ -66,8 +66,8 @@ extern "C" { #pragma GCC visibility push(default) #endif -typedef uintptr_t _Unwind_Word; -typedef intptr_t _Unwind_Sword; +typedef uintptr_t _Unwind_Word __attribute__((__mode__(__unwind_word__))); +typedef intptr_t _Unwind_Sword __attribute__((__mode__(__unwind_word__))); typedef uintptr_t _Unwind_Ptr; typedef uintptr_t _Unwind_Internal_Ptr; typedef uint64_t _Unwind_Exception_Class; diff --git a/clang/lib/Headers/xmmintrin.h b/clang/lib/Headers/xmmintrin.h index 17af17267c837..ff21a570e9c21 100644 --- a/clang/lib/Headers/xmmintrin.h +++ b/clang/lib/Headers/xmmintrin.h @@ -28,7 +28,9 @@ typedef int __v4si __attribute__((__vector_size__(16))); typedef float __v4sf __attribute__((__vector_size__(16))); -typedef float __m128 __attribute__((__vector_size__(16))); +typedef float __m128 __attribute__((__vector_size__(16), __aligned__(16))); + +typedef float __m128_u __attribute__((__vector_size__(16), __aligned__(1))); /* Unsigned types */ typedef unsigned int __v4su __attribute__((__vector_size__(16))); @@ -1752,7 +1754,7 @@ static __inline__ __m128 __DEFAULT_FN_ATTRS _mm_loadu_ps(const float *__p) { struct __loadu_ps { - __m128 __v; + __m128_u __v; } __attribute__((__packed__, __may_alias__)); return ((struct __loadu_ps*)__p)->__v; } @@ -1987,7 +1989,7 @@ static __inline__ void __DEFAULT_FN_ATTRS _mm_storeu_ps(float *__p, __m128 __a) { struct __storeu_ps { - __m128 __v; + __m128_u __v; } __attribute__((__packed__, __may_alias__)); ((struct __storeu_ps*)__p)->__v = __a; } diff --git a/clang/lib/Index/CMakeLists.txt b/clang/lib/Index/CMakeLists.txt index 1362143fb0d45..0551d43467916 100644 --- a/clang/lib/Index/CMakeLists.txt +++ b/clang/lib/Index/CMakeLists.txt @@ -6,6 +6,7 @@ set(LLVM_LINK_COMPONENTS add_clang_library(clangIndex CodegenNameGenerator.cpp CommentToXML.cpp + FileIndexRecord.cpp IndexBody.cpp IndexDecl.cpp IndexingAction.cpp diff --git a/clang/lib/Index/FileIndexRecord.cpp b/clang/lib/Index/FileIndexRecord.cpp new file mode 100644 index 0000000000000..dd5ad71771dfe --- /dev/null +++ b/clang/lib/Index/FileIndexRecord.cpp @@ -0,0 +1,60 @@ +//===--- FileIndexRecord.cpp - Index data per file --------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "FileIndexRecord.h" +#include "clang/AST/ASTContext.h" +#include "clang/AST/DeclTemplate.h" +#include "llvm/ADT/SmallString.h" +#include "llvm/Support/Path.h" + +using namespace clang; +using namespace clang::index; + +void FileIndexRecord::addDeclOccurence(SymbolRoleSet Roles, unsigned Offset, + const Decl *D, + ArrayRef Relations) { + assert(D->isCanonicalDecl() && + "Occurrences should be associated with their canonical decl"); + + auto IsNextOccurence = [&]() -> bool { + if (Decls.empty()) + return true; + auto &Last = Decls.back(); + return Last.Offset < Offset; + }; + + if (IsNextOccurence()) { + Decls.emplace_back(Roles, Offset, D, Relations); + return; + } + + DeclOccurrence NewInfo(Roles, Offset, D, Relations); + // We keep Decls in order as we need to access them in this order in all cases. + auto It = std::upper_bound(Decls.begin(), Decls.end(), NewInfo); + Decls.insert(It, std::move(NewInfo)); +} + +void FileIndexRecord::print(llvm::raw_ostream &OS) const { + OS << "DECLS BEGIN ---\n"; + for (auto &DclInfo : Decls) { + const Decl *D = DclInfo.Dcl; + SourceManager &SM = D->getASTContext().getSourceManager(); + SourceLocation Loc = SM.getFileLoc(D->getLocation()); + PresumedLoc PLoc = SM.getPresumedLoc(Loc); + OS << llvm::sys::path::filename(PLoc.getFilename()) << ':' << PLoc.getLine() + << ':' << PLoc.getColumn(); + + if (auto ND = dyn_cast(D)) { + OS << ' ' << ND->getNameAsString(); + } + + OS << '\n'; + } + OS << "DECLS END ---\n"; +} diff --git a/clang/lib/Index/FileIndexRecord.h b/clang/lib/Index/FileIndexRecord.h new file mode 100644 index 0000000000000..37bf96a71964a --- /dev/null +++ b/clang/lib/Index/FileIndexRecord.h @@ -0,0 +1,57 @@ +//===--- FileIndexRecord.h - Index data per file ----------------*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_CLANG_LIB_INDEX_FILEINDEXRECORD_H +#define LLVM_CLANG_LIB_INDEX_FILEINDEXRECORD_H + +#include "clang/Basic/SourceLocation.h" +#include "clang/Index/DeclOccurrence.h" +#include "clang/Index/IndexSymbol.h" +#include "llvm/ADT/ArrayRef.h" +#include "llvm/ADT/SmallVector.h" +#include + +namespace clang { +class IdentifierInfo; + +namespace index { + +/// Stores the declaration occurrences seen in a particular source or header +/// file of a translation unit +class FileIndexRecord { +private: + FileID FID; + bool IsSystem; + std::vector Decls; + +public: + FileIndexRecord(FileID FID, bool IsSystem) : FID(FID), IsSystem(IsSystem) {} + + ArrayRef getDeclOccurrencesSortedByOffset() const { + return Decls; + } + + FileID getFileID() const { return FID; } + bool isSystem() const { return IsSystem; } + + /// Adds an occurrence of the canonical declaration \c D at the supplied + /// \c Offset + /// + /// \param Roles the roles the occurrence fulfills in this position. + /// \param Offset the offset in the file of this occurrence. + /// \param D the canonical declaration this is an occurrence of. + /// \param Relations the set of symbols related to this occurrence. + void addDeclOccurence(SymbolRoleSet Roles, unsigned Offset, const Decl *D, + ArrayRef Relations); + void print(llvm::raw_ostream &OS) const; +}; + +} // end namespace index +} // end namespace clang + +#endif // LLVM_CLANG_LIB_INDEX_FILEINDEXRECORD_H diff --git a/clang/lib/Index/IndexDecl.cpp b/clang/lib/Index/IndexDecl.cpp index aa73d937df315..d7835c51d06c8 100644 --- a/clang/lib/Index/IndexDecl.cpp +++ b/clang/lib/Index/IndexDecl.cpp @@ -88,12 +88,11 @@ class IndexingDeclVisitor : public ConstDeclVisitor { /*isBase=*/false, isIBType); IndexCtx.indexNestedNameSpecifierLoc(D->getQualifierLoc(), Parent); if (IndexCtx.shouldIndexFunctionLocalSymbols()) { - // Only index parameters in definitions, parameters in declarations are - // not useful. if (const ParmVarDecl *Parm = dyn_cast(D)) { auto *DC = Parm->getDeclContext(); if (auto *FD = dyn_cast(DC)) { - if (FD->isThisDeclarationADefinition()) + if (IndexCtx.shouldIndexParametersInDeclarations() || + FD->isThisDeclarationADefinition()) IndexCtx.handleDecl(Parm); } else if (auto *MD = dyn_cast(DC)) { if (MD->isThisDeclarationADefinition()) @@ -102,7 +101,8 @@ class IndexingDeclVisitor : public ConstDeclVisitor { IndexCtx.handleDecl(Parm); } } else if (const FunctionDecl *FD = dyn_cast(D)) { - if (FD->isThisDeclarationADefinition()) { + if (IndexCtx.shouldIndexParametersInDeclarations() || + FD->isThisDeclarationADefinition()) { for (auto PI : FD->parameters()) { IndexCtx.handleDecl(PI); } @@ -324,6 +324,7 @@ class IndexingDeclVisitor : public ConstDeclVisitor { } bool VisitMSPropertyDecl(const MSPropertyDecl *D) { + TRY_DECL(D, IndexCtx.handleDecl(D)); handleDeclarator(D); return true; } @@ -580,9 +581,10 @@ class IndexingDeclVisitor : public ConstDeclVisitor { } bool VisitUsingDecl(const UsingDecl *D) { + IndexCtx.handleDecl(D); + const DeclContext *DC = D->getDeclContext()->getRedeclContext(); const NamedDecl *Parent = dyn_cast(DC); - IndexCtx.indexNestedNameSpecifierLoc(D->getQualifierLoc(), Parent, D->getLexicalDeclContext()); for (const auto *I : D->shadows()) @@ -672,6 +674,8 @@ class IndexingDeclVisitor : public ConstDeclVisitor { shouldIndexTemplateParameterDefaultValue(Parent)) { const TemplateParameterList *Params = D->getTemplateParameters(); for (const NamedDecl *TP : *Params) { + if (IndexCtx.shouldIndexTemplateParameters()) + IndexCtx.handleDecl(TP); if (const auto *TTP = dyn_cast(TP)) { if (TTP->hasDefaultArgument()) IndexCtx.indexTypeSourceInfo(TTP->getDefaultArgumentInfo(), Parent); diff --git a/clang/lib/Index/IndexSymbol.cpp b/clang/lib/Index/IndexSymbol.cpp index 27e62af19f2d2..218f89360b8b4 100644 --- a/clang/lib/Index/IndexSymbol.cpp +++ b/clang/lib/Index/IndexSymbol.cpp @@ -55,9 +55,6 @@ bool index::isFunctionLocalSymbol(const Decl *D) { if (isa(D)) return true; - if (isa(D)) - return true; - if (isa(D)) return true; @@ -319,10 +316,22 @@ SymbolInfo index::getSymbolInfo(const Decl *D) { Info.Lang = SymbolLanguage::CXX; Info.Properties |= (SymbolPropertySet)SymbolProperty::Generic; break; + case Decl::Using: + Info.Kind = SymbolKind::Using; + Info.Lang = SymbolLanguage::CXX; + break; case Decl::Binding: Info.Kind = SymbolKind::Variable; Info.Lang = SymbolLanguage::CXX; break; + case Decl::MSProperty: + Info.Kind = SymbolKind::InstanceProperty; + if (const CXXRecordDecl *CXXRec = + dyn_cast(D->getDeclContext())) { + if (!CXXRec->isCLike()) + Info.Lang = SymbolLanguage::CXX; + } + break; default: break; } diff --git a/clang/lib/Index/IndexTypeSourceInfo.cpp b/clang/lib/Index/IndexTypeSourceInfo.cpp index df80127fa5b68..9f9740b607975 100644 --- a/clang/lib/Index/IndexTypeSourceInfo.cpp +++ b/clang/lib/Index/IndexTypeSourceInfo.cpp @@ -45,6 +45,13 @@ class TypeIndexer : public RecursiveASTVisitor { return false; \ } while (0) + bool VisitTemplateTypeParmTypeLoc(TemplateTypeParmTypeLoc TTPL) { + SourceLocation Loc = TTPL.getNameLoc(); + TemplateTypeParmDecl *TTPD = TTPL.getDecl(); + return IndexCtx.handleReference(TTPD, Loc, Parent, ParentDC, + SymbolRoleSet()); + } + bool VisitTypedefTypeLoc(TypedefTypeLoc TL) { SourceLocation Loc = TL.getNameLoc(); TypedefNameDecl *ND = TL.getTypedefNameDecl(); @@ -129,10 +136,10 @@ class TypeIndexer : public RecursiveASTVisitor { template bool HandleTemplateSpecializationTypeLoc(TypeLocType TL) { if (const auto *T = TL.getTypePtr()) { - if (IndexCtx.shouldIndexImplicitInstantiation()) { - if (CXXRecordDecl *RD = T->getAsCXXRecordDecl()) { - IndexCtx.handleReference(RD, TL.getTemplateNameLoc(), - Parent, ParentDC, SymbolRoleSet(), Relations); + if (CXXRecordDecl *RD = T->getAsCXXRecordDecl()) { + if (!RD->isImplicit() || IndexCtx.shouldIndexImplicitInstantiation()) { + IndexCtx.handleReference(RD, TL.getTemplateNameLoc(), Parent, + ParentDC, SymbolRoleSet(), Relations); return true; } } diff --git a/clang/lib/Index/IndexingContext.cpp b/clang/lib/Index/IndexingContext.cpp index 0bbd739d741c7..d01dd50f3b5d4 100644 --- a/clang/lib/Index/IndexingContext.cpp +++ b/clang/lib/Index/IndexingContext.cpp @@ -40,6 +40,14 @@ bool IndexingContext::shouldIndexImplicitInstantiation() const { return IndexOpts.IndexImplicitInstantiation; } +bool IndexingContext::shouldIndexParametersInDeclarations() const { + return IndexOpts.IndexParametersInDeclarations; +} + +bool IndexingContext::shouldIndexTemplateParameters() const { + return IndexOpts.IndexTemplateParameters; +} + bool IndexingContext::handleDecl(const Decl *D, SymbolRoleSet Roles, ArrayRef Relations) { @@ -72,8 +80,11 @@ bool IndexingContext::handleReference(const NamedDecl *D, SourceLocation Loc, if (!shouldIndexFunctionLocalSymbols() && isFunctionLocalSymbol(D)) return true; - if (isa(D) || isa(D)) + if (!shouldIndexTemplateParameters() && + (isa(D) || isa(D) || + isa(D))) { return true; + } return handleDeclOccurrence(D, Loc, /*IsRef=*/true, Parent, Roles, Relations, RefE, RefD, DC); diff --git a/clang/lib/Index/IndexingContext.h b/clang/lib/Index/IndexingContext.h index 1de38513c61ab..3136878c080c6 100644 --- a/clang/lib/Index/IndexingContext.h +++ b/clang/lib/Index/IndexingContext.h @@ -61,6 +61,10 @@ class IndexingContext { bool shouldIndexImplicitInstantiation() const; + bool shouldIndexParametersInDeclarations() const; + + bool shouldIndexTemplateParameters() const; + static bool isTemplateImplicitInstantiation(const Decl *D); bool handleDecl(const Decl *D, SymbolRoleSet Roles = SymbolRoleSet(), diff --git a/clang/lib/Index/USRGeneration.cpp b/clang/lib/Index/USRGeneration.cpp index 0e2439c0adda1..228651de928e5 100644 --- a/clang/lib/Index/USRGeneration.cpp +++ b/clang/lib/Index/USRGeneration.cpp @@ -111,7 +111,12 @@ class USRGenerator : public ConstDeclVisitor { } void VisitUsingDecl(const UsingDecl *D) { - IgnoreResults = true; + VisitDeclContext(D->getDeclContext()); + Out << "@UD@"; + + bool EmittedDeclName = !EmitDeclName(D); + assert(EmittedDeclName && "EmitDeclName can not fail for UsingDecls"); + (void)EmittedDeclName; } bool ShouldGenerateLocation(const NamedDecl *D); diff --git a/clang/lib/Lex/HeaderSearch.cpp b/clang/lib/Lex/HeaderSearch.cpp index 32393d1227caa..9c92f772c2b5a 100644 --- a/clang/lib/Lex/HeaderSearch.cpp +++ b/clang/lib/Lex/HeaderSearch.cpp @@ -334,6 +334,7 @@ const FileEntry *DirectoryLookup::LookupFile( Module *RequestingModule, ModuleMap::KnownHeader *SuggestedModule, bool &InUserSpecifiedSystemFramework, + bool &IsFrameworkFound, bool &HasBeenMapped, SmallVectorImpl &MappedName) const { InUserSpecifiedSystemFramework = false; @@ -362,7 +363,7 @@ const FileEntry *DirectoryLookup::LookupFile( if (isFramework()) return DoFrameworkLookup(Filename, HS, SearchPath, RelativePath, RequestingModule, SuggestedModule, - InUserSpecifiedSystemFramework); + InUserSpecifiedSystemFramework, IsFrameworkFound); assert(isHeaderMap() && "Unknown directory lookup"); const HeaderMap *HM = getHeaderMap(); @@ -462,7 +463,7 @@ const FileEntry *DirectoryLookup::DoFrameworkLookup( StringRef Filename, HeaderSearch &HS, SmallVectorImpl *SearchPath, SmallVectorImpl *RelativePath, Module *RequestingModule, ModuleMap::KnownHeader *SuggestedModule, - bool &InUserSpecifiedSystemFramework) const { + bool &InUserSpecifiedSystemFramework, bool &IsFrameworkFound) const { FileManager &FileMgr = HS.getFileMgr(); // Framework names must have a '/' in the filename. @@ -471,7 +472,7 @@ const FileEntry *DirectoryLookup::DoFrameworkLookup( // Find out if this is the home for the specified framework, by checking // HeaderSearch. Possible answers are yes/no and unknown. - HeaderSearch::FrameworkCacheEntry &CacheEntry = + FrameworkCacheEntry &CacheEntry = HS.LookupFrameworkCache(Filename.substr(0, SlashPos)); // If it is known and in some other directory, fail. @@ -516,8 +517,9 @@ const FileEntry *DirectoryLookup::DoFrameworkLookup( } } - // Set the 'user-specified system framework' flag. + // Set out flags. InUserSpecifiedSystemFramework = CacheEntry.IsUserSpecifiedSystemFramework; + IsFrameworkFound = CacheEntry.Directory; if (RelativePath) { RelativePath->clear(); @@ -696,10 +698,14 @@ const FileEntry *HeaderSearch::LookupFile( ArrayRef> Includers, SmallVectorImpl *SearchPath, SmallVectorImpl *RelativePath, Module *RequestingModule, ModuleMap::KnownHeader *SuggestedModule, - bool *IsMapped, bool SkipCache, bool BuildSystemModule) { + bool *IsMapped, bool *IsFrameworkFound, bool SkipCache, + bool BuildSystemModule) { if (IsMapped) *IsMapped = false; + if (IsFrameworkFound) + *IsFrameworkFound = false; + if (SuggestedModule) *SuggestedModule = ModuleMap::KnownHeader(); @@ -851,16 +857,19 @@ const FileEntry *HeaderSearch::LookupFile( for (; i != SearchDirs.size(); ++i) { bool InUserSpecifiedSystemFramework = false; bool HasBeenMapped = false; + bool IsFrameworkFoundInDir = false; const FileEntry *FE = SearchDirs[i].LookupFile( Filename, *this, IncludeLoc, SearchPath, RelativePath, RequestingModule, - SuggestedModule, InUserSpecifiedSystemFramework, HasBeenMapped, - MappedName); + SuggestedModule, InUserSpecifiedSystemFramework, IsFrameworkFoundInDir, + HasBeenMapped, MappedName); if (HasBeenMapped) { CacheLookup.MappedName = copyString(Filename, LookupFileCache.getAllocator()); if (IsMapped) *IsMapped = true; } + if (IsFrameworkFound) + *IsFrameworkFound |= IsFrameworkFoundInDir; if (!FE) continue; CurDir = &SearchDirs[i]; @@ -926,10 +935,10 @@ const FileEntry *HeaderSearch::LookupFile( ScratchFilename += '/'; ScratchFilename += Filename; - const FileEntry *FE = - LookupFile(ScratchFilename, IncludeLoc, /*isAngled=*/true, FromDir, - CurDir, Includers.front(), SearchPath, RelativePath, - RequestingModule, SuggestedModule, IsMapped); + const FileEntry *FE = LookupFile( + ScratchFilename, IncludeLoc, /*isAngled=*/true, FromDir, CurDir, + Includers.front(), SearchPath, RelativePath, RequestingModule, + SuggestedModule, IsMapped, /*IsFrameworkFound=*/nullptr); if (checkMSVCHeaderSearch(Diags, MSFE, FE, IncludeLoc)) { if (SuggestedModule) diff --git a/clang/lib/Lex/PPDirectives.cpp b/clang/lib/Lex/PPDirectives.cpp index d4fad6a348c01..3950174529260 100644 --- a/clang/lib/Lex/PPDirectives.cpp +++ b/clang/lib/Lex/PPDirectives.cpp @@ -665,7 +665,8 @@ const FileEntry *Preprocessor::LookupFile( const DirectoryLookup *FromDir, const FileEntry *FromFile, const DirectoryLookup *&CurDir, SmallVectorImpl *SearchPath, SmallVectorImpl *RelativePath, - ModuleMap::KnownHeader *SuggestedModule, bool *IsMapped, bool SkipCache) { + ModuleMap::KnownHeader *SuggestedModule, bool *IsMapped, + bool *IsFrameworkFound, bool SkipCache) { Module *RequestingModule = getModuleForLocation(FilenameLoc); bool RequestingModuleIsModuleInterface = !SourceMgr.isInMainFile(FilenameLoc); @@ -723,7 +724,8 @@ const FileEntry *Preprocessor::LookupFile( while (const FileEntry *FE = HeaderInfo.LookupFile( Filename, FilenameLoc, isAngled, TmpFromDir, TmpCurDir, Includers, SearchPath, RelativePath, RequestingModule, - SuggestedModule, /*IsMapped=*/nullptr, SkipCache)) { + SuggestedModule, /*IsMapped=*/nullptr, + /*IsFrameworkFound=*/nullptr, SkipCache)) { // Keep looking as if this file did a #include_next. TmpFromDir = TmpCurDir; ++TmpFromDir; @@ -739,8 +741,8 @@ const FileEntry *Preprocessor::LookupFile( // Do a standard file entry lookup. const FileEntry *FE = HeaderInfo.LookupFile( Filename, FilenameLoc, isAngled, FromDir, CurDir, Includers, SearchPath, - RelativePath, RequestingModule, SuggestedModule, IsMapped, SkipCache, - BuildSystemModule); + RelativePath, RequestingModule, SuggestedModule, IsMapped, + IsFrameworkFound, SkipCache, BuildSystemModule); if (FE) { if (SuggestedModule && !LangOpts.AsmPreprocessor) HeaderInfo.getModuleMap().diagnoseHeaderInclusion( @@ -884,6 +886,8 @@ void Preprocessor::HandleDirective(Token &Result) { case tok::pp___include_macros: case tok::pp_pragma: Diag(Result, diag::err_embedded_directive) << II->getName(); + Diag(*ArgMacro, diag::note_macro_expansion_here) + << ArgMacro->getIdentifierInfo(); DiscardUntilEndOfDirective(); return; default: @@ -1756,6 +1760,7 @@ void Preprocessor::HandleIncludeDirective(SourceLocation HashLoc, // Search include directories. bool IsMapped = false; + bool IsFrameworkFound = false; const DirectoryLookup *CurDir; SmallString<1024> SearchPath; SmallString<1024> RelativePath; @@ -1774,7 +1779,7 @@ void Preprocessor::HandleIncludeDirective(SourceLocation HashLoc, FilenameLoc, LangOpts.MSVCCompat ? NormalizedPath.c_str() : Filename, isAngled, LookupFrom, LookupFromFile, CurDir, Callbacks ? &SearchPath : nullptr, Callbacks ? &RelativePath : nullptr, - &SuggestedModule, &IsMapped); + &SuggestedModule, &IsMapped, &IsFrameworkFound); if (!File) { if (Callbacks) { @@ -1791,7 +1796,8 @@ void Preprocessor::HandleIncludeDirective(SourceLocation HashLoc, FilenameLoc, LangOpts.MSVCCompat ? NormalizedPath.c_str() : Filename, isAngled, LookupFrom, LookupFromFile, CurDir, nullptr, nullptr, - &SuggestedModule, &IsMapped, /*SkipCache*/ true); + &SuggestedModule, &IsMapped, /*IsFrameworkFound=*/nullptr, + /*SkipCache*/ true); } } } @@ -1806,7 +1812,8 @@ void Preprocessor::HandleIncludeDirective(SourceLocation HashLoc, LangOpts.MSVCCompat ? NormalizedPath.c_str() : Filename, false, LookupFrom, LookupFromFile, CurDir, Callbacks ? &SearchPath : nullptr, - Callbacks ? &RelativePath : nullptr, &SuggestedModule, &IsMapped); + Callbacks ? &RelativePath : nullptr, &SuggestedModule, &IsMapped, + /*IsFrameworkFound=*/nullptr); if (File) { SourceRange Range(FilenameTok.getLocation(), CharEnd); Diag(FilenameTok, diag::err_pp_file_not_found_angled_include_not_fatal) << @@ -1842,7 +1849,8 @@ void Preprocessor::HandleIncludeDirective(SourceLocation HashLoc, : TypoCorrectionName, isAngled, LookupFrom, LookupFromFile, CurDir, Callbacks ? &SearchPath : nullptr, - Callbacks ? &RelativePath : nullptr, &SuggestedModule, &IsMapped); + Callbacks ? &RelativePath : nullptr, &SuggestedModule, &IsMapped, + /*IsFrameworkFound=*/nullptr); if (File) { SourceRange Range(FilenameTok.getLocation(), CharEnd); auto Hint = isAngled @@ -1859,9 +1867,22 @@ void Preprocessor::HandleIncludeDirective(SourceLocation HashLoc, } // If the file is still not found, just go with the vanilla diagnostic - if (!File) + if (!File) { Diag(FilenameTok, diag::err_pp_file_not_found) << OriginalFilename << FilenameRange; + if (IsFrameworkFound) { + size_t SlashPos = OriginalFilename.find('/'); + assert(SlashPos != StringRef::npos && + "Include with framework name should have '/' in the filename"); + StringRef FrameworkName = OriginalFilename.substr(0, SlashPos); + FrameworkCacheEntry &CacheEntry = + HeaderInfo.LookupFrameworkCache(FrameworkName); + assert(CacheEntry.Directory && "Found framework should be in cache"); + Diag(FilenameTok, diag::note_pp_framework_without_header) + << OriginalFilename.substr(SlashPos + 1) << FrameworkName + << CacheEntry.Directory->getName(); + } + } } } diff --git a/clang/lib/Lex/PPMacroExpansion.cpp b/clang/lib/Lex/PPMacroExpansion.cpp index 00bc7aa888ae9..5394caf963241 100644 --- a/clang/lib/Lex/PPMacroExpansion.cpp +++ b/clang/lib/Lex/PPMacroExpansion.cpp @@ -1,4 +1,4 @@ -//===--- MacroExpansion.cpp - Top level Macro Expansion -------------------===// +//===--- PPMacroExpansion.cpp - Top level Macro Expansion -----------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -492,10 +492,13 @@ bool Preprocessor::HandleMacroExpandedIdentifier(Token &Identifier, // Preprocessor directives used inside macro arguments are not portable, and // this enables the warning. InMacroArgs = true; + ArgMacro = &Identifier; + Args = ReadMacroCallArgumentList(Identifier, MI, ExpansionEnd); // Finished parsing args. InMacroArgs = false; + ArgMacro = nullptr; // If there was an error parsing the arguments, bail out. if (!Args) return true; @@ -1235,7 +1238,7 @@ static bool EvaluateHasIncludeCommon(Token &Tok, const DirectoryLookup *CurDir; const FileEntry *File = PP.LookupFile(FilenameLoc, Filename, isAngled, LookupFrom, LookupFromFile, - CurDir, nullptr, nullptr, nullptr, nullptr); + CurDir, nullptr, nullptr, nullptr, nullptr, nullptr); if (PPCallbacks *Callbacks = PP.getPPCallbacks()) { SrcMgr::CharacteristicKind FileType = SrcMgr::C_User; diff --git a/clang/lib/Lex/Pragma.cpp b/clang/lib/Lex/Pragma.cpp index 41d170e0d748b..c82b53173721b 100644 --- a/clang/lib/Lex/Pragma.cpp +++ b/clang/lib/Lex/Pragma.cpp @@ -506,7 +506,7 @@ void Preprocessor::HandlePragmaDependency(Token &DependencyTok) { const DirectoryLookup *CurDir; const FileEntry *File = LookupFile(FilenameTok.getLocation(), Filename, isAngled, nullptr, - nullptr, CurDir, nullptr, nullptr, nullptr, nullptr); + nullptr, CurDir, nullptr, nullptr, nullptr, nullptr, nullptr); if (!File) { if (!SuppressIncludeNotFoundError) Diag(FilenameTok, diag::err_pp_file_not_found) << Filename; diff --git a/clang/lib/Lex/Preprocessor.cpp b/clang/lib/Lex/Preprocessor.cpp index 2952c6408d212..0179668f131da 100644 --- a/clang/lib/Lex/Preprocessor.cpp +++ b/clang/lib/Lex/Preprocessor.cpp @@ -1,4 +1,4 @@ -//===- Preprocess.cpp - C Language Family Preprocessor Implementation -----===// +//===- Preprocessor.cpp - C Language Family Preprocessor Implementation ---===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -102,6 +102,7 @@ Preprocessor::Preprocessor(std::shared_ptr PPOpts, DisableMacroExpansion = false; MacroExpansionInDirectivesOverride = false; InMacroArgs = false; + ArgMacro = nullptr; InMacroArgPreExpansion = false; NumCachedTokenLexers = 0; PragmasEnabled = true; @@ -566,7 +567,8 @@ void Preprocessor::EnterMainSourceFile() { SourceLocation(), PPOpts->PCHThroughHeader, /*isAngled=*/false, /*FromDir=*/nullptr, /*FromFile=*/nullptr, CurDir, /*SearchPath=*/nullptr, /*RelativePath=*/nullptr, - /*SuggestedModule=*/nullptr, /*IsMapped=*/nullptr); + /*SuggestedModule=*/nullptr, /*IsMapped=*/nullptr, + /*IsFrameworkFound=*/nullptr); if (!File) { Diag(SourceLocation(), diag::err_pp_through_header_not_found) << PPOpts->PCHThroughHeader; diff --git a/clang/lib/Parse/ParseAST.cpp b/clang/lib/Parse/ParseAST.cpp index 1e88043587093..f131d919d91a5 100644 --- a/clang/lib/Parse/ParseAST.cpp +++ b/clang/lib/Parse/ParseAST.cpp @@ -166,7 +166,7 @@ void clang::ParseAST(Sema &S, bool PrintStats, bool SkipFunctionBodies) { for (Decl *D : S.WeakTopLevelDecls()) Consumer->HandleTopLevelDecl(DeclGroupRef(D)); - if (S.getLangOpts().SYCL) { + if (S.getLangOpts().SYCLIsDevice) { for (Decl *D : S.SyclKernels()) { Consumer->HandleTopLevelDecl(DeclGroupRef(D)); } diff --git a/clang/lib/Parse/ParseDecl.cpp b/clang/lib/Parse/ParseDecl.cpp index a3080e64b001c..84d79d9a47348 100644 --- a/clang/lib/Parse/ParseDecl.cpp +++ b/clang/lib/Parse/ParseDecl.cpp @@ -2332,25 +2332,27 @@ Decl *Parser::ParseDeclarationAfterDeclaratorAndAttributes( InitializerScopeRAII InitScope(*this, D, ThisDecl); - llvm::function_ref ExprListCompleter; auto ThisVarDecl = dyn_cast_or_null(ThisDecl); - auto ConstructorCompleter = [&, ThisVarDecl] { + auto RunSignatureHelp = [&]() { QualType PreferredType = Actions.ProduceConstructorSignatureHelp( getCurScope(), ThisVarDecl->getType()->getCanonicalTypeInternal(), ThisDecl->getLocation(), Exprs, T.getOpenLocation()); CalledSignatureHelp = true; - Actions.CodeCompleteExpression(getCurScope(), PreferredType); + return PreferredType; }; + auto SetPreferredType = [&] { + PreferredType.enterFunctionArgument(Tok.getLocation(), RunSignatureHelp); + }; + + llvm::function_ref ExpressionStarts; if (ThisVarDecl) { // ParseExpressionList can sometimes succeed even when ThisDecl is not // VarDecl. This is an error and it is reported in a call to // Actions.ActOnInitializerError(). However, we call - // ProduceConstructorSignatureHelp only on VarDecls, falling back to - // default completer in other cases. - ExprListCompleter = ConstructorCompleter; + // ProduceConstructorSignatureHelp only on VarDecls. + ExpressionStarts = SetPreferredType; } - - if (ParseExpressionList(Exprs, CommaLocs, ExprListCompleter)) { + if (ParseExpressionList(Exprs, CommaLocs, ExpressionStarts)) { if (ThisVarDecl && PP.isCodeCompletionReached() && !CalledSignatureHelp) { Actions.ProduceConstructorSignatureHelp( getCurScope(), ThisVarDecl->getType()->getCanonicalTypeInternal(), @@ -3809,19 +3811,6 @@ void Parser::ParseDeclarationSpecifiers(DeclSpec &DS, getLangOpts()); break; - // OpenCL access qualifiers: - case tok::kw___read_only: - case tok::kw___write_only: - case tok::kw___read_write: - // OpenCL C++ 1.0 s2.2: access qualifiers are reserved keywords. - if (Actions.getLangOpts().OpenCLCPlusPlus) { - DiagID = diag::err_openclcxx_reserved; - PrevSpec = Tok.getIdentifierInfo()->getNameStart(); - isInvalid = true; - } - ParseOpenCLQualifiers(DS.getAttributes()); - break; - // OpenCL address space qualifiers: case tok::kw___generic: // generic address space is introduced only in OpenCL v2.0 @@ -3838,6 +3827,10 @@ void Parser::ParseDeclarationSpecifiers(DeclSpec &DS, case tok::kw___global: case tok::kw___local: case tok::kw___constant: + // OpenCL access qualifiers: + case tok::kw___read_only: + case tok::kw___write_only: + case tok::kw___read_write: ParseOpenCLQualifiers(DS.getAttributes()); break; diff --git a/clang/lib/Parse/ParseDeclCXX.cpp b/clang/lib/Parse/ParseDeclCXX.cpp index a8d5e28caee48..895aa02c79dec 100644 --- a/clang/lib/Parse/ParseDeclCXX.cpp +++ b/clang/lib/Parse/ParseDeclCXX.cpp @@ -3481,20 +3481,20 @@ MemInitResult Parser::ParseMemInitializer(Decl *ConstructorDecl) { // Parse the optional expression-list. ExprVector ArgExprs; CommaLocsTy CommaLocs; + auto RunSignatureHelp = [&] { + QualType PreferredType = Actions.ProduceCtorInitMemberSignatureHelp( + getCurScope(), ConstructorDecl, SS, TemplateTypeTy, ArgExprs, II, + T.getOpenLocation()); + CalledSignatureHelp = true; + return PreferredType; + }; if (Tok.isNot(tok::r_paren) && ParseExpressionList(ArgExprs, CommaLocs, [&] { - QualType PreferredType = Actions.ProduceCtorInitMemberSignatureHelp( - getCurScope(), ConstructorDecl, SS, TemplateTypeTy, ArgExprs, II, - T.getOpenLocation()); - CalledSignatureHelp = true; - Actions.CodeCompleteExpression(getCurScope(), PreferredType); + PreferredType.enterFunctionArgument(Tok.getLocation(), + RunSignatureHelp); })) { - if (PP.isCodeCompletionReached() && !CalledSignatureHelp) { - Actions.ProduceCtorInitMemberSignatureHelp( - getCurScope(), ConstructorDecl, SS, TemplateTypeTy, ArgExprs, II, - T.getOpenLocation()); - CalledSignatureHelp = true; - } + if (PP.isCodeCompletionReached() && !CalledSignatureHelp) + RunSignatureHelp(); SkipUntil(tok::r_paren, StopAtSemi); return true; } diff --git a/clang/lib/Parse/ParseExpr.cpp b/clang/lib/Parse/ParseExpr.cpp index 1146afd134c68..575d32d8e787b 100644 --- a/clang/lib/Parse/ParseExpr.cpp +++ b/clang/lib/Parse/ParseExpr.cpp @@ -1658,34 +1658,25 @@ Parser::ParsePostfixExpressionSuffix(ExprResult LHS) { ExprVector ArgExprs; CommaLocsTy CommaLocs; - - if (Tok.is(tok::code_completion)) { + auto RunSignatureHelp = [&]() -> QualType { QualType PreferredType = Actions.ProduceCallSignatureHelp( - getCurScope(), LHS.get(), None, PT.getOpenLocation()); + getCurScope(), LHS.get(), ArgExprs, PT.getOpenLocation()); CalledSignatureHelp = true; - Actions.CodeCompleteExpression(getCurScope(), PreferredType); - cutOffParsing(); - return ExprError(); - } - + return PreferredType; + }; if (OpKind == tok::l_paren || !LHS.isInvalid()) { if (Tok.isNot(tok::r_paren)) { if (ParseExpressionList(ArgExprs, CommaLocs, [&] { - QualType PreferredType = Actions.ProduceCallSignatureHelp( - getCurScope(), LHS.get(), ArgExprs, PT.getOpenLocation()); - CalledSignatureHelp = true; - Actions.CodeCompleteExpression(getCurScope(), PreferredType); + PreferredType.enterFunctionArgument(Tok.getLocation(), + RunSignatureHelp); })) { (void)Actions.CorrectDelayedTyposInExpr(LHS); // If we got an error when parsing expression list, we don't call // the CodeCompleteCall handler inside the parser. So call it here // to make sure we get overload suggestions even when we are in the // middle of a parameter. - if (PP.isCodeCompletionReached() && !CalledSignatureHelp) { - Actions.ProduceCallSignatureHelp(getCurScope(), LHS.get(), - ArgExprs, PT.getOpenLocation()); - CalledSignatureHelp = true; - } + if (PP.isCodeCompletionReached() && !CalledSignatureHelp) + RunSignatureHelp(); LHS = ExprError(); } else if (LHS.isInvalid()) { for (auto &E : ArgExprs) @@ -2856,18 +2847,11 @@ ExprResult Parser::ParseFoldExpression(ExprResult LHS, /// \endverbatim bool Parser::ParseExpressionList(SmallVectorImpl &Exprs, SmallVectorImpl &CommaLocs, - llvm::function_ref Completer) { + llvm::function_ref ExpressionStarts) { bool SawError = false; while (1) { - if (Tok.is(tok::code_completion)) { - if (Completer) - Completer(); - else - Actions.CodeCompleteExpression(getCurScope(), - PreferredType.get(Tok.getLocation())); - cutOffParsing(); - return true; - } + if (ExpressionStarts) + ExpressionStarts(); ExprResult Expr; if (getLangOpts().CPlusPlus11 && Tok.is(tok::l_brace)) { diff --git a/clang/lib/Parse/ParseExprCXX.cpp b/clang/lib/Parse/ParseExprCXX.cpp index 6ef24058a16af..94055d4045280 100644 --- a/clang/lib/Parse/ParseExprCXX.cpp +++ b/clang/lib/Parse/ParseExprCXX.cpp @@ -1677,20 +1677,21 @@ Parser::ParseCXXTypeConstructExpression(const DeclSpec &DS) { ExprVector Exprs; CommaLocsTy CommaLocs; + auto RunSignatureHelp = [&]() { + QualType PreferredType = Actions.ProduceConstructorSignatureHelp( + getCurScope(), TypeRep.get()->getCanonicalTypeInternal(), + DS.getEndLoc(), Exprs, T.getOpenLocation()); + CalledSignatureHelp = true; + return PreferredType; + }; + if (Tok.isNot(tok::r_paren)) { if (ParseExpressionList(Exprs, CommaLocs, [&] { - QualType PreferredType = Actions.ProduceConstructorSignatureHelp( - getCurScope(), TypeRep.get()->getCanonicalTypeInternal(), - DS.getEndLoc(), Exprs, T.getOpenLocation()); - CalledSignatureHelp = true; - Actions.CodeCompleteExpression(getCurScope(), PreferredType); + PreferredType.enterFunctionArgument(Tok.getLocation(), + RunSignatureHelp); })) { - if (PP.isCodeCompletionReached() && !CalledSignatureHelp) { - Actions.ProduceConstructorSignatureHelp( - getCurScope(), TypeRep.get()->getCanonicalTypeInternal(), - DS.getEndLoc(), Exprs, T.getOpenLocation()); - CalledSignatureHelp = true; - } + if (PP.isCodeCompletionReached() && !CalledSignatureHelp) + RunSignatureHelp(); SkipUntil(tok::r_paren, StopAtSemi); return ExprError(); } @@ -1998,6 +1999,13 @@ void Parser::ParseCXXSimpleTypeSpecifier(DeclSpec &DS) { case tok::kw_bool: DS.SetTypeSpecType(DeclSpec::TST_bool, Loc, PrevSpec, DiagID, Policy); break; +#define GENERIC_IMAGE_TYPE(ImgType, Id) \ + case tok::kw_##ImgType##_t: \ + DS.SetTypeSpecType(DeclSpec::TST_##ImgType##_t, Loc, PrevSpec, DiagID, \ + Policy); \ + break; +#include "clang/Basic/OpenCLImageTypes.def" + case tok::annot_decltype: case tok::kw_decltype: DS.SetRangeEnd(ParseDecltypeSpecifier(DS)); @@ -2839,23 +2847,21 @@ Parser::ParseCXXNewExpression(bool UseGlobal, SourceLocation Start) { ConstructorLParen = T.getOpenLocation(); if (Tok.isNot(tok::r_paren)) { CommaLocsTy CommaLocs; + auto RunSignatureHelp = [&]() { + ParsedType TypeRep = + Actions.ActOnTypeName(getCurScope(), DeclaratorInfo).get(); + QualType PreferredType = Actions.ProduceConstructorSignatureHelp( + getCurScope(), TypeRep.get()->getCanonicalTypeInternal(), + DeclaratorInfo.getEndLoc(), ConstructorArgs, ConstructorLParen); + CalledSignatureHelp = true; + return PreferredType; + }; if (ParseExpressionList(ConstructorArgs, CommaLocs, [&] { - ParsedType TypeRep = - Actions.ActOnTypeName(getCurScope(), DeclaratorInfo).get(); - QualType PreferredType = Actions.ProduceConstructorSignatureHelp( - getCurScope(), TypeRep.get()->getCanonicalTypeInternal(), - DeclaratorInfo.getEndLoc(), ConstructorArgs, ConstructorLParen); - CalledSignatureHelp = true; - Actions.CodeCompleteExpression(getCurScope(), PreferredType); + PreferredType.enterFunctionArgument(Tok.getLocation(), + RunSignatureHelp); })) { - if (PP.isCodeCompletionReached() && !CalledSignatureHelp) { - ParsedType TypeRep = - Actions.ActOnTypeName(getCurScope(), DeclaratorInfo).get(); - Actions.ProduceConstructorSignatureHelp( - getCurScope(), TypeRep.get()->getCanonicalTypeInternal(), - DeclaratorInfo.getEndLoc(), ConstructorArgs, ConstructorLParen); - CalledSignatureHelp = true; - } + if (PP.isCodeCompletionReached() && !CalledSignatureHelp) + RunSignatureHelp(); SkipUntil(tok::semi, StopAtSemi | StopBeforeMatch); return ExprError(); } diff --git a/clang/lib/Parse/ParseObjc.cpp b/clang/lib/Parse/ParseObjc.cpp index 0a1dbf7bff3ef..5ac01f6f0a489 100644 --- a/clang/lib/Parse/ParseObjc.cpp +++ b/clang/lib/Parse/ParseObjc.cpp @@ -2703,7 +2703,8 @@ Decl *Parser::ParseObjCMethodDefinition() { return MDecl; } -StmtResult Parser::ParseObjCAtStatement(SourceLocation AtLoc) { +StmtResult Parser::ParseObjCAtStatement(SourceLocation AtLoc, + ParsedStmtContext StmtCtx) { if (Tok.is(tok::code_completion)) { Actions.CodeCompleteObjCAtStatement(getCurScope()); cutOffParsing(); @@ -2740,7 +2741,7 @@ StmtResult Parser::ParseObjCAtStatement(SourceLocation AtLoc) { // Otherwise, eat the semicolon. ExpectAndConsumeSemi(diag::err_expected_semi_after_expr); - return Actions.ActOnExprStmt(Res, isExprValueDiscarded()); + return handleExprStmt(Res, StmtCtx); } ExprResult Parser::ParseObjCAtExpression(SourceLocation AtLoc) { diff --git a/clang/lib/Parse/ParseOpenMP.cpp b/clang/lib/Parse/ParseOpenMP.cpp index 5b8670e928b15..274073041c7e3 100644 --- a/clang/lib/Parse/ParseOpenMP.cpp +++ b/clang/lib/Parse/ParseOpenMP.cpp @@ -424,21 +424,19 @@ void Parser::ParseOpenMPReductionInitializerForDecl(VarDecl *OmpPrivParm) { CommaLocsTy CommaLocs; SourceLocation LParLoc = T.getOpenLocation(); - if (ParseExpressionList( - Exprs, CommaLocs, [this, OmpPrivParm, LParLoc, &Exprs] { - QualType PreferredType = Actions.ProduceConstructorSignatureHelp( - getCurScope(), - OmpPrivParm->getType()->getCanonicalTypeInternal(), - OmpPrivParm->getLocation(), Exprs, LParLoc); - CalledSignatureHelp = true; - Actions.CodeCompleteExpression(getCurScope(), PreferredType); - })) { - if (PP.isCodeCompletionReached() && !CalledSignatureHelp) { - Actions.ProduceConstructorSignatureHelp( - getCurScope(), OmpPrivParm->getType()->getCanonicalTypeInternal(), - OmpPrivParm->getLocation(), Exprs, LParLoc); - CalledSignatureHelp = true; - } + auto RunSignatureHelp = [this, OmpPrivParm, LParLoc, &Exprs]() { + QualType PreferredType = Actions.ProduceConstructorSignatureHelp( + getCurScope(), OmpPrivParm->getType()->getCanonicalTypeInternal(), + OmpPrivParm->getLocation(), Exprs, LParLoc); + CalledSignatureHelp = true; + return PreferredType; + }; + if (ParseExpressionList(Exprs, CommaLocs, [&] { + PreferredType.enterFunctionArgument(Tok.getLocation(), + RunSignatureHelp); + })) { + if (PP.isCodeCompletionReached() && !CalledSignatureHelp) + RunSignatureHelp(); Actions.ActOnInitializerError(OmpPrivParm); SkipUntil(tok::r_paren, tok::annot_pragma_openmp_end, StopBeforeMatch); } else { @@ -893,7 +891,7 @@ Parser::DeclGroupPtrTy Parser::ParseOpenMPDeclarativeDirectiveWithExtDecl( SmallVector, OMPC_unknown + 1> FirstClauses(OMPC_unknown + 1); if (Tok.is(tok::annot_pragma_openmp_end)) { - Diag(Tok, diag::err_omp_expected_clause) + Diag(Tok, diag::err_omp_expected_clause) << getOpenMPDirectiveName(OMPD_requires); break; } @@ -1132,8 +1130,8 @@ Parser::DeclGroupPtrTy Parser::ParseOpenMPDeclarativeDirectiveWithExtDecl( /// 'target teams distribute simd' {clause} /// annot_pragma_openmp_end /// -StmtResult Parser::ParseOpenMPDeclarativeOrExecutableDirective( - AllowedConstructsKind Allowed) { +StmtResult +Parser::ParseOpenMPDeclarativeOrExecutableDirective(ParsedStmtContext StmtCtx) { assert(Tok.is(tok::annot_pragma_openmp) && "Not an OpenMP directive!"); ParenBraceBracketBalancer BalancerRAIIObj(*this); SmallVector Clauses; @@ -1152,7 +1150,9 @@ StmtResult Parser::ParseOpenMPDeclarativeOrExecutableDirective( switch (DKind) { case OMPD_threadprivate: { - if (Allowed != ACK_Any) { + // FIXME: Should this be permitted in C++? + if ((StmtCtx & ParsedStmtContext::AllowDeclarationsInC) == + ParsedStmtContext()) { Diag(Tok, diag::err_omp_immediate_directive) << getOpenMPDirectiveName(DKind) << 0; } @@ -1219,7 +1219,8 @@ StmtResult Parser::ParseOpenMPDeclarativeOrExecutableDirective( case OMPD_target_enter_data: case OMPD_target_exit_data: case OMPD_target_update: - if (Allowed == ACK_StatementsOpenMPNonStandalone) { + if ((StmtCtx & ParsedStmtContext::AllowStandaloneOpenMPDirectives) == + ParsedStmtContext()) { Diag(Tok, diag::err_omp_immediate_directive) << getOpenMPDirectiveName(DKind) << 0; } @@ -1322,7 +1323,8 @@ StmtResult Parser::ParseOpenMPDeclarativeOrExecutableDirective( // If the depend clause is specified, the ordered construct is a stand-alone // directive. if (DKind == OMPD_ordered && FirstClauses[OMPC_depend].getInt()) { - if (Allowed == ACK_StatementsOpenMPNonStandalone) { + if ((StmtCtx & ParsedStmtContext::AllowStandaloneOpenMPDirectives) == + ParsedStmtContext()) { Diag(Loc, diag::err_omp_immediate_directive) << getOpenMPDirectiveName(DKind) << 1 << getOpenMPClauseName(OMPC_depend); @@ -1955,38 +1957,70 @@ static OpenMPMapModifierKind isMapModifier(Parser &P) { return TypeModifier; } +/// Parse the mapper modifier in map, to, and from clauses. +bool Parser::parseMapperModifier(OpenMPVarListDataTy &Data) { + // Parse '('. + BalancedDelimiterTracker T(*this, tok::l_paren, tok::colon); + if (T.expectAndConsume(diag::err_expected_lparen_after, "mapper")) { + SkipUntil(tok::colon, tok::r_paren, tok::annot_pragma_openmp_end, + StopBeforeMatch); + return true; + } + // Parse mapper-identifier + if (getLangOpts().CPlusPlus) + ParseOptionalCXXScopeSpecifier(Data.ReductionOrMapperIdScopeSpec, + /*ObjectType=*/nullptr, + /*EnteringContext=*/false); + if (Tok.isNot(tok::identifier) && Tok.isNot(tok::kw_default)) { + Diag(Tok.getLocation(), diag::err_omp_mapper_illegal_identifier); + SkipUntil(tok::colon, tok::r_paren, tok::annot_pragma_openmp_end, + StopBeforeMatch); + return true; + } + auto &DeclNames = Actions.getASTContext().DeclarationNames; + Data.ReductionOrMapperId = DeclarationNameInfo( + DeclNames.getIdentifier(Tok.getIdentifierInfo()), Tok.getLocation()); + ConsumeToken(); + // Parse ')'. + return T.consumeClose(); +} + /// Parse map-type-modifiers in map clause. /// map([ [map-type-modifier[,] [map-type-modifier[,] ...] map-type : ] list) -/// where, map-type-modifier ::= always | close -static void parseMapTypeModifiers(Parser &P, - Parser::OpenMPVarListDataTy &Data) { - Preprocessor &PP = P.getPreprocessor(); - while (P.getCurToken().isNot(tok::colon)) { - Token Tok = P.getCurToken(); - OpenMPMapModifierKind TypeModifier = isMapModifier(P); +/// where, map-type-modifier ::= always | close | mapper(mapper-identifier) +bool Parser::parseMapTypeModifiers(OpenMPVarListDataTy &Data) { + while (getCurToken().isNot(tok::colon)) { + OpenMPMapModifierKind TypeModifier = isMapModifier(*this); if (TypeModifier == OMPC_MAP_MODIFIER_always || TypeModifier == OMPC_MAP_MODIFIER_close) { Data.MapTypeModifiers.push_back(TypeModifier); Data.MapTypeModifiersLoc.push_back(Tok.getLocation()); - P.ConsumeToken(); + ConsumeToken(); + } else if (TypeModifier == OMPC_MAP_MODIFIER_mapper) { + Data.MapTypeModifiers.push_back(TypeModifier); + Data.MapTypeModifiersLoc.push_back(Tok.getLocation()); + ConsumeToken(); + if (parseMapperModifier(Data)) + return true; } else { // For the case of unknown map-type-modifier or a map-type. // Map-type is followed by a colon; the function returns when it // encounters a token followed by a colon. if (Tok.is(tok::comma)) { - P.Diag(Tok, diag::err_omp_map_type_modifier_missing); - P.ConsumeToken(); + Diag(Tok, diag::err_omp_map_type_modifier_missing); + ConsumeToken(); continue; } // Potential map-type token as it is followed by a colon. if (PP.LookAhead(0).is(tok::colon)) - return; - P.Diag(Tok, diag::err_omp_unknown_map_type_modifier); - P.ConsumeToken(); + return false; + Diag(Tok, diag::err_omp_unknown_map_type_modifier); + ConsumeToken(); } - if (P.getCurToken().is(tok::comma)) - P.ConsumeToken(); + if (getCurToken().is(tok::comma)) + ConsumeToken(); } + return false; } /// Checks if the token is a valid map-type. @@ -2003,7 +2037,7 @@ static OpenMPMapClauseKind isMapType(Parser &P) { /// Parse map-type in map clause. /// map([ [map-type-modifier[,] [map-type-modifier[,] ...] map-type : ] list) -/// where, map-type ::= to | from | tofrom | alloc | release | delete +/// where, map-type ::= to | from | tofrom | alloc | release | delete static void parseMapType(Parser &P, Parser::OpenMPVarListDataTy &Data) { Token Tok = P.getCurToken(); if (Tok.is(tok::colon)) { @@ -2023,6 +2057,7 @@ bool Parser::ParseOpenMPVarList(OpenMPDirectiveKind DKind, OpenMPVarListDataTy &Data) { UnqualifiedId UnqualifiedReductionId; bool InvalidReductionId = false; + bool IsInvalidMapperModifier = false; // Parse '('. BalancedDelimiterTracker T(*this, tok::l_paren, tok::annot_pragma_openmp_end); @@ -2038,11 +2073,11 @@ bool Parser::ParseOpenMPVarList(OpenMPDirectiveKind DKind, Kind == OMPC_in_reduction) { ColonProtectionRAIIObject ColonRAII(*this); if (getLangOpts().CPlusPlus) - ParseOptionalCXXScopeSpecifier(Data.ReductionIdScopeSpec, + ParseOptionalCXXScopeSpecifier(Data.ReductionOrMapperIdScopeSpec, /*ObjectType=*/nullptr, /*EnteringContext=*/false); - InvalidReductionId = ParseReductionId(*this, Data.ReductionIdScopeSpec, - UnqualifiedReductionId); + InvalidReductionId = ParseReductionId( + *this, Data.ReductionOrMapperIdScopeSpec, UnqualifiedReductionId); if (InvalidReductionId) { SkipUntil(tok::colon, tok::r_paren, tok::annot_pragma_openmp_end, StopBeforeMatch); @@ -2052,7 +2087,7 @@ bool Parser::ParseOpenMPVarList(OpenMPDirectiveKind DKind, else Diag(Tok, diag::warn_pragma_expected_colon) << "reduction identifier"; if (!InvalidReductionId) - Data.ReductionId = + Data.ReductionOrMapperId = Actions.GetNameFromUnqualifiedId(UnqualifiedReductionId); } else if (Kind == OMPC_depend) { // Handle dependency type for depend clause. @@ -2111,8 +2146,11 @@ bool Parser::ParseOpenMPVarList(OpenMPDirectiveKind DKind, // Only parse map-type-modifier[s] and map-type if a colon is present in // the map clause. if (ColonPresent) { - parseMapTypeModifiers(*this, Data); - parseMapType(*this, Data); + IsInvalidMapperModifier = parseMapTypeModifiers(Data); + if (!IsInvalidMapperModifier) + parseMapType(*this, Data); + else + SkipUntil(tok::colon, tok::annot_pragma_openmp_end, StopBeforeMatch); } if (Data.MapType == OMPC_MAP_unknown) { Data.MapType = OMPC_MAP_tofrom; @@ -2121,6 +2159,35 @@ bool Parser::ParseOpenMPVarList(OpenMPDirectiveKind DKind, if (Tok.is(tok::colon)) Data.ColonLoc = ConsumeToken(); + } else if (Kind == OMPC_to || Kind == OMPC_from) { + if (Tok.is(tok::identifier)) { + bool IsMapperModifier = false; + if (Kind == OMPC_to) { + auto Modifier = static_cast( + getOpenMPSimpleClauseType(Kind, PP.getSpelling(Tok))); + if (Modifier == OMPC_TO_MODIFIER_mapper) + IsMapperModifier = true; + } else { + auto Modifier = static_cast( + getOpenMPSimpleClauseType(Kind, PP.getSpelling(Tok))); + if (Modifier == OMPC_FROM_MODIFIER_mapper) + IsMapperModifier = true; + } + if (IsMapperModifier) { + // Parse the mapper modifier. + ConsumeToken(); + IsInvalidMapperModifier = parseMapperModifier(Data); + if (Tok.isNot(tok::colon)) { + if (!IsInvalidMapperModifier) + Diag(Tok, diag::warn_pragma_expected_colon) << ")"; + SkipUntil(tok::colon, tok::r_paren, tok::annot_pragma_openmp_end, + StopBeforeMatch); + } + // Consume ':'. + if (Tok.is(tok::colon)) + ConsumeToken(); + } + } } bool IsComma = @@ -2181,7 +2248,8 @@ bool Parser::ParseOpenMPVarList(OpenMPDirectiveKind DKind, return (Kind == OMPC_depend && Data.DepKind != OMPC_DEPEND_unknown && Vars.empty()) || (Kind != OMPC_depend && Kind != OMPC_map && Vars.empty()) || - (MustHaveTail && !Data.TailExpr) || InvalidReductionId; + (MustHaveTail && !Data.TailExpr) || InvalidReductionId || + IsInvalidMapperModifier; } /// Parsing of OpenMP clause 'private', 'firstprivate', 'lastprivate', @@ -2214,11 +2282,12 @@ bool Parser::ParseOpenMPVarList(OpenMPDirectiveKind DKind, /// 'depend' '(' in | out | inout : list | source ')' /// map-clause: /// 'map' '(' [ [ always [,] ] [ close [,] ] +/// [ mapper '(' mapper-identifier ')' [,] ] /// to | from | tofrom | alloc | release | delete ':' ] list ')'; /// to-clause: -/// 'to' '(' list ')' +/// 'to' '(' [ mapper '(' mapper-identifier ')' ':' ] list ')' /// from-clause: -/// 'from' '(' list ')' +/// 'from' '(' [ mapper '(' mapper-identifier ')' ':' ] list ')' /// use_device_ptr-clause: /// 'use_device_ptr' '(' list ')' /// is_device_ptr-clause: @@ -2241,10 +2310,11 @@ OMPClause *Parser::ParseOpenMPVarListClause(OpenMPDirectiveKind DKind, if (ParseOnly) return nullptr; + OMPVarListLocTy Locs(Loc, LOpen, Data.RLoc); return Actions.ActOnOpenMPVarListClause( - Kind, Vars, Data.TailExpr, Loc, LOpen, Data.ColonLoc, Data.RLoc, - Data.ReductionIdScopeSpec, Data.ReductionId, Data.DepKind, Data.LinKind, - Data.MapTypeModifiers, Data.MapTypeModifiersLoc, Data.MapType, - Data.IsMapTypeImplicit, Data.DepLinMapLoc); + Kind, Vars, Data.TailExpr, Locs, Data.ColonLoc, + Data.ReductionOrMapperIdScopeSpec, Data.ReductionOrMapperId, Data.DepKind, + Data.LinKind, Data.MapTypeModifiers, Data.MapTypeModifiersLoc, + Data.MapType, Data.IsMapTypeImplicit, Data.DepLinMapLoc); } diff --git a/clang/lib/Parse/ParsePragma.cpp b/clang/lib/Parse/ParsePragma.cpp index f0ac49f3d96e3..a0458fdbb73ff 100644 --- a/clang/lib/Parse/ParsePragma.cpp +++ b/clang/lib/Parse/ParsePragma.cpp @@ -692,13 +692,12 @@ void Parser::HandlePragmaOpenCLExtension() { if (Name == "all") { if (State == Disable) { Opt.disableAll(); - Opt.enableSupportedCore(getLangOpts().OpenCLVersion); + Opt.enableSupportedCore(getLangOpts()); } else { PP.Diag(NameLoc, diag::warn_pragma_expected_predicate) << 1; } } else if (State == Begin) { - if (!Opt.isKnown(Name) || - !Opt.isSupported(Name, getLangOpts().OpenCLVersion)) { + if (!Opt.isKnown(Name) || !Opt.isSupported(Name, getLangOpts())) { Opt.support(Name); } Actions.setCurrentOpenCLExtension(Name); @@ -708,9 +707,9 @@ void Parser::HandlePragmaOpenCLExtension() { Actions.setCurrentOpenCLExtension(""); } else if (!Opt.isKnown(Name)) PP.Diag(NameLoc, diag::warn_pragma_unknown_extension) << Ident; - else if (Opt.isSupportedExtension(Name, getLangOpts().OpenCLVersion)) + else if (Opt.isSupportedExtension(Name, getLangOpts())) Opt.enable(Name, State == Enable); - else if (Opt.isSupportedCore(Name, getLangOpts().OpenCLVersion)) + else if (Opt.isSupportedCore(Name, getLangOpts())) PP.Diag(NameLoc, diag::warn_pragma_extension_is_core) << Ident; else PP.Diag(NameLoc, diag::warn_pragma_unsupported_extension) << Ident; diff --git a/clang/lib/Parse/ParseStmt.cpp b/clang/lib/Parse/ParseStmt.cpp index 3fc29253f09b9..267003b518936 100644 --- a/clang/lib/Parse/ParseStmt.cpp +++ b/clang/lib/Parse/ParseStmt.cpp @@ -29,17 +29,14 @@ using namespace clang; /// Parse a standalone statement (for instance, as the body of an 'if', /// 'while', or 'for'). StmtResult Parser::ParseStatement(SourceLocation *TrailingElseLoc, - bool AllowOpenMPStandalone) { + ParsedStmtContext StmtCtx) { StmtResult Res; // We may get back a null statement if we found a #pragma. Keep going until // we get an actual statement. do { StmtVector Stmts; - Res = ParseStatementOrDeclaration( - Stmts, AllowOpenMPStandalone ? ACK_StatementsOpenMPAnyExecutable - : ACK_StatementsOpenMPNonStandalone, - TrailingElseLoc); + Res = ParseStatementOrDeclaration(Stmts, StmtCtx, TrailingElseLoc); } while (!Res.isInvalid() && !Res.get()); return Res; @@ -96,7 +93,7 @@ StmtResult Parser::ParseStatement(SourceLocation *TrailingElseLoc, /// StmtResult Parser::ParseStatementOrDeclaration(StmtVector &Stmts, - AllowedConstructsKind Allowed, + ParsedStmtContext StmtCtx, SourceLocation *TrailingElseLoc) { ParenBraceBracketBalancer BalancerRAIIObj(*this); @@ -107,7 +104,7 @@ Parser::ParseStatementOrDeclaration(StmtVector &Stmts, return StmtError(); StmtResult Res = ParseStatementOrDeclarationAfterAttributes( - Stmts, Allowed, TrailingElseLoc, Attrs); + Stmts, StmtCtx, TrailingElseLoc, Attrs); assert((Attrs.empty() || Res.isInvalid() || Res.isUsable()) && "attributes on empty statement"); @@ -147,10 +144,9 @@ class StatementFilterCCC : public CorrectionCandidateCallback { }; } -StmtResult -Parser::ParseStatementOrDeclarationAfterAttributes(StmtVector &Stmts, - AllowedConstructsKind Allowed, SourceLocation *TrailingElseLoc, - ParsedAttributesWithRange &Attrs) { +StmtResult Parser::ParseStatementOrDeclarationAfterAttributes( + StmtVector &Stmts, ParsedStmtContext StmtCtx, + SourceLocation *TrailingElseLoc, ParsedAttributesWithRange &Attrs) { const char *SemiError = nullptr; StmtResult Res; @@ -165,7 +161,7 @@ Parser::ParseStatementOrDeclarationAfterAttributes(StmtVector &Stmts, { ProhibitAttributes(Attrs); // TODO: is it correct? AtLoc = ConsumeToken(); // consume @ - return ParseObjCAtStatement(AtLoc); + return ParseObjCAtStatement(AtLoc, StmtCtx); } case tok::code_completion: @@ -177,7 +173,7 @@ Parser::ParseStatementOrDeclarationAfterAttributes(StmtVector &Stmts, Token Next = NextToken(); if (Next.is(tok::colon)) { // C99 6.8.1: labeled-statement // identifier ':' statement - return ParseLabeledStatement(Attrs); + return ParseLabeledStatement(Attrs, StmtCtx); } // Look up the identifier, and typo-correct it to a keyword if it's not @@ -207,7 +203,8 @@ Parser::ParseStatementOrDeclarationAfterAttributes(StmtVector &Stmts, default: { if ((getLangOpts().CPlusPlus || getLangOpts().MicrosoftExt || - Allowed == ACK_Any) && + (StmtCtx & ParsedStmtContext::AllowDeclarationsInC) != + ParsedStmtContext()) && isDeclarationStatement()) { SourceLocation DeclStart = Tok.getLocation(), DeclEnd; DeclGroupPtrTy Decl = ParseDeclaration(DeclaratorContext::BlockContext, @@ -220,13 +217,13 @@ Parser::ParseStatementOrDeclarationAfterAttributes(StmtVector &Stmts, return StmtError(); } - return ParseExprStatement(); + return ParseExprStatement(StmtCtx); } case tok::kw_case: // C99 6.8.1: labeled-statement - return ParseCaseStatement(); + return ParseCaseStatement(StmtCtx); case tok::kw_default: // C99 6.8.1: labeled-statement - return ParseDefaultStatement(); + return ParseDefaultStatement(StmtCtx); case tok::l_brace: // C99 6.8.2: compound-statement return ParseCompoundStatement(); @@ -363,7 +360,7 @@ Parser::ParseStatementOrDeclarationAfterAttributes(StmtVector &Stmts, case tok::annot_pragma_openmp: ProhibitAttributes(Attrs); - return ParseOpenMPDeclarativeOrExecutableDirective(Allowed); + return ParseOpenMPDeclarativeOrExecutableDirective(StmtCtx); case tok::annot_pragma_ms_pointers_to_members: ProhibitAttributes(Attrs); @@ -382,7 +379,7 @@ Parser::ParseStatementOrDeclarationAfterAttributes(StmtVector &Stmts, case tok::annot_pragma_loop_hint: ProhibitAttributes(Attrs); - return ParsePragmaLoopHint(Stmts, Allowed, TrailingElseLoc, Attrs); + return ParsePragmaLoopHint(Stmts, StmtCtx, TrailingElseLoc, Attrs); case tok::annot_pragma_dump: HandlePragmaDump(); @@ -407,7 +404,7 @@ Parser::ParseStatementOrDeclarationAfterAttributes(StmtVector &Stmts, } /// Parse an expression statement. -StmtResult Parser::ParseExprStatement() { +StmtResult Parser::ParseExprStatement(ParsedStmtContext StmtCtx) { // If a case keyword is missing, this is where it should be inserted. Token OldToken = Tok; @@ -433,12 +430,12 @@ StmtResult Parser::ParseExprStatement() { << FixItHint::CreateInsertion(OldToken.getLocation(), "case "); // Recover parsing as a case statement. - return ParseCaseStatement(/*MissingCase=*/true, Expr); + return ParseCaseStatement(StmtCtx, /*MissingCase=*/true, Expr); } // Otherwise, eat the semicolon. ExpectAndConsumeSemi(diag::err_expected_semi_after_expr); - return Actions.ActOnExprStmt(Expr, isExprValueDiscarded()); + return handleExprStmt(Expr, StmtCtx); } /// ParseSEHTryBlockCommon @@ -577,10 +574,15 @@ StmtResult Parser::ParseSEHLeaveStatement() { /// identifier ':' statement /// [GNU] identifier ':' attributes[opt] statement /// -StmtResult Parser::ParseLabeledStatement(ParsedAttributesWithRange &attrs) { +StmtResult Parser::ParseLabeledStatement(ParsedAttributesWithRange &attrs, + ParsedStmtContext StmtCtx) { assert(Tok.is(tok::identifier) && Tok.getIdentifierInfo() && "Not an identifier!"); + // The substatement is always a 'statement', not a 'declaration', but is + // otherwise in the same context as the labeled-statement. + StmtCtx &= ~ParsedStmtContext::AllowDeclarationsInC; + Token IdentTok = Tok; // Save the whole token. ConsumeToken(); // eat the identifier. @@ -610,9 +612,8 @@ StmtResult Parser::ParseLabeledStatement(ParsedAttributesWithRange &attrs) { // statement, but that doesn't work correctly (because ProhibitAttributes // can't handle GNU attributes), so only call it in the one case where // GNU attributes are allowed. - SubStmt = ParseStatementOrDeclarationAfterAttributes( - Stmts, /*Allowed=*/ACK_StatementsOpenMPNonStandalone, nullptr, - TempAttrs); + SubStmt = ParseStatementOrDeclarationAfterAttributes(Stmts, StmtCtx, + nullptr, TempAttrs); if (!TempAttrs.empty() && !SubStmt.isInvalid()) SubStmt = Actions.ProcessStmtAttributes(SubStmt.get(), TempAttrs, TempAttrs.Range); @@ -623,7 +624,7 @@ StmtResult Parser::ParseLabeledStatement(ParsedAttributesWithRange &attrs) { // If we've not parsed a statement yet, parse one now. if (!SubStmt.isInvalid() && !SubStmt.isUsable()) - SubStmt = ParseStatement(); + SubStmt = ParseStatement(nullptr, StmtCtx); // Broken substmt shouldn't prevent the label from being added to the AST. if (SubStmt.isInvalid()) @@ -643,9 +644,14 @@ StmtResult Parser::ParseLabeledStatement(ParsedAttributesWithRange &attrs) { /// 'case' constant-expression ':' statement /// [GNU] 'case' constant-expression '...' constant-expression ':' statement /// -StmtResult Parser::ParseCaseStatement(bool MissingCase, ExprResult Expr) { +StmtResult Parser::ParseCaseStatement(ParsedStmtContext StmtCtx, + bool MissingCase, ExprResult Expr) { assert((MissingCase || Tok.is(tok::kw_case)) && "Not a case stmt!"); + // The substatement is always a 'statement', not a 'declaration', but is + // otherwise in the same context as the labeled-statement. + StmtCtx &= ~ParsedStmtContext::AllowDeclarationsInC; + // It is very very common for code to contain many case statements recursively // nested, as in (but usually without indentation): // case 1: @@ -737,8 +743,7 @@ StmtResult Parser::ParseCaseStatement(bool MissingCase, ExprResult Expr) { // continue parsing the sub-stmt. if (Case.isInvalid()) { if (TopLevelCase.isInvalid()) // No parsed case stmts. - return ParseStatement(/*TrailingElseLoc=*/nullptr, - /*AllowOpenMPStandalone=*/true); + return ParseStatement(/*TrailingElseLoc=*/nullptr, StmtCtx); // Otherwise, just don't add it as a nested case. } else { // If this is the first case statement we parsed, it becomes TopLevelCase. @@ -758,8 +763,7 @@ StmtResult Parser::ParseCaseStatement(bool MissingCase, ExprResult Expr) { StmtResult SubStmt; if (Tok.isNot(tok::r_brace)) { - SubStmt = ParseStatement(/*TrailingElseLoc=*/nullptr, - /*AllowOpenMPStandalone=*/true); + SubStmt = ParseStatement(/*TrailingElseLoc=*/nullptr, StmtCtx); } else { // Nicely diagnose the common error "switch (X) { case 4: }", which is // not valid. If ColonLoc doesn't point to a valid text location, there was @@ -789,8 +793,13 @@ StmtResult Parser::ParseCaseStatement(bool MissingCase, ExprResult Expr) { /// 'default' ':' statement /// Note that this does not parse the 'statement' at the end. /// -StmtResult Parser::ParseDefaultStatement() { +StmtResult Parser::ParseDefaultStatement(ParsedStmtContext StmtCtx) { assert(Tok.is(tok::kw_default) && "Not a default stmt!"); + + // The substatement is always a 'statement', not a 'declaration', but is + // otherwise in the same context as the labeled-statement. + StmtCtx &= ~ParsedStmtContext::AllowDeclarationsInC; + SourceLocation DefaultLoc = ConsumeToken(); // eat the 'default'. SourceLocation ColonLoc; @@ -811,8 +820,7 @@ StmtResult Parser::ParseDefaultStatement() { StmtResult SubStmt; if (Tok.isNot(tok::r_brace)) { - SubStmt = ParseStatement(/*TrailingElseLoc=*/nullptr, - /*AllowOpenMPStandalone=*/true); + SubStmt = ParseStatement(/*TrailingElseLoc=*/nullptr, StmtCtx); } else { // Diagnose the common error "switch (X) {... default: }", which is // not valid. @@ -943,7 +951,8 @@ bool Parser::ConsumeNullStmt(StmtVector &Stmts) { EndLoc = Tok.getLocation(); // Don't just ConsumeToken() this tok::semi, do store it in AST. - StmtResult R = ParseStatementOrDeclaration(Stmts, ACK_Any); + StmtResult R = + ParseStatementOrDeclaration(Stmts, ParsedStmtContext::SubStmt); if (R.isUsable()) Stmts.push_back(R.get()); } @@ -957,14 +966,18 @@ bool Parser::ConsumeNullStmt(StmtVector &Stmts) { return true; } -bool Parser::isExprValueDiscarded() { - if (Actions.isCurCompoundStmtAStmtExpr()) { - // Look to see if the next two tokens close the statement expression; +StmtResult Parser::handleExprStmt(ExprResult E, ParsedStmtContext StmtCtx) { + bool IsStmtExprResult = false; + if ((StmtCtx & ParsedStmtContext::InStmtExpr) != ParsedStmtContext()) { + // Look ahead to see if the next two tokens close the statement expression; // if so, this expression statement is the last statement in a // statment expression. - return Tok.isNot(tok::r_brace) || NextToken().isNot(tok::r_paren); + IsStmtExprResult = Tok.is(tok::r_brace) && NextToken().is(tok::r_paren); } - return true; + + if (IsStmtExprResult) + E = Actions.ActOnStmtExprResult(E); + return Actions.ActOnExprStmt(E, /*DiscardedValue=*/!IsStmtExprResult); } /// ParseCompoundStatementBody - Parse a sequence of statements and invoke the @@ -1022,6 +1035,10 @@ StmtResult Parser::ParseCompoundStatementBody(bool isStmtExpr) { Stmts.push_back(R.get()); } + ParsedStmtContext SubStmtCtx = + ParsedStmtContext::Compound | + (isStmtExpr ? ParsedStmtContext::InStmtExpr : ParsedStmtContext()); + while (!tryParseMisplacedModuleImport() && Tok.isNot(tok::r_brace) && Tok.isNot(tok::eof)) { if (Tok.is(tok::annot_pragma_unused)) { @@ -1034,7 +1051,7 @@ StmtResult Parser::ParseCompoundStatementBody(bool isStmtExpr) { StmtResult R; if (Tok.isNot(tok::kw___extension__)) { - R = ParseStatementOrDeclaration(Stmts, ACK_Any); + R = ParseStatementOrDeclaration(Stmts, SubStmtCtx); } else { // __extension__ can start declarations and it can also be a unary // operator for expressions. Consume multiple __extension__ markers here @@ -1067,11 +1084,12 @@ StmtResult Parser::ParseCompoundStatementBody(bool isStmtExpr) { continue; } - // FIXME: Use attributes? // Eat the semicolon at the end of stmt and convert the expr into a // statement. ExpectAndConsumeSemi(diag::err_expected_semi_after_expr); - R = Actions.ActOnExprStmt(Res, isExprValueDiscarded()); + R = handleExprStmt(Res, SubStmtCtx); + if (R.isUsable()) + R = Actions.ProcessStmtAttributes(R.get(), attrs, attrs.Range); } } @@ -2001,7 +2019,7 @@ StmtResult Parser::ParseReturnStatement() { } StmtResult Parser::ParsePragmaLoopHint(StmtVector &Stmts, - AllowedConstructsKind Allowed, + ParsedStmtContext StmtCtx, SourceLocation *TrailingElseLoc, ParsedAttributesWithRange &Attrs) { // Create temporary attribute list. @@ -2024,7 +2042,7 @@ StmtResult Parser::ParsePragmaLoopHint(StmtVector &Stmts, MaybeParseCXX11Attributes(Attrs); StmtResult S = ParseStatementOrDeclarationAfterAttributes( - Stmts, Allowed, TrailingElseLoc, Attrs); + Stmts, StmtCtx, TrailingElseLoc, Attrs); Attrs.takeAllFrom(TempAttrs); return S; @@ -2329,7 +2347,8 @@ void Parser::ParseMicrosoftIfExistsStatement(StmtVector &Stmts) { // Condition is true, parse the statements. while (Tok.isNot(tok::r_brace)) { - StmtResult R = ParseStatementOrDeclaration(Stmts, ACK_Any); + StmtResult R = + ParseStatementOrDeclaration(Stmts, ParsedStmtContext::Compound); if (R.isUsable()) Stmts.push_back(R.get()); } diff --git a/clang/lib/Parse/ParseStmtAsm.cpp b/clang/lib/Parse/ParseStmtAsm.cpp index 832097e741408..3c4bc07321dd0 100644 --- a/clang/lib/Parse/ParseStmtAsm.cpp +++ b/clang/lib/Parse/ParseStmtAsm.cpp @@ -636,7 +636,7 @@ StmtResult Parser::ParseMicrosoftAsmStatement(SourceLocation AsmLoc) { // Filter out "fpsw" and "mxcsr". They aren't valid GCC asm clobber // constraints. Clang always adds fpsr to the clobber list anyway. llvm::erase_if(Clobbers, [](const std::string &C) { - return C == "fpsw" || C == "mxcsr"; + return C == "fpsr" || C == "mxcsr"; }); // Build the vector of clobber StringRefs. diff --git a/clang/lib/Parse/ParseTentative.cpp b/clang/lib/Parse/ParseTentative.cpp index 884b054711032..11f1aeb76ff0a 100644 --- a/clang/lib/Parse/ParseTentative.cpp +++ b/clang/lib/Parse/ParseTentative.cpp @@ -1410,11 +1410,16 @@ Parser::isCXXDeclarationSpecifier(Parser::TPResult BracedCastResult, // cv-qualifier case tok::kw_const: case tok::kw_volatile: + // OpenCL address space qualifiers case tok::kw___private: case tok::kw___local: case tok::kw___global: case tok::kw___constant: case tok::kw___generic: + // OpenCL access qualifiers + case tok::kw___read_only: + case tok::kw___write_only: + case tok::kw___read_write: // GNU case tok::kw_restrict: @@ -1493,6 +1498,17 @@ Parser::isCXXDeclarationSpecifier(Parser::TPResult BracedCastResult, // expression. *HasMissingTypename = true; return TPResult::Ambiguous; + } else { + // In MS mode, if HasMissingTypename is not provided, and the tokens + // are or the form *) or &) *> or &> &&>, this can't be an expression. + // The typename must be missing. + if (getLangOpts().MSVCCompat) { + if (((Tok.is(tok::amp) || Tok.is(tok::star)) && + (NextToken().is(tok::r_paren) || + NextToken().is(tok::greater))) || + (Tok.is(tok::ampamp) && NextToken().is(tok::greater))) + return TPResult::True; + } } } else { // Try to resolve the name. If it doesn't exist, assume it was @@ -1600,6 +1616,8 @@ Parser::isCXXDeclarationSpecifier(Parser::TPResult BracedCastResult, case tok::kw___float128: case tok::kw_void: case tok::annot_decltype: +#define GENERIC_IMAGE_TYPE(ImgType, Id) case tok::kw_##ImgType##_t: +#include "clang/Basic/OpenCLImageTypes.def" if (NextToken().is(tok::l_paren)) return TPResult::Ambiguous; @@ -1693,6 +1711,8 @@ bool Parser::isCXXDeclarationSpecifierAType() { case tok::kw_void: case tok::kw___unknown_anytype: case tok::kw___auto_type: +#define GENERIC_IMAGE_TYPE(ImgType, Id) case tok::kw_##ImgType##_t: +#include "clang/Basic/OpenCLImageTypes.def" return true; case tok::kw_auto: diff --git a/clang/lib/Sema/AnalysisBasedWarnings.cpp b/clang/lib/Sema/AnalysisBasedWarnings.cpp index 7ce69fd8c19da..6120d2b9df3cd 100644 --- a/clang/lib/Sema/AnalysisBasedWarnings.cpp +++ b/clang/lib/Sema/AnalysisBasedWarnings.cpp @@ -249,6 +249,10 @@ static void checkRecursiveFunction(Sema &S, const FunctionDecl *FD, CFG *cfg = AC.getCFG(); if (!cfg) return; + // If the exit block is unreachable, skip processing the function. + if (cfg->getExit().pred_empty()) + return; + // Emit diagnostic if a recursive function call is detected for all paths. if (checkForRecursiveFunctionCall(FD, cfg)) S.Diag(Body->getBeginLoc(), diag::warn_infinite_recursive_function); diff --git a/clang/lib/Sema/Sema.cpp b/clang/lib/Sema/Sema.cpp index dfce69cbf5420..2b3363b428df1 100644 --- a/clang/lib/Sema/Sema.cpp +++ b/clang/lib/Sema/Sema.cpp @@ -256,11 +256,12 @@ void Sema::Initialize() { // Initialize predefined OpenCL types and supported extensions and (optional) // core features. if (getLangOpts().OpenCL) { - getOpenCLOptions().addSupport(Context.getTargetInfo().getSupportedOpenCLOpts()); - getOpenCLOptions().enableSupportedCore(getLangOpts().OpenCLVersion); + getOpenCLOptions().addSupport( + Context.getTargetInfo().getSupportedOpenCLOpts()); + getOpenCLOptions().enableSupportedCore(getLangOpts()); addImplicitTypedef("sampler_t", Context.OCLSamplerTy); addImplicitTypedef("event_t", Context.OCLEventTy); - if (getLangOpts().OpenCLVersion >= 200) { + if (getLangOpts().OpenCLCPlusPlus || getLangOpts().OpenCLVersion >= 200) { addImplicitTypedef("clk_event_t", Context.OCLClkEventTy); addImplicitTypedef("queue_t", Context.OCLQueueTy); addImplicitTypedef("reserve_id_t", Context.OCLReserveIDTy); @@ -917,9 +918,12 @@ void Sema::ActOnEndOfTranslationUnit() { PerformPendingInstantiations(); // Emit SYCL integration header for current translation unit if needed - if (getLangOpts().SYCL && SyclIntHeader != nullptr) { + if (getLangOpts().SYCLIsDevice && SyclIntHeader != nullptr) { SyclIntHeader->emit(getLangOpts().SYCLIntHeader); } + if (getLangOpts().SYCLIsDevice) + MarkDevice(); + assert(LateParsedInstantiations.empty() && "end of TU template instantiation should not create more " @@ -1330,6 +1334,190 @@ Sema::Diag(SourceLocation Loc, const PartialDiagnostic& PD) { return Builder; } +// Print notes showing how we can reach FD starting from an a priori +// known-callable function. +static void emitCallStackNotes(Sema &S, FunctionDecl *FD) { + auto FnIt = S.DeviceKnownEmittedFns.find(FD); + while (FnIt != S.DeviceKnownEmittedFns.end()) { + DiagnosticBuilder Builder( + S.Diags.Report(FnIt->second.Loc, diag::note_called_by)); + Builder << FnIt->second.FD; + Builder.setForceEmit(); + + FnIt = S.DeviceKnownEmittedFns.find(FnIt->second.FD); + } +} + +// Emit any deferred diagnostics for FD and erase them from the map in which +// they're stored. +static void emitDeferredDiags(Sema &S, FunctionDecl *FD) { + auto It = S.DeviceDeferredDiags.find(FD); + if (It == S.DeviceDeferredDiags.end()) + return; + bool HasWarningOrError = false; + for (PartialDiagnosticAt &PDAt : It->second) { + const SourceLocation &Loc = PDAt.first; + const PartialDiagnostic &PD = PDAt.second; + HasWarningOrError |= S.getDiagnostics().getDiagnosticLevel( + PD.getDiagID(), Loc) >= DiagnosticsEngine::Warning; + DiagnosticBuilder Builder(S.Diags.Report(Loc, PD.getDiagID())); + Builder.setForceEmit(); + PD.Emit(Builder); + } + S.DeviceDeferredDiags.erase(It); + + // FIXME: Should this be called after every warning/error emitted in the loop + // above, instead of just once per function? That would be consistent with + // how we handle immediate errors, but it also seems like a bit much. + if (HasWarningOrError) + emitCallStackNotes(S, FD); +} + +// In CUDA, there are some constructs which may appear in semantically-valid +// code, but trigger errors if we ever generate code for the function in which +// they appear. Essentially every construct you're not allowed to use on the +// device falls into this category, because you are allowed to use these +// constructs in a __host__ __device__ function, but only if that function is +// never codegen'ed on the device. +// +// To handle semantic checking for these constructs, we keep track of the set of +// functions we know will be emitted, either because we could tell a priori that +// they would be emitted, or because they were transitively called by a +// known-emitted function. +// +// We also keep a partial call graph of which not-known-emitted functions call +// which other not-known-emitted functions. +// +// When we see something which is illegal if the current function is emitted +// (usually by way of CUDADiagIfDeviceCode, CUDADiagIfHostCode, or +// CheckCUDACall), we first check if the current function is known-emitted. If +// so, we immediately output the diagnostic. +// +// Otherwise, we "defer" the diagnostic. It sits in Sema::DeviceDeferredDiags +// until we discover that the function is known-emitted, at which point we take +// it out of this map and emit the diagnostic. + +Sema::DeviceDiagBuilder::DeviceDiagBuilder(Kind K, SourceLocation Loc, + unsigned DiagID, FunctionDecl *Fn, + Sema &S) + : S(S), Loc(Loc), DiagID(DiagID), Fn(Fn), + ShowCallStack(K == K_ImmediateWithCallStack || K == K_Deferred) { + switch (K) { + case K_Nop: + break; + case K_Immediate: + case K_ImmediateWithCallStack: + ImmediateDiag.emplace(S.Diag(Loc, DiagID)); + break; + case K_Deferred: + assert(Fn && "Must have a function to attach the deferred diag to."); + auto &Diags = S.DeviceDeferredDiags[Fn]; + PartialDiagId.emplace(Diags.size()); + Diags.emplace_back(Loc, S.PDiag(DiagID)); + break; + } +} + +Sema::DeviceDiagBuilder::DeviceDiagBuilder(DeviceDiagBuilder &&D) + : S(D.S), Loc(D.Loc), DiagID(D.DiagID), Fn(D.Fn), + ShowCallStack(D.ShowCallStack), ImmediateDiag(D.ImmediateDiag), + PartialDiagId(D.PartialDiagId) { + // Clean the previous diagnostics. + D.ShowCallStack = false; + D.ImmediateDiag.reset(); + D.PartialDiagId.reset(); +} + +Sema::DeviceDiagBuilder::~DeviceDiagBuilder() { + if (ImmediateDiag) { + // Emit our diagnostic and, if it was a warning or error, output a callstack + // if Fn isn't a priori known-emitted. + bool IsWarningOrError = S.getDiagnostics().getDiagnosticLevel( + DiagID, Loc) >= DiagnosticsEngine::Warning; + ImmediateDiag.reset(); // Emit the immediate diag. + if (IsWarningOrError && ShowCallStack) + emitCallStackNotes(S, Fn); + } else { + assert((!PartialDiagId || ShowCallStack) && + "Must always show call stack for deferred diags."); + } +} + +// Indicate that this function (and thus everything it transtively calls) will +// be codegen'ed, and emit any deferred diagnostics on this function and its +// (transitive) callees. +void Sema::markKnownEmitted( + Sema &S, FunctionDecl *OrigCaller, FunctionDecl *OrigCallee, + SourceLocation OrigLoc, + const llvm::function_ref IsKnownEmitted) { + // Nothing to do if we already know that FD is emitted. + if (IsKnownEmitted(S, OrigCallee)) { + assert(!S.DeviceCallGraph.count(OrigCallee)); + return; + } + + // We've just discovered that OrigCallee is known-emitted. Walk our call + // graph to see what else we can now discover also must be emitted. + + struct CallInfo { + FunctionDecl *Caller; + FunctionDecl *Callee; + SourceLocation Loc; + }; + llvm::SmallVector Worklist = {{OrigCaller, OrigCallee, OrigLoc}}; + llvm::SmallSet, 4> Seen; + Seen.insert(OrigCallee); + while (!Worklist.empty()) { + CallInfo C = Worklist.pop_back_val(); + assert(!IsKnownEmitted(S, C.Callee) && + "Worklist should not contain known-emitted functions."); + S.DeviceKnownEmittedFns[C.Callee] = {C.Caller, C.Loc}; + emitDeferredDiags(S, C.Callee); + + // If this is a template instantiation, explore its callgraph as well: + // Non-dependent calls are part of the template's callgraph, while dependent + // calls are part of to the instantiation's call graph. + if (auto *Templ = C.Callee->getPrimaryTemplate()) { + FunctionDecl *TemplFD = Templ->getAsFunction(); + if (!Seen.count(TemplFD) && !S.DeviceKnownEmittedFns.count(TemplFD)) { + Seen.insert(TemplFD); + Worklist.push_back( + {/* Caller = */ C.Caller, /* Callee = */ TemplFD, C.Loc}); + } + } + + // Add all functions called by Callee to our worklist. + auto CGIt = S.DeviceCallGraph.find(C.Callee); + if (CGIt == S.DeviceCallGraph.end()) + continue; + + for (std::pair, SourceLocation> FDLoc : + CGIt->second) { + FunctionDecl *NewCallee = FDLoc.first; + SourceLocation CallLoc = FDLoc.second; + if (Seen.count(NewCallee) || IsKnownEmitted(S, NewCallee)) + continue; + Seen.insert(NewCallee); + Worklist.push_back( + {/* Caller = */ C.Callee, /* Callee = */ NewCallee, CallLoc}); + } + + // C.Callee is now known-emitted, so we no longer need to maintain its list + // of callees in DeviceCallGraph. + S.DeviceCallGraph.erase(CGIt); + } +} + +Sema::DeviceDiagBuilder Sema::targetDiag(SourceLocation Loc, unsigned DiagID) { + if (LangOpts.OpenMP && LangOpts.OpenMPIsDevice) + return diagIfOpenMPDeviceCode(Loc, DiagID); + if (getLangOpts().CUDA) + return getLangOpts().CUDAIsDevice ? CUDADiagIfDeviceCode(Loc, DiagID) + : CUDADiagIfHostCode(Loc, DiagID); + return DeviceDiagBuilder(DeviceDiagBuilder::K_Immediate, Loc, DiagID, + getCurFunctionDecl(), *this); +} + /// Looks through the macro-expansion chain for the given /// location, looking for a macro expansion with the given name. /// If one is found, returns true and sets the location to that diff --git a/clang/lib/Sema/SemaCUDA.cpp b/clang/lib/Sema/SemaCUDA.cpp index 43cc14dfc97db..d062e8b201ac2 100644 --- a/clang/lib/Sema/SemaCUDA.cpp +++ b/clang/lib/Sema/SemaCUDA.cpp @@ -586,78 +586,6 @@ void Sema::maybeAddCUDAHostDeviceAttrs(FunctionDecl *NewD, NewD->addAttr(CUDADeviceAttr::CreateImplicit(Context)); } -// In CUDA, there are some constructs which may appear in semantically-valid -// code, but trigger errors if we ever generate code for the function in which -// they appear. Essentially every construct you're not allowed to use on the -// device falls into this category, because you are allowed to use these -// constructs in a __host__ __device__ function, but only if that function is -// never codegen'ed on the device. -// -// To handle semantic checking for these constructs, we keep track of the set of -// functions we know will be emitted, either because we could tell a priori that -// they would be emitted, or because they were transitively called by a -// known-emitted function. -// -// We also keep a partial call graph of which not-known-emitted functions call -// which other not-known-emitted functions. -// -// When we see something which is illegal if the current function is emitted -// (usually by way of CUDADiagIfDeviceCode, CUDADiagIfHostCode, or -// CheckCUDACall), we first check if the current function is known-emitted. If -// so, we immediately output the diagnostic. -// -// Otherwise, we "defer" the diagnostic. It sits in Sema::CUDADeferredDiags -// until we discover that the function is known-emitted, at which point we take -// it out of this map and emit the diagnostic. - -Sema::CUDADiagBuilder::CUDADiagBuilder(Kind K, SourceLocation Loc, - unsigned DiagID, FunctionDecl *Fn, - Sema &S) - : S(S), Loc(Loc), DiagID(DiagID), Fn(Fn), - ShowCallStack(K == K_ImmediateWithCallStack || K == K_Deferred) { - switch (K) { - case K_Nop: - break; - case K_Immediate: - case K_ImmediateWithCallStack: - ImmediateDiag.emplace(S.Diag(Loc, DiagID)); - break; - case K_Deferred: - assert(Fn && "Must have a function to attach the deferred diag to."); - PartialDiag.emplace(S.PDiag(DiagID)); - break; - } -} - -// Print notes showing how we can reach FD starting from an a priori -// known-callable function. -static void EmitCallStackNotes(Sema &S, FunctionDecl *FD) { - auto FnIt = S.CUDAKnownEmittedFns.find(FD); - while (FnIt != S.CUDAKnownEmittedFns.end()) { - DiagnosticBuilder Builder( - S.Diags.Report(FnIt->second.Loc, diag::note_called_by)); - Builder << FnIt->second.FD; - Builder.setForceEmit(); - - FnIt = S.CUDAKnownEmittedFns.find(FnIt->second.FD); - } -} - -Sema::CUDADiagBuilder::~CUDADiagBuilder() { - if (ImmediateDiag) { - // Emit our diagnostic and, if it was a warning or error, output a callstack - // if Fn isn't a priori known-emitted. - bool IsWarningOrError = S.getDiagnostics().getDiagnosticLevel( - DiagID, Loc) >= DiagnosticsEngine::Warning; - ImmediateDiag.reset(); // Emit the immediate diag. - if (IsWarningOrError && ShowCallStack) - EmitCallStackNotes(S, Fn); - } else if (PartialDiag) { - assert(ShowCallStack && "Must always show call stack for deferred diags."); - S.CUDADeferredDiags[Fn].push_back({Loc, std::move(*PartialDiag)}); - } -} - // Do we know that we will eventually codegen the given function? static bool IsKnownEmitted(Sema &S, FunctionDecl *FD) { // Templates are emitted when they're instantiated. @@ -689,152 +617,69 @@ static bool IsKnownEmitted(Sema &S, FunctionDecl *FD) { // Otherwise, the function is known-emitted if it's in our set of // known-emitted functions. - return S.CUDAKnownEmittedFns.count(FD) > 0; + return S.DeviceKnownEmittedFns.count(FD) > 0; } -Sema::CUDADiagBuilder Sema::CUDADiagIfDeviceCode(SourceLocation Loc, - unsigned DiagID) { +Sema::DeviceDiagBuilder Sema::CUDADiagIfDeviceCode(SourceLocation Loc, + unsigned DiagID) { assert(getLangOpts().CUDA && "Should only be called during CUDA compilation"); - CUDADiagBuilder::Kind DiagKind = [&] { + DeviceDiagBuilder::Kind DiagKind = [this] { switch (CurrentCUDATarget()) { case CFT_Global: case CFT_Device: - return CUDADiagBuilder::K_Immediate; + return DeviceDiagBuilder::K_Immediate; case CFT_HostDevice: // An HD function counts as host code if we're compiling for host, and // device code if we're compiling for device. Defer any errors in device // mode until the function is known-emitted. if (getLangOpts().CUDAIsDevice) { return IsKnownEmitted(*this, dyn_cast(CurContext)) - ? CUDADiagBuilder::K_ImmediateWithCallStack - : CUDADiagBuilder::K_Deferred; + ? DeviceDiagBuilder::K_ImmediateWithCallStack + : DeviceDiagBuilder::K_Deferred; } - return CUDADiagBuilder::K_Nop; + return DeviceDiagBuilder::K_Nop; default: - return CUDADiagBuilder::K_Nop; + return DeviceDiagBuilder::K_Nop; } }(); - return CUDADiagBuilder(DiagKind, Loc, DiagID, - dyn_cast(CurContext), *this); + return DeviceDiagBuilder(DiagKind, Loc, DiagID, + dyn_cast(CurContext), *this); } -Sema::CUDADiagBuilder Sema::CUDADiagIfHostCode(SourceLocation Loc, - unsigned DiagID) { +Sema::DeviceDiagBuilder Sema::CUDADiagIfHostCode(SourceLocation Loc, + unsigned DiagID) { assert(getLangOpts().CUDA && "Should only be called during CUDA compilation"); - CUDADiagBuilder::Kind DiagKind = [&] { + DeviceDiagBuilder::Kind DiagKind = [this] { switch (CurrentCUDATarget()) { case CFT_Host: - return CUDADiagBuilder::K_Immediate; + return DeviceDiagBuilder::K_Immediate; case CFT_HostDevice: // An HD function counts as host code if we're compiling for host, and // device code if we're compiling for device. Defer any errors in device // mode until the function is known-emitted. if (getLangOpts().CUDAIsDevice) - return CUDADiagBuilder::K_Nop; + return DeviceDiagBuilder::K_Nop; return IsKnownEmitted(*this, dyn_cast(CurContext)) - ? CUDADiagBuilder::K_ImmediateWithCallStack - : CUDADiagBuilder::K_Deferred; + ? DeviceDiagBuilder::K_ImmediateWithCallStack + : DeviceDiagBuilder::K_Deferred; default: - return CUDADiagBuilder::K_Nop; + return DeviceDiagBuilder::K_Nop; } }(); - return CUDADiagBuilder(DiagKind, Loc, DiagID, - dyn_cast(CurContext), *this); -} - -// Emit any deferred diagnostics for FD and erase them from the map in which -// they're stored. -static void EmitDeferredDiags(Sema &S, FunctionDecl *FD) { - auto It = S.CUDADeferredDiags.find(FD); - if (It == S.CUDADeferredDiags.end()) - return; - bool HasWarningOrError = false; - for (PartialDiagnosticAt &PDAt : It->second) { - const SourceLocation &Loc = PDAt.first; - const PartialDiagnostic &PD = PDAt.second; - HasWarningOrError |= S.getDiagnostics().getDiagnosticLevel( - PD.getDiagID(), Loc) >= DiagnosticsEngine::Warning; - DiagnosticBuilder Builder(S.Diags.Report(Loc, PD.getDiagID())); - Builder.setForceEmit(); - PD.Emit(Builder); - } - S.CUDADeferredDiags.erase(It); - - // FIXME: Should this be called after every warning/error emitted in the loop - // above, instead of just once per function? That would be consistent with - // how we handle immediate errors, but it also seems like a bit much. - if (HasWarningOrError) - EmitCallStackNotes(S, FD); -} - -// Indicate that this function (and thus everything it transtively calls) will -// be codegen'ed, and emit any deferred diagnostics on this function and its -// (transitive) callees. -static void MarkKnownEmitted(Sema &S, FunctionDecl *OrigCaller, - FunctionDecl *OrigCallee, SourceLocation OrigLoc) { - // Nothing to do if we already know that FD is emitted. - if (IsKnownEmitted(S, OrigCallee)) { - assert(!S.CUDACallGraph.count(OrigCallee)); - return; - } - - // We've just discovered that OrigCallee is known-emitted. Walk our call - // graph to see what else we can now discover also must be emitted. - - struct CallInfo { - FunctionDecl *Caller; - FunctionDecl *Callee; - SourceLocation Loc; - }; - llvm::SmallVector Worklist = {{OrigCaller, OrigCallee, OrigLoc}}; - llvm::SmallSet, 4> Seen; - Seen.insert(OrigCallee); - while (!Worklist.empty()) { - CallInfo C = Worklist.pop_back_val(); - assert(!IsKnownEmitted(S, C.Callee) && - "Worklist should not contain known-emitted functions."); - S.CUDAKnownEmittedFns[C.Callee] = {C.Caller, C.Loc}; - EmitDeferredDiags(S, C.Callee); - - // If this is a template instantiation, explore its callgraph as well: - // Non-dependent calls are part of the template's callgraph, while dependent - // calls are part of to the instantiation's call graph. - if (auto *Templ = C.Callee->getPrimaryTemplate()) { - FunctionDecl *TemplFD = Templ->getAsFunction(); - if (!Seen.count(TemplFD) && !S.CUDAKnownEmittedFns.count(TemplFD)) { - Seen.insert(TemplFD); - Worklist.push_back( - {/* Caller = */ C.Caller, /* Callee = */ TemplFD, C.Loc}); - } - } - - // Add all functions called by Callee to our worklist. - auto CGIt = S.CUDACallGraph.find(C.Callee); - if (CGIt == S.CUDACallGraph.end()) - continue; - - for (std::pair, SourceLocation> FDLoc : - CGIt->second) { - FunctionDecl *NewCallee = FDLoc.first; - SourceLocation CallLoc = FDLoc.second; - if (Seen.count(NewCallee) || IsKnownEmitted(S, NewCallee)) - continue; - Seen.insert(NewCallee); - Worklist.push_back( - {/* Caller = */ C.Callee, /* Callee = */ NewCallee, CallLoc}); - } - - // C.Callee is now known-emitted, so we no longer need to maintain its list - // of callees in CUDACallGraph. - S.CUDACallGraph.erase(CGIt); - } + return DeviceDiagBuilder(DiagKind, Loc, DiagID, + dyn_cast(CurContext), *this); } bool Sema::CheckCUDACall(SourceLocation Loc, FunctionDecl *Callee) { assert(getLangOpts().CUDA && "Should only be called during CUDA compilation"); assert(Callee && "Callee may not be null."); + + auto &ExprEvalCtx = ExprEvalContexts.back(); + if (ExprEvalCtx.isUnevaluated() || ExprEvalCtx.isConstantEvaluated()) + return true; + // FIXME: Is bailing out early correct here? Should we instead assume that // the caller is a global initializer? FunctionDecl *Caller = dyn_cast(CurContext); @@ -848,7 +693,7 @@ bool Sema::CheckCUDACall(SourceLocation Loc, FunctionDecl *Callee) { // Host-side references to a __global__ function refer to the stub, so the // function itself is never emitted and therefore should not be marked. if (getLangOpts().CUDAIsDevice || IdentifyCUDATarget(Callee) != CFT_Global) - MarkKnownEmitted(*this, Caller, Callee, Loc); + markKnownEmitted(*this, Caller, Callee, Loc, IsKnownEmitted); } else { // If we have // host fn calls kernel fn calls host+device, @@ -857,26 +702,27 @@ bool Sema::CheckCUDACall(SourceLocation Loc, FunctionDecl *Callee) { // that, when compiling for host, only HD functions actually called from the // host get marked as known-emitted. if (getLangOpts().CUDAIsDevice || IdentifyCUDATarget(Callee) != CFT_Global) - CUDACallGraph[Caller].insert({Callee, Loc}); + DeviceCallGraph[Caller].insert({Callee, Loc}); } - CUDADiagBuilder::Kind DiagKind = [&] { + DeviceDiagBuilder::Kind DiagKind = [this, Caller, Callee, + CallerKnownEmitted] { switch (IdentifyCUDAPreference(Caller, Callee)) { case CFP_Never: - return CUDADiagBuilder::K_Immediate; + return DeviceDiagBuilder::K_Immediate; case CFP_WrongSide: assert(Caller && "WrongSide calls require a non-null caller"); // If we know the caller will be emitted, we know this wrong-side call // will be emitted, so it's an immediate error. Otherwise, defer the // error until we know the caller is emitted. - return CallerKnownEmitted ? CUDADiagBuilder::K_ImmediateWithCallStack - : CUDADiagBuilder::K_Deferred; + return CallerKnownEmitted ? DeviceDiagBuilder::K_ImmediateWithCallStack + : DeviceDiagBuilder::K_Deferred; default: - return CUDADiagBuilder::K_Nop; + return DeviceDiagBuilder::K_Nop; } }(); - if (DiagKind == CUDADiagBuilder::K_Nop) + if (DiagKind == DeviceDiagBuilder::K_Nop) return true; // Avoid emitting this error twice for the same location. Using a hashtable @@ -886,13 +732,13 @@ bool Sema::CheckCUDACall(SourceLocation Loc, FunctionDecl *Callee) { if (!LocsWithCUDACallDiags.insert({Caller, Loc}).second) return true; - CUDADiagBuilder(DiagKind, Loc, diag::err_ref_bad_target, Caller, *this) + DeviceDiagBuilder(DiagKind, Loc, diag::err_ref_bad_target, Caller, *this) << IdentifyCUDATarget(Callee) << Callee << IdentifyCUDATarget(Caller); - CUDADiagBuilder(DiagKind, Callee->getLocation(), diag::note_previous_decl, - Caller, *this) + DeviceDiagBuilder(DiagKind, Callee->getLocation(), diag::note_previous_decl, + Caller, *this) << Callee; - return DiagKind != CUDADiagBuilder::K_Immediate && - DiagKind != CUDADiagBuilder::K_ImmediateWithCallStack; + return DiagKind != DeviceDiagBuilder::K_Immediate && + DiagKind != DeviceDiagBuilder::K_ImmediateWithCallStack; } void Sema::CUDASetLambdaAttrs(CXXMethodDecl *Method) { diff --git a/clang/lib/Sema/SemaChecking.cpp b/clang/lib/Sema/SemaChecking.cpp index 4b5c68a7bde8c..8dc9c7ffcdb64 100644 --- a/clang/lib/Sema/SemaChecking.cpp +++ b/clang/lib/Sema/SemaChecking.cpp @@ -9174,23 +9174,23 @@ void Sema::CheckMemaccessArguments(const CallExpr *Call, getContainedDynamicClass(PointeeTy, IsContained)) { unsigned OperationType = 0; + const bool IsCmp = BId == Builtin::BImemcmp || BId == Builtin::BIbcmp; // "overwritten" if we're warning about the destination for any call // but memcmp; otherwise a verb appropriate to the call. - if (ArgIdx != 0 || BId == Builtin::BImemcmp) { + if (ArgIdx != 0 || IsCmp) { if (BId == Builtin::BImemcpy) OperationType = 1; else if(BId == Builtin::BImemmove) OperationType = 2; - else if (BId == Builtin::BImemcmp) + else if (IsCmp) OperationType = 3; } - DiagRuntimeBehavior( - Dest->getExprLoc(), Dest, - PDiag(diag::warn_dyn_class_memaccess) - << (BId == Builtin::BImemcmp ? ArgIdx + 2 : ArgIdx) - << FnName << IsContained << ContainedRD << OperationType - << Call->getCallee()->getSourceRange()); + DiagRuntimeBehavior(Dest->getExprLoc(), Dest, + PDiag(diag::warn_dyn_class_memaccess) + << (IsCmp ? ArgIdx + 2 : ArgIdx) << FnName + << IsContained << ContainedRD << OperationType + << Call->getCallee()->getSourceRange()); } else if (PointeeTy.hasNonTrivialObjCLifetime() && BId != Builtin::BImemset) DiagRuntimeBehavior( @@ -10624,16 +10624,18 @@ static void AnalyzeCompoundAssignment(Sema &S, BinaryOperator *E) { // The below checks assume source is floating point. if (!ResultBT || !RBT || !RBT->isFloatingPoint()) return; - // If source is floating point but target is not. + // If source is floating point but target is an integer. + if (ResultBT->isInteger()) + return DiagnoseImpCast(S, E, E->getRHS()->getType(), E->getLHS()->getType(), + E->getExprLoc(), diag::warn_impcast_float_integer); + if (!ResultBT->isFloatingPoint()) - return DiagnoseFloatingImpCast(S, E, E->getRHS()->getType(), - E->getExprLoc()); - - // If both source and target are floating points. - // Builtin FP kinds are ordered by increasing FP rank. - if (ResultBT->getKind() < RBT->getKind() && - // We don't want to warn for system macro. - !S.SourceMgr.isInSystemMacro(E->getOperatorLoc())) + return; + + // If both source and target are floating points, warn about losing precision. + int Order = S.getASTContext().getFloatingTypeSemanticOrder( + QualType(ResultBT, 0), QualType(RBT, 0)); + if (Order < 0 && !S.SourceMgr.isInSystemMacro(E->getOperatorLoc())) // warn about dropping FP rank. DiagnoseImpCast(S, E->getRHS(), E->getLHS()->getType(), E->getOperatorLoc(), diag::warn_impcast_float_result_precision); @@ -10952,8 +10954,9 @@ CheckImplicitConversion(Sema &S, Expr *E, QualType T, SourceLocation CC, if (TargetBT && TargetBT->isFloatingPoint()) { // ...then warn if we're dropping FP rank. - // Builtin FP kinds are ordered by increasing FP rank. - if (SourceBT->getKind() > TargetBT->getKind()) { + int Order = S.getASTContext().getFloatingTypeSemanticOrder( + QualType(SourceBT, 0), QualType(TargetBT, 0)); + if (Order > 0) { // Don't warn about float constants that are precisely // representable in the target type. Expr::EvalResult result; @@ -10971,7 +10974,7 @@ CheckImplicitConversion(Sema &S, Expr *E, QualType T, SourceLocation CC, DiagnoseImpCast(S, E, T, CC, diag::warn_impcast_float_precision); } // ... or possibly if we're increasing rank, too - else if (TargetBT->getKind() > SourceBT->getKind()) { + else if (Order < 0) { if (S.SourceMgr.isInSystemMacro(CC)) return; @@ -11015,10 +11018,9 @@ CheckImplicitConversion(Sema &S, Expr *E, QualType T, SourceLocation CC, return; } + // Valid casts involving fixed point types should be accounted for here. if (Source->isFixedPointType()) { - // TODO: Only CK_FixedPointCast is supported now. The other valid casts - // should be accounted for here. - if (Target->isFixedPointType()) { + if (Target->isUnsaturatedFixedPointType()) { Expr::EvalResult Result; if (E->EvaluateAsFixedPoint(Result, S.Context, Expr::SE_AllowSideEffects)) { @@ -11034,6 +11036,46 @@ CheckImplicitConversion(Sema &S, Expr *E, QualType T, SourceLocation CC, return; } } + } else if (Target->isIntegerType()) { + Expr::EvalResult Result; + if (E->EvaluateAsFixedPoint(Result, S.Context, + Expr::SE_AllowSideEffects)) { + APFixedPoint FXResult = Result.Val.getFixedPoint(); + + bool Overflowed; + llvm::APSInt IntResult = FXResult.convertToInt( + S.Context.getIntWidth(T), + Target->isSignedIntegerOrEnumerationType(), &Overflowed); + + if (Overflowed) { + S.DiagRuntimeBehavior(E->getExprLoc(), E, + S.PDiag(diag::warn_impcast_fixed_point_range) + << FXResult.toString() << T + << E->getSourceRange() + << clang::SourceRange(CC)); + return; + } + } + } + } else if (Target->isUnsaturatedFixedPointType()) { + if (Source->isIntegerType()) { + Expr::EvalResult Result; + if (E->EvaluateAsInt(Result, S.Context, Expr::SE_AllowSideEffects)) { + llvm::APSInt Value = Result.Val.getInt(); + + bool Overflowed; + APFixedPoint IntResult = APFixedPoint::getFromIntValue( + Value, S.Context.getFixedPointSemantics(T), &Overflowed); + + if (Overflowed) { + S.DiagRuntimeBehavior(E->getExprLoc(), E, + S.PDiag(diag::warn_impcast_fixed_point_range) + << Value.toString(/*radix=*/10) << T + << E->getSourceRange() + << clang::SourceRange(CC)); + return; + } + } } } diff --git a/clang/lib/Sema/SemaCodeComplete.cpp b/clang/lib/Sema/SemaCodeComplete.cpp index 03d612a3e9818..08b61e198700f 100644 --- a/clang/lib/Sema/SemaCodeComplete.cpp +++ b/clang/lib/Sema/SemaCodeComplete.cpp @@ -350,13 +350,16 @@ class ResultBuilder { void PreferredTypeBuilder::enterReturn(Sema &S, SourceLocation Tok) { if (isa(S.CurContext)) { if (sema::BlockScopeInfo *BSI = S.getCurBlock()) { + ComputeType = nullptr; Type = BSI->ReturnType; ExpectedLoc = Tok; } } else if (const auto *Function = dyn_cast(S.CurContext)) { + ComputeType = nullptr; Type = Function->getReturnType(); ExpectedLoc = Tok; } else if (const auto *Method = dyn_cast(S.CurContext)) { + ComputeType = nullptr; Type = Method->getReturnType(); ExpectedLoc = Tok; } @@ -364,10 +367,18 @@ void PreferredTypeBuilder::enterReturn(Sema &S, SourceLocation Tok) { void PreferredTypeBuilder::enterVariableInit(SourceLocation Tok, Decl *D) { auto *VD = llvm::dyn_cast_or_null(D); + ComputeType = nullptr; Type = VD ? VD->getType() : QualType(); ExpectedLoc = Tok; } +void PreferredTypeBuilder::enterFunctionArgument( + SourceLocation Tok, llvm::function_ref ComputeType) { + this->ComputeType = ComputeType; + Type = QualType(); + ExpectedLoc = Tok; +} + void PreferredTypeBuilder::enterParenExpr(SourceLocation Tok, SourceLocation LParLoc) { // expected type for parenthesized expression does not change. @@ -480,13 +491,14 @@ static QualType getPreferredTypeOfUnaryArg(Sema &S, QualType ContextType, case tok::kw___imag: return QualType(); default: - assert(false && "unhnalded unary op"); + assert(false && "unhandled unary op"); return QualType(); } } void PreferredTypeBuilder::enterBinary(Sema &S, SourceLocation Tok, Expr *LHS, tok::TokenKind Op) { + ComputeType = nullptr; Type = getPreferredTypeOfBinaryRHS(S, LHS, Op); ExpectedLoc = Tok; } @@ -495,30 +507,38 @@ void PreferredTypeBuilder::enterMemAccess(Sema &S, SourceLocation Tok, Expr *Base) { if (!Base) return; - Type = this->get(Base->getBeginLoc()); + // Do we have expected type for Base? + if (ExpectedLoc != Base->getBeginLoc()) + return; + // Keep the expected type, only update the location. ExpectedLoc = Tok; + return; } void PreferredTypeBuilder::enterUnary(Sema &S, SourceLocation Tok, tok::TokenKind OpKind, SourceLocation OpLoc) { + ComputeType = nullptr; Type = getPreferredTypeOfUnaryArg(S, this->get(OpLoc), OpKind); ExpectedLoc = Tok; } void PreferredTypeBuilder::enterSubscript(Sema &S, SourceLocation Tok, Expr *LHS) { + ComputeType = nullptr; Type = S.getASTContext().IntTy; ExpectedLoc = Tok; } void PreferredTypeBuilder::enterTypeCast(SourceLocation Tok, QualType CastType) { + ComputeType = nullptr; Type = !CastType.isNull() ? CastType.getCanonicalType() : QualType(); ExpectedLoc = Tok; } void PreferredTypeBuilder::enterCondition(Sema &S, SourceLocation Tok) { + ComputeType = nullptr; Type = S.getASTContext().BoolTy; ExpectedLoc = Tok; } @@ -968,8 +988,8 @@ void ResultBuilder::AdjustResultPriorityForDecl(Result &R) { } } -DeclContext::lookup_result getConstructors(ASTContext &Context, - const CXXRecordDecl *Record) { +static DeclContext::lookup_result getConstructors(ASTContext &Context, + const CXXRecordDecl *Record) { QualType RecordTy = Context.getTypeDeclType(Record); DeclarationName ConstructorName = Context.DeclarationNames.getCXXConstructorName( @@ -5061,7 +5081,20 @@ void Sema::CodeCompleteQualifiedId(Scope *S, CXXScopeSpec &SS, if (SS.isInvalid()) { CodeCompletionContext CC(CodeCompletionContext::CCC_Symbol); CC.setCXXScopeSpecifier(SS); - HandleCodeCompleteResults(this, CodeCompleter, CC, nullptr, 0); + // As SS is invalid, we try to collect accessible contexts from the current + // scope with a dummy lookup so that the completion consumer can try to + // guess what the specified scope is. + ResultBuilder DummyResults(*this, CodeCompleter->getAllocator(), + CodeCompleter->getCodeCompletionTUInfo(), CC); + if (S->getEntity()) { + CodeCompletionDeclConsumer Consumer(DummyResults, S->getEntity(), + BaseType); + LookupVisibleDecls(S, LookupOrdinaryName, Consumer, + /*IncludeGlobalScope=*/false, + /*LoadExternal=*/false); + } + HandleCodeCompleteResults(this, CodeCompleter, + DummyResults.getCompletionContext(), nullptr, 0); return; } // Always pretend to enter a context to ensure that a dependent type @@ -8371,10 +8404,23 @@ void Sema::CodeCompleteIncludedFile(llvm::StringRef Dir, bool Angled) { }; // Helper: scans IncludeDir for nice files, and adds results for each. - auto AddFilesFromIncludeDir = [&](StringRef IncludeDir, bool IsSystem) { + auto AddFilesFromIncludeDir = [&](StringRef IncludeDir, + bool IsSystem, + DirectoryLookup::LookupType_t LookupType) { llvm::SmallString<128> Dir = IncludeDir; - if (!NativeRelDir.empty()) - llvm::sys::path::append(Dir, NativeRelDir); + if (!NativeRelDir.empty()) { + if (LookupType == DirectoryLookup::LT_Framework) { + // For a framework dir, #include actually maps to + // a path of Foo.framework/Headers/Bar/. + auto Begin = llvm::sys::path::begin(NativeRelDir); + auto End = llvm::sys::path::end(NativeRelDir); + + llvm::sys::path::append(Dir, *Begin + ".framework", "Headers"); + llvm::sys::path::append(Dir, ++Begin, End); + } else { + llvm::sys::path::append(Dir, NativeRelDir); + } + } std::error_code EC; unsigned Count = 0; @@ -8385,6 +8431,12 @@ void Sema::CodeCompleteIncludedFile(llvm::StringRef Dir, bool Angled) { StringRef Filename = llvm::sys::path::filename(It->path()); switch (It->type()) { case llvm::sys::fs::file_type::directory_file: + // All entries in a framework directory must have a ".framework" suffix, + // but the suffix does not appear in the source code's include/import. + if (LookupType == DirectoryLookup::LT_Framework && + NativeRelDir.empty() && !Filename.consume_back(".framework")) + break; + AddCompletion(Filename, /*IsDirectory=*/true); break; case llvm::sys::fs::file_type::regular_file: @@ -8413,10 +8465,12 @@ void Sema::CodeCompleteIncludedFile(llvm::StringRef Dir, bool Angled) { // header maps are not (currently) enumerable. break; case DirectoryLookup::LT_NormalDir: - AddFilesFromIncludeDir(IncludeDir.getDir()->getName(), IsSystem); + AddFilesFromIncludeDir(IncludeDir.getDir()->getName(), IsSystem, + DirectoryLookup::LT_NormalDir); break; case DirectoryLookup::LT_Framework: - AddFilesFromIncludeDir(IncludeDir.getFrameworkDir()->getName(), IsSystem); + AddFilesFromIncludeDir(IncludeDir.getFrameworkDir()->getName(), IsSystem, + DirectoryLookup::LT_Framework); break; } }; @@ -8430,7 +8484,8 @@ void Sema::CodeCompleteIncludedFile(llvm::StringRef Dir, bool Angled) { // The current directory is on the include path for "quoted" includes. auto *CurFile = PP.getCurrentFileLexer()->getFileEntry(); if (CurFile && CurFile->getDir()) - AddFilesFromIncludeDir(CurFile->getDir()->getName(), false); + AddFilesFromIncludeDir(CurFile->getDir()->getName(), false, + DirectoryLookup::LT_NormalDir); for (const auto &D : make_range(S.quoted_dir_begin(), S.quoted_dir_end())) AddFilesFromDirLookup(D, false); } diff --git a/clang/lib/Sema/SemaCoroutine.cpp b/clang/lib/Sema/SemaCoroutine.cpp index 28386d49d2bec..22a12801da64e 100644 --- a/clang/lib/Sema/SemaCoroutine.cpp +++ b/clang/lib/Sema/SemaCoroutine.cpp @@ -1,4 +1,4 @@ -//===--- SemaCoroutines.cpp - Semantic Analysis for Coroutines ------------===// +//===-- SemaCoroutine.cpp - Semantic Analysis for Coroutines --------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp index 722e966cdee1e..725104c0d0b1c 100644 --- a/clang/lib/Sema/SemaDecl.cpp +++ b/clang/lib/Sema/SemaDecl.cpp @@ -1017,7 +1017,8 @@ Sema::ClassifyName(Scope *S, CXXScopeSpec &SS, IdentifierInfo *&Name, case LookupResult::Ambiguous: if (getLangOpts().CPlusPlus && NextToken.is(tok::less) && - hasAnyAcceptableTemplateNames(Result)) { + hasAnyAcceptableTemplateNames(Result, /*AllowFunctionTemplates=*/true, + /*AllowDependent=*/false)) { // C++ [temp.local]p3: // A lookup that finds an injected-class-name (10.2) can result in an // ambiguity in certain cases (for example, if it is found in more than @@ -1041,7 +1042,9 @@ Sema::ClassifyName(Scope *S, CXXScopeSpec &SS, IdentifierInfo *&Name, } if (getLangOpts().CPlusPlus && NextToken.is(tok::less) && - (IsFilteredTemplateName || hasAnyAcceptableTemplateNames(Result))) { + (IsFilteredTemplateName || + hasAnyAcceptableTemplateNames(Result, /*AllowFunctionTemplates=*/true, + /*AllowDependent=*/false))) { // C++ [temp.names]p3: // After name lookup (3.4) finds that a name is a template-name or that // an operator-function-id or a literal- operator-id refers to a set of @@ -1060,15 +1063,16 @@ Sema::ClassifyName(Scope *S, CXXScopeSpec &SS, IdentifierInfo *&Name, Template = Context.getOverloadedTemplateName(Result.begin(), Result.end()); } else { - TemplateDecl *TD - = cast((*Result.begin())->getUnderlyingDecl()); + auto *TD = cast(getAsTemplateNameDecl( + *Result.begin(), /*AllowFunctionTemplates=*/true, + /*AllowDependent=*/false)); IsFunctionTemplate = isa(TD); IsVarTemplate = isa(TD); if (SS.isSet() && !SS.isInvalid()) - Template = Context.getQualifiedTemplateName(SS.getScopeRep(), - /*TemplateKeyword=*/false, - TD); + Template = + Context.getQualifiedTemplateName(SS.getScopeRep(), + /*TemplateKeyword=*/false, TD); else Template = TemplateName(TD); } @@ -11250,6 +11254,11 @@ void Sema::AddInitializerToDecl(Decl *RealDecl, Expr *Init, bool DirectInit) { << Culprit->getSourceRange(); } } + + if (auto *E = dyn_cast(Init)) + if (auto *BE = dyn_cast(E->getSubExpr()->IgnoreParens())) + if (VDecl->hasLocalStorage()) + BE->getBlockDecl()->setCanAvoidCopyToHeap(); } else if (VDecl->isStaticDataMember() && !VDecl->isInline() && VDecl->getLexicalDeclContext()->isRecord()) { // This is an in-class initialization for a static data member, e.g., @@ -13109,7 +13118,7 @@ Decl *Sema::ActOnFinishFunctionBody(Decl *dcl, Stmt *Body, sema::AnalysisBasedWarnings::Policy WP = AnalysisWarnings.getDefaultPolicy(); sema::AnalysisBasedWarnings::Policy *ActivePolicy = nullptr; - if (getLangOpts().CoroutinesTS && getCurFunction()->isCoroutine()) + if (getLangOpts().Coroutines && getCurFunction()->isCoroutine()) CheckCompletedCoroutineBody(FD, Body); // Do not call PopExpressionEvaluationContext() if it is a lambda because one @@ -15913,6 +15922,10 @@ void Sema::ActOnFields(Scope *S, SourceLocation RecLoc, Decl *EnclosingDecl, Record->setHasObjectMember(true); if (Record && FDTTy->getDecl()->hasVolatileMember()) Record->setHasVolatileMember(true); + if (Record && Record->isUnion() && + FD->getType().isNonTrivialPrimitiveCType(Context)) + Diag(FD->getLocation(), + diag::err_nontrivial_primitive_type_in_union); } else if (FDTy->isObjCObjectType()) { /// A field cannot be an Objective-c object Diag(FD->getLocation(), diag::err_statically_allocated_object) diff --git a/clang/lib/Sema/SemaDeclAttr.cpp b/clang/lib/Sema/SemaDeclAttr.cpp index be8c09e2a9ae1..6814f1c7e38b8 100644 --- a/clang/lib/Sema/SemaDeclAttr.cpp +++ b/clang/lib/Sema/SemaDeclAttr.cpp @@ -245,11 +245,11 @@ static bool checkUInt32Argument(Sema &S, const AttrInfo &AI, const Expr *Expr, !Expr->isIntegerConstantExpr(I, S.Context)) { if (Idx != UINT_MAX) S.Diag(getAttrLoc(AI), diag::err_attribute_argument_n_type) - << AI << Idx << AANT_ArgumentIntegerConstant + << &AI << Idx << AANT_ArgumentIntegerConstant << Expr->getSourceRange(); else S.Diag(getAttrLoc(AI), diag::err_attribute_argument_type) - << AI << AANT_ArgumentIntegerConstant << Expr->getSourceRange(); + << &AI << AANT_ArgumentIntegerConstant << Expr->getSourceRange(); return false; } @@ -261,7 +261,7 @@ static bool checkUInt32Argument(Sema &S, const AttrInfo &AI, const Expr *Expr, if (StrictlyUnsigned && I.isSigned() && I.isNegative()) { S.Diag(getAttrLoc(AI), diag::err_attribute_requires_positive_integer) - << AI << /*non-negative*/ 1; + << &AI << /*non-negative*/ 1; return false; } @@ -716,7 +716,8 @@ static void checkAttrArgsAreCapabilityObjs(Sema &S, Decl *D, uint64_t ParamIdxFromOne = ArgValue.getZExtValue(); uint64_t ParamIdxFromZero = ParamIdxFromOne - 1; if (!ArgValue.isStrictlyPositive() || ParamIdxFromOne > NumParams) { - S.Diag(AL.getLoc(), diag::err_attribute_argument_out_of_range) + S.Diag(AL.getLoc(), + diag::err_attribute_argument_out_of_bounds_extra_info) << AL << Idx + 1 << NumParams; continue; } @@ -1118,7 +1119,7 @@ static void handlePassObjectSizeAttr(Sema &S, Decl *D, const ParsedAttr &AL) { // __builtin_object_size. So, it has the same constraints as that second // argument; namely, it must be in the range [0, 3]. if (Type > 3) { - S.Diag(E->getBeginLoc(), diag::err_attribute_argument_outof_range) + S.Diag(E->getBeginLoc(), diag::err_attribute_argument_out_of_range) << AL << 0 << 3 << E->getSourceRange(); return; } @@ -3299,7 +3300,7 @@ static void handleInitPriorityAttr(Sema &S, Decl *D, const ParsedAttr &AL) { } if (prioritynum < 101 || prioritynum > 65535) { - S.Diag(AL.getLoc(), diag::err_attribute_argument_outof_range) + S.Diag(AL.getLoc(), diag::err_attribute_argument_out_of_range) << E->getSourceRange() << AL << 101 << 65535; AL.setInvalid(); return; @@ -3762,6 +3763,60 @@ static void handleAlignedAttr(Sema &S, Decl *D, const ParsedAttr &AL) { AL.isPackExpansion()); } +template +bool Sema::checkRangedIntegralArgument(Expr *E, const AttrType *TmpAttr, + ExprResult &Result) { + llvm::APSInt Value; + Result = VerifyIntegerConstantExpression(E, &Value); + if (Result.isInvalid()) + return true; + + if (Value < AttrType::getMinValue() || Value > AttrType::getMaxValue()) { + Diag(TmpAttr->getRange().getBegin(), + diag::err_attribute_argument_out_of_range) + << TmpAttr << AttrType::getMinValue() << AttrType::getMaxValue() + << E->getSourceRange(); + return true; + } + return false; +} + +template +void Sema::AddOneConstantPowerTwoValueAttr(SourceRange AttrRange, Decl *D, + Expr *E, + unsigned SpellingListIndex) { + AttrType TmpAttr(AttrRange, Context, E, SpellingListIndex); + + if (!E->isValueDependent()) { + ExprResult ICE; + if (checkRangedIntegralArgument(E, &TmpAttr, ICE)) + return; + Expr::EvalResult Result; + E->EvaluateAsInt(Result, Context); + llvm::APSInt Value = Result.Val.getInt(); + if (!Value.isPowerOf2()) { + Diag(AttrRange.getBegin(), diag::err_attribute_argument_not_power_of_two) + << &TmpAttr; + return; + } + E = ICE.get(); + } + + if (!D->hasAttr()) + D->addAttr(IntelFPGAMemoryAttr::CreateImplicit( + Context, IntelFPGAMemoryAttr::Default)); + + // We are adding a user NumBanks, drop any implicit default. + if (IntelFPGANumBanksAttr::classof(&TmpAttr)) { + if (auto *NBA = D->getAttr()) + if (NBA->isImplicit()) + D->dropAttr(); + } + + D->addAttr(::new (Context) + AttrType(AttrRange, Context, E, SpellingListIndex)); +} + void Sema::AddAlignedAttr(SourceRange AttrRange, Decl *D, Expr *E, unsigned SpellingListIndex, bool IsPackExpansion) { AlignedAttr TmpAttr(AttrRange, Context, true, E, SpellingListIndex); @@ -4614,8 +4669,40 @@ bool Sema::CheckCallingConvAttr(const ParsedAttr &Attrs, CallingConv &CC, default: llvm_unreachable("unexpected attribute kind"); } + TargetInfo::CallingConvCheckResult A = TargetInfo::CCCR_OK; const TargetInfo &TI = Context.getTargetInfo(); - TargetInfo::CallingConvCheckResult A = TI.checkCallingConvention(CC); + // CUDA functions may have host and/or device attributes which indicate + // their targeted execution environment, therefore the calling convention + // of functions in CUDA should be checked against the target deduced based + // on their host/device attributes. + if (LangOpts.CUDA) { + auto *Aux = Context.getAuxTargetInfo(); + auto CudaTarget = IdentifyCUDATarget(FD); + bool CheckHost = false, CheckDevice = false; + switch (CudaTarget) { + case CFT_HostDevice: + CheckHost = true; + CheckDevice = true; + break; + case CFT_Host: + CheckHost = true; + break; + case CFT_Device: + case CFT_Global: + CheckDevice = true; + break; + case CFT_InvalidTarget: + llvm_unreachable("unexpected cuda target"); + } + auto *HostTI = LangOpts.CUDAIsDevice ? Aux : &TI; + auto *DeviceTI = LangOpts.CUDAIsDevice ? &TI : Aux; + if (CheckHost && HostTI) + A = HostTI->checkCallingConvention(CC); + if (A == TargetInfo::CCCR_OK && CheckDevice && DeviceTI) + A = DeviceTI->checkCallingConvention(CC); + } else { + A = TI.checkCallingConvention(CC); + } if (A != TargetInfo::CCCR_OK) { if (A == TargetInfo::CCCR_Warning) Diag(Attrs.getLoc(), diag::warn_cconv_ignored) << Attrs; @@ -4891,6 +4978,102 @@ static void handleTypeTagForDatatypeAttr(Sema &S, Decl *D, AL.getAttributeSpellingListIndex())); } +/// Give a warning for duplicate attributes, return true if duplicate. +template +static bool checkForDuplicateAttribute(Sema &S, Decl *D, + const ParsedAttr &Attr) { + // Give a warning for duplicates but not if it's one we've implicitly added. + auto *A = D->getAttr(); + if (A && !A->isImplicit()) { + S.Diag(Attr.getLoc(), diag::warn_duplicate_attribute_exact) << A; + return true; + } + return false; +} + +/// Handle the __memory__ attribute. +/// This is incompatible with the __register__ attribute. +static void handleIntelFPGAMemoryAttr(Sema &S, Decl *D, + const ParsedAttr &Attr) { + + checkForDuplicateAttribute(S, D, Attr); + if (checkAttrMutualExclusion(S, D, Attr)) + return; + + IntelFPGAMemoryAttr::MemoryKind Kind; + if (Attr.getNumArgs() == 0) + Kind = IntelFPGAMemoryAttr::Default; + else { + StringRef Str; + if (!S.checkStringLiteralArgumentAttr(Attr, 0, Str)) + return; + if (Str.empty() || + !IntelFPGAMemoryAttr::ConvertStrToMemoryKind(Str, Kind)) { + SmallString<256> ValidStrings; + IntelFPGAMemoryAttr::generateValidStrings(ValidStrings); + S.Diag(Attr.getLoc(), diag::err_intel_fpga_memory_arg_invalid) + << Attr << ValidStrings; + return; + } + } + + // We are adding a user memory attribute, drop any implicit default. + if (auto *MA = D->getAttr()) + if (MA->isImplicit()) + D->dropAttr(); + + D->addAttr(::new (S.Context) IntelFPGAMemoryAttr( + Attr.getRange(), S.Context, Kind, Attr.getAttributeSpellingListIndex())); +} + +/// Check for and diagnose attributes incompatible with register. +/// return true if any incompatible attributes exist. +static bool checkIntelFPGARegisterAttrCompatibility(Sema &S, Decl *D, + const ParsedAttr &Attr) { + bool InCompat = false; + if (auto *MA = D->getAttr()) + if (!MA->isImplicit() && + checkAttrMutualExclusion(S, D, Attr)) + InCompat = true; + if (checkAttrMutualExclusion(S, D, Attr)) + InCompat = true; + if (auto *NBA = D->getAttr()) + if (!NBA->isImplicit() && + checkAttrMutualExclusion(S, D, Attr)) + InCompat = true; + + return InCompat; +} + +/// Handle the __register__ attribute. +/// This is incompatible with most of the other memory attributes. +static void handleIntelFPGARegisterAttr(Sema &S, Decl *D, + const ParsedAttr &Attr) { + + checkForDuplicateAttribute(S, D, Attr); + if (checkIntelFPGARegisterAttrCompatibility(S, D, Attr)) + return; + + handleSimpleAttribute(S, D, Attr); +} + +/// Handle the bankwidth and numbanks attributes. +/// These require a single constant power of two greater than zero. +/// These are incompatible with the register attribute. +/// The numbanks and bank_bits attributes are related. If bank_bits exists +/// when handling numbanks they are checked for consistency. +template +static void handleOneConstantPowerTwoValueAttr(Sema &S, Decl *D, + const ParsedAttr &Attr) { + checkForDuplicateAttribute(S, D, Attr); + if (checkAttrMutualExclusion(S, D, Attr)) + return; + + S.AddOneConstantPowerTwoValueAttr( + Attr.getRange(), D, Attr.getArgAsExpr(0), + Attr.getAttributeSpellingListIndex()); +} + static void handleXRayLogArgsAttr(Sema &S, Decl *D, const ParsedAttr &AL) { ParamIdx ArgCount; @@ -5248,11 +5431,22 @@ static void handleObjCBridgeRelatedAttr(Sema &S, Decl *D, static void handleObjCDesignatedInitializer(Sema &S, Decl *D, const ParsedAttr &AL) { + DeclContext *Ctx = D->getDeclContext(); + + // This attribute can only be applied to methods in interfaces or class + // extensions. + if (!isa(Ctx) && + !(isa(Ctx) && + cast(Ctx)->IsClassExtension())) { + S.Diag(D->getLocation(), diag::err_designated_init_attr_non_init); + return; + } + ObjCInterfaceDecl *IFace; - if (auto *CatDecl = dyn_cast(D->getDeclContext())) + if (auto *CatDecl = dyn_cast(Ctx)) IFace = CatDecl->getClassInterface(); else - IFace = cast(D->getDeclContext()); + IFace = cast(Ctx); if (!IFace) return; @@ -5841,57 +6035,115 @@ static void handleInterruptAttr(Sema &S, Decl *D, const ParsedAttr &AL) { } } -static void handleAMDGPUFlatWorkGroupSizeAttr(Sema &S, Decl *D, - const ParsedAttr &AL) { +static bool +checkAMDGPUFlatWorkGroupSizeArguments(Sema &S, Expr *MinExpr, Expr *MaxExpr, + const AMDGPUFlatWorkGroupSizeAttr &Attr) { + // Accept template arguments for now as they depend on something else. + // We'll get to check them when they eventually get instantiated. + if (MinExpr->isValueDependent() || MaxExpr->isValueDependent()) + return false; + uint32_t Min = 0; - Expr *MinExpr = AL.getArgAsExpr(0); - if (!checkUInt32Argument(S, AL, MinExpr, Min)) - return; + if (!checkUInt32Argument(S, Attr, MinExpr, Min, 0)) + return true; uint32_t Max = 0; - Expr *MaxExpr = AL.getArgAsExpr(1); - if (!checkUInt32Argument(S, AL, MaxExpr, Max)) - return; + if (!checkUInt32Argument(S, Attr, MaxExpr, Max, 1)) + return true; if (Min == 0 && Max != 0) { - S.Diag(AL.getLoc(), diag::err_attribute_argument_invalid) << AL << 0; - return; + S.Diag(Attr.getLocation(), diag::err_attribute_argument_invalid) + << &Attr << 0; + return true; } if (Min > Max) { - S.Diag(AL.getLoc(), diag::err_attribute_argument_invalid) << AL << 1; - return; + S.Diag(Attr.getLocation(), diag::err_attribute_argument_invalid) + << &Attr << 1; + return true; } - D->addAttr(::new (S.Context) - AMDGPUFlatWorkGroupSizeAttr(AL.getLoc(), S.Context, Min, Max, - AL.getAttributeSpellingListIndex())); + return false; } -static void handleAMDGPUWavesPerEUAttr(Sema &S, Decl *D, const ParsedAttr &AL) { - uint32_t Min = 0; - Expr *MinExpr = AL.getArgAsExpr(0); - if (!checkUInt32Argument(S, AL, MinExpr, Min)) +void Sema::addAMDGPUFlatWorkGroupSizeAttr(SourceRange AttrRange, Decl *D, + Expr *MinExpr, Expr *MaxExpr, + unsigned SpellingListIndex) { + AMDGPUFlatWorkGroupSizeAttr TmpAttr(AttrRange, Context, MinExpr, MaxExpr, + SpellingListIndex); + + if (checkAMDGPUFlatWorkGroupSizeArguments(*this, MinExpr, MaxExpr, TmpAttr)) return; + D->addAttr(::new (Context) AMDGPUFlatWorkGroupSizeAttr( + AttrRange, Context, MinExpr, MaxExpr, SpellingListIndex)); +} + +static void handleAMDGPUFlatWorkGroupSizeAttr(Sema &S, Decl *D, + const ParsedAttr &AL) { + Expr *MinExpr = AL.getArgAsExpr(0); + Expr *MaxExpr = AL.getArgAsExpr(1); + + S.addAMDGPUFlatWorkGroupSizeAttr(AL.getRange(), D, MinExpr, MaxExpr, + AL.getAttributeSpellingListIndex()); +} + +static bool checkAMDGPUWavesPerEUArguments(Sema &S, Expr *MinExpr, + Expr *MaxExpr, + const AMDGPUWavesPerEUAttr &Attr) { + if (S.DiagnoseUnexpandedParameterPack(MinExpr) || + (MaxExpr && S.DiagnoseUnexpandedParameterPack(MaxExpr))) + return true; + + // Accept template arguments for now as they depend on something else. + // We'll get to check them when they eventually get instantiated. + if (MinExpr->isValueDependent() || (MaxExpr && MaxExpr->isValueDependent())) + return false; + + uint32_t Min = 0; + if (!checkUInt32Argument(S, Attr, MinExpr, Min, 0)) + return true; + uint32_t Max = 0; - if (AL.getNumArgs() == 2) { - Expr *MaxExpr = AL.getArgAsExpr(1); - if (!checkUInt32Argument(S, AL, MaxExpr, Max)) - return; - } + if (MaxExpr && !checkUInt32Argument(S, Attr, MaxExpr, Max, 1)) + return true; if (Min == 0 && Max != 0) { - S.Diag(AL.getLoc(), diag::err_attribute_argument_invalid) << AL << 0; - return; + S.Diag(Attr.getLocation(), diag::err_attribute_argument_invalid) + << &Attr << 0; + return true; } if (Max != 0 && Min > Max) { - S.Diag(AL.getLoc(), diag::err_attribute_argument_invalid) << AL << 1; - return; + S.Diag(Attr.getLocation(), diag::err_attribute_argument_invalid) + << &Attr << 1; + return true; } - D->addAttr(::new (S.Context) - AMDGPUWavesPerEUAttr(AL.getLoc(), S.Context, Min, Max, - AL.getAttributeSpellingListIndex())); + return false; +} + +void Sema::addAMDGPUWavesPerEUAttr(SourceRange AttrRange, Decl *D, + Expr *MinExpr, Expr *MaxExpr, + unsigned SpellingListIndex) { + AMDGPUWavesPerEUAttr TmpAttr(AttrRange, Context, MinExpr, MaxExpr, + SpellingListIndex); + + if (checkAMDGPUWavesPerEUArguments(*this, MinExpr, MaxExpr, TmpAttr)) + return; + + D->addAttr(::new (Context) AMDGPUWavesPerEUAttr(AttrRange, Context, MinExpr, + MaxExpr, SpellingListIndex)); +} + +static void handleAMDGPUWavesPerEUAttr(Sema &S, Decl *D, const ParsedAttr &AL) { + if (!checkAttributeAtLeastNumArgs(S, AL, 1) || + !checkAttributeAtMostNumArgs(S, AL, 2)) + return; + + Expr *MinExpr = AL.getArgAsExpr(0); + Expr *MaxExpr = (AL.getNumArgs() > 1) ? AL.getArgAsExpr(1) : nullptr; + + S.addAMDGPUWavesPerEUAttr(AL.getRange(), D, MinExpr, MaxExpr, + AL.getAttributeSpellingListIndex()); } static void handleAMDGPUNumSGPRAttr(Sema &S, Decl *D, const ParsedAttr &AL) { @@ -6199,7 +6451,8 @@ static void handleNoSanitizeAttr(Sema &S, Decl *D, const ParsedAttr &AL) { if (!S.checkStringLiteralArgumentAttr(AL, I, SanitizerName, &LiteralLoc)) return; - if (parseSanitizerValue(SanitizerName, /*AllowGroups=*/true) == 0) + if (parseSanitizerValue(SanitizerName, /*AllowGroups=*/true) == + SanitizerMask()) S.Diag(LiteralLoc, diag::warn_unknown_sanitizer_ignored) << SanitizerName; else if (isGlobalVar(D) && SanitizerName != "address") S.Diag(D->getLocation(), diag::err_attribute_wrong_decl_type) @@ -6312,7 +6565,9 @@ static void handleOpenCLAccessAttr(Sema &S, Decl *D, const ParsedAttr &AL) { if (const auto *PDecl = dyn_cast(D)) { const Type *DeclTy = PDecl->getType().getCanonicalType().getTypePtr(); if (AL.getName()->getName().find("read_write") != StringRef::npos) { - if (S.getLangOpts().OpenCLVersion < 200 || DeclTy->isPipeType()) { + if ((!S.getLangOpts().OpenCLCPlusPlus && + S.getLangOpts().OpenCLVersion < 200) || + DeclTy->isPipeType()) { S.Diag(AL.getLoc(), diag::err_opencl_invalid_read_write) << AL << PDecl->getType() << DeclTy->isImageType(); D->setInvalidDecl(true); @@ -6419,6 +6674,53 @@ static void handleObjCExternallyRetainedAttr(Sema &S, Decl *D, handleSimpleAttribute(S, D, AL); } +static void handleFortifyStdLib(Sema &S, Decl *D, const ParsedAttr &AL) { + auto *FD = cast(D); + unsigned VariantID = Builtin::getFortifiedVariantFunction(FD->getBuiltinID()); + if (VariantID == 0) { + S.Diag(D->getLocation(), diag::err_fortify_std_lib_bad_decl); + return; + } + + uint32_t BOSType, Flag; + if (!checkUInt32Argument(S, AL, AL.getArgAsExpr(0), BOSType, 0, true) || + !checkUInt32Argument(S, AL, AL.getArgAsExpr(1), Flag, 1, true)) + return; + + if (BOSType > 3) { + S.Diag(AL.getArgAsExpr(0)->getBeginLoc(), + diag::err_attribute_argument_out_of_range) + << AL << 0 << 3; + return; + } + + D->addAttr(::new (S.getASTContext()) FortifyStdLibAttr( + AL.getLoc(), S.getASTContext(), BOSType, Flag, + AL.getAttributeSpellingListIndex())); +} + +static void handleMIGServerRoutineAttr(Sema &S, Decl *D, const ParsedAttr &AL) { + // Check that the return type is a `typedef int kern_return_t` or a typedef + // around it, because otherwise MIG convention checks make no sense. + // BlockDecl doesn't store a return type, so it's annoying to check, + // so let's skip it for now. + if (!isa(D)) { + QualType T = getFunctionOrMethodResultType(D); + bool IsKernReturnT = false; + while (const auto *TT = T->getAs()) { + IsKernReturnT = (TT->getDecl()->getName() == "kern_return_t"); + T = TT->desugar(); + } + if (!IsKernReturnT || T.getCanonicalType() != S.getASTContext().IntTy) { + S.Diag(D->getBeginLoc(), + diag::warn_mig_server_routine_does_not_return_kern_return_t); + return; + } + } + + handleSimpleAttribute(S, D, AL); +} + //===----------------------------------------------------------------------===// // Top Level Sema Entry Points //===----------------------------------------------------------------------===// @@ -6835,6 +7137,9 @@ static void ProcessDeclAttribute(Sema &S, Scope *scope, Decl *D, case ParsedAttr::AT_ObjCRootClass: handleSimpleAttribute(S, D, AL); break; + case ParsedAttr::AT_ObjCNonLazyClass: + handleSimpleAttribute(S, D, AL); + break; case ParsedAttr::AT_ObjCSubclassingRestricted: handleSimpleAttribute(S, D, AL); break; @@ -7117,6 +7422,21 @@ static void ProcessDeclAttribute(Sema &S, Scope *scope, Decl *D, case ParsedAttr::AT_TypeTagForDatatype: handleTypeTagForDatatypeAttr(S, D, AL); break; + + // Intel FPGA specific attributes + case ParsedAttr::AT_IntelFPGAMemory: + handleIntelFPGAMemoryAttr(S, D, AL); + break; + case ParsedAttr::AT_IntelFPGARegister: + handleIntelFPGARegisterAttr(S, D, AL); + break; + case ParsedAttr::AT_IntelFPGABankWidth: + handleOneConstantPowerTwoValueAttr(S, D, AL); + break; + case ParsedAttr::AT_IntelFPGANumBanks: + handleOneConstantPowerTwoValueAttr(S, D, AL); + break; + case ParsedAttr::AT_AnyX86NoCallerSavedRegisters: handleSimpleAttribute(S, D, AL); break; @@ -7148,6 +7468,14 @@ static void ProcessDeclAttribute(Sema &S, Scope *scope, Decl *D, case ParsedAttr::AT_ObjCExternallyRetained: handleObjCExternallyRetainedAttr(S, D, AL); break; + + case ParsedAttr::AT_FortifyStdLib: + handleFortifyStdLib(S, D, AL); + break; + + case ParsedAttr::AT_MIGServerRoutine: + handleMIGServerRoutineAttr(S, D, AL); + break; } } @@ -7213,6 +7541,17 @@ void Sema::ProcessDeclAttributeList(Scope *S, Decl *D, } } } + + // Do this check after processing D's attributes because the attribute + // objc_method_family can change whether the given method is in the init + // family, and it can be applied after objc_designated_initializer. This is a + // bit of a hack, but we need it to be compatible with versions of clang that + // processed the attribute list in the wrong order. + if (D->hasAttr() && + cast(D)->getMethodFamily() != OMF_init) { + Diag(D->getLocation(), diag::err_designated_init_attr_non_init); + D->dropAttr(); + } } // Helper for delayed processing TransparentUnion attribute. diff --git a/clang/lib/Sema/SemaDeclCXX.cpp b/clang/lib/Sema/SemaDeclCXX.cpp index c54e700f51ca7..55e176f4c7d70 100644 --- a/clang/lib/Sema/SemaDeclCXX.cpp +++ b/clang/lib/Sema/SemaDeclCXX.cpp @@ -1128,7 +1128,6 @@ static bool checkTupleLikeDecomposition(Sema &S, } } } - S.FilterAcceptableTemplateNames(MemberGet); } unsigned I = 0; @@ -3175,7 +3174,11 @@ Sema::ActOnCXXMemberDeclarator(Scope *S, AccessSpecifier AS, Declarator &D, // declared] with the same access [as the template]. if (auto *DG = dyn_cast(NonTemplateMember)) { auto *TD = DG->getDeducedTemplate(); - if (AS != TD->getAccess()) { + // Access specifiers are only meaningful if both the template and the + // deduction guide are from the same scope. + if (AS != TD->getAccess() && + TD->getDeclContext()->getRedeclContext()->Equals( + DG->getDeclContext()->getRedeclContext())) { Diag(DG->getBeginLoc(), diag::err_deduction_guide_wrong_access); Diag(TD->getBeginLoc(), diag::note_deduction_guide_template_access) << TD->getAccess(); @@ -7968,14 +7971,14 @@ void Sema::ActOnFinishCXXMemberSpecification( /// definition of the class is complete. void Sema::AddImplicitlyDeclaredMembersToClass(CXXRecordDecl *ClassDecl) { if (ClassDecl->needsImplicitDefaultConstructor()) { - ++ASTContext::NumImplicitDefaultConstructors; + ++getASTContext().NumImplicitDefaultConstructors; if (ClassDecl->hasInheritedConstructor()) DeclareImplicitDefaultConstructor(ClassDecl); } if (ClassDecl->needsImplicitCopyConstructor()) { - ++ASTContext::NumImplicitCopyConstructors; + ++getASTContext().NumImplicitCopyConstructors; // If the properties or semantics of the copy constructor couldn't be // determined while the class was being declared, force a declaration @@ -7997,7 +8000,7 @@ void Sema::AddImplicitlyDeclaredMembersToClass(CXXRecordDecl *ClassDecl) { } if (getLangOpts().CPlusPlus11 && ClassDecl->needsImplicitMoveConstructor()) { - ++ASTContext::NumImplicitMoveConstructors; + ++getASTContext().NumImplicitMoveConstructors; if (ClassDecl->needsOverloadResolutionForMoveConstructor() || ClassDecl->hasInheritedConstructor()) @@ -8005,7 +8008,7 @@ void Sema::AddImplicitlyDeclaredMembersToClass(CXXRecordDecl *ClassDecl) { } if (ClassDecl->needsImplicitCopyAssignment()) { - ++ASTContext::NumImplicitCopyAssignmentOperators; + ++getASTContext().NumImplicitCopyAssignmentOperators; // If we have a dynamic class, then the copy assignment operator may be // virtual, so we have to declare it immediately. This ensures that, e.g., @@ -8018,7 +8021,7 @@ void Sema::AddImplicitlyDeclaredMembersToClass(CXXRecordDecl *ClassDecl) { } if (getLangOpts().CPlusPlus11 && ClassDecl->needsImplicitMoveAssignment()) { - ++ASTContext::NumImplicitMoveAssignmentOperators; + ++getASTContext().NumImplicitMoveAssignmentOperators; // Likewise for the move assignment operator. if (ClassDecl->isDynamicClass() || @@ -8028,7 +8031,7 @@ void Sema::AddImplicitlyDeclaredMembersToClass(CXXRecordDecl *ClassDecl) { } if (ClassDecl->needsImplicitDestructor()) { - ++ASTContext::NumImplicitDestructors; + ++getASTContext().NumImplicitDestructors; // If we have a dynamic class, then the destructor may be virtual, so we // have to declare the destructor immediately. This ensures that, e.g., it @@ -11010,7 +11013,7 @@ CXXConstructorDecl *Sema::DeclareImplicitDefaultConstructor( DefaultCon->setTrivial(ClassDecl->hasTrivialDefaultConstructor()); // Note that we have declared this constructor. - ++ASTContext::NumImplicitDefaultConstructorsDeclared; + ++getASTContext().NumImplicitDefaultConstructorsDeclared; Scope *S = getScopeForContext(ClassDecl); CheckImplicitSpecialMemberDeclaration(S, DefaultCon); @@ -11283,7 +11286,7 @@ CXXDestructorDecl *Sema::DeclareImplicitDestructor(CXXRecordDecl *ClassDecl) { ClassDecl->hasTrivialDestructorForCall()); // Note that we have declared this destructor. - ++ASTContext::NumImplicitDestructorsDeclared; + ++getASTContext().NumImplicitDestructorsDeclared; Scope *S = getScopeForContext(ClassDecl); CheckImplicitSpecialMemberDeclaration(S, Destructor); @@ -11893,7 +11896,7 @@ CXXMethodDecl *Sema::DeclareImplicitCopyAssignment(CXXRecordDecl *ClassDecl) { : ClassDecl->hasTrivialCopyAssignment()); // Note that we have added this copy-assignment operator. - ++ASTContext::NumImplicitCopyAssignmentOperatorsDeclared; + ++getASTContext().NumImplicitCopyAssignmentOperatorsDeclared; Scope *S = getScopeForContext(ClassDecl); CheckImplicitSpecialMemberDeclaration(S, CopyAssignment); @@ -12216,7 +12219,7 @@ CXXMethodDecl *Sema::DeclareImplicitMoveAssignment(CXXRecordDecl *ClassDecl) { : ClassDecl->hasTrivialMoveAssignment()); // Note that we have added this copy-assignment operator. - ++ASTContext::NumImplicitMoveAssignmentOperatorsDeclared; + ++getASTContext().NumImplicitMoveAssignmentOperatorsDeclared; Scope *S = getScopeForContext(ClassDecl); CheckImplicitSpecialMemberDeclaration(S, MoveAssignment); @@ -12599,7 +12602,7 @@ CXXConstructorDecl *Sema::DeclareImplicitCopyConstructor( : ClassDecl->hasTrivialCopyConstructorForCall())); // Note that we have declared this constructor. - ++ASTContext::NumImplicitCopyConstructorsDeclared; + ++getASTContext().NumImplicitCopyConstructorsDeclared; Scope *S = getScopeForContext(ClassDecl); CheckImplicitSpecialMemberDeclaration(S, CopyConstructor); @@ -12729,7 +12732,7 @@ CXXConstructorDecl *Sema::DeclareImplicitMoveConstructor( : ClassDecl->hasTrivialMoveConstructorForCall())); // Note that we have declared this constructor. - ++ASTContext::NumImplicitMoveConstructorsDeclared; + ++getASTContext().NumImplicitMoveConstructorsDeclared; Scope *S = getScopeForContext(ClassDecl); CheckImplicitSpecialMemberDeclaration(S, MoveConstructor); diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp index b675986f56bdc..187d8e2fdddbb 100644 --- a/clang/lib/Sema/SemaExpr.cpp +++ b/clang/lib/Sema/SemaExpr.cpp @@ -5793,18 +5793,36 @@ ExprResult Sema::BuildResolvedCallExpr(Expr *Fn, NamedDecl *NDecl, } if (!getLangOpts().CPlusPlus) { + // Forget about the nulled arguments since typo correction + // do not handle them well. + TheCall->shrinkNumArgs(Args.size()); // C cannot always handle TypoExpr nodes in builtin calls and direct // function calls as their argument checking don't necessarily handle // dependent types properly, so make sure any TypoExprs have been // dealt with. ExprResult Result = CorrectDelayedTyposInExpr(TheCall); if (!Result.isUsable()) return ExprError(); + CallExpr *TheOldCall = TheCall; TheCall = dyn_cast(Result.get()); + bool CorrectedTypos = TheCall != TheOldCall; if (!TheCall) return Result; - // TheCall at this point has max(Args.size(), NumParams) arguments, - // with extra arguments nulled. We don't want to introduce nulled - // arguments in Args and so we only take the first Args.size() arguments. - Args = llvm::makeArrayRef(TheCall->getArgs(), Args.size()); + Args = llvm::makeArrayRef(TheCall->getArgs(), TheCall->getNumArgs()); + + // A new call expression node was created if some typos were corrected. + // However it may not have been constructed with enough storage. In this + // case, rebuild the node with enough storage. The waste of space is + // immaterial since this only happens when some typos were corrected. + if (CorrectedTypos && Args.size() < NumParams) { + if (Config) + TheCall = CUDAKernelCallExpr::Create( + Context, Fn, cast(Config), Args, ResultTy, VK_RValue, + RParenLoc, NumParams); + else + TheCall = CallExpr::Create(Context, Fn, Args, ResultTy, VK_RValue, + RParenLoc, NumParams, UsesADL); + } + // We can now handle the nulled arguments for the default arguments. + TheCall->setNumArgsUnsafe(std::max(Args.size(), NumParams)); } // Bail out early if calling a builtin with custom type checking. @@ -6134,6 +6152,7 @@ CastKind Sema::PrepareScalarCast(ExprResult &Src, QualType DestTy) { case Type::STK_Bool: return CK_FixedPointToBoolean; case Type::STK_Integral: + return CK_FixedPointToIntegral; case Type::STK_Floating: case Type::STK_IntegralComplex: case Type::STK_FloatingComplex: @@ -6178,10 +6197,7 @@ CastKind Sema::PrepareScalarCast(ExprResult &Src, QualType DestTy) { case Type::STK_MemberPointer: llvm_unreachable("member pointer type in C"); case Type::STK_FixedPoint: - Diag(Src.get()->getExprLoc(), - diag::err_unimplemented_conversion_with_fixed_point_type) - << SrcTy; - return CK_IntegralCast; + return CK_IntegralToFixedPoint; } llvm_unreachable("Should have returned before this"); @@ -12414,6 +12430,14 @@ ExprResult Sema::CreateBuiltinBinOp(SourceLocation OpLoc, } } + // Diagnose operations on the unsupported types for OpenMP device compilation. + if (getLangOpts().OpenMP && getLangOpts().OpenMPIsDevice) { + if (Opc != BO_Assign && Opc != BO_Comma) { + checkOpenMPDeviceExpr(LHSExpr); + checkOpenMPDeviceExpr(RHSExpr); + } + } + switch (Opc) { case BO_Assign: ResultTy = CheckAssignmentOperands(LHS.get(), RHS, OpLoc, QualType()); @@ -12425,6 +12449,25 @@ ExprResult Sema::CreateBuiltinBinOp(SourceLocation OpLoc, if (!ResultTy.isNull()) { DiagnoseSelfAssignment(*this, LHS.get(), RHS.get(), OpLoc, true); DiagnoseSelfMove(LHS.get(), RHS.get(), OpLoc); + + // Avoid copying a block to the heap if the block is assigned to a local + // auto variable that is declared in the same scope as the block. This + // optimization is unsafe if the local variable is declared in an outer + // scope. For example: + // + // BlockTy b; + // { + // b = ^{...}; + // } + // // It is unsafe to invoke the block here if it wasn't copied to the + // // heap. + // b(); + + if (auto *BE = dyn_cast(RHS.get()->IgnoreParens())) + if (auto *DRE = dyn_cast(LHS.get()->IgnoreParens())) + if (auto *VD = dyn_cast(DRE->getDecl())) + if (VD->hasLocalStorage() && getCurScope()->isDeclScope(VD)) + BE->getBlockDecl()->setCanAvoidCopyToHeap(); } RecordModifiableNonNullParam(*this, LHS.get()); break; @@ -12990,6 +13033,13 @@ ExprResult Sema::CreateBuiltinUnaryOp(SourceLocation OpLoc, << Input.get()->getSourceRange()); } } + // Diagnose operations on the unsupported types for OpenMP device compilation. + if (getLangOpts().OpenMP && getLangOpts().OpenMPIsDevice) { + if (UnaryOperator::isIncrementDecrementOp(Opc) || + UnaryOperator::isArithmeticOp(Opc)) + checkOpenMPDeviceExpr(InputExpr); + } + switch (Opc) { case UO_PreInc: case UO_PreDec: @@ -13283,29 +13333,6 @@ ExprResult Sema::ActOnAddrLabel(SourceLocation OpLoc, SourceLocation LabLoc, Context.getPointerType(Context.VoidTy)); } -/// Given the last statement in a statement-expression, check whether -/// the result is a producing expression (like a call to an -/// ns_returns_retained function) and, if so, rebuild it to hoist the -/// release out of the full-expression. Otherwise, return null. -/// Cannot fail. -static Expr *maybeRebuildARCConsumingStmt(Stmt *Statement) { - // Should always be wrapped with one of these. - ExprWithCleanups *cleanups = dyn_cast(Statement); - if (!cleanups) return nullptr; - - ImplicitCastExpr *cast = dyn_cast(cleanups->getSubExpr()); - if (!cast || cast->getCastKind() != CK_ARCConsumeObject) - return nullptr; - - // Splice out the cast. This shouldn't modify any interesting - // features of the statement. - Expr *producer = cast->getSubExpr(); - assert(producer->getType() == cast->getType()); - assert(producer->getValueKind() == cast->getValueKind()); - cleanups->setSubExpr(producer); - return cleanups; -} - void Sema::ActOnStartStmtExpr() { PushExpressionEvaluationContext(ExprEvalContexts.back().Context); } @@ -13339,47 +13366,10 @@ Sema::ActOnStmtExpr(SourceLocation LPLoc, Stmt *SubStmt, QualType Ty = Context.VoidTy; bool StmtExprMayBindToTemp = false; if (!Compound->body_empty()) { - Stmt *LastStmt = Compound->body_back(); - LabelStmt *LastLabelStmt = nullptr; - // If LastStmt is a label, skip down through into the body. - while (LabelStmt *Label = dyn_cast(LastStmt)) { - LastLabelStmt = Label; - LastStmt = Label->getSubStmt(); - } - - if (Expr *LastE = dyn_cast(LastStmt)) { - // Do function/array conversion on the last expression, but not - // lvalue-to-rvalue. However, initialize an unqualified type. - ExprResult LastExpr = DefaultFunctionArrayConversion(LastE); - if (LastExpr.isInvalid()) - return ExprError(); - Ty = LastExpr.get()->getType().getUnqualifiedType(); - - if (!Ty->isDependentType() && !LastExpr.get()->isTypeDependent()) { - // In ARC, if the final expression ends in a consume, splice - // the consume out and bind it later. In the alternate case - // (when dealing with a retainable type), the result - // initialization will create a produce. In both cases the - // result will be +1, and we'll need to balance that out with - // a bind. - if (Expr *rebuiltLastStmt - = maybeRebuildARCConsumingStmt(LastExpr.get())) { - LastExpr = rebuiltLastStmt; - } else { - LastExpr = PerformCopyInitialization( - InitializedEntity::InitializeStmtExprResult(LPLoc, Ty), - SourceLocation(), LastExpr); - } - - if (LastExpr.isInvalid()) - return ExprError(); - if (LastExpr.get() != nullptr) { - if (!LastLabelStmt) - Compound->setLastStmt(LastExpr.get()); - else - LastLabelStmt->setSubStmt(LastExpr.get()); - StmtExprMayBindToTemp = true; - } + if (const auto *LastStmt = dyn_cast(Compound->body_back())) { + if (const Expr *Value = LastStmt->getExprStmt()) { + StmtExprMayBindToTemp = true; + Ty = Value->getType(); } } } @@ -13392,6 +13382,37 @@ Sema::ActOnStmtExpr(SourceLocation LPLoc, Stmt *SubStmt, return ResStmtExpr; } +ExprResult Sema::ActOnStmtExprResult(ExprResult ER) { + if (ER.isInvalid()) + return ExprError(); + + // Do function/array conversion on the last expression, but not + // lvalue-to-rvalue. However, initialize an unqualified type. + ER = DefaultFunctionArrayConversion(ER.get()); + if (ER.isInvalid()) + return ExprError(); + Expr *E = ER.get(); + + if (E->isTypeDependent()) + return E; + + // In ARC, if the final expression ends in a consume, splice + // the consume out and bind it later. In the alternate case + // (when dealing with a retainable type), the result + // initialization will create a produce. In both cases the + // result will be +1, and we'll need to balance that out with + // a bind. + auto *Cast = dyn_cast(E); + if (Cast && Cast->getCastKind() == CK_ARCConsumeObject) + return Cast->getSubExpr(); + + // FIXME: Provide a better location for the initialization. + return PerformCopyInitialization( + InitializedEntity::InitializeStmtExprResult( + E->getBeginLoc(), E->getType().getUnqualifiedType()), + SourceLocation(), E); +} + ExprResult Sema::BuildBuiltinOffsetOf(SourceLocation BuiltinLoc, TypeSourceInfo *TInfo, ArrayRef Components, @@ -13920,6 +13941,11 @@ ExprResult Sema::BuildVAArgExpr(SourceLocation BuiltinLoc, } } + // NVPTX does not support va_arg expression. + if (getLangOpts().OpenMP && getLangOpts().OpenMPIsDevice && + Context.getTargetInfo().getTriple().isNVPTX()) + targetDiag(E->getBeginLoc(), diag::err_va_arg_in_device); + // It might be a __builtin_ms_va_list. (But don't ever mark a va_arg() // as Microsoft ABI on an actual Microsoft platform, where // __builtin_ms_va_list and __builtin_va_list are the same.) @@ -14472,14 +14498,6 @@ namespace { // Make sure we redo semantic analysis bool AlwaysRebuild() { return true; } - // Make sure we handle LabelStmts correctly. - // FIXME: This does the right thing, but maybe we need a more general - // fix to TreeTransform? - StmtResult TransformLabelStmt(LabelStmt *S) { - S->getDecl()->setStmt(nullptr); - return BaseTransform::TransformLabelStmt(S); - } - // We need to special-case DeclRefExprs referring to FieldDecls which // are not part of a member pointer formation; normal TreeTransforming // doesn't catch this case because of the way we represent them in the AST. @@ -14779,6 +14797,9 @@ void Sema::MarkFunctionReferenced(SourceLocation Loc, FunctionDecl *Func, if (FPT && isUnresolvedExceptionSpec(FPT->getExceptionSpecType())) ResolveExceptionSpec(Loc, FPT); + if (getLangOpts().CUDA) + CheckCUDACall(Loc, Func); + // If we don't need to mark the function as used, and we don't need to // try to provide a definition, there's nothing more to do. if ((Func->isUsed(/*CheckUsedAttr=*/false) || !OdrUse) && @@ -14896,6 +14917,9 @@ void Sema::MarkFunctionReferenced(SourceLocation Loc, FunctionDecl *Func, } Func->markUsed(Context); + + if (LangOpts.OpenMP && LangOpts.OpenMPIsDevice) + checkOpenMPDeviceFunction(Loc, Func); } static void diff --git a/clang/lib/Sema/SemaExprCXX.cpp b/clang/lib/Sema/SemaExprCXX.cpp index 5055e96cced8e..469bbf318ff15 100644 --- a/clang/lib/Sema/SemaExprCXX.cpp +++ b/clang/lib/Sema/SemaExprCXX.cpp @@ -750,12 +750,10 @@ ExprResult Sema::BuildCXXThrow(SourceLocation OpLoc, Expr *Ex, bool IsThrownVarInScope) { // Don't report an error if 'throw' is used in system headers. if (!getLangOpts().CXXExceptions && - !getSourceManager().isInSystemHeader(OpLoc) && - (!getLangOpts().OpenMPIsDevice || - !getLangOpts().OpenMPHostCXXExceptions || - isInOpenMPTargetExecutionDirective() || - isInOpenMPDeclareTargetContext())) - Diag(OpLoc, diag::err_exceptions_disabled) << "throw"; + !getSourceManager().isInSystemHeader(OpLoc) && !getLangOpts().CUDA) { + // Delay error emission for the OpenMP device code. + targetDiag(OpLoc, diag::err_exceptions_disabled) << "throw"; + } // Exceptions aren't allowed in CUDA device code. if (getLangOpts().CUDA) @@ -2797,7 +2795,8 @@ void Sema::DeclareGlobalAllocationFunction(DeclarationName Name, } } - FunctionProtoType::ExtProtoInfo EPI; + FunctionProtoType::ExtProtoInfo EPI(Context.getDefaultCallingConvention( + /*IsVariadic=*/false, /*IsCXXMethod=*/false)); QualType BadAllocType; bool HasBadAllocExceptionSpec diff --git a/clang/lib/Sema/SemaExprObjC.cpp b/clang/lib/Sema/SemaExprObjC.cpp index fdb59874cc964..4b7e320b15d6d 100644 --- a/clang/lib/Sema/SemaExprObjC.cpp +++ b/clang/lib/Sema/SemaExprObjC.cpp @@ -2805,8 +2805,8 @@ ExprResult Sema::BuildInstanceMessage(Expr *Receiver, } else { if (ObjCMethodDecl *CurMeth = getCurMethodDecl()) { if (ObjCInterfaceDecl *ClassDecl = CurMeth->getClassInterface()) { - // FIXME: Is this correct? Why are we assuming that a message to - // Class will call a method in the current interface? + // As a guess, try looking for the method in the current interface. + // This very well may not produce the "right" method. // First check the public methods in the class interface. Method = ClassDecl->lookupClassMethod(Sel); @@ -2814,8 +2814,7 @@ ExprResult Sema::BuildInstanceMessage(Expr *Receiver, if (!Method) Method = ClassDecl->lookupPrivateClassMethod(Sel); - if (Method && DiagnoseUseOfDecl(Method, SelectorSlotLocs, nullptr, - false, false, ClassDecl)) + if (Method && DiagnoseUseOfDecl(Method, SelectorSlotLocs)) return ExprError(); } } diff --git a/clang/lib/Sema/SemaInit.cpp b/clang/lib/Sema/SemaInit.cpp index d1416d0b07010..f08a9eb2e7c77 100644 --- a/clang/lib/Sema/SemaInit.cpp +++ b/clang/lib/Sema/SemaInit.cpp @@ -144,16 +144,43 @@ static StringInitFailureKind IsStringInit(Expr *init, QualType declType, static void updateStringLiteralType(Expr *E, QualType Ty) { while (true) { E->setType(Ty); - if (isa(E) || isa(E)) + E->setValueKind(VK_RValue); + if (isa(E) || isa(E)) { break; - else if (ParenExpr *PE = dyn_cast(E)) + } else if (ParenExpr *PE = dyn_cast(E)) { E = PE->getSubExpr(); - else if (UnaryOperator *UO = dyn_cast(E)) + } else if (UnaryOperator *UO = dyn_cast(E)) { + assert(UO->getOpcode() == UO_Extension); E = UO->getSubExpr(); - else if (GenericSelectionExpr *GSE = dyn_cast(E)) + } else if (GenericSelectionExpr *GSE = dyn_cast(E)) { E = GSE->getResultExpr(); - else + } else if (ChooseExpr *CE = dyn_cast(E)) { + E = CE->getChosenSubExpr(); + } else { llvm_unreachable("unexpected expr in string literal init"); + } + } +} + +/// Fix a compound literal initializing an array so it's correctly marked +/// as an rvalue. +static void updateGNUCompoundLiteralRValue(Expr *E) { + while (true) { + E->setValueKind(VK_RValue); + if (isa(E)) { + break; + } else if (ParenExpr *PE = dyn_cast(E)) { + E = PE->getSubExpr(); + } else if (UnaryOperator *UO = dyn_cast(E)) { + assert(UO->getOpcode() == UO_Extension); + E = UO->getSubExpr(); + } else if (GenericSelectionExpr *GSE = dyn_cast(E)) { + E = GSE->getResultExpr(); + } else if (ChooseExpr *CE = dyn_cast(E)) { + E = CE->getChosenSubExpr(); + } else { + llvm_unreachable("unexpected expr in array compound literal init"); + } } } @@ -4670,19 +4697,23 @@ static void TryReferenceInitializationCore(Sema &S, // applied. // Postpone address space conversions to after the temporary materialization // conversion to allow creating temporaries in the alloca address space. - auto AS1 = T1Quals.getAddressSpace(); - auto AS2 = T2Quals.getAddressSpace(); - T1Quals.removeAddressSpace(); - T2Quals.removeAddressSpace(); - QualType cv1T4 = S.Context.getQualifiedType(cv2T2, T1Quals); - if (T1Quals != T2Quals) + auto T1QualsIgnoreAS = T1Quals; + auto T2QualsIgnoreAS = T2Quals; + if (T1Quals.getAddressSpace() != T2Quals.getAddressSpace()) { + T1QualsIgnoreAS.removeAddressSpace(); + T2QualsIgnoreAS.removeAddressSpace(); + } + QualType cv1T4 = S.Context.getQualifiedType(cv2T2, T1QualsIgnoreAS); + if (T1QualsIgnoreAS != T2QualsIgnoreAS) Sequence.AddQualificationConversionStep(cv1T4, ValueKind); Sequence.AddReferenceBindingStep(cv1T4, ValueKind == VK_RValue); ValueKind = isLValueRef ? VK_LValue : VK_XValue; - if (AS1 != AS2) { - T1Quals.addAddressSpace(AS1); - QualType cv1AST4 = S.Context.getQualifiedType(cv2T2, T1Quals); - Sequence.AddQualificationConversionStep(cv1AST4, ValueKind); + // Add addr space conversion if required. + if (T1Quals.getAddressSpace() != T2Quals.getAddressSpace()) { + auto T4Quals = cv1T4.getQualifiers(); + T4Quals.addAddressSpace(T1Quals.getAddressSpace()); + QualType cv1T4WithAS = S.Context.getQualifiedType(T2, T4Quals); + Sequence.AddQualificationConversionStep(cv1T4WithAS, ValueKind); } // In any case, the reference is bound to the resulting glvalue (or to @@ -5537,8 +5568,7 @@ void InitializationSequence::InitializeFrom(Sema &S, // array from a compound literal that creates an array of the same // type, so long as the initializer has no side effects. if (!S.getLangOpts().CPlusPlus && Initializer && - (isa(Initializer->IgnoreParens()) || - isa(Initializer->IgnoreParens())) && + isa(Initializer->IgnoreParens()) && Initializer->getType()->isArrayType()) { const ArrayType *SourceAT = Context.getAsArrayType(Initializer->getType()); @@ -7944,6 +7974,7 @@ InitializationSequence::Perform(Sema &S, S.Diag(Kind.getLocation(), diag::ext_array_init_copy) << Step->Type << CurInit.get()->getType() << CurInit.get()->getSourceRange(); + updateGNUCompoundLiteralRValue(CurInit.get()); LLVM_FALLTHROUGH; case SK_ArrayInit: // If the destination type is an incomplete array type, update the diff --git a/clang/lib/Sema/SemaLookup.cpp b/clang/lib/Sema/SemaLookup.cpp index 249be78098574..86960e0a1dbd5 100644 --- a/clang/lib/Sema/SemaLookup.cpp +++ b/clang/lib/Sema/SemaLookup.cpp @@ -2172,11 +2172,27 @@ bool Sema::LookupQualifiedName(LookupResult &R, DeclContext *LookupCtx, DeclContext::lookup_iterator FirstD = FirstPath->Decls.begin(); DeclContext::lookup_iterator CurrentD = Path->Decls.begin(); + // Get the decl that we should use for deduplicating this lookup. + auto GetRepresentativeDecl = [&](NamedDecl *D) -> Decl * { + // C++ [temp.local]p3: + // A lookup that finds an injected-class-name (10.2) can result in + // an ambiguity in certain cases (for example, if it is found in + // more than one base class). If all of the injected-class-names + // that are found refer to specializations of the same class + // template, and if the name is used as a template-name, the + // reference refers to the class template itself and not a + // specialization thereof, and is not ambiguous. + if (R.isTemplateNameLookup()) + if (auto *TD = getAsTemplateNameDecl(D)) + D = TD; + return D->getUnderlyingDecl()->getCanonicalDecl(); + }; + while (FirstD != FirstPath->Decls.end() && CurrentD != Path->Decls.end()) { - if ((*FirstD)->getUnderlyingDecl()->getCanonicalDecl() != - (*CurrentD)->getUnderlyingDecl()->getCanonicalDecl()) - break; + if (GetRepresentativeDecl(*FirstD) != + GetRepresentativeDecl(*CurrentD)) + break; ++FirstD; ++CurrentD; diff --git a/clang/lib/Sema/SemaObjCProperty.cpp b/clang/lib/Sema/SemaObjCProperty.cpp index 82e8def14acb4..cea362fb42502 100644 --- a/clang/lib/Sema/SemaObjCProperty.cpp +++ b/clang/lib/Sema/SemaObjCProperty.cpp @@ -2280,9 +2280,18 @@ void Sema::DiagnoseMissingDesignatedInitOverrides( I = DesignatedInits.begin(), E = DesignatedInits.end(); I != E; ++I) { const ObjCMethodDecl *MD = *I; if (!InitSelSet.count(MD->getSelector())) { + // Don't emit a diagnostic if the overriding method in the subclass is + // marked as unavailable. bool Ignore = false; if (auto *IMD = IFD->getInstanceMethod(MD->getSelector())) { Ignore = IMD->isUnavailable(); + } else { + // Check the methods declared in the class extensions too. + for (auto *Ext : IFD->visible_extensions()) + if (auto *IMD = Ext->getInstanceMethod(MD->getSelector())) { + Ignore = IMD->isUnavailable(); + break; + } } if (!Ignore) { Diag(ImplD->getLocation(), diff --git a/clang/lib/Sema/SemaOpenMP.cpp b/clang/lib/Sema/SemaOpenMP.cpp index 6716329e26a4f..7fed3725edd4c 100644 --- a/clang/lib/Sema/SemaOpenMP.cpp +++ b/clang/lib/Sema/SemaOpenMP.cpp @@ -134,7 +134,7 @@ class DSAStackTy { /// get the data (loop counters etc.) about enclosing loop-based construct. /// This data is required during codegen. DoacrossDependMapTy DoacrossDepends; - /// first argument (Expr *) contains optional argument of the + /// First argument (Expr *) contains optional argument of the /// 'ordered' clause, the second one is true if the regions has 'ordered' /// clause, false otherwise. llvm::Optional> OrderedRegion; @@ -1393,6 +1393,68 @@ void Sema::popOpenMPFunctionRegion(const FunctionScopeInfo *OldFSI) { DSAStack->popFunction(OldFSI); } +static bool isOpenMPDeviceDelayedContext(Sema &S) { + assert(S.LangOpts.OpenMP && S.LangOpts.OpenMPIsDevice && + "Expected OpenMP device compilation."); + return !S.isInOpenMPTargetExecutionDirective() && + !S.isInOpenMPDeclareTargetContext(); +} + +/// Do we know that we will eventually codegen the given function? +static bool isKnownEmitted(Sema &S, FunctionDecl *FD) { + assert(S.LangOpts.OpenMP && S.LangOpts.OpenMPIsDevice && + "Expected OpenMP device compilation."); + // Templates are emitted when they're instantiated. + if (FD->isDependentContext()) + return false; + + if (OMPDeclareTargetDeclAttr::isDeclareTargetDeclaration( + FD->getCanonicalDecl())) + return true; + + // Otherwise, the function is known-emitted if it's in our set of + // known-emitted functions. + return S.DeviceKnownEmittedFns.count(FD) > 0; +} + +Sema::DeviceDiagBuilder Sema::diagIfOpenMPDeviceCode(SourceLocation Loc, + unsigned DiagID) { + assert(LangOpts.OpenMP && LangOpts.OpenMPIsDevice && + "Expected OpenMP device compilation."); + return DeviceDiagBuilder((isOpenMPDeviceDelayedContext(*this) && + !isKnownEmitted(*this, getCurFunctionDecl())) + ? DeviceDiagBuilder::K_Deferred + : DeviceDiagBuilder::K_Immediate, + Loc, DiagID, getCurFunctionDecl(), *this); +} + +void Sema::checkOpenMPDeviceFunction(SourceLocation Loc, FunctionDecl *Callee) { + assert(LangOpts.OpenMP && LangOpts.OpenMPIsDevice && + "Expected OpenMP device compilation."); + assert(Callee && "Callee may not be null."); + FunctionDecl *Caller = getCurFunctionDecl(); + + // If the caller is known-emitted, mark the callee as known-emitted. + // Otherwise, mark the call in our call graph so we can traverse it later. + if (!isOpenMPDeviceDelayedContext(*this) || + (Caller && isKnownEmitted(*this, Caller))) + markKnownEmitted(*this, Caller, Callee, Loc, isKnownEmitted); + else if (Caller) + DeviceCallGraph[Caller].insert({Callee, Loc}); +} + +void Sema::checkOpenMPDeviceExpr(const Expr *E) { + assert(getLangOpts().OpenMP && getLangOpts().OpenMPIsDevice && + "OpenMP device compilation mode is expected."); + QualType Ty = E->getType(); + if ((Ty->isFloat16Type() && !Context.getTargetInfo().hasFloat16Type()) || + (Ty->isFloat128Type() && !Context.getTargetInfo().hasFloat128Type()) || + (Ty->isIntegerType() && Context.getTypeSize(Ty) == 128 && + !Context.getTargetInfo().hasInt128Type())) + targetDiag(E->getExprLoc(), diag::err_type_unsupported) + << Ty << E->getSourceRange(); +} + bool Sema::isOpenMPCapturedByRef(const ValueDecl *D, unsigned Level) const { assert(LangOpts.OpenMP && "OpenMP is not allowed"); @@ -3401,11 +3463,12 @@ StmtResult Sema::ActOnOpenMPExecutableDirective( } } if (!ImplicitMaps.empty()) { + CXXScopeSpec MapperIdScopeSpec; + DeclarationNameInfo MapperId; if (OMPClause *Implicit = ActOnOpenMPMapClause( - llvm::None, llvm::None, OMPC_MAP_tofrom, - /*IsMapTypeImplicit=*/true, SourceLocation(), SourceLocation(), - ImplicitMaps, SourceLocation(), SourceLocation(), - SourceLocation())) { + llvm::None, llvm::None, MapperIdScopeSpec, MapperId, + OMPC_MAP_tofrom, /*IsMapTypeImplicit=*/true, SourceLocation(), + SourceLocation(), ImplicitMaps, OMPVarListLocTy())) { ClausesWithImplicit.emplace_back(Implicit); ErrorFound |= cast(Implicit)->varlist_size() != ImplicitMaps.size(); @@ -7067,7 +7130,9 @@ StmtResult Sema::ActOnOpenMPTargetDirective(ArrayRef Clauses, auto I = CS->body_begin(); while (I != CS->body_end()) { const auto *OED = dyn_cast(*I); - if (!OED || !isOpenMPTeamsDirective(OED->getDirectiveKind())) { + if (!OED || !isOpenMPTeamsDirective(OED->getDirectiveKind()) || + OMPTeamsFound) { + OMPTeamsFound = false; break; } @@ -9682,14 +9747,16 @@ OMPClause *Sema::ActOnOpenMPDynamicAllocatorsClause(SourceLocation StartLoc, OMPClause *Sema::ActOnOpenMPVarListClause( OpenMPClauseKind Kind, ArrayRef VarList, Expr *TailExpr, - SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ColonLoc, - SourceLocation EndLoc, CXXScopeSpec &ReductionIdScopeSpec, - const DeclarationNameInfo &ReductionId, OpenMPDependClauseKind DepKind, + const OMPVarListLocTy &Locs, SourceLocation ColonLoc, + CXXScopeSpec &ReductionOrMapperIdScopeSpec, + DeclarationNameInfo &ReductionOrMapperId, OpenMPDependClauseKind DepKind, OpenMPLinearClauseKind LinKind, ArrayRef MapTypeModifiers, - ArrayRef MapTypeModifiersLoc, - OpenMPMapClauseKind MapType, bool IsMapTypeImplicit, - SourceLocation DepLinMapLoc) { + ArrayRef MapTypeModifiersLoc, OpenMPMapClauseKind MapType, + bool IsMapTypeImplicit, SourceLocation DepLinMapLoc) { + SourceLocation StartLoc = Locs.StartLoc; + SourceLocation LParenLoc = Locs.LParenLoc; + SourceLocation EndLoc = Locs.EndLoc; OMPClause *Res = nullptr; switch (Kind) { case OMPC_private: @@ -9706,17 +9773,18 @@ OMPClause *Sema::ActOnOpenMPVarListClause( break; case OMPC_reduction: Res = ActOnOpenMPReductionClause(VarList, StartLoc, LParenLoc, ColonLoc, - EndLoc, ReductionIdScopeSpec, ReductionId); + EndLoc, ReductionOrMapperIdScopeSpec, + ReductionOrMapperId); break; case OMPC_task_reduction: Res = ActOnOpenMPTaskReductionClause(VarList, StartLoc, LParenLoc, ColonLoc, - EndLoc, ReductionIdScopeSpec, - ReductionId); + EndLoc, ReductionOrMapperIdScopeSpec, + ReductionOrMapperId); break; case OMPC_in_reduction: - Res = - ActOnOpenMPInReductionClause(VarList, StartLoc, LParenLoc, ColonLoc, - EndLoc, ReductionIdScopeSpec, ReductionId); + Res = ActOnOpenMPInReductionClause(VarList, StartLoc, LParenLoc, ColonLoc, + EndLoc, ReductionOrMapperIdScopeSpec, + ReductionOrMapperId); break; case OMPC_linear: Res = ActOnOpenMPLinearClause(VarList, TailExpr, StartLoc, LParenLoc, @@ -9740,21 +9808,24 @@ OMPClause *Sema::ActOnOpenMPVarListClause( StartLoc, LParenLoc, EndLoc); break; case OMPC_map: - Res = ActOnOpenMPMapClause(MapTypeModifiers, MapTypeModifiersLoc, MapType, - IsMapTypeImplicit, DepLinMapLoc, ColonLoc, - VarList, StartLoc, LParenLoc, EndLoc); + Res = ActOnOpenMPMapClause(MapTypeModifiers, MapTypeModifiersLoc, + ReductionOrMapperIdScopeSpec, + ReductionOrMapperId, MapType, IsMapTypeImplicit, + DepLinMapLoc, ColonLoc, VarList, Locs); break; case OMPC_to: - Res = ActOnOpenMPToClause(VarList, StartLoc, LParenLoc, EndLoc); + Res = ActOnOpenMPToClause(VarList, ReductionOrMapperIdScopeSpec, + ReductionOrMapperId, Locs); break; case OMPC_from: - Res = ActOnOpenMPFromClause(VarList, StartLoc, LParenLoc, EndLoc); + Res = ActOnOpenMPFromClause(VarList, ReductionOrMapperIdScopeSpec, + ReductionOrMapperId, Locs); break; case OMPC_use_device_ptr: - Res = ActOnOpenMPUseDevicePtrClause(VarList, StartLoc, LParenLoc, EndLoc); + Res = ActOnOpenMPUseDevicePtrClause(VarList, Locs); break; case OMPC_is_device_ptr: - Res = ActOnOpenMPIsDevicePtrClause(VarList, StartLoc, LParenLoc, EndLoc); + Res = ActOnOpenMPIsDevicePtrClause(VarList, Locs); break; case OMPC_if: case OMPC_final: @@ -10570,8 +10641,8 @@ class TransformExprToCaptures : public TreeTransform { } // namespace template -static T filterLookupForUDR(SmallVectorImpl &Lookups, - const llvm::function_ref Gen) { +static T filterLookupForUDReductionAndMapper( + SmallVectorImpl &Lookups, const llvm::function_ref Gen) { for (U &Set : Lookups) { for (auto *D : Set) { if (T Res = Gen(cast(D))) @@ -10598,7 +10669,7 @@ static NamedDecl *findAcceptableDecl(Sema &SemaRef, NamedDecl *D) { } static void -argumentDependentLookup(Sema &SemaRef, const DeclarationNameInfo &ReductionId, +argumentDependentLookup(Sema &SemaRef, const DeclarationNameInfo &Id, SourceLocation Loc, QualType Ty, SmallVectorImpl> &Lookups) { // Find all of the associated namespaces and classes based on the @@ -10632,13 +10703,14 @@ argumentDependentLookup(Sema &SemaRef, const DeclarationNameInfo &ReductionId, // associated classes are visible within their respective // namespaces even if they are not visible during an ordinary // lookup (11.4). - DeclContext::lookup_result R = NS->lookup(ReductionId.getName()); + DeclContext::lookup_result R = NS->lookup(Id.getName()); for (auto *D : R) { auto *Underlying = D; if (auto *USD = dyn_cast(D)) Underlying = USD->getTargetDecl(); - if (!isa(Underlying)) + if (!isa(Underlying) && + !isa(Underlying)) continue; if (!SemaRef.isVisible(D)) { @@ -10691,7 +10763,7 @@ buildDeclareReductionRef(Sema &SemaRef, SourceLocation Loc, SourceRange Range, if (SemaRef.CurContext->isDependentContext() || Ty->isDependentType() || Ty->isInstantiationDependentType() || Ty->containsUnexpandedParameterPack() || - filterLookupForUDR(Lookups, [](ValueDecl *D) { + filterLookupForUDReductionAndMapper(Lookups, [](ValueDecl *D) { return !D->isInvalidDecl() && (D->getType()->isDependentType() || D->getType()->isInstantiationDependentType() || @@ -10740,15 +10812,16 @@ buildDeclareReductionRef(Sema &SemaRef, SourceLocation Loc, SourceRange Range, } // Perform ADL. argumentDependentLookup(SemaRef, ReductionId, Loc, Ty, Lookups); - if (auto *VD = filterLookupForUDR( + if (auto *VD = filterLookupForUDReductionAndMapper( Lookups, [&SemaRef, Ty](ValueDecl *D) -> ValueDecl * { if (!D->isInvalidDecl() && SemaRef.Context.hasSameType(D->getType(), Ty)) return D; return nullptr; })) - return SemaRef.BuildDeclRefExpr(VD, Ty, VK_LValue, Loc); - if (auto *VD = filterLookupForUDR( + return SemaRef.BuildDeclRefExpr(VD, VD->getType().getNonReferenceType(), + VK_LValue, Loc); + if (auto *VD = filterLookupForUDReductionAndMapper( Lookups, [&SemaRef, Ty, Loc](ValueDecl *D) -> ValueDecl * { if (!D->isInvalidDecl() && SemaRef.IsDerivedFrom(Loc, Ty, D->getType()) && @@ -10765,7 +10838,8 @@ buildDeclareReductionRef(Sema &SemaRef, SourceLocation Loc, SourceRange Range, /*DiagID=*/0) != Sema::AR_inaccessible) { SemaRef.BuildBasePathArray(Paths, BasePath); - return SemaRef.BuildDeclRefExpr(VD, Ty, VK_LValue, Loc); + return SemaRef.BuildDeclRefExpr( + VD, VD->getType().getNonReferenceType(), VK_LValue, Loc); } } } @@ -12944,6 +13018,109 @@ static bool checkMapConflicts( return FoundError; } +// Look up the user-defined mapper given the mapper name and mapped type, and +// build a reference to it. +ExprResult buildUserDefinedMapperRef(Sema &SemaRef, Scope *S, + CXXScopeSpec &MapperIdScopeSpec, + const DeclarationNameInfo &MapperId, + QualType Type, Expr *UnresolvedMapper) { + if (MapperIdScopeSpec.isInvalid()) + return ExprError(); + // Find all user-defined mappers with the given MapperId. + SmallVector, 4> Lookups; + LookupResult Lookup(SemaRef, MapperId, Sema::LookupOMPMapperName); + Lookup.suppressDiagnostics(); + if (S) { + while (S && SemaRef.LookupParsedName(Lookup, S, &MapperIdScopeSpec)) { + NamedDecl *D = Lookup.getRepresentativeDecl(); + while (S && !S->isDeclScope(D)) + S = S->getParent(); + if (S) + S = S->getParent(); + Lookups.emplace_back(); + Lookups.back().append(Lookup.begin(), Lookup.end()); + Lookup.clear(); + } + } else if (auto *ULE = cast_or_null(UnresolvedMapper)) { + // Extract the user-defined mappers with the given MapperId. + Lookups.push_back(UnresolvedSet<8>()); + for (NamedDecl *D : ULE->decls()) { + auto *DMD = cast(D); + assert(DMD && "Expect valid OMPDeclareMapperDecl during instantiation."); + Lookups.back().addDecl(DMD); + } + } + // Defer the lookup for dependent types. The results will be passed through + // UnresolvedMapper on instantiation. + if (SemaRef.CurContext->isDependentContext() || Type->isDependentType() || + Type->isInstantiationDependentType() || + Type->containsUnexpandedParameterPack() || + filterLookupForUDReductionAndMapper(Lookups, [](ValueDecl *D) { + return !D->isInvalidDecl() && + (D->getType()->isDependentType() || + D->getType()->isInstantiationDependentType() || + D->getType()->containsUnexpandedParameterPack()); + })) { + UnresolvedSet<8> URS; + for (const UnresolvedSet<8> &Set : Lookups) { + if (Set.empty()) + continue; + URS.append(Set.begin(), Set.end()); + } + return UnresolvedLookupExpr::Create( + SemaRef.Context, /*NamingClass=*/nullptr, + MapperIdScopeSpec.getWithLocInContext(SemaRef.Context), MapperId, + /*ADL=*/false, /*Overloaded=*/true, URS.begin(), URS.end()); + } + // [OpenMP 5.0], 2.19.7.3 declare mapper Directive, Restrictions + // The type must be of struct, union or class type in C and C++ + if (!Type->isStructureOrClassType() && !Type->isUnionType()) + return ExprEmpty(); + SourceLocation Loc = MapperId.getLoc(); + // Perform argument dependent lookup. + if (SemaRef.getLangOpts().CPlusPlus && !MapperIdScopeSpec.isSet()) + argumentDependentLookup(SemaRef, MapperId, Loc, Type, Lookups); + // Return the first user-defined mapper with the desired type. + if (auto *VD = filterLookupForUDReductionAndMapper( + Lookups, [&SemaRef, Type](ValueDecl *D) -> ValueDecl * { + if (!D->isInvalidDecl() && + SemaRef.Context.hasSameType(D->getType(), Type)) + return D; + return nullptr; + })) + return SemaRef.BuildDeclRefExpr(VD, Type, VK_LValue, Loc); + // Find the first user-defined mapper with a type derived from the desired + // type. + if (auto *VD = filterLookupForUDReductionAndMapper( + Lookups, [&SemaRef, Type, Loc](ValueDecl *D) -> ValueDecl * { + if (!D->isInvalidDecl() && + SemaRef.IsDerivedFrom(Loc, Type, D->getType()) && + !Type.isMoreQualifiedThan(D->getType())) + return D; + return nullptr; + })) { + CXXBasePaths Paths(/*FindAmbiguities=*/true, /*RecordPaths=*/true, + /*DetectVirtual=*/false); + if (SemaRef.IsDerivedFrom(Loc, Type, VD->getType(), Paths)) { + if (!Paths.isAmbiguous(SemaRef.Context.getCanonicalType( + VD->getType().getUnqualifiedType()))) { + if (SemaRef.CheckBaseClassAccess( + Loc, VD->getType(), Type, Paths.front(), + /*DiagID=*/0) != Sema::AR_inaccessible) { + return SemaRef.BuildDeclRefExpr(VD, Type, VK_LValue, Loc); + } + } + } + } + // Report error if a mapper is specified, but cannot be found. + if (MapperIdScopeSpec.isSet() || MapperId.getAsString() != "default") { + SemaRef.Diag(Loc, diag::err_omp_invalid_mapper) + << Type << MapperId.getName(); + return ExprError(); + } + return ExprEmpty(); +} + namespace { // Utility struct that gathers all the related lists associated with a mappable // expression. @@ -12956,6 +13133,8 @@ struct MappableVarListInfo { OMPClauseMappableExprCommon::MappableExprComponentLists VarComponents; // The base declaration of the variable. SmallVector VarBaseDeclarations; + // The reference to the user-defined mapper associated with every expression. + SmallVector UDMapperList; MappableVarListInfo(ArrayRef VarList) : VarList(VarList) { // We have a list of components and base declarations for each entry in the @@ -12967,20 +13146,37 @@ struct MappableVarListInfo { } // Check the validity of the provided variable list for the provided clause kind -// \a CKind. In the check process the valid expressions, and mappable expression -// components and variables are extracted and used to fill \a Vars, -// \a ClauseComponents, and \a ClauseBaseDeclarations. \a MapType and -// \a IsMapTypeImplicit are expected to be valid if the clause kind is 'map'. -static void -checkMappableExpressionList(Sema &SemaRef, DSAStackTy *DSAS, - OpenMPClauseKind CKind, MappableVarListInfo &MVLI, - SourceLocation StartLoc, - OpenMPMapClauseKind MapType = OMPC_MAP_unknown, - bool IsMapTypeImplicit = false) { +// \a CKind. In the check process the valid expressions, mappable expression +// components, variables, and user-defined mappers are extracted and used to +// fill \a ProcessedVarList, \a VarComponents, \a VarBaseDeclarations, and \a +// UDMapperList in MVLI. \a MapType, \a IsMapTypeImplicit, \a MapperIdScopeSpec, +// and \a MapperId are expected to be valid if the clause kind is 'map'. +static void checkMappableExpressionList( + Sema &SemaRef, DSAStackTy *DSAS, OpenMPClauseKind CKind, + MappableVarListInfo &MVLI, SourceLocation StartLoc, + CXXScopeSpec &MapperIdScopeSpec, DeclarationNameInfo MapperId, + ArrayRef UnresolvedMappers, + OpenMPMapClauseKind MapType = OMPC_MAP_unknown, + bool IsMapTypeImplicit = false) { // We only expect mappable expressions in 'to', 'from', and 'map' clauses. assert((CKind == OMPC_map || CKind == OMPC_to || CKind == OMPC_from) && "Unexpected clause kind with mappable expressions!"); + // If the identifier of user-defined mapper is not specified, it is "default". + // We do not change the actual name in this clause to distinguish whether a + // mapper is specified explicitly, i.e., it is not explicitly specified when + // MapperId.getName() is empty. + if (!MapperId.getName() || MapperId.getName().isEmpty()) { + auto &DeclNames = SemaRef.getASTContext().DeclarationNames; + MapperId.setName(DeclNames.getIdentifier( + &SemaRef.getASTContext().Idents.get("default"))); + } + + // Iterators to find the current unresolved mapper expression. + auto UMIt = UnresolvedMappers.begin(), UMEnd = UnresolvedMappers.end(); + bool UpdateUMIt = false; + Expr *UnresolvedMapper = nullptr; + // Keep track of the mappable components and base declarations in this clause. // Each entry in the list is going to have a list of components associated. We // record each set of the components so that we can build the clause later on. @@ -12991,11 +13187,29 @@ checkMappableExpressionList(Sema &SemaRef, DSAStackTy *DSAS, assert(RE && "Null expr in omp to/from/map clause"); SourceLocation ELoc = RE->getExprLoc(); + // Find the current unresolved mapper expression. + if (UpdateUMIt && UMIt != UMEnd) { + UMIt++; + assert( + UMIt != UMEnd && + "Expect the size of UnresolvedMappers to match with that of VarList"); + } + UpdateUMIt = true; + if (UMIt != UMEnd) + UnresolvedMapper = *UMIt; + const Expr *VE = RE->IgnoreParenLValueCasts(); if (VE->isValueDependent() || VE->isTypeDependent() || VE->isInstantiationDependent() || VE->containsUnexpandedParameterPack()) { + // Try to find the associated user-defined mapper. + ExprResult ER = buildUserDefinedMapperRef( + SemaRef, DSAS->getCurScope(), MapperIdScopeSpec, MapperId, + VE->getType().getCanonicalType(), UnresolvedMapper); + if (ER.isInvalid()) + continue; + MVLI.UDMapperList.push_back(ER.get()); // We can only analyze this information once the missing information is // resolved. MVLI.ProcessedVarList.push_back(RE); @@ -13027,6 +13241,13 @@ checkMappableExpressionList(Sema &SemaRef, DSAStackTy *DSAS, if (const auto *TE = dyn_cast(BE)) { // Add store "this" pointer to class in DSAStackTy for future checking DSAS->addMappedClassesQualTypes(TE->getType()); + // Try to find the associated user-defined mapper. + ExprResult ER = buildUserDefinedMapperRef( + SemaRef, DSAS->getCurScope(), MapperIdScopeSpec, MapperId, + VE->getType().getCanonicalType(), UnresolvedMapper); + if (ER.isInvalid()) + continue; + MVLI.UDMapperList.push_back(ER.get()); // Skip restriction checking for variable or field declarations MVLI.ProcessedVarList.push_back(RE); MVLI.VarComponents.resize(MVLI.VarComponents.size() + 1); @@ -13145,6 +13366,14 @@ checkMappableExpressionList(Sema &SemaRef, DSAStackTy *DSAS, } } + // Try to find the associated user-defined mapper. + ExprResult ER = buildUserDefinedMapperRef( + SemaRef, DSAS->getCurScope(), MapperIdScopeSpec, MapperId, + Type.getCanonicalType(), UnresolvedMapper); + if (ER.isInvalid()) + continue; + MVLI.UDMapperList.push_back(ER.get()); + // Save the current expression. MVLI.ProcessedVarList.push_back(RE); @@ -13164,19 +13393,16 @@ checkMappableExpressionList(Sema &SemaRef, DSAStackTy *DSAS, } } -OMPClause * -Sema::ActOnOpenMPMapClause(ArrayRef MapTypeModifiers, - ArrayRef MapTypeModifiersLoc, - OpenMPMapClauseKind MapType, bool IsMapTypeImplicit, - SourceLocation MapLoc, SourceLocation ColonLoc, - ArrayRef VarList, SourceLocation StartLoc, - SourceLocation LParenLoc, SourceLocation EndLoc) { - MappableVarListInfo MVLI(VarList); - checkMappableExpressionList(*this, DSAStack, OMPC_map, MVLI, StartLoc, - MapType, IsMapTypeImplicit); - - OpenMPMapModifierKind Modifiers[] = { OMPC_MAP_MODIFIER_unknown, - OMPC_MAP_MODIFIER_unknown }; +OMPClause *Sema::ActOnOpenMPMapClause( + ArrayRef MapTypeModifiers, + ArrayRef MapTypeModifiersLoc, + CXXScopeSpec &MapperIdScopeSpec, DeclarationNameInfo &MapperId, + OpenMPMapClauseKind MapType, bool IsMapTypeImplicit, SourceLocation MapLoc, + SourceLocation ColonLoc, ArrayRef VarList, + const OMPVarListLocTy &Locs, ArrayRef UnresolvedMappers) { + OpenMPMapModifierKind Modifiers[] = {OMPC_MAP_MODIFIER_unknown, + OMPC_MAP_MODIFIER_unknown, + OMPC_MAP_MODIFIER_unknown}; SourceLocation ModifiersLoc[OMPMapClause::NumberOfModifiers]; // Process map-type-modifiers, flag errors for duplicate modifiers. @@ -13194,12 +13420,18 @@ Sema::ActOnOpenMPMapClause(ArrayRef MapTypeModifiers, ++Count; } + MappableVarListInfo MVLI(VarList); + checkMappableExpressionList(*this, DSAStack, OMPC_map, MVLI, Locs.StartLoc, + MapperIdScopeSpec, MapperId, UnresolvedMappers, + MapType, IsMapTypeImplicit); + // We need to produce a map clause even if we don't have variables so that // other diagnostics related with non-existing map clauses are accurate. - return OMPMapClause::Create(Context, StartLoc, LParenLoc, EndLoc, - MVLI.ProcessedVarList, MVLI.VarBaseDeclarations, - MVLI.VarComponents, Modifiers, ModifiersLoc, - MapType, IsMapTypeImplicit, MapLoc); + return OMPMapClause::Create(Context, Locs, MVLI.ProcessedVarList, + MVLI.VarBaseDeclarations, MVLI.VarComponents, + MVLI.UDMapperList, Modifiers, ModifiersLoc, + MapperIdScopeSpec.getWithLocInContext(Context), + MapperId, MapType, IsMapTypeImplicit, MapLoc); } QualType Sema::ActOnOpenMPDeclareReductionType(SourceLocation TyLoc, @@ -13940,37 +14172,41 @@ void Sema::checkDeclIsAllowedInOpenMPTarget(Expr *E, Decl *D, } OMPClause *Sema::ActOnOpenMPToClause(ArrayRef VarList, - SourceLocation StartLoc, - SourceLocation LParenLoc, - SourceLocation EndLoc) { + CXXScopeSpec &MapperIdScopeSpec, + DeclarationNameInfo &MapperId, + const OMPVarListLocTy &Locs, + ArrayRef UnresolvedMappers) { MappableVarListInfo MVLI(VarList); - checkMappableExpressionList(*this, DSAStack, OMPC_to, MVLI, StartLoc); + checkMappableExpressionList(*this, DSAStack, OMPC_to, MVLI, Locs.StartLoc, + MapperIdScopeSpec, MapperId, UnresolvedMappers); if (MVLI.ProcessedVarList.empty()) return nullptr; - return OMPToClause::Create(Context, StartLoc, LParenLoc, EndLoc, - MVLI.ProcessedVarList, MVLI.VarBaseDeclarations, - MVLI.VarComponents); + return OMPToClause::Create( + Context, Locs, MVLI.ProcessedVarList, MVLI.VarBaseDeclarations, + MVLI.VarComponents, MVLI.UDMapperList, + MapperIdScopeSpec.getWithLocInContext(Context), MapperId); } OMPClause *Sema::ActOnOpenMPFromClause(ArrayRef VarList, - SourceLocation StartLoc, - SourceLocation LParenLoc, - SourceLocation EndLoc) { + CXXScopeSpec &MapperIdScopeSpec, + DeclarationNameInfo &MapperId, + const OMPVarListLocTy &Locs, + ArrayRef UnresolvedMappers) { MappableVarListInfo MVLI(VarList); - checkMappableExpressionList(*this, DSAStack, OMPC_from, MVLI, StartLoc); + checkMappableExpressionList(*this, DSAStack, OMPC_from, MVLI, Locs.StartLoc, + MapperIdScopeSpec, MapperId, UnresolvedMappers); if (MVLI.ProcessedVarList.empty()) return nullptr; - return OMPFromClause::Create(Context, StartLoc, LParenLoc, EndLoc, - MVLI.ProcessedVarList, MVLI.VarBaseDeclarations, - MVLI.VarComponents); + return OMPFromClause::Create( + Context, Locs, MVLI.ProcessedVarList, MVLI.VarBaseDeclarations, + MVLI.VarComponents, MVLI.UDMapperList, + MapperIdScopeSpec.getWithLocInContext(Context), MapperId); } OMPClause *Sema::ActOnOpenMPUseDevicePtrClause(ArrayRef VarList, - SourceLocation StartLoc, - SourceLocation LParenLoc, - SourceLocation EndLoc) { + const OMPVarListLocTy &Locs) { MappableVarListInfo MVLI(VarList); SmallVector PrivateCopies; SmallVector Inits; @@ -14050,14 +14286,12 @@ OMPClause *Sema::ActOnOpenMPUseDevicePtrClause(ArrayRef VarList, return nullptr; return OMPUseDevicePtrClause::Create( - Context, StartLoc, LParenLoc, EndLoc, MVLI.ProcessedVarList, - PrivateCopies, Inits, MVLI.VarBaseDeclarations, MVLI.VarComponents); + Context, Locs, MVLI.ProcessedVarList, PrivateCopies, Inits, + MVLI.VarBaseDeclarations, MVLI.VarComponents); } OMPClause *Sema::ActOnOpenMPIsDevicePtrClause(ArrayRef VarList, - SourceLocation StartLoc, - SourceLocation LParenLoc, - SourceLocation EndLoc) { + const OMPVarListLocTy &Locs) { MappableVarListInfo MVLI(VarList); for (Expr *RefExpr : VarList) { assert(RefExpr && "NULL expr in OpenMP is_device_ptr clause."); @@ -14133,7 +14367,7 @@ OMPClause *Sema::ActOnOpenMPIsDevicePtrClause(ArrayRef VarList, if (MVLI.ProcessedVarList.empty()) return nullptr; - return OMPIsDevicePtrClause::Create( - Context, StartLoc, LParenLoc, EndLoc, MVLI.ProcessedVarList, - MVLI.VarBaseDeclarations, MVLI.VarComponents); + return OMPIsDevicePtrClause::Create(Context, Locs, MVLI.ProcessedVarList, + MVLI.VarBaseDeclarations, + MVLI.VarComponents); } diff --git a/clang/lib/Sema/SemaSYCL.cpp b/clang/lib/Sema/SemaSYCL.cpp index c7301d5970b6e..ab656707086c3 100644 --- a/clang/lib/Sema/SemaSYCL.cpp +++ b/clang/lib/Sema/SemaSYCL.cpp @@ -14,13 +14,13 @@ #include "clang/AST/QualTypeNames.h" #include "clang/AST/RecordLayout.h" #include "clang/AST/RecursiveASTVisitor.h" +#include "clang/Analysis/CallGraph.h" #include "clang/Sema/Sema.h" #include "llvm/ADT/SmallPtrSet.h" #include "llvm/ADT/SmallVector.h" #include "llvm/Support/FileSystem.h" #include "llvm/Support/Path.h" #include "llvm/Support/raw_ostream.h" -#include "clang/Analysis/CallGraph.h" #include @@ -94,29 +94,30 @@ class MarkDeviceFunction : public RecursiveASTVisitor { // instantiation as template functions. It means that // all functions used by kernel have already been parsed and have // definitions. - llvm::SmallPtrSet VisitedSet; - if (IsRecursive(Callee, Callee, VisitedSet)) - SemaRef.Diag(e->getExprLoc(), diag::err_sycl_restrict) << - KernelCallRecursiveFunction; + if (RecursiveSet.count(Callee)) { + SemaRef.Diag(e->getExprLoc(), diag::err_sycl_restrict) + << KernelCallRecursiveFunction; + SemaRef.Diag(Callee->getSourceRange().getBegin(), + diag::note_sycl_recursive_function_declared_here) + << KernelCallRecursiveFunction; + } if (const CXXMethodDecl *Method = dyn_cast(Callee)) if (Method->isVirtual()) - SemaRef.Diag(e->getExprLoc(), diag::err_sycl_restrict) << - KernelCallVirtualFunction; + SemaRef.Diag(e->getExprLoc(), diag::err_sycl_restrict) + << KernelCallVirtualFunction; CheckSYCLType(Callee->getReturnType(), Callee->getSourceRange()); if (FunctionDecl *Def = Callee->getDefinition()) { if (!Def->hasAttr()) { Def->addAttr(SYCLDeviceAttr::CreateImplicit(SemaRef.Context)); - this->TraverseStmt(Def->getBody()); SemaRef.AddSyclKernel(Def); } } - } else { - SemaRef.Diag(e->getExprLoc(), diag::err_sycl_restrict) << - KernelCallFunctionPointer; - } + } else if (!SemaRef.getLangOpts().SYCLAllowFuncPtr) + SemaRef.Diag(e->getExprLoc(), diag::err_sycl_restrict) + << KernelCallFunctionPointer; return true; } @@ -128,7 +129,6 @@ class MarkDeviceFunction : public RecursiveASTVisitor { if (FunctionDecl *Def = Ctor->getDefinition()) { Def->addAttr(SYCLDeviceAttr::CreateImplicit(SemaRef.Context)); - this->TraverseStmt(Def->getBody()); SemaRef.AddSyclKernel(Def); } @@ -138,7 +138,6 @@ class MarkDeviceFunction : public RecursiveASTVisitor { if (FunctionDecl *Def = Dtor->getDefinition()) { Def->addAttr(SYCLDeviceAttr::CreateImplicit(SemaRef.Context)); - this->TraverseStmt(Def->getBody()); SemaRef.AddSyclKernel(Def); } } @@ -179,8 +178,8 @@ class MarkDeviceFunction : public RecursiveASTVisitor { if (VarDecl *VD = dyn_cast(E->getMemberDecl())) { bool IsConst = VD->getType().getNonReferenceType().isConstQualified(); if (VD->isStaticDataMember() && !IsConst) - SemaRef.Diag(E->getExprLoc(), diag::err_sycl_restrict) << - KernelNonConstStaticDataVariable; + SemaRef.Diag(E->getExprLoc(), diag::err_sycl_restrict) + << KernelNonConstStaticDataVariable; } return true; } @@ -191,28 +190,27 @@ class MarkDeviceFunction : public RecursiveASTVisitor { bool IsConst = VD->getType().getNonReferenceType().isConstQualified(); if (!IsConst && VD->hasGlobalStorage() && !VD->isStaticLocal() && !VD->isStaticDataMember() && !isa(VD)) - SemaRef.Diag(E->getLocation(), diag::err_sycl_restrict) << - KernelGlobalVariable; + SemaRef.Diag(E->getLocation(), diag::err_sycl_restrict) + << KernelGlobalVariable; } return true; } bool VisitCXXNewExpr(CXXNewExpr *E) { - // Memory storage allocation is not allowed in kernels. - // All memory allocation for the device is done on - // the host using accessor classes. Consequently, the default - // allocation operator new overloads that allocate - // storage are disallowed in a SYCL kernel. The placement - // new operator and any user-defined overloads that - // do not allocate storage are permitted. + // Memory storage allocation is not allowed in kernels. + // All memory allocation for the device is done on + // the host using accessor classes. Consequently, the default + // allocation operator new overloads that allocate + // storage are disallowed in a SYCL kernel. The placement + // new operator and any user-defined overloads that + // do not allocate storage are permitted. if (FunctionDecl *FD = E->getOperatorNew()) { if (FD->isReplaceableGlobalAllocationFunction()) { - SemaRef.Diag(E->getExprLoc(), diag::err_sycl_restrict) << - KernelAllocateStorage; + SemaRef.Diag(E->getExprLoc(), diag::err_sycl_restrict) + << KernelAllocateStorage; } else if (FunctionDecl *Def = FD->getDefinition()) { if (!Def->hasAttr()) { Def->addAttr(SYCLDeviceAttr::CreateImplicit(SemaRef.Context)); - this->TraverseStmt(Def->getBody()); SemaRef.AddSyclKernel(Def); } } @@ -221,26 +219,26 @@ class MarkDeviceFunction : public RecursiveASTVisitor { } bool VisitCXXThrowExpr(CXXThrowExpr *E) { - SemaRef.Diag(E->getExprLoc(), diag::err_sycl_restrict) << - KernelUseExceptions; + SemaRef.Diag(E->getExprLoc(), diag::err_sycl_restrict) + << KernelUseExceptions; return true; } bool VisitCXXCatchStmt(CXXCatchStmt *S) { - SemaRef.Diag(S->getBeginLoc(), diag::err_sycl_restrict) << - KernelUseExceptions; + SemaRef.Diag(S->getBeginLoc(), diag::err_sycl_restrict) + << KernelUseExceptions; return true; } bool VisitCXXTryStmt(CXXTryStmt *S) { - SemaRef.Diag(S->getBeginLoc(), diag::err_sycl_restrict) << - KernelUseExceptions; + SemaRef.Diag(S->getBeginLoc(), diag::err_sycl_restrict) + << KernelUseExceptions; return true; } bool VisitSEHTryStmt(SEHTryStmt *S) { - SemaRef.Diag(S->getBeginLoc(), diag::err_sycl_restrict) << - KernelUseExceptions; + SemaRef.Diag(S->getBeginLoc(), diag::err_sycl_restrict) + << KernelUseExceptions; return true; } @@ -258,34 +256,43 @@ class MarkDeviceFunction : public RecursiveASTVisitor { // The call graph for this translation unit. CallGraph SYCLCG; -private: + // The set of functions called by a kernel function. + llvm::SmallPtrSet KernelSet; + // The set of recursive functions identified while building the + // kernel set, this is used for error diagnostics. + llvm::SmallPtrSet RecursiveSet; // Determines whether the function FD is recursive. // CalleeNode is a function which is called either directly // or indirectly from FD. If recursion is detected then create // diagnostic notes on each function as the callstack is unwound. - bool IsRecursive(FunctionDecl *CalleeNode, FunctionDecl *FD, - llvm::SmallPtrSet VisitedSet) { + void CollectKernelSet(FunctionDecl *CalleeNode, FunctionDecl *FD, + llvm::SmallPtrSet VisitedSet) { // We're currently checking CalleeNode on a different // trace through the CallGraph, we avoid infinite recursion - // by using VisitedSet to keep track of this. - if (!VisitedSet.insert(CalleeNode).second) - return false; + // by using KernelSet to keep track of this. + if (!KernelSet.insert(CalleeNode).second) + // Previously seen, stop recursion. + return; if (CallGraphNode *N = SYCLCG.getNode(CalleeNode)) { for (const CallGraphNode *CI : *N) { if (FunctionDecl *Callee = dyn_cast(CI->getDecl())) { Callee = Callee->getCanonicalDecl(); - if (Callee == FD) - return SemaRef.Diag(FD->getSourceRange().getBegin(), - diag::note_sycl_recursive_function_declared_here) - << KernelCallRecursiveFunction; - else if (IsRecursive(Callee, FD, VisitedSet)) - return true; + if (VisitedSet.count(Callee)) { + // There's a stack frame to visit this Callee above + // this invocation. Do not recurse here. + RecursiveSet.insert(Callee); + RecursiveSet.insert(CalleeNode); + } else { + VisitedSet.insert(Callee); + CollectKernelSet(Callee, FD, VisitedSet); + VisitedSet.erase(Callee); + } } } } - return false; } +private: bool CheckSYCLType(QualType Ty, SourceRange Loc) { if (Ty->isVariableArrayType()) { SemaRef.Diag(Loc.getBegin(), diag::err_vla_unsupported); @@ -299,7 +306,7 @@ class MarkDeviceFunction : public RecursiveASTVisitor { // FIXME: this seems like a temporary fix for SYCL programs // that pre-declare, use, but not define OclCXX classes, // which are later translated into SPIRV types. - if(!CRD->hasDefinition()) + if (!CRD->hasDefinition()) return true; if (CRD->isPolymorphic()) { @@ -443,9 +450,10 @@ CreateSYCLKernelBody(Sema &S, FunctionDecl *KernelCallerFunc, DeclContext *DC) { QualType FieldType = Field->getType(); CXXRecordDecl *CRD = FieldType->getAsCXXRecordDecl(); if (CRD && Util::isSyclAccessorType(FieldType)) { - // Since this is an accessor next 3 TargetFuncParams including current - // should be set in __init method: _ValueType*, range, id - const size_t NumParams = 3; + // Since this is an accessor next 4 TargetFuncParams including current + // should be set in __init method: _ValueType*, range, range, + // id + const size_t NumParams = 4; llvm::SmallVector ParamDREs(NumParams); auto TFP = TargetFuncParam; for (size_t I = 0; I < NumParams; ++TFP, ++I) { @@ -488,7 +496,7 @@ CreateSYCLKernelBody(Sema &S, FunctionDecl *KernelCallerFunc, DeclContext *DC) { ExprValueKind VK = Expr::getValueKindForType(ResultTy); ResultTy = ResultTy.getNonLValueExprType(S.Context); - // __init needs three parameter + // __init needs four parameter auto ParamItr = InitMethod->param_begin(); // kernel_parameters llvm::SmallVector ParamStmts; @@ -498,11 +506,14 @@ CreateSYCLKernelBody(Sema &S, FunctionDecl *KernelCallerFunc, DeclContext *DC) { S, ((*ParamItr++))->getOriginalType(), ParamDREs[1])); ParamStmts.push_back(getExprForRangeOrOffset( S, ((*ParamItr++))->getOriginalType(), ParamDREs[2])); - // kernel_obj.accessor.__init(_ValueType*, range, id) + ParamStmts.push_back(getExprForRangeOrOffset( + S, ((*ParamItr++))->getOriginalType(), ParamDREs[3])); + // kernel_obj.accessor.__init(_ValueType*, range, range, + // id) CXXMemberCallExpr *Call = CXXMemberCallExpr::Create( S.Context, ME, ParamStmts, ResultTy, VK, SourceLocation()); BodyStmts.push_back(Call); - } else if (CRD || FieldType->isBuiltinType()) { + } else if (CRD || FieldType->isScalarType()) { // If field have built-in or a structure/class type just initialize // this field with corresponding kernel argument using '=' binary // operator. The structure/class type must be copy assignable - this @@ -525,6 +536,8 @@ CreateSYCLKernelBody(Sema &S, FunctionDecl *KernelCallerFunc, DeclContext *DC) { BinaryOperator(Lhs, Rhs, BO_Assign, FieldType, VK_LValue, OK_Ordinary, SourceLocation(), FPOptions()); BodyStmts.push_back(Res); + } else { + llvm_unreachable("unsupported field type"); } TargetFuncParam++; } @@ -636,10 +649,17 @@ static void buildArgTys(ASTContext &Context, CXXRecordDecl *KernelObj, CreateAndAddPrmDsc(Fld, PointerType); - FieldDecl *RangeFld = getFieldDeclByName(RecordDecl, {"__impl", "Range"}); - assert(RangeFld && - "The accessor must contain the Range from the __impl field"); - CreateAndAddPrmDsc(RangeFld, RangeFld->getType()); + FieldDecl *AccessRangeFld = + getFieldDeclByName(RecordDecl, {"__impl", "AccessRange"}); + assert(AccessRangeFld && + "The accessor must contain the AccessRange from the __impl field"); + CreateAndAddPrmDsc(AccessRangeFld, AccessRangeFld->getType()); + + FieldDecl *MemRangeFld = + getFieldDeclByName(RecordDecl, {"__impl", "MemRange"}); + assert(MemRangeFld && + "The accessor must contain the MemRange from the __impl field"); + CreateAndAddPrmDsc(MemRangeFld, MemRangeFld->getType()); FieldDecl *OffsetFld = getFieldDeclByName(RecordDecl, {"__impl", "Offset"}); @@ -698,13 +718,22 @@ static void populateIntHeader(SYCLIntegrationHeader &H, const StringRef Name, const auto *AccTmplTy = cast(AccTy); H.addParamDesc(SYCLIntegrationHeader::kind_accessor, getAccessTarget(AccTmplTy), Offset); - // ... second descriptor (translated to range kernel parameter): - FieldDecl *RngFld = - getFieldDeclByName(AccTy, {"__impl", "Range"}, &Offset); - uint64_t Sz = Ctx.getTypeSizeInChars(RngFld->getType()).getQuantity(); + // ... second descriptor (translated to access range kernel parameter): + FieldDecl *AccessRngFld = + getFieldDeclByName(AccTy, {"__impl", "AccessRange"}, &Offset); + uint64_t Sz = + Ctx.getTypeSizeInChars(AccessRngFld->getType()).getQuantity(); + H.addParamDesc(SYCLIntegrationHeader::kind_std_layout, + static_cast(Sz), static_cast(Offset)); + // ... third descriptor (translated to mem range kernel parameter): + // Get offset in bytes + Offset = Layout.getFieldOffset(Fld->getFieldIndex()) / 8; + FieldDecl *MemRngFld = + getFieldDeclByName(AccTy, {"__impl", "MemRange"}, &Offset); + Sz = Ctx.getTypeSizeInChars(MemRngFld->getType()).getQuantity(); H.addParamDesc(SYCLIntegrationHeader::kind_std_layout, static_cast(Sz), static_cast(Offset)); - // ... third descriptor (translated to id kernel parameter): + // ... fourth descriptor (translated to id kernel parameter): // Get offset in bytes Offset = Layout.getFieldOffset(Fld->getFieldIndex()) / 8; FieldDecl *OffstFld = @@ -771,13 +800,30 @@ void Sema::ConstructSYCLKernel(FunctionDecl *KernelCallerFunc) { CreateSYCLKernelBody(*this, KernelCallerFunc, SYCLKernel); SYCLKernel->setBody(SYCLKernelBody); AddSyclKernel(SYCLKernel); +} + +void Sema::MarkDevice(void) { // Let's mark all called functions with SYCL Device attribute. - MarkDeviceFunction Marker(*this); // Create the call graph so we can detect recursion and check the validity // of new operator overrides. Add the kernel function itself in case // it is recursive. + MarkDeviceFunction Marker(*this); Marker.SYCLCG.addToCallGraph(getASTContext().getTranslationUnitDecl()); - Marker.TraverseStmt(SYCLKernelBody); + for (Decl *D : SyclKernels()) { + if (auto SYCLKernel = dyn_cast(D)) { + llvm::SmallPtrSet VisitedSet; + Marker.CollectKernelSet(SYCLKernel, SYCLKernel, VisitedSet); + } + } + for (const auto &elt : Marker.KernelSet) { + if (FunctionDecl *Def = elt->getDefinition()) { + if (!Def->hasAttr()) { + Def->addAttr(SYCLDeviceAttr::CreateImplicit(Context)); + AddSyclKernel(Def); + } + Marker.TraverseStmt(Def->getBody()); + } + } } // ----------------------------------------------------------------------------- @@ -1026,9 +1072,12 @@ void SYCLIntegrationHeader::emit(raw_ostream &O) { const size_t N = K.Params.size(); O << "template <> struct KernelInfo<" << eraseAnonNamespace(K.NameType.getAsString()) << "> {\n"; + O << " DLL_LOCAL\n"; O << " static constexpr const char* getName() { return \"" << K.Name << "\"; }\n"; + O << " DLL_LOCAL\n"; O << " static constexpr unsigned getNumParams() { return " << N << "; }\n"; + O << " DLL_LOCAL\n"; O << " static constexpr const kernel_param_desc_t& "; O << "getParamDesc(unsigned i) {\n"; O << " return kernel_signatures[i+" << CurStart << "];\n"; diff --git a/clang/lib/Sema/SemaStmt.cpp b/clang/lib/Sema/SemaStmt.cpp index d19383e41a8c6..07af218b77ce0 100644 --- a/clang/lib/Sema/SemaStmt.cpp +++ b/clang/lib/Sema/SemaStmt.cpp @@ -346,10 +346,6 @@ sema::CompoundScopeInfo &Sema::getCurCompoundScope() const { return getCurFunction()->CompoundScopes.back(); } -bool Sema::isCurCompoundStmtAStmtExpr() const { - return getCurCompoundScope().IsStmtExpr; -} - StmtResult Sema::ActOnCompoundStmt(SourceLocation L, SourceLocation R, ArrayRef Elts, bool isStmtExpr) { const unsigned NumElts = Elts.size(); @@ -3997,12 +3993,10 @@ StmtResult Sema::ActOnCXXTryBlock(SourceLocation TryLoc, Stmt *TryBlock, ArrayRef Handlers) { // Don't report an error if 'try' is used in system headers. if (!getLangOpts().CXXExceptions && - !getSourceManager().isInSystemHeader(TryLoc) && - (!getLangOpts().OpenMPIsDevice || - !getLangOpts().OpenMPHostCXXExceptions || - isInOpenMPTargetExecutionDirective() || - isInOpenMPDeclareTargetContext())) - Diag(TryLoc, diag::err_exceptions_disabled) << "try"; + !getSourceManager().isInSystemHeader(TryLoc) && !getLangOpts().CUDA) { + // Delay error emission for the OpenMP device code. + targetDiag(TryLoc, diag::err_exceptions_disabled) << "try"; + } // Exceptions aren't allowed in CUDA device code. if (getLangOpts().CUDA) diff --git a/clang/lib/Sema/SemaStmtAsm.cpp b/clang/lib/Sema/SemaStmtAsm.cpp index 7ece7aca0baa8..21a72907112da 100644 --- a/clang/lib/Sema/SemaStmtAsm.cpp +++ b/clang/lib/Sema/SemaStmtAsm.cpp @@ -253,18 +253,9 @@ StmtResult Sema::ActOnGCCAsmStmt(SourceLocation AsmLoc, bool IsSimple, // The parser verifies that there is a string literal here. assert(AsmString->isAscii()); - // If we're compiling CUDA file and function attributes indicate that it's not - // for this compilation side, skip all the checks. - if (!DeclAttrsMatchCUDAMode(getLangOpts(), getCurFunctionDecl())) { - GCCAsmStmt *NS = new (Context) GCCAsmStmt( - Context, AsmLoc, IsSimple, IsVolatile, NumOutputs, NumInputs, Names, - Constraints, Exprs.data(), AsmString, NumClobbers, Clobbers, RParenLoc); - return NS; - } - // Skip all the checks if we are compiling SYCL device code, but the function // is not marked to be used on device, this code won't be codegen'ed anyway. - if (getLangOpts().SYCL) { + if (getLangOpts().SYCLIsDevice) { GCCAsmStmt *NS = new (Context) GCCAsmStmt( Context, AsmLoc, IsSimple, IsVolatile, NumOutputs, NumInputs, Names, Constraints, Exprs.data(), AsmString, NumClobbers, Clobbers, RParenLoc); @@ -280,10 +271,15 @@ StmtResult Sema::ActOnGCCAsmStmt(SourceLocation AsmLoc, bool IsSimple, OutputName = Names[i]->getName(); TargetInfo::ConstraintInfo Info(Literal->getString(), OutputName); - if (!Context.getTargetInfo().validateOutputConstraint(Info)) - return StmtError( - Diag(Literal->getBeginLoc(), diag::err_asm_invalid_output_constraint) - << Info.getConstraintStr()); + if (!Context.getTargetInfo().validateOutputConstraint(Info)) { + targetDiag(Literal->getBeginLoc(), + diag::err_asm_invalid_output_constraint) + << Info.getConstraintStr(); + return new (Context) + GCCAsmStmt(Context, AsmLoc, IsSimple, IsVolatile, NumOutputs, + NumInputs, Names, Constraints, Exprs.data(), AsmString, + NumClobbers, Clobbers, RParenLoc); + } ExprResult ER = CheckPlaceholderExpr(Exprs[i]); if (ER.isInvalid()) @@ -337,10 +333,14 @@ StmtResult Sema::ActOnGCCAsmStmt(SourceLocation AsmLoc, bool IsSimple, unsigned Size = Context.getTypeSize(OutputExpr->getType()); if (!Context.getTargetInfo().validateOutputSize(Literal->getString(), - Size)) - return StmtError( - Diag(OutputExpr->getBeginLoc(), diag::err_asm_invalid_output_size) - << Info.getConstraintStr()); + Size)) { + targetDiag(OutputExpr->getBeginLoc(), diag::err_asm_invalid_output_size) + << Info.getConstraintStr(); + return new (Context) + GCCAsmStmt(Context, AsmLoc, IsSimple, IsVolatile, NumOutputs, + NumInputs, Names, Constraints, Exprs.data(), AsmString, + NumClobbers, Clobbers, RParenLoc); + } } SmallVector InputConstraintInfos; @@ -356,9 +356,12 @@ StmtResult Sema::ActOnGCCAsmStmt(SourceLocation AsmLoc, bool IsSimple, TargetInfo::ConstraintInfo Info(Literal->getString(), InputName); if (!Context.getTargetInfo().validateInputConstraint(OutputConstraintInfos, Info)) { - return StmtError( - Diag(Literal->getBeginLoc(), diag::err_asm_invalid_input_constraint) - << Info.getConstraintStr()); + targetDiag(Literal->getBeginLoc(), diag::err_asm_invalid_input_constraint) + << Info.getConstraintStr(); + return new (Context) + GCCAsmStmt(Context, AsmLoc, IsSimple, IsVolatile, NumOutputs, + NumInputs, Names, Constraints, Exprs.data(), AsmString, + NumClobbers, Clobbers, RParenLoc); } ExprResult ER = CheckPlaceholderExpr(Exprs[i]); @@ -430,8 +433,8 @@ StmtResult Sema::ActOnGCCAsmStmt(SourceLocation AsmLoc, bool IsSimple, unsigned Size = Context.getTypeSize(Ty); if (!Context.getTargetInfo().validateInputSize(Literal->getString(), Size)) - return StmtError( - Diag(InputExpr->getBeginLoc(), diag::err_asm_invalid_input_size) + return StmtResult( + targetDiag(InputExpr->getBeginLoc(), diag::err_asm_invalid_input_size) << Info.getConstraintStr()); } @@ -442,10 +445,14 @@ StmtResult Sema::ActOnGCCAsmStmt(SourceLocation AsmLoc, bool IsSimple, StringRef Clobber = Literal->getString(); - if (!Context.getTargetInfo().isValidClobber(Clobber)) - return StmtError( - Diag(Literal->getBeginLoc(), diag::err_asm_unknown_register_name) - << Clobber); + if (!Context.getTargetInfo().isValidClobber(Clobber)) { + targetDiag(Literal->getBeginLoc(), diag::err_asm_unknown_register_name) + << Clobber; + return new (Context) + GCCAsmStmt(Context, AsmLoc, IsSimple, IsVolatile, NumOutputs, + NumInputs, Names, Constraints, Exprs.data(), AsmString, + NumClobbers, Clobbers, RParenLoc); + } } GCCAsmStmt *NS = @@ -457,9 +464,9 @@ StmtResult Sema::ActOnGCCAsmStmt(SourceLocation AsmLoc, bool IsSimple, SmallVector Pieces; unsigned DiagOffs; if (unsigned DiagID = NS->AnalyzeAsmString(Pieces, Context, DiagOffs)) { - Diag(getLocationOfStringLiteralByte(AsmString, DiagOffs), DiagID) - << AsmString->getSourceRange(); - return StmtError(); + targetDiag(getLocationOfStringLiteralByte(AsmString, DiagOffs), DiagID) + << AsmString->getSourceRange(); + return NS; } // Validate constraints and modifiers. @@ -497,16 +504,15 @@ StmtResult Sema::ActOnGCCAsmStmt(SourceLocation AsmLoc, bool IsSimple, if (!Context.getTargetInfo().validateConstraintModifier( Literal->getString(), Piece.getModifier(), Size, SuggestedModifier)) { - Diag(Exprs[ConstraintIdx]->getBeginLoc(), - diag::warn_asm_mismatched_size_modifier); + targetDiag(Exprs[ConstraintIdx]->getBeginLoc(), + diag::warn_asm_mismatched_size_modifier); if (!SuggestedModifier.empty()) { - auto B = Diag(Piece.getRange().getBegin(), - diag::note_asm_missing_constraint_modifier) + auto B = targetDiag(Piece.getRange().getBegin(), + diag::note_asm_missing_constraint_modifier) << SuggestedModifier; SuggestedModifier = "%" + SuggestedModifier + Piece.getString(); - B.AddFixItHint(FixItHint::CreateReplacement(Piece.getRange(), - SuggestedModifier)); + B << FixItHint::CreateReplacement(Piece.getRange(), SuggestedModifier); } } } @@ -517,12 +523,14 @@ StmtResult Sema::ActOnGCCAsmStmt(SourceLocation AsmLoc, bool IsSimple, TargetInfo::ConstraintInfo &Info = OutputConstraintInfos[i]; StringRef ConstraintStr = Info.getConstraintStr(); unsigned AltCount = ConstraintStr.count(',') + 1; - if (NumAlternatives == ~0U) + if (NumAlternatives == ~0U) { NumAlternatives = AltCount; - else if (NumAlternatives != AltCount) - return StmtError(Diag(NS->getOutputExpr(i)->getBeginLoc(), - diag::err_asm_unexpected_constraint_alternatives) - << NumAlternatives << AltCount); + } else if (NumAlternatives != AltCount) { + targetDiag(NS->getOutputExpr(i)->getBeginLoc(), + diag::err_asm_unexpected_constraint_alternatives) + << NumAlternatives << AltCount; + return NS; + } } SmallVector InputMatchedToOutput(OutputConstraintInfos.size(), ~0U); @@ -530,12 +538,14 @@ StmtResult Sema::ActOnGCCAsmStmt(SourceLocation AsmLoc, bool IsSimple, TargetInfo::ConstraintInfo &Info = InputConstraintInfos[i]; StringRef ConstraintStr = Info.getConstraintStr(); unsigned AltCount = ConstraintStr.count(',') + 1; - if (NumAlternatives == ~0U) + if (NumAlternatives == ~0U) { NumAlternatives = AltCount; - else if (NumAlternatives != AltCount) - return StmtError(Diag(NS->getInputExpr(i)->getBeginLoc(), - diag::err_asm_unexpected_constraint_alternatives) - << NumAlternatives << AltCount); + } else if (NumAlternatives != AltCount) { + targetDiag(NS->getInputExpr(i)->getBeginLoc(), + diag::err_asm_unexpected_constraint_alternatives) + << NumAlternatives << AltCount; + return NS; + } // If this is a tied constraint, verify that the output and input have // either exactly the same type, or that they are int/ptr operands with the @@ -550,13 +560,13 @@ StmtResult Sema::ActOnGCCAsmStmt(SourceLocation AsmLoc, bool IsSimple, // Make sure no more than one input constraint matches each output. assert(TiedTo < InputMatchedToOutput.size() && "TiedTo value out of range"); if (InputMatchedToOutput[TiedTo] != ~0U) { - Diag(NS->getInputExpr(i)->getBeginLoc(), - diag::err_asm_input_duplicate_match) + targetDiag(NS->getInputExpr(i)->getBeginLoc(), + diag::err_asm_input_duplicate_match) << TiedTo; - Diag(NS->getInputExpr(InputMatchedToOutput[TiedTo])->getBeginLoc(), - diag::note_asm_input_duplicate_first) + targetDiag(NS->getInputExpr(InputMatchedToOutput[TiedTo])->getBeginLoc(), + diag::note_asm_input_duplicate_first) << TiedTo; - return StmtError(); + return NS; } InputMatchedToOutput[TiedTo] = i; @@ -641,10 +651,10 @@ StmtResult Sema::ActOnGCCAsmStmt(SourceLocation AsmLoc, bool IsSimple, continue; } - Diag(InputExpr->getBeginLoc(), diag::err_asm_tying_incompatible_types) + targetDiag(InputExpr->getBeginLoc(), diag::err_asm_tying_incompatible_types) << InTy << OutTy << OutputExpr->getSourceRange() << InputExpr->getSourceRange(); - return StmtError(); + return NS; } // Check for conflicts between clobber list and input or output lists @@ -652,7 +662,7 @@ StmtResult Sema::ActOnGCCAsmStmt(SourceLocation AsmLoc, bool IsSimple, getClobberConflictLocation(Exprs, Constraints, Clobbers, NumClobbers, Context.getTargetInfo(), Context); if (ConstraintLoc.isValid()) - return Diag(ConstraintLoc, diag::error_inoutput_conflict_with_clobber); + targetDiag(ConstraintLoc, diag::error_inoutput_conflict_with_clobber); return NS; } diff --git a/clang/lib/Sema/SemaTemplate.cpp b/clang/lib/Sema/SemaTemplate.cpp index 2e73096a9bad0..3f642b5c426a3 100644 --- a/clang/lib/Sema/SemaTemplate.cpp +++ b/clang/lib/Sema/SemaTemplate.cpp @@ -66,17 +66,20 @@ static Expr *clang::formAssociatedConstraints(TemplateParameterList *Params, /// Determine whether the declaration found is acceptable as the name /// of a template and, if so, return that template declaration. Otherwise, -/// returns NULL. -static NamedDecl *isAcceptableTemplateName(ASTContext &Context, - NamedDecl *Orig, - bool AllowFunctionTemplates) { - NamedDecl *D = Orig->getUnderlyingDecl(); +/// returns null. +/// +/// Note that this may return an UnresolvedUsingValueDecl if AllowDependent +/// is true. In all other cases it will return a TemplateDecl (or null). +NamedDecl *Sema::getAsTemplateNameDecl(NamedDecl *D, + bool AllowFunctionTemplates, + bool AllowDependent) { + D = D->getUnderlyingDecl(); if (isa(D)) { if (!AllowFunctionTemplates && isa(D)) return nullptr; - return Orig; + return D; } if (CXXRecordDecl *Record = dyn_cast(D)) { @@ -107,54 +110,29 @@ static NamedDecl *isAcceptableTemplateName(ASTContext &Context, // 'using Dependent::foo;' can resolve to a template name. // 'using typename Dependent::foo;' cannot (not even if 'foo' is an // injected-class-name). - if (isa(D)) + if (AllowDependent && isa(D)) return D; return nullptr; } void Sema::FilterAcceptableTemplateNames(LookupResult &R, - bool AllowFunctionTemplates) { - // The set of class templates we've already seen. - llvm::SmallPtrSet ClassTemplates; + bool AllowFunctionTemplates, + bool AllowDependent) { LookupResult::Filter filter = R.makeFilter(); while (filter.hasNext()) { NamedDecl *Orig = filter.next(); - NamedDecl *Repl = isAcceptableTemplateName(Context, Orig, - AllowFunctionTemplates); - if (!Repl) + if (!getAsTemplateNameDecl(Orig, AllowFunctionTemplates, AllowDependent)) filter.erase(); - else if (Repl != Orig) { - - // C++ [temp.local]p3: - // A lookup that finds an injected-class-name (10.2) can result in an - // ambiguity in certain cases (for example, if it is found in more than - // one base class). If all of the injected-class-names that are found - // refer to specializations of the same class template, and if the name - // is used as a template-name, the reference refers to the class - // template itself and not a specialization thereof, and is not - // ambiguous. - if (ClassTemplateDecl *ClassTmpl = dyn_cast(Repl)) - if (!ClassTemplates.insert(ClassTmpl).second) { - filter.erase(); - continue; - } - - // FIXME: we promote access to public here as a workaround to - // the fact that LookupResult doesn't let us remember that we - // found this template through a particular injected class name, - // which means we end up doing nasty things to the invariants. - // Pretending that access is public is *much* safer. - filter.replace(Repl, AS_public); - } } filter.done(); } bool Sema::hasAnyAcceptableTemplateNames(LookupResult &R, - bool AllowFunctionTemplates) { + bool AllowFunctionTemplates, + bool AllowDependent) { for (LookupResult::iterator I = R.begin(), IEnd = R.end(); I != IEnd; ++I) - if (isAcceptableTemplateName(Context, *I, AllowFunctionTemplates)) + if (getAsTemplateNameDecl(*I, AllowFunctionTemplates, AllowDependent)) return true; return false; @@ -198,20 +176,45 @@ TemplateNameKind Sema::isTemplateName(Scope *S, MemberOfUnknownSpecialization)) return TNK_Non_template; if (R.empty()) return TNK_Non_template; + + NamedDecl *D = nullptr; if (R.isAmbiguous()) { - // Suppress diagnostics; we'll redo this lookup later. - R.suppressDiagnostics(); + // If we got an ambiguity involving a non-function template, treat this + // as a template name, and pick an arbitrary template for error recovery. + bool AnyFunctionTemplates = false; + for (NamedDecl *FoundD : R) { + if (NamedDecl *FoundTemplate = getAsTemplateNameDecl(FoundD)) { + if (isa(FoundTemplate)) + AnyFunctionTemplates = true; + else { + D = FoundTemplate; + break; + } + } + } - // FIXME: we might have ambiguous templates, in which case we - // should at least parse them properly! - return TNK_Non_template; + // If we didn't find any templates at all, this isn't a template name. + // Leave the ambiguity for a later lookup to diagnose. + if (!D && !AnyFunctionTemplates) { + R.suppressDiagnostics(); + return TNK_Non_template; + } + + // If the only templates were function templates, filter out the rest. + // We'll diagnose the ambiguity later. + if (!D) + FilterAcceptableTemplateNames(R); } + // At this point, we have either picked a single template name declaration D + // or we have a non-empty set of results R containing either one template name + // declaration or a set of function templates. + TemplateName Template; TemplateNameKind TemplateKind; unsigned ResultCount = R.end() - R.begin(); - if (ResultCount > 1) { + if (!D && ResultCount > 1) { // We assume that we'll preserve the qualifier from a function // template name in other ways. Template = Context.getOverloadedTemplateName(R.begin(), R.end()); @@ -219,12 +222,19 @@ TemplateNameKind Sema::isTemplateName(Scope *S, // We'll do this lookup again later. R.suppressDiagnostics(); - } else if (isa((*R.begin())->getUnderlyingDecl())) { - // We don't yet know whether this is a template-name or not. - MemberOfUnknownSpecialization = true; - return TNK_Non_template; } else { - TemplateDecl *TD = cast((*R.begin())->getUnderlyingDecl()); + if (!D) { + D = getAsTemplateNameDecl(*R.begin()); + assert(D && "unambiguous result is not a template name"); + } + + if (isa(D)) { + // We don't yet know whether this is a template-name or not. + MemberOfUnknownSpecialization = true; + return TNK_Non_template; + } + + TemplateDecl *TD = cast(D); if (SS.isSet() && !SS.isInvalid()) { NestedNameSpecifier *Qualifier = SS.getScopeRep(); @@ -316,6 +326,8 @@ bool Sema::LookupTemplateName(LookupResult &Found, bool EnteringContext, bool &MemberOfUnknownSpecialization, SourceLocation TemplateKWLoc) { + Found.setTemplateNameLookup(true); + // Determine where to perform name lookup MemberOfUnknownSpecialization = false; DeclContext *LookupCtx = nullptr; @@ -390,6 +402,9 @@ bool Sema::LookupTemplateName(LookupResult &Found, IsDependent |= Found.wasNotFoundInCurrentInstantiation(); } + if (Found.isAmbiguous()) + return false; + if (Found.empty() && !IsDependent) { // If we did not find any names, attempt to correct any typos. DeclarationName Name = Found.getLookupName(); @@ -407,7 +422,9 @@ bool Sema::LookupTemplateName(LookupResult &Found, if (auto *ND = Corrected.getFoundDecl()) Found.addDecl(ND); FilterAcceptableTemplateNames(Found); - if (!Found.empty()) { + if (Found.isAmbiguous()) { + Found.clear(); + } else if (!Found.empty()) { if (LookupCtx) { std::string CorrectedStr(Corrected.getAsString(getLangOpts())); bool DroppedSpecifier = Corrected.WillReplaceSpecifier() && @@ -457,14 +474,19 @@ bool Sema::LookupTemplateName(LookupResult &Found, // Note: C++11 does not perform this second lookup. LookupResult FoundOuter(*this, Found.getLookupName(), Found.getNameLoc(), LookupOrdinaryName); + FoundOuter.setTemplateNameLookup(true); LookupName(FoundOuter, S); + // FIXME: We silently accept an ambiguous lookup here, in violation of + // [basic.lookup]/1. FilterAcceptableTemplateNames(FoundOuter, /*AllowFunctionTemplates=*/false); + NamedDecl *OuterTemplate; if (FoundOuter.empty()) { // - if the name is not found, the name found in the class of the // object expression is used, otherwise - } else if (!FoundOuter.getAsSingle() || - FoundOuter.isAmbiguous()) { + } else if (FoundOuter.isAmbiguous() || !FoundOuter.isSingleResult() || + !(OuterTemplate = + getAsTemplateNameDecl(FoundOuter.getFoundDecl()))) { // - if the name is found in the context of the entire // postfix-expression and does not name a class template, the name // found in the class of the object expression is used, otherwise @@ -474,8 +496,8 @@ bool Sema::LookupTemplateName(LookupResult &Found, // entity as the one found in the class of the object expression, // otherwise the program is ill-formed. if (!Found.isSingleResult() || - Found.getFoundDecl()->getCanonicalDecl() - != FoundOuter.getFoundDecl()->getCanonicalDecl()) { + getAsTemplateNameDecl(Found.getFoundDecl())->getCanonicalDecl() != + OuterTemplate->getCanonicalDecl()) { Diag(Found.getNameLoc(), diag::ext_nested_name_member_ref_lookup_ambiguous) << Found.getLookupName() @@ -545,7 +567,8 @@ void Sema::diagnoseExprIntendedAsTemplateName(Scope *S, ExprResult TemplateName, // Try to correct the name by looking for templates and C++ named casts. struct TemplateCandidateFilter : CorrectionCandidateCallback { - TemplateCandidateFilter() { + Sema &S; + TemplateCandidateFilter(Sema &S) : S(S) { WantTypeSpecifiers = false; WantExpressionKeywords = false; WantRemainingKeywords = false; @@ -553,7 +576,7 @@ void Sema::diagnoseExprIntendedAsTemplateName(Scope *S, ExprResult TemplateName, }; bool ValidateCandidate(const TypoCorrection &Candidate) override { if (auto *ND = Candidate.getCorrectionDecl()) - return isAcceptableTemplateName(ND->getASTContext(), ND, true); + return S.getAsTemplateNameDecl(ND); return Candidate.isKeyword(); } }; @@ -561,12 +584,11 @@ void Sema::diagnoseExprIntendedAsTemplateName(Scope *S, ExprResult TemplateName, DeclarationName Name = NameInfo.getName(); if (TypoCorrection Corrected = CorrectTypo(NameInfo, LookupKind, S, &SS, - llvm::make_unique(), + llvm::make_unique(*this), CTK_ErrorRecovery, LookupCtx)) { auto *ND = Corrected.getFoundDecl(); if (ND) - ND = isAcceptableTemplateName(Context, ND, - /*AllowFunctionTemplates*/ true); + ND = getAsTemplateNameDecl(ND); if (ND || Corrected.isKeyword()) { if (LookupCtx) { std::string CorrectedStr(Corrected.getAsString(getLangOpts())); @@ -4262,7 +4284,7 @@ TemplateNameKind Sema::ActOnDependentTemplateName(Scope *S, LookupOrdinaryName); bool MOUS; if (!LookupTemplateName(R, S, SS, ObjectType.get(), EnteringContext, - MOUS, TemplateKWLoc)) + MOUS, TemplateKWLoc) && !R.isAmbiguous()) Diag(Name.getBeginLoc(), diag::err_no_member) << DNI.getName() << LookupCtx << SS.getRange(); return TNK_Non_template; diff --git a/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp b/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp index 665654b2a98d9..9812c633d94de 100644 --- a/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp +++ b/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp @@ -344,6 +344,51 @@ static void instantiateOMPDeclareSimdDeclAttr( Attr.getRange()); } +static void instantiateDependentAMDGPUFlatWorkGroupSizeAttr( + Sema &S, const MultiLevelTemplateArgumentList &TemplateArgs, + const AMDGPUFlatWorkGroupSizeAttr &Attr, Decl *New) { + // Both min and max expression are constant expressions. + EnterExpressionEvaluationContext Unevaluated( + S, Sema::ExpressionEvaluationContext::ConstantEvaluated); + + ExprResult Result = S.SubstExpr(Attr.getMin(), TemplateArgs); + if (Result.isInvalid()) + return; + Expr *MinExpr = Result.getAs(); + + Result = S.SubstExpr(Attr.getMax(), TemplateArgs); + if (Result.isInvalid()) + return; + Expr *MaxExpr = Result.getAs(); + + S.addAMDGPUFlatWorkGroupSizeAttr(Attr.getLocation(), New, MinExpr, MaxExpr, + Attr.getSpellingListIndex()); +} + +static void instantiateDependentAMDGPUWavesPerEUAttr( + Sema &S, const MultiLevelTemplateArgumentList &TemplateArgs, + const AMDGPUWavesPerEUAttr &Attr, Decl *New) { + // Both min and max expression are constant expressions. + EnterExpressionEvaluationContext Unevaluated( + S, Sema::ExpressionEvaluationContext::ConstantEvaluated); + + ExprResult Result = S.SubstExpr(Attr.getMin(), TemplateArgs); + if (Result.isInvalid()) + return; + Expr *MinExpr = Result.getAs(); + + Expr *MaxExpr = nullptr; + if (auto Max = Attr.getMax()) { + Result = S.SubstExpr(Max, TemplateArgs); + if (Result.isInvalid()) + return; + MaxExpr = Result.getAs(); + } + + S.addAMDGPUWavesPerEUAttr(Attr.getLocation(), New, MinExpr, MaxExpr, + Attr.getSpellingListIndex()); +} + void Sema::InstantiateAttrsForDecl( const MultiLevelTemplateArgumentList &TemplateArgs, const Decl *Tmpl, Decl *New, LateInstantiatedAttrVec *LateAttrs, @@ -437,6 +482,18 @@ void Sema::InstantiateAttrs(const MultiLevelTemplateArgumentList &TemplateArgs, continue; } + if (const AMDGPUFlatWorkGroupSizeAttr *AMDGPUFlatWorkGroupSize = + dyn_cast(TmplAttr)) { + instantiateDependentAMDGPUFlatWorkGroupSizeAttr( + *this, TemplateArgs, *AMDGPUFlatWorkGroupSize, New); + } + + if (const AMDGPUWavesPerEUAttr *AMDGPUFlatWorkGroupSize = + dyn_cast(TmplAttr)) { + instantiateDependentAMDGPUWavesPerEUAttr(*this, TemplateArgs, + *AMDGPUFlatWorkGroupSize, New); + } + // Existing DLL attribute on the instantiation takes precedence. if (TmplAttr->getKind() == attr::DLLExport || TmplAttr->getKind() == attr::DLLImport) { @@ -2989,11 +3046,19 @@ TemplateDeclInstantiator::VisitOMPDeclareMapperDecl(OMPDeclareMapperDecl *D) { } if (!IsCorrect) break; + NestedNameSpecifierLoc NewQualifierLoc = + SemaRef.SubstNestedNameSpecifierLoc(OldC->getMapperQualifierLoc(), + TemplateArgs); + CXXScopeSpec SS; + SS.Adopt(NewQualifierLoc); + DeclarationNameInfo NewNameInfo = SemaRef.SubstDeclarationNameInfo( + OldC->getMapperIdInfo(), TemplateArgs); + OMPVarListLocTy Locs(OldC->getBeginLoc(), OldC->getLParenLoc(), + OldC->getEndLoc()); OMPClause *NewC = SemaRef.ActOnOpenMPMapClause( - OldC->getMapTypeModifiers(), OldC->getMapTypeModifiersLoc(), - OldC->getMapType(), OldC->isImplicitMapType(), OldC->getMapLoc(), - OldC->getColonLoc(), NewVars, OldC->getBeginLoc(), - OldC->getLParenLoc(), OldC->getEndLoc()); + OldC->getMapTypeModifiers(), OldC->getMapTypeModifiersLoc(), SS, + NewNameInfo, OldC->getMapType(), OldC->isImplicitMapType(), + OldC->getMapLoc(), OldC->getColonLoc(), NewVars, Locs); Clauses.push_back(NewC); } SemaRef.EndOpenMPDSABlock(nullptr); @@ -5378,7 +5443,8 @@ void Sema::PerformPendingInstantiations(bool LocalOnly) { // Because all SYCL kernel functions are template functions - they // have deferred instantination. We need bodies of these functions // so we are checking for SYCL kernel attribute after instantination. - if (getLangOpts().SYCL && CurFD->hasAttr()) { + if (getLangOpts().SYCLIsDevice && + CurFD->hasAttr()) { ConstructSYCLKernel(CurFD); } CurFD->setInstantiationIsPending(false); @@ -5391,7 +5457,8 @@ void Sema::PerformPendingInstantiations(bool LocalOnly) { // Because all SYCL kernel functions are template functions - they // have deferred instantination. We need bodies of these functions // so we are checking for SYCL kernel attribute after instantination. - if (getLangOpts().SYCL && Function->hasAttr()) { + if (getLangOpts().SYCLIsDevice && + Function->hasAttr()) { ConstructSYCLKernel(Function); } Function->setInstantiationIsPending(false); diff --git a/clang/lib/Sema/SemaType.cpp b/clang/lib/Sema/SemaType.cpp index 2b275a30841b3..3ba795ed8bd7f 100644 --- a/clang/lib/Sema/SemaType.cpp +++ b/clang/lib/Sema/SemaType.cpp @@ -1433,7 +1433,8 @@ static QualType ConvertDeclSpecToType(TypeProcessingState &state) { break; } case DeclSpec::TST_int128: - if (!S.Context.getTargetInfo().hasInt128Type()) + if (!S.Context.getTargetInfo().hasInt128Type() && + !(S.getLangOpts().OpenMP && S.getLangOpts().OpenMPIsDevice)) S.Diag(DS.getTypeSpecTypeLoc(), diag::err_type_unsupported) << "__int128"; if (DS.getTypeSpecSign() == DeclSpec::TSS_unsigned) @@ -1445,7 +1446,8 @@ static QualType ConvertDeclSpecToType(TypeProcessingState &state) { // CUDA host and device may have different _Float16 support, therefore // do not diagnose _Float16 usage to avoid false alarm. // ToDo: more precise diagnostics for CUDA. - if (!S.Context.getTargetInfo().hasFloat16Type() && !S.getLangOpts().CUDA) + if (!S.Context.getTargetInfo().hasFloat16Type() && !S.getLangOpts().CUDA && + !(S.getLangOpts().OpenMP && S.getLangOpts().OpenMPIsDevice)) S.Diag(DS.getTypeSpecTypeLoc(), diag::err_type_unsupported) << "_Float16"; Result = Context.Float16Ty; @@ -1459,7 +1461,8 @@ static QualType ConvertDeclSpecToType(TypeProcessingState &state) { Result = Context.DoubleTy; break; case DeclSpec::TST_float128: - if (!S.Context.getTargetInfo().hasFloat128Type()) + if (!S.Context.getTargetInfo().hasFloat128Type() && + !(S.getLangOpts().OpenMP && S.getLangOpts().OpenMPIsDevice)) S.Diag(DS.getTypeSpecTypeLoc(), diag::err_type_unsupported) << "__float128"; Result = Context.Float128Ty; @@ -2249,18 +2252,16 @@ QualType Sema::BuildArrayType(QualType T, ArrayType::ArraySizeModifier ASM, return QualType(); } - if (T->isVariableArrayType() && !Context.getTargetInfo().isVLASupported()) { - if (getLangOpts().CUDA) { - // CUDA device code doesn't support VLAs. - CUDADiagIfDeviceCode(Loc, diag::err_cuda_vla) << CurrentCUDATarget(); - } else if (getLangOpts().SYCL) { - // Delay diagnostic to SemaSYCL so only Kernel functions are diagnosed. - } else if (!getLangOpts().OpenMP || - shouldDiagnoseTargetSupportFromOpenMP()) { - // Some targets don't support VLAs. - Diag(Loc, diag::err_vla_unsupported); - return QualType(); - } + // Delay diagnostic to SemaSYCL so only Kernel functions are diagnosed. + if (T->isVariableArrayType() && !Context.getTargetInfo().isVLASupported() && + !getLangOpts().SYCLIsDevice) { + // CUDA device code and some other targets don't support VLAs. + targetDiag(Loc, (getLangOpts().CUDA && getLangOpts().CUDAIsDevice) + ? diag::err_cuda_vla + : diag::err_vla_unsupported) + << ((getLangOpts().CUDA && getLangOpts().CUDAIsDevice) + ? CurrentCUDATarget() + : CFT_InvalidTarget); } // If this is not C99, extwarn about VLA's and C99 array size modifiers. @@ -2366,7 +2367,7 @@ QualType Sema::BuildExtVectorType(QualType T, Expr *ArraySize, // of bool aren't allowed. if ((!T->isDependentType() && !T->isIntegerType() && !T->isRealFloatingType()) || - T->isBooleanType()) { + (!Context.getLangOpts().SYCLIsDevice && T->isBooleanType())) { Diag(AttrLoc, diag::err_attribute_invalid_vector_type) << T; return QualType(); } @@ -5832,7 +5833,7 @@ static bool BuildAddressSpaceIndex(Sema &S, LangAS &ASIdx, return false; } - if (S.LangOpts.SYCL && (addrSpace == 4 || addrSpace > 5)) { + if (S.LangOpts.SYCLIsDevice && (addrSpace >= 4)) { S.Diag(AttrLoc, diag::err_sycl_attribute_address_space_invalid) << AddrSpace->getSourceRange(); return false; @@ -5841,11 +5842,11 @@ static bool BuildAddressSpaceIndex(Sema &S, LangAS &ASIdx, ASIdx = getLangASFromTargetAS( static_cast(addrSpace.getZExtValue())); - if (S.LangOpts.SYCL) { + if (S.LangOpts.SYCLIsDevice) { ASIdx = [](unsigned AS) { switch (AS) { - case 5: case 0: return LangAS::sycl_private; + case 0: return LangAS::sycl_private; case 1: return LangAS::sycl_global; case 2: return LangAS::sycl_constant; case 3: return LangAS::sycl_local; @@ -5979,7 +5980,8 @@ static void HandleAddressSpaceTypeAttribute(QualType &Type, Attr.setInvalid(); } else { // The keyword-based type attributes imply which address space to use. - ASIdx = S.getLangOpts().SYCL ? Attr.asSYCLLangAS() : Attr.asOpenCLLangAS(); + ASIdx = S.getLangOpts().SYCLIsDevice ? + Attr.asSYCLLangAS() : Attr.asOpenCLLangAS(); if (ASIdx == LangAS::Default) llvm_unreachable("Invalid address space"); diff --git a/clang/lib/Sema/TreeTransform.h b/clang/lib/Sema/TreeTransform.h index e411a2ad47c91..386b23db3a251 100644 --- a/clang/lib/Sema/TreeTransform.h +++ b/clang/lib/Sema/TreeTransform.h @@ -318,6 +318,13 @@ class TreeTransform { TypeSourceInfo *TransformTypeWithDeducedTST(TypeSourceInfo *DI); /// @} + /// The reason why the value of a statement is not discarded, if any. + enum StmtDiscardKind { + SDK_Discarded, + SDK_NotDiscarded, + SDK_StmtExprResult, + }; + /// Transform the given statement. /// /// By default, this routine transforms a statement by delegating to the @@ -327,7 +334,7 @@ class TreeTransform { /// other mechanism. /// /// \returns the transformed statement. - StmtResult TransformStmt(Stmt *S, bool DiscardedValue = false); + StmtResult TransformStmt(Stmt *S, StmtDiscardKind SDK = SDK_Discarded); /// Transform the given statement. /// @@ -672,6 +679,9 @@ class TreeTransform { #define STMT(Node, Parent) \ LLVM_ATTRIBUTE_NOINLINE \ StmtResult Transform##Node(Node *S); +#define VALUESTMT(Node, Parent) \ + LLVM_ATTRIBUTE_NOINLINE \ + StmtResult Transform##Node(Node *S, StmtDiscardKind SDK); #define EXPR(Node, Parent) \ LLVM_ATTRIBUTE_NOINLINE \ ExprResult Transform##Node(Node *E); @@ -1795,17 +1805,17 @@ class TreeTransform { /// /// By default, performs semantic analysis to build the new OpenMP clause. /// Subclasses may override this routine to provide different behavior. - OMPClause * - RebuildOMPMapClause(ArrayRef MapTypeModifiers, - ArrayRef MapTypeModifiersLoc, - OpenMPMapClauseKind MapType, bool IsMapTypeImplicit, - SourceLocation MapLoc, SourceLocation ColonLoc, - ArrayRef VarList, SourceLocation StartLoc, - SourceLocation LParenLoc, SourceLocation EndLoc) { + OMPClause *RebuildOMPMapClause( + ArrayRef MapTypeModifiers, + ArrayRef MapTypeModifiersLoc, + CXXScopeSpec MapperIdScopeSpec, DeclarationNameInfo MapperId, + OpenMPMapClauseKind MapType, bool IsMapTypeImplicit, + SourceLocation MapLoc, SourceLocation ColonLoc, ArrayRef VarList, + const OMPVarListLocTy &Locs, ArrayRef UnresolvedMappers) { return getSema().ActOnOpenMPMapClause(MapTypeModifiers, MapTypeModifiersLoc, - MapType, IsMapTypeImplicit, MapLoc, - ColonLoc, VarList, StartLoc, - LParenLoc, EndLoc); + MapperIdScopeSpec, MapperId, MapType, + IsMapTypeImplicit, MapLoc, ColonLoc, + VarList, Locs, UnresolvedMappers); } /// Build a new OpenMP 'num_teams' clause. @@ -1892,10 +1902,12 @@ class TreeTransform { /// By default, performs semantic analysis to build the new statement. /// Subclasses may override this routine to provide different behavior. OMPClause *RebuildOMPToClause(ArrayRef VarList, - SourceLocation StartLoc, - SourceLocation LParenLoc, - SourceLocation EndLoc) { - return getSema().ActOnOpenMPToClause(VarList, StartLoc, LParenLoc, EndLoc); + CXXScopeSpec &MapperIdScopeSpec, + DeclarationNameInfo &MapperId, + const OMPVarListLocTy &Locs, + ArrayRef UnresolvedMappers) { + return getSema().ActOnOpenMPToClause(VarList, MapperIdScopeSpec, MapperId, + Locs, UnresolvedMappers); } /// Build a new OpenMP 'from' clause. @@ -1903,11 +1915,12 @@ class TreeTransform { /// By default, performs semantic analysis to build the new statement. /// Subclasses may override this routine to provide different behavior. OMPClause *RebuildOMPFromClause(ArrayRef VarList, - SourceLocation StartLoc, - SourceLocation LParenLoc, - SourceLocation EndLoc) { - return getSema().ActOnOpenMPFromClause(VarList, StartLoc, LParenLoc, - EndLoc); + CXXScopeSpec &MapperIdScopeSpec, + DeclarationNameInfo &MapperId, + const OMPVarListLocTy &Locs, + ArrayRef UnresolvedMappers) { + return getSema().ActOnOpenMPFromClause(VarList, MapperIdScopeSpec, MapperId, + Locs, UnresolvedMappers); } /// Build a new OpenMP 'use_device_ptr' clause. @@ -1915,11 +1928,8 @@ class TreeTransform { /// By default, performs semantic analysis to build the new OpenMP clause. /// Subclasses may override this routine to provide different behavior. OMPClause *RebuildOMPUseDevicePtrClause(ArrayRef VarList, - SourceLocation StartLoc, - SourceLocation LParenLoc, - SourceLocation EndLoc) { - return getSema().ActOnOpenMPUseDevicePtrClause(VarList, StartLoc, LParenLoc, - EndLoc); + const OMPVarListLocTy &Locs) { + return getSema().ActOnOpenMPUseDevicePtrClause(VarList, Locs); } /// Build a new OpenMP 'is_device_ptr' clause. @@ -1927,11 +1937,8 @@ class TreeTransform { /// By default, performs semantic analysis to build the new OpenMP clause. /// Subclasses may override this routine to provide different behavior. OMPClause *RebuildOMPIsDevicePtrClause(ArrayRef VarList, - SourceLocation StartLoc, - SourceLocation LParenLoc, - SourceLocation EndLoc) { - return getSema().ActOnOpenMPIsDevicePtrClause(VarList, StartLoc, LParenLoc, - EndLoc); + const OMPVarListLocTy &Locs) { + return getSema().ActOnOpenMPIsDevicePtrClause(VarList, Locs); } /// Rebuild the operand to an Objective-C \@synchronized statement. @@ -3270,7 +3277,7 @@ class TreeTransform { }; template -StmtResult TreeTransform::TransformStmt(Stmt *S, bool DiscardedValue) { +StmtResult TreeTransform::TransformStmt(Stmt *S, StmtDiscardKind SDK) { if (!S) return S; @@ -3278,8 +3285,12 @@ StmtResult TreeTransform::TransformStmt(Stmt *S, bool DiscardedValue) { case Stmt::NoStmtClass: break; // Transform individual statement nodes + // Pass SDK into statements that can produce a value #define STMT(Node, Parent) \ case Stmt::Node##Class: return getDerived().Transform##Node(cast(S)); +#define VALUESTMT(Node, Parent) \ + case Stmt::Node##Class: \ + return getDerived().Transform##Node(cast(S), SDK); #define ABSTRACT_STMT(Node) #define EXPR(Node, Parent) #include "clang/AST/StmtNodes.inc" @@ -3291,10 +3302,10 @@ StmtResult TreeTransform::TransformStmt(Stmt *S, bool DiscardedValue) { #include "clang/AST/StmtNodes.inc" { ExprResult E = getDerived().TransformExpr(cast(S)); - if (E.isInvalid()) - return StmtError(); - return getSema().ActOnExprStmt(E, DiscardedValue); + if (SDK == SDK_StmtExprResult) + E = getSema().ActOnStmtExprResult(E); + return getSema().ActOnExprStmt(E, SDK == SDK_Discarded); } } @@ -6522,8 +6533,9 @@ TreeTransform::TransformCompoundStmt(CompoundStmt *S, bool SubStmtChanged = false; SmallVector Statements; for (auto *B : S->body()) { - StmtResult Result = - getDerived().TransformStmt(B, !IsStmtExpr || B != S->body_back()); + StmtResult Result = getDerived().TransformStmt( + B, + IsStmtExpr && B == S->body_back() ? SDK_StmtExprResult : SDK_Discarded); if (Result.isInvalid()) { // Immediately fail if this was a DeclStmt, since it's very @@ -6586,7 +6598,8 @@ TreeTransform::TransformCaseStmt(CaseStmt *S) { return StmtError(); // Transform the statement following the case - StmtResult SubStmt = getDerived().TransformStmt(S->getSubStmt()); + StmtResult SubStmt = + getDerived().TransformStmt(S->getSubStmt()); if (SubStmt.isInvalid()) return StmtError(); @@ -6594,11 +6607,11 @@ TreeTransform::TransformCaseStmt(CaseStmt *S) { return getDerived().RebuildCaseStmtBody(Case.get(), SubStmt.get()); } -template -StmtResult -TreeTransform::TransformDefaultStmt(DefaultStmt *S) { +template +StmtResult TreeTransform::TransformDefaultStmt(DefaultStmt *S) { // Transform the statement following the default case - StmtResult SubStmt = getDerived().TransformStmt(S->getSubStmt()); + StmtResult SubStmt = + getDerived().TransformStmt(S->getSubStmt()); if (SubStmt.isInvalid()) return StmtError(); @@ -6609,8 +6622,8 @@ TreeTransform::TransformDefaultStmt(DefaultStmt *S) { template StmtResult -TreeTransform::TransformLabelStmt(LabelStmt *S) { - StmtResult SubStmt = getDerived().TransformStmt(S->getSubStmt()); +TreeTransform::TransformLabelStmt(LabelStmt *S, StmtDiscardKind SDK) { + StmtResult SubStmt = getDerived().TransformStmt(S->getSubStmt(), SDK); if (SubStmt.isInvalid()) return StmtError(); @@ -6619,6 +6632,11 @@ TreeTransform::TransformLabelStmt(LabelStmt *S) { if (!LD) return StmtError(); + // If we're transforming "in-place" (we're not creating new local + // declarations), assume we're replacing the old label statement + // and clear out the reference to it. + if (LD == S->getDecl()) + S->getDecl()->setStmt(nullptr); // FIXME: Pass the real colon location in. return getDerived().RebuildLabelStmt(S->getIdentLoc(), @@ -6644,7 +6662,9 @@ const Attr *TreeTransform::TransformAttr(const Attr *R) { } template -StmtResult TreeTransform::TransformAttributedStmt(AttributedStmt *S) { +StmtResult +TreeTransform::TransformAttributedStmt(AttributedStmt *S, + StmtDiscardKind SDK) { bool AttrsChanged = false; SmallVector Attrs; @@ -6655,7 +6675,7 @@ StmtResult TreeTransform::TransformAttributedStmt(AttributedStmt *S) { Attrs.push_back(R); } - StmtResult SubStmt = getDerived().TransformStmt(S->getSubStmt()); + StmtResult SubStmt = getDerived().TransformStmt(S->getSubStmt(), SDK); if (SubStmt.isInvalid()) return StmtError(); @@ -7360,7 +7380,8 @@ StmtResult TreeTransform::TransformObjCForCollectionStmt( ObjCForCollectionStmt *S) { // Transform the element statement. - StmtResult Element = getDerived().TransformStmt(S->getElement()); + StmtResult Element = + getDerived().TransformStmt(S->getElement(), SDK_NotDiscarded); if (Element.isInvalid()) return StmtError(); @@ -8798,20 +8819,73 @@ TreeTransform::TransformOMPDeviceClause(OMPDeviceClause *C) { C->getLParenLoc(), C->getEndLoc()); } -template -OMPClause *TreeTransform::TransformOMPMapClause(OMPMapClause *C) { - llvm::SmallVector Vars; +template +bool transformOMPMappableExprListClause( + TreeTransform &TT, OMPMappableExprListClause *C, + llvm::SmallVectorImpl &Vars, CXXScopeSpec &MapperIdScopeSpec, + DeclarationNameInfo &MapperIdInfo, + llvm::SmallVectorImpl &UnresolvedMappers) { + // Transform expressions in the list. Vars.reserve(C->varlist_size()); for (auto *VE : C->varlists()) { - ExprResult EVar = getDerived().TransformExpr(cast(VE)); + ExprResult EVar = TT.getDerived().TransformExpr(cast(VE)); if (EVar.isInvalid()) - return nullptr; + return true; Vars.push_back(EVar.get()); } + // Transform mapper scope specifier and identifier. + NestedNameSpecifierLoc QualifierLoc; + if (C->getMapperQualifierLoc()) { + QualifierLoc = TT.getDerived().TransformNestedNameSpecifierLoc( + C->getMapperQualifierLoc()); + if (!QualifierLoc) + return true; + } + MapperIdScopeSpec.Adopt(QualifierLoc); + MapperIdInfo = C->getMapperIdInfo(); + if (MapperIdInfo.getName()) { + MapperIdInfo = TT.getDerived().TransformDeclarationNameInfo(MapperIdInfo); + if (!MapperIdInfo.getName()) + return true; + } + // Build a list of all candidate OMPDeclareMapperDecls, which is provided by + // the previous user-defined mapper lookup in dependent environment. + for (auto *E : C->mapperlists()) { + // Transform all the decls. + if (E) { + auto *ULE = cast(E); + UnresolvedSet<8> Decls; + for (auto *D : ULE->decls()) { + NamedDecl *InstD = + cast(TT.getDerived().TransformDecl(E->getExprLoc(), D)); + Decls.addDecl(InstD, InstD->getAccess()); + } + UnresolvedMappers.push_back(UnresolvedLookupExpr::Create( + TT.getSema().Context, /*NamingClass=*/nullptr, + MapperIdScopeSpec.getWithLocInContext(TT.getSema().Context), + MapperIdInfo, /*ADL=*/true, ULE->isOverloaded(), Decls.begin(), + Decls.end())); + } else { + UnresolvedMappers.push_back(nullptr); + } + } + return false; +} + +template +OMPClause *TreeTransform::TransformOMPMapClause(OMPMapClause *C) { + OMPVarListLocTy Locs(C->getBeginLoc(), C->getLParenLoc(), C->getEndLoc()); + llvm::SmallVector Vars; + CXXScopeSpec MapperIdScopeSpec; + DeclarationNameInfo MapperIdInfo; + llvm::SmallVector UnresolvedMappers; + if (transformOMPMappableExprListClause( + *this, C, Vars, MapperIdScopeSpec, MapperIdInfo, UnresolvedMappers)) + return nullptr; return getDerived().RebuildOMPMapClause( - C->getMapTypeModifiers(), C->getMapTypeModifiersLoc(), C->getMapType(), - C->isImplicitMapType(), C->getMapLoc(), C->getColonLoc(), Vars, - C->getBeginLoc(), C->getLParenLoc(), C->getEndLoc()); + C->getMapTypeModifiers(), C->getMapTypeModifiersLoc(), MapperIdScopeSpec, + MapperIdInfo, C->getMapType(), C->isImplicitMapType(), C->getMapLoc(), + C->getColonLoc(), Vars, Locs, UnresolvedMappers); } template @@ -8892,30 +8966,30 @@ TreeTransform::TransformOMPDefaultmapClause(OMPDefaultmapClause *C) { template OMPClause *TreeTransform::TransformOMPToClause(OMPToClause *C) { + OMPVarListLocTy Locs(C->getBeginLoc(), C->getLParenLoc(), C->getEndLoc()); llvm::SmallVector Vars; - Vars.reserve(C->varlist_size()); - for (auto *VE : C->varlists()) { - ExprResult EVar = getDerived().TransformExpr(cast(VE)); - if (EVar.isInvalid()) - return 0; - Vars.push_back(EVar.get()); - } - return getDerived().RebuildOMPToClause(Vars, C->getBeginLoc(), - C->getLParenLoc(), C->getEndLoc()); + CXXScopeSpec MapperIdScopeSpec; + DeclarationNameInfo MapperIdInfo; + llvm::SmallVector UnresolvedMappers; + if (transformOMPMappableExprListClause( + *this, C, Vars, MapperIdScopeSpec, MapperIdInfo, UnresolvedMappers)) + return nullptr; + return getDerived().RebuildOMPToClause(Vars, MapperIdScopeSpec, MapperIdInfo, + Locs, UnresolvedMappers); } template OMPClause *TreeTransform::TransformOMPFromClause(OMPFromClause *C) { + OMPVarListLocTy Locs(C->getBeginLoc(), C->getLParenLoc(), C->getEndLoc()); llvm::SmallVector Vars; - Vars.reserve(C->varlist_size()); - for (auto *VE : C->varlists()) { - ExprResult EVar = getDerived().TransformExpr(cast(VE)); - if (EVar.isInvalid()) - return 0; - Vars.push_back(EVar.get()); - } - return getDerived().RebuildOMPFromClause(Vars, C->getBeginLoc(), - C->getLParenLoc(), C->getEndLoc()); + CXXScopeSpec MapperIdScopeSpec; + DeclarationNameInfo MapperIdInfo; + llvm::SmallVector UnresolvedMappers; + if (transformOMPMappableExprListClause( + *this, C, Vars, MapperIdScopeSpec, MapperIdInfo, UnresolvedMappers)) + return nullptr; + return getDerived().RebuildOMPFromClause( + Vars, MapperIdScopeSpec, MapperIdInfo, Locs, UnresolvedMappers); } template @@ -8929,8 +9003,8 @@ OMPClause *TreeTransform::TransformOMPUseDevicePtrClause( return nullptr; Vars.push_back(EVar.get()); } - return getDerived().RebuildOMPUseDevicePtrClause( - Vars, C->getBeginLoc(), C->getLParenLoc(), C->getEndLoc()); + OMPVarListLocTy Locs(C->getBeginLoc(), C->getLParenLoc(), C->getEndLoc()); + return getDerived().RebuildOMPUseDevicePtrClause(Vars, Locs); } template @@ -8944,8 +9018,8 @@ TreeTransform::TransformOMPIsDevicePtrClause(OMPIsDevicePtrClause *C) { return nullptr; Vars.push_back(EVar.get()); } - return getDerived().RebuildOMPIsDevicePtrClause( - Vars, C->getBeginLoc(), C->getLParenLoc(), C->getEndLoc()); + OMPVarListLocTy Locs(C->getBeginLoc(), C->getLParenLoc(), C->getEndLoc()); + return getDerived().RebuildOMPIsDevicePtrClause(Vars, Locs); } //===----------------------------------------------------------------------===// diff --git a/clang/lib/Serialization/ASTCommon.h b/clang/lib/Serialization/ASTCommon.h index 298b471490484..2678103ac9a68 100644 --- a/clang/lib/Serialization/ASTCommon.h +++ b/clang/lib/Serialization/ASTCommon.h @@ -108,6 +108,21 @@ template void numberAnonymousDeclsWithin(const DeclContext *DC, } } +/// Determine whether the given declaration will be included in the per-module +/// initializer if it needs to be eagerly handed to the AST consumer. If so, we +/// should not hand it to the consumer when deserializing it, nor include it in +/// the list of eagerly deserialized declarations. +inline bool isPartOfPerModuleInitializer(const Decl *D) { + if (isa(D)) + return true; + // Template instantiations are notionally in an "instantiation unit" rather + // than in any particular translation unit, so they need not be part of any + // particular (sub)module's per-module initializer. + if (auto *VD = dyn_cast(D)) + return !isTemplateInstantiation(VD->getTemplateSpecializationKind()); + return false; +} + } // namespace serialization } // namespace clang diff --git a/clang/lib/Serialization/ASTReader.cpp b/clang/lib/Serialization/ASTReader.cpp index aaf40b93f19dc..39df352cb77df 100644 --- a/clang/lib/Serialization/ASTReader.cpp +++ b/clang/lib/Serialization/ASTReader.cpp @@ -2610,6 +2610,9 @@ ASTReader::ReadControlBlock(ModuleFile &F, case MODULE_NAME: F.ModuleName = Blob; + Diag(diag::remark_module_import) + << F.ModuleName << F.FileName << (ImportedBy ? true : false) + << (ImportedBy ? StringRef(ImportedBy->ModuleName) : StringRef()); if (Listener) Listener->ReadModuleName(F.ModuleName); @@ -4141,6 +4144,9 @@ ASTReader::ReadASTCore(StringRef FileName, switch (AddResult) { case ModuleManager::AlreadyLoaded: + Diag(diag::remark_module_import) + << M->ModuleName << M->FileName << (ImportedBy ? true : false) + << (ImportedBy ? StringRef(ImportedBy->ModuleName) : StringRef()); return Success; case ModuleManager::NewlyLoaded: @@ -4257,7 +4263,7 @@ ASTReader::ReadASTCore(StringRef FileName, } } - return Success; + llvm_unreachable("unexpected break; expected return"); } ASTReader::ASTReadResult @@ -11784,12 +11790,12 @@ OMPClause *OMPClauseReader::readClause() { C = new (Context) OMPDeviceClause(); break; case OMPC_map: { - unsigned NumVars = Record.readInt(); - unsigned NumDeclarations = Record.readInt(); - unsigned NumLists = Record.readInt(); - unsigned NumComponents = Record.readInt(); - C = OMPMapClause::CreateEmpty(Context, NumVars, NumDeclarations, NumLists, - NumComponents); + OMPMappableExprListSizeTy Sizes; + Sizes.NumVars = Record.readInt(); + Sizes.NumUniqueDeclarations = Record.readInt(); + Sizes.NumComponentLists = Record.readInt(); + Sizes.NumComponents = Record.readInt(); + C = OMPMapClause::CreateEmpty(Context, Sizes); break; } case OMPC_num_teams: @@ -11817,39 +11823,39 @@ OMPClause *OMPClauseReader::readClause() { C = new (Context) OMPDefaultmapClause(); break; case OMPC_to: { - unsigned NumVars = Record.readInt(); - unsigned NumDeclarations = Record.readInt(); - unsigned NumLists = Record.readInt(); - unsigned NumComponents = Record.readInt(); - C = OMPToClause::CreateEmpty(Context, NumVars, NumDeclarations, NumLists, - NumComponents); + OMPMappableExprListSizeTy Sizes; + Sizes.NumVars = Record.readInt(); + Sizes.NumUniqueDeclarations = Record.readInt(); + Sizes.NumComponentLists = Record.readInt(); + Sizes.NumComponents = Record.readInt(); + C = OMPToClause::CreateEmpty(Context, Sizes); break; } case OMPC_from: { - unsigned NumVars = Record.readInt(); - unsigned NumDeclarations = Record.readInt(); - unsigned NumLists = Record.readInt(); - unsigned NumComponents = Record.readInt(); - C = OMPFromClause::CreateEmpty(Context, NumVars, NumDeclarations, NumLists, - NumComponents); + OMPMappableExprListSizeTy Sizes; + Sizes.NumVars = Record.readInt(); + Sizes.NumUniqueDeclarations = Record.readInt(); + Sizes.NumComponentLists = Record.readInt(); + Sizes.NumComponents = Record.readInt(); + C = OMPFromClause::CreateEmpty(Context, Sizes); break; } case OMPC_use_device_ptr: { - unsigned NumVars = Record.readInt(); - unsigned NumDeclarations = Record.readInt(); - unsigned NumLists = Record.readInt(); - unsigned NumComponents = Record.readInt(); - C = OMPUseDevicePtrClause::CreateEmpty(Context, NumVars, NumDeclarations, - NumLists, NumComponents); + OMPMappableExprListSizeTy Sizes; + Sizes.NumVars = Record.readInt(); + Sizes.NumUniqueDeclarations = Record.readInt(); + Sizes.NumComponentLists = Record.readInt(); + Sizes.NumComponents = Record.readInt(); + C = OMPUseDevicePtrClause::CreateEmpty(Context, Sizes); break; } case OMPC_is_device_ptr: { - unsigned NumVars = Record.readInt(); - unsigned NumDeclarations = Record.readInt(); - unsigned NumLists = Record.readInt(); - unsigned NumComponents = Record.readInt(); - C = OMPIsDevicePtrClause::CreateEmpty(Context, NumVars, NumDeclarations, - NumLists, NumComponents); + OMPMappableExprListSizeTy Sizes; + Sizes.NumVars = Record.readInt(); + Sizes.NumUniqueDeclarations = Record.readInt(); + Sizes.NumComponentLists = Record.readInt(); + Sizes.NumComponents = Record.readInt(); + C = OMPIsDevicePtrClause::CreateEmpty(Context, Sizes); break; } } @@ -12288,6 +12294,10 @@ void OMPClauseReader::VisitOMPMapClause(OMPMapClause *C) { I, static_cast(Record.readInt())); C->setMapTypeModifierLoc(I, Record.readSourceLocation()); } + C->setMapperQualifierLoc(Record.readNestedNameSpecifierLoc()); + DeclarationNameInfo DNI; + Record.readDeclarationNameInfo(DNI); + C->setMapperIdInfo(DNI); C->setMapType( static_cast(Record.readInt())); C->setMapLoc(Record.readSourceLocation()); @@ -12303,6 +12313,12 @@ void OMPClauseReader::VisitOMPMapClause(OMPMapClause *C) { Vars.push_back(Record.readExpr()); C->setVarRefs(Vars); + SmallVector UDMappers; + UDMappers.reserve(NumVars); + for (unsigned I = 0; I < NumVars; ++I) + UDMappers.push_back(Record.readExpr()); + C->setUDMapperRefs(UDMappers); + SmallVector Decls; Decls.reserve(UniqueDecls); for (unsigned i = 0; i < UniqueDecls; ++i) @@ -12386,6 +12402,10 @@ void OMPClauseReader::VisitOMPDefaultmapClause(OMPDefaultmapClause *C) { void OMPClauseReader::VisitOMPToClause(OMPToClause *C) { C->setLParenLoc(Record.readSourceLocation()); + C->setMapperQualifierLoc(Record.readNestedNameSpecifierLoc()); + DeclarationNameInfo DNI; + Record.readDeclarationNameInfo(DNI); + C->setMapperIdInfo(DNI); auto NumVars = C->varlist_size(); auto UniqueDecls = C->getUniqueDeclarationsNum(); auto TotalLists = C->getTotalComponentListNum(); @@ -12397,6 +12417,12 @@ void OMPClauseReader::VisitOMPToClause(OMPToClause *C) { Vars.push_back(Record.readSubExpr()); C->setVarRefs(Vars); + SmallVector UDMappers; + UDMappers.reserve(NumVars); + for (unsigned I = 0; I < NumVars; ++I) + UDMappers.push_back(Record.readSubExpr()); + C->setUDMapperRefs(UDMappers); + SmallVector Decls; Decls.reserve(UniqueDecls); for (unsigned i = 0; i < UniqueDecls; ++i) @@ -12428,6 +12454,10 @@ void OMPClauseReader::VisitOMPToClause(OMPToClause *C) { void OMPClauseReader::VisitOMPFromClause(OMPFromClause *C) { C->setLParenLoc(Record.readSourceLocation()); + C->setMapperQualifierLoc(Record.readNestedNameSpecifierLoc()); + DeclarationNameInfo DNI; + Record.readDeclarationNameInfo(DNI); + C->setMapperIdInfo(DNI); auto NumVars = C->varlist_size(); auto UniqueDecls = C->getUniqueDeclarationsNum(); auto TotalLists = C->getTotalComponentListNum(); @@ -12439,6 +12469,12 @@ void OMPClauseReader::VisitOMPFromClause(OMPFromClause *C) { Vars.push_back(Record.readSubExpr()); C->setVarRefs(Vars); + SmallVector UDMappers; + UDMappers.reserve(NumVars); + for (unsigned I = 0; I < NumVars; ++I) + UDMappers.push_back(Record.readSubExpr()); + C->setUDMapperRefs(UDMappers); + SmallVector Decls; Decls.reserve(UniqueDecls); for (unsigned i = 0; i < UniqueDecls; ++i) diff --git a/clang/lib/Serialization/ASTReaderDecl.cpp b/clang/lib/Serialization/ASTReaderDecl.cpp index 1c56cdbf9489b..fb56170d8ab67 100644 --- a/clang/lib/Serialization/ASTReaderDecl.cpp +++ b/clang/lib/Serialization/ASTReaderDecl.cpp @@ -1479,6 +1479,7 @@ void ASTDeclReader::VisitBlockDecl(BlockDecl *BD) { BD->setBlockMissingReturnType(Record.readInt()); BD->setIsConversionFromLambda(Record.readInt()); BD->setDoesNotEscape(Record.readInt()); + BD->setCanAvoidCopyToHeap(Record.readInt()); bool capturesCXXThis = Record.readInt(); unsigned numCaptures = Record.readInt(); @@ -2779,7 +2780,7 @@ static bool isConsumerInterestedIn(ASTContext &Ctx, Decl *D, bool HasBody) { // An ImportDecl or VarDecl imported from a module map module will get // emitted when we import the relevant module. - if (isa(D) || isa(D)) { + if (isPartOfPerModuleInitializer(D)) { auto *M = D->getImportedOwningModule(); if (M && M->Kind == Module::ModuleMapModule && Ctx.DeclMustBeEmitted(D)) diff --git a/clang/lib/Serialization/ASTWriter.cpp b/clang/lib/Serialization/ASTWriter.cpp index ff01155d82080..3d19c9d8231cd 100644 --- a/clang/lib/Serialization/ASTWriter.cpp +++ b/clang/lib/Serialization/ASTWriter.cpp @@ -6785,11 +6785,15 @@ void OMPClauseWriter::VisitOMPMapClause(OMPMapClause *C) { Record.push_back(C->getMapTypeModifier(I)); Record.AddSourceLocation(C->getMapTypeModifierLoc(I)); } + Record.AddNestedNameSpecifierLoc(C->getMapperQualifierLoc()); + Record.AddDeclarationNameInfo(C->getMapperIdInfo()); Record.push_back(C->getMapType()); Record.AddSourceLocation(C->getMapLoc()); Record.AddSourceLocation(C->getColonLoc()); for (auto *E : C->varlists()) Record.AddStmt(E); + for (auto *E : C->mapperlists()) + Record.AddStmt(E); for (auto *D : C->all_decls()) Record.AddDeclRef(D); for (auto N : C->all_num_lists()) @@ -6857,8 +6861,12 @@ void OMPClauseWriter::VisitOMPToClause(OMPToClause *C) { Record.push_back(C->getTotalComponentListNum()); Record.push_back(C->getTotalComponentsNum()); Record.AddSourceLocation(C->getLParenLoc()); + Record.AddNestedNameSpecifierLoc(C->getMapperQualifierLoc()); + Record.AddDeclarationNameInfo(C->getMapperIdInfo()); for (auto *E : C->varlists()) Record.AddStmt(E); + for (auto *E : C->mapperlists()) + Record.AddStmt(E); for (auto *D : C->all_decls()) Record.AddDeclRef(D); for (auto N : C->all_num_lists()) @@ -6877,8 +6885,12 @@ void OMPClauseWriter::VisitOMPFromClause(OMPFromClause *C) { Record.push_back(C->getTotalComponentListNum()); Record.push_back(C->getTotalComponentsNum()); Record.AddSourceLocation(C->getLParenLoc()); + Record.AddNestedNameSpecifierLoc(C->getMapperQualifierLoc()); + Record.AddDeclarationNameInfo(C->getMapperIdInfo()); for (auto *E : C->varlists()) Record.AddStmt(E); + for (auto *E : C->mapperlists()) + Record.AddStmt(E); for (auto *D : C->all_decls()) Record.AddDeclRef(D); for (auto N : C->all_num_lists()) diff --git a/clang/lib/Serialization/ASTWriterDecl.cpp b/clang/lib/Serialization/ASTWriterDecl.cpp index bd5191dcb911b..6de1320be4263 100644 --- a/clang/lib/Serialization/ASTWriterDecl.cpp +++ b/clang/lib/Serialization/ASTWriterDecl.cpp @@ -1110,6 +1110,7 @@ void ASTDeclWriter::VisitBlockDecl(BlockDecl *D) { Record.push_back(D->blockMissingReturnType()); Record.push_back(D->isConversionFromLambda()); Record.push_back(D->doesNotEscape()); + Record.push_back(D->canAvoidCopyToHeap()); Record.push_back(D->capturesCXXThis()); Record.push_back(D->getNumCaptures()); for (const auto &capture : D->captures()) { @@ -2272,7 +2273,7 @@ static bool isRequiredDecl(const Decl *D, ASTContext &Context, if (isa(D) || isa(D)) return true; - if (WritingModule && (isa(D) || isa(D))) { + if (WritingModule && isPartOfPerModuleInitializer(D)) { // These declarations are part of the module initializer, and are emitted // if and when the module is imported, rather than being emitted eagerly. return false; diff --git a/clang/lib/StaticAnalyzer/Checkers/AnalysisOrderChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/AnalysisOrderChecker.cpp index 8dc879bf1291d..05e0cd81ac8d2 100644 --- a/clang/lib/StaticAnalyzer/Checkers/AnalysisOrderChecker.cpp +++ b/clang/lib/StaticAnalyzer/Checkers/AnalysisOrderChecker.cpp @@ -44,8 +44,8 @@ class AnalysisOrderChecker check::LiveSymbols> { bool isCallbackEnabled(AnalyzerOptions &Opts, StringRef CallbackName) const { - return Opts.getCheckerBooleanOption("*", false, this) || - Opts.getCheckerBooleanOption(CallbackName, false, this); + return Opts.getCheckerBooleanOption(this, "*", false) || + Opts.getCheckerBooleanOption(this, CallbackName, false); } bool isCallbackEnabled(CheckerContext &C, StringRef CallbackName) const { diff --git a/clang/lib/StaticAnalyzer/Checkers/CMakeLists.txt b/clang/lib/StaticAnalyzer/Checkers/CMakeLists.txt index 10fb0bd3536cf..db2d0e76e4c17 100644 --- a/clang/lib/StaticAnalyzer/Checkers/CMakeLists.txt +++ b/clang/lib/StaticAnalyzer/Checkers/CMakeLists.txt @@ -51,6 +51,7 @@ add_clang_library(clangStaticAnalyzerCheckers MallocOverflowSecurityChecker.cpp MallocSizeofChecker.cpp MmapWriteExecChecker.cpp + MIGChecker.cpp MoveChecker.cpp MPI-Checker/MPIBugReporter.cpp MPI-Checker/MPIChecker.cpp @@ -71,6 +72,7 @@ add_clang_library(clangStaticAnalyzerCheckers ObjCSelfInitChecker.cpp ObjCSuperDeallocChecker.cpp ObjCUnusedIVarsChecker.cpp + OSObjectCStyleCast.cpp PaddingChecker.cpp PointerArithChecker.cpp PointerSubChecker.cpp diff --git a/clang/lib/StaticAnalyzer/Checkers/CStringSyntaxChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/CStringSyntaxChecker.cpp index b2ea3ceb5f6da..b828ac0592363 100644 --- a/clang/lib/StaticAnalyzer/Checkers/CStringSyntaxChecker.cpp +++ b/clang/lib/StaticAnalyzer/Checkers/CStringSyntaxChecker.cpp @@ -153,8 +153,6 @@ bool WalkAST::containsBadStrncatPattern(const CallExpr *CE) { bool WalkAST::containsBadStrlcpyStrlcatPattern(const CallExpr *CE) { if (CE->getNumArgs() != 3) return false; - const FunctionDecl *FD = CE->getDirectCallee(); - bool Append = CheckerContext::isCLibraryFunction(FD, "strlcat"); const Expr *DstArg = CE->getArg(0); const Expr *LenArg = CE->getArg(2); @@ -194,13 +192,8 @@ bool WalkAST::containsBadStrlcpyStrlcatPattern(const CallExpr *CE) { ASTContext &C = BR.getContext(); uint64_t BufferLen = C.getTypeSize(Buffer) / 8; auto RemainingBufferLen = BufferLen - DstOff; - if (Append) { - if (RemainingBufferLen <= ILRawVal) - return true; - } else { - if (RemainingBufferLen < ILRawVal) - return true; - } + if (RemainingBufferLen < ILRawVal) + return true; } } } diff --git a/clang/lib/StaticAnalyzer/Checkers/CheckObjCInstMethSignature.cpp b/clang/lib/StaticAnalyzer/Checkers/CheckObjCInstMethSignature.cpp index 7186b5945d3dc..a020d33bfd95f 100644 --- a/clang/lib/StaticAnalyzer/Checkers/CheckObjCInstMethSignature.cpp +++ b/clang/lib/StaticAnalyzer/Checkers/CheckObjCInstMethSignature.cpp @@ -1,4 +1,4 @@ -//=- CheckObjCInstMethodRetTy.cpp - Check ObjC method signatures -*- C++ -*-==// +//===-- CheckObjCInstMethSignature.cpp - Check ObjC method signatures -----===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/clang/lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp b/clang/lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp index e297f8cdf2711..05e25c41597bb 100644 --- a/clang/lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp +++ b/clang/lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp @@ -44,6 +44,7 @@ struct ChecksFilter { DefaultBool check_mktemp; DefaultBool check_mkstemp; DefaultBool check_strcpy; + DefaultBool check_DeprecatedOrUnsafeBufferHandling; DefaultBool check_rand; DefaultBool check_vfork; DefaultBool check_FloatLoopCounter; @@ -57,6 +58,7 @@ struct ChecksFilter { CheckName checkName_mktemp; CheckName checkName_mkstemp; CheckName checkName_strcpy; + CheckName checkName_DeprecatedOrUnsafeBufferHandling; CheckName checkName_rand; CheckName checkName_vfork; CheckName checkName_FloatLoopCounter; @@ -103,6 +105,8 @@ class WalkAST : public StmtVisitor { void checkCall_mkstemp(const CallExpr *CE, const FunctionDecl *FD); void checkCall_strcpy(const CallExpr *CE, const FunctionDecl *FD); void checkCall_strcat(const CallExpr *CE, const FunctionDecl *FD); + void checkDeprecatedOrUnsafeBufferHandling(const CallExpr *CE, + const FunctionDecl *FD); void checkCall_rand(const CallExpr *CE, const FunctionDecl *FD); void checkCall_random(const CallExpr *CE, const FunctionDecl *FD); void checkCall_vfork(const CallExpr *CE, const FunctionDecl *FD); @@ -148,6 +152,14 @@ void WalkAST::VisitCallExpr(CallExpr *CE) { .Case("mkstemps", &WalkAST::checkCall_mkstemp) .Cases("strcpy", "__strcpy_chk", &WalkAST::checkCall_strcpy) .Cases("strcat", "__strcat_chk", &WalkAST::checkCall_strcat) + .Cases("sprintf", "vsprintf", "scanf", "wscanf", "fscanf", "fwscanf", + "vscanf", "vwscanf", "vfscanf", "vfwscanf", + &WalkAST::checkDeprecatedOrUnsafeBufferHandling) + .Cases("sscanf", "swscanf", "vsscanf", "vswscanf", "swprintf", + "snprintf", "vswprintf", "vsnprintf", "memcpy", "memmove", + &WalkAST::checkDeprecatedOrUnsafeBufferHandling) + .Cases("strncpy", "strncat", "memset", + &WalkAST::checkDeprecatedOrUnsafeBufferHandling) .Case("drand48", &WalkAST::checkCall_rand) .Case("erand48", &WalkAST::checkCall_rand) .Case("jrand48", &WalkAST::checkCall_rand) @@ -552,7 +564,6 @@ void WalkAST::checkCall_mktemp(const CallExpr *CE, const FunctionDecl *FD) { CELoc, CE->getCallee()->getSourceRange()); } - //===----------------------------------------------------------------------===// // Check: Use of 'mkstemp', 'mktemp', 'mkdtemp' should contain at least 6 X's. //===----------------------------------------------------------------------===// @@ -641,6 +652,7 @@ void WalkAST::checkCall_mkstemp(const CallExpr *CE, const FunctionDecl *FD) { // CWE-119: Improper Restriction of Operations within // the Bounds of a Memory Buffer //===----------------------------------------------------------------------===// + void WalkAST::checkCall_strcpy(const CallExpr *CE, const FunctionDecl *FD) { if (!filter.check_strcpy) return; @@ -679,6 +691,7 @@ void WalkAST::checkCall_strcpy(const CallExpr *CE, const FunctionDecl *FD) { // CWE-119: Improper Restriction of Operations within // the Bounds of a Memory Buffer //===----------------------------------------------------------------------===// + void WalkAST::checkCall_strcat(const CallExpr *CE, const FunctionDecl *FD) { if (!filter.check_strcpy) return; @@ -700,9 +713,89 @@ void WalkAST::checkCall_strcat(const CallExpr *CE, const FunctionDecl *FD) { CELoc, CE->getCallee()->getSourceRange()); } +//===----------------------------------------------------------------------===// +// Check: Any use of 'sprintf', 'vsprintf', 'scanf', 'wscanf', 'fscanf', +// 'fwscanf', 'vscanf', 'vwscanf', 'vfscanf', 'vfwscanf', 'sscanf', +// 'swscanf', 'vsscanf', 'vswscanf', 'swprintf', 'snprintf', 'vswprintf', +// 'vsnprintf', 'memcpy', 'memmove', 'strncpy', 'strncat', 'memset' +// is deprecated since C11. +// +// Use of 'sprintf', 'vsprintf', 'scanf', 'wscanf','fscanf', +// 'fwscanf', 'vscanf', 'vwscanf', 'vfscanf', 'vfwscanf', 'sscanf', +// 'swscanf', 'vsscanf', 'vswscanf' without buffer limitations +// is insecure. +// +// CWE-119: Improper Restriction of Operations within +// the Bounds of a Memory Buffer +//===----------------------------------------------------------------------===// + +void WalkAST::checkDeprecatedOrUnsafeBufferHandling(const CallExpr *CE, + const FunctionDecl *FD) { + if (!filter.check_DeprecatedOrUnsafeBufferHandling) + return; + + if (!BR.getContext().getLangOpts().C11) + return; + + // Issue a warning. ArgIndex == -1: Deprecated but not unsafe (has size + // restrictions). + enum { DEPR_ONLY = -1, UNKNOWN_CALL = -2 }; + StringRef Name = FD->getIdentifier()->getName(); + int ArgIndex = + llvm::StringSwitch(Name) + .Cases("scanf", "wscanf", "vscanf", "vwscanf", 0) + .Cases("sprintf", "vsprintf", "fscanf", "fwscanf", "vfscanf", + "vfwscanf", "sscanf", "swscanf", "vsscanf", "vswscanf", 1) + .Cases("swprintf", "snprintf", "vswprintf", "vsnprintf", "memcpy", + "memmove", "memset", "strncpy", "strncat", DEPR_ONLY) + .Default(UNKNOWN_CALL); + + assert(ArgIndex != UNKNOWN_CALL && "Unsupported function"); + bool BoundsProvided = ArgIndex == DEPR_ONLY; + + if (!BoundsProvided) { + // Currently we only handle (not wide) string literals. It is possible to do + // better, either by looking at references to const variables, or by doing + // real flow analysis. + auto FormatString = + dyn_cast(CE->getArg(ArgIndex)->IgnoreParenImpCasts()); + if (FormatString && + FormatString->getString().find("%s") == StringRef::npos && + FormatString->getString().find("%[") == StringRef::npos) + BoundsProvided = true; + } + + SmallString<128> Buf1; + SmallString<512> Buf2; + llvm::raw_svector_ostream Out1(Buf1); + llvm::raw_svector_ostream Out2(Buf2); + + Out1 << "Potential insecure memory buffer bounds restriction in call '" + << Name << "'"; + Out2 << "Call to function '" << Name + << "' is insecure as it does not provide "; + + if (!BoundsProvided) { + Out2 << "bounding of the memory buffer or "; + } + + Out2 << "security checks introduced " + "in the C11 standard. Replace with analogous functions that " + "support length arguments or provides boundary checks such as '" + << Name << "_s' in case of C11"; + + PathDiagnosticLocation CELoc = + PathDiagnosticLocation::createBegin(CE, BR.getSourceManager(), AC); + BR.EmitBasicReport(AC->getDecl(), + filter.checkName_DeprecatedOrUnsafeBufferHandling, + Out1.str(), "Security", Out2.str(), CELoc, + CE->getCallee()->getSourceRange()); +} + //===----------------------------------------------------------------------===// // Common check for str* functions with no bounds parameters. //===----------------------------------------------------------------------===// + bool WalkAST::checkCall_strCommon(const CallExpr *CE, const FunctionDecl *FD) { const FunctionProtoType *FPT = FD->getType()->getAs(); if (!FPT) @@ -936,5 +1029,4 @@ REGISTER_CHECKER(rand) REGISTER_CHECKER(vfork) REGISTER_CHECKER(FloatLoopCounter) REGISTER_CHECKER(UncheckedReturn) - - +REGISTER_CHECKER(DeprecatedOrUnsafeBufferHandling) diff --git a/clang/lib/StaticAnalyzer/Checkers/ChrootChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/ChrootChecker.cpp index 0daf147dbbdb6..cbc5b32931b6d 100644 --- a/clang/lib/StaticAnalyzer/Checkers/ChrootChecker.cpp +++ b/clang/lib/StaticAnalyzer/Checkers/ChrootChecker.cpp @@ -1,4 +1,4 @@ -//===- Chrootchecker.cpp -------- Basic security checks ---------*- C++ -*-===// +//===-- ChrootChecker.cpp - chroot usage checks ---------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/clang/lib/StaticAnalyzer/Checkers/CloneChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/CloneChecker.cpp index 42b26147245de..84018c5c39bd9 100644 --- a/clang/lib/StaticAnalyzer/Checkers/CloneChecker.cpp +++ b/clang/lib/StaticAnalyzer/Checkers/CloneChecker.cpp @@ -63,17 +63,17 @@ void CloneChecker::checkEndOfTranslationUnit(const TranslationUnitDecl *TU, // the CloneDetector. The only thing left to do is to report the found clones. int MinComplexity = Mgr.getAnalyzerOptions().getCheckerIntegerOption( - "MinimumCloneComplexity", 50, this); + this, "MinimumCloneComplexity", 50); assert(MinComplexity >= 0); bool ReportSuspiciousClones = Mgr.getAnalyzerOptions() - .getCheckerBooleanOption("ReportSuspiciousClones", true, this); + .getCheckerBooleanOption(this, "ReportSuspiciousClones", true); bool ReportNormalClones = Mgr.getAnalyzerOptions().getCheckerBooleanOption( - "ReportNormalClones", true, this); + this, "ReportNormalClones", true); StringRef IgnoredFilesPattern = Mgr.getAnalyzerOptions() - .getCheckerStringOption("IgnoredFilesPattern", "", this); + .getCheckerStringOption(this, "IgnoredFilesPattern", ""); // Let the CloneDetector create a list of clones from all the analyzed // statements. We don't filter for matching variable patterns at this point diff --git a/clang/lib/StaticAnalyzer/Checkers/DereferenceChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/DereferenceChecker.cpp index 65c52817150fa..2c264833f2a9f 100644 --- a/clang/lib/StaticAnalyzer/Checkers/DereferenceChecker.cpp +++ b/clang/lib/StaticAnalyzer/Checkers/DereferenceChecker.cpp @@ -1,4 +1,4 @@ -//== NullDerefChecker.cpp - Null dereference checker ------------*- C++ -*--==// +//===-- DereferenceChecker.cpp - Null dereference checker -----------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/clang/lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp index c50fe49cbd3c4..eeddfddc4d407 100644 --- a/clang/lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp +++ b/clang/lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp @@ -458,7 +458,7 @@ GenericTaintChecker::TaintPropagationRule::process(const CallExpr *CE, ProgramStateRef State = C.getState(); // Check for taint in arguments. - bool IsTainted = false; + bool IsTainted = true; for (unsigned ArgNum : SrcArgs) { if (ArgNum >= CE->getNumArgs()) return State; diff --git a/clang/lib/StaticAnalyzer/Checkers/LocalizationChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/LocalizationChecker.cpp index 76103f81a68be..cb7ba73a09180 100644 --- a/clang/lib/StaticAnalyzer/Checkers/LocalizationChecker.cpp +++ b/clang/lib/StaticAnalyzer/Checkers/LocalizationChecker.cpp @@ -1397,8 +1397,8 @@ void ento::registerNonLocalizedStringChecker(CheckerManager &mgr) { NonLocalizedStringChecker *checker = mgr.registerChecker(); checker->IsAggressive = - mgr.getAnalyzerOptions().getCheckerBooleanOption("AggressiveReport", - false, checker); + mgr.getAnalyzerOptions().getCheckerBooleanOption( + checker, "AggressiveReport", false); } bool ento::shouldRegisterNonLocalizedStringChecker(const LangOptions &LO) { @@ -1409,7 +1409,8 @@ void ento::registerEmptyLocalizationContextChecker(CheckerManager &mgr) { mgr.registerChecker(); } -bool ento::shouldRegisterEmptyLocalizationContextChecker(const LangOptions &LO) { +bool ento::shouldRegisterEmptyLocalizationContextChecker( + const LangOptions &LO) { return true; } diff --git a/clang/lib/StaticAnalyzer/Checkers/MIGChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/MIGChecker.cpp new file mode 100644 index 0000000000000..685fd88b16592 --- /dev/null +++ b/clang/lib/StaticAnalyzer/Checkers/MIGChecker.cpp @@ -0,0 +1,273 @@ +//== MIGChecker.cpp - MIG calling convention checker ------------*- C++ -*--==// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// +// This file defines MIGChecker, a Mach Interface Generator calling convention +// checker. Namely, in MIG callback implementation the following rules apply: +// - When a server routine returns an error code that represents success, it +// must take ownership of resources passed to it (and eventually release +// them). +// - Additionally, when returning success, all out-parameters must be +// initialized. +// - When it returns any other error code, it must not take ownership, +// because the message and its out-of-line parameters will be destroyed +// by the client that called the function. +// For now we only check the last rule, as its violations lead to dangerous +// use-after-free exploits. +// +//===----------------------------------------------------------------------===// + +#include "clang/Analysis/AnyCall.h" +#include "clang/StaticAnalyzer/Checkers/BuiltinCheckerRegistration.h" +#include "clang/StaticAnalyzer/Core/BugReporter/BugType.h" +#include "clang/StaticAnalyzer/Core/Checker.h" +#include "clang/StaticAnalyzer/Core/CheckerManager.h" +#include "clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h" +#include "clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h" + +using namespace clang; +using namespace ento; + +namespace { +class MIGChecker : public Checker, + check::EndFunction> { + BugType BT{this, "Use-after-free (MIG calling convention violation)", + categories::MemoryError}; + + // The checker knows that an out-of-line object is deallocated if it is + // passed as an argument to one of these functions. If this object is + // additionally an argument of a MIG routine, the checker keeps track of that + // information and issues a warning when an error is returned from the + // respective routine. + std::vector> Deallocators = { +#define CALL(required_args, deallocated_arg, ...) \ + {{{__VA_ARGS__}, required_args}, deallocated_arg} + // E.g., if the checker sees a C function 'vm_deallocate' that is + // defined on class 'IOUserClient' that has exactly 3 parameters, it knows + // that argument #1 (starting from 0, i.e. the second argument) is going + // to be consumed in the sense of the MIG consume-on-success convention. + CALL(3, 1, "vm_deallocate"), + CALL(3, 1, "mach_vm_deallocate"), + CALL(2, 0, "mig_deallocate"), + CALL(2, 1, "mach_port_deallocate"), + // E.g., if the checker sees a method 'releaseAsyncReference64()' that is + // defined on class 'IOUserClient' that takes exactly 1 argument, it knows + // that the argument is going to be consumed in the sense of the MIG + // consume-on-success convention. + CALL(1, 0, "IOUserClient", "releaseAsyncReference64"), +#undef CALL + }; + + void checkReturnAux(const ReturnStmt *RS, CheckerContext &C) const; + +public: + void checkPostCall(const CallEvent &Call, CheckerContext &C) const; + + // HACK: We're making two attempts to find the bug: checkEndFunction + // should normally be enough but it fails when the return value is a literal + // that never gets put into the Environment and ends of function with multiple + // returns get agglutinated across returns, preventing us from obtaining + // the return value. The problem is similar to https://reviews.llvm.org/D25326 + // but now we step into it in the top-level function. + void checkPreStmt(const ReturnStmt *RS, CheckerContext &C) const { + checkReturnAux(RS, C); + } + void checkEndFunction(const ReturnStmt *RS, CheckerContext &C) const { + checkReturnAux(RS, C); + } + + class Visitor : public BugReporterVisitor { + public: + void Profile(llvm::FoldingSetNodeID &ID) const { + static int X = 0; + ID.AddPointer(&X); + } + + std::shared_ptr VisitNode(const ExplodedNode *N, + BugReporterContext &BRC, BugReport &R); + }; +}; +} // end anonymous namespace + +// FIXME: It's a 'const ParmVarDecl *' but there's no ready-made GDM traits +// specialization for this sort of types. +REGISTER_TRAIT_WITH_PROGRAMSTATE(ReleasedParameter, const void *) + +std::shared_ptr +MIGChecker::Visitor::VisitNode(const ExplodedNode *N, BugReporterContext &BRC, + BugReport &R) { + const auto *NewPVD = static_cast( + N->getState()->get()); + const auto *OldPVD = static_cast( + N->getFirstPred()->getState()->get()); + if (OldPVD == NewPVD) + return nullptr; + + assert(NewPVD && "What is deallocated cannot be un-deallocated!"); + SmallString<64> Str; + llvm::raw_svector_ostream OS(Str); + OS << "Value passed through parameter '" << NewPVD->getName() + << "' is deallocated"; + + PathDiagnosticLocation Loc = + PathDiagnosticLocation::create(N->getLocation(), BRC.getSourceManager()); + return std::make_shared(Loc, OS.str()); +} + +static const ParmVarDecl *getOriginParam(SVal V, CheckerContext &C) { + SymbolRef Sym = V.getAsSymbol(); + if (!Sym) + return nullptr; + + // If we optimistically assume that the MIG routine never re-uses the storage + // that was passed to it as arguments when it invalidates it (but at most when + // it assigns to parameter variables directly), this procedure correctly + // determines if the value was loaded from the transitive closure of MIG + // routine arguments in the heap. + while (const MemRegion *MR = Sym->getOriginRegion()) { + const auto *VR = dyn_cast(MR); + if (VR && VR->hasStackParametersStorage() && + VR->getStackFrame()->inTopFrame()) + return cast(VR->getDecl()); + + const SymbolicRegion *SR = MR->getSymbolicBase(); + if (!SR) + return nullptr; + + Sym = SR->getSymbol(); + } + + return nullptr; +} + +static bool isInMIGCall(CheckerContext &C) { + const LocationContext *LC = C.getLocationContext(); + const StackFrameContext *SFC; + // Find the top frame. + while (LC) { + SFC = LC->getStackFrame(); + LC = SFC->getParent(); + } + + const Decl *D = SFC->getDecl(); + + if (Optional AC = AnyCall::forDecl(D)) { + // Even though there's a Sema warning when the return type of an annotated + // function is not a kern_return_t, this warning isn't an error, so we need + // an extra sanity check here. + // FIXME: AnyCall doesn't support blocks yet, so they remain unchecked + // for now. + if (!AC->getReturnType(C.getASTContext()) + .getCanonicalType()->isSignedIntegerType()) + return false; + } + + if (D->hasAttr()) + return true; + + // See if there's an annotated method in the superclass. + if (const auto *MD = dyn_cast(D)) + for (const auto *OMD: MD->overridden_methods()) + if (OMD->hasAttr()) + return true; + + return false; +} + +void MIGChecker::checkPostCall(const CallEvent &Call, CheckerContext &C) const { + if (!isInMIGCall(C)) + return; + + auto I = std::find_if(Deallocators.begin(), Deallocators.end(), + [&](const std::pair &Item) { + return Call.isCalled(Item.first); + }); + if (I == Deallocators.end()) + return; + + unsigned ArgIdx = I->second; + SVal Arg = Call.getArgSVal(ArgIdx); + const ParmVarDecl *PVD = getOriginParam(Arg, C); + if (!PVD) + return; + + C.addTransition(C.getState()->set(PVD)); +} + +// Returns true if V can potentially represent a "successful" kern_return_t. +static bool mayBeSuccess(SVal V, CheckerContext &C) { + ProgramStateRef State = C.getState(); + + // Can V represent KERN_SUCCESS? + if (!State->isNull(V).isConstrainedFalse()) + return true; + + SValBuilder &SVB = C.getSValBuilder(); + ASTContext &ACtx = C.getASTContext(); + + // Can V represent MIG_NO_REPLY? + static const int MigNoReply = -305; + V = SVB.evalEQ(C.getState(), V, SVB.makeIntVal(MigNoReply, ACtx.IntTy)); + if (!State->isNull(V).isConstrainedTrue()) + return true; + + // If none of the above, it's definitely an error. + return false; +} + +void MIGChecker::checkReturnAux(const ReturnStmt *RS, CheckerContext &C) const { + // It is very unlikely that a MIG callback will be called from anywhere + // within the project under analysis and the caller isn't itself a routine + // that follows the MIG calling convention. Therefore we're safe to believe + // that it's always the top frame that is of interest. There's a slight chance + // that the user would want to enforce the MIG calling convention upon + // a random routine in the middle of nowhere, but given that the convention is + // fairly weird and hard to follow in the first place, there's relatively + // little motivation to spread it this way. + if (!C.inTopFrame()) + return; + + if (!isInMIGCall(C)) + return; + + // We know that the function is non-void, but what if the return statement + // is not there in the code? It's not a compile error, we should not crash. + if (!RS) + return; + + ProgramStateRef State = C.getState(); + if (!State->get()) + return; + + SVal V = C.getSVal(RS); + if (mayBeSuccess(V, C)) + return; + + ExplodedNode *N = C.generateErrorNode(); + if (!N) + return; + + auto R = llvm::make_unique( + BT, + "MIG callback fails with error after deallocating argument value. " + "This is a use-after-free vulnerability because the caller will try to " + "deallocate it again", + N); + + R->addRange(RS->getSourceRange()); + bugreporter::trackExpressionValue(N, RS->getRetValue(), *R, false); + R->addVisitor(llvm::make_unique()); + C.emitReport(std::move(R)); +} + +void ento::registerMIGChecker(CheckerManager &Mgr) { + Mgr.registerChecker(); +} + +bool ento::shouldRegisterMIGChecker(const LangOptions &LO) { + return true; +} diff --git a/clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp index 7ab67213d58d9..f7ad8fac17656 100644 --- a/clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp +++ b/clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp @@ -3098,7 +3098,7 @@ void ento::registerInnerPointerCheckerAux(CheckerManager &mgr) { void ento::registerDynamicMemoryModeling(CheckerManager &mgr) { auto *checker = mgr.registerChecker(); checker->IsOptimistic = mgr.getAnalyzerOptions().getCheckerBooleanOption( - "Optimistic", false, checker); + checker, "Optimistic", false); } bool ento::shouldRegisterDynamicMemoryModeling(const LangOptions &LO) { diff --git a/clang/lib/StaticAnalyzer/Checkers/MmapWriteExecChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/MmapWriteExecChecker.cpp index 2575302ae229f..2185561fcda3f 100644 --- a/clang/lib/StaticAnalyzer/Checkers/MmapWriteExecChecker.cpp +++ b/clang/lib/StaticAnalyzer/Checkers/MmapWriteExecChecker.cpp @@ -82,10 +82,10 @@ void ento::registerMmapWriteExecChecker(CheckerManager &mgr) { mgr.registerChecker(); Mwec->ProtExecOv = mgr.getAnalyzerOptions() - .getCheckerIntegerOption("MmapProtExec", 0x04, Mwec); + .getCheckerIntegerOption(Mwec, "MmapProtExec", 0x04); Mwec->ProtReadOv = mgr.getAnalyzerOptions() - .getCheckerIntegerOption("MmapProtRead", 0x01, Mwec); + .getCheckerIntegerOption(Mwec, "MmapProtRead", 0x01); } bool ento::shouldRegisterMmapWriteExecChecker(const LangOptions &LO) { diff --git a/clang/lib/StaticAnalyzer/Checkers/MoveChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/MoveChecker.cpp index ef6a3df2d2854..eab3fa3af9585 100644 --- a/clang/lib/StaticAnalyzer/Checkers/MoveChecker.cpp +++ b/clang/lib/StaticAnalyzer/Checkers/MoveChecker.cpp @@ -735,7 +735,7 @@ void MoveChecker::printState(raw_ostream &Out, ProgramStateRef State, void ento::registerMoveChecker(CheckerManager &mgr) { MoveChecker *chk = mgr.registerChecker(); chk->setAggressiveness( - mgr.getAnalyzerOptions().getCheckerStringOption("WarnOn", "", chk)); + mgr.getAnalyzerOptions().getCheckerStringOption(chk, "WarnOn", "")); } bool ento::shouldRegisterMoveChecker(const LangOptions &LO) { diff --git a/clang/lib/StaticAnalyzer/Checkers/NullabilityChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/NullabilityChecker.cpp index c2afb9fab776f..e5beb0dad2fce 100644 --- a/clang/lib/StaticAnalyzer/Checkers/NullabilityChecker.cpp +++ b/clang/lib/StaticAnalyzer/Checkers/NullabilityChecker.cpp @@ -1,4 +1,4 @@ -//== Nullabilityhecker.cpp - Nullability checker ----------------*- C++ -*--==// +//===-- NullabilityChecker.cpp - Nullability checker ----------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -1208,7 +1208,7 @@ bool ento::shouldRegisterNullabilityBase(const LangOptions &LO) { checker->NoDiagnoseCallsToSystemHeaders = \ checker->NoDiagnoseCallsToSystemHeaders || \ mgr.getAnalyzerOptions().getCheckerBooleanOption( \ - "NoDiagnoseCallsToSystemHeaders", false, checker, true); \ + checker, "NoDiagnoseCallsToSystemHeaders", false, true); \ } \ \ bool ento::shouldRegister##name##Checker(const LangOptions &LO) { \ diff --git a/clang/lib/StaticAnalyzer/Checkers/NumberObjectConversionChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/NumberObjectConversionChecker.cpp index 22b5485c659fe..33119c6a18ca6 100644 --- a/clang/lib/StaticAnalyzer/Checkers/NumberObjectConversionChecker.cpp +++ b/clang/lib/StaticAnalyzer/Checkers/NumberObjectConversionChecker.cpp @@ -346,7 +346,7 @@ void ento::registerNumberObjectConversionChecker(CheckerManager &Mgr) { NumberObjectConversionChecker *Chk = Mgr.registerChecker(); Chk->Pedantic = - Mgr.getAnalyzerOptions().getCheckerBooleanOption("Pedantic", false, Chk); + Mgr.getAnalyzerOptions().getCheckerBooleanOption(Chk, "Pedantic", false); } bool ento::shouldRegisterNumberObjectConversionChecker(const LangOptions &LO) { diff --git a/clang/lib/StaticAnalyzer/Checkers/OSObjectCStyleCast.cpp b/clang/lib/StaticAnalyzer/Checkers/OSObjectCStyleCast.cpp new file mode 100644 index 0000000000000..27dadd09d7038 --- /dev/null +++ b/clang/lib/StaticAnalyzer/Checkers/OSObjectCStyleCast.cpp @@ -0,0 +1,90 @@ +//===- OSObjectCStyleCast.cpp ------------------------------------*- C++ -*-==// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// +// This file defines OSObjectCStyleCast checker, which checks for C-style casts +// of OSObjects. Such casts almost always indicate a code smell, +// as an explicit static or dynamic cast should be used instead. +//===----------------------------------------------------------------------===// + +#include "clang/StaticAnalyzer/Checkers/BuiltinCheckerRegistration.h" +#include "clang/ASTMatchers/ASTMatchFinder.h" +#include "clang/StaticAnalyzer/Core/BugReporter/BugReporter.h" +#include "clang/StaticAnalyzer/Core/BugReporter/BugType.h" +#include "clang/StaticAnalyzer/Core/Checker.h" +#include "clang/StaticAnalyzer/Core/PathSensitive/AnalysisManager.h" +#include "llvm/Support/Debug.h" + +using namespace clang; +using namespace ento; +using namespace ast_matchers; + +namespace { + +const char *WarnAtNode = "OSObjCast"; + +class OSObjectCStyleCastChecker : public Checker { +public: + void checkASTCodeBody(const Decl *D, + AnalysisManager &AM, + BugReporter &BR) const; +}; + +static void emitDiagnostics(const BoundNodes &Nodes, + BugReporter &BR, + AnalysisDeclContext *ADC, + const OSObjectCStyleCastChecker *Checker) { + const auto *CE = Nodes.getNodeAs(WarnAtNode); + assert(CE); + + std::string Diagnostics; + llvm::raw_string_ostream OS(Diagnostics); + OS << "C-style cast of OSObject. Use OSDynamicCast instead."; + + BR.EmitBasicReport( + ADC->getDecl(), + Checker, + /*Name=*/"OSObject C-Style Cast", + /*Category=*/"Security", + OS.str(), + PathDiagnosticLocation::createBegin(CE, BR.getSourceManager(), ADC), + CE->getSourceRange()); +} + +static auto hasTypePointingTo(DeclarationMatcher DeclM) + -> decltype(hasType(pointerType())) { + return hasType(pointerType(pointee(hasDeclaration(DeclM)))); +} + +void OSObjectCStyleCastChecker::checkASTCodeBody(const Decl *D, AnalysisManager &AM, + BugReporter &BR) const { + + AnalysisDeclContext *ADC = AM.getAnalysisDeclContext(D); + + auto DynamicCastM = callExpr(callee(functionDecl(hasName("safeMetaCast")))); + + auto OSObjTypeM = hasTypePointingTo(cxxRecordDecl(isDerivedFrom("OSMetaClassBase"))); + auto OSObjSubclassM = hasTypePointingTo( + cxxRecordDecl(isDerivedFrom("OSObject"))); + + auto CastM = cStyleCastExpr( + allOf(hasSourceExpression(allOf(OSObjTypeM, unless(DynamicCastM))), + OSObjSubclassM)).bind(WarnAtNode); + + auto Matches = match(stmt(forEachDescendant(CastM)), *D->getBody(), AM.getASTContext()); + for (BoundNodes Match : Matches) + emitDiagnostics(Match, BR, ADC, this); +} +} + +void ento::registerOSObjectCStyleCast(CheckerManager &Mgr) { + Mgr.registerChecker(); +} + +bool ento::shouldRegisterOSObjectCStyleCast(const LangOptions &LO) { + return true; +} diff --git a/clang/lib/StaticAnalyzer/Checkers/PaddingChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/PaddingChecker.cpp index d4d4459b37b56..df5b46ebd2e53 100644 --- a/clang/lib/StaticAnalyzer/Checkers/PaddingChecker.cpp +++ b/clang/lib/StaticAnalyzer/Checkers/PaddingChecker.cpp @@ -32,17 +32,14 @@ namespace { class PaddingChecker : public Checker> { private: mutable std::unique_ptr PaddingBug; - mutable int64_t AllowedPad; mutable BugReporter *BR; public: + int64_t AllowedPad; + void checkASTDecl(const TranslationUnitDecl *TUD, AnalysisManager &MGR, BugReporter &BRArg) const { BR = &BRArg; - AllowedPad = - MGR.getAnalyzerOptions() - .getCheckerIntegerOption("AllowedPad", 24, this); - assert(AllowedPad >= 0 && "AllowedPad option should be non-negative"); // The calls to checkAST* from AnalysisConsumer don't // visit template instantiations or lambda classes. We @@ -348,7 +345,11 @@ class PaddingChecker : public Checker> { } // namespace void ento::registerPaddingChecker(CheckerManager &Mgr) { - Mgr.registerChecker(); + auto *Checker = Mgr.registerChecker(); + Checker->AllowedPad = Mgr.getAnalyzerOptions() + .getCheckerIntegerOption(Checker, "AllowedPad", 24); + assert(Checker->AllowedPad >= 0 && + "AllowedPad option should be non-negative"); } bool ento::shouldRegisterPaddingChecker(const LangOptions &LO) { diff --git a/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountDiagnostics.cpp b/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountDiagnostics.cpp index 0366910870fee..927e9ae443609 100644 --- a/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountDiagnostics.cpp +++ b/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountDiagnostics.cpp @@ -182,7 +182,7 @@ static Optional findArgIdxOfSymbol(ProgramStateRef CurrSt, return None; } -Optional findMetaClassAlloc(const Expr *Callee) { +static Optional findMetaClassAlloc(const Expr *Callee) { if (const auto *ME = dyn_cast(Callee)) { if (ME->getMemberDecl()->getNameAsString() != "alloc") return None; @@ -200,8 +200,7 @@ Optional findMetaClassAlloc(const Expr *Callee) { return None; } -std::string findAllocatedObjectName(const Stmt *S, - QualType QT) { +static std::string findAllocatedObjectName(const Stmt *S, QualType QT) { if (const auto *CE = dyn_cast(S)) if (auto Out = findMetaClassAlloc(CE->getCallee())) return *Out; diff --git a/clang/lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedObjectChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedObjectChecker.cpp index 4e420a7c77363..53da456fd5375 100644 --- a/clang/lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedObjectChecker.cpp +++ b/clang/lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedObjectChecker.cpp @@ -611,18 +611,17 @@ void ento::registerUninitializedObjectChecker(CheckerManager &Mgr) { UninitObjCheckerOptions &ChOpts = Chk->Opts; ChOpts.IsPedantic = - AnOpts.getCheckerBooleanOption("Pedantic", /*DefaultVal*/ false, Chk); - ChOpts.ShouldConvertNotesToWarnings = - AnOpts.getCheckerBooleanOption("NotesAsWarnings", - /*DefaultVal*/ false, Chk); + AnOpts.getCheckerBooleanOption(Chk, "Pedantic", /*DefaultVal*/ false); + ChOpts.ShouldConvertNotesToWarnings = AnOpts.getCheckerBooleanOption( + Chk, "NotesAsWarnings", /*DefaultVal*/ false); ChOpts.CheckPointeeInitialization = AnOpts.getCheckerBooleanOption( - "CheckPointeeInitialization", /*DefaultVal*/ false, Chk); + Chk, "CheckPointeeInitialization", /*DefaultVal*/ false); ChOpts.IgnoredRecordsWithFieldPattern = - AnOpts.getCheckerStringOption("IgnoreRecordsWithField", - /*DefaultVal*/ "", Chk); + AnOpts.getCheckerStringOption(Chk, "IgnoreRecordsWithField", + /*DefaultVal*/ ""); ChOpts.IgnoreGuardedFields = - AnOpts.getCheckerBooleanOption("IgnoreGuardedFields", - /*DefaultVal*/ false, Chk); + AnOpts.getCheckerBooleanOption(Chk, "IgnoreGuardedFields", + /*DefaultVal*/ false); } bool ento::shouldRegisterUninitializedObjectChecker(const LangOptions &LO) { diff --git a/clang/lib/StaticAnalyzer/Checkers/VirtualCallChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/VirtualCallChecker.cpp index d70c3d26be116..c3a9ef8b56a77 100644 --- a/clang/lib/StaticAnalyzer/Checkers/VirtualCallChecker.cpp +++ b/clang/lib/StaticAnalyzer/Checkers/VirtualCallChecker.cpp @@ -279,8 +279,8 @@ void ento::registerVirtualCallChecker(CheckerManager &mgr) { VirtualCallChecker *checker = mgr.registerChecker(); checker->IsPureOnly = - mgr.getAnalyzerOptions().getCheckerBooleanOption("PureOnly", false, - checker); + mgr.getAnalyzerOptions().getCheckerBooleanOption( + checker, "PureOnly", false); } bool ento::shouldRegisterVirtualCallChecker(const LangOptions &LO) { diff --git a/clang/lib/StaticAnalyzer/Core/AnalyzerOptions.cpp b/clang/lib/StaticAnalyzer/Core/AnalyzerOptions.cpp index 7ee2b9dd215df..ee670fb45a776 100644 --- a/clang/lib/StaticAnalyzer/Core/AnalyzerOptions.cpp +++ b/clang/lib/StaticAnalyzer/Core/AnalyzerOptions.cpp @@ -101,18 +101,14 @@ AnalyzerOptions::mayInlineCXXMemberFunction( return *K >= Param; } -StringRef AnalyzerOptions::getCheckerStringOption(StringRef OptionName, +StringRef AnalyzerOptions::getCheckerStringOption(StringRef CheckerName, + StringRef OptionName, StringRef DefaultVal, - const CheckerBase *C, - bool SearchInParents) const { - assert(C); - // Search for a package option if the option for the checker is not specified - // and search in parents is enabled. - StringRef CheckerName = C->getTagDescription(); - + bool SearchInParents ) const { assert(!CheckerName.empty() && "Empty checker name! Make sure the checker object (including it's " "bases!) if fully initialized before calling this function!"); + ConfigTable::const_iterator E = Config.end(); do { ConfigTable::const_iterator I = @@ -127,29 +123,56 @@ StringRef AnalyzerOptions::getCheckerStringOption(StringRef OptionName, return DefaultVal; } -bool AnalyzerOptions::getCheckerBooleanOption(StringRef Name, bool DefaultVal, - const CheckerBase *C, - bool SearchInParents) const { +StringRef AnalyzerOptions::getCheckerStringOption(const ento::CheckerBase *C, + StringRef OptionName, + StringRef DefaultVal, + bool SearchInParents ) const { + return getCheckerStringOption( + C->getTagDescription(), OptionName, DefaultVal, SearchInParents); +} + +bool AnalyzerOptions::getCheckerBooleanOption(StringRef CheckerName, + StringRef OptionName, + bool DefaultVal, + bool SearchInParents ) const { // FIXME: We should emit a warning here if the value is something other than // "true", "false", or the empty string (meaning the default value), // but the AnalyzerOptions doesn't have access to a diagnostic engine. - assert(C); return llvm::StringSwitch( - getCheckerStringOption(Name, DefaultVal ? "true" : "false", C, + getCheckerStringOption(CheckerName, OptionName, + DefaultVal ? "true" : "false", SearchInParents)) .Case("true", true) .Case("false", false) .Default(DefaultVal); } -int AnalyzerOptions::getCheckerIntegerOption(StringRef Name, int DefaultVal, - const CheckerBase *C, - bool SearchInParents) const { +bool AnalyzerOptions::getCheckerBooleanOption(const ento::CheckerBase *C, + StringRef OptionName, + bool DefaultVal, + bool SearchInParents ) const { + return getCheckerBooleanOption( + C->getTagDescription(), OptionName, DefaultVal, SearchInParents); +} + +int AnalyzerOptions::getCheckerIntegerOption(StringRef CheckerName, + StringRef OptionName, + int DefaultVal, + bool SearchInParents ) const { int Ret = DefaultVal; - bool HasFailed = getCheckerStringOption(Name, std::to_string(DefaultVal), C, + bool HasFailed = getCheckerStringOption(CheckerName, OptionName, + std::to_string(DefaultVal), SearchInParents) .getAsInteger(10, Ret); assert(!HasFailed && "analyzer-config option should be numeric"); (void)HasFailed; return Ret; } + +int AnalyzerOptions::getCheckerIntegerOption(const ento::CheckerBase *C, + StringRef OptionName, + int DefaultVal, + bool SearchInParents ) const { + return getCheckerIntegerOption( + C->getTagDescription(), OptionName, DefaultVal, SearchInParents); +} diff --git a/clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp b/clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp index 00dfd0257f812..49de53e53b0b7 100644 --- a/clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp +++ b/clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp @@ -153,6 +153,32 @@ const Expr *bugreporter::getDerefExpr(const Stmt *S) { return E; } +/// Comparing internal representations of symbolic values (via +/// SVal::operator==()) is a valid way to check if the value was updated, +/// unless it's a LazyCompoundVal that may have a different internal +/// representation every time it is loaded from the state. In this function we +/// do an approximate comparison for lazy compound values, checking that they +/// are the immediate snapshots of the tracked region's bindings within the +/// node's respective states but not really checking that these snapshots +/// actually contain the same set of bindings. +bool hasVisibleUpdate(const ExplodedNode *LeftNode, SVal LeftVal, + const ExplodedNode *RightNode, SVal RightVal) { + if (LeftVal == RightVal) + return true; + + const auto LLCV = LeftVal.getAs(); + if (!LLCV) + return false; + + const auto RLCV = RightVal.getAs(); + if (!RLCV) + return false; + + return LLCV->getRegion() == RLCV->getRegion() && + LLCV->getStore() == LeftNode->getState()->getStore() && + RLCV->getStore() == RightNode->getState()->getStore(); +} + //===----------------------------------------------------------------------===// // Definitions for bug reporter visitors. //===----------------------------------------------------------------------===// @@ -1177,7 +1203,7 @@ FindLastStoreBRVisitor::VisitNode(const ExplodedNode *Succ, if (Succ->getState()->getSVal(R) != V) return nullptr; - if (Pred->getState()->getSVal(R) == V) { + if (hasVisibleUpdate(Pred, Pred->getState()->getSVal(R), Succ, V)) { Optional PS = Succ->getLocationAs(); if (!PS || PS->getLocationValue() != R) return nullptr; @@ -1198,6 +1224,7 @@ FindLastStoreBRVisitor::VisitNode(const ExplodedNode *Succ, // UndefinedVal.) if (Optional CE = Succ->getLocationAs()) { if (const auto *VR = dyn_cast(R)) { + const auto *Param = cast(VR->getDecl()); ProgramStateManager &StateMgr = BRC.getStateManager(); diff --git a/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp b/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp index 07e4eb53003a3..6c1eda622c83b 100644 --- a/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp +++ b/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp @@ -415,7 +415,9 @@ void ExprEngine::VisitCast(const CastExpr *CastE, const Expr *Ex, case CK_IntToOCLSampler: case CK_LValueBitCast: case CK_FixedPointCast: - case CK_FixedPointToBoolean: { + case CK_FixedPointToBoolean: + case CK_FixedPointToIntegral: + case CK_IntegralToFixedPoint: { state = handleLValueBitCast(state, Ex, LCtx, T, ExTy, CastE, Bldr, Pred); continue; diff --git a/clang/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp b/clang/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp index 1f9a91c51c546..79aaae8cbb3a5 100644 --- a/clang/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp +++ b/clang/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp @@ -273,7 +273,7 @@ std::string HTMLDiagnostics::GenerateHTML(const PathDiagnostic& D, Rewriter &R, std::vector FileIDs; for (auto I : path) { FileID FID = I->getLocation().asLocation().getExpansionLoc().getFileID(); - if (std::find(FileIDs.begin(), FileIDs.end(), FID) != FileIDs.end()) + if (llvm::is_contained(FileIDs, FID)) continue; FileIDs.push_back(FID); diff --git a/clang/lib/StaticAnalyzer/Core/MemRegion.cpp b/clang/lib/StaticAnalyzer/Core/MemRegion.cpp index fd08f92a658e8..f763701af7fb1 100644 --- a/clang/lib/StaticAnalyzer/Core/MemRegion.cpp +++ b/clang/lib/StaticAnalyzer/Core/MemRegion.cpp @@ -844,6 +844,7 @@ getStackOrCaptureRegionForDeclContext(const LocationContext *LC, const VarRegion* MemRegionManager::getVarRegion(const VarDecl *D, const LocationContext *LC) { + D = D->getCanonicalDecl(); const MemRegion *sReg = nullptr; if (D->hasGlobalStorage() && !D->isStaticLocal()) { @@ -930,6 +931,7 @@ const VarRegion* MemRegionManager::getVarRegion(const VarDecl *D, const VarRegion *MemRegionManager::getVarRegion(const VarDecl *D, const MemRegion *superR) { + D = D->getCanonicalDecl(); return getSubRegion(D, superR); } @@ -1007,6 +1009,7 @@ MemRegionManager::getElementRegion(QualType elementType, NonLoc Idx, const FunctionCodeRegion * MemRegionManager::getFunctionCodeRegion(const NamedDecl *FD) { + // To think: should we canonicalize the declaration here? return getSubRegion(FD, getCodeRegion()); } diff --git a/clang/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp b/clang/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp index 889ea100cfad9..bda72e8700401 100644 --- a/clang/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp +++ b/clang/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp @@ -842,6 +842,9 @@ static std::string getMacroNameAndPrintExpansion(TokenPrinter &Printer, MacroNameAndArgs Info = getMacroNameAndArgs(SM.getExpansionLoc(MacroLoc), PP); + if (!Info.MI) + return Info.Name; + // Manually expand its arguments from the previous macro. Info.Args.expandFromPrevMacro(PrevArgs); @@ -936,7 +939,14 @@ static MacroNameAndArgs getMacroNameAndArgs(SourceLocation ExpanLoc, assert(II && "Failed to acquire the IndetifierInfo for the macro!"); const MacroInfo *MI = getMacroInfoForLocation(PP, SM, II, ExpanLoc); - assert(MI && "The macro must've been defined at it's expansion location!"); + // assert(MI && "The macro must've been defined at it's expansion location!"); + // + // We should always be able to obtain the MacroInfo in a given TU, but if + // we're running the analyzer with CTU, the Preprocessor won't contain the + // directive history (or anything for that matter) from another TU. + // TODO: assert when we're not running with CTU. + if (!MI) + return { MacroName, MI, {} }; // Acquire the macro's arguments. // diff --git a/clang/lib/StaticAnalyzer/Core/RegionStore.cpp b/clang/lib/StaticAnalyzer/Core/RegionStore.cpp index 679d95b7c589a..3323bb97a7124 100644 --- a/clang/lib/StaticAnalyzer/Core/RegionStore.cpp +++ b/clang/lib/StaticAnalyzer/Core/RegionStore.cpp @@ -2386,10 +2386,7 @@ RegionStoreManager::bindAggregate(RegionBindingsConstRef B, namespace { class RemoveDeadBindingsWorker : public ClusterAnalysis { - using ChildrenListTy = SmallVector; - using MapParentsToDerivedTy = llvm::DenseMap; - - MapParentsToDerivedTy ParentsToDerived; + SmallVector Postponed; SymbolReaper &SymReaper; const StackFrameContext *CurrentLCtx; @@ -2410,10 +2407,8 @@ class RemoveDeadBindingsWorker bool AddToWorkList(const MemRegion *R); + bool UpdatePostponed(); void VisitBinding(SVal V); - -private: - void populateWorklistFromSymbol(SymbolRef s); }; } @@ -2433,11 +2428,10 @@ void RemoveDeadBindingsWorker::VisitAddedToCluster(const MemRegion *baseR, } if (const SymbolicRegion *SR = dyn_cast(baseR)) { - if (SymReaper.isLive(SR->getSymbol())) { + if (SymReaper.isLive(SR->getSymbol())) AddToWorkList(SR, &C); - } else if (const auto *SD = dyn_cast(SR->getSymbol())) { - ParentsToDerived[SD->getParentSymbol()].push_back(SD); - } + else + Postponed.push_back(SR); return; } @@ -2450,7 +2444,7 @@ void RemoveDeadBindingsWorker::VisitAddedToCluster(const MemRegion *baseR, // CXXThisRegion in the current or parent location context is live. if (const CXXThisRegion *TR = dyn_cast(baseR)) { const auto *StackReg = - cast(TR->getSuperRegion()); + cast(TR->getSuperRegion()); const StackFrameContext *RegCtx = StackReg->getStackFrame(); if (CurrentLCtx && (RegCtx == CurrentLCtx || RegCtx->isParentOf(CurrentLCtx))) @@ -2494,15 +2488,6 @@ void RemoveDeadBindingsWorker::VisitBinding(SVal V) { // If V is a region, then add it to the worklist. if (const MemRegion *R = V.getAsRegion()) { AddToWorkList(R); - - if (const auto *TVR = dyn_cast(R)) { - DefinedOrUnknownSVal RVS = - RM.getSValBuilder().getRegionValueSymbolVal(TVR); - if (const MemRegion *SR = RVS.getAsRegion()) { - AddToWorkList(SR); - } - } - SymReaper.markLive(R); // All regions captured by a block are also live. @@ -2516,30 +2501,25 @@ void RemoveDeadBindingsWorker::VisitBinding(SVal V) { // Update the set of live symbols. - for (auto SI = V.symbol_begin(), SE = V.symbol_end(); SI != SE; ++SI) { - populateWorklistFromSymbol(*SI); - - for (const auto *SD : ParentsToDerived[*SI]) - populateWorklistFromSymbol(SD); - + for (auto SI = V.symbol_begin(), SE = V.symbol_end(); SI!=SE; ++SI) SymReaper.markLive(*SI); - } } -void RemoveDeadBindingsWorker::populateWorklistFromSymbol(SymbolRef S) { - if (const auto *SD = dyn_cast(S)) { - if (Loc::isLocType(SD->getType()) && !SymReaper.isLive(SD)) { - const SymbolicRegion *SR = RM.getRegionManager().getSymbolicRegion(SD); +bool RemoveDeadBindingsWorker::UpdatePostponed() { + // See if any postponed SymbolicRegions are actually live now, after + // having done a scan. + bool Changed = false; - if (B.contains(SR)) - AddToWorkList(SR); - - const SymbolicRegion *SHR = - RM.getRegionManager().getSymbolicHeapRegion(SD); - if (B.contains(SHR)) - AddToWorkList(SHR); + for (auto I = Postponed.begin(), E = Postponed.end(); I != E; ++I) { + if (const SymbolicRegion *SR = *I) { + if (SymReaper.isLive(SR->getSymbol())) { + Changed |= AddToWorkList(SR); + *I = nullptr; + } } } + + return Changed; } StoreRef RegionStoreManager::removeDeadBindings(Store store, @@ -2555,7 +2535,7 @@ StoreRef RegionStoreManager::removeDeadBindings(Store store, W.AddToWorkList(*I); } - W.RunWorkList(); + do W.RunWorkList(); while (W.UpdatePostponed()); // We have now scanned the store, marking reachable regions and symbols // as live. We now remove all the regions that are dead from the store diff --git a/clang/lib/StaticAnalyzer/Core/SVals.cpp b/clang/lib/StaticAnalyzer/Core/SVals.cpp index 7ee37d453e2fe..b3c83e7792da3 100644 --- a/clang/lib/StaticAnalyzer/Core/SVals.cpp +++ b/clang/lib/StaticAnalyzer/Core/SVals.cpp @@ -1,4 +1,4 @@ -//===- RValues.cpp - Abstract RValues for Path-Sens. Value Tracking -------===// +//===-- SVals.cpp - Abstract RValues for Path-Sens. Value Tracking --------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/clang/lib/StaticAnalyzer/Core/Z3ConstraintManager.cpp b/clang/lib/StaticAnalyzer/Core/Z3ConstraintManager.cpp index 3681570da5b56..73474cc9cd8c2 100644 --- a/clang/lib/StaticAnalyzer/Core/Z3ConstraintManager.cpp +++ b/clang/lib/StaticAnalyzer/Core/Z3ConstraintManager.cpp @@ -102,6 +102,11 @@ class Z3Sort : public SMTSort { Z3_dec_ref(Context.Context, reinterpret_cast(Sort)); } + void Profile(llvm::FoldingSetNodeID &ID) const { + ID.AddInteger( + Z3_get_ast_id(Context.Context, reinterpret_cast(Sort))); + } + bool isBitvectorSortImpl() const override { return (Z3_get_sort_kind(Context.Context, Sort) == Z3_BV_SORT); } @@ -172,7 +177,7 @@ class Z3Expr : public SMTExpr { } void Profile(llvm::FoldingSetNodeID &ID) const override { - ID.AddInteger(Z3_get_ast_hash(Context.Context, AST)); + ID.AddInteger(Z3_get_ast_id(Context.Context, AST)); } /// Comparison of AST equality, not model equivalence. @@ -253,13 +258,6 @@ static bool areEquivalent(const llvm::fltSemantics &LHS, llvm::APFloat::semanticsSizeInBits(RHS)); } -} // end anonymous namespace - -typedef llvm::ImmutableSet> ConstraintZ3Ty; -REGISTER_TRAIT_WITH_PROGRAMSTATE(ConstraintZ3, ConstraintZ3Ty) - -namespace { - class Z3Solver : public SMTSolver { friend class Z3ConstraintManager; @@ -267,6 +265,12 @@ class Z3Solver : public SMTSolver { Z3_solver Solver; + // Cache Sorts + std::set CachedSorts; + + // Cache Exprs + std::set CachedExprs; + public: Z3Solver() : Solver(Z3_mk_simple_solver(Context.Context)) { Z3_solver_inc_ref(Context.Context, Solver); @@ -286,42 +290,48 @@ class Z3Solver : public SMTSolver { Z3_solver_assert(Context.Context, Solver, toZ3Expr(*Exp).AST); } + // Given an SMTSort, adds/retrives it from the cache and returns + // an SMTSortRef to the SMTSort in the cache + SMTSortRef newSortRef(const SMTSort &Sort) { + auto It = CachedSorts.insert(toZ3Sort(Sort)); + return &(*It.first); + } + + // Given an SMTExpr, adds/retrives it from the cache and returns + // an SMTExprRef to the SMTExpr in the cache + SMTExprRef newExprRef(const SMTExpr &Exp) { + auto It = CachedExprs.insert(toZ3Expr(Exp)); + return &(*It.first); + } + SMTSortRef getBoolSort() override { - return std::make_shared(Context, Z3_mk_bool_sort(Context.Context)); + return newSortRef(Z3Sort(Context, Z3_mk_bool_sort(Context.Context))); } SMTSortRef getBitvectorSort(unsigned BitWidth) override { - return std::make_shared(Context, - Z3_mk_bv_sort(Context.Context, BitWidth)); + return newSortRef( + Z3Sort(Context, Z3_mk_bv_sort(Context.Context, BitWidth))); } SMTSortRef getSort(const SMTExprRef &Exp) override { - return std::make_shared( - Context, Z3_get_sort(Context.Context, toZ3Expr(*Exp).AST)); + return newSortRef( + Z3Sort(Context, Z3_get_sort(Context.Context, toZ3Expr(*Exp).AST))); } SMTSortRef getFloat16Sort() override { - return std::make_shared(Context, - Z3_mk_fpa_sort_16(Context.Context)); + return newSortRef(Z3Sort(Context, Z3_mk_fpa_sort_16(Context.Context))); } SMTSortRef getFloat32Sort() override { - return std::make_shared(Context, - Z3_mk_fpa_sort_32(Context.Context)); + return newSortRef(Z3Sort(Context, Z3_mk_fpa_sort_32(Context.Context))); } SMTSortRef getFloat64Sort() override { - return std::make_shared(Context, - Z3_mk_fpa_sort_64(Context.Context)); + return newSortRef(Z3Sort(Context, Z3_mk_fpa_sort_64(Context.Context))); } SMTSortRef getFloat128Sort() override { - return std::make_shared(Context, - Z3_mk_fpa_sort_128(Context.Context)); - } - - SMTExprRef newExprRef(const SMTExpr &E) const override { - return std::make_shared(toZ3Expr(E)); + return newSortRef(Z3Sort(Context, Z3_mk_fpa_sort_128(Context.Context))); } SMTExprRef mkBVNeg(const SMTExprRef &Exp) override { @@ -804,14 +814,6 @@ class Z3Solver : public SMTSolver { } }; // end class Z3Solver -class Z3ConstraintManager : public SMTConstraintManager { - SMTSolverRef Solver = CreateZ3Solver(); - -public: - Z3ConstraintManager(SubEngine *SE, SValBuilder &SB) - : SMTConstraintManager(SE, SB, Solver) {} -}; // end class Z3ConstraintManager - } // end anonymous namespace #endif @@ -829,12 +831,5 @@ SMTSolverRef clang::ento::CreateZ3Solver() { std::unique_ptr ento::CreateZ3ConstraintManager(ProgramStateManager &StMgr, SubEngine *Eng) { -#if CLANG_ANALYZER_WITH_Z3 - return llvm::make_unique(Eng, StMgr.getSValBuilder()); -#else - llvm::report_fatal_error("Clang was not compiled with Z3 support, rebuild " - "with -DCLANG_ANALYZER_ENABLE_Z3_SOLVER=ON", - false); - return nullptr; -#endif + return llvm::make_unique(Eng, StMgr.getSValBuilder()); } diff --git a/clang/lib/Tooling/Core/Replacement.cpp b/clang/lib/Tooling/Core/Replacement.cpp index 3dd7888961951..546158714e3cc 100644 --- a/clang/lib/Tooling/Core/Replacement.cpp +++ b/clang/lib/Tooling/Core/Replacement.cpp @@ -519,12 +519,11 @@ calculateRangesAfterReplacements(const Replacements &Replaces, return MergedRanges; tooling::Replacements FakeReplaces; for (const auto &R : MergedRanges) { - auto Err = FakeReplaces.add(Replacement(Replaces.begin()->getFilePath(), - R.getOffset(), R.getLength(), - std::string(R.getLength(), ' '))); - assert(!Err && - "Replacements must not conflict since ranges have been merged."); - llvm::consumeError(std::move(Err)); + llvm::cantFail( + FakeReplaces.add(Replacement(Replaces.begin()->getFilePath(), + R.getOffset(), R.getLength(), + std::string(R.getLength(), ' '))), + "Replacements must not conflict since ranges have been merged."); } return FakeReplaces.merge(Replaces).getAffectedRanges(); } diff --git a/clang/test/AST/ast-dump-attr.cpp b/clang/test/AST/ast-dump-attr.cpp index b0b08dd6f00ed..8f67b9934e197 100644 --- a/clang/test/AST/ast-dump-attr.cpp +++ b/clang/test/AST/ast-dump-attr.cpp @@ -197,7 +197,7 @@ namespace TestSuppress { [[gsl::suppress("on-decl")]] void TestSuppressFunction(); // CHECK: FunctionDecl{{.*}} TestSuppressFunction - // CHECK-NEXT SuppressAttr{{.*}} on-decl + // CHECK-NEXT: SuppressAttr{{.*}} on-decl void f() { int *i; diff --git a/clang/test/AST/ast-dump-wchar.cpp b/clang/test/AST/ast-dump-wchar.cpp index 339295c133d14..a07bfcfa8302f 100644 --- a/clang/test/AST/ast-dump-wchar.cpp +++ b/clang/test/AST/ast-dump-wchar.cpp @@ -1,13 +1,13 @@ // RUN: %clang_cc1 -std=c++11 -ast-dump %s -triple x86_64-linux-gnu | FileCheck %s char c8[] = u8"test\0\\\"\a\b\f\n\r\t\v\234"; -// CHECK: StringLiteral {{.*}} lvalue u8"test\000\\\"\a\b\f\n\r\t\v\234" +// CHECK: StringLiteral {{.*}} u8"test\000\\\"\a\b\f\n\r\t\v\234" char16_t c16[] = u"test\0\\\"\t\a\b\234\u1234"; -// CHECK: StringLiteral {{.*}} lvalue u"test\000\\\"\t\a\b\234\u1234" +// CHECK: StringLiteral {{.*}} u"test\000\\\"\t\a\b\234\u1234" char32_t c32[] = U"test\0\\\"\t\a\b\234\u1234\U0010ffff"; // \ -// CHECK: StringLiteral {{.*}} lvalue U"test\000\\\"\t\a\b\234\u1234\U0010FFFF" +// CHECK: StringLiteral {{.*}} U"test\000\\\"\t\a\b\234\u1234\U0010FFFF" wchar_t wc[] = L"test\0\\\"\t\a\b\234\u1234\xffffffff"; // \ -// CHECK: StringLiteral {{.*}} lvalue L"test\000\\\"\t\a\b\234\x1234\xFFFFFFFF" +// CHECK: StringLiteral {{.*}} L"test\000\\\"\t\a\b\234\x1234\xFFFFFFFF" diff --git a/clang/test/AST/function-alias.cpp b/clang/test/AST/function-alias.cpp new file mode 100644 index 0000000000000..a9a2b79ad8bbe --- /dev/null +++ b/clang/test/AST/function-alias.cpp @@ -0,0 +1,14 @@ +// RUN: %clang_cc1 -std=c++17 -fsyntax-only %s + +// Verify that ASTContext::getFunctionTypeWithExceptionSpec (called through +// ASTContext::hasSameFunctionTypeIgnoringExceptionSpec from +// ExprEvaluatorBase::handleCallExpr in lib/AST/ExprConstant.cpp) does not crash +// for a type alias. + +constexpr int f() noexcept { return 0; } + +using F = int(); + +constexpr int g(F * p) { return p(); } + +constexpr int n = g(f); diff --git a/clang/test/ASTMerge/anonymous-fields/Inputs/anonymous-fields1.cpp b/clang/test/ASTMerge/anonymous-fields/Inputs/anonymous-fields1.cpp deleted file mode 100644 index 829bc0edd30a6..0000000000000 --- a/clang/test/ASTMerge/anonymous-fields/Inputs/anonymous-fields1.cpp +++ /dev/null @@ -1,5 +0,0 @@ -class A { -public: - struct { int foo; } f; - struct { int foo; } g; -}; diff --git a/clang/test/ASTMerge/anonymous-fields/Inputs/anonymous-fields2.cpp b/clang/test/ASTMerge/anonymous-fields/Inputs/anonymous-fields2.cpp deleted file mode 100644 index 28ea46d98711b..0000000000000 --- a/clang/test/ASTMerge/anonymous-fields/Inputs/anonymous-fields2.cpp +++ /dev/null @@ -1,9 +0,0 @@ -class A { -public: - struct { int foo; } f; - struct { int foo; } g; -}; - -inline int useA(A &a) { - return (a.f.foo + a.g.foo); -} diff --git a/clang/test/ASTMerge/anonymous-fields/test.cpp b/clang/test/ASTMerge/anonymous-fields/test.cpp deleted file mode 100644 index 67afc29d07e5b..0000000000000 --- a/clang/test/ASTMerge/anonymous-fields/test.cpp +++ /dev/null @@ -1,4 +0,0 @@ -// RUN: %clang_cc1 -emit-pch -o %t.1.ast %S/Inputs/anonymous-fields1.cpp -// RUN: %clang_cc1 -emit-pch -o %t.2.ast %S/Inputs/anonymous-fields2.cpp -// RUN: %clang_cc1 -emit-obj -o /dev/null -ast-merge %t.1.ast -ast-merge %t.2.ast %s -// expected-no-diagnostics diff --git a/clang/test/ASTMerge/asm/Inputs/asm-function.cpp b/clang/test/ASTMerge/asm/Inputs/asm-function.cpp deleted file mode 100644 index 1b8783354fceb..0000000000000 --- a/clang/test/ASTMerge/asm/Inputs/asm-function.cpp +++ /dev/null @@ -1,21 +0,0 @@ - -unsigned char asmFunc(unsigned char a, unsigned char b) { - unsigned int la = a; - unsigned int lb = b; - unsigned int bigres; - unsigned char res; - __asm__ ("0:\n1:\n" : [bigres] "=la"(bigres) : [la] "0"(la), [lb] "c"(lb) : - "edx", "cc"); - res = bigres; - return res; -} - -int asmFunc2(int i) { - int res; - asm ("mov %1, %0 \t\n" - "inc %0 " - : "=r" (res) - : "r" (i) - : "cc"); - return res; -} diff --git a/clang/test/ASTMerge/asm/test.cpp b/clang/test/ASTMerge/asm/test.cpp deleted file mode 100644 index 8c3bdfe17b75b..0000000000000 --- a/clang/test/ASTMerge/asm/test.cpp +++ /dev/null @@ -1,8 +0,0 @@ -// RUN: %clang_cc1 -triple i386-unknown-unknown -fcxx-exceptions -emit-pch -o %t.1.ast %S/Inputs/asm-function.cpp -// RUN: %clang_cc1 -triple i386-unknown-unknown -fcxx-exceptions -ast-merge %t.1.ast -fsyntax-only -verify %s -// expected-no-diagnostics - -void testAsmImport() { - asmFunc(12, 42); - asmFunc2(42); -} diff --git a/clang/test/ASTMerge/category/Inputs/category1.m b/clang/test/ASTMerge/category/Inputs/category1.m deleted file mode 100644 index afcaab81f2b7b..0000000000000 --- a/clang/test/ASTMerge/category/Inputs/category1.m +++ /dev/null @@ -1,48 +0,0 @@ -@interface I1 -@end - -// Matching category -@interface I1 (Cat1) -- (int)method0; -@end - -// Matching class extension -@interface I1 () -- (int)method1; -@end - -// Mismatched category -@interface I1 (Cat2) -- (int)method2; -@end - -@interface I2 -@end - -// Mismatched class extension -@interface I2 () -- (int)method3; -@end - -// Category with implementation -@interface I2 (Cat3) -@end - -@implementation I2 (Cat3) -@end - -// Category with implementation -@interface I2 (Cat4) -@end - -@implementation I2 (Cat4) -@end - -// Category with mismatched implementation -@interface I2 (Cat6) -@end - -@implementation I2 (Cat6) -- (float)blah { return 0; } -@end - diff --git a/clang/test/ASTMerge/category/Inputs/category2.m b/clang/test/ASTMerge/category/Inputs/category2.m deleted file mode 100644 index 49a3c270a1c24..0000000000000 --- a/clang/test/ASTMerge/category/Inputs/category2.m +++ /dev/null @@ -1,49 +0,0 @@ -typedef int Int; - -@interface I1 -@end - -// Matching category -@interface I1 (Cat1) -- (Int)method0; -@end - -// Matching class extension -@interface I1 () -- (Int)method1; -@end - -// Mismatched category -@interface I1 (Cat2) -- (float)method2; -@end - -@interface I2 -@end - -// Mismatched class extension -@interface I2 () -- (float)method3; -@end - -// Category with implementation -@interface I2 (Cat3) -@end - -@implementation I2 (Cat3) -@end - -// Category with implementation -@interface I2 (Cat5) -@end - -@implementation I2 (Cat5) -@end - -// Category with mismatched implementation -@interface I2 (Cat6) -@end - -@implementation I2 (Cat6) -- (int)blah { return 0; } -@end diff --git a/clang/test/ASTMerge/category/test.m b/clang/test/ASTMerge/category/test.m deleted file mode 100644 index c7d524816494a..0000000000000 --- a/clang/test/ASTMerge/category/test.m +++ /dev/null @@ -1,11 +0,0 @@ -// RUN: %clang_cc1 -emit-pch -o %t.1.ast %S/Inputs/category1.m -// RUN: %clang_cc1 -emit-pch -o %t.2.ast %S/Inputs/category2.m -// RUN: not %clang_cc1 -ast-merge %t.1.ast -ast-merge %t.2.ast -fsyntax-only %s 2>&1 | FileCheck %s - -// CHECK: category2.m:18:1: error: instance method 'method2' has incompatible result types in different translation units ('float' vs. 'int') -// CHECK: category1.m:16:1: note: instance method 'method2' also declared here -// CHECK: category2.m:26:1: error: instance method 'method3' has incompatible result types in different translation units ('float' vs. 'int') -// CHECK: category1.m:24:1: note: instance method 'method3' also declared here -// CHECK: category2.m:48:1: error: instance method 'blah' has incompatible result types in different translation units ('int' vs. 'float') -// CHECK: category1.m:46:1: note: instance method 'blah' also declared here -// CHECK: 3 errors generated. diff --git a/clang/test/ASTMerge/choose-expr/Inputs/choose.c b/clang/test/ASTMerge/choose-expr/Inputs/choose.c new file mode 100644 index 0000000000000..0b413a655445e --- /dev/null +++ b/clang/test/ASTMerge/choose-expr/Inputs/choose.c @@ -0,0 +1,2 @@ +_Static_assert(__builtin_choose_expr(1, 1, 0), "Incorrect semantics of __builtin_choose_expr"); +_Static_assert(__builtin_choose_expr(0, 0, 1), "Incorrect semantics of __builtin_choose_expr"); diff --git a/clang/test/ASTMerge/choose-expr/test.c b/clang/test/ASTMerge/choose-expr/test.c new file mode 100644 index 0000000000000..0f95cd59681cc --- /dev/null +++ b/clang/test/ASTMerge/choose-expr/test.c @@ -0,0 +1,4 @@ +// RUN: %clang_cc1 -std=c11 -emit-pch -o %t.ast %S/Inputs/choose.c +// RUN: %clang_cc1 -std=c11 -ast-merge %t.ast -fsyntax-only -verify %s +// expected-no-diagnostics + diff --git a/clang/test/ASTMerge/class-template-partial-spec/Inputs/class-template-partial-spec1.cpp b/clang/test/ASTMerge/class-template-partial-spec/Inputs/class-template-partial-spec1.cpp deleted file mode 100644 index 43606d4d220bb..0000000000000 --- a/clang/test/ASTMerge/class-template-partial-spec/Inputs/class-template-partial-spec1.cpp +++ /dev/null @@ -1,118 +0,0 @@ -template -struct TwoOptionTemplate {}; - -template -struct TwoOptionTemplate { - int member; -}; - - -template -struct TwoOptionTemplate { - float member; -}; - -template -struct TwoOptionTemplate { - T** member; -}; - -TwoOptionTemplate X0; -TwoOptionTemplate X1; -TwoOptionTemplate X2; -TwoOptionTemplate X3; -TwoOptionTemplate X4; -TwoOptionTemplate SingleSource; -TwoOptionTemplate SecondDoubleSource; - - -template -struct IntTemplateSpec {}; - -template -struct IntTemplateSpec<4, C> { - C member; -}; - -template -struct IntTemplateSpec { - int member; - static constexpr int val = I; -}; - -template -struct IntTemplateSpec { - char member; - static constexpr int val = I; -}; - -IntTemplateSpec<4, wchar_t> Y0; -IntTemplateSpec<5, void *> Y1; -IntTemplateSpec<1, long> Y2; -IntTemplateSpec<3, int> Y3; -//template constexpr int IntTemplateSpec::val; -IntTemplateSpec<42, double> NumberSource; -static_assert(NumberSource.val == 42); - -namespace One { -namespace Two { - // Just an empty namespace to ensure we can deal with multiple namespace decls. -} -} - - -namespace One { -namespace Two { -namespace Three { - -template -class Parent {}; - -} // namespace Three - -} // namespace Two - -template -struct Child1: public Two::Three::Parent { - char member; -}; - -template -struct Child1> { - T member; -}; - -} // namespace One - -One::Child1 Z0Source; - -// Test import of nested namespace specifiers -template -struct Outer { - template class Inner0; -}; - -template -template -class Outer::Inner0 { -public: - void f(X, Y); - template struct Inner1; -}; - -template -template -void Outer::Inner0::f(X, Y) {} - -template -template -template -class Outer::Inner0::Inner1 { -public: - void f(Y, Z); -}; - -template -template -template -void Outer::Inner0::Inner1::f(Y, Z) {} diff --git a/clang/test/ASTMerge/class-template-partial-spec/Inputs/class-template-partial-spec2.cpp b/clang/test/ASTMerge/class-template-partial-spec/Inputs/class-template-partial-spec2.cpp deleted file mode 100644 index 2f3f0c68e28c6..0000000000000 --- a/clang/test/ASTMerge/class-template-partial-spec/Inputs/class-template-partial-spec2.cpp +++ /dev/null @@ -1,79 +0,0 @@ -template -struct TwoOptionTemplate {}; - -template -struct TwoOptionTemplate { - int member; -}; - - -template -struct TwoOptionTemplate { - float member; -}; - -template -struct TwoOptionTemplate { - T** member; -}; - -TwoOptionTemplate X0; -TwoOptionTemplate X1; -TwoOptionTemplate X2; -TwoOptionTemplate X3; -TwoOptionTemplate X4; -TwoOptionTemplate SingleDest; -TwoOptionTemplate SecondDoubleDest; - - -template -struct IntTemplateSpec {}; - -template -struct IntTemplateSpec<4, C> { - C member; -}; - -template -struct IntTemplateSpec { - double member; - static constexpr int val = I; -}; - -template -struct IntTemplateSpec { - char member; - static constexpr int val = I; -}; - -IntTemplateSpec<4, wchar_t>Y0; -IntTemplateSpec<5, void *> Y1; -IntTemplateSpec<1, int> Y2; -IntTemplateSpec<2, int> Y3; -IntTemplateSpec<43, double> NumberDest; - -namespace One { -namespace Two { -namespace Three { - -template -class Parent {}; - -} // namespace Three - -} // namespace Two - -template -struct Child1: public Two::Three::Parent { - char member; -}; - -template -struct Child1> { - T member; -}; - -} // namespace One - -namespace Dst { One::Child1> Z0Dst; } -One::Child1 Z1; diff --git a/clang/test/ASTMerge/class-template-partial-spec/test.cpp b/clang/test/ASTMerge/class-template-partial-spec/test.cpp deleted file mode 100644 index cfa6052e7106d..0000000000000 --- a/clang/test/ASTMerge/class-template-partial-spec/test.cpp +++ /dev/null @@ -1,25 +0,0 @@ -// RUN: %clang_cc1 -emit-pch -std=c++1z -o %t.1.ast %S/Inputs/class-template-partial-spec1.cpp -// RUN: %clang_cc1 -emit-pch -std=c++1z -o %t.2.ast %S/Inputs/class-template-partial-spec2.cpp -// RUN: not %clang_cc1 -std=c++1z -ast-merge %t.1.ast -ast-merge %t.2.ast -fsyntax-only %s 2>&1 | FileCheck %s - -static_assert(sizeof(**SingleSource.member) == sizeof(**SingleDest.member)); -static_assert(sizeof(SecondDoubleSource.member) == sizeof(SecondDoubleDest.member)); -static_assert(NumberSource.val == 42); -static_assert(sizeof(Z0Source.member) == sizeof(char)); -static_assert(sizeof(Dst::Z0Dst.member) == sizeof(double)); -static_assert(sizeof(One::Child1>::member) == sizeof(double)); - -// CHECK: class-template-partial-spec2.cpp:21:32: error: external variable 'X1' declared with incompatible types in different translation units ('TwoOptionTemplate' vs. 'TwoOptionTemplate') -// CHECK: class-template-partial-spec1.cpp:21:31: note: declared here with type 'TwoOptionTemplate' - -// CHECK: class-template-partial-spec2.cpp:24:29: error: external variable 'X4' declared with incompatible types in different translation units ('TwoOptionTemplate' vs. 'TwoOptionTemplate') -// CHECK: class-template-partial-spec1.cpp:24:33: note: declared here with type 'TwoOptionTemplate' - -// CHECK: class-template-partial-spec1.cpp:38:8: warning: type 'IntTemplateSpec<5, void *>' has incompatible definitions in different translation units -// CHECK: class-template-partial-spec1.cpp:39:7: note: field 'member' has type 'int' here -// CHECK: class-template-partial-spec2.cpp:39:10: note: field 'member' has type 'double' here - -// CHECK: class-template-partial-spec2.cpp:52:25: error: external variable 'Y3' declared with incompatible types in different translation units ('IntTemplateSpec<2, int>' vs. 'IntTemplateSpec<3, int>') -// CHECK: class-template-partial-spec1.cpp:52:25: note: declared here with type 'IntTemplateSpec<3, int>' - -// CHECK-NOT: static_assert diff --git a/clang/test/ASTMerge/class-template/Inputs/class-template1.cpp b/clang/test/ASTMerge/class-template/Inputs/class-template1.cpp deleted file mode 100644 index fb5b229e0ac8f..0000000000000 --- a/clang/test/ASTMerge/class-template/Inputs/class-template1.cpp +++ /dev/null @@ -1,37 +0,0 @@ -template -struct X0 { - T getValue(T arg) { return arg; } -}; - -template -struct X1; - -template -struct X2; - -template -struct X3; - -template class> -struct X4; - -template class> -struct X5; - -template -struct X6; - -extern X0 *x0i; -extern X0 *x0l; -extern X0 *x0r; - -template<> -struct X0 { - int member; - char getValue(char ch) { return static_cast(member); } -}; - -template<> -struct X0 { - int member; -}; diff --git a/clang/test/ASTMerge/class-template/Inputs/class-template2.cpp b/clang/test/ASTMerge/class-template/Inputs/class-template2.cpp deleted file mode 100644 index b5d0add13f15e..0000000000000 --- a/clang/test/ASTMerge/class-template/Inputs/class-template2.cpp +++ /dev/null @@ -1,37 +0,0 @@ -template -struct X0 { - T getValue(T arg); -}; - -template -struct X1; - -template -struct X2; - -template -struct X3; - -template class> -struct X4; - -template class> -struct X5; - -template class> -struct X6; - -typedef int Integer; -extern X0 *x0i; -extern X0 *x0f; -extern X0 *x0r; - -template<> -struct X0 { - int member; -}; - -template<> -struct X0 { - float member; -}; diff --git a/clang/test/ASTMerge/class-template/test.cpp b/clang/test/ASTMerge/class-template/test.cpp deleted file mode 100644 index 7e25c5d6ccc3e..0000000000000 --- a/clang/test/ASTMerge/class-template/test.cpp +++ /dev/null @@ -1,28 +0,0 @@ -// RUN: %clang_cc1 -std=c++1z -emit-pch -o %t.1.ast %S/Inputs/class-template1.cpp -// RUN: %clang_cc1 -std=c++1z -emit-pch -o %t.2.ast %S/Inputs/class-template2.cpp -// RUN: not %clang_cc1 -std=c++1z -ast-merge %t.1.ast -ast-merge %t.2.ast -fsyntax-only %s 2>&1 | FileCheck %s - -static_assert(sizeof(X0().getValue(1)) == sizeof(char)); -static_assert(sizeof(X0().getValue(1)) == sizeof(int)); - -// CHECK: class-template1.cpp:9:14: error: non-type template parameter declared with incompatible types in different translation units ('int' vs. 'long') -// CHECK: class-template2.cpp:9:15: note: declared here with type 'long' - -// CHECK: class-template1.cpp:12:14: error: template parameter has different kinds in different translation units -// CHECK: class-template2.cpp:12:10: note: template parameter declared here - -// CHECK: class-template1.cpp:18:23: error: non-type template parameter declared with incompatible types in different translation units ('long' vs. 'int') -// CHECK: class-template2.cpp:18:23: note: declared here with type 'int' - -// CHECK: class-template1.cpp:21:10: error: template parameter has different kinds in different translation units -// CHECK: class-template2.cpp:21:10: note: template parameter declared here - -// CHECK: class-template2.cpp:27:20: error: external variable 'x0r' declared with incompatible types in different translation units ('X0 *' vs. 'X0 *') -// CHECK: class-template1.cpp:26:19: note: declared here with type 'X0 *' - -// CHECK: class-template1.cpp:35:8: warning: type 'X0' has incompatible definitions in different translation units -// CHECK: class-template1.cpp:36:7: note: field 'member' has type 'int' here -// CHECK: class-template2.cpp:36:9: note: field 'member' has type 'float' here - -// CHECK: 1 warning and 5 errors generated. -// CHECK-NOT: static_assert diff --git a/clang/test/ASTMerge/class/Inputs/class1.cpp b/clang/test/ASTMerge/class/Inputs/class1.cpp deleted file mode 100644 index 2bd5503ecf3d5..0000000000000 --- a/clang/test/ASTMerge/class/Inputs/class1.cpp +++ /dev/null @@ -1,48 +0,0 @@ -struct A { - public: - int x; -}; - -struct B : A { - float y; - float foo(); -}; - -struct C { - C(int i = 10); - C(const C&); - C &operator=(C&); - ~C(); -}; - -enum E { - b = 1 -}; - -//Friend import tests -void f(); -int g(int a); -struct X; -struct Y; - -struct F1 { -public: - int x; - friend struct X; - friend int g(int); - friend void f(); -}; - -struct F2 { -public: - int x; - friend struct X; - friend void f(); -}; - -struct F3 { -public: - int x; - friend int g(int); - friend void f(); -}; diff --git a/clang/test/ASTMerge/class/Inputs/class2.cpp b/clang/test/ASTMerge/class/Inputs/class2.cpp deleted file mode 100644 index 6fe38b9206629..0000000000000 --- a/clang/test/ASTMerge/class/Inputs/class2.cpp +++ /dev/null @@ -1,40 +0,0 @@ -struct A { - public: - int x; -}; - -struct B : A { - int y; - int foo(); -}; - -enum E { - a = 0, - b = 1 -}; - -//Friend import tests -void f(); -int g(int a); -struct X; -struct Y; - -struct F1 { -public: - int x; - friend struct X; - friend int g(int); - friend void f(); -}; - -struct F2 { -public: - int x; - friend struct X; -}; - -struct F3 { -public: - int x; - friend void f(); -}; diff --git a/clang/test/ASTMerge/class/test.cpp b/clang/test/ASTMerge/class/test.cpp deleted file mode 100644 index ba553af40720f..0000000000000 --- a/clang/test/ASTMerge/class/test.cpp +++ /dev/null @@ -1,24 +0,0 @@ -// RUN: %clang_cc1 -emit-pch -o %t.1.ast %S/Inputs/class1.cpp -// RUN: %clang_cc1 -emit-pch -o %t.2.ast %S/Inputs/class2.cpp -// RUN: %clang_cc1 -ast-merge %t.1.ast -ast-merge %t.2.ast -fsyntax-only %s 2>&1 | FileCheck %s -// RUN: %clang_cc1 -ast-merge %t.1.ast -ast-merge %t.2.ast -fsyntax-only %s 2>&1 -Wno-odr -Werror - -// CHECK: class1.cpp:6:8: warning: type 'B' has incompatible definitions in different translation units -// CHECK: class1.cpp:7:9: note: field 'y' has type 'float' here -// CHECK: class2.cpp:7:7: note: field 'y' has type 'int' here - -// FIXME: we should also complain about mismatched types on the method - -// CHECK: class1.cpp:18:6: warning: type 'E' has incompatible definitions in different translation units -// CHECK: class1.cpp:19:3: note: enumerator 'b' with value 1 here -// CHECK: class2.cpp:12:3: note: enumerator 'a' with value 0 here - -// CHECK: class1.cpp:43:8: warning: type 'F3' has incompatible definitions in different translation units -// CHECK: class1.cpp:46:3: note: friend declared here -// CHECK: class2.cpp:36:8: note: no corresponding friend here - -// CHECK: class1.cpp:36:8: warning: type 'F2' has incompatible definitions in different translation units -// CHECK: class1.cpp:39:3: note: friend declared here -// CHECK: class2.cpp:30:8: note: no corresponding friend here - -// CHECK: 4 warnings generated. diff --git a/clang/test/ASTMerge/class2/Inputs/class3.cpp b/clang/test/ASTMerge/class2/Inputs/class3.cpp deleted file mode 100644 index 428acc3f03199..0000000000000 --- a/clang/test/ASTMerge/class2/Inputs/class3.cpp +++ /dev/null @@ -1,26 +0,0 @@ -class C1 { -public: - C1(); - ~C1(); - C1 *method_1() { - return this; - } - C1 method_2() { - return C1(); - } - void method_3() { - const C1 &ref = C1(); - } -}; - -class C11 : public C1 { -}; - -class C2 { -private: - int x; - friend class C3; -public: - static_assert(sizeof(x) == sizeof(int), "Error"); - typedef class C2::C2 InjType; -}; diff --git a/clang/test/ASTMerge/class2/test.cpp b/clang/test/ASTMerge/class2/test.cpp deleted file mode 100644 index 6021403d72291..0000000000000 --- a/clang/test/ASTMerge/class2/test.cpp +++ /dev/null @@ -1,9 +0,0 @@ -// RUN: %clang_cc1 -triple %itanium_abi_triple -std=c++1z -emit-pch -o %t.1.ast %S/Inputs/class3.cpp -// RUN: %clang_cc1 -triple %itanium_abi_triple -std=c++1z -ast-merge %t.1.ast -fsyntax-only -verify %s -// expected-no-diagnostics - -class C3 { - int method_1(C2 *x) { - return x->x; - } -}; diff --git a/clang/test/ASTMerge/codegen-body/Inputs/body1.c b/clang/test/ASTMerge/codegen-body/Inputs/body1.c deleted file mode 100644 index d4d1e4b93781f..0000000000000 --- a/clang/test/ASTMerge/codegen-body/Inputs/body1.c +++ /dev/null @@ -1,6 +0,0 @@ -int f(); - -int main() -{ - return f(); -} diff --git a/clang/test/ASTMerge/codegen-body/Inputs/body2.c b/clang/test/ASTMerge/codegen-body/Inputs/body2.c deleted file mode 100644 index 73cb1edf99175..0000000000000 --- a/clang/test/ASTMerge/codegen-body/Inputs/body2.c +++ /dev/null @@ -1,4 +0,0 @@ -__inline__ __attribute__ ((always_inline)) int f() -{ - return 2; -} diff --git a/clang/test/ASTMerge/codegen-body/test.c b/clang/test/ASTMerge/codegen-body/test.c deleted file mode 100644 index 7232bf4164b58..0000000000000 --- a/clang/test/ASTMerge/codegen-body/test.c +++ /dev/null @@ -1,5 +0,0 @@ -// RUN: %clang_cc1 -emit-pch -o %t.1.ast %S/Inputs/body1.c -// RUN: %clang_cc1 -emit-pch -o %t.2.ast %S/Inputs/body2.c -// RUN: %clang_cc1 -emit-obj -o /dev/null -ast-merge %t.1.ast -ast-merge %t.2.ast %s -// expected-no-diagnostics - diff --git a/clang/test/ASTMerge/codegen-exprs/Inputs/exprs1.c b/clang/test/ASTMerge/codegen-exprs/Inputs/exprs1.c deleted file mode 100644 index 1c268da15f3d3..0000000000000 --- a/clang/test/ASTMerge/codegen-exprs/Inputs/exprs1.c +++ /dev/null @@ -1,10 +0,0 @@ -// Matching -enum E0 { - E0_Val0 = 'a', - E0_Val1 = (17), - E0_Val2 = (1 << 2), - E0_Val3 = E0_Val2, - E0_Val4 = sizeof(int*), - E0_Val5 = (unsigned int)-1 -}; - diff --git a/clang/test/ASTMerge/codegen-exprs/Inputs/exprs2.c b/clang/test/ASTMerge/codegen-exprs/Inputs/exprs2.c deleted file mode 100644 index 1c268da15f3d3..0000000000000 --- a/clang/test/ASTMerge/codegen-exprs/Inputs/exprs2.c +++ /dev/null @@ -1,10 +0,0 @@ -// Matching -enum E0 { - E0_Val0 = 'a', - E0_Val1 = (17), - E0_Val2 = (1 << 2), - E0_Val3 = E0_Val2, - E0_Val4 = sizeof(int*), - E0_Val5 = (unsigned int)-1 -}; - diff --git a/clang/test/ASTMerge/codegen-exprs/test.c b/clang/test/ASTMerge/codegen-exprs/test.c deleted file mode 100644 index b5069f993be54..0000000000000 --- a/clang/test/ASTMerge/codegen-exprs/test.c +++ /dev/null @@ -1,5 +0,0 @@ -// RUN: %clang_cc1 -triple %itanium_abi_triple -emit-pch -o %t.1.ast %S/Inputs/exprs1.c -// RUN: %clang_cc1 -triple %itanium_abi_triple -emit-pch -o %t.2.ast %S/Inputs/exprs2.c -// RUN: %clang_cc1 -triple %itanium_abi_triple -emit-obj -o /dev/null -ast-merge %t.1.ast -ast-merge %t.2.ast -fsyntax-only -verify %s -// expected-no-diagnostics - diff --git a/clang/test/ASTMerge/enum/Inputs/enum1.c b/clang/test/ASTMerge/enum/Inputs/enum1.c deleted file mode 100644 index f2b9c5c98fdec..0000000000000 --- a/clang/test/ASTMerge/enum/Inputs/enum1.c +++ /dev/null @@ -1,42 +0,0 @@ -// Matching -enum E1 { - E1Enumerator1, - E1Enumerator2 = 3, - E1Enumerator3 -} x1; - -// Value mismatch -enum E2 { - E2Enumerator1, - E2Enumerator2 = 3, - E2Enumerator3 -} x2; - -// Name mismatch -enum E3 { - E3Enumerator1, - E3Enumerator2 = 3, - E3Enumerator3 -} x3; - -// Missing enumerator -enum E4 { - E4Enumerator1, - E4Enumerator2, - E4Enumerator3 -} x4; - -// Extra enumerator -enum E5 { - E5Enumerator1, - E5Enumerator2, - E5Enumerator3 -} x5; - -// Matching, with typedef -typedef enum { - E6Enumerator1, - E6Enumerator2 -} E6; - -E6 x6; diff --git a/clang/test/ASTMerge/enum/Inputs/enum2.c b/clang/test/ASTMerge/enum/Inputs/enum2.c deleted file mode 100644 index 315b4dcb6ef51..0000000000000 --- a/clang/test/ASTMerge/enum/Inputs/enum2.c +++ /dev/null @@ -1,42 +0,0 @@ -// Matching -enum E1 { - E1Enumerator1, - E1Enumerator2 = 3, - E1Enumerator3 -} x1; - -// Value mismatch -enum E2 { - E2Enumerator1, - E2Enumerator2 = 4, - E2Enumerator3 -} x2; - -// Name mismatch -enum E3 { - E3Enumerator1, - E3Enumerator = 3, - E3Enumerator3 -} x3; - -// Missing enumerator -enum E4 { - E4Enumerator1, - E4Enumerator2 -} x4; - -// Extra enumerator -enum E5 { - E5Enumerator1, - E5Enumerator2, - E5Enumerator3, - E5Enumerator4 -} x5; - -// Matching, with typedef -typedef enum { - E6Enumerator1, - E6Enumerator2 -} E6; - -E6 x6; diff --git a/clang/test/ASTMerge/enum/test.c b/clang/test/ASTMerge/enum/test.c deleted file mode 100644 index 7240bcced99eb..0000000000000 --- a/clang/test/ASTMerge/enum/test.c +++ /dev/null @@ -1,25 +0,0 @@ -// RUN: %clang_cc1 -emit-pch -o %t.1.ast %S/Inputs/enum1.c -// RUN: %clang_cc1 -emit-pch -o %t.2.ast %S/Inputs/enum2.c -// RUN: not %clang_cc1 -ast-merge %t.1.ast -ast-merge %t.2.ast -fsyntax-only %s 2>&1 | FileCheck %s - -// CHECK: enum1.c:9:6: warning: type 'enum E2' has incompatible definitions in different translation units -// CHECK: enum1.c:11:3: note: enumerator 'E2Enumerator2' with value 3 here -// CHECK: enum2.c:11:3: note: enumerator 'E2Enumerator2' with value 4 here -// CHECK: enum2.c:13:3: error: external variable 'x2' declared with incompatible types in different translation units ('enum E2' vs. 'enum E2') -// CHECK: enum1.c:13:3: note: declared here with type 'enum E2' -// CHECK: enum1.c:16:6: warning: type 'enum E3' has incompatible definitions in different translation units -// CHECK: enum1.c:18:3: note: enumerator 'E3Enumerator2' with value 3 here -// CHECK: enum2.c:18:3: note: enumerator 'E3Enumerator' with value 3 here -// CHECK: enum2.c:20:3: error: external variable 'x3' declared with incompatible types in different translation units ('enum E3' vs. 'enum E3') -// CHECK: enum1.c:20:3: note: declared here with type 'enum E3' -// CHECK: enum1.c:23:6: warning: type 'enum E4' has incompatible definitions in different translation units -// CHECK: enum1.c:26:3: note: enumerator 'E4Enumerator3' with value 2 here -// CHECK: enum2.c:23:6: note: no corresponding enumerator here -// CHECK: enum2.c:26:3: error: external variable 'x4' declared with incompatible types in different translation units ('enum E4' vs. 'enum E4') -// CHECK: enum1.c:27:3: note: declared here with type 'enum E4' -// CHECK: enum1.c:30:6: warning: type 'enum E5' has incompatible definitions in different translation units -// CHECK: enum2.c:33:3: note: enumerator 'E5Enumerator4' with value 3 here -// CHECK: enum1.c:30:6: note: no corresponding enumerator here -// CHECK: enum2.c:34:3: error: external variable 'x5' declared with incompatible types in different translation units ('enum E5' vs. 'enum E5') -// CHECK: enum1.c:34:3: note: declared here with type 'enum E5' -// CHECK: 4 warnings and 4 errors generated diff --git a/clang/test/ASTMerge/exprs-cpp/Inputs/exprs3.cpp b/clang/test/ASTMerge/exprs-cpp/Inputs/exprs3.cpp deleted file mode 100644 index 6fdc33fb3919f..0000000000000 --- a/clang/test/ASTMerge/exprs-cpp/Inputs/exprs3.cpp +++ /dev/null @@ -1,141 +0,0 @@ -// Integer literals -const char Ch1 = 'a'; -const signed char Ch2 = 'b'; -const unsigned char Ch3 = 'c'; - -const wchar_t Ch4 = L'd'; -const signed wchar_t Ch5 = L'e'; -const unsigned wchar_t Ch6 = L'f'; - -const short C1 = 12; -const unsigned short C2 = 13; - -const int C3 = 12; -const unsigned int C4 = 13; - -const long C5 = 22; -const unsigned long C6 = 23; - -const long long C7 = 66; -const unsigned long long C8 = 67; - - -// String literals -const char str1[] = "ABCD"; -const char str2[] = "ABCD" "0123"; - -const wchar_t wstr1[] = L"DEF"; -const wchar_t wstr2[] = L"DEF" L"123"; - - -// Boolean literals -const bool bval1 = true; -const bool bval2 = false; - -// Floating Literals -const float F1 = 12.2F; -const double F2 = 1E4; -const long double F3 = 1.2E-3L; - - -// nullptr literal -const void *vptr = nullptr; - - -int glb_1[4] = { 10, 20, 30, 40 }; - -struct S1 { - int a; - int b[3]; -}; - -struct S2 { - int c; - S1 d; -}; - -S2 glb_2 = { 22, .d.a = 44, .d.b[0] = 55, .d.b[1] = 66 }; - -void testNewThrowDelete() { - throw; - char *p = new char[10]; - delete[] p; -} - -int testArrayElement(int *x, int n) { - return x[n]; -} - -int testTernaryOp(int c, int x, int y) { - return c ? x : y; -} - -S1 &testConstCast(const S1 &x) { - return const_cast(x); -} - -S1 &testStaticCast(S1 &x) { - return static_cast(x); -} - -S1 &testReinterpretCast(S1 &x) { - return reinterpret_cast(x); -} - -S1 &testDynamicCast(S1 &x) { - return dynamic_cast(x); -} - -int testScalarInit(int x) { - return int(x); -} - -struct S { - float f; - double d; -}; -struct T { - int i; - struct S s[10]; -}; - -void testOffsetOf() { - __builtin_offsetof(struct T, s[2].d); -} - - -int testDefaultArg(int a = 2*2) { - return a; -} - -int testDefaultArgExpr() { - return testDefaultArg(); -} - -template // T has TemplateTypeParmType -void testTemplateTypeParmType(int i); - -void useTemplateType() { - testTemplateTypeParmType(4); -} - -const bool ExpressionTrait = __is_lvalue_expr(1); -const unsigned ArrayRank = __array_rank(int[10][20]); -const unsigned ArrayExtent = __array_extent(int[10][20], 1); - -constexpr int testLambdaAdd(int toAdd) { - const int Captured1 = 1, Captured2 = 2; - constexpr auto LambdaAdd = [Captured1, Captured2](int k) -> int { - return Captured1 + Captured2 + k; - }; - return LambdaAdd(toAdd); -} - -template -struct TestLambdaTemplate { - T i, j; - TestLambdaTemplate(T i, const T &j) : i(i), j(j) {} - T testLambda(T k) { - return [this](T k) -> decltype(auto) { return i + j + k; }(k); - } -}; diff --git a/clang/test/ASTMerge/exprs-cpp/test.cpp b/clang/test/ASTMerge/exprs-cpp/test.cpp deleted file mode 100644 index c0b282ec0288a..0000000000000 --- a/clang/test/ASTMerge/exprs-cpp/test.cpp +++ /dev/null @@ -1,50 +0,0 @@ -// RUN: %clang_cc1 -triple %itanium_abi_triple -std=c++1z -fcxx-exceptions -emit-pch -o %t.1.ast %S/Inputs/exprs3.cpp -// RUN: %clang_cc1 -triple %itanium_abi_triple -std=c++1z -fcxx-exceptions -ast-merge %t.1.ast -fsyntax-only -verify %s -// expected-no-diagnostics - -static_assert(Ch1 == 'a'); -static_assert(Ch2 == 'b'); -static_assert(Ch3 == 'c'); - -static_assert(Ch4 == L'd'); -static_assert(Ch5 == L'e'); -static_assert(Ch6 == L'f'); - -static_assert(C1 == 12); -static_assert(C2 == 13); - -static_assert(C3 == 12); -static_assert(C4 == 13); - -static_assert(C5 == 22L); -static_assert(C6 == 23L); - -static_assert(C7 == 66LL); -static_assert(C8 == 67ULL); - -static_assert(bval1 == true); -static_assert(bval2 == false); - -static_assert(ExpressionTrait == false); - -static_assert(ArrayRank == 2); -static_assert(ArrayExtent == 20); - -static_assert(testLambdaAdd(3) == 6); - -void testImport(int *x, const S1 &cs1, S1 &s1) { - testNewThrowDelete(); - testArrayElement(nullptr, 12); - testTernaryOp(0, 1, 2); - testConstCast(cs1); - testStaticCast(s1); - testReinterpretCast(s1); - testDynamicCast(s1); - testScalarInit(42); - testOffsetOf(); - testDefaultArg(12); - testDefaultArg(); - testDefaultArgExpr(); - useTemplateType(); - TestLambdaTemplate(1, 2).testLambda(3); -} diff --git a/clang/test/ASTMerge/exprs/Inputs/exprs1.c b/clang/test/ASTMerge/exprs/Inputs/exprs1.c deleted file mode 100644 index 1c268da15f3d3..0000000000000 --- a/clang/test/ASTMerge/exprs/Inputs/exprs1.c +++ /dev/null @@ -1,10 +0,0 @@ -// Matching -enum E0 { - E0_Val0 = 'a', - E0_Val1 = (17), - E0_Val2 = (1 << 2), - E0_Val3 = E0_Val2, - E0_Val4 = sizeof(int*), - E0_Val5 = (unsigned int)-1 -}; - diff --git a/clang/test/ASTMerge/exprs/Inputs/exprs2.c b/clang/test/ASTMerge/exprs/Inputs/exprs2.c deleted file mode 100644 index 1c268da15f3d3..0000000000000 --- a/clang/test/ASTMerge/exprs/Inputs/exprs2.c +++ /dev/null @@ -1,10 +0,0 @@ -// Matching -enum E0 { - E0_Val0 = 'a', - E0_Val1 = (17), - E0_Val2 = (1 << 2), - E0_Val3 = E0_Val2, - E0_Val4 = sizeof(int*), - E0_Val5 = (unsigned int)-1 -}; - diff --git a/clang/test/ASTMerge/exprs/test.c b/clang/test/ASTMerge/exprs/test.c deleted file mode 100644 index 7495bb6a874a9..0000000000000 --- a/clang/test/ASTMerge/exprs/test.c +++ /dev/null @@ -1,5 +0,0 @@ -// RUN: %clang_cc1 -triple %itanium_abi_triple -emit-pch -o %t.1.ast %S/Inputs/exprs1.c -// RUN: %clang_cc1 -triple %itanium_abi_triple -emit-pch -o %t.2.ast %S/Inputs/exprs2.c -// RUN: %clang_cc1 -triple %itanium_abi_triple -ast-merge %t.1.ast -ast-merge %t.2.ast -fsyntax-only -verify %s -// expected-no-diagnostics - diff --git a/clang/test/ASTMerge/function-cpp/Inputs/function-1.cpp b/clang/test/ASTMerge/function-cpp/Inputs/function-1.cpp deleted file mode 100644 index ee97a1a8a5da3..0000000000000 --- a/clang/test/ASTMerge/function-cpp/Inputs/function-1.cpp +++ /dev/null @@ -1,8 +0,0 @@ - -template constexpr T add(T arg1, T arg2) { - return arg1 + arg2; -} - -template<> constexpr int add(int arg1, int arg2) { - return arg1 + arg2 + 2; -} diff --git a/clang/test/ASTMerge/function-cpp/test.cpp b/clang/test/ASTMerge/function-cpp/test.cpp deleted file mode 100644 index 304ce3c634c2b..0000000000000 --- a/clang/test/ASTMerge/function-cpp/test.cpp +++ /dev/null @@ -1,10 +0,0 @@ -// RUN: %clang_cc1 -std=c++1z -emit-pch -o %t.1.ast %S/Inputs/function-1.cpp -// RUN: %clang_cc1 -std=c++1z -ast-merge %t.1.ast -fsyntax-only %s 2>&1 | FileCheck %s -// XFAIL: * - -static_assert(add(1, 2) == 5); - -// FIXME: support of templated function overload is still not implemented. -static_assert(add('\1', '\2') == 3); - -// CHECK-NOT: static_assert diff --git a/clang/test/ASTMerge/function/Inputs/function1.c b/clang/test/ASTMerge/function/Inputs/function1.c deleted file mode 100644 index 4523bd3d79bf7..0000000000000 --- a/clang/test/ASTMerge/function/Inputs/function1.c +++ /dev/null @@ -1,6 +0,0 @@ -void f0(int); -void f1(int, float); -void f2(); -void f3(void); -void f4(int, int); -int f5(int) __attribute__((const)); diff --git a/clang/test/ASTMerge/function/Inputs/function2.c b/clang/test/ASTMerge/function/Inputs/function2.c deleted file mode 100644 index 6ca810a6f20bc..0000000000000 --- a/clang/test/ASTMerge/function/Inputs/function2.c +++ /dev/null @@ -1,7 +0,0 @@ -typedef int Int; -void f0(Int); -void f1(Int, double); -void f2(int, int); -void f3(int); -static void f4(float, float); -int f5(int) __attribute__((const)); diff --git a/clang/test/ASTMerge/function/test.c b/clang/test/ASTMerge/function/test.c deleted file mode 100644 index 650f719d1fa8d..0000000000000 --- a/clang/test/ASTMerge/function/test.c +++ /dev/null @@ -1,15 +0,0 @@ -// RUN: %clang_cc1 -emit-pch -o %t.1.ast %S/Inputs/function1.c -// RUN: %clang_cc1 -emit-pch -o %t.2.ast %S/Inputs/function2.c -// RUN: not %clang_cc1 -ast-merge %t.1.ast -ast-merge %t.2.ast -fsyntax-only %s 2>&1 | FileCheck %s -// RUN: %clang_cc1 -ast-merge %t.1.ast -ast-merge %t.2.ast -fsyntax-only -verify %s - -// CHECK: function2.c:3:6: error: external function 'f1' declared with incompatible types in different translation units ('void (Int, double)' (aka 'void (int, double)') vs. 'void (int, float)') -// CHECK: function1.c:2:6: note: declared here with type 'void (int, float)' -// CHECK: function2.c:5:6: error: external function 'f3' declared with incompatible types in different translation units ('void (int)' vs. 'void (void)') -// CHECK: function1.c:4:6: note: declared here with type 'void (void)' -// CHECK: 2 errors generated - -// expected-error@Inputs/function2.c:3 {{external function 'f1' declared with incompatible types}} -// expected-note@Inputs/function1.c:2 {{declared here}} -// expected-error@Inputs/function2.c:5 {{external function 'f3' declared with incompatible types}} -// expected-note@Inputs/function1.c:4 {{declared here}} diff --git a/clang/test/ASTMerge/inheritance/Inputs/inheritance-base.cpp b/clang/test/ASTMerge/inheritance/Inputs/inheritance-base.cpp deleted file mode 100644 index 26fe42eb64da3..0000000000000 --- a/clang/test/ASTMerge/inheritance/Inputs/inheritance-base.cpp +++ /dev/null @@ -1,7 +0,0 @@ -class A -{ -public: - int x; - A(int _x) : x(_x) { - } -}; diff --git a/clang/test/ASTMerge/inheritance/test.cpp b/clang/test/ASTMerge/inheritance/test.cpp deleted file mode 100644 index 7fce82a736ab7..0000000000000 --- a/clang/test/ASTMerge/inheritance/test.cpp +++ /dev/null @@ -1,8 +0,0 @@ -// RUN: %clang_cc1 -triple %itanium_abi_triple -std=c++1z -emit-pch -o %t.1.ast %S/Inputs/inheritance-base.cpp -// RUN: %clang_cc1 -triple %itanium_abi_triple -std=c++1z -ast-merge %t.1.ast -fsyntax-only -verify %s -// expected-no-diagnostics - -class B : public A { - B(int _a) : A(_a) { - } -}; diff --git a/clang/test/ASTMerge/init-ctors/Inputs/init-ctors-classes.cpp b/clang/test/ASTMerge/init-ctors/Inputs/init-ctors-classes.cpp deleted file mode 100644 index fd51f860634b5..0000000000000 --- a/clang/test/ASTMerge/init-ctors/Inputs/init-ctors-classes.cpp +++ /dev/null @@ -1,19 +0,0 @@ -class A_base -{ -public: - int x; - A_base() : x(0) { - } - A_base(int _x) : x(static_cast(_x)) { - } -}; - -class A : public A_base -{ -public: - int y; - struct { int z; }; - int array[2]; - A(int _x) : A_base(_x), y(0), z(1), array{{2},{3}} { - } -}; diff --git a/clang/test/ASTMerge/init-ctors/test.cpp b/clang/test/ASTMerge/init-ctors/test.cpp deleted file mode 100644 index 5f0ba4decd9ff..0000000000000 --- a/clang/test/ASTMerge/init-ctors/test.cpp +++ /dev/null @@ -1,10 +0,0 @@ -// RUN: %clang_cc1 -triple %itanium_abi_triple -std=c++1z -emit-pch -o %t.1.ast %S/Inputs/init-ctors-classes.cpp -// RUN: %clang_cc1 -triple %itanium_abi_triple -std=c++1z -ast-merge %t.1.ast -fsyntax-only -verify %s -// expected-no-diagnostics - -class B { - int method_1() { - A a(0); - return a.x; - } -}; diff --git a/clang/test/ASTMerge/injected-class-name-decl/Inputs/inject1.cpp b/clang/test/ASTMerge/injected-class-name-decl/Inputs/inject1.cpp deleted file mode 100644 index f6f769746d10b..0000000000000 --- a/clang/test/ASTMerge/injected-class-name-decl/Inputs/inject1.cpp +++ /dev/null @@ -1,2 +0,0 @@ -template -class C { static X x; }; diff --git a/clang/test/ASTMerge/injected-class-name-decl/Inputs/inject2.cpp b/clang/test/ASTMerge/injected-class-name-decl/Inputs/inject2.cpp deleted file mode 100644 index 7cf5fc2232853..0000000000000 --- a/clang/test/ASTMerge/injected-class-name-decl/Inputs/inject2.cpp +++ /dev/null @@ -1,2 +0,0 @@ -template -X C::x; diff --git a/clang/test/ASTMerge/injected-class-name-decl/test.cpp b/clang/test/ASTMerge/injected-class-name-decl/test.cpp deleted file mode 100644 index 9f31674108adb..0000000000000 --- a/clang/test/ASTMerge/injected-class-name-decl/test.cpp +++ /dev/null @@ -1,3 +0,0 @@ -// RUN: %clang_cc1 -std=c++1z -emit-pch -o %t.ast %S/Inputs/inject1.cpp -// RUN: %clang_cc1 -std=c++1z -emit-obj -o /dev/null -ast-merge %t.ast %S/Inputs/inject2.cpp -// expected-no-diagnostics diff --git a/clang/test/ASTMerge/interface/Inputs/interface1.m b/clang/test/ASTMerge/interface/Inputs/interface1.m deleted file mode 100644 index 6192150089fe9..0000000000000 --- a/clang/test/ASTMerge/interface/Inputs/interface1.m +++ /dev/null @@ -1,105 +0,0 @@ -// Matches -@interface I1 { - int ivar1; -} -@end - -// Matches -@interface I2 : I1 { - float ivar2; -} -@end - -// Ivar mismatch -@interface I3 { - int ivar1; - int ivar2; -} -@end - -// Superclass mismatch -@interface I4 : I2 { -} -@end - -// Methods match -@interface I5 -- (int)foo; -+ (float)bar; -@end - -// Method mismatch -@interface I6 -- (int)foo; -+ (int)foo; -@end - -// Method mismatch -@interface I7 -- (int)foo; -+ (int)bar:(int)x; -@end - -// Method mismatch -@interface I8 -- (int)foo; -+ (int)bar:(float)x; -@end - -// Matching protocol -@protocol P0 -+ (int)foo; -- (int)bar:(float)x; -@end - -// Protocol with mismatching method -@protocol P1 -+ (int)foo; -- (int)bar:(float)x; -@end - -// Interface with protocol -@interface I9 -+ (int)foo; -- (int)bar:(float)x; -@end - -// Protocol with protocol -@protocol P2 -- (float)wibble:(int)a1 second:(int)a2; -@end - -// Forward-declared interfaces -@class I10, I11; -@interface I12 -@end - -// Forward-declared protocols -@protocol P3, P5; -@protocol P4 -- (double)honk:(int)a; -@end - -// Interface with implementation -@interface I13 -@end - -@implementation I13 -@end - -@interface I13a -@end - -@implementation I13a -@end - -// Implementation by itself -@implementation I14 : I12 -@end - -@implementation I15 : I12 -@end - -@interface ImportSelectorSLoc { } --(int)addInt:(int)a toInt:(int)b moduloInt:(int)c; // don't crash here -@end diff --git a/clang/test/ASTMerge/interface/Inputs/interface2.m b/clang/test/ASTMerge/interface/Inputs/interface2.m deleted file mode 100644 index 2133bd1381aa9..0000000000000 --- a/clang/test/ASTMerge/interface/Inputs/interface2.m +++ /dev/null @@ -1,100 +0,0 @@ -// Matches -@interface I1 { - int ivar1; -} -@end - -// Matches -@interface I2 : I1 { - float ivar2; -} -@end - -// Ivar mismatch -@interface I3 { - int ivar1; - float ivar2; -} -@end - -// Superclass mismatch -@interface I4 : I1 { -} -@end - -// Methods match -@interface I5 -+ (float)bar; -- (int)foo; -@end - -// Method mismatch -@interface I6 -+ (float)foo; -@end - -// Method mismatch -@interface I7 -- (int)foo; -+ (int)bar:(float)x; -@end - -// Method mismatch -@interface I8 -- (int)foo; -+ (int)bar:(float)x, ...; -@end - -// Matching protocol -@protocol P0 -+ (int)foo; -- (int)bar:(float)x; -@end - -// Protocol with mismatching method -@protocol P1 -+ (int)foo; -- (int)bar:(double)x; -@end - -// Interface with protocol -@interface I9 -+ (int)foo; -- (int)bar:(float)x; -@end - -// Protocol with protocol -@protocol P2 -- (float)wibble:(int)a1 second:(int)a2; -@end - -// Forward-declared interface -@class I10; @interface I12 @end -@interface I11 -@end - -// Forward-declared protocols -@protocol P3, P4; -@protocol P5 -- (double)honk:(int)a; -@end - -// Interface with implementation -@interface I13 -@end - -@implementation I13 -@end - -@interface I13b -@end - -@implementation I13b -@end - -// Implementation by itself -@implementation I14 : I12 -@end - -@implementation I15 : I11 -@end diff --git a/clang/test/ASTMerge/interface/test.m b/clang/test/ASTMerge/interface/test.m deleted file mode 100644 index 8ba5d73753a38..0000000000000 --- a/clang/test/ASTMerge/interface/test.m +++ /dev/null @@ -1,22 +0,0 @@ -// RUN: %clang_cc1 -emit-pch -o %t.1.ast %S/Inputs/interface1.m -// RUN: %clang_cc1 -emit-pch -o %t.2.ast %S/Inputs/interface2.m -// RUN: not %clang_cc1 -ast-merge %t.1.ast -ast-merge %t.2.ast -fsyntax-only %s 2>&1 | FileCheck %s - -// CHECK: interface2.m:16:9: error: instance variable 'ivar2' declared with incompatible types in different translation units ('float' vs. 'int') -// CHECK: interface1.m:16:7: note: declared here with type 'int' -// CHECK: interface1.m:21:12: error: class 'I4' has incompatible superclasses -// CHECK: interface1.m:21:17: note: inherits from superclass 'I2' here -// CHECK: interface2.m:21:17: note: inherits from superclass 'I1' here -// CHECK: interface2.m:33:1: error: class method 'foo' has incompatible result types in different translation units ('float' vs. 'int') -// CHECK: interface1.m:34:1: note: class method 'foo' also declared here -// CHECK: interface2.m:39:19: error: class method 'bar:' has a parameter with a different types in different translation units ('float' vs. 'int') -// CHECK: interface1.m:40:17: note: declared here with type 'int' -// CHECK: interface2.m:45:1: error: class method 'bar:' is variadic in one translation unit and not variadic in another -// CHECK: interface1.m:46:1: note: class method 'bar:' also declared here -// CHECK: interface2.m:57:20: error: instance method 'bar:' has a parameter with a different types in different translation units ('double' vs. 'float') -// CHECK: interface1.m:58:19: note: declared here with type 'float' -// CHECK: interface1.m:100:17: error: class 'I15' has incompatible superclasses -// CHECK: interface1.m:100:17: note: inherits from superclass 'I12' here -// CHECK: interface2.m:99:17: note: inherits from superclass 'I11' here -// CHECK: 8 errors generated - diff --git a/clang/test/ASTMerge/macro/Inputs/macro.modulemap b/clang/test/ASTMerge/macro/Inputs/macro.modulemap deleted file mode 100644 index dba1f2207f159..0000000000000 --- a/clang/test/ASTMerge/macro/Inputs/macro.modulemap +++ /dev/null @@ -1,4 +0,0 @@ -module macro1 [extern_c] { - header "macro1.h" - export * -} diff --git a/clang/test/ASTMerge/macro/Inputs/macro1.h b/clang/test/ASTMerge/macro/Inputs/macro1.h deleted file mode 100644 index 961339496787c..0000000000000 --- a/clang/test/ASTMerge/macro/Inputs/macro1.h +++ /dev/null @@ -1,5 +0,0 @@ -typedef void *VoidRef; - -void maybeNull( - int i, - _Nullable VoidRef *_Nullable); diff --git a/clang/test/ASTMerge/macro/Inputs/macro1.m b/clang/test/ASTMerge/macro/Inputs/macro1.m deleted file mode 100644 index 2612613bd0be5..0000000000000 --- a/clang/test/ASTMerge/macro/Inputs/macro1.m +++ /dev/null @@ -1,5 +0,0 @@ -@import macro1; - -void foo() { - maybeNull(0, 0); -} diff --git a/clang/test/ASTMerge/macro/Inputs/macro2.m b/clang/test/ASTMerge/macro/Inputs/macro2.m deleted file mode 100644 index b5b155a95b526..0000000000000 --- a/clang/test/ASTMerge/macro/Inputs/macro2.m +++ /dev/null @@ -1,5 +0,0 @@ -void foo(); - -void bar() { - foo(); -} diff --git a/clang/test/ASTMerge/macro/test.m b/clang/test/ASTMerge/macro/test.m deleted file mode 100644 index 77e596d3baeda..0000000000000 --- a/clang/test/ASTMerge/macro/test.m +++ /dev/null @@ -1,6 +0,0 @@ -// RUN: rm -rf %t -// RUN: mkdir -p %t/cache -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t/cache -fmodule-map-file=%S/Inputs/macro.modulemap -I%S/Inputs -emit-pch -o %t.1.ast %S/Inputs/macro1.m -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t/cache -fmodule-map-file=%S/Inputs/macro.modulemap -I%S/Inputs -emit-pch -o %t.2.ast %S/Inputs/macro2.m -// RUN: %clang_cc1 -fmodules -ast-merge %t.1.ast -ast-merge %t.2.ast -fsyntax-only -verify %s -// expected-no-diagnostics diff --git a/clang/test/ASTMerge/namespace/Inputs/namespace1.cpp b/clang/test/ASTMerge/namespace/Inputs/namespace1.cpp deleted file mode 100644 index 4a539523aaec2..0000000000000 --- a/clang/test/ASTMerge/namespace/Inputs/namespace1.cpp +++ /dev/null @@ -1,27 +0,0 @@ -// Merge success -namespace N1 { - int x; -} - -// Merge multiple namespaces -namespace N2 { - extern int x; -} -namespace N2 { - extern float y; -} - -// Merge namespace with conflict -namespace N3 { - extern float z; -} - -namespace AliasWithSameName = N3; - -namespace TestUnresolvedTypenameAndValueDecls { -template class Base { -public: - typedef T foo; - void bar(); -}; -} diff --git a/clang/test/ASTMerge/namespace/Inputs/namespace2.cpp b/clang/test/ASTMerge/namespace/Inputs/namespace2.cpp deleted file mode 100644 index f65057d1ca66c..0000000000000 --- a/clang/test/ASTMerge/namespace/Inputs/namespace2.cpp +++ /dev/null @@ -1,60 +0,0 @@ -// Merge success -namespace N1 { - extern int x0; -} - -// Merge multiple namespaces -namespace N2 { - extern int x; -} -namespace N2 { - extern float y; -} - -// Merge namespace with conflict -namespace N3 { - extern double z; -} - -namespace Enclosing { -namespace Nested { - const int z = 4; -} -} - -namespace ContainsInline { - inline namespace Inline { - const int z = 10; - } -} - -namespace TestAliasName = Enclosing::Nested; -// NOTE: There is no warning on this alias. -namespace AliasWithSameName = Enclosing::Nested; - -namespace TestUsingDecls { - -namespace A { -void foo(); -} -namespace B { -using A::foo; // <- a UsingDecl creating a UsingShadow -} - -}// end namespace TestUsingDecls - -namespace TestUnresolvedTypenameAndValueDecls { - -template class Base; -template class Derived : public Base { -public: - using typename Base::foo; - using Base::bar; - typedef typename Derived::foo NewUnresolvedUsingType; -}; - -} // end namespace TestUnresolvedTypenameAndValueDecls - -namespace TestUsingNamespace { - using namespace Enclosing; -} diff --git a/clang/test/ASTMerge/namespace/test.cpp b/clang/test/ASTMerge/namespace/test.cpp deleted file mode 100644 index ab05f6d72758c..0000000000000 --- a/clang/test/ASTMerge/namespace/test.cpp +++ /dev/null @@ -1,17 +0,0 @@ -// RUN: %clang_cc1 -emit-pch -std=c++1z -o %t.1.ast %S/Inputs/namespace1.cpp -// RUN: %clang_cc1 -emit-pch -std=c++1z -o %t.2.ast %S/Inputs/namespace2.cpp -// RUN: not %clang_cc1 -std=c++1z -ast-merge %t.1.ast -ast-merge %t.2.ast -fsyntax-only %s 2>&1 | FileCheck %s - -static_assert(TestAliasName::z == 4); -static_assert(ContainsInline::z == 10); - -void testImport() { - typedef TestUnresolvedTypenameAndValueDecls::Derived Imported; - Imported a; // Successful instantiation - static_assert(sizeof(Imported::foo) == sizeof(int)); - static_assert(sizeof(TestUnresolvedTypenameAndValueDecls::Derived::NewUnresolvedUsingType) == sizeof(double)); -} - - -// CHECK: namespace2.cpp:16:17: error: external variable 'z' declared with incompatible types in different translation units ('double' vs. 'float') -// CHECK: namespace1.cpp:16:16: note: declared here with type 'float' diff --git a/clang/test/ASTMerge/property/Inputs/property1.m b/clang/test/ASTMerge/property/Inputs/property1.m deleted file mode 100644 index 22fe0a02220cf..0000000000000 --- a/clang/test/ASTMerge/property/Inputs/property1.m +++ /dev/null @@ -1,31 +0,0 @@ -// Matching properties -@interface I1 { -} -- (int)getProp2; -- (void)setProp2:(int)value; -@end - -// Mismatched property -@interface I2 -@property (readonly) float Prop1; -@end - -// Properties with implementations -@interface I3 { - int ivar1; - int ivar2; - int ivar3; - int Prop4; -} -@property int Prop1; -@property int Prop2; -@property int Prop3; -@property int Prop4; -@end - -@implementation I3 -@synthesize Prop1 = ivar1; -@synthesize Prop2 = ivar3; -@dynamic Prop3; -@synthesize Prop4; -@end diff --git a/clang/test/ASTMerge/property/Inputs/property2.m b/clang/test/ASTMerge/property/Inputs/property2.m deleted file mode 100644 index 64a03fb04ec37..0000000000000 --- a/clang/test/ASTMerge/property/Inputs/property2.m +++ /dev/null @@ -1,33 +0,0 @@ -// Matching properties -@interface I1 { -} -- (int)getProp2; -- (void)setProp2:(int)value; -@property (readonly) int Prop1; -@property (getter = getProp2, setter = setProp2:) int Prop2; -@end - -// Mismatched property -@interface I2 -@property (readonly) int Prop1; -@end - -// Properties with implementations -@interface I3 { - int ivar1; - int ivar2; - int ivar3; - int Prop4; -} -@property int Prop1; -@property int Prop2; -@property int Prop3; -@property int Prop4; -@end - -@implementation I3 -@synthesize Prop2 = ivar2; -@synthesize Prop1 = ivar1; -@synthesize Prop3 = ivar3; -@synthesize Prop4 = Prop4; -@end diff --git a/clang/test/ASTMerge/property/test.m b/clang/test/ASTMerge/property/test.m deleted file mode 100644 index 4948023476963..0000000000000 --- a/clang/test/ASTMerge/property/test.m +++ /dev/null @@ -1,13 +0,0 @@ -// RUN: %clang_cc1 -emit-pch -o %t.1.ast %S/Inputs/property1.m -// RUN: %clang_cc1 -emit-pch -o %t.2.ast %S/Inputs/property2.m -// RUN: not %clang_cc1 -ast-merge %t.1.ast -ast-merge %t.2.ast -fsyntax-only %s 2>&1 | FileCheck %s - -// CHECK: property2.m:12:26: error: property 'Prop1' declared with incompatible types in different translation units ('int' vs. 'float') -// CHECK: property1.m:10:28: note: declared here with type 'float' -// CHECK: property2.m:12:26: error: instance method 'Prop1' has incompatible result types in different translation units ('int' vs. 'float') -// CHECK: property1.m:10:28: note: instance method 'Prop1' also declared here -// CHECK: property1.m:28:21: error: property 'Prop2' is synthesized to different ivars in different translation units ('ivar3' vs. 'ivar2') -// CHECK: property2.m:29:21: note: property is synthesized to ivar 'ivar2' here -// CHECK: property1.m:29:10: error: property 'Prop3' is implemented with @dynamic in one translation but @synthesize in another translation unit -// CHECK: property2.m:31:13: note: property 'Prop3' is implemented with @synthesize here -// CHECK: 4 errors generated. diff --git a/clang/test/ASTMerge/std-initializer-list/Inputs/il.cpp b/clang/test/ASTMerge/std-initializer-list/Inputs/il.cpp deleted file mode 100644 index 3b2ac187c8864..0000000000000 --- a/clang/test/ASTMerge/std-initializer-list/Inputs/il.cpp +++ /dev/null @@ -1,9 +0,0 @@ -namespace std { -template -struct initializer_list { - const T *begin, *end; - initializer_list(); -}; -} // namespace std - -std::initializer_list IL = {1, 2, 3, 4}; diff --git a/clang/test/ASTMerge/std-initializer-list/test.cpp b/clang/test/ASTMerge/std-initializer-list/test.cpp deleted file mode 100644 index ca7330d308a8d..0000000000000 --- a/clang/test/ASTMerge/std-initializer-list/test.cpp +++ /dev/null @@ -1,3 +0,0 @@ -// RUN: %clang_cc1 -emit-pch -o %t.1.ast %S/Inputs/il.cpp -// RUN: %clang_cc1 -ast-merge %t.1.ast -fsyntax-only %s 2>&1 | FileCheck --allow-empty %s -// CHECK-NOT: unsupported AST node diff --git a/clang/test/ASTMerge/struct/Inputs/struct1.c b/clang/test/ASTMerge/struct/Inputs/struct1.c deleted file mode 100644 index a85aec70a84ce..0000000000000 --- a/clang/test/ASTMerge/struct/Inputs/struct1.c +++ /dev/null @@ -1,141 +0,0 @@ -typedef int Int; -typedef float Float; - -// Matches -struct S0 { - Int field1; - Float field2; -}; - -struct S0 x0; - -// Mismatch in field type -struct S1 { - Int field1; - int field2; -}; - -struct S1 x1; - -// Mismatch in tag kind. -struct S2 { int i; float f; } x2; - -// Missing fields -struct S3 { int i; float f; double d; } x3; - -// Extra fields -struct S4 { int i; } x4; - -// Bit-field matches -struct S5 { int i : 8; unsigned j : 8; } x5; - -// Bit-field mismatch -struct S6 { int i : 8; unsigned j : 8; } x6; - -// Bit-field mismatch -struct S7 { int i : 8; unsigned j : 8; } x7; - -// Incomplete type -struct S8 *x8; - -// Incomplete type -struct S9 { int i; float f; } *x9; - -// Incomplete type -struct S10 *x10; - -// Matches -struct ListNode { - int value; - struct ListNode *Next; -} xList; - -// Mismatch due to struct used internally -struct DeepError { - int value; - struct DeeperError { int i; int f; } *Deeper; -} xDeep; - -// Matches -struct { - Int i; - float f; -} x11; - -// Matches -typedef struct { - Int i; - float f; -} S12; - -S12 x12; - -// Mismatch -typedef struct { - Float i; // Mismatch here. - float f; -} S13; - -S13 x13; - -// Matches -struct Unnamed { - union { - struct { - int i; - } S; - struct { - float i; - } R; - } U; -} x14; - -// Matches -struct DeepUnnamed { - union { - union { - struct { - long i; - } S; - struct { - int i; - } R; - } U1; - union { - struct { - long i; - } S; - struct { - float i; - } T; - } U2; - } U; - struct { - long i; - } V; -} x15; - -// Mismatch due to unnamed struct used internally -struct DeepUnnamedError { - union { - union { - struct { - long i; - } S; - struct { - int i; - } R; - } U1; - union { - struct { - long i; // Mismatch here. - } S; - struct { - float i; - } T; - } U2; - } U; - struct { - long i; - } V; -} x16; diff --git a/clang/test/ASTMerge/struct/Inputs/struct2.c b/clang/test/ASTMerge/struct/Inputs/struct2.c deleted file mode 100644 index 49fe36d823d0c..0000000000000 --- a/clang/test/ASTMerge/struct/Inputs/struct2.c +++ /dev/null @@ -1,138 +0,0 @@ -// Matches -struct S0 { - int field1; - float field2; -}; - -struct S0 x0; - -// Mismatch in field type -struct S1 { - int field1; - float field2; -}; - -struct S1 x1; - -// Mismatch in tag kind. -union S2 { int i; float f; } x2; - -// Missing fields -struct S3 { int i; float f; } x3; - -// Extra fields -struct S4 { int i; float f; } x4; - -// Bit-field matches -struct S5 { int i : 8; unsigned j : 8; } x5; - -// Bit-field mismatch -struct S6 { int i : 8; unsigned j; } x6; - -// Bit-field mismatch -struct S7 { int i : 8; unsigned j : 16; } x7; - -// Incomplete type -struct S8 { int i; float f; } *x8; - -// Incomplete type -struct S9 *x9; - -// Incomplete type -struct S10 *x10; - -// Matches -struct ListNode { - int value; - struct ListNode *Next; -} xList; - -// Mismatch due to struct used internally -struct DeepError { - int value; - struct DeeperError { int i; float f; } *Deeper; -} xDeep; - -// Matches -struct { - int i; - float f; -} x11; - -// Matches -typedef struct { - int i; - float f; -} S12; - -S12 x12; - -// Mismatch -typedef struct { - int i; // Mismatch here. - float f; -} S13; - -S13 x13; - -// Matches -struct Unnamed { - union { - struct { - int i; - } S; - struct { - float i; - } R; - } U; -} x14; - -// Matches -struct DeepUnnamed { - union { - union { - struct { - long i; - } S; - struct { - int i; - } R; - } U1; - union { - struct { - long i; - } S; - struct { - float i; - } T; - } U2; - } U; - struct { - long i; - } V; -} x15; - -// Mismatch due to unnamed struct used internally -struct DeepUnnamedError { - union { - union { - struct { - long i; - } S; - struct { - int i; - } R; - } U1; - union { - struct { - float i; // Mismatch here. - } S; - struct { - float i; - } T; - } U2; - } U; - struct { - long i; - } V; -} x16; diff --git a/clang/test/ASTMerge/struct/test.c b/clang/test/ASTMerge/struct/test.c deleted file mode 100644 index ef339396971d8..0000000000000 --- a/clang/test/ASTMerge/struct/test.c +++ /dev/null @@ -1,55 +0,0 @@ -// RUN: %clang_cc1 -emit-pch -o %t.1.ast %S/Inputs/struct1.c -// RUN: %clang_cc1 -emit-pch -o %t.2.ast %S/Inputs/struct2.c -// RUN: not %clang_cc1 -ast-merge %t.1.ast -ast-merge %t.2.ast -fsyntax-only %s 2>&1 | FileCheck %s - -// CHECK: struct1.c:13:8: warning: type 'struct S1' has incompatible definitions in different translation units -// CHECK: struct1.c:15:7: note: field 'field2' has type 'int' here -// CHECK: struct2.c:12:9: note: field 'field2' has type 'float' here -// CHECK: struct2.c:15:11: error: external variable 'x1' declared with incompatible types in different translation units ('struct S1' vs. 'struct S1') -// CHECK: struct1.c:18:11: note: declared here with type 'struct S1' -// CHECK: struct1.c:21:8: warning: type 'struct S2' has incompatible definitions in different translation units -// CHECK: struct2.c:18:7: note: 'S2' is a union here -// CHECK: struct2.c:18:30: error: external variable 'x2' declared with incompatible types in different translation units ('union S2' vs. 'struct S2') -// CHECK: struct1.c:21:31: note: declared here with type 'struct S2' -// CHECK: struct1.c:24:8: warning: type 'struct S3' has incompatible definitions in different translation units -// CHECK: struct1.c:24:36: note: field 'd' has type 'double' here -// CHECK: struct2.c:21:8: note: no corresponding field here -// CHECK: struct2.c:21:31: error: external variable 'x3' declared with incompatible types in different translation units ('struct S3' vs. 'struct S3') -// CHECK: struct1.c:24:41: note: declared here with type 'struct S3' -// CHECK: struct1.c:27:8: warning: type 'struct S4' has incompatible definitions in different translation units -// CHECK: struct2.c:24:26: note: field 'f' has type 'float' here -// CHECK: struct1.c:27:8: note: no corresponding field here -// CHECK: struct2.c:24:31: error: external variable 'x4' declared with incompatible types in different translation units ('struct S4' vs. 'struct S4') -// CHECK: struct1.c:27:22: note: declared here with type 'struct S4' -// CHECK: struct1.c:33:8: warning: type 'struct S6' has incompatible definitions in different translation units -// CHECK: struct1.c:33:33: note: bit-field 'j' with type 'unsigned int' and length 8 here -// CHECK: struct2.c:30:33: note: field 'j' is not a bit-field -// CHECK: struct2.c:30:38: error: external variable 'x6' declared with incompatible types in different translation units ('struct S6' vs. 'struct S6') -// CHECK: struct1.c:33:42: note: declared here with type 'struct S6' -// CHECK: struct1.c:36:8: warning: type 'struct S7' has incompatible definitions in different translation units -// CHECK: struct1.c:36:33: note: bit-field 'j' with type 'unsigned int' and length 8 here -// CHECK: struct2.c:33:33: note: bit-field 'j' with type 'unsigned int' and length 16 here -// CHECK: struct2.c:33:43: error: external variable 'x7' declared with incompatible types in different translation units ('struct S7' vs. 'struct S7') -// CHECK: struct1.c:36:42: note: declared here with type 'struct S7' -// CHECK: struct1.c:56:10: warning: type 'struct DeeperError' has incompatible definitions in different translation units -// CHECK: struct1.c:56:35: note: field 'f' has type 'int' here -// CHECK: struct2.c:53:37: note: field 'f' has type 'float' here -// CHECK: struct1.c:54:8: warning: type 'struct DeepError' has incompatible definitions in different translation units -// CHECK: struct1.c:56:41: note: field 'Deeper' has type 'struct DeeperError *' here -// CHECK: struct2.c:53:43: note: field 'Deeper' has type 'struct DeeperError *' here -// CHECK: struct2.c:54:3: error: external variable 'xDeep' declared with incompatible types in different translation units ('struct DeepError' vs. 'struct DeepError') -// CHECK: struct1.c:57:3: note: declared here with type 'struct DeepError' -// CHECK: struct1.c:74:9: warning: type 'S13' has incompatible definitions in different translation units -// CHECK: struct1.c:75:9: note: field 'i' has type 'Float' (aka 'float') here -// CHECK: struct2.c:72:7: note: field 'i' has type 'int' here -// CHECK: struct2.c:76:5: error: external variable 'x13' declared with incompatible types in different translation units ('S13' vs. 'S13') -// CHECK: struct1.c:79:5: note: declared here with type 'S13' -// CHECK: struct1.c:130:7: warning: type 'struct DeepUnnamedError::(anonymous at [[PATH_TO_INPUTS:.+]]struct1.c:130:7)' has incompatible definitions in different translation units -// CHECK: struct1.c:131:14: note: field 'i' has type 'long' here -// CHECK: struct2.c:128:15: note: field 'i' has type 'float' here -// CHECK: struct1.c:129:5: warning: type 'union DeepUnnamedError::(anonymous at [[PATH_TO_INPUTS]]struct1.c:129:5)' has incompatible definitions in different translation units -// CHECK: struct1.c:132:9: note: field 'S' has type 'struct (anonymous struct at [[PATH_TO_INPUTS]]struct1.c:130:7)' here -// CHECK: struct2.c:129:9: note: field 'S' has type 'struct (anonymous struct at [[PATH_TO_INPUTS]]struct2.c:127:7)' here -// CHECK: struct2.c:138:3: error: external variable 'x16' declared with incompatible types in different translation units ('struct DeepUnnamedError' vs. 'struct DeepUnnamedError') -// CHECK: struct1.c:141:3: note: declared here with type 'struct DeepUnnamedError' -// CHECK: 11 warnings and 9 errors generated diff --git a/clang/test/ASTMerge/typedef/Inputs/typedef1.c b/clang/test/ASTMerge/typedef/Inputs/typedef1.c deleted file mode 100644 index 56576756856df..0000000000000 --- a/clang/test/ASTMerge/typedef/Inputs/typedef1.c +++ /dev/null @@ -1,4 +0,0 @@ -typedef int Typedef1; -typedef int Typedef2; -Typedef1 x1; -Typedef2 x2; diff --git a/clang/test/ASTMerge/typedef/Inputs/typedef2.c b/clang/test/ASTMerge/typedef/Inputs/typedef2.c deleted file mode 100644 index 129d7101e91e6..0000000000000 --- a/clang/test/ASTMerge/typedef/Inputs/typedef2.c +++ /dev/null @@ -1,4 +0,0 @@ -typedef int Typedef1; -typedef double Typedef2; -Typedef1 x1; -Typedef2 x2; diff --git a/clang/test/ASTMerge/typedef/test.c b/clang/test/ASTMerge/typedef/test.c deleted file mode 100644 index 79e4723118744..0000000000000 --- a/clang/test/ASTMerge/typedef/test.c +++ /dev/null @@ -1,7 +0,0 @@ -// RUN: %clang_cc1 -emit-pch -o %t.1.ast %S/Inputs/typedef1.c -// RUN: %clang_cc1 -emit-pch -o %t.2.ast %S/Inputs/typedef2.c -// RUN: not %clang_cc1 -ast-merge %t.1.ast -ast-merge %t.2.ast -fsyntax-only %s 2>&1 | FileCheck %s - -// CHECK: typedef2.c:4:10: error: external variable 'x2' declared with incompatible types in different translation units ('Typedef2' (aka 'double') vs. 'Typedef2' (aka 'int')) -// CHECK: typedef1.c:4:10: note: declared here with type 'Typedef2' (aka 'int') -// CHECK: 1 error diff --git a/clang/test/ASTMerge/unnamed_fields/Inputs/il.cpp b/clang/test/ASTMerge/unnamed_fields/Inputs/il.cpp deleted file mode 100644 index 1bb0f358dcff6..0000000000000 --- a/clang/test/ASTMerge/unnamed_fields/Inputs/il.cpp +++ /dev/null @@ -1,3 +0,0 @@ -void f(int X, int Y, bool Z) { - auto x = [X, Y, Z] { (void)Z; }; -} diff --git a/clang/test/ASTMerge/unnamed_fields/test.cpp b/clang/test/ASTMerge/unnamed_fields/test.cpp deleted file mode 100644 index 6ae3176df4f39..0000000000000 --- a/clang/test/ASTMerge/unnamed_fields/test.cpp +++ /dev/null @@ -1,3 +0,0 @@ -// RUN: %clang_cc1 -emit-pch -o %t.1.ast %S/Inputs/il.cpp -// RUN: %clang_cc1 -ast-merge %t.1.ast -fsyntax-only %s 2>&1 | FileCheck --allow-empty %s -// CHECK-NOT: warning: field '' declared with incompatible types in different translation units ('bool' vs. 'int') diff --git a/clang/test/ASTMerge/var-cpp/Inputs/var1.cpp b/clang/test/ASTMerge/var-cpp/Inputs/var1.cpp deleted file mode 100644 index e29db9d43fbb8..0000000000000 --- a/clang/test/ASTMerge/var-cpp/Inputs/var1.cpp +++ /dev/null @@ -1,17 +0,0 @@ - -template -constexpr T my_pi = T(3.1415926535897932385L); // variable template - -template <> constexpr char my_pi = '3'; // variable template specialization - -template -struct Wrapper { - template static constexpr U my_const = U(1); - // Variable template partial specialization with member variable. - template static constexpr U *my_const = (U *)(0); -}; - -constexpr char a[] = "hello"; - -template <> template <> -constexpr const char *Wrapper::my_const = a; diff --git a/clang/test/ASTMerge/var-cpp/test.cpp b/clang/test/ASTMerge/var-cpp/test.cpp deleted file mode 100644 index 28d38d5812410..0000000000000 --- a/clang/test/ASTMerge/var-cpp/test.cpp +++ /dev/null @@ -1,9 +0,0 @@ -// RUN: %clang_cc1 -emit-pch -std=c++17 -o %t.1.ast %S/Inputs/var1.cpp -// RUN: %clang_cc1 -std=c++17 -ast-merge %t.1.ast -fsyntax-only %s 2>&1 - -static_assert(my_pi == (double)3.1415926535897932385L); -static_assert(my_pi == '3'); - -static_assert(Wrapper::my_const == 1.f); -static_assert(Wrapper::my_const == nullptr); -static_assert(Wrapper::my_const == a); diff --git a/clang/test/ASTMerge/var/Inputs/var1.c b/clang/test/ASTMerge/var/Inputs/var1.c deleted file mode 100644 index 4f5cbe16ab6cc..0000000000000 --- a/clang/test/ASTMerge/var/Inputs/var1.c +++ /dev/null @@ -1,7 +0,0 @@ -int *x0; -float **x1; -#include "var1.h" -int xarray0[17]; -int xarray1[]; -int xarray2[18]; -int xarray3[18]; diff --git a/clang/test/ASTMerge/var/Inputs/var1.h b/clang/test/ASTMerge/var/Inputs/var1.h deleted file mode 100644 index 1518e17ef0c88..0000000000000 --- a/clang/test/ASTMerge/var/Inputs/var1.h +++ /dev/null @@ -1 +0,0 @@ -double x2; diff --git a/clang/test/ASTMerge/var/Inputs/var2.c b/clang/test/ASTMerge/var/Inputs/var2.c deleted file mode 100644 index 01986e4208caa..0000000000000 --- a/clang/test/ASTMerge/var/Inputs/var2.c +++ /dev/null @@ -1,7 +0,0 @@ -int *x0; -double *x1; -int x2; -int xarray0[17]; -int xarray1[17]; -int xarray2[]; -int xarray3[17]; diff --git a/clang/test/ASTMerge/var/test.c b/clang/test/ASTMerge/var/test.c deleted file mode 100644 index e14dc37edac7d..0000000000000 --- a/clang/test/ASTMerge/var/test.c +++ /dev/null @@ -1,12 +0,0 @@ -// RUN: %clang_cc1 -emit-pch -o %t.1.ast %S/Inputs/var1.c -// RUN: %clang_cc1 -emit-pch -o %t.2.ast %S/Inputs/var2.c -// RUN: not %clang_cc1 -ast-merge %t.1.ast -ast-merge %t.2.ast -fsyntax-only -fdiagnostics-show-note-include-stack %s 2>&1 | FileCheck %s - -// CHECK: var2.c:2:9: error: external variable 'x1' declared with incompatible types in different translation units ('double *' vs. 'float **') -// CHECK: var1.c:2:9: note: declared here with type 'float **' -// CHECK: var2.c:3:5: error: external variable 'x2' declared with incompatible types in different translation units ('int' vs. 'double') -// CHECK: In file included from{{.*}}var1.c:3: -// CHECK: var1.h:1:8: note: declared here with type 'double' -// CHECK: error: external variable 'xarray3' declared with incompatible types in different translation units ('int [17]' vs. 'int [18]') -// CHECK: var1.c:7:5: note: declared here with type 'int [18]' -// CHECK: 3 errors diff --git a/clang/test/Analysis/PR40625.cpp b/clang/test/Analysis/PR40625.cpp new file mode 100644 index 0000000000000..ac23a71c1c6a8 --- /dev/null +++ b/clang/test/Analysis/PR40625.cpp @@ -0,0 +1,13 @@ +// RUN: %clang_analyze_cc1 -std=c++11 -analyzer-checker=core,alpha.core.CallAndMessageUnInitRefArg %s -verify + +void f(const int *end); + +void g(const int (&arrr)[10]) { + f(arrr); // expected-warning{{1st function call argument is a pointer to uninitialized value}} +} + +void h() { + int arr[10]; + + g(arr); +} diff --git a/clang/test/Analysis/bstring.c b/clang/test/Analysis/bstring.c index e8c3021f27be6..0fb807dc55adb 100644 --- a/clang/test/Analysis/bstring.c +++ b/clang/test/Analysis/bstring.c @@ -361,8 +361,7 @@ void memmove2 () { #ifdef VARIANT #define bcmp BUILTIN(bcmp) -// __builtin_bcmp is not defined with const in Builtins.def. -int bcmp(/*const*/ void *s1, /*const*/ void *s2, size_t n); +int bcmp(const void *s1, const void *s2, size_t n); #define memcmp bcmp // #else /* VARIANT */ diff --git a/clang/test/Analysis/compound-literals.c b/clang/test/Analysis/compound-literals.c index a2556d2a79501..f8b9121494c12 100644 --- a/clang/test/Analysis/compound-literals.c +++ b/clang/test/Analysis/compound-literals.c @@ -4,6 +4,5 @@ void clang_analyzer_eval(int); // pr28449: Used to crash. void foo(void) { static const unsigned short array[] = (const unsigned short[]){0x0F00}; - // FIXME: Should be true. - clang_analyzer_eval(array[0] == 0x0F00); // expected-warning{{UNKNOWN}} + clang_analyzer_eval(array[0] == 0x0F00); // expected-warning{{TRUE}} } diff --git a/clang/test/Analysis/cstring-syntax.c b/clang/test/Analysis/cstring-syntax.c index d2e12e8303b15..f01de36c1afb8 100644 --- a/clang/test/Analysis/cstring-syntax.c +++ b/clang/test/Analysis/cstring-syntax.c @@ -33,6 +33,7 @@ void testStrlcpy(const char *src) { strlcpy(dest, src, ulen); strlcpy(dest + 5, src, 5); strlcpy(dest + 5, src, 10); // expected-warning {{The third argument allows to potentially copy more bytes than it should. Replace with the value sizeof() or lower}} + strlcpy(dest, "aaaaaaaaaaaaaaa", 10); // no-warning } void testStrlcat(const char *src) { @@ -51,4 +52,5 @@ void testStrlcat(const char *src) { strlcat(dest, src, ulen); strlcpy(dest, src, 5); strlcat(dest + 5, src, badlen); // expected-warning {{The third argument allows to potentially copy more bytes than it should. Replace with the value sizeof() or lower}} + strlcat(dest, "aaaaaaaaaaaaaaa", 10); // no-warning } diff --git a/clang/test/Analysis/globals.cpp b/clang/test/Analysis/globals.cpp index 5bbb241bdcf37..d3df6eb6d27c0 100644 --- a/clang/test/Analysis/globals.cpp +++ b/clang/test/Analysis/globals.cpp @@ -109,3 +109,18 @@ void recordinit() S3 s3; *(s3.p - 1) = 0; // expected-warning{{Dereference of null pointer}} } + +extern int ext_int; + +void update_original_declaration() { + ext_int = 2; +} + +extern int ext_int; + +int test_redeclaration() { + ext_int = 1; + update_original_declaration(); + int int_int = 3 / (ext_int - 1); // no-warning + return int_int / (ext_int - 2); // expected-warning{{Division by zero}} +} diff --git a/clang/test/Analysis/malloc.c b/clang/test/Analysis/malloc.c index d4a44c576241b..cbc21b492e590 100644 --- a/clang/test/Analysis/malloc.c +++ b/clang/test/Analysis/malloc.c @@ -1794,6 +1794,24 @@ void testNoCrashOnOffendingParameter() { allocateSomeMemory(offendingParameter, &ptr); } // expected-warning {{Potential leak of memory pointed to by 'ptr'}} + +// Test a false positive caused by a bug in liveness analysis. +struct A { + int *buf; +}; +struct B { + struct A *a; +}; +void livenessBugRealloc(struct A *a) { + a->buf = realloc(a->buf, sizeof(int)); // no-warning +} +void testLivenessBug(struct B *in_b) { + struct B *b = in_b; + livenessBugRealloc(b->a); + ((void) 0); // An attempt to trick liveness analysis. + livenessBugRealloc(b->a); +} + // ---------------------------------------------------------------------------- // False negatives. diff --git a/clang/test/Analysis/mig.mm b/clang/test/Analysis/mig.mm new file mode 100644 index 0000000000000..59442d39e4a12 --- /dev/null +++ b/clang/test/Analysis/mig.mm @@ -0,0 +1,209 @@ +// RUN: %clang_analyze_cc1 -w -analyzer-checker=core,osx.MIG\ +// RUN: -analyzer-output=text -fblocks -verify %s + +typedef unsigned uint32_t; + +// XNU APIs. + +typedef int kern_return_t; +#define KERN_SUCCESS 0 +#define KERN_ERROR 1 +#define MIG_NO_REPLY (-305) + +typedef unsigned mach_port_name_t; +typedef unsigned vm_address_t; +typedef unsigned vm_size_t; +typedef void *ipc_space_t; +typedef unsigned long io_user_reference_t; + +kern_return_t vm_deallocate(mach_port_name_t, vm_address_t, vm_size_t); +kern_return_t mach_vm_deallocate(mach_port_name_t, vm_address_t, vm_size_t); +void mig_deallocate(vm_address_t, vm_size_t); +kern_return_t mach_port_deallocate(ipc_space_t, mach_port_name_t); + +#define MIG_SERVER_ROUTINE __attribute__((mig_server_routine)) + +// IOKit wrappers. + +class OSObject; +typedef kern_return_t IOReturn; +#define kIOReturnError 1 + +enum { + kOSAsyncRef64Count = 8, +}; + +typedef io_user_reference_t OSAsyncReference64[kOSAsyncRef64Count]; + +struct IOExternalMethodArguments { + io_user_reference_t *asyncReference; +}; + +struct IOExternalMethodDispatch {}; + +class IOUserClient { +public: + static IOReturn releaseAsyncReference64(OSAsyncReference64); + + MIG_SERVER_ROUTINE + virtual IOReturn externalMethod(uint32_t selector, IOExternalMethodArguments *arguments, + IOExternalMethodDispatch *dispatch = 0, OSObject *target = 0, void *reference = 0); +}; + + +// Tests. + +MIG_SERVER_ROUTINE +kern_return_t basic_test(mach_port_name_t port, vm_address_t address, vm_size_t size) { + vm_deallocate(port, address, size); // expected-note{{Value passed through parameter 'address' is deallocated}} + if (size > 10) { // expected-note{{Assuming 'size' is > 10}} + // expected-note@-1{{Taking true branch}} + return KERN_ERROR; // expected-warning{{MIG callback fails with error after deallocating argument value. This is a use-after-free vulnerability because the caller will try to deallocate it again}} + // expected-note@-1{{MIG callback fails with error after deallocating argument value. This is a use-after-free vulnerability because the caller will try to deallocate it again}} + } + return KERN_SUCCESS; +} + +MIG_SERVER_ROUTINE +kern_return_t test_unknown_return_value(mach_port_name_t port, vm_address_t address, vm_size_t size) { + extern kern_return_t foo(); + + vm_deallocate(port, address, size); + // We don't know if it's a success or a failure. + return foo(); // no-warning +} + +// Make sure we don't crash when they forgot to write the return statement. +MIG_SERVER_ROUTINE +kern_return_t no_crash(mach_port_name_t port, vm_address_t address, vm_size_t size) { + vm_deallocate(port, address, size); +} + +// When releasing two parameters, add a note for both of them. +// Also when returning a variable, explain why do we think that it contains +// a non-success code. +MIG_SERVER_ROUTINE +kern_return_t release_twice(mach_port_name_t port, vm_address_t addr1, vm_address_t addr2, vm_size_t size) { + kern_return_t ret = KERN_ERROR; // expected-note{{'ret' initialized to 1}} + vm_deallocate(port, addr1, size); // expected-note{{Value passed through parameter 'addr1' is deallocated}} + vm_deallocate(port, addr2, size); // expected-note{{Value passed through parameter 'addr2' is deallocated}} + return ret; // expected-warning{{MIG callback fails with error after deallocating argument value. This is a use-after-free vulnerability because the caller will try to deallocate it again}} + // expected-note@-1{{MIG callback fails with error after deallocating argument value. This is a use-after-free vulnerability because the caller will try to deallocate it again}} +} + +// Make sure we find the bug when the object is destroyed within an +// automatic destructor. +MIG_SERVER_ROUTINE +kern_return_t test_vm_deallocate_in_automatic_dtor(mach_port_name_t port, vm_address_t address, vm_size_t size) { + struct WillDeallocate { + mach_port_name_t port; + vm_address_t address; + vm_size_t size; + ~WillDeallocate() { + vm_deallocate(port, address, size); // expected-note{{Value passed through parameter 'address' is deallocated}} + } + } will_deallocate{port, address, size}; + + if (size > 10) { + // expected-note@-1{{Assuming 'size' is > 10}} + // expected-note@-2{{Taking true branch}} + return KERN_ERROR; + // expected-note@-1{{Calling '~WillDeallocate'}} + // expected-note@-2{{Returning from '~WillDeallocate'}} + // expected-warning@-3{{MIG callback fails with error after deallocating argument value. This is a use-after-free vulnerability because the caller will try to deallocate it again}} + // expected-note@-4 {{MIG callback fails with error after deallocating argument value. This is a use-after-free vulnerability because the caller will try to deallocate it again}} + } + return KERN_SUCCESS; +} + +// Check that we work on Objective-C messages and blocks. +@interface I +- (kern_return_t)fooAtPort:(mach_port_name_t)port withAddress:(vm_address_t)address ofSize:(vm_size_t)size; +@end + +@implementation I +- (kern_return_t)fooAtPort:(mach_port_name_t)port + withAddress:(vm_address_t)address + ofSize:(vm_size_t)size MIG_SERVER_ROUTINE { + vm_deallocate(port, address, size); // expected-note{{Value passed through parameter 'address' is deallocated}} + return KERN_ERROR; // expected-warning{{MIG callback fails with error after deallocating argument value. This is a use-after-free vulnerability because the caller will try to deallocate it again}} + // expected-note@-1{{MIG callback fails with error after deallocating argument value. This is a use-after-free vulnerability because the caller will try to deallocate it again}} +} +@end + +void test_block() { + kern_return_t (^block)(mach_port_name_t, vm_address_t, vm_size_t) = + ^MIG_SERVER_ROUTINE (mach_port_name_t port, + vm_address_t address, vm_size_t size) { + vm_deallocate(port, address, size); // expected-note{{Value passed through parameter 'address' is deallocated}} +   return KERN_ERROR; // expected-warning{{MIG callback fails with error after deallocating argument value. This is a use-after-free vulnerability because the caller will try to deallocate it again}} + // expected-note@-1{{MIG callback fails with error after deallocating argument value. This is a use-after-free vulnerability because the caller will try to deallocate it again}} + }; +} + +void test_block_with_weird_return_type() { + struct Empty {}; + + // The block is written within a function so that it was actually analyzed as + // a top-level function during analysis. If we were to write it as a global + // variable of block type instead, it would not have been analyzed, because + // ASTConsumer won't find the block's code body within the VarDecl. + // At the same time, we shouldn't call it from the function, because otherwise + // it will be analyzed as an inlined function rather than as a top-level + // function. + Empty (^block)(mach_port_name_t, vm_address_t, vm_size_t) = + ^MIG_SERVER_ROUTINE(mach_port_name_t port, + vm_address_t address, vm_size_t size) { + vm_deallocate(port, address, size); + return Empty{}; // no-crash + }; +} + +// Test various APIs. +MIG_SERVER_ROUTINE +kern_return_t test_mach_vm_deallocate(mach_port_name_t port, vm_address_t address, vm_size_t size) { + mach_vm_deallocate(port, address, size); // expected-note{{Value passed through parameter 'address' is deallocated}} + return KERN_ERROR; // expected-warning{{MIG callback fails with error after deallocating argument value}} + // expected-note@-1{{MIG callback fails with error after deallocating argument value}} +} + +MIG_SERVER_ROUTINE +kern_return_t test_mach_port_deallocate(ipc_space_t space, + mach_port_name_t port) { + mach_port_deallocate(space, port); // expected-note{{Value passed through parameter 'port' is deallocated}} + return KERN_ERROR; // expected-warning{{MIG callback fails with error after deallocating argument value}} + // expected-note@-1{{MIG callback fails with error after deallocating argument value}} +} + +MIG_SERVER_ROUTINE +kern_return_t test_mig_deallocate(vm_address_t address, vm_size_t size) { + mig_deallocate(address, size); // expected-note{{Value passed through parameter 'address' is deallocated}} + return KERN_ERROR; // expected-warning{{MIG callback fails with error after deallocating argument value}} + // expected-note@-1{{MIG callback fails with error after deallocating argument value}} +} + +// Let's try the C++11 attribute spelling syntax as well. +[[clang::mig_server_routine]] +IOReturn test_releaseAsyncReference64(IOExternalMethodArguments *arguments) { + IOUserClient::releaseAsyncReference64(arguments->asyncReference); // expected-note{{Value passed through parameter 'arguments' is deallocated}} + return kIOReturnError; // expected-warning{{MIG callback fails with error after deallocating argument value}} + // expected-note@-1{{MIG callback fails with error after deallocating argument value}} +} + +MIG_SERVER_ROUTINE +kern_return_t test_no_reply(ipc_space_t space, mach_port_name_t port) { + mach_port_deallocate(space, port); + return MIG_NO_REPLY; // no-warning +} + +class MyClient: public IOUserClient { + // The MIG_SERVER_ROUTINE annotation is intentionally skipped. + // It should be picked up from the superclass. + IOReturn externalMethod(uint32_t selector, IOExternalMethodArguments *arguments, + IOExternalMethodDispatch *dispatch = 0, OSObject *target = 0, void *reference = 0) override { + + releaseAsyncReference64(arguments->asyncReference); // expected-note{{Value passed through parameter 'arguments' is deallocated}} + return kIOReturnError; // expected-warning{{MIG callback fails with error after deallocating argument value}} + // expected-note@-1{{MIG callback fails with error after deallocating argument value}} + } +}; diff --git a/clang/test/Analysis/osobjectcstylecastchecker_test.cpp b/clang/test/Analysis/osobjectcstylecastchecker_test.cpp new file mode 100644 index 0000000000000..07f878cd39d55 --- /dev/null +++ b/clang/test/Analysis/osobjectcstylecastchecker_test.cpp @@ -0,0 +1,39 @@ +// RUN: %clang_analyze_cc1 -analyzer-checker=optin.osx.OSObjectCStyleCast %s -verify +#include "os_object_base.h" + +struct OSArray : public OSObject { + unsigned getCount(); +}; + +struct A { + int x; +}; +struct B : public A { + unsigned getCount(); +}; + +unsigned warn_on_explicit_downcast(OSObject * obj) { + OSArray *a = (OSArray *) obj; // expected-warning{{C-style cast of OSObject. Use OSDynamicCast instead}} + return a->getCount(); +} + +void no_warn_on_upcast(OSArray *arr) { + OSObject *obj = (OSObject *) arr; + obj->retain(); + obj->release(); +} + +unsigned no_warn_on_dynamic_cast(OSObject *obj) { + OSArray *a = OSDynamicCast(OSArray, obj); + return a->getCount(); +} + +__SIZE_TYPE__ no_warn_on_primitive_conversion(OSArray *arr) { + return (__SIZE_TYPE__) arr; +} + +unsigned no_warn_on_other_type_cast(A *a) { + B *b = (B *) a; + return b->getCount(); +} + diff --git a/clang/test/Analysis/retain-release.mm b/clang/test/Analysis/retain-release.mm index 5dc8f857d87dd..97ea5607d2d28 100644 --- a/clang/test/Analysis/retain-release.mm +++ b/clang/test/Analysis/retain-release.mm @@ -471,7 +471,6 @@ void rdar33832412() { void* x = IOBSDNameMatching(); // no-warning } - namespace member_CFRetains { class Foo { public: @@ -485,3 +484,22 @@ void bar() { foo.CFRetain(0); // no-warning } } + +namespace cxx_method_escaping { + +struct S { + static CFArrayRef testGetNoTracking(); + CFArrayRef testGetNoTrackingMember(); +}; + +void test_cxx_static_method_escaping() { + CFArrayRef arr = S::testGetNoTracking(); + CFRelease(arr); +} + +void test_cxx_method_escaping(S *s) { + CFArrayRef arr = s->testGetNoTrackingMember(); + CFRelease(arr); +} + +} diff --git a/clang/test/Analysis/security-syntax-checks.m b/clang/test/Analysis/security-syntax-checks.m index 1fd00dffe4f87..a3efd53d4b67c 100644 --- a/clang/test/Analysis/security-syntax-checks.m +++ b/clang/test/Analysis/security-syntax-checks.m @@ -13,6 +13,9 @@ # define BUILTIN(f) f #endif /* USE_BUILTINS */ +#include "Inputs/system-header-simulator-for-valist.h" +#include "Inputs/system-header-simulator-for-simple-stream.h" + typedef typeof(sizeof(int)) size_t; @@ -38,7 +41,7 @@ void test_float_condition() { } // Obsolete function bcmp -int bcmp(void *, void *, size_t); +int bcmp(const void *, const void *, size_t); int test_bcmp(void *a, void *b, size_t n) { return bcmp(a, b, n); // expected-warning{{The bcmp() function is obsoleted by memcmp()}} @@ -238,3 +241,82 @@ void test_mkstemp() { mkdtemp("XXXXXX"); } + +//===----------------------------------------------------------------------=== +// deprecated or unsafe buffer handling +//===----------------------------------------------------------------------=== +typedef int wchar_t; + +int sprintf(char *str, const char *format, ...); +//int vsprintf (char *s, const char *format, va_list arg); +int scanf(const char *format, ...); +int wscanf(const wchar_t *format, ...); +int fscanf(FILE *stream, const char *format, ...); +int fwscanf(FILE *stream, const wchar_t *format, ...); +int vscanf(const char *format, va_list arg); +int vwscanf(const wchar_t *format, va_list arg); +int vfscanf(FILE *stream, const char *format, va_list arg); +int vfwscanf(FILE *stream, const wchar_t *format, va_list arg); +int sscanf(const char *s, const char *format, ...); +int swscanf(const wchar_t *ws, const wchar_t *format, ...); +int vsscanf(const char *s, const char *format, va_list arg); +int vswscanf(const wchar_t *ws, const wchar_t *format, va_list arg); +int swprintf(wchar_t *ws, size_t len, const wchar_t *format, ...); +int snprintf(char *s, size_t n, const char *format, ...); +int vswprintf(wchar_t *ws, size_t len, const wchar_t *format, va_list arg); +int vsnprintf(char *s, size_t n, const char *format, va_list arg); +void *memcpy(void *destination, const void *source, size_t num); +void *memmove(void *destination, const void *source, size_t num); +char *strncpy(char *destination, const char *source, size_t num); +char *strncat(char *destination, const char *source, size_t num); +void *memset(void *ptr, int value, size_t num); + +void test_deprecated_or_unsafe_buffer_handling_1() { + char buf [5]; + wchar_t wbuf [5]; + int a; + FILE *file; + sprintf(buf, "a"); // expected-warning{{Call to function 'sprintf' is insecure}} + scanf("%d", &a); // expected-warning{{Call to function 'scanf' is insecure}} + scanf("%s", buf); // expected-warning{{Call to function 'scanf' is insecure}} + scanf("%4s", buf); // expected-warning{{Call to function 'scanf' is insecure}} + wscanf((const wchar_t*) L"%s", buf); // expected-warning{{Call to function 'wscanf' is insecure}} + fscanf(file, "%d", &a); // expected-warning{{Call to function 'fscanf' is insecure}} + fscanf(file, "%s", buf); // expected-warning{{Call to function 'fscanf' is insecure}} + fscanf(file, "%4s", buf); // expected-warning{{Call to function 'fscanf' is insecure}} + fwscanf(file, (const wchar_t*) L"%s", wbuf); // expected-warning{{Call to function 'fwscanf' is insecure}} + sscanf("5", "%d", &a); // expected-warning{{Call to function 'sscanf' is insecure}} + sscanf("5", "%s", buf); // expected-warning{{Call to function 'sscanf' is insecure}} + sscanf("5", "%4s", buf); // expected-warning{{Call to function 'sscanf' is insecure}} + swscanf(L"5", (const wchar_t*) L"%s", wbuf); // expected-warning{{Call to function 'swscanf' is insecure}} + swprintf(L"5", 1, (const wchar_t*) L"%s", wbuf); // expected-warning{{Call to function 'swprintf' is insecure}} + snprintf("5", 1, "%s", buf); // expected-warning{{Call to function 'snprintf' is insecure}} + memcpy(buf, wbuf, 1); // expected-warning{{Call to function 'memcpy' is insecure}} + memmove(buf, wbuf, 1); // expected-warning{{Call to function 'memmove' is insecure}} + strncpy(buf, "a", 1); // expected-warning{{Call to function 'strncpy' is insecure}} + strncat(buf, "a", 1); // expected-warning{{Call to function 'strncat' is insecure}} + memset(buf, 'a', 1); // expected-warning{{Call to function 'memset' is insecure}} +} + +void test_deprecated_or_unsafe_buffer_handling_2(const char *format, ...) { + char buf [5]; + FILE *file; + va_list args; + va_start(args, format); + vsprintf(buf, format, args); // expected-warning{{Call to function 'vsprintf' is insecure}} + vscanf(format, args); // expected-warning{{Call to function 'vscanf' is insecure}} + vfscanf(file, format, args); // expected-warning{{Call to function 'vfscanf' is insecure}} + vsscanf("a", format, args); // expected-warning{{Call to function 'vsscanf' is insecure}} + vsnprintf("a", 1, format, args); // expected-warning{{Call to function 'vsnprintf' is insecure}} +} + +void test_deprecated_or_unsafe_buffer_handling_3(const wchar_t *format, ...) { + wchar_t wbuf [5]; + FILE *file; + va_list args; + va_start(args, format); + vwscanf(format, args); // expected-warning{{Call to function 'vwscanf' is insecure}} + vfwscanf(file, format, args); // expected-warning{{Call to function 'vfwscanf' is insecure}} + vswscanf(L"a", format, args); // expected-warning{{Call to function 'vswscanf' is insecure}} + vswprintf(L"a", 1, format, args); // expected-warning{{Call to function 'vswprintf' is insecure}} +} diff --git a/clang/test/Analysis/symbol-reaper.c b/clang/test/Analysis/symbol-reaper.c index ef8ff18a2d831..62bb5d6c6b343 100644 --- a/clang/test/Analysis/symbol-reaper.c +++ b/clang/test/Analysis/symbol-reaper.c @@ -133,3 +133,28 @@ void test_zombie_referenced_only_through_field_in_store_value() { clang_analyzer_warnOnDeadSymbol((int) s); int *x = &s->field; } // expected-warning{{SYMBOL DEAD}} + +void double_dereference_of_implicit_value_aux1(int *p) { + *p = 0; +} + +void double_dereference_of_implicit_value_aux2(int *p) { + if (*p != 0) + clang_analyzer_warnIfReached(); // no-warning +} + +void test_double_dereference_of_implicit_value(int **x) { + clang_analyzer_warnOnDeadSymbol(**x); + int **y = x; + { + double_dereference_of_implicit_value_aux1(*y); + // Give time for symbol reaping to happen. + ((void)0); + // The symbol for **y was cleaned up from the Store at this point, + // even though it was not perceived as dead when asked explicitly. + // For that reason the SYMBOL DEAD warning never appeared at this point. + double_dereference_of_implicit_value_aux2(*y); + } + // The symbol is generally reaped here regardless. + ((void)0); // expected-warning{{SYMBOL DEAD}} +} diff --git a/clang/test/Analysis/taint-generic.c b/clang/test/Analysis/taint-generic.c index 30529503e5ade..42e390dddef2f 100644 --- a/clang/test/Analysis/taint-generic.c +++ b/clang/test/Analysis/taint-generic.c @@ -2,6 +2,7 @@ // RUN: %clang_analyze_cc1 -DFILE_IS_STRUCT -analyzer-checker=alpha.security.taint,core,alpha.security.ArrayBoundV2 -Wno-format-security -verify %s int scanf(const char *restrict format, ...); +char *gets(char *str); int getchar(void); typedef struct _FILE FILE; @@ -142,6 +143,12 @@ void testTaintSystemCall3() { system(buffern2); // expected-warning {{Untrusted data is passed to a system call}} } +void testGets() { + char str[50]; + gets(str); + system(str); // expected-warning {{Untrusted data is passed to a system call}} +} + void testTaintedBufferSize() { size_t ts; scanf("%zd", &ts); diff --git a/clang/test/Analysis/uninit-vals.m b/clang/test/Analysis/uninit-vals.m index f97af1a6633cc..33352122ca5aa 100644 --- a/clang/test/Analysis/uninit-vals.m +++ b/clang/test/Analysis/uninit-vals.m @@ -394,11 +394,11 @@ void testSmallStructBitfieldsFirstUnnamed() { struct { int : 4; int y : 4; - } a, b, c; + } a, b, c; // expected-note{{'c' initialized here}} a.y = 2; - b = a; // expected-note{{Value assigned to 'c'}} + b = a; clang_analyzer_eval(b.y == 2); // expected-warning{{TRUE}} // expected-note@-1{{TRUE}} @@ -411,11 +411,11 @@ void testSmallStructBitfieldsSecondUnnamed() { struct { int x : 4; int : 4; - } a, b, c; + } a, b, c; // expected-note{{'c' initialized here}} a.x = 1; - b = a; // expected-note{{Value assigned to 'c'}} + b = a; clang_analyzer_eval(b.x == 1); // expected-warning{{TRUE}} // expected-note@-1{{TRUE}} diff --git a/clang/test/Analysis/valist-uninitialized.c b/clang/test/Analysis/valist-uninitialized.c index 19308537e02cd..003592997eab8 100644 --- a/clang/test/Analysis/valist-uninitialized.c +++ b/clang/test/Analysis/valist-uninitialized.c @@ -1,5 +1,15 @@ -// RUN: %clang_analyze_cc1 -triple hexagon-unknown-linux -analyzer-checker=core,valist.Uninitialized,valist.CopyToSelf -analyzer-disable-checker=core.CallAndMessage -analyzer-output=text -analyzer-store=region -verify %s -// RUN: %clang_analyze_cc1 -triple x86_64-pc-linux-gnu -analyzer-checker=core,valist.Uninitialized,valist.CopyToSelf -analyzer-disable-checker=core.CallAndMessage -analyzer-output=text -analyzer-store=region -verify %s +// RUN: %clang_analyze_cc1 -triple hexagon-unknown-linux -verify %s \ +// RUN: -analyzer-checker=core,valist.Uninitialized,valist.CopyToSelf \ +// RUN: -analyzer-disable-checker=core.CallAndMessage \ +// RUN: -analyzer-output=text +// +// RUN: %clang_analyze_cc1 -triple x86_64-pc-linux-gnu -verify %s \ +// RUN: -analyzer-checker=core,valist.Uninitialized,valist.CopyToSelf \ +// RUN: -analyzer-disable-checker=core.CallAndMessage \ +// RUN: -analyzer-output=text +// +// RUN: %clang_analyze_cc1 -triple x86_64-pc-linux-gnu %s \ +// RUN: -analyzer-checker=core,valist.Uninitialized #include "Inputs/system-header-simulator-for-valist.h" diff --git a/clang/test/CMakeLists.txt b/clang/test/CMakeLists.txt index 7d9dc429a41b0..745151e7830ee 100644 --- a/clang/test/CMakeLists.txt +++ b/clang/test/CMakeLists.txt @@ -46,7 +46,7 @@ if(CLANG_TEST_USE_VG) endif () list(APPEND CLANG_TEST_DEPS - clang clang-headers + clang clang-resource-headers clang-format c-index-test diagtool clang-tblgen @@ -112,6 +112,7 @@ if( NOT CLANG_BUILT_STANDALONE ) llvm-objdump llvm-profdata llvm-readobj + llvm-spirv llvm-symbolizer opt ) diff --git a/clang/test/CXX/class.access/p4.cpp b/clang/test/CXX/class.access/p4.cpp index 6d452d8199e06..a2d0da1a8329a 100644 --- a/clang/test/CXX/class.access/p4.cpp +++ b/clang/test/CXX/class.access/p4.cpp @@ -514,16 +514,12 @@ namespace test17 { } namespace test18 { - template class A {}; - class B : A { + template class A {}; // expected-note {{member is declared here}} + class B : A { // expected-note {{constrained by implicitly private inheritance here}} A member; }; - - // FIXME: this access to A should be forbidden (because C++ is dumb), - // but LookupResult can't express the necessary information to do - // the check, so we aggressively suppress access control. class C : B { - A member; + A member; // expected-error {{'A' is a private member of 'test18::A'}} }; } diff --git a/clang/test/CXX/temp/temp.decls/temp.friend/p1.cpp b/clang/test/CXX/temp/temp.decls/temp.friend/p1.cpp index 849728a448bde..ab1b9f7a73eec 100644 --- a/clang/test/CXX/temp/temp.decls/temp.friend/p1.cpp +++ b/clang/test/CXX/temp/temp.decls/temp.friend/p1.cpp @@ -380,10 +380,10 @@ template struct A { namespace test18 { namespace ns1 { template struct foo {}; } // expected-note{{candidate ignored: not a function template}} namespace ns2 { void foo() {} } // expected-note{{candidate ignored: not a function template}} -using ns1::foo; -using ns2::foo; +using ns1::foo; // expected-note {{found by name lookup}} +using ns2::foo; // expected-note {{found by name lookup}} template class A { - friend void foo() {} // expected-error{{no candidate function template was found for dependent friend function template specialization}} + friend void foo() {} // expected-error {{ambiguous}} expected-error{{no candidate function template was found for dependent friend function template specialization}} }; } diff --git a/clang/test/CodeCompletion/crash-skipped-bodies-template-inst.cpp b/clang/test/CodeCompletion/crash-skipped-bodies-template-inst.cpp index 6161f100cb555..7fec995ba061b 100644 --- a/clang/test/CodeCompletion/crash-skipped-bodies-template-inst.cpp +++ b/clang/test/CodeCompletion/crash-skipped-bodies-template-inst.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:24:5 %s -o - 2>&1 | FileCheck %s +// RUN: %clang_cc1 -fsyntax-only -std=c++14 -code-completion-at=%s:24:5 %s -o - 2>&1 | FileCheck %s template auto make_func() { struct impl { diff --git a/clang/test/CodeCompletion/included-frameworks.m b/clang/test/CodeCompletion/included-frameworks.m new file mode 100644 index 0000000000000..737a360a8f937 --- /dev/null +++ b/clang/test/CodeCompletion/included-frameworks.m @@ -0,0 +1,29 @@ +// RUN: rm -rf %t && mkdir -p %t/Foo.framework/Headers/SubFolder && mkdir %t/NotAFramework/ +// RUN: touch %t/Foo.framework/Headers/Foo.h && touch %t/Foo.framework/Headers/FOOClass.h +// RUN: touch %t/Foo.framework/Headers/SubFolder/FOOInternal.h + +#import + +#import + +// Note: the run lines follow their respective tests, since line/column +// matter in this test. + +// Autocomplete frameworks without the ".framework" extension. +// +// RUN: %clang -fsyntax-only -F %t -Xclang -code-completion-at=%s:5:10 %s -o - | FileCheck -check-prefix=CHECK-1 %s +// CHECK-1-NOT: Foo.framework/ +// CHECK-1-NOT: NotAFramework/ +// CHECK-1: Foo/ + +// Autocomplete for frameworks inside its Headers folder. +// +// RUN: %clang -fsyntax-only -F %t -Xclang -code-completion-at=%s:5:14 %s -o - | FileCheck -check-prefix=CHECK-2 %s +// CHECK-2: Foo.h> +// CHECK-2: FOOClass.h> +// CHECK-2: SubFolder/ + +// Autocomplete for folders inside of a frameworks. +// +// RUN: %clang -fsyntax-only -F %t -Xclang -code-completion-at=%s:7:24 %s -o - | FileCheck -check-prefix=CHECK-3 %s +// CHECK-3: FOOInternal.h> diff --git a/clang/test/CodeCompletion/skip-auto-funcs.cpp b/clang/test/CodeCompletion/skip-auto-funcs.cpp index ab2465d7fb049..c0fa0f556daef 100644 --- a/clang/test/CodeCompletion/skip-auto-funcs.cpp +++ b/clang/test/CodeCompletion/skip-auto-funcs.cpp @@ -1,7 +1,7 @@ // We run clang in completion mode to force skipping of function bodies and // check if the function bodies were skipped by observing the warnings that // clang produces. -// RUN: not %clang_cc1 -fsyntax-only -code-completion-at=%s:60:1 %s -o - 2>&1 | FileCheck %s +// RUN: not %clang_cc1 -std=c++14 -fsyntax-only -code-completion-at=%s:60:1 %s -o - 2>&1 | FileCheck %s template auto not_skipped() { int x; diff --git a/clang/test/CodeGen/aarch64-neon-fp16fml.c b/clang/test/CodeGen/aarch64-neon-fp16fml.c index ad3dd9c22689d..3436d8b212efb 100644 --- a/clang/test/CodeGen/aarch64-neon-fp16fml.c +++ b/clang/test/CodeGen/aarch64-neon-fp16fml.c @@ -9,188 +9,188 @@ // Vector form -float32x2_t test_vfmlal_low_u32(float32x2_t a, float16x4_t b, float16x4_t c) { -// CHECK-LABEL: define <2 x float> @test_vfmlal_low_u32(<2 x float> %a, <4 x half> %b, <4 x half> %c) +float32x2_t test_vfmlal_low_f16(float32x2_t a, float16x4_t b, float16x4_t c) { +// CHECK-LABEL: define <2 x float> @test_vfmlal_low_f16(<2 x float> %a, <4 x half> %b, <4 x half> %c) // CHECK: [[RESULT:%.*]] = call <2 x float> @llvm.aarch64.neon.fmlal.v2f32.v4f16(<2 x float> %a, <4 x half> %b, <4 x half> %c) // CHECK: ret <2 x float> [[RESULT]] - return vfmlal_low_u32(a, b, c); + return vfmlal_low_f16(a, b, c); } -float32x2_t test_vfmlsl_low_u32(float32x2_t a, float16x4_t b, float16x4_t c) { -// CHECK-LABEL: define <2 x float> @test_vfmlsl_low_u32(<2 x float> %a, <4 x half> %b, <4 x half> %c) +float32x2_t test_vfmlsl_low_f16(float32x2_t a, float16x4_t b, float16x4_t c) { +// CHECK-LABEL: define <2 x float> @test_vfmlsl_low_f16(<2 x float> %a, <4 x half> %b, <4 x half> %c) // CHECK: [[RESULT:%.*]] = call <2 x float> @llvm.aarch64.neon.fmlsl.v2f32.v4f16(<2 x float> %a, <4 x half> %b, <4 x half> %c) // CHECK: ret <2 x float> [[RESULT]] - return vfmlsl_low_u32(a, b, c); + return vfmlsl_low_f16(a, b, c); } -float32x2_t test_vfmlal_high_u32(float32x2_t a, float16x4_t b, float16x4_t c) { -// CHECK-LABEL: define <2 x float> @test_vfmlal_high_u32(<2 x float> %a, <4 x half> %b, <4 x half> %c) +float32x2_t test_vfmlal_high_f16(float32x2_t a, float16x4_t b, float16x4_t c) { +// CHECK-LABEL: define <2 x float> @test_vfmlal_high_f16(<2 x float> %a, <4 x half> %b, <4 x half> %c) // CHECK: [[RESULT:%.*]] = call <2 x float> @llvm.aarch64.neon.fmlal2.v2f32.v4f16(<2 x float> %a, <4 x half> %b, <4 x half> %c) // CHECK: ret <2 x float> [[RESULT]] - return vfmlal_high_u32(a, b, c); + return vfmlal_high_f16(a, b, c); } -float32x2_t test_vfmlsl_high_u32(float32x2_t a, float16x4_t b, float16x4_t c) { -// CHECK-LABEL: define <2 x float> @test_vfmlsl_high_u32(<2 x float> %a, <4 x half> %b, <4 x half> %c) +float32x2_t test_vfmlsl_high_f16(float32x2_t a, float16x4_t b, float16x4_t c) { +// CHECK-LABEL: define <2 x float> @test_vfmlsl_high_f16(<2 x float> %a, <4 x half> %b, <4 x half> %c) // CHECK: [[RESULT:%.*]] = call <2 x float> @llvm.aarch64.neon.fmlsl2.v2f32.v4f16(<2 x float> %a, <4 x half> %b, <4 x half> %c) // CHECK: ret <2 x float> [[RESULT]] - return vfmlsl_high_u32(a, b, c); + return vfmlsl_high_f16(a, b, c); } -float32x4_t test_vfmlalq_low_u32(float32x4_t a, float16x8_t b, float16x8_t c) { -// CHECK-LABEL: define <4 x float> @test_vfmlalq_low_u32(<4 x float> %a, <8 x half> %b, <8 x half> %c) +float32x4_t test_vfmlalq_low_f16(float32x4_t a, float16x8_t b, float16x8_t c) { +// CHECK-LABEL: define <4 x float> @test_vfmlalq_low_f16(<4 x float> %a, <8 x half> %b, <8 x half> %c) // CHECK: [[RESULT:%.*]] = call <4 x float> @llvm.aarch64.neon.fmlal.v4f32.v8f16(<4 x float> %a, <8 x half> %b, <8 x half> %c) // CHECK: ret <4 x float> [[RESULT]] - return vfmlalq_low_u32(a, b, c); + return vfmlalq_low_f16(a, b, c); } -float32x4_t test_vfmlslq_low_u32(float32x4_t a, float16x8_t b, float16x8_t c) { -// CHECK-LABEL: define <4 x float> @test_vfmlslq_low_u32(<4 x float> %a, <8 x half> %b, <8 x half> %c) +float32x4_t test_vfmlslq_low_f16(float32x4_t a, float16x8_t b, float16x8_t c) { +// CHECK-LABEL: define <4 x float> @test_vfmlslq_low_f16(<4 x float> %a, <8 x half> %b, <8 x half> %c) // CHECK: [[RESULT:%.*]] = call <4 x float> @llvm.aarch64.neon.fmlsl.v4f32.v8f16(<4 x float> %a, <8 x half> %b, <8 x half> %c) // CHECK: ret <4 x float> [[RESULT]] - return vfmlslq_low_u32(a, b, c); + return vfmlslq_low_f16(a, b, c); } -float32x4_t test_vfmlalq_high_u32(float32x4_t a, float16x8_t b, float16x8_t c) { -// CHECK-LABEL: define <4 x float> @test_vfmlalq_high_u32(<4 x float> %a, <8 x half> %b, <8 x half> %c) +float32x4_t test_vfmlalq_high_f16(float32x4_t a, float16x8_t b, float16x8_t c) { +// CHECK-LABEL: define <4 x float> @test_vfmlalq_high_f16(<4 x float> %a, <8 x half> %b, <8 x half> %c) // CHECK: [[RESULT:%.*]] = call <4 x float> @llvm.aarch64.neon.fmlal2.v4f32.v8f16(<4 x float> %a, <8 x half> %b, <8 x half> %c) // CHECK: ret <4 x float> [[RESULT]] - return vfmlalq_high_u32(a, b, c); + return vfmlalq_high_f16(a, b, c); } -float32x4_t test_vfmlslq_high_u32(float32x4_t a, float16x8_t b, float16x8_t c) { -// CHECK-LABEL: define <4 x float> @test_vfmlslq_high_u32(<4 x float> %a, <8 x half> %b, <8 x half> %c) +float32x4_t test_vfmlslq_high_f16(float32x4_t a, float16x8_t b, float16x8_t c) { +// CHECK-LABEL: define <4 x float> @test_vfmlslq_high_f16(<4 x float> %a, <8 x half> %b, <8 x half> %c) // CHECK: [[RESULT:%.*]] = call <4 x float> @llvm.aarch64.neon.fmlsl2.v4f32.v8f16(<4 x float> %a, <8 x half> %b, <8 x half> %c) // CHECK: ret <4 x float> [[RESULT]] - return vfmlslq_high_u32(a, b, c); + return vfmlslq_high_f16(a, b, c); } // Indexed form -float32x2_t test_vfmlal_lane_low_u32(float32x2_t a, float16x4_t b, float16x4_t c) { -// CHECK-LABEL: define <2 x float> @test_vfmlal_lane_low_u32(<2 x float> %a, <4 x half> %b, <4 x half> %c) +float32x2_t test_vfmlal_lane_low_f16(float32x2_t a, float16x4_t b, float16x4_t c) { +// CHECK-LABEL: define <2 x float> @test_vfmlal_lane_low_f16(<2 x float> %a, <4 x half> %b, <4 x half> %c) // CHECK: [[SHUFFLE:%.*]] = shufflevector <4 x half> %c, <4 x half> undef, <4 x i32> zeroinitializer // CHECK: [[RESULT:%.*]] = call <2 x float> @llvm.aarch64.neon.fmlal.v2f32.v4f16(<2 x float> %a, <4 x half> %b, <4 x half> [[SHUFFLE]]) // CHECK: ret <2 x float> [[RESULT]] - return vfmlal_lane_low_u32(a, b, c, 0); + return vfmlal_lane_low_f16(a, b, c, 0); } -float32x2_t test_vfmlal_lane_high_u32(float32x2_t a, float16x4_t b, float16x4_t c) { -// CHECK-LABEL: define <2 x float> @test_vfmlal_lane_high_u32(<2 x float> %a, <4 x half> %b, <4 x half> %c) +float32x2_t test_vfmlal_lane_high_f16(float32x2_t a, float16x4_t b, float16x4_t c) { +// CHECK-LABEL: define <2 x float> @test_vfmlal_lane_high_f16(<2 x float> %a, <4 x half> %b, <4 x half> %c) // CHECK: [[SHUFFLE:%.*]] = shufflevector <4 x half> %c, <4 x half> undef, <4 x i32> // CHECK: [[RESULT:%.*]] = call <2 x float> @llvm.aarch64.neon.fmlal2.v2f32.v4f16(<2 x float> %a, <4 x half> %b, <4 x half> [[SHUFFLE]]) // CHECK: ret <2 x float> [[RESULT]] - return vfmlal_lane_high_u32(a, b, c, 1); + return vfmlal_lane_high_f16(a, b, c, 1); } -float32x4_t test_vfmlalq_lane_low_u32(float32x4_t a, float16x8_t b, float16x4_t c) { -// CHECK-LABEL: define <4 x float> @test_vfmlalq_lane_low_u32(<4 x float> %a, <8 x half> %b, <4 x half> %c) +float32x4_t test_vfmlalq_lane_low_f16(float32x4_t a, float16x8_t b, float16x4_t c) { +// CHECK-LABEL: define <4 x float> @test_vfmlalq_lane_low_f16(<4 x float> %a, <8 x half> %b, <4 x half> %c) // CHECK: [[SHUFFLE:%.*]] = shufflevector <4 x half> %c, <4 x half> undef, <8 x i32> // CHECK: [[RESULT:%.*]] = call <4 x float> @llvm.aarch64.neon.fmlal.v4f32.v8f16(<4 x float> %a, <8 x half> %b, <8 x half> [[SHUFFLE]]) // CHECK: ret <4 x float> [[RESULT]] - return vfmlalq_lane_low_u32(a, b, c, 2); + return vfmlalq_lane_low_f16(a, b, c, 2); } -float32x4_t test_vfmlalq_lane_high_u32(float32x4_t a, float16x8_t b, float16x4_t c) { -// CHECK-LABEL: define <4 x float> @test_vfmlalq_lane_high_u32(<4 x float> %a, <8 x half> %b, <4 x half> %c) +float32x4_t test_vfmlalq_lane_high_f16(float32x4_t a, float16x8_t b, float16x4_t c) { +// CHECK-LABEL: define <4 x float> @test_vfmlalq_lane_high_f16(<4 x float> %a, <8 x half> %b, <4 x half> %c) // CHECK: [[SHUFFLE:%.*]] = shufflevector <4 x half> %c, <4 x half> undef, <8 x i32> // CHECK: [[RESULT:%.*]] = call <4 x float> @llvm.aarch64.neon.fmlal2.v4f32.v8f16(<4 x float> %a, <8 x half> %b, <8 x half> [[SHUFFLE]]) // CHECK: ret <4 x float> [[RESULT]] - return vfmlalq_lane_high_u32(a, b, c, 3); + return vfmlalq_lane_high_f16(a, b, c, 3); } -float32x2_t test_vfmlal_laneq_low_u32(float32x2_t a, float16x4_t b, float16x8_t c) { -// CHECK-LABEL: define <2 x float> @test_vfmlal_laneq_low_u32(<2 x float> %a, <4 x half> %b, <8 x half> %c) +float32x2_t test_vfmlal_laneq_low_f16(float32x2_t a, float16x4_t b, float16x8_t c) { +// CHECK-LABEL: define <2 x float> @test_vfmlal_laneq_low_f16(<2 x float> %a, <4 x half> %b, <8 x half> %c) // CHECK: [[SHUFFLE:%.*]] = shufflevector <8 x half> %c, <8 x half> undef, <4 x i32> // CHECK: [[RESULT:%.*]] = call <2 x float> @llvm.aarch64.neon.fmlal.v2f32.v4f16(<2 x float> %a, <4 x half> %b, <4 x half> [[SHUFFLE]]) // CHECK: ret <2 x float> [[RESULT]] - return vfmlal_laneq_low_u32(a, b, c, 4); + return vfmlal_laneq_low_f16(a, b, c, 4); } -float32x2_t test_vfmlal_laneq_high_u32(float32x2_t a, float16x4_t b, float16x8_t c) { -// CHECK-LABEL: define <2 x float> @test_vfmlal_laneq_high_u32(<2 x float> %a, <4 x half> %b, <8 x half> %c) +float32x2_t test_vfmlal_laneq_high_f16(float32x2_t a, float16x4_t b, float16x8_t c) { +// CHECK-LABEL: define <2 x float> @test_vfmlal_laneq_high_f16(<2 x float> %a, <4 x half> %b, <8 x half> %c) // CHECK: [[SHUFFLE:%.*]] = shufflevector <8 x half> %c, <8 x half> undef, <4 x i32> // CHECK: [[RESULT:%.*]] = call <2 x float> @llvm.aarch64.neon.fmlal2.v2f32.v4f16(<2 x float> %a, <4 x half> %b, <4 x half> [[SHUFFLE]]) // CHECK: ret <2 x float> [[RESULT]] - return vfmlal_laneq_high_u32(a, b, c, 5); + return vfmlal_laneq_high_f16(a, b, c, 5); } -float32x4_t test_vfmlalq_laneq_low_u32(float32x4_t a, float16x8_t b, float16x8_t c) { -// CHECK-LABEL: define <4 x float> @test_vfmlalq_laneq_low_u32(<4 x float> %a, <8 x half> %b, <8 x half> %c) +float32x4_t test_vfmlalq_laneq_low_f16(float32x4_t a, float16x8_t b, float16x8_t c) { +// CHECK-LABEL: define <4 x float> @test_vfmlalq_laneq_low_f16(<4 x float> %a, <8 x half> %b, <8 x half> %c) // CHECK: [[SHUFFLE:%.*]] = shufflevector <8 x half> %c, <8 x half> undef, <8 x i32> // CHECK: [[RESULT:%.*]] = call <4 x float> @llvm.aarch64.neon.fmlal.v4f32.v8f16(<4 x float> %a, <8 x half> %b, <8 x half> [[SHUFFLE]]) // CHECK: ret <4 x float> [[RESULT]] - return vfmlalq_laneq_low_u32(a, b, c, 6); + return vfmlalq_laneq_low_f16(a, b, c, 6); } -float32x4_t test_vfmlalq_laneq_high_u32(float32x4_t a, float16x8_t b, float16x8_t c) { -// CHECK-LABEL: define <4 x float> @test_vfmlalq_laneq_high_u32(<4 x float> %a, <8 x half> %b, <8 x half> %c) +float32x4_t test_vfmlalq_laneq_high_f16(float32x4_t a, float16x8_t b, float16x8_t c) { +// CHECK-LABEL: define <4 x float> @test_vfmlalq_laneq_high_f16(<4 x float> %a, <8 x half> %b, <8 x half> %c) // CHECK: [[SHUFFLE:%.*]] = shufflevector <8 x half> %c, <8 x half> undef, <8 x i32> // CHECK: [[RESULT:%.*]] = call <4 x float> @llvm.aarch64.neon.fmlal2.v4f32.v8f16(<4 x float> %a, <8 x half> %b, <8 x half> [[SHUFFLE]]) // CHECK: ret <4 x float> [[RESULT]] - return vfmlalq_laneq_high_u32(a, b, c, 7); + return vfmlalq_laneq_high_f16(a, b, c, 7); } -float32x2_t test_vfmlsl_lane_low_u32(float32x2_t a, float16x4_t b, float16x4_t c) { -// CHECK-LABEL: define <2 x float> @test_vfmlsl_lane_low_u32(<2 x float> %a, <4 x half> %b, <4 x half> %c) +float32x2_t test_vfmlsl_lane_low_f16(float32x2_t a, float16x4_t b, float16x4_t c) { +// CHECK-LABEL: define <2 x float> @test_vfmlsl_lane_low_f16(<2 x float> %a, <4 x half> %b, <4 x half> %c) // CHECK: [[SHUFFLE:%.*]] = shufflevector <4 x half> %c, <4 x half> undef, <4 x i32> zeroinitializer // CHECK: [[RESULT:%.*]] = call <2 x float> @llvm.aarch64.neon.fmlsl.v2f32.v4f16(<2 x float> %a, <4 x half> %b, <4 x half> [[SHUFFLE]]) // CHECK: ret <2 x float> [[RESULT]] - return vfmlsl_lane_low_u32(a, b, c, 0); + return vfmlsl_lane_low_f16(a, b, c, 0); } -float32x2_t test_vfmlsl_lane_high_u32(float32x2_t a, float16x4_t b, float16x4_t c) { -// CHECK-LABEL: define <2 x float> @test_vfmlsl_lane_high_u32(<2 x float> %a, <4 x half> %b, <4 x half> %c) +float32x2_t test_vfmlsl_lane_high_f16(float32x2_t a, float16x4_t b, float16x4_t c) { +// CHECK-LABEL: define <2 x float> @test_vfmlsl_lane_high_f16(<2 x float> %a, <4 x half> %b, <4 x half> %c) // CHECK: [[SHUFFLE:%.*]] = shufflevector <4 x half> %c, <4 x half> undef, <4 x i32> // CHECK: [[RESULT:%.*]] = call <2 x float> @llvm.aarch64.neon.fmlsl2.v2f32.v4f16(<2 x float> %a, <4 x half> %b, <4 x half> [[SHUFFLE]]) // CHECK: ret <2 x float> [[RESULT]] - return vfmlsl_lane_high_u32(a, b, c, 1); + return vfmlsl_lane_high_f16(a, b, c, 1); } -float32x4_t test_vfmlslq_lane_low_u32(float32x4_t a, float16x8_t b, float16x4_t c) { -// CHECK-LABEL: define <4 x float> @test_vfmlslq_lane_low_u32(<4 x float> %a, <8 x half> %b, <4 x half> %c) +float32x4_t test_vfmlslq_lane_low_f16(float32x4_t a, float16x8_t b, float16x4_t c) { +// CHECK-LABEL: define <4 x float> @test_vfmlslq_lane_low_f16(<4 x float> %a, <8 x half> %b, <4 x half> %c) // CHECK: [[SHUFFLE:%.*]] = shufflevector <4 x half> %c, <4 x half> undef, <8 x i32> // CHECK: [[RESULT:%.*]] = call <4 x float> @llvm.aarch64.neon.fmlsl.v4f32.v8f16(<4 x float> %a, <8 x half> %b, <8 x half> [[SHUFFLE]]) // CHECK: ret <4 x float> [[RESULT]] - return vfmlslq_lane_low_u32(a, b, c, 2); + return vfmlslq_lane_low_f16(a, b, c, 2); } -float32x4_t test_vfmlslq_lane_high_u32(float32x4_t a, float16x8_t b, float16x4_t c) { -// CHECK-LABEL: define <4 x float> @test_vfmlslq_lane_high_u32(<4 x float> %a, <8 x half> %b, <4 x half> %c) +float32x4_t test_vfmlslq_lane_high_f16(float32x4_t a, float16x8_t b, float16x4_t c) { +// CHECK-LABEL: define <4 x float> @test_vfmlslq_lane_high_f16(<4 x float> %a, <8 x half> %b, <4 x half> %c) // CHECK: [[SHUFFLE:%.*]] = shufflevector <4 x half> %c, <4 x half> undef, <8 x i32> // CHECK: [[RESULT:%.*]] = call <4 x float> @llvm.aarch64.neon.fmlsl2.v4f32.v8f16(<4 x float> %a, <8 x half> %b, <8 x half> [[SHUFFLE]]) // CHECK: ret <4 x float> [[RESULT]] - return vfmlslq_lane_high_u32(a, b, c, 3); + return vfmlslq_lane_high_f16(a, b, c, 3); } -float32x2_t test_vfmlsl_laneq_low_u32(float32x2_t a, float16x4_t b, float16x8_t c) { -// CHECK-LABEL: define <2 x float> @test_vfmlsl_laneq_low_u32(<2 x float> %a, <4 x half> %b, <8 x half> %c) +float32x2_t test_vfmlsl_laneq_low_f16(float32x2_t a, float16x4_t b, float16x8_t c) { +// CHECK-LABEL: define <2 x float> @test_vfmlsl_laneq_low_f16(<2 x float> %a, <4 x half> %b, <8 x half> %c) // CHECK: [[SHUFFLE:%.*]] = shufflevector <8 x half> %c, <8 x half> undef, <4 x i32> // CHECK: [[RESULT:%.*]] = call <2 x float> @llvm.aarch64.neon.fmlsl.v2f32.v4f16(<2 x float> %a, <4 x half> %b, <4 x half> [[SHUFFLE]]) // CHECK: ret <2 x float> [[RESULT]] - return vfmlsl_laneq_low_u32(a, b, c, 4); + return vfmlsl_laneq_low_f16(a, b, c, 4); } -float32x2_t test_vfmlsl_laneq_high_u32(float32x2_t a, float16x4_t b, float16x8_t c) { -// CHECK-LABEL: define <2 x float> @test_vfmlsl_laneq_high_u32(<2 x float> %a, <4 x half> %b, <8 x half> %c) +float32x2_t test_vfmlsl_laneq_high_f16(float32x2_t a, float16x4_t b, float16x8_t c) { +// CHECK-LABEL: define <2 x float> @test_vfmlsl_laneq_high_f16(<2 x float> %a, <4 x half> %b, <8 x half> %c) // CHECK: [[SHUFFLE:%.*]] = shufflevector <8 x half> %c, <8 x half> undef, <4 x i32> // CHECK: [[RESULT:%.*]] = call <2 x float> @llvm.aarch64.neon.fmlsl2.v2f32.v4f16(<2 x float> %a, <4 x half> %b, <4 x half> [[SHUFFLE]]) // CHECK: ret <2 x float> [[RESULT]] - return vfmlsl_laneq_high_u32(a, b, c, 5); + return vfmlsl_laneq_high_f16(a, b, c, 5); } -float32x4_t test_vfmlslq_laneq_low_u32(float32x4_t a, float16x8_t b, float16x8_t c) { -// CHECK-LABEL: define <4 x float> @test_vfmlslq_laneq_low_u32(<4 x float> %a, <8 x half> %b, <8 x half> %c) +float32x4_t test_vfmlslq_laneq_low_f16(float32x4_t a, float16x8_t b, float16x8_t c) { +// CHECK-LABEL: define <4 x float> @test_vfmlslq_laneq_low_f16(<4 x float> %a, <8 x half> %b, <8 x half> %c) // CHECK: [[SHUFFLE:%.*]] = shufflevector <8 x half> %c, <8 x half> undef, <8 x i32> // CHECK: [[RESULT:%.*]] = call <4 x float> @llvm.aarch64.neon.fmlsl.v4f32.v8f16(<4 x float> %a, <8 x half> %b, <8 x half> [[SHUFFLE]]) // CHECK: ret <4 x float> [[RESULT]] - return vfmlslq_laneq_low_u32(a, b, c, 6); + return vfmlslq_laneq_low_f16(a, b, c, 6); } -float32x4_t test_vfmlslq_laneq_high_u32(float32x4_t a, float16x8_t b, float16x8_t c) { -// CHECK-LABEL: define <4 x float> @test_vfmlslq_laneq_high_u32(<4 x float> %a, <8 x half> %b, <8 x half> %c) +float32x4_t test_vfmlslq_laneq_high_f16(float32x4_t a, float16x8_t b, float16x8_t c) { +// CHECK-LABEL: define <4 x float> @test_vfmlslq_laneq_high_f16(<4 x float> %a, <8 x half> %b, <8 x half> %c) // CHECK: [[SHUFFLE:%.*]] = shufflevector <8 x half> %c, <8 x half> undef, <8 x i32> // CHECK: [[RESULT:%.*]] = call <4 x float> @llvm.aarch64.neon.fmlsl2.v4f32.v8f16(<4 x float> %a, <8 x half> %b, <8 x half> [[SHUFFLE]]) // CHECK: ret <4 x float> [[RESULT]] - return vfmlslq_laneq_high_u32(a, b, c, 7); + return vfmlslq_laneq_high_f16(a, b, c, 7); } diff --git a/clang/test/CodeGen/annotations-builtin.c b/clang/test/CodeGen/annotations-builtin.c index 8a3b3ffcec286..e6dd3587af71c 100644 --- a/clang/test/CodeGen/annotations-builtin.c +++ b/clang/test/CodeGen/annotations-builtin.c @@ -43,4 +43,7 @@ int main(int argc, char **argv) { // CHECK: call i32 @llvm.annotation.i32 // CHECK: inttoptr {{.*}} to i8** return 0; + + int after_return = __builtin_annotation(argc, "annotation_a"); +// CHECK-NOT: call i32 @llvm.annotation.i32 } diff --git a/clang/test/CodeGen/annotations-var.c b/clang/test/CodeGen/annotations-var.c index 6e8ad34c65156..3dc6dca3e7517 100644 --- a/clang/test/CodeGen/annotations-var.c +++ b/clang/test/CodeGen/annotations-var.c @@ -39,10 +39,19 @@ void local(void) { // LOCAL-NEXT: call void @llvm.var.annotation(i8* [[T0]], i8* getelementptr inbounds ([15 x i8], [15 x i8]* @{{.*}}), i8* getelementptr inbounds ({{.*}}), i32 33) } +void local_after_return(void) { + return; + int localvar __attribute__((annotate("localvar_after_return"))) = 3; +// Test we are not emitting instructions like bitcast or call outside of a basic block. +// LOCAL-LABEL: define void @local_after_return() +// LOCAL: [[LOCALVAR:%.*]] = alloca i32, +// LOCAL-NEXT: ret void +} + void undef(void) { int undefvar __attribute__((annotate("undefvar_ann_0"))); // UNDEF-LABEL: define void @undef() // UNDEF: [[UNDEFVAR:%.*]] = alloca i32, // UNDEF-NEXT: [[T0:%.*]] = bitcast i32* [[UNDEFVAR]] to i8* -// UNDEF-NEXT: call void @llvm.var.annotation(i8* [[T0]], i8* getelementptr inbounds ([15 x i8], [15 x i8]* @{{.*}}), i8* getelementptr inbounds ({{.*}}), i32 43) +// UNDEF-NEXT: call void @llvm.var.annotation(i8* [[T0]], i8* getelementptr inbounds ([15 x i8], [15 x i8]* @{{.*}}), i8* getelementptr inbounds ({{.*}}), i32 52) } diff --git a/clang/test/CodeGen/arm64-microsoft-status-reg.cpp b/clang/test/CodeGen/arm64-microsoft-status-reg.cpp index eb59bae50f0ae..524b5af120c52 100644 --- a/clang/test/CodeGen/arm64-microsoft-status-reg.cpp +++ b/clang/test/CodeGen/arm64-microsoft-status-reg.cpp @@ -23,88 +23,112 @@ #define ARM64_TPIDRRO_EL0 ARM64_SYSREG(3,3,13, 0,3) // Thread ID Register, User Read Only [CP15_TPIDRURO] #define ARM64_TPIDR_EL1 ARM64_SYSREG(3,0,13, 0,4) // Thread ID Register, Privileged Only [CP15_TPIDRPRW] -void check_ReadWriteStatusReg(int v) { - int ret; +// From intrin.h +__int64 _ReadStatusReg(int); +void _WriteStatusReg(int, __int64); + +void check_ReadWriteStatusReg(__int64 v) { + __int64 ret; ret = _ReadStatusReg(ARM64_CNTVCT); -// CHECK-ASM: mrs x8, CNTVCT_EL0 -// CHECK-IR: call i64 @llvm.read_register.i64(metadata ![[MD2:.*]]) +// CHECK-ASM: mrs x0, CNTVCT_EL0 +// CHECK-IR: %[[VAR:.*]] = call i64 @llvm.read_register.i64(metadata ![[MD2:.*]]) +// CHECK-IR-NEXT: store i64 %[[VAR]] ret = _ReadStatusReg(ARM64_PMCCNTR_EL0); -// CHECK-ASM: mrs x8, PMCCNTR_EL0 -// CHECK-IR: call i64 @llvm.read_register.i64(metadata ![[MD3:.*]]) +// CHECK-ASM: mrs x0, PMCCNTR_EL0 +// CHECK-IR: %[[VAR:.*]] = call i64 @llvm.read_register.i64(metadata ![[MD3:.*]]) +// CHECK-IR-NEXT: store i64 %[[VAR]] ret = _ReadStatusReg(ARM64_PMSELR_EL0); -// CHECK-ASM: mrs x8, PMSELR_EL0 -// CHECK-IR: call i64 @llvm.read_register.i64(metadata ![[MD4:.*]]) +// CHECK-ASM: mrs x0, PMSELR_EL0 +// CHECK-IR: %[[VAR:.*]] = call i64 @llvm.read_register.i64(metadata ![[MD4:.*]]) +// CHECK-IR-NEXT: store i64 %[[VAR]] ret = _ReadStatusReg(ARM64_PMXEVCNTR_EL0); -// CHECK-ASM: mrs x8, PMXEVCNTR_EL0 -// CHECK-IR: call i64 @llvm.read_register.i64(metadata ![[MD5:.*]]) +// CHECK-ASM: mrs x0, PMXEVCNTR_EL0 +// CHECK-IR: %[[VAR:.*]] = call i64 @llvm.read_register.i64(metadata ![[MD5:.*]]) +// CHECK-IR-NEXT: store i64 %[[VAR]] ret = _ReadStatusReg(ARM64_PMXEVCNTRn_EL0(0)); -// CHECK-ASM: mrs x8, PMEVCNTR0_EL0 -// CHECK-IR: call i64 @llvm.read_register.i64(metadata ![[MD6:.*]]) +// CHECK-ASM: mrs x0, PMEVCNTR0_EL0 +// CHECK-IR: %[[VAR:.*]] = call i64 @llvm.read_register.i64(metadata ![[MD6:.*]]) +// CHECK-IR-NEXT: store i64 %[[VAR]] ret = _ReadStatusReg(ARM64_PMXEVCNTRn_EL0(1)); -// CHECK-ASM: mrs x8, PMEVCNTR1_EL0 -// CHECK-IR: call i64 @llvm.read_register.i64(metadata ![[MD7:.*]]) +// CHECK-ASM: mrs x0, PMEVCNTR1_EL0 +// CHECK-IR: %[[VAR:.*]] = call i64 @llvm.read_register.i64(metadata ![[MD7:.*]]) +// CHECK-IR-NEXT: store i64 %[[VAR]] ret = _ReadStatusReg(ARM64_PMXEVCNTRn_EL0(30)); -// CHECK-ASM: mrs x8, PMEVCNTR30_EL0 -// CHECK-IR: call i64 @llvm.read_register.i64(metadata ![[MD8:.*]]) +// CHECK-ASM: mrs x0, PMEVCNTR30_EL0 +// CHECK-IR: %[[VAR:.*]] = call i64 @llvm.read_register.i64(metadata ![[MD8:.*]]) +// CHECK-IR-NEXT: store i64 %[[VAR]] ret = _ReadStatusReg(ARM64_TPIDR_EL0); -// CHECK-ASM: mrs x8, TPIDR_EL0 -// CHECK-IR: call i64 @llvm.read_register.i64(metadata ![[MD9:.*]]) +// CHECK-ASM: mrs x0, TPIDR_EL0 +// CHECK-IR: %[[VAR:.*]] = call i64 @llvm.read_register.i64(metadata ![[MD9:.*]]) +// CHECK-IR-NEXT: store i64 %[[VAR]] ret = _ReadStatusReg(ARM64_TPIDRRO_EL0); -// CHECK-ASM: mrs x8, TPIDRRO_EL0 -// CHECK-IR: call i64 @llvm.read_register.i64(metadata ![[MD10:.*]]) +// CHECK-ASM: mrs x0, TPIDRRO_EL0 +// CHECK-IR: %[[VAR:.*]] = call i64 @llvm.read_register.i64(metadata ![[MD10:.*]]) +// CHECK-IR-NEXT: store i64 %[[VAR]] ret = _ReadStatusReg(ARM64_TPIDR_EL1); -// CHECK-ASM: mrs x8, TPIDR_EL1 -// CHECK-IR: call i64 @llvm.read_register.i64(metadata ![[MD11:.*]]) +// CHECK-ASM: mrs x0, TPIDR_EL1 +// CHECK-IR: %[[VAR:.*]] = call i64 @llvm.read_register.i64(metadata ![[MD11:.*]]) +// CHECK-IR-NEXT: store i64 %[[VAR]] _WriteStatusReg(ARM64_CNTVCT, v); -// CHECK-ASM: msr S3_3_C14_C0_2, x8 -// CHECK-IR: call void @llvm.write_register.i64(metadata ![[MD2:.*]], i64 {{%.*}}) +// CHECK-ASM: msr S3_3_C14_C0_2, x0 +// CHECK-IR: %[[VAR:.*]] = load i64, +// CHECK-IR-NEXT: call void @llvm.write_register.i64(metadata ![[MD2:.*]], i64 %[[VAR]]) _WriteStatusReg(ARM64_PMCCNTR_EL0, v); -// CHECK-ASM: msr PMCCNTR_EL0, x8 -// CHECK-IR: call void @llvm.write_register.i64(metadata ![[MD3:.*]], i64 {{%.*}}) +// CHECK-ASM: msr PMCCNTR_EL0, x0 +// CHECK-IR: %[[VAR:.*]] = load i64, +// CHECK-IR-NEXT: call void @llvm.write_register.i64(metadata ![[MD3:.*]], i64 %[[VAR]]) _WriteStatusReg(ARM64_PMSELR_EL0, v); -// CHECK-ASM: msr PMSELR_EL0, x8 -// CHECK-IR: call void @llvm.write_register.i64(metadata ![[MD4:.*]], i64 {{%.*}}) +// CHECK-ASM: msr PMSELR_EL0, x0 +// CHECK-IR: %[[VAR:.*]] = load i64, +// CHECK-IR-NEXT: call void @llvm.write_register.i64(metadata ![[MD4:.*]], i64 %[[VAR]]) _WriteStatusReg(ARM64_PMXEVCNTR_EL0, v); -// CHECK-ASM: msr PMXEVCNTR_EL0, x8 -// CHECK-IR: call void @llvm.write_register.i64(metadata ![[MD5:.*]], i64 {{%.*}}) +// CHECK-ASM: msr PMXEVCNTR_EL0, x0 +// CHECK-IR: %[[VAR:.*]] = load i64, +// CHECK-IR-NEXT: call void @llvm.write_register.i64(metadata ![[MD5:.*]], i64 %[[VAR]]) _WriteStatusReg(ARM64_PMXEVCNTRn_EL0(0), v); -// CHECK-ASM: msr PMEVCNTR0_EL0, x8 -// CHECK-IR: call void @llvm.write_register.i64(metadata ![[MD6:.*]], i64 {{%.*}}) +// CHECK-ASM: msr PMEVCNTR0_EL0, x0 +// CHECK-IR: %[[VAR:.*]] = load i64, +// CHECK-IR-NEXT: call void @llvm.write_register.i64(metadata ![[MD6:.*]], i64 %[[VAR]]) _WriteStatusReg(ARM64_PMXEVCNTRn_EL0(1), v); -// CHECK-ASM: msr PMEVCNTR1_EL0, x8 -// CHECK-IR: call void @llvm.write_register.i64(metadata ![[MD7:.*]], i64 {{%.*}}) +// CHECK-ASM: msr PMEVCNTR1_EL0, x0 +// CHECK-IR: %[[VAR:.*]] = load i64, +// CHECK-IR-NEXT: call void @llvm.write_register.i64(metadata ![[MD7:.*]], i64 %[[VAR]]) _WriteStatusReg(ARM64_PMXEVCNTRn_EL0(30), v); -// CHECK-ASM: msr PMEVCNTR30_EL0, x8 -// CHECK-IR: call void @llvm.write_register.i64(metadata ![[MD8:.*]], i64 {{%.*}}) +// CHECK-ASM: msr PMEVCNTR30_EL0, x0 +// CHECK-IR: %[[VAR:.*]] = load i64, +// CHECK-IR-NEXT: call void @llvm.write_register.i64(metadata ![[MD8:.*]], i64 %[[VAR]]) _WriteStatusReg(ARM64_TPIDR_EL0, v); -// CHECK-ASM: msr TPIDR_EL0, x8 -// CHECK-IR: call void @llvm.write_register.i64(metadata ![[MD9:.*]], i64 {{%.*}}) +// CHECK-ASM: msr TPIDR_EL0, x0 +// CHECK-IR: %[[VAR:.*]] = load i64, +// CHECK-IR-NEXT: call void @llvm.write_register.i64(metadata ![[MD9:.*]], i64 %[[VAR]]) _WriteStatusReg(ARM64_TPIDRRO_EL0, v); -// CHECK-ASM: msr TPIDRRO_EL0, x8 -// CHECK-IR: call void @llvm.write_register.i64(metadata ![[MD10:.*]], i64 {{%.*}}) +// CHECK-ASM: msr TPIDRRO_EL0, x0 +// CHECK-IR: %[[VAR:.*]] = load i64, +// CHECK-IR-NEXT: call void @llvm.write_register.i64(metadata ![[MD10:.*]], i64 %[[VAR]]) _WriteStatusReg(ARM64_TPIDR_EL1, v); -// CHECK-ASM: msr TPIDR_EL1, x8 -// CHECK-IR: call void @llvm.write_register.i64(metadata ![[MD11:.*]], i64 {{%.*}}) +// CHECK-ASM: msr TPIDR_EL1, x0 +// CHECK-IR: %[[VAR:.*]] = load i64, +// CHECK-IR-NEXT: call void @llvm.write_register.i64(metadata ![[MD11:.*]], i64 %[[VAR]]) } // CHECK-IR: ![[MD2]] = !{!"3:3:14:0:2"} diff --git a/clang/test/CodeGen/asan-new-pm.ll b/clang/test/CodeGen/asan-new-pm.ll new file mode 100644 index 0000000000000..72bcf055a631e --- /dev/null +++ b/clang/test/CodeGen/asan-new-pm.ll @@ -0,0 +1,30 @@ +; Test that ASan runs with the new pass manager +; RUN: %clang_cc1 -S -emit-llvm -o - -fexperimental-new-pass-manager -fsanitize=address %s | FileCheck %s --check-prefixes=CHECK,LTO,THINLTO +; RUN: %clang_cc1 -S -emit-llvm -o - -fexperimental-new-pass-manager -fsanitize=address -flto %s | FileCheck %s --check-prefixes=CHECK,LTO +; RUN: %clang_cc1 -S -emit-llvm -o - -fexperimental-new-pass-manager -fsanitize=address -flto=thin %s | FileCheck %s --check-prefixes=CHECK,THINLTO +; RUN: %clang_cc1 -S -emit-llvm -o - -O1 -fexperimental-new-pass-manager -fsanitize=address %s | FileCheck %s --check-prefixes=CHECK,LTO,THINLTO +; RUN: %clang_cc1 -S -emit-llvm -o - -O1 -fexperimental-new-pass-manager -fsanitize=address -flto %s | FileCheck %s --check-prefixes=CHECK,LTO +; RUN: %clang_cc1 -S -emit-llvm -o - -O1 -fexperimental-new-pass-manager -fsanitize=address -flto=thin %s | FileCheck %s --check-prefixes=CHECK,THINLTO + +target triple = "x86_64-unknown-unknown" + +; DAG-CHECK: @llvm.global_ctors = {{.*}}@asan.module_ctor + +define i32 @test_load(i32* %a) sanitize_address { +entry: + %tmp1 = load i32, i32* %a, align 4 + ret i32 %tmp1 +} + +; CHECK: __asan_init + +; DAG-CHECK: define internal void @asan.module_ctor() { +; CHECK: {{.*}} call void @__asan_init() +; CHECK: {{.*}} call void @__asan_version_mismatch_check_v8() +; CHECK: ret void +; CHECK: } + +; DAG-CHECK: __asan_version_mismatch_check_v8 + +; This is not used in ThinLTO +; DAG-LTO: __asan_report_load4 diff --git a/clang/test/CodeGen/avx-builtins.c b/clang/test/CodeGen/avx-builtins.c index 3e7709b1b7e9f..c737514d90261 100644 --- a/clang/test/CodeGen/avx-builtins.c +++ b/clang/test/CodeGen/avx-builtins.c @@ -1,5 +1,6 @@ // RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +avx -emit-llvm -o - -Wall -Werror | FileCheck %s // RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +avx -fno-signed-char -emit-llvm -o - -Wall -Werror | FileCheck %s +// RUN: %clang_cc1 -fms-extensions -fms-compatibility -ffreestanding %s -triple=x86_64-windows-msvc -target-feature +avx -emit-llvm -o - -Wall -Werror | FileCheck %s #include diff --git a/clang/test/CodeGen/avx512f-builtins.c b/clang/test/CodeGen/avx512f-builtins.c index 7e1c255fe017c..eedd3fc9e2f94 100644 --- a/clang/test/CodeGen/avx512f-builtins.c +++ b/clang/test/CodeGen/avx512f-builtins.c @@ -1,4 +1,5 @@ // RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +avx512f -emit-llvm -o - -Wall -Werror | FileCheck %s +// RUN: %clang_cc1 -fms-extensions -fms-compatibility -ffreestanding %s -triple=x86_64-windows-msvc -target-feature +avx512f -emit-llvm -o - -Wall -Werror | FileCheck %s #include @@ -10139,70 +10140,70 @@ __m512i test_mm512_set_epi8(char e63, char e62, char e61, char e60, char e59, char e1, char e0) { //CHECK-LABEL: @test_mm512_set_epi8 - //CHECK: load i8, i8* %e63.addr, align 1 - //CHECK: load i8, i8* %e62.addr, align 1 - //CHECK: load i8, i8* %e61.addr, align 1 - //CHECK: load i8, i8* %e60.addr, align 1 - //CHECK: load i8, i8* %e59.addr, align 1 - //CHECK: load i8, i8* %e58.addr, align 1 - //CHECK: load i8, i8* %e57.addr, align 1 - //CHECK: load i8, i8* %e56.addr, align 1 - //CHECK: load i8, i8* %e55.addr, align 1 - //CHECK: load i8, i8* %e54.addr, align 1 - //CHECK: load i8, i8* %e53.addr, align 1 - //CHECK: load i8, i8* %e52.addr, align 1 - //CHECK: load i8, i8* %e51.addr, align 1 - //CHECK: load i8, i8* %e50.addr, align 1 - //CHECK: load i8, i8* %e49.addr, align 1 - //CHECK: load i8, i8* %e48.addr, align 1 - //CHECK: load i8, i8* %e47.addr, align 1 - //CHECK: load i8, i8* %e46.addr, align 1 - //CHECK: load i8, i8* %e45.addr, align 1 - //CHECK: load i8, i8* %e44.addr, align 1 - //CHECK: load i8, i8* %e43.addr, align 1 - //CHECK: load i8, i8* %e42.addr, align 1 - //CHECK: load i8, i8* %e41.addr, align 1 - //CHECK: load i8, i8* %e40.addr, align 1 - //CHECK: load i8, i8* %e39.addr, align 1 - //CHECK: load i8, i8* %e38.addr, align 1 - //CHECK: load i8, i8* %e37.addr, align 1 - //CHECK: load i8, i8* %e36.addr, align 1 - //CHECK: load i8, i8* %e35.addr, align 1 - //CHECK: load i8, i8* %e34.addr, align 1 - //CHECK: load i8, i8* %e33.addr, align 1 - //CHECK: load i8, i8* %e32.addr, align 1 - //CHECK: load i8, i8* %e31.addr, align 1 - //CHECK: load i8, i8* %e30.addr, align 1 - //CHECK: load i8, i8* %e29.addr, align 1 - //CHECK: load i8, i8* %e28.addr, align 1 - //CHECK: load i8, i8* %e27.addr, align 1 - //CHECK: load i8, i8* %e26.addr, align 1 - //CHECK: load i8, i8* %e25.addr, align 1 - //CHECK: load i8, i8* %e24.addr, align 1 - //CHECK: load i8, i8* %e23.addr, align 1 - //CHECK: load i8, i8* %e22.addr, align 1 - //CHECK: load i8, i8* %e21.addr, align 1 - //CHECK: load i8, i8* %e20.addr, align 1 - //CHECK: load i8, i8* %e19.addr, align 1 - //CHECK: load i8, i8* %e18.addr, align 1 - //CHECK: load i8, i8* %e17.addr, align 1 - //CHECK: load i8, i8* %e16.addr, align 1 - //CHECK: load i8, i8* %e15.addr, align 1 - //CHECK: load i8, i8* %e14.addr, align 1 - //CHECK: load i8, i8* %e13.addr, align 1 - //CHECK: load i8, i8* %e12.addr, align 1 - //CHECK: load i8, i8* %e11.addr, align 1 - //CHECK: load i8, i8* %e10.addr, align 1 - //CHECK: load i8, i8* %e9.addr, align 1 - //CHECK: load i8, i8* %e8.addr, align 1 - //CHECK: load i8, i8* %e7.addr, align 1 - //CHECK: load i8, i8* %e6.addr, align 1 - //CHECK: load i8, i8* %e5.addr, align 1 - //CHECK: load i8, i8* %e4.addr, align 1 - //CHECK: load i8, i8* %e3.addr, align 1 - //CHECK: load i8, i8* %e2.addr, align 1 - //CHECK: load i8, i8* %e1.addr, align 1 - //CHECK: load i8, i8* %e0.addr, align 1 + //CHECK: load i8, i8* %{{.*}}, align 1 + //CHECK: load i8, i8* %{{.*}}, align 1 + //CHECK: load i8, i8* %{{.*}}, align 1 + //CHECK: load i8, i8* %{{.*}}, align 1 + //CHECK: load i8, i8* %{{.*}}, align 1 + //CHECK: load i8, i8* %{{.*}}, align 1 + //CHECK: load i8, i8* %{{.*}}, align 1 + //CHECK: load i8, i8* %{{.*}}, align 1 + //CHECK: load i8, i8* %{{.*}}, align 1 + //CHECK: load i8, i8* %{{.*}}, align 1 + //CHECK: load i8, i8* %{{.*}}, align 1 + //CHECK: load i8, i8* %{{.*}}, align 1 + //CHECK: load i8, i8* %{{.*}}, align 1 + //CHECK: load i8, i8* %{{.*}}, align 1 + //CHECK: load i8, i8* %{{.*}}, align 1 + //CHECK: load i8, i8* %{{.*}}, align 1 + //CHECK: load i8, i8* %{{.*}}, align 1 + //CHECK: load i8, i8* %{{.*}}, align 1 + //CHECK: load i8, i8* %{{.*}}, align 1 + //CHECK: load i8, i8* %{{.*}}, align 1 + //CHECK: load i8, i8* %{{.*}}, align 1 + //CHECK: load i8, i8* %{{.*}}, align 1 + //CHECK: load i8, i8* %{{.*}}, align 1 + //CHECK: load i8, i8* %{{.*}}, align 1 + //CHECK: load i8, i8* %{{.*}}, align 1 + //CHECK: load i8, i8* %{{.*}}, align 1 + //CHECK: load i8, i8* %{{.*}}, align 1 + //CHECK: load i8, i8* %{{.*}}, align 1 + //CHECK: load i8, i8* %{{.*}}, align 1 + //CHECK: load i8, i8* %{{.*}}, align 1 + //CHECK: load i8, i8* %{{.*}}, align 1 + //CHECK: load i8, i8* %{{.*}}, align 1 + //CHECK: load i8, i8* %{{.*}}, align 1 + //CHECK: load i8, i8* %{{.*}}, align 1 + //CHECK: load i8, i8* %{{.*}}, align 1 + //CHECK: load i8, i8* %{{.*}}, align 1 + //CHECK: load i8, i8* %{{.*}}, align 1 + //CHECK: load i8, i8* %{{.*}}, align 1 + //CHECK: load i8, i8* %{{.*}}, align 1 + //CHECK: load i8, i8* %{{.*}}, align 1 + //CHECK: load i8, i8* %{{.*}}, align 1 + //CHECK: load i8, i8* %{{.*}}, align 1 + //CHECK: load i8, i8* %{{.*}}, align 1 + //CHECK: load i8, i8* %{{.*}}, align 1 + //CHECK: load i8, i8* %{{.*}}, align 1 + //CHECK: load i8, i8* %{{.*}}, align 1 + //CHECK: load i8, i8* %{{.*}}, align 1 + //CHECK: load i8, i8* %{{.*}}, align 1 + //CHECK: load i8, i8* %{{.*}}, align 1 + //CHECK: load i8, i8* %{{.*}}, align 1 + //CHECK: load i8, i8* %{{.*}}, align 1 + //CHECK: load i8, i8* %{{.*}}, align 1 + //CHECK: load i8, i8* %{{.*}}, align 1 + //CHECK: load i8, i8* %{{.*}}, align 1 + //CHECK: load i8, i8* %{{.*}}, align 1 + //CHECK: load i8, i8* %{{.*}}, align 1 + //CHECK: load i8, i8* %{{.*}}, align 1 + //CHECK: load i8, i8* %{{.*}}, align 1 + //CHECK: load i8, i8* %{{.*}}, align 1 + //CHECK: load i8, i8* %{{.*}}, align 1 + //CHECK: load i8, i8* %{{.*}}, align 1 + //CHECK: load i8, i8* %{{.*}}, align 1 + //CHECK: load i8, i8* %{{.*}}, align 1 + //CHECK: load i8, i8* %{{.*}}, align 1 return _mm512_set_epi8(e63, e62, e61, e60, e59, e58, e57, e56, e55, e54, e53, e52, e51, e50, e49, e48,e47, e46, e45, e44, e43, e42, e41, e40, e39, e38, e37, e36, e35, e34, e33, e32,e31, e30, e29, e28, e27, e26, @@ -10286,22 +10287,22 @@ __m512i test_mm512_setr_epi32 (int __A, int __B, int __C, int __D, int __M, int __N, int __O, int __P) { //CHECK-LABEL: @test_mm512_setr_epi32 - //CHECK: load{{.*}}%__P.addr, align 4 - //CHECK: load{{.*}}%__O.addr, align 4 - //CHECK: load{{.*}}%__N.addr, align 4 - //CHECK: load{{.*}}%__M.addr, align 4 - //CHECK: load{{.*}}%__L.addr, align 4 - //CHECK: load{{.*}}%__K.addr, align 4 - //CHECK: load{{.*}}%__J.addr, align 4 - //CHECK: load{{.*}}%__I.addr, align 4 - //CHECK: load{{.*}}%__H.addr, align 4 - //CHECK: load{{.*}}%__G.addr, align 4 - //CHECK: load{{.*}}%__F.addr, align 4 - //CHECK: load{{.*}}%__E.addr, align 4 - //CHECK: load{{.*}}%__D.addr, align 4 - //CHECK: load{{.*}}%__C.addr, align 4 - //CHECK: load{{.*}}%__B.addr, align 4 - //CHECK: load{{.*}}%__A.addr, align 4 + //CHECK: load{{.*}}%{{.*}}, align 4 + //CHECK: load{{.*}}%{{.*}}, align 4 + //CHECK: load{{.*}}%{{.*}}, align 4 + //CHECK: load{{.*}}%{{.*}}, align 4 + //CHECK: load{{.*}}%{{.*}}, align 4 + //CHECK: load{{.*}}%{{.*}}, align 4 + //CHECK: load{{.*}}%{{.*}}, align 4 + //CHECK: load{{.*}}%{{.*}}, align 4 + //CHECK: load{{.*}}%{{.*}}, align 4 + //CHECK: load{{.*}}%{{.*}}, align 4 + //CHECK: load{{.*}}%{{.*}}, align 4 + //CHECK: load{{.*}}%{{.*}}, align 4 + //CHECK: load{{.*}}%{{.*}}, align 4 + //CHECK: load{{.*}}%{{.*}}, align 4 + //CHECK: load{{.*}}%{{.*}}, align 4 + //CHECK: load{{.*}}%{{.*}}, align 4 //CHECK: insertelement{{.*}}i32 0 //CHECK: insertelement{{.*}}i32 1 //CHECK: insertelement{{.*}}i32 2 @@ -10374,14 +10375,14 @@ __m512i test_mm512_setr_epi64 (long long __A, long long __B, long long __C, long long __G, long long __H) { //CHECK-LABEL: @test_mm512_setr_epi64 - //CHECK: load{{.*}}%__H.addr, align 8 - //CHECK: load{{.*}}%__G.addr, align 8 - //CHECK: load{{.*}}%__F.addr, align 8 - //CHECK: load{{.*}}%__E.addr, align 8 - //CHECK: load{{.*}}%__D.addr, align 8 - //CHECK: load{{.*}}%__C.addr, align 8 - //CHECK: load{{.*}}%__B.addr, align 8 - //CHECK: load{{.*}}%__A.addr, align 8 + //CHECK: load{{.*}}%{{.*}}, align 8 + //CHECK: load{{.*}}%{{.*}}, align 8 + //CHECK: load{{.*}}%{{.*}}, align 8 + //CHECK: load{{.*}}%{{.*}}, align 8 + //CHECK: load{{.*}}%{{.*}}, align 8 + //CHECK: load{{.*}}%{{.*}}, align 8 + //CHECK: load{{.*}}%{{.*}}, align 8 + //CHECK: load{{.*}}%{{.*}}, align 8 //CHECK: insertelement{{.*}}i32 0 //CHECK: insertelement{{.*}}i32 1 //CHECK: insertelement{{.*}}i32 2 @@ -10412,14 +10413,14 @@ __m512d test_mm512_setr_pd (double __A, double __B, double __C, double __D, double __E, double __F, double __G, double __H) { //CHECK-LABEL: @test_mm512_setr_pd - //CHECK: load{{.*}}%__H.addr, align 8 - //CHECK: load{{.*}}%__G.addr, align 8 - //CHECK: load{{.*}}%__F.addr, align 8 - //CHECK: load{{.*}}%__E.addr, align 8 - //CHECK: load{{.*}}%__D.addr, align 8 - //CHECK: load{{.*}}%__C.addr, align 8 - //CHECK: load{{.*}}%__B.addr, align 8 - //CHECK: load{{.*}}%__A.addr, align 8 + //CHECK: load{{.*}}%{{.*}}, align 8 + //CHECK: load{{.*}}%{{.*}}, align 8 + //CHECK: load{{.*}}%{{.*}}, align 8 + //CHECK: load{{.*}}%{{.*}}, align 8 + //CHECK: load{{.*}}%{{.*}}, align 8 + //CHECK: load{{.*}}%{{.*}}, align 8 + //CHECK: load{{.*}}%{{.*}}, align 8 + //CHECK: load{{.*}}%{{.*}}, align 8 //CHECK: insertelement{{.*}}i32 0 //CHECK: insertelement{{.*}}i32 1 //CHECK: insertelement{{.*}}i32 2 @@ -10503,22 +10504,22 @@ __m512 test_mm512_setr_ps (float __A, float __B, float __C, float __D, float __M, float __N, float __O, float __P) { //CHECK-LABEL: @test_mm512_setr_ps - //CHECK: load{{.*}}%__P.addr, align 4 - //CHECK: load{{.*}}%__O.addr, align 4 - //CHECK: load{{.*}}%__N.addr, align 4 - //CHECK: load{{.*}}%__M.addr, align 4 - //CHECK: load{{.*}}%__L.addr, align 4 - //CHECK: load{{.*}}%__K.addr, align 4 - //CHECK: load{{.*}}%__J.addr, align 4 - //CHECK: load{{.*}}%__I.addr, align 4 - //CHECK: load{{.*}}%__H.addr, align 4 - //CHECK: load{{.*}}%__G.addr, align 4 - //CHECK: load{{.*}}%__F.addr, align 4 - //CHECK: load{{.*}}%__E.addr, align 4 - //CHECK: load{{.*}}%__D.addr, align 4 - //CHECK: load{{.*}}%__C.addr, align 4 - //CHECK: load{{.*}}%__B.addr, align 4 - //CHECK: load{{.*}}%__A.addr, align 4 + //CHECK: load{{.*}}%{{.*}}, align 4 + //CHECK: load{{.*}}%{{.*}}, align 4 + //CHECK: load{{.*}}%{{.*}}, align 4 + //CHECK: load{{.*}}%{{.*}}, align 4 + //CHECK: load{{.*}}%{{.*}}, align 4 + //CHECK: load{{.*}}%{{.*}}, align 4 + //CHECK: load{{.*}}%{{.*}}, align 4 + //CHECK: load{{.*}}%{{.*}}, align 4 + //CHECK: load{{.*}}%{{.*}}, align 4 + //CHECK: load{{.*}}%{{.*}}, align 4 + //CHECK: load{{.*}}%{{.*}}, align 4 + //CHECK: load{{.*}}%{{.*}}, align 4 + //CHECK: load{{.*}}%{{.*}}, align 4 + //CHECK: load{{.*}}%{{.*}}, align 4 + //CHECK: load{{.*}}%{{.*}}, align 4 + //CHECK: load{{.*}}%{{.*}}, align 4 //CHECK: insertelement{{.*}}i32 0 //CHECK: insertelement{{.*}}i32 1 //CHECK: insertelement{{.*}}i32 2 diff --git a/clang/test/CodeGen/blocks-1.c b/clang/test/CodeGen/blocks-1.c index 8589a7bedfffe..0df13790ddd24 100644 --- a/clang/test/CodeGen/blocks-1.c +++ b/clang/test/CodeGen/blocks-1.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 %s -emit-llvm -o %t -fblocks +// RUN: %clang_cc1 -triple thumbv7-apple-ios %s -emit-llvm -o %t -fblocks // RUN: grep "_Block_object_dispose" %t | count 12 // RUN: grep "__copy_helper_block_" %t | count 9 // RUN: grep "__destroy_helper_block_" %t | count 9 @@ -7,6 +7,15 @@ // RUN: grep "i32 135)" %t | count 2 // RUN: grep "_Block_object_assign" %t | count 5 +// RUN: %clang_cc1 -triple thumbv7-unknown-windows %s -emit-llvm -o %t -fblocks +// RUN: grep "_Block_object_dispose" %t | count 12 +// RUN: grep "__copy_helper_block_" %t | count 11 +// RUN: grep "__destroy_helper_block_" %t | count 11 +// RUN: grep "__Block_byref_object_copy_" %t | count 2 +// RUN: grep "__Block_byref_object_dispose_" %t | count 2 +// RUN: grep "i32 135)" %t | count 2 +// RUN: grep "_Block_object_assign" %t | count 5 + int printf(const char *, ...); void test1() { diff --git a/clang/test/CodeGen/builtins-wasm.c b/clang/test/CodeGen/builtins-wasm.c index 4f14e901edf2f..bba615d3a2d49 100644 --- a/clang/test/CodeGen/builtins-wasm.c +++ b/clang/test/CodeGen/builtins-wasm.c @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -triple wasm32-unknown-unknown -target-feature +unimplemented-simd128 -target-feature +nontrapping-fptoint -target-feature +exception-handling -fno-lax-vector-conversions -O3 -emit-llvm -o - %s | FileCheck %s -check-prefixes WEBASSEMBLY,WEBASSEMBLY32 -// RUN: %clang_cc1 -triple wasm64-unknown-unknown -target-feature +unimplemented-simd128 -target-feature +nontrapping-fptoint -target-feature +exception-handling -fno-lax-vector-conversions -O3 -emit-llvm -o - %s | FileCheck %s -check-prefixes WEBASSEMBLY,WEBASSEMBLY64 -// RUN: not %clang_cc1 -triple wasm64-unknown-unknown -target-feature +nontrapping-fptoint -target-feature +exception-handling -fno-lax-vector-conversions -O3 -emit-llvm -o - %s 2>&1 | FileCheck %s -check-prefixes MISSING-SIMD +// RUN: %clang_cc1 -triple wasm32-unknown-unknown -target-feature +unimplemented-simd128 -target-feature +nontrapping-fptoint -target-feature +exception-handling -target-feature +bulk-memory -fno-lax-vector-conversions -O3 -emit-llvm -o - %s | FileCheck %s -check-prefixes WEBASSEMBLY,WEBASSEMBLY32 +// RUN: %clang_cc1 -triple wasm64-unknown-unknown -target-feature +unimplemented-simd128 -target-feature +nontrapping-fptoint -target-feature +exception-handling -target-feature +bulk-memory -fno-lax-vector-conversions -O3 -emit-llvm -o - %s | FileCheck %s -check-prefixes WEBASSEMBLY,WEBASSEMBLY64 +// RUN: not %clang_cc1 -triple wasm64-unknown-unknown -target-feature +nontrapping-fptoint -target-feature +exception-handling -target-feature +bulk-memory -fno-lax-vector-conversions -O3 -emit-llvm -o - %s 2>&1 | FileCheck %s -check-prefixes MISSING-SIMD // SIMD convenience types typedef char i8x16 __attribute((vector_size(16))); @@ -26,6 +26,18 @@ __SIZE_TYPE__ memory_grow(__SIZE_TYPE__ delta) { // WEBASSEMBLY64: call i64 @llvm.wasm.memory.grow.i64(i32 0, i64 %{{.*}}) } +void memory_init(void *dest, int offset, int size) { + __builtin_wasm_memory_init(3, 0, dest, offset, size); + // WEBASSEMBLY32: call void @llvm.wasm.memory.init(i32 3, i32 0, i8* %{{.*}}, i32 %{{.*}}, i32 %{{.*}}) + // WEBASSEMBLY64: call void @llvm.wasm.memory.init(i32 3, i32 0, i8* %{{.*}}, i32 %{{.*}}, i32 %{{.*}}) +} + +void data_drop() { + __builtin_wasm_data_drop(3); + // WEBASSEMBLY32: call void @llvm.wasm.data.drop(i32 3) + // WEBASSEMBLY64: call void @llvm.wasm.data.drop(i32 3) +} + void throw(unsigned int tag, void *obj) { return __builtin_wasm_throw(tag, obj); // WEBASSEMBLY32: call void @llvm.wasm.throw(i32 %{{.*}}, i8* %{{.*}}) diff --git a/clang/test/CodeGen/builtins.c b/clang/test/CodeGen/builtins.c index 452c1408149ee..25b909ad3a804 100644 --- a/clang/test/CodeGen/builtins.c +++ b/clang/test/CodeGen/builtins.c @@ -771,7 +771,7 @@ void test_builtin_os_log_merge_helper1(void *buf, unsigned u, long long ll) { void test_builtin_os_log_errno() { // CHECK-NOT: @stacksave // CHECK: %[[BUF:.*]] = alloca [4 x i8], align 1 - // CHECK: %[[DECAY:.*]] = getelementptr inbounds [4 x i8], [4 x i8]* %[[BUF]], i32 0, i32 0 + // CHECK: %[[DECAY:.*]] = getelementptr inbounds [4 x i8], [4 x i8]* %[[BUF]], i64 0, i64 0 // CHECK: call void @__os_log_helper_1_2_1_0_96(i8* %[[DECAY]]) // CHECK-NOT: @stackrestore diff --git a/clang/test/CodeGen/callback_pthread_create.c b/clang/test/CodeGen/callback_pthread_create.c index eb92a3c473aeb..785440030b32e 100644 --- a/clang/test/CodeGen/callback_pthread_create.c +++ b/clang/test/CodeGen/callback_pthread_create.c @@ -1,14 +1,22 @@ -// RUN: %clang -O1 %s -S -c -emit-llvm -o - | FileCheck %s -// RUN: %clang -O1 %s -S -c -emit-llvm -o - | opt -ipconstprop -S | FileCheck --check-prefix=IPCP %s - -// This is a linux only test for now due to the include. -// UNSUPPORTED: !linux +// RUN: %clang_cc1 -O1 %s -S -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 -O1 %s -S -emit-llvm -o - | opt -ipconstprop -S | FileCheck --check-prefix=IPCP %s // CHECK: declare !callback ![[cid:[0-9]+]] {{.*}}i32 @pthread_create // CHECK: ![[cid]] = !{![[cidb:[0-9]+]]} // CHECK: ![[cidb]] = !{i64 2, i64 3, i1 false} -#include +// Taken from test/Analysis/retain-release.m +//{ +struct _opaque_pthread_t {}; +struct _opaque_pthread_attr_t {}; +typedef struct _opaque_pthread_t *__darwin_pthread_t; +typedef struct _opaque_pthread_attr_t __darwin_pthread_attr_t; +typedef __darwin_pthread_t pthread_t; +typedef __darwin_pthread_attr_t pthread_attr_t; + +int pthread_create(pthread_t *, const pthread_attr_t *, + void *(*)(void *), void *); +//} const int GlobalVar = 0; @@ -26,8 +34,8 @@ static void *callee1(void *payload) { void foo() { pthread_t MyFirstThread; - pthread_create(&MyFirstThread, NULL, callee0, NULL); + pthread_create(&MyFirstThread, 0, callee0, 0); pthread_t MySecondThread; - pthread_create(&MySecondThread, NULL, callee1, (void *)&GlobalVar); + pthread_create(&MySecondThread, 0, callee1, (void *)&GlobalVar); } diff --git a/clang/test/CodeGen/complex-math.c b/clang/test/CodeGen/complex-math.c index 5fd25d0092265..e28941f838373 100644 --- a/clang/test/CodeGen/complex-math.c +++ b/clang/test/CodeGen/complex-math.c @@ -2,7 +2,7 @@ // RUN: %clang_cc1 %s -O1 -emit-llvm -triple x86_64-pc-win64 -o - | FileCheck %s --check-prefix=X86 // RUN: %clang_cc1 %s -O1 -emit-llvm -triple i686-unknown-unknown -o - | FileCheck %s --check-prefix=X86 // RUN: %clang_cc1 %s -O1 -emit-llvm -triple powerpc-unknown-unknown -o - | FileCheck %s --check-prefix=PPC -// RUN %clang_cc1 %s -O1 -emit-llvm -triple armv7-none-linux-gnueabi -o - | FileCheck %s --check-prefix=ARM +// RUN: %clang_cc1 %s -O1 -emit-llvm -triple armv7-none-linux-gnueabi -o - | FileCheck %s --check-prefix=ARM // RUN: %clang_cc1 %s -O1 -emit-llvm -triple armv7-none-linux-gnueabihf -o - | FileCheck %s --check-prefix=ARMHF // RUN: %clang_cc1 %s -O1 -emit-llvm -triple thumbv7k-apple-watchos2.0 -o - -target-abi aapcs16 | FileCheck %s --check-prefix=ARM7K // RUN: %clang_cc1 %s -O1 -emit-llvm -triple aarch64-unknown-unknown -ffast-math -o - | FileCheck %s --check-prefix=AARCH64-FASTMATH @@ -621,7 +621,7 @@ _Complex double foo(_Complex double a, _Complex double b) { // use the base AAPCS. // ARM-LABEL: @foo( - // ARM: call void { double, double } @__muldc3 + // ARM: call void @__muldc3 // ARMHF-LABEL: @foo( // ARMHF: call { double, double } @__muldc3 diff --git a/clang/test/CodeGen/compound-literal.c b/clang/test/CodeGen/compound-literal.c index 38675a7dda228..17a24d47f2f0f 100644 --- a/clang/test/CodeGen/compound-literal.c +++ b/clang/test/CodeGen/compound-literal.c @@ -11,6 +11,11 @@ _Complex double * x = &(_Complex double){1.0f}; typedef int v4i32 __attribute((vector_size(16))); v4i32 *y = &(v4i32){1,2,3,4}; +// Check generated code for GNU constant array init from compound literal, +// for a global variable. +// CHECK: @compound_array = global [8 x i32] [i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8] +int compound_array[] = __extension__(__builtin_choose_expr(0, 0, _Generic(1, int: (int[]){1, 2, 3, 4, 5, 6, 7, 8}))); + void xxx() { int* a = &(int){1}; struct s {int a, b, c;} * b = &(struct s) {1, 2, 3}; @@ -82,3 +87,13 @@ int compareMyCLH() { const void *b = MyCLH; return a == b; } + +// Check generated code for GNU constant array init from compound literal, +// for a local variable. +// CHECK-LABEL: define i32 @compound_array_fn() +// CHECK: [[COMPOUND_ARRAY:%.*]] = alloca [8 x i32] +// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}, i64 32, i1 false) +int compound_array_fn() { + int compound_array[] = (int[]){1,2,3,4,5,6,7,8}; + return compound_array[0]; +} diff --git a/clang/test/CodeGen/construction-vtable-visibility.cpp b/clang/test/CodeGen/construction-vtable-visibility.cpp new file mode 100644 index 0000000000000..127e1b1905594 --- /dev/null +++ b/clang/test/CodeGen/construction-vtable-visibility.cpp @@ -0,0 +1,16 @@ +// RUN: %clang_cc1 -triple x86_64-linux-unknown -fvisibility hidden -emit-llvm %s -o - | FileCheck %s + +struct Base {}; + +class Parent1 : virtual public Base {}; + +class Parent2 : virtual public Base {}; + +class Child : public Parent1, public Parent2 {}; + +void test() { + Child x; +} + +// CHECK: @_ZTC5Child0_7Parent1 = linkonce_odr hidden unnamed_addr constant +// CHECK: @_ZTC5Child8_7Parent2 = linkonce_odr hidden unnamed_addr constant diff --git a/clang/test/CodeGen/exceptions-seh-finally.c b/clang/test/CodeGen/exceptions-seh-finally.c index 655f0a782f547..3e10d15debcc6 100644 --- a/clang/test/CodeGen/exceptions-seh-finally.c +++ b/clang/test/CodeGen/exceptions-seh-finally.c @@ -279,7 +279,7 @@ void finally_with_func() { } // CHECK-LABEL: define internal void @"?fin$0@0@finally_with_func@@"({{[^)]*}}) -// CHECK: call void @cleanup_with_func(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @"??_C@_0BC@COAGBPGM@finally_with_func?$AA@", i32 0, i32 0)) +// CHECK: call void @cleanup_with_func(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @"??_C@_0BC@COAGBPGM@finally_with_func?$AA@", i{{32|64}} 0, i{{32|64}} 0)) // Look for the absence of noinline. Enum attributes come first, so check that // a string attribute is the first to verify that no enum attributes are diff --git a/clang/test/CodeGen/fortify-std-lib.c b/clang/test/CodeGen/fortify-std-lib.c new file mode 100644 index 0000000000000..f2e170d80bcc0 --- /dev/null +++ b/clang/test/CodeGen/fortify-std-lib.c @@ -0,0 +1,220 @@ +// RUN: %clang_cc1 -triple x86_64-apple-macosx10.14.0 %s -emit-llvm -O0 -disable-llvm-passes -o - -Wno-format-security | FileCheck %s +// RUN: %clang_cc1 -xc++ -triple x86_64-apple-macosx10.14.0 %s -emit-llvm -O0 -disable-llvm-passes -o - -Wno-format-security | FileCheck %s + +#ifdef __cplusplus +#define EXTERN extern "C" +#else +#define EXTERN +#endif + +#define FSL(x,y) __attribute__((fortify_stdlib(x,y))) +typedef unsigned long size_t; + +FSL(0, 0) EXTERN +void *memcpy(void *dst, const void *src, size_t sz); + +EXTERN +void call_memcpy(void *dst, const void *src, size_t sz) { + memcpy(dst, src, sz); + // CHECK-LABEL: define void @call_memcpy + // CHECK: [[REG:%[0-9]+]] = call i64 @llvm.objectsize.i64.p0i8(i8*{{.*}}, i1 false, i1 true, i1 false) + // CHECK: call i8* @__memcpy_chk(i8* {{.*}}, i8* {{.*}}, i64 {{.*}}, i64 [[REG]]) +} + +FSL(0, 0) EXTERN +void *memmove(void *dst, const void *src, size_t sz); + +EXTERN +void call_memmove(void *dst, const void *src, size_t sz) { + memmove(dst, src, sz); + // CHECK-LABEL: define void @call_memmove + // CHECK: [[REG:%[0-9]+]] = call i64 @llvm.objectsize.i64.p0i8(i8*{{.*}}, i1 false, i1 true, i1 false) + // CHECK: call i8* @__memmove_chk(i8* {{.*}}, i8* {{.*}}, i64 {{.*}}, i64 [[REG]]) +} + +FSL(0, 0) EXTERN +void *memset(void *dst, int c, size_t sz); + +EXTERN +void call_memset(void *dst, int c, size_t sz) { + memset(dst, c, sz); + // CHECK-LABEL: define void @call_memset + // CHECK: [[REG:%[0-9]+]] = call i64 @llvm.objectsize.i64.p0i8(i8*{{.*}}, i1 false, i1 true, i1 false) + // CHECK: call i8* @__memset_chk(i8* {{.*}}, i32 {{.*}}, i64 {{.*}}, i64 [[REG]]) +} + +FSL(0, 0) EXTERN +char *stpcpy(char* dst, const char *src); + +EXTERN +void call_stpcpy(char *dst, const char *src) { + stpcpy(dst, src); + // CHECK-LABEL: define void @call_stpcpy + // CHECK: [[REG:%[0-9]+]] = call i64 @llvm.objectsize.i64.p0i8(i8*{{.*}}, i1 false, i1 true, i1 false) + // CHECK: call i8* @__stpcpy_chk(i8* {{.*}}, i8* {{.*}}, i64 [[REG]]) +} + +FSL(0, 0) EXTERN +char *strcat(char* dst, const char *src); + +EXTERN +void call_strcat(char *dst, const char *src) { + strcat(dst, src); + // CHECK-LABEL: define void @call_strcat + // CHECK: [[REG:%[0-9]+]] = call i64 @llvm.objectsize.i64.p0i8(i8*{{.*}}, i1 false, i1 true, i1 false) + // CHECK: call i8* @__strcat_chk(i8* {{.*}}, i8* {{.*}}, i64 [[REG]]) +} + +FSL(0, 0) EXTERN +char *strcpy(char* dst, const char *src); + +EXTERN +void call_strcpy(char *dst, const char *src) { + strcpy(dst, src); + // CHECK-LABEL: define void @call_strcpy + // CHECK: [[REG:%[0-9]+]] = call i64 @llvm.objectsize.i64.p0i8(i8*{{.*}}, i1 false, i1 true, i1 false) + // CHECK: call i8* @__strcpy_chk(i8* {{.*}}, i8* {{.*}}, i64 [[REG]]) +} + +FSL(0, 0) EXTERN +size_t strlcat(char* dst, const char *src, size_t len); + +EXTERN +void call_strlcat(char *dst, const char *src, size_t len) { + strlcat(dst, src, len); + // CHECK-LABEL: define void @call_strlcat + // CHECK: [[REG:%[0-9]+]] = call i64 @llvm.objectsize.i64.p0i8(i8*{{.*}}, i1 false, i1 true, i1 false) + // CHECK: call i64 @__strlcat_chk(i8* {{.*}}, i8* {{.*}}, i64 {{.*}}, i64 [[REG]]) +} + +FSL(0, 0) EXTERN +size_t strlcpy(char* dst, const char *src, size_t len); + +EXTERN +void call_strlcpy(char *dst, const char *src, size_t len) { + strlcpy(dst, src, len); + // CHECK-LABEL: define void @call_strlcpy + // CHECK: [[REG:%[0-9]+]] = call i64 @llvm.objectsize.i64.p0i8(i8*{{.*}}, i1 false, i1 true, i1 false) + // CHECK: call i64 @__strlcpy_chk(i8* {{.*}}, i8* {{.*}}, i64 {{.*}}, i64 [[REG]]) +} + +FSL(0, 0) EXTERN +char *strncat(char* dst, const char *src, size_t len); + +EXTERN +void call_strncat(char *dst, const char *src, size_t len) { + strncat(dst, src, len); + // CHECK-LABEL: define void @call_strncat + // CHECK: [[REG:%[0-9]+]] = call i64 @llvm.objectsize.i64.p0i8(i8*{{.*}}, i1 false, i1 true, i1 false) + // CHECK: call i8* @__strncat_chk(i8* {{.*}}, i8* {{.*}}, i64 {{.*}}, i64 [[REG]]) +} + +FSL(0, 0) EXTERN +char *strncpy(char* dst, const char *src, size_t len); + +EXTERN +void call_strncpy(char *dst, const char *src, size_t len) { + strncpy(dst, src, len); + // CHECK-LABEL: define void @call_strncpy + // CHECK: [[REG:%[0-9]+]] = call i64 @llvm.objectsize.i64.p0i8(i8*{{.*}}, i1 false, i1 true, i1 false) + // CHECK: call i8* @__strncpy_chk(i8* {{.*}}, i8* {{.*}}, i64 {{.*}}, i64 [[REG]]) +} + +FSL(0, 0) EXTERN +char *stpncpy(char* dst, const char *src, size_t len); + +EXTERN +void call_stpncpy(char *dst, const char *src, size_t len) { + stpncpy(dst, src, len); + // CHECK-LABEL: define void @call_stpncpy + // CHECK: [[REG:%[0-9]+]] = call i64 @llvm.objectsize.i64.p0i8(i8*{{.*}}, i1 false, i1 true, i1 false) + // CHECK: call i8* @__stpncpy_chk(i8* {{.*}}, i8* {{.*}}, i64 {{.*}}, i64 [[REG]]) +} + +FSL(0, 0) EXTERN +int snprintf(char *buf, size_t n, const char *fmt, ...); + +EXTERN +void call_snprintf(char *buf, size_t n, const char *fmt) { + snprintf(buf, n, fmt); + // CHECK-LABEL: define void @call_snprintf + // CHECK: [[REG:%[0-9]+]] = call i64 @llvm.objectsize.i64.p0i8(i8*{{.*}}, i1 false, i1 true, i1 false) + // CHECK: call i32 (i8*, i64, i32, i64, i8*, ...) @__snprintf_chk(i8* {{.*}}, i64 {{.*}}, i32 0, i64 [[REG]] +} + +FSL(0, 0) EXTERN +int vsnprintf(char *buf, size_t n, const char *fmt, __builtin_va_list lst); + +EXTERN +void call_vsnprintf(char *buf, size_t n, const char *fmt, __builtin_va_list lst) { + vsnprintf(buf, n, fmt, lst); + // CHECK-LABEL: define void @call_vsnprintf + // CHECK: [[REG:%[0-9]+]] = call i64 @llvm.objectsize.i64.p0i8(i8*{{.*}}, i1 false, i1 true, i1 false) + // CHECK: call i32 @__vsnprintf_chk(i8* {{.*}}, i64 {{.*}}, i32 0, i64 [[REG]] +} + +FSL(0,0) EXTERN +int sprintf(char *buf, const char *fmt, ...); + +void call_sprintf(char *buf, const char* fmt) { + sprintf(buf, fmt); + // CHECK: [[REG:%[0-9]+]] = call i64 @llvm.objectsize.i64.p0i8(i8*{{.*}}, i1 false, i1 true, i1 false) + // CHECK: call i32 (i8*, i32, i64, i8*, ...) @__sprintf_chk(i8* {{.*}}, i32 0, i64 [[REG]] + sprintf(buf, fmt, 1, 2, 3); + // CHECK: [[REG:%[0-9]+]] = call i64 @llvm.objectsize.i64.p0i8(i8*{{.*}}, i1 false, i1 true, i1 false) + // CHECK: call i32 (i8*, i32, i64, i8*, ...) @__sprintf_chk(i8* {{.*}}, i32 0, i64 [[REG]], i8* {{.*}}, i32 1, i32 2, i32 3) +} + +FSL(0, 0) EXTERN +int vsprintf(char *buf, const char *fmt, __builtin_va_list lst); + +EXTERN +void call_vsprintf(char *buf, const char *fmt, __builtin_va_list lst) { + vsprintf(buf, fmt, lst); + // CHECK-LABEL: define void @call_vsprintf + // CHECK: [[REG:%[0-9]+]] = call i64 @llvm.objectsize.i64.p0i8(i8*{{.*}}, i1 false, i1 true, i1 false) + // CHECK: call i32 @__vsprintf_chk(i8* {{.*}}, i32 0, i64 [[REG]] +} + +typedef struct {} FILE; + +FSL(0, 0) EXTERN +int fprintf(FILE *file, const char *fmt, ...); + +EXTERN +void call_fprintf(FILE *file, const char *fmt) { + fprintf(file, fmt); + // CHECK-LABEL: define void @call_fprintf + // CHECK: call i32 ({{.*}}*, i32, i8*, ...) @__fprintf_chk({{.*}}, i32 0, i8* {{.*}}) +} + +FSL(0, 0) EXTERN +int vfprintf(FILE *file, const char *fmt, __builtin_va_list lst); + +EXTERN +void call_vfprintf(FILE *file, const char *fmt, __builtin_va_list lst) { + vfprintf(file, fmt, lst); + // CHECK-LABEL: define void @call_vfprintf + // CHECK: call i32 @__vfprintf_chk({{.*}}, i32 0, i8* {{.*}}, {{.*}}) +} + +FSL(0, 0) EXTERN +int printf(const char *fmt, ...); + +EXTERN +void call_printf(const char *fmt) { + printf(fmt); + // CHECK-LABEL: define void @call_printf + // CHECK: call i32 (i32, i8*, ...) @__printf_chk(i32 0, i8* {{.*}}) +} + +FSL(0, 0) EXTERN +int vprintf(const char *fmt, __builtin_va_list lst); + +EXTERN +void call_vprintf(const char *fmt, __builtin_va_list lst) { + vprintf(fmt, lst); + // CHECK-LABEL: define void @call_vprintf + // CHECK: call i32 @__vprintf_chk(i32 0, {{.*}}) +} + diff --git a/clang/test/CodeGen/inline-asm-x86-flag-output.c b/clang/test/CodeGen/inline-asm-x86-flag-output.c new file mode 100644 index 0000000000000..74ad3a46e70c2 --- /dev/null +++ b/clang/test/CodeGen/inline-asm-x86-flag-output.c @@ -0,0 +1,376 @@ +// RUN: %clang_cc1 -O2 -emit-llvm %s -o - -triple x86_64-unknown-linux-gnu | FileCheck %s + +int test_cca(long nr, volatile long *addr) { + //CHECK-LABEL: @test_cca + //CHECK: = tail call i32 asm "cmp $2,$1", "={@cca},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(i64* %addr, i64 %nr) + int x; + asm("cmp %2,%1" + : "=@cca"(x), "=m"(*(volatile long *)(addr)) + : "r"(nr) + : "cc"); + if (x) + return 0; + return 1; +} + +int test_ccae(long nr, volatile long *addr) { + //CHECK-LABEL: @test_ccae + //CHECK: = tail call i32 asm "cmp $2,$1", "={@ccae},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(i64* %addr, i64 %nr) + int x; + asm("cmp %2,%1" + : "=@ccae"(x), "=m"(*(volatile long *)(addr)) + : "r"(nr) + : "cc"); + if (x) + return 0; + return 1; +} + +int test_ccb(long nr, volatile long *addr) { + //CHECK-LABEL: @test_ccb + //CHECK: = tail call i32 asm "cmp $2,$1", "={@ccb},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(i64* %addr, i64 %nr) + int x; + asm("cmp %2,%1" + : "=@ccb"(x), "=m"(*(volatile long *)(addr)) + : "r"(nr) + : "cc"); + if (x) + return 0; + return 1; +} + +int test_ccbe(long nr, volatile long *addr) { + //CHECK-LABEL: @test_ccbe + //CHECK: tail call i32 asm "cmp $2,$1", "={@ccbe},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(i64* %addr, i64 %nr) + int x; + asm("cmp %2,%1" + : "=@ccbe"(x), "=m"(*(volatile long *)(addr)) + : "r"(nr) + : "cc"); + if (x) + return 0; + return 1; +} + +int test_ccc(long nr, volatile long *addr) { + //CHECK-LABEL: @test_ccc + //CHECK: = tail call i32 asm "cmp $2,$1", "={@ccc},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(i64* %addr, i64 %nr) + int x; + asm("cmp %2,%1" + : "=@ccc"(x), "=m"(*(volatile long *)(addr)) + : "r"(nr) + : "cc"); + if (x) + return 0; + return 1; +} + +int test_cce(long nr, volatile long *addr) { + //CHECK-LABEL: @test_cce + //CHECK: = tail call i32 asm "cmp $2,$1", "={@cce},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(i64* %addr, i64 %nr) + int x; + asm("cmp %2,%1" + : "=@cce"(x), "=m"(*(volatile long *)(addr)) + : "r"(nr) + : "cc"); + if (x) + return 0; + return 1; +} + +int test_ccz(long nr, volatile long *addr) { + //CHECK-LABEL: @test_ccz + //CHECK: = tail call i32 asm "cmp $2,$1", "={@ccz},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(i64* %addr, i64 %nr) + int x; + asm("cmp %2,%1" + : "=@ccz"(x), "=m"(*(volatile long *)(addr)) + : "r"(nr) + : "cc"); + if (x) + return 0; + return 1; +} + +int test_ccg(long nr, volatile long *addr) { + //CHECK-LABEL: @test_ccg + //CHECK: = tail call i32 asm "cmp $2,$1", "={@ccg},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(i64* %addr, i64 %nr) + int x; + asm("cmp %2,%1" + : "=@ccg"(x), "=m"(*(volatile long *)(addr)) + : "r"(nr) + : "cc"); + if (x) + return 0; + return 1; +} + +int test_ccge(long nr, volatile long *addr) { + //CHECK-LABEL: @test_ccge + //CHECK: = tail call i32 asm "cmp $2,$1", "={@ccge},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(i64* %addr, i64 %nr) + int x; + asm("cmp %2,%1" + : "=@ccge"(x), "=m"(*(volatile long *)(addr)) + : "r"(nr) + : "cc"); + if (x) + return 0; + return 1; +} + +int test_ccl(long nr, volatile long *addr) { + //CHECK-LABEL: @test_ccl + //CHECK: = tail call i32 asm "cmp $2,$1", "={@ccl},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(i64* %addr, i64 %nr) + int x; + asm("cmp %2,%1" + : "=@ccl"(x), "=m"(*(volatile long *)(addr)) + : "r"(nr) + : "cc"); + if (x) + return 0; + return 1; +} + +int test_ccle(long nr, volatile long *addr) { + //CHECK-LABEL: @test_ccle + //CHECK: = tail call i32 asm "cmp $2,$1", "={@ccle},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(i64* %addr, i64 %nr) + int x; + asm("cmp %2,%1" + : "=@ccle"(x), "=m"(*(volatile long *)(addr)) + : "r"(nr) + : "cc"); + if (x) + return 0; + return 1; +} + +int test_ccna(long nr, volatile long *addr) { + //CHECK-LABEL: @test_ccna + //CHECK: = tail call i32 asm "cmp $2,$1", "={@ccna},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(i64* %addr, i64 %nr) + int x; + asm("cmp %2,%1" + : "=@ccna"(x), "=m"(*(volatile long *)(addr)) + : "r"(nr) + : "cc"); + if (x) + return 0; + return 1; +} + +int test_ccnae(long nr, volatile long *addr) { + //CHECK-LABEL: @test_ccnae + //CHECK: = tail call i32 asm "cmp $2,$1", "={@ccnae},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(i64* %addr, i64 %nr) + int x; + asm("cmp %2,%1" + : "=@ccnae"(x), "=m"(*(volatile long *)(addr)) + : "r"(nr) + : "cc"); + if (x) + return 0; + return 1; +} + +int test_ccnb(long nr, volatile long *addr) { + //CHECK-LABEL: @test_ccnb + //CHECK: = tail call i32 asm "cmp $2,$1", "={@ccnb},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(i64* %addr, i64 %nr) + int x; + asm("cmp %2,%1" + : "=@ccnb"(x), "=m"(*(volatile long *)(addr)) + : "r"(nr) + : "cc"); + if (x) + return 0; + return 1; +} + +int test_ccnbe(long nr, volatile long *addr) { + //CHECK-LABEL: @test_ccnbe + //CHECK: = tail call i32 asm "cmp $2,$1", "={@ccnbe},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(i64* %addr, i64 %nr) + int x; + asm("cmp %2,%1" + : "=@ccnbe"(x), "=m"(*(volatile long *)(addr)) + : "r"(nr) + : "cc"); + if (x) + return 0; + return 1; +} + +int test_ccnc(long nr, volatile long *addr) { + //CHECK-LABEL: @test_ccnc + //CHECK: = tail call i32 asm "cmp $2,$1", "={@ccnc},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(i64* %addr, i64 %nr) + int x; + asm("cmp %2,%1" + : "=@ccnc"(x), "=m"(*(volatile long *)(addr)) + : "r"(nr) + : "cc"); + if (x) + return 0; + return 1; +} + +int test_ccne(long nr, volatile long *addr) { + //CHECK-LABEL: @test_ccne + //CHECK: = tail call i32 asm "cmp $2,$1", "={@ccne},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(i64* %addr, i64 %nr) + int x; + asm("cmp %2,%1" + : "=@ccne"(x), "=m"(*(volatile long *)(addr)) + : "r"(nr) + : "cc"); + if (x) + return 0; + return 1; +} + +int test_ccnz(long nr, volatile long *addr) { + //CHECK-LABEL: @test_ccnz + //CHECK: = tail call i32 asm "cmp $2,$1", "={@ccnz},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(i64* %addr, i64 %nr) + int x; + asm("cmp %2,%1" + : "=@ccnz"(x), "=m"(*(volatile long *)(addr)) + : "r"(nr) + : "cc"); + if (x) + return 0; + return 1; +} + +int test_ccng(long nr, volatile long *addr) { + //CHECK-LABEL: @test_ccng + //CHECK: = tail call i32 asm "cmp $2,$1", "={@ccng},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(i64* %addr, i64 %nr) + int x; + asm("cmp %2,%1" + : "=@ccng"(x), "=m"(*(volatile long *)(addr)) + : "r"(nr) + : "cc"); + if (x) + return 0; + return 1; +} + +int test_ccnge(long nr, volatile long *addr) { + //CHECK-LABEL: @test_ccnge + //CHECK: = tail call i32 asm "cmp $2,$1", "={@ccnge},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(i64* %addr, i64 %nr) + int x; + asm("cmp %2,%1" + : "=@ccnge"(x), "=m"(*(volatile long *)(addr)) + : "r"(nr) + : "cc"); + if (x) + return 0; + return 1; +} + +int test_ccnl(long nr, volatile long *addr) { + //CHECK-LABEL: @test_ccnl + //CHECK: = tail call i32 asm "cmp $2,$1", "={@ccnl},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(i64* %addr, i64 %nr) + int x; + asm("cmp %2,%1" + : "=@ccnl"(x), "=m"(*(volatile long *)(addr)) + : "r"(nr) + : "cc"); + if (x) + return 0; + return 1; +} + +int test_ccnle(long nr, volatile long *addr) { + //CHECK-LABEL: @test_ccnle + //CHECK: = tail call i32 asm "cmp $2,$1", "={@ccnle},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(i64* %addr, i64 %nr) + int x; + asm("cmp %2,%1" + : "=@ccnle"(x), "=m"(*(volatile long *)(addr)) + : "r"(nr) + : "cc"); + if (x) + return 0; + return 1; +} + +int test_ccno(long nr, volatile long *addr) { + //CHECK-LABEL: @test_ccno + //CHECK: = tail call i32 asm "cmp $2,$1", "={@ccno},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(i64* %addr, i64 %nr) + int x; + asm("cmp %2,%1" + : "=@ccno"(x), "=m"(*(volatile long *)(addr)) + : "r"(nr) + : "cc"); + if (x) + return 0; + return 1; +} + +int test_ccnp(long nr, volatile long *addr) { + //CHECK-LABEL: @test_ccnp + //CHECK: = tail call i32 asm "cmp $2,$1", "={@ccnp},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(i64* %addr, i64 %nr) + int x; + asm("cmp %2,%1" + : "=@ccnp"(x), "=m"(*(volatile long *)(addr)) + : "r"(nr) + : "cc"); + if (x) + return 0; + return 1; +} + +int test_ccns(long nr, volatile long *addr) { + //CHECK-LABEL: @test_ccns + //CHECK: = tail call i32 asm "cmp $2,$1", "={@ccns},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(i64* %addr, i64 %nr) + int x; + asm("cmp %2,%1" + : "=@ccns"(x), "=m"(*(volatile long *)(addr)) + : "r"(nr) + : "cc"); + if (x) + return 0; + return 1; +} + +int test_cco(long nr, volatile long *addr) { + //CHECK-LABEL: @test_cco + //CHECK: = tail call i32 asm "cmp $2,$1", "={@cco},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(i64* %addr, i64 %nr) + int x; + asm("cmp %2,%1" + : "=@cco"(x), "=m"(*(volatile long *)(addr)) + : "r"(nr) + : "cc"); + if (x) + return 0; + return 1; +} + +int test_ccp(long nr, volatile long *addr) { + //CHECK-LABEL: @test_ccp + //CHECK: = tail call i32 asm "cmp $2,$1", "={@ccp},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(i64* %addr, i64 %nr) + int x; + asm("cmp %2,%1" + : "=@ccp"(x), "=m"(*(volatile long *)(addr)) + : "r"(nr) + : "cc"); + if (x) + return 0; + return 1; +} + +int test_ccs(long nr, volatile long *addr) { + //CHECK-LABEL: @test_ccs + //CHECK: = tail call i32 asm "cmp $2,$1", "={@ccs},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(i64* %addr, i64 %nr) + int x; + asm("cmp %2,%1" + : "=@ccs"(x), "=m"(*(volatile long *)(addr)) + : "r"(nr) + : "cc"); + if (x) + return 0; + return 1; +} + +_Bool check_no_clobber_conflicts() { + //CHECK-LABEL: @check_no_clobber_conflicts + //CHECK: = tail call i8 asm "", "={@cce},~{cx},~{dirflag},~{fpsr},~{flags}"() + _Bool b; + asm("" + : "=@cce"(b) + : + : "cx"); + return b; +} diff --git a/clang/test/CodeGen/microsoft-no-common-align.c b/clang/test/CodeGen/microsoft-no-common-align.c index fc46946c00ed2..a7a27a062704f 100644 --- a/clang/test/CodeGen/microsoft-no-common-align.c +++ b/clang/test/CodeGen/microsoft-no-common-align.c @@ -6,3 +6,6 @@ TooLargeAlignment TooBig; // CHECK: @TooBig = dso_local global <16 x float> zeroinitializer, align 64 NormalAlignment JustRight; // CHECK: @JustRight = common dso_local global <1 x float> zeroinitializer, align 4 + +TooLargeAlignment *IsAPointer; +// CHECK: @IsAPointer = common dso_local global <16 x float>* null, align 8 diff --git a/clang/test/CodeGen/ms-intrinsics-rotations.c b/clang/test/CodeGen/ms-intrinsics-rotations.c index 30428b12aa333..b1bb2e6eb0011 100644 --- a/clang/test/CodeGen/ms-intrinsics-rotations.c +++ b/clang/test/CodeGen/ms-intrinsics-rotations.c @@ -12,17 +12,10 @@ // RUN: | FileCheck %s --check-prefixes CHECK,CHECK-32BIT-LONG // RUN: %clang_cc1 -ffreestanding -fms-extensions -fms-compatibility -fms-compatibility-version=17.00 \ // RUN: -triple x86_64--linux -emit-llvm %s -o - \ -// RUN: | FileCheck %s --check-prefixes CHECK,CHECK-32BIT-LONG +// RUN: | FileCheck %s --check-prefixes CHECK,CHECK-64BIT-LONG // RUN: %clang_cc1 -ffreestanding -fms-extensions \ // RUN: -triple x86_64--darwin -emit-llvm %s -o - \ -// RUN: | FileCheck %s --check-prefixes CHECK,CHECK-32BIT-LONG - -// LP64 targets use 'long' as 'int' for MS intrinsics (-fms-extensions) -#ifdef __LP64__ -#define LONG int -#else -#define LONG long -#endif +// RUN: | FileCheck %s --check-prefixes CHECK,CHECK-64BIT-LONG // rotate left @@ -47,12 +40,15 @@ unsigned int test_rotl(unsigned int value, int shift) { // CHECK: [[R:%.*]] = call i32 @llvm.fshl.i32(i32 [[X:%.*]], i32 [[X]], i32 [[Y:%.*]]) // CHECK: ret i32 [[R]] -unsigned LONG test_lrotl(unsigned LONG value, int shift) { +unsigned long test_lrotl(unsigned long value, int shift) { return _lrotl(value, shift); } // CHECK-32BIT-LONG: i32 @test_lrotl // CHECK-32BIT-LONG: [[R:%.*]] = call i32 @llvm.fshl.i32(i32 [[X:%.*]], i32 [[X]], i32 [[Y:%.*]]) // CHECK-32BIT-LONG: ret i32 [[R]] +// CHECK-64BIT-LONG: i64 @test_lrotl +// CHECK-64BIT-LONG: [[R:%.*]] = call i64 @llvm.fshl.i64(i64 [[X:%.*]], i64 [[X]], i64 [[Y:%.*]]) +// CHECK-64BIT-LONG: ret i64 [[R]] unsigned __int64 test_rotl64(unsigned __int64 value, int shift) { return _rotl64(value, shift); @@ -84,12 +80,15 @@ unsigned int test_rotr(unsigned int value, int shift) { // CHECK: [[R:%.*]] = call i32 @llvm.fshr.i32(i32 [[X:%.*]], i32 [[X]], i32 [[Y:%.*]]) // CHECK: ret i32 [[R]] -unsigned LONG test_lrotr(unsigned LONG value, int shift) { +unsigned long test_lrotr(unsigned long value, int shift) { return _lrotr(value, shift); } // CHECK-32BIT-LONG: i32 @test_lrotr // CHECK-32BIT-LONG: [[R:%.*]] = call i32 @llvm.fshr.i32(i32 [[X:%.*]], i32 [[X]], i32 [[Y:%.*]]) // CHECK-32BIT-LONG: ret i32 [[R]] +// CHECK-64BIT-LONG: i64 @test_lrotr +// CHECK-64BIT-LONG: [[R:%.*]] = call i64 @llvm.fshr.i64(i64 [[X:%.*]], i64 [[X]], i64 [[Y:%.*]]) +// CHECK-64BIT-LONG: ret i64 [[R]] unsigned __int64 test_rotr64(unsigned __int64 value, int shift) { return _rotr64(value, shift); diff --git a/clang/test/CodeGen/ms-intrinsics.c b/clang/test/CodeGen/ms-intrinsics.c index e59b1d36a8e27..59ddaf8c107cb 100644 --- a/clang/test/CodeGen/ms-intrinsics.c +++ b/clang/test/CodeGen/ms-intrinsics.c @@ -9,7 +9,7 @@ // RUN: | FileCheck %s --check-prefixes CHECK,CHECK-X64,CHECK-ARM-X64,CHECK-INTEL // RUN: %clang_cc1 -ffreestanding -fms-extensions -fms-compatibility -fms-compatibility-version=17.00 \ // RUN: -triple aarch64-windows -Oz -emit-llvm %s -o - \ -// RUN: | FileCheck %s --check-prefixes CHECK-ARM-ARM64,CHECK-ARM-X64 +// RUN: | FileCheck %s --check-prefixes CHECK-ARM-ARM64,CHECK-ARM-X64,CHECK-ARM64 // intrin.h needs size_t, but -ffreestanding prevents us from getting it from // stddef.h. Work around it with this typedef. @@ -1342,15 +1342,14 @@ __int64 test_InterlockedDecrement64_nf(__int64 volatile *Addend) { // CHECK-ARM-ARM64: } #endif -#if !defined(__aarch64__) void test__fastfail() { __fastfail(42); } // CHECK-LABEL: define{{.*}} void @test__fastfail() // CHECK-ARM: call void asm sideeffect "udf #251", "{r0}"(i32 42) #[[NORETURN:[0-9]+]] // CHECK-INTEL: call void asm sideeffect "int $$0x29", "{cx}"(i32 42) #[[NORETURN]] +// CHECK-ARM64: call void asm sideeffect "brk #0xF003", "{w0}"(i32 42) #[[NORETURN:[0-9]+]] // Attributes come last. // CHECK: attributes #[[NORETURN]] = { noreturn{{.*}} } -#endif diff --git a/clang/test/CodeGen/ms-setjmp.c b/clang/test/CodeGen/ms-setjmp.c index a6e30cb96aa47..5df9ce5ad20e0 100644 --- a/clang/test/CodeGen/ms-setjmp.c +++ b/clang/test/CodeGen/ms-setjmp.c @@ -21,12 +21,12 @@ int test_setjmp() { // X64-LABEL: define dso_local i32 @test_setjmp // X64: %[[addr:.*]] = call i8* @llvm.frameaddress(i32 0) - // X64: %[[call:.*]] = call i32 @_setjmp(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @jb, i32 0, i32 0), i8* %[[addr]]) + // X64: %[[call:.*]] = call i32 @_setjmp(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @jb, i64 0, i64 0), i8* %[[addr]]) // X64-NEXT: ret i32 %[[call]] // AARCH64-LABEL: define dso_local i32 @test_setjmp // AARCH64: %[[addr:.*]] = call i8* @llvm.sponentry() - // AARCH64: %[[call:.*]] = call i32 @_setjmpex(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @jb, i32 0, i32 0), i8* %[[addr]]) + // AARCH64: %[[call:.*]] = call i32 @_setjmpex(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @jb, i64 0, i64 0), i8* %[[addr]]) // AARCH64-NEXT: ret i32 %[[call]] } @@ -34,11 +34,11 @@ int test_setjmpex() { return _setjmpex(jb); // X64-LABEL: define dso_local i32 @test_setjmpex // X64: %[[addr:.*]] = call i8* @llvm.frameaddress(i32 0) - // X64: %[[call:.*]] = call i32 @_setjmpex(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @jb, i32 0, i32 0), i8* %[[addr]]) + // X64: %[[call:.*]] = call i32 @_setjmpex(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @jb, i64 0, i64 0), i8* %[[addr]]) // X64-NEXT: ret i32 %[[call]] // AARCH64-LABEL: define dso_local i32 @test_setjmpex // AARCH64: %[[addr:.*]] = call i8* @llvm.sponentry() - // AARCH64: %[[call:.*]] = call i32 @_setjmpex(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @jb, i32 0, i32 0), i8* %[[addr]]) + // AARCH64: %[[call:.*]] = call i32 @_setjmpex(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @jb, i64 0, i64 0), i8* %[[addr]]) // AARCH64-NEXT: ret i32 %[[call]] } diff --git a/clang/test/CodeGen/ms-x86-intrinsics.c b/clang/test/CodeGen/ms-x86-intrinsics.c index c231dbd56e39e..ffcf09052babf 100644 --- a/clang/test/CodeGen/ms-x86-intrinsics.c +++ b/clang/test/CodeGen/ms-x86-intrinsics.c @@ -144,28 +144,28 @@ unsigned __int64 test__shiftleft128(unsigned __int64 l, unsigned __int64 h, return __shiftleft128(l, h, d); } // CHECK-X64-LABEL: define dso_local i64 @test__shiftleft128(i64 %l, i64 %h, i8 %d) -// CHECK-X64 = zext i64 %h to i128 -// CHECK-X64 = shl nuw i128 %0, 64 -// CHECK-X64 = zext i64 %l to i128 -// CHECK-X64 = or i128 %1, %2 -// CHECK-X64 = and i8 %d, 63 -// CHECK-X64 = shl i128 % -// CHECK-X64 = lshr i128 % -// CHECK-X64 = trunc i128 % -// CHECK-X64 ret i64 % +// CHECK-X64: = zext i64 %{{.*}} to i128 +// CHECK-X64: = shl nuw i128 %{{.*}}, 64 +// CHECK-X64: = zext i64 %{{.*}} to i128 +// CHECK-X64: = or i128 % +// CHECK-X64: = and i8 %{{.*}}, 63 +// CHECK-X64: = shl i128 % +// CHECK-X64: = lshr i128 % +// CHECK-X64: = trunc i128 % +// CHECK-X64: ret i64 % unsigned __int64 test__shiftright128(unsigned __int64 l, unsigned __int64 h, unsigned char d) { return __shiftright128(l, h, d); } // CHECK-X64-LABEL: define dso_local i64 @test__shiftright128(i64 %l, i64 %h, i8 %d) -// CHECK-X64 = zext i64 %h to i128 -// CHECK-X64 = shl nuw i128 % -// CHECK-X64 = zext i64 %l to i128 -// CHECK-X64 = or i128 % -// CHECK-X64 = and i8 %d, 63 -// CHECK-X64 = lshr i128 % -// CHECK-X64 = trunc i128 % -// CHECK-X64 ret i64 % +// CHECK-X64: = zext i64 %{{.*}} to i128 +// CHECK-X64: = shl nuw i128 %{{.*}}, 64 +// CHECK-X64: = zext i64 %{{.*}} to i128 +// CHECK-X64: = or i128 % +// CHECK-X64: = and i8 %{{.*}}, 63 +// CHECK-X64: = lshr i128 % +// CHECK-X64: = trunc i128 % +// CHECK-X64: ret i64 % #endif // defined(__x86_64__) diff --git a/clang/test/CodeGen/msp430-fp-elim.c b/clang/test/CodeGen/msp430-fp-elim.c new file mode 100644 index 0000000000000..c022adecbce9a --- /dev/null +++ b/clang/test/CodeGen/msp430-fp-elim.c @@ -0,0 +1,19 @@ +// REQUIRES: msp430-registered-target +// RUN: %clang_cc1 -mdisable-fp-elim -triple msp430 -S %s -o - | FileCheck %s --check-prefix=FP_ENFORCED +// RUN: %clang_cc1 -triple msp430 -S %s -o - | FileCheck %s --check-prefix=FP_DEFAULT + +// Check the frame pointer is not used on MSP430 by default, but can be forcibly turned on. + +// FP_ENFORCED: push r4 +// FP_ENFORCED: mov r4, r4 +// FP_ENFORCED: pop r4 +// FP_DEFAULT: .globl fp_elim_check +// FP_DEFAULT-NOT: push r4 +// FP_DEFAULT: mov r4, r4 +// FP_DEFAULT-NOT: pop r4 + +void fp_elim_check() +{ + asm volatile ("mov r4, r4"); +} + diff --git a/clang/test/CodeGen/msp430-reloc.c b/clang/test/CodeGen/msp430-reloc.c new file mode 100644 index 0000000000000..f3d858839ec7c --- /dev/null +++ b/clang/test/CodeGen/msp430-reloc.c @@ -0,0 +1,30 @@ +// REQUIRES: msp430-registered-target +// RUN: %clang -target msp430 -fPIC -S %s -o - | FileCheck %s + +// Check the compilation does not crash as it was crashing before with "-fPIC" enabled + +void *alloca(unsigned int size); + +// CHECK: .globl foo +short foo(char** data, char encoding) +{ + char* encoding_addr = alloca(sizeof(char)); + *encoding_addr = encoding; + + char tmp3 = *encoding_addr; + short conv2 = tmp3; + short and = conv2 & 0xf; + + switch (and) + { + case 0 : + case 4 : + case 10 : + return 1; + case 11 : + return 2; + } + + return 0; +} + diff --git a/clang/test/CodeGen/mult-alt-generic.c b/clang/test/CodeGen/mult-alt-generic.c index 6e7b11efe1629..f5546d45ccbb5 100644 --- a/clang/test/CodeGen/mult-alt-generic.c +++ b/clang/test/CodeGen/mult-alt-generic.c @@ -130,7 +130,7 @@ void single_X() asm("foo %1,%0" : "=r" (out0) : "X" (min1)); // CHECK: call i32 asm "foo $1,$0", "=r,X[[CLOBBERS]](i32 1) asm("foo %1,%0" : "=r" (out0) : "X" (1)); - // CHECK: call i32 asm "foo $1,$0", "=r,X[[CLOBBERS]](i32* getelementptr inbounds ([2 x i32], [2 x i32]* {{[a-zA-Z0-9@%]+}}, i32 0, i32 0)) + // CHECK: call i32 asm "foo $1,$0", "=r,X[[CLOBBERS]](i32* getelementptr inbounds ([2 x i32], [2 x i32]* {{[a-zA-Z0-9@%]+}}, i{{32|64}} 0, i{{32|64}} 0)) asm("foo %1,%0" : "=r" (out0) : "X" (marray)); // CHECK: call i32 asm "foo $1,$0", "=r,X[[CLOBBERS]](double {{[0-9.eE+-]+}}) asm("foo %1,%0" : "=r" (out0) : "X" (1.0e+01)); @@ -143,7 +143,7 @@ void single_p() { register int out0 = 0; // Constraint converted differently on different platforms moved to platform-specific. - // : call i32 asm "foo $1,$0", "=r,im[[CLOBBERS]](i32* getelementptr inbounds ([2 x i32], [2 x i32]* {{[a-zA-Z0-9@%]+}}, i32 0, i32 0)) + // : call i32 asm "foo $1,$0", "=r,im[[CLOBBERS]](i32* getelementptr inbounds ([2 x i32], [2 x i32]* {{[a-zA-Z0-9@%]+}}, i{{32|64}} 0, i{{32|64}} 0)) asm("foo %1,%0" : "=r" (out0) : "p" (marray)); } @@ -263,7 +263,7 @@ void multi_X() asm("foo %1,%0" : "=r,r" (out0) : "r,X" (min1)); // CHECK: call i32 asm "foo $1,$0", "=r|r,r|X[[CLOBBERS]](i32 1) asm("foo %1,%0" : "=r,r" (out0) : "r,X" (1)); - // CHECK: call i32 asm "foo $1,$0", "=r|r,r|X[[CLOBBERS]](i32* getelementptr inbounds ([2 x i32], [2 x i32]* {{[a-zA-Z0-9@%]+}}, i32 0, i32 0)) + // CHECK: call i32 asm "foo $1,$0", "=r|r,r|X[[CLOBBERS]](i32* getelementptr inbounds ([2 x i32], [2 x i32]* {{[a-zA-Z0-9@%]+}}, i{{32|64}} 0, i{{32|64}} 0)) asm("foo %1,%0" : "=r,r" (out0) : "r,X" (marray)); // CHECK: call i32 asm "foo $1,$0", "=r|r,r|X[[CLOBBERS]](double {{[0-9.eE+-]+}}) asm("foo %1,%0" : "=r,r" (out0) : "r,X" (1.0e+01)); @@ -276,6 +276,6 @@ void multi_p() { register int out0 = 0; // Constraint converted differently on different platforms moved to platform-specific. - // : call i32 asm "foo $1,$0", "=r|r,r|im[[CLOBBERS]](i32* getelementptr inbounds ([2 x i32], [2 x i32]* {{[a-zA-Z0-9@%]+}}, i32 0, i32 0)) + // : call i32 asm "foo $1,$0", "=r|r,r|im[[CLOBBERS]](i32* getelementptr inbounds ([2 x i32], [2 x i32]* {{[a-zA-Z0-9@%]+}}, {{i[0-9]*}} 0, {{i[0-9]*}} 0)) asm("foo %1,%0" : "=r,r" (out0) : "r,p" (marray)); } diff --git a/clang/test/CodeGen/object-size.c b/clang/test/CodeGen/object-size.c index 561fd4d9119b3..0f0069d80264b 100644 --- a/clang/test/CodeGen/object-size.c +++ b/clang/test/CodeGen/object-size.c @@ -22,25 +22,25 @@ int gi, gj; // CHECK-LABEL: define void @test1 void test1() { - // CHECK: = call i8* @__strcpy_chk(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @gbuf, i64 0, i64 4), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i32 0, i32 0), i64 59) + // CHECK: = call i8* @__strcpy_chk(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @gbuf, i64 0, i64 4), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i64 59) strcpy(&gbuf[4], "Hi there"); } // CHECK-LABEL: define void @test2 void test2() { - // CHECK: = call i8* @__strcpy_chk(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @gbuf, i32 0, i32 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i32 0, i32 0), i64 63) + // CHECK: = call i8* @__strcpy_chk(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @gbuf, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i64 63) strcpy(gbuf, "Hi there"); } // CHECK-LABEL: define void @test3 void test3() { - // CHECK: = call i8* @__strcpy_chk(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @gbuf, i64 1, i64 37), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i32 0, i32 0), i64 0) + // CHECK: = call i8* @__strcpy_chk(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @gbuf, i64 1, i64 37), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i64 0) strcpy(&gbuf[100], "Hi there"); } // CHECK-LABEL: define void @test4 void test4() { - // CHECK: = call i8* @__strcpy_chk(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @gbuf, i64 0, i64 -1), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i32 0, i32 0), i64 0) + // CHECK: = call i8* @__strcpy_chk(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @gbuf, i64 0, i64 -1), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i64 0) strcpy((char*)(void*)&gbuf[-1], "Hi there"); } @@ -55,7 +55,7 @@ void test5() { void test6() { char buf[57]; - // CHECK: = call i8* @__strcpy_chk(i8* %{{.*}}, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i32 0, i32 0), i64 53) + // CHECK: = call i8* @__strcpy_chk(i8* %{{.*}}, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i64 53) strcpy(&buf[4], "Hi there"); } @@ -65,7 +65,7 @@ void test7() { // Ensure we only evaluate the side-effect once. // CHECK: = add // CHECK-NOT: = add - // CHECK: = call i8* @__strcpy_chk(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @gbuf, i32 0, i32 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i32 0, i32 0), i64 63) + // CHECK: = call i8* @__strcpy_chk(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @gbuf, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i64 63) strcpy((++i, gbuf), "Hi there"); } @@ -73,14 +73,14 @@ void test7() { void test8() { char *buf[50]; // CHECK-NOT: __strcpy_chk - // CHECK: = call i8* @__inline_strcpy_chk(i8* %{{.*}}, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i32 0, i32 0)) + // CHECK: = call i8* @__inline_strcpy_chk(i8* %{{.*}}, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0)) strcpy(buf[++gi], "Hi there"); } // CHECK-LABEL: define void @test9 void test9() { // CHECK-NOT: __strcpy_chk - // CHECK: = call i8* @__inline_strcpy_chk(i8* %{{.*}}, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i32 0, i32 0)) + // CHECK: = call i8* @__inline_strcpy_chk(i8* %{{.*}}, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0)) strcpy((char *)((++gi) + gj), "Hi there"); } @@ -88,49 +88,49 @@ void test9() { char **p; void test10() { // CHECK-NOT: __strcpy_chk - // CHECK: = call i8* @__inline_strcpy_chk(i8* %{{.*}}, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i32 0, i32 0)) + // CHECK: = call i8* @__inline_strcpy_chk(i8* %{{.*}}, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0)) strcpy(*(++p), "Hi there"); } // CHECK-LABEL: define void @test11 void test11() { // CHECK-NOT: __strcpy_chk - // CHECK: = call i8* @__inline_strcpy_chk(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @gbuf, i32 0, i32 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i32 0, i32 0)) + // CHECK: = call i8* @__inline_strcpy_chk(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @gbuf, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0)) strcpy(gp = gbuf, "Hi there"); } // CHECK-LABEL: define void @test12 void test12() { // CHECK-NOT: __strcpy_chk - // CHECK: = call i8* @__inline_strcpy_chk(i8* %{{.*}}, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i32 0, i32 0)) + // CHECK: = call i8* @__inline_strcpy_chk(i8* %{{.*}}, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0)) strcpy(++gp, "Hi there"); } // CHECK-LABEL: define void @test13 void test13() { // CHECK-NOT: __strcpy_chk - // CHECK: = call i8* @__inline_strcpy_chk(i8* %{{.*}}, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i32 0, i32 0)) + // CHECK: = call i8* @__inline_strcpy_chk(i8* %{{.*}}, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0)) strcpy(gp++, "Hi there"); } // CHECK-LABEL: define void @test14 void test14() { // CHECK-NOT: __strcpy_chk - // CHECK: = call i8* @__inline_strcpy_chk(i8* %{{.*}}, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i32 0, i32 0)) + // CHECK: = call i8* @__inline_strcpy_chk(i8* %{{.*}}, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0)) strcpy(--gp, "Hi there"); } // CHECK-LABEL: define void @test15 void test15() { // CHECK-NOT: __strcpy_chk - // CHECK: = call i8* @__inline_strcpy_chk(i8* %{{..*}}, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i32 0, i32 0)) + // CHECK: = call i8* @__inline_strcpy_chk(i8* %{{..*}}, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0)) strcpy(gp--, "Hi there"); } // CHECK-LABEL: define void @test16 void test16() { // CHECK-NOT: __strcpy_chk - // CHECK: = call i8* @__inline_strcpy_chk(i8* %{{.*}}, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i32 0, i32 0)) + // CHECK: = call i8* @__inline_strcpy_chk(i8* %{{.*}}, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0)) strcpy(gp += 1, "Hi there"); } diff --git a/clang/test/CodeGen/powerpc_types.c b/clang/test/CodeGen/powerpc_types.c index b7d0f5de49859..86eb7f8356801 100644 --- a/clang/test/CodeGen/powerpc_types.c +++ b/clang/test/CodeGen/powerpc_types.c @@ -1,4 +1,6 @@ // RUN: %clang_cc1 -triple powerpc-unknown-freebsd -emit-llvm -o - %s| FileCheck -check-prefix=SVR4-CHECK %s +// RUN: %clang_cc1 -triple powerpc-unknown-netbsd -emit-llvm -o - %s| FileCheck -check-prefix=SVR4-CHECK %s +// RUN: %clang_cc1 -triple powerpc-unknown-openbsd -emit-llvm -o - %s| FileCheck -check-prefix=SVR4-CHECK %s #include diff --git a/clang/test/CodeGen/ppc64-dwarf.c b/clang/test/CodeGen/ppc64-dwarf.c index 679bded453a81..fc815c68988ee 100644 --- a/clang/test/CodeGen/ppc64-dwarf.c +++ b/clang/test/CodeGen/ppc64-dwarf.c @@ -8,122 +8,121 @@ int test() { } // CHECK-LABEL: define signext i32 @test() -// CHECK: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 0), align 1 -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 1), align 1 -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 2), align 1 -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 3), align 1 -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 4), align 1 -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 5), align 1 -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 6), align 1 -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 7), align 1 -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 8), align 1 -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 9), align 1 -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 10), align 1 -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 11), align 1 -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 12), align 1 -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 13), align 1 -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 14), align 1 -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 15), align 1 -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 16), align 1 -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 17), align 1 -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 18), align 1 -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 19), align 1 -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 20), align 1 -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 21), align 1 -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 22), align 1 -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 23), align 1 -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 24), align 1 -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 25), align 1 -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 26), align 1 -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 27), align 1 -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 28), align 1 -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 29), align 1 -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 30), align 1 -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 31), align 1 -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 32), align 1 -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 33), align 1 -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 34), align 1 -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 35), align 1 -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 36), align 1 -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 37), align 1 -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 38), align 1 -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 39), align 1 -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 40), align 1 -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 41), align 1 -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 42), align 1 -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 43), align 1 -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 44), align 1 -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 45), align 1 -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 46), align 1 -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 47), align 1 -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 48), align 1 -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 49), align 1 -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 50), align 1 -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 51), align 1 -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 52), align 1 -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 53), align 1 -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 54), align 1 -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 55), align 1 -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 56), align 1 -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 57), align 1 -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 58), align 1 -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 59), align 1 -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 60), align 1 -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 61), align 1 -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 62), align 1 -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 63), align 1 -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 64), align 1 -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 65), align 1 -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 66), align 1 -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 67), align 1 -// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 68), align 1 -// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 69), align 1 -// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 70), align 1 -// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 71), align 1 -// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 72), align 1 -// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 73), align 1 -// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 74), align 1 -// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 75), align 1 -// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 76), align 1 -// CHECK-NEXT: store i8 16, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 77), align 1 -// CHECK-NEXT: store i8 16, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 78), align 1 -// CHECK-NEXT: store i8 16, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 79), align 1 -// CHECK-NEXT: store i8 16, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 80), align 1 -// CHECK-NEXT: store i8 16, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 81), align 1 -// CHECK-NEXT: store i8 16, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 82), align 1 -// CHECK-NEXT: store i8 16, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 83), align 1 -// CHECK-NEXT: store i8 16, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 84), align 1 -// CHECK-NEXT: store i8 16, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 85), align 1 -// CHECK-NEXT: store i8 16, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 86), align 1 -// CHECK-NEXT: store i8 16, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 87), align 1 -// CHECK-NEXT: store i8 16, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 88), align 1 -// CHECK-NEXT: store i8 16, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 89), align 1 -// CHECK-NEXT: store i8 16, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 90), align 1 -// CHECK-NEXT: store i8 16, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 91), align 1 -// CHECK-NEXT: store i8 16, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 92), align 1 -// CHECK-NEXT: store i8 16, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 93), align 1 -// CHECK-NEXT: store i8 16, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 94), align 1 -// CHECK-NEXT: store i8 16, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 95), align 1 -// CHECK-NEXT: store i8 16, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 96), align 1 -// CHECK-NEXT: store i8 16, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 97), align 1 -// CHECK-NEXT: store i8 16, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 98), align 1 -// CHECK-NEXT: store i8 16, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 99), align 1 -// CHECK-NEXT: store i8 16, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 100), align 1 -// CHECK-NEXT: store i8 16, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 101), align 1 -// CHECK-NEXT: store i8 16, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 102), align 1 -// CHECK-NEXT: store i8 16, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 103), align 1 -// CHECK-NEXT: store i8 16, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 104), align 1 -// CHECK-NEXT: store i8 16, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 105), align 1 -// CHECK-NEXT: store i8 16, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 106), align 1 -// CHECK-NEXT: store i8 16, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 107), align 1 -// CHECK-NEXT: store i8 16, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 108), align 1 -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 109), align 1 -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 110), align 1 -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 111), align 1 -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 112), align 1 -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 113), align 1 -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 114), align 1 -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 115), align 1 -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i32 0, i32 116), align 1 +// CHECK: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 0), align 1 +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 1), align 1 +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 2), align 1 +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 3), align 1 +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 4), align 1 +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 5), align 1 +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 6), align 1 +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 7), align 1 +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 8), align 1 +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 9), align 1 +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 10), align 1 +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 11), align 1 +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 12), align 1 +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 13), align 1 +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 14), align 1 +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 15), align 1 +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 16), align 1 +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 17), align 1 +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 18), align 1 +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 19), align 1 +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 20), align 1 +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 21), align 1 +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 22), align 1 +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 23), align 1 +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 24), align 1 +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 25), align 1 +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 26), align 1 +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 27), align 1 +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 28), align 1 +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 29), align 1 +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 30), align 1 +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 31), align 1 +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 32), align 1 +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 33), align 1 +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 34), align 1 +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 35), align 1 +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 36), align 1 +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 37), align 1 +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 38), align 1 +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 39), align 1 +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 40), align 1 +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 41), align 1 +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 42), align 1 +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 43), align 1 +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 44), align 1 +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 45), align 1 +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 46), align 1 +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 47), align 1 +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 48), align 1 +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 49), align 1 +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 50), align 1 +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 51), align 1 +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 52), align 1 +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 53), align 1 +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 54), align 1 +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 55), align 1 +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 56), align 1 +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 57), align 1 +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 58), align 1 +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 59), align 1 +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 60), align 1 +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 61), align 1 +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 62), align 1 +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 63), align 1 +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 64), align 1 +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 65), align 1 +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 66), align 1 +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 67), align 1 +// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 68), align 1 +// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 69), align 1 +// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 70), align 1 +// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 71), align 1 +// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 72), align 1 +// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 73), align 1 +// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 74), align 1 +// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 75), align 1 +// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 76), align 1 +// CHECK-NEXT: store i8 16, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 77), align 1 +// CHECK-NEXT: store i8 16, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 78), align 1 +// CHECK-NEXT: store i8 16, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 79), align 1 +// CHECK-NEXT: store i8 16, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 80), align 1 +// CHECK-NEXT: store i8 16, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 81), align 1 +// CHECK-NEXT: store i8 16, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 82), align 1 +// CHECK-NEXT: store i8 16, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 83), align 1 +// CHECK-NEXT: store i8 16, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 84), align 1 +// CHECK-NEXT: store i8 16, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 85), align 1 +// CHECK-NEXT: store i8 16, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 86), align 1 +// CHECK-NEXT: store i8 16, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 87), align 1 +// CHECK-NEXT: store i8 16, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 88), align 1 +// CHECK-NEXT: store i8 16, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 89), align 1 +// CHECK-NEXT: store i8 16, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 90), align 1 +// CHECK-NEXT: store i8 16, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 91), align 1 +// CHECK-NEXT: store i8 16, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 92), align 1 +// CHECK-NEXT: store i8 16, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 93), align 1 +// CHECK-NEXT: store i8 16, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 94), align 1 +// CHECK-NEXT: store i8 16, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 95), align 1 +// CHECK-NEXT: store i8 16, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 96), align 1 +// CHECK-NEXT: store i8 16, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 97), align 1 +// CHECK-NEXT: store i8 16, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 98), align 1 +// CHECK-NEXT: store i8 16, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 99), align 1 +// CHECK-NEXT: store i8 16, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 100), align 1 +// CHECK-NEXT: store i8 16, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 101), align 1 +// CHECK-NEXT: store i8 16, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 102), align 1 +// CHECK-NEXT: store i8 16, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 103), align 1 +// CHECK-NEXT: store i8 16, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 104), align 1 +// CHECK-NEXT: store i8 16, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 105), align 1 +// CHECK-NEXT: store i8 16, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 106), align 1 +// CHECK-NEXT: store i8 16, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 107), align 1 +// CHECK-NEXT: store i8 16, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 108), align 1 +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 109), align 1 +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 110), align 1 +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 111), align 1 +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 112), align 1 +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 113), align 1 +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 114), align 1 +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 115), align 1 +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 116), align 1 // CHECK-NEXT: ret i32 1 - diff --git a/clang/test/CodeGen/rot-intrinsics.c b/clang/test/CodeGen/rot-intrinsics.c new file mode 100644 index 0000000000000..0ee378ff1d9d3 --- /dev/null +++ b/clang/test/CodeGen/rot-intrinsics.c @@ -0,0 +1,43 @@ +// RUN: %clang_cc1 -ffreestanding \ +// RUN: -triple i686--linux -emit-llvm %s -o - \ +// RUN: | FileCheck %s --check-prefixes CHECK,CHECK-32BIT-LONG + +// RUN: %clang_cc1 -ffreestanding \ +// RUN: -triple x86_64--linux -emit-llvm %s -o - \ +// RUN: | FileCheck %s --check-prefixes CHECK,CHECK-64BIT-LONG + +unsigned int test_rotl(unsigned int value, int shift) { + return _rotl(value, shift); +} +// CHECK: i32 @test_rotl +// CHECK: [[R:%.*]] = call i32 @llvm.fshl.i32(i32 [[X:%.*]], i32 [[X]], i32 [[Y:%.*]]) +// CHECK: ret i32 [[R]] + +unsigned long test_lrotl(unsigned long value, int shift) { + return _lrotl(value, shift); +} +// CHECK-32BIT-LONG: i32 @test_lrotl +// CHECK-32BIT-LONG: [[R:%.*]] = call i32 @llvm.fshl.i32(i32 [[X:%.*]], i32 [[X]], i32 [[Y:%.*]]) +// CHECK-32BIT-LONG: ret i32 [[R]] +// CHECK-64BIT-LONG: i64 @test_lrotl +// CHECK-64BIT-LONG: [[R:%.*]] = call i64 @llvm.fshl.i64(i64 [[X:%.*]], i64 [[X]], i64 [[Y:%.*]]) +// CHECK-64BIT-LONG: ret i64 [[R]] + + +unsigned int test_rotr(unsigned int value, int shift) { + return _rotr(value, shift); +} +// CHECK: i32 @test_rotr +// CHECK: [[R:%.*]] = call i32 @llvm.fshr.i32(i32 [[X:%.*]], i32 [[X]], i32 [[Y:%.*]]) +// CHECK: ret i32 [[R]] + +unsigned long test_lrotr(unsigned long value, int shift) { + return _lrotr(value, shift); +} +// CHECK-32BIT-LONG: i32 @test_lrotr +// CHECK-32BIT-LONG: [[R:%.*]] = call i32 @llvm.fshr.i32(i32 [[X:%.*]], i32 [[X]], i32 [[Y:%.*]]) +// CHECK-32BIT-LONG: ret i32 [[R]] +// CHECK-64BIT-LONG: i64 @test_lrotr +// CHECK-64BIT-LONG: [[R:%.*]] = call i64 @llvm.fshr.i64(i64 [[X:%.*]], i64 [[X]], i64 [[Y:%.*]]) +// CHECK-64BIT-LONG: ret i64 [[R]] + diff --git a/clang/test/CodeGen/sanitize-atomic-int-overflow.c b/clang/test/CodeGen/sanitize-atomic-int-overflow.c new file mode 100644 index 0000000000000..a1064f47c3498 --- /dev/null +++ b/clang/test/CodeGen/sanitize-atomic-int-overflow.c @@ -0,0 +1,33 @@ +// RUN: %clang_cc1 -triple x86_64-apple-macosx10.14.0 -fsanitize=unsigned-integer-overflow %s -emit-llvm -o - | FileCheck %s + +_Atomic(unsigned) atomic; + +// CHECK-LABEL: define void @cmpd_assign +void cmpd_assign() { + // CHECK: br label %[[LOOP_START:.*]] + + // CHECK: [[LOOP_START]]: + // CHECK-NEXT: phi i32 {{.*}}, [ {{.*}}, %[[INCOMING_BLOCK:.*]] ] + + // CHECK: [[INCOMING_BLOCK]]: + // CHECK-NEXT: cmpxchg + // CHECK-NEXT: extractvalue + // CHECK-NEXT: extractvalue + // CHECK-NEXT: br i1 %8, label %{{.*}}, label %[[LOOP_START]] + atomic += 1; +} + +// CHECK-LABEL: define void @inc +void inc() { + // CHECK: br label %[[LOOP_START:.*]] + + // CHECK: [[LOOP_START]]: + // CHECK-NEXT: phi i32 {{.*}}, [ {{.*}}, %[[INCOMING_BLOCK:.*]] ] + + // CHECK: [[INCOMING_BLOCK]]: + // CHECK-NEXT: cmpxchg + // CHECK-NEXT: extractvalue + // CHECK-NEXT: extractvalue + // CHECK-NEXT: br i1 %8, label %{{.*}}, label %[[LOOP_START]] + atomic++; +} diff --git a/clang/test/CodeGen/sparcv9-dwarf.c b/clang/test/CodeGen/sparcv9-dwarf.c index c75b09fb7d91e..b893d9ff74bab 100644 --- a/clang/test/CodeGen/sparcv9-dwarf.c +++ b/clang/test/CodeGen/sparcv9-dwarf.c @@ -8,92 +8,92 @@ int test() { } // CHECK-LABEL: define signext i32 @test() -// CHECK: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i32 0, i32 0) -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i32 0, i32 1) -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i32 0, i32 2) -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i32 0, i32 3) -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i32 0, i32 4) -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i32 0, i32 5) -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i32 0, i32 6) -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i32 0, i32 7) -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i32 0, i32 8) -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i32 0, i32 9) -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i32 0, i32 10) -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i32 0, i32 11) -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i32 0, i32 12) -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i32 0, i32 13) -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i32 0, i32 14) -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i32 0, i32 15) -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i32 0, i32 16) -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i32 0, i32 17) -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i32 0, i32 18) -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i32 0, i32 19) -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i32 0, i32 20) -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i32 0, i32 21) -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i32 0, i32 22) -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i32 0, i32 23) -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i32 0, i32 24) -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i32 0, i32 25) -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i32 0, i32 26) -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i32 0, i32 27) -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i32 0, i32 28) -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i32 0, i32 29) -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i32 0, i32 30) -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i32 0, i32 31) -// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i32 0, i32 32) -// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i32 0, i32 33) -// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i32 0, i32 34) -// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i32 0, i32 35) -// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i32 0, i32 36) -// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i32 0, i32 37) -// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i32 0, i32 38) -// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i32 0, i32 39) -// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i32 0, i32 40) -// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i32 0, i32 41) -// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i32 0, i32 42) -// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i32 0, i32 43) -// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i32 0, i32 44) -// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i32 0, i32 45) -// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i32 0, i32 46) -// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i32 0, i32 47) -// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i32 0, i32 48) -// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i32 0, i32 49) -// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i32 0, i32 50) -// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i32 0, i32 51) -// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i32 0, i32 52) -// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i32 0, i32 53) -// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i32 0, i32 54) -// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i32 0, i32 55) -// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i32 0, i32 56) -// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i32 0, i32 57) -// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i32 0, i32 58) -// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i32 0, i32 59) -// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i32 0, i32 60) -// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i32 0, i32 61) -// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i32 0, i32 62) -// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i32 0, i32 63) -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i32 0, i32 64) -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i32 0, i32 65) -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i32 0, i32 66) -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i32 0, i32 67) -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i32 0, i32 68) -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i32 0, i32 69) -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i32 0, i32 70) -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i32 0, i32 71) -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i32 0, i32 72) -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i32 0, i32 73) -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i32 0, i32 74) -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i32 0, i32 75) -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i32 0, i32 76) -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i32 0, i32 77) -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i32 0, i32 78) -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i32 0, i32 79) -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i32 0, i32 80) -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i32 0, i32 81) -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i32 0, i32 82) -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i32 0, i32 83) -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i32 0, i32 84) -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i32 0, i32 85) -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i32 0, i32 86) -// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i32 0, i32 87) +// CHECK: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i64 0, i64 0) +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i64 0, i64 1) +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i64 0, i64 2) +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i64 0, i64 3) +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i64 0, i64 4) +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i64 0, i64 5) +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i64 0, i64 6) +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i64 0, i64 7) +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i64 0, i64 8) +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i64 0, i64 9) +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i64 0, i64 10) +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i64 0, i64 11) +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i64 0, i64 12) +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i64 0, i64 13) +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i64 0, i64 14) +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i64 0, i64 15) +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i64 0, i64 16) +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i64 0, i64 17) +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i64 0, i64 18) +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i64 0, i64 19) +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i64 0, i64 20) +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i64 0, i64 21) +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i64 0, i64 22) +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i64 0, i64 23) +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i64 0, i64 24) +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i64 0, i64 25) +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i64 0, i64 26) +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i64 0, i64 27) +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i64 0, i64 28) +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i64 0, i64 29) +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i64 0, i64 30) +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i64 0, i64 31) +// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i64 0, i64 32) +// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i64 0, i64 33) +// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i64 0, i64 34) +// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i64 0, i64 35) +// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i64 0, i64 36) +// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i64 0, i64 37) +// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i64 0, i64 38) +// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i64 0, i64 39) +// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i64 0, i64 40) +// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i64 0, i64 41) +// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i64 0, i64 42) +// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i64 0, i64 43) +// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i64 0, i64 44) +// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i64 0, i64 45) +// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i64 0, i64 46) +// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i64 0, i64 47) +// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i64 0, i64 48) +// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i64 0, i64 49) +// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i64 0, i64 50) +// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i64 0, i64 51) +// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i64 0, i64 52) +// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i64 0, i64 53) +// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i64 0, i64 54) +// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i64 0, i64 55) +// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i64 0, i64 56) +// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i64 0, i64 57) +// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i64 0, i64 58) +// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i64 0, i64 59) +// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i64 0, i64 60) +// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i64 0, i64 61) +// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i64 0, i64 62) +// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i64 0, i64 63) +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i64 0, i64 64) +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i64 0, i64 65) +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i64 0, i64 66) +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i64 0, i64 67) +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i64 0, i64 68) +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i64 0, i64 69) +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i64 0, i64 70) +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i64 0, i64 71) +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i64 0, i64 72) +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i64 0, i64 73) +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i64 0, i64 74) +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i64 0, i64 75) +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i64 0, i64 76) +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i64 0, i64 77) +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i64 0, i64 78) +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i64 0, i64 79) +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i64 0, i64 80) +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i64 0, i64 81) +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i64 0, i64 82) +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i64 0, i64 83) +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i64 0, i64 84) +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i64 0, i64 85) +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i64 0, i64 86) +// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i64 0, i64 87) // CHECK-NEXT: ret i32 14 diff --git a/clang/test/CodeGen/sse-builtins.c b/clang/test/CodeGen/sse-builtins.c index e9801487be0df..9151c93736917 100644 --- a/clang/test/CodeGen/sse-builtins.c +++ b/clang/test/CodeGen/sse-builtins.c @@ -1,4 +1,5 @@ // RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +sse -emit-llvm -o - -Wall -Werror | FileCheck %s +// RUN: %clang_cc1 -fms-extensions -fms-compatibility -ffreestanding %s -triple=x86_64-windows-msvc -target-feature +sse -emit-llvm -o - -Wall -Werror | FileCheck %s #include diff --git a/clang/test/CodeGen/sse2-builtins.c b/clang/test/CodeGen/sse2-builtins.c index 28ee523ac8409..6e3a0a7072889 100644 --- a/clang/test/CodeGen/sse2-builtins.c +++ b/clang/test/CodeGen/sse2-builtins.c @@ -1,5 +1,6 @@ // RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +sse2 -emit-llvm -o - -Wall -Werror | FileCheck %s // RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +sse2 -fno-signed-char -emit-llvm -o - -Wall -Werror | FileCheck %s +// RUN: %clang_cc1 -fms-extensions -fms-compatibility -ffreestanding %s -triple=x86_64-windows-msvc -target-feature +sse2 -emit-llvm -o - -Wall -Werror | FileCheck %s #include diff --git a/clang/test/CodeGen/target-builtin-noerror.c b/clang/test/CodeGen/target-builtin-noerror.c index 400c5e696ad8e..364eae7ca67d2 100644 --- a/clang/test/CodeGen/target-builtin-noerror.c +++ b/clang/test/CodeGen/target-builtin-noerror.c @@ -98,6 +98,7 @@ void verifycpustrings() { (void)__builtin_cpu_is("btver1"); (void)__builtin_cpu_is("btver2"); (void)__builtin_cpu_is("cannonlake"); + (void)__builtin_cpu_is("cascadelake"); (void)__builtin_cpu_is("core2"); (void)__builtin_cpu_is("corei7"); (void)__builtin_cpu_is("goldmont"); @@ -120,4 +121,5 @@ void verifycpustrings() { (void)__builtin_cpu_is("tremont"); (void)__builtin_cpu_is("westmere"); (void)__builtin_cpu_is("znver1"); + (void)__builtin_cpu_is("znver2"); } diff --git a/clang/test/CodeGen/ubsan-asan-noreturn.c b/clang/test/CodeGen/ubsan-asan-noreturn.c index 6dc0546d484e6..516c58469d59f 100644 --- a/clang/test/CodeGen/ubsan-asan-noreturn.c +++ b/clang/test/CodeGen/ubsan-asan-noreturn.c @@ -1,6 +1,7 @@ // Ensure compatiblity of UBSan unreachable with ASan in the presence of // noreturn functions. -// RUN: %clang_cc1 -fsanitize=unreachable,address -triple x86_64-linux -emit-llvm -o - %s | FileCheck %s +// RUN: %clang_cc1 -fsanitize=unreachable,address -triple x86_64-linux -emit-llvm -o - %s | FileCheck %s +// RUN: %clang_cc1 -fsanitize=unreachable,kernel-address -triple x86_64-linux -emit-llvm -o - %s | FileCheck %s void my_longjmp(void) __attribute__((noreturn)); diff --git a/clang/test/CodeGen/x86-vec-struct-packing.c b/clang/test/CodeGen/x86-vec-struct-packing.c new file mode 100644 index 0000000000000..01458d131ed56 --- /dev/null +++ b/clang/test/CodeGen/x86-vec-struct-packing.c @@ -0,0 +1,227 @@ +// RUN: %clang_cc1 -ffreestanding -emit-llvm-only -triple x86_64-windows-coff -fdump-record-layouts %s | FileCheck %s --check-prefix=CHECK-MS +// RUN: %clang_cc1 -ffreestanding -emit-llvm-only -triple x86_64-apple-darwin -fdump-record-layouts %s | FileCheck %s --check-prefix=CHECK-NOTMS +#include + +#pragma pack(1) + +struct s_m64 { + int a; + __m64 b; +}; +typedef struct s_m64 m64; + +#if defined(_WIN32) +static int a1[(sizeof(m64) == 16) - 1]; +#else +static int a1[(sizeof(m64) == 12) - 1]; +#endif + +struct s_m128 { + int a; + __m128 b; +}; +typedef struct s_m128 m128; + +#if defined(_WIN32) +static int a1[(sizeof(m128) == 32) - 1]; +#else +static int a1[(sizeof(m128) == 20) - 1]; +#endif + +struct s_m128i { + int a; + __m128i b; +}; +typedef struct s_m128i m128i; + +#if defined(_WIN32) +static int a1[(sizeof(m128i) == 32) - 1]; +#else +static int a1[(sizeof(m128i) == 20) - 1]; +#endif + +struct s_m128d { + int a; + __m128d b; +}; +typedef struct s_m128d m128d; + +#if defined(_WIN32) +static int a1[(sizeof(m128d) == 32) - 1]; +#else +static int a1[(sizeof(m128d) == 20) - 1]; +#endif + +struct s_m256 { + int a; + __m256 b; +}; +typedef struct s_m256 m256; + +#if defined(_WIN32) +static int a1[(sizeof(m256) == 64) - 1]; +#else +static int a1[(sizeof(m256) == 36) - 1]; +#endif + +struct s_m256i { + int a; + __m256i b; +}; +typedef struct s_m256i m256i; + +#if defined(_WIN32) +static int a1[(sizeof(m256i) == 64) - 1]; +#else +static int a1[(sizeof(m256i) == 36) - 1]; +#endif + +struct s_m256d { + int a; + __m256d b; +}; +typedef struct s_m256d m256d; + +#if defined(_WIN32) +static int a1[(sizeof(m256d) == 64) - 1]; +#else +static int a1[(sizeof(m256d) == 36) - 1]; +#endif + +struct s_m512 { + int a; + __m512 b; +}; +typedef struct s_m512 m512; + +#if defined(_WIN32) +static int a1[(sizeof(m512) == 128) - 1]; +#else +static int a1[(sizeof(m512) == 68) - 1]; +#endif + +struct s_m512i { + int a; + __m512i b; +}; +typedef struct s_m512i m512i; + +#if defined(_WIN32) +static int a1[(sizeof(m512i) == 128) - 1]; +#else +static int a1[(sizeof(m512i) == 68) - 1]; +#endif + +struct s_m512d { + int a; + __m512d b; +}; +typedef struct s_m512d m512d; + +#if defined(_WIN32) +static int a1[(sizeof(m512d) == 128) - 1]; +#else +static int a1[(sizeof(m512d) == 68) - 1]; +#endif + +// CHECK-MS: *** Dumping AST Record Layout +// CHECK-MS: 0 | struct s_m64 +// CHECK-MS: 0 | int a +// CHECK-MS: 8 | __m64 b +// CHECK-MS: | [sizeof=16, align=8] +// CHECK-MS: *** Dumping AST Record Layout +// CHECK-MS: 0 | struct s_m128 +// CHECK-MS: 0 | int a +// CHECK-MS: 16 | __m128 b +// CHECK-MS: | [sizeof=32, align=16] +// CHECK-MS: *** Dumping AST Record Layout +// CHECK-MS: 0 | struct s_m128i +// CHECK-MS: 0 | int a +// CHECK-MS: 16 | __m128i b +// CHECK-MS: | [sizeof=32, align=16] +// CHECK-MS: *** Dumping AST Record Layout +// CHECK-MS: 0 | struct s_m128d +// CHECK-MS: 0 | int a +// CHECK-MS: 16 | __m128d b +// CHECK-MS: | [sizeof=32, align=16] +// CHECK-MS: *** Dumping AST Record Layout +// CHECK-MS: 0 | struct s_m256 +// CHECK-MS: 0 | int a +// CHECK-MS: 32 | __m256 b +// CHECK-MS: | [sizeof=64, align=32] +// CHECK-MS: *** Dumping AST Record Layout +// CHECK-MS: 0 | struct s_m256i +// CHECK-MS: 0 | int a +// CHECK-MS: 32 | __m256i b +// CHECK-MS: | [sizeof=64, align=32] +// CHECK-MS: *** Dumping AST Record Layout +// CHECK-MS: 0 | struct s_m256d +// CHECK-MS: 0 | int a +// CHECK-MS: 32 | __m256d b +// CHECK-MS: | [sizeof=64, align=32] +// CHECK-MS: *** Dumping AST Record Layout +// CHECK-MS: 0 | struct s_m512 +// CHECK-MS: 0 | int a +// CHECK-MS: 64 | __m512 b +// CHECK-MS: | [sizeof=128, align=64] +// CHECK-MS: *** Dumping AST Record Layout +// CHECK-MS: 0 | struct s_m512i +// CHECK-MS: 0 | int a +// CHECK-MS: 64 | __m512i b +// CHECK-MS: | [sizeof=128, align=64] +// CHECK-MS: *** Dumping AST Record Layout +// CHECK-MS: 0 | struct s_m512d +// CHECK-MS: 0 | int a +// CHECK-MS: 64 | __m512d b +// CHECK-MS: | [sizeof=128, align=64] + +// CHECK-NOTMS: *** Dumping AST Record Layout +// CHECK-NOTMS: 0 | struct s_m64 +// CHECK-NOTMS: 0 | int a +// CHECK-NOTMS: 4 | __m64 b +// CHECK-NOTMS: | [sizeof=12, align=1] +// CHECK-NOTMS: *** Dumping AST Record Layout +// CHECK-NOTMS: 0 | struct s_m128 +// CHECK-NOTMS: 0 | int a +// CHECK-NOTMS: 4 | __m128 b +// CHECK-NOTMS: | [sizeof=20, align=1] +// CHECK-NOTMS: *** Dumping AST Record Layout +// CHECK-NOTMS: 0 | struct s_m128i +// CHECK-NOTMS: 0 | int a +// CHECK-NOTMS: 4 | __m128i b +// CHECK-NOTMS: | [sizeof=20, align=1] +// CHECK-NOTMS: *** Dumping AST Record Layout +// CHECK-NOTMS: 0 | struct s_m128d +// CHECK-NOTMS: 0 | int a +// CHECK-NOTMS: 4 | __m128d b +// CHECK-NOTMS: | [sizeof=20, align=1] +// CHECK-NOTMS: *** Dumping AST Record Layout +// CHECK-NOTMS: 0 | struct s_m256 +// CHECK-NOTMS: 0 | int a +// CHECK-NOTMS: 4 | __m256 b +// CHECK-NOTMS: | [sizeof=36, align=1] +// CHECK-NOTMS: *** Dumping AST Record Layout +// CHECK-NOTMS: 0 | struct s_m256i +// CHECK-NOTMS: 0 | int a +// CHECK-NOTMS: 4 | __m256i b +// CHECK-NOTMS: | [sizeof=36, align=1] +// CHECK-NOTMS: *** Dumping AST Record Layout +// CHECK-NOTMS: 0 | struct s_m256d +// CHECK-NOTMS: 0 | int a +// CHECK-NOTMS: 4 | __m256d b +// CHECK-NOTMS: | [sizeof=36, align=1] +// CHECK-NOTMS: *** Dumping AST Record Layout +// CHECK-NOTMS: 0 | struct s_m512 +// CHECK-NOTMS: 0 | int a +// CHECK-NOTMS: 4 | __m512 b +// CHECK-NOTMS: | [sizeof=68, align=1] +// CHECK-NOTMS: *** Dumping AST Record Layout +// CHECK-NOTMS: 0 | struct s_m512i +// CHECK-NOTMS: 0 | int a +// CHECK-NOTMS: 4 | __m512i b +// CHECK-NOTMS: | [sizeof=68, align=1] +// CHECK-NOTMS: *** Dumping AST Record Layout +// CHECK-NOTMS: 0 | struct s_m512d +// CHECK-NOTMS: 0 | int a +// CHECK-NOTMS: 4 | __m512d b +// CHECK-NOTMS: | [sizeof=68, align=1] diff --git a/clang/test/CodeGenCUDA/debug-info-address-class.cu b/clang/test/CodeGenCUDA/debug-info-address-class.cu new file mode 100644 index 0000000000000..0ba23af124478 --- /dev/null +++ b/clang/test/CodeGenCUDA/debug-info-address-class.cu @@ -0,0 +1,25 @@ +// RUN: %clang_cc1 -emit-llvm %s -o - -fcuda-is-device -triple nvptx-unknown-unknown -debug-info-kind=limited -dwarf-version=2 -debugger-tuning=gdb | FileCheck %s + +#include "Inputs/cuda.h" + +// CHECK-DAG: ![[FILEVAR0:[0-9]+]] = distinct !DIGlobalVariable(name: "FileVar0", scope: !{{[0-9]+}}, file: !{{[0-9]+}}, line: {{[0-9]+}}, type: !{{[0-9]+}}, isLocal: false, isDefinition: true) +// CHECK-DAG: !DIGlobalVariableExpression(var: ![[FILEVAR0]], expr: !DIExpression()) +__device__ int FileVar0; +// CHECK-DAG: ![[FILEVAR1:[0-9]+]] = distinct !DIGlobalVariable(name: "FileVar1", scope: !{{[0-9]+}}, file: !{{[0-9]+}}, line: {{[0-9]+}}, type: !{{[0-9]+}}, isLocal: false, isDefinition: true) +// CHECK-DAG: !DIGlobalVariableExpression(var: ![[FILEVAR1]], expr: !DIExpression(DW_OP_constu, 8, DW_OP_swap, DW_OP_xderef)) +__device__ __shared__ int FileVar1; +// CHECK-DAG: ![[FILEVAR2:[0-9]+]] = distinct !DIGlobalVariable(name: "FileVar2", scope: !{{[0-9]+}}, file: !{{[0-9]+}}, line: {{[0-9]+}}, type: !{{[0-9]+}}, isLocal: false, isDefinition: true) +// CHECK-DAG: !DIGlobalVariableExpression(var: ![[FILEVAR2]], expr: !DIExpression(DW_OP_constu, 4, DW_OP_swap, DW_OP_xderef)) +__device__ __constant__ int FileVar2; + +__device__ void kernel1( + // CHECK-DAG: ![[ARG:[0-9]+]] = !DILocalVariable(name: "Arg", arg: {{[0-9]+}}, scope: !{{[0-9]+}}, file: !{{[0-9]+}}, line: {{[0-9]+}}, type: !{{[0-9]+}}) + // CHECK-DAG: call void @llvm.dbg.declare(metadata i32* {{.*}}, metadata ![[ARG]], metadata !DIExpression()), !dbg !{{[0-9]+}} + int Arg) { + // CHECK-DAG: ![[FUNCVAR0:[0-9]+]] = distinct !DIGlobalVariable(name: "FuncVar0", scope: !{{[0-9]+}}, file: !{{[0-9]+}}, line: {{[0-9]+}}, type: !{{[0-9]+}}, isLocal: true, isDefinition: true) + // CHECK-DAG: !DIGlobalVariableExpression(var: ![[FUNCVAR0]], expr: !DIExpression(DW_OP_constu, 8, DW_OP_swap, DW_OP_xderef)) + __shared__ int FuncVar0; + // CHECK-DAG: ![[FUNCVAR1:[0-9]+]] = !DILocalVariable(name: "FuncVar1", scope: !{{[0-9]+}}, file: !{{[0-9]+}}, line: {{[0-9]+}}, type: !{{[0-9]+}}) + // CHECK-DAG: call void @llvm.dbg.declare(metadata i32* {{.*}}, metadata ![[FUNCVAR1]], metadata !DIExpression()), !dbg !{{[0-9]+}} + int FuncVar1; +} diff --git a/clang/test/CodeGenCUDA/device-stub.cu b/clang/test/CodeGenCUDA/device-stub.cu index 30f88389424d0..387a787cceb80 100644 --- a/clang/test/CodeGenCUDA/device-stub.cu +++ b/clang/test/CodeGenCUDA/device-stub.cu @@ -2,7 +2,7 @@ // RUN: %clang_cc1 -triple x86_64-linux-gnu -emit-llvm %s \ // RUN: -target-sdk-version=8.0 -fcuda-include-gpubinary %t -o - \ // RUN: | FileCheck -allow-deprecated-dag-overlap %s \ -// RUN: --check-prefixes=ALL,NORDC,CUDA,CUDANORDC,CUDA-OLD +// RUN: --check-prefixes=ALL,LNX,NORDC,CUDA,CUDANORDC,CUDA-OLD // RUN: %clang_cc1 -triple x86_64-linux-gnu -emit-llvm %s \ // RUN: -target-sdk-version=8.0 -fcuda-include-gpubinary %t \ // RUN: -o - -DNOGLOBALS \ @@ -12,7 +12,7 @@ // RUN: -target-sdk-version=8.0 -fgpu-rdc -fcuda-include-gpubinary %t \ // RUN: -o - \ // RUN: | FileCheck -allow-deprecated-dag-overlap %s \ -// RUN: --check-prefixes=ALL,RDC,CUDA,CUDARDC,CUDA-OLD +// RUN: --check-prefixes=ALL,LNX,RDC,CUDA,CUDARDC,CUDA-OLD // RUN: %clang_cc1 -triple x86_64-linux-gnu -emit-llvm %s \ // RUN: -target-sdk-version=8.0 -o - \ // RUN: | FileCheck -allow-deprecated-dag-overlap %s -check-prefix=NOGPUBIN @@ -20,7 +20,7 @@ // RUN: %clang_cc1 -triple x86_64-linux-gnu -emit-llvm %s \ // RUN: -target-sdk-version=9.2 -fcuda-include-gpubinary %t -o - \ // RUN: | FileCheck %s -allow-deprecated-dag-overlap \ -// RUN: --check-prefixes=ALL,NORDC,CUDA,CUDANORDC,CUDA-NEW +// RUN: --check-prefixes=ALL,LNX,NORDC,CUDA,CUDANORDC,CUDA-NEW // RUN: %clang_cc1 -triple x86_64-linux-gnu -emit-llvm %s \ // RUN: -target-sdk-version=9.2 -fcuda-include-gpubinary %t -o - -DNOGLOBALS \ // RUN: | FileCheck -allow-deprecated-dag-overlap %s \ @@ -28,56 +28,70 @@ // RUN: %clang_cc1 -triple x86_64-linux-gnu -emit-llvm %s \ // RUN: -target-sdk-version=9.2 -fgpu-rdc -fcuda-include-gpubinary %t -o - \ // RUN: | FileCheck %s -allow-deprecated-dag-overlap \ -// RUN: --check-prefixes=ALL,RDC,CUDA,CUDARDC,CUDA_NEW +// RUN: --check-prefixes=ALL,LNX,RDC,CUDA,CUDARDC,CUDA_NEW // RUN: %clang_cc1 -triple x86_64-linux-gnu -emit-llvm %s \ // RUN: -target-sdk-version=9.2 -o - \ // RUN: | FileCheck -allow-deprecated-dag-overlap %s -check-prefix=NOGPUBIN // RUN: %clang_cc1 -triple x86_64-linux-gnu -emit-llvm %s \ // RUN: -fcuda-include-gpubinary %t -o - -x hip\ -// RUN: | FileCheck -allow-deprecated-dag-overlap %s --check-prefixes=ALL,NORDC,HIP,HIPEF +// RUN: | FileCheck -allow-deprecated-dag-overlap %s --check-prefixes=ALL,LNX,NORDC,HIP,HIPEF // RUN: %clang_cc1 -triple x86_64-linux-gnu -emit-llvm %s \ // RUN: -fcuda-include-gpubinary %t -o - -DNOGLOBALS -x hip \ // RUN: | FileCheck -allow-deprecated-dag-overlap %s -check-prefixes=NOGLOBALS,HIPNOGLOBALS // RUN: %clang_cc1 -triple x86_64-linux-gnu -emit-llvm %s \ // RUN: -fgpu-rdc -fcuda-include-gpubinary %t -o - -x hip \ -// RUN: | FileCheck -allow-deprecated-dag-overlap %s --check-prefixes=ALL,NORDC,HIP,HIPEF +// RUN: | FileCheck -allow-deprecated-dag-overlap %s --check-prefixes=ALL,LNX,NORDC,HIP,HIPEF // RUN: %clang_cc1 -triple x86_64-linux-gnu -emit-llvm %s -o - -x hip\ -// RUN: | FileCheck -allow-deprecated-dag-overlap %s -check-prefixes=ALL,NORDC,HIP,HIPNEF +// RUN: | FileCheck -allow-deprecated-dag-overlap %s -check-prefixes=ALL,LNX,NORDC,HIP,HIPNEF + +// RUN: %clang_cc1 -triple x86_64-pc-windows-msvc -aux-triple amdgcn -emit-llvm %s \ +// RUN: -fcuda-include-gpubinary %t -o - -x hip\ +// RUN: | FileCheck -allow-deprecated-dag-overlap %s --check-prefixes=ALL,WIN #include "Inputs/cuda.h" #ifndef NOGLOBALS -// ALL-DAG: @device_var = internal global i32 +// LNX-DAG: @device_var = internal global i32 +// WIN-DAG: @"?device_var@@3HA" = internal global i32 __device__ int device_var; -// ALL-DAG: @constant_var = internal global i32 +// LNX-DAG: @constant_var = internal global i32 +// WIN-DAG: @"?constant_var@@3HA" = internal global i32 __constant__ int constant_var; -// ALL-DAG: @shared_var = internal global i32 +// LNX-DAG: @shared_var = internal global i32 +// WIN-DAG: @"?shared_var@@3HA" = internal global i32 __shared__ int shared_var; // Make sure host globals don't get internalized... -// ALL-DAG: @host_var = global i32 +// LNX-DAG: @host_var = global i32 +// WIN-DAG: @"?host_var@@3HA" = dso_local global i32 int host_var; // ... and that extern vars remain external. -// ALL-DAG: @ext_host_var = external global i32 +// LNX-DAG: @ext_host_var = external global i32 +// WIN-DAG: @"?ext_host_var@@3HA" = external dso_local global i32 extern int ext_host_var; // external device-side variables -> extern references to their shadows. -// ALL-DAG: @ext_device_var = external global i32 +// LNX-DAG: @ext_device_var = external global i32 +// WIN-DAG: @"?ext_device_var@@3HA" = external dso_local global i32 extern __device__ int ext_device_var; -// ALL-DAG: @ext_device_var = external global i32 +// LNX-DAG: @ext_device_var = external global i32 +// WIN-DAG: @"?ext_constant_var@@3HA" = external dso_local global i32 extern __constant__ int ext_constant_var; // external device-side variables with definitions should generate // definitions for the shadows. -// ALL-DAG: @ext_device_var_def = internal global i32 undef, +// LNX-DAG: @ext_device_var_def = internal global i32 undef, +// WIN-DAG: @"?ext_device_var_def@@3HA" = internal global i32 undef extern __device__ int ext_device_var_def; __device__ int ext_device_var_def = 1; -// ALL-DAG: @ext_device_var_def = internal global i32 undef, +// LNX-DAG: @ext_device_var_def = internal global i32 undef, +// WIN-DAG: @"?ext_constant_var_def@@3HA" = internal global i32 undef __constant__ int ext_constant_var_def = 2; + void use_pointers() { int *p; p = &device_var; @@ -90,8 +104,15 @@ void use_pointers() { } // Make sure that all parts of GPU code init/cleanup are there: -// * constant unnamed string with the kernel name -// ALL: private unnamed_addr constant{{.*}}kernelfunc{{.*}}\00" +// * constant unnamed string with the device-side kernel name to be passed to +// __hipRegisterFunction/__cudaRegisterFunction. +// ALL: @0 = private unnamed_addr constant [18 x i8] c"_Z10kernelfunciii\00" +// * constant unnamed string with the device-side kernel name to be passed to +// __hipRegisterVar/__cudaRegisterVar. +// ALL: @1 = private unnamed_addr constant [11 x i8] c"device_var\00" +// ALL: @2 = private unnamed_addr constant [13 x i8] c"constant_var\00" +// ALL: @3 = private unnamed_addr constant [19 x i8] c"ext_device_var_def\00" +// ALL: @4 = private unnamed_addr constant [21 x i8] c"ext_constant_var_def\00" // * constant unnamed string with GPU binary // CUDA: @[[FATBIN:.*]] = private constant{{.*GPU binary would be here.*}}\00", // HIPEF: @[[FATBIN:.*]] = private constant{{.*GPU binary would be here.*}}\00", @@ -100,13 +121,13 @@ void use_pointers() { // CUDARDC-SAME: section "__nv_relfatbin", align 8 // * constant struct that wraps GPU binary // ALL: @__[[PREFIX:cuda|hip]]_fatbin_wrapper = internal constant -// ALL-SAME: { i32, i32, i8*, i8* } +// LNX-SAME: { i32, i32, i8*, i8* } // CUDA-SAME: { i32 1180844977, i32 1, // HIP-SAME: { i32 1212764230, i32 1, // CUDA-SAME: i8* getelementptr inbounds ({{.*}}@[[FATBIN]], i64 0, i64 0), // HIPEF-SAME: i8* getelementptr inbounds ({{.*}}@[[FATBIN]], i64 0, i64 0), // HIPNEF-SAME: i8* @[[FATBIN]], -// ALL-SAME: i8* null } +// LNX-SAME: i8* null } // CUDA-SAME: section ".nvFatBinSegment" // HIP-SAME: section ".hipFatBinSegment" // * variable to save GPU binary handle after initialization @@ -116,7 +137,7 @@ void use_pointers() { // RDC: [[MODULE_ID_GLOBAL:@.*]] = private constant // CUDARDC-SAME: c"[[MODULE_ID:.+]]\00", section "__nv_module_id", align 32 // * Make sure our constructor was added to global ctor list. -// ALL: @llvm.global_ctors = appending global {{.*}}@__[[PREFIX]]_module_ctor +// LNX: @llvm.global_ctors = appending global {{.*}}@__[[PREFIX]]_module_ctor // * Alias to global symbol containing the NVModuleID. // RDC: @__fatbinwrap[[MODULE_ID]] = alias { i32, i32, i8*, i8* } // RDC-SAME: { i32, i32, i8*, i8* }* @__[[PREFIX]]_fatbin_wrapper @@ -124,7 +145,7 @@ void use_pointers() { // Test that we build the correct number of calls to cudaSetupArgument followed // by a call to cudaLaunch. -// ALL: define{{.*}}kernelfunc +// LNX: define{{.*}}kernelfunc // New launch sequence stores arguments into local buffer and passes array of // pointers to them directly to cudaLaunchKernel @@ -149,25 +170,25 @@ void use_pointers() { __global__ void kernelfunc(int i, int j, int k) {} // Test that we've built correct kernel launch sequence. -// ALL: define{{.*}}hostfunc +// LNX: define{{.*}}hostfunc // CUDA-OLD: call{{.*}}[[PREFIX]]ConfigureCall // CUDA-NEW: call{{.*}}__cudaPushCallConfiguration // HIP: call{{.*}}[[PREFIX]]ConfigureCall -// ALL: call{{.*}}kernelfunc +// LNX: call{{.*}}kernelfunc void hostfunc(void) { kernelfunc<<<1, 1>>>(1, 1, 1); } #endif // Test that we've built a function to register kernels and global vars. // ALL: define internal void @__[[PREFIX]]_register_globals -// ALL: call{{.*}}[[PREFIX]]RegisterFunction(i8** %0, {{.*}}kernelfunc -// ALL-DAG: call{{.*}}[[PREFIX]]RegisterVar(i8** %0, {{.*}}device_var{{.*}}i32 0, i32 4, i32 0, i32 0 -// ALL-DAG: call{{.*}}[[PREFIX]]RegisterVar(i8** %0, {{.*}}constant_var{{.*}}i32 0, i32 4, i32 1, i32 0 -// ALL-DAG: call{{.*}}[[PREFIX]]RegisterVar(i8** %0, {{.*}}ext_device_var_def{{.*}}i32 0, i32 4, i32 0, i32 0 -// ALL-DAG: call{{.*}}[[PREFIX]]RegisterVar(i8** %0, {{.*}}ext_constant_var_def{{.*}}i32 0, i32 4, i32 1, i32 0 +// ALL: call{{.*}}[[PREFIX]]RegisterFunction(i8** %0, {{.*}}kernelfunc{{[^,]*}}, {{[^@]*}}@0 +// ALL-DAG: call{{.*}}[[PREFIX]]RegisterVar(i8** %0, {{.*}}device_var{{[^,]*}}, {{[^@]*}}@1, {{.*}}i32 0, i32 4, i32 0, i32 0 +// ALL-DAG: call{{.*}}[[PREFIX]]RegisterVar(i8** %0, {{.*}}constant_var{{[^,]*}}, {{[^@]*}}@2, {{.*}}i32 0, i32 4, i32 1, i32 0 +// ALL-DAG: call{{.*}}[[PREFIX]]RegisterVar(i8** %0, {{.*}}ext_device_var_def{{[^,]*}}, {{[^@]*}}@3, {{.*}}i32 0, i32 4, i32 0, i32 0 +// ALL-DAG: call{{.*}}[[PREFIX]]RegisterVar(i8** %0, {{.*}}ext_constant_var_def{{[^,]*}}, {{[^@]*}}@4, {{.*}}i32 0, i32 4, i32 1, i32 0 // ALL: ret void // Test that we've built a constructor. -// ALL: define internal void @__[[PREFIX]]_module_ctor +// LNX: define internal void @__[[PREFIX]]_module_ctor // In separate mode it calls __[[PREFIX]]RegisterFatBinary(&__[[PREFIX]]_fatbin_wrapper) // HIP only register fat binary once. diff --git a/clang/test/CodeGenCUDA/kernel-stub-name.cu b/clang/test/CodeGenCUDA/kernel-stub-name.cu new file mode 100644 index 0000000000000..539d7eec1ba12 --- /dev/null +++ b/clang/test/CodeGenCUDA/kernel-stub-name.cu @@ -0,0 +1,20 @@ +// RUN: echo "GPU binary would be here" > %t + +// RUN: %clang_cc1 -triple x86_64-linux-gnu -emit-llvm %s \ +// RUN: -fcuda-include-gpubinary %t -o - -x hip\ +// RUN: | FileCheck -allow-deprecated-dag-overlap %s --check-prefixes=CHECK + +#include "Inputs/cuda.h" + +template +__global__ void kernelfunc() {} + +// CHECK-LABEL: define{{.*}}@_Z8hostfuncv() +// CHECK: call void @[[STUB:_Z10kernelfuncIiEvv.stub]]() +void hostfunc(void) { kernelfunc<<<1, 1>>>(); } + +// CHECK: define{{.*}}@[[STUB]] +// CHECK: call{{.*}}@hipLaunchByPtr{{.*}}@[[STUB]] + +// CHECK-LABEL: define{{.*}}@__hip_register_globals +// CHECK: call{{.*}}@__hipRegisterFunction{{.*}}@[[STUB]] diff --git a/clang/test/CodeGenCXX/2011-12-19-init-list-ctor.cpp b/clang/test/CodeGenCXX/2011-12-19-init-list-ctor.cpp index 84c4619593912..41131373486d6 100644 --- a/clang/test/CodeGenCXX/2011-12-19-init-list-ctor.cpp +++ b/clang/test/CodeGenCXX/2011-12-19-init-list-ctor.cpp @@ -19,8 +19,8 @@ struct S { }; // CHECK: store i32 0, i32* getelementptr inbounds ([3 x %struct.S], [3 x %struct.S]* @arr, i64 0, i64 0, i32 0) -// CHECK: call void @_ZN1AC1EPKc(%struct.A* getelementptr inbounds ([3 x %struct.S], [3 x %struct.S]* @arr, i64 0, i64 0, i32 1), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i32 0, i32 0)) +// CHECK: call void @_ZN1AC1EPKc(%struct.A* getelementptr inbounds ([3 x %struct.S], [3 x %struct.S]* @arr, i64 0, i64 0, i32 1), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)) // CHECK: store i32 1, i32* getelementptr inbounds ([3 x %struct.S], [3 x %struct.S]* @arr, i64 0, i64 1, i32 0) -// CHECK: call void @_ZN1AC1EPKc(%struct.A* getelementptr inbounds ([3 x %struct.S], [3 x %struct.S]* @arr, i64 0, i64 1, i32 1), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i32 0, i32 0)) +// CHECK: call void @_ZN1AC1EPKc(%struct.A* getelementptr inbounds ([3 x %struct.S], [3 x %struct.S]* @arr, i64 0, i64 1, i32 1), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0)) // CHECK: store i32 2, i32* getelementptr inbounds ([3 x %struct.S], [3 x %struct.S]* @arr, i64 0, i64 2, i32 0) -// CHECK: call void @_ZN1AC1EPKc(%struct.A* getelementptr inbounds ([3 x %struct.S], [3 x %struct.S]* @arr, i64 0, i64 2, i32 1), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i32 0, i32 0)) +// CHECK: call void @_ZN1AC1EPKc(%struct.A* getelementptr inbounds ([3 x %struct.S], [3 x %struct.S]* @arr, i64 0, i64 2, i32 1), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0)) diff --git a/clang/test/CodeGenCXX/amdgcn-automatic-variable.cpp b/clang/test/CodeGenCXX/amdgcn-automatic-variable.cpp index 9830a7845e5b1..f96e288a97ed2 100644 --- a/clang/test/CodeGenCXX/amdgcn-automatic-variable.cpp +++ b/clang/test/CodeGenCXX/amdgcn-automatic-variable.cpp @@ -39,7 +39,7 @@ void func2(void) { // CHECK: store i32* %[[r0]], i32** %[[r3]], align 8 int *lp1 = &lv1; - // CHECK: %[[arraydecay:.*]] = getelementptr inbounds [100 x i32], [100 x i32]* %[[r2]], i32 0, i32 0 + // CHECK: %[[arraydecay:.*]] = getelementptr inbounds [100 x i32], [100 x i32]* %[[r2]], i64 0, i64 0 // CHECK: store i32* %[[arraydecay]], i32** %[[r4]], align 8 int *lp2 = la; diff --git a/clang/test/CodeGenCXX/amdgcn-string-literal.cpp b/clang/test/CodeGenCXX/amdgcn-string-literal.cpp index 70be249433fb1..31480771653ea 100644 --- a/clang/test/CodeGenCXX/amdgcn-string-literal.cpp +++ b/clang/test/CodeGenCXX/amdgcn-string-literal.cpp @@ -14,7 +14,7 @@ void g(const char* p); // CHECK-LABEL: define void @_Z1fv() void f() { const char* l_str = "l_str"; - + // CHECK: call void @llvm.memcpy.p0i8.p4i8.i64 char l_array[] = "l_array"; @@ -26,3 +26,9 @@ void f() { const char* p = g_str; g(p); } + +// CHECK-LABEL: define void @_Z1ev +void e() { + g("string literal"); + g("string literal"); +} diff --git a/clang/test/CodeGenCXX/arm-swiftcall.cpp b/clang/test/CodeGenCXX/arm-swiftcall.cpp index 36a5afad4c624..62a92fc20f985 100644 --- a/clang/test/CodeGenCXX/arm-swiftcall.cpp +++ b/clang/test/CodeGenCXX/arm-swiftcall.cpp @@ -120,6 +120,6 @@ TEST(struct_indirect_1) class struct_trivial { int x; }; -// CHECK-LABEL define void @test_struct_trivial(i32{{( %.*)?}}) +// CHECK-LABEL: define swiftcc void @test_struct_trivial(i32{{( %.*)?}}) extern "C" SWIFTCALL void test_struct_trivial(struct_trivial triv) {} diff --git a/clang/test/CodeGenCXX/auto-var-init.cpp b/clang/test/CodeGenCXX/auto-var-init.cpp index 0d13c0af4e8f9..04f147cf8c8ca 100644 --- a/clang/test/CodeGenCXX/auto-var-init.cpp +++ b/clang/test/CodeGenCXX/auto-var-init.cpp @@ -1,6 +1,8 @@ -// RUN: %clang_cc1 -triple x86_64-unknown-unknown -fblocks %s -emit-llvm -o - | FileCheck %s -// RUN: %clang_cc1 -triple x86_64-unknown-unknown -fblocks -ftrivial-auto-var-init=pattern %s -emit-llvm -o - | FileCheck %s -check-prefix=PATTERN -// RUN: %clang_cc1 -triple x86_64-unknown-unknown -fblocks -ftrivial-auto-var-init=zero %s -emit-llvm -o - | FileCheck %s -check-prefix=ZERO +// RUN: %clang_cc1 -std=c++14 -triple x86_64-unknown-unknown -fblocks %s -emit-llvm -o - | FileCheck %s -check-prefixes=CHECK,CHECK-O0 +// RUN: %clang_cc1 -std=c++14 -triple x86_64-unknown-unknown -fblocks -ftrivial-auto-var-init=pattern %s -emit-llvm -o - | FileCheck %s -check-prefixes=CHECK-O0,PATTERN,PATTERN-O0 +// RUN: %clang_cc1 -std=c++14 -triple x86_64-unknown-unknown -fblocks -ftrivial-auto-var-init=pattern %s -O1 -emit-llvm -o - | FileCheck %s -check-prefixes=CHECK-O1,PATTERN,PATTERN-O1 +// RUN: %clang_cc1 -std=c++14 -triple x86_64-unknown-unknown -fblocks -ftrivial-auto-var-init=zero %s -emit-llvm -o - | FileCheck %s -check-prefixes=CHECK-O0,ZERO,ZERO-O0 +// RUN: %clang_cc1 -std=c++14 -triple x86_64-unknown-unknown -fblocks -ftrivial-auto-var-init=zero %s -O1 -emit-llvm -o - | FileCheck %s -check-prefixes=CHECK-O1,ZERO,ZERO-O1 template void used(T &) noexcept; @@ -30,104 +32,192 @@ template void used(T &) noexcept; // PATTERN-NOT: undef // ZERO-NOT: undef -// PATTERN: @__const.test_empty_uninit.uninit = private unnamed_addr constant %struct.empty { i8 -86 }, align 1 +// PATTERN-O0: @__const.test_empty_uninit.uninit = private unnamed_addr constant %struct.empty { i8 -86 }, align 1 +// PATTERN-O1-NOT: @__const.test_empty_uninit.uninit struct empty {}; -// PATTERN: @__const.test_small_uninit.uninit = private unnamed_addr constant %struct.small { i8 -86 }, align 1 -// PATTERN: @__const.test_small_custom.custom = private unnamed_addr constant %struct.small { i8 42 }, align 1 -// ZERO: @__const.test_small_custom.custom = private unnamed_addr constant %struct.small { i8 42 }, align 1 +// PATTERN-O0: @__const.test_small_uninit.uninit = private unnamed_addr constant %struct.small { i8 -86 }, align 1 +// PATTERN-O0: @__const.test_small_custom.custom = private unnamed_addr constant %struct.small { i8 42 }, align 1 +// ZERO-O0: @__const.test_small_custom.custom = private unnamed_addr constant %struct.small { i8 42 }, align 1 +// PATTERN-O1-NOT: @__const.test_small_uninit.uninit +// PATTERN-O1-NOT: @__const.test_small_custom.custom +// ZERO-O1-NOT: @__const.test_small_custom.custom struct small { char c; }; -// PATTERN: @__const.test_smallinit_uninit.uninit = private unnamed_addr constant %struct.smallinit { i8 -86 }, align 1 -// PATTERN: @__const.test_smallinit_braces.braces = private unnamed_addr constant %struct.smallinit { i8 -86 }, align 1 -// PATTERN: @__const.test_smallinit_custom.custom = private unnamed_addr constant %struct.smallinit { i8 -86 }, align 1 +// PATTERN-O0: @__const.test_smallinit_uninit.uninit = private unnamed_addr constant %struct.smallinit { i8 -86 }, align 1 +// PATTERN-O0: @__const.test_smallinit_braces.braces = private unnamed_addr constant %struct.smallinit { i8 -86 }, align 1 +// PATTERN-O0: @__const.test_smallinit_custom.custom = private unnamed_addr constant %struct.smallinit { i8 -86 }, align 1 +// PATTERN-O1-NOT: @__const.test_smallinit_uninit.uninit +// PATTERN-O1-NOT: @__const.test_smallinit_braces.braces +// PATTERN-O1-NOT: @__const.test_smallinit_custom.custom struct smallinit { char c = 42; }; -// PATTERN: @__const.test_smallpartinit_uninit.uninit = private unnamed_addr constant %struct.smallpartinit { i8 -86, i8 -86 }, align 1 -// PATTERN: @__const.test_smallpartinit_braces.braces = private unnamed_addr constant %struct.smallpartinit { i8 -86, i8 -86 }, align 1 -// PATTERN: @__const.test_smallpartinit_custom.custom = private unnamed_addr constant %struct.smallpartinit { i8 -86, i8 -86 }, align 1 +// PATTERN-O0: @__const.test_smallpartinit_uninit.uninit = private unnamed_addr constant %struct.smallpartinit { i8 -86, i8 -86 }, align 1 +// PATTERN-O0: @__const.test_smallpartinit_braces.braces = private unnamed_addr constant %struct.smallpartinit { i8 -86, i8 -86 }, align 1 +// PATTERN-O0: @__const.test_smallpartinit_custom.custom = private unnamed_addr constant %struct.smallpartinit { i8 -86, i8 -86 }, align 1 +// PATTERN-O1-NOT: @__const.test_smallpartinit_uninit.uninit +// PATTERN-O1-NOT: @__const.test_smallpartinit_braces.braces +// PATTERN-O1-NOT: @__const.test_smallpartinit_custom.custom struct smallpartinit { char c = 42, d; }; -// PATTERN: @__const.test_nullinit_uninit.uninit = private unnamed_addr constant %struct.nullinit { i8* inttoptr (i64 -6148914691236517206 to i8*) }, align 8 -// PATTERN: @__const.test_nullinit_braces.braces = private unnamed_addr constant %struct.nullinit { i8* inttoptr (i64 -6148914691236517206 to i8*) }, align 8 -// PATTERN: @__const.test_nullinit_custom.custom = private unnamed_addr constant %struct.nullinit { i8* inttoptr (i64 -6148914691236517206 to i8*) }, align 8 +// PATTERN-O0: @__const.test_nullinit_uninit.uninit = private unnamed_addr constant %struct.nullinit { i8* inttoptr (i64 -6148914691236517206 to i8*) }, align 8 +// PATTERN-O0: @__const.test_nullinit_braces.braces = private unnamed_addr constant %struct.nullinit { i8* inttoptr (i64 -6148914691236517206 to i8*) }, align 8 +// PATTERN-O0: @__const.test_nullinit_custom.custom = private unnamed_addr constant %struct.nullinit { i8* inttoptr (i64 -6148914691236517206 to i8*) }, align 8 +// PATTERN-O1-NOT: @__const.test_nullinit_uninit.uninit +// PATTERN-O1-NOT: @__const.test_nullinit_braces.braces +// PATTERN-O1-NOT: @__const.test_nullinit_custom.custom struct nullinit { char* null = nullptr; }; -// PATTERN: @__const.test_padded_uninit.uninit = private unnamed_addr constant %struct.padded { i8 -86, i32 -1431655766 }, align 4 -// PATTERN: @__const.test_padded_custom.custom = private unnamed_addr constant %struct.padded { i8 42, i32 13371337 }, align 4 -// ZERO: @__const.test_padded_custom.custom = private unnamed_addr constant %struct.padded { i8 42, i32 13371337 }, align 4 +// PATTERN-O0: @__const.test_padded_uninit.uninit = private unnamed_addr constant { i8, [3 x i8], i32 } { i8 -86, [3 x i8] c"\AA\AA\AA", i32 -1431655766 }, align 4 +// PATTERN-O0: @__const.test_padded_custom.custom = private unnamed_addr constant { i8, [3 x i8], i32 } { i8 42, [3 x i8] c"\AA\AA\AA", i32 13371337 }, align 4 +// ZERO-O0: @__const.test_padded_custom.custom = private unnamed_addr constant { i8, [3 x i8], i32 } { i8 42, [3 x i8] zeroinitializer, i32 13371337 }, align 4 +// PATTERN-O1-NOT: @__const.test_padded_uninit.uninit +// PATTERN-O1-NOT: @__const.test_padded_custom.custom +// ZERO-O1-NOT: @__const.test_padded_custom.custom struct padded { char c; int i; }; -// PATTERN: @__const.test_paddednullinit_uninit.uninit = private unnamed_addr constant %struct.paddednullinit { i8 -86, i32 -1431655766 }, align 4 -// PATTERN: @__const.test_paddednullinit_braces.braces = private unnamed_addr constant %struct.paddednullinit { i8 -86, i32 -1431655766 }, align 4 -// PATTERN: @__const.test_paddednullinit_custom.custom = private unnamed_addr constant %struct.paddednullinit { i8 -86, i32 -1431655766 }, align 4 +// PATTERN-O0: @__const.test_paddednullinit_uninit.uninit = private unnamed_addr constant { i8, [3 x i8], i32 } { i8 -86, [3 x i8] c"\AA\AA\AA", i32 -1431655766 }, align 4 +// PATTERN-O0: @__const.test_paddednullinit_braces.braces = private unnamed_addr constant { i8, [3 x i8], i32 } { i8 -86, [3 x i8] c"\AA\AA\AA", i32 -1431655766 }, align 4 +// PATTERN-O0: @__const.test_paddednullinit_custom.custom = private unnamed_addr constant { i8, [3 x i8], i32 } { i8 -86, [3 x i8] c"\AA\AA\AA", i32 -1431655766 }, align 4 +// PATTERN-O1-NOT: @__const.test_paddednullinit_uninit.uninit +// PATTERN-O1-NOT: @__const.test_paddednullinit_braces.braces +// PATTERN-O1-NOT: @__const.test_paddednullinit_custom.custom struct paddednullinit { char c = 0; int i = 0; }; -// PATTERN: @__const.test_bitfield_uninit.uninit = private unnamed_addr constant %struct.bitfield { i8 -86, [3 x i8] c"\AA\AA\AA" }, align 4 -// PATTERN: @__const.test_bitfield_custom.custom = private unnamed_addr constant %struct.bitfield { i8 20, [3 x i8] zeroinitializer }, align 4 -// ZERO: @__const.test_bitfield_custom.custom = private unnamed_addr constant %struct.bitfield { i8 20, [3 x i8] zeroinitializer }, align 4 +// PATTERN-O0: @__const.test_paddedpacked_uninit.uninit = private unnamed_addr constant %struct.paddedpacked <{ i8 -86, i32 -1431655766 }>, align 1 +// PATTERN: @__const.test_paddedpacked_custom.custom = private unnamed_addr constant %struct.paddedpacked <{ i8 42, i32 13371337 }>, align 1 +// ZERO: @__const.test_paddedpacked_custom.custom = private unnamed_addr constant %struct.paddedpacked <{ i8 42, i32 13371337 }>, align 1 +struct paddedpacked { char c; int i; } __attribute__((packed)); +// PATTERN-O0: @__const.test_paddedpackedarray_uninit.uninit = private unnamed_addr constant %struct.paddedpackedarray { [2 x %struct.paddedpacked] [%struct.paddedpacked <{ i8 -86, i32 -1431655766 }>, %struct.paddedpacked <{ i8 -86, i32 -1431655766 }>] }, align 1 +// PATTERN: @__const.test_paddedpackedarray_custom.custom = private unnamed_addr constant %struct.paddedpackedarray { [2 x %struct.paddedpacked] [%struct.paddedpacked <{ i8 42, i32 13371337 }>, %struct.paddedpacked <{ i8 43, i32 13371338 }>] }, align 1 +// ZERO: @__const.test_paddedpackedarray_custom.custom = private unnamed_addr constant %struct.paddedpackedarray { [2 x %struct.paddedpacked] [%struct.paddedpacked <{ i8 42, i32 13371337 }>, %struct.paddedpacked <{ i8 43, i32 13371338 }>] }, align 1 +struct paddedpackedarray { struct paddedpacked p[2]; }; +// PATTERN-O0: @__const.test_paddednested_uninit.uninit = private unnamed_addr constant { { i8, [3 x i8], i32 }, { i8, [3 x i8], i32 } } { { i8, [3 x i8], i32 } { i8 -86, [3 x i8] c"\AA\AA\AA", i32 -1431655766 }, { i8, [3 x i8], i32 } { i8 -86, [3 x i8] c"\AA\AA\AA", i32 -1431655766 } }, align 4 +// PATTERN: @__const.test_paddednested_custom.custom = private unnamed_addr constant { { i8, [3 x i8], i32 }, { i8, [3 x i8], i32 } } { { i8, [3 x i8], i32 } { i8 42, [3 x i8] c"\AA\AA\AA", i32 13371337 }, { i8, [3 x i8], i32 } { i8 43, [3 x i8] c"\AA\AA\AA", i32 13371338 } }, align 4 +// ZERO: @__const.test_paddednested_custom.custom = private unnamed_addr constant { { i8, [3 x i8], i32 }, { i8, [3 x i8], i32 } } { { i8, [3 x i8], i32 } { i8 42, [3 x i8] zeroinitializer, i32 13371337 }, { i8, [3 x i8], i32 } { i8 43, [3 x i8] zeroinitializer, i32 13371338 } }, align 4 +struct paddednested { struct padded p1, p2; }; +// PATTERN-O0: @__const.test_paddedpackednested_uninit.uninit = private unnamed_addr constant %struct.paddedpackednested { %struct.paddedpacked <{ i8 -86, i32 -1431655766 }>, %struct.paddedpacked <{ i8 -86, i32 -1431655766 }> }, align 1 +// PATTERN: @__const.test_paddedpackednested_custom.custom = private unnamed_addr constant %struct.paddedpackednested { %struct.paddedpacked <{ i8 42, i32 13371337 }>, %struct.paddedpacked <{ i8 43, i32 13371338 }> }, align 1 +// ZERO: @__const.test_paddedpackednested_custom.custom = private unnamed_addr constant %struct.paddedpackednested { %struct.paddedpacked <{ i8 42, i32 13371337 }>, %struct.paddedpacked <{ i8 43, i32 13371338 }> }, align 1 +struct paddedpackednested { struct paddedpacked p1, p2; }; +// PATTERN-O0: @__const.test_bitfield_uninit.uninit = private unnamed_addr constant %struct.bitfield { i8 -86, [3 x i8] c"\AA\AA\AA" }, align 4 +// PATTERN-O0: @__const.test_bitfield_custom.custom = private unnamed_addr constant %struct.bitfield { i8 20, [3 x i8] c"\AA\AA\AA" }, align 4 +// ZERO-O0: @__const.test_bitfield_custom.custom = private unnamed_addr constant %struct.bitfield { i8 20, [3 x i8] zeroinitializer }, align 4 +// PATTERN-O1-NOT: @__const.test_bitfield_uninit.uninit +// PATTERN-O1-NOT: @__const.test_bitfield_custom.custom +// ZERO-O1-NOT: @__const.test_bitfield_custom.custom struct bitfield { int i : 4; int j : 2; }; -// PATTERN: @__const.test_bitfieldaligned_uninit.uninit = private unnamed_addr constant %struct.bitfieldaligned { i8 -86, [3 x i8] c"\AA\AA\AA", i8 -86, [3 x i8] c"\AA\AA\AA" }, align 4 -// PATTERN: @__const.test_bitfieldaligned_custom.custom = private unnamed_addr constant %struct.bitfieldaligned { i8 4, [3 x i8] zeroinitializer, i8 1, [3 x i8] zeroinitializer }, align 4 -// ZERO: @__const.test_bitfieldaligned_custom.custom = private unnamed_addr constant %struct.bitfieldaligned { i8 4, [3 x i8] zeroinitializer, i8 1, [3 x i8] zeroinitializer }, align 4 +// PATTERN-O0: @__const.test_bitfieldaligned_uninit.uninit = private unnamed_addr constant %struct.bitfieldaligned { i8 -86, [3 x i8] c"\AA\AA\AA", i8 -86, [3 x i8] c"\AA\AA\AA" }, align 4 +// PATTERN-O0: @__const.test_bitfieldaligned_custom.custom = private unnamed_addr constant %struct.bitfieldaligned { i8 4, [3 x i8] c"\AA\AA\AA", i8 1, [3 x i8] c"\AA\AA\AA" }, align 4 +// ZERO-O0: @__const.test_bitfieldaligned_custom.custom = private unnamed_addr constant %struct.bitfieldaligned { i8 4, [3 x i8] zeroinitializer, i8 1, [3 x i8] zeroinitializer }, align 4 +// PATTERN-O1-NOT: @__const.test_bitfieldaligned_uninit.uninit +// PATTERN-O1-NOT: @__const.test_bitfieldaligned_custom.custom +// ZERO-O1-NOT: @__const.test_bitfieldaligned_custom.custom struct bitfieldaligned { int i : 4; int : 0; int j : 2; }; struct big { unsigned a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z; }; -// PATTERN: @__const.test_arraytail_uninit.uninit = private unnamed_addr constant %struct.arraytail { i32 -1431655766, [0 x i32] zeroinitializer }, align 4 -// PATTERN: @__const.test_arraytail_custom.custom = private unnamed_addr constant %struct.arraytail { i32 57005, [0 x i32] zeroinitializer }, align 4 -// ZERO: @__const.test_arraytail_custom.custom = private unnamed_addr constant %struct.arraytail { i32 57005, [0 x i32] zeroinitializer }, align 4 +// PATTERN-O0: @__const.test_arraytail_uninit.uninit = private unnamed_addr constant %struct.arraytail { i32 -1431655766, [0 x i32] zeroinitializer }, align 4 +// PATTERN-O0: @__const.test_arraytail_custom.custom = private unnamed_addr constant %struct.arraytail { i32 57005, [0 x i32] zeroinitializer }, align 4 +// ZERO-O0: @__const.test_arraytail_custom.custom = private unnamed_addr constant %struct.arraytail { i32 57005, [0 x i32] zeroinitializer }, align 4 +// PATTERN-O1-NOT: @__const.test_arraytail_uninit.uninit +// PATTERN-O1-NOT: @__const.test_arraytail_custom.custom +// ZERO-O1-NOT: @__const.test_arraytail_custom.custom struct arraytail { int i; int arr[]; }; -// PATTERN: @__const.test_int1_uninit.uninit = private unnamed_addr constant [1 x i32] [i32 -1431655766], align 4 -// PATTERN: @__const.test_int1_custom.custom = private unnamed_addr constant [1 x i32] [i32 858993459], align 4 -// ZERO: @__const.test_int1_custom.custom = private unnamed_addr constant [1 x i32] [i32 858993459], align 4 -// PATTERN: @__const.test_bool4_uninit.uninit = private unnamed_addr constant [4 x i8] c"\AA\AA\AA\AA", align 1 -// PATTERN: @__const.test_bool4_custom.custom = private unnamed_addr constant [4 x i8] c"\01\01\01\01", align 1 -// ZERO: @__const.test_bool4_custom.custom = private unnamed_addr constant [4 x i8] c"\01\01\01\01", align 1 +// PATTERN-O0: @__const.test_int1_uninit.uninit = private unnamed_addr constant [1 x i32] [i32 -1431655766], align 4 +// PATTERN-O0: @__const.test_int1_custom.custom = private unnamed_addr constant [1 x i32] [i32 858993459], align 4 +// ZERO-O0: @__const.test_int1_custom.custom = private unnamed_addr constant [1 x i32] [i32 858993459], align 4 +// PATTERN-O1-NOT: @__const.test_int1_uninit.uninit +// PATTERN-O1-NOT: @__const.test_int1_custom.custom +// ZERO-O1-NOT: @__const.test_int1_custom.custom + +// PATTERN-O0: @__const.test_bool4_uninit.uninit = private unnamed_addr constant [4 x i8] c"\AA\AA\AA\AA", align 1 +// PATTERN-O0: @__const.test_bool4_custom.custom = private unnamed_addr constant [4 x i8] c"\01\01\01\01", align 1 +// ZERO-O0: @__const.test_bool4_custom.custom = private unnamed_addr constant [4 x i8] c"\01\01\01\01", align 1 +// PATTERN-O1-NOT: @__const.test_bool4_uninit.uninit +// PATTERN-O1-NOT: @__const.test_bool4_custom.custom +// ZERO-O1-NOT: @__const.test_bool4_custom.custom + // PATTERN: @__const.test_intptr4_uninit.uninit = private unnamed_addr constant [4 x i32*] [i32* inttoptr (i64 -6148914691236517206 to i32*), i32* inttoptr (i64 -6148914691236517206 to i32*), i32* inttoptr (i64 -6148914691236517206 to i32*), i32* inttoptr (i64 -6148914691236517206 to i32*)], align 16 // PATTERN: @__const.test_intptr4_custom.custom = private unnamed_addr constant [4 x i32*] [i32* inttoptr (i64 572662306 to i32*), i32* inttoptr (i64 572662306 to i32*), i32* inttoptr (i64 572662306 to i32*), i32* inttoptr (i64 572662306 to i32*)], align 16 // ZERO: @__const.test_intptr4_custom.custom = private unnamed_addr constant [4 x i32*] [i32* inttoptr (i64 572662306 to i32*), i32* inttoptr (i64 572662306 to i32*), i32* inttoptr (i64 572662306 to i32*), i32* inttoptr (i64 572662306 to i32*)], align 16 -// PATTERN: @__const.test_tailpad4_uninit.uninit = private unnamed_addr constant [4 x %struct.tailpad] [%struct.tailpad { i16 -21846, i8 -86 }, %struct.tailpad { i16 -21846, i8 -86 }, %struct.tailpad { i16 -21846, i8 -86 }, %struct.tailpad { i16 -21846, i8 -86 }], align 16 -// PATTERN: @__const.test_tailpad4_custom.custom = private unnamed_addr constant [4 x %struct.tailpad] [%struct.tailpad { i16 257, i8 1 }, %struct.tailpad { i16 257, i8 1 }, %struct.tailpad { i16 257, i8 1 }, %struct.tailpad { i16 257, i8 1 }], align 16 -// ZERO: @__const.test_tailpad4_custom.custom = private unnamed_addr constant [4 x %struct.tailpad] [%struct.tailpad { i16 257, i8 1 }, %struct.tailpad { i16 257, i8 1 }, %struct.tailpad { i16 257, i8 1 }, %struct.tailpad { i16 257, i8 1 }], align 16 +// PATTERN-O0: @__const.test_tailpad4_uninit.uninit = private unnamed_addr constant [4 x { i16, i8, [1 x i8] }] [{ i16, i8, [1 x i8] } { i16 -21846, i8 -86, [1 x i8] c"\AA" }, { i16, i8, [1 x i8] } { i16 -21846, i8 -86, [1 x i8] c"\AA" }, { i16, i8, [1 x i8] } { i16 -21846, i8 -86, [1 x i8] c"\AA" }, { i16, i8, [1 x i8] } { i16 -21846, i8 -86, [1 x i8] c"\AA" }], align 16 +// PATTERN-O1-NOT: @__const.test_tailpad4_uninit.uninit +// PATTERN: @__const.test_tailpad4_custom.custom = private unnamed_addr constant [4 x { i16, i8, [1 x i8] }] [{ i16, i8, [1 x i8] } { i16 257, i8 1, [1 x i8] c"\AA" }, { i16, i8, [1 x i8] } { i16 257, i8 1, [1 x i8] c"\AA" }, { i16, i8, [1 x i8] } { i16 257, i8 1, [1 x i8] c"\AA" }, { i16, i8, [1 x i8] } { i16 257, i8 1, [1 x i8] c"\AA" }], align 16 +// ZERO: @__const.test_tailpad4_custom.custom = private unnamed_addr constant [4 x { i16, i8, [1 x i8] }] [{ i16, i8, [1 x i8] } { i16 257, i8 1, [1 x i8] zeroinitializer }, { i16, i8, [1 x i8] } { i16 257, i8 1, [1 x i8] zeroinitializer }, { i16, i8, [1 x i8] } { i16 257, i8 1, [1 x i8] zeroinitializer }, { i16, i8, [1 x i8] } { i16 257, i8 1, [1 x i8] zeroinitializer }], align 16 struct tailpad { short s; char c; }; -// PATTERN: @__const.test_atomicnotlockfree_uninit.uninit = private unnamed_addr constant %struct.notlockfree { [4 x i64] [i64 -6148914691236517206, i64 -6148914691236517206, i64 -6148914691236517206, i64 -6148914691236517206] }, align 8 +// PATTERN-O0: @__const.test_atomicnotlockfree_uninit.uninit = private unnamed_addr constant %struct.notlockfree { [4 x i64] [i64 -6148914691236517206, i64 -6148914691236517206, i64 -6148914691236517206, i64 -6148914691236517206] }, align 8 +// PATTERN-O1-NOT: @__const.test_atomicnotlockfree_uninit.uninit struct notlockfree { long long a[4]; }; -// PATTERN: @__const.test_atomicpadded_uninit.uninit = private unnamed_addr constant %struct.padded { i8 -86, i32 -1431655766 }, align 8 -// PATTERN: @__const.test_atomictailpad_uninit.uninit = private unnamed_addr constant %struct.tailpad { i16 -21846, i8 -86 }, align 4 -// PATTERN: @__const.test_complexfloat_uninit.uninit = private unnamed_addr constant { float, float } { float 0xFFFFFFFFE0000000, float 0xFFFFFFFFE0000000 }, align 4 -// PATTERN: @__const.test_complexfloat_braces.braces = private unnamed_addr constant { float, float } { float 0xFFFFFFFFE0000000, float 0xFFFFFFFFE0000000 }, align 4 -// PATTERN: @__const.test_complexfloat_custom.custom = private unnamed_addr constant { float, float } { float 0xFFFFFFFFE0000000, float 0xFFFFFFFFE0000000 }, align 4 -// PATTERN: @__const.test_complexdouble_uninit.uninit = private unnamed_addr constant { double, double } { double 0xFFFFFFFFFFFFFFFF, double 0xFFFFFFFFFFFFFFFF }, align 8 -// PATTERN: @__const.test_complexdouble_braces.braces = private unnamed_addr constant { double, double } { double 0xFFFFFFFFFFFFFFFF, double 0xFFFFFFFFFFFFFFFF }, align 8 -// PATTERN: @__const.test_complexdouble_custom.custom = private unnamed_addr constant { double, double } { double 0xFFFFFFFFFFFFFFFF, double 0xFFFFFFFFFFFFFFFF }, align 8 -// PATTERN: @__const.test_semivolatile_uninit.uninit = private unnamed_addr constant %struct.semivolatile { i32 -1431655766, i32 -1431655766 }, align 4 -// PATTERN: @__const.test_semivolatile_custom.custom = private unnamed_addr constant %struct.semivolatile { i32 1145324612, i32 1145324612 }, align 4 +// PATTERN-O0: @__const.test_atomicpadded_uninit.uninit = private unnamed_addr constant { i8, [3 x i8], i32 } { i8 -86, [3 x i8] c"\AA\AA\AA", i32 -1431655766 }, align 8 +// PATTERN-O1-NOT: @__const.test_atomicpadded_uninit.uninit +// PATTERN-O0: @__const.test_atomictailpad_uninit.uninit = private unnamed_addr constant { i16, i8, [1 x i8] } { i16 -21846, i8 -86, [1 x i8] c"\AA" }, align 4 +// PATTERN-O1-NOT: @__const.test_atomictailpad_uninit.uninit +// PATTERN-O0: @__const.test_complexfloat_uninit.uninit = private unnamed_addr constant { float, float } { float 0xFFFFFFFFE0000000, float 0xFFFFFFFFE0000000 }, align 4 +// PATTERN-O1-NOT: @__const.test_complexfloat_uninit.uninit +// PATTERN-O0: @__const.test_complexfloat_braces.braces = private unnamed_addr constant { float, float } { float 0xFFFFFFFFE0000000, float 0xFFFFFFFFE0000000 }, align 4 +// PATTERN-O1-NOT: @__const.test_complexfloat_braces.braces +// PATTERN-O0: @__const.test_complexfloat_custom.custom = private unnamed_addr constant { float, float } { float 0xFFFFFFFFE0000000, float 0xFFFFFFFFE0000000 }, align 4 +// PATTERN-O1-NOT: @__const.test_complexfloat_custom.custom +// PATTERN-O0: @__const.test_complexdouble_uninit.uninit = private unnamed_addr constant { double, double } { double 0xFFFFFFFFFFFFFFFF, double 0xFFFFFFFFFFFFFFFF }, align 8 +// PATTERN-O1-NOT: @__const.test_complexdouble_uninit.uninit +// PATTERN-O0: @__const.test_complexdouble_braces.braces = private unnamed_addr constant { double, double } { double 0xFFFFFFFFFFFFFFFF, double 0xFFFFFFFFFFFFFFFF }, align 8 +// PATTERN-O1-NOT: @__const.test_complexdouble_braces.braces +// PATTERN-O0: @__const.test_complexdouble_custom.custom = private unnamed_addr constant { double, double } { double 0xFFFFFFFFFFFFFFFF, double 0xFFFFFFFFFFFFFFFF }, align 8 +// PATTERN-O1-NOT: @__const.test_complexdouble_custom.custom +// PATTERN-O0: @__const.test_semivolatile_uninit.uninit = private unnamed_addr constant %struct.semivolatile { i32 -1431655766, i32 -1431655766 }, align 4 +// PATTERN-O0: @__const.test_semivolatile_custom.custom = private unnamed_addr constant %struct.semivolatile { i32 1145324612, i32 1145324612 }, align 4 +// PATTERN-O1-NOT: @__const.test_semivolatile_custom.custom struct semivolatile { int i; volatile int vi; }; -// PATTERN: @__const.test_semivolatileinit_uninit.uninit = private unnamed_addr constant %struct.semivolatileinit { i32 -1431655766, i32 -1431655766 }, align 4 -// PATTERN: @__const.test_semivolatileinit_braces.braces = private unnamed_addr constant %struct.semivolatileinit { i32 -1431655766, i32 -1431655766 }, align 4 -// PATTERN: @__const.test_semivolatileinit_custom.custom = private unnamed_addr constant %struct.semivolatileinit { i32 -1431655766, i32 -1431655766 }, align 4 -// ZERO: @__const.test_semivolatile_custom.custom = private unnamed_addr constant %struct.semivolatile { i32 1145324612, i32 1145324612 }, align 4 +// PATTERN-O0: @__const.test_semivolatileinit_uninit.uninit = private unnamed_addr constant %struct.semivolatileinit { i32 -1431655766, i32 -1431655766 }, align 4 +// PATTERN-O1-NOT: @__const.test_semivolatileinit_uninit.uninit +// PATTERN-O0: @__const.test_semivolatileinit_braces.braces = private unnamed_addr constant %struct.semivolatileinit { i32 -1431655766, i32 -1431655766 }, align 4 +// PATTERN-O1-NOT: @__const.test_semivolatileinit_braces.braces +// PATTERN-O0: @__const.test_semivolatileinit_custom.custom = private unnamed_addr constant %struct.semivolatileinit { i32 -1431655766, i32 -1431655766 }, align 4 +// PATTERN-O1-NOT: @__const.test_semivolatileinit_custom.custom = private unnamed_addr constant %struct.semivolatileinit { i32 -1431655766, i32 -1431655766 }, align 4 +// ZERO-O0: @__const.test_semivolatile_custom.custom = private unnamed_addr constant %struct.semivolatile { i32 1145324612, i32 1145324612 }, align 4 +// ZERO-O1-NOT: @__const.test_semivolatile_custom.custom struct semivolatileinit { int i = 0x11111111; volatile int vi = 0x11111111; }; -// PATTERN: @__const.test_base_uninit.uninit = private unnamed_addr constant %struct.base { i32 (...)** inttoptr (i64 -6148914691236517206 to i32 (...)**) }, align 8 -// PATTERN: @__const.test_base_braces.braces = private unnamed_addr constant %struct.base { i32 (...)** inttoptr (i64 -6148914691236517206 to i32 (...)**) }, align 8 +// PATTERN-O0: @__const.test_base_uninit.uninit = private unnamed_addr constant %struct.base { i32 (...)** inttoptr (i64 -6148914691236517206 to i32 (...)**) }, align 8 +// PATTERN-O1-NOT: @__const.test_base_uninit.uninit +// PATTERN-O0: @__const.test_base_braces.braces = private unnamed_addr constant %struct.base { i32 (...)** inttoptr (i64 -6148914691236517206 to i32 (...)**) }, align 8 +// PATTERN-O1-NOT: @__const.test_base_braces.braces struct base { virtual ~base(); }; -// PATTERN: @__const.test_derived_uninit.uninit = private unnamed_addr constant %struct.derived { %struct.base { i32 (...)** inttoptr (i64 -6148914691236517206 to i32 (...)**) } }, align 8 -// PATTERN: @__const.test_derived_braces.braces = private unnamed_addr constant %struct.derived { %struct.base { i32 (...)** inttoptr (i64 -6148914691236517206 to i32 (...)**) } }, align 8 +// PATTERN-O0: @__const.test_derived_uninit.uninit = private unnamed_addr constant %struct.derived { %struct.base { i32 (...)** inttoptr (i64 -6148914691236517206 to i32 (...)**) } }, align 8 +// PATTERN-O1-NOT: @__const.test_derived_uninit.uninit +// PATTERN-O0: @__const.test_derived_braces.braces = private unnamed_addr constant %struct.derived { %struct.base { i32 (...)** inttoptr (i64 -6148914691236517206 to i32 (...)**) } }, align 8 +// PATTERN-O1-NOT: @__const.test_derived_braces.braces struct derived : public base {}; -// PATTERN: @__const.test_virtualderived_uninit.uninit = private unnamed_addr constant %struct.virtualderived { %struct.base { i32 (...)** inttoptr (i64 -6148914691236517206 to i32 (...)**) }, %struct.derived { %struct.base { i32 (...)** inttoptr (i64 -6148914691236517206 to i32 (...)**) } } }, align 8 -// PATTERN: @__const.test_virtualderived_braces.braces = private unnamed_addr constant %struct.virtualderived { %struct.base { i32 (...)** inttoptr (i64 -6148914691236517206 to i32 (...)**) }, %struct.derived { %struct.base { i32 (...)** inttoptr (i64 -6148914691236517206 to i32 (...)**) } } }, align 8 +// PATTERN-O0: @__const.test_virtualderived_uninit.uninit = private unnamed_addr constant %struct.virtualderived { %struct.base { i32 (...)** inttoptr (i64 -6148914691236517206 to i32 (...)**) }, %struct.derived { %struct.base { i32 (...)** inttoptr (i64 -6148914691236517206 to i32 (...)**) } } }, align 8 +// PATTERN-O1-NOT: @__const.test_virtualderived_uninit.uninit +// PATTERN-O0: @__const.test_virtualderived_braces.braces = private unnamed_addr constant %struct.virtualderived { %struct.base { i32 (...)** inttoptr (i64 -6148914691236517206 to i32 (...)**) }, %struct.derived { %struct.base { i32 (...)** inttoptr (i64 -6148914691236517206 to i32 (...)**) } } }, align 8 +// PATTERN-O1-NOT: @__const.test_virtualderived_braces.braces struct virtualderived : public virtual base, public virtual derived {}; -// PATTERN: @__const.test_matching_uninit.uninit = private unnamed_addr constant %union.matching { i32 -1431655766 }, align 4 -// PATTERN: @__const.test_matching_custom.custom = private unnamed_addr constant { float } { float 6.145500e+04 }, align 4 +// PATTERN-O0: @__const.test_matching_uninit.uninit = private unnamed_addr constant %union.matching { i32 -1431655766 }, align 4 +// PATTERN-O1-NOT: @__const.test_matching_uninit.uninit +// PATTERN-O0: @__const.test_matching_custom.custom = private unnamed_addr constant { float } { float 6.145500e+04 }, align 4 +// PATTERN-O1-NOT: @__const.test_matching_custom.custom +// ZERO-O0: @__const.test_matching_custom.custom = private unnamed_addr constant { float } { float 6.145500e+04 }, align 4 +// ZERO-O1-NOT: @__const.test_matching_custom.custom union matching { int i; float f; }; -// PATTERN: @__const.test_matchingreverse_uninit.uninit = private unnamed_addr constant %union.matchingreverse { float 0xFFFFFFFFE0000000 }, align 4 -// PATTERN: @__const.test_matchingreverse_custom.custom = private unnamed_addr constant { i32 } { i32 61455 }, align 4 -// ZERO: @__const.test_matching_custom.custom = private unnamed_addr constant { float } { float 6.145500e+04 }, align 4 +// PATTERN-O0: @__const.test_matchingreverse_uninit.uninit = private unnamed_addr constant %union.matchingreverse { float 0xFFFFFFFFE0000000 }, align 4 +// PATTERN-O1-NOT: @__const.test_matchingreverse_uninit.uninit +// PATTERN-O0: @__const.test_matchingreverse_custom.custom = private unnamed_addr constant { i32 } { i32 61455 }, align 4 +// PATTERN-O1-NOT: @__const.test_matchingreverse_custom.custom +// ZERO-O0: @__const.test_matchingreverse_custom.custom = private unnamed_addr constant { i32 } { i32 61455 }, align 4 +// ZERO-O1-NOT: @__const.test_matchingreverse_custom.custom union matchingreverse { float f; int i; }; -// PATTERN: @__const.test_unmatched_uninit.uninit = private unnamed_addr constant %union.unmatched { i32 -1431655766 }, align 4 -// PATTERN: @__const.test_unmatched_custom.custom = private unnamed_addr constant %union.unmatched { i32 1001242351 }, align 4 -// ZERO: @__const.test_matchingreverse_custom.custom = private unnamed_addr constant { i32 } { i32 61455 }, align 4 +// PATTERN-O0: @__const.test_unmatched_uninit.uninit = private unnamed_addr constant %union.unmatched { i32 -1431655766 }, align 4 +// PATTERN-O1-NOT: @__const.test_unmatched_uninit.uninit +// PATTERN-O0: @__const.test_unmatched_custom.custom = private unnamed_addr constant %union.unmatched { i32 1001242351 }, align 4 +// PATTERN-O1-NOT: @__const.test_unmatched_custom.custom +// ZERO-O0: @__const.test_unmatched_custom.custom = private unnamed_addr constant %union.unmatched { i32 1001242351 }, align 4 +// ZERO-O1-NOT: @__const.test_unmatched_custom.custom union unmatched { char c; int i; }; -// PATTERN: @__const.test_unmatchedreverse_uninit.uninit = private unnamed_addr constant %union.unmatchedreverse { i32 -1431655766 }, align 4 -// PATTERN: @__const.test_unmatchedreverse_custom.custom = private unnamed_addr constant { i8, [3 x i8] } { i8 42, [3 x i8] zeroinitializer }, align 4 -// ZERO: @__const.test_unmatched_custom.custom = private unnamed_addr constant %union.unmatched { i32 1001242351 }, align 4 +// PATTERN-O0: @__const.test_unmatchedreverse_uninit.uninit = private unnamed_addr constant %union.unmatchedreverse { i32 -1431655766 }, align 4 +// PATTERN-O1-NOT: @__const.test_unmatchedreverse_uninit.uninit +// PATTERN-O0: @__const.test_unmatchedreverse_custom.custom = private unnamed_addr constant { i8, [3 x i8] } { i8 42, [3 x i8] c"\AA\AA\AA" }, align 4 +// PATTERN-O1-NOT: @__const.test_unmatchedreverse_custom.custom +// ZERO-O0: @__const.test_unmatchedreverse_custom.custom = private unnamed_addr constant { i8, [3 x i8] } { i8 42, [3 x i8] zeroinitializer }, align 4 +// ZERO-O1-NOT: @__const.test_unmatchedreverse_custom.custom union unmatchedreverse { int i; char c; }; -// PATTERN: @__const.test_unmatchedfp_uninit.uninit = private unnamed_addr constant %union.unmatchedfp { double 0xFFFFFFFFFFFFFFFF }, align 8 -// PATTERN: @__const.test_unmatchedfp_custom.custom = private unnamed_addr constant %union.unmatchedfp { double 0x400921FB54442D18 }, align 8 -// ZERO: @__const.test_unmatchedreverse_custom.custom = private unnamed_addr constant { i8, [3 x i8] } { i8 42, [3 x i8] zeroinitializer }, align 4 -// ZERO: @__const.test_unmatchedfp_custom.custom = private unnamed_addr constant %union.unmatchedfp { double 0x400921FB54442D18 }, align 8 +// PATTERN-O0: @__const.test_unmatchedfp_uninit.uninit = private unnamed_addr constant %union.unmatchedfp { double 0xFFFFFFFFFFFFFFFF }, align 8 +// PATTERN-O1-NOT: @__const.test_unmatchedfp_uninit.uninit +// PATTERN-O0: @__const.test_unmatchedfp_custom.custom = private unnamed_addr constant %union.unmatchedfp { double 0x400921FB54442D18 }, align 8 +// PATTERN-O1-NOT: @__const.test_unmatchedfp_custom.custom +// ZERO-O0: @__const.test_unmatchedfp_custom.custom = private unnamed_addr constant %union.unmatchedfp { double 0x400921FB54442D18 }, align 8 +// ZERO-O1-NOT: @__const.test_unmatchedfp_custom.custom union unmatchedfp { float f; double d; }; enum emptyenum {}; enum smallenum { VALUE }; @@ -472,9 +562,11 @@ TEST_UNINIT(empty, empty); // CHECK: %uninit = alloca %struct.empty, align // CHECK-NEXT: call void @{{.*}}used{{.*}}%uninit) // PATTERN-LABEL: @test_empty_uninit() -// PATTERN: call void @llvm.memcpy{{.*}} @__const.test_empty_uninit.uninit +// PATTERN-O0: call void @llvm.memcpy{{.*}} @__const.test_empty_uninit.uninit +// PATTERN-O1: store i8 -86, {{.*}} align 1 // ZERO-LABEL: @test_empty_uninit() -// ZERO: call void @llvm.memset{{.*}}, i8 0, +// ZERO-O0: call void @llvm.memset{{.*}}, i8 0, +// ZERO-O1: store i8 0, {{.*}} align 1 TEST_BRACES(empty, empty); // CHECK-LABEL: @test_empty_braces() @@ -488,9 +580,11 @@ TEST_UNINIT(small, small); // CHECK: %uninit = alloca %struct.small, align // CHECK-NEXT: call void @{{.*}}used{{.*}}%uninit) // PATTERN-LABEL: @test_small_uninit() -// PATTERN: call void @llvm.memcpy{{.*}} @__const.test_small_uninit.uninit +// PATTERN-O0: call void @llvm.memcpy{{.*}} @__const.test_small_uninit.uninit +// PATTERN-O1: store i8 -86, {{.*}} align 1 // ZERO-LABEL: @test_small_uninit() -// ZERO: call void @llvm.memset{{.*}}, i8 0, +// ZERO-O0: call void @llvm.memset{{.*}}, i8 0, +// ZERO-O1: store i8 0, {{.*}} align 1 TEST_BRACES(small, small); // CHECK-LABEL: @test_small_braces() @@ -532,9 +626,12 @@ TEST_UNINIT(smallpartinit, smallpartinit); // CHECK-NEXT: call void @{{.*}}smallpartinit{{.*}}%uninit) // CHECK-NEXT: call void @{{.*}}used{{.*}}%uninit) // PATTERN-LABEL: @test_smallpartinit_uninit() -// PATTERN: call void @llvm.memcpy{{.*}} @__const.test_smallpartinit_uninit.uninit +// PATTERN-O0: call void @llvm.memcpy{{.*}} @__const.test_smallpartinit_uninit.uninit +// PATTERN-O1: store i8 -86, {{.*}} align 1 +// PATTERN-O1: store i8 42, {{.*}} align 1 // ZERO-LABEL: @test_smallpartinit_uninit() -// ZERO: call void @llvm.memset{{.*}}, i8 0, +// ZERO-O0: call void @llvm.memset{{.*}}, i8 0, +// ZERO-O1: store i16 0, i16* %uninit, align 2 TEST_BRACES(smallpartinit, smallpartinit); // CHECK-LABEL: @test_smallpartinit_braces() @@ -579,9 +676,11 @@ TEST_UNINIT(padded, padded); // CHECK: %uninit = alloca %struct.padded, align // CHECK-NEXT: call void @{{.*}}used{{.*}}%uninit) // PATTERN-LABEL: @test_padded_uninit() -// PATTERN: call void @llvm.memcpy{{.*}} @__const.test_padded_uninit.uninit +// PATTERN-O0: call void @llvm.memcpy{{.*}} @__const.test_padded_uninit.uninit +// PATTERN-O1: store i64 -6148914691236517206, i64* %uninit, align 8 // ZERO-LABEL: @test_padded_uninit() -// ZERO: call void @llvm.memset{{.*}}, i8 0, +// ZERO-O0: call void @llvm.memset{{.*}}, i8 0, +// ZERO-O1: store i64 0, i64* %uninit, align 8 TEST_BRACES(padded, padded); // CHECK-LABEL: @test_padded_braces() @@ -603,9 +702,11 @@ TEST_UNINIT(paddednullinit, paddednullinit); // CHECK-NEXT: call void @{{.*}}paddednullinit{{.*}}%uninit) // CHECK-NEXT: call void @{{.*}}used{{.*}}%uninit) // PATTERN-LABEL: @test_paddednullinit_uninit() -// PATTERN: call void @llvm.memcpy{{.*}} @__const.test_paddednullinit_uninit.uninit +// PATTERN-O0: call void @llvm.memcpy{{.*}} @__const.test_paddednullinit_uninit.uninit +// PATTERN-O1: store i64 -6148914691236517206, i64* %uninit, align 8 // ZERO-LABEL: @test_paddednullinit_uninit() -// ZERO: call void @llvm.memset{{.*}}, i8 0, +// ZERO-O0: call void @llvm.memset{{.*}}, i8 0, +// ZERO-O1: store i64 0, i64* %uninit, align 8 TEST_BRACES(paddednullinit, paddednullinit); // CHECK-LABEL: @test_paddednullinit_braces() @@ -625,14 +726,119 @@ TEST_CUSTOM(paddednullinit, paddednullinit, { 42, 13371337 }); // CHECK-NEXT: store i32 13371337, i32* %[[I]], align [[ALIGN]] // CHECK-NEXT: call void @{{.*}}used{{.*}}%custom) +TEST_UNINIT(paddedpacked, paddedpacked); +// CHECK-LABEL: @test_paddedpacked_uninit() +// CHECK: %uninit = alloca %struct.paddedpacked, align +// CHECK-NEXT: call void @{{.*}}used{{.*}}%uninit) +// PATTERN-LABEL: @test_paddedpacked_uninit() +// PATTERN-O0: call void @llvm.memcpy{{.*}} @__const.test_paddedpacked_uninit.uninit +// PATTERN-O1: %[[C:[^ ]*]] = getelementptr inbounds {{.*}}%uninit, i64 0, i32 0 +// PATTERN-O1 store i8 -86, i8* %[[C]], align +// PATTERN-O1: %[[I:[^ ]*]] = getelementptr inbounds {{.*}}%uninit, i64 0, i32 1 +// PATTERN-O1: store i32 -1431655766, i32* %[[I]], align + +// ZERO-LABEL: @test_paddedpacked_uninit() +// ZERO: call void @llvm.memset{{.*}}, i8 0, + +TEST_BRACES(paddedpacked, paddedpacked); +// CHECK-LABEL: @test_paddedpacked_braces() +// CHECK: %braces = alloca %struct.paddedpacked, align [[ALIGN:[0-9]*]] +// CHECK-NEXT: bitcast +// CHECK-NEXT: call void @llvm.memset{{.*}}(i8* align [[ALIGN]] %{{.*}}, i8 0, i64 5, i1 false) +// CHECK-NEXT: call void @{{.*}}used{{.*}}%braces) + +TEST_CUSTOM(paddedpacked, paddedpacked, { 42, 13371337 }); +// CHECK-LABEL: @test_paddedpacked_custom() +// CHECK: %custom = alloca %struct.paddedpacked, align +// CHECK-NEXT: bitcast +// CHECK-NEXT: call void @llvm.memcpy{{.*}}({{.*}}@__const.test_paddedpacked_custom.custom +// CHECK-NEXT: call void @{{.*}}used{{.*}}%custom) + +TEST_UNINIT(paddedpackedarray, paddedpackedarray); +// CHECK-LABEL: @test_paddedpackedarray_uninit() +// CHECK: %uninit = alloca %struct.paddedpackedarray, align +// CHECK-NEXT: call void @{{.*}}used{{.*}}%uninit) +// PATTERN-LABEL: @test_paddedpackedarray_uninit() +// PATTERN-O0: call void @llvm.memcpy{{.*}} @__const.test_paddedpackedarray_uninit.uninit +// PATTERN-O1: getelementptr +// PATTERN-O1: call void @llvm.memset{{.*}}({{.*}}i8 -86, i64 10 +// ZERO-LABEL: @test_paddedpackedarray_uninit() +// ZERO: call void @llvm.memset{{.*}}, i8 0, + +TEST_BRACES(paddedpackedarray, paddedpackedarray); +// CHECK-LABEL: @test_paddedpackedarray_braces() +// CHECK: %braces = alloca %struct.paddedpackedarray, align [[ALIGN:[0-9]*]] +// CHECK-NEXT: bitcast +// CHECK-NEXT: call void @llvm.memset{{.*}}(i8* align [[ALIGN]] %{{.*}}, i8 0, i64 10, i1 false) +// CHECK-NEXT: call void @{{.*}}used{{.*}}%braces) + +TEST_CUSTOM(paddedpackedarray, paddedpackedarray, { {{ 42, 13371337 }, { 43, 13371338 }} }); +// CHECK-LABEL: @test_paddedpackedarray_custom() +// CHECK: %custom = alloca %struct.paddedpackedarray, align +// CHECK-NEXT: bitcast +// CHECK-NEXT: call void @llvm.memcpy{{.*}}({{.*}}@__const.test_paddedpackedarray_custom.custom +// CHECK-NEXT: call void @{{.*}}used{{.*}}%custom) + +TEST_UNINIT(paddednested, paddednested); +// CHECK-LABEL: @test_paddednested_uninit() +// CHECK: %uninit = alloca %struct.paddednested, align +// CHECK-NEXT: call void @{{.*}}used{{.*}}%uninit) +// PATTERN-LABEL: @test_paddednested_uninit() +// PATTERN-O0: call void @llvm.memcpy{{.*}} @__const.test_paddednested_uninit.uninit +// PATTERN-O1: getelementptr +// PATTERN-O1: call void @llvm.memset{{.*}}({{.*}}, i8 -86, i64 16 +// ZERO-LABEL: @test_paddednested_uninit() +// ZERO: call void @llvm.memset{{.*}}, i8 0, + +TEST_BRACES(paddednested, paddednested); +// CHECK-LABEL: @test_paddednested_braces() +// CHECK: %braces = alloca %struct.paddednested, align [[ALIGN:[0-9]*]] +// CHECK-NEXT: bitcast +// CHECK-NEXT: call void @llvm.memset{{.*}}(i8* align [[ALIGN]] %{{.*}}, i8 0, i64 16, i1 false) +// CHECK-NEXT: call void @{{.*}}used{{.*}}%braces) + +TEST_CUSTOM(paddednested, paddednested, { { 42, 13371337 }, { 43, 13371338 } }); +// CHECK-LABEL: @test_paddednested_custom() +// CHECK: %custom = alloca %struct.paddednested, align +// CHECK-NEXT: bitcast +// CHECK-NEXT: call void @llvm.memcpy{{.*}}({{.*}}@__const.test_paddednested_custom.custom +// CHECK-NEXT: call void @{{.*}}used{{.*}}%custom) + +TEST_UNINIT(paddedpackednested, paddedpackednested); +// CHECK-LABEL: @test_paddedpackednested_uninit() +// CHECK: %uninit = alloca %struct.paddedpackednested, align +// CHECK-NEXT: call void @{{.*}}used{{.*}}%uninit) +// PATTERN-LABEL: @test_paddedpackednested_uninit() +// PATTERN-O0: call void @llvm.memcpy{{.*}} @__const.test_paddedpackednested_uninit.uninit +// PATTERN-O1: getelementptr +// PATTERN-O1: call void @llvm.memset.p0i8.i64(i8* nonnull align 1 %0, i8 -86, i64 10, i1 false +// ZERO-LABEL: @test_paddedpackednested_uninit() +// ZERO: call void @llvm.memset{{.*}}, i8 0, + +TEST_BRACES(paddedpackednested, paddedpackednested); +// CHECK-LABEL: @test_paddedpackednested_braces() +// CHECK: %braces = alloca %struct.paddedpackednested, align [[ALIGN:[0-9]*]] +// CHECK-NEXT: bitcast +// CHECK-NEXT: call void @llvm.memset{{.*}}(i8* align [[ALIGN]] %{{.*}}, i8 0, i64 10, i1 false) +// CHECK-NEXT: call void @{{.*}}used{{.*}}%braces) + +TEST_CUSTOM(paddedpackednested, paddedpackednested, { { 42, 13371337 }, { 43, 13371338 } }); +// CHECK-LABEL: @test_paddedpackednested_custom() +// CHECK: %custom = alloca %struct.paddedpackednested, align +// CHECK-NEXT: bitcast +// CHECK-NEXT: call void @llvm.memcpy{{.*}}({{.*}}@__const.test_paddedpackednested_custom.custom +// CHECK-NEXT: call void @{{.*}}used{{.*}}%custom) + TEST_UNINIT(bitfield, bitfield); // CHECK-LABEL: @test_bitfield_uninit() // CHECK: %uninit = alloca %struct.bitfield, align // CHECK-NEXT: call void @{{.*}}used{{.*}}%uninit) // PATTERN-LABEL: @test_bitfield_uninit() -// PATTERN: call void @llvm.memcpy{{.*}} @__const.test_bitfield_uninit.uninit +// PATTERN-O0: call void @llvm.memcpy{{.*}} @__const.test_bitfield_uninit.uninit +// PATTERN-O1: store i32 -1431655766, i32* %uninit, align 4 // ZERO-LABEL: @test_bitfield_uninit() -// ZERO: call void @llvm.memset{{.*}}, i8 0, +// ZERO-O0: call void @llvm.memset{{.*}}, i8 0, +// ZERO-O1: store i32 0, i32* %uninit, align 4 TEST_BRACES(bitfield, bitfield); // CHECK-LABEL: @test_bitfield_braces() @@ -653,9 +859,11 @@ TEST_UNINIT(bitfieldaligned, bitfieldaligned); // CHECK: %uninit = alloca %struct.bitfieldaligned, align // CHECK-NEXT: call void @{{.*}}used{{.*}}%uninit) // PATTERN-LABEL: @test_bitfieldaligned_uninit() -// PATTERN: call void @llvm.memcpy{{.*}} @__const.test_bitfieldaligned_uninit.uninit +// PATTERN-O0: call void @llvm.memcpy{{.*}} @__const.test_bitfieldaligned_uninit.uninit +// PATTERN-O1: store i64 -6148914691236517206, i64* %uninit, align 8 // ZERO-LABEL: @test_bitfieldaligned_uninit() -// ZERO: call void @llvm.memset{{.*}}, i8 0, +// ZERO-O0: call void @llvm.memset{{.*}}, i8 0, +// ZERO-O1: store i64 0, i64* %uninit, align 8 TEST_BRACES(bitfieldaligned, bitfieldaligned); // CHECK-LABEL: @test_bitfieldaligned_braces() @@ -699,9 +907,11 @@ TEST_UNINIT(arraytail, arraytail); // CHECK: %uninit = alloca %struct.arraytail, align // CHECK-NEXT: call void @{{.*}}used{{.*}}%uninit) // PATTERN-LABEL: @test_arraytail_uninit() -// PATTERN: call void @llvm.memcpy{{.*}} @__const.test_arraytail_uninit.uninit +// PATTERN-O0: call void @llvm.memcpy{{.*}} @__const.test_arraytail_uninit.uninit +// PATTERN-O1: store i32 -1431655766, {{.*}} align 4 // ZERO-LABEL: @test_arraytail_uninit() -// ZERO: call void @llvm.memset{{.*}}, i8 0, +// ZERO-O0: call void @llvm.memset{{.*}}, i8 0, +// ZERO-O1: store i32 0, {{.*}} align 4 TEST_BRACES(arraytail, arraytail); // CHECK-LABEL: @test_arraytail_braces() @@ -724,16 +934,15 @@ TEST_UNINIT(int0, int[0]); // CHECK-NEXT: call void @{{.*}}used{{.*}}%uninit) // PATTERN-LABEL: @test_int0_uninit() // PATTERN: %uninit = alloca [0 x i32], align -// PATTERN-NEXT: call void @{{.*}}used{{.*}}%uninit) +// PATTERN-O0-NEXT: call void @{{.*}}used{{.*}}%uninit) // ZERO-LABEL: @test_int0_uninit() // ZERO: %uninit = alloca [0 x i32], align -// ZERO-NEXT: call void @{{.*}}used{{.*}}%uninit) +// ZERO-O0-NEXT: call void @{{.*}}used{{.*}}%uninit) TEST_BRACES(int0, int[0]); // CHECK-LABEL: @test_int0_braces() // CHECK: %braces = alloca [0 x i32], align [[ALIGN:[0-9]*]] // CHECK-NEXT: bitcast -// CHECK-NEXT: call void @llvm.memset{{.*}}(i8* align [[ALIGN]] %{{.*}}, i8 0, i64 0, i1 false) // CHECK-NEXT: call void @{{.*}}used{{.*}}%braces) TEST_UNINIT(int1, int[1]); @@ -741,9 +950,11 @@ TEST_UNINIT(int1, int[1]); // CHECK: %uninit = alloca [1 x i32], align [[ALIGN:[0-9]*]] // CHECK-NEXT: call void @{{.*}}used{{.*}}%uninit) // PATTERN-LABEL: @test_int1_uninit() -// PATTERN: call void @llvm.memcpy{{.*}} @__const.test_int1_uninit.uninit +// PATTERN-O0: call void @llvm.memcpy{{.*}} @__const.test_int1_uninit.uninit +// PATTERN-O1: store i32 -1431655766, {{.*}} align 4 // ZERO-LABEL: @test_int1_uninit() -// ZERO: call void @llvm.memset{{.*}}, i8 0, +// ZERO-O0: call void @llvm.memset{{.*}}, i8 0, +// ZERO-O1: store i32 0, {{.*}} align 4 TEST_BRACES(int1, int[1]); // CHECK-LABEL: @test_int1_braces() @@ -787,9 +998,11 @@ TEST_UNINIT(bool4, bool[4]); // CHECK: %uninit = alloca [4 x i8], align // CHECK-NEXT: call void @{{.*}}used{{.*}}%uninit) // PATTERN-LABEL: @test_bool4_uninit() -// PATTERN: call void @llvm.memcpy{{.*}} @__const.test_bool4_uninit.uninit +// PATTERN-O0: call void @llvm.memcpy{{.*}} @__const.test_bool4_uninit.uninit +// PATTERN-O1: store i32 -1431655766, i32* %uninit, align 4 // ZERO-LABEL: @test_bool4_uninit() -// ZERO: call void @llvm.memset{{.*}}, i8 0, +// ZERO-O0: call void @llvm.memset{{.*}}, i8 0, +// ZERO-O1: store i32 0, i32* %uninit, align 4 TEST_BRACES(bool4, bool[4]); // CHECK-LABEL: @test_bool4_braces() @@ -833,7 +1046,9 @@ TEST_UNINIT(tailpad4, tailpad[4]); // CHECK: %uninit = alloca [4 x %struct.tailpad], align // CHECK-NEXT: call void @{{.*}}used{{.*}}%uninit) // PATTERN-LABEL: @test_tailpad4_uninit() -// PATTERN: call void @llvm.memcpy{{.*}} @__const.test_tailpad4_uninit.uninit +// PATTERN-O0: call void @llvm.memcpy{{.*}} @__const.test_tailpad4_uninit.uninit +// PATTERN-O1: bitcast +// PATTERN-O1: call void @llvm.memset{{.*}}({{.*}}0, i8 -86, i64 16 // ZERO-LABEL: @test_tailpad4_uninit() // ZERO: call void @llvm.memset{{.*}}, i8 0, @@ -856,7 +1071,7 @@ TEST_UNINIT(tailpad9, tailpad[9]); // CHECK: %uninit = alloca [9 x %struct.tailpad], align // CHECK-NEXT: call void @{{.*}}used{{.*}}%uninit) // PATTERN-LABEL: @test_tailpad9_uninit() -// PATTERN: call void @llvm.memset{{.*}}, i8 -86, +// PATTERN-O0: call void @llvm.memset{{.*}}, i8 -86, // ZERO-LABEL: @test_tailpad9_uninit() // ZERO: call void @llvm.memset{{.*}}, i8 0, @@ -907,7 +1122,9 @@ TEST_UNINIT(atomicnotlockfree, _Atomic(notlockfree)); // CHECK: %uninit = alloca %struct.notlockfree, align // CHECK-NEXT: call void @{{.*}}used{{.*}}%uninit) // PATTERN-LABEL: @test_atomicnotlockfree_uninit() -// PATTERN: call void @llvm.memcpy{{.*}} @__const.test_atomicnotlockfree_uninit.uninit +// PATTERN-O0: call void @llvm.memcpy{{.*}} @__const.test_atomicnotlockfree_uninit.uninit +// PATTERN-O1: bitcast +// PATTERN-O1: call void @llvm.memset{{.*}}({{.*}}0, i8 -86, i64 32 // ZERO-LABEL: @test_atomicnotlockfree_uninit() // ZERO: call void @llvm.memset{{.*}}, i8 0, @@ -916,28 +1133,36 @@ TEST_UNINIT(atomicpadded, _Atomic(padded)); // CHECK: %uninit = alloca %struct.padded, align // CHECK-NEXT: call void @{{.*}}used{{.*}}%uninit) // PATTERN-LABEL: @test_atomicpadded_uninit() -// PATTERN: call void @llvm.memcpy{{.*}} @__const.test_atomicpadded_uninit.uninit +// PATTERN-O0: call void @llvm.memcpy{{.*}} @__const.test_atomicpadded_uninit.uninit +// PATTERN-O1: store i64 -6148914691236517206, i64* %uninit, align 8 // ZERO-LABEL: @test_atomicpadded_uninit() -// ZERO: call void @llvm.memset{{.*}}, i8 0, +// ZERO-O0: call void @llvm.memset{{.*}}, i8 0, +// ZERO-O1: store i64 0, i64* %uninit, align 8 TEST_UNINIT(atomictailpad, _Atomic(tailpad)); // CHECK-LABEL: @test_atomictailpad_uninit() // CHECK: %uninit = alloca %struct.tailpad, align // CHECK-NEXT: call void @{{.*}}used{{.*}}%uninit) // PATTERN-LABEL: @test_atomictailpad_uninit() -// PATTERN: call void @llvm.memcpy{{.*}} @__const.test_atomictailpad_uninit.uninit +// PATTERN-O0: call void @llvm.memcpy{{.*}} @__const.test_atomictailpad_uninit.uninit // ZERO-LABEL: @test_atomictailpad_uninit() -// ZERO: call void @llvm.memset{{.*}}, i8 0, - +// ZERO-O0: call void @llvm.memset{{.*}}, i8 0, +// ZERO-O1: store i32 0, i32* %uninit, align 4 TEST_UNINIT(complexfloat, _Complex float); // CHECK-LABEL: @test_complexfloat_uninit() // CHECK: %uninit = alloca { float, float }, align // CHECK-NEXT: call void @{{.*}}used{{.*}}%uninit) // PATTERN-LABEL: @test_complexfloat_uninit() -// PATTERN: call void @llvm.memcpy{{.*}} @__const.test_complexfloat_uninit.uninit +// PATTERN-O0: call void @llvm.memcpy{{.*}} @__const.test_complexfloat_uninit.uninit +// PATTERN-O1: %[[F1:[^ ]*]] = getelementptr inbounds {{.*}}%uninit, i64 0, i32 0 +// PATTERN-O1 store float 0xFFFFFFFFE0000000, float* %[[F1]], align +// PATTERN-O1: %[[F2:[^ ]*]] = getelementptr inbounds {{.*}}%uninit, i64 0, i32 1 +// PATTERN-O1: store float 0xFFFFFFFFE0000000, float* %[[F2]], align + // ZERO-LABEL: @test_complexfloat_uninit() -// ZERO: call void @llvm.memset{{.*}}, i8 0, +// ZERO-O0: call void @llvm.memset{{.*}}, i8 0, +// ZERO-O1: store i64 0, i64* %uninit, align 8 TEST_BRACES(complexfloat, _Complex float); // CHECK-LABEL: @test_complexfloat_braces() @@ -962,7 +1187,7 @@ TEST_UNINIT(complexdouble, _Complex double); // CHECK: %uninit = alloca { double, double }, align // CHECK-NEXT: call void @{{.*}}used{{.*}}%uninit) // PATTERN-LABEL: @test_complexdouble_uninit() -// PATTERN: call void @llvm.memcpy{{.*}} @__const.test_complexdouble_uninit.uninit +// PATTERN-O0: call void @llvm.memcpy{{.*}} @__const.test_complexdouble_uninit.uninit // ZERO-LABEL: @test_complexdouble_uninit() // ZERO: call void @llvm.memset{{.*}}, i8 0, @@ -1005,9 +1230,10 @@ TEST_UNINIT(semivolatile, semivolatile); // CHECK: %uninit = alloca %struct.semivolatile, align // CHECK-NEXT: call void @{{.*}}used{{.*}}%uninit) // PATTERN-LABEL: @test_semivolatile_uninit() -// PATTERN: call void @llvm.memcpy{{.*}} @__const.test_semivolatile_uninit.uninit +// PATTERN-O0: call void @llvm.memcpy{{.*}} @__const.test_semivolatile_uninit.uninit // ZERO-LABEL: @test_semivolatile_uninit() -// ZERO: call void @llvm.memset{{.*}}, i8 0, +// ZERO-O0: call void @llvm.memset{{.*}}, i8 0, +// ZERO-O1: store i64 0, i64* %uninit, align 8 TEST_BRACES(semivolatile, semivolatile); // CHECK-LABEL: @test_semivolatile_braces() @@ -1019,9 +1245,10 @@ TEST_BRACES(semivolatile, semivolatile); TEST_CUSTOM(semivolatile, semivolatile, { 0x44444444, 0x44444444 }); // CHECK-LABEL: @test_semivolatile_custom() // CHECK: %custom = alloca %struct.semivolatile, align -// CHECK-NEXT: bitcast -// CHECK-NEXT: call void @llvm.memcpy -// CHECK-NEXT: call void @{{.*}}used{{.*}}%custom) +// CHECK-O0: bitcast +// CHECK-O0: call void @llvm.memcpy +// CHECK-O0: call void @{{.*}}used{{.*}}%custom) +// CHECK-O1: store i64 4919131752989213764, i64* %custom, align 8 TEST_UNINIT(semivolatileinit, semivolatileinit); // CHECK-LABEL: @test_semivolatileinit_uninit() @@ -1054,9 +1281,10 @@ TEST_UNINIT(base, base); // CHECK-NEXT: call void @{{.*}}base{{.*}}%uninit) // CHECK-NEXT: call void @{{.*}}used{{.*}}%uninit) // PATTERN-LABEL: @test_base_uninit() -// PATTERN: call void @llvm.memcpy{{.*}} @__const.test_base_uninit.uninit +// PATTERN-O0: call void @llvm.memcpy{{.*}} @__const.test_base_uninit.uninit // ZERO-LABEL: @test_base_uninit() -// ZERO: call void @llvm.memset{{.*}}, i8 0, +// ZERO-O0: call void @llvm.memset{{.*}}, i8 0, +// ZERO-O1: store i64 0, {{.*}} align 8 TEST_BRACES(base, base); // CHECK-LABEL: @test_base_braces() @@ -1072,9 +1300,10 @@ TEST_UNINIT(derived, derived); // CHECK-NEXT: call void @{{.*}}derived{{.*}}%uninit) // CHECK-NEXT: call void @{{.*}}used{{.*}}%uninit) // PATTERN-LABEL: @test_derived_uninit() -// PATTERN: call void @llvm.memcpy{{.*}} @__const.test_derived_uninit.uninit +// PATTERN-O0: call void @llvm.memcpy{{.*}} @__const.test_derived_uninit.uninit // ZERO-LABEL: @test_derived_uninit() -// ZERO: call void @llvm.memset{{.*}}, i8 0, +// ZERO-O0: call void @llvm.memset{{.*}}, i8 0, +// ZERO-O1: store i64 0, {{.*}} align 8 TEST_BRACES(derived, derived); // CHECK-LABEL: @test_derived_braces() @@ -1090,7 +1319,7 @@ TEST_UNINIT(virtualderived, virtualderived); // CHECK-NEXT: call void @{{.*}}virtualderived{{.*}}%uninit) // CHECK-NEXT: call void @{{.*}}used{{.*}}%uninit) // PATTERN-LABEL: @test_virtualderived_uninit() -// PATTERN: call void @llvm.memcpy{{.*}} @__const.test_virtualderived_uninit.uninit +// PATTERN-O0: call void @llvm.memcpy{{.*}} @__const.test_virtualderived_uninit.uninit // ZERO-LABEL: @test_virtualderived_uninit() // ZERO: call void @llvm.memset{{.*}}, i8 0, @@ -1108,9 +1337,10 @@ TEST_UNINIT(matching, matching); // CHECK: %uninit = alloca %union.matching, align // CHECK-NEXT: call void @{{.*}}used{{.*}}%uninit) // PATTERN-LABEL: @test_matching_uninit() -// PATTERN: call void @llvm.memcpy{{.*}} @__const.test_matching_uninit.uninit +// PATTERN-O0: call void @llvm.memcpy{{.*}} @__const.test_matching_uninit.uninit // ZERO-LABEL: @test_matching_uninit() -// ZERO: call void @llvm.memset{{.*}}, i8 0, +// ZERO-O0: call void @llvm.memset{{.*}}, i8 0, +// ZERO-O1: store i32 0, {{.*}} align 4 TEST_BRACES(matching, matching); // CHECK-LABEL: @test_matching_braces() @@ -1122,18 +1352,22 @@ TEST_BRACES(matching, matching); TEST_CUSTOM(matching, matching, { .f = 0xf00f }); // CHECK-LABEL: @test_matching_custom() // CHECK: %custom = alloca %union.matching, align -// CHECK-NEXT: bitcast -// CHECK-NEXT: call void @llvm.memcpy -// CHECK-NEXT: call void @{{.*}}used{{.*}}%custom) +// CHECK-O0: bitcast +// CHECK-O0: call void @llvm.memcpy +// CHECK-O0: call void @{{.*}}used{{.*}}%custom) +// CHECK-O1: getelementptr +// CHECK-O1: store i32 1198526208, i32* {{.*}}, align 4 TEST_UNINIT(matchingreverse, matchingreverse); // CHECK-LABEL: @test_matchingreverse_uninit() // CHECK: %uninit = alloca %union.matchingreverse, align // CHECK-NEXT: call void @{{.*}}used{{.*}}%uninit) // PATTERN-LABEL: @test_matchingreverse_uninit() -// PATTERN: call void @llvm.memcpy{{.*}} @__const.test_matchingreverse_uninit.uninit +// PATTERN-O0: call void @llvm.memcpy{{.*}} @__const.test_matchingreverse_uninit.uninit +// PATTERN-O1: store float 0xFFFFFFFFE0000000 // ZERO-LABEL: @test_matchingreverse_uninit() -// ZERO: call void @llvm.memset{{.*}}, i8 0, +// ZERO-O0: call void @llvm.memset{{.*}}, i8 0, +// ZERO-O1: store i32 0, {{.*}} align 4 TEST_BRACES(matchingreverse, matchingreverse); // CHECK-LABEL: @test_matchingreverse_braces() @@ -1145,18 +1379,20 @@ TEST_BRACES(matchingreverse, matchingreverse); TEST_CUSTOM(matchingreverse, matchingreverse, { .i = 0xf00f }); // CHECK-LABEL: @test_matchingreverse_custom() // CHECK: %custom = alloca %union.matchingreverse, align -// CHECK-NEXT: bitcast -// CHECK-NEXT: call void @llvm.memcpy -// CHECK-NEXT: call void @{{.*}}used{{.*}}%custom) +// CHECK-O0: bitcast +// CHECK-O0: call void @llvm.memcpy +// CHECK-O0: call void @{{.*}}used{{.*}}%custom) +// CHECK-O1: store i32 61455, i32* %1, align 4 TEST_UNINIT(unmatched, unmatched); // CHECK-LABEL: @test_unmatched_uninit() // CHECK: %uninit = alloca %union.unmatched, align // CHECK-NEXT: call void @{{.*}}used{{.*}}%uninit) // PATTERN-LABEL: @test_unmatched_uninit() -// PATTERN: call void @llvm.memcpy{{.*}} @__const.test_unmatched_uninit.uninit +// PATTERN-O0: call void @llvm.memcpy{{.*}} @__const.test_unmatched_uninit.uninit // ZERO-LABEL: @test_unmatched_uninit() -// ZERO: call void @llvm.memset{{.*}}, i8 0, +// ZERO-O0: call void @llvm.memset{{.*}}, i8 0, +// ZERO-O1: store i32 0, {{.*}} align 4 TEST_BRACES(unmatched, unmatched); // CHECK-LABEL: @test_unmatched_braces() @@ -1168,18 +1404,20 @@ TEST_BRACES(unmatched, unmatched); TEST_CUSTOM(unmatched, unmatched, { .i = 0x3badbeef }); // CHECK-LABEL: @test_unmatched_custom() // CHECK: %custom = alloca %union.unmatched, align -// CHECK-NEXT: bitcast -// CHECK-NEXT: call void @llvm.memcpy -// CHECK-NEXT: call void @{{.*}}used{{.*}}%custom) +// CHECK-O0: bitcast +// CHECK-O0: call void @llvm.memcpy +// CHECK-O0: call void @{{.*}}used{{.*}}%custom) +// CHECK-O1: store i32 1001242351, i32* {{.*}}, align 4 TEST_UNINIT(unmatchedreverse, unmatchedreverse); // CHECK-LABEL: @test_unmatchedreverse_uninit() // CHECK: %uninit = alloca %union.unmatchedreverse, align // CHECK-NEXT: call void @{{.*}}used{{.*}}%uninit) // PATTERN-LABEL: @test_unmatchedreverse_uninit() -// PATTERN: call void @llvm.memcpy{{.*}} @__const.test_unmatchedreverse_uninit.uninit +// PATTERN-O0: call void @llvm.memcpy{{.*}} @__const.test_unmatchedreverse_uninit.uninit // ZERO-LABEL: @test_unmatchedreverse_uninit() -// ZERO: call void @llvm.memset{{.*}}, i8 0, +// ZERO-O0: call void @llvm.memset{{.*}}, i8 0, +// ZERO-O1: store i32 0, {{.*}} align 4 TEST_BRACES(unmatchedreverse, unmatchedreverse); // CHECK-LABEL: @test_unmatchedreverse_braces() @@ -1191,18 +1429,21 @@ TEST_BRACES(unmatchedreverse, unmatchedreverse); TEST_CUSTOM(unmatchedreverse, unmatchedreverse, { .c = 42 }); // CHECK-LABEL: @test_unmatchedreverse_custom() // CHECK: %custom = alloca %union.unmatchedreverse, align -// CHECK-NEXT: bitcast -// CHECK-NEXT: call void @llvm.memcpy -// CHECK-NEXT: call void @{{.*}}used{{.*}}%custom) +// CHECK-O0: bitcast +// CHECK-O0: call void @llvm.memcpy +// CHECK-O0: call void @{{.*}}used{{.*}}%custom) +// PATTERN-O1: store i32 -1431655894, i32* {{.*}}, align 4 +// ZERO-O1: store i32 42, i32* {{.*}}, align 4 TEST_UNINIT(unmatchedfp, unmatchedfp); // CHECK-LABEL: @test_unmatchedfp_uninit() // CHECK: %uninit = alloca %union.unmatchedfp, align // CHECK-NEXT: call void @{{.*}}used{{.*}}%uninit) // PATTERN-LABEL: @test_unmatchedfp_uninit() -// PATTERN: call void @llvm.memcpy{{.*}} @__const.test_unmatchedfp_uninit.uninit +// PATTERN-O0: call void @llvm.memcpy{{.*}} @__const.test_unmatchedfp_uninit.uninit // ZERO-LABEL: @test_unmatchedfp_uninit() -// ZERO: call void @llvm.memset{{.*}}, i8 0, +// ZERO-O0: call void @llvm.memset{{.*}}, i8 0, +// ZERO-O1: store i64 0, {{.*}} align 8 TEST_BRACES(unmatchedfp, unmatchedfp); // CHECK-LABEL: @test_unmatchedfp_braces() @@ -1214,19 +1455,19 @@ TEST_BRACES(unmatchedfp, unmatchedfp); TEST_CUSTOM(unmatchedfp, unmatchedfp, { .d = 3.1415926535897932384626433 }); // CHECK-LABEL: @test_unmatchedfp_custom() // CHECK: %custom = alloca %union.unmatchedfp, align -// CHECK-NEXT: bitcast -// CHECK-NEXT: call void @llvm.memcpy -// CHECK-NEXT: call void @{{.*}}used{{.*}}%custom) - +// CHECK-O0: bitcast +// CHECK-O0: call void @llvm.memcpy +// CHECK-O0: call void @{{.*}}used{{.*}}%custom) +// CHECK-O1: store i64 4614256656552045848, i64* %1, align 8 TEST_UNINIT(emptyenum, emptyenum); // CHECK-LABEL: @test_emptyenum_uninit() // CHECK: %uninit = alloca i32, align // CHECK-NEXT: call void @{{.*}}used{{.*}}%uninit) // PATTERN-LABEL: @test_emptyenum_uninit() -// PATTERN: store i32 -1431655766, i32* %braces, align 4 +// PATTERN: store i32 -1431655766, i32* %uninit, align 4 // ZERO-LABEL: @test_emptyenum_uninit() -// ZERO: store i32 0, i32* %braces, align 4 +// ZERO: store i32 0, i32* %uninit, align 4 TEST_BRACES(emptyenum, emptyenum); // CHECK-LABEL: @test_emptyenum_braces() @@ -1245,9 +1486,9 @@ TEST_UNINIT(smallenum, smallenum); // CHECK: %uninit = alloca i32, align // CHECK-NEXT: call void @{{.*}}used{{.*}}%uninit) // PATTERN-LABEL: @test_smallenum_uninit() -// PATTERN: store i32 -1431655766, i32* %braces, align 4 +// PATTERN: store i32 -1431655766, i32* %uninit, align 4 // ZERO-LABEL: @test_smallenum_uninit() -// ZERO: store i32 0, i32* %braces, align 4 +// ZERO: store i32 0, i32* %uninit, align 4 TEST_BRACES(smallenum, smallenum); // CHECK-LABEL: @test_smallenum_braces() diff --git a/clang/test/CodeGenCXX/builtin-calling-conv.cpp b/clang/test/CodeGenCXX/builtin-calling-conv.cpp new file mode 100644 index 0000000000000..6fdeca0d2c473 --- /dev/null +++ b/clang/test/CodeGenCXX/builtin-calling-conv.cpp @@ -0,0 +1,42 @@ +// RUN: %clang_cc1 -triple x86_64-linux-pc -DREDECL -emit-llvm %s -o - | FileCheck %s -check-prefix LINUX +// RUN: %clang_cc1 -triple spir-unknown-unknown -DREDECL -DSPIR -emit-llvm %s -o - | FileCheck %s -check-prefix SPIR +// RUN: %clang_cc1 -triple x86_64-linux-pc -emit-llvm %s -o - | FileCheck %s -check-prefix LINUX +// RUN: %clang_cc1 -triple spir-unknown-unknown -DSPIR -emit-llvm %s -o - | FileCheck %s -check-prefix SPIR + +#ifdef REDECL +namespace std { +#ifdef SPIR +using size_t = unsigned int; +#else +using size_t = unsigned long; +#endif // SPIR +} // namespace std + +float __builtin_atan2f(float, float); +void *operator new(std::size_t); +#endif // REDECL + +void foo(); + +void user() { + int i; + ::operator new(5); + (void)__builtin_atan2f(1.1, 2.2); + foo(); +} + +// LINUX: define void @_Z4userv() +// LINUX: call i8* @_Znwm +// LINUX: call float @atan2f +// LINUX: call void @_Z3foov +// LINUX: declare noalias i8* @_Znwm(i64) +// LINUX: declare float @atan2f(float, float) +// LINUX: declare void @_Z3foov() + +// SPIR: define spir_func void @_Z4userv() +// SPIR: call spir_func i8* @_Znwj +// SPIR: call spir_func float @atan2f +// SPIR: call spir_func void @_Z3foov +// SPIR: declare spir_func noalias i8* @_Znwj(i32) +// SPIR: declare spir_func float @atan2f(float, float) +// SPIR: declare spir_func void @_Z3foov() diff --git a/clang/test/CodeGenCXX/builtins.cpp b/clang/test/CodeGenCXX/builtins.cpp index 33c714e9e1861..242cba7bc14aa 100644 --- a/clang/test/CodeGenCXX/builtins.cpp +++ b/clang/test/CodeGenCXX/builtins.cpp @@ -29,7 +29,7 @@ long y = __builtin_abs(-2l); extern const char char_memchr_arg[32]; char *memchr_result = __builtin_char_memchr(char_memchr_arg, 123, 32); -// CHECK: call i8* @memchr(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @char_memchr_arg, i32 0, i32 0), i32 123, i64 32) +// CHECK: call i8* @memchr(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @char_memchr_arg, i64 0, i64 0), i32 123, i64 32) int constexpr_overflow_result() { constexpr int x = 1; diff --git a/clang/test/CodeGenCXX/char8_t.cpp b/clang/test/CodeGenCXX/char8_t.cpp index f24f12d6df404..1016d6346ba27 100644 --- a/clang/test/CodeGenCXX/char8_t.cpp +++ b/clang/test/CodeGenCXX/char8_t.cpp @@ -1,9 +1,11 @@ -// RUN: %clang_cc1 -std=c++17 -emit-llvm -fchar8_t -triple x86_64-linux %s -o - | FileCheck %s -// RUN: %clang_cc1 -std=c++17 -emit-llvm -fchar8_t -triple x86_64-windows %s -o - -verify +// RUN: %clang_cc1 -std=c++17 -emit-llvm -fchar8_t -triple x86_64-linux %s -o - | FileCheck %s --check-prefix=ITANIUM +// RUN: %clang_cc1 -std=c++17 -emit-llvm -fchar8_t -triple x86_64-windows %s -o - | FileCheck %s --check-prefix=MSABI -// CHECK: define void @_Z1fDu( -void f(char8_t c) {} // expected-error {{cannot mangle this built-in char8_t type yet}} +// ITANIUM: define void @_Z1fDu( +// MSABI: define {{.*}}void @"?f@@YAX_Q@Z"( +void f(char8_t c) {} -// CHECK: define weak_odr void @_Z1gIiEvDTplplcvT__ELA4_KDuELDu114EE +// ITANIUM: define weak_odr void @_Z1gIiEvDTplplcvT__ELA4_KDuELDu114EE( +// MSABI: define weak_odr {{.*}}void @"??$g@H@@YAXPEB_Q@Z"( template void g(decltype(T() + u8"foo" + u8'r')) {} template void g(const char8_t*); diff --git a/clang/test/CodeGenCXX/const-init-cxx11.cpp b/clang/test/CodeGenCXX/const-init-cxx11.cpp index 9fb4ba5fe1787..087348609334f 100644 --- a/clang/test/CodeGenCXX/const-init-cxx11.cpp +++ b/clang/test/CodeGenCXX/const-init-cxx11.cpp @@ -554,7 +554,7 @@ namespace InitFromConst { // CHECK: call void @_ZN13InitFromConst7consumeIMNS_1SEiEEvT_(i64 0) consume(mp); - // CHECK: call void @_ZN13InitFromConst7consumeIPKiEEvT_(i32* getelementptr inbounds ([3 x i32], [3 x i32]* @_ZN13InitFromConstL1aE, i32 0, i32 0)) + // CHECK: call void @_ZN13InitFromConst7consumeIPKiEEvT_(i32* getelementptr inbounds ([3 x i32], [3 x i32]* @_ZN13InitFromConstL1aE, i64 0, i64 0)) consume(a); } } diff --git a/clang/test/CodeGenCXX/constructor-direct-call.cpp b/clang/test/CodeGenCXX/constructor-direct-call.cpp index bcddc0fa7a496..0ed9cd9027bc9 100644 --- a/clang/test/CodeGenCXX/constructor-direct-call.cpp +++ b/clang/test/CodeGenCXX/constructor-direct-call.cpp @@ -1,4 +1,5 @@ -// RUN: %clang_cc1 -triple i686-pc-mingw32 -fms-extensions -Wmicrosoft %s -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 -triple i686-pc-mingw32 -fms-extensions -Wmicrosoft %s -emit-llvm -o - | FileCheck %s --check-prefix=CHECK32 --check-prefix=CHECK +// RUN: %clang_cc1 -triple x86_64-pc-windows-msvc19.11.0 -fms-extensions -Wmicrosoft %s -emit-llvm -o - | FileCheck %s --check-prefix=CHECK64 --check-prefix=CHECK class Test1 { public: @@ -9,7 +10,8 @@ void f1() { Test1 var; var.Test1::Test1(); - // CHECK: call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %{{.*}}, i8* align 4 %{{.*}}, i32 4, i1 false) + // CHECK32: call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %{{.*}}, i8* align 4 %{{.*}}, i32 4, i1 false) + // CHECK64: call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 4 %{{.*}}, i8* align 4 %{{.*}}, i64 4, i1 false) var.Test1::Test1(var); } @@ -22,13 +24,16 @@ class Test2 { void f2() { // CHECK: %var = alloca %class.Test2, align 4 - // CHECK-NEXT: call x86_thiscallcc void @_ZN5Test2C1Ev(%class.Test2* %var) + // CHECK32-NEXT: call x86_thiscallcc void @_ZN5Test2C1Ev(%class.Test2* %var) + // CHECK64-NEXT: %call = call %class.Test2* @"??0Test2@@QEAA@XZ"(%class.Test2* %var) Test2 var; - // CHECK-NEXT: call x86_thiscallcc void @_ZN5Test2C1Ev(%class.Test2* %var) + // CHECK32-NEXT: call x86_thiscallcc void @_ZN5Test2C1Ev(%class.Test2* %var) + // CHECK64-NEXT: %call1 = call %class.Test2* @"??0Test2@@QEAA@XZ"(%class.Test2* %var) var.Test2::Test2(); - // CHECK: call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %{{.*}}, i8* align 4 %{{.*}}, i32 8, i1 false) + // CHECK32: call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %{{.*}}, i8* align 4 %{{.*}}, i32 8, i1 false) + // CHECK64: call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 4 %{{.*}}, i8* align 4 %{{.*}}, i64 8, i1 false) var.Test2::Test2(var); } @@ -45,15 +50,19 @@ class Test3 { }; void f3() { - // CHECK: call x86_thiscallcc void @_ZN5Test3C1Ev(%class.Test3* %var) + // CHECK32: call x86_thiscallcc void @_ZN5Test3C1Ev(%class.Test3* %var) + // CHECK64: %call = call %class.Test3* @"??0Test3@@QEAA@XZ"(%class.Test3* %var) Test3 var; - // CHECK-NEXT: call x86_thiscallcc void @_ZN5Test3C1Ev(%class.Test3* %var2) + // CHECK32-NEXT: call x86_thiscallcc void @_ZN5Test3C1Ev(%class.Test3* %var2) + // CHECK64-NEXT: %call1 = call %class.Test3* @"??0Test3@@QEAA@XZ"(%class.Test3* %var2) Test3 var2; - // CHECK-NEXT: call x86_thiscallcc void @_ZN5Test3C1Ev(%class.Test3* %var) + // CHECK32-NEXT: call x86_thiscallcc void @_ZN5Test3C1Ev(%class.Test3* %var) + // CHECK64-NEXT: %call2 = call %class.Test3* @"??0Test3@@QEAA@XZ"(%class.Test3* %var) var.Test3::Test3(); - // CHECK-NEXT: call x86_thiscallcc void @_ZN5Test3C1ERKS_(%class.Test3* %var, %class.Test3* dereferenceable({{[0-9]+}}) %var2) + // CHECK32-NEXT: call x86_thiscallcc void @_ZN5Test3C1ERKS_(%class.Test3* %var, %class.Test3* dereferenceable({{[0-9]+}}) %var2) + // CHECK64-NEXT: %call3 = call %class.Test3* @"??0Test3@@QEAA@AEBV0@@Z"(%class.Test3* %var, %class.Test3* dereferenceable({{[0-9]+}}) %var2) var.Test3::Test3(var2); } diff --git a/clang/test/CodeGenCXX/cxx11-special-members.cpp b/clang/test/CodeGenCXX/cxx11-special-members.cpp index 96109ba5bac12..b1cadaf3d43c4 100644 --- a/clang/test/CodeGenCXX/cxx11-special-members.cpp +++ b/clang/test/CodeGenCXX/cxx11-special-members.cpp @@ -40,7 +40,7 @@ void f3() { D b; } // Trivial default ctor, might or might not be defined, but we must not expect -// someone else ot define it. +// someone else to define it. // CHECK-NOT: declare {{.*}} @_ZN1CILi0EEC1Ev // CHECK: define {{.*}} @_ZN1DC1Ev diff --git a/clang/test/CodeGenCXX/cxx11-user-defined-literal.cpp b/clang/test/CodeGenCXX/cxx11-user-defined-literal.cpp index 05c04b1b41625..c1eab634b1205 100644 --- a/clang/test/CodeGenCXX/cxx11-user-defined-literal.cpp +++ b/clang/test/CodeGenCXX/cxx11-user-defined-literal.cpp @@ -16,8 +16,8 @@ template S operator"" _t() { return S(); } // CHECK: @[[s_0xffffeeee:.*]] = {{.*}} constant [11 x i8] c"0xffffeeee\00" void f() { - // CHECK: call void @_Zli2_xPKcm({{.*}}, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @[[s_foo]], i32 0, i32 0), i64 3) - // CHECK: call void @_Zli2_xPKcm({{.*}}, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @[[s_bar]], i32 0, i32 0), i64 3) + // CHECK: call void @_Zli2_xPKcm({{.*}}, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @[[s_foo]], i64 0, i64 0), i64 3) + // CHECK: call void @_Zli2_xPKcm({{.*}}, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @[[s_bar]], i64 0, i64 0), i64 3) // CHECK: call void @_Zli2_yw({{.*}} 97) // CHECK: call void @_Zli2_zy({{.*}} 42) // CHECK: call void @_Zli2_fe({{.*}} x86_fp80 0xK3FFF8000000000000000) @@ -28,9 +28,9 @@ void f() { // CHECK: call void @_ZN1SD1Ev({{.*}}) "foo"_x, "bar"_x, L'a'_y, 42_z, 1.0_f; - // CHECK: call void @_Zli2_rPKc({{.*}}, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @[[s_123]], i32 0, i32 0)) - // CHECK: call void @_Zli2_rPKc({{.*}}, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @[[s_4_9]], i32 0, i32 0)) - // CHECK: call void @_Zli2_rPKc({{.*}}, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @[[s_0xffffeeee]], i32 0, i32 0)) + // CHECK: call void @_Zli2_rPKc({{.*}}, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @[[s_123]], i64 0, i64 0)) + // CHECK: call void @_Zli2_rPKc({{.*}}, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @[[s_4_9]], i64 0, i64 0)) + // CHECK: call void @_Zli2_rPKc({{.*}}, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @[[s_0xffffeeee]], i64 0, i64 0)) // CHECK: call void @_ZN1SD1Ev({{.*}}) // CHECK: call void @_ZN1SD1Ev({{.*}}) // CHECK: call void @_ZN1SD1Ev({{.*}}) @@ -59,11 +59,11 @@ void h() { // CHECK: call void @_Z1iIiEDTclclL_Zli2_xPKcmELA4_S0_ELi3EEfp_EET_(i32 42) // CHECK: define {{.*}} @_Z1gIiEDTclclL_Zli2_xPKcmELA4_S0_ELm3EEfp_EET_(i32 -// CHECK: call void @_Zli2_xPKcm({{.*}}, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @{{.*}}, i32 0, i32 0), i64 3) +// CHECK: call void @_Zli2_xPKcm({{.*}}, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @{{.*}}, i64 0, i64 0), i64 3) // CHECK: call void @_ZN1SclEi // CHECK: call void @_ZN1SD1Ev // CHECK: define {{.*}} @_Z1iIiEDTclclL_Zli2_xPKcmELA4_S0_ELi3EEfp_EET_(i32 -// CHECK: call void @_Zli2_xPKcm({{.*}}, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @{{.*}}, i32 0, i32 0), i64 3) +// CHECK: call void @_Zli2_xPKcm({{.*}}, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @{{.*}}, i64 0, i64 0), i64 3) // CHECK: call void @_ZN1SclEi // CHECK: call void @_ZN1SD1Ev diff --git a/clang/test/CodeGenCXX/cxx1z-init-statement.cpp b/clang/test/CodeGenCXX/cxx1z-init-statement.cpp index 5c05212c72470..522ae56d504ff 100644 --- a/clang/test/CodeGenCXX/cxx1z-init-statement.cpp +++ b/clang/test/CodeGenCXX/cxx1z-init-statement.cpp @@ -5,7 +5,7 @@ void f() { // CHECK: %[[A:.*]] = alloca i32, align 4 // CHECK-NEXT: store i32 5, i32* %[[A]], align 4 // CHECK-NEXT: %[[B:.*]] = load i32, i32* %[[A]], align 4 - // CHECK-NEXT %[[C:.*]] = icmp slt i32 %[[B]], 8 + // CHECK-NEXT: %[[C:.*]] = icmp slt i32 %[[B]], 8 if (int a = 5; a < 8) ; } diff --git a/clang/test/CodeGenCXX/cxx2a-compare.cpp b/clang/test/CodeGenCXX/cxx2a-compare.cpp index ef6bb5556e225..31ae85bcdd28b 100644 --- a/clang/test/CodeGenCXX/cxx2a-compare.cpp +++ b/clang/test/CodeGenCXX/cxx2a-compare.cpp @@ -80,7 +80,7 @@ auto mem_ptr_test(MemPtrT x, MemPtrT y) { // CHECK: %cmp.ptr.null = icmp eq [[TY]] %lhs.memptr.ptr, 0 // CHECK: %cmp.adj = icmp eq [[TY]] %lhs.memptr.adj, %rhs.memptr.adj // CHECK: %[[OR:.*]] = or i1 - // CHECK-SAME %cmp.adj + // CHECK-SAME: %cmp.adj // CHECK: %memptr.eq = and i1 %cmp.ptr, %[[OR]] // CHECK: %sel.eq = select i1 %memptr.eq, i8 [[EQ]], i8 [[NE]] // CHECK: %__value_ = getelementptr inbounds %[[SE]], %[[SE]]* %[[DEST]] diff --git a/clang/test/CodeGenCXX/debug-info-inheriting-constructor.cpp b/clang/test/CodeGenCXX/debug-info-inheriting-constructor.cpp index 8e47a0da6dfff..3a2605078220c 100644 --- a/clang/test/CodeGenCXX/debug-info-inheriting-constructor.cpp +++ b/clang/test/CodeGenCXX/debug-info-inheriting-constructor.cpp @@ -9,9 +9,9 @@ struct B : A { A::A(int i, ...) {} // CHECK: define void @{{.*}}foo -// CHECK-NOT ret void +// CHECK-NOT: ret void // CHECK: call void @llvm.dbg.declare -// CHECK-NOT ret void +// CHECK-NOT: ret void // CHECK: call void @llvm.dbg.declare(metadata %{{.*}}** %{{[^,]+}}, // CHECK-SAME: metadata ![[THIS:[0-9]+]], metadata !DIExpression()), !dbg ![[LOC:[0-9]+]] // CHECK: ret void, !dbg ![[NOINL:[0-9]+]] diff --git a/clang/test/CodeGenCXX/dllexport-no-dllexport-inlines.cpp b/clang/test/CodeGenCXX/dllexport-no-dllexport-inlines.cpp index 3866731a3cd9a..02cab5e2b4e05 100644 --- a/clang/test/CodeGenCXX/dllexport-no-dllexport-inlines.cpp +++ b/clang/test/CodeGenCXX/dllexport-no-dllexport-inlines.cpp @@ -1,10 +1,10 @@ // RUN: %clang_cc1 %s -fms-extensions -triple x86_64-windows-msvc \ -// RUN: -disable-llvm-passes \ +// RUN: -disable-llvm-passes -std=c++14 \ // RUN: -fno-dllexport-inlines -emit-llvm -O1 -o - | \ // RUN: FileCheck --check-prefix=CHECK --check-prefix=NOEXPORTINLINE %s // RUN: %clang_cc1 %s -fms-extensions -triple x86_64-windows-msvc \ -// RUN: -disable-llvm-passes \ +// RUN: -disable-llvm-passes -std=c++14 \ // RUN: -emit-llvm -O1 -o - | \ // RUN: FileCheck --check-prefix=CHECK --check-prefix=EXPORTINLINE %s diff --git a/clang/test/CodeGenCXX/for-range.cpp b/clang/test/CodeGenCXX/for-range.cpp index 8124129713f09..41043804474bc 100644 --- a/clang/test/CodeGenCXX/for-range.cpp +++ b/clang/test/CodeGenCXX/for-range.cpp @@ -39,7 +39,7 @@ void for_array() { for (B b : array) { // CHECK-NOT: 5begin // CHECK-NOT: 3end - // CHECK: getelementptr {{.*}}, i32 0 + // CHECK: getelementptr {{.*}}, i64 0 // CHECK: getelementptr {{.*}}, i64 5 // CHECK: br label %[[COND:.*]] diff --git a/clang/test/CodeGenCXX/new-overflow.cpp b/clang/test/CodeGenCXX/new-overflow.cpp index b27984f66ab66..a2269bfc59fff 100644 --- a/clang/test/CodeGenCXX/new-overflow.cpp +++ b/clang/test/CodeGenCXX/new-overflow.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -triple i386-unknown-unknown %s -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 -std=c++14 -triple i386-unknown-unknown %s -emit-llvm -o - | FileCheck %s // rdar://problem/9246208 diff --git a/clang/test/CodeGenCXX/new.cpp b/clang/test/CodeGenCXX/new.cpp index 3bebc2ab8ac89..1f5288d1d10ee 100644 --- a/clang/test/CodeGenCXX/new.cpp +++ b/clang/test/CodeGenCXX/new.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -triple x86_64-unknown-unknown %s -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 -std=c++14 -triple x86_64-unknown-unknown %s -emit-llvm -o - | FileCheck %s typedef __typeof__(sizeof(0)) size_t; diff --git a/clang/test/CodeGenCXX/pragma-loop-safety.cpp b/clang/test/CodeGenCXX/pragma-loop-safety.cpp index c0b10b0a6bd11..6957cb47278b2 100644 --- a/clang/test/CodeGenCXX/pragma-loop-safety.cpp +++ b/clang/test/CodeGenCXX/pragma-loop-safety.cpp @@ -49,7 +49,7 @@ void interleave_test(int *List, int Length) { // CHECK: ![[ACCESS_GROUP_2]] = distinct !{} // CHECK: ![[LOOP1_HINTS]] = distinct !{![[LOOP1_HINTS]], ![[INTERLEAVE_1:[0-9]+]], ![[INTENABLE_1:[0-9]+]], ![[UNROLL_DISABLE:[0-9]+]], ![[PARALLEL_ACCESSES_7:[0-9]+]]} // CHECK: ![[INTERLEAVE_1]] = !{!"llvm.loop.interleave.count", i32 1} -// CHCCK: ![[INTENABLE_1]] = !{!"llvm.loop.vectorize.enable", i1 true} +// CHECK: ![[INTENABLE_1]] = !{!"llvm.loop.vectorize.enable", i1 true} // CHECK: ![[UNROLL_DISABLE]] = !{!"llvm.loop.unroll.disable"} // CHECK: ![[PARALLEL_ACCESSES_7]] = !{!"llvm.loop.parallel_accesses", ![[ACCESS_GROUP_2]]} // CHECK: ![[ACCESS_GROUP_8]] = distinct !{} diff --git a/clang/test/CodeGenCXX/stmtexpr.cpp b/clang/test/CodeGenCXX/stmtexpr.cpp index 4586a3c38fffb..fe5ff2c7dee8b 100644 --- a/clang/test/CodeGenCXX/stmtexpr.cpp +++ b/clang/test/CodeGenCXX/stmtexpr.cpp @@ -190,3 +190,79 @@ extern "C" int cleanup_exit_complex(bool b) { // CHECK: %[[v2:[^ ]*]] = load float, float* %[[tmp2]] // CHECK: store float %[[v1]], float* %v.realp // CHECK: store float %[[v2]], float* %v.imagp + +extern "C" void then(int); + +// CHECK-LABEL: @{{.*}}volatile_load +void volatile_load() { + volatile int n; + + // CHECK-NOT: load volatile + // CHECK: load volatile + // CHECK-NOT: load volatile + ({n;}); + + // CHECK-LABEL: @then(i32 1) + then(1); + + // CHECK-NOT: load volatile + // CHECK: load volatile + // CHECK-NOT: load volatile + ({goto lab; lab: n;}); + + // CHECK-LABEL: @then(i32 2) + then(2); + + // CHECK-NOT: load volatile + // CHECK: load volatile + // CHECK-NOT: load volatile + ({[[gsl::suppress("foo")]] n;}); + + // CHECK-LABEL: @then(i32 3) + then(3); + + // CHECK-NOT: load volatile + // CHECK: load volatile + // CHECK-NOT: load volatile + ({if (true) n;}); + + // CHECK: } +} + +// CHECK-LABEL: @{{.*}}volatile_load_template +template +void volatile_load_template() { + volatile T n; + + // CHECK-NOT: load volatile + // CHECK: load volatile + // CHECK-NOT: load volatile + ({n;}); + + // CHECK-LABEL: @then(i32 1) + then(1); + + // CHECK-NOT: load volatile + // CHECK: load volatile + // CHECK-NOT: load volatile + ({goto lab; lab: n;}); + + // CHECK-LABEL: @then(i32 2) + then(2); + + // CHECK-NOT: load volatile + // CHECK: load volatile + // CHECK-NOT: load volatile + ({[[gsl::suppress("foo")]] n;}); + + // CHECK-LABEL: @then(i32 3) + then(3); + + // CHECK-NOT: load volatile + // CHECK: load volatile + // CHECK-NOT: load volatile + ({if (true) n;}); + + // CHECK: } +} +template void volatile_load_template(); diff --git a/clang/test/CodeGenCXX/trivial-auto-var-init.cpp b/clang/test/CodeGenCXX/trivial-auto-var-init.cpp index b795c0755bd41..0a9ad86c7e2fe 100644 --- a/clang/test/CodeGenCXX/trivial-auto-var-init.cpp +++ b/clang/test/CodeGenCXX/trivial-auto-var-init.cpp @@ -30,6 +30,53 @@ void test_block() { used(block); } +// Using the variable being initialized is typically UB in C, but for blocks we +// can be nice: they imply extra book-keeping and we can do the auto-init before +// any of said book-keeping. +// +// UNINIT-LABEL: test_block_self_init( +// ZERO-LABEL: test_block_self_init( +// ZERO: %block = alloca <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, i8* }>, align 8 +// ZERO: %captured1 = getelementptr inbounds %struct.__block_byref_captured, %struct.__block_byref_captured* %captured, i32 0, i32 4 +// ZERO-NEXT: store %struct.XYZ* null, %struct.XYZ** %captured1, align 8 +// ZERO: %call = call %struct.XYZ* @create( +// PATTERN-LABEL: test_block_self_init( +// PATTERN: %block = alloca <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, i8* }>, align 8 +// PATTERN: %captured1 = getelementptr inbounds %struct.__block_byref_captured, %struct.__block_byref_captured* %captured, i32 0, i32 4 +// PATTERN-NEXT: store %struct.XYZ* inttoptr (i64 -6148914691236517206 to %struct.XYZ*), %struct.XYZ** %captured1, align 8 +// PATTERN: %call = call %struct.XYZ* @create( +using Block = void (^)(); +typedef struct XYZ { + Block block; +} * xyz_t; +void test_block_self_init() { + extern xyz_t create(Block block); + __block xyz_t captured = create(^() { + used(captured); + }); +} + +// Capturing with escape after initialization is also an edge case. +// +// UNINIT-LABEL: test_block_captures_self_after_init( +// ZERO-LABEL: test_block_captures_self_after_init( +// ZERO: %block = alloca <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, i8* }>, align 8 +// ZERO: %captured1 = getelementptr inbounds %struct.__block_byref_captured.1, %struct.__block_byref_captured.1* %captured, i32 0, i32 4 +// ZERO-NEXT: store %struct.XYZ* null, %struct.XYZ** %captured1, align 8 +// ZERO: %call = call %struct.XYZ* @create( +// PATTERN-LABEL: test_block_captures_self_after_init( +// PATTERN: %block = alloca <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, i8* }>, align 8 +// PATTERN: %captured1 = getelementptr inbounds %struct.__block_byref_captured.1, %struct.__block_byref_captured.1* %captured, i32 0, i32 4 +// PATTERN-NEXT: store %struct.XYZ* inttoptr (i64 -6148914691236517206 to %struct.XYZ*), %struct.XYZ** %captured1, align 8 +// PATTERN: %call = call %struct.XYZ* @create( +void test_block_captures_self_after_init() { + extern xyz_t create(Block block); + __block xyz_t captured; + captured = create(^() { + used(captured); + }); +} + // This type of code is currently not handled by zero / pattern initialization. // The test will break when that is fixed. // UNINIT-LABEL: test_goto_unreachable_value( diff --git a/clang/test/CodeGenCXX/volatile.cpp b/clang/test/CodeGenCXX/volatile.cpp index 9c0271b21dfed..cf49aed4decb4 100644 --- a/clang/test/CodeGenCXX/volatile.cpp +++ b/clang/test/CodeGenCXX/volatile.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin10 -emit-llvm -std=c++98 -o - | FileCheck %s +// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin10 -emit-llvm -std=c++98 -o - | FileCheck -check-prefix=CHECK -check-prefix=CHECK98 %s // RUN: %clang_cc1 %s -triple=x86_64-apple-darwin10 -emit-llvm -std=c++11 -o - | FileCheck -check-prefix=CHECK -check-prefix=CHECK11 %s // Check that IR gen doesn't try to do an lvalue-to-rvalue conversion @@ -33,3 +33,19 @@ namespace test1 { *x; } } + +namespace PR40642 { + template struct S { + // CHECK-LABEL: define {{.*}} @_ZN7PR406421SIiE3fooEv( + void foo() { + // CHECK98-NOT: load volatile + // CHECK11: load volatile + if (true) + reinterpret_cast(m_ptr)[0]; + // CHECK: } + } + int *m_ptr; + }; + + void f(S *x) { x->foo(); } +} diff --git a/clang/test/CodeGenCXX/vtable-layout.cpp b/clang/test/CodeGenCXX/vtable-layout.cpp index 4a47e3c9d2e8f..115303f62ba8c 100644 --- a/clang/test/CodeGenCXX/vtable-layout.cpp +++ b/clang/test/CodeGenCXX/vtable-layout.cpp @@ -1412,7 +1412,7 @@ struct D : virtual C { // CHECK-35-NEXT: 13 | void Test28::B::b() // // CHECK-35: VTable indices for 'Test28::E' (1 entries). -// CHECK-35-NEXT : 0 | void Test28::E::e() +// CHECK-35-NEXT: 0 | void Test28::E::e() // CHECK-35: Construction vtable for ('Test28::D', 0) in 'Test28::E' (13 entries). // CHECK-35-NEXT: 0 | vbase_offset (8) diff --git a/clang/test/CodeGenObjC/arc-block-copy-escape.m b/clang/test/CodeGenObjC/arc-block-copy-escape.m index 3823a95d6a85c..9e409ce72e247 100644 --- a/clang/test/CodeGenObjC/arc-block-copy-escape.m +++ b/clang/test/CodeGenObjC/arc-block-copy-escape.m @@ -9,14 +9,14 @@ void test0(int i) { block_t block = ^{ use_int(i); }; // CHECK-LABEL: define {{.*}}void @test0( - // CHECK: call {{.*}}i8* @llvm.objc.retainBlock(i8* {{%.*}}) [[NUW:#[0-9]+]], !clang.arc.copy_on_escape + // CHECK-NOT: @llvm.objc.retainBlock( // CHECK: ret void } void test1(int i) { id block = ^{ use_int(i); }; // CHECK-LABEL: define {{.*}}void @test1( - // CHECK: call {{.*}}i8* @llvm.objc.retainBlock(i8* {{%.*}}) [[NUW]] + // CHECK: call {{.*}}i8* @llvm.objc.retainBlock(i8* {{%.*}}) [[NUW:#[0-9]+]] // CHECK-NOT: !clang.arc.copy_on_escape // CHECK: ret void } diff --git a/clang/test/CodeGenObjC/arc-blocks.m b/clang/test/CodeGenObjC/arc-blocks.m index 49da992f95f57..47e2723b51168 100644 --- a/clang/test/CodeGenObjC/arc-blocks.m +++ b/clang/test/CodeGenObjC/arc-blocks.m @@ -338,20 +338,19 @@ void test10a(void) { __block void (^block)(void) = ^{ block(); }; // CHECK-LABEL: define void @test10a() // CHECK: [[BYREF:%.*]] = alloca [[BYREF_T:%.*]], + // CHECK: [[BLOCK1:%.*]] = alloca <{ i8*, i32, i32, i8*, %[[STRUCT_BLOCK_DESCRIPTOR]]*, i8* }>, align 8 // Zero-initialization before running the initializer. // CHECK: [[T0:%.*]] = getelementptr inbounds [[BYREF_T]], [[BYREF_T]]* [[BYREF]], i32 0, i32 6 // CHECK-NEXT: store void ()* null, void ()** [[T0]], align 8 // Run the initializer as an assignment. - // CHECK: [[T0:%.*]] = bitcast void ()* {{%.*}} to i8* - // CHECK-NEXT: [[T1:%.*]] = call i8* @llvm.objc.retainBlock(i8* [[T0]]) - // CHECK-NEXT: [[T2:%.*]] = bitcast i8* [[T1]] to void ()* + // CHECK: [[T2:%.*]] = bitcast <{ i8*, i32, i32, i8*, %[[STRUCT_BLOCK_DESCRIPTOR]]*, i8* }>* [[BLOCK1]] to void ()* // CHECK-NEXT: [[T3:%.*]] = getelementptr inbounds [[BYREF_T]], [[BYREF_T]]* [[BYREF]], i32 0, i32 1 // CHECK-NEXT: [[T4:%.*]] = load [[BYREF_T]]*, [[BYREF_T]]** [[T3]] // CHECK-NEXT: [[T5:%.*]] = getelementptr inbounds [[BYREF_T]], [[BYREF_T]]* [[T4]], i32 0, i32 6 // CHECK-NEXT: [[T6:%.*]] = load void ()*, void ()** [[T5]], align 8 - // CHECK-NEXT: store void ()* {{%.*}}, void ()** [[T5]], align 8 + // CHECK-NEXT: store void ()* [[T2]], void ()** [[T5]], align 8 // CHECK-NEXT: [[T7:%.*]] = bitcast void ()* [[T6]] to i8* // CHECK-NEXT: call void @llvm.objc.release(i8* [[T7]]) @@ -401,6 +400,7 @@ void test10b(void) { // CHECK-LABEL: define void @test10b() // CHECK: [[BYREF:%.*]] = alloca [[BYREF_T:%.*]], + // CHECK: [[BLOCK3:%.*]] = alloca <{ i8*, i32, i32, i8*, %[[STRUCT_BLOCK_DESCRIPTOR]]*, i8* }>, align 8 // Zero-initialize. // CHECK: [[T0:%.*]] = getelementptr inbounds [[BYREF_T]], [[BYREF_T]]* [[BYREF]], i32 0, i32 6 @@ -409,14 +409,12 @@ void test10b(void) { // CHECK-NEXT: [[SLOT:%.*]] = getelementptr inbounds [[BYREF_T]], [[BYREF_T]]* [[BYREF]], i32 0, i32 6 // The assignment. - // CHECK: [[T0:%.*]] = bitcast void ()* {{%.*}} to i8* - // CHECK-NEXT: [[T1:%.*]] = call i8* @llvm.objc.retainBlock(i8* [[T0]]) - // CHECK-NEXT: [[T2:%.*]] = bitcast i8* [[T1]] to void ()* + // CHECK: [[T2:%.*]] = bitcast <{ i8*, i32, i32, i8*, %[[STRUCT_BLOCK_DESCRIPTOR]]*, i8* }>* [[BLOCK3]] to void ()* // CHECK-NEXT: [[T3:%.*]] = getelementptr inbounds [[BYREF_T]], [[BYREF_T]]* [[BYREF]], i32 0, i32 1 // CHECK-NEXT: [[T4:%.*]] = load [[BYREF_T]]*, [[BYREF_T]]** [[T3]] // CHECK-NEXT: [[T5:%.*]] = getelementptr inbounds [[BYREF_T]], [[BYREF_T]]* [[T4]], i32 0, i32 6 // CHECK-NEXT: [[T6:%.*]] = load void ()*, void ()** [[T5]], align 8 - // CHECK-NEXT: store void ()* {{%.*}}, void ()** [[T5]], align 8 + // CHECK-NEXT: store void ()* [[T2]], void ()** [[T5]], align 8 // CHECK-NEXT: [[T7:%.*]] = bitcast void ()* [[T6]] to i8* // CHECK-NEXT: call void @llvm.objc.release(i8* [[T7]]) diff --git a/clang/test/CodeGenObjC/builtin-constant-p.m b/clang/test/CodeGenObjC/builtin-constant-p.m new file mode 100644 index 0000000000000..c9ce1529b7fdb --- /dev/null +++ b/clang/test/CodeGenObjC/builtin-constant-p.m @@ -0,0 +1,28 @@ +// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -O3 -disable-llvm-passes -o - %s | FileCheck %s + +// Test that can call `__builtin_constant_p` with instances of different +// Objective-C classes. +// rdar://problem/47499250 +@class Foo; +@class Bar; + +extern void callee(void); + +// CHECK-LABEL: define void @test(%0* %foo, %1* %bar) +void test(Foo *foo, Bar *bar) { + // CHECK: [[ADDR_FOO:%.*]] = bitcast %0* %{{.*}} to i8* + // CHECK-NEXT: call i1 @llvm.is.constant.p0i8(i8* [[ADDR_FOO]]) + // CHECK: [[ADDR_BAR:%.*]] = bitcast %1* %{{.*}} to i8* + // CHECK-NEXT: call i1 @llvm.is.constant.p0i8(i8* [[ADDR_BAR]]) + if (__builtin_constant_p(foo) && __builtin_constant_p(bar)) + callee(); +} + +// Test other Objective-C types. +// CHECK-LABEL: define void @test_more(i8* %object, i8* %klass) +void test_more(id object, Class klass) { + // CHECK: call i1 @llvm.is.constant.p0i8(i8* %{{.*}}) + // CHECK: call i1 @llvm.is.constant.p0i8(i8* %{{.*}}) + if (__builtin_constant_p(object) && __builtin_constant_p(klass)) + callee(); +} diff --git a/clang/test/CodeGenObjC/dllstorage.m b/clang/test/CodeGenObjC/dllstorage.m index 2cc4dc72a0cbd..da90824a829ad 100644 --- a/clang/test/CodeGenObjC/dllstorage.m +++ b/clang/test/CodeGenObjC/dllstorage.m @@ -85,7 +85,7 @@ @interface M : I { } @end -// CHEKC-FW-DAG: @_OBJC_CLASS_M = external dllimport global i32 +// CHECK-FW-DAG: @_OBJC_CLASS_M = external dllimport global i32 // CHECK-IR-DAG: @"OBJC_IVAR_$_M._ivar" = external dllimport global i32 diff --git a/clang/test/CodeGenObjC/encode-test-6.m b/clang/test/CodeGenObjC/encode-test-6.m index bbd29cbdc9438..583ba5ab4de6f 100644 --- a/clang/test/CodeGenObjC/encode-test-6.m +++ b/clang/test/CodeGenObjC/encode-test-6.m @@ -63,4 +63,4 @@ @implementation SCNCamera } // CHECK: @e = global [2 x i8] c"i\00", align 1 // CHECK: define i8* @Test() -// CHECK: ret i8* getelementptr inbounds ([2 x i8], [2 x i8]* @e, i32 0, i32 0) +// CHECK: ret i8* getelementptr inbounds ([2 x i8], [2 x i8]* @e, i64 0, i64 0) diff --git a/clang/test/CodeGenObjC/encode-test.m b/clang/test/CodeGenObjC/encode-test.m index a1f88e05250a9..113dbef95f39c 100644 --- a/clang/test/CodeGenObjC/encode-test.m +++ b/clang/test/CodeGenObjC/encode-test.m @@ -186,7 +186,8 @@ @implementation Derived1X @end // CHECK-LABEL: @test_strlen( // CHECK: %[[i:.*]] = alloca i32 -// CHECK: store i32 1, i32* %[[i]] +// CHECK: %[[call:.*]] = call i32 @strlen +// CHECK: store i32 %[[call]], i32* %[[i]] void test_strlen() { const char array[] = @encode(int); int i = strlen(array); diff --git a/clang/test/CodeGenObjC/getter-property-mismatch.m b/clang/test/CodeGenObjC/getter-property-mismatch.m index fe415d5358d39..cc54fa65196aa 100644 --- a/clang/test/CodeGenObjC/getter-property-mismatch.m +++ b/clang/test/CodeGenObjC/getter-property-mismatch.m @@ -15,6 +15,4 @@ @implementation CalDAVAddManagedAttachmentsTaskGroup // CHECK: [[CALL:%.*]] = tail call i8* @objc_getProperty // CHECK: [[ONE:%.*]] = bitcast i8* [[CALL:%.*]] to [[T1:%.*]]* -// CHECK: [[TWO:%.*]] = bitcast [[T1]]* [[ONE]] to [[T2:%.*]]* -// CHECK: ret [[T2]]* [[TWO]] - +// CHECK: ret [[T1]]* [[ONE]] diff --git a/clang/test/CodeGenObjC/gnu-init.m b/clang/test/CodeGenObjC/gnu-init.m index 2188165ff1774..1bec097a44267 100644 --- a/clang/test/CodeGenObjC/gnu-init.m +++ b/clang/test/CodeGenObjC/gnu-init.m @@ -14,7 +14,7 @@ @implementation X @end // Check that we get a class ref to the defined class. // CHECK-NEW: @._OBJC_INIT_CLASS_X = global -// CHECK-NEW-SAME* @._OBJC_CLASS_X, section "__objc_classes" +// CHECK-NEW-SAME: @._OBJC_CLASS_X, section "__objc_classes" // Check that we emit the section start and end symbols as hidden globals. // CHECK-NEW: @__start___objc_selectors = external hidden global i8* diff --git a/clang/test/CodeGenObjC/gnustep2-category-protocol.m b/clang/test/CodeGenObjC/gnustep2-category-protocol.m index 6463474507634..750b6e0792055 100644 --- a/clang/test/CodeGenObjC/gnustep2-category-protocol.m +++ b/clang/test/CodeGenObjC/gnustep2-category-protocol.m @@ -5,7 +5,7 @@ // to a protocol in a binary. // CHECK: @._OBJC_PROTOCOL_Y = global -// CHEKC-SAME: section "__objc_protocols", comdat, align 8 +// CHECK-SAME: section "__objc_protocols", comdat, align 8 @interface X diff --git a/clang/test/CodeGenObjC/non-lazy-classes.m b/clang/test/CodeGenObjC/non-lazy-classes.m index b04b020e20ee7..aeb2a0dd9cb76 100644 --- a/clang/test/CodeGenObjC/non-lazy-classes.m +++ b/clang/test/CodeGenObjC/non-lazy-classes.m @@ -1,6 +1,6 @@ // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -Wno-objc-root-class -emit-llvm -o - %s | \ // RUN: FileCheck %s -// CHECK: @"OBJC_LABEL_NONLAZY_CLASS_$" = private global [1 x {{.*}}] {{.*}}@"OBJC_CLASS_$_A"{{.*}}, section "__DATA,__objc_nlclslist,regular,no_dead_strip", align 8 +// CHECK: @"OBJC_LABEL_NONLAZY_CLASS_$" = private global [2 x {{.*}}]{{.*}}@"OBJC_CLASS_$_A"{{.*}},{{.*}}@"OBJC_CLASS_$_D"{{.*}} section "__DATA,__objc_nlclslist,regular,no_dead_strip", align 8 // CHECK: @"OBJC_LABEL_NONLAZY_CATEGORY_$" = private global [1 x {{.*}}] {{.*}}@"\01l_OBJC_$_CATEGORY_A_$_Cat"{{.*}}, section "__DATA,__objc_nlcatlist,regular,no_dead_strip", align 8 @interface A @end @@ -30,3 +30,8 @@ -(void) load { @interface C : A @end @implementation C @end + +__attribute__((objc_nonlazy_class)) +@interface D @end + +@implementation D @end diff --git a/clang/test/CodeGenObjC/objc-alloc-init.m b/clang/test/CodeGenObjC/objc-alloc-init.m new file mode 100644 index 0000000000000..a55a9835c8add --- /dev/null +++ b/clang/test/CodeGenObjC/objc-alloc-init.m @@ -0,0 +1,41 @@ +// RUN: %clang_cc1 %s -fobjc-runtime=macosx-10.14.4 -emit-llvm -O0 -o - | FileCheck %s --check-prefix=OPTIMIZED --check-prefix=EITHER +// RUN: %clang_cc1 %s -fobjc-runtime=macosx-10.14.3 -emit-llvm -O0 -o - | FileCheck %s --check-prefix=NOT_OPTIMIZED --check-prefix=EITHER +// RUN: %clang_cc1 %s -fobjc-runtime=ios-12.2 -emit-llvm -O0 -o - | FileCheck %s --check-prefix=OPTIMIZED --check-prefix=EITHER +// RUN: %clang_cc1 %s -fobjc-runtime=ios-12.1 -emit-llvm -O0 -o - | FileCheck %s --check-prefix=NOT_OPTIMIZED --check-prefix=EITHER + +@interface X ++(X *)alloc; +-(X *)init; +@end + +void f() { + [[X alloc] init]; + // OPTIMIZED: call i8* @objc_alloc_init( + // NOT_OPTIMIZED: call i8* @objc_alloc( +} + +@interface Y : X ++(void)meth; +@end + +@implementation Y ++(void)meth { + [[self alloc] init]; + // EITHER-NOT: call i8* @objc_alloc + // EITHER: call {{.*}} @objc_msgSend + // EITHER: call {{.*}} @objc_msgSend +} +@end + +// rdar://48247290 +@interface Base +-(instancetype)init; +@end + +@interface Derived : Base +@end +@implementation Derived +-(void)meth { + [super init]; +} +@end diff --git a/clang/test/CodeGenObjC/os_log.m b/clang/test/CodeGenObjC/os_log.m index 6acd58304aab4..150987b0820ae 100644 --- a/clang/test/CodeGenObjC/os_log.m +++ b/clang/test/CodeGenObjC/os_log.m @@ -50,7 +50,7 @@ // CHECK-O0: %[[V4:.*]] = ptrtoint %[[TY0]]* %[[V3]] to i64 // CHECK-O0: call void @__os_log_helper_1_2_1_8_64(i8* %[[V0]], i64 %[[V4]]) // CHECK-O0: %[[V5:.*]] = bitcast %[[TY0]]* %[[V3]] to i8* - // CHECK-O0-NOT call void (...) @llvm.objc.clang.arc.use({{.*}} + // CHECK-O0-NOT: call void (...) @llvm.objc.clang.arc.use({{.*}} // CHECK-O0: call void @llvm.objc.release(i8* %[[V5]]) // CHECK-O0: ret i8* %[[V0]] } diff --git a/clang/test/CodeGenObjC/property-array-type.m b/clang/test/CodeGenObjC/property-array-type.m index ea757db0f60df..a7f770d173f19 100644 --- a/clang/test/CodeGenObjC/property-array-type.m +++ b/clang/test/CodeGenObjC/property-array-type.m @@ -25,6 +25,6 @@ - (void)viewDidLoad { @end // CHECK: [[M:%.*]] = getelementptr inbounds %struct._GLKMatrix4, %struct._GLKMatrix4* [[TMP:%.*]], i32 0, i32 0 -// CHECK: [[ARRAYDECAY:%.*]] = getelementptr inbounds [16 x float], [16 x float]* [[M]], i32 0, i32 0 +// CHECK: [[ARRAYDECAY:%.*]] = getelementptr inbounds [16 x float], [16 x float]* [[M]], i64 0, i64 0 // CHECK: [[SIX:%.*]] = load i8*, i8** @OBJC_SELECTOR_REFERENCES // CHECK: call void bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to void (i8*, i8*, float*)*)(i8* [[SEVEN:%.*]], i8* [[SIX]], float* [[ARRAYDECAY]]) diff --git a/clang/test/CodeGenObjCXX/arc-blocks.mm b/clang/test/CodeGenObjCXX/arc-blocks.mm index ec0c12456aa13..24697cf1bd377 100644 --- a/clang/test/CodeGenObjCXX/arc-blocks.mm +++ b/clang/test/CodeGenObjCXX/arc-blocks.mm @@ -201,3 +201,123 @@ void foo1() { ^{ (void)t0; (void)t1; (void)t2; (void)t3; (void)t4; (void)t5; }; } } + +// Test that calls to @llvm.objc.retainBlock aren't emitted in some cases. + +namespace test_block_retain { + typedef void (^BlockTy)(); + + void foo1(id); + +// CHECK-LABEL: define void @_ZN17test_block_retain14initializationEP11objc_object( +// CHECK-NOT: @llvm.objc.retainBlock( + void initialization(id a) { + BlockTy b0 = ^{ foo1(a); }; + BlockTy b1 = (^{ foo1(a); }); + b0(); + b1(); + } + +// CHECK-LABEL: define void @_ZN17test_block_retain20initializationStaticEP11objc_object( +// CHECK: @llvm.objc.retainBlock( + void initializationStatic(id a) { + static BlockTy b0 = ^{ foo1(a); }; + b0(); + } + +// CHECK-LABEL: define void @_ZN17test_block_retain15initialization2EP11objc_object +// CHECK: %[[B0:.*]] = alloca void ()*, align 8 +// CHECK: %[[B1:.*]] = alloca void ()*, align 8 +// CHECK: load void ()*, void ()** %[[B0]], align 8 +// CHECK-NOT: @llvm.objc.retainBlock +// CHECK: %[[V9:.*]] = load void ()*, void ()** %[[B0]], align 8 +// CHECK: %[[V10:.*]] = bitcast void ()* %[[V9]] to i8* +// CHECK: %[[V11:.*]] = call i8* @llvm.objc.retainBlock(i8* %[[V10]]) +// CHECK: %[[V12:.*]] = bitcast i8* %[[V11]] to void ()* +// CHECK: store void ()* %[[V12]], void ()** %[[B1]], align 8 + void initialization2(id a) { + BlockTy b0 = ^{ foo1(a); }; + b0(); + BlockTy b1 = b0; // can't optimize this yet. + b1(); + } + +// CHECK-LABEL: define void @_ZN17test_block_retain10assignmentEP11objc_object( +// CHECK-NOT: @llvm.objc.retainBlock( + void assignment(id a) { + BlockTy b0; + (b0) = ^{ foo1(a); }; + b0(); + b0 = (^{ foo1(a); }); + b0(); + } + +// CHECK-LABEL: define void @_ZN17test_block_retain16assignmentStaticEP11objc_object( +// CHECK: @llvm.objc.retainBlock( + void assignmentStatic(id a) { + static BlockTy b0; + b0 = ^{ foo1(a); }; + b0(); + } + +// CHECK-LABEL: define void @_ZN17test_block_retain21assignmentConditionalEP11objc_objectb( +// CHECK: @llvm.objc.retainBlock( + void assignmentConditional(id a, bool c) { + BlockTy b0; + if (c) + // can't optimize this since 'b0' is declared in the outer scope. + b0 = ^{ foo1(a); }; + b0(); + } + +// CHECK-LABEL: define void @_ZN17test_block_retain11assignment2EP11objc_object( +// CHECK: %[[B0:.*]] = alloca void ()*, align 8 +// CHECK: %[[B1:.*]] = alloca void ()*, align 8 +// CHECK-NOT: @llvm.objc.retainBlock +// CHECK: store void ()* null, void ()** %[[B1]], align 8 +// CHECK: %[[V9:.*]] = load void ()*, void ()** %[[B0]], align 8 +// CHECK: %[[V10:.*]] = bitcast void ()* %[[V9]] to i8* +// CHECK: %[[V11:.*]] = call i8* @llvm.objc.retainBlock(i8* %[[V10]] +// CHECK: %[[V12:.*]] = bitcast i8* %[[V11]] to void ()* +// CHECK: store void ()* %[[V12]], void ()** %[[B1]], align 8 + void assignment2(id a) { + BlockTy b0 = ^{ foo1(a); }; + b0(); + BlockTy b1; + b1 = b0; // can't optimize this yet. + b1(); + } + +// We cannot remove the call to @llvm.objc.retainBlock if the variable is of type id. + +// CHECK: define void @_ZN17test_block_retain21initializationObjCPtrEP11objc_object( +// CHECK: alloca i8*, align 8 +// CHECK: %[[B0:.*]] = alloca i8*, align 8 +// CHECK: %[[BLOCK:.*]] = alloca <{ i8*, i32, i32, i8*, %[[STRUCT_BLOCK_DESCRIPTOR]]*, i8* }>, align 8 +// CHECK: %[[V3:.*]] = bitcast <{ i8*, i32, i32, i8*, %[[STRUCT_BLOCK_DESCRIPTOR]]*, i8* }>* %[[BLOCK]] to void ()* +// CHECK: %[[V4:.*]] = bitcast void ()* %[[V3]] to i8* +// CHECK: %[[V5:.*]] = call i8* @llvm.objc.retainBlock(i8* %[[V4]]) +// CHECK: %[[V6:.*]] = bitcast i8* %[[V5]] to void ()* +// CHECK: %[[V7:.*]] = bitcast void ()* %[[V6]] to i8* +// CHECK: store i8* %[[V7]], i8** %[[B0]], align 8 + void initializationObjCPtr(id a) { + id b0 = ^{ foo1(a); }; + ((BlockTy)b0)(); + } + +// CHECK: define void @_ZN17test_block_retain17assignmentObjCPtrEP11objc_object( +// CHECK: %[[B0:.*]] = alloca void ()*, align 8 +// CHECK: %[[B1:.*]] = alloca i8*, align 8 +// CHECK: %[[V4:.*]] = load void ()*, void ()** %[[B0]], align 8 +// CHECK: %[[V5:.*]] = bitcast void ()* %[[V4]] to i8* +// CHECK: %[[V6:.*]] = call i8* @llvm.objc.retainBlock(i8* %[[V5]]) +// CHECK: %[[V7:.*]] = bitcast i8* %[[V6]] to void ()* +// CHECK: %[[V8:.*]] = bitcast void ()* %[[V7]] to i8* +// CHECK: store i8* %[[V8]], i8** %[[B1]], align 8 + void assignmentObjCPtr(id a) { + BlockTy b0 = ^{ foo1(a); }; + id b1; + b1 = b0; + ((BlockTy)b1)(); + } +} diff --git a/clang/test/CodeGenOpenCL/amdgcn-automatic-variable.cl b/clang/test/CodeGenOpenCL/amdgcn-automatic-variable.cl index 59f38f80dca4e..7216cb5174955 100644 --- a/clang/test/CodeGenOpenCL/amdgcn-automatic-variable.cl +++ b/clang/test/CodeGenOpenCL/amdgcn-automatic-variable.cl @@ -42,7 +42,7 @@ void func2(void) { // CL20: store i32* %[[r0]], i32* addrspace(5)* %lp1, align 8 int *lp1 = &lv1; - // CHECK: %[[arraydecay:.*]] = getelementptr inbounds [100 x i32], [100 x i32] addrspace(5)* %la, i32 0, i32 0 + // CHECK: %[[arraydecay:.*]] = getelementptr inbounds [100 x i32], [100 x i32] addrspace(5)* %la, i64 0, i64 0 // CL12: store i32 addrspace(5)* %[[arraydecay]], i32 addrspace(5)* addrspace(5)* %lp2, align 4 // CL20: %[[r1:.*]] = addrspacecast i32 addrspace(5)* %[[arraydecay]] to i32* // CL20: store i32* %[[r1]], i32* addrspace(5)* %lp2, align 8 diff --git a/clang/test/CodeGenOpenCL/amdgpu-alignment.cl b/clang/test/CodeGenOpenCL/amdgpu-alignment.cl index b5dc47adbc2c5..3241da612f9a9 100644 --- a/clang/test/CodeGenOpenCL/amdgpu-alignment.cl +++ b/clang/test/CodeGenOpenCL/amdgpu-alignment.cl @@ -92,48 +92,48 @@ typedef double __attribute__((ext_vector_type(16))) double16; // CHECK-LABEL: @local_memory_alignment_global( -// CHECK: store volatile i8 0, i8 addrspace(3)* getelementptr inbounds ([4 x i8], [4 x i8] addrspace(3)* @local_memory_alignment_global.lds_i8, i32 0, i32 0), align 1 -// CHECK: store volatile <2 x i8> zeroinitializer, <2 x i8> addrspace(3)* getelementptr inbounds ([4 x <2 x i8>], [4 x <2 x i8>] addrspace(3)* @local_memory_alignment_global.lds_v2i8, i32 0, i32 0), align 2 +// CHECK: store volatile i8 0, i8 addrspace(3)* getelementptr inbounds ([4 x i8], [4 x i8] addrspace(3)* @local_memory_alignment_global.lds_i8, i64 0, i64 0), align 1 +// CHECK: store volatile <2 x i8> zeroinitializer, <2 x i8> addrspace(3)* getelementptr inbounds ([4 x <2 x i8>], [4 x <2 x i8>] addrspace(3)* @local_memory_alignment_global.lds_v2i8, i64 0, i64 0), align 2 // CHECK: store volatile <4 x i8> , <4 x i8> addrspace(3)* bitcast ([4 x <3 x i8>] addrspace(3)* @local_memory_alignment_global.lds_v3i8 to <4 x i8> addrspace(3)*), align 4 -// CHECK: store volatile <4 x i8> zeroinitializer, <4 x i8> addrspace(3)* getelementptr inbounds ([4 x <4 x i8>], [4 x <4 x i8>] addrspace(3)* @local_memory_alignment_global.lds_v4i8, i32 0, i32 0), align 4 -// CHECK: store volatile <8 x i8> zeroinitializer, <8 x i8> addrspace(3)* getelementptr inbounds ([4 x <8 x i8>], [4 x <8 x i8>] addrspace(3)* @local_memory_alignment_global.lds_v8i8, i32 0, i32 0), align 8 -// CHECK: store volatile <16 x i8> zeroinitializer, <16 x i8> addrspace(3)* getelementptr inbounds ([4 x <16 x i8>], [4 x <16 x i8>] addrspace(3)* @local_memory_alignment_global.lds_v16i8, i32 0, i32 0), align 16 -// CHECK: store volatile i16 0, i16 addrspace(3)* getelementptr inbounds ([4 x i16], [4 x i16] addrspace(3)* @local_memory_alignment_global.lds_i16, i32 0, i32 0), align 2 -// CHECK: store volatile <2 x i16> zeroinitializer, <2 x i16> addrspace(3)* getelementptr inbounds ([4 x <2 x i16>], [4 x <2 x i16>] addrspace(3)* @local_memory_alignment_global.lds_v2i16, i32 0, i32 0), align 4 +// CHECK: store volatile <4 x i8> zeroinitializer, <4 x i8> addrspace(3)* getelementptr inbounds ([4 x <4 x i8>], [4 x <4 x i8>] addrspace(3)* @local_memory_alignment_global.lds_v4i8, i64 0, i64 0), align 4 +// CHECK: store volatile <8 x i8> zeroinitializer, <8 x i8> addrspace(3)* getelementptr inbounds ([4 x <8 x i8>], [4 x <8 x i8>] addrspace(3)* @local_memory_alignment_global.lds_v8i8, i64 0, i64 0), align 8 +// CHECK: store volatile <16 x i8> zeroinitializer, <16 x i8> addrspace(3)* getelementptr inbounds ([4 x <16 x i8>], [4 x <16 x i8>] addrspace(3)* @local_memory_alignment_global.lds_v16i8, i64 0, i64 0), align 16 +// CHECK: store volatile i16 0, i16 addrspace(3)* getelementptr inbounds ([4 x i16], [4 x i16] addrspace(3)* @local_memory_alignment_global.lds_i16, i64 0, i64 0), align 2 +// CHECK: store volatile <2 x i16> zeroinitializer, <2 x i16> addrspace(3)* getelementptr inbounds ([4 x <2 x i16>], [4 x <2 x i16>] addrspace(3)* @local_memory_alignment_global.lds_v2i16, i64 0, i64 0), align 4 // CHECK: store volatile <4 x i16> , <4 x i16> addrspace(3)* bitcast ([4 x <3 x i16>] addrspace(3)* @local_memory_alignment_global.lds_v3i16 to <4 x i16> addrspace(3)*), align 8 -// CHECK: store volatile <4 x i16> zeroinitializer, <4 x i16> addrspace(3)* getelementptr inbounds ([4 x <4 x i16>], [4 x <4 x i16>] addrspace(3)* @local_memory_alignment_global.lds_v4i16, i32 0, i32 0), align 8 -// CHECK: store volatile <8 x i16> zeroinitializer, <8 x i16> addrspace(3)* getelementptr inbounds ([4 x <8 x i16>], [4 x <8 x i16>] addrspace(3)* @local_memory_alignment_global.lds_v8i16, i32 0, i32 0), align 16 -// CHECK: store volatile <16 x i16> zeroinitializer, <16 x i16> addrspace(3)* getelementptr inbounds ([4 x <16 x i16>], [4 x <16 x i16>] addrspace(3)* @local_memory_alignment_global.lds_v16i16, i32 0, i32 0), align 32 -// CHECK: store volatile i32 0, i32 addrspace(3)* getelementptr inbounds ([4 x i32], [4 x i32] addrspace(3)* @local_memory_alignment_global.lds_i32, i32 0, i32 0), align 4 -// CHECK: store volatile <2 x i32> zeroinitializer, <2 x i32> addrspace(3)* getelementptr inbounds ([4 x <2 x i32>], [4 x <2 x i32>] addrspace(3)* @local_memory_alignment_global.lds_v2i32, i32 0, i32 0), align 8 +// CHECK: store volatile <4 x i16> zeroinitializer, <4 x i16> addrspace(3)* getelementptr inbounds ([4 x <4 x i16>], [4 x <4 x i16>] addrspace(3)* @local_memory_alignment_global.lds_v4i16, i64 0, i64 0), align 8 +// CHECK: store volatile <8 x i16> zeroinitializer, <8 x i16> addrspace(3)* getelementptr inbounds ([4 x <8 x i16>], [4 x <8 x i16>] addrspace(3)* @local_memory_alignment_global.lds_v8i16, i64 0, i64 0), align 16 +// CHECK: store volatile <16 x i16> zeroinitializer, <16 x i16> addrspace(3)* getelementptr inbounds ([4 x <16 x i16>], [4 x <16 x i16>] addrspace(3)* @local_memory_alignment_global.lds_v16i16, i64 0, i64 0), align 32 +// CHECK: store volatile i32 0, i32 addrspace(3)* getelementptr inbounds ([4 x i32], [4 x i32] addrspace(3)* @local_memory_alignment_global.lds_i32, i64 0, i64 0), align 4 +// CHECK: store volatile <2 x i32> zeroinitializer, <2 x i32> addrspace(3)* getelementptr inbounds ([4 x <2 x i32>], [4 x <2 x i32>] addrspace(3)* @local_memory_alignment_global.lds_v2i32, i64 0, i64 0), align 8 // CHECK: store volatile <4 x i32> , <4 x i32> addrspace(3)* bitcast ([4 x <3 x i32>] addrspace(3)* @local_memory_alignment_global.lds_v3i32 to <4 x i32> addrspace(3)*), align 16 -// CHECK: store volatile <4 x i32> zeroinitializer, <4 x i32> addrspace(3)* getelementptr inbounds ([4 x <4 x i32>], [4 x <4 x i32>] addrspace(3)* @local_memory_alignment_global.lds_v4i32, i32 0, i32 0), align 16 -// CHECK: store volatile <8 x i32> zeroinitializer, <8 x i32> addrspace(3)* getelementptr inbounds ([4 x <8 x i32>], [4 x <8 x i32>] addrspace(3)* @local_memory_alignment_global.lds_v8i32, i32 0, i32 0), align 32 -// CHECK: store volatile <16 x i32> zeroinitializer, <16 x i32> addrspace(3)* getelementptr inbounds ([4 x <16 x i32>], [4 x <16 x i32>] addrspace(3)* @local_memory_alignment_global.lds_v16i32, i32 0, i32 0), align 64 -// CHECK: store volatile i64 0, i64 addrspace(3)* getelementptr inbounds ([4 x i64], [4 x i64] addrspace(3)* @local_memory_alignment_global.lds_i64, i32 0, i32 0), align 8 -// CHECK: store volatile <2 x i64> zeroinitializer, <2 x i64> addrspace(3)* getelementptr inbounds ([4 x <2 x i64>], [4 x <2 x i64>] addrspace(3)* @local_memory_alignment_global.lds_v2i64, i32 0, i32 0), align 16 +// CHECK: store volatile <4 x i32> zeroinitializer, <4 x i32> addrspace(3)* getelementptr inbounds ([4 x <4 x i32>], [4 x <4 x i32>] addrspace(3)* @local_memory_alignment_global.lds_v4i32, i64 0, i64 0), align 16 +// CHECK: store volatile <8 x i32> zeroinitializer, <8 x i32> addrspace(3)* getelementptr inbounds ([4 x <8 x i32>], [4 x <8 x i32>] addrspace(3)* @local_memory_alignment_global.lds_v8i32, i64 0, i64 0), align 32 +// CHECK: store volatile <16 x i32> zeroinitializer, <16 x i32> addrspace(3)* getelementptr inbounds ([4 x <16 x i32>], [4 x <16 x i32>] addrspace(3)* @local_memory_alignment_global.lds_v16i32, i64 0, i64 0), align 64 +// CHECK: store volatile i64 0, i64 addrspace(3)* getelementptr inbounds ([4 x i64], [4 x i64] addrspace(3)* @local_memory_alignment_global.lds_i64, i64 0, i64 0), align 8 +// CHECK: store volatile <2 x i64> zeroinitializer, <2 x i64> addrspace(3)* getelementptr inbounds ([4 x <2 x i64>], [4 x <2 x i64>] addrspace(3)* @local_memory_alignment_global.lds_v2i64, i64 0, i64 0), align 16 // CHECK: store volatile <4 x i64> , <4 x i64> addrspace(3)* bitcast ([4 x <3 x i64>] addrspace(3)* @local_memory_alignment_global.lds_v3i64 to <4 x i64> addrspace(3)*), align 32 -// CHECK: store volatile <4 x i64> zeroinitializer, <4 x i64> addrspace(3)* getelementptr inbounds ([4 x <4 x i64>], [4 x <4 x i64>] addrspace(3)* @local_memory_alignment_global.lds_v4i64, i32 0, i32 0), align 32 -// CHECK: store volatile <8 x i64> zeroinitializer, <8 x i64> addrspace(3)* getelementptr inbounds ([4 x <8 x i64>], [4 x <8 x i64>] addrspace(3)* @local_memory_alignment_global.lds_v8i64, i32 0, i32 0), align 64 -// CHECK: store volatile <16 x i64> zeroinitializer, <16 x i64> addrspace(3)* getelementptr inbounds ([4 x <16 x i64>], [4 x <16 x i64>] addrspace(3)* @local_memory_alignment_global.lds_v16i64, i32 0, i32 0), align 128 -// CHECK: store volatile half 0xH0000, half addrspace(3)* getelementptr inbounds ([4 x half], [4 x half] addrspace(3)* @local_memory_alignment_global.lds_f16, i32 0, i32 0), align 2 -// CHECK: store volatile <2 x half> zeroinitializer, <2 x half> addrspace(3)* getelementptr inbounds ([4 x <2 x half>], [4 x <2 x half>] addrspace(3)* @local_memory_alignment_global.lds_v2f16, i32 0, i32 0), align 4 +// CHECK: store volatile <4 x i64> zeroinitializer, <4 x i64> addrspace(3)* getelementptr inbounds ([4 x <4 x i64>], [4 x <4 x i64>] addrspace(3)* @local_memory_alignment_global.lds_v4i64, i64 0, i64 0), align 32 +// CHECK: store volatile <8 x i64> zeroinitializer, <8 x i64> addrspace(3)* getelementptr inbounds ([4 x <8 x i64>], [4 x <8 x i64>] addrspace(3)* @local_memory_alignment_global.lds_v8i64, i64 0, i64 0), align 64 +// CHECK: store volatile <16 x i64> zeroinitializer, <16 x i64> addrspace(3)* getelementptr inbounds ([4 x <16 x i64>], [4 x <16 x i64>] addrspace(3)* @local_memory_alignment_global.lds_v16i64, i64 0, i64 0), align 128 +// CHECK: store volatile half 0xH0000, half addrspace(3)* getelementptr inbounds ([4 x half], [4 x half] addrspace(3)* @local_memory_alignment_global.lds_f16, i64 0, i64 0), align 2 +// CHECK: store volatile <2 x half> zeroinitializer, <2 x half> addrspace(3)* getelementptr inbounds ([4 x <2 x half>], [4 x <2 x half>] addrspace(3)* @local_memory_alignment_global.lds_v2f16, i64 0, i64 0), align 4 // CHECK: store volatile <4 x half> , <4 x half> addrspace(3)* bitcast ([4 x <3 x half>] addrspace(3)* @local_memory_alignment_global.lds_v3f16 to <4 x half> addrspace(3)*), align 8 -// CHECK: store volatile <4 x half> zeroinitializer, <4 x half> addrspace(3)* getelementptr inbounds ([4 x <4 x half>], [4 x <4 x half>] addrspace(3)* @local_memory_alignment_global.lds_v4f16, i32 0, i32 0), align 8 -// CHECK: store volatile <8 x half> zeroinitializer, <8 x half> addrspace(3)* getelementptr inbounds ([4 x <8 x half>], [4 x <8 x half>] addrspace(3)* @local_memory_alignment_global.lds_v8f16, i32 0, i32 0), align 16 -// CHECK: store volatile <16 x half> zeroinitializer, <16 x half> addrspace(3)* getelementptr inbounds ([4 x <16 x half>], [4 x <16 x half>] addrspace(3)* @local_memory_alignment_global.lds_v16f16, i32 0, i32 0), align 32 -// CHECK: store volatile float 0.000000e+00, float addrspace(3)* getelementptr inbounds ([4 x float], [4 x float] addrspace(3)* @local_memory_alignment_global.lds_f32, i32 0, i32 0), align 4 -// CHECK: store volatile <2 x float> zeroinitializer, <2 x float> addrspace(3)* getelementptr inbounds ([4 x <2 x float>], [4 x <2 x float>] addrspace(3)* @local_memory_alignment_global.lds_v2f32, i32 0, i32 0), align 8 +// CHECK: store volatile <4 x half> zeroinitializer, <4 x half> addrspace(3)* getelementptr inbounds ([4 x <4 x half>], [4 x <4 x half>] addrspace(3)* @local_memory_alignment_global.lds_v4f16, i64 0, i64 0), align 8 +// CHECK: store volatile <8 x half> zeroinitializer, <8 x half> addrspace(3)* getelementptr inbounds ([4 x <8 x half>], [4 x <8 x half>] addrspace(3)* @local_memory_alignment_global.lds_v8f16, i64 0, i64 0), align 16 +// CHECK: store volatile <16 x half> zeroinitializer, <16 x half> addrspace(3)* getelementptr inbounds ([4 x <16 x half>], [4 x <16 x half>] addrspace(3)* @local_memory_alignment_global.lds_v16f16, i64 0, i64 0), align 32 +// CHECK: store volatile float 0.000000e+00, float addrspace(3)* getelementptr inbounds ([4 x float], [4 x float] addrspace(3)* @local_memory_alignment_global.lds_f32, i64 0, i64 0), align 4 +// CHECK: store volatile <2 x float> zeroinitializer, <2 x float> addrspace(3)* getelementptr inbounds ([4 x <2 x float>], [4 x <2 x float>] addrspace(3)* @local_memory_alignment_global.lds_v2f32, i64 0, i64 0), align 8 // CHECK: store volatile <4 x float> , <4 x float> addrspace(3)* bitcast ([4 x <3 x float>] addrspace(3)* @local_memory_alignment_global.lds_v3f32 to <4 x float> addrspace(3)*), align 16 -// CHECK: store volatile <4 x float> zeroinitializer, <4 x float> addrspace(3)* getelementptr inbounds ([4 x <4 x float>], [4 x <4 x float>] addrspace(3)* @local_memory_alignment_global.lds_v4f32, i32 0, i32 0), align 16 -// CHECK: store volatile <8 x float> zeroinitializer, <8 x float> addrspace(3)* getelementptr inbounds ([4 x <8 x float>], [4 x <8 x float>] addrspace(3)* @local_memory_alignment_global.lds_v8f32, i32 0, i32 0), align 32 -// CHECK: store volatile <16 x float> zeroinitializer, <16 x float> addrspace(3)* getelementptr inbounds ([4 x <16 x float>], [4 x <16 x float>] addrspace(3)* @local_memory_alignment_global.lds_v16f32, i32 0, i32 0), align 64 -// CHECK: store volatile double 0.000000e+00, double addrspace(3)* getelementptr inbounds ([4 x double], [4 x double] addrspace(3)* @local_memory_alignment_global.lds_f64, i32 0, i32 0), align 8 -// CHECK: store volatile <2 x double> zeroinitializer, <2 x double> addrspace(3)* getelementptr inbounds ([4 x <2 x double>], [4 x <2 x double>] addrspace(3)* @local_memory_alignment_global.lds_v2f64, i32 0, i32 0), align 16 +// CHECK: store volatile <4 x float> zeroinitializer, <4 x float> addrspace(3)* getelementptr inbounds ([4 x <4 x float>], [4 x <4 x float>] addrspace(3)* @local_memory_alignment_global.lds_v4f32, i64 0, i64 0), align 16 +// CHECK: store volatile <8 x float> zeroinitializer, <8 x float> addrspace(3)* getelementptr inbounds ([4 x <8 x float>], [4 x <8 x float>] addrspace(3)* @local_memory_alignment_global.lds_v8f32, i64 0, i64 0), align 32 +// CHECK: store volatile <16 x float> zeroinitializer, <16 x float> addrspace(3)* getelementptr inbounds ([4 x <16 x float>], [4 x <16 x float>] addrspace(3)* @local_memory_alignment_global.lds_v16f32, i64 0, i64 0), align 64 +// CHECK: store volatile double 0.000000e+00, double addrspace(3)* getelementptr inbounds ([4 x double], [4 x double] addrspace(3)* @local_memory_alignment_global.lds_f64, i64 0, i64 0), align 8 +// CHECK: store volatile <2 x double> zeroinitializer, <2 x double> addrspace(3)* getelementptr inbounds ([4 x <2 x double>], [4 x <2 x double>] addrspace(3)* @local_memory_alignment_global.lds_v2f64, i64 0, i64 0), align 16 // CHECK: store volatile <4 x double> , <4 x double> addrspace(3)* bitcast ([4 x <3 x double>] addrspace(3)* @local_memory_alignment_global.lds_v3f64 to <4 x double> addrspace(3)*), align 32 -// CHECK: store volatile <4 x double> zeroinitializer, <4 x double> addrspace(3)* getelementptr inbounds ([4 x <4 x double>], [4 x <4 x double>] addrspace(3)* @local_memory_alignment_global.lds_v4f64, i32 0, i32 0), align 32 -// CHECK: store volatile <8 x double> zeroinitializer, <8 x double> addrspace(3)* getelementptr inbounds ([4 x <8 x double>], [4 x <8 x double>] addrspace(3)* @local_memory_alignment_global.lds_v8f64, i32 0, i32 0), align 64 -// CHECK: store volatile <16 x double> zeroinitializer, <16 x double> addrspace(3)* getelementptr inbounds ([4 x <16 x double>], [4 x <16 x double>] addrspace(3)* @local_memory_alignment_global.lds_v16f64, i32 0, i32 0), align 128 +// CHECK: store volatile <4 x double> zeroinitializer, <4 x double> addrspace(3)* getelementptr inbounds ([4 x <4 x double>], [4 x <4 x double>] addrspace(3)* @local_memory_alignment_global.lds_v4f64, i64 0, i64 0), align 32 +// CHECK: store volatile <8 x double> zeroinitializer, <8 x double> addrspace(3)* getelementptr inbounds ([4 x <8 x double>], [4 x <8 x double>] addrspace(3)* @local_memory_alignment_global.lds_v8f64, i64 0, i64 0), align 64 +// CHECK: store volatile <16 x double> zeroinitializer, <16 x double> addrspace(3)* getelementptr inbounds ([4 x <16 x double>], [4 x <16 x double>] addrspace(3)* @local_memory_alignment_global.lds_v16f64, i64 0, i64 0), align 128 kernel void local_memory_alignment_global() { volatile local char lds_i8[4]; diff --git a/clang/test/CodeGenOpenCL/amdgpu-features.cl b/clang/test/CodeGenOpenCL/amdgpu-features.cl index 7aac4d3a3685d..78bdc610617c5 100644 --- a/clang/test/CodeGenOpenCL/amdgpu-features.cl +++ b/clang/test/CodeGenOpenCL/amdgpu-features.cl @@ -11,7 +11,7 @@ // RUN: %clang_cc1 -triple amdgcn -target-cpu gfx601 -S -emit-llvm -o - %s | FileCheck --check-prefix=GFX601 %s // GFX904: "target-features"="+16-bit-insts,+ci-insts,+dpp,+fp32-denormals,+fp64-fp16-denormals,+gfx9-insts,+s-memrealtime,+vi-insts" -// GFX906: "target-features"="+16-bit-insts,+ci-insts,+dl-insts,+dot-insts,+dpp,+fp32-denormals,+fp64-fp16-denormals,+gfx9-insts,+s-memrealtime,+vi-insts" +// GFX906: "target-features"="+16-bit-insts,+ci-insts,+dl-insts,+dot1-insts,+dot2-insts,+dpp,+fp32-denormals,+fp64-fp16-denormals,+gfx9-insts,+s-memrealtime,+vi-insts" // GFX801: "target-features"="+16-bit-insts,+ci-insts,+dpp,+fp32-denormals,+fp64-fp16-denormals,+s-memrealtime,+vi-insts" // GFX700: "target-features"="+ci-insts,+fp64-fp16-denormals,-fp32-denormals" // GFX600: "target-features"="+fp64-fp16-denormals,-fp32-denormals" diff --git a/clang/test/CodeGenOpenCL/blocks.cl b/clang/test/CodeGenOpenCL/blocks.cl index 675240c6f05dc..c3e26855dfe01 100644 --- a/clang/test/CodeGenOpenCL/blocks.cl +++ b/clang/test/CodeGenOpenCL/blocks.cl @@ -35,31 +35,23 @@ void foo(){ // SPIR: %[[block_captured:.*]] = getelementptr inbounds <{ i32, i32, i8 addrspace(4)*, i32 }>, <{ i32, i32, i8 addrspace(4)*, i32 }>* %[[block]], i32 0, i32 3 // SPIR: %[[i_value:.*]] = load i32, i32* %i // SPIR: store i32 %[[i_value]], i32* %[[block_captured]], - // SPIR: %[[blk_ptr:.*]] = bitcast <{ i32, i32, i8 addrspace(4)*, i32 }>* %[[block]] to i32 ()* - // SPIR: %[[blk_gen_ptr:.*]] = addrspacecast i32 ()* %[[blk_ptr]] to i32 () addrspace(4)* - // SPIR: store i32 () addrspace(4)* %[[blk_gen_ptr]], i32 () addrspace(4)** %[[block_B:.*]], - // SPIR: %[[blk_gen_ptr:.*]] = load i32 () addrspace(4)*, i32 () addrspace(4)** %[[block_B]] - // SPIR: %[[block_literal:.*]] = bitcast i32 () addrspace(4)* %[[blk_gen_ptr]] to %struct.__opencl_block_literal_generic addrspace(4)* - // SPIR: %[[invoke_addr:.*]] = getelementptr inbounds %struct.__opencl_block_literal_generic, %struct.__opencl_block_literal_generic addrspace(4)* %[[block_literal]], i32 0, i32 2 + // SPIR: %[[blk_ptr:.*]] = bitcast <{ i32, i32, i8 addrspace(4)*, i32 }>* %[[block]] to %struct.__opencl_block_literal_generic* + // SPIR: %[[blk_gen_ptr:.*]] = addrspacecast %struct.__opencl_block_literal_generic* %[[blk_ptr]] to %struct.__opencl_block_literal_generic addrspace(4)* + // SPIR: store %struct.__opencl_block_literal_generic addrspace(4)* %[[blk_gen_ptr]], %struct.__opencl_block_literal_generic addrspace(4)** %[[block_B:.*]], + // SPIR: %[[block_literal:.*]] = load %struct.__opencl_block_literal_generic addrspace(4)*, %struct.__opencl_block_literal_generic addrspace(4)** %[[block_B]] // SPIR: %[[blk_gen_ptr:.*]] = bitcast %struct.__opencl_block_literal_generic addrspace(4)* %[[block_literal]] to i8 addrspace(4)* - // SPIR: %[[invoke_func_ptr:.*]] = load i8 addrspace(4)*, i8 addrspace(4)* addrspace(4)* %[[invoke_addr]] - // SPIR: %[[invoke_func:.*]] = addrspacecast i8 addrspace(4)* %[[invoke_func_ptr]] to i32 (i8 addrspace(4)*)* - // SPIR: call {{.*}}i32 %[[invoke_func]](i8 addrspace(4)* %[[blk_gen_ptr]]) + // SPIR: call {{.*}}i32 @__foo_block_invoke(i8 addrspace(4)* %[[blk_gen_ptr]]) // AMDGCN: %[[block_invoke:.*]] = getelementptr inbounds <{ i32, i32, i8*, i32 }>, <{ i32, i32, i8*, i32 }> addrspace(5)* %[[block:.*]], i32 0, i32 2 // AMDGCN: store i8* bitcast (i32 (i8*)* @__foo_block_invoke to i8*), i8* addrspace(5)* %[[block_invoke]] // AMDGCN: %[[block_captured:.*]] = getelementptr inbounds <{ i32, i32, i8*, i32 }>, <{ i32, i32, i8*, i32 }> addrspace(5)* %[[block]], i32 0, i32 3 // AMDGCN: %[[i_value:.*]] = load i32, i32 addrspace(5)* %i // AMDGCN: store i32 %[[i_value]], i32 addrspace(5)* %[[block_captured]], - // AMDGCN: %[[blk_ptr:.*]] = bitcast <{ i32, i32, i8*, i32 }> addrspace(5)* %[[block]] to i32 () addrspace(5)* - // AMDGCN: %[[blk_gen_ptr:.*]] = addrspacecast i32 () addrspace(5)* %[[blk_ptr]] to i32 ()* - // AMDGCN: store i32 ()* %[[blk_gen_ptr]], i32 ()* addrspace(5)* %[[block_B:.*]], - // AMDGCN: %[[blk_gen_ptr:.*]] = load i32 ()*, i32 ()* addrspace(5)* %[[block_B]] - // AMDGCN: %[[block_literal:.*]] = bitcast i32 ()* %[[blk_gen_ptr]] to %struct.__opencl_block_literal_generic* - // AMDGCN: %[[invoke_addr:.*]] = getelementptr inbounds %struct.__opencl_block_literal_generic, %struct.__opencl_block_literal_generic* %[[block_literal]], i32 0, i32 2 + // AMDGCN: %[[blk_ptr:.*]] = bitcast <{ i32, i32, i8*, i32 }> addrspace(5)* %[[block]] to %struct.__opencl_block_literal_generic addrspace(5)* + // AMDGCN: %[[blk_gen_ptr:.*]] = addrspacecast %struct.__opencl_block_literal_generic addrspace(5)* %[[blk_ptr]] to %struct.__opencl_block_literal_generic* + // AMDGCN: store %struct.__opencl_block_literal_generic* %[[blk_gen_ptr]], %struct.__opencl_block_literal_generic* addrspace(5)* %[[block_B:.*]], + // AMDGCN: %[[block_literal:.*]] = load %struct.__opencl_block_literal_generic*, %struct.__opencl_block_literal_generic* addrspace(5)* %[[block_B]] // AMDGCN: %[[blk_gen_ptr:.*]] = bitcast %struct.__opencl_block_literal_generic* %[[block_literal]] to i8* - // AMDGCN: %[[invoke_func_ptr:.*]] = load i8*, i8** %[[invoke_addr]] - // AMDGCN: %[[invoke_func:.*]] = bitcast i8* %[[invoke_func_ptr]] to i32 (i8*)* - // AMDGCN: call {{.*}}i32 %[[invoke_func]](i8* %[[blk_gen_ptr]]) + // AMDGCN: call {{.*}}i32 @__foo_block_invoke(i8* %[[blk_gen_ptr]]) int (^ block_B)(void) = ^{ return i; @@ -98,6 +90,12 @@ int get42() { return blockArgFunc(^{return 42;}); } +// COMMON-LABEL: define {{.*}}@call_block +// call {{.*}}@__call_block_block_invoke +int call_block() { + return ^int(int num) { return num; } (11); +} + // CHECK-DEBUG: !DIDerivedType(tag: DW_TAG_member, name: "__size" // CHECK-DEBUG: !DIDerivedType(tag: DW_TAG_member, name: "__align" diff --git a/clang/test/CodeGenOpenCL/builtins-amdgcn-dl-insts-err.cl b/clang/test/CodeGenOpenCL/builtins-amdgcn-dl-insts-err.cl index e2c03a471baae..a82fcbd758db4 100644 --- a/clang/test/CodeGenOpenCL/builtins-amdgcn-dl-insts-err.cl +++ b/clang/test/CodeGenOpenCL/builtins-amdgcn-dl-insts-err.cl @@ -12,24 +12,24 @@ kernel void builtins_amdgcn_dl_insts_err( half2 v2hA, half2 v2hB, float fC, short2 v2ssA, short2 v2ssB, int siA, int siB, int siC, ushort2 v2usA, ushort2 v2usB, uint uiA, uint uiB, uint uiC) { - fOut[0] = __builtin_amdgcn_fdot2(v2hA, v2hB, fC, false); // expected-error {{'__builtin_amdgcn_fdot2' needs target feature dot-insts}} - fOut[1] = __builtin_amdgcn_fdot2(v2hA, v2hB, fC, true); // expected-error {{'__builtin_amdgcn_fdot2' needs target feature dot-insts}} + fOut[0] = __builtin_amdgcn_fdot2(v2hA, v2hB, fC, false); // expected-error {{'__builtin_amdgcn_fdot2' needs target feature dot2-insts}} + fOut[1] = __builtin_amdgcn_fdot2(v2hA, v2hB, fC, true); // expected-error {{'__builtin_amdgcn_fdot2' needs target feature dot2-insts}} - siOut[0] = __builtin_amdgcn_sdot2(v2ssA, v2ssB, siC, false); // expected-error {{'__builtin_amdgcn_sdot2' needs target feature dot-insts}} - siOut[1] = __builtin_amdgcn_sdot2(v2ssA, v2ssB, siC, true); // expected-error {{'__builtin_amdgcn_sdot2' needs target feature dot-insts}} + siOut[0] = __builtin_amdgcn_sdot2(v2ssA, v2ssB, siC, false); // expected-error {{'__builtin_amdgcn_sdot2' needs target feature dot2-insts}} + siOut[1] = __builtin_amdgcn_sdot2(v2ssA, v2ssB, siC, true); // expected-error {{'__builtin_amdgcn_sdot2' needs target feature dot2-insts}} - uiOut[0] = __builtin_amdgcn_udot2(v2usA, v2usB, uiC, false); // expected-error {{'__builtin_amdgcn_udot2' needs target feature dot-insts}} - uiOut[1] = __builtin_amdgcn_udot2(v2usA, v2usB, uiC, true); // expected-error {{'__builtin_amdgcn_udot2' needs target feature dot-insts}} + uiOut[0] = __builtin_amdgcn_udot2(v2usA, v2usB, uiC, false); // expected-error {{'__builtin_amdgcn_udot2' needs target feature dot2-insts}} + uiOut[1] = __builtin_amdgcn_udot2(v2usA, v2usB, uiC, true); // expected-error {{'__builtin_amdgcn_udot2' needs target feature dot2-insts}} - siOut[2] = __builtin_amdgcn_sdot4(siA, siB, siC, false); // expected-error {{'__builtin_amdgcn_sdot4' needs target feature dot-insts}} - siOut[3] = __builtin_amdgcn_sdot4(siA, siB, siC, true); // expected-error {{'__builtin_amdgcn_sdot4' needs target feature dot-insts}} + siOut[2] = __builtin_amdgcn_sdot4(siA, siB, siC, false); // expected-error {{'__builtin_amdgcn_sdot4' needs target feature dot1-insts}} + siOut[3] = __builtin_amdgcn_sdot4(siA, siB, siC, true); // expected-error {{'__builtin_amdgcn_sdot4' needs target feature dot1-insts}} - uiOut[2] = __builtin_amdgcn_udot4(uiA, uiB, uiC, false); // expected-error {{'__builtin_amdgcn_udot4' needs target feature dot-insts}} - uiOut[3] = __builtin_amdgcn_udot4(uiA, uiB, uiC, true); // expected-error {{'__builtin_amdgcn_udot4' needs target feature dot-insts}} + uiOut[2] = __builtin_amdgcn_udot4(uiA, uiB, uiC, false); // expected-error {{'__builtin_amdgcn_udot4' needs target feature dot2-insts}} + uiOut[3] = __builtin_amdgcn_udot4(uiA, uiB, uiC, true); // expected-error {{'__builtin_amdgcn_udot4' needs target feature dot2-insts}} - siOut[4] = __builtin_amdgcn_sdot8(siA, siB, siC, false); // expected-error {{'__builtin_amdgcn_sdot8' needs target feature dot-insts}} - siOut[5] = __builtin_amdgcn_sdot8(siA, siB, siC, true); // expected-error {{'__builtin_amdgcn_sdot8' needs target feature dot-insts}} + siOut[4] = __builtin_amdgcn_sdot8(siA, siB, siC, false); // expected-error {{'__builtin_amdgcn_sdot8' needs target feature dot1-insts}} + siOut[5] = __builtin_amdgcn_sdot8(siA, siB, siC, true); // expected-error {{'__builtin_amdgcn_sdot8' needs target feature dot1-insts}} - uiOut[4] = __builtin_amdgcn_udot8(uiA, uiB, uiC, false); // expected-error {{'__builtin_amdgcn_udot8' needs target feature dot-insts}} - uiOut[5] = __builtin_amdgcn_udot8(uiA, uiB, uiC, true); // expected-error {{'__builtin_amdgcn_udot8' needs target feature dot-insts}} + uiOut[4] = __builtin_amdgcn_udot8(uiA, uiB, uiC, false); // expected-error {{'__builtin_amdgcn_udot8' needs target feature dot2-insts}} + uiOut[5] = __builtin_amdgcn_udot8(uiA, uiB, uiC, true); // expected-error {{'__builtin_amdgcn_udot8' needs target feature dot2-insts}} } diff --git a/clang/test/CodeGenOpenCL/cl20-device-side-enqueue.cl b/clang/test/CodeGenOpenCL/cl20-device-side-enqueue.cl index 473219478a2f3..11e49e0df3586 100644 --- a/clang/test/CodeGenOpenCL/cl20-device-side-enqueue.cl +++ b/clang/test/CodeGenOpenCL/cl20-device-side-enqueue.cl @@ -11,7 +11,7 @@ typedef struct {int a;} ndrange_t; // For a block global variable, first emit the block literal as a global variable, then emit the block variable itself. // COMMON: [[BL_GLOBAL:@__block_literal_global[^ ]*]] = internal addrspace(1) constant { i32, i32, i8 addrspace(4)* } { i32 {{[0-9]+}}, i32 {{[0-9]+}}, i8 addrspace(4)* addrspacecast (i8* bitcast (void (i8 addrspace(4)*, i8 addrspace(3)*)* [[INV_G:@[^ ]+]] to i8*) to i8 addrspace(4)*) } -// COMMON: @block_G = addrspace(1) constant void (i8 addrspace(3)*) addrspace(4)* addrspacecast (void (i8 addrspace(3)*) addrspace(1)* bitcast ({ i32, i32, i8 addrspace(4)* } addrspace(1)* [[BL_GLOBAL]] to void (i8 addrspace(3)*) addrspace(1)*) to void (i8 addrspace(3)*) addrspace(4)*) +// COMMON: @block_G = addrspace(1) constant %struct.__opencl_block_literal_generic addrspace(4)* addrspacecast (%struct.__opencl_block_literal_generic addrspace(1)* bitcast ({ i32, i32, i8 addrspace(4)* } addrspace(1)* [[BL_GLOBAL]] to %struct.__opencl_block_literal_generic addrspace(1)*) to %struct.__opencl_block_literal_generic addrspace(4)*) // For anonymous blocks without captures, emit block literals as global variable. // COMMON: [[BLG1:@__block_literal_global[^ ]*]] = internal addrspace(1) constant { i32, i32, i8 addrspace(4)* } { i32 {{[0-9]+}}, i32 {{[0-9]+}}, i8 addrspace(4)* addrspacecast (i8* bitcast (void (i8 addrspace(4)*, i8 addrspace(3)*)* {{@[^ ]+}} to i8*) to i8 addrspace(4)*) } @@ -77,9 +77,9 @@ kernel void device_side_enqueue(global int *a, global int *b, int i) { // COMMON: [[DEF_Q:%[0-9]+]] = load %opencl.queue_t{{.*}}*, %opencl.queue_t{{.*}}** %default_queue // COMMON: [[FLAGS:%[0-9]+]] = load i32, i32* %flags // COMMON: store i8 addrspace(4)* addrspacecast (i8* bitcast (void (i8 addrspace(4)*)* [[INVL1:@__device_side_enqueue_block_invoke[^ ]*]] to i8*) to i8 addrspace(4)*), i8 addrspace(4)** %block.invoke - // B32: [[BL:%[0-9]+]] = bitcast <{ i32, i32, i8 addrspace(4)*, i32 addrspace(1)*, i32, i32 addrspace(1)* }>* %block to void ()* - // B64: [[BL:%[0-9]+]] = bitcast <{ i32, i32, i8 addrspace(4)*, i32 addrspace(1)*, i32 addrspace(1)*, i32 }>* %block to void ()* - // COMMON: [[BL_I8:%[0-9]+]] = addrspacecast void ()* [[BL]] to i8 addrspace(4)* + // B32: [[BL:%[0-9]+]] = bitcast <{ i32, i32, i8 addrspace(4)*, i32 addrspace(1)*, i32, i32 addrspace(1)* }>* %block to %struct.__opencl_block_literal_generic* + // B64: [[BL:%[0-9]+]] = bitcast <{ i32, i32, i8 addrspace(4)*, i32 addrspace(1)*, i32 addrspace(1)*, i32 }>* %block to %struct.__opencl_block_literal_generic* + // COMMON: [[BL_I8:%[0-9]+]] = addrspacecast %struct.__opencl_block_literal_generic* [[BL]] to i8 addrspace(4)* // COMMON-LABEL: call i32 @__enqueue_kernel_basic( // COMMON-SAME: %opencl.queue_t{{.*}}* [[DEF_Q]], i32 [[FLAGS]], %struct.ndrange_t* byval [[NDR]]{{([0-9]+)?}}, // COMMON-SAME: i8 addrspace(4)* addrspacecast (i8* bitcast ({{.*}} [[INVLK1:[^ ]+_kernel]] to i8*) to i8 addrspace(4)*), @@ -95,8 +95,8 @@ kernel void device_side_enqueue(global int *a, global int *b, int i) { // COMMON: [[WAIT_EVNT:%[0-9]+]] = addrspacecast %opencl.clk_event_t{{.*}}** %event_wait_list to %opencl.clk_event_t{{.*}}* addrspace(4)* // COMMON: [[EVNT:%[0-9]+]] = addrspacecast %opencl.clk_event_t{{.*}}** %clk_event to %opencl.clk_event_t{{.*}}* addrspace(4)* // COMMON: store i8 addrspace(4)* addrspacecast (i8* bitcast (void (i8 addrspace(4)*)* [[INVL2:@__device_side_enqueue_block_invoke[^ ]*]] to i8*) to i8 addrspace(4)*), i8 addrspace(4)** %block.invoke - // COMMON: [[BL:%[0-9]+]] = bitcast <{ i32, i32, i8 addrspace(4)*, i32{{.*}}, i32{{.*}}, i32{{.*}} }>* %block3 to void ()* - // COMMON: [[BL_I8:%[0-9]+]] = addrspacecast void ()* [[BL]] to i8 addrspace(4)* + // COMMON: [[BL:%[0-9]+]] = bitcast <{ i32, i32, i8 addrspace(4)*, i32{{.*}}, i32{{.*}}, i32{{.*}} }>* %block3 to %struct.__opencl_block_literal_generic* + // COMMON: [[BL_I8:%[0-9]+]] = addrspacecast %struct.__opencl_block_literal_generic* [[BL]] to i8 addrspace(4)* // COMMON-LABEL: call i32 @__enqueue_kernel_basic_events // COMMON-SAME: (%opencl.queue_t{{.*}}* [[DEF_Q]], i32 [[FLAGS]], %struct.ndrange_t* {{.*}}, i32 2, %opencl.clk_event_t{{.*}}* addrspace(4)* [[WAIT_EVNT]], %opencl.clk_event_t{{.*}}* addrspace(4)* [[EVNT]], // COMMON-SAME: i8 addrspace(4)* addrspacecast (i8* bitcast ({{.*}} [[INVLK2:[^ ]+_kernel]] to i8*) to i8 addrspace(4)*), @@ -165,7 +165,7 @@ kernel void device_side_enqueue(global int *a, global int *b, int i) { // Emits global block literal [[BLG3]] and block kernel [[INVGK3]]. // COMMON: [[DEF_Q:%[0-9]+]] = load %opencl.queue_t{{.*}}*, %opencl.queue_t{{.*}}** %default_queue // COMMON: [[FLAGS:%[0-9]+]] = load i32, i32* %flags - // COMMON: [[AD:%arraydecay[0-9]*]] = getelementptr inbounds [1 x %opencl.clk_event_t*], [1 x %opencl.clk_event_t*]* %event_wait_list2, i32 0, i32 0 + // COMMON: [[AD:%arraydecay[0-9]*]] = getelementptr inbounds [1 x %opencl.clk_event_t*], [1 x %opencl.clk_event_t*]* %event_wait_list2, i{{32|64}} 0, i{{32|64}} 0 // COMMON: [[WAIT_EVNT:%[0-9]+]] = addrspacecast %opencl.clk_event_t{{.*}}** [[AD]] to %opencl.clk_event_t{{.*}}* addrspace(4)* // COMMON: [[EVNT:%[0-9]+]] = addrspacecast %opencl.clk_event_t{{.*}}** %clk_event to %opencl.clk_event_t{{.*}}* addrspace(4)* // CHECK-LIFETIMES: [[LIFETIME_PTR:%[0-9]+]] = bitcast [1 x i64]* %[[BLOCK_SIZES3]] to i8* @@ -192,7 +192,7 @@ kernel void device_side_enqueue(global int *a, global int *b, int i) { // Emits global block literal [[BLG4]] and block kernel [[INVGK4]]. // COMMON: [[DEF_Q:%[0-9]+]] = load %opencl.queue_t{{.*}}*, %opencl.queue_t{{.*}}** %default_queue // COMMON: [[FLAGS:%[0-9]+]] = load i32, i32* %flags - // COMMON: [[AD:%arraydecay[0-9]*]] = getelementptr inbounds [1 x %opencl.clk_event_t*], [1 x %opencl.clk_event_t*]* %event_wait_list2, i32 0, i32 0 + // COMMON: [[AD:%arraydecay[0-9]*]] = getelementptr inbounds [1 x %opencl.clk_event_t*], [1 x %opencl.clk_event_t*]* %event_wait_list2, i{{32|64}} 0, i{{32|64}} 0 // COMMON: [[WAIT_EVNT:%[0-9]+]] = addrspacecast %opencl.clk_event_t{{.*}}** [[AD]] to %opencl.clk_event_t{{.*}}* addrspace(4)* // COMMON: [[EVNT:%[0-9]+]] = addrspacecast %opencl.clk_event_t{{.*}}** %clk_event to %opencl.clk_event_t{{.*}}* addrspace(4)* // CHECK-LIFETIMES: [[LIFETIME_PTR:%[0-9]+]] = bitcast [1 x i64]* %[[BLOCK_SIZES4]] to i8* @@ -300,21 +300,19 @@ kernel void device_side_enqueue(global int *a, global int *b, int i) { // Emits global block literal [[BLG8]] and invoke function [[INVG8]]. // The full type of these expressions are long (and repeated elsewhere), so we // capture it as part of the regex for convenience and clarity. - // COMMON: store void () addrspace(4)* addrspacecast (void () addrspace(1)* bitcast ({ i32, i32, i8 addrspace(4)* } addrspace(1)* [[BLG8]] to void () addrspace(1)*) to void () addrspace(4)*), void () addrspace(4)** %block_A + // COMMON: store %struct.__opencl_block_literal_generic addrspace(4)* addrspacecast (%struct.__opencl_block_literal_generic addrspace(1)* bitcast ({ i32, i32, i8 addrspace(4)* } addrspace(1)* [[BLG8]] to %struct.__opencl_block_literal_generic addrspace(1)*) to %struct.__opencl_block_literal_generic addrspace(4)*), %struct.__opencl_block_literal_generic addrspace(4)** %block_A void (^const block_A)(void) = ^{ return; }; // Emits global block literal [[BLG9]] and invoke function [[INVG9]]. - // COMMON: store void (i8 addrspace(3)*) addrspace(4)* addrspacecast (void (i8 addrspace(3)*) addrspace(1)* bitcast ({ i32, i32, i8 addrspace(4)* } addrspace(1)* [[BLG9]] to void (i8 addrspace(3)*) addrspace(1)*) to void (i8 addrspace(3)*) addrspace(4)*), void (i8 addrspace(3)*) addrspace(4)** %block_B + // COMMON: store %struct.__opencl_block_literal_generic addrspace(4)* addrspacecast (%struct.__opencl_block_literal_generic addrspace(1)* bitcast ({ i32, i32, i8 addrspace(4)* } addrspace(1)* [[BLG9]] to %struct.__opencl_block_literal_generic addrspace(1)*) to %struct.__opencl_block_literal_generic addrspace(4)*), %struct.__opencl_block_literal_generic addrspace(4)** %block_B void (^const block_B)(local void *) = ^(local void *a) { return; }; // Uses global block literal [[BLG8]] and invoke function [[INVG8]]. - // COMMON: [[r1:%.*]] = load i8 addrspace(4)*, i8 addrspace(4)* addrspace(4)* getelementptr inbounds (%struct.__opencl_block_literal_generic, %struct.__opencl_block_literal_generic addrspace(4)* addrspacecast (%struct.__opencl_block_literal_generic addrspace(1)* bitcast ({ i32, i32, i8 addrspace(4)* } addrspace(1)* [[BLG8]] to %struct.__opencl_block_literal_generic addrspace(1)*) to %struct.__opencl_block_literal_generic addrspace(4)*), i32 0, i32 2) - // COMMON: [[r2:%.*]] = addrspacecast i8 addrspace(4)* [[r1]] to void (i8 addrspace(4)*)* - // COMMON: call spir_func void [[r2]](i8 addrspace(4)* addrspacecast (i8 addrspace(1)* bitcast ({ i32, i32, i8 addrspace(4)* } addrspace(1)* [[BLG8]] to i8 addrspace(1)*) to i8 addrspace(4)*)) + // COMMON: call spir_func void @__device_side_enqueue_block_invoke_11(i8 addrspace(4)* addrspacecast (i8 addrspace(1)* bitcast ({ i32, i32, i8 addrspace(4)* } addrspace(1)* [[BLG8]] to i8 addrspace(1)*) to i8 addrspace(4)*)) block_A(); // Emits global block literal [[BLG8]] and block kernel [[INVGK8]]. [[INVGK8]] calls [[INVG8]]. @@ -333,20 +331,40 @@ kernel void device_side_enqueue(global int *a, global int *b, int i) { unsigned size = get_kernel_work_group_size(block_A); // Uses global block literal [[BLG8]] and invoke function [[INVG8]]. Make sure no redundant block literal and invoke functions are emitted. - // COMMON: [[r1:%.*]] = load i8 addrspace(4)*, i8 addrspace(4)* addrspace(4)* getelementptr inbounds (%struct.__opencl_block_literal_generic, %struct.__opencl_block_literal_generic addrspace(4)* addrspacecast (%struct.__opencl_block_literal_generic addrspace(1)* bitcast ({ i32, i32, i8 addrspace(4)* } addrspace(1)* [[BLG8]] to %struct.__opencl_block_literal_generic addrspace(1)*) to %struct.__opencl_block_literal_generic addrspace(4)*), i32 0, i32 2) - // COMMON: [[r2:%.*]] = addrspacecast i8 addrspace(4)* [[r1]] to void (i8 addrspace(4)*)* - // COMMON: call spir_func void [[r2]](i8 addrspace(4)* addrspacecast (i8 addrspace(1)* bitcast ({ i32, i32, i8 addrspace(4)* } addrspace(1)* [[BLG8]] to i8 addrspace(1)*) to i8 addrspace(4)*)) + // COMMON: call spir_func void @__device_side_enqueue_block_invoke_11(i8 addrspace(4)* addrspacecast (i8 addrspace(1)* bitcast ({ i32, i32, i8 addrspace(4)* } addrspace(1)* [[BLG8]] to i8 addrspace(1)*) to i8 addrspace(4)*)) block_A(); + // Make sure that block invoke function is resolved correctly after sequence of assignements. + // COMMON: store %struct.__opencl_block_literal_generic addrspace(4)* + // COMMON-SAME: addrspacecast (%struct.__opencl_block_literal_generic addrspace(1)* + // COMMON-SAME: bitcast ({ i32, i32, i8 addrspace(4)* } addrspace(1)* [[BL_GLOBAL]] to %struct.__opencl_block_literal_generic addrspace(1)*) + // COMMON-SAME: to %struct.__opencl_block_literal_generic addrspace(4)*), + // COMMON-SAME: %struct.__opencl_block_literal_generic addrspace(4)** %b1, + bl_t b1 = block_G; + // COMMON: store %struct.__opencl_block_literal_generic addrspace(4)* + // COMMON-SAME: addrspacecast (%struct.__opencl_block_literal_generic addrspace(1)* + // COMMON-SAME: bitcast ({ i32, i32, i8 addrspace(4)* } addrspace(1)* [[BL_GLOBAL]] to %struct.__opencl_block_literal_generic addrspace(1)*) + // COMMON-SAME: to %struct.__opencl_block_literal_generic addrspace(4)*), + // COMMON-SAME: %struct.__opencl_block_literal_generic addrspace(4)** %b2, + bl_t b2 = b1; + // COMMON: call spir_func void @block_G_block_invoke(i8 addrspace(4)* addrspacecast (i8 addrspace(1)* + // COMMON-SAME: bitcast ({ i32, i32, i8 addrspace(4)* } addrspace(1)* [[BL_GLOBAL]] to i8 addrspace(1)*) + // COOMON-SAME: to i8 addrspace(4)*), i8 addrspace(3)* null) + b2(0); + // Uses global block literal [[BL_GLOBAL]] and block kernel [[INV_G_K]]. [[INV_G_K]] calls [[INV_G]]. + // COMMON: call i32 @__get_kernel_preferred_work_group_size_multiple_impl( + // COMMON-SAME: i8 addrspace(4)* addrspacecast (i8* bitcast ({{.*}} [[INV_G_K:[^ ]+_kernel]] to i8*) to i8 addrspace(4)*), + // COMMON-SAME: i8 addrspace(4)* addrspacecast (i8 addrspace(1)* bitcast ({ i32, i32, i8 addrspace(4)* } addrspace(1)* [[BL_GLOBAL]] to i8 addrspace(1)*) to i8 addrspace(4)*)) + size = get_kernel_preferred_work_group_size_multiple(b2); + void (^block_C)(void) = ^{ callee(i, a); }; - // Emits block literal on stack and block kernel [[INVLK3]]. // COMMON: store i8 addrspace(4)* addrspacecast (i8* bitcast (void (i8 addrspace(4)*)* [[INVL3:@__device_side_enqueue_block_invoke[^ ]*]] to i8*) to i8 addrspace(4)*), i8 addrspace(4)** %block.invoke // COMMON: [[DEF_Q:%[0-9]+]] = load %opencl.queue_t{{.*}}*, %opencl.queue_t{{.*}}** %default_queue // COMMON: [[FLAGS:%[0-9]+]] = load i32, i32* %flags - // COMMON: [[BL_I8:%[0-9]+]] = addrspacecast void ()* {{.*}} to i8 addrspace(4)* + // COMMON: [[BL_I8:%[0-9]+]] = addrspacecast %struct.__opencl_block_literal_generic* {{.*}} to i8 addrspace(4)* // COMMON-LABEL: call i32 @__enqueue_kernel_basic( // COMMON-SAME: %opencl.queue_t{{.*}}* [[DEF_Q]], i32 [[FLAGS]], %struct.ndrange_t* byval [[NDR]]{{([0-9]+)?}}, // COMMON-SAME: i8 addrspace(4)* addrspacecast (i8* bitcast ({{.*}} [[INVLK3:[^ ]+_kernel]] to i8*) to i8 addrspace(4)*), @@ -404,8 +422,8 @@ kernel void device_side_enqueue(global int *a, global int *b, int i) { // COMMON: define internal spir_func void [[INVG8]](i8 addrspace(4)*{{.*}}) // COMMON: define internal spir_func void [[INVG9]](i8 addrspace(4)*{{.*}}, i8 addrspace(3)* %{{.*}}) // COMMON: define internal spir_kernel void [[INVGK8]](i8 addrspace(4)*{{.*}}) +// COMMON: define internal spir_kernel void [[INV_G_K]](i8 addrspace(4)*{{.*}}, i8 addrspace(3)*{{.*}}) // COMMON: define internal spir_kernel void [[INVLK3]](i8 addrspace(4)*{{.*}}) // COMMON: define internal spir_kernel void [[INVGK9]](i8 addrspace(4)*{{.*}}, i8 addrspace(3)*{{.*}}) -// COMMON: define internal spir_kernel void [[INV_G_K]](i8 addrspace(4)*{{.*}}, i8 addrspace(3)*{{.*}}) // COMMON: define internal spir_kernel void [[INVGK10]](i8 addrspace(4)*{{.*}}) // COMMON: define internal spir_kernel void [[INVGK11]](i8 addrspace(4)*{{.*}}) diff --git a/clang/test/CodeGenOpenCL/constant-addr-space-globals.cl b/clang/test/CodeGenOpenCL/constant-addr-space-globals.cl index 5fcf117dde33c..47e180c690684 100644 --- a/clang/test/CodeGenOpenCL/constant-addr-space-globals.cl +++ b/clang/test/CodeGenOpenCL/constant-addr-space-globals.cl @@ -26,6 +26,6 @@ kernel void k(void) { constant int var1 = 1; - // CHECK: call spir_func void @foo(i32 addrspace(2)* @k.var1, i32 addrspace(2)* getelementptr inbounds ([3 x i32], [3 x i32] addrspace(2)* @k.arr1, i32 0, i32 0) + // CHECK: call spir_func void @foo(i32 addrspace(2)* @k.var1, i32 addrspace(2)* getelementptr inbounds ([3 x i32], [3 x i32] addrspace(2)* @k.arr1, i64 0, i64 0) foo(&var1, arr1, arr2, arr3); } diff --git a/clang/test/CodeGenOpenCL/images.cl b/clang/test/CodeGenOpenCL/images.cl index eb054eceb5df0..baa9197847060 100644 --- a/clang/test/CodeGenOpenCL/images.cl +++ b/clang/test/CodeGenOpenCL/images.cl @@ -1,4 +1,5 @@ // RUN: %clang_cc1 %s -triple x86_64-unknown-linux-gnu -O0 -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 %s -triple x86_64-unknown-linux-gnu -O0 -emit-llvm -o - -cl-std=c++ | FileCheck %s __attribute__((overloadable)) void read_image(read_only image1d_t img_ro); __attribute__((overloadable)) void read_image(write_only image1d_t img_wo); diff --git a/clang/test/CodeGenOpenCL/visibility.cl b/clang/test/CodeGenOpenCL/visibility.cl new file mode 100644 index 0000000000000..e2ad50d58b51a --- /dev/null +++ b/clang/test/CodeGenOpenCL/visibility.cl @@ -0,0 +1,77 @@ +// RUN: %clang_cc1 -std=cl2.0 -fapply-global-visibility-to-externs -fvisibility default -triple amdgcn-unknown-unknown -S -emit-llvm -o - %s | FileCheck --check-prefix=FVIS-DEFAULT %s +// RUN: %clang_cc1 -std=cl2.0 -fapply-global-visibility-to-externs -fvisibility protected -triple amdgcn-unknown-unknown -S -emit-llvm -o - %s | FileCheck --check-prefix=FVIS-PROTECTED %s +// RUN: %clang_cc1 -std=cl2.0 -fapply-global-visibility-to-externs -fvisibility hidden -triple amdgcn-unknown-unknown -S -emit-llvm -o - %s | FileCheck --check-prefix=FVIS-HIDDEN %s + +// REQUIRES: amdgpu-registered-target + +// FVIS-DEFAULT: @glob = local_unnamed_addr +// FVIS-PROTECTED: @glob = protected local_unnamed_addr +// FVIS-HIDDEN: @glob = hidden local_unnamed_addr +int glob = 0; +// FVIS-DEFAULT: @glob_hidden = hidden local_unnamed_addr +// FVIS-PROTECTED: @glob_hidden = hidden local_unnamed_addr +// FVIS-HIDDEN: @glob_hidden = hidden local_unnamed_addr +__attribute__((visibility("hidden"))) int glob_hidden = 0; +// FVIS-DEFAULT: @glob_protected = protected local_unnamed_addr +// FVIS-PROTECTED: @glob_protected = protected local_unnamed_addr +// FVIS-HIDDEN: @glob_protected = protected local_unnamed_addr +__attribute__((visibility("protected"))) int glob_protected = 0; +// FVIS-DEFAULT: @glob_default = local_unnamed_addr +// FVIS-PROTECTED: @glob_default = local_unnamed_addr +// FVIS-HIDDEN: @glob_default = local_unnamed_addr +__attribute__((visibility("default"))) int glob_default = 0; + +// FVIS-DEFAULT: @ext = external local_unnamed_addr +// FVIS-PROTECTED: @ext = external protected local_unnamed_addr +// FVIS-HIDDEN: @ext = external hidden local_unnamed_addr +extern int ext; +// FVIS-DEFAULT: @ext_hidden = external hidden local_unnamed_addr +// FVIS-PROTECTED: @ext_hidden = external hidden local_unnamed_addr +// FVIS-HIDDEN: @ext_hidden = external hidden local_unnamed_addr +__attribute__((visibility("hidden"))) extern int ext_hidden; +// FVIS-DEFAULT: @ext_protected = external protected local_unnamed_addr +// FVIS-PROTECTED: @ext_protected = external protected local_unnamed_addr +// FVIS-HIDDEN: @ext_protected = external protected local_unnamed_addr +__attribute__((visibility("protected"))) extern int ext_protected; +// FVIS-DEFAULT: @ext_default = external local_unnamed_addr +// FVIS-PROTECTED: @ext_default = external local_unnamed_addr +// FVIS-HIDDEN: @ext_default = external local_unnamed_addr +__attribute__((visibility("default"))) extern int ext_default; + +// FVIS-DEFAULT: define amdgpu_kernel void @kern() +// FVIS-PROTECTED: define protected amdgpu_kernel void @kern() +// FVIS-HIDDEN: define protected amdgpu_kernel void @kern() +kernel void kern() {} +// FVIS-DEFAULT: define protected amdgpu_kernel void @kern_hidden() +// FVIS-PROTECTED: define protected amdgpu_kernel void @kern_hidden() +// FVIS-HIDDEN: define protected amdgpu_kernel void @kern_hidden() +__attribute__((visibility("hidden"))) kernel void kern_hidden() {} +// FVIS-DEFAULT: define protected amdgpu_kernel void @kern_protected() +// FVIS-PROTECTED: define protected amdgpu_kernel void @kern_protected() +// FVIS-HIDDEN: define protected amdgpu_kernel void @kern_protected() +__attribute__((visibility("protected"))) kernel void kern_protected() {} +// FVIS-DEFAULT: define amdgpu_kernel void @kern_default() +// FVIS-PROTECTED: define amdgpu_kernel void @kern_default() +// FVIS-HIDDEN: define amdgpu_kernel void @kern_default() +__attribute__((visibility("default"))) kernel void kern_default() {} + +// FVIS-DEFAULT: define void @func() +// FVIS-PROTECTED: define protected void @func() +// FVIS-HIDDEN: define hidden void @func() +void func() {} +// FVIS-DEFAULT: define hidden void @func_hidden() +// FVIS-PROTECTED: define hidden void @func_hidden() +// FVIS-HIDDEN: define hidden void @func_hidden() +__attribute__((visibility("hidden"))) void func_hidden() {} +// FVIS-DEFAULT: define protected void @func_protected() +// FVIS-PROTECTED: define protected void @func_protected() +// FVIS-HIDDEN: define protected void @func_protected() +__attribute__((visibility("protected"))) void func_protected() {} +// FVIS-DEFAULT: define void @func_default() +// FVIS-PROTECTED: define void @func_default() +// FVIS-HIDDEN: define void @func_default() +__attribute__((visibility("default"))) void func_default() {} + +void use() { + glob = ext + ext_hidden + ext_protected + ext_default; +} diff --git a/clang/test/CodeGenSPIRV/intel/is_valid_event.cl b/clang/test/CodeGenSPIRV/intel/is_valid_event.cl index a7d0dc5a59f8d..85d1bed597460 100644 --- a/clang/test/CodeGenSPIRV/intel/is_valid_event.cl +++ b/clang/test/CodeGenSPIRV/intel/is_valid_event.cl @@ -3,7 +3,8 @@ // Builtins must be declared as overloadable, so Clang mangles their names, // and LLVM-SPIRV translator can recognize them. -// RUN: %clang_cc1 %s -emit-spirv -triple spir-unknown-unknown -O0 -cl-std=CL2.0 -include opencl-c.h -o %t.spv +// RUN: %clang_cc1 %s -emit-llvm-bc -triple spir-unknown-unknown -O0 -cl-std=CL2.0 -include opencl-c.h -o %t.bc +// RUN: llvm-spirv %t.bc -o %t.spv // RUN: llvm-spirv -to-text %t.spv -o - | FileCheck %s // CHECK: CreateUserEvent diff --git a/clang/test/CodeGenSPIRV/intel/private-array-initialization.cl b/clang/test/CodeGenSPIRV/intel/private-array-initialization.cl index 25af17f00fe9c..2b3e49e127cd1 100644 --- a/clang/test/CodeGenSPIRV/intel/private-array-initialization.cl +++ b/clang/test/CodeGenSPIRV/intel/private-array-initialization.cl @@ -1,5 +1,6 @@ // RUN: %clang_cc1 %s -triple spir-unknown-unknown -O0 -emit-llvm -o - | FileCheck %s --check-prefix=CHECK-LLVM -// RUN: %clang_cc1 %s -triple spir-unknown-unknown -O0 -emit-spirv -o %t.spv +// RUN: %clang_cc1 %s -triple spir-unknown-unknown -O0 -emit-llvm-bc -o %t.bc +// RUN: llvm-spirv %t.bc -o %t.spv // RUN: llvm-spirv %t.spv -to-text -o - | FileCheck %s --check-prefix=CHECK-SPIRV // CHECK-LLVM: @__const.test.arr = private unnamed_addr addrspace(2) constant [3 x i32] [i32 1, i32 2, i32 3], align 4 diff --git a/clang/test/CodeGenSYCL/Inputs/sycl.hpp b/clang/test/CodeGenSYCL/Inputs/sycl.hpp index def0bb0b8d4a9..cffc9804eb507 100644 --- a/clang/test/CodeGenSYCL/Inputs/sycl.hpp +++ b/clang/test/CodeGenSYCL/Inputs/sycl.hpp @@ -64,9 +64,11 @@ class property_list { template property_list(propertyTN... props) {} - template bool has_property() const { return true; } + template + bool has_property() const { return true; } - template propertyT get_property() const { + template + propertyT get_property() const { return propertyT{}; } @@ -77,12 +79,14 @@ class property_list { template struct id { - template id(T...args) {} // fake constructor + template + id(T... args) {} // fake constructor }; template struct range { - template range(T...args) {} // fake constructor + template + range(T... args) {} // fake constructor }; template @@ -91,35 +95,36 @@ struct nd_range { template struct _ImplT { - range Range; - id Offset; + range AccessRange; + range MemRange; + id Offset; }; template - class accessor { - - public: - - void __init(__global dataT *Ptr, range Range, - id Offset) { - } - void use(void) const {} - template void use(T...args) { } - template void use(T...args) const { } - _ImplT __impl; + access::target accessTarget = access::target::global_buffer, + access::placeholder isPlaceholder = access::placeholder::false_t> +class accessor { +public: + void __init(__global dataT *Ptr, range AccessRange, + range MemRange, id Offset) {} + void use(void) const {} + template + void use(T... args) {} + template + void use(T... args) const {} + _ImplT __impl; }; class kernel {}; class context {}; class device {}; -class event{}; +class event {}; class queue { public: - template event submit(T cgf) { return event{}; } + template + event submit(T cgf) { return event{}; } void wait() {} void wait_and_throw() {} @@ -177,7 +182,8 @@ class buffer { using const_reference = const value_type &; using allocator_type = AllocatorT; - template buffer(ParamTypes...args) {} // fake constructor + template + buffer(ParamTypes... args) {} // fake constructor buffer(const range &bufferRange, const property_list &propList = {}) {} @@ -221,4 +227,3 @@ class buffer { } // namespace sycl } // namespace cl - diff --git a/clang/test/CodeGenSYCL/address-space-parameter-conversions.cpp b/clang/test/CodeGenSYCL/address-space-parameter-conversions.cpp index 00a665f4f87fb..671f781fc5242 100644 --- a/clang/test/CodeGenSYCL/address-space-parameter-conversions.cpp +++ b/clang/test/CodeGenSYCL/address-space-parameter-conversions.cpp @@ -1,147 +1,144 @@ // RUN: %clang_cc1 -triple spir64-unknown-linux-sycldevice -std=c++11 -fsycl-is-device -disable-llvm-passes -emit-llvm -x c++ %s -o - | opt -asfix -S -o - | FileCheck %s void bar(int & Data) {} -// CHECK: define spir_func void @[[RAW_REF:[a-zA-Z0-9_]+]](i32* dereferenceable(4) % +// CHECK-DAG: define spir_func void @[[RAW_REF:[a-zA-Z0-9_]+]](i32* dereferenceable(4) % void bar2(int & Data) {} -// CHECK: define spir_func void @[[RAW_REF2:[a-zA-Z0-9_]+]](i32* dereferenceable(4) % +// CHECK-DAG: define spir_func void @[[RAW_REF2:[a-zA-Z0-9_]+]](i32* dereferenceable(4) % void bar(__local int &Data) {} -// CHECK: define spir_func void [[LOC_REF:@[a-zA-Z0-9_]+]](i32 addrspace(3)* dereferenceable(4) % +// CHECK-DAG: define spir_func void [[LOC_REF:@[a-zA-Z0-9_]+]](i32 addrspace(3)* dereferenceable(4) % void foo(int * Data) {} -// CHECK: define spir_func void @[[RAW_PTR:[a-zA-Z0-9_]+]](i32* % +// CHECK-DAG: define spir_func void @[[RAW_PTR:[a-zA-Z0-9_]+]](i32* % void foo2(int * Data) {} -// CHECK: define spir_func void @[[RAW_PTR2:[a-zA-Z0-9_]+]](i32* % +// CHECK-DAG: define spir_func void @[[RAW_PTR2:[a-zA-Z0-9_]+]](i32* % void foo(__attribute__((address_space(3))) int * Data) {} -// CHECK: define spir_func void [[LOC_PTR:@[a-zA-Z0-9_]+]](i32 addrspace(3)* % +// CHECK-DAG: define spir_func void [[LOC_PTR:@[a-zA-Z0-9_]+]](i32 addrspace(3)* % template void tmpl(T t){} // See Check Lines below. void usages() { - // CHECK: [[GLOB:%[a-zA-Z0-9]+]] = alloca i32 addrspace(1)* + // CHECK-DAG: [[GLOB:%[a-zA-Z0-9]+]] = alloca i32 addrspace(1)* __attribute__((address_space(1))) int *GLOB; - // CHECK: [[LOC:%[a-zA-Z0-9]+]] = alloca i32 addrspace(3)* + // CHECK-DAG: [[LOC:%[a-zA-Z0-9]+]] = alloca i32 addrspace(3)* __local int *LOC; - // CHECK: [[NoAS:%[a-zA-Z0-9]+]] = alloca i32* + // CHECK-DAG: [[NoAS:%[a-zA-Z0-9]+]] = alloca i32* int *NoAS; bar(*GLOB); - // CHECK: [[GLOB_LOAD:%[a-zA-Z0-9]+]] = load i32 addrspace(1)*, i32 addrspace(1)** [[GLOB]] - // CHECK: [[GLOB_CAST:%[a-zA-Z0-9]+]] = addrspacecast i32 addrspace(1)* [[GLOB_LOAD]] to i32 addrspace(4)* - // CHECK: call spir_func void @new.[[RAW_REF]](i32 addrspace(4)* [[GLOB_CAST]]) + // CHECK-DAG: [[GLOB_LOAD:%[a-zA-Z0-9]+]] = load i32 addrspace(1)*, i32 addrspace(1)** [[GLOB]] + // CHECK-DAG: [[GLOB_CAST:%[a-zA-Z0-9]+]] = addrspacecast i32 addrspace(1)* [[GLOB_LOAD]] to i32 addrspace(4)* + // CHECK-DAG: call spir_func void @new.[[RAW_REF]](i32 addrspace(4)* [[GLOB_CAST]]) bar2(*GLOB); - // CHECK: [[GLOB_LOAD2:%[a-zA-Z0-9]+]] = load i32 addrspace(1)*, i32 addrspace(1)** [[GLOB]] - // CHECK: [[GLOB_CAST2:%[a-zA-Z0-9]+]] = addrspacecast i32 addrspace(1)* [[GLOB_LOAD2]] to i32 addrspace(4)* - // CHECK: call spir_func void @new.[[RAW_REF2]](i32 addrspace(4)* [[GLOB_CAST2]]) + // CHECK-DAG: [[GLOB_LOAD2:%[a-zA-Z0-9]+]] = load i32 addrspace(1)*, i32 addrspace(1)** [[GLOB]] + // CHECK-DAG: [[GLOB_CAST2:%[a-zA-Z0-9]+]] = addrspacecast i32 addrspace(1)* [[GLOB_LOAD2]] to i32 addrspace(4)* + // CHECK-DAG: call spir_func void @new.[[RAW_REF2]](i32 addrspace(4)* [[GLOB_CAST2]]) bar(*LOC); - // CHECK: [[LOC_LOAD:%[a-zA-Z0-9]+]] = load i32 addrspace(3)*, i32 addrspace(3)** [[LOC]] - // CHECK: call spir_func void [[LOC_REF]](i32 addrspace(3)* dereferenceable(4) [[LOC_LOAD]]) + // CHECK-DAG: [[LOC_LOAD:%[a-zA-Z0-9]+]] = load i32 addrspace(3)*, i32 addrspace(3)** [[LOC]] + // CHECK-DAG: call spir_func void [[LOC_REF]](i32 addrspace(3)* dereferenceable(4) [[LOC_LOAD]]) bar2(*LOC); - // CHECK: [[LOC_LOAD2:%[a-zA-Z0-9]+]] = load i32 addrspace(3)*, i32 addrspace(3)** [[LOC]] - // CHECK: [[LOC_CAST2:%[a-zA-Z0-9]+]] = addrspacecast i32 addrspace(3)* [[LOC_LOAD2]] to i32 addrspace(4)* - // CHECK: call spir_func void @new.[[RAW_REF2]](i32 addrspace(4)* [[LOC_CAST2]]) + // CHECK-DAG: [[LOC_LOAD2:%[a-zA-Z0-9]+]] = load i32 addrspace(3)*, i32 addrspace(3)** [[LOC]] + // CHECK-DAG: [[LOC_CAST2:%[a-zA-Z0-9]+]] = addrspacecast i32 addrspace(3)* [[LOC_LOAD2]] to i32 addrspace(4)* + // CHECK-DAG: call spir_func void @new.[[RAW_REF2]](i32 addrspace(4)* [[LOC_CAST2]]) bar(*NoAS); - // CHECK: [[NoAS_LOAD:%[a-zA-Z0-9]+]] = load i32*, i32** [[NoAS]] - // CHECK: call spir_func void @[[RAW_REF]](i32* dereferenceable(4) [[NoAS_LOAD]]) + // CHECK-DAG: [[NoAS_LOAD:%[a-zA-Z0-9]+]] = load i32*, i32** [[NoAS]] + // CHECK-DAG: call spir_func void @[[RAW_REF]](i32* dereferenceable(4) [[NoAS_LOAD]]) bar2(*NoAS); - // CHECK: [[NoAS_LOAD2:%[a-zA-Z0-9]+]] = load i32*, i32** [[NoAS]] - // CHECK: call spir_func void @[[RAW_REF2]](i32* dereferenceable(4) [[NoAS_LOAD2]]) + // CHECK-DAG: [[NoAS_LOAD2:%[a-zA-Z0-9]+]] = load i32*, i32** [[NoAS]] + // CHECK-DAG: call spir_func void @[[RAW_REF2]](i32* dereferenceable(4) [[NoAS_LOAD2]]) foo(GLOB); - // CHECK: [[GLOB_LOAD3:%[a-zA-Z0-9]+]] = load i32 addrspace(1)*, i32 addrspace(1)** [[GLOB]] - // CHECK: [[GLOB_CAST3:%[a-zA-Z0-9]+]] = addrspacecast i32 addrspace(1)* [[GLOB_LOAD3]] to i32 addrspace(4)* - // CHECK: call spir_func void @new.[[RAW_PTR]](i32 addrspace(4)* [[GLOB_CAST3]]) + // CHECK-DAG: [[GLOB_LOAD3:%[a-zA-Z0-9]+]] = load i32 addrspace(1)*, i32 addrspace(1)** [[GLOB]] + // CHECK-DAG: [[GLOB_CAST3:%[a-zA-Z0-9]+]] = addrspacecast i32 addrspace(1)* [[GLOB_LOAD3]] to i32 addrspace(4)* + // CHECK-DAG: call spir_func void @new.[[RAW_PTR]](i32 addrspace(4)* [[GLOB_CAST3]]) foo2(GLOB); - // CHECK: [[GLOB_LOAD4:%[a-zA-Z0-9]+]] = load i32 addrspace(1)*, i32 addrspace(1)** [[GLOB]] - // CHECK: [[GLOB_CAST4:%[a-zA-Z0-9]+]] = addrspacecast i32 addrspace(1)* [[GLOB_LOAD4]] to i32 addrspace(4)* - // CHECK: call spir_func void @new.[[RAW_PTR2]](i32 addrspace(4)* [[GLOB_CAST4]]) + // CHECK-DAG: [[GLOB_LOAD4:%[a-zA-Z0-9]+]] = load i32 addrspace(1)*, i32 addrspace(1)** [[GLOB]] + // CHECK-DAG: [[GLOB_CAST4:%[a-zA-Z0-9]+]] = addrspacecast i32 addrspace(1)* [[GLOB_LOAD4]] to i32 addrspace(4)* + // CHECK-DAG: call spir_func void @new.[[RAW_PTR2]](i32 addrspace(4)* [[GLOB_CAST4]]) foo(LOC); - // CHECK: [[LOC_LOAD3:%[a-zA-Z0-9]+]] = load i32 addrspace(3)*, i32 addrspace(3)** [[LOC]] - // CHECK: call spir_func void [[LOC_PTR]](i32 addrspace(3)* [[LOC_LOAD3]]) + // CHECK-DAG: [[LOC_LOAD3:%[a-zA-Z0-9]+]] = load i32 addrspace(3)*, i32 addrspace(3)** [[LOC]] + // CHECK-DAG: call spir_func void [[LOC_PTR]](i32 addrspace(3)* [[LOC_LOAD3]]) foo2(LOC); - // CHECK: [[LOC_LOAD4:%[a-zA-Z0-9]+]] = load i32 addrspace(3)*, i32 addrspace(3)** [[LOC]] - // CHECK: [[LOC_CAST4:%[a-zA-Z0-9]+]] = addrspacecast i32 addrspace(3)* [[LOC_LOAD4]] to i32 addrspace(4)* - // CHECK: call spir_func void @new.[[RAW_PTR2]](i32 addrspace(4)* [[LOC_CAST4]]) + // CHECK-DAG: [[LOC_LOAD4:%[a-zA-Z0-9]+]] = load i32 addrspace(3)*, i32 addrspace(3)** [[LOC]] + // CHECK-DAG: [[LOC_CAST4:%[a-zA-Z0-9]+]] = addrspacecast i32 addrspace(3)* [[LOC_LOAD4]] to i32 addrspace(4)* + // CHECK-DAG: call spir_func void @new.[[RAW_PTR2]](i32 addrspace(4)* [[LOC_CAST4]]) foo(NoAS); - // CHECK: [[NoAS_LOAD3:%[a-zA-Z0-9]+]] = load i32*, i32** [[NoAS]] - // CHECK: call spir_func void @[[RAW_PTR]](i32* [[NoAS_LOAD3]]) + // CHECK-DAG: [[NoAS_LOAD3:%[a-zA-Z0-9]+]] = load i32*, i32** [[NoAS]] + // CHECK-DAG: call spir_func void @[[RAW_PTR]](i32* [[NoAS_LOAD3]]) foo2(NoAS); - // CHECK: [[NoAS_LOAD4:%[a-zA-Z0-9]+]] = load i32*, i32** [[NoAS]] - // CHECK: call spir_func void @[[RAW_PTR2]](i32* [[NoAS_LOAD4]]) + // CHECK-DAG: [[NoAS_LOAD4:%[a-zA-Z0-9]+]] = load i32*, i32** [[NoAS]] + // CHECK-DAG: call spir_func void @[[RAW_PTR2]](i32* [[NoAS_LOAD4]]) // Ensure that we still get 3 different template instantiations. tmpl(GLOB); - // CHECK: [[GLOB_LOAD4:%[a-zA-Z0-9]+]] = load i32 addrspace(1)*, i32 addrspace(1)** [[GLOB]] - // CHECK: call spir_func void [[GLOB_TMPL:@[a-zA-Z0-9_]+]](i32 addrspace(1)* [[GLOB_LOAD4]]) + // CHECK-DAG: [[GLOB_LOAD4:%[a-zA-Z0-9]+]] = load i32 addrspace(1)*, i32 addrspace(1)** [[GLOB]] + // CHECK-DAG: call spir_func void [[GLOB_TMPL:@[a-zA-Z0-9_]+]](i32 addrspace(1)* [[GLOB_LOAD4]]) tmpl(LOC); - // CHECK: [[LOC_LOAD5:%[a-zA-Z0-9]+]] = load i32 addrspace(3)*, i32 addrspace(3)** [[LOC]] - // CHECK: call spir_func void [[LOC_TMPL:@[a-zA-Z0-9_]+]](i32 addrspace(3)* [[LOC_LOAD5]]) + // CHECK-DAG: [[LOC_LOAD5:%[a-zA-Z0-9]+]] = load i32 addrspace(3)*, i32 addrspace(3)** [[LOC]] + // CHECK-DAG: call spir_func void [[LOC_TMPL:@[a-zA-Z0-9_]+]](i32 addrspace(3)* [[LOC_LOAD5]]) tmpl(NoAS); - // CHECK: [[NoAS_LOAD5:%[a-zA-Z0-9]+]] = load i32*, i32** [[NoAS]] - // CHECK: call spir_func void [[AS0_TMPL:@[a-zA-Z0-9_]+]](i32* [[NoAS_LOAD5]]) + // CHECK-DAG: [[NoAS_LOAD5:%[a-zA-Z0-9]+]] = load i32*, i32** [[NoAS]] + // CHECK-DAG: call spir_func void [[AS0_TMPL:@[a-zA-Z0-9_]+]](i32* [[NoAS_LOAD5]]) } -// CHECK: define linkonce_odr spir_func void [[GLOB_TMPL]](i32 addrspace(1)* % -// CHECK: define linkonce_odr spir_func void [[LOC_TMPL]](i32 addrspace(3)* % -// CHECK: define linkonce_odr spir_func void [[AS0_TMPL]](i32* % +// CHECK-DAG: define linkonce_odr spir_func void [[GLOB_TMPL]](i32 addrspace(1)* % +// CHECK-DAG: define linkonce_odr spir_func void [[LOC_TMPL]](i32 addrspace(3)* % +// CHECK-DAG: define linkonce_odr spir_func void [[AS0_TMPL]](i32* % void usages2() { __attribute__((address_space(0))) int *PRIV_NUM; - // CHECK: [[PRIV_NUM:%[a-zA-Z0-9_]+]] = alloca i32 addrspace(5)* - __attribute__((address_space(5))) int *PRIV_NUM2; - // CHECK: [[PRIV_NUM2:%[a-zA-Z0-9_]+]] = alloca i32 addrspace(5)* + // CHECK-DAG: [[PRIV_NUM:%[a-zA-Z0-9_]+]] = alloca i32* + __attribute__((address_space(0))) int *PRIV_NUM2; + // CHECK-DAG: [[PRIV_NUM2:%[a-zA-Z0-9_]+]] = alloca i32* __private int *PRIV; - // CHECK: [[PRIV:%[a-zA-Z0-9_]+]] = alloca i32 addrspace(5)* + // CHECK-DAG: [[PRIV:%[a-zA-Z0-9_]+]] = alloca i32* __attribute__((address_space(1))) int *GLOB_NUM; - // CHECK: [[GLOB_NUM:%[a-zA-Z0-9_]+]] = alloca i32 addrspace(1)* + // CHECK-DAG: [[GLOB_NUM:%[a-zA-Z0-9_]+]] = alloca i32 addrspace(1)* __global int *GLOB; - // CHECK: [[GLOB:%[a-zA-Z0-9_]+]] = alloca i32 addrspace(1)* + // CHECK-DAG: [[GLOB:%[a-zA-Z0-9_]+]] = alloca i32 addrspace(1)* __attribute__((address_space(2))) int *CONST_NUM; - // CHECK: [[CONST_NUM:%[a-zA-Z0-9_]+]] = alloca i32 addrspace(2)* + // CHECK-DAG: [[CONST_NUM:%[a-zA-Z0-9_]+]] = alloca i32 addrspace(2)* __constant int *CONST; - // CHECK: [[CONST:%[a-zA-Z0-9_]+]] = alloca i32 addrspace(2)* + // CHECK-DAG: [[CONST:%[a-zA-Z0-9_]+]] = alloca i32 addrspace(2)* __attribute__((address_space(3))) int *LOCAL_NUM; - // CHECK: [[LOCAL_NUM:%[a-zA-Z0-9_]+]] = alloca i32 addrspace(3)* + // CHECK-DAG: [[LOCAL_NUM:%[a-zA-Z0-9_]+]] = alloca i32 addrspace(3)* __local int *LOCAL; - // CHECK: [[LOCAL:%[a-zA-Z0-9_]+]] = alloca i32 addrspace(3)* + // CHECK-DAG: [[LOCAL:%[a-zA-Z0-9_]+]] = alloca i32 addrspace(3)* bar(*PRIV_NUM); - // CHECK: [[PRIV_NUM_LOAD:%[a-zA-Z0-9]+]] = load i32 addrspace(5)*, i32 addrspace(5)** [[PRIV_NUM]] - // CHECK: [[PRIV_NUM_CAST:%[a-zA-Z0-9]+]] = addrspacecast i32 addrspace(5)* [[PRIV_NUM_LOAD]] to i32 addrspace(4)* - // CHECK: call spir_func void @new.[[RAW_REF]](i32 addrspace(4)* [[PRIV_NUM_CAST]]) + // CHECK-DAG: [[PRIV_NUM_LOAD:%[a-zA-Z0-9]+]] = load i32*, i32** [[PRIV_NUM]] + // CHECK-DAG: call spir_func void @[[RAW_REF]](i32* dereferenceable(4) [[PRIV_NUM_LOAD]]) bar(*PRIV_NUM2); - // CHECK: [[PRIV_NUM2_LOAD:%[a-zA-Z0-9]+]] = load i32 addrspace(5)*, i32 addrspace(5)** [[PRIV_NUM2]] - // CHECK: [[PRIV_NUM2_CAST:%[a-zA-Z0-9]+]] = addrspacecast i32 addrspace(5)* [[PRIV_NUM2_LOAD]] to i32 addrspace(4)* - // CHECK: call spir_func void @new.[[RAW_REF]](i32 addrspace(4)* [[PRIV_NUM2_CAST]]) + // CHECK-DAG: [[PRIV_NUM2_LOAD:%[a-zA-Z0-9]+]] = load i32*, i32** [[PRIV_NUM2]] + // CHECK-DAG: call spir_func void @[[RAW_REF]](i32* dereferenceable(4) [[PRIV_NUM2_LOAD]]) bar(*PRIV); - // CHECK: [[PRIV_LOAD:%[a-zA-Z0-9]+]] = load i32 addrspace(5)*, i32 addrspace(5)** [[PRIV]] - // CHECK: [[PRIV_CAST:%[a-zA-Z0-9]+]] = addrspacecast i32 addrspace(5)* [[PRIV_LOAD]] to i32 addrspace(4)* - // CHECK: call spir_func void @new.[[RAW_REF]](i32 addrspace(4)* [[PRIV_CAST]]) + // CHECK-DAG: [[PRIV_LOAD:%[a-zA-Z0-9]+]] = load i32*, i32** [[PRIV]] + // CHECK-DAG: call spir_func void @[[RAW_REF]](i32* dereferenceable(4) [[PRIV_LOAD]]) bar(*GLOB_NUM); - // CHECK: [[GLOB_NUM_LOAD:%[a-zA-Z0-9]+]] = load i32 addrspace(1)*, i32 addrspace(1)** [[GLOB_NUM]] - // CHECK: [[GLOB_NUM_CAST:%[a-zA-Z0-9]+]] = addrspacecast i32 addrspace(1)* [[GLOB_NUM_LOAD]] to i32 addrspace(4)* - // CHECK: call spir_func void @new.[[RAW_REF]](i32 addrspace(4)* [[GLOB_NUM_CAST]]) + // CHECK-DAG: [[GLOB_NUM_LOAD:%[a-zA-Z0-9]+]] = load i32 addrspace(1)*, i32 addrspace(1)** [[GLOB_NUM]] + // CHECK-DAG: [[GLOB_NUM_CAST:%[a-zA-Z0-9]+]] = addrspacecast i32 addrspace(1)* [[GLOB_NUM_LOAD]] to i32 addrspace(4)* + // CHECK-DAG: call spir_func void @new.[[RAW_REF]](i32 addrspace(4)* [[GLOB_NUM_CAST]]) bar(*GLOB); - // CHECK: [[GLOB_LOAD:%[a-zA-Z0-9]+]] = load i32 addrspace(1)*, i32 addrspace(1)** [[GLOB]] - // CHECK: [[GLOB_CAST:%[a-zA-Z0-9]+]] = addrspacecast i32 addrspace(1)* [[GLOB_LOAD]] to i32 addrspace(4)* - // CHECK: call spir_func void @new.[[RAW_REF]](i32 addrspace(4)* [[GLOB_CAST]]) + // CHECK-DAG: [[GLOB_LOAD:%[a-zA-Z0-9]+]] = load i32 addrspace(1)*, i32 addrspace(1)** [[GLOB]] + // CHECK-DAG: [[GLOB_CAST:%[a-zA-Z0-9]+]] = addrspacecast i32 addrspace(1)* [[GLOB_LOAD]] to i32 addrspace(4)* + // CHECK-DAG: call spir_func void @new.[[RAW_REF]](i32 addrspace(4)* [[GLOB_CAST]]) bar(*CONST_NUM); - // CHECK: [[CONST_NUM_LOAD:%[a-zA-Z0-9]+]] = load i32 addrspace(2)*, i32 addrspace(2)** [[CONST_NUM]] - // CHECK: [[CONST_NUM_CAST:%[a-zA-Z0-9]+]] = addrspacecast i32 addrspace(2)* [[CONST_NUM_LOAD]] to i32 addrspace(4)* - // CHECK: call spir_func void @new.[[RAW_REF]](i32 addrspace(4)* [[CONST_NUM_CAST]]) + // CHECK-DAG: [[CONST_NUM_LOAD:%[a-zA-Z0-9]+]] = load i32 addrspace(2)*, i32 addrspace(2)** [[CONST_NUM]] + // CHECK-DAG: [[CONST_NUM_CAST:%[a-zA-Z0-9]+]] = addrspacecast i32 addrspace(2)* [[CONST_NUM_LOAD]] to i32 addrspace(4)* + // CHECK-DAG: call spir_func void @new.[[RAW_REF]](i32 addrspace(4)* [[CONST_NUM_CAST]]) bar(*CONST); - // CHECK: [[CONST_LOAD:%[a-zA-Z0-9]+]] = load i32 addrspace(2)*, i32 addrspace(2)** [[CONST]] - // CHECK: [[CONST_CAST:%[a-zA-Z0-9]+]] = addrspacecast i32 addrspace(2)* [[CONST_LOAD]] to i32 addrspace(4)* - // CHECK: call spir_func void @new.[[RAW_REF]](i32 addrspace(4)* [[CONST_CAST]]) + // CHECK-DAG: [[CONST_LOAD:%[a-zA-Z0-9]+]] = load i32 addrspace(2)*, i32 addrspace(2)** [[CONST]] + // CHECK-DAG: [[CONST_CAST:%[a-zA-Z0-9]+]] = addrspacecast i32 addrspace(2)* [[CONST_LOAD]] to i32 addrspace(4)* + // CHECK-DAG: call spir_func void @new.[[RAW_REF]](i32 addrspace(4)* [[CONST_CAST]]) bar2(*LOCAL_NUM); - // CHECK: [[LOCAL_NUM_LOAD:%[a-zA-Z0-9]+]] = load i32 addrspace(3)*, i32 addrspace(3)** [[LOCAL_NUM]] - // CHECK: [[LOCAL_NUM_CAST:%[a-zA-Z0-9]+]] = addrspacecast i32 addrspace(3)* [[LOCAL_NUM_LOAD]] to i32 addrspace(4)* - // CHECK: call spir_func void @new.[[RAW_REF2]](i32 addrspace(4)* [[LOCAL_NUM_CAST]]) + // CHECK-DAG: [[LOCAL_NUM_LOAD:%[a-zA-Z0-9]+]] = load i32 addrspace(3)*, i32 addrspace(3)** [[LOCAL_NUM]] + // CHECK-DAG: [[LOCAL_NUM_CAST:%[a-zA-Z0-9]+]] = addrspacecast i32 addrspace(3)* [[LOCAL_NUM_LOAD]] to i32 addrspace(4)* + // CHECK-DAG: call spir_func void @new.[[RAW_REF2]](i32 addrspace(4)* [[LOCAL_NUM_CAST]]) bar2(*LOCAL); - // CHECK: [[LOCAL_LOAD:%[a-zA-Z0-9]+]] = load i32 addrspace(3)*, i32 addrspace(3)** [[LOCAL]] - // CHECK: [[LOCAL_CAST:%[a-zA-Z0-9]+]] = addrspacecast i32 addrspace(3)* [[LOCAL_LOAD]] to i32 addrspace(4)* - // CHECK: call spir_func void @new.[[RAW_REF2]](i32 addrspace(4)* [[LOCAL_CAST]]) + // CHECK-DAG: [[LOCAL_LOAD:%[a-zA-Z0-9]+]] = load i32 addrspace(3)*, i32 addrspace(3)** [[LOCAL]] + // CHECK-DAG: [[LOCAL_CAST:%[a-zA-Z0-9]+]] = addrspacecast i32 addrspace(3)* [[LOCAL_LOAD]] to i32 addrspace(4)* + // CHECK-DAG: call spir_func void @new.[[RAW_REF2]](i32 addrspace(4)* [[LOCAL_CAST]]) } // CHECK-DAG: define spir_func void @new.[[RAW_REF]](i32 addrspace(4)* dereferenceable(4) diff --git a/clang/test/CodeGenSYCL/bool-vectors.cpp b/clang/test/CodeGenSYCL/bool-vectors.cpp new file mode 100644 index 0000000000000..8fb2313e46c6e --- /dev/null +++ b/clang/test/CodeGenSYCL/bool-vectors.cpp @@ -0,0 +1,75 @@ +// RUN: %clang_cc1 -triple spir64-unknown-linux-sycldevice -std=c++11 -fsycl-is-device -disable-llvm-passes -emit-llvm -x c++ %s -o - | opt -asfix -S -o - | FileCheck %s + +template +__attribute__((sycl_kernel)) void kernel(Func kernelFunc) { + kernelFunc(); +} +using bool1 = bool; +using bool2 = bool __attribute__((ext_vector_type(2))); +using bool3 = bool __attribute__((ext_vector_type(3))); +using bool4 = bool __attribute__((ext_vector_type(4))); +using bool8 = bool __attribute__((ext_vector_type(8))); +using bool16 = bool __attribute__((ext_vector_type(16))); + +extern bool1 foo1(); +// CHECK-DAG: declare spir_func zeroext i1 @[[FOO1:[a-zA-Z0-9_]+]]() +extern bool2 foo2(); +// CHECK-DAG: declare spir_func <2 x i1> @[[FOO2:[a-zA-Z0-9_]+]]() +extern bool3 foo3(); +// CHECK-DAG: declare spir_func <3 x i1> @[[FOO3:[a-zA-Z0-9_]+]]() +extern bool4 foo4(); +// CHECK-DAG: declare spir_func <4 x i1> @[[FOO4:[a-zA-Z0-9_]+]]() +extern bool8 foo8(); +// CHECK-DAG: declare spir_func <8 x i1> @[[FOO8:[a-zA-Z0-9_]+]]() +extern bool16 foo16(); +// CHECK-DAG: declare spir_func <16 x i1> @[[FOO16:[a-zA-Z0-9_]+]]() + +void bar (bool1 b) {}; +// CHECK-DAG: define spir_func void @[[BAR1:[a-zA-Z0-9_]+]](i1 zeroext % +void bar (bool2 b) {}; +// CHECK-DAG: define spir_func void @[[BAR2:[a-zA-Z0-9_]+]](<2 x i1> % +void bar (bool3 b) {}; +// CHECK-DAG: define spir_func void @[[BAR3:[a-zA-Z0-9_]+]](<3 x i1> % +void bar (bool4 b) {}; +// CHECK-DAG: define spir_func void @[[BAR4:[a-zA-Z0-9_]+]](<4 x i1> % +void bar (bool8 b) {}; +// CHECK-DAG: define spir_func void @[[BAR8:[a-zA-Z0-9_]+]](<8 x i1> % +void bar (bool16 b) {}; +// CHECK-DAG: define spir_func void @[[BAR16:[a-zA-Z0-9_]+]](<16 x i1> % + +int main() { + kernel( + [=]() { + bool1 b1 = foo1(); + // CHECK-DAG: [[B1:%[a-zA-Z0-9_]+]] = alloca i8, align 1 + // CHECK-DAG: [[CALL1:%[a-zA-Z0-9_]+]] = call spir_func zeroext i1 @[[FOO1]] + bar(b1); + // CHECK-DAG: call spir_func void @[[BAR1]](i1 zeroext [[B1_ARG:%[a-zA-Z0-9_]+]] + bool2 b2 = foo2(); + // CHECK-DAG: [[B2:%[a-zA-Z0-9_]+]] = alloca <2 x i1>, align 2 + // CHECK-DAG: [[CALL2:%[a-zA-Z0-9_]+]] = call spir_func <2 x i1> @[[FOO2]] + bar(b2); + // CHECK-DAG: call spir_func void @[[BAR2]](<2 x i1> [[B2_ARG:%[a-zA-Z0-9_]+]] + bool3 b3 = foo3(); + // CHECK-DAG: [[B3:%[a-zA-Z0-9_]+]] = alloca <3 x i1>, align 4 + // CHECK-DAG: [[CALL3:%[a-zA-Z0-9_]+]] = call spir_func <3 x i1> @[[FOO3]] + bar(b3); + // CHECK-DAG: call spir_func void @[[BAR3]](<3 x i1> [[B3_ARG:%[a-zA-Z0-9_]+]] + bool4 b4 = foo4(); + // CHECK-DAG: [[B4:%[a-zA-Z0-9_]+]] = alloca <4 x i1>, align 4 + // CHECK-DAG: [[CALL4:%[a-zA-Z0-9_]+]] = call spir_func <4 x i1> @[[FOO4]] + bar(b4); + // CHECK-DAG: call spir_func void @[[BAR4]](<4 x i1> [[B4_ARG:%[a-zA-Z0-9_]+]] + bool8 b8 = foo8(); + // CHECK-DAG: [[B8:%[a-zA-Z0-9_]+]] = alloca <8 x i1>, align 8 + // CHECK-DAG: [[CALL8:%[a-zA-Z0-9_]+]] = call spir_func <8 x i1> @[[FOO8]] + bar(b8); + // CHECK-DAG: call spir_func void @[[BAR8]](<8 x i1> [[B8_ARG:%[a-zA-Z0-9_]+]] + bool16 b16 = foo16(); + // CHECK-DAG: [[B16:%[a-zA-Z0-9_]+]] = alloca <16 x i1>, align 16 + // CHECK-DAG: [[CALL16:%[a-zA-Z0-9_]+]] = call spir_func <16 x i1> @[[FOO16]] + bar(b16); + // CHECK-DAG: call spir_func void @[[BAR16]](<16 x i1> [[B16_ARG:%[a-zA-Z0-9_]+]] + }); + return 0; +} diff --git a/clang/test/CodeGenSYCL/int_header1.cpp b/clang/test/CodeGenSYCL/int_header1.cpp index d19fad4cbed87..24c5d13ce8d99 100644 --- a/clang/test/CodeGenSYCL/int_header1.cpp +++ b/clang/test/CodeGenSYCL/int_header1.cpp @@ -1,135 +1,207 @@ -// RUN: %clang --sycl -Xclang -fsycl-int-header=%t.h %s -c -o %T/kernel.spv +// RUN: %clang -I %S/Inputs --sycl -Xclang -fsycl-int-header=%t.h %s -c -o kernel.spv +// RUN: %clang -I %S/Inputs --sycl -Xclang -fsycl-int-header=%t.h %s -c -o kernel.spv // RUN: FileCheck -input-file=%t.h %s -// XFAIL: * -// -// CHECK: class first_kernel; -// CHECK-NEXT: template class second_kernel; -// CHECK-NEXT: struct X; -// CHECK-NEXT: template struct point ; -// CHECK-NEXT: template class third_kernel; -// -// CHECK: #include -// -// CHECK: static constexpr -// CHECK-NEXT: const char* const kernel_names[] = { -// CHECK-NEXT: "first_kernel", -// CHECK-NEXT: "second_namespace::second_kernel", -// CHECK-NEXT: "third_kernel<1, int, point< X> >" -// CHECK-NEXT: }; -// -// CHECK: const kernel_param_desc_t kernel_signatures[] = { -// CHECK-NEXT: //--- first_kernel -// CHECK-NEXT: { kernel_param_kind_t::kind_scalar, 4, 0 }, -// CHECK-NEXT: { kernel_param_kind_t::kind_accessor, 2014, 4 }, -// CHECK-NEXT: { kernel_param_kind_t::kind_accessor, 2016, 5 }, -// CHECK-EMPTY: -// CHECK-NEXT: //--- second_namespace::second_kernel -// CHECK-NEXT: { kernel_param_kind_t::kind_scalar, 4, 0 }, -// CHECK-NEXT: { kernel_param_kind_t::kind_accessor, 2016, 4 }, -// CHECK-EMPTY: -// CHECK-NEXT: //--- third_kernel<1, int, point< X> > -// CHECK-NEXT: { kernel_param_kind_t::kind_scalar, 4, 0 }, -// CHECK-NEXT: { kernel_param_kind_t::kind_accessor, 2016, 4 }, -// CHECK-EMPTY: -// CHECK-NEXT: }; -// -// CHECK: template struct KernelInfo; -// CHECK: template <> struct KernelInfo { -// CHECK: template <> struct KernelInfo> { -// CHECK: template <> struct KernelInfo >> { - -namespace cl { -namespace sycl { -namespace access { - -enum class target { - global_buffer = 2014, - constant_buffer, - local, - image, - host_buffer, - host_image, - image_array -}; -enum class mode { - read = 1024, - write, - read_write, - discard_write, - discard_read_write, - atomic -}; +// CHECK:template <> struct KernelInfo { +// CHECK:template <> struct KernelInfo<::nm1::nm2::KernelName0> { +// CHECK:template <> struct KernelInfo<::nm1::KernelName1> { +// CHECK:template <> struct KernelInfo<::nm1::KernelName3< ::nm1::nm2::KernelName0>> { +// CHECK:template <> struct KernelInfo<::nm1::KernelName3< ::nm1::KernelName1>> { +// CHECK:template <> struct KernelInfo<::nm1::KernelName4< ::nm1::nm2::KernelName0>> { +// CHECK:template <> struct KernelInfo<::nm1::KernelName4< ::nm1::KernelName1>> { +// CHECK:template <> struct KernelInfo<::nm1::KernelName3> { +// CHECK:template <> struct KernelInfo<::nm1::KernelName4> { +// CHECK:template <> struct KernelInfo> { -enum class placeholder { false_t, - true_t }; +// This test checks if the SYCL device compiler is able to generate correct +// integration header when the kernel name class is expressed in different +// forms. -enum class address_space : int { - private_space = 0, - global_space, - constant_space, - local_space -}; -} // namespace access -template -class accessor { - -public: - void use(void) const {} -}; -} // namespace sycl -} // namespace cl +#include "sycl.hpp" template __attribute__((sycl_kernel)) void kernel_single_task(KernelType kernelFunc) { kernelFunc(); } -struct x {}; -template -struct point {}; -namespace second_namespace { -template -class second_kernel; + +namespace nm1 { + namespace nm2 { + class C {}; + class KernelName0 : public C {}; + } // namespace nm2 + + class KernelName1; + + template class KernelName3; + template class KernelName4; + + template <> class KernelName3; + template <> class KernelName3; + + template <> class KernelName4 {}; + template <> class KernelName4 {}; + +} // namespace nm1 + +namespace { + class ClassInAnonNS; + template class TmplClassInAnonNS; } -template -class third_kernel; +struct MyWrapper { + class KN101 {}; -int main() { + int test() { + + cl::sycl::accessor acc; + + // Acronyms used to designate a test combination: + // Declaration levels: 'T'-translation unit, 'L'-local scope, + // 'C'-containing class, 'P'-"in place", '-'-N/A + // Class definition: 'I'-incomplete (not defined), 'D' - defined, + // '-'-N/A + // Test combination positional parameters: + // 0: Kernel class declaration level + // 1: Kernel class definition + // 2: Declaration level of the template argument class of the kernel class + // 3: Definition of the template argument class of the kernel class + + // PI-- + // traditional in-place incomplete type + kernel_single_task([=]() { acc.use(); }); + + // TD-- + // a class completely defined within a namespace at + // translation unit scope + kernel_single_task([=]() { acc.use(); }); + +#ifdef LI__ + // TODO unexpected compilation error when host code + integration header + // is compiled LI-- kernel name is an incomplete class forward-declared in + // local scope + class KernelName2; + kernel_single_task([=]() { acc.use(); }); +#endif + +#ifdef LD__ + // Expected compilation error. + // LD-- + // kernel name is a class defined in local scope + class KernelName2a {}; + kernel_single_task([=]() { acc.use(); }); +#endif - cl::sycl::accessor acc1; - cl::sycl::accessor - acc2; - int i = 13; - // TODO: Uncomemnt when structures in kernel arguments are correctly processed - // by SYCL compiler - /* struct { - char c; - int i; - } test_s; - test_s.c = 14;*/ - kernel_single_task([=]() { - if (i == 13 /*&& test_s.c == 14*/) { - - acc1.use(); - acc2.use(); - } - }); - - kernel_single_task>([=]() { - if (i == 13) { - acc2.use(); - } - }); - kernel_single_task>>([=]() { - if (i == 13) { - acc2.use(); - } - }); - - return 0; + // TI-- + // an incomplete class forward-declared in a namespace at + // translation unit scope + kernel_single_task([=]() { acc.use(); }); + + // TITD + // an incomplete template specialization class with defined class as + // argument declared in a namespace at translation unit scope + kernel_single_task>( + [=]() { acc.use(); }); + + // TITI + // an incomplete template specialization class with incomplete class as + // argument forward-declared in a namespace at translation unit scope + kernel_single_task>( + [=]() { acc.use(); }); + + // TDTD + // a defined template specialization class with defined class as argument + // declared in a namespace at translation unit scope + kernel_single_task>( + [=]() { acc.use(); }); + + // TDTI + // a defined template specialization class with incomplete class as + // argument forward-declared in a namespace at translation unit scope + kernel_single_task>( + [=]() { acc.use(); }); + + // TIPI + // an incomplete template specialization class with incomplete class as + // argument forward-declared "in-place" + kernel_single_task>( + [=]() { acc.use(); }); + +#ifdef TILI + // Expected compilation error + // TILI + // an incomplete template specialization class with incomplete class as + // argument forward-declared locally + class KernelName6; + kernel_single_task>( + [=]() { acc.use(); }); +#endif + + // TDPI + // a defined template specialization class with incomplete class as + // argument forward-declared "in-place" + kernel_single_task>( + [=]() { acc.use(); }); + +#ifdef TDLI + // TODO unexpected compilation error when host code + integration header + // is compiled TDLI a defined template specialization class with + // incomplete class as argument forward-declared locally + class KernelName6a; + kernel_single_task>( + [=]() { acc.use(); }); +#endif + +#ifdef TDLD + // Expected compilation error + // TDLD + // a defined template specialization class with a class as argument + // defined locally + class KernelName9 {}; + kernel_single_task>([=]() { acc.use(); }); +#endif + +#ifdef TICD + // Expected compilation error + // TICD + // an incomplete template specialization class with a defined class as + // argument declared in the containing class + kernel_single_task>([=]() { acc.use(); }); +#endif + +#ifdef TICI + // Expected compilation error + // TICI + // an incomplete template specialization class with an incomplete class as + // argument declared in the containing class + kernel_single_task>([=]() { acc.use(); }); +#endif + + // kernel name type is a templated class, both the top-level class and the + // template argument are declared in the anonymous namespace + kernel_single_task>( + [=]() { acc.use(); }); + + return 0; + } +}; + +#ifndef __SYCL_DEVICE_ONLY__ +using namespace cl::sycl::detail; +#endif // __SYCL_DEVICE_ONLY__ + +int main() { + MyWrapper w; + int a = w.test(); +#ifndef __SYCL_DEVICE_ONLY__ + KernelInfo::getName(); + KernelInfo::getName(); + KernelInfo::getName(); + KernelInfo>::getName(); + KernelInfo>::getName(); + KernelInfo>::getName(); + KernelInfo>::getName(); + KernelInfo>::getName(); + KernelInfo>::getName(); + KernelInfo>::getName(); +#endif //__SYCL_DEVICE_ONLY__ } diff --git a/clang/test/CodeGenSYCL/integration_header.cpp b/clang/test/CodeGenSYCL/integration_header.cpp index 9e457819562d9..729861e544cac 100644 --- a/clang/test/CodeGenSYCL/integration_header.cpp +++ b/clang/test/CodeGenSYCL/integration_header.cpp @@ -1,4 +1,4 @@ -// RUN: %clang --sycl -Xclang -fsycl-int-header=%t.h %s -c -o %T/kernel.spv +// RUN: %clang -I %S/Inputs --sycl -Xclang -fsycl-int-header=%t.h %s -c -o %T/kernel.spv // RUN: FileCheck -input-file=%t.h %s // // CHECK: #include @@ -25,21 +25,25 @@ // CHECK-NEXT: { kernel_param_kind_t::kind_accessor, 2014, 4 }, // CHECK-NEXT: { kernel_param_kind_t::kind_std_layout, 1, 4 }, // CHECK-NEXT: { kernel_param_kind_t::kind_std_layout, 1, 5 }, -// CHECK-NEXT: { kernel_param_kind_t::kind_accessor, 2016, 6 }, // CHECK-NEXT: { kernel_param_kind_t::kind_std_layout, 1, 6 }, +// CHECK-NEXT: { kernel_param_kind_t::kind_accessor, 2016, 7 }, // CHECK-NEXT: { kernel_param_kind_t::kind_std_layout, 1, 7 }, +// CHECK-NEXT: { kernel_param_kind_t::kind_std_layout, 1, 8 }, +// CHECK-NEXT: { kernel_param_kind_t::kind_std_layout, 1, 9 }, // CHECK-EMPTY: // CHECK-NEXT: //--- _ZTSN16second_namespace13second_kernelIcEE // CHECK-NEXT: { kernel_param_kind_t::kind_std_layout, 4, 0 }, // CHECK-NEXT: { kernel_param_kind_t::kind_accessor, 2016, 4 }, // CHECK-NEXT: { kernel_param_kind_t::kind_std_layout, 1, 4 }, // CHECK-NEXT: { kernel_param_kind_t::kind_std_layout, 1, 5 }, +// CHECK-NEXT: { kernel_param_kind_t::kind_std_layout, 1, 6 }, // CHECK-EMPTY: // CHECK-NEXT: //--- _ZTS12third_kernelILi1Ei5pointIZ4mainE1XEE // CHECK-NEXT: { kernel_param_kind_t::kind_std_layout, 4, 0 }, // CHECK-NEXT: { kernel_param_kind_t::kind_accessor, 2016, 4 }, // CHECK-NEXT: { kernel_param_kind_t::kind_std_layout, 1, 4 }, // CHECK-NEXT: { kernel_param_kind_t::kind_std_layout, 1, 5 }, +// CHECK-NEXT: { kernel_param_kind_t::kind_std_layout, 1, 6 }, // CHECK-EMPTY: // CHECK-NEXT: }; // @@ -48,66 +52,7 @@ // CHECK: template <> struct KernelInfo<::second_namespace::second_kernel> { // CHECK: template <> struct KernelInfo<::third_kernel<1, int, ::point >> { -namespace cl { -namespace sycl { -namespace access { - -enum class target { - global_buffer = 2014, - constant_buffer, - local, - image, - host_buffer, - host_image, - image_array -}; - -enum class mode { - read = 1024, - write, - read_write, - discard_write, - discard_read_write, - atomic -}; - -enum class placeholder { false_t, - true_t }; - -enum class address_space : int { - private_space = 0, - global_space, - constant_space, - local_space -}; -} // namespace access - -struct range { -}; - -struct id { -}; - -struct _ImplT { - range Range; - id Offset; -}; - -template -class accessor { - -public: - void use(void) const {} - void __init(dataT *Ptr, range Range, id Offset) { - } - - _ImplT __impl; // compiler looks for this field - -}; -} // namespace sycl -} // namespace cl +#include "sycl.hpp" template __attribute__((sycl_kernel)) void kernel_single_task(KernelType kernelFunc) { diff --git a/clang/test/CodeGenSYCL/intel-fpga-local.cpp b/clang/test/CodeGenSYCL/intel-fpga-local.cpp new file mode 100644 index 0000000000000..9d6c624e07a08 --- /dev/null +++ b/clang/test/CodeGenSYCL/intel-fpga-local.cpp @@ -0,0 +1,96 @@ +// RUN: %clang_cc1 -x c++ -triple spir64-unknown-linux-sycldevice -std=c++11 -disable-llvm-passes -fsycl-is-device -emit-llvm %s -o - | FileCheck %s + +//CHECK: [[ANN1:@.str[\.]*[0-9]*]] = {{.*}}{memory:DEFAULT}{numbanks:4} +//CHECK: [[ANN2:@.str[\.]*[0-9]*]] = {{.*}}{register:1} +//CHECK: [[ANN3:@.str[\.]*[0-9]*]] = {{.*}}{memory:DEFAULT} +//CHECK: [[ANN4:@.str[\.]*[0-9]*]] = {{.*}}{memory:DEFAULT}{bankwidth:4} +//CHECK: [[ANN5:@.str[\.]*[0-9]*]] = {{.*}}{memory:BLOCK_RAM} +//CHECK: [[ANN6:@.str[\.]*[0-9]*]] = {{.*}}{memory:MLAB} +//CHECK: [[ANN7:@.str[\.]*[0-9]*]] = {{.*}}{memory:DEFAULT}{bankwidth:8} + +void foo() { + //CHECK: %[[VAR_ONE:[0-9]+]] = bitcast{{.*}}var_one + //CHECK: %[[VAR_ONE1:var_one[0-9]+]] = bitcast{{.*}}var_one + //CHECK: llvm.var.annotation{{.*}}%[[VAR_ONE1]],{{.*}}[[ANN1]] + int __attribute__((numbanks(4))) var_one; + //CHECK: %[[VAR_TWO:[0-9]+]] = bitcast{{.*}}var_two + //CHECK: %[[VAR_TWO1:var_two[0-9]+]] = bitcast{{.*}}var_two + //CHECK: llvm.var.annotation{{.*}}%[[VAR_TWO1]],{{.*}}[[ANN2]] + int __attribute__((register)) var_two; + //CHECK: %[[VAR_THREE:[0-9]+]] = bitcast{{.*}}var_three + //CHECK: %[[VAR_THREE1:var_three[0-9]+]] = bitcast{{.*}}var_three + //CHECK: llvm.var.annotation{{.*}}%[[VAR_THREE1]],{{.*}}[[ANN3]] + int __attribute__((__memory__)) var_three; + //CHECK: %[[VAR_FOUR:[0-9]+]] = bitcast{{.*}}var_four + //CHECK: %[[VAR_FOUR1:var_four[0-9]+]] = bitcast{{.*}}var_four + //CHECK: llvm.var.annotation{{.*}}%[[VAR_FOUR1]],{{.*}}[[ANN4]] + int __attribute__((__bankwidth__(4))) var_four; +} + +struct foo_two { + int __attribute__((numbanks(4))) f1; + int __attribute__((register)) f2; + int __attribute__((__memory__)) f3; + int __attribute__((__bankwidth__(4))) f4; +}; + +void bar() { + struct foo_two s1; + //CHECK: %[[FIELD1:.*]] = getelementptr inbounds %struct.foo_two{{.*}} + //CHECK: %[[CAST:.*]] = bitcast{{.*}}%[[FIELD1]] + //CHECK: call i8* @llvm.ptr.annotation.p0i8{{.*}}%[[CAST]]{{.*}}[[ANN1]] + s1.f1 = 0; + //CHECK: %[[FIELD2:.*]] = getelementptr inbounds %struct.foo_two{{.*}} + //CHECK: %[[CAST:.*]] = bitcast{{.*}}%[[FIELD2]] + //CHECK: call i8* @llvm.ptr.annotation.p0i8{{.*}}%[[CAST]]{{.*}}[[ANN2]] + s1.f2 = 0; + //CHECK: %[[FIELD3:.*]] = getelementptr inbounds %struct.foo_two{{.*}} + //CHECK: %[[CAST:.*]] = bitcast{{.*}}%[[FIELD3]] + //CHECK: call i8* @llvm.ptr.annotation.p0i8{{.*}}%[[CAST]]{{.*}}[[ANN3]] + s1.f3 = 0; + //CHECK: %[[FIELD4:.*]] = getelementptr inbounds %struct.foo_two{{.*}} + //CHECK: %[[CAST:.*]] = bitcast{{.*}}%[[FIELD4]] + //CHECK: call i8* @llvm.ptr.annotation.p0i8{{.*}}%[[CAST]]{{.*}}[[ANN4]] + s1.f4 = 0; +} + +void baz() { + //CHECK: %[[V_ONE:[0-9]+]] = bitcast{{.*}}v_one + //CHECK: %[[V_ONE1:v_one[0-9]+]] = bitcast{{.*}}v_one + //CHECK: llvm.var.annotation{{.*}}%[[V_ONE1]],{{.*}}[[ANN1]] + int v_one [[intelfpga::numbanks(4)]]; + //CHECK: %[[V_TWO:[0-9]+]] = bitcast{{.*}}v_two + //CHECK: %[[V_TWO1:v_two[0-9]+]] = bitcast{{.*}}v_two + //CHECK: llvm.var.annotation{{.*}}%[[V_TWO1]],{{.*}}[[ANN2]] + int v_two [[intelfpga::register]]; + //CHECK: %[[V_THREE:[0-9]+]] = bitcast{{.*}}v_three + //CHECK: %[[V_THREE1:v_three[0-9]+]] = bitcast{{.*}}v_three + //CHECK: llvm.var.annotation{{.*}}%[[V_THREE1]],{{.*}}[[ANN3]] + int v_three [[intelfpga::memory]]; + //CHECK: %[[V_FOUR:[0-9]+]] = bitcast{{.*}}v_four + //CHECK: %[[V_FOUR1:v_four[0-9]+]] = bitcast{{.*}}v_four + //CHECK: llvm.var.annotation{{.*}}%[[V_FOUR1]],{{.*}}[[ANN5]] + int v_four [[intelfpga::memory("BLOCK_RAM")]]; + //CHECK: %[[V_FIVE:[0-9]+]] = bitcast{{.*}}v_five + //CHECK: %[[V_FIVE1:v_five[0-9]+]] = bitcast{{.*}}v_five + //CHECK: llvm.var.annotation{{.*}}%[[V_FIVE1]],{{.*}}[[ANN6]] + int v_five [[intelfpga::memory("MLAB")]]; + //CHECK: %[[V_SIX:[0-9]+]] = bitcast{{.*}}v_six + //CHECK: %[[V_SIX1:v_six[0-9]+]] = bitcast{{.*}}v_six + //CHECK: llvm.var.annotation{{.*}}%[[V_SIX1]],{{.*}}[[ANN7]] + int v_six [[intelfpga::bankwidth(8)]]; +} + +template +__attribute__((sycl_kernel)) void kernel_single_task(Func kernelFunc) { + kernelFunc(); +} + +int main() { + kernel_single_task([]() { + foo(); + bar(); + baz(); + }); + return 0; +} \ No newline at end of file diff --git a/clang/test/CodeGenSYCL/kernel-with-id.cpp b/clang/test/CodeGenSYCL/kernel-with-id.cpp index 24ce53617548d..04bf39b774f90 100644 --- a/clang/test/CodeGenSYCL/kernel-with-id.cpp +++ b/clang/test/CodeGenSYCL/kernel-with-id.cpp @@ -1,70 +1,6 @@ -// RUN: %clang_cc1 -triple spir64-unknown-linux-sycldevice -std=c++11 -fsycl-is-device -disable-llvm-passes -S -emit-llvm %s -o - | FileCheck %s +// RUN: %clang_cc1 -I %S/Inputs -triple spir64-unknown-linux-sycldevice -std=c++11 -fsycl-is-device -disable-llvm-passes -S -emit-llvm %s -o - | FileCheck %s -namespace cl { -namespace sycl { -namespace access { - -enum class target { - global_buffer = 2014, - constant_buffer, - local, - image, - host_buffer, - host_image, - image_array -}; - -enum class mode { - read = 1024, - write, - read_write, - discard_write, - discard_read_write, - atomic -}; - -enum class placeholder { false_t, - true_t }; - -enum class address_space : int { - private_space = 0, - global_space, - constant_space, - local_space -}; -} // namespace access - -template -struct range { -}; - -template -struct id { -}; - -template -struct _ImplT { - range Range; - id Offset; -}; - -template -class accessor { - -public: - - void __init(__global dataT *Ptr, range Range, - id Offset) { - } - void use(void) const {} - void use(void*) const {} - _ImplT __impl; -}; - -} // namespace sycl -} // namespace cl +#include "sycl.hpp" template __attribute__((sycl_kernel)) void kernel(Func kernelFunc) { diff --git a/clang/test/CodeGenSYCL/spir-no-deref-attr.cpp b/clang/test/CodeGenSYCL/spir-no-deref-attr.cpp index c87230d281525..60ef43199ecd1 100644 --- a/clang/test/CodeGenSYCL/spir-no-deref-attr.cpp +++ b/clang/test/CodeGenSYCL/spir-no-deref-attr.cpp @@ -1,4 +1,5 @@ -// RUN: %clang_cc1 -fno-sycl-use-bitcode -triple spir64-unknown-linux-sycldevice -std=c++11 -fsycl-is-device -disable-llvm-passes -S -emit-spirv -x c++ %s -o %t.spv +// RUN: %clang_cc1 -triple spir64-unknown-linux-sycldevice -std=c++11 -fsycl-is-device -disable-llvm-passes -emit-llvm-bc -x c++ %s -o %t.bc +// RUN: llvm-spirv -spirv-no-deref-attr %t.bc -o %t.spv // RUN: llvm-spirv %t.spv -to-text -o %t.txt // RUN: FileCheck < %t.txt %s --check-prefix=CHECK diff --git a/clang/test/CodeGenSYCL/struct_kernel_param.cpp b/clang/test/CodeGenSYCL/struct_kernel_param.cpp index c66ec4f2b16d7..089c3ab1d987e 100644 --- a/clang/test/CodeGenSYCL/struct_kernel_param.cpp +++ b/clang/test/CodeGenSYCL/struct_kernel_param.cpp @@ -6,6 +6,7 @@ // CHECK-NEXT: { kernel_param_kind_t::kind_accessor, 2014, 0 }, // CHECK-NEXT: { kernel_param_kind_t::kind_std_layout, 1, 0 }, // CHECK-NEXT: { kernel_param_kind_t::kind_std_layout, 1, 1 }, +// CHECK-NEXT: { kernel_param_kind_t::kind_std_layout, 1, 2 }, // CHECK-NEXT: { kernel_param_kind_t::kind_std_layout, 24, 4 }, // CHECK-EMPTY: // CHECK-NEXT:}; diff --git a/clang/test/CoverageMapping/unused_names.c b/clang/test/CoverageMapping/unused_names.c index bf0134c41ee41..649fa09b245f3 100644 --- a/clang/test/CoverageMapping/unused_names.c +++ b/clang/test/CoverageMapping/unused_names.c @@ -3,7 +3,7 @@ // RUN: FileCheck -check-prefix=SYSHEADER -input-file %t %s // CHECK-DAG: @__profc_bar -// CHECK-DAG: @__llvm_prf_nm = private constant {{.*}}, section "{{.*__llvm_prf_names|.*lprfn}}" +// CHECK-DAG: @__llvm_prf_nm = private constant {{.*}}, section "{{.*__llvm_prf_names|\.lprfn\$M}}" // These are never instantiated, so we shouldn't get counters for them. // diff --git a/clang/test/Driver/aarch64-cpus.c b/clang/test/Driver/aarch64-cpus.c index 900162f954032..8621112c0ad83 100644 --- a/clang/test/Driver/aarch64-cpus.c +++ b/clang/test/Driver/aarch64-cpus.c @@ -136,6 +136,22 @@ // ARM64-CORTEX-A75: "-cc1"{{.*}} "-triple" "arm64{{.*}}" "-target-cpu" "cortex-a75" // ARM64-CORTEX-A75-TUNE: "-cc1"{{.*}} "-triple" "arm64{{.*}}" "-target-cpu" "generic" +// RUN: %clang -target aarch64 -mcpu=cortex-a76 -### -c %s 2>&1 | FileCheck -check-prefix=CORTEX-A76 %s +// RUN: %clang -target aarch64 -mlittle-endian -mcpu=cortex-a76 -### -c %s 2>&1 | FileCheck -check-prefix=CORTEX-A76 %s +// RUN: %clang -target aarch64_be -mlittle-endian -mcpu=cortex-a76 -### -c %s 2>&1 | FileCheck -check-prefix=CORTEX-A76 %s +// RUN: %clang -target aarch64 -mtune=cortex-a76 -### -c %s 2>&1 | FileCheck -check-prefix=CORTEX-A76-TUNE %s +// RUN: %clang -target aarch64 -mlittle-endian -mtune=cortex-a76 -### -c %s 2>&1 | FileCheck -check-prefix=CORTEX-A76-TUNE %s +// RUN: %clang -target aarch64_be -mlittle-endian -mtune=cortex-a76 -### -c %s 2>&1 | FileCheck -check-prefix=CORTEX-A76-TUNE %s +// CORTEX-A76: "-cc1"{{.*}} "-triple" "aarch64{{(--)?}}"{{.*}} "-target-cpu" "cortex-a76" +// CORTEX-A76-TUNE: "-cc1"{{.*}} "-triple" "aarch64{{(--)?}}"{{.*}} "-target-cpu" "generic" + +// RUN: %clang -target arm64 -mcpu=cortex-a76 -### -c %s 2>&1 | FileCheck -check-prefix=ARM64-CORTEX-A76 %s +// RUN: %clang -target arm64 -mlittle-endian -mcpu=cortex-a76 -### -c %s 2>&1 | FileCheck -check-prefix=ARM64-CORTEX-A76 %s +// RUN: %clang -target arm64 -mtune=cortex-a76 -### -c %s 2>&1 | FileCheck -check-prefix=ARM64-CORTEX-A76-TUNE %s +// RUN: %clang -target arm64 -mlittle-endian -mtune=cortex-a76 -### -c %s 2>&1 | FileCheck -check-prefix=ARM64-CORTEX-A76-TUNE %s +// ARM64-CORTEX-A76: "-cc1"{{.*}} "-triple" "arm64{{.*}}" "-target-cpu" "cortex-a76" +// ARM64-CORTEX-A76-TUNE: "-cc1"{{.*}} "-triple" "arm64{{.*}}" "-target-cpu" "generic" + // RUN: %clang -target aarch64 -mcpu=exynos-m1 -### -c %s 2>&1 | FileCheck -check-prefix=M1 %s // RUN: %clang -target aarch64 -mlittle-endian -mcpu=exynos-m1 -### -c %s 2>&1 | FileCheck -check-prefix=M1 %s // RUN: %clang -target aarch64_be -mlittle-endian -mcpu=exynos-m1 -### -c %s 2>&1 | FileCheck -check-prefix=M1 %s diff --git a/clang/test/Driver/aarch64-dotprod.c b/clang/test/Driver/aarch64-dotprod.c index 0262cc75b77cc..a6d0c9c4e1cee 100644 --- a/clang/test/Driver/aarch64-dotprod.c +++ b/clang/test/Driver/aarch64-dotprod.c @@ -7,5 +7,6 @@ // RUN: %clang -### -target aarch64 -march=armv8.2a+dotprod %s 2>&1 | FileCheck %s // RUN: %clang -### -target aarch64 -march=armv8.3a+dotprod %s 2>&1 | FileCheck %s // RUN: %clang -### -target aarch64 -mcpu=cortex-a75 %s 2>&1 | FileCheck %s +// RUN: %clang -### -target aarch64 -mcpu=cortex-a76 %s 2>&1 | FileCheck %s // RUN: %clang -### -target aarch64 -mcpu=cortex-a55 %s 2>&1 | FileCheck %s // CHECK: "+dotprod" diff --git a/clang/test/Driver/aarch64-fixed-x-register.c b/clang/test/Driver/aarch64-fixed-x-register.c index bc7d993ed9abf..ed8e7c2013dbf 100644 --- a/clang/test/Driver/aarch64-fixed-x-register.c +++ b/clang/test/Driver/aarch64-fixed-x-register.c @@ -26,6 +26,34 @@ // RUN: FileCheck --check-prefix=CHECK-FIXED-X7 < %t %s // CHECK-FIXED-X7: "-target-feature" "+reserve-x7" +// RUN: %clang -target aarch64-none-gnu -ffixed-x9 -### %s 2> %t +// RUN: FileCheck --check-prefix=CHECK-FIXED-X9 < %t %s +// CHECK-FIXED-X9: "-target-feature" "+reserve-x9" + +// RUN: %clang -target aarch64-none-gnu -ffixed-x10 -### %s 2> %t +// RUN: FileCheck --check-prefix=CHECK-FIXED-X10 < %t %s +// CHECK-FIXED-X10: "-target-feature" "+reserve-x10" + +// RUN: %clang -target aarch64-none-gnu -ffixed-x11 -### %s 2> %t +// RUN: FileCheck --check-prefix=CHECK-FIXED-X11 < %t %s +// CHECK-FIXED-X11: "-target-feature" "+reserve-x11" + +// RUN: %clang -target aarch64-none-gnu -ffixed-x12 -### %s 2> %t +// RUN: FileCheck --check-prefix=CHECK-FIXED-X12 < %t %s +// CHECK-FIXED-X12: "-target-feature" "+reserve-x12" + +// RUN: %clang -target aarch64-none-gnu -ffixed-x13 -### %s 2> %t +// RUN: FileCheck --check-prefix=CHECK-FIXED-X13 < %t %s +// CHECK-FIXED-X13: "-target-feature" "+reserve-x13" + +// RUN: %clang -target aarch64-none-gnu -ffixed-x14 -### %s 2> %t +// RUN: FileCheck --check-prefix=CHECK-FIXED-X14 < %t %s +// CHECK-FIXED-X14: "-target-feature" "+reserve-x14" + +// RUN: %clang -target aarch64-none-gnu -ffixed-x15 -### %s 2> %t +// RUN: FileCheck --check-prefix=CHECK-FIXED-X15 < %t %s +// CHECK-FIXED-X15: "-target-feature" "+reserve-x15" + // RUN: %clang -target aarch64-none-gnu -ffixed-x18 -### %s 2> %t // RUN: FileCheck --check-prefix=CHECK-FIXED-X18 < %t %s // CHECK-FIXED-X18: "-target-feature" "+reserve-x18" @@ -34,6 +62,38 @@ // RUN: FileCheck --check-prefix=CHECK-FIXED-X20 < %t %s // CHECK-FIXED-X20: "-target-feature" "+reserve-x20" +// RUN: %clang -target aarch64-none-gnu -ffixed-x21 -### %s 2> %t +// RUN: FileCheck --check-prefix=CHECK-FIXED-X21 < %t %s +// CHECK-FIXED-X21: "-target-feature" "+reserve-x21" + +// RUN: %clang -target aarch64-none-gnu -ffixed-x22 -### %s 2> %t +// RUN: FileCheck --check-prefix=CHECK-FIXED-X22 < %t %s +// CHECK-FIXED-X22: "-target-feature" "+reserve-x22" + +// RUN: %clang -target aarch64-none-gnu -ffixed-x23 -### %s 2> %t +// RUN: FileCheck --check-prefix=CHECK-FIXED-X23 < %t %s +// CHECK-FIXED-X23: "-target-feature" "+reserve-x23" + +// RUN: %clang -target aarch64-none-gnu -ffixed-x24 -### %s 2> %t +// RUN: FileCheck --check-prefix=CHECK-FIXED-X24 < %t %s +// CHECK-FIXED-X24: "-target-feature" "+reserve-x24" + +// RUN: %clang -target aarch64-none-gnu -ffixed-x25 -### %s 2> %t +// RUN: FileCheck --check-prefix=CHECK-FIXED-X25 < %t %s +// CHECK-FIXED-X25: "-target-feature" "+reserve-x25" + +// RUN: %clang -target aarch64-none-gnu -ffixed-x26 -### %s 2> %t +// RUN: FileCheck --check-prefix=CHECK-FIXED-X26 < %t %s +// CHECK-FIXED-X26: "-target-feature" "+reserve-x26" + +// RUN: %clang -target aarch64-none-gnu -ffixed-x27 -### %s 2> %t +// RUN: FileCheck --check-prefix=CHECK-FIXED-X27 < %t %s +// CHECK-FIXED-X27: "-target-feature" "+reserve-x27" + +// RUN: %clang -target aarch64-none-gnu -ffixed-x28 -### %s 2> %t +// RUN: FileCheck --check-prefix=CHECK-FIXED-X28 < %t %s +// CHECK-FIXED-X28: "-target-feature" "+reserve-x28" + // Test multiple of reserve-x# options together. // RUN: %clang -target aarch64-none-gnu \ // RUN: -ffixed-x1 \ @@ -55,8 +115,23 @@ // RUN: -ffixed-x5 \ // RUN: -ffixed-x6 \ // RUN: -ffixed-x7 \ +// RUN: -ffixed-x9 \ +// RUN: -ffixed-x10 \ +// RUN: -ffixed-x11 \ +// RUN: -ffixed-x12 \ +// RUN: -ffixed-x13 \ +// RUN: -ffixed-x14 \ +// RUN: -ffixed-x15 \ // RUN: -ffixed-x18 \ // RUN: -ffixed-x20 \ +// RUN: -ffixed-x21 \ +// RUN: -ffixed-x22 \ +// RUN: -ffixed-x23 \ +// RUN: -ffixed-x24 \ +// RUN: -ffixed-x25 \ +// RUN: -ffixed-x26 \ +// RUN: -ffixed-x27 \ +// RUN: -ffixed-x28 \ // RUN: -### %s 2> %t // RUN: FileCheck \ // RUN: --check-prefix=CHECK-FIXED-X1 \ @@ -66,6 +141,21 @@ // RUN: --check-prefix=CHECK-FIXED-X5 \ // RUN: --check-prefix=CHECK-FIXED-X6 \ // RUN: --check-prefix=CHECK-FIXED-X7 \ +// RUN: --check-prefix=CHECK-FIXED-X9 \ +// RUN: --check-prefix=CHECK-FIXED-X10 \ +// RUN: --check-prefix=CHECK-FIXED-X11 \ +// RUN: --check-prefix=CHECK-FIXED-X12 \ +// RUN: --check-prefix=CHECK-FIXED-X13 \ +// RUN: --check-prefix=CHECK-FIXED-X14 \ +// RUN: --check-prefix=CHECK-FIXED-X15 \ // RUN: --check-prefix=CHECK-FIXED-X18 \ // RUN: --check-prefix=CHECK-FIXED-X20 \ +// RUN: --check-prefix=CHECK-FIXED-X21 \ +// RUN: --check-prefix=CHECK-FIXED-X22 \ +// RUN: --check-prefix=CHECK-FIXED-X23 \ +// RUN: --check-prefix=CHECK-FIXED-X24 \ +// RUN: --check-prefix=CHECK-FIXED-X25 \ +// RUN: --check-prefix=CHECK-FIXED-X26 \ +// RUN: --check-prefix=CHECK-FIXED-X27 \ +// RUN: --check-prefix=CHECK-FIXED-X28 \ // RUN: < %t %s diff --git a/clang/test/Driver/amdgpu-features.c b/clang/test/Driver/amdgpu-features.c index 15bcfed1550d1..6b0f103fb6bc7 100644 --- a/clang/test/Driver/amdgpu-features.c +++ b/clang/test/Driver/amdgpu-features.c @@ -4,7 +4,7 @@ // RUN: %clang -### -target amdgcn -x cl -S -emit-llvm -mcpu=kaveri -mamdgpu-debugger-abi=1.0 %s -o - 2>&1 \ // RUN: | FileCheck --check-prefix=CHECK-MAMDGPU-DEBUGGER-ABI-1-0 %s -// CHECK-MAMDGPU-DEBUGGER-ABI-1-0: "-target-feature" "+amdgpu-debugger-insert-nops" "-target-feature" "+amdgpu-debugger-emit-prologue" +// CHECK-MAMDGPU-DEBUGGER-ABI-1-0: the clang compiler does not support '-mamdgpu-debugger-abi=1.0' // RUN: %clang -### -target amdgcn -mcpu=gfx700 -mcode-object-v3 %s 2>&1 | FileCheck --check-prefix=CODE-OBJECT-V3 %s // CODE-OBJECT-V3: "-target-feature" "+code-object-v3" diff --git a/clang/test/Driver/arm-cortex-cpus.c b/clang/test/Driver/arm-cortex-cpus.c index 04554ee3bd992..cfb569312e0ba 100644 --- a/clang/test/Driver/arm-cortex-cpus.c +++ b/clang/test/Driver/arm-cortex-cpus.c @@ -667,8 +667,12 @@ // RUN: %clang -target arm -mcpu=cortex-a55 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV82A %s // RUN: %clang -target arm -mcpu=cortex-a75 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV82A %s +// RUN: %clang -target arm -mcpu=cortex-a76 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV82A %s +// RUN: %clang -target arm -mcpu=cortex-a76ae -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV82A %s // RUN: %clang -target arm -mcpu=cortex-a55 -mlittle-endian -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV82A %s // RUN: %clang -target arm -mcpu=cortex-a75 -mlittle-endian -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV82A %s +// RUN: %clang -target arm -mcpu=cortex-a76 -mlittle-endian -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV82A %s +// RUN: %clang -target arm -mcpu=cortex-a76ae -mlittle-endian -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV82A %s // // RUN: %clang -target arm -mcpu=exynos-m4 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV82A %s // RUN: %clang -target arm -mcpu=exynos-m4 -mlittle-endian -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV82A %s @@ -697,8 +701,12 @@ // RUN: %clang -target armeb -mcpu=cortex-a55 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE-CPUV82A %s // RUN: %clang -target armeb -mcpu=cortex-a75 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE-CPUV82A %s +// RUN: %clang -target armeb -mcpu=cortex-a76 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE-CPUV82A %s +// RUN: %clang -target armeb -mcpu=cortex-a76ae -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE-CPUV82A %s // RUN: %clang -target arm -mcpu=cortex-a55 -mbig-endian -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE-CPUV82A %s // RUN: %clang -target arm -mcpu=cortex-a75 -mbig-endian -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE-CPUV82A %s +// RUN: %clang -target arm -mcpu=cortex-a76 -mbig-endian -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE-CPUV82A %s +// RUN: %clang -target arm -mcpu=cortex-a76ae -mbig-endian -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE-CPUV82A %s // // RUN: %clang -target armeb -mcpu=exynos-m4 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE-CPUV82A %s // RUN: %clang -target arm -mcpu=exynos-m4 -mbig-endian -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE-CPUV82A %s @@ -730,8 +738,12 @@ // RUN: %clang -target arm -mcpu=cortex-a55 -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV82A-THUMB %s // RUN: %clang -target arm -mcpu=cortex-a75 -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV82A-THUMB %s +// RUN: %clang -target arm -mcpu=cortex-a76 -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV82A-THUMB %s +// RUN: %clang -target arm -mcpu=cortex-a76ae -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV82A-THUMB %s // RUN: %clang -target arm -mcpu=cortex-a55 -mlittle-endian -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV82A-THUMB %s // RUN: %clang -target arm -mcpu=cortex-a75 -mlittle-endian -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV82A-THUMB %s +// RUN: %clang -target arm -mcpu=cortex-a76 -mlittle-endian -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV82A-THUMB %s +// RUN: %clang -target arm -mcpu=cortex-a76ae -mlittle-endian -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV82A-THUMB %s // // RUN: %clang -target arm -mcpu=exynos-m4 -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV82A-THUMB %s // RUN: %clang -target arm -mcpu=exynos-m4 -mlittle-endian -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV82A-THUMB %s @@ -760,8 +772,12 @@ // RUN: %clang -target armeb -mcpu=cortex-a55 -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE-CPUV82A-THUMB %s // RUN: %clang -target armeb -mcpu=cortex-a75 -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE-CPUV82A-THUMB %s +// RUN: %clang -target armeb -mcpu=cortex-a76 -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE-CPUV82A-THUMB %s +// RUN: %clang -target armeb -mcpu=cortex-a76ae -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE-CPUV82A-THUMB %s // RUN: %clang -target arm -mcpu=cortex-a55 -mbig-endian -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE-CPUV82A-THUMB %s // RUN: %clang -target arm -mcpu=cortex-a75 -mbig-endian -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE-CPUV82A-THUMB %s +// RUN: %clang -target arm -mcpu=cortex-a76 -mbig-endian -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE-CPUV82A-THUMB %s +// RUN: %clang -target arm -mcpu=cortex-a76ae -mbig-endian -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE-CPUV82A-THUMB %s // // RUN: %clang -target armeb -mcpu=exynos-m4 -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE-CPUV82A-THUMB %s // RUN: %clang -target arm -mcpu=exynos-m4 -mbig-endian -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE-CPUV82A-THUMB %s @@ -785,6 +801,24 @@ // CHECK-CORTEX-A75-SOFT: "-target-feature" "+soft-float" // CHECK-CORTEX-A75-SOFT: "-target-feature" "+soft-float-abi" +// RUN: %clang -target armv8a-arm-none-eabi -mcpu=cortex-a76 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CORTEX-A76 %s +// RUN: %clang -target armv8a-arm-none-eabi -mcpu=cortex-a76 -mfpu=crypto-neon-fp-armv8 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CORTEX-A76-MFPU %s +// RUN: %clang -target armv8a-arm-none-eabi -mcpu=cortex-a76 -mfloat-abi=soft -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CORTEX-A76-SOFT %s +// CHECK-CORTEX-A76: "-cc1"{{.*}} "-triple" "armv8.2a-{{.*}} "-target-cpu" "cortex-a76" +// CHECK-CORTEX-A76-MFPU: "-cc1"{{.*}} "-target-feature" "+fp-armv8" +// CHECK-CORTEX-A76-MFPU: "-target-feature" "+crypto" +// CHECK-CORTEX-A76-SOFT: "-target-feature" "+soft-float" +// CHECK-CORTEX-A76-SOFT: "-target-feature" "+soft-float-abi" + +// RUN: %clang -target armv8a-arm-none-eabi -mcpu=cortex-a76ae -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CORTEX-A76AE %s +// RUN: %clang -target armv8a-arm-none-eabi -mcpu=cortex-a76ae -mfpu=crypto-neon-fp-armv8 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CORTEX-A76AE-MFPU %s +// RUN: %clang -target armv8a-arm-none-eabi -mcpu=cortex-a76ae -mfloat-abi=soft -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CORTEX-A76AE-SOFT %s +// CHECK-CORTEX-A76AE: "-cc1"{{.*}} "-triple" "armv8.2a-{{.*}} "-target-cpu" "cortex-a76ae" +// CHECK-CORTEX-A76AE-MFPU: "-cc1"{{.*}} "-target-feature" "+fp-armv8" +// CHECK-CORTEX-A76AE-MFPU: "-target-feature" "+crypto" +// CHECK-CORTEX-A76AE-SOFT: "-target-feature" "+soft-float" +// CHECK-CORTEX-A76AE-SOFT: "-target-feature" "+soft-float-abi" + // RUN: %clang -target arm -mcpu=cortex-m23 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV8MBASE %s // CHECK-CPUV8MBASE: "-cc1"{{.*}} "-triple" "thumbv8m.base- diff --git a/clang/test/Driver/arm-dotprod.c b/clang/test/Driver/arm-dotprod.c index 971e0de08863d..d2afdf0b13daa 100644 --- a/clang/test/Driver/arm-dotprod.c +++ b/clang/test/Driver/arm-dotprod.c @@ -7,6 +7,8 @@ // RUN: %clang -### -target arm-linux-eabi -march=armv8.2a+dotprod %s 2>&1 | FileCheck %s // RUN: %clang -### -target arm-linux-eabi -march=armv8.3a+dotprod %s 2>&1 | FileCheck %s // RUN: %clang -### -target arm-linux-eabi -mcpu=cortex-a75 %s 2>&1 | FileCheck %s +// RUN: %clang -### -target arm-linux-eabi -mcpu=cortex-a76 %s 2>&1 | FileCheck %s +// RUN: %clang -### -target arm-linux-eabi -mcpu=cortex-a76ae %s 2>&1 | FileCheck %s // RUN: %clang -### -target arm-linux-eabi -mcpu=cortex-a55 %s 2>&1 | FileCheck %s // CHECK: "+dotprod" @@ -17,6 +19,10 @@ // RUN: | FileCheck %s --check-prefix=CHECK-NO-DOTPROD // RUN: %clang -### -target arm -mcpu=cortex-a75 %s 2>&1 \ // RUN: | FileCheck %s --check-prefix=CHECK-NO-DOTPROD +// RUN: %clang -### -target arm -mcpu=cortex-a76 %s 2>&1 \ +// RUN: | FileCheck %s --check-prefix=CHECK-NO-DOTPROD +// RUN: %clang -### -target arm -mcpu=cortex-a76ae %s 2>&1 \ +// RUN: | FileCheck %s --check-prefix=CHECK-NO-DOTPROD // RUN: %clang -### -target arm -mcpu=cortex-a55 %s 2>&1 \ // RUN: | FileCheck %s --check-prefix=CHECK-NO-DOTPROD // We rely on the backend disabling dotprod as it depends on neon, so check that diff --git a/clang/test/Driver/arm-float-abi.c b/clang/test/Driver/arm-float-abi.c index e5b42c96960f0..9a76d1ee39c45 100644 --- a/clang/test/Driver/arm-float-abi.c +++ b/clang/test/Driver/arm-float-abi.c @@ -4,3 +4,13 @@ // ARMV7-ERROR: unsupported option '-mfloat-abi=hard' for target 'thumbv7' // NOERROR-NOT: unsupported option + +// RUN: %clang -target armv7-linux-androideabi21 %s -### -c 2>&1 \ +// RUN: | FileCheck --check-prefix=CHECK-ARM7-ANDROID %s +// CHECK-ARM7-ANDROID-NOT: "-target-feature" "+soft-float" +// CHECK-ARM7-ANDROID: "-target-feature" "+soft-float-abi" + +// RUN: %clang -target armv8-linux-androideabi21 %s -### -c 2>&1 \ +// RUN: | FileCheck --check-prefix=CHECK-ARM8-ANDROID %s +// CHECK-ARM8-ANDROID-NOT: "-target-feature" "+soft-float" +// CHECK-ARM8-ANDROID: "-target-feature" "+soft-float-abi" diff --git a/clang/test/Driver/arm-mfpu.c b/clang/test/Driver/arm-mfpu.c index c3a644f2412df..135207784875e 100644 --- a/clang/test/Driver/arm-mfpu.c +++ b/clang/test/Driver/arm-mfpu.c @@ -376,55 +376,23 @@ // CHECK-ARM5-ANDROID-FP-DEFAULT-NOT: "-target-feature" "+neon" // CHECK-ARM5-ANDROID-FP-DEFAULT-NOT: "-target-feature" "+crypto" -// RUN: %clang -target arm-linux-androideabi21 -march=armv7-a %s -### -c 2>&1 \ -// RUN: | FileCheck --check-prefix=CHECK-MARCH-ARM7-ANDROID-FP %s -// CHECK-MARCH-ARM7-ANDROID-FP-NOT: "-target-feature" "+soft-float" -// CHECK-MARCH-ARM7-ANDROID-FP: "-target-feature" "+soft-float-abi" -// CHECK-MARCH-ARM7-ANDROID-FP: "-target-feature" "+d16" -// CHECK-MARCH-ARM7-ANDROID-FP: "-target-feature" "+vfp3" -// CHECK-MARCH-ARM7-ANDROID-FP-NOT: "-target-feature" "+vfp4" -// CHECK-MARCH-ARM7-ANDROID-FP-NOT: "-target-feature" "+fp-armv8" -// CHECK-MARCH-ARM7-ANDROID-FP-NOT: "-target-feature" "+neon" -// CHECK-MARCH-ARM7-ANDROID-FP-NOT: "-target-feature" "+crypto" - // RUN: %clang -target armv7-linux-androideabi21 %s -### -c 2>&1 \ -// RUN: | FileCheck --check-prefix=CHECK-ARM-ANDROID-L-FP-DEFAULT %s -// CHECK-ARM-ANDROID-L-FP-DEFAULT-NOT: "-target-feature" "+soft-float" -// CHECK-ARM-ANDROID-L-FP-DEFAULT: "-target-feature" "+soft-float-abi" -// CHECK-ARM-ANDROID-L-FP-DEFAULT: "-target-feature" "+d16" -// CHECK-ARM-ANDROID-L-FP-DEFAULT: "-target-feature" "+vfp3" -// CHECK-ARM-ANDROID-L-FP-DEFAULT-NOT: "-target-feature" "+vfp4" -// CHECK-ARM-ANDROID-L-FP-DEFAULT-NOT: "-target-feature" "+fp-armv8" -// CHECK-ARM-ANDROID-L-FP-DEFAULT-NOT: "-target-feature" "+neon" -// CHECK-ARM-ANDROID-L-FP-DEFAULT-NOT: "-target-feature" "+crypto" - -// RUN: %clang -target armv7-linux-androideabi21 -mfpu=neon %s -### -c 2>&1 \ -// RUN: | FileCheck --check-prefix=CHECK-ARM-ANDROID-L-FP-NEON %s -// CHECK-ARM-ANDROID-L-FP-NEON-NOT: "-target-feature" "+soft-float" -// CHECK-ARM-ANDROID-L-FP-NEON: "-target-feature" "+soft-float-abi" -// CHECK-ARM-ANDROID-L-FP-NEON: "-target-feature" "+vfp3" -// CHECK-ARM-ANDROID-L-FP-NEON-NOT: "-target-feature" "+vfp4" -// CHECK-ARM-ANDROID-L-FP-NEON-NOT: "-target-feature" "+fp-armv8" -// CHECK-ARM-ANDROID-L-FP-NEON: "-target-feature" "+neon" -// CHECK-ARM-ANDROID-L-FP-NEON-NOT: "-target-feature" "+crypto" - -// RUN: %clang -target armv7-linux-androideabi23 %s -### -c 2>&1 \ -// RUN: | FileCheck --check-prefix=CHECK-ARM-ANDROID-M-FP-DEFAULT %s -// CHECK-ARM-ANDROID-M-FP-DEFAULT-NOT: "-target-feature" "+soft-float" -// CHECK-ARM-ANDROID-M-FP-DEFAULT: "-target-feature" "+soft-float-abi" -// CHECK-ARM-ANDROID-M-FP-DEFAULT: "-target-feature" "+vfp3" -// CHECK-ARM-ANDROID-M-FP-DEFAULT-NOT: "-target-feature" "+vfp4" -// CHECK-ARM-ANDROID-M-FP-DEFAULT-NOT: "-target-feature" "+fp-armv8" -// CHECK-ARM-ANDROID-M-FP-DEFAULT: "-target-feature" "+neon" -// CHECK-ARM-ANDROID-M-FP-DEFAULT-NOT: "-target-feature" "+crypto" - -// RUN: %clang -target armv7-linux-androideabi23 %s -mfpu=vfp3-d16 -### -c 2>&1 \ -// RUN: | FileCheck --check-prefix=CHECK-ARM-ANDROID-M-FP-D16 %s -// CHECK-ARM-ANDROID-M-FP-D16-NOT: "-target-feature" "+soft-float" -// CHECK-ARM-ANDROID-M-FP-D16: "-target-feature" "+soft-float-abi" -// CHECK-ARM-ANDROID-M-FP-D16: "-target-feature" "+d16" -// CHECK-ARM-ANDROID-M-FP-D16: "-target-feature" "+vfp3" -// CHECK-ARM-ANDROID-M-FP-D16-NOT: "-target-feature" "+vfp4" -// CHECK-ARM-ANDROID-M-FP-D16-NOT: "-target-feature" "+fp-armv8" -// CHECK-ARM-ANDROID-M-FP-D16-NOT: "-target-feature" "+neon" -// CHECK-ARM-ANDROID-M-FP-D16-NOT: "-target-feature" "+crypto" +// RUN: | FileCheck --check-prefix=CHECK-ARM7-ANDROID-FP-DEFAULT %s +// CHECK-ARM7-ANDROID-FP-DEFAULT-NOT: "-target-feature" "+soft-float" +// CHECK-ARM7-ANDROID-FP-DEFAULT: "-target-feature" "+soft-float-abi" +// CHECK-ARM7-ANDROID-FP-DEFAULT: "-target-feature" "+vfp3" +// CHECK-ARM7-ANDROID-FP-DEFAULT-NOT: "-target-feature" "+vfp4" +// CHECK-ARM7-ANDROID-FP-DEFAULT-NOT: "-target-feature" "+fp-armv8" +// CHECK-ARM7-ANDROID-FP-DEFAULT: "-target-feature" "+neon" +// CHECK-ARM7-ANDROID-FP-DEFAULT-NOT: "-target-feature" "+crypto" + +// RUN: %clang -target armv7-linux-androideabi21 %s -mfpu=vfp3-d16 -### -c 2>&1 \ +// RUN: | FileCheck --check-prefix=CHECK-ARM7-ANDROID-FP-D16 %s +// CHECK-ARM7-ANDROID-FP-D16-NOT: "-target-feature" "+soft-float" +// CHECK-ARM7-ANDROID-FP-D16: "-target-feature" "+soft-float-abi" +// CHECK-ARM7-ANDROID-FP-D16: "-target-feature" "+d16" +// CHECK-ARM7-ANDROID-FP-D16: "-target-feature" "+vfp3" +// CHECK-ARM7-ANDROID-FP-D16-NOT: "-target-feature" "+vfp4" +// CHECK-ARM7-ANDROID-FP-D16-NOT: "-target-feature" "+fp-armv8" +// CHECK-ARM7-ANDROID-FP-D16-NOT: "-target-feature" "+neon" +// CHECK-ARM7-ANDROID-FP-D16-NOT: "-target-feature" "+crypto" diff --git a/clang/test/Driver/cl-options.c b/clang/test/Driver/cl-options.c index 4087ef3b8c324..9c6bb36877c11 100644 --- a/clang/test/Driver/cl-options.c +++ b/clang/test/Driver/cl-options.c @@ -178,6 +178,10 @@ // Oy_2: -momit-leaf-frame-pointer // Oy_2: -O2 +// RUN: %clang_cl --target=aarch64-pc-windows-msvc -Werror /Oy- /O2 -### -- %s 2>&1 | FileCheck -check-prefix=Oy_aarch64 %s +// Oy_aarch64: -mdisable-fp-elim +// Oy_aarch64: -O2 + // RUN: %clang_cl --target=i686-pc-win32 -Werror /O2 /O2 -### -- %s 2>&1 | FileCheck -check-prefix=O2O2 %s // O2O2: "-O2" @@ -619,6 +623,7 @@ // RUN: -fmerge-all-constants \ // RUN: -no-canonical-prefixes \ // RUN: -march=skylake \ +// RUN: -fbracket-depth=123 \ // RUN: --version \ // RUN: -Werror /Zs -- %s 2>&1 diff --git a/clang/test/Driver/clang-offload-wrapper.ll b/clang/test/Driver/clang-offload-wrapper.ll index 3e86fe0733ff1..01d833a9244e0 100644 --- a/clang/test/Driver/clang-offload-wrapper.ll +++ b/clang/test/Driver/clang-offload-wrapper.ll @@ -3,75 +3,149 @@ // // Check help message. // + // RUN: clang-offload-wrapper --help | FileCheck %s --check-prefix CHECK-HELP // CHECK-HELP: {{.*}}OVERVIEW: A tool to create a wrapper bitcode for offload target binaries. -// CHECK-HELP: {{.*}}Takes offload target binaries as input and produces bitcode file containing -// CHECK-HELP: {{.*}}target binaries packaged as data and initialization code which registers target -// CHECK-HELP: {{.*}}binaries in offload runtime. +// CHECK-HELP: {{.*}}Takes offload target binaries and optional manifest files as input +// CHECK-HELP: {{.*}}and produces bitcode file containing target binaries packaged as data +// CHECK-HELP: {{.*}}and initialization code which registers target binaries in the offload +// CHECK-HELP: {{.*}}runtime. Manifest files format and contents are not restricted and are +// CHECK-HELP: {{.*}}a subject of agreement between the device compiler and the native +// CHECK-HELP: {{.*}}runtime for that device. When present, manifest file name should +// CHECK-HELP: {{.*}}immediately follow the corresponding device image filename on the +// CHECK-HELP: {{.*}}command line. Options annotating a device binary have effect on all +// CHECK-HELP: {{.*}}subsequent input, until redefined. For example: +// CHECK-HELP: {{.*}}$clang-offload-wrapper -host x86_64-pc-linux-gnu \ +// CHECK-HELP: {{.*}} -kind=sycl -target=spir64 -format=spirv -build-opts=-g \ +// CHECK-HELP: {{.*}} a.spv a_mf.txt \ +// CHECK-HELP: {{.*}} -target=xxx -format=native -build-opts="" \ +// CHECK-HELP: {{.*}} b.bin b_mf.txt \ +// CHECK-HELP: {{.*}} -kind=openmp \ +// CHECK-HELP: {{.*}} c.bin +// CHECK-HELP: {{.*}}will generate an x86 wrapper object (.bc) enclosing the following +// CHECK-HELP: {{.*}}tuples describing a single device binary each ('-' means 'none') +// CHECK-HELP: {{.*}}offload kind | target | data format | data | manifest | build options: +// CHECK-HELP: {{.*}}---------------------------------------------------------------------- +// CHECK-HELP: {{.*}} sycl | spir64 | spirv | a.spv| a_mf.txt | -g +// CHECK-HELP: {{.*}} sycl | xxx | native | b.bin| b_mf.txt | - +// CHECK-HELP: {{.*}} openmp | xxx | native | c.bin| - | - // CHECK-HELP: {{.*}}USAGE: clang-offload-wrapper [options] -// CHECK-HELP: {{.*}}-desc-name= - Specifies offload descriptor symbol name: '..', and makes it globally visible -// CHECK-HELP: {{.*}}-emit-entry-table - Emit offload entry table -// CHECK-HELP: {{.*}}-emit-reg-funcs - Emit [un-]registration functions -// CHECK-HELP: {{.*}}-o= - Output filename -// CHECK-HELP: {{.*}}-reg-func-name= - Offload descriptor registration function name -// CHECK-HELP: {{.*}}-target= - Offload kind + target triple of the wrapper object: - -// CHECK-HELP: {{.*}}-unreg-func-name= - Offload descriptor un-registration function name +// CHECK-HELP: {{.*}}OPTIONS: +// CHECK-HELP: {{.*}}clang-offload-wrapper options: +// CHECK-HELP: {{.*}} -build-opts= - build options passed to the offload runtime +// CHECK-HELP: {{.*}} -desc-name= - Specifies offload descriptor symbol name: '..', and makes it globally visible +// CHECK-HELP: {{.*}} -emit-reg-funcs - Emit [un-]registration functions +// CHECK-HELP: {{.*}} -format - device binary image formats: +// CHECK-HELP: {{.*}} =none - not set +// CHECK-HELP: {{.*}} =native - unknown or native +// CHECK-HELP: {{.*}} =spirv - SPIRV binary +// CHECK-HELP: {{.*}} =llvmbc - LLVMIR bitcode +// CHECK-HELP: {{.*}} -host= - wrapper object target triple +// CHECK-HELP: {{.*}} -kind - offload kind: +// CHECK-HELP: {{.*}} =unknown - unknown +// CHECK-HELP: {{.*}} =host - host +// CHECK-HELP: {{.*}} =openmp - OpenMP +// CHECK-HELP: {{.*}} =hip - HIP +// CHECK-HELP: {{.*}} =sycl - SYCL +// CHECK-HELP: {{.*}} -o= - Output filename +// CHECK-HELP: {{.*}} -reg-func-name= - Offload descriptor registration function name +// CHECK-HELP: {{.*}} -target= - offload target triple +// CHECK-HELP: {{.*}} -unreg-func-name= - Offload descriptor un-registration function name +// CHECK-HELP: {{.*}} -v - verbose output // ------- -// Generate a file to wrap. +// Generate files to wrap. // -// RUN: echo 'Content of device file' > %t.tgt +// RUN: echo 'Content of device file1' > %t1.tgt +// RUN: echo 'Content of device file2' > %t2.tgt +// RUN: echo 'Content of device file3' > %t3.tgt +// RUN: echo 'Content of manifest file1' > %t1_mf.txt // // ------- // Check bitcode produced by the wrapper tool. // -// RUN: clang-offload-wrapper -target=openmp-x86_64-pc-linux-gnu -o - %t.tgt | llvm-dis | FileCheck %s --check-prefix CHECK-IR - +// RUN: clang-offload-wrapper \ +// RUN: -host=x86_64-pc-linux-gnu \ +// RUN: -kind=openmp -target=tg2 -format=native %t3.tgt %t1_mf.txt \ +// RUN: -kind=sycl -target=tg1 -build-opts=-g -format spirv %t1.tgt \ +// RUN: -target=tg2 -build-opts= -format native %t2.tgt \ +// RUN: -o - | llvm-dis | FileCheck %s --check-prefix CHECK-IR + +// CHECK-IR: source_filename = "offload.wrapper.object" // CHECK-IR: target triple = "x86_64-pc-linux-gnu" -// CHECK-IR-DAG: [[ENTTY:%.+]] = type { i8*, i8*, i{{32|64}}, i32, i32 } -// CHECK-IR-DAG: [[IMAGETY:%.+]] = type { i8*, i8*, [[ENTTY]]*, [[ENTTY]]* } -// CHECK-IR-DAG: [[DESCTY:%.+]] = type { i32, [[IMAGETY]]*, [[ENTTY]]*, [[ENTTY]]* } +// CHECK-IR: [[ENTRYTY:%.+]] = type { i8*, i8*, i64, i32, i32 } +// CHECK-IR: [[IMGTY:%.+]] = type { i16, i8, i8, i8*, i8*, i8*, i8*, i8*, i8*, [[ENTRYTY]]*, [[ENTRYTY]]* } +// CHECK-IR: [[DESCTY:%.+]] = type { i16, i16, [[IMGTY]]*, [[ENTRYTY]]*, [[ENTRYTY]]* } +// CHECK-IR: [[OMP_ENTRIESB:@.+]] = external constant [[ENTRYTY]] +// CHECK-IR: [[OMP_ENTRIESE:@.+]] = external constant [[ENTRYTY]] -// CHECK-IR: [[ENTBEGIN:@.+]] = external constant [[ENTTY]] -// CHECK-IR: [[ENTEND:@.+]] = external constant [[ENTTY]] +// CHECK-IR: [[OMP_TGT0:@.+]] = internal unnamed_addr constant [4 x i8] c"tg2\00" +// CHECK-IR: [[OMP_OPTS0:@.+]] = internal unnamed_addr constant [1 x i8] zeroinitializer +// CHECK-IR: [[OMP_MANIF0:@.+]] = internal unnamed_addr constant [26 x i8] c"Content of manifest file1\0A" +// CHECK-IR: [[OMP_BIN0:@.+]] = internal unnamed_addr constant [24 x i8] c"Content of device file3\0A" -// CHECK-IR: [[BIN:@.+]] = internal unnamed_addr constant [[BINTY:\[[0-9]+ x i8\]]] c"Content of device file{{.+}}" +// CHECK-IR: [[OMP_IMGS:@.+]] = internal unnamed_addr constant [1 x [[IMGTY]]] [{{.+}} { i16 1, i8 2, i8 1, i8* [[GEP:getelementptr inbounds]] ([4 x i8], [4 x i8]* [[OMP_TGT0]], i64 0, i64 0), i8* [[GEP]] ([1 x i8], [1 x i8]* [[OMP_OPTS0]], i64 0, i64 0), i8* [[GEP]] ([26 x i8], [26 x i8]* [[OMP_MANIF0]], i64 0, i64 0), i8* [[GEP]] ([26 x i8], [26 x i8]* [[OMP_MANIF0]], i64 1, i64 0), i8* [[GEP]] ([24 x i8], [24 x i8]* [[OMP_BIN0]], i64 0, i64 0), i8* [[GEP]] ([24 x i8], [24 x i8]* [[OMP_BIN0]], i64 1, i64 0), [[ENTRYTY]]* [[OMP_ENTRIESB]], [[ENTRYTY]]* [[OMP_ENTRIESE]] }] -// CHECK-IR: [[IMAGES:@.+]] = internal unnamed_addr constant [1 x [[IMAGETY]]] [{{.+}} { i8* getelementptr inbounds ([[BINTY]], [[BINTY]]* [[BIN]], i64 0, i64 0), i8* getelementptr inbounds ([[BINTY]], [[BINTY]]* [[BIN]], i64 1, i64 0), [[ENTTY]]* [[ENTBEGIN]], [[ENTTY]]* [[ENTEND]] }] +// CHECK-IR: [[OMP_DESC:@.+]] = internal constant [[DESCTY]] { i16 1, i16 1, [[IMGTY]]* [[GEP]] ([1 x [[IMGTY]]], [1 x [[IMGTY]]]* [[OMP_IMGS]], i64 0, i64 0), [[ENTRYTY]]* [[OMP_ENTRIESB]], [[ENTRYTY]]* [[OMP_ENTRIESE]] } -// CHECK-IR: [[DESC:@.+]] = internal constant [[DESCTY]] { i32 1, [[IMAGETY]]* getelementptr inbounds ([1 x [[IMAGETY]]], [1 x [[IMAGETY]]]* [[IMAGES]], i64 0, i64 0), [[ENTTY]]* [[ENTBEGIN]], [[ENTTY]]* [[ENTEND]] } +// CHECK-IR: [[SYCL_TGT0:@.+]] = internal unnamed_addr constant [4 x i8] c"tg1\00" +// CHECK-IR: [[SYCL_OPTS0:@.+]] = internal unnamed_addr constant [3 x i8] c"-g\00" +// CHECK-IR: [[SYCL_BIN0:@.+]] = internal unnamed_addr constant [24 x i8] c"Content of device file1\0A" -// CHECK-IR: @llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 0, void ()* [[REGFN:@.+]], i8* null }] -// CHECK-IR: @llvm.global_dtors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 0, void ()* [[UNREGFN:@.+]], i8* null }] +// CHECK-IR: [[SYCL_TGT1:@.+]] = internal unnamed_addr constant [4 x i8] c"tg2\00" +// CHECK-IR: [[SYCL_OPTS1:@.+]] = internal unnamed_addr constant [1 x i8] zeroinitializer +// CHECK-IR: [[SYCL_BIN1:@.+]] = internal unnamed_addr constant [24 x i8] c"Content of device file2\0A" -// CHECK-IR: define internal void [[REGFN]]() -// CHECK-IR: call void @__tgt_register_lib([[DESCTY]]* [[DESC]]) -// CHECK-IR: ret void +// CHECK-IR: [[SYCL_IMGS:@.+]] = internal unnamed_addr constant [2 x [[IMGTY]]] [{{.+}} { i16 1, i8 4, i8 2, i8* [[GEP]] ([4 x i8], [4 x i8]* [[SYCL_TGT0]], i64 0, i64 0), i8* [[GEP]] ([3 x i8], [3 x i8]* [[SYCL_OPTS0]], i64 0, i64 0), i8* null, i8* null, i8* [[GEP]] ([24 x i8], [24 x i8]* [[SYCL_BIN0]], i64 0, i64 0), i8* [[GEP]] ([24 x i8], [24 x i8]* [[SYCL_BIN0]], i64 1, i64 0), [[ENTRYTY]]* null, [[ENTRYTY]]* null }, [[IMGTY]] { i16 1, i8 4, i8 1, i8* [[GEP]] ([4 x i8], [4 x i8]* [[SYCL_TGT1]], i64 0, i64 0), i8* [[GEP]] ([1 x i8], [1 x i8]* [[SYCL_OPTS1]], i64 0, i64 0), i8* null, i8* null, i8* [[GEP]] ([24 x i8], [24 x i8]* [[SYCL_BIN1]], i64 0, i64 0), i8* [[GEP]] ([24 x i8], [24 x i8]* [[SYCL_BIN1]], i64 1, i64 0), [[ENTRYTY]]* null, [[ENTRYTY]]* null }] -// CHECK-IR: declare void @__tgt_register_lib([[DESCTY]]*) +// CHECK-IR: [[SYCL_DESC:@.+]] = internal constant [[DESCTY]] { i16 1, i16 2, [[IMGTY]]* [[GEP]] ([2 x [[IMGTY]]], [2 x [[IMGTY]]]* [[SYCL_IMGS]], i64 0, i64 0), [[ENTRYTY]]* null, [[ENTRYTY]]* null } -// CHECK-IR: define internal void [[UNREGFN]]() -// CHECK-IR: call void @__tgt_unregister_lib([[DESCTY]]* [[DESC]]) -// CHECK-IR: ret void +// CHECK-IR: @llvm.global_ctors = appending global [2 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 0, void ()* [[OMP_REGF:@.+]], i8* null }, { i32, void ()*, i8* } { i32 0, void ()* @.sycl_offloading.descriptor_reg, i8* null }] + +// CHECK-IR: @llvm.global_dtors = appending global [2 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 0, void ()* [[OMP_UNREGF:@.+]], i8* null }, { i32, void ()*, i8* } { i32 0, void ()* @.sycl_offloading.descriptor_unreg, i8* null }] +// CHECK-IR: define internal void [[OMP_REGF]]() section ".text.startup" { +// CHECK-IR: entry: +// CHECK-IR: call void @__tgt_register_lib([[DESCTY]]* [[OMP_DESC]]) +// CHECK-IR: ret void +// CHECK-IR: } +// CHECK-IR: declare void @__tgt_register_lib([[DESCTY]]*) +// CHECK-IR: define internal void [[OMP_UNREGF]]() section ".text.startup" { +// CHECK-IR: entry: +// CHECK-IR: call void @__tgt_unregister_lib([[DESCTY]]* [[OMP_DESC]]) +// CHECK-IR: ret void +// CHECK-IR: } // CHECK-IR: declare void @__tgt_unregister_lib([[DESCTY]]*) +// CHECK-IR: define internal void @.sycl_offloading.descriptor_reg() section ".text.startup" { +// CHECK-IR: entry: +// CHECK-IR: call void @__tgt_register_lib([[DESCTY]]* [[SYCL_DESC]]) +// CHECK-IR: ret void +// CHECK-IR: } +// CHECK-IR: define internal void @.sycl_offloading.descriptor_unreg() section ".text.startup" { +// CHECK-IR: entry: +// CHECK-IR: call void @__tgt_unregister_lib([[DESCTY]]* [[SYCL_DESC]]) +// CHECK-IR: ret void +// CHECK-IR: } // ------- -// Check options' effects: -emit-reg-funcs, -emit-entry-table=0, -desc-name +// Check options' effects: -emit-reg-funcs, -desc-name +// +// RUN: echo 'Content of device file' > %t.tgt // -// RUN: clang-offload-wrapper -target=sycl-x86_64-pc-linux-gnu -emit-reg-funcs=0 -emit-entry-table=0 -desc-name=lalala -o - %t.tgt | llvm-dis | FileCheck %s --check-prefix CHECK-IR1 +// RUN: clang-offload-wrapper -kind sycl -host=x86_64-pc-linux-gnu -emit-reg-funcs=0 -desc-name=lalala -o - %t.tgt | llvm-dis | FileCheck %s --check-prefix CHECK-IR1 // CHECK-IR1: source_filename = "offload.wrapper.object" -// CHECK-IR1: [[IMAGETY:%.+]] = type { i8*, i8* } -// CHECK-IR1: [[DESCTY:%.+]] = type { i32, [[IMAGETY]]* } +// CHECK-IR1: [[IMAGETY:%.+]] = type { i16, i8, i8, i8*, i8*, i8*, i8*, i8*, i8*, %__tgt_offload_entry*, %__tgt_offload_entry* } +// CHECK-IR1: [[ENTTY:%.+]] = type { i8*, i8*, i64, i32, i32 } +// CHECK-IR1: [[DESCTY:%.+]] = type { i16, i16, [[IMAGETY]]*, [[ENTTY]]*, [[ENTTY]]* } // CHECK-IR1-NOT: @llvm.global_ctors // CHECK-IR1-NOT: @llvm.global_dtors -// CHECK-IR1: @.sycl_offloading.lalala = constant [[DESCTY]] { i32 1, [[IMAGETY]]* getelementptr inbounds ([1 x [[IMAGETY]]], [1 x [[IMAGETY]]]* @.sycl_offloading.device_images, i64 0, i64 0) } +// CHECK-IR1: @.sycl_offloading.lalala = constant [[DESCTY]] { i16 1, i16 1, [[IMAGETY]]* getelementptr inbounds ([1 x [[IMAGETY]]], [1 x [[IMAGETY]]]* @.sycl_offloading.device_images, i64 0, i64 0), [[ENTTY]]* null, [[ENTTY]]* null } // ------- // Check options' effects: -reg-func-name, -unreg-func-name // -// RUN: clang-offload-wrapper -target=sycl-x86_64-pc-linux-gnu -reg-func-name=__REGFUNC__ -unreg-func-name=__UNREGFUNC__ -o - %t.tgt | llvm-dis | FileCheck %s --check-prefix CHECK-IR2 +// RUN: clang-offload-wrapper -kind sycl -host=x86_64-pc-linux-gnu -reg-func-name=__REGFUNC__ -unreg-func-name=__UNREGFUNC__ -o - %t.tgt | llvm-dis | FileCheck %s --check-prefix CHECK-IR2 // CHECK-IR2: source_filename = "offload.wrapper.object" // CHECK-IR2: define internal void {{.+}}() // CHECK-IR2: call void @__REGFUNC__ diff --git a/clang/test/Driver/clang_f_opts.c b/clang/test/Driver/clang_f_opts.c index 866b368beacc7..5431e7a2123a1 100644 --- a/clang/test/Driver/clang_f_opts.c +++ b/clang/test/Driver/clang_f_opts.c @@ -121,6 +121,8 @@ // RUN: %clang -### -S -fcoverage-mapping -fno-coverage-mapping %s 2>&1 | FileCheck -check-prefix=CHECK-DISABLE-COVERAGE %s // RUN: %clang -### -S -fprofile-instr-generate -fcoverage-mapping -fno-coverage-mapping %s 2>&1 | FileCheck -check-prefix=CHECK-DISABLE-COVERAGE %s // RUN: %clang -### -S -fprofile-remapping-file foo/bar.txt %s 2>&1 | FileCheck -check-prefix=CHECK-PROFILE-REMAP %s +// RUN: %clang -### -S -forder-file-instrumentation %s 2>&1 | FileCheck -check-prefix=CHECK-ORDERFILE-INSTR %s +// RUN: %clang -### -flto -forder-file-instrumentation %s 2>&1 | FileCheck -check-prefix=CHECK-ORDERFILE-INSTR-LTO %s // CHECK-PROFILE-GENERATE: "-fprofile-instrument=clang" // CHECK-PROFILE-GENERATE-LLVM: "-fprofile-instrument=llvm" // CHECK-PROFILE-GENERATE-DIR: "-fprofile-instrument-path=/some/dir{{/|\\\\}}{{.*}}" @@ -132,6 +134,10 @@ // CHECK-COVERAGE-AND-GEN: '-fcoverage-mapping' only allowed with '-fprofile-instr-generate' // CHECK-DISABLE-COVERAGE-NOT: "-fcoverage-mapping" // CHECK-PROFILE-REMAP: "-fprofile-remapping-file=foo/bar.txt" +// CHECK-ORDERFILE-INSTR: "-forder-file-instrumentation" +// CHECK-ORDERFILE-INSTR: "-enable-order-file-instrumentation" +// CHECK-ORDERFILE-INSTR-LTO: "-forder-file-instrumentation" +// CHECK-ORDERFILE-INSTR-LTO-NOT: "-enable-order-file-instrumentation" // RUN: %clang -### -S -fprofile-use %s 2>&1 | FileCheck -check-prefix=CHECK-PROFILE-USE %s // RUN: %clang -### -S -fprofile-instr-use %s 2>&1 | FileCheck -check-prefix=CHECK-PROFILE-USE %s diff --git a/clang/test/Driver/darwin-ld.c b/clang/test/Driver/darwin-ld.c index 5198ef057b946..181d4e324cc50 100644 --- a/clang/test/Driver/darwin-ld.c +++ b/clang/test/Driver/darwin-ld.c @@ -203,6 +203,14 @@ // LINK_PG: -lgcrt1.o // LINK_PG: -no_new_main +// RUN: %clang -target i386-apple-darwin13 -pg -### %t.o 2> %t.log +// RUN: FileCheck -check-prefix=LINK_PG_NO_SUPPORT_OSX %s < %t.log +// LINK_PG_NO_SUPPORT_OSX: error: the clang compiler does not support -pg option on versions of OS X + +// RUN: %clang -target x86_64-apple-ios5.0 -pg -### %t.o 2> %t.log +// RUN: FileCheck -check-prefix=LINK_PG_NO_SUPPORT %s < %t.log +// LINK_PG_NO_SUPPORT: error: the clang compiler does not support -pg option on Darwin + // Check that clang links with libgcc_s.1 for iOS 4 and earlier, but not arm64. // RUN: %clang -target armv7-apple-ios4.0 -miphoneos-version-min=4.0 -### %t.o 2> %t.log // RUN: FileCheck -check-prefix=LINK_IOS_LIBGCC_S %s < %t.log diff --git a/clang/test/Driver/fuchsia.c b/clang/test/Driver/fuchsia.c index 9c3ea53009bc3..a012654946636 100644 --- a/clang/test/Driver/fuchsia.c +++ b/clang/test/Driver/fuchsia.c @@ -53,6 +53,27 @@ // CHECK-RELOCATABLE-NOT: "--build-id" // CHECK-RELOCATABLE: "-r" +// RUN: %clang %s -### --target=x86_64-fuchsia -nodefaultlibs -fuse-ld=lld 2>&1 \ +// RUN: -resource-dir=%S/Inputs/resource_dir_with_per_target_subdir \ +// RUN: | FileCheck %s -check-prefix=CHECK-NODEFAULTLIBS +// CHECK-NODEFAULTLIBS: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]" +// CHECK-NODEFAULTLIBS-NOT: "[[RESOURCE_DIR]]{{/|\\\\}}x86_64-fuchsia{{/|\\\\}}lib{{/|\\\\}}libclang_rt.builtins.a" +// CHECK-NODEFAULTLIBS-NOT: "-lc" + +// RUN: %clang %s -### --target=x86_64-fuchsia -nostdlib -fuse-ld=lld 2>&1 \ +// RUN: -resource-dir=%S/Inputs/resource_dir_with_per_target_subdir \ +// RUN: | FileCheck %s -check-prefix=CHECK-NOSTDLIB +// CHECK-NOSTDLIB: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]" +// CHECK-NOSTDLIB-NOT: "[[RESOURCE_DIR]]{{/|\\\\}}x86_64-fuchsia{{/|\\\\}}lib{{/|\\\\}}libclang_rt.builtins.a" +// CHECK-NOSTDLIB-NOT: "-lc" + +// RUN: %clang %s -### --target=x86_64-fuchsia -nolibc -fuse-ld=lld 2>&1 \ +// RUN: -resource-dir=%S/Inputs/resource_dir_with_per_target_subdir \ +// RUN: | FileCheck %s -check-prefix=CHECK-NOLIBC +// CHECK-NOLIBC: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]" +// CHECK-NOLIBC: "[[RESOURCE_DIR]]{{/|\\\\}}x86_64-fuchsia{{/|\\\\}}lib{{/|\\\\}}libclang_rt.builtins.a" +// CHECK-NOLIBC-NOT: "-lc" + // RUN: %clang %s -### --target=x86_64-fuchsia \ // RUN: -fsanitize=safe-stack 2>&1 \ // RUN: -resource-dir=%S/Inputs/resource_dir_with_per_target_subdir \ diff --git a/clang/test/Driver/fuchsia.cpp b/clang/test/Driver/fuchsia.cpp index 2c80ad070378c..d18d496359f66 100644 --- a/clang/test/Driver/fuchsia.cpp +++ b/clang/test/Driver/fuchsia.cpp @@ -43,3 +43,9 @@ // CHECK-STATIC: "-lm" // CHECK-STATIC: "--pop-state" // CHECK-STATIC: "-lc" + +// RUN: %clang %s -### --target=x86_64-fuchsia -nostdlib++ -fuse-ld=lld 2>&1 \ +// RUN: | FileCheck %s -check-prefix=CHECK-NOSTDLIBXX +// CHECK-NOSTDLIBXX-NOT: "-lc++" +// CHECK-NOSTDLIBXX-NOT: "-lm" +// CHECK-NOSTDLIBXX: "-lc" diff --git a/clang/test/Driver/hip-binding.hip b/clang/test/Driver/hip-binding.hip index 5425bf651a7ea..d173edabc77e0 100644 --- a/clang/test/Driver/hip-binding.hip +++ b/clang/test/Driver/hip-binding.hip @@ -4,7 +4,7 @@ // RUN: touch %t.o // RUN: %clang --hip-link -ccc-print-bindings -target x86_64-linux-gnu \ -// RUN: --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 %t.o\ +// RUN: --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 -fgpu-rdc %t.o\ // RUN: 2>&1 | FileCheck %s // CHECK: # "amdgcn-amd-amdhsa" - "offload bundler", inputs: ["[[IN:.*o]]"], outputs: ["[[OBJ1:.*o]]", "[[OBJ2:.*o]]", "[[OBJ3:.*o]]"] @@ -13,3 +13,10 @@ // CHECK: # "amdgcn-amd-amdhsa" - "AMDGCN::Linker", inputs: ["[[OBJ3]]"], output: "[[IMG3:.*out]]" // CHECK-NOT: offload bundler // CHECK: # "x86_64-unknown-linux-gnu" - "GNU::Linker", inputs: ["[[OBJ1]]", "[[IMG2]]", "[[IMG3]]"], output: "a.out" + +// RUN: %clang --hip-link -ccc-print-bindings -target x86_64-linux-gnu \ +// RUN: --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 %t.o\ +// RUN: 2>&1 | FileCheck -check-prefix=NORDC %s + +// NORDC-NOT: offload bundler +// NORDC: # "x86_64-unknown-linux-gnu" - "GNU::Linker", inputs: ["{{.*o}}"], output: "a.out" diff --git a/clang/test/Driver/hip-link-shared-library.hip b/clang/test/Driver/hip-link-shared-library.hip index b7b301a9e391d..cb409d1a874d8 100644 --- a/clang/test/Driver/hip-link-shared-library.hip +++ b/clang/test/Driver/hip-link-shared-library.hip @@ -1,7 +1,7 @@ // RUN: touch %t.o // RUN: %clang --hip-link -ccc-print-bindings -target x86_64-linux-gnu \ // RUN: --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 %t.o %S/Inputs/in.so \ -// RUN: 2>&1 | FileCheck %s +// RUN: -fgpu-rdc 2>&1 | FileCheck %s // CHECK: # "amdgcn-amd-amdhsa" - "offload bundler", inputs: ["[[IN:.*o]]"], outputs: ["[[OBJ1:.*o]]", "[[OBJ2:.*o]]", "[[OBJ3:.*o]]"] // CHECK: # "amdgcn-amd-amdhsa" - "AMDGCN::Linker", inputs: ["[[OBJ2]]"], output: "[[IMG2:.*out]]" diff --git a/clang/test/Driver/hip-toolchain-features.hip b/clang/test/Driver/hip-toolchain-features.hip new file mode 100644 index 0000000000000..0fe94015ef1ec --- /dev/null +++ b/clang/test/Driver/hip-toolchain-features.hip @@ -0,0 +1,37 @@ +// REQUIRES: clang-driver +// REQUIRES: x86-registered-target +// REQUIRES: amdgpu-registered-target + +// RUN: %clang -### -c -target x86_64-linux-gnu -fgpu-rdc \ +// RUN: -x hip --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 %s \ +// RUN: -mxnack 2>&1 | FileCheck %s -check-prefix=XNACK +// RUN: %clang -### -c -target x86_64-linux-gnu -fgpu-rdc \ +// RUN: -x hip --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 %s \ +// RUN: -mno-xnack 2>&1 | FileCheck %s -check-prefix=NOXNACK + +// XNACK: {{.*}}clang{{.*}}"-target-feature" "+xnack" +// NOXNACK: {{.*}}clang{{.*}}"-target-feature" "-xnack" + + +// RUN: %clang -### -c -target x86_64-linux-gnu -fgpu-rdc \ +// RUN: -x hip --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 %s \ +// RUN: -msram-ecc 2>&1 | FileCheck %s -check-prefix=SRAM +// RUN: %clang -### -c -target x86_64-linux-gnu -fgpu-rdc \ +// RUN: -x hip --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 %s \ +// RUN: -mno-sram-ecc 2>&1 | FileCheck %s -check-prefix=NOSRAM + +// SRAM: {{.*}}clang{{.*}}"-target-feature" "+sram-ecc" +// NOSRAM: {{.*}}clang{{.*}}"-target-feature" "-sram-ecc" + + +// RUN: %clang -### -c -target x86_64-linux-gnu -fgpu-rdc \ +// RUN: -x hip --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 %s \ +// RUN: -mxnack -msram-ecc \ +// RUN: 2>&1 | FileCheck %s -check-prefix=ALL3 +// RUN: %clang -### -c -target x86_64-linux-gnu -fgpu-rdc \ +// RUN: -x hip --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 %s \ +// RUN: -mno-xnack -mno-sram-ecc \ +// RUN: 2>&1 | FileCheck %s -check-prefix=NOALL3 + +// ALL3: {{.*}}clang{{.*}}"-target-feature" "+xnack" "-target-feature" "+sram-ecc" +// NOALL3: {{.*}}clang{{.*}}"-target-feature" "-xnack" "-target-feature" "-sram-ecc" diff --git a/clang/test/Driver/hip-toolchain-no-rdc.hip b/clang/test/Driver/hip-toolchain-no-rdc.hip index e8e491858f7c2..ea370d08be4d4 100644 --- a/clang/test/Driver/hip-toolchain-no-rdc.hip +++ b/clang/test/Driver/hip-toolchain-no-rdc.hip @@ -17,7 +17,8 @@ // // CHECK: [[CLANG:".*clang.*"]] "-cc1" "-triple" "amdgcn-amd-amdhsa" -// CHECK-SAME: "-aux-triple" "x86_64-unknown-linux-gnu" "-emit-llvm-bc" +// CHECK-SAME: "-aux-triple" "x86_64-unknown-linux-gnu" +// CHECK-SAME: "-emit-llvm-bc" // CHECK-SAME: {{.*}} "-main-file-name" "a.cu" {{.*}} "-target-cpu" "gfx803" // CHECK-SAME: "-fcuda-is-device" "-fvisibility" "hidden" // CHECK-SAME: "-fapply-global-visibility-to-externs" @@ -34,7 +35,6 @@ // CHECK: [[LLC: ".*llc"]] [[OPT_BC_DEV_A_803]] "-mtriple=amdgcn-amd-amdhsa" // CHECK-SAME: "-filetype=obj" -// CHECK-SAME: "-mattr=-code-object-v3" // CHECK-SAME: "-mcpu=gfx803" "-o" [[OBJ_DEV_A_803:".*-gfx803-.*o"]] // CHECK: [[LLD: ".*lld"]] "-flavor" "gnu" "--no-undefined" "-shared" @@ -45,7 +45,8 @@ // // CHECK: [[CLANG:".*clang.*"]] "-cc1" "-triple" "amdgcn-amd-amdhsa" -// CHECK-SAME: "-aux-triple" "x86_64-unknown-linux-gnu" "-emit-llvm-bc" +// CHECK-SAME: "-aux-triple" "x86_64-unknown-linux-gnu" +// CHECK-SAME: "-emit-llvm-bc" // CHECK-SAME: {{.*}} "-main-file-name" "a.cu" {{.*}} "-target-cpu" "gfx900" // CHECK-SAME: "-fcuda-is-device" "-fvisibility" "hidden" // CHECK-SAME: "-fapply-global-visibility-to-externs" @@ -62,7 +63,6 @@ // CHECK: [[LLC: ".*llc"]] [[OPT_BC_DEV_A_900]] "-mtriple=amdgcn-amd-amdhsa" // CHECK-SAME: "-filetype=obj" -// CHECK-SAME: "-mattr=-code-object-v3" // CHECK-SAME: "-mcpu=gfx900" "-o" [[OBJ_DEV_A_900:".*-gfx900-.*o"]] // CHECK: [[LLD: ".*lld"]] "-flavor" "gnu" "--no-undefined" "-shared" @@ -77,7 +77,8 @@ // CHECK-SAME: "-inputs={{.*}},[[IMG_DEV_A_803]],[[IMG_DEV_A_900]]" "-outputs=[[BUNDLE_A:.*hipfb]]" // CHECK: [[CLANG]] "-cc1" "-triple" "x86_64-unknown-linux-gnu" -// CHECK-SAME: "-aux-triple" "amdgcn-amd-amdhsa" "-emit-obj" +// CHECK-SAME: "-aux-triple" "amdgcn-amd-amdhsa" +// CHECK-SAME: "-emit-obj" // CHECK-SAME: {{.*}} "-main-file-name" "a.cu" // CHECK-SAME: {{.*}} "-o" [[A_OBJ_HOST:".*o"]] "-x" "hip" // CHECK-SAME: {{.*}} [[A_SRC]] @@ -88,7 +89,8 @@ // // CHECK: [[CLANG:".*clang.*"]] "-cc1" "-triple" "amdgcn-amd-amdhsa" -// CHECK-SAME: "-aux-triple" "x86_64-unknown-linux-gnu" "-emit-llvm-bc" +// CHECK-SAME: "-aux-triple" "x86_64-unknown-linux-gnu" +// CHECK-SAME: "-emit-llvm-bc" // CHECK-SAME: {{.*}} "-main-file-name" "b.hip" {{.*}} "-target-cpu" "gfx803" // CHECK-SAME: "-fcuda-is-device" "-fvisibility" "hidden" // CHECK-SAME: "-fapply-global-visibility-to-externs" @@ -105,7 +107,6 @@ // CHECK: [[LLC: ".*llc"]] [[OPT_BC_DEV_B_803]] "-mtriple=amdgcn-amd-amdhsa" // CHECK-SAME: "-filetype=obj" -// CHECK-SAME: "-mattr=-code-object-v3" // CHECK-SAME: "-mcpu=gfx803" "-o" [[OBJ_DEV_B_803:".*-gfx803-.*o"]] // CHECK: [[LLD: ".*lld"]] "-flavor" "gnu" "--no-undefined" "-shared" @@ -116,7 +117,8 @@ // // CHECK: [[CLANG:".*clang.*"]] "-cc1" "-triple" "amdgcn-amd-amdhsa" -// CHECK-SAME: "-aux-triple" "x86_64-unknown-linux-gnu" "-emit-llvm-bc" +// CHECK-SAME: "-aux-triple" "x86_64-unknown-linux-gnu" +// CHECK-SAME: "-emit-llvm-bc" // CHECK-SAME: {{.*}} "-main-file-name" "b.hip" {{.*}} "-target-cpu" "gfx900" // CHECK-SAME: "-fcuda-is-device" "-fvisibility" "hidden" // CHECK-SAME: "-fapply-global-visibility-to-externs" @@ -133,7 +135,6 @@ // CHECK: [[LLC: ".*llc"]] [[OPT_BC_DEV_B_900]] "-mtriple=amdgcn-amd-amdhsa" // CHECK-SAME: "-filetype=obj" -// CHECK-SAME: "-mattr=-code-object-v3" // CHECK-SAME: "-mcpu=gfx900" "-o" [[OBJ_DEV_B_900:".*-gfx900-.*o"]] // CHECK: [[LLD: ".*lld"]] "-flavor" "gnu" "--no-undefined" "-shared" @@ -148,7 +149,8 @@ // CHECK-SAME: "-inputs={{.*}},[[IMG_DEV_B_803]],[[IMG_DEV_B_900]]" "-outputs=[[BUNDLE_A:.*hipfb]]" // CHECK: [[CLANG]] "-cc1" "-triple" "x86_64-unknown-linux-gnu" -// CHECK-SAME: "-aux-triple" "amdgcn-amd-amdhsa" "-emit-obj" +// CHECK-SAME: "-aux-triple" "amdgcn-amd-amdhsa" +// CHECK-SAME: "-emit-obj" // CHECK-SAME: {{.*}} "-main-file-name" "b.hip" // CHECK-SAME: {{.*}} "-o" [[B_OBJ_HOST:".*o"]] "-x" "hip" // CHECK-SAME: {{.*}} [[B_SRC]] diff --git a/clang/test/Driver/hip-toolchain-rdc.hip b/clang/test/Driver/hip-toolchain-rdc.hip index dc6fc6f6518dc..d2946d15cbc39 100644 --- a/clang/test/Driver/hip-toolchain-rdc.hip +++ b/clang/test/Driver/hip-toolchain-rdc.hip @@ -13,7 +13,8 @@ // RUN: 2>&1 | FileCheck %s // CHECK: [[CLANG:".*clang.*"]] "-cc1" "-triple" "amdgcn-amd-amdhsa" -// CHECK-SAME: "-aux-triple" "x86_64-unknown-linux-gnu" "-emit-llvm-bc" +// CHECK-SAME: "-aux-triple" "x86_64-unknown-linux-gnu" +// CHECK-SAME: "-emit-llvm-bc" // CHECK-SAME: {{.*}} "-main-file-name" "a.cu" {{.*}} "-target-cpu" "gfx803" // CHECK-SAME: "-fcuda-is-device" "-fgpu-rdc" "-fvisibility" "hidden" // CHECK-SAME: "-fapply-global-visibility-to-externs" @@ -21,7 +22,8 @@ // CHECK-SAME: {{.*}} [[A_SRC:".*a.cu"]] // CHECK: [[CLANG]] "-cc1" "-triple" "amdgcn-amd-amdhsa" -// CHECK-SAME: "-aux-triple" "x86_64-unknown-linux-gnu" "-emit-llvm-bc" +// CHECK-SAME: "-aux-triple" "x86_64-unknown-linux-gnu" +// CHECK-SAME: "-emit-llvm-bc" // CHECK-SAME: {{.*}} "-main-file-name" "b.hip" {{.*}} "-target-cpu" "gfx803" // CHECK-SAME: "-fcuda-is-device" "-fgpu-rdc" "-fvisibility" "hidden" // CHECK-SAME: "-fapply-global-visibility-to-externs" @@ -38,20 +40,21 @@ // CHECK: [[LLC: ".*llc"]] [[OPT_BC_DEV1]] "-mtriple=amdgcn-amd-amdhsa" // CHECK-SAME: "-filetype=obj" -// CHECK-SAME: "-mattr=-code-object-v3" // CHECK-SAME: "-mcpu=gfx803" "-o" [[OBJ_DEV1:".*-gfx803-.*o"]] // CHECK: [[LLD: ".*lld"]] "-flavor" "gnu" "--no-undefined" "-shared" // CHECK-SAME: "-o" "[[IMG_DEV1:.*out]]" [[OBJ_DEV1]] // CHECK: [[CLANG]] "-cc1" "-triple" "amdgcn-amd-amdhsa" -// CHECK-SAME: "-aux-triple" "x86_64-unknown-linux-gnu" "-emit-llvm-bc" +// CHECK-SAME: "-aux-triple" "x86_64-unknown-linux-gnu" +// CHECK-SAME: "-emit-llvm-bc" // CHECK-SAME: {{.*}} "-main-file-name" "a.cu" {{.*}} "-target-cpu" "gfx900" // CHECK-SAME: "-fcuda-is-device" {{.*}} "-o" [[A_BC:".*bc"]] "-x" "hip" // CHECK-SAME: {{.*}} [[A_SRC]] // CHECK: [[CLANG]] "-cc1" "-triple" "amdgcn-amd-amdhsa" -// CHECK-SAME: "-aux-triple" "x86_64-unknown-linux-gnu" "-emit-llvm-bc" +// CHECK-SAME: "-aux-triple" "x86_64-unknown-linux-gnu" +// CHECK-SAME: "-emit-llvm-bc" // CHECK-SAME: {{.*}} "-main-file-name" "b.hip" {{.*}} "-target-cpu" "gfx900" // CHECK-SAME: "-fcuda-is-device" {{.*}} "-o" [[B_BC:".*bc"]] "-x" "hip" // CHECK-SAME: {{.*}} [[B_SRC]] @@ -66,20 +69,21 @@ // CHECK: [[LLC]] [[OPT_BC_DEV2]] "-mtriple=amdgcn-amd-amdhsa" // CHECK-SAME: "-filetype=obj" -// CHECK-SAME: "-mattr=-code-object-v3" // CHECK-SAME: "-mcpu=gfx900" "-o" [[OBJ_DEV2:".*-gfx900-.*o"]] // CHECK: [[LLD]] "-flavor" "gnu" "--no-undefined" "-shared" // CHECK-SAME: "-o" "[[IMG_DEV2:.*out]]" [[OBJ_DEV2]] // CHECK: [[CLANG]] "-cc1" "-triple" "x86_64-unknown-linux-gnu" -// CHECK-SAME: "-aux-triple" "amdgcn-amd-amdhsa" "-emit-obj" +// CHECK-SAME: "-aux-triple" "amdgcn-amd-amdhsa" +// CHECK-SAME: "-emit-obj" // CHECK-SAME: {{.*}} "-main-file-name" "a.cu" // CHECK-SAME: {{.*}} "-o" [[A_OBJ_HOST:".*o"]] "-x" "hip" // CHECK-SAME: {{.*}} [[A_SRC]] // CHECK: [[CLANG]] "-cc1" "-triple" "x86_64-unknown-linux-gnu" -// CHECK-SAME: "-aux-triple" "amdgcn-amd-amdhsa" "-emit-obj" +// CHECK-SAME: "-aux-triple" "amdgcn-amd-amdhsa" +// CHECK-SAME: "-emit-obj" // CHECK-SAME: {{.*}} "-main-file-name" "b.hip" // CHECK-SAME: {{.*}} "-o" [[B_OBJ_HOST:".*o"]] "-x" "hip" // CHECK-SAME: {{.*}} [[B_SRC]] diff --git a/clang/test/Driver/instrprof-ld.c b/clang/test/Driver/instrprof-ld.c index ea20105699758..586d100ec8b0b 100644 --- a/clang/test/Driver/instrprof-ld.c +++ b/clang/test/Driver/instrprof-ld.c @@ -121,3 +121,11 @@ // // CHECK-WINDOWS-X86-64: "{{.*}}link{{(.exe)?}}" // CHECK-WINDOWS-X86-64: "{{.*}}clang_rt.profile-x86_64.lib" +// +// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ +// RUN: -target x86_64-mingw32 -fprofile-instr-generate -fuse-ld=ld \ +// RUN: -resource-dir=%S/Inputs/resource_dir \ +// RUN: | FileCheck --check-prefix=CHECK-MINGW-X86-64 %s +// +// CHECK-MINGW-X86-64: "{{(.*[^.0-9A-Z_a-z])?}}ld{{(.exe)?}}" +// CHECK-MINGW-X86-64: "{{.*}}/Inputs/resource_dir{{/|\\\\}}lib{{/|\\\\}}windows{{/|\\\\}}libclang_rt.profile-x86_64.a" diff --git a/clang/test/Driver/linux-ld.c b/clang/test/Driver/linux-ld.c index 3ab81be4906aa..800f782523013 100644 --- a/clang/test/Driver/linux-ld.c +++ b/clang/test/Driver/linux-ld.c @@ -176,6 +176,19 @@ // CHECK-CLANG-NO-LIBGCC-STATIC: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" // CHECK-CLANG-NO-LIBGCC-STATIC: "--start-group" "-lgcc" "-lgcc_eh" "-lc" "--end-group" // +// RUN: %clang -static-pie -no-canonical-prefixes %s -### -o %t.o 2>&1 \ +// RUN: --target=x86_64-unknown-linux -rtlib=platform \ +// RUN: --gcc-toolchain="" \ +// RUN: --sysroot=%S/Inputs/basic_linux_tree \ +// RUN: | FileCheck --check-prefix=CHECK-CLANG-LD-STATIC-PIE %s +// CHECK-CLANG-LD-STATIC-PIE: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" +// CHECK-CLANG-LD-STATIC-PIE: "-static" +// CHECK-CLANG-LD-STATIC-PIE: "-pie" +// CHECK-CLANG-LD-STATIC-PIE: "--no-dynamic-linker" +// CHECK-CLANG-LD-STATIC-PIE: "-m" "elf_x86_64" +// CHECK-CLANG-LD-STATIC-PIE: "{{.*}}rcrt1.o" +// CHECK-CLANG-LD-STATIC-PIE: "--start-group" "-lgcc" "-lgcc_eh" "-lc" "--end-group" +// // RUN: %clang -dynamic -no-canonical-prefixes %s -### -o %t.o 2>&1 \ // RUN: --target=x86_64-unknown-linux -rtlib=platform \ // RUN: --gcc-toolchain="" \ diff --git a/clang/test/Driver/msan.c b/clang/test/Driver/msan.c index d810f4ca14d8a..18ef2a96cacb2 100644 --- a/clang/test/Driver/msan.c +++ b/clang/test/Driver/msan.c @@ -1,3 +1,5 @@ +// REQUIRES: x86-registered-target + // RUN: %clang -target x86_64-unknown-linux -fsanitize=memory %s -S -emit-llvm -o - | FileCheck %s --check-prefix=CHECK-MSAN // RUN: %clang -O1 -target x86_64-unknown-linux -fsanitize=memory %s -S -emit-llvm -o - | FileCheck %s --check-prefix=CHECK-MSAN // RUN: %clang -O2 -target x86_64-unknown-linux -fsanitize=memory %s -S -emit-llvm -o - | FileCheck %s --check-prefix=CHECK-MSAN @@ -15,6 +17,13 @@ // Verify that -fsanitize=memory and -fsanitize=kernel-memory invoke MSan/KMSAN instrumentation. +// Also check that this works with the new pass manager with and without +// optimization +// RUN: %clang -target x86_64-unknown-linux -fexperimental-new-pass-manager -fsanitize=memory %s -S -emit-llvm -o - | FileCheck %s --check-prefix=CHECK-MSAN +// RUN: %clang -O1 -target x86_64-unknown-linux -fexperimental-new-pass-manager -fsanitize=memory %s -S -emit-llvm -o - | FileCheck %s --check-prefix=CHECK-MSAN +// RUN: %clang -O2 -target x86_64-unknown-linux -fexperimental-new-pass-manager -fsanitize=memory %s -S -emit-llvm -o - | FileCheck %s --check-prefix=CHECK-MSAN +// RUN: %clang -O3 -target x86_64-unknown-linux -fexperimental-new-pass-manager -fsanitize=memory %s -S -emit-llvm -o - | FileCheck %s --check-prefix=CHECK-MSAN + int foo(int *a) { return *a; } // CHECK-MSAN: __msan_init // CHECK-KMSAN: __msan_get_context_state diff --git a/clang/test/Driver/netbsd.c b/clang/test/Driver/netbsd.c index f5352e2486f06..221264a525976 100644 --- a/clang/test/Driver/netbsd.c +++ b/clang/test/Driver/netbsd.c @@ -446,3 +446,8 @@ // PTHREAD-NOT: _POSIX_THREADS // PTHREAD: _REENTRANT // PTHREAD-NOT: _POSIX_THREADS + +// Check PowerPC for Secure PLT +// RUN: %clang -target powerpc-unknown-netbsd -### -c %s 2>&1 \ +// RUN: | FileCheck -check-prefix=POWERPC-SECUREPLT %s +// POWERPC-SECUREPLT: "-target-feature" "+secure-plt" diff --git a/clang/test/Driver/nodefaultlib.c b/clang/test/Driver/nodefaultlib.c index 08bcea56fadf6..e6c7d217ad34a 100644 --- a/clang/test/Driver/nodefaultlib.c +++ b/clang/test/Driver/nodefaultlib.c @@ -1,4 +1,4 @@ -// RUN: %clang -target i686-pc-linux-gnu -### -nodefaultlibs %s 2>&1 | FileCheck -check-prefix=TEST1 %s +// RUN: %clang -target i686-pc-linux-gnu -### -rtlib=libgcc -nodefaultlibs %s 2>&1 | FileCheck -check-prefix=TEST1 %s // TEST1-NOT: start-group // TEST1-NOT: "-lgcc" // TEST1-NOT: "-lc" diff --git a/clang/test/Driver/nolibc.c b/clang/test/Driver/nolibc.c new file mode 100644 index 0000000000000..1fa144247e4f3 --- /dev/null +++ b/clang/test/Driver/nolibc.c @@ -0,0 +1,5 @@ +// RUN: %clang -target i686-pc-linux-gnu -### -rtlib=libgcc -nolibc %s 2>&1 | FileCheck %s +// CHECK: crtbegin +// CHECK: "-lgcc" +// CHECK-NOT: "-lc" +// CHECK: crtend diff --git a/clang/test/Driver/openmp-offload-gpu.c b/clang/test/Driver/openmp-offload-gpu.c index dfdc79b5f70c1..7a4dd95e54188 100644 --- a/clang/test/Driver/openmp-offload-gpu.c +++ b/clang/test/Driver/openmp-offload-gpu.c @@ -273,3 +273,8 @@ // RUN: %clang -### -no-canonical-prefixes -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target -march=sm_60 %s -fopenmp-cuda-force-full-runtime -fno-openmp-cuda-force-full-runtime 2>&1 \ // RUN: | FileCheck -check-prefix=NO_FULL_RUNTIME %s // NO_FULL_RUNTIME-NOT: "-{{fno-|f}}openmp-cuda-force-full-runtime" + +// RUN: %clang -### -no-canonical-prefixes -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target -march=sm_60 %s -fopenmp-cuda-teams-reduction-recs-num=2048 2>&1 \ +// RUN: | FileCheck -check-prefix=CUDA_RED_RECS %s +// CUDA_RED_RECS: clang{{.*}}"-cc1"{{.*}}"-triple" "nvptx64-nvidia-cuda" +// CUDA_RED_RECS-SAME: "-fopenmp-cuda-teams-reduction-recs-num=2048" diff --git a/clang/test/Driver/openmp-offload.c b/clang/test/Driver/openmp-offload.c index ac0190af876e3..aee7e0dbb1d18 100644 --- a/clang/test/Driver/openmp-offload.c +++ b/clang/test/Driver/openmp-offload.c @@ -294,27 +294,27 @@ // // Generate host BC file. // -// CHK-COMMANDS: clang{{.*}}" "-cc1" "-triple" "powerpc64le-unknown-linux" "-emit-llvm-bc" {{.*}}"-o" " +// CHK-COMMANDS: clang{{.*}}" "-cc1" "-triple" "powerpc64le-unknown-linux" {{.*}}"-emit-llvm-bc" {{.*}}"-o" " // CHK-COMMANDS-SAME: [[HOSTBC:[^\\/]+\.bc]]" "-x" "c" " // CHK-COMMANDS-SAME: [[INPUT:[^\\/]+\.c]]" "-fopenmp-targets=powerpc64le-ibm-linux-gnu,x86_64-pc-linux-gnu" -// CHK-COMMANDS-ST: clang{{.*}}" "-cc1" "-triple" "powerpc64le-unknown-linux" "-E" {{.*}}"-fopenmp" {{.*}}"-o" " +// CHK-COMMANDS-ST: clang{{.*}}" "-cc1" "-triple" "powerpc64le-unknown-linux" {{.*}}"-E" {{.*}}"-fopenmp" {{.*}}"-o" " // CHK-COMMANDS-ST-SAME: [[HOSTPP:[^\\/]+\.i]]" "-x" "c" " // CHK-COMMANDS-ST-SAME: [[INPUT:[^\\/]+\.c]]" -// CHK-COMMANDS-ST: clang{{.*}}" "-cc1" "-triple" "powerpc64le-unknown-linux" "-emit-llvm-bc" {{.*}}"-fopenmp" {{.*}}"-o" " +// CHK-COMMANDS-ST: clang{{.*}}" "-cc1" "-triple" "powerpc64le-unknown-linux" {{.*}}"-emit-llvm-bc" {{.*}}"-fopenmp" {{.*}}"-o" " // CHK-COMMANDS-ST-SAME: [[HOSTBC:[^\\/]+\.bc]]" "-x" "cpp-output" "{{.*}}[[HOSTPP]]" "-fopenmp-targets=powerpc64le-ibm-linux-gnu,x86_64-pc-linux-gnu" // // Compile for the powerpc device. // -// CHK-COMMANDS: clang{{.*}}" "-cc1" "-triple" "powerpc64le-ibm-linux-gnu" "-aux-triple" "powerpc64le-unknown-linux" "-emit-obj" {{.*}}"-pic-level" "2" {{.*}}"-fopenmp" {{.*}}"-o" " +// CHK-COMMANDS: clang{{.*}}" "-cc1" "-triple" "powerpc64le-ibm-linux-gnu" "-aux-triple" "powerpc64le-unknown-linux" {{.*}}"-emit-obj" {{.*}}"-pic-level" "2" {{.*}}"-fopenmp" {{.*}}"-o" " // CHK-COMMANDS-SAME: [[T1OBJ:[^\\/]+\.o]]" "-x" "c" "{{.*}}[[INPUT]]" "-fopenmp-is-device" "-fopenmp-host-ir-file-path" "{{.*}}[[HOSTBC]]" // CHK-COMMANDS: ld{{(\.exe)?}}" {{.*}}"-o" " // CHK-COMMANDS-SAME: [[T1BIN:[^\\/]+\.out]]" {{.*}}"{{.*}}[[T1OBJ]]" -// CHK-COMMANDS-ST: clang{{.*}}" "-cc1" "-triple" "powerpc64le-ibm-linux-gnu" "-aux-triple" "powerpc64le-unknown-linux" "-E" {{.*}}"-fopenmp" {{.*}}"-o" " +// CHK-COMMANDS-ST: clang{{.*}}" "-cc1" "-triple" "powerpc64le-ibm-linux-gnu" "-aux-triple" "powerpc64le-unknown-linux" {{.*}}"-E" {{.*}}"-fopenmp" {{.*}}"-o" " // CHK-COMMANDS-ST-SAME: [[T1PP:[^\\/]+\.i]]" "-x" "c" "{{.*}}[[INPUT]]" -// CHK-COMMANDS-ST: clang{{.*}}" "-cc1" "-triple" "powerpc64le-ibm-linux-gnu" "-aux-triple" "powerpc64le-unknown-linux" "-emit-llvm-bc" {{.*}}"-pic-level" "2" {{.*}}"-fopenmp" {{.*}}"-o" " +// CHK-COMMANDS-ST: clang{{.*}}" "-cc1" "-triple" "powerpc64le-ibm-linux-gnu" "-aux-triple" "powerpc64le-unknown-linux" {{.*}}"-emit-llvm-bc" {{.*}}"-pic-level" "2" {{.*}}"-fopenmp" {{.*}}"-o" " // CHK-COMMANDS-ST-SAME: [[T1BC:[^\\/]+\.bc]]" "-x" "cpp-output" "{{.*}}[[T1PP]]" "-fopenmp-is-device" "-fopenmp-host-ir-file-path" "{{.*}}[[HOSTBC]]" -// CHK-COMMANDS-ST: clang{{.*}}" "-cc1" "-triple" "powerpc64le-ibm-linux-gnu" "-aux-triple" "powerpc64le-unknown-linux" "-S" {{.*}}"-fopenmp" {{.*}}"-o" " +// CHK-COMMANDS-ST: clang{{.*}}" "-cc1" "-triple" "powerpc64le-ibm-linux-gnu" "-aux-triple" "powerpc64le-unknown-linux" {{.*}}"-S" {{.*}}"-fopenmp" {{.*}}"-o" " // CHK-COMMANDS-ST-SAME: [[T1ASM:[^\\/]+\.s]]" "-x" "ir" "{{.*}}[[T1BC]]" // CHK-COMMANDS-ST: clang{{.*}}" "-cc1as" "-triple" "powerpc64le-ibm-linux-gnu" "-filetype" "obj" {{.*}}"-o" " // CHK-COMMANDS-ST-SAME: [[T1OBJ:[^\\/]+\.o]]" "{{.*}}[[T1ASM]]" @@ -323,15 +323,15 @@ // // Compile for the x86 device. // -// CHK-COMMANDS: clang{{.*}}" "-cc1" "-triple" "x86_64-pc-linux-gnu" "-aux-triple" "powerpc64le-unknown-linux" "-emit-obj" {{.*}}"-pic-level" "2" {{.*}}"-fopenmp" {{.*}}"-o" " +// CHK-COMMANDS: clang{{.*}}" "-cc1" "-triple" "x86_64-pc-linux-gnu" "-aux-triple" "powerpc64le-unknown-linux" {{.*}}"-emit-obj" {{.*}}"-pic-level" "2" {{.*}}"-fopenmp" {{.*}}"-o" " // CHK-COMMANDS-SAME: [[T2OBJ:[^\\/]+\.o]]" "-x" "c" "{{.*}}[[INPUT]]" "-fopenmp-is-device" "-fopenmp-host-ir-file-path" "{{.*}}[[HOSTBC]]" // CHK-COMMANDS: ld{{(\.exe)?}}" {{.*}}"-o" " // CHK-COMMANDS-SAME: [[T2BIN:[^\\/]+\.out]]" {{.*}}"{{.*}}[[T2OBJ]]" -// CHK-COMMANDS-ST: clang{{.*}}" "-cc1" "-triple" "x86_64-pc-linux-gnu" "-aux-triple" "powerpc64le-unknown-linux" "-E" {{.*}}"-fopenmp" {{.*}}"-o" " +// CHK-COMMANDS-ST: clang{{.*}}" "-cc1" "-triple" "x86_64-pc-linux-gnu" "-aux-triple" "powerpc64le-unknown-linux" {{.*}}"-E" {{.*}}"-fopenmp" {{.*}}"-o" " // CHK-COMMANDS-ST-SAME: [[T2PP:[^\\/]+\.i]]" "-x" "c" "{{.*}}[[INPUT]]" -// CHK-COMMANDS-ST: clang{{.*}}" "-cc1" "-triple" "x86_64-pc-linux-gnu" "-aux-triple" "powerpc64le-unknown-linux" "-emit-llvm-bc" {{.*}}"-pic-level" "2" {{.*}}"-fopenmp" {{.*}}"-o" " +// CHK-COMMANDS-ST: clang{{.*}}" "-cc1" "-triple" "x86_64-pc-linux-gnu" "-aux-triple" "powerpc64le-unknown-linux" {{.*}}"-emit-llvm-bc" {{.*}}"-pic-level" "2" {{.*}}"-fopenmp" {{.*}}"-o" " // CHK-COMMANDS-ST-SAME: [[T2BC:[^\\/]+\.bc]]" "-x" "cpp-output" "{{.*}}[[T2PP]]" "-fopenmp-is-device" "-fopenmp-host-ir-file-path" "{{.*}}[[HOSTBC]]" -// CHK-COMMANDS-ST: clang{{.*}}" "-cc1" "-triple" "x86_64-pc-linux-gnu" "-aux-triple" "powerpc64le-unknown-linux" "-S" {{.*}}"-fopenmp" {{.*}}"-o" " +// CHK-COMMANDS-ST: clang{{.*}}" "-cc1" "-triple" "x86_64-pc-linux-gnu" "-aux-triple" "powerpc64le-unknown-linux" {{.*}}"-S" {{.*}}"-fopenmp" {{.*}}"-o" " // CHK-COMMANDS-ST-SAME: [[T2ASM:[^\\/]+\.s]]" "-x" "ir" "{{.*}}[[T2BC]]" // CHK-COMMANDS-ST: clang{{.*}}" "-cc1as" "-triple" "x86_64-pc-linux-gnu" "-filetype" "obj" {{.*}}"-o" " // CHK-COMMANDS-ST-SAME: [[T2OBJ:[^\\/]+\.o]]" "{{.*}}[[T2ASM]]" @@ -341,12 +341,12 @@ // // Generate host object from the BC file and link using the linker script. // -// CHK-COMMANDS: clang{{.*}}" "-cc1" "-triple" "powerpc64le-unknown-linux" "-emit-obj" {{.*}}"-fopenmp" {{.*}}"-o" " +// CHK-COMMANDS: clang{{.*}}" "-cc1" "-triple" "powerpc64le-unknown-linux" {{.*}}"-emit-obj" {{.*}}"-fopenmp" {{.*}}"-o" " // CHK-COMMANDS-SAME: [[HOSTOBJ:[^\\/]+\.o]]" "-x" "ir" "{{.*}}[[HOSTBC]]" // CHK-COMMANDS: ld{{(\.exe)?}}" {{.*}}"-o" " // CHK-COMMANDS-SAME: [[HOSTBIN:[^\\/]+\.out]]" {{.*}}"-lomptarget" {{.*}}"-T" " // CHK-COMMANDS-SAME: [[HOSTLK:[^\\/]+\.lk]]" -// CHK-COMMANDS-ST: clang{{.*}}" "-cc1" "-triple" "powerpc64le-unknown-linux" "-S" {{.*}}"-fopenmp" {{.*}}"-o" " +// CHK-COMMANDS-ST: clang{{.*}}" "-cc1" "-triple" "powerpc64le-unknown-linux" {{.*}}"-S" {{.*}}"-fopenmp" {{.*}}"-o" " // CHK-COMMANDS-ST-SAME: [[HOSTASM:[^\\/]+\.s]]" "-x" "ir" "{{.*}}[[HOSTBC]]" // CHK-COMMANDS-ST: clang{{.*}}" "-cc1as" "-triple" "powerpc64le-unknown-linux" "-filetype" "obj" {{.*}}"-o" " // CHK-COMMANDS-ST-SAME: [[HOSTOBJ:[^\\/]+\.o]]" "{{.*}}[[HOSTASM]]" @@ -443,46 +443,46 @@ // RUN: | FileCheck -check-prefix=CHK-BUJOBS-ST %s // Create host BC. -// CHK-BUJOBS: clang{{.*}}" "-cc1" "-triple" "powerpc64le-unknown-linux" "-emit-llvm-bc" {{.*}}"-fopenmp" {{.*}}"-o" " +// CHK-BUJOBS: clang{{.*}}" "-cc1" "-triple" "powerpc64le-unknown-linux" {{.*}}"-emit-llvm-bc" {{.*}}"-fopenmp" {{.*}}"-o" " // CHK-BUJOBS-SAME: [[HOSTBC:[^\\/]+\.bc]]" "-x" "c" " // CHK-BUJOBS-SAME: [[INPUT:[^\\/]+\.c]]" "-fopenmp-targets=powerpc64le-ibm-linux-gnu,x86_64-pc-linux-gnu" -// CHK-BUJOBS-ST: clang{{.*}}" "-cc1" "-triple" "powerpc64le-unknown-linux" "-E" {{.*}}"-fopenmp" {{.*}}"-o" " +// CHK-BUJOBS-ST: clang{{.*}}" "-cc1" "-triple" "powerpc64le-unknown-linux" {{.*}}"-E" {{.*}}"-fopenmp" {{.*}}"-o" " // CHK-BUJOBS-ST-SAME: [[HOSTPP:[^\\/]+\.i]]" "-x" "c" " // CHK-BUJOBS-ST-SAME: [[INPUT:[^\\/]+\.c]]" -// CHK-BUJOBS-ST: clang{{.*}}" "-cc1" "-triple" "powerpc64le-unknown-linux" "-emit-llvm-bc" {{.*}}"-fopenmp" {{.*}}"-o" " +// CHK-BUJOBS-ST: clang{{.*}}" "-cc1" "-triple" "powerpc64le-unknown-linux" {{.*}}"-emit-llvm-bc" {{.*}}"-fopenmp" {{.*}}"-o" " // CHK-BUJOBS-ST-SAME: [[HOSTBC:[^\\/]+\.bc]]" "-x" "cpp-output" "{{.*}}[[HOSTPP]]" "-fopenmp-targets=powerpc64le-ibm-linux-gnu,x86_64-pc-linux-gnu" // Create target 1 object. -// CHK-BUJOBS: clang{{.*}}" "-cc1" "-triple" "powerpc64le-ibm-linux-gnu" "-aux-triple" "powerpc64le-unknown-linux" "-emit-obj" {{.*}}"-fopenmp" {{.*}}"-o" " +// CHK-BUJOBS: clang{{.*}}" "-cc1" "-triple" "powerpc64le-ibm-linux-gnu" "-aux-triple" "powerpc64le-unknown-linux" {{.*}}"-emit-obj" {{.*}}"-fopenmp" {{.*}}"-o" " // CHK-BUJOBS-SAME: [[T1OBJ:[^\\/]+\.o]]" "-x" "c" "{{.*}}[[INPUT]]" "-fopenmp-is-device" "-fopenmp-host-ir-file-path" "{{.*}}[[HOSTBC]]" -// CHK-BUJOBS-ST: clang{{.*}}" "-cc1" "-triple" "powerpc64le-ibm-linux-gnu" "-aux-triple" "powerpc64le-unknown-linux" "-E" {{.*}}"-fopenmp" {{.*}}"-o" " +// CHK-BUJOBS-ST: clang{{.*}}" "-cc1" "-triple" "powerpc64le-ibm-linux-gnu" "-aux-triple" "powerpc64le-unknown-linux" {{.*}}"-E" {{.*}}"-fopenmp" {{.*}}"-o" " // CHK-BUJOBS-ST-SAME: [[T1PP:[^\\/]+\.i]]" "-x" "c" "{{.*}}[[INPUT]]" -// CHK-BUJOBS-ST: clang{{.*}}" "-cc1" "-triple" "powerpc64le-ibm-linux-gnu" "-aux-triple" "powerpc64le-unknown-linux" "-emit-llvm-bc" {{.*}}"-fopenmp" {{.*}}"-o" " +// CHK-BUJOBS-ST: clang{{.*}}" "-cc1" "-triple" "powerpc64le-ibm-linux-gnu" "-aux-triple" "powerpc64le-unknown-linux" {{.*}}"-emit-llvm-bc" {{.*}}"-fopenmp" {{.*}}"-o" " // CHK-BUJOBS-ST-SAME: [[T1BC:[^\\/]+\.bc]]" "-x" "cpp-output" "{{.*}}[[T1PP]]" "-fopenmp-is-device" "-fopenmp-host-ir-file-path" "{{.*}}[[HOSTBC]]" -// CHK-BUJOBS-ST: clang{{.*}}" "-cc1" "-triple" "powerpc64le-ibm-linux-gnu" "-aux-triple" "powerpc64le-unknown-linux" "-S" {{.*}}"-fopenmp" {{.*}}"-o" " +// CHK-BUJOBS-ST: clang{{.*}}" "-cc1" "-triple" "powerpc64le-ibm-linux-gnu" "-aux-triple" "powerpc64le-unknown-linux" {{.*}}"-S" {{.*}}"-fopenmp" {{.*}}"-o" " // CHK-BUJOBS-ST-SAME: [[T1ASM:[^\\/]+\.s]]" "-x" "ir" "{{.*}}[[T1BC]]" // CHK-BUJOBS-ST: clang{{.*}}" "-cc1as" "-triple" "powerpc64le-ibm-linux-gnu" "-filetype" "obj" {{.*}}"-o" " // CHK-BUJOBS-ST-SAME: [[T1OBJ:[^\\/]+\.o]]" "{{.*}}[[T1ASM]]" // Create target 2 object. -// CHK-BUJOBS: clang{{.*}}" "-cc1" "-triple" "x86_64-pc-linux-gnu" "-aux-triple" "powerpc64le-unknown-linux" "-emit-obj" {{.*}}"-fopenmp" {{.*}}"-o" " +// CHK-BUJOBS: clang{{.*}}" "-cc1" "-triple" "x86_64-pc-linux-gnu" "-aux-triple" "powerpc64le-unknown-linux" {{.*}}"-emit-obj" {{.*}}"-fopenmp" {{.*}}"-o" " // CHK-BUJOBS-SAME: [[T2OBJ:[^\\/]+\.o]]" "-x" "c" "{{.*}}[[INPUT]]" "-fopenmp-is-device" "-fopenmp-host-ir-file-path" "{{.*}}[[HOSTBC]]" -// CHK-BUJOBS-ST: clang{{.*}}" "-cc1" "-triple" "x86_64-pc-linux-gnu" "-aux-triple" "powerpc64le-unknown-linux" "-E" {{.*}}"-fopenmp" {{.*}}"-o" " +// CHK-BUJOBS-ST: clang{{.*}}" "-cc1" "-triple" "x86_64-pc-linux-gnu" "-aux-triple" "powerpc64le-unknown-linux" {{.*}}"-E" {{.*}}"-fopenmp" {{.*}}"-o" " // CHK-BUJOBS-ST-SAME: [[T2PP:[^\\/]+\.i]]" "-x" "c" "{{.*}}[[INPUT]]" -// CHK-BUJOBS-ST: clang{{.*}}" "-cc1" "-triple" "x86_64-pc-linux-gnu" "-aux-triple" "powerpc64le-unknown-linux" "-emit-llvm-bc" {{.*}}"-fopenmp" {{.*}}"-o" " +// CHK-BUJOBS-ST: clang{{.*}}" "-cc1" "-triple" "x86_64-pc-linux-gnu" "-aux-triple" "powerpc64le-unknown-linux" {{.*}}"-emit-llvm-bc" {{.*}}"-fopenmp" {{.*}}"-o" " // CHK-BUJOBS-ST-SAME: [[T2BC:[^\\/]+\.bc]]" "-x" "cpp-output" "{{.*}}[[T2PP]]" "-fopenmp-is-device" "-fopenmp-host-ir-file-path" "{{.*}}[[HOSTBC]]" -// CHK-BUJOBS-ST: clang{{.*}}" "-cc1" "-triple" "x86_64-pc-linux-gnu" "-aux-triple" "powerpc64le-unknown-linux" "-S" {{.*}}"-fopenmp" {{.*}}"-o" " +// CHK-BUJOBS-ST: clang{{.*}}" "-cc1" "-triple" "x86_64-pc-linux-gnu" "-aux-triple" "powerpc64le-unknown-linux" {{.*}}"-S" {{.*}}"-fopenmp" {{.*}}"-o" " // CHK-BUJOBS-ST-SAME: [[T2ASM:[^\\/]+\.s]]" "-x" "ir" "{{.*}}[[T2BC]]" // CHK-BUJOBS-ST: clang{{.*}}" "-cc1as" "-triple" "x86_64-pc-linux-gnu" "-filetype" "obj" {{.*}}"-o" " // CHK-BUJOBS-ST-SAME: [[T2OBJ:[^\\/]+\.o]]" "{{.*}}[[T2ASM]]" // Create host object and bundle. -// CHK-BUJOBS: clang{{.*}}" "-cc1" "-triple" "powerpc64le-unknown-linux" "-emit-obj" {{.*}}"-fopenmp" {{.*}}"-o" " +// CHK-BUJOBS: clang{{.*}}" "-cc1" "-triple" "powerpc64le-unknown-linux" {{.*}}"-emit-obj" {{.*}}"-fopenmp" {{.*}}"-o" " // CHK-BUJOBS-SAME: [[HOSTOBJ:[^\\/]+\.o]]" "-x" "ir" "{{.*}}[[HOSTBC]]" // CHK-BUJOBS: clang-offload-bundler{{.*}}" "-type=o" "-targets=openmp-powerpc64le-ibm-linux-gnu,openmp-x86_64-pc-linux-gnu,host-powerpc64le-unknown-linux" "-outputs= // CHK-BUJOBS-SAME: [[RES:[^\\/]+\.o]]" "-inputs={{.*}}[[T1OBJ]],{{.*}}[[T2OBJ]],{{.*}}[[HOSTOBJ]]" -// CHK-BUJOBS-ST: clang{{.*}}" "-cc1" "-triple" "powerpc64le-unknown-linux" "-S" {{.*}}"-fopenmp" {{.*}}"-o" " +// CHK-BUJOBS-ST: clang{{.*}}" "-cc1" "-triple" "powerpc64le-unknown-linux" {{.*}}"-S" {{.*}}"-fopenmp" {{.*}}"-o" " // CHK-BUJOBS-ST-SAME: [[HOSTASM:[^\\/]+\.s]]" "-x" "ir" "{{.*}}[[HOSTBC]]" // CHK-BUJOBS-ST: clang{{.*}}" "-cc1as" "-triple" "powerpc64le-unknown-linux" "-filetype" "obj" {{.*}}"-o" " // CHK-BUJOBS-ST-SAME: [[HOSTOBJ:[^\\/]+\.o]]" "{{.*}}[[HOSTASM]]" @@ -509,24 +509,24 @@ // CHK-UBJOBS-SAME: [[HOSTPP:[^\\/]+\.i]], // CHK-UBJOBS-SAME: [[T1PP:[^\\/]+\.i]], // CHK-UBJOBS-SAME: [[T2PP:[^\\/]+\.i]]" "-unbundle" -// CHK-UBJOBS: clang{{.*}}" "-cc1" "-triple" "powerpc64le-unknown-linux" "-emit-llvm-bc" {{.*}}"-fopenmp" {{.*}}"-o" " +// CHK-UBJOBS: clang{{.*}}" "-cc1" "-triple" "powerpc64le-unknown-linux" {{.*}}"-emit-llvm-bc" {{.*}}"-fopenmp" {{.*}}"-o" " // CHK-UBJOBS-SAME: [[HOSTBC:[^\\/]+\.bc]]" "-x" "cpp-output" "{{.*}}[[HOSTPP]]" "-fopenmp-targets=powerpc64le-ibm-linux-gnu,x86_64-pc-linux-gnu" // CHK-UBJOBS-ST: clang-offload-bundler{{.*}}" "-type=i" "-targets=host-powerpc64le-unknown-linux,openmp-powerpc64le-ibm-linux-gnu,openmp-x86_64-pc-linux-gnu" "-inputs= // CHK-UBJOBS-ST-SAME: [[INPUT:[^\\/]+\.i]]" "-outputs= // CHK-UBJOBS-ST-SAME: [[HOSTPP:[^\\/,]+\.i]], // CHK-UBJOBS-ST-SAME: [[T1PP:[^\\/,]+\.i]], // CHK-UBJOBS-ST-SAME: [[T2PP:[^\\/,]+\.i]]" "-unbundle" -// CHK-UBJOBS-ST: clang{{.*}}" "-cc1" "-triple" "powerpc64le-unknown-linux" "-emit-llvm-bc" {{.*}}"-fopenmp" {{.*}}"-o" " +// CHK-UBJOBS-ST: clang{{.*}}" "-cc1" "-triple" "powerpc64le-unknown-linux" {{.*}}"-emit-llvm-bc" {{.*}}"-fopenmp" {{.*}}"-o" " // CHK-UBJOBS-ST-SAME: [[HOSTBC:[^\\/]+\.bc]]" "-x" "cpp-output" "{{.*}}[[HOSTPP]]" "-fopenmp-targets=powerpc64le-ibm-linux-gnu,x86_64-pc-linux-gnu" // Create target 1 object. -// CHK-UBJOBS: clang{{.*}}" "-cc1" "-triple" "powerpc64le-ibm-linux-gnu" "-aux-triple" "powerpc64le-unknown-linux" "-emit-obj" {{.*}}"-fopenmp" {{.*}}"-o" " +// CHK-UBJOBS: clang{{.*}}" "-cc1" "-triple" "powerpc64le-ibm-linux-gnu" "-aux-triple" "powerpc64le-unknown-linux" {{.*}}"-emit-obj" {{.*}}"-fopenmp" {{.*}}"-o" " // CHK-UBJOBS-SAME: [[T1OBJ:[^\\/]+\.o]]" "-x" "cpp-output" "{{.*}}[[T1PP]]" "-fopenmp-is-device" "-fopenmp-host-ir-file-path" "{{.*}}[[HOSTBC]]" // CHK-UBJOBS: ld{{(\.exe)?}}" {{.*}}"-o" " // CHK-UBJOBS-SAME: [[T1BIN:[^\\/]+\.out]]" {{.*}}"{{.*}}[[T1OBJ]]" -// CHK-UBJOBS-ST: clang{{.*}}" "-cc1" "-triple" "powerpc64le-ibm-linux-gnu" "-aux-triple" "powerpc64le-unknown-linux" "-emit-llvm-bc" {{.*}}"-fopenmp" {{.*}}"-o" " +// CHK-UBJOBS-ST: clang{{.*}}" "-cc1" "-triple" "powerpc64le-ibm-linux-gnu" "-aux-triple" "powerpc64le-unknown-linux" {{.*}}"-emit-llvm-bc" {{.*}}"-fopenmp" {{.*}}"-o" " // CHK-UBJOBS-ST-SAME: [[T1BC:[^\\/]+\.bc]]" "-x" "cpp-output" "{{.*}}[[T1PP]]" "-fopenmp-is-device" "-fopenmp-host-ir-file-path" "{{.*}}[[HOSTBC]]" -// CHK-UBJOBS-ST: clang{{.*}}" "-cc1" "-triple" "powerpc64le-ibm-linux-gnu" "-aux-triple" "powerpc64le-unknown-linux" "-S" {{.*}}"-fopenmp" {{.*}}"-o" " +// CHK-UBJOBS-ST: clang{{.*}}" "-cc1" "-triple" "powerpc64le-ibm-linux-gnu" "-aux-triple" "powerpc64le-unknown-linux" {{.*}}"-S" {{.*}}"-fopenmp" {{.*}}"-o" " // CHK-UBJOBS-ST-SAME: [[T1ASM:[^\\/]+\.s]]" "-x" "ir" "{{.*}}[[T1BC]]" // CHK-UBJOBS-ST: clang{{.*}}" "-cc1as" "-triple" "powerpc64le-ibm-linux-gnu" "-filetype" "obj" {{.*}}"-o" " // CHK-UBJOBS-ST-SAME: [[T1OBJ:[^\\/]+\.o]]" "{{.*}}[[T1ASM]]" @@ -534,13 +534,13 @@ // CHK-UBJOBS-ST-SAME: [[T1BIN:[^\\/]+\.out-openmp-powerpc64le-ibm-linux-gnu]]" {{.*}}"{{.*}}[[T1OBJ]]" // Create target 2 object. -// CHK-UBJOBS: clang{{.*}}" "-cc1" "-triple" "x86_64-pc-linux-gnu" "-aux-triple" "powerpc64le-unknown-linux" "-emit-obj" {{.*}}"-fopenmp" {{.*}}"-o" " +// CHK-UBJOBS: clang{{.*}}" "-cc1" "-triple" "x86_64-pc-linux-gnu" "-aux-triple" "powerpc64le-unknown-linux" {{.*}}"-emit-obj" {{.*}}"-fopenmp" {{.*}}"-o" " // CHK-UBJOBS-SAME: [[T2OBJ:[^\\/]+\.o]]" "-x" "cpp-output" "{{.*}}[[T2PP]]" "-fopenmp-is-device" "-fopenmp-host-ir-file-path" "{{.*}}[[HOSTBC]]" // CHK-UBJOBS: ld{{(\.exe)?}}" {{.*}}"-o" " // CHK-UBJOBS-SAME: [[T2BIN:[^\\/]+\.out]]" {{.*}}"{{.*}}[[T2OBJ]]" -// CHK-UBJOBS-ST: clang{{.*}}" "-cc1" "-triple" "x86_64-pc-linux-gnu" "-aux-triple" "powerpc64le-unknown-linux" "-emit-llvm-bc" {{.*}}"-fopenmp" {{.*}}"-o" " +// CHK-UBJOBS-ST: clang{{.*}}" "-cc1" "-triple" "x86_64-pc-linux-gnu" "-aux-triple" "powerpc64le-unknown-linux" {{.*}}"-emit-llvm-bc" {{.*}}"-fopenmp" {{.*}}"-o" " // CHK-UBJOBS-ST-SAME: [[T2BC:[^\\/]+\.bc]]" "-x" "cpp-output" "{{.*}}[[T2PP]]" "-fopenmp-is-device" "-fopenmp-host-ir-file-path" "{{.*}}[[HOSTBC]]" -// CHK-UBJOBS-ST: clang{{.*}}" "-cc1" "-triple" "x86_64-pc-linux-gnu" "-aux-triple" "powerpc64le-unknown-linux" "-S" {{.*}}"-fopenmp" {{.*}}"-o" " +// CHK-UBJOBS-ST: clang{{.*}}" "-cc1" "-triple" "x86_64-pc-linux-gnu" "-aux-triple" "powerpc64le-unknown-linux" {{.*}}"-S" {{.*}}"-fopenmp" {{.*}}"-o" " // CHK-UBJOBS-ST-SAME: [[T2ASM:[^\\/]+\.s]]" "-x" "ir" "{{.*}}[[T2BC]]" // CHK-UBJOBS-ST: clang{{.*}}" "-cc1as" "-triple" "x86_64-pc-linux-gnu" "-filetype" "obj" {{.*}}"-o" " // CHK-UBJOBS-ST-SAME: [[T2OBJ:[^\\/]+\.o]]" "{{.*}}[[T2ASM]]" @@ -548,12 +548,12 @@ // CHK-UBJOBS-ST-SAME: [[T2BIN:[^\\/]+\.out-openmp-x86_64-pc-linux-gnu]]" {{.*}}"{{.*}}[[T2OBJ]]" // Create binary. -// CHK-UBJOBS: clang{{.*}}" "-cc1" "-triple" "powerpc64le-unknown-linux" "-emit-obj" {{.*}}"-fopenmp" {{.*}}"-o" " +// CHK-UBJOBS: clang{{.*}}" "-cc1" "-triple" "powerpc64le-unknown-linux" {{.*}}"-emit-obj" {{.*}}"-fopenmp" {{.*}}"-o" " // CHK-UBJOBS-SAME: [[HOSTOBJ:[^\\/]+\.o]]" "-x" "ir" "{{.*}}[[HOSTBC]]" // CHK-UBJOBS: ld{{(\.exe)?}}" {{.*}}"-o" " // CHK-UBJOBS-SAME: [[HOSTBIN:[^\\/]+\.out]]" {{.*}}"{{.*}}[[HOSTOBJ]]" {{.*}}"-T" " // CHK-UBJOBS-SAME: [[LKS:[^\\/]+\.lk]]" -// CHK-UBJOBS-ST: clang{{.*}}" "-cc1" "-triple" "powerpc64le-unknown-linux" "-S" {{.*}}"-fopenmp" {{.*}}"-o" " +// CHK-UBJOBS-ST: clang{{.*}}" "-cc1" "-triple" "powerpc64le-unknown-linux" {{.*}}"-S" {{.*}}"-fopenmp" {{.*}}"-o" " // CHK-UBJOBS-ST-SAME: [[HOSTASM:[^\\/]+\.s]]" "-x" "ir" "{{.*}}[[HOSTBC]]" // CHK-UBJOBS-ST: clang{{.*}}" "-cc1as" "-triple" "powerpc64le-unknown-linux" "-filetype" "obj" {{.*}}"-o" " // CHK-UBJOBS-ST-SAME: [[HOSTOBJ:[^\\/]+\.o]]" "{{.*}}[[HOSTASM]]" @@ -605,7 +605,7 @@ // CHK-UBUJOBS-SAME: [[HOSTPP:[^\\/]+\.i]], // CHK-UBUJOBS-SAME: [[T1PP:[^\\/]+\.i]], // CHK-UBUJOBS-SAME: [[T2PP:[^\\/]+\.i]]" "-unbundle" -// CHK-UBUJOBS: clang{{.*}}" "-cc1" "-triple" "powerpc64le-unknown-linux" "-emit-llvm-bc" {{.*}}"-fopenmp" {{.*}}"-o" " +// CHK-UBUJOBS: clang{{.*}}" "-cc1" "-triple" "powerpc64le-unknown-linux" {{.*}}"-emit-llvm-bc" {{.*}}"-fopenmp" {{.*}}"-o" " // CHK-UBUJOBS-SAME: [[HOSTBC:[^\\/]+\.bc]]" "-x" "cpp-output" "{{.*}}[[HOSTPP]]" "-fopenmp-targets=powerpc64le-ibm-linux-gnu,x86_64-pc-linux-gnu" // CHK-UBUJOBS-ST: clang-offload-bundler{{.*}}" "-type=i" "-targets=host-powerpc64le-unknown-linux,openmp-powerpc64le-ibm-linux-gnu,openmp-x86_64-pc-linux-gnu" "-inputs= @@ -613,35 +613,35 @@ // CHK-UBUJOBS-ST-SAME: [[HOSTPP:[^\\/,]+\.i]], // CHK-UBUJOBS-ST-SAME: [[T1PP:[^\\/,]+\.i]], // CHK-UBUJOBS-ST-SAME: [[T2PP:[^\\/,]+\.i]]" "-unbundle" -// CHK-UBUJOBS-ST: clang{{.*}}" "-cc1" "-triple" "powerpc64le-unknown-linux" "-emit-llvm-bc" {{.*}}"-fopenmp" {{.*}}"-o" " +// CHK-UBUJOBS-ST: clang{{.*}}" "-cc1" "-triple" "powerpc64le-unknown-linux" {{.*}}"-emit-llvm-bc" {{.*}}"-fopenmp" {{.*}}"-o" " // CHK-UBUJOBS-ST-SAME: [[HOSTBC:[^\\/]+\.bc]]" "-x" "cpp-output" "{{.*}}[[HOSTPP]]" "-fopenmp-targets=powerpc64le-ibm-linux-gnu,x86_64-pc-linux-gnu" // Create target 1 object. -// CHK-UBUJOBS: clang{{.*}}" "-cc1" "-triple" "powerpc64le-ibm-linux-gnu" "-aux-triple" "powerpc64le-unknown-linux" "-emit-obj" {{.*}}"-fopenmp" {{.*}}"-o" " +// CHK-UBUJOBS: clang{{.*}}" "-cc1" "-triple" "powerpc64le-ibm-linux-gnu" "-aux-triple" "powerpc64le-unknown-linux" {{.*}}"-emit-obj" {{.*}}"-fopenmp" {{.*}}"-o" " // CHK-UBUJOBS-SAME: [[T1OBJ:[^\\/]+\.o]]" "-x" "cpp-output" "{{.*}}[[T1PP]]" "-fopenmp-is-device" "-fopenmp-host-ir-file-path" "{{.*}}[[HOSTBC]]" -// CHK-UBUJOBS-ST: clang{{.*}}" "-cc1" "-triple" "powerpc64le-ibm-linux-gnu" "-aux-triple" "powerpc64le-unknown-linux" "-emit-llvm-bc" {{.*}}"-fopenmp" {{.*}}"-o" " +// CHK-UBUJOBS-ST: clang{{.*}}" "-cc1" "-triple" "powerpc64le-ibm-linux-gnu" "-aux-triple" "powerpc64le-unknown-linux" {{.*}}"-emit-llvm-bc" {{.*}}"-fopenmp" {{.*}}"-o" " // CHK-UBUJOBS-ST-SAME: [[T1BC:[^\\/]+\.bc]]" "-x" "cpp-output" "{{.*}}[[T1PP]]" "-fopenmp-is-device" "-fopenmp-host-ir-file-path" "{{.*}}[[HOSTBC]]" -// CHK-UBUJOBS-ST: clang{{.*}}" "-cc1" "-triple" "powerpc64le-ibm-linux-gnu" "-aux-triple" "powerpc64le-unknown-linux" "-S" {{.*}}"-fopenmp" {{.*}}"-o" " +// CHK-UBUJOBS-ST: clang{{.*}}" "-cc1" "-triple" "powerpc64le-ibm-linux-gnu" "-aux-triple" "powerpc64le-unknown-linux" {{.*}}"-S" {{.*}}"-fopenmp" {{.*}}"-o" " // CHK-UBUJOBS-ST-SAME: [[T1ASM:[^\\/]+\.s]]" "-x" "ir" "{{.*}}[[T1BC]]" // CHK-UBUJOBS-ST: clang{{.*}}" "-cc1as" "-triple" "powerpc64le-ibm-linux-gnu" "-filetype" "obj" {{.*}}"-o" " // CHK-UBUJOBS-ST-SAME: [[T1OBJ:[^\\/]+\.o]]" "{{.*}}[[T1ASM]]" // Create target 2 object. -// CHK-UBUJOBS: clang{{.*}}" "-cc1" "-triple" "x86_64-pc-linux-gnu" "-aux-triple" "powerpc64le-unknown-linux" "-emit-obj" {{.*}}"-fopenmp" {{.*}}"-o" " +// CHK-UBUJOBS: clang{{.*}}" "-cc1" "-triple" "x86_64-pc-linux-gnu" "-aux-triple" "powerpc64le-unknown-linux" {{.*}}"-emit-obj" {{.*}}"-fopenmp" {{.*}}"-o" " // CHK-UBUJOBS-SAME: [[T2OBJ:[^\\/]+\.o]]" "-x" "cpp-output" "{{.*}}[[T2PP]]" "-fopenmp-is-device" "-fopenmp-host-ir-file-path" "{{.*}}[[HOSTBC]]" -// CHK-UBUJOBS-ST: clang{{.*}}" "-cc1" "-triple" "x86_64-pc-linux-gnu" "-aux-triple" "powerpc64le-unknown-linux" "-emit-llvm-bc" {{.*}}"-fopenmp" {{.*}}"-o" " +// CHK-UBUJOBS-ST: clang{{.*}}" "-cc1" "-triple" "x86_64-pc-linux-gnu" "-aux-triple" "powerpc64le-unknown-linux" {{.*}}"-emit-llvm-bc" {{.*}}"-fopenmp" {{.*}}"-o" " // CHK-UBUJOBS-ST-SAME: [[T2BC:[^\\/]+\.bc]]" "-x" "cpp-output" "{{.*}}[[T2PP]]" "-fopenmp-is-device" "-fopenmp-host-ir-file-path" "{{.*}}[[HOSTBC]]" -// CHK-UBUJOBS-ST: clang{{.*}}" "-cc1" "-triple" "x86_64-pc-linux-gnu" "-aux-triple" "powerpc64le-unknown-linux" "-S" {{.*}}"-fopenmp" {{.*}}"-o" " +// CHK-UBUJOBS-ST: clang{{.*}}" "-cc1" "-triple" "x86_64-pc-linux-gnu" "-aux-triple" "powerpc64le-unknown-linux" {{.*}}"-S" {{.*}}"-fopenmp" {{.*}}"-o" " // CHK-UBUJOBS-ST-SAME: [[T2ASM:[^\\/]+\.s]]" "-x" "ir" "{{.*}}[[T2BC]]" // CHK-UBUJOBS-ST: clang{{.*}}" "-cc1as" "-triple" "x86_64-pc-linux-gnu" "-filetype" "obj" {{.*}}"-o" " // CHK-UBUJOBS-ST-SAME: [[T2OBJ:[^\\/]+\.o]]" "{{.*}}[[T2ASM]]" // Create binary. -// CHK-UBUJOBS: clang{{.*}}" "-cc1" "-triple" "powerpc64le-unknown-linux" "-emit-obj" {{.*}}"-fopenmp" {{.*}}"-o" " +// CHK-UBUJOBS: clang{{.*}}" "-cc1" "-triple" "powerpc64le-unknown-linux" {{.*}}"-emit-obj" {{.*}}"-fopenmp" {{.*}}"-o" " // CHK-UBUJOBS-SAME: [[HOSTOBJ:[^\\/]+\.o]]" "-x" "ir" "{{.*}}[[HOSTBC]]" // CHK-UBUJOBS: clang-offload-bundler{{.*}}" "-type=o" "-targets=openmp-powerpc64le-ibm-linux-gnu,openmp-x86_64-pc-linux-gnu,host-powerpc64le-unknown-linux" "-outputs= // CHK-UBUJOBS-SAME: [[RES:[^\\/]+\.o]]" "-inputs={{.*}}[[T1OBJ]],{{.*}}[[T2OBJ]],{{.*}}[[HOSTOBJ]]" -// CHK-UBUJOBS-ST: clang{{.*}}" "-cc1" "-triple" "powerpc64le-unknown-linux" "-S" {{.*}}"-fopenmp" {{.*}}"-o" " +// CHK-UBUJOBS-ST: clang{{.*}}" "-cc1" "-triple" "powerpc64le-unknown-linux" {{.*}}"-S" {{.*}}"-fopenmp" {{.*}}"-o" " // CHK-UBUJOBS-ST-SAME: [[HOSTASM:[^\\/]+\.s]]" "-x" "ir" "{{.*}}[[HOSTBC]]" // CHK-UBUJOBS-ST: clang{{.*}}" "-cc1as" "-triple" "powerpc64le-unknown-linux" "-filetype" "obj" {{.*}}"-o" " // CHK-UBUJOBS-ST-SAME: [[HOSTOBJ:[^\\/]+\.o]]" "{{.*}}[[HOSTASM]]" diff --git a/clang/test/Driver/riscv-features.c b/clang/test/Driver/riscv-features.c index 95f84f31c6115..bdf9ef4084c83 100644 --- a/clang/test/Driver/riscv-features.c +++ b/clang/test/Driver/riscv-features.c @@ -9,5 +9,5 @@ // RELAX: "-target-feature" "+relax" // NO-RELAX: "-target-feature" "-relax" -// DEFAULT-NOT: "-target-feature" "+relax" +// DEFAULT: "-target-feature" "+relax" // DEFAULT-NOT: "-target-feature" "-relax" diff --git a/clang/test/Driver/sycl-offload.c b/clang/test/Driver/sycl-offload.c index 8708569f7e4ef..6d85f623ed90f 100644 --- a/clang/test/Driver/sycl-offload.c +++ b/clang/test/Driver/sycl-offload.c @@ -221,7 +221,7 @@ // RUN: %clang -### -no-canonical-prefixes -fsycl -fsycl-targets=spir64-unknown-linux-sycldevice %s 2>&1 \ // RUN: | FileCheck -check-prefix=CHK-FSYCL-IS-DEVICE %s -// CHK-FSYCL-IS-DEVICE: clang{{.*}} "-fsycl-is-device" {{.*}} "-emit-spirv" {{.*}}.c +// CHK-FSYCL-IS-DEVICE: clang{{.*}} "-fsycl-is-device" {{.*}} "-emit-llvm-bc" {{.*}}.c /// ########################################################################### @@ -230,7 +230,7 @@ // RUN: %clang -### -fno-sycl-use-bitcode -fsycl -fsycl-targets=spir64-unknown-linux-sycldevice %s 2>&1 \ // RUN: | FileCheck -check-prefix=CHK-FSYCL-IS-DEVICE-NO-BITCODE %s -// CHK-FSYCL-IS-DEVICE-NO-BITCODE: clang{{.*}} "-fsycl-is-device" {{.*}} "-emit-spirv" {{.*}}.c +// CHK-FSYCL-IS-DEVICE-NO-BITCODE: clang{{.*}} "-fsycl-is-device" {{.*}} "-emit-llvm-bc" {{.*}}.c /// ########################################################################### @@ -271,3 +271,9 @@ // CHK-ADD-TARGETS-UB: 4: clang-offload-wrapper, {3}, object, (device-sycl) // CHK-ADD-TARGETS-UB: 5: offload, "host-sycl (x86_64-unknown-linux-gnu)" {2}, "device-sycl (spir64-unknown-linux-sycldevice)" {4}, image +/// ########################################################################### + +/// Check for default linking of -lsycl with -fsycl usage +// RUN: %clang -fsycl -target x86_64-unknown-linux-gnu %s -o %t -### 2>&1 | FileCheck -check-prefix=CHECK-LD-SYCL %s +// CHECK-LD-SYCL: "{{.*}}ld{{(.exe)?}}" +// CHECK-LD-SYCL: "-lsycl" diff --git a/clang/test/Driver/sycl.c b/clang/test/Driver/sycl.c index bb8a01b5ffe50..d044ff465539c 100644 --- a/clang/test/Driver/sycl.c +++ b/clang/test/Driver/sycl.c @@ -1,7 +1,11 @@ // RUN: %clang -### --sycl -c %s 2>&1 | FileCheck %s --check-prefix=DEFAULT +// RUN: %clang -### --sycl -fno-sycl-use-bitcode -c %s 2>&1 | FileCheck %s --check-prefix=NO-BITCODE // RUN: %clang -### -target spir64-unknown-linux-sycldevice -c -emit-llvm %s 2>&1 | FileCheck %s --check-prefix=TARGET // RUN: %clang -### --sycl -c -emit-llvm %s 2>&1 | FileCheck %s --check-prefix=COMBINED -// DEFAULT: "-triple" "spir64-unknown-{{.*}}-sycldevice"{{.*}} "-fsycl-is-device"{{.*}} "-emit-spirv" +// DEFAULT: "-triple" "spir64-unknown-{{.*}}-sycldevice"{{.*}} "-fsycl-is-device"{{.*}} "-emit-llvm-bc" +// DEFAULT-NOT: "{{.*}}llvm-spirv"{{.*}} "-spirv-no-deref-attr" +// NO-BITCODE: "-triple" "spir64-unknown-{{.*}}-sycldevice"{{.*}} "-fsycl-is-device"{{.*}} "-emit-llvm-bc" +// NO-BITCODE: "{{.*}}llvm-spirv"{{.*}} "-spirv-no-deref-attr" // TARGET: "-triple" "spir64-unknown-linux-sycldevice"{{.*}} "-fsycl-is-device"{{.*}} "-emit-llvm-bc" // COMBINED: "-triple" "spir64-unknown-{{.*}}-sycldevice"{{.*}} "-fsycl-is-device"{{.*}} "-emit-llvm-bc" diff --git a/clang/test/Driver/tsan.c b/clang/test/Driver/tsan.c index 82a0785c07ac3..ea88f87450fae 100644 --- a/clang/test/Driver/tsan.c +++ b/clang/test/Driver/tsan.c @@ -1,3 +1,5 @@ +// REQUIRES: x86-registered-target + // RUN: %clang -target x86_64-unknown-linux -fsanitize=thread %s -S -emit-llvm -o - | FileCheck %s // RUN: %clang -O1 -target x86_64-unknown-linux -fsanitize=thread %s -S -emit-llvm -o - | FileCheck %s // RUN: %clang -O2 -target x86_64-unknown-linux -fsanitize=thread %s -S -emit-llvm -o - | FileCheck %s @@ -5,5 +7,13 @@ // RUN: %clang -target x86_64-unknown-linux -fsanitize=thread %s -S -emit-llvm -o - | FileCheck %s // Verify that -fsanitize=thread invokes tsan instrumentation. +// Also check that this works with the new pass manager with and without +// optimization +// RUN: %clang -fexperimental-new-pass-manager -target x86_64-unknown-linux -fsanitize=thread %s -S -emit-llvm -o - | FileCheck %s +// RUN: %clang -O1 -fexperimental-new-pass-manager -target x86_64-unknown-linux -fsanitize=thread %s -S -emit-llvm -o - | FileCheck %s +// RUN: %clang -O2 -fexperimental-new-pass-manager -target x86_64-unknown-linux -fsanitize=thread %s -S -emit-llvm -o - | FileCheck %s +// RUN: %clang -O3 -fexperimental-new-pass-manager -target x86_64-unknown-linux -fsanitize=thread %s -S -emit-llvm -o - | FileCheck %s +// RUN: %clang -fexperimental-new-pass-manager -target x86_64-unknown-linux -fsanitize=thread %s -S -emit-llvm -o - | FileCheck %s + int foo(int *a) { return *a; } // CHECK: __tsan_init diff --git a/clang/test/Driver/wasm-toolchain.c b/clang/test/Driver/wasm-toolchain.c index 39024d11ef6f5..9c217ef2e9499 100644 --- a/clang/test/Driver/wasm-toolchain.c +++ b/clang/test/Driver/wasm-toolchain.c @@ -38,3 +38,13 @@ // RUN: %clang -### -no-canonical-prefixes -target wasm32-unknown-wasi-musl --sysroot=/foo %s 2>&1 | FileCheck -check-prefix=COMPILE %s // COMPILE: clang{{.*}}" "-cc1" {{.*}} "-internal-isystem" "/foo/include/wasm32-wasi-musl" "-internal-isystem" "/foo/include" + +// Thread-related command line tests. + +// '-pthread' sets '-target-feature +atomics' +// RUN: %clang -### -no-canonical-prefixes -target wasm32-unknown-unknown --sysroot=/foo %s -pthread 2>&1 | FileCheck -check-prefix=PTHREAD %s +// PTHREAD: clang{{.*}}" "-cc1" {{.*}} "-target-feature" "+atomics" + +// '-pthread' not allowed with '-mno-atomics' +// RUN: %clang -### -no-canonical-prefixes -target wasm32-unknown-unknown --sysroot=/foo %s -pthread -mno-atomics 2>&1 | FileCheck -check-prefix=PTHREAD_NO_ATOMICS %s +// PTHREAD_NO_ATOMICS: invalid argument '-pthread' not allowed with '-mno-atomics' diff --git a/clang/test/Driver/x86-march.c b/clang/test/Driver/x86-march.c index bc1194ff73b4c..5edc890224b43 100644 --- a/clang/test/Driver/x86-march.c +++ b/clang/test/Driver/x86-march.c @@ -159,3 +159,7 @@ // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=znver1 2>&1 \ // RUN: | FileCheck %s -check-prefix=znver1 // znver1: "-target-cpu" "znver1" +// +// RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=znver2 2>&1 \ +// RUN: | FileCheck %s -check-prefix=znver2 +// znver2: "-target-cpu" "znver2" diff --git a/clang/test/Frontend/fixed_point_comparisons.c b/clang/test/Frontend/fixed_point_comparisons.c new file mode 100644 index 0000000000000..385d0c1352f3c --- /dev/null +++ b/clang/test/Frontend/fixed_point_comparisons.c @@ -0,0 +1,378 @@ +// RUN: %clang_cc1 -ffixed-point -triple x86_64-unknown-linux-gnu -S -emit-llvm %s -o - | FileCheck %s --check-prefixes=CHECK,UNPADDED +// RUN: %clang_cc1 -ffixed-point -triple x86_64-unknown-linux-gnu -fpadding-on-unsigned-fixed-point -S -emit-llvm %s -o - | FileCheck %s --check-prefixes=CHECK,PADDED + +// Fixed point against other fixed point +_Bool b_eq_true = 2.5hk == 2.5uhk; // CHECK-DAG: @b_eq_true = {{.*}}global i8 1, align 1 +_Bool b_eq_false = 2.5hk == 2.4uhk; // CHECK-DAG: @b_eq_false = {{.*}}global i8 0, align 1 + +_Bool b_ne_true = 2.5hk != 2.4uhk; // CHECK-DAG: @b_ne_true = {{.*}}global i8 1, align 1 +_Bool b_ne_false = 2.5hk != 2.5uhk; // CHECK-DAG: @b_ne_false = {{.*}}global i8 0, align 1 + +_Bool b_lt_true = 2.5hk < 2.75uhk; // CHECK-DAG: @b_lt_true = {{.*}}global i8 1, align 1 +_Bool b_lt_false = 2.5hk < 2.5uhk; // CHECK-DAG: @b_lt_false = {{.*}}global i8 0, align 1 + +_Bool b_le_true = 2.5hk <= 2.75uhk; // CHECK-DAG: @b_le_true = {{.*}}global i8 1, align 1 +_Bool b_le_true2 = 2.5hk <= 2.5uhk; // CHECK-DAG: @b_le_true2 = {{.*}}global i8 1, align 1 +_Bool b_le_false = 2.5hk <= 2.4uhk; // CHECK-DAG: @b_le_false = {{.*}}global i8 0, align 1 + +_Bool b_gt_true = 2.75hk > 2.5uhk; // CHECK-DAG: @b_gt_true = {{.*}}global i8 1, align 1 +_Bool b_gt_false = 2.75hk > 2.75uhk; // CHECK-DAG: @b_gt_false = {{.*}}global i8 0, align 1 + +_Bool b_ge_true = 2.75hk >= 2.5uhk; // CHECK-DAG: @b_ge_true = {{.*}}global i8 1, align 1 +_Bool b_ge_true2 = 2.75hk >= 2.75uhk; // CHECK-DAG: @b_ge_true2 = {{.*}}global i8 1, align 1 +_Bool b_ge_false = 2.5hk >= 2.75uhk; // CHECK-DAG: @b_ge_false = {{.*}}global i8 0, align 1 + +// Fixed point against int +_Bool b_ieq_true = 2.0hk == 2; // CHECK-DAG: @b_ieq_true = {{.*}}global i8 1, align 1 +_Bool b_ieq_false = 2.0hk == 3; // CHECK-DAG: @b_ieq_false = {{.*}}global i8 0, align 1 + +_Bool b_ine_true = 2.0hk != 3; // CHECK-DAG: @b_ine_true = {{.*}}global i8 1, align 1 +_Bool b_ine_false = 2.0hk != 2; // CHECK-DAG: @b_ine_false = {{.*}}global i8 0, align 1 + +_Bool b_ilt_true = 2.0hk < 3; // CHECK-DAG: @b_ilt_true = {{.*}}global i8 1, align 1 +_Bool b_ilt_false = 2.0hk < 2; // CHECK-DAG: @b_ilt_false = {{.*}}global i8 0, align 1 + +_Bool b_ile_true = 2.0hk <= 3; // CHECK-DAG: @b_ile_true = {{.*}}global i8 1, align 1 +_Bool b_ile_true2 = 2.0hk <= 2; // CHECK-DAG: @b_ile_true2 = {{.*}}global i8 1, align 1 +_Bool b_ile_false = 2.0hk <= 1; // CHECK-DAG: @b_ile_false = {{.*}}global i8 0, align 1 + +_Bool b_igt_true = 2.0hk > 1; // CHECK-DAG: @b_igt_true = {{.*}}global i8 1, align 1 +_Bool b_igt_false = 2.0hk > 2; // CHECK-DAG: @b_igt_false = {{.*}}global i8 0, align 1 + +_Bool b_ige_true = 2.0hk >= 1; // CHECK-DAG: @b_ige_true = {{.*}}global i8 1, align 1 +_Bool b_ige_true2 = 2.0hk >= 2; // CHECK-DAG: @b_ige_true2 = {{.*}}global i8 1, align 1 +_Bool b_ige_false = 2.0hk >= 3; // CHECK-DAG: @b_ige_false = {{.*}}global i8 0, align 1 + +// Different signage +// Since we can have different precisions, non powers of 2 fractions may have +// different actual values when being compared. +_Bool b_sne_true = 2.6hk != 2.6uhk; +// UNPADDED-DAG: @b_sne_true = {{.*}}global i8 1, align 1 +// PADDED-DAG: @b_sne_true = {{.*}}global i8 0, align 1 + +_Bool b_seq_true = 2.0hk == 2u; // CHECK-DAG: @b_seq_true = {{.*}}global i8 1, align 1 +_Bool b_seq_true2 = 2.0uhk == 2; // CHECK-DAG: @b_seq_true2 = {{.*}}global i8 1, align 1 + +void TestComparisons() { + short _Accum sa; + _Accum a; + unsigned short _Accum usa; + unsigned _Accum ua; + + // Each of these should be a fixed point conversion followed by the actual + // comparison operation. + sa == a; + // CHECK: [[A:%[0-9]+]] = load i16, i16* %sa, align 2 + // CHECK-NEXT: [[A2:%[0-9]+]] = load i32, i32* %a, align 4 + // CHECK-NEXT: [[RESIZE_A:%[a-z0-9]+]] = sext i16 [[A]] to i32 + // CHECK-NEXT: [[UPSCALE_A:%[a-z0-9]+]] = shl i32 [[RESIZE_A]], 8 + // CHECK-NEXT: {{.*}} = icmp eq i32 [[UPSCALE_A]], [[A2]] + + sa != a; + // CHECK: [[A:%[0-9]+]] = load i16, i16* %sa, align 2 + // CHECK-NEXT: [[A2:%[0-9]+]] = load i32, i32* %a, align 4 + // CHECK-NEXT: [[RESIZE_A:%[a-z0-9]+]] = sext i16 [[A]] to i32 + // CHECK-NEXT: [[UPSCALE_A:%[a-z0-9]+]] = shl i32 [[RESIZE_A]], 8 + // CHECK-NEXT: {{.*}} = icmp ne i32 [[UPSCALE_A]], [[A2]] + + sa > a; + // CHECK: [[A:%[0-9]+]] = load i16, i16* %sa, align 2 + // CHECK-NEXT: [[A2:%[0-9]+]] = load i32, i32* %a, align 4 + // CHECK-NEXT: [[RESIZE_A:%[a-z0-9]+]] = sext i16 [[A]] to i32 + // CHECK-NEXT: [[UPSCALE_A:%[a-z0-9]+]] = shl i32 [[RESIZE_A]], 8 + // CHECK-NEXT: {{.*}} = icmp sgt i32 [[UPSCALE_A]], [[A2]] + + sa >= a; + // CHECK: [[A:%[0-9]+]] = load i16, i16* %sa, align 2 + // CHECK-NEXT: [[A2:%[0-9]+]] = load i32, i32* %a, align 4 + // CHECK-NEXT: [[RESIZE_A:%[a-z0-9]+]] = sext i16 [[A]] to i32 + // CHECK-NEXT: [[UPSCALE_A:%[a-z0-9]+]] = shl i32 [[RESIZE_A]], 8 + // CHECK-NEXT: {{.*}} = icmp sge i32 [[UPSCALE_A]], [[A2]] + + sa < a; + // CHECK: [[A:%[0-9]+]] = load i16, i16* %sa, align 2 + // CHECK-NEXT: [[A2:%[0-9]+]] = load i32, i32* %a, align 4 + // CHECK-NEXT: [[RESIZE_A:%[a-z0-9]+]] = sext i16 [[A]] to i32 + // CHECK-NEXT: [[UPSCALE_A:%[a-z0-9]+]] = shl i32 [[RESIZE_A]], 8 + // CHECK-NEXT: {{.*}} = icmp slt i32 [[UPSCALE_A]], [[A2]] + + sa <= a; + // CHECK: [[A:%[0-9]+]] = load i16, i16* %sa, align 2 + // CHECK-NEXT: [[A2:%[0-9]+]] = load i32, i32* %a, align 4 + // CHECK-NEXT: [[RESIZE_A:%[a-z0-9]+]] = sext i16 [[A]] to i32 + // CHECK-NEXT: [[UPSCALE_A:%[a-z0-9]+]] = shl i32 [[RESIZE_A]], 8 + // CHECK-NEXT: {{.*}} = icmp sle i32 [[UPSCALE_A]], [[A2]] + + usa > ua; + // CHECK: [[A:%[0-9]+]] = load i16, i16* %usa, align 2 + // CHECK-NEXT: [[A2:%[0-9]+]] = load i32, i32* %ua, align 4 + // CHECK-NEXT: [[RESIZE_A:%[a-z0-9]+]] = zext i16 [[A]] to i32 + // CHECK-NEXT: [[UPSCALE_A:%[a-z0-9]+]] = shl i32 [[RESIZE_A]], 8 + // CHECK-NEXT: {{.*}} = icmp ugt i32 [[UPSCALE_A]], [[A2]] + + usa >= ua; + // CHECK: [[A:%[0-9]+]] = load i16, i16* %usa, align 2 + // CHECK-NEXT: [[A2:%[0-9]+]] = load i32, i32* %ua, align 4 + // CHECK-NEXT: [[RESIZE_A:%[a-z0-9]+]] = zext i16 [[A]] to i32 + // CHECK-NEXT: [[UPSCALE_A:%[a-z0-9]+]] = shl i32 [[RESIZE_A]], 8 + // CHECK-NEXT: {{.*}} = icmp uge i32 [[UPSCALE_A]], [[A2]] + + usa < ua; + // CHECK: [[A:%[0-9]+]] = load i16, i16* %usa, align 2 + // CHECK-NEXT: [[A2:%[0-9]+]] = load i32, i32* %ua, align 4 + // CHECK-NEXT: [[RESIZE_A:%[a-z0-9]+]] = zext i16 [[A]] to i32 + // CHECK-NEXT: [[UPSCALE_A:%[a-z0-9]+]] = shl i32 [[RESIZE_A]], 8 + // CHECK-NEXT: {{.*}} = icmp ult i32 [[UPSCALE_A]], [[A2]] + + usa <= ua; + // CHECK: [[A:%[0-9]+]] = load i16, i16* %usa, align 2 + // CHECK-NEXT: [[A2:%[0-9]+]] = load i32, i32* %ua, align 4 + // CHECK-NEXT: [[RESIZE_A:%[a-z0-9]+]] = zext i16 [[A]] to i32 + // CHECK-NEXT: [[UPSCALE_A:%[a-z0-9]+]] = shl i32 [[RESIZE_A]], 8 + // CHECK-NEXT: {{.*}} = icmp ule i32 [[UPSCALE_A]], [[A2]] +} + +void TestIntComparisons() { + short _Accum sa; + unsigned short _Accum usa; + + int i; + unsigned int ui; + _Bool b; + char c; + short s; + enum E { + A = 2 + } e; + + // These comparisons shouldn't be that different from comparing against fixed + // point types with other fixed point types. + sa == i; + // CHECK: [[A:%[0-9]+]] = load i16, i16* %sa, align 2 + // CHECK-NEXT: [[I:%[0-9]+]] = load i32, i32* %i, align 4 + // CHECK-NEXT: [[RESIZE_A:%[a-z0-9]+]] = sext i16 [[A]] to i39 + // CHECK-NEXT: [[RESIZE_I:%[a-z0-9]+]] = sext i32 [[I]] to i39 + // CHECK-NEXT: [[UPSCALE_I:%[a-z0-9]+]] = shl i39 [[RESIZE_I]], 7 + // CHECK-NEXT: {{.*}} = icmp eq i39 [[RESIZE_A]], [[UPSCALE_I]] + + sa != i; + // CHECK: [[A:%[0-9]+]] = load i16, i16* %sa, align 2 + // CHECK-NEXT: [[I:%[0-9]+]] = load i32, i32* %i, align 4 + // CHECK-NEXT: [[RESIZE_A:%[a-z0-9]+]] = sext i16 [[A]] to i39 + // CHECK-NEXT: [[RESIZE_I:%[a-z0-9]+]] = sext i32 [[I]] to i39 + // CHECK-NEXT: [[UPSCALE_I:%[a-z0-9]+]] = shl i39 [[RESIZE_I]], 7 + // CHECK-NEXT: {{.*}} = icmp ne i39 [[RESIZE_A]], [[UPSCALE_I]] + + sa > i; + // CHECK: [[A:%[0-9]+]] = load i16, i16* %sa, align 2 + // CHECK-NEXT: [[I:%[0-9]+]] = load i32, i32* %i, align 4 + // CHECK-NEXT: [[RESIZE_A:%[a-z0-9]+]] = sext i16 [[A]] to i39 + // CHECK-NEXT: [[RESIZE_I:%[a-z0-9]+]] = sext i32 [[I]] to i39 + // CHECK-NEXT: [[UPSCALE_I:%[a-z0-9]+]] = shl i39 [[RESIZE_I]], 7 + // CHECK-NEXT: {{.*}} = icmp sgt i39 [[RESIZE_A]], [[UPSCALE_I]] + + sa >= i; + // CHECK: [[A:%[0-9]+]] = load i16, i16* %sa, align 2 + // CHECK-NEXT: [[I:%[0-9]+]] = load i32, i32* %i, align 4 + // CHECK-NEXT: [[RESIZE_A:%[a-z0-9]+]] = sext i16 [[A]] to i39 + // CHECK-NEXT: [[RESIZE_I:%[a-z0-9]+]] = sext i32 [[I]] to i39 + // CHECK-NEXT: [[UPSCALE_I:%[a-z0-9]+]] = shl i39 [[RESIZE_I]], 7 + // CHECK-NEXT: {{.*}} = icmp sge i39 [[RESIZE_A]], [[UPSCALE_I]] + + sa < i; + // CHECK: [[A:%[0-9]+]] = load i16, i16* %sa, align 2 + // CHECK-NEXT: [[I:%[0-9]+]] = load i32, i32* %i, align 4 + // CHECK-NEXT: [[RESIZE_A:%[a-z0-9]+]] = sext i16 [[A]] to i39 + // CHECK-NEXT: [[RESIZE_I:%[a-z0-9]+]] = sext i32 [[I]] to i39 + // CHECK-NEXT: [[UPSCALE_I:%[a-z0-9]+]] = shl i39 [[RESIZE_I]], 7 + // CHECK-NEXT: {{.*}} = icmp slt i39 [[RESIZE_A]], [[UPSCALE_I]] + + sa <= i; + // CHECK: [[A:%[0-9]+]] = load i16, i16* %sa, align 2 + // CHECK-NEXT: [[I:%[0-9]+]] = load i32, i32* %i, align 4 + // CHECK-NEXT: [[RESIZE_A:%[a-z0-9]+]] = sext i16 [[A]] to i39 + // CHECK-NEXT: [[RESIZE_I:%[a-z0-9]+]] = sext i32 [[I]] to i39 + // CHECK-NEXT: [[UPSCALE_I:%[a-z0-9]+]] = shl i39 [[RESIZE_I]], 7 + // CHECK-NEXT: {{.*}} = icmp sle i39 [[RESIZE_A]], [[UPSCALE_I]] + + usa > ui; + // CHECK: [[A:%[0-9]+]] = load i16, i16* %usa, align 2 + // CHECK-NEXT: [[I:%[0-9]+]] = load i32, i32* %ui, align 4 + // UNPADDED-NEXT: [[RESIZE_A:%[a-z0-9]+]] = zext i16 [[A]] to i40 + // UNPADDED-NEXT: [[RESIZE_I:%[a-z0-9]+]] = zext i32 [[I]] to i40 + // UNPADDED-NEXT: [[UPSCALE_I:%[a-z0-9]+]] = shl i40 [[RESIZE_I]], 8 + // UNPADDED-NEXT: {{.*}} = icmp ugt i40 [[RESIZE_A]], [[UPSCALE_I]] + // PADDED-NEXT: [[RESIZE_A:%[a-z0-9]+]] = zext i16 [[A]] to i39 + // PADDED-NEXT: [[RESIZE_I:%[a-z0-9]+]] = zext i32 [[I]] to i39 + // PADDED-NEXT: [[UPSCALE_I:%[a-z0-9]+]] = shl i39 [[RESIZE_I]], 7 + // PADDED-NEXT: {{.*}} = icmp ugt i39 [[RESIZE_A]], [[UPSCALE_I]] + + usa >= ui; + // CHECK: [[A:%[0-9]+]] = load i16, i16* %usa, align 2 + // CHECK-NEXT: [[I:%[0-9]+]] = load i32, i32* %ui, align 4 + // UNPADDED-NEXT: [[RESIZE_A:%[a-z0-9]+]] = zext i16 [[A]] to i40 + // UNPADDED-NEXT: [[RESIZE_I:%[a-z0-9]+]] = zext i32 [[I]] to i40 + // UNPADDED-NEXT: [[UPSCALE_I:%[a-z0-9]+]] = shl i40 [[RESIZE_I]], 8 + // UNPADDED-NEXT: {{.*}} = icmp uge i40 [[RESIZE_A]], [[UPSCALE_I]] + // PADDED-NEXT: [[RESIZE_A:%[a-z0-9]+]] = zext i16 [[A]] to i39 + // PADDED-NEXT: [[RESIZE_I:%[a-z0-9]+]] = zext i32 [[I]] to i39 + // PADDED-NEXT: [[UPSCALE_I:%[a-z0-9]+]] = shl i39 [[RESIZE_I]], 7 + // PADDED-NEXT: {{.*}} = icmp uge i39 [[RESIZE_A]], [[UPSCALE_I]] + + usa < ui; + // CHECK: [[A:%[0-9]+]] = load i16, i16* %usa, align 2 + // CHECK-NEXT: [[I:%[0-9]+]] = load i32, i32* %ui, align 4 + // UNPADDED-NEXT: [[RESIZE_A:%[a-z0-9]+]] = zext i16 [[A]] to i40 + // UNPADDED-NEXT: [[RESIZE_I:%[a-z0-9]+]] = zext i32 [[I]] to i40 + // UNPADDED-NEXT: [[UPSCALE_I:%[a-z0-9]+]] = shl i40 [[RESIZE_I]], 8 + // UNPADDED-NEXT: {{.*}} = icmp ult i40 [[RESIZE_A]], [[UPSCALE_I]] + // PADDED-NEXT: [[RESIZE_A:%[a-z0-9]+]] = zext i16 [[A]] to i39 + // PADDED-NEXT: [[RESIZE_I:%[a-z0-9]+]] = zext i32 [[I]] to i39 + // PADDED-NEXT: [[UPSCALE_I:%[a-z0-9]+]] = shl i39 [[RESIZE_I]], 7 + // PADDED-NEXT: {{.*}} = icmp ult i39 [[RESIZE_A]], [[UPSCALE_I]] + + usa <= ui; + // CHECK: [[A:%[0-9]+]] = load i16, i16* %usa, align 2 + // CHECK-NEXT: [[I:%[0-9]+]] = load i32, i32* %ui, align 4 + // UNPADDED-NEXT: [[RESIZE_A:%[a-z0-9]+]] = zext i16 [[A]] to i40 + // UNPADDED-NEXT: [[RESIZE_I:%[a-z0-9]+]] = zext i32 [[I]] to i40 + // UNPADDED-NEXT: [[UPSCALE_I:%[a-z0-9]+]] = shl i40 [[RESIZE_I]], 8 + // UNPADDED-NEXT: {{.*}} = icmp ule i40 [[RESIZE_A]], [[UPSCALE_I]] + // PADDED-NEXT: [[RESIZE_A:%[a-z0-9]+]] = zext i16 [[A]] to i39 + // PADDED-NEXT: [[RESIZE_I:%[a-z0-9]+]] = zext i32 [[I]] to i39 + // PADDED-NEXT: [[UPSCALE_I:%[a-z0-9]+]] = shl i39 [[RESIZE_I]], 7 + // PADDED-NEXT: {{.*}} = icmp ule i39 [[RESIZE_A]], [[UPSCALE_I]] + + // Allow for comparisons with other int like types. These are no different + // from comparing to an int other than varying sizes. The integer types are + // still converted to ints or unsigned ints from UsualUnaryConversions(). + sa == b; + // CHECK: [[A:%[0-9]+]] = load i16, i16* %sa, align 2 + // CHECK-NEXT: [[B:%[0-9]+]] = load i8, i8* %b, align 1 + // CHECK-NEXT: %tobool = trunc i8 [[B]] to i1 + // CHECK-NEXT: [[CONV_B:%[a-z0-9]+]] = zext i1 %tobool to i32 + // CHECK-NEXT: [[RESIZE_A:%[a-z0-9]+]] = sext i16 [[A]] to i39 + // CHECK-NEXT: [[RESIZE_B:%[a-z0-9]+]] = sext i32 [[CONV_B]] to i39 + // CHECK-NEXT: [[UPSCALE_B:%[a-z0-9]+]] = shl i39 [[RESIZE_B]], 7 + // CHECK-NEXT: {{.*}} = icmp eq i39 [[RESIZE_A]], [[UPSCALE_B]] + + sa == c; + // CHECK: [[A:%[0-9]+]] = load i16, i16* %sa, align 2 + // CHECK-NEXT: [[C:%[0-9]+]] = load i8, i8* %c, align 1 + // CHECK-NEXT: [[CONV_C:%[a-z0-9]+]] = sext i8 [[C]] to i32 + // CHECK-NEXT: [[RESIZE_A:%[a-z0-9]+]] = sext i16 [[A]] to i39 + // CHECK-NEXT: [[RESIZE_C:%[a-z0-9]+]] = sext i32 [[CONV_C]] to i39 + // CHECK-NEXT: [[UPSCALE_C:%[a-z0-9]+]] = shl i39 [[RESIZE_C]], 7 + // CHECK-NEXT: {{.*}} = icmp eq i39 [[RESIZE_A]], [[UPSCALE_C]] + + sa == s; + // CHECK: [[A:%[0-9]+]] = load i16, i16* %sa, align 2 + // CHECK-NEXT: [[S:%[0-9]+]] = load i16, i16* %s, align 2 + // CHECK-NEXT: [[CONV_S:%[a-z0-9]+]] = sext i16 [[S]] to i32 + // CHECK-NEXT: [[RESIZE_A:%[a-z0-9]+]] = sext i16 [[A]] to i39 + // CHECK-NEXT: [[RESIZE_S:%[a-z0-9]+]] = sext i32 [[CONV_S]] to i39 + // CHECK-NEXT: [[UPSCALE_S:%[a-z0-9]+]] = shl i39 [[RESIZE_S]], 7 + // CHECK-NEXT: {{.*}} = icmp eq i39 [[RESIZE_A]], [[UPSCALE_S]] + + // An enum value is IntegralCast to an unsigned int. + usa == e; + // CHECK: [[A:%[0-9]+]] = load i16, i16* %usa, align 2 + // CHECK-NEXT: [[I:%[0-9]+]] = load i32, i32* %e, align 4 + // UNPADDED-NEXT: [[RESIZE_A:%[a-z0-9]+]] = zext i16 [[A]] to i40 + // UNPADDED-NEXT: [[RESIZE_I:%[a-z0-9]+]] = zext i32 [[I]] to i40 + // UNPADDED-NEXT: [[UPSCALE_I:%[a-z0-9]+]] = shl i40 [[RESIZE_I]], 8 + // UNPADDED-NEXT: {{.*}} = icmp eq i40 [[RESIZE_A]], [[UPSCALE_I]] + // PADDED-NEXT: [[RESIZE_A:%[a-z0-9]+]] = zext i16 [[A]] to i39 + // PADDED-NEXT: [[RESIZE_I:%[a-z0-9]+]] = zext i32 [[I]] to i39 + // PADDED-NEXT: [[UPSCALE_I:%[a-z0-9]+]] = shl i39 [[RESIZE_I]], 7 + // PADDED-NEXT: {{.*}} = icmp eq i39 [[RESIZE_A]], [[UPSCALE_I]] +} + +void TestComparisonSignage() { + short _Accum sa; + unsigned short _Accum usa; + int i; + unsigned int ui; + + // Signed vs unsigned fixed point comparison + sa == usa; + // CHECK: [[A:%[0-9]+]] = load i16, i16* %sa, align 2 + // CHECK-NEXT: [[A2:%[0-9]+]] = load i16, i16* %usa, align 2 + // UNPADDED-NEXT: [[RESIZE_A:%[a-z0-9]+]] = sext i16 [[A]] to i17 + // UNPADDED-NEXT: [[UPSCALE_A:%[a-z0-9]+]] = shl i17 [[RESIZE_A]], 1 + // UNPADDED-NEXT: [[RESIZE_A2:%[a-z0-9]+]] = zext i16 [[A2]] to i17 + // UNPADDED-NEXT: {{.*}} = icmp eq i17 [[UPSCALE_A]], [[RESIZE_A2]] + // PADDED-NEXT: {{.*}} = icmp eq i16 [[A]], [[A2]] + + // Signed int vs unsigned fixed point + sa == ui; + // CHECK: [[A:%[0-9]+]] = load i16, i16* %sa, align 2 + // CHECK-NEXT: [[I:%[0-9]+]] = load i32, i32* %ui, align 4 + // CHECK-NEXT: [[RESIZE_A:%[a-z0-9]+]] = sext i16 [[A]] to i40 + // CHECK-NEXT: [[RESIZE_I:%[a-z0-9]+]] = zext i32 [[I]] to i40 + // CHECK-NEXT: [[UPSCALE_I:%[a-z0-9]+]] = shl i40 [[RESIZE_I]], 7 + // CHECK-NEXT: {{.*}} = icmp eq i40 [[RESIZE_A]], [[UPSCALE_I]] + + // Signed fixed point vs unsigned int + usa == i; + // CHECK: [[A:%[0-9]+]] = load i16, i16* %usa, align 2 + // CHECK-NEXT: [[I:%[0-9]+]] = load i32, i32* %i, align 4 + // UNPADDED-NEXT: [[RESIZE_A:%[a-z0-9]+]] = zext i16 [[A]] to i40 + // UNPADDED-NEXT: [[RESIZE_I:%[a-z0-9]+]] = sext i32 [[I]] to i40 + // UNPADDED-NEXT: [[UPSCALE_I:%[a-z0-9]+]] = shl i40 [[RESIZE_I]], 8 + // UNPADDED-NEXT: {{.*}} = icmp eq i40 [[RESIZE_A]], [[UPSCALE_I]] + // PADDED-NEXT: [[RESIZE_A:%[a-z0-9]+]] = zext i16 [[A]] to i39 + // PADDED-NEXT: [[RESIZE_I:%[a-z0-9]+]] = sext i32 [[I]] to i39 + // PADDED-NEXT: [[UPSCALE_I:%[a-z0-9]+]] = shl i39 [[RESIZE_I]], 7 + // PADDED-NEXT: {{.*}} = icmp eq i39 [[RESIZE_A]], [[UPSCALE_I]] +} + +void TestSaturationComparisons() { + short _Accum sa; + _Accum a; + _Sat short _Accum sat_sa; + _Sat _Accum sat_a; + _Sat unsigned short _Accum sat_usa; + + // These are effectively the same as conversions with their non-saturating + // counterparts since when comparing, we convert both operands to a common + // type that should be able to hold both values. + sat_sa == sat_a; + // CHECK: [[A:%[0-9]+]] = load i16, i16* %sat_sa, align 2 + // CHECK-NEXT: [[A2:%[0-9]+]] = load i32, i32* %sat_a, align 4 + // CHECK-NEXT: [[RESIZE_A:%[a-z0-9]+]] = sext i16 [[A]] to i32 + // CHECK-NEXT: [[UPSCALE_A:%[a-z0-9]+]] = shl i32 [[RESIZE_A]], 8 + // CHECK-NEXT: {{.*}} = icmp eq i32 [[UPSCALE_A]], [[A2]] + + sat_sa == a; + // CHECK: [[A:%[0-9]+]] = load i16, i16* %sat_sa, align 2 + // CHECK-NEXT: [[A2:%[0-9]+]] = load i32, i32* %a, align 4 + // CHECK-NEXT: [[RESIZE_A:%[a-z0-9]+]] = sext i16 [[A]] to i32 + // CHECK-NEXT: [[UPSCALE_A:%[a-z0-9]+]] = shl i32 [[RESIZE_A]], 8 + // CHECK-NEXT: {{.*}} = icmp eq i32 [[UPSCALE_A]], [[A2]] + + sat_sa == sat_usa; + // CHECK: [[A:%[0-9]+]] = load i16, i16* %sat_sa, align 2 + // CHECK-NEXT: [[A2:%[0-9]+]] = load i16, i16* %sat_usa, align 2 + // UNPADDED-NEXT: [[RESIZE_A:%[a-z0-9]+]] = sext i16 [[A]] to i17 + // UNPADDED-NEXT: [[UPSCALE_A:%[a-z0-9]+]] = shl i17 [[RESIZE_A]], 1 + // UNPADDED-NEXT: [[RESIZE_A2:%[a-z0-9]+]] = zext i16 [[A2]] to i17 + // UNPADDED-NEXT: {{.*}} = icmp eq i17 [[UPSCALE_A]], [[RESIZE_A2]] + // PADDED-NEXT: {{.*}} = icmp eq i16 [[A]], [[A2]] +} + +void StoreBooleanResult() { + short _Accum sa; + _Accum a; + int res; + + // Check that the result can properly be stored as an int. + res = sa == a; + // CHECK: [[A:%[0-9]+]] = load i16, i16* %sa, align 2 + // CHECK-NEXT: [[A2:%[0-9]+]] = load i32, i32* %a, align 4 + // CHECK-NEXT: [[RESIZE_A:%[a-z0-9]+]] = sext i16 [[A]] to i32 + // CHECK-NEXT: [[UPSCALE_A:%[a-z0-9]+]] = shl i32 [[RESIZE_A]], 8 + // CHECK-NEXT: [[RES:%[0-9]+]] = icmp eq i32 [[UPSCALE_A]], [[A2]] + // CHECK-NEXT: %conv = zext i1 [[RES]] to i32 + // CHECK-NEXT: store i32 %conv, i32* %res, align 4 +} diff --git a/clang/test/Frontend/fixed_point_conversions.c b/clang/test/Frontend/fixed_point_conversions.c index 0b36d9d0ca4c9..86a687bdef93b 100644 --- a/clang/test/Frontend/fixed_point_conversions.c +++ b/clang/test/Frontend/fixed_point_conversions.c @@ -1,142 +1,179 @@ -// RUN: %clang_cc1 -ffixed-point -triple x86_64-unknown-linux-gnu -S -emit-llvm %s -o - | FileCheck %s -check-prefix=DEFAULT -// RUN: %clang_cc1 -ffixed-point -triple x86_64-unknown-linux-gnu -S -emit-llvm %s -o - -fpadding-on-unsigned-fixed-point | FileCheck %s -check-prefix=SAME +// RUN: %clang_cc1 -ffixed-point -triple x86_64-unknown-linux-gnu -S -emit-llvm %s -o - | FileCheck %s --check-prefixes=CHECK,SIGNED +// RUN: %clang_cc1 -ffixed-point -triple x86_64-unknown-linux-gnu -S -emit-llvm %s -o - -fpadding-on-unsigned-fixed-point | FileCheck %s --check-prefixes=CHECK,UNSIGNED // Between different fixed point types -short _Accum sa_const = 2.5hk; // DEFAULT-DAG: @sa_const = {{.*}}global i16 320, align 2 -_Accum a_const = 2.5hk; // DEFAULT-DAG: @a_const = {{.*}}global i32 81920, align 4 -short _Accum sa_const2 = 2.5k; // DEFAULT-DAG: @sa_const2 = {{.*}}global i16 320, align 2 +short _Accum sa_const = 2.5hk; // CHECK-DAG: @sa_const = {{.*}}global i16 320, align 2 +_Accum a_const = 2.5hk; // CHECK-DAG: @a_const = {{.*}}global i32 81920, align 4 +short _Accum sa_const2 = 2.5k; // CHECK-DAG: @sa_const2 = {{.*}}global i16 320, align 2 -short _Accum sa_from_f_const = 0.5r; // DEFAULT-DAG: sa_from_f_const = {{.*}}global i16 64, align 2 -_Fract f_from_sa_const = 0.5hk; // DEFAULT-DAG: f_from_sa_const = {{.*}}global i16 16384, align 2 +short _Accum sa_from_f_const = 0.5r; // CHECK-DAG: sa_from_f_const = {{.*}}global i16 64, align 2 +_Fract f_from_sa_const = 0.5hk; // CHECK-DAG: f_from_sa_const = {{.*}}global i16 16384, align 2 unsigned short _Accum usa_const = 2.5uk; unsigned _Accum ua_const = 2.5uhk; -// DEFAULT-DAG: @usa_const = {{.*}}global i16 640, align 2 -// DEFAULT-DAG: @ua_const = {{.*}}global i32 163840, align 4 -// SAME-DAG: @usa_const = {{.*}}global i16 320, align 2 -// SAME-DAG: @ua_const = {{.*}}global i32 81920, align 4 +// SIGNED-DAG: @usa_const = {{.*}}global i16 640, align 2 +// SIGNED-DAG: @ua_const = {{.*}}global i32 163840, align 4 +// UNSIGNED-DAG: @usa_const = {{.*}}global i16 320, align 2 +// UNSIGNED-DAG: @ua_const = {{.*}}global i32 81920, align 4 + +// FixedPoint to integer +int i_const = -128.0hk; // CHECK-DAG: @i_const = {{.*}}global i32 -128, align 4 +int i_const2 = 128.0hk; // CHECK-DAG: @i_const2 = {{.*}}global i32 128, align 4 +int i_const3 = -128.0k; // CHECK-DAG: @i_const3 = {{.*}}global i32 -128, align 4 +int i_const4 = 128.0k; // CHECK-DAG: @i_const4 = {{.*}}global i32 128, align 4 +short s_const = -128.0k; // CHECK-DAG: @s_const = {{.*}}global i16 -128, align 2 +short s_const2 = 128.0k; // CHECK-DAG: @s_const2 = {{.*}}global i16 128, align 2 + +// Integer to fixed point +short _Accum sa_const5 = 2; // CHECK-DAG: @sa_const5 = {{.*}}global i16 256, align 2 +short _Accum sa_const6 = -2; // CHECK-DAG: @sa_const6 = {{.*}}global i16 -256, align 2 +short _Accum sa_const7 = -256; // CHECK-DAG: @sa_const7 = {{.*}}global i16 -32768, align 2 // Signedness unsigned short _Accum usa_const2 = 2.5hk; -// DEFAULT-DAG: @usa_const2 = {{.*}}global i16 640, align 2 -// SAME-DAG: @usa_const2 = {{.*}}global i16 320, align 2 -short _Accum sa_const3 = 2.5hk; // DEFAULT-DAG: @sa_const3 = {{.*}}global i16 320, align 2 +// SIGNED-DAG: @usa_const2 = {{.*}}global i16 640, align 2 +// UNSIGNED-DAG: @usa_const2 = {{.*}}global i16 320, align 2 +short _Accum sa_const3 = 2.5hk; // CHECK-DAG: @sa_const3 = {{.*}}global i16 320, align 2 + +int i_const5 = 128.0uhk; +unsigned int ui_const = 128.0hk; +// CHECK-DAG: @i_const5 = {{.*}}global i32 128, align 4 +// CHECK-DAG: @ui_const = {{.*}}global i32 128, align 4 + +short _Accum sa_const9 = 2u; // CHECK-DAG: @sa_const9 = {{.*}}global i16 256, align 2 +unsigned short _Accum usa_const3 = 2; +// SIGNED-DAG: @usa_const3 = {{.*}}global i16 512, align 2 +// UNSIGNED-DAG: @usa_const3 = {{.*}}global i16 256, align 2 // Overflow (this is undefined but allowed) short _Accum sa_const4 = 256.0k; +unsigned int ui_const2 = -2.5hk; +short _Accum sa_const8 = 256; +unsigned short _Accum usa_const4 = -2; // Saturation -_Sat short _Accum sat_sa_const = 2.5hk; // DEFAULT-DAG: @sat_sa_const = {{.*}}global i16 320, align 2 -_Sat short _Accum sat_sa_const2 = 256.0k; // DEFAULT-DAG: @sat_sa_const2 = {{.*}}global i16 32767, align 2 +_Sat short _Accum sat_sa_const = 2.5hk; // CHECK-DAG: @sat_sa_const = {{.*}}global i16 320, align 2 +_Sat short _Accum sat_sa_const2 = 256.0k; // CHECK-DAG: @sat_sa_const2 = {{.*}}global i16 32767, align 2 _Sat unsigned short _Accum sat_usa_const = -1.0hk; -// DEFAULT-DAG: @sat_usa_const = {{.*}}global i16 0, align 2 -// SAME-DAG: @sat_usa_const = {{.*}}global i16 0, align 2 +// CHECK-DAG: @sat_usa_const = {{.*}}global i16 0, align 2 _Sat unsigned short _Accum sat_usa_const2 = 256.0k; -// DEFAULT-DAG: @sat_usa_const2 = {{.*}}global i16 -1, align 2 -// SAME-DAG: @sat_usa_const2 = {{.*}}global i16 32767, align 2 +// SIGNED-DAG: @sat_usa_const2 = {{.*}}global i16 -1, align 2 +// UNSIGNED-DAG: @sat_usa_const2 = {{.*}}global i16 32767, align 2 + +_Sat short _Accum sat_sa_const3 = 256; // CHECK-DAG: @sat_sa_const3 = {{.*}}global i16 32767, align 2 +_Sat short _Accum sat_sa_const4 = -257; // CHECK-DAG: @sat_sa_const4 = {{.*}}global i16 -32768, align 2 +_Sat unsigned short _Accum sat_usa_const3 = -1; +// CHECK-DAG: @sat_usa_const3 = {{.*}}global i16 0, align 2 +_Sat unsigned short _Accum sat_usa_const4 = 256; +// SIGNED-DAG: @sat_usa_const4 = {{.*}}global i16 -1, align 2 +// UNSIGNED-DAG: @sat_usa_const4 = {{.*}}global i16 32767, align 2 void TestFixedPointCastSameType() { _Accum a = 2.5k; _Accum a2 = a; - // DEFAULT: [[ACCUM:%[0-9a-z]+]] = load i32, i32* %a, align 4 - // DEFAULT-NEXT: store i32 [[ACCUM]], i32* %a2, align 4 + // CHECK: [[ACCUM:%[0-9a-z]+]] = load i32, i32* %a, align 4 + // CHECK-NEXT: store i32 [[ACCUM]], i32* %a2, align 4 a2 = (_Accum)a; - // DEFAULT: [[ACCUM:%[0-9a-z]+]] = load i32, i32* %a, align 4 - // DEFAULT-NEXT: store i32 [[ACCUM]], i32* %a2, align 4 + // CHECK: [[ACCUM:%[0-9a-z]+]] = load i32, i32* %a, align 4 + // CHECK-NEXT: store i32 [[ACCUM]], i32* %a2, align 4 } void TestFixedPointCastDown() { long _Accum la = 2.5lk; _Accum a = la; - // DEFAULT: [[LACCUM:%[0-9a-z]+]] = load i64, i64* %la, align 8 - // DEFAULT-NEXT: [[ACCUM_AS_I64:%[0-9a-z]+]] = ashr i64 [[LACCUM]], 16 - // DEFAULT-NEXT: [[ACCUM:%[0-9a-z]+]] = trunc i64 [[ACCUM_AS_I64]] to i32 - // DEFAULT-NEXT: store i32 [[ACCUM]], i32* %a, align 4 + // CHECK: [[LACCUM:%[0-9a-z]+]] = load i64, i64* %la, align 8 + // CHECK-NEXT: [[ACCUM_AS_I64:%[0-9a-z]+]] = ashr i64 [[LACCUM]], 16 + // CHECK-NEXT: [[ACCUM:%[0-9a-z]+]] = trunc i64 [[ACCUM_AS_I64]] to i32 + // CHECK-NEXT: store i32 [[ACCUM]], i32* %a, align 4 a = (_Accum)la; - // DEFAULT: [[LACCUM:%[0-9a-z]+]] = load i64, i64* %la, align 8 - // DEFAULT-NEXT: [[ACCUM_AS_I64:%[0-9a-z]+]] = ashr i64 [[LACCUM]], 16 - // DEFAULT-NEXT: [[ACCUM:%[0-9a-z]+]] = trunc i64 [[ACCUM_AS_I64]] to i32 - // DEFAULT-NEXT: store i32 [[ACCUM]], i32* %a, align 4 + // CHECK: [[LACCUM:%[0-9a-z]+]] = load i64, i64* %la, align 8 + // CHECK-NEXT: [[ACCUM_AS_I64:%[0-9a-z]+]] = ashr i64 [[LACCUM]], 16 + // CHECK-NEXT: [[ACCUM:%[0-9a-z]+]] = trunc i64 [[ACCUM_AS_I64]] to i32 + // CHECK-NEXT: store i32 [[ACCUM]], i32* %a, align 4 short _Accum sa = a; - // DEFAULT: [[ACCUM:%[0-9a-z]+]] = load i32, i32* %a, align 4 - // DEFAULT-NEXT: [[SACCUM_AS_I32:%[0-9a-z]+]] = ashr i32 [[ACCUM]], 8 - // DEFAULT-NEXT: [[SACCUM:%[0-9a-z]+]] = trunc i32 [[SACCUM_AS_I32]] to i16 - // DEFAULT-NEXT: store i16 [[SACCUM]], i16* %sa, align 2 + // CHECK: [[ACCUM:%[0-9a-z]+]] = load i32, i32* %a, align 4 + // CHECK-NEXT: [[SACCUM_AS_I32:%[0-9a-z]+]] = ashr i32 [[ACCUM]], 8 + // CHECK-NEXT: [[SACCUM:%[0-9a-z]+]] = trunc i32 [[SACCUM_AS_I32]] to i16 + // CHECK-NEXT: store i16 [[SACCUM]], i16* %sa, align 2 sa = (short _Accum)a; - // DEFAULT: [[ACCUM:%[0-9a-z]+]] = load i32, i32* %a, align 4 - // DEFAULT-NEXT: [[SACCUM_AS_I32:%[0-9a-z]+]] = ashr i32 [[ACCUM]], 8 - // DEFAULT-NEXT: [[SACCUM:%[0-9a-z]+]] = trunc i32 [[SACCUM_AS_I32]] to i16 - // DEFAULT-NEXT: store i16 [[SACCUM]], i16* %sa, align 2 + // CHECK: [[ACCUM:%[0-9a-z]+]] = load i32, i32* %a, align 4 + // CHECK-NEXT: [[SACCUM_AS_I32:%[0-9a-z]+]] = ashr i32 [[ACCUM]], 8 + // CHECK-NEXT: [[SACCUM:%[0-9a-z]+]] = trunc i32 [[SACCUM_AS_I32]] to i16 + // CHECK-NEXT: store i16 [[SACCUM]], i16* %sa, align 2 } void TestFixedPointCastUp() { short _Accum sa = 2.5hk; _Accum a = sa; - // DEFAULT: [[SACCUM:%[0-9a-z]+]] = load i16, i16* %sa, align 2 - // DEFAULT-NEXT: [[SACCUM_BUFF:%[0-9a-z]+]] = sext i16 [[SACCUM]] to i32 - // DEFAULT-NEXT: [[ACCUM:%[0-9a-z]+]] = shl i32 [[SACCUM_BUFF]], 8 - // DEFAULT-NEXT: store i32 [[ACCUM]], i32* %a, align 4 + // CHECK: [[SACCUM:%[0-9a-z]+]] = load i16, i16* %sa, align 2 + // CHECK-NEXT: [[SACCUM_BUFF:%[0-9a-z]+]] = sext i16 [[SACCUM]] to i32 + // CHECK-NEXT: [[ACCUM:%[0-9a-z]+]] = shl i32 [[SACCUM_BUFF]], 8 + // CHECK-NEXT: store i32 [[ACCUM]], i32* %a, align 4 long _Accum la = a; - // DEFAULT: [[ACCUM:%[0-9a-z]+]] = load i32, i32* %a, align 4 - // DEFAULT-NEXT: [[ACCUM_BUFF:%[0-9a-z]+]] = sext i32 [[ACCUM]] to i64 - // DEFAULT-NEXT: [[LACCUM:%[0-9a-z]+]] = shl i64 [[ACCUM_BUFF]], 16 - // DEFAULT-NEXT: store i64 [[LACCUM]], i64* %la, align 8 + // CHECK: [[ACCUM:%[0-9a-z]+]] = load i32, i32* %a, align 4 + // CHECK-NEXT: [[ACCUM_BUFF:%[0-9a-z]+]] = sext i32 [[ACCUM]] to i64 + // CHECK-NEXT: [[LACCUM:%[0-9a-z]+]] = shl i64 [[ACCUM_BUFF]], 16 + // CHECK-NEXT: store i64 [[LACCUM]], i64* %la, align 8 a = (_Accum)sa; - // DEFAULT: [[SACCUM:%[0-9a-z]+]] = load i16, i16* %sa, align 2 - // DEFAULT-NEXT: [[SACCUM_BUFF:%[0-9a-z]+]] = sext i16 [[SACCUM]] to i32 - // DEFAULT-NEXT: [[ACCUM:%[0-9a-z]+]] = shl i32 [[SACCUM_BUFF]], 8 - // DEFAULT-NEXT: store i32 [[ACCUM]], i32* %a, align 4 + // CHECK: [[SACCUM:%[0-9a-z]+]] = load i16, i16* %sa, align 2 + // CHECK-NEXT: [[SACCUM_BUFF:%[0-9a-z]+]] = sext i16 [[SACCUM]] to i32 + // CHECK-NEXT: [[ACCUM:%[0-9a-z]+]] = shl i32 [[SACCUM_BUFF]], 8 + // CHECK-NEXT: store i32 [[ACCUM]], i32* %a, align 4 la = (long _Accum)a; - // DEFAULT: [[ACCUM:%[0-9a-z]+]] = load i32, i32* %a, align 4 - // DEFAULT-NEXT: [[ACCUM_BUFF:%[0-9a-z]+]] = sext i32 [[ACCUM]] to i64 - // DEFAULT-NEXT: [[LACCUM:%[0-9a-z]+]] = shl i64 [[ACCUM_BUFF]], 16 - // DEFAULT-NEXT: store i64 [[LACCUM]], i64* %la, align 8 + // CHECK: [[ACCUM:%[0-9a-z]+]] = load i32, i32* %a, align 4 + // CHECK-NEXT: [[ACCUM_BUFF:%[0-9a-z]+]] = sext i32 [[ACCUM]] to i64 + // CHECK-NEXT: [[LACCUM:%[0-9a-z]+]] = shl i64 [[ACCUM_BUFF]], 16 + // CHECK-NEXT: store i64 [[LACCUM]], i64* %la, align 8 } void TestFixedPointCastSignedness() { _Accum a = 2.5k; unsigned _Accum ua = a; - // DEFAULT: [[ACCUM:%[0-9a-z]+]] = load i32, i32* %a, align 4 - // DEFAULT-NEXT: [[UACCUM:%[0-9a-z]+]] = shl i32 [[ACCUM]], 1 - // DEFAULT-NEXT: store i32 [[UACCUM]], i32* %ua, align 4 - // SAME: TestFixedPointCastSignedness - // SAME: [[ACCUM:%[0-9a-z]+]] = load i32, i32* %a, align 4 - // SAME-NEXT: store i32 [[ACCUM]], i32* %ua, align 4 + // SIGNED: [[ACCUM:%[0-9a-z]+]] = load i32, i32* %a, align 4 + // SIGNED-NEXT: [[UACCUM:%[0-9a-z]+]] = shl i32 [[ACCUM]], 1 + // SIGNED-NEXT: store i32 [[UACCUM]], i32* %ua, align 4 + // UNSIGNED: TestFixedPointCastSignedness + // UNSIGNED: [[ACCUM:%[0-9a-z]+]] = load i32, i32* %a, align 4 + // UNSIGNED-NEXT: store i32 [[ACCUM]], i32* %ua, align 4 a = ua; - // DEFAULT: [[UACCUM:%[0-9a-z]+]] = load i32, i32* %ua, align 4 - // DEFAULT-NEXT: [[ACCUM:%[0-9a-z]+]] = lshr i32 [[UACCUM]], 1 - // DEFAULT-NEXT: store i32 [[ACCUM]], i32* %a, align 4 - // SAME: [[ACCUM:%[0-9a-z]+]] = load i32, i32* %ua, align 4 - // SAME-NEXT: store i32 [[ACCUM]], i32* %a, align 4 + // SIGNED: [[UACCUM:%[0-9a-z]+]] = load i32, i32* %ua, align 4 + // SIGNED-NEXT: [[ACCUM:%[0-9a-z]+]] = lshr i32 [[UACCUM]], 1 + // SIGNED-NEXT: store i32 [[ACCUM]], i32* %a, align 4 + // UNSIGNED: [[ACCUM:%[0-9a-z]+]] = load i32, i32* %ua, align 4 + // UNSIGNED-NEXT: store i32 [[ACCUM]], i32* %a, align 4 ua = (unsigned _Accum)a; - // DEFAULT: [[ACCUM:%[0-9a-z]+]] = load i32, i32* %a, align 4 - // DEFAULT-NEXT: [[UACCUM:%[0-9a-z]+]] = shl i32 [[ACCUM]], 1 - // DEFAULT-NEXT: store i32 [[UACCUM]], i32* %ua, align 4 + // SIGNED: [[ACCUM:%[0-9a-z]+]] = load i32, i32* %a, align 4 + // SIGNED-NEXT: [[UACCUM:%[0-9a-z]+]] = shl i32 [[ACCUM]], 1 + // SIGNED-NEXT: store i32 [[UACCUM]], i32* %ua, align 4 + // UNSIGNED: [[ACCUM:%[0-9a-z]+]] = load i32, i32* %a, align 4 + // UNSIGNED-NEXT: store i32 [[ACCUM]], i32* %ua, align 4 a = (_Accum)ua; - // DEFAULT: [[UACCUM:%[0-9a-z]+]] = load i32, i32* %ua, align 4 - // DEFAULT-NEXT: [[ACCUM:%[0-9a-z]+]] = lshr i32 [[UACCUM]], 1 - // DEFAULT-NEXT: store i32 [[ACCUM]], i32* %a, align 4 + // SIGNED: [[UACCUM:%[0-9a-z]+]] = load i32, i32* %ua, align 4 + // SIGNED-NEXT: [[ACCUM:%[0-9a-z]+]] = lshr i32 [[UACCUM]], 1 + // SIGNED-NEXT: store i32 [[ACCUM]], i32* %a, align 4 + // UNSIGNED: [[UACCUM:%[0-9a-z]+]] = load i32, i32* %ua, align 4 + // UNSIGNED-NEXT: store i32 [[UACCUM]], i32* %a, align 4 _Accum a2; unsigned long _Accum ula = a2; - // DEFAULT: [[ACCUM:%[0-9a-z]+]] = load i32, i32* %a2, align 4 - // DEFAULT-NEXT: [[ACCUM_EXT:%[0-9a-z]+]] = sext i32 [[ACCUM]] to i64 - // DEFAULT-NEXT: [[LACCUM:%[0-9a-z]+]] = shl i64 [[ACCUM_EXT]], 17 - // DEFAULT-NEXT: store i64 [[LACCUM]], i64* %ula, align 8 - // SAME: [[ACCUM:%[0-9a-z]+]] = load i32, i32* %a2, align 4 - // SAME-NEXT: [[ACCUM_EXT:%[0-9a-z]+]] = sext i32 [[ACCUM]] to i64 - // SAME-NEXT: [[LACCUM:%[0-9a-z]+]] = shl i64 [[ACCUM_EXT]], 16 - // SAME-NEXT: store i64 [[LACCUM]], i64* %ula, align 8 + // SIGNED: [[ACCUM:%[0-9a-z]+]] = load i32, i32* %a2, align 4 + // SIGNED-NEXT: [[ACCUM_EXT:%[0-9a-z]+]] = sext i32 [[ACCUM]] to i64 + // SIGNED-NEXT: [[LACCUM:%[0-9a-z]+]] = shl i64 [[ACCUM_EXT]], 17 + // SIGNED-NEXT: store i64 [[LACCUM]], i64* %ula, align 8 + // UNSIGNED: [[ACCUM:%[0-9a-z]+]] = load i32, i32* %a2, align 4 + // UNSIGNED-NEXT: [[ACCUM_EXT:%[0-9a-z]+]] = sext i32 [[ACCUM]] to i64 + // UNSIGNED-NEXT: [[LACCUM:%[0-9a-z]+]] = shl i64 [[ACCUM_EXT]], 16 + // UNSIGNED-NEXT: store i64 [[LACCUM]], i64* %ula, align 8 } void TestFixedPointCastSaturation() { @@ -153,112 +190,112 @@ void TestFixedPointCastSaturation() { // Casting down between types sat_sa = sat_a; - // DEFAULT: [[OLD_ACCUM:%[0-9a-z]+]] = load i32, i32* %sat_a, align 4 - // DEFAULT-NEXT: [[ACCUM:%[0-9a-z]+]] = ashr i32 [[OLD_ACCUM]], 8 - // DEFAULT-NEXT: [[USE_MAX:%[0-9a-z]+]] = icmp sgt i32 [[ACCUM]], 32767 - // DEFAULT-NEXT: [[RESULT:%[0-9a-z]+]] = select i1 [[USE_MAX]], i32 32767, i32 [[ACCUM]] - // DEFAULT-NEXT: [[USE_MIN:%[0-9a-z]+]] = icmp slt i32 [[RESULT]], -32768 - // DEFAULT-NEXT: [[RESULT2:%[0-9a-z]+]] = select i1 [[USE_MIN]], i32 -32768, i32 [[RESULT]] - // DEFAULT-NEXT: [[RESULT_TRUNC:%[0-9a-z]+]] = trunc i32 [[RESULT2]] to i16 - // DEFAULT-NEXT: store i16 [[RESULT_TRUNC]], i16* %sat_sa, align 2 + // CHECK: [[OLD_ACCUM:%[0-9a-z]+]] = load i32, i32* %sat_a, align 4 + // CHECK-NEXT: [[ACCUM:%[0-9a-z]+]] = ashr i32 [[OLD_ACCUM]], 8 + // CHECK-NEXT: [[USE_MAX:%[0-9a-z]+]] = icmp sgt i32 [[ACCUM]], 32767 + // CHECK-NEXT: [[RESULT:%[0-9a-z]+]] = select i1 [[USE_MAX]], i32 32767, i32 [[ACCUM]] + // CHECK-NEXT: [[USE_MIN:%[0-9a-z]+]] = icmp slt i32 [[RESULT]], -32768 + // CHECK-NEXT: [[RESULT2:%[0-9a-z]+]] = select i1 [[USE_MIN]], i32 -32768, i32 [[RESULT]] + // CHECK-NEXT: [[RESULT_TRUNC:%[0-9a-z]+]] = trunc i32 [[RESULT2]] to i16 + // CHECK-NEXT: store i16 [[RESULT_TRUNC]], i16* %sat_sa, align 2 // Accum to Fract, decreasing scale sat_sf = sat_a; - // DEFAULT: [[OLD_ACCUM:%[0-9a-z]+]] = load i32, i32* %sat_a, align 4 - // DEFAULT-NEXT: [[FRACT:%[0-9a-z]+]] = ashr i32 [[OLD_ACCUM]], 8 - // DEFAULT-NEXT: [[USE_MAX:%[0-9a-z]+]] = icmp sgt i32 [[FRACT]], 127 - // DEFAULT-NEXT: [[RESULT:%[0-9a-z]+]] = select i1 [[USE_MAX]], i32 127, i32 [[FRACT]] - // DEFAULT-NEXT: [[USE_MIN:%[0-9a-z]+]] = icmp slt i32 [[RESULT]], -128 - // DEFAULT-NEXT: [[RESULT2:%[0-9a-z]+]] = select i1 [[USE_MIN]], i32 -128, i32 [[RESULT]] - // DEFAULT-NEXT: [[RESULT_TRUNC:%[0-9a-z]+]] = trunc i32 [[RESULT2]] to i8 - // DEFAULT-NEXT: store i8 [[RESULT_TRUNC]], i8* %sat_sf, align 1 + // CHECK: [[OLD_ACCUM:%[0-9a-z]+]] = load i32, i32* %sat_a, align 4 + // CHECK-NEXT: [[FRACT:%[0-9a-z]+]] = ashr i32 [[OLD_ACCUM]], 8 + // CHECK-NEXT: [[USE_MAX:%[0-9a-z]+]] = icmp sgt i32 [[FRACT]], 127 + // CHECK-NEXT: [[RESULT:%[0-9a-z]+]] = select i1 [[USE_MAX]], i32 127, i32 [[FRACT]] + // CHECK-NEXT: [[USE_MIN:%[0-9a-z]+]] = icmp slt i32 [[RESULT]], -128 + // CHECK-NEXT: [[RESULT2:%[0-9a-z]+]] = select i1 [[USE_MIN]], i32 -128, i32 [[RESULT]] + // CHECK-NEXT: [[RESULT_TRUNC:%[0-9a-z]+]] = trunc i32 [[RESULT2]] to i8 + // CHECK-NEXT: store i8 [[RESULT_TRUNC]], i8* %sat_sf, align 1 // Accum to Fract, same scale sat_f = a; - // DEFAULT: [[ACCUM:%[0-9a-z]+]] = load i32, i32* %a, align 4 - // DEFAULT-NEXT: [[USE_MAX:%[0-9a-z]+]] = icmp sgt i32 [[ACCUM]], 32767 - // DEFAULT-NEXT: [[RESULT:%[0-9a-z]+]] = select i1 [[USE_MAX]], i32 32767, i32 [[ACCUM]] - // DEFAULT-NEXT: [[USE_MIN:%[0-9a-z]+]] = icmp slt i32 [[RESULT]], -32768 - // DEFAULT-NEXT: [[RESULT2:%[0-9a-z]+]] = select i1 [[USE_MIN]], i32 -32768, i32 [[RESULT]] - // DEFAULT-NEXT: [[RESULT_TRUNC:%[0-9a-z]+]] = trunc i32 [[RESULT2]] to i16 - // DEFAULT-NEXT: store i16 [[RESULT_TRUNC]], i16* %sat_f, align 2 + // CHECK: [[ACCUM:%[0-9a-z]+]] = load i32, i32* %a, align 4 + // CHECK-NEXT: [[USE_MAX:%[0-9a-z]+]] = icmp sgt i32 [[ACCUM]], 32767 + // CHECK-NEXT: [[RESULT:%[0-9a-z]+]] = select i1 [[USE_MAX]], i32 32767, i32 [[ACCUM]] + // CHECK-NEXT: [[USE_MIN:%[0-9a-z]+]] = icmp slt i32 [[RESULT]], -32768 + // CHECK-NEXT: [[RESULT2:%[0-9a-z]+]] = select i1 [[USE_MIN]], i32 -32768, i32 [[RESULT]] + // CHECK-NEXT: [[RESULT_TRUNC:%[0-9a-z]+]] = trunc i32 [[RESULT2]] to i16 + // CHECK-NEXT: store i16 [[RESULT_TRUNC]], i16* %sat_f, align 2 // Accum to Fract, increasing scale sat_lf = sat_a; - // DEFAULT: [[OLD_ACCUM:%[0-9a-z]+]] = load i32, i32* %sat_a, align 4 - // DEFAULT-NEXT: [[ACCUM:%[0-9a-z]+]] = sext i32 [[OLD_ACCUM]] to i48 - // DEFAULT-NEXT: [[FRACT:%[0-9a-z]+]] = shl i48 [[ACCUM]], 16 - // DEFAULT-NEXT: [[USE_MAX:%[0-9a-z]+]] = icmp sgt i48 [[FRACT]], 2147483647 - // DEFAULT-NEXT: [[RESULT:%[0-9a-z]+]] = select i1 [[USE_MAX]], i48 2147483647, i48 [[FRACT]] - // DEFAULT-NEXT: [[USE_MIN:%[0-9a-z]+]] = icmp slt i48 [[RESULT]], -2147483648 - // DEFAULT-NEXT: [[RESULT2:%[0-9a-z]+]] = select i1 [[USE_MIN]], i48 -2147483648, i48 [[RESULT]] - // DEFAULT-NEXT: [[RESULT_TRUNC:%[0-9a-z]+]] = trunc i48 [[RESULT2]] to i32 - // DEFAULT-NEXT: store i32 [[RESULT_TRUNC]], i32* %sat_lf, align 4 + // CHECK: [[OLD_ACCUM:%[0-9a-z]+]] = load i32, i32* %sat_a, align 4 + // CHECK-NEXT: [[RESIZE:%[0-9a-z]+]] = sext i32 [[OLD_ACCUM]] to i48 + // CHECK-NEXT: [[FRACT:%[0-9a-z]+]] = shl i48 [[RESIZE]], 16 + // CHECK-NEXT: [[USE_MAX:%[0-9a-z]+]] = icmp sgt i48 [[FRACT]], 2147483647 + // CHECK-NEXT: [[RESULT:%[0-9a-z]+]] = select i1 [[USE_MAX]], i48 2147483647, i48 [[FRACT]] + // CHECK-NEXT: [[USE_MIN:%[0-9a-z]+]] = icmp slt i48 [[RESULT]], -2147483648 + // CHECK-NEXT: [[RESULT2:%[0-9a-z]+]] = select i1 [[USE_MIN]], i48 -2147483648, i48 [[RESULT]] + // CHECK-NEXT: [[TRUNC:%[0-9a-z]+]] = trunc i48 [[RESULT2]] to i32 + // CHECK-NEXT: store i32 [[TRUNC]], i32* %sat_lf, align 4 // Signed to unsigned, decreasing scale _Sat _Accum sat_a2; sat_usa = sat_a2; - // DEFAULT: [[OLD_ACCUM:%[0-9a-z]+]] = load i32, i32* %sat_a2, align 4 - // DEFAULT-NEXT: [[ACCUM:%[0-9a-z]+]] = ashr i32 [[OLD_ACCUM]], 7 - // DEFAULT-NEXT: [[USE_MAX:%[0-9a-z]+]] = icmp sgt i32 [[ACCUM]], 65535 - // DEFAULT-NEXT: [[RESULT:%[0-9a-z]+]] = select i1 [[USE_MAX]], i32 65535, i32 [[ACCUM]] - // DEFAULT-NEXT: [[USE_MIN:%[0-9a-z]+]] = icmp slt i32 [[RESULT]], 0 - // DEFAULT-NEXT: [[RESULT2:%[0-9a-z]+]] = select i1 [[USE_MIN]], i32 0, i32 [[RESULT]] - // DEFAULT-NEXT: [[RESULT_TRUNC:%[0-9a-z]+]] = trunc i32 [[RESULT2]] to i16 - // DEFAULT-NEXT: store i16 [[RESULT_TRUNC]], i16* %sat_usa, align 2 - // SAME: [[OLD_ACCUM:%[0-9a-z]+]] = load i32, i32* %sat_a2, align 4 - // SAME-NEXT: [[ACCUM:%[0-9a-z]+]] = ashr i32 [[OLD_ACCUM]], 8 - // SAME-NEXT: [[USE_MAX:%[0-9a-z]+]] = icmp sgt i32 [[ACCUM]], 32767 - // SAME-NEXT: [[RESULT:%[0-9a-z]+]] = select i1 [[USE_MAX]], i32 32767, i32 [[ACCUM]] - // SAME-NEXT: [[USE_MIN:%[0-9a-z]+]] = icmp slt i32 [[RESULT]], 0 - // SAME-NEXT: [[RESULT2:%[0-9a-z]+]] = select i1 [[USE_MIN]], i32 0, i32 [[RESULT]] - // SAME-NEXT: [[RESULT_TRUNC:%[0-9a-z]+]] = trunc i32 [[RESULT2]] to i16 - // SAME-NEXT: store i16 [[RESULT_TRUNC]], i16* %sat_usa, align 2 + // SIGNED: [[OLD_ACCUM:%[0-9a-z]+]] = load i32, i32* %sat_a2, align 4 + // SIGNED-NEXT: [[ACCUM:%[0-9a-z]+]] = ashr i32 [[OLD_ACCUM]], 7 + // SIGNED-NEXT: [[USE_MAX:%[0-9a-z]+]] = icmp sgt i32 [[ACCUM]], 65535 + // SIGNED-NEXT: [[RESULT:%[0-9a-z]+]] = select i1 [[USE_MAX]], i32 65535, i32 [[ACCUM]] + // SIGNED-NEXT: [[USE_MIN:%[0-9a-z]+]] = icmp slt i32 [[RESULT]], 0 + // SIGNED-NEXT: [[RESULT2:%[0-9a-z]+]] = select i1 [[USE_MIN]], i32 0, i32 [[RESULT]] + // SIGNED-NEXT: [[RESULT_TRUNC:%[0-9a-z]+]] = trunc i32 [[RESULT2]] to i16 + // SIGNED-NEXT: store i16 [[RESULT_TRUNC]], i16* %sat_usa, align 2 + // UNSIGNED: [[OLD_ACCUM:%[0-9a-z]+]] = load i32, i32* %sat_a2, align 4 + // UNSIGNED-NEXT: [[ACCUM:%[0-9a-z]+]] = ashr i32 [[OLD_ACCUM]], 8 + // UNSIGNED-NEXT: [[USE_MAX:%[0-9a-z]+]] = icmp sgt i32 [[ACCUM]], 32767 + // UNSIGNED-NEXT: [[RESULT:%[0-9a-z]+]] = select i1 [[USE_MAX]], i32 32767, i32 [[ACCUM]] + // UNSIGNED-NEXT: [[USE_MIN:%[0-9a-z]+]] = icmp slt i32 [[RESULT]], 0 + // UNSIGNED-NEXT: [[RESULT2:%[0-9a-z]+]] = select i1 [[USE_MIN]], i32 0, i32 [[RESULT]] + // UNSIGNED-NEXT: [[RESULT_TRUNC:%[0-9a-z]+]] = trunc i32 [[RESULT2]] to i16 + // UNSIGNED-NEXT: store i16 [[RESULT_TRUNC]], i16* %sat_usa, align 2 // Signed to unsigned, increasing scale sat_ua = sat_a; - // DEFAULT: [[OLD_ACCUM:%[0-9a-z]+]] = load i32, i32* %sat_a, align 4 - // DEFAULT-NEXT: [[ACCUM_EXT:%[0-9a-z]+]] = sext i32 [[OLD_ACCUM]] to i33 - // DEFAULT-NEXT: [[ACCUM:%[0-9a-z]+]] = shl i33 [[ACCUM_EXT]], 1 - // DEFAULT-NEXT: [[USE_MIN:%[0-9a-z]+]] = icmp slt i33 [[ACCUM]], 0 - // DEFAULT-NEXT: [[RESULT2:%[0-9a-z]+]] = select i1 [[USE_MIN]], i33 0, i33 [[ACCUM]] - // DEFAULT-NEXT: [[RESULT_TRUNC:%[0-9a-z]+]] = trunc i33 [[RESULT2]] to i32 - // DEFAULT-NEXT: store i32 [[RESULT_TRUNC]], i32* %sat_ua, align 4 - // SAME: [[ACCUM:%[0-9a-z]+]] = load i32, i32* %sat_a, align 4 - // SAME-NEXT: [[USE_MIN:%[0-9a-z]+]] = icmp slt i32 [[ACCUM]], 0 - // SAME-NEXT: [[RESULT:%[0-9a-z]+]] = select i1 [[USE_MIN]], i32 0, i32 [[ACCUM]] - // SAME-NEXT: store i32 [[RESULT]], i32* %sat_ua, align 4 + // SIGNED: [[OLD_ACCUM:%[0-9a-z]+]] = load i32, i32* %sat_a, align 4 + // SIGNED-NEXT: [[RESIZE:%[0-9a-z]+]] = sext i32 [[OLD_ACCUM]] to i33 + // SIGNED-NEXT: [[ACCUM:%[0-9a-z]+]] = shl i33 [[RESIZE]], 1 + // SIGNED-NEXT: [[USE_MIN:%[0-9a-z]+]] = icmp slt i33 [[ACCUM]], 0 + // SIGNED-NEXT: [[RESULT2:%[0-9a-z]+]] = select i1 [[USE_MIN]], i33 0, i33 [[ACCUM]] + // SIGNED-NEXT: [[TRUNC:%[0-9a-z]+]] = trunc i33 [[RESULT2]] to i32 + // SIGNED-NEXT: store i32 [[TRUNC]], i32* %sat_ua, align 4 + // UNSIGNED: [[ACCUM:%[0-9a-z]+]] = load i32, i32* %sat_a, align 4 + // UNSIGNED-NEXT: [[USE_MIN:%[0-9a-z]+]] = icmp slt i32 [[ACCUM]], 0 + // UNSIGNED-NEXT: [[RESULT:%[0-9a-z]+]] = select i1 [[USE_MIN]], i32 0, i32 [[ACCUM]] + // UNSIGNED-NEXT: store i32 [[RESULT]], i32* %sat_ua, align 4 // Nothing when saturating to the same type and size sat_a = a; - // DEFAULT: [[ACCUM:%[0-9a-z]+]] = load i32, i32* %a, align 4 - // DEFAULT-NEXT: store i32 [[ACCUM]], i32* %sat_a, align 4 + // CHECK: [[ACCUM:%[0-9a-z]+]] = load i32, i32* %a, align 4 + // CHECK-NEXT: store i32 [[ACCUM]], i32* %sat_a, align 4 // Nothing when assigning back a = sat_a; - // DEFAULT: [[SAT_ACCUM:%[0-9a-z]+]] = load i32, i32* %sat_a, align 4 - // DEFAULT-NEXT: store i32 [[SAT_ACCUM]], i32* %a, align 4 + // CHECK: [[SAT_ACCUM:%[0-9a-z]+]] = load i32, i32* %sat_a, align 4 + // CHECK-NEXT: store i32 [[SAT_ACCUM]], i32* %a, align 4 // No overflow when casting from fract to signed accum sat_a = sat_f; - // DEFAULT: [[FRACT:%[0-9a-z]+]] = load i16, i16* %sat_f, align 2 - // DEFAULT-NEXT: [[FRACT_EXT:%[0-9a-z]+]] = sext i16 [[FRACT]] to i32 - // DEFAULT-NEXT: store i32 [[FRACT_EXT]], i32* %sat_a, align 4 + // CHECK: [[FRACT:%[0-9a-z]+]] = load i16, i16* %sat_f, align 2 + // CHECK-NEXT: [[FRACT_EXT:%[0-9a-z]+]] = sext i16 [[FRACT]] to i32 + // CHECK-NEXT: store i32 [[FRACT_EXT]], i32* %sat_a, align 4 // Only get overflow checking if signed fract to unsigned accum sat_ua = sat_sf; - // DEFAULT: [[FRACT:%[0-9a-z]+]] = load i8, i8* %sat_sf, align 1 - // DEFAULT-NEXT: [[FRACT_EXT:%[0-9a-z]+]] = sext i8 [[FRACT]] to i32 - // DEFAULT-NEXT: [[ACCUM:%[0-9a-z]+]] = shl i32 [[FRACT_EXT]], 9 - // DEFAULT-NEXT: [[IS_NEG:%[0-9a-z]+]] = icmp slt i32 [[ACCUM]], 0 - // DEFAULT-NEXT: [[RESULT:%[0-9a-z]+]] = select i1 [[IS_NEG]], i32 0, i32 [[ACCUM]] - // DEFAULT-NEXT: store i32 [[RESULT]], i32* %sat_ua, align 4 - // SAME: [[FRACT:%[0-9a-z]+]] = load i8, i8* %sat_sf, align 1 - // SAME-NEXT: [[FRACT_EXT:%[0-9a-z]+]] = sext i8 [[FRACT]] to i32 - // SAME-NEXT: [[ACCUM:%[0-9a-z]+]] = shl i32 [[FRACT_EXT]], 8 - // SAME-NEXT: [[IS_NEG:%[0-9a-z]+]] = icmp slt i32 [[ACCUM]], 0 - // SAME-NEXT: [[RESULT:%[0-9a-z]+]] = select i1 [[IS_NEG]], i32 0, i32 [[ACCUM]] - // SAME-NEXT: store i32 [[RESULT]], i32* %sat_ua, align 4 + // SIGNED: [[FRACT:%[0-9a-z]+]] = load i8, i8* %sat_sf, align 1 + // SIGNED-NEXT: [[FRACT_EXT:%[0-9a-z]+]] = sext i8 [[FRACT]] to i32 + // SIGNED-NEXT: [[ACCUM:%[0-9a-z]+]] = shl i32 [[FRACT_EXT]], 9 + // SIGNED-NEXT: [[IS_NEG:%[0-9a-z]+]] = icmp slt i32 [[ACCUM]], 0 + // SIGNED-NEXT: [[RESULT:%[0-9a-z]+]] = select i1 [[IS_NEG]], i32 0, i32 [[ACCUM]] + // SIGNED-NEXT: store i32 [[RESULT]], i32* %sat_ua, align 4 + // UNSIGNED: [[FRACT:%[0-9a-z]+]] = load i8, i8* %sat_sf, align 1 + // UNSIGNED-NEXT: [[FRACT_EXT:%[0-9a-z]+]] = sext i8 [[FRACT]] to i32 + // UNSIGNED-NEXT: [[ACCUM:%[0-9a-z]+]] = shl i32 [[FRACT_EXT]], 8 + // UNSIGNED-NEXT: [[IS_NEG:%[0-9a-z]+]] = icmp slt i32 [[ACCUM]], 0 + // UNSIGNED-NEXT: [[RESULT:%[0-9a-z]+]] = select i1 [[IS_NEG]], i32 0, i32 [[ACCUM]] + // UNSIGNED-NEXT: store i32 [[RESULT]], i32* %sat_ua, align 4 } void TestFixedPointCastBetFractAccum() { @@ -273,43 +310,176 @@ void TestFixedPointCastBetFractAccum() { // To lower scale sf = a; - // DEFAULT: [[ACCUM:%[0-9a-z]+]] = load i32, i32* %a, align 4 - // DEFAULT-NEXT: [[FRACT:%[0-9a-z]+]] = ashr i32 [[ACCUM]], 8 - // DEFAULT-NEXT: [[FRACT_TRUNC:%[0-9a-z]+]] = trunc i32 [[FRACT]] to i8 - // DEFAULT-NEXT: store i8 [[FRACT_TRUNC]], i8* %sf, align 1 + // CHECK: [[ACCUM:%[0-9a-z]+]] = load i32, i32* %a, align 4 + // CHECK-NEXT: [[FRACT:%[0-9a-z]+]] = ashr i32 [[ACCUM]], 8 + // CHECK-NEXT: [[FRACT_TRUNC:%[0-9a-z]+]] = trunc i32 [[FRACT]] to i8 + // CHECK-NEXT: store i8 [[FRACT_TRUNC]], i8* %sf, align 1 // To higher scale a = sf; - // DEFAULT: [[FRACT:%[0-9a-z]+]] = load i8, i8* %sf, align 1 - // DEFAULT-NEXT: [[FRACT_EXT:%[0-9a-z]+]] = sext i8 [[FRACT]] to i32 - // DEFAULT-NEXT: [[ACCUM:%[0-9a-z]+]] = shl i32 [[FRACT_EXT]], 8 - // DEFAULT-NEXT: store i32 [[ACCUM]], i32* %a, align 4 + // CHECK: [[FRACT:%[0-9a-z]+]] = load i8, i8* %sf, align 1 + // CHECK-NEXT: [[FRACT_EXT:%[0-9a-z]+]] = sext i8 [[FRACT]] to i32 + // CHECK-NEXT: [[ACCUM:%[0-9a-z]+]] = shl i32 [[FRACT_EXT]], 8 + // CHECK-NEXT: store i32 [[ACCUM]], i32* %a, align 4 // To same scale f = a; - // DEFAULT: [[ACCUM:%[0-9a-z]+]] = load i32, i32* %a, align 4 - // DEFAULT-NEXT: [[FRACT:%[0-9a-z]+]] = trunc i32 [[ACCUM]] to i16 - // DEFAULT-NEXT: store i16 [[FRACT]], i16* %f, align 2 + // CHECK: [[ACCUM:%[0-9a-z]+]] = load i32, i32* %a, align 4 + // CHECK-NEXT: [[FRACT:%[0-9a-z]+]] = trunc i32 [[ACCUM]] to i16 + // CHECK-NEXT: store i16 [[FRACT]], i16* %f, align 2 a = f; - // DEFAULT: [[FRACT:%[0-9a-z]+]] = load i16, i16* %f, align 2 - // DEFAULT-NEXT: [[ACCUM:%[0-9a-z]+]] = sext i16 [[FRACT]] to i32 - // DEFAULT-NEXT: store i32 [[ACCUM]], i32* %a, align 4 + // CHECK: [[FRACT:%[0-9a-z]+]] = load i16, i16* %f, align 2 + // CHECK-NEXT: [[ACCUM:%[0-9a-z]+]] = sext i16 [[FRACT]] to i32 + // CHECK-NEXT: store i32 [[ACCUM]], i32* %a, align 4 // To unsigned ua = uf; - // DEFAULT: [[FRACT:%[0-9a-z]+]] = load i16, i16* %uf, align 2 - // DEFAULT-NEXT: [[ACCUM:%[0-9a-z]+]] = zext i16 [[FRACT]] to i32 - // DEFAULT-NEXT: store i32 [[ACCUM]], i32* %ua, align 4 - // SAME: [[FRACT:%[0-9a-z]+]] = load i16, i16* %uf, align 2 - // SAME-NEXT: [[ACCUM:%[0-9a-z]+]] = zext i16 [[FRACT]] to i32 - // SAME-NEXT: store i32 [[ACCUM]], i32* %ua, align 4 + // CHECK: [[FRACT:%[0-9a-z]+]] = load i16, i16* %uf, align 2 + // CHECK-NEXT: [[ACCUM:%[0-9a-z]+]] = zext i16 [[FRACT]] to i32 + // CHECK-NEXT: store i32 [[ACCUM]], i32* %ua, align 4 uf = ua; - // DEFAULT: [[FRACT:%[0-9a-z]+]] = load i32, i32* %ua, align 4 - // DEFAULT-NEXT: [[ACCUM:%[0-9a-z]+]] = trunc i32 [[FRACT]] to i16 - // DEFAULT-NEXT: store i16 [[ACCUM]], i16* %uf, align 2 - // SAME: [[FRACT:%[0-9a-z]+]] = load i32, i32* %ua, align 4 - // SAME-NEXT: [[ACCUM:%[0-9a-z]+]] = trunc i32 [[FRACT]] to i16 - // SAME-NEXT: store i16 [[ACCUM]], i16* %uf, align 2 + // CHECK: [[FRACT:%[0-9a-z]+]] = load i32, i32* %ua, align 4 + // CHECK-NEXT: [[ACCUM:%[0-9a-z]+]] = trunc i32 [[FRACT]] to i16 + // CHECK-NEXT: store i16 [[ACCUM]], i16* %uf, align 2 +} + +void TestFixedPointToInt() { + int i; + short _Accum sa; + unsigned short _Accum usa; + + // Will need to check for negative values + i = sa; + // CHECK: [[FX:%[0-9]+]] = load i16, i16* %sa, align 2 + // CHECK-NEXT: [[NEG:%[0-9]+]] = icmp slt i16 [[FX]], 0 + // CHECK-NEXT: [[ROUNDED:%[0-9]+]] = add i16 [[FX]], 127 + // CHECK-NEXT: [[VAL:%[0-9]+]] = select i1 [[NEG]], i16 [[ROUNDED]], i16 [[FX]] + // CHECK-NEXT: [[RES:%[a-z0-9]+]] = ashr i16 [[VAL]], 7 + // CHECK-NEXT: [[RES2:%[a-z0-9]+]] = sext i16 [[RES]] to i32 + // CHECK-NEXT: store i32 [[RES2]], i32* %i, align 4 + + // No check needed for unsigned fixed points. Can just right shift. + i = usa; + // SIGNED: [[FX:%[0-9]+]] = load i16, i16* %usa, align 2 + // SIGNED-NEXT: [[INT:%[a-z0-9]+]] = lshr i16 [[FX]], 8 + // SIGNED-NEXT: [[RES:%[a-z0-9]+]] = zext i16 [[INT]] to i32 + // SIGNED-NEXT: store i32 [[RES]], i32* %i, align 4 + // UNSIGNED: [[FX:%[0-9]+]] = load i16, i16* %usa, align 2 + // UNSIGNED-NEXT: [[INT:%[a-z0-9]+]] = lshr i16 [[FX]], 7 + // UNSIGNED-NEXT: [[RES:%[a-z0-9]+]] = zext i16 [[INT]] to i32 + // UNSIGNED-NEXT: store i32 [[RES]], i32* %i, align 4 +} + +void TestIntToFixedPoint() { + short s; + int i, i2; + unsigned int ui; + short _Accum sa; + long _Accum la; + unsigned short _Accum usa; + _Sat short _Accum sat_sa; + _Sat unsigned short _Accum sat_usa; + + sa = i; + // CHECK: [[I:%[0-9]+]] = load i32, i32* %i, align 4 + // CHECK-NEXT: [[I_EXT:%[a-z0-9]+]] = trunc i32 [[I]] to i16 + // CHECK-NEXT: [[FX:%[a-z0-9]+]] = shl i16 [[I_EXT]], 7 + // CHECK-NEXT: store i16 [[FX]], i16* %sa, align 2 + + sa = ui; + // CHECK: [[I:%[0-9]+]] = load i32, i32* %ui, align 4 + // CHECK-NEXT: [[I_EXT:%[a-z0-9]+]] = trunc i32 [[I]] to i16 + // CHECK-NEXT: [[FX:%[a-z0-9]+]] = shl i16 [[I_EXT]], 7 + // CHECK-NEXT: store i16 [[FX]], i16* %sa, align 2 + + usa = i2; + // SIGNED: [[I:%[0-9]+]] = load i32, i32* %i2, align 4 + // SIGNED-NEXT: [[I_EXT:%[a-z0-9]+]] = trunc i32 [[I]] to i16 + // SIGNED-NEXT: [[FX:%[a-z0-9]+]] = shl i16 [[I_EXT]], 8 + // SIGNED-NEXT: store i16 [[FX]], i16* %usa, align 2 + // UNSIGNED: [[I:%[0-9]+]] = load i32, i32* %i2, align 4 + // UNSIGNED-NEXT: [[I_EXT:%[a-z0-9]+]] = trunc i32 [[I]] to i16 + // UNSIGNED-NEXT: [[FX:%[a-z0-9]+]] = shl i16 [[I_EXT]], 7 + // UNSIGNED-NEXT: store i16 [[FX]], i16* %usa, align 2 + + usa = ui; + // SIGNED: [[I:%[0-9]+]] = load i32, i32* %ui, align 4 + // SIGNED-NEXT: [[I_EXT:%[a-z0-9]+]] = trunc i32 [[I]] to i16 + // SIGNED-NEXT: [[FX:%[a-z0-9]+]] = shl i16 [[I_EXT]], 8 + // SIGNED-NEXT: store i16 [[FX]], i16* %usa, align 2 + // UNSIGNED: [[I:%[0-9]+]] = load i32, i32* %ui, align 4 + // UNSIGNED-NEXT: [[I_EXT:%[a-z0-9]+]] = trunc i32 [[I]] to i16 + // UNSIGNED-NEXT: [[FX:%[a-z0-9]+]] = shl i16 [[I_EXT]], 7 + // UNSIGNED-NEXT: store i16 [[FX]], i16* %usa, align 2 + + la = s; + // CHECK: [[I:%[0-9]+]] = load i16, i16* %s, align 2 + // CHECK-NEXT: [[I_EXT:%[a-z0-9]+]] = sext i16 [[I]] to i64 + // CHECK-NEXT: [[FX:%[a-z0-9]+]] = shl i64 [[I_EXT]], 31 + // CHECK-NEXT: store i64 [[FX]], i64* %la, align 8 +} + +void TestIntToSatFixedPoint() { + int i, i2; + unsigned int ui; + _Sat short _Accum sat_sa; + _Sat unsigned short _Accum sat_usa; + + sat_sa = i; + // CHECK: [[I:%[0-9]+]] = load i32, i32* %i, align 4 + // CHECK-NEXT: [[I_EXT:%[a-z0-9]+]] = sext i32 [[I]] to i39 + // CHECK-NEXT: [[FX:%[a-z0-9]+]] = shl i39 [[I_EXT]], 7 + // CHECK-NEXT: [[USE_MAX:%[0-9]+]] = icmp sgt i39 [[FX]], 32767 + // CHECK-NEXT: [[SATMAX:%[a-z0-9]+]] = select i1 [[USE_MAX]], i39 32767, i39 [[FX]] + // CHECK-NEXT: [[USE_MIN:%[0-9]+]] = icmp slt i39 [[SATMAX]], -32768 + // CHECK-NEXT: [[SATMIN:%[a-z0-9]+]] = select i1 [[USE_MIN]], i39 -32768, i39 [[SATMAX]] + // CHECK-NEXT: [[RES:%[a-z0-9]+]] = trunc i39 [[SATMIN]] to i16 + // CHECK-NEXT: store i16 [[RES]], i16* %sat_sa, align 2 + + sat_sa = ui; + // CHECK: [[I:%[0-9]+]] = load i32, i32* %ui, align 4 + // CHECK-NEXT: [[I_EXT:%[a-z0-9]+]] = zext i32 [[I]] to i39 + // CHECK-NEXT: [[FX:%[a-z0-9]+]] = shl i39 [[I_EXT]], 7 + // CHECK-NEXT: [[USE_MAX:%[0-9]+]] = icmp ugt i39 [[FX]], 32767 + // CHECK-NEXT: [[SATMAX:%[a-z0-9]+]] = select i1 [[USE_MAX]], i39 32767, i39 [[FX]] + // CHECK-NEXT: [[RES:%[a-z0-9]+]] = trunc i39 [[SATMAX]] to i16 + // CHECK-NEXT: store i16 [[RES]], i16* %sat_sa, align 2 + + sat_usa = i2; + // SIGNED: [[I:%[0-9]+]] = load i32, i32* %i2, align 4 + // SIGNED-NEXT: [[I_EXT:%[a-z0-9]+]] = sext i32 [[I]] to i40 + // SIGNED-NEXT: [[FX:%[a-z0-9]+]] = shl i40 [[I_EXT]], 8 + // SIGNED-NEXT: [[USE_MAX:%[0-9]+]] = icmp sgt i40 [[FX]], 65535 + // SIGNED-NEXT: [[SATMAX:%[a-z0-9]+]] = select i1 [[USE_MAX]], i40 65535, i40 [[FX]] + // SIGNED-NEXT: [[USE_MIN:%[0-9]+]] = icmp slt i40 [[SATMAX]], 0 + // SIGNED-NEXT: [[SATMIN:%[a-z0-9]+]] = select i1 [[USE_MIN]], i40 0, i40 [[SATMAX]] + // SIGNED-NEXT: [[RES:%[a-z0-9]+]] = trunc i40 [[SATMIN]] to i16 + // SIGNED-NEXT: store i16 [[RES]], i16* %sat_usa, align 2 + // UNSIGNED: [[I:%[0-9]+]] = load i32, i32* %i2, align 4 + // UNSIGNED-NEXT: [[I_EXT:%[a-z0-9]+]] = sext i32 [[I]] to i39 + // UNSIGNED-NEXT: [[FX:%[a-z0-9]+]] = shl i39 [[I_EXT]], 7 + // UNSIGNED-NEXT: [[USE_MAX:%[0-9]+]] = icmp sgt i39 [[FX]], 32767 + // UNSIGNED-NEXT: [[SATMAX:%[a-z0-9]+]] = select i1 [[USE_MAX]], i39 32767, i39 [[FX]] + // UNSIGNED-NEXT: [[USE_MIN:%[0-9]+]] = icmp slt i39 [[SATMAX]], 0 + // UNSIGNED-NEXT: [[SATMIN:%[a-z0-9]+]] = select i1 [[USE_MIN]], i39 0, i39 [[SATMAX]] + // UNSIGNED-NEXT: [[RES:%[a-z0-9]+]] = trunc i39 [[SATMIN]] to i16 + // UNSIGNED-NEXT: store i16 [[RES]], i16* %sat_usa, align 2 + + sat_usa = ui; + // SIGNED: [[I:%[0-9]+]] = load i32, i32* %ui, align 4 + // SIGNED-NEXT: [[I_EXT:%[a-z0-9]+]] = zext i32 [[I]] to i40 + // SIGNED-NEXT: [[FX:%[a-z0-9]+]] = shl i40 [[I_EXT]], 8 + // SIGNED-NEXT: [[USE_MAX:%[0-9]+]] = icmp ugt i40 [[FX]], 65535 + // SIGNED-NEXT: [[SATMAX:%[a-z0-9]+]] = select i1 [[USE_MAX]], i40 65535, i40 [[FX]] + // SIGNED-NEXT: [[RES:%[a-z0-9]+]] = trunc i40 [[SATMAX]] to i16 + // SIGNED-NEXT: store i16 [[RES]], i16* %sat_usa, align 2 + // UNSIGNED: [[I:%[0-9]+]] = load i32, i32* %ui, align 4 + // UNSIGNED-NEXT: [[I_EXT:%[a-z0-9]+]] = zext i32 [[I]] to i39 + // UNSIGNED-NEXT: [[FX:%[a-z0-9]+]] = shl i39 [[I_EXT]], 7 + // UNSIGNED-NEXT: [[USE_MAX:%[0-9]+]] = icmp ugt i39 [[FX]], 32767 + // UNSIGNED-NEXT: [[SATMAX:%[a-z0-9]+]] = select i1 [[USE_MAX]], i39 32767, i39 [[FX]] + // UNSIGNED-NEXT: [[RES:%[a-z0-9]+]] = trunc i39 [[SATMAX]] to i16 + // UNSIGNED-NEXT: store i16 [[RES]], i16* %sat_usa, align 2 } diff --git a/clang/test/Frontend/fixed_point_errors.c b/clang/test/Frontend/fixed_point_errors.c index 43c50572573ba..db15bd874b316 100644 --- a/clang/test/Frontend/fixed_point_errors.c +++ b/clang/test/Frontend/fixed_point_errors.c @@ -233,8 +233,20 @@ void CheckSuffixOnIntegerLiterals() { // expected-warning@-1{{type specifier missing, defaults to 'int'}} } +// Ok conversions +int i_const = -2.5hk; +_Sat short _Accum sat_sa_const2 = 256.0k; +_Sat unsigned short _Accum sat_usa_const = -1.0hk; +short _Accum sa_const3 = 2; +short _Accum sa_const4 = -2; + // Overflow short _Accum sa_const = 256.0k; // expected-warning{{implicit conversion from 256.0 cannot fit within the range of values for 'short _Accum'}} short _Fract sf_const = 1.0hk; // expected-warning{{implicit conversion from 1.0 cannot fit within the range of values for 'short _Fract'}} unsigned _Accum ua_const = -1.0k; // expected-warning{{implicit conversion from -1.0 cannot fit within the range of values for 'unsigned _Accum'}} short _Accum sa_const2 = 128.0k + 128.0k; // expected-warning{{implicit conversion from 256.0 cannot fit within the range of values for 'short _Accum'}} +short s_const = 65536.0lk; // expected-warning{{implicit conversion from 65536.0 cannot fit within the range of values for 'short'}} +unsigned u_const = -2.5hk; // expected-warning{{implicit conversion from -2.5 cannot fit within the range of values for 'unsigned int'}} +char c_const = 256.0uk; // expected-warning{{implicit conversion from 256.0 cannot fit within the range of values for 'char'}} +short _Accum sa_const5 = 256; // expected-warning{{implicit conversion from 256 cannot fit within the range of values for 'short _Accum'}} +unsigned short _Accum usa_const2 = -2; // expected-warning{{implicit conversion from -2 cannot fit within the range of values for 'unsigned short _Accum'}} diff --git a/clang/test/Frontend/fixed_point_unknown_conversions.c b/clang/test/Frontend/fixed_point_unknown_conversions.c index 0cd3d046ca0d9..c6a02e9038909 100644 --- a/clang/test/Frontend/fixed_point_unknown_conversions.c +++ b/clang/test/Frontend/fixed_point_unknown_conversions.c @@ -22,28 +22,19 @@ void func() { _Fract fract = accum; // ok _Accum *accum_ptr; - accum = b; // expected-error{{conversion between fixed point and '_Bool' is not yet supported}} - accum = i; // expected-error{{conversion between fixed point and 'int' is not yet supported}} - accum = i; // expected-error{{conversion between fixed point and 'int' is not yet supported}} accum = f; // expected-error{{conversion between fixed point and 'float' is not yet supported}} accum = d; // expected-error{{conversion between fixed point and 'double' is not yet supported}} accum = dc; // expected-error{{conversion between fixed point and '_Complex double' is not yet supported}} accum = ic; // expected-error{{conversion between fixed point and '_Complex int' is not yet supported}} accum = s; // expected-error{{assigning to '_Accum' from incompatible type 'struct S'}} - accum = e; // expected-error{{conversion between fixed point and 'enum E' is not yet supported}} accum = ptr; // expected-error{{assigning to '_Accum' from incompatible type 'int *'}} accum_ptr = ptr; // expected-warning{{incompatible pointer types assigning to '_Accum *' from 'int *'}} - accum = i2; // expected-error{{conversion between fixed point and 'int_t' (aka 'int') is not yet supported}} - c = accum; // expected-error{{conversion between fixed point and 'char' is not yet supported}} - i = accum; // expected-error{{conversion between fixed point and 'int' is not yet supported}} f = accum; // expected-error{{conversion between fixed point and 'float' is not yet supported}} d = accum; // expected-error{{conversion between fixed point and 'double' is not yet supported}} dc = accum; // expected-error{{conversion between fixed point and '_Complex double' is not yet supported}} ic = accum; // expected-error{{conversion between fixed point and '_Complex int' is not yet supported}} s = accum; // expected-error{{assigning to 'struct S' from incompatible type '_Accum'}} - e = accum; // expected-error{{conversion between fixed point and 'enum E' is not yet supported}} ptr = accum; // expected-error{{assigning to 'int *' from incompatible type '_Accum'}} ptr = accum_ptr; // expected-warning{{incompatible pointer types assigning to 'int *' from '_Accum *'}} - i2 = accum; // expected-error{{conversion between fixed point and 'int' is not yet supported}} } diff --git a/clang/test/Frontend/x86-target-cpu.c b/clang/test/Frontend/x86-target-cpu.c index 0ec301f4426ec..05b28f0f68fec 100644 --- a/clang/test/Frontend/x86-target-cpu.c +++ b/clang/test/Frontend/x86-target-cpu.c @@ -35,5 +35,6 @@ // RUN: %clang_cc1 -triple x86_64-unknown-unknown -target-cpu btver1 -verify %s // RUN: %clang_cc1 -triple x86_64-unknown-unknown -target-cpu btver2 -verify %s // RUN: %clang_cc1 -triple x86_64-unknown-unknown -target-cpu znver1 -verify %s +// RUN: %clang_cc1 -triple x86_64-unknown-unknown -target-cpu znver2 -verify %s // // expected-no-diagnostics diff --git a/clang/test/Headers/float.c b/clang/test/Headers/float.c index 74ebb8437f115..70c11b0537537 100644 --- a/clang/test/Headers/float.c +++ b/clang/test/Headers/float.c @@ -1,6 +1,9 @@ // RUN: %clang_cc1 -fsyntax-only -verify -std=c89 -ffreestanding %s // RUN: %clang_cc1 -fsyntax-only -verify -std=c99 -ffreestanding %s // RUN: %clang_cc1 -fsyntax-only -verify -std=c11 -ffreestanding %s +// RUN: %clang_cc1 -fsyntax-only -verify -xc++ -std=c++11 -ffreestanding %s +// RUN: %clang_cc1 -fsyntax-only -verify -xc++ -std=c++14 -ffreestanding %s +// RUN: %clang_cc1 -fsyntax-only -verify -xc++ -std=c++17 -ffreestanding %s // expected-no-diagnostics /* Basic floating point conformance checks against: @@ -11,7 +14,7 @@ /* C11, 5.2.4.2.2p11, pp. 30 C99, 5.2.4.2.2p9, pp. 25 - C89, 2.2.4.2 + C89, 2.2.4.2 */ #include @@ -42,7 +45,7 @@ #endif -#if __STDC_VERSION__ >= 201112L || !defined(__STRICT_ANSI__) +#if __STDC_VERSION__ >= 201112L || !defined(__STRICT_ANSI__) || __cplusplus >= 201703L #ifndef FLT_DECIMAL_DIG #error "Mandatory macro FLT_DECIMAL_DIG is missing." #elif FLT_DECIMAL_DIG < 6 @@ -98,7 +101,7 @@ #endif -#if __STDC_VERSION__ >= 199901L || !defined(__STRICT_ANSI__) +#if __STDC_VERSION__ >= 199901L || !defined(__STRICT_ANSI__) || __cplusplus >= 201103L #ifndef DECIMAL_DIG #error "Mandatory macro DECIMAL_DIG is missing." #elif DECIMAL_DIG < 10 @@ -212,13 +215,13 @@ _Static_assert(FLT_MANT_DIG == __FLT_MANT_DIG__, ""); _Static_assert(DBL_MANT_DIG == __DBL_MANT_DIG__, ""); _Static_assert(LDBL_MANT_DIG == __LDBL_MANT_DIG__, ""); -#if __STDC_VERSION__ >= 201112L || !defined(__STRICT_ANSI__) +#if __STDC_VERSION__ >= 201112L || !defined(__STRICT_ANSI__) || __cplusplus >= 201703L _Static_assert(FLT_DECIMAL_DIG == __FLT_DECIMAL_DIG__, ""); _Static_assert(DBL_DECIMAL_DIG == __DBL_DECIMAL_DIG__, ""); _Static_assert(LDBL_DECIMAL_DIG == __LDBL_DECIMAL_DIG__, ""); #endif -#if __STDC_VERSION__ >= 199901L || !defined(__STRICT_ANSI__) +#if __STDC_VERSION__ >= 199901L || !defined(__STRICT_ANSI__) || __cplusplus >= 201103L _Static_assert(DECIMAL_DIG == __DECIMAL_DIG__, ""); #endif diff --git a/clang/test/Headers/float16.c b/clang/test/Headers/float16.c index 3b905adb33e94..90ba053b2871f 100644 --- a/clang/test/Headers/float16.c +++ b/clang/test/Headers/float16.c @@ -1,7 +1,11 @@ -// RUN: %clang_cc1 -fsyntax-only -verify -std=c89 -ffreestanding %s -// RUN: %clang_cc1 -fsyntax-only -verify -std=c99 -ffreestanding %s -// RUN: %clang_cc1 -fsyntax-only -verify -std=c11 -ffreestanding %s -// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 -x c++ -ffreestanding %s +// RUN: %clang_cc1 -triple=aarch64-none-none -fsyntax-only -verify -std=c89 \ +// RUN: -ffreestanding %s +// RUN: %clang_cc1 -triple=aarch64-none-none -fsyntax-only -verify \ +// RUN: -std=c99 -ffreestanding %s +// RUN: %clang_cc1 -triple=aarch64-none-none -fsyntax-only -verify -std=c11 \ +// RUN: -ffreestanding %s +// RUN: %clang_cc1 -triple=aarch64-none-none -fsyntax-only -verify \ +// RUN: -std=c++11 -x c++ -ffreestanding %s // expected-no-diagnostics #define __STDC_WANT_IEC_60559_TYPES_EXT__ diff --git a/clang/test/Headers/ms-arm64-intrin.cpp b/clang/test/Headers/ms-arm64-intrin.cpp index 729ca5e7f2d24..2e052b33bf8ec 100644 --- a/clang/test/Headers/ms-arm64-intrin.cpp +++ b/clang/test/Headers/ms-arm64-intrin.cpp @@ -14,16 +14,16 @@ void check_nop() { } unsigned short check_byteswap_ushort(unsigned short val) { -// CHECK: call i16 @llvm.bswap.i16(i16 %val) +// CHECK: call i16 @_byteswap_ushort(i16 %val) return _byteswap_ushort(val); } unsigned long check_byteswap_ulong(unsigned long val) { -// CHECK: call i32 @llvm.bswap.i32(i32 %val) +// CHECK: call i32 @_byteswap_ulong(i32 %val) return _byteswap_ulong(val); } unsigned __int64 check_byteswap_uint64(unsigned __int64 val) { -// CHECK: call i64 @llvm.bswap.i64(i64 %val) +// CHECK: call i64 @_byteswap_uint64(i64 %val) return _byteswap_uint64(val); } diff --git a/clang/test/Index/Core/index-source.cpp b/clang/test/Index/Core/index-source.cpp index 0bf663e30be35..2058156ed7ab9 100644 --- a/clang/test/Index/Core/index-source.cpp +++ b/clang/test/Index/Core/index-source.cpp @@ -212,7 +212,7 @@ class PseudoOverridesInSpecializations::InnerClass { }; // CHECK: [[@LINE-2]]:54 | class(Gen)/C++ | InnerClass | c:@S@PseudoOverridesInSpecializations>#d#I@ST>1#T@InnerClass | | Def,RelChild | rel: 1 // CHECK-NEXT: RelChild -// CHECK: [[@LINE-4]]:7 | class(Gen)/C++ | PseudoOverridesInSpecializations | c:@ST>2#T#T@PseudoOverridesInSpecializations | | Ref,RelCont | rel: 1 +// CHECK: [[@LINE-4]]:7 | class(Gen,TS)/C++ | PseudoOverridesInSpecializations | c:@S@PseudoOverridesInSpecializations>#d#I | | Ref,RelCont | rel: 1 // CHECK-NEXT: RelCont template @@ -285,13 +285,13 @@ template<> class SpecializationDecl; // CHECK: [[@LINE-1]]:7 | class(Gen,TS)/C++ | SpecializationDecl | c:@S@SpecializationDecl>#I | | Decl,RelSpecialization | rel: 1 // CHECK-NEXT: RelSpecialization | SpecializationDecl | c:@ST>1#T@SpecializationDecl -// CHECK: [[@LINE-3]]:7 | class(Gen)/C++ | SpecializationDecl | c:@ST>1#T@SpecializationDecl | | Ref | rel: 0 +// CHECK: [[@LINE-3]]:7 | class(Gen,TS)/C++ | SpecializationDecl | c:@S@SpecializationDecl>#I | | Ref | rel: 0 template<> class SpecializationDecl { }; // CHECK: [[@LINE-1]]:7 | class(Gen,TS)/C++ | SpecializationDecl | c:@S@SpecializationDecl>#I | | Def,RelSpecialization | rel: 1 // CHECK-NEXT: RelSpecialization | SpecializationDecl | c:@ST>1#T@SpecializationDecl -// CHECK-NEXT: [[@LINE-3]]:7 | class(Gen)/C++ | SpecializationDecl | c:@ST>1#T@SpecializationDecl | | Ref | rel: 0 +// CHECK-NEXT: [[@LINE-3]]:7 | class(Gen,TS)/C++ | SpecializationDecl | c:@S@SpecializationDecl>#I | | Ref | rel: 0 template class PartialSpecilizationClass; @@ -306,7 +306,7 @@ class PartialSpecilizationClass : Cls { }; // CHECK-NEXT: RelSpecialization | PartialSpecilizationClass | c:@ST>2#T#T@PartialSpecilizationClass // CHECK-NEXT: [[@LINE-3]]:45 | class/C++ | Cls | c:@S@Cls | | Ref,RelBase,RelCont | rel: 1 // CHECK-NEXT: RelBase,RelCont | PartialSpecilizationClass | c:@S@PartialSpecilizationClass>#$@S@Cls#S0_ -// CHECK-NEXT: [[@LINE-5]]:7 | class(Gen)/C++ | PartialSpecilizationClass | c:@ST>2#T#T@PartialSpecilizationClass | | Ref | rel: 0 +// CHECK-NEXT: [[@LINE-5]]:7 | class(Gen,TS)/C++ | PartialSpecilizationClass | c:@S@PartialSpecilizationClass>#$@S@Cls#S0_ | | Ref | rel: 0 // CHECK-NEXT: [[@LINE-6]]:33 | class/C++ | Cls | c:@S@Cls | | Ref | rel: 0 // CHECK-NEXT: [[@LINE-7]]:38 | class/C++ | Cls | c:@S@Cls | | Ref | rel: 0 @@ -321,7 +321,7 @@ template<> void functionSp, Record::C>() { // CHECK: [[@LINE-1]]:6 | function(Gen,TS)/C++ | functionSp | c:@F@functionSp<#$@S@SpecializationDecl>#$@S@Cls#VI2># | __Z10functionSpI18SpecializationDeclI3ClsELi2EEvv | Def,RelSpecialization | rel: 1 // CHECK: RelSpecialization | functionSp | c:@FT@>2#T#NIfunctionSp#v# -// CHECK: [[@LINE-3]]:17 | class(Gen)/C++ | SpecializationDecl | c:@ST>1#T@SpecializationDecl | | Ref,RelCont | rel: 1 +// CHECK: [[@LINE-3]]:17 | class(Gen,TS)/C++ | SpecializationDecl | c:@S@SpecializationDecl>#$@S@Cls | | Ref,RelCont | rel: 1 // CHECK: [[@LINE-4]]:36 | class/C++ | Cls | c:@S@Cls | | Ref,RelCont | rel: 1 // CHECK: [[@LINE-5]]:50 | static-property/C++ | C | c:@S@Record@C | __ZN6Record1CE | Ref,RelCont | rel: 1 // CHECK: [[@LINE-6]]:42 | struct/C++ | Record | c:@S@Record | | Ref,RelCont | rel: 1 @@ -332,7 +332,7 @@ class ClassWithCorrectSpecialization { }; template<> class ClassWithCorrectSpecialization, Record::C> { }; -// CHECK: [[@LINE-1]]:38 | class(Gen)/C++ | SpecializationDecl | c:@ST>1#T@SpecializationDecl | | Ref | rel: 0 +// CHECK: [[@LINE-1]]:38 | class(Gen,TS)/C++ | SpecializationDecl | c:@S@SpecializationDecl>#$@S@Cls | | Ref | rel: 0 // CHECK: [[@LINE-2]]:57 | class/C++ | Cls | c:@S@Cls | | Ref | rel: 0 // CHECK: [[@LINE-3]]:71 | static-property/C++ | C | c:@S@Record@C | __ZN6Record1CE | Ref,Read | rel: 0 // CHECK: [[@LINE-4]]:63 | struct/C++ | Record | c:@S@Record | | Ref | rel: 0 @@ -494,7 +494,7 @@ void localStructuredBindingAndRef() { // CHECK: [[@LINE-1]]:69 | variable/C++ | structuredBinding2 | c:@N@cpp17structuredBinding@structuredBinding2 | | Ref,Read,RelCont | rel: 1 // CHECK-NEXT: RelCont | localStructuredBindingAndRef | c:@N@cpp17structuredBinding@F@localStructuredBindingAndRef# // CHECK-NOT: localBinding -// LOCAL: [[@LINE-4]]:9 | variable(local)/C++ | localBinding1 | c:index-source.cpp@25382@N@cpp17structuredBinding@F@localStructuredBindingAndRef#@localBinding1 +// LOCAL: [[@LINE-4]]:9 | variable(local)/C++ | localBinding1 | c:index-source.cpp@25408@N@cpp17structuredBinding@F@localStructuredBindingAndRef#@localBinding1 } } @@ -505,7 +505,7 @@ struct Guided { T t; }; // CHECK-NEXT: [[@LINE-2]]:19 | field/C++ | t | c:@ST>1#T@Guided@FI@t | | Def,RelChild | rel: 1 // CHECK-NEXT: RelChild | Guided | c:@ST>1#T@Guided Guided(double) -> Guided; -// CHECK: [[@LINE-1]]:19 | struct(Gen)/C++ | Guided | c:@ST>1#T@Guided | | Ref | rel: 0 +// CHECK: [[@LINE-1]]:19 | struct(Gen,TS)/C++ | Guided | c:@S@Guided>#f | | Ref | rel: 0 // CHECK-NEXT: [[@LINE-2]]:1 | struct(Gen)/C++ | Guided | c:@ST>1#T@Guided | | Ref | rel: 0 auto guided = Guided{1.0}; // CHECK: [[@LINE-1]]:6 | variable/C | guided | c:@guided | _guided | Def | rel: 0 diff --git a/clang/test/Index/attributes.c b/clang/test/Index/attributes.c index e3b2c1ab7a7d3..1db3be9bcbbe5 100644 --- a/clang/test/Index/attributes.c +++ b/clang/test/Index/attributes.c @@ -12,6 +12,14 @@ enum __attribute((flag_enum)) FlagEnum { Foo }; +void convergent_fn() __attribute__((convergent)); + +int warn_unused_result_fn() __attribute__((warn_unused_result)); + +struct __attribute__((warn_unused)) WarnUnused { + int b; +}; + // CHECK: attributes.c:3:32: StructDecl=Test2:3:32 (Definition) Extent=[3:1 - 5:2] // CHECK: attributes.c:3:23: attribute(packed)=packed Extent=[3:23 - 3:29] // CHECK: attributes.c:4:8: FieldDecl=a:4:8 (Definition) Extent=[4:3 - 4:9] [access=public] @@ -24,3 +32,10 @@ enum __attribute((flag_enum)) FlagEnum { // CHECK: attributes.c:9:38: attribute(noduplicate)= Extent=[9:38 - 9:49] // CHECK: attributes.c:11:31: EnumDecl=FlagEnum:11:31 (Definition) Extent=[11:1 - 13:2] // CHECK: attributes.c:11:19: attribute(flag_enum)= Extent=[11:19 - 11:28] +// CHECK: attributes.c:12:3: EnumConstantDecl=Foo:12:3 (Definition) Extent=[12:3 - 12:6] +// CHECK: attributes.c:15:6: FunctionDecl=convergent_fn:15:6 Extent=[15:1 - 15:49] +// CHECK: attributes.c:15:37: attribute(convergent)= Extent=[15:37 - 15:47] +// CHECK: attributes.c:17:5: FunctionDecl=warn_unused_result_fn:17:5 Extent=[17:1 - 17:64] +// CHECK: attributes.c:17:44: attribute(warn_unused_result)= Extent=[17:44 - 17:62] +// CHECK: attributes.c:19:37: StructDecl=WarnUnused:19:37 (Definition) Extent=[19:1 - 21:2] +// CHECK: attributes.c:19:23: attribute(warn_unused)= Extent=[19:23 - 19:34] diff --git a/clang/test/Index/index-refs.cpp b/clang/test/Index/index-refs.cpp index 760e4cfcf9782..0e613e48522b1 100644 --- a/clang/test/Index/index-refs.cpp +++ b/clang/test/Index/index-refs.cpp @@ -117,7 +117,7 @@ int ginitlist[] = {EnumVal}; /* when indexing implicit instantiations [indexEntityReference]: kind: struct-template-spec | name: TS | USR: c:@S@TS>#I | {{.*}} | loc: 55:3 */ -// CHECK-NEXT: [indexEntityReference]: kind: c++-class-template | name: TS | USR: c:@ST>2#T#T@TS | {{.*}} | loc: 55:3 +// CHECK-NEXT: [indexEntityReference]: kind: struct-template-partial-spec | name: TS | USR: c:@SP>1#T@TS>#t0.0#I | {{.*}} | loc: 55:3 // CHECK: [indexEntityReference]: kind: variable | name: array_size | {{.*}} | loc: 59:22 // CHECK: [indexEntityReference]: kind: variable | name: default_param | {{.*}} | loc: 62:19 | {{.*}} | role: ref read diff --git a/clang/test/Index/ms-property.cpp b/clang/test/Index/ms-property.cpp new file mode 100644 index 0000000000000..74b5b1399cf50 --- /dev/null +++ b/clang/test/Index/ms-property.cpp @@ -0,0 +1,32 @@ +// RUN: c-index-test core -print-source-symbols -- -target x86_64-apple-darwin10 -fms-extensions -fno-ms-compatibility %s | FileCheck %s + +// CHECK: [[@LINE+1]]:8 | struct/C++ | Simple | [[Simple_USR:.*]] | | Def | rel: 0 +struct Simple { + int GetX() const; + // CHECK: [[@LINE-1]]:7 | instance-method/C++ | GetX | [[GetX_USR:.*]] | __ZNK6Simple4GetXEv | Decl,RelChild | rel: 1 + // CHECK-NEXT: RelChild | Simple | [[Simple_USR]] + + void PutX(int i); + // CHECK: [[@LINE-1]]:8 | instance-method/C++ | PutX | [[PutX_USR:.*]] | __ZN6Simple4PutXEi | Decl,RelChild | rel: 1 + // CHECK-NEXT: RelChild | Simple | [[Simple_USR]] + + __declspec(property(get=GetX, put=PutX)) int propX; + // CHECK: [[@LINE-1]]:48 | instance-property/C++ | propX | [[propX_USR:.*]] | | Def,RelChild | rel: 1 + // CHECK-NEXT: RelChild | Simple | [[Simple_USR]] +}; + +// CHECK: [[@LINE+1]]:5 | function/C | test | [[test_USR:.*]] | __Z4testv | Def | rel: 0 +int test() { + Simple s; + s.propX = 5; + // CHECK: [[@LINE-1]]:5 | instance-property/C++ | propX | [[propX_USR]] | | Ref,RelCont | rel: 1 + // CHECK-NEXT: RelCont | test | [[test_USR]] + // CHECK: [[@LINE-3]]:5 | instance-method/C++ | PutX | [[PutX_USR]] | __ZN6Simple4PutXEi | Ref,Call,RelCall,RelCont | rel: 1 + // CHECK-NEXT: RelCall,RelCont | test | [[test_USR]] + + return s.propX; + // CHECK: [[@LINE-1]]:12 | instance-property/C++ | propX | [[propX_USR]] | | Ref,RelCont | rel: 1 + // CHECK-NEXT: RelCont | test | [[test_USR]] + // CHECK: [[@LINE-3]]:12 | instance-method/C++ | GetX | [[GetX_USR]] | __ZNK6Simple4GetXEv | Ref,Call,RelCall,RelCont | rel: 1 + // CHECK-NEXT: RelCall,RelCont | test | [[test_USR]] +} diff --git a/clang/test/Index/print-type-size.cpp b/clang/test/Index/print-type-size.cpp index 1ea53462733f8..b4098d97726c4 100644 --- a/clang/test/Index/print-type-size.cpp +++ b/clang/test/Index/print-type-size.cpp @@ -400,4 +400,10 @@ plopplop; struct lastValid { }; +// CHECK64: CXXMethod=Tie:[[@LINE+3]]:8 (const) [type=auto (void *) const] [typekind=FunctionProto] [sizeof=1] [alignof=4] [resulttype=auto] [resulttypekind=Auto] [resultsizeof=-6] [resultalignof=-6] +// CHECK32: CXXMethod=Tie:[[@LINE+2]]:8 (const) [type=auto (void *) const] [typekind=FunctionProto] [sizeof=1] [alignof=4] [resulttype=auto] [resulttypekind=Auto] [resultsizeof=-6] [resultalignof=-6] +class BrowsingContext { + auto Tie(void*) const; +}; + } diff --git a/clang/test/Index/usrs.cpp b/clang/test/Index/usrs.cpp index 2bd5744371ade..dbfa44f4b6764 100644 --- a/clang/test/Index/usrs.cpp +++ b/clang/test/Index/usrs.cpp @@ -158,7 +158,7 @@ __m128 vectorOverload(__m128 f); // CHECK: usrs.cpp c:@NA@foo_alias // CHECK-NOT: foo // CHECK: usrs.cpp c:@NA@foo_alias2 -// CHECK-NOT: ClsB +// CHECK: usrs.cpp c:@UD@ClsB Extent=[64:1 - 64:16] // CHECK: usrs.cpp c:@NA@foo_alias3 // CHECK: usrs.cpp c:@aN Extent=[68:1 - 73:2] // CHECK: usrs.cpp c:usrs.cpp@aN@S@RDar9371763_Foo Extent=[69:1 - 72:2] diff --git a/clang/test/Lexer/cxx-features.cpp b/clang/test/Lexer/cxx-features.cpp index 09b82b7c47ef4..75d6e0aa14dd3 100644 --- a/clang/test/Lexer/cxx-features.cpp +++ b/clang/test/Lexer/cxx-features.cpp @@ -6,9 +6,9 @@ // // RUN: %clang_cc1 -std=c++17 -fcxx-exceptions -fsized-deallocation -frelaxed-template-template-args -DRELAXED_TEMPLATE_TEMPLATE_ARGS=1 -verify %s // RUN: %clang_cc1 -std=c++17 -fcxx-exceptions -fsized-deallocation -fconcepts-ts -DCONCEPTS_TS=1 -verify %s -// RUN: %clang_cc1 -fno-rtti -fno-threadsafe-statics -verify %s -DNO_EXCEPTIONS -DNO_RTTI -DNO_THREADSAFE_STATICS -fsized-deallocation -// RUN: %clang_cc1 -fcoroutines-ts -DNO_EXCEPTIONS -DCOROUTINES -verify -fsized-deallocation %s -// RUN: %clang_cc1 -fchar8_t -DNO_EXCEPTIONS -DCHAR8_T -verify -fsized-deallocation %s +// RUN: %clang_cc1 -std=c++14 -fno-rtti -fno-threadsafe-statics -verify %s -DNO_EXCEPTIONS -DNO_RTTI -DNO_THREADSAFE_STATICS -fsized-deallocation +// RUN: %clang_cc1 -std=c++14 -fcoroutines-ts -DNO_EXCEPTIONS -DCOROUTINES -verify -fsized-deallocation %s +// RUN: %clang_cc1 -std=c++14 -fchar8_t -DNO_EXCEPTIONS -DCHAR8_T -verify -fsized-deallocation %s // RUN: %clang_cc1 -std=c++2a -fno-char8_t -DNO_EXCEPTIONS -DNO_CHAR8_T -verify -fsized-deallocation %s // expected-no-diagnostics @@ -271,6 +271,6 @@ #error "wrong value for __cpp_experimental_concepts" #endif -#if defined(COROUTINES) ? check(coroutines, 201703L, 201703L, 201703L, 201703L, 201703L) : check(coroutines, 0, 0, 0, 0, 0) +#if defined(COROUTINES) ? check(coroutines, 201703L, 201703L, 201703L, 201703L, 201703L) : check(coroutines, 0, 0, 0, 0, 201703L) #error "wrong value for __cpp_coroutines" #endif diff --git a/clang/test/Lexer/cxx2a_keyword_as_cxx17.cpp b/clang/test/Lexer/cxx2a_keyword_as_cxx17.cpp index c6a821be0ea71..d2ed7d33803ab 100644 --- a/clang/test/Lexer/cxx2a_keyword_as_cxx17.cpp +++ b/clang/test/Lexer/cxx2a_keyword_as_cxx17.cpp @@ -5,5 +5,9 @@ template concept x = 0; #undef concept +int co_await = 0; // expected-warning {{'co_await' is a keyword in C++2a}} +int co_return = 0; // expected-warning {{'co_return' is a keyword in C++2a}} +int co_yield = 0; // expected-warning {{'co_yield' is a keyword in C++2a}} +int char8_t = 0; // expected-warning {{'char8_t' is a keyword in C++2a}} int concept = 0; // expected-warning {{'concept' is a keyword in C++2a}} int requires = 0; // expected-warning {{'requires' is a keyword in C++2a}} diff --git a/clang/test/Lexer/half-literal.cpp b/clang/test/Lexer/half-literal.cpp index 2f1cf9589fab0..43d0b92872a70 100644 --- a/clang/test/Lexer/half-literal.cpp +++ b/clang/test/Lexer/half-literal.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsyntax-only -verify -pedantic -triple aarch64-linux-gnu %s +// RUN: %clang_cc1 -std=c++14 -fsyntax-only -verify -pedantic -triple aarch64-linux-gnu %s float a = 1.0h; // expected-error{{no matching literal operator for call to 'operator""h' with argument of type 'long double' or 'const char *', and no matching literal operator template}} float b = 1.0H; // expected-error{{invalid suffix 'H' on floating constant}} diff --git a/clang/test/Lexer/keywords_test.c b/clang/test/Lexer/keywords_test.c index 7f840c1154ca6..16778143f0bad 100644 --- a/clang/test/Lexer/keywords_test.c +++ b/clang/test/Lexer/keywords_test.c @@ -7,7 +7,7 @@ // RUN: %clang_cc1 -std=gnu89 -fno-gnu-keywords -E %s -o - \ // RUN: | FileCheck --check-prefix=CHECK-NONE %s -// RUN: %clang_cc1 -std=c99 -fms-extensions -E %s -o - \ +// RUN: %clang_cc1 -std=c99 -fms-extensions -fms-compatibility -E %s -o - \ // RUN: | FileCheck --check-prefix=CHECK-MS-KEYWORDS %s // RUN: %clang_cc1 -std=c99 -fdeclspec -E %s -o - \ // RUN: | FileCheck --check-prefix=CHECK-DECLSPEC-KEYWORD %s @@ -42,3 +42,13 @@ void no_declspec(); #else void has_declspec(); #endif + +// CHECK-NONE: no_static_assert +// CHECK-GNU-KEYWORDS: no_static_assert +// CHECK-MS-KEYWORDS: has_static_assert +// CHECK-MS-KEYWORDS-WITHOUT-DECLSPEC: no_static_assert +#if __is_identifier(static_assert) +void no_static_assert(); +#else +void has_static_assert(); +#endif diff --git a/clang/test/Lexer/keywords_test.cpp b/clang/test/Lexer/keywords_test.cpp index e7edf96d937e9..4c6ccca3f7e42 100644 --- a/clang/test/Lexer/keywords_test.cpp +++ b/clang/test/Lexer/keywords_test.cpp @@ -11,9 +11,9 @@ // RUN: %clang_cc1 -std=c++03 -fdeclspec -fno-declspec -fsyntax-only %s // RUN: %clang_cc1 -std=c++03 -fms-extensions -fno-declspec -fdeclspec -DDECLSPEC -fsyntax-only %s // RUN: %clang_cc1 -std=c++03 -fms-extensions -fdeclspec -fno-declspec -fsyntax-only %s -// RUN: %clang -std=c++03 -target i686-windows-msvc -DDECLSPEC -fsyntax-only %s +// RUN: %clang -std=c++03 -target i686-windows-msvc -DMS -DDECLSPEC -fsyntax-only %s // RUN: %clang -std=c++03 -target x86_64-scei-ps4 -DDECLSPEC -fsyntax-only %s -// RUN: %clang -std=c++03 -target i686-windows-msvc -fno-declspec -fsyntax-only %s +// RUN: %clang -std=c++03 -target i686-windows-msvc -DMS -fno-declspec -fsyntax-only %s // RUN: %clang -std=c++03 -target x86_64-scei-ps4 -fno-declspec -fsyntax-only %s #define IS_KEYWORD(NAME) _Static_assert(!__is_identifier(NAME), #NAME) @@ -51,7 +51,12 @@ CXX11_KEYWORD(char32_t); CXX11_TYPE(char32_t); CXX11_KEYWORD(constexpr); CXX11_KEYWORD(noexcept); +#ifndef MS CXX11_KEYWORD(static_assert); +#else +// MS compiler recognizes static_assert in all modes. So should we. +IS_KEYWORD(static_assert); +#endif CXX11_KEYWORD(thread_local); // Concepts TS keywords diff --git a/clang/test/Misc/cc1as-asm-debug.s b/clang/test/Misc/cc1as-asm-debug.s index cd36cad6206d1..a613fbfaeb488 100644 --- a/clang/test/Misc/cc1as-asm-debug.s +++ b/clang/test/Misc/cc1as-asm-debug.s @@ -8,4 +8,5 @@ // CHECK: {{\.}}section .debug_info // CHECK: {{\.}}section .debug_info // CHECK-NOT: {{\.}}section -// CHECK: .ascii "comment.s" +// Look for this as a relative path. +// CHECK: .ascii "{{[^\\/].*}}comment.s" diff --git a/clang/test/Misc/diag-format.c b/clang/test/Misc/diag-format.c index bc29894ad03e2..b24aeb9356ae3 100644 --- a/clang/test/Misc/diag-format.c +++ b/clang/test/Misc/diag-format.c @@ -1,30 +1,30 @@ -// RUN: %clang -fsyntax-only %s 2>&1 | FileCheck %s -check-prefix=DEFAULT -// RUN: %clang -fsyntax-only -fdiagnostics-format=clang %s 2>&1 | FileCheck %s -check-prefix=DEFAULT -// RUN: %clang -fsyntax-only -fdiagnostics-format=clang -target x86_64-pc-win32 %s 2>&1 | FileCheck %s -check-prefix=DEFAULT +// RUN: %clang -fsyntax-only %s 2>&1 | FileCheck %s --strict-whitespace -check-prefix=DEFAULT +// RUN: %clang -fsyntax-only -fdiagnostics-format=clang %s 2>&1 | FileCheck %s --strict-whitespace -check-prefix=DEFAULT +// RUN: %clang -fsyntax-only -fdiagnostics-format=clang -target x86_64-pc-win32 %s 2>&1 | FileCheck %s --strict-whitespace -check-prefix=DEFAULT // -// RUN: %clang -fsyntax-only -fdiagnostics-format=msvc -fmsc-version=1300 %s 2>&1 | FileCheck %s -check-prefix=MSVC2010 -// RUN: %clang -fsyntax-only -fdiagnostics-format=msvc -fms-compatibility-version=13.00 %s 2>&1 | FileCheck %s -check-prefix=MSVC2010 -// RUN: %clang -fsyntax-only -fdiagnostics-format=msvc -fmsc-version=1300 -target x86_64-pc-win32 %s 2>&1 | FileCheck %s -check-prefix=MSVC2010 -// RUN: %clang -fsyntax-only -fdiagnostics-format=msvc -fms-compatibility-version=13.00 -target x86_64-pc-win32 %s 2>&1 | FileCheck %s -check-prefix=MSVC2010 -// RUN: %clang -fsyntax-only -fdiagnostics-format=msvc -fmsc-version=1300 -target x86_64-pc-win32 -fshow-column %s 2>&1 | FileCheck %s -check-prefix=MSVC2010 -// RUN: %clang -fsyntax-only -fdiagnostics-format=msvc -fmsc-version=1800 -target x86_64-pc-win32 %s 2>&1 | FileCheck %s -check-prefix=MSVC2013 -// RUN: %clang -fsyntax-only -fdiagnostics-format=msvc -target x86_64-pc-win32 %s 2>&1 | FileCheck %s -check-prefix=MSVC -// RUN: %clang -fsyntax-only -fdiagnostics-format=msvc -fmsc-version=1900 -target x86_64-pc-win32 %s 2>&1 | FileCheck %s -check-prefix=MSVC2015 -// RUN: %clang -fsyntax-only -fdiagnostics-format=msvc -fms-compatibility-version=13.00 -target x86_64-pc-win32 -fshow-column %s 2>&1 | FileCheck %s -check-prefix=MSVC2010 -// RUN: %clang -fsyntax-only -fdiagnostics-format=msvc -fmsc-version=1800 -target x86_64-pc-win32 -fshow-column %s 2>&1 | FileCheck %s -check-prefix=MSVC2013 -// RUN: %clang -fsyntax-only -fdiagnostics-format=msvc -target x86_64-pc-win32 -fshow-column %s 2>&1 | FileCheck %s -check-prefix=MSVC -// RUN: %clang -fsyntax-only -fdiagnostics-format=msvc -fmsc-version=1900 -target x86_64-pc-win32 -fshow-column %s 2>&1 | FileCheck %s -check-prefix=MSVC2015 +// RUN: %clang -fsyntax-only -fdiagnostics-format=msvc -fmsc-version=1300 %s 2>&1 | FileCheck %s --strict-whitespace -check-prefix=MSVC2010 +// RUN: %clang -fsyntax-only -fdiagnostics-format=msvc -fms-compatibility-version=13.00 %s 2>&1 | FileCheck %s --strict-whitespace -check-prefix=MSVC2010 +// RUN: %clang -fsyntax-only -fdiagnostics-format=msvc -fmsc-version=1300 -target x86_64-pc-win32 %s 2>&1 | FileCheck %s --strict-whitespace -check-prefix=MSVC2010 +// RUN: %clang -fsyntax-only -fdiagnostics-format=msvc -fms-compatibility-version=13.00 -target x86_64-pc-win32 %s 2>&1 | FileCheck %s --strict-whitespace -check-prefix=MSVC2010 +// RUN: %clang -fsyntax-only -fdiagnostics-format=msvc -fmsc-version=1300 -target x86_64-pc-win32 -fshow-column %s 2>&1 | FileCheck %s --strict-whitespace -check-prefix=MSVC2010 +// RUN: %clang -fsyntax-only -fdiagnostics-format=msvc -fmsc-version=1800 -target x86_64-pc-win32 %s 2>&1 | FileCheck %s --strict-whitespace -check-prefix=MSVC2013 +// RUN: %clang -fsyntax-only -fdiagnostics-format=msvc -target x86_64-pc-win32 %s 2>&1 | FileCheck %s --strict-whitespace -check-prefix=MSVC +// RUN: %clang -fsyntax-only -fdiagnostics-format=msvc -fmsc-version=1900 -target x86_64-pc-win32 %s 2>&1 | FileCheck %s --strict-whitespace -check-prefix=MSVC2015 +// RUN: %clang -fsyntax-only -fdiagnostics-format=msvc -fms-compatibility-version=13.00 -target x86_64-pc-win32 -fshow-column %s 2>&1 | FileCheck %s --strict-whitespace -check-prefix=MSVC2010 +// RUN: %clang -fsyntax-only -fdiagnostics-format=msvc -fmsc-version=1800 -target x86_64-pc-win32 -fshow-column %s 2>&1 | FileCheck %s --strict-whitespace -check-prefix=MSVC2013 +// RUN: %clang -fsyntax-only -fdiagnostics-format=msvc -target x86_64-pc-win32 -fshow-column %s 2>&1 | FileCheck %s --strict-whitespace -check-prefix=MSVC +// RUN: %clang -fsyntax-only -fdiagnostics-format=msvc -fmsc-version=1900 -target x86_64-pc-win32 -fshow-column %s 2>&1 | FileCheck %s --strict-whitespace -check-prefix=MSVC2015 // -// RUN: %clang -fsyntax-only -fdiagnostics-format=vi %s 2>&1 | FileCheck %s -check-prefix=VI +// RUN: %clang -fsyntax-only -fdiagnostics-format=vi %s 2>&1 | FileCheck %s --strict-whitespace -check-prefix=VI // -// RUN: %clang -fsyntax-only -fdiagnostics-format=msvc -fno-show-column -fmsc-version=1900 %s 2>&1 | FileCheck %s -check-prefix=MSVC2015_ORIG +// RUN: %clang -fsyntax-only -fdiagnostics-format=msvc -fno-show-column -fmsc-version=1900 %s 2>&1 | FileCheck %s --strict-whitespace -check-prefix=MSVC2015_ORIG // -// RUN: %clang -fsyntax-only -fno-show-column %s 2>&1 | FileCheck %s -check-prefix=NO_COLUMN +// RUN: %clang -fsyntax-only -fno-show-column %s 2>&1 | FileCheck %s --strict-whitespace -check-prefix=NO_COLUMN // -// RUN: not %clang -fsyntax-only -Werror -fdiagnostics-format=msvc-fallback -fmsc-version=1300 %s 2>&1 | FileCheck %s -check-prefix=MSVC2010-FALLBACK -// RUN: not %clang -fsyntax-only -Werror -fdiagnostics-format=msvc-fallback -fms-compatibility-version=13.00 %s 2>&1 | FileCheck %s -check-prefix=MSVC2010-FALLBACK -// RUN: not %clang -fsyntax-only -Werror -fdiagnostics-format=msvc-fallback -fmsc-version=1800 %s 2>&1 | FileCheck %s -check-prefix=MSVC2013-FALLBACK -// RUN: not %clang -fsyntax-only -Werror -fdiagnostics-format=msvc-fallback -fmsc-version=1900 %s 2>&1 | FileCheck %s -check-prefix=MSVC2015-FALLBACK +// RUN: not %clang -fsyntax-only -Werror -fdiagnostics-format=msvc-fallback -fmsc-version=1300 %s 2>&1 | FileCheck %s --strict-whitespace -check-prefix=MSVC2010-FALLBACK +// RUN: not %clang -fsyntax-only -Werror -fdiagnostics-format=msvc-fallback -fms-compatibility-version=13.00 %s 2>&1 | FileCheck %s --strict-whitespace -check-prefix=MSVC2010-FALLBACK +// RUN: not %clang -fsyntax-only -Werror -fdiagnostics-format=msvc-fallback -fmsc-version=1800 %s 2>&1 | FileCheck %s --strict-whitespace -check-prefix=MSVC2013-FALLBACK +// RUN: not %clang -fsyntax-only -Werror -fdiagnostics-format=msvc-fallback -fmsc-version=1900 %s 2>&1 | FileCheck %s --strict-whitespace -check-prefix=MSVC2015-FALLBACK diff --git a/clang/test/Misc/pragma-attribute-supported-attributes-list.test b/clang/test/Misc/pragma-attribute-supported-attributes-list.test index 67eae687fc56f..fd05bb3f8d9d6 100644 --- a/clang/test/Misc/pragma-attribute-supported-attributes-list.test +++ b/clang/test/Misc/pragma-attribute-supported-attributes-list.test @@ -52,6 +52,7 @@ // CHECK-NEXT: ExternalSourceSymbol ((SubjectMatchRule_record, SubjectMatchRule_enum, SubjectMatchRule_enum_constant, SubjectMatchRule_field, SubjectMatchRule_function, SubjectMatchRule_namespace, SubjectMatchRule_objc_category, SubjectMatchRule_objc_interface, SubjectMatchRule_objc_method, SubjectMatchRule_objc_property, SubjectMatchRule_objc_protocol, SubjectMatchRule_record, SubjectMatchRule_type_alias, SubjectMatchRule_variable)) // CHECK-NEXT: FlagEnum (SubjectMatchRule_enum) // CHECK-NEXT: Flatten (SubjectMatchRule_function) +// CHECK-NEXT: FortifyStdLib (SubjectMatchRule_function) // CHECK-NEXT: GNUInline (SubjectMatchRule_function) // CHECK-NEXT: Hot (SubjectMatchRule_function) // CHECK-NEXT: IBAction (SubjectMatchRule_objc_method_is_instance) @@ -60,6 +61,7 @@ // CHECK-NEXT: InternalLinkage (SubjectMatchRule_variable, SubjectMatchRule_function, SubjectMatchRule_record) // CHECK-NEXT: LTOVisibilityPublic (SubjectMatchRule_record) // CHECK-NEXT: Lockable (SubjectMatchRule_record) +// CHECK-NEXT: MIGServerRoutine (SubjectMatchRule_function, SubjectMatchRule_objc_method, SubjectMatchRule_block) // CHECK-NEXT: MSStruct (SubjectMatchRule_record) // CHECK-NEXT: MicroMips (SubjectMatchRule_function) // CHECK-NEXT: MinSize (SubjectMatchRule_function, SubjectMatchRule_objc_method) @@ -96,10 +98,12 @@ // CHECK-NEXT: ObjCBridge (SubjectMatchRule_record, SubjectMatchRule_type_alias) // CHECK-NEXT: ObjCBridgeMutable (SubjectMatchRule_record) // CHECK-NEXT: ObjCBridgeRelated (SubjectMatchRule_record) +// CHECK-NEXT: ObjCDesignatedInitializer (SubjectMatchRule_objc_method) // CHECK-NEXT: ObjCException (SubjectMatchRule_objc_interface) // CHECK-NEXT: ObjCExplicitProtocolImpl (SubjectMatchRule_objc_protocol) // CHECK-NEXT: ObjCExternallyRetained (SubjectMatchRule_variable_not_is_parameter, SubjectMatchRule_function, SubjectMatchRule_block, SubjectMatchRule_objc_method) // CHECK-NEXT: ObjCMethodFamily (SubjectMatchRule_objc_method) +// CHECK-NEXT: ObjCNonLazyClass (SubjectMatchRule_objc_interface) // CHECK-NEXT: ObjCPreciseLifetime (SubjectMatchRule_variable) // CHECK-NEXT: ObjCRequiresPropertyDefs (SubjectMatchRule_objc_interface) // CHECK-NEXT: ObjCRequiresSuper (SubjectMatchRule_objc_method) diff --git a/clang/test/Misc/target-invalid-cpu-note.c b/clang/test/Misc/target-invalid-cpu-note.c index babfaa9ffcb44..5af321bc8b2d7 100644 --- a/clang/test/Misc/target-invalid-cpu-note.c +++ b/clang/test/Misc/target-invalid-cpu-note.c @@ -19,7 +19,7 @@ // X86-SAME: skx, cascadelake, cannonlake, icelake-client, icelake-server, knl, knm, lakemont, k6, k6-2, k6-3, // X86-SAME: athlon, athlon-tbird, athlon-xp, athlon-mp, athlon-4, k8, athlon64, // X86-SAME: athlon-fx, opteron, k8-sse3, athlon64-sse3, opteron-sse3, amdfam10, -// X86-SAME: barcelona, btver1, btver2, bdver1, bdver2, bdver3, bdver4, znver1, +// X86-SAME: barcelona, btver1, btver2, bdver1, bdver2, bdver3, bdver4, znver1, znver2, // X86-SAME: x86-64, geode // RUN: not %clang_cc1 -triple x86_64--- -target-cpu not-a-cpu -fsyntax-only %s 2>&1 | FileCheck %s --check-prefix X86_64 @@ -30,7 +30,7 @@ // X86_64-SAME: core-avx2, broadwell, skylake, skylake-avx512, skx, cascadelake, cannonlake, // X86_64-SAME: icelake-client, icelake-server, knl, knm, k8, athlon64, athlon-fx, opteron, k8-sse3, // X86_64-SAME: athlon64-sse3, opteron-sse3, amdfam10, barcelona, btver1, -// X86_64-SAME: btver2, bdver1, bdver2, bdver3, bdver4, znver1, x86-64 +// X86_64-SAME: btver2, bdver1, bdver2, bdver3, bdver4, znver1, znver2, x86-64 // RUN: not %clang_cc1 -triple nvptx--- -target-cpu not-a-cpu -fsyntax-only %s 2>&1 | FileCheck %s --check-prefix NVPTX // NVPTX: error: unknown target CPU 'not-a-cpu' @@ -101,7 +101,7 @@ // RUN: not %clang_cc1 -triple bpf--- -target-cpu not-a-cpu -fsyntax-only %s 2>&1 | FileCheck %s --check-prefix BPF // BPF: error: unknown target CPU 'not-a-cpu' -// BPF: note: valid target CPU values are: generic, v1, v2, probe +// BPF: note: valid target CPU values are: generic, v1, v2, v3, probe // RUN: not %clang_cc1 -triple avr--- -target-cpu not-a-cpu -fsyntax-only %s 2>&1 | FileCheck %s --check-prefix AVR // AVR: error: unknown target CPU 'not-a-cpu' diff --git a/clang/test/Misc/warn-in-system-macro-def.c b/clang/test/Misc/warn-in-system-macro-def.c index b295130702f5d..bdf7d39325e94 100644 --- a/clang/test/Misc/warn-in-system-macro-def.c +++ b/clang/test/Misc/warn-in-system-macro-def.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -isystem %S -Wdouble-promotion -fsyntax-only %s 2>&1 | FileCheck -allow-empty %s +// RUN: %clang_cc1 -triple x86_64-apple-darwin -isystem %S -Wdouble-promotion -fsyntax-only %s 2>&1 | FileCheck -allow-empty %s // CHECK: warning: // CHECK: expanded from macro 'ISNAN' // CHECK: expanded from macro 'isnan' diff --git a/clang/test/Modules/DebugInfo-fmodule-name.c b/clang/test/Modules/DebugInfo-fmodule-name.c new file mode 100644 index 0000000000000..7f2730ddc97bb --- /dev/null +++ b/clang/test/Modules/DebugInfo-fmodule-name.c @@ -0,0 +1,16 @@ +// RUN: rm -rf %t +// RUN: %clang_cc1 -fmodules -fmodule-format=obj -fmodule-name=MainA \ +// RUN: -debug-info-kind=limited -dwarf-ext-refs \ +// RUN: -fimplicit-module-maps -x c -fmodules-cache-path=%t -F %S/Inputs \ +// RUN: %s -S -emit-llvm -debugger-tuning=lldb -o - | FileCheck %s + +#include "MainA/MainPriv.h" + +// CHECK: !DICompileUnit +// CHECK-NOT: dwoId: + +// We still want the import, but no skeleton CU, since no PCM was built. + +// CHECK: !DIModule({{.*}}, name: "APriv" +// CHECK-NOT: !DICompileUnit +// CHECK-NOT: dwoId: diff --git a/clang/test/Modules/Inputs/Rmodule-import/A.h b/clang/test/Modules/Inputs/Rmodule-import/A.h new file mode 100644 index 0000000000000..2b9dab858770f --- /dev/null +++ b/clang/test/Modules/Inputs/Rmodule-import/A.h @@ -0,0 +1,2 @@ +// A +#include "B.h" diff --git a/clang/test/Modules/Inputs/Rmodule-import/B.h b/clang/test/Modules/Inputs/Rmodule-import/B.h new file mode 100644 index 0000000000000..a2711d4043fad --- /dev/null +++ b/clang/test/Modules/Inputs/Rmodule-import/B.h @@ -0,0 +1,2 @@ +// B +#include "C.h" diff --git a/clang/test/Modules/Inputs/Rmodule-import/C.h b/clang/test/Modules/Inputs/Rmodule-import/C.h new file mode 100644 index 0000000000000..6f30d4750ea12 --- /dev/null +++ b/clang/test/Modules/Inputs/Rmodule-import/C.h @@ -0,0 +1 @@ +// C diff --git a/clang/test/Modules/Inputs/Rmodule-import/D.h b/clang/test/Modules/Inputs/Rmodule-import/D.h new file mode 100644 index 0000000000000..61177ec3a3d00 --- /dev/null +++ b/clang/test/Modules/Inputs/Rmodule-import/D.h @@ -0,0 +1 @@ +// D diff --git a/clang/test/Modules/Inputs/Rmodule-import/module.modulemap b/clang/test/Modules/Inputs/Rmodule-import/module.modulemap new file mode 100644 index 0000000000000..cf7cf1f7e56ae --- /dev/null +++ b/clang/test/Modules/Inputs/Rmodule-import/module.modulemap @@ -0,0 +1,4 @@ +module A { header "A.h" } +module B { header "B.h" } +module C { header "C.h" } +module D { header "D.h" } diff --git a/clang/test/Modules/Rmodule-build.m b/clang/test/Modules/Rmodule-build.m index 5c27ec6dfd97e..e9e2ca964e8fd 100644 --- a/clang/test/Modules/Rmodule-build.m +++ b/clang/test/Modules/Rmodule-build.m @@ -19,10 +19,6 @@ // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -fsyntax-only %s -I %t \ // RUN: -Rmodule-build 2>&1 | FileCheck %s -// RUN: echo ' ' >> %t/C.h -// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -fsyntax-only %s -I %t \ -// RUN: -Reverything 2>&1 | FileCheck %s - // RUN: echo ' ' >> %t/B.h // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -fsyntax-only %s -I %t \ // RUN: 2>&1 | FileCheck -allow-empty -check-prefix=NO-REMARKS %s diff --git a/clang/test/Modules/Rmodule-import.m b/clang/test/Modules/Rmodule-import.m new file mode 100644 index 0000000000000..54e2d021f0607 --- /dev/null +++ b/clang/test/Modules/Rmodule-import.m @@ -0,0 +1,46 @@ +// RUN: rm -rf %t1 %t2 + +// Run with -verify, which onliy gets remarks from the main TU. +// +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t1 \ +// RUN: -fdisable-module-hash -fsyntax-only -I%S/Inputs/Rmodule-import \ +// RUN: -Rmodule-build -Rmodule-import -verify %s + +// Run again, using FileCheck to check remarks from the module builds. +// +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t2 \ +// RUN: -fdisable-module-hash -fsyntax-only -I%S/Inputs/Rmodule-import \ +// RUN: -Rmodule-build -Rmodule-import %s 2>&1 |\ +// RUN: FileCheck %s -implicit-check-not "remark:" + +#include "A.h" // \ + expected-remark-re{{building module 'A' as '{{.*}}/A.pcm'}} \ + expected-remark{{finished building module 'A'}} \ + expected-remark-re{{importing module 'A' from '{{.*}}/A.pcm'}} \ + expected-remark-re{{importing module 'B' into 'A' from '{{.*}}/B.pcm'}} \ + expected-remark-re{{importing module 'C' into 'B' from '{{.*}}/C.pcm'}} +// CHECK: remark: building module 'A' +// CHECK: remark: building module 'B' +// CHECK: remark: building module 'C' +// CHECK: remark: finished building module 'C' +// CHECK: remark: importing module 'C' from '{{.*}}/C.pcm' +// CHECK: remark: finished building module 'B' +// CHECK: remark: importing module 'B' from '{{.*}}/B.pcm' +// CHECK: remark: importing module 'C' into 'B' from '{{.*}}/C.pcm' +// CHECK: remark: finished building module 'A' +// CHECK: remark: importing module 'A' from '{{.*}}/A.pcm' +// CHECK: remark: importing module 'B' into 'A' from '{{.*}}/B.pcm' +// CHECK: remark: importing module 'C' into 'B' from '{{.*}}/C.pcm' +#include "B.h" // \ + expected-remark-re{{importing module 'B' from '{{.*}}/B.pcm'}} +// CHECK: remark: importing module 'B' from '{{.*}}/B.pcm' +#include "C.h" // \ + expected-remark-re{{importing module 'C' from '{{.*}}/C.pcm'}} +// CHECK: remark: importing module 'C' from '{{.*}}/C.pcm' +@import D; // \ + expected-remark-re{{building module 'D' as '{{.*}}/D.pcm'}} \ + expected-remark{{finished building module 'D'}} \ + expected-remark-re{{importing module 'D' from '{{.*}}/D.pcm'}} +// CHECK: remark: building module 'D' +// CHECK: remark: finished building module 'D' +// CHECK: remark: importing module 'D' from '{{.*}}/D.pcm' diff --git a/clang/test/Modules/friend-definition-2.cpp b/clang/test/Modules/friend-definition-2.cpp index b226b5c0d1e5d..41c2141f40139 100644 --- a/clang/test/Modules/friend-definition-2.cpp +++ b/clang/test/Modules/friend-definition-2.cpp @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -fmodules %s -verify -// RUN: %clang_cc1 -fmodules %s -verify -triple i686-windows +// RUN: %clang_cc1 -std=c++14 -fmodules %s -verify +// RUN: %clang_cc1 -std=c++14 -fmodules %s -verify -triple i686-windows // expected-no-diagnostics #pragma clang module build A module A {} diff --git a/clang/test/Modules/initializers.cpp b/clang/test/Modules/initializers.cpp new file mode 100644 index 0000000000000..bba016c23713d --- /dev/null +++ b/clang/test/Modules/initializers.cpp @@ -0,0 +1,242 @@ +// RUN: %clang_cc1 -triple x86_64-linux-gnu -std=c++17 -emit-llvm -DIMPORT=1 -fmodules %s -o - | FileCheck %s --check-prefixes=CHECK,CHECK-IMPORT,CHECK-NO-NS,CHECK-IMPORT-NO-NS --implicit-check-not=unused +// RUN: %clang_cc1 -triple x86_64-linux-gnu -std=c++17 -emit-llvm -DIMPORT=1 -DNS -fmodules %s -o - | FileCheck %s --check-prefixes=CHECK,CHECK-IMPORT,CHECK-NS,CHECK-IMPORT-NS --implicit-check-not=unused +// RUN: %clang_cc1 -triple x86_64-linux-gnu -std=c++17 -emit-llvm -DIMPORT=2 -fmodules %s -o - | FileCheck %s --check-prefixes=CHECK,CHECK-NO-NS --implicit-check-not=unused +// RUN: %clang_cc1 -triple x86_64-linux-gnu -std=c++17 -emit-llvm -DIMPORT=2 -DNS -fmodules %s -o - | FileCheck %s --check-prefixes=CHECK,CHECK-NS --implicit-check-not=unused +// RUN: %clang_cc1 -triple x86_64-linux-gnu -std=c++17 -emit-llvm -fmodules %s -o - | FileCheck %s --check-prefixes=CHECK,CHECK-NO-NS --implicit-check-not=unused +// RUN: %clang_cc1 -triple x86_64-linux-gnu -std=c++17 -emit-llvm -DNS -fmodules %s -o - | FileCheck %s --check-prefixes=CHECK,CHECK-NS --implicit-check-not=unused + +// Check that we behave sensibly when importing a header containing strong and +// weak, ordered and unordered global initializers. +// +// Our behavior is as follows: +// +// -- for variables with one or more specific points of initialization +// (non-template variables, whether or not they are inline or thread_local), +// emit them if (and only if) a header containing a point of initialization +// is transitively #included / imported. +// +// -- for variables with unordered initialization (any kind of templated +// variable -- excluding explicit specializations), emit them if any part +// of any module that triggers an instantiation is imported. +// +// The intent is to: +// +// 1) preserve order of initialization guarantees +// 2) preserve the behavior of globals with ctors in headers, and specifically +// of std::ios_base::Init (do not run the iostreams initializer nor force +// linking in the iostreams portion of the static library unless +// is included) +// 3) behave conservatively-correctly with regard to unordered initializers: we +// might run them in cases where a traditional compilation would not, but +// will never fail to run them in cases where a traditional compilation +// would do so +// +// Perfect handling of unordered initializers would require tracking all +// submodules containing points of instantiation, which is very hard when those +// points of instantiation are within definitions that we skip because we +// already have a (non-visible) definition for the entity: +// +// // a.h +// template int v = f(); +// inline int get() { return v; } +// +// // b.h +// template int v = f(); +// inline int get() { return v; } +// +// If a.h and b.h are built as a module, we will only have a point of +// instantiation for v in one of the two headers, because we will only +// parse one of the two get() functions. + +#pragma clang module build m +module m { + module a { + header "foo.h" { size 123 mtime 456789 } + } + module b {} +} + +#pragma clang module contents +#pragma clang module begin m.a +inline int non_trivial() { return 3; } + +#ifdef NS +namespace ns { +#endif + +int a = non_trivial(); +inline int b = non_trivial(); +thread_local int c = non_trivial(); +inline thread_local int d = non_trivial(); + +template int e = non_trivial(); +template inline int f = non_trivial(); +template thread_local int g = non_trivial(); +template inline thread_local int h = non_trivial(); + +inline int unused = 123; // should not be emitted + +template struct X { + static int a; + static inline int b = non_trivial(); + static thread_local int c; + static inline thread_local int d = non_trivial(); + + template static int e; + template static inline int f = non_trivial(); + template static thread_local int g; + template static inline thread_local int h = non_trivial(); + + static inline int unused = 123; // should not be emitted +}; + +template int X::a = non_trivial(); +template thread_local int X::c = non_trivial(); +template template int X::e = non_trivial(); +template template thread_local int X::g = non_trivial(); + +inline void use(bool b, ...) { + if (b) return; + use(true, e, f, g, h, + X::a, X::b, X::c, X::d, + X::e, X::f, X::g, X::h); +} + +#ifdef NS +} +#endif + +#pragma clang module end +#pragma clang module endbuild + +#if IMPORT == 1 +// Import the module and the m.a submodule; runs the ordered initializers and +// the unordered initializers. +#pragma clang module import m.a +#elif IMPORT == 2 +// Import the module but not the m.a submodule; runs only the unordered +// initializers. +#pragma clang module import m.b +#else +// Load the module but do not import any submodules; runs only the unordered +// initializers. FIXME: Should this skip all of them? +#pragma clang module load m +#endif + +// CHECK-IMPORT-NO-NS-DAG: @[[A:a]] = global i32 0, align 4 +// CHECK-IMPORT-NO-NS-DAG: @[[B:b]] = linkonce_odr global i32 0, comdat, align 4 +// CHECK-IMPORT-NO-NS-DAG: @[[C:c]] = thread_local global i32 0, align 4 +// CHECK-IMPORT-NO-NS-DAG: @[[D:d]] = linkonce_odr thread_local global i32 0, comdat, align 4 +// CHECK-NO-NS-DAG: @[[E:_Z1eIiE]] = linkonce_odr global i32 0, comdat, align 4 +// CHECK-NO-NS-DAG: @[[F:_Z1fIiE]] = linkonce_odr global i32 0, comdat, align 4 +// CHECK-NO-NS-DAG: @[[G:_Z1gIiE]] = linkonce_odr thread_local global i32 0, comdat, align 4 +// CHECK-NO-NS-DAG: @[[H:_Z1hIiE]] = linkonce_odr thread_local global i32 0, comdat, align 4 + +// CHECK-IMPORT-NS-DAG: @[[A:_ZN2ns1aE]] = global i32 0, align 4 +// CHECK-IMPORT-NS-DAG: @[[B:_ZN2ns1bE]] = linkonce_odr global i32 0, comdat, align 4 +// CHECK-IMPORT-NS-DAG: @[[BG:_ZGVN2ns1bE]] = linkonce_odr global i64 0, comdat($[[B]]), align 8 +// CHECK-IMPORT-NS-DAG: @[[C:_ZN2ns1cE]] = thread_local global i32 0, align 4 +// CHECK-IMPORT-NS-DAG: @[[D:_ZN2ns1dE]] = linkonce_odr thread_local global i32 0, comdat, align 4 +// CHECK-IMPORT-NS-DAG: @[[DG:_ZGVN2ns1dE]] = linkonce_odr thread_local global i64 0, comdat($[[D]]), align 8 +// CHECK-NS-DAG: @[[E:_ZN2ns1eIiEE]] = linkonce_odr global i32 0, comdat, align 4 +// CHECK-NS-DAG: @[[F:_ZN2ns1fIiEE]] = linkonce_odr global i32 0, comdat, align 4 +// CHECK-NS-DAG: @[[G:_ZN2ns1gIiEE]] = linkonce_odr thread_local global i32 0, comdat, align 4 +// CHECK-NS-DAG: @[[H:_ZN2ns1hIiEE]] = linkonce_odr thread_local global i32 0, comdat, align 4 + +// CHECK-DAG: @[[XA:_ZN(2ns)?1XIiE1aE]] = linkonce_odr global i32 0, comdat, align 4 +// CHECK-DAG: @[[XB:_ZN(2ns)?1XIiE1bE]] = linkonce_odr global i32 0, comdat, align 4 +// CHECK-DAG: @[[XC:_ZN(2ns)?1XIiE1cE]] = linkonce_odr thread_local global i32 0, comdat, align 4 +// CHECK-DAG: @[[XD:_ZN(2ns)?1XIiE1dE]] = linkonce_odr thread_local global i32 0, comdat, align 4 +// CHECK-DAG: @[[XE:_ZN(2ns)?1XIiE1eIiEE]] = linkonce_odr global i32 0, comdat, align 4 +// CHECK-DAG: @[[XF:_ZN(2ns)?1XIiE1fIiEE]] = linkonce_odr global i32 0, comdat, align 4 +// CHECK-DAG: @[[XG:_ZN(2ns)?1XIiE1gIiEE]] = linkonce_odr thread_local global i32 0, comdat, align 4 +// CHECK-DAG: @[[XH:_ZN(2ns)?1XIiE1hIiEE]] = linkonce_odr thread_local global i32 0, comdat, align 4 + +// It's OK if the order of the first 6 of these changes. +// CHECK: @llvm.global_ctors = appending global +// CHECK-SAME: @[[E_INIT:[^,]*]], {{[^@]*}} @[[E]] +// CHECK-SAME: @[[F_INIT:[^,]*]], {{[^@]*}} @[[F]] +// CHECK-SAME: @[[XA_INIT:[^,]*]], {{[^@]*}} @[[XA]] +// CHECK-SAME: @[[XE_INIT:[^,]*]], {{[^@]*}} @[[XE]] +// CHECK-SAME: @[[XF_INIT:[^,]*]], {{[^@]*}} @[[XF]] +// CHECK-SAME: @[[XB_INIT:[^,]*]], {{[^@]*}} @[[XB]] +// CHECK-IMPORT-SAME: @[[TU_INIT:[^,]*]], i8* null }] + +// FIXME: Should this use __cxa_guard_acquire? +// CHECK: define {{.*}} @[[E_INIT]]() +// CHECK: load {{.*}} (i64* @_ZGV +// CHECK: store {{.*}}, i32* @[[E]], + +// FIXME: Should this use __cxa_guard_acquire? +// CHECK: define {{.*}} @[[F_INIT]]() +// CHECK: load {{.*}} (i64* @_ZGV +// CHECK: store {{.*}}, i32* @[[F]], + +// CHECK: define {{.*}} @[[G_INIT:__cxx_global.*]]() +// CHECK: load {{.*}} (i64* @_ZGV +// CHECK: store {{.*}}, i32* @[[G]], + +// CHECK: define {{.*}} @[[H_INIT:__cxx_global.*]]() +// CHECK: load {{.*}} (i64* @_ZGV +// CHECK: store {{.*}}, i32* @[[H]], + +// FIXME: Should this use __cxa_guard_acquire? +// CHECK: define {{.*}} @[[XA_INIT]]() +// CHECK: load {{.*}} (i64* @_ZGV +// CHECK: store {{.*}}, i32* @[[XA]], + +// CHECK: define {{.*}} @[[XC_INIT:__cxx_global.*]]() +// CHECK: load {{.*}} (i64* @_ZGV +// CHECK: store {{.*}}, i32* @[[XC]], + +// FIXME: Should this use __cxa_guard_acquire? +// CHECK: define {{.*}} @[[XE_INIT]]() +// CHECK: load {{.*}} (i64* @_ZGV +// CHECK: store {{.*}}, i32* @[[XE]], + +// CHECK: define {{.*}} @[[XG_INIT:__cxx_global.*]]() +// CHECK: load {{.*}} (i64* @_ZGV +// CHECK: store {{.*}}, i32* @[[XG]], + +// CHECK: define {{.*}} @[[XH_INIT:__cxx_global.*]]() +// CHECK: load {{.*}} (i64* @_ZGV +// CHECK: store {{.*}}, i32* @[[XH]], + +// FIXME: Should this use __cxa_guard_acquire? +// CHECK: define {{.*}} @[[XF_INIT]]() +// CHECK: load {{.*}} (i64* @_ZGV +// CHECK: store {{.*}}, i32* @[[XF]], + +// CHECK: define {{.*}} @[[XD_INIT:__cxx_global.*]]() +// CHECK: load {{.*}} (i64* @_ZGV +// CHECK: store {{.*}}, i32* @[[XD]], + +// FIXME: Should this use __cxa_guard_acquire? +// CHECK: define {{.*}} @[[XB_INIT]]() +// CHECK: load {{.*}} (i64* @_ZGV +// CHECK: store {{.*}}, i32* @[[XB]], + +// CHECK-IMPORT: define {{.*}} @[[A_INIT:__cxx_global.*]]() +// CHECK-IMPORT: call i32 @_Z11non_trivialv( +// CHECK-IMPORT: store {{.*}}, i32* @[[A]], + +// CHECK-IMPORT: define {{.*}} @[[B_INIT:__cxx_global.*]]() +// CHECK-IMPORT: call i32 @__cxa_guard_acquire(i64* @_ZGV +// CHECK-IMPORT: store {{.*}}, i32* @[[B]], + +// CHECK-IMPORT: define {{.*}} @[[C_INIT:__cxx_global.*]]() +// CHECK-IMPORT: call i32 @_Z11non_trivialv( +// CHECK-IMPORT: store {{.*}}, i32* @[[C]], + +// CHECK-IMPORT: define {{.*}} @[[D_INIT:__cxx_global.*]]() +// CHECK-IMPORT: load {{.*}} (i64* @_ZGV +// CHECK-IMPORT: store {{.*}}, i32* @[[D]], + + +// CHECK-IMPORT: define {{.*}} @[[TU_INIT]]() +// CHECK-IMPORT: call void @[[A_INIT]]() +// CHECK-IMPORT: call void @[[B_INIT]]() + +// CHECK-IMPORT: define {{.*}} @__tls_init() +// CHECK-IMPORT: call void @[[C_INIT]]() +// CHECK-IMPORT: call void @[[D_INIT]]() diff --git a/clang/test/Modules/merge-lambdas.cpp b/clang/test/Modules/merge-lambdas.cpp index 463a4c9b2fc63..da10ec1199853 100644 --- a/clang/test/Modules/merge-lambdas.cpp +++ b/clang/test/Modules/merge-lambdas.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fmodules -verify %s -emit-llvm-only +// RUN: %clang_cc1 -std=c++14 -fmodules -verify %s -emit-llvm-only // expected-no-diagnostics #pragma clang module build A diff --git a/clang/test/Modules/templates.mm b/clang/test/Modules/templates.mm index 6639775986d04..78206a980a8fb 100644 --- a/clang/test/Modules/templates.mm +++ b/clang/test/Modules/templates.mm @@ -108,11 +108,11 @@ void testStaticDataMember() { WithUndefinedStaticDataMember load_it; // CHECK-LABEL: define linkonce_odr i32* @_Z23getStaticDataMemberLeftv( - // CHECK: ret i32* getelementptr inbounds ([0 x i32], [0 x i32]* @_ZN29WithUndefinedStaticDataMemberIA_iE9undefinedE, i32 0, i32 0) + // CHECK: ret i32* getelementptr inbounds ([0 x i32], [0 x i32]* @_ZN29WithUndefinedStaticDataMemberIA_iE9undefinedE, i64 0, i64 0) (void) getStaticDataMemberLeft(); // CHECK-LABEL: define linkonce_odr i32* @_Z24getStaticDataMemberRightv( - // CHECK: ret i32* getelementptr inbounds ([0 x i32], [0 x i32]* @_ZN29WithUndefinedStaticDataMemberIA_iE9undefinedE, i32 0, i32 0) + // CHECK: ret i32* getelementptr inbounds ([0 x i32], [0 x i32]* @_ZN29WithUndefinedStaticDataMemberIA_iE9undefinedE, i64 0, i64 0) (void) getStaticDataMemberRight(); } diff --git a/clang/test/OpenMP/barrier_messages.cpp b/clang/test/OpenMP/barrier_messages.cpp index 137453a89326e..42edc9f46a018 100644 --- a/clang/test/OpenMP/barrier_messages.cpp +++ b/clang/test/OpenMP/barrier_messages.cpp @@ -29,7 +29,7 @@ T tmain(T argc) { #pragma omp barrier // expected-error {{'#pragma omp barrier' cannot be an immediate substatement}} switch (argc) case 1: -#pragma omp barrier +#pragma omp barrier // expected-error {{'#pragma omp barrier' cannot be an immediate substatement}} switch (argc) case 1: { #pragma omp barrier @@ -49,7 +49,7 @@ T tmain(T argc) { #pragma omp barrier } label: -#pragma omp barrier // expected-error {{'#pragma omp barrier' cannot be an immediate substatement}} +#pragma omp barrier label1 : { #pragma omp barrier } @@ -83,7 +83,7 @@ int main(int argc, char **argv) { #pragma omp barrier // expected-error {{'#pragma omp barrier' cannot be an immediate substatement}} switch (argc) case 1: -#pragma omp barrier +#pragma omp barrier // expected-error {{'#pragma omp barrier' cannot be an immediate substatement}} switch (argc) case 1: { #pragma omp barrier @@ -103,7 +103,7 @@ int main(int argc, char **argv) { #pragma omp barrier } label: -#pragma omp barrier // expected-error {{'#pragma omp barrier' cannot be an immediate substatement}} +#pragma omp barrier label1 : { #pragma omp barrier } diff --git a/clang/test/OpenMP/cancel_messages.cpp b/clang/test/OpenMP/cancel_messages.cpp index b14c42f3959f2..f78b28c1cbc3a 100644 --- a/clang/test/OpenMP/cancel_messages.cpp +++ b/clang/test/OpenMP/cancel_messages.cpp @@ -63,7 +63,7 @@ int main(int argc, char **argv) { #pragma omp cancel parallel // expected-error {{'#pragma omp cancel' cannot be an immediate substatement}} expected-error {{orphaned 'omp cancel' directives are prohibited; perhaps you forget to enclose the directive into a region?}} switch (argc) case 1: -#pragma omp cancel sections // expected-error {{orphaned 'omp cancel' directives are prohibited; perhaps you forget to enclose the directive into a region?}} +#pragma omp cancel sections // expected-error {{'#pragma omp cancel' cannot be an immediate substatement}} expected-error {{orphaned 'omp cancel' directives are prohibited; perhaps you forget to enclose the directive into a region?}} switch (argc) case 1: { #pragma omp cancel for // expected-error {{orphaned 'omp cancel' directives are prohibited; perhaps you forget to enclose the directive into a region?}} @@ -83,7 +83,7 @@ int main(int argc, char **argv) { #pragma omp cancel taskgroup // expected-error {{orphaned 'omp cancel' directives are prohibited; perhaps you forget to enclose the directive into a region?}} } label: -#pragma omp cancel parallel // expected-error {{'#pragma omp cancel' cannot be an immediate substatement}} expected-error {{orphaned 'omp cancel' directives are prohibited; perhaps you forget to enclose the directive into a region?}} +#pragma omp cancel parallel // expected-error {{orphaned 'omp cancel' directives are prohibited; perhaps you forget to enclose the directive into a region?}} label1 : { #pragma omp cancel sections // expected-error {{orphaned 'omp cancel' directives are prohibited; perhaps you forget to enclose the directive into a region?}} } diff --git a/clang/test/OpenMP/cancellation_point_messages.cpp b/clang/test/OpenMP/cancellation_point_messages.cpp index 2bf667c407885..058818df7184f 100644 --- a/clang/test/OpenMP/cancellation_point_messages.cpp +++ b/clang/test/OpenMP/cancellation_point_messages.cpp @@ -63,7 +63,7 @@ int main(int argc, char **argv) { #pragma omp cancellation point parallel // expected-error {{'#pragma omp cancellation point' cannot be an immediate substatement}} expected-error {{orphaned 'omp cancellation point' directives are prohibited; perhaps you forget to enclose the directive into a region?}} switch (argc) case 1: -#pragma omp cancellation point sections // expected-error {{orphaned 'omp cancellation point' directives are prohibited; perhaps you forget to enclose the directive into a region?}} +#pragma omp cancellation point sections // expected-error {{'#pragma omp cancellation point' cannot be an immediate substatement}} expected-error {{orphaned 'omp cancellation point' directives are prohibited; perhaps you forget to enclose the directive into a region?}} switch (argc) case 1: { #pragma omp cancellation point for // expected-error {{orphaned 'omp cancellation point' directives are prohibited; perhaps you forget to enclose the directive into a region?}} @@ -83,7 +83,7 @@ int main(int argc, char **argv) { #pragma omp cancellation point taskgroup // expected-error {{orphaned 'omp cancellation point' directives are prohibited; perhaps you forget to enclose the directive into a region?}} } label: -#pragma omp cancellation point parallel // expected-error {{'#pragma omp cancellation point' cannot be an immediate substatement}} expected-error {{orphaned 'omp cancellation point' directives are prohibited; perhaps you forget to enclose the directive into a region?}} +#pragma omp cancellation point parallel // expected-error {{orphaned 'omp cancellation point' directives are prohibited; perhaps you forget to enclose the directive into a region?}} label1 : { #pragma omp cancellation point sections // expected-error {{orphaned 'omp cancellation point' directives are prohibited; perhaps you forget to enclose the directive into a region?}} } diff --git a/clang/test/OpenMP/declare_mapper_ast_print.c b/clang/test/OpenMP/declare_mapper_ast_print.c index a2c78a1c16158..e82bc4c2d3109 100644 --- a/clang/test/OpenMP/declare_mapper_ast_print.c +++ b/clang/test/OpenMP/declare_mapper_ast_print.c @@ -40,6 +40,16 @@ int main() { { #pragma omp declare mapper(id: struct vec v) map(v.len) // CHECK: #pragma omp declare mapper (id : struct vec v) map(tofrom: v.len) + struct vec vv; + struct dat dd[10]; +#pragma omp target map(mapper(id) alloc: vv) +// CHECK: #pragma omp target map(mapper(id),alloc: vv) + { vv.len++; } +#pragma omp target map(mapper(default), from: dd[0:10]) +// CHECK: #pragma omp target map(mapper(default),from: dd[0:10]) + { dd[0].i++; } +#pragma omp target update to(mapper(id): vv) from(mapper(default): dd[0:10]) +// CHECK: #pragma omp target update to(mapper(id): vv) from(mapper(default): dd[0:10]) } return 0; } diff --git a/clang/test/OpenMP/declare_mapper_ast_print.cpp b/clang/test/OpenMP/declare_mapper_ast_print.cpp index dab745569780c..6462fa38d872d 100644 --- a/clang/test/OpenMP/declare_mapper_ast_print.cpp +++ b/clang/test/OpenMP/declare_mapper_ast_print.cpp @@ -21,6 +21,13 @@ class vec { }; // CHECK: }; +// CHECK: class vecchild : public N1::vec { +class vecchild : public vec { +public: + int lenc; +}; +// CHECK: }; + #pragma omp declare mapper(id: vec v) map(v.len) // CHECK: #pragma omp declare mapper (id : N1::vec v) map(tofrom: v.len){{$}} }; @@ -56,34 +63,85 @@ class dat { template T foo(T a) { + struct foodatchild { + T k; + }; struct foodat { T a; + struct foodatchild b; }; -#pragma omp declare mapper(struct foodat v) map(v.a) +#pragma omp declare mapper(id: struct foodat v) map(v.a) +#pragma omp declare mapper(idd: struct foodatchild v) map(v.k) #pragma omp declare mapper(id: N1::vec v) map(v.len) { #pragma omp declare mapper(id: N1::vec v) map(v.len) } + struct foodat fd; +#pragma omp target map(mapper(id) alloc: fd) + { fd.a++; } +#pragma omp target map(mapper(idd) alloc: fd.b) + { fd.b.k++; } +#pragma omp target update to(mapper(id): fd) +#pragma omp target update to(mapper(idd): fd.b) +#pragma omp target update from(mapper(id): fd) +#pragma omp target update from(mapper(idd): fd.b) return 0; } // CHECK: template T foo(T a) { -// CHECK: #pragma omp declare mapper (default : struct foodat v) map(tofrom: v.a) +// CHECK: #pragma omp declare mapper (id : struct foodat v) map(tofrom: v.a) +// CHECK: #pragma omp declare mapper (idd : struct foodatchild v) map(tofrom: v.k) // CHECK: #pragma omp declare mapper (id : N1::vec v) map(tofrom: v.len) // CHECK: { // CHECK: #pragma omp declare mapper (id : N1::vec v) map(tofrom: v.len) // CHECK: } +// CHECK: #pragma omp target map(mapper(id),alloc: fd) +// CHECK: #pragma omp target map(mapper(idd),alloc: fd.b) +// CHECK: #pragma omp target update to(mapper(id): fd) +// CHECK: #pragma omp target update to(mapper(idd): fd.b) +// CHECK: #pragma omp target update from(mapper(id): fd) +// CHECK: #pragma omp target update from(mapper(idd): fd.b) // CHECK: } // CHECK: template<> int foo(int a) { -// CHECK: #pragma omp declare mapper (default : struct foodat v) map(tofrom: v.a) +// CHECK: #pragma omp declare mapper (id : struct foodat v) map(tofrom: v.a) +// CHECK: #pragma omp declare mapper (idd : struct foodatchild v) map(tofrom: v.k) // CHECK: #pragma omp declare mapper (id : N1::vec v) map(tofrom: v.len) // CHECK: { // CHECK: #pragma omp declare mapper (id : N1::vec v) map(tofrom: v.len) // CHECK: } +// CHECK: #pragma omp target map(mapper(id),alloc: fd) +// CHECK: #pragma omp target map(mapper(idd),alloc: fd.b) +// CHECK: #pragma omp target update to(mapper(id): fd) +// CHECK: #pragma omp target update to(mapper(idd): fd.b) +// CHECK: #pragma omp target update from(mapper(id): fd) +// CHECK: #pragma omp target update from(mapper(idd): fd.b) // CHECK: } // CHECK: int main() { int main() { + N1::vec vv, vvv; + N1::vecchild vc; + dat dd; +#pragma omp target map(mapper(N1::id) tofrom: vv) map(mapper(dat::id) alloc: vvv) +// CHECK: #pragma omp target map(mapper(N1::id),tofrom: vv) map(mapper(dat::id),alloc: vvv) + { vv.len++; } +#pragma omp target map(mapper(N1::id) tofrom: vc) +// CHECK: #pragma omp target map(mapper(N1::id),tofrom: vc) + { vc.len++; } +#pragma omp target map(mapper(default) tofrom: dd) +// CHECK: #pragma omp target map(mapper(default),tofrom: dd) + { dd.d++; } + +#pragma omp target update to(mapper(N1::id) : vc) +// CHECK: #pragma omp target update to(mapper(N1::id): vc) +#pragma omp target update to(mapper(dat::id): vvv) +// CHECK: #pragma omp target update to(mapper(dat::id): vvv) + +#pragma omp target update from(mapper(N1::id) : vc) +// CHECK: #pragma omp target update from(mapper(N1::id): vc) +#pragma omp target update from(mapper(dat::id): vvv) +// CHECK: #pragma omp target update from(mapper(dat::id): vvv) + #pragma omp declare mapper(id: N1::vec v) map(v.len) // CHECK: #pragma omp declare mapper (id : N1::vec v) map(tofrom: v.len) { diff --git a/clang/test/OpenMP/declare_mapper_codegen.cpp b/clang/test/OpenMP/declare_mapper_codegen.cpp new file mode 100644 index 0000000000000..6f1d6ec8fd82a --- /dev/null +++ b/clang/test/OpenMP/declare_mapper_codegen.cpp @@ -0,0 +1,92 @@ +///==========================================================================/// +// RUN: %clang_cc1 -verify -fopenmp -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -o - | FileCheck -allow-deprecated-dag-overlap %s +// RUN: %clang_cc1 -fopenmp -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -emit-pch -o %t %s +// RUN: %clang_cc1 -fopenmp -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck -allow-deprecated-dag-overlap %s +// RUN: %clang_cc1 -verify -fopenmp -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -emit-llvm %s -o - | FileCheck -allow-deprecated-dag-overlap %s +// RUN: %clang_cc1 -fopenmp -fopenmp-targets=i386-pc-linux-gnu -x c++ -std=c++11 -triple i386-unknown-unknown -emit-pch -o %t %s +// RUN: %clang_cc1 -fopenmp -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck -allow-deprecated-dag-overlap %s + +// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -o - | FileCheck -allow-deprecated-dag-overlap --check-prefix SIMD-ONLY0 %s +// RUN: %clang_cc1 -fopenmp-simd -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -emit-pch -o %t %s +// RUN: %clang_cc1 -fopenmp-simd -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck -allow-deprecated-dag-overlap --check-prefix SIMD-ONLY0 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -emit-llvm %s -o - | FileCheck -allow-deprecated-dag-overlap --check-prefix SIMD-ONLY0 %s +// RUN: %clang_cc1 -fopenmp-simd -fopenmp-targets=i386-pc-linux-gnu -x c++ -std=c++11 -triple i386-unknown-unknown -emit-pch -o %t %s +// RUN: %clang_cc1 -fopenmp-simd -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck -allow-deprecated-dag-overlap --check-prefix SIMD-ONLY0 %s + +// SIMD-ONLY0-NOT: {{__kmpc|__tgt}} + +// expected-no-diagnostics +#ifndef HEADER +#define HEADER + +class C { +public: + int a; +}; + +#pragma omp declare mapper(id: C s) map(s.a) + +// CHECK-LABEL: @.__omp_offloading_{{.*}}foo{{.*}}_l54.region_id = weak constant i8 0 + +// CHECK: [[SIZES:@.+]] = {{.+}}constant [1 x i[[sz:64|32]]] [i{{64|32}} 4] +// CHECK: [[TYPES:@.+]] = {{.+}}constant [1 x i64] [i64 35] +// CHECK: [[TSIZES:@.+]] = {{.+}}constant [1 x i[[sz]]] [i[[sz]] 4] +// CHECK: [[TTYPES:@.+]] = {{.+}}constant [1 x i64] [i64 33] +// CHECK: [[FSIZES:@.+]] = {{.+}}constant [1 x i[[sz]]] [i[[sz]] 4] +// CHECK: [[FTYPES:@.+]] = {{.+}}constant [1 x i64] [i64 34] + +// CHECK-LABEL: foo{{.*}}( +void foo(int a){ + int i = a; + C c; + c.a = a; + + // CHECK-DAG: call i32 @__tgt_target(i64 {{.+}}, i8* {{.+}}, i32 1, i8** [[BPGEP:%[0-9]+]], i8** [[PGEP:%[0-9]+]], {{.+}}[[SIZES]]{{.+}}, {{.+}}[[TYPES]]{{.+}}) + // CHECK-DAG: [[BPGEP]] = getelementptr inbounds {{.+}}[[BPS:%[^,]+]], i32 0, i32 0 + // CHECK-DAG: [[PGEP]] = getelementptr inbounds {{.+}}[[PS:%[^,]+]], i32 0, i32 0 + // CHECK-DAG: [[BP1:%.+]] = getelementptr inbounds {{.+}}[[BPS]], i32 0, i32 0 + // CHECK-DAG: [[P1:%.+]] = getelementptr inbounds {{.+}}[[PS]], i32 0, i32 0 + // CHECK-DAG: [[CBP1:%.+]] = bitcast i8** [[BP1]] to %class.C** + // CHECK-DAG: [[CP1:%.+]] = bitcast i8** [[P1]] to %class.C** + // CHECK-DAG: store %class.C* [[VAL:%[^,]+]], %class.C** [[CBP1]] + // CHECK-DAG: store %class.C* [[VAL]], %class.C** [[CP1]] + // CHECK: call void [[KERNEL:@.+]](%class.C* [[VAL]]) + #pragma omp target map(mapper(id),tofrom: c) + { + ++c.a; + } + + // CHECK-DAG: call void @__tgt_target_data_update(i64 -1, i32 1, i8** [[TGEPBP:%.+]], i8** [[TGEPP:%.+]], i[[sz]]* getelementptr {{.+}}[1 x i[[sz]]]* [[TSIZES]], i32 0, i32 0), {{.+}}getelementptr {{.+}}[1 x i64]* [[TTYPES]]{{.+}}) + // CHECK-DAG: [[TGEPBP]] = getelementptr inbounds {{.+}}[[TBP:%[^,]+]], i{{.+}} 0, i{{.+}} 0 + // CHECK-DAG: [[TGEPP]] = getelementptr inbounds {{.+}}[[TP:%[^,]+]], i{{.+}} 0, i{{.+}} 0 + // CHECK-DAG: [[TBP0:%.+]] = getelementptr inbounds {{.+}}[[TBP]], i{{.+}} 0, i{{.+}} 0 + // CHECK-DAG: [[TP0:%.+]] = getelementptr inbounds {{.+}}[[TP]], i{{.+}} 0, i{{.+}} 0 + // CHECK-DAG: [[TCBP0:%.+]] = bitcast i8** [[TBP0]] to %class.C** + // CHECK-DAG: [[TCP0:%.+]] = bitcast i8** [[TP0]] to %class.C** + // CHECK-DAG: store %class.C* [[VAL]], %class.C** [[TCBP0]] + // CHECK-DAG: store %class.C* [[VAL]], %class.C** [[TCP0]] + #pragma omp target update to(mapper(id): c) + + // CHECK-DAG: call void @__tgt_target_data_update(i64 -1, i32 1, i8** [[FGEPBP:%.+]], i8** [[FGEPP:%.+]], i[[sz]]* getelementptr {{.+}}[1 x i[[sz]]]* [[FSIZES]], i32 0, i32 0), {{.+}}getelementptr {{.+}}[1 x i64]* [[FTYPES]]{{.+}}) + // CHECK-DAG: [[FGEPBP]] = getelementptr inbounds {{.+}}[[FBP:%[^,]+]], i{{.+}} 0, i{{.+}} 0 + // CHECK-DAG: [[FGEPP]] = getelementptr inbounds {{.+}}[[FP:%[^,]+]], i{{.+}} 0, i{{.+}} 0 + // CHECK-DAG: [[FBP0:%.+]] = getelementptr inbounds {{.+}}[[FBP]], i{{.+}} 0, i{{.+}} 0 + // CHECK-DAG: [[FP0:%.+]] = getelementptr inbounds {{.+}}[[FP]], i{{.+}} 0, i{{.+}} 0 + // CHECK-DAG: [[FCBP0:%.+]] = bitcast i8** [[FBP0]] to %class.C** + // CHECK-DAG: [[FCP0:%.+]] = bitcast i8** [[FP0]] to %class.C** + // CHECK-DAG: store %class.C* [[VAL]], %class.C** [[FCBP0]] + // CHECK-DAG: store %class.C* [[VAL]], %class.C** [[FCP0]] + #pragma omp target update from(mapper(id): c) +} + + +// CHECK: define internal void [[KERNEL]](%class.C* {{.+}}[[ARG:%.+]]) +// CHECK: [[ADDR:%.+]] = alloca %class.C*, +// CHECK: store %class.C* [[ARG]], %class.C** [[ADDR]] +// CHECK: [[CADDR:%.+]] = load %class.C*, %class.C** [[ADDR]] +// CHECK: [[CAADDR:%.+]] = getelementptr inbounds %class.C, %class.C* [[CADDR]], i32 0, i32 0 +// CHECK: [[VAL:%[^,]+]] = load i32, i32* [[CAADDR]] +// CHECK: {{.+}} = add nsw i32 [[VAL]], 1 +// CHECK: } + +#endif diff --git a/clang/test/OpenMP/declare_mapper_messages.c b/clang/test/OpenMP/declare_mapper_messages.c index c8e65b2a365d6..4df14b62d5972 100644 --- a/clang/test/OpenMP/declare_mapper_messages.c +++ b/clang/test/OpenMP/declare_mapper_messages.c @@ -22,7 +22,7 @@ struct vec { // expec #pragma omp declare mapper(bb:struct vec v) private(v) // expected-error {{expected at least one clause on '#pragma omp declare mapper' directive}} // expected-error {{unexpected OpenMP clause 'private' in directive '#pragma omp declare mapper'}} #pragma omp declare mapper(cc:struct vec v) map(v) ( // expected-warning {{extra tokens at the end of '#pragma omp declare mapper' are ignored}} -#pragma omp declare mapper(++: struct vec v) map(v.len) // expected-error {{illegal identifier on 'omp declare mapper' directive}} +#pragma omp declare mapper(++: struct vec v) map(v.len) // expected-error {{illegal OpenMP user-defined mapper identifier}} #pragma omp declare mapper(id1: struct vec v) map(v.len, temp) // expected-error {{only variable v is allowed in map clauses of this 'omp declare mapper' directive}} #pragma omp declare mapper(default : struct vec kk) map(kk.data[0:2]) // expected-note {{previous definition is here}} #pragma omp declare mapper(struct vec v) map(v.len) // expected-error {{redefinition of user-defined mapper for type 'struct vec' with name 'default'}} @@ -35,6 +35,38 @@ int fun(int arg) { #pragma omp declare mapper(id: struct vec v) map(v.len) // expected-error {{redefinition of user-defined mapper for type 'struct vec' with name 'id'}} { #pragma omp declare mapper(id: struct vec v) map(v.len) + struct vec vv, v1; +#pragma omp target map(mapper) // expected-error {{use of undeclared identifier 'mapper'}} + {} +#pragma omp target map(mapper:vv) // expected-error {{expected '(' after 'mapper'}} + {} +#pragma omp target map(mapper( :vv) // expected-error {{expected expression}} expected-error {{expected ')'}} expected-warning {{implicit declaration of function 'mapper' is invalid in C99}} expected-note {{to match this '('}} + {} +#pragma omp target map(mapper(aa :vv) // expected-error {{use of undeclared identifier 'aa'}} expected-error {{expected ')'}} expected-warning {{implicit declaration of function 'mapper' is invalid in C99}} expected-note {{to match this '('}} + {} +#pragma omp target map(mapper(ab) :vv) // expected-error {{missing map type}} expected-error {{cannot find a valid user-defined mapper for type 'struct vec' with name 'ab'}} + {} +#pragma omp target map(mapper(aa) :vv) // expected-error {{missing map type}} + {} +#pragma omp target map(mapper(aa) to:vv) map(close mapper(aa) from:v1) + {} + +#pragma omp target update to(mapper) // expected-error {{expected '(' after 'mapper'}} expected-error {{expected expression}} expected-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}} +#pragma omp target update to(mapper() // expected-error {{illegal OpenMP user-defined mapper identifier}} expected-error {{expected expression}} expected-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}} +#pragma omp target update to(mapper:vv) // expected-error {{expected '(' after 'mapper'}} expected-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}} +#pragma omp target update to(mapper(:vv) // expected-error {{illegal OpenMP user-defined mapper identifier}} expected-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}} +#pragma omp target update to(mapper(aa :vv) // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}} +#pragma omp target update to(mapper(ab):vv) // expected-error {{cannot find a valid user-defined mapper for type 'struct vec' with name 'ab'}} expected-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}} +#pragma omp target update to(mapper(aa):vv) + +#pragma omp target update from(mapper) // expected-error {{expected '(' after 'mapper'}} expected-error {{expected expression}} expected-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}} +#pragma omp target update from(mapper() // expected-error {{illegal OpenMP user-defined mapper identifier}} expected-error {{expected expression}} expected-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}} +#pragma omp target update from(mapper:vv) // expected-error {{expected '(' after 'mapper'}} expected-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}} +#pragma omp target update from(mapper(:vv) // expected-error {{illegal OpenMP user-defined mapper identifier}} expected-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}} +#pragma omp target update from(mapper(aa :vv) // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}} +#pragma omp target update from(mapper(ab):vv) // expected-error {{cannot find a valid user-defined mapper for type 'struct vec' with name 'ab'}} expected-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}} +#pragma omp target update from(mapper(aa) a:vv) // expected-warning {{missing ':' after ) - ignoring}} +#pragma omp target update from(mapper(aa):vv) } } return arg; diff --git a/clang/test/OpenMP/declare_mapper_messages.cpp b/clang/test/OpenMP/declare_mapper_messages.cpp index 29c76ad79f92f..bcb5ac463a0db 100644 --- a/clang/test/OpenMP/declare_mapper_messages.cpp +++ b/clang/test/OpenMP/declare_mapper_messages.cpp @@ -29,7 +29,7 @@ class vec { // expec #pragma omp declare mapper(bb: vec v) private(v) // expected-error {{expected at least one clause on '#pragma omp declare mapper' directive}} // expected-error {{unexpected OpenMP clause 'private' in directive '#pragma omp declare mapper'}} #pragma omp declare mapper(cc: vec v) map(v) ( // expected-warning {{extra tokens at the end of '#pragma omp declare mapper' are ignored}} -#pragma omp declare mapper(++: vec v) map(v.len) // expected-error {{illegal identifier on 'omp declare mapper' directive}} +#pragma omp declare mapper(++: vec v) map(v.len) // expected-error {{illegal OpenMP user-defined mapper identifier}} #pragma omp declare mapper(id1: vec v) map(v.len, temp) // expected-error {{only variable v is allowed in map clauses of this 'omp declare mapper' directive}} #pragma omp declare mapper(default : vec kk) map(kk.data[0:2]) // expected-note {{previous definition is here}} #pragma omp declare mapper(vec v) map(v.len) // expected-error {{redefinition of user-defined mapper for type 'vec' with name 'default'}} @@ -63,6 +63,55 @@ int fun(int arg) { #pragma omp declare mapper(id: vec v) map(v.len) // expected-note {{previous definition is here}} { #pragma omp declare mapper(id: vec v) map(v.len) + vec vv, v1; +#pragma omp target map(mapper) // expected-error {{use of undeclared identifier 'mapper'}} + {} +#pragma omp target map(mapper:vv) // expected-error {{expected '(' after 'mapper'}} + {} +#pragma omp target map(mapper( :vv) // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} + {} +#pragma omp target map(mapper(aa :vv) // expected-error {{use of undeclared identifier 'aa'}} expected-error {{expected ')'}} expected-note {{to match this '('}} + {} +#pragma omp target map(mapper(ab) :vv) // expected-error {{missing map type}} expected-error {{cannot find a valid user-defined mapper for type 'vec' with name 'ab'}} + {} +#pragma omp target map(mapper(N2::) :vv) // expected-error {{use of undeclared identifier 'N2'}} expected-error {{illegal OpenMP user-defined mapper identifier}} + {} +#pragma omp target map(mapper(N1::) :vv) // expected-error {{illegal OpenMP user-defined mapper identifier}} + {} +#pragma omp target map(mapper(aa) :vv) // expected-error {{missing map type}} + {} +#pragma omp target map(mapper(N1::aa) alloc:vv) // expected-error {{cannot find a valid user-defined mapper for type 'vec' with name 'aa'}} + {} +#pragma omp target map(mapper(aa) to:vv) map(close mapper(aa) from:v1) + {} +#pragma omp target map(mapper(N1::stack::id) to:vv) + {} + +#pragma omp target update to(mapper) // expected-error {{expected '(' after 'mapper'}} expected-error {{expected expression}} expected-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}} +#pragma omp target update to(mapper() // expected-error {{illegal OpenMP user-defined mapper identifier}} expected-error {{expected expression}} expected-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}} +#pragma omp target update to(mapper:vv) // expected-error {{expected '(' after 'mapper'}} expected-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}} +#pragma omp target update to(mapper(:vv) // expected-error {{illegal OpenMP user-defined mapper identifier}} expected-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}} +#pragma omp target update to(mapper(aa :vv) // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}} +#pragma omp target update to(mapper(N2:: :vv) // expected-error {{use of undeclared identifier 'N2'}} expected-error {{illegal OpenMP user-defined mapper identifier}} expected-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}} +#pragma omp target update to(mapper(N1:: :vv) // expected-error {{illegal OpenMP user-defined mapper identifier}} expected-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}} +#pragma omp target update to(mapper(N1::aa) :vv) // expected-error {{cannot find a valid user-defined mapper for type 'vec' with name 'aa'}} expected-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}} +#pragma omp target update to(mapper(ab):vv) // expected-error {{cannot find a valid user-defined mapper for type 'vec' with name 'ab'}} expected-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}} +#pragma omp target update to(mapper(aa) a:vv) // expected-warning {{missing ':' after ) - ignoring}} +#pragma omp target update to(mapper(aa):vv) +#pragma omp target update to(mapper(N1::stack::id) :vv) + +#pragma omp target update from(mapper) // expected-error {{expected '(' after 'mapper'}} expected-error {{expected expression}} expected-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}} +#pragma omp target update from(mapper() // expected-error {{illegal OpenMP user-defined mapper identifier}} expected-error {{expected expression}} expected-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}} +#pragma omp target update from(mapper:vv) // expected-error {{expected '(' after 'mapper'}} expected-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}} +#pragma omp target update from(mapper(:vv) // expected-error {{illegal OpenMP user-defined mapper identifier}} expected-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}} +#pragma omp target update from(mapper(aa :vv) // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}} +#pragma omp target update from(mapper(N2:: :vv) // expected-error {{use of undeclared identifier 'N2'}} expected-error {{illegal OpenMP user-defined mapper identifier}} expected-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}} +#pragma omp target update from(mapper(N1:: :vv) // expected-error {{illegal OpenMP user-defined mapper identifier}} expected-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}} +#pragma omp target update from(mapper(N1::aa) :vv) // expected-error {{cannot find a valid user-defined mapper for type 'vec' with name 'aa'}} expected-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}} +#pragma omp target update from(mapper(ab):vv) // expected-error {{cannot find a valid user-defined mapper for type 'vec' with name 'ab'}} expected-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}} +#pragma omp target update from(mapper(aa) a:vv) // expected-warning {{missing ':' after ) - ignoring}} +#pragma omp target update from(mapper(aa):vv) +#pragma omp target update from(mapper(N1::stack::id) :vv) } #pragma omp declare mapper(id: vec v) map(v.len) // expected-error {{redefinition of user-defined mapper for type 'vec' with name 'id'}} } diff --git a/clang/test/OpenMP/flush_messages.cpp b/clang/test/OpenMP/flush_messages.cpp index da1d0c2412427..f4456489a980b 100644 --- a/clang/test/OpenMP/flush_messages.cpp +++ b/clang/test/OpenMP/flush_messages.cpp @@ -33,7 +33,7 @@ T tmain(T argc) { #pragma omp flush // expected-error {{'#pragma omp flush' cannot be an immediate substatement}} switch (argc) case 1: -#pragma omp flush +#pragma omp flush // expected-error {{'#pragma omp flush' cannot be an immediate substatement}} switch (argc) case 1: { #pragma omp flush @@ -53,7 +53,7 @@ T tmain(T argc) { #pragma omp flush } label: -#pragma omp flush // expected-error {{'#pragma omp flush' cannot be an immediate substatement}} +#pragma omp flush label1 : { #pragma omp flush } @@ -97,7 +97,7 @@ int main(int argc, char **argv) { #pragma omp flush // expected-error {{'#pragma omp flush' cannot be an immediate substatement}} switch (argc) case 1: -#pragma omp flush +#pragma omp flush // expected-error {{'#pragma omp flush' cannot be an immediate substatement}} switch (argc) case 1: { #pragma omp flush @@ -117,7 +117,7 @@ int main(int argc, char **argv) { #pragma omp flush } label: -#pragma omp flush // expected-error {{'#pragma omp flush' cannot be an immediate substatement}} +#pragma omp flush label1 : { #pragma omp flush } diff --git a/clang/test/OpenMP/nesting_of_regions.cpp b/clang/test/OpenMP/nesting_of_regions.cpp index 0955ee215569e..fc9230c6870ca 100644 --- a/clang/test/OpenMP/nesting_of_regions.cpp +++ b/clang/test/OpenMP/nesting_of_regions.cpp @@ -4078,6 +4078,13 @@ void foo() { #pragma omp teams ++a; } +#pragma omp target // expected-error {{target construct with nested teams region contains statements outside of the teams construct}} + { +#pragma omp teams // expected-note {{directive outside teams construct here}} + ++a; +#pragma omp teams // expected-note {{nested teams construct here}} + ++a; + } #pragma omp target // expected-error {{target construct with nested teams region contains statements outside of the teams construct}} { ++a; // expected-note {{statement outside teams construct here}} @@ -12691,6 +12698,13 @@ void foo() { #pragma omp teams ++a; } +#pragma omp target // expected-error {{target construct with nested teams region contains statements outside of the teams construct}} + { +#pragma omp teams // expected-note {{directive outside teams construct here}} + ++a; +#pragma omp teams // expected-note {{nested teams construct here}} + ++a; + } #pragma omp target // expected-error {{target construct with nested teams region contains statements outside of the teams construct}} { ++a; // expected-note {{statement outside teams construct here}} diff --git a/clang/test/OpenMP/nvptx_asm_delayed_diags.c b/clang/test/OpenMP/nvptx_asm_delayed_diags.c new file mode 100644 index 0000000000000..fa6128b60bdac --- /dev/null +++ b/clang/test/OpenMP/nvptx_asm_delayed_diags.c @@ -0,0 +1,118 @@ +// RUN: %clang_cc1 -fopenmp -x c -triple i386-unknown-unknown -fopenmp-targets=nvptx-nvidia-cuda -emit-llvm-bc %s -o %t-x86-host.bc +// RUN: %clang_cc1 -verify -fopenmp -x c -triple nvptx-unknown-unknown -fopenmp-targets=nvptx-nvidia-cuda %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -fsyntax-only -Wuninitialized +// RUN: %clang_cc1 -verify -DDIAGS -DIMMEDIATE -fopenmp -x c -triple nvptx-unknown-unknown -fopenmp-targets=nvptx-nvidia-cuda %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -fsyntax-only -Wuninitialized +// RUN: %clang_cc1 -verify -DDIAGS -DDELAYED -fopenmp -x c -triple nvptx-unknown-unknown -fopenmp-targets=nvptx-nvidia-cuda %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -fsyntax-only -Wuninitialized +// REQUIRES: x86-registered-target +// REQUIRES: nvptx-registered-target + +#ifndef DIAGS +// expected-no-diagnostics +#endif // DIAGS + +#ifdef IMMEDIATE +#pragma omp declare target +#endif //IMMEDIATE +void t1(int r) { +#ifdef DIAGS +// expected-error@+4 {{invalid input constraint 'mx' in asm}} +#endif // DIAGS + __asm__("PR3908 %[lf] %[xx] %[li] %[r]" + : [ r ] "+r"(r) + : [ lf ] "mx"(0), [ li ] "mr"(0), [ xx ] "x"((double)(0))); +} + +unsigned t2(signed char input) { + unsigned output; +#ifdef DIAGS +// expected-error@+3 {{invalid output constraint '=a' in asm}} +#endif // DIAGS + __asm__("xyz" + : "=a"(output) + : "0"(input)); + return output; +} + +double t3(double x) { + register long double result; +#ifdef DIAGS +// expected-error@+3 {{invalid output constraint '=t' in asm}} +#endif // DIAGS + __asm __volatile("frndint" + : "=t"(result) + : "0"(x)); + return result; +} + +unsigned char t4(unsigned char a, unsigned char b) { + unsigned int la = a; + unsigned int lb = b; + unsigned int bigres; + unsigned char res; +#ifdef DIAGS +// expected-error@+3 {{invalid output constraint '=la' in asm}} +#endif // DIAGS + __asm__("0:\n1:\n" + : [ bigres ] "=la"(bigres) + : [ la ] "0"(la), [ lb ] "c"(lb) + : "edx", "cc"); + res = bigres; + return res; +} + +void t5(void) { +#ifdef DIAGS +// expected-error@+6 {{unknown register name 'st' in asm}} +#endif // DIAGS + __asm__ __volatile__( + "finit" + : + : + : "st", "st(1)", "st(2)", "st(3)", + "st(4)", "st(5)", "st(6)", "st(7)", + "fpsr", "fpcr"); +} + +typedef long long __m256i __attribute__((__vector_size__(32))); +void t6(__m256i *p) { +#ifdef DIAGS +// expected-error@+3 {{unknown register name 'ymm0' in asm}} +#endif // DIAGS + __asm__ volatile("vmovaps %0, %%ymm0" ::"m"(*(__m256i *)p) + : "ymm0"); +} +#ifdef IMMEDIATE +#pragma omp end declare target +#endif //IMMEDIATE + +int main() { +#ifdef DELAYED +#pragma omp target +#endif // DELAYED + { +#ifdef DELAYED +// expected-note@+2 {{called by 'main'}} +#endif // DELAYED + t1(0); +#ifdef DELAYED +// expected-note@+2 {{called by 'main'}} +#endif // DELAYED + t2(0); +#ifdef DELAYED +// expected-note@+2 {{called by 'main'}} +#endif // DELAYED + t3(0); +#ifdef DELAYED +// expected-note@+2 {{called by 'main'}} +#endif // DELAYED + t4(0, 0); +#ifdef DELAYED +// expected-note@+2 {{called by 'main'}} +#endif // DELAYED + t5(); +#ifdef DELAYED +// expected-note@+2 {{called by 'main'}} +#endif // DELAYED + t6(0); + } + return 0; +} diff --git a/clang/test/OpenMP/nvptx_target_exceptions_messages.cpp b/clang/test/OpenMP/nvptx_target_exceptions_messages.cpp index 15c9522540fc6..433ba13f73d60 100644 --- a/clang/test/OpenMP/nvptx_target_exceptions_messages.cpp +++ b/clang/test/OpenMP/nvptx_target_exceptions_messages.cpp @@ -68,4 +68,17 @@ int baz2() { return 2 + baz3(); } +int baz1() { throw 1; } // expected-error {{cannot use 'throw' with exceptions disabled}} + +int foobar1(); +int foobar2(); + +int (*A)() = &foobar1; +#pragma omp declare target +int (*B)() = &foobar2; +#pragma omp end declare target + +int foobar1() { throw 1; } +int foobar2() { throw 1; } // expected-error {{cannot use 'throw' with exceptions disabled}} + #endif // HEADER diff --git a/clang/test/OpenMP/nvptx_target_firstprivate_codegen.cpp b/clang/test/OpenMP/nvptx_target_firstprivate_codegen.cpp index 8ffc08294aa9b..c99b43c27f47e 100644 --- a/clang/test/OpenMP/nvptx_target_firstprivate_codegen.cpp +++ b/clang/test/OpenMP/nvptx_target_firstprivate_codegen.cpp @@ -13,9 +13,11 @@ struct TT { ty Y; }; -// TCHECK: [[TT:%.+]] = type { i64, i8 } -// TCHECK: [[S1:%.+]] = type { double } +// TCHECK-DAG: [[TT:%.+]] = type { i64, i8 } +// TCHECK-DAG: [[TTII:%.+]] = type { i32, i32 } +// TCHECK-DAG: [[S1:%.+]] = type { double } +// TCHECK: @__omp_offloading_firstprivate__{{.+}}_e_l28 = internal addrspace(4) global [[TTII]] zeroinitializer // TCHECK: @{{.*}}_$_{{.*}} = common global i32 0, !dbg !{{[0-9]+}} int foo(int n, double *ptr) { int a = 0; @@ -23,16 +25,20 @@ int foo(int n, double *ptr) { float b[10]; double c[5][10]; TT d; + const TT e = {n, n}; -#pragma omp target firstprivate(a) map(tofrom \ - : b) +#pragma omp target firstprivate(a, e) map(tofrom \ + : b) { b[a] = a; + b[a] += e.X; } - // TCHECK: define {{.*}}void @__omp_offloading_{{.+}}([10 x float] addrspace(1)* noalias [[B_IN:%.+]], i{{[0-9]+}} [[A_IN:%.+]]) + // TCHECK: define {{.*}}void @__omp_offloading_{{.+}}([10 x float] addrspace(1)* noalias [[B_IN:%.+]], i{{[0-9]+}} [[A_IN:%.+]], [[TTII]]* noalias [[E_IN:%.+]]) + // TCHECK-NOT: alloca [[TTII]], // TCHECK: [[A_ADDR:%.+]] = alloca i{{[0-9]+}}, - // TCHECK-NOT: alloca i{{[0-9]+}}, + // TCHECK-NOT: alloca [[TTII]], + // TCHECK-NOT: alloca i{{[0-9]+}}, // TCHECK-64: call void @llvm.dbg.declare(metadata [10 x float] addrspace(1)** %{{.+}}, metadata !{{[0-9]+}}, metadata !DIExpression()) // TCHECK: store i{{[0-9]+}} [[A_IN]], i{{[0-9]+}}* [[A_ADDR]], // TCHECK: ret void diff --git a/clang/test/OpenMP/nvptx_teams_reduction_codegen.cpp b/clang/test/OpenMP/nvptx_teams_reduction_codegen.cpp index 0de25295a7a98..d5a275a554cbf 100644 --- a/clang/test/OpenMP/nvptx_teams_reduction_codegen.cpp +++ b/clang/test/OpenMP/nvptx_teams_reduction_codegen.cpp @@ -3,28 +3,32 @@ // RUN: %clang_cc1 -verify -fopenmp -x c++ -triple nvptx64-unknown-unknown -fopenmp-targets=nvptx64-nvidia-cuda -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -o - | FileCheck %s --check-prefix CHECK --check-prefix CHECK-64 // RUN: %clang_cc1 -verify -fopenmp -x c++ -triple i386-unknown-unknown -fopenmp-targets=nvptx-nvidia-cuda -emit-llvm-bc %s -o %t-x86-host.bc // RUN: %clang_cc1 -verify -fopenmp -x c++ -triple nvptx-unknown-unknown -fopenmp-targets=nvptx-nvidia-cuda -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -o - | FileCheck %s --check-prefix CHECK --check-prefix CHECK-32 -// RUN: %clang_cc1 -verify -fopenmp -fexceptions -fcxx-exceptions -x c++ -triple nvptx-unknown-unknown -fopenmp-targets=nvptx-nvidia-cuda -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -o - | FileCheck %s --check-prefix CHECK --check-prefix CHECK-32 +// RUN: %clang_cc1 -verify -fopenmp -fexceptions -fcxx-exceptions -x c++ -triple nvptx-unknown-unknown -fopenmp-targets=nvptx-nvidia-cuda -fopenmp-cuda-teams-reduction-recs-num=2048 -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -o - | FileCheck %s --check-prefix CHECK --check-prefix CHECK-32 // expected-no-diagnostics #ifndef HEADER #define HEADER -// CHECK: [[MAP_TY:%.+]] = type { [128 x i8] } +// CHECK-DAG: [[TEAM1_REDUCE_TY:%.+]] = type { [{{1024|2048}} x double] } +// CHECK-DAG: [[TEAM2_REDUCE_TY:%.+]] = type { [{{1024|2048}} x i8], [{{1024|2048}} x float] } +// CHECK-DAG: [[TEAM3_REDUCE_TY:%.+]] = type { [{{1024|2048}} x i32], [{{1024|2048}} x i16] } +// CHECK-DAG: [[TEAMS_REDUCE_UNION_TY:%.+]] = type { [[TEAM1_REDUCE_TY]] } +// CHECK-DAG: [[MAP_TY:%.+]] = type { [128 x i8] } // CHECK-DAG: [[KERNEL_PTR:@.+]] = internal addrspace(3) global i8* null // CHECK-DAG: [[KERNEL_SHARED1:@.+]] = internal unnamed_addr constant i16 1 // CHECK-DAG: [[KERNEL_SHARED2:@.+]] = internal unnamed_addr constant i16 1 -// CHECK-DAG: [[KERNEL_SHARED3:@.+]] = internal unnamed_addr constant i16 1 // CHECK-DAG: [[KERNEL_SIZE1:@.+]] = internal unnamed_addr constant i{{64|32}} {{16|8}} // CHECK-DAG: [[KERNEL_SIZE2:@.+]] = internal unnamed_addr constant i{{64|32}} 16 -// CHECK-DAG: [[KERNEL_SIZE3:@.+]] = internal unnamed_addr constant i{{64|32}} 8 // Check for the data transfer medium in shared memory to transfer the reduction list to the first warp. // CHECK-DAG: [[TRANSFER_STORAGE:@.+]] = common addrspace([[SHARED_ADDRSPACE:[0-9]+]]) global [32 x i32] // Check that the execution mode of 2 target regions is set to Non-SPMD and the 3rd is in SPMD. -// CHECK-DAG: {{@__omp_offloading_.+l37}}_exec_mode = weak constant i8 1 -// CHECK-DAG: {{@__omp_offloading_.+l43}}_exec_mode = weak constant i8 1 -// CHECK-DAG: {{@__omp_offloading_.+l50}}_exec_mode = weak constant i8 0 +// CHECK-DAG: {{@__omp_offloading_.+l41}}_exec_mode = weak constant i8 1 +// CHECK-DAG: {{@__omp_offloading_.+l47}}_exec_mode = weak constant i8 1 +// CHECK-DAG: {{@__omp_offloading_.+l54}}_exec_mode = weak constant i8 0 + +// CHECK-DAG: [[TEAMS_RED_BUFFER:@.+]] = common global [[TEAMS_REDUCE_UNION_TY]] zeroinitializer template tx ftemplate(int n) { @@ -66,9 +70,9 @@ int bar(int n){ return a; } - // CHECK-LABEL: define {{.*}}void {{@__omp_offloading_.+template.+l37}}_worker() + // CHECK-LABEL: define {{.*}}void {{@__omp_offloading_.+template.+l41}}_worker() - // CHECK: define {{.*}}void [[T1:@__omp_offloading_.+template.+l37]]( + // CHECK: define {{.*}}void [[T1:@__omp_offloading_.+template.+l41]]( // // CHECK: {{call|invoke}} void [[T1]]_worker() // @@ -78,7 +82,11 @@ int bar(int n){ // CHECK: [[EV:%.+]] = load double, double* [[E]], align // CHECK: [[ADD:%.+]] = fadd double [[EV]], 5 // CHECK: store double [[ADD]], double* [[E]], align - // CHECK: [[RET:%.+]] = call i32 @__kmpc_nvptx_teams_reduce_nowait_simple(%struct.ident_t* [[LOC:@.+]], i32 [[GTID:%.+]], [8 x i32]* [[LOCK:@.+]]) + // CHECK: [[GEP1:%.+]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[RED_LIST:%.+]], i{{[0-9]+}} 0, i{{[0-9]+}} 0 + // CHECK: [[BC:%.+]] = bitcast double* [[E]] to i8* + // CHECK: store i8* [[BC]], i8** [[GEP1]], + // CHECK: [[BC_RED_LIST:%.+]] = bitcast [1 x i8*]* [[RED_LIST]] to i8* + // CHECK: [[RET:%.+]] = call i32 @__kmpc_nvptx_teams_reduce_nowait_v2(%struct.ident_t* [[LOC:@.+]], i32 [[GTID:%.+]], i8* bitcast ([[TEAMS_REDUCE_UNION_TY]]* [[TEAMS_RED_BUFFER]] to i8*), i32 {{1024|2048}}, i8* [[BC_RED_LIST]], void (i8*, i16, i16, i16)* [[SHUFFLE_AND_REDUCE:@.+]], void (i8*, i32)* [[INTER_WARP_COPY:@.+]], void (i8*, i32, i8*)* [[RED_LIST_TO_GLOBAL_COPY:@.+]], void (i8*, i32, i8*)* [[RED_LIST_TO_GLOBAL_RED:@.+]], void (i8*, i32, i8*)* [[GLOBAL_TO_RED_LIST_COPY:@.+]], void (i8*, i32, i8*)* [[GLOBAL_TO_RED_LIST_RED:@.+]]) // CHECK: [[COND:%.+]] = icmp eq i32 [[RET]], 1 // CHECK: br i1 [[COND]], label {{%?}}[[IFLABEL:.+]], label {{%?}}[[EXIT:.+]] // @@ -87,15 +95,250 @@ int bar(int n){ // CHECK: [[EV:%.+]] = load double, double* [[E]], align // CHECK: [[ADD:%.+]] = fadd double [[E_INV]], [[EV]] // CHECK: store double [[ADD]], double* [[E_IN]], align - // CHECK: call void @__kmpc_nvptx_teams_end_reduce_nowait_simple(%struct.ident_t* [[LOC]], i32 [[GTID]], [8 x i32]* [[LOCK]]) + // CHECK: call void @__kmpc_nvptx_end_reduce_nowait(i32 [[GTID]]) // CHECK: br label %[[EXIT]] // // CHECK: [[EXIT]] // CHECK: call void @__kmpc_kernel_deinit( - // CHECK-LABEL: define {{.*}}void {{@__omp_offloading_.+template.+l43}}_worker() + // + // Reduction function + // CHECK: define internal void [[REDUCTION_FUNC:@.+]](i8*, i8*) + // CHECK: [[VAR_RHS_REF:%.+]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[RED_LIST_RHS:%.+]], i{{32|64}} 0, i{{32|64}} 0 + // CHECK: [[VAR_RHS_VOID:%.+]] = load i8*, i8** [[VAR_RHS_REF]], + // CHECK: [[VAR_RHS:%.+]] = bitcast i8* [[VAR_RHS_VOID]] to double* + // + // CHECK: [[VAR_LHS_REF:%.+]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[RED_LIST_LHS:%.+]], i{{32|64}} 0, i{{32|64}} 0 + // CHECK: [[VAR_LHS_VOID:%.+]] = load i8*, i8** [[VAR_LHS_REF]], + // CHECK: [[VAR_LHS:%.+]] = bitcast i8* [[VAR_LHS_VOID]] to double* + // + // CHECK: [[VAR_LHS_VAL:%.+]] = load double, double* [[VAR_LHS]], + // CHECK: [[VAR_RHS_VAL:%.+]] = load double, double* [[VAR_RHS]], + // CHECK: [[RES:%.+]] = fadd double [[VAR_LHS_VAL]], [[VAR_RHS_VAL]] + // CHECK: store double [[RES]], double* [[VAR_LHS]], + // CHECK: ret void + + // + // Shuffle and reduce function + // CHECK: define internal void [[SHUFFLE_AND_REDUCE]](i8*, i16 {{.*}}, i16 {{.*}}, i16 {{.*}}) + // CHECK: [[REMOTE_RED_LIST:%.+]] = alloca [1 x i8*], align + // CHECK: [[REMOTE_ELT:%.+]] = alloca double + // + // CHECK: [[LANEID:%.+]] = load i16, i16* {{.+}}, align + // CHECK: [[LANEOFFSET:%.+]] = load i16, i16* {{.+}}, align + // CHECK: [[ALGVER:%.+]] = load i16, i16* {{.+}}, align + // + // CHECK: [[ELT_REF:%.+]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[RED_LIST:%.+]], i{{32|64}} 0, i{{32|64}} 0 + // CHECK: [[ELT_VOID:%.+]] = load i8*, i8** [[ELT_REF]], + // CHECK: [[REMOTE_ELT_REF:%.+]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[REMOTE_RED_LIST:%.+]], i{{32|64}} 0, i{{32|64}} 0 + // CHECK: [[ELT:%.+]] = bitcast i8* [[ELT_VOID]] to double* + // + // CHECK: [[ELT_CAST:%.+]] = bitcast double* [[ELT]] to i64* + // CHECK: [[REMOTE_ELT_CAST:%.+]] = bitcast double* [[REMOTE_ELT]] to i64* + // CHECK: [[ELT_VAL:%.+]] = load i64, i64* [[ELT_CAST]], align + // CHECK: [[WS32:%.+]] = call i32 @llvm.nvvm.read.ptx.sreg.warpsize() + // CHECK: [[WS:%.+]] = trunc i32 [[WS32]] to i16 + // CHECK: [[REMOTE_ELT_VAL64:%.+]] = call i64 @__kmpc_shuffle_int64(i64 [[ELT_VAL]], i16 [[LANEOFFSET]], i16 [[WS]]) + // + // CHECK: store i64 [[REMOTE_ELT_VAL64]], i64* [[REMOTE_ELT_CAST]], align + // CHECK: [[REMOTE_ELT_VOID:%.+]] = bitcast double* [[REMOTE_ELT]] to i8* + // CHECK: store i8* [[REMOTE_ELT_VOID]], i8** [[REMOTE_ELT_REF]], align + // + // Condition to reduce + // CHECK: [[CONDALG0:%.+]] = icmp eq i16 [[ALGVER]], 0 + // + // CHECK: [[COND1:%.+]] = icmp eq i16 [[ALGVER]], 1 + // CHECK: [[COND2:%.+]] = icmp ult i16 [[LANEID]], [[LANEOFFSET]] + // CHECK: [[CONDALG1:%.+]] = and i1 [[COND1]], [[COND2]] + // + // CHECK: [[COND3:%.+]] = icmp eq i16 [[ALGVER]], 2 + // CHECK: [[COND4:%.+]] = and i16 [[LANEID]], 1 + // CHECK: [[COND5:%.+]] = icmp eq i16 [[COND4]], 0 + // CHECK: [[COND6:%.+]] = and i1 [[COND3]], [[COND5]] + // CHECK: [[COND7:%.+]] = icmp sgt i16 [[LANEOFFSET]], 0 + // CHECK: [[CONDALG2:%.+]] = and i1 [[COND6]], [[COND7]] + // + // CHECK: [[COND8:%.+]] = or i1 [[CONDALG0]], [[CONDALG1]] + // CHECK: [[SHOULD_REDUCE:%.+]] = or i1 [[COND8]], [[CONDALG2]] + // CHECK: br i1 [[SHOULD_REDUCE]], label {{%?}}[[DO_REDUCE:.+]], label {{%?}}[[REDUCE_ELSE:.+]] + // + // CHECK: [[DO_REDUCE]] + // CHECK: [[RED_LIST1_VOID:%.+]] = bitcast [1 x i8*]* [[RED_LIST]] to i8* + // CHECK: [[RED_LIST2_VOID:%.+]] = bitcast [1 x i8*]* [[REMOTE_RED_LIST]] to i8* + // CHECK: call void [[REDUCTION_FUNC]](i8* [[RED_LIST1_VOID]], i8* [[RED_LIST2_VOID]]) + // CHECK: br label {{%?}}[[REDUCE_CONT:.+]] + // + // CHECK: [[REDUCE_ELSE]] + // CHECK: br label {{%?}}[[REDUCE_CONT]] + // + // CHECK: [[REDUCE_CONT]] + // Now check if we should just copy over the remote reduction list + // CHECK: [[COND1:%.+]] = icmp eq i16 [[ALGVER]], 1 + // CHECK: [[COND2:%.+]] = icmp uge i16 [[LANEID]], [[LANEOFFSET]] + // CHECK: [[SHOULD_COPY:%.+]] = and i1 [[COND1]], [[COND2]] + // CHECK: br i1 [[SHOULD_COPY]], label {{%?}}[[DO_COPY:.+]], label {{%?}}[[COPY_ELSE:.+]] + // + // CHECK: [[DO_COPY]] + // CHECK: [[REMOTE_ELT_REF:%.+]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[REMOTE_RED_LIST]], i{{32|64}} 0, i{{32|64}} 0 + // CHECK: [[REMOTE_ELT_VOID:%.+]] = load i8*, i8** [[REMOTE_ELT_REF]], + // CHECK: [[ELT_REF:%.+]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[RED_LIST]], i{{32|64}} 0, i{{32|64}} 0 + // CHECK: [[ELT_VOID:%.+]] = load i8*, i8** [[ELT_REF]], + // CHECK: [[REMOTE_ELT:%.+]] = bitcast i8* [[REMOTE_ELT_VOID]] to double* + // CHECK: [[ELT:%.+]] = bitcast i8* [[ELT_VOID]] to double* + // CHECK: [[REMOTE_ELT_VAL:%.+]] = load double, double* [[REMOTE_ELT]], align + // CHECK: store double [[REMOTE_ELT_VAL]], double* [[ELT]], align + // CHECK: br label {{%?}}[[COPY_CONT:.+]] + // + // CHECK: [[COPY_ELSE]] + // CHECK: br label {{%?}}[[COPY_CONT]] + // + // CHECK: [[COPY_CONT]] + // CHECK: void + + // + // Inter warp copy function + // CHECK: define internal void [[INTER_WARP_COPY]](i8*, i32) + // CHECK-DAG: [[LANEID:%.+]] = and i32 {{.+}}, 31 + // CHECK-DAG: [[WARPID:%.+]] = ashr i32 {{.+}}, 5 + // CHECK-DAG: [[RED_LIST:%.+]] = bitcast i8* {{.+}} to [1 x i8*]* + // CHECK: store i32 0, i32* [[CNT_ADDR:%.+]], + // CHECK: br label + // CHECK: [[CNT:%.+]] = load i32, i32* [[CNT_ADDR]], + // CHECK: [[DONE_COPY:%.+]] = icmp ult i32 [[CNT]], 2 + // CHECK: br i1 [[DONE_COPY]], label + // CHECK: call void @__kmpc_barrier(%struct.ident_t* @ + // CHECK: [[IS_WARP_MASTER:%.+]] = icmp eq i32 [[LANEID]], 0 + // CHECK: br i1 [[IS_WARP_MASTER]], label {{%?}}[[DO_COPY:.+]], label {{%?}}[[COPY_ELSE:.+]] + // + // [[DO_COPY]] + // CHECK: [[ELT_REF:%.+]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[RED_LIST]], i{{32|64}} 0, i{{32|64}} 0 + // CHECK: [[ELT_VOID:%.+]] = load i8*, i8** [[ELT_REF]], + // CHECK: [[BASE_ELT:%.+]] = bitcast i8* [[ELT_VOID]] to i32* + // CHECK: [[ELT:%.+]] = getelementptr i32, i32* [[BASE_ELT]], i32 [[CNT]] + // + // CHECK: [[MEDIUM_ELT:%.+]] = getelementptr inbounds [32 x i32], [32 x i32] addrspace([[SHARED_ADDRSPACE]])* [[TRANSFER_STORAGE]], i64 0, i32 [[WARPID]] + // CHECK: [[ELT_VAL:%.+]] = load i32, i32* [[ELT]], + // CHECK: store volatile i32 [[ELT_VAL]], i32 addrspace([[SHARED_ADDRSPACE]])* [[MEDIUM_ELT]], + // CHECK: br label {{%?}}[[COPY_CONT:.+]] + // + // CHECK: [[COPY_ELSE]] + // CHECK: br label {{%?}}[[COPY_CONT]] + // + // Barrier after copy to shared memory storage medium. + // CHECK: [[COPY_CONT]] + // CHECK: call void @__kmpc_barrier(%struct.ident_t* @ + // CHECK: [[ACTIVE_WARPS:%.+]] = load i32, i32* + // + // Read into warp 0. + // CHECK: [[IS_W0_ACTIVE_THREAD:%.+]] = icmp ult i32 [[TID:%.+]], [[ACTIVE_WARPS]] + // CHECK: br i1 [[IS_W0_ACTIVE_THREAD]], label {{%?}}[[DO_READ:.+]], label {{%?}}[[READ_ELSE:.+]] + // + // CHECK: [[DO_READ]] + // CHECK: [[MEDIUM_ELT:%.+]] = getelementptr inbounds [32 x i32], [32 x i32] addrspace([[SHARED_ADDRSPACE]])* [[TRANSFER_STORAGE]], i64 0, i32 [[TID]] + // CHECK: [[ELT_REF:%.+]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[RED_LIST:%.+]], i{{32|64}} 0, i{{32|64}} 0 + // CHECK: [[ELT_VOID:%.+]] = load i8*, i8** [[ELT_REF]], + // CHECK: [[ELT_BASE:%.+]] = bitcast i8* [[ELT_VOID]] to i32* + // CHECK: [[ELT:%.+]] = getelementptr i32, i32* [[ELT_BASE]], i32 [[CNT]] + // CHECK: [[MEDIUM_ELT_VAL:%.+]] = load volatile i32, i32 addrspace([[SHARED_ADDRSPACE]])* [[MEDIUM_ELT]], + // CHECK: store i32 [[MEDIUM_ELT_VAL]], i32* [[ELT]], + // CHECK: br label {{%?}}[[READ_CONT:.+]] + // + // CHECK: [[READ_ELSE]] + // CHECK: br label {{%?}}[[READ_CONT]] + // + // CHECK: [[READ_CONT]] + // CHECK: [[NEXT:%.+]] = add nsw i32 [[CNT]], 1 + // CHECK: store i32 [[NEXT]], i32* [[CNT_ADDR]], + // CHECK: br label + // CHECK: ret + + // CHECK: define internal void [[RED_LIST_TO_GLOBAL_COPY]](i8*, i32, i8*) + // CHECK: [[GLOBAL_PTR:%.+]] = alloca i8*, + // CHECK: [[IDX_PTR:%.+]] = alloca i32, + // CHECK: [[RL_PTR:%.+]] = alloca i8*, + // CHECK: store i8* %{{.+}}, i8** [[GLOBAL_PTR]], + // CHECK: store i32 %{{.+}}, i32* [[IDX_PTR]], + // CHECK: store i8* %{{.+}}, i8** [[RL_PTR]], + // CHECK: [[RL_BC:%.+]] = load i8*, i8** [[RL_PTR]], + // CHECK: [[RL:%.+]] = bitcast i8* [[RL_BC]] to [1 x i8*]* + // CHECK: [[GLOBAL_BC:%.+]] = load i8*, i8** [[GLOBAL_PTR]], + // CHECK: [[GLOBAL:%.+]] = bitcast i8* [[GLOBAL_BC]] to [[TEAM1_REDUCE_TY]]* + // CHECK: [[IDX:%.+]] = load i32, i32* [[IDX_PTR]], + // CHECK: [[RL_RED1_PTR:%.+]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[RL]], i{{[0-9]+}} 0, i{{[0-9]+}} 0 + // CHECK: [[RL_RED1_BC:%.+]] = load i8*, i8** [[RL_RED1_PTR]], + // CHECK: [[RL_RED1:%.+]] = bitcast i8* [[RL_RED1_BC]] to double* + // CHECK: [[GLOBAL_RED1_PTR:%.+]] = getelementptr inbounds [[TEAM1_REDUCE_TY]], [[TEAM1_REDUCE_TY]]* [[GLOBAL]], i{{[0-9]+}} 0, i{{[0-9]+}} 0 + // CHECK: [[GLOBAL_RED1_IDX_PTR:%.+]] = getelementptr inbounds [{{1024|2048}} x double], [{{1024|2048}} x double]* [[GLOBAL_RED1_PTR]], i{{[0-9]+}} 0, i32 [[IDX]] + // CHECK: [[LOC_RED1:%.+]] = load double, double* [[RL_RED1]], + // CHECK: store double [[LOC_RED1]], double* [[GLOBAL_RED1_IDX_PTR]], + // CHECK: ret void + + // CHECK: define internal void [[RED_LIST_TO_GLOBAL_RED]](i8*, i32, i8*) + // CHECK: [[GLOBAL_PTR:%.+]] = alloca i8*, + // CHECK: [[IDX_PTR:%.+]] = alloca i32, + // CHECK: [[RL_PTR:%.+]] = alloca i8*, + // CHECK: [[LOCAL_RL:%.+]] = alloca [1 x i8*], + // CHECK: store i8* %{{.+}}, i8** [[GLOBAL_PTR]], + // CHECK: store i32 %{{.+}}, i32* [[IDX_PTR]], + // CHECK: store i8* %{{.+}}, i8** [[RL_PTR]], + // CHECK: [[GLOBAL_BC:%.+]] = load i8*, i8** [[GLOBAL_PTR]], + // CHECK: [[GLOBAL:%.+]] = bitcast i8* [[GLOBAL_BC]] to [[TEAM1_REDUCE_TY]]* + // CHECK: [[IDX:%.+]] = load i32, i32* [[IDX_PTR]], + // CHECK: [[LOCAL_RL_RED1_PTR:%.+]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[LOCAL_RL]], i{{[0-9]+}} 0, i{{[0-9]+}} 0 + // CHECK: [[GLOBAL_RED1_PTR:%.+]] = getelementptr inbounds [[TEAM1_REDUCE_TY]], [[TEAM1_REDUCE_TY]]* [[GLOBAL]], i{{[0-9]+}} 0, i{{[0-9]+}} 0 + // CHECK: [[GLOBAL_RED1_IDX_PTR:%.+]] = getelementptr inbounds [{{1024|2048}} x double], [{{1024|2048}} x double]* [[GLOBAL_RED1_PTR]], i{{[0-9]+}} 0, i32 [[IDX]] + // CHECK: [[GLOBAL_RED1_IDX_PTR_BC:%.+]] = bitcast double* [[GLOBAL_RED1_IDX_PTR]] to i8* + // CHECK: store i8* [[GLOBAL_RED1_IDX_PTR_BC]], i8** [[LOCAL_RL_RED1_PTR]] + // CHECK: [[LOCAL_RL_BC:%.+]] = bitcast [1 x i8*]* [[LOCAL_RL]] to i8* + // CHECK: [[RL_BC:%.+]] = load i8*, i8** [[RL_PTR]], + // CHECK: call void [[REDUCTION_FUNC]](i8* [[LOCAL_RL_BC]], i8* [[RL_BC]]) + // CHECK: ret void + + // CHECK: define internal void [[GLOBAL_TO_RED_LIST_COPY]](i8*, i32, i8*) + // CHECK: [[GLOBAL_PTR:%.+]] = alloca i8*, + // CHECK: [[IDX_PTR:%.+]] = alloca i32, + // CHECK: [[RL_PTR:%.+]] = alloca i8*, + // CHECK: store i8* %{{.+}}, i8** [[GLOBAL_PTR]], + // CHECK: store i32 %{{.+}}, i32* [[IDX_PTR]], + // CHECK: store i8* %{{.+}}, i8** [[RL_PTR]], + // CHECK: [[RL_BC:%.+]] = load i8*, i8** [[RL_PTR]], + // CHECK: [[RL:%.+]] = bitcast i8* [[RL_BC]] to [1 x i8*]* + // CHECK: [[GLOBAL_BC:%.+]] = load i8*, i8** [[GLOBAL_PTR]], + // CHECK: [[GLOBAL:%.+]] = bitcast i8* [[GLOBAL_BC]] to [[TEAM1_REDUCE_TY]]* + // CHECK: [[IDX:%.+]] = load i32, i32* [[IDX_PTR]], + // CHECK: [[RL_RED1_PTR:%.+]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[RL]], i{{[0-9]+}} 0, i{{[0-9]+}} 0 + // CHECK: [[RL_RED1_BC:%.+]] = load i8*, i8** [[RL_RED1_PTR]], + // CHECK: [[RL_RED1:%.+]] = bitcast i8* [[RL_RED1_BC]] to double* + // CHECK: [[GLOBAL_RED1_PTR:%.+]] = getelementptr inbounds [[TEAM1_REDUCE_TY]], [[TEAM1_REDUCE_TY]]* [[GLOBAL]], i{{[0-9]+}} 0, i{{[0-9]+}} 0 + // CHECK: [[GLOBAL_RED1_IDX_PTR:%.+]] = getelementptr inbounds [{{1024|2048}} x double], [{{1024|2048}} x double]* [[GLOBAL_RED1_PTR]], i{{[0-9]+}} 0, i32 [[IDX]] + // CHECK: [[GLOBAL_RED1:%.+]] = load double, double* [[GLOBAL_RED1_IDX_PTR]], + // CHECK: store double [[GLOBAL_RED1]], double* [[RL_RED1]], + // CHECK: ret void + + // CHECK: define internal void [[GLOBAL_TO_RED_LIST_RED]](i8*, i32, i8*) + // CHECK: [[GLOBAL_PTR:%.+]] = alloca i8*, + // CHECK: [[IDX_PTR:%.+]] = alloca i32, + // CHECK: [[RL_PTR:%.+]] = alloca i8*, + // CHECK: [[LOCAL_RL:%.+]] = alloca [1 x i8*], + // CHECK: store i8* %{{.+}}, i8** [[GLOBAL_PTR]], + // CHECK: store i32 %{{.+}}, i32* [[IDX_PTR]], + // CHECK: store i8* %{{.+}}, i8** [[RL_PTR]], + // CHECK: [[GLOBAL_BC:%.+]] = load i8*, i8** [[GLOBAL_PTR]], + // CHECK: [[GLOBAL:%.+]] = bitcast i8* [[GLOBAL_BC]] to [[TEAM1_REDUCE_TY]]* + // CHECK: [[IDX:%.+]] = load i32, i32* [[IDX_PTR]], + // CHECK: [[LOCAL_RL_RED1_PTR:%.+]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[LOCAL_RL]], i{{[0-9]+}} 0, i{{[0-9]+}} 0 + // CHECK: [[GLOBAL_RED1_PTR:%.+]] = getelementptr inbounds [[TEAM1_REDUCE_TY]], [[TEAM1_REDUCE_TY]]* [[GLOBAL]], i{{[0-9]+}} 0, i{{[0-9]+}} 0 + // CHECK: [[GLOBAL_RED1_IDX_PTR:%.+]] = getelementptr inbounds [{{1024|2048}} x double], [{{1024|2048}} x double]* [[GLOBAL_RED1_PTR]], i{{[0-9]+}} 0, i32 [[IDX]] + // CHECK: [[GLOBAL_RED1_IDX_PTR_BC:%.+]] = bitcast double* [[GLOBAL_RED1_IDX_PTR]] to i8* + // CHECK: store i8* [[GLOBAL_RED1_IDX_PTR_BC]], i8** [[LOCAL_RL_RED1_PTR]] + // CHECK: [[LOCAL_RL_BC:%.+]] = bitcast [1 x i8*]* [[LOCAL_RL]] to i8* + // CHECK: [[RL_BC:%.+]] = load i8*, i8** [[RL_PTR]], + // CHECK: call void [[REDUCTION_FUNC]](i8* [[RL_BC]], i8* [[LOCAL_RL_BC]]) + // CHECK: ret void + + // CHECK-LABEL: define {{.*}}void {{@__omp_offloading_.+template.+l47}}_worker() - // CHECK: define {{.*}}void [[T2:@__omp_offloading_.+template.+l43]]( + // CHECK: define {{.*}}void [[T2:@__omp_offloading_.+template.+l47]]( // // CHECK: {{call|invoke}} void [[T2]]_worker() @@ -111,7 +354,13 @@ int bar(int n){ // CHECK: [[DV:%.+]] = load float, float* [[D]], align // CHECK: [[MUL:%.+]] = fmul float [[DV]], {{[0-9e\.\+]+}} // CHECK: store float [[MUL]], float* [[D]], align - // CHECK: [[RET:%.+]] = call i32 @__kmpc_nvptx_teams_reduce_nowait_simple(%struct.ident_t* [[LOC:@.+]], i32 [[GTID:%.+]], [8 x i32]* [[LOCK:@.+]]) + // CHECK: [[GEP1:%.+]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[RED_LIST:%.+]], i{{[0-9]+}} 0, i{{[0-9]+}} 0 + // CHECK: store i8* [[C]], i8** [[GEP1]], + // CHECK: [[GEP2:%.+]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[RED_LIST:%.+]], i{{[0-9]+}} 0, i{{[0-9]+}} 1 + // CHECK: [[BC:%.+]] = bitcast float* [[D]] to i8* + // CHECK: store i8* [[BC]], i8** [[GEP2]], + // CHECK: [[BC_RED_LIST:%.+]] = bitcast [2 x i8*]* [[RED_LIST]] to i8* + // CHECK: [[RET:%.+]] = call i32 @__kmpc_nvptx_teams_reduce_nowait_v2(%struct.ident_t* [[LOC:@.+]], i32 [[GTID:%.+]], i8* bitcast ([[TEAMS_REDUCE_UNION_TY]]* [[TEAMS_RED_BUFFER]] to i8*), i32 {{1024|2048}}, i8* [[BC_RED_LIST]], void (i8*, i16, i16, i16)* [[SHUFFLE_AND_REDUCE:@.+]], void (i8*, i32)* [[INTER_WARP_COPY:@.+]], void (i8*, i32, i8*)* [[RED_LIST_TO_GLOBAL_COPY:@.+]], void (i8*, i32, i8*)* [[RED_LIST_TO_GLOBAL_RED:@.+]], void (i8*, i32, i8*)* [[GLOBAL_TO_RED_LIST_COPY:@.+]], void (i8*, i32, i8*)* [[GLOBAL_TO_RED_LIST_RED:@.+]]) // CHECK: [[COND:%.+]] = icmp eq i32 [[RET]], 1 // CHECK: br i1 [[COND]], label {{%?}}[[IFLABEL:.+]], label {{%?}}[[EXIT:.+]] // @@ -127,25 +376,349 @@ int bar(int n){ // CHECK: [[DV:%.+]] = load float, float* [[D]], align // CHECK: [[MUL:%.+]] = fmul float [[D_INV]], [[DV]] // CHECK: store float [[MUL]], float* [[D_IN]], align - // CHECK: call void @__kmpc_nvptx_teams_end_reduce_nowait_simple(%struct.ident_t* [[LOC]], i32 [[GTID]], [8 x i32]* [[LOCK]]) + // CHECK: call void @__kmpc_nvptx_end_reduce_nowait(i32 [[GTID]]) // CHECK: br label %[[EXIT]] // // CHECK: [[EXIT]] // CHECK: call void @__kmpc_kernel_deinit( - // CHECK-LABEL: define {{.*}}void {{@__omp_offloading_.+template.+l50}}( + // + // Reduction function + // CHECK: define internal void [[REDUCTION_FUNC:@.+]](i8*, i8*) + // CHECK: [[VAR1_RHS_REF:%.+]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[RED_LIST_RHS:%.+]], i{{32|64}} 0, i{{32|64}} 0 + // CHECK: [[VAR1_RHS:%.+]] = load i8*, i8** [[VAR1_RHS_REF]], + // + // CHECK: [[VAR1_LHS_REF:%.+]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[RED_LIST_LHS:%.+]], i{{32|64}} 0, i{{32|64}} 0 + // CHECK: [[VAR1_LHS:%.+]] = load i8*, i8** [[VAR1_LHS_REF]], + // + // CHECK: [[VAR2_RHS_REF:%.+]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[RED_LIST_RHS]], i{{32|64}} 0, i{{32|64}} 1 + // CHECK: [[VAR2_RHS_VOID:%.+]] = load i8*, i8** [[VAR2_RHS_REF]], + // CHECK: [[VAR2_RHS:%.+]] = bitcast i8* [[VAR2_RHS_VOID]] to float* + // + // CHECK: [[VAR2_LHS_REF:%.+]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[RED_LIST_LHS]], i{{32|64}} 0, i{{32|64}} 1 + // CHECK: [[VAR2_LHS_VOID:%.+]] = load i8*, i8** [[VAR2_LHS_REF]], + // CHECK: [[VAR2_LHS:%.+]] = bitcast i8* [[VAR2_LHS_VOID]] to float* + // + // CHECK: [[VAR1_LHS_VAL8:%.+]] = load i8, i8* [[VAR1_LHS]], + // CHECK: [[VAR1_LHS_VAL:%.+]] = sext i8 [[VAR1_LHS_VAL8]] to i32 + // CHECK: [[VAR1_RHS_VAL8:%.+]] = load i8, i8* [[VAR1_RHS]], + // CHECK: [[VAR1_RHS_VAL:%.+]] = sext i8 [[VAR1_RHS_VAL8]] to i32 + // CHECK: [[XOR:%.+]] = xor i32 [[VAR1_LHS_VAL]], [[VAR1_RHS_VAL]] + // CHECK: [[RES:%.+]] = trunc i32 [[XOR]] to i8 + // CHECK: store i8 [[RES]], i8* [[VAR1_LHS]], + // + // CHECK: [[VAR2_LHS_VAL:%.+]] = load float, float* [[VAR2_LHS]], + // CHECK: [[VAR2_RHS_VAL:%.+]] = load float, float* [[VAR2_RHS]], + // CHECK: [[RES:%.+]] = fmul float [[VAR2_LHS_VAL]], [[VAR2_RHS_VAL]] + // CHECK: store float [[RES]], float* [[VAR2_LHS]], + // CHECK: ret void + + // + // Shuffle and reduce function + // CHECK: define internal void [[SHUFFLE_AND_REDUCE]](i8*, i16 {{.*}}, i16 {{.*}}, i16 {{.*}}) + // CHECK: [[REMOTE_RED_LIST:%.+]] = alloca [2 x i8*], align + // CHECK: [[REMOTE_ELT1:%.+]] = alloca i8 + // CHECK: [[REMOTE_ELT2:%.+]] = alloca float + // + // CHECK: [[LANEID:%.+]] = load i16, i16* {{.+}}, align + // CHECK: [[LANEOFFSET:%.+]] = load i16, i16* {{.+}}, align + // CHECK: [[ALGVER:%.+]] = load i16, i16* {{.+}}, align + // + // CHECK: [[ELT_REF:%.+]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[RED_LIST:%.+]], i{{32|64}} 0, i{{32|64}} 0 + // CHECK: [[ELT_VOID:%.+]] = load i8*, i8** [[ELT_REF]], + // CHECK: [[REMOTE_ELT_REF:%.+]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[REMOTE_RED_LIST:%.+]], i{{32|64}} 0, i{{32|64}} 0 + // CHECK: [[ELT_VAL:%.+]] = load i8, i8* [[ELT_VOID]], align + // + // CHECK: [[ELT_CAST:%.+]] = sext i8 [[ELT_VAL]] to i32 + // CHECK: [[WS32:%.+]] = call i32 @llvm.nvvm.read.ptx.sreg.warpsize() + // CHECK: [[WS:%.+]] = trunc i32 [[WS32]] to i16 + // CHECK: [[REMOTE_ELT1_VAL32:%.+]] = call i32 @__kmpc_shuffle_int32(i32 [[ELT_CAST]], i16 [[LANEOFFSET]], i16 [[WS]]) + // CHECK: [[REMOTE_ELT1_VAL:%.+]] = trunc i32 [[REMOTE_ELT1_VAL32]] to i8 + // + // CHECK: store i8 [[REMOTE_ELT1_VAL]], i8* [[REMOTE_ELT1]], align + // CHECK: store i8* [[REMOTE_ELT1]], i8** [[REMOTE_ELT_REF]], align + // + // CHECK: [[ELT_REF:%.+]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[RED_LIST]], i{{32|64}} 0, i{{32|64}} 1 + // CHECK: [[ELT_VOID:%.+]] = load i8*, i8** [[ELT_REF]], + // CHECK: [[REMOTE_ELT_REF:%.+]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[REMOTE_RED_LIST]], i{{32|64}} 0, i{{32|64}} 1 + // CHECK: [[ELT:%.+]] = bitcast i8* [[ELT_VOID]] to float* + // + // CHECK: [[ELT_CAST:%.+]] = bitcast float* [[ELT]] to i32* + // CHECK: [[REMOTE_ELT2_CAST:%.+]] = bitcast float* [[REMOTE_ELT2]] to i32* + // CHECK: [[ELT_VAL:%.+]] = load i32, i32* [[ELT_CAST]], align + // CHECK: [[WS32:%.+]] = call i32 @llvm.nvvm.read.ptx.sreg.warpsize() + // CHECK: [[WS:%.+]] = trunc i32 [[WS32]] to i16 + // CHECK: [[REMOTE_ELT2_VAL32:%.+]] = call i32 @__kmpc_shuffle_int32(i32 [[ELT_VAL]], i16 [[LANEOFFSET]], i16 [[WS]]) + // + // CHECK: store i32 [[REMOTE_ELT2_VAL32]], i32* [[REMOTE_ELT2_CAST]], align + // CHECK: [[REMOTE_ELT2C:%.+]] = bitcast float* [[REMOTE_ELT2]] to i8* + // CHECK: store i8* [[REMOTE_ELT2C]], i8** [[REMOTE_ELT_REF]], align + // + // Condition to reduce + // CHECK: [[CONDALG0:%.+]] = icmp eq i16 [[ALGVER]], 0 + // + // CHECK: [[COND1:%.+]] = icmp eq i16 [[ALGVER]], 1 + // CHECK: [[COND2:%.+]] = icmp ult i16 [[LANEID]], [[LANEOFFSET]] + // CHECK: [[CONDALG1:%.+]] = and i1 [[COND1]], [[COND2]] + // + // CHECK: [[COND3:%.+]] = icmp eq i16 [[ALGVER]], 2 + // CHECK: [[COND4:%.+]] = and i16 [[LANEID]], 1 + // CHECK: [[COND5:%.+]] = icmp eq i16 [[COND4]], 0 + // CHECK: [[COND6:%.+]] = and i1 [[COND3]], [[COND5]] + // CHECK: [[COND7:%.+]] = icmp sgt i16 [[LANEOFFSET]], 0 + // CHECK: [[CONDALG2:%.+]] = and i1 [[COND6]], [[COND7]] + // + // CHECK: [[COND8:%.+]] = or i1 [[CONDALG0]], [[CONDALG1]] + // CHECK: [[SHOULD_REDUCE:%.+]] = or i1 [[COND8]], [[CONDALG2]] + // CHECK: br i1 [[SHOULD_REDUCE]], label {{%?}}[[DO_REDUCE:.+]], label {{%?}}[[REDUCE_ELSE:.+]] + // + // CHECK: [[DO_REDUCE]] + // CHECK: [[RED_LIST1_VOID:%.+]] = bitcast [2 x i8*]* [[RED_LIST]] to i8* + // CHECK: [[RED_LIST2_VOID:%.+]] = bitcast [2 x i8*]* [[REMOTE_RED_LIST]] to i8* + // CHECK: call void [[REDUCTION_FUNC]](i8* [[RED_LIST1_VOID]], i8* [[RED_LIST2_VOID]]) + // CHECK: br label {{%?}}[[REDUCE_CONT:.+]] + // + // CHECK: [[REDUCE_ELSE]] + // CHECK: br label {{%?}}[[REDUCE_CONT]] + // + // CHECK: [[REDUCE_CONT]] + // Now check if we should just copy over the remote reduction list + // CHECK: [[COND1:%.+]] = icmp eq i16 [[ALGVER]], 1 + // CHECK: [[COND2:%.+]] = icmp uge i16 [[LANEID]], [[LANEOFFSET]] + // CHECK: [[SHOULD_COPY:%.+]] = and i1 [[COND1]], [[COND2]] + // CHECK: br i1 [[SHOULD_COPY]], label {{%?}}[[DO_COPY:.+]], label {{%?}}[[COPY_ELSE:.+]] + // + // CHECK: [[DO_COPY]] + // CHECK: [[REMOTE_ELT_REF:%.+]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[REMOTE_RED_LIST]], i{{32|64}} 0, i{{32|64}} 0 + // CHECK: [[REMOTE_ELT_VOID:%.+]] = load i8*, i8** [[REMOTE_ELT_REF]], + // CHECK: [[ELT_REF:%.+]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[RED_LIST]], i{{32|64}} 0, i{{32|64}} 0 + // CHECK: [[ELT_VOID:%.+]] = load i8*, i8** [[ELT_REF]], + // CHECK: [[REMOTE_ELT_VAL:%.+]] = load i8, i8* [[REMOTE_ELT_VOID]], align + // CHECK: store i8 [[REMOTE_ELT_VAL]], i8* [[ELT_VOID]], align + // + // CHECK: [[REMOTE_ELT_REF:%.+]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[REMOTE_RED_LIST]], i{{32|64}} 0, i{{32|64}} 1 + // CHECK: [[REMOTE_ELT_VOID:%.+]] = load i8*, i8** [[REMOTE_ELT_REF]], + // CHECK: [[ELT_REF:%.+]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[RED_LIST]], i{{32|64}} 0, i{{32|64}} 1 + // CHECK: [[ELT_VOID:%.+]] = load i8*, i8** [[ELT_REF]], + // CHECK: [[REMOTE_ELT:%.+]] = bitcast i8* [[REMOTE_ELT_VOID]] to float* + // CHECK: [[ELT:%.+]] = bitcast i8* [[ELT_VOID]] to float* + // CHECK: [[REMOTE_ELT_VAL:%.+]] = load float, float* [[REMOTE_ELT]], align + // CHECK: store float [[REMOTE_ELT_VAL]], float* [[ELT]], align + // CHECK: br label {{%?}}[[COPY_CONT:.+]] + // + // CHECK: [[COPY_ELSE]] + // CHECK: br label {{%?}}[[COPY_CONT]] + // + // CHECK: [[COPY_CONT]] + // CHECK: void + + // + // Inter warp copy function + // CHECK: define internal void [[INTER_WARP_COPY]](i8*, i32) + // CHECK-DAG: [[LANEID:%.+]] = and i32 {{.+}}, 31 + // CHECK-DAG: [[WARPID:%.+]] = ashr i32 {{.+}}, 5 + // CHECK-DAG: [[RED_LIST:%.+]] = bitcast i8* {{.+}} to [2 x i8*]* + // CHECK: call void @__kmpc_barrier(%struct.ident_t* @ + // CHECK: [[IS_WARP_MASTER:%.+]] = icmp eq i32 [[LANEID]], 0 + // CHECK: br i1 [[IS_WARP_MASTER]], label {{%?}}[[DO_COPY:.+]], label {{%?}}[[COPY_ELSE:.+]] + // + // [[DO_COPY]] + // CHECK: [[ELT_REF:%.+]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[RED_LIST]], i{{32|64}} 0, i{{32|64}} 0 + // CHECK: [[ELT_VOID:%.+]] = load i8*, i8** [[ELT_REF]], + // + // CHECK: [[MEDIUM_ELT64:%.+]] = getelementptr inbounds [32 x i32], [32 x i32] addrspace([[SHARED_ADDRSPACE]])* [[TRANSFER_STORAGE]], i64 0, i32 [[WARPID]] + // CHECK: [[MEDIUM_ELT:%.+]] = bitcast i32 addrspace([[SHARED_ADDRSPACE]])* [[MEDIUM_ELT64]] to i8 addrspace([[SHARED_ADDRSPACE]])* + // CHECK: [[ELT_VAL:%.+]] = load i8, i8* [[ELT_VOID]], align + // CHECK: store volatile i8 [[ELT_VAL]], i8 addrspace([[SHARED_ADDRSPACE]])* [[MEDIUM_ELT]], align + // CHECK: br label {{%?}}[[COPY_CONT:.+]] + // + // CHECK: [[COPY_ELSE]] + // CHECK: br label {{%?}}[[COPY_CONT]] + // + // Barrier after copy to shared memory storage medium. + // CHECK: [[COPY_CONT]] + // CHECK: call void @__kmpc_barrier(%struct.ident_t* @ + // CHECK: [[ACTIVE_WARPS:%.+]] = load i32, i32* + // + // Read into warp 0. + // CHECK: [[IS_W0_ACTIVE_THREAD:%.+]] = icmp ult i32 [[TID:%.+]], [[ACTIVE_WARPS]] + // CHECK: br i1 [[IS_W0_ACTIVE_THREAD]], label {{%?}}[[DO_READ:.+]], label {{%?}}[[READ_ELSE:.+]] + // + // CHECK: [[DO_READ]] + // CHECK: [[MEDIUM_ELT32:%.+]] = getelementptr inbounds [32 x i32], [32 x i32] addrspace([[SHARED_ADDRSPACE]])* [[TRANSFER_STORAGE]], i64 0, i32 [[TID]] + // CHECK: [[MEDIUM_ELT:%.+]] = bitcast i32 addrspace([[SHARED_ADDRSPACE]])* [[MEDIUM_ELT32]] to i8 addrspace([[SHARED_ADDRSPACE]])* + // CHECK: [[ELT_REF:%.+]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[RED_LIST:%.+]], i{{32|64}} 0, i{{32|64}} 0 + // CHECK: [[ELT_VOID:%.+]] = load i8*, i8** [[ELT_REF]], + // CHECK: [[MEDIUM_ELT_VAL:%.+]] = load volatile i8, i8 addrspace([[SHARED_ADDRSPACE]])* [[MEDIUM_ELT]], align + // CHECK: store i8 [[MEDIUM_ELT_VAL]], i8* [[ELT_VOID]], align + // CHECK: br label {{%?}}[[READ_CONT:.+]] + // + // CHECK: [[READ_ELSE]] + // CHECK: br label {{%?}}[[READ_CONT]] + // + // CHECK: [[READ_CONT]] + // CHECK: call void @__kmpc_barrier(%struct.ident_t* @ + // CHECK: [[IS_WARP_MASTER:%.+]] = icmp eq i32 [[LANEID]], 0 + // CHECK: br i1 [[IS_WARP_MASTER]], label {{%?}}[[DO_COPY:.+]], label {{%?}}[[COPY_ELSE:.+]] + // + // [[DO_COPY]] + // CHECK: [[ELT_REF:%.+]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[RED_LIST]], i{{32|64}} 0, i{{32|64}} 1 + // CHECK: [[ELT_VOID:%.+]] = load i8*, i8** [[ELT_REF]], + // CHECK: [[ELT:%.+]] = bitcast i8* [[ELT_VOID]] to i32* + // + // CHECK: [[MEDIUM_ELT:%.+]] = getelementptr inbounds [32 x i32], [32 x i32] addrspace([[SHARED_ADDRSPACE]])* [[TRANSFER_STORAGE]], i64 0, i32 [[WARPID]] + // CHECK: [[ELT_VAL:%.+]] = load i32, i32* [[ELT]], align + // CHECK: store volatile i32 [[ELT_VAL]], i32 addrspace([[SHARED_ADDRSPACE]])* [[MEDIUM_ELT]], align + // CHECK: br label {{%?}}[[COPY_CONT:.+]] + // + // CHECK: [[COPY_ELSE]] + // CHECK: br label {{%?}}[[COPY_CONT]] + // + // Barrier after copy to shared memory storage medium. + // CHECK: [[COPY_CONT]] + // CHECK: call void @__kmpc_barrier(%struct.ident_t* @ + // CHECK: [[ACTIVE_WARPS:%.+]] = load i32, i32* + // + // Read into warp 0. + // CHECK: [[IS_W0_ACTIVE_THREAD:%.+]] = icmp ult i32 [[TID:%.+]], [[ACTIVE_WARPS]] + // CHECK: br i1 [[IS_W0_ACTIVE_THREAD]], label {{%?}}[[DO_READ:.+]], label {{%?}}[[READ_ELSE:.+]] + // + // CHECK: [[DO_READ]] + // CHECK: [[MEDIUM_ELT:%.+]] = getelementptr inbounds [32 x i32], [32 x i32] addrspace([[SHARED_ADDRSPACE]])* [[TRANSFER_STORAGE]], i64 0, i32 [[TID]] + // CHECK: [[ELT_REF:%.+]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[RED_LIST:%.+]], i{{32|64}} 0, i{{32|64}} 1 + // CHECK: [[ELT_VOID:%.+]] = load i8*, i8** [[ELT_REF]], + // CHECK: [[ELT:%.+]] = bitcast i8* [[ELT_VOID]] to i32* + // CHECK: [[MEDIUM_ELT_VAL:%.+]] = load volatile i32, i32 addrspace([[SHARED_ADDRSPACE]])* [[MEDIUM_ELT]], align + // CHECK: store i32 [[MEDIUM_ELT_VAL]], i32* [[ELT]], align + // CHECK: br label {{%?}}[[READ_CONT:.+]] + // + // CHECK: [[READ_ELSE]] + // CHECK: br label {{%?}}[[READ_CONT]] + // + // CHECK: [[READ_CONT]] + // CHECK: ret + + // CHECK: define internal void [[RED_LIST_TO_GLOBAL_COPY]](i8*, i32, i8*) + // CHECK: [[GLOBAL_PTR:%.+]] = alloca i8*, + // CHECK: [[IDX_PTR:%.+]] = alloca i32, + // CHECK: [[RL_PTR:%.+]] = alloca i8*, + // CHECK: store i8* %{{.+}}, i8** [[GLOBAL_PTR]], + // CHECK: store i32 %{{.+}}, i32* [[IDX_PTR]], + // CHECK: store i8* %{{.+}}, i8** [[RL_PTR]], + // CHECK: [[RL_BC:%.+]] = load i8*, i8** [[RL_PTR]], + // CHECK: [[RL:%.+]] = bitcast i8* [[RL_BC]] to [2 x i8*]* + // CHECK: [[GLOBAL_BC:%.+]] = load i8*, i8** [[GLOBAL_PTR]], + // CHECK: [[GLOBAL:%.+]] = bitcast i8* [[GLOBAL_BC]] to [[TEAM2_REDUCE_TY]]* + // CHECK: [[IDX:%.+]] = load i32, i32* [[IDX_PTR]], + // CHECK: [[RL_RED1_PTR:%.+]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[RL]], i{{[0-9]+}} 0, i{{[0-9]+}} 0 + // CHECK: [[RL_RED1:%.+]] = load i8*, i8** [[RL_RED1_PTR]], + // CHECK: [[GLOBAL_RED1_PTR:%.+]] = getelementptr inbounds [[TEAM2_REDUCE_TY]], [[TEAM2_REDUCE_TY]]* [[GLOBAL]], i{{[0-9]+}} 0, i{{[0-9]+}} 0 + // CHECK: [[GLOBAL_RED1_IDX_PTR:%.+]] = getelementptr inbounds [{{1024|2048}} x i8], [{{1024|2048}} x i8]* [[GLOBAL_RED1_PTR]], i{{[0-9]+}} 0, i32 [[IDX]] + // CHECK: [[LOC_RED1:%.+]] = load i8, i8* [[RL_RED1]], + // CHECK: store i8 [[LOC_RED1]], i8* [[GLOBAL_RED1_IDX_PTR]], + // CHECK: [[RL_RED1_PTR:%.+]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[RL]], i{{[0-9]+}} 0, i{{[0-9]+}} 1 + // CHECK: [[RL_RED1_BC:%.+]] = load i8*, i8** [[RL_RED1_PTR]], + // CHECK: [[RL_RED1:%.+]] = bitcast i8* [[RL_RED1_BC]] to float* + // CHECK: [[GLOBAL_RED1_PTR:%.+]] = getelementptr inbounds [[TEAM2_REDUCE_TY]], [[TEAM2_REDUCE_TY]]* [[GLOBAL]], i{{[0-9]+}} 0, i{{[0-9]+}} 1 + // CHECK: [[GLOBAL_RED1_IDX_PTR:%.+]] = getelementptr inbounds [{{1024|2048}} x float], [{{1024|2048}} x float]* [[GLOBAL_RED1_PTR]], i{{[0-9]+}} 0, i32 [[IDX]] + // CHECK: [[LOC_RED1:%.+]] = load float, float* [[RL_RED1]], + // CHECK: store float [[LOC_RED1]], float* [[GLOBAL_RED1_IDX_PTR]], + // CHECK: ret void + + // CHECK: define internal void [[RED_LIST_TO_GLOBAL_RED]](i8*, i32, i8*) + // CHECK: [[GLOBAL_PTR:%.+]] = alloca i8*, + // CHECK: [[IDX_PTR:%.+]] = alloca i32, + // CHECK: [[RL_PTR:%.+]] = alloca i8*, + // CHECK: [[LOCAL_RL:%.+]] = alloca [2 x i8*], + // CHECK: store i8* %{{.+}}, i8** [[GLOBAL_PTR]], + // CHECK: store i32 %{{.+}}, i32* [[IDX_PTR]], + // CHECK: store i8* %{{.+}}, i8** [[RL_PTR]], + // CHECK: [[GLOBAL_BC:%.+]] = load i8*, i8** [[GLOBAL_PTR]], + // CHECK: [[GLOBAL:%.+]] = bitcast i8* [[GLOBAL_BC]] to [[TEAM2_REDUCE_TY]]* + // CHECK: [[IDX:%.+]] = load i32, i32* [[IDX_PTR]], + // CHECK: [[LOCAL_RL_RED1_PTR:%.+]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[LOCAL_RL]], i{{[0-9]+}} 0, i{{[0-9]+}} 0 + // CHECK: [[GLOBAL_RED1_PTR:%.+]] = getelementptr inbounds [[TEAM2_REDUCE_TY]], [[TEAM2_REDUCE_TY]]* [[GLOBAL]], i{{[0-9]+}} 0, i{{[0-9]+}} 0 + // CHECK: [[GLOBAL_RED1_IDX_PTR:%.+]] = getelementptr inbounds [{{1024|2048}} x i8], [{{1024|2048}} x i8]* [[GLOBAL_RED1_PTR]], i{{[0-9]+}} 0, i32 [[IDX]] + // CHECK: store i8* [[GLOBAL_RED1_IDX_PTR]], i8** [[LOCAL_RL_RED1_PTR]] + // CHECK: [[LOCAL_RL_RED1_PTR:%.+]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[LOCAL_RL]], i{{[0-9]+}} 0, i{{[0-9]+}} 1 + // CHECK: [[GLOBAL_RED1_PTR:%.+]] = getelementptr inbounds [[TEAM2_REDUCE_TY]], [[TEAM2_REDUCE_TY]]* [[GLOBAL]], i{{[0-9]+}} 0, i{{[0-9]+}} 1 + // CHECK: [[GLOBAL_RED1_IDX_PTR:%.+]] = getelementptr inbounds [{{1024|2048}} x float], [{{1024|2048}} x float]* [[GLOBAL_RED1_PTR]], i{{[0-9]+}} 0, i32 [[IDX]] + // CHECK: [[GLOBAL_RED1_IDX_PTR_BC:%.+]] = bitcast float* [[GLOBAL_RED1_IDX_PTR]] to i8* + // CHECK: store i8* [[GLOBAL_RED1_IDX_PTR_BC]], i8** [[LOCAL_RL_RED1_PTR]] + // CHECK: [[LOCAL_RL_BC:%.+]] = bitcast [2 x i8*]* [[LOCAL_RL]] to i8* + // CHECK: [[RL_BC:%.+]] = load i8*, i8** [[RL_PTR]], + // CHECK: call void [[REDUCTION_FUNC]](i8* [[LOCAL_RL_BC]], i8* [[RL_BC]]) + // CHECK: ret void + + // CHECK: define internal void [[GLOBAL_TO_RED_LIST_COPY]](i8*, i32, i8*) + // CHECK: [[GLOBAL_PTR:%.+]] = alloca i8*, + // CHECK: [[IDX_PTR:%.+]] = alloca i32, + // CHECK: [[RL_PTR:%.+]] = alloca i8*, + // CHECK: store i8* %{{.+}}, i8** [[GLOBAL_PTR]], + // CHECK: store i32 %{{.+}}, i32* [[IDX_PTR]], + // CHECK: store i8* %{{.+}}, i8** [[RL_PTR]], + // CHECK: [[RL_BC:%.+]] = load i8*, i8** [[RL_PTR]], + // CHECK: [[RL:%.+]] = bitcast i8* [[RL_BC]] to [2 x i8*]* + // CHECK: [[GLOBAL_BC:%.+]] = load i8*, i8** [[GLOBAL_PTR]], + // CHECK: [[GLOBAL:%.+]] = bitcast i8* [[GLOBAL_BC]] to [[TEAM2_REDUCE_TY]]* + // CHECK: [[IDX:%.+]] = load i32, i32* [[IDX_PTR]], + // CHECK: [[RL_RED1_PTR:%.+]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[RL]], i{{[0-9]+}} 0, i{{[0-9]+}} 0 + // CHECK: [[RL_RED1:%.+]] = load i8*, i8** [[RL_RED1_PTR]], + // CHECK: [[GLOBAL_RED1_PTR:%.+]] = getelementptr inbounds [[TEAM2_REDUCE_TY]], [[TEAM2_REDUCE_TY]]* [[GLOBAL]], i{{[0-9]+}} 0, i{{[0-9]+}} 0 + // CHECK: [[GLOBAL_RED1_IDX_PTR:%.+]] = getelementptr inbounds [{{1024|2048}} x i8], [{{1024|2048}} x i8]* [[GLOBAL_RED1_PTR]], i{{[0-9]+}} 0, i32 [[IDX]] + // CHECK: [[GLOBAL_RED1:%.+]] = load i8, i8* [[GLOBAL_RED1_IDX_PTR]], + // CHECK: store i8 [[GLOBAL_RED1]], i8* [[RL_RED1]], + // CHECK: [[RL_RED1_PTR:%.+]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[RL]], i{{[0-9]+}} 0, i{{[0-9]+}} 1 + // CHECK: [[RL_RED1_BC:%.+]] = load i8*, i8** [[RL_RED1_PTR]], + // CHECK: [[RL_RED1:%.+]] = bitcast i8* [[RL_RED1_BC]] to float* + // CHECK: [[GLOBAL_RED1_PTR:%.+]] = getelementptr inbounds [[TEAM2_REDUCE_TY]], [[TEAM2_REDUCE_TY]]* [[GLOBAL]], i{{[0-9]+}} 0, i{{[0-9]+}} 1 + // CHECK: [[GLOBAL_RED1_IDX_PTR:%.+]] = getelementptr inbounds [{{1024|2048}} x float], [{{1024|2048}} x float]* [[GLOBAL_RED1_PTR]], i{{[0-9]+}} 0, i32 [[IDX]] + // CHECK: [[GLOBAL_RED1:%.+]] = load float, float* [[GLOBAL_RED1_IDX_PTR]], + // CHECK: store float [[GLOBAL_RED1]], float* [[RL_RED1]], + // CHECK: ret void + + // CHECK: define internal void [[GLOBAL_TO_RED_LIST_RED]](i8*, i32, i8*) + // CHECK: [[GLOBAL_PTR:%.+]] = alloca i8*, + // CHECK: [[IDX_PTR:%.+]] = alloca i32, + // CHECK: [[RL_PTR:%.+]] = alloca i8*, + // CHECK: [[LOCAL_RL:%.+]] = alloca [2 x i8*], + // CHECK: store i8* %{{.+}}, i8** [[GLOBAL_PTR]], + // CHECK: store i32 %{{.+}}, i32* [[IDX_PTR]], + // CHECK: store i8* %{{.+}}, i8** [[RL_PTR]], + // CHECK: [[GLOBAL_BC:%.+]] = load i8*, i8** [[GLOBAL_PTR]], + // CHECK: [[GLOBAL:%.+]] = bitcast i8* [[GLOBAL_BC]] to [[TEAM2_REDUCE_TY]]* + // CHECK: [[IDX:%.+]] = load i32, i32* [[IDX_PTR]], + // CHECK: [[LOCAL_RL_RED1_PTR:%.+]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[LOCAL_RL]], i{{[0-9]+}} 0, i{{[0-9]+}} 0 + // CHECK: [[GLOBAL_RED1_PTR:%.+]] = getelementptr inbounds [[TEAM2_REDUCE_TY]], [[TEAM2_REDUCE_TY]]* [[GLOBAL]], i{{[0-9]+}} 0, i{{[0-9]+}} 0 + // CHECK: [[GLOBAL_RED1_IDX_PTR:%.+]] = getelementptr inbounds [{{1024|2048}} x i8], [{{1024|2048}} x i8]* [[GLOBAL_RED1_PTR]], i{{[0-9]+}} 0, i32 [[IDX]] + // CHECK: store i8* [[GLOBAL_RED1_IDX_PTR]], i8** [[LOCAL_RL_RED1_PTR]] + // CHECK: [[LOCAL_RL_RED1_PTR:%.+]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[LOCAL_RL]], i{{[0-9]+}} 0, i{{[0-9]+}} 1 + // CHECK: [[GLOBAL_RED1_PTR:%.+]] = getelementptr inbounds [[TEAM2_REDUCE_TY]], [[TEAM2_REDUCE_TY]]* [[GLOBAL]], i{{[0-9]+}} 0, i{{[0-9]+}} 1 + // CHECK: [[GLOBAL_RED1_IDX_PTR:%.+]] = getelementptr inbounds [{{1024|2048}} x float], [{{1024|2048}} x float]* [[GLOBAL_RED1_PTR]], i{{[0-9]+}} 0, i32 [[IDX]] + // CHECK: [[GLOBAL_RED1_IDX_PTR_BC:%.+]] = bitcast float* [[GLOBAL_RED1_IDX_PTR]] to i8* + // CHECK: store i8* [[GLOBAL_RED1_IDX_PTR_BC]], i8** [[LOCAL_RL_RED1_PTR]] + // CHECK: [[LOCAL_RL_BC:%.+]] = bitcast [2 x i8*]* [[LOCAL_RL]] to i8* + // CHECK: [[RL_BC:%.+]] = load i8*, i8** [[RL_PTR]], + // CHECK: call void [[REDUCTION_FUNC]](i8* [[RL_BC]], i8* [[LOCAL_RL_BC]]) + // CHECK: ret void + + // CHECK-LABEL: define {{.*}}void {{@__omp_offloading_.+template.+l54}}( // // CHECK: call void @__kmpc_spmd_kernel_init( // CHECK: call void @__kmpc_data_sharing_init_stack_spmd() - // CHECK: call void @__kmpc_get_team_static_memory(i16 1, i8* addrspacecast (i8 addrspace(3)* getelementptr inbounds ([[MEM_TY:%.+]], %{{.+}} addrspace(3)* [[KERNEL_RD:@.+]], i32 0, i32 0, i32 0) to i8*), i{{64|32}} {{8|16}}, i16 1, i8** addrspacecast (i8* addrspace(3)* [[KERNEL_PTR:@.+]] to i8**)) - // CHECK: [[PTR:%.+]] = load i8*, i8* addrspace(3)* [[KERNEL_PTR]], - // CHECK: [[GLOBAL_REC:%.+]] = bitcast i8* [[PTR]] to [[GLOB_REC_TY:%.+]]* - // CHECK-DAG: [[A_ADDR:%.+]] = getelementptr inbounds [[GLOB_REC_TY]], [[GLOB_REC_TY]]* [[GLOBAL_REC]], i32 0, i32 0 - // CHECK-DAG: [[B_ADDR:%.+]] = getelementptr inbounds [[GLOB_REC_TY]], [[GLOB_REC_TY]]* [[GLOBAL_REC]], i32 0, i32 1 - // CHECK: store i32 0, i32* [[A_ADDR]], - // CHECK: store i16 -32768, i16* [[B_ADDR]], + // CHECK-NOT: call void @__kmpc_get_team_static_memory + // CHECK: store i32 0, + // CHECK: store i32 0, i32* [[A_ADDR:%.+]], align + // CHECK: store i16 -32768, i16* [[B_ADDR:%.+]], align // CHECK: call void [[OUTLINED:@.+]](i32* {{.+}}, i32* {{.+}}, i32* [[A_ADDR]], i16* [[B_ADDR]]) - // CHECK: [[RET:%.+]] = call i32 @__kmpc_nvptx_teams_reduce_nowait_simple(%struct.ident_t* [[LOC:@.+]], i32 [[GTID:%.+]], [8 x i32]* [[LOCK:@.+]]) + // CHECK: [[GEP1:%.+]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[RED_LIST:%.+]], i{{[0-9]+}} 0, i{{[0-9]+}} 0 + // CHECK: [[BC:%.+]] = bitcast i32* [[A_ADDR]] to i8* + // CHECK: store i8* [[BC]], i8** [[GEP1]], + // CHECK: [[GEP2:%.+]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[RED_LIST:%.+]], i{{[0-9]+}} 0, i{{[0-9]+}} 1 + // CHECK: [[BC:%.+]] = bitcast i16* [[B_ADDR]] to i8* + // CHECK: store i8* [[BC]], i8** [[GEP2]], + // CHECK: [[BC_RED_LIST:%.+]] = bitcast [2 x i8*]* [[RED_LIST]] to i8* + // CHECK: [[RET:%.+]] = call i32 @__kmpc_nvptx_teams_reduce_nowait_v2(%struct.ident_t* [[LOC:@.+]], i32 [[GTID:%.+]], i8* bitcast ([[TEAMS_REDUCE_UNION_TY]]* [[TEAMS_RED_BUFFER]] to i8*), i32 {{1024|2048}}, i8* [[BC_RED_LIST]], void (i8*, i16, i16, i16)* [[SHUFFLE_AND_REDUCE:@.+]], void (i8*, i32)* [[INTER_WARP_COPY:@.+]], void (i8*, i32, i8*)* [[RED_LIST_TO_GLOBAL_COPY:@.+]], void (i8*, i32, i8*)* [[RED_LIST_TO_GLOBAL_RED:@.+]], void (i8*, i32, i8*)* [[GLOBAL_TO_RED_LIST_COPY:@.+]], void (i8*, i32, i8*)* [[GLOBAL_TO_RED_LIST_RED:@.+]]) // CHECK: [[COND:%.+]] = icmp eq i32 [[RET]], 1 // CHECK: br i1 [[COND]], label {{%?}}[[IFLABEL:.+]], label {{%?}}[[EXIT:.+]] // @@ -172,11 +745,10 @@ int bar(int n){ // CHECK: [[MAX_CONT]] // CHECK: [[B_MAX:%.+]] = phi i16 [ [[MAX1]], %[[DO_MAX]] ], [ [[MAX2]], %[[MAX_ELSE]] ] // CHECK: store i16 [[B_MAX]], i16* [[B_IN]], align - // CHECK: call void @__kmpc_nvptx_teams_end_reduce_nowait_simple(%struct.ident_t* [[LOC]], i32 [[GTID]], [8 x i32]* [[LOCK]]) + // CHECK: call void @__kmpc_nvptx_end_reduce_nowait(i32 [[GTID]]) // CHECK: br label %[[EXIT]] // // CHECK: [[EXIT]] - // CHECK: call void @__kmpc_restore_team_static_memory(i16 1, i16 1) // CHECK: call void @__kmpc_spmd_kernel_deinit_v2(i16 1) // CHECK: define internal void [[OUTLINED]](i32* noalias %{{.+}}, i32* noalias %{{.+}}, i32* dereferenceable{{.+}}, i16* dereferenceable{{.+}}) @@ -475,4 +1047,346 @@ int bar(int n){ // CHECK: [[READ_CONT]] // CHECK: ret + // + // Reduction function + // CHECK: define internal void [[REDUCTION_FUNC:@.+]](i8*, i8*) + // CHECK: [[VAR1_RHS_REF:%.+]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[RED_LIST_RHS:%.+]], i[[SZ]] 0, i[[SZ]] 0 + // CHECK: [[VAR1_RHS_VOID:%.+]] = load i8*, i8** [[VAR1_RHS_REF]], + // CHECK: [[VAR1_RHS:%.+]] = bitcast i8* [[VAR1_RHS_VOID]] to i32* + // + // CHECK: [[VAR1_LHS_REF:%.+]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[RED_LIST_LHS:%.+]], i[[SZ]] 0, i[[SZ]] 0 + // CHECK: [[VAR1_LHS_VOID:%.+]] = load i8*, i8** [[VAR1_LHS_REF]], + // CHECK: [[VAR1_LHS:%.+]] = bitcast i8* [[VAR1_LHS_VOID]] to i32* + // + // CHECK: [[VAR2_RHS_REF:%.+]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[RED_LIST_RHS]], i[[SZ]] 0, i[[SZ]] 1 + // CHECK: [[VAR2_RHS_VOID:%.+]] = load i8*, i8** [[VAR2_RHS_REF]], + // CHECK: [[VAR2_RHS:%.+]] = bitcast i8* [[VAR2_RHS_VOID]] to i16* + // + // CHECK: [[VAR2_LHS_REF:%.+]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[RED_LIST_LHS]], i[[SZ]] 0, i[[SZ]] 1 + // CHECK: [[VAR2_LHS_VOID:%.+]] = load i8*, i8** [[VAR2_LHS_REF]], + // CHECK: [[VAR2_LHS:%.+]] = bitcast i8* [[VAR2_LHS_VOID]] to i16* + // + // CHECK: [[VAR1_LHS_VAL:%.+]] = load i32, i32* [[VAR1_LHS]], + // CHECK: [[VAR1_RHS_VAL:%.+]] = load i32, i32* [[VAR1_RHS]], + // CHECK: [[OR:%.+]] = or i32 [[VAR1_LHS_VAL]], [[VAR1_RHS_VAL]] + // CHECK: store i32 [[OR]], i32* [[VAR1_LHS]], + // + // CHECK: [[VAR2_LHS_VAL16:%.+]] = load i16, i16* [[VAR2_LHS]], + // CHECK: [[VAR2_LHS_VAL:%.+]] = sext i16 [[VAR2_LHS_VAL16]] to i32 + // CHECK: [[VAR2_RHS_VAL16:%.+]] = load i16, i16* [[VAR2_RHS]], + // CHECK: [[VAR2_RHS_VAL:%.+]] = sext i16 [[VAR2_RHS_VAL16]] to i32 + // + // CHECK: [[CMP:%.+]] = icmp sgt i32 [[VAR2_LHS_VAL]], [[VAR2_RHS_VAL]] + // CHECK: br i1 [[CMP]], label {{%?}}[[DO_MAX:.+]], label {{%?}}[[MAX_ELSE:.+]] + // + // CHECK: [[DO_MAX]] + // CHECK: [[MAX1:%.+]] = load i16, i16* [[VAR2_LHS]], align + // CHECK: br label {{%?}}[[MAX_CONT:.+]] + // + // CHECK: [[MAX_ELSE]] + // CHECK: [[MAX2:%.+]] = load i16, i16* [[VAR2_RHS]], align + // CHECK: br label {{%?}}[[MAX_CONT]] + // + // CHECK: [[MAX_CONT]] + // CHECK: [[MAXV:%.+]] = phi i16 [ [[MAX1]], %[[DO_MAX]] ], [ [[MAX2]], %[[MAX_ELSE]] ] + // CHECK: store i16 [[MAXV]], i16* [[VAR2_LHS]], + // CHECK: ret void + + // + // Shuffle and reduce function + // CHECK: define internal void [[SHUFFLE_AND_REDUCE]](i8*, i16 {{.*}}, i16 {{.*}}, i16 {{.*}}) + // CHECK: [[REMOTE_RED_LIST:%.+]] = alloca [2 x i8*], align + // CHECK: [[REMOTE_ELT1:%.+]] = alloca i32 + // CHECK: [[REMOTE_ELT2:%.+]] = alloca i16 + // + // CHECK: [[LANEID:%.+]] = load i16, i16* {{.+}}, align + // CHECK: [[LANEOFFSET:%.+]] = load i16, i16* {{.+}}, align + // CHECK: [[ALGVER:%.+]] = load i16, i16* {{.+}}, align + // + // CHECK: [[ELT_REF:%.+]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[RED_LIST:%.+]], i[[SZ]] 0, i[[SZ]] 0 + // CHECK: [[ELT_VOID:%.+]] = load i8*, i8** [[ELT_REF]], + // CHECK: [[REMOTE_ELT_REF:%.+]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[REMOTE_RED_LIST:%.+]], i[[SZ]] 0, i[[SZ]] 0 + // CHECK: [[ELT:%.+]] = bitcast i8* [[ELT_VOID]] to i32* + // CHECK: [[ELT_VAL:%.+]] = load i32, i32* [[ELT]], align + // + // CHECK: [[WS32:%.+]] = call i32 @llvm.nvvm.read.ptx.sreg.warpsize() + // CHECK: [[WS:%.+]] = trunc i32 [[WS32]] to i16 + // CHECK: [[REMOTE_ELT1_VAL:%.+]] = call i32 @__kmpc_shuffle_int32(i32 [[ELT_VAL]], i16 [[LANEOFFSET]], i16 [[WS]]) + // + // CHECK: store i32 [[REMOTE_ELT1_VAL]], i32* [[REMOTE_ELT1]], align + // CHECK: [[REMOTE_ELT1C:%.+]] = bitcast i32* [[REMOTE_ELT1]] to i8* + // CHECK: store i8* [[REMOTE_ELT1C]], i8** [[REMOTE_ELT_REF]], align + // + // CHECK: [[ELT_REF:%.+]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[RED_LIST]], i[[SZ]] 0, i[[SZ]] 1 + // CHECK: [[ELT_VOID:%.+]] = load i8*, i8** [[ELT_REF]], + // CHECK: [[REMOTE_ELT_REF:%.+]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[REMOTE_RED_LIST]], i[[SZ]] 0, i[[SZ]] 1 + // CHECK: [[ELT:%.+]] = bitcast i8* [[ELT_VOID]] to i16* + // CHECK: [[ELT_VAL:%.+]] = load i16, i16* [[ELT]], align + // + // CHECK: [[ELT_CAST:%.+]] = sext i16 [[ELT_VAL]] to i32 + // CHECK: [[WS32:%.+]] = call i32 @llvm.nvvm.read.ptx.sreg.warpsize() + // CHECK: [[WS:%.+]] = trunc i32 [[WS32]] to i16 + // CHECK: [[REMOTE_ELT2_VAL32:%.+]] = call i32 @__kmpc_shuffle_int32(i32 [[ELT_CAST]], i16 [[LANEOFFSET]], i16 [[WS]]) + // CHECK: [[REMOTE_ELT2_VAL:%.+]] = trunc i32 [[REMOTE_ELT2_VAL32]] to i16 + // + // CHECK: store i16 [[REMOTE_ELT2_VAL]], i16* [[REMOTE_ELT2]], align + // CHECK: [[REMOTE_ELT2C:%.+]] = bitcast i16* [[REMOTE_ELT2]] to i8* + // CHECK: store i8* [[REMOTE_ELT2C]], i8** [[REMOTE_ELT_REF]], align + // + // Condition to reduce + // CHECK: [[CONDALG0:%.+]] = icmp eq i16 [[ALGVER]], 0 + // + // CHECK: [[COND1:%.+]] = icmp eq i16 [[ALGVER]], 1 + // CHECK: [[COND2:%.+]] = icmp ult i16 [[LANEID]], [[LANEOFFSET]] + // CHECK: [[CONDALG1:%.+]] = and i1 [[COND1]], [[COND2]] + // + // CHECK: [[COND3:%.+]] = icmp eq i16 [[ALGVER]], 2 + // CHECK: [[COND4:%.+]] = and i16 [[LANEID]], 1 + // CHECK: [[COND5:%.+]] = icmp eq i16 [[COND4]], 0 + // CHECK: [[COND6:%.+]] = and i1 [[COND3]], [[COND5]] + // CHECK: [[COND7:%.+]] = icmp sgt i16 [[LANEOFFSET]], 0 + // CHECK: [[CONDALG2:%.+]] = and i1 [[COND6]], [[COND7]] + // + // CHECK: [[COND8:%.+]] = or i1 [[CONDALG0]], [[CONDALG1]] + // CHECK: [[SHOULD_REDUCE:%.+]] = or i1 [[COND8]], [[CONDALG2]] + // CHECK: br i1 [[SHOULD_REDUCE]], label {{%?}}[[DO_REDUCE:.+]], label {{%?}}[[REDUCE_ELSE:.+]] + // + // CHECK: [[DO_REDUCE]] + // CHECK: [[RED_LIST1_VOID:%.+]] = bitcast [2 x i8*]* [[RED_LIST]] to i8* + // CHECK: [[RED_LIST2_VOID:%.+]] = bitcast [2 x i8*]* [[REMOTE_RED_LIST]] to i8* + // CHECK: call void [[REDUCTION_FUNC]](i8* [[RED_LIST1_VOID]], i8* [[RED_LIST2_VOID]]) + // CHECK: br label {{%?}}[[REDUCE_CONT:.+]] + // + // CHECK: [[REDUCE_ELSE]] + // CHECK: br label {{%?}}[[REDUCE_CONT]] + // + // CHECK: [[REDUCE_CONT]] + // Now check if we should just copy over the remote reduction list + // CHECK: [[COND1:%.+]] = icmp eq i16 [[ALGVER]], 1 + // CHECK: [[COND2:%.+]] = icmp uge i16 [[LANEID]], [[LANEOFFSET]] + // CHECK: [[SHOULD_COPY:%.+]] = and i1 [[COND1]], [[COND2]] + // CHECK: br i1 [[SHOULD_COPY]], label {{%?}}[[DO_COPY:.+]], label {{%?}}[[COPY_ELSE:.+]] + // + // CHECK: [[DO_COPY]] + // CHECK: [[REMOTE_ELT_REF:%.+]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[REMOTE_RED_LIST]], i[[SZ]] 0, i[[SZ]] 0 + // CHECK: [[REMOTE_ELT_VOID:%.+]] = load i8*, i8** [[REMOTE_ELT_REF]], + // CHECK: [[ELT_REF:%.+]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[RED_LIST]], i[[SZ]] 0, i[[SZ]] 0 + // CHECK: [[ELT_VOID:%.+]] = load i8*, i8** [[ELT_REF]], + // CHECK: [[REMOTE_ELT:%.+]] = bitcast i8* [[REMOTE_ELT_VOID]] to i32* + // CHECK: [[ELT:%.+]] = bitcast i8* [[ELT_VOID]] to i32* + // CHECK: [[REMOTE_ELT_VAL:%.+]] = load i32, i32* [[REMOTE_ELT]], align + // CHECK: store i32 [[REMOTE_ELT_VAL]], i32* [[ELT]], align + // + // CHECK: [[REMOTE_ELT_REF:%.+]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[REMOTE_RED_LIST]], i[[SZ]] 0, i[[SZ]] 1 + // CHECK: [[REMOTE_ELT_VOID:%.+]] = load i8*, i8** [[REMOTE_ELT_REF]], + // CHECK: [[ELT_REF:%.+]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[RED_LIST]], i[[SZ]] 0, i[[SZ]] 1 + // CHECK: [[ELT_VOID:%.+]] = load i8*, i8** [[ELT_REF]], + // CHECK: [[REMOTE_ELT:%.+]] = bitcast i8* [[REMOTE_ELT_VOID]] to i16* + // CHECK: [[ELT:%.+]] = bitcast i8* [[ELT_VOID]] to i16* + // CHECK: [[REMOTE_ELT_VAL:%.+]] = load i16, i16* [[REMOTE_ELT]], align + // CHECK: store i16 [[REMOTE_ELT_VAL]], i16* [[ELT]], align + // CHECK: br label {{%?}}[[COPY_CONT:.+]] + // + // CHECK: [[COPY_ELSE]] + // CHECK: br label {{%?}}[[COPY_CONT]] + // + // CHECK: [[COPY_CONT]] + // CHECK: void + + // + // Inter warp copy function + // CHECK: define internal void [[INTER_WARP_COPY]](i8*, i32) + // CHECK-DAG: [[LANEID:%.+]] = and i32 {{.+}}, 31 + // CHECK-DAG: [[WARPID:%.+]] = ashr i32 {{.+}}, 5 + // CHECK-DAG: [[RED_LIST:%.+]] = bitcast i8* {{.+}} to [[RLT]]* + // CHECK: call void @__kmpc_barrier(%struct.ident_t* @ + // CHECK: [[IS_WARP_MASTER:%.+]] = icmp eq i32 [[LANEID]], 0 + // CHECK: br i1 [[IS_WARP_MASTER]], label {{%?}}[[DO_COPY:.+]], label {{%?}}[[COPY_ELSE:.+]] + // + // [[DO_COPY]] + // CHECK: [[ELT_REF:%.+]] = getelementptr inbounds [[RLT]], [[RLT]]* [[RED_LIST]], i{{32|64}} 0, i{{32|64}} 0 + // CHECK: [[ELT_VOID:%.+]] = load i8*, i8** [[ELT_REF]], + // CHECK: [[ELT:%.+]] = bitcast i8* [[ELT_VOID]] to i32* + // + // CHECK: [[MEDIUM_ELT:%.+]] = getelementptr inbounds [32 x i32], [32 x i32] addrspace([[SHARED_ADDRSPACE]])* [[TRANSFER_STORAGE]], i64 0, i32 [[WARPID]] + // CHECK: [[ELT_VAL:%.+]] = load i32, i32* [[ELT]], align + // CHECK: store volatile i32 [[ELT_VAL]], i32 addrspace([[SHARED_ADDRSPACE]])* [[MEDIUM_ELT]], align + // CHECK: br label {{%?}}[[COPY_CONT:.+]] + // + // CHECK: [[COPY_ELSE]] + // CHECK: br label {{%?}}[[COPY_CONT]] + // + // Barrier after copy to shared memory storage medium. + // CHECK: [[COPY_CONT]] + // CHECK: call void @__kmpc_barrier(%struct.ident_t* @ + // CHECK: [[ACTIVE_WARPS:%.+]] = load i32, i32* + // + // Read into warp 0. + // CHECK: [[IS_W0_ACTIVE_THREAD:%.+]] = icmp ult i32 [[TID:%.+]], [[ACTIVE_WARPS]] + // CHECK: br i1 [[IS_W0_ACTIVE_THREAD]], label {{%?}}[[DO_READ:.+]], label {{%?}}[[READ_ELSE:.+]] + // + // CHECK: [[DO_READ]] + // CHECK: [[MEDIUM_ELT:%.+]] = getelementptr inbounds [32 x i32], [32 x i32] addrspace([[SHARED_ADDRSPACE]])* [[TRANSFER_STORAGE]], i64 0, i32 [[TID]] + // CHECK: [[ELT_REF:%.+]] = getelementptr inbounds [[RLT]], [[RLT]]* [[RED_LIST:%.+]], i{{32|64}} 0, i{{32|64}} 0 + // CHECK: [[ELT_VOID:%.+]] = load i8*, i8** [[ELT_REF]], + // CHECK: [[ELT:%.+]] = bitcast i8* [[ELT_VOID]] to i32* + // CHECK: [[MEDIUM_ELT_VAL:%.+]] = load volatile i32, i32 addrspace([[SHARED_ADDRSPACE]])* [[MEDIUM_ELT]], align + // CHECK: store i32 [[MEDIUM_ELT_VAL]], i32* [[ELT]], align + // CHECK: br label {{%?}}[[READ_CONT:.+]] + // + // CHECK: [[READ_ELSE]] + // CHECK: br label {{%?}}[[READ_CONT]] + // + // CHECK: [[READ_CONT]] + // CHECK: call void @__kmpc_barrier(%struct.ident_t* @ + // CHECK: [[IS_WARP_MASTER:%.+]] = icmp eq i32 [[LANEID]], 0 + // CHECK: br i1 [[IS_WARP_MASTER]], label {{%?}}[[DO_COPY:.+]], label {{%?}}[[COPY_ELSE:.+]] + // + // [[DO_COPY]] + // CHECK: [[ELT_REF:%.+]] = getelementptr inbounds [[RLT]], [[RLT]]* [[RED_LIST]], i{{32|64}} 0, i{{32|64}} 1 + // CHECK: [[ELT_VOID:%.+]] = load i8*, i8** [[ELT_REF]], + // CHECK: [[ELT:%.+]] = bitcast i8* [[ELT_VOID]] to i16* + // + // CHECK: [[MEDIUM_ELT32:%.+]] = getelementptr inbounds [32 x i32], [32 x i32] addrspace([[SHARED_ADDRSPACE]])* [[TRANSFER_STORAGE]], i64 0, i32 [[WARPID]] + // CHECK: [[MEDIUM_ELT:%.+]] = bitcast i32 addrspace([[SHARED_ADDRSPACE]])* [[MEDIUM_ELT32]] to i16 addrspace([[SHARED_ADDRSPACE]])* + // CHECK: [[ELT_VAL:%.+]] = load i16, i16* [[ELT]], align + // CHECK: store volatile i16 [[ELT_VAL]], i16 addrspace([[SHARED_ADDRSPACE]])* [[MEDIUM_ELT]], align + // CHECK: br label {{%?}}[[COPY_CONT:.+]] + // + // CHECK: [[COPY_ELSE]] + // CHECK: br label {{%?}}[[COPY_CONT]] + // + // Barrier after copy to shared memory storage medium. + // CHECK: [[COPY_CONT]] + // CHECK: call void @__kmpc_barrier(%struct.ident_t* @ + // CHECK: [[ACTIVE_WARPS:%.+]] = load i32, i32* + // + // Read into warp 0. + // CHECK: [[IS_W0_ACTIVE_THREAD:%.+]] = icmp ult i32 [[TID:%.+]], [[ACTIVE_WARPS]] + // CHECK: br i1 [[IS_W0_ACTIVE_THREAD]], label {{%?}}[[DO_READ:.+]], label {{%?}}[[READ_ELSE:.+]] + // + // CHECK: [[DO_READ]] + // CHECK: [[MEDIUM_ELT32:%.+]] = getelementptr inbounds [32 x i32], [32 x i32] addrspace([[SHARED_ADDRSPACE]])* [[TRANSFER_STORAGE]], i64 0, i32 [[TID]] + // CHECK: [[MEDIUM_ELT:%.+]] = bitcast i32 addrspace([[SHARED_ADDRSPACE]])* [[MEDIUM_ELT32]] to i16 addrspace([[SHARED_ADDRSPACE]])* + // CHECK: [[ELT_REF:%.+]] = getelementptr inbounds [[RLT]], [[RLT]]* [[RED_LIST:%.+]], i{{32|64}} 0, i{{32|64}} 1 + // CHECK: [[ELT_VOID:%.+]] = load i8*, i8** [[ELT_REF]], + // CHECK: [[ELT:%.+]] = bitcast i8* [[ELT_VOID]] to i16* + // CHECK: [[MEDIUM_ELT_VAL:%.+]] = load volatile i16, i16 addrspace([[SHARED_ADDRSPACE]])* [[MEDIUM_ELT]], align + // CHECK: store i16 [[MEDIUM_ELT_VAL]], i16* [[ELT]], align + // CHECK: br label {{%?}}[[READ_CONT:.+]] + // + // CHECK: [[READ_ELSE]] + // CHECK: br label {{%?}}[[READ_CONT]] + // + // CHECK: [[READ_CONT]] + // CHECK: ret + + // CHECK: define internal void [[RED_LIST_TO_GLOBAL_COPY]](i8*, i32, i8*) + // CHECK: [[GLOBAL_PTR:%.+]] = alloca i8*, + // CHECK: [[IDX_PTR:%.+]] = alloca i32, + // CHECK: [[RL_PTR:%.+]] = alloca i8*, + // CHECK: store i8* %{{.+}}, i8** [[GLOBAL_PTR]], + // CHECK: store i32 %{{.+}}, i32* [[IDX_PTR]], + // CHECK: store i8* %{{.+}}, i8** [[RL_PTR]], + // CHECK: [[RL_BC:%.+]] = load i8*, i8** [[RL_PTR]], + // CHECK: [[RL:%.+]] = bitcast i8* [[RL_BC]] to [2 x i8*]* + // CHECK: [[GLOBAL_BC:%.+]] = load i8*, i8** [[GLOBAL_PTR]], + // CHECK: [[GLOBAL:%.+]] = bitcast i8* [[GLOBAL_BC]] to [[TEAM3_REDUCE_TY]]* + // CHECK: [[IDX:%.+]] = load i32, i32* [[IDX_PTR]], + // CHECK: [[RL_RED1_PTR:%.+]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[RL]], i{{[0-9]+}} 0, i{{[0-9]+}} 0 + // CHECK: [[RL_RED1_BC:%.+]] = load i8*, i8** [[RL_RED1_PTR]], + // CHECK: [[RL_RED1:%.+]] = bitcast i8* [[RL_RED1_BC]] to i32* + // CHECK: [[GLOBAL_RED1_PTR:%.+]] = getelementptr inbounds [[TEAM3_REDUCE_TY]], [[TEAM3_REDUCE_TY]]* [[GLOBAL]], i{{[0-9]+}} 0, i{{[0-9]+}} 0 + // CHECK: [[GLOBAL_RED1_IDX_PTR:%.+]] = getelementptr inbounds [{{1024|2048}} x i32], [{{1024|2048}} x i32]* [[GLOBAL_RED1_PTR]], i{{[0-9]+}} 0, i32 [[IDX]] + // CHECK: [[LOC_RED1:%.+]] = load i32, i32* [[RL_RED1]], + // CHECK: store i32 [[LOC_RED1]], i32* [[GLOBAL_RED1_IDX_PTR]], + // CHECK: [[RL_RED1_PTR:%.+]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[RL]], i{{[0-9]+}} 0, i{{[0-9]+}} 1 + // CHECK: [[RL_RED1_BC:%.+]] = load i8*, i8** [[RL_RED1_PTR]], + // CHECK: [[RL_RED1:%.+]] = bitcast i8* [[RL_RED1_BC]] to i16* + // CHECK: [[GLOBAL_RED1_PTR:%.+]] = getelementptr inbounds [[TEAM3_REDUCE_TY]], [[TEAM3_REDUCE_TY]]* [[GLOBAL]], i{{[0-9]+}} 0, i{{[0-9]+}} 1 + // CHECK: [[GLOBAL_RED1_IDX_PTR:%.+]] = getelementptr inbounds [{{1024|2048}} x i16], [{{1024|2048}} x i16]* [[GLOBAL_RED1_PTR]], i{{[0-9]+}} 0, i32 [[IDX]] + // CHECK: [[LOC_RED1:%.+]] = load i16, i16* [[RL_RED1]], + // CHECK: store i16 [[LOC_RED1]], i16* [[GLOBAL_RED1_IDX_PTR]], + // CHECK: ret void + + // CHECK: define internal void [[RED_LIST_TO_GLOBAL_RED]](i8*, i32, i8*) + // CHECK: [[GLOBAL_PTR:%.+]] = alloca i8*, + // CHECK: [[IDX_PTR:%.+]] = alloca i32, + // CHECK: [[RL_PTR:%.+]] = alloca i8*, + // CHECK: [[LOCAL_RL:%.+]] = alloca [2 x i8*], + // CHECK: store i8* %{{.+}}, i8** [[GLOBAL_PTR]], + // CHECK: store i32 %{{.+}}, i32* [[IDX_PTR]], + // CHECK: store i8* %{{.+}}, i8** [[RL_PTR]], + // CHECK: [[GLOBAL_BC:%.+]] = load i8*, i8** [[GLOBAL_PTR]], + // CHECK: [[GLOBAL:%.+]] = bitcast i8* [[GLOBAL_BC]] to [[TEAM3_REDUCE_TY]]* + // CHECK: [[IDX:%.+]] = load i32, i32* [[IDX_PTR]], + // CHECK: [[LOCAL_RL_RED1_PTR:%.+]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[LOCAL_RL]], i{{[0-9]+}} 0, i{{[0-9]+}} 0 + // CHECK: [[GLOBAL_RED1_PTR:%.+]] = getelementptr inbounds [[TEAM3_REDUCE_TY]], [[TEAM3_REDUCE_TY]]* [[GLOBAL]], i{{[0-9]+}} 0, i{{[0-9]+}} 0 + // CHECK: [[GLOBAL_RED1_IDX_PTR:%.+]] = getelementptr inbounds [{{1024|2048}} x i32], [{{1024|2048}} x i32]* [[GLOBAL_RED1_PTR]], i{{[0-9]+}} 0, i32 [[IDX]] + // CHECK: [[GLOBAL_RED1_IDX_PTR_BC:%.+]] = bitcast i32* [[GLOBAL_RED1_IDX_PTR]] to i8* + // CHECK: store i8* [[GLOBAL_RED1_IDX_PTR_BC]], i8** [[LOCAL_RL_RED1_PTR]] + // CHECK: [[LOCAL_RL_RED1_PTR:%.+]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[LOCAL_RL]], i{{[0-9]+}} 0, i{{[0-9]+}} 1 + // CHECK: [[GLOBAL_RED1_PTR:%.+]] = getelementptr inbounds [[TEAM3_REDUCE_TY]], [[TEAM3_REDUCE_TY]]* [[GLOBAL]], i{{[0-9]+}} 0, i{{[0-9]+}} 1 + // CHECK: [[GLOBAL_RED1_IDX_PTR:%.+]] = getelementptr inbounds [{{1024|2048}} x i16], [{{1024|2048}} x i16]* [[GLOBAL_RED1_PTR]], i{{[0-9]+}} 0, i32 [[IDX]] + // CHECK: [[GLOBAL_RED1_IDX_PTR_BC:%.+]] = bitcast i16* [[GLOBAL_RED1_IDX_PTR]] to i8* + // CHECK: store i8* [[GLOBAL_RED1_IDX_PTR_BC]], i8** [[LOCAL_RL_RED1_PTR]] + // CHECK: [[LOCAL_RL_BC:%.+]] = bitcast [2 x i8*]* [[LOCAL_RL]] to i8* + // CHECK: [[RL_BC:%.+]] = load i8*, i8** [[RL_PTR]], + // CHECK: call void [[REDUCTION_FUNC]](i8* [[LOCAL_RL_BC]], i8* [[RL_BC]]) + // CHECK: ret void + + // CHECK: define internal void [[GLOBAL_TO_RED_LIST_COPY]](i8*, i32, i8*) + // CHECK: [[GLOBAL_PTR:%.+]] = alloca i8*, + // CHECK: [[IDX_PTR:%.+]] = alloca i32, + // CHECK: [[RL_PTR:%.+]] = alloca i8*, + // CHECK: store i8* %{{.+}}, i8** [[GLOBAL_PTR]], + // CHECK: store i32 %{{.+}}, i32* [[IDX_PTR]], + // CHECK: store i8* %{{.+}}, i8** [[RL_PTR]], + // CHECK: [[RL_BC:%.+]] = load i8*, i8** [[RL_PTR]], + // CHECK: [[RL:%.+]] = bitcast i8* [[RL_BC]] to [2 x i8*]* + // CHECK: [[GLOBAL_BC:%.+]] = load i8*, i8** [[GLOBAL_PTR]], + // CHECK: [[GLOBAL:%.+]] = bitcast i8* [[GLOBAL_BC]] to [[TEAM3_REDUCE_TY]]* + // CHECK: [[IDX:%.+]] = load i32, i32* [[IDX_PTR]], + // CHECK: [[RL_RED1_PTR:%.+]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[RL]], i{{[0-9]+}} 0, i{{[0-9]+}} 0 + // CHECK: [[RL_RED1_BC:%.+]] = load i8*, i8** [[RL_RED1_PTR]], + // CHECK: [[RL_RED1:%.+]] = bitcast i8* [[RL_RED1_BC]] to i32* + // CHECK: [[GLOBAL_RED1_PTR:%.+]] = getelementptr inbounds [[TEAM3_REDUCE_TY]], [[TEAM3_REDUCE_TY]]* [[GLOBAL]], i{{[0-9]+}} 0, i{{[0-9]+}} 0 + // CHECK: [[GLOBAL_RED1_IDX_PTR:%.+]] = getelementptr inbounds [{{1024|2048}} x i32], [{{1024|2048}} x i32]* [[GLOBAL_RED1_PTR]], i{{[0-9]+}} 0, i32 [[IDX]] + // CHECK: [[GLOBAL_RED1:%.+]] = load i32, i32* [[GLOBAL_RED1_IDX_PTR]], + // CHECK: store i32 [[GLOBAL_RED1]], i32* [[RL_RED1]], + // CHECK: [[RL_RED1_PTR:%.+]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[RL]], i{{[0-9]+}} 0, i{{[0-9]+}} 1 + // CHECK: [[RL_RED1_BC:%.+]] = load i8*, i8** [[RL_RED1_PTR]], + // CHECK: [[RL_RED1:%.+]] = bitcast i8* [[RL_RED1_BC]] to i16* + // CHECK: [[GLOBAL_RED1_PTR:%.+]] = getelementptr inbounds [[TEAM3_REDUCE_TY]], [[TEAM3_REDUCE_TY]]* [[GLOBAL]], i{{[0-9]+}} 0, i{{[0-9]+}} 1 + // CHECK: [[GLOBAL_RED1_IDX_PTR:%.+]] = getelementptr inbounds [{{1024|2048}} x i16], [{{1024|2048}} x i16]* [[GLOBAL_RED1_PTR]], i{{[0-9]+}} 0, i32 [[IDX]] + // CHECK: [[GLOBAL_RED1:%.+]] = load i16, i16* [[GLOBAL_RED1_IDX_PTR]], + // CHECK: store i16 [[GLOBAL_RED1]], i16* [[RL_RED1]], + // CHECK: ret void + + // CHECK: define internal void [[GLOBAL_TO_RED_LIST_RED]](i8*, i32, i8*) + // CHECK: [[GLOBAL_PTR:%.+]] = alloca i8*, + // CHECK: [[IDX_PTR:%.+]] = alloca i32, + // CHECK: [[RL_PTR:%.+]] = alloca i8*, + // CHECK: [[LOCAL_RL:%.+]] = alloca [2 x i8*], + // CHECK: store i8* %{{.+}}, i8** [[GLOBAL_PTR]], + // CHECK: store i32 %{{.+}}, i32* [[IDX_PTR]], + // CHECK: store i8* %{{.+}}, i8** [[RL_PTR]], + // CHECK: [[GLOBAL_BC:%.+]] = load i8*, i8** [[GLOBAL_PTR]], + // CHECK: [[GLOBAL:%.+]] = bitcast i8* [[GLOBAL_BC]] to [[TEAM3_REDUCE_TY]]* + // CHECK: [[IDX:%.+]] = load i32, i32* [[IDX_PTR]], + // CHECK: [[LOCAL_RL_RED1_PTR:%.+]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[LOCAL_RL]], i{{[0-9]+}} 0, i{{[0-9]+}} 0 + // CHECK: [[GLOBAL_RED1_PTR:%.+]] = getelementptr inbounds [[TEAM3_REDUCE_TY]], [[TEAM3_REDUCE_TY]]* [[GLOBAL]], i{{[0-9]+}} 0, i{{[0-9]+}} 0 + // CHECK: [[GLOBAL_RED1_IDX_PTR:%.+]] = getelementptr inbounds [{{1024|2048}} x i32], [{{1024|2048}} x i32]* [[GLOBAL_RED1_PTR]], i{{[0-9]+}} 0, i32 [[IDX]] + // CHECK: [[GLOBAL_RED1_IDX_PTR_BC:%.+]] = bitcast i32* [[GLOBAL_RED1_IDX_PTR]] to i8* + // CHECK: store i8* [[GLOBAL_RED1_IDX_PTR_BC]], i8** [[LOCAL_RL_RED1_PTR]] + // CHECK: [[LOCAL_RL_RED1_PTR:%.+]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[LOCAL_RL]], i{{[0-9]+}} 0, i{{[0-9]+}} 1 + // CHECK: [[GLOBAL_RED1_PTR:%.+]] = getelementptr inbounds [[TEAM3_REDUCE_TY]], [[TEAM3_REDUCE_TY]]* [[GLOBAL]], i{{[0-9]+}} 0, i{{[0-9]+}} 1 + // CHECK: [[GLOBAL_RED1_IDX_PTR:%.+]] = getelementptr inbounds [{{1024|2048}} x i16], [{{1024|2048}} x i16]* [[GLOBAL_RED1_PTR]], i{{[0-9]+}} 0, i32 [[IDX]] + // CHECK: [[GLOBAL_RED1_IDX_PTR_BC:%.+]] = bitcast i16* [[GLOBAL_RED1_IDX_PTR]] to i8* + // CHECK: store i8* [[GLOBAL_RED1_IDX_PTR_BC]], i8** [[LOCAL_RL_RED1_PTR]] + // CHECK: [[LOCAL_RL_BC:%.+]] = bitcast [2 x i8*]* [[LOCAL_RL]] to i8* + // CHECK: [[RL_BC:%.+]] = load i8*, i8** [[RL_PTR]], + // CHECK: call void [[REDUCTION_FUNC]](i8* [[RL_BC]], i8* [[LOCAL_RL_BC]]) + // CHECK: ret void + #endif diff --git a/clang/test/OpenMP/nvptx_unsupported_type_codegen.cpp b/clang/test/OpenMP/nvptx_unsupported_type_codegen.cpp new file mode 100644 index 0000000000000..61accc3c72bea --- /dev/null +++ b/clang/test/OpenMP/nvptx_unsupported_type_codegen.cpp @@ -0,0 +1,64 @@ +// Test target codegen - host bc file has to be created first. +// RUN: %clang_cc1 -verify -fopenmp -x c++ -triple x86_64-unknown-linux -fopenmp-targets=nvptx64-nvidia-cuda -emit-llvm-bc %s -o %t-host.bc +// RUN: %clang_cc1 -verify -fopenmp -x c++ -triple nvptx64-unknown-unknown -fopenmp-targets=nvptx64-nvidia-cuda -aux-triple x86_64-unknown-linux -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-host.bc -o - | FileCheck %s +// expected-no-diagnostics + +// CHECK-DAG: [[T:%.+]] = type {{.+}}, fp128, +// CHECK-DAG: [[T1:%.+]] = type {{.+}}, i128, i128, + +struct T { + char a; + __float128 f; + char c; + T() : a(12), f(15) {} + T &operator+(T &b) { f += b.a; return *this;} +}; + +struct T1 { + char a; + __int128 f; + __int128 f1; + char c; + T1() : a(12), f(15) {} + T1 &operator+(T1 &b) { f += b.a; return *this;} +}; + +#pragma omp declare target +T a = T(); +T f = a; +// CHECK: define void @{{.+}}foo{{.+}}([[T]]* byval align {{.+}}) +void foo(T a = T()) { + return; +} +// CHECK: define [6 x i64] @{{.+}}bar{{.+}}() +T bar() { +// CHECK: bitcast [[T]]* %{{.+}} to [6 x i64]* +// CHECK-NEXT: load [6 x i64], [6 x i64]* %{{.+}}, +// CHECK-NEXT: ret [6 x i64] + return T(); +} +// CHECK: define void @{{.+}}baz{{.+}}() +void baz() { +// CHECK: call [6 x i64] @{{.+}}bar{{.+}}() +// CHECK-NEXT: bitcast [[T]]* %{{.+}} to [6 x i64]* +// CHECK-NEXT: store [6 x i64] %{{.+}}, [6 x i64]* %{{.+}}, + T t = bar(); +} +T1 a1 = T1(); +T1 f1 = a1; +// CHECK: define void @{{.+}}foo1{{.+}}([[T1]]* byval align {{.+}}) +void foo1(T1 a = T1()) { + return; +} +// CHECK: define [[T1]] @{{.+}}bar1{{.+}}() +T1 bar1() { +// CHECK: load [[T1]], [[T1]]* +// CHECK-NEXT: ret [[T1]] + return T1(); +} +// CHECK: define void @{{.+}}baz1{{.+}}() +void baz1() { +// CHECK: call [[T1]] @{{.+}}bar1{{.+}}() + T1 t = bar1(); +} +#pragma omp end declare target diff --git a/clang/test/OpenMP/nvptx_unsupported_type_messages.cpp b/clang/test/OpenMP/nvptx_unsupported_type_messages.cpp new file mode 100644 index 0000000000000..6e0fa3b1d5b44 --- /dev/null +++ b/clang/test/OpenMP/nvptx_unsupported_type_messages.cpp @@ -0,0 +1,47 @@ +// Test target codegen - host bc file has to be created first. +// RUN: %clang_cc1 -fopenmp -x c++ -triple x86_64-unknown-linux -fopenmp-targets=nvptx64-nvidia-cuda -emit-llvm-bc %s -o %t-host.bc +// RUN: %clang_cc1 -verify -fopenmp -x c++ -triple nvptx64-unknown-unknown -fopenmp-targets=nvptx64-nvidia-cuda %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-host.bc -fsyntax-only + +struct T { + char a; + __float128 f; + char c; + T() : a(12), f(15) {} + T &operator+(T &b) { f += b.a; return *this;} // expected-error {{'__float128' is not supported on this target}} +}; + +struct T1 { + char a; + __int128 f; + __int128 f1; + char c; + T1() : a(12), f(15) {} + T1 &operator/(T1 &b) { f /= b.a; return *this;} +}; + +#pragma omp declare target +T a = T(); +T f = a; +void foo(T a = T()) { + a = a + f; // expected-note {{called by 'foo'}} + return; +} +T bar() { + return T(); +} +void baz() { + T t = bar(); +} +T1 a1 = T1(); +T1 f1 = a1; +void foo1(T1 a = T1()) { + a = a / f1; + return; +} +T1 bar1() { + return T1(); +} +void baz1() { + T1 t = bar1(); +} +#pragma omp end declare target diff --git a/clang/test/OpenMP/nvptx_va_arg_delayed_diags.c b/clang/test/OpenMP/nvptx_va_arg_delayed_diags.c new file mode 100644 index 0000000000000..3420884d97b24 --- /dev/null +++ b/clang/test/OpenMP/nvptx_va_arg_delayed_diags.c @@ -0,0 +1,40 @@ +// RUN: %clang_cc1 -fopenmp -x c -triple i386-unknown-unknown -fopenmp-targets=nvptx-nvidia-cuda -emit-llvm-bc %s -o %t-x86-host.bc +// RUN: %clang_cc1 -verify -fopenmp -x c -triple nvptx-unknown-unknown -fopenmp-targets=nvptx-nvidia-cuda %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -fsyntax-only +// RUN: %clang_cc1 -verify -DDIAGS -DIMMEDIATE -fopenmp -x c -triple nvptx-unknown-unknown -fopenmp-targets=nvptx-nvidia-cuda %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -fsyntax-only +// RUN: %clang_cc1 -verify -DDIAGS -DDELAYED -fopenmp -x c -triple nvptx-unknown-unknown -fopenmp-targets=nvptx-nvidia-cuda %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -fsyntax-only +// REQUIRES: x86-registered-target +// REQUIRES: nvptx-registered-target + +#ifndef DIAGS +// expected-no-diagnostics +#endif // DIAGS + +#ifdef IMMEDIATE +#pragma omp declare target +#endif //IMMEDIATE +void t1(int r, ...) { +#ifdef DIAGS +// expected-error@+4 {{CUDA device code does not support va_arg}} +#endif // DIAGS + __builtin_va_list list; + __builtin_va_start(list, r); + (void)__builtin_va_arg(list, int); + __builtin_va_end(list); +} + +#ifdef IMMEDIATE +#pragma omp end declare target +#endif //IMMEDIATE + +int main() { +#ifdef DELAYED +#pragma omp target +#endif // DELAYED + { +#ifdef DELAYED +// expected-note@+2 {{called by 'main'}} +#endif // DELAYED + t1(0); + } + return 0; +} diff --git a/clang/test/OpenMP/target_depend_codegen.cpp b/clang/test/OpenMP/target_depend_codegen.cpp index 588ab9757e4ab..2ce7cbe559c07 100644 --- a/clang/test/OpenMP/target_depend_codegen.cpp +++ b/clang/test/OpenMP/target_depend_codegen.cpp @@ -98,7 +98,7 @@ int foo(int n) { // CHECK: getelementptr inbounds [4 x %struct.kmp_depend_info], [4 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 1 // CHECK: getelementptr inbounds [4 x %struct.kmp_depend_info], [4 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 2 // CHECK: getelementptr inbounds [4 x %struct.kmp_depend_info], [4 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 3 - // CHECK: [[DEP_START:%.+]] = getelementptr inbounds [4 x %struct.kmp_depend_info], [4 x %struct.kmp_depend_info]* %{{.+}}, i32 0, i32 0 + // CHECK: [[DEP_START:%.+]] = getelementptr inbounds [4 x %struct.kmp_depend_info], [4 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 0 // CHECK: [[DEP:%.+]] = bitcast %struct.kmp_depend_info* [[DEP_START]] to i8* // CHECK: call void @__kmpc_omp_wait_deps(%struct.ident_t* @0, i32 [[GTID]], i32 4, i8* [[DEP]], i32 0, i8* null) // CHECK: call void @__kmpc_omp_task_begin_if0(%struct.ident_t* @0, i32 [[GTID]], i8* [[TASK]]) @@ -138,7 +138,7 @@ int foo(int n) { // CHECK: getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 0 // CHECK: getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 1 // CHECK: getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 2 - // CHECK: [[DEP_START:%.+]] = getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* %{{.+}}, i32 0, i32 0 + // CHECK: [[DEP_START:%.+]] = getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 0 // CHECK: [[DEP:%.+]] = bitcast %struct.kmp_depend_info* [[DEP_START]] to i8* // CHECK: call i32 @__kmpc_omp_task_with_deps(%struct.ident_t* @0, i32 [[GTID]], i8* [[TASK]], i32 3, i8* [[DEP]], i32 0, i8* null) // CHECK: br label %[[EXIT:.+]] @@ -154,7 +154,7 @@ int foo(int n) { // CHECK: getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 0 // CHECK: getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 1 // CHECK: getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 2 - // CHECK: [[DEP_START:%.+]] = getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* %{{.+}}, i32 0, i32 0 + // CHECK: [[DEP_START:%.+]] = getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 0 // CHECK: [[DEP:%.+]] = bitcast %struct.kmp_depend_info* [[DEP_START]] to i8* // CHECK: call i32 @__kmpc_omp_task_with_deps(%struct.ident_t* @0, i32 [[GTID]], i8* [[TASK]], i32 3, i8* [[DEP]], i32 0, i8* null) // CHECK: br label %[[EXIT:.+]] @@ -170,7 +170,7 @@ int foo(int n) { // CHECK: [[TASK:%.+]] = call i8* @__kmpc_omp_task_alloc(%struct.ident_t* @0, i32 [[GTID]], i32 1, i[[SZ]] {{48|24}}, i[[SZ]] 4, i32 (i32, i8*)* bitcast (i32 (i32, %{{.+}}*)* [[TASK_ENTRY2:@.+]] to i32 (i32, i8*)*)) // CHECK: [[BC_TASK:%.+]] = bitcast i8* [[TASK]] to [[TASK_TY2:%.+]]* // CHECK: getelementptr inbounds [1 x %struct.kmp_depend_info], [1 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 0 - // CHECK: [[DEP_START:%.+]] = getelementptr inbounds [1 x %struct.kmp_depend_info], [1 x %struct.kmp_depend_info]* %{{.+}}, i32 0, i32 0 + // CHECK: [[DEP_START:%.+]] = getelementptr inbounds [1 x %struct.kmp_depend_info], [1 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 0 // CHECK: [[DEP:%.+]] = bitcast %struct.kmp_depend_info* [[DEP_START]] to i8* // CHECK: call void @__kmpc_omp_wait_deps(%struct.ident_t* @0, i32 [[GTID]], i32 1, i8* [[DEP]], i32 0, i8* null) // CHECK: call void @__kmpc_omp_task_begin_if0(%struct.ident_t* @0, i32 [[GTID]], i8* [[TASK]]) diff --git a/clang/test/OpenMP/target_enter_data_depend_codegen.cpp b/clang/test/OpenMP/target_enter_data_depend_codegen.cpp index e17150d576777..6b04a20966ffd 100644 --- a/clang/test/OpenMP/target_enter_data_depend_codegen.cpp +++ b/clang/test/OpenMP/target_enter_data_depend_codegen.cpp @@ -90,7 +90,7 @@ void foo(int arg) { // CK1: store i[[sz]] 4, i[[sz]]* [[DEP_SIZE]], // CK1: [[DEP_ATTRS:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 2 // CK1: store i8 1, i8* [[DEP_ATTRS]] - // CK1: [[DEP:%.+]] = getelementptr inbounds [1 x %struct.kmp_depend_info], [1 x %struct.kmp_depend_info]* [[MAIN_DEP]], i32 0, i32 0 + // CK1: [[DEP:%.+]] = getelementptr inbounds [1 x %struct.kmp_depend_info], [1 x %struct.kmp_depend_info]* [[MAIN_DEP]], i[[sz]] 0, i[[sz]] 0 // CK1: [[BC:%.+]] = bitcast %struct.kmp_depend_info* [[DEP]] to i8* // CK1: = call i32 @__kmpc_omp_task_with_deps(%struct.ident_t* @{{.+}}, i32 %{{.+}}, i8* [[RES]], i32 1, i8* [[BC]], i32 0, i8* null) @@ -161,7 +161,7 @@ void foo(int arg) { // CK1: store i[[sz]] 800, i[[sz]]* [[DEP_SIZE]], // CK1: [[DEP_ATTRS:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 2 // CK1: store i8 3, i8* [[DEP_ATTRS]] - // CK1: [[DEP:%.+]] = getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* [[MAIN_DEP]], i32 0, i32 0 + // CK1: [[DEP:%.+]] = getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* [[MAIN_DEP]], i[[sz]] 0, i[[sz]] 0 // CK1: [[BC:%.+]] = bitcast %struct.kmp_depend_info* [[DEP]] to i8* // CK1: call void @__kmpc_omp_wait_deps(%struct.ident_t* @{{.+}}, i32 %{{.+}}, i32 3, i8* [[BC]], i32 0, i8* null) // CK1: call void @__kmpc_omp_task_begin_if0(%struct.ident_t* @{{.+}}, i32 %{{.+}}, i8* [[RES]]) @@ -239,7 +239,7 @@ void foo(int arg) { // CK1: store i[[sz]] 800, i[[sz]]* [[DEP_SIZE]], // CK1: [[DEP_ATTRS:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 2 // CK1: store i8 3, i8* [[DEP_ATTRS]] - // CK1: [[DEP:%.+]] = getelementptr inbounds [4 x %struct.kmp_depend_info], [4 x %struct.kmp_depend_info]* [[MAIN_DEP]], i32 0, i32 0 + // CK1: [[DEP:%.+]] = getelementptr inbounds [4 x %struct.kmp_depend_info], [4 x %struct.kmp_depend_info]* [[MAIN_DEP]], i[[sz]] 0, i[[sz]] 0 // CK1: [[BC:%.+]] = bitcast %struct.kmp_depend_info* [[DEP]] to i8* // CK1: call void @__kmpc_omp_wait_deps(%struct.ident_t* @{{.+}}, i32 %{{.+}}, i32 4, i8* [[BC]], i32 0, i8* null) // CK1: call void @__kmpc_omp_task_begin_if0(%struct.ident_t* @{{.+}}, i32 %{{.+}}, i8* [[RES]]) @@ -320,7 +320,7 @@ void foo(int arg) { // CK1: store i[[sz]] 4, i[[sz]]* [[DEP_SIZE]], // CK1: [[DEP_ATTRS:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 2 // CK1: store i8 1, i8* [[DEP_ATTRS]] - // CK1: [[DEP:%.+]] = getelementptr inbounds [5 x %struct.kmp_depend_info], [5 x %struct.kmp_depend_info]* [[MAIN_DEP]], i32 0, i32 0 + // CK1: [[DEP:%.+]] = getelementptr inbounds [5 x %struct.kmp_depend_info], [5 x %struct.kmp_depend_info]* [[MAIN_DEP]], i[[sz]] 0, i[[sz]] 0 // CK1: [[BC:%.+]] = bitcast %struct.kmp_depend_info* [[DEP]] to i8* // CK1: call void @__kmpc_omp_wait_deps(%struct.ident_t* @{{.+}}, i32 %{{.+}}, i32 5, i8* [[BC]], i32 0, i8* null) // CK1: call void @__kmpc_omp_task_begin_if0(%struct.ident_t* @{{.+}}, i32 %{{.+}}, i8* [[RES]]) diff --git a/clang/test/OpenMP/target_exit_data_depend_codegen.cpp b/clang/test/OpenMP/target_exit_data_depend_codegen.cpp index fec750dde2377..df6981c12a70f 100644 --- a/clang/test/OpenMP/target_exit_data_depend_codegen.cpp +++ b/clang/test/OpenMP/target_exit_data_depend_codegen.cpp @@ -90,7 +90,7 @@ void foo(int arg) { // CK1: store i[[sz]] 4, i[[sz]]* [[DEP_SIZE]], // CK1: [[DEP_ATTRS:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 2 // CK1: store i8 1, i8* [[DEP_ATTRS]] - // CK1: [[DEP:%.+]] = getelementptr inbounds [1 x %struct.kmp_depend_info], [1 x %struct.kmp_depend_info]* [[MAIN_DEP]], i32 0, i32 0 + // CK1: [[DEP:%.+]] = getelementptr inbounds [1 x %struct.kmp_depend_info], [1 x %struct.kmp_depend_info]* [[MAIN_DEP]], i[[sz]] 0, i[[sz]] 0 // CK1: [[BC:%.+]] = bitcast %struct.kmp_depend_info* [[DEP]] to i8* // CK1: = call i32 @__kmpc_omp_task_with_deps(%struct.ident_t* @{{.+}}, i32 %{{.+}}, i8* [[RES]], i32 1, i8* [[BC]], i32 0, i8* null) @@ -161,7 +161,7 @@ void foo(int arg) { // CK1: store i[[sz]] 800, i[[sz]]* [[DEP_SIZE]], // CK1: [[DEP_ATTRS:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 2 // CK1: store i8 3, i8* [[DEP_ATTRS]] - // CK1: [[DEP:%.+]] = getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* [[MAIN_DEP]], i32 0, i32 0 + // CK1: [[DEP:%.+]] = getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* [[MAIN_DEP]], i[[sz]] 0, i[[sz]] 0 // CK1: [[BC:%.+]] = bitcast %struct.kmp_depend_info* [[DEP]] to i8* // CK1: call void @__kmpc_omp_wait_deps(%struct.ident_t* @{{.+}}, i32 %{{.+}}, i32 3, i8* [[BC]], i32 0, i8* null) // CK1: call void @__kmpc_omp_task_begin_if0(%struct.ident_t* @{{.+}}, i32 %{{.+}}, i8* [[RES]]) @@ -239,7 +239,7 @@ void foo(int arg) { // CK1: store i[[sz]] 800, i[[sz]]* [[DEP_SIZE]], // CK1: [[DEP_ATTRS:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 2 // CK1: store i8 3, i8* [[DEP_ATTRS]] - // CK1: [[DEP:%.+]] = getelementptr inbounds [4 x %struct.kmp_depend_info], [4 x %struct.kmp_depend_info]* [[MAIN_DEP]], i32 0, i32 0 + // CK1: [[DEP:%.+]] = getelementptr inbounds [4 x %struct.kmp_depend_info], [4 x %struct.kmp_depend_info]* [[MAIN_DEP]], i[[sz]] 0, i[[sz]] 0 // CK1: [[BC:%.+]] = bitcast %struct.kmp_depend_info* [[DEP]] to i8* // CK1: call void @__kmpc_omp_wait_deps(%struct.ident_t* @{{.+}}, i32 %{{.+}}, i32 4, i8* [[BC]], i32 0, i8* null) // CK1: call void @__kmpc_omp_task_begin_if0(%struct.ident_t* @{{.+}}, i32 %{{.+}}, i8* [[RES]]) @@ -320,7 +320,7 @@ void foo(int arg) { // CK1: store i[[sz]] 4, i[[sz]]* [[DEP_SIZE]], // CK1: [[DEP_ATTRS:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 2 // CK1: store i8 1, i8* [[DEP_ATTRS]] - // CK1: [[DEP:%.+]] = getelementptr inbounds [5 x %struct.kmp_depend_info], [5 x %struct.kmp_depend_info]* [[MAIN_DEP]], i32 0, i32 0 + // CK1: [[DEP:%.+]] = getelementptr inbounds [5 x %struct.kmp_depend_info], [5 x %struct.kmp_depend_info]* [[MAIN_DEP]], i[[sz]] 0, i[[sz]] 0 // CK1: [[BC:%.+]] = bitcast %struct.kmp_depend_info* [[DEP]] to i8* // CK1: call void @__kmpc_omp_wait_deps(%struct.ident_t* @{{.+}}, i32 %{{.+}}, i32 5, i8* [[BC]], i32 0, i8* null) // CK1: call void @__kmpc_omp_task_begin_if0(%struct.ident_t* @{{.+}}, i32 %{{.+}}, i8* [[RES]]) diff --git a/clang/test/OpenMP/target_firstprivate_codegen.cpp b/clang/test/OpenMP/target_firstprivate_codegen.cpp index 4a2837b3c83cc..e1d5019a2bedb 100644 --- a/clang/test/OpenMP/target_firstprivate_codegen.cpp +++ b/clang/test/OpenMP/target_firstprivate_codegen.cpp @@ -38,30 +38,32 @@ #ifndef HEADER #define HEADER -template -struct TT{ +template +struct TT { tx X; ty Y; }; -// CHECK: [[TT:%.+]] = type { i64, i8 } -// CHECK: [[S1:%.+]] = type { double } +// CHECK-DAG: [[TT:%.+]] = type { i64, i8 } +// CHECK-DAG: [[TTII:%.+]] = type { i32, i32 } +// CHECK-DAG: [[S1:%.+]] = type { double } -// TCHECK: [[TT:%.+]] = type { i64, i8 } -// TCHECK: [[S1:%.+]] = type { double } +// TCHECK-DAG: [[TT:%.+]] = type { i64, i8 } +// TCHECK-DAG: [[TTII:%.+]] = type { i32, i32 } +// TCHECK-DAG: [[S1:%.+]] = type { double } +// CHECK-DAG: [[FP_E:@__omp_offloading_firstprivate_.+_e_l76]] = internal global [[TTII]] zeroinitializer // CHECK-DAG: [[SIZET:@.+]] = private unnamed_addr constant [1 x i{{32|64}}] [i[[SZ:32|64]] 4] -// CHECK: [[MAPT:@.+]] = private unnamed_addr constant [1 x i64] [i64 800] +// CHECK-DAG: [[MAPT:@.+]] = private unnamed_addr constant [1 x i64] [i64 800] // CHECK-DAG: [[MAPT2:@.+]] = private unnamed_addr constant [9 x i64] [i64 800, i64 673, i64 288, i64 673, i64 673, i64 288, i64 288, i64 673, i64 673] -// CHECK-DAG: [[SIZET3:@.+]] = private unnamed_addr constant [1 x i{{32|64}}] zeroinitializer -// CHECK-DAG: [[MAPT3:@.+]] = private unnamed_addr constant [1 x i64] [i64 544] +// CHECK-DAG: [[SIZET3:@.+]] = private unnamed_addr constant [2 x i{{32|64}}] [i{{32|64}} 0, i{{32|64}} 8] +// CHECK-DAG: [[MAPT3:@.+]] = private unnamed_addr constant [2 x i64] [i64 544, i64 549] // CHECK-DAG: [[MAPT4:@.+]] = private unnamed_addr constant [6 x i64] [i64 32, i64 281474976711171, i64 800, i64 288, i64 288, i64 673] // CHECK-DAG: [[SIZET5:@.+]] = private unnamed_addr constant [3 x i{{32|64}}] [i[[SZ]] 4, i[[SZ]] 1, i[[SZ]] 40] // CHECK-DAG: [[MAPT5:@.+]] = private unnamed_addr constant [3 x i64] [i64 800, i64 800, i64 673] // CHECK-DAG: [[SIZET6:@.+]] = private unnamed_addr constant [2 x i{{32|64}}] [i[[SZ]] 4, i[[SZ]] 40] // CHECK-DAG: [[MAPT6:@.+]] = private unnamed_addr constant [2 x i64] [i64 800, i64 673] - // CHECK: define {{.*}}[[FOO:@.+]]( int foo(int n, double *ptr) { int a = 0; @@ -71,8 +73,9 @@ int foo(int n, double *ptr) { double c[5][10]; double cn[5][n]; TT d; - - #pragma omp target firstprivate(a) + const TT e = {n, n}; + +#pragma omp target firstprivate(a) { } @@ -92,14 +95,14 @@ int foo(int n, double *ptr) { // CHECK: [[BASE_PTR_ARR2:%.+]] = alloca [9 x i8*], // CHECK: [[PTR_ARR2:%.+]] = alloca [9 x i8*], // CHECK: [[SIZET2:%.+]] = alloca [9 x i{{[0-9]+}}], - // CHECK: [[BASE_PTR_ARR3:%.+]] = alloca [1 x i8*], - // CHECK: [[PTR_ARR3:%.+]] = alloca [1 x i8*], + // CHECK: [[BASE_PTR_ARR3:%.+]] = alloca [2 x i8*], + // CHECK: [[PTR_ARR3:%.+]] = alloca [2 x i8*], // CHECK: [[N_ADDR_VAL:%.+]] = load i{{[0-9]+}}, i{{[0-9]+}}* [[N_ADDR]], // CHECK-64: [[N_EXT:%.+]] = zext i{{[0-9]+}} [[N_ADDR_VAL]] to i{{[0-9]+}} // CHECK: [[SSAVE_RET:%.+]] = call i8* @llvm.stacksave() // CHECK: store i8* [[SSAVE_RET]], i8** [[SSTACK]], // CHECK-64: [[BN_VLA:%.+]] = alloca float, i{{[0-9]+}} [[N_EXT]], - // CHECK-32: [[BN_VLA:%.+]] = alloca float, i{{[0-9]+}} [[N_ADDR_VAL]], + // CHECK-32: [[BN_VLA:%.+]] = alloca float, i{{[0-9]+}} [[N_ADDR_VAL]], // CHECK: [[N_ADDR_VAL2:%.+]] = load i{{[0-9]+}}, i{{[0-9]+}}* [[N_ADDR]], // CHECK-64: [[N_EXT2:%.+]] = zext i{{[0-9]+}} [[N_ADDR_VAL2]] to i{{[0-9]+}} // CHECK-64: [[CN_SIZE:%.+]] = mul{{.+}} i{{[0-9]+}} 5, [[N_EXT2]] @@ -119,15 +122,15 @@ int foo(int n, double *ptr) { // CHECK: [[BASE_PTR_GEP_ARG:%.+]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[BASE_PTR_ARR]], i{{[0-9]+}} 0, i{{[0-9]+}} 0 // CHECK: [[PTR_GEP_ARG:%.+]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[PTR_ARR]], i{{[0-9]+}} 0, i{{[0-9]+}} 0 // CHECK: {{.+}} = call i32 @__tgt_target(i64 -1, {{.+}}, i32 1, i8** [[BASE_PTR_GEP_ARG]], i8** [[PTR_GEP_ARG]], i[[SZ]]* getelementptr inbounds ([1 x i[[SZ]]], [1 x i[[SZ]]]* [[SIZET]], i32 0, i32 0), i64* getelementptr inbounds ([1 x i64], [1 x i64]* [[MAPT]], i32 0, i32 0)) - + // TCHECK: define weak void @__omp_offloading_{{.+}}(i{{[0-9]+}} [[A_IN:%.+]]) // TCHECK: [[A_ADDR:%.+]] = alloca i{{[0-9]+}}, // TCHECK-NOT: alloca i{{[0-9]+}}, // TCHECK: store i{{[0-9]+}} [[A_IN]], i{{[0-9]+}}* [[A_ADDR]], // TCHECK-NOT: store i{{[0-9]+}} % - // TCHECK: ret void + // TCHECK: ret void -#pragma omp target firstprivate(aa,b,bn,c,cn,d) +#pragma omp target firstprivate(aa, b, bn, c, cn, d) { aa += 1; b[2] = 1.0; @@ -135,7 +138,7 @@ int foo(int n, double *ptr) { c[1][2] = 1.0; cn[1][3] = 1.0; d.X = 1; - d.Y = 1; + d.Y = 1; } // CHECK: [[A2VAL:%.+]] = load i{{[0-9]+}}, i{{[0-9]+}}* [[A2]], @@ -143,7 +146,7 @@ int foo(int n, double *ptr) { // CHECK: store i{{[0-9]+}} [[A2VAL]], i{{[0-9]+}}* [[A2CASTCONV]], // CHECK: [[A2CAST_VAL:%.+]] = load i{{[0-9]+}}, i{{[0-9]+}}* [[A2CAST]], // CHECK-64: [[BN_SIZE:%.+]] = mul{{.+}} i{{[0-9]+}} [[N_EXT]], 4 - // CHECK-32: [[BN_SIZE:%.+]] = mul{{.+}} i{{[0-9]+}} [[N_ADDR_VAL]], 4 + // CHECK-32: [[BN_SIZE:%.+]] = mul{{.+}} i{{[0-9]+}} [[N_ADDR_VAL]], 4 // CHECK-64: [[CN_SIZE_1:%.+]] = mul{{.+}} i{{[0-9]+}} 5, [[N_EXT2]] // CHECK-32: [[CN_SIZE_1:%.+]] = mul{{.+}} i{{[0-9]+}} 5, [[N_ADDR_VAL2]] // CHECK: [[CN_SIZE_2:%.+]] = mul{{.+}} i{{[0-9]+}} [[CN_SIZE_1]], 8 @@ -184,7 +187,7 @@ int foo(int n, double *ptr) { // CHECK: store float* [[BN_VLA]], float** [[BCAST_TOPTR]], // CHECK: [[SIZE_GEPBN_3:%.+]] = getelementptr inbounds [9 x i{{[0-9]+}}], [9 x i{{[0-9]+}}]* [[SIZET2]], i{{[0-9]+}} 0, i{{[0-9]+}} 3 // CHECK: store i{{[0-9]+}} [[BN_SIZE]], i{{[0-9]+}}* [[SIZE_GEPBN_3]] - + // firstprivate(c): base_ptr = &c[0], ptr = &c[0], size = 400 (5*10*sizeof(double)) // CHECK: [[BASE_PTR_GEP2_4:%.+]] = getelementptr inbounds [9 x i8*], [9 x i8*]* [[BASE_PTR_ARR2]], i{{[0-9]+}} 0, i{{[0-9]+}} 4 // CHECK: [[BCAST_TOPTR:%.+]] = bitcast i8** [[BASE_PTR_GEP2_4]] to [5 x [10 x double]]** @@ -194,7 +197,7 @@ int foo(int n, double *ptr) { // CHECK: store [5 x [10 x double]]* [[C]], [5 x [10 x double]]** [[BCAST_TOPTR]], // CHECK: [[SIZE_GEPC_4:%.+]] = getelementptr inbounds [9 x i{{[0-9]+}}], [9 x i{{[0-9]+}}]* [[SIZET2]], i{{[0-9]+}} 0, i{{[0-9]+}} 4 // CHECK: store i{{[0-9]+}} 400, i{{[0-9]+}}* [[SIZE_GEPC_4]], - + // firstprivate(cn), 3 entries, 5, n, cn: (1) base_ptr = 5, ptr = 5, size = 8; (2) (1) base_ptr = n, ptr = n, size = 8; (3) base_ptr = &cn[0], ptr = &cn[0], size = 5*n*sizeof(double) // CHECK: [[BASE_PTR_GEP2_5:%.+]] = getelementptr inbounds [9 x i8*], [9 x i8*]* [[BASE_PTR_ARR2]], i{{[0-9]+}} 0, i{{[0-9]+}} 5 // CHECK: [[BCAST_TOPTR:%.+]] = bitcast i8** [[BASE_PTR_GEP2_5]] to i{{[0-9]+}}* @@ -222,8 +225,8 @@ int foo(int n, double *ptr) { // CHECK: store double* [[CN_VLA]], double** [[BCAST_TOPTR]], // CHECK: [[SIZE_GEPCN_7:%.+]] = getelementptr inbounds [9 x i{{[0-9]+}}], [9 x i{{[0-9]+}}]* [[SIZET2]], i{{[0-9]+}} 0, i{{[0-9]+}} 7 // CHECK: store i{{[0-9]+}} [[CN_SIZE_2]], i{{[0-9]+}}* [[SIZE_GEPCN_7]], - - // firstprivate(d): base_ptr = &d, ptr = &d, size = 16 + + // firstprivate(d): base_ptr = &d, ptr = &d, size = 16 // CHECK: [[BASE_PTR_GEP2_8:%.+]] = getelementptr inbounds [9 x i8*], [9 x i8*]* [[BASE_PTR_ARR2]], i{{[0-9]+}} 0, i{{[0-9]+}} 8 // CHECK: [[BCAST_TOPTR:%.+]] = bitcast i8** [[BASE_PTR_GEP2_8]] to [[TT]]** // CHECK: store [[TT]]* [[D]], [[TT]]** [[BCAST_TOPTR]], @@ -232,13 +235,12 @@ int foo(int n, double *ptr) { // CHECK: store [[TT]]* [[D]], [[TT]]** [[BCAST_TOPTR]], // CHECK: [[SIZE_GEPCN_8:%.+]] = getelementptr inbounds [9 x i{{[0-9]+}}], [9 x i{{[0-9]+}}]* [[SIZET2]], i{{[0-9]+}} 0, i{{[0-9]+}} 8 // CHECK: store i{{[0-9]+}} {{[0-9]+}}, i{{[0-9]+}}* [[SIZE_GEPCN_8]], - - + // CHECK: [[BASE_PTR_GEP_ARG2:%.+]] = getelementptr inbounds [9 x i8*], [9 x i8*]* [[BASE_PTR_ARR2]], i{{[0-9]+}} 0, i{{[0-9]+}} 0 // CHECK: [[PTR_GEP_ARG2:%.+]] = getelementptr inbounds [9 x i8*], [9 x i8*]* [[PTR_ARR2]], i{{[0-9]+}} 0, i{{[0-9]+}} 0 // CHECK: [[SIZES_ARG2:%.+]] = getelementptr inbounds [9 x i[[SZ]]], [9 x i[[SZ]]]* [[SIZET2]], i{{[0-9]+}} 0, i{{[0-9]+}} 0 // CHECK: {{.+}} = call i32 @__tgt_target(i64 -1, {{.+}}, i32 9, i8** [[BASE_PTR_GEP_ARG2]], i8** [[PTR_GEP_ARG2]], i[[SZ]]* [[SIZES_ARG2]], i64* getelementptr inbounds ([9 x i64], [9 x i64]* [[MAPT2]], i32 0, i32 0)) - + // make sure that firstprivate variables are generated in all cases and that we use those instances for operations inside the // target region // TCHECK: define {{.*}}void @__omp_offloading_{{.+}}(i{{[0-9]+}} [[A2_IN:%.+]], [10 x float]* {{.+}} [[B_IN:%.+]], i{{[0-9]+}} [[BN_SZ:%.+]], float* {{.+}} [[BN_IN:%.+]], [5 x [10 x double]]* {{.+}} [[C_IN:%.+]], i{{[0-9]+}} [[CN_SZ1:%.+]], i{{[0-9]+}} [[CN_SZ2:%.+]], double* {{.+}} [[CN_IN:%.+]], [[TT]]* {{.+}} [[D_IN:%.+]]) @@ -297,7 +299,7 @@ int foo(int n, double *ptr) { // TCHECK: [[C_PRIV_BCAST:%.+]] = bitcast [5 x [10 x double]]* [[C_PRIV]] to i8* // TCHECK: [[C_IN_BCAST:%.+]] = bitcast [5 x [10 x double]]* [[C_ADDR_REF]] to i8* // TCHECK: call void @llvm.memcpy.{{.+}}(i8* align {{[0-9]+}} [[C_PRIV_BCAST]], i8* align {{[0-9]+}} [[C_IN_BCAST]],{{.+}}) - + // firstprivate(cn) // TCHECK: [[CN_SZ:%.+]] = mul{{.+}} i{{[0-9]+}} [[CN_SZ1_VAL]], [[CN_SZ2_VAL]] // TCHECK: [[CN_PRIV:%.+]] = alloca double, i{{[0-9]+}} [[CN_SZ]], @@ -306,32 +308,43 @@ int foo(int n, double *ptr) { // TCHECK: [[CN_PRIV_BCAST:%.+]] = bitcast double* [[CN_PRIV]] to i8* // TCHECK: [[CN_IN_BCAST:%.+]] = bitcast double* [[CN_ADDR_REF]] to i8* // TCHECK: call void @llvm.memcpy.{{.+}}(i8* align {{[0-9]+}} [[CN_PRIV_BCAST]], i8* align {{[0-9]+}} [[CN_IN_BCAST]], i{{[0-9]+}} [[CN_SZ2_CPY]],{{.+}}) - + // firstprivate(d) // TCHECK: [[D_PRIV_BCAST:%.+]] = bitcast [[TT]]* [[D_PRIV]] to i8* // TCHECK: [[D_IN_BCAST:%.+]] = bitcast [[TT]]* [[D_ADDR_REF]] to i8* // TCHECK: call void @llvm.memcpy.{{.+}}(i8* align {{[0-9]+}} [[D_PRIV_BCAST]], i8* align {{[0-9]+}} [[D_IN_BCAST]],{{.+}}) - - #pragma omp target firstprivate(ptr) +#pragma omp target firstprivate(ptr, e) { + ptr[0] = e.X; ptr[0]++; } // CHECK: [[PTR_ADDR_REF:%.+]] = load double*, double** [[PTR_ADDR]], - // CHECK: [[BASE_PTR_GEP3_0:%.+]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[BASE_PTR_ARR3]], i{{[0-9]+}} 0, i{{[0-9]+}} 0 + // CHECK: [[FP_E_BC:%.+]] = bitcast [[TTII]]* [[FP_E]] to i8* + // CHECK: [[E_BC:%.+]] = bitcast [[TTII]]* [[E:%.+]] to i8* + // CHECK: call void @llvm.memcpy.p0i8.p0i8.i{{64|32}}(i8* {{.*}} [[FP_E_BC]], i8* {{.*}} [[E_BC]], i{{64|32}} 8, i1 false) + // CHECK: [[BASE_PTR_GEP3_0:%.+]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[BASE_PTR_ARR3]], i{{[0-9]+}} 0, i{{[0-9]+}} 0 // CHECK: [[BCAST_TOPTR:%.+]] = bitcast i8** [[BASE_PTR_GEP3_0]] to double** // CHECK: store double* [[PTR_ADDR_REF]], double** [[BCAST_TOPTR]], - // CHECK: [[PTR_GEP3_0:%.+]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[PTR_ARR3]], i{{[0-9]+}} 0, i{{[0-9]+}} 0 + // CHECK: [[PTR_GEP3_0:%.+]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[PTR_ARR3]], i{{[0-9]+}} 0, i{{[0-9]+}} 0 // CHECK: [[BCAST_TOPTR:%.+]] = bitcast i8** [[PTR_GEP3_0]] to double** // CHECK: store double* [[PTR_ADDR_REF]], double** [[BCAST_TOPTR]], - - // CHECK: [[BASE_PTR_GEP_ARG3:%.+]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[BASE_PTR_ARR3]], i{{[0-9]+}} 0, i{{[0-9]+}} 0 - // CHECK: [[PTR_GEP_ARG3:%.+]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[PTR_ARR3]], i{{[0-9]+}} 0, i{{[0-9]+}} 0 - // CHECK: {{.+}} = call i32 @__tgt_target(i64 -1, {{.+}}, i32 1, i8** [[BASE_PTR_GEP_ARG3]], i8** [[PTR_GEP_ARG3]], i[[SZ]]* getelementptr inbounds ([1 x i[[SZ]]], [1 x i[[SZ]]]* [[SIZET3]], i32 0, i32 0), i64* getelementptr inbounds ([1 x i64], [1 x i64]* [[MAPT3]], i32 0, i32 0)) - - // TCHECK: define weak void @__omp_offloading_{{.+}}(double* [[PTR_IN:%.+]]) + // CHECK: [[BASE_PTR_GEP3_1:%.+]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[BASE_PTR_ARR3]], i{{[0-9]+}} 0, i{{[0-9]+}} 1 + // CHECK: [[BCAST_TOPTR:%.+]] = bitcast i8** [[BASE_PTR_GEP3_1]] to [[TTII]]** + // CHECK: store [[TTII]]* [[FP_E]], [[TTII]]** [[BCAST_TOPTR]], + // CHECK: [[PTR_GEP3_1:%.+]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[PTR_ARR3]], i{{[0-9]+}} 0, i{{[0-9]+}} 1 + // CHECK: [[BCAST_TOPTR:%.+]] = bitcast i8** [[PTR_GEP3_1]] to [[TTII]]** + // CHECK: store [[TTII]]* [[FP_E]], [[TTII]]** [[BCAST_TOPTR]], + + // CHECK: [[BASE_PTR_GEP_ARG3:%.+]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[BASE_PTR_ARR3]], i{{[0-9]+}} 0, i{{[0-9]+}} 0 + // CHECK: [[PTR_GEP_ARG3:%.+]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[PTR_ARR3]], i{{[0-9]+}} 0, i{{[0-9]+}} 0 + // CHECK: {{.+}} = call i32 @__tgt_target(i64 -1, {{.+}}, i32 2, i8** [[BASE_PTR_GEP_ARG3]], i8** [[PTR_GEP_ARG3]], i[[SZ]]* getelementptr inbounds ([2 x i[[SZ]]], [2 x i[[SZ]]]* [[SIZET3]], i32 0, i32 0), i64* getelementptr inbounds ([2 x i64], [2 x i64]* [[MAPT3]], i32 0, i32 0)) + + // TCHECK: define weak void @__omp_offloading_{{.+}}(double* [[PTR_IN:%.+]], [[TTII]]* dereferenceable{{.+}} [[E:%.+]]) + // TCHECK-NOT: alloca [[TTII]], // TCHECK: [[PTR_ADDR:%.+]] = alloca double*, + // TCHECK-NOT: alloca [[TTII]], // TCHECK-NOT: alloca double*, // TCHECK: store double* [[PTR_IN]], double** [[PTR_ADDR]], // TCHECK-NOT: store double* % @@ -339,13 +352,12 @@ int foo(int n, double *ptr) { return a; } - -template +template tx ftemplate(int n) { tx a = 0; tx b[10]; -#pragma omp target firstprivate(a,b) +#pragma omp target firstprivate(a, b) { a += 1; b[2] += 1; @@ -354,13 +366,12 @@ tx ftemplate(int n) { return a; } -static -int fstatic(int n) { +static int fstatic(int n) { int a = 0; char aaa = 0; int b[10]; -#pragma omp target firstprivate(a,aaa,b) +#pragma omp target firstprivate(a, aaa, b) { a += 1; aaa += 1; @@ -398,11 +409,11 @@ int fstatic(int n) { struct S1 { double a; - int r1(int n){ - int b = n+1; + int r1(int n) { + int b = n + 1; short int c[2][n]; -#pragma omp target firstprivate(b,c) +#pragma omp target firstprivate(b, c) { this->a = (double)b + 1.5; c[1][1] = ++a; @@ -499,7 +510,7 @@ struct S1 { // firstprivate(b) // TCHECK-NOT: store i{{[0-9]+}} % - + // TCHECK: [[RET_STACK:%.+]] = call i8* @llvm.stacksave() // TCHECK: store i8* [[RET_STACK:%.+]], i8** [[SSTACK]], @@ -517,7 +528,6 @@ struct S1 { // TCHECK: call void @llvm.stackrestore(i8* [[RELOAD_SSTACK]]) // TCHECK: ret void - // static host function // CHECK: define{{.+}} i32 {{.+}}(i{{[0-9]+}} {{.+}}) // CHECK: [[BASE_PTRS5:%.+]] = alloca [3 x i8*], @@ -551,9 +561,7 @@ struct S1 { // CHECK: call i32 @__tgt_target(i64 -1, {{.+}}, i32 3, i8** {{.+}}, i8** {{.+}}, i[[SZ]]* getelementptr inbounds ([3 x i[[SZ]]], [3 x i[[SZ]]]* [[SIZET5]], i32 0, i32 0), i64* getelementptr inbounds ([3 x i64], [3 x i64]* [[MAPT5]], i32 0, i32 0)) }; - - -int bar(int n, double *ptr){ +int bar(int n, double *ptr) { int a = 0; a += foo(n, ptr); S1 S; diff --git a/clang/test/OpenMP/target_map_messages.cpp b/clang/test/OpenMP/target_map_messages.cpp index e81e61eaab5b7..e1967d27c92c8 100644 --- a/clang/test/OpenMP/target_map_messages.cpp +++ b/clang/test/OpenMP/target_map_messages.cpp @@ -110,17 +110,17 @@ struct SA { {} #pragma omp target map( , , : a) // expected-error {{missing map type modifier}} expected-error {{missing map type modifier}} expected-error {{missing map type}} {} - #pragma omp target map( d, f, bf: a) // expected-error {{incorrect map type modifier, expected 'always' or 'close'}} expected-error {{incorrect map type modifier, expected 'always' or 'close'}} expected-error {{incorrect map type, expected one of 'to', 'from', 'tofrom', 'alloc', 'release', or 'delete'}} + #pragma omp target map( d, f, bf: a) // expected-error {{incorrect map type modifier, expected 'always', 'close', or 'mapper'}} expected-error {{incorrect map type modifier, expected 'always', 'close', or 'mapper'}} expected-error {{incorrect map type, expected one of 'to', 'from', 'tofrom', 'alloc', 'release', or 'delete'}} {} - #pragma omp target map( , f, : a) // expected-error {{missing map type modifier}} expected-error {{incorrect map type modifier, expected 'always' or 'close'}} expected-error {{missing map type}} + #pragma omp target map( , f, : a) // expected-error {{missing map type modifier}} expected-error {{incorrect map type modifier, expected 'always', 'close', or 'mapper'}} expected-error {{missing map type}} {} #pragma omp target map(always close: a) // expected-error {{missing map type}} {} #pragma omp target map(always close bf: a) // expected-error {{incorrect map type, expected one of 'to', 'from', 'tofrom', 'alloc', 'release', or 'delete'}} {} - #pragma omp target map(always tofrom close: a) // expected-error {{incorrect map type modifier, expected 'always' or 'close'}} expected-error {{missing map type}} + #pragma omp target map(always tofrom close: a) // expected-error {{incorrect map type modifier, expected 'always', 'close', or 'mapper'}} expected-error {{missing map type}} {} - #pragma omp target map(tofrom from: a) // expected-error {{incorrect map type modifier, expected 'always' or 'close'}} + #pragma omp target map(tofrom from: a) // expected-error {{incorrect map type modifier, expected 'always', 'close', or 'mapper'}} {} #pragma omp target map(close bf: a) // expected-error {{incorrect map type, expected one of 'to', 'from', 'tofrom', 'alloc', 'release', or 'delete'}} {} @@ -516,14 +516,14 @@ T tmain(T argc) { #pragma omp target data map(always, tofrom: x) #pragma omp target data map(always: x) // expected-error {{missing map type}} -#pragma omp target data map(tofrom, always: x) // expected-error {{incorrect map type modifier, expected 'always' or 'close'}} expected-error {{missing map type}} +#pragma omp target data map(tofrom, always: x) // expected-error {{incorrect map type modifier, expected 'always', 'close', or 'mapper'}} expected-error {{missing map type}} #pragma omp target data map(always, tofrom: always, tofrom, x) #pragma omp target map(tofrom j) // expected-error {{expected ',' or ')' in 'map' clause}} foo(); #pragma omp target data map(close, tofrom: x) #pragma omp target data map(close: x) // expected-error {{missing map type}} -#pragma omp target data map(tofrom, close: x) // expected-error {{incorrect map type modifier, expected 'always' or 'close'}} expected-error {{missing map type}} +#pragma omp target data map(tofrom, close: x) // expected-error {{incorrect map type modifier, expected 'always', 'close', or 'mapper'}} expected-error {{missing map type}} #pragma omp target data map(close, tofrom: close, tofrom, x) foo(); return 0; @@ -613,13 +613,13 @@ int main(int argc, char **argv) { #pragma omp target data map(always, tofrom: x) #pragma omp target data map(always: x) // expected-error {{missing map type}} -#pragma omp target data map(tofrom, always: x) // expected-error {{incorrect map type modifier, expected 'always' or 'close'}} expected-error {{missing map type}} +#pragma omp target data map(tofrom, always: x) // expected-error {{incorrect map type modifier, expected 'always', 'close', or 'mapper'}} expected-error {{missing map type}} #pragma omp target data map(always, tofrom: always, tofrom, x) #pragma omp target map(tofrom j) // expected-error {{expected ',' or ')' in 'map' clause}} foo(); #pragma omp target data map(close, tofrom: x) #pragma omp target data map(close: x) // expected-error {{missing map type}} -#pragma omp target data map(tofrom, close: x) // expected-error {{incorrect map type modifier, expected 'always' or 'close'}} expected-error {{missing map type}} +#pragma omp target data map(tofrom, close: x) // expected-error {{incorrect map type modifier, expected 'always', 'close', or 'mapper'}} expected-error {{missing map type}} foo(); #pragma omp target private(j) map(j) // expected-error {{private variable cannot be in a map clause in '#pragma omp target' directive}} expected-note {{defined as private}} {} diff --git a/clang/test/OpenMP/target_parallel_depend_codegen.cpp b/clang/test/OpenMP/target_parallel_depend_codegen.cpp index dc55ec15e51fe..abd71351e1519 100644 --- a/clang/test/OpenMP/target_parallel_depend_codegen.cpp +++ b/clang/test/OpenMP/target_parallel_depend_codegen.cpp @@ -98,7 +98,7 @@ int foo(int n) { // CHECK: getelementptr inbounds [4 x %struct.kmp_depend_info], [4 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 1 // CHECK: getelementptr inbounds [4 x %struct.kmp_depend_info], [4 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 2 // CHECK: getelementptr inbounds [4 x %struct.kmp_depend_info], [4 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 3 - // CHECK: [[DEP_START:%.+]] = getelementptr inbounds [4 x %struct.kmp_depend_info], [4 x %struct.kmp_depend_info]* %{{.+}}, i32 0, i32 0 + // CHECK: [[DEP_START:%.+]] = getelementptr inbounds [4 x %struct.kmp_depend_info], [4 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 0 // CHECK: [[DEP:%.+]] = bitcast %struct.kmp_depend_info* [[DEP_START]] to i8* // CHECK: call void @__kmpc_omp_wait_deps(%struct.ident_t* @0, i32 [[GTID]], i32 4, i8* [[DEP]], i32 0, i8* null) // CHECK: call void @__kmpc_omp_task_begin_if0(%struct.ident_t* @0, i32 [[GTID]], i8* [[TASK]]) @@ -138,7 +138,7 @@ int foo(int n) { // CHECK: getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 0 // CHECK: getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 1 // CHECK: getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 2 - // CHECK: [[DEP_START:%.+]] = getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* %{{.+}}, i32 0, i32 0 + // CHECK: [[DEP_START:%.+]] = getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 0 // CHECK: [[DEP:%.+]] = bitcast %struct.kmp_depend_info* [[DEP_START]] to i8* // CHECK: call i32 @__kmpc_omp_task_with_deps(%struct.ident_t* @0, i32 [[GTID]], i8* [[TASK]], i32 3, i8* [[DEP]], i32 0, i8* null) // CHECK: br label %[[EXIT:.+]] @@ -154,7 +154,7 @@ int foo(int n) { // CHECK: getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 0 // CHECK: getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 1 // CHECK: getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 2 - // CHECK: [[DEP_START:%.+]] = getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* %{{.+}}, i32 0, i32 0 + // CHECK: [[DEP_START:%.+]] = getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 0 // CHECK: [[DEP:%.+]] = bitcast %struct.kmp_depend_info* [[DEP_START]] to i8* // CHECK: call i32 @__kmpc_omp_task_with_deps(%struct.ident_t* @0, i32 [[GTID]], i8* [[TASK]], i32 3, i8* [[DEP]], i32 0, i8* null) // CHECK: br label %[[EXIT:.+]] @@ -170,7 +170,7 @@ int foo(int n) { // CHECK: [[TASK:%.+]] = call i8* @__kmpc_omp_task_alloc(%struct.ident_t* @0, i32 [[GTID]], i32 1, i[[SZ]] {{48|24}}, i[[SZ]] 4, i32 (i32, i8*)* bitcast (i32 (i32, %{{.+}}*)* [[TASK_ENTRY2:@.+]] to i32 (i32, i8*)*)) // CHECK: [[BC_TASK:%.+]] = bitcast i8* [[TASK]] to [[TASK_TY2:%.+]]* // CHECK: getelementptr inbounds [1 x %struct.kmp_depend_info], [1 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 0 - // CHECK: [[DEP_START:%.+]] = getelementptr inbounds [1 x %struct.kmp_depend_info], [1 x %struct.kmp_depend_info]* %{{.+}}, i32 0, i32 0 + // CHECK: [[DEP_START:%.+]] = getelementptr inbounds [1 x %struct.kmp_depend_info], [1 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 0 // CHECK: [[DEP:%.+]] = bitcast %struct.kmp_depend_info* [[DEP_START]] to i8* // CHECK: call void @__kmpc_omp_wait_deps(%struct.ident_t* @0, i32 [[GTID]], i32 1, i8* [[DEP]], i32 0, i8* null) // CHECK: call void @__kmpc_omp_task_begin_if0(%struct.ident_t* @0, i32 [[GTID]], i8* [[TASK]]) diff --git a/clang/test/OpenMP/target_parallel_for_depend_codegen.cpp b/clang/test/OpenMP/target_parallel_for_depend_codegen.cpp index 85ec945c4f657..107283a7ed5f6 100644 --- a/clang/test/OpenMP/target_parallel_for_depend_codegen.cpp +++ b/clang/test/OpenMP/target_parallel_for_depend_codegen.cpp @@ -98,7 +98,7 @@ int foo(int n) { // CHECK: getelementptr inbounds [4 x %struct.kmp_depend_info], [4 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 1 // CHECK: getelementptr inbounds [4 x %struct.kmp_depend_info], [4 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 2 // CHECK: getelementptr inbounds [4 x %struct.kmp_depend_info], [4 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 3 - // CHECK: [[DEP_START:%.+]] = getelementptr inbounds [4 x %struct.kmp_depend_info], [4 x %struct.kmp_depend_info]* %{{.+}}, i32 0, i32 0 + // CHECK: [[DEP_START:%.+]] = getelementptr inbounds [4 x %struct.kmp_depend_info], [4 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 0 // CHECK: [[DEP:%.+]] = bitcast %struct.kmp_depend_info* [[DEP_START]] to i8* // CHECK: call void @__kmpc_omp_wait_deps(%struct.ident_t* [[IN]], i32 [[GTID]], i32 4, i8* [[DEP]], i32 0, i8* null) // CHECK: call void @__kmpc_omp_task_begin_if0(%struct.ident_t* [[IN]], i32 [[GTID]], i8* [[TASK]]) @@ -138,7 +138,7 @@ int foo(int n) { // CHECK: getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 0 // CHECK: getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 1 // CHECK: getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 2 - // CHECK: [[DEP_START:%.+]] = getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* %{{.+}}, i32 0, i32 0 + // CHECK: [[DEP_START:%.+]] = getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 0 // CHECK: [[DEP:%.+]] = bitcast %struct.kmp_depend_info* [[DEP_START]] to i8* // CHECK: call i32 @__kmpc_omp_task_with_deps(%struct.ident_t* [[IN]], i32 [[GTID]], i8* [[TASK]], i32 3, i8* [[DEP]], i32 0, i8* null) // CHECK: br label %[[EXIT:.+]] @@ -154,7 +154,7 @@ int foo(int n) { // CHECK: getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 0 // CHECK: getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 1 // CHECK: getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 2 - // CHECK: [[DEP_START:%.+]] = getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* %{{.+}}, i32 0, i32 0 + // CHECK: [[DEP_START:%.+]] = getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 0 // CHECK: [[DEP:%.+]] = bitcast %struct.kmp_depend_info* [[DEP_START]] to i8* // CHECK: call i32 @__kmpc_omp_task_with_deps(%struct.ident_t* [[IN]], i32 [[GTID]], i8* [[TASK]], i32 3, i8* [[DEP]], i32 0, i8* null) // CHECK: br label %[[EXIT:.+]] @@ -170,7 +170,7 @@ int foo(int n) { // CHECK: [[TASK:%.+]] = call i8* @__kmpc_omp_task_alloc(%struct.ident_t* [[IN]], i32 [[GTID]], i32 1, i[[SZ]] {{48|24}}, i[[SZ]] 4, i32 (i32, i8*)* bitcast (i32 (i32, %{{.+}}*)* [[TASK_ENTRY2:@.+]] to i32 (i32, i8*)*)) // CHECK: [[BC_TASK:%.+]] = bitcast i8* [[TASK]] to [[TASK_TY2:%.+]]* // CHECK: getelementptr inbounds [1 x %struct.kmp_depend_info], [1 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 0 - // CHECK: [[DEP_START:%.+]] = getelementptr inbounds [1 x %struct.kmp_depend_info], [1 x %struct.kmp_depend_info]* %{{.+}}, i32 0, i32 0 + // CHECK: [[DEP_START:%.+]] = getelementptr inbounds [1 x %struct.kmp_depend_info], [1 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 0 // CHECK: [[DEP:%.+]] = bitcast %struct.kmp_depend_info* [[DEP_START]] to i8* // CHECK: call void @__kmpc_omp_wait_deps(%struct.ident_t* [[IN]], i32 [[GTID]], i32 1, i8* [[DEP]], i32 0, i8* null) // CHECK: call void @__kmpc_omp_task_begin_if0(%struct.ident_t* [[IN]], i32 [[GTID]], i8* [[TASK]]) diff --git a/clang/test/OpenMP/target_parallel_for_map_messages.cpp b/clang/test/OpenMP/target_parallel_for_map_messages.cpp index 6d82921603542..8521700b5cb50 100644 --- a/clang/test/OpenMP/target_parallel_for_map_messages.cpp +++ b/clang/test/OpenMP/target_parallel_for_map_messages.cpp @@ -163,7 +163,7 @@ T tmain(T argc) { for (i = 0; i < argc; ++i) foo(); #pragma omp target parallel for map(always: x) // expected-error {{missing map type}} for (i = 0; i < argc; ++i) foo(); -#pragma omp target parallel for map(tofrom, always: x) // expected-error {{incorrect map type modifier, expected 'always' or 'close'}} expected-error {{missing map type}} +#pragma omp target parallel for map(tofrom, always: x) // expected-error {{incorrect map type modifier, expected 'always', 'close', or 'mapper'}} expected-error {{missing map type}} for (i = 0; i < argc; ++i) foo(); #pragma omp target parallel for map(always, tofrom: always, tofrom, x) for (i = 0; i < argc; ++i) foo(); @@ -271,7 +271,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target parallel for map(always: x) // expected-error {{missing map type}} for (i = 0; i < argc; ++i) foo(); -#pragma omp target parallel for map(tofrom, always: x) // expected-error {{incorrect map type modifier, expected 'always' or 'close'}} expected-error {{missing map type}} +#pragma omp target parallel for map(tofrom, always: x) // expected-error {{incorrect map type modifier, expected 'always', 'close', or 'mapper'}} expected-error {{missing map type}} for (i = 0; i < argc; ++i) foo(); #pragma omp target parallel for map(always, tofrom: always, tofrom, x) for (i = 0; i < argc; ++i) foo(); diff --git a/clang/test/OpenMP/target_parallel_for_simd_depend_codegen.cpp b/clang/test/OpenMP/target_parallel_for_simd_depend_codegen.cpp index 83d752d9abe7f..2a76e318ca079 100644 --- a/clang/test/OpenMP/target_parallel_for_simd_depend_codegen.cpp +++ b/clang/test/OpenMP/target_parallel_for_simd_depend_codegen.cpp @@ -98,7 +98,7 @@ int foo(int n) { // CHECK: getelementptr inbounds [4 x %struct.kmp_depend_info], [4 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 1 // CHECK: getelementptr inbounds [4 x %struct.kmp_depend_info], [4 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 2 // CHECK: getelementptr inbounds [4 x %struct.kmp_depend_info], [4 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 3 - // CHECK: [[DEP_START:%.+]] = getelementptr inbounds [4 x %struct.kmp_depend_info], [4 x %struct.kmp_depend_info]* %{{.+}}, i32 0, i32 0 + // CHECK: [[DEP_START:%.+]] = getelementptr inbounds [4 x %struct.kmp_depend_info], [4 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 0 // CHECK: [[DEP:%.+]] = bitcast %struct.kmp_depend_info* [[DEP_START]] to i8* // CHECK: call void @__kmpc_omp_wait_deps(%struct.ident_t* [[IN]], i32 [[GTID]], i32 4, i8* [[DEP]], i32 0, i8* null) // CHECK: call void @__kmpc_omp_task_begin_if0(%struct.ident_t* [[IN]], i32 [[GTID]], i8* [[TASK]]) @@ -138,7 +138,7 @@ int foo(int n) { // CHECK: getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 0 // CHECK: getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 1 // CHECK: getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 2 - // CHECK: [[DEP_START:%.+]] = getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* %{{.+}}, i32 0, i32 0 + // CHECK: [[DEP_START:%.+]] = getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 0 // CHECK: [[DEP:%.+]] = bitcast %struct.kmp_depend_info* [[DEP_START]] to i8* // CHECK: call i32 @__kmpc_omp_task_with_deps(%struct.ident_t* [[IN]], i32 [[GTID]], i8* [[TASK]], i32 3, i8* [[DEP]], i32 0, i8* null) // CHECK: br label %[[EXIT:.+]] @@ -154,7 +154,7 @@ int foo(int n) { // CHECK: getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 0 // CHECK: getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 1 // CHECK: getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 2 - // CHECK: [[DEP_START:%.+]] = getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* %{{.+}}, i32 0, i32 0 + // CHECK: [[DEP_START:%.+]] = getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 0 // CHECK: [[DEP:%.+]] = bitcast %struct.kmp_depend_info* [[DEP_START]] to i8* // CHECK: call i32 @__kmpc_omp_task_with_deps(%struct.ident_t* [[IN]], i32 [[GTID]], i8* [[TASK]], i32 3, i8* [[DEP]], i32 0, i8* null) // CHECK: br label %[[EXIT:.+]] @@ -170,7 +170,7 @@ int foo(int n) { // CHECK: [[TASK:%.+]] = call i8* @__kmpc_omp_task_alloc(%struct.ident_t* [[IN]], i32 [[GTID]], i32 1, i[[SZ]] {{48|24}}, i[[SZ]] 4, i32 (i32, i8*)* bitcast (i32 (i32, %{{.+}}*)* [[TASK_ENTRY2:@.+]] to i32 (i32, i8*)*)) // CHECK: [[BC_TASK:%.+]] = bitcast i8* [[TASK]] to [[TASK_TY2:%.+]]* // CHECK: getelementptr inbounds [1 x %struct.kmp_depend_info], [1 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 0 - // CHECK: [[DEP_START:%.+]] = getelementptr inbounds [1 x %struct.kmp_depend_info], [1 x %struct.kmp_depend_info]* %{{.+}}, i32 0, i32 0 + // CHECK: [[DEP_START:%.+]] = getelementptr inbounds [1 x %struct.kmp_depend_info], [1 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 0 // CHECK: [[DEP:%.+]] = bitcast %struct.kmp_depend_info* [[DEP_START]] to i8* // CHECK: call void @__kmpc_omp_wait_deps(%struct.ident_t* [[IN]], i32 [[GTID]], i32 1, i8* [[DEP]], i32 0, i8* null) // CHECK: call void @__kmpc_omp_task_begin_if0(%struct.ident_t* [[IN]], i32 [[GTID]], i8* [[TASK]]) diff --git a/clang/test/OpenMP/target_parallel_for_simd_map_messages.cpp b/clang/test/OpenMP/target_parallel_for_simd_map_messages.cpp index a5135559cc335..83259cdd3ef3c 100644 --- a/clang/test/OpenMP/target_parallel_for_simd_map_messages.cpp +++ b/clang/test/OpenMP/target_parallel_for_simd_map_messages.cpp @@ -163,7 +163,7 @@ T tmain(T argc) { for (i = 0; i < argc; ++i) foo(); #pragma omp target parallel for simd map(always: x) // expected-error {{missing map type}} for (i = 0; i < argc; ++i) foo(); -#pragma omp target parallel for simd map(tofrom, always: x) // expected-error {{incorrect map type modifier, expected 'always' or 'close'}} expected-error {{missing map type}} +#pragma omp target parallel for simd map(tofrom, always: x) // expected-error {{incorrect map type modifier, expected 'always', 'close', or 'mapper'}} expected-error {{missing map type}} for (i = 0; i < argc; ++i) foo(); #pragma omp target parallel for simd map(always, tofrom: always, tofrom, x) for (i = 0; i < argc; ++i) foo(); @@ -271,7 +271,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target parallel for simd map(always: x) // expected-error {{missing map type}} for (i = 0; i < argc; ++i) foo(); -#pragma omp target parallel for simd map(tofrom, always: x) // expected-error {{incorrect map type modifier, expected 'always' or 'close'}} expected-error {{missing map type}} +#pragma omp target parallel for simd map(tofrom, always: x) // expected-error {{incorrect map type modifier, expected 'always', 'close', or 'mapper'}} expected-error {{missing map type}} for (i = 0; i < argc; ++i) foo(); #pragma omp target parallel for simd map(always, tofrom: always, tofrom, x) for (i = 0; i < argc; ++i) foo(); diff --git a/clang/test/OpenMP/target_parallel_map_messages.cpp b/clang/test/OpenMP/target_parallel_map_messages.cpp index 056fd501ac84b..510595cb0b970 100644 --- a/clang/test/OpenMP/target_parallel_map_messages.cpp +++ b/clang/test/OpenMP/target_parallel_map_messages.cpp @@ -163,7 +163,7 @@ T tmain(T argc) { foo(); #pragma omp target parallel map(always: x) // expected-error {{missing map type}} foo(); -#pragma omp target parallel map(tofrom, always: x) // expected-error {{incorrect map type modifier, expected 'always' or 'close'}} expected-error {{missing map type}} +#pragma omp target parallel map(tofrom, always: x) // expected-error {{incorrect map type modifier, expected 'always', 'close', or 'mapper'}} expected-error {{missing map type}} foo(); #pragma omp target parallel map(always, tofrom: always, tofrom, x) foo(); @@ -270,7 +270,7 @@ int main(int argc, char **argv) { foo(); #pragma omp target parallel map(always: x) // expected-error {{missing map type}} foo(); -#pragma omp target parallel map(tofrom, always: x) // expected-error {{incorrect map type modifier, expected 'always' or 'close'}} expected-error {{missing map type}} +#pragma omp target parallel map(tofrom, always: x) // expected-error {{incorrect map type modifier, expected 'always', 'close', or 'mapper'}} expected-error {{missing map type}} foo(); #pragma omp target parallel map(always, tofrom: always, tofrom, x) foo(); diff --git a/clang/test/OpenMP/target_simd_depend_codegen.cpp b/clang/test/OpenMP/target_simd_depend_codegen.cpp index e87b4fc8c30fe..37f726aa2aa1c 100644 --- a/clang/test/OpenMP/target_simd_depend_codegen.cpp +++ b/clang/test/OpenMP/target_simd_depend_codegen.cpp @@ -98,7 +98,7 @@ int foo(int n) { // CHECK: getelementptr inbounds [4 x %struct.kmp_depend_info], [4 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 1 // CHECK: getelementptr inbounds [4 x %struct.kmp_depend_info], [4 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 2 // CHECK: getelementptr inbounds [4 x %struct.kmp_depend_info], [4 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 3 - // CHECK: [[DEP_START:%.+]] = getelementptr inbounds [4 x %struct.kmp_depend_info], [4 x %struct.kmp_depend_info]* %{{.+}}, i32 0, i32 0 + // CHECK: [[DEP_START:%.+]] = getelementptr inbounds [4 x %struct.kmp_depend_info], [4 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 0 // CHECK: [[DEP:%.+]] = bitcast %struct.kmp_depend_info* [[DEP_START]] to i8* // CHECK: call void @__kmpc_omp_wait_deps(%struct.ident_t* @0, i32 [[GTID]], i32 4, i8* [[DEP]], i32 0, i8* null) // CHECK: call void @__kmpc_omp_task_begin_if0(%struct.ident_t* @0, i32 [[GTID]], i8* [[TASK]]) @@ -138,7 +138,7 @@ int foo(int n) { // CHECK: getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 0 // CHECK: getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 1 // CHECK: getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 2 - // CHECK: [[DEP_START:%.+]] = getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* %{{.+}}, i32 0, i32 0 + // CHECK: [[DEP_START:%.+]] = getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 0 // CHECK: [[DEP:%.+]] = bitcast %struct.kmp_depend_info* [[DEP_START]] to i8* // CHECK: call i32 @__kmpc_omp_task_with_deps(%struct.ident_t* @0, i32 [[GTID]], i8* [[TASK]], i32 3, i8* [[DEP]], i32 0, i8* null) // CHECK: br label %[[EXIT:.+]] @@ -154,7 +154,7 @@ int foo(int n) { // CHECK: getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 0 // CHECK: getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 1 // CHECK: getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 2 - // CHECK: [[DEP_START:%.+]] = getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* %{{.+}}, i32 0, i32 0 + // CHECK: [[DEP_START:%.+]] = getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 0 // CHECK: [[DEP:%.+]] = bitcast %struct.kmp_depend_info* [[DEP_START]] to i8* // CHECK: call i32 @__kmpc_omp_task_with_deps(%struct.ident_t* @0, i32 [[GTID]], i8* [[TASK]], i32 3, i8* [[DEP]], i32 0, i8* null) // CHECK: br label %[[EXIT:.+]] @@ -170,7 +170,7 @@ int foo(int n) { // CHECK: [[TASK:%.+]] = call i8* @__kmpc_omp_task_alloc(%struct.ident_t* @0, i32 [[GTID]], i32 1, i[[SZ]] {{48|24}}, i[[SZ]] 4, i32 (i32, i8*)* bitcast (i32 (i32, %{{.+}}*)* [[TASK_ENTRY2:@.+]] to i32 (i32, i8*)*)) // CHECK: [[BC_TASK:%.+]] = bitcast i8* [[TASK]] to [[TASK_TY2:%.+]]* // CHECK: getelementptr inbounds [1 x %struct.kmp_depend_info], [1 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 0 - // CHECK: [[DEP_START:%.+]] = getelementptr inbounds [1 x %struct.kmp_depend_info], [1 x %struct.kmp_depend_info]* %{{.+}}, i32 0, i32 0 + // CHECK: [[DEP_START:%.+]] = getelementptr inbounds [1 x %struct.kmp_depend_info], [1 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 0 // CHECK: [[DEP:%.+]] = bitcast %struct.kmp_depend_info* [[DEP_START]] to i8* // CHECK: call void @__kmpc_omp_wait_deps(%struct.ident_t* @0, i32 [[GTID]], i32 1, i8* [[DEP]], i32 0, i8* null) // CHECK: call void @__kmpc_omp_task_begin_if0(%struct.ident_t* @0, i32 [[GTID]], i8* [[TASK]]) diff --git a/clang/test/OpenMP/target_simd_map_messages.cpp b/clang/test/OpenMP/target_simd_map_messages.cpp index acd629880874a..4b76042e456ba 100644 --- a/clang/test/OpenMP/target_simd_map_messages.cpp +++ b/clang/test/OpenMP/target_simd_map_messages.cpp @@ -159,7 +159,7 @@ T tmain(T argc) { for (i = 0; i < argc; ++i) foo(); #pragma omp target simd map(always: x) // expected-error {{missing map type}} for (i = 0; i < argc; ++i) foo(); -#pragma omp target simd map(tofrom, always: x) // expected-error {{incorrect map type modifier, expected 'always' or 'close'}} expected-error {{missing map type}} +#pragma omp target simd map(tofrom, always: x) // expected-error {{incorrect map type modifier, expected 'always', 'close', or 'mapper'}} expected-error {{missing map type}} for (i = 0; i < argc; ++i) foo(); #pragma omp target simd map(always, tofrom: always, tofrom, x) for (i = 0; i < argc; ++i) foo(); @@ -263,7 +263,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target simd map(always: x) // expected-error {{missing map type}} for (i = 0; i < argc; ++i) foo(); -#pragma omp target simd map(tofrom, always: x) // expected-error {{incorrect map type modifier, expected 'always' or 'close'}} expected-error {{missing map type}} +#pragma omp target simd map(tofrom, always: x) // expected-error {{incorrect map type modifier, expected 'always', 'close', or 'mapper'}} expected-error {{missing map type}} for (i = 0; i < argc; ++i) foo(); #pragma omp target simd map(always, tofrom: always, tofrom, x) for (i = 0; i < argc; ++i) foo(); diff --git a/clang/test/OpenMP/target_teams_depend_codegen.cpp b/clang/test/OpenMP/target_teams_depend_codegen.cpp index 9f9c7656eafca..3c783fa17884a 100644 --- a/clang/test/OpenMP/target_teams_depend_codegen.cpp +++ b/clang/test/OpenMP/target_teams_depend_codegen.cpp @@ -98,7 +98,7 @@ int foo(int n) { // CHECK: getelementptr inbounds [4 x %struct.kmp_depend_info], [4 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 1 // CHECK: getelementptr inbounds [4 x %struct.kmp_depend_info], [4 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 2 // CHECK: getelementptr inbounds [4 x %struct.kmp_depend_info], [4 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 3 - // CHECK: [[DEP_START:%.+]] = getelementptr inbounds [4 x %struct.kmp_depend_info], [4 x %struct.kmp_depend_info]* %{{.+}}, i32 0, i32 0 + // CHECK: [[DEP_START:%.+]] = getelementptr inbounds [4 x %struct.kmp_depend_info], [4 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 0 // CHECK: [[DEP:%.+]] = bitcast %struct.kmp_depend_info* [[DEP_START]] to i8* // CHECK: call void @__kmpc_omp_wait_deps(%struct.ident_t* @0, i32 [[GTID]], i32 4, i8* [[DEP]], i32 0, i8* null) // CHECK: call void @__kmpc_omp_task_begin_if0(%struct.ident_t* @0, i32 [[GTID]], i8* [[TASK]]) @@ -138,7 +138,7 @@ int foo(int n) { // CHECK: getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 0 // CHECK: getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 1 // CHECK: getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 2 - // CHECK: [[DEP_START:%.+]] = getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* %{{.+}}, i32 0, i32 0 + // CHECK: [[DEP_START:%.+]] = getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 0 // CHECK: [[DEP:%.+]] = bitcast %struct.kmp_depend_info* [[DEP_START]] to i8* // CHECK: call i32 @__kmpc_omp_task_with_deps(%struct.ident_t* @0, i32 [[GTID]], i8* [[TASK]], i32 3, i8* [[DEP]], i32 0, i8* null) // CHECK: br label %[[EXIT:.+]] @@ -154,7 +154,7 @@ int foo(int n) { // CHECK: getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 0 // CHECK: getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 1 // CHECK: getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 2 - // CHECK: [[DEP_START:%.+]] = getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* %{{.+}}, i32 0, i32 0 + // CHECK: [[DEP_START:%.+]] = getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 0 // CHECK: [[DEP:%.+]] = bitcast %struct.kmp_depend_info* [[DEP_START]] to i8* // CHECK: call i32 @__kmpc_omp_task_with_deps(%struct.ident_t* @0, i32 [[GTID]], i8* [[TASK]], i32 3, i8* [[DEP]], i32 0, i8* null) // CHECK: br label %[[EXIT:.+]] @@ -170,7 +170,7 @@ int foo(int n) { // CHECK: [[TASK:%.+]] = call i8* @__kmpc_omp_task_alloc(%struct.ident_t* @0, i32 [[GTID]], i32 1, i[[SZ]] {{48|24}}, i[[SZ]] 4, i32 (i32, i8*)* bitcast (i32 (i32, %{{.+}}*)* [[TASK_ENTRY2:@.+]] to i32 (i32, i8*)*)) // CHECK: [[BC_TASK:%.+]] = bitcast i8* [[TASK]] to [[TASK_TY2:%.+]]* // CHECK: getelementptr inbounds [1 x %struct.kmp_depend_info], [1 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 0 - // CHECK: [[DEP_START:%.+]] = getelementptr inbounds [1 x %struct.kmp_depend_info], [1 x %struct.kmp_depend_info]* %{{.+}}, i32 0, i32 0 + // CHECK: [[DEP_START:%.+]] = getelementptr inbounds [1 x %struct.kmp_depend_info], [1 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 0 // CHECK: [[DEP:%.+]] = bitcast %struct.kmp_depend_info* [[DEP_START]] to i8* // CHECK: call void @__kmpc_omp_wait_deps(%struct.ident_t* @0, i32 [[GTID]], i32 1, i8* [[DEP]], i32 0, i8* null) // CHECK: call void @__kmpc_omp_task_begin_if0(%struct.ident_t* @0, i32 [[GTID]], i8* [[TASK]]) diff --git a/clang/test/OpenMP/target_teams_distribute_depend_codegen.cpp b/clang/test/OpenMP/target_teams_distribute_depend_codegen.cpp index 99b7f2c2e9c3f..c5d54da97616a 100644 --- a/clang/test/OpenMP/target_teams_distribute_depend_codegen.cpp +++ b/clang/test/OpenMP/target_teams_distribute_depend_codegen.cpp @@ -98,7 +98,7 @@ int foo(int n) { // CHECK: getelementptr inbounds [4 x %struct.kmp_depend_info], [4 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 1 // CHECK: getelementptr inbounds [4 x %struct.kmp_depend_info], [4 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 2 // CHECK: getelementptr inbounds [4 x %struct.kmp_depend_info], [4 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 3 - // CHECK: [[DEP_START:%.+]] = getelementptr inbounds [4 x %struct.kmp_depend_info], [4 x %struct.kmp_depend_info]* %{{.+}}, i32 0, i32 0 + // CHECK: [[DEP_START:%.+]] = getelementptr inbounds [4 x %struct.kmp_depend_info], [4 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 0 // CHECK: [[DEP:%.+]] = bitcast %struct.kmp_depend_info* [[DEP_START]] to i8* // CHECK: call void @__kmpc_omp_wait_deps(%struct.ident_t* [[ID]], i32 [[GTID]], i32 4, i8* [[DEP]], i32 0, i8* null) // CHECK: call void @__kmpc_omp_task_begin_if0(%struct.ident_t* [[ID]], i32 [[GTID]], i8* [[TASK]]) @@ -138,7 +138,7 @@ int foo(int n) { // CHECK: getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 0 // CHECK: getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 1 // CHECK: getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 2 - // CHECK: [[DEP_START:%.+]] = getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* %{{.+}}, i32 0, i32 0 + // CHECK: [[DEP_START:%.+]] = getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 0 // CHECK: [[DEP:%.+]] = bitcast %struct.kmp_depend_info* [[DEP_START]] to i8* // CHECK: call i32 @__kmpc_omp_task_with_deps(%struct.ident_t* [[ID]], i32 [[GTID]], i8* [[TASK]], i32 3, i8* [[DEP]], i32 0, i8* null) // CHECK: br label %[[EXIT:.+]] @@ -154,7 +154,7 @@ int foo(int n) { // CHECK: getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 0 // CHECK: getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 1 // CHECK: getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 2 - // CHECK: [[DEP_START:%.+]] = getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* %{{.+}}, i32 0, i32 0 + // CHECK: [[DEP_START:%.+]] = getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 0 // CHECK: [[DEP:%.+]] = bitcast %struct.kmp_depend_info* [[DEP_START]] to i8* // CHECK: call i32 @__kmpc_omp_task_with_deps(%struct.ident_t* [[ID]], i32 [[GTID]], i8* [[TASK]], i32 3, i8* [[DEP]], i32 0, i8* null) // CHECK: br label %[[EXIT:.+]] @@ -170,7 +170,7 @@ int foo(int n) { // CHECK: [[TASK:%.+]] = call i8* @__kmpc_omp_task_alloc(%struct.ident_t* [[ID]], i32 [[GTID]], i32 1, i[[SZ]] {{48|24}}, i[[SZ]] 4, i32 (i32, i8*)* bitcast (i32 (i32, %{{.+}}*)* [[TASK_ENTRY2:@.+]] to i32 (i32, i8*)*)) // CHECK: [[BC_TASK:%.+]] = bitcast i8* [[TASK]] to [[TASK_TY2:%.+]]* // CHECK: getelementptr inbounds [1 x %struct.kmp_depend_info], [1 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 0 - // CHECK: [[DEP_START:%.+]] = getelementptr inbounds [1 x %struct.kmp_depend_info], [1 x %struct.kmp_depend_info]* %{{.+}}, i32 0, i32 0 + // CHECK: [[DEP_START:%.+]] = getelementptr inbounds [1 x %struct.kmp_depend_info], [1 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 0 // CHECK: [[DEP:%.+]] = bitcast %struct.kmp_depend_info* [[DEP_START]] to i8* // CHECK: call void @__kmpc_omp_wait_deps(%struct.ident_t* [[ID]], i32 [[GTID]], i32 1, i8* [[DEP]], i32 0, i8* null) // CHECK: call void @__kmpc_omp_task_begin_if0(%struct.ident_t* [[ID]], i32 [[GTID]], i8* [[TASK]]) diff --git a/clang/test/OpenMP/target_teams_distribute_map_messages.cpp b/clang/test/OpenMP/target_teams_distribute_map_messages.cpp index bbfa7cde9aac0..e4c1d0f898436 100644 --- a/clang/test/OpenMP/target_teams_distribute_map_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_map_messages.cpp @@ -163,7 +163,7 @@ T tmain(T argc) { for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute map(always: x) // expected-error {{missing map type}} for (i = 0; i < argc; ++i) foo(); -#pragma omp target teams distribute map(tofrom, always: x) // expected-error {{incorrect map type modifier, expected 'always' or 'close'}} expected-error {{missing map type}} +#pragma omp target teams distribute map(tofrom, always: x) // expected-error {{incorrect map type modifier, expected 'always', 'close', or 'mapper'}} expected-error {{missing map type}} for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute map(always, tofrom: always, tofrom, x) for (i = 0; i < argc; ++i) foo(); @@ -271,7 +271,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute map(always: x) // expected-error {{missing map type}} for (i = 0; i < argc; ++i) foo(); -#pragma omp target teams distribute map(tofrom, always: x) // expected-error {{incorrect map type modifier, expected 'always' or 'close'}} expected-error {{missing map type}} +#pragma omp target teams distribute map(tofrom, always: x) // expected-error {{incorrect map type modifier, expected 'always', 'close', or 'mapper'}} expected-error {{missing map type}} for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute map(always, tofrom: always, tofrom, x) for (i = 0; i < argc; ++i) foo(); diff --git a/clang/test/OpenMP/target_teams_distribute_parallel_for_depend_codegen.cpp b/clang/test/OpenMP/target_teams_distribute_parallel_for_depend_codegen.cpp index f573c04547740..884c3642fb343 100644 --- a/clang/test/OpenMP/target_teams_distribute_parallel_for_depend_codegen.cpp +++ b/clang/test/OpenMP/target_teams_distribute_parallel_for_depend_codegen.cpp @@ -98,7 +98,7 @@ int foo(int n) { // CHECK: getelementptr inbounds [4 x %struct.kmp_depend_info], [4 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 1 // CHECK: getelementptr inbounds [4 x %struct.kmp_depend_info], [4 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 2 // CHECK: getelementptr inbounds [4 x %struct.kmp_depend_info], [4 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 3 - // CHECK: [[DEP_START:%.+]] = getelementptr inbounds [4 x %struct.kmp_depend_info], [4 x %struct.kmp_depend_info]* %{{.+}}, i32 0, i32 0 + // CHECK: [[DEP_START:%.+]] = getelementptr inbounds [4 x %struct.kmp_depend_info], [4 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 0 // CHECK: [[DEP:%.+]] = bitcast %struct.kmp_depend_info* [[DEP_START]] to i8* // CHECK: call void @__kmpc_omp_wait_deps(%struct.ident_t* [[ID]], i32 [[GTID]], i32 4, i8* [[DEP]], i32 0, i8* null) // CHECK: call void @__kmpc_omp_task_begin_if0(%struct.ident_t* [[ID]], i32 [[GTID]], i8* [[TASK]]) @@ -138,7 +138,7 @@ int foo(int n) { // CHECK: getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 0 // CHECK: getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 1 // CHECK: getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 2 - // CHECK: [[DEP_START:%.+]] = getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* %{{.+}}, i32 0, i32 0 + // CHECK: [[DEP_START:%.+]] = getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 0 // CHECK: [[DEP:%.+]] = bitcast %struct.kmp_depend_info* [[DEP_START]] to i8* // CHECK: call i32 @__kmpc_omp_task_with_deps(%struct.ident_t* [[ID]], i32 [[GTID]], i8* [[TASK]], i32 3, i8* [[DEP]], i32 0, i8* null) // CHECK: br label %[[EXIT:.+]] @@ -154,7 +154,7 @@ int foo(int n) { // CHECK: getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 0 // CHECK: getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 1 // CHECK: getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 2 - // CHECK: [[DEP_START:%.+]] = getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* %{{.+}}, i32 0, i32 0 + // CHECK: [[DEP_START:%.+]] = getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 0 // CHECK: [[DEP:%.+]] = bitcast %struct.kmp_depend_info* [[DEP_START]] to i8* // CHECK: call i32 @__kmpc_omp_task_with_deps(%struct.ident_t* [[ID]], i32 [[GTID]], i8* [[TASK]], i32 3, i8* [[DEP]], i32 0, i8* null) // CHECK: br label %[[EXIT:.+]] @@ -170,7 +170,7 @@ int foo(int n) { // CHECK: [[TASK:%.+]] = call i8* @__kmpc_omp_task_alloc(%struct.ident_t* [[ID]], i32 [[GTID]], i32 1, i[[SZ]] {{48|24}}, i[[SZ]] 4, i32 (i32, i8*)* bitcast (i32 (i32, %{{.+}}*)* [[TASK_ENTRY2:@.+]] to i32 (i32, i8*)*)) // CHECK: [[BC_TASK:%.+]] = bitcast i8* [[TASK]] to [[TASK_TY2:%.+]]* // CHECK: getelementptr inbounds [1 x %struct.kmp_depend_info], [1 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 0 - // CHECK: [[DEP_START:%.+]] = getelementptr inbounds [1 x %struct.kmp_depend_info], [1 x %struct.kmp_depend_info]* %{{.+}}, i32 0, i32 0 + // CHECK: [[DEP_START:%.+]] = getelementptr inbounds [1 x %struct.kmp_depend_info], [1 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 0 // CHECK: [[DEP:%.+]] = bitcast %struct.kmp_depend_info* [[DEP_START]] to i8* // CHECK: call void @__kmpc_omp_wait_deps(%struct.ident_t* [[ID]], i32 [[GTID]], i32 1, i8* [[DEP]], i32 0, i8* null) // CHECK: call void @__kmpc_omp_task_begin_if0(%struct.ident_t* [[ID]], i32 [[GTID]], i8* [[TASK]]) diff --git a/clang/test/OpenMP/target_teams_distribute_parallel_for_map_messages.cpp b/clang/test/OpenMP/target_teams_distribute_parallel_for_map_messages.cpp index f585d0a1eed07..878fac15170cd 100644 --- a/clang/test/OpenMP/target_teams_distribute_parallel_for_map_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_parallel_for_map_messages.cpp @@ -163,7 +163,7 @@ T tmain(T argc) { for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute parallel for map(always: x) // expected-error {{missing map type}} for (i = 0; i < argc; ++i) foo(); -#pragma omp target teams distribute parallel for map(tofrom, always: x) // expected-error {{incorrect map type modifier, expected 'always' or 'close'}} expected-error {{missing map type}} +#pragma omp target teams distribute parallel for map(tofrom, always: x) // expected-error {{incorrect map type modifier, expected 'always', 'close', or 'mapper'}} expected-error {{missing map type}} for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute parallel for map(always, tofrom: always, tofrom, x) for (i = 0; i < argc; ++i) foo(); @@ -271,7 +271,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute parallel for map(always: x) // expected-error {{missing map type}} for (i = 0; i < argc; ++i) foo(); -#pragma omp target teams distribute parallel for map(tofrom, always: x) // expected-error {{incorrect map type modifier, expected 'always' or 'close'}} expected-error {{missing map type}} +#pragma omp target teams distribute parallel for map(tofrom, always: x) // expected-error {{incorrect map type modifier, expected 'always', 'close', or 'mapper'}} expected-error {{missing map type}} for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute parallel for map(always, tofrom: always, tofrom, x) for (i = 0; i < argc; ++i) foo(); diff --git a/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_codegen.cpp b/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_codegen.cpp index 7a1ea810911ee..6846aaf434d2e 100644 --- a/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_codegen.cpp +++ b/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_codegen.cpp @@ -104,7 +104,7 @@ int target_teams_fun(int *g){ // CK1: ret void // CK1: define internal void @[[OUTL1]]({{.+}}) - // CK1: [[ARRDECAY:%.+]] = getelementptr inbounds [1000 x i32], [1000 x i32]* %{{.+}}, i32 0, i32 0 + // CK1: [[ARRDECAY:%.+]] = getelementptr inbounds [1000 x i32], [1000 x i32]* %{{.+}}, i{{32|64}} 0, i{{32|64}} 0 // CK1: [[ARR_CAST:%.+]] = ptrtoint i32* [[ARRDECAY]] to i{{32|64}} // CK1: [[MASKED_PTR:%.+]] = and i{{32|64}} [[ARR_CAST]], 7 // CK1: [[COND:%.+]] = icmp eq i{{32|64}} [[MASKED_PTR]], 0 diff --git a/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_depend_codegen.cpp b/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_depend_codegen.cpp index 1258e685ea739..8a02da4c62c82 100644 --- a/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_depend_codegen.cpp +++ b/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_depend_codegen.cpp @@ -98,7 +98,7 @@ int foo(int n) { // CHECK: getelementptr inbounds [4 x %struct.kmp_depend_info], [4 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 1 // CHECK: getelementptr inbounds [4 x %struct.kmp_depend_info], [4 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 2 // CHECK: getelementptr inbounds [4 x %struct.kmp_depend_info], [4 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 3 - // CHECK: [[DEP_START:%.+]] = getelementptr inbounds [4 x %struct.kmp_depend_info], [4 x %struct.kmp_depend_info]* %{{.+}}, i32 0, i32 0 + // CHECK: [[DEP_START:%.+]] = getelementptr inbounds [4 x %struct.kmp_depend_info], [4 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 0 // CHECK: [[DEP:%.+]] = bitcast %struct.kmp_depend_info* [[DEP_START]] to i8* // CHECK: call void @__kmpc_omp_wait_deps(%struct.ident_t* [[ID]], i32 [[GTID]], i32 4, i8* [[DEP]], i32 0, i8* null) // CHECK: call void @__kmpc_omp_task_begin_if0(%struct.ident_t* [[ID]], i32 [[GTID]], i8* [[TASK]]) @@ -138,7 +138,7 @@ int foo(int n) { // CHECK: getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 0 // CHECK: getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 1 // CHECK: getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 2 - // CHECK: [[DEP_START:%.+]] = getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* %{{.+}}, i32 0, i32 0 + // CHECK: [[DEP_START:%.+]] = getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 0 // CHECK: [[DEP:%.+]] = bitcast %struct.kmp_depend_info* [[DEP_START]] to i8* // CHECK: call i32 @__kmpc_omp_task_with_deps(%struct.ident_t* [[ID]], i32 [[GTID]], i8* [[TASK]], i32 3, i8* [[DEP]], i32 0, i8* null) // CHECK: br label %[[EXIT:.+]] @@ -154,7 +154,7 @@ int foo(int n) { // CHECK: getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 0 // CHECK: getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 1 // CHECK: getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 2 - // CHECK: [[DEP_START:%.+]] = getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* %{{.+}}, i32 0, i32 0 + // CHECK: [[DEP_START:%.+]] = getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 0 // CHECK: [[DEP:%.+]] = bitcast %struct.kmp_depend_info* [[DEP_START]] to i8* // CHECK: call i32 @__kmpc_omp_task_with_deps(%struct.ident_t* [[ID]], i32 [[GTID]], i8* [[TASK]], i32 3, i8* [[DEP]], i32 0, i8* null) // CHECK: br label %[[EXIT:.+]] @@ -170,7 +170,7 @@ int foo(int n) { // CHECK: [[TASK:%.+]] = call i8* @__kmpc_omp_task_alloc(%struct.ident_t* [[ID]], i32 [[GTID]], i32 1, i[[SZ]] {{48|24}}, i[[SZ]] 4, i32 (i32, i8*)* bitcast (i32 (i32, %{{.+}}*)* [[TASK_ENTRY2:@.+]] to i32 (i32, i8*)*)) // CHECK: [[BC_TASK:%.+]] = bitcast i8* [[TASK]] to [[TASK_TY2:%.+]]* // CHECK: getelementptr inbounds [1 x %struct.kmp_depend_info], [1 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 0 - // CHECK: [[DEP_START:%.+]] = getelementptr inbounds [1 x %struct.kmp_depend_info], [1 x %struct.kmp_depend_info]* %{{.+}}, i32 0, i32 0 + // CHECK: [[DEP_START:%.+]] = getelementptr inbounds [1 x %struct.kmp_depend_info], [1 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 0 // CHECK: [[DEP:%.+]] = bitcast %struct.kmp_depend_info* [[DEP_START]] to i8* // CHECK: call void @__kmpc_omp_wait_deps(%struct.ident_t* [[ID]], i32 [[GTID]], i32 1, i8* [[DEP]], i32 0, i8* null) // CHECK: call void @__kmpc_omp_task_begin_if0(%struct.ident_t* [[ID]], i32 [[GTID]], i8* [[TASK]]) diff --git a/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_map_messages.cpp b/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_map_messages.cpp index 5cf03278959b8..b2da6808855b9 100644 --- a/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_map_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_map_messages.cpp @@ -163,7 +163,7 @@ T tmain(T argc) { for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute parallel for simd map(always: x) // expected-error {{missing map type}} for (i = 0; i < argc; ++i) foo(); -#pragma omp target teams distribute parallel for simd map(tofrom, always: x) // expected-error {{incorrect map type modifier, expected 'always' or 'close'}} expected-error {{missing map type}} +#pragma omp target teams distribute parallel for simd map(tofrom, always: x) // expected-error {{incorrect map type modifier, expected 'always', 'close', or 'mapper'}} expected-error {{missing map type}} for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute parallel for simd map(always, tofrom: always, tofrom, x) for (i = 0; i < argc; ++i) foo(); @@ -271,7 +271,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute parallel for simd map(always: x) // expected-error {{missing map type}} for (i = 0; i < argc; ++i) foo(); -#pragma omp target teams distribute parallel for simd map(tofrom, always: x) // expected-error {{incorrect map type modifier, expected 'always' or 'close'}} expected-error {{missing map type}} +#pragma omp target teams distribute parallel for simd map(tofrom, always: x) // expected-error {{incorrect map type modifier, expected 'always', 'close', or 'mapper'}} expected-error {{missing map type}} for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute parallel for simd map(always, tofrom: always, tofrom, x) for (i = 0; i < argc; ++i) foo(); diff --git a/clang/test/OpenMP/target_teams_distribute_simd_depend_codegen.cpp b/clang/test/OpenMP/target_teams_distribute_simd_depend_codegen.cpp index 1eb732322ce6c..0516979f8c398 100644 --- a/clang/test/OpenMP/target_teams_distribute_simd_depend_codegen.cpp +++ b/clang/test/OpenMP/target_teams_distribute_simd_depend_codegen.cpp @@ -98,7 +98,7 @@ int foo(int n) { // CHECK: getelementptr inbounds [4 x %struct.kmp_depend_info], [4 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 1 // CHECK: getelementptr inbounds [4 x %struct.kmp_depend_info], [4 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 2 // CHECK: getelementptr inbounds [4 x %struct.kmp_depend_info], [4 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 3 - // CHECK: [[DEP_START:%.+]] = getelementptr inbounds [4 x %struct.kmp_depend_info], [4 x %struct.kmp_depend_info]* %{{.+}}, i32 0, i32 0 + // CHECK: [[DEP_START:%.+]] = getelementptr inbounds [4 x %struct.kmp_depend_info], [4 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 0 // CHECK: [[DEP:%.+]] = bitcast %struct.kmp_depend_info* [[DEP_START]] to i8* // CHECK: call void @__kmpc_omp_wait_deps(%struct.ident_t* [[ID]], i32 [[GTID]], i32 4, i8* [[DEP]], i32 0, i8* null) // CHECK: call void @__kmpc_omp_task_begin_if0(%struct.ident_t* [[ID]], i32 [[GTID]], i8* [[TASK]]) @@ -138,7 +138,7 @@ int foo(int n) { // CHECK: getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 0 // CHECK: getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 1 // CHECK: getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 2 - // CHECK: [[DEP_START:%.+]] = getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* %{{.+}}, i32 0, i32 0 + // CHECK: [[DEP_START:%.+]] = getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 0 // CHECK: [[DEP:%.+]] = bitcast %struct.kmp_depend_info* [[DEP_START]] to i8* // CHECK: call i32 @__kmpc_omp_task_with_deps(%struct.ident_t* [[ID]], i32 [[GTID]], i8* [[TASK]], i32 3, i8* [[DEP]], i32 0, i8* null) // CHECK: br label %[[EXIT:.+]] @@ -154,7 +154,7 @@ int foo(int n) { // CHECK: getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 0 // CHECK: getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 1 // CHECK: getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 2 - // CHECK: [[DEP_START:%.+]] = getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* %{{.+}}, i32 0, i32 0 + // CHECK: [[DEP_START:%.+]] = getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 0 // CHECK: [[DEP:%.+]] = bitcast %struct.kmp_depend_info* [[DEP_START]] to i8* // CHECK: call i32 @__kmpc_omp_task_with_deps(%struct.ident_t* [[ID]], i32 [[GTID]], i8* [[TASK]], i32 3, i8* [[DEP]], i32 0, i8* null) // CHECK: br label %[[EXIT:.+]] @@ -170,7 +170,7 @@ int foo(int n) { // CHECK: [[TASK:%.+]] = call i8* @__kmpc_omp_task_alloc(%struct.ident_t* [[ID]], i32 [[GTID]], i32 1, i[[SZ]] {{48|24}}, i[[SZ]] 4, i32 (i32, i8*)* bitcast (i32 (i32, %{{.+}}*)* [[TASK_ENTRY2:@.+]] to i32 (i32, i8*)*)) // CHECK: [[BC_TASK:%.+]] = bitcast i8* [[TASK]] to [[TASK_TY2:%.+]]* // CHECK: getelementptr inbounds [1 x %struct.kmp_depend_info], [1 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 0 - // CHECK: [[DEP_START:%.+]] = getelementptr inbounds [1 x %struct.kmp_depend_info], [1 x %struct.kmp_depend_info]* %{{.+}}, i32 0, i32 0 + // CHECK: [[DEP_START:%.+]] = getelementptr inbounds [1 x %struct.kmp_depend_info], [1 x %struct.kmp_depend_info]* %{{.+}}, i[[SZ]] 0, i[[SZ]] 0 // CHECK: [[DEP:%.+]] = bitcast %struct.kmp_depend_info* [[DEP_START]] to i8* // CHECK: call void @__kmpc_omp_wait_deps(%struct.ident_t* [[ID]], i32 [[GTID]], i32 1, i8* [[DEP]], i32 0, i8* null) // CHECK: call void @__kmpc_omp_task_begin_if0(%struct.ident_t* [[ID]], i32 [[GTID]], i8* [[TASK]]) diff --git a/clang/test/OpenMP/target_teams_distribute_simd_map_messages.cpp b/clang/test/OpenMP/target_teams_distribute_simd_map_messages.cpp index 99c633a45dd9e..c559bcb410a83 100644 --- a/clang/test/OpenMP/target_teams_distribute_simd_map_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_simd_map_messages.cpp @@ -163,7 +163,7 @@ T tmain(T argc) { for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute simd map(always: x) // expected-error {{missing map type}} for (i = 0; i < argc; ++i) foo(); -#pragma omp target teams distribute simd map(tofrom, always: x) // expected-error {{incorrect map type modifier, expected 'always' or 'close'}} expected-error {{missing map type}} +#pragma omp target teams distribute simd map(tofrom, always: x) // expected-error {{incorrect map type modifier, expected 'always', 'close', or 'mapper'}} expected-error {{missing map type}} for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute simd map(always, tofrom: always, tofrom, x) for (i = 0; i < argc; ++i) foo(); @@ -271,7 +271,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute simd map(always: x) // expected-error {{missing map type}} for (i = 0; i < argc; ++i) foo(); -#pragma omp target teams distribute simd map(tofrom, always: x) // expected-error {{incorrect map type modifier, expected 'always' or 'close'}} expected-error {{missing map type}} +#pragma omp target teams distribute simd map(tofrom, always: x) // expected-error {{incorrect map type modifier, expected 'always', 'close', or 'mapper'}} expected-error {{missing map type}} for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute simd map(always, tofrom: always, tofrom, x) for (i = 0; i < argc; ++i) foo(); diff --git a/clang/test/OpenMP/target_teams_map_messages.cpp b/clang/test/OpenMP/target_teams_map_messages.cpp index 4b2629ee33454..e59a96c881336 100644 --- a/clang/test/OpenMP/target_teams_map_messages.cpp +++ b/clang/test/OpenMP/target_teams_map_messages.cpp @@ -454,7 +454,7 @@ T tmain(T argc) { #pragma omp target data map(always, tofrom: x) #pragma omp target data map(always: x) // expected-error {{missing map type}} -#pragma omp target data map(tofrom, always: x) // expected-error {{incorrect map type modifier, expected 'always' or 'close'}} expected-error {{missing map type}} +#pragma omp target data map(tofrom, always: x) // expected-error {{incorrect map type modifier, expected 'always', 'close', or 'mapper'}} expected-error {{missing map type}} #pragma omp target data map(always, tofrom: always, tofrom, x) #pragma omp target teams map(tofrom j) // expected-error {{expected ',' or ')' in 'map' clause}} foo(); @@ -529,7 +529,7 @@ int main(int argc, char **argv) { #pragma omp target data map(always, tofrom: x) #pragma omp target data map(always: x) // expected-error {{missing map type}} -#pragma omp target data map(tofrom, always: x) // expected-error {{incorrect map type modifier, expected 'always' or 'close'}} expected-error {{missing map type}} +#pragma omp target data map(tofrom, always: x) // expected-error {{incorrect map type modifier, expected 'always', 'close', or 'mapper'}} expected-error {{missing map type}} #pragma omp target data map(always, tofrom: always, tofrom, x) #pragma omp target teams map(tofrom j) // expected-error {{expected ',' or ')' in 'map' clause}} foo(); diff --git a/clang/test/OpenMP/target_update_depend_codegen.cpp b/clang/test/OpenMP/target_update_depend_codegen.cpp index ee1b0bfceeeea..96c51f8cf46c6 100644 --- a/clang/test/OpenMP/target_update_depend_codegen.cpp +++ b/clang/test/OpenMP/target_update_depend_codegen.cpp @@ -90,7 +90,7 @@ void foo(int arg) { // CK1: store i[[sz]] 4, i[[sz]]* [[DEP_SIZE]], // CK1: [[DEP_ATTRS:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 2 // CK1: store i8 1, i8* [[DEP_ATTRS]] - // CK1: [[DEP:%.+]] = getelementptr inbounds [1 x %struct.kmp_depend_info], [1 x %struct.kmp_depend_info]* [[MAIN_DEP]], i32 0, i32 0 + // CK1: [[DEP:%.+]] = getelementptr inbounds [1 x %struct.kmp_depend_info], [1 x %struct.kmp_depend_info]* [[MAIN_DEP]], i[[sz]] 0, i[[sz]] 0 // CK1: [[BC:%.+]] = bitcast %struct.kmp_depend_info* [[DEP]] to i8* // CK1: = call i32 @__kmpc_omp_task_with_deps(%struct.ident_t* @{{.+}}, i32 %{{.+}}, i8* [[RES]], i32 1, i8* [[BC]], i32 0, i8* null) @@ -161,7 +161,7 @@ void foo(int arg) { // CK1: store i[[sz]] 800, i[[sz]]* [[DEP_SIZE]], // CK1: [[DEP_ATTRS:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 2 // CK1: store i8 3, i8* [[DEP_ATTRS]] - // CK1: [[DEP:%.+]] = getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* [[MAIN_DEP]], i32 0, i32 0 + // CK1: [[DEP:%.+]] = getelementptr inbounds [3 x %struct.kmp_depend_info], [3 x %struct.kmp_depend_info]* [[MAIN_DEP]], i[[sz]] 0, i[[sz]] 0 // CK1: [[BC:%.+]] = bitcast %struct.kmp_depend_info* [[DEP]] to i8* // CK1: call void @__kmpc_omp_wait_deps(%struct.ident_t* @{{.+}}, i32 %{{.+}}, i32 3, i8* [[BC]], i32 0, i8* null) // CK1: call void @__kmpc_omp_task_begin_if0(%struct.ident_t* @{{.+}}, i32 %{{.+}}, i8* [[RES]]) @@ -239,7 +239,7 @@ void foo(int arg) { // CK1: store i[[sz]] 800, i[[sz]]* [[DEP_SIZE]], // CK1: [[DEP_ATTRS:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 2 // CK1: store i8 3, i8* [[DEP_ATTRS]] - // CK1: [[DEP:%.+]] = getelementptr inbounds [4 x %struct.kmp_depend_info], [4 x %struct.kmp_depend_info]* [[MAIN_DEP]], i32 0, i32 0 + // CK1: [[DEP:%.+]] = getelementptr inbounds [4 x %struct.kmp_depend_info], [4 x %struct.kmp_depend_info]* [[MAIN_DEP]], i[[sz]] 0, i[[sz]] 0 // CK1: [[BC:%.+]] = bitcast %struct.kmp_depend_info* [[DEP]] to i8* // CK1: call void @__kmpc_omp_wait_deps(%struct.ident_t* @{{.+}}, i32 %{{.+}}, i32 4, i8* [[BC]], i32 0, i8* null) // CK1: call void @__kmpc_omp_task_begin_if0(%struct.ident_t* @{{.+}}, i32 %{{.+}}, i8* [[RES]]) @@ -320,7 +320,7 @@ void foo(int arg) { // CK1: store i[[sz]] 4, i[[sz]]* [[DEP_SIZE]], // CK1: [[DEP_ATTRS:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 2 // CK1: store i8 1, i8* [[DEP_ATTRS]] - // CK1: [[DEP:%.+]] = getelementptr inbounds [5 x %struct.kmp_depend_info], [5 x %struct.kmp_depend_info]* [[MAIN_DEP]], i32 0, i32 0 + // CK1: [[DEP:%.+]] = getelementptr inbounds [5 x %struct.kmp_depend_info], [5 x %struct.kmp_depend_info]* [[MAIN_DEP]], i[[sz]] 0, i[[sz]] 0 // CK1: [[BC:%.+]] = bitcast %struct.kmp_depend_info* [[DEP]] to i8* // CK1: call void @__kmpc_omp_wait_deps(%struct.ident_t* @{{.+}}, i32 %{{.+}}, i32 5, i8* [[BC]], i32 0, i8* null) // CK1: call void @__kmpc_omp_task_begin_if0(%struct.ident_t* @{{.+}}, i32 %{{.+}}, i8* [[RES]]) diff --git a/clang/test/OpenMP/target_vla_messages.cpp b/clang/test/OpenMP/target_vla_messages.cpp index b744081e9837a..30a2751724264 100644 --- a/clang/test/OpenMP/target_vla_messages.cpp +++ b/clang/test/OpenMP/target_vla_messages.cpp @@ -47,7 +47,7 @@ void target_template(int arg) { #pragma omp target { #ifdef NO_VLA - // expected-error@+2 {{variable length arrays are not supported for the current target}} + // expected-error@+2 2 {{variable length arrays are not supported for the current target}} #endif T vla[arg]; } @@ -73,6 +73,9 @@ void target(int arg) { } } +#ifdef NO_VLA + // expected-note@+2 {{in instantiation of function template specialization 'target_template' requested here}} +#endif target_template(arg); } diff --git a/clang/test/OpenMP/task_codegen.cpp b/clang/test/OpenMP/task_codegen.cpp index a20c87239b833..2c4eb682d852d 100644 --- a/clang/test/OpenMP/task_codegen.cpp +++ b/clang/test/OpenMP/task_codegen.cpp @@ -95,7 +95,7 @@ int main() { // CHECK: store i64 [[SIZEOF]], i64* [[T0]] // CHECK: [[T0:%.*]] = getelementptr inbounds [[KMP_DEPEND_INFO]], [[KMP_DEPEND_INFO]]* %{{[^,]+}}, i32 0, i32 2 // CHECK: store i8 1, i8* [[T0]] -// CHECK: [[DEPS:%.*]] = getelementptr inbounds [4 x [[KMP_DEPEND_INFO]]], [4 x [[KMP_DEPEND_INFO]]]* [[DEPENDENCIES]], i32 0, i32 0 +// CHECK: [[DEPS:%.*]] = getelementptr inbounds [4 x [[KMP_DEPEND_INFO]]], [4 x [[KMP_DEPEND_INFO]]]* [[DEPENDENCIES]], i{{32|64}} 0, i{{32|64}} 0 // CHECK: bitcast [[KMP_DEPEND_INFO]]* [[DEPS]] to i8* // CHECK: call i32 @__kmpc_omp_task_with_deps([[IDENT_T]]* @{{.+}}, i32 [[GTID]], i8* [[ORIG_TASK_PTR]], i32 4, i8* %{{[^,]+}}, i32 0, i8* null) #pragma omp task shared(a, s) depend(in : a, b, s, arr[:]) @@ -142,7 +142,7 @@ int main() { // CHECK: store i64 [[SIZEOF]], i64* // CHECK: getelementptr inbounds [[KMP_DEPEND_INFO]], [[KMP_DEPEND_INFO]]* %{{[^,]+}}, i32 0, i32 2 // CHECK: store i8 3, i8* -// CHECK: getelementptr inbounds [2 x [[KMP_DEPEND_INFO]]], [2 x [[KMP_DEPEND_INFO]]]* %{{[^,]+}}, i32 0, i32 0 +// CHECK: getelementptr inbounds [2 x [[KMP_DEPEND_INFO]]], [2 x [[KMP_DEPEND_INFO]]]* %{{[^,]+}}, i{{32|64}} 0, i{{32|64}} 0 // CHECK: bitcast [[KMP_DEPEND_INFO]]* %{{.+}} to i8* // CHECK: call i32 @__kmpc_omp_task_with_deps([[IDENT_T]]* @{{.+}}, i32 [[GTID]], i8* [[ORIG_TASK_PTR]], i32 2, i8* %{{[^,]+}}, i32 0, i8* null) #pragma omp task untied depend(out : s[0], arr[4:][b]) @@ -181,7 +181,7 @@ int main() { // CHECK: store i64 [[SIZEOF]], i64* // CHECK: getelementptr inbounds [[KMP_DEPEND_INFO]], [[KMP_DEPEND_INFO]]* %{{[^,]+}}, i32 0, i32 2 // CHECK: store i8 4, i8* -// CHECK: getelementptr inbounds [2 x [[KMP_DEPEND_INFO]]], [2 x [[KMP_DEPEND_INFO]]]* %{{[^,]+}}, i32 0, i32 0 +// CHECK: getelementptr inbounds [2 x [[KMP_DEPEND_INFO]]], [2 x [[KMP_DEPEND_INFO]]]* %{{[^,]+}}, i{{32|64}} 0, i{{32|64}} 0 // CHECK: bitcast [[KMP_DEPEND_INFO]]* %{{.+}} to i8* // CHECK: call i32 @__kmpc_omp_task_with_deps([[IDENT_T]]* @{{.+}}, i32 [[GTID]], i8* [[ORIG_TASK_PTR]], i32 2, i8* %{{[^,]+}}, i32 0, i8* null) #pragma omp task untied depend(mutexinoutset: s[0], arr[4:][b]) @@ -229,7 +229,7 @@ int main() { // CHECK: store i64 [[SIZEOF]], i64* // CHECK: getelementptr inbounds [[KMP_DEPEND_INFO]], [[KMP_DEPEND_INFO]]* %{{[^,]+}}, i32 0, i32 2 // CHECK: store i8 3, i8* -// CHECK: getelementptr inbounds [3 x [[KMP_DEPEND_INFO]]], [3 x [[KMP_DEPEND_INFO]]]* %{{[^,]+}}, i32 0, i32 0 +// CHECK: getelementptr inbounds [3 x [[KMP_DEPEND_INFO]]], [3 x [[KMP_DEPEND_INFO]]]* %{{[^,]+}}, i{{32|64}} 0, i{{32|64}} 0 // CHECK: bitcast [[KMP_DEPEND_INFO]]* %{{.+}} to i8* // CHECK: call i32 @__kmpc_omp_task_with_deps([[IDENT_T]]* @{{.+}}, i32 [[GTID]], i8* [[ORIG_TASK_PTR]], i32 3, i8* %{{[^,]+}}, i32 0, i8* null) #pragma omp task final(true) depend(inout: a, s[1], arr[:a][3:]) @@ -332,4 +332,3 @@ struct S1 { // CHECK: call i8* @__kmpc_omp_task_alloc( #endif - diff --git a/clang/test/OpenMP/taskwait_messages.cpp b/clang/test/OpenMP/taskwait_messages.cpp index 46efff5972e8e..55bf2ddcada0c 100644 --- a/clang/test/OpenMP/taskwait_messages.cpp +++ b/clang/test/OpenMP/taskwait_messages.cpp @@ -29,7 +29,7 @@ T tmain(T argc) { #pragma omp taskwait // expected-error {{'#pragma omp taskwait' cannot be an immediate substatement}} switch (argc) case 1: -#pragma omp taskwait +#pragma omp taskwait // expected-error {{'#pragma omp taskwait' cannot be an immediate substatement}} switch (argc) case 1: { #pragma omp taskwait @@ -49,7 +49,7 @@ T tmain(T argc) { #pragma omp taskwait } label: -#pragma omp taskwait // expected-error {{'#pragma omp taskwait' cannot be an immediate substatement}} +#pragma omp taskwait label1 : { #pragma omp taskwait } @@ -83,7 +83,7 @@ int main(int argc, char **argv) { #pragma omp taskwait // expected-error {{'#pragma omp taskwait' cannot be an immediate substatement}} switch (argc) case 1: -#pragma omp taskwait +#pragma omp taskwait // expected-error {{'#pragma omp taskwait' cannot be an immediate substatement}} switch (argc) case 1: { #pragma omp taskwait @@ -103,7 +103,7 @@ int main(int argc, char **argv) { #pragma omp taskwait } label: -#pragma omp taskwait // expected-error {{'#pragma omp taskwait' cannot be an immediate substatement}} +#pragma omp taskwait label1 : { #pragma omp taskwait } diff --git a/clang/test/OpenMP/taskyield_messages.cpp b/clang/test/OpenMP/taskyield_messages.cpp index fd98a8786f187..48f741df91507 100644 --- a/clang/test/OpenMP/taskyield_messages.cpp +++ b/clang/test/OpenMP/taskyield_messages.cpp @@ -29,7 +29,7 @@ T tmain(T argc) { #pragma omp taskyield // expected-error {{'#pragma omp taskyield' cannot be an immediate substatement}} switch (argc) case 1: -#pragma omp taskyield +#pragma omp taskyield // expected-error {{'#pragma omp taskyield' cannot be an immediate substatement}} switch (argc) case 1: { #pragma omp taskyield @@ -49,10 +49,13 @@ T tmain(T argc) { #pragma omp taskyield } label: -#pragma omp taskyield // expected-error {{'#pragma omp taskyield' cannot be an immediate substatement}} +#pragma omp taskyield label1 : { #pragma omp taskyield } +if (1) + label2: +#pragma omp taskyield // expected-error {{'#pragma omp taskyield' cannot be an immediate substatement}} return T(); } @@ -83,7 +86,7 @@ int main(int argc, char **argv) { #pragma omp taskyield // expected-error {{'#pragma omp taskyield' cannot be an immediate substatement}} switch (argc) case 1: -#pragma omp taskyield +#pragma omp taskyield // expected-error {{'#pragma omp taskyield' cannot be an immediate substatement}} switch (argc) case 1: { #pragma omp taskyield @@ -103,10 +106,13 @@ int main(int argc, char **argv) { #pragma omp taskyield } label: -#pragma omp taskyield // expected-error {{'#pragma omp taskyield' cannot be an immediate substatement}} +#pragma omp taskyield label1 : { #pragma omp taskyield } +if (1) + label2: +#pragma omp taskyield // expected-error {{'#pragma omp taskyield' cannot be an immediate substatement}} return tmain(argc); } diff --git a/clang/test/PCH/arc-blocks.mm b/clang/test/PCH/arc-blocks.mm new file mode 100644 index 0000000000000..2e17a570f8ba9 --- /dev/null +++ b/clang/test/PCH/arc-blocks.mm @@ -0,0 +1,49 @@ +// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-arc -fblocks -std=c++1y -emit-pch %s -o %t +// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-arc -fblocks -std=c++1y -include-pch %t -emit-llvm -o - %s | FileCheck %s + +#ifndef HEADER_INCLUDED +#define HEADER_INCLUDED + +namespace test_block_retain { + typedef void (^BlockTy)(); + void foo1(id); + + inline void initialization(id a) { + // Call to @llvm.objc.retainBlock isn't needed. + BlockTy b0 = ^{ foo1(a); }; + b0(); + } + + inline void assignmentConditional(id a, bool c) { + BlockTy b0; + if (c) + // @llvm.objc.retainBlock is called since 'b0' is declared in the outer scope. + b0 = ^{ foo1(a); }; + b0(); + } +} + +#else + +// CHECK: %[[STRUCT_BLOCK_DESCRIPTOR:.*]] = type { i64, i64 } + +namespace test_block_retain { +// CHECK-LABEL: define linkonce_odr void @_ZN17test_block_retain14initializationEP11objc_object( +// CHECK-NOT: call i8* @llvm.objc.retainBlock( + + void test_initialization(id a) { + initialization(a); + } + +// CHECK-LABEL: define void @_ZN17test_block_retain26test_assignmentConditionalEP11objc_objectb( +// CHECK: %[[BLOCK:.*]] = alloca <{ i8*, i32, i32, i8*, %[[STRUCT_BLOCK_DESCRIPTOR]]*, i8* }>, align 8 +// CHECK: %[[V4:.*]] = bitcast <{ i8*, i32, i32, i8*, %[[STRUCT_BLOCK_DESCRIPTOR]]*, i8* }>* %[[BLOCK]] to void ()* +// CHECK: %[[V5:.*]] = bitcast void ()* %[[V4]] to i8* +// CHECK: call i8* @llvm.objc.retainBlock(i8* %[[V5]]) + + void test_assignmentConditional(id a, bool c) { + assignmentConditional(a, c); + } +} + +#endif diff --git a/clang/test/Preprocessor/arm-pic-predefines.c b/clang/test/Preprocessor/arm-pic-predefines.c new file mode 100644 index 0000000000000..9082d79485112 --- /dev/null +++ b/clang/test/Preprocessor/arm-pic-predefines.c @@ -0,0 +1,14 @@ +// REQUIRES: arm-registered-target + +// RUN: %clang -target armv8--none-eabi -x c -E -dM %s -o - | FileCheck %s --check-prefix=NO-ROPI --check-prefix=NO-RWPI +// RUN: %clang -target armv8--none-eabi -x c -E -dM %s -o - -fropi | FileCheck %s --check-prefix=ROPI --check-prefix=NO-RWPI +// RUN: %clang -target armv8--none-eabi -x c -E -dM %s -o - -frwpi | FileCheck %s --check-prefix=NO-ROPI --check-prefix=RWPI +// RUN: %clang -target armv8--none-eabi -x c -E -dM %s -o - -fropi -frwpi | FileCheck %s --check-prefix=ROPI --check-prefix=RWPI + +// Pre-defined macros for position-independence modes + +// NO-ROPI-NOT: #define __APCS_ROPI +// ROPI: #define __ARM_ROPI + +// NO-RWPI-NOT: #define __APCS_RWPI +// RWPI: #define __ARM_RWPI diff --git a/clang/test/Preprocessor/include-header-missing-in-framework.c b/clang/test/Preprocessor/include-header-missing-in-framework.c new file mode 100644 index 0000000000000..cb09326a42806 --- /dev/null +++ b/clang/test/Preprocessor/include-header-missing-in-framework.c @@ -0,0 +1,18 @@ +// RUN: %clang_cc1 -fsyntax-only -F %S/Inputs -verify %s +// RUN: %clang_cc1 -fsyntax-only -F %S/Inputs -DTYPO_CORRECTION -verify %s + +// After finding a requested framework, we don't look for the same framework in +// a different location even if requested header is not found in the framework. +// It can be confusing when there is a framework with required header later in +// header search paths. Mention in diagnostics where the header lookup stopped. + +#ifndef TYPO_CORRECTION +#include +// expected-error@-1 {{'TestFramework/NotExistingHeader.h' file not found}} +// expected-note@-2 {{did not find header 'NotExistingHeader.h' in framework 'TestFramework' (loaded from}} + +#else +// Don't emit extra note for unsuccessfully typo-corrected include. +#include <#TestFramework/NotExistingHeader.h> +// expected-error@-1 {{'#TestFramework/NotExistingHeader.h' file not found}} +#endif // TYPO_CORRECTION diff --git a/clang/test/Preprocessor/init.c b/clang/test/Preprocessor/init.c index 366dc96aa5196..ac68c9ce58049 100644 --- a/clang/test/Preprocessor/init.c +++ b/clang/test/Preprocessor/init.c @@ -5991,7 +5991,7 @@ // PPC64LE:#define _ARCH_PWR5 1 // PPC64LE:#define _ARCH_PWR5X 1 // PPC64LE:#define _ARCH_PWR6 1 -// PPC64LE:#define _ARCH_PWR6X 1 +// PPC64LE-NOT:#define _ARCH_PWR6X 1 // PPC64LE:#define _ARCH_PWR7 1 // PPC64LE:#define _CALL_ELF 2 // PPC64LE:#define _LITTLE_ENDIAN 1 @@ -6331,7 +6331,7 @@ // PPCPWR7:#define _ARCH_PWR5 1 // PPCPWR7:#define _ARCH_PWR5X 1 // PPCPWR7:#define _ARCH_PWR6 1 -// PPCPWR7:#define _ARCH_PWR6X 1 +// PPCPWR7-NOT:#define _ARCH_PWR6X 1 // PPCPWR7:#define _ARCH_PWR7 1 // // RUN: %clang_cc1 -E -dM -ffreestanding -triple=powerpc64-none-none -target-cpu power7 -fno-signed-char < /dev/null | FileCheck -match-full-lines -check-prefix PPCPOWER7 %s @@ -6344,7 +6344,7 @@ // PPCPOWER7:#define _ARCH_PWR5 1 // PPCPOWER7:#define _ARCH_PWR5X 1 // PPCPOWER7:#define _ARCH_PWR6 1 -// PPCPOWER7:#define _ARCH_PWR6X 1 +// PPCPOWER7-NOT:#define _ARCH_PWR6X 1 // PPCPOWER7:#define _ARCH_PWR7 1 // // RUN: %clang_cc1 -E -dM -ffreestanding -triple=powerpc64-none-none -target-cpu pwr8 -fno-signed-char < /dev/null | FileCheck -match-full-lines -check-prefix PPCPWR8 %s @@ -6357,7 +6357,7 @@ // PPCPWR8:#define _ARCH_PWR5 1 // PPCPWR8:#define _ARCH_PWR5X 1 // PPCPWR8:#define _ARCH_PWR6 1 -// PPCPWR8:#define _ARCH_PWR6X 1 +// PPCPWR8-NOT:#define _ARCH_PWR6X 1 // PPCPWR8:#define _ARCH_PWR7 1 // PPCPWR8:#define _ARCH_PWR8 1 // @@ -6374,7 +6374,7 @@ // PPCPOWER8:#define _ARCH_PWR5 1 // PPCPOWER8:#define _ARCH_PWR5X 1 // PPCPOWER8:#define _ARCH_PWR6 1 -// PPCPOWER8:#define _ARCH_PWR6X 1 +// PPCPOWER8-NOT:#define _ARCH_PWR6X 1 // PPCPOWER8:#define _ARCH_PWR7 1 // PPCPOWER8:#define _ARCH_PWR8 1 // @@ -6388,7 +6388,7 @@ // PPCPWR9:#define _ARCH_PWR5 1 // PPCPWR9:#define _ARCH_PWR5X 1 // PPCPWR9:#define _ARCH_PWR6 1 -// PPCPWR9:#define _ARCH_PWR6X 1 +// PPCPWR9-NOT:#define _ARCH_PWR6X 1 // PPCPWR9:#define _ARCH_PWR7 1 // PPCPWR9:#define _ARCH_PWR9 1 // @@ -6402,7 +6402,7 @@ // PPCPOWER9:#define _ARCH_PWR5 1 // PPCPOWER9:#define _ARCH_PWR5X 1 // PPCPOWER9:#define _ARCH_PWR6 1 -// PPCPOWER9:#define _ARCH_PWR6X 1 +// PPCPOWER9-NOT:#define _ARCH_PWR6X 1 // PPCPOWER9:#define _ARCH_PWR7 1 // PPCPOWER9:#define _ARCH_PWR9 1 // @@ -9166,20 +9166,20 @@ // WEBASSEMBLY-NOT:#define __ELF__ // WEBASSEMBLY-NEXT:#define __FINITE_MATH_ONLY__ 0 // WEBASSEMBLY-NEXT:#define __FLOAT128__ 1 -// WEBASSEMBLY-NEXT:#define __FLT16_DECIMAL_DIG__ 5 -// WEBASSEMBLY-NEXT:#define __FLT16_DENORM_MIN__ 5.9604644775390625e-8F16 -// WEBASSEMBLY-NEXT:#define __FLT16_DIG__ 3 -// WEBASSEMBLY-NEXT:#define __FLT16_EPSILON__ 9.765625e-4F16 -// WEBASSEMBLY-NEXT:#define __FLT16_HAS_DENORM__ 1 -// WEBASSEMBLY-NEXT:#define __FLT16_HAS_INFINITY__ 1 -// WEBASSEMBLY-NEXT:#define __FLT16_HAS_QUIET_NAN__ 1 -// WEBASSEMBLY-NEXT:#define __FLT16_MANT_DIG__ 11 -// WEBASSEMBLY-NEXT:#define __FLT16_MAX_10_EXP__ 4 -// WEBASSEMBLY-NEXT:#define __FLT16_MAX_EXP__ 15 -// WEBASSEMBLY-NEXT:#define __FLT16_MAX__ 6.5504e+4F16 -// WEBASSEMBLY-NEXT:#define __FLT16_MIN_10_EXP__ (-13) -// WEBASSEMBLY-NEXT:#define __FLT16_MIN_EXP__ (-14) -// WEBASSEMBLY-NEXT:#define __FLT16_MIN__ 6.103515625e-5F16 +// WEBASSEMBLY-NOT:#define __FLT16_DECIMAL_DIG__ +// WEBASSEMBLY-NOT:#define __FLT16_DENORM_MIN__ +// WEBASSEMBLY-NOT:#define __FLT16_DIG__ +// WEBASSEMBLY-NOT:#define __FLT16_EPSILON__ +// WEBASSEMBLY-NOT:#define __FLT16_HAS_DENORM__ +// WEBASSEMBLY-NOT:#define __FLT16_HAS_INFINITY__ +// WEBASSEMBLY-NOT:#define __FLT16_HAS_QUIET_NAN__ +// WEBASSEMBLY-NOT:#define __FLT16_MANT_DIG__ +// WEBASSEMBLY-NOT:#define __FLT16_MAX_10_EXP__ +// WEBASSEMBLY-NOT:#define __FLT16_MAX_EXP__ +// WEBASSEMBLY-NOT:#define __FLT16_MAX__ +// WEBASSEMBLY-NOT:#define __FLT16_MIN_10_EXP__ +// WEBASSEMBLY-NOT:#define __FLT16_MIN_EXP__ +// WEBASSEMBLY-NOT:#define __FLT16_MIN__ // WEBASSEMBLY-NEXT:#define __FLT_DECIMAL_DIG__ 9 // WEBASSEMBLY-NEXT:#define __FLT_DENORM_MIN__ 1.40129846e-45F // WEBASSEMBLY-NEXT:#define __FLT_DIG__ 6 diff --git a/clang/test/Preprocessor/macro_arg_directive.c b/clang/test/Preprocessor/macro_arg_directive.c index 21d1b20acf668..929a03d70d025 100644 --- a/clang/test/Preprocessor/macro_arg_directive.c +++ b/clang/test/Preprocessor/macro_arg_directive.c @@ -8,7 +8,7 @@ a(n = _Static_assert(n == 5, ""); #define M(A) -M( +M( // expected-note {{expansion of macro 'M' requested here}} #pragma pack(pop) // expected-error {{embedding a #pragma directive within macro arguments is not supported}} ) @@ -18,7 +18,7 @@ void fail(const char *); ({ int result = 0; __VA_ARGS__; if (!result) { fail(#__VA_ARGS__); }; result }) static inline int f(int k) { - return MUNCH( // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error {{returning 'void'}} + return MUNCH( // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error {{returning 'void'}} expected-note {{expansion of macro 'MUNCH' requested here}} if (k < 3) result = 24; else if (k > 4) diff --git a/clang/test/Preprocessor/predefined-arch-macros.c b/clang/test/Preprocessor/predefined-arch-macros.c index 65d3a3ec319c4..f98f0ee54e0bb 100644 --- a/clang/test/Preprocessor/predefined-arch-macros.c +++ b/clang/test/Preprocessor/predefined-arch-macros.c @@ -2676,6 +2676,100 @@ // CHECK_ZNVER1_M64: #define __znver1 1 // CHECK_ZNVER1_M64: #define __znver1__ 1 +// RUN: %clang -march=znver2 -m32 -E -dM %s -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ +// RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_ZNVER2_M32 +// CHECK_ZNVER2_M32-NOT: #define __3dNOW_A__ 1 +// CHECK_ZNVER2_M32-NOT: #define __3dNOW__ 1 +// CHECK_ZNVER2_M32: #define __ADX__ 1 +// CHECK_ZNVER2_M32: #define __AES__ 1 +// CHECK_ZNVER2_M32: #define __AVX2__ 1 +// CHECK_ZNVER2_M32: #define __AVX__ 1 +// CHECK_ZNVER2_M32: #define __BMI2__ 1 +// CHECK_ZNVER2_M32: #define __BMI__ 1 +// CHECK_ZNVER2_M32: #define __CLFLUSHOPT__ 1 +// CHECK_ZNVER2_M32: #define __CLWB__ 1 +// CHECK_ZNVER2_M32: #define __CLZERO__ 1 +// CHECK_ZNVER2_M32: #define __F16C__ 1 +// CHECK_ZNVER2_M32: #define __FMA__ 1 +// CHECK_ZNVER2_M32: #define __FSGSBASE__ 1 +// CHECK_ZNVER2_M32: #define __LZCNT__ 1 +// CHECK_ZNVER2_M32: #define __MMX__ 1 +// CHECK_ZNVER2_M32: #define __PCLMUL__ 1 +// CHECK_ZNVER2_M32: #define __POPCNT__ 1 +// CHECK_ZNVER2_M32: #define __PRFCHW__ 1 +// CHECK_ZNVER2_M32: #define __RDPID__ 1 +// CHECK_ZNVER2_M32: #define __RDRND__ 1 +// CHECK_ZNVER2_M32: #define __RDSEED__ 1 +// CHECK_ZNVER2_M32: #define __SHA__ 1 +// CHECK_ZNVER2_M32: #define __SSE2_MATH__ 1 +// CHECK_ZNVER2_M32: #define __SSE2__ 1 +// CHECK_ZNVER2_M32: #define __SSE3__ 1 +// CHECK_ZNVER2_M32: #define __SSE4A__ 1 +// CHECK_ZNVER2_M32: #define __SSE4_1__ 1 +// CHECK_ZNVER2_M32: #define __SSE4_2__ 1 +// CHECK_ZNVER2_M32: #define __SSE_MATH__ 1 +// CHECK_ZNVER2_M32: #define __SSE__ 1 +// CHECK_ZNVER2_M32: #define __SSSE3__ 1 +// CHECK_ZNVER2_M32: #define __WBNOINVD__ 1 +// CHECK_ZNVER2_M32: #define __XSAVEC__ 1 +// CHECK_ZNVER2_M32: #define __XSAVEOPT__ 1 +// CHECK_ZNVER2_M32: #define __XSAVES__ 1 +// CHECK_ZNVER2_M32: #define __XSAVE__ 1 +// CHECK_ZNVER2_M32: #define __i386 1 +// CHECK_ZNVER2_M32: #define __i386__ 1 +// CHECK_ZNVER2_M32: #define __tune_znver2__ 1 +// CHECK_ZNVER2_M32: #define __znver2 1 +// CHECK_ZNVER2_M32: #define __znver2__ 1 + +// RUN: %clang -march=znver2 -m64 -E -dM %s -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ +// RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_ZNVER2_M64 +// CHECK_ZNVER2_M64-NOT: #define __3dNOW_A__ 1 +// CHECK_ZNVER2_M64-NOT: #define __3dNOW__ 1 +// CHECK_ZNVER2_M64: #define __ADX__ 1 +// CHECK_ZNVER2_M64: #define __AES__ 1 +// CHECK_ZNVER2_M64: #define __AVX2__ 1 +// CHECK_ZNVER2_M64: #define __AVX__ 1 +// CHECK_ZNVER2_M64: #define __BMI2__ 1 +// CHECK_ZNVER2_M64: #define __BMI__ 1 +// CHECK_ZNVER2_M64: #define __CLFLUSHOPT__ 1 +// CHECK_ZNVER2_M64: #define __CLWB__ 1 +// CHECK_ZNVER2_M64: #define __CLZERO__ 1 +// CHECK_ZNVER2_M64: #define __F16C__ 1 +// CHECK_ZNVER2_M64: #define __FMA__ 1 +// CHECK_ZNVER2_M64: #define __FSGSBASE__ 1 +// CHECK_ZNVER2_M64: #define __LZCNT__ 1 +// CHECK_ZNVER2_M64: #define __MMX__ 1 +// CHECK_ZNVER2_M64: #define __PCLMUL__ 1 +// CHECK_ZNVER2_M64: #define __POPCNT__ 1 +// CHECK_ZNVER2_M64: #define __PRFCHW__ 1 +// CHECK_ZNVER2_M64: #define __RDPID__ 1 +// CHECK_ZNVER2_M64: #define __RDRND__ 1 +// CHECK_ZNVER2_M64: #define __RDSEED__ 1 +// CHECK_ZNVER2_M64: #define __SHA__ 1 +// CHECK_ZNVER2_M64: #define __SSE2_MATH__ 1 +// CHECK_ZNVER2_M64: #define __SSE2__ 1 +// CHECK_ZNVER2_M64: #define __SSE3__ 1 +// CHECK_ZNVER2_M64: #define __SSE4A__ 1 +// CHECK_ZNVER2_M64: #define __SSE4_1__ 1 +// CHECK_ZNVER2_M64: #define __SSE4_2__ 1 +// CHECK_ZNVER2_M64: #define __SSE_MATH__ 1 +// CHECK_ZNVER2_M64: #define __SSE__ 1 +// CHECK_ZNVER2_M64: #define __SSSE3__ 1 +// CHECK_ZNVER2_M64: #define __WBNOINVD__ 1 +// CHECK_ZNVER2_M64: #define __XSAVEC__ 1 +// CHECK_ZNVER2_M64: #define __XSAVEOPT__ 1 +// CHECK_ZNVER2_M64: #define __XSAVES__ 1 +// CHECK_ZNVER2_M64: #define __XSAVE__ 1 +// CHECK_ZNVER2_M64: #define __amd64 1 +// CHECK_ZNVER2_M64: #define __amd64__ 1 +// CHECK_ZNVER2_M64: #define __tune_znver2__ 1 +// CHECK_ZNVER2_M64: #define __x86_64 1 +// CHECK_ZNVER2_M64: #define __x86_64__ 1 +// CHECK_ZNVER2_M64: #define __znver2 1 +// CHECK_ZNVER2_M64: #define __znver2__ 1 + // End X86/GCC/Linux tests ------------------ // Begin PPC/GCC/Linux tests ---------------- diff --git a/clang/test/Preprocessor/predefined-win-macros.c b/clang/test/Preprocessor/predefined-win-macros.c index 0979e34860cfd..5e5f1e82f9b7c 100644 --- a/clang/test/Preprocessor/predefined-win-macros.c +++ b/clang/test/Preprocessor/predefined-win-macros.c @@ -2,6 +2,8 @@ // // RUN: %clang_cc1 %s -x c++ -E -dM -triple x86_64-pc-win32 -fms-extensions -fms-compatibility \ // RUN: -fms-compatibility-version=19.00 -std=c++14 -o - | FileCheck -match-full-lines %s --check-prefix=CHECK-MS64 +// RUN: %clang_cc1 %s -x c++ -E -dM -triple x86_64-pc-win32 -fms-extensions -fms-compatibility \ +// RUN: -fms-compatibility-version=19.00 -std=c++14 -o - | grep GCC | count 1 // CHECK-MS64: #define _INTEGRAL_MAX_BITS 64 // CHECK-MS64: #define _MSC_EXTENSIONS 1 // CHECK-MS64: #define _MSC_VER 1900 @@ -10,12 +12,16 @@ // CHECK-MS64: #define _M_X64 100 // CHECK-MS64: #define _WIN64 1 // CHECK-MS64-NOT: #define __STRICT_ANSI__ -// CHECK-MS64-NOT: GCC +// CHECK-MS64-NOT: GNU +// CHECK-MS64-NOT: GXX +// CHECK-MS64: #define __GCC_ASM_FLAG_OUTPUTS__ 1 // CHECK-MS64-NOT: GNU // CHECK-MS64-NOT: GXX // RUN: %clang_cc1 %s -x c++ -E -dM -triple i686-pc-win32 -fms-extensions -fms-compatibility \ // RUN: -fms-compatibility-version=19.00 -std=c++17 -o - | FileCheck -match-full-lines %s --check-prefix=CHECK-MS +// RUN: %clang_cc1 %s -x c++ -E -dM -triple i686-pc-win32 -fms-extensions -fms-compatibility \ +// RUN: -fms-compatibility-version=19.00 -std=c++17 -o - | grep GCC | count 1 // CHECK-MS: #define _INTEGRAL_MAX_BITS 64 // CHECK-MS: #define _MSC_EXTENSIONS 1 // CHECK-MS: #define _MSC_VER 1900 @@ -24,7 +30,9 @@ // CHECK-MS: #define _M_IX86_FP 0 // CHECK-MS: #define _WIN32 1 // CHECK-MS-NOT: #define __STRICT_ANSI__ -// CHECK-MS-NOT: GCC +// CHECK-MS-NOT: GNU +// CHECK-MS-NOT: GXX +// CHECK-MS: #define __GCC_ASM_FLAG_OUTPUTS__ 1 // CHECK-MS-NOT: GNU // CHECK-MS-NOT: GXX @@ -107,4 +115,3 @@ // CHECK-ARM64-MINGW: #define _WIN32 1 // CHECK-ARM64-MINGW: #define _WIN64 1 // CHECK-ARM64-MINGW: #define __aarch64__ 1 - diff --git a/clang/test/Preprocessor/sycl-macro.cpp b/clang/test/Preprocessor/sycl-macro.cpp new file mode 100644 index 0000000000000..186df4ff569b9 --- /dev/null +++ b/clang/test/Preprocessor/sycl-macro.cpp @@ -0,0 +1,5 @@ +// RUN: %clang_cc1 %s -E -dM | FileCheck %s +// RUN: %clang_cc1 %s -fsycl-is-device -E -dM | FileCheck --check-prefix=CHECK-SYCL %s + +// CHECK-NOT:#define __SYCL_DEVICE_ONLY__ 1 +// CHECK-SYCL:#define __SYCL_DEVICE_ONLY__ 1 diff --git a/clang/test/Preprocessor/wasm-target-features.c b/clang/test/Preprocessor/wasm-target-features.c index 8c10cd7808ac4..d32c1b00be408 100644 --- a/clang/test/Preprocessor/wasm-target-features.c +++ b/clang/test/Preprocessor/wasm-target-features.c @@ -6,7 +6,7 @@ // RUN: | FileCheck %s -check-prefix=SIMD128 // // SIMD128:#define __wasm_simd128__ 1{{$}} -// + // RUN: %clang -E -dM %s -o - 2>&1 \ // RUN: -target wasm32-unknown-unknown -munimplemented-simd128 \ // RUN: | FileCheck %s -check-prefix=SIMD128-UNIMPLEMENTED @@ -15,7 +15,7 @@ // RUN: | FileCheck %s -check-prefix=SIMD128-UNIMPLEMENTED // // SIMD128-UNIMPLEMENTED:#define __wasm_unimplemented_simd128__ 1{{$}} -// + // RUN: %clang -E -dM %s -o - 2>&1 \ // RUN: -target wasm32-unknown-unknown -mnontrapping-fptoint \ // RUN: | FileCheck %s -check-prefix=NONTRAPPING-FPTOINT @@ -24,7 +24,7 @@ // RUN: | FileCheck %s -check-prefix=NONTRAPPING-FPTOINT // // NONTRAPPING-FPTOINT:#define __wasm_nontrapping_fptoint__ 1{{$}} -// + // RUN: %clang -E -dM %s -o - 2>&1 \ // RUN: -target wasm32-unknown-unknown -msign-ext \ // RUN: | FileCheck %s -check-prefix=SIGN-EXT @@ -33,7 +33,7 @@ // RUN: | FileCheck %s -check-prefix=SIGN-EXT // // SIGN-EXT:#define __wasm_sign_ext__ 1{{$}} -// + // RUN: %clang -E -dM %s -o - 2>&1 \ // RUN: -target wasm32-unknown-unknown -mexception-handling \ // RUN: | FileCheck %s -check-prefix=EXCEPTION-HANDLING @@ -42,7 +42,7 @@ // RUN: | FileCheck %s -check-prefix=EXCEPTION-HANDLING // // EXCEPTION-HANDLING:#define __wasm_exception_handling__ 1{{$}} -// + // RUN: %clang -E -dM %s -o - 2>&1 \ // RUN: -target wasm32-unknown-unknown -mbulk-memory \ // RUN: | FileCheck %s -check-prefix=BULK-MEMORY @@ -51,7 +51,25 @@ // RUN: | FileCheck %s -check-prefix=BULK-MEMORY // // BULK-MEMORY:#define __wasm_bulk_memory__ 1{{$}} + +// RUN: %clang -E -dM %s -o - 2>&1 \ +// RUN: -target wasm32-unknown-unknown -matomics \ +// RUN: | FileCheck %s -check-prefix=ATOMICS +// RUN: %clang -E -dM %s -o - 2>&1 \ +// RUN: -target wasm64-unknown-unknown -matomics \ +// RUN: | FileCheck %s -check-prefix=ATOMICS +// +// ATOMICS:#define __wasm_atomics__ 1{{$}} + +// RUN: %clang -E -dM %s -o - 2>&1 \ +// RUN: -target wasm32-unknown-unknown -pthread \ +// RUN: | FileCheck %s -check-prefix=PTHREAD +// RUN: %clang -E -dM %s -o - 2>&1 \ +// RUN: -target wasm64-unknown-unknown -pthread \ +// RUN: | FileCheck %s -check-prefix=PTHREAD // +// PTHREAD:#define __wasm_atomics__ 1{{$}} + // RUN: %clang -E -dM %s -o - 2>&1 \ // RUN: -target wasm32-unknown-unknown -mcpu=mvp \ // RUN: | FileCheck %s -check-prefix=MVP @@ -65,7 +83,8 @@ // MVP-NOT:#define __wasm_sign_ext__ // MVP-NOT:#define __wasm_exception_handling__ // MVP-NOT:#define __wasm_bulk_memory__ -// +// MVP-NOT:#define __wasm_atomics__ + // RUN: %clang -E -dM %s -o - 2>&1 \ // RUN: -target wasm32-unknown-unknown -mcpu=bleeding-edge \ // RUN: | FileCheck %s -check-prefix=BLEEDING-EDGE @@ -73,11 +92,12 @@ // RUN: -target wasm64-unknown-unknown -mcpu=bleeding-edge \ // RUN: | FileCheck %s -check-prefix=BLEEDING-EDGE // -// BLEEDING-EDGE:#define __wasm_nontrapping_fptoint__ 1{{$}} -// BLEEDING-EDGE:#define __wasm_sign_ext__ 1{{$}} -// BLEEDING-EDGE:#define __wasm_simd128__ 1{{$}} +// BLEEDING-EDGE-DAG:#define __wasm_nontrapping_fptoint__ 1{{$}} +// BLEEDING-EDGE-DAG:#define __wasm_sign_ext__ 1{{$}} +// BLEEDING-EDGE-DAG:#define __wasm_simd128__ 1{{$}} +// BLEEDING-EDGE-DAG:#define __wasm_atomics__ 1{{$}} // BLEEDING-EDGE-NOT:#define __wasm_unimplemented_simd128__ 1{{$}} -// + // RUN: %clang -E -dM %s -o - 2>&1 \ // RUN: -target wasm32-unknown-unknown -mcpu=bleeding-edge -mno-simd128 \ // RUN: | FileCheck %s -check-prefix=BLEEDING-EDGE-NO-SIMD128 diff --git a/clang/test/Preprocessor/x86_asm_flag_output.c b/clang/test/Preprocessor/x86_asm_flag_output.c new file mode 100644 index 0000000000000..dee6fcc4991e4 --- /dev/null +++ b/clang/test/Preprocessor/x86_asm_flag_output.c @@ -0,0 +1,4 @@ +// RUN: %clang -target i386-unknown-unknown -x c -E -dM -o - %s | FileCheck -match-full-lines %s +// RUN: %clang -target x86_64-unknown-unknown -x c -E -dM -o - %s | FileCheck -match-full-lines %s + +// CHECK: #define __GCC_ASM_FLAG_OUTPUTS__ 1 diff --git a/clang/test/Profile/cxx-abc-deleting-dtor.cpp b/clang/test/Profile/cxx-abc-deleting-dtor.cpp new file mode 100644 index 0000000000000..453d4b45471de --- /dev/null +++ b/clang/test/Profile/cxx-abc-deleting-dtor.cpp @@ -0,0 +1,83 @@ +// RUN: %clang_cc1 -emit-llvm %s -std=c++11 -o - -fno-rtti \ +// RUN: -fprofile-instrument=clang -fcoverage-mapping -disable-llvm-passes \ +// RUN: -triple=x86_64-windows-msvc | FileCheck %s --check-prefix=MSVC +// RUN: %clang_cc1 -emit-llvm %s -std=c++11 -o - -fno-rtti \ +// RUN: -fprofile-instrument=clang -fcoverage-mapping -disable-llvm-passes \ +// RUN: -triple=x86_64-linux-gnu | FileCheck %s --check-prefix=LINUX + +// Check that clang doesn't emit counters or __profn_ variables for deleting +// destructor variants in both C++ ABIs. + +struct ABC { + virtual ~ABC() = default; + virtual void pure() = 0; +}; +struct DerivedABC : ABC { + ~DerivedABC() override = default; + void pure() override {} +}; +DerivedABC *useABCVTable() { return new DerivedABC(); } + +// MSVC-NOT: @"__profn_??_G{{.*}}" = +// MSVC: @"__profn_??1DerivedABC@@{{.*}}" = +// MSVC-NOT: @"__profn_??_G{{.*}}" = +// MSVC: @"__profn_??1ABC@@{{.*}}" = +// MSVC-NOT: @"__profn_??_G{{.*}}" = + +// MSVC-LABEL: define linkonce_odr dso_local i8* @"??_GDerivedABC@@UEAAPEAXI@Z"(%struct.DerivedABC* %this, {{.*}}) +// MSVC-NOT: call void @llvm.instrprof.increment({{.*}}) +// MSVC: call void @"??1DerivedABC@@UEAA@XZ"({{.*}}) +// MSVC: ret void + +// MSVC-LABEL: define linkonce_odr dso_local i8* @"??_GABC@@UEAAPEAXI@Z"(%struct.ABC* %this, {{.*}}) +// MSVC-NOT: call void @llvm.instrprof.increment({{.*}}) +// MSVC: call void @llvm.trap() +// MSVC-NEXT: unreachable + +// MSVC-LABEL: define linkonce_odr dso_local void @"??1DerivedABC@@UEAA@XZ"({{.*}}) +// MSVC: call void @llvm.instrprof.increment({{.*}}) +// MSVC: call void @"??1ABC@@UEAA@XZ"({{.*}}) +// MSVC: ret void + +// MSVC-LABEL: define linkonce_odr dso_local void @"??1ABC@@UEAA@XZ"({{.*}}) +// MSVC: call void @llvm.instrprof.increment({{.*}}) +// MSVC: ret void + + +// D2 is the base, D1 and D0 are deleting and complete dtors. + +// LINUX-NOT: @__profn_{{.*D[01]Ev}} = +// LINUX: @__profn__ZN10DerivedABCD2Ev = +// LINUX-NOT: @__profn_{{.*D[01]Ev}} = +// LINUX: @__profn__ZN3ABCD2Ev = +// LINUX-NOT: @__profn_{{.*D[01]Ev}} = + +// LINUX-LABEL: define linkonce_odr void @_ZN10DerivedABCD1Ev(%struct.DerivedABC* %this) +// LINUX-NOT: call void @llvm.instrprof.increment({{.*}}) +// LINUX: call void @_ZN10DerivedABCD2Ev({{.*}}) +// LINUX: ret void + +// LINUX-LABEL: define linkonce_odr void @_ZN10DerivedABCD0Ev(%struct.DerivedABC* %this) +// LINUX-NOT: call void @llvm.instrprof.increment({{.*}}) +// LINUX: call void @_ZN10DerivedABCD1Ev({{.*}}) +// LINUX: call void @_ZdlPv({{.*}}) +// LINUX: ret void + +// LINUX-LABEL: define linkonce_odr void @_ZN3ABCD1Ev(%struct.ABC* %this) +// LINUX-NOT: call void @llvm.instrprof.increment({{.*}}) +// LINUX: call void @llvm.trap() +// LINUX-NEXT: unreachable + +// LINUX-LABEL: define linkonce_odr void @_ZN3ABCD0Ev(%struct.ABC* %this) +// LINUX-NOT: call void @llvm.instrprof.increment({{.*}}) +// LINUX: call void @llvm.trap() +// LINUX-NEXT: unreachable + +// LINUX-LABEL: define linkonce_odr void @_ZN10DerivedABCD2Ev(%struct.DerivedABC* %this) +// LINUX: call void @llvm.instrprof.increment({{.*}}) +// LINUX: call void @_ZN3ABCD2Ev({{.*}}) +// LINUX: ret void + +// LINUX-LABEL: define linkonce_odr void @_ZN3ABCD2Ev(%struct.ABC* %this) +// LINUX: call void @llvm.instrprof.increment({{.*}}) +// LINUX: ret void diff --git a/clang/test/Profile/cxx-lambda.cpp b/clang/test/Profile/cxx-lambda.cpp index 645f1603e019c..08d78da403485 100644 --- a/clang/test/Profile/cxx-lambda.cpp +++ b/clang/test/Profile/cxx-lambda.cpp @@ -9,9 +9,9 @@ // RUN: FileCheck -allow-deprecated-dag-overlap --input-file=%tuse -check-prefix=PGOUSE %s // RUN: FileCheck -allow-deprecated-dag-overlap --input-file=%tuse -check-prefix=LMBUSE %s -// PGOGEN: @[[LWC:__profc__Z7lambdasv]] = private global [4 x i64] zeroinitializer -// PGOGEN: @[[MAC:__profc_main]] = private global [1 x i64] zeroinitializer -// LMBGEN: @[[LFC:"__profc_cxx_lambda.cpp__ZZ7lambdasvENK3\$_0clEi"]] = private global [3 x i64] zeroinitializer +// PGOGEN: @[[LWC:__profc__Z7lambdasv]] = {{(private|internal)}} global [4 x i64] zeroinitializer +// PGOGEN: @[[MAC:__profc_main]] = {{(private|internal)}} global [1 x i64] zeroinitializer +// LMBGEN: @[[LFC:"__profc_cxx_lambda.cpp__ZZ7lambdasvENK3\$_0clEi"]] = {{(private|internal)}} global [3 x i64] zeroinitializer // PGOGEN-LABEL: define {{.*}}void @_Z7lambdasv() // PGOUSE-LABEL: define {{.*}}void @_Z7lambdasv() diff --git a/clang/test/Profile/cxx-rangefor.cpp b/clang/test/Profile/cxx-rangefor.cpp index a61557a9619cf..1d2f7f470cfec 100644 --- a/clang/test/Profile/cxx-rangefor.cpp +++ b/clang/test/Profile/cxx-rangefor.cpp @@ -7,7 +7,7 @@ // RUN: %clang_cc1 -x c++ %s -triple %itanium_abi_triple -main-file-name cxx-rangefor.cpp -std=c++11 -o - -emit-llvm -fprofile-instrument-use-path=%t.profdata > %tuse // RUN: FileCheck --input-file=%tuse -check-prefix=CHECK -check-prefix=PGOUSE %s -// PGOGEN: @[[RFC:__profc__Z9range_forv]] = private global [5 x i64] zeroinitializer +// PGOGEN: @[[RFC:__profc__Z9range_forv]] = {{(private|internal)}} global [5 x i64] zeroinitializer // CHECK-LABEL: define {{.*}}void @_Z9range_forv() // PGOGEN: store {{.*}} @[[RFC]], i64 0, i64 0 diff --git a/clang/test/Profile/cxx-stmt-initializers.cpp b/clang/test/Profile/cxx-stmt-initializers.cpp index 44f7edd276f66..6ff4d6eda1721 100644 --- a/clang/test/Profile/cxx-stmt-initializers.cpp +++ b/clang/test/Profile/cxx-stmt-initializers.cpp @@ -3,8 +3,8 @@ // RUN: %clang_cc1 -x c++ %s -triple %itanium_abi_triple -main-file-name cxx-stmt-initializers.cpp -std=c++1z -o - -emit-llvm -fprofile-instrument=clang > %tgen // RUN: FileCheck --input-file=%tgen -check-prefix=CHECK -check-prefix=PGOGEN %s -// PGOGEN: @[[SIC:__profc__Z11switch_initv]] = private global [3 x i64] zeroinitializer -// PGOGEN: @[[IIC:__profc__Z7if_initv]] = private global [3 x i64] zeroinitializer +// PGOGEN: @[[SIC:__profc__Z11switch_initv]] = {{(private|internal)}} global [3 x i64] zeroinitializer +// PGOGEN: @[[IIC:__profc__Z7if_initv]] = {{(private|internal)}} global [3 x i64] zeroinitializer // Note: We expect counters for the function entry block, the condition in the // switch initializer, and the switch successor block. diff --git a/clang/test/Profile/cxx-templates.cpp b/clang/test/Profile/cxx-templates.cpp index 1cec605e5066b..7af6660f521db 100644 --- a/clang/test/Profile/cxx-templates.cpp +++ b/clang/test/Profile/cxx-templates.cpp @@ -10,8 +10,8 @@ // RUN: FileCheck --input-file=%tuse -check-prefix=T0USE -check-prefix=ALL %s // RUN: FileCheck --input-file=%tuse -check-prefix=T100USE -check-prefix=ALL %s -// T0GEN: @[[T0C:__profc__Z4loopILj0EEvv]] = linkonce_odr hidden global [2 x i64] zeroinitializer -// T100GEN: @[[T100C:__profc__Z4loopILj100EEvv]] = linkonce_odr hidden global [2 x i64] zeroinitializer +// T0GEN: @[[T0C:__profc__Z4loopILj0EEvv]] = linkonce_odr {{(hidden|dso_local)}} global [2 x i64] zeroinitializer +// T100GEN: @[[T100C:__profc__Z4loopILj100EEvv]] = linkonce_odr {{(hidden|dso_local)}} global [2 x i64] zeroinitializer // T0GEN-LABEL: define linkonce_odr {{.*}}void @_Z4loopILj0EEvv() // T0USE-LABEL: define linkonce_odr {{.*}}void @_Z4loopILj0EEvv() diff --git a/clang/test/Profile/cxx-throws.cpp b/clang/test/Profile/cxx-throws.cpp index ef56c8b28801e..f6c0f52b67a1f 100644 --- a/clang/test/Profile/cxx-throws.cpp +++ b/clang/test/Profile/cxx-throws.cpp @@ -10,9 +10,9 @@ // RUN: %clang_cc1 %s -o - -emit-llvm -fprofile-instrument-use-path=%t.profdata -fexceptions -fcxx-exceptions -triple %itanium_abi_triple | FileCheck -check-prefix=PGOUSE %s // RUN: %clang_cc1 %s -o - -emit-llvm -fprofile-instrument-use-path=%t.profdata -fexceptions -fcxx-exceptions -triple %itanium_abi_triple | FileCheck -check-prefix=PGOUSE-EXC %s -// PGOGEN: @[[THC:__profc__Z6throwsv]] = private global [9 x i64] zeroinitializer -// PGOGEN-EXC: @[[THC:__profc__Z6throwsv]] = private global [9 x i64] zeroinitializer -// PGOGEN: @[[UNC:__profc__Z11unreachablei]] = private global [3 x i64] zeroinitializer +// PGOGEN: @[[THC:__profc__Z6throwsv]] = {{(private|internal)}} global [9 x i64] zeroinitializer +// PGOGEN-EXC: @[[THC:__profc__Z6throwsv]] = {{(private|internal)}} global [9 x i64] zeroinitializer +// PGOGEN: @[[UNC:__profc__Z11unreachablei]] = {{(private|internal)}} global [3 x i64] zeroinitializer // PGOGEN-LABEL: @_Z6throwsv() // PGOUSE-LABEL: @_Z6throwsv() diff --git a/clang/test/Profile/cxx-virtual-destructor-calls.cpp b/clang/test/Profile/cxx-virtual-destructor-calls.cpp index c60fc921e5bfb..03e1c1031f9ac 100644 --- a/clang/test/Profile/cxx-virtual-destructor-calls.cpp +++ b/clang/test/Profile/cxx-virtual-destructor-calls.cpp @@ -14,15 +14,15 @@ struct B : A { }; // Base dtor counters and profile data -// CHECK: @__profc__ZN1BD2Ev = private global [1 x i64] zeroinitializer +// CHECK: @__profc__ZN1BD2Ev = {{(private|internal)}} global [1 x i64] zeroinitializer // CHECK: @__profd__ZN1BD2Ev = // Complete dtor counters and profile data must absent -// CHECK-NOT: @__profc__ZN1BD1Ev = private global [1 x i64] zeroinitializer +// CHECK-NOT: @__profc__ZN1BD1Ev = {{(private|internal)}} global [1 x i64] zeroinitializer // CHECK-NOT: @__profd__ZN1BD1Ev = // Deleting dtor counters and profile data must absent -// CHECK-NOT: @__profc__ZN1BD0Ev = private global [1 x i64] zeroinitializer +// CHECK-NOT: @__profc__ZN1BD0Ev = {{(private|internal)}} global [1 x i64] zeroinitializer // CHECK-NOT: @__profd__ZN1BD0Ev = B::~B() { } diff --git a/clang/test/Sema/asm.c b/clang/test/Sema/asm.c index 04b7cb19eb83a..67da197426cd5 100644 --- a/clang/test/Sema/asm.c +++ b/clang/test/Sema/asm.c @@ -249,7 +249,7 @@ void fn6() { int a; __asm__("" : "=rm"(a), "=rm"(a) - : "11m"(a)) // expected-error {{invalid input constraint '11m' in asm}} + : "11m"(a)); // expected-error {{invalid input constraint '11m' in asm}} } // PR14269 diff --git a/clang/test/Sema/attr-mig.c b/clang/test/Sema/attr-mig.c new file mode 100644 index 0000000000000..3b16696cd716d --- /dev/null +++ b/clang/test/Sema/attr-mig.c @@ -0,0 +1,22 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s + +typedef int kern_return_t; +#define KERN_SUCCESS 0 + +__attribute__((mig_server_routine)) kern_return_t var = KERN_SUCCESS; // expected-warning{{'mig_server_routine' attribute only applies to functions, Objective-C methods, and blocks}} + +__attribute__((mig_server_routine)) void foo_void(); // expected-warning{{'mig_server_routine' attribute only applies to routines that return a kern_return_t}} +__attribute__((mig_server_routine)) int foo_int(); // expected-warning{{'mig_server_routine' attribute only applies to routines that return a kern_return_t}} + +__attribute__((mig_server_routine)) kern_return_t bar_extern(); // no-warning +__attribute__((mig_server_routine)) kern_return_t bar_forward(); // no-warning + +__attribute__((mig_server_routine)) kern_return_t bar_definition() { // no-warning + return KERN_SUCCESS; +} + +kern_return_t bar_forward() { // no-warning + return KERN_SUCCESS; +} + +__attribute__((mig_server_routine(123))) kern_return_t bar_with_argument(); // expected-error{{'mig_server_routine' attribute takes no arguments}} diff --git a/clang/test/Sema/attr-mig.cpp b/clang/test/Sema/attr-mig.cpp new file mode 100644 index 0000000000000..5dfc43bc1ec88 --- /dev/null +++ b/clang/test/Sema/attr-mig.cpp @@ -0,0 +1,20 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s + +typedef int kern_return_t; +typedef kern_return_t IOReturn; +#define KERN_SUCCESS 0 +#define kIOReturnSuccess KERN_SUCCESS + +class MyServer { +public: + virtual __attribute__((mig_server_routine)) IOReturn externalMethod(); + virtual __attribute__((mig_server_routine)) void anotherMethod(); // expected-warning{{'mig_server_routine' attribute only applies to routines that return a kern_return_t}} + virtual __attribute__((mig_server_routine)) int yetAnotherMethod(); // expected-warning{{'mig_server_routine' attribute only applies to routines that return a kern_return_t}} + [[clang::mig_server_routine]] virtual IOReturn cppAnnotatedMethod(); + [[clang::mig_server_routine("arg")]] virtual IOReturn cppAnnotatedMethodWithInvalidArgs(); // expected-error{{'mig_server_routine' attribute takes no arguments}} + [[clang::mig_server_routine]] virtual int cppInvalidAnnotatedMethod(); // expected-warning{{'mig_server_routine' attribute only applies to routines that return a kern_return_t}} +}; + +IOReturn MyServer::externalMethod() { + return kIOReturnSuccess; +} diff --git a/clang/test/Sema/attr-mig.m b/clang/test/Sema/attr-mig.m new file mode 100644 index 0000000000000..a40a9172e524a --- /dev/null +++ b/clang/test/Sema/attr-mig.m @@ -0,0 +1,31 @@ +// RUN: %clang_cc1 -fsyntax-only -fblocks -verify %s + +typedef int kern_return_t; +#define KERN_SUCCESS 0 + +@interface NSObject +@end + +@interface I: NSObject +- (kern_return_t)foo __attribute__((mig_server_routine)); // no-warning +- (void) bar_void __attribute__((mig_server_routine)); // expected-warning{{'mig_server_routine' attribute only applies to routines that return a kern_return_t}} +- (int) bar_int __attribute__((mig_server_routine)); // expected-warning{{'mig_server_routine' attribute only applies to routines that return a kern_return_t}} +@end + +@implementation I +- (kern_return_t)foo { + kern_return_t (^block)() = ^ __attribute__((mig_server_routine)) { // no-warning + return KERN_SUCCESS; + }; + + // FIXME: Warn that this block doesn't return a kern_return_t. + void (^invalid_block)() = ^ __attribute__((mig_server_routine)) {}; + + return block(); +} +- (void)bar_void { +} +- (int)bar_int { + return 0; +} +@end diff --git a/clang/test/Sema/attr-mode.c b/clang/test/Sema/attr-mode.c index c0e0426e0098c..c89cb65241919 100644 --- a/clang/test/Sema/attr-mode.c +++ b/clang/test/Sema/attr-mode.c @@ -6,6 +6,12 @@ // RUN: -verify %s // RUN: %clang_cc1 -triple x86_64-pc-linux-gnux32 -DTEST_64BIT_X86 -fsyntax-only \ // RUN: -verify %s +// RUN: %clang_cc1 -triple mips-linux-gnu -DTEST_MIPS_32 -fsyntax-only \ +// RUN: -verify %s +// RUN: %clang_cc1 -triple mips64-linux-gnuabin32 -DTEST_MIPS_N32 -fsyntax-only \ +// RUN: -verify %s +// RUN: %clang_cc1 -triple mips64-linux-gnu -DTEST_MIPS_64 -fsyntax-only \ +// RUN: -verify %s typedef int i16_1 __attribute((mode(HI))); int i16_1_test[sizeof(i16_1) == 2 ? 1 : -1]; @@ -33,7 +39,7 @@ typedef _Complex double c32 __attribute((mode(SC))); int c32_test[sizeof(c32) == 8 ? 1 : -1]; typedef _Complex float c64 __attribute((mode(DC))); -#ifndef TEST_64BIT_PPC64 // Note, 'XC' mode is illegal for PPC64 machines. +#if !defined(__ppc__) && !defined(__mips__) // Note, 'XC' mode is illegal for PPC64 and MIPS machines. typedef _Complex float c80 __attribute((mode(XC))); #endif @@ -84,6 +90,15 @@ void f_ft128_arg(long double *x); void f_ft128_complex_arg(_Complex long double *x); void test_TFtype(f128ibm *a) { f_ft128_arg (a); } void test_TCtype(c128ibm *a) { f_ft128_complex_arg (a); } +#elif TEST_MIPS_32 +typedef unsigned int gcc_unwind_word __attribute__((mode(unwind_word))); +int foo[sizeof(gcc_unwind_word) == 4 ? 1 : -1]; +#elif TEST_MIPS_N32 +typedef unsigned int gcc_unwind_word __attribute__((mode(unwind_word))); +int foo[sizeof(gcc_unwind_word) == 8 ? 1 : -1]; +#elif TEST_MIPS_64 +typedef unsigned int gcc_unwind_word __attribute__((mode(unwind_word))); +int foo[sizeof(gcc_unwind_word) == 8 ? 1 : -1]; #else #error Unknown test architecture. #endif diff --git a/clang/test/Sema/conversion-target-dep.c b/clang/test/Sema/conversion-target-dep.c new file mode 100644 index 0000000000000..e16685fa0674d --- /dev/null +++ b/clang/test/Sema/conversion-target-dep.c @@ -0,0 +1,24 @@ +// RUN: %clang_cc1 -Wdouble-promotion -Wimplicit-float-conversion %s -triple x86_64-apple-macosx10.12 -verify=x86,expected +// RUN: %clang_cc1 -Wdouble-promotion -Wimplicit-float-conversion %s -triple armv7-apple-ios9.0 -verify=arm,expected + +// On ARM, long double and double both map to double precision 754s, so there +// isn't any reason to warn on conversions back and forth. + +long double ld; +double d; +_Float16 f16; // x86-error {{_Float16 is not supported on this target}} + +int main() { + ld = d; // x86-warning {{implicit conversion increases floating-point precision: 'double' to 'long double'}} + d = ld; // x86-warning {{implicit conversion loses floating-point precision: 'long double' to 'double'}} + + ld += d; // x86-warning {{implicit conversion increases floating-point precision: 'double' to 'long double'}} + d += ld; // x86-warning {{implicit conversion when assigning computation result loses floating-point precision: 'long double' to 'double'}} + + f16 = ld; // expected-warning {{implicit conversion loses floating-point precision: 'long double' to '_Float16'}} + ld = f16; // expected-warning {{implicit conversion increases floating-point precision: '_Float16' to 'long double'}} + + f16 += ld; // expected-warning {{implicit conversion when assigning computation result loses floating-point precision: 'long double' to '_Float16'}} + ld += f16; // expected-warning {{implicit conversion increases floating-point precision: '_Float16' to 'long double'}} +} + diff --git a/clang/test/Sema/crash-deduction-guide-access.cpp b/clang/test/Sema/crash-deduction-guide-access.cpp new file mode 100644 index 0000000000000..c0203ef8c518b --- /dev/null +++ b/clang/test/Sema/crash-deduction-guide-access.cpp @@ -0,0 +1,11 @@ +// RUN: not %clang_cc1 -x c++ -std=c++17 -fsyntax-only %s +template +class Imp { + template + explicit Imp(F f); +}; + +template +class Cls { + explicit Imp() : f() {} +}; diff --git a/clang/test/Sema/fortify-std-lib.c b/clang/test/Sema/fortify-std-lib.c new file mode 100644 index 0000000000000..9b92b293c48bb --- /dev/null +++ b/clang/test/Sema/fortify-std-lib.c @@ -0,0 +1,18 @@ +// RUN: %clang_cc1 -triple x86_64-apple-macosx10.14.0 -fsyntax-only %s -verify + +typedef unsigned long size_t; + +__attribute__((fortify_stdlib(0, 0))) +int not_anything_special(); // expected-error {{'fortify_stdlib' attribute applied to an unknown function}} + +__attribute__((fortify_stdlib(4, 0))) // expected-error {{'fortify_stdlib' attribute requires integer constant between 0 and 3 inclusive}} +int sprintf(char *, const char *, ...); + +__attribute__((fortify_stdlib())) // expected-error {{'fortify_stdlib' attribute requires exactly 2 arguments}} +int sprintf(char *, const char *, ...); + +__attribute__((fortify_stdlib(1, 2, 3))) // expected-error {{'fortify_stdlib' attribute requires exactly 2 arguments}} +int sprintf(char *, const char *, ...); + +__attribute__((fortify_stdlib(-1, 2))) // expected-error {{'fortify_stdlib' attribute requires a non-negative integral compile time constant expression}} +int sprintf(char *, const char *, ...); diff --git a/clang/test/Sema/inline-asm-validate-x86.c b/clang/test/Sema/inline-asm-validate-x86.c index f21ef6940a6da..026216c92a455 100644 --- a/clang/test/Sema/inline-asm-validate-x86.c +++ b/clang/test/Sema/inline-asm-validate-x86.c @@ -55,6 +55,8 @@ void K(int i, int j) { void L(int i, int j) { static const int Invalid1 = 1; static const int Invalid2 = 42; + static const int Invalid3 = 0; + static const long long Invalid4 = 0x1000000ff; static const int Valid1 = 0xff; static const int Valid2 = 0xffff; static const int Valid3 = 0xffffffff; @@ -67,6 +69,12 @@ void L(int i, int j) { __asm__("xorl %0,%2" : "=r"(i) : "0"(i), "L"(Invalid2)); // expected-error{{value '42' out of range for constraint 'L'}} + __asm__("xorl %0,%2" + : "=r"(i) + : "0"(i), "L"(Invalid3)); // expected-error{{value '0' out of range for constraint 'L'}} + __asm__("xorl %0,%2" + : "=r"(i) + : "0"(i), "L"(Invalid4)); // expected-error{{value '4294967551' out of range for constraint 'L'}} __asm__("xorl %0,%2" : "=r"(i) : "0"(i), "L"(Valid1)); // expected-no-error diff --git a/clang/test/Sema/typo-correction.c b/clang/test/Sema/typo-correction.c index e7992ac90bb3d..73ba265509e4c 100644 --- a/clang/test/Sema/typo-correction.c +++ b/clang/test/Sema/typo-correction.c @@ -100,3 +100,18 @@ void rdar38642201_caller() { structVar1.fieldName1.member1, //expected-error{{use of undeclared identifier 'structVar1'}} structVar2.fieldName2.member2); //expected-error{{use of undeclared identifier 'structVar2'}} } + +void PR40286_g(int x, int y); +void PR40286_h(int x, int y, int z); +void PR40286_1(int the_value) { + PR40286_g(the_walue); // expected-error {{use of undeclared identifier 'the_walue'}} +} +void PR40286_2(int the_value) { + PR40286_h(the_value, the_walue); // expected-error {{use of undeclared identifier 'the_walue'}} +} +void PR40286_3(int the_value) { + PR40286_h(the_walue); // expected-error {{use of undeclared identifier 'the_walue'}} +} +void PR40286_4(int the_value) { // expected-note {{'the_value' declared here}} + PR40286_h(the_value, the_value, the_walue); // expected-error {{use of undeclared identifier 'the_walue'; did you mean 'the_value'?}} +} diff --git a/clang/test/Sema/warn-double-promotion.c b/clang/test/Sema/warn-double-promotion.c index 0cf33e84b427b..5742a4fb3cbd4 100644 --- a/clang/test/Sema/warn-double-promotion.c +++ b/clang/test/Sema/warn-double-promotion.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -verify -fsyntax-only %s -Wdouble-promotion +// RUN: %clang_cc1 -triple x86_64-apple-darwin -verify -fsyntax-only %s -Wdouble-promotion float ReturnFloatFromDouble(double d) { return d; diff --git a/clang/test/SemaCUDA/amdgpu-attrs.cu b/clang/test/SemaCUDA/amdgpu-attrs.cu index 63abda9eea37e..4811ef796c66b 100644 --- a/clang/test/SemaCUDA/amdgpu-attrs.cu +++ b/clang/test/SemaCUDA/amdgpu-attrs.cu @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify %s #include "Inputs/cuda.h" @@ -78,3 +78,119 @@ __global__ void vec_type_hint_int() {} // expected-error@+2{{attribute 'intel_reqd_sub_group_size' can only be applied to an OpenCL kernel function}} __attribute__((intel_reqd_sub_group_size(64))) __global__ void intel_reqd_sub_group_size_64() {} + +// expected-error@+1{{'amdgpu_flat_work_group_size' attribute requires parameter 0 to be an integer constant}} +__attribute__((amdgpu_flat_work_group_size("32", 64))) +__global__ void non_int_min_flat_work_group_size_32_64() {} +// expected-error@+1{{'amdgpu_flat_work_group_size' attribute requires parameter 1 to be an integer constant}} +__attribute__((amdgpu_flat_work_group_size(32, "64"))) +__global__ void non_int_max_flat_work_group_size_32_64() {} + +int nc_min = 32, nc_max = 64; +// expected-error@+1{{'amdgpu_flat_work_group_size' attribute requires parameter 0 to be an integer constant}} +__attribute__((amdgpu_flat_work_group_size(nc_min, 64))) +__global__ void non_cint_min_flat_work_group_size_32_64() {} +// expected-error@+1{{'amdgpu_flat_work_group_size' attribute requires parameter 1 to be an integer constant}} +__attribute__((amdgpu_flat_work_group_size(32, nc_max))) +__global__ void non_cint_max_flat_work_group_size_32_64() {} + +const int c_min = 16, c_max = 32; +__attribute__((amdgpu_flat_work_group_size(c_min * 2, 64))) +__global__ void cint_min_flat_work_group_size_32_64() {} +__attribute__((amdgpu_flat_work_group_size(32, c_max * 2))) +__global__ void cint_max_flat_work_group_size_32_64() {} + +// expected-error@+3{{'T' does not refer to a value}} +// expected-note@+1{{declared here}} +template +__attribute__((amdgpu_flat_work_group_size(T, 64))) +__global__ void template_class_min_flat_work_group_size_32_64() {} +// expected-error@+3{{'T' does not refer to a value}} +// expected-note@+1{{declared here}} +template +__attribute__((amdgpu_flat_work_group_size(32, T))) +__global__ void template_class_max_flat_work_group_size_32_64() {} + +template +__attribute__((amdgpu_flat_work_group_size(a, b))) +__global__ void template_flat_work_group_size_32_64() {} +template __global__ void template_flat_work_group_size_32_64<32, 64>(); + +template +__attribute__((amdgpu_flat_work_group_size(a + b, b + c))) +__global__ void template_complex_flat_work_group_size_32_64() {} +template __global__ void template_complex_flat_work_group_size_32_64<16, 16, 48>(); + +unsigned ipow2(unsigned n) { return n == 0 ? 1 : 2 * ipow2(n - 1); } +constexpr unsigned ce_ipow2(unsigned n) { return n == 0 ? 1 : 2 * ce_ipow2(n - 1); } + +__attribute__((amdgpu_flat_work_group_size(ce_ipow2(5), ce_ipow2(6)))) +__global__ void cexpr_flat_work_group_size_32_64() {} +// expected-error@+1{{'amdgpu_flat_work_group_size' attribute requires parameter 0 to be an integer constant}} +__attribute__((amdgpu_flat_work_group_size(ipow2(5), 64))) +__global__ void non_cexpr_min_flat_work_group_size_32_64() {} +// expected-error@+1{{'amdgpu_flat_work_group_size' attribute requires parameter 1 to be an integer constant}} +__attribute__((amdgpu_flat_work_group_size(32, ipow2(6)))) +__global__ void non_cexpr_max_flat_work_group_size_32_64() {} + +// expected-error@+1{{'amdgpu_waves_per_eu' attribute requires parameter 0 to be an integer constant}} +__attribute__((amdgpu_waves_per_eu("2"))) +__global__ void non_int_min_waves_per_eu_2() {} +// expected-error@+1{{'amdgpu_waves_per_eu' attribute requires parameter 1 to be an integer constant}} +__attribute__((amdgpu_waves_per_eu(2, "4"))) +__global__ void non_int_max_waves_per_eu_2_4() {} + +// expected-error@+1{{'amdgpu_waves_per_eu' attribute requires parameter 0 to be an integer constant}} +__attribute__((amdgpu_waves_per_eu(nc_min))) +__global__ void non_cint_min_waves_per_eu_2() {} +// expected-error@+1{{'amdgpu_waves_per_eu' attribute requires parameter 1 to be an integer constant}} +__attribute__((amdgpu_waves_per_eu(2, nc_max))) +__global__ void non_cint_min_waves_per_eu_2_4() {} + +__attribute__((amdgpu_waves_per_eu(c_min / 8))) +__global__ void cint_min_waves_per_eu_2() {} +__attribute__((amdgpu_waves_per_eu(c_min / 8, c_max / 8))) +__global__ void cint_min_waves_per_eu_2_4() {} + +// expected-error@+3{{'T' does not refer to a value}} +// expected-note@+1{{declared here}} +template +__attribute__((amdgpu_waves_per_eu(T))) +__global__ void cint_min_waves_per_eu_2() {} +// expected-error@+3{{'T' does not refer to a value}} +// expected-note@+1{{declared here}} +template +__attribute__((amdgpu_waves_per_eu(2, T))) +__global__ void cint_min_waves_per_eu_2_4() {} + +template +__attribute__((amdgpu_waves_per_eu(a))) +__global__ void template_waves_per_eu_2() {} +template __global__ void template_waves_per_eu_2<2>(); + +template +__attribute__((amdgpu_waves_per_eu(a, b))) +__global__ void template_waves_per_eu_2_4() {} +template __global__ void template_waves_per_eu_2_4<2, 4>(); + +template +__attribute__((amdgpu_waves_per_eu(a + b, c - b))) +__global__ void template_complex_waves_per_eu_2_4() {} +template __global__ void template_complex_waves_per_eu_2_4<1, 1, 5>(); + +// expected-error@+2{{expression contains unexpanded parameter pack 'Args'}} +template +__attribute__((amdgpu_waves_per_eu(Args))) +__global__ void template_waves_per_eu_2() {} +template __global__ void template_waves_per_eu_2<2, 4>(); + +__attribute__((amdgpu_waves_per_eu(ce_ipow2(1)))) +__global__ void cexpr_waves_per_eu_2() {} +__attribute__((amdgpu_waves_per_eu(ce_ipow2(1), ce_ipow2(2)))) +__global__ void cexpr_waves_per_eu_2_4() {} +// expected-error@+1{{'amdgpu_waves_per_eu' attribute requires parameter 0 to be an integer constant}} +__attribute__((amdgpu_waves_per_eu(ipow2(1)))) +__global__ void non_cexpr_waves_per_eu_2() {} +// expected-error@+1{{'amdgpu_waves_per_eu' attribute requires parameter 1 to be an integer constant}} +__attribute__((amdgpu_waves_per_eu(2, ipow2(2)))) +__global__ void non_cexpr_waves_per_eu_2_4() {} diff --git a/clang/test/SemaCUDA/amdgpu-windows-vectorcall.cu b/clang/test/SemaCUDA/amdgpu-windows-vectorcall.cu new file mode 100644 index 0000000000000..7636572f69833 --- /dev/null +++ b/clang/test/SemaCUDA/amdgpu-windows-vectorcall.cu @@ -0,0 +1,4 @@ +// RUN: %clang_cc1 -triple amdgcn-amd-amdhsa -aux-triple x86_64-pc-windows-msvc -fms-compatibility -fcuda-is-device -fsyntax-only -verify %s + +__cdecl void hostf1(); +__vectorcall void (*hostf2)() = hostf1; // expected-error {{cannot initialize a variable of type 'void ((*))() __attribute__((vectorcall))' with an lvalue of type 'void () __attribute__((cdecl))'}} diff --git a/clang/test/SemaCUDA/asm_delayed_diags.cu b/clang/test/SemaCUDA/asm_delayed_diags.cu new file mode 100644 index 0000000000000..457054f608fab --- /dev/null +++ b/clang/test/SemaCUDA/asm_delayed_diags.cu @@ -0,0 +1,118 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s -DHOST -triple x86_64-unknown-linux-gnu -Wuninitialized +// RUN: %clang_cc1 -fsyntax-only -verify %s -DHOST -DHOST_USED -triple x86_64-unknown-linux-gnu -Wuninitialized +// RUN: %clang_cc1 -fsyntax-only -fcuda-is-device -verify %s -DDEVICE_NOT_USED -triple nvptx-unknown-cuda -Wuninitialized +// RUN: %clang_cc1 -fsyntax-only -fcuda-is-device -verify %s -DDEVICE -triple nvptx-unknown-cuda -Wuninitialized +// RUN: %clang_cc1 -fsyntax-only -fcuda-is-device -verify %s -DDEVICE -DDEVICE_USED -triple nvptx-unknown-cuda -Wuninitialized + +// REQUIRES: x86-registered-target +// REQUIRES: nvptx-registered-target + +#if (defined(HOST) && !defined(HOST_USED)) || defined(DEVICE_NOT_USED) +// expected-no-diagnostics +#endif + +#include "Inputs/cuda.h" + +static __device__ __host__ void t1(int r) { + __asm__("PR3908 %[lf] %[xx] %[li] %[r]" + : [ r ] "+r"(r) + : [ lf ] "mx"(0), [ li ] "mr"(0), [ xx ] "x"((double)(0))); +} + +static __device__ __host__ unsigned t2(signed char input) { + unsigned output; + __asm__("xyz" + : "=a"(output) + : "0"(input)); + return output; +} + +static __device__ __host__ double t3(double x) { + register long double result; + __asm __volatile("frndint" + : "=t"(result) + : "0"(x)); + return result; +} + +static __device__ __host__ unsigned char t4(unsigned char a, unsigned char b) { + unsigned int la = a; + unsigned int lb = b; + unsigned int bigres; + unsigned char res; + __asm__("0:\n1:\n" + : [ bigres ] "=la"(bigres) + : [ la ] "0"(la), [ lb ] "c"(lb) + : "edx", "cc"); + res = bigres; + return res; +} + +static __device__ __host__ void t5(void) { + __asm__ __volatile__( + "finit" + : + : + : "st", "st(1)", "st(2)", "st(3)", + "st(4)", "st(5)", "st(6)", "st(7)", + "fpsr", "fpcr"); +} + +typedef long long __m256i __attribute__((__vector_size__(32))); +static __device__ __host__ void t6(__m256i *p) { + __asm__ volatile("vmovaps %0, %%ymm0" ::"m"(*(__m256i *)p) + : "ymm0"); +} + +static __device__ __host__ void t7(__m256i *p) { + __asm__ volatile("vmovaps %0, %%ymm0" ::"m"(*(__m256i *)p) + : "r0"); +} + +#ifdef DEVICE +__device__ int m() { + t1(0); + t2(0); + t3(0); + t4(0, 0); + t5(); + t6(0); +#ifdef DEVICE_USED + t7(0); +#endif // DEVICE_USED + return 0; +} +#endif // DEVICE + +#ifdef HOST +__host__ int main() { + t1(0); + t2(0); + t3(0); + t4(0, 0); + t5(); + t6(0); +#ifdef HOST_USED + t7(0); +#endif // HOST_USED + return 0; +} +#endif // HOST + +#if defined(HOST_USED) +// expected-error@69 {{unknown register name 'r0' in asm}} +// expected-note@96 {{called by 'main'}} +#elif defined(DEVICE) +// expected-error@19 {{invalid input constraint 'mx' in asm}} +// expected-error@25 {{invalid output constraint '=a' in asm}} +// expected-error@33 {{invalid output constraint '=t' in asm}} +// expected-error@44 {{invalid output constraint '=la' in asm}} +// expected-error@56 {{unknown register name 'st' in asm}} +// expected-error@64 {{unknown register name 'ymm0' in asm}} +// expected-note@74 {{called by 'm'}} +// expected-note@75 {{called by 'm'}} +// expected-note@76 {{called by 'm'}} +// expected-note@77 {{called by 'm'}} +// expected-note@78 {{called by 'm'}} +// expected-note@79 {{called by 'm'}} +#endif diff --git a/clang/test/SemaCUDA/call-device-fn-from-host.cu b/clang/test/SemaCUDA/call-device-fn-from-host.cu index 26215d581d257..ba1ce86020453 100644 --- a/clang/test/SemaCUDA/call-device-fn-from-host.cu +++ b/clang/test/SemaCUDA/call-device-fn-from-host.cu @@ -37,7 +37,7 @@ __host__ __device__ void T::hd3() { } template __host__ __device__ void hd2() { device_fn(); } -// expected-error@-1 {{reference to __device__ function 'device_fn' in __host__ __device__ function}} +// expected-error@-1 2 {{reference to __device__ function 'device_fn' in __host__ __device__ function}} void host_fn() { hd2(); } __host__ __device__ void hd() { device_fn(); } @@ -90,3 +90,8 @@ __host__ __device__ void fn_ptr_template() { static __host__ __device__ void hd_func() { device_fn(); } __global__ void kernel() { hd_func(); } void host_func(void) { kernel<<<1, 1>>>(); } + +// Should allow host function call kernel template with device function argument. +__device__ void f(); +template __global__ void t() { F(); } +__host__ void g() { t<<<1,1>>>(); } diff --git a/clang/test/SemaCUDA/call-host-fn-from-device.cu b/clang/test/SemaCUDA/call-host-fn-from-device.cu index acdd291b66457..c5bbd63d8e06c 100644 --- a/clang/test/SemaCUDA/call-host-fn-from-device.cu +++ b/clang/test/SemaCUDA/call-host-fn-from-device.cu @@ -56,14 +56,14 @@ __host__ __device__ void T::hd3() { } template __host__ __device__ void hd2() { host_fn(); } -// expected-error@-1 {{reference to __host__ function 'host_fn' in __host__ __device__ function}} +// expected-error@-1 2 {{reference to __host__ function 'host_fn' in __host__ __device__ function}} __global__ void kernel() { hd2(); } __host__ __device__ void hd() { host_fn(); } // expected-error@-1 {{reference to __host__ function 'host_fn' in __host__ __device__ function}} template __host__ __device__ void hd3() { host_fn(); } -// expected-error@-1 {{reference to __host__ function 'host_fn' in __host__ __device__ function}} +// expected-error@-1 2 {{reference to __host__ function 'host_fn' in __host__ __device__ function}} __device__ void device_fn() { hd3(); } // No error because this is never instantiated. diff --git a/clang/test/SemaCUDA/vla.cu b/clang/test/SemaCUDA/vla.cu index b65ae5e5fe214..cf3054cd8e95f 100644 --- a/clang/test/SemaCUDA/vla.cu +++ b/clang/test/SemaCUDA/vla.cu @@ -1,5 +1,9 @@ // RUN: %clang_cc1 -triple nvptx64-nvidia-cuda -fcuda-is-device -verify %s -// RUN: %clang_cc1 -triple nvptx64-nvidia-cuda -verify -DHOST %s +// RUN: %clang_cc1 -triple x86_64-unknown-linux -verify -DHOST %s + +#ifndef __CUDA_ARCH__ +// expected-no-diagnostics +#endif #include "Inputs/cuda.h" @@ -8,7 +12,10 @@ void host(int n) { } __device__ void device(int n) { - int x[n]; // expected-error {{cannot use variable-length arrays in __device__ functions}} + int x[n]; +#ifdef __CUDA_ARCH__ + // expected-error@-2 {{cannot use variable-length arrays in __device__ functions}} +#endif } __host__ __device__ void hd(int n) { diff --git a/clang/test/SemaCXX/constant-expression-cxx11.cpp b/clang/test/SemaCXX/constant-expression-cxx11.cpp index 578a057104a32..a8076bc19fe0d 100644 --- a/clang/test/SemaCXX/constant-expression-cxx11.cpp +++ b/clang/test/SemaCXX/constant-expression-cxx11.cpp @@ -2220,3 +2220,11 @@ namespace PointerArithmeticOverflow { constexpr int *q = (&n + 1) - (unsigned __int128)-1; // expected-error {{constant expression}} expected-note {{cannot refer to element -3402}} constexpr int *r = &(&n + 1)[(unsigned __int128)-1]; // expected-error {{constant expression}} expected-note {{cannot refer to element 3402}} } + +namespace PR40430 { + struct S { + char c[10] = "asdf"; + constexpr char foo() const { return c[3]; } + }; + static_assert(S().foo() == 'f', ""); +} diff --git a/clang/test/SemaCXX/constexpr-string.cpp b/clang/test/SemaCXX/constexpr-string.cpp index c348c0ff747dd..f540be8f8e5b1 100644 --- a/clang/test/SemaCXX/constexpr-string.cpp +++ b/clang/test/SemaCXX/constexpr-string.cpp @@ -1,7 +1,9 @@ // RUN: %clang_cc1 %s -triple x86_64-linux-gnu -std=c++2a -fsyntax-only -verify -pedantic -Wno-vla-extension +// RUN: %clang_cc1 %s -triple x86_64-linux-gnu -std=gnu++2a -fsyntax-only -verify -pedantic -Wno-vla-extension -DGNUMODE // RUN: %clang_cc1 %s -triple x86_64-linux-gnu -std=c++2a -fsyntax-only -verify -pedantic -Wno-vla-extension -fno-signed-char // RUN: %clang_cc1 %s -triple x86_64-linux-gnu -std=c++2a -fsyntax-only -verify -pedantic -Wno-vla-extension -fno-wchar -DNO_PREDEFINED_WCHAR_T // RUN: %clang_cc1 %s -triple armebv7-unknown-linux -std=c++2a -fsyntax-only -verify -pedantic -Wno-vla-extension +// RUN: %clang_cc1 %s -triple armebv7-unknown-linux -std=gnu++2a -fsyntax-only -verify -pedantic -Wno-vla-extension -DGNUMODE // RUN: %clang_cc1 %s -triple armebv7-unknown-linux -std=c++2a -fsyntax-only -verify -pedantic -Wno-vla-extension -fno-signed-char // RUN: %clang_cc1 %s -triple armebv7-unknown-linux -std=c++2a -fsyntax-only -verify -pedantic -Wno-vla-extension -fno-wchar -DNO_PREDEFINED_WCHAR_T @@ -15,6 +17,10 @@ extern "C" { extern int strncmp(const char *s1, const char *s2, size_t n); extern int memcmp(const void *s1, const void *s2, size_t n); +#ifdef GNUMODE + extern int bcmp(const void *s1, const void *s2, size_t n); +#endif + extern char *strchr(const char *s, int c); extern void *memchr(const void *s, int c, size_t n); @@ -101,12 +107,28 @@ namespace StrcmpEtc { static_assert(__builtin_memcmp("abab\0banana", "abab\0canada", 6) == -1); static_assert(__builtin_memcmp("abab\0banana", "abab\0canada", 5) == 0); + static_assert(__builtin_bcmp("abaa", "abba", 3) != 0); + static_assert(__builtin_bcmp("abaa", "abba", 2) == 0); + static_assert(__builtin_bcmp("a\203", "a", 2) != 0); + static_assert(__builtin_bcmp("a\203", "a\003", 2) != 0); + static_assert(__builtin_bcmp(0, 0, 0) == 0); + static_assert(__builtin_bcmp("abab\0banana", "abab\0banana", 100) == 0); // expected-error {{not an integral constant}} expected-note {{dereferenced one-past-the-end}} + static_assert(__builtin_bcmp("abab\0banana", "abab\0canada", 100) != 0); // FIXME: Should we reject this? + static_assert(__builtin_bcmp("abab\0banana", "abab\0canada", 7) != 0); + static_assert(__builtin_bcmp("abab\0banana", "abab\0canada", 6) != 0); + static_assert(__builtin_bcmp("abab\0banana", "abab\0canada", 5) == 0); + extern struct Incomplete incomplete; static_assert(__builtin_memcmp(&incomplete, "", 0u) == 0); static_assert(__builtin_memcmp("", &incomplete, 0u) == 0); static_assert(__builtin_memcmp(&incomplete, "", 1u) == 42); // expected-error {{not an integral constant}} expected-note {{read of incomplete type 'struct Incomplete'}} static_assert(__builtin_memcmp("", &incomplete, 1u) == 42); // expected-error {{not an integral constant}} expected-note {{read of incomplete type 'struct Incomplete'}} + static_assert(__builtin_bcmp(&incomplete, "", 0u) == 0); + static_assert(__builtin_bcmp("", &incomplete, 0u) == 0); + static_assert(__builtin_bcmp(&incomplete, "", 1u) == 42); // expected-error {{not an integral constant}} expected-note {{read of incomplete type 'struct Incomplete'}} + static_assert(__builtin_bcmp("", &incomplete, 1u) == 42); // expected-error {{not an integral constant}} expected-note {{read of incomplete type 'struct Incomplete'}} + constexpr unsigned char ku00fe00[] = {0x00, 0xfe, 0x00}; constexpr unsigned char ku00feff[] = {0x00, 0xfe, 0xff}; constexpr signed char ks00fe00[] = {0, -2, 0}; @@ -121,11 +143,24 @@ namespace StrcmpEtc { static_assert(__builtin_memcmp(ks00feff, ks00fe00, 99) == 1); static_assert(__builtin_memcmp(ks00fe00, ks00feff, 99) == -1); + static_assert(__builtin_bcmp(ku00feff, ks00fe00, 2) == 0); + static_assert(__builtin_bcmp(ku00feff, ks00fe00, 99) != 0); + static_assert(__builtin_bcmp(ku00fe00, ks00feff, 99) != 0); + static_assert(__builtin_bcmp(ks00feff, ku00fe00, 2) == 0); + static_assert(__builtin_bcmp(ks00feff, ku00fe00, 99) != 0); + static_assert(__builtin_bcmp(ks00fe00, ku00feff, 99) != 0); + static_assert(__builtin_bcmp(ks00fe00, ks00feff, 2) == 0); + static_assert(__builtin_bcmp(ks00feff, ks00fe00, 99) != 0); + static_assert(__builtin_bcmp(ks00fe00, ks00feff, 99) != 0); + struct Bool3Tuple { bool bb[3]; }; constexpr Bool3Tuple kb000100 = {{false, true, false}}; static_assert(sizeof(bool) != 1u || __builtin_memcmp(ks00fe00, kb000100.bb, 1) == 0); static_assert(sizeof(bool) != 1u || __builtin_memcmp(ks00fe00, kb000100.bb, 2) == 1); + static_assert(sizeof(bool) != 1u || __builtin_bcmp(ks00fe00, kb000100.bb, 1) == 0); + static_assert(sizeof(bool) != 1u || __builtin_bcmp(ks00fe00, kb000100.bb, 2) != 0); + constexpr long ksl[] = {0, -1}; constexpr unsigned int kui[] = {0, 0u - 1}; constexpr unsigned long long kull[] = {0, 0ull - 1}; @@ -148,9 +183,23 @@ namespace StrcmpEtc { static_assert(__builtin_memcmp(ksl + 1, kuSizeofLong() + 1, sizeof(long) + 0) == 0); static_assert(__builtin_memcmp(ksl + 1, kuSizeofLong() + 1, sizeof(long) + 1) == 42); // expected-error {{not an integral constant}} expected-note {{dereferenced one-past-the-end}} + static_assert(__builtin_bcmp(ksl, kuSizeofLong(), sizeof(long) - 1) == 0); + static_assert(__builtin_bcmp(ksl, kuSizeofLong(), sizeof(long) + 0) == 0); + static_assert(__builtin_bcmp(ksl, kuSizeofLong(), sizeof(long) + 1) == 0); + static_assert(__builtin_bcmp(ksl, kuSizeofLong(), 2*sizeof(long) - 1) == 0); + static_assert(__builtin_bcmp(ksl, kuSizeofLong(), 2*sizeof(long) + 0) == 0); + static_assert(__builtin_bcmp(ksl, kuSizeofLong(), 2*sizeof(long) + 1) == 42); // expected-error {{not an integral constant}} expected-note {{dereferenced one-past-the-end}} + static_assert(__builtin_bcmp(ksl + 1, kuSizeofLong() + 1, sizeof(long) - 1) == 0); + static_assert(__builtin_bcmp(ksl + 1, kuSizeofLong() + 1, sizeof(long) + 0) == 0); + static_assert(__builtin_bcmp(ksl + 1, kuSizeofLong() + 1, sizeof(long) + 1) == 42); // expected-error {{not an integral constant}} expected-note {{dereferenced one-past-the-end}} + constexpr int a = strcmp("hello", "world"); // expected-error {{constant expression}} expected-note {{non-constexpr function 'strcmp' cannot be used in a constant expression}} constexpr int b = strncmp("hello", "world", 3); // expected-error {{constant expression}} expected-note {{non-constexpr function 'strncmp' cannot be used in a constant expression}} constexpr int c = memcmp("hello", "world", 3); // expected-error {{constant expression}} expected-note {{non-constexpr function 'memcmp' cannot be used in a constant expression}} + +#ifdef GNUMODE + constexpr int d = bcmp("hello", "world", 3); // expected-error {{constant expression}} expected-note {{non-constexpr function 'bcmp' cannot be used in a constant expression}} +#endif } namespace MultibyteElementTests { diff --git a/clang/test/SemaCXX/int-ptr-cast-SFINAE.cpp b/clang/test/SemaCXX/int-ptr-cast-SFINAE.cpp index 0d2bb6083adae..5782a6dbaeae0 100644 --- a/clang/test/SemaCXX/int-ptr-cast-SFINAE.cpp +++ b/clang/test/SemaCXX/int-ptr-cast-SFINAE.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++14 // RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++17 void foo(int* a, int *b) { diff --git a/clang/test/SemaCXX/warn-bad-memaccess.cpp b/clang/test/SemaCXX/warn-bad-memaccess.cpp index 55ce4a0da031b..c7320901fc3ed 100644 --- a/clang/test/SemaCXX/warn-bad-memaccess.cpp +++ b/clang/test/SemaCXX/warn-bad-memaccess.cpp @@ -3,7 +3,8 @@ extern "C" void *memset(void *, int, unsigned); extern "C" void *memmove(void *s1, const void *s2, unsigned n); extern "C" void *memcpy(void *s1, const void *s2, unsigned n); -extern "C" void *memcmp(void *s1, const void *s2, unsigned n); +extern "C" int memcmp(void *s1, const void *s2, unsigned n); +extern "C" int bcmp(void *s1, const void *s2, unsigned n); // Redeclare without the extern "C" to test that we still figure out that this @@ -59,6 +60,12 @@ void test_warn() { memcmp(0, &x1, sizeof x1); // \ // expected-warning{{second operand of this 'memcmp' call is a pointer to dynamic class 'X1'; vtable pointer will be compared}} \ // expected-note {{explicitly cast the pointer to silence this warning}} + bcmp(&x1, 0, sizeof x1); // \ + // expected-warning{{first operand of this 'bcmp' call is a pointer to dynamic class 'X1'; vtable pointer will be compared}} \ + // expected-note {{explicitly cast the pointer to silence this warning}} + bcmp(0, &x1, sizeof x1); // \ + // expected-warning{{second operand of this 'bcmp' call is a pointer to dynamic class 'X1'; vtable pointer will be compared}} \ + // expected-note {{explicitly cast the pointer to silence this warning}} __builtin_memset(&x1, 0, sizeof x1); // \ // expected-warning {{destination for this '__builtin_memset' call is a pointer to dynamic class}} \ diff --git a/clang/test/SemaCXX/warn-float-conversion.cpp b/clang/test/SemaCXX/warn-float-conversion.cpp index 7dec4844b062e..fad1ff147e492 100644 --- a/clang/test/SemaCXX/warn-float-conversion.cpp +++ b/clang/test/SemaCXX/warn-float-conversion.cpp @@ -44,17 +44,17 @@ void Convert(float f, double d, long double ld) { void CompoundAssignment() { int x = 3; - x += 1.234; //expected-warning{{conversion}} - x -= -0.0; //expected-warning{{conversion}} - x *= 1.1f; //expected-warning{{conversion}} - x /= -2.2f; //expected-warning{{conversion}} + x += 1.234; // expected-warning {{implicit conversion turns floating-point number into integer: 'double' to 'int'}} + x -= -0.0; // expected-warning {{implicit conversion turns floating-point number into integer: 'double' to 'int'}} + x *= 1.1f; // expected-warning {{implicit conversion turns floating-point number into integer: 'float' to 'int'}} + x /= -2.2f; // expected-warning {{implicit conversion turns floating-point number into integer: 'float' to 'int'}} - int y = x += 1.4f; //expected-warning{{conversion}} + int y = x += 1.4f; // expected-warning {{implicit conversion turns floating-point number into integer: 'float' to 'int'}} float z = 1.1f; double w = -2.2; - y += z + w; //expected-warning{{conversion}} + y += z + w; // expected-warning {{implicit conversion turns floating-point number into integer: 'double' to 'int'}} } # 1 "foo.h" 3 diff --git a/clang/test/SemaCXX/warn-infinite-recursion.cpp b/clang/test/SemaCXX/warn-infinite-recursion.cpp index bbeff92a657b8..e5a5a18b65717 100644 --- a/clang/test/SemaCXX/warn-infinite-recursion.cpp +++ b/clang/test/SemaCXX/warn-infinite-recursion.cpp @@ -53,19 +53,28 @@ int j() { // expected-warning{{call itself}} return 5 + j(); } -void k() { // expected-warning{{call itself}} +// Don't warn on infinite loops +void k() { while(true) { k(); } } -// Don't warn on infinite loops void l() { while (true) {} l(); } +void m() { + static int count = 5; + if (count >0) { + count--; + l(); + } + while (true) {} +} + class S { static void a(); void b(); diff --git a/clang/test/SemaCXX/warn-unsequenced-cxx17.cpp b/clang/test/SemaCXX/warn-unsequenced-cxx17.cpp deleted file mode 100644 index 3c221fb8d6560..0000000000000 --- a/clang/test/SemaCXX/warn-unsequenced-cxx17.cpp +++ /dev/null @@ -1,8 +0,0 @@ -// RUN: %clang_cc1 -fsyntax-only -verify -std=c++17 -Wno-unused %s - -void test() { - int xs[10]; - int *p = xs; - // expected-no-diagnostics - p[(long long unsigned)(p = 0)]; // ok -} diff --git a/clang/test/SemaCXX/warn-unsequenced.cpp b/clang/test/SemaCXX/warn-unsequenced.cpp index 6d4468cabfe56..1dd2f6d74db56 100644 --- a/clang/test/SemaCXX/warn-unsequenced.cpp +++ b/clang/test/SemaCXX/warn-unsequenced.cpp @@ -1,4 +1,7 @@ -// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 -Wno-unused %s +// RUN: %clang_cc1 -fsyntax-only -verify=cxx11 -std=c++11 -Wno-unused -Wno-uninitialized \ +// RUN: -Wunsequenced -Wno-c++17-extensions -Wno-c++14-extensions %s +// RUN: %clang_cc1 -fsyntax-only -verify=cxx17 -std=c++17 -Wno-unused -Wno-uninitialized \ +// RUN: -Wunsequenced -Wno-c++17-extensions -Wno-c++14-extensions %s int f(int, int = 0); @@ -10,81 +13,107 @@ struct S { int n; }; +// TODO: Implement the C++17 sequencing rules. void test() { int a; int xs[10]; ++a = 0; // ok - a + ++a; // expected-warning {{unsequenced modification and access to 'a'}} + a + ++a; // cxx11-warning {{unsequenced modification and access to 'a'}} + // cxx17-warning@-1 {{unsequenced modification and access to 'a'}} a = ++a; // ok - a + a++; // expected-warning {{unsequenced modification and access to 'a'}} - a = a++; // expected-warning {{multiple unsequenced modifications to 'a'}} + a + a++; // cxx11-warning {{unsequenced modification and access to 'a'}} + // cxx17-warning@-1 {{unsequenced modification and access to 'a'}} + a = a++; // cxx11-warning {{multiple unsequenced modifications to 'a'}} + // TODO cxx17-warning@-1 {{multiple unsequenced modifications to 'a'}} ++ ++a; // ok (a++, a++); // ok - ++a + ++a; // expected-warning {{multiple unsequenced modifications to 'a'}} - a++ + a++; // expected-warning {{multiple unsequenced modifications}} + ++a + ++a; // cxx11-warning {{multiple unsequenced modifications to 'a'}} + // cxx17-warning@-1 {{multiple unsequenced modifications to 'a'}} + a++ + a++; // cxx11-warning {{multiple unsequenced modifications to 'a'}} + // cxx17-warning@-1 {{multiple unsequenced modifications to 'a'}} (a++, a) = 0; // ok, increment is sequenced before value computation of LHS a = xs[++a]; // ok - a = xs[a++]; // expected-warning {{multiple unsequenced modifications}} - (a ? xs[0] : xs[1]) = ++a; // expected-warning {{unsequenced modification and access}} + a = xs[a++]; // cxx11-warning {{multiple unsequenced modifications to 'a'}} + // TODO cxx17-warning@-1 {{multiple unsequenced modifications to 'a'}} + (a ? xs[0] : xs[1]) = ++a; // cxx11-warning {{unsequenced modification and access to 'a'}} + // TODO cxx17-warning@-1 {{unsequenced modification and access to 'a'}} a = (++a, ++a); // ok a = (a++, ++a); // ok - a = (a++, a++); // expected-warning {{multiple unsequenced modifications}} + a = (a++, a++); // cxx11-warning {{multiple unsequenced modifications to 'a'}} + // TODO cxx17-warning@-1 {{multiple unsequenced modifications to 'a'}} f(a, a); // ok - f(a = 0, a); // expected-warning {{unsequenced modification and access}} - f(a, a += 0); // expected-warning {{unsequenced modification and access}} - f(a = 0, a = 0); // expected-warning {{multiple unsequenced modifications}} + f(a = 0, a); // cxx11-warning {{unsequenced modification and access to 'a'}} + // cxx17-warning@-1 {{unsequenced modification and access to 'a'}} + f(a, a += 0); // cxx11-warning {{unsequenced modification and access to 'a'}} + // cxx17-warning@-1 {{unsequenced modification and access to 'a'}} + f(a = 0, a = 0); // cxx11-warning {{multiple unsequenced modifications to 'a'}} + // cxx17-warning@-1 {{multiple unsequenced modifications to 'a'}} a = f(++a); // ok a = f(a++); // ok - a = f(++a, a++); // expected-warning {{multiple unsequenced modifications}} + a = f(++a, a++); // cxx11-warning {{multiple unsequenced modifications to 'a'}} + // cxx17-warning@-1 {{multiple unsequenced modifications to 'a'}} // Compound assignment "A OP= B" is equivalent to "A = A OP B" except that A // is evaluated only once. (++a, a) = 1; // ok (++a, a) += 1; // ok a = ++a; // ok - a += ++a; // expected-warning {{unsequenced modification and access}} + a += ++a; // cxx11-warning {{unsequenced modification and access to 'a'}} + // TODO cxx17-warning@-1 {{unsequenced modification and access to 'a'}} A agg1 = { a++, a++ }; // ok - A agg2 = { a++ + a, a++ }; // expected-warning {{unsequenced modification and access}} + A agg2 = { a++ + a, a++ }; // cxx11-warning {{unsequenced modification and access to 'a'}} + // cxx17-warning@-1 {{unsequenced modification and access to 'a'}} - S str1(a++, a++); // expected-warning {{multiple unsequenced modifications}} + S str1(a++, a++); // cxx11-warning {{multiple unsequenced modifications to 'a'}} + // cxx17-warning@-1 {{multiple unsequenced modifications to 'a'}} S str2 = { a++, a++ }; // ok - S str3 = { a++ + a, a++ }; // expected-warning {{unsequenced modification and access}} + S str3 = { a++ + a, a++ }; // cxx11-warning {{unsequenced modification and access to 'a'}} + // cxx17-warning@-1 {{unsequenced modification and access to 'a'}} struct Z { A a; S s; } z = { { ++a, ++a }, { ++a, ++a } }; // ok a = S { ++a, a++ }.n; // ok A { ++a, a++ }.x; // ok - a = A { ++a, a++ }.x; // expected-warning {{unsequenced modifications}} - A { ++a, a++ }.x + A { ++a, a++ }.y; // expected-warning {{unsequenced modifications}} + a = A { ++a, a++ }.x; // cxx11-warning {{multiple unsequenced modifications to 'a'}} + // TODO cxx17-warning@-1 {{multiple unsequenced modifications to 'a'}} + A { ++a, a++ }.x + A { ++a, a++ }.y; // cxx11-warning {{multiple unsequenced modifications to 'a'}} + // cxx17-warning@-1 {{multiple unsequenced modifications to 'a'}} (xs[2] && (a = 0)) + a; // ok (0 && (a = 0)) + a; // ok - (1 && (a = 0)) + a; // expected-warning {{unsequenced modification and access}} + (1 && (a = 0)) + a; // cxx11-warning {{unsequenced modification and access to 'a'}} + // cxx17-warning@-1 {{unsequenced modification and access to 'a'}} (xs[3] || (a = 0)) + a; // ok - (0 || (a = 0)) + a; // expected-warning {{unsequenced modification and access}} + (0 || (a = 0)) + a; // cxx11-warning {{unsequenced modification and access to 'a'}} + // cxx17-warning@-1 {{unsequenced modification and access to 'a'}} (1 || (a = 0)) + a; // ok (xs[4] ? a : ++a) + a; // ok - (0 ? a : ++a) + a; // expected-warning {{unsequenced modification and access}} + (0 ? a : ++a) + a; // cxx11-warning {{unsequenced modification and access to 'a'}} + // cxx17-warning@-1 {{unsequenced modification and access to 'a'}} (1 ? a : ++a) + a; // ok - (0 ? a : a++) + a; // expected-warning {{unsequenced modification and access}} + (0 ? a : a++) + a; // cxx11-warning {{unsequenced modification and access to 'a'}} + // cxx17-warning@-1 {{unsequenced modification and access to 'a'}} (1 ? a : a++) + a; // ok (xs[5] ? ++a : ++a) + a; // FIXME: warn here - (++a, xs[6] ? ++a : 0) + a; // expected-warning {{unsequenced modification and access}} + (++a, xs[6] ? ++a : 0) + a; // cxx11-warning {{unsequenced modification and access to 'a'}} + // cxx17-warning@-1 {{unsequenced modification and access to 'a'}} // Here, the read of the fourth 'a' might happen before or after the write to // the second 'a'. - a += (a++, a) + a; // expected-warning {{unsequenced modification and access}} + a += (a++, a) + a; // cxx11-warning {{unsequenced modification and access to 'a'}} + // cxx17-warning@-1 {{unsequenced modification and access to 'a'}} int *p = xs; a = *(a++, p); // ok a = a++ && a; // ok - p[(long long unsigned)(p = 0)]; // expected-warning {{unsequenced modification and access to 'p'}} + p[(long long unsigned)(p = 0)]; // cxx11-warning {{unsequenced modification and access to 'p'}} A *q = &agg1; - (q = &agg2)->y = q->x; // expected-warning {{unsequenced modification and access to 'q'}} + (q = &agg2)->y = q->x; // cxx11-warning {{unsequenced modification and access to 'q'}} + // TODO cxx17-warning@-1 {{unsequenced modification and access to 'q'}} // This has undefined behavior if a == 0; otherwise, the side-effect of the // increment is sequenced before the value computation of 'f(a, a)', which is @@ -102,19 +131,326 @@ void test() { (a -= 128) &= 128; // ok ++a += 1; // ok - xs[8] ? ++a + a++ : 0; // expected-warning {{multiple unsequenced modifications}} - xs[8] ? 0 : ++a + a++; // expected-warning {{multiple unsequenced modifications}} + xs[8] ? ++a + a++ : 0; // cxx11-warning {{multiple unsequenced modifications to 'a'}} + // cxx17-warning@-1 {{multiple unsequenced modifications to 'a'}} + xs[8] ? 0 : ++a + a++; // cxx11-warning {{multiple unsequenced modifications to 'a'}} + // cxx17-warning@-1 {{multiple unsequenced modifications to 'a'}} xs[8] ? ++a : a++; // ok - xs[8] && (++a + a++); // expected-warning {{multiple unsequenced modifications}} - xs[8] || (++a + a++); // expected-warning {{multiple unsequenced modifications}} + xs[8] && (++a + a++); // cxx11-warning {{multiple unsequenced modifications to 'a'}} + // cxx17-warning@-1 {{multiple unsequenced modifications to 'a'}} + xs[8] || (++a + a++); // cxx11-warning {{multiple unsequenced modifications to 'a'}} + // cxx17-warning@-1 {{multiple unsequenced modifications to 'a'}} (__builtin_classify_type(++a) ? 1 : 0) + ++a; // ok (__builtin_constant_p(++a) ? 1 : 0) + ++a; // ok (__builtin_object_size(&(++a, a), 0) ? 1 : 0) + ++a; // ok - (__builtin_expect(++a, 0) ? 1 : 0) + ++a; // expected-warning {{multiple unsequenced modifications}} + (__builtin_expect(++a, 0) ? 1 : 0) + ++a; // cxx11-warning {{multiple unsequenced modifications to 'a'}} + // cxx17-warning@-1 {{multiple unsequenced modifications to 'a'}} } +namespace members { + +struct S1 { + unsigned bf1 : 2; + unsigned bf2 : 2; + unsigned a; + unsigned b; + static unsigned x; + void member_f(S1 &s); +}; + +void S1::member_f(S1 &s) { + ++a + ++a; // cxx11-warning {{multiple unsequenced modifications to 'a'}} + // cxx17-warning@-1 {{multiple unsequenced modifications to 'a'}} + a + ++a; // cxx11-warning {{unsequenced modification and access to 'a'}} + // cxx17-warning@-1 {{unsequenced modification and access to 'a'}} + ++a + ++b; // no-warning + a + ++b; // no-warning + + // TODO: Warn here. + ++s.a + ++s.a; // no-warning TODO {{multiple unsequenced modifications to}} + s.a + ++s.a; // no-warning TODO {{unsequenced modification and access to}} + ++s.a + ++s.b; // no-warning + s.a + ++s.b; // no-warning + + ++a + ++s.a; // no-warning + a + ++s.a; // no-warning + ++a + ++s.b; // no-warning + a + ++s.b; // no-warning + + // TODO Warn here for bit-fields in the same memory location. + ++bf1 + ++bf1; // cxx11-warning {{multiple unsequenced modifications to 'bf1'}} + // cxx17-warning@-1 {{multiple unsequenced modifications to 'bf1'}} + bf1 + ++bf1; // cxx11-warning {{unsequenced modification and access to 'bf1'}} + // cxx17-warning@-1 {{unsequenced modification and access to 'bf1'}} + ++bf1 + ++bf2; // no-warning TODO {{multiple unsequenced modifications to}} + bf1 + ++bf2; // no-warning TODO {{unsequenced modification and access to}} + + // TODO Warn here for bit-fields in the same memory location. + ++s.bf1 + ++s.bf1; // no-warning TODO {{multiple unsequenced modifications to}} + s.bf1 + ++s.bf1; // no-warning TODO {{unsequenced modification and access to}} + ++s.bf1 + ++s.bf2; // no-warning TODO {{multiple unsequenced modifications to}} + s.bf1 + ++s.bf2; // no-warning TODO {{unsequenced modification and access to}} + + ++bf1 + ++s.bf1; // no-warning + bf1 + ++s.bf1; // no-warning + ++bf1 + ++s.bf2; // no-warning + bf1 + ++s.bf2; // no-warning + + struct Der : S1 {}; + Der d; + Der &d_ref = d; + S1 &s1_ref = d_ref; + + ++s1_ref.a + ++d_ref.a; // no-warning TODO {{multiple unsequenced modifications to member 'a' of 'd'}} + ++s1_ref.a + d_ref.a; // no-warning TODO {{unsequenced modification and access to member 'a' of 'd'}} + ++s1_ref.a + ++d_ref.b; // no-warning + ++s1_ref.a + d_ref.b; // no-warning + + ++x + ++x; // cxx11-warning {{multiple unsequenced modifications to 'x'}} + // cxx17-warning@-1 {{multiple unsequenced modifications to 'x'}} + ++x + x; // cxx11-warning {{unsequenced modification and access to 'x'}} + // cxx17-warning@-1 {{unsequenced modification and access to 'x'}} + ++s.x + x; // no-warning TODO {{unsequenced modification and access to static member 'x' of 'S1'}} + ++this->x + x; // cxx11-warning {{unsequenced modification and access to 'x'}} + // cxx17-warning@-1 {{unsequenced modification and access to 'x'}} + ++d_ref.x + ++S1::x; // no-warning TODO {{unsequenced modification and access to static member 'x' of 'S1'}} +} + +struct S2 { + union { unsigned x, y; }; + void f2(); +}; + +void S2::f2() { + ++x + ++x; // no-warning TODO {{multiple unsequenced modifications to}} + x + ++x; // no-warning TODO {{unsequenced modification and access to}} + ++x + ++y; // no-warning + x + ++y; // no-warning +} + +void f2(S2 &s) { + ++s.x + ++s.x; // no-warning TODO {{multiple unsequenced modifications to}} + s.x + ++s.x; // no-warning TODO {{unsequenced modification and access to}} + ++s.x + ++s.y; // no-warning + s.x + ++s.y; // no-warning +} + +struct S3 { + union { + union { + unsigned x; + }; + }; + unsigned y; + void f3(); +}; + +void S3::f3() { + ++x + ++x; // no-warning TODO {{multiple unsequenced modifications to}} + x + ++x; // no-warning TODO {{unsequenced modification and access to}} + ++x + ++y; // no-warning + x + ++y; // no-warning +} + +void f3(S3 &s) { + ++s.x + ++s.x; // no-warning TODO {{multiple unsequenced modifications to}} + s.x + ++s.x; // no-warning TODO {{unsequenced modification and access to}} + ++s.x + ++s.y; // no-warning + s.x + ++s.y; // no-warning +} + +struct S4 : S3 { + unsigned y; + void f4(); +}; + +void S4::f4() { + ++x + ++x; // no-warning TODO {{multiple unsequenced modifications to}} + x + ++x; // no-warning TODO {{unsequenced modification and access to}} + ++x + ++y; // no-warning + x + ++y; // no-warning + ++S3::y + ++y; // no-warning + S3::y + ++y; // no-warning +} + +void f4(S4 &s) { + ++s.x + ++s.x; // no-warning TODO {{multiple unsequenced modifications to}} + s.x + ++s.x; // no-warning TODO {{unsequenced modification and access to}} + ++s.x + ++s.y; // no-warning + s.x + ++s.y; // no-warning + ++s.S3::y + ++s.y; // no-warning + s.S3::y + ++s.y; // no-warning +} + +static union { + unsigned Ux; + unsigned Uy; +}; + +void f5() { + ++Ux + ++Ux; // no-warning TODO {{multiple unsequenced modifications to}} + Ux + ++Ux; // no-warning TODO {{unsequenced modification and access to}} + ++Ux + ++Uy; // no-warning + Ux + ++Uy; // no-warning +} + +void f6() { + struct S { unsigned x, y; } s; + ++s.x + ++s.x; // no-warning TODO {{multiple unsequenced modifications to}} + s.x + ++s.x; // no-warning TODO {{unsequenced modification and access to}} + ++s.x + ++s.y; // no-warning + s.x + ++s.y; // no-warning + + struct { unsigned x, y; } t; + ++t.x + ++t.x; // no-warning TODO {{multiple unsequenced modifications to}} + t.x + ++t.x; // no-warning TODO {{unsequenced modification and access to}} + ++t.x + ++t.y; // no-warning + t.x + ++t.y; // no-warning +} + +} // namespace members + +namespace references { +void reference_f() { + // TODO: Check that we can see through references. + // For now this is completely unhandled. + int a; + int xs[10]; + int &b = a; + int &c = b; + int &ra1 = c; + int &ra2 = b; + int other; + + ++ra1 + ++ra2; // no-warning TODO {{multiple unsequenced modifications to}} + ra1 + ++ra2; // no-warning TODO {{unsequenced modification and access to}} + ++ra1 + ++other; // no-warning + ra1 + ++other; // no-warning + + // Make sure we handle reference cycles. + int &ref_cycle = ref_cycle; + ++ref_cycle + ++ref_cycle; // cxx11-warning {{multiple unsequenced modifications to 'ref_cycle'}} + // cxx17-warning@-1 {{multiple unsequenced modifications to 'ref_cycle'}} + ref_cycle + ++ref_cycle; // cxx11-warning {{unsequenced modification and access to 'ref_cycle'}} + // cxx17-warning@-1 {{unsequenced modification and access to 'ref_cycle'}} +} +} // namespace references + +namespace std { + using size_t = decltype(sizeof(0)); + template struct tuple_size; + template struct tuple_element { using type = int; }; +} +namespace bindings { + + struct A { int x, y; }; + typedef int B[2]; + struct C { template int get(); }; + struct D : A {}; + +} // namespace bindings +template<> struct std::tuple_size { enum { value = 2 }; }; +namespace bindings { +void testa() { + A a; + { + auto [x, y] = a; + ++x + ++x; // cxx11-warning {{multiple unsequenced modifications to 'x'}} + // cxx17-warning@-1 {{multiple unsequenced modifications to 'x'}} + ++x + x; // cxx11-warning {{unsequenced modification and access to 'x'}} + // cxx17-warning@-1 {{unsequenced modification and access to 'x'}} + ++x + ++y; // no-warning + ++x + y; // no-warning + ++x + ++a.x; // no-warning + ++x + a.x; // no-warning + } + { + auto &[x, y] = a; + ++x + ++x; // cxx11-warning {{multiple unsequenced modifications to 'x'}} + // cxx17-warning@-1 {{multiple unsequenced modifications to 'x'}} + ++x + x; // cxx11-warning {{unsequenced modification and access to 'x'}} + // cxx17-warning@-1 {{unsequenced modification and access to 'x'}} + ++x + ++y; // no-warning + ++x + y; // no-warning + ++x + ++a.x; // no-warning TODO + ++x + a.x; // no-warning TODO + } +} +void testb() { + B b; + { + auto [x, y] = b; + ++x + ++x; // cxx11-warning {{multiple unsequenced modifications to 'x'}} + // cxx17-warning@-1 {{multiple unsequenced modifications to 'x'}} + ++x + x; // cxx11-warning {{unsequenced modification and access to 'x'}} + // cxx17-warning@-1 {{unsequenced modification and access to 'x'}} + ++x + ++y; // no-warning + ++x + y; // no-warning + ++x + ++b[0]; // no-warning + ++x + b[0]; // no-warning + } + { + auto &[x, y] = b; + ++x + ++x; // cxx11-warning {{multiple unsequenced modifications to 'x'}} + // cxx17-warning@-1 {{multiple unsequenced modifications to 'x'}} + ++x + x; // cxx11-warning {{unsequenced modification and access to 'x'}} + // cxx17-warning@-1 {{unsequenced modification and access to 'x'}} + ++x + ++y; // no-warning + ++x + y; // no-warning + ++x + ++b[0]; // no-warning TODO + ++x + b[0]; // no-warning TODO + } +} +void testc() { + C c; + { + auto [x, y] = c; + ++x + ++x; // cxx11-warning {{multiple unsequenced modifications to 'x'}} + // cxx17-warning@-1 {{multiple unsequenced modifications to 'x'}} + ++x + x; // cxx11-warning {{unsequenced modification and access to 'x'}} + // cxx17-warning@-1 {{unsequenced modification and access to 'x'}} + ++x + ++y; // no-warning + ++x + y; // no-warning + } + { + auto &[x, y] = c; + ++x + ++x; // cxx11-warning {{multiple unsequenced modifications to 'x'}} + // cxx17-warning@-1 {{multiple unsequenced modifications to 'x'}} + ++x + x; // cxx11-warning {{unsequenced modification and access to 'x'}} + // cxx17-warning@-1 {{unsequenced modification and access to 'x'}} + ++x + ++y; // no-warning + ++x + y; // no-warning + } +} +void testd() { + D d; + { + auto [x, y] = d; + ++x + ++x; // cxx11-warning {{multiple unsequenced modifications to 'x'}} + // cxx17-warning@-1 {{multiple unsequenced modifications to 'x'}} + ++x + x; // cxx11-warning {{unsequenced modification and access to 'x'}} + // cxx17-warning@-1 {{unsequenced modification and access to 'x'}} + ++x + ++y; // no-warning + ++x + y; // no-warning + ++x + ++d.x; // no-warning + ++x + d.x; // no-warning + } + { + auto &[x, y] = d; + ++x + ++x; // cxx11-warning {{multiple unsequenced modifications to 'x'}} + // cxx17-warning@-1 {{multiple unsequenced modifications to 'x'}} + ++x + x; // cxx11-warning {{unsequenced modification and access to 'x'}} + // cxx17-warning@-1 {{unsequenced modification and access to 'x'}} + ++x + ++y; // no-warning + ++x + y; // no-warning + ++x + ++d.x; // no-warning TODO + ++x + d.x; // no-warning TODO + } +} +} // namespace bindings + namespace templates { template @@ -146,26 +482,42 @@ int Foo::Run() { if (static_cast((num = bar.get()) < 5) || static_cast(num < 10)) { } if (static_cast((num = bar.get()) < 5) && static_cast(num < 10)) { } - // expected-warning@-1 {{unsequenced modification and access to 'num'}} + // cxx11-warning@-1 {{unsequenced modification and access to 'num'}} + // cxx17-warning@-2 {{unsequenced modification and access to 'num'}} foo(num++, num++); - // expected-warning@-1 2{{multiple unsequenced modifications to 'num'}} + // cxx11-warning@-1 2{{multiple unsequenced modifications to 'num'}} + // cxx17-warning@-2 2{{multiple unsequenced modifications to 'num'}} return 1; } int x = Foo().Run(); -// expected-note@-1 {{in instantiation of member function 'templates::Foo::Run'}} +// cxx11-note@-1 {{in instantiation of member function 'templates::Foo::Run'}} +// cxx17-note@-2 {{in instantiation of member function 'templates::Foo::Run'}} template int Run2() { T t = static_cast(0); return (t = static_cast(1)) && t; - // expected-warning@-1 {{unsequenced modification and access to 't'}} + // cxx11-warning@-1 {{unsequenced modification and access to 't'}} + // cxx17-warning@-2 {{unsequenced modification and access to 't'}} } int y = Run2(); int z = Run2(); -// expected-note@-1{{in instantiation of function template specialization 'templates::Run2' requested here}} - +// cxx11-note@-1{{in instantiation of function template specialization 'templates::Run2' requested here}} +// cxx17-note@-2{{in instantiation of function template specialization 'templates::Run2' requested here}} + +template int var = sizeof(T); +void test_var() { + var++ + var++; // cxx11-warning {{multiple unsequenced modifications to 'var'}} + // cxx17-warning@-1 {{multiple unsequenced modifications to 'var'}} + var++ + var; // cxx11-warning {{unsequenced modification and access to 'var'}} + // cxx17-warning@-1 {{unsequenced modification and access to 'var'}} + int &r = var; + r++ + var++; // no-warning TODO {{multiple unsequenced modifications to 'var'}} + r++ + var++; // no-warning } + +} // namespace templates diff --git a/clang/test/SemaObjC/arc-decls.m b/clang/test/SemaObjC/arc-decls.m index c728f00c7e5c2..0abd45dac33e2 100644 --- a/clang/test/SemaObjC/arc-decls.m +++ b/clang/test/SemaObjC/arc-decls.m @@ -3,13 +3,29 @@ // rdar://8843524 struct A { - id x; + id x[4]; + id y; }; union u { id u; // expected-error {{ARC forbids Objective-C objects in union}} }; +union u_nontrivial_c { + struct A a; // expected-error {{non-trivial C types are disallowed in union}} +}; + +// Volatile fields are fine. +struct C { + volatile int x[4]; + volatile int y; +}; + +union u_trivial_c { + volatile int b; + struct C c; +}; + @interface I { struct A a; struct B { diff --git a/clang/test/SemaObjC/attr-designated-init.m b/clang/test/SemaObjC/attr-designated-init.m index 05085884784b0..7d1e7008e8e0e 100644 --- a/clang/test/SemaObjC/attr-designated-init.m +++ b/clang/test/SemaObjC/attr-designated-init.m @@ -3,7 +3,7 @@ #define NS_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer)) #define NS_UNAVAILABLE __attribute__((unavailable)) -void fnfoo(void) NS_DESIGNATED_INITIALIZER; // expected-error {{only applies to init methods of interface or class extension declarations}} +void fnfoo(void) NS_DESIGNATED_INITIALIZER; // expected-error {{'objc_designated_initializer' attribute only applies to Objective-C methods}} @protocol P1 -(id)init NS_DESIGNATED_INITIALIZER; // expected-error {{only applies to init methods of interface or class extension declarations}} @@ -389,6 +389,19 @@ -(instancetype)initWithRequiredParameter:(id)foo { } @end +@interface SubTest1Ext : Test1 +-(instancetype)initWithRequiredParameter:(id)foo NS_DESIGNATED_INITIALIZER; +@end +// Mark 'init' as unavailable in the extension to silence warning. +@interface SubTest1Ext() +-(instancetype)init NS_UNAVAILABLE; +@end +@implementation SubTest1Ext +-(instancetype)initWithRequiredParameter:(id)foo { + return [super init]; +} +@end + @interface Test2 : NSObject @end @interface SubTest2 : Test2 @@ -428,3 +441,16 @@ - (instancetype)init NS_DESIGNATED_INITIALIZER; @interface CategoryForMissingInterface(Cat) // expected-error{{cannot find interface declaration}} - (instancetype)init NS_DESIGNATED_INITIALIZER; // expected-error{{only applies to init methods of interface or class extension declarations}} @end + +@interface TwoAttrs +-(instancetype)foo + __attribute__((objc_designated_initializer)) + __attribute__((objc_method_family(init))); +-(instancetype)bar + __attribute__((objc_method_family(init))) + __attribute__((objc_designated_initializer)); +-(instancetype)baz + __attribute__((objc_designated_initializer, objc_method_family(init))); +-(instancetype)quux + __attribute__((objc_method_family(init), objc_designated_initializer)); +@end diff --git a/clang/test/SemaObjC/attr-objc-non-lazy.m b/clang/test/SemaObjC/attr-objc-non-lazy.m new file mode 100644 index 0000000000000..5dc88f7935ebd --- /dev/null +++ b/clang/test/SemaObjC/attr-objc-non-lazy.m @@ -0,0 +1,34 @@ +// RUN: %clang_cc1 -verify -Wno-objc-root-class -fsyntax-only %s + +__attribute__((objc_nonlazy_class)) +@interface A +@end +@implementation A +@end + +__attribute__((objc_nonlazy_class)) int X; // expected-error {{'objc_nonlazy_class' attribute only applies to Objective-C interfaces}} + +__attribute__((objc_nonlazy_class())) +@interface B +@end +@implementation B +@end + +__attribute__((objc_nonlazy_class("foo"))) // expected-error{{'objc_nonlazy_class' attribute takes no arguments}} +@interface C +@end +@implementation C +@end + +__attribute__((objc_nonlazy_class)) // expected-error {{'objc_nonlazy_class' attribute only applies to Objective-C interfaces}} +@protocol B +@end + +__attribute__((objc_nonlazy_class)) // expected-error {{'objc_nonlazy_class' attribute only applies to Objective-C interfaces}} +void foo(); + +@interface E +@end +__attribute__((objc_nonlazy_class)) +@implementation E // expected-error {{prefix attribute must be followed by an interface or protocol}} +@end diff --git a/clang/test/SemaObjC/conversion.m b/clang/test/SemaObjC/conversion.m index 88a1a44b2177b..743f7440e2e43 100644 --- a/clang/test/SemaObjC/conversion.m +++ b/clang/test/SemaObjC/conversion.m @@ -14,4 +14,11 @@ void radar14415662(RDar14415662 *f, char x, int y) { x = y; // expected-warning {{implicit conversion loses integer precision: 'int' to 'char'}} } +__attribute__((objc_root_class)) @interface DoubleProp +@property double d; +@end +void use_double_prop(DoubleProp *dp) { + double local = 42; + dp.d += local; // no warning +} diff --git a/clang/test/SemaObjC/infer-availability-from-init.m b/clang/test/SemaObjC/infer-availability-from-init.m index 7aa1e53c09109..6719400a9f428 100644 --- a/clang/test/SemaObjC/infer-availability-from-init.m +++ b/clang/test/SemaObjC/infer-availability-from-init.m @@ -56,3 +56,16 @@ +(FromSelf*)another_one { [self new]; } @end + +@interface NoInit : NSObject +-(instancetype)init __attribute__((unavailable)); // expected-note {{'init' has been explicitly marked unavailable here}} +@end + +@interface NoInitSub : NoInit @end + +@implementation NoInitSub +-(void)meth:(Class)c { + [c new]; // No error; unknown interface. + [NoInitSub new]; // expected-error {{'new' is unavailable}} +} +@end diff --git a/clang/test/SemaObjC/kindof.m b/clang/test/SemaObjC/kindof.m index 9d758d3cfb2a6..b2c3205182070 100644 --- a/clang/test/SemaObjC/kindof.m +++ b/clang/test/SemaObjC/kindof.m @@ -384,9 +384,17 @@ - (void)test:(id)T { } @end +// --------------------------------------------------------------------------- +// __kindof on type parameters +// --------------------------------------------------------------------------- + @interface NSGeneric : NSObject - (void)test:(__kindof ObjectType)T; // expected-note{{passing argument to parameter 'T' here}} - (void)mapUsingBlock:(id (^)(__kindof ObjectType))block; +@property (copy) ObjectType object; +@property (copy) __kindof ObjectType kindof_object; + +@property (copy) __kindof ObjectType _Nonnull nonnull_kindof_object; @end @implementation NSGeneric - (void)test:(id)T { @@ -395,6 +403,11 @@ - (void)mapUsingBlock:(id (^)(id))block { } @end +@interface NSDefaultGeneric : NSObject +@property (copy) ObjectType object; +@property (copy) __kindof ObjectType kindof_object; +@end + void testGeneric(NSGeneric *generic) { NSObject *NSObject_obj; // Assign from NSObject_obj to __kindof NSString*. @@ -403,6 +416,45 @@ void testGeneric(NSGeneric *generic) { [generic test:NSString_str]; } +void testGenericAssignment() { + NSMutableString *NSMutableString_str; + NSNumber *NSNumber_obj; + + NSGeneric *generic; + NSMutableString_str = generic.object; // expected-warning{{incompatible pointer types}} + NSNumber_obj = generic.object; // expected-warning{{incompatible pointer types}} + NSMutableString_str = generic.kindof_object; + NSNumber_obj = generic.kindof_object; // expected-warning{{incompatible pointer types assigning to 'NSNumber *' from '__kindof NSString *'}} + + NSGeneric<__kindof NSString*> *kindof_generic; + NSMutableString_str = kindof_generic.object; + NSNumber_obj = kindof_generic.object; // expected-warning{{incompatible pointer types assigning to 'NSNumber *' from '__kindof NSString *'}} + NSMutableString_str = kindof_generic.kindof_object; + NSNumber_obj = kindof_generic.kindof_object; // expected-warning{{incompatible pointer types assigning to 'NSNumber *' from '__kindof __kindof NSString *'}} + + NSDefaultGeneric *default_generic; + NSMutableString_str = default_generic.object; + NSNumber_obj = default_generic.object; // expected-warning{{incompatible pointer types}} + NSMutableString_str = default_generic.kindof_object; + NSNumber_obj = default_generic.kindof_object; // expected-warning{{incompatible pointer types assigning to 'NSNumber *' from '__kindof __kindof NSString *'}} + + typedef NSString *Typedef_NSString; + NSGeneric *typedef_generic; + NSMutableString_str = typedef_generic.object; // expected-warning{{incompatible pointer types}} + NSNumber_obj = typedef_generic.object; // expected-warning{{incompatible pointer types}} + NSMutableString_str = typedef_generic.kindof_object; + NSNumber_obj = typedef_generic.kindof_object; // expected-warning{{incompatible pointer types assigning to 'NSNumber *' from '__kindof Typedef_NSString'}} +} + +void testKindofNonObjectType() { + typedef void (^BlockType)(int); + NSGeneric *generic; +} + +void testKindofNullability(NSGeneric *generic) { + generic.nonnull_kindof_object = 0; // expected-warning{{null passed to a callee that requires a non-null argument}} +} + // Check that clang doesn't crash when a type parameter is illegal. @interface Array1 : NSObject @end diff --git a/clang/test/SemaObjC/parameterized_classes_subst.m b/clang/test/SemaObjC/parameterized_classes_subst.m index da2d56f11bc80..d14a6e9deb406 100644 --- a/clang/test/SemaObjC/parameterized_classes_subst.m +++ b/clang/test/SemaObjC/parameterized_classes_subst.m @@ -104,6 +104,12 @@ @interface NSViewController : NSObject @property (nonatomic,retain) ViewType view; @end +@interface TypedefTypeParam : NSObject +typedef T AliasT; +- (void)test:(AliasT)object; +// expected-note@-1 {{parameter 'object' here}} +@end + // -------------------------------------------------------------------------- // Nullability // -------------------------------------------------------------------------- @@ -190,6 +196,7 @@ void test_message_send_param( MutableSetOfArrays *mutStringArraySet, NSMutableSet *mutSet, MutableSetOfArrays *mutArraySet, + TypedefTypeParam *typedefTypeParam, void (^block)(void)) { Window *window; @@ -199,6 +206,7 @@ void test_message_send_param( [mutStringArraySet addObject: window]; // expected-warning{{parameter of type 'NSArray *'}} [mutSet addObject: window]; // expected-warning{{parameter of incompatible type 'id'}} [mutArraySet addObject: window]; // expected-warning{{parameter of incompatible type 'id'}} + [typedefTypeParam test: window]; // expected-warning{{parameter of type 'NSString *'}} [block addObject: window]; // expected-warning{{parameter of incompatible type 'id'}} } diff --git a/clang/test/SemaOpenCL/amdgpu-attrs.cl b/clang/test/SemaOpenCL/amdgpu-attrs.cl index 1ba04acd0afce..89ba3f86803c5 100644 --- a/clang/test/SemaOpenCL/amdgpu-attrs.cl +++ b/clang/test/SemaOpenCL/amdgpu-attrs.cl @@ -27,12 +27,12 @@ __attribute__((amdgpu_waves_per_eu(2, 4))) void func_waves_per_eu_2_4() {} // ex __attribute__((amdgpu_num_sgpr(32))) void func_num_sgpr_32() {} // expected-error {{'amdgpu_num_sgpr' attribute only applies to kernel functions}} __attribute__((amdgpu_num_vgpr(64))) void func_num_vgpr_64() {} // expected-error {{'amdgpu_num_vgpr' attribute only applies to kernel functions}} -__attribute__((amdgpu_flat_work_group_size("ABC", "ABC"))) kernel void kernel_flat_work_group_size_ABC_ABC() {} // expected-error {{'amdgpu_flat_work_group_size' attribute requires an integer constant}} -__attribute__((amdgpu_flat_work_group_size(32, "ABC"))) kernel void kernel_flat_work_group_size_32_ABC() {} // expected-error {{'amdgpu_flat_work_group_size' attribute requires an integer constant}} -__attribute__((amdgpu_flat_work_group_size("ABC", 64))) kernel void kernel_flat_work_group_size_ABC_64() {} // expected-error {{'amdgpu_flat_work_group_size' attribute requires an integer constant}} -__attribute__((amdgpu_waves_per_eu("ABC"))) kernel void kernel_waves_per_eu_ABC() {} // expected-error {{'amdgpu_waves_per_eu' attribute requires an integer constant}} -__attribute__((amdgpu_waves_per_eu(2, "ABC"))) kernel void kernel_waves_per_eu_2_ABC() {} // expected-error {{'amdgpu_waves_per_eu' attribute requires an integer constant}} -__attribute__((amdgpu_waves_per_eu("ABC", 4))) kernel void kernel_waves_per_eu_ABC_4() {} // expected-error {{'amdgpu_waves_per_eu' attribute requires an integer constant}} +__attribute__((amdgpu_flat_work_group_size("ABC", "ABC"))) kernel void kernel_flat_work_group_size_ABC_ABC() {} // expected-error {{'amdgpu_flat_work_group_size' attribute requires parameter 0 to be an integer constant}} +__attribute__((amdgpu_flat_work_group_size(32, "ABC"))) kernel void kernel_flat_work_group_size_32_ABC() {} // expected-error {{'amdgpu_flat_work_group_size' attribute requires parameter 1 to be an integer constant}} +__attribute__((amdgpu_flat_work_group_size("ABC", 64))) kernel void kernel_flat_work_group_size_ABC_64() {} // expected-error {{'amdgpu_flat_work_group_size' attribute requires parameter 0 to be an integer constant}} +__attribute__((amdgpu_waves_per_eu("ABC"))) kernel void kernel_waves_per_eu_ABC() {} // expected-error {{'amdgpu_waves_per_eu' attribute requires parameter 0 to be an integer constant}} +__attribute__((amdgpu_waves_per_eu(2, "ABC"))) kernel void kernel_waves_per_eu_2_ABC() {} // expected-error {{'amdgpu_waves_per_eu' attribute requires parameter 1 to be an integer constant}} +__attribute__((amdgpu_waves_per_eu("ABC", 4))) kernel void kernel_waves_per_eu_ABC_4() {} // expected-error {{'amdgpu_waves_per_eu' attribute requires parameter 0 to be an integer constant}} __attribute__((amdgpu_num_sgpr("ABC"))) kernel void kernel_num_sgpr_ABC() {} // expected-error {{'amdgpu_num_sgpr' attribute requires an integer constant}} __attribute__((amdgpu_num_vgpr("ABC"))) kernel void kernel_num_vgpr_ABC() {} // expected-error {{'amdgpu_num_vgpr' attribute requires an integer constant}} diff --git a/clang/test/SemaOpenCL/extension-version.cl b/clang/test/SemaOpenCL/extension-version.cl index a587f1db99af2..d976cfb3a4354 100644 --- a/clang/test/SemaOpenCL/extension-version.cl +++ b/clang/test/SemaOpenCL/extension-version.cl @@ -2,12 +2,14 @@ // RUN: %clang_cc1 -x cl -cl-std=CL1.1 %s -verify -triple spir-unknown-unknown // RUN: %clang_cc1 -x cl -cl-std=CL1.2 %s -verify -triple spir-unknown-unknown // RUN: %clang_cc1 -x cl -cl-std=CL2.0 %s -verify -triple spir-unknown-unknown +// RUN: %clang_cc1 -x cl -cl-std=c++ %s -verify -triple spir-unknown-unknown // RUN: %clang_cc1 -x cl -cl-std=CL %s -verify -triple spir-unknown-unknown -Wpedantic-core-features -DTEST_CORE_FEATURES // RUN: %clang_cc1 -x cl -cl-std=CL1.1 %s -verify -triple spir-unknown-unknown -Wpedantic-core-features -DTEST_CORE_FEATURES // RUN: %clang_cc1 -x cl -cl-std=CL1.2 %s -verify -triple spir-unknown-unknown -Wpedantic-core-features -DTEST_CORE_FEATURES // RUN: %clang_cc1 -x cl -cl-std=CL2.0 %s -verify -triple spir-unknown-unknown -Wpedantic-core-features -DTEST_CORE_FEATURES +// RUN: %clang_cc1 -x cl -cl-std=c++ %s -verify -triple spir-unknown-unknown -Wpedantic-core-features -DTEST_CORE_FEATURES -#if __OPENCL_C_VERSION__ >= 200 && ! defined TEST_CORE_FEATURES +#if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 200) && !defined(TEST_CORE_FEATURES) // expected-no-diagnostics #endif @@ -47,44 +49,44 @@ #ifndef cl_khr_byte_addressable_store #error "Missing cl_khr_byte_addressable_store define" #endif -#pragma OPENCL EXTENSION cl_khr_byte_addressable_store: enable -#if (__OPENCL_C_VERSION__ >= 110) && defined TEST_CORE_FEATURES +#pragma OPENCL EXTENSION cl_khr_byte_addressable_store : enable +#if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 110) && defined TEST_CORE_FEATURES // expected-warning@-2{{OpenCL extension 'cl_khr_byte_addressable_store' is core feature or supported optional core feature - ignoring}} #endif #ifndef cl_khr_global_int32_base_atomics #error "Missing cl_khr_global_int32_base_atomics define" #endif -#pragma OPENCL EXTENSION cl_khr_global_int32_base_atomics: enable -#if (__OPENCL_C_VERSION__ >= 110) && defined TEST_CORE_FEATURES +#pragma OPENCL EXTENSION cl_khr_global_int32_base_atomics : enable +#if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 110) && defined TEST_CORE_FEATURES // expected-warning@-2{{OpenCL extension 'cl_khr_global_int32_base_atomics' is core feature or supported optional core feature - ignoring}} #endif #ifndef cl_khr_global_int32_extended_atomics #error "Missing cl_khr_global_int32_extended_atomics define" #endif -#pragma OPENCL EXTENSION cl_khr_global_int32_extended_atomics: enable -#if (__OPENCL_C_VERSION__ >= 110) && defined TEST_CORE_FEATURES +#pragma OPENCL EXTENSION cl_khr_global_int32_extended_atomics : enable +#if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 110) && defined TEST_CORE_FEATURES // expected-warning@-2{{OpenCL extension 'cl_khr_global_int32_extended_atomics' is core feature or supported optional core feature - ignoring}} #endif #ifndef cl_khr_local_int32_base_atomics #error "Missing cl_khr_local_int32_base_atomics define" #endif -#pragma OPENCL EXTENSION cl_khr_local_int32_base_atomics: enable -#if (__OPENCL_C_VERSION__ >= 110) && defined TEST_CORE_FEATURES +#pragma OPENCL EXTENSION cl_khr_local_int32_base_atomics : enable +#if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 110) && defined TEST_CORE_FEATURES // expected-warning@-2{{OpenCL extension 'cl_khr_local_int32_base_atomics' is core feature or supported optional core feature - ignoring}} #endif #ifndef cl_khr_local_int32_extended_atomics #error "Missing cl_khr_local_int32_extended_atomics define" #endif -#pragma OPENCL EXTENSION cl_khr_local_int32_extended_atomics: enable -#if (__OPENCL_C_VERSION__ >= 110) && defined TEST_CORE_FEATURES +#pragma OPENCL EXTENSION cl_khr_local_int32_extended_atomics : enable +#if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 110) && defined TEST_CORE_FEATURES // expected-warning@-2{{OpenCL extension 'cl_khr_local_int32_extended_atomics' is core feature or supported optional core feature - ignoring}} #endif -#if (__OPENCL_C_VERSION__ < 110) +#if (defined(__OPENCL_C_VERSION__) && __OPENCL_C_VERSION__ < 110) // Deprecated abvoe 1.0 #ifndef cl_khr_select_fprounding_mode #error "Missing cl_khr_select_fp_rounding_mode define" @@ -97,8 +99,8 @@ #ifndef cl_khr_fp64 #error "Missing cl_khr_fp64 define" #endif -#pragma OPENCL EXTENSION cl_khr_fp64: enable -#if (__OPENCL_C_VERSION__ >= 120) && defined TEST_CORE_FEATURES +#pragma OPENCL EXTENSION cl_khr_fp64 : enable +#if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 120) && defined TEST_CORE_FEATURES // expected-warning@-2{{OpenCL extension 'cl_khr_fp64' is core feature or supported optional core feature - ignoring}} #endif @@ -106,131 +108,129 @@ #ifndef cl_khr_3d_image_writes #error "Missing cl_khr_3d_image_writes define" #endif -#pragma OPENCL EXTENSION cl_khr_3d_image_writes: enable -#if (__OPENCL_C_VERSION__ >= 200) && defined TEST_CORE_FEATURES +#pragma OPENCL EXTENSION cl_khr_3d_image_writes : enable +#if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 200) && defined TEST_CORE_FEATURES // expected-warning@-2{{OpenCL extension 'cl_khr_3d_image_writes' is core feature or supported optional core feature - ignoring}} #endif - - -#if (__OPENCL_C_VERSION__ >= 110) +#if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 110) #ifndef cl_khr_gl_event #error "Missing cl_khr_gl_event define" #endif #else // expected-warning@+2{{unsupported OpenCL extension 'cl_khr_gl_event' - ignoring}} #endif -#pragma OPENCL EXTENSION cl_khr_gl_event: enable +#pragma OPENCL EXTENSION cl_khr_gl_event : enable -#if (__OPENCL_C_VERSION__ >= 110) +#if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 110) #ifndef cl_khr_d3d10_sharing #error "Missing cl_khr_d3d10_sharing define" #endif #else // expected-warning@+2{{unsupported OpenCL extension 'cl_khr_d3d10_sharing' - ignoring}} #endif -#pragma OPENCL EXTENSION cl_khr_d3d10_sharing: enable +#pragma OPENCL EXTENSION cl_khr_d3d10_sharing : enable -#if (__OPENCL_C_VERSION__ >= 110) +#if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 110) #ifndef cles_khr_int64 #error "Missing cles_khr_int64 define" #endif #else // expected-warning@+2{{unsupported OpenCL extension 'cles_khr_int64' - ignoring}} #endif -#pragma OPENCL EXTENSION cles_khr_int64: enable +#pragma OPENCL EXTENSION cles_khr_int64 : enable -#if (__OPENCL_C_VERSION__ >= 120) +#if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 120) #ifndef cl_khr_context_abort #error "Missing cl_context_abort define" #endif #else // expected-warning@+2{{unsupported OpenCL extension 'cl_khr_context_abort' - ignoring}} #endif -#pragma OPENCL EXTENSION cl_khr_context_abort: enable +#pragma OPENCL EXTENSION cl_khr_context_abort : enable -#if (__OPENCL_C_VERSION__ >= 120) +#if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 120) #ifndef cl_khr_d3d11_sharing #error "Missing cl_khr_d3d11_sharing define" #endif #else // expected-warning@+2{{unsupported OpenCL extension 'cl_khr_d3d11_sharing' - ignoring}} #endif -#pragma OPENCL EXTENSION cl_khr_d3d11_sharing: enable +#pragma OPENCL EXTENSION cl_khr_d3d11_sharing : enable -#if (__OPENCL_C_VERSION__ >= 120) +#if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 120) #ifndef cl_khr_dx9_media_sharing #error "Missing cl_khr_dx9_media_sharing define" #endif #else // expected-warning@+2{{unsupported OpenCL extension 'cl_khr_dx9_media_sharing' - ignoring}} #endif -#pragma OPENCL EXTENSION cl_khr_dx9_media_sharing: enable +#pragma OPENCL EXTENSION cl_khr_dx9_media_sharing : enable -#if (__OPENCL_C_VERSION__ >= 120) +#if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 120) #ifndef cl_khr_image2d_from_buffer #error "Missing cl_khr_image2d_from_buffer define" #endif #else // expected-warning@+2{{unsupported OpenCL extension 'cl_khr_image2d_from_buffer' - ignoring}} #endif -#pragma OPENCL EXTENSION cl_khr_image2d_from_buffer: enable +#pragma OPENCL EXTENSION cl_khr_image2d_from_buffer : enable -#if (__OPENCL_C_VERSION__ >= 120) +#if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 120) #ifndef cl_khr_initialize_memory #error "Missing cl_khr_initialize_memory define" #endif #else // expected-warning@+2{{unsupported OpenCL extension 'cl_khr_initialize_memory' - ignoring}} #endif -#pragma OPENCL EXTENSION cl_khr_initialize_memory: enable +#pragma OPENCL EXTENSION cl_khr_initialize_memory : enable -#if (__OPENCL_C_VERSION__ >= 120) +#if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 120) #ifndef cl_khr_gl_depth_images #error "Missing cl_khr_gl_depth_images define" #endif #else // expected-warning@+2{{unsupported OpenCL extension 'cl_khr_gl_depth_images' - ignoring}} #endif -#pragma OPENCL EXTENSION cl_khr_gl_depth_images: enable +#pragma OPENCL EXTENSION cl_khr_gl_depth_images : enable -#if (__OPENCL_C_VERSION__ >= 120) +#if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 120) #ifndef cl_khr_gl_msaa_sharing #error "Missing cl_khr_gl_msaa_sharing define" #endif #else // expected-warning@+2{{unsupported OpenCL extension 'cl_khr_gl_msaa_sharing' - ignoring}} #endif -#pragma OPENCL EXTENSION cl_khr_gl_msaa_sharing: enable +#pragma OPENCL EXTENSION cl_khr_gl_msaa_sharing : enable -#if (__OPENCL_C_VERSION__ >= 120) +#if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 120) #ifndef cl_khr_spir #error "Missing cl_khr_spir define" #endif #else // expected-warning@+2{{unsupported OpenCL extension 'cl_khr_spir' - ignoring}} #endif -#pragma OPENCL EXTENSION cl_khr_spir: enable +#pragma OPENCL EXTENSION cl_khr_spir : enable -#if (__OPENCL_C_VERSION__ >= 200) +#if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 200) #ifndef cl_khr_egl_event #error "Missing cl_khr_egl_event define" #endif #else // expected-warning@+2{{unsupported OpenCL extension 'cl_khr_egl_event' - ignoring}} #endif -#pragma OPENCL EXTENSION cl_khr_egl_event: enable +#pragma OPENCL EXTENSION cl_khr_egl_event : enable -#if (__OPENCL_C_VERSION__ >= 200) +#if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 200) #ifndef cl_khr_egl_image #error "Missing cl_khr_egl_image define" #endif #else // expected-warning@+2{{unsupported OpenCL extension 'cl_khr_egl_image' - ignoring}} #endif -#pragma OPENCL EXTENSION cl_khr_egl_image: enable +#pragma OPENCL EXTENSION cl_khr_egl_image : enable -#if (__OPENCL_C_VERSION__ >= 200) +#if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 200) #ifndef cl_khr_mipmap_image #error "Missing cl_khr_mipmap_image define" #endif @@ -240,18 +240,18 @@ #endif // expected-warning@+2{{unsupported OpenCL extension 'cl_khr_mipmap_image' - ignoring}} #endif -#pragma OPENCL EXTENSION cl_khr_mipmap_image: enable +#pragma OPENCL EXTENSION cl_khr_mipmap_image : enable -#if (__OPENCL_C_VERSION__ >= 200) +#if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 200) #ifndef cl_khr_srgb_image_writes #error "Missing cl_khr_srgb_image_writes define" #endif #else // expected-warning@+2{{unsupported OpenCL extension 'cl_khr_srgb_image_writes' - ignoring}} #endif -#pragma OPENCL EXTENSION cl_khr_srgb_image_writes: enable +#pragma OPENCL EXTENSION cl_khr_srgb_image_writes : enable -#if (__OPENCL_C_VERSION__ >= 200) +#if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 200) #ifndef cl_khr_subgroups #error "Missing cl_khr_subgroups define" #endif @@ -261,9 +261,9 @@ #endif // expected-warning@+2{{unsupported OpenCL extension 'cl_khr_subgroups' - ignoring}} #endif -#pragma OPENCL EXTENSION cl_khr_subgroups: enable +#pragma OPENCL EXTENSION cl_khr_subgroups : enable -#if (__OPENCL_C_VERSION__ >= 200) +#if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 200) #ifndef cl_khr_terminate_context #error "Missing cl_khr_terminate_context define" #endif @@ -280,9 +280,9 @@ #ifndef cl_amd_media_ops2 #error "Missing cl_amd_media_ops2 define" #endif -#pragma OPENCL EXTENSION cl_amd_media_ops2: enable +#pragma OPENCL EXTENSION cl_amd_media_ops2 : enable -#if (__OPENCL_C_VERSION__ >= 120) +#if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 120) #ifndef cl_khr_depth_images #error "Missing cl_khr_depth_images define" #endif @@ -292,9 +292,9 @@ #endif // expected-warning@+2{{unsupported OpenCL extension 'cl_khr_depth_images' - ignoring}} #endif -#pragma OPENCL EXTENSION cl_khr_depth_images: enable +#pragma OPENCL EXTENSION cl_khr_depth_images : enable -#if (__OPENCL_C_VERSION__ >= 120) +#if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 120) #ifndef cl_intel_subgroups #error "Missing cl_intel_subgroups define" #endif @@ -303,7 +303,7 @@ #endif #pragma OPENCL EXTENSION cl_intel_subgroups : enable -#if (__OPENCL_C_VERSION__ >= 120) +#if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 120) #ifndef cl_intel_subgroups_short #error "Missing cl_intel_subgroups_short define" #endif @@ -312,7 +312,7 @@ #endif #pragma OPENCL EXTENSION cl_intel_subgroups_short : enable -#if (__OPENCL_C_VERSION__ >= 120) +#if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 120) #ifndef cl_intel_device_side_avc_motion_estimation #error "Missing cl_intel_device_side_avc_motion_estimation define" #endif diff --git a/clang/test/SemaOpenCL/extensions.cl b/clang/test/SemaOpenCL/extensions.cl index 5f95e32d4a549..e9dba69ecd7c9 100644 --- a/clang/test/SemaOpenCL/extensions.cl +++ b/clang/test/SemaOpenCL/extensions.cl @@ -28,6 +28,7 @@ // enabled by default with -cl-std=CL2.0). // // RUN: %clang_cc1 %s -triple amdgcn-unknown-unknown -verify -pedantic -fsyntax-only -cl-std=CL2.0 -finclude-default-header +// RUN: %clang_cc1 %s -triple spir-unknown-unknown -verify -pedantic -fsyntax-only -cl-std=c++ #ifdef _OPENCL_H_ // expected-no-diagnostics @@ -37,7 +38,11 @@ // expected-no-diagnostics #endif -#if __OPENCL_C_VERSION__ < 120 +#ifdef __OPENCL_CPP_VERSION__ +// expected-no-diagnostics +#endif + +#if (defined(__OPENCL_C_VERSION__) && __OPENCL_C_VERSION__ < 120) void f1(double da) { // expected-error {{type 'double' requires cl_khr_fp64 extension}} double d; // expected-error {{type 'double' requires cl_khr_fp64 extension}} (void) 1.0; // expected-warning {{double precision constant requires cl_khr_fp64}} @@ -89,7 +94,7 @@ void f2(void) { // expected-warning@-2{{unsupported OpenCL extension 'cl_khr_fp64' - ignoring}} #endif -#if __OPENCL_C_VERSION__ < 120 +#if (defined(__OPENCL_C_VERSION__) && __OPENCL_C_VERSION__ < 120) void f3(void) { double d; // expected-error {{type 'double' requires cl_khr_fp64 extension}} } diff --git a/clang/test/SemaOpenCL/invalid-image.cl b/clang/test/SemaOpenCL/invalid-image.cl index cc7d16366350c..10c44cf4c2813 100644 --- a/clang/test/SemaOpenCL/invalid-image.cl +++ b/clang/test/SemaOpenCL/invalid-image.cl @@ -1,7 +1,8 @@ +// RUN: %clang_cc1 -verify -cl-std=c++ %s // RUN: %clang_cc1 -verify %s // RUN: %clang_cc1 -verify -D=ATTR_TEST -fms-compatibility %s -void test1(image1d_t *i) {} // expected-error{{pointer to type '__read_only image1d_t' is invalid in OpenCL}} +void test1(image1d_t *i) {} // expected-error-re{{pointer to type '{{__generic __read_only|__read_only}} image1d_t' is invalid in OpenCL}} void test2(image1d_t i) { image1d_t ti; // expected-error{{type '__read_only image1d_t' can only be used as a function parameter}} diff --git a/clang/test/SemaOpenCLCXX/address-space-of-this.cl b/clang/test/SemaOpenCLCXX/address-space-of-this.cl new file mode 100644 index 0000000000000..7ae3aa63f4070 --- /dev/null +++ b/clang/test/SemaOpenCLCXX/address-space-of-this.cl @@ -0,0 +1,14 @@ +// RUN: %clang_cc1 %s -triple spir-unknown-unknown -cl-std=c++ -pedantic -verify -fsyntax-only +// expected-no-diagnostics + +// Extract from PR38614 +struct C {}; + +C f1() { + return C{}; +} + +C f2(){ + C c; + return c; +} diff --git a/clang/test/SemaOpenCLCXX/restricted.cl b/clang/test/SemaOpenCLCXX/restricted.cl index c0dfbd645d0c1..f4ad27ad29d93 100644 --- a/clang/test/SemaOpenCLCXX/restricted.cl +++ b/clang/test/SemaOpenCLCXX/restricted.cl @@ -39,25 +39,3 @@ kernel void test_storage_classes() { thread_local int y; // expected-error@-1 {{OpenCL C++ version 1.0 does not support the 'thread_local' storage class specifier}} } - -// Test that access qualifiers are reserved keywords. -kernel void test_access_qualifiers() { - int read_only; - // expected-error@-1 {{'read_only' is a reserved keyword in OpenCL C++}} - // expected-warning@-2 {{declaration does not declare anything}} - int __read_only; - // expected-error@-1 {{'__read_only' is a reserved keyword in OpenCL C++}} - // expected-warning@-2 {{declaration does not declare anything}} - int write_only; - // expected-error@-1 {{'write_only' is a reserved keyword in OpenCL C++}} - // expected-warning@-2 {{declaration does not declare anything}} - int __write_only; - // expected-error@-1 {{'__write_only' is a reserved keyword in OpenCL C++}} - // expected-warning@-2 {{declaration does not declare anything}} - int read_write; - // expected-error@-1 {{'read_write' is a reserved keyword in OpenCL C++}} - // expected-warning@-2 {{declaration does not declare anything}} - int __read_write; - // expected-error@-1 {{'__read_write' is a reserved keyword in OpenCL C++}} - // expected-warning@-2 {{declaration does not declare anything}} -} diff --git a/clang/test/SemaSYCL/Inputs/sycl.hpp b/clang/test/SemaSYCL/Inputs/sycl.hpp index edd6ebbc41061..8015e3ecd9210 100644 --- a/clang/test/SemaSYCL/Inputs/sycl.hpp +++ b/clang/test/SemaSYCL/Inputs/sycl.hpp @@ -51,7 +51,8 @@ struct id { template struct _ImplT { - range Range; + range AccessRange; + range MemRange; id Offset; }; @@ -63,10 +64,8 @@ class accessor { public: void use(void) const {} void use(void*) const {} - void __init(__global dataT *Ptr, range Range, - id Offset) { - } - + void __init(__global dataT *Ptr, range AccessRange, + range MemRange, id Offset) {} _ImplT __impl; }; diff --git a/clang/test/SemaSYCL/bool-vectors.cpp b/clang/test/SemaSYCL/bool-vectors.cpp new file mode 100644 index 0000000000000..3812086d734ce --- /dev/null +++ b/clang/test/SemaSYCL/bool-vectors.cpp @@ -0,0 +1,27 @@ +// RUN: %clang_cc1 -fsycl-is-device -fsyntax-only -verify %s +// expected-no-diagnostics + +template +__attribute__((sycl_kernel)) void kernel(Func kernelFunc) { + kernelFunc(); +} +using bool1 = bool; +using bool2 = bool __attribute__((ext_vector_type(2))); +using bool3 = bool __attribute__((ext_vector_type(3))); +using bool4 = bool __attribute__((ext_vector_type(4))); +using bool8 = bool __attribute__((ext_vector_type(8))); +using bool16 = bool __attribute__((ext_vector_type(16))); + +int main() { + kernel( + [=]() { + bool1 b1; + bool2 b2; + bool3 b3; + bool4 b4; + bool8 b8; + bool16 b16; + }); + return 0; +} + diff --git a/clang/test/SemaSYCL/built-in-type-kernel-arg.cpp b/clang/test/SemaSYCL/built-in-type-kernel-arg.cpp index 16ce5b8c0b4fe..ba3b080a66760 100644 --- a/clang/test/SemaSYCL/built-in-type-kernel-arg.cpp +++ b/clang/test/SemaSYCL/built-in-type-kernel-arg.cpp @@ -21,5 +21,5 @@ int main() { }); return 0; } -// CHECK: kernel_function 'void (__global int *, range<1>, id<1>) -// CHECK: kernel_local_acc 'void (__local int *, range<1>, id<1>) +// CHECK: kernel_function 'void (__global int *, range<1>, range<1>, id<1>) +// CHECK: kernel_local_acc 'void (__local int *, range<1>, range<1>, id<1>) diff --git a/clang/test/SemaSYCL/fake-accessors.cpp b/clang/test/SemaSYCL/fake-accessors.cpp index 280dc850167e1..112f986d20083 100644 --- a/clang/test/SemaSYCL/fake-accessors.cpp +++ b/clang/test/SemaSYCL/fake-accessors.cpp @@ -51,6 +51,6 @@ int main() { }); return 0; } -// CHECK: fake_accessors 'void (__global int *, range<1>, id<1>, foo::cl::sycl::accessor, accessor) -// CHECK: accessor_typedef 'void (__global int *, range<1>, id<1>, foo::cl::sycl::accessor, accessor) -// CHECK: accessor_alias 'void (__global int *, range<1>, id<1>, foo::cl::sycl::accessor, accessor) +// CHECK: fake_accessors 'void (__global int *, range<1>, range<1>, id<1>, foo::cl::sycl::accessor, accessor) +// CHECK: accessor_typedef 'void (__global int *, range<1>, range<1>, id<1>, foo::cl::sycl::accessor, accessor) +// CHECK: accessor_alias 'void (__global int *, range<1>, range<1>, id<1>, foo::cl::sycl::accessor, accessor) diff --git a/clang/test/SemaSYCL/intel-fpga-local.cpp b/clang/test/SemaSYCL/intel-fpga-local.cpp new file mode 100644 index 0000000000000..29ad19aabbe43 --- /dev/null +++ b/clang/test/SemaSYCL/intel-fpga-local.cpp @@ -0,0 +1,222 @@ +// RUN: %clang_cc1 -x c++ -Wno-return-type -fsycl-is-device -std=c++11 -fcxx-exceptions -fsyntax-only -ast-dump -verify -pedantic %s | FileCheck %s + +//CHECK: FunctionDecl{{.*}}foo1 +void foo1() +{ + //CHECK: VarDecl{{.*}}v_two + //CHECK: IntelFPGAMemoryAttr + __attribute__((__memory__)) + unsigned int v_two[64]; + + //CHECK: VarDecl{{.*}}v_two2 + //CHECK: IntelFPGAMemoryAttr{{.*}}MLAB + [[intelfpga::memory("MLAB")]] unsigned int v_two2[64]; + + //CHECK: VarDecl{{.*}}v_two3 + //CHECK: IntelFPGAMemoryAttr{{.*}}BlockRAM + [[intelfpga::memory("BLOCK_RAM")]] unsigned int v_two3[32]; + + //CHECK: VarDecl{{.*}}v_three + //CHECK: IntelFPGARegisterAttr + __attribute__((__register__)) + unsigned int v_three[64]; + + //CHECK: VarDecl{{.*}}v_three2 + //CHECK: IntelFPGARegisterAttr + [[intelfpga::register]] unsigned int v_three2[32]; + + //CHECK: VarDecl{{.*}}v_five + //CHECK: IntelFPGAMemoryAttr{{.*}}Implicit + //CHECK: IntelFPGABankWidthAttr + //CHECK-NEXT: ConstantExpr + //CHECK-NEXT: IntegerLiteral{{.*}}4{{$}} + __attribute__((__bankwidth__(4))) + unsigned int v_five[64]; + + //CHECK: VarDecl{{.*}}v_five2 + //CHECK: IntelFPGAMemoryAttr{{.*}}Implicit + //CHECK: IntelFPGABankWidthAttr + //CHECK-NEXT: ConstantExpr + //CHECK-NEXT: IntegerLiteral{{.*}}8{{$}} + [[intelfpga::bankwidth(8)]] unsigned int v_five2[32]; + + //CHECK: VarDecl{{.*}}v_six + //CHECK: IntelFPGAMemoryAttr{{.*}}Implicit + //CHECK: IntelFPGANumBanksAttr + //CHECK-NEXT: ConstantExpr + //CHECK-NEXT: IntegerLiteral{{.*}}8{{$}} + __attribute__((__numbanks__(8))) + unsigned int v_six[64]; + + //CHECK: VarDecl{{.*}}v_six2 + //CHECK: IntelFPGAMemoryAttr{{.*}}Implicit + //CHECK: IntelFPGANumBanksAttr + //CHECK-NEXT: ConstantExpr + //CHECK-NEXT: IntegerLiteral{{.*}}4{{$}} + __attribute__((__numbanks__(4))) unsigned int v_six2[32]; + + int __attribute__((__register__)) A; + int __attribute__((__numbanks__(4), __bankwidth__(16))) E; + + // diagnostics + + // **register + //expected-warning@+1{{attribute 'register' is already applied}} + __attribute__((register)) __attribute__((__register__)) + unsigned int reg_one[64]; + + //expected-error@+2{{attributes are not compatible}} + __attribute__((__register__)) + __attribute__((__memory__)) + //expected-note@-2 {{conflicting attribute is here}} + unsigned int reg_four[64]; + + //expected-error@+2{{attributes are not compatible}} + __attribute__((__register__)) + __attribute__((__bankwidth__(16))) + //expected-note@-2 {{conflicting attribute is here}} + unsigned int reg_six[64]; + + //expected-error@+2{{attributes are not compatible}} + __attribute__((__register__)) + __attribute__((__numbanks__(8))) + //expected-note@-2 {{conflicting attribute is here}} + unsigned int reg_seven[64]; + + // **memory + //expected-error@+2{{attributes are not compatible}} + __attribute__((__memory__)) + __attribute__((__register__)) + //expected-note@-2 {{conflicting attribute is here}} + unsigned int mem_one[64]; + + //expected-warning@+1{{attribute 'memory' is already applied}} + __attribute__((memory)) __attribute__((__memory__)) + unsigned int mem_two[64]; + + // bankwidth + //expected-error@+2{{attributes are not compatible}} + __attribute__((__bankwidth__(16))) + __attribute__((__register__)) + //expected-note@-2 {{conflicting attribute is here}} + unsigned int bw_one[64]; + + //CHECK: VarDecl{{.*}}bw_two + //CHECK: IntelFPGABankWidthAttr + //CHECK-NEXT: ConstantExpr + //CHECK-NEXT: IntegerLiteral{{.*}}8{{$}} + //CHECK: IntelFPGABankWidthAttr + //CHECK-NEXT: ConstantExpr + //CHECK-NEXT: IntegerLiteral{{.*}}16{{$}} + //expected-warning@+2{{attribute 'bankwidth' is already applied}} + __attribute__((__bankwidth__(8))) + __attribute__((__bankwidth__(16))) + unsigned int bw_two[64]; + + //expected-error@+1{{must be a constant power of two greater than zero}} + __attribute__((__bankwidth__(3))) + unsigned int bw_three[64]; + + //expected-error@+1{{requires integer constant between 1 and 1048576}} + __attribute__((__bankwidth__(-4))) + unsigned int bw_four[64]; + + int i_bankwidth = 32; // expected-note {{declared here}} + //expected-error@+1{{is not an integral constant expression}} + __attribute__((__bankwidth__(i_bankwidth))) + //expected-note@-1{{read of non-const variable 'i_bankwidth' is not allowed in a constant expression}} + unsigned int bw_five[64]; + + //expected-error@+1{{'__bankwidth__' attribute takes one argument}} + __attribute__((__bankwidth__(4,8))) + unsigned int bw_six[64]; + + //expected-error@+1{{requires integer constant between 1 and 1048576}} + __attribute__((__bankwidth__(0))) + unsigned int bw_seven[64]; + + // numbanks + //expected-error@+2{{attributes are not compatible}} + __attribute__((__numbanks__(16))) + __attribute__((__register__)) + //expected-note@-2 {{conflicting attribute is here}} + unsigned int nb_one[64]; + + //CHECK: VarDecl{{.*}}nb_two + //CHECK: IntelFPGANumBanksAttr + //CHECK-NEXT: ConstantExpr + //CHECK-NEXT: IntegerLiteral{{.*}}8{{$}} + //CHECK: IntelFPGANumBanksAttr + //CHECK-NEXT: ConstantExpr + //CHECK-NEXT: IntegerLiteral{{.*}}16{{$}} + //expected-warning@+2{{attribute 'numbanks' is already applied}} + __attribute__((__numbanks__(8))) + __attribute__((__numbanks__(16))) + unsigned int nb_two[64]; + + //expected-error@+1{{must be a constant power of two greater than zero}} + __attribute__((__numbanks__(15))) + unsigned int nb_three[64]; + + //expected-error@+1{{requires integer constant between 1 and 1048576}} + __attribute__((__numbanks__(-4))) + unsigned int nb_four[64]; + + int i_numbanks = 32; // expected-note {{declared here}} + //expected-error@+1{{is not an integral constant expression}} + __attribute__((__numbanks__(i_numbanks))) + //expected-note@-1{{read of non-const variable 'i_numbanks' is not allowed in a constant expression}} + unsigned int nb_five[64]; + + //expected-error@+1{{'__numbanks__' attribute takes one argument}} + __attribute__((__numbanks__(4,8))) + unsigned int nb_six[64]; + + //expected-error@+1{{requires integer constant between 1 and 1048576}} + __attribute__((__numbanks__(0))) + unsigned int nb_seven[64]; +} + +struct foo { + //CHECK: FieldDecl{{.*}}v_two + //CHECK: IntelFPGAMemoryAttr + __attribute__((__memory__)) unsigned int v_two[64]; + + //CHECK: FieldDecl{{.*}}v_two_A + //CHECK: IntelFPGAMemoryAttr{{.*}}MLAB{{$}} + __attribute__((__memory__("MLAB"))) unsigned int v_two_A[64]; + + //CHECK: FieldDecl{{.*}}v_two_B + //CHECK: IntelFPGAMemoryAttr{{.*}}BlockRAM{{$}} + __attribute__((__memory__("BLOCK_RAM"))) unsigned int v_two_B[64]; + + //CHECK: FieldDecl{{.*}}v_three + //CHECK: IntelFPGARegisterAttr + __attribute__((__register__)) unsigned int v_three[64]; + + //CHECK: FieldDecl{{.*}}v_five + //CHECK: IntelFPGAMemoryAttr{{.*}}Implicit + //CHECK: IntelFPGABankWidthAttr + //CHECK-NEXT: ConstantExpr + //CHECK-NEXT: IntegerLiteral{{.*}}4{{$}} + __attribute__((__bankwidth__(4))) unsigned int v_five[64]; + + //CHECK: FieldDecl{{.*}}v_six + //CHECK: IntelFPGAMemoryAttr{{.*}}Implicit + //CHECK: IntelFPGANumBanksAttr + //CHECK-NEXT: ConstantExpr + //CHECK-NEXT: IntegerLiteral{{.*}}8{{$}} + __attribute__((__numbanks__(8))) unsigned int v_six[64]; +}; + +template +__attribute__((sycl_kernel)) void kernel_single_task(Func kernelFunc) { + kernelFunc(); +} + +int main() { + kernel_single_task([]() { + foo1(); + }); + return 0; +} diff --git a/clang/test/SemaSYCL/markfunction-astconsumer.cpp b/clang/test/SemaSYCL/markfunction-astconsumer.cpp new file mode 100644 index 0000000000000..6a49faacab110 --- /dev/null +++ b/clang/test/SemaSYCL/markfunction-astconsumer.cpp @@ -0,0 +1,27 @@ +// RUN: %clang_cc1 -fcxx-exceptions -fsycl-is-device -Wno-return-type -verify -fsyntax-only -x c++ -emit-llvm-only -std=c++17 %s +void bar(); + +template +void usage(T func ) { + bar(); +} + +template +__attribute__((sycl_kernel)) void kernel_single_task(Func kernelFunc) { + kernelFunc(); +} + +void foo(); + // expected-error@+2 {{SYCL kernel cannot call a recursive function}} + // expected-note@+1 2{{function implemented using recursion declared here}} +void fum() { return fum(); }; +int main() { + kernel_single_task([]() { usage(foo ); }); +} +template +void templ_func() { + // expected-error@+1 {{SYCL kernel cannot call a recursive function}} + fum(); + foo(); +} +void bar(){ templ_func(); } diff --git a/clang/test/SemaSYCL/restrict-recursion.cpp b/clang/test/SemaSYCL/restrict-recursion.cpp index e68f85789bf71..8aacdec6dd1bb 100644 --- a/clang/test/SemaSYCL/restrict-recursion.cpp +++ b/clang/test/SemaSYCL/restrict-recursion.cpp @@ -11,17 +11,17 @@ int fib(int n) typedef struct S { template - // expected-note@+1 2{{function implemented using recursion declared here}} + // expected-note@+1 3{{function implemented using recursion declared here}} T factT(T i, T j) { - // expected-error@+1 1{{SYCL kernel cannot call a recursive function}} + // expected-error@+1 {{SYCL kernel cannot call a recursive function}} return factT(j,i); } int fact(unsigned i) { if (i==0) return 1; - // expected-error@+1 1{{SYCL kernel cannot call a recursive function}} + // expected-error@+1 {{SYCL kernel cannot call a recursive function}} else return factT(i-1, i); } } S_type; @@ -47,7 +47,7 @@ bool isa_B(void) { S_type s; unsigned f = s.fact(3); - // expected-error@+1 1{{SYCL kernel cannot call a recursive function}} + // expected-error@+1 {{SYCL kernel cannot call a recursive function}} unsigned f1 = s.factT(3,4); // expected-error@+1 {{SYCL kernel cannot call a recursive function}} unsigned g = fact(3); diff --git a/clang/test/SemaSYCL/restrict-recursion2.cpp b/clang/test/SemaSYCL/restrict-recursion2.cpp index 3dff0a91ada3e..43c496b34d8bc 100644 --- a/clang/test/SemaSYCL/restrict-recursion2.cpp +++ b/clang/test/SemaSYCL/restrict-recursion2.cpp @@ -11,7 +11,7 @@ int fib(int n) typedef struct S { template - // expected-note@+1 2{{function implemented using recursion declared here}} + // expected-note@+1 3{{function implemented using recursion declared here}} T factT(T i, T j) { // expected-error@+1 {{SYCL kernel cannot call a recursive function}} diff --git a/clang/test/SemaSYCL/spir-enum.cpp b/clang/test/SemaSYCL/spir-enum.cpp new file mode 100644 index 0000000000000..81c4dd008613f --- /dev/null +++ b/clang/test/SemaSYCL/spir-enum.cpp @@ -0,0 +1,31 @@ +// RUN: %clang_cc1 -triple spir64-unknown-linux-sycldevice -std=c++11 -fsycl-is-device -disable-llvm-optzns -disable-llvm-passes -S -emit-llvm -x c++ %s -o - | FileCheck %s + +template +__attribute__((sycl_kernel)) void kernel_single_task(Func kernelFunc) { + kernelFunc(); +} + +enum enum_type: int { + A = 0, + B = 1, +}; + +void test(enum_type val) +{ + kernel_single_task([=]() { + //expected-warning@+1{{expression result unused}} + val; + }); +} + +int main() { + + // CHECK: define spir_kernel void @_ZTSZ4test9enum_typeE15kernel_function(i32 %_arg_) + + // CHECK: getelementptr inbounds %class.anon, %class.anon* + // CHECK: call spir_func void @"_ZZ4test9enum_typeENK3$_0clEv"(%class.anon* %0) + + + test( enum_type::B ); + return 0; +} diff --git a/clang/test/SemaSYCL/sycl-restrict.cpp b/clang/test/SemaSYCL/sycl-restrict.cpp index bea75fa2c5431..d35805bd57bad 100644 --- a/clang/test/SemaSYCL/sycl-restrict.cpp +++ b/clang/test/SemaSYCL/sycl-restrict.cpp @@ -1,10 +1,28 @@ // RUN: %clang_cc1 -fcxx-exceptions -fsycl-is-device -Wno-return-type -verify -fsyntax-only -x c++ -emit-llvm-only -std=c++17 %s +// RUN: %clang_cc1 -fcxx-exceptions -fsycl-is-device -fno-sycl-allow-func-ptr -Wno-return-type -verify -fsyntax-only -x c++ -emit-llvm-only -std=c++17 %s +// RUN: %clang_cc1 -fcxx-exceptions -fsycl-is-device -DALLOW_FP=1 -fsycl-allow-func-ptr -Wno-return-type -verify -fsyntax-only -x c++ -emit-llvm-only -std=c++17 %s namespace std { class type_info; typedef __typeof__(sizeof(int)) size_t; } +namespace Check_User_Operators { +class Fraction +{ + int gcd(int a, int b) { return b == 0 ? a : gcd(b, a % b); } + int n, d; +public: + Fraction(int n, int d = 1) : n(n/gcd(n, d)), d(d/gcd(n, d)) { } + int num() const { return n; } + int den() const { return d; } +}; +bool operator==(const Fraction& lhs, const Fraction& rhs) +{ + // expected-error@+1 {{SYCL kernel cannot allocate storage}} + new int; + return lhs.num() == rhs.num() && lhs.den() == rhs.den(); +}} namespace Check_VLA_Restriction { void no_restriction(int p) { @@ -40,6 +58,8 @@ struct OverloadedNewDelete { }; bool isa_B(A *a) { + Check_User_Operators::Fraction f1(3, 8), f2(1, 2), f3(10, 2); + if (f1 == f2) return false; Check_VLA_Restriction::restriction(7); // expected-error@+1 {{SYCL kernel cannot allocate storage}} @@ -104,7 +124,11 @@ void usage( myFuncDef functionPtr ) { eh_not_ok(); - // expected-error@+1 {{SYCL kernel cannot call through a function pointer}} +#if ALLOW_FP + // No error message for function pointer. +#else + // expected-error@+2 {{SYCL kernel cannot call through a function pointer}} +#endif if ((*functionPtr)(1,2)) // expected-note@+3{{used here}} // expected-error@+2 {{SYCL kernel cannot use a global variable}} diff --git a/clang/test/SemaTemplate/argument-dependent-lookup.cpp b/clang/test/SemaTemplate/argument-dependent-lookup.cpp index d1603d56b960a..77df49277fff5 100644 --- a/clang/test/SemaTemplate/argument-dependent-lookup.cpp +++ b/clang/test/SemaTemplate/argument-dependent-lookup.cpp @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -verify %s -// RUN: %clang_cc1 -verify %s -DHAVE_UNQUALIFIED_LOOKUP_RESULTS +// RUN: %clang_cc1 -std=c++14 -verify %s +// RUN: %clang_cc1 -std=c++14 -verify %s -DHAVE_UNQUALIFIED_LOOKUP_RESULTS // expected-no-diagnostics namespace address_of { diff --git a/clang/test/SemaTemplate/class-template-decl.cpp b/clang/test/SemaTemplate/class-template-decl.cpp index c49154c6527a7..dd9dcd2de9f4c 100644 --- a/clang/test/SemaTemplate/class-template-decl.cpp +++ b/clang/test/SemaTemplate/class-template-decl.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -std=c++14 -fsyntax-only -verify %s template class A; diff --git a/clang/test/SemaTemplate/missing-typename.cpp b/clang/test/SemaTemplate/missing-typename.cpp new file mode 100644 index 0000000000000..3f8282dcaff29 --- /dev/null +++ b/clang/test/SemaTemplate/missing-typename.cpp @@ -0,0 +1,102 @@ +// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s -Wno-unused +// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s -Wno-unused -fms-compatibility -DMSVC + +namespace PR8446_1 { +struct A { + typedef int BASE_VALUE; +}; + +void g(int &y) {} + +template +void f(int &rValue) { +#if MSVC +// expected-warning@+4 {{missing 'typename' prior to dependent type name 'BASE_CLASS::BASE_VALUE'}} +#else + // expected-error@+2 {{expected expression}} +#endif + return g((BASE_CLASS::BASE_VALUE &)rValue); +} + +int main() { + int x; + f(x); + return 0; +} +} // namespace PR8446_1 + + +namespace PR8446_2 { +struct site_symmetry_ops {}; + +template +struct class_ { + template + void def(A1 const &a1) {} +}; + +template +struct init { + init() {} +}; + +struct special_position_site_parameter { + typedef char scatterer_type; +}; + +template +struct valued_asu_parameter_heir_wrapper { + static class_ wrap(char const *name) { + return class_(); + } +}; + +template +struct special_position_wrapper { + static void wrap(char const *name) { + valued_asu_parameter_heir_wrapper::wrap(name) +#if MSVC + // expected-warning@+4 {{missing 'typename' prior to dependent type name 'wt::scatterer_type'}} +#else + // expected-error@+2 {{expected expression}} +#endif + .def(init()); + } +}; + +void wrap_special_position() { + special_position_wrapper::wrap("special_position_site_parameter"); +} +} // namespace PR8446_2 + +namespace PR8446_3 { +int g(int); +template +int f1(int x) { + return g((T::InnerName & x) & x); +} + +template +int f2(int x) { + return g((T::InnerName & 3) & x); +} + +template +int f3(int x) { + return g((T::InnerName & (3))); +} + +template +int f4(int x) { + return g((T::InnerName * 3) & x); +} +struct A { + static const int InnerName = 42; +}; +int main() { + f1(0); + f2(0); + f3(0); + return f4(0); +} +} // namespace PR8446_3 diff --git a/clang/test/SemaTemplate/temp.cpp b/clang/test/SemaTemplate/temp.cpp index e037f0f0713ae..a8a2daeac31b4 100644 --- a/clang/test/SemaTemplate/temp.cpp +++ b/clang/test/SemaTemplate/temp.cpp @@ -8,12 +8,43 @@ namespace test0 { // PR7252 namespace test1 { - namespace A { template struct Base { typedef T t; }; } // expected-note {{member found}} + namespace A { template struct Base { typedef T t; }; } // expected-note 3{{member}} namespace B { template struct Base { typedef T t; }; } // expected-note {{member found}} template struct Derived : A::Base, B::Base { - // FIXME: the syntax error here is unfortunate - typename Derived::Base::t x; // expected-error {{found in multiple base classes of different types}} \ - // expected-error {{expected member name or ';'}} + typename Derived::Base::t x; // expected-error {{found in multiple base classes of different types}} }; + + class X : A::Base {}; // expected-note 2{{private}} + class Y : A::Base {}; + struct Z : A::Base {}; + struct Use1 : X, Y { + Base b1; // expected-error {{private}} + Use1::Base b2; // expected-error {{private}} + }; + struct Use2 : Z, Y { + Base b1; + Use2::Base b2; + }; + struct Use3 : X, Z { + Base b1; + Use3::Base b2; + }; +} + +namespace test2 { + struct A { static int x; }; // expected-note 4{{member}} + struct B { template static T x(); }; // expected-note 4{{member}} + struct C { template struct x {}; }; // expected-note 3{{member}} + struct D { template static T x(); }; // expected-note {{member}} + + template struct X : T... {}; + + void f() { + X::x(); // expected-error {{found in multiple base classes of different types}} + X::x(); // expected-error {{found in multiple base classes of different types}} + X::x(); // expected-error {{found in multiple base classes of different types}} + X::x(); // expected-error {{found in multiple base classes of different types}} + X::x(); // expected-error {{found in multiple base classes of different types}} + } } diff --git a/clang/test/SemaTemplate/typo-dependent-name.cpp b/clang/test/SemaTemplate/typo-dependent-name.cpp index 0231740f6c2e1..88b2fc373b1f5 100644 --- a/clang/test/SemaTemplate/typo-dependent-name.cpp +++ b/clang/test/SemaTemplate/typo-dependent-name.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -std=c++14 -fsyntax-only -verify %s using nullptr_t = decltype(nullptr); diff --git a/clang/tools/c-index-test/CMakeLists.txt b/clang/tools/c-index-test/CMakeLists.txt index 53e3421f1b354..ceef4b08637cc 100644 --- a/clang/tools/c-index-test/CMakeLists.txt +++ b/clang/tools/c-index-test/CMakeLists.txt @@ -61,7 +61,7 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY) RUNTIME DESTINATION "${INSTALL_DESTINATION}" COMPONENT c-index-test) - if (NOT CMAKE_CONFIGURATION_TYPES) # don't add this for IDE's. + if (NOT LLVM_ENABLE_IDE) add_llvm_install_targets(install-c-index-test DEPENDS c-index-test COMPONENT c-index-test) diff --git a/clang/tools/c-index-test/c-index-test.c b/clang/tools/c-index-test/c-index-test.c index fc6ba46fd6f2a..2cf442ef0dc87 100644 --- a/clang/tools/c-index-test/c-index-test.c +++ b/clang/tools/c-index-test/c-index-test.c @@ -1670,29 +1670,44 @@ static enum CXChildVisitResult PrintType(CXCursor cursor, CXCursor p, return CXChildVisit_Recurse; } -static enum CXChildVisitResult PrintTypeSize(CXCursor cursor, CXCursor p, - CXClientData d) { - CXType T; - enum CXCursorKind K = clang_getCursorKind(cursor); - if (clang_isInvalid(K)) - return CXChildVisit_Recurse; - T = clang_getCursorType(cursor); - PrintCursor(cursor, NULL); - PrintTypeAndTypeKind(T, " [type=%s] [typekind=%s]"); +static void PrintSingleTypeSize(CXType T, const char *TypeKindFormat, + const char *SizeFormat, + const char *AlignFormat) { + PrintTypeAndTypeKind(T, TypeKindFormat); /* Print the type sizeof if applicable. */ { long long Size = clang_Type_getSizeOf(T); if (Size >= 0 || Size < -1 ) { - printf(" [sizeof=%lld]", Size); + printf(SizeFormat, Size); } } /* Print the type alignof if applicable. */ { long long Align = clang_Type_getAlignOf(T); if (Align >= 0 || Align < -1) { - printf(" [alignof=%lld]", Align); + printf(AlignFormat, Align); } } + + /* Print the return type if it exists. */ + { + CXType RT = clang_getResultType(T); + if (RT.kind != CXType_Invalid) + PrintSingleTypeSize(RT, " [resulttype=%s] [resulttypekind=%s]", + " [resultsizeof=%lld]", " [resultalignof=%lld]"); + } +} + +static enum CXChildVisitResult PrintTypeSize(CXCursor cursor, CXCursor p, + CXClientData d) { + CXType T; + enum CXCursorKind K = clang_getCursorKind(cursor); + if (clang_isInvalid(K)) + return CXChildVisit_Recurse; + T = clang_getCursorType(cursor); + PrintCursor(cursor, NULL); + PrintSingleTypeSize(T, " [type=%s] [typekind=%s]", " [sizeof=%lld]", + " [alignof=%lld]"); /* Print the record field offset if applicable. */ { CXString FieldSpelling = clang_getCursorSpelling(cursor); @@ -1730,7 +1745,9 @@ static enum CXChildVisitResult PrintTypeSize(CXCursor cursor, CXCursor p, if (IsBitfield) printf(" [BitFieldSize=%d]", clang_getFieldDeclBitWidth(cursor)); } + printf("\n"); + return CXChildVisit_Recurse; } diff --git a/clang/tools/clang-extdef-mapping/ClangExtDefMapGen.cpp b/clang/tools/clang-extdef-mapping/ClangExtDefMapGen.cpp index d85602cee201e..4cb9d08170719 100644 --- a/clang/tools/clang-extdef-mapping/ClangExtDefMapGen.cpp +++ b/clang/tools/clang-extdef-mapping/ClangExtDefMapGen.cpp @@ -1,4 +1,4 @@ -//===- ClangFnMapGen.cpp -----------------------------------------------===// +//===- ClangExtDefMapGen.cpp -----------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/clang/tools/clang-format/clang-format-diff.py b/clang/tools/clang-format/clang-format-diff.py index 919c09bd9d210..3ba0abefc9f5f 100755 --- a/clang/tools/clang-format/clang-format-diff.py +++ b/clang/tools/clang-format/clang-format-diff.py @@ -66,7 +66,7 @@ def main(): filename = None lines_by_file = {} for line in sys.stdin: - match = re.search('^\+\+\+\ (.*?/){%s}(\S*)' % args.p, line) + match = re.search(r'^\+\+\+\ (.*?/){%s}(\S*)' % args.p, line) if match: filename = match.group(2) if filename == None: @@ -79,7 +79,7 @@ def main(): if not re.match('^%s$' % args.iregex, filename, re.IGNORECASE): continue - match = re.search('^@@.*\+(\d+)(,(\d+))?', line) + match = re.search(r'^@@.*\+(\d+)(,(\d+))?', line) if match: start_line = int(match.group(1)) line_count = 1 diff --git a/clang/tools/clang-import-test/clang-import-test.cpp b/clang/tools/clang-import-test/clang-import-test.cpp index 2a43dc7f28528..823ebed3ed921 100644 --- a/clang/tools/clang-import-test/clang-import-test.cpp +++ b/clang/tools/clang-import-test/clang-import-test.cpp @@ -1,4 +1,4 @@ -//===-- import-test.cpp - ASTImporter/ExternalASTSource testbed -----------===// +//===-- clang-import-test.cpp - ASTImporter/ExternalASTSource testbed -----===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/clang/tools/clang-offload-bundler/ClangOffloadBundler.cpp b/clang/tools/clang-offload-bundler/ClangOffloadBundler.cpp index b1ef0e7cfaa90..4aedf6ff36351 100644 --- a/clang/tools/clang-offload-bundler/ClangOffloadBundler.cpp +++ b/clang/tools/clang-offload-bundler/ClangOffloadBundler.cpp @@ -292,7 +292,7 @@ class BinaryFileHandler final : public FileHandler { ReadChars += TripleSize; // Check if the offset and size make sense. - if (!Size || !Offset || Offset + Size > FC.size()) + if (!Offset || Offset + Size > FC.size()) return; assert(BundlesInfo.find(Triple) == BundlesInfo.end() && diff --git a/clang/tools/clang-offload-wrapper/ClangOffloadWrapper.cpp b/clang/tools/clang-offload-wrapper/ClangOffloadWrapper.cpp index 16bd85fd02849..8d473e6e8a0e0 100644 --- a/clang/tools/clang-offload-wrapper/ClangOffloadWrapper.cpp +++ b/clang/tools/clang-offload-wrapper/ClangOffloadWrapper.cpp @@ -14,8 +14,12 @@ /// //===----------------------------------------------------------------------===// + #include "clang/Basic/Version.h" #include "llvm/ADT/ArrayRef.h" +#include "llvm/ADT/IndexedMap.h" +#include "llvm/ADT/STLExtras.h" +#include "llvm/ADT/SmallVector.h" #include "llvm/ADT/Triple.h" #include "llvm/Bitcode/BitcodeWriter.h" #include "llvm/IR/Constants.h" @@ -33,9 +37,47 @@ #include #include #include +#include +#include +#include using namespace llvm; +// Offload models supported by this tool. The support basically means mapping +// a string representation given at the command line to a value from this +// enum. +enum OffloadKind { + Unknown = 0, + Host, + OpenMP, + HIP, + SYCL, + First = Host, + Last = SYCL +}; + +namespace llvm { +template <> struct DenseMapInfo { + static inline OffloadKind getEmptyKey() { + return static_cast(DenseMapInfo::getEmptyKey()); + } + + static inline OffloadKind getTombstoneKey() { + return static_cast(DenseMapInfo::getTombstoneKey()); + } + + static unsigned getHashValue(const OffloadKind &Val) { + return DenseMapInfo::getHashValue(static_cast(Val)); + } + + static bool isEqual(const OffloadKind &LHS, const OffloadKind &RHS) { + return LHS == RHS; + } +}; +} // namespace llvm + +namespace { + static cl::opt Help("h", cl::desc("Alias for -help"), cl::Hidden); // Mark all our options with this category, everything else (except for -version @@ -48,20 +90,60 @@ static cl::opt Output("o", cl::Required, cl::value_desc("filename"), cl::cat(ClangOffloadWrapperCategory)); +static cl::opt Verbose("v", cl::desc("verbose output"), + cl::cat(ClangOffloadWrapperCategory)); + static cl::list Inputs(cl::Positional, cl::OneOrMore, cl::desc(""), cl::cat(ClangOffloadWrapperCategory)); -static cl::opt - Target("target", cl::Required, - cl::desc("Offload kind + target triple of the wrapper object: " - "-"), - cl::value_desc("kind-triple"), cl::cat(ClangOffloadWrapperCategory)); - -static cl::opt EmitEntryTable("emit-entry-table", cl::NotHidden, - cl::init(true), cl::Optional, - cl::desc("Emit offload entry table"), - cl::cat(ClangOffloadWrapperCategory)); +// Binary image formats supported by this tool. The support basically means +// mapping string representation given at the command line to a value from this +// enum. No format checking is performed. +enum BinaryImageFormat { + none, // image kind is not determined + native, // image kind is native + // portable image kinds go next + spirv, // SPIR-V + llvmbc // LLVM bitcode +}; + +/// Sets offload kind. +static cl::list Kinds( + "kind", cl::desc("offload kind:"), cl::OneOrMore, + cl::values(clEnumValN(Unknown, "unknown", "unknown"), + clEnumValN(Host, "host", "host"), + clEnumValN(OpenMP, "openmp", "OpenMP"), + clEnumValN(HIP, "hip", "HIP"), clEnumValN(SYCL, "sycl", "SYCL")), + cl::cat(ClangOffloadWrapperCategory)); + +/// Sets binary image format. +static cl::list + Formats("format", cl::desc("device binary image formats:"), cl::ZeroOrMore, + cl::values(clEnumVal(none, "not set"), + clEnumVal(native, "unknown or native"), + clEnumVal(spirv, "SPIRV binary"), + clEnumVal(llvmbc, "LLVMIR bitcode")), + cl::cat(ClangOffloadWrapperCategory)); + +/// Sets offload target. +static cl::list Targets("target", cl::ZeroOrMore, + cl::desc("offload target triple"), + cl::cat(ClangOffloadWrapperCategory), + cl::cat(ClangOffloadWrapperCategory)); + +/// Sets build options for device binary image. +static cl::list + Options("build-opts", cl::ZeroOrMore, + cl::desc("build options passed to the offload runtime"), + cl::cat(ClangOffloadWrapperCategory), + cl::cat(ClangOffloadWrapperCategory)); + +/// Specifies the target triple of the host wrapper. +static cl::opt Target("host", cl::Optional, + cl::desc("wrapper object target triple"), + cl::value_desc("triple"), + cl::cat(ClangOffloadWrapperCategory)); static cl::opt EmitRegFuncs("emit-reg-funcs", cl::NotHidden, cl::init(true), cl::Optional, @@ -86,30 +168,7 @@ static cl::opt DescriptorName( ", and makes it globally visible"), cl::value_desc("name"), cl::cat(ClangOffloadWrapperCategory)); -namespace { -// TODO offload bundler and wrapper should share this. -// Offload kinds this tool supports -enum class OffloadKind { - Unknown = 0, - Host, - OpenMP, - HIP, - SYCL, - First = Host, - Last = SYCL -}; - -OffloadKind parseOffloadKind(StringRef KindStr) { - OffloadKind Kind = StringSwitch(KindStr) - .Case("host", OffloadKind::Host) - .Case("openmp", OffloadKind::OpenMP) - .Case("hip", OffloadKind::HIP) - .Case("sycl", OffloadKind::SYCL) - .Default(OffloadKind::Unknown); - return Kind; -} - -StringRef offloadKindToString(OffloadKind Kind) { +static StringRef offloadKindToString(OffloadKind Kind) { switch (Kind) { case OffloadKind::Unknown: return "unknown"; @@ -127,26 +186,79 @@ StringRef offloadKindToString(OffloadKind Kind) { return ""; } -void dumpOffloadKinds(raw_ostream &OS) { - OffloadKind Kinds[] = {OffloadKind::Host, OffloadKind::OpenMP, - OffloadKind::HIP, OffloadKind::SYCL}; - for (auto K : Kinds) { - if (K != OffloadKind::Host) - OS << " "; - OS << offloadKindToString(K); +static StringRef formatToString(BinaryImageFormat Fmt) { + switch (Fmt) { + case BinaryImageFormat::none: + return "none"; + case BinaryImageFormat::spirv: + return "spirv"; + case BinaryImageFormat::llvmbc: + return "llvmbc"; + case BinaryImageFormat::native: + return "native"; + default: + llvm_unreachable("bad format"); } + return ""; } +struct OffloadKindToUint { + using argument_type = OffloadKind; + unsigned operator()(argument_type Kind) const { + return static_cast(Kind); + } +}; + +/// Implements binary image information collecting and wrapping it in a host +/// bitcode file. class BinaryWrapper { +public: + /// Represents a single image to wrap. + class Image { + public: + Image(const llvm::StringRef File_, const llvm::StringRef Manif_, + const llvm::StringRef Tgt_, BinaryImageFormat Fmt_, + const llvm::StringRef Opts_) + : File(File_), Manif(Manif_), Tgt(Tgt_), Fmt(Fmt_), Opts(Opts_) {} + + /// Name of the file with actual contents + const llvm::StringRef File; + /// Name of the manifest file + const llvm::StringRef Manif; + /// Offload target architecture + const llvm::StringRef Tgt; + /// Format + const BinaryImageFormat Fmt; + /// Build options + const llvm::StringRef Opts; + + friend raw_ostream &operator<<(raw_ostream &Out, const Image &Img); + }; + +private: + using SameKindPack = llvm::SmallVector, 4>; + LLVMContext C; Module M; - std::string OffloadKindTag; StructType *EntryTy = nullptr; StructType *ImageTy = nullptr; StructType *DescTy = nullptr; - using MemoryBuffersVector = SmallVectorImpl>; + /// Records all added device binary images per offload kind. + llvm::DenseMap> Packs; + /// Records all created memory buffers for safe auto-gc + llvm::SmallVector, 4> AutoGcBufs; + +public: + void addImage(const OffloadKind Kind, const llvm::StringRef File, + const llvm::StringRef Manif, const llvm::StringRef Tgt, + const BinaryImageFormat Fmt, const llvm::StringRef Opts) { + std::unique_ptr &Pack = Packs[Kind]; + if (!Pack) + Pack.reset(new SameKindPack()); + Pack->emplace_back(llvm::make_unique(File, Manif, Tgt, Fmt, Opts)); + } private: IntegerType *getSizeTTy() { @@ -163,27 +275,67 @@ class BinaryWrapper { // }; StructType *getEntryTy() { if (!EntryTy) - EntryTy = StructType::create("__tgt_offload_entry", Type::getInt8PtrTy(C), - Type::getInt8PtrTy(C), getSizeTTy(), - Type::getInt32Ty(C), Type::getInt32Ty(C)); + EntryTy = StructType::create( + { + Type::getInt8PtrTy(C), // addr + Type::getInt8PtrTy(C), // name + getSizeTTy(), // size + Type::getInt32Ty(C), // flags + Type::getInt32Ty(C) // reserved + }, + "__tgt_offload_entry"); return EntryTy; } PointerType *getEntryPtrTy() { return PointerType::getUnqual(getEntryTy()); } - // struct __tgt_device_image { - // void *ImageStart; - // void *ImageEnd; - // __tgt_offload_entry *EntriesBegin; [optional] - // __tgt_offload_entry *EntriesEnd; [optional] - // }; + const uint16_t DeviceImageStructVersion = 1; + + // struct __tgt_device_image { + // /// version of this structure - for backward compatibility; + // /// all modifications which change order/type/offsets of existing fields + // /// should increment the version. + // uint16_t Version; + // /// the kind of offload model the image employs. + // uint8_t OffloadKind; + // /// format of the image data - SPIRV, LLVMIR bitcode,... + // uint8_t Format; + // /// null-terminated string representation of the device's target + // /// architecture + // const char *DeviceTargetSpec; + // /// a null-terminated string; target- and compiler-specific options + // /// which are suggested to use to "build" program at runtime + // const char *BuildOptions; + // /// Pointer to the manifest data start + // const unsigned char *ManifestStart; + // /// Pointer to the manifest data end + // const unsigned char *ManifestEnd; + // /// Pointer to the device binary image start + // void *ImageStart; + // /// Pointer to the device binary image end + // void *ImageEnd; + // /// the entry table + // __tgt_offload_entry *EntriesBegin; + // __tgt_offload_entry *EntriesEnd; + // }; + // StructType *getDeviceImageTy() { if (!ImageTy) { - SmallVector FieldTypes( - {Type::getInt8PtrTy(C), Type::getInt8PtrTy(C)}); - if (EmitEntryTable) - FieldTypes.append({getEntryPtrTy(), getEntryPtrTy()}); - ImageTy = StructType::create(FieldTypes, "__tgt_device_image"); + ImageTy = StructType::create( + { + Type::getInt16Ty(C), // Version + Type::getInt8Ty(C), // OffloadKind + Type::getInt8Ty(C), // Format + Type::getInt8PtrTy(C), // DeviceTargetSpec + Type::getInt8PtrTy(C), // BuildOptions + Type::getInt8PtrTy(C), // ManifestStart + Type::getInt8PtrTy(C), // ManifestEnd + Type::getInt8PtrTy(C), // ImageStart + Type::getInt8PtrTy(C), // ImageEnd + getEntryPtrTy(), // EntriesBegin + getEntryPtrTy() // EntriesEnd + }, + "__tgt_device_image"); } return ImageTy; } @@ -192,19 +344,30 @@ class BinaryWrapper { return PointerType::getUnqual(getDeviceImageTy()); } + const uint16_t BinDescStructVersion = 1; + // struct __tgt_bin_desc { - // int32_t NumDeviceImages; + // /// version of this structure - for backward compatibility; + // /// all modifications which change order/type/offsets of existing fields + // /// should increment the version. + // uint16_t Version; + // uint16_t NumDeviceImages; // __tgt_device_image *DeviceImages; - // __tgt_offload_entry *HostEntriesBegin; [optional] - // __tgt_offload_entry *HostEntriesEnd; [optional] + // /// the offload entry table + // __tgt_offload_entry *HostEntriesBegin; + // __tgt_offload_entry *HostEntriesEnd; // }; StructType *getBinDescTy() { if (!DescTy) { - SmallVector FieldTypes( - {Type::getInt32Ty(C), getDeviceImagePtrTy()}); - if (EmitEntryTable) - FieldTypes.append({getEntryPtrTy(), getEntryPtrTy()}); - DescTy = StructType::create(FieldTypes, "__tgt_bin_desc"); + DescTy = StructType::create( + { + Type::getInt16Ty(C), // Version + Type::getInt16Ty(C), // NumDeviceImages + getDeviceImagePtrTy(), // DeviceImages + getEntryPtrTy(), // HostEntriesBegin + getEntryPtrTy() // HostEntriesEnd + }, + "__tgt_bin_desc"); } return DescTy; } @@ -213,72 +376,159 @@ class BinaryWrapper { return PointerType::getUnqual(getBinDescTy()); } - GlobalVariable *createBinDesc(const MemoryBuffersVector &Bufs) { - GlobalVariable *EntriesB = nullptr, *EntriesE = nullptr; + MemoryBuffer *loadFile(llvm::StringRef Name) { + auto InputOrErr = MemoryBuffer::getFileOrSTDIN(Name); - if (EmitEntryTable) { - EntriesB = new GlobalVariable(M, getEntryTy(), true, - GlobalValue::ExternalLinkage, nullptr, - OffloadKindTag + "entries_begin"); - EntriesE = new GlobalVariable(M, getEntryTy(), true, - GlobalValue::ExternalLinkage, nullptr, - OffloadKindTag + "entries_end"); + if (auto EC = InputOrErr.getError()) { + errs() << "error: can't read file " << Name << ": " << EC.message() + << "\n"; + exit(1); } + AutoGcBufs.emplace_back(std::move(InputOrErr.get())); + return AutoGcBufs.back().get(); + } + + // Adds given buffer as a global variable into the module and, depending on + // the StartEnd flag, returns either a pair of pointers to the beginning + // and end of the variable or a pair. The + // input memory buffer must outlive 'this' object. + std::pair + addMemBufToModule(Module &M, MemoryBuffer *Buf, const Twine &Name) { + auto *Buf1 = ConstantDataArray::get( + C, makeArrayRef(Buf->getBufferStart(), Buf->getBufferSize())); + auto *Var = new GlobalVariable(M, Buf1->getType(), true, + GlobalVariable::InternalLinkage, Buf1, Name); + if (Verbose) + errs() << " global added: " << Var->getName() << "\n"; + Var->setUnnamedAddr(GlobalValue::UnnamedAddr::Global); + auto *Zero = ConstantInt::get(getSizeTTy(), 0u); + Constant *ZeroZero[] = {Zero, Zero}; + auto *ImageB = + ConstantExpr::getGetElementPtr(Var->getValueType(), Var, ZeroZero); + auto *Size = ConstantInt::get(getSizeTTy(), Buf->getBufferSize()); + + Constant *ZeroSize[] = {Zero, Size}; + auto *ImageE = + ConstantExpr::getGetElementPtr(Var->getValueType(), Var, ZeroSize); + return std::make_pair(ImageB, ImageE); + } + + // Creates a global variable of const char* type and creates an + // initializer that initializes it with given null-terminated string. + // Returns a link-time constant pointer (constant expr) to that variable. + Constant *addStringToModule(Module &M, const std::string &Str, + const Twine &Name) { + Constant *Arr = + ConstantDataArray::get(C, makeArrayRef(Str.c_str(), Str.size() + 1)); + auto *Var = new GlobalVariable(M, Arr->getType(), true, + GlobalVariable::InternalLinkage, Arr, Name); + if (Verbose) + errs() << " global added: " << Var->getName() << "\n"; + Var->setUnnamedAddr(GlobalValue::UnnamedAddr::Global); auto *Zero = ConstantInt::get(getSizeTTy(), 0u); Constant *ZeroZero[] = {Zero, Zero}; + return ConstantExpr::getGetElementPtr(Var->getValueType(), Var, ZeroZero); + } - SmallVector ImagesInits; - for (const auto &Buf : Bufs) { - auto *Data = ConstantDataArray::get( - C, makeArrayRef(Buf->getBufferStart(), Buf->getBufferSize())); - - auto *Image = new GlobalVariable(M, Data->getType(), true, - GlobalVariable::InternalLinkage, Data, - OffloadKindTag + "device_image"); - Image->setUnnamedAddr(GlobalValue::UnnamedAddr::Global); - - auto *Size = ConstantInt::get(getSizeTTy(), Buf->getBufferSize()); - Constant *ZeroSize[] = {Zero, Size}; - - auto *ImageB = ConstantExpr::getGetElementPtr(Image->getValueType(), - Image, ZeroZero); - auto *ImageE = ConstantExpr::getGetElementPtr(Image->getValueType(), - Image, ZeroSize); - - SmallVector Inits({ImageB, ImageE}); - if (EmitEntryTable) - Inits.append({EntriesB, EntriesE}); - ImagesInits.push_back(ConstantStruct::get(getDeviceImageTy(), Inits)); + GlobalVariable *createBinDesc(OffloadKind Kind, SameKindPack &Pack) { + const std::string OffloadKindTag = + (Twine(".") + offloadKindToString(Kind) + Twine("_offloading.")).str(); + + Constant *EntriesB = nullptr, *EntriesE = nullptr; + + if (Kind != OffloadKind::SYCL) { + EntriesB = new GlobalVariable( + M, getEntryTy(), true, GlobalValue::ExternalLinkage, nullptr, + Twine(OffloadKindTag) + Twine("entries_begin")); + EntriesE = new GlobalVariable( + M, getEntryTy(), true, GlobalValue::ExternalLinkage, nullptr, + Twine(OffloadKindTag) + Twine("entries_end")); + + if (Verbose) { + errs() << " global added: " << EntriesB->getName() << "\n"; + errs() << " global added: " << EntriesE->getName() << "\n"; + } + } else { + EntriesB = Constant::getNullValue(getEntryPtrTy()); + EntriesE = Constant::getNullValue(getEntryPtrTy()); } + auto *Zero = ConstantInt::get(getSizeTTy(), 0u); + auto *NullPtr = Constant::getNullValue(Type::getInt8PtrTy(C)); + Constant *ZeroZero[] = {Zero, Zero}; + SmallVector ImagesInits; + unsigned ImgId = 0; + + for (const auto &ImgPtr : Pack) { + const BinaryWrapper::Image &Img = *(ImgPtr.get()); + if (Verbose) + errs() << "adding image: offload kind=" << offloadKindToString(Kind) + << Img << "\n"; + auto *Fver = + ConstantInt::get(Type::getInt16Ty(C), DeviceImageStructVersion); + auto *Fknd = ConstantInt::get(Type::getInt8Ty(C), Kind); + auto *Ffmt = ConstantInt::get(Type::getInt8Ty(C), Img.Fmt); + auto *Ftgt = addStringToModule( + M, Img.Tgt, Twine(OffloadKindTag) + Twine("target.") + Twine(ImgId)); + auto *Fopt = addStringToModule( + M, Img.Opts, Twine(OffloadKindTag) + Twine("opts.") + Twine(ImgId)); + std::pair FMnf; + + if (Img.Manif.empty()) { + // no manifest - zero out the fields + FMnf = std::make_pair(NullPtr, NullPtr); + } else { + MemoryBuffer *Mnf = loadFile(Img.Manif); + FMnf = addMemBufToModule( + M, Mnf, Twine(OffloadKindTag) + Twine(ImgId) + Twine(".manifest")); + } + if (Img.File.empty()) { + errs() << "error: image file name missing\n"; + exit(1); + } + MemoryBuffer *Bin = loadFile(Img.File); + std::pair Fbin = addMemBufToModule( + M, Bin, Twine(OffloadKindTag) + Twine(ImgId) + Twine(".data")); + + ImagesInits.push_back(ConstantStruct::get( + getDeviceImageTy(), + {Fver, Fknd, Ffmt, Ftgt, Fopt, FMnf.first, FMnf.second, Fbin.first, + Fbin.second, EntriesB, EntriesE})); + ImgId++; + } auto *ImagesData = ConstantArray::get( ArrayType::get(getDeviceImageTy(), ImagesInits.size()), ImagesInits); - auto *Images = new GlobalVariable(M, ImagesData->getType(), true, - GlobalValue::InternalLinkage, ImagesData, - OffloadKindTag + "device_images"); + auto *Images = new GlobalVariable( + M, ImagesData->getType(), true, GlobalValue::InternalLinkage, + ImagesData, Twine(OffloadKindTag) + Twine("device_images")); + if (Verbose) + errs() << " global added: " << Images->getName() << "\n"; Images->setUnnamedAddr(GlobalValue::UnnamedAddr::Global); auto *ImagesB = ConstantExpr::getGetElementPtr(Images->getValueType(), Images, ZeroZero); - - SmallVector Inits( - {ConstantInt::get(Type::getInt32Ty(C), ImagesInits.size()), ImagesB}); - if (EmitEntryTable) - Inits.append({EntriesB, EntriesE}); - - auto *DescInit = ConstantStruct::get(getBinDescTy(), Inits); + Constant *Version = + ConstantInt::get(Type::getInt16Ty(C), BinDescStructVersion); + Constant *NumImages = + ConstantInt::get(Type::getInt16Ty(C), ImagesInits.size()); + auto *DescInit = ConstantStruct::get( + getBinDescTy(), {Version, NumImages, ImagesB, EntriesB, EntriesE}); GlobalValue::LinkageTypes Lnk = DescriptorName.getNumOccurrences() > 0 ? GlobalValue::ExternalLinkage : GlobalValue::InternalLinkage; - Twine DescName = Twine(OffloadKindTag) + Twine(DescriptorName); - - return new GlobalVariable(M, DescInit->getType(), true, Lnk, DescInit, - DescName); + auto *Res = + new GlobalVariable(M, DescInit->getType(), true, Lnk, DescInit, + Twine(OffloadKindTag) + Twine(DescriptorName)); + if (Verbose) + errs() << " global added: " << Res->getName() << "\n"; + return Res; } - void createRegisterFunction(GlobalVariable *BinDesc) { + void createRegisterFunction(OffloadKind Kind, GlobalVariable *BinDesc) { + const std::string OffloadKindTag = + (Twine(".") + offloadKindToString(Kind) + Twine("_offloading.")).str(); auto *FuncTy = FunctionType::get(Type::getVoidTy(C), {}, false); auto *Func = Function::Create(FuncTy, GlobalValue::InternalLinkage, OffloadKindTag + "descriptor_reg", &M); @@ -298,7 +548,9 @@ class BinaryWrapper { appendToGlobalCtors(M, Func, 0); } - void createUnregisterFunction(GlobalVariable *BinDesc) { + void createUnregisterFunction(OffloadKind Kind, GlobalVariable *BinDesc) { + const std::string OffloadKindTag = + (Twine(".") + offloadKindToString(Kind) + Twine("_offloading.")).str(); auto *FuncTy = FunctionType::get(Type::getVoidTy(C), {}, false); auto *Func = Function::Create(FuncTy, GlobalValue::InternalLinkage, OffloadKindTag + "descriptor_unreg", &M); @@ -319,26 +571,164 @@ class BinaryWrapper { } public: - BinaryWrapper(const StringRef &KindStr, const StringRef &Target) - : M("offload.wrapper.object", C) { - - OffloadKindTag = - (Twine(".") + Twine(KindStr) + Twine("_offloading.")).str(); + BinaryWrapper(const StringRef &Target) : M("offload.wrapper.object", C) { M.setTargetTriple(Target); } - const Module &wrapBinaries(const MemoryBuffersVector &Binaries) { - auto *Desc = createBinDesc(Binaries); - assert(Desc && "no binary descriptor"); + const Module &wrap() { + for (auto &X : Packs) { + OffloadKind Kind = X.first; + SameKindPack *Pack = X.second.get(); + auto *Desc = createBinDesc(Kind, *Pack); + assert(Desc && "no binary descriptor"); - if (EmitRegFuncs) { - createRegisterFunction(Desc); - createUnregisterFunction(Desc); + if (EmitRegFuncs) { + createRegisterFunction(Kind, Desc); + createUnregisterFunction(Kind, Desc); + } } return M; } }; +llvm::raw_ostream &operator<<(llvm::raw_ostream &Out, + const BinaryWrapper::Image &Img) { + Out << "\n{\n"; + Out << " file = " << Img.File << "\n"; + Out << " manifest = " << (Img.Manif.empty() ? "-" : Img.Manif) << "\n"; + Out << " format = " << formatToString(Img.Fmt) << "\n"; + Out << " target = " << (Img.Tgt.empty() ? "-" : Img.Tgt) << "\n"; + Out << " options = " << (Img.Opts.empty() ? "-" : Img.Opts) << "\n"; + Out << "}\n"; + return Out; +} + +// enable_if_t is available only starting with C++14 +template +using my_enable_if_t = typename std::enable_if::type; + +// Helper class to order elements of multiple cl::list option lists according to +// the sequence they occurred on the command line. Each cl::list defines a +// separate options "class" to identify which class current options belongs to. +// The ID of a class is simply the ordinal of its corresponding cl::list object +// as passed to the constructor. Typical usage: +// do { +// ID = ArgSeq.next(); +// +// switch (ID) { +// case -1: // Done +// break; +// case 0: // An option from the cl::list which came first in the constructor +// (*(ArgSeq.template get<0>())); // get the option value +// break; +// case 1: // An option from the cl::list which came second in the +// constructor +// (*(ArgSeq.template get<1>())); // get the option value +// break; +// ... +// default: +// llvm_unreachable("bad option class ID"); +// } +// } while (ID != -1); +// +template class ListArgsSequencer { +private: + /// The class ID of current option + int Cur = -1; + + /// Class IDs of all options from all lists. Filled in the constructor. + std::unique_ptr> OptListIDs; + + using tuple_of_iters_t = std::tuple; + + template + using iter_t = typename std::tuple_element::type; + + /// Tuple of all lists' iterators pointing to "previous" option value - + /// before latest next() was called + tuple_of_iters_t Prevs; + + /// Holds "current" iterators - after next() + tuple_of_iters_t Iters; + +public: + /// The only constructor. + /// Sz - total number of options on the command line + /// Args - the cl::list objects to sequence elements of + ListArgsSequencer(size_t Sz, Tys &... Args) + : Prevs(Args.end()...), Iters(Args.begin()...) { + assert(Sz >= sizeof...(Tys)); + OptListIDs.reset(new std::vector(Sz, -1)); + addLists(Args...); + } + + ListArgsSequencer() = delete; + + /// Advances to the next option in the sequence. Returns the option class ID + /// or -1 when all lists' elements have been iterated over. + int next() { + size_t Sz = OptListIDs->size(); + + if ((Cur > 0) && (((size_t)Cur) >= Sz)) + return -1; + while ((((size_t)++Cur) < Sz) && (cur() == -1)) + ; + + if (((size_t)Cur) < Sz) + inc(); + return ((size_t)Cur) >= Sz ? -1 : cur(); + } + + /// Retrieves the value of current option. ID must match is the option class + /// returned by next(), otherwise compile error can happen or incorrect option + /// value will be retrieved. + template decltype(std::get(Prevs)) get() { + return std::get(Prevs); + } + +private: + int cur() { + assert(Cur >= 0 && ((size_t)Cur) < OptListIDs->size()); + return (*OptListIDs)[Cur]; + } + + template + my_enable_if_t < ID addLists(XTy &Arg, XTys &... Args) { + addListImpl(Arg); + addLists(Args...); + } + + template + my_enable_if_t addLists(XTy &Arg) { + addListImpl(Arg); + } + + /// Does the actual sequencing of options found in given list. + template void addListImpl(T &L) { + for (auto It = L.begin(); It != L.end(); It++) { + unsigned Pos = L.getPosition(It - L.begin()); + assert((*OptListIDs)[Pos] == -1); + (*OptListIDs)[Pos] = ID; + } + } + + template void incImpl() { + if (cur() == -1) + return; + if (N == cur()) { + std::get(Prevs) = std::get(Iters); + std::get(Iters)++; + } + } + + template my_enable_if_t inc() { + incImpl(); + inc(); + } + + template my_enable_if_t inc() { incImpl(); } +}; + } // anonymous namespace int main(int argc, const char **argv) { @@ -351,61 +741,108 @@ int main(int argc, const char **argv) { cl::ParseCommandLineOptions( argc, argv, "A tool to create a wrapper bitcode for offload target binaries.\n" - "Takes offload target binaries as input and produces bitcode file " - "containing\ntarget binaries packaged as data and initialization code " - "which registers target\nbinaries in offload runtime."); + "Takes offload target binaries and optional manifest files as input\n" + "and produces bitcode file containing target binaries packaged as data\n" + "and initialization code which registers target binaries in the offload\n" + "runtime. Manifest files format and contents are not restricted and are\n" + "a subject of agreement between the device compiler and the native\n" + "runtime for that device. When present, manifest file name should\n" + "immediately follow the corresponding device image filename on the\n" + "command line. Options annotating a device binary have effect on all\n" + "subsequent input, until redefined. For example:\n" + "$clang-offload-wrapper -host x86_64-pc-linux-gnu \\\n" + " -kind=sycl -target=spir64 -format=spirv -build-opts=-g \\\n" + " a.spv a_mf.txt \\\n" + " -target=xxx -format=native -build-opts=\"\" \\\n" + " b.bin b_mf.txt \\\n" + " -kind=openmp \\\n" + " c.bin\n" + "will generate an x86 wrapper object (.bc) enclosing the following\n" + "tuples describing a single device binary each ('-' means 'none')\n\n" + "offload kind | target | data format | data | manifest | build options:\n" + "----------------------------------------------------------------------\n" + " sycl | spir64 | spirv | a.spv| a_mf.txt | -g\n" + " sycl | xxx | native | b.bin| b_mf.txt | -\n" + " openmp | xxx | native | c.bin| - | -\n"); if (Help) { cl::PrintHelpMessage(); return 0; } - - std::pair KindTriplePair = StringRef(Target).split('-'); - auto OffloadKindStr = KindTriplePair.first; - auto TargetStr = KindTriplePair.second; - - if (OffloadKindStr.empty()) { - errs() << "error: no offload kind specified\n"; - return 1; - } - OffloadKind Kind = parseOffloadKind(OffloadKindStr); - - if (Kind == OffloadKind::Unknown) { - errs() << "error: unknown offload kind: " << OffloadKindStr << "\n"; - errs() << "valid offload kinds: "; - dumpOffloadKinds(errs()); - errs() << "\n"; - return 1; - } - if (TargetStr.empty()) { + if (Target.empty()) { errs() << "error: no target specified\n"; return 1; } - // Create the bitcode file to write the resulting code to. - { - std::error_code EC; - raw_fd_ostream OutF(Output, EC, sys::fs::F_None); - if (EC) { - errs() << "error: unable to open output file: " << EC.message() << ".\n"; - return 1; - } - // Read device binaries. - SmallVector, 4> DeviceBinaries; - for (const auto &File : Inputs) { - auto InputOrErr = MemoryBuffer::getFileOrSTDIN(File); - if (auto EC = InputOrErr.getError()) { - errs() << "error: can't open file " << File << ": " << EC.message() - << "\n"; + // Construct BinaryWrapper::Image instances based on command line args and + // add them to the wrapper + + BinaryWrapper Wr(Target); + OffloadKind Knd = OffloadKind::Unknown; + llvm::StringRef Tgt = ""; + BinaryImageFormat Fmt = BinaryImageFormat::none; + llvm::StringRef Opts = ""; + llvm::SmallVector CurInputPair; + + ListArgsSequencer + ArgSeq((size_t)argc, Inputs, Kinds, Formats, Targets, Options); + int ID = -1; + + do { + ID = ArgSeq.next(); + + if (ID != 0) { + // cur option is not an input - create and image instance using current + // state + if (CurInputPair.size() > 2) { + errs() << "too many inputs for a single binary image, " + "{opt}expected\n"; return 1; } - DeviceBinaries.emplace_back(std::move(*InputOrErr)); + if (CurInputPair.size() != 0) { + if (Knd == OffloadKind::Unknown) { + errs() << "error: offload model not set\n"; + return 1; + } + StringRef File = CurInputPair[0]; + StringRef Manif = CurInputPair.size() > 1 ? CurInputPair[1] : ""; + Wr.addImage(Knd, File, Manif, Tgt, Fmt, Opts); + CurInputPair.clear(); + } } + switch (ID) { + case -1: // Done + break; + case 0: // Inputs + CurInputPair.push_back(*(ArgSeq.template get<0>())); + break; + case 1: // Kinds + Knd = *(ArgSeq.template get<1>()); + break; + case 2: // Formats + Fmt = *(ArgSeq.template get<2>()); + break; + case 3: // Targets + Tgt = *(ArgSeq.template get<3>()); + break; + case 4: // Options + Opts = *(ArgSeq.template get<4>()); + break; + default: + llvm_unreachable("bad option class ID"); + } + } while (ID != -1); - // Create a wrapper for device binaries and write its bitcode to the file. - WriteBitcodeToFile( - BinaryWrapper(OffloadKindStr, TargetStr).wrapBinaries(DeviceBinaries), - OutF); + // Create the bitcode file to write the resulting code to. + std::error_code EC; + raw_fd_ostream OutF(Output, EC, sys::fs::F_None); + if (EC) { + errs() << "error: unable to open output file: " << EC.message() << ".\n"; + return 1; } + // Create a wrapper for device binaries and write its bitcode to the file. + WriteBitcodeToFile(Wr.wrap(), OutF); + return 0; } diff --git a/clang/tools/diagtool/CMakeLists.txt b/clang/tools/diagtool/CMakeLists.txt index 96d1c390249c3..80d787b12fdd2 100644 --- a/clang/tools/diagtool/CMakeLists.txt +++ b/clang/tools/diagtool/CMakeLists.txt @@ -23,7 +23,7 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY) COMPONENT diagtool RUNTIME DESTINATION bin) - if (NOT CMAKE_CONFIGURATION_TYPES) + if (NOT LLVM_ENABLE_IDE) add_llvm_install_targets(install-diagtool DEPENDS diagtool COMPONENT diagtool) diff --git a/clang/tools/driver/CMakeLists.txt b/clang/tools/driver/CMakeLists.txt index 89a3aa3ced851..30ab163a6cc9d 100644 --- a/clang/tools/driver/CMakeLists.txt +++ b/clang/tools/driver/CMakeLists.txt @@ -60,7 +60,7 @@ if(CLANG_PLUGIN_SUPPORT) export_executable_symbols(clang) endif() -add_dependencies(clang clang-headers) +add_dependencies(clang clang-resource-headers) if(NOT CLANG_LINKS_TO_CREATE) set(CLANG_LINKS_TO_CREATE clang++ clang-cl clang-cpp) diff --git a/clang/tools/driver/cc1as_main.cpp b/clang/tools/driver/cc1as_main.cpp index 0a38e355c7ae4..a234ba3fc1bd3 100644 --- a/clang/tools/driver/cc1as_main.cpp +++ b/clang/tools/driver/cc1as_main.cpp @@ -336,7 +336,7 @@ static bool ExecuteAssembler(AssemblerInvocation &Opts, SourceMgr SrcMgr; // Tell SrcMgr about this buffer, which is what the parser will pick up. - SrcMgr.AddNewSourceBuffer(std::move(*Buffer), SMLoc()); + unsigned BufferIndex = SrcMgr.AddNewSourceBuffer(std::move(*Buffer), SMLoc()); // Record the location of the include directories so that the lexer can find // it later. @@ -393,12 +393,21 @@ static bool ExecuteAssembler(AssemblerInvocation &Opts, Ctx.setDwarfDebugProducer(StringRef(Opts.DwarfDebugProducer)); if (!Opts.DebugCompilationDir.empty()) Ctx.setCompilationDir(Opts.DebugCompilationDir); + else { + // If no compilation dir is set, try to use the current directory. + SmallString<128> CWD; + if (!sys::fs::current_path(CWD)) + Ctx.setCompilationDir(CWD); + } if (!Opts.DebugPrefixMap.empty()) for (const auto &KV : Opts.DebugPrefixMap) Ctx.addDebugPrefixMapEntry(KV.first, KV.second); if (!Opts.MainFileName.empty()) Ctx.setMainFileName(StringRef(Opts.MainFileName)); Ctx.setDwarfVersion(Opts.DwarfVersion); + if (Opts.GenDwarfForAssembly) + Ctx.setGenDwarfRootFile(Opts.InputFile, + SrcMgr.getMemoryBuffer(BufferIndex)->getBuffer()); // Build up the feature string from the target feature list. std::string FS; diff --git a/clang/tools/libclang/CIndex.cpp b/clang/tools/libclang/CIndex.cpp index 4287222b15e90..78a1290de658e 100644 --- a/clang/tools/libclang/CIndex.cpp +++ b/clang/tools/libclang/CIndex.cpp @@ -5474,7 +5474,13 @@ CXString clang_getCursorKindSpelling(enum CXCursorKind Kind) { case CXCursor_StaticAssert: return cxstring::createRef("StaticAssert"); case CXCursor_FriendDecl: - return cxstring::createRef("FriendDecl"); + return cxstring::createRef("FriendDecl"); + case CXCursor_ConvergentAttr: + return cxstring::createRef("attribute(convergent)"); + case CXCursor_WarnUnusedAttr: + return cxstring::createRef("attribute(warn_unused)"); + case CXCursor_WarnUnusedResultAttr: + return cxstring::createRef("attribute(warn_unused_result)"); } llvm_unreachable("Unhandled CXCursorKind"); diff --git a/clang/tools/libclang/CIndexDiagnostic.cpp b/clang/tools/libclang/CIndexDiagnostic.cpp index 98f1d5391e820..6dfdf2d2f9e36 100644 --- a/clang/tools/libclang/CIndexDiagnostic.cpp +++ b/clang/tools/libclang/CIndexDiagnostic.cpp @@ -1,15 +1,15 @@ -/*===-- CIndexDiagnostics.cpp - Diagnostics C Interface ---------*- C++ -*-===*\ -|* *| -|* Part of the LLVM Project, under the Apache License v2.0 with LLVM *| -|* Exceptions. *| -|* See https://llvm.org/LICENSE.txt for license information. *| -|* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception *| -|* *| -|*===----------------------------------------------------------------------===*| -|* *| -|* Implements the diagnostic functions of the Clang C interface. *| -|* *| -\*===----------------------------------------------------------------------===*/ +//===- CIndexDiagnostic.cpp - Diagnostics C Interface ---------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// +// Implements the diagnostic functions of the Clang C interface. +// +//===----------------------------------------------------------------------===// + #include "CIndexDiagnostic.h" #include "CIndexer.h" #include "CXTranslationUnit.h" diff --git a/clang/tools/libclang/CIndexUSRs.cpp b/clang/tools/libclang/CIndexUSRs.cpp index 73995eb3dafd8..75bb3b01299f1 100644 --- a/clang/tools/libclang/CIndexUSRs.cpp +++ b/clang/tools/libclang/CIndexUSRs.cpp @@ -1,4 +1,4 @@ -//===- CIndexUSR.cpp - Clang-C Source Indexing Library --------------------===// +//===- CIndexUSRs.cpp - Clang-C Source Indexing Library -------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/clang/tools/libclang/CIndexer.cpp b/clang/tools/libclang/CIndexer.cpp index 03907884ac1a5..4c06b63b5a235 100644 --- a/clang/tools/libclang/CIndexer.cpp +++ b/clang/tools/libclang/CIndexer.cpp @@ -1,4 +1,4 @@ -//===- CIndex.cpp - Clang-C Source Indexing Library -----------------------===// +//===- CIndexer.cpp - Clang-C Source Indexing Library ---------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/clang/tools/libclang/CMakeLists.txt b/clang/tools/libclang/CMakeLists.txt index 6fbf1acf8fa1c..2de5b2956d53c 100644 --- a/clang/tools/libclang/CMakeLists.txt +++ b/clang/tools/libclang/CMakeLists.txt @@ -92,7 +92,7 @@ endif() add_clang_library(libclang ${ENABLE_SHARED} ${ENABLE_STATIC} OUTPUT_NAME ${output_name} ${SOURCES} - DEPENDS clang-headers + DEPENDS clang-resource-headers LINK_LIBS ${LIBS} @@ -149,7 +149,7 @@ install(DIRECTORY ../../include/clang-c add_custom_target(libclang-headers) set_target_properties(libclang-headers PROPERTIES FOLDER "Misc") -if (NOT CMAKE_CONFIGURATION_TYPES) # don't add this for IDE's. +if (NOT LLVM_ENABLE_IDE) add_llvm_install_targets(install-libclang-headers COMPONENT libclang-headers) endif() @@ -165,7 +165,7 @@ foreach(PythonVersion ${CLANG_PYTHON_BINDINGS_VERSIONS}) DESTINATION "lib${LLVM_LIBDIR_SUFFIX}/python${PythonVersion}/site-packages") endforeach() -if(NOT CMAKE_CONFIGURATION_TYPES) +if(NOT LLVM_ENABLE_IDE) add_custom_target(libclang-python-bindings) add_llvm_install_targets(install-libclang-python-bindings COMPONENT diff --git a/clang/tools/libclang/CXCursor.cpp b/clang/tools/libclang/CXCursor.cpp index 1eeab63da6737..e4a0291f1407e 100644 --- a/clang/tools/libclang/CXCursor.cpp +++ b/clang/tools/libclang/CXCursor.cpp @@ -78,6 +78,9 @@ static CXCursorKind GetCursorKind(const Attr *A) { case attr::ObjCRuntimeVisible: return CXCursor_ObjCRuntimeVisible; case attr::ObjCBoxable: return CXCursor_ObjCBoxable; case attr::FlagEnum: return CXCursor_FlagEnum; + case attr::Convergent: return CXCursor_ConvergentAttr; + case attr::WarnUnused: return CXCursor_WarnUnusedAttr; + case attr::WarnUnusedResult: return CXCursor_WarnUnusedResultAttr; } return CXCursor_UnexposedAttr; diff --git a/clang/tools/libclang/CXStoredDiagnostic.cpp b/clang/tools/libclang/CXStoredDiagnostic.cpp index 2c7b2c66eaf14..c4c24876e70de 100644 --- a/clang/tools/libclang/CXStoredDiagnostic.cpp +++ b/clang/tools/libclang/CXStoredDiagnostic.cpp @@ -1,15 +1,14 @@ -/*===-- CXStoreDiagnostic.cpp - Diagnostics C Interface ----------*- C++ -*-===*\ -|* *| -|* Part of the LLVM Project, under the Apache License v2.0 with LLVM *| -|* Exceptions. *| -|* See https://llvm.org/LICENSE.txt for license information. *| -|* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception *| -|* *| -|*===----------------------------------------------------------------------===*| -|* *| -|* Implements part of the diagnostic functions of the Clang C interface. *| -|* *| -\*===----------------------------------------------------------------------===*/ +//===- CXStoredDiagnostic.cpp - Diagnostics C Interface -------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// +// Implements part of the diagnostic functions of the Clang C interface. +// +//===----------------------------------------------------------------------===// #include "CIndexDiagnostic.h" #include "CIndexer.h" diff --git a/clang/tools/libclang/CXType.cpp b/clang/tools/libclang/CXType.cpp index 55397d6fa7f24..eb2d17f0c3fd3 100644 --- a/clang/tools/libclang/CXType.cpp +++ b/clang/tools/libclang/CXType.cpp @@ -1,4 +1,4 @@ -//===- CXTypes.cpp - Implements 'CXTypes' aspect of libclang ------------===// +//===- CXType.cpp - Implements 'CXTypes' aspect of libclang ---------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -891,6 +891,9 @@ long long clang_Type_getAlignOf(CXType T) { return CXTypeLayoutError_Incomplete; if (QT->isDependentType()) return CXTypeLayoutError_Dependent; + if (const auto *Deduced = dyn_cast(QT)) + if (Deduced->getDeducedType().isNull()) + return CXTypeLayoutError_Undeduced; // Exceptions by GCC extension - see ASTContext.cpp:1313 getTypeInfoImpl // if (QT->isFunctionType()) return 4; // Bug #15511 - should be 1 // if (QT->isVoidType()) return 1; @@ -928,6 +931,9 @@ long long clang_Type_getSizeOf(CXType T) { return CXTypeLayoutError_Dependent; if (!QT->isConstantSizeType()) return CXTypeLayoutError_NotConstantSize; + if (const auto *Deduced = dyn_cast(QT)) + if (Deduced->getDeducedType().isNull()) + return CXTypeLayoutError_Undeduced; // [gcc extension] lib/AST/ExprConstant.cpp:1372 // HandleSizeof : {voidtype,functype} == 1 // not handled by ASTContext.cpp:1313 getTypeInfoImpl diff --git a/clang/tools/libclang/Indexing.cpp b/clang/tools/libclang/Indexing.cpp index d666d4bff47fe..ad3dc70ea3ddf 100644 --- a/clang/tools/libclang/Indexing.cpp +++ b/clang/tools/libclang/Indexing.cpp @@ -1,4 +1,4 @@ -//===- CIndexHigh.cpp - Higher level API functions ------------------------===// +//===- Indexing.cpp - Higher level API functions --------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/clang/tools/scan-build-py/libscanbuild/analyze.py b/clang/tools/scan-build-py/libscanbuild/analyze.py index bac259cde2ddb..49de387c70424 100644 --- a/clang/tools/scan-build-py/libscanbuild/analyze.py +++ b/clang/tools/scan-build-py/libscanbuild/analyze.py @@ -97,7 +97,7 @@ def need_analyzer(args): when compiler wrappers are used. That's the moment when build setup check the compiler and capture the location for the build process. """ - return len(args) and not re.search('configure|autogen', args[0]) + return len(args) and not re.search(r'configure|autogen', args[0]) def prefix_with(constant, pieces): diff --git a/clang/tools/scan-build/bin/set-xcode-analyzer b/clang/tools/scan-build/bin/set-xcode-analyzer index 8e674823ba66c..c2a65c9085982 100755 --- a/clang/tools/scan-build/bin/set-xcode-analyzer +++ b/clang/tools/scan-build/bin/set-xcode-analyzer @@ -42,7 +42,7 @@ def ModifySpec(path, isBuiltinAnalyzer, pathToChecker): if line.find("Static Analyzer") >= 0: foundAnalyzer = True else: - m = re.search('^(\s*ExecPath\s*=\s*")', line) + m = re.search(r'^(\s*ExecPath\s*=\s*")', line) if m: line = "".join([m.group(0), pathToChecker, '";\n']) # Do not modify further ExecPath's later in the xcspec. diff --git a/clang/unittests/AST/ASTImporterTest.cpp b/clang/unittests/AST/ASTImporterTest.cpp index 64a1d8100810f..08d57e2e433ea 100644 --- a/clang/unittests/AST/ASTImporterTest.cpp +++ b/clang/unittests/AST/ASTImporterTest.cpp @@ -10,6 +10,10 @@ // //===----------------------------------------------------------------------===// +// Define this to have ::testing::Combine available. +// FIXME: Better solution for this? +#define GTEST_HAS_COMBINE 1 + #include "clang/AST/ASTImporter.h" #include "MatchVerifier.h" #include "clang/AST/ASTContext.h" @@ -58,23 +62,31 @@ const StringRef DeclToVerifyID = "declToVerify"; // Common base for the different families of ASTImporter tests that are // parameterized on the compiler options which may result a different AST. E.g. // -fms-compatibility or -fdelayed-template-parsing. -struct ParameterizedTestsFixture : ::testing::TestWithParam { +class CompilerOptionSpecificTest : public ::testing::Test { +protected: + // Return the extra arguments appended to runtime options at compilation. + virtual ArgVector getExtraArgs() const { return ArgVector(); } // Returns the argument vector used for a specific language option, this set // can be tweaked by the test parameters. ArgVector getArgVectorForLanguage(Language Lang) const { ArgVector Args = getBasicRunOptionsForLanguage(Lang); - ArgVector ExtraArgs = GetParam(); + ArgVector ExtraArgs = getExtraArgs(); for (const auto &Arg : ExtraArgs) { Args.push_back(Arg); } return Args; } - }; +auto DefaultTestValuesForRunOptions = ::testing::Values( + ArgVector(), ArgVector{"-fdelayed-template-parsing"}, + ArgVector{"-fms-compatibility"}, + ArgVector{"-fdelayed-template-parsing", "-fms-compatibility"}); + // Base class for those tests which use the family of `testImport` functions. -class TestImportBase : public ParameterizedTestsFixture { +class TestImportBase : public CompilerOptionSpecificTest, + public ::testing::WithParamInterface { template NodeType importNode(ASTUnit *From, ASTUnit *To, ASTImporter &Importer, @@ -159,6 +171,9 @@ class TestImportBase : public ParameterizedTestsFixture { VerificationMatcher); } +protected: + ArgVector getExtraArgs() const override { return GetParam(); } + public: /// Test how AST node named "declToImport" located in the translation unit @@ -284,7 +299,7 @@ template RecordDecl *getRecordDecl(T *D) { // This class provides generic methods to write tests which can check internal // attributes of AST nodes like getPreviousDecl(), isVirtual(), etc. Also, // this fixture makes it possible to import from several "From" contexts. -class ASTImporterTestBase : public ParameterizedTestsFixture { +class ASTImporterTestBase : public CompilerOptionSpecificTest { const char *const InputFileName = "input.cc"; const char *const OutputFileName = "output.cc"; @@ -450,6 +465,10 @@ class ASTImporterTestBase : public ParameterizedTestsFixture { return FromTU->import(*LookupTablePtr, ToAST.get(), From); } + template DeclT *Import(DeclT *From, Language Lang) { + return cast_or_null(Import(cast(From), Lang)); + } + QualType ImportType(QualType FromType, Decl *TUDecl, Language ToLang) { lazyInitToAST(ToLang, "", OutputFileName); TU *FromTU = findFromTU(TUDecl); @@ -473,11 +492,18 @@ class ASTImporterTestBase : public ParameterizedTestsFixture { } }; +class ASTImporterOptionSpecificTestBase + : public ASTImporterTestBase, + public ::testing::WithParamInterface { +protected: + ArgVector getExtraArgs() const override { return GetParam(); } +}; + struct ImportExpr : TestImportBase {}; struct ImportType : TestImportBase {}; struct ImportDecl : TestImportBase {}; -struct CanonicalRedeclChain : ASTImporterTestBase {}; +struct CanonicalRedeclChain : ASTImporterOptionSpecificTestBase {}; TEST_P(CanonicalRedeclChain, ShouldBeConsequentWithMatchers) { Decl *FromTU = getTuDecl("void f();", Lang_CXX); @@ -537,6 +563,17 @@ TEST_P(ImportExpr, ImportStringLiteral) { stringLiteral(hasType(asString("const char [7]")))))); } +TEST_P(ImportExpr, ImportChooseExpr) { + MatchVerifier Verifier; + + // This case tests C code that is not condition-dependent and has a true + // condition. + testImport( + "void declToImport() { (void)__builtin_choose_expr(1, 2, 3); }", + Lang_C, "", Lang_C, Verifier, + functionDecl(hasDescendant(chooseExpr()))); +} + TEST_P(ImportExpr, ImportGNUNullExpr) { MatchVerifier Verifier; testImport( @@ -1000,7 +1037,7 @@ TEST_P(ImportDecl, ImportRecordDeclInFunc) { has(declStmt(hasSingleDecl(varDecl(hasName("d"))))))))); } -TEST_P(ASTImporterTestBase, ImportRecordTypeInFunc) { +TEST_P(ASTImporterOptionSpecificTestBase, ImportRecordTypeInFunc) { Decl *FromTU = getTuDecl("int declToImport() { " " struct data_t {int a;int b;};" " struct data_t d;" @@ -1015,7 +1052,7 @@ TEST_P(ASTImporterTestBase, ImportRecordTypeInFunc) { EXPECT_FALSE(ToType.isNull()); } -TEST_P(ASTImporterTestBase, ImportRecordDeclInFuncParams) { +TEST_P(ASTImporterOptionSpecificTestBase, ImportRecordDeclInFuncParams) { // This construct is not supported by ASTImporter. Decl *FromTU = getTuDecl( "int declToImport(struct data_t{int a;int b;} ***d){ return 0; }", @@ -1027,7 +1064,7 @@ TEST_P(ASTImporterTestBase, ImportRecordDeclInFuncParams) { EXPECT_EQ(To, nullptr); } -TEST_P(ASTImporterTestBase, ImportRecordDeclInFuncFromMacro) { +TEST_P(ASTImporterOptionSpecificTestBase, ImportRecordDeclInFuncFromMacro) { Decl *FromTU = getTuDecl( "#define NONAME_SIZEOF(type) sizeof(struct{type *dummy;}) \n" "int declToImport(){ return NONAME_SIZEOF(int); }", @@ -1042,7 +1079,8 @@ TEST_P(ASTImporterTestBase, ImportRecordDeclInFuncFromMacro) { hasDescendant(unaryExprOrTypeTraitExpr())))); } -TEST_P(ASTImporterTestBase, ImportRecordDeclInFuncParamsFromMacro) { +TEST_P(ASTImporterOptionSpecificTestBase, + ImportRecordDeclInFuncParamsFromMacro) { // This construct is not supported by ASTImporter. Decl *FromTU = getTuDecl( "#define PAIR_STRUCT(type) struct data_t{type a;type b;} \n" @@ -1194,7 +1232,8 @@ TEST_P(ImportExpr, DependentSizedArrayType) { has(fieldDecl(hasType(dependentSizedArrayType()))))))); } -TEST_P(ASTImporterTestBase, ImportOfTemplatedDeclOfClassTemplateDecl) { +TEST_P(ASTImporterOptionSpecificTestBase, + ImportOfTemplatedDeclOfClassTemplateDecl) { Decl *FromTU = getTuDecl("template struct S{};", Lang_CXX); auto From = FirstDeclMatcher().match(FromTU, classTemplateDecl()); @@ -1207,7 +1246,8 @@ TEST_P(ASTImporterTestBase, ImportOfTemplatedDeclOfClassTemplateDecl) { EXPECT_EQ(ToTemplated1, ToTemplated); } -TEST_P(ASTImporterTestBase, ImportOfTemplatedDeclOfFunctionTemplateDecl) { +TEST_P(ASTImporterOptionSpecificTestBase, + ImportOfTemplatedDeclOfFunctionTemplateDecl) { Decl *FromTU = getTuDecl("template void f(){}", Lang_CXX); auto From = FirstDeclMatcher().match( FromTU, functionTemplateDecl()); @@ -1220,7 +1260,7 @@ TEST_P(ASTImporterTestBase, ImportOfTemplatedDeclOfFunctionTemplateDecl) { EXPECT_EQ(ToTemplated1, ToTemplated); } -TEST_P(ASTImporterTestBase, +TEST_P(ASTImporterOptionSpecificTestBase, ImportOfTemplatedDeclShouldImportTheClassTemplateDecl) { Decl *FromTU = getTuDecl("template struct S{};", Lang_CXX); auto FromFT = @@ -1236,7 +1276,7 @@ TEST_P(ASTImporterTestBase, EXPECT_TRUE(ToFT); } -TEST_P(ASTImporterTestBase, +TEST_P(ASTImporterOptionSpecificTestBase, ImportOfTemplatedDeclShouldImportTheFunctionTemplateDecl) { Decl *FromTU = getTuDecl("template void f(){}", Lang_CXX); auto FromFT = FirstDeclMatcher().match( @@ -1252,7 +1292,7 @@ TEST_P(ASTImporterTestBase, EXPECT_TRUE(ToFT); } -TEST_P(ASTImporterTestBase, ImportCorrectTemplatedDecl) { +TEST_P(ASTImporterOptionSpecificTestBase, ImportCorrectTemplatedDecl) { auto Code = R"( namespace x { @@ -1283,7 +1323,31 @@ TEST_P(ASTImporterTestBase, ImportCorrectTemplatedDecl) { ASSERT_EQ(ToTemplated1, ToTemplated); } -TEST_P(ASTImporterTestBase, ImportFunctionWithBackReferringParameter) { +TEST_P(ASTImporterOptionSpecificTestBase, ImportChooseExpr) { + // This tests the import of isConditionTrue directly to make sure the importer + // gets it right. + Decl *From, *To; + std::tie(From, To) = getImportedDecl( + "void declToImport() { (void)__builtin_choose_expr(1, 0, 1); }", + Lang_C, "", Lang_C); + + auto ToResults = match(chooseExpr().bind("choose"), To->getASTContext()); + auto FromResults = match(chooseExpr().bind("choose"), From->getASTContext()); + + const ChooseExpr *FromChooseExpr = + selectFirst("choose", FromResults); + ASSERT_TRUE(FromChooseExpr); + + const ChooseExpr *ToChooseExpr = selectFirst("choose", ToResults); + ASSERT_TRUE(ToChooseExpr); + + EXPECT_EQ(FromChooseExpr->isConditionTrue(), ToChooseExpr->isConditionTrue()); + EXPECT_EQ(FromChooseExpr->isConditionDependent(), + ToChooseExpr->isConditionDependent()); +} + +TEST_P(ASTImporterOptionSpecificTestBase, + ImportFunctionWithBackReferringParameter) { Decl *From, *To; std::tie(From, To) = getImportedDecl( R"( @@ -1310,7 +1374,7 @@ TEST_P(ASTImporterTestBase, ImportFunctionWithBackReferringParameter) { EXPECT_TRUE(Verifier.match(To, Matcher)); } -TEST_P(ASTImporterTestBase, +TEST_P(ASTImporterOptionSpecificTestBase, TUshouldNotContainTemplatedDeclOfFunctionTemplates) { Decl *From, *To; std::tie(From, To) = @@ -1336,7 +1400,8 @@ TEST_P(ASTImporterTestBase, EXPECT_TRUE(Check(To)); } -TEST_P(ASTImporterTestBase, TUshouldNotContainTemplatedDeclOfClassTemplates) { +TEST_P(ASTImporterOptionSpecificTestBase, + TUshouldNotContainTemplatedDeclOfClassTemplates) { Decl *From, *To; std::tie(From, To) = getImportedDecl("template struct declToImport { T t; };" @@ -1361,7 +1426,8 @@ TEST_P(ASTImporterTestBase, TUshouldNotContainTemplatedDeclOfClassTemplates) { EXPECT_TRUE(Check(To)); } -TEST_P(ASTImporterTestBase, TUshouldNotContainTemplatedDeclOfTypeAlias) { +TEST_P(ASTImporterOptionSpecificTestBase, + TUshouldNotContainTemplatedDeclOfTypeAlias) { Decl *From, *To; std::tie(From, To) = getImportedDecl( @@ -1388,9 +1454,8 @@ TEST_P(ASTImporterTestBase, TUshouldNotContainTemplatedDeclOfTypeAlias) { EXPECT_TRUE(Check(To)); } -TEST_P( - ASTImporterTestBase, - TUshouldNotContainClassTemplateSpecializationOfImplicitInstantiation) { +TEST_P(ASTImporterOptionSpecificTestBase, + TUshouldNotContainClassTemplateSpecializationOfImplicitInstantiation) { Decl *From, *To; std::tie(From, To) = getImportedDecl( @@ -1431,7 +1496,7 @@ AST_MATCHER_P(RecordDecl, hasFieldOrder, std::vector, Order) { return Index == Order.size(); } -TEST_P(ASTImporterTestBase, +TEST_P(ASTImporterOptionSpecificTestBase, TUshouldContainClassTemplateSpecializationOfExplicitInstantiation) { Decl *From, *To; std::tie(From, To) = getImportedDecl( @@ -1458,7 +1523,8 @@ TEST_P(ASTImporterTestBase, EXPECT_TRUE(MatchVerifier{}.match(To, Pattern)); } -TEST_P(ASTImporterTestBase, CXXRecordDeclFieldsShouldBeInCorrectOrder) { +TEST_P(ASTImporterOptionSpecificTestBase, + CXXRecordDeclFieldsShouldBeInCorrectOrder) { Decl *From, *To; std::tie(From, To) = getImportedDecl( @@ -1470,7 +1536,7 @@ TEST_P(ASTImporterTestBase, CXXRecordDeclFieldsShouldBeInCorrectOrder) { EXPECT_TRUE(Verifier.match(To, cxxRecordDecl(hasFieldOrder({"a", "b"})))); } -TEST_P(ASTImporterTestBase, +TEST_P(ASTImporterOptionSpecificTestBase, DISABLED_CXXRecordDeclFieldOrderShouldNotDependOnImportOrder) { Decl *From, *To; std::tie(From, To) = getImportedDecl( @@ -1492,7 +1558,7 @@ TEST_P(ASTImporterTestBase, Verifier.match(To, cxxRecordDecl(hasFieldOrder({"a", "b", "c"})))); } -TEST_P(ASTImporterTestBase, ShouldImportImplicitCXXRecordDecl) { +TEST_P(ASTImporterOptionSpecificTestBase, ShouldImportImplicitCXXRecordDecl) { Decl *From, *To; std::tie(From, To) = getImportedDecl( R"( @@ -1508,7 +1574,8 @@ TEST_P(ASTImporterTestBase, ShouldImportImplicitCXXRecordDecl) { EXPECT_TRUE(Verifier.match(To, Matcher)); } -TEST_P(ASTImporterTestBase, ShouldImportImplicitCXXRecordDeclOfClassTemplate) { +TEST_P(ASTImporterOptionSpecificTestBase, + ShouldImportImplicitCXXRecordDeclOfClassTemplate) { Decl *From, *To; std::tie(From, To) = getImportedDecl( R"( @@ -1525,9 +1592,8 @@ TEST_P(ASTImporterTestBase, ShouldImportImplicitCXXRecordDeclOfClassTemplate) { EXPECT_TRUE(Verifier.match(To, Matcher)); } -TEST_P( - ASTImporterTestBase, - ShouldImportImplicitCXXRecordDeclOfClassTemplateSpecializationDecl) { +TEST_P(ASTImporterOptionSpecificTestBase, + ShouldImportImplicitCXXRecordDeclOfClassTemplateSpecializationDecl) { Decl *From, *To; std::tie(From, To) = getImportedDecl( R"( @@ -1547,7 +1613,7 @@ TEST_P( MatchVerifier{}.match(To->getTranslationUnitDecl(), Pattern)); } -TEST_P(ASTImporterTestBase, IDNSOrdinary) { +TEST_P(ASTImporterOptionSpecificTestBase, IDNSOrdinary) { Decl *From, *To; std::tie(From, To) = getImportedDecl("void declToImport() {}", Lang_CXX, "", Lang_CXX); @@ -1559,7 +1625,7 @@ TEST_P(ASTImporterTestBase, IDNSOrdinary) { EXPECT_EQ(From->getIdentifierNamespace(), To->getIdentifierNamespace()); } -TEST_P(ASTImporterTestBase, IDNSOfNonmemberOperator) { +TEST_P(ASTImporterOptionSpecificTestBase, IDNSOfNonmemberOperator) { Decl *FromTU = getTuDecl( R"( struct X {}; @@ -1571,7 +1637,7 @@ TEST_P(ASTImporterTestBase, IDNSOfNonmemberOperator) { EXPECT_EQ(From->getIdentifierNamespace(), To->getIdentifierNamespace()); } -TEST_P(ASTImporterTestBase, +TEST_P(ASTImporterOptionSpecificTestBase, ShouldImportMembersOfClassTemplateSpecializationDecl) { Decl *From, *To; std::tie(From, To) = getImportedDecl( @@ -1591,7 +1657,8 @@ TEST_P(ASTImporterTestBase, MatchVerifier{}.match(To->getTranslationUnitDecl(), Pattern)); } -TEST_P(ASTImporterTestBase, ImportDefinitionOfClassTemplateAfterFwdDecl) { +TEST_P(ASTImporterOptionSpecificTestBase, + ImportDefinitionOfClassTemplateAfterFwdDecl) { { Decl *FromTU = getTuDecl( R"( @@ -1624,7 +1691,7 @@ TEST_P(ASTImporterTestBase, ImportDefinitionOfClassTemplateAfterFwdDecl) { } } -TEST_P(ASTImporterTestBase, +TEST_P(ASTImporterOptionSpecificTestBase, ImportDefinitionOfClassTemplateIfThereIsAnExistingFwdDeclAndDefinition) { Decl *ToTU = getToTuDecl( R"( @@ -1664,7 +1731,7 @@ TEST_P(ASTImporterTestBase, .match(ToTU, classTemplateDecl())); } -TEST_P(ASTImporterTestBase, +TEST_P(ASTImporterOptionSpecificTestBase, ImportDefinitionOfClassIfThereIsAnExistingFwdDeclAndDefinition) { Decl *ToTU = getToTuDecl( R"( @@ -1707,7 +1774,7 @@ static void CompareSourceRanges(SourceRange Range1, SourceRange Range2, CompareSourceLocs(FullSourceLoc{ Range1.getEnd(), SM1 }, FullSourceLoc{ Range2.getEnd(), SM2 }); } -TEST_P(ASTImporterTestBase, ImportSourceLocs) { +TEST_P(ASTImporterOptionSpecificTestBase, ImportSourceLocs) { Decl *FromTU = getTuDecl( R"( #define MFOO(arg) arg = arg + 1 @@ -1737,7 +1804,7 @@ TEST_P(ASTImporterTestBase, ImportSourceLocs) { FromSM); } -TEST_P(ASTImporterTestBase, ImportNestedMacro) { +TEST_P(ASTImporterOptionSpecificTestBase, ImportNestedMacro) { Decl *FromTU = getTuDecl( R"( #define FUNC_INT void declToImport @@ -1755,9 +1822,8 @@ TEST_P(ASTImporterTestBase, ImportNestedMacro) { } TEST_P( - ASTImporterTestBase, - ImportDefinitionOfClassTemplateSpecIfThereIsAnExistingFwdDeclAndDefinition) -{ + ASTImporterOptionSpecificTestBase, + ImportDefinitionOfClassTemplateSpecIfThereIsAnExistingFwdDeclAndDefinition) { Decl *ToTU = getToTuDecl( R"( template @@ -1799,7 +1865,7 @@ TEST_P( .match(ToTU, classTemplateSpecializationDecl())); } -TEST_P(ASTImporterTestBase, ObjectsWithUnnamedStructType) { +TEST_P(ASTImporterOptionSpecificTestBase, ObjectsWithUnnamedStructType) { Decl *FromTU = getTuDecl( R"( struct { int a; int b; } object0 = { 2, 3 }; @@ -1823,7 +1889,7 @@ TEST_P(ASTImporterTestBase, ObjectsWithUnnamedStructType) { EXPECT_NE(To0->getCanonicalDecl(), To1->getCanonicalDecl()); } -TEST_P(ASTImporterTestBase, AnonymousRecords) { +TEST_P(ASTImporterOptionSpecificTestBase, AnonymousRecords) { auto *Code = R"( struct X { @@ -1849,7 +1915,7 @@ TEST_P(ASTImporterTestBase, AnonymousRecords) { DeclCounter().match(ToTU, recordDecl(hasName("X")))); } -TEST_P(ASTImporterTestBase, AnonymousRecordsReversed) { +TEST_P(ASTImporterOptionSpecificTestBase, AnonymousRecordsReversed) { Decl *FromTU0 = getTuDecl( R"( struct X { @@ -1882,7 +1948,7 @@ TEST_P(ASTImporterTestBase, AnonymousRecordsReversed) { DeclCounter().match(ToTU, recordDecl(hasName("X")))); } -TEST_P(ASTImporterTestBase, ImportDoesUpdateUsedFlag) { +TEST_P(ASTImporterOptionSpecificTestBase, ImportDoesUpdateUsedFlag) { auto Pattern = varDecl(hasName("x")); VarDecl *Imported1; { @@ -1908,7 +1974,7 @@ TEST_P(ASTImporterTestBase, ImportDoesUpdateUsedFlag) { EXPECT_TRUE(Imported2->isUsed(false)); } -TEST_P(ASTImporterTestBase, ImportDoesUpdateUsedFlag2) { +TEST_P(ASTImporterOptionSpecificTestBase, ImportDoesUpdateUsedFlag2) { auto Pattern = varDecl(hasName("x")); VarDecl *ExistingD; { @@ -1926,7 +1992,7 @@ TEST_P(ASTImporterTestBase, ImportDoesUpdateUsedFlag2) { EXPECT_TRUE(ExistingD->isUsed(false)); } -TEST_P(ASTImporterTestBase, ImportDoesUpdateUsedFlag3) { +TEST_P(ASTImporterOptionSpecificTestBase, ImportDoesUpdateUsedFlag3) { auto Pattern = varDecl(hasName("a")); VarDecl *ExistingD; { @@ -1957,7 +2023,7 @@ TEST_P(ASTImporterTestBase, ImportDoesUpdateUsedFlag3) { EXPECT_TRUE(ExistingD->isUsed(false)); } -TEST_P(ASTImporterTestBase, ReimportWithUsedFlag) { +TEST_P(ASTImporterOptionSpecificTestBase, ReimportWithUsedFlag) { auto Pattern = varDecl(hasName("x")); Decl *FromTU = getTuDecl("int x;", Lang_CXX, "input0.cc"); @@ -1974,34 +2040,7 @@ TEST_P(ASTImporterTestBase, ReimportWithUsedFlag) { EXPECT_TRUE(Imported2->isUsed(false)); } -struct ImportFunctions : ASTImporterTestBase {}; - -TEST_P(ImportFunctions, - DefinitionShouldBeImportedAsDefintionWhenThereIsAPrototype) { - Decl *FromTU = getTuDecl("void f(); void f() {}", Lang_CXX); - auto Pattern = functionDecl(hasName("f")); - FunctionDecl *FromD = // Definition - LastDeclMatcher().match(FromTU, Pattern); - - Decl *ImportedD = Import(FromD, Lang_CXX); - Decl *ToTU = ImportedD->getTranslationUnitDecl(); - - EXPECT_EQ(DeclCounter().match(ToTU, Pattern), 2u); - EXPECT_TRUE(cast(ImportedD)->doesThisDeclarationHaveABody()); -} - -TEST_P(ImportFunctions, DefinitionShouldBeImportedAsADefinition) { - Decl *FromTU = getTuDecl("void f() {}", Lang_CXX); - auto Pattern = functionDecl(hasName("f")); - FunctionDecl *FromD = - FirstDeclMatcher().match(FromTU, Pattern); - - Decl *ImportedD = Import(FromD, Lang_CXX); - Decl *ToTU = ImportedD->getTranslationUnitDecl(); - - EXPECT_EQ(DeclCounter().match(ToTU, Pattern), 1u); - EXPECT_TRUE(cast(ImportedD)->doesThisDeclarationHaveABody()); -} +struct ImportFunctions : ASTImporterOptionSpecificTestBase {}; TEST_P(ImportFunctions, ImportPrototypeOfRecursiveFunction) { Decl *FromTU = getTuDecl("void f(); void f() { f(); }", Lang_CXX); @@ -2039,138 +2078,6 @@ TEST_P(ImportFunctions, ImportDefinitionOfRecursiveFunction) { EXPECT_EQ(To1->getPreviousDecl(), To0); } -TEST_P(ImportFunctions, ImportPrototypes) { - auto Pattern = functionDecl(hasName("f")); - - Decl *ImportedD; - { - Decl *FromTU = getTuDecl("void f();", Lang_CXX, "input0.cc"); - auto *FromD = FirstDeclMatcher().match(FromTU, Pattern); - - ImportedD = Import(FromD, Lang_CXX); - } - { - Decl *FromTU = getTuDecl("void f();", Lang_CXX, "input1.cc"); - auto *FromD = FirstDeclMatcher().match(FromTU, Pattern); - Import(FromD, Lang_CXX); - } - - Decl *ToTU = ImportedD->getTranslationUnitDecl(); - - EXPECT_EQ(DeclCounter().match(ToTU, Pattern), 2u); - auto *To0 = FirstDeclMatcher().match(ToTU, Pattern); - auto *To1 = LastDeclMatcher().match(ToTU, Pattern); - EXPECT_TRUE(ImportedD == To0); - EXPECT_FALSE(To0->doesThisDeclarationHaveABody()); - EXPECT_FALSE(To1->doesThisDeclarationHaveABody()); - EXPECT_EQ(To1->getPreviousDecl(), To0); -} - -TEST_P(ImportFunctions, ImportDefinitions) { - auto Pattern = functionDecl(hasName("f")); - - Decl *ImportedD; - { - Decl *FromTU = getTuDecl("void f(){}", Lang_CXX, "input0.cc"); - auto *FromD = FirstDeclMatcher().match(FromTU, Pattern); - ImportedD = Import(FromD, Lang_CXX); - } - { - Decl *FromTU = getTuDecl("void f(){};", Lang_CXX, "input1.cc"); - auto *FromD = FirstDeclMatcher().match(FromTU, Pattern); - Import(FromD, Lang_CXX); - } - - Decl *ToTU = ImportedD->getTranslationUnitDecl(); - - EXPECT_EQ(DeclCounter().match(ToTU, Pattern), 1u); - auto *To0 = FirstDeclMatcher().match(ToTU, Pattern); - EXPECT_TRUE(ImportedD == To0); - EXPECT_TRUE(To0->doesThisDeclarationHaveABody()); -} - -TEST_P(ImportFunctions, ImportDefinitionThenPrototype) { - auto Pattern = functionDecl(hasName("f")); - - Decl *ImportedD; - { - Decl *FromTU = getTuDecl("void f(){}", Lang_CXX, "input0.cc"); - auto *FromD = FirstDeclMatcher().match(FromTU, Pattern); - ImportedD = Import(FromD, Lang_CXX); - } - { - Decl *FromTU = getTuDecl("void f();", Lang_CXX, "input1.cc"); - auto *FromD = FirstDeclMatcher().match(FromTU, Pattern); - Import(FromD, Lang_CXX); - } - - Decl *ToTU = ToAST->getASTContext().getTranslationUnitDecl(); - - EXPECT_EQ(DeclCounter().match(ToTU, Pattern), 2u); - auto *To0 = FirstDeclMatcher().match(ToTU, Pattern); - auto *To1 = LastDeclMatcher().match(ToTU, Pattern); - EXPECT_TRUE(ImportedD == To0); - EXPECT_TRUE(To0->doesThisDeclarationHaveABody()); - EXPECT_FALSE(To1->doesThisDeclarationHaveABody()); - EXPECT_EQ(To1->getPreviousDecl(), To0); -} - -TEST_P(ImportFunctions, ImportPrototypeThenDefinition) { - auto Pattern = functionDecl(hasName("f")); - - { - Decl *FromTU = getTuDecl("void f();", Lang_CXX, "input0.cc"); - FunctionDecl *FromD = - FirstDeclMatcher().match(FromTU, Pattern); - - Import(FromD, Lang_CXX); - } - { - Decl *FromTU = getTuDecl("void f(){}", Lang_CXX, "input1.cc"); - FunctionDecl *FromD = - FirstDeclMatcher().match(FromTU, Pattern); - Import(FromD, Lang_CXX); - } - - Decl *ToTU = ToAST->getASTContext().getTranslationUnitDecl(); - ASSERT_EQ(DeclCounter().match(ToTU, Pattern), 2u); - FunctionDecl *ProtoD = FirstDeclMatcher().match(ToTU, Pattern); - EXPECT_FALSE(ProtoD->doesThisDeclarationHaveABody()); - FunctionDecl *DefinitionD = - LastDeclMatcher().match(ToTU, Pattern); - EXPECT_TRUE(DefinitionD->doesThisDeclarationHaveABody()); - EXPECT_EQ(DefinitionD->getPreviousDecl(), ProtoD); -} - -TEST_P(ImportFunctions, ImportPrototypeThenProtoAndDefinition) { - auto Pattern = functionDecl(hasName("f")); - - { - Decl *FromTU = getTuDecl("void f();", Lang_CXX, "input0.cc"); - auto *FromD = FirstDeclMatcher().match(FromTU, Pattern); - Import(FromD, Lang_CXX); - } - { - Decl *FromTU = getTuDecl("void f(); void f(){}", Lang_CXX, "input1.cc"); - auto *FromD = FirstDeclMatcher().match(FromTU, Pattern); - Import(FromD, Lang_CXX); - } - - Decl *ToTU = ToAST->getASTContext().getTranslationUnitDecl(); - - ASSERT_EQ(DeclCounter().match(ToTU, Pattern), 3u); - FunctionDecl *ProtoD = FirstDeclMatcher().match(ToTU, Pattern); - EXPECT_FALSE(ProtoD->doesThisDeclarationHaveABody()); - - FunctionDecl *DefinitionD = - LastDeclMatcher().match(ToTU, Pattern); - EXPECT_TRUE(DefinitionD->doesThisDeclarationHaveABody()); - - EXPECT_TRUE(DefinitionD->getPreviousDecl()); - EXPECT_FALSE(DefinitionD->getPreviousDecl()->doesThisDeclarationHaveABody()); - EXPECT_EQ(DefinitionD->getPreviousDecl()->getPreviousDecl(), ProtoD); -} - TEST_P(ImportFunctions, OverriddenMethodsShouldBeImported) { auto Code = R"( @@ -2417,6 +2324,286 @@ TEST_P(ImportFunctions, EXPECT_EQ(ToDFOutOfClass->getPreviousDecl(), ToDFInClass); } +//FIXME Move these tests to a separate test file. +namespace TypeAndValueParameterizedTests { + +// Type parameters for type-parameterized test fixtures. +struct GetFunPattern { + using DeclTy = FunctionDecl; + BindableMatcher operator()() { return functionDecl(hasName("f")); } +}; +struct GetVarPattern { + using DeclTy = VarDecl; + BindableMatcher operator()() { return varDecl(hasName("v")); } +}; + +// Values for the value-parameterized test fixtures. +// FunctionDecl: +auto *ExternF = "void f();"; +auto *StaticF = "static void f();"; +auto *AnonF = "namespace { void f(); }"; +// VarDecl: +auto *ExternV = "extern int v;"; +auto *StaticV = "static int v;"; +auto *AnonV = "namespace { extern int v; }"; + +// First value in tuple: Compile options. +// Second value in tuple: Source code to be used in the test. +using ImportVisibilityChainParams = + ::testing::WithParamInterface>; +// Fixture to test the redecl chain of Decls with the same visibility. Gtest +// makes it possible to have either value-parameterized or type-parameterized +// fixtures. However, we cannot have both value- and type-parameterized test +// fixtures. This is a value-parameterized test fixture in the gtest sense. We +// intend to mimic gtest's type-parameters via the PatternFactory template +// parameter. We manually instantiate the different tests with the each types. +template +class ImportVisibilityChain + : public ASTImporterTestBase, public ImportVisibilityChainParams { +protected: + using DeclTy = typename PatternFactory::DeclTy; + ArgVector getExtraArgs() const override { return std::get<0>(GetParam()); } + std::string getCode() const { return std::get<1>(GetParam()); } + BindableMatcher getPattern() const { return PatternFactory()(); } + + // Type-parameterized test. + void TypedTest_ImportChain() { + std::string Code = getCode() + getCode(); + auto Pattern = getPattern(); + + TranslationUnitDecl *FromTu = getTuDecl(Code, Lang_CXX, "input0.cc"); + + auto *FromF0 = FirstDeclMatcher().match(FromTu, Pattern); + auto *FromF1 = LastDeclMatcher().match(FromTu, Pattern); + + auto *ToF0 = Import(FromF0, Lang_CXX); + auto *ToF1 = Import(FromF1, Lang_CXX); + + EXPECT_TRUE(ToF0); + ASSERT_TRUE(ToF1); + EXPECT_NE(ToF0, ToF1); + EXPECT_EQ(ToF1->getPreviousDecl(), ToF0); + } +}; + +// Manual instantiation of the fixture with each type. +using ImportFunctionsVisibilityChain = ImportVisibilityChain; +using ImportVariablesVisibilityChain = ImportVisibilityChain; +// Value-parameterized test for the first type. +TEST_P(ImportFunctionsVisibilityChain, ImportChain) { + TypedTest_ImportChain(); +} +// Value-parameterized test for the second type. +TEST_P(ImportVariablesVisibilityChain, ImportChain) { + TypedTest_ImportChain(); +} + +// Automatic instantiation of the value-parameterized tests. +INSTANTIATE_TEST_CASE_P(ParameterizedTests, ImportFunctionsVisibilityChain, + ::testing::Combine( + DefaultTestValuesForRunOptions, + ::testing::Values(ExternF, StaticF, AnonF)), ); +INSTANTIATE_TEST_CASE_P( + ParameterizedTests, ImportVariablesVisibilityChain, + ::testing::Combine( + DefaultTestValuesForRunOptions, + // There is no point to instantiate with StaticV, because in C++ we can + // forward declare a variable only with the 'extern' keyword. + // Consequently, each fwd declared variable has external linkage. This + // is different in the C language where any declaration without an + // initializer is a tentative definition, subsequent definitions may be + // provided but they must have the same linkage. See also the test + // ImportVariableChainInC which test for this special C Lang case. + ::testing::Values(ExternV, AnonV)), ); + +// First value in tuple: Compile options. +// Second value in tuple: Tuple with informations for the test. +// Code for first import (or initial code), code to import, whether the `f` +// functions are expected to be linked in a declaration chain. +// One value of this tuple is combined with every value of compile options. +// The test can have a single tuple as parameter only. +using ImportVisibilityParams = ::testing::WithParamInterface< + std::tuple>>; + +template +class ImportVisibility + : public ASTImporterTestBase, + public ImportVisibilityParams { +protected: + using DeclTy = typename PatternFactory::DeclTy; + ArgVector getExtraArgs() const override { return std::get<0>(GetParam()); } + std::string getCode0() const { return std::get<0>(std::get<1>(GetParam())); } + std::string getCode1() const { return std::get<1>(std::get<1>(GetParam())); } + bool shouldBeLinked() const { return std::get<2>(std::get<1>(GetParam())); } + BindableMatcher getPattern() const { return PatternFactory()(); } + + void TypedTest_ImportAfter() { + TranslationUnitDecl *ToTu = getToTuDecl(getCode0(), Lang_CXX); + TranslationUnitDecl *FromTu = getTuDecl(getCode1(), Lang_CXX, "input1.cc"); + + auto *ToF0 = FirstDeclMatcher().match(ToTu, getPattern()); + auto *FromF1 = FirstDeclMatcher().match(FromTu, getPattern()); + + auto *ToF1 = Import(FromF1, Lang_CXX); + + ASSERT_TRUE(ToF0); + ASSERT_TRUE(ToF1); + EXPECT_NE(ToF0, ToF1); + + if (shouldBeLinked()) + EXPECT_EQ(ToF1->getPreviousDecl(), ToF0); + else + EXPECT_FALSE(ToF1->getPreviousDecl()); + } + + void TypedTest_ImportAfterImport() { + TranslationUnitDecl *FromTu0 = getTuDecl(getCode0(), Lang_CXX, "input0.cc"); + TranslationUnitDecl *FromTu1 = getTuDecl(getCode1(), Lang_CXX, "input1.cc"); + auto *FromF0 = + FirstDeclMatcher().match(FromTu0, getPattern()); + auto *FromF1 = + FirstDeclMatcher().match(FromTu1, getPattern()); + auto *ToF0 = Import(FromF0, Lang_CXX); + auto *ToF1 = Import(FromF1, Lang_CXX); + ASSERT_TRUE(ToF0); + ASSERT_TRUE(ToF1); + EXPECT_NE(ToF0, ToF1); + if (shouldBeLinked()) + EXPECT_EQ(ToF1->getPreviousDecl(), ToF0); + else + EXPECT_FALSE(ToF1->getPreviousDecl()); + } +}; +using ImportFunctionsVisibility = ImportVisibility; +using ImportVariablesVisibility = ImportVisibility; + +// FunctionDecl. +TEST_P(ImportFunctionsVisibility, ImportAfter) { + TypedTest_ImportAfter(); +} +TEST_P(ImportFunctionsVisibility, ImportAfterImport) { + TypedTest_ImportAfterImport(); +} +// VarDecl. +TEST_P(ImportVariablesVisibility, ImportAfter) { + TypedTest_ImportAfter(); +} +TEST_P(ImportVariablesVisibility, ImportAfterImport) { + TypedTest_ImportAfterImport(); +} + +bool ExpectLink = true; +bool ExpectNotLink = false; + +INSTANTIATE_TEST_CASE_P( + ParameterizedTests, ImportFunctionsVisibility, + ::testing::Combine( + DefaultTestValuesForRunOptions, + ::testing::Values(std::make_tuple(ExternF, ExternF, ExpectLink), + std::make_tuple(ExternF, StaticF, ExpectNotLink), + std::make_tuple(ExternF, AnonF, ExpectNotLink), + std::make_tuple(StaticF, ExternF, ExpectNotLink), + std::make_tuple(StaticF, StaticF, ExpectNotLink), + std::make_tuple(StaticF, AnonF, ExpectNotLink), + std::make_tuple(AnonF, ExternF, ExpectNotLink), + std::make_tuple(AnonF, StaticF, ExpectNotLink), + std::make_tuple(AnonF, AnonF, ExpectNotLink))), ); +INSTANTIATE_TEST_CASE_P( + ParameterizedTests, ImportVariablesVisibility, + ::testing::Combine( + DefaultTestValuesForRunOptions, + ::testing::Values(std::make_tuple(ExternV, ExternV, ExpectLink), + std::make_tuple(ExternV, StaticV, ExpectNotLink), + std::make_tuple(ExternV, AnonV, ExpectNotLink), + std::make_tuple(StaticV, ExternV, ExpectNotLink), + std::make_tuple(StaticV, StaticV, ExpectNotLink), + std::make_tuple(StaticV, AnonV, ExpectNotLink), + std::make_tuple(AnonV, ExternV, ExpectNotLink), + std::make_tuple(AnonV, StaticV, ExpectNotLink), + std::make_tuple(AnonV, AnonV, ExpectNotLink))), ); + +} // namespace TypeAndValueParameterizedTests + +TEST_P(ASTImporterOptionSpecificTestBase, ImportVariableChainInC) { + std::string Code = "static int v; static int v = 0;"; + auto Pattern = varDecl(hasName("v")); + + TranslationUnitDecl *FromTu = getTuDecl(Code, Lang_C, "input0.c"); + + auto *From0 = FirstDeclMatcher().match(FromTu, Pattern); + auto *From1 = LastDeclMatcher().match(FromTu, Pattern); + + auto *To0 = Import(From0, Lang_C); + auto *To1 = Import(From1, Lang_C); + + EXPECT_TRUE(To0); + ASSERT_TRUE(To1); + EXPECT_NE(To0, To1); + EXPECT_EQ(To1->getPreviousDecl(), To0); +} + +TEST_P(ImportFunctions, ImportFromDifferentScopedAnonNamespace) { + TranslationUnitDecl *FromTu = getTuDecl( + "namespace NS0 { namespace { void f(); } }" + "namespace NS1 { namespace { void f(); } }", + Lang_CXX, "input0.cc"); + auto Pattern = functionDecl(hasName("f")); + + auto *FromF0 = FirstDeclMatcher().match(FromTu, Pattern); + auto *FromF1 = LastDeclMatcher().match(FromTu, Pattern); + + auto *ToF0 = Import(FromF0, Lang_CXX); + auto *ToF1 = Import(FromF1, Lang_CXX); + + EXPECT_TRUE(ToF0); + ASSERT_TRUE(ToF1); + EXPECT_NE(ToF0, ToF1); + EXPECT_FALSE(ToF1->getPreviousDecl()); +} + +TEST_P(ImportFunctions, ImportFunctionFromUnnamedNamespace) { + { + Decl *FromTU = getTuDecl("namespace { void f() {} } void g0() { f(); }", + Lang_CXX, "input0.cc"); + auto *FromD = FirstDeclMatcher().match( + FromTU, functionDecl(hasName("g0"))); + + Import(FromD, Lang_CXX); + } + { + Decl *FromTU = + getTuDecl("namespace { void f() { int a; } } void g1() { f(); }", + Lang_CXX, "input1.cc"); + auto *FromD = FirstDeclMatcher().match( + FromTU, functionDecl(hasName("g1"))); + Import(FromD, Lang_CXX); + } + + Decl *ToTU = ToAST->getASTContext().getTranslationUnitDecl(); + ASSERT_EQ(DeclCounter().match(ToTU, functionDecl(hasName("f"))), + 2u); +} + +TEST_P(ImportFunctions, ImportImplicitFunctionsInLambda) { + Decl *FromTU = getTuDecl( + R"( + void foo() { + (void)[]() { ; }; + } + )", + Lang_CXX11); + auto *FromD = FirstDeclMatcher().match( + FromTU, functionDecl(hasName("foo"))); + auto *ToD = Import(FromD, Lang_CXX); + EXPECT_TRUE(ToD); + CXXRecordDecl *LambdaRec = + cast(cast( + *cast(ToD->getBody())->body_begin()) + ->getSubExpr()) + ->getLambdaClass(); + EXPECT_TRUE(LambdaRec->getDestructor()); +} + struct ImportFriendFunctions : ImportFunctions {}; TEST_P(ImportFriendFunctions, ImportFriendFunctionRedeclChainProto) { @@ -2885,7 +3072,7 @@ TEST_P(ImportExpr, UnresolvedMemberExpr) { compoundStmt(has(callExpr(has(unresolvedMemberExpr()))))))))); } -class ImportImplicitMethods : public ASTImporterTestBase { +class ImportImplicitMethods : public ASTImporterOptionSpecificTestBase { public: static constexpr auto DefaultCode = R"( struct A { int x; }; @@ -2997,7 +3184,7 @@ TEST_P(ImportImplicitMethods, DoNotImportOtherMethod) { testNoImportOf(cxxMethodDecl(hasName("f")), Code); } -TEST_P(ASTImporterTestBase, ImportOfEquivalentRecord) { +TEST_P(ASTImporterOptionSpecificTestBase, ImportOfEquivalentRecord) { Decl *ToR1; { Decl *FromTU = getTuDecl( @@ -3021,7 +3208,7 @@ TEST_P(ASTImporterTestBase, ImportOfEquivalentRecord) { EXPECT_EQ(ToR1, ToR2); } -TEST_P(ASTImporterTestBase, ImportOfNonEquivalentRecord) { +TEST_P(ASTImporterOptionSpecificTestBase, ImportOfNonEquivalentRecord) { Decl *ToR1; { Decl *FromTU = getTuDecl( @@ -3041,7 +3228,7 @@ TEST_P(ASTImporterTestBase, ImportOfNonEquivalentRecord) { EXPECT_NE(ToR1, ToR2); } -TEST_P(ASTImporterTestBase, ImportOfEquivalentField) { +TEST_P(ASTImporterOptionSpecificTestBase, ImportOfEquivalentField) { Decl *ToF1; { Decl *FromTU = getTuDecl( @@ -3061,7 +3248,7 @@ TEST_P(ASTImporterTestBase, ImportOfEquivalentField) { EXPECT_EQ(ToF1, ToF2); } -TEST_P(ASTImporterTestBase, ImportOfNonEquivalentField) { +TEST_P(ASTImporterOptionSpecificTestBase, ImportOfNonEquivalentField) { Decl *ToF1; { Decl *FromTU = getTuDecl( @@ -3081,7 +3268,7 @@ TEST_P(ASTImporterTestBase, ImportOfNonEquivalentField) { EXPECT_NE(ToF1, ToF2); } -TEST_P(ASTImporterTestBase, ImportOfEquivalentMethod) { +TEST_P(ASTImporterOptionSpecificTestBase, ImportOfEquivalentMethod) { Decl *ToM1; { Decl *FromTU = getTuDecl( @@ -3101,7 +3288,7 @@ TEST_P(ASTImporterTestBase, ImportOfEquivalentMethod) { EXPECT_EQ(ToM1, ToM2); } -TEST_P(ASTImporterTestBase, ImportOfNonEquivalentMethod) { +TEST_P(ASTImporterOptionSpecificTestBase, ImportOfNonEquivalentMethod) { Decl *ToM1; { Decl *FromTU = getTuDecl( @@ -3123,7 +3310,8 @@ TEST_P(ASTImporterTestBase, ImportOfNonEquivalentMethod) { EXPECT_NE(ToM1, ToM2); } -TEST_P(ASTImporterTestBase, ImportUnnamedStructsWithRecursingField) { +TEST_P(ASTImporterOptionSpecificTestBase, + ImportUnnamedStructsWithRecursingField) { Decl *FromTU = getTuDecl( R"( struct A { @@ -3155,7 +3343,7 @@ TEST_P(ASTImporterTestBase, ImportUnnamedStructsWithRecursingField) { R1, recordDecl(has(fieldDecl(hasName("next")))))); } -TEST_P(ASTImporterTestBase, ImportUnnamedFieldsInCorrectOrder) { +TEST_P(ASTImporterOptionSpecificTestBase, ImportUnnamedFieldsInCorrectOrder) { Decl *FromTU = getTuDecl( R"( void f(int X, int Y, bool Z) { @@ -3190,7 +3378,8 @@ TEST_P(ASTImporterTestBase, ImportUnnamedFieldsInCorrectOrder) { EXPECT_EQ(FromIndex, 3u); } -TEST_P(ASTImporterTestBase, MergeFieldDeclsOfClassTemplateSpecialization) { +TEST_P(ASTImporterOptionSpecificTestBase, + MergeFieldDeclsOfClassTemplateSpecialization) { std::string ClassTemplate = R"( template @@ -3235,7 +3424,8 @@ TEST_P(ASTImporterTestBase, MergeFieldDeclsOfClassTemplateSpecialization) { EXPECT_TRUE(ToField->getInClassInitializer()); } -TEST_P(ASTImporterTestBase, MergeFunctionOfClassTemplateSpecialization) { +TEST_P(ASTImporterOptionSpecificTestBase, + MergeFunctionOfClassTemplateSpecialization) { std::string ClassTemplate = R"( template @@ -3276,7 +3466,7 @@ TEST_P(ASTImporterTestBase, MergeFunctionOfClassTemplateSpecialization) { EXPECT_TRUE(ToFun->hasBody()); } -TEST_P(ASTImporterTestBase, +TEST_P(ASTImporterOptionSpecificTestBase, ODRViolationOfClassTemplateSpecializationsShouldBeReported) { std::string ClassTemplate = R"( @@ -3323,7 +3513,8 @@ TEST_P(ASTImporterTestBase, ToTU, classTemplateSpecializationDecl())); } -TEST_P(ASTImporterTestBase, MergeCtorOfClassTemplateSpecialization) { +TEST_P(ASTImporterOptionSpecificTestBase, + MergeCtorOfClassTemplateSpecialization) { std::string ClassTemplate = R"( template @@ -3364,7 +3555,7 @@ TEST_P(ASTImporterTestBase, MergeCtorOfClassTemplateSpecialization) { EXPECT_TRUE(ToCtor->hasBody()); } -TEST_P(ASTImporterTestBase, +TEST_P(ASTImporterOptionSpecificTestBase, ClassTemplatePartialSpecializationsShouldNotBeDuplicated) { auto Code = R"( @@ -3391,7 +3582,8 @@ TEST_P(ASTImporterTestBase, ToTU, classTemplatePartialSpecializationDecl())); } -TEST_P(ASTImporterTestBase, ClassTemplateSpecializationsShouldNotBeDuplicated) { +TEST_P(ASTImporterOptionSpecificTestBase, + ClassTemplateSpecializationsShouldNotBeDuplicated) { auto Code = R"( // primary template @@ -3415,7 +3607,8 @@ TEST_P(ASTImporterTestBase, ClassTemplateSpecializationsShouldNotBeDuplicated) { ToTU, classTemplateSpecializationDecl())); } -TEST_P(ASTImporterTestBase, ClassTemplateFullAndPartialSpecsShouldNotBeMixed) { +TEST_P(ASTImporterOptionSpecificTestBase, + ClassTemplateFullAndPartialSpecsShouldNotBeMixed) { std::string PrimaryTemplate = R"( template @@ -3447,7 +3640,8 @@ TEST_P(ASTImporterTestBase, ClassTemplateFullAndPartialSpecsShouldNotBeMixed) { unless(classTemplatePartialSpecializationDecl())))); } -TEST_P(ASTImporterTestBase, InitListExprValueKindShouldBeImported) { +TEST_P(ASTImporterOptionSpecificTestBase, + InitListExprValueKindShouldBeImported) { Decl *TU = getTuDecl( R"( const int &init(); @@ -3466,7 +3660,7 @@ TEST_P(ASTImporterTestBase, InitListExprValueKindShouldBeImported) { EXPECT_TRUE(ToInitExpr->isGLValue()); } -struct ImportVariables : ASTImporterTestBase {}; +struct ImportVariables : ASTImporterOptionSpecificTestBase {}; TEST_P(ImportVariables, ImportOfOneDeclBringsInTheWholeChain) { Decl *FromTU = getTuDecl( @@ -3554,140 +3748,10 @@ TEST_P(ImportVariables, InitAndDefinitionAreInTheFromContext) { EXPECT_TRUE(ImportedD->getDefinition()); } -struct ImportClasses : ASTImporterTestBase {}; - -TEST_P(ImportClasses, - PrototypeShouldBeImportedAsAPrototypeWhenThereIsNoDefinition) { - Decl *FromTU = getTuDecl("class X;", Lang_CXX); - auto Pattern = cxxRecordDecl(hasName("X"), unless(isImplicit())); - auto FromD = FirstDeclMatcher().match(FromTU, Pattern); - - Decl *ImportedD = Import(FromD, Lang_CXX); - Decl *ToTU = ImportedD->getTranslationUnitDecl(); - - EXPECT_EQ(DeclCounter().match(ToTU, Pattern), 1u); - auto ToD = LastDeclMatcher().match(ToTU, Pattern); - EXPECT_TRUE(ImportedD == ToD); - EXPECT_FALSE(ToD->isThisDeclarationADefinition()); -} - -TEST_P(ImportClasses, ImportPrototypeAfterImportedPrototype) { - Decl *FromTU = getTuDecl("class X; class X;", Lang_CXX); - auto Pattern = cxxRecordDecl(hasName("X"), unless(isImplicit())); - auto From0 = FirstDeclMatcher().match(FromTU, Pattern); - auto From1 = LastDeclMatcher().match(FromTU, Pattern); - - Decl *Imported0 = Import(From0, Lang_CXX); - Decl *Imported1 = Import(From1, Lang_CXX); - Decl *ToTU = Imported0->getTranslationUnitDecl(); - - EXPECT_EQ(DeclCounter().match(ToTU, Pattern), 2u); - auto To0 = FirstDeclMatcher().match(ToTU, Pattern); - auto To1 = LastDeclMatcher().match(ToTU, Pattern); - EXPECT_TRUE(Imported0 == To0); - EXPECT_TRUE(Imported1 == To1); - EXPECT_FALSE(To0->isThisDeclarationADefinition()); - EXPECT_FALSE(To1->isThisDeclarationADefinition()); - EXPECT_EQ(To1->getPreviousDecl(), To0); -} - -TEST_P(ImportClasses, DefinitionShouldBeImportedAsADefinition) { - Decl *FromTU = getTuDecl("class X {};", Lang_CXX); - auto Pattern = cxxRecordDecl(hasName("X"), unless(isImplicit())); - auto *FromD = FirstDeclMatcher().match(FromTU, Pattern); - - Decl *ImportedD = Import(FromD, Lang_CXX); - Decl *ToTU = ImportedD->getTranslationUnitDecl(); - - EXPECT_EQ(DeclCounter().match(ToTU, Pattern), 1u); - EXPECT_TRUE(cast(ImportedD)->isThisDeclarationADefinition()); -} - -TEST_P(ImportClasses, ImportPrototypeFromDifferentTUAfterImportedPrototype) { - Decl *FromTU0 = getTuDecl("class X;", Lang_CXX, "input0.cc"); - Decl *FromTU1 = getTuDecl("class X;", Lang_CXX, "input1.cc"); - auto Pattern = cxxRecordDecl(hasName("X"), unless(isImplicit())); - auto From0 = FirstDeclMatcher().match(FromTU0, Pattern); - auto From1 = FirstDeclMatcher().match(FromTU1, Pattern); - - Decl *Imported0 = Import(From0, Lang_CXX); - Decl *Imported1 = Import(From1, Lang_CXX); - Decl *ToTU = Imported0->getTranslationUnitDecl(); - - EXPECT_EQ(DeclCounter().match(ToTU, Pattern), 2u); - auto To0 = FirstDeclMatcher().match(ToTU, Pattern); - auto To1 = LastDeclMatcher().match(ToTU, Pattern); - EXPECT_TRUE(Imported0 == To0); - EXPECT_TRUE(Imported1 == To1); - EXPECT_FALSE(To0->isThisDeclarationADefinition()); - EXPECT_FALSE(To1->isThisDeclarationADefinition()); - EXPECT_EQ(To1->getPreviousDecl(), To0); -} - -TEST_P(ImportClasses, ImportDefinitions) { - Decl *FromTU0 = getTuDecl("class X {};", Lang_CXX, "input0.cc"); - Decl *FromTU1 = getTuDecl("class X {};", Lang_CXX, "input1.cc"); - auto Pattern = cxxRecordDecl(hasName("X"), unless(isImplicit())); - auto From0 = FirstDeclMatcher().match(FromTU0, Pattern); - auto From1 = FirstDeclMatcher().match(FromTU1, Pattern); - - Decl *Imported0 = Import(From0, Lang_CXX); - Decl *Imported1 = Import(From1, Lang_CXX); - Decl *ToTU = Imported0->getTranslationUnitDecl(); - - EXPECT_EQ(Imported0, Imported1); - EXPECT_EQ(DeclCounter().match(ToTU, Pattern), 1u); - auto To0 = FirstDeclMatcher().match(ToTU, Pattern); - EXPECT_TRUE(Imported0 == To0); - EXPECT_TRUE(To0->isThisDeclarationADefinition()); -} - -TEST_P(ImportClasses, ImportDefinitionThenPrototype) { - Decl *FromTU0 = getTuDecl("class X {};", Lang_CXX, "input0.cc"); - Decl *FromTU1 = getTuDecl("class X;", Lang_CXX, "input1.cc"); - auto Pattern = cxxRecordDecl(hasName("X"), unless(isImplicit())); - auto FromDef = FirstDeclMatcher().match(FromTU0, Pattern); - auto FromProto = FirstDeclMatcher().match(FromTU1, Pattern); - - Decl *ImportedDef = Import(FromDef, Lang_CXX); - Decl *ImportedProto = Import(FromProto, Lang_CXX); - Decl *ToTU = ImportedDef->getTranslationUnitDecl(); - - EXPECT_NE(ImportedDef, ImportedProto); - EXPECT_EQ(DeclCounter().match(ToTU, Pattern), 2u); - auto ToDef = FirstDeclMatcher().match(ToTU, Pattern); - auto ToProto = LastDeclMatcher().match(ToTU, Pattern); - EXPECT_TRUE(ImportedDef == ToDef); - EXPECT_TRUE(ImportedProto == ToProto); - EXPECT_TRUE(ToDef->isThisDeclarationADefinition()); - EXPECT_FALSE(ToProto->isThisDeclarationADefinition()); - EXPECT_EQ(ToProto->getPreviousDecl(), ToDef); -} - -TEST_P(ImportClasses, ImportPrototypeThenDefinition) { - Decl *FromTU0 = getTuDecl("class X;", Lang_CXX, "input0.cc"); - Decl *FromTU1 = getTuDecl("class X {};", Lang_CXX, "input1.cc"); - auto Pattern = cxxRecordDecl(hasName("X"), unless(isImplicit())); - auto FromProto = FirstDeclMatcher().match(FromTU0, Pattern); - auto FromDef = FirstDeclMatcher().match(FromTU1, Pattern); - - Decl *ImportedProto = Import(FromProto, Lang_CXX); - Decl *ImportedDef = Import(FromDef, Lang_CXX); - Decl *ToTU = ImportedDef->getTranslationUnitDecl(); - - EXPECT_NE(ImportedDef, ImportedProto); - EXPECT_EQ(DeclCounter().match(ToTU, Pattern), 2u); - auto ToProto = FirstDeclMatcher().match(ToTU, Pattern); - auto ToDef = LastDeclMatcher().match(ToTU, Pattern); - EXPECT_TRUE(ImportedDef == ToDef); - EXPECT_TRUE(ImportedProto == ToProto); - EXPECT_TRUE(ToDef->isThisDeclarationADefinition()); - EXPECT_FALSE(ToProto->isThisDeclarationADefinition()); - EXPECT_EQ(ToDef->getPreviousDecl(), ToProto); -} +struct ImportClasses : ASTImporterOptionSpecificTestBase {}; -TEST_P(ImportClasses, ImportDefinitionWhenProtoIsInToContext) { - Decl *ToTU = getToTuDecl("struct X;", Lang_C); +TEST_P(ImportClasses, ImportDefinitionWhenProtoIsInNestedToContext) { + Decl *ToTU = getToTuDecl("struct A { struct X *Xp; };", Lang_C); Decl *FromTU1 = getTuDecl("struct X {};", Lang_C, "input1.cc"); auto Pattern = recordDecl(hasName("X"), unless(isImplicit())); auto ToProto = FirstDeclMatcher().match(ToTU, Pattern); @@ -3704,32 +3768,14 @@ TEST_P(ImportClasses, ImportDefinitionWhenProtoIsInToContext) { EXPECT_EQ(ToDef->getPreviousDecl(), ToProto); } -TEST_P(ImportClasses, ImportDefinitionWhenProtoIsInNestedToContext) { - Decl *ToTU = getToTuDecl("struct A { struct X *Xp; };", Lang_C); - Decl *FromTU1 = getTuDecl("struct X {};", Lang_C, "input1.cc"); +TEST_P(ImportClasses, ImportDefinitionWhenProtoIsInNestedToContextCXX) { + Decl *ToTU = getToTuDecl("struct A { struct X *Xp; };", Lang_CXX); + Decl *FromTU1 = getTuDecl("struct X {};", Lang_CXX, "input1.cc"); auto Pattern = recordDecl(hasName("X"), unless(isImplicit())); auto ToProto = FirstDeclMatcher().match(ToTU, Pattern); auto FromDef = FirstDeclMatcher().match(FromTU1, Pattern); - Decl *ImportedDef = Import(FromDef, Lang_C); - - EXPECT_NE(ImportedDef, ToProto); - EXPECT_EQ(DeclCounter().match(ToTU, Pattern), 2u); - auto ToDef = LastDeclMatcher().match(ToTU, Pattern); - EXPECT_TRUE(ImportedDef == ToDef); - EXPECT_TRUE(ToDef->isThisDeclarationADefinition()); - EXPECT_FALSE(ToProto->isThisDeclarationADefinition()); - EXPECT_EQ(ToDef->getPreviousDecl(), ToProto); -} - -TEST_P(ImportClasses, ImportDefinitionWhenProtoIsInNestedToContextCXX) { - Decl *ToTU = getToTuDecl("struct A { struct X *Xp; };", Lang_CXX); - Decl *FromTU1 = getTuDecl("struct X {};", Lang_CXX, "input1.cc"); - auto Pattern = recordDecl(hasName("X"), unless(isImplicit())); - auto ToProto = FirstDeclMatcher().match(ToTU, Pattern); - auto FromDef = FirstDeclMatcher().match(FromTU1, Pattern); - - Decl *ImportedDef = Import(FromDef, Lang_CXX); + Decl *ImportedDef = Import(FromDef, Lang_CXX); EXPECT_NE(ImportedDef, ToProto); EXPECT_EQ(DeclCounter().match(ToTU, Pattern), 2u); @@ -3762,171 +3808,570 @@ TEST_P(ImportClasses, ImportNestedPrototypeThenDefinition) { EXPECT_EQ(ToDef->getPreviousDecl(), ToProto); } -struct ImportClassTemplates : ASTImporterTestBase {}; +// FIXME put these structs and the tests rely on them into their own separate +// test file! +struct Function { + using DeclTy = FunctionDecl; + static constexpr auto *Prototype = "void X();"; + static constexpr auto *Definition = "void X() {}"; + BindableMatcher getPattern() { + return functionDecl(hasName("X"), unless(isImplicit())); + } +}; -TEST_P(ImportClassTemplates, - PrototypeShouldBeImportedAsAPrototypeWhenThereIsNoDefinition) { - Decl *FromTU = getTuDecl("template class X;", Lang_CXX); - auto Pattern = classTemplateDecl(hasName("X"), unless(isImplicit())); - auto FromD = FirstDeclMatcher().match(FromTU, Pattern); +struct Class { + using DeclTy = CXXRecordDecl; + static constexpr auto *Prototype = "class X;"; + static constexpr auto *Definition = "class X {};"; + BindableMatcher getPattern() { + return cxxRecordDecl(hasName("X"), unless(isImplicit())); + } +}; - Decl *ImportedD = Import(FromD, Lang_CXX); - Decl *ToTU = ImportedD->getTranslationUnitDecl(); +struct Variable { + using DeclTy = VarDecl; + static constexpr auto *Prototype = "extern int X;"; + static constexpr auto *Definition = "int X;"; + BindableMatcher getPattern() { + return varDecl(hasName("X")); + } +}; - EXPECT_EQ(DeclCounter().match(ToTU, Pattern), 1u); - auto ToD = LastDeclMatcher().match(ToTU, Pattern); - EXPECT_TRUE(ImportedD == ToD); - ASSERT_TRUE(ToD->getTemplatedDecl()); - EXPECT_FALSE(ToD->isThisDeclarationADefinition()); -} +struct FunctionTemplate { + using DeclTy = FunctionTemplateDecl; + static constexpr auto *Prototype = "template void X();"; + static constexpr auto *Definition = + R"( + template void X() {}; + // Explicit instantiation is a must because of -fdelayed-template-parsing: + template void X(); + )"; + BindableMatcher getPattern() { + return functionTemplateDecl(hasName("X"), unless(isImplicit())); + } +}; -TEST_P(ImportClassTemplates, ImportPrototypeAfterImportedPrototype) { - Decl *FromTU = getTuDecl( - "template class X; template class X;", Lang_CXX); - auto Pattern = classTemplateDecl(hasName("X"), unless(isImplicit())); - auto From0 = FirstDeclMatcher().match(FromTU, Pattern); - auto From1 = LastDeclMatcher().match(FromTU, Pattern); - - Decl *Imported0 = Import(From0, Lang_CXX); - Decl *Imported1 = Import(From1, Lang_CXX); - Decl *ToTU = Imported0->getTranslationUnitDecl(); - - EXPECT_EQ(DeclCounter().match(ToTU, Pattern), 2u); - auto To0 = FirstDeclMatcher().match(ToTU, Pattern); - auto To1 = LastDeclMatcher().match(ToTU, Pattern); - EXPECT_TRUE(Imported0 == To0); - EXPECT_TRUE(Imported1 == To1); - ASSERT_TRUE(To0->getTemplatedDecl()); - ASSERT_TRUE(To1->getTemplatedDecl()); - EXPECT_FALSE(To0->isThisDeclarationADefinition()); - EXPECT_FALSE(To1->isThisDeclarationADefinition()); - EXPECT_EQ(To1->getPreviousDecl(), To0); - EXPECT_EQ(To1->getTemplatedDecl()->getPreviousDecl(), - To0->getTemplatedDecl()); -} +struct ClassTemplate { + using DeclTy = ClassTemplateDecl; + static constexpr auto *Prototype = "template class X;"; + static constexpr auto *Definition = "template class X {};"; + BindableMatcher getPattern() { + return classTemplateDecl(hasName("X"), unless(isImplicit())); + } +}; -TEST_P(ImportClassTemplates, DefinitionShouldBeImportedAsADefinition) { - Decl *FromTU = getTuDecl("template class X {};", Lang_CXX); - auto Pattern = classTemplateDecl(hasName("X"), unless(isImplicit())); - auto *FromD = FirstDeclMatcher().match(FromTU, Pattern); +struct FunctionTemplateSpec { + using DeclTy = FunctionDecl; + static constexpr auto *Prototype = + R"( + // Proto of the primary template. + template + void X(); + // Proto of the specialization. + template <> + void X(); + )"; + static constexpr auto *Definition = + R"( + // Proto of the primary template. + template + void X(); + // Specialization and definition. + template <> + void X() {} + )"; + BindableMatcher getPattern() { + return functionDecl(hasName("X"), isExplicitTemplateSpecialization()); + } +}; - Decl *ImportedD = Import(FromD, Lang_CXX); - Decl *ToTU = ImportedD->getTranslationUnitDecl(); +template +struct RedeclChain : ASTImporterOptionSpecificTestBase { + + using DeclTy = typename TypeParam::DeclTy; + std::string getPrototype() { return TypeParam::Prototype; } + std::string getDefinition() { return TypeParam::Definition; } + BindableMatcher getPattern() const { return TypeParam().getPattern(); } + + void + TypedTest_PrototypeShouldBeImportedAsAPrototypeWhenThereIsNoDefinition() { + Decl *FromTU = getTuDecl(getPrototype(), Lang_CXX); + auto *FromD = FirstDeclMatcher().match(FromTU, getPattern()); + ASSERT_FALSE(FromD->isThisDeclarationADefinition()); + + Decl *ImportedD = Import(FromD, Lang_CXX); + Decl *ToTU = ImportedD->getTranslationUnitDecl(); + + EXPECT_EQ(DeclCounter().match(ToTU, getPattern()), 1u); + auto *ToD = LastDeclMatcher().match(ToTU, getPattern()); + EXPECT_TRUE(ImportedD == ToD); + EXPECT_FALSE(ToD->isThisDeclarationADefinition()); + if (auto *ToT = dyn_cast(ToD)) + EXPECT_TRUE(ToT->getTemplatedDecl()); + } - EXPECT_EQ(DeclCounter().match(ToTU, Pattern), 1u); - auto ToD = LastDeclMatcher().match(ToTU, Pattern); - ASSERT_TRUE(ToD->getTemplatedDecl()); - EXPECT_TRUE(ToD->isThisDeclarationADefinition()); -} - -TEST_P(ImportClassTemplates, - ImportPrototypeFromDifferentTUAfterImportedPrototype) { - Decl *FromTU0 = - getTuDecl("template class X;", Lang_CXX, "input0.cc"); - Decl *FromTU1 = - getTuDecl("template class X;", Lang_CXX, "input1.cc"); - auto Pattern = classTemplateDecl(hasName("X"), unless(isImplicit())); - auto From0 = FirstDeclMatcher().match(FromTU0, Pattern); - auto From1 = FirstDeclMatcher().match(FromTU1, Pattern); - - Decl *Imported0 = Import(From0, Lang_CXX); - Decl *Imported1 = Import(From1, Lang_CXX); - Decl *ToTU = Imported0->getTranslationUnitDecl(); - - EXPECT_EQ(DeclCounter().match(ToTU, Pattern), 2u); - auto To0 = FirstDeclMatcher().match(ToTU, Pattern); - auto To1 = LastDeclMatcher().match(ToTU, Pattern); - EXPECT_TRUE(Imported0 == To0); - EXPECT_TRUE(Imported1 == To1); - ASSERT_TRUE(To0->getTemplatedDecl()); - ASSERT_TRUE(To1->getTemplatedDecl()); - EXPECT_FALSE(To0->isThisDeclarationADefinition()); - EXPECT_FALSE(To1->isThisDeclarationADefinition()); - EXPECT_EQ(To1->getPreviousDecl(), To0); - EXPECT_EQ(To1->getTemplatedDecl()->getPreviousDecl(), - To0->getTemplatedDecl()); -} - -TEST_P(ImportClassTemplates, ImportDefinitions) { - Decl *FromTU0 = - getTuDecl("template class X {};", Lang_CXX, "input0.cc"); - Decl *FromTU1 = - getTuDecl("template class X {};", Lang_CXX, "input1.cc"); - auto Pattern = classTemplateDecl(hasName("X"), unless(isImplicit())); - auto From0 = FirstDeclMatcher().match(FromTU0, Pattern); - auto From1 = FirstDeclMatcher().match(FromTU1, Pattern); - - Decl *Imported0 = Import(From0, Lang_CXX); - Decl *Imported1 = Import(From1, Lang_CXX); - Decl *ToTU = Imported0->getTranslationUnitDecl(); - - EXPECT_EQ(Imported0, Imported1); - EXPECT_EQ(DeclCounter().match(ToTU, Pattern), 1u); - auto To0 = FirstDeclMatcher().match(ToTU, Pattern); - EXPECT_TRUE(Imported0 == To0); - ASSERT_TRUE(To0->getTemplatedDecl()); - EXPECT_TRUE(To0->isThisDeclarationADefinition()); -} - -TEST_P(ImportClassTemplates, ImportDefinitionThenPrototype) { - Decl *FromTU0 = - getTuDecl("template class X {};", Lang_CXX, "input0.cc"); - Decl *FromTU1 = - getTuDecl("template class X;", Lang_CXX, "input1.cc"); - auto Pattern = classTemplateDecl(hasName("X"), unless(isImplicit())); - auto FromDef = FirstDeclMatcher().match(FromTU0, Pattern); - auto FromProto = - FirstDeclMatcher().match(FromTU1, Pattern); + void TypedTest_DefinitionShouldBeImportedAsADefinition() { + Decl *FromTU = getTuDecl(getDefinition(), Lang_CXX); + auto *FromD = FirstDeclMatcher().match(FromTU, getPattern()); + ASSERT_TRUE(FromD->isThisDeclarationADefinition()); - Decl *ImportedDef = Import(FromDef, Lang_CXX); - Decl *ImportedProto = Import(FromProto, Lang_CXX); - Decl *ToTU = ImportedDef->getTranslationUnitDecl(); + Decl *ImportedD = Import(FromD, Lang_CXX); + Decl *ToTU = ImportedD->getTranslationUnitDecl(); - EXPECT_NE(ImportedDef, ImportedProto); - EXPECT_EQ(DeclCounter().match(ToTU, Pattern), 2u); - auto ToDef = FirstDeclMatcher().match(ToTU, Pattern); - auto ToProto = LastDeclMatcher().match(ToTU, Pattern); - EXPECT_TRUE(ImportedDef == ToDef); - EXPECT_TRUE(ImportedProto == ToProto); - ASSERT_TRUE(ToDef->getTemplatedDecl()); - ASSERT_TRUE(ToProto->getTemplatedDecl()); - EXPECT_TRUE(ToDef->isThisDeclarationADefinition()); - EXPECT_FALSE(ToProto->isThisDeclarationADefinition()); - EXPECT_EQ(ToProto->getPreviousDecl(), ToDef); - EXPECT_EQ(ToProto->getTemplatedDecl()->getPreviousDecl(), - ToDef->getTemplatedDecl()); -} - -TEST_P(ImportClassTemplates, ImportPrototypeThenDefinition) { - Decl *FromTU0 = - getTuDecl("template class X;", Lang_CXX, "input0.cc"); - Decl *FromTU1 = - getTuDecl("template class X {};", Lang_CXX, "input1.cc"); - auto Pattern = classTemplateDecl(hasName("X"), unless(isImplicit())); - auto FromProto = - FirstDeclMatcher().match(FromTU0, Pattern); - auto FromDef = FirstDeclMatcher().match(FromTU1, Pattern); - - Decl *ImportedProto = Import(FromProto, Lang_CXX); - Decl *ImportedDef = Import(FromDef, Lang_CXX); - Decl *ToTU = ImportedDef->getTranslationUnitDecl(); + EXPECT_EQ(DeclCounter().match(ToTU, getPattern()), 1u); + auto *ToD = LastDeclMatcher().match(ToTU, getPattern()); + EXPECT_TRUE(ToD->isThisDeclarationADefinition()); + if (auto *ToT = dyn_cast(ToD)) + EXPECT_TRUE(ToT->getTemplatedDecl()); + } - EXPECT_NE(ImportedDef, ImportedProto); - EXPECT_EQ(DeclCounter().match(ToTU, Pattern), 2u); - auto ToProto = FirstDeclMatcher().match(ToTU, Pattern); - auto ToDef = LastDeclMatcher().match(ToTU, Pattern); - EXPECT_TRUE(ImportedDef == ToDef); - EXPECT_TRUE(ImportedProto == ToProto); - ASSERT_TRUE(ToProto->getTemplatedDecl()); - ASSERT_TRUE(ToDef->getTemplatedDecl()); - EXPECT_TRUE(ToDef->isThisDeclarationADefinition()); - EXPECT_FALSE(ToProto->isThisDeclarationADefinition()); - EXPECT_EQ(ToDef->getPreviousDecl(), ToProto); - EXPECT_EQ(ToDef->getTemplatedDecl()->getPreviousDecl(), - ToProto->getTemplatedDecl()); -} + void TypedTest_ImportPrototypeAfterImportedPrototype() { + Decl *FromTU = getTuDecl( + getPrototype() + getPrototype(), Lang_CXX); + auto *From0 = + FirstDeclMatcher().match(FromTU, getPattern()); + auto *From1 = LastDeclMatcher().match(FromTU, getPattern()); + ASSERT_FALSE(From0->isThisDeclarationADefinition()); + ASSERT_FALSE(From1->isThisDeclarationADefinition()); + + Decl *Imported0 = Import(From0, Lang_CXX); + Decl *Imported1 = Import(From1, Lang_CXX); + Decl *ToTU = Imported0->getTranslationUnitDecl(); + + EXPECT_EQ(DeclCounter().match(ToTU, getPattern()), 2u); + auto *To0 = FirstDeclMatcher().match(ToTU, getPattern()); + auto *To1 = LastDeclMatcher().match(ToTU, getPattern()); + EXPECT_TRUE(Imported0 == To0); + EXPECT_TRUE(Imported1 == To1); + EXPECT_FALSE(To0->isThisDeclarationADefinition()); + EXPECT_FALSE(To1->isThisDeclarationADefinition()); + EXPECT_EQ(To1->getPreviousDecl(), To0); + if (auto *ToT0 = dyn_cast(To0)) { + auto *ToT1 = cast(To1); + ASSERT_TRUE(ToT0->getTemplatedDecl()); + ASSERT_TRUE(ToT1->getTemplatedDecl()); + EXPECT_EQ(ToT1->getTemplatedDecl()->getPreviousDecl(), + ToT0->getTemplatedDecl()); + } + } + + void TypedTest_ImportDefinitionAfterImportedPrototype() { + Decl *FromTU = getTuDecl( + getPrototype() + getDefinition(), Lang_CXX); + auto *FromProto = FirstDeclMatcher().match(FromTU, getPattern()); + auto *FromDef = LastDeclMatcher().match(FromTU, getPattern()); + ASSERT_FALSE(FromProto->isThisDeclarationADefinition()); + ASSERT_TRUE(FromDef->isThisDeclarationADefinition()); + + Decl *ImportedProto = Import(FromProto, Lang_CXX); + Decl *ImportedDef = Import(FromDef, Lang_CXX); + Decl *ToTU = ImportedProto->getTranslationUnitDecl(); + + EXPECT_EQ(DeclCounter().match(ToTU, getPattern()), 2u); + auto *ToProto = FirstDeclMatcher().match(ToTU, getPattern()); + auto *ToDef = LastDeclMatcher().match(ToTU, getPattern()); + EXPECT_TRUE(ImportedProto == ToProto); + EXPECT_TRUE(ImportedDef == ToDef); + EXPECT_FALSE(ToProto->isThisDeclarationADefinition()); + EXPECT_TRUE(ToDef->isThisDeclarationADefinition()); + EXPECT_EQ(ToDef->getPreviousDecl(), ToProto); + if (auto *ToProtoT = dyn_cast(ToProto)) { + auto *ToDefT = cast(ToDef); + ASSERT_TRUE(ToProtoT->getTemplatedDecl()); + ASSERT_TRUE(ToDefT->getTemplatedDecl()); + EXPECT_EQ(ToDefT->getTemplatedDecl()->getPreviousDecl(), + ToProtoT->getTemplatedDecl()); + } + } + + void TypedTest_ImportPrototypeAfterImportedDefinition() { + Decl *FromTU = getTuDecl( + getDefinition() + getPrototype(), Lang_CXX); + auto *FromDef = FirstDeclMatcher().match(FromTU, getPattern()); + auto *FromProto = LastDeclMatcher().match(FromTU, getPattern()); + ASSERT_TRUE(FromDef->isThisDeclarationADefinition()); + ASSERT_FALSE(FromProto->isThisDeclarationADefinition()); + + Decl *ImportedDef = Import(FromDef, Lang_CXX); + Decl *ImportedProto = Import(FromProto, Lang_CXX); + Decl *ToTU = ImportedDef->getTranslationUnitDecl(); + + EXPECT_EQ(DeclCounter().match(ToTU, getPattern()), 2u); + auto *ToDef = FirstDeclMatcher().match(ToTU, getPattern()); + auto *ToProto = LastDeclMatcher().match(ToTU, getPattern()); + EXPECT_TRUE(ImportedDef == ToDef); + EXPECT_TRUE(ImportedProto == ToProto); + EXPECT_TRUE(ToDef->isThisDeclarationADefinition()); + EXPECT_FALSE(ToProto->isThisDeclarationADefinition()); + EXPECT_EQ(ToProto->getPreviousDecl(), ToDef); + if (auto *ToDefT = dyn_cast(ToDef)) { + auto *ToProtoT = cast(ToProto); + ASSERT_TRUE(ToDefT->getTemplatedDecl()); + ASSERT_TRUE(ToProtoT->getTemplatedDecl()); + EXPECT_EQ(ToProtoT->getTemplatedDecl()->getPreviousDecl(), + ToDefT->getTemplatedDecl()); + } + } + + void TypedTest_ImportPrototypes() { + Decl *FromTU0 = getTuDecl(getPrototype(), Lang_CXX, "input0.cc"); + Decl *FromTU1 = getTuDecl(getPrototype(), Lang_CXX, "input1.cc"); + auto *From0 = FirstDeclMatcher().match(FromTU0, getPattern()); + auto *From1 = FirstDeclMatcher().match(FromTU1, getPattern()); + ASSERT_FALSE(From0->isThisDeclarationADefinition()); + ASSERT_FALSE(From1->isThisDeclarationADefinition()); + + Decl *Imported0 = Import(From0, Lang_CXX); + Decl *Imported1 = Import(From1, Lang_CXX); + Decl *ToTU = Imported0->getTranslationUnitDecl(); + + EXPECT_EQ(DeclCounter().match(ToTU, getPattern()), 2u); + auto *To0 = FirstDeclMatcher().match(ToTU, getPattern()); + auto *To1 = LastDeclMatcher().match(ToTU, getPattern()); + EXPECT_TRUE(Imported0 == To0); + EXPECT_TRUE(Imported1 == To1); + EXPECT_FALSE(To0->isThisDeclarationADefinition()); + EXPECT_FALSE(To1->isThisDeclarationADefinition()); + EXPECT_EQ(To1->getPreviousDecl(), To0); + if (auto *ToT0 = dyn_cast(To0)) { + auto *ToT1 = cast(To1); + ASSERT_TRUE(ToT0->getTemplatedDecl()); + ASSERT_TRUE(ToT1->getTemplatedDecl()); + EXPECT_EQ(ToT1->getTemplatedDecl()->getPreviousDecl(), + ToT0->getTemplatedDecl()); + } + // Extra check for specializations. + // FIXME Add this check to other tests too (possibly factor out into a + // function), when they start to pass. + if (auto *From0F = dyn_cast(From0)) { + auto *To0F = cast(To0); + if (From0F->getTemplatedKind() == + FunctionDecl::TK_FunctionTemplateSpecialization) { + auto *TemplateD = FirstDeclMatcher().match( + ToTU, functionTemplateDecl()); + auto *FirstSpecD = *(TemplateD->spec_begin()); + EXPECT_EQ(FirstSpecD->getCanonicalDecl(), To0F->getCanonicalDecl()); + } + } + } + + void TypedTest_ImportDefinitions() { + Decl *FromTU0 = getTuDecl(getDefinition(), Lang_CXX, "input0.cc"); + Decl *FromTU1 = getTuDecl(getDefinition(), Lang_CXX, "input1.cc"); + auto *From0 = FirstDeclMatcher().match(FromTU0, getPattern()); + auto *From1 = FirstDeclMatcher().match(FromTU1, getPattern()); + ASSERT_TRUE(From0->isThisDeclarationADefinition()); + ASSERT_TRUE(From1->isThisDeclarationADefinition()); + + Decl *Imported0 = Import(From0, Lang_CXX); + Decl *Imported1 = Import(From1, Lang_CXX); + Decl *ToTU = Imported0->getTranslationUnitDecl(); + + EXPECT_EQ(Imported0, Imported1); + EXPECT_EQ(DeclCounter().match(ToTU, getPattern()), 1u); + auto *To0 = FirstDeclMatcher().match(ToTU, getPattern()); + EXPECT_TRUE(Imported0 == To0); + EXPECT_TRUE(To0->isThisDeclarationADefinition()); + if (auto *ToT0 = dyn_cast(To0)) + EXPECT_TRUE(ToT0->getTemplatedDecl()); + } + + void TypedTest_ImportDefinitionThenPrototype() { + Decl *FromTUDef = getTuDecl(getDefinition(), Lang_CXX, "input0.cc"); + Decl *FromTUProto = getTuDecl(getPrototype(), Lang_CXX, "input1.cc"); + auto *FromDef = FirstDeclMatcher().match(FromTUDef, getPattern()); + auto *FromProto = + FirstDeclMatcher().match(FromTUProto, getPattern()); + ASSERT_TRUE(FromDef->isThisDeclarationADefinition()); + ASSERT_FALSE(FromProto->isThisDeclarationADefinition()); + + Decl *ImportedDef = Import(FromDef, Lang_CXX); + Decl *ImportedProto = Import(FromProto, Lang_CXX); + Decl *ToTU = ImportedDef->getTranslationUnitDecl(); + + EXPECT_NE(ImportedDef, ImportedProto); + EXPECT_EQ(DeclCounter().match(ToTU, getPattern()), 2u); + auto *ToDef = FirstDeclMatcher().match(ToTU, getPattern()); + auto *ToProto = LastDeclMatcher().match(ToTU, getPattern()); + EXPECT_TRUE(ImportedDef == ToDef); + EXPECT_TRUE(ImportedProto == ToProto); + EXPECT_TRUE(ToDef->isThisDeclarationADefinition()); + EXPECT_FALSE(ToProto->isThisDeclarationADefinition()); + EXPECT_EQ(ToProto->getPreviousDecl(), ToDef); + if (auto *ToDefT = dyn_cast(ToDef)) { + auto *ToProtoT = cast(ToProto); + ASSERT_TRUE(ToDefT->getTemplatedDecl()); + ASSERT_TRUE(ToProtoT->getTemplatedDecl()); + EXPECT_EQ(ToProtoT->getTemplatedDecl()->getPreviousDecl(), + ToDefT->getTemplatedDecl()); + } + } + + void TypedTest_ImportPrototypeThenDefinition() { + Decl *FromTUProto = getTuDecl(getPrototype(), Lang_CXX, "input0.cc"); + Decl *FromTUDef = getTuDecl(getDefinition(), Lang_CXX, "input1.cc"); + auto *FromProto = + FirstDeclMatcher().match(FromTUProto, getPattern()); + auto *FromDef = FirstDeclMatcher().match(FromTUDef, getPattern()); + ASSERT_TRUE(FromDef->isThisDeclarationADefinition()); + ASSERT_FALSE(FromProto->isThisDeclarationADefinition()); + + Decl *ImportedProto = Import(FromProto, Lang_CXX); + Decl *ImportedDef = Import(FromDef, Lang_CXX); + Decl *ToTU = ImportedDef->getTranslationUnitDecl(); + + EXPECT_NE(ImportedDef, ImportedProto); + EXPECT_EQ(DeclCounter().match(ToTU, getPattern()), 2u); + auto *ToProto = FirstDeclMatcher().match(ToTU, getPattern()); + auto *ToDef = LastDeclMatcher().match(ToTU, getPattern()); + EXPECT_TRUE(ImportedDef == ToDef); + EXPECT_TRUE(ImportedProto == ToProto); + EXPECT_TRUE(ToDef->isThisDeclarationADefinition()); + EXPECT_FALSE(ToProto->isThisDeclarationADefinition()); + EXPECT_EQ(ToDef->getPreviousDecl(), ToProto); + if (auto *ToDefT = dyn_cast(ToDef)) { + auto *ToProtoT = cast(ToProto); + ASSERT_TRUE(ToDefT->getTemplatedDecl()); + ASSERT_TRUE(ToProtoT->getTemplatedDecl()); + EXPECT_EQ(ToDefT->getTemplatedDecl()->getPreviousDecl(), + ToProtoT->getTemplatedDecl()); + } + } + + void TypedTest_WholeRedeclChainIsImportedAtOnce() { + Decl *FromTU = getTuDecl(getPrototype() + getDefinition(), Lang_CXX); + auto *FromD = // Definition + LastDeclMatcher().match(FromTU, getPattern()); + ASSERT_TRUE(FromD->isThisDeclarationADefinition()); + + Decl *ImportedD = Import(FromD, Lang_CXX); + Decl *ToTU = ImportedD->getTranslationUnitDecl(); + + // The whole redecl chain is imported at once. + EXPECT_EQ(DeclCounter().match(ToTU, getPattern()), 2u); + EXPECT_TRUE(cast(ImportedD)->isThisDeclarationADefinition()); + } -struct ImportFriendClasses : ASTImporterTestBase {}; + void TypedTest_ImportPrototypeThenProtoAndDefinition() { + { + Decl *FromTU = getTuDecl(getPrototype(), Lang_CXX, "input0.cc"); + auto *FromD = FirstDeclMatcher().match(FromTU, getPattern()); + Import(FromD, Lang_CXX); + } + { + Decl *FromTU = + getTuDecl(getPrototype() + getDefinition(), Lang_CXX, "input1.cc"); + auto *FromD = FirstDeclMatcher().match(FromTU, getPattern()); + Import(FromD, Lang_CXX); + } + + Decl *ToTU = ToAST->getASTContext().getTranslationUnitDecl(); + + ASSERT_EQ(DeclCounter().match(ToTU, getPattern()), 3u); + DeclTy *ProtoD = FirstDeclMatcher().match(ToTU, getPattern()); + EXPECT_FALSE(ProtoD->isThisDeclarationADefinition()); + + DeclTy *DefinitionD = LastDeclMatcher().match(ToTU, getPattern()); + EXPECT_TRUE(DefinitionD->isThisDeclarationADefinition()); + + EXPECT_TRUE(DefinitionD->getPreviousDecl()); + EXPECT_FALSE( + DefinitionD->getPreviousDecl()->isThisDeclarationADefinition()); + EXPECT_EQ(DefinitionD->getPreviousDecl()->getPreviousDecl(), ProtoD); + } +}; + +#define ASTIMPORTER_INSTANTIATE_TYPED_TEST_CASE(BaseTemplate, TypeParam, \ + NamePrefix, TestCase) \ + using BaseTemplate##TypeParam = BaseTemplate; \ + TEST_P(BaseTemplate##TypeParam, NamePrefix##TestCase) { \ + TypedTest_##TestCase(); \ + } + +ASTIMPORTER_INSTANTIATE_TYPED_TEST_CASE( + RedeclChain, Function, , + PrototypeShouldBeImportedAsAPrototypeWhenThereIsNoDefinition) +ASTIMPORTER_INSTANTIATE_TYPED_TEST_CASE( + RedeclChain, Class, , + PrototypeShouldBeImportedAsAPrototypeWhenThereIsNoDefinition) +ASTIMPORTER_INSTANTIATE_TYPED_TEST_CASE( + RedeclChain, Variable, , + PrototypeShouldBeImportedAsAPrototypeWhenThereIsNoDefinition) +// FIXME Enable this test, once we import function templates chains correctly. +ASTIMPORTER_INSTANTIATE_TYPED_TEST_CASE( + RedeclChain, FunctionTemplate, DISABLED_, + PrototypeShouldBeImportedAsAPrototypeWhenThereIsNoDefinition) +ASTIMPORTER_INSTANTIATE_TYPED_TEST_CASE( + RedeclChain, ClassTemplate, , + PrototypeShouldBeImportedAsAPrototypeWhenThereIsNoDefinition) +ASTIMPORTER_INSTANTIATE_TYPED_TEST_CASE( + RedeclChain, FunctionTemplateSpec, , + PrototypeShouldBeImportedAsAPrototypeWhenThereIsNoDefinition) + +ASTIMPORTER_INSTANTIATE_TYPED_TEST_CASE( + RedeclChain, Function, , DefinitionShouldBeImportedAsADefinition) +ASTIMPORTER_INSTANTIATE_TYPED_TEST_CASE( + RedeclChain, Class, , DefinitionShouldBeImportedAsADefinition) +ASTIMPORTER_INSTANTIATE_TYPED_TEST_CASE( + RedeclChain, Variable, , DefinitionShouldBeImportedAsADefinition) +// FIXME Enable this test, once we import function templates chains correctly. +ASTIMPORTER_INSTANTIATE_TYPED_TEST_CASE( + RedeclChain, FunctionTemplate, DISABLED_, + DefinitionShouldBeImportedAsADefinition) +ASTIMPORTER_INSTANTIATE_TYPED_TEST_CASE( + RedeclChain, ClassTemplate, , DefinitionShouldBeImportedAsADefinition) +ASTIMPORTER_INSTANTIATE_TYPED_TEST_CASE( + RedeclChain, FunctionTemplateSpec, , + DefinitionShouldBeImportedAsADefinition) + +ASTIMPORTER_INSTANTIATE_TYPED_TEST_CASE(RedeclChain, Function, , + ImportPrototypeAfterImportedPrototype) +ASTIMPORTER_INSTANTIATE_TYPED_TEST_CASE(RedeclChain, Class, , + ImportPrototypeAfterImportedPrototype) +ASTIMPORTER_INSTANTIATE_TYPED_TEST_CASE(RedeclChain, Variable, , + ImportPrototypeAfterImportedPrototype) +// FIXME Enable this test, once we import function templates chains correctly. +ASTIMPORTER_INSTANTIATE_TYPED_TEST_CASE(RedeclChain, FunctionTemplate, + DISABLED_, + ImportPrototypeAfterImportedPrototype) +ASTIMPORTER_INSTANTIATE_TYPED_TEST_CASE(RedeclChain, ClassTemplate, , + ImportPrototypeAfterImportedPrototype) +ASTIMPORTER_INSTANTIATE_TYPED_TEST_CASE(RedeclChain, FunctionTemplateSpec, , + ImportPrototypeAfterImportedPrototype) + +ASTIMPORTER_INSTANTIATE_TYPED_TEST_CASE(RedeclChain, Function, , + ImportDefinitionAfterImportedPrototype) +ASTIMPORTER_INSTANTIATE_TYPED_TEST_CASE(RedeclChain, Class, , + ImportDefinitionAfterImportedPrototype) +ASTIMPORTER_INSTANTIATE_TYPED_TEST_CASE(RedeclChain, Variable, , + ImportDefinitionAfterImportedPrototype) +// FIXME Enable this test, once we import function templates chains correctly. +ASTIMPORTER_INSTANTIATE_TYPED_TEST_CASE(RedeclChain, FunctionTemplate, + DISABLED_, + ImportDefinitionAfterImportedPrototype) +ASTIMPORTER_INSTANTIATE_TYPED_TEST_CASE(RedeclChain, ClassTemplate, , + ImportDefinitionAfterImportedPrototype) +ASTIMPORTER_INSTANTIATE_TYPED_TEST_CASE(RedeclChain, FunctionTemplateSpec, , + ImportDefinitionAfterImportedPrototype) + +ASTIMPORTER_INSTANTIATE_TYPED_TEST_CASE(RedeclChain, Function, , + ImportPrototypeAfterImportedDefinition) +ASTIMPORTER_INSTANTIATE_TYPED_TEST_CASE(RedeclChain, Class, , + ImportPrototypeAfterImportedDefinition) +ASTIMPORTER_INSTANTIATE_TYPED_TEST_CASE(RedeclChain, Variable, , + ImportPrototypeAfterImportedDefinition) +// FIXME Enable this test, once we import function templates chains correctly. +ASTIMPORTER_INSTANTIATE_TYPED_TEST_CASE(RedeclChain, FunctionTemplate, + DISABLED_, + ImportPrototypeAfterImportedDefinition) +ASTIMPORTER_INSTANTIATE_TYPED_TEST_CASE(RedeclChain, ClassTemplate, , + ImportPrototypeAfterImportedDefinition) +ASTIMPORTER_INSTANTIATE_TYPED_TEST_CASE(RedeclChain, FunctionTemplateSpec, , + ImportPrototypeAfterImportedDefinition) + +ASTIMPORTER_INSTANTIATE_TYPED_TEST_CASE(RedeclChain, Function, , + ImportPrototypes) +ASTIMPORTER_INSTANTIATE_TYPED_TEST_CASE(RedeclChain, Class, , ImportPrototypes) +ASTIMPORTER_INSTANTIATE_TYPED_TEST_CASE(RedeclChain, Variable, , + ImportPrototypes) +// FIXME Enable this test, once we import function templates chains correctly. +ASTIMPORTER_INSTANTIATE_TYPED_TEST_CASE(RedeclChain, FunctionTemplate, + DISABLED_, ImportPrototypes) +ASTIMPORTER_INSTANTIATE_TYPED_TEST_CASE(RedeclChain, ClassTemplate, , + ImportPrototypes) +// FIXME This does not pass, possible error with Spec import. +ASTIMPORTER_INSTANTIATE_TYPED_TEST_CASE(RedeclChain, FunctionTemplateSpec, + DISABLED_, ImportPrototypes) + +ASTIMPORTER_INSTANTIATE_TYPED_TEST_CASE(RedeclChain, Function, , + ImportDefinitions) +ASTIMPORTER_INSTANTIATE_TYPED_TEST_CASE(RedeclChain, Class, , + ImportDefinitions) +ASTIMPORTER_INSTANTIATE_TYPED_TEST_CASE(RedeclChain, Variable, , + ImportDefinitions) +// FIXME Enable this test, once we import function templates chains correctly. +ASTIMPORTER_INSTANTIATE_TYPED_TEST_CASE(RedeclChain, FunctionTemplate, + DISABLED_, ImportDefinitions) +ASTIMPORTER_INSTANTIATE_TYPED_TEST_CASE(RedeclChain, ClassTemplate, , + ImportDefinitions) +// FIXME This does not pass, possible error with Spec import. +ASTIMPORTER_INSTANTIATE_TYPED_TEST_CASE(RedeclChain, FunctionTemplateSpec, + DISABLED_, ImportDefinitions) + +ASTIMPORTER_INSTANTIATE_TYPED_TEST_CASE(RedeclChain, Function, , + ImportDefinitionThenPrototype) +ASTIMPORTER_INSTANTIATE_TYPED_TEST_CASE(RedeclChain, Class, , + ImportDefinitionThenPrototype) +ASTIMPORTER_INSTANTIATE_TYPED_TEST_CASE(RedeclChain, Variable, , + ImportDefinitionThenPrototype) +// FIXME Enable this test, once we import function templates chains correctly. +ASTIMPORTER_INSTANTIATE_TYPED_TEST_CASE(RedeclChain, FunctionTemplate, + DISABLED_, + ImportDefinitionThenPrototype) +ASTIMPORTER_INSTANTIATE_TYPED_TEST_CASE(RedeclChain, ClassTemplate, , + ImportDefinitionThenPrototype) +// FIXME This does not pass, possible error with Spec import. +ASTIMPORTER_INSTANTIATE_TYPED_TEST_CASE(RedeclChain, FunctionTemplateSpec, + DISABLED_, + ImportDefinitionThenPrototype) + +ASTIMPORTER_INSTANTIATE_TYPED_TEST_CASE(RedeclChain, Function, , + ImportPrototypeThenDefinition) +ASTIMPORTER_INSTANTIATE_TYPED_TEST_CASE(RedeclChain, Class, , + ImportPrototypeThenDefinition) +ASTIMPORTER_INSTANTIATE_TYPED_TEST_CASE(RedeclChain, Variable, , + ImportPrototypeThenDefinition) +// FIXME Enable this test, once we import function templates chains correctly. +ASTIMPORTER_INSTANTIATE_TYPED_TEST_CASE(RedeclChain, FunctionTemplate, + DISABLED_, + ImportPrototypeThenDefinition) +ASTIMPORTER_INSTANTIATE_TYPED_TEST_CASE(RedeclChain, ClassTemplate, , + ImportPrototypeThenDefinition) +// FIXME This does not pass, possible error with Spec import. +ASTIMPORTER_INSTANTIATE_TYPED_TEST_CASE(RedeclChain, FunctionTemplateSpec, + DISABLED_, + ImportPrototypeThenDefinition) + +ASTIMPORTER_INSTANTIATE_TYPED_TEST_CASE(RedeclChain, Function, , + WholeRedeclChainIsImportedAtOnce) +ASTIMPORTER_INSTANTIATE_TYPED_TEST_CASE(RedeclChain, Variable, , + WholeRedeclChainIsImportedAtOnce) +// FIXME Enable this test, once we import function templates chains correctly. +ASTIMPORTER_INSTANTIATE_TYPED_TEST_CASE(RedeclChain, FunctionTemplate, + DISABLED_, + WholeRedeclChainIsImportedAtOnce) +ASTIMPORTER_INSTANTIATE_TYPED_TEST_CASE(RedeclChain, FunctionTemplateSpec, , + WholeRedeclChainIsImportedAtOnce) + +ASTIMPORTER_INSTANTIATE_TYPED_TEST_CASE(RedeclChain, Function, , + ImportPrototypeThenProtoAndDefinition) +ASTIMPORTER_INSTANTIATE_TYPED_TEST_CASE(RedeclChain, Variable, , + ImportPrototypeThenProtoAndDefinition) +// FIXME Enable this test, once we import function templates chains correctly. +ASTIMPORTER_INSTANTIATE_TYPED_TEST_CASE(RedeclChain, FunctionTemplate, + DISABLED_, + ImportPrototypeThenProtoAndDefinition) +// FIXME This does not pass, possible error with Spec import. +ASTIMPORTER_INSTANTIATE_TYPED_TEST_CASE(RedeclChain, FunctionTemplateSpec, + DISABLED_, + ImportPrototypeThenProtoAndDefinition) + +INSTANTIATE_TEST_CASE_P(ParameterizedTests, RedeclChainFunction, + DefaultTestValuesForRunOptions, ); +INSTANTIATE_TEST_CASE_P(ParameterizedTests, RedeclChainClass, + DefaultTestValuesForRunOptions, ); +INSTANTIATE_TEST_CASE_P(ParameterizedTests, RedeclChainVariable, + DefaultTestValuesForRunOptions, ); +INSTANTIATE_TEST_CASE_P(ParameterizedTests, RedeclChainFunctionTemplate, + DefaultTestValuesForRunOptions, ); +INSTANTIATE_TEST_CASE_P(ParameterizedTests, RedeclChainClassTemplate, + DefaultTestValuesForRunOptions, ); +INSTANTIATE_TEST_CASE_P(ParameterizedTests, RedeclChainFunctionTemplateSpec, + DefaultTestValuesForRunOptions, ); + + + +struct ImportFriendClasses : ASTImporterOptionSpecificTestBase {}; TEST_P(ImportFriendClasses, ImportOfFriendRecordDoesNotMergeDefinition) { Decl *FromTU = getTuDecl( @@ -4166,7 +4611,7 @@ TEST_P(ImportFriendClasses, ImportOfClassDefinitionAndFwdFriendShouldBeLinked) { EXPECT_EQ(ImportedFwd, ImportedDef->getPreviousDecl()); } -TEST_P(ASTImporterTestBase, FriendFunInClassTemplate) { +TEST_P(ASTImporterOptionSpecificTestBase, FriendFunInClassTemplate) { auto *Code = R"( template struct X { @@ -4184,7 +4629,7 @@ TEST_P(ASTImporterTestBase, FriendFunInClassTemplate) { EXPECT_EQ(ImportedFoo, ToFoo); } -struct DeclContextTest : ASTImporterTestBase {}; +struct DeclContextTest : ASTImporterOptionSpecificTestBase {}; TEST_P(DeclContextTest, removeDeclOfClassTemplateSpecialization) { Decl *TU = getTuDecl( @@ -4247,7 +4692,8 @@ TEST_P(DeclContextTest, EXPECT_FALSE(DC->containsDecl(A0)); } -struct ImportFunctionTemplateSpecializations : ASTImporterTestBase {}; +struct ImportFunctionTemplateSpecializations + : ASTImporterOptionSpecificTestBase {}; TEST_P(ImportFunctionTemplateSpecializations, TUshouldNotContainFunctionTemplateImplicitInstantiation) { @@ -4384,185 +4830,7 @@ TEST_P(ImportFunctionTemplateSpecializations, DeclCounter().match(ToTU, functionDecl(hasName("f")))); } -TEST_P(ImportFunctionTemplateSpecializations, - ImportPrototypes) { - auto Pattern = functionDecl(hasName("f"), isExplicitTemplateSpecialization()); - auto Code = - R"( - // Proto of the primary template. - template - void f(); - // Proto of the specialization. - template <> - void f(); - )"; - - Decl *ImportedD; - { - Decl *FromTU = getTuDecl(Code, Lang_CXX, "input0.cc"); - auto *FromD = LastDeclMatcher().match(FromTU, Pattern); - - ImportedD = Import(FromD, Lang_CXX); - } - { - Decl *FromTU = getTuDecl(Code, Lang_CXX, "input1.cc"); - auto *FromD = LastDeclMatcher().match(FromTU, Pattern); - Import(FromD, Lang_CXX); - } - - Decl *ToTU = ImportedD->getTranslationUnitDecl(); - - EXPECT_EQ(DeclCounter().match(ToTU, Pattern), 2u); - auto *To0 = FirstDeclMatcher().match(ToTU, Pattern); - auto *To1 = LastDeclMatcher().match(ToTU, Pattern); - EXPECT_TRUE(ImportedD == To0); - EXPECT_TRUE(ImportedD != To1); - EXPECT_FALSE(To0->doesThisDeclarationHaveABody()); - EXPECT_FALSE(To1->doesThisDeclarationHaveABody()); - // Check that they are part of the same redecl chain. - EXPECT_EQ(To1->getCanonicalDecl(), To0->getCanonicalDecl()); -} - -TEST_P(ImportFunctionTemplateSpecializations, ImportDefinitions) { - auto Pattern = functionDecl(hasName("f"), isExplicitTemplateSpecialization()); - auto Code = - R"( - // Proto of the primary template. - template - void f(); - // Specialization and definition. - template <> - void f() {} - )"; - - Decl *ImportedD; - { - Decl *FromTU = getTuDecl(Code, Lang_CXX, "input0.cc"); - auto *FromD = FirstDeclMatcher().match(FromTU, Pattern); - ImportedD = Import(FromD, Lang_CXX); - } - { - Decl *FromTU = getTuDecl(Code, Lang_CXX, "input1.cc"); - auto *FromD = FirstDeclMatcher().match(FromTU, Pattern); - Import(FromD, Lang_CXX); - } - - Decl *ToTU = ImportedD->getTranslationUnitDecl(); - - EXPECT_EQ(DeclCounter().match(ToTU, Pattern), 1u); - auto *To0 = FirstDeclMatcher().match(ToTU, Pattern); - EXPECT_TRUE(ImportedD == To0); - EXPECT_TRUE(To0->doesThisDeclarationHaveABody()); - - auto *TemplateD = FirstDeclMatcher().match( - ToTU, functionTemplateDecl()); - auto *FirstSpecD = *(TemplateD->spec_begin()); - EXPECT_EQ(FirstSpecD->getCanonicalDecl(), To0->getCanonicalDecl()); -} - -TEST_P(ImportFunctionTemplateSpecializations, PrototypeThenPrototype) { - auto Pattern = functionDecl(hasName("f"), isExplicitTemplateSpecialization()); - auto Code = - R"( - // Proto of the primary template. - template - void f(); - // Specialization proto. - template <> - void f(); - // Specialization proto. - template <> - void f(); - )"; - - Decl *ImportedD; - { - Decl *FromTU = getTuDecl(Code, Lang_CXX, "input0.cc"); - auto *FromD = FirstDeclMatcher().match(FromTU, Pattern); - ImportedD = Import(FromD, Lang_CXX); - } - - Decl *ToTU = ImportedD->getTranslationUnitDecl(); - - EXPECT_EQ(DeclCounter().match(ToTU, Pattern), 2u); - auto *To0 = FirstDeclMatcher().match(ToTU, Pattern); - auto *To1 = LastDeclMatcher().match(ToTU, Pattern); - EXPECT_TRUE(ImportedD == To0); - EXPECT_TRUE(ImportedD != To1); - EXPECT_FALSE(To0->doesThisDeclarationHaveABody()); - EXPECT_FALSE(To1->doesThisDeclarationHaveABody()); - EXPECT_EQ(To1->getPreviousDecl(), To0); -} - -TEST_P(ImportFunctionTemplateSpecializations, PrototypeThenDefinition) { - auto Pattern = functionDecl(hasName("f"), isExplicitTemplateSpecialization()); - auto Code = - R"( - // Proto of the primary template. - template - void f(); - // Specialization proto. - template <> - void f(); - // Specialization definition. - template <> - void f() {} - )"; - - Decl *ImportedD; - { - Decl *FromTU = getTuDecl(Code, Lang_CXX, "input0.cc"); - auto *FromD = FirstDeclMatcher().match(FromTU, Pattern); - ImportedD = Import(FromD, Lang_CXX); - } - - Decl *ToTU = ImportedD->getTranslationUnitDecl(); - - EXPECT_EQ(DeclCounter().match(ToTU, Pattern), 2u); - auto *To0 = FirstDeclMatcher().match(ToTU, Pattern); - auto *To1 = LastDeclMatcher().match(ToTU, Pattern); - EXPECT_TRUE(ImportedD == To0); - EXPECT_TRUE(ImportedD != To1); - EXPECT_FALSE(To0->doesThisDeclarationHaveABody()); - EXPECT_TRUE(To1->doesThisDeclarationHaveABody()); - EXPECT_EQ(To1->getPreviousDecl(), To0); -} - -TEST_P(ImportFunctionTemplateSpecializations, DefinitionThenPrototype) { - auto Pattern = functionDecl(hasName("f"), isExplicitTemplateSpecialization()); - auto Code = - R"( - // Proto of the primary template. - template - void f(); - // Specialization definition. - template <> - void f() {} - // Specialization proto. - template <> - void f(); - )"; - - Decl *ImportedD; - { - Decl *FromTU = getTuDecl(Code, Lang_CXX, "input0.cc"); - auto *FromD = FirstDeclMatcher().match(FromTU, Pattern); - ImportedD = Import(FromD, Lang_CXX); - } - - Decl *ToTU = ImportedD->getTranslationUnitDecl(); - - EXPECT_EQ(DeclCounter().match(ToTU, Pattern), 2u); - auto *To0 = FirstDeclMatcher().match(ToTU, Pattern); - auto *To1 = LastDeclMatcher().match(ToTU, Pattern); - EXPECT_TRUE(ImportedD == To0); - EXPECT_TRUE(ImportedD != To1); - EXPECT_TRUE(To0->doesThisDeclarationHaveABody()); - EXPECT_FALSE(To1->doesThisDeclarationHaveABody()); - EXPECT_EQ(To1->getPreviousDecl(), To0); -} - -TEST_P(ASTImporterTestBase, +TEST_P(ASTImporterOptionSpecificTestBase, ImportShouldNotReportFalseODRErrorWhenRecordIsBeingDefined) { { Decl *FromTU = getTuDecl( @@ -4601,7 +4869,8 @@ TEST_P(ASTImporterTestBase, } } -TEST_P(ASTImporterTestBase, ImportingTypedefShouldImportTheCompleteType) { +TEST_P(ASTImporterOptionSpecificTestBase, + ImportingTypedefShouldImportTheCompleteType) { // We already have an incomplete underlying type in the "To" context. auto Code = R"( @@ -4633,7 +4902,7 @@ TEST_P(ASTImporterTestBase, ImportingTypedefShouldImportTheCompleteType) { EXPECT_FALSE(ImportedD->getUnderlyingType()->isIncompleteType()); } -struct ASTImporterLookupTableTest : ASTImporterTestBase {}; +struct ASTImporterLookupTableTest : ASTImporterOptionSpecificTestBase {}; TEST_P(ASTImporterLookupTableTest, OneDecl) { auto *ToTU = getToTuDecl("int a;", Lang_CXX); @@ -4779,6 +5048,66 @@ TEST_P(ASTImporterLookupTableTest, LookupFindsOverloadedNames) { EXPECT_EQ(Res.count(F2), 1u); } +TEST_P(ASTImporterLookupTableTest, + DifferentOperatorsShouldHaveDifferentResultSet) { + TranslationUnitDecl *ToTU = getToTuDecl( + R"( + struct X{}; + void operator+(X, X); + void operator-(X, X); + )", + Lang_CXX); + + ASTImporterLookupTable LT(*ToTU); + auto *FPlus = FirstDeclMatcher().match( + ToTU, functionDecl(hasOverloadedOperatorName("+"))); + auto *FMinus = FirstDeclMatcher().match( + ToTU, functionDecl(hasOverloadedOperatorName("-"))); + DeclarationName NamePlus = FPlus->getDeclName(); + auto ResPlus = LT.lookup(ToTU, NamePlus); + EXPECT_EQ(ResPlus.size(), 1u); + EXPECT_EQ(ResPlus.count(FPlus), 1u); + EXPECT_EQ(ResPlus.count(FMinus), 0u); + DeclarationName NameMinus = FMinus->getDeclName(); + auto ResMinus = LT.lookup(ToTU, NameMinus); + EXPECT_EQ(ResMinus.size(), 1u); + EXPECT_EQ(ResMinus.count(FMinus), 1u); + EXPECT_EQ(ResMinus.count(FPlus), 0u); + EXPECT_NE(*ResMinus.begin(), *ResPlus.begin()); +} + +TEST_P(ASTImporterLookupTableTest, LookupDeclNamesFromDifferentTUs) { + TranslationUnitDecl *ToTU = getToTuDecl( + R"( + struct X {}; + void operator+(X, X); + )", + Lang_CXX); + auto *ToPlus = FirstDeclMatcher().match( + ToTU, functionDecl(hasOverloadedOperatorName("+"))); + + Decl *FromTU = getTuDecl( + R"( + struct X {}; + void operator+(X, X); + )", + Lang_CXX); + auto *FromPlus = FirstDeclMatcher().match( + FromTU, functionDecl(hasOverloadedOperatorName("+"))); + + // FromPlus have a different TU, thus its DeclarationName is different too. + ASSERT_NE(ToPlus->getDeclName(), FromPlus->getDeclName()); + + ASTImporterLookupTable LT(*ToTU); + auto Res = LT.lookup(ToTU, ToPlus->getDeclName()); + ASSERT_EQ(Res.size(), 1u); + EXPECT_EQ(*Res.begin(), ToPlus); + + // FromPlus have a different TU, thus its DeclarationName is different too. + Res = LT.lookup(ToTU, FromPlus->getDeclName()); + ASSERT_EQ(Res.size(), 0u); +} + static const RecordDecl * getRecordDeclOfFriend(FriendDecl *FD) { QualType Ty = FD->getFriendType()->getType(); QualType NamedTy = cast(Ty)->getNamedType(); @@ -5050,11 +5379,73 @@ INSTANTIATE_TEST_CASE_P( ParameterizedTests, CanonicalRedeclChain, ::testing::Values(ArgVector()),); -auto DefaultTestValuesForRunOptions = ::testing::Values( - ArgVector(), - ArgVector{"-fdelayed-template-parsing"}, - ArgVector{"-fms-compatibility"}, - ArgVector{"-fdelayed-template-parsing", "-fms-compatibility"}); +// FIXME This test is disabled currently, upcoming patches will make it +// possible to enable. +TEST_P(ASTImporterOptionSpecificTestBase, + DISABLED_RedeclChainShouldBeCorrectAmongstNamespaces) { + Decl *FromTU = getTuDecl( + R"( + namespace NS { + struct X; + struct Y { + static const int I = 3; + }; + } + namespace NS { + struct X { // <--- To be imported + void method(int i = Y::I) {} + int f; + }; + } + )", + Lang_CXX); + auto *FromFwd = FirstDeclMatcher().match( + FromTU, cxxRecordDecl(hasName("X"), unless(isImplicit()))); + auto *FromDef = LastDeclMatcher().match( + FromTU, + cxxRecordDecl(hasName("X"), isDefinition(), unless(isImplicit()))); + ASSERT_NE(FromFwd, FromDef); + ASSERT_FALSE(FromFwd->isThisDeclarationADefinition()); + ASSERT_TRUE(FromDef->isThisDeclarationADefinition()); + ASSERT_EQ(FromFwd->getCanonicalDecl(), FromDef->getCanonicalDecl()); + + auto *ToDef = cast_or_null(Import(FromDef, Lang_CXX)); + auto *ToFwd = cast_or_null(Import(FromFwd, Lang_CXX)); + EXPECT_NE(ToFwd, ToDef); + EXPECT_FALSE(ToFwd->isThisDeclarationADefinition()); + EXPECT_TRUE(ToDef->isThisDeclarationADefinition()); + EXPECT_EQ(ToFwd->getCanonicalDecl(), ToDef->getCanonicalDecl()); + auto *ToTU = ToAST->getASTContext().getTranslationUnitDecl(); + // We expect no (ODR) warning during the import. + EXPECT_EQ(0u, ToTU->getASTContext().getDiagnostics().getNumWarnings()); +} + +struct ImportFriendFunctionTemplates : ASTImporterOptionSpecificTestBase {}; + +TEST_P(ImportFriendFunctionTemplates, LookupShouldFindPreviousFriend) { + Decl *ToTU = getToTuDecl( + R"( + class X { + template friend void foo(); + }; + )", + Lang_CXX); + auto *Friend = FirstDeclMatcher().match( + ToTU, functionTemplateDecl(hasName("foo"))); + + Decl *FromTU = getTuDecl( + R"( + template void foo(); + )", + Lang_CXX); + auto *FromFoo = FirstDeclMatcher().match( + FromTU, functionTemplateDecl(hasName("foo"))); + auto *Imported = Import(FromFoo, Lang_CXX); + + // FIXME Currently chains of FunctionTemplateDecls are not implemented. + //EXPECT_EQ(Imported->getPreviousDecl(), Friend); + EXPECT_EQ(Imported, Friend); +} INSTANTIATE_TEST_CASE_P(ParameterizedTests, ASTImporterLookupTableTest, DefaultTestValuesForRunOptions, ); @@ -5068,19 +5459,19 @@ INSTANTIATE_TEST_CASE_P(ParameterizedTests, ImportType, INSTANTIATE_TEST_CASE_P(ParameterizedTests, ImportDecl, DefaultTestValuesForRunOptions, ); -INSTANTIATE_TEST_CASE_P(ParameterizedTests, ASTImporterTestBase, +INSTANTIATE_TEST_CASE_P(ParameterizedTests, ASTImporterOptionSpecificTestBase, DefaultTestValuesForRunOptions, ); INSTANTIATE_TEST_CASE_P(ParameterizedTests, ImportFunctions, DefaultTestValuesForRunOptions, ); -INSTANTIATE_TEST_CASE_P(ParameterizedTests, ImportClasses, +INSTANTIATE_TEST_CASE_P(ParameterizedTests, ImportFriendFunctionTemplates, DefaultTestValuesForRunOptions, ); -INSTANTIATE_TEST_CASE_P(ParameterizedTests, ImportFriendFunctions, +INSTANTIATE_TEST_CASE_P(ParameterizedTests, ImportClasses, DefaultTestValuesForRunOptions, ); -INSTANTIATE_TEST_CASE_P(ParameterizedTests, ImportClassTemplates, +INSTANTIATE_TEST_CASE_P(ParameterizedTests, ImportFriendFunctions, DefaultTestValuesForRunOptions, ); INSTANTIATE_TEST_CASE_P(ParameterizedTests, ImportFriendClasses, diff --git a/clang/unittests/AST/StructuralEquivalenceTest.cpp b/clang/unittests/AST/StructuralEquivalenceTest.cpp index ae62747284108..211b9539cf7d4 100644 --- a/clang/unittests/AST/StructuralEquivalenceTest.cpp +++ b/clang/unittests/AST/StructuralEquivalenceTest.cpp @@ -230,6 +230,33 @@ TEST_F(StructuralEquivalenceFunctionTest, TemplateVsNonTemplate) { EXPECT_FALSE(testStructuralMatch(t)); } +TEST_F(StructuralEquivalenceFunctionTest, DifferentOperators) { + auto t = makeDecls( + "struct X{}; bool operator<(X, X);", + "struct X{}; bool operator==(X, X);", Lang_CXX, + functionDecl(hasOverloadedOperatorName("<")), + functionDecl(hasOverloadedOperatorName("=="))); + EXPECT_FALSE(testStructuralMatch(t)); +} + +TEST_F(StructuralEquivalenceFunctionTest, SameOperators) { + auto t = makeDecls( + "struct X{}; bool operator<(X, X);", + "struct X{}; bool operator<(X, X);", Lang_CXX, + functionDecl(hasOverloadedOperatorName("<")), + functionDecl(hasOverloadedOperatorName("<"))); + EXPECT_TRUE(testStructuralMatch(t)); +} + +TEST_F(StructuralEquivalenceFunctionTest, CtorVsDtor) { + auto t = makeDecls( + "struct X{ X(); };", + "struct X{ ~X(); };", Lang_CXX, + cxxConstructorDecl(), + cxxDestructorDecl()); + EXPECT_FALSE(testStructuralMatch(t)); +} + TEST_F(StructuralEquivalenceFunctionTest, ParamConstWithRef) { auto t = makeNamedDecls("void foo(int&);", "void foo(const int&);", Lang_CXX); diff --git a/clang/unittests/ASTMatchers/ASTMatchersNodeTest.cpp b/clang/unittests/ASTMatchers/ASTMatchersNodeTest.cpp index fd5b112fae9eb..3f9981cd6db5c 100644 --- a/clang/unittests/ASTMatchers/ASTMatchersNodeTest.cpp +++ b/clang/unittests/ASTMatchers/ASTMatchersNodeTest.cpp @@ -754,6 +754,11 @@ TEST(Matcher, NullPtrLiteral) { EXPECT_TRUE(matches("int* i = nullptr;", cxxNullPtrLiteralExpr())); } +TEST(Matcher, ChooseExpr) { + EXPECT_TRUE(matchesC("void f() { (void)__builtin_choose_expr(1, 2, 3); }", + chooseExpr())); +} + TEST(Matcher, GNUNullExpr) { EXPECT_TRUE(matches("int* i = __null;", gnuNullExpr())); } diff --git a/clang/unittests/ASTMatchers/ASTMatchersTraversalTest.cpp b/clang/unittests/ASTMatchers/ASTMatchersTraversalTest.cpp index 806603dff44ce..bdd476091afd7 100644 --- a/clang/unittests/ASTMatchers/ASTMatchersTraversalTest.cpp +++ b/clang/unittests/ASTMatchers/ASTMatchersTraversalTest.cpp @@ -469,6 +469,98 @@ TEST(Matcher, isInstanceMessage) { } +TEST(MatcherCXXMemberCallExpr, On) { + auto Snippet1 = R"cc( + struct Y { + void m(); + }; + void z(Y y) { y.m(); } + )cc"; + auto Snippet2 = R"cc( + struct Y { + void m(); + }; + struct X : public Y {}; + void z(X x) { x.m(); } + )cc"; + auto MatchesY = cxxMemberCallExpr(on(hasType(cxxRecordDecl(hasName("Y"))))); + EXPECT_TRUE(matches(Snippet1, MatchesY)); + EXPECT_TRUE(notMatches(Snippet2, MatchesY)); + + auto MatchesX = cxxMemberCallExpr(on(hasType(cxxRecordDecl(hasName("X"))))); + EXPECT_TRUE(matches(Snippet2, MatchesX)); + + // Parens are ignored. + auto Snippet3 = R"cc( + struct Y { + void m(); + }; + Y g(); + void z(Y y) { (g()).m(); } + )cc"; + auto MatchesCall = cxxMemberCallExpr(on(callExpr())); + EXPECT_TRUE(matches(Snippet3, MatchesCall)); +} + +TEST(MatcherCXXMemberCallExpr, OnImplicitObjectArgument) { + auto Snippet1 = R"cc( + struct Y { + void m(); + }; + void z(Y y) { y.m(); } + )cc"; + auto Snippet2 = R"cc( + struct Y { + void m(); + }; + struct X : public Y {}; + void z(X x) { x.m(); } + )cc"; + auto MatchesY = cxxMemberCallExpr( + onImplicitObjectArgument(hasType(cxxRecordDecl(hasName("Y"))))); + EXPECT_TRUE(matches(Snippet1, MatchesY)); + EXPECT_TRUE(matches(Snippet2, MatchesY)); + + auto MatchesX = cxxMemberCallExpr( + onImplicitObjectArgument(hasType(cxxRecordDecl(hasName("X"))))); + EXPECT_TRUE(notMatches(Snippet2, MatchesX)); + + // Parens are not ignored. + auto Snippet3 = R"cc( + struct Y { + void m(); + }; + Y g(); + void z(Y y) { (g()).m(); } + )cc"; + auto MatchesCall = cxxMemberCallExpr(onImplicitObjectArgument(callExpr())); + EXPECT_TRUE(notMatches(Snippet3, MatchesCall)); +} + +TEST(Matcher, HasObjectExpr) { + auto Snippet1 = R"cc( + struct X { + int m; + int f(X x) { return x.m; } + }; + )cc"; + auto Snippet2 = R"cc( + struct X { + int m; + int f(X x) { return m; } + }; + )cc"; + auto MatchesX = + memberExpr(hasObjectExpression(hasType(cxxRecordDecl(hasName("X"))))); + EXPECT_TRUE(matches(Snippet1, MatchesX)); + EXPECT_TRUE(notMatches(Snippet2, MatchesX)); + + auto MatchesXPointer = memberExpr( + hasObjectExpression(hasType(pointsTo(cxxRecordDecl(hasName("X")))))); + EXPECT_TRUE(notMatches(Snippet1, MatchesXPointer)); + EXPECT_TRUE(matches(Snippet2, MatchesXPointer)); +} + TEST(ForEachArgumentWithParam, ReportsNoFalsePositives) { StatementMatcher ArgumentY = declRefExpr(to(varDecl(hasName("y")))).bind("arg"); diff --git a/clang/unittests/Basic/FileManagerTest.cpp b/clang/unittests/Basic/FileManagerTest.cpp index 9f051976ca0de..c9dfbd6b5c647 100644 --- a/clang/unittests/Basic/FileManagerTest.cpp +++ b/clang/unittests/Basic/FileManagerTest.cpp @@ -26,7 +26,7 @@ class FakeStatCache : public FileSystemStatCache { private: // Maps a file/directory path to its desired stat result. Anything // not in this map is considered to not exist in the file system. - llvm::StringMap StatCalls; + llvm::StringMap StatCalls; void InjectFileOrDirectory(const char *Path, ino_t INode, bool IsFile) { #ifndef _WIN32 @@ -35,15 +35,14 @@ class FakeStatCache : public FileSystemStatCache { Path = NormalizedPath.c_str(); #endif - FileData Data; - Data.Name = Path; - Data.Size = 0; - Data.ModTime = 0; - Data.UniqueID = llvm::sys::fs::UniqueID(1, INode); - Data.IsDirectory = !IsFile; - Data.IsNamedPipe = false; - Data.InPCH = false; - StatCalls[Path] = Data; + auto fileType = IsFile ? + llvm::sys::fs::file_type::regular_file : + llvm::sys::fs::file_type::directory_file; + llvm::vfs::Status Status(Path, llvm::sys::fs::UniqueID(1, INode), + /*MTime*/{}, /*User*/0, /*Group*/0, + /*Size*/0, fileType, + llvm::sys::fs::perms::all_all); + StatCalls[Path] = Status; } public: @@ -58,7 +57,7 @@ class FakeStatCache : public FileSystemStatCache { } // Implement FileSystemStatCache::getStat(). - LookupResult getStat(StringRef Path, FileData &Data, bool isFile, + LookupResult getStat(StringRef Path, llvm::vfs::Status &Status, bool isFile, std::unique_ptr *F, llvm::vfs::FileSystem &FS) override { #ifndef _WIN32 @@ -68,7 +67,7 @@ class FakeStatCache : public FileSystemStatCache { #endif if (StatCalls.count(Path) != 0) { - Data = StatCalls[Path]; + Status = StatCalls[Path]; return CacheExists; } @@ -346,4 +345,37 @@ TEST_F(FileManagerTest, getVirtualFileFillsRealPathName) { EXPECT_EQ(file->tryGetRealPathName(), ExpectedResult); } +TEST_F(FileManagerTest, getFileDontOpenRealPath) { + SmallString<64> CustomWorkingDir; +#ifdef _WIN32 + CustomWorkingDir = "C:/"; +#else + CustomWorkingDir = "/"; +#endif + + auto FS = IntrusiveRefCntPtr( + new llvm::vfs::InMemoryFileSystem); + // setCurrentworkingdirectory must finish without error. + ASSERT_TRUE(!FS->setCurrentWorkingDirectory(CustomWorkingDir)); + + FileSystemOptions Opts; + FileManager Manager(Opts, FS); + + // Inject fake files into the file system. + auto statCache = llvm::make_unique(); + statCache->InjectDirectory("/tmp", 42); + statCache->InjectFile("/tmp/test", 43); + + Manager.setStatCache(std::move(statCache)); + + // Check for real path. + const FileEntry *file = Manager.getFile("/tmp/test", /*OpenFile=*/false); + ASSERT_TRUE(file != nullptr); + ASSERT_TRUE(file->isValid()); + SmallString<64> ExpectedResult = CustomWorkingDir; + + llvm::sys::path::append(ExpectedResult, "tmp", "test"); + EXPECT_EQ(file->tryGetRealPathName(), ExpectedResult); +} + } // anonymous namespace diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp index 2b0ef9a9dd56a..650636b763396 100644 --- a/clang/unittests/Format/FormatTest.cpp +++ b/clang/unittests/Format/FormatTest.cpp @@ -120,6 +120,15 @@ TEST_F(FormatTest, MessUp) { EXPECT_EQ("a\n#b c d\ne", test::messUp("a\n#b\\\nc\\\nd\ne")); } +TEST_F(FormatTest, DefaultLLVMStyleIsCpp) { + EXPECT_EQ(FormatStyle::LK_Cpp, getLLVMStyle().Language); +} + +TEST_F(FormatTest, LLVMStyleOverride) { + EXPECT_EQ(FormatStyle::LK_Proto, + getLLVMStyle(FormatStyle::LK_Proto).Language); +} + //===----------------------------------------------------------------------===// // Basic function tests. //===----------------------------------------------------------------------===// @@ -8751,6 +8760,9 @@ TEST_F(FormatTest, ConfigurableUseOfTab) { "\t\t parameter2); \\\n" "\t}", Tab); + verifyFormat("int a;\t // x\n" + "int bbbbbbbb; // x\n", + Tab); Tab.TabWidth = 4; Tab.IndentWidth = 8; @@ -9235,6 +9247,7 @@ TEST_F(FormatTest, ConfigurableSpaceBeforeParens) { verifyFormat("typedef void (*cb)(int);", NoSpace); verifyFormat("T A::operator()();", NoSpace); verifyFormat("X A::operator++(T);", NoSpace); + verifyFormat("auto lambda = []() { return 0; };", NoSpace); FormatStyle Space = getLLVMStyle(); Space.SpaceBeforeParens = FormatStyle::SBPO_Always; @@ -9282,6 +9295,7 @@ TEST_F(FormatTest, ConfigurableSpaceBeforeParens) { verifyFormat("typedef void (*cb) (int);", Space); verifyFormat("T A::operator() ();", Space); verifyFormat("X A::operator++ (T);", Space); + verifyFormat("auto lambda = [] () { return 0; };", Space); } TEST_F(FormatTest, ConfigurableSpacesInParentheses) { @@ -11832,6 +11846,111 @@ TEST_F(FormatTest, FormatsLambdas) { verifyGoogleFormat("auto a = [&b, c](D* d) -> D& {};"); verifyGoogleFormat("auto a = [&b, c](D* d) -> const D* {};"); verifyFormat("[a, a]() -> a<1> {};"); + verifyFormat("[]() -> foo<5 + 2> { return {}; };"); + verifyFormat("[]() -> foo<5 - 2> { return {}; };"); + verifyFormat("[]() -> foo<5 / 2> { return {}; };"); + verifyFormat("[]() -> foo<5 * 2> { return {}; };"); + verifyFormat("[]() -> foo<5 % 2> { return {}; };"); + verifyFormat("[]() -> foo<5 << 2> { return {}; };"); + verifyFormat("[]() -> foo { return {}; };"); + verifyFormat("[]() -> foo<~5> { return {}; };"); + verifyFormat("[]() -> foo<5 | 2> { return {}; };"); + verifyFormat("[]() -> foo<5 || 2> { return {}; };"); + verifyFormat("[]() -> foo<5 & 2> { return {}; };"); + verifyFormat("[]() -> foo<5 && 2> { return {}; };"); + verifyFormat("[]() -> foo<5 == 2> { return {}; };"); + verifyFormat("[]() -> foo<5 != 2> { return {}; };"); + verifyFormat("[]() -> foo<5 >= 2> { return {}; };"); + verifyFormat("[]() -> foo<5 <= 2> { return {}; };"); + verifyFormat("[]() -> foo<5 < 2> { return {}; };"); + verifyFormat("[]() -> foo<2 ? 1 : 0> { return {}; };"); + verifyFormat("namespace bar {\n" + "// broken:\n" + "auto foo{[]() -> foo<5 + 2> { return {}; }};\n" + "} // namespace bar"); + verifyFormat("namespace bar {\n" + "// broken:\n" + "auto foo{[]() -> foo<5 - 2> { return {}; }};\n" + "} // namespace bar"); + verifyFormat("namespace bar {\n" + "// broken:\n" + "auto foo{[]() -> foo<5 / 2> { return {}; }};\n" + "} // namespace bar"); + verifyFormat("namespace bar {\n" + "// broken:\n" + "auto foo{[]() -> foo<5 * 2> { return {}; }};\n" + "} // namespace bar"); + verifyFormat("namespace bar {\n" + "// broken:\n" + "auto foo{[]() -> foo<5 % 2> { return {}; }};\n" + "} // namespace bar"); + verifyFormat("namespace bar {\n" + "// broken:\n" + "auto foo{[]() -> foo<5 << 2> { return {}; }};\n" + "} // namespace bar"); + verifyFormat("namespace bar {\n" + "// broken:\n" + "auto foo{[]() -> foo { return {}; }};\n" + "} // namespace bar"); + verifyFormat("namespace bar {\n" + "// broken:\n" + "auto foo{[]() -> foo<~5> { return {}; }};\n" + "} // namespace bar"); + verifyFormat("namespace bar {\n" + "// broken:\n" + "auto foo{[]() -> foo<5 | 2> { return {}; }};\n" + "} // namespace bar"); + verifyFormat("namespace bar {\n" + "// broken:\n" + "auto foo{[]() -> foo<5 || 2> { return {}; }};\n" + "} // namespace bar"); + verifyFormat("namespace bar {\n" + "// broken:\n" + "auto foo{[]() -> foo<5 & 2> { return {}; }};\n" + "} // namespace bar"); + verifyFormat("namespace bar {\n" + "// broken:\n" + "auto foo{[]() -> foo<5 && 2> { return {}; }};\n" + "} // namespace bar"); + verifyFormat("namespace bar {\n" + "// broken:\n" + "auto foo{[]() -> foo<5 == 2> { return {}; }};\n" + "} // namespace bar"); + verifyFormat("namespace bar {\n" + "// broken:\n" + "auto foo{[]() -> foo<5 != 2> { return {}; }};\n" + "} // namespace bar"); + verifyFormat("namespace bar {\n" + "// broken:\n" + "auto foo{[]() -> foo<5 >= 2> { return {}; }};\n" + "} // namespace bar"); + verifyFormat("namespace bar {\n" + "// broken:\n" + "auto foo{[]() -> foo<5 <= 2> { return {}; }};\n" + "} // namespace bar"); + verifyFormat("namespace bar {\n" + "// broken:\n" + "auto foo{[]() -> foo<5 < 2> { return {}; }};\n" + "} // namespace bar"); + verifyFormat("namespace bar {\n" + "// broken:\n" + "auto foo{[]() -> foo<2 ? 1 : 0> { return {}; }};\n" + "} // namespace bar"); + verifyFormat("[]() -> a<1> {};"); + verifyFormat("[]() -> a<1> { ; };"); + verifyFormat("[]() -> a<1> { ; }();"); + verifyFormat("[a, a]() -> a {};"); + verifyFormat("[]() -> a {};"); + verifyFormat("[]() -> a { ; };"); + verifyFormat("[]() -> a { ; }();"); + verifyFormat("[a, a]() -> a {};"); + verifyFormat("[]() -> a {};"); + verifyFormat("[]() -> a { ; };"); + verifyFormat("[]() -> a { ; }();"); + verifyFormat("auto foo{[]() -> foo { ; }};"); + verifyFormat("namespace bar {\n" + "auto foo{[]() -> foo { ; }};\n" + "} // namespace bar"); verifyFormat("auto aaaaaaaa = [](int i, // break for some reason\n" " int j) -> int {\n" " return ffffffffffffffffffffffffffffffffffffffffffff(i * j);\n" diff --git a/clang/unittests/Format/FormatTestObjC.cpp b/clang/unittests/Format/FormatTestObjC.cpp index 0d3a5d85bb735..ef725a81a8855 100644 --- a/clang/unittests/Format/FormatTestObjC.cpp +++ b/clang/unittests/Format/FormatTestObjC.cpp @@ -611,6 +611,7 @@ TEST_F(FormatTestObjC, FormatObjCMethodDeclarations) { TEST_F(FormatTestObjC, FormatObjCMethodExpr) { verifyFormat("[foo bar:baz];"); + verifyFormat("[foo bar]->baz;"); verifyFormat("return [foo bar:baz];"); verifyFormat("return (a)[foo bar:baz];"); verifyFormat("f([foo bar:baz]);"); diff --git a/clang/unittests/Format/FormatTestTableGen.cpp b/clang/unittests/Format/FormatTestTableGen.cpp index b3771f6d812b4..06029bd8c725f 100644 --- a/clang/unittests/Format/FormatTestTableGen.cpp +++ b/clang/unittests/Format/FormatTestTableGen.cpp @@ -51,5 +51,9 @@ TEST_F(FormatTestTableGen, FormatStringBreak) { " \"very long help string\">;\n"); } +TEST_F(FormatTestTableGen, NoSpacesInSquareBracketLists) { + verifyFormat("def flag : Flag<[\"-\", \"--\"], \"foo\">;\n"); +} + } // namespace format } // end namespace clang diff --git a/clang/unittests/Format/SortImportsTestJava.cpp b/clang/unittests/Format/SortImportsTestJava.cpp index 3bcf809d961bb..fbd349ca47f0f 100644 --- a/clang/unittests/Format/SortImportsTestJava.cpp +++ b/clang/unittests/Format/SortImportsTestJava.cpp @@ -262,6 +262,14 @@ TEST_F(SortImportsTestJava, NoNewlineAtEnd) { "import org.a;")); } +TEST_F(SortImportsTestJava, NoReplacementsForValidImports) { + // Identical #includes have led to a failure with an unstable sort. + std::string Code = "import org.a;\n" + "import org.b;\n"; + EXPECT_TRUE( + sortIncludes(FmtStyle, Code, GetCodeRange(Code), "input.java").empty()); +} + } // end namespace } // end namespace format } // end namespace clang diff --git a/clang/unittests/Format/SortIncludesTest.cpp b/clang/unittests/Format/SortIncludesTest.cpp index 3f49ace75f787..75f4156f3d871 100644 --- a/clang/unittests/Format/SortIncludesTest.cpp +++ b/clang/unittests/Format/SortIncludesTest.cpp @@ -117,6 +117,43 @@ TEST_F(SortIncludesTest, SupportClangFormatOff) { "// clang-format on\n")); } +TEST_F(SortIncludesTest, SupportClangFormatOffCStyle) { + EXPECT_EQ("#include \n" + "#include \n" + "#include \n" + "/* clang-format off */\n" + "#include \n" + "#include \n" + "#include \n" + "/* clang-format on */\n", + sort("#include \n" + "#include \n" + "#include \n" + "/* clang-format off */\n" + "#include \n" + "#include \n" + "#include \n" + "/* clang-format on */\n")); + + // Not really turning it off + EXPECT_EQ("#include \n" + "#include \n" + "#include \n" + "/* clang-format offically */\n" + "#include \n" + "#include \n" + "#include \n" + "/* clang-format onwards */\n", + sort("#include \n" + "#include \n" + "#include \n" + "/* clang-format offically */\n" + "#include \n" + "#include \n" + "#include \n" + "/* clang-format onwards */\n")); +} + TEST_F(SortIncludesTest, IncludeSortingCanBeDisabled) { FmtStyle.SortIncludes = false; EXPECT_EQ("#include \"a.h\"\n" diff --git a/clang/unittests/Index/IndexTests.cpp b/clang/unittests/Index/IndexTests.cpp index 147f7a714ad24..97051c093aea4 100644 --- a/clang/unittests/Index/IndexTests.cpp +++ b/clang/unittests/Index/IndexTests.cpp @@ -7,7 +7,10 @@ //===----------------------------------------------------------------------===// #include "clang/AST/ASTConsumer.h" +#include "clang/AST/ASTContext.h" #include "clang/AST/Decl.h" +#include "clang/Basic/SourceLocation.h" +#include "clang/Basic/SourceManager.h" #include "clang/Frontend/CompilerInstance.h" #include "clang/Frontend/FrontendAction.h" #include "clang/Index/IndexDataConsumer.h" @@ -23,27 +26,64 @@ namespace clang { namespace index { +namespace { +struct Position { + size_t Line = 0; + size_t Column = 0; + + Position(size_t Line = 0, size_t Column = 0) : Line(Line), Column(Column) {} + + static Position fromSourceLocation(SourceLocation Loc, + const SourceManager &SM) { + FileID FID; + unsigned Offset; + std::tie(FID, Offset) = SM.getDecomposedSpellingLoc(Loc); + Position P; + P.Line = SM.getLineNumber(FID, Offset); + P.Column = SM.getColumnNumber(FID, Offset); + return P; + } +}; + +bool operator==(const Position &LHS, const Position &RHS) { + return std::tie(LHS.Line, LHS.Column) == std::tie(RHS.Line, RHS.Column); +} + +llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, const Position &Pos) { + return OS << Pos.Line << ':' << Pos.Column; +} struct TestSymbol { std::string QName; + Position WrittenPos; + Position DeclPos; + SymbolInfo SymInfo; // FIXME: add more information. }; llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, const TestSymbol &S) { - return OS << S.QName; + return OS << S.QName << '[' << S.WrittenPos << ']' << '@' << S.DeclPos; } -namespace { class Indexer : public IndexDataConsumer { public: + void initialize(ASTContext &Ctx) override { + AST = &Ctx; + IndexDataConsumer::initialize(Ctx); + } + bool handleDeclOccurence(const Decl *D, SymbolRoleSet Roles, - ArrayRef, SourceLocation, + ArrayRef, SourceLocation Loc, ASTNodeInfo) override { const auto *ND = llvm::dyn_cast(D); if (!ND) return true; TestSymbol S; + S.SymInfo = getSymbolInfo(D); S.QName = ND->getQualifiedNameAsString(); + S.WrittenPos = Position::fromSourceLocation(Loc, AST->getSourceManager()); + S.DeclPos = + Position::fromSourceLocation(D->getLocation(), AST->getSourceManager()); Symbols.push_back(std::move(S)); return true; } @@ -57,6 +97,7 @@ class Indexer : public IndexDataConsumer { } std::vector Symbols; + const ASTContext *AST = nullptr; }; class IndexAction : public ASTFrontendAction { @@ -93,11 +134,15 @@ class IndexAction : public ASTFrontendAction { IndexingOptions Opts; }; +using testing::AllOf; using testing::Contains; using testing::Not; using testing::UnorderedElementsAre; MATCHER_P(QName, Name, "") { return arg.QName == Name; } +MATCHER_P(WrittenAt, Pos, "") { return arg.WrittenPos == Pos; } +MATCHER_P(DeclAt, Pos, "") { return arg.DeclPos == Pos; } +MATCHER_P(Kind, SymKind, "") { return arg.SymInfo.Kind == SymKind; } TEST(IndexTest, Simple) { auto Index = std::make_shared(); @@ -119,6 +164,99 @@ TEST(IndexTest, IndexPreprocessorMacros) { EXPECT_THAT(Index->Symbols, UnorderedElementsAre()); } +TEST(IndexTest, IndexParametersInDecls) { + std::string Code = "void foo(int bar);"; + auto Index = std::make_shared(); + IndexingOptions Opts; + Opts.IndexFunctionLocals = true; + Opts.IndexParametersInDeclarations = true; + tooling::runToolOnCode(new IndexAction(Index, Opts), Code); + EXPECT_THAT(Index->Symbols, Contains(QName("bar"))); + + Opts.IndexParametersInDeclarations = false; + Index->Symbols.clear(); + tooling::runToolOnCode(new IndexAction(Index, Opts), Code); + EXPECT_THAT(Index->Symbols, Not(Contains(QName("bar")))); +} + +TEST(IndexTest, IndexExplicitTemplateInstantiation) { + std::string Code = R"cpp( + template + struct Foo { void bar() {} }; + template <> + struct Foo { void bar() {} }; + void foo() { + Foo abc; + Foo b; + } + )cpp"; + auto Index = std::make_shared(); + IndexingOptions Opts; + tooling::runToolOnCode(new IndexAction(Index, Opts), Code); + EXPECT_THAT(Index->Symbols, + AllOf(Contains(AllOf(QName("Foo"), WrittenAt(Position(8, 7)), + DeclAt(Position(5, 12)))), + Contains(AllOf(QName("Foo"), WrittenAt(Position(7, 7)), + DeclAt(Position(3, 12)))))); +} + +TEST(IndexTest, IndexTemplateInstantiationPartial) { + std::string Code = R"cpp( + template + struct Foo { void bar() {} }; + template + struct Foo { void bar() {} }; + void foo() { + Foo abc; + Foo b; + } + )cpp"; + auto Index = std::make_shared(); + IndexingOptions Opts; + tooling::runToolOnCode(new IndexAction(Index, Opts), Code); + EXPECT_THAT(Index->Symbols, + Contains(AllOf(QName("Foo"), WrittenAt(Position(8, 7)), + DeclAt(Position(5, 12))))); +} + +TEST(IndexTest, IndexTypeParmDecls) { + std::string Code = R"cpp( + template class C, typename NoRef> + struct Foo { + T t = I; + C x; + }; + )cpp"; + auto Index = std::make_shared(); + IndexingOptions Opts; + tooling::runToolOnCode(new IndexAction(Index, Opts), Code); + EXPECT_THAT(Index->Symbols, AllOf(Not(Contains(QName("Foo::T"))), + Not(Contains(QName("Foo::I"))), + Not(Contains(QName("Foo::C"))), + Not(Contains(QName("Foo::NoRef"))))); + + Opts.IndexTemplateParameters = true; + Index->Symbols.clear(); + tooling::runToolOnCode(new IndexAction(Index, Opts), Code); + EXPECT_THAT(Index->Symbols, + AllOf(Contains(QName("Foo::T")), Contains(QName("Foo::I")), + Contains(QName("Foo::C")), Contains(QName("Foo::NoRef")))); +} + +TEST(IndexTest, UsingDecls) { + std::string Code = R"cpp( + void foo(int bar); + namespace std { + using ::foo; + } + )cpp"; + auto Index = std::make_shared(); + IndexingOptions Opts; + tooling::runToolOnCode(new IndexAction(Index, Opts), Code); + EXPECT_THAT(Index->Symbols, + Contains(AllOf(QName("std::foo"), Kind(SymbolKind::Using)))); +} + } // namespace } // namespace index } // namespace clang diff --git a/clang/unittests/Sema/CodeCompleteTest.cpp b/clang/unittests/Sema/CodeCompleteTest.cpp index 3bec79dc9ad03..de37e0c4b820f 100644 --- a/clang/unittests/Sema/CodeCompleteTest.cpp +++ b/clang/unittests/Sema/CodeCompleteTest.cpp @@ -173,12 +173,16 @@ TEST(SemaCodeCompleteTest, VisitedNSForValidQualifiedId) { "foo::(anonymous)")); } -TEST(SemaCodeCompleteTest, VisitedNSForInvalideQualifiedId) { +TEST(SemaCodeCompleteTest, VisitedNSForInvalidQualifiedId) { auto VisitedNS = runCodeCompleteOnCode(R"cpp( - namespace ns { foo::^ } + namespace na {} + namespace ns1 { + using namespace na; + foo::^ + } )cpp") .VisitedNamespaces; - EXPECT_TRUE(VisitedNS.empty()); + EXPECT_THAT(VisitedNS, UnorderedElementsAre("ns1", "na")); } TEST(SemaCodeCompleteTest, VisitedNSWithoutQualifier) { @@ -438,4 +442,41 @@ TEST(PreferredTypeTest, ParenExpr) { )cpp"; EXPECT_THAT(collectPreferredTypes(Code), Each("const int *")); } + +TEST(PreferredTypeTest, FunctionArguments) { + StringRef Code = R"cpp( + void foo(const int*); + + void bar(const int*); + void bar(const int*, int b); + + struct vector { + const int *data(); + }; + void test() { + foo(^(^(^(^vec^tor^().^da^ta^())))); + bar(^(^(^(^vec^tor^().^da^ta^())))); + } + )cpp"; + EXPECT_THAT(collectPreferredTypes(Code), Each("const int *")); + + Code = R"cpp( + void bar(int, volatile double *); + void bar(int, volatile double *, int, int); + + struct vector { + double *data(); + }; + + struct class_members { + void bar(int, volatile double *); + void bar(int, volatile double *, int, int); + }; + void test() { + bar(10, ^(^(^(^vec^tor^().^da^ta^())))); + class_members().bar(10, ^(^(^(^vec^tor^().^da^ta^())))); + } + )cpp"; + EXPECT_THAT(collectPreferredTypes(Code), Each("volatile double *")); +} } // namespace diff --git a/clang/unittests/StaticAnalyzer/AnalyzerOptionsTest.cpp b/clang/unittests/StaticAnalyzer/AnalyzerOptionsTest.cpp index ff2c12ac1f180..0fb0c04b97a2f 100644 --- a/clang/unittests/StaticAnalyzer/AnalyzerOptionsTest.cpp +++ b/clang/unittests/StaticAnalyzer/AnalyzerOptionsTest.cpp @@ -48,28 +48,28 @@ TEST(StaticAnalyzerOptions, SearchInParentPackageTests) { } }; - // Checker one has Option specified as true. It should read true regardless of - // search mode. + // CheckerTwo one has Option specified as true. It should read true regardless + // of search mode. CheckerOneMock CheckerOne; - EXPECT_TRUE(Opts.getCheckerBooleanOption("Option", false, &CheckerOne)); + EXPECT_TRUE(Opts.getCheckerBooleanOption(&CheckerOne, "Option", false)); // The package option is overridden with a checker option. - EXPECT_TRUE(Opts.getCheckerBooleanOption("Option", false, &CheckerOne, + EXPECT_TRUE(Opts.getCheckerBooleanOption(&CheckerOne, "Option", false, true)); // The Outer package option is overridden by the Inner package option. No // package option is specified. - EXPECT_TRUE(Opts.getCheckerBooleanOption("Option2", false, &CheckerOne, + EXPECT_TRUE(Opts.getCheckerBooleanOption(&CheckerOne, "Option2", false, true)); // No package option is specified and search in packages is turned off. The // default value should be returned. - EXPECT_FALSE(Opts.getCheckerBooleanOption("Option2", false, &CheckerOne)); - EXPECT_TRUE(Opts.getCheckerBooleanOption("Option2", true, &CheckerOne)); + EXPECT_FALSE(Opts.getCheckerBooleanOption(&CheckerOne, "Option2", false)); + EXPECT_TRUE(Opts.getCheckerBooleanOption(&CheckerOne, "Option2", true)); // Checker true has no option specified. It should get the default value when // search in parents turned off and false when search in parents turned on. CheckerTwoMock CheckerTwo; - EXPECT_FALSE(Opts.getCheckerBooleanOption("Option", false, &CheckerTwo)); - EXPECT_TRUE(Opts.getCheckerBooleanOption("Option", true, &CheckerTwo)); - EXPECT_FALSE(Opts.getCheckerBooleanOption("Option", true, &CheckerTwo, true)); + EXPECT_FALSE(Opts.getCheckerBooleanOption(&CheckerTwo, "Option", false)); + EXPECT_TRUE(Opts.getCheckerBooleanOption(&CheckerTwo, "Option", true)); + EXPECT_FALSE(Opts.getCheckerBooleanOption(&CheckerTwo, "Option", true, true)); } TEST(StaticAnalyzerOptions, StringOptions) { @@ -84,9 +84,17 @@ TEST(StaticAnalyzerOptions, StringOptions) { CheckerOneMock CheckerOne; EXPECT_TRUE("StringValue" == - Opts.getCheckerStringOption("Option", "DefaultValue", &CheckerOne)); + Opts.getCheckerStringOption(&CheckerOne, "Option", "DefaultValue")); EXPECT_TRUE("DefaultValue" == - Opts.getCheckerStringOption("Option2", "DefaultValue", &CheckerOne)); + Opts.getCheckerStringOption(&CheckerOne, "Option2", "DefaultValue")); } + +TEST(StaticAnalyzerOptions, SubCheckerOptions) { + AnalyzerOptions Opts; + Opts.Config["Outer.Inner.CheckerOne:Option"] = "StringValue"; + EXPECT_TRUE("StringValue" == Opts.getCheckerStringOption( + "Outer.Inner.CheckerOne", "Option", "DefaultValue")); +} + } // end namespace ento } // end namespace clang diff --git a/clang/unittests/Tooling/ToolingTest.cpp b/clang/unittests/Tooling/ToolingTest.cpp index 9601db3ed0fc8..a3c245ba559af 100644 --- a/clang/unittests/Tooling/ToolingTest.cpp +++ b/clang/unittests/Tooling/ToolingTest.cpp @@ -382,7 +382,7 @@ TEST(ClangToolTest, ArgumentAdjusters) { ArgumentsAdjuster CheckSyntaxOnlyAdjuster = [&Found, &Ran](const CommandLineArguments &Args, StringRef /*unused*/) { Ran = true; - if (std::find(Args.begin(), Args.end(), "-fsyntax-only") != Args.end()) + if (llvm::is_contained(Args, "-fsyntax-only")) Found = true; return Args; }; diff --git a/clang/utils/TableGen/NeonEmitter.cpp b/clang/utils/TableGen/NeonEmitter.cpp index 6965f886216f4..ecd7c3fde9739 100644 --- a/clang/utils/TableGen/NeonEmitter.cpp +++ b/clang/utils/TableGen/NeonEmitter.cpp @@ -2471,7 +2471,7 @@ void NeonEmitter::run(raw_ostream &OS) { I != Defs.end(); /*No step*/) { bool DependenciesSatisfied = true; for (auto *II : (*I)->getDependencies()) { - if (std::find(Defs.begin(), Defs.end(), II) != Defs.end()) + if (llvm::is_contained(Defs, II)) DependenciesSatisfied = false; } if (!DependenciesSatisfied) { @@ -2580,7 +2580,7 @@ void NeonEmitter::runFP16(raw_ostream &OS) { I != Defs.end(); /*No step*/) { bool DependenciesSatisfied = true; for (auto *II : (*I)->getDependencies()) { - if (std::find(Defs.begin(), Defs.end(), II) != Defs.end()) + if (llvm::is_contained(Defs, II)) DependenciesSatisfied = false; } if (!DependenciesSatisfied) { diff --git a/clang/utils/analyzer/CmpRuns.py b/clang/utils/analyzer/CmpRuns.py index be503499622d1..3fab6ef520c42 100755 --- a/clang/utils/analyzer/CmpRuns.py +++ b/clang/utils/analyzer/CmpRuns.py @@ -73,6 +73,21 @@ def getFileName(self): return fileName[len(root) + 1:] return fileName + def getRootFileName(self): + path = self._data['path'] + if not path: + return self.getFileName() + p = path[0] + if 'location' in p: + fIdx = p['location']['file'] + else: # control edge + fIdx = path[0]['edges'][0]['start'][0]['file'] + out = self._report.files[fIdx] + root = self._report.run.root + if out.startswith(root): + return out[len(root):] + return out + def getLine(self): return self._loc['line'] @@ -106,7 +121,13 @@ def getReadableName(self): funcnamePostfix = "#" + self._data['issue_context'] else: funcnamePostfix = "" - return '%s%s:%d:%d, %s: %s' % (self.getFileName(), + rootFilename = self.getRootFileName() + fileName = self.getFileName() + if rootFilename != fileName: + filePrefix = "[%s] %s" % (rootFilename, fileName) + else: + filePrefix = rootFilename + return '%s%s:%d:%d, %s: %s' % (filePrefix, funcnamePostfix, self.getLine(), self.getColumn(), self.getCategory(), diff --git a/clang/www/analyzer/annotations.html b/clang/www/analyzer/annotations.html index 130c8cc3761ef..bfb5960947883 100644 --- a/clang/www/analyzer/annotations.html +++ b/clang/www/analyzer/annotations.html @@ -60,6 +60,16 @@

Specific Topics

  • Attribute 'ns_consumes_self'
  • +
  • Libkern Memory Management Annotations + + +
  • Custom Assertion Handlers @@ -482,6 +492,183 @@

    Attribute 'ns_consumes_self' which is functionally equivalent to the combination of NS_CONSUMES_SELF and NS_RETURNS_RETAINED shown above.

    +

    Libkern Memory Management Annotations

    + +

    Libkern +requires developers to inherit all heap allocated objects from OSObject +and to perform manual reference counting. +The reference counting model is very similar to MRR (manual retain-release) mode in +Objective-C +or to CoreFoundation reference counting. +Freshly-allocated objects start with a reference count of 1, +and calls to retain increment it, +while calls to release decrement it. +The object is deallocated whenever its reference count reaches zero.

    + +

    Manually incrementing and decrementing reference counts is error-prone: +over-retains lead to leaks, and over-releases lead to uses-after-free. +The analyzer can help the programmer to check for unbalanced +retain/release calls.

    + +

    The reference count checking is based on the principle of +locality: it should be possible to establish correctness +(lack of leaks/uses after free) by looking at each function body, +and the declarations (not the definitions) of all the functions it interacts +with.

    + +

    In order to support such reasoning, it should be possible to summarize +the behavior of each function, with respect to reference count +of its returned values and attributes.

    + +

    By default, the following summaries are assumed:

    +
      +
    • All functions starting with get or Get, + unless they are returning subclasses of OSIterator, + are assumed to be returning at +0. + That is, the caller has no reference + count obligations with respect to the reference count of the returned object + and should leave it untouched. +
    • + +
    • + All other functions are assumed to return at +1. + That is, the caller has an obligation to release such objects. +
    • + +
    • + Functions are assumed not to change the reference count of their parameters, + including the implicit this parameter. +
    • +
    + +

    These summaries can be overriden with the following +attributes:

    + +

    Attribute 'os_returns_retained'

    + +

    The os_returns_retained attribute (accessed through the macro +LIBKERN_RETURNS_RETAINED) plays a role identical to ns_returns_retained for functions +returning OSObject subclasses. +The attribute indicates that it is a callers responsibility to release the +returned object. +

    + + +

    Attribute 'os_returns_not_retained'

    + +

    The os_returns_not_retained attribute (accessed through the macro +LIBKERN_RETURNS_NOT_RETAINED) plays a role identical to ns_returns_not_retained for functions +returning OSObject subclasses. +The attribute indicates that the caller should not change the retain +count of the returned object. +

    + +
    Example
    + +
    +class MyClass {
    +  OSObject *f;
    +  LIBKERN_RETURNS_NOT_RETAINED OSObject *myFieldGetter();
    +}
    + 
    + 
    +// Note that the annotation only has to be applied to the function declaration.
    +OSObject * MyClass::myFieldGetter() {
    +  return f;
    +}
    +
    + +

    Attribute 'os_consumed'

    + +

    Similarly to ns_consumed attribute, +os_consumed (accessed through LIBKERN_CONSUMED) attribute, +applied to a parameter, +indicates that the call to the function consumes the parameter: +the callee should either release it or store it and release it in the destructor, +while the caller should assume one is subtracted from the reference count +after the call.

    + +
    +IOReturn addToList(LIBKERN_CONSUMED IOPMinformee *newInformee);
    +
    + +

    Attribute 'os_consumes_this'

    + +

    Similarly to ns_consumes_self, +the os_consumes_self attribute indicates that the method call +consumes the implicit this argument: the caller +should assume one was subtracted from the reference count of the object +after the call, and the callee has on obligation to either +release the argument, or store it and eventually release it in the +destructor.

    + +
    +void addThisToList(OSArray *givenList) LIBKERN_CONSUMES_THIS;
    +
    + +

    Out Parameters

    + +A function can also return an object to a caller by a means of an out parameter +(a pointer-to-OSObject-pointer is passed, and a callee writes a pointer to an +object into an argument). +Currently the analyzer does not track unannotated out +parameters by default, but with annotations we distinguish four separate cases: + +

    1. Non-retained out parameters, identified using + LIBKERN_RETURNS_NOT_RETAINED applied to parameters, e.g.:

    + +
    +void getterViaOutParam(LIBKERN_RETURNS_NOT_RETAINED OSObject **obj)
    +
    + +

    Such functions write a non-retained object into an out parameter, and the +caller has no further obligations.

    + +

    2. Retained out parameters, +identified using LIBKERN_RETURNS_RETAINED:

    +
    +void getterViaOutParam(LIBKERN_RETURNS_NOT_RETAINED OSObject **obj)
    +
    +

    +In such cases a retained object is written into an out parameter, which the caller has then to release in order to avoid a leak. +

    + +

    These two cases are simple - but in practice a functions returning an out-parameter usually also return a return code, and then an out parameter may or may not be written, which conditionally depends on the exit code, e.g.:

    + +
    +bool maybeCreateObject(LIBKERN_RETURNS_RETAINED OSObject **obj);
    +
    + +

    For such functions, the usual semantics is that an object is written into on "success", and not written into on "failure".

    + +

    For LIBKERN_RETURNS_RETAINED we assume the following definition of +success:

    + +

    For functions returning OSReturn or IOReturn +(any typedef to kern_return_t) success is defined as having an output of zero (kIOReturnSuccess is zero). +For all others, success is non-zero (e.g. non-nullptr for pointers)

    + +

    3. Retained out parameters on zero return +The annotation LIBKERN_RETURNS_RETAINED_ON_ZERO states +that a retained object is written into if and only if the function returns a zero value:

    + +
    +bool OSUnserializeXML(void *data, LIBKERN_RETURNS_RETAINED_ON_ZERO OSString **errString);
    +
    + +

    Then the caller has to release an object if the function has returned zero.

    + +

    4. Retained out parameters on non-zero return +Similarly, LIBKERN_RETURNS_RETAINED_ON_NONZERO specifies that a +retained object is written into the parameter if and only if the function has +returned a non-zero value.

    + +

    Note that for non-retained out parameters conditionals do not matter, as the +caller has no obligations regardless of whether an object is written into or +not.

    Custom Assertion Handlers

    @@ -590,4 +777,3 @@

    Attribute 'analyzer_noreturn' (Clang-specific) - diff --git a/clang/www/cxx_status.html b/clang/www/cxx_status.html index 95aa291827a3b..5438914d404e4 100755 --- a/clang/www/cxx_status.html +++ b/clang/www/cxx_status.html @@ -104,10 +104,14 @@

    C++11 implementation status

    Clang 2.9 - Initializer lists + Initializer lists N2672 Clang 3.1 + + P1009R2 (DR) + No + Static assertions N1720 @@ -275,10 +279,14 @@

    C++11 implementation status

    Clang 3.0 - Defaulted functions + Defaulted functions N2346 Clang 3.0 + + P1286R2 (DR) + No + Deleted functions N2346 @@ -893,7 +901,7 @@

    C++2a implementation status

    SVN - Consistent comparison (operator<=>) + Consistent comparison (operator<=>) P0515R3 Partial @@ -903,6 +911,10 @@

    C++2a implementation status

    P1120R0 + + P1185R2 + No + Access checking on specializations P0692R1 @@ -972,13 +984,16 @@

    C++2a implementation status

    SVN - Contracts + Contracts P0542R5 - No + No P1289R1 + + P1323R2 + Feature test macros P0941R2 @@ -1015,6 +1030,38 @@

    C++2a implementation status

    P1094R2 SVN + + + Structured binding extensions + P1091R3 + No + + + P1381R1 + + + Stronger Unicode requirements + P1041R4 + Yes + + + P1139R2 + + + Parenthesized initialization of aggregates + P0960R3 + No + + + Modules + P1103R3 + Partial (-fmodules, -fmodules-ts) + + + Coroutines + P0912R5 + Partial +

    @@ -1108,11 +1155,15 @@

    Technical specifications and standing documents

    - [DRAFT TS] Coroutines - N4663 + [TS] Coroutines + N4663 -fcoroutines-ts
    -stdlib=libc++
    Clang 5 + + -std=c++2a
    -stdlib=libc++
    + Superseded by P0912R5 + [TS] Library Fundamentals, Version 1 (invocation type traits) N4480 @@ -1129,7 +1180,7 @@

    Technical specifications and standing documents

    [TS] Modules N4720 -fmodules-ts - WIP + Superseded by P1103R3 [DRAFT TS] Reflection diff --git a/compiler-rt/CMakeLists.txt b/compiler-rt/CMakeLists.txt index bc0233c36756b..612f4e1fe3adb 100644 --- a/compiler-rt/CMakeLists.txt +++ b/compiler-rt/CMakeLists.txt @@ -157,6 +157,9 @@ if ("${COMPILER_RT_DEFAULT_TARGET_TRIPLE}" MATCHES ".*android.*") endif() pythonize_bool(ANDROID) +set(ANDROID_NDK_VERSION 18 + CACHE STRING "Set this to the Android NDK version that you are using") + set(COMPILER_RT_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}) set(COMPILER_RT_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}) @@ -194,26 +197,38 @@ if (cxxabi_supported AND SANITIZER_ALLOW_CXXABI) endif() pythonize_bool(SANITIZER_CAN_USE_CXXABI) +macro(handle_default_cxx_lib var) + if (${var} STREQUAL "default") + if (APPLE OR CMAKE_SYSTEM_NAME MATCHES "FreeBSD") + set(${var}_LIBNAME "libc++") + set(${var}_SYSTEM 1) + elseif (FUCHSIA) + set(${var}_LIBNAME "libc++") + set(${var}_INTREE 1) + else() + set(${var}_LIBNAME "libstdc++") + set(${var}_SYSTEM 1) + endif() + else() + set(${var}_LIBNAME "${${var}}") + set(${var}_SYSTEM 1) + endif() +endmacro() + +# This is either directly the C++ ABI library or the full C++ library +# which pulls in the ABI transitively. set(SANITIZER_CXX_ABI "default" CACHE STRING "Specify C++ ABI library to use.") -set(CXXABIS none default libstdc++ libc++) +set(CXXABIS none default libstdc++ libc++ libcxxabi) set_property(CACHE SANITIZER_CXX_ABI PROPERTY STRINGS ;${CXXABIS}) +handle_default_cxx_lib(SANITIZER_CXX_ABI) -if (SANITIZER_CXX_ABI STREQUAL "default") - if (APPLE OR CMAKE_SYSTEM_NAME MATCHES "FreeBSD") - set(SANITIZER_CXX_ABI_LIBNAME "libc++") - set(SANITIZER_CXX_ABI_SYSTEM 1) - elseif (FUCHSIA) - set(SANITIZER_CXX_ABI_LIBNAME "libc++") - set(SANITIZER_CXX_ABI_INTREE 1) - else() - set(SANITIZER_CXX_ABI_LIBNAME "libstdc++") - set(SANITIZER_CXX_ABI_SYSTEM 1) - endif() -else() - set(SANITIZER_CXX_ABI_LIBNAME "${SANITIZER_CXX_ABI}") - set(SANITIZER_CXX_ABI_SYSTEM 1) -endif() +# This needs to be a full C++ library for linking gtest and unit tests. +set(SANITIZER_TEST_CXX "default" CACHE STRING + "Specify C++ library to use for tests.") +set(CXXLIBS none default libstdc++ libc++) +set_property(CACHE SANITIZER_TEST_CXX PROPERTY STRINGS ;${CXXLIBS}) +handle_default_cxx_lib(SANITIZER_TEST_CXX) set(DEFAULT_SANITIZER_USE_STATIC_LLVM_UNWINDER OFF) if (FUCHSIA) @@ -360,9 +375,13 @@ if(MSVC) # warning from the MS linker complaining that it can't find the 'vc140.pdb' # file used by our object library compilations. list(APPEND SANITIZER_COMMON_CFLAGS /Z7) - llvm_replace_compiler_option(CMAKE_CXX_FLAGS "/Z[i7I]" "/Z7") - llvm_replace_compiler_option(CMAKE_CXX_FLAGS_DEBUG "/Z[i7I]" "/Z7") - llvm_replace_compiler_option(CMAKE_CXX_FLAGS_RELWITHDEBINFO "/Z[i7I]" "/Z7") + foreach(var_to_update + CMAKE_CXX_FLAGS + CMAKE_CXX_FLAGS_DEBUG + CMAKE_CXX_FLAGS_RELWITHDEBINFO) + string(REGEX REPLACE "(^| )/Z[i7I]($| )" " /Z7 " + "${var_to_update}" "${${var_to_update}}") + endforeach() elseif(COMPILER_RT_HAS_GLINE_TABLES_ONLY_FLAG AND NOT COMPILER_RT_DEBUG) list(APPEND SANITIZER_COMMON_CFLAGS -gline-tables-only) elseif(COMPILER_RT_HAS_G_FLAG) @@ -390,6 +409,7 @@ append_list_if(MINGW -fms-extensions SANITIZER_COMMON_CFLAGS) # Set common link flags. append_list_if(COMPILER_RT_HAS_NODEFAULTLIBS_FLAG -nodefaultlibs SANITIZER_COMMON_LINK_FLAGS) +append_list_if(COMPILER_RT_HAS_Z_TEXT -Wl,-z,text SANITIZER_COMMON_LINK_FLAGS) if (COMPILER_RT_USE_BUILTINS_LIBRARY) list(APPEND SANITIZER_COMMON_LINK_LIBS ${COMPILER_RT_BUILTINS_LIBRARY}) @@ -409,26 +429,36 @@ if("${CMAKE_SYSTEM_NAME}" STREQUAL "Fuchsia") list(APPEND SANITIZER_COMMON_LINK_LIBS zircon) endif() -if (SANITIZER_CXX_ABI_LIBNAME STREQUAL "libc++") - if (SANITIZER_CXX_ABI_INTREE) +macro(append_libcxx_libs var) + if (${var}_INTREE) if (SANITIZER_USE_STATIC_LLVM_UNWINDER AND (TARGET unwind_static OR HAVE_LIBUNWIND)) - list(APPEND SANITIZER_CXX_ABI_LIBRARY unwind_static) + list(APPEND ${var}_LIBRARIES unwind_static) elseif (TARGET unwind_shared OR HAVE_LIBUNWIND) - list(APPEND SANITIZER_CXX_ABI_LIBRARY unwind_shared) + list(APPEND ${var}_LIBRARIES unwind_shared) endif() if (SANITIZER_USE_STATIC_CXX_ABI AND (TARGET cxxabi_static OR HAVE_LIBCXXABI)) - list(APPEND SANITIZER_CXX_ABI_LIBRARY cxxabi_static) + list(APPEND ${var}_LIBRARIES cxxabi_static) elseif (TARGET cxxabi_shared OR HAVE_LIBCXXABI) - list(APPEND SANITIZER_CXX_ABI_LIBRARY cxxabi_shared) + list(APPEND ${var}_LIBRARIES cxxabi_shared) endif() else() - append_list_if(COMPILER_RT_HAS_LIBCXX c++ SANITIZER_CXX_ABI_LIBRARY) + append_list_if(COMPILER_RT_HAS_LIBCXX c++ ${var}_LIBRARIES) endif() +endmacro() + +if (SANITIZER_CXX_ABI_LIBNAME STREQUAL "libc++") + append_libcxx_libs(SANITIZER_CXX_ABI) elseif (SANITIZER_CXX_ABI_LIBNAME STREQUAL "libcxxabi") - list(APPEND SANITIZER_CXX_ABI_LIBRARY "c++abi") + list(APPEND SANITIZER_CXX_ABI_LIBRARIES "c++abi") elseif (SANITIZER_CXX_ABI_LIBNAME STREQUAL "libstdc++") - append_list_if(COMPILER_RT_HAS_LIBSTDCXX stdc++ SANITIZER_CXX_ABI_LIBRARY) + append_list_if(COMPILER_RT_HAS_LIBSTDCXX stdc++ SANITIZER_CXX_ABI_LIBRARIES) +endif() + +if (SANITIZER_TEST_CXX_LIBNAME STREQUAL "libc++") + append_libcxx_libs(SANITIZER_TEST_CXX) +elseif (SANITIZER_TEST_CXX_LIBNAME STREQUAL "libstdc++") + append_list_if(COMPILER_RT_HAS_LIBSTDCXX stdc++ SANITIZER_TEST_CXX_LIBRARIES) endif() # Warnings to turn off for all libraries, not just sanitizers. @@ -459,6 +489,15 @@ if(COMPILER_RT_USE_LIBCXX) break() endif() endforeach() + foreach(path IN ITEMS ${LLVM_MAIN_SRC_DIR}/projects/libcxxabi + ${LLVM_MAIN_SRC_DIR}/runtimes/libcxxabi + ${LLVM_MAIN_SRC_DIR}/../libcxxabi + ${LLVM_EXTERNAL_LIBCXXABI_SOURCE_DIR}) + if(IS_DIRECTORY ${path}) + set(COMPILER_RT_LIBCXXABI_PATH ${path}) + break() + endif() + endforeach() endif() set(COMPILER_RT_LLD_PATH ${LLVM_MAIN_SRC_DIR}/tools/lld) diff --git a/compiler-rt/cmake/Modules/AddCompilerRT.cmake b/compiler-rt/cmake/Modules/AddCompilerRT.cmake index 81b110203c274..c464a2c1b1d43 100644 --- a/compiler-rt/cmake/Modules/AddCompilerRT.cmake +++ b/compiler-rt/cmake/Modules/AddCompilerRT.cmake @@ -280,7 +280,7 @@ function(add_compiler_rt_runtime name type) OUTPUT_NAME ${output_name_${libname}}) set_target_properties(${libname} PROPERTIES FOLDER "Compiler-RT Runtime") if(LIB_LINK_LIBS) - target_link_libraries(${libname} ${LIB_LINK_LIBS}) + target_link_libraries(${libname} PRIVATE ${LIB_LINK_LIBS}) endif() if(${type} STREQUAL "SHARED") if(COMMAND llvm_setup_rpath) @@ -509,13 +509,16 @@ macro(add_custom_libcxx name prefix) if(NOT COMPILER_RT_LIBCXX_PATH) message(FATAL_ERROR "libcxx not found!") endif() + if(NOT COMPILER_RT_LIBCXXABI_PATH) + message(FATAL_ERROR "libcxxabi not found!") + endif() cmake_parse_arguments(LIBCXX "USE_TOOLCHAIN" "" "DEPS;CFLAGS;CMAKE_ARGS" ${ARGN}) if(LIBCXX_USE_TOOLCHAIN) set(compiler_args -DCMAKE_C_COMPILER=${COMPILER_RT_TEST_COMPILER} -DCMAKE_CXX_COMPILER=${COMPILER_RT_TEST_CXX_COMPILER}) - if(NOT COMPILER_RT_STANDALONE_BUILD) + if(NOT COMPILER_RT_STANDALONE_BUILD AND NOT RUNTIMES_BUILD) set(toolchain_deps $) set(force_deps DEPENDS $) endif() @@ -584,7 +587,7 @@ macro(add_custom_libcxx name prefix) ExternalProject_Add(${name} DEPENDS ${name}-clobber ${LIBCXX_DEPS} PREFIX ${prefix} - SOURCE_DIR ${COMPILER_RT_LIBCXX_PATH} + SOURCE_DIR ${COMPILER_RT_SOURCE_DIR}/cmake/Modules/CustomLibcxx STAMP_DIR ${STAMP_DIR} BINARY_DIR ${BINARY_DIR} CMAKE_ARGS ${CMAKE_PASSTHROUGH_VARIABLES} @@ -595,7 +598,8 @@ macro(add_custom_libcxx name prefix) -DLLVM_PATH=${LLVM_MAIN_SRC_DIR} -DLLVM_BINARY_DIR=${prefix} -DLLVM_LIBRARY_OUTPUT_INTDIR=${prefix}/lib - -DLIBCXX_STANDALONE_BUILD=ON + -DCOMPILER_RT_LIBCXX_PATH=${COMPILER_RT_LIBCXX_PATH} + -DCOMPILER_RT_LIBCXXABI_PATH=${COMPILER_RT_LIBCXXABI_PATH} ${LIBCXX_CMAKE_ARGS} INSTALL_COMMAND "" STEP_TARGETS configure build diff --git a/compiler-rt/cmake/Modules/CompilerRTCompile.cmake b/compiler-rt/cmake/Modules/CompilerRTCompile.cmake index 556ee78969ca7..07b589beb2d10 100644 --- a/compiler-rt/cmake/Modules/CompilerRTCompile.cmake +++ b/compiler-rt/cmake/Modules/CompilerRTCompile.cmake @@ -136,7 +136,7 @@ macro(clang_compiler_add_cxx_check) COMMAND bash -c "${CMD}" COMMENT "Checking that just-built clang can find C++ headers..." VERBATIM) - if (NOT COMPILER_RT_STANDALONE_BUILD) + if (NOT COMPILER_RT_STANDALONE_BUILD AND NOT RUNTIMES_BUILD) ADD_DEPENDENCIES(CompilerRTUnitTestCheckCxx clang) endif() endif() diff --git a/compiler-rt/cmake/Modules/CompilerRTUtils.cmake b/compiler-rt/cmake/Modules/CompilerRTUtils.cmake index 5348f2064b670..3ebd9273949cd 100644 --- a/compiler-rt/cmake/Modules/CompilerRTUtils.cmake +++ b/compiler-rt/cmake/Modules/CompilerRTUtils.cmake @@ -233,7 +233,8 @@ macro(load_llvm_config) execute_process( COMMAND ${LLVM_CONFIG_PATH} "--ldflags" "--libs" "xray" RESULT_VARIABLE HAD_ERROR - OUTPUT_VARIABLE CONFIG_OUTPUT) + OUTPUT_VARIABLE CONFIG_OUTPUT + ERROR_QUIET) if (HAD_ERROR) message(WARNING "llvm-config finding xray failed with status ${HAD_ERROR}") set(COMPILER_RT_HAS_LLVMXRAY FALSE) @@ -250,7 +251,8 @@ macro(load_llvm_config) execute_process( COMMAND ${LLVM_CONFIG_PATH} "--ldflags" "--libs" "testingsupport" RESULT_VARIABLE HAD_ERROR - OUTPUT_VARIABLE CONFIG_OUTPUT) + OUTPUT_VARIABLE CONFIG_OUTPUT + ERROR_QUIET) if (HAD_ERROR) message(WARNING "llvm-config finding testingsupport failed with status ${HAD_ERROR}") else() diff --git a/compiler-rt/cmake/Modules/CustomLibcxx/CMakeLists.txt b/compiler-rt/cmake/Modules/CustomLibcxx/CMakeLists.txt new file mode 100644 index 0000000000000..683b88e020a48 --- /dev/null +++ b/compiler-rt/cmake/Modules/CustomLibcxx/CMakeLists.txt @@ -0,0 +1,25 @@ +cmake_minimum_required(VERSION 3.4.3) +project(custom-libcxx C CXX) + +# Build static libcxxabi. +set(LIBCXXABI_STANDALONE_BUILD 1) +set(LIBCXXABI_ENABLE_SHARED OFF CACHE BOOL "") +set(LIBCXXABI_HERMETIC_STATIC_LIBRARY ON CACHE STRING "") +set(LIBCXXABI_LIBCXX_PATH ${COMPILER_RT_LIBCXX_PATH} CACHE PATH "") +set(LIBCXXABI_INCLUDE_TESTS OFF CACHE BOOL "") +add_subdirectory(${COMPILER_RT_LIBCXXABI_PATH} ${CMAKE_CURRENT_BINARY_DIR}/cxxabi) + +# Build static libcxx without exceptions. +set(LIBCXX_STANDALONE_BUILD 1) +set(LIBCXX_ENABLE_EXPERIMENTAL_LIBRARY OFF CACHE BOOL "") +set(LIBCXX_ENABLE_SHARED OFF CACHE BOOL "") +set(LIBCXX_ENABLE_EXCEPTIONS OFF CACHE BOOL "") +set(LIBCXX_HERMETIC_STATIC_LIBRARY ON CACHE BOOL "") + +# Use above libcxxabi. +set(LIBCXX_CXX_ABI "libcxxabi" CACHE STRING "") +set(LIBCXX_CXX_ABI_INTREE 1) +set(LIBCXX_ENABLE_STATIC_ABI_LIBRARY ON CACHE BOOL "") +set(LIBCXX_CXX_ABI_INCLUDE_PATHS ${COMPILER_RT_LIBCXXABI_PATH}/include CACHE PATH "") + +add_subdirectory(${COMPILER_RT_LIBCXX_PATH} ${CMAKE_CURRENT_BINARY_DIR}/cxx) diff --git a/compiler-rt/cmake/base-config-ix.cmake b/compiler-rt/cmake/base-config-ix.cmake index 6684d7371d68f..ee9426b715d75 100644 --- a/compiler-rt/cmake/base-config-ix.cmake +++ b/compiler-rt/cmake/base-config-ix.cmake @@ -47,15 +47,11 @@ if (LLVM_TREE_AVAILABLE) ${LLVM_INCLUDE_TESTS}) option(COMPILER_RT_ENABLE_WERROR "Fail and stop if warning is triggered" ${LLVM_ENABLE_WERROR}) - # Use just-built Clang to compile/link tests on all platforms, except for - # Windows where we need to use clang-cl instead. - if(NOT MSVC) - set(COMPILER_RT_TEST_COMPILER ${LLVM_RUNTIME_OUTPUT_INTDIR}/clang) - set(COMPILER_RT_TEST_CXX_COMPILER ${LLVM_RUNTIME_OUTPUT_INTDIR}/clang++) - else() - set(COMPILER_RT_TEST_COMPILER ${LLVM_RUNTIME_OUTPUT_INTDIR}/clang.exe) - set(COMPILER_RT_TEST_CXX_COMPILER ${LLVM_RUNTIME_OUTPUT_INTDIR}/clang++.exe) - endif() + # Use just-built Clang to compile/link tests on all platforms. + set(COMPILER_RT_TEST_COMPILER + ${LLVM_RUNTIME_OUTPUT_INTDIR}/clang${CMAKE_EXECUTABLE_SUFFIX}) + set(COMPILER_RT_TEST_CXX_COMPILER + ${LLVM_RUNTIME_OUTPUT_INTDIR}/clang++${CMAKE_EXECUTABLE_SUFFIX}) else() # Take output dir and install path from the user. set(COMPILER_RT_OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR} CACHE PATH diff --git a/compiler-rt/cmake/config-ix.cmake b/compiler-rt/cmake/config-ix.cmake index ec52882665bfc..ec35bf6065dd5 100644 --- a/compiler-rt/cmake/config-ix.cmake +++ b/compiler-rt/cmake/config-ix.cmake @@ -142,6 +142,8 @@ check_library_exists(c++ __cxa_throw "" COMPILER_RT_HAS_LIBCXX) check_library_exists(stdc++ __cxa_throw "" COMPILER_RT_HAS_LIBSTDCXX) # Linker flags. +check_linker_flag("-Wl,-z,text" COMPILER_RT_HAS_Z_TEXT) + if(ANDROID) check_linker_flag("-Wl,-z,global" COMPILER_RT_HAS_Z_GLOBAL) check_library_exists(log __android_log_write "" COMPILER_RT_HAS_LIBLOG) @@ -246,6 +248,7 @@ set(ALL_SAFESTACK_SUPPORTED_ARCH ${X86} ${X86_64} ${ARM64} ${MIPS32} ${MIPS64}) set(ALL_CFI_SUPPORTED_ARCH ${X86} ${X86_64} ${ARM32} ${ARM64} ${MIPS64}) set(ALL_ESAN_SUPPORTED_ARCH ${X86_64} ${MIPS64}) set(ALL_SCUDO_SUPPORTED_ARCH ${X86} ${X86_64} ${ARM32} ${ARM64} ${MIPS32} ${MIPS64} ${PPC64}) +set(ALL_SCUDO_STANDALONE_SUPPORTED_ARCH ${X86} ${X86_64}) if(APPLE) set(ALL_XRAY_SUPPORTED_ARCH ${X86_64}) else() @@ -459,6 +462,9 @@ if(APPLE) list_intersect(SCUDO_SUPPORTED_ARCH ALL_SCUDO_SUPPORTED_ARCH SANITIZER_COMMON_SUPPORTED_ARCH) + list_intersect(SCUDO_STANDALONE_SUPPORTED_ARCH + ALL_SCUDO_STANDALONE_SUPPORTED_ARCH + SANITIZER_COMMON_SUPPORTED_ARCH) list_intersect(FUZZER_SUPPORTED_ARCH ALL_FUZZER_SUPPORTED_ARCH SANITIZER_COMMON_SUPPORTED_ARCH) @@ -493,6 +499,7 @@ else() filter_available_targets(CFI_SUPPORTED_ARCH ${ALL_CFI_SUPPORTED_ARCH}) filter_available_targets(ESAN_SUPPORTED_ARCH ${ALL_ESAN_SUPPORTED_ARCH}) filter_available_targets(SCUDO_SUPPORTED_ARCH ${ALL_SCUDO_SUPPORTED_ARCH}) + filter_available_targets(SCUDO_STANDALONE_SUPPORTED_ARCH ${ALL_SCUDO_STANDALONE_SUPPORTED_ARCH}) filter_available_targets(XRAY_SUPPORTED_ARCH ${ALL_XRAY_SUPPORTED_ARCH}) filter_available_targets(SHADOWCALLSTACK_SUPPORTED_ARCH ${ALL_SHADOWCALLSTACK_SUPPORTED_ARCH}) @@ -634,6 +641,13 @@ else() set(COMPILER_RT_HAS_ESAN FALSE) endif() +#TODO(kostyak): add back Android & Fuchsia when the code settles a bit. +if (SCUDO_STANDALONE_SUPPORTED_ARCH AND OS_NAME MATCHES "Linux") + set(COMPILER_RT_HAS_SCUDO_STANDALONE TRUE) +else() + set(COMPILER_RT_HAS_SCUDO_STANDALONE FALSE) +endif() + if (COMPILER_RT_HAS_SANITIZER_COMMON AND SCUDO_SUPPORTED_ARCH AND OS_NAME MATCHES "Linux|Android|Fuchsia") set(COMPILER_RT_HAS_SCUDO TRUE) diff --git a/compiler-rt/include/sanitizer/hwasan_interface.h b/compiler-rt/include/sanitizer/hwasan_interface.h index 731ffc4014ac7..104af4caa3d4a 100644 --- a/compiler-rt/include/sanitizer/hwasan_interface.h +++ b/compiler-rt/include/sanitizer/hwasan_interface.h @@ -50,6 +50,10 @@ extern "C" { // does would cause false reports. void __hwasan_handle_longjmp(const void *sp_dst); + // Set memory tag for the part of the current thread stack below sp_dst to + // zero. Call this in vfork() before returning in the parent process. + void __hwasan_handle_vfork(const void *sp_dst); + // Libc hook for thread creation. Should be called in the child thread before // any instrumented code. void __hwasan_thread_enter(); @@ -65,6 +69,10 @@ extern "C" { // Print one-line report about the memory usage of the current process. void __hwasan_print_memory_usage(); + /* Returns the offset of the first byte in the memory range that can not be + * accessed through the pointer in x, or -1 if the whole range is good. */ + intptr_t __hwasan_test_shadow(const volatile void *x, size_t size); + int __sanitizer_posix_memalign(void **memptr, size_t alignment, size_t size); void * __sanitizer_memalign(size_t alignment, size_t size); void * __sanitizer_aligned_alloc(size_t alignment, size_t size); diff --git a/compiler-rt/include/sanitizer/tsan_interface.h b/compiler-rt/include/sanitizer/tsan_interface.h index 4a98a4e12d35e..011b23350cac3 100644 --- a/compiler-rt/include/sanitizer/tsan_interface.h +++ b/compiler-rt/include/sanitizer/tsan_interface.h @@ -136,6 +136,24 @@ void __tsan_external_assign_tag(void *addr, void *tag); void __tsan_external_read(void *addr, void *caller_pc, void *tag); void __tsan_external_write(void *addr, void *caller_pc, void *tag); +// Fiber switching API. +// - TSAN context for fiber can be created by __tsan_create_fiber +// and freed by __tsan_destroy_fiber. +// - TSAN context of current fiber or thread can be obtained +// by calling __tsan_get_current_fiber. +// - __tsan_switch_to_fiber should be called immediatly before switch +// to fiber, such as call of swapcontext. +// - Fiber name can be set by __tsan_set_fiber_name. +void *__tsan_get_current_fiber(void); +void *__tsan_create_fiber(unsigned flags); +void __tsan_destroy_fiber(void *fiber); +void __tsan_switch_to_fiber(void *fiber, unsigned flags); +void __tsan_set_fiber_name(void *fiber, const char *name); + +// Flags for __tsan_switch_to_fiber: +// Do not establish a happens-before relation between fibers +const unsigned __tsan_switch_to_fiber_no_sync = 1 << 0; + #ifdef __cplusplus } // extern "C" #endif diff --git a/compiler-rt/lib/CMakeLists.txt b/compiler-rt/lib/CMakeLists.txt index b3731f653a01a..e7a2c7bcfe1f0 100644 --- a/compiler-rt/lib/CMakeLists.txt +++ b/compiler-rt/lib/CMakeLists.txt @@ -24,6 +24,9 @@ function(compiler_rt_build_runtime runtime) if(${runtime} STREQUAL tsan) add_subdirectory(tsan/dd) endif() + if(${runtime} STREQUAL scudo) + add_subdirectory(scudo/standalone) + endif() endif() endfunction() diff --git a/compiler-rt/lib/asan/CMakeLists.txt b/compiler-rt/lib/asan/CMakeLists.txt index 726da27d052f1..3c443469031d0 100644 --- a/compiler-rt/lib/asan/CMakeLists.txt +++ b/compiler-rt/lib/asan/CMakeLists.txt @@ -32,6 +32,10 @@ set(ASAN_SOURCES asan_thread.cc asan_win.cc) +if (NOT WIN32 AND NOT APPLE) + list(APPEND ASAN_SOURCES asan_interceptors_vfork.S) +endif() + set(ASAN_CXX_SOURCES asan_new_delete.cc) @@ -92,7 +96,7 @@ append_list_if(COMPILER_RT_HAS_FTLS_MODEL_INITIAL_EXEC -ftls-model=initial-exec ASAN_DYNAMIC_CFLAGS) append_list_if(MSVC /DEBUG ASAN_DYNAMIC_LINK_FLAGS) -set(ASAN_DYNAMIC_LIBS ${SANITIZER_CXX_ABI_LIBRARY} ${SANITIZER_COMMON_LINK_LIBS}) +set(ASAN_DYNAMIC_LIBS ${SANITIZER_CXX_ABI_LIBRARIES} ${SANITIZER_COMMON_LINK_LIBS}) append_list_if(COMPILER_RT_HAS_LIBDL dl ASAN_DYNAMIC_LIBS) append_list_if(COMPILER_RT_HAS_LIBRT rt ASAN_DYNAMIC_LIBS) diff --git a/compiler-rt/lib/asan/asan_errors.cc b/compiler-rt/lib/asan/asan_errors.cc index 6fd465d610e88..16a300967bac3 100644 --- a/compiler-rt/lib/asan/asan_errors.cc +++ b/compiler-rt/lib/asan/asan_errors.cc @@ -35,7 +35,7 @@ static void OnStackUnwind(const SignalContext &sig, // corresponding code in the sanitizer_common and we use this callback to // print it. static_cast(callback_context)->Print(); - GetStackTrace(stack, kStackTraceMax, sig.pc, sig.bp, sig.context, fast); + stack->Unwind(sig.pc, sig.bp, sig.context, fast); } void ErrorDeadlySignal::Print() { diff --git a/compiler-rt/lib/asan/asan_fuchsia.cc b/compiler-rt/lib/asan/asan_fuchsia.cc index e333b7b0f4089..aebc17f38b4b6 100644 --- a/compiler-rt/lib/asan/asan_fuchsia.cc +++ b/compiler-rt/lib/asan/asan_fuchsia.cc @@ -178,7 +178,7 @@ static void ThreadStartHook(void *hook, uptr os_id) { SetCurrentThread(thread); // In lieu of AsanThread::ThreadStart. - asanThreadRegistry().StartThread(thread->tid(), os_id, /*workerthread*/ false, + asanThreadRegistry().StartThread(thread->tid(), os_id, ThreadType::Regular, nullptr); } diff --git a/compiler-rt/lib/asan/asan_interceptors.cc b/compiler-rt/lib/asan/asan_interceptors.cc index 7f2660df4cb6a..234cabce1f006 100644 --- a/compiler-rt/lib/asan/asan_interceptors.cc +++ b/compiler-rt/lib/asan/asan_interceptors.cc @@ -579,6 +579,11 @@ INTERCEPTOR(int, __cxa_atexit, void (*func)(void *), void *arg, } #endif // ASAN_INTERCEPT___CXA_ATEXIT +#if ASAN_INTERCEPT_VFORK +DEFINE_REAL(int, vfork); +DECLARE_EXTERN_INTERCEPTOR_AND_WRAPPER(int, vfork); +#endif + // ---------------------- InitializeAsanInterceptors ---------------- {{{1 namespace __asan { void InitializeAsanInterceptors() { @@ -656,6 +661,10 @@ void InitializeAsanInterceptors() { ASAN_INTERCEPT_FUNC(__cxa_atexit); #endif +#if ASAN_INTERCEPT_VFORK + ASAN_INTERCEPT_FUNC(vfork); +#endif + InitializePlatformInterceptors(); VReport(1, "AddressSanitizer: libc interceptors initialized\n"); diff --git a/compiler-rt/lib/asan/asan_interceptors.h b/compiler-rt/lib/asan/asan_interceptors.h index 271f373cd2b1b..903ab5991e9c2 100644 --- a/compiler-rt/lib/asan/asan_interceptors.h +++ b/compiler-rt/lib/asan/asan_interceptors.h @@ -105,6 +105,13 @@ void InitializePlatformInterceptors(); # define ASAN_INTERCEPT___STRDUP 0 #endif +#if SANITIZER_LINUX && (defined(__arm__) || defined(__aarch64__) || \ + defined(__i386__) || defined(__x86_64__)) +# define ASAN_INTERCEPT_VFORK 1 +#else +# define ASAN_INTERCEPT_VFORK 0 +#endif + DECLARE_REAL(int, memcmp, const void *a1, const void *a2, uptr size) DECLARE_REAL(char*, strchr, const char *str, int c) DECLARE_REAL(SIZE_T, strlen, const char *s) diff --git a/compiler-rt/lib/asan/asan_interceptors_vfork.S b/compiler-rt/lib/asan/asan_interceptors_vfork.S new file mode 100644 index 0000000000000..90a169d4b609e --- /dev/null +++ b/compiler-rt/lib/asan/asan_interceptors_vfork.S @@ -0,0 +1,12 @@ +#include "sanitizer_common/sanitizer_asm.h" + +#if defined(__linux__) +#define COMMON_INTERCEPTOR_SPILL_AREA __asan_extra_spill_area +#define COMMON_INTERCEPTOR_HANDLE_VFORK __asan_handle_vfork +#include "sanitizer_common/sanitizer_common_interceptors_vfork_aarch64.inc.S" +#include "sanitizer_common/sanitizer_common_interceptors_vfork_arm.inc.S" +#include "sanitizer_common/sanitizer_common_interceptors_vfork_x86_64.inc.S" +#include "sanitizer_common/sanitizer_common_interceptors_vfork_i386.inc.S" +#endif + +NO_EXEC_STACK_DIRECTIVE diff --git a/compiler-rt/lib/asan/asan_interface.inc b/compiler-rt/lib/asan/asan_interface.inc index 1dd9c630112d5..7c341f22e15f4 100644 --- a/compiler-rt/lib/asan/asan_interface.inc +++ b/compiler-rt/lib/asan/asan_interface.inc @@ -38,6 +38,7 @@ INTERFACE_FUNCTION(__asan_get_report_pc) INTERFACE_FUNCTION(__asan_get_report_sp) INTERFACE_FUNCTION(__asan_get_shadow_mapping) INTERFACE_FUNCTION(__asan_handle_no_return) +INTERFACE_FUNCTION(__asan_handle_vfork) INTERFACE_FUNCTION(__asan_init) INTERFACE_FUNCTION(__asan_load_cxx_array_cookie) INTERFACE_FUNCTION(__asan_load1) diff --git a/compiler-rt/lib/asan/asan_interface_internal.h b/compiler-rt/lib/asan/asan_interface_internal.h index ea8750e905930..c83aa11d741a1 100644 --- a/compiler-rt/lib/asan/asan_interface_internal.h +++ b/compiler-rt/lib/asan/asan_interface_internal.h @@ -249,6 +249,8 @@ extern "C" { SANITIZER_INTERFACE_ATTRIBUTE SANITIZER_WEAK_ATTRIBUTE const char* __asan_default_suppressions(); + + SANITIZER_INTERFACE_ATTRIBUTE void __asan_handle_vfork(void *sp); } // extern "C" #endif // ASAN_INTERFACE_INTERNAL_H diff --git a/compiler-rt/lib/asan/asan_mac.cc b/compiler-rt/lib/asan/asan_mac.cc index 7bb7c2bdd2136..e776acd2f539c 100644 --- a/compiler-rt/lib/asan/asan_mac.cc +++ b/compiler-rt/lib/asan/asan_mac.cc @@ -181,8 +181,8 @@ void asan_register_worker_thread(int parent_tid, StackTrace *stack) { t = AsanThread::Create(/* start_routine */ nullptr, /* arg */ nullptr, parent_tid, stack, /* detached */ true); t->Init(); - asanThreadRegistry().StartThread(t->tid(), GetTid(), - /* workerthread */ true, 0); + asanThreadRegistry().StartThread(t->tid(), GetTid(), ThreadType::Worker, + nullptr); SetCurrentThread(t); } } diff --git a/compiler-rt/lib/asan/asan_rtems.cc b/compiler-rt/lib/asan/asan_rtems.cc index a76a32bda598e..4878f4d67c86c 100644 --- a/compiler-rt/lib/asan/asan_rtems.cc +++ b/compiler-rt/lib/asan/asan_rtems.cc @@ -183,8 +183,8 @@ static void ThreadStartHook(void *hook, uptr os_id) { // Determine whether we are starting or restarting the thread. if (status == ThreadStatusCreated) // In lieu of AsanThread::ThreadStart. - asanThreadRegistry().StartThread(thread->tid(), os_id, - /*workerthread*/ false, nullptr); + asanThreadRegistry().StartThread(thread->tid(), os_id, ThreadType::Regular, + nullptr); else { // In a thread restart, a thread may resume execution at an // arbitrary function entry point, with its stack and TLS state diff --git a/compiler-rt/lib/asan/asan_rtl.cc b/compiler-rt/lib/asan/asan_rtl.cc index 67eb1a7832cea..db8dcd0689a56 100644 --- a/compiler-rt/lib/asan/asan_rtl.cc +++ b/compiler-rt/lib/asan/asan_rtl.cc @@ -597,6 +597,19 @@ void NOINLINE __asan_handle_no_return() { curr_thread->fake_stack()->HandleNoReturn(); } +extern "C" void *__asan_extra_spill_area() { + AsanThread *t = GetCurrentThread(); + CHECK(t); + return t->extra_spill_area(); +} + +void __asan_handle_vfork(void *sp) { + AsanThread *t = GetCurrentThread(); + CHECK(t); + uptr bottom = t->stack_bottom(); + PoisonShadow(bottom, (uptr)sp - bottom, 0); +} + void NOINLINE __asan_set_death_callback(void (*callback)(void)) { SetUserDieCallback(callback); } diff --git a/compiler-rt/lib/asan/asan_stack.cc b/compiler-rt/lib/asan/asan_stack.cc index fe968e8e0d2d4..b244da4fa0ad4 100644 --- a/compiler-rt/lib/asan/asan_stack.cc +++ b/compiler-rt/lib/asan/asan_stack.cc @@ -26,8 +26,57 @@ u32 GetMallocContextSize() { return atomic_load(&malloc_context_size, memory_order_acquire); } +namespace { + +// ScopedUnwinding is a scope for stacktracing member of a context +class ScopedUnwinding { + public: + explicit ScopedUnwinding(AsanThread *t) : thread(t) { + if (thread) { + can_unwind = !thread->isUnwinding(); + thread->setUnwinding(true); + } + } + ~ScopedUnwinding() { + if (thread) + thread->setUnwinding(false); + } + + bool CanUnwind() const { return can_unwind; } + + private: + AsanThread *thread = nullptr; + bool can_unwind = true; +}; + +} // namespace + } // namespace __asan +void __sanitizer::BufferedStackTrace::UnwindImpl( + uptr pc, uptr bp, void *context, bool request_fast, u32 max_depth) { + using namespace __asan; + size = 0; + if (UNLIKELY(!asan_inited)) + return; + request_fast = StackTrace::WillUseFastUnwind(request_fast); + AsanThread *t = GetCurrentThread(); + ScopedUnwinding unwind_scope(t); + if (!unwind_scope.CanUnwind()) + return; + if (request_fast) { + if (t) { + Unwind(max_depth, pc, bp, nullptr, t->stack_top(), t->stack_bottom(), + true); + } + return; + } + if (SANITIZER_MIPS && t && + !IsValidFrame(bp, t->stack_top(), t->stack_bottom())) + return; + Unwind(max_depth, pc, bp, context, 0, 0, false); +} + // ------------------ Interface -------------- {{{1 extern "C" { diff --git a/compiler-rt/lib/asan/asan_stack.h b/compiler-rt/lib/asan/asan_stack.h index 6648826064fc3..3a4b3cefc5def 100644 --- a/compiler-rt/lib/asan/asan_stack.h +++ b/compiler-rt/lib/asan/asan_stack.h @@ -26,34 +26,6 @@ static const u32 kDefaultMallocContextSize = 30; void SetMallocContextSize(u32 size); u32 GetMallocContextSize(); -// Get the stack trace with the given pc and bp. -// The pc will be in the position 0 of the resulting stack trace. -// The bp may refer to the current frame or to the caller's frame. -ALWAYS_INLINE -void GetStackTrace(BufferedStackTrace *stack, uptr max_depth, uptr pc, uptr bp, - void *context, bool fast) { -#if SANITIZER_WINDOWS - stack->Unwind(max_depth, pc, bp, context, 0, 0, fast); -#else - AsanThread *t; - stack->size = 0; - if (LIKELY(asan_inited)) { - if ((t = GetCurrentThread()) && !t->isUnwinding()) { - uptr stack_top = t->stack_top(); - uptr stack_bottom = t->stack_bottom(); - ScopedUnwinding unwind_scope(t); - if (!SANITIZER_MIPS || IsValidFrame(bp, stack_top, stack_bottom)) { - stack->Unwind(max_depth, pc, bp, context, stack_top, stack_bottom, - fast); - } - } else if (!t && !fast) { - /* If GetCurrentThread() has failed, try to do slow unwind anyways. */ - stack->Unwind(max_depth, pc, bp, context, 0, 0, false); - } - } -#endif // SANITIZER_WINDOWS -} - } // namespace __asan // NOTE: A Rule of thumb is to retrieve stack trace in the interceptors @@ -70,19 +42,19 @@ void GetStackTrace(BufferedStackTrace *stack, uptr max_depth, uptr pc, uptr bp, if (max_size > 1) stack.trace_buffer[1] = GET_CALLER_PC(); \ } \ } else { \ - GetStackTrace(&stack, max_size, StackTrace::GetCurrentPc(), \ - GET_CURRENT_FRAME(), 0, fast); \ + stack.Unwind(StackTrace::GetCurrentPc(), \ + GET_CURRENT_FRAME(), nullptr, fast, max_size); \ } #define GET_STACK_TRACE_FATAL(pc, bp) \ BufferedStackTrace stack; \ - GetStackTrace(&stack, kStackTraceMax, pc, bp, 0, \ - common_flags()->fast_unwind_on_fatal) + stack.Unwind(pc, bp, nullptr, \ + common_flags()->fast_unwind_on_fatal) #define GET_STACK_TRACE_SIGNAL(sig) \ BufferedStackTrace stack; \ - GetStackTrace(&stack, kStackTraceMax, (sig).pc, (sig).bp, (sig).context, \ - common_flags()->fast_unwind_on_fatal) + stack.Unwind((sig).pc, (sig).bp, (sig).context, \ + common_flags()->fast_unwind_on_fatal) #define GET_STACK_TRACE_FATAL_HERE \ GET_STACK_TRACE(kStackTraceMax, common_flags()->fast_unwind_on_fatal) diff --git a/compiler-rt/lib/asan/asan_thread.cc b/compiler-rt/lib/asan/asan_thread.cc index 8a28529807f6c..e63561c2243fc 100644 --- a/compiler-rt/lib/asan/asan_thread.cc +++ b/compiler-rt/lib/asan/asan_thread.cc @@ -245,8 +245,7 @@ void AsanThread::Init(const InitOptions *options) { thread_return_t AsanThread::ThreadStart( tid_t os_id, atomic_uintptr_t *signal_thread_is_registered) { Init(); - asanThreadRegistry().StartThread(tid(), os_id, /*workerthread*/ false, - nullptr); + asanThreadRegistry().StartThread(tid(), os_id, ThreadType::Regular, nullptr); if (signal_thread_is_registered) atomic_store(signal_thread_is_registered, 1, memory_order_release); diff --git a/compiler-rt/lib/asan/asan_thread.h b/compiler-rt/lib/asan/asan_thread.h index 1e08d577123da..d725e88864eb7 100644 --- a/compiler-rt/lib/asan/asan_thread.h +++ b/compiler-rt/lib/asan/asan_thread.h @@ -130,6 +130,8 @@ class AsanThread { AsanThreadLocalMallocStorage &malloc_storage() { return malloc_storage_; } AsanStats &stats() { return stats_; } + void *extra_spill_area() { return &extra_spill_area_; } + private: // NOTE: There is no AsanThread constructor. It is allocated // via mmap() and *must* be valid in zero-initialized state. @@ -165,18 +167,7 @@ class AsanThread { AsanThreadLocalMallocStorage malloc_storage_; AsanStats stats_; bool unwinding_; -}; - -// ScopedUnwinding is a scope for stacktracing member of a context -class ScopedUnwinding { - public: - explicit ScopedUnwinding(AsanThread *t) : thread(t) { - t->setUnwinding(true); - } - ~ScopedUnwinding() { thread->setUnwinding(false); } - - private: - AsanThread *thread; + uptr extra_spill_area_; }; // Returns a single instance of registry. diff --git a/compiler-rt/lib/asan/asan_win.cc b/compiler-rt/lib/asan/asan_win.cc index 692da58234a10..3eee845ee416a 100644 --- a/compiler-rt/lib/asan/asan_win.cc +++ b/compiler-rt/lib/asan/asan_win.cc @@ -354,6 +354,19 @@ __declspec(allocate(".CRT$XLAB")) void (NTAPI *__asan_tls_init)(void *, unsigned long, void *) = asan_thread_init; #endif +static void NTAPI asan_thread_exit(void *module, DWORD reason, void *reserved) { + if (reason == DLL_THREAD_DETACH) { + // Unpoison the thread's stack because the memory may be re-used. + NT_TIB *tib = (NT_TIB *)NtCurrentTeb(); + uptr stackSize = (uptr)tib->StackBase - (uptr)tib->StackLimit; + __asan_unpoison_memory_region(tib->StackLimit, stackSize); + } +} + +#pragma section(".CRT$XLY", long, read) // NOLINT +__declspec(allocate(".CRT$XLY")) void (NTAPI *__asan_tls_exit)(void *, + unsigned long, void *) = asan_thread_exit; + WIN_FORCE_LINK(__asan_dso_reg_hook) // }}} diff --git a/compiler-rt/lib/asan/tests/asan_mem_test.cc b/compiler-rt/lib/asan/tests/asan_mem_test.cc index b4d3b16ec0abc..1339c1271bdd8 100644 --- a/compiler-rt/lib/asan/tests/asan_mem_test.cc +++ b/compiler-rt/lib/asan/tests/asan_mem_test.cc @@ -9,7 +9,11 @@ // This file is a part of AddressSanitizer, an address sanity checker. // //===----------------------------------------------------------------------===// +#include #include "asan_test_utils.h" +#if defined(_GNU_SOURCE) +#include // for bcmp +#endif #include template @@ -205,37 +209,43 @@ TEST(AddressSanitizer, MemMoveOOBTest) { MemTransferOOBTestTemplate(1024); } - -TEST(AddressSanitizer, MemCmpOOBTest) { +template +void CmpOOBTestCommon() { size_t size = Ident(100); char *s1 = MallocAndMemsetString(size); char *s2 = MallocAndMemsetString(size); - // Normal memcmp calls. - Ident(memcmp(s1, s2, size)); - Ident(memcmp(s1 + size - 1, s2 + size - 1, 1)); - Ident(memcmp(s1 - 1, s2 - 1, 0)); + // Normal cmpfn calls. + Ident(cmpfn(s1, s2, size)); + Ident(cmpfn(s1 + size - 1, s2 + size - 1, 1)); + Ident(cmpfn(s1 - 1, s2 - 1, 0)); // One of arguments points to not allocated memory. - EXPECT_DEATH(Ident(memcmp)(s1 - 1, s2, 1), LeftOOBReadMessage(1)); - EXPECT_DEATH(Ident(memcmp)(s1, s2 - 1, 1), LeftOOBReadMessage(1)); - EXPECT_DEATH(Ident(memcmp)(s1 + size, s2, 1), RightOOBReadMessage(0)); - EXPECT_DEATH(Ident(memcmp)(s1, s2 + size, 1), RightOOBReadMessage(0)); + EXPECT_DEATH(Ident(cmpfn)(s1 - 1, s2, 1), LeftOOBReadMessage(1)); + EXPECT_DEATH(Ident(cmpfn)(s1, s2 - 1, 1), LeftOOBReadMessage(1)); + EXPECT_DEATH(Ident(cmpfn)(s1 + size, s2, 1), RightOOBReadMessage(0)); + EXPECT_DEATH(Ident(cmpfn)(s1, s2 + size, 1), RightOOBReadMessage(0)); // Hit unallocated memory and die. - EXPECT_DEATH(Ident(memcmp)(s1 + 1, s2 + 1, size), RightOOBReadMessage(0)); - EXPECT_DEATH(Ident(memcmp)(s1 + size - 1, s2, 2), RightOOBReadMessage(0)); + EXPECT_DEATH(Ident(cmpfn)(s1 + 1, s2 + 1, size), RightOOBReadMessage(0)); + EXPECT_DEATH(Ident(cmpfn)(s1 + size - 1, s2, 2), RightOOBReadMessage(0)); // Zero bytes are not terminators and don't prevent from OOB. s1[size - 1] = '\0'; s2[size - 1] = '\0'; - EXPECT_DEATH(Ident(memcmp)(s1, s2, size + 1), RightOOBReadMessage(0)); + EXPECT_DEATH(Ident(cmpfn)(s1, s2, size + 1), RightOOBReadMessage(0)); // Even if the buffers differ in the first byte, we still assume that - // memcmp may access the whole buffer and thus reporting the overflow here: + // cmpfn may access the whole buffer and thus reporting the overflow here: s1[0] = 1; s2[0] = 123; - EXPECT_DEATH(Ident(memcmp)(s1, s2, size + 1), RightOOBReadMessage(0)); + EXPECT_DEATH(Ident(cmpfn)(s1, s2, size + 1), RightOOBReadMessage(0)); free(s1); free(s2); } +TEST(AddressSanitizer, MemCmpOOBTest) { CmpOOBTestCommon(); } - +TEST(AddressSanitizer, BCmpOOBTest) { +#if (defined(__linux__) && !defined(__ANDROID__) && defined(_GNU_SOURCE)) || \ + defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__) + CmpOOBTestCommon(); +#endif +} diff --git a/compiler-rt/lib/builtins/cpu_model.c b/compiler-rt/lib/builtins/cpu_model.c index b6be55a6673c1..fc57820309725 100644 --- a/compiler-rt/lib/builtins/cpu_model.c +++ b/compiler-rt/lib/builtins/cpu_model.c @@ -80,6 +80,8 @@ enum ProcessorSubtypes { INTEL_COREI7_CANNONLAKE, INTEL_COREI7_ICELAKE_CLIENT, INTEL_COREI7_ICELAKE_SERVER, + AMDFAM17H_ZNVER2, + INTEL_COREI7_CASCADELAKE, CPU_SUBTYPE_MAX }; @@ -268,7 +270,8 @@ static void detectX86FamilyModel(unsigned EAX, unsigned *Family, static void getIntelProcessorTypeAndSubtype(unsigned Family, unsigned Model, unsigned Brand_id, unsigned Features, - unsigned *Type, unsigned *Subtype) { + unsigned Features2, unsigned *Type, + unsigned *Subtype) { if (Brand_id != 0) return; switch (Family) { @@ -347,7 +350,10 @@ getIntelProcessorTypeAndSubtype(unsigned Family, unsigned Model, // Skylake Xeon: case 0x55: *Type = INTEL_COREI7; - *Subtype = INTEL_COREI7_SKYLAKE_AVX512; // "skylake-avx512" + if (Features2 & (1 << (FEATURE_AVX512VNNI - 32))) + *Subtype = INTEL_COREI7_CASCADELAKE; // "cascadelake" + else + *Subtype = INTEL_COREI7_SKYLAKE_AVX512; // "skylake-avx512" break; // Cannonlake: @@ -400,8 +406,8 @@ getIntelProcessorTypeAndSubtype(unsigned Family, unsigned Model, } static void getAMDProcessorTypeAndSubtype(unsigned Family, unsigned Model, - unsigned Features, unsigned *Type, - unsigned *Subtype) { + unsigned Features, unsigned Features2, + unsigned *Type, unsigned *Subtype) { // FIXME: this poorly matches the generated SubtargetFeatureKV table. There // appears to be no way to generate the wide variety of AMD-specific targets // from the information returned from CPUID. @@ -447,7 +453,14 @@ static void getAMDProcessorTypeAndSubtype(unsigned Family, unsigned Model, break; // "btver2" case 23: *Type = AMDFAM17H; - *Subtype = AMDFAM17H_ZNVER1; + if (Model >= 0x30 && Model <= 0x3f) { + *Subtype = AMDFAM17H_ZNVER2; + break; // "znver2"; 30h-3fh: Zen2 + } + if (Model <= 0x0f) { + *Subtype = AMDFAM17H_ZNVER1; + break; // "znver1"; 00h-0Fh: Zen1 + } break; default: break; // "generic" @@ -628,12 +641,13 @@ __cpu_indicator_init(void) { if (Vendor == SIG_INTEL) { /* Get CPU type. */ getIntelProcessorTypeAndSubtype(Family, Model, Brand_id, Features, + Features2, &(__cpu_model.__cpu_type), &(__cpu_model.__cpu_subtype)); __cpu_model.__cpu_vendor = VENDOR_INTEL; } else if (Vendor == SIG_AMD) { /* Get CPU type. */ - getAMDProcessorTypeAndSubtype(Family, Model, Features, + getAMDProcessorTypeAndSubtype(Family, Model, Features, Features2, &(__cpu_model.__cpu_type), &(__cpu_model.__cpu_subtype)); __cpu_model.__cpu_vendor = VENDOR_AMD; diff --git a/compiler-rt/lib/cfi/CMakeLists.txt b/compiler-rt/lib/cfi/CMakeLists.txt index 463a1fd599153..9a641d33ac483 100644 --- a/compiler-rt/lib/cfi/CMakeLists.txt +++ b/compiler-rt/lib/cfi/CMakeLists.txt @@ -1,7 +1,9 @@ add_compiler_rt_component(cfi) if(OS_NAME MATCHES "Linux" OR OS_NAME MATCHES "FreeBSD" OR OS_NAME MATCHES "NetBSD") - set(CFI_SOURCES cfi.cc) + set(CFI_SOURCES + cfi.cpp + ) include_directories(..) diff --git a/compiler-rt/lib/cfi/cfi.cc b/compiler-rt/lib/cfi/cfi.cc deleted file mode 100644 index a7d52d122d2ed..0000000000000 --- a/compiler-rt/lib/cfi/cfi.cc +++ /dev/null @@ -1,476 +0,0 @@ -//===-------- cfi.cc ------------------------------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// -// -// This file implements the runtime support for the cross-DSO CFI. -// -//===----------------------------------------------------------------------===// - -#include -#include - -#include "sanitizer_common/sanitizer_common.h" -#if SANITIZER_FREEBSD -#include -#endif -#include -#include -#include -#include - -#if SANITIZER_LINUX -typedef ElfW(Phdr) Elf_Phdr; -typedef ElfW(Ehdr) Elf_Ehdr; -typedef ElfW(Addr) Elf_Addr; -typedef ElfW(Sym) Elf_Sym; -typedef ElfW(Dyn) Elf_Dyn; -#elif SANITIZER_FREEBSD -#if SANITIZER_WORDSIZE == 64 -#define ElfW64_Dyn Elf_Dyn -#define ElfW64_Sym Elf_Sym -#else -#define ElfW32_Dyn Elf_Dyn -#define ElfW32_Sym Elf_Sym -#endif -#endif - -#include "interception/interception.h" -#include "sanitizer_common/sanitizer_flag_parser.h" -#include "ubsan/ubsan_init.h" -#include "ubsan/ubsan_flags.h" - -#ifdef CFI_ENABLE_DIAG -#include "ubsan/ubsan_handlers.h" -#endif - -using namespace __sanitizer; - -namespace __cfi { - -#define kCfiShadowLimitsStorageSize 4096 // 1 page -// Lets hope that the data segment is mapped with 4K pages. -// The pointer to the cfi shadow region is stored at the start of this page. -// The rest of the page is unused and re-mapped read-only. -static union { - char space[kCfiShadowLimitsStorageSize]; - struct { - uptr start; - uptr size; - } limits; -} cfi_shadow_limits_storage - __attribute__((aligned(kCfiShadowLimitsStorageSize))); -static constexpr uptr kShadowGranularity = 12; -static constexpr uptr kShadowAlign = 1UL << kShadowGranularity; // 4096 - -static constexpr uint16_t kInvalidShadow = 0; -static constexpr uint16_t kUncheckedShadow = 0xFFFFU; - -// Get the start address of the CFI shadow region. -uptr GetShadow() { - return cfi_shadow_limits_storage.limits.start; -} - -uptr GetShadowSize() { - return cfi_shadow_limits_storage.limits.size; -} - -// This will only work while the shadow is not allocated. -void SetShadowSize(uptr size) { - cfi_shadow_limits_storage.limits.size = size; -} - -uptr MemToShadowOffset(uptr x) { - return (x >> kShadowGranularity) << 1; -} - -uint16_t *MemToShadow(uptr x, uptr shadow_base) { - return (uint16_t *)(shadow_base + MemToShadowOffset(x)); -} - -typedef int (*CFICheckFn)(u64, void *, void *); - -// This class reads and decodes the shadow contents. -class ShadowValue { - uptr addr; - uint16_t v; - explicit ShadowValue(uptr addr, uint16_t v) : addr(addr), v(v) {} - -public: - bool is_invalid() const { return v == kInvalidShadow; } - - bool is_unchecked() const { return v == kUncheckedShadow; } - - CFICheckFn get_cfi_check() const { - assert(!is_invalid() && !is_unchecked()); - uptr aligned_addr = addr & ~(kShadowAlign - 1); - uptr p = aligned_addr - (((uptr)v - 1) << kShadowGranularity); - return reinterpret_cast(p); - } - - // Load a shadow value for the given application memory address. - static const ShadowValue load(uptr addr) { - uptr shadow_base = GetShadow(); - uptr shadow_offset = MemToShadowOffset(addr); - if (shadow_offset > GetShadowSize()) - return ShadowValue(addr, kInvalidShadow); - else - return ShadowValue( - addr, *reinterpret_cast(shadow_base + shadow_offset)); - } -}; - -class ShadowBuilder { - uptr shadow_; - -public: - // Allocate a new empty shadow (for the entire address space) on the side. - void Start(); - // Mark the given address range as unchecked. - // This is used for uninstrumented libraries like libc. - // Any CFI check with a target in that range will pass. - void AddUnchecked(uptr begin, uptr end); - // Mark the given address range as belonging to a library with the given - // cfi_check function. - void Add(uptr begin, uptr end, uptr cfi_check); - // Finish shadow construction. Atomically switch the current active shadow - // region with the newly constructed one and deallocate the former. - void Install(); -}; - -void ShadowBuilder::Start() { - shadow_ = (uptr)MmapNoReserveOrDie(GetShadowSize(), "CFI shadow"); - VReport(1, "CFI: shadow at %zx .. %zx\n", shadow_, shadow_ + GetShadowSize()); -} - -void ShadowBuilder::AddUnchecked(uptr begin, uptr end) { - uint16_t *shadow_begin = MemToShadow(begin, shadow_); - uint16_t *shadow_end = MemToShadow(end - 1, shadow_) + 1; - // memset takes a byte, so our unchecked shadow value requires both bytes to - // be the same. Make sure we're ok during compilation. - static_assert((kUncheckedShadow & 0xff) == ((kUncheckedShadow >> 8) & 0xff), - "Both bytes of the 16-bit value must be the same!"); - memset(shadow_begin, kUncheckedShadow & 0xff, - (shadow_end - shadow_begin) * sizeof(*shadow_begin)); -} - -void ShadowBuilder::Add(uptr begin, uptr end, uptr cfi_check) { - assert((cfi_check & (kShadowAlign - 1)) == 0); - - // Don't fill anything below cfi_check. We can not represent those addresses - // in the shadow, and must make sure at codegen to place all valid call - // targets above cfi_check. - begin = Max(begin, cfi_check); - uint16_t *s = MemToShadow(begin, shadow_); - uint16_t *s_end = MemToShadow(end - 1, shadow_) + 1; - uint16_t sv = ((begin - cfi_check) >> kShadowGranularity) + 1; - for (; s < s_end; s++, sv++) - *s = sv; -} - -#if SANITIZER_LINUX || SANITIZER_FREEBSD || SANITIZER_NETBSD -void ShadowBuilder::Install() { - MprotectReadOnly(shadow_, GetShadowSize()); - uptr main_shadow = GetShadow(); - if (main_shadow) { - // Update. -#if SANITIZER_LINUX - void *res = mremap((void *)shadow_, GetShadowSize(), GetShadowSize(), - MREMAP_MAYMOVE | MREMAP_FIXED, (void *)main_shadow); - CHECK(res != MAP_FAILED); -#elif SANITIZER_NETBSD - void *res = mremap((void *)shadow_, GetShadowSize(), (void *)main_shadow, - GetShadowSize(), MAP_FIXED); - CHECK(res != MAP_FAILED); -#else - void *res = MmapFixedOrDie(shadow_, GetShadowSize()); - CHECK(res != MAP_FAILED); - ::memcpy(&shadow_, &main_shadow, GetShadowSize()); -#endif - } else { - // Initial setup. - CHECK_EQ(kCfiShadowLimitsStorageSize, GetPageSizeCached()); - CHECK_EQ(0, GetShadow()); - cfi_shadow_limits_storage.limits.start = shadow_; - MprotectReadOnly((uptr)&cfi_shadow_limits_storage, - sizeof(cfi_shadow_limits_storage)); - CHECK_EQ(shadow_, GetShadow()); - } -} -#else -#error not implemented -#endif - -// This is a workaround for a glibc bug: -// https://sourceware.org/bugzilla/show_bug.cgi?id=15199 -// Other platforms can, hopefully, just do -// dlopen(RTLD_NOLOAD | RTLD_LAZY) -// dlsym("__cfi_check"). -uptr find_cfi_check_in_dso(dl_phdr_info *info) { - const Elf_Dyn *dynamic = nullptr; - for (int i = 0; i < info->dlpi_phnum; ++i) { - if (info->dlpi_phdr[i].p_type == PT_DYNAMIC) { - dynamic = - (const Elf_Dyn *)(info->dlpi_addr + info->dlpi_phdr[i].p_vaddr); - break; - } - } - if (!dynamic) return 0; - uptr strtab = 0, symtab = 0, strsz = 0; - for (const Elf_Dyn *p = dynamic; p->d_tag != PT_NULL; ++p) { - if (p->d_tag == DT_SYMTAB) - symtab = p->d_un.d_ptr; - else if (p->d_tag == DT_STRTAB) - strtab = p->d_un.d_ptr; - else if (p->d_tag == DT_STRSZ) - strsz = p->d_un.d_ptr; - } - - if (symtab > strtab) { - VReport(1, "Can not handle: symtab > strtab (%p > %zx)\n", symtab, strtab); - return 0; - } - - // Verify that strtab and symtab are inside of the same LOAD segment. - // This excludes VDSO, which has (very high) bogus strtab and symtab pointers. - int phdr_idx; - for (phdr_idx = 0; phdr_idx < info->dlpi_phnum; phdr_idx++) { - const Elf_Phdr *phdr = &info->dlpi_phdr[phdr_idx]; - if (phdr->p_type == PT_LOAD) { - uptr beg = info->dlpi_addr + phdr->p_vaddr; - uptr end = beg + phdr->p_memsz; - if (strtab >= beg && strtab + strsz < end && symtab >= beg && - symtab < end) - break; - } - } - if (phdr_idx == info->dlpi_phnum) { - // Nope, either different segments or just bogus pointers. - // Can not handle this. - VReport(1, "Can not handle: symtab %p, strtab %zx\n", symtab, strtab); - return 0; - } - - for (const Elf_Sym *p = (const Elf_Sym *)symtab; (Elf_Addr)p < strtab; - ++p) { - // There is no reliable way to find the end of the symbol table. In - // lld-produces files, there are other sections between symtab and strtab. - // Stop looking when the symbol name is not inside strtab. - if (p->st_name >= strsz) break; - char *name = (char*)(strtab + p->st_name); - if (strcmp(name, "__cfi_check") == 0) { - assert(p->st_info == ELF32_ST_INFO(STB_GLOBAL, STT_FUNC) || - p->st_info == ELF32_ST_INFO(STB_WEAK, STT_FUNC)); - uptr addr = info->dlpi_addr + p->st_value; - return addr; - } - } - return 0; -} - -int dl_iterate_phdr_cb(dl_phdr_info *info, size_t size, void *data) { - uptr cfi_check = find_cfi_check_in_dso(info); - if (cfi_check) - VReport(1, "Module '%s' __cfi_check %zx\n", info->dlpi_name, cfi_check); - - ShadowBuilder *b = reinterpret_cast(data); - - for (int i = 0; i < info->dlpi_phnum; i++) { - const Elf_Phdr *phdr = &info->dlpi_phdr[i]; - if (phdr->p_type == PT_LOAD) { - // Jump tables are in the executable segment. - // VTables are in the non-executable one. - // Need to fill shadow for both. - // FIXME: reject writable if vtables are in the r/o segment. Depend on - // PT_RELRO? - uptr cur_beg = info->dlpi_addr + phdr->p_vaddr; - uptr cur_end = cur_beg + phdr->p_memsz; - if (cfi_check) { - VReport(1, " %zx .. %zx\n", cur_beg, cur_end); - b->Add(cur_beg, cur_end, cfi_check); - } else { - b->AddUnchecked(cur_beg, cur_end); - } - } - } - return 0; -} - -// Init or update shadow for the current set of loaded libraries. -void UpdateShadow() { - ShadowBuilder b; - b.Start(); - dl_iterate_phdr(dl_iterate_phdr_cb, &b); - b.Install(); -} - -void InitShadow() { - CHECK_EQ(0, GetShadow()); - CHECK_EQ(0, GetShadowSize()); - - uptr vma = GetMaxUserVirtualAddress(); - // Shadow is 2 -> 2**kShadowGranularity. - SetShadowSize((vma >> (kShadowGranularity - 1)) + 1); - VReport(1, "CFI: VMA size %zx, shadow size %zx\n", vma, GetShadowSize()); - - UpdateShadow(); -} - -THREADLOCAL int in_loader; -BlockingMutex shadow_update_lock(LINKER_INITIALIZED); - -void EnterLoader() { - if (in_loader == 0) { - shadow_update_lock.Lock(); - } - ++in_loader; -} - -void ExitLoader() { - CHECK(in_loader > 0); - --in_loader; - UpdateShadow(); - if (in_loader == 0) { - shadow_update_lock.Unlock(); - } -} - -ALWAYS_INLINE void CfiSlowPathCommon(u64 CallSiteTypeId, void *Ptr, - void *DiagData) { - uptr Addr = (uptr)Ptr; - VReport(3, "__cfi_slowpath: %llx, %p\n", CallSiteTypeId, Ptr); - ShadowValue sv = ShadowValue::load(Addr); - if (sv.is_invalid()) { - VReport(1, "CFI: invalid memory region for a check target: %p\n", Ptr); -#ifdef CFI_ENABLE_DIAG - if (DiagData) { - __ubsan_handle_cfi_check_fail( - reinterpret_cast<__ubsan::CFICheckFailData *>(DiagData), Addr, false); - return; - } -#endif - Trap(); - } - if (sv.is_unchecked()) { - VReport(2, "CFI: unchecked call (shadow=FFFF): %p\n", Ptr); - return; - } - CFICheckFn cfi_check = sv.get_cfi_check(); - VReport(2, "__cfi_check at %p\n", cfi_check); - cfi_check(CallSiteTypeId, Ptr, DiagData); -} - -void InitializeFlags() { - SetCommonFlagsDefaults(); -#ifdef CFI_ENABLE_DIAG - __ubsan::Flags *uf = __ubsan::flags(); - uf->SetDefaults(); -#endif - - FlagParser cfi_parser; - RegisterCommonFlags(&cfi_parser); - cfi_parser.ParseString(GetEnv("CFI_OPTIONS")); - -#ifdef CFI_ENABLE_DIAG - FlagParser ubsan_parser; - __ubsan::RegisterUbsanFlags(&ubsan_parser, uf); - RegisterCommonFlags(&ubsan_parser); - - const char *ubsan_default_options = __ubsan::MaybeCallUbsanDefaultOptions(); - ubsan_parser.ParseString(ubsan_default_options); - ubsan_parser.ParseString(GetEnv("UBSAN_OPTIONS")); -#endif - - InitializeCommonFlags(); - - if (Verbosity()) - ReportUnrecognizedFlags(); - - if (common_flags()->help) { - cfi_parser.PrintFlagDescriptions(); - } -} - -} // namespace __cfi - -using namespace __cfi; - -extern "C" SANITIZER_INTERFACE_ATTRIBUTE void -__cfi_slowpath(u64 CallSiteTypeId, void *Ptr) { - CfiSlowPathCommon(CallSiteTypeId, Ptr, nullptr); -} - -#ifdef CFI_ENABLE_DIAG -extern "C" SANITIZER_INTERFACE_ATTRIBUTE void -__cfi_slowpath_diag(u64 CallSiteTypeId, void *Ptr, void *DiagData) { - CfiSlowPathCommon(CallSiteTypeId, Ptr, DiagData); -} -#endif - -static void EnsureInterceptorsInitialized(); - -// Setup shadow for dlopen()ed libraries. -// The actual shadow setup happens after dlopen() returns, which means that -// a library can not be a target of any CFI checks while its constructors are -// running. It's unclear how to fix this without some extra help from libc. -// In glibc, mmap inside dlopen is not interceptable. -// Maybe a seccomp-bpf filter? -// We could insert a high-priority constructor into the library, but that would -// not help with the uninstrumented libraries. -INTERCEPTOR(void*, dlopen, const char *filename, int flag) { - EnsureInterceptorsInitialized(); - EnterLoader(); - void *handle = REAL(dlopen)(filename, flag); - ExitLoader(); - return handle; -} - -INTERCEPTOR(int, dlclose, void *handle) { - EnsureInterceptorsInitialized(); - EnterLoader(); - int res = REAL(dlclose)(handle); - ExitLoader(); - return res; -} - -static BlockingMutex interceptor_init_lock(LINKER_INITIALIZED); -static bool interceptors_inited = false; - -static void EnsureInterceptorsInitialized() { - BlockingMutexLock lock(&interceptor_init_lock); - if (interceptors_inited) - return; - - INTERCEPT_FUNCTION(dlopen); - INTERCEPT_FUNCTION(dlclose); - - interceptors_inited = true; -} - -extern "C" SANITIZER_INTERFACE_ATTRIBUTE -#if !SANITIZER_CAN_USE_PREINIT_ARRAY -// On ELF platforms, the constructor is invoked using .preinit_array (see below) -__attribute__((constructor(0))) -#endif -void __cfi_init() { - SanitizerToolName = "CFI"; - InitializeFlags(); - InitShadow(); - -#ifdef CFI_ENABLE_DIAG - __ubsan::InitAsPlugin(); -#endif -} - -#if SANITIZER_CAN_USE_PREINIT_ARRAY -// On ELF platforms, run cfi initialization before any other constructors. -// On other platforms we use the constructor attribute to arrange to run our -// initialization early. -extern "C" { -__attribute__((section(".preinit_array"), - used)) void (*__cfi_preinit)(void) = __cfi_init; -} -#endif diff --git a/compiler-rt/lib/cfi/cfi.cpp b/compiler-rt/lib/cfi/cfi.cpp new file mode 100644 index 0000000000000..9c34e2b26e8ff --- /dev/null +++ b/compiler-rt/lib/cfi/cfi.cpp @@ -0,0 +1,476 @@ +//===-------- cfi.cpp -----------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// +// This file implements the runtime support for the cross-DSO CFI. +// +//===----------------------------------------------------------------------===// + +#include +#include + +#include "sanitizer_common/sanitizer_common.h" +#if SANITIZER_FREEBSD +#include +#endif +#include +#include +#include +#include + +#if SANITIZER_LINUX +typedef ElfW(Phdr) Elf_Phdr; +typedef ElfW(Ehdr) Elf_Ehdr; +typedef ElfW(Addr) Elf_Addr; +typedef ElfW(Sym) Elf_Sym; +typedef ElfW(Dyn) Elf_Dyn; +#elif SANITIZER_FREEBSD +#if SANITIZER_WORDSIZE == 64 +#define ElfW64_Dyn Elf_Dyn +#define ElfW64_Sym Elf_Sym +#else +#define ElfW32_Dyn Elf_Dyn +#define ElfW32_Sym Elf_Sym +#endif +#endif + +#include "interception/interception.h" +#include "sanitizer_common/sanitizer_flag_parser.h" +#include "ubsan/ubsan_init.h" +#include "ubsan/ubsan_flags.h" + +#ifdef CFI_ENABLE_DIAG +#include "ubsan/ubsan_handlers.h" +#endif + +using namespace __sanitizer; + +namespace __cfi { + +#define kCfiShadowLimitsStorageSize 4096 // 1 page +// Lets hope that the data segment is mapped with 4K pages. +// The pointer to the cfi shadow region is stored at the start of this page. +// The rest of the page is unused and re-mapped read-only. +static union { + char space[kCfiShadowLimitsStorageSize]; + struct { + uptr start; + uptr size; + } limits; +} cfi_shadow_limits_storage + __attribute__((aligned(kCfiShadowLimitsStorageSize))); +static constexpr uptr kShadowGranularity = 12; +static constexpr uptr kShadowAlign = 1UL << kShadowGranularity; // 4096 + +static constexpr uint16_t kInvalidShadow = 0; +static constexpr uint16_t kUncheckedShadow = 0xFFFFU; + +// Get the start address of the CFI shadow region. +uptr GetShadow() { + return cfi_shadow_limits_storage.limits.start; +} + +uptr GetShadowSize() { + return cfi_shadow_limits_storage.limits.size; +} + +// This will only work while the shadow is not allocated. +void SetShadowSize(uptr size) { + cfi_shadow_limits_storage.limits.size = size; +} + +uptr MemToShadowOffset(uptr x) { + return (x >> kShadowGranularity) << 1; +} + +uint16_t *MemToShadow(uptr x, uptr shadow_base) { + return (uint16_t *)(shadow_base + MemToShadowOffset(x)); +} + +typedef int (*CFICheckFn)(u64, void *, void *); + +// This class reads and decodes the shadow contents. +class ShadowValue { + uptr addr; + uint16_t v; + explicit ShadowValue(uptr addr, uint16_t v) : addr(addr), v(v) {} + +public: + bool is_invalid() const { return v == kInvalidShadow; } + + bool is_unchecked() const { return v == kUncheckedShadow; } + + CFICheckFn get_cfi_check() const { + assert(!is_invalid() && !is_unchecked()); + uptr aligned_addr = addr & ~(kShadowAlign - 1); + uptr p = aligned_addr - (((uptr)v - 1) << kShadowGranularity); + return reinterpret_cast(p); + } + + // Load a shadow value for the given application memory address. + static const ShadowValue load(uptr addr) { + uptr shadow_base = GetShadow(); + uptr shadow_offset = MemToShadowOffset(addr); + if (shadow_offset > GetShadowSize()) + return ShadowValue(addr, kInvalidShadow); + else + return ShadowValue( + addr, *reinterpret_cast(shadow_base + shadow_offset)); + } +}; + +class ShadowBuilder { + uptr shadow_; + +public: + // Allocate a new empty shadow (for the entire address space) on the side. + void Start(); + // Mark the given address range as unchecked. + // This is used for uninstrumented libraries like libc. + // Any CFI check with a target in that range will pass. + void AddUnchecked(uptr begin, uptr end); + // Mark the given address range as belonging to a library with the given + // cfi_check function. + void Add(uptr begin, uptr end, uptr cfi_check); + // Finish shadow construction. Atomically switch the current active shadow + // region with the newly constructed one and deallocate the former. + void Install(); +}; + +void ShadowBuilder::Start() { + shadow_ = (uptr)MmapNoReserveOrDie(GetShadowSize(), "CFI shadow"); + VReport(1, "CFI: shadow at %zx .. %zx\n", shadow_, shadow_ + GetShadowSize()); +} + +void ShadowBuilder::AddUnchecked(uptr begin, uptr end) { + uint16_t *shadow_begin = MemToShadow(begin, shadow_); + uint16_t *shadow_end = MemToShadow(end - 1, shadow_) + 1; + // memset takes a byte, so our unchecked shadow value requires both bytes to + // be the same. Make sure we're ok during compilation. + static_assert((kUncheckedShadow & 0xff) == ((kUncheckedShadow >> 8) & 0xff), + "Both bytes of the 16-bit value must be the same!"); + memset(shadow_begin, kUncheckedShadow & 0xff, + (shadow_end - shadow_begin) * sizeof(*shadow_begin)); +} + +void ShadowBuilder::Add(uptr begin, uptr end, uptr cfi_check) { + assert((cfi_check & (kShadowAlign - 1)) == 0); + + // Don't fill anything below cfi_check. We can not represent those addresses + // in the shadow, and must make sure at codegen to place all valid call + // targets above cfi_check. + begin = Max(begin, cfi_check); + uint16_t *s = MemToShadow(begin, shadow_); + uint16_t *s_end = MemToShadow(end - 1, shadow_) + 1; + uint16_t sv = ((begin - cfi_check) >> kShadowGranularity) + 1; + for (; s < s_end; s++, sv++) + *s = sv; +} + +#if SANITIZER_LINUX || SANITIZER_FREEBSD || SANITIZER_NETBSD +void ShadowBuilder::Install() { + MprotectReadOnly(shadow_, GetShadowSize()); + uptr main_shadow = GetShadow(); + if (main_shadow) { + // Update. +#if SANITIZER_LINUX + void *res = mremap((void *)shadow_, GetShadowSize(), GetShadowSize(), + MREMAP_MAYMOVE | MREMAP_FIXED, (void *)main_shadow); + CHECK(res != MAP_FAILED); +#elif SANITIZER_NETBSD + void *res = mremap((void *)shadow_, GetShadowSize(), (void *)main_shadow, + GetShadowSize(), MAP_FIXED); + CHECK(res != MAP_FAILED); +#else + void *res = MmapFixedOrDie(shadow_, GetShadowSize(), "cfi shadow"); + CHECK(res != MAP_FAILED); + ::memcpy(&shadow_, &main_shadow, GetShadowSize()); +#endif + } else { + // Initial setup. + CHECK_EQ(kCfiShadowLimitsStorageSize, GetPageSizeCached()); + CHECK_EQ(0, GetShadow()); + cfi_shadow_limits_storage.limits.start = shadow_; + MprotectReadOnly((uptr)&cfi_shadow_limits_storage, + sizeof(cfi_shadow_limits_storage)); + CHECK_EQ(shadow_, GetShadow()); + } +} +#else +#error not implemented +#endif + +// This is a workaround for a glibc bug: +// https://sourceware.org/bugzilla/show_bug.cgi?id=15199 +// Other platforms can, hopefully, just do +// dlopen(RTLD_NOLOAD | RTLD_LAZY) +// dlsym("__cfi_check"). +uptr find_cfi_check_in_dso(dl_phdr_info *info) { + const Elf_Dyn *dynamic = nullptr; + for (int i = 0; i < info->dlpi_phnum; ++i) { + if (info->dlpi_phdr[i].p_type == PT_DYNAMIC) { + dynamic = + (const Elf_Dyn *)(info->dlpi_addr + info->dlpi_phdr[i].p_vaddr); + break; + } + } + if (!dynamic) return 0; + uptr strtab = 0, symtab = 0, strsz = 0; + for (const Elf_Dyn *p = dynamic; p->d_tag != PT_NULL; ++p) { + if (p->d_tag == DT_SYMTAB) + symtab = p->d_un.d_ptr; + else if (p->d_tag == DT_STRTAB) + strtab = p->d_un.d_ptr; + else if (p->d_tag == DT_STRSZ) + strsz = p->d_un.d_ptr; + } + + if (symtab > strtab) { + VReport(1, "Can not handle: symtab > strtab (%p > %zx)\n", symtab, strtab); + return 0; + } + + // Verify that strtab and symtab are inside of the same LOAD segment. + // This excludes VDSO, which has (very high) bogus strtab and symtab pointers. + int phdr_idx; + for (phdr_idx = 0; phdr_idx < info->dlpi_phnum; phdr_idx++) { + const Elf_Phdr *phdr = &info->dlpi_phdr[phdr_idx]; + if (phdr->p_type == PT_LOAD) { + uptr beg = info->dlpi_addr + phdr->p_vaddr; + uptr end = beg + phdr->p_memsz; + if (strtab >= beg && strtab + strsz < end && symtab >= beg && + symtab < end) + break; + } + } + if (phdr_idx == info->dlpi_phnum) { + // Nope, either different segments or just bogus pointers. + // Can not handle this. + VReport(1, "Can not handle: symtab %p, strtab %zx\n", symtab, strtab); + return 0; + } + + for (const Elf_Sym *p = (const Elf_Sym *)symtab; (Elf_Addr)p < strtab; + ++p) { + // There is no reliable way to find the end of the symbol table. In + // lld-produces files, there are other sections between symtab and strtab. + // Stop looking when the symbol name is not inside strtab. + if (p->st_name >= strsz) break; + char *name = (char*)(strtab + p->st_name); + if (strcmp(name, "__cfi_check") == 0) { + assert(p->st_info == ELF32_ST_INFO(STB_GLOBAL, STT_FUNC) || + p->st_info == ELF32_ST_INFO(STB_WEAK, STT_FUNC)); + uptr addr = info->dlpi_addr + p->st_value; + return addr; + } + } + return 0; +} + +int dl_iterate_phdr_cb(dl_phdr_info *info, size_t size, void *data) { + uptr cfi_check = find_cfi_check_in_dso(info); + if (cfi_check) + VReport(1, "Module '%s' __cfi_check %zx\n", info->dlpi_name, cfi_check); + + ShadowBuilder *b = reinterpret_cast(data); + + for (int i = 0; i < info->dlpi_phnum; i++) { + const Elf_Phdr *phdr = &info->dlpi_phdr[i]; + if (phdr->p_type == PT_LOAD) { + // Jump tables are in the executable segment. + // VTables are in the non-executable one. + // Need to fill shadow for both. + // FIXME: reject writable if vtables are in the r/o segment. Depend on + // PT_RELRO? + uptr cur_beg = info->dlpi_addr + phdr->p_vaddr; + uptr cur_end = cur_beg + phdr->p_memsz; + if (cfi_check) { + VReport(1, " %zx .. %zx\n", cur_beg, cur_end); + b->Add(cur_beg, cur_end, cfi_check); + } else { + b->AddUnchecked(cur_beg, cur_end); + } + } + } + return 0; +} + +// Init or update shadow for the current set of loaded libraries. +void UpdateShadow() { + ShadowBuilder b; + b.Start(); + dl_iterate_phdr(dl_iterate_phdr_cb, &b); + b.Install(); +} + +void InitShadow() { + CHECK_EQ(0, GetShadow()); + CHECK_EQ(0, GetShadowSize()); + + uptr vma = GetMaxUserVirtualAddress(); + // Shadow is 2 -> 2**kShadowGranularity. + SetShadowSize((vma >> (kShadowGranularity - 1)) + 1); + VReport(1, "CFI: VMA size %zx, shadow size %zx\n", vma, GetShadowSize()); + + UpdateShadow(); +} + +THREADLOCAL int in_loader; +BlockingMutex shadow_update_lock(LINKER_INITIALIZED); + +void EnterLoader() { + if (in_loader == 0) { + shadow_update_lock.Lock(); + } + ++in_loader; +} + +void ExitLoader() { + CHECK(in_loader > 0); + --in_loader; + UpdateShadow(); + if (in_loader == 0) { + shadow_update_lock.Unlock(); + } +} + +ALWAYS_INLINE void CfiSlowPathCommon(u64 CallSiteTypeId, void *Ptr, + void *DiagData) { + uptr Addr = (uptr)Ptr; + VReport(3, "__cfi_slowpath: %llx, %p\n", CallSiteTypeId, Ptr); + ShadowValue sv = ShadowValue::load(Addr); + if (sv.is_invalid()) { + VReport(1, "CFI: invalid memory region for a check target: %p\n", Ptr); +#ifdef CFI_ENABLE_DIAG + if (DiagData) { + __ubsan_handle_cfi_check_fail( + reinterpret_cast<__ubsan::CFICheckFailData *>(DiagData), Addr, false); + return; + } +#endif + Trap(); + } + if (sv.is_unchecked()) { + VReport(2, "CFI: unchecked call (shadow=FFFF): %p\n", Ptr); + return; + } + CFICheckFn cfi_check = sv.get_cfi_check(); + VReport(2, "__cfi_check at %p\n", cfi_check); + cfi_check(CallSiteTypeId, Ptr, DiagData); +} + +void InitializeFlags() { + SetCommonFlagsDefaults(); +#ifdef CFI_ENABLE_DIAG + __ubsan::Flags *uf = __ubsan::flags(); + uf->SetDefaults(); +#endif + + FlagParser cfi_parser; + RegisterCommonFlags(&cfi_parser); + cfi_parser.ParseString(GetEnv("CFI_OPTIONS")); + +#ifdef CFI_ENABLE_DIAG + FlagParser ubsan_parser; + __ubsan::RegisterUbsanFlags(&ubsan_parser, uf); + RegisterCommonFlags(&ubsan_parser); + + const char *ubsan_default_options = __ubsan::MaybeCallUbsanDefaultOptions(); + ubsan_parser.ParseString(ubsan_default_options); + ubsan_parser.ParseString(GetEnv("UBSAN_OPTIONS")); +#endif + + InitializeCommonFlags(); + + if (Verbosity()) + ReportUnrecognizedFlags(); + + if (common_flags()->help) { + cfi_parser.PrintFlagDescriptions(); + } +} + +} // namespace __cfi + +using namespace __cfi; + +extern "C" SANITIZER_INTERFACE_ATTRIBUTE void +__cfi_slowpath(u64 CallSiteTypeId, void *Ptr) { + CfiSlowPathCommon(CallSiteTypeId, Ptr, nullptr); +} + +#ifdef CFI_ENABLE_DIAG +extern "C" SANITIZER_INTERFACE_ATTRIBUTE void +__cfi_slowpath_diag(u64 CallSiteTypeId, void *Ptr, void *DiagData) { + CfiSlowPathCommon(CallSiteTypeId, Ptr, DiagData); +} +#endif + +static void EnsureInterceptorsInitialized(); + +// Setup shadow for dlopen()ed libraries. +// The actual shadow setup happens after dlopen() returns, which means that +// a library can not be a target of any CFI checks while its constructors are +// running. It's unclear how to fix this without some extra help from libc. +// In glibc, mmap inside dlopen is not interceptable. +// Maybe a seccomp-bpf filter? +// We could insert a high-priority constructor into the library, but that would +// not help with the uninstrumented libraries. +INTERCEPTOR(void*, dlopen, const char *filename, int flag) { + EnsureInterceptorsInitialized(); + EnterLoader(); + void *handle = REAL(dlopen)(filename, flag); + ExitLoader(); + return handle; +} + +INTERCEPTOR(int, dlclose, void *handle) { + EnsureInterceptorsInitialized(); + EnterLoader(); + int res = REAL(dlclose)(handle); + ExitLoader(); + return res; +} + +static BlockingMutex interceptor_init_lock(LINKER_INITIALIZED); +static bool interceptors_inited = false; + +static void EnsureInterceptorsInitialized() { + BlockingMutexLock lock(&interceptor_init_lock); + if (interceptors_inited) + return; + + INTERCEPT_FUNCTION(dlopen); + INTERCEPT_FUNCTION(dlclose); + + interceptors_inited = true; +} + +extern "C" SANITIZER_INTERFACE_ATTRIBUTE +#if !SANITIZER_CAN_USE_PREINIT_ARRAY +// On ELF platforms, the constructor is invoked using .preinit_array (see below) +__attribute__((constructor(0))) +#endif +void __cfi_init() { + SanitizerToolName = "CFI"; + InitializeFlags(); + InitShadow(); + +#ifdef CFI_ENABLE_DIAG + __ubsan::InitAsPlugin(); +#endif +} + +#if SANITIZER_CAN_USE_PREINIT_ARRAY +// On ELF platforms, run cfi initialization before any other constructors. +// On other platforms we use the constructor attribute to arrange to run our +// initialization early. +extern "C" { +__attribute__((section(".preinit_array"), + used)) void (*__cfi_preinit)(void) = __cfi_init; +} +#endif diff --git a/compiler-rt/lib/esan/esan_interceptors.cpp b/compiler-rt/lib/esan/esan_interceptors.cpp index 2f454f07ca7d2..1e8e67c4bb339 100644 --- a/compiler-rt/lib/esan/esan_interceptors.cpp +++ b/compiler-rt/lib/esan/esan_interceptors.cpp @@ -45,6 +45,7 @@ DECLARE_REAL_AND_INTERCEPTOR(void *, malloc, uptr) // We provide our own version: #undef SANITIZER_INTERCEPT_SIGPROCMASK +#undef SANITIZER_INTERCEPT_PTHREAD_SIGMASK #define COMMON_INTERCEPTOR_NOTHING_IS_INITIALIZED (!EsanIsInitialized) diff --git a/compiler-rt/lib/fuzzer/CMakeLists.txt b/compiler-rt/lib/fuzzer/CMakeLists.txt index 0a696de9b3fae..aa62995e72985 100644 --- a/compiler-rt/lib/fuzzer/CMakeLists.txt +++ b/compiler-rt/lib/fuzzer/CMakeLists.txt @@ -6,6 +6,7 @@ set(LIBFUZZER_SOURCES FuzzerExtFunctionsWeak.cpp FuzzerExtFunctionsWindows.cpp FuzzerExtraCounters.cpp + FuzzerFork.cpp FuzzerIO.cpp FuzzerIOPosix.cpp FuzzerIOWindows.cpp @@ -32,6 +33,7 @@ set(LIBFUZZER_HEADERS FuzzerExtFunctions.def FuzzerExtFunctions.h FuzzerFlags.def + FuzzerFork.h FuzzerIO.h FuzzerInterface.h FuzzerInternal.h @@ -53,7 +55,9 @@ CHECK_CXX_SOURCE_COMPILES(" set(LIBFUZZER_CFLAGS ${SANITIZER_COMMON_CFLAGS}) -if(OS_NAME MATCHES "Linux|Fuchsia" AND COMPILER_RT_LIBCXX_PATH) +if(OS_NAME MATCHES "Linux|Fuchsia" AND + COMPILER_RT_LIBCXX_PATH AND + COMPILER_RT_LIBCXXABI_PATH) list(APPEND LIBFUZZER_CFLAGS -nostdinc++ -D_LIBCPP_ABI_VERSION=Fuzzer) # Remove -stdlib= which is unused when passing -nostdinc++. string(REGEX REPLACE "-stdlib=[a-zA-Z+]*" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) @@ -111,7 +115,9 @@ add_compiler_rt_runtime(clang_rt.fuzzer_no_main CFLAGS ${LIBFUZZER_CFLAGS} PARENT_TARGET fuzzer) -if(OS_NAME MATCHES "Linux|Fuchsia" AND COMPILER_RT_LIBCXX_PATH) +if(OS_NAME MATCHES "Linux|Fuchsia" AND + COMPILER_RT_LIBCXX_PATH AND + COMPILER_RT_LIBCXXABI_PATH) macro(partially_link_libcxx name dir arch) set(cxx_${arch}_merge_dir "${CMAKE_CURRENT_BINARY_DIR}/cxx_${arch}_merge.dir") file(MAKE_DIRECTORY ${cxx_${arch}_merge_dir}) @@ -129,13 +135,8 @@ if(OS_NAME MATCHES "Linux|Fuchsia" AND COMPILER_RT_LIBCXX_PATH) set(LIBCXX_${arch}_PREFIX ${CMAKE_CURRENT_BINARY_DIR}/libcxx_fuzzer_${arch}) add_custom_libcxx(libcxx_fuzzer_${arch} ${LIBCXX_${arch}_PREFIX} CFLAGS ${TARGET_CFLAGS} - -D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS=1 - -fvisibility=hidden CMAKE_ARGS -DCMAKE_CXX_COMPILER_WORKS=ON - -DLIBCXX_ENABLE_EXCEPTIONS=OFF - -DLIBCXX_ENABLE_SHARED=OFF - -DLIBCXX_ABI_NAMESPACE=Fuzzer - -DLIBCXX_CXX_ABI=none) + -DLIBCXX_ABI_NAMESPACE=Fuzzer) target_compile_options(RTfuzzer.${arch} PRIVATE -isystem ${LIBCXX_${arch}_PREFIX}/include/c++/v1) add_dependencies(RTfuzzer.${arch} libcxx_fuzzer_${arch}-build) target_compile_options(RTfuzzer_main.${arch} PRIVATE -isystem ${LIBCXX_${arch}_PREFIX}/include/c++/v1) diff --git a/compiler-rt/lib/fuzzer/FuzzerCorpus.h b/compiler-rt/lib/fuzzer/FuzzerCorpus.h index 416b3b5de1e7f..23a9a89bf4a05 100644 --- a/compiler-rt/lib/fuzzer/FuzzerCorpus.h +++ b/compiler-rt/lib/fuzzer/FuzzerCorpus.h @@ -169,7 +169,7 @@ class InputCorpus { InputInfo &II = *Inputs[ChooseUnitIdxToMutate(Rand)]; assert(!II.U.empty()); return II; - }; + } // Returns an index of random unit from the corpus to mutate. size_t ChooseUnitIdxToMutate(Random &Rand) { diff --git a/compiler-rt/lib/fuzzer/FuzzerDriver.cpp b/compiler-rt/lib/fuzzer/FuzzerDriver.cpp index 0f8389cb35607..9c99d5ffb5e1c 100644 --- a/compiler-rt/lib/fuzzer/FuzzerDriver.cpp +++ b/compiler-rt/lib/fuzzer/FuzzerDriver.cpp @@ -10,9 +10,11 @@ #include "FuzzerCommand.h" #include "FuzzerCorpus.h" +#include "FuzzerFork.h" #include "FuzzerIO.h" #include "FuzzerInterface.h" #include "FuzzerInternal.h" +#include "FuzzerMerge.h" #include "FuzzerMutate.h" #include "FuzzerRandom.h" #include "FuzzerTracePC.h" @@ -24,6 +26,7 @@ #include #include #include +#include // This function should be present in the libFuzzer so that the client // binary can test for its existence. @@ -319,10 +322,8 @@ int CleanseCrashInput(const Vector &Args, assert(Cmd.hasArgument(InputFilePath)); Cmd.removeArgument(InputFilePath); - auto LogFilePath = DirPlusFile( - TmpDir(), "libFuzzerTemp." + std::to_string(GetPid()) + ".txt"); - auto TmpFilePath = DirPlusFile( - TmpDir(), "libFuzzerTemp." + std::to_string(GetPid()) + ".repro"); + auto LogFilePath = TempPath(".txt"); + auto TmpFilePath = TempPath(".repro"); Cmd.addArgument(TmpFilePath); Cmd.setOutputFile(LogFilePath); Cmd.combineOutAndErr(); @@ -382,8 +383,7 @@ int MinimizeCrashInput(const Vector &Args, BaseCmd.addFlag("max_total_time", "600"); } - auto LogFilePath = DirPlusFile( - TmpDir(), "libFuzzerTemp." + std::to_string(GetPid()) + ".txt"); + auto LogFilePath = TempPath(".txt"); BaseCmd.setOutputFile(LogFilePath); BaseCmd.combineOutAndErr(); @@ -467,6 +467,34 @@ int MinimizeCrashInputInternalStep(Fuzzer *F, InputCorpus *Corpus) { return 0; } +void Merge(Fuzzer *F, FuzzingOptions &Options, const Vector &Args, + const Vector &Corpora, const char *CFPathOrNull) { + if (Corpora.size() < 2) { + Printf("INFO: Merge requires two or more corpus dirs\n"); + exit(0); + } + + Vector OldCorpus, NewCorpus; + GetSizedFilesFromDir(Corpora[0], &OldCorpus); + for (size_t i = 1; i < Corpora.size(); i++) + GetSizedFilesFromDir(Corpora[i], &NewCorpus); + std::sort(OldCorpus.begin(), OldCorpus.end()); + std::sort(NewCorpus.begin(), NewCorpus.end()); + + std::string CFPath = CFPathOrNull ? CFPathOrNull : TempPath(".txt"); + Vector NewFiles; + Set NewFeatures, NewCov; + CrashResistantMerge(Args, OldCorpus, NewCorpus, &NewFiles, {}, &NewFeatures, + {}, &NewCov, CFPath, true); + for (auto &Path : NewFiles) + F->WriteToOutputCorpus(FileToVector(Path, Options.MaxLen)); + // We are done, delete the control file if it was a temporary one. + if (!Flags.merge_control_file) + RemoveFile(CFPath); + + exit(0); +} + int AnalyzeDictionary(Fuzzer *F, const Vector& Dict, UnitVector& Corpus) { Printf("Started dictionary minimization (up to %d tests)\n", @@ -576,6 +604,9 @@ int FuzzerDriver(int *argc, char ***argv, UserCallback Callback) { Options.UnitTimeoutSec = Flags.timeout; Options.ErrorExitCode = Flags.error_exitcode; Options.TimeoutExitCode = Flags.timeout_exitcode; + Options.IgnoreTimeouts = Flags.ignore_timeouts; + Options.IgnoreOOMs = Flags.ignore_ooms; + Options.IgnoreCrashes = Flags.ignore_crashes; Options.MaxTotalTimeSec = Flags.max_total_time; Options.DoCrossOver = Flags.cross_over; Options.MutateDepth = Flags.mutate_depth; @@ -694,13 +725,11 @@ int FuzzerDriver(int *argc, char ***argv, UserCallback Callback) { exit(0); } - if (Flags.merge) { - F->CrashResistantMerge(Args, *Inputs, - Flags.load_coverage_summary, - Flags.save_coverage_summary, - Flags.merge_control_file); - exit(0); - } + if (Flags.fork) + FuzzWithFork(F->GetMD().GetRand(), Options, Args, *Inputs, Flags.fork); + + if (Flags.merge) + Merge(F, Options, Args, *Inputs, Flags.merge_control_file); if (Flags.merge_inner) { const size_t kDefaultMaxMergeLen = 1 << 20; @@ -732,7 +761,19 @@ int FuzzerDriver(int *argc, char ***argv, UserCallback Callback) { exit(0); } - F->Loop(*Inputs); + // Parse -seed_inputs=file1,file2,... + Vector ExtraSeedFiles; + if (Flags.seed_inputs) { + std::string s = Flags.seed_inputs; + size_t comma_pos; + while ((comma_pos = s.find_last_of(',')) != std::string::npos) { + ExtraSeedFiles.push_back(s.substr(comma_pos + 1)); + s = s.substr(0, comma_pos); + } + ExtraSeedFiles.push_back(s); + } + + F->Loop(*Inputs, ExtraSeedFiles); if (Flags.verbosity) Printf("Done %zd runs in %zd second(s)\n", F->getTotalNumberOfRuns(), diff --git a/compiler-rt/lib/fuzzer/FuzzerExtFunctions.def b/compiler-rt/lib/fuzzer/FuzzerExtFunctions.def index 39c1b77bde52d..288a59ce39e54 100644 --- a/compiler-rt/lib/fuzzer/FuzzerExtFunctions.def +++ b/compiler-rt/lib/fuzzer/FuzzerExtFunctions.def @@ -28,7 +28,7 @@ EXT_FUNC(LLVMFuzzerCustomCrossOver, size_t, EXT_FUNC(__lsan_enable, void, (), false); EXT_FUNC(__lsan_disable, void, (), false); EXT_FUNC(__lsan_do_recoverable_leak_check, int, (), false); -EXT_FUNC(__sanitizer_acquire_crash_state, bool, (), true); +EXT_FUNC(__sanitizer_acquire_crash_state, int, (), true); EXT_FUNC(__sanitizer_install_malloc_and_free_hooks, int, (void (*malloc_hook)(const volatile void *, size_t), void (*free_hook)(const volatile void *)), diff --git a/compiler-rt/lib/fuzzer/FuzzerExtFunctionsWindows.cpp b/compiler-rt/lib/fuzzer/FuzzerExtFunctionsWindows.cpp index 907ecb4d03899..55efe8f80e908 100644 --- a/compiler-rt/lib/fuzzer/FuzzerExtFunctionsWindows.cpp +++ b/compiler-rt/lib/fuzzer/FuzzerExtFunctionsWindows.cpp @@ -49,7 +49,7 @@ extern "C" { Printf("ERROR: Function \"%s\" not defined.\n", #NAME); \ exit(1); \ } \ - EXTERNAL_FUNC(NAME, NAME##Def) RETURN_TYPE NAME FUNC_SIG; + EXTERNAL_FUNC(NAME, NAME##Def) RETURN_TYPE NAME FUNC_SIG #include "FuzzerExtFunctions.def" diff --git a/compiler-rt/lib/fuzzer/FuzzerFlags.def b/compiler-rt/lib/fuzzer/FuzzerFlags.def index 198e4dd91e698..79eb75c3f8c23 100644 --- a/compiler-rt/lib/fuzzer/FuzzerFlags.def +++ b/compiler-rt/lib/fuzzer/FuzzerFlags.def @@ -20,6 +20,8 @@ FUZZER_FLAG_INT(len_control, 100, "Try generating small inputs first, " "then try larger inputs over time. Specifies the rate at which the length " "limit is increased (smaller == faster). If 0, immediately try inputs with " "size up to max_len.") +FUZZER_FLAG_STRING(seed_inputs, "A comma-separated list of input files " + "to use as an additional seed corpus") FUZZER_FLAG_INT(cross_over, 1, "If 1, cross over inputs.") FUZZER_FLAG_INT(mutate_depth, 5, "Apply this number of consecutive mutations to each input.") @@ -34,11 +36,16 @@ FUZZER_FLAG_INT( "If one unit runs more than this number of seconds the process will abort.") FUZZER_FLAG_INT(error_exitcode, 77, "When libFuzzer itself reports a bug " "this exit code will be used.") -FUZZER_FLAG_INT(timeout_exitcode, 77, "When libFuzzer reports a timeout " +FUZZER_FLAG_INT(timeout_exitcode, 70, "When libFuzzer reports a timeout " "this exit code will be used.") FUZZER_FLAG_INT(max_total_time, 0, "If positive, indicates the maximal total " "time in seconds to run the fuzzer.") FUZZER_FLAG_INT(help, 0, "Print help.") +FUZZER_FLAG_INT(fork, 0, "Experimental mode where fuzzing happens " + "in a subprocess") +FUZZER_FLAG_INT(ignore_timeouts, 1, "Ignore timeouts in fork mode") +FUZZER_FLAG_INT(ignore_ooms, 1, "Ignore OOMs in fork mode") +FUZZER_FLAG_INT(ignore_crashes, 0, "Ignore crashes in fork mode") FUZZER_FLAG_INT(merge, 0, "If 1, the 2-nd, 3-rd, etc corpora will be " "merged into the 1-st corpus. Only interesting units will be taken. " "This flag can be used to minimize a corpus.") @@ -48,13 +55,6 @@ FUZZER_FLAG_STRING(merge_control_file, "If a merge process gets killed it tries to leave this file " "in a state suitable for resuming the merge. " "By default a temporary file will be used.") -FUZZER_FLAG_STRING(save_coverage_summary, "Experimental:" - " save coverage summary to a given file." - " Used with -merge=1") -FUZZER_FLAG_STRING(load_coverage_summary, "Experimental:" - " load coverage summary from a given file." - " Treat this coverage as belonging to the first corpus. " - " Used with -merge=1") FUZZER_FLAG_INT(minimize_crash, 0, "If 1, minimizes the provided" " crash input. Use with -runs=N or -max_total_time=N to limit " "the number attempts." diff --git a/compiler-rt/lib/fuzzer/FuzzerFork.cpp b/compiler-rt/lib/fuzzer/FuzzerFork.cpp new file mode 100644 index 0000000000000..52a233f05ed4c --- /dev/null +++ b/compiler-rt/lib/fuzzer/FuzzerFork.cpp @@ -0,0 +1,320 @@ +//===- FuzzerFork.cpp - run fuzzing in separate subprocesses --------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// Spawn and orchestrate separate fuzzing processes. +//===----------------------------------------------------------------------===// + +#include "FuzzerCommand.h" +#include "FuzzerFork.h" +#include "FuzzerIO.h" +#include "FuzzerMerge.h" +#include "FuzzerSHA1.h" +#include "FuzzerTracePC.h" +#include "FuzzerUtil.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace fuzzer { + +struct Stats { + size_t number_of_executed_units = 0; + size_t peak_rss_mb = 0; + size_t average_exec_per_sec = 0; +}; + +static Stats ParseFinalStatsFromLog(const std::string &LogPath) { + std::ifstream In(LogPath); + std::string Line; + Stats Res; + struct { + const char *Name; + size_t *Var; + } NameVarPairs[] = { + {"stat::number_of_executed_units:", &Res.number_of_executed_units}, + {"stat::peak_rss_mb:", &Res.peak_rss_mb}, + {"stat::average_exec_per_sec:", &Res.average_exec_per_sec}, + {nullptr, nullptr}, + }; + while (std::getline(In, Line, '\n')) { + if (Line.find("stat::") != 0) continue; + std::istringstream ISS(Line); + std::string Name; + size_t Val; + ISS >> Name >> Val; + for (size_t i = 0; NameVarPairs[i].Name; i++) + if (Name == NameVarPairs[i].Name) + *NameVarPairs[i].Var = Val; + } + return Res; +} + +struct FuzzJob { + // Inputs. + Command Cmd; + std::string CorpusDir; + std::string LogPath; + std::string CFPath; + + // Fuzzing Outputs. + int ExitCode; + + ~FuzzJob() { + RemoveFile(CFPath); + RemoveFile(LogPath); + RmDirRecursive(CorpusDir); + } +}; + +struct GlobalEnv { + Vector Args; + Vector CorpusDirs; + std::string MainCorpusDir; + std::string TempDir; + Set Features, Cov; + Vector Files; + Random *Rand; + std::chrono::system_clock::time_point ProcessStartTime; + int Verbosity = 0; + + size_t NumTimeouts = 0; + size_t NumOOMs = 0; + size_t NumCrashes = 0; + + + size_t NumRuns = 0; + + size_t secondsSinceProcessStartUp() const { + return std::chrono::duration_cast( + std::chrono::system_clock::now() - ProcessStartTime) + .count(); + } + + FuzzJob *CreateNewJob(size_t JobId) { + Command Cmd(Args); + Cmd.removeFlag("fork"); + for (auto &C : CorpusDirs) // Remove all corpora from the args. + Cmd.removeArgument(C); + Cmd.addFlag("reload", "0"); // working in an isolated dir, no reload. + Cmd.addFlag("print_final_stats", "1"); + Cmd.addFlag("print_funcs", "0"); // no need to spend time symbolizing. + Cmd.addFlag("max_total_time", std::to_string(std::min((size_t)300, JobId))); + + auto Job = new FuzzJob; + std::string Seeds; + if (size_t CorpusSubsetSize = + std::min(Files.size(), (size_t)sqrt(Files.size() + 2))) + for (size_t i = 0; i < CorpusSubsetSize; i++) + Seeds += (Seeds.empty() ? "" : ",") + + Files[Rand->SkewTowardsLast(Files.size())]; + if (!Seeds.empty()) + Cmd.addFlag("seed_inputs", Seeds); + Job->LogPath = DirPlusFile(TempDir, std::to_string(JobId) + ".log"); + Job->CorpusDir = DirPlusFile(TempDir, "C" + std::to_string(JobId)); + Job->CFPath = DirPlusFile(TempDir, std::to_string(JobId) + ".merge"); + + + Cmd.addArgument(Job->CorpusDir); + RmDirRecursive(Job->CorpusDir); + MkDir(Job->CorpusDir); + + Cmd.setOutputFile(Job->LogPath); + Cmd.combineOutAndErr(); + + Job->Cmd = Cmd; + + if (Verbosity >= 2) + Printf("Job %zd/%p Created: %s\n", JobId, Job, + Job->Cmd.toString().c_str()); + // Start from very short runs and gradually increase them. + return Job; + } + + void RunOneMergeJob(FuzzJob *Job) { + Vector TempFiles; + GetSizedFilesFromDir(Job->CorpusDir, &TempFiles); + + Vector FilesToAdd; + Set NewFeatures, NewCov; + CrashResistantMerge(Args, {}, TempFiles, &FilesToAdd, Features, + &NewFeatures, Cov, &NewCov, Job->CFPath, false); + for (auto &Path : FilesToAdd) { + auto U = FileToVector(Path); + auto NewPath = DirPlusFile(MainCorpusDir, Hash(U)); + WriteToFile(U, NewPath); + Files.push_back(NewPath); + } + Features.insert(NewFeatures.begin(), NewFeatures.end()); + Cov.insert(NewCov.begin(), NewCov.end()); + for (auto Idx : NewCov) + if (auto *TE = TPC.PCTableEntryByIdx(Idx)) + if (TPC.PcIsFuncEntry(TE)) + PrintPC(" NEW_FUNC: %p %F %L\n", "", + TPC.GetNextInstructionPc(TE->PC)); + + auto Stats = ParseFinalStatsFromLog(Job->LogPath); + NumRuns += Stats.number_of_executed_units; + if (!FilesToAdd.empty() || Job->ExitCode != 0) + Printf("#%zd: cov: %zd ft: %zd corp: %zd exec/s %zd " + "oom/timeout/crash: %zd/%zd/%zd time: %zds\n", NumRuns, + Cov.size(), Features.size(), Files.size(), + Stats.average_exec_per_sec, + NumOOMs, NumTimeouts, NumCrashes, secondsSinceProcessStartUp()); + } +}; + +struct JobQueue { + std::queue Qu; + std::mutex Mu; + + void Push(FuzzJob *Job) { + std::lock_guard Lock(Mu); + Qu.push(Job); + } + FuzzJob *Pop() { + std::lock_guard Lock(Mu); + if (Qu.empty()) return nullptr; + auto Job = Qu.front(); + Qu.pop(); + return Job; + } +}; + +void WorkerThread(std::atomic *Stop, JobQueue *FuzzQ, JobQueue *MergeQ) { + while (!Stop->load()) { + auto Job = FuzzQ->Pop(); + // Printf("WorkerThread: job %p\n", Job); + if (!Job) { + SleepSeconds(1); + continue; + } + Job->ExitCode = ExecuteCommand(Job->Cmd); + MergeQ->Push(Job); + } +} + +// This is just a skeleton of an experimental -fork=1 feature. +void FuzzWithFork(Random &Rand, const FuzzingOptions &Options, + const Vector &Args, + const Vector &CorpusDirs, int NumJobs) { + Printf("INFO: -fork=%d: fuzzing in separate process(s)\n", NumJobs); + + GlobalEnv Env; + Env.Args = Args; + Env.CorpusDirs = CorpusDirs; + Env.Rand = &Rand; + Env.Verbosity = Options.Verbosity; + Env.ProcessStartTime = std::chrono::system_clock::now(); + + Vector SeedFiles; + for (auto &Dir : CorpusDirs) + GetSizedFilesFromDir(Dir, &SeedFiles); + std::sort(SeedFiles.begin(), SeedFiles.end()); + Env.TempDir = TempPath(".dir"); + RmDirRecursive(Env.TempDir); // in case there is a leftover from old runs. + MkDir(Env.TempDir); + + + if (CorpusDirs.empty()) + MkDir(Env.MainCorpusDir = DirPlusFile(Env.TempDir, "C")); + else + Env.MainCorpusDir = CorpusDirs[0]; + + auto CFPath = DirPlusFile(Env.TempDir, "merge.txt"); + CrashResistantMerge(Env.Args, {}, SeedFiles, &Env.Files, {}, &Env.Features, + {}, &Env.Cov, + CFPath, false); + RemoveFile(CFPath); + Printf("INFO: -fork=%d: %zd seed inputs, starting to fuzz in %s\n", NumJobs, + Env.Files.size(), Env.TempDir.c_str()); + + int ExitCode = 0; + + JobQueue FuzzQ, MergeQ; + std::atomic Stop(false); + + size_t JobId = 1; + Vector Threads; + for (int t = 0; t < NumJobs; t++) { + Threads.push_back(std::thread(WorkerThread, &Stop, &FuzzQ, &MergeQ)); + FuzzQ.Push(Env.CreateNewJob(JobId++)); + } + + while (true) { + std::unique_ptr Job(MergeQ.Pop()); + if (!Job) { + if (Stop) + break; + SleepSeconds(1); + continue; + } + ExitCode = Job->ExitCode; + if (ExitCode == Options.InterruptExitCode) { + Printf("==%lu== libFuzzer: a child was interrupted; exiting\n", GetPid()); + Stop = true; + break; + } + + Env.RunOneMergeJob(Job.get()); + + // Continue if our crash is one of the ignorred ones. + if (Options.IgnoreTimeouts && ExitCode == Options.TimeoutExitCode) + Env.NumTimeouts++; + else if (Options.IgnoreOOMs && ExitCode == Options.OOMExitCode) + Env.NumOOMs++; + else if (ExitCode != 0) { + Env.NumCrashes++; + if (Options.IgnoreCrashes) { + std::ifstream In(Job->LogPath); + std::string Line; + while (std::getline(In, Line, '\n')) + if (Line.find("ERROR:") != Line.npos) + Printf("%s\n", Line.c_str()); + } else { + // And exit if we don't ignore this crash. + Printf("INFO: log from the inner process:\n%s", + FileToString(Job->LogPath).c_str()); + Stop = true; + } + } + + // Stop if we are over the time budget. + // This is not precise, since other threads are still running + // and we will wait while joining them. + // We also don't stop instantly: other jobs need to finish. + if (Options.MaxTotalTimeSec > 0 && !Stop && + Env.secondsSinceProcessStartUp() >= (size_t)Options.MaxTotalTimeSec) { + Printf("INFO: fuzzed for %zd seconds, wrapping up soon\n", + Env.secondsSinceProcessStartUp()); + Stop = true; + } + + if (!Stop) + FuzzQ.Push(Env.CreateNewJob(JobId++)); + } + Stop = true; + + for (auto &T : Threads) + T.join(); + + // The workers have terminated. Don't try to remove the directory before they + // terminate to avoid a race condition preventing cleanup on Windows. + RmDirRecursive(Env.TempDir); + + // Use the exit code from the last child process. + Printf("INFO: exiting: %d time: %zds\n", ExitCode, + Env.secondsSinceProcessStartUp()); + exit(ExitCode); +} + +} // namespace fuzzer diff --git a/compiler-rt/lib/fuzzer/FuzzerFork.h b/compiler-rt/lib/fuzzer/FuzzerFork.h new file mode 100644 index 0000000000000..b29a43e13fbc5 --- /dev/null +++ b/compiler-rt/lib/fuzzer/FuzzerFork.h @@ -0,0 +1,24 @@ +//===- FuzzerFork.h - run fuzzing in sub-processes --------------*- C++ -* ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_FUZZER_FORK_H +#define LLVM_FUZZER_FORK_H + +#include "FuzzerDefs.h" +#include "FuzzerOptions.h" +#include "FuzzerRandom.h" + +#include + +namespace fuzzer { +void FuzzWithFork(Random &Rand, const FuzzingOptions &Options, + const Vector &Args, + const Vector &CorpusDirs, int NumJobs); +} // namespace fuzzer + +#endif // LLVM_FUZZER_FORK_H diff --git a/compiler-rt/lib/fuzzer/FuzzerIO.cpp b/compiler-rt/lib/fuzzer/FuzzerIO.cpp index 1ff22930e1bc2..290112aa4b175 100644 --- a/compiler-rt/lib/fuzzer/FuzzerIO.cpp +++ b/compiler-rt/lib/fuzzer/FuzzerIO.cpp @@ -8,9 +8,10 @@ // IO functions. //===----------------------------------------------------------------------===// -#include "FuzzerIO.h" #include "FuzzerDefs.h" #include "FuzzerExtFunctions.h" +#include "FuzzerIO.h" +#include "FuzzerUtil.h" #include #include #include @@ -125,4 +126,25 @@ void Printf(const char *Fmt, ...) { fflush(OutputFile); } +void VPrintf(bool Verbose, const char *Fmt, ...) { + if (!Verbose) return; + va_list ap; + va_start(ap, Fmt); + vfprintf(OutputFile, Fmt, ap); + va_end(ap); + fflush(OutputFile); +} + +void RmDirRecursive(const std::string &Dir) { + IterateDirRecursive( + Dir, [](const std::string &Path) {}, + [](const std::string &Path) { RmDir(Path); }, + [](const std::string &Path) { RemoveFile(Path); }); +} + +std::string TempPath(const char *Extension) { + return DirPlusFile(TmpDir(), + "libFuzzerTemp." + std::to_string(GetPid()) + Extension); +} + } // namespace fuzzer diff --git a/compiler-rt/lib/fuzzer/FuzzerIO.h b/compiler-rt/lib/fuzzer/FuzzerIO.h index c3bc6089eb2fb..9d4e7650a2981 100644 --- a/compiler-rt/lib/fuzzer/FuzzerIO.h +++ b/compiler-rt/lib/fuzzer/FuzzerIO.h @@ -39,6 +39,8 @@ std::string DirName(const std::string &FileName); // Returns path to a TmpDir. std::string TmpDir(); +std::string TempPath(const char *Extension); + bool IsInterestingCoverageFile(const std::string &FileName); void DupAndCloseStderr(); @@ -46,6 +48,7 @@ void DupAndCloseStderr(); void CloseStdout(); void Printf(const char *Fmt, ...); +void VPrintf(bool Verbose, const char *Fmt, ...); // Print using raw syscalls, useful when printing at early init stages. void RawPrint(const char *Str); @@ -57,6 +60,16 @@ size_t FileSize(const std::string &Path); void ListFilesInDirRecursive(const std::string &Dir, long *Epoch, Vector *V, bool TopDir); +void RmDirRecursive(const std::string &Dir); + +// Iterate files and dirs inside Dir, recursively. +// Call DirPreCallback/DirPostCallback on dirs before/after +// calling FileCallback on files. +void IterateDirRecursive(const std::string &Dir, + void (*DirPreCallback)(const std::string &Dir), + void (*DirPostCallback)(const std::string &Dir), + void (*FileCallback)(const std::string &Dir)); + struct SizedFile { std::string File; size_t Size; @@ -81,6 +94,11 @@ void DiscardOutput(int Fd); intptr_t GetHandleFromFd(int fd); +void MkDir(const std::string &Path); +void RmDir(const std::string &Path); + +const std::string &getDevNull(); + } // namespace fuzzer #endif // LLVM_FUZZER_IO_H diff --git a/compiler-rt/lib/fuzzer/FuzzerIOPosix.cpp b/compiler-rt/lib/fuzzer/FuzzerIOPosix.cpp index 0daed83e5eb0e..953848a8970b1 100644 --- a/compiler-rt/lib/fuzzer/FuzzerIOPosix.cpp +++ b/compiler-rt/lib/fuzzer/FuzzerIOPosix.cpp @@ -78,6 +78,28 @@ void ListFilesInDirRecursive(const std::string &Dir, long *Epoch, *Epoch = E; } + +void IterateDirRecursive(const std::string &Dir, + void (*DirPreCallback)(const std::string &Dir), + void (*DirPostCallback)(const std::string &Dir), + void (*FileCallback)(const std::string &Dir)) { + DirPreCallback(Dir); + DIR *D = opendir(Dir.c_str()); + if (!D) return; + while (auto E = readdir(D)) { + std::string Path = DirPlusFile(Dir, E->d_name); + if (E->d_type == DT_REG || E->d_type == DT_LNK || + (E->d_type == DT_UNKNOWN && IsFile(Path))) + FileCallback(Path); + else if ((E->d_type == DT_DIR || + (E->d_type == DT_UNKNOWN && IsDirectory(Path))) && + *E->d_name != '.') + IterateDirRecursive(Path, DirPreCallback, DirPostCallback, FileCallback); + } + closedir(D); + DirPostCallback(Dir); +} + char GetSeparator() { return '/'; } @@ -136,11 +158,23 @@ bool IsInterestingCoverageFile(const std::string &FileName) { return true; } - void RawPrint(const char *Str) { write(2, Str, strlen(Str)); } +void MkDir(const std::string &Path) { + mkdir(Path.c_str(), 0700); +} + +void RmDir(const std::string &Path) { + rmdir(Path.c_str()); +} + +const std::string &getDevNull() { + static const std::string devNull = "/dev/null"; + return devNull; +} + } // namespace fuzzer #endif // LIBFUZZER_POSIX diff --git a/compiler-rt/lib/fuzzer/FuzzerIOWindows.cpp b/compiler-rt/lib/fuzzer/FuzzerIOWindows.cpp index 79dacd9765af5..b8c200b810a64 100644 --- a/compiler-rt/lib/fuzzer/FuzzerIOWindows.cpp +++ b/compiler-rt/lib/fuzzer/FuzzerIOWindows.cpp @@ -71,6 +71,11 @@ bool IsFile(const std::string &Path) { return IsFile(Path, Att); } +static bool IsDir(DWORD FileAttrs) { + if (FileAttrs == INVALID_FILE_ATTRIBUTES) return false; + return FileAttrs & FILE_ATTRIBUTE_DIRECTORY; +} + std::string Basename(const std::string &Path) { size_t Pos = Path.find_last_of("/\\"); if (Pos == std::string::npos) return Path; @@ -81,8 +86,10 @@ std::string Basename(const std::string &Path) { size_t FileSize(const std::string &Path) { WIN32_FILE_ATTRIBUTE_DATA attr; if (!GetFileAttributesExA(Path.c_str(), GetFileExInfoStandard, &attr)) { - Printf("GetFileAttributesExA() failed for \"%s\" (Error code: %lu).\n", - Path.c_str(), GetLastError()); + DWORD LastError = GetLastError(); + if (LastError != ERROR_FILE_NOT_FOUND) + Printf("GetFileAttributesExA() failed for \"%s\" (Error code: %lu).\n", + Path.c_str(), LastError); return 0; } ULARGE_INTEGER size; @@ -140,6 +147,58 @@ void ListFilesInDirRecursive(const std::string &Dir, long *Epoch, *Epoch = E; } + +void IterateDirRecursive(const std::string &Dir, + void (*DirPreCallback)(const std::string &Dir), + void (*DirPostCallback)(const std::string &Dir), + void (*FileCallback)(const std::string &Dir)) { + // TODO(metzman): Implement ListFilesInDirRecursive via this function. + DirPreCallback(Dir); + + DWORD DirAttrs = GetFileAttributesA(Dir.c_str()); + if (!IsDir(DirAttrs)) return; + + std::string TargetDir(Dir); + assert(!TargetDir.empty()); + if (TargetDir.back() != '\\') TargetDir.push_back('\\'); + TargetDir.push_back('*'); + + WIN32_FIND_DATAA FindInfo; + // Find the directory's first file. + HANDLE FindHandle = FindFirstFileA(TargetDir.c_str(), &FindInfo); + if (FindHandle == INVALID_HANDLE_VALUE) { + DWORD LastError = GetLastError(); + if (LastError != ERROR_FILE_NOT_FOUND) { + // If the directory isn't empty, then something abnormal is going on. + Printf("FindFirstFileA failed for %s (Error code: %lu).\n", Dir.c_str(), + LastError); + } + return; + } + + do { + std::string Path = DirPlusFile(Dir, FindInfo.cFileName); + DWORD PathAttrs = FindInfo.dwFileAttributes; + if (IsDir(PathAttrs)) { + // Is Path the current directory (".") or the parent ("..")? + if (strcmp(FindInfo.cFileName, ".") == 0 || + strcmp(FindInfo.cFileName, "..") == 0) + continue; + IterateDirRecursive(Path, DirPreCallback, DirPostCallback, FileCallback); + } else if (PathAttrs != INVALID_FILE_ATTRIBUTES) { + FileCallback(Path); + } + } while (FindNextFileA(FindHandle, &FindInfo)); + + DWORD LastError = GetLastError(); + if (LastError != ERROR_NO_MORE_FILES) + Printf("FindNextFileA failed for %s (Error code: %lu).\n", Dir.c_str(), + LastError); + + FindClose(FindHandle); + DirPostCallback(Dir); +} + char GetSeparator() { return '\\'; } @@ -333,8 +392,24 @@ bool IsInterestingCoverageFile(const std::string &FileName) { } void RawPrint(const char *Str) { - // Not tested, may or may not work. Fix if needed. - write(2, Str, strlen(Str)); + _write(2, Str, strlen(Str)); +} + +void MkDir(const std::string &Path) { + if (CreateDirectoryA(Path.c_str(), nullptr)) return; + Printf("CreateDirectoryA failed for %s (Error code: %lu).\n", Path.c_str(), + GetLastError()); +} + +void RmDir(const std::string &Path) { + if (RemoveDirectoryA(Path.c_str())) return; + Printf("RemoveDirectoryA failed for %s (Error code: %lu).\n", Path.c_str(), + GetLastError()); +} + +const std::string &getDevNull() { + static const std::string devNull = "NUL"; + return devNull; } } // namespace fuzzer diff --git a/compiler-rt/lib/fuzzer/FuzzerInternal.h b/compiler-rt/lib/fuzzer/FuzzerInternal.h index 9950445bc18f2..f20dae014145f 100644 --- a/compiler-rt/lib/fuzzer/FuzzerInternal.h +++ b/compiler-rt/lib/fuzzer/FuzzerInternal.h @@ -35,8 +35,10 @@ class Fuzzer { Fuzzer(UserCallback CB, InputCorpus &Corpus, MutationDispatcher &MD, FuzzingOptions Options); ~Fuzzer(); - void Loop(const Vector &CorpusDirs); - void ReadAndExecuteSeedCorpora(const Vector &CorpusDirs); + void Loop(const Vector &CorpusDirs, + const Vector &ExtraSeedFiles); + void ReadAndExecuteSeedCorpora(const Vector &CorpusDirs, + const Vector &ExtraSeedFiles); void MinimizeCrashLoop(const Unit &U); void RereadOutputCorpus(size_t MaxSize); @@ -71,11 +73,6 @@ class Fuzzer { // Merge Corpora[1:] into Corpora[0]. void Merge(const Vector &Corpora); - void CrashResistantMerge(const Vector &Args, - const Vector &Corpora, - const char *CoverageSummaryInputPathOrNull, - const char *CoverageSummaryOutputPathOrNull, - const char *MergeControlFilePathOrNull); void CrashResistantMergeInternalStep(const std::string &ControlFilePath); MutationDispatcher &GetMD() { return MD; } void PrintFinalStats(); @@ -89,19 +86,19 @@ class Fuzzer { bool DuringInitialCorpusExecution); void HandleMalloc(size_t Size); + static void MaybeExitGracefully(); + std::string WriteToOutputCorpus(const Unit &U); private: void AlarmCallback(); void CrashCallback(); void ExitCallback(); - void MaybeExitGracefully(); void CrashOnOverwrittenData(); void InterruptCallback(); void MutateAndTestOne(); void PurgeAllocator(); void ReportNewCoverage(InputInfo *II, const Unit &U); void PrintPulseAndReportSlowInput(const uint8_t *Data, size_t Size); - void WriteToOutputCorpus(const Unit &U); void WriteUnitToFileWithPrefix(const Unit &U, const char *Prefix); void PrintStats(const char *Where, const char *End = "\n", size_t Units = 0); void PrintStatusForNewUnit(const Unit &U, const char *Text); diff --git a/compiler-rt/lib/fuzzer/FuzzerLoop.cpp b/compiler-rt/lib/fuzzer/FuzzerLoop.cpp index fb5aa1f11c19a..b86512b12558b 100644 --- a/compiler-rt/lib/fuzzer/FuzzerLoop.cpp +++ b/compiler-rt/lib/fuzzer/FuzzerLoop.cpp @@ -131,7 +131,7 @@ void Fuzzer::HandleMalloc(size_t Size) { DumpCurrentUnit("oom-"); Printf("SUMMARY: libFuzzer: out-of-memory\n"); PrintFinalStats(); - _Exit(Options.ErrorExitCode); // Stop right now. + _Exit(Options.OOMExitCode); // Stop right now. } Fuzzer::Fuzzer(UserCallback CB, InputCorpus &Corpus, MutationDispatcher &MD, @@ -153,7 +153,7 @@ Fuzzer::Fuzzer(UserCallback CB, InputCorpus &Corpus, MutationDispatcher &MD, if (!Options.OutputCorpus.empty() && Options.ReloadIntervalSec) EpochOfLastReadOfOutputCorpus = GetEpoch(Options.OutputCorpus); MaxInputLen = MaxMutationLen = Options.MaxLen; - TmpMaxMutationLen = Max(size_t(4), Corpus.MaxInputSize()); + TmpMaxMutationLen = 0; // Will be set once we load the corpus. AllocateCurrentUnitData(); CurrentUnitSize = 0; memset(BaseSha1, 0, sizeof(BaseSha1)); @@ -256,16 +256,19 @@ void Fuzzer::ExitCallback() { } void Fuzzer::MaybeExitGracefully() { - if (!GracefulExitRequested) return; + if (!F->GracefulExitRequested) return; Printf("==%lu== INFO: libFuzzer: exiting as requested\n", GetPid()); - PrintFinalStats(); + RmDirRecursive(TempPath(".dir")); + F->PrintFinalStats(); _Exit(0); } void Fuzzer::InterruptCallback() { Printf("==%lu== libFuzzer: run interrupted; exiting\n", GetPid()); PrintFinalStats(); - _Exit(0); // Stop right now, don't perform any at-exit actions. + RmDirRecursive(TempPath(".dir")); + // Stop right now, don't perform any at-exit actions. + _Exit(Options.InterruptExitCode); } NO_SANITIZE_MEMORY @@ -314,7 +317,7 @@ void Fuzzer::RssLimitCallback() { DumpCurrentUnit("oom-"); Printf("SUMMARY: libFuzzer: out-of-memory\n"); PrintFinalStats(); - _Exit(Options.ErrorExitCode); // Stop right now. + _Exit(Options.OOMExitCode); // Stop right now. } void Fuzzer::PrintStats(const char *Where, const char *End, size_t Units) { @@ -383,10 +386,10 @@ void Fuzzer::SetMaxMutationLen(size_t MaxMutationLen) { void Fuzzer::CheckExitOnSrcPosOrItem() { if (!Options.ExitOnSrcPos.empty()) { static auto *PCsSet = new Set; - auto HandlePC = [&](uintptr_t PC) { - if (!PCsSet->insert(PC).second) + auto HandlePC = [&](const TracePC::PCTableEntry *TE) { + if (!PCsSet->insert(TE->PC).second) return; - std::string Descr = DescribePC("%F %L", PC + 1); + std::string Descr = DescribePC("%F %L", TE->PC + 1); if (Descr.find(Options.ExitOnSrcPos) != std::string::npos) { Printf("INFO: found line matching '%s', exiting.\n", Options.ExitOnSrcPos.c_str()); @@ -536,15 +539,16 @@ void Fuzzer::ExecuteCallback(const uint8_t *Data, size_t Size) { delete[] DataCopy; } -void Fuzzer::WriteToOutputCorpus(const Unit &U) { +std::string Fuzzer::WriteToOutputCorpus(const Unit &U) { if (Options.OnlyASCII) assert(IsASCII(U)); if (Options.OutputCorpus.empty()) - return; + return ""; std::string Path = DirPlusFile(Options.OutputCorpus, Hash(U)); WriteToFile(U, Path); if (Options.Verbosity >= 2) Printf("Written %zd bytes to %s\n", U.size(), Path.c_str()); + return Path; } void Fuzzer::WriteUnitToFileWithPrefix(const Unit &U, const char *Prefix) { @@ -630,6 +634,8 @@ void Fuzzer::MutateAndTestOne() { MD.StartMutationSequence(); auto &II = Corpus.ChooseUnitToMutate(MD.GetRand()); + if (Options.DoCrossOver) + MD.SetCrossOverWith(&Corpus.ChooseUnitToMutate(MD.GetRand()).U); const auto &U = II.U; memcpy(BaseSha1, II.Sha1, sizeof(BaseSha1)); assert(CurrentUnitData); @@ -688,7 +694,9 @@ void Fuzzer::PurgeAllocator() { LastAllocatorPurgeAttemptTime = system_clock::now(); } -void Fuzzer::ReadAndExecuteSeedCorpora(const Vector &CorpusDirs) { +void Fuzzer::ReadAndExecuteSeedCorpora( + const Vector &CorpusDirs, + const Vector &ExtraSeedFiles) { const size_t kMaxSaneLen = 1 << 20; const size_t kMinDefaultLen = 4096; Vector SizedFiles; @@ -702,6 +710,11 @@ void Fuzzer::ReadAndExecuteSeedCorpora(const Vector &CorpusDirs) { Dir.c_str()); LastNumFiles = SizedFiles.size(); } + // Add files from -seed_inputs. + for (auto &File : ExtraSeedFiles) + if (auto Size = FileSize(File)) + SizedFiles.push_back({File, Size}); + for (auto &File : SizedFiles) { MaxSize = Max(File.Size, MaxSize); MinSize = Min(File.Size, MinSize); @@ -761,14 +774,17 @@ void Fuzzer::ReadAndExecuteSeedCorpora(const Vector &CorpusDirs) { } } -void Fuzzer::Loop(const Vector &CorpusDirs) { - ReadAndExecuteSeedCorpora(CorpusDirs); +void Fuzzer::Loop(const Vector &CorpusDirs, + const Vector &ExtraSeedFiles) { + ReadAndExecuteSeedCorpora(CorpusDirs, ExtraSeedFiles); DFT.Clear(); // No need for DFT any more. TPC.SetPrintNewPCs(Options.PrintNewCovPcs); TPC.SetPrintNewFuncs(Options.PrintNewCovFuncs); system_clock::time_point LastCorpusReload = system_clock::now(); - if (Options.DoCrossOver) - MD.SetCorpus(&Corpus); + + TmpMaxMutationLen = + Min(MaxMutationLen, Max(size_t(4), Corpus.MaxInputSize())); + while (true) { auto Now = system_clock::now(); if (duration_cast(Now - LastCorpusReload).count() >= diff --git a/compiler-rt/lib/fuzzer/FuzzerMerge.cpp b/compiler-rt/lib/fuzzer/FuzzerMerge.cpp index 77b8a789a0206..dace45ece1d27 100644 --- a/compiler-rt/lib/fuzzer/FuzzerMerge.cpp +++ b/compiler-rt/lib/fuzzer/FuzzerMerge.cpp @@ -42,10 +42,12 @@ void Merger::ParseOrExit(std::istream &IS, bool ParseCoverage) { // file1 // file2 # One file name per line. // STARTED 0 123 # FileID, file size -// DONE 0 1 4 6 8 # FileID COV1 COV2 ... -// STARTED 1 456 # If DONE is missing, the input crashed while processing. +// FT 0 1 4 6 8 # FileID COV1 COV2 ... +// COV 0 7 8 9 # FileID COV1 COV1 +// STARTED 1 456 # If FT is missing, the input crashed while processing. // STARTED 2 567 -// DONE 2 8 9 +// FT 2 8 9 +// COV 2 11 12 bool Merger::Parse(std::istream &IS, bool ParseCoverage) { LastFailure.clear(); std::string Line; @@ -70,11 +72,12 @@ bool Merger::Parse(std::istream &IS, bool ParseCoverage) { if (!std::getline(IS, Files[i].Name, '\n')) return false; - // Parse STARTED and DONE lines. + // Parse STARTED, FT, and COV lines. size_t ExpectedStartMarker = 0; const size_t kInvalidStartMarker = -1; size_t LastSeenStartMarker = kInvalidStartMarker; Vector TmpFeatures; + Set PCs; while (std::getline(IS, Line, '\n')) { std::istringstream ISS1(Line); std::string Marker; @@ -89,19 +92,25 @@ bool Merger::Parse(std::istream &IS, bool ParseCoverage) { LastSeenStartMarker = ExpectedStartMarker; assert(ExpectedStartMarker < Files.size()); ExpectedStartMarker++; - } else if (Marker == "DONE") { - // DONE FILE_ID COV1 COV2 COV3 ... + } else if (Marker == "FT") { + // FT FILE_ID COV1 COV2 COV3 ... size_t CurrentFileIdx = N; if (CurrentFileIdx != LastSeenStartMarker) return false; LastSeenStartMarker = kInvalidStartMarker; if (ParseCoverage) { TmpFeatures.clear(); // use a vector from outer scope to avoid resizes. - while (ISS1 >> std::hex >> N) + while (ISS1 >> N) TmpFeatures.push_back(N); std::sort(TmpFeatures.begin(), TmpFeatures.end()); Files[CurrentFileIdx].Features = TmpFeatures; } + } else if (Marker == "COV") { + size_t CurrentFileIdx = N; + if (ParseCoverage) + while (ISS1 >> N) + if (PCs.insert(N).second) + Files[CurrentFileIdx].Cov.push_back(N); } else { return false; } @@ -120,21 +129,21 @@ size_t Merger::ApproximateMemoryConsumption() const { return Res; } -// Decides which files need to be merged (add thost to NewFiles). +// Decides which files need to be merged (add those to NewFiles). // Returns the number of new features added. size_t Merger::Merge(const Set &InitialFeatures, + Set *NewFeatures, + const Set &InitialCov, Set *NewCov, Vector *NewFiles) { NewFiles->clear(); assert(NumFilesInFirstCorpus <= Files.size()); - Set AllFeatures(InitialFeatures); + Set AllFeatures = InitialFeatures; // What features are in the initial corpus? for (size_t i = 0; i < NumFilesInFirstCorpus; i++) { auto &Cur = Files[i].Features; AllFeatures.insert(Cur.begin(), Cur.end()); } - size_t InitialNumFeatures = AllFeatures.size(); - // Remove all features that we already know from all other inputs. for (size_t i = NumFilesInFirstCorpus; i < Files.size(); i++) { auto &Cur = Files[i].Features; @@ -160,22 +169,20 @@ size_t Merger::Merge(const Set &InitialFeatures, auto &Cur = Files[i].Features; // Printf("%s -> sz %zd ft %zd\n", Files[i].Name.c_str(), // Files[i].Size, Cur.size()); - size_t OldSize = AllFeatures.size(); - AllFeatures.insert(Cur.begin(), Cur.end()); - if (AllFeatures.size() > OldSize) + bool FoundNewFeatures = false; + for (auto Fe: Cur) { + if (AllFeatures.insert(Fe).second) { + FoundNewFeatures = true; + NewFeatures->insert(Fe); + } + } + if (FoundNewFeatures) NewFiles->push_back(Files[i].Name); + for (auto Cov : Files[i].Cov) + if (InitialCov.find(Cov) == InitialCov.end()) + NewCov->insert(Cov); } - return AllFeatures.size() - InitialNumFeatures; -} - -void Merger::PrintSummary(std::ostream &OS) { - for (auto &File : Files) { - OS << std::hex; - OS << File.Name << " size: " << File.Size << " features: "; - for (auto Feature : File.Features) - OS << " " << Feature; - OS << "\n"; - } + return NewFeatures->size(); } Set Merger::AllFeatures() const { @@ -185,25 +192,6 @@ Set Merger::AllFeatures() const { return S; } -Set Merger::ParseSummary(std::istream &IS) { - std::string Line, Tmp; - Set Res; - while (std::getline(IS, Line, '\n')) { - size_t N; - std::istringstream ISS1(Line); - ISS1 >> Tmp; // Name - ISS1 >> Tmp; // size: - assert(Tmp == "size:" && "Corrupt summary file"); - ISS1 >> std::hex; - ISS1 >> N; // File Size - ISS1 >> Tmp; // features: - assert(Tmp == "features:" && "Corrupt summary file"); - while (ISS1 >> std::hex >> N) - Res.insert(N); - } - return Res; -} - // Inner process. May crash if the target crashes. void Fuzzer::CrashResistantMergeInternalStep(const std::string &CFPath) { Printf("MERGE-INNER: using the control file '%s'\n", CFPath.c_str()); @@ -222,8 +210,9 @@ void Fuzzer::CrashResistantMergeInternalStep(const std::string &CFPath) { std::ofstream OF(CFPath, std::ofstream::out | std::ofstream::app); Set AllFeatures; + Set AllPCs; for (size_t i = M.FirstNotProcessedFile; i < M.Files.size(); i++) { - MaybeExitGracefully(); + Fuzzer::MaybeExitGracefully(); auto U = FileToVector(M.Files[i].Name); if (U.size() > MaxInputLen) { U.resize(MaxInputLen); @@ -231,7 +220,7 @@ void Fuzzer::CrashResistantMergeInternalStep(const std::string &CFPath) { } std::ostringstream StartedLine; // Write the pre-run marker. - OF << "STARTED " << std::dec << i << " " << U.size() << "\n"; + OF << "STARTED " << i << " " << U.size() << "\n"; OF.flush(); // Flush is important since Command::Execute may crash. // Run. TPC.ResetMaps(); @@ -246,26 +235,36 @@ void Fuzzer::CrashResistantMergeInternalStep(const std::string &CFPath) { if (AllFeatures.insert(Feature).second) UniqFeatures.insert(Feature); }); + TPC.UpdateObservedPCs(); // Show stats. if (!(TotalNumberOfRuns & (TotalNumberOfRuns - 1))) PrintStats("pulse "); // Write the post-run marker and the coverage. - OF << "DONE " << i; + OF << "FT " << i; for (size_t F : UniqFeatures) - OF << " " << std::hex << F; + OF << " " << F; + OF << "\n"; + OF << "COV " << i; + TPC.ForEachObservedPC([&](const TracePC::PCTableEntry *TE) { + if (AllPCs.insert(TE).second) + OF << " " << TPC.PCTableEntryIdx(TE); + }); OF << "\n"; OF.flush(); } + PrintStats("DONE "); } static void WriteNewControlFile(const std::string &CFPath, - const Vector &AllFiles, - size_t NumFilesInFirstCorpus) { + const Vector &OldCorpus, + const Vector &NewCorpus) { RemoveFile(CFPath); std::ofstream ControlFile(CFPath); - ControlFile << AllFiles.size() << "\n"; - ControlFile << NumFilesInFirstCorpus << "\n"; - for (auto &SF: AllFiles) + ControlFile << (OldCorpus.size() + NewCorpus.size()) << "\n"; + ControlFile << OldCorpus.size() << "\n"; + for (auto &SF: OldCorpus) + ControlFile << SF.File << "\n"; + for (auto &SF: NewCorpus) ControlFile << SF.File << "\n"; if (!ControlFile) { Printf("MERGE-OUTER: failed to write to the control file: %s\n", @@ -274,116 +273,89 @@ static void WriteNewControlFile(const std::string &CFPath, } } -// Outer process. Does not call the target code and thus sohuld not fail. -void Fuzzer::CrashResistantMerge(const Vector &Args, - const Vector &Corpora, - const char *CoverageSummaryInputPathOrNull, - const char *CoverageSummaryOutputPathOrNull, - const char *MergeControlFilePathOrNull) { - if (Corpora.size() <= 1) { - Printf("Merge requires two or more corpus dirs\n"); - return; - } - auto CFPath = - MergeControlFilePathOrNull - ? MergeControlFilePathOrNull - : DirPlusFile(TmpDir(), - "libFuzzerTemp." + std::to_string(GetPid()) + ".txt"); - +// Outer process. Does not call the target code and thus should not fail. +void CrashResistantMerge(const Vector &Args, + const Vector &OldCorpus, + const Vector &NewCorpus, + Vector *NewFiles, + const Set &InitialFeatures, + Set *NewFeatures, + const Set &InitialCov, + Set *NewCov, + const std::string &CFPath, + bool V /*Verbose*/) { + if (NewCorpus.empty() && OldCorpus.empty()) return; // Nothing to merge. size_t NumAttempts = 0; - if (MergeControlFilePathOrNull && FileSize(MergeControlFilePathOrNull)) { - Printf("MERGE-OUTER: non-empty control file provided: '%s'\n", - MergeControlFilePathOrNull); + if (FileSize(CFPath)) { + VPrintf(V, "MERGE-OUTER: non-empty control file provided: '%s'\n", + CFPath.c_str()); Merger M; - std::ifstream IF(MergeControlFilePathOrNull); + std::ifstream IF(CFPath); if (M.Parse(IF, /*ParseCoverage=*/false)) { - Printf("MERGE-OUTER: control file ok, %zd files total," + VPrintf(V, "MERGE-OUTER: control file ok, %zd files total," " first not processed file %zd\n", M.Files.size(), M.FirstNotProcessedFile); if (!M.LastFailure.empty()) - Printf("MERGE-OUTER: '%s' will be skipped as unlucky " + VPrintf(V, "MERGE-OUTER: '%s' will be skipped as unlucky " "(merge has stumbled on it the last time)\n", M.LastFailure.c_str()); if (M.FirstNotProcessedFile >= M.Files.size()) { - Printf("MERGE-OUTER: nothing to do, merge has been completed before\n"); + VPrintf( + V, "MERGE-OUTER: nothing to do, merge has been completed before\n"); exit(0); } NumAttempts = M.Files.size() - M.FirstNotProcessedFile; } else { - Printf("MERGE-OUTER: bad control file, will overwrite it\n"); + VPrintf(V, "MERGE-OUTER: bad control file, will overwrite it\n"); } } if (!NumAttempts) { // The supplied control file is empty or bad, create a fresh one. - Vector AllFiles; - GetSizedFilesFromDir(Corpora[0], &AllFiles); - size_t NumFilesInFirstCorpus = AllFiles.size(); - std::sort(AllFiles.begin(), AllFiles.end()); - for (size_t i = 1; i < Corpora.size(); i++) - GetSizedFilesFromDir(Corpora[i], &AllFiles); - std::sort(AllFiles.begin() + NumFilesInFirstCorpus, AllFiles.end()); - Printf("MERGE-OUTER: %zd files, %zd in the initial corpus\n", - AllFiles.size(), NumFilesInFirstCorpus); - WriteNewControlFile(CFPath, AllFiles, NumFilesInFirstCorpus); - NumAttempts = AllFiles.size(); + NumAttempts = OldCorpus.size() + NewCorpus.size(); + VPrintf(V, "MERGE-OUTER: %zd files, %zd in the initial corpus\n", + NumAttempts, OldCorpus.size()); + WriteNewControlFile(CFPath, OldCorpus, NewCorpus); } // Execute the inner process until it passes. // Every inner process should execute at least one input. Command BaseCmd(Args); BaseCmd.removeFlag("merge"); - bool Success = false; + BaseCmd.removeFlag("fork"); for (size_t Attempt = 1; Attempt <= NumAttempts; Attempt++) { - MaybeExitGracefully(); - Printf("MERGE-OUTER: attempt %zd\n", Attempt); + Fuzzer::MaybeExitGracefully(); + VPrintf(V, "MERGE-OUTER: attempt %zd\n", Attempt); Command Cmd(BaseCmd); Cmd.addFlag("merge_control_file", CFPath); Cmd.addFlag("merge_inner", "1"); + if (!V) { + Cmd.setOutputFile(getDevNull()); + Cmd.combineOutAndErr(); + } auto ExitCode = ExecuteCommand(Cmd); if (!ExitCode) { - Printf("MERGE-OUTER: succesfull in %zd attempt(s)\n", Attempt); - Success = true; + VPrintf(V, "MERGE-OUTER: succesfull in %zd attempt(s)\n", Attempt); break; } } - if (!Success) { - Printf("MERGE-OUTER: zero succesfull attempts, exiting\n"); - exit(1); - } // Read the control file and do the merge. Merger M; std::ifstream IF(CFPath); IF.seekg(0, IF.end); - Printf("MERGE-OUTER: the control file has %zd bytes\n", (size_t)IF.tellg()); + VPrintf(V, "MERGE-OUTER: the control file has %zd bytes\n", + (size_t)IF.tellg()); IF.seekg(0, IF.beg); M.ParseOrExit(IF, true); IF.close(); - Printf("MERGE-OUTER: consumed %zdMb (%zdMb rss) to parse the control file\n", - M.ApproximateMemoryConsumption() >> 20, GetPeakRSSMb()); - if (CoverageSummaryOutputPathOrNull) { - Printf("MERGE-OUTER: writing coverage summary for %zd files to %s\n", - M.Files.size(), CoverageSummaryOutputPathOrNull); - std::ofstream SummaryOut(CoverageSummaryOutputPathOrNull); - M.PrintSummary(SummaryOut); - } - Vector NewFiles; - Set InitialFeatures; - if (CoverageSummaryInputPathOrNull) { - std::ifstream SummaryIn(CoverageSummaryInputPathOrNull); - InitialFeatures = M.ParseSummary(SummaryIn); - Printf("MERGE-OUTER: coverage summary loaded from %s, %zd features found\n", - CoverageSummaryInputPathOrNull, InitialFeatures.size()); - } - size_t NumNewFeatures = M.Merge(InitialFeatures, &NewFiles); - Printf("MERGE-OUTER: %zd new files with %zd new features added\n", - NewFiles.size(), NumNewFeatures); - for (auto &F: NewFiles) - WriteToOutputCorpus(FileToVector(F, MaxInputLen)); - // We are done, delete the control file if it was a temporary one. - if (!MergeControlFilePathOrNull) - RemoveFile(CFPath); + VPrintf(V, + "MERGE-OUTER: consumed %zdMb (%zdMb rss) to parse the control file\n", + M.ApproximateMemoryConsumption() >> 20, GetPeakRSSMb()); + M.Merge(InitialFeatures, NewFeatures, InitialCov, NewCov, NewFiles); + VPrintf(V, "MERGE-OUTER: %zd new files with %zd new features added; " + "%zd new coverage edges\n", + NewFiles->size(), NewFeatures->size(), NewCov->size()); } } // namespace fuzzer diff --git a/compiler-rt/lib/fuzzer/FuzzerMerge.h b/compiler-rt/lib/fuzzer/FuzzerMerge.h index 49031d3b40820..c14dd589e62dd 100644 --- a/compiler-rt/lib/fuzzer/FuzzerMerge.h +++ b/compiler-rt/lib/fuzzer/FuzzerMerge.h @@ -51,7 +51,7 @@ namespace fuzzer { struct MergeFileInfo { std::string Name; size_t Size = 0; - Vector Features; + Vector Features, Cov; }; struct Merger { @@ -63,17 +63,24 @@ struct Merger { bool Parse(std::istream &IS, bool ParseCoverage); bool Parse(const std::string &Str, bool ParseCoverage); void ParseOrExit(std::istream &IS, bool ParseCoverage); - void PrintSummary(std::ostream &OS); - Set ParseSummary(std::istream &IS); - size_t Merge(const Set &InitialFeatures, + size_t Merge(const Set &InitialFeatures, Set *NewFeatures, + const Set &InitialCov, Set *NewCov, Vector *NewFiles); - size_t Merge(Vector *NewFiles) { - return Merge(Set{}, NewFiles); - } size_t ApproximateMemoryConsumption() const; Set AllFeatures() const; }; +void CrashResistantMerge(const Vector &Args, + const Vector &OldCorpus, + const Vector &NewCorpus, + Vector *NewFiles, + const Set &InitialFeatures, + Set *NewFeatures, + const Set &InitialCov, + Set *NewCov, + const std::string &CFPath, + bool Verbose); + } // namespace fuzzer #endif // LLVM_FUZZER_MERGE_H diff --git a/compiler-rt/lib/fuzzer/FuzzerMutate.cpp b/compiler-rt/lib/fuzzer/FuzzerMutate.cpp index 6dc2eccdbb3ce..92e469f4c1432 100644 --- a/compiler-rt/lib/fuzzer/FuzzerMutate.cpp +++ b/compiler-rt/lib/fuzzer/FuzzerMutate.cpp @@ -8,12 +8,12 @@ // Mutate a test input. //===----------------------------------------------------------------------===// -#include "FuzzerMutate.h" -#include "FuzzerCorpus.h" #include "FuzzerDefs.h" #include "FuzzerExtFunctions.h" #include "FuzzerIO.h" +#include "FuzzerMutate.h" #include "FuzzerOptions.h" +#include "FuzzerTracePC.h" namespace fuzzer { @@ -72,10 +72,10 @@ size_t MutationDispatcher::Mutate_Custom(uint8_t *Data, size_t Size, size_t MutationDispatcher::Mutate_CustomCrossOver(uint8_t *Data, size_t Size, size_t MaxSize) { - if (!Corpus || Corpus->size() < 2 || Size == 0) + if (Size == 0) return 0; - size_t Idx = Rand(Corpus->size()); - const Unit &Other = (*Corpus)[Idx]; + if (!CrossOverWith) return 0; + const Unit &Other = *CrossOverWith; if (Other.empty()) return 0; CustomCrossOverInPlaceHere.resize(MaxSize); @@ -421,9 +421,9 @@ size_t MutationDispatcher::Mutate_ChangeBinaryInteger(uint8_t *Data, size_t MutationDispatcher::Mutate_CrossOver(uint8_t *Data, size_t Size, size_t MaxSize) { if (Size > MaxSize) return 0; - if (!Corpus || Corpus->size() < 2 || Size == 0) return 0; - size_t Idx = Rand(Corpus->size()); - const Unit &O = (*Corpus)[Idx]; + if (Size == 0) return 0; + if (!CrossOverWith) return 0; + const Unit &O = *CrossOverWith; if (O.empty()) return 0; MutateInPlaceHere.resize(MaxSize); auto &U = MutateInPlaceHere; diff --git a/compiler-rt/lib/fuzzer/FuzzerMutate.h b/compiler-rt/lib/fuzzer/FuzzerMutate.h index 33064d7a72b7c..6cbce80276248 100644 --- a/compiler-rt/lib/fuzzer/FuzzerMutate.h +++ b/compiler-rt/lib/fuzzer/FuzzerMutate.h @@ -63,7 +63,7 @@ class MutationDispatcher { /// Change a 1-, 2-, 4-, or 8-byte integer in interesting ways. size_t Mutate_ChangeBinaryInteger(uint8_t *Data, size_t Size, size_t MaxSize); - /// CrossOver Data with some other element of the corpus. + /// CrossOver Data with CrossOverWith. size_t Mutate_CrossOver(uint8_t *Data, size_t Size, size_t MaxSize); /// Applies one of the configured mutations. @@ -88,7 +88,7 @@ class MutationDispatcher { void PrintRecommendedDictionary(); - void SetCorpus(const InputCorpus *Corpus) { this->Corpus = Corpus; } + void SetCrossOverWith(const Unit *U) { CrossOverWith = U; } Random &GetRand() { return Rand; } @@ -139,7 +139,7 @@ class MutationDispatcher { DictionaryEntry CmpDictionaryEntriesDeque[kCmpDictionaryEntriesDequeSize]; size_t CmpDictionaryEntriesDequeIdx = 0; - const InputCorpus *Corpus = nullptr; + const Unit *CrossOverWith = nullptr; Vector MutateInPlaceHere; Vector MutateWithMaskTemp; // CustomCrossOver needs its own buffer as a custom implementation may call diff --git a/compiler-rt/lib/fuzzer/FuzzerOptions.h b/compiler-rt/lib/fuzzer/FuzzerOptions.h index 3f8e959f490cd..7a607e8eec506 100644 --- a/compiler-rt/lib/fuzzer/FuzzerOptions.h +++ b/compiler-rt/lib/fuzzer/FuzzerOptions.h @@ -19,8 +19,13 @@ struct FuzzingOptions { size_t MaxLen = 0; size_t LenControl = 1000; int UnitTimeoutSec = 300; - int TimeoutExitCode = 77; + int TimeoutExitCode = 70; + int OOMExitCode = 71; + int InterruptExitCode = 72; int ErrorExitCode = 77; + bool IgnoreTimeouts = true; + bool IgnoreOOMs = true; + bool IgnoreCrashes = false; int MaxTotalTimeSec = 0; int RssLimitMb = 0; int MallocLimitMb = 0; diff --git a/compiler-rt/lib/fuzzer/FuzzerRandom.h b/compiler-rt/lib/fuzzer/FuzzerRandom.h index f475797871cbf..659283eee2074 100644 --- a/compiler-rt/lib/fuzzer/FuzzerRandom.h +++ b/compiler-rt/lib/fuzzer/FuzzerRandom.h @@ -14,12 +14,17 @@ #include namespace fuzzer { -class Random : public std::mt19937 { +class Random : public std::minstd_rand { public: - Random(unsigned int seed) : std::mt19937(seed) {} - result_type operator()() { return this->std::mt19937::operator()(); } + Random(unsigned int seed) : std::minstd_rand(seed) {} + result_type operator()() { return this->std::minstd_rand::operator()(); } size_t Rand() { return this->operator()(); } size_t RandBool() { return Rand() % 2; } + size_t SkewTowardsLast(size_t n) { + size_t T = this->operator()(n * n); + size_t Res = sqrt(T); + return Res; + } size_t operator()(size_t n) { return n ? Rand() % n : 0; } intptr_t operator()(intptr_t From, intptr_t To) { assert(From < To); diff --git a/compiler-rt/lib/fuzzer/FuzzerTracePC.cpp b/compiler-rt/lib/fuzzer/FuzzerTracePC.cpp index d2edb00445dfd..a2d3b7e7faf94 100644 --- a/compiler-rt/lib/fuzzer/FuzzerTracePC.cpp +++ b/compiler-rt/lib/fuzzer/FuzzerTracePC.cpp @@ -174,7 +174,7 @@ inline ALWAYS_INLINE uintptr_t GetPreviousInstructionPc(uintptr_t PC) { /// \return the address of the next instruction. /// Note: the logic is copied from `sanitizer_common/sanitizer_stacktrace.cc` -inline ALWAYS_INLINE uintptr_t GetNextInstructionPc(uintptr_t PC) { +ALWAYS_INLINE uintptr_t TracePC::GetNextInstructionPc(uintptr_t PC) { #if defined(__mips__) return PC + 8; #elif defined(__powerpc__) || defined(__sparc__) || defined(__arm__) || \ @@ -187,18 +187,19 @@ inline ALWAYS_INLINE uintptr_t GetNextInstructionPc(uintptr_t PC) { void TracePC::UpdateObservedPCs() { Vector CoveredFuncs; - auto ObservePC = [&](uintptr_t PC) { - if (ObservedPCs.insert(PC).second && DoPrintNewPCs) { - PrintPC("\tNEW_PC: %p %F %L", "\tNEW_PC: %p", GetNextInstructionPc(PC)); + auto ObservePC = [&](const PCTableEntry *TE) { + if (ObservedPCs.insert(TE).second && DoPrintNewPCs) { + PrintPC("\tNEW_PC: %p %F %L", "\tNEW_PC: %p", + GetNextInstructionPc(TE->PC)); Printf("\n"); } }; - auto Observe = [&](const PCTableEntry &TE) { - if (TE.PCFlags & 1) - if (++ObservedFuncs[TE.PC] == 1 && NumPrintNewFuncs) - CoveredFuncs.push_back(TE.PC); - ObservePC(TE.PC); + auto Observe = [&](const PCTableEntry *TE) { + if (PcIsFuncEntry(TE)) + if (++ObservedFuncs[TE->PC] == 1 && NumPrintNewFuncs) + CoveredFuncs.push_back(TE->PC); + ObservePC(TE); }; if (NumPCsInPCTables) { @@ -212,7 +213,7 @@ void TracePC::UpdateObservedPCs() { if (!R.Enabled) continue; for (uint8_t *P = R.Start; P < R.Stop; P++) if (*P) - Observe(ModulePCTable[i].Start[M.Idx(P)]); + Observe(&ModulePCTable[i].Start[M.Idx(P)]); } } } @@ -226,6 +227,27 @@ void TracePC::UpdateObservedPCs() { } } +uintptr_t TracePC::PCTableEntryIdx(const PCTableEntry *TE) { + size_t TotalTEs = 0; + for (size_t i = 0; i < NumPCTables; i++) { + auto &M = ModulePCTable[i]; + if (TE >= M.Start && TE < M.Stop) + return TotalTEs + TE - M.Start; + TotalTEs += M.Stop - M.Start; + } + assert(0); + return 0; +} + +const TracePC::PCTableEntry *TracePC::PCTableEntryByIdx(uintptr_t Idx) { + for (size_t i = 0; i < NumPCTables; i++) { + auto &M = ModulePCTable[i]; + size_t Size = M.Stop - M.Start; + if (Idx < Size) return &M.Start[Idx]; + Idx -= Size; + } + return nullptr; +} static std::string GetModuleName(uintptr_t PC) { char ModulePathRaw[4096] = ""; // What's PATH_MAX in portable C++? @@ -245,10 +267,10 @@ void TracePC::IterateCoveredFunctions(CallBack CB) { auto ModuleName = GetModuleName(M.Start->PC); for (auto NextFE = M.Start; NextFE < M.Stop; ) { auto FE = NextFE; - assert((FE->PCFlags & 1) && "Not a function entry point"); + assert(PcIsFuncEntry(FE) && "Not a function entry point"); do { NextFE++; - } while (NextFE < M.Stop && !(NextFE->PCFlags & 1)); + } while (NextFE < M.Stop && !(PcIsFuncEntry(NextFE))); CB(FE, NextFE, ObservedFuncs[FE->PC]); } } @@ -263,7 +285,7 @@ void TracePC::SetFocusFunction(const std::string &FuncName) { auto &PCTE = ModulePCTable[M]; size_t N = PCTE.Stop - PCTE.Start; for (size_t I = 0; I < N; I++) { - if (!(PCTE.Start[I].PCFlags & 1)) continue; // not a function entry. + if (!(PcIsFuncEntry(&PCTE.Start[I]))) continue; // not a function entry. auto Name = DescribePC("%F", GetNextInstructionPc(PCTE.Start[I].PC)); if (Name[0] == 'i' && Name[1] == 'n' && Name[2] == ' ') Name = Name.substr(3, std::string::npos); @@ -300,15 +322,15 @@ void TracePC::PrintCoverage() { if (FunctionStr.find("in ") == 0) FunctionStr = FunctionStr.substr(3); std::string LineStr = DescribePC("%l", VisualizePC); - size_t Line = std::stoul(LineStr); size_t NumEdges = Last - First; Vector UncoveredPCs; for (auto TE = First; TE < Last; TE++) - if (!ObservedPCs.count(TE->PC)) + if (!ObservedPCs.count(TE)) UncoveredPCs.push_back(TE->PC); Printf("%sCOVERED_FUNC: hits: %zd", Counter ? "" : "UN", Counter); Printf(" edges: %zd/%zd", NumEdges - UncoveredPCs.size(), NumEdges); - Printf(" %s %s:%zd\n", FunctionStr.c_str(), FileStr.c_str(), Line); + Printf(" %s %s:%s\n", FunctionStr.c_str(), FileStr.c_str(), + LineStr.c_str()); if (Counter) for (auto PC : UncoveredPCs) Printf(" UNCOVERED_PC: %s\n", diff --git a/compiler-rt/lib/fuzzer/FuzzerTracePC.h b/compiler-rt/lib/fuzzer/FuzzerTracePC.h index 49514b92e7655..4f5ebeb047a16 100644 --- a/compiler-rt/lib/fuzzer/FuzzerTracePC.h +++ b/compiler-rt/lib/fuzzer/FuzzerTracePC.h @@ -122,6 +122,15 @@ class TracePC { void ProtectLazyCounters(); bool UnprotectLazyCounters(void *CounterPtr); + struct PCTableEntry { + uintptr_t PC, PCFlags; + }; + + uintptr_t PCTableEntryIdx(const PCTableEntry *TE); + const PCTableEntry *PCTableEntryByIdx(uintptr_t Idx); + static uintptr_t GetNextInstructionPc(uintptr_t PC); + bool PcIsFuncEntry(const PCTableEntry *TE) { return TE->PCFlags & 1; } + private: bool UseCounters = false; uint32_t UseValueProfileMask = false; @@ -159,16 +168,11 @@ class TracePC { CB(Modules[m].Regions[r]); } - - struct PCTableEntry { - uintptr_t PC, PCFlags; - }; - struct { const PCTableEntry *Start, *Stop; } ModulePCTable[4096]; size_t NumPCTables; size_t NumPCsInPCTables; - Set ObservedPCs; + Set ObservedPCs; std::unordered_map ObservedFuncs; // PC => Counter. uint8_t *FocusFunctionCounterPtr = nullptr; diff --git a/compiler-rt/lib/fuzzer/FuzzerUtilLinux.cpp b/compiler-rt/lib/fuzzer/FuzzerUtilLinux.cpp index 640f3d9c5d1fb..d5a15d19f2a95 100644 --- a/compiler-rt/lib/fuzzer/FuzzerUtilLinux.cpp +++ b/compiler-rt/lib/fuzzer/FuzzerUtilLinux.cpp @@ -13,12 +13,18 @@ #include "FuzzerCommand.h" #include +#include +#include + namespace fuzzer { int ExecuteCommand(const Command &Cmd) { std::string CmdLine = Cmd.toString(); - return system(CmdLine.c_str()); + int exit_code = system(CmdLine.c_str()); + if (WIFEXITED(exit_code)) + return WEXITSTATUS(exit_code); + return exit_code; } } // namespace fuzzer diff --git a/compiler-rt/lib/fuzzer/FuzzerUtilWindows.cpp b/compiler-rt/lib/fuzzer/FuzzerUtilWindows.cpp index 75b43f7a18345..074e1eb423094 100644 --- a/compiler-rt/lib/fuzzer/FuzzerUtilWindows.cpp +++ b/compiler-rt/lib/fuzzer/FuzzerUtilWindows.cpp @@ -85,11 +85,11 @@ void CALLBACK AlarmHandler(PVOID, BOOLEAN) { class TimerQ { HANDLE TimerQueue; public: - TimerQ() : TimerQueue(NULL) {}; + TimerQ() : TimerQueue(NULL) {} ~TimerQ() { if (TimerQueue) DeleteTimerQueueEx(TimerQueue, NULL); - }; + } void SetTimer(int Seconds) { if (!TimerQueue) { TimerQueue = CreateTimerQueue(); @@ -104,7 +104,7 @@ class TimerQ { Printf("libFuzzer: CreateTimerQueueTimer failed.\n"); exit(1); } - }; + } }; static TimerQ Timer; diff --git a/compiler-rt/lib/fuzzer/standalone/StandaloneFuzzTargetMain.c b/compiler-rt/lib/fuzzer/standalone/StandaloneFuzzTargetMain.c index 1d121725f67e8..efe512cfe8132 100644 --- a/compiler-rt/lib/fuzzer/standalone/StandaloneFuzzTargetMain.c +++ b/compiler-rt/lib/fuzzer/standalone/StandaloneFuzzTargetMain.c @@ -32,6 +32,7 @@ int main(int argc, char **argv) { fseek(f, 0, SEEK_SET); unsigned char *buf = (unsigned char*)malloc(len); size_t n_read = fread(buf, 1, len, f); + fclose(f); assert(n_read == len); LLVMFuzzerTestOneInput(buf, len); free(buf); diff --git a/compiler-rt/lib/fuzzer/tests/CMakeLists.txt b/compiler-rt/lib/fuzzer/tests/CMakeLists.txt index 6abb72def3e19..f338d9993bdd4 100644 --- a/compiler-rt/lib/fuzzer/tests/CMakeLists.txt +++ b/compiler-rt/lib/fuzzer/tests/CMakeLists.txt @@ -17,16 +17,21 @@ set_target_properties(FuzzerUnitTests PROPERTIES FOLDER "Compiler-RT Tests") set(LIBFUZZER_UNITTEST_LINK_FLAGS ${COMPILER_RT_UNITTEST_LINK_FLAGS}) list(APPEND LIBFUZZER_UNITTEST_LINK_FLAGS --driver-mode=g++) -if(APPLE OR CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") - list(APPEND LIBFUZZER_UNITTEST_LINK_FLAGS -lc++ -lpthread) -elseif(NOT WIN32) - list(APPEND LIBFUZZER_UNITTEST_LINK_FLAGS -lstdc++ -lpthread) +if(NOT WIN32) + list(APPEND LIBFUZZER_UNITTEST_LINK_FLAGS -lpthread) endif() -if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux" AND COMPILER_RT_LIBCXX_PATH) +if(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND + COMPILER_RT_LIBCXX_PATH AND + COMPILER_RT_LIBCXXABI_PATH) list(APPEND LIBFUZZER_UNITTEST_CFLAGS -nostdinc++) endif() +if ("-fvisibility=hidden" IN_LIST LIBFUZZER_CFLAGS) + # Match visibility settings. + list(APPEND LIBFUZZER_UNITTEST_CFLAGS "-fvisibility=hidden") +endif() + if(COMPILER_RT_DEFAULT_TARGET_ARCH IN_LIST FUZZER_SUPPORTED_ARCH) # libFuzzer unit tests are only run on the host machine. set(arch ${COMPILER_RT_DEFAULT_TARGET_ARCH}) @@ -45,8 +50,11 @@ if(COMPILER_RT_DEFAULT_TARGET_ARCH IN_LIST FUZZER_SUPPORTED_ARCH) ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} FOLDER "Compiler-RT Runtime tests") - if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux" AND COMPILER_RT_LIBCXX_PATH) - set(LIBFUZZER_TEST_RUNTIME_DEPS libcxx_fuzzer_${arch}-build) + if(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND + COMPILER_RT_LIBCXX_PATH AND + COMPILER_RT_LIBCXXABI_PATH) + file(GLOB libfuzzer_headers ../*.h) + set(LIBFUZZER_TEST_RUNTIME_DEPS libcxx_fuzzer_${arch}-build ${libfuzzer_headers}) set(LIBFUZZER_TEST_RUNTIME_CFLAGS -isystem ${LIBCXX_${arch}_PREFIX}/include/c++/v1) set(LIBFUZZER_TEST_RUNTIME_LINK_FLAGS ${LIBCXX_${arch}_PREFIX}/lib/libc++.a) endif() diff --git a/compiler-rt/lib/fuzzer/tests/FuzzerUnittest.cpp b/compiler-rt/lib/fuzzer/tests/FuzzerUnittest.cpp index 16a1fc5cdf075..d9bdfc1ef912e 100644 --- a/compiler-rt/lib/fuzzer/tests/FuzzerUnittest.cpp +++ b/compiler-rt/lib/fuzzer/tests/FuzzerUnittest.cpp @@ -619,7 +619,7 @@ TEST(Merge, Bad) { "2\n2\nA\n", "2\n2\nA\nB\nC\n", "0\n0\n", - "1\n1\nA\nDONE 0", + "1\n1\nA\nFT 0", "1\n1\nA\nSTARTED 1", }; Merger M; @@ -644,11 +644,9 @@ static void Merge(const std::string &Input, size_t NumNewFeatures) { Merger M; Vector NewFiles; + Set NewFeatures, NewCov; EXPECT_TRUE(M.Parse(Input, true)); - std::stringstream SS; - M.PrintSummary(SS); - EXPECT_EQ(NumNewFeatures, M.Merge(&NewFiles)); - EXPECT_EQ(M.AllFeatures(), M.ParseSummary(SS)); + EXPECT_EQ(NumNewFeatures, M.Merge({}, &NewFeatures, {}, &NewCov, &NewFiles)); EQ(NewFiles, Result); } @@ -672,9 +670,9 @@ TEST(Merge, Good) { EXPECT_TRUE(M.Parse("3\n1\nAA\nBB\nC\n" "STARTED 0 1000\n" - "DONE 0 1 2 3\n" + "FT 0 1 2 3\n" "STARTED 1 1001\n" - "DONE 1 4 5 6 \n" + "FT 1 4 5 6 \n" "STARTED 2 1002\n" "", true)); EXPECT_EQ(M.Files.size(), 3U); @@ -692,11 +690,12 @@ TEST(Merge, Good) { Vector NewFiles; + Set NewFeatures, NewCov; EXPECT_TRUE(M.Parse("3\n2\nAA\nBB\nC\n" - "STARTED 0 1000\nDONE 0 1 2 3\n" - "STARTED 1 1001\nDONE 1 4 5 6 \n" - "STARTED 2 1002\nDONE 2 6 1 3 \n" + "STARTED 0 1000\nFT 0 1 2 3\n" + "STARTED 1 1001\nFT 1 4 5 6 \n" + "STARTED 2 1002\nFT 2 6 1 3 \n" "", true)); EXPECT_EQ(M.Files.size(), 3U); EXPECT_EQ(M.NumFilesInFirstCorpus, 2U); @@ -705,24 +704,24 @@ TEST(Merge, Good) { EQ(M.Files[0].Features, {1, 2, 3}); EQ(M.Files[1].Features, {4, 5, 6}); EQ(M.Files[2].Features, {1, 3, 6}); - EXPECT_EQ(0U, M.Merge(&NewFiles)); + EXPECT_EQ(0U, M.Merge({}, &NewFeatures, {}, &NewCov, &NewFiles)); EQ(NewFiles, {}); EXPECT_TRUE(M.Parse("3\n1\nA\nB\nC\n" - "STARTED 0 1000\nDONE 0 1 2 3\n" - "STARTED 1 1001\nDONE 1 4 5 6 \n" - "STARTED 2 1002\nDONE 2 6 1 3\n" + "STARTED 0 1000\nFT 0 1 2 3\n" + "STARTED 1 1001\nFT 1 4 5 6 \n" + "STARTED 2 1002\nFT 2 6 1 3\n" "", true)); EQ(M.Files[0].Features, {1, 2, 3}); EQ(M.Files[1].Features, {4, 5, 6}); EQ(M.Files[2].Features, {1, 3, 6}); - EXPECT_EQ(3U, M.Merge(&NewFiles)); + EXPECT_EQ(3U, M.Merge({}, &NewFeatures, {}, &NewCov, &NewFiles)); EQ(NewFiles, {"B"}); // Same as the above, but with InitialFeatures. EXPECT_TRUE(M.Parse("2\n0\nB\nC\n" - "STARTED 0 1001\nDONE 0 4 5 6 \n" - "STARTED 1 1002\nDONE 1 6 1 3\n" + "STARTED 0 1001\nFT 0 4 5 6 \n" + "STARTED 1 1002\nFT 1 6 1 3\n" "", true)); EQ(M.Files[0].Features, {4, 5, 6}); EQ(M.Files[1].Features, {1, 3, 6}); @@ -730,36 +729,36 @@ TEST(Merge, Good) { InitialFeatures.insert(1); InitialFeatures.insert(2); InitialFeatures.insert(3); - EXPECT_EQ(3U, M.Merge(InitialFeatures, &NewFiles)); + EXPECT_EQ(3U, M.Merge(InitialFeatures, &NewFeatures, {}, &NewCov, &NewFiles)); EQ(NewFiles, {"B"}); } TEST(Merge, Merge) { Merge("3\n1\nA\nB\nC\n" - "STARTED 0 1000\nDONE 0 1 2 3\n" - "STARTED 1 1001\nDONE 1 4 5 6 \n" - "STARTED 2 1002\nDONE 2 6 1 3 \n", + "STARTED 0 1000\nFT 0 1 2 3\n" + "STARTED 1 1001\nFT 1 4 5 6 \n" + "STARTED 2 1002\nFT 2 6 1 3 \n", {"B"}, 3); Merge("3\n0\nA\nB\nC\n" - "STARTED 0 2000\nDONE 0 1 2 3\n" - "STARTED 1 1001\nDONE 1 4 5 6 \n" - "STARTED 2 1002\nDONE 2 6 1 3 \n", + "STARTED 0 2000\nFT 0 1 2 3\n" + "STARTED 1 1001\nFT 1 4 5 6 \n" + "STARTED 2 1002\nFT 2 6 1 3 \n", {"A", "B", "C"}, 6); Merge("4\n0\nA\nB\nC\nD\n" - "STARTED 0 2000\nDONE 0 1 2 3\n" - "STARTED 1 1101\nDONE 1 4 5 6 \n" - "STARTED 2 1102\nDONE 2 6 1 3 100 \n" - "STARTED 3 1000\nDONE 3 1 \n", + "STARTED 0 2000\nFT 0 1 2 3\n" + "STARTED 1 1101\nFT 1 4 5 6 \n" + "STARTED 2 1102\nFT 2 6 1 3 100 \n" + "STARTED 3 1000\nFT 3 1 \n", {"A", "B", "C", "D"}, 7); Merge("4\n1\nA\nB\nC\nD\n" - "STARTED 0 2000\nDONE 0 4 5 6 7 8\n" - "STARTED 1 1100\nDONE 1 1 2 3 \n" - "STARTED 2 1100\nDONE 2 2 3 \n" - "STARTED 3 1000\nDONE 3 1 \n", + "STARTED 0 2000\nFT 0 4 5 6 7 8\n" + "STARTED 1 1100\nFT 1 1 2 3 \n" + "STARTED 2 1100\nFT 2 2 3 \n" + "STARTED 3 1000\nFT 3 1 \n", {"B", "D"}, 3); } diff --git a/compiler-rt/lib/hwasan/CMakeLists.txt b/compiler-rt/lib/hwasan/CMakeLists.txt index 20ab94dc04467..1eb16e7e5cd0a 100644 --- a/compiler-rt/lib/hwasan/CMakeLists.txt +++ b/compiler-rt/lib/hwasan/CMakeLists.txt @@ -2,20 +2,22 @@ include_directories(..) # Runtime library sources and build flags. set(HWASAN_RTL_SOURCES - hwasan.cc - hwasan_allocator.cc - hwasan_dynamic_shadow.cc - hwasan_interceptors.cc - hwasan_linux.cc - hwasan_memintrinsics.cc - hwasan_poisoning.cc - hwasan_report.cc - hwasan_thread.cc - hwasan_thread_list.cc + hwasan.cpp + hwasan_allocator.cpp + hwasan_dynamic_shadow.cpp + hwasan_interceptors.cpp + hwasan_interceptors_vfork.S + hwasan_linux.cpp + hwasan_memintrinsics.cpp + hwasan_poisoning.cpp + hwasan_report.cpp + hwasan_thread.cpp + hwasan_thread_list.cpp ) set(HWASAN_RTL_CXX_SOURCES - hwasan_new_delete.cc) + hwasan_new_delete.cpp + ) set(HWASAN_RTL_HEADERS hwasan.h @@ -24,6 +26,7 @@ set(HWASAN_RTL_HEADERS hwasan_flags.h hwasan_flags.inc hwasan_interface_internal.h + hwasan_malloc_bisect.h hwasan_mapping.h hwasan_poisoning.h hwasan_report.h @@ -55,7 +58,7 @@ append_list_if(COMPILER_RT_HAS_FTLS_MODEL_INITIAL_EXEC -ftls-model=initial-exec HWASAN_DYNAMIC_CFLAGS) append_list_if(MSVC /DEBUG HWASAN_DYNAMIC_LINK_FLAGS) -set(HWASAN_DYNAMIC_LIBS ${SANITIZER_CXX_ABI_LIBRARY} ${SANITIZER_COMMON_LINK_LIBS}) +set(HWASAN_DYNAMIC_LIBS ${SANITIZER_CXX_ABI_LIBRARIES} ${SANITIZER_COMMON_LINK_LIBS}) append_list_if(COMPILER_RT_HAS_LIBDL dl HWASAN_DYNAMIC_LIBS) append_list_if(COMPILER_RT_HAS_LIBRT rt HWASAN_DYNAMIC_LIBS) diff --git a/compiler-rt/lib/hwasan/hwasan.cc b/compiler-rt/lib/hwasan/hwasan.cc deleted file mode 100644 index d28b1cc2afd86..0000000000000 --- a/compiler-rt/lib/hwasan/hwasan.cc +++ /dev/null @@ -1,511 +0,0 @@ -//===-- hwasan.cc ---------------------------------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// -// -// This file is a part of HWAddressSanitizer. -// -// HWAddressSanitizer runtime. -//===----------------------------------------------------------------------===// - -#include "hwasan.h" -#include "hwasan_checks.h" -#include "hwasan_dynamic_shadow.h" -#include "hwasan_poisoning.h" -#include "hwasan_report.h" -#include "hwasan_thread.h" -#include "hwasan_thread_list.h" -#include "sanitizer_common/sanitizer_atomic.h" -#include "sanitizer_common/sanitizer_common.h" -#include "sanitizer_common/sanitizer_flag_parser.h" -#include "sanitizer_common/sanitizer_flags.h" -#include "sanitizer_common/sanitizer_libc.h" -#include "sanitizer_common/sanitizer_procmaps.h" -#include "sanitizer_common/sanitizer_stackdepot.h" -#include "sanitizer_common/sanitizer_stacktrace.h" -#include "sanitizer_common/sanitizer_symbolizer.h" -#include "ubsan/ubsan_flags.h" -#include "ubsan/ubsan_init.h" - -// ACHTUNG! No system header includes in this file. - -using namespace __sanitizer; - -namespace __hwasan { - -void EnterSymbolizer() { - Thread *t = GetCurrentThread(); - CHECK(t); - t->EnterSymbolizer(); -} -void ExitSymbolizer() { - Thread *t = GetCurrentThread(); - CHECK(t); - t->LeaveSymbolizer(); -} -bool IsInSymbolizer() { - Thread *t = GetCurrentThread(); - return t && t->InSymbolizer(); -} - -static Flags hwasan_flags; - -Flags *flags() { - return &hwasan_flags; -} - -int hwasan_inited = 0; -int hwasan_instrumentation_inited = 0; -bool hwasan_init_is_running; - -int hwasan_report_count = 0; - -void Flags::SetDefaults() { -#define HWASAN_FLAG(Type, Name, DefaultValue, Description) Name = DefaultValue; -#include "hwasan_flags.inc" -#undef HWASAN_FLAG -} - -static void RegisterHwasanFlags(FlagParser *parser, Flags *f) { -#define HWASAN_FLAG(Type, Name, DefaultValue, Description) \ - RegisterFlag(parser, #Name, Description, &f->Name); -#include "hwasan_flags.inc" -#undef HWASAN_FLAG -} - -static void InitializeFlags() { - SetCommonFlagsDefaults(); - { - CommonFlags cf; - cf.CopyFrom(*common_flags()); - cf.external_symbolizer_path = GetEnv("HWASAN_SYMBOLIZER_PATH"); - cf.malloc_context_size = 20; - cf.handle_ioctl = true; - // FIXME: test and enable. - cf.check_printf = false; - cf.intercept_tls_get_addr = true; - cf.exitcode = 99; - // 8 shadow pages ~512kB, small enough to cover common stack sizes. - cf.clear_shadow_mmap_threshold = 4096 * (SANITIZER_ANDROID ? 2 : 8); - // Sigtrap is used in error reporting. - cf.handle_sigtrap = kHandleSignalExclusive; - -#if SANITIZER_ANDROID - // Let platform handle other signals. It is better at reporting them then we - // are. - cf.handle_segv = kHandleSignalNo; - cf.handle_sigbus = kHandleSignalNo; - cf.handle_abort = kHandleSignalNo; - cf.handle_sigill = kHandleSignalNo; - cf.handle_sigfpe = kHandleSignalNo; -#endif - OverrideCommonFlags(cf); - } - - Flags *f = flags(); - f->SetDefaults(); - - FlagParser parser; - RegisterHwasanFlags(&parser, f); - RegisterCommonFlags(&parser); - -#if HWASAN_CONTAINS_UBSAN - __ubsan::Flags *uf = __ubsan::flags(); - uf->SetDefaults(); - - FlagParser ubsan_parser; - __ubsan::RegisterUbsanFlags(&ubsan_parser, uf); - RegisterCommonFlags(&ubsan_parser); -#endif - - // Override from user-specified string. - if (__hwasan_default_options) - parser.ParseString(__hwasan_default_options()); -#if HWASAN_CONTAINS_UBSAN - const char *ubsan_default_options = __ubsan::MaybeCallUbsanDefaultOptions(); - ubsan_parser.ParseString(ubsan_default_options); -#endif - - const char *hwasan_options = GetEnv("HWASAN_OPTIONS"); - parser.ParseString(hwasan_options); -#if HWASAN_CONTAINS_UBSAN - ubsan_parser.ParseString(GetEnv("UBSAN_OPTIONS")); -#endif - VPrintf(1, "HWASAN_OPTIONS: %s\n", - hwasan_options ? hwasan_options : ""); - - InitializeCommonFlags(); - - if (Verbosity()) ReportUnrecognizedFlags(); - - if (common_flags()->help) parser.PrintFlagDescriptions(); -} - -void GetStackTrace(BufferedStackTrace *stack, uptr max_s, uptr pc, uptr bp, - void *context, bool request_fast_unwind) { - Thread *t = GetCurrentThread(); - if (!t) { - // the thread is still being created. - stack->size = 0; - return; - } - if (!StackTrace::WillUseFastUnwind(request_fast_unwind)) { - // Block reports from our interceptors during _Unwind_Backtrace. - SymbolizerScope sym_scope; - return stack->Unwind(max_s, pc, bp, context, 0, 0, request_fast_unwind); - } - stack->Unwind(max_s, pc, bp, context, t->stack_top(), t->stack_bottom(), - request_fast_unwind); -} - -static void HWAsanCheckFailed(const char *file, int line, const char *cond, - u64 v1, u64 v2) { - Report("HWAddressSanitizer CHECK failed: %s:%d \"%s\" (0x%zx, 0x%zx)\n", file, - line, cond, (uptr)v1, (uptr)v2); - PRINT_CURRENT_STACK_CHECK(); - Die(); -} - -static constexpr uptr kMemoryUsageBufferSize = 4096; - -static void HwasanFormatMemoryUsage(InternalScopedString &s) { - HwasanThreadList &thread_list = hwasanThreadList(); - auto thread_stats = thread_list.GetThreadStats(); - auto *sds = StackDepotGetStats(); - AllocatorStatCounters asc; - GetAllocatorStats(asc); - s.append( - "HWASAN pid: %d rss: %zd threads: %zd stacks: %zd" - " thr_aux: %zd stack_depot: %zd uniq_stacks: %zd" - " heap: %zd", - internal_getpid(), GetRSS(), thread_stats.n_live_threads, - thread_stats.total_stack_size, - thread_stats.n_live_threads * thread_list.MemoryUsedPerThread(), - sds->allocated, sds->n_uniq_ids, asc[AllocatorStatMapped]); -} - -#if SANITIZER_ANDROID -static char *memory_usage_buffer = nullptr; - -#define PR_SET_VMA 0x53564d41 -#define PR_SET_VMA_ANON_NAME 0 - -static void InitMemoryUsage() { - memory_usage_buffer = - (char *)MmapOrDie(kMemoryUsageBufferSize, "memory usage string"); - CHECK(memory_usage_buffer); - memory_usage_buffer[0] = '\0'; - CHECK(internal_prctl(PR_SET_VMA, PR_SET_VMA_ANON_NAME, - (uptr)memory_usage_buffer, kMemoryUsageBufferSize, - (uptr)memory_usage_buffer) == 0); -} - -void UpdateMemoryUsage() { - if (!flags()->export_memory_stats) - return; - if (!memory_usage_buffer) - InitMemoryUsage(); - InternalScopedString s(kMemoryUsageBufferSize); - HwasanFormatMemoryUsage(s); - internal_strncpy(memory_usage_buffer, s.data(), kMemoryUsageBufferSize - 1); - memory_usage_buffer[kMemoryUsageBufferSize - 1] = '\0'; -} -#else -void UpdateMemoryUsage() {} -#endif - -struct FrameDescription { - uptr PC; - const char *Descr; -}; - -struct FrameDescriptionArray { - FrameDescription *beg, *end; -}; - -static InternalMmapVectorNoCtor AllFrames; - -void InitFrameDescriptors(uptr b, uptr e) { - FrameDescription *beg = reinterpret_cast(b); - FrameDescription *end = reinterpret_cast(e); - if (beg == end) - return; - AllFrames.push_back({beg, end}); - if (Verbosity()) - for (FrameDescription *frame_descr = beg; frame_descr < end; frame_descr++) - Printf("Frame: %p %s\n", frame_descr->PC, frame_descr->Descr); -} - -const char *GetStackFrameDescr(uptr pc) { - for (uptr i = 0, n = AllFrames.size(); i < n; i++) - for (auto p = AllFrames[i].beg; p < AllFrames[i].end; p++) - if (p->PC == pc) - return p->Descr; - return nullptr; -} - -// Prepare to run instrumented code on the main thread. -void InitInstrumentation() { - if (hwasan_instrumentation_inited) return; - - if (!InitShadow()) { - Printf("FATAL: HWAddressSanitizer cannot mmap the shadow memory.\n"); - DumpProcessMap(); - Die(); - } - - InitThreads(); - hwasanThreadList().CreateCurrentThread(); - - hwasan_instrumentation_inited = 1; -} - -} // namespace __hwasan - -// Interface. - -using namespace __hwasan; - -uptr __hwasan_shadow_memory_dynamic_address; // Global interface symbol. - -void __hwasan_init_frames(uptr beg, uptr end) { - InitFrameDescriptors(beg, end); -} - -void __hwasan_init_static() { - InitShadowGOT(); - InitInstrumentation(); -} - -void __hwasan_init() { - CHECK(!hwasan_init_is_running); - if (hwasan_inited) return; - hwasan_init_is_running = 1; - SanitizerToolName = "HWAddressSanitizer"; - - InitTlsSize(); - - CacheBinaryName(); - InitializeFlags(); - - // Install tool-specific callbacks in sanitizer_common. - SetCheckFailedCallback(HWAsanCheckFailed); - - __sanitizer_set_report_path(common_flags()->log_path); - - AndroidTestTlsSlot(); - - DisableCoreDumperIfNecessary(); - - InitInstrumentation(); - - // Needs to be called here because flags()->random_tags might not have been - // initialized when InitInstrumentation() was called. - GetCurrentThread()->InitRandomState(); - - MadviseShadow(); - - SetPrintfAndReportCallback(AppendToErrorMessageBuffer); - // This may call libc -> needs initialized shadow. - AndroidLogInit(); - - InitializeInterceptors(); - InstallDeadlySignalHandlers(HwasanOnDeadlySignal); - InstallAtExitHandler(); // Needs __cxa_atexit interceptor. - - Symbolizer::GetOrInit()->AddHooks(EnterSymbolizer, ExitSymbolizer); - - InitializeCoverage(common_flags()->coverage, common_flags()->coverage_dir); - - HwasanTSDInit(); - HwasanTSDThreadInit(); - - HwasanAllocatorInit(); - -#if HWASAN_CONTAINS_UBSAN - __ubsan::InitAsPlugin(); -#endif - - VPrintf(1, "HWAddressSanitizer init done\n"); - - hwasan_init_is_running = 0; - hwasan_inited = 1; -} - -void __hwasan_print_shadow(const void *p, uptr sz) { - uptr ptr_raw = UntagAddr(reinterpret_cast(p)); - uptr shadow_first = MemToShadow(ptr_raw); - uptr shadow_last = MemToShadow(ptr_raw + sz - 1); - Printf("HWASan shadow map for %zx .. %zx (pointer tag %x)\n", ptr_raw, - ptr_raw + sz, GetTagFromPointer((uptr)p)); - for (uptr s = shadow_first; s <= shadow_last; ++s) - Printf(" %zx: %x\n", ShadowToMem(s), *(tag_t *)s); -} - -sptr __hwasan_test_shadow(const void *p, uptr sz) { - if (sz == 0) - return -1; - tag_t ptr_tag = GetTagFromPointer((uptr)p); - uptr ptr_raw = UntagAddr(reinterpret_cast(p)); - uptr shadow_first = MemToShadow(ptr_raw); - uptr shadow_last = MemToShadow(ptr_raw + sz - 1); - for (uptr s = shadow_first; s <= shadow_last; ++s) - if (*(tag_t *)s != ptr_tag) { - sptr offset = ShadowToMem(s) - ptr_raw; - return offset < 0 ? 0 : offset; - } - return -1; -} - -u16 __sanitizer_unaligned_load16(const uu16 *p) { - return *p; -} -u32 __sanitizer_unaligned_load32(const uu32 *p) { - return *p; -} -u64 __sanitizer_unaligned_load64(const uu64 *p) { - return *p; -} -void __sanitizer_unaligned_store16(uu16 *p, u16 x) { - *p = x; -} -void __sanitizer_unaligned_store32(uu32 *p, u32 x) { - *p = x; -} -void __sanitizer_unaligned_store64(uu64 *p, u64 x) { - *p = x; -} - -void __hwasan_loadN(uptr p, uptr sz) { - CheckAddressSized(p, sz); -} -void __hwasan_load1(uptr p) { - CheckAddress(p); -} -void __hwasan_load2(uptr p) { - CheckAddress(p); -} -void __hwasan_load4(uptr p) { - CheckAddress(p); -} -void __hwasan_load8(uptr p) { - CheckAddress(p); -} -void __hwasan_load16(uptr p) { - CheckAddress(p); -} - -void __hwasan_loadN_noabort(uptr p, uptr sz) { - CheckAddressSized(p, sz); -} -void __hwasan_load1_noabort(uptr p) { - CheckAddress(p); -} -void __hwasan_load2_noabort(uptr p) { - CheckAddress(p); -} -void __hwasan_load4_noabort(uptr p) { - CheckAddress(p); -} -void __hwasan_load8_noabort(uptr p) { - CheckAddress(p); -} -void __hwasan_load16_noabort(uptr p) { - CheckAddress(p); -} - -void __hwasan_storeN(uptr p, uptr sz) { - CheckAddressSized(p, sz); -} -void __hwasan_store1(uptr p) { - CheckAddress(p); -} -void __hwasan_store2(uptr p) { - CheckAddress(p); -} -void __hwasan_store4(uptr p) { - CheckAddress(p); -} -void __hwasan_store8(uptr p) { - CheckAddress(p); -} -void __hwasan_store16(uptr p) { - CheckAddress(p); -} - -void __hwasan_storeN_noabort(uptr p, uptr sz) { - CheckAddressSized(p, sz); -} -void __hwasan_store1_noabort(uptr p) { - CheckAddress(p); -} -void __hwasan_store2_noabort(uptr p) { - CheckAddress(p); -} -void __hwasan_store4_noabort(uptr p) { - CheckAddress(p); -} -void __hwasan_store8_noabort(uptr p) { - CheckAddress(p); -} -void __hwasan_store16_noabort(uptr p) { - CheckAddress(p); -} - -void __hwasan_tag_memory(uptr p, u8 tag, uptr sz) { - TagMemoryAligned(p, sz, tag); -} - -uptr __hwasan_tag_pointer(uptr p, u8 tag) { - return AddTagToPointer(p, tag); -} - -void __hwasan_handle_longjmp(const void *sp_dst) { - uptr dst = (uptr)sp_dst; - // HWASan does not support tagged SP. - CHECK(GetTagFromPointer(dst) == 0); - - uptr sp = (uptr)__builtin_frame_address(0); - static const uptr kMaxExpectedCleanupSize = 64 << 20; // 64M - if (dst < sp || dst - sp > kMaxExpectedCleanupSize) { - Report( - "WARNING: HWASan is ignoring requested __hwasan_handle_longjmp: " - "stack top: %p; target %p; distance: %p (%zd)\n" - "False positive error reports may follow\n", - (void *)sp, (void *)dst, dst - sp); - return; - } - TagMemory(sp, dst - sp, 0); -} - -void __hwasan_print_memory_usage() { - InternalScopedString s(kMemoryUsageBufferSize); - HwasanFormatMemoryUsage(s); - Printf("%s\n", s.data()); -} - -static const u8 kFallbackTag = 0xBB; - -u8 __hwasan_generate_tag() { - Thread *t = GetCurrentThread(); - if (!t) return kFallbackTag; - return t->GenerateRandomTag(); -} - -#if !SANITIZER_SUPPORTS_WEAK_HOOKS -extern "C" { -SANITIZER_INTERFACE_ATTRIBUTE SANITIZER_WEAK_ATTRIBUTE -const char* __hwasan_default_options() { return ""; } -} // extern "C" -#endif - -extern "C" { -SANITIZER_INTERFACE_ATTRIBUTE -void __sanitizer_print_stack_trace() { - GET_FATAL_STACK_TRACE_PC_BP(StackTrace::GetCurrentPc(), GET_CURRENT_FRAME()); - stack.Print(); -} -} // extern "C" diff --git a/compiler-rt/lib/hwasan/hwasan.cpp b/compiler-rt/lib/hwasan/hwasan.cpp new file mode 100644 index 0000000000000..65b755ee24dc6 --- /dev/null +++ b/compiler-rt/lib/hwasan/hwasan.cpp @@ -0,0 +1,532 @@ +//===-- hwasan.cpp --------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// +// This file is a part of HWAddressSanitizer. +// +// HWAddressSanitizer runtime. +//===----------------------------------------------------------------------===// + +#include "hwasan.h" +#include "hwasan_checks.h" +#include "hwasan_dynamic_shadow.h" +#include "hwasan_poisoning.h" +#include "hwasan_report.h" +#include "hwasan_thread.h" +#include "hwasan_thread_list.h" +#include "sanitizer_common/sanitizer_atomic.h" +#include "sanitizer_common/sanitizer_common.h" +#include "sanitizer_common/sanitizer_flag_parser.h" +#include "sanitizer_common/sanitizer_flags.h" +#include "sanitizer_common/sanitizer_libc.h" +#include "sanitizer_common/sanitizer_procmaps.h" +#include "sanitizer_common/sanitizer_stackdepot.h" +#include "sanitizer_common/sanitizer_stacktrace.h" +#include "sanitizer_common/sanitizer_symbolizer.h" +#include "ubsan/ubsan_flags.h" +#include "ubsan/ubsan_init.h" + +// ACHTUNG! No system header includes in this file. + +using namespace __sanitizer; + +namespace __hwasan { + +void EnterSymbolizer() { + Thread *t = GetCurrentThread(); + CHECK(t); + t->EnterSymbolizer(); +} +void ExitSymbolizer() { + Thread *t = GetCurrentThread(); + CHECK(t); + t->LeaveSymbolizer(); +} +bool IsInSymbolizer() { + Thread *t = GetCurrentThread(); + return t && t->InSymbolizer(); +} + +static Flags hwasan_flags; + +Flags *flags() { + return &hwasan_flags; +} + +int hwasan_inited = 0; +int hwasan_instrumentation_inited = 0; +bool hwasan_init_is_running; + +int hwasan_report_count = 0; + +void Flags::SetDefaults() { +#define HWASAN_FLAG(Type, Name, DefaultValue, Description) Name = DefaultValue; +#include "hwasan_flags.inc" +#undef HWASAN_FLAG +} + +static void RegisterHwasanFlags(FlagParser *parser, Flags *f) { +#define HWASAN_FLAG(Type, Name, DefaultValue, Description) \ + RegisterFlag(parser, #Name, Description, &f->Name); +#include "hwasan_flags.inc" +#undef HWASAN_FLAG +} + +static void InitializeFlags() { + SetCommonFlagsDefaults(); + { + CommonFlags cf; + cf.CopyFrom(*common_flags()); + cf.external_symbolizer_path = GetEnv("HWASAN_SYMBOLIZER_PATH"); + cf.malloc_context_size = 20; + cf.handle_ioctl = true; + // FIXME: test and enable. + cf.check_printf = false; + cf.intercept_tls_get_addr = true; + cf.exitcode = 99; + // 8 shadow pages ~512kB, small enough to cover common stack sizes. + cf.clear_shadow_mmap_threshold = 4096 * (SANITIZER_ANDROID ? 2 : 8); + // Sigtrap is used in error reporting. + cf.handle_sigtrap = kHandleSignalExclusive; + +#if SANITIZER_ANDROID + // Let platform handle other signals. It is better at reporting them then we + // are. + cf.handle_segv = kHandleSignalNo; + cf.handle_sigbus = kHandleSignalNo; + cf.handle_abort = kHandleSignalNo; + cf.handle_sigill = kHandleSignalNo; + cf.handle_sigfpe = kHandleSignalNo; +#endif + OverrideCommonFlags(cf); + } + + Flags *f = flags(); + f->SetDefaults(); + + FlagParser parser; + RegisterHwasanFlags(&parser, f); + RegisterCommonFlags(&parser); + +#if HWASAN_CONTAINS_UBSAN + __ubsan::Flags *uf = __ubsan::flags(); + uf->SetDefaults(); + + FlagParser ubsan_parser; + __ubsan::RegisterUbsanFlags(&ubsan_parser, uf); + RegisterCommonFlags(&ubsan_parser); +#endif + + // Override from user-specified string. + if (__hwasan_default_options) + parser.ParseString(__hwasan_default_options()); +#if HWASAN_CONTAINS_UBSAN + const char *ubsan_default_options = __ubsan::MaybeCallUbsanDefaultOptions(); + ubsan_parser.ParseString(ubsan_default_options); +#endif + + const char *hwasan_options = GetEnv("HWASAN_OPTIONS"); + parser.ParseString(hwasan_options); +#if HWASAN_CONTAINS_UBSAN + ubsan_parser.ParseString(GetEnv("UBSAN_OPTIONS")); +#endif + VPrintf(1, "HWASAN_OPTIONS: %s\n", + hwasan_options ? hwasan_options : ""); + + InitializeCommonFlags(); + + if (Verbosity()) ReportUnrecognizedFlags(); + + if (common_flags()->help) parser.PrintFlagDescriptions(); +} + +static void HWAsanCheckFailed(const char *file, int line, const char *cond, + u64 v1, u64 v2) { + Report("HWAddressSanitizer CHECK failed: %s:%d \"%s\" (0x%zx, 0x%zx)\n", file, + line, cond, (uptr)v1, (uptr)v2); + PRINT_CURRENT_STACK_CHECK(); + Die(); +} + +static constexpr uptr kMemoryUsageBufferSize = 4096; + +static void HwasanFormatMemoryUsage(InternalScopedString &s) { + HwasanThreadList &thread_list = hwasanThreadList(); + auto thread_stats = thread_list.GetThreadStats(); + auto *sds = StackDepotGetStats(); + AllocatorStatCounters asc; + GetAllocatorStats(asc); + s.append( + "HWASAN pid: %d rss: %zd threads: %zd stacks: %zd" + " thr_aux: %zd stack_depot: %zd uniq_stacks: %zd" + " heap: %zd", + internal_getpid(), GetRSS(), thread_stats.n_live_threads, + thread_stats.total_stack_size, + thread_stats.n_live_threads * thread_list.MemoryUsedPerThread(), + sds->allocated, sds->n_uniq_ids, asc[AllocatorStatMapped]); +} + +#if SANITIZER_ANDROID +static char *memory_usage_buffer = nullptr; + +static void InitMemoryUsage() { + memory_usage_buffer = + (char *)MmapOrDie(kMemoryUsageBufferSize, "memory usage string"); + CHECK(memory_usage_buffer); + memory_usage_buffer[0] = '\0'; + DecorateMapping((uptr)memory_usage_buffer, kMemoryUsageBufferSize, + memory_usage_buffer); +} + +void UpdateMemoryUsage() { + if (!flags()->export_memory_stats) + return; + if (!memory_usage_buffer) + InitMemoryUsage(); + InternalScopedString s(kMemoryUsageBufferSize); + HwasanFormatMemoryUsage(s); + internal_strncpy(memory_usage_buffer, s.data(), kMemoryUsageBufferSize - 1); + memory_usage_buffer[kMemoryUsageBufferSize - 1] = '\0'; +} +#else +void UpdateMemoryUsage() {} +#endif + +struct FrameDescription { + uptr PC; + const char *Descr; +}; + +struct FrameDescriptionArray { + FrameDescription *beg, *end; +}; + +static InternalMmapVectorNoCtor AllFrames; + +void InitFrameDescriptors(uptr b, uptr e) { + FrameDescription *beg = reinterpret_cast(b); + FrameDescription *end = reinterpret_cast(e); + if (beg == end) + return; + AllFrames.push_back({beg, end}); + if (Verbosity()) + for (FrameDescription *frame_descr = beg; frame_descr < end; frame_descr++) + Printf("Frame: %p %s\n", frame_descr->PC, frame_descr->Descr); +} + +const char *GetStackFrameDescr(uptr pc) { + for (uptr i = 0, n = AllFrames.size(); i < n; i++) + for (auto p = AllFrames[i].beg; p < AllFrames[i].end; p++) + if (p->PC == pc) + return p->Descr; + return nullptr; +} + +// Prepare to run instrumented code on the main thread. +void InitInstrumentation() { + if (hwasan_instrumentation_inited) return; + + if (!InitShadow()) { + Printf("FATAL: HWAddressSanitizer cannot mmap the shadow memory.\n"); + DumpProcessMap(); + Die(); + } + + InitThreads(); + hwasanThreadList().CreateCurrentThread(); + + hwasan_instrumentation_inited = 1; +} + +} // namespace __hwasan + +void __sanitizer::BufferedStackTrace::UnwindImpl( + uptr pc, uptr bp, void *context, bool request_fast, u32 max_depth) { + using namespace __hwasan; + Thread *t = GetCurrentThread(); + if (!t) { + // the thread is still being created. + size = 0; + return; + } + if (!StackTrace::WillUseFastUnwind(request_fast)) { + // Block reports from our interceptors during _Unwind_Backtrace. + SymbolizerScope sym_scope; + return Unwind(max_depth, pc, bp, context, 0, 0, request_fast); + } + if (StackTrace::WillUseFastUnwind(request_fast)) + Unwind(max_depth, pc, bp, nullptr, t->stack_top(), t->stack_bottom(), true); + else + Unwind(max_depth, pc, 0, context, 0, 0, false); +} + +// Interface. + +using namespace __hwasan; + +uptr __hwasan_shadow_memory_dynamic_address; // Global interface symbol. + +void __hwasan_init_frames(uptr beg, uptr end) { + InitFrameDescriptors(beg, end); +} + +void __hwasan_init_static() { + InitShadowGOT(); + InitInstrumentation(); +} + +void __hwasan_init() { + CHECK(!hwasan_init_is_running); + if (hwasan_inited) return; + hwasan_init_is_running = 1; + SanitizerToolName = "HWAddressSanitizer"; + + InitTlsSize(); + + CacheBinaryName(); + InitializeFlags(); + + // Install tool-specific callbacks in sanitizer_common. + SetCheckFailedCallback(HWAsanCheckFailed); + + __sanitizer_set_report_path(common_flags()->log_path); + + AndroidTestTlsSlot(); + + DisableCoreDumperIfNecessary(); + + InitInstrumentation(); + + // Needs to be called here because flags()->random_tags might not have been + // initialized when InitInstrumentation() was called. + GetCurrentThread()->InitRandomState(); + + MadviseShadow(); + + SetPrintfAndReportCallback(AppendToErrorMessageBuffer); + // This may call libc -> needs initialized shadow. + AndroidLogInit(); + + InitializeInterceptors(); + InstallDeadlySignalHandlers(HwasanOnDeadlySignal); + InstallAtExitHandler(); // Needs __cxa_atexit interceptor. + + Symbolizer::GetOrInit()->AddHooks(EnterSymbolizer, ExitSymbolizer); + + InitializeCoverage(common_flags()->coverage, common_flags()->coverage_dir); + + HwasanTSDInit(); + HwasanTSDThreadInit(); + + HwasanAllocatorInit(); + +#if HWASAN_CONTAINS_UBSAN + __ubsan::InitAsPlugin(); +#endif + + VPrintf(1, "HWAddressSanitizer init done\n"); + + hwasan_init_is_running = 0; + hwasan_inited = 1; +} + +void __hwasan_print_shadow(const void *p, uptr sz) { + uptr ptr_raw = UntagAddr(reinterpret_cast(p)); + uptr shadow_first = MemToShadow(ptr_raw); + uptr shadow_last = MemToShadow(ptr_raw + sz - 1); + Printf("HWASan shadow map for %zx .. %zx (pointer tag %x)\n", ptr_raw, + ptr_raw + sz, GetTagFromPointer((uptr)p)); + for (uptr s = shadow_first; s <= shadow_last; ++s) + Printf(" %zx: %x\n", ShadowToMem(s), *(tag_t *)s); +} + +sptr __hwasan_test_shadow(const void *p, uptr sz) { + if (sz == 0) + return -1; + tag_t ptr_tag = GetTagFromPointer((uptr)p); + uptr ptr_raw = UntagAddr(reinterpret_cast(p)); + uptr shadow_first = MemToShadow(ptr_raw); + uptr shadow_last = MemToShadow(ptr_raw + sz - 1); + for (uptr s = shadow_first; s <= shadow_last; ++s) + if (*(tag_t *)s != ptr_tag) { + sptr offset = ShadowToMem(s) - ptr_raw; + return offset < 0 ? 0 : offset; + } + return -1; +} + +u16 __sanitizer_unaligned_load16(const uu16 *p) { + return *p; +} +u32 __sanitizer_unaligned_load32(const uu32 *p) { + return *p; +} +u64 __sanitizer_unaligned_load64(const uu64 *p) { + return *p; +} +void __sanitizer_unaligned_store16(uu16 *p, u16 x) { + *p = x; +} +void __sanitizer_unaligned_store32(uu32 *p, u32 x) { + *p = x; +} +void __sanitizer_unaligned_store64(uu64 *p, u64 x) { + *p = x; +} + +void __hwasan_loadN(uptr p, uptr sz) { + CheckAddressSized(p, sz); +} +void __hwasan_load1(uptr p) { + CheckAddress(p); +} +void __hwasan_load2(uptr p) { + CheckAddress(p); +} +void __hwasan_load4(uptr p) { + CheckAddress(p); +} +void __hwasan_load8(uptr p) { + CheckAddress(p); +} +void __hwasan_load16(uptr p) { + CheckAddress(p); +} + +void __hwasan_loadN_noabort(uptr p, uptr sz) { + CheckAddressSized(p, sz); +} +void __hwasan_load1_noabort(uptr p) { + CheckAddress(p); +} +void __hwasan_load2_noabort(uptr p) { + CheckAddress(p); +} +void __hwasan_load4_noabort(uptr p) { + CheckAddress(p); +} +void __hwasan_load8_noabort(uptr p) { + CheckAddress(p); +} +void __hwasan_load16_noabort(uptr p) { + CheckAddress(p); +} + +void __hwasan_storeN(uptr p, uptr sz) { + CheckAddressSized(p, sz); +} +void __hwasan_store1(uptr p) { + CheckAddress(p); +} +void __hwasan_store2(uptr p) { + CheckAddress(p); +} +void __hwasan_store4(uptr p) { + CheckAddress(p); +} +void __hwasan_store8(uptr p) { + CheckAddress(p); +} +void __hwasan_store16(uptr p) { + CheckAddress(p); +} + +void __hwasan_storeN_noabort(uptr p, uptr sz) { + CheckAddressSized(p, sz); +} +void __hwasan_store1_noabort(uptr p) { + CheckAddress(p); +} +void __hwasan_store2_noabort(uptr p) { + CheckAddress(p); +} +void __hwasan_store4_noabort(uptr p) { + CheckAddress(p); +} +void __hwasan_store8_noabort(uptr p) { + CheckAddress(p); +} +void __hwasan_store16_noabort(uptr p) { + CheckAddress(p); +} + +void __hwasan_tag_memory(uptr p, u8 tag, uptr sz) { + TagMemoryAligned(p, sz, tag); +} + +uptr __hwasan_tag_pointer(uptr p, u8 tag) { + return AddTagToPointer(p, tag); +} + +void __hwasan_handle_longjmp(const void *sp_dst) { + uptr dst = (uptr)sp_dst; + // HWASan does not support tagged SP. + CHECK(GetTagFromPointer(dst) == 0); + + uptr sp = (uptr)__builtin_frame_address(0); + static const uptr kMaxExpectedCleanupSize = 64 << 20; // 64M + if (dst < sp || dst - sp > kMaxExpectedCleanupSize) { + Report( + "WARNING: HWASan is ignoring requested __hwasan_handle_longjmp: " + "stack top: %p; target %p; distance: %p (%zd)\n" + "False positive error reports may follow\n", + (void *)sp, (void *)dst, dst - sp); + return; + } + TagMemory(sp, dst - sp, 0); +} + +void __hwasan_handle_vfork(const void *sp_dst) { + uptr sp = (uptr)sp_dst; + Thread *t = GetCurrentThread(); + CHECK(t); + uptr top = t->stack_top(); + uptr bottom = t->stack_bottom(); + if (top == 0 || bottom == 0 || sp < bottom || sp >= top) { + Report( + "WARNING: HWASan is ignoring requested __hwasan_handle_vfork: " + "stack top: %zx; current %zx; bottom: %zx \n" + "False positive error reports may follow\n", + top, sp, bottom); + return; + } + TagMemory(bottom, sp - bottom, 0); +} + +extern "C" void *__hwasan_extra_spill_area() { + Thread *t = GetCurrentThread(); + return &t->vfork_spill(); +} + +void __hwasan_print_memory_usage() { + InternalScopedString s(kMemoryUsageBufferSize); + HwasanFormatMemoryUsage(s); + Printf("%s\n", s.data()); +} + +static const u8 kFallbackTag = 0xBB; + +u8 __hwasan_generate_tag() { + Thread *t = GetCurrentThread(); + if (!t) return kFallbackTag; + return t->GenerateRandomTag(); +} + +#if !SANITIZER_SUPPORTS_WEAK_HOOKS +extern "C" { +SANITIZER_INTERFACE_ATTRIBUTE SANITIZER_WEAK_ATTRIBUTE +const char* __hwasan_default_options() { return ""; } +} // extern "C" +#endif + +extern "C" { +SANITIZER_INTERFACE_ATTRIBUTE +void __sanitizer_print_stack_trace() { + GET_FATAL_STACK_TRACE_PC_BP(StackTrace::GetCurrentPc(), GET_CURRENT_FRAME()); + stack.Print(); +} +} // extern "C" diff --git a/compiler-rt/lib/hwasan/hwasan.h b/compiler-rt/lib/hwasan/hwasan.h index 8b156f58c68bd..74eaa0c7d8a86 100644 --- a/compiler-rt/lib/hwasan/hwasan.h +++ b/compiler-rt/lib/hwasan/hwasan.h @@ -104,9 +104,6 @@ struct SymbolizerScope { ~SymbolizerScope() { ExitSymbolizer(); } }; -void GetStackTrace(BufferedStackTrace *stack, uptr max_s, uptr pc, uptr bp, - void *context, bool request_fast_unwind); - // Returns a "chained" origin id, pointing to the given stack trace followed by // the previous origin id. u32 ChainOrigin(u32 id, StackTrace *stack); @@ -115,16 +112,15 @@ const int STACK_TRACE_TAG_POISON = StackTrace::TAG_CUSTOM + 1; #define GET_MALLOC_STACK_TRACE \ BufferedStackTrace stack; \ - if (hwasan_inited) \ - GetStackTrace(&stack, common_flags()->malloc_context_size, \ - StackTrace::GetCurrentPc(), GET_CURRENT_FRAME(), nullptr, \ - common_flags()->fast_unwind_on_malloc) + if (hwasan_inited) \ + stack.Unwind(StackTrace::GetCurrentPc(), GET_CURRENT_FRAME(), \ + nullptr, common_flags()->fast_unwind_on_malloc, \ + common_flags()->malloc_context_size) #define GET_FATAL_STACK_TRACE_PC_BP(pc, bp) \ BufferedStackTrace stack; \ - if (hwasan_inited) \ - GetStackTrace(&stack, kStackTraceMax, pc, bp, nullptr, \ - common_flags()->fast_unwind_on_fatal) + if (hwasan_inited) \ + stack.Unwind(pc, bp, nullptr, common_flags()->fast_unwind_on_fatal) #define GET_FATAL_STACK_TRACE_HERE \ GET_FATAL_STACK_TRACE_PC_BP(StackTrace::GetCurrentPc(), GET_CURRENT_FRAME()) diff --git a/compiler-rt/lib/hwasan/hwasan_allocator.cc b/compiler-rt/lib/hwasan/hwasan_allocator.cc deleted file mode 100644 index dc56bd7ef9cdf..0000000000000 --- a/compiler-rt/lib/hwasan/hwasan_allocator.cc +++ /dev/null @@ -1,443 +0,0 @@ -//===-- hwasan_allocator.cc ------------------------- ---------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// -// -// This file is a part of HWAddressSanitizer. -// -// HWAddressSanitizer allocator. -//===----------------------------------------------------------------------===// - -#include "sanitizer_common/sanitizer_atomic.h" -#include "sanitizer_common/sanitizer_errno.h" -#include "sanitizer_common/sanitizer_stackdepot.h" -#include "hwasan.h" -#include "hwasan_allocator.h" -#include "hwasan_mapping.h" -#include "hwasan_thread.h" -#include "hwasan_report.h" - -#if HWASAN_WITH_INTERCEPTORS -DEFINE_REAL(void *, realloc, void *ptr, uptr size) -DEFINE_REAL(void, free, void *ptr) -#endif - -namespace __hwasan { - -static Allocator allocator; -static AllocatorCache fallback_allocator_cache; -static SpinMutex fallback_mutex; -static atomic_uint8_t hwasan_allocator_tagging_enabled; - -static const tag_t kFallbackAllocTag = 0xBB; -static const tag_t kFallbackFreeTag = 0xBC; - -enum RightAlignMode { - kRightAlignNever, - kRightAlignSometimes, - kRightAlignAlways -}; - -// These two variables are initialized from flags()->malloc_align_right -// in HwasanAllocatorInit and are never changed afterwards. -static RightAlignMode right_align_mode = kRightAlignNever; -static bool right_align_8 = false; - -// Initialized in HwasanAllocatorInit, an never changed. -static ALIGNED(16) u8 tail_magic[kShadowAlignment]; - -bool HwasanChunkView::IsAllocated() const { - return metadata_ && metadata_->alloc_context_id && metadata_->requested_size; -} - -// Aligns the 'addr' right to the granule boundary. -static uptr AlignRight(uptr addr, uptr requested_size) { - uptr tail_size = requested_size % kShadowAlignment; - if (!tail_size) return addr; - if (right_align_8) - return tail_size > 8 ? addr : addr + 8; - return addr + kShadowAlignment - tail_size; -} - -uptr HwasanChunkView::Beg() const { - if (metadata_ && metadata_->right_aligned) - return AlignRight(block_, metadata_->requested_size); - return block_; -} -uptr HwasanChunkView::End() const { - return Beg() + UsedSize(); -} -uptr HwasanChunkView::UsedSize() const { - return metadata_->requested_size; -} -u32 HwasanChunkView::GetAllocStackId() const { - return metadata_->alloc_context_id; -} - -uptr HwasanChunkView::ActualSize() const { - return allocator.GetActuallyAllocatedSize(reinterpret_cast(block_)); -} - -bool HwasanChunkView::FromSmallHeap() const { - return allocator.FromPrimary(reinterpret_cast(block_)); -} - -void GetAllocatorStats(AllocatorStatCounters s) { - allocator.GetStats(s); -} - -void HwasanAllocatorInit() { - atomic_store_relaxed(&hwasan_allocator_tagging_enabled, - !flags()->disable_allocator_tagging); - SetAllocatorMayReturnNull(common_flags()->allocator_may_return_null); - allocator.Init(common_flags()->allocator_release_to_os_interval_ms); - switch (flags()->malloc_align_right) { - case 0: break; - case 1: - right_align_mode = kRightAlignSometimes; - right_align_8 = false; - break; - case 2: - right_align_mode = kRightAlignAlways; - right_align_8 = false; - break; - case 8: - right_align_mode = kRightAlignSometimes; - right_align_8 = true; - break; - case 9: - right_align_mode = kRightAlignAlways; - right_align_8 = true; - break; - default: - Report("ERROR: unsupported value of malloc_align_right flag: %d\n", - flags()->malloc_align_right); - Die(); - } - for (uptr i = 0; i < kShadowAlignment; i++) - tail_magic[i] = GetCurrentThread()->GenerateRandomTag(); -} - -void AllocatorSwallowThreadLocalCache(AllocatorCache *cache) { - allocator.SwallowCache(cache); -} - -static uptr TaggedSize(uptr size) { - if (!size) size = 1; - uptr new_size = RoundUpTo(size, kShadowAlignment); - CHECK_GE(new_size, size); - return new_size; -} - -static void *HwasanAllocate(StackTrace *stack, uptr orig_size, uptr alignment, - bool zeroise) { - if (orig_size > kMaxAllowedMallocSize) { - if (AllocatorMayReturnNull()) { - Report("WARNING: HWAddressSanitizer failed to allocate 0x%zx bytes\n", - orig_size); - return nullptr; - } - ReportAllocationSizeTooBig(orig_size, kMaxAllowedMallocSize, stack); - } - - alignment = Max(alignment, kShadowAlignment); - uptr size = TaggedSize(orig_size); - Thread *t = GetCurrentThread(); - void *allocated; - if (t) { - allocated = allocator.Allocate(t->allocator_cache(), size, alignment); - } else { - SpinMutexLock l(&fallback_mutex); - AllocatorCache *cache = &fallback_allocator_cache; - allocated = allocator.Allocate(cache, size, alignment); - } - if (UNLIKELY(!allocated)) { - SetAllocatorOutOfMemory(); - if (AllocatorMayReturnNull()) - return nullptr; - ReportOutOfMemory(size, stack); - } - Metadata *meta = - reinterpret_cast(allocator.GetMetaData(allocated)); - meta->requested_size = static_cast(orig_size); - meta->alloc_context_id = StackDepotPut(*stack); - meta->right_aligned = false; - if (zeroise) { - internal_memset(allocated, 0, size); - } else if (flags()->max_malloc_fill_size > 0) { - uptr fill_size = Min(size, (uptr)flags()->max_malloc_fill_size); - internal_memset(allocated, flags()->malloc_fill_byte, fill_size); - } - if (!right_align_mode) - internal_memcpy(reinterpret_cast(allocated) + orig_size, tail_magic, - size - orig_size); - - void *user_ptr = allocated; - if (flags()->tag_in_malloc && - atomic_load_relaxed(&hwasan_allocator_tagging_enabled)) - user_ptr = (void *)TagMemoryAligned( - (uptr)user_ptr, size, t ? t->GenerateRandomTag() : kFallbackAllocTag); - - if ((orig_size % kShadowAlignment) && (alignment <= kShadowAlignment) && - right_align_mode) { - uptr as_uptr = reinterpret_cast(user_ptr); - if (right_align_mode == kRightAlignAlways || - GetTagFromPointer(as_uptr) & 1) { // use a tag bit as a random bit. - user_ptr = reinterpret_cast(AlignRight(as_uptr, orig_size)); - meta->right_aligned = 1; - } - } - - HWASAN_MALLOC_HOOK(user_ptr, size); - return user_ptr; -} - -static bool PointerAndMemoryTagsMatch(void *tagged_ptr) { - CHECK(tagged_ptr); - tag_t ptr_tag = GetTagFromPointer(reinterpret_cast(tagged_ptr)); - tag_t mem_tag = *reinterpret_cast( - MemToShadow(reinterpret_cast(UntagPtr(tagged_ptr)))); - return ptr_tag == mem_tag; -} - -static void HwasanDeallocate(StackTrace *stack, void *tagged_ptr) { - CHECK(tagged_ptr); - HWASAN_FREE_HOOK(tagged_ptr); - - if (!PointerAndMemoryTagsMatch(tagged_ptr)) - ReportInvalidFree(stack, reinterpret_cast(tagged_ptr)); - - void *untagged_ptr = UntagPtr(tagged_ptr); - void *aligned_ptr = reinterpret_cast( - RoundDownTo(reinterpret_cast(untagged_ptr), kShadowAlignment)); - Metadata *meta = - reinterpret_cast(allocator.GetMetaData(aligned_ptr)); - uptr orig_size = meta->requested_size; - u32 free_context_id = StackDepotPut(*stack); - u32 alloc_context_id = meta->alloc_context_id; - - // Check tail magic. - uptr tagged_size = TaggedSize(orig_size); - if (flags()->free_checks_tail_magic && !right_align_mode && orig_size) { - uptr tail_size = tagged_size - orig_size; - CHECK_LT(tail_size, kShadowAlignment); - void *tail_beg = reinterpret_cast( - reinterpret_cast(aligned_ptr) + orig_size); - if (tail_size && internal_memcmp(tail_beg, tail_magic, tail_size)) - ReportTailOverwritten(stack, reinterpret_cast(tagged_ptr), - orig_size, tail_size, tail_magic); - } - - meta->requested_size = 0; - meta->alloc_context_id = 0; - // This memory will not be reused by anyone else, so we are free to keep it - // poisoned. - Thread *t = GetCurrentThread(); - if (flags()->max_free_fill_size > 0) { - uptr fill_size = - Min(TaggedSize(orig_size), (uptr)flags()->max_free_fill_size); - internal_memset(aligned_ptr, flags()->free_fill_byte, fill_size); - } - if (flags()->tag_in_free && - atomic_load_relaxed(&hwasan_allocator_tagging_enabled)) - TagMemoryAligned(reinterpret_cast(aligned_ptr), TaggedSize(orig_size), - t ? t->GenerateRandomTag() : kFallbackFreeTag); - if (t) { - allocator.Deallocate(t->allocator_cache(), aligned_ptr); - if (auto *ha = t->heap_allocations()) - ha->push({reinterpret_cast(tagged_ptr), alloc_context_id, - free_context_id, static_cast(orig_size)}); - } else { - SpinMutexLock l(&fallback_mutex); - AllocatorCache *cache = &fallback_allocator_cache; - allocator.Deallocate(cache, aligned_ptr); - } -} - -static void *HwasanReallocate(StackTrace *stack, void *tagged_ptr_old, - uptr new_size, uptr alignment) { - if (!PointerAndMemoryTagsMatch(tagged_ptr_old)) - ReportInvalidFree(stack, reinterpret_cast(tagged_ptr_old)); - - void *tagged_ptr_new = - HwasanAllocate(stack, new_size, alignment, false /*zeroise*/); - if (tagged_ptr_old && tagged_ptr_new) { - void *untagged_ptr_old = UntagPtr(tagged_ptr_old); - Metadata *meta = - reinterpret_cast(allocator.GetMetaData(untagged_ptr_old)); - internal_memcpy(UntagPtr(tagged_ptr_new), untagged_ptr_old, - Min(new_size, static_cast(meta->requested_size))); - HwasanDeallocate(stack, tagged_ptr_old); - } - return tagged_ptr_new; -} - -static void *HwasanCalloc(StackTrace *stack, uptr nmemb, uptr size) { - if (UNLIKELY(CheckForCallocOverflow(size, nmemb))) { - if (AllocatorMayReturnNull()) - return nullptr; - ReportCallocOverflow(nmemb, size, stack); - } - return HwasanAllocate(stack, nmemb * size, sizeof(u64), true); -} - -HwasanChunkView FindHeapChunkByAddress(uptr address) { - void *block = allocator.GetBlockBegin(reinterpret_cast(address)); - if (!block) - return HwasanChunkView(); - Metadata *metadata = - reinterpret_cast(allocator.GetMetaData(block)); - return HwasanChunkView(reinterpret_cast(block), metadata); -} - -static uptr AllocationSize(const void *tagged_ptr) { - const void *untagged_ptr = UntagPtr(tagged_ptr); - if (!untagged_ptr) return 0; - const void *beg = allocator.GetBlockBegin(untagged_ptr); - Metadata *b = (Metadata *)allocator.GetMetaData(untagged_ptr); - if (b->right_aligned) { - if (beg != reinterpret_cast(RoundDownTo( - reinterpret_cast(untagged_ptr), kShadowAlignment))) - return 0; - } else { - if (beg != untagged_ptr) return 0; - } - return b->requested_size; -} - -void *hwasan_malloc(uptr size, StackTrace *stack) { - return SetErrnoOnNull(HwasanAllocate(stack, size, sizeof(u64), false)); -} - -void *hwasan_calloc(uptr nmemb, uptr size, StackTrace *stack) { - return SetErrnoOnNull(HwasanCalloc(stack, nmemb, size)); -} - -void *hwasan_realloc(void *ptr, uptr size, StackTrace *stack) { - if (!ptr) - return SetErrnoOnNull(HwasanAllocate(stack, size, sizeof(u64), false)); - -#if HWASAN_WITH_INTERCEPTORS - // A tag of 0 means that this is a system allocator allocation, so we must use - // the system allocator to realloc it. - if (!flags()->disable_allocator_tagging && GetTagFromPointer((uptr)ptr) == 0) - return REAL(realloc)(ptr, size); -#endif - - if (size == 0) { - HwasanDeallocate(stack, ptr); - return nullptr; - } - return SetErrnoOnNull(HwasanReallocate(stack, ptr, size, sizeof(u64))); -} - -void *hwasan_valloc(uptr size, StackTrace *stack) { - return SetErrnoOnNull( - HwasanAllocate(stack, size, GetPageSizeCached(), false)); -} - -void *hwasan_pvalloc(uptr size, StackTrace *stack) { - uptr PageSize = GetPageSizeCached(); - if (UNLIKELY(CheckForPvallocOverflow(size, PageSize))) { - errno = errno_ENOMEM; - if (AllocatorMayReturnNull()) - return nullptr; - ReportPvallocOverflow(size, stack); - } - // pvalloc(0) should allocate one page. - size = size ? RoundUpTo(size, PageSize) : PageSize; - return SetErrnoOnNull(HwasanAllocate(stack, size, PageSize, false)); -} - -void *hwasan_aligned_alloc(uptr alignment, uptr size, StackTrace *stack) { - if (UNLIKELY(!CheckAlignedAllocAlignmentAndSize(alignment, size))) { - errno = errno_EINVAL; - if (AllocatorMayReturnNull()) - return nullptr; - ReportInvalidAlignedAllocAlignment(size, alignment, stack); - } - return SetErrnoOnNull(HwasanAllocate(stack, size, alignment, false)); -} - -void *hwasan_memalign(uptr alignment, uptr size, StackTrace *stack) { - if (UNLIKELY(!IsPowerOfTwo(alignment))) { - errno = errno_EINVAL; - if (AllocatorMayReturnNull()) - return nullptr; - ReportInvalidAllocationAlignment(alignment, stack); - } - return SetErrnoOnNull(HwasanAllocate(stack, size, alignment, false)); -} - -int hwasan_posix_memalign(void **memptr, uptr alignment, uptr size, - StackTrace *stack) { - if (UNLIKELY(!CheckPosixMemalignAlignment(alignment))) { - if (AllocatorMayReturnNull()) - return errno_EINVAL; - ReportInvalidPosixMemalignAlignment(alignment, stack); - } - void *ptr = HwasanAllocate(stack, size, alignment, false); - if (UNLIKELY(!ptr)) - // OOM error is already taken care of by HwasanAllocate. - return errno_ENOMEM; - CHECK(IsAligned((uptr)ptr, alignment)); - *memptr = ptr; - return 0; -} - -void hwasan_free(void *ptr, StackTrace *stack) { -#if HWASAN_WITH_INTERCEPTORS - // A tag of 0 means that this is a system allocator allocation, so we must use - // the system allocator to free it. - if (!flags()->disable_allocator_tagging && GetTagFromPointer((uptr)ptr) == 0) - return REAL(free)(ptr); -#endif - - return HwasanDeallocate(stack, ptr); -} - -} // namespace __hwasan - -using namespace __hwasan; - -void __hwasan_enable_allocator_tagging() { - atomic_store_relaxed(&hwasan_allocator_tagging_enabled, 1); -} - -void __hwasan_disable_allocator_tagging() { -#if HWASAN_WITH_INTERCEPTORS - // Allocator tagging must be enabled for the system allocator fallback to work - // correctly. This means that we can't disable it at runtime if it was enabled - // at startup since that might result in our deallocations going to the system - // allocator. If tagging was disabled at startup we avoid this problem by - // disabling the fallback altogether. - CHECK(flags()->disable_allocator_tagging); -#endif - - atomic_store_relaxed(&hwasan_allocator_tagging_enabled, 0); -} - -uptr __sanitizer_get_current_allocated_bytes() { - uptr stats[AllocatorStatCount]; - allocator.GetStats(stats); - return stats[AllocatorStatAllocated]; -} - -uptr __sanitizer_get_heap_size() { - uptr stats[AllocatorStatCount]; - allocator.GetStats(stats); - return stats[AllocatorStatMapped]; -} - -uptr __sanitizer_get_free_bytes() { return 1; } - -uptr __sanitizer_get_unmapped_bytes() { return 1; } - -uptr __sanitizer_get_estimated_allocated_size(uptr size) { return size; } - -int __sanitizer_get_ownership(const void *p) { return AllocationSize(p) != 0; } - -uptr __sanitizer_get_allocated_size(const void *p) { return AllocationSize(p); } diff --git a/compiler-rt/lib/hwasan/hwasan_allocator.cpp b/compiler-rt/lib/hwasan/hwasan_allocator.cpp new file mode 100644 index 0000000000000..19f1bafeb77b3 --- /dev/null +++ b/compiler-rt/lib/hwasan/hwasan_allocator.cpp @@ -0,0 +1,450 @@ +//===-- hwasan_allocator.cpp ------------------------ ---------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// +// This file is a part of HWAddressSanitizer. +// +// HWAddressSanitizer allocator. +//===----------------------------------------------------------------------===// + +#include "sanitizer_common/sanitizer_atomic.h" +#include "sanitizer_common/sanitizer_errno.h" +#include "sanitizer_common/sanitizer_stackdepot.h" +#include "hwasan.h" +#include "hwasan_allocator.h" +#include "hwasan_mapping.h" +#include "hwasan_malloc_bisect.h" +#include "hwasan_thread.h" +#include "hwasan_report.h" + +#if HWASAN_WITH_INTERCEPTORS +DEFINE_REAL(void *, realloc, void *ptr, uptr size) +DEFINE_REAL(void, free, void *ptr) +#endif + +namespace __hwasan { + +static Allocator allocator; +static AllocatorCache fallback_allocator_cache; +static SpinMutex fallback_mutex; +static atomic_uint8_t hwasan_allocator_tagging_enabled; + +static const tag_t kFallbackAllocTag = 0xBB; +static const tag_t kFallbackFreeTag = 0xBC; + +enum RightAlignMode { + kRightAlignNever, + kRightAlignSometimes, + kRightAlignAlways +}; + +// These two variables are initialized from flags()->malloc_align_right +// in HwasanAllocatorInit and are never changed afterwards. +static RightAlignMode right_align_mode = kRightAlignNever; +static bool right_align_8 = false; + +// Initialized in HwasanAllocatorInit, an never changed. +static ALIGNED(16) u8 tail_magic[kShadowAlignment]; + +bool HwasanChunkView::IsAllocated() const { + return metadata_ && metadata_->alloc_context_id && metadata_->requested_size; +} + +// Aligns the 'addr' right to the granule boundary. +static uptr AlignRight(uptr addr, uptr requested_size) { + uptr tail_size = requested_size % kShadowAlignment; + if (!tail_size) return addr; + if (right_align_8) + return tail_size > 8 ? addr : addr + 8; + return addr + kShadowAlignment - tail_size; +} + +uptr HwasanChunkView::Beg() const { + if (metadata_ && metadata_->right_aligned) + return AlignRight(block_, metadata_->requested_size); + return block_; +} +uptr HwasanChunkView::End() const { + return Beg() + UsedSize(); +} +uptr HwasanChunkView::UsedSize() const { + return metadata_->requested_size; +} +u32 HwasanChunkView::GetAllocStackId() const { + return metadata_->alloc_context_id; +} + +uptr HwasanChunkView::ActualSize() const { + return allocator.GetActuallyAllocatedSize(reinterpret_cast(block_)); +} + +bool HwasanChunkView::FromSmallHeap() const { + return allocator.FromPrimary(reinterpret_cast(block_)); +} + +void GetAllocatorStats(AllocatorStatCounters s) { + allocator.GetStats(s); +} + +void HwasanAllocatorInit() { + atomic_store_relaxed(&hwasan_allocator_tagging_enabled, + !flags()->disable_allocator_tagging); + SetAllocatorMayReturnNull(common_flags()->allocator_may_return_null); + allocator.Init(common_flags()->allocator_release_to_os_interval_ms); + switch (flags()->malloc_align_right) { + case 0: break; + case 1: + right_align_mode = kRightAlignSometimes; + right_align_8 = false; + break; + case 2: + right_align_mode = kRightAlignAlways; + right_align_8 = false; + break; + case 8: + right_align_mode = kRightAlignSometimes; + right_align_8 = true; + break; + case 9: + right_align_mode = kRightAlignAlways; + right_align_8 = true; + break; + default: + Report("ERROR: unsupported value of malloc_align_right flag: %d\n", + flags()->malloc_align_right); + Die(); + } + for (uptr i = 0; i < kShadowAlignment; i++) + tail_magic[i] = GetCurrentThread()->GenerateRandomTag(); +} + +void AllocatorSwallowThreadLocalCache(AllocatorCache *cache) { + allocator.SwallowCache(cache); +} + +static uptr TaggedSize(uptr size) { + if (!size) size = 1; + uptr new_size = RoundUpTo(size, kShadowAlignment); + CHECK_GE(new_size, size); + return new_size; +} + +static void *HwasanAllocate(StackTrace *stack, uptr orig_size, uptr alignment, + bool zeroise) { + if (orig_size > kMaxAllowedMallocSize) { + if (AllocatorMayReturnNull()) { + Report("WARNING: HWAddressSanitizer failed to allocate 0x%zx bytes\n", + orig_size); + return nullptr; + } + ReportAllocationSizeTooBig(orig_size, kMaxAllowedMallocSize, stack); + } + + alignment = Max(alignment, kShadowAlignment); + uptr size = TaggedSize(orig_size); + Thread *t = GetCurrentThread(); + void *allocated; + if (t) { + allocated = allocator.Allocate(t->allocator_cache(), size, alignment); + } else { + SpinMutexLock l(&fallback_mutex); + AllocatorCache *cache = &fallback_allocator_cache; + allocated = allocator.Allocate(cache, size, alignment); + } + if (UNLIKELY(!allocated)) { + SetAllocatorOutOfMemory(); + if (AllocatorMayReturnNull()) + return nullptr; + ReportOutOfMemory(size, stack); + } + Metadata *meta = + reinterpret_cast(allocator.GetMetaData(allocated)); + meta->requested_size = static_cast(orig_size); + meta->alloc_context_id = StackDepotPut(*stack); + meta->right_aligned = false; + if (zeroise) { + internal_memset(allocated, 0, size); + } else if (flags()->max_malloc_fill_size > 0) { + uptr fill_size = Min(size, (uptr)flags()->max_malloc_fill_size); + internal_memset(allocated, flags()->malloc_fill_byte, fill_size); + } + if (!right_align_mode) + internal_memcpy(reinterpret_cast(allocated) + orig_size, tail_magic, + size - orig_size); + + void *user_ptr = allocated; + // Tagging can only be skipped when both tag_in_malloc and tag_in_free are + // false. When tag_in_malloc = false and tag_in_free = true malloc needs to + // retag to 0. + if ((flags()->tag_in_malloc || flags()->tag_in_free) && + atomic_load_relaxed(&hwasan_allocator_tagging_enabled)) { + tag_t tag = flags()->tag_in_malloc && malloc_bisect(stack, orig_size) + ? (t ? t->GenerateRandomTag() : kFallbackAllocTag) + : 0; + user_ptr = (void *)TagMemoryAligned((uptr)user_ptr, size, tag); + } + + if ((orig_size % kShadowAlignment) && (alignment <= kShadowAlignment) && + right_align_mode) { + uptr as_uptr = reinterpret_cast(user_ptr); + if (right_align_mode == kRightAlignAlways || + GetTagFromPointer(as_uptr) & 1) { // use a tag bit as a random bit. + user_ptr = reinterpret_cast(AlignRight(as_uptr, orig_size)); + meta->right_aligned = 1; + } + } + + HWASAN_MALLOC_HOOK(user_ptr, size); + return user_ptr; +} + +static bool PointerAndMemoryTagsMatch(void *tagged_ptr) { + CHECK(tagged_ptr); + tag_t ptr_tag = GetTagFromPointer(reinterpret_cast(tagged_ptr)); + tag_t mem_tag = *reinterpret_cast( + MemToShadow(reinterpret_cast(UntagPtr(tagged_ptr)))); + return ptr_tag == mem_tag; +} + +static void HwasanDeallocate(StackTrace *stack, void *tagged_ptr) { + CHECK(tagged_ptr); + HWASAN_FREE_HOOK(tagged_ptr); + + if (!PointerAndMemoryTagsMatch(tagged_ptr)) + ReportInvalidFree(stack, reinterpret_cast(tagged_ptr)); + + void *untagged_ptr = UntagPtr(tagged_ptr); + void *aligned_ptr = reinterpret_cast( + RoundDownTo(reinterpret_cast(untagged_ptr), kShadowAlignment)); + Metadata *meta = + reinterpret_cast(allocator.GetMetaData(aligned_ptr)); + uptr orig_size = meta->requested_size; + u32 free_context_id = StackDepotPut(*stack); + u32 alloc_context_id = meta->alloc_context_id; + + // Check tail magic. + uptr tagged_size = TaggedSize(orig_size); + if (flags()->free_checks_tail_magic && !right_align_mode && orig_size) { + uptr tail_size = tagged_size - orig_size; + CHECK_LT(tail_size, kShadowAlignment); + void *tail_beg = reinterpret_cast( + reinterpret_cast(aligned_ptr) + orig_size); + if (tail_size && internal_memcmp(tail_beg, tail_magic, tail_size)) + ReportTailOverwritten(stack, reinterpret_cast(tagged_ptr), + orig_size, tail_size, tail_magic); + } + + meta->requested_size = 0; + meta->alloc_context_id = 0; + // This memory will not be reused by anyone else, so we are free to keep it + // poisoned. + Thread *t = GetCurrentThread(); + if (flags()->max_free_fill_size > 0) { + uptr fill_size = + Min(TaggedSize(orig_size), (uptr)flags()->max_free_fill_size); + internal_memset(aligned_ptr, flags()->free_fill_byte, fill_size); + } + if (flags()->tag_in_free && malloc_bisect(stack, 0) && + atomic_load_relaxed(&hwasan_allocator_tagging_enabled)) + TagMemoryAligned(reinterpret_cast(aligned_ptr), TaggedSize(orig_size), + t ? t->GenerateRandomTag() : kFallbackFreeTag); + if (t) { + allocator.Deallocate(t->allocator_cache(), aligned_ptr); + if (auto *ha = t->heap_allocations()) + ha->push({reinterpret_cast(tagged_ptr), alloc_context_id, + free_context_id, static_cast(orig_size)}); + } else { + SpinMutexLock l(&fallback_mutex); + AllocatorCache *cache = &fallback_allocator_cache; + allocator.Deallocate(cache, aligned_ptr); + } +} + +static void *HwasanReallocate(StackTrace *stack, void *tagged_ptr_old, + uptr new_size, uptr alignment) { + if (!PointerAndMemoryTagsMatch(tagged_ptr_old)) + ReportInvalidFree(stack, reinterpret_cast(tagged_ptr_old)); + + void *tagged_ptr_new = + HwasanAllocate(stack, new_size, alignment, false /*zeroise*/); + if (tagged_ptr_old && tagged_ptr_new) { + void *untagged_ptr_old = UntagPtr(tagged_ptr_old); + Metadata *meta = + reinterpret_cast(allocator.GetMetaData(untagged_ptr_old)); + internal_memcpy(UntagPtr(tagged_ptr_new), untagged_ptr_old, + Min(new_size, static_cast(meta->requested_size))); + HwasanDeallocate(stack, tagged_ptr_old); + } + return tagged_ptr_new; +} + +static void *HwasanCalloc(StackTrace *stack, uptr nmemb, uptr size) { + if (UNLIKELY(CheckForCallocOverflow(size, nmemb))) { + if (AllocatorMayReturnNull()) + return nullptr; + ReportCallocOverflow(nmemb, size, stack); + } + return HwasanAllocate(stack, nmemb * size, sizeof(u64), true); +} + +HwasanChunkView FindHeapChunkByAddress(uptr address) { + void *block = allocator.GetBlockBegin(reinterpret_cast(address)); + if (!block) + return HwasanChunkView(); + Metadata *metadata = + reinterpret_cast(allocator.GetMetaData(block)); + return HwasanChunkView(reinterpret_cast(block), metadata); +} + +static uptr AllocationSize(const void *tagged_ptr) { + const void *untagged_ptr = UntagPtr(tagged_ptr); + if (!untagged_ptr) return 0; + const void *beg = allocator.GetBlockBegin(untagged_ptr); + Metadata *b = (Metadata *)allocator.GetMetaData(untagged_ptr); + if (b->right_aligned) { + if (beg != reinterpret_cast(RoundDownTo( + reinterpret_cast(untagged_ptr), kShadowAlignment))) + return 0; + } else { + if (beg != untagged_ptr) return 0; + } + return b->requested_size; +} + +void *hwasan_malloc(uptr size, StackTrace *stack) { + return SetErrnoOnNull(HwasanAllocate(stack, size, sizeof(u64), false)); +} + +void *hwasan_calloc(uptr nmemb, uptr size, StackTrace *stack) { + return SetErrnoOnNull(HwasanCalloc(stack, nmemb, size)); +} + +void *hwasan_realloc(void *ptr, uptr size, StackTrace *stack) { + if (!ptr) + return SetErrnoOnNull(HwasanAllocate(stack, size, sizeof(u64), false)); + +#if HWASAN_WITH_INTERCEPTORS + // A tag of 0 means that this is a system allocator allocation, so we must use + // the system allocator to realloc it. + if (!flags()->disable_allocator_tagging && GetTagFromPointer((uptr)ptr) == 0) + return REAL(realloc)(ptr, size); +#endif + + if (size == 0) { + HwasanDeallocate(stack, ptr); + return nullptr; + } + return SetErrnoOnNull(HwasanReallocate(stack, ptr, size, sizeof(u64))); +} + +void *hwasan_valloc(uptr size, StackTrace *stack) { + return SetErrnoOnNull( + HwasanAllocate(stack, size, GetPageSizeCached(), false)); +} + +void *hwasan_pvalloc(uptr size, StackTrace *stack) { + uptr PageSize = GetPageSizeCached(); + if (UNLIKELY(CheckForPvallocOverflow(size, PageSize))) { + errno = errno_ENOMEM; + if (AllocatorMayReturnNull()) + return nullptr; + ReportPvallocOverflow(size, stack); + } + // pvalloc(0) should allocate one page. + size = size ? RoundUpTo(size, PageSize) : PageSize; + return SetErrnoOnNull(HwasanAllocate(stack, size, PageSize, false)); +} + +void *hwasan_aligned_alloc(uptr alignment, uptr size, StackTrace *stack) { + if (UNLIKELY(!CheckAlignedAllocAlignmentAndSize(alignment, size))) { + errno = errno_EINVAL; + if (AllocatorMayReturnNull()) + return nullptr; + ReportInvalidAlignedAllocAlignment(size, alignment, stack); + } + return SetErrnoOnNull(HwasanAllocate(stack, size, alignment, false)); +} + +void *hwasan_memalign(uptr alignment, uptr size, StackTrace *stack) { + if (UNLIKELY(!IsPowerOfTwo(alignment))) { + errno = errno_EINVAL; + if (AllocatorMayReturnNull()) + return nullptr; + ReportInvalidAllocationAlignment(alignment, stack); + } + return SetErrnoOnNull(HwasanAllocate(stack, size, alignment, false)); +} + +int hwasan_posix_memalign(void **memptr, uptr alignment, uptr size, + StackTrace *stack) { + if (UNLIKELY(!CheckPosixMemalignAlignment(alignment))) { + if (AllocatorMayReturnNull()) + return errno_EINVAL; + ReportInvalidPosixMemalignAlignment(alignment, stack); + } + void *ptr = HwasanAllocate(stack, size, alignment, false); + if (UNLIKELY(!ptr)) + // OOM error is already taken care of by HwasanAllocate. + return errno_ENOMEM; + CHECK(IsAligned((uptr)ptr, alignment)); + *memptr = ptr; + return 0; +} + +void hwasan_free(void *ptr, StackTrace *stack) { +#if HWASAN_WITH_INTERCEPTORS + // A tag of 0 means that this is a system allocator allocation, so we must use + // the system allocator to free it. + if (!flags()->disable_allocator_tagging && GetTagFromPointer((uptr)ptr) == 0) + return REAL(free)(ptr); +#endif + + return HwasanDeallocate(stack, ptr); +} + +} // namespace __hwasan + +using namespace __hwasan; + +void __hwasan_enable_allocator_tagging() { + atomic_store_relaxed(&hwasan_allocator_tagging_enabled, 1); +} + +void __hwasan_disable_allocator_tagging() { +#if HWASAN_WITH_INTERCEPTORS + // Allocator tagging must be enabled for the system allocator fallback to work + // correctly. This means that we can't disable it at runtime if it was enabled + // at startup since that might result in our deallocations going to the system + // allocator. If tagging was disabled at startup we avoid this problem by + // disabling the fallback altogether. + CHECK(flags()->disable_allocator_tagging); +#endif + + atomic_store_relaxed(&hwasan_allocator_tagging_enabled, 0); +} + +uptr __sanitizer_get_current_allocated_bytes() { + uptr stats[AllocatorStatCount]; + allocator.GetStats(stats); + return stats[AllocatorStatAllocated]; +} + +uptr __sanitizer_get_heap_size() { + uptr stats[AllocatorStatCount]; + allocator.GetStats(stats); + return stats[AllocatorStatMapped]; +} + +uptr __sanitizer_get_free_bytes() { return 1; } + +uptr __sanitizer_get_unmapped_bytes() { return 1; } + +uptr __sanitizer_get_estimated_allocated_size(uptr size) { return size; } + +int __sanitizer_get_ownership(const void *p) { return AllocationSize(p) != 0; } + +uptr __sanitizer_get_allocated_size(const void *p) { return AllocationSize(p); } diff --git a/compiler-rt/lib/hwasan/hwasan_dynamic_shadow.cc b/compiler-rt/lib/hwasan/hwasan_dynamic_shadow.cc deleted file mode 100644 index e2dbe0565596c..0000000000000 --- a/compiler-rt/lib/hwasan/hwasan_dynamic_shadow.cc +++ /dev/null @@ -1,164 +0,0 @@ -//===-- hwasan_dynamic_shadow.cc --------------------------------*- C++ -*-===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// -/// -/// \file -/// This file is a part of HWAddressSanitizer. It reserves dynamic shadow memory -/// region and handles ifunc resolver case, when necessary. -/// -//===----------------------------------------------------------------------===// - -#include "hwasan.h" -#include "hwasan_dynamic_shadow.h" -#include "hwasan_mapping.h" -#include "sanitizer_common/sanitizer_common.h" -#include "sanitizer_common/sanitizer_posix.h" - -#include -#include - -// The code in this file needs to run in an unrelocated binary. It should not -// access any external symbol, including its own non-hidden globals. - -namespace __hwasan { - -static void UnmapFromTo(uptr from, uptr to) { - if (to == from) - return; - CHECK(to >= from); - uptr res = internal_munmap(reinterpret_cast(from), to - from); - if (UNLIKELY(internal_iserror(res))) { - Report("ERROR: %s failed to unmap 0x%zx (%zd) bytes at address %p\n", - SanitizerToolName, to - from, to - from, from); - CHECK("unable to unmap" && 0); - } -} - -// Returns an address aligned to kShadowBaseAlignment, such that -// 2**kShadowBaseAlingment on the left and shadow_size_bytes bytes on the right -// of it are mapped no access. -static uptr MapDynamicShadow(uptr shadow_size_bytes) { - const uptr granularity = GetMmapGranularity(); - const uptr min_alignment = granularity << kShadowScale; - const uptr alignment = 1ULL << kShadowBaseAlignment; - CHECK_GE(alignment, min_alignment); - - const uptr left_padding = 1ULL << kShadowBaseAlignment; - const uptr shadow_size = - RoundUpTo(shadow_size_bytes, granularity); - const uptr map_size = shadow_size + left_padding + alignment; - - const uptr map_start = (uptr)MmapNoAccess(map_size); - CHECK_NE(map_start, ~(uptr)0); - - const uptr shadow_start = RoundUpTo(map_start + left_padding, alignment); - - UnmapFromTo(map_start, shadow_start - left_padding); - UnmapFromTo(shadow_start + shadow_size, map_start + map_size); - - return shadow_start; -} - -} // namespace __hwasan - -#if SANITIZER_ANDROID -extern "C" { - -INTERFACE_ATTRIBUTE void __hwasan_shadow(); -decltype(__hwasan_shadow)* __hwasan_premap_shadow(); - -} // extern "C" - -namespace __hwasan { - -// Conservative upper limit. -static uptr PremapShadowSize() { - return RoundUpTo(GetMaxVirtualAddress() >> kShadowScale, - GetMmapGranularity()); -} - -static uptr PremapShadow() { - return MapDynamicShadow(PremapShadowSize()); -} - -static bool IsPremapShadowAvailable() { - const uptr shadow = reinterpret_cast(&__hwasan_shadow); - const uptr resolver = reinterpret_cast(&__hwasan_premap_shadow); - // shadow == resolver is how Android KitKat and older handles ifunc. - // shadow == 0 just in case. - return shadow != 0 && shadow != resolver; -} - -static uptr FindPremappedShadowStart(uptr shadow_size_bytes) { - const uptr granularity = GetMmapGranularity(); - const uptr shadow_start = reinterpret_cast(&__hwasan_shadow); - const uptr premap_shadow_size = PremapShadowSize(); - const uptr shadow_size = RoundUpTo(shadow_size_bytes, granularity); - - // We may have mapped too much. Release extra memory. - UnmapFromTo(shadow_start + shadow_size, shadow_start + premap_shadow_size); - return shadow_start; -} - -} // namespace __hwasan - -extern "C" { - -decltype(__hwasan_shadow)* __hwasan_premap_shadow() { - // The resolver might be called multiple times. Map the shadow just once. - static __sanitizer::uptr shadow = 0; - if (!shadow) - shadow = __hwasan::PremapShadow(); - return reinterpret_cast(shadow); -} - -// __hwasan_shadow is a "function" that has the same address as the first byte -// of the shadow mapping. -INTERFACE_ATTRIBUTE __attribute__((ifunc("__hwasan_premap_shadow"))) -void __hwasan_shadow(); - -extern __attribute((weak, visibility("hidden"))) ElfW(Rela) __rela_iplt_start[], - __rela_iplt_end[]; - -} // extern "C" - -namespace __hwasan { - -void InitShadowGOT() { - // Call the ifunc resolver for __hwasan_shadow and fill in its GOT entry. This - // needs to be done before other ifunc resolvers (which are handled by libc) - // because a resolver might read __hwasan_shadow. - typedef ElfW(Addr) (*ifunc_resolver_t)(void); - for (ElfW(Rela) *r = __rela_iplt_start; r != __rela_iplt_end; ++r) { - ElfW(Addr)* offset = reinterpret_cast(r->r_offset); - ElfW(Addr) resolver = r->r_addend; - if (resolver == reinterpret_cast(&__hwasan_premap_shadow)) { - *offset = reinterpret_cast(resolver)(); - break; - } - } -} - -uptr FindDynamicShadowStart(uptr shadow_size_bytes) { - if (IsPremapShadowAvailable()) - return FindPremappedShadowStart(shadow_size_bytes); - return MapDynamicShadow(shadow_size_bytes); -} - -} // namespace __hwasan -#else -namespace __hwasan { - -void InitShadowGOT() {} - -uptr FindDynamicShadowStart(uptr shadow_size_bytes) { - return MapDynamicShadow(shadow_size_bytes); -} - -} // namespace __hwasan - -#endif // SANITIZER_ANDROID diff --git a/compiler-rt/lib/hwasan/hwasan_dynamic_shadow.cpp b/compiler-rt/lib/hwasan/hwasan_dynamic_shadow.cpp new file mode 100644 index 0000000000000..a04751f44a311 --- /dev/null +++ b/compiler-rt/lib/hwasan/hwasan_dynamic_shadow.cpp @@ -0,0 +1,164 @@ +//===-- hwasan_dynamic_shadow.cpp -------------------------------*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +/// +/// \file +/// This file is a part of HWAddressSanitizer. It reserves dynamic shadow memory +/// region and handles ifunc resolver case, when necessary. +/// +//===----------------------------------------------------------------------===// + +#include "hwasan.h" +#include "hwasan_dynamic_shadow.h" +#include "hwasan_mapping.h" +#include "sanitizer_common/sanitizer_common.h" +#include "sanitizer_common/sanitizer_posix.h" + +#include +#include + +// The code in this file needs to run in an unrelocated binary. It should not +// access any external symbol, including its own non-hidden globals. + +namespace __hwasan { + +static void UnmapFromTo(uptr from, uptr to) { + if (to == from) + return; + CHECK(to >= from); + uptr res = internal_munmap(reinterpret_cast(from), to - from); + if (UNLIKELY(internal_iserror(res))) { + Report("ERROR: %s failed to unmap 0x%zx (%zd) bytes at address %p\n", + SanitizerToolName, to - from, to - from, from); + CHECK("unable to unmap" && 0); + } +} + +// Returns an address aligned to kShadowBaseAlignment, such that +// 2**kShadowBaseAlingment on the left and shadow_size_bytes bytes on the right +// of it are mapped no access. +static uptr MapDynamicShadow(uptr shadow_size_bytes) { + const uptr granularity = GetMmapGranularity(); + const uptr min_alignment = granularity << kShadowScale; + const uptr alignment = 1ULL << kShadowBaseAlignment; + CHECK_GE(alignment, min_alignment); + + const uptr left_padding = 1ULL << kShadowBaseAlignment; + const uptr shadow_size = + RoundUpTo(shadow_size_bytes, granularity); + const uptr map_size = shadow_size + left_padding + alignment; + + const uptr map_start = (uptr)MmapNoAccess(map_size); + CHECK_NE(map_start, ~(uptr)0); + + const uptr shadow_start = RoundUpTo(map_start + left_padding, alignment); + + UnmapFromTo(map_start, shadow_start - left_padding); + UnmapFromTo(shadow_start + shadow_size, map_start + map_size); + + return shadow_start; +} + +} // namespace __hwasan + +#if SANITIZER_ANDROID +extern "C" { + +INTERFACE_ATTRIBUTE void __hwasan_shadow(); +decltype(__hwasan_shadow)* __hwasan_premap_shadow(); + +} // extern "C" + +namespace __hwasan { + +// Conservative upper limit. +static uptr PremapShadowSize() { + return RoundUpTo(GetMaxVirtualAddress() >> kShadowScale, + GetMmapGranularity()); +} + +static uptr PremapShadow() { + return MapDynamicShadow(PremapShadowSize()); +} + +static bool IsPremapShadowAvailable() { + const uptr shadow = reinterpret_cast(&__hwasan_shadow); + const uptr resolver = reinterpret_cast(&__hwasan_premap_shadow); + // shadow == resolver is how Android KitKat and older handles ifunc. + // shadow == 0 just in case. + return shadow != 0 && shadow != resolver; +} + +static uptr FindPremappedShadowStart(uptr shadow_size_bytes) { + const uptr granularity = GetMmapGranularity(); + const uptr shadow_start = reinterpret_cast(&__hwasan_shadow); + const uptr premap_shadow_size = PremapShadowSize(); + const uptr shadow_size = RoundUpTo(shadow_size_bytes, granularity); + + // We may have mapped too much. Release extra memory. + UnmapFromTo(shadow_start + shadow_size, shadow_start + premap_shadow_size); + return shadow_start; +} + +} // namespace __hwasan + +extern "C" { + +decltype(__hwasan_shadow)* __hwasan_premap_shadow() { + // The resolver might be called multiple times. Map the shadow just once. + static __sanitizer::uptr shadow = 0; + if (!shadow) + shadow = __hwasan::PremapShadow(); + return reinterpret_cast(shadow); +} + +// __hwasan_shadow is a "function" that has the same address as the first byte +// of the shadow mapping. +INTERFACE_ATTRIBUTE __attribute__((ifunc("__hwasan_premap_shadow"))) +void __hwasan_shadow(); + +extern __attribute((weak, visibility("hidden"))) ElfW(Rela) __rela_iplt_start[], + __rela_iplt_end[]; + +} // extern "C" + +namespace __hwasan { + +void InitShadowGOT() { + // Call the ifunc resolver for __hwasan_shadow and fill in its GOT entry. This + // needs to be done before other ifunc resolvers (which are handled by libc) + // because a resolver might read __hwasan_shadow. + typedef ElfW(Addr) (*ifunc_resolver_t)(void); + for (ElfW(Rela) *r = __rela_iplt_start; r != __rela_iplt_end; ++r) { + ElfW(Addr)* offset = reinterpret_cast(r->r_offset); + ElfW(Addr) resolver = r->r_addend; + if (resolver == reinterpret_cast(&__hwasan_premap_shadow)) { + *offset = reinterpret_cast(resolver)(); + break; + } + } +} + +uptr FindDynamicShadowStart(uptr shadow_size_bytes) { + if (IsPremapShadowAvailable()) + return FindPremappedShadowStart(shadow_size_bytes); + return MapDynamicShadow(shadow_size_bytes); +} + +} // namespace __hwasan +#else +namespace __hwasan { + +void InitShadowGOT() {} + +uptr FindDynamicShadowStart(uptr shadow_size_bytes) { + return MapDynamicShadow(shadow_size_bytes); +} + +} // namespace __hwasan + +#endif // SANITIZER_ANDROID diff --git a/compiler-rt/lib/hwasan/hwasan_flags.inc b/compiler-rt/lib/hwasan/hwasan_flags.inc index f0cf151a403f0..01fdad87a0751 100644 --- a/compiler-rt/lib/hwasan/hwasan_flags.inc +++ b/compiler-rt/lib/hwasan/hwasan_flags.inc @@ -85,3 +85,16 @@ HWASAN_FLAG(int, stack_history_size, 1024, "The number of stack frames remembered per thread. " "Affects the quality of stack-related reports, but not the ability " "to find bugs.") + +// Malloc / free bisection. Only tag malloc and free calls when a hash of +// allocation size and stack trace is between malloc_bisect_left and +// malloc_bisect_right (both inclusive). [0, 0] range is special and disables +// bisection (i.e. everything is tagged). Once the range is narrowed down +// enough, use malloc_bisect_dump to see interesting allocations. +HWASAN_FLAG(uptr, malloc_bisect_left, 0, + "Left bound of malloc bisection, inclusive.") +HWASAN_FLAG(uptr, malloc_bisect_right, 0, + "Right bound of malloc bisection, inclusive.") +HWASAN_FLAG(bool, malloc_bisect_dump, false, + "Print all allocations within [malloc_bisect_left, " + "malloc_bisect_right] range ") diff --git a/compiler-rt/lib/hwasan/hwasan_interceptors.cc b/compiler-rt/lib/hwasan/hwasan_interceptors.cc deleted file mode 100644 index baecb1e03345c..0000000000000 --- a/compiler-rt/lib/hwasan/hwasan_interceptors.cc +++ /dev/null @@ -1,278 +0,0 @@ -//===-- hwasan_interceptors.cc --------------------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// -// -// This file is a part of HWAddressSanitizer. -// -// Interceptors for standard library functions. -// -// FIXME: move as many interceptors as possible into -// sanitizer_common/sanitizer_common_interceptors.h -//===----------------------------------------------------------------------===// - -#include "interception/interception.h" -#include "hwasan.h" -#include "hwasan_allocator.h" -#include "hwasan_mapping.h" -#include "hwasan_thread.h" -#include "hwasan_poisoning.h" -#include "hwasan_report.h" -#include "sanitizer_common/sanitizer_platform_limits_posix.h" -#include "sanitizer_common/sanitizer_allocator.h" -#include "sanitizer_common/sanitizer_allocator_interface.h" -#include "sanitizer_common/sanitizer_allocator_internal.h" -#include "sanitizer_common/sanitizer_atomic.h" -#include "sanitizer_common/sanitizer_common.h" -#include "sanitizer_common/sanitizer_errno.h" -#include "sanitizer_common/sanitizer_stackdepot.h" -#include "sanitizer_common/sanitizer_libc.h" -#include "sanitizer_common/sanitizer_linux.h" -#include "sanitizer_common/sanitizer_tls_get_addr.h" - -#include -// ACHTUNG! No other system header includes in this file. -// Ideally, we should get rid of stdarg.h as well. - -using namespace __hwasan; - -using __sanitizer::memory_order; -using __sanitizer::atomic_load; -using __sanitizer::atomic_store; -using __sanitizer::atomic_uintptr_t; - -bool IsInInterceptorScope() { - Thread *t = GetCurrentThread(); - return t && t->InInterceptorScope(); -} - -struct InterceptorScope { - InterceptorScope() { - Thread *t = GetCurrentThread(); - if (t) - t->EnterInterceptorScope(); - } - ~InterceptorScope() { - Thread *t = GetCurrentThread(); - if (t) - t->LeaveInterceptorScope(); - } -}; - -static uptr allocated_for_dlsym; -static const uptr kDlsymAllocPoolSize = 1024; -static uptr alloc_memory_for_dlsym[kDlsymAllocPoolSize]; - -static bool IsInDlsymAllocPool(const void *ptr) { - uptr off = (uptr)ptr - (uptr)alloc_memory_for_dlsym; - return off < sizeof(alloc_memory_for_dlsym); -} - -static void *AllocateFromLocalPool(uptr size_in_bytes) { - uptr size_in_words = RoundUpTo(size_in_bytes, kWordSize) / kWordSize; - void *mem = (void *)&alloc_memory_for_dlsym[allocated_for_dlsym]; - allocated_for_dlsym += size_in_words; - CHECK_LT(allocated_for_dlsym, kDlsymAllocPoolSize); - return mem; -} - -#define ENSURE_HWASAN_INITED() do { \ - CHECK(!hwasan_init_is_running); \ - if (!hwasan_inited) { \ - __hwasan_init(); \ - } \ -} while (0) - - -int __sanitizer_posix_memalign(void **memptr, uptr alignment, uptr size) { - GET_MALLOC_STACK_TRACE; - CHECK_NE(memptr, 0); - int res = hwasan_posix_memalign(memptr, alignment, size, &stack); - return res; -} - -void * __sanitizer_memalign(uptr alignment, uptr size) { - GET_MALLOC_STACK_TRACE; - return hwasan_memalign(alignment, size, &stack); -} - -void * __sanitizer_aligned_alloc(uptr alignment, uptr size) { - GET_MALLOC_STACK_TRACE; - return hwasan_aligned_alloc(alignment, size, &stack); -} - -void * __sanitizer___libc_memalign(uptr alignment, uptr size) { - GET_MALLOC_STACK_TRACE; - void *ptr = hwasan_memalign(alignment, size, &stack); - if (ptr) - DTLS_on_libc_memalign(ptr, size); - return ptr; -} - -void * __sanitizer_valloc(uptr size) { - GET_MALLOC_STACK_TRACE; - return hwasan_valloc(size, &stack); -} - -void * __sanitizer_pvalloc(uptr size) { - GET_MALLOC_STACK_TRACE; - return hwasan_pvalloc(size, &stack); -} - -void __sanitizer_free(void *ptr) { - GET_MALLOC_STACK_TRACE; - if (!ptr || UNLIKELY(IsInDlsymAllocPool(ptr))) return; - hwasan_free(ptr, &stack); -} - -void __sanitizer_cfree(void *ptr) { - GET_MALLOC_STACK_TRACE; - if (!ptr || UNLIKELY(IsInDlsymAllocPool(ptr))) return; - hwasan_free(ptr, &stack); -} - -uptr __sanitizer_malloc_usable_size(const void *ptr) { - return __sanitizer_get_allocated_size(ptr); -} - -struct __sanitizer_struct_mallinfo __sanitizer_mallinfo() { - __sanitizer_struct_mallinfo sret; - internal_memset(&sret, 0, sizeof(sret)); - return sret; -} - -int __sanitizer_mallopt(int cmd, int value) { - return 0; -} - -void __sanitizer_malloc_stats(void) { - // FIXME: implement, but don't call REAL(malloc_stats)! -} - -void * __sanitizer_calloc(uptr nmemb, uptr size) { - GET_MALLOC_STACK_TRACE; - if (UNLIKELY(!hwasan_inited)) - // Hack: dlsym calls calloc before REAL(calloc) is retrieved from dlsym. - return AllocateFromLocalPool(nmemb * size); - return hwasan_calloc(nmemb, size, &stack); -} - -void * __sanitizer_realloc(void *ptr, uptr size) { - GET_MALLOC_STACK_TRACE; - if (UNLIKELY(IsInDlsymAllocPool(ptr))) { - uptr offset = (uptr)ptr - (uptr)alloc_memory_for_dlsym; - uptr copy_size = Min(size, kDlsymAllocPoolSize - offset); - void *new_ptr; - if (UNLIKELY(!hwasan_inited)) { - new_ptr = AllocateFromLocalPool(copy_size); - } else { - copy_size = size; - new_ptr = hwasan_malloc(copy_size, &stack); - } - internal_memcpy(new_ptr, ptr, copy_size); - return new_ptr; - } - return hwasan_realloc(ptr, size, &stack); -} - -void * __sanitizer_malloc(uptr size) { - GET_MALLOC_STACK_TRACE; - if (UNLIKELY(!hwasan_init_is_running)) - ENSURE_HWASAN_INITED(); - if (UNLIKELY(!hwasan_inited)) - // Hack: dlsym calls malloc before REAL(malloc) is retrieved from dlsym. - return AllocateFromLocalPool(size); - return hwasan_malloc(size, &stack); -} - -#if HWASAN_WITH_INTERCEPTORS -#define INTERCEPTOR_ALIAS(RET, FN, ARGS...) \ - extern "C" SANITIZER_INTERFACE_ATTRIBUTE RET WRAP(FN)(ARGS) \ - ALIAS("__sanitizer_" #FN); \ - extern "C" SANITIZER_INTERFACE_ATTRIBUTE SANITIZER_WEAK_ATTRIBUTE RET FN( \ - ARGS) ALIAS("__sanitizer_" #FN) - -INTERCEPTOR_ALIAS(int, posix_memalign, void **memptr, SIZE_T alignment, - SIZE_T size); -INTERCEPTOR_ALIAS(void *, aligned_alloc, SIZE_T alignment, SIZE_T size); -INTERCEPTOR_ALIAS(void *, __libc_memalign, SIZE_T alignment, SIZE_T size); -INTERCEPTOR_ALIAS(void *, valloc, SIZE_T size); -INTERCEPTOR_ALIAS(void, free, void *ptr); -INTERCEPTOR_ALIAS(uptr, malloc_usable_size, const void *ptr); -INTERCEPTOR_ALIAS(void *, calloc, SIZE_T nmemb, SIZE_T size); -INTERCEPTOR_ALIAS(void *, realloc, void *ptr, SIZE_T size); -INTERCEPTOR_ALIAS(void *, malloc, SIZE_T size); - -#if !SANITIZER_FREEBSD && !SANITIZER_NETBSD -INTERCEPTOR_ALIAS(void *, memalign, SIZE_T alignment, SIZE_T size); -INTERCEPTOR_ALIAS(void *, pvalloc, SIZE_T size); -INTERCEPTOR_ALIAS(void, cfree, void *ptr); -INTERCEPTOR_ALIAS(__sanitizer_struct_mallinfo, mallinfo); -INTERCEPTOR_ALIAS(int, mallopt, int cmd, int value); -INTERCEPTOR_ALIAS(void, malloc_stats, void); -#endif -#endif // HWASAN_WITH_INTERCEPTORS - - -#if HWASAN_WITH_INTERCEPTORS && !defined(__aarch64__) -INTERCEPTOR(int, pthread_create, void *th, void *attr, - void *(*callback)(void *), void *param) { - ScopedTaggingDisabler disabler; - int res = REAL(pthread_create)(UntagPtr(th), UntagPtr(attr), - callback, param); - return res; -} -#endif - -static void BeforeFork() { - StackDepotLockAll(); -} - -static void AfterFork() { - StackDepotUnlockAll(); -} - -INTERCEPTOR(int, fork, void) { - ENSURE_HWASAN_INITED(); - BeforeFork(); - int pid = REAL(fork)(); - AfterFork(); - return pid; -} - - -struct HwasanInterceptorContext { - bool in_interceptor_scope; -}; - -namespace __hwasan { - -int OnExit() { - // FIXME: ask frontend whether we need to return failure. - return 0; -} - -} // namespace __hwasan - -namespace __hwasan { - -void InitializeInterceptors() { - static int inited = 0; - CHECK_EQ(inited, 0); - - INTERCEPT_FUNCTION(fork); - -#if HWASAN_WITH_INTERCEPTORS -#if !defined(__aarch64__) - INTERCEPT_FUNCTION(pthread_create); -#endif - INTERCEPT_FUNCTION(realloc); - INTERCEPT_FUNCTION(free); -#endif - - inited = 1; -} -} // namespace __hwasan diff --git a/compiler-rt/lib/hwasan/hwasan_interceptors.cpp b/compiler-rt/lib/hwasan/hwasan_interceptors.cpp new file mode 100644 index 0000000000000..3263097516e45 --- /dev/null +++ b/compiler-rt/lib/hwasan/hwasan_interceptors.cpp @@ -0,0 +1,286 @@ +//===-- hwasan_interceptors.cpp -------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// +// This file is a part of HWAddressSanitizer. +// +// Interceptors for standard library functions. +// +// FIXME: move as many interceptors as possible into +// sanitizer_common/sanitizer_common_interceptors.h +//===----------------------------------------------------------------------===// + +#include "interception/interception.h" +#include "hwasan.h" +#include "hwasan_allocator.h" +#include "hwasan_mapping.h" +#include "hwasan_thread.h" +#include "hwasan_poisoning.h" +#include "hwasan_report.h" +#include "sanitizer_common/sanitizer_platform_limits_posix.h" +#include "sanitizer_common/sanitizer_allocator.h" +#include "sanitizer_common/sanitizer_allocator_interface.h" +#include "sanitizer_common/sanitizer_allocator_internal.h" +#include "sanitizer_common/sanitizer_atomic.h" +#include "sanitizer_common/sanitizer_common.h" +#include "sanitizer_common/sanitizer_errno.h" +#include "sanitizer_common/sanitizer_stackdepot.h" +#include "sanitizer_common/sanitizer_libc.h" +#include "sanitizer_common/sanitizer_linux.h" +#include "sanitizer_common/sanitizer_tls_get_addr.h" + +#include +// ACHTUNG! No other system header includes in this file. +// Ideally, we should get rid of stdarg.h as well. + +using namespace __hwasan; + +using __sanitizer::memory_order; +using __sanitizer::atomic_load; +using __sanitizer::atomic_store; +using __sanitizer::atomic_uintptr_t; + +bool IsInInterceptorScope() { + Thread *t = GetCurrentThread(); + return t && t->InInterceptorScope(); +} + +struct InterceptorScope { + InterceptorScope() { + Thread *t = GetCurrentThread(); + if (t) + t->EnterInterceptorScope(); + } + ~InterceptorScope() { + Thread *t = GetCurrentThread(); + if (t) + t->LeaveInterceptorScope(); + } +}; + +static uptr allocated_for_dlsym; +static const uptr kDlsymAllocPoolSize = 1024; +static uptr alloc_memory_for_dlsym[kDlsymAllocPoolSize]; + +static bool IsInDlsymAllocPool(const void *ptr) { + uptr off = (uptr)ptr - (uptr)alloc_memory_for_dlsym; + return off < sizeof(alloc_memory_for_dlsym); +} + +static void *AllocateFromLocalPool(uptr size_in_bytes) { + uptr size_in_words = RoundUpTo(size_in_bytes, kWordSize) / kWordSize; + void *mem = (void *)&alloc_memory_for_dlsym[allocated_for_dlsym]; + allocated_for_dlsym += size_in_words; + CHECK_LT(allocated_for_dlsym, kDlsymAllocPoolSize); + return mem; +} + +#define ENSURE_HWASAN_INITED() do { \ + CHECK(!hwasan_init_is_running); \ + if (!hwasan_inited) { \ + __hwasan_init(); \ + } \ +} while (0) + + +int __sanitizer_posix_memalign(void **memptr, uptr alignment, uptr size) { + GET_MALLOC_STACK_TRACE; + CHECK_NE(memptr, 0); + int res = hwasan_posix_memalign(memptr, alignment, size, &stack); + return res; +} + +void * __sanitizer_memalign(uptr alignment, uptr size) { + GET_MALLOC_STACK_TRACE; + return hwasan_memalign(alignment, size, &stack); +} + +void * __sanitizer_aligned_alloc(uptr alignment, uptr size) { + GET_MALLOC_STACK_TRACE; + return hwasan_aligned_alloc(alignment, size, &stack); +} + +void * __sanitizer___libc_memalign(uptr alignment, uptr size) { + GET_MALLOC_STACK_TRACE; + void *ptr = hwasan_memalign(alignment, size, &stack); + if (ptr) + DTLS_on_libc_memalign(ptr, size); + return ptr; +} + +void * __sanitizer_valloc(uptr size) { + GET_MALLOC_STACK_TRACE; + return hwasan_valloc(size, &stack); +} + +void * __sanitizer_pvalloc(uptr size) { + GET_MALLOC_STACK_TRACE; + return hwasan_pvalloc(size, &stack); +} + +void __sanitizer_free(void *ptr) { + GET_MALLOC_STACK_TRACE; + if (!ptr || UNLIKELY(IsInDlsymAllocPool(ptr))) return; + hwasan_free(ptr, &stack); +} + +void __sanitizer_cfree(void *ptr) { + GET_MALLOC_STACK_TRACE; + if (!ptr || UNLIKELY(IsInDlsymAllocPool(ptr))) return; + hwasan_free(ptr, &stack); +} + +uptr __sanitizer_malloc_usable_size(const void *ptr) { + return __sanitizer_get_allocated_size(ptr); +} + +struct __sanitizer_struct_mallinfo __sanitizer_mallinfo() { + __sanitizer_struct_mallinfo sret; + internal_memset(&sret, 0, sizeof(sret)); + return sret; +} + +int __sanitizer_mallopt(int cmd, int value) { + return 0; +} + +void __sanitizer_malloc_stats(void) { + // FIXME: implement, but don't call REAL(malloc_stats)! +} + +void * __sanitizer_calloc(uptr nmemb, uptr size) { + GET_MALLOC_STACK_TRACE; + if (UNLIKELY(!hwasan_inited)) + // Hack: dlsym calls calloc before REAL(calloc) is retrieved from dlsym. + return AllocateFromLocalPool(nmemb * size); + return hwasan_calloc(nmemb, size, &stack); +} + +void * __sanitizer_realloc(void *ptr, uptr size) { + GET_MALLOC_STACK_TRACE; + if (UNLIKELY(IsInDlsymAllocPool(ptr))) { + uptr offset = (uptr)ptr - (uptr)alloc_memory_for_dlsym; + uptr copy_size = Min(size, kDlsymAllocPoolSize - offset); + void *new_ptr; + if (UNLIKELY(!hwasan_inited)) { + new_ptr = AllocateFromLocalPool(copy_size); + } else { + copy_size = size; + new_ptr = hwasan_malloc(copy_size, &stack); + } + internal_memcpy(new_ptr, ptr, copy_size); + return new_ptr; + } + return hwasan_realloc(ptr, size, &stack); +} + +void * __sanitizer_malloc(uptr size) { + GET_MALLOC_STACK_TRACE; + if (UNLIKELY(!hwasan_init_is_running)) + ENSURE_HWASAN_INITED(); + if (UNLIKELY(!hwasan_inited)) + // Hack: dlsym calls malloc before REAL(malloc) is retrieved from dlsym. + return AllocateFromLocalPool(size); + return hwasan_malloc(size, &stack); +} + +#if HWASAN_WITH_INTERCEPTORS +#define INTERCEPTOR_ALIAS(RET, FN, ARGS...) \ + extern "C" SANITIZER_INTERFACE_ATTRIBUTE RET WRAP(FN)(ARGS) \ + ALIAS("__sanitizer_" #FN); \ + extern "C" SANITIZER_INTERFACE_ATTRIBUTE SANITIZER_WEAK_ATTRIBUTE RET FN( \ + ARGS) ALIAS("__sanitizer_" #FN) + +INTERCEPTOR_ALIAS(int, posix_memalign, void **memptr, SIZE_T alignment, + SIZE_T size); +INTERCEPTOR_ALIAS(void *, aligned_alloc, SIZE_T alignment, SIZE_T size); +INTERCEPTOR_ALIAS(void *, __libc_memalign, SIZE_T alignment, SIZE_T size); +INTERCEPTOR_ALIAS(void *, valloc, SIZE_T size); +INTERCEPTOR_ALIAS(void, free, void *ptr); +INTERCEPTOR_ALIAS(uptr, malloc_usable_size, const void *ptr); +INTERCEPTOR_ALIAS(void *, calloc, SIZE_T nmemb, SIZE_T size); +INTERCEPTOR_ALIAS(void *, realloc, void *ptr, SIZE_T size); +INTERCEPTOR_ALIAS(void *, malloc, SIZE_T size); + +#if !SANITIZER_FREEBSD && !SANITIZER_NETBSD +INTERCEPTOR_ALIAS(void *, memalign, SIZE_T alignment, SIZE_T size); +INTERCEPTOR_ALIAS(void *, pvalloc, SIZE_T size); +INTERCEPTOR_ALIAS(void, cfree, void *ptr); +INTERCEPTOR_ALIAS(__sanitizer_struct_mallinfo, mallinfo); +INTERCEPTOR_ALIAS(int, mallopt, int cmd, int value); +INTERCEPTOR_ALIAS(void, malloc_stats, void); +#endif +#endif // HWASAN_WITH_INTERCEPTORS + + +#if HWASAN_WITH_INTERCEPTORS && !defined(__aarch64__) +INTERCEPTOR(int, pthread_create, void *th, void *attr, + void *(*callback)(void *), void *param) { + ScopedTaggingDisabler disabler; + int res = REAL(pthread_create)(UntagPtr(th), UntagPtr(attr), + callback, param); + return res; +} +#endif + +#if HWASAN_WITH_INTERCEPTORS +DEFINE_REAL(int, vfork); +DECLARE_EXTERN_INTERCEPTOR_AND_WRAPPER(int, vfork); +#endif + +static void BeforeFork() { + StackDepotLockAll(); +} + +static void AfterFork() { + StackDepotUnlockAll(); +} + +INTERCEPTOR(int, fork, void) { + ENSURE_HWASAN_INITED(); + BeforeFork(); + int pid = REAL(fork)(); + AfterFork(); + return pid; +} + + +struct HwasanInterceptorContext { + bool in_interceptor_scope; +}; + +namespace __hwasan { + +int OnExit() { + // FIXME: ask frontend whether we need to return failure. + return 0; +} + +} // namespace __hwasan + +namespace __hwasan { + +void InitializeInterceptors() { + static int inited = 0; + CHECK_EQ(inited, 0); + + INTERCEPT_FUNCTION(fork); + +#if HWASAN_WITH_INTERCEPTORS +#if defined(__linux__) + INTERCEPT_FUNCTION(vfork); +#endif // __linux__ +#if !defined(__aarch64__) + INTERCEPT_FUNCTION(pthread_create); +#endif // __aarch64__ + INTERCEPT_FUNCTION(realloc); + INTERCEPT_FUNCTION(free); +#endif + + inited = 1; +} +} // namespace __hwasan diff --git a/compiler-rt/lib/hwasan/hwasan_interceptors_vfork.S b/compiler-rt/lib/hwasan/hwasan_interceptors_vfork.S new file mode 100644 index 0000000000000..13d0829c0865f --- /dev/null +++ b/compiler-rt/lib/hwasan/hwasan_interceptors_vfork.S @@ -0,0 +1,10 @@ +#include "sanitizer_common/sanitizer_asm.h" + +#if defined(__linux__) && HWASAN_WITH_INTERCEPTORS +#define COMMON_INTERCEPTOR_SPILL_AREA __hwasan_extra_spill_area +#define COMMON_INTERCEPTOR_HANDLE_VFORK __hwasan_handle_vfork +#include "sanitizer_common/sanitizer_common_interceptors_vfork_aarch64.inc.S" +#include "sanitizer_common/sanitizer_common_interceptors_vfork_x86_64.inc.S" +#endif + +NO_EXEC_STACK_DIRECTIVE diff --git a/compiler-rt/lib/hwasan/hwasan_interface_internal.h b/compiler-rt/lib/hwasan/hwasan_interface_internal.h index c2ae666533a85..315b0daef5ca2 100644 --- a/compiler-rt/lib/hwasan/hwasan_interface_internal.h +++ b/compiler-rt/lib/hwasan/hwasan_interface_internal.h @@ -116,6 +116,9 @@ void __hwasan_print_shadow(const void *x, uptr size); SANITIZER_INTERFACE_ATTRIBUTE void __hwasan_handle_longjmp(const void *sp_dst); +SANITIZER_INTERFACE_ATTRIBUTE +void __hwasan_handle_vfork(const void *sp_dst); + SANITIZER_INTERFACE_ATTRIBUTE u16 __sanitizer_unaligned_load16(const uu16 *p); diff --git a/compiler-rt/lib/hwasan/hwasan_linux.cc b/compiler-rt/lib/hwasan/hwasan_linux.cc deleted file mode 100644 index c922c1110e534..0000000000000 --- a/compiler-rt/lib/hwasan/hwasan_linux.cc +++ /dev/null @@ -1,436 +0,0 @@ -//===-- hwasan_linux.cc -----------------------------------------*- C++ -*-===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// -/// -/// \file -/// This file is a part of HWAddressSanitizer and contains Linux-, NetBSD- and -/// FreeBSD-specific code. -/// -//===----------------------------------------------------------------------===// - -#include "sanitizer_common/sanitizer_platform.h" -#if SANITIZER_FREEBSD || SANITIZER_LINUX || SANITIZER_NETBSD - -#include "hwasan.h" -#include "hwasan_dynamic_shadow.h" -#include "hwasan_interface_internal.h" -#include "hwasan_mapping.h" -#include "hwasan_report.h" -#include "hwasan_thread.h" -#include "hwasan_thread_list.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "sanitizer_common/sanitizer_common.h" -#include "sanitizer_common/sanitizer_procmaps.h" - -#if HWASAN_WITH_INTERCEPTORS && !SANITIZER_ANDROID -SANITIZER_INTERFACE_ATTRIBUTE -THREADLOCAL uptr __hwasan_tls; -#endif - -namespace __hwasan { - -static void ReserveShadowMemoryRange(uptr beg, uptr end, const char *name) { - CHECK_EQ((beg % GetMmapGranularity()), 0); - CHECK_EQ(((end + 1) % GetMmapGranularity()), 0); - uptr size = end - beg + 1; - DecreaseTotalMmap(size); // Don't count the shadow against mmap_limit_mb. - if (!MmapFixedNoReserve(beg, size, name)) { - Report( - "ReserveShadowMemoryRange failed while trying to map 0x%zx bytes. " - "Perhaps you're using ulimit -v\n", - size); - Abort(); - } -} - -static void ProtectGap(uptr addr, uptr size) { - if (!size) - return; - void *res = MmapFixedNoAccess(addr, size, "shadow gap"); - if (addr == (uptr)res) - return; - // A few pages at the start of the address space can not be protected. - // But we really want to protect as much as possible, to prevent this memory - // being returned as a result of a non-FIXED mmap(). - if (addr == 0) { - uptr step = GetMmapGranularity(); - while (size > step) { - addr += step; - size -= step; - void *res = MmapFixedNoAccess(addr, size, "shadow gap"); - if (addr == (uptr)res) - return; - } - } - - Report( - "ERROR: Failed to protect shadow gap [%p, %p]. " - "HWASan cannot proceed correctly. ABORTING.\n", (void *)addr, - (void *)(addr + size)); - DumpProcessMap(); - Die(); -} - -static uptr kLowMemStart; -static uptr kLowMemEnd; -static uptr kLowShadowEnd; -static uptr kLowShadowStart; -static uptr kHighShadowStart; -static uptr kHighShadowEnd; -static uptr kHighMemStart; -static uptr kHighMemEnd; - -static void PrintRange(uptr start, uptr end, const char *name) { - Printf("|| [%p, %p] || %.*s ||\n", (void *)start, (void *)end, 10, name); -} - -static void PrintAddressSpaceLayout() { - PrintRange(kHighMemStart, kHighMemEnd, "HighMem"); - if (kHighShadowEnd + 1 < kHighMemStart) - PrintRange(kHighShadowEnd + 1, kHighMemStart - 1, "ShadowGap"); - else - CHECK_EQ(kHighShadowEnd + 1, kHighMemStart); - PrintRange(kHighShadowStart, kHighShadowEnd, "HighShadow"); - if (kLowShadowEnd + 1 < kHighShadowStart) - PrintRange(kLowShadowEnd + 1, kHighShadowStart - 1, "ShadowGap"); - else - CHECK_EQ(kLowMemEnd + 1, kHighShadowStart); - PrintRange(kLowShadowStart, kLowShadowEnd, "LowShadow"); - if (kLowMemEnd + 1 < kLowShadowStart) - PrintRange(kLowMemEnd + 1, kLowShadowStart - 1, "ShadowGap"); - else - CHECK_EQ(kLowMemEnd + 1, kLowShadowStart); - PrintRange(kLowMemStart, kLowMemEnd, "LowMem"); - CHECK_EQ(0, kLowMemStart); -} - -static uptr GetHighMemEnd() { - // HighMem covers the upper part of the address space. - uptr max_address = GetMaxUserVirtualAddress(); - // Adjust max address to make sure that kHighMemEnd and kHighMemStart are - // properly aligned: - max_address |= (GetMmapGranularity() << kShadowScale) - 1; - return max_address; -} - -static void InitializeShadowBaseAddress(uptr shadow_size_bytes) { - __hwasan_shadow_memory_dynamic_address = - FindDynamicShadowStart(shadow_size_bytes); -} - -bool InitShadow() { - // Define the entire memory range. - kHighMemEnd = GetHighMemEnd(); - - // Determine shadow memory base offset. - InitializeShadowBaseAddress(MemToShadowSize(kHighMemEnd)); - - // Place the low memory first. - kLowMemEnd = __hwasan_shadow_memory_dynamic_address - 1; - kLowMemStart = 0; - - // Define the low shadow based on the already placed low memory. - kLowShadowEnd = MemToShadow(kLowMemEnd); - kLowShadowStart = __hwasan_shadow_memory_dynamic_address; - - // High shadow takes whatever memory is left up there (making sure it is not - // interfering with low memory in the fixed case). - kHighShadowEnd = MemToShadow(kHighMemEnd); - kHighShadowStart = Max(kLowMemEnd, MemToShadow(kHighShadowEnd)) + 1; - - // High memory starts where allocated shadow allows. - kHighMemStart = ShadowToMem(kHighShadowStart); - - // Check the sanity of the defined memory ranges (there might be gaps). - CHECK_EQ(kHighMemStart % GetMmapGranularity(), 0); - CHECK_GT(kHighMemStart, kHighShadowEnd); - CHECK_GT(kHighShadowEnd, kHighShadowStart); - CHECK_GT(kHighShadowStart, kLowMemEnd); - CHECK_GT(kLowMemEnd, kLowMemStart); - CHECK_GT(kLowShadowEnd, kLowShadowStart); - CHECK_GT(kLowShadowStart, kLowMemEnd); - - if (Verbosity()) - PrintAddressSpaceLayout(); - - // Reserve shadow memory. - ReserveShadowMemoryRange(kLowShadowStart, kLowShadowEnd, "low shadow"); - ReserveShadowMemoryRange(kHighShadowStart, kHighShadowEnd, "high shadow"); - - // Protect all the gaps. - ProtectGap(0, Min(kLowMemStart, kLowShadowStart)); - if (kLowMemEnd + 1 < kLowShadowStart) - ProtectGap(kLowMemEnd + 1, kLowShadowStart - kLowMemEnd - 1); - if (kLowShadowEnd + 1 < kHighShadowStart) - ProtectGap(kLowShadowEnd + 1, kHighShadowStart - kLowShadowEnd - 1); - if (kHighShadowEnd + 1 < kHighMemStart) - ProtectGap(kHighShadowEnd + 1, kHighMemStart - kHighShadowEnd - 1); - - return true; -} - -void InitThreads() { - CHECK(__hwasan_shadow_memory_dynamic_address); - uptr guard_page_size = GetMmapGranularity(); - uptr thread_space_start = - __hwasan_shadow_memory_dynamic_address - (1ULL << kShadowBaseAlignment); - uptr thread_space_end = - __hwasan_shadow_memory_dynamic_address - guard_page_size; - ReserveShadowMemoryRange(thread_space_start, thread_space_end - 1, - "hwasan threads"); - ProtectGap(thread_space_end, - __hwasan_shadow_memory_dynamic_address - thread_space_end); - InitThreadList(thread_space_start, thread_space_end - thread_space_start); -} - -static void MadviseShadowRegion(uptr beg, uptr end) { - uptr size = end - beg + 1; - if (common_flags()->no_huge_pages_for_shadow) - NoHugePagesInRegion(beg, size); - if (common_flags()->use_madv_dontdump) - DontDumpShadowMemory(beg, size); -} - -void MadviseShadow() { - MadviseShadowRegion(kLowShadowStart, kLowShadowEnd); - MadviseShadowRegion(kHighShadowStart, kHighShadowEnd); -} - -bool MemIsApp(uptr p) { - CHECK(GetTagFromPointer(p) == 0); - return p >= kHighMemStart || (p >= kLowMemStart && p <= kLowMemEnd); -} - -static void HwasanAtExit(void) { - if (common_flags()->print_module_map) - DumpProcessMap(); - if (flags()->print_stats && (flags()->atexit || hwasan_report_count > 0)) - ReportStats(); - if (hwasan_report_count > 0) { - // ReportAtExitStatistics(); - if (common_flags()->exitcode) - internal__exit(common_flags()->exitcode); - } -} - -void InstallAtExitHandler() { - atexit(HwasanAtExit); -} - -// ---------------------- TSD ---------------- {{{1 - -extern "C" void __hwasan_thread_enter() { - hwasanThreadList().CreateCurrentThread()->InitRandomState(); -} - -extern "C" void __hwasan_thread_exit() { - Thread *t = GetCurrentThread(); - // Make sure that signal handler can not see a stale current thread pointer. - atomic_signal_fence(memory_order_seq_cst); - if (t) - hwasanThreadList().ReleaseThread(t); -} - -#if HWASAN_WITH_INTERCEPTORS -static pthread_key_t tsd_key; -static bool tsd_key_inited = false; - -void HwasanTSDThreadInit() { - if (tsd_key_inited) - CHECK_EQ(0, pthread_setspecific(tsd_key, - (void *)GetPthreadDestructorIterations())); -} - -void HwasanTSDDtor(void *tsd) { - uptr iterations = (uptr)tsd; - if (iterations > 1) { - CHECK_EQ(0, pthread_setspecific(tsd_key, (void *)(iterations - 1))); - return; - } - __hwasan_thread_exit(); -} - -void HwasanTSDInit() { - CHECK(!tsd_key_inited); - tsd_key_inited = true; - CHECK_EQ(0, pthread_key_create(&tsd_key, HwasanTSDDtor)); -} -#else -void HwasanTSDInit() {} -void HwasanTSDThreadInit() {} -#endif - -#if SANITIZER_ANDROID -uptr *GetCurrentThreadLongPtr() { - return (uptr *)get_android_tls_ptr(); -} -#else -uptr *GetCurrentThreadLongPtr() { - return &__hwasan_tls; -} -#endif - -#if SANITIZER_ANDROID -void AndroidTestTlsSlot() { - uptr kMagicValue = 0x010203040A0B0C0D; - uptr *tls_ptr = GetCurrentThreadLongPtr(); - uptr old_value = *tls_ptr; - *tls_ptr = kMagicValue; - dlerror(); - if (*(uptr *)get_android_tls_ptr() != kMagicValue) { - Printf( - "ERROR: Incompatible version of Android: TLS_SLOT_SANITIZER(6) is used " - "for dlerror().\n"); - Die(); - } - *tls_ptr = old_value; -} -#else -void AndroidTestTlsSlot() {} -#endif - -Thread *GetCurrentThread() { - uptr *ThreadLong = GetCurrentThreadLongPtr(); -#if HWASAN_WITH_INTERCEPTORS - if (!*ThreadLong) - __hwasan_thread_enter(); -#endif - auto *R = (StackAllocationsRingBuffer *)ThreadLong; - return hwasanThreadList().GetThreadByBufferAddress((uptr)(R->Next())); -} - -struct AccessInfo { - uptr addr; - uptr size; - bool is_store; - bool is_load; - bool recover; -}; - -static AccessInfo GetAccessInfo(siginfo_t *info, ucontext_t *uc) { - // Access type is passed in a platform dependent way (see below) and encoded - // as 0xXY, where X&1 is 1 for store, 0 for load, and X&2 is 1 if the error is - // recoverable. Valid values of Y are 0 to 4, which are interpreted as - // log2(access_size), and 0xF, which means that access size is passed via - // platform dependent register (see below). -#if defined(__aarch64__) - // Access type is encoded in BRK immediate as 0x900 + 0xXY. For Y == 0xF, - // access size is stored in X1 register. Access address is always in X0 - // register. - uptr pc = (uptr)info->si_addr; - const unsigned code = ((*(u32 *)pc) >> 5) & 0xffff; - if ((code & 0xff00) != 0x900) - return AccessInfo{}; // Not ours. - - const bool is_store = code & 0x10; - const bool recover = code & 0x20; - const uptr addr = uc->uc_mcontext.regs[0]; - const unsigned size_log = code & 0xf; - if (size_log > 4 && size_log != 0xf) - return AccessInfo{}; // Not ours. - const uptr size = size_log == 0xf ? uc->uc_mcontext.regs[1] : 1U << size_log; - -#elif defined(__x86_64__) - // Access type is encoded in the instruction following INT3 as - // NOP DWORD ptr [EAX + 0x40 + 0xXY]. For Y == 0xF, access size is stored in - // RSI register. Access address is always in RDI register. - uptr pc = (uptr)uc->uc_mcontext.gregs[REG_RIP]; - uint8_t *nop = (uint8_t*)pc; - if (*nop != 0x0f || *(nop + 1) != 0x1f || *(nop + 2) != 0x40 || - *(nop + 3) < 0x40) - return AccessInfo{}; // Not ours. - const unsigned code = *(nop + 3); - - const bool is_store = code & 0x10; - const bool recover = code & 0x20; - const uptr addr = uc->uc_mcontext.gregs[REG_RDI]; - const unsigned size_log = code & 0xf; - if (size_log > 4 && size_log != 0xf) - return AccessInfo{}; // Not ours. - const uptr size = - size_log == 0xf ? uc->uc_mcontext.gregs[REG_RSI] : 1U << size_log; - -#else -# error Unsupported architecture -#endif - - return AccessInfo{addr, size, is_store, !is_store, recover}; -} - -static void HandleTagMismatch(AccessInfo ai, uptr pc, uptr frame, - ucontext_t *uc) { - InternalMmapVector stack_buffer(1); - BufferedStackTrace *stack = stack_buffer.data(); - stack->Reset(); - GetStackTrace(stack, kStackTraceMax, pc, frame, uc, - common_flags()->fast_unwind_on_fatal); - - bool fatal = flags()->halt_on_error || !ai.recover; - ReportTagMismatch(stack, ai.addr, ai.size, ai.is_store, fatal); -} - -static bool HwasanOnSIGTRAP(int signo, siginfo_t *info, ucontext_t *uc) { - AccessInfo ai = GetAccessInfo(info, uc); - if (!ai.is_store && !ai.is_load) - return false; - - SignalContext sig{info, uc}; - HandleTagMismatch(ai, StackTrace::GetNextInstructionPc(sig.pc), sig.bp, uc); - -#if defined(__aarch64__) - uc->uc_mcontext.pc += 4; -#elif defined(__x86_64__) -#else -# error Unsupported architecture -#endif - return true; -} - -extern "C" SANITIZER_INTERFACE_ATTRIBUTE void __hwasan_tag_mismatch( - uptr addr, uptr access_info) { - AccessInfo ai; - ai.is_store = access_info & 0x10; - ai.recover = false; - ai.addr = addr; - ai.size = 1 << (access_info & 0xf); - - HandleTagMismatch(ai, (uptr)__builtin_return_address(0), - (uptr)__builtin_frame_address(0), nullptr); - __builtin_unreachable(); -} - -static void OnStackUnwind(const SignalContext &sig, const void *, - BufferedStackTrace *stack) { - GetStackTrace(stack, kStackTraceMax, StackTrace::GetNextInstructionPc(sig.pc), - sig.bp, sig.context, common_flags()->fast_unwind_on_fatal); -} - -void HwasanOnDeadlySignal(int signo, void *info, void *context) { - // Probably a tag mismatch. - if (signo == SIGTRAP) - if (HwasanOnSIGTRAP(signo, (siginfo_t *)info, (ucontext_t*)context)) - return; - - HandleDeadlySignal(info, context, GetTid(), &OnStackUnwind, nullptr); -} - - -} // namespace __hwasan - -#endif // SANITIZER_FREEBSD || SANITIZER_LINUX || SANITIZER_NETBSD diff --git a/compiler-rt/lib/hwasan/hwasan_linux.cpp b/compiler-rt/lib/hwasan/hwasan_linux.cpp new file mode 100644 index 0000000000000..ce0c55f066877 --- /dev/null +++ b/compiler-rt/lib/hwasan/hwasan_linux.cpp @@ -0,0 +1,435 @@ +//===-- hwasan_linux.cpp ----------------------------------------*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +/// +/// \file +/// This file is a part of HWAddressSanitizer and contains Linux-, NetBSD- and +/// FreeBSD-specific code. +/// +//===----------------------------------------------------------------------===// + +#include "sanitizer_common/sanitizer_platform.h" +#if SANITIZER_FREEBSD || SANITIZER_LINUX || SANITIZER_NETBSD + +#include "hwasan.h" +#include "hwasan_dynamic_shadow.h" +#include "hwasan_interface_internal.h" +#include "hwasan_mapping.h" +#include "hwasan_report.h" +#include "hwasan_thread.h" +#include "hwasan_thread_list.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "sanitizer_common/sanitizer_common.h" +#include "sanitizer_common/sanitizer_procmaps.h" + +#if HWASAN_WITH_INTERCEPTORS && !SANITIZER_ANDROID +SANITIZER_INTERFACE_ATTRIBUTE +THREADLOCAL uptr __hwasan_tls; +#endif + +namespace __hwasan { + +static void ReserveShadowMemoryRange(uptr beg, uptr end, const char *name) { + CHECK_EQ((beg % GetMmapGranularity()), 0); + CHECK_EQ(((end + 1) % GetMmapGranularity()), 0); + uptr size = end - beg + 1; + DecreaseTotalMmap(size); // Don't count the shadow against mmap_limit_mb. + if (!MmapFixedNoReserve(beg, size, name)) { + Report( + "ReserveShadowMemoryRange failed while trying to map 0x%zx bytes. " + "Perhaps you're using ulimit -v\n", + size); + Abort(); + } +} + +static void ProtectGap(uptr addr, uptr size) { + if (!size) + return; + void *res = MmapFixedNoAccess(addr, size, "shadow gap"); + if (addr == (uptr)res) + return; + // A few pages at the start of the address space can not be protected. + // But we really want to protect as much as possible, to prevent this memory + // being returned as a result of a non-FIXED mmap(). + if (addr == 0) { + uptr step = GetMmapGranularity(); + while (size > step) { + addr += step; + size -= step; + void *res = MmapFixedNoAccess(addr, size, "shadow gap"); + if (addr == (uptr)res) + return; + } + } + + Report( + "ERROR: Failed to protect shadow gap [%p, %p]. " + "HWASan cannot proceed correctly. ABORTING.\n", (void *)addr, + (void *)(addr + size)); + DumpProcessMap(); + Die(); +} + +static uptr kLowMemStart; +static uptr kLowMemEnd; +static uptr kLowShadowEnd; +static uptr kLowShadowStart; +static uptr kHighShadowStart; +static uptr kHighShadowEnd; +static uptr kHighMemStart; +static uptr kHighMemEnd; + +static void PrintRange(uptr start, uptr end, const char *name) { + Printf("|| [%p, %p] || %.*s ||\n", (void *)start, (void *)end, 10, name); +} + +static void PrintAddressSpaceLayout() { + PrintRange(kHighMemStart, kHighMemEnd, "HighMem"); + if (kHighShadowEnd + 1 < kHighMemStart) + PrintRange(kHighShadowEnd + 1, kHighMemStart - 1, "ShadowGap"); + else + CHECK_EQ(kHighShadowEnd + 1, kHighMemStart); + PrintRange(kHighShadowStart, kHighShadowEnd, "HighShadow"); + if (kLowShadowEnd + 1 < kHighShadowStart) + PrintRange(kLowShadowEnd + 1, kHighShadowStart - 1, "ShadowGap"); + else + CHECK_EQ(kLowMemEnd + 1, kHighShadowStart); + PrintRange(kLowShadowStart, kLowShadowEnd, "LowShadow"); + if (kLowMemEnd + 1 < kLowShadowStart) + PrintRange(kLowMemEnd + 1, kLowShadowStart - 1, "ShadowGap"); + else + CHECK_EQ(kLowMemEnd + 1, kLowShadowStart); + PrintRange(kLowMemStart, kLowMemEnd, "LowMem"); + CHECK_EQ(0, kLowMemStart); +} + +static uptr GetHighMemEnd() { + // HighMem covers the upper part of the address space. + uptr max_address = GetMaxUserVirtualAddress(); + // Adjust max address to make sure that kHighMemEnd and kHighMemStart are + // properly aligned: + max_address |= (GetMmapGranularity() << kShadowScale) - 1; + return max_address; +} + +static void InitializeShadowBaseAddress(uptr shadow_size_bytes) { + __hwasan_shadow_memory_dynamic_address = + FindDynamicShadowStart(shadow_size_bytes); +} + +bool InitShadow() { + // Define the entire memory range. + kHighMemEnd = GetHighMemEnd(); + + // Determine shadow memory base offset. + InitializeShadowBaseAddress(MemToShadowSize(kHighMemEnd)); + + // Place the low memory first. + kLowMemEnd = __hwasan_shadow_memory_dynamic_address - 1; + kLowMemStart = 0; + + // Define the low shadow based on the already placed low memory. + kLowShadowEnd = MemToShadow(kLowMemEnd); + kLowShadowStart = __hwasan_shadow_memory_dynamic_address; + + // High shadow takes whatever memory is left up there (making sure it is not + // interfering with low memory in the fixed case). + kHighShadowEnd = MemToShadow(kHighMemEnd); + kHighShadowStart = Max(kLowMemEnd, MemToShadow(kHighShadowEnd)) + 1; + + // High memory starts where allocated shadow allows. + kHighMemStart = ShadowToMem(kHighShadowStart); + + // Check the sanity of the defined memory ranges (there might be gaps). + CHECK_EQ(kHighMemStart % GetMmapGranularity(), 0); + CHECK_GT(kHighMemStart, kHighShadowEnd); + CHECK_GT(kHighShadowEnd, kHighShadowStart); + CHECK_GT(kHighShadowStart, kLowMemEnd); + CHECK_GT(kLowMemEnd, kLowMemStart); + CHECK_GT(kLowShadowEnd, kLowShadowStart); + CHECK_GT(kLowShadowStart, kLowMemEnd); + + if (Verbosity()) + PrintAddressSpaceLayout(); + + // Reserve shadow memory. + ReserveShadowMemoryRange(kLowShadowStart, kLowShadowEnd, "low shadow"); + ReserveShadowMemoryRange(kHighShadowStart, kHighShadowEnd, "high shadow"); + + // Protect all the gaps. + ProtectGap(0, Min(kLowMemStart, kLowShadowStart)); + if (kLowMemEnd + 1 < kLowShadowStart) + ProtectGap(kLowMemEnd + 1, kLowShadowStart - kLowMemEnd - 1); + if (kLowShadowEnd + 1 < kHighShadowStart) + ProtectGap(kLowShadowEnd + 1, kHighShadowStart - kLowShadowEnd - 1); + if (kHighShadowEnd + 1 < kHighMemStart) + ProtectGap(kHighShadowEnd + 1, kHighMemStart - kHighShadowEnd - 1); + + return true; +} + +void InitThreads() { + CHECK(__hwasan_shadow_memory_dynamic_address); + uptr guard_page_size = GetMmapGranularity(); + uptr thread_space_start = + __hwasan_shadow_memory_dynamic_address - (1ULL << kShadowBaseAlignment); + uptr thread_space_end = + __hwasan_shadow_memory_dynamic_address - guard_page_size; + ReserveShadowMemoryRange(thread_space_start, thread_space_end - 1, + "hwasan threads"); + ProtectGap(thread_space_end, + __hwasan_shadow_memory_dynamic_address - thread_space_end); + InitThreadList(thread_space_start, thread_space_end - thread_space_start); +} + +static void MadviseShadowRegion(uptr beg, uptr end) { + uptr size = end - beg + 1; + if (common_flags()->no_huge_pages_for_shadow) + NoHugePagesInRegion(beg, size); + if (common_flags()->use_madv_dontdump) + DontDumpShadowMemory(beg, size); +} + +void MadviseShadow() { + MadviseShadowRegion(kLowShadowStart, kLowShadowEnd); + MadviseShadowRegion(kHighShadowStart, kHighShadowEnd); +} + +bool MemIsApp(uptr p) { + CHECK(GetTagFromPointer(p) == 0); + return p >= kHighMemStart || (p >= kLowMemStart && p <= kLowMemEnd); +} + +static void HwasanAtExit(void) { + if (common_flags()->print_module_map) + DumpProcessMap(); + if (flags()->print_stats && (flags()->atexit || hwasan_report_count > 0)) + ReportStats(); + if (hwasan_report_count > 0) { + // ReportAtExitStatistics(); + if (common_flags()->exitcode) + internal__exit(common_flags()->exitcode); + } +} + +void InstallAtExitHandler() { + atexit(HwasanAtExit); +} + +// ---------------------- TSD ---------------- {{{1 + +extern "C" void __hwasan_thread_enter() { + hwasanThreadList().CreateCurrentThread()->InitRandomState(); +} + +extern "C" void __hwasan_thread_exit() { + Thread *t = GetCurrentThread(); + // Make sure that signal handler can not see a stale current thread pointer. + atomic_signal_fence(memory_order_seq_cst); + if (t) + hwasanThreadList().ReleaseThread(t); +} + +#if HWASAN_WITH_INTERCEPTORS +static pthread_key_t tsd_key; +static bool tsd_key_inited = false; + +void HwasanTSDThreadInit() { + if (tsd_key_inited) + CHECK_EQ(0, pthread_setspecific(tsd_key, + (void *)GetPthreadDestructorIterations())); +} + +void HwasanTSDDtor(void *tsd) { + uptr iterations = (uptr)tsd; + if (iterations > 1) { + CHECK_EQ(0, pthread_setspecific(tsd_key, (void *)(iterations - 1))); + return; + } + __hwasan_thread_exit(); +} + +void HwasanTSDInit() { + CHECK(!tsd_key_inited); + tsd_key_inited = true; + CHECK_EQ(0, pthread_key_create(&tsd_key, HwasanTSDDtor)); +} +#else +void HwasanTSDInit() {} +void HwasanTSDThreadInit() {} +#endif + +#if SANITIZER_ANDROID +uptr *GetCurrentThreadLongPtr() { + return (uptr *)get_android_tls_ptr(); +} +#else +uptr *GetCurrentThreadLongPtr() { + return &__hwasan_tls; +} +#endif + +#if SANITIZER_ANDROID +void AndroidTestTlsSlot() { + uptr kMagicValue = 0x010203040A0B0C0D; + uptr *tls_ptr = GetCurrentThreadLongPtr(); + uptr old_value = *tls_ptr; + *tls_ptr = kMagicValue; + dlerror(); + if (*(uptr *)get_android_tls_ptr() != kMagicValue) { + Printf( + "ERROR: Incompatible version of Android: TLS_SLOT_SANITIZER(6) is used " + "for dlerror().\n"); + Die(); + } + *tls_ptr = old_value; +} +#else +void AndroidTestTlsSlot() {} +#endif + +Thread *GetCurrentThread() { + uptr *ThreadLong = GetCurrentThreadLongPtr(); +#if HWASAN_WITH_INTERCEPTORS + if (!*ThreadLong) + __hwasan_thread_enter(); +#endif + auto *R = (StackAllocationsRingBuffer *)ThreadLong; + return hwasanThreadList().GetThreadByBufferAddress((uptr)(R->Next())); +} + +struct AccessInfo { + uptr addr; + uptr size; + bool is_store; + bool is_load; + bool recover; +}; + +static AccessInfo GetAccessInfo(siginfo_t *info, ucontext_t *uc) { + // Access type is passed in a platform dependent way (see below) and encoded + // as 0xXY, where X&1 is 1 for store, 0 for load, and X&2 is 1 if the error is + // recoverable. Valid values of Y are 0 to 4, which are interpreted as + // log2(access_size), and 0xF, which means that access size is passed via + // platform dependent register (see below). +#if defined(__aarch64__) + // Access type is encoded in BRK immediate as 0x900 + 0xXY. For Y == 0xF, + // access size is stored in X1 register. Access address is always in X0 + // register. + uptr pc = (uptr)info->si_addr; + const unsigned code = ((*(u32 *)pc) >> 5) & 0xffff; + if ((code & 0xff00) != 0x900) + return AccessInfo{}; // Not ours. + + const bool is_store = code & 0x10; + const bool recover = code & 0x20; + const uptr addr = uc->uc_mcontext.regs[0]; + const unsigned size_log = code & 0xf; + if (size_log > 4 && size_log != 0xf) + return AccessInfo{}; // Not ours. + const uptr size = size_log == 0xf ? uc->uc_mcontext.regs[1] : 1U << size_log; + +#elif defined(__x86_64__) + // Access type is encoded in the instruction following INT3 as + // NOP DWORD ptr [EAX + 0x40 + 0xXY]. For Y == 0xF, access size is stored in + // RSI register. Access address is always in RDI register. + uptr pc = (uptr)uc->uc_mcontext.gregs[REG_RIP]; + uint8_t *nop = (uint8_t*)pc; + if (*nop != 0x0f || *(nop + 1) != 0x1f || *(nop + 2) != 0x40 || + *(nop + 3) < 0x40) + return AccessInfo{}; // Not ours. + const unsigned code = *(nop + 3); + + const bool is_store = code & 0x10; + const bool recover = code & 0x20; + const uptr addr = uc->uc_mcontext.gregs[REG_RDI]; + const unsigned size_log = code & 0xf; + if (size_log > 4 && size_log != 0xf) + return AccessInfo{}; // Not ours. + const uptr size = + size_log == 0xf ? uc->uc_mcontext.gregs[REG_RSI] : 1U << size_log; + +#else +# error Unsupported architecture +#endif + + return AccessInfo{addr, size, is_store, !is_store, recover}; +} + +static void HandleTagMismatch(AccessInfo ai, uptr pc, uptr frame, + ucontext_t *uc) { + InternalMmapVector stack_buffer(1); + BufferedStackTrace *stack = stack_buffer.data(); + stack->Reset(); + stack->Unwind(pc, frame, uc, common_flags()->fast_unwind_on_fatal); + + bool fatal = flags()->halt_on_error || !ai.recover; + ReportTagMismatch(stack, ai.addr, ai.size, ai.is_store, fatal); +} + +static bool HwasanOnSIGTRAP(int signo, siginfo_t *info, ucontext_t *uc) { + AccessInfo ai = GetAccessInfo(info, uc); + if (!ai.is_store && !ai.is_load) + return false; + + SignalContext sig{info, uc}; + HandleTagMismatch(ai, StackTrace::GetNextInstructionPc(sig.pc), sig.bp, uc); + +#if defined(__aarch64__) + uc->uc_mcontext.pc += 4; +#elif defined(__x86_64__) +#else +# error Unsupported architecture +#endif + return true; +} + +extern "C" SANITIZER_INTERFACE_ATTRIBUTE void __hwasan_tag_mismatch( + uptr addr, uptr access_info) { + AccessInfo ai; + ai.is_store = access_info & 0x10; + ai.recover = false; + ai.addr = addr; + ai.size = 1 << (access_info & 0xf); + + HandleTagMismatch(ai, (uptr)__builtin_return_address(0), + (uptr)__builtin_frame_address(0), nullptr); + __builtin_unreachable(); +} + +static void OnStackUnwind(const SignalContext &sig, const void *, + BufferedStackTrace *stack) { + stack->Unwind(StackTrace::GetNextInstructionPc(sig.pc), sig.bp, sig.context, + common_flags()->fast_unwind_on_fatal); +} + +void HwasanOnDeadlySignal(int signo, void *info, void *context) { + // Probably a tag mismatch. + if (signo == SIGTRAP) + if (HwasanOnSIGTRAP(signo, (siginfo_t *)info, (ucontext_t*)context)) + return; + + HandleDeadlySignal(info, context, GetTid(), &OnStackUnwind, nullptr); +} + + +} // namespace __hwasan + +#endif // SANITIZER_FREEBSD || SANITIZER_LINUX || SANITIZER_NETBSD diff --git a/compiler-rt/lib/hwasan/hwasan_malloc_bisect.h b/compiler-rt/lib/hwasan/hwasan_malloc_bisect.h new file mode 100644 index 0000000000000..eaf124aab7ddc --- /dev/null +++ b/compiler-rt/lib/hwasan/hwasan_malloc_bisect.h @@ -0,0 +1,50 @@ +//===-- hwasan_malloc_bisect.h ----------------------------------*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// +// This file is a part of HWAddressSanitizer. +// +//===----------------------------------------------------------------------===// + +#include "sanitizer_common/sanitizer_hash.h" +#include "hwasan.h" + +namespace __hwasan { + +static u32 malloc_hash(StackTrace *stack, uptr orig_size) { + uptr len = Min(stack->size, (unsigned)7); + MurMur2HashBuilder H(len); + H.add(orig_size); + // Start with frame #1 to skip __sanitizer_malloc frame, which is + // (a) almost always the same (well, could be operator new or new[]) + // (b) can change hashes when compiler-rt is rebuilt, invalidating previous + // bisection results. + // Because of ASLR, use only offset inside the page. + for (uptr i = 1; i < len; ++i) H.add(((u32)stack->trace[i]) & 0xFFF); + return H.get(); +} + +static INLINE bool malloc_bisect(StackTrace *stack, uptr orig_size) { + uptr left = flags()->malloc_bisect_left; + uptr right = flags()->malloc_bisect_right; + if (LIKELY(left == 0 && right == 0)) + return true; + if (!stack) + return true; + // Allow malloc_bisect_right > (u32)(-1) to avoid spelling the latter in + // decimal. + uptr h = (uptr)malloc_hash(stack, orig_size); + if (h < left || h > right) + return false; + if (flags()->malloc_bisect_dump) { + Printf("[alloc] %u %zu\n", h, orig_size); + stack->Print(); + } + return true; +} + +} // namespace __hwasan diff --git a/compiler-rt/lib/hwasan/hwasan_memintrinsics.cc b/compiler-rt/lib/hwasan/hwasan_memintrinsics.cc deleted file mode 100644 index 1bfc6c3fa6823..0000000000000 --- a/compiler-rt/lib/hwasan/hwasan_memintrinsics.cc +++ /dev/null @@ -1,44 +0,0 @@ -//===-- hwasan_memintrinsics.cc ---------------------------------*- C++ -*-===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// -/// -/// \file -/// This file is a part of HWAddressSanitizer and contains HWASAN versions of -/// memset, memcpy and memmove -/// -//===----------------------------------------------------------------------===// - -#include -#include "hwasan.h" -#include "hwasan_checks.h" -#include "hwasan_flags.h" -#include "hwasan_interface_internal.h" -#include "sanitizer_common/sanitizer_libc.h" - -using namespace __hwasan; - -void *__hwasan_memset(void *block, int c, uptr size) { - CheckAddressSized( - reinterpret_cast(block), size); - return memset(UntagPtr(block), c, size); -} - -void *__hwasan_memcpy(void *to, const void *from, uptr size) { - CheckAddressSized( - reinterpret_cast(to), size); - CheckAddressSized( - reinterpret_cast(from), size); - return memcpy(UntagPtr(to), UntagPtr(from), size); -} - -void *__hwasan_memmove(void *to, const void *from, uptr size) { - CheckAddressSized( - reinterpret_cast(to), size); - CheckAddressSized( - reinterpret_cast(from), size); - return memmove(UntagPtr(to), UntagPtr(from), size); -} diff --git a/compiler-rt/lib/hwasan/hwasan_memintrinsics.cpp b/compiler-rt/lib/hwasan/hwasan_memintrinsics.cpp new file mode 100644 index 0000000000000..e82d77a1bc16f --- /dev/null +++ b/compiler-rt/lib/hwasan/hwasan_memintrinsics.cpp @@ -0,0 +1,44 @@ +//===-- hwasan_memintrinsics.cpp --------------------------------*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +/// +/// \file +/// This file is a part of HWAddressSanitizer and contains HWASAN versions of +/// memset, memcpy and memmove +/// +//===----------------------------------------------------------------------===// + +#include +#include "hwasan.h" +#include "hwasan_checks.h" +#include "hwasan_flags.h" +#include "hwasan_interface_internal.h" +#include "sanitizer_common/sanitizer_libc.h" + +using namespace __hwasan; + +void *__hwasan_memset(void *block, int c, uptr size) { + CheckAddressSized( + reinterpret_cast(block), size); + return memset(UntagPtr(block), c, size); +} + +void *__hwasan_memcpy(void *to, const void *from, uptr size) { + CheckAddressSized( + reinterpret_cast(to), size); + CheckAddressSized( + reinterpret_cast(from), size); + return memcpy(UntagPtr(to), UntagPtr(from), size); +} + +void *__hwasan_memmove(void *to, const void *from, uptr size) { + CheckAddressSized( + reinterpret_cast(to), size); + CheckAddressSized( + reinterpret_cast(from), size); + return memmove(UntagPtr(to), UntagPtr(from), size); +} diff --git a/compiler-rt/lib/hwasan/hwasan_new_delete.cc b/compiler-rt/lib/hwasan/hwasan_new_delete.cc deleted file mode 100644 index 9ecc35018d85f..0000000000000 --- a/compiler-rt/lib/hwasan/hwasan_new_delete.cc +++ /dev/null @@ -1,66 +0,0 @@ -//===-- hwasan_new_delete.cc ----------------------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// -// -// This file is a part of HWAddressSanitizer. -// -// Interceptors for operators new and delete. -//===----------------------------------------------------------------------===// - -#include "hwasan.h" -#include "interception/interception.h" -#include "sanitizer_common/sanitizer_allocator.h" -#include "sanitizer_common/sanitizer_allocator_report.h" - -#if HWASAN_REPLACE_OPERATORS_NEW_AND_DELETE - -#include - -using namespace __hwasan; // NOLINT - -// Fake std::nothrow_t to avoid including . -namespace std { - struct nothrow_t {}; -} // namespace std - - -// TODO(alekseys): throw std::bad_alloc instead of dying on OOM. -#define OPERATOR_NEW_BODY(nothrow) \ - GET_MALLOC_STACK_TRACE; \ - void *res = hwasan_malloc(size, &stack);\ - if (!nothrow && UNLIKELY(!res)) ReportOutOfMemory(size, &stack);\ - return res - -INTERCEPTOR_ATTRIBUTE -void *operator new(size_t size) { OPERATOR_NEW_BODY(false /*nothrow*/); } -INTERCEPTOR_ATTRIBUTE -void *operator new[](size_t size) { OPERATOR_NEW_BODY(false /*nothrow*/); } -INTERCEPTOR_ATTRIBUTE -void *operator new(size_t size, std::nothrow_t const&) { - OPERATOR_NEW_BODY(true /*nothrow*/); -} -INTERCEPTOR_ATTRIBUTE -void *operator new[](size_t size, std::nothrow_t const&) { - OPERATOR_NEW_BODY(true /*nothrow*/); -} - -#define OPERATOR_DELETE_BODY \ - GET_MALLOC_STACK_TRACE; \ - if (ptr) hwasan_free(ptr, &stack) - -INTERCEPTOR_ATTRIBUTE -void operator delete(void *ptr) NOEXCEPT { OPERATOR_DELETE_BODY; } -INTERCEPTOR_ATTRIBUTE -void operator delete[](void *ptr) NOEXCEPT { OPERATOR_DELETE_BODY; } -INTERCEPTOR_ATTRIBUTE -void operator delete(void *ptr, std::nothrow_t const&) { OPERATOR_DELETE_BODY; } -INTERCEPTOR_ATTRIBUTE -void operator delete[](void *ptr, std::nothrow_t const&) { - OPERATOR_DELETE_BODY; -} - -#endif // HWASAN_REPLACE_OPERATORS_NEW_AND_DELETE diff --git a/compiler-rt/lib/hwasan/hwasan_new_delete.cpp b/compiler-rt/lib/hwasan/hwasan_new_delete.cpp new file mode 100644 index 0000000000000..438a3699a92b3 --- /dev/null +++ b/compiler-rt/lib/hwasan/hwasan_new_delete.cpp @@ -0,0 +1,66 @@ +//===-- hwasan_new_delete.cpp ---------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// +// This file is a part of HWAddressSanitizer. +// +// Interceptors for operators new and delete. +//===----------------------------------------------------------------------===// + +#include "hwasan.h" +#include "interception/interception.h" +#include "sanitizer_common/sanitizer_allocator.h" +#include "sanitizer_common/sanitizer_allocator_report.h" + +#if HWASAN_REPLACE_OPERATORS_NEW_AND_DELETE + +#include + +using namespace __hwasan; // NOLINT + +// Fake std::nothrow_t to avoid including . +namespace std { + struct nothrow_t {}; +} // namespace std + + +// TODO(alekseys): throw std::bad_alloc instead of dying on OOM. +#define OPERATOR_NEW_BODY(nothrow) \ + GET_MALLOC_STACK_TRACE; \ + void *res = hwasan_malloc(size, &stack);\ + if (!nothrow && UNLIKELY(!res)) ReportOutOfMemory(size, &stack);\ + return res + +INTERCEPTOR_ATTRIBUTE +void *operator new(size_t size) { OPERATOR_NEW_BODY(false /*nothrow*/); } +INTERCEPTOR_ATTRIBUTE +void *operator new[](size_t size) { OPERATOR_NEW_BODY(false /*nothrow*/); } +INTERCEPTOR_ATTRIBUTE +void *operator new(size_t size, std::nothrow_t const&) { + OPERATOR_NEW_BODY(true /*nothrow*/); +} +INTERCEPTOR_ATTRIBUTE +void *operator new[](size_t size, std::nothrow_t const&) { + OPERATOR_NEW_BODY(true /*nothrow*/); +} + +#define OPERATOR_DELETE_BODY \ + GET_MALLOC_STACK_TRACE; \ + if (ptr) hwasan_free(ptr, &stack) + +INTERCEPTOR_ATTRIBUTE +void operator delete(void *ptr) NOEXCEPT { OPERATOR_DELETE_BODY; } +INTERCEPTOR_ATTRIBUTE +void operator delete[](void *ptr) NOEXCEPT { OPERATOR_DELETE_BODY; } +INTERCEPTOR_ATTRIBUTE +void operator delete(void *ptr, std::nothrow_t const&) { OPERATOR_DELETE_BODY; } +INTERCEPTOR_ATTRIBUTE +void operator delete[](void *ptr, std::nothrow_t const&) { + OPERATOR_DELETE_BODY; +} + +#endif // HWASAN_REPLACE_OPERATORS_NEW_AND_DELETE diff --git a/compiler-rt/lib/hwasan/hwasan_poisoning.cc b/compiler-rt/lib/hwasan/hwasan_poisoning.cc deleted file mode 100644 index 9404c52feab6e..0000000000000 --- a/compiler-rt/lib/hwasan/hwasan_poisoning.cc +++ /dev/null @@ -1,52 +0,0 @@ -//===-- hwasan_poisoning.cc -------------------------------------*- C++ -*-===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// -// -// This file is a part of HWAddressSanitizer. -// -//===----------------------------------------------------------------------===// - -#include "hwasan_poisoning.h" - -#include "hwasan_mapping.h" -#include "interception/interception.h" -#include "sanitizer_common/sanitizer_common.h" -#include "sanitizer_common/sanitizer_linux.h" - -namespace __hwasan { - -uptr TagMemoryAligned(uptr p, uptr size, tag_t tag) { - CHECK(IsAligned(p, kShadowAlignment)); - CHECK(IsAligned(size, kShadowAlignment)); - uptr shadow_start = MemToShadow(p); - uptr shadow_size = MemToShadowSize(size); - - uptr page_size = GetPageSizeCached(); - uptr page_start = RoundUpTo(shadow_start, page_size); - uptr page_end = RoundDownTo(shadow_start + shadow_size, page_size); - uptr threshold = common_flags()->clear_shadow_mmap_threshold; - if (SANITIZER_LINUX && - UNLIKELY(page_end >= page_start + threshold && tag == 0)) { - internal_memset((void *)shadow_start, tag, page_start - shadow_start); - internal_memset((void *)page_end, tag, - shadow_start + shadow_size - page_end); - // For an anonymous private mapping MADV_DONTNEED will return a zero page on - // Linux. - ReleaseMemoryPagesToOSAndZeroFill(page_start, page_end); - } else { - internal_memset((void *)shadow_start, tag, shadow_size); - } - return AddTagToPointer(p, tag); -} - -uptr TagMemory(uptr p, uptr size, tag_t tag) { - uptr start = RoundDownTo(p, kShadowAlignment); - uptr end = RoundUpTo(p + size, kShadowAlignment); - return TagMemoryAligned(start, end - start, tag); -} - -} // namespace __hwasan diff --git a/compiler-rt/lib/hwasan/hwasan_poisoning.cpp b/compiler-rt/lib/hwasan/hwasan_poisoning.cpp new file mode 100644 index 0000000000000..2a0816428e75b --- /dev/null +++ b/compiler-rt/lib/hwasan/hwasan_poisoning.cpp @@ -0,0 +1,52 @@ +//===-- hwasan_poisoning.cpp ------------------------------------*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// +// This file is a part of HWAddressSanitizer. +// +//===----------------------------------------------------------------------===// + +#include "hwasan_poisoning.h" + +#include "hwasan_mapping.h" +#include "interception/interception.h" +#include "sanitizer_common/sanitizer_common.h" +#include "sanitizer_common/sanitizer_linux.h" + +namespace __hwasan { + +uptr TagMemoryAligned(uptr p, uptr size, tag_t tag) { + CHECK(IsAligned(p, kShadowAlignment)); + CHECK(IsAligned(size, kShadowAlignment)); + uptr shadow_start = MemToShadow(p); + uptr shadow_size = MemToShadowSize(size); + + uptr page_size = GetPageSizeCached(); + uptr page_start = RoundUpTo(shadow_start, page_size); + uptr page_end = RoundDownTo(shadow_start + shadow_size, page_size); + uptr threshold = common_flags()->clear_shadow_mmap_threshold; + if (SANITIZER_LINUX && + UNLIKELY(page_end >= page_start + threshold && tag == 0)) { + internal_memset((void *)shadow_start, tag, page_start - shadow_start); + internal_memset((void *)page_end, tag, + shadow_start + shadow_size - page_end); + // For an anonymous private mapping MADV_DONTNEED will return a zero page on + // Linux. + ReleaseMemoryPagesToOSAndZeroFill(page_start, page_end); + } else { + internal_memset((void *)shadow_start, tag, shadow_size); + } + return AddTagToPointer(p, tag); +} + +uptr TagMemory(uptr p, uptr size, tag_t tag) { + uptr start = RoundDownTo(p, kShadowAlignment); + uptr end = RoundUpTo(p + size, kShadowAlignment); + return TagMemoryAligned(start, end - start, tag); +} + +} // namespace __hwasan diff --git a/compiler-rt/lib/hwasan/hwasan_report.cc b/compiler-rt/lib/hwasan/hwasan_report.cc deleted file mode 100644 index aad5e409560c6..0000000000000 --- a/compiler-rt/lib/hwasan/hwasan_report.cc +++ /dev/null @@ -1,436 +0,0 @@ -//===-- hwasan_report.cc --------------------------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// -// -// This file is a part of HWAddressSanitizer. -// -// Error reporting. -//===----------------------------------------------------------------------===// - -#include "hwasan.h" -#include "hwasan_allocator.h" -#include "hwasan_mapping.h" -#include "hwasan_thread.h" -#include "hwasan_thread_list.h" -#include "sanitizer_common/sanitizer_allocator_internal.h" -#include "sanitizer_common/sanitizer_common.h" -#include "sanitizer_common/sanitizer_flags.h" -#include "sanitizer_common/sanitizer_mutex.h" -#include "sanitizer_common/sanitizer_report_decorator.h" -#include "sanitizer_common/sanitizer_stackdepot.h" -#include "sanitizer_common/sanitizer_stacktrace_printer.h" -#include "sanitizer_common/sanitizer_symbolizer.h" - -using namespace __sanitizer; - -namespace __hwasan { - -class ScopedReport { - public: - ScopedReport(bool fatal = false) : error_message_(1), fatal(fatal) { - BlockingMutexLock lock(&error_message_lock_); - error_message_ptr_ = fatal ? &error_message_ : nullptr; - ++hwasan_report_count; - } - - ~ScopedReport() { - { - BlockingMutexLock lock(&error_message_lock_); - if (fatal) - SetAbortMessage(error_message_.data()); - error_message_ptr_ = nullptr; - } - if (common_flags()->print_module_map >= 2 || - (fatal && common_flags()->print_module_map)) - DumpProcessMap(); - if (fatal) - Die(); - } - - static void MaybeAppendToErrorMessage(const char *msg) { - BlockingMutexLock lock(&error_message_lock_); - if (!error_message_ptr_) - return; - uptr len = internal_strlen(msg); - uptr old_size = error_message_ptr_->size(); - error_message_ptr_->resize(old_size + len); - // overwrite old trailing '\0', keep new trailing '\0' untouched. - internal_memcpy(&(*error_message_ptr_)[old_size - 1], msg, len); - } - private: - ScopedErrorReportLock error_report_lock_; - InternalMmapVector error_message_; - bool fatal; - - static InternalMmapVector *error_message_ptr_; - static BlockingMutex error_message_lock_; -}; - -InternalMmapVector *ScopedReport::error_message_ptr_; -BlockingMutex ScopedReport::error_message_lock_; - -// If there is an active ScopedReport, append to its error message. -void AppendToErrorMessageBuffer(const char *buffer) { - ScopedReport::MaybeAppendToErrorMessage(buffer); -} - -static StackTrace GetStackTraceFromId(u32 id) { - CHECK(id); - StackTrace res = StackDepotGet(id); - CHECK(res.trace); - return res; -} - -// A RAII object that holds a copy of the current thread stack ring buffer. -// The actual stack buffer may change while we are iterating over it (for -// example, Printf may call syslog() which can itself be built with hwasan). -class SavedStackAllocations { - public: - SavedStackAllocations(StackAllocationsRingBuffer *rb) { - uptr size = rb->size() * sizeof(uptr); - void *storage = - MmapAlignedOrDieOnFatalError(size, size * 2, "saved stack allocations"); - new (&rb_) StackAllocationsRingBuffer(*rb, storage); - } - - ~SavedStackAllocations() { - StackAllocationsRingBuffer *rb = get(); - UnmapOrDie(rb->StartOfStorage(), rb->size() * sizeof(uptr)); - } - - StackAllocationsRingBuffer *get() { - return (StackAllocationsRingBuffer *)&rb_; - } - - private: - uptr rb_; -}; - -class Decorator: public __sanitizer::SanitizerCommonDecorator { - public: - Decorator() : SanitizerCommonDecorator() { } - const char *Access() { return Blue(); } - const char *Allocation() const { return Magenta(); } - const char *Origin() const { return Magenta(); } - const char *Name() const { return Green(); } - const char *Location() { return Green(); } - const char *Thread() { return Green(); } -}; - -// Returns the index of the rb element that matches tagged_addr (plus one), -// or zero if found nothing. -uptr FindHeapAllocation(HeapAllocationsRingBuffer *rb, - uptr tagged_addr, - HeapAllocationRecord *har) { - if (!rb) return 0; - for (uptr i = 0, size = rb->size(); i < size; i++) { - auto h = (*rb)[i]; - if (h.tagged_addr <= tagged_addr && - h.tagged_addr + h.requested_size > tagged_addr) { - *har = h; - return i + 1; - } - } - return 0; -} - -void PrintAddressDescription( - uptr tagged_addr, uptr access_size, - StackAllocationsRingBuffer *current_stack_allocations) { - Decorator d; - int num_descriptions_printed = 0; - uptr untagged_addr = UntagAddr(tagged_addr); - - // Print some very basic information about the address, if it's a heap. - HwasanChunkView chunk = FindHeapChunkByAddress(untagged_addr); - if (uptr beg = chunk.Beg()) { - uptr size = chunk.ActualSize(); - Printf("%s[%p,%p) is a %s %s heap chunk; " - "size: %zd offset: %zd\n%s", - d.Location(), - beg, beg + size, - chunk.FromSmallHeap() ? "small" : "large", - chunk.IsAllocated() ? "allocated" : "unallocated", - size, untagged_addr - beg, - d.Default()); - } - - // Check if this looks like a heap buffer overflow by scanning - // the shadow left and right and looking for the first adjacent - // object with a different memory tag. If that tag matches addr_tag, - // check the allocator if it has a live chunk there. - tag_t addr_tag = GetTagFromPointer(tagged_addr); - tag_t *tag_ptr = reinterpret_cast(MemToShadow(untagged_addr)); - if (*tag_ptr != addr_tag) { // should be true usually. - tag_t *left = tag_ptr, *right = tag_ptr; - // scan left. - for (int i = 0; i < 1000 && *left == *tag_ptr; i++, left--){} - // scan right. - for (int i = 0; i < 1000 && *right == *tag_ptr; i++, right++){} - // Chose the object that has addr_tag and that is closer to addr. - tag_t *candidate = nullptr; - if (*right == addr_tag && *left == addr_tag) - candidate = right - tag_ptr < tag_ptr - left ? right : left; - else if (*right == addr_tag) - candidate = right; - else if (*left == addr_tag) - candidate = left; - - if (candidate) { - uptr mem = ShadowToMem(reinterpret_cast(candidate)); - HwasanChunkView chunk = FindHeapChunkByAddress(mem); - if (chunk.IsAllocated()) { - Printf("%s", d.Location()); - Printf( - "%p is located %zd bytes to the %s of %zd-byte region [%p,%p)\n", - untagged_addr, - candidate == left ? untagged_addr - chunk.End() - : chunk.Beg() - untagged_addr, - candidate == right ? "left" : "right", chunk.UsedSize(), - chunk.Beg(), chunk.End()); - Printf("%s", d.Allocation()); - Printf("allocated here:\n"); - Printf("%s", d.Default()); - GetStackTraceFromId(chunk.GetAllocStackId()).Print(); - num_descriptions_printed++; - } - } - } - - hwasanThreadList().VisitAllLiveThreads([&](Thread *t) { - // Scan all threads' ring buffers to find if it's a heap-use-after-free. - HeapAllocationRecord har; - if (uptr D = FindHeapAllocation(t->heap_allocations(), tagged_addr, &har)) { - Printf("%s", d.Location()); - Printf("%p is located %zd bytes inside of %zd-byte region [%p,%p)\n", - untagged_addr, untagged_addr - UntagAddr(har.tagged_addr), - har.requested_size, UntagAddr(har.tagged_addr), - UntagAddr(har.tagged_addr) + har.requested_size); - Printf("%s", d.Allocation()); - Printf("freed by thread T%zd here:\n", t->unique_id()); - Printf("%s", d.Default()); - GetStackTraceFromId(har.free_context_id).Print(); - - Printf("%s", d.Allocation()); - Printf("previously allocated here:\n", t); - Printf("%s", d.Default()); - GetStackTraceFromId(har.alloc_context_id).Print(); - - // Print a developer note: the index of this heap object - // in the thread's deallocation ring buffer. - Printf("hwasan_dev_note_heap_rb_distance: %zd %zd\n", D, - flags()->heap_history_size); - - t->Announce(); - num_descriptions_printed++; - } - - // Very basic check for stack memory. - if (t->AddrIsInStack(untagged_addr)) { - Printf("%s", d.Location()); - Printf("Address %p is located in stack of thread T%zd\n", untagged_addr, - t->unique_id()); - Printf("%s", d.Default()); - t->Announce(); - - // Temporary report section, needs to be improved. - Printf("Previously allocated frames:\n"); - auto *sa = (t == GetCurrentThread() && current_stack_allocations) - ? current_stack_allocations - : t->stack_allocations(); - uptr frames = Min((uptr)flags()->stack_history_size, sa->size()); - InternalScopedString frame_desc(GetPageSizeCached() * 2); - for (uptr i = 0; i < frames; i++) { - uptr record = (*sa)[i]; - if (!record) - break; - uptr sp = (record >> 48) << 4; - uptr pc_mask = (1ULL << 48) - 1; - uptr pc = record & pc_mask; - if (SymbolizedStack *frame = Symbolizer::GetOrInit()->SymbolizePC(pc)) { - frame_desc.append(" sp: 0x%zx pc: %p ", sp, pc); - RenderFrame(&frame_desc, "in %f %s:%l\n", 0, frame->info, - common_flags()->symbolize_vs_style, - common_flags()->strip_path_prefix); - frame->ClearAll(); - if (auto Descr = GetStackFrameDescr(pc)) - frame_desc.append(" %s\n", Descr); - } - Printf("%s", frame_desc.data()); - frame_desc.clear(); - } - - num_descriptions_printed++; - } - }); - - // Print the remaining threads, as an extra information, 1 line per thread. - hwasanThreadList().VisitAllLiveThreads([&](Thread *t) { t->Announce(); }); - - if (!num_descriptions_printed) - // We exhausted our possibilities. Bail out. - Printf("HWAddressSanitizer can not describe address in more detail.\n"); -} - -void ReportStats() {} - -static void PrintTagsAroundAddr(tag_t *tag_ptr) { - Printf( - "Memory tags around the buggy address (one tag corresponds to %zd " - "bytes):\n", kShadowAlignment); - - const uptr row_len = 16; // better be power of two. - const uptr num_rows = 17; - tag_t *center_row_beg = reinterpret_cast( - RoundDownTo(reinterpret_cast(tag_ptr), row_len)); - tag_t *beg_row = center_row_beg - row_len * (num_rows / 2); - tag_t *end_row = center_row_beg + row_len * (num_rows / 2); - InternalScopedString s(GetPageSizeCached() * 8); - for (tag_t *row = beg_row; row < end_row; row += row_len) { - s.append("%s", row == center_row_beg ? "=>" : " "); - for (uptr i = 0; i < row_len; i++) { - s.append("%s", row + i == tag_ptr ? "[" : " "); - s.append("%02x", row[i]); - s.append("%s", row + i == tag_ptr ? "]" : " "); - } - s.append("%s\n", row == center_row_beg ? "<=" : " "); - } - Printf("%s", s.data()); -} - -void ReportInvalidFree(StackTrace *stack, uptr tagged_addr) { - ScopedReport R(flags()->halt_on_error); - - uptr untagged_addr = UntagAddr(tagged_addr); - tag_t ptr_tag = GetTagFromPointer(tagged_addr); - tag_t *tag_ptr = reinterpret_cast(MemToShadow(untagged_addr)); - tag_t mem_tag = *tag_ptr; - Decorator d; - Printf("%s", d.Error()); - uptr pc = stack->size ? stack->trace[0] : 0; - const char *bug_type = "invalid-free"; - Report("ERROR: %s: %s on address %p at pc %p\n", SanitizerToolName, bug_type, - untagged_addr, pc); - Printf("%s", d.Access()); - Printf("tags: %02x/%02x (ptr/mem)\n", ptr_tag, mem_tag); - Printf("%s", d.Default()); - - stack->Print(); - - PrintAddressDescription(tagged_addr, 0, nullptr); - - PrintTagsAroundAddr(tag_ptr); - - ReportErrorSummary(bug_type, stack); -} - -void ReportTailOverwritten(StackTrace *stack, uptr tagged_addr, uptr orig_size, - uptr tail_size, const u8 *expected) { - ScopedReport R(flags()->halt_on_error); - Decorator d; - uptr untagged_addr = UntagAddr(tagged_addr); - Printf("%s", d.Error()); - const char *bug_type = "alocation-tail-overwritten"; - Report("ERROR: %s: %s; heap object [%p,%p) of size %zd\n", SanitizerToolName, - bug_type, untagged_addr, untagged_addr + orig_size, orig_size); - Printf("\n%s", d.Default()); - stack->Print(); - HwasanChunkView chunk = FindHeapChunkByAddress(untagged_addr); - if (chunk.Beg()) { - Printf("%s", d.Allocation()); - Printf("allocated here:\n"); - Printf("%s", d.Default()); - GetStackTraceFromId(chunk.GetAllocStackId()).Print(); - } - - InternalScopedString s(GetPageSizeCached() * 8); - CHECK_GT(tail_size, 0U); - CHECK_LT(tail_size, kShadowAlignment); - u8 *tail = reinterpret_cast(untagged_addr + orig_size); - s.append("Tail contains: "); - for (uptr i = 0; i < kShadowAlignment - tail_size; i++) - s.append(".. "); - for (uptr i = 0; i < tail_size; i++) - s.append("%02x ", tail[i]); - s.append("\n"); - s.append("Expected: "); - for (uptr i = 0; i < kShadowAlignment - tail_size; i++) - s.append(".. "); - for (uptr i = 0; i < tail_size; i++) - s.append("%02x ", expected[i]); - s.append("\n"); - s.append(" "); - for (uptr i = 0; i < kShadowAlignment - tail_size; i++) - s.append(" "); - for (uptr i = 0; i < tail_size; i++) - s.append("%s ", expected[i] != tail[i] ? "^^" : " "); - - s.append("\nThis error occurs when a buffer overflow overwrites memory\n" - "to the right of a heap object, but within the %zd-byte granule, e.g.\n" - " char *x = new char[20];\n" - " x[25] = 42;\n" - "By default %s does not detect such bugs at the time of write,\n" - "but can detect them at the time of free/delete.\n" - "To disable this feature set HWASAN_OPTIONS=free_checks_tail_magic=0;\n" - "To enable checking at the time of access, set " - "HWASAN_OPTIONS=malloc_align_right to non-zero\n\n", - kShadowAlignment, SanitizerToolName); - Printf("%s", s.data()); - GetCurrentThread()->Announce(); - - tag_t *tag_ptr = reinterpret_cast(MemToShadow(untagged_addr)); - PrintTagsAroundAddr(tag_ptr); - - ReportErrorSummary(bug_type, stack); -} - -void ReportTagMismatch(StackTrace *stack, uptr tagged_addr, uptr access_size, - bool is_store, bool fatal) { - ScopedReport R(fatal); - SavedStackAllocations current_stack_allocations( - GetCurrentThread()->stack_allocations()); - - Decorator d; - Printf("%s", d.Error()); - uptr untagged_addr = UntagAddr(tagged_addr); - // TODO: when possible, try to print heap-use-after-free, etc. - const char *bug_type = "tag-mismatch"; - uptr pc = stack->size ? stack->trace[0] : 0; - Report("ERROR: %s: %s on address %p at pc %p\n", SanitizerToolName, bug_type, - untagged_addr, pc); - - Thread *t = GetCurrentThread(); - - sptr offset = - __hwasan_test_shadow(reinterpret_cast(tagged_addr), access_size); - CHECK(offset >= 0 && offset < static_cast(access_size)); - tag_t ptr_tag = GetTagFromPointer(tagged_addr); - tag_t *tag_ptr = - reinterpret_cast(MemToShadow(untagged_addr + offset)); - tag_t mem_tag = *tag_ptr; - - Printf("%s", d.Access()); - Printf("%s of size %zu at %p tags: %02x/%02x (ptr/mem) in thread T%zd\n", - is_store ? "WRITE" : "READ", access_size, untagged_addr, ptr_tag, - mem_tag, t->unique_id()); - if (offset != 0) - Printf("Invalid access starting at offset [%zu, %zu)\n", offset, - Min(access_size, static_cast(offset) + (1 << kShadowScale))); - Printf("%s", d.Default()); - - stack->Print(); - - PrintAddressDescription(tagged_addr, access_size, - current_stack_allocations.get()); - t->Announce(); - - PrintTagsAroundAddr(tag_ptr); - - ReportErrorSummary(bug_type, stack); -} - -} // namespace __hwasan diff --git a/compiler-rt/lib/hwasan/hwasan_report.cpp b/compiler-rt/lib/hwasan/hwasan_report.cpp new file mode 100644 index 0000000000000..b1002c546f87a --- /dev/null +++ b/compiler-rt/lib/hwasan/hwasan_report.cpp @@ -0,0 +1,436 @@ +//===-- hwasan_report.cpp -------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// +// This file is a part of HWAddressSanitizer. +// +// Error reporting. +//===----------------------------------------------------------------------===// + +#include "hwasan.h" +#include "hwasan_allocator.h" +#include "hwasan_mapping.h" +#include "hwasan_thread.h" +#include "hwasan_thread_list.h" +#include "sanitizer_common/sanitizer_allocator_internal.h" +#include "sanitizer_common/sanitizer_common.h" +#include "sanitizer_common/sanitizer_flags.h" +#include "sanitizer_common/sanitizer_mutex.h" +#include "sanitizer_common/sanitizer_report_decorator.h" +#include "sanitizer_common/sanitizer_stackdepot.h" +#include "sanitizer_common/sanitizer_stacktrace_printer.h" +#include "sanitizer_common/sanitizer_symbolizer.h" + +using namespace __sanitizer; + +namespace __hwasan { + +class ScopedReport { + public: + ScopedReport(bool fatal = false) : error_message_(1), fatal(fatal) { + BlockingMutexLock lock(&error_message_lock_); + error_message_ptr_ = fatal ? &error_message_ : nullptr; + ++hwasan_report_count; + } + + ~ScopedReport() { + { + BlockingMutexLock lock(&error_message_lock_); + if (fatal) + SetAbortMessage(error_message_.data()); + error_message_ptr_ = nullptr; + } + if (common_flags()->print_module_map >= 2 || + (fatal && common_flags()->print_module_map)) + DumpProcessMap(); + if (fatal) + Die(); + } + + static void MaybeAppendToErrorMessage(const char *msg) { + BlockingMutexLock lock(&error_message_lock_); + if (!error_message_ptr_) + return; + uptr len = internal_strlen(msg); + uptr old_size = error_message_ptr_->size(); + error_message_ptr_->resize(old_size + len); + // overwrite old trailing '\0', keep new trailing '\0' untouched. + internal_memcpy(&(*error_message_ptr_)[old_size - 1], msg, len); + } + private: + ScopedErrorReportLock error_report_lock_; + InternalMmapVector error_message_; + bool fatal; + + static InternalMmapVector *error_message_ptr_; + static BlockingMutex error_message_lock_; +}; + +InternalMmapVector *ScopedReport::error_message_ptr_; +BlockingMutex ScopedReport::error_message_lock_; + +// If there is an active ScopedReport, append to its error message. +void AppendToErrorMessageBuffer(const char *buffer) { + ScopedReport::MaybeAppendToErrorMessage(buffer); +} + +static StackTrace GetStackTraceFromId(u32 id) { + CHECK(id); + StackTrace res = StackDepotGet(id); + CHECK(res.trace); + return res; +} + +// A RAII object that holds a copy of the current thread stack ring buffer. +// The actual stack buffer may change while we are iterating over it (for +// example, Printf may call syslog() which can itself be built with hwasan). +class SavedStackAllocations { + public: + SavedStackAllocations(StackAllocationsRingBuffer *rb) { + uptr size = rb->size() * sizeof(uptr); + void *storage = + MmapAlignedOrDieOnFatalError(size, size * 2, "saved stack allocations"); + new (&rb_) StackAllocationsRingBuffer(*rb, storage); + } + + ~SavedStackAllocations() { + StackAllocationsRingBuffer *rb = get(); + UnmapOrDie(rb->StartOfStorage(), rb->size() * sizeof(uptr)); + } + + StackAllocationsRingBuffer *get() { + return (StackAllocationsRingBuffer *)&rb_; + } + + private: + uptr rb_; +}; + +class Decorator: public __sanitizer::SanitizerCommonDecorator { + public: + Decorator() : SanitizerCommonDecorator() { } + const char *Access() { return Blue(); } + const char *Allocation() const { return Magenta(); } + const char *Origin() const { return Magenta(); } + const char *Name() const { return Green(); } + const char *Location() { return Green(); } + const char *Thread() { return Green(); } +}; + +// Returns the index of the rb element that matches tagged_addr (plus one), +// or zero if found nothing. +uptr FindHeapAllocation(HeapAllocationsRingBuffer *rb, + uptr tagged_addr, + HeapAllocationRecord *har) { + if (!rb) return 0; + for (uptr i = 0, size = rb->size(); i < size; i++) { + auto h = (*rb)[i]; + if (h.tagged_addr <= tagged_addr && + h.tagged_addr + h.requested_size > tagged_addr) { + *har = h; + return i + 1; + } + } + return 0; +} + +void PrintAddressDescription( + uptr tagged_addr, uptr access_size, + StackAllocationsRingBuffer *current_stack_allocations) { + Decorator d; + int num_descriptions_printed = 0; + uptr untagged_addr = UntagAddr(tagged_addr); + + // Print some very basic information about the address, if it's a heap. + HwasanChunkView chunk = FindHeapChunkByAddress(untagged_addr); + if (uptr beg = chunk.Beg()) { + uptr size = chunk.ActualSize(); + Printf("%s[%p,%p) is a %s %s heap chunk; " + "size: %zd offset: %zd\n%s", + d.Location(), + beg, beg + size, + chunk.FromSmallHeap() ? "small" : "large", + chunk.IsAllocated() ? "allocated" : "unallocated", + size, untagged_addr - beg, + d.Default()); + } + + // Check if this looks like a heap buffer overflow by scanning + // the shadow left and right and looking for the first adjacent + // object with a different memory tag. If that tag matches addr_tag, + // check the allocator if it has a live chunk there. + tag_t addr_tag = GetTagFromPointer(tagged_addr); + tag_t *tag_ptr = reinterpret_cast(MemToShadow(untagged_addr)); + if (*tag_ptr != addr_tag) { // should be true usually. + tag_t *left = tag_ptr, *right = tag_ptr; + // scan left. + for (int i = 0; i < 1000 && *left == *tag_ptr; i++, left--){} + // scan right. + for (int i = 0; i < 1000 && *right == *tag_ptr; i++, right++){} + // Chose the object that has addr_tag and that is closer to addr. + tag_t *candidate = nullptr; + if (*right == addr_tag && *left == addr_tag) + candidate = right - tag_ptr < tag_ptr - left ? right : left; + else if (*right == addr_tag) + candidate = right; + else if (*left == addr_tag) + candidate = left; + + if (candidate) { + uptr mem = ShadowToMem(reinterpret_cast(candidate)); + HwasanChunkView chunk = FindHeapChunkByAddress(mem); + if (chunk.IsAllocated()) { + Printf("%s", d.Location()); + Printf( + "%p is located %zd bytes to the %s of %zd-byte region [%p,%p)\n", + untagged_addr, + candidate == left ? untagged_addr - chunk.End() + : chunk.Beg() - untagged_addr, + candidate == right ? "left" : "right", chunk.UsedSize(), + chunk.Beg(), chunk.End()); + Printf("%s", d.Allocation()); + Printf("allocated here:\n"); + Printf("%s", d.Default()); + GetStackTraceFromId(chunk.GetAllocStackId()).Print(); + num_descriptions_printed++; + } + } + } + + hwasanThreadList().VisitAllLiveThreads([&](Thread *t) { + // Scan all threads' ring buffers to find if it's a heap-use-after-free. + HeapAllocationRecord har; + if (uptr D = FindHeapAllocation(t->heap_allocations(), tagged_addr, &har)) { + Printf("%s", d.Location()); + Printf("%p is located %zd bytes inside of %zd-byte region [%p,%p)\n", + untagged_addr, untagged_addr - UntagAddr(har.tagged_addr), + har.requested_size, UntagAddr(har.tagged_addr), + UntagAddr(har.tagged_addr) + har.requested_size); + Printf("%s", d.Allocation()); + Printf("freed by thread T%zd here:\n", t->unique_id()); + Printf("%s", d.Default()); + GetStackTraceFromId(har.free_context_id).Print(); + + Printf("%s", d.Allocation()); + Printf("previously allocated here:\n", t); + Printf("%s", d.Default()); + GetStackTraceFromId(har.alloc_context_id).Print(); + + // Print a developer note: the index of this heap object + // in the thread's deallocation ring buffer. + Printf("hwasan_dev_note_heap_rb_distance: %zd %zd\n", D, + flags()->heap_history_size); + + t->Announce(); + num_descriptions_printed++; + } + + // Very basic check for stack memory. + if (t->AddrIsInStack(untagged_addr)) { + Printf("%s", d.Location()); + Printf("Address %p is located in stack of thread T%zd\n", untagged_addr, + t->unique_id()); + Printf("%s", d.Default()); + t->Announce(); + + // Temporary report section, needs to be improved. + Printf("Previously allocated frames:\n"); + auto *sa = (t == GetCurrentThread() && current_stack_allocations) + ? current_stack_allocations + : t->stack_allocations(); + uptr frames = Min((uptr)flags()->stack_history_size, sa->size()); + InternalScopedString frame_desc(GetPageSizeCached() * 2); + for (uptr i = 0; i < frames; i++) { + uptr record = (*sa)[i]; + if (!record) + break; + uptr sp = (record >> 48) << 4; + uptr pc_mask = (1ULL << 48) - 1; + uptr pc = record & pc_mask; + if (SymbolizedStack *frame = Symbolizer::GetOrInit()->SymbolizePC(pc)) { + frame_desc.append(" sp: 0x%zx ", sp); + RenderFrame(&frame_desc, "#%n %p %F %L\n", 0, frame->info, + common_flags()->symbolize_vs_style, + common_flags()->strip_path_prefix); + frame->ClearAll(); + if (auto Descr = GetStackFrameDescr(pc)) + frame_desc.append(" %s\n", Descr); + } + Printf("%s", frame_desc.data()); + frame_desc.clear(); + } + + num_descriptions_printed++; + } + }); + + // Print the remaining threads, as an extra information, 1 line per thread. + hwasanThreadList().VisitAllLiveThreads([&](Thread *t) { t->Announce(); }); + + if (!num_descriptions_printed) + // We exhausted our possibilities. Bail out. + Printf("HWAddressSanitizer can not describe address in more detail.\n"); +} + +void ReportStats() {} + +static void PrintTagsAroundAddr(tag_t *tag_ptr) { + Printf( + "Memory tags around the buggy address (one tag corresponds to %zd " + "bytes):\n", kShadowAlignment); + + const uptr row_len = 16; // better be power of two. + const uptr num_rows = 17; + tag_t *center_row_beg = reinterpret_cast( + RoundDownTo(reinterpret_cast(tag_ptr), row_len)); + tag_t *beg_row = center_row_beg - row_len * (num_rows / 2); + tag_t *end_row = center_row_beg + row_len * (num_rows / 2); + InternalScopedString s(GetPageSizeCached() * 8); + for (tag_t *row = beg_row; row < end_row; row += row_len) { + s.append("%s", row == center_row_beg ? "=>" : " "); + for (uptr i = 0; i < row_len; i++) { + s.append("%s", row + i == tag_ptr ? "[" : " "); + s.append("%02x", row[i]); + s.append("%s", row + i == tag_ptr ? "]" : " "); + } + s.append("%s\n", row == center_row_beg ? "<=" : " "); + } + Printf("%s", s.data()); +} + +void ReportInvalidFree(StackTrace *stack, uptr tagged_addr) { + ScopedReport R(flags()->halt_on_error); + + uptr untagged_addr = UntagAddr(tagged_addr); + tag_t ptr_tag = GetTagFromPointer(tagged_addr); + tag_t *tag_ptr = reinterpret_cast(MemToShadow(untagged_addr)); + tag_t mem_tag = *tag_ptr; + Decorator d; + Printf("%s", d.Error()); + uptr pc = stack->size ? stack->trace[0] : 0; + const char *bug_type = "invalid-free"; + Report("ERROR: %s: %s on address %p at pc %p\n", SanitizerToolName, bug_type, + untagged_addr, pc); + Printf("%s", d.Access()); + Printf("tags: %02x/%02x (ptr/mem)\n", ptr_tag, mem_tag); + Printf("%s", d.Default()); + + stack->Print(); + + PrintAddressDescription(tagged_addr, 0, nullptr); + + PrintTagsAroundAddr(tag_ptr); + + ReportErrorSummary(bug_type, stack); +} + +void ReportTailOverwritten(StackTrace *stack, uptr tagged_addr, uptr orig_size, + uptr tail_size, const u8 *expected) { + ScopedReport R(flags()->halt_on_error); + Decorator d; + uptr untagged_addr = UntagAddr(tagged_addr); + Printf("%s", d.Error()); + const char *bug_type = "alocation-tail-overwritten"; + Report("ERROR: %s: %s; heap object [%p,%p) of size %zd\n", SanitizerToolName, + bug_type, untagged_addr, untagged_addr + orig_size, orig_size); + Printf("\n%s", d.Default()); + stack->Print(); + HwasanChunkView chunk = FindHeapChunkByAddress(untagged_addr); + if (chunk.Beg()) { + Printf("%s", d.Allocation()); + Printf("allocated here:\n"); + Printf("%s", d.Default()); + GetStackTraceFromId(chunk.GetAllocStackId()).Print(); + } + + InternalScopedString s(GetPageSizeCached() * 8); + CHECK_GT(tail_size, 0U); + CHECK_LT(tail_size, kShadowAlignment); + u8 *tail = reinterpret_cast(untagged_addr + orig_size); + s.append("Tail contains: "); + for (uptr i = 0; i < kShadowAlignment - tail_size; i++) + s.append(".. "); + for (uptr i = 0; i < tail_size; i++) + s.append("%02x ", tail[i]); + s.append("\n"); + s.append("Expected: "); + for (uptr i = 0; i < kShadowAlignment - tail_size; i++) + s.append(".. "); + for (uptr i = 0; i < tail_size; i++) + s.append("%02x ", expected[i]); + s.append("\n"); + s.append(" "); + for (uptr i = 0; i < kShadowAlignment - tail_size; i++) + s.append(" "); + for (uptr i = 0; i < tail_size; i++) + s.append("%s ", expected[i] != tail[i] ? "^^" : " "); + + s.append("\nThis error occurs when a buffer overflow overwrites memory\n" + "to the right of a heap object, but within the %zd-byte granule, e.g.\n" + " char *x = new char[20];\n" + " x[25] = 42;\n" + "By default %s does not detect such bugs at the time of write,\n" + "but can detect them at the time of free/delete.\n" + "To disable this feature set HWASAN_OPTIONS=free_checks_tail_magic=0;\n" + "To enable checking at the time of access, set " + "HWASAN_OPTIONS=malloc_align_right to non-zero\n\n", + kShadowAlignment, SanitizerToolName); + Printf("%s", s.data()); + GetCurrentThread()->Announce(); + + tag_t *tag_ptr = reinterpret_cast(MemToShadow(untagged_addr)); + PrintTagsAroundAddr(tag_ptr); + + ReportErrorSummary(bug_type, stack); +} + +void ReportTagMismatch(StackTrace *stack, uptr tagged_addr, uptr access_size, + bool is_store, bool fatal) { + ScopedReport R(fatal); + SavedStackAllocations current_stack_allocations( + GetCurrentThread()->stack_allocations()); + + Decorator d; + Printf("%s", d.Error()); + uptr untagged_addr = UntagAddr(tagged_addr); + // TODO: when possible, try to print heap-use-after-free, etc. + const char *bug_type = "tag-mismatch"; + uptr pc = stack->size ? stack->trace[0] : 0; + Report("ERROR: %s: %s on address %p at pc %p\n", SanitizerToolName, bug_type, + untagged_addr, pc); + + Thread *t = GetCurrentThread(); + + sptr offset = + __hwasan_test_shadow(reinterpret_cast(tagged_addr), access_size); + CHECK(offset >= 0 && offset < static_cast(access_size)); + tag_t ptr_tag = GetTagFromPointer(tagged_addr); + tag_t *tag_ptr = + reinterpret_cast(MemToShadow(untagged_addr + offset)); + tag_t mem_tag = *tag_ptr; + + Printf("%s", d.Access()); + Printf("%s of size %zu at %p tags: %02x/%02x (ptr/mem) in thread T%zd\n", + is_store ? "WRITE" : "READ", access_size, untagged_addr, ptr_tag, + mem_tag, t->unique_id()); + if (offset != 0) + Printf("Invalid access starting at offset [%zu, %zu)\n", offset, + Min(access_size, static_cast(offset) + (1 << kShadowScale))); + Printf("%s", d.Default()); + + stack->Print(); + + PrintAddressDescription(tagged_addr, access_size, + current_stack_allocations.get()); + t->Announce(); + + PrintTagsAroundAddr(tag_ptr); + + ReportErrorSummary(bug_type, stack); +} + +} // namespace __hwasan diff --git a/compiler-rt/lib/hwasan/hwasan_thread.cc b/compiler-rt/lib/hwasan/hwasan_thread.cpp similarity index 100% rename from compiler-rt/lib/hwasan/hwasan_thread.cc rename to compiler-rt/lib/hwasan/hwasan_thread.cpp diff --git a/compiler-rt/lib/hwasan/hwasan_thread.h b/compiler-rt/lib/hwasan/hwasan_thread.h index 9c45adec1b128..6fa592bfac6ba 100644 --- a/compiler-rt/lib/hwasan/hwasan_thread.h +++ b/compiler-rt/lib/hwasan/hwasan_thread.h @@ -67,11 +67,14 @@ class Thread { Print("Thread: "); } + uptr &vfork_spill() { return vfork_spill_; } + private: // NOTE: There is no Thread constructor. It is allocated // via mmap() and *must* be valid in zero-initialized state. void ClearShadowForThreadStackAndTLS(); void Print(const char *prefix); + uptr vfork_spill_; uptr stack_top_; uptr stack_bottom_; uptr tls_begin_; diff --git a/compiler-rt/lib/hwasan/hwasan_thread_list.cc b/compiler-rt/lib/hwasan/hwasan_thread_list.cpp similarity index 100% rename from compiler-rt/lib/hwasan/hwasan_thread_list.cc rename to compiler-rt/lib/hwasan/hwasan_thread_list.cpp diff --git a/compiler-rt/lib/interception/interception.h b/compiler-rt/lib/interception/interception.h index 804801536c627..dacfa5ede28df 100644 --- a/compiler-rt/lib/interception/interception.h +++ b/compiler-rt/lib/interception/interception.h @@ -185,11 +185,17 @@ const interpose_substitution substitution_##func_name[] \ #endif // SANITIZER_MAC #if !SANITIZER_FUCHSIA && !SANITIZER_RTEMS -#define DECLARE_REAL_AND_INTERCEPTOR(ret_type, func, ...) \ +# define DECLARE_REAL_AND_INTERCEPTOR(ret_type, func, ...) \ DECLARE_REAL(ret_type, func, __VA_ARGS__) \ extern "C" ret_type WRAP(func)(__VA_ARGS__); +// Declare an interceptor and its wrapper defined in a different translation +// unit (ex. asm). +# define DECLARE_EXTERN_INTERCEPTOR_AND_WRAPPER(ret_type, func, ...) \ + extern "C" ret_type WRAP(func)(__VA_ARGS__); \ + extern "C" ret_type func(__VA_ARGS__); #else -#define DECLARE_REAL_AND_INTERCEPTOR(ret_type, func, ...) +# define DECLARE_REAL_AND_INTERCEPTOR(ret_type, func, ...) +# define DECLARE_EXTERN_INTERCEPTOR_AND_WRAPPER(ret_type, func, ...) #endif // Generally, you don't need to use DEFINE_REAL by itself, as INTERCEPTOR diff --git a/compiler-rt/lib/interception/interception_win.cc b/compiler-rt/lib/interception/interception_win.cc index dbefc34d360e2..ea38ea88c5b75 100644 --- a/compiler-rt/lib/interception/interception_win.cc +++ b/compiler-rt/lib/interception/interception_win.cc @@ -523,6 +523,7 @@ static size_t GetInstructionSize(uptr address, size_t* rel_offset = nullptr) { case 0xd18b48: // 48 8b d1 : mov rdx, rcx case 0xdc8b4c: // 4c 8b dc : mov r11, rsp case 0xd18b4c: // 4c 8b d1 : mov r10, rcx + case 0xE0E483: // 83 E4 E0 : and esp, 0xFFFFFFE0 return 3; case 0xec8348: // 48 83 ec XX : sub rsp, XX @@ -554,6 +555,9 @@ static size_t GetInstructionSize(uptr address, size_t* rel_offset = nullptr) { case 0x245c8948: // 48 89 5c 24 XX : mov QWORD PTR [rsp + XX], rbx case 0x24748948: // 48 89 74 24 XX : mov QWORD PTR [rsp + XX], rsi case 0x244C8948: // 48 89 4C 24 XX : mov QWORD PTR [rsp + XX], rcx + case 0x24548948: // 48 89 54 24 XX : mov QWORD PTR [rsp + XX], rdx + case 0x244c894c: // 4c 89 4c 24 XX : mov QWORD PTR [rsp + XX], r9 + case 0x2444894c: // 4c 89 44 24 XX : mov QWORD PTR [rsp + XX], r8 return 5; case 0x24648348: // 48 83 64 24 XX : and QWORD PTR [rsp + XX], YY return 6; diff --git a/compiler-rt/lib/interception/tests/interception_win_test.cc b/compiler-rt/lib/interception/tests/interception_win_test.cc index a88ff33236784..c3affc45bb792 100644 --- a/compiler-rt/lib/interception/tests/interception_win_test.cc +++ b/compiler-rt/lib/interception/tests/interception_win_test.cc @@ -208,6 +208,24 @@ const u8 kUnpatchableCode6[] = { 0x90, 0x90, 0x90, 0x90, }; +const u8 kPatchableCode6[] = { + 0x48, 0x89, 0x54, 0x24, 0xBB, // mov QWORD PTR [rsp + 0xBB], rdx + 0x33, 0xC9, // xor ecx,ecx + 0xC3, // ret +}; + +const u8 kPatchableCode7[] = { + 0x4c, 0x89, 0x4c, 0x24, 0xBB, // mov QWORD PTR [rsp + 0xBB], r9 + 0x33, 0xC9, // xor ecx,ecx + 0xC3, // ret +}; + +const u8 kPatchableCode8[] = { + 0x4c, 0x89, 0x44, 0x24, 0xBB, // mov QWORD PTR [rsp + 0xBB], r8 + 0x33, 0xC9, // xor ecx,ecx + 0xC3, // ret +}; + // A buffer holding the dynamically generated code under test. u8* ActiveCode; const size_t ActiveCodeLength = 4096; @@ -507,7 +525,6 @@ TEST(Interception, PatchableFunction) { #endif EXPECT_TRUE(TestFunctionPatching(kPatchableCode4, override)); EXPECT_TRUE(TestFunctionPatching(kPatchableCode5, override)); - #if SANITIZER_WINDOWS64 EXPECT_TRUE(TestFunctionPatching(kLoadGlobalCode, override)); #endif @@ -572,7 +589,11 @@ TEST(Interception, PatchableFunctionWithHotPatch) { EXPECT_FALSE(TestFunctionPatching(kPatchableCode2, override, prefix)); EXPECT_FALSE(TestFunctionPatching(kPatchableCode3, override, prefix)); EXPECT_FALSE(TestFunctionPatching(kPatchableCode4, override, prefix)); - +#if SANITIZER_WINDOWS64 + EXPECT_TRUE(TestFunctionPatching(kPatchableCode6, override, prefix)); + EXPECT_TRUE(TestFunctionPatching(kPatchableCode7, override, prefix)); + EXPECT_TRUE(TestFunctionPatching(kPatchableCode8, override, prefix)); +#endif EXPECT_FALSE(TestFunctionPatching(kUnpatchableCode1, override, prefix)); EXPECT_TRUE(TestFunctionPatching(kUnpatchableCode2, override, prefix)); EXPECT_FALSE(TestFunctionPatching(kUnpatchableCode3, override, prefix)); diff --git a/compiler-rt/lib/lsan/lsan.cc b/compiler-rt/lib/lsan/lsan.cc index 5412b9ac05a64..1074affccc006 100644 --- a/compiler-rt/lib/lsan/lsan.cc +++ b/compiler-rt/lib/lsan/lsan.cc @@ -32,6 +32,24 @@ bool WordIsPoisoned(uptr addr) { } // namespace __lsan +void __sanitizer::BufferedStackTrace::UnwindImpl( + uptr pc, uptr bp, void *context, bool request_fast, u32 max_depth) { + using namespace __lsan; + uptr stack_top = 0, stack_bottom = 0; + ThreadContext *t; + if (StackTrace::WillUseFastUnwind(request_fast) && + (t = CurrentThreadContext())) { + stack_top = t->stack_end(); + stack_bottom = t->stack_begin(); + } + if (!SANITIZER_MIPS || IsValidFrame(bp, stack_top, stack_bottom)) { + if (StackTrace::WillUseFastUnwind(request_fast)) + Unwind(max_depth, pc, bp, nullptr, stack_top, stack_bottom, true); + else + Unwind(max_depth, pc, 0, context, 0, 0, false); + } +} + using namespace __lsan; // NOLINT static void InitializeFlags() { @@ -71,7 +89,7 @@ static void InitializeFlags() { static void OnStackUnwind(const SignalContext &sig, const void *, BufferedStackTrace *stack) { - GetStackTrace(stack, kStackTraceMax, sig.pc, sig.bp, sig.context, + stack->Unwind(sig.pc, sig.bp, sig.context, common_flags()->fast_unwind_on_fatal); } diff --git a/compiler-rt/lib/lsan/lsan.h b/compiler-rt/lib/lsan/lsan.h index 451d0c25c8fc6..9904ada4bb3bd 100644 --- a/compiler-rt/lib/lsan/lsan.h +++ b/compiler-rt/lib/lsan/lsan.h @@ -17,8 +17,8 @@ #define GET_STACK_TRACE(max_size, fast) \ __sanitizer::BufferedStackTrace stack; \ - GetStackTrace(&stack, max_size, StackTrace::GetCurrentPc(), \ - GET_CURRENT_FRAME(), nullptr, fast); + stack.Unwind(StackTrace::GetCurrentPc(), \ + GET_CURRENT_FRAME(), nullptr, fast, max_size); #define GET_STACK_TRACE_FATAL \ GET_STACK_TRACE(kStackTraceMax, common_flags()->fast_unwind_on_fatal) @@ -40,24 +40,6 @@ void ReplaceSystemMalloc(); __lsan_init(); \ } while (0) -// Get the stack trace with the given pc and bp. -// The pc will be in the position 0 of the resulting stack trace. -// The bp may refer to the current frame or to the caller's frame. -ALWAYS_INLINE -void GetStackTrace(__sanitizer::BufferedStackTrace *stack, - __sanitizer::uptr max_depth, __sanitizer::uptr pc, - __sanitizer::uptr bp, void *context, bool fast) { - uptr stack_top = 0, stack_bottom = 0; - ThreadContext *t; - if (fast && (t = CurrentThreadContext())) { - stack_top = t->stack_end(); - stack_bottom = t->stack_begin(); - } - if (!SANITIZER_MIPS || IsValidFrame(bp, stack_top, stack_bottom)) { - stack->Unwind(max_depth, pc, bp, context, stack_top, stack_bottom, fast); - } -} - } // namespace __lsan extern bool lsan_inited; diff --git a/compiler-rt/lib/lsan/lsan_thread.cc b/compiler-rt/lib/lsan/lsan_thread.cc index a0b7bb2ffcde4..77f6a9236dde5 100644 --- a/compiler-rt/lib/lsan/lsan_thread.cc +++ b/compiler-rt/lib/lsan/lsan_thread.cc @@ -76,7 +76,7 @@ u32 ThreadCreate(u32 parent_tid, uptr user_id, bool detached) { /* arg */ nullptr); } -void ThreadStart(u32 tid, tid_t os_id, bool workerthread) { +void ThreadStart(u32 tid, tid_t os_id, ThreadType thread_type) { OnStartedArgs args; uptr stack_size = 0; uptr tls_size = 0; @@ -86,7 +86,7 @@ void ThreadStart(u32 tid, tid_t os_id, bool workerthread) { args.tls_end = args.tls_begin + tls_size; GetAllocatorCacheRange(&args.cache_begin, &args.cache_end); args.dtls = DTLS_Get(); - thread_registry->StartThread(tid, os_id, workerthread, &args); + thread_registry->StartThread(tid, os_id, thread_type, &args); } void ThreadFinish() { diff --git a/compiler-rt/lib/lsan/lsan_thread.h b/compiler-rt/lib/lsan/lsan_thread.h index 92db62759feb1..b869d066d9d8b 100644 --- a/compiler-rt/lib/lsan/lsan_thread.h +++ b/compiler-rt/lib/lsan/lsan_thread.h @@ -44,7 +44,8 @@ class ThreadContext : public ThreadContextBase { void InitializeThreadRegistry(); -void ThreadStart(u32 tid, tid_t os_id, bool workerthread = false); +void ThreadStart(u32 tid, tid_t os_id, + ThreadType thread_type = ThreadType::Regular); void ThreadFinish(); u32 ThreadCreate(u32 tid, uptr uid, bool detached); void ThreadJoin(u32 tid); diff --git a/compiler-rt/lib/msan/msan.cc b/compiler-rt/lib/msan/msan.cc index 2c86795688347..c375afb779ee7 100644 --- a/compiler-rt/lib/msan/msan.cc +++ b/compiler-rt/lib/msan/msan.cc @@ -221,18 +221,6 @@ static void InitializeFlags() { if (f->store_context_size < 1) f->store_context_size = 1; } -void GetStackTrace(BufferedStackTrace *stack, uptr max_s, uptr pc, uptr bp, - void *context, bool request_fast_unwind) { - MsanThread *t = GetCurrentThread(); - if (!t || !StackTrace::WillUseFastUnwind(request_fast_unwind)) { - // Block reports from our interceptors during _Unwind_Backtrace. - SymbolizerScope sym_scope; - return stack->Unwind(max_s, pc, bp, context, 0, 0, request_fast_unwind); - } - stack->Unwind(max_s, pc, bp, context, t->stack_top(), t->stack_bottom(), - request_fast_unwind); -} - void PrintWarning(uptr pc, uptr bp) { PrintWarningWithOrigin(pc, bp, __msan_origin_tls); } @@ -313,6 +301,21 @@ u32 ChainOrigin(u32 id, StackTrace *stack) { } // namespace __msan +void __sanitizer::BufferedStackTrace::UnwindImpl( + uptr pc, uptr bp, void *context, bool request_fast, u32 max_depth) { + using namespace __msan; + MsanThread *t = GetCurrentThread(); + if (!t || !StackTrace::WillUseFastUnwind(request_fast)) { + // Block reports from our interceptors during _Unwind_Backtrace. + SymbolizerScope sym_scope; + return Unwind(max_depth, pc, bp, context, 0, 0, false); + } + if (StackTrace::WillUseFastUnwind(request_fast)) + Unwind(max_depth, pc, bp, nullptr, t->stack_top(), t->stack_bottom(), true); + else + Unwind(max_depth, pc, 0, context, 0, 0, false); +} + // Interface. using namespace __msan; @@ -377,7 +380,7 @@ void __msan_warning_noreturn() { static void OnStackUnwind(const SignalContext &sig, const void *, BufferedStackTrace *stack) { - GetStackTrace(stack, kStackTraceMax, sig.pc, sig.bp, sig.context, + stack->Unwind(sig.pc, sig.bp, sig.context, common_flags()->fast_unwind_on_fatal); } diff --git a/compiler-rt/lib/msan/msan.h b/compiler-rt/lib/msan/msan.h index 3a2769ec70929..211256833bde9 100644 --- a/compiler-rt/lib/msan/msan.h +++ b/compiler-rt/lib/msan/msan.h @@ -312,9 +312,6 @@ struct SymbolizerScope { void PrintWarning(uptr pc, uptr bp); void PrintWarningWithOrigin(uptr pc, uptr bp, u32 origin); -void GetStackTrace(BufferedStackTrace *stack, uptr max_s, uptr pc, uptr bp, - void *context, bool request_fast_unwind); - // Unpoison first n function arguments. void UnpoisonParam(uptr n); void UnpoisonThreadLocalState(); @@ -328,23 +325,21 @@ const int STACK_TRACE_TAG_POISON = StackTrace::TAG_CUSTOM + 1; #define GET_MALLOC_STACK_TRACE \ BufferedStackTrace stack; \ if (__msan_get_track_origins() && msan_inited) \ - GetStackTrace(&stack, common_flags()->malloc_context_size, \ - StackTrace::GetCurrentPc(), GET_CURRENT_FRAME(), nullptr, \ - common_flags()->fast_unwind_on_malloc) + stack.Unwind(StackTrace::GetCurrentPc(), GET_CURRENT_FRAME(), \ + nullptr, common_flags()->fast_unwind_on_malloc, \ + common_flags()->malloc_context_size) // For platforms which support slow unwinder only, we restrict the store context // size to 1, basically only storing the current pc. We do this because the slow // unwinder which is based on libunwind is not async signal safe and causes // random freezes in forking applications as well as in signal handlers. -#define GET_STORE_STACK_TRACE_PC_BP(pc, bp) \ - BufferedStackTrace stack; \ - if (__msan_get_track_origins() > 1 && msan_inited) { \ - if (!SANITIZER_CAN_FAST_UNWIND) \ - GetStackTrace(&stack, Min(1, flags()->store_context_size), pc, bp, \ - nullptr, false); \ - else \ - GetStackTrace(&stack, flags()->store_context_size, pc, bp, nullptr, \ - common_flags()->fast_unwind_on_malloc); \ +#define GET_STORE_STACK_TRACE_PC_BP(pc, bp) \ + BufferedStackTrace stack; \ + if (__msan_get_track_origins() > 1 && msan_inited) { \ + int size = flags()->store_context_size; \ + if (!SANITIZER_CAN_FAST_UNWIND) \ + size = Min(size, 1); \ + stack.Unwind(pc, bp, nullptr, common_flags()->fast_unwind_on_malloc, size);\ } #define GET_STORE_STACK_TRACE \ @@ -353,8 +348,7 @@ const int STACK_TRACE_TAG_POISON = StackTrace::TAG_CUSTOM + 1; #define GET_FATAL_STACK_TRACE_PC_BP(pc, bp) \ BufferedStackTrace stack; \ if (msan_inited) \ - GetStackTrace(&stack, kStackTraceMax, pc, bp, nullptr, \ - common_flags()->fast_unwind_on_fatal) + stack.Unwind(pc, bp, nullptr, common_flags()->fast_unwind_on_fatal) #define GET_FATAL_STACK_TRACE_HERE \ GET_FATAL_STACK_TRACE_PC_BP(StackTrace::GetCurrentPc(), GET_CURRENT_FRAME()) diff --git a/compiler-rt/lib/msan/msan_interceptors.cc b/compiler-rt/lib/msan/msan_interceptors.cc index ba0599e333b9f..58b9c39e35ca8 100644 --- a/compiler-rt/lib/msan/msan_interceptors.cc +++ b/compiler-rt/lib/msan/msan_interceptors.cc @@ -1118,8 +1118,12 @@ void MSanAtExitWrapper() { void MSanCxaAtExitWrapper(void *arg) { UnpoisonParam(1); MSanAtExitRecord *r = (MSanAtExitRecord *)arg; + // libc before 2.27 had race which caused occasional double handler execution + // https://sourceware.org/ml/libc-alpha/2017-08/msg01204.html + if (!r->func) + return; r->func(r->arg); - InternalFree(r); + r->func = nullptr; } static int setup_at_exit_wrapper(void(*f)(), void *arg, void *dso); diff --git a/compiler-rt/lib/msan/tests/CMakeLists.txt b/compiler-rt/lib/msan/tests/CMakeLists.txt index e9f4e34bfe617..ae3c1326969cf 100644 --- a/compiler-rt/lib/msan/tests/CMakeLists.txt +++ b/compiler-rt/lib/msan/tests/CMakeLists.txt @@ -48,10 +48,8 @@ set(MSAN_UNITTEST_INSTRUMENTED_CFLAGS ) set(MSAN_UNITTEST_LINK_FLAGS -fsanitize=memory - # Don't need -stdlib=libc++ because we explicitly list libc++.so in the linker + # Don't need -stdlib=libc++ because we explicitly list libc++.a in the linker # inputs. - # FIXME: we build libcxx without cxxabi and need libstdc++ to provide it. - -lstdc++ ) append_list_if(COMPILER_RT_HAS_LIBDL -ldl MSAN_UNITTEST_LINK_FLAGS) @@ -116,16 +114,16 @@ macro(add_msan_tests_for_arch arch kind cflags) endif() get_target_flags_for_arch(${arch} TARGET_LINK_FLAGS) add_compiler_rt_test(MsanUnitTests "Msan-${arch}${kind}-Test" ${arch} - OBJECTS ${MSAN_TEST_OBJECTS} ${MSAN_LIBCXX_SO} + OBJECTS ${MSAN_TEST_OBJECTS} "${MSAN_LIBCXX_DIR}/libc++.a" DEPS ${MSAN_TEST_DEPS} LINK_FLAGS ${MSAN_UNITTEST_LINK_FLAGS} - ${TARGET_LINK_FLAGS} - "-Wl,-rpath=${CMAKE_CURRENT_BINARY_DIR}" - "-Wl,-rpath=${LIBCXX_PREFIX}/lib") + ${TARGET_LINK_FLAGS}) endmacro() # We should only build MSan unit tests if we can build instrumented libcxx. -if(COMPILER_RT_CAN_EXECUTE_TESTS AND COMPILER_RT_LIBCXX_PATH) +if(COMPILER_RT_CAN_EXECUTE_TESTS AND + COMPILER_RT_LIBCXX_PATH AND + COMPILER_RT_LIBCXXABI_PATH) foreach(arch ${MSAN_SUPPORTED_ARCH}) get_target_flags_for_arch(${arch} TARGET_CFLAGS) set(LIBCXX_PREFIX ${CMAKE_CURRENT_BINARY_DIR}/../libcxx_msan_${arch}) @@ -133,7 +131,7 @@ if(COMPILER_RT_CAN_EXECUTE_TESTS AND COMPILER_RT_LIBCXX_PATH) DEPS ${MSAN_RUNTIME_LIBRARIES} CFLAGS ${MSAN_LIBCXX_CFLAGS} ${TARGET_CFLAGS} USE_TOOLCHAIN) - set(MSAN_LIBCXX_SO ${LIBCXX_PREFIX}/lib/libc++.so) + set(MSAN_LIBCXX_DIR ${LIBCXX_PREFIX}/lib/) add_msan_tests_for_arch(${arch} "" "") add_msan_tests_for_arch(${arch} "-with-call" diff --git a/compiler-rt/lib/msan/tests/msan_test.cc b/compiler-rt/lib/msan/tests/msan_test.cc index 4bac6f92a7244..1d14604b60024 100644 --- a/compiler-rt/lib/msan/tests/msan_test.cc +++ b/compiler-rt/lib/msan/tests/msan_test.cc @@ -169,7 +169,7 @@ static bool TrackingOrigins() { #define EXPECT_POISONED(x) ExpectPoisoned(x) -template +template void ExpectPoisoned(const T& t) { EXPECT_NE(-1, __msan_test_shadow((void*)&t, sizeof(t))); } @@ -2579,6 +2579,14 @@ TEST(MemorySanitizer, sigprocmask) { EXPECT_NOT_POISONED(s); } +TEST(MemorySanitizer, pthread_sigmask) { + sigset_t s; + EXPECT_POISONED(s); + int res = pthread_sigmask(SIG_BLOCK, 0, &s); + ASSERT_EQ(0, res); + EXPECT_NOT_POISONED(s); +} + struct StructWithDtor { ~StructWithDtor(); }; @@ -4636,3 +4644,149 @@ TEST(MemorySanitizer, MallocUsableSizeTest) { delete int_ptr; } #endif // SANITIZER_TEST_HAS_MALLOC_USABLE_SIZE + +static bool HaveBmi() { +#ifdef __x86_64__ + U4 a = 0, b = 0, c = 0, d = 0; + asm("cpuid\n\t" : "=a"(a), "=D"(b), "=c"(c), "=d"(d) : "a"(7)); + const U4 kBmi12Mask = (1U<<3) | (1U<<8); + return b | kBmi12Mask; +#else + return false; +#endif +} + +__attribute__((target("bmi,bmi2"))) +static void TestBZHI() { + EXPECT_NOT_POISONED( + __builtin_ia32_bzhi_si(Poisoned(0xABCDABCD, 0xFF000000), 24)); + EXPECT_POISONED( + __builtin_ia32_bzhi_si(Poisoned(0xABCDABCD, 0xFF800000), 24)); + // Second operand saturates. + EXPECT_POISONED( + __builtin_ia32_bzhi_si(Poisoned(0xABCDABCD, 0x80000000), 240)); + // Any poison in the second operand poisons output. + EXPECT_POISONED( + __builtin_ia32_bzhi_si(0xABCDABCD, Poisoned(1, 1))); + EXPECT_POISONED( + __builtin_ia32_bzhi_si(0xABCDABCD, Poisoned(1, 0x80000000))); + EXPECT_POISONED( + __builtin_ia32_bzhi_si(0xABCDABCD, Poisoned(1, 0xFFFFFFFF))); + + EXPECT_NOT_POISONED( + __builtin_ia32_bzhi_di(Poisoned(0xABCDABCDABCDABCD, 0xFF00000000000000ULL), 56)); + EXPECT_POISONED( + __builtin_ia32_bzhi_di(Poisoned(0xABCDABCDABCDABCD, 0xFF80000000000000ULL), 56)); + // Second operand saturates. + EXPECT_POISONED( + __builtin_ia32_bzhi_di(Poisoned(0xABCDABCDABCDABCD, 0x8000000000000000ULL), 240)); + // Any poison in the second operand poisons output. + EXPECT_POISONED( + __builtin_ia32_bzhi_di(0xABCDABCDABCDABCD, Poisoned(1, 1))); + EXPECT_POISONED( + __builtin_ia32_bzhi_di(0xABCDABCDABCDABCD, Poisoned(1, 0x8000000000000000ULL))); + EXPECT_POISONED( + __builtin_ia32_bzhi_di(0xABCDABCDABCDABCD, Poisoned(1, 0xFFFFFFFF00000000ULL))); +} + +inline U4 bextr_imm(U4 start, U4 len) { + start &= 0xFF; + len &= 0xFF; + return (len << 8) | start; +} + +__attribute__((target("bmi,bmi2"))) +static void TestBEXTR() { + EXPECT_POISONED( + __builtin_ia32_bextr_u32(Poisoned(0xABCDABCD, 0xFF), bextr_imm(0, 8))); + EXPECT_POISONED( + __builtin_ia32_bextr_u32(Poisoned(0xABCDABCD, 0xFF), bextr_imm(7, 8))); + EXPECT_NOT_POISONED( + __builtin_ia32_bextr_u32(Poisoned(0xABCDABCD, 0xFF), bextr_imm(8, 8))); + EXPECT_NOT_POISONED( + __builtin_ia32_bextr_u32(Poisoned(0xABCDABCD, 0xFF), bextr_imm(8, 800))); + EXPECT_POISONED( + __builtin_ia32_bextr_u32(Poisoned(0xABCDABCD, 0xFF), bextr_imm(7, 800))); + EXPECT_NOT_POISONED( + __builtin_ia32_bextr_u32(Poisoned(0xABCDABCD, 0xFF), bextr_imm(5, 0))); + + EXPECT_POISONED( + __builtin_ia32_bextr_u32(0xABCDABCD, Poisoned(bextr_imm(7, 800), 1))); + EXPECT_POISONED(__builtin_ia32_bextr_u32( + 0xABCDABCD, Poisoned(bextr_imm(7, 800), 0x80000000))); + + EXPECT_POISONED( + __builtin_ia32_bextr_u64(Poisoned(0xABCDABCD, 0xFF), bextr_imm(0, 8))); + EXPECT_POISONED( + __builtin_ia32_bextr_u64(Poisoned(0xABCDABCD, 0xFF), bextr_imm(7, 8))); + EXPECT_NOT_POISONED( + __builtin_ia32_bextr_u64(Poisoned(0xABCDABCD, 0xFF), bextr_imm(8, 8))); + EXPECT_NOT_POISONED( + __builtin_ia32_bextr_u64(Poisoned(0xABCDABCD, 0xFF), bextr_imm(8, 800))); + EXPECT_POISONED( + __builtin_ia32_bextr_u64(Poisoned(0xABCDABCD, 0xFF), bextr_imm(7, 800))); + EXPECT_NOT_POISONED( + __builtin_ia32_bextr_u64(Poisoned(0xABCDABCD, 0xFF), bextr_imm(5, 0))); + + // Poison in the top half. + EXPECT_NOT_POISONED(__builtin_ia32_bextr_u64( + Poisoned(0xABCDABCD, 0xFF0000000000), bextr_imm(32, 8))); + EXPECT_POISONED(__builtin_ia32_bextr_u64( + Poisoned(0xABCDABCD, 0xFF0000000000), bextr_imm(32, 9))); + + EXPECT_POISONED( + __builtin_ia32_bextr_u64(0xABCDABCD, Poisoned(bextr_imm(7, 800), 1))); + EXPECT_POISONED(__builtin_ia32_bextr_u64( + 0xABCDABCD, Poisoned(bextr_imm(7, 800), 0x80000000))); +} + +__attribute__((target("bmi,bmi2"))) +static void TestPDEP() { + U4 x = Poisoned(0, 0xFF00); + EXPECT_NOT_POISONED(__builtin_ia32_pdep_si(x, 0xFF)); + EXPECT_POISONED(__builtin_ia32_pdep_si(x, 0x1FF)); + EXPECT_NOT_POISONED(__builtin_ia32_pdep_si(x, 0xFF00)); + EXPECT_POISONED(__builtin_ia32_pdep_si(x, 0x1FF00)); + + EXPECT_NOT_POISONED(__builtin_ia32_pdep_si(x, 0x1FF00) & 0xFF); + EXPECT_POISONED(__builtin_ia32_pdep_si(0, Poisoned(0xF, 1))); + + U8 y = Poisoned(0, 0xFF00); + EXPECT_NOT_POISONED(__builtin_ia32_pdep_di(y, 0xFF)); + EXPECT_POISONED(__builtin_ia32_pdep_di(y, 0x1FF)); + EXPECT_NOT_POISONED(__builtin_ia32_pdep_di(y, 0xFF0000000000)); + EXPECT_POISONED(__builtin_ia32_pdep_di(y, 0x1FF000000000000)); + + EXPECT_NOT_POISONED(__builtin_ia32_pdep_di(y, 0x1FF00) & 0xFF); + EXPECT_POISONED(__builtin_ia32_pdep_di(0, Poisoned(0xF, 1))); +} + +__attribute__((target("bmi,bmi2"))) +static void TestPEXT() { + U4 x = Poisoned(0, 0xFF00); + EXPECT_NOT_POISONED(__builtin_ia32_pext_si(x, 0xFF)); + EXPECT_POISONED(__builtin_ia32_pext_si(x, 0x1FF)); + EXPECT_POISONED(__builtin_ia32_pext_si(x, 0x100)); + EXPECT_POISONED(__builtin_ia32_pext_si(x, 0x1000)); + EXPECT_NOT_POISONED(__builtin_ia32_pext_si(x, 0x10000)); + + EXPECT_POISONED(__builtin_ia32_pext_si(0xFF00, Poisoned(0xFF, 1))); + + U8 y = Poisoned(0, 0xFF0000000000); + EXPECT_NOT_POISONED(__builtin_ia32_pext_di(y, 0xFF00000000)); + EXPECT_POISONED(__builtin_ia32_pext_di(y, 0x1FF00000000)); + EXPECT_POISONED(__builtin_ia32_pext_di(y, 0x10000000000)); + EXPECT_POISONED(__builtin_ia32_pext_di(y, 0x100000000000)); + EXPECT_NOT_POISONED(__builtin_ia32_pext_di(y, 0x1000000000000)); + + EXPECT_POISONED(__builtin_ia32_pext_di(0xFF00, Poisoned(0xFF, 1))); +} + +TEST(MemorySanitizer, Bmi) { + if (HaveBmi()) { + TestBZHI(); + TestBEXTR(); + TestPDEP(); + TestPEXT(); + } +} diff --git a/compiler-rt/lib/profile/CMakeLists.txt b/compiler-rt/lib/profile/CMakeLists.txt index 488673dd2c227..9774be6a8ba4e 100644 --- a/compiler-rt/lib/profile/CMakeLists.txt +++ b/compiler-rt/lib/profile/CMakeLists.txt @@ -62,6 +62,7 @@ set(PROFILE_SOURCES InstrProfilingPlatformFuchsia.c InstrProfilingPlatformLinux.c InstrProfilingPlatformOther.c + InstrProfilingPlatformWindows.c InstrProfilingRuntime.cc InstrProfilingUtil.c) diff --git a/compiler-rt/lib/profile/GCDAProfiling.c b/compiler-rt/lib/profile/GCDAProfiling.c index 099aa115f7d03..498c05900bf27 100644 --- a/compiler-rt/lib/profile/GCDAProfiling.c +++ b/compiler-rt/lib/profile/GCDAProfiling.c @@ -268,14 +268,14 @@ static int map_file() { mmap_handle = CreateFileMapping(mmap_fd, NULL, PAGE_READWRITE, DWORD_HI(file_size), DWORD_LO(file_size), NULL); if (mmap_handle == NULL) { - fprintf(stderr, "profiling: %s: cannot create file mapping: %d\n", filename, - GetLastError()); + fprintf(stderr, "profiling: %s: cannot create file mapping: %lu\n", + filename, GetLastError()); return -1; } write_buffer = MapViewOfFile(mmap_handle, FILE_MAP_WRITE, 0, 0, file_size); if (write_buffer == NULL) { - fprintf(stderr, "profiling: %s: cannot map: %d\n", filename, + fprintf(stderr, "profiling: %s: cannot map: %lu\n", filename, GetLastError()); CloseHandle(mmap_handle); return -1; @@ -297,18 +297,18 @@ static int map_file() { static void unmap_file() { #if defined(_WIN32) if (!FlushViewOfFile(write_buffer, file_size)) { - fprintf(stderr, "profiling: %s: cannot flush mapped view: %d\n", filename, + fprintf(stderr, "profiling: %s: cannot flush mapped view: %lu\n", filename, GetLastError()); } if (!UnmapViewOfFile(write_buffer)) { - fprintf(stderr, "profiling: %s: cannot unmap mapped view: %d\n", filename, + fprintf(stderr, "profiling: %s: cannot unmap mapped view: %lu\n", filename, GetLastError()); } if (!CloseHandle(mmap_handle)) { - fprintf(stderr, "profiling: %s: cannot close file mapping handle: %d\n", filename, - GetLastError()); + fprintf(stderr, "profiling: %s: cannot close file mapping handle: %lu\n", + filename, GetLastError()); } mmap_handle = NULL; diff --git a/compiler-rt/lib/profile/InstrProfData.inc b/compiler-rt/lib/profile/InstrProfData.inc index a3b5471154214..19d4651292588 100644 --- a/compiler-rt/lib/profile/InstrProfData.inc +++ b/compiler-rt/lib/profile/InstrProfData.inc @@ -249,22 +249,22 @@ COVMAP_HEADER(uint32_t, Int32Ty, Version, \ #define INSTR_PROF_DATA_DEFINED INSTR_PROF_SECT_ENTRY(IPSK_data, \ INSTR_PROF_QUOTE(INSTR_PROF_DATA_COMMON), \ - INSTR_PROF_QUOTE(INSTR_PROF_DATA_COFF), "__DATA,") + INSTR_PROF_DATA_COFF, "__DATA,") INSTR_PROF_SECT_ENTRY(IPSK_cnts, \ INSTR_PROF_QUOTE(INSTR_PROF_CNTS_COMMON), \ - INSTR_PROF_QUOTE(INSTR_PROF_CNTS_COFF), "__DATA,") + INSTR_PROF_CNTS_COFF, "__DATA,") INSTR_PROF_SECT_ENTRY(IPSK_name, \ INSTR_PROF_QUOTE(INSTR_PROF_NAME_COMMON), \ - INSTR_PROF_QUOTE(INSTR_PROF_NAME_COFF), "__DATA,") + INSTR_PROF_NAME_COFF, "__DATA,") INSTR_PROF_SECT_ENTRY(IPSK_vals, \ INSTR_PROF_QUOTE(INSTR_PROF_VALS_COMMON), \ - INSTR_PROF_QUOTE(INSTR_PROF_VALS_COFF), "__DATA,") + INSTR_PROF_VALS_COFF, "__DATA,") INSTR_PROF_SECT_ENTRY(IPSK_vnodes, \ INSTR_PROF_QUOTE(INSTR_PROF_VNODES_COMMON), \ - INSTR_PROF_QUOTE(INSTR_PROF_VNODES_COFF), "__DATA,") + INSTR_PROF_VNODES_COFF, "__DATA,") INSTR_PROF_SECT_ENTRY(IPSK_covmap, \ INSTR_PROF_QUOTE(INSTR_PROF_COVMAP_COMMON), \ - INSTR_PROF_QUOTE(INSTR_PROF_COVMAP_COFF), "__LLVM_COV,") + INSTR_PROF_COVMAP_COFF, "__LLVM_COV,") #undef INSTR_PROF_SECT_ENTRY #endif @@ -635,10 +635,12 @@ serializeValueProfDataFrom(ValueProfRecordClosure *Closure, * version for other variants of profile. We set the lowest bit of the upper 8 * bits (i.e. bit 56) to 1 to indicate if this is an IR-level instrumentaiton * generated profile, and 0 if this is a Clang FE generated profile. + * 1 in bit 57 indicates there are context-sensitive records in the profile. */ #define VARIANT_MASKS_ALL 0xff00000000000000ULL #define GET_VERSION(V) ((V) & ~VARIANT_MASKS_ALL) #define VARIANT_MASK_IR_PROF (0x1ULL << 56) +#define VARIANT_MASK_CSIR_PROF (0x1ULL << 57) #define INSTR_PROF_RAW_VERSION_VAR __llvm_profile_raw_version #define INSTR_PROF_PROFILE_RUNTIME_VAR __llvm_profile_runtime @@ -654,13 +656,15 @@ serializeValueProfDataFrom(ValueProfRecordClosure *Closure, #define INSTR_PROF_VALS_COMMON __llvm_prf_vals #define INSTR_PROF_VNODES_COMMON __llvm_prf_vnds #define INSTR_PROF_COVMAP_COMMON __llvm_covmap -/* Win32 */ -#define INSTR_PROF_DATA_COFF .lprfd -#define INSTR_PROF_NAME_COFF .lprfn -#define INSTR_PROF_CNTS_COFF .lprfc -#define INSTR_PROF_VALS_COFF .lprfv -#define INSTR_PROF_VNODES_COFF .lprfnd -#define INSTR_PROF_COVMAP_COFF .lcovmap +/* Windows section names. Because these section names contain dollar characters, + * they must be quoted. + */ +#define INSTR_PROF_DATA_COFF ".lprfd$M" +#define INSTR_PROF_NAME_COFF ".lprfn$M" +#define INSTR_PROF_CNTS_COFF ".lprfc$M" +#define INSTR_PROF_VALS_COFF ".lprfv$M" +#define INSTR_PROF_VNODES_COFF ".lprfnd$M" +#define INSTR_PROF_COVMAP_COFF ".lcovmap$M" #ifdef _WIN32 /* Runtime section names and name strings. */ @@ -676,31 +680,18 @@ serializeValueProfDataFrom(ValueProfRecordClosure *Closure, #define INSTR_PROF_COVMAP_SECT_NAME INSTR_PROF_COVMAP_COFF #else /* Runtime section names and name strings. */ -#define INSTR_PROF_DATA_SECT_NAME INSTR_PROF_DATA_COMMON -#define INSTR_PROF_NAME_SECT_NAME INSTR_PROF_NAME_COMMON -#define INSTR_PROF_CNTS_SECT_NAME INSTR_PROF_CNTS_COMMON +#define INSTR_PROF_DATA_SECT_NAME INSTR_PROF_QUOTE(INSTR_PROF_DATA_COMMON) +#define INSTR_PROF_NAME_SECT_NAME INSTR_PROF_QUOTE(INSTR_PROF_NAME_COMMON) +#define INSTR_PROF_CNTS_SECT_NAME INSTR_PROF_QUOTE(INSTR_PROF_CNTS_COMMON) /* Array of pointers. Each pointer points to a list * of value nodes associated with one value site. */ -#define INSTR_PROF_VALS_SECT_NAME INSTR_PROF_VALS_COMMON +#define INSTR_PROF_VALS_SECT_NAME INSTR_PROF_QUOTE(INSTR_PROF_VALS_COMMON) /* Value profile nodes section. */ -#define INSTR_PROF_VNODES_SECT_NAME INSTR_PROF_VNODES_COMMON -#define INSTR_PROF_COVMAP_SECT_NAME INSTR_PROF_COVMAP_COMMON +#define INSTR_PROF_VNODES_SECT_NAME INSTR_PROF_QUOTE(INSTR_PROF_VNODES_COMMON) +#define INSTR_PROF_COVMAP_SECT_NAME INSTR_PROF_QUOTE(INSTR_PROF_COVMAP_COMMON) #endif -#define INSTR_PROF_DATA_SECT_NAME_STR \ - INSTR_PROF_QUOTE(INSTR_PROF_DATA_SECT_NAME) -#define INSTR_PROF_NAME_SECT_NAME_STR \ - INSTR_PROF_QUOTE(INSTR_PROF_NAME_SECT_NAME) -#define INSTR_PROF_CNTS_SECT_NAME_STR \ - INSTR_PROF_QUOTE(INSTR_PROF_CNTS_SECT_NAME) -#define INSTR_PROF_COVMAP_SECT_NAME_STR \ - INSTR_PROF_QUOTE(INSTR_PROF_COVMAP_SECT_NAME) -#define INSTR_PROF_VALS_SECT_NAME_STR \ - INSTR_PROF_QUOTE(INSTR_PROF_VALS_SECT_NAME) -#define INSTR_PROF_VNODES_SECT_NAME_STR \ - INSTR_PROF_QUOTE(INSTR_PROF_VNODES_SECT_NAME) - /* Macros to define start/stop section symbol for a given * section on Linux. For instance * INSTR_PROF_SECT_START(INSTR_PROF_DATA_SECT_NAME) will diff --git a/compiler-rt/lib/profile/InstrProfilingMergeFile.c b/compiler-rt/lib/profile/InstrProfilingMergeFile.c index ccdbf95dfb745..b853f15b47379 100644 --- a/compiler-rt/lib/profile/InstrProfilingMergeFile.c +++ b/compiler-rt/lib/profile/InstrProfilingMergeFile.c @@ -20,6 +20,7 @@ /* Merge value profile data pointed to by SrcValueProfData into * in-memory profile counters pointed by to DstData. */ +COMPILER_RT_VISIBILITY void lprofMergeValueProfData(ValueProfData *SrcValueProfData, __llvm_profile_data *DstData) { unsigned I, S, V, DstIndex = 0; diff --git a/compiler-rt/lib/profile/InstrProfilingPlatformDarwin.c b/compiler-rt/lib/profile/InstrProfilingPlatformDarwin.c index 6810de60f35ed..6eae73fdcd6e7 100644 --- a/compiler-rt/lib/profile/InstrProfilingPlatformDarwin.c +++ b/compiler-rt/lib/profile/InstrProfilingPlatformDarwin.c @@ -12,28 +12,28 @@ /* Use linker magic to find the bounds of the Data section. */ COMPILER_RT_VISIBILITY extern __llvm_profile_data - DataStart __asm("section$start$__DATA$" INSTR_PROF_DATA_SECT_NAME_STR); + DataStart __asm("section$start$__DATA$" INSTR_PROF_DATA_SECT_NAME); COMPILER_RT_VISIBILITY extern __llvm_profile_data - DataEnd __asm("section$end$__DATA$" INSTR_PROF_DATA_SECT_NAME_STR); + DataEnd __asm("section$end$__DATA$" INSTR_PROF_DATA_SECT_NAME); COMPILER_RT_VISIBILITY extern char - NamesStart __asm("section$start$__DATA$" INSTR_PROF_NAME_SECT_NAME_STR); + NamesStart __asm("section$start$__DATA$" INSTR_PROF_NAME_SECT_NAME); COMPILER_RT_VISIBILITY -extern char NamesEnd __asm("section$end$__DATA$" INSTR_PROF_NAME_SECT_NAME_STR); +extern char NamesEnd __asm("section$end$__DATA$" INSTR_PROF_NAME_SECT_NAME); COMPILER_RT_VISIBILITY extern uint64_t - CountersStart __asm("section$start$__DATA$" INSTR_PROF_CNTS_SECT_NAME_STR); + CountersStart __asm("section$start$__DATA$" INSTR_PROF_CNTS_SECT_NAME); COMPILER_RT_VISIBILITY extern uint64_t - CountersEnd __asm("section$end$__DATA$" INSTR_PROF_CNTS_SECT_NAME_STR); + CountersEnd __asm("section$end$__DATA$" INSTR_PROF_CNTS_SECT_NAME); COMPILER_RT_VISIBILITY extern ValueProfNode - VNodesStart __asm("section$start$__DATA$" INSTR_PROF_VNODES_SECT_NAME_STR); + VNodesStart __asm("section$start$__DATA$" INSTR_PROF_VNODES_SECT_NAME); COMPILER_RT_VISIBILITY extern ValueProfNode - VNodesEnd __asm("section$end$__DATA$" INSTR_PROF_VNODES_SECT_NAME_STR); + VNodesEnd __asm("section$end$__DATA$" INSTR_PROF_VNODES_SECT_NAME); COMPILER_RT_VISIBILITY const __llvm_profile_data *__llvm_profile_begin_data(void) { diff --git a/compiler-rt/lib/profile/InstrProfilingPlatformLinux.c b/compiler-rt/lib/profile/InstrProfilingPlatformLinux.c index 4c556bdcd40b6..33a737e6397ff 100644 --- a/compiler-rt/lib/profile/InstrProfilingPlatformLinux.c +++ b/compiler-rt/lib/profile/InstrProfilingPlatformLinux.c @@ -13,14 +13,14 @@ #include "InstrProfiling.h" -#define PROF_DATA_START INSTR_PROF_SECT_START(INSTR_PROF_DATA_SECT_NAME) -#define PROF_DATA_STOP INSTR_PROF_SECT_STOP(INSTR_PROF_DATA_SECT_NAME) -#define PROF_NAME_START INSTR_PROF_SECT_START(INSTR_PROF_NAME_SECT_NAME) -#define PROF_NAME_STOP INSTR_PROF_SECT_STOP(INSTR_PROF_NAME_SECT_NAME) -#define PROF_CNTS_START INSTR_PROF_SECT_START(INSTR_PROF_CNTS_SECT_NAME) -#define PROF_CNTS_STOP INSTR_PROF_SECT_STOP(INSTR_PROF_CNTS_SECT_NAME) -#define PROF_VNODES_START INSTR_PROF_SECT_START(INSTR_PROF_VNODES_SECT_NAME) -#define PROF_VNODES_STOP INSTR_PROF_SECT_STOP(INSTR_PROF_VNODES_SECT_NAME) +#define PROF_DATA_START INSTR_PROF_SECT_START(INSTR_PROF_DATA_COMMON) +#define PROF_DATA_STOP INSTR_PROF_SECT_STOP(INSTR_PROF_DATA_COMMON) +#define PROF_NAME_START INSTR_PROF_SECT_START(INSTR_PROF_NAME_COMMON) +#define PROF_NAME_STOP INSTR_PROF_SECT_STOP(INSTR_PROF_NAME_COMMON) +#define PROF_CNTS_START INSTR_PROF_SECT_START(INSTR_PROF_CNTS_COMMON) +#define PROF_CNTS_STOP INSTR_PROF_SECT_STOP(INSTR_PROF_CNTS_COMMON) +#define PROF_VNODES_START INSTR_PROF_SECT_START(INSTR_PROF_VNODES_COMMON) +#define PROF_VNODES_STOP INSTR_PROF_SECT_STOP(INSTR_PROF_VNODES_COMMON) /* Declare section start and stop symbols for various sections * generated by compiler instrumentation. @@ -36,11 +36,11 @@ extern ValueProfNode PROF_VNODES_STOP COMPILER_RT_VISIBILITY; /* Add dummy data to ensure the section is always created. */ __llvm_profile_data - __prof_data_sect_data[0] COMPILER_RT_SECTION(INSTR_PROF_DATA_SECT_NAME_STR); + __prof_data_sect_data[0] COMPILER_RT_SECTION(INSTR_PROF_DATA_SECT_NAME); uint64_t - __prof_cnts_sect_data[0] COMPILER_RT_SECTION(INSTR_PROF_CNTS_SECT_NAME_STR); -char __prof_nms_sect_data[0] COMPILER_RT_SECTION(INSTR_PROF_NAME_SECT_NAME_STR); -ValueProfNode __prof_vnodes_sect_data[0] COMPILER_RT_SECTION(INSTR_PROF_VNODES_SECT_NAME_STR); + __prof_cnts_sect_data[0] COMPILER_RT_SECTION(INSTR_PROF_CNTS_SECT_NAME); +char __prof_nms_sect_data[0] COMPILER_RT_SECTION(INSTR_PROF_NAME_SECT_NAME); +ValueProfNode __prof_vnodes_sect_data[0] COMPILER_RT_SECTION(INSTR_PROF_VNODES_SECT_NAME); COMPILER_RT_VISIBILITY const __llvm_profile_data * __llvm_profile_begin_data(void) { diff --git a/compiler-rt/lib/profile/InstrProfilingPlatformOther.c b/compiler-rt/lib/profile/InstrProfilingPlatformOther.c index d12fbf7ccc48d..6cb17aad520c1 100644 --- a/compiler-rt/lib/profile/InstrProfilingPlatformOther.c +++ b/compiler-rt/lib/profile/InstrProfilingPlatformOther.c @@ -6,10 +6,12 @@ |* \*===----------------------------------------------------------------------===*/ -#if !defined(__APPLE__) && !defined(__linux__) && !defined(__FreeBSD__) && \ - !(defined(__sun__) && defined(__svr4__)) && !defined(__NetBSD__) +#if !defined(__APPLE__) && !defined(__linux__) && !defined(__FreeBSD__) && \ + !(defined(__sun__) && defined(__svr4__)) && !defined(__NetBSD__) && \ + !defined(_WIN32) #include +#include #include "InstrProfiling.h" diff --git a/compiler-rt/lib/profile/InstrProfilingPlatformWindows.c b/compiler-rt/lib/profile/InstrProfilingPlatformWindows.c new file mode 100644 index 0000000000000..594e39457065a --- /dev/null +++ b/compiler-rt/lib/profile/InstrProfilingPlatformWindows.c @@ -0,0 +1,65 @@ +/*===- InstrProfilingPlatformWindows.c - Profile data on Windows ----------===*\ +|* +|* Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +|* See https://llvm.org/LICENSE.txt for license information. +|* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +|* +\*===----------------------------------------------------------------------===*/ + +#include "InstrProfiling.h" + +#if defined(_WIN32) + +#if defined(_MSC_VER) +/* Merge read-write sections into .data. */ +#pragma comment(linker, "/MERGE:.lprfc=.data") +#pragma comment(linker, "/MERGE:.lprfd=.data") +#pragma comment(linker, "/MERGE:.lprfv=.data") +#pragma comment(linker, "/MERGE:.lprfnd=.data") +/* Do *NOT* merge .lprfn and .lcovmap into .rdata. llvm-cov must be able to find + * after the fact. + */ + +/* Allocate read-only section bounds. */ +#pragma section(".lprfn$A", read) +#pragma section(".lprfn$Z", read) + +/* Allocate read-write section bounds. */ +#pragma section(".lprfd$A", read, write) +#pragma section(".lprfd$Z", read, write) +#pragma section(".lprfc$A", read, write) +#pragma section(".lprfc$Z", read, write) +#pragma section(".lprfnd$A", read, write) +#pragma section(".lprfnd$Z", read, write) +#endif + +__llvm_profile_data COMPILER_RT_SECTION(".lprfd$A") DataStart = {0}; +__llvm_profile_data COMPILER_RT_SECTION(".lprfd$Z") DataEnd = {0}; + +const char COMPILER_RT_SECTION(".lprfn$A") NamesStart = '\0'; +const char COMPILER_RT_SECTION(".lprfn$Z") NamesEnd = '\0'; + +uint64_t COMPILER_RT_SECTION(".lprfc$A") CountersStart; +uint64_t COMPILER_RT_SECTION(".lprfc$Z") CountersEnd; + +ValueProfNode COMPILER_RT_SECTION(".lprfnd$A") VNodesStart; +ValueProfNode COMPILER_RT_SECTION(".lprfnd$Z") VNodesEnd; + +const __llvm_profile_data *__llvm_profile_begin_data(void) { + return &DataStart + 1; +} +const __llvm_profile_data *__llvm_profile_end_data(void) { return &DataEnd; } + +const char *__llvm_profile_begin_names(void) { return &NamesStart + 1; } +const char *__llvm_profile_end_names(void) { return &NamesEnd; } + +uint64_t *__llvm_profile_begin_counters(void) { return &CountersStart + 1; } +uint64_t *__llvm_profile_end_counters(void) { return &CountersEnd; } + +ValueProfNode *__llvm_profile_begin_vnodes(void) { return &VNodesStart + 1; } +ValueProfNode *__llvm_profile_end_vnodes(void) { return &VNodesEnd; } + +ValueProfNode *CurrentVNode = &VNodesStart + 1; +ValueProfNode *EndVNode = &VNodesEnd; + +#endif diff --git a/compiler-rt/lib/profile/InstrProfilingUtil.c b/compiler-rt/lib/profile/InstrProfilingUtil.c index 2a68c35638667..5e479ae7150ac 100644 --- a/compiler-rt/lib/profile/InstrProfilingUtil.c +++ b/compiler-rt/lib/profile/InstrProfilingUtil.c @@ -80,7 +80,7 @@ void *lprofPtrFetchAdd(void **Mem, long ByteIncr) { #endif -#ifdef _MSC_VER +#ifdef _WIN32 COMPILER_RT_VISIBILITY int lprofGetHostName(char *Name, int Len) { WCHAR Buffer[COMPILER_RT_MAX_HOSTLEN]; DWORD BufferSize = sizeof(Buffer); diff --git a/compiler-rt/lib/profile/InstrProfilingValue.c b/compiler-rt/lib/profile/InstrProfilingValue.c index 5f34c06bd52e9..b7c71768c2c37 100644 --- a/compiler-rt/lib/profile/InstrProfilingValue.c +++ b/compiler-rt/lib/profile/InstrProfilingValue.c @@ -31,7 +31,7 @@ static int hasNonDefaultValsPerSite = 0; * allocated by the compiler. */ COMPILER_RT_VISIBILITY ValueProfNode lprofValueProfNodes[INSTR_PROF_VNODE_POOL_SIZE] COMPILER_RT_SECTION( - COMPILER_RT_SEG INSTR_PROF_VNODES_SECT_NAME_STR); + COMPILER_RT_SEG INSTR_PROF_VNODES_SECT_NAME); #endif COMPILER_RT_VISIBILITY uint32_t VPMaxNumValsPerSite = diff --git a/compiler-rt/lib/safestack/safestack.cc b/compiler-rt/lib/safestack/safestack.cc index ff840a5c19dbc..f713d5e687187 100644 --- a/compiler-rt/lib/safestack/safestack.cc +++ b/compiler-rt/lib/safestack/safestack.cc @@ -82,9 +82,6 @@ const unsigned kStackAlign = 16; /// size rlimit is set to infinity. const unsigned kDefaultUnsafeStackSize = 0x2800000; -/// Runtime page size obtained through sysconf -unsigned pageSize; - // Per-thread unsafe stack information. It's not frequently accessed, so there // it can be kept out of the tcb in normal thread-local variables. __thread void *unsafe_stack_start = nullptr; @@ -93,8 +90,8 @@ __thread size_t unsafe_stack_guard = 0; inline void *unsafe_stack_alloc(size_t size, size_t guard) { SFS_CHECK(size + guard >= size); - void *addr = Mmap(nullptr, RoundUpTo(size + guard, pageSize), - PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON, -1, 0); + void *addr = Mmap(nullptr, size + guard, PROT_READ | PROT_WRITE, + MAP_PRIVATE | MAP_ANON, -1, 0); SFS_CHECK(MAP_FAILED != addr); Mprotect(addr, guard, PROT_NONE); return (char *)addr + guard; @@ -228,10 +225,11 @@ INTERCEPTOR(int, pthread_create, pthread_t *thread, } SFS_CHECK(size); - SFS_CHECK((size & (kStackAlign - 1)) == 0); - SFS_CHECK((guard & (pageSize - 1)) == 0); + size = RoundUpTo(size, kStackAlign); void *addr = unsafe_stack_alloc(size, guard); + // Put tinfo at the end of the buffer. guard may be not page aligned. + // If that is so then some bytes after addr can be mprotected. struct tinfo *tinfo = (struct tinfo *)(((char *)addr) + size - sizeof(struct tinfo)); tinfo->start_routine = start_routine; @@ -265,8 +263,6 @@ extern "C" __attribute__((visibility("default"))) __attribute__((constructor(0))) #endif void __safestack_init() { - pageSize = sysconf(_SC_PAGESIZE); - // Determine the stack size for the main thread. size_t size = kDefaultUnsafeStackSize; size_t guard = 4096; @@ -277,7 +273,6 @@ void __safestack_init() { // Allocate unsafe stack for main thread void *addr = unsafe_stack_alloc(size, guard); - unsafe_stack_setup(addr, size, guard); // Setup the cleanup handler diff --git a/compiler-rt/lib/sanitizer_common/CMakeLists.txt b/compiler-rt/lib/sanitizer_common/CMakeLists.txt index 470ef20176dd3..d378045720608 100644 --- a/compiler-rt/lib/sanitizer_common/CMakeLists.txt +++ b/compiler-rt/lib/sanitizer_common/CMakeLists.txt @@ -126,6 +126,7 @@ set(SANITIZER_IMPL_HEADERS sanitizer_common_interceptors.inc sanitizer_common_interceptors_format.inc sanitizer_common_interceptors_ioctl.inc + sanitizer_common_interceptors_vfork_aarch64.inc.S sanitizer_common_interface.inc sanitizer_common_interface_posix.inc sanitizer_common_syscalls.inc @@ -142,6 +143,7 @@ set(SANITIZER_IMPL_HEADERS sanitizer_freebsd.h sanitizer_fuchsia.h sanitizer_getauxval.h + sanitizer_hash.h sanitizer_interceptors_ioctl_netbsd.inc sanitizer_interface_internal.h sanitizer_internal_defs.h diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_allocator_primary64.h b/compiler-rt/lib/sanitizer_common/sanitizer_allocator_primary64.h index 05e7569a93bde..525eb03e6892e 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_allocator_primary64.h +++ b/compiler-rt/lib/sanitizer_common/sanitizer_allocator_primary64.h @@ -80,7 +80,8 @@ class SizeClassAllocator64 { CHECK_NE(NonConstSpaceBeg, ~(uptr)0); } SetReleaseToOSIntervalMs(release_to_os_interval_ms); - MapWithCallbackOrDie(SpaceEnd(), AdditionalSize()); + MapWithCallbackOrDie(SpaceEnd(), AdditionalSize(), + "SizeClassAllocator: region info"); // Check that the RegionInfo array is aligned on the CacheLine size. DCHECK_EQ(SpaceEnd() % kCacheLineSize, 0); } @@ -633,8 +634,8 @@ class SizeClassAllocator64 { return reinterpret_cast(GetMetadataEnd(region_beg)); } - bool MapWithCallback(uptr beg, uptr size) { - uptr mapped = address_range.Map(beg, size); + bool MapWithCallback(uptr beg, uptr size, const char *name) { + uptr mapped = address_range.Map(beg, size, name); if (UNLIKELY(!mapped)) return false; CHECK_EQ(beg, mapped); @@ -642,8 +643,8 @@ class SizeClassAllocator64 { return true; } - void MapWithCallbackOrDie(uptr beg, uptr size) { - CHECK_EQ(beg, address_range.MapOrDie(beg, size)); + void MapWithCallbackOrDie(uptr beg, uptr size, const char *name) { + CHECK_EQ(beg, address_range.MapOrDie(beg, size, name)); MapUnmapCallback().OnMap(beg, size); } @@ -661,7 +662,8 @@ class SizeClassAllocator64 { uptr current_map_end = reinterpret_cast(GetFreeArray(region_beg)) + region->mapped_free_array; uptr new_map_size = new_mapped_free_array - region->mapped_free_array; - if (UNLIKELY(!MapWithCallback(current_map_end, new_map_size))) + if (UNLIKELY(!MapWithCallback(current_map_end, new_map_size, + "SizeClassAllocator: freearray"))) return false; region->mapped_free_array = new_mapped_free_array; } @@ -712,7 +714,8 @@ class SizeClassAllocator64 { if (UNLIKELY(IsRegionExhausted(region, class_id, user_map_size))) return false; if (UNLIKELY(!MapWithCallback(region_beg + region->mapped_user, - user_map_size))) + user_map_size, + "SizeClassAllocator: region data"))) return false; stat->Add(AllocatorStatMapped, user_map_size); region->mapped_user += user_map_size; @@ -732,7 +735,7 @@ class SizeClassAllocator64 { return false; if (UNLIKELY(!MapWithCallback( GetMetadataEnd(region_beg) - region->mapped_meta - meta_map_size, - meta_map_size))) + meta_map_size, "SizeClassAllocator: region metadata"))) return false; region->mapped_meta += meta_map_size; } diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_asm.h b/compiler-rt/lib/sanitizer_common/sanitizer_asm.h index 5aa36d19c7460..184d118d97d81 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_asm.h +++ b/compiler-rt/lib/sanitizer_common/sanitizer_asm.h @@ -44,14 +44,23 @@ #if !defined(__APPLE__) # define ASM_HIDDEN(symbol) .hidden symbol -# define ASM_TYPE_FUNCTION(symbol) .type symbol, @function +# define ASM_TYPE_FUNCTION(symbol) .type symbol, %function # define ASM_SIZE(symbol) .size symbol, .-symbol # define ASM_SYMBOL(symbol) symbol # define ASM_SYMBOL_INTERCEPTOR(symbol) symbol +# define ASM_WRAPPER_NAME(symbol) __interceptor_##symbol #else # define ASM_HIDDEN(symbol) # define ASM_TYPE_FUNCTION(symbol) # define ASM_SIZE(symbol) # define ASM_SYMBOL(symbol) _##symbol # define ASM_SYMBOL_INTERCEPTOR(symbol) _wrap_##symbol +# define ASM_WRAPPER_NAME(symbol) __interceptor_##symbol +#endif + +#if defined(__ELF__) && (defined(__GNU__) || defined(__FreeBSD__) || \ + defined(__Fuchsia__) || defined(__linux__)) +#define NO_EXEC_STACK_DIRECTIVE .section .note.GNU-stack,"",%progbits // NOLINT +#else +#define NO_EXEC_STACK_DIRECTIVE #endif diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_common.h b/compiler-rt/lib/sanitizer_common/sanitizer_common.h index 9415b617ece13..19c968e2fde05 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_common.h +++ b/compiler-rt/lib/sanitizer_common/sanitizer_common.h @@ -101,10 +101,11 @@ void *MmapOrDieOnFatalError(uptr size, const char *mem_type); bool MmapFixedNoReserve(uptr fixed_addr, uptr size, const char *name = nullptr) WARN_UNUSED_RESULT; void *MmapNoReserveOrDie(uptr size, const char *mem_type); -void *MmapFixedOrDie(uptr fixed_addr, uptr size); +void *MmapFixedOrDie(uptr fixed_addr, uptr size, const char *name = nullptr); // Behaves just like MmapFixedOrDie, but tolerates out of memory condition, in // that case returns nullptr. -void *MmapFixedOrDieOnFatalError(uptr fixed_addr, uptr size); +void *MmapFixedOrDieOnFatalError(uptr fixed_addr, uptr size, + const char *name = nullptr); void *MmapFixedNoAccess(uptr fixed_addr, uptr size, const char *name = nullptr); void *MmapNoAccess(uptr size); // Map aligned chunk of address space; size and alignment are powers of two. @@ -140,8 +141,8 @@ void RunFreeHooks(const void *ptr); class ReservedAddressRange { public: uptr Init(uptr size, const char *name = nullptr, uptr fixed_addr = 0); - uptr Map(uptr fixed_addr, uptr size); - uptr MapOrDie(uptr fixed_addr, uptr size); + uptr Map(uptr fixed_addr, uptr size, const char *name = nullptr); + uptr MapOrDie(uptr fixed_addr, uptr size, const char *name = nullptr); void Unmap(uptr addr, uptr size); void *base() const { return base_; } uptr size() const { return size_; } @@ -803,7 +804,13 @@ enum AndroidApiLevel { void WriteToSyslog(const char *buffer); -#if SANITIZER_MAC +#if defined(SANITIZER_WINDOWS) && defined(_MSC_VER) && !defined(__clang__) +#define SANITIZER_WIN_TRACE 1 +#else +#define SANITIZER_WIN_TRACE 0 +#endif + +#if SANITIZER_MAC || SANITIZER_WIN_TRACE void LogFullErrorReport(const char *buffer); #else INLINE void LogFullErrorReport(const char *buffer) {} @@ -817,7 +824,7 @@ INLINE void WriteOneLineToSyslog(const char *s) {} INLINE void LogMessageOnPrintf(const char *str) {} #endif -#if SANITIZER_LINUX +#if SANITIZER_LINUX || SANITIZER_WIN_TRACE // Initialize Android logging. Any writes before this are silently lost. void AndroidLogInit(); void SetAbortMessage(const char *); diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc b/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc index fc8194f8dcf52..4ea274f7840c8 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc +++ b/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc @@ -819,16 +819,14 @@ INTERCEPTOR(void *, memcpy, void *dst, const void *src, uptr size) { #endif #if SANITIZER_INTERCEPT_MEMCMP - DECLARE_WEAK_INTERCEPTOR_HOOK(__sanitizer_weak_hook_memcmp, uptr called_pc, const void *s1, const void *s2, uptr n, int result) -INTERCEPTOR(int, memcmp, const void *a1, const void *a2, uptr size) { - if (COMMON_INTERCEPTOR_NOTHING_IS_INITIALIZED) - return internal_memcmp(a1, a2, size); - void *ctx; - COMMON_INTERCEPTOR_ENTER(ctx, memcmp, a1, a2, size); +// Common code for `memcmp` and `bcmp`. +int MemcmpInterceptorCommon(void *ctx, + int (*real_fn)(const void *, const void *, uptr), + const void *a1, const void *a2, uptr size) { if (common_flags()->intercept_memcmp) { if (common_flags()->strict_memcmp) { // Check the entire regions even if the first bytes of the buffers are @@ -854,17 +852,39 @@ INTERCEPTOR(int, memcmp, const void *a1, const void *a2, uptr size) { return r; } } - int result = REAL(memcmp(a1, a2, size)); + int result = real_fn(a1, a2, size); CALL_WEAK_INTERCEPTOR_HOOK(__sanitizer_weak_hook_memcmp, GET_CALLER_PC(), a1, a2, size, result); return result; } +INTERCEPTOR(int, memcmp, const void *a1, const void *a2, uptr size) { + if (COMMON_INTERCEPTOR_NOTHING_IS_INITIALIZED) + return internal_memcmp(a1, a2, size); + void *ctx; + COMMON_INTERCEPTOR_ENTER(ctx, memcmp, a1, a2, size); + return MemcmpInterceptorCommon(ctx, REAL(memcmp), a1, a2, size); +} + #define INIT_MEMCMP COMMON_INTERCEPT_FUNCTION(memcmp) #else #define INIT_MEMCMP #endif +#if SANITIZER_INTERCEPT_BCMP +INTERCEPTOR(int, bcmp, const void *a1, const void *a2, uptr size) { + if (COMMON_INTERCEPTOR_NOTHING_IS_INITIALIZED) + return internal_memcmp(a1, a2, size); + void *ctx; + COMMON_INTERCEPTOR_ENTER(ctx, bcmp, a1, a2, size); + return MemcmpInterceptorCommon(ctx, REAL(bcmp), a1, a2, size); +} + +#define INIT_BCMP COMMON_INTERCEPT_FUNCTION(bcmp) +#else +#define INIT_BCMP +#endif + #if SANITIZER_INTERCEPT_MEMCHR INTERCEPTOR(void*, memchr, const void *s, int c, SIZE_T n) { if (COMMON_INTERCEPTOR_NOTHING_IS_INITIALIZED) @@ -1817,61 +1837,53 @@ INTERCEPTOR(int, ioctl, int d, unsigned long request, ...) { #define INIT_IOCTL #endif -#if SANITIZER_INTERCEPT_GETPWNAM_AND_FRIENDS || \ - SANITIZER_INTERCEPT_GETPWENT || SANITIZER_INTERCEPT_FGETPWENT || \ - SANITIZER_INTERCEPT_GETPWENT_R || \ - SANITIZER_INTERCEPT_GETPWNAM_R_AND_FRIENDS || \ - SANITIZER_INTERCEPT_FGETPWENT_R || \ - SANITIZER_INTERCEPT_FGETGRENT_R -static void unpoison_passwd(void *ctx, __sanitizer_passwd *pwd) { +#if SANITIZER_POSIX +UNUSED static void unpoison_passwd(void *ctx, __sanitizer_passwd *pwd) { if (pwd) { COMMON_INTERCEPTOR_WRITE_RANGE(ctx, pwd, sizeof(*pwd)); if (pwd->pw_name) - COMMON_INTERCEPTOR_INITIALIZE_RANGE(pwd->pw_name, - REAL(strlen)(pwd->pw_name) + 1); + COMMON_INTERCEPTOR_WRITE_RANGE(ctx, pwd->pw_name, + REAL(strlen)(pwd->pw_name) + 1); if (pwd->pw_passwd) - COMMON_INTERCEPTOR_INITIALIZE_RANGE(pwd->pw_passwd, - REAL(strlen)(pwd->pw_passwd) + 1); + COMMON_INTERCEPTOR_WRITE_RANGE(ctx, pwd->pw_passwd, + REAL(strlen)(pwd->pw_passwd) + 1); #if !SANITIZER_ANDROID if (pwd->pw_gecos) - COMMON_INTERCEPTOR_INITIALIZE_RANGE(pwd->pw_gecos, - REAL(strlen)(pwd->pw_gecos) + 1); + COMMON_INTERCEPTOR_WRITE_RANGE(ctx, pwd->pw_gecos, + REAL(strlen)(pwd->pw_gecos) + 1); #endif -#if SANITIZER_MAC +#if SANITIZER_MAC || SANITIZER_FREEBSD || SANITIZER_NETBSD || SANITIZER_OPENBSD if (pwd->pw_class) - COMMON_INTERCEPTOR_INITIALIZE_RANGE(pwd->pw_class, - REAL(strlen)(pwd->pw_class) + 1); + COMMON_INTERCEPTOR_WRITE_RANGE(ctx, pwd->pw_class, + REAL(strlen)(pwd->pw_class) + 1); #endif if (pwd->pw_dir) - COMMON_INTERCEPTOR_INITIALIZE_RANGE(pwd->pw_dir, - REAL(strlen)(pwd->pw_dir) + 1); + COMMON_INTERCEPTOR_WRITE_RANGE(ctx, pwd->pw_dir, + REAL(strlen)(pwd->pw_dir) + 1); if (pwd->pw_shell) - COMMON_INTERCEPTOR_INITIALIZE_RANGE(pwd->pw_shell, - REAL(strlen)(pwd->pw_shell) + 1); + COMMON_INTERCEPTOR_WRITE_RANGE(ctx, pwd->pw_shell, + REAL(strlen)(pwd->pw_shell) + 1); } } -static void unpoison_group(void *ctx, __sanitizer_group *grp) { +UNUSED static void unpoison_group(void *ctx, __sanitizer_group *grp) { if (grp) { COMMON_INTERCEPTOR_WRITE_RANGE(ctx, grp, sizeof(*grp)); if (grp->gr_name) - COMMON_INTERCEPTOR_INITIALIZE_RANGE(grp->gr_name, - REAL(strlen)(grp->gr_name) + 1); + COMMON_INTERCEPTOR_WRITE_RANGE(ctx, grp->gr_name, + REAL(strlen)(grp->gr_name) + 1); if (grp->gr_passwd) - COMMON_INTERCEPTOR_INITIALIZE_RANGE(grp->gr_passwd, - REAL(strlen)(grp->gr_passwd) + 1); + COMMON_INTERCEPTOR_WRITE_RANGE(ctx, grp->gr_passwd, + REAL(strlen)(grp->gr_passwd) + 1); char **p = grp->gr_mem; for (; *p; ++p) { - COMMON_INTERCEPTOR_INITIALIZE_RANGE(*p, REAL(strlen)(*p) + 1); + COMMON_INTERCEPTOR_WRITE_RANGE(ctx, *p, REAL(strlen)(*p) + 1); } - COMMON_INTERCEPTOR_INITIALIZE_RANGE(grp->gr_mem, - (p - grp->gr_mem + 1) * sizeof(*p)); + COMMON_INTERCEPTOR_WRITE_RANGE(ctx, grp->gr_mem, + (p - grp->gr_mem + 1) * sizeof(*p)); } } -#endif // SANITIZER_INTERCEPT_GETPWNAM_AND_FRIENDS || - // SANITIZER_INTERCEPT_GETPWENT || SANITIZER_INTERCEPT_FGETPWENT || - // SANITIZER_INTERCEPT_GETPWENT_R || - // SANITIZER_INTERCEPT_GETPWNAM_R_AND_FRIENDS +#endif // SANITIZER_POSIX #if SANITIZER_INTERCEPT_GETPWNAM_AND_FRIENDS INTERCEPTOR(__sanitizer_passwd *, getpwnam, const char *name) { @@ -1880,14 +1892,14 @@ INTERCEPTOR(__sanitizer_passwd *, getpwnam, const char *name) { if (name) COMMON_INTERCEPTOR_READ_RANGE(ctx, name, REAL(strlen)(name) + 1); __sanitizer_passwd *res = REAL(getpwnam)(name); - if (res) unpoison_passwd(ctx, res); + unpoison_passwd(ctx, res); return res; } INTERCEPTOR(__sanitizer_passwd *, getpwuid, u32 uid) { void *ctx; COMMON_INTERCEPTOR_ENTER(ctx, getpwuid, uid); __sanitizer_passwd *res = REAL(getpwuid)(uid); - if (res) unpoison_passwd(ctx, res); + unpoison_passwd(ctx, res); return res; } INTERCEPTOR(__sanitizer_group *, getgrnam, const char *name) { @@ -1895,14 +1907,14 @@ INTERCEPTOR(__sanitizer_group *, getgrnam, const char *name) { COMMON_INTERCEPTOR_ENTER(ctx, getgrnam, name); COMMON_INTERCEPTOR_READ_RANGE(ctx, name, REAL(strlen)(name) + 1); __sanitizer_group *res = REAL(getgrnam)(name); - if (res) unpoison_group(ctx, res); + unpoison_group(ctx, res); return res; } INTERCEPTOR(__sanitizer_group *, getgrgid, u32 gid) { void *ctx; COMMON_INTERCEPTOR_ENTER(ctx, getgrgid, gid); __sanitizer_group *res = REAL(getgrgid)(gid); - if (res) unpoison_group(ctx, res); + unpoison_group(ctx, res); return res; } #define INIT_GETPWNAM_AND_FRIENDS \ @@ -1924,10 +1936,8 @@ INTERCEPTOR(int, getpwnam_r, const char *name, __sanitizer_passwd *pwd, // its metadata. See // https://github.com/google/sanitizers/issues/321. int res = REAL(getpwnam_r)(name, pwd, buf, buflen, result); - if (!res) { - if (result && *result) unpoison_passwd(ctx, *result); - COMMON_INTERCEPTOR_WRITE_RANGE(ctx, buf, buflen); - } + if (!res && result) + unpoison_passwd(ctx, *result); if (result) COMMON_INTERCEPTOR_WRITE_RANGE(ctx, result, sizeof(*result)); return res; } @@ -1939,10 +1949,8 @@ INTERCEPTOR(int, getpwuid_r, u32 uid, __sanitizer_passwd *pwd, char *buf, // its metadata. See // https://github.com/google/sanitizers/issues/321. int res = REAL(getpwuid_r)(uid, pwd, buf, buflen, result); - if (!res) { - if (result && *result) unpoison_passwd(ctx, *result); - COMMON_INTERCEPTOR_WRITE_RANGE(ctx, buf, buflen); - } + if (!res && result) + unpoison_passwd(ctx, *result); if (result) COMMON_INTERCEPTOR_WRITE_RANGE(ctx, result, sizeof(*result)); return res; } @@ -1955,10 +1963,8 @@ INTERCEPTOR(int, getgrnam_r, const char *name, __sanitizer_group *grp, // its metadata. See // https://github.com/google/sanitizers/issues/321. int res = REAL(getgrnam_r)(name, grp, buf, buflen, result); - if (!res) { - if (result && *result) unpoison_group(ctx, *result); - COMMON_INTERCEPTOR_WRITE_RANGE(ctx, buf, buflen); - } + if (!res && result) + unpoison_group(ctx, *result); if (result) COMMON_INTERCEPTOR_WRITE_RANGE(ctx, result, sizeof(*result)); return res; } @@ -1970,10 +1976,8 @@ INTERCEPTOR(int, getgrgid_r, u32 gid, __sanitizer_group *grp, char *buf, // its metadata. See // https://github.com/google/sanitizers/issues/321. int res = REAL(getgrgid_r)(gid, grp, buf, buflen, result); - if (!res) { - if (result && *result) unpoison_group(ctx, *result); - COMMON_INTERCEPTOR_WRITE_RANGE(ctx, buf, buflen); - } + if (!res && result) + unpoison_group(ctx, *result); if (result) COMMON_INTERCEPTOR_WRITE_RANGE(ctx, result, sizeof(*result)); return res; } @@ -1991,14 +1995,14 @@ INTERCEPTOR(__sanitizer_passwd *, getpwent, int dummy) { void *ctx; COMMON_INTERCEPTOR_ENTER(ctx, getpwent, dummy); __sanitizer_passwd *res = REAL(getpwent)(dummy); - if (res) unpoison_passwd(ctx, res); + unpoison_passwd(ctx, res); return res; } INTERCEPTOR(__sanitizer_group *, getgrent, int dummy) { void *ctx; COMMON_INTERCEPTOR_ENTER(ctx, getgrent, dummy); __sanitizer_group *res = REAL(getgrent)(dummy); - if (res) unpoison_group(ctx, res);; + unpoison_group(ctx, res); return res; } #define INIT_GETPWENT \ @@ -2013,14 +2017,14 @@ INTERCEPTOR(__sanitizer_passwd *, fgetpwent, void *fp) { void *ctx; COMMON_INTERCEPTOR_ENTER(ctx, fgetpwent, fp); __sanitizer_passwd *res = REAL(fgetpwent)(fp); - if (res) unpoison_passwd(ctx, res); + unpoison_passwd(ctx, res); return res; } INTERCEPTOR(__sanitizer_group *, fgetgrent, void *fp) { void *ctx; COMMON_INTERCEPTOR_ENTER(ctx, fgetgrent, fp); __sanitizer_group *res = REAL(fgetgrent)(fp); - if (res) unpoison_group(ctx, res); + unpoison_group(ctx, res); return res; } #define INIT_FGETPWENT \ @@ -2039,10 +2043,8 @@ INTERCEPTOR(int, getpwent_r, __sanitizer_passwd *pwbuf, char *buf, // its metadata. See // https://github.com/google/sanitizers/issues/321. int res = REAL(getpwent_r)(pwbuf, buf, buflen, pwbufp); - if (!res) { - if (pwbufp && *pwbufp) unpoison_passwd(ctx, *pwbufp); - COMMON_INTERCEPTOR_WRITE_RANGE(ctx, buf, buflen); - } + if (!res && pwbufp) + unpoison_passwd(ctx, *pwbufp); if (pwbufp) COMMON_INTERCEPTOR_WRITE_RANGE(ctx, pwbufp, sizeof(*pwbufp)); return res; } @@ -2054,10 +2056,8 @@ INTERCEPTOR(int, getgrent_r, __sanitizer_group *pwbuf, char *buf, SIZE_T buflen, // its metadata. See // https://github.com/google/sanitizers/issues/321. int res = REAL(getgrent_r)(pwbuf, buf, buflen, pwbufp); - if (!res) { - if (pwbufp && *pwbufp) unpoison_group(ctx, *pwbufp); - COMMON_INTERCEPTOR_WRITE_RANGE(ctx, buf, buflen); - } + if (!res && pwbufp) + unpoison_group(ctx, *pwbufp); if (pwbufp) COMMON_INTERCEPTOR_WRITE_RANGE(ctx, pwbufp, sizeof(*pwbufp)); return res; } @@ -2077,10 +2077,8 @@ INTERCEPTOR(int, fgetpwent_r, void *fp, __sanitizer_passwd *pwbuf, char *buf, // its metadata. See // https://github.com/google/sanitizers/issues/321. int res = REAL(fgetpwent_r)(fp, pwbuf, buf, buflen, pwbufp); - if (!res) { - if (pwbufp && *pwbufp) unpoison_passwd(ctx, *pwbufp); - COMMON_INTERCEPTOR_WRITE_RANGE(ctx, buf, buflen); - } + if (!res && pwbufp) + unpoison_passwd(ctx, *pwbufp); if (pwbufp) COMMON_INTERCEPTOR_WRITE_RANGE(ctx, pwbufp, sizeof(*pwbufp)); return res; } @@ -2099,10 +2097,8 @@ INTERCEPTOR(int, fgetgrent_r, void *fp, __sanitizer_group *pwbuf, char *buf, // its metadata. See // https://github.com/google/sanitizers/issues/321. int res = REAL(fgetgrent_r)(fp, pwbuf, buf, buflen, pwbufp); - if (!res) { - if (pwbufp && *pwbufp) unpoison_group(ctx, *pwbufp); - COMMON_INTERCEPTOR_WRITE_RANGE(ctx, buf, buflen); - } + if (!res && pwbufp) + unpoison_group(ctx, *pwbufp); if (pwbufp) COMMON_INTERCEPTOR_WRITE_RANGE(ctx, pwbufp, sizeof(*pwbufp)); return res; } @@ -4040,6 +4036,25 @@ INTERCEPTOR(int, sigprocmask, int how, __sanitizer_sigset_t *set, #define INIT_SIGPROCMASK #endif +#if SANITIZER_INTERCEPT_PTHREAD_SIGMASK +INTERCEPTOR(int, pthread_sigmask, int how, __sanitizer_sigset_t *set, + __sanitizer_sigset_t *oldset) { + void *ctx; + COMMON_INTERCEPTOR_ENTER(ctx, pthread_sigmask, how, set, oldset); + if (set) COMMON_INTERCEPTOR_READ_RANGE(ctx, set, sizeof(*set)); + // FIXME: under ASan the call below may write to freed memory and corrupt + // its metadata. See + // https://github.com/google/sanitizers/issues/321. + int res = REAL(pthread_sigmask)(how, set, oldset); + if (!res && oldset) + COMMON_INTERCEPTOR_WRITE_RANGE(ctx, oldset, sizeof(*oldset)); + return res; +} +#define INIT_PTHREAD_SIGMASK COMMON_INTERCEPT_FUNCTION(pthread_sigmask); +#else +#define INIT_PTHREAD_SIGMASK +#endif + #if SANITIZER_INTERCEPT_BACKTRACE INTERCEPTOR(int, backtrace, void **buffer, int size) { void *ctx; @@ -4723,6 +4738,20 @@ INTERCEPTOR(char *, tmpnam_r, char *s) { #define INIT_TMPNAM_R #endif +#if SANITIZER_INTERCEPT_TTYNAME +INTERCEPTOR(char *, ttyname, int fd) { + void *ctx; + COMMON_INTERCEPTOR_ENTER(ctx, ttyname, fd); + char *res = REAL(ttyname)(fd); + if (res != nullptr) + COMMON_INTERCEPTOR_INITIALIZE_RANGE(res, REAL(strlen)(res) + 1); + return res; +} +#define INIT_TTYNAME COMMON_INTERCEPT_FUNCTION(ttyname); +#else +#define INIT_TTYNAME +#endif + #if SANITIZER_INTERCEPT_TTYNAME_R INTERCEPTOR(int, ttyname_r, int fd, char *name, SIZE_T namesize) { void *ctx; @@ -5500,12 +5529,21 @@ INTERCEPTOR(void *, __bzero, void *block, uptr size) { void *ctx; COMMON_INTERCEPTOR_MEMSET_IMPL(ctx, block, 0, size); } - #define INIT___BZERO COMMON_INTERCEPT_FUNCTION(__bzero); #else #define INIT___BZERO #endif // SANITIZER_INTERCEPT___BZERO +#if SANITIZER_INTERCEPT_BZERO +INTERCEPTOR(void *, bzero, void *block, uptr size) { + void *ctx; + COMMON_INTERCEPTOR_MEMSET_IMPL(ctx, block, 0, size); +} +#define INIT_BZERO COMMON_INTERCEPT_FUNCTION(bzero); +#else +#define INIT_BZERO +#endif // SANITIZER_INTERCEPT_BZERO + #if SANITIZER_INTERCEPT_FTIME INTERCEPTOR(int, ftime, __sanitizer_timeb *tp) { void *ctx; @@ -9497,6 +9535,7 @@ static void InitializeCommonInterceptors() { INIT_MEMCPY; INIT_MEMCHR; INIT_MEMCMP; + INIT_BCMP; INIT_MEMRCHR; INIT_MEMMEM; INIT_READ; @@ -9598,6 +9637,7 @@ static void InitializeCommonInterceptors() { INIT_SIGSETOPS; INIT_SIGPENDING; INIT_SIGPROCMASK; + INIT_PTHREAD_SIGMASK; INIT_BACKTRACE; INIT__EXIT; INIT_PTHREAD_MUTEX_LOCK; @@ -9636,6 +9676,7 @@ static void InitializeCommonInterceptors() { INIT_PTHREAD_BARRIERATTR_GETPSHARED; INIT_TMPNAM; INIT_TMPNAM_R; + INIT_TTYNAME; INIT_TTYNAME_R; INIT_TEMPNAM; INIT_PTHREAD_SETNAME_NP; @@ -9661,6 +9702,7 @@ static void InitializeCommonInterceptors() { INIT_CAPGET; INIT_AEABI_MEM; INIT___BZERO; + INIT_BZERO; INIT_FTIME; INIT_XDR; INIT_TSEARCH; diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors_vfork_aarch64.inc.S b/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors_vfork_aarch64.inc.S new file mode 100644 index 0000000000000..20f42f1ea94ed --- /dev/null +++ b/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors_vfork_aarch64.inc.S @@ -0,0 +1,43 @@ +#if defined(__aarch64__) && defined(__linux__) + +#include "sanitizer_common/sanitizer_asm.h" + +ASM_HIDDEN(COMMON_INTERCEPTOR_SPILL_AREA) + +.comm _ZN14__interception10real_vforkE,8,8 +.globl ASM_WRAPPER_NAME(vfork) +ASM_TYPE_FUNCTION(ASM_WRAPPER_NAME(vfork)) +ASM_WRAPPER_NAME(vfork): + // Save x30 in the off-stack spill area. + stp xzr, x30, [sp, #-16]! + bl COMMON_INTERCEPTOR_SPILL_AREA + ldp xzr, x30, [sp], 16 + str x30, [x0] + + // Call real vfork. This may return twice. User code that runs between the first and the second return + // may clobber the stack frame of the interceptor; that's why it does not have a frame. + adrp x0, _ZN14__interception10real_vforkE + ldr x0, [x0, :lo12:_ZN14__interception10real_vforkE] + blr x0 + + stp x0, xzr, [sp, #-16]! + cmp x0, #0 + b.eq .L_exit + + // x0 != 0 => parent process. Clear stack shadow. + add x0, sp, #16 + bl COMMON_INTERCEPTOR_HANDLE_VFORK + +.L_exit: + // Restore x30. + bl COMMON_INTERCEPTOR_SPILL_AREA + ldr x30, [x0] + ldp x0, xzr, [sp], 16 + + ret +ASM_SIZE(vfork) + +.weak vfork +.set vfork, ASM_WRAPPER_NAME(vfork) + +#endif diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors_vfork_arm.inc.S b/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors_vfork_arm.inc.S new file mode 100644 index 0000000000000..780a9d46e26a0 --- /dev/null +++ b/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors_vfork_arm.inc.S @@ -0,0 +1,49 @@ +#if defined(__arm__) && defined(__linux__) + +#include "sanitizer_common/sanitizer_asm.h" + +ASM_HIDDEN(COMMON_INTERCEPTOR_SPILL_AREA) + +.comm _ZN14__interception10real_vforkE,4,4 +.globl ASM_WRAPPER_NAME(vfork) +ASM_TYPE_FUNCTION(ASM_WRAPPER_NAME(vfork)) +ASM_WRAPPER_NAME(vfork): + // Save LR in the off-stack spill area. + push {r4, lr} + bl COMMON_INTERCEPTOR_SPILL_AREA + pop {r4, lr} + str lr, [r0] + + // Call real vfork. This may return twice. User code that runs between the first and the second return + // may clobber the stack frame of the interceptor; that's why it does not have a frame. + ldr r0, .LCPI0_0 +.LPC0_0: + ldr r0, [pc, r0] + mov lr, pc + bx r0 + + push {r0, r4} + cmp r0, #0 + beq .L_exit + + // r0 != 0 => parent process. Clear stack shadow. + add r0, sp, #8 + bl COMMON_INTERCEPTOR_HANDLE_VFORK + +.L_exit: + // Restore LR. + bl COMMON_INTERCEPTOR_SPILL_AREA + ldr lr, [r0] + pop {r0, r4} + + mov pc, lr + +.LCPI0_0: + .long _ZN14__interception10real_vforkE - (.LPC0_0+8) + +ASM_SIZE(vfork) + +.weak vfork +.set vfork, ASM_WRAPPER_NAME(vfork) + +#endif diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors_vfork_i386.inc.S b/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors_vfork_i386.inc.S new file mode 100644 index 0000000000000..ed693819c6d4d --- /dev/null +++ b/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors_vfork_i386.inc.S @@ -0,0 +1,63 @@ +#if defined(__i386__) && defined(__linux__) + +#include "sanitizer_common/sanitizer_asm.h" + +.comm _ZN14__interception10real_vforkE,4,4 +.globl ASM_WRAPPER_NAME(vfork) +ASM_TYPE_FUNCTION(ASM_WRAPPER_NAME(vfork)) +ASM_WRAPPER_NAME(vfork): + // Store return address in the spill area and tear down the stack frame. + sub $12, %esp + call COMMON_INTERCEPTOR_SPILL_AREA + mov 12(%esp), %ecx + mov %ecx, (%eax) + add $16, %esp + + call .L0$pb +.L0$pb: + pop %eax +.Ltmp0: + add $_GLOBAL_OFFSET_TABLE_+(.Ltmp0-.L0$pb), %eax + call *_ZN14__interception10real_vforkE@GOTOFF(%eax) + + // Restore the stack frame. + // 12(%esp) return address + // 8(%esp) spill %ebx + // 4(%esp) spill REAL(vfork) return value + // (%esp) call frame (arg0) for __*_handle_vfork + sub $16, %esp + mov %ebx, 8(%esp) + mov %eax, 4(%esp) + + // Form GOT address in %ebx. + call .L1$pb +.L1$pb: + pop %ebx +.Ltmp1: + add $_GLOBAL_OFFSET_TABLE_+(.Ltmp1-.L1$pb), %ebx + + // Restore original return address. + call COMMON_INTERCEPTOR_SPILL_AREA + mov (%eax), %ecx + mov %ecx, 12(%esp) + mov 4(%esp), %eax + + // Call handle_vfork in the parent process (%rax != 0). + test %eax, %eax + je .L_exit + + lea 16(%esp), %ecx + mov %ecx, (%esp) + call COMMON_INTERCEPTOR_HANDLE_VFORK@PLT + +.L_exit: + mov 4(%esp), %eax + mov 8(%esp), %ebx + add $12, %esp + ret +ASM_SIZE(vfork) + +.weak vfork +.set vfork, ASM_WRAPPER_NAME(vfork) + +#endif diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors_vfork_x86_64.inc.S b/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors_vfork_x86_64.inc.S new file mode 100644 index 0000000000000..8147cdd092473 --- /dev/null +++ b/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors_vfork_x86_64.inc.S @@ -0,0 +1,41 @@ +#if defined(__x86_64__) && defined(__linux__) + +#include "sanitizer_common/sanitizer_asm.h" + +.comm _ZN14__interception10real_vforkE,8,8 +.globl ASM_WRAPPER_NAME(vfork) +ASM_TYPE_FUNCTION(ASM_WRAPPER_NAME(vfork)) +ASM_WRAPPER_NAME(vfork): + // Store return address in the spill area and tear down the stack frame. + push %rcx + call COMMON_INTERCEPTOR_SPILL_AREA + pop %rcx + pop %rdi + mov %rdi, (%rax) + + call *_ZN14__interception10real_vforkE(%rip) + + // Restore return address from the spill area. + push %rcx + push %rax + call COMMON_INTERCEPTOR_SPILL_AREA + mov (%rax), %rdx + mov %rdx, 8(%rsp) + mov (%rsp), %rax + + // Call handle_vfork in the parent process (%rax != 0). + test %rax, %rax + je .L_exit + + lea 16(%rsp), %rdi + call COMMON_INTERCEPTOR_HANDLE_VFORK@PLT + +.L_exit: + pop %rax + ret +ASM_SIZE(vfork) + +.weak vfork +.set vfork, ASM_WRAPPER_NAME(vfork) + +#endif diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_flags.inc b/compiler-rt/lib/sanitizer_common/sanitizer_flags.inc index aa2689483b8eb..7d592bdcb61fc 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_flags.inc +++ b/compiler-rt/lib/sanitizer_common/sanitizer_flags.inc @@ -218,9 +218,9 @@ COMMON_FLAG(bool, intercept_stat, true, COMMON_FLAG(bool, intercept_send, true, "If set, uses custom wrappers for send* functions " "to find more errors.") -COMMON_FLAG(bool, decorate_proc_maps, false, "If set, decorate sanitizer " - "mappings in /proc/self/maps with " - "user-readable names") +COMMON_FLAG(bool, decorate_proc_maps, (bool)SANITIZER_ANDROID, + "If set, decorate sanitizer mappings in /proc/self/maps with " + "user-readable names") COMMON_FLAG(int, exitcode, 1, "Override the program exit status if the tool " "found an error") COMMON_FLAG( diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_fuchsia.cc b/compiler-rt/lib/sanitizer_common/sanitizer_fuchsia.cc index 3bbade7d8383f..9f6851ff019b9 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_fuchsia.cc +++ b/compiler-rt/lib/sanitizer_common/sanitizer_fuchsia.cc @@ -252,12 +252,14 @@ static uptr DoMmapFixedOrDie(zx_handle_t vmar, uptr fixed_addr, uptr map_size, return addr; } -uptr ReservedAddressRange::Map(uptr fixed_addr, uptr map_size) { +uptr ReservedAddressRange::Map(uptr fixed_addr, uptr map_size, + const char *name) { return DoMmapFixedOrDie(os_handle_, fixed_addr, map_size, base_, name_, false); } -uptr ReservedAddressRange::MapOrDie(uptr fixed_addr, uptr map_size) { +uptr ReservedAddressRange::MapOrDie(uptr fixed_addr, uptr map_size, + const char *name) { return DoMmapFixedOrDie(os_handle_, fixed_addr, map_size, base_, name_, true); } diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_hash.h b/compiler-rt/lib/sanitizer_common/sanitizer_hash.h new file mode 100644 index 0000000000000..3d97dcc5d2802 --- /dev/null +++ b/compiler-rt/lib/sanitizer_common/sanitizer_hash.h @@ -0,0 +1,43 @@ +//===-- sanitizer_common.h --------------------------------------*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// +// This file implements a simple hash function. +//===----------------------------------------------------------------------===// + +#ifndef SANITIZER_HASH_H +#define SANITIZER_HASH_H + +#include "sanitizer_internal_defs.h" + +namespace __sanitizer { +class MurMur2HashBuilder { + static const u32 m = 0x5bd1e995; + static const u32 seed = 0x9747b28c; + static const u32 r = 24; + u32 h; + + public: + explicit MurMur2HashBuilder(u32 init = 0) { h = seed ^ init; } + void add(u32 k) { + k *= m; + k ^= k >> r; + k *= m; + h *= m; + h ^= k; + } + u32 get() { + u32 x = h; + x ^= x >> 13; + x *= m; + x ^= x >> 15; + return x; + } +}; +} //namespace __sanitizer + +#endif // SANITIZER_HASH_H diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_interceptors_ioctl_netbsd.inc b/compiler-rt/lib/sanitizer_common/sanitizer_interceptors_ioctl_netbsd.inc index eb667c6049429..f29226b3ee3a3 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_interceptors_ioctl_netbsd.inc +++ b/compiler-rt/lib/sanitizer_common/sanitizer_interceptors_ioctl_netbsd.inc @@ -24,7 +24,7 @@ struct ioctl_desc { const char *name; }; -const unsigned ioctl_table_max = 1202; +const unsigned ioctl_table_max = 1200; static ioctl_desc ioctl_table[ioctl_table_max]; static unsigned ioctl_table_size = 0; @@ -297,9 +297,6 @@ static void ioctl_table_fill() { _(IRFRAMETTY_GET_DEVICE, WRITE, sizeof(unsigned int)); _(IRFRAMETTY_GET_DONGLE, WRITE, sizeof(unsigned int)); _(IRFRAMETTY_SET_DONGLE, READ, sizeof(unsigned int)); - /* Entries from file: dev/isa/satlinkio.h */ - _(SATIORESET, NONE, 0); - _(SATIOGID, WRITE, struct_satlink_id_sz); /* Entries from file: dev/isa/isvio.h */ _(ISV_CMD, READWRITE, struct_isv_cmd_sz); /* Entries from file: dev/isa/wtreg.h */ @@ -648,8 +645,8 @@ static void ioctl_table_fill() { _(SPKRTUNE, NONE, 0); _(SPKRGETVOL, WRITE, sizeof(unsigned int)); _(SPKRSETVOL, READ, sizeof(unsigned int)); - /* Entries from file: dev/nvmm/nvmm_ioctl.h */ #if 0 /* WIP */ + /* Entries from file: dev/nvmm/nvmm_ioctl.h */ _(NVMM_IOC_CAPABILITY, WRITE, struct_nvmm_ioc_capability_sz); _(NVMM_IOC_MACHINE_CREATE, READWRITE, struct_nvmm_ioc_machine_create_sz); _(NVMM_IOC_MACHINE_DESTROY, READ, struct_nvmm_ioc_machine_destroy_sz); @@ -658,7 +655,7 @@ static void ioctl_table_fill() { _(NVMM_IOC_VCPU_DESTROY, READ, struct_nvmm_ioc_vcpu_destroy_sz); _(NVMM_IOC_VCPU_SETSTATE, READ, struct_nvmm_ioc_vcpu_setstate_sz); _(NVMM_IOC_VCPU_GETSTATE, READ, struct_nvmm_ioc_vcpu_getstate_sz); - _(NVMM_IOC_VCPU_INJECT, READWRITE, struct_nvmm_ioc_vcpu_inject_sz); + _(NVMM_IOC_VCPU_INJECT, READ, struct_nvmm_ioc_vcpu_inject_sz); _(NVMM_IOC_VCPU_RUN, READWRITE, struct_nvmm_ioc_vcpu_run_sz); _(NVMM_IOC_GPA_MAP, READ, struct_nvmm_ioc_gpa_map_sz); _(NVMM_IOC_GPA_UNMAP, READ, struct_nvmm_ioc_gpa_unmap_sz); diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_linux.cc b/compiler-rt/lib/sanitizer_common/sanitizer_linux.cc index 3ca48ae7076b2..8b981fb025f00 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_linux.cc +++ b/compiler-rt/lib/sanitizer_common/sanitizer_linux.cc @@ -400,7 +400,7 @@ uptr internal_readlink(const char *path, char *buf, uptr bufsize) { return internal_syscall(SYSCALL(readlinkat), AT_FDCWD, (uptr)path, (uptr)buf, bufsize); #else - return internal_syscall(SYSCALL(readlink), path, buf, bufsize); + return internal_syscall(SYSCALL(readlink), (uptr)path, (uptr)buf, bufsize); #endif } diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_linux_mips64.S b/compiler-rt/lib/sanitizer_common/sanitizer_linux_mips64.S index a63b7d1f4dd7b..ac6ff22e71c05 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_linux_mips64.S +++ b/compiler-rt/lib/sanitizer_common/sanitizer_linux_mips64.S @@ -2,10 +2,10 @@ // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +#include "sanitizer_common/sanitizer_asm.h" + // Avoid being marked as needing an executable stack: -#if defined(__linux__) && defined(__ELF__) -.section .note.GNU-stack,"",%progbits -#endif +NO_EXEC_STACK_DIRECTIVE // Further contents are mips64 only: #if defined(__linux__) && defined(__mips64) diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_linux_x86_64.S b/compiler-rt/lib/sanitizer_common/sanitizer_linux_x86_64.S index 2a4f2e4d982a0..d22d6d1c24fa2 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_linux_x86_64.S +++ b/compiler-rt/lib/sanitizer_common/sanitizer_linux_x86_64.S @@ -2,10 +2,10 @@ // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +#include "sanitizer_common/sanitizer_asm.h" + // Avoid being marked as needing an executable stack: -#if defined(__linux__) && defined(__ELF__) -.section .note.GNU-stack,"",%progbits -#endif +NO_EXEC_STACK_DIRECTIVE // Further contents are x86_64-only: #if defined(__linux__) && defined(__x86_64__) diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h b/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h index c9ed53d6bbd69..a4116f8a0aa7f 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h +++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h @@ -142,6 +142,9 @@ #define SANITIZER_INTERCEPT_MEMMOVE 1 #define SANITIZER_INTERCEPT_MEMCPY 1 #define SANITIZER_INTERCEPT_MEMCMP SI_NOT_FUCHSIA +#define SANITIZER_INTERCEPT_BCMP \ + SANITIZER_INTERCEPT_MEMCMP && \ + ((SI_POSIX && _GNU_SOURCE) || SI_NETBSD || SI_OPENBSD || SI_FREEBSD) #define SANITIZER_INTERCEPT_STRNDUP SI_POSIX #define SANITIZER_INTERCEPT___STRNDUP SI_LINUX_NOT_FREEBSD #if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && \ @@ -308,6 +311,7 @@ (SI_FREEBSD || SI_NETBSD || SI_MAC || SI_LINUX_NOT_ANDROID || SI_SOLARIS) #define SANITIZER_INTERCEPT_SIGPENDING SI_POSIX #define SANITIZER_INTERCEPT_SIGPROCMASK SI_POSIX +#define SANITIZER_INTERCEPT_PTHREAD_SIGMASK SI_POSIX #define SANITIZER_INTERCEPT_BACKTRACE \ (SI_FREEBSD || SI_NETBSD || SI_OPENBSD || SI_LINUX_NOT_ANDROID || SI_SOLARIS) #define SANITIZER_INTERCEPT_GETMNTENT SI_LINUX @@ -356,6 +360,7 @@ #define SANITIZER_INTERCEPT_THR_EXIT SI_FREEBSD #define SANITIZER_INTERCEPT_TMPNAM SI_POSIX #define SANITIZER_INTERCEPT_TMPNAM_R SI_LINUX_NOT_ANDROID || SI_SOLARIS +#define SANITIZER_INTERCEPT_TTYNAME SI_POSIX #define SANITIZER_INTERCEPT_TTYNAME_R SI_POSIX #define SANITIZER_INTERCEPT_TEMPNAM SI_POSIX #define SANITIZER_INTERCEPT_SINCOS SI_LINUX || SI_SOLARIS @@ -406,7 +411,8 @@ #else #define SANITIZER_INTERCEPT_AEABI_MEM 0 #endif -#define SANITIZER_INTERCEPT___BZERO SI_MAC +#define SANITIZER_INTERCEPT___BZERO SI_MAC || SI_LINUX_NOT_ANDROID +#define SANITIZER_INTERCEPT_BZERO SI_LINUX_NOT_ANDROID #define SANITIZER_INTERCEPT_FTIME \ (!SI_FREEBSD && !SI_NETBSD && !SI_OPENBSD && SI_POSIX) #define SANITIZER_INTERCEPT_XDR SI_LINUX_NOT_ANDROID || SI_SOLARIS diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc index 1a95d7f5afcf7..5860be2287e7d 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc +++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc @@ -121,7 +121,6 @@ #include #include #include -#include #include #include #include @@ -638,7 +637,6 @@ unsigned struct_rf_recon_req_sz = sizeof(rf_recon_req); unsigned struct_rio_conf_sz = sizeof(rio_conf); unsigned struct_rio_interface_sz = sizeof(rio_interface); unsigned struct_rio_stats_sz = sizeof(rio_stats); -unsigned struct_satlink_id_sz = sizeof(satlink_id); unsigned struct_scan_io_sz = sizeof(scan_io); unsigned struct_scbusaccel_args_sz = sizeof(scbusaccel_args); unsigned struct_scbusiodetach_args_sz = sizeof(scbusiodetach_args); @@ -1104,9 +1102,6 @@ unsigned IOCTL_IRDA_GET_TURNAROUNDMASK = IRDA_GET_TURNAROUNDMASK; unsigned IOCTL_IRFRAMETTY_GET_DEVICE = IRFRAMETTY_GET_DEVICE; unsigned IOCTL_IRFRAMETTY_GET_DONGLE = IRFRAMETTY_GET_DONGLE; unsigned IOCTL_IRFRAMETTY_SET_DONGLE = IRFRAMETTY_SET_DONGLE; -unsigned IOCTL_SATIORESET = SATIORESET; -unsigned IOCTL_SATIOGID = SATIOGID; -unsigned IOCTL_SATIOSBUFSIZE = SATIOSBUFSIZE; unsigned IOCTL_ISV_CMD = ISV_CMD; unsigned IOCTL_WTQICMD = WTQICMD; unsigned IOCTL_ISCSI_GET_VERSION = ISCSI_GET_VERSION; diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_netbsd.h b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_netbsd.h index a4e1c085fa244..add9852ec6c30 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_netbsd.h +++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_netbsd.h @@ -802,7 +802,6 @@ extern unsigned struct_rf_recon_req_sz; extern unsigned struct_rio_conf_sz; extern unsigned struct_rio_interface_sz; extern unsigned struct_rio_stats_sz; -extern unsigned struct_satlink_id_sz; extern unsigned struct_scan_io_sz; extern unsigned struct_scbusaccel_args_sz; extern unsigned struct_scbusiodetach_args_sz; @@ -1265,9 +1264,6 @@ extern unsigned IOCTL_IRDA_GET_TURNAROUNDMASK; extern unsigned IOCTL_IRFRAMETTY_GET_DEVICE; extern unsigned IOCTL_IRFRAMETTY_GET_DONGLE; extern unsigned IOCTL_IRFRAMETTY_SET_DONGLE; -extern unsigned IOCTL_SATIORESET; -extern unsigned IOCTL_SATIOGID; -extern unsigned IOCTL_SATIOSBUFSIZE; extern unsigned IOCTL_ISV_CMD; extern unsigned IOCTL_WTQICMD; extern unsigned IOCTL_ISCSI_GET_VERSION; diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_posix.cc b/compiler-rt/lib/sanitizer_common/sanitizer_posix.cc index d2ebf81f62ca0..91e7f0fb087ce 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_posix.cc +++ b/compiler-rt/lib/sanitizer_common/sanitizer_posix.cc @@ -43,9 +43,8 @@ uptr GetMmapGranularity() { void *MmapOrDie(uptr size, const char *mem_type, bool raw_report) { size = RoundUpTo(size, GetPageSizeCached()); - uptr res = internal_mmap(nullptr, size, - PROT_READ | PROT_WRITE, - MAP_PRIVATE | MAP_ANON, -1, 0); + uptr res = MmapNamed(nullptr, size, PROT_READ | PROT_WRITE, + MAP_PRIVATE | MAP_ANON, mem_type); int reserrno; if (UNLIKELY(internal_iserror(res, &reserrno))) ReportMmapFailureAndDie(size, mem_type, "allocate", reserrno, raw_report); @@ -66,9 +65,8 @@ void UnmapOrDie(void *addr, uptr size) { void *MmapOrDieOnFatalError(uptr size, const char *mem_type) { size = RoundUpTo(size, GetPageSizeCached()); - uptr res = internal_mmap(nullptr, size, - PROT_READ | PROT_WRITE, - MAP_PRIVATE | MAP_ANON, -1, 0); + uptr res = MmapNamed(nullptr, size, PROT_READ | PROT_WRITE, + MAP_PRIVATE | MAP_ANON, mem_type); int reserrno; if (UNLIKELY(internal_iserror(res, &reserrno))) { if (reserrno == ENOMEM) @@ -103,12 +101,9 @@ void *MmapAlignedOrDieOnFatalError(uptr size, uptr alignment, } void *MmapNoReserveOrDie(uptr size, const char *mem_type) { - uptr PageSize = GetPageSizeCached(); - uptr p = internal_mmap(nullptr, - RoundUpTo(size, PageSize), - PROT_READ | PROT_WRITE, - MAP_PRIVATE | MAP_ANON | MAP_NORESERVE, - -1, 0); + size = RoundUpTo(size, GetPageSizeCached()); + uptr p = MmapNamed(nullptr, size, PROT_READ | PROT_WRITE, + MAP_PRIVATE | MAP_ANON | MAP_NORESERVE, mem_type); int reserrno; if (UNLIKELY(internal_iserror(p, &reserrno))) ReportMmapFailureAndDie(size, mem_type, "allocate noreserve", reserrno); @@ -116,13 +111,12 @@ void *MmapNoReserveOrDie(uptr size, const char *mem_type) { return (void *)p; } -void *MmapFixedImpl(uptr fixed_addr, uptr size, bool tolerate_enomem) { - uptr PageSize = GetPageSizeCached(); - uptr p = internal_mmap((void*)(fixed_addr & ~(PageSize - 1)), - RoundUpTo(size, PageSize), - PROT_READ | PROT_WRITE, - MAP_PRIVATE | MAP_ANON | MAP_FIXED, - -1, 0); +static void *MmapFixedImpl(uptr fixed_addr, uptr size, bool tolerate_enomem, + const char *name) { + size = RoundUpTo(size, GetPageSizeCached()); + fixed_addr = RoundDownTo(fixed_addr, GetPageSizeCached()); + uptr p = MmapNamed((void *)fixed_addr, size, PROT_READ | PROT_WRITE, + MAP_PRIVATE | MAP_ANON | MAP_FIXED, name); int reserrno; if (UNLIKELY(internal_iserror(p, &reserrno))) { if (tolerate_enomem && reserrno == ENOMEM) @@ -136,12 +130,12 @@ void *MmapFixedImpl(uptr fixed_addr, uptr size, bool tolerate_enomem) { return (void *)p; } -void *MmapFixedOrDie(uptr fixed_addr, uptr size) { - return MmapFixedImpl(fixed_addr, size, false /*tolerate_enomem*/); +void *MmapFixedOrDie(uptr fixed_addr, uptr size, const char *name) { + return MmapFixedImpl(fixed_addr, size, false /*tolerate_enomem*/, name); } -void *MmapFixedOrDieOnFatalError(uptr fixed_addr, uptr size) { - return MmapFixedImpl(fixed_addr, size, true /*tolerate_enomem*/); +void *MmapFixedOrDieOnFatalError(uptr fixed_addr, uptr size, const char *name) { + return MmapFixedImpl(fixed_addr, size, true /*tolerate_enomem*/, name); } bool MprotectNoAccess(uptr addr, uptr size) { @@ -343,6 +337,53 @@ bool ShouldMockFailureToOpen(const char *path) { internal_strncmp(path, "/proc/", 6) == 0; } +#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_GO +int GetNamedMappingFd(const char *name, uptr size, int *flags) { + if (!common_flags()->decorate_proc_maps || !name) + return -1; + char shmname[200]; + CHECK(internal_strlen(name) < sizeof(shmname) - 10); + internal_snprintf(shmname, sizeof(shmname), "/dev/shm/%zu [%s]", + internal_getpid(), name); + int fd = ReserveStandardFds( + internal_open(shmname, O_RDWR | O_CREAT | O_TRUNC | O_CLOEXEC, S_IRWXU)); + CHECK_GE(fd, 0); + int res = internal_ftruncate(fd, size); + CHECK_EQ(0, res); + res = internal_unlink(shmname); + CHECK_EQ(0, res); + *flags &= ~(MAP_ANON | MAP_ANONYMOUS); + return fd; +} +#else +int GetNamedMappingFd(const char *name, uptr size, int *flags) { + return -1; +} +#endif + +#if SANITIZER_ANDROID +#define PR_SET_VMA 0x53564d41 +#define PR_SET_VMA_ANON_NAME 0 +void DecorateMapping(uptr addr, uptr size, const char *name) { + if (!common_flags()->decorate_proc_maps || !name) + return; + CHECK(internal_prctl(PR_SET_VMA, PR_SET_VMA_ANON_NAME, addr, size, + (uptr)name) == 0); +} +#else +void DecorateMapping(uptr addr, uptr size, const char *name) { +} +#endif + +uptr MmapNamed(void *addr, uptr length, int prot, int flags, const char *name) { + int fd = GetNamedMappingFd(name, length, &flags); + uptr res = internal_mmap(addr, length, prot, flags, fd, 0); + if (!internal_iserror(res)) + DecorateMapping(res, length, name); + return res; +} + + } // namespace __sanitizer #endif // SANITIZER_POSIX diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_posix.h b/compiler-rt/lib/sanitizer_common/sanitizer_posix.h index 837bfb0c24b2f..7b88e8815d8ef 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_posix.h +++ b/compiler-rt/lib/sanitizer_common/sanitizer_posix.h @@ -104,6 +104,18 @@ fd_t ReserveStandardFds(fd_t fd); bool ShouldMockFailureToOpen(const char *path); +// Create a non-file mapping with a given /proc/self/maps name. +uptr MmapNamed(void *addr, uptr length, int prot, int flags, const char *name); + +// Platforms should implement at most one of these. +// 1. Provide a pre-decorated file descriptor to use instead of an anonymous +// mapping. +int GetNamedMappingFd(const char *name, uptr size, int *flags); +// 2. Add name to an existing anonymous mapping. The caller must keep *name +// alive at least as long as the mapping exists. +void DecorateMapping(uptr addr, uptr size, const char *name); + + } // namespace __sanitizer #endif // SANITIZER_POSIX_H diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_posix_libcdep.cc b/compiler-rt/lib/sanitizer_common/sanitizer_posix_libcdep.cc index 62ca0f317274c..e67343709ad1d 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_posix_libcdep.cc +++ b/compiler-rt/lib/sanitizer_common/sanitizer_posix_libcdep.cc @@ -307,37 +307,11 @@ void PlatformPrepareForSandboxing(__sanitizer_sandbox_arguments *args) { MemoryMappingLayout::CacheMemoryMappings(); } -#if SANITIZER_ANDROID || SANITIZER_GO -int GetNamedMappingFd(const char *name, uptr size) { - return -1; -} -#else -int GetNamedMappingFd(const char *name, uptr size) { - if (!common_flags()->decorate_proc_maps) - return -1; - char shmname[200]; - CHECK(internal_strlen(name) < sizeof(shmname) - 10); - internal_snprintf(shmname, sizeof(shmname), "%zu [%s]", internal_getpid(), - name); - int fd = shm_open(shmname, O_RDWR | O_CREAT | O_TRUNC, S_IRWXU); - CHECK_GE(fd, 0); - int res = internal_ftruncate(fd, size); - CHECK_EQ(0, res); - res = shm_unlink(shmname); - CHECK_EQ(0, res); - return fd; -} -#endif - bool MmapFixedNoReserve(uptr fixed_addr, uptr size, const char *name) { - int fd = name ? GetNamedMappingFd(name, size) : -1; - unsigned flags = MAP_PRIVATE | MAP_FIXED | MAP_NORESERVE; - if (fd == -1) flags |= MAP_ANON; - - uptr PageSize = GetPageSizeCached(); - uptr p = internal_mmap((void *)(fixed_addr & ~(PageSize - 1)), - RoundUpTo(size, PageSize), PROT_READ | PROT_WRITE, - flags, fd, 0); + size = RoundUpTo(size, GetPageSizeCached()); + fixed_addr = RoundDownTo(fixed_addr, GetPageSizeCached()); + uptr p = MmapNamed((void *)fixed_addr, size, PROT_READ | PROT_WRITE, + MAP_PRIVATE | MAP_FIXED | MAP_NORESERVE | MAP_ANON, name); int reserrno; if (internal_iserror(p, &reserrno)) { Report("ERROR: %s failed to " @@ -350,12 +324,8 @@ bool MmapFixedNoReserve(uptr fixed_addr, uptr size, const char *name) { } uptr ReservedAddressRange::Init(uptr size, const char *name, uptr fixed_addr) { - // We don't pass `name` along because, when you enable `decorate_proc_maps` - // AND actually use a named mapping AND are using a sanitizer intercepting - // `open` (e.g. TSAN, ESAN), then you'll get a failure during initialization. - // TODO(flowerhack): Fix the implementation of GetNamedMappingFd to solve - // this problem. - base_ = fixed_addr ? MmapFixedNoAccess(fixed_addr, size) : MmapNoAccess(size); + base_ = fixed_addr ? MmapFixedNoAccess(fixed_addr, size, name) + : MmapNoAccess(size); size_ = size; name_ = name; (void)os_handle_; // unsupported @@ -364,12 +334,14 @@ uptr ReservedAddressRange::Init(uptr size, const char *name, uptr fixed_addr) { // Uses fixed_addr for now. // Will use offset instead once we've implemented this function for real. -uptr ReservedAddressRange::Map(uptr fixed_addr, uptr size) { - return reinterpret_cast(MmapFixedOrDieOnFatalError(fixed_addr, size)); +uptr ReservedAddressRange::Map(uptr fixed_addr, uptr size, const char *name) { + return reinterpret_cast( + MmapFixedOrDieOnFatalError(fixed_addr, size, name)); } -uptr ReservedAddressRange::MapOrDie(uptr fixed_addr, uptr size) { - return reinterpret_cast(MmapFixedOrDie(fixed_addr, size)); +uptr ReservedAddressRange::MapOrDie(uptr fixed_addr, uptr size, + const char *name) { + return reinterpret_cast(MmapFixedOrDie(fixed_addr, size, name)); } void ReservedAddressRange::Unmap(uptr addr, uptr size) { @@ -384,12 +356,9 @@ void ReservedAddressRange::Unmap(uptr addr, uptr size) { } void *MmapFixedNoAccess(uptr fixed_addr, uptr size, const char *name) { - int fd = name ? GetNamedMappingFd(name, size) : -1; - unsigned flags = MAP_PRIVATE | MAP_FIXED | MAP_NORESERVE; - if (fd == -1) flags |= MAP_ANON; - - return (void *)internal_mmap((void *)fixed_addr, size, PROT_NONE, flags, fd, - 0); + return (void *)MmapNamed((void *)fixed_addr, size, PROT_NONE, + MAP_PRIVATE | MAP_FIXED | MAP_NORESERVE | MAP_ANON, + name); } void *MmapNoAccess(uptr size) { diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_stackdepot.cc b/compiler-rt/lib/sanitizer_common/sanitizer_stackdepot.cc index a38cb9dee1db0..1cdedfa32fbe4 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_stackdepot.cc +++ b/compiler-rt/lib/sanitizer_common/sanitizer_stackdepot.cc @@ -13,6 +13,7 @@ #include "sanitizer_stackdepot.h" #include "sanitizer_common.h" +#include "sanitizer_hash.h" #include "sanitizer_stackdepotbase.h" namespace __sanitizer { @@ -49,23 +50,9 @@ struct StackDepotNode { return sizeof(StackDepotNode) + (args.size - 1) * sizeof(uptr); } static u32 hash(const args_type &args) { - // murmur2 - const u32 m = 0x5bd1e995; - const u32 seed = 0x9747b28c; - const u32 r = 24; - u32 h = seed ^ (args.size * sizeof(uptr)); - for (uptr i = 0; i < args.size; i++) { - u32 k = args.trace[i]; - k *= m; - k ^= k >> r; - k *= m; - h *= m; - h ^= k; - } - h ^= h >> 13; - h *= m; - h ^= h >> 15; - return h; + MurMur2HashBuilder H(args.size * sizeof(uptr)); + for (uptr i = 0; i < args.size; i++) H.add(args.trace[i]); + return H.get(); } static bool is_valid(const args_type &args) { return args.size > 0 && args.trace; diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_stacktrace.cc b/compiler-rt/lib/sanitizer_common/sanitizer_stacktrace.cc index c3d9f9a42c7ae..1f7dd379084fb 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_stacktrace.cc +++ b/compiler-rt/lib/sanitizer_common/sanitizer_stacktrace.cc @@ -49,6 +49,7 @@ void BufferedStackTrace::Init(const uptr *pcs, uptr cnt, uptr extra_top_pc) { static inline uhwptr *GetCanonicFrame(uptr bp, uptr stack_top, uptr stack_bottom) { + CHECK_GT(stack_top, stack_bottom); #ifdef __arm__ if (!IsValidFrame(bp, stack_top, stack_bottom)) return 0; uhwptr *bp_prev = (uhwptr *)bp; @@ -67,10 +68,11 @@ static inline uhwptr *GetCanonicFrame(uptr bp, #endif } -void BufferedStackTrace::FastUnwindStack(uptr pc, uptr bp, uptr stack_top, - uptr stack_bottom, u32 max_depth) { - const uptr kPageSize = GetPageSizeCached(); +void BufferedStackTrace::UnwindFast(uptr pc, uptr bp, uptr stack_top, + uptr stack_bottom, u32 max_depth) { + // TODO(yln): add arg sanity check for stack_top/stack_bottom CHECK_GE(max_depth, 2); + const uptr kPageSize = GetPageSizeCached(); trace_buffer[0] = pc; size = 1; if (stack_top < 4096) return; // Sanity check for stack top. diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_stacktrace.h b/compiler-rt/lib/sanitizer_common/sanitizer_stacktrace.h index 45f6bdc9ecef1..4d19979f2c5a9 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_stacktrace.h +++ b/compiler-rt/lib/sanitizer_common/sanitizer_stacktrace.h @@ -16,6 +16,8 @@ namespace __sanitizer { +struct BufferedStackTrace; + static const u32 kStackTraceMax = 256; #if defined(__sparc__) || (SANITIZER_LINUX && defined(__mips__)) @@ -58,7 +60,7 @@ struct StackTrace { static bool WillUseFastUnwind(bool request_fast_unwind) { if (!SANITIZER_CAN_FAST_UNWIND) return false; - else if (!SANITIZER_CAN_SLOW_UNWIND) + if (!SANITIZER_CAN_SLOW_UNWIND) return true; return request_fast_unwind; } @@ -96,6 +98,23 @@ struct BufferedStackTrace : public StackTrace { BufferedStackTrace() : StackTrace(trace_buffer, 0), top_frame_bp(0) {} void Init(const uptr *pcs, uptr cnt, uptr extra_top_pc = 0); + + // Get the stack trace with the given pc and bp. + // The pc will be in the position 0 of the resulting stack trace. + // The bp may refer to the current frame or to the caller's frame. + void Unwind(uptr pc, uptr bp, void *context, bool request_fast, + u32 max_depth = kStackTraceMax) { + top_frame_bp = (max_depth > 0) ? bp : 0; + // Small max_depth optimization + if (max_depth <= 1) { + if (max_depth == 1) + trace_buffer[0] = pc; + size = max_depth; + return; + } + UnwindImpl(pc, bp, context, request_fast, max_depth); + } + void Unwind(u32 max_depth, uptr pc, uptr bp, void *context, uptr stack_top, uptr stack_bottom, bool request_fast_unwind); @@ -105,16 +124,23 @@ struct BufferedStackTrace : public StackTrace { } private: - void FastUnwindStack(uptr pc, uptr bp, uptr stack_top, uptr stack_bottom, - u32 max_depth); - void SlowUnwindStack(uptr pc, u32 max_depth); - void SlowUnwindStackWithContext(uptr pc, void *context, - u32 max_depth); + // Every runtime defines its own implementation of this method + void UnwindImpl(uptr pc, uptr bp, void *context, bool request_fast, + u32 max_depth); + + // UnwindFast/Slow have platform-specific implementations + void UnwindFast(uptr pc, uptr bp, uptr stack_top, uptr stack_bottom, + u32 max_depth); + void UnwindSlow(uptr pc, u32 max_depth); + void UnwindSlow(uptr pc, void *context, u32 max_depth); + void PopStackFrames(uptr count); uptr LocatePcInTrace(uptr pc); BufferedStackTrace(const BufferedStackTrace &) = delete; void operator=(const BufferedStackTrace &) = delete; + + friend class FastUnwindTest; }; // Check if given pointer points into allocated stack area. @@ -126,21 +152,23 @@ static inline bool IsValidFrame(uptr frame, uptr stack_top, uptr stack_bottom) { // Use this macro if you want to print stack trace with the caller // of the current function in the top frame. -#define GET_CALLER_PC_BP_SP \ - uptr bp = GET_CURRENT_FRAME(); \ - uptr pc = GET_CALLER_PC(); \ - uptr local_stack; \ - uptr sp = (uptr)&local_stack - #define GET_CALLER_PC_BP \ uptr bp = GET_CURRENT_FRAME(); \ uptr pc = GET_CALLER_PC(); +#define GET_CALLER_PC_BP_SP \ + GET_CALLER_PC_BP; \ + uptr local_stack; \ + uptr sp = (uptr)&local_stack + // Use this macro if you want to print stack trace with the current // function in the top frame. -#define GET_CURRENT_PC_BP_SP \ +#define GET_CURRENT_PC_BP \ uptr bp = GET_CURRENT_FRAME(); \ - uptr pc = StackTrace::GetCurrentPc(); \ + uptr pc = StackTrace::GetCurrentPc() + +#define GET_CURRENT_PC_BP_SP \ + GET_CURRENT_PC_BP; \ uptr local_stack; \ uptr sp = (uptr)&local_stack diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_stacktrace_libcdep.cc b/compiler-rt/lib/sanitizer_common/sanitizer_stacktrace_libcdep.cc index a5e7d16adab73..859032ba84e18 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_stacktrace_libcdep.cc +++ b/compiler-rt/lib/sanitizer_common/sanitizer_stacktrace_libcdep.cc @@ -57,6 +57,8 @@ void StackTrace::Print() const { void BufferedStackTrace::Unwind(u32 max_depth, uptr pc, uptr bp, void *context, uptr stack_top, uptr stack_bottom, bool request_fast_unwind) { + // Ensures all call sites get what they requested. + CHECK_EQ(request_fast_unwind, WillUseFastUnwind(request_fast_unwind)); top_frame_bp = (max_depth > 0) ? bp : 0; // Avoid doing any work for small max_depth. if (max_depth == 0) { @@ -71,14 +73,14 @@ void BufferedStackTrace::Unwind(u32 max_depth, uptr pc, uptr bp, void *context, if (!WillUseFastUnwind(request_fast_unwind)) { #if SANITIZER_CAN_SLOW_UNWIND if (context) - SlowUnwindStackWithContext(pc, context, max_depth); + UnwindSlow(pc, context, max_depth); else - SlowUnwindStack(pc, max_depth); + UnwindSlow(pc, max_depth); #else UNREACHABLE("slow unwind requested but not available"); #endif } else { - FastUnwindStack(pc, bp, stack_top, stack_bottom, max_depth); + UnwindFast(pc, bp, stack_top, stack_bottom, max_depth); } } diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_stacktrace_sparc.cc b/compiler-rt/lib/sanitizer_common/sanitizer_stacktrace_sparc.cc index d9435aa8f1cc7..c9bdc7dd0bfbc 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_stacktrace_sparc.cc +++ b/compiler-rt/lib/sanitizer_common/sanitizer_stacktrace_sparc.cc @@ -21,10 +21,11 @@ namespace __sanitizer { -void BufferedStackTrace::FastUnwindStack(uptr pc, uptr bp, uptr stack_top, - uptr stack_bottom, u32 max_depth) { - const uptr kPageSize = GetPageSizeCached(); +void BufferedStackTrace::UnwindFast(uptr pc, uptr bp, uptr stack_top, + uptr stack_bottom, u32 max_depth) { + // TODO(yln): add arg sanity check for stack_top/stack_bottom CHECK_GE(max_depth, 2); + const uptr kPageSize = GetPageSizeCached(); trace_buffer[0] = pc; size = 1; if (stack_top < 4096) return; // Sanity check for stack top. diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_suppressions.cc b/compiler-rt/lib/sanitizer_common/sanitizer_suppressions.cc index 5d9cf4e09a024..12ecd9a2e368c 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_suppressions.cc +++ b/compiler-rt/lib/sanitizer_common/sanitizer_suppressions.cc @@ -30,6 +30,7 @@ SuppressionContext::SuppressionContext(const char *suppression_types[], internal_memset(has_suppression_type_, 0, suppression_types_num_); } +#if !SANITIZER_FUCHSIA static bool GetPathAssumingFileIsRelativeToExec(const char *file_path, /*out*/char *new_file_path, uptr new_file_path_size) { @@ -46,20 +47,30 @@ static bool GetPathAssumingFileIsRelativeToExec(const char *file_path, return false; } +static const char *FindFile(const char *file_path, + /*out*/char *new_file_path, + uptr new_file_path_size) { + // If we cannot find the file, check if its location is relative to + // the location of the executable. + if (!FileExists(file_path) && !IsAbsolutePath(file_path) && + GetPathAssumingFileIsRelativeToExec(file_path, new_file_path, + new_file_path_size)) { + return new_file_path; + } + return file_path; +} +#else +static const char *FindFile(const char *file_path, char *, uptr) { + return file_path; +} +#endif + void SuppressionContext::ParseFromFile(const char *filename) { if (filename[0] == '\0') return; -#if !SANITIZER_FUCHSIA - // If we cannot find the file, check if its location is relative to - // the location of the executable. InternalScopedString new_file_path(kMaxPathLength); - if (!FileExists(filename) && !IsAbsolutePath(filename) && - GetPathAssumingFileIsRelativeToExec(filename, new_file_path.data(), - new_file_path.size())) { - filename = new_file_path.data(); - } -#endif // !SANITIZER_FUCHSIA + filename = FindFile(filename, new_file_path.data(), new_file_path.size()); // Read the file. VPrintf(1, "%s: reading suppressions file at %s\n", @@ -93,7 +104,7 @@ bool SuppressionContext::Match(const char *str, const char *type, } static const char *StripPrefix(const char *str, const char *prefix) { - while (str && *str == *prefix) { + while (*str && *str == *prefix) { str++; prefix++; } diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_markup.cc b/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_markup.cc index d39b2e082cb59..aee49b4c4567f 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_markup.cc +++ b/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_markup.cc @@ -117,7 +117,7 @@ _Unwind_Reason_Code Unwind_Trace(struct _Unwind_Context *ctx, void *param) { : _URC_NO_REASON); } -void BufferedStackTrace::SlowUnwindStack(uptr pc, u32 max_depth) { +void BufferedStackTrace::UnwindSlow(uptr pc, u32 max_depth) { CHECK_GE(max_depth, 2); size = 0; UnwindTraceArg arg = {this, Min(max_depth + 1, kStackTraceMax)}; @@ -132,9 +132,9 @@ void BufferedStackTrace::SlowUnwindStack(uptr pc, u32 max_depth) { trace_buffer[0] = pc; } -void BufferedStackTrace::SlowUnwindStackWithContext(uptr pc, void *context, - u32 max_depth) { - CHECK_NE(context, nullptr); +void BufferedStackTrace::UnwindSlow(uptr pc, void *context, u32 max_depth) { + CHECK(context); + CHECK_GE(max_depth, 2); UNREACHABLE("signal context doesn't exist"); } #endif // SANITIZER_CAN_SLOW_UNWIND diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_report.cc b/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_report.cc index 111c3f6469e6a..f4167d160ae82 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_report.cc +++ b/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_report.cc @@ -103,9 +103,11 @@ void ReportMmapWriteExec(int prot) { GET_CALLER_PC_BP_SP; (void)sp; bool fast = common_flags()->fast_unwind_on_fatal; - if (fast) + if (StackTrace::WillUseFastUnwind(fast)) { GetThreadStackTopAndBottom(false, &top, &bottom); - stack->Unwind(kStackTraceMax, pc, bp, nullptr, top, bottom, fast); + stack->Unwind(kStackTraceMax, pc, bp, nullptr, top, bottom, true); + } else + stack->Unwind(kStackTraceMax, pc, 0, nullptr, 0, 0, false); Printf("%s", d.Warning()); Report("WARNING: %s: writable-executable page usage\n", SanitizerToolName); diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_thread_registry.cc b/compiler-rt/lib/sanitizer_common/sanitizer_thread_registry.cc index cfc9e9135223d..02691287d763d 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_thread_registry.cc +++ b/compiler-rt/lib/sanitizer_common/sanitizer_thread_registry.cc @@ -17,8 +17,8 @@ namespace __sanitizer { ThreadContextBase::ThreadContextBase(u32 tid) : tid(tid), unique_id(0), reuse_count(), os_id(0), user_id(0), - status(ThreadStatusInvalid), - detached(false), workerthread(false), parent_tid(0), next(0) { + status(ThreadStatusInvalid), detached(false), + thread_type(ThreadType::Regular), parent_tid(0), next(0) { name[0] = '\0'; atomic_store(&thread_destroyed, 0, memory_order_release); } @@ -70,11 +70,11 @@ void ThreadContextBase::SetFinished() { OnFinished(); } -void ThreadContextBase::SetStarted(tid_t _os_id, bool _workerthread, +void ThreadContextBase::SetStarted(tid_t _os_id, ThreadType _thread_type, void *arg) { status = ThreadStatusRunning; os_id = _os_id; - workerthread = _workerthread; + thread_type = _thread_type; OnStarted(arg); } @@ -302,7 +302,7 @@ void ThreadRegistry::FinishThread(u32 tid) { tctx->SetDestroyed(); } -void ThreadRegistry::StartThread(u32 tid, tid_t os_id, bool workerthread, +void ThreadRegistry::StartThread(u32 tid, tid_t os_id, ThreadType thread_type, void *arg) { BlockingMutexLock l(&mtx_); running_threads_++; @@ -310,7 +310,7 @@ void ThreadRegistry::StartThread(u32 tid, tid_t os_id, bool workerthread, ThreadContextBase *tctx = threads_[tid]; CHECK_NE(tctx, 0); CHECK_EQ(ThreadStatusCreated, tctx->status); - tctx->SetStarted(os_id, workerthread, arg); + tctx->SetStarted(os_id, thread_type, arg); } void ThreadRegistry::QuarantinePush(ThreadContextBase *tctx) { diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_thread_registry.h b/compiler-rt/lib/sanitizer_common/sanitizer_thread_registry.h index 3b2aa8767c37e..493aa988f7e6d 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_thread_registry.h +++ b/compiler-rt/lib/sanitizer_common/sanitizer_thread_registry.h @@ -28,6 +28,12 @@ enum ThreadStatus { ThreadStatusDead // Joined, but some info is still available. }; +enum class ThreadType { + Regular, // Normal thread + Worker, // macOS Grand Central Dispatch (GCD) worker thread + Fiber, // Fiber +}; + // Generic thread context. Specific sanitizer tools may inherit from it. // If thread is dead, context may optionally be reused for a new thread. class ThreadContextBase { @@ -44,7 +50,7 @@ class ThreadContextBase { ThreadStatus status; bool detached; - bool workerthread; + ThreadType thread_type; u32 parent_tid; ThreadContextBase *next; // For storing thread contexts in a list. @@ -56,7 +62,7 @@ class ThreadContextBase { void SetDead(); void SetJoined(void *arg); void SetFinished(); - void SetStarted(tid_t _os_id, bool _workerthread, void *arg); + void SetStarted(tid_t _os_id, ThreadType _thread_type, void *arg); void SetCreated(uptr _user_id, u64 _unique_id, bool _detached, u32 _parent_tid, void *arg); void Reset(); @@ -120,7 +126,7 @@ class ThreadRegistry { void DetachThread(u32 tid, void *arg); void JoinThread(u32 tid, void *arg); void FinishThread(u32 tid); - void StartThread(u32 tid, tid_t os_id, bool workerthread, void *arg); + void StartThread(u32 tid, tid_t os_id, ThreadType thread_type, void *arg); void SetThreadUserId(u32 tid, uptr user_id); private: diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_unwind_linux_libcdep.cc b/compiler-rt/lib/sanitizer_common/sanitizer_unwind_linux_libcdep.cc index e2ea310453886..f165605e58140 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_unwind_linux_libcdep.cc +++ b/compiler-rt/lib/sanitizer_common/sanitizer_unwind_linux_libcdep.cc @@ -27,7 +27,7 @@ namespace __sanitizer { -//------------------------- SlowUnwindStack ----------------------------------- +//---------------------------- UnwindSlow -------------------------------------- typedef struct { uptr absolute_pc; @@ -119,7 +119,7 @@ _Unwind_Reason_Code Unwind_Trace(struct _Unwind_Context *ctx, void *param) { return UNWIND_CONTINUE; } -void BufferedStackTrace::SlowUnwindStack(uptr pc, u32 max_depth) { +void BufferedStackTrace::UnwindSlow(uptr pc, u32 max_depth) { CHECK_GE(max_depth, 2); size = 0; UnwindTraceArg arg = {this, Min(max_depth + 1, kStackTraceMax)}; @@ -138,11 +138,11 @@ void BufferedStackTrace::SlowUnwindStack(uptr pc, u32 max_depth) { trace_buffer[0] = pc; } -void BufferedStackTrace::SlowUnwindStackWithContext(uptr pc, void *context, - u32 max_depth) { +void BufferedStackTrace::UnwindSlow(uptr pc, void *context, u32 max_depth) { + CHECK(context); CHECK_GE(max_depth, 2); if (!unwind_backtrace_signal_arch) { - SlowUnwindStack(pc, max_depth); + UnwindSlow(pc, max_depth); return; } diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_unwind_win.cc b/compiler-rt/lib/sanitizer_common/sanitizer_unwind_win.cc index cd211fbfb0df0..93908ababe25f 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_unwind_win.cc +++ b/compiler-rt/lib/sanitizer_common/sanitizer_unwind_win.cc @@ -24,7 +24,7 @@ using namespace __sanitizer; #if !SANITIZER_GO -void BufferedStackTrace::SlowUnwindStack(uptr pc, u32 max_depth) { +void BufferedStackTrace::UnwindSlow(uptr pc, u32 max_depth) { CHECK_GE(max_depth, 2); // FIXME: CaptureStackBackTrace might be too slow for us. // FIXME: Compare with StackWalk64. @@ -39,8 +39,9 @@ void BufferedStackTrace::SlowUnwindStack(uptr pc, u32 max_depth) { PopStackFrames(pc_location); } -void BufferedStackTrace::SlowUnwindStackWithContext(uptr pc, void *context, - u32 max_depth) { +void BufferedStackTrace::UnwindSlow(uptr pc, void *context, u32 max_depth) { + CHECK(context); + CHECK_GE(max_depth, 2); CONTEXT ctx = *(CONTEXT *)context; STACKFRAME64 stack_frame; memset(&stack_frame, 0, sizeof(stack_frame)); diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_win.cc b/compiler-rt/lib/sanitizer_common/sanitizer_win.cc index 27262dad9f106..457cecb8cec10 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_win.cc +++ b/compiler-rt/lib/sanitizer_common/sanitizer_win.cc @@ -31,6 +31,18 @@ #if defined(PSAPI_VERSION) && PSAPI_VERSION == 1 #pragma comment(lib, "psapi") #endif +#if SANITIZER_WIN_TRACE +#include +// Windows trace logging provider init +#pragma comment(lib, "advapi32.lib") +TRACELOGGING_DECLARE_PROVIDER(g_asan_provider); +// GUID must be the same in utils/AddressSanitizerLoggingProvider.wprp +TRACELOGGING_DEFINE_PROVIDER(g_asan_provider, "AddressSanitizerLoggingProvider", + (0x6c6c766d, 0x3846, 0x4e6a, 0xa4, 0xfb, 0x5b, + 0x53, 0x0b, 0xd0, 0xf3, 0xfa)); +#else +#define TraceLoggingUnregister(x) +#endif // A macro to tell the compiler that this part of the code cannot be reached, // if the compiler supports this feature. Since we're using this in @@ -229,7 +241,7 @@ bool MmapFixedNoReserve(uptr fixed_addr, uptr size, const char *name) { // Memory space mapped by 'MmapFixedOrDie' must have been reserved by // 'MmapFixedNoAccess'. -void *MmapFixedOrDie(uptr fixed_addr, uptr size) { +void *MmapFixedOrDie(uptr fixed_addr, uptr size, const char *name) { void *p = VirtualAlloc((LPVOID)fixed_addr, size, MEM_COMMIT, PAGE_READWRITE); if (p == 0) { @@ -243,11 +255,12 @@ void *MmapFixedOrDie(uptr fixed_addr, uptr size) { // Uses fixed_addr for now. // Will use offset instead once we've implemented this function for real. -uptr ReservedAddressRange::Map(uptr fixed_addr, uptr size) { +uptr ReservedAddressRange::Map(uptr fixed_addr, uptr size, const char *name) { return reinterpret_cast(MmapFixedOrDieOnFatalError(fixed_addr, size)); } -uptr ReservedAddressRange::MapOrDie(uptr fixed_addr, uptr size) { +uptr ReservedAddressRange::MapOrDie(uptr fixed_addr, uptr size, + const char *name) { return reinterpret_cast(MmapFixedOrDie(fixed_addr, size)); } @@ -260,7 +273,7 @@ void ReservedAddressRange::Unmap(uptr addr, uptr size) { UnmapOrDie(reinterpret_cast(addr), size); } -void *MmapFixedOrDieOnFatalError(uptr fixed_addr, uptr size) { +void *MmapFixedOrDieOnFatalError(uptr fixed_addr, uptr size, const char *name) { void *p = VirtualAlloc((LPVOID)fixed_addr, size, MEM_COMMIT, PAGE_READWRITE); if (p == 0) { @@ -651,6 +664,7 @@ int Atexit(void (*function)(void)) { } static int RunAtexit() { + TraceLoggingUnregister(g_asan_provider); int ret = 0; for (uptr i = 0; i < atexit_functions.size(); ++i) { ret |= atexit(atexit_functions[i]); @@ -748,6 +762,7 @@ uptr internal_sched_yield() { } void internal__exit(int exitcode) { + TraceLoggingUnregister(g_asan_provider); // ExitProcess runs some finalizers, so use TerminateProcess to avoid that. // The debugger doesn't stop on TerminateProcess like it does on ExitProcess, // so add our own breakpoint here. @@ -1069,6 +1084,32 @@ u32 GetNumberOfCPUs() { return sysinfo.dwNumberOfProcessors; } +#if SANITIZER_WIN_TRACE +// TODO(mcgov): Rename this project-wide to PlatformLogInit +void AndroidLogInit(void) { + HRESULT hr = TraceLoggingRegister(g_asan_provider); + if (!SUCCEEDED(hr)) + return; +} + +void SetAbortMessage(const char *) {} + +void LogFullErrorReport(const char *buffer) { + if (common_flags()->log_to_syslog) { + InternalMmapVector filename; + DWORD filename_length = 0; + do { + filename.resize(filename.size() + 0x100); + filename_length = + GetModuleFileNameW(NULL, filename.begin(), filename.size()); + } while (filename_length >= filename.size()); + TraceLoggingWrite(g_asan_provider, "AsanReportEvent", + TraceLoggingValue(filename.begin(), "ExecutableName"), + TraceLoggingValue(buffer, "AsanReportContents")); + } +} +#endif // SANITIZER_WIN_TRACE + } // namespace __sanitizer #endif // _WIN32 diff --git a/compiler-rt/lib/sanitizer_common/symbolizer/sanitizer_symbolize.cc b/compiler-rt/lib/sanitizer_common/symbolizer/sanitizer_symbolize.cc index 28f72b91b709e..8150b7a09a0e4 100644 --- a/compiler-rt/lib/sanitizer_common/symbolizer/sanitizer_symbolize.cc +++ b/compiler-rt/lib/sanitizer_common/symbolizer/sanitizer_symbolize.cc @@ -37,8 +37,11 @@ bool __sanitizer_symbolize_code(const char *ModuleName, uint64_t ModuleOffset, { llvm::raw_string_ostream OS(Result); llvm::symbolize::DIPrinter Printer(OS); - auto ResOrErr = - getDefaultSymbolizer()->symbolizeInlinedCode(ModuleName, ModuleOffset); + // TODO: it is neccessary to set proper SectionIndex here. + // object::SectionedAddress::UndefSection works for only absolute addresses. + auto ResOrErr = getDefaultSymbolizer()->symbolizeInlinedCode( + ModuleName, + {ModuleOffset, llvm::object::SectionedAddress::UndefSection}); Printer << (ResOrErr ? ResOrErr.get() : llvm::DIInliningInfo()); } return __sanitizer::internal_snprintf(Buffer, MaxLength, "%s", @@ -51,8 +54,11 @@ bool __sanitizer_symbolize_data(const char *ModuleName, uint64_t ModuleOffset, { llvm::raw_string_ostream OS(Result); llvm::symbolize::DIPrinter Printer(OS); - auto ResOrErr = - getDefaultSymbolizer()->symbolizeData(ModuleName, ModuleOffset); + // TODO: it is neccessary to set proper SectionIndex here. + // object::SectionedAddress::UndefSection works for only absolute addresses. + auto ResOrErr = getDefaultSymbolizer()->symbolizeData( + ModuleName, + {ModuleOffset, llvm::object::SectionedAddress::UndefSection}); Printer << (ResOrErr ? ResOrErr.get() : llvm::DIGlobal()); } return __sanitizer::internal_snprintf(Buffer, MaxLength, "%s", diff --git a/compiler-rt/lib/sanitizer_common/tests/sanitizer_allocator_test.cc b/compiler-rt/lib/sanitizer_common/tests/sanitizer_allocator_test.cc index db59c8116b38e..ec130f3d572b7 100644 --- a/compiler-rt/lib/sanitizer_common/tests/sanitizer_allocator_test.cc +++ b/compiler-rt/lib/sanitizer_common/tests/sanitizer_allocator_test.cc @@ -1031,7 +1031,7 @@ TEST(SanitizerCommon, LargeMmapAllocatorBlockBegin) { // Don't test OOM conditions on Win64 because it causes other tests on the same // machine to OOM. #if SANITIZER_CAN_USE_ALLOCATOR64 && !SANITIZER_WINDOWS64 && !SANITIZER_ANDROID -typedef SizeClassMap<3, 4, 8, 63, 128, 16> SpecialSizeClassMap; +typedef __sanitizer::SizeClassMap<3, 4, 8, 63, 128, 16> SpecialSizeClassMap; template struct AP64_SpecialSizeClassMap { static const uptr kSpaceBeg = kAllocatorSpace; diff --git a/compiler-rt/lib/sanitizer_common/tests/sanitizer_common_test.cc b/compiler-rt/lib/sanitizer_common/tests/sanitizer_common_test.cc index b7454fac87c51..2350de943b3dc 100644 --- a/compiler-rt/lib/sanitizer_common/tests/sanitizer_common_test.cc +++ b/compiler-rt/lib/sanitizer_common/tests/sanitizer_common_test.cc @@ -438,4 +438,12 @@ TEST(SanitizerCommon, ReservedAddressRangeUnmap) { EXPECT_DEATH(address_range.Unmap(base_addr + (PageSize * 2), PageSize), ".*"); } +// Windows has no working ReadBinaryName. +#if !SANITIZER_WINDOWS +TEST(SanitizerCommon, ReadBinaryNameCached) { + char buf[256]; + EXPECT_NE((uptr)0, ReadBinaryNameCached(buf, sizeof(buf))); +} +#endif + } // namespace __sanitizer diff --git a/compiler-rt/lib/sanitizer_common/tests/sanitizer_stacktrace_test.cc b/compiler-rt/lib/sanitizer_common/tests/sanitizer_stacktrace_test.cc index d7ac916744fa2..771a3e4d96114 100644 --- a/compiler-rt/lib/sanitizer_common/tests/sanitizer_stacktrace_test.cc +++ b/compiler-rt/lib/sanitizer_common/tests/sanitizer_stacktrace_test.cc @@ -20,18 +20,15 @@ class FastUnwindTest : public ::testing::Test { protected: virtual void SetUp(); virtual void TearDown(); - bool TryFastUnwind(uptr max_depth) { - if (!StackTrace::WillUseFastUnwind(true)) - return false; - trace.Unwind(max_depth, start_pc, (uptr)&fake_stack[0], 0, fake_top, - fake_bottom, true); - return true; - } + + void UnwindFast(); void *mapping; uhwptr *fake_stack; const uptr fake_stack_size = 10; uhwptr start_pc; + + uhwptr fake_bp; uhwptr fake_top; uhwptr fake_bottom; BufferedStackTrace trace; @@ -58,10 +55,11 @@ void FastUnwindTest::SetUp() { // Mark the last fp point back up to terminate the stack trace. fake_stack[RoundDownTo(fake_stack_size - 1, 2)] = (uhwptr)&fake_stack[0]; - // Top is two slots past the end because FastUnwindStack subtracts two. + // Top is two slots past the end because UnwindFast subtracts two. fake_top = (uhwptr)&fake_stack[fake_stack_size + 2]; - // Bottom is one slot before the start because FastUnwindStack uses >. + // Bottom is one slot before the start because UnwindFast uses >. fake_bottom = (uhwptr)mapping; + fake_bp = (uptr)&fake_stack[0]; start_pc = PC(0); } @@ -70,9 +68,14 @@ void FastUnwindTest::TearDown() { UnmapOrDie(mapping, 2 * ps); } +#if SANITIZER_CAN_FAST_UNWIND + +void FastUnwindTest::UnwindFast() { + trace.UnwindFast(start_pc, fake_bp, fake_top, fake_bottom, kStackTraceMax); +} + TEST_F(FastUnwindTest, Basic) { - if (!TryFastUnwind(kStackTraceMax)) - return; + UnwindFast(); // Should get all on-stack retaddrs and start_pc. EXPECT_EQ(6U, trace.size); EXPECT_EQ(start_pc, trace.trace[0]); @@ -85,8 +88,7 @@ TEST_F(FastUnwindTest, Basic) { TEST_F(FastUnwindTest, FramePointerLoop) { // Make one fp point to itself. fake_stack[4] = (uhwptr)&fake_stack[4]; - if (!TryFastUnwind(kStackTraceMax)) - return; + UnwindFast(); // Should get all on-stack retaddrs up to the 4th slot and start_pc. EXPECT_EQ(4U, trace.size); EXPECT_EQ(start_pc, trace.trace[0]); @@ -98,8 +100,7 @@ TEST_F(FastUnwindTest, FramePointerLoop) { TEST_F(FastUnwindTest, MisalignedFramePointer) { // Make one fp misaligned. fake_stack[4] += 3; - if (!TryFastUnwind(kStackTraceMax)) - return; + UnwindFast(); // Should get all on-stack retaddrs up to the 4th slot and start_pc. EXPECT_EQ(4U, trace.size); EXPECT_EQ(start_pc, trace.trace[0]); @@ -109,16 +110,14 @@ TEST_F(FastUnwindTest, MisalignedFramePointer) { } TEST_F(FastUnwindTest, OneFrameStackTrace) { - if (!TryFastUnwind(1)) - return; + trace.Unwind(start_pc, fake_bp, nullptr, true, 1); EXPECT_EQ(1U, trace.size); EXPECT_EQ(start_pc, trace.trace[0]); EXPECT_EQ((uhwptr)&fake_stack[0], trace.top_frame_bp); } TEST_F(FastUnwindTest, ZeroFramesStackTrace) { - if (!TryFastUnwind(0)) - return; + trace.Unwind(start_pc, fake_bp, nullptr, true, 0); EXPECT_EQ(0U, trace.size); EXPECT_EQ(0U, trace.top_frame_bp); } @@ -128,8 +127,7 @@ TEST_F(FastUnwindTest, FPBelowPrevFP) { // current FP. fake_stack[0] = (uhwptr)&fake_stack[-50]; fake_stack[1] = PC(1); - if (!TryFastUnwind(3)) - return; + UnwindFast(); EXPECT_EQ(2U, trace.size); EXPECT_EQ(PC(0), trace.trace[0]); EXPECT_EQ(PC(1), trace.trace[1]); @@ -138,8 +136,7 @@ TEST_F(FastUnwindTest, FPBelowPrevFP) { TEST_F(FastUnwindTest, CloseToZeroFrame) { // Make one pc a NULL pointer. fake_stack[5] = 0x0; - if (!TryFastUnwind(kStackTraceMax)) - return; + UnwindFast(); // The stack should be truncated at the NULL pointer (and not include it). EXPECT_EQ(3U, trace.size); EXPECT_EQ(start_pc, trace.trace[0]); @@ -148,16 +145,16 @@ TEST_F(FastUnwindTest, CloseToZeroFrame) { } } +#endif // SANITIZER_CAN_FAST_UNWIND + TEST(SlowUnwindTest, ShortStackTrace) { - if (StackTrace::WillUseFastUnwind(false)) - return; BufferedStackTrace stack; uptr pc = StackTrace::GetCurrentPc(); uptr bp = GET_CURRENT_FRAME(); - stack.Unwind(0, pc, bp, 0, 0, 0, false); + stack.Unwind(pc, bp, nullptr, false, /*max_depth=*/0); EXPECT_EQ(0U, stack.size); EXPECT_EQ(0U, stack.top_frame_bp); - stack.Unwind(1, pc, bp, 0, 0, 0, false); + stack.Unwind(pc, bp, nullptr, false, /*max_depth=*/1); EXPECT_EQ(1U, stack.size); EXPECT_EQ(pc, stack.trace[0]); EXPECT_EQ(bp, stack.top_frame_bp); diff --git a/compiler-rt/lib/sanitizer_common/tests/sanitizer_suppressions_test.cc b/compiler-rt/lib/sanitizer_common/tests/sanitizer_suppressions_test.cc index 33adf711c749e..d64379a44504a 100644 --- a/compiler-rt/lib/sanitizer_common/tests/sanitizer_suppressions_test.cc +++ b/compiler-rt/lib/sanitizer_common/tests/sanitizer_suppressions_test.cc @@ -131,4 +131,10 @@ TEST_F(SuppressionContextTest, HasSuppressionType) { EXPECT_FALSE(ctx_.HasSuppressionType("signal")); } +TEST_F(SuppressionContextTest, RegressionTestForBufferOverflowInSuppressions) { + EXPECT_DEATH(ctx_.Parse("race"), "failed to parse suppressions"); + EXPECT_DEATH(ctx_.Parse("foo"), "failed to parse suppressions"); +} + + } // namespace __sanitizer diff --git a/compiler-rt/lib/sanitizer_common/tests/sanitizer_thread_registry_test.cc b/compiler-rt/lib/sanitizer_common/tests/sanitizer_thread_registry_test.cc index de41303fb5ca5..09c01d6c8f436 100644 --- a/compiler-rt/lib/sanitizer_common/tests/sanitizer_thread_registry_test.cc +++ b/compiler-rt/lib/sanitizer_common/tests/sanitizer_thread_registry_test.cc @@ -66,7 +66,7 @@ static void MarkUidAsPresent(ThreadContextBase *tctx, void *arg) { static void TestRegistry(ThreadRegistry *registry, bool has_quarantine) { // Create and start a main thread. EXPECT_EQ(0U, registry->CreateThread(get_uid(0), true, -1, 0)); - registry->StartThread(0, 0, false, 0); + registry->StartThread(0, 0, ThreadType::Regular, 0); // Create a bunch of threads. for (u32 i = 1; i <= 10; i++) { EXPECT_EQ(i, registry->CreateThread(get_uid(i), is_detached(i), 0, 0)); @@ -74,7 +74,7 @@ static void TestRegistry(ThreadRegistry *registry, bool has_quarantine) { CheckThreadQuantity(registry, 11, 1, 11); // Start some of them. for (u32 i = 1; i <= 5; i++) { - registry->StartThread(i, 0, false, 0); + registry->StartThread(i, 0, ThreadType::Regular, 0); } CheckThreadQuantity(registry, 11, 6, 11); // Finish, create and start more threads. @@ -84,7 +84,7 @@ static void TestRegistry(ThreadRegistry *registry, bool has_quarantine) { registry->JoinThread(i, 0); } for (u32 i = 6; i <= 10; i++) { - registry->StartThread(i, 0, false, 0); + registry->StartThread(i, 0, ThreadType::Regular, 0); } std::vector new_tids; for (u32 i = 11; i <= 15; i++) { @@ -111,7 +111,7 @@ static void TestRegistry(ThreadRegistry *registry, bool has_quarantine) { } for (u32 i = 0; i < new_tids.size(); i++) { u32 tid = new_tids[i]; - registry->StartThread(tid, 0, false, 0); + registry->StartThread(tid, 0, ThreadType::Regular, 0); registry->DetachThread(tid, 0); registry->FinishThread(tid); } @@ -188,7 +188,8 @@ void *RunThread(void *arg) { tids.push_back( args->registry->CreateThread(0, false, 0, (void*)args->shard)); for (int i = 0; i < kThreadsPerShard; i++) - args->registry->StartThread(tids[i], 0, false, (void*)args->shard); + args->registry->StartThread(tids[i], 0, ThreadType::Regular, + (void*)args->shard); for (int i = 0; i < kThreadsPerShard; i++) args->registry->FinishThread(tids[i]); for (int i = 0; i < kThreadsPerShard; i++) @@ -199,7 +200,7 @@ void *RunThread(void *arg) { static void ThreadedTestRegistry(ThreadRegistry *registry) { // Create and start a main thread. EXPECT_EQ(0U, registry->CreateThread(0, true, -1, 0)); - registry->StartThread(0, 0, false, 0); + registry->StartThread(0, 0, ThreadType::Regular, 0); pthread_t threads[kNumShards]; RunThreadArgs args[kNumShards]; for (int i = 0; i < kNumShards; i++) { diff --git a/compiler-rt/lib/scudo/CMakeLists.txt b/compiler-rt/lib/scudo/CMakeLists.txt index 79f69e934f223..bbb8a1a9cbe4f 100644 --- a/compiler-rt/lib/scudo/CMakeLists.txt +++ b/compiler-rt/lib/scudo/CMakeLists.txt @@ -37,7 +37,7 @@ if (FUCHSIA) list(APPEND SCUDO_CFLAGS -nostdinc++) list(APPEND SCUDO_DYNAMIC_LINK_FLAGS -nostdlib++) else() - list(APPEND SCUDO_DYNAMIC_LIBS ${SANITIZER_CXX_ABI_LIBRARY}) + list(APPEND SCUDO_DYNAMIC_LIBS ${SANITIZER_CXX_ABI_LIBRARIES}) list(APPEND SCUDO_OBJECT_LIBS RTSanitizerCommonCoverage RTSanitizerCommonSymbolizer diff --git a/compiler-rt/lib/scudo/standalone/CMakeLists.txt b/compiler-rt/lib/scudo/standalone/CMakeLists.txt new file mode 100644 index 0000000000000..993bb94992ae7 --- /dev/null +++ b/compiler-rt/lib/scudo/standalone/CMakeLists.txt @@ -0,0 +1,69 @@ +add_compiler_rt_component(scudo_standalone) + +include_directories(../..) + +set(SCUDO_CFLAGS) + +list(APPEND SCUDO_CFLAGS + -Wall + -nostdinc++) + +# Remove -stdlib= which is unused when passing -nostdinc++. +string(REGEX REPLACE "-stdlib=[a-zA-Z+]*" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) + +append_list_if(COMPILER_RT_HAS_FFREESTANDING_FLAG -ffreestanding SCUDO_CFLAGS) + +append_list_if(COMPILER_RT_HAS_FVISIBILITY_HIDDEN_FLAG -fvisibility=hidden SCUDO_CFLAGS) + +if(COMPILER_RT_DEBUG) + list(APPEND SCUDO_CFLAGS -O0) +else() + list(APPEND SCUDO_CFLAGS -O3) +endif() + +set(SCUDO_LINK_FLAGS) + +list(APPEND SCUDO_LINK_FLAGS -Wl,-z,defs,-z,now,-z,relro) + +append_list_if(COMPILER_RT_HAS_NODEFAULTLIBS_FLAG -nodefaultlibs SCUDO_LINK_FLAGS) + +if(ANDROID) +# Put the shared library in the global group. For more details, see +# android-changes-for-ndk-developers.md#changes-to-library-search-order + append_list_if(COMPILER_RT_HAS_Z_GLOBAL -Wl,-z,global SCUDO_LINK_FLAGS) +endif() + +set(SCUDO_SOURCES + common.cc + fuchsia.cc + linux.cc) + +set(SCUDO_HEADERS + atomic_helpers.h + bytemap.h + internal_defs.h + linux.h + list.h + mutex.h + platform.h + vector.h) + +if(COMPILER_RT_HAS_SCUDO_STANDALONE) + add_compiler_rt_object_libraries(RTScudoStandalone + ARCHS ${SCUDO_STANDALONE_SUPPORTED_ARCH} + SOURCES ${SCUDO_SOURCES} + ADDITIONAL_HEADERS ${SCUDO_HEADERS} + CFLAGS ${SCUDO_CFLAGS}) + + add_compiler_rt_runtime(clang_rt.scudo_standalone + STATIC + ARCHS ${SCUDO_STANDALONE_SUPPORTED_ARCH} + SOURCES ${SCUDO_SOURCES} + ADDITIONAL_HEADERS ${SCUDO_HEADERS} + CFLAGS ${SCUDO_CFLAGS} + PARENT_TARGET scudo_standalone) + + if(COMPILER_RT_INCLUDE_TESTS) + add_subdirectory(tests) + endif() +endif() diff --git a/compiler-rt/lib/scudo/standalone/atomic_helpers.h b/compiler-rt/lib/scudo/standalone/atomic_helpers.h new file mode 100644 index 0000000000000..35d7369c10704 --- /dev/null +++ b/compiler-rt/lib/scudo/standalone/atomic_helpers.h @@ -0,0 +1,131 @@ +//===-- atomic_helpers.h ----------------------------------------*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#ifndef SCUDO_ATOMIC_H_ +#define SCUDO_ATOMIC_H_ + +#include "internal_defs.h" + +namespace scudo { + +enum memory_order { + memory_order_relaxed = 0, + memory_order_consume = 1, + memory_order_acquire = 2, + memory_order_release = 3, + memory_order_acq_rel = 4, + memory_order_seq_cst = 5 +}; +COMPILER_CHECK(memory_order_relaxed == __ATOMIC_RELAXED); +COMPILER_CHECK(memory_order_consume == __ATOMIC_CONSUME); +COMPILER_CHECK(memory_order_acquire == __ATOMIC_ACQUIRE); +COMPILER_CHECK(memory_order_release == __ATOMIC_RELEASE); +COMPILER_CHECK(memory_order_acq_rel == __ATOMIC_ACQ_REL); +COMPILER_CHECK(memory_order_seq_cst == __ATOMIC_SEQ_CST); + +struct atomic_u8 { + typedef u8 Type; + volatile Type ValDoNotUse; +}; + +struct atomic_u16 { + typedef u16 Type; + volatile Type ValDoNotUse; +}; + +struct atomic_s32 { + typedef s32 Type; + volatile Type ValDoNotUse; +}; + +struct atomic_u32 { + typedef u32 Type; + volatile Type ValDoNotUse; +}; + +struct atomic_u64 { + typedef u64 Type; + // On 32-bit platforms u64 is not necessarily aligned on 8 bytes. + ALIGNED(8) volatile Type ValDoNotUse; +}; + +struct atomic_uptr { + typedef uptr Type; + volatile Type ValDoNotUse; +}; + +template +INLINE typename T::Type atomic_load(const volatile T *A, memory_order MO) { + DCHECK(!(reinterpret_cast(A) % sizeof(*A))); + typename T::Type V; + __atomic_load(&A->ValDoNotUse, &V, MO); + return V; +} + +template +INLINE void atomic_store(volatile T *A, typename T::Type V, memory_order MO) { + DCHECK(!(reinterpret_cast(A) % sizeof(*A))); + __atomic_store(&A->ValDoNotUse, &V, MO); +} + +INLINE void atomic_thread_fence(memory_order) { __sync_synchronize(); } + +template +INLINE typename T::Type atomic_fetch_add(volatile T *A, typename T::Type V, + memory_order MO) { + DCHECK(!(reinterpret_cast(A) % sizeof(*A))); + return __atomic_fetch_add(&A->ValDoNotUse, V, MO); +} + +template +INLINE typename T::Type atomic_fetch_sub(volatile T *A, typename T::Type V, + memory_order MO) { + DCHECK(!(reinterpret_cast(A) % sizeof(*A))); + return __atomic_fetch_sub(&A->ValDoNotUse, V, MO); +} + +template +INLINE typename T::Type atomic_exchange(volatile T *A, typename T::Type V, + memory_order MO) { + DCHECK(!(reinterpret_cast(A) % sizeof(*A))); + typename T::Type R; + __atomic_exchange(&A->ValDoNotUse, &V, &R, MO); + return R; +} + +template +INLINE bool atomic_compare_exchange_strong(volatile T *A, typename T::Type *Cmp, + typename T::Type Xchg, + memory_order MO) { + return __atomic_compare_exchange(&A->ValDoNotUse, Cmp, &Xchg, false, MO, + __ATOMIC_RELAXED); +} + +template +INLINE bool atomic_compare_exchange_weak(volatile T *A, typename T::Type *Cmp, + typename T::Type Xchg, + memory_order MO) { + return __atomic_compare_exchange(&A->ValDoNotUse, Cmp, &Xchg, true, MO, + __ATOMIC_RELAXED); +} + +// Clutter-reducing helpers. + +template +INLINE typename T::Type atomic_load_relaxed(const volatile T *A) { + return atomic_load(A, memory_order_relaxed); +} + +template +INLINE void atomic_store_relaxed(volatile T *A, typename T::Type V) { + atomic_store(A, V, memory_order_relaxed); +} + +} // namespace scudo + +#endif // SCUDO_ATOMIC_H_ diff --git a/compiler-rt/lib/scudo/standalone/bytemap.h b/compiler-rt/lib/scudo/standalone/bytemap.h new file mode 100644 index 0000000000000..2c8ba1fd0e86e --- /dev/null +++ b/compiler-rt/lib/scudo/standalone/bytemap.h @@ -0,0 +1,103 @@ +//===-- bytemap.h -----------------------------------------------*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#ifndef SCUDO_BYTEMAP_H_ +#define SCUDO_BYTEMAP_H_ + +#include "atomic_helpers.h" +#include "common.h" +#include "mutex.h" + +namespace scudo { + +template class FlatByteMap { +public: + void initLinkerInitialized() { + Map = reinterpret_cast(map(nullptr, Size, "scudo:bytemap")); + } + void init() { initLinkerInitialized(); } + + void set(uptr Index, u8 Value) { + DCHECK_LT(Index, Size); + DCHECK_EQ(0U, Map[Index]); + Map[Index] = Value; + } + u8 operator[](uptr Index) { + DCHECK_LT(Index, Size); + return Map[Index]; + } + +private: + u8 *Map; +}; + +template class TwoLevelByteMap { +public: + void initLinkerInitialized() { + Level1Map = reinterpret_cast( + map(nullptr, sizeof(atomic_uptr) * Level1Size, "scudo:bytemap")); + } + void init() { + initLinkerInitialized(); + Mutex.init(); + } + + void reset() { + for (uptr I = 0; I < Level1Size; I++) { + u8 *P = get(I); + if (!P) + continue; + unmap(P, Level2Size); + } + memset(Level1Map, 0, sizeof(atomic_uptr) * Level1Size); + } + + uptr size() const { return Level1Size * Level2Size; } + + void set(uptr Index, u8 Value) { + DCHECK_LT(Index, Level1Size * Level2Size); + u8 *Level2Map = getOrCreate(Index / Level2Size); + DCHECK_EQ(0U, Level2Map[Index % Level2Size]); + Level2Map[Index % Level2Size] = Value; + } + + u8 operator[](uptr Index) const { + DCHECK_LT(Index, Level1Size * Level2Size); + u8 *Level2Map = get(Index / Level2Size); + if (!Level2Map) + return 0; + return Level2Map[Index % Level2Size]; + } + +private: + u8 *get(uptr Index) const { + DCHECK_LT(Index, Level1Size); + return reinterpret_cast( + atomic_load(&Level1Map[Index], memory_order_acquire)); + } + + u8 *getOrCreate(uptr Index) { + u8 *Res = get(Index); + if (!Res) { + SpinMutexLock L(&Mutex); + if (!(Res = get(Index))) { + Res = reinterpret_cast(map(nullptr, Level2Size, "scudo:bytemap")); + atomic_store(&Level1Map[Index], reinterpret_cast(Res), + memory_order_release); + } + } + return Res; + } + + atomic_uptr *Level1Map; + StaticSpinMutex Mutex; +}; + +} // namespace scudo + +#endif // SCUDO_BYTEMAP_H_ diff --git a/compiler-rt/lib/scudo/standalone/common.cc b/compiler-rt/lib/scudo/standalone/common.cc new file mode 100644 index 0000000000000..2a26efbb9c890 --- /dev/null +++ b/compiler-rt/lib/scudo/standalone/common.cc @@ -0,0 +1,32 @@ +//===-- common.cc -----------------------------------------------*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#include "common.h" +#include "atomic_helpers.h" + +namespace scudo { + +uptr PageSizeCached; +uptr getPageSize(); + +uptr getPageSizeSlow() { + PageSizeCached = getPageSize(); + CHECK_NE(PageSizeCached, 0); + return PageSizeCached; +} + +// Fatal internal map() or unmap() error (potentially OOM related). +void NORETURN dieOnMapUnmapError(bool OutOfMemory) { + outputRaw("Scudo ERROR: internal map or unmap failure"); + if (OutOfMemory) + outputRaw(" (OOM)"); + outputRaw("\n"); + die(); +} + +} // namespace scudo diff --git a/compiler-rt/lib/scudo/standalone/common.h b/compiler-rt/lib/scudo/standalone/common.h new file mode 100644 index 0000000000000..89b8d11abdc78 --- /dev/null +++ b/compiler-rt/lib/scudo/standalone/common.h @@ -0,0 +1,171 @@ +//===-- common.h ------------------------------------------------*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#ifndef SCUDO_COMMON_H_ +#define SCUDO_COMMON_H_ + +#include "internal_defs.h" + +#include +#include + +namespace scudo { + +template INLINE Dest bit_cast(const Source &S) { + COMPILER_CHECK(sizeof(Dest) == sizeof(Source)); + Dest D; + memcpy(&D, &S, sizeof(D)); + return D; +} + +INLINE constexpr uptr roundUpTo(uptr X, uptr Boundary) { + return (X + Boundary - 1) & ~(Boundary - 1); +} + +INLINE constexpr uptr roundDownTo(uptr X, uptr Boundary) { + return X & ~(Boundary - 1); +} + +INLINE constexpr bool isAligned(uptr X, uptr Alignment) { + return (X & (Alignment - 1)) == 0; +} + +template constexpr T Min(T A, T B) { return A < B ? A : B; } + +template constexpr T Max(T A, T B) { return A > B ? A : B; } + +template void Swap(T &A, T &B) { + T Tmp = A; + A = B; + B = Tmp; +} + +INLINE bool isPowerOfTwo(uptr X) { return (X & (X - 1)) == 0; } + +INLINE uptr getMostSignificantSetBitIndex(uptr X) { + DCHECK_NE(X, 0U); + return SCUDO_WORDSIZE - 1U - static_cast(__builtin_clzl(X)); +} + +INLINE uptr roundUpToPowerOfTwo(uptr Size) { + DCHECK(Size); + if (isPowerOfTwo(Size)) + return Size; + const uptr Up = getMostSignificantSetBitIndex(Size); + DCHECK_LT(Size, (1UL << (Up + 1))); + DCHECK_GT(Size, (1UL << Up)); + return 1UL << (Up + 1); +} + +INLINE uptr getLeastSignificantSetBitIndex(uptr X) { + DCHECK_NE(X, 0U); + return static_cast(__builtin_ctzll(X)); +} + +INLINE uptr getLog2(uptr X) { + DCHECK(isPowerOfTwo(X)); + return getLeastSignificantSetBitIndex(X); +} + +INLINE u32 getRandomU32(u32 *State) { + // ANSI C linear congruential PRNG (16-bit output). + // return (*State = *State * 1103515245 + 12345) >> 16; + // XorShift (32-bit output). + *State ^= *State << 13; + *State ^= *State >> 17; + *State ^= *State << 5; + return *State; +} + +INLINE u32 getRandomModN(u32 *State, u32 N) { + return getRandomU32(State) % N; // [0, N) +} + +template INLINE void shuffle(T *A, u32 N, u32 *RandState) { + if (N <= 1) + return; + u32 State = *RandState; + for (u32 I = N - 1; I > 0; I--) + Swap(A[I], A[getRandomModN(&State, I + 1)]); + *RandState = State; +} + +// Hardware specific inlinable functions. + +INLINE void yieldProcessor(u8 Count) { +#if defined(__i386__) || defined(__x86_64__) + __asm__ __volatile__("" ::: "memory"); + for (u8 I = 0; I < Count; I++) + __asm__ __volatile__("pause"); +#elif defined(__aarch64__) || defined(__arm__) + __asm__ __volatile__("" ::: "memory"); + for (u8 I = 0; I < Count; I++) + __asm__ __volatile__("yield"); +#endif + __asm__ __volatile__("" ::: "memory"); +} + +// Platform specific functions. + +void yieldPlatform(); + +extern uptr PageSizeCached; +uptr getPageSizeSlow(); +INLINE uptr getPageSizeCached() { + if (LIKELY(PageSizeCached)) + return PageSizeCached; + return getPageSizeSlow(); +} + +u32 getNumberOfCPUs(); + +const char *getEnv(const char *Name); + +u64 getMonotonicTime(); + +// Our randomness gathering function is limited to 256 bytes to ensure we get +// as many bytes as requested, and avoid interruptions (on Linux). +constexpr uptr MaxRandomLength = 256U; +bool getRandom(void *Buffer, uptr Length, bool Blocking = false); + +// Platform memory mapping functions. + +#define MAP_ALLOWNOMEM (1U << 0) +#define MAP_NOACCESS (1U << 1) +#define MAP_RESIZABLE (1U << 2) + +// Our platform memory mapping use is restricted to 3 scenarios: +// - reserve memory at a random address (MAP_NOACCESS); +// - commit memory in a previously reserved space; +// - commit memory at a random address. +// As such, only a subset of parameters combinations is valid, which is checked +// by the function implementation. The Extra parameter allows to pass opaque +// platform specific data to the function. +// Returns nullptr on error or dies if MAP_ALLOWNOMEM is not specified. +void *map(void *Addr, uptr Size, const char *Name, uptr Flags = 0, + u64 *Extra = nullptr); + +// Indicates that we are getting rid of the whole mapping, which might have +// further consequences on Extra, depending on the platform. +#define UNMAP_ALL (1U << 0) + +void unmap(void *Addr, uptr Size, uptr Flags = 0, u64 *Extra = nullptr); + +void releasePagesToOS(uptr BaseAddress, uptr Offset, uptr Size, + u64 *Extra = nullptr); + +// Internal map & unmap fatal error. This must not call map(). +void NORETURN dieOnMapUnmapError(bool OutOfMemory = false); + +// Logging related functions. + +void setAbortMessage(const char *Message); + +} // namespace scudo + +#endif // SCUDO_COMMON_H_ diff --git a/compiler-rt/lib/scudo/standalone/fuchsia.cc b/compiler-rt/lib/scudo/standalone/fuchsia.cc new file mode 100644 index 0000000000000..17391d506eb86 --- /dev/null +++ b/compiler-rt/lib/scudo/standalone/fuchsia.cc @@ -0,0 +1,216 @@ +//===-- fuchsia.cc ----------------------------------------------*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#include "platform.h" + +#if SCUDO_FUCHSIA + +#include "common.h" +#include "mutex.h" + +#include // for PAGE_SIZE +#include // for abort() +#include +#include +#include + +namespace scudo { + +void yieldPlatform() { + const zx_status_t Status = _zx_nanosleep(0); + CHECK_EQ(Status, ZX_OK); +} + +uptr getPageSize() { return PAGE_SIZE; } + +void NORETURN die() { __builtin_trap(); } + +// We zero-initialize the Extra parameter of map(), make sure this is consistent +// with ZX_HANDLE_INVALID. +COMPILER_CHECK(ZX_HANDLE_INVALID == 0); + +struct MapInfo { + zx_handle_t Vmar; + zx_handle_t Vmo; +}; +COMPILER_CHECK(sizeof(MapInfo) == sizeof(u64)); + +static void *allocateVmar(uptr Size, MapInfo *Info, bool AllowNoMem) { + // Only scenario so far. + DCHECK(Info); + DCHECK_EQ(Info->Vmar, ZX_HANDLE_INVALID); + + uintptr_t P; + const zx_status_t Status = _zx_vmar_allocate( + _zx_vmar_root_self(), + ZX_VM_CAN_MAP_READ | ZX_VM_CAN_MAP_WRITE | ZX_VM_CAN_MAP_SPECIFIC, 0, + Size, &Info->Vmar, &P); + if (Status != ZX_OK) { + if (Status != ZX_ERR_NO_MEMORY || !AllowNoMem) + dieOnMapUnmapError(Status == ZX_ERR_NO_MEMORY); + return nullptr; + } + return reinterpret_cast(P); +} + +// Returns the offset of an address range in a Vmar, while checking that said +// range fully belongs to the Vmar. An alternative would be to keep track of +// both the base & length to avoid calling this. The tradeoff being a system +// call vs two extra uptr of storage. +// TODO(kostyak): revisit the implications of both options. +static uint64_t getOffsetInVmar(zx_handle_t Vmar, void *Addr, uintptr_t Size) { + zx_info_vmar_t Info; + const zx_status_t Status = _zx_object_get_info( + Vmar, ZX_INFO_VMAR, &Info, sizeof(Info), nullptr, nullptr); + CHECK_EQ(Status, ZX_OK); + const uint64_t Offset = reinterpret_cast(Addr) - Info.base; + CHECK_LE(Offset, Info.base + Info.len); + CHECK_LE(Offset + Size, Info.base + Info.len); + return Offset; +} + +void *map(void *Addr, uptr Size, const char *Name, uptr Flags, u64 *Extra) { + DCHECK_EQ(Size % PAGE_SIZE, 0); + const bool AllowNoMem = !!(Flags & MAP_ALLOWNOMEM); + MapInfo *Info = reinterpret_cast(Extra); + + // For MAP_NOACCESS, just allocate a Vmar and return. + if (Flags & MAP_NOACCESS) + return allocateVmar(Size, Info, AllowNoMem); + + const zx_handle_t Vmar = Info ? Info->Vmar : _zx_vmar_root_self(); + CHECK_NE(Vmar, ZX_HANDLE_INVALID); + + zx_status_t Status; + zx_handle_t Vmo; + uint64_t VmoSize = 0; + if (Info && Info->Vmo != ZX_HANDLE_INVALID) { + // If a Vmo was specified, it's a resize operation. + CHECK(Addr); + DCHECK(Flags & MAP_RESIZABLE); + Vmo = Info->Vmo; + Status = _zx_vmo_get_size(Vmo, &VmoSize); + if (Status == ZX_OK) + Status = _zx_vmo_set_size(Vmo, VmoSize + Size); + if (Status != ZX_OK) { + if (Status != ZX_ERR_NO_MEMORY || !AllowNoMem) + dieOnMapUnmapError(Status == ZX_ERR_NO_MEMORY); + return nullptr; + } + } else { + // Otherwise, create a Vmo and set its name. + Status = _zx_vmo_create(Size, 0, &Vmo); + if (Status != ZX_OK) { + if (Status != ZX_ERR_NO_MEMORY || !AllowNoMem) + dieOnMapUnmapError(Status == ZX_ERR_NO_MEMORY); + return nullptr; + } + uptr N = 0; + while (Name[N]) + N++; + _zx_object_set_property(Vmo, ZX_PROP_NAME, Name, N); + } + + uintptr_t P; + zx_vm_option_t MapFlags = ZX_VM_PERM_READ | ZX_VM_PERM_WRITE; + const uint64_t Offset = Addr ? getOffsetInVmar(Vmar, Addr, Size) : 0; + if (Offset) + MapFlags |= ZX_VM_SPECIFIC; + Status = _zx_vmar_map(Vmar, MapFlags, Offset, Vmo, VmoSize, Size, &P); + // No need to track the Vmo if we don't intend on resizing it. Close it. + if (Flags & MAP_RESIZABLE) { + DCHECK(Info); + DCHECK_EQ(Info->Vmo, ZX_HANDLE_INVALID); + Info->Vmo = Vmo; + } else { + CHECK_EQ(_zx_handle_close(Vmo), ZX_OK); + } + if (Status != ZX_OK) { + if (Status != ZX_ERR_NO_MEMORY || !AllowNoMem) + dieOnMapUnmapError(Status == ZX_ERR_NO_MEMORY); + return nullptr; + } + + return reinterpret_cast(P); +} + +void unmap(void *Addr, uptr Size, uptr Flags, u64 *Extra) { + MapInfo *Info = reinterpret_cast(Extra); + if (Flags & UNMAP_ALL) { + DCHECK_NE(Info, nullptr); + const zx_handle_t Vmar = Info->Vmar; + DCHECK_NE(Vmar, _zx_vmar_root_self()); + // Destroying the vmar effectively unmaps the whole mapping. + CHECK_EQ(_zx_vmar_destroy(Vmar), ZX_OK); + CHECK_EQ(_zx_handle_close(Vmar), ZX_OK); + } else { + const zx_handle_t Vmar = Info ? Info->Vmar : _zx_vmar_root_self(); + const zx_status_t Status = + _zx_vmar_unmap(Vmar, reinterpret_cast(Addr), Size); + if (Status != ZX_OK) + dieOnMapUnmapError(); + } + if (Info) { + if (Info->Vmo != ZX_HANDLE_INVALID) + CHECK_EQ(_zx_handle_close(Info->Vmo), ZX_OK); + Info->Vmo = ZX_HANDLE_INVALID; + Info->Vmar = ZX_HANDLE_INVALID; + } +} + +void releasePagesToOS(UNUSED uptr BaseAddress, uptr Offset, uptr Size, + u64 *Extra) { + MapInfo *Info = reinterpret_cast(Extra); + DCHECK(Info); + DCHECK_NE(Info->Vmar, ZX_HANDLE_INVALID); + DCHECK_NE(Info->Vmo, ZX_HANDLE_INVALID); + const zx_status_t Status = + _zx_vmo_op_range(Info->Vmo, ZX_VMO_OP_DECOMMIT, Offset, Size, NULL, 0); + CHECK_EQ(Status, ZX_OK); +} + +const char *getEnv(const char *Name) { return getenv(Name); } + +void BlockingMutex::wait() { + const zx_status_t Status = + _zx_futex_wait(reinterpret_cast(OpaqueStorage), MtxSleeping, + ZX_HANDLE_INVALID, ZX_TIME_INFINITE); + if (Status != ZX_ERR_BAD_STATE) + CHECK_EQ(Status, ZX_OK); // Normal race +} + +void BlockingMutex::wake() { + const zx_status_t Status = + _zx_futex_wake(reinterpret_cast(OpaqueStorage), 1); + CHECK_EQ(Status, ZX_OK); +} + +u64 getMonotonicTime() { return _zx_clock_get(ZX_CLOCK_MONOTONIC); } + +u32 getNumberOfCPUs() { return _zx_system_get_num_cpus(); } + +bool getRandom(void *Buffer, uptr Length, bool Blocking) { + COMPILER_CHECK(MaxRandomLength <= ZX_CPRNG_DRAW_MAX_LEN); + if (!Buffer || !Length || Length > MaxRandomLength) + return false; + _zx_cprng_draw(Buffer, Length); + return true; +} + +void outputRaw(const char *Buffer) { + uptr N = 0; + while (Buffer[N]) + N++; + __sanitizer_log_write(Buffer, N); +} + +void setAbortMessage(const char *Message) {} + +} // namespace scudo + +#endif // SCUDO_FUCHSIA diff --git a/compiler-rt/lib/scudo/standalone/internal_defs.h b/compiler-rt/lib/scudo/standalone/internal_defs.h new file mode 100644 index 0000000000000..41ad5917322d7 --- /dev/null +++ b/compiler-rt/lib/scudo/standalone/internal_defs.h @@ -0,0 +1,132 @@ +//===-- internal_defs.h -----------------------------------------*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#ifndef SCUDO_INTERNAL_DEFS_H_ +#define SCUDO_INTERNAL_DEFS_H_ + +#include "platform.h" + +#include + +#ifndef SCUDO_DEBUG +#define SCUDO_DEBUG 0 +#endif + +#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0])) + +// String related macros. + +#define STRINGIFY_(S) #S +#define STRINGIFY(S) STRINGIFY_(S) +#define CONCATENATE_(S, C) S##C +#define CONCATENATE(S, C) CONCATENATE_(S, C) + +// Attributes & builtins related macros. + +#define INTERFACE __attribute__((visibility("default"))) +#define WEAK __attribute__((weak)) +#define INLINE inline +#define ALWAYS_INLINE inline __attribute__((always_inline)) +#define ALIAS(x) __attribute__((alias(x))) +// Please only use the ALIGNED macro before the type. Using ALIGNED after the +// variable declaration is not portable. +#define ALIGNED(x) __attribute__((aligned(x))) +#define FORMAT(f, a) __attribute__((format(printf, f, a))) +#define NOINLINE __attribute__((noinline)) +#define NORETURN __attribute__((noreturn)) +#define THREADLOCAL __thread +#define LIKELY(x) __builtin_expect(!!(x), 1) +#define UNLIKELY(x) __builtin_expect(!!(x), 0) +#if defined(__i386__) || defined(__x86_64__) +// __builtin_prefetch(x) generates prefetchnt0 on x86 +#define PREFETCH(x) __asm__("prefetchnta (%0)" : : "r"(x)) +#else +#define PREFETCH(x) __builtin_prefetch(x) +#endif +#define UNUSED __attribute__((unused)) +#define USED __attribute__((used)) +#define NOEXCEPT noexcept + +namespace scudo { + +typedef unsigned long uptr; +typedef signed long sptr; +typedef unsigned char u8; +typedef unsigned short u16; +typedef unsigned int u32; +typedef unsigned long long u64; +typedef signed char s8; +typedef signed short s16; +typedef signed int s32; +typedef signed long long s64; + +// The following two functions have platform specific implementations. +void outputRaw(const char *Buffer); +void NORETURN die(); + +#define RAW_CHECK_MSG(Expr, Msg) \ + do { \ + if (UNLIKELY(!(Expr))) { \ + outputRaw(Msg); \ + die(); \ + } \ + } while (false) + +#define RAW_CHECK(Expr) RAW_CHECK_MSG(Expr, #Expr) + +// TODO(kostyak): use reportCheckFailed when checked-in. +#define CHECK_IMPL(c1, op, c2) \ + do { \ + u64 v1 = (u64)(c1); \ + u64 v2 = (u64)(c2); \ + if (UNLIKELY(!(v1 op v2))) { \ + outputRaw("CHECK failed: (" #c1 ") " #op " (" #c2 ")\n"); \ + die(); \ + } \ + } while (false) + +#define CHECK(a) CHECK_IMPL((a), !=, 0) +#define CHECK_EQ(a, b) CHECK_IMPL((a), ==, (b)) +#define CHECK_NE(a, b) CHECK_IMPL((a), !=, (b)) +#define CHECK_LT(a, b) CHECK_IMPL((a), <, (b)) +#define CHECK_LE(a, b) CHECK_IMPL((a), <=, (b)) +#define CHECK_GT(a, b) CHECK_IMPL((a), >, (b)) +#define CHECK_GE(a, b) CHECK_IMPL((a), >=, (b)) + +#if SCUDO_DEBUG +#define DCHECK(a) CHECK(a) +#define DCHECK_EQ(a, b) CHECK_EQ(a, b) +#define DCHECK_NE(a, b) CHECK_NE(a, b) +#define DCHECK_LT(a, b) CHECK_LT(a, b) +#define DCHECK_LE(a, b) CHECK_LE(a, b) +#define DCHECK_GT(a, b) CHECK_GT(a, b) +#define DCHECK_GE(a, b) CHECK_GE(a, b) +#else +#define DCHECK(a) +#define DCHECK_EQ(a, b) +#define DCHECK_NE(a, b) +#define DCHECK_LT(a, b) +#define DCHECK_LE(a, b) +#define DCHECK_GT(a, b) +#define DCHECK_GE(a, b) +#endif + +// The superfluous die() call effectively makes this macro NORETURN. +#define UNREACHABLE(msg) \ + do { \ + CHECK(0 && msg); \ + die(); \ + } while (0) + +#define COMPILER_CHECK(Pred) static_assert(Pred, "") + +enum LinkerInitialized { LINKER_INITIALIZED = 0 }; + +} // namespace scudo + +#endif // SCUDO_INTERNAL_DEFS_H_ diff --git a/compiler-rt/lib/scudo/standalone/linux.cc b/compiler-rt/lib/scudo/standalone/linux.cc new file mode 100644 index 0000000000000..a8be26946f148 --- /dev/null +++ b/compiler-rt/lib/scudo/standalone/linux.cc @@ -0,0 +1,151 @@ +//===-- linux.cc ------------------------------------------------*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#include "platform.h" + +#if SCUDO_LINUX + +#include "common.h" +#include "linux.h" +#include "mutex.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if SCUDO_ANDROID +#include +// Definitions of prctl arguments to set a vma name in Android kernels. +#define ANDROID_PR_SET_VMA 0x53564d41 +#define ANDROID_PR_SET_VMA_ANON_NAME 0 +#endif + +namespace scudo { + +void yieldPlatform() { sched_yield(); } + +uptr getPageSize() { return static_cast(sysconf(_SC_PAGESIZE)); } + +void NORETURN die() { abort(); } + +void *map(void *Addr, uptr Size, UNUSED const char *Name, uptr Flags, + UNUSED u64 *Extra) { + int MmapFlags = MAP_PRIVATE | MAP_ANON; + if (Flags & MAP_NOACCESS) + MmapFlags |= MAP_NORESERVE; + if (Addr) { + // Currently no scenario for a noaccess mapping with a fixed address. + DCHECK_EQ(Flags & MAP_NOACCESS, 0); + MmapFlags |= MAP_FIXED; + } + const int MmapProt = + (Flags & MAP_NOACCESS) ? PROT_NONE : PROT_READ | PROT_WRITE; + void *P = mmap(Addr, Size, MmapProt, MmapFlags, -1, 0); + if (P == MAP_FAILED) { + if (!(Flags & MAP_ALLOWNOMEM) || errno != ENOMEM) + dieOnMapUnmapError(errno == ENOMEM); + return nullptr; + } +#if SCUDO_ANDROID + if (!(Flags & MAP_NOACCESS)) + prctl(ANDROID_PR_SET_VMA, ANDROID_PR_SET_VMA_ANON_NAME, P, Size, Name); +#endif + return P; +} + +void unmap(void *Addr, uptr Size, UNUSED uptr Flags, UNUSED u64 *Extra) { + if (munmap(Addr, Size) != 0) + dieOnMapUnmapError(); +} + +void releasePagesToOS(uptr BaseAddress, uptr Offset, uptr Size, + UNUSED u64 *Extra) { + void *Addr = reinterpret_cast(BaseAddress + Offset); + while (madvise(Addr, Size, MADV_DONTNEED) == -1 && errno == EAGAIN) { + } +} + +// Calling getenv should be fine (c)(tm) at any time. +const char *getEnv(const char *Name) { return getenv(Name); } + +void BlockingMutex::wait() { + syscall(SYS_futex, reinterpret_cast(OpaqueStorage), FUTEX_WAIT_PRIVATE, + MtxSleeping, nullptr, nullptr, 0); +} + +void BlockingMutex::wake() { + syscall(SYS_futex, reinterpret_cast(OpaqueStorage), FUTEX_WAKE_PRIVATE, + 1, nullptr, nullptr, 0); +} + +u64 getMonotonicTime() { + timespec TS; + clock_gettime(CLOCK_MONOTONIC, &TS); + return static_cast(TS.tv_sec) * (1000ULL * 1000 * 1000) + + static_cast(TS.tv_nsec); +} + +u32 getNumberOfCPUs() { + cpu_set_t CPUs; + CHECK_EQ(sched_getaffinity(0, sizeof(cpu_set_t), &CPUs), 0); + return static_cast(CPU_COUNT(&CPUs)); +} + +// Blocking is possibly unused if the getrandom block is not compiled in. +bool getRandom(void *Buffer, uptr Length, UNUSED bool Blocking) { + if (!Buffer || !Length || Length > MaxRandomLength) + return false; + ssize_t ReadBytes; +#if defined(SYS_getrandom) +#if !defined(GRND_NONBLOCK) +#define GRND_NONBLOCK 1 +#endif + // Up to 256 bytes, getrandom will not be interrupted. + ReadBytes = + syscall(SYS_getrandom, Buffer, Length, Blocking ? 0 : GRND_NONBLOCK); + if (ReadBytes == static_cast(Length)) + return true; +#endif // defined(SYS_getrandom) + // Up to 256 bytes, a read off /dev/urandom will not be interrupted. + // Blocking is moot here, O_NONBLOCK has no effect when opening /dev/urandom. + const int FileDesc = open("/dev/urandom", O_RDONLY); + if (FileDesc == -1) + return false; + ReadBytes = read(FileDesc, Buffer, Length); + close(FileDesc); + return (ReadBytes == static_cast(Length)); +} + +void outputRaw(const char *Buffer) { + static StaticSpinMutex Mutex; + SpinMutexLock L(&Mutex); + uptr N = 0; + while (Buffer[N]) + N++; + write(2, Buffer, N); +} + +extern "C" WEAK void android_set_abort_message(const char *); + +void setAbortMessage(const char *Message) { + if (&android_set_abort_message) + android_set_abort_message(Message); +} + +} // namespace scudo + +#endif // SCUDO_LINUX diff --git a/compiler-rt/lib/scudo/standalone/linux.h b/compiler-rt/lib/scudo/standalone/linux.h new file mode 100644 index 0000000000000..32ed871757fb1 --- /dev/null +++ b/compiler-rt/lib/scudo/standalone/linux.h @@ -0,0 +1,67 @@ +//===-- linux.h -------------------------------------------------*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#ifndef SCUDO_LINUX_H_ +#define SCUDO_LINUX_H_ + +#include "platform.h" + +#if SCUDO_LINUX + +namespace scudo { + +#if SCUDO_ANDROID + +#if defined(__aarch64__) +#define __get_tls() \ + ({ \ + void **__v; \ + __asm__("mrs %0, tpidr_el0" : "=r"(__v)); \ + __v; \ + }) +#elif defined(__arm__) +#define __get_tls() \ + ({ \ + void **__v; \ + __asm__("mrc p15, 0, %0, c13, c0, 3" : "=r"(__v)); \ + __v; \ + }) +#elif defined(__i386__) +#define __get_tls() \ + ({ \ + void **__v; \ + __asm__("movl %%gs:0, %0" : "=r"(__v)); \ + __v; \ + }) +#elif defined(__x86_64__) +#define __get_tls() \ + ({ \ + void **__v; \ + __asm__("mov %%fs:0, %0" : "=r"(__v)); \ + __v; \ + }) +#else +#error "Unsupported architecture." +#endif + +// The Android Bionic team has allocated a TLS slot for sanitizers starting +// with Q, given that Android currently doesn't support ELF TLS. It is used to +// store sanitizer thread specific data. +static const int TLS_SLOT_SANITIZER = 8; // TODO(kostyak): 6 for Q!! + +ALWAYS_INLINE uptr *getAndroidTlsPtr() { + return reinterpret_cast(&__get_tls()[TLS_SLOT_SANITIZER]); +} + +#endif // SCUDO_ANDROID + +} // namespace scudo + +#endif // SCUDO_LINUX + +#endif // SCUDO_LINUX_H_ diff --git a/compiler-rt/lib/scudo/standalone/list.h b/compiler-rt/lib/scudo/standalone/list.h new file mode 100644 index 0000000000000..8d814dd7ca7ee --- /dev/null +++ b/compiler-rt/lib/scudo/standalone/list.h @@ -0,0 +1,156 @@ +//===-- list.h --------------------------------------------------*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#ifndef SCUDO_LIST_H_ +#define SCUDO_LIST_H_ + +#include "internal_defs.h" + +namespace scudo { + +// Intrusive POD singly-linked list. +// An object with all zero fields should represent a valid empty list. clear() +// should be called on all non-zero-initialized objects before using. +template struct IntrusiveList { + friend class Iterator; + + void clear() { + First = Last = nullptr; + Size = 0; + } + + bool empty() const { return Size == 0; } + uptr size() const { return Size; } + + void push_back(Item *X) { + if (empty()) { + X->Next = nullptr; + First = Last = X; + Size = 1; + } else { + X->Next = nullptr; + Last->Next = X; + Last = X; + Size++; + } + } + + void push_front(Item *X) { + if (empty()) { + X->Next = nullptr; + First = Last = X; + Size = 1; + } else { + X->Next = First; + First = X; + Size++; + } + } + + void pop_front() { + DCHECK(!empty()); + First = First->Next; + if (!First) + Last = nullptr; + Size--; + } + + void extract(Item *Prev, Item *X) { + DCHECK(!empty()); + DCHECK_NE(Prev, nullptr); + DCHECK_NE(X, nullptr); + DCHECK_EQ(Prev->Next, X); + Prev->Next = X->Next; + if (Last == X) + Last = Prev; + Size--; + } + + Item *front() { return First; } + const Item *front() const { return First; } + Item *back() { return Last; } + const Item *back() const { return Last; } + + void append_front(IntrusiveList *L) { + DCHECK_NE(this, L); + if (L->empty()) + return; + if (empty()) { + *this = *L; + } else if (!L->empty()) { + L->Last->Next = First; + First = L->First; + Size += L->size(); + } + L->clear(); + } + + void append_back(IntrusiveList *L) { + DCHECK_NE(this, L); + if (L->empty()) + return; + if (empty()) { + *this = *L; + } else { + Last->Next = L->First; + Last = L->Last; + Size += L->size(); + } + L->clear(); + } + + void checkConsistency() { + if (Size == 0) { + CHECK_EQ(First, 0); + CHECK_EQ(Last, 0); + } else { + uptr count = 0; + for (Item *i = First;; i = i->Next) { + count++; + if (i == Last) + break; + } + CHECK_EQ(size(), count); + CHECK_EQ(Last->Next, 0); + } + } + + template class IteratorBase { + public: + explicit IteratorBase(ItemT *CurrentItem) : Current(CurrentItem) {} + IteratorBase &operator++() { + Current = Current->Next; + return *this; + } + bool operator!=(IteratorBase Other) const { + return Current != Other.Current; + } + ItemT &operator*() { return *Current; } + + private: + ItemT *Current; + }; + + typedef IteratorBase Iterator; + typedef IteratorBase ConstIterator; + + Iterator begin() { return Iterator(First); } + Iterator end() { return Iterator(nullptr); } + + ConstIterator begin() const { return ConstIterator(First); } + ConstIterator end() const { return ConstIterator(nullptr); } + +private: + uptr Size; + Item *First; + Item *Last; +}; + +} // namespace scudo + +#endif // SCUDO_LIST_H_ diff --git a/compiler-rt/lib/scudo/standalone/mutex.h b/compiler-rt/lib/scudo/standalone/mutex.h new file mode 100644 index 0000000000000..6de3810b4cbd7 --- /dev/null +++ b/compiler-rt/lib/scudo/standalone/mutex.h @@ -0,0 +1,108 @@ +//===-- mutex.h -------------------------------------------------*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#ifndef SCUDO_MUTEX_H_ +#define SCUDO_MUTEX_H_ + +#include "atomic_helpers.h" +#include "common.h" + +namespace scudo { + +class StaticSpinMutex { +public: + void init() { atomic_store_relaxed(&State, 0); } + + void lock() { + if (tryLock()) + return; + lockSlow(); + } + + bool tryLock() { + return atomic_exchange(&State, 1, memory_order_acquire) == 0; + } + + void unlock() { atomic_store(&State, 0, memory_order_release); } + + void checkLocked() { CHECK_EQ(atomic_load_relaxed(&State), 1); } + +private: + atomic_u8 State; + + void NOINLINE lockSlow() { + for (u32 I = 0;; I++) { + if (I < 10) + yieldProcessor(10); + else + yieldPlatform(); + if (atomic_load_relaxed(&State) == 0 && + atomic_exchange(&State, 1, memory_order_acquire) == 0) + return; + } + } +}; + +class SpinMutex : public StaticSpinMutex { +public: + SpinMutex() { init(); } + +private: + SpinMutex(const SpinMutex &) = delete; + void operator=(const SpinMutex &) = delete; +}; + +enum MutexState { MtxUnlocked = 0, MtxLocked = 1, MtxSleeping = 2 }; + +class BlockingMutex { +public: + explicit constexpr BlockingMutex(LinkerInitialized) : OpaqueStorage{0} {} + BlockingMutex() { memset(this, 0, sizeof(*this)); } + void wait(); + void wake(); + void lock() { + atomic_u32 *M = reinterpret_cast(&OpaqueStorage); + if (atomic_exchange(M, MtxLocked, memory_order_acquire) == MtxUnlocked) + return; + while (atomic_exchange(M, MtxSleeping, memory_order_acquire) != MtxUnlocked) + wait(); + } + void unlock() { + atomic_u32 *M = reinterpret_cast(&OpaqueStorage); + const u32 V = atomic_exchange(M, MtxUnlocked, memory_order_release); + DCHECK_NE(V, MtxUnlocked); + if (V == MtxSleeping) + wake(); + } + void checkLocked() { + atomic_u32 *M = reinterpret_cast(&OpaqueStorage); + CHECK_NE(MtxUnlocked, atomic_load_relaxed(M)); + } + +private: + uptr OpaqueStorage[1]; +}; + +template class GenericScopedLock { +public: + explicit GenericScopedLock(MutexType *M) : Mutex(M) { Mutex->lock(); } + ~GenericScopedLock() { Mutex->unlock(); } + +private: + MutexType *Mutex; + + GenericScopedLock(const GenericScopedLock &) = delete; + void operator=(const GenericScopedLock &) = delete; +}; + +typedef GenericScopedLock SpinMutexLock; +typedef GenericScopedLock BlockingMutexLock; + +} // namespace scudo + +#endif // SCUDO_MUTEX_H_ diff --git a/compiler-rt/lib/scudo/standalone/platform.h b/compiler-rt/lib/scudo/standalone/platform.h new file mode 100644 index 0000000000000..a897a566f9bf2 --- /dev/null +++ b/compiler-rt/lib/scudo/standalone/platform.h @@ -0,0 +1,70 @@ +//===-- platform.h ----------------------------------------------*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#ifndef SCUDO_PLATFORM_H_ +#define SCUDO_PLATFORM_H_ + +#if defined(__linux__) +#define SCUDO_LINUX 1 +#else +#define SCUDO_LINUX 0 +#endif + +#if defined(__ANDROID__) +#define SCUDO_ANDROID 1 +#else +#define SCUDO_ANDROID 0 +#endif + +#if defined(__Fuchsia__) +#define SCUDO_FUCHSIA 1 +#else +#define SCUDO_FUCHSIA 0 +#endif + +#if __LP64__ +#define SCUDO_WORDSIZE 64U +#else +#define SCUDO_WORDSIZE 32U +#endif + +#if SCUDO_WORDSIZE == 64U +#define FIRST_32_SECOND_64(a, b) (b) +#else +#define FIRST_32_SECOND_64(a, b) (a) +#endif + +#ifndef SCUDO_CAN_USE_PRIMARY64 +#define SCUDO_CAN_USE_PRIMARY64 (SCUDO_WORDSIZE == 64U) +#endif + +#ifndef SCUDO_MIN_ALIGNMENT_LOG +// We force malloc-type functions to be aligned to std::max_align_t, but there +// is no reason why the minimum alignment for all other functions can't be 8 +// bytes. Except obviously for applications making incorrect assumptions. +// TODO(kostyak): define SCUDO_MIN_ALIGNMENT_LOG 3 +#define SCUDO_MIN_ALIGNMENT_LOG FIRST_32_SECOND_64(3, 4) +#endif + +#if defined(__aarch64__) +#define SCUDO_MMAP_RANGE_SIZE FIRST_32_SECOND_64(1ULL << 32, 1ULL << 48) +#else +#define SCUDO_MMAP_RANGE_SIZE FIRST_32_SECOND_64(1ULL << 32, 1ULL << 47) +#endif + +// Older gcc have issues aligning to a constexpr, and require an integer. +// See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56859 among others. +#if defined(__powerpc__) || defined(__powerpc64__) +#define SCUDO_CACHE_LINE_SIZE 128 +#else +#define SCUDO_CACHE_LINE_SIZE 64 +#endif + +#define SCUDO_POINTER_FORMAT_LENGTH FIRST_32_SECOND_64(8, 12) + +#endif // SCUDO_PLATFORM_H_ diff --git a/compiler-rt/lib/scudo/standalone/tests/CMakeLists.txt b/compiler-rt/lib/scudo/standalone/tests/CMakeLists.txt new file mode 100644 index 0000000000000..82fc923c59b4d --- /dev/null +++ b/compiler-rt/lib/scudo/standalone/tests/CMakeLists.txt @@ -0,0 +1,61 @@ +include_directories(..) + +add_custom_target(ScudoUnitTests) +set_target_properties(ScudoUnitTests PROPERTIES + FOLDER "Compiler-RT Tests") + +set(SCUDO_UNITTEST_CFLAGS + ${COMPILER_RT_UNITTEST_CFLAGS} + ${COMPILER_RT_GTEST_CFLAGS} + -I${COMPILER_RT_SOURCE_DIR}/include + -I${COMPILER_RT_SOURCE_DIR}/lib + -I${COMPILER_RT_SOURCE_DIR}/lib/scudo/standalone + -DGTEST_HAS_RTTI=0) + +set(SCUDO_TEST_ARCH ${SCUDO_STANDALONE_SUPPORTED_ARCH}) + +# gtests requires c++ +set(LINK_FLAGS) +foreach(lib ${SANITIZER_TEST_CXX_LIBRARIES}) + list(APPEND LINK_FLAGS -l${lib}) +endforeach() +list(APPEND LINK_FLAGS -pthread) + +set(TEST_HEADERS) +foreach (header ${SCUDO_HEADERS}) + list(APPEND TEST_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/../${header}) +endforeach() + +# add_scudo_unittest( +# SOURCES +# HEADERS ) +macro(add_scudo_unittest testname) + cmake_parse_arguments(TEST "" "" "SOURCES;HEADERS" ${ARGN}) + if(COMPILER_RT_HAS_SCUDO_STANDALONE) + foreach(arch ${SCUDO_TEST_ARCH}) + set(ScudoUnitTestsObjects) + add_library("RTScudoStandalone.test.${arch}" STATIC + $) + generate_compiler_rt_tests(ScudoUnitTestsObjects ScudoUnitTests + "${testname}-${arch}-Test" ${arch} + SOURCES ${TEST_SOURCES} ${COMPILER_RT_GTEST_SOURCE} + COMPILE_DEPS ${TEST_HEADERS} + DEPS gtest scudo_standalone + RUNTIME RTScudoStandalone.test.${arch} + CFLAGS ${SCUDO_UNITTEST_CFLAGS} + LINK_FLAGS ${LINK_FLAGS}) + endforeach() + endif() +endmacro() + +set(SCUDO_UNIT_TEST_SOURCES + atomic_test.cc + bytemap_test.cc + list_test.cc + map_test.cc + mutex_test.cc + vector_test.cc + scudo_unit_test_main.cc) + +add_scudo_unittest(ScudoUnitTest + SOURCES ${SCUDO_UNIT_TEST_SOURCES}) diff --git a/compiler-rt/lib/scudo/standalone/tests/atomic_test.cc b/compiler-rt/lib/scudo/standalone/tests/atomic_test.cc new file mode 100644 index 0000000000000..3095451b9dde5 --- /dev/null +++ b/compiler-rt/lib/scudo/standalone/tests/atomic_test.cc @@ -0,0 +1,112 @@ +//===-- atomic_test.cc ------------------------------------------*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#include "scudo/standalone/atomic_helpers.h" +#include "gtest/gtest.h" + +namespace scudo { + +template struct ValAndMagic { + typename T::Type Magic0; + T A; + typename T::Type Magic1; + + static ValAndMagic *Sink; +}; + +template ValAndMagic *ValAndMagic::Sink; + +template +void checkStoreLoad() { + typedef typename T::Type Type; + ValAndMagic Val; + // Prevent the compiler from scalarizing the struct. + ValAndMagic::Sink = &Val; + // Ensure that surrounding memory is not overwritten. + Val.Magic0 = Val.Magic1 = (Type)-3; + for (u64 I = 0; I < 100; I++) { + // Generate A value that occupies all bytes of the variable. + u64 V = I; + V |= V << 8; + V |= V << 16; + V |= V << 32; + Val.A.ValDoNotUse = (Type)V; + EXPECT_EQ(atomic_load(&Val.A, LoadMO), (Type)V); + Val.A.ValDoNotUse = (Type)-1; + atomic_store(&Val.A, (Type)V, StoreMO); + EXPECT_EQ(Val.A.ValDoNotUse, (Type)V); + } + EXPECT_EQ(Val.Magic0, (Type)-3); + EXPECT_EQ(Val.Magic1, (Type)-3); +} + +TEST(ScudoAtomicTest, AtomicStoreLoad) { + checkStoreLoad(); + checkStoreLoad(); + checkStoreLoad(); + checkStoreLoad(); + checkStoreLoad(); + + checkStoreLoad(); + checkStoreLoad(); + checkStoreLoad(); + checkStoreLoad(); + checkStoreLoad(); + + checkStoreLoad(); + checkStoreLoad(); + checkStoreLoad(); + checkStoreLoad(); + checkStoreLoad(); + + checkStoreLoad(); + checkStoreLoad(); + checkStoreLoad(); + checkStoreLoad(); + checkStoreLoad(); + + checkStoreLoad(); + checkStoreLoad(); + checkStoreLoad(); + checkStoreLoad(); + checkStoreLoad(); +} + +template void checkAtomicCompareExchange() { + typedef typename T::Type Type; + { + Type OldVal = 42; + Type NewVal = 24; + Type V = OldVal; + EXPECT_TRUE(atomic_compare_exchange_strong( + reinterpret_cast(&V), &OldVal, NewVal, memory_order_relaxed)); + EXPECT_FALSE(atomic_compare_exchange_strong( + reinterpret_cast(&V), &OldVal, NewVal, memory_order_relaxed)); + EXPECT_EQ(NewVal, OldVal); + } + { + Type OldVal = 42; + Type NewVal = 24; + Type V = OldVal; + EXPECT_TRUE(atomic_compare_exchange_weak(reinterpret_cast(&V), &OldVal, + NewVal, memory_order_relaxed)); + EXPECT_FALSE(atomic_compare_exchange_weak( + reinterpret_cast(&V), &OldVal, NewVal, memory_order_relaxed)); + EXPECT_EQ(NewVal, OldVal); + } +} + +TEST(ScudoAtomicTest, AtomicCompareExchangeTest) { + checkAtomicCompareExchange(); + checkAtomicCompareExchange(); + checkAtomicCompareExchange(); + checkAtomicCompareExchange(); + checkAtomicCompareExchange(); +} + +} // namespace scudo diff --git a/compiler-rt/lib/scudo/standalone/tests/bytemap_test.cc b/compiler-rt/lib/scudo/standalone/tests/bytemap_test.cc new file mode 100644 index 0000000000000..c83ff3f61f5b7 --- /dev/null +++ b/compiler-rt/lib/scudo/standalone/tests/bytemap_test.cc @@ -0,0 +1,73 @@ +//===-- bytemap_test.cc------------------------------------------*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#include "bytemap.h" + +#include "gtest/gtest.h" + +#include + +template void testMap(T &Map, scudo::uptr Size) { + Map.init(); + for (scudo::uptr I = 0; I < Size; I += 7) + Map.set(I, (I % 100) + 1); + for (scudo::uptr J = 0; J < Size; J++) { + if (J % 7) + EXPECT_EQ(Map[J], 0); + else + EXPECT_EQ(Map[J], (J % 100) + 1); + } +} + +TEST(ScudoByteMapTest, FlatByteMap) { + const scudo::uptr Size = 1U << 10; + scudo::FlatByteMap Map; + testMap(Map, Size); +} + +TEST(ScudoByteMapTest, TwoLevelByteMap) { + const scudo::uptr Size1 = 1U << 6, Size2 = 1U << 12; + scudo::TwoLevelByteMap Map; + testMap(Map, Size1 * Size2); + Map.reset(); +} + +using TestByteMap = scudo::TwoLevelByteMap<1U << 12, 1U << 13>; + +struct TestByteMapParam { + TestByteMap *Map; + scudo::uptr Shard; + scudo::uptr NumberOfShards; +}; + +void *populateByteMap(void *Param) { + TestByteMapParam *P = reinterpret_cast(Param); + for (scudo::uptr I = P->Shard; I < P->Map->size(); I += P->NumberOfShards) { + scudo::u8 V = static_cast((I % 100) + 1); + P->Map->set(I, V); + EXPECT_EQ((*P->Map)[I], V); + } + return 0; +} + +TEST(ScudoByteMapTest, ThreadedTwoLevelByteMap) { + TestByteMap Map; + Map.init(); + static const scudo::uptr NumberOfThreads = 16U; + pthread_t T[NumberOfThreads]; + TestByteMapParam P[NumberOfThreads]; + for (scudo::uptr I = 0; I < NumberOfThreads; I++) { + P[I].Map = ⤅ + P[I].Shard = I; + P[I].NumberOfShards = NumberOfThreads; + pthread_create(&T[I], 0, populateByteMap, &P[I]); + } + for (scudo::uptr I = 0; I < NumberOfThreads; I++) + pthread_join(T[I], 0); + Map.reset(); +} diff --git a/compiler-rt/lib/scudo/standalone/tests/list_test.cc b/compiler-rt/lib/scudo/standalone/tests/list_test.cc new file mode 100644 index 0000000000000..e4053d8b0e67f --- /dev/null +++ b/compiler-rt/lib/scudo/standalone/tests/list_test.cc @@ -0,0 +1,185 @@ +//===-- list_test.cc --------------------------------------------*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#include "scudo/standalone/list.h" +#include "gtest/gtest.h" + +struct ListItem { + ListItem *Next; +}; + +typedef scudo::IntrusiveList List; + +static List StaticList; + +static void setList(List *L, ListItem *X = nullptr, ListItem *Y = nullptr, + ListItem *Z = nullptr) { + L->clear(); + if (X) + L->push_back(X); + if (Y) + L->push_back(Y); + if (Z) + L->push_back(Z); +} + +static void checkList(List *L, ListItem *I1, ListItem *I2 = nullptr, + ListItem *I3 = nullptr, ListItem *I4 = nullptr, + ListItem *I5 = nullptr, ListItem *I6 = nullptr) { + if (I1) { + EXPECT_EQ(L->front(), I1); + L->pop_front(); + } + if (I2) { + EXPECT_EQ(L->front(), I2); + L->pop_front(); + } + if (I3) { + EXPECT_EQ(L->front(), I3); + L->pop_front(); + } + if (I4) { + EXPECT_EQ(L->front(), I4); + L->pop_front(); + } + if (I5) { + EXPECT_EQ(L->front(), I5); + L->pop_front(); + } + if (I6) { + EXPECT_EQ(L->front(), I6); + L->pop_front(); + } + EXPECT_TRUE(L->empty()); +} + +TEST(ScudoListTest, IntrusiveList) { + ListItem Items[6]; + EXPECT_EQ(StaticList.size(), 0U); + + List L; + L.clear(); + + ListItem *X = &Items[0]; + ListItem *Y = &Items[1]; + ListItem *Z = &Items[2]; + ListItem *A = &Items[3]; + ListItem *B = &Items[4]; + ListItem *C = &Items[5]; + + EXPECT_EQ(L.size(), 0U); + L.push_back(X); + EXPECT_EQ(L.size(), 1U); + EXPECT_EQ(L.back(), X); + EXPECT_EQ(L.front(), X); + L.pop_front(); + EXPECT_TRUE(L.empty()); + L.checkConsistency(); + + L.push_front(X); + EXPECT_EQ(L.size(), 1U); + EXPECT_EQ(L.back(), X); + EXPECT_EQ(L.front(), X); + L.pop_front(); + EXPECT_TRUE(L.empty()); + L.checkConsistency(); + + L.push_front(X); + L.push_front(Y); + L.push_front(Z); + EXPECT_EQ(L.size(), 3U); + EXPECT_EQ(L.front(), Z); + EXPECT_EQ(L.back(), X); + L.checkConsistency(); + + L.pop_front(); + EXPECT_EQ(L.size(), 2U); + EXPECT_EQ(L.front(), Y); + EXPECT_EQ(L.back(), X); + L.pop_front(); + L.pop_front(); + EXPECT_TRUE(L.empty()); + L.checkConsistency(); + + L.push_back(X); + L.push_back(Y); + L.push_back(Z); + EXPECT_EQ(L.size(), 3U); + EXPECT_EQ(L.front(), X); + EXPECT_EQ(L.back(), Z); + L.checkConsistency(); + + L.pop_front(); + EXPECT_EQ(L.size(), 2U); + EXPECT_EQ(L.front(), Y); + EXPECT_EQ(L.back(), Z); + L.pop_front(); + L.pop_front(); + EXPECT_TRUE(L.empty()); + L.checkConsistency(); + + L.push_back(X); + L.push_back(Y); + L.push_back(Z); + L.extract(X, Y); + EXPECT_EQ(L.size(), 2U); + EXPECT_EQ(L.front(), X); + EXPECT_EQ(L.back(), Z); + L.checkConsistency(); + L.extract(X, Z); + EXPECT_EQ(L.size(), 1U); + EXPECT_EQ(L.front(), X); + EXPECT_EQ(L.back(), X); + L.checkConsistency(); + L.pop_front(); + EXPECT_TRUE(L.empty()); + + List L1, L2; + L1.clear(); + L2.clear(); + + L1.append_front(&L2); + EXPECT_TRUE(L1.empty()); + EXPECT_TRUE(L2.empty()); + + L1.append_back(&L2); + EXPECT_TRUE(L1.empty()); + EXPECT_TRUE(L2.empty()); + + setList(&L1, X); + checkList(&L1, X); + + setList(&L1, X, Y, Z); + setList(&L2, A, B, C); + L1.append_back(&L2); + checkList(&L1, X, Y, Z, A, B, C); + EXPECT_TRUE(L2.empty()); + + setList(&L1, X, Y); + setList(&L2); + L1.append_front(&L2); + checkList(&L1, X, Y); + EXPECT_TRUE(L2.empty()); +} + +TEST(ScudoListTest, IntrusiveListAppendEmpty) { + ListItem I; + List L; + L.clear(); + L.push_back(&I); + List L2; + L2.clear(); + L.append_back(&L2); + EXPECT_EQ(L.back(), &I); + EXPECT_EQ(L.front(), &I); + EXPECT_EQ(L.size(), 1U); + L.append_front(&L2); + EXPECT_EQ(L.back(), &I); + EXPECT_EQ(L.front(), &I); + EXPECT_EQ(L.size(), 1U); +} diff --git a/compiler-rt/lib/scudo/standalone/tests/map_test.cc b/compiler-rt/lib/scudo/standalone/tests/map_test.cc new file mode 100644 index 0000000000000..ee627d61400a2 --- /dev/null +++ b/compiler-rt/lib/scudo/standalone/tests/map_test.cc @@ -0,0 +1,65 @@ +//===-- map_test.cc----------------------------------------------*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#include "common.h" + +#include "gtest/gtest.h" + +#include + +const char *MappingName = "scudo:test"; + +TEST(ScudoMapTest, MapNoAccessUnmap) { + const scudo::uptr Size = 4 * scudo::getPageSizeCached(); + scudo::u64 PlatformData = 0; + void *P = scudo::map(nullptr, Size, MappingName, MAP_NOACCESS, &PlatformData); + EXPECT_NE(P, nullptr); + EXPECT_DEATH(memset(P, 0xaa, Size), ""); + scudo::unmap(P, Size, UNMAP_ALL, &PlatformData); +} + +TEST(ScudoMapTest, MapUnmap) { + const scudo::uptr Size = 4 * scudo::getPageSizeCached(); + scudo::u64 PlatformData = 0; + void *P = scudo::map(nullptr, Size, MappingName, 0, &PlatformData); + EXPECT_NE(P, nullptr); + memset(P, 0xaa, Size); + scudo::unmap(P, Size, 0, &PlatformData); + EXPECT_DEATH(memset(P, 0xbb, Size), ""); +} + +TEST(ScudoMapTest, MapWithGuardUnmap) { + const scudo::uptr PageSize = scudo::getPageSizeCached(); + const scudo::uptr Size = 4 * PageSize; + scudo::u64 PlatformData = 0; + void *P = scudo::map(nullptr, Size + 2 * PageSize, MappingName, MAP_NOACCESS, + &PlatformData); + EXPECT_NE(P, nullptr); + void *Q = + reinterpret_cast(reinterpret_cast(P) + PageSize); + EXPECT_EQ(scudo::map(Q, Size, MappingName, 0, &PlatformData), Q); + memset(Q, 0xaa, Size); + EXPECT_DEATH(memset(Q, 0xaa, Size + 1), ""); + scudo::unmap(P, Size + 2 * PageSize, UNMAP_ALL, &PlatformData); +} + +TEST(ScudoMapTest, MapGrowUnmap) { + const scudo::uptr PageSize = scudo::getPageSizeCached(); + const scudo::uptr Size = 4 * PageSize; + scudo::u64 PlatformData = 0; + void *P = scudo::map(nullptr, Size, MappingName, MAP_NOACCESS, &PlatformData); + EXPECT_NE(P, nullptr); + void *Q = + reinterpret_cast(reinterpret_cast(P) + PageSize); + EXPECT_EQ(scudo::map(Q, PageSize, MappingName, 0, &PlatformData), Q); + memset(Q, 0xaa, PageSize); + Q = reinterpret_cast(reinterpret_cast(Q) + PageSize); + EXPECT_EQ(scudo::map(Q, PageSize, MappingName, 0, &PlatformData), Q); + memset(Q, 0xbb, PageSize); + scudo::unmap(P, Size, UNMAP_ALL, &PlatformData); +} diff --git a/compiler-rt/lib/scudo/standalone/tests/mutex_test.cc b/compiler-rt/lib/scudo/standalone/tests/mutex_test.cc new file mode 100644 index 0000000000000..9e898ebc998c3 --- /dev/null +++ b/compiler-rt/lib/scudo/standalone/tests/mutex_test.cc @@ -0,0 +1,121 @@ +//===-- mutex_test.cc--------------------------------------------*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#include "mutex.h" + +#include "gtest/gtest.h" + +#include + +template class TestData { +public: + explicit TestData(MutexType *M) : Mutex(M) { + for (scudo::u32 I = 0; I < Size; I++) + Data[I] = 0; + } + + void write() { + Lock L(Mutex); + T V0 = Data[0]; + for (scudo::u32 I = 0; I < Size; I++) { + EXPECT_EQ(Data[I], V0); + Data[I]++; + } + } + + void tryWrite() { + if (!Mutex->tryLock()) + return; + T V0 = Data[0]; + for (scudo::u32 I = 0; I < Size; I++) { + EXPECT_EQ(Data[I], V0); + Data[I]++; + } + Mutex->unlock(); + } + + void backoff() { + volatile T LocalData[Size] = {}; + for (scudo::u32 I = 0; I < Size; I++) { + LocalData[I]++; + EXPECT_EQ(LocalData[I], 1U); + } + } + +private: + typedef scudo::GenericScopedLock Lock; + static const scudo::u32 Size = 64U; + typedef scudo::u64 T; + MutexType *Mutex; + ALIGNED(SCUDO_CACHE_LINE_SIZE) T Data[Size]; +}; + +const scudo::u32 NumberOfThreads = 8; +#if SCUDO_DEBUG +const scudo::u32 NumberOfIterations = 4 * 1024; +#else +const scudo::u32 NumberOfIterations = 16 * 1024; +#endif + +template static void *lockThread(void *Param) { + TestData *Data = reinterpret_cast *>(Param); + for (scudo::u32 I = 0; I < NumberOfIterations; I++) { + Data->write(); + Data->backoff(); + } + return 0; +} + +template static void *tryThread(void *Param) { + TestData *Data = reinterpret_cast *>(Param); + for (scudo::u32 I = 0; I < NumberOfIterations; I++) { + Data->tryWrite(); + Data->backoff(); + } + return 0; +} + +template static void checkLocked(MutexType *M) { + scudo::GenericScopedLock L(M); + M->checkLocked(); +} + +TEST(ScudoMutexTest, SpinMutex) { + scudo::SpinMutex M; + M.init(); + TestData Data(&M); + pthread_t Threads[NumberOfThreads]; + for (scudo::u32 I = 0; I < NumberOfThreads; I++) + pthread_create(&Threads[I], 0, lockThread, &Data); + for (scudo::u32 I = 0; I < NumberOfThreads; I++) + pthread_join(Threads[I], 0); +} + +TEST(ScudoMutexTest, SpinMutexTry) { + scudo::SpinMutex M; + M.init(); + TestData Data(&M); + pthread_t Threads[NumberOfThreads]; + for (scudo::u32 I = 0; I < NumberOfThreads; I++) + pthread_create(&Threads[I], 0, tryThread, &Data); + for (scudo::u32 I = 0; I < NumberOfThreads; I++) + pthread_join(Threads[I], 0); +} + +TEST(ScudoMutexTest, BlockingMutex) { + scudo::u64 MutexMemory[1024] = {}; + scudo::BlockingMutex *M = + new (MutexMemory) scudo::BlockingMutex(scudo::LINKER_INITIALIZED); + TestData Data(M); + pthread_t Threads[NumberOfThreads]; + for (scudo::u32 I = 0; I < NumberOfThreads; I++) + pthread_create(&Threads[I], 0, lockThread, &Data); + for (scudo::u32 I = 0; I < NumberOfThreads; I++) + pthread_join(Threads[I], 0); + checkLocked(M); +} diff --git a/compiler-rt/lib/scudo/standalone/tests/scudo_unit_test_main.cc b/compiler-rt/lib/scudo/standalone/tests/scudo_unit_test_main.cc new file mode 100644 index 0000000000000..16398e5da7e76 --- /dev/null +++ b/compiler-rt/lib/scudo/standalone/tests/scudo_unit_test_main.cc @@ -0,0 +1,14 @@ +//===-- scudo_unit_test_main.cc ---------------------------------*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#include "gtest/gtest.h" + +int main(int argc, char **argv) { + testing::InitGoogleTest(&argc, argv); + return RUN_ALL_TESTS(); +} diff --git a/compiler-rt/lib/scudo/standalone/tests/vector_test.cc b/compiler-rt/lib/scudo/standalone/tests/vector_test.cc new file mode 100644 index 0000000000000..ebfcc43ccecfc --- /dev/null +++ b/compiler-rt/lib/scudo/standalone/tests/vector_test.cc @@ -0,0 +1,43 @@ +//===-- vector_test.cc ------------------------------------------*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#include "vector.h" + +#include "gtest/gtest.h" + +TEST(ScudoVectorTest, Basic) { + scudo::Vector V; + EXPECT_EQ(V.size(), 0U); + V.push_back(42); + EXPECT_EQ(V.size(), 1U); + EXPECT_EQ(V[0], 42); + V.push_back(43); + EXPECT_EQ(V.size(), 2U); + EXPECT_EQ(V[0], 42); + EXPECT_EQ(V[1], 43); +} + +TEST(ScudoVectorTest, Stride) { + scudo::Vector V; + for (int i = 0; i < 1000; i++) { + V.push_back(i); + EXPECT_EQ(V.size(), i + 1U); + EXPECT_EQ(V[i], i); + } + for (int i = 0; i < 1000; i++) + EXPECT_EQ(V[i], i); +} + +TEST(ScudoVectorTest, ResizeReduction) { + scudo::Vector V; + V.push_back(0); + V.push_back(0); + EXPECT_EQ(V.size(), 2U); + V.resize(1); + EXPECT_EQ(V.size(), 1U); +} diff --git a/compiler-rt/lib/scudo/standalone/vector.h b/compiler-rt/lib/scudo/standalone/vector.h new file mode 100644 index 0000000000000..3cb4005ed29cc --- /dev/null +++ b/compiler-rt/lib/scudo/standalone/vector.h @@ -0,0 +1,118 @@ +//===-- vector.h ------------------------------------------------*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#ifndef SCUDO_VECTOR_H_ +#define SCUDO_VECTOR_H_ + +#include "common.h" + +#include + +namespace scudo { + +// A low-level vector based on map. May incur a significant memory overhead for +// small vectors. The current implementation supports only POD types. +template class VectorNoCtor { +public: + void init(uptr InitialCapacity) { + CapacityBytes = 0; + Size = 0; + Data = nullptr; + reserve(InitialCapacity); + } + void destroy() { + if (Data) + unmap(Data, CapacityBytes); + } + T &operator[](uptr I) { + DCHECK_LT(I, Size); + return Data[I]; + } + const T &operator[](uptr I) const { + DCHECK_LT(I, Size); + return Data[I]; + } + void push_back(const T &Element) { + DCHECK_LE(Size, capacity()); + if (Size == capacity()) { + const uptr NewCapacity = roundUpToPowerOfTwo(Size + 1); + reallocate(NewCapacity); + } + memcpy(&Data[Size++], &Element, sizeof(T)); + } + T &back() { + DCHECK_GT(Size, 0); + return Data[Size - 1]; + } + void pop_back() { + DCHECK_GT(Size, 0); + Size--; + } + uptr size() const { return Size; } + const T *data() const { return Data; } + T *data() { return Data; } + uptr capacity() const { return CapacityBytes / sizeof(T); } + void reserve(uptr NewSize) { + // Never downsize internal buffer. + if (NewSize > capacity()) + reallocate(NewSize); + } + void resize(uptr NewSize) { + if (NewSize > Size) { + reserve(NewSize); + memset(&Data[Size], 0, sizeof(T) * (NewSize - Size)); + } + Size = NewSize; + } + + void clear() { Size = 0; } + bool empty() const { return size() == 0; } + + const T *begin() const { return data(); } + T *begin() { return data(); } + const T *end() const { return data() + size(); } + T *end() { return data() + size(); } + +private: + void reallocate(uptr NewCapacity) { + DCHECK_GT(NewCapacity, 0); + DCHECK_LE(Size, NewCapacity); + const uptr NewCapacityBytes = + roundUpTo(NewCapacity * sizeof(T), getPageSizeCached()); + T *NewData = (T *)map(nullptr, NewCapacityBytes, "scudo:vector"); + if (Data) { + memcpy(NewData, Data, Size * sizeof(T)); + unmap(Data, CapacityBytes); + } + Data = NewData; + CapacityBytes = NewCapacityBytes; + } + + T *Data; + uptr CapacityBytes; + uptr Size; +}; + +template class Vector : public VectorNoCtor { +public: + Vector() { VectorNoCtor::init(1); } + explicit Vector(uptr Count) { + VectorNoCtor::init(Count); + this->resize(Count); + } + ~Vector() { VectorNoCtor::destroy(); } + // Disallow copies and moves. + Vector(const Vector &) = delete; + Vector &operator=(const Vector &) = delete; + Vector(Vector &&) = delete; + Vector &operator=(Vector &&) = delete; +}; + +} // namespace scudo + +#endif // SCUDO_VECTOR_H_ diff --git a/compiler-rt/lib/tsan/CMakeLists.txt b/compiler-rt/lib/tsan/CMakeLists.txt index e1da319ccc872..340926bd9c159 100644 --- a/compiler-rt/lib/tsan/CMakeLists.txt +++ b/compiler-rt/lib/tsan/CMakeLists.txt @@ -236,6 +236,7 @@ endif() # Build libcxx instrumented with TSan. if(COMPILER_RT_LIBCXX_PATH AND + COMPILER_RT_LIBCXXABI_PATH AND COMPILER_RT_TEST_COMPILER_ID STREQUAL "Clang" AND NOT ANDROID) set(libcxx_tsan_deps) diff --git a/compiler-rt/lib/tsan/benchmarks/func_entry_exit.cc b/compiler-rt/lib/tsan/benchmarks/func_entry_exit.cc new file mode 100644 index 0000000000000..5e0ba1d6981ba --- /dev/null +++ b/compiler-rt/lib/tsan/benchmarks/func_entry_exit.cc @@ -0,0 +1,20 @@ +// Synthetic benchmark for __tsan_func_entry/exit (spends ~75% there). + +void foo(bool x); + +int main() { + volatile int kRepeat1 = 1 << 30; + const int kRepeat = kRepeat1; + for (int i = 0; i < kRepeat; i++) + foo(false); +} + +__attribute__((noinline)) void bar(volatile bool x) { + if (x) + foo(x); +} + +__attribute__((noinline)) void foo(bool x) { + if (__builtin_expect(x, false)) + bar(x); +} diff --git a/compiler-rt/lib/tsan/benchmarks/mop.cc b/compiler-rt/lib/tsan/benchmarks/mop.cc new file mode 100644 index 0000000000000..e87fab8569691 --- /dev/null +++ b/compiler-rt/lib/tsan/benchmarks/mop.cc @@ -0,0 +1,80 @@ +// Synthetic benchmark for __tsan_read/write{1,2,4,8}. +// As compared to mini_bench_local/shared.cc this benchmark passes through +// deduplication logic (ContainsSameAccess). +// First argument is access size (1, 2, 4, 8). Second optional arg switches +// from writes to reads. + +#include +#include +#include +#include +#include +#include +#include + +template +void* thread(void *arg) { + const int kSize = 2 << 10; + static volatile long data[kSize]; + static volatile long turn; + const int kRepeat = 1 << 17; + const int id = !!arg; + for (int i = 0; i < kRepeat; i++) { + for (;;) { + int t = __atomic_load_n(&turn, __ATOMIC_ACQUIRE); + if (t == id) + break; + syscall(SYS_futex, &turn, FUTEX_WAIT, t, 0, 0, 0); + } + for (int j = 0; j < kSize; j++) { + if (write) { + ((volatile T*)&data[j])[0] = 1; + ((volatile T*)&data[j])[sizeof(T) == 8 ? 0 : 1] = 1; + } else { + T v0 = ((volatile T*)&data[j])[0]; + T v1 = ((volatile T*)&data[j])[sizeof(T) == 8 ? 0 : 1]; + (void)v0; + (void)v1; + } + } + __atomic_store_n(&turn, 1 - id, __ATOMIC_RELEASE); + syscall(SYS_futex, &turn, FUTEX_WAKE, 0, 0, 0, 0); + } + return 0; +} + +template +void test() { + pthread_t th; + pthread_create(&th, 0, thread, (void*)1); + thread(0); + pthread_join(th, 0); +} + +template +void testw(int size) { + switch (size) { + case 1: return test(); + case 2: return test(); + case 4: return test(); + case 8: return test(); + } +} + +int main(int argc, char** argv) { + int size = 8; + bool write = true; + if (argc > 1) { + size = atoi(argv[1]); + if (size != 1 && size != 2 && size != 4 && size != 8) + size = 8; + } + if (argc > 2) + write = false; + printf("%s%d\n", write ? "write" : "read", size); + if (write) + testw(size); + else + testw(size); + return 0; +} diff --git a/compiler-rt/lib/tsan/check_analyze.sh b/compiler-rt/lib/tsan/check_analyze.sh index 65c34d466da3f..a2a7e82b47ad0 100755 --- a/compiler-rt/lib/tsan/check_analyze.sh +++ b/compiler-rt/lib/tsan/check_analyze.sh @@ -34,16 +34,16 @@ check() { fi } -for f in write1 write2 write4 write8 read2 read4; do +for f in write1 write2 write4 write8; do check $f rsp 1 - check $f push 1 - check $f pop 6 + check $f push 2 + check $f pop 16 done -for f in read1 read8; do +for f in read1 read2 read4 read8; do check $f rsp 1 - check $f push 2 - check $f pop 12 + check $f push 3 + check $f pop 24 done for f in func_entry func_exit; do diff --git a/compiler-rt/lib/tsan/dd/CMakeLists.txt b/compiler-rt/lib/tsan/dd/CMakeLists.txt index f2b8a6d173a42..c3f5915dd8b2f 100644 --- a/compiler-rt/lib/tsan/dd/CMakeLists.txt +++ b/compiler-rt/lib/tsan/dd/CMakeLists.txt @@ -10,7 +10,7 @@ set(DD_SOURCES dd_interceptors.cc ) -set(DD_LINKLIBS ${SANITIZER_CXX_ABI_LIBRARY} ${SANITIZER_COMMON_LINK_LIBS}) +set(DD_LINKLIBS ${SANITIZER_CXX_ABI_LIBRARIES} ${SANITIZER_COMMON_LINK_LIBS}) append_list_if(COMPILER_RT_HAS_LIBDL dl DD_LINKLIBS) append_list_if(COMPILER_RT_HAS_LIBRT rt DD_LINKLIBS) diff --git a/compiler-rt/lib/tsan/go/tsan_go.cc b/compiler-rt/lib/tsan/go/tsan_go.cc index 825344ff73518..dfd1e1da158f5 100644 --- a/compiler-rt/lib/tsan/go/tsan_go.cc +++ b/compiler-rt/lib/tsan/go/tsan_go.cc @@ -213,7 +213,7 @@ void __tsan_go_start(ThreadState *parent, ThreadState **pthr, void *pc) { ThreadState *thr = AllocGoroutine(); *pthr = thr; int goid = ThreadCreate(parent, (uptr)pc, 0, true); - ThreadStart(thr, goid, 0, /*workerthread*/ false); + ThreadStart(thr, goid, 0, ThreadType::Regular); } void __tsan_go_end(ThreadState *thr) { diff --git a/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc b/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc index b568fd59c63ba..9ea7d89b40346 100644 --- a/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc +++ b/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc @@ -153,7 +153,7 @@ const int SIG_SETMASK = 2; #endif #define COMMON_INTERCEPTOR_NOTHING_IS_INITIALIZED \ - (!cur_thread()->is_inited) + (cur_thread_init(), !cur_thread()->is_inited) namespace __tsan { struct SignalDesc { @@ -398,7 +398,7 @@ static int setup_at_exit_wrapper(ThreadState *thr, uptr pc, void(*f)(), #if !SANITIZER_ANDROID TSAN_INTERCEPTOR(int, atexit, void (*f)()) { - if (UNLIKELY(cur_thread()->in_symbolizer)) + if (in_symbolizer()) return 0; // We want to setup the atexit callback even if we are in ignored lib // or after fork. @@ -408,7 +408,7 @@ TSAN_INTERCEPTOR(int, atexit, void (*f)()) { #endif TSAN_INTERCEPTOR(int, __cxa_atexit, void (*f)(void *a), void *arg, void *dso) { - if (UNLIKELY(cur_thread()->in_symbolizer)) + if (in_symbolizer()) return 0; SCOPED_TSAN_INTERCEPTOR(__cxa_atexit, f, arg, dso); return setup_at_exit_wrapper(thr, pc, (void(*)())f, arg, dso); @@ -454,7 +454,7 @@ static void on_exit_wrapper(int status, void *arg) { } TSAN_INTERCEPTOR(int, on_exit, void(*f)(int, void*), void *arg) { - if (UNLIKELY(cur_thread()->in_symbolizer)) + if (in_symbolizer()) return 0; SCOPED_TSAN_INTERCEPTOR(on_exit, f, arg); AtExitCtx *ctx = (AtExitCtx*)InternalAlloc(sizeof(AtExitCtx)); @@ -554,6 +554,7 @@ static void LongJmp(ThreadState *thr, uptr *env) { // FIXME: put everything below into a common extern "C" block? extern "C" void __tsan_setjmp(uptr sp, uptr mangled_sp) { + cur_thread_init(); SetJmp(cur_thread(), sp, mangled_sp); } @@ -664,7 +665,7 @@ TSAN_INTERCEPTOR(void, _longjmp, uptr *env, int val) { #if !SANITIZER_MAC TSAN_INTERCEPTOR(void*, malloc, uptr size) { - if (UNLIKELY(cur_thread()->in_symbolizer)) + if (in_symbolizer()) return InternalAlloc(size); void *p = 0; { @@ -681,7 +682,7 @@ TSAN_INTERCEPTOR(void*, __libc_memalign, uptr align, uptr sz) { } TSAN_INTERCEPTOR(void*, calloc, uptr size, uptr n) { - if (UNLIKELY(cur_thread()->in_symbolizer)) + if (in_symbolizer()) return InternalCalloc(size, n); void *p = 0; { @@ -693,7 +694,7 @@ TSAN_INTERCEPTOR(void*, calloc, uptr size, uptr n) { } TSAN_INTERCEPTOR(void*, realloc, void *p, uptr size) { - if (UNLIKELY(cur_thread()->in_symbolizer)) + if (in_symbolizer()) return InternalRealloc(p, size); if (p) invoke_free_hook(p); @@ -708,7 +709,7 @@ TSAN_INTERCEPTOR(void*, realloc, void *p, uptr size) { TSAN_INTERCEPTOR(void, free, void *p) { if (p == 0) return; - if (UNLIKELY(cur_thread()->in_symbolizer)) + if (in_symbolizer()) return InternalFree(p); invoke_free_hook(p); SCOPED_INTERCEPTOR_RAW(free, p); @@ -718,7 +719,7 @@ TSAN_INTERCEPTOR(void, free, void *p) { TSAN_INTERCEPTOR(void, cfree, void *p) { if (p == 0) return; - if (UNLIKELY(cur_thread()->in_symbolizer)) + if (in_symbolizer()) return InternalFree(p); invoke_free_hook(p); SCOPED_INTERCEPTOR_RAW(cfree, p); @@ -807,14 +808,14 @@ TSAN_INTERCEPTOR(void*, memalign, uptr align, uptr sz) { #if !SANITIZER_MAC TSAN_INTERCEPTOR(void*, aligned_alloc, uptr align, uptr sz) { - if (UNLIKELY(cur_thread()->in_symbolizer)) + if (in_symbolizer()) return InternalAlloc(sz, nullptr, align); SCOPED_INTERCEPTOR_RAW(aligned_alloc, align, sz); return user_aligned_alloc(thr, pc, align, sz); } TSAN_INTERCEPTOR(void*, valloc, uptr sz) { - if (UNLIKELY(cur_thread()->in_symbolizer)) + if (in_symbolizer()) return InternalAlloc(sz, nullptr, GetPageSizeCached()); SCOPED_INTERCEPTOR_RAW(valloc, sz); return user_valloc(thr, pc, sz); @@ -823,7 +824,7 @@ TSAN_INTERCEPTOR(void*, valloc, uptr sz) { #if SANITIZER_LINUX TSAN_INTERCEPTOR(void*, pvalloc, uptr sz) { - if (UNLIKELY(cur_thread()->in_symbolizer)) { + if (in_symbolizer()) { uptr PageSize = GetPageSizeCached(); sz = sz ? RoundUpTo(sz, PageSize) : PageSize; return InternalAlloc(sz, nullptr, PageSize); @@ -838,7 +839,7 @@ TSAN_INTERCEPTOR(void*, pvalloc, uptr sz) { #if !SANITIZER_MAC TSAN_INTERCEPTOR(int, posix_memalign, void **memptr, uptr align, uptr sz) { - if (UNLIKELY(cur_thread()->in_symbolizer)) { + if (in_symbolizer()) { void *p = InternalAlloc(sz, nullptr, align); if (!p) return errno_ENOMEM; @@ -942,6 +943,7 @@ extern "C" void *__tsan_thread_start_func(void *arg) { void *param = p->param; int tid = 0; { + cur_thread_init(); ThreadState *thr = cur_thread(); // Thread-local state is not initialized yet. ScopedIgnoreInterceptors ignore; @@ -958,7 +960,7 @@ extern "C" void *__tsan_thread_start_func(void *arg) { internal_sched_yield(); Processor *proc = ProcCreate(); ProcWire(proc, thr); - ThreadStart(thr, tid, GetTid(), /*workerthread*/ false); + ThreadStart(thr, tid, GetTid(), ThreadType::Regular); atomic_store(&p->tid, 0, memory_order_release); } void *res = callback(param); @@ -1050,6 +1052,16 @@ TSAN_INTERCEPTOR(int, pthread_detach, void *th) { return res; } +TSAN_INTERCEPTOR(void, pthread_exit, void *retval) { + { + SCOPED_INTERCEPTOR_RAW(pthread_exit, retval); +#if !SANITIZER_MAC && !SANITIZER_ANDROID + CHECK_EQ(thr, &cur_thread_placeholder); +#endif + } + REAL(pthread_exit)(retval); +} + #if SANITIZER_LINUX TSAN_INTERCEPTOR(int, pthread_tryjoin_np, void *th, void **ret) { SCOPED_TSAN_INTERCEPTOR(pthread_tryjoin_np, th, ret); @@ -1974,6 +1986,7 @@ static bool is_sync_signal(ThreadSignalContext *sctx, int sig) { void ALWAYS_INLINE rtl_generic_sighandler(bool sigact, int sig, __sanitizer_siginfo *info, void *ctx) { + cur_thread_init(); ThreadState *thr = cur_thread(); ThreadSignalContext *sctx = SigCtx(thr); if (sig < 0 || sig >= kSigCount) { @@ -2090,7 +2103,7 @@ TSAN_INTERCEPTOR(int, getaddrinfo, void *node, void *service, } TSAN_INTERCEPTOR(int, fork, int fake) { - if (UNLIKELY(cur_thread()->in_symbolizer)) + if (in_symbolizer()) return REAL(fork)(fake); SCOPED_INTERCEPTOR_RAW(fork, fake); ForkBefore(thr, pc); @@ -2203,23 +2216,12 @@ static void HandleRecvmsg(ThreadState *thr, uptr pc, #include "sanitizer_common/sanitizer_platform_interceptors.h" // Causes interceptor recursion (getaddrinfo() and fopen()) #undef SANITIZER_INTERCEPT_GETADDRINFO -// There interceptors do not seem to be strictly necessary for tsan. -// But we see cases where the interceptors consume 70% of execution time. -// Memory blocks passed to fgetgrent_r are "written to" by tsan several times. -// First, there is some recursion (getgrnam_r calls fgetgrent_r), and each -// function "writes to" the buffer. Then, the same memory is "written to" -// twice, first as buf and then as pwbufp (both of them refer to the same -// addresses). -#undef SANITIZER_INTERCEPT_GETPWENT -#undef SANITIZER_INTERCEPT_GETPWENT_R -#undef SANITIZER_INTERCEPT_FGETPWENT -#undef SANITIZER_INTERCEPT_GETPWNAM_AND_FRIENDS -#undef SANITIZER_INTERCEPT_GETPWNAM_R_AND_FRIENDS // We define our own. #if SANITIZER_INTERCEPT_TLS_GET_ADDR #define NEED_TLS_GET_ADDR #endif #undef SANITIZER_INTERCEPT_TLS_GET_ADDR +#undef SANITIZER_INTERCEPT_PTHREAD_SIGMASK #define COMMON_INTERCEPT_FUNCTION(name) INTERCEPT_FUNCTION(name) #define COMMON_INTERCEPT_FUNCTION_VER(name, ver) \ @@ -2676,6 +2678,7 @@ void InitializeInterceptors() { TSAN_INTERCEPT(pthread_create); TSAN_INTERCEPT(pthread_join); TSAN_INTERCEPT(pthread_detach); + TSAN_INTERCEPT(pthread_exit); #if SANITIZER_LINUX TSAN_INTERCEPT(pthread_tryjoin_np); TSAN_INTERCEPT(pthread_timedjoin_np); diff --git a/compiler-rt/lib/tsan/rtl/tsan_interceptors.h b/compiler-rt/lib/tsan/rtl/tsan_interceptors.h index 763b46b88c8fa..88d1edd775d37 100644 --- a/compiler-rt/lib/tsan/rtl/tsan_interceptors.h +++ b/compiler-rt/lib/tsan/rtl/tsan_interceptors.h @@ -21,9 +21,17 @@ class ScopedInterceptor { LibIgnore *libignore(); +#if !SANITIZER_GO +INLINE bool in_symbolizer() { + cur_thread_init(); + return UNLIKELY(cur_thread()->in_symbolizer); +} +#endif + } // namespace __tsan #define SCOPED_INTERCEPTOR_RAW(func, ...) \ + cur_thread_init(); \ ThreadState *thr = cur_thread(); \ const uptr caller_pc = GET_CALLER_PC(); \ ScopedInterceptor si(thr, #func, caller_pc); \ diff --git a/compiler-rt/lib/tsan/rtl/tsan_interface.cc b/compiler-rt/lib/tsan/rtl/tsan_interface.cc index 09a84015295a1..8101ba19382e7 100644 --- a/compiler-rt/lib/tsan/rtl/tsan_interface.cc +++ b/compiler-rt/lib/tsan/rtl/tsan_interface.cc @@ -24,6 +24,7 @@ typedef u32 uint32_t; typedef u64 uint64_t; void __tsan_init() { + cur_thread_init(); Initialize(cur_thread()); } @@ -123,6 +124,33 @@ void __sanitizer_unaligned_store64(uu64 *addr, u64 v) { __tsan_unaligned_write8(addr); *addr = v; } + +#if !SANITIZER_MAC && !SANITIZER_ANDROID +SANITIZER_INTERFACE_ATTRIBUTE +void *__tsan_get_current_fiber() { + return cur_thread(); +} + +SANITIZER_INTERFACE_ATTRIBUTE +void *__tsan_create_fiber(unsigned flags) { + return FiberCreate(cur_thread(), CALLERPC, flags); +} + +SANITIZER_INTERFACE_ATTRIBUTE +void __tsan_destroy_fiber(void *fiber) { + FiberDestroy(cur_thread(), CALLERPC, static_cast(fiber)); +} + +SANITIZER_INTERFACE_ATTRIBUTE +void __tsan_switch_to_fiber(void *fiber, unsigned flags) { + FiberSwitch(cur_thread(), CALLERPC, static_cast(fiber), flags); +} + +SANITIZER_INTERFACE_ATTRIBUTE +void __tsan_set_fiber_name(void *fiber, const char *name) { + ThreadSetName(static_cast(fiber), name); +} +#endif // !SANITIZER_MAC && !SANITIZER_ANDROID } // extern "C" void __tsan_acquire(void *addr) { diff --git a/compiler-rt/lib/tsan/rtl/tsan_interface_atomic.cc b/compiler-rt/lib/tsan/rtl/tsan_interface_atomic.cc index 8dc9f77312efb..a6b7b0f656d33 100644 --- a/compiler-rt/lib/tsan/rtl/tsan_interface_atomic.cc +++ b/compiler-rt/lib/tsan/rtl/tsan_interface_atomic.cc @@ -474,7 +474,7 @@ static morder convert_morder(morder mo) { #define SCOPED_ATOMIC(func, ...) \ ThreadState *const thr = cur_thread(); \ - if (thr->ignore_sync || thr->ignore_interceptors) { \ + if (UNLIKELY(thr->ignore_sync || thr->ignore_interceptors)) { \ ProcessPendingSignals(thr); \ return NoTsanAtomic##func(__VA_ARGS__); \ } \ diff --git a/compiler-rt/lib/tsan/rtl/tsan_malloc_mac.cc b/compiler-rt/lib/tsan/rtl/tsan_malloc_mac.cc index 9b32399fd1309..0b874aecb99c9 100644 --- a/compiler-rt/lib/tsan/rtl/tsan_malloc_mac.cc +++ b/compiler-rt/lib/tsan/rtl/tsan_malloc_mac.cc @@ -28,19 +28,19 @@ using namespace __tsan; void *p = \ user_memalign(cur_thread(), StackTrace::GetCurrentPc(), alignment, size) #define COMMON_MALLOC_MALLOC(size) \ - if (cur_thread()->in_symbolizer) return InternalAlloc(size); \ + if (in_symbolizer()) return InternalAlloc(size); \ SCOPED_INTERCEPTOR_RAW(malloc, size); \ void *p = user_alloc(thr, pc, size) #define COMMON_MALLOC_REALLOC(ptr, size) \ - if (cur_thread()->in_symbolizer) return InternalRealloc(ptr, size); \ + if (in_symbolizer()) return InternalRealloc(ptr, size); \ SCOPED_INTERCEPTOR_RAW(realloc, ptr, size); \ void *p = user_realloc(thr, pc, ptr, size) #define COMMON_MALLOC_CALLOC(count, size) \ - if (cur_thread()->in_symbolizer) return InternalCalloc(count, size); \ + if (in_symbolizer()) return InternalCalloc(count, size); \ SCOPED_INTERCEPTOR_RAW(calloc, size, count); \ void *p = user_calloc(thr, pc, size, count) #define COMMON_MALLOC_POSIX_MEMALIGN(memptr, alignment, size) \ - if (cur_thread()->in_symbolizer) { \ + if (in_symbolizer()) { \ void *p = InternalAlloc(size, nullptr, alignment); \ if (!p) return errno_ENOMEM; \ *memptr = p; \ @@ -49,12 +49,12 @@ using namespace __tsan; SCOPED_INTERCEPTOR_RAW(posix_memalign, memptr, alignment, size); \ int res = user_posix_memalign(thr, pc, memptr, alignment, size); #define COMMON_MALLOC_VALLOC(size) \ - if (cur_thread()->in_symbolizer) \ + if (in_symbolizer()) \ return InternalAlloc(size, nullptr, GetPageSizeCached()); \ SCOPED_INTERCEPTOR_RAW(valloc, size); \ void *p = user_valloc(thr, pc, size) #define COMMON_MALLOC_FREE(ptr) \ - if (cur_thread()->in_symbolizer) return InternalFree(ptr); \ + if (in_symbolizer()) return InternalFree(ptr); \ SCOPED_INTERCEPTOR_RAW(free, ptr); \ user_free(thr, pc, ptr) #define COMMON_MALLOC_SIZE(ptr) uptr size = user_alloc_usable_size(ptr); diff --git a/compiler-rt/lib/tsan/rtl/tsan_md5.cc b/compiler-rt/lib/tsan/rtl/tsan_md5.cc index 2a61dd7fb138b..bfe0c17bae75a 100644 --- a/compiler-rt/lib/tsan/rtl/tsan_md5.cc +++ b/compiler-rt/lib/tsan/rtl/tsan_md5.cc @@ -138,6 +138,14 @@ static const void *body(MD5_CTX *ctx, const void *data, ulong_t size) { return ptr; } +#undef F +#undef G +#undef H +#undef I +#undef STEP +#undef SET +#undef GET + void MD5_Init(MD5_CTX *ctx) { ctx->a = 0x67452301; ctx->b = 0xefcdab89; diff --git a/compiler-rt/lib/tsan/rtl/tsan_new_delete.cc b/compiler-rt/lib/tsan/rtl/tsan_new_delete.cc index 4c2383fd4595e..4cbdf703ad28b 100644 --- a/compiler-rt/lib/tsan/rtl/tsan_new_delete.cc +++ b/compiler-rt/lib/tsan/rtl/tsan_new_delete.cc @@ -29,7 +29,7 @@ DECLARE_REAL(void, free, void *ptr) // TODO(alekseys): throw std::bad_alloc instead of dying on OOM. #define OPERATOR_NEW_BODY(mangled_name, nothrow) \ - if (cur_thread()->in_symbolizer) \ + if (in_symbolizer()) \ return InternalAlloc(size); \ void *p = 0; \ { \ @@ -44,7 +44,7 @@ DECLARE_REAL(void, free, void *ptr) return p; #define OPERATOR_NEW_BODY_ALIGN(mangled_name, nothrow) \ - if (cur_thread()->in_symbolizer) \ + if (in_symbolizer()) \ return InternalAlloc(size, nullptr, (uptr)align); \ void *p = 0; \ { \ @@ -114,7 +114,7 @@ void *operator new[](__sanitizer::uptr size, std::align_val_t align, #define OPERATOR_DELETE_BODY(mangled_name) \ if (ptr == 0) return; \ - if (cur_thread()->in_symbolizer) \ + if (in_symbolizer()) \ return InternalFree(ptr); \ invoke_free_hook(ptr); \ SCOPED_INTERCEPTOR_RAW(mangled_name, ptr); \ diff --git a/compiler-rt/lib/tsan/rtl/tsan_platform_mac.cc b/compiler-rt/lib/tsan/rtl/tsan_platform_mac.cc index ddf38e2ecebe6..b832d22d1a3be 100644 --- a/compiler-rt/lib/tsan/rtl/tsan_platform_mac.cc +++ b/compiler-rt/lib/tsan/rtl/tsan_platform_mac.cc @@ -212,7 +212,7 @@ static void my_pthread_introspection_hook(unsigned int event, pthread_t thread, ThreadState *parent_thread_state = nullptr; // No parent. int tid = ThreadCreate(parent_thread_state, 0, (uptr)thread, true); CHECK_NE(tid, 0); - ThreadStart(thr, tid, GetTid(), /*workerthread*/ true); + ThreadStart(thr, tid, GetTid(), ThreadType::Worker); } } else if (event == PTHREAD_INTROSPECTION_THREAD_TERMINATE) { if (thread == pthread_self()) { diff --git a/compiler-rt/lib/tsan/rtl/tsan_report.cc b/compiler-rt/lib/tsan/rtl/tsan_report.cc index 37dd1dcb39ffe..ae669024a879a 100644 --- a/compiler-rt/lib/tsan/rtl/tsan_report.cc +++ b/compiler-rt/lib/tsan/rtl/tsan_report.cc @@ -257,7 +257,7 @@ static void PrintThread(const ReportThread *rt) { Printf(" '%s'", rt->name); char thrbuf[kThreadBufSize]; const char *thread_status = rt->running ? "running" : "finished"; - if (rt->workerthread) { + if (rt->thread_type == ThreadType::Worker) { Printf(" (tid=%zu, %s) is a GCD worker thread\n", rt->os_id, thread_status); Printf("\n"); Printf("%s", d.Default()); diff --git a/compiler-rt/lib/tsan/rtl/tsan_report.h b/compiler-rt/lib/tsan/rtl/tsan_report.h index 3e83c13907d40..b4e4d89893792 100644 --- a/compiler-rt/lib/tsan/rtl/tsan_report.h +++ b/compiler-rt/lib/tsan/rtl/tsan_report.h @@ -13,6 +13,7 @@ #define TSAN_REPORT_H #include "sanitizer_common/sanitizer_symbolizer.h" +#include "sanitizer_common/sanitizer_thread_registry.h" #include "sanitizer_common/sanitizer_vector.h" #include "tsan_defs.h" @@ -91,7 +92,7 @@ struct ReportThread { int id; tid_t os_id; bool running; - bool workerthread; + ThreadType thread_type; char *name; u32 parent_tid; ReportStack *stack; diff --git a/compiler-rt/lib/tsan/rtl/tsan_rtl.cc b/compiler-rt/lib/tsan/rtl/tsan_rtl.cc index dbae4a258d74e..3d23f50476edf 100644 --- a/compiler-rt/lib/tsan/rtl/tsan_rtl.cc +++ b/compiler-rt/lib/tsan/rtl/tsan_rtl.cc @@ -328,11 +328,8 @@ static void CheckShadowMapping() { #if !SANITIZER_GO static void OnStackUnwind(const SignalContext &sig, const void *, BufferedStackTrace *stack) { - uptr top = 0; - uptr bottom = 0; - bool fast = common_flags()->fast_unwind_on_fatal; - if (fast) GetThreadStackTopAndBottom(false, &top, &bottom); - stack->Unwind(kStackTraceMax, sig.pc, sig.bp, sig.context, top, bottom, fast); + stack->Unwind(sig.pc, sig.bp, sig.context, + common_flags()->fast_unwind_on_fatal); } static void TsanOnDeadlySignal(int signo, void *siginfo, void *context) { @@ -396,7 +393,7 @@ void Initialize(ThreadState *thr) { // Initialize thread 0. int tid = ThreadCreate(thr, 0, 0, true); CHECK_EQ(tid, 0); - ThreadStart(thr, tid, GetTid(), /*workerthread*/ false); + ThreadStart(thr, tid, GetTid(), ThreadType::Regular); #if TSAN_CONTAINS_UBSAN __ubsan::InitAsPlugin(); #endif @@ -641,6 +638,7 @@ void MemoryAccessImpl1(ThreadState *thr, uptr addr, // __m128i _mm_move_epi64(__m128i*); // _mm_storel_epi64(u64*, __m128i); u64 store_word = cur.raw(); + bool stored = false; // scan all the shadow values and dispatch to 4 categories: // same, replace, candidate and race (see comments below). @@ -665,16 +663,28 @@ void MemoryAccessImpl1(ThreadState *thr, uptr addr, int idx = 0; #include "tsan_update_shadow_word_inl.h" idx = 1; + if (stored) { #include "tsan_update_shadow_word_inl.h" + } else { +#include "tsan_update_shadow_word_inl.h" + } idx = 2; + if (stored) { +#include "tsan_update_shadow_word_inl.h" + } else { #include "tsan_update_shadow_word_inl.h" + } idx = 3; + if (stored) { +#include "tsan_update_shadow_word_inl.h" + } else { #include "tsan_update_shadow_word_inl.h" + } #endif // we did not find any races and had already stored // the current access info, so we are done - if (LIKELY(store_word == 0)) + if (LIKELY(stored)) return; // choose a random candidate slot and replace it StoreShadow(shadow_mem + (cur.epoch() % kShadowCnt), store_word); @@ -814,7 +824,7 @@ void MemoryAccess(ThreadState *thr, uptr pc, uptr addr, } #endif - if (!SANITIZER_GO && *shadow_mem == kShadowRodata) { + if (!SANITIZER_GO && !kAccessIsWrite && *shadow_mem == kShadowRodata) { // Access to .rodata section, no races here. // Measurements show that it can be 10-20% of all memory accesses. StatInc(thr, StatMop); @@ -825,7 +835,7 @@ void MemoryAccess(ThreadState *thr, uptr pc, uptr addr, } FastState fast_state = thr->fast_state; - if (fast_state.GetIgnoreBit()) { + if (UNLIKELY(fast_state.GetIgnoreBit())) { StatInc(thr, StatMop); StatInc(thr, kAccessIsWrite ? StatMopWrite : StatMopRead); StatInc(thr, (StatType)(StatMop1 + kAccessSizeLog)); diff --git a/compiler-rt/lib/tsan/rtl/tsan_rtl.h b/compiler-rt/lib/tsan/rtl/tsan_rtl.h index c57d8d9d5dede..1804deaf56a5a 100644 --- a/compiler-rt/lib/tsan/rtl/tsan_rtl.h +++ b/compiler-rt/lib/tsan/rtl/tsan_rtl.h @@ -384,6 +384,9 @@ struct ThreadState { // taken by epoch between synchs. // This way we can save one load from tls. u64 fast_synch_epoch; + // Technically `current` should be a separate THREADLOCAL variable; + // but it is placed here in order to share cache line with previous fields. + ThreadState* current; // This is a slow path flag. On fast path, fast_state.GetIgnoreBit() is read. // We do not distinguish beteween ignoring reads and writes // for better performance. @@ -462,11 +465,20 @@ struct ThreadState { #if SANITIZER_MAC || SANITIZER_ANDROID ThreadState *cur_thread(); void cur_thread_finalize(); +INLINE void cur_thread_init() { } #else __attribute__((tls_model("initial-exec"))) extern THREADLOCAL char cur_thread_placeholder[]; INLINE ThreadState *cur_thread() { - return reinterpret_cast(&cur_thread_placeholder); + return reinterpret_cast(cur_thread_placeholder)->current; +} +INLINE void cur_thread_init() { + ThreadState *thr = reinterpret_cast(cur_thread_placeholder); + if (UNLIKELY(!thr->current)) + thr->current = thr; +} +INLINE void set_cur_thread(ThreadState *thr) { + reinterpret_cast(cur_thread_placeholder)->current = thr; } INLINE void cur_thread_finalize() { } #endif // SANITIZER_MAC || SANITIZER_ANDROID @@ -764,7 +776,8 @@ void FuncEntry(ThreadState *thr, uptr pc); void FuncExit(ThreadState *thr); int ThreadCreate(ThreadState *thr, uptr pc, uptr uid, bool detached); -void ThreadStart(ThreadState *thr, int tid, tid_t os_id, bool workerthread); +void ThreadStart(ThreadState *thr, int tid, tid_t os_id, + ThreadType thread_type); void ThreadFinish(ThreadState *thr); int ThreadTid(ThreadState *thr, uptr pc, uptr uid); void ThreadJoin(ThreadState *thr, uptr pc, int tid); @@ -867,6 +880,16 @@ uptr ALWAYS_INLINE HeapEnd() { } #endif +ThreadState *FiberCreate(ThreadState *thr, uptr pc, unsigned flags); +void FiberDestroy(ThreadState *thr, uptr pc, ThreadState *fiber); +void FiberSwitch(ThreadState *thr, uptr pc, ThreadState *fiber, unsigned flags); + +// These need to match __tsan_switch_to_fiber_* flags defined in +// tsan_interface.h. See documentation there as well. +enum FiberSwitchFlags { + FiberSwitchFlagNoSync = 1 << 0, // __tsan_switch_to_fiber_no_sync +}; + } // namespace __tsan #endif // TSAN_RTL_H diff --git a/compiler-rt/lib/tsan/rtl/tsan_rtl_aarch64.S b/compiler-rt/lib/tsan/rtl/tsan_rtl_aarch64.S index 3d02bf22f8a55..7c3ce13e4fbdb 100644 --- a/compiler-rt/lib/tsan/rtl/tsan_rtl_aarch64.S +++ b/compiler-rt/lib/tsan/rtl/tsan_rtl_aarch64.S @@ -335,9 +335,6 @@ ASM_SYMBOL_INTERCEPTOR(__sigsetjmp): ASM_SIZE(ASM_SYMBOL_INTERCEPTOR(__sigsetjmp)) #endif -#if defined(__linux__) -/* We do not need executable stack. */ -.section .note.GNU-stack,"",@progbits -#endif +NO_EXEC_STACK_DIRECTIVE #endif diff --git a/compiler-rt/lib/tsan/rtl/tsan_rtl_amd64.S b/compiler-rt/lib/tsan/rtl/tsan_rtl_amd64.S index 34ef51c2a7257..b5c8cb7bfa10a 100644 --- a/compiler-rt/lib/tsan/rtl/tsan_rtl_amd64.S +++ b/compiler-rt/lib/tsan/rtl/tsan_rtl_amd64.S @@ -389,10 +389,6 @@ ASM_SYMBOL_INTERCEPTOR(__sigsetjmp): ASM_SIZE(ASM_SYMBOL_INTERCEPTOR(__sigsetjmp)) #endif // !defined(__APPLE__) && !defined(__NetBSD__) -#if defined(__FreeBSD__) || defined(__linux__) -/* We do not need executable stack. */ -/* This note is not needed on NetBSD. */ -.section .note.GNU-stack,"",@progbits -#endif +NO_EXEC_STACK_DIRECTIVE #endif diff --git a/compiler-rt/lib/tsan/rtl/tsan_rtl_report.cc b/compiler-rt/lib/tsan/rtl/tsan_rtl_report.cc index 40fd7f7c207a7..220a425a2c5bd 100644 --- a/compiler-rt/lib/tsan/rtl/tsan_rtl_report.cc +++ b/compiler-rt/lib/tsan/rtl/tsan_rtl_report.cc @@ -201,7 +201,7 @@ void ScopedReportBase::AddThread(const ThreadContext *tctx, bool suppressable) { rt->running = (tctx->status == ThreadStatusRunning); rt->name = internal_strdup(tctx->name); rt->parent_tid = tctx->parent_tid; - rt->workerthread = tctx->workerthread; + rt->thread_type = tctx->thread_type; rt->stack = 0; rt->stack = SymbolizeStackId(tctx->creation_stack_id); if (rt->stack) @@ -729,10 +729,12 @@ void PrintCurrentStack(ThreadState *thr, uptr pc) { ALWAYS_INLINE void PrintCurrentStackSlow(uptr pc) { #if !SANITIZER_GO + uptr bp = GET_CURRENT_FRAME(); BufferedStackTrace *ptrace = new(internal_alloc(MBlockStackTrace, sizeof(BufferedStackTrace))) BufferedStackTrace(); - ptrace->Unwind(kStackTraceMax, pc, 0, 0, 0, 0, false); + ptrace->Unwind(pc, bp, nullptr, false); + for (uptr i = 0; i < ptrace->size / 2; i++) { uptr tmp = ptrace->trace_buffer[i]; ptrace->trace_buffer[i] = ptrace->trace_buffer[ptrace->size - i - 1]; diff --git a/compiler-rt/lib/tsan/rtl/tsan_rtl_thread.cc b/compiler-rt/lib/tsan/rtl/tsan_rtl_thread.cc index 53cc81cf207fa..60513489448cf 100644 --- a/compiler-rt/lib/tsan/rtl/tsan_rtl_thread.cc +++ b/compiler-rt/lib/tsan/rtl/tsan_rtl_thread.cc @@ -239,13 +239,15 @@ int ThreadCreate(ThreadState *thr, uptr pc, uptr uid, bool detached) { return tid; } -void ThreadStart(ThreadState *thr, int tid, tid_t os_id, bool workerthread) { +void ThreadStart(ThreadState *thr, int tid, tid_t os_id, + ThreadType thread_type) { uptr stk_addr = 0; uptr stk_size = 0; uptr tls_addr = 0; uptr tls_size = 0; #if !SANITIZER_GO - GetThreadStackAndTls(tid == 0, &stk_addr, &stk_size, &tls_addr, &tls_size); + if (thread_type != ThreadType::Fiber) + GetThreadStackAndTls(tid == 0, &stk_addr, &stk_size, &tls_addr, &tls_size); if (tid) { if (stk_addr && stk_size) @@ -257,7 +259,7 @@ void ThreadStart(ThreadState *thr, int tid, tid_t os_id, bool workerthread) { ThreadRegistry *tr = ctx->thread_registry; OnStartedArgs args = { thr, stk_addr, stk_size, tls_addr, tls_size }; - tr->StartThread(tid, os_id, workerthread, &args); + tr->StartThread(tid, os_id, thread_type, &args); tr->Lock(); thr->tctx = (ThreadContext*)tr->GetThreadLocked(tid); @@ -403,4 +405,40 @@ void MemoryAccessRange(ThreadState *thr, uptr pc, uptr addr, } } +#if !SANITIZER_MAC && !SANITIZER_ANDROID && !SANITIZER_GO +void FiberSwitchImpl(ThreadState *from, ThreadState *to) { + Processor *proc = from->proc(); + ProcUnwire(proc, from); + ProcWire(proc, to); + set_cur_thread(to); +} + +ThreadState *FiberCreate(ThreadState *thr, uptr pc, unsigned flags) { + void *mem = internal_alloc(MBlockThreadContex, sizeof(ThreadState)); + ThreadState *fiber = static_cast(mem); + internal_memset(fiber, 0, sizeof(*fiber)); + int tid = ThreadCreate(thr, pc, 0, true); + FiberSwitchImpl(thr, fiber); + ThreadStart(fiber, tid, 0, ThreadType::Fiber); + FiberSwitchImpl(fiber, thr); + return fiber; +} + +void FiberDestroy(ThreadState *thr, uptr pc, ThreadState *fiber) { + FiberSwitchImpl(thr, fiber); + ThreadFinish(fiber); + FiberSwitchImpl(fiber, thr); + internal_free(fiber); +} + +void FiberSwitch(ThreadState *thr, uptr pc, + ThreadState *fiber, unsigned flags) { + if (!(flags & FiberSwitchFlagNoSync)) + Release(thr, pc, (uptr)fiber); + FiberSwitchImpl(thr, fiber); + if (!(flags & FiberSwitchFlagNoSync)) + Acquire(fiber, pc, (uptr)fiber); +} +#endif + } // namespace __tsan diff --git a/compiler-rt/lib/tsan/rtl/tsan_stack_trace.cc b/compiler-rt/lib/tsan/rtl/tsan_stack_trace.cc index 3a4601046927d..dbaca23c68aa9 100644 --- a/compiler-rt/lib/tsan/rtl/tsan_stack_trace.cc +++ b/compiler-rt/lib/tsan/rtl/tsan_stack_trace.cc @@ -48,3 +48,16 @@ void VarSizeStackTrace::ReverseOrder() { } } // namespace __tsan + +#if !SANITIZER_GO +void __sanitizer::BufferedStackTrace::UnwindImpl( + uptr pc, uptr bp, void *context, bool request_fast, u32 max_depth) { + uptr top = 0; + uptr bottom = 0; + if (StackTrace::WillUseFastUnwind(request_fast)) { + GetThreadStackTopAndBottom(false, &top, &bottom); + Unwind(max_depth, pc, bp, nullptr, top, bottom, true); + } else + Unwind(max_depth, pc, 0, context, 0, 0, false); +} +#endif // SANITIZER_GO diff --git a/compiler-rt/lib/tsan/rtl/tsan_update_shadow_word_inl.h b/compiler-rt/lib/tsan/rtl/tsan_update_shadow_word_inl.h index a106f557358ad..056c3aa203205 100644 --- a/compiler-rt/lib/tsan/rtl/tsan_update_shadow_word_inl.h +++ b/compiler-rt/lib/tsan/rtl/tsan_update_shadow_word_inl.h @@ -17,31 +17,35 @@ do { const unsigned kAccessSize = 1 << kAccessSizeLog; u64 *sp = &shadow_mem[idx]; old = LoadShadow(sp); - if (old.IsZero()) { + if (LIKELY(old.IsZero())) { StatInc(thr, StatShadowZero); - if (store_word) + if (!stored) { StoreIfNotYetStored(sp, &store_word); - // The above StoreIfNotYetStored could be done unconditionally - // and it even shows 4% gain on synthetic benchmarks (r4307). + stored = true; + } break; } // is the memory access equal to the previous? - if (Shadow::Addr0AndSizeAreEqual(cur, old)) { + if (LIKELY(Shadow::Addr0AndSizeAreEqual(cur, old))) { StatInc(thr, StatShadowSameSize); // same thread? - if (Shadow::TidsAreEqual(old, cur)) { + if (LIKELY(Shadow::TidsAreEqual(old, cur))) { StatInc(thr, StatShadowSameThread); - if (old.IsRWWeakerOrEqual(kAccessIsWrite, kIsAtomic)) + if (LIKELY(old.IsRWWeakerOrEqual(kAccessIsWrite, kIsAtomic))) { StoreIfNotYetStored(sp, &store_word); + stored = true; + } break; } StatInc(thr, StatShadowAnotherThread); if (HappensBefore(old, thr)) { - if (old.IsRWWeakerOrEqual(kAccessIsWrite, kIsAtomic)) + if (old.IsRWWeakerOrEqual(kAccessIsWrite, kIsAtomic)) { StoreIfNotYetStored(sp, &store_word); + stored = true; + } break; } - if (old.IsBothReadsOrAtomic(kAccessIsWrite, kIsAtomic)) + if (LIKELY(old.IsBothReadsOrAtomic(kAccessIsWrite, kIsAtomic))) break; goto RACE; } @@ -55,7 +59,7 @@ do { StatInc(thr, StatShadowAnotherThread); if (old.IsBothReadsOrAtomic(kAccessIsWrite, kIsAtomic)) break; - if (HappensBefore(old, thr)) + if (LIKELY(HappensBefore(old, thr))) break; goto RACE; } diff --git a/compiler-rt/lib/tsan/tests/CMakeLists.txt b/compiler-rt/lib/tsan/tests/CMakeLists.txt index 352319f101092..0ad97ef3366ff 100644 --- a/compiler-rt/lib/tsan/tests/CMakeLists.txt +++ b/compiler-rt/lib/tsan/tests/CMakeLists.txt @@ -14,6 +14,12 @@ set(TSAN_UNITTEST_CFLAGS -DGTEST_HAS_RTTI=0) set(TSAN_TEST_ARCH ${TSAN_SUPPORTED_ARCH}) + +set(LINK_FLAGS) +foreach(lib ${SANITIZER_TEST_CXX_LIBRARIES}) + list(APPEND LINK_FLAGS -l${lib}) +endforeach() + if(APPLE) # Create a static library for test dependencies. @@ -33,12 +39,12 @@ if(APPLE) darwin_filter_host_archs(TSAN_SUPPORTED_ARCH TSAN_TEST_ARCH) list(APPEND TSAN_UNITTEST_CFLAGS ${DARWIN_osx_CFLAGS}) - set(LINK_FLAGS "-lc++") list(APPEND LINK_FLAGS ${DARWIN_osx_LINK_FLAGS}) add_weak_symbols("ubsan" LINK_FLAGS) add_weak_symbols("sanitizer_common" LINK_FLAGS) else() - set(LINK_FLAGS "-fsanitize=thread;-lstdc++;-lm") + list(APPEND LINK_FLAGS -fsanitize=thread) + list(APPEND LINK_FLAGS -lm) endif() set(TSAN_RTL_HEADERS) diff --git a/compiler-rt/lib/ubsan/CMakeLists.txt b/compiler-rt/lib/ubsan/CMakeLists.txt index 0f429a4a97307..49a3aa121c780 100644 --- a/compiler-rt/lib/ubsan/CMakeLists.txt +++ b/compiler-rt/lib/ubsan/CMakeLists.txt @@ -52,7 +52,7 @@ set(UBSAN_CXXFLAGS ${SANITIZER_COMMON_CFLAGS}) append_rtti_flag(ON UBSAN_CXXFLAGS) append_list_if(SANITIZER_CAN_USE_CXXABI -DUBSAN_CAN_USE_CXXABI UBSAN_CXXFLAGS) -set(UBSAN_DYNAMIC_LIBS ${SANITIZER_CXX_ABI_LIBRARY} ${SANITIZER_COMMON_LINK_LIBS}) +set(UBSAN_DYNAMIC_LIBS ${SANITIZER_CXX_ABI_LIBRARIES} ${SANITIZER_COMMON_LINK_LIBS}) append_list_if(COMPILER_RT_HAS_LIBDL dl UBSAN_DYNAMIC_LIBS) append_list_if(COMPILER_RT_HAS_LIBLOG log UBSAN_DYNAMIC_LIBS) diff --git a/compiler-rt/lib/ubsan/ubsan_diag.cc b/compiler-rt/lib/ubsan/ubsan_diag.cc index df75c2d102ebb..529cc6985763b 100644 --- a/compiler-rt/lib/ubsan/ubsan_diag.cc +++ b/compiler-rt/lib/ubsan/ubsan_diag.cc @@ -26,13 +26,21 @@ using namespace __ubsan; -void __ubsan::GetStackTrace(BufferedStackTrace *stack, uptr max_depth, uptr pc, - uptr bp, void *context, bool fast) { +// UBSan is combined with runtimes that already provide this functionality +// (e.g., ASan) as well as runtimes that lack it (e.g., scudo). Tried to use +// weak linkage to resolve this issue which is not portable and breaks on +// Windows. +// TODO(yln): This is a temporary workaround. GetStackTrace functions will be +// removed in the future. +void ubsan_GetStackTrace(BufferedStackTrace *stack, uptr max_depth, + uptr pc, uptr bp, void *context, bool fast) { uptr top = 0; uptr bottom = 0; - if (fast) + if (StackTrace::WillUseFastUnwind(fast)) { GetThreadStackTopAndBottom(false, &top, &bottom); - stack->Unwind(max_depth, pc, bp, context, top, bottom, fast); + stack->Unwind(max_depth, pc, bp, nullptr, top, bottom, true); + } else + stack->Unwind(max_depth, pc, bp, context, 0, 0, false); } static void MaybePrintStackTrace(uptr pc, uptr bp) { @@ -42,7 +50,7 @@ static void MaybePrintStackTrace(uptr pc, uptr bp) { return; BufferedStackTrace stack; - GetStackTrace(&stack, kStackTraceMax, pc, bp, nullptr, + ubsan_GetStackTrace(&stack, kStackTraceMax, pc, bp, nullptr, common_flags()->fast_unwind_on_fatal); stack.Print(); } diff --git a/compiler-rt/lib/ubsan/ubsan_diag.h b/compiler-rt/lib/ubsan/ubsan_diag.h index eadf466023f11..b444e971b2283 100644 --- a/compiler-rt/lib/ubsan/ubsan_diag.h +++ b/compiler-rt/lib/ubsan/ubsan_diag.h @@ -234,9 +234,6 @@ bool ignoreReport(SourceLocation SLoc, ReportOptions Opts, ErrorType ET); GET_CALLER_PC_BP; \ ReportOptions Opts = {unrecoverable_handler, pc, bp} -void GetStackTrace(BufferedStackTrace *stack, uptr max_depth, uptr pc, uptr bp, - void *context, bool fast); - /// \brief Instantiate this class before printing diagnostics in the error /// report. This class ensures that reports from different threads and from /// different sanitizers won't be mixed. diff --git a/compiler-rt/lib/ubsan/ubsan_diag_standalone.cc b/compiler-rt/lib/ubsan/ubsan_diag_standalone.cc index 11340cf049e17..c22fd17499725 100644 --- a/compiler-rt/lib/ubsan/ubsan_diag_standalone.cc +++ b/compiler-rt/lib/ubsan/ubsan_diag_standalone.cc @@ -16,20 +16,23 @@ using namespace __ubsan; -extern "C" { -SANITIZER_INTERFACE_ATTRIBUTE -void __sanitizer_print_stack_trace() { +void __sanitizer::BufferedStackTrace::UnwindImpl( + uptr pc, uptr bp, void *context, bool request_fast, u32 max_depth) { uptr top = 0; uptr bottom = 0; - bool request_fast_unwind = common_flags()->fast_unwind_on_fatal; - if (request_fast_unwind) - __sanitizer::GetThreadStackTopAndBottom(false, &top, &bottom); + if (StackTrace::WillUseFastUnwind(request_fast)) { + GetThreadStackTopAndBottom(false, &top, &bottom); + Unwind(max_depth, pc, bp, nullptr, top, bottom, true); + } else + Unwind(max_depth, pc, bp, context, 0, 0, false); +} - GET_CURRENT_PC_BP_SP; - (void)sp; +extern "C" { +SANITIZER_INTERFACE_ATTRIBUTE +void __sanitizer_print_stack_trace() { + GET_CURRENT_PC_BP; BufferedStackTrace stack; - stack.Unwind(kStackTraceMax, pc, bp, nullptr, top, bottom, - request_fast_unwind); + stack.Unwind(pc, bp, nullptr, common_flags()->fast_unwind_on_fatal); stack.Print(); } } // extern "C" diff --git a/compiler-rt/lib/ubsan/ubsan_signals_standalone.cc b/compiler-rt/lib/ubsan/ubsan_signals_standalone.cc index a0d2a965a95b8..cc7900cb13649 100644 --- a/compiler-rt/lib/ubsan/ubsan_signals_standalone.cc +++ b/compiler-rt/lib/ubsan/ubsan_signals_standalone.cc @@ -38,11 +38,15 @@ void InitializeDeadlySignals() {} #define COMMON_INTERCEPT_FUNCTION(name) INTERCEPT_FUNCTION(name) #include "sanitizer_common/sanitizer_signal_interceptors.inc" +// TODO(yln): Temporary workaround. Will be removed. +void ubsan_GetStackTrace(BufferedStackTrace *stack, uptr max_depth, + uptr pc, uptr bp, void *context, bool fast); + namespace __ubsan { static void OnStackUnwind(const SignalContext &sig, const void *, BufferedStackTrace *stack) { - GetStackTrace(stack, kStackTraceMax, sig.pc, sig.bp, sig.context, + ubsan_GetStackTrace(stack, kStackTraceMax, sig.pc, sig.bp, sig.context, common_flags()->fast_unwind_on_fatal); } diff --git a/compiler-rt/lib/xray/tests/CMakeLists.txt b/compiler-rt/lib/xray/tests/CMakeLists.txt index deddc5101e76b..609120c83d0be 100644 --- a/compiler-rt/lib/xray/tests/CMakeLists.txt +++ b/compiler-rt/lib/xray/tests/CMakeLists.txt @@ -47,9 +47,7 @@ function(get_xray_lib_for_arch arch lib) endfunction() set(XRAY_TEST_ARCH ${XRAY_SUPPORTED_ARCH}) -set(XRAY_UNITTEST_LINK_FLAGS - ${CMAKE_THREAD_LIBS_INIT} - -l${SANITIZER_CXX_ABI_LIBRARY}) +set(XRAY_UNITTEST_LINK_FLAGS ${CMAKE_THREAD_LIBS_INIT}) if (NOT APPLE) # Needed by LLVMSupport. @@ -81,6 +79,10 @@ if (NOT APPLE) append_list_if(COMPILER_RT_HAS_LIBEXECINFO -lexecinfo XRAY_UNITTEST_LINK_FLAGS) endif() +foreach(lib ${SANITIZER_TEST_CXX_LIBRARIES}) + list(APPEND XRAY_UNITTEST_LINK_FLAGS -l${lib}) +endforeach() + macro(add_xray_unittest testname) cmake_parse_arguments(TEST "" "" "SOURCES;HEADERS" ${ARGN}) if(UNIX AND NOT APPLE) diff --git a/compiler-rt/test/CMakeLists.txt b/compiler-rt/test/CMakeLists.txt index 7070fb789520c..a8b86b2e44d17 100644 --- a/compiler-rt/test/CMakeLists.txt +++ b/compiler-rt/test/CMakeLists.txt @@ -17,10 +17,10 @@ endif() # When ANDROID, we build tests with the host compiler (i.e. CMAKE_C_COMPILER), # and run tests with tools from the host toolchain. if(NOT ANDROID) - if(NOT COMPILER_RT_STANDALONE_BUILD) + if(NOT COMPILER_RT_STANDALONE_BUILD AND NOT RUNTIMES_BUILD) # Use LLVM utils and Clang from the same build tree. list(APPEND SANITIZER_COMMON_LIT_TEST_DEPS - clang clang-headers FileCheck count not llvm-config llvm-nm llvm-objdump + clang clang-resource-headers FileCheck count not llvm-config llvm-nm llvm-objdump llvm-readobj llvm-symbolizer compiler-rt-headers sancov) if (WIN32) list(APPEND SANITIZER_COMMON_LIT_TEST_DEPS KillTheDoctor) diff --git a/compiler-rt/test/asan/CMakeLists.txt b/compiler-rt/test/asan/CMakeLists.txt index 6c22ef3b10ef1..2a44aebd55dd8 100644 --- a/compiler-rt/test/asan/CMakeLists.txt +++ b/compiler-rt/test/asan/CMakeLists.txt @@ -45,14 +45,8 @@ if(OS_NAME MATCHES "SunOS") endif() foreach(arch ${ASAN_TEST_ARCH}) - if(ANDROID) - set(ASAN_TEST_TARGET_ARCH ${arch}-android) - else() - set(ASAN_TEST_TARGET_ARCH ${arch}) - endif() - + set(ASAN_TEST_TARGET_ARCH ${arch}) set(ASAN_TEST_APPLE_PLATFORM "osx") - string(TOLOWER "-${arch}-${OS_NAME}" ASAN_TEST_CONFIG_SUFFIX) get_bits_for_arch(${arch} ASAN_TEST_BITS) get_test_cc_for_arch(${arch} ASAN_TEST_TARGET_CC ASAN_TEST_TARGET_CFLAGS) diff --git a/compiler-rt/test/asan/TestCases/Linux/bzero.cc b/compiler-rt/test/asan/TestCases/Linux/bzero.cc new file mode 100644 index 0000000000000..430edb7446924 --- /dev/null +++ b/compiler-rt/test/asan/TestCases/Linux/bzero.cc @@ -0,0 +1,15 @@ +// RUN: %clangxx_asan -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s + +// REQUIRES: !android + +#include +#include + +int main(int argc, char *argv[]) { + char buf[100]; + // *& to suppress bzero-to-memset optimization. + (*&bzero)(buf, sizeof(buf) + 1); + // CHECK: AddressSanitizer: stack-buffer-overflow + // CHECK-NEXT: WRITE of size 101 at + return 0; +} diff --git a/compiler-rt/test/asan/TestCases/Linux/swapcontext_annotation.cc b/compiler-rt/test/asan/TestCases/Linux/swapcontext_annotation.cc index 3bfda735307b8..5eae27a321679 100644 --- a/compiler-rt/test/asan/TestCases/Linux/swapcontext_annotation.cc +++ b/compiler-rt/test/asan/TestCases/Linux/swapcontext_annotation.cc @@ -12,7 +12,8 @@ // // This test is too subtle to try on non-x86 arch for now. -// REQUIRES: x86-target-arch +// Android does not support swapcontext. +// REQUIRES: x86-target-arch && !android #include #include diff --git a/compiler-rt/test/asan/TestCases/Linux/swapcontext_test.cc b/compiler-rt/test/asan/TestCases/Linux/swapcontext_test.cc index 210a667d096ad..2660ffe3ba708 100644 --- a/compiler-rt/test/asan/TestCases/Linux/swapcontext_test.cc +++ b/compiler-rt/test/asan/TestCases/Linux/swapcontext_test.cc @@ -6,7 +6,8 @@ // RUN: %clangxx_asan -O3 %s -o %t && %run %t 2>&1 | FileCheck %s // // This test is too sublte to try on non-x86 arch for now. -// REQUIRES: x86-target-arch +// Android does not support swapcontext. +// REQUIRES: x86-target-arch && !android #include #include diff --git a/compiler-rt/test/asan/TestCases/Linux/unpoison_tls.cc b/compiler-rt/test/asan/TestCases/Linux/unpoison_tls.cc index 19ebec467c6c3..e22345342f3f5 100644 --- a/compiler-rt/test/asan/TestCases/Linux/unpoison_tls.cc +++ b/compiler-rt/test/asan/TestCases/Linux/unpoison_tls.cc @@ -1,5 +1,5 @@ // Test that TLS is unpoisoned on thread death. -// REQUIRES: x86-target-arch +// REQUIRES: x86-target-arch && !android // RUN: %clangxx_asan -O1 %s -pthread -o %t && %run %t 2>&1 diff --git a/compiler-rt/test/asan/TestCases/Linux/vfork.cc b/compiler-rt/test/asan/TestCases/Linux/vfork.cc new file mode 100644 index 0000000000000..31a32dc56cd02 --- /dev/null +++ b/compiler-rt/test/asan/TestCases/Linux/vfork.cc @@ -0,0 +1,31 @@ +// https://github.com/google/sanitizers/issues/925 +// RUN: %clang_asan -O0 %s -o %t && %run %t 2>&1 + +// REQUIRES: aarch64-target-arch || x86_64-target-arch || i386-target-arch || arm-target-arch + +#include +#include +#include +#include +#include +#include + +__attribute__((noinline, no_sanitize("address"))) void child() { + alignas(8) char x[100000]; + __asan_poison_memory_region(x, sizeof(x)); + _exit(0); +} + +__attribute__((noinline, no_sanitize("address"))) void parent() { + alignas(8) char x[100000]; + assert(__asan_address_is_poisoned(x + 5000) == 0); +} + +int main(int argc, char **argv) { + if (vfork()) + parent(); + else + child(); + + return 0; +} diff --git a/compiler-rt/test/asan/TestCases/Posix/bcmp_test.cc b/compiler-rt/test/asan/TestCases/Posix/bcmp_test.cc new file mode 100644 index 0000000000000..44aa9cd24f6cc --- /dev/null +++ b/compiler-rt/test/asan/TestCases/Posix/bcmp_test.cc @@ -0,0 +1,18 @@ +// RUN: %clangxx_asan -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -O2 %s -o %t && not %run %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -O3 %s -o %t && not %run %t 2>&1 | FileCheck %s + +// REQUIRES: compiler-rt-optimized, (linux && !android) || openbsd || freebsd || netbsd +// XFAIL: darwin + +#include +int main(int argc, char **argv) { + char a1[] = {static_cast(argc), 2, 3, 4}; + char a2[] = {1, static_cast(2 * argc), 3, 4}; + int res = bcmp(a1, a2, 4 + argc); // BOOM + // CHECK: AddressSanitizer: stack-buffer-overflow + // CHECK: {{#1.*bcmp}} + // CHECK: {{#2.*main}} + return res; +} diff --git a/compiler-rt/test/asan/TestCases/memcmp_test.cc b/compiler-rt/test/asan/TestCases/memcmp_test.cc index 0dd9820f52ab4..e666b6d162b9e 100644 --- a/compiler-rt/test/asan/TestCases/memcmp_test.cc +++ b/compiler-rt/test/asan/TestCases/memcmp_test.cc @@ -11,7 +11,7 @@ int main(int argc, char **argv) { char a2[] = {1, static_cast(2*argc), 3, 4}; int res = memcmp(a1, a2, 4 + argc); // BOOM // CHECK: AddressSanitizer: stack-buffer-overflow - // CHECK: {{#0.*memcmp}} - // CHECK: {{#1.*main}} + // CHECK: {{#1.*memcmp}} + // CHECK: {{#2.*main}} return res; } diff --git a/compiler-rt/test/asan/lit.cfg b/compiler-rt/test/asan/lit.cfg index 3deb4ccc5f916..05878a8ef978a 100644 --- a/compiler-rt/test/asan/lit.cfg +++ b/compiler-rt/test/asan/lit.cfg @@ -181,7 +181,7 @@ if re.search('mthumb', config.target_cflags) is None: config.available_features.add('fast-unwinder-works') # Turn on leak detection on 64-bit Linux. -leak_detection_linux = (config.host_os == 'Linux') and (config.target_arch == 'x86_64' or config.target_arch == 'i386') +leak_detection_linux = (config.host_os == 'Linux') and (not config.android) and (config.target_arch == 'x86_64' or config.target_arch == 'i386') leak_detection_mac = (config.host_os == 'Darwin') and (config.target_arch == 'x86_64') if leak_detection_linux or leak_detection_mac: config.available_features.add('leak-detection') @@ -220,8 +220,5 @@ else: if config.host_os not in ['Linux', 'Darwin', 'FreeBSD', 'SunOS', 'Windows', 'NetBSD']: config.unsupported = True -if config.host_os == 'Darwin': - if config.target_arch in ["x86_64", "x86_64h"]: - config.parallelism_group = "darwin-64bit-sanitizer" - elif config.apple_platform != "osx" and not config.apple_platform.endswith("sim"): - config.parallelism_group = "darwin-ios-device-sanitizer" +if not config.parallelism_group: + config.parallelism_group = 'shadow-memory' diff --git a/compiler-rt/test/fuzzer/CrossOverTest.cpp b/compiler-rt/test/fuzzer/CrossOverTest.cpp new file mode 100644 index 0000000000000..a7643570a92b2 --- /dev/null +++ b/compiler-rt/test/fuzzer/CrossOverTest.cpp @@ -0,0 +1,54 @@ +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + +// Test for a fuzzer. The fuzzer must find the string +// ABCDEFGHIJ +// We use it as a test for CrossOver functionality +// by passing two inputs to it: +// ABCDE00000 +// ZZZZZFGHIJ +// +#include +#include +#include +#include +#include +#include + +static volatile int Sink; +static volatile int *NullPtr; + +// A modified jenkins_one_at_a_time_hash initialized by non-zero, +// so that simple_hash(0) != 0. See also +// https://en.wikipedia.org/wiki/Jenkins_hash_function +static uint32_t simple_hash(const uint8_t *Data, size_t Size) { + uint32_t Hash = 0x12039854; + for (uint32_t i = 0; i < Size; i++) { + Hash += Data[i]; + Hash += (Hash << 10); + Hash ^= (Hash >> 6); + } + Hash += (Hash << 3); + Hash ^= (Hash >> 11); + Hash += (Hash << 15); + return Hash; +} + +// Don't leave the string in the binary, so that fuzzer don't cheat; +// const char *ABC = "ABCDEFGHIJ"; +// static uint32_t ExpectedHash = simple_hash((const uint8_t *)ABC, 10); +static const uint32_t ExpectedHash = 0xe1677acb; + +extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) { + // fprintf(stderr, "ExpectedHash: %x\n", ExpectedHash); + if (Size != 10) return 0; + if (*Data == 'A') + Sink++; + if (*Data == 'Z') + Sink--; + if (ExpectedHash == simple_hash(Data, Size)) + *NullPtr = 0; + return 0; +} + diff --git a/compiler-rt/test/fuzzer/ShallowOOMDeepCrash.cpp b/compiler-rt/test/fuzzer/ShallowOOMDeepCrash.cpp new file mode 100644 index 0000000000000..197fffa5e007c --- /dev/null +++ b/compiler-rt/test/fuzzer/ShallowOOMDeepCrash.cpp @@ -0,0 +1,22 @@ +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + +// Simple test for a fuzzer. +// Here the target has a shallow OOM bug and a deeper crash. +// Make sure we can find the crash while ignoring OOMs. +#include +#include + +static volatile int *Sink; +static volatile int *Zero; + +extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) { + if (Size >= 3 && Data[0] == 'O' && Data[1] == 'O' && Data[2] == 'M') + Sink = new int[1 << 28]; // instant OOM with -rss_limit_mb=128. + if (Size >= 4 && Data[0] == 'F' && Data[1] == 'U' && Data[2] == 'Z' && + Data[3] == 'Z') // a bit deeper crash. + *Zero = 42; + return 0; +} + diff --git a/compiler-rt/test/fuzzer/Switch3Test.cpp b/compiler-rt/test/fuzzer/Switch3Test.cpp index 796e44ea0cdf0..c85669ee263a9 100644 --- a/compiler-rt/test/fuzzer/Switch3Test.cpp +++ b/compiler-rt/test/fuzzer/Switch3Test.cpp @@ -1,5 +1,6 @@ -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // Simple test for a fuzzer. The fuzzer must find the interesting switch value. #include diff --git a/compiler-rt/test/fuzzer/coverage.test b/compiler-rt/test/fuzzer/coverage.test index 08c0c825a3f8c..db15c7a66c6dd 100644 --- a/compiler-rt/test/fuzzer/coverage.test +++ b/compiler-rt/test/fuzzer/coverage.test @@ -1,8 +1,8 @@ # FIXME: Disabled on Windows because -fPIC cannot be used to compile for Windows. UNSUPPORTED: windows RUN: %cpp_compiler -mllvm -use-unknown-locations=Disable %S/NullDerefTest.cpp -o %t-NullDerefTest -RUN: %cpp_compiler -mllvm -use-unknown-locations=Disable %S/DSO1.cpp -fPIC %ld_flags_rpath_so1 -shared -o %dynamiclib1 -RUN: %cpp_compiler -mllvm -use-unknown-locations=Disable %S/DSO2.cpp -fPIC %ld_flags_rpath_so2 -shared -o %dynamiclib2 +RUN: %cpp_compiler -mllvm -use-unknown-locations=Disable %S/DSO1.cpp -fPIC %ld_flags_rpath_so1 -O0 -shared -o %dynamiclib1 +RUN: %cpp_compiler -mllvm -use-unknown-locations=Disable %S/DSO2.cpp -fPIC %ld_flags_rpath_so2 -O0 -shared -o %dynamiclib2 RUN: %cpp_compiler -mllvm -use-unknown-locations=Disable %S/DSOTestMain.cpp %S/DSOTestExtra.cpp %ld_flags_rpath_exe1 %ld_flags_rpath_exe2 -o %t-DSOTest CHECK: COVERAGE: @@ -11,10 +11,10 @@ RUN: not %run %t-NullDerefTest -print_coverage=1 2>&1 | FileCheck %s RUN: %run %t-DSOTest -print_coverage=1 -runs=0 2>&1 | FileCheck %s --check-prefix=DSO DSO: COVERAGE: -DSO-DAG: COVERED_FUNC:{{.*}}1{{.*}} -DSO-DAG: COVERED_FUNC:{{.*}}2{{.*}} +DSO-DAG: COVERED_FUNC:{{.*}}DSO1 +DSO-DAG: COVERED_FUNC:{{.*}}DSO2 DSO-DAG: COVERED_FUNC:{{.*}}LLVMFuzzerTestOneInput{{.*}}DSOTestMain -DSO-DAG: UNCOVERED_PC:{{.*}}1 -DSO-DAG: UNCOVERED_PC:{{.*}}2 +DSO-DAG: UNCOVERED_PC:{{.*}}DSO1 +DSO-DAG: UNCOVERED_PC:{{.*}}DSO2 DSO-DAG: UNCOVERED_PC:{{.*}}DSOTestMain DSO-DAG: UNCOVERED_FUNC:{{.*}}Uncovered1 diff --git a/compiler-rt/test/fuzzer/cross_over.test b/compiler-rt/test/fuzzer/cross_over.test new file mode 100644 index 0000000000000..058b5eb2c85cd --- /dev/null +++ b/compiler-rt/test/fuzzer/cross_over.test @@ -0,0 +1,18 @@ +# Tests CrossOverTest. +# We want to make sure that the test can find the input +# ABCDEFGHIJ when given two other inputs in the seed corpus: +# ABCDE00000 and +# ZZZZZFGHIJ +# +RUN: %cpp_compiler %S/CrossOverTest.cpp -o %t-CrossOverTest + +RUN: rm -rf %t-corpus +RUN: mkdir %t-corpus +RUN: echo -n ABCDE00000 > %t-corpus/A +RUN: echo -n ZZZZZFGHIJ > %t-corpus/B + + +RUN: not %run %t-CrossOverTest -max_len=10 -seed=1 -runs=10000000 %t-corpus + +# Test the same thing but using -seed_inputs instead of passing the corpus dir. +RUN: not %run %t-CrossOverTest -max_len=10 -seed=1 -runs=10000000 -seed_inputs=%t-corpus/A,%t-corpus/B diff --git a/compiler-rt/test/fuzzer/fork-sigusr.test b/compiler-rt/test/fuzzer/fork-sigusr.test new file mode 100644 index 0000000000000..ea2e56ca9c26a --- /dev/null +++ b/compiler-rt/test/fuzzer/fork-sigusr.test @@ -0,0 +1,14 @@ +# Check that libFuzzer honors SIGUSR1/SIGUSR2 +# Disabled on Windows which does not have SIGUSR1/SIGUSR2. +UNSUPPORTED: darwin, windows +RUN: rm -rf %t +RUN: mkdir -p %t +RUN: %cpp_compiler %S/ShallowOOMDeepCrash.cpp -o %t/ForkSIGUSR + +RUN: %run %t/ForkSIGUSR -fork=3 -rss_limit_mb=128 -ignore_crashes=1 2> %t/log & export PID=$! +RUN: sleep 3 +RUN: pkill -SIGUSR2 -f %t/ForkSIGUSR +RUN: sleep 3 +RUN: cat %t/log | FileCheck %s + +CHECK: libFuzzer: {{.*}}exiting diff --git a/compiler-rt/test/fuzzer/fork.test b/compiler-rt/test/fuzzer/fork.test new file mode 100644 index 0000000000000..393a9f66b4f5b --- /dev/null +++ b/compiler-rt/test/fuzzer/fork.test @@ -0,0 +1,21 @@ +# UNSUPPORTED: darwin, freebsd +BINGO: BINGO +RUN: %cpp_compiler %S/SimpleTest.cpp -o %t-SimpleTest +RUN: not %run %t-SimpleTest -fork=1 2>&1 | FileCheck %s --check-prefix=BINGO + +TIMEOUT: ERROR: libFuzzer: timeout +RUN: %cpp_compiler %S/TimeoutTest.cpp -o %t-TimeoutTest +RUN: not %run %t-TimeoutTest -fork=1 -timeout=1 -ignore_timeouts=0 2>&1 | FileCheck %s --check-prefix=TIMEOUT + +OOM: ERROR: libFuzzer: out-of-memory +RUN: %cpp_compiler %S/OutOfMemoryTest.cpp -o %t-OutOfMemoryTest +RUN: not %run %t-OutOfMemoryTest -fork=1 -ignore_ooms=0 -rss_limit_mb=128 2>&1 | FileCheck %s --check-prefix=OOM + +# access-violation is the error thrown on Windows. +CRASH: {{SEGV|access-violation}} on unknown address 0x000000000000 +RUN: %cpp_compiler %S/ShallowOOMDeepCrash.cpp -o %t-ShallowOOMDeepCrash +RUN: not %run %t-ShallowOOMDeepCrash -fork=1 -rss_limit_mb=128 2>&1 | FileCheck %s --check-prefix=CRASH + +MAX_TOTAL_TIME: INFO: fuzzed for {{.*}} seconds, wrapping up soon +MAX_TOTAL_TIME: INFO: exiting: {{.*}} time: +RUN: not %run %t-ShallowOOMDeepCrash -fork=1 -rss_limit_mb=128 -ignore_crashes=1 -max_total_time=5 2>&1 | FileCheck %s --check-prefix=MAX_TOTAL_TIME diff --git a/compiler-rt/test/fuzzer/len_control.test b/compiler-rt/test/fuzzer/len_control.test new file mode 100644 index 0000000000000..189ad36033e5a --- /dev/null +++ b/compiler-rt/test/fuzzer/len_control.test @@ -0,0 +1,11 @@ +# Tests len_control +RUN: %cpp_compiler %S/SimpleTest.cpp -o %t-SimpleTest + +LIM4: DONE{{.*}}lim: 4 +LIM77: DONE{{.*}}lim: 77 +LIM20: DONE{{.*}}lim: 20 +RUN: %run %t-SimpleTest -runs=1 2>&1 | FileCheck %s --check-prefix=LIM4 +RUN: %run %t-SimpleTest -seed_inputs=%t-SimpleTest -max_len=77 -runs=1 2>&1 | FileCheck %s --check-prefix=LIM77 +RUN: echo -n 01234567890123456789 > %t-temp +RUN: %run %t-SimpleTest -seed_inputs=%t-temp -runs=1 2>&1 | FileCheck %s --check-prefix=LIM20 + diff --git a/compiler-rt/test/fuzzer/lit.cfg b/compiler-rt/test/fuzzer/lit.cfg index 2ce347356da04..b9e351432e057 100644 --- a/compiler-rt/test/fuzzer/lit.cfg +++ b/compiler-rt/test/fuzzer/lit.cfg @@ -63,17 +63,6 @@ config.substitutions.append(('%libfuzzer_src', libfuzzer_src_root)) def generate_compiler_cmd(is_cpp=True, fuzzer_enabled=True, msan_enabled=False): compiler_cmd = config.clang extra_cmd = config.target_flags - if config.clang and config.stdlib == 'libc++': - link_cmd = '-stdlib=libc++ -Wl,-rpath=%s' % config.runtime_library_dir - elif config.clang and config.stdlib == 'static-libc++': - link_cmd = '-stdlib=libc++ -lc++abi -static-libstdc++ -Wl,-rpath=%s' % ( - config.runtime_library_dir) - elif any(x in config.target_triple for x in ('darwin', 'freebsd')): - link_cmd = '-lc++' - elif 'windows-msvc' in config.target_triple: - link_cmd = '' - else: - link_cmd = '-lstdc++' if is_cpp and 'windows-msvc' in config.target_triple: std_cmd = '--driver-mode=cl' @@ -92,7 +81,6 @@ def generate_compiler_cmd(is_cpp=True, fuzzer_enabled=True, msan_enabled=False): return " ".join([ compiler_cmd, std_cmd, - link_cmd, "-O2 -gline-tables-only", sanitizers_cmd, "-I%s" % libfuzzer_src_root, @@ -126,8 +114,5 @@ if default_asan_opts_str: config.substitutions.append(('%env_asan_opts=', 'env ASAN_OPTIONS=' + default_asan_opts_str)) -if config.host_os == 'Darwin': - if config.target_arch in ["x86_64", "x86_64h"]: - config.parallelism_group = "darwin-64bit-sanitizer" - elif config.apple_platform != "osx" and not config.apple_platform.endswith("sim"): - config.parallelism_group = "darwin-ios-device-sanitizer" +if not config.parallelism_group: + config.parallelism_group = 'shadow-memory' diff --git a/compiler-rt/test/fuzzer/merge-control-file.test b/compiler-rt/test/fuzzer/merge-control-file.test index 60b2a6a627ca4..f269bed0ef527 100644 --- a/compiler-rt/test/fuzzer/merge-control-file.test +++ b/compiler-rt/test/fuzzer/merge-control-file.test @@ -12,10 +12,11 @@ RUN: echo ..Z... > %t/T0/3 # Test what happens if the control file is junk. +RUN: rm -f %t/T1/*; cp %t/T0/* %t/T1 RUN: echo JUNK > %t/MCF -RUN: not %run %t/T.exe -merge=1 %t/T1 %t/T2 -merge_control_file=%t/MCF 2>&1 | FileCheck %s --check-prefix=JUNK +RUN: %run %t/T.exe -merge=1 %t/T1 %t/T2 -merge_control_file=%t/MCF 2>&1 | FileCheck %s --check-prefix=JUNK RUN: echo 3 > %t/MCF; echo 0 >> %t/MCF; echo %t/T1/1 >> %t/MCF -RUN: not %run %t/T.exe -merge=1 %t/T1 %t/T2 -merge_control_file=%t/MCF 2>&1 | FileCheck %s --check-prefix=JUNK +RUN: %run %t/T.exe -merge=1 %t/T1 %t/T2 -merge_control_file=%t/MCF 2>&1 | FileCheck %s --check-prefix=JUNK JUNK: MERGE-OUTER: non-empty control file provided: {{.*}}MCF JUNK: MERGE-OUTER: bad control file, will overwrite it @@ -28,22 +29,12 @@ RUN: %run %t/T.exe -merge=1 %t/T1 %t/T2 -merge_control_file=%t/MCF 2>&1 | FileCh OK_0: MERGE-OUTER: control file ok, 3 files total, first not processed file 0 OK_0: MERGE-OUTER: 3 new files with {{.*}} new features added -RUN: rm -f %t/T1/*; cp %t/T0/* %t/T1 -RUN: echo 3 > %t/MCF; echo 0 >> %t/MCF; echo %t/T1/1 >> %t/MCF; echo %t/T1/2 >> %t/MCF; echo %t/T1/3 >> %t/MCF -RUN: %run %t/T.exe -merge=1 %t/T1 %t/T2 -merge_control_file=%t/MCF -save_coverage_summary=%t/SUMMARY 2>&1 | FileCheck %s --check-prefix=SAVE_SUMMARY -SAVE_SUMMARY: MERGE-OUTER: writing coverage summary for 3 files to {{.*}}/SUMMARY - -RUN: rm -f %t/T1/*; cp %t/T0/* %t/T1 -RUN: echo 3 > %t/MCF; echo 0 >> %t/MCF; echo %t/T1/1 >> %t/MCF; echo %t/T1/2 >> %t/MCF; echo %t/T1/3 >> %t/MCF -RUN: %run %t/T.exe -merge=1 %t/T1 %t/T2 -merge_control_file=%t/MCF -load_coverage_summary=%t/SUMMARY 2>&1 | FileCheck %s --check-prefix=LOAD_SUMMARY -LOAD_SUMMARY: MERGE-OUTER: coverage summary loaded from - RUN: rm -f %t/T1/*; cp %t/T0/* %t/T1 RUN: echo 3 > %t/MCF; echo 0 >> %t/MCF; echo %t/T1/1 >> %t/MCF; echo %t/T1/2 >> %t/MCF; echo %t/T1/3 >> %t/MCF RUN: echo STARTED 0 1 >> %t/MCF -RUN: echo DONE 0 11 >> %t/MCF +RUN: echo FT 0 11 >> %t/MCF RUN: echo STARTED 1 2 >> %t/MCF -RUN: echo DONE 1 12 >> %t/MCF +RUN: echo FT 1 12 >> %t/MCF RUN: %run %t/T.exe -merge=1 %t/T1 %t/T2 -merge_control_file=%t/MCF 2>&1 | FileCheck %s --check-prefix=OK_2 OK_2: MERGE-OUTER: control file ok, 3 files total, first not processed file 2 OK_2: MERGE-OUTER: 3 new files with {{.*}} new features added @@ -51,10 +42,10 @@ OK_2: MERGE-OUTER: 3 new files with {{.*}} new features added RUN: rm -f %t/T1/*; cp %t/T0/* %t/T1 RUN: echo 3 > %t/MCF; echo 0 >> %t/MCF; echo %t/T1/1 >> %t/MCF; echo %t/T1/2 >> %t/MCF; echo %t/T1/3 >> %t/MCF RUN: echo STARTED 0 1 >> %t/MCF -RUN: echo DONE 0 11 >> %t/MCF +RUN: echo FT 0 11 >> %t/MCF RUN: echo STARTED 1 2 >> %t/MCF -RUN: echo DONE 1 12 >> %t/MCF +RUN: echo FT 1 12 >> %t/MCF RUN: echo STARTED 2 2 >> %t/MCF -RUN: echo DONE 2 13 >> %t/MCF +RUN: echo FT 2 13 >> %t/MCF RUN: %run %t/T.exe -merge=1 %t/T1 %t/T2 -merge_control_file=%t/MCF 2>&1 | FileCheck %s --check-prefix=OK_3 OK_3: MERGE-OUTER: nothing to do, merge has been completed before diff --git a/compiler-rt/test/fuzzer/merge-sigusr.test b/compiler-rt/test/fuzzer/merge-sigusr.test index 44448ca29e638..1b16d3ccf8353 100644 --- a/compiler-rt/test/fuzzer/merge-sigusr.test +++ b/compiler-rt/test/fuzzer/merge-sigusr.test @@ -22,7 +22,8 @@ RUN: sleep 3 RUN: cat %t/log | FileCheck %s RUN: grep C2/g %t/MCF RUN: grep STARTED %t/MCF -RUN: tail -n 1 %t/MCF | grep DONE +RUN: tail -n 2 %t/MCF | grep FT +RUN: tail -n 1 %t/MCF | grep COV CHECK: INFO: signal received, trying to exit gracefully CHECK: INFO: libFuzzer: exiting as requested diff --git a/compiler-rt/test/fuzzer/merge-summary.test b/compiler-rt/test/fuzzer/merge-summary.test deleted file mode 100644 index 116cf1db87552..0000000000000 --- a/compiler-rt/test/fuzzer/merge-summary.test +++ /dev/null @@ -1,17 +0,0 @@ -RUN: %cpp_compiler %S/FullCoverageSetTest.cpp -o %t-FullCoverageSetTest - -RUN: rm -rf %t/T1 %t/T2 -RUN: mkdir -p %t/T0 %t/T1 %t/T2 -RUN: echo ...Z.. > %t/T2/1 -RUN: echo ....E. > %t/T2/2 -RUN: echo .....R > %t/T2/3 -RUN: echo F..... > %t/T2/a -RUN: echo .U.... > %t/T2/b -RUN: echo ..Z... > %t/T2/c - -RUN: %run %t-FullCoverageSetTest -merge=1 %t/T1 %t/T2 -save_coverage_summary=%t/SUMMARY 2>&1 | FileCheck %s --check-prefix=SAVE_SUMMARY -SAVE_SUMMARY: MERGE-OUTER: writing coverage summary for 6 files to {{.*}}SUMMARY -RUN: rm %t/T1/* -RUN: %run %t-FullCoverageSetTest -merge=1 %t/T1 %t/T2 -load_coverage_summary=%t/SUMMARY 2>&1 | FileCheck %s --check-prefix=LOAD_SUMMARY -LOAD_SUMMARY: MERGE-OUTER: coverage summary loaded from {{.*}}SUMMAR -LOAD_SUMMARY: MERGE-OUTER: 0 new files with 0 new features added diff --git a/compiler-rt/test/fuzzer/merge.test b/compiler-rt/test/fuzzer/merge.test index ec41c82b93449..c003df282354e 100644 --- a/compiler-rt/test/fuzzer/merge.test +++ b/compiler-rt/test/fuzzer/merge.test @@ -1,4 +1,3 @@ -XFAIL: ios CHECK: BINGO RUN: %cpp_compiler %S/FullCoverageSetTest.cpp -o %t-FullCoverageSetTest @@ -45,7 +44,7 @@ RUN: cp %t/T0/* %t/T1/ RUN: rm -f %t/MCF RUN: %run %t-FullCoverageSetTest -merge=1 -merge_control_file=%t/MCF %t/T1 %t/T2 2>&1 | FileCheck %s --check-prefix=MCF RUN: grep STARTED %t/MCF -RUN: grep DONE %t/MCF +RUN: grep FT %t/MCF MCF: MERGE-INNER: using the control file {{.*}}MCF MCF: MERGE-OUTER: 3 new files @@ -66,6 +65,3 @@ RUN: not grep FUZZER %t/T1/* RUN: grep FUZZE %t/T1/* MERGE_LEN5: MERGE-OUTER: succesfull in 1 attempt(s) -RUN: rm -rf %t/T1/* %t/T2/* -RUN: not %run %t-FullCoverageSetTest -merge=1 %t/T1 %t/T2 2>&1 | FileCheck %s --check-prefix=EMPTY -EMPTY: MERGE-OUTER: zero succesfull attempts, exiting diff --git a/compiler-rt/test/fuzzer/simple.test b/compiler-rt/test/fuzzer/simple.test index 97a09be7cec92..054afdb85cb57 100644 --- a/compiler-rt/test/fuzzer/simple.test +++ b/compiler-rt/test/fuzzer/simple.test @@ -1,7 +1,7 @@ CHECK: BINGO RUN: %cpp_compiler %S/SimpleTest.cpp -o %t-SimpleTest -RUN: not %run %t-SimpleTest 2>&1 | FileCheck %s +RUN: not %run %t-SimpleTest 2>&1 | FileCheck %s # only_ascii mode. Will perform some minimal self-validation. RUN: not %run %t-SimpleTest -only_ascii=1 2>&1 diff --git a/compiler-rt/test/hwasan/TestCases/Linux/decorate-proc-maps.c b/compiler-rt/test/hwasan/TestCases/Linux/decorate-proc-maps.c new file mode 100644 index 0000000000000..8d5824091d950 --- /dev/null +++ b/compiler-rt/test/hwasan/TestCases/Linux/decorate-proc-maps.c @@ -0,0 +1,59 @@ +// RUN: %clang_hwasan -g %s -o %t +// RUN: %env_hwasan_opts=decorate_proc_maps=1 %run %t 2>&1 | FileCheck %s --check-prefix=A +// RUN: %env_hwasan_opts=decorate_proc_maps=1 %run %t 2>&1 | FileCheck %s --check-prefix=B + +// A: rw-p {{.*}}hwasan threads] +// A-NEXT: ---p {{.*}}shadow gap] +// A-NEXT: rw-p {{.*}}low shadow] +// A-NEXT: ---p {{.*}}shadow gap] +// A-NEXT: rw-p {{.*}}high shadow] + +// B-DAG: rw-p {{.*}}SizeClassAllocator: region data] +// B-DAG: rw-p {{.*}}SizeClassAllocator: region metadata] +// B-DAG: rw-p {{.*}}SizeClassAllocator: freearray] +// B-DAG: rw-p {{.*}}SizeClassAllocator: region info] +// B-DAG: rw-p {{.*}}LargeMmapAllocator] +// B-DAG: rw-p {{.*}}stack depot] + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +void CopyFdToFd(int in_fd, int out_fd) { + const size_t kBufSize = 0x10000; + static char buf[kBufSize]; + while (1) { + ssize_t got = read(in_fd, buf, kBufSize); + if (got > 0) { + write(out_fd, buf, got); + } else if (got == 0) { + break; + } else if (errno != EAGAIN || errno != EWOULDBLOCK || errno != EINTR) { + fprintf(stderr, "error reading file, errno %d\n", errno); + abort(); + } + } +} + +void *ThreadFn(void *arg) { + (void)arg; + int fd = open("/proc/self/maps", O_RDONLY); + CopyFdToFd(fd, 2); + close(fd); + return NULL; +} + +int main(void) { + pthread_t t; + void * volatile res = malloc(100); + void * volatile res2 = malloc(100000); + pthread_create(&t, 0, ThreadFn, 0); + pthread_join(t, 0); + return (int)(size_t)res; +} diff --git a/compiler-rt/test/hwasan/TestCases/Linux/vfork.c b/compiler-rt/test/hwasan/TestCases/Linux/vfork.c new file mode 100644 index 0000000000000..84e960279673c --- /dev/null +++ b/compiler-rt/test/hwasan/TestCases/Linux/vfork.c @@ -0,0 +1,32 @@ +// https://github.com/google/sanitizers/issues/925 +// RUN: %clang_hwasan -O0 %s -o %t && %run %t 2>&1 + +// REQUIRES: aarch64-target-arch || x86_64-target-arch + +#include +#include +#include +#include +#include +#include + +__attribute__((noinline, no_sanitize("hwaddress"))) void child() { + char x[10000]; + __hwasan_tag_memory(x, 0xAA, sizeof(x)); + _exit(0); +} + +__attribute__((noinline, no_sanitize("hwaddress"))) void parent() { + char x[10000]; + __hwasan_print_shadow(&x, sizeof(x)); + assert(__hwasan_test_shadow(x, sizeof(x)) == -1); +} + +int main(int argc, char **argv) { + if (vfork()) + parent(); + else + child(); + + return 0; +} diff --git a/compiler-rt/test/hwasan/TestCases/malloc_bisect.c b/compiler-rt/test/hwasan/TestCases/malloc_bisect.c new file mode 100644 index 0000000000000..51cbbfe2a13d1 --- /dev/null +++ b/compiler-rt/test/hwasan/TestCases/malloc_bisect.c @@ -0,0 +1,26 @@ +// RUN: %clang_hwasan -O0 %s -o %t +// RUN: %env_hwasan_opts=malloc_bisect_left=0,malloc_bisect_right=0 not %run %t 2>&1 | \ +// RUN: FileCheck %s --check-prefix=CRASH +// RUN: %env_hwasan_opts=malloc_bisect_left=1000,malloc_bisect_right=999 %run %t 2>&1 +// RUN: %env_hwasan_opts=malloc_bisect_left=0,malloc_bisect_right=4294967295 not %run %t 2>&1 | \ +// RUN: FileCheck %s --check-prefix=CRASH +// RUN: %env_hwasan_opts=malloc_bisect_left=0,malloc_bisect_right=4294967295,malloc_bisect_dump=1 not %run %t 2>&1 | \ +// RUN: FileCheck %s --check-prefixes=CRASH,DUMP + +#include +#include +#include + +int main() { + __hwasan_enable_allocator_tagging(); + // DUMP: [alloc] {{.*}} 10{{$}} + // DUMP: in main{{.*}}malloc_bisect.c + char * volatile p = (char*)malloc(10); + // CRASH: HWAddressSanitizer: tag-mismatch on address + // CRASH: in main{{.*}}malloc_bisect.c + char volatile x = p[16]; + free(p); + __hwasan_disable_allocator_tagging(); + + return 0; +} diff --git a/compiler-rt/test/hwasan/TestCases/sizes.cpp b/compiler-rt/test/hwasan/TestCases/sizes.cpp index 52217de746e38..8effe3c543520 100644 --- a/compiler-rt/test/hwasan/TestCases/sizes.cpp +++ b/compiler-rt/test/hwasan/TestCases/sizes.cpp @@ -1,4 +1,6 @@ -// RUN: %clangxx_hwasan %s -lstdc++ -o %t +// This test requires operator new to be intercepted by the hwasan runtime, +// so we need to avoid linking against libc++. +// RUN: %clangxx_hwasan %s -nostdlib++ -lstdc++ -o %t // RUN: %env_hwasan_opts=allocator_may_return_null=0 not %run %t malloc 2>&1 | FileCheck %s --check-prefix=CHECK-max // RUN: %env_hwasan_opts=allocator_may_return_null=1 %run %t malloc 2>&1 // RUN: %env_hwasan_opts=allocator_may_return_null=0 not %run %t malloc max 2>&1 | FileCheck %s --check-prefix=CHECK-max diff --git a/compiler-rt/test/hwasan/TestCases/stack-uar.c b/compiler-rt/test/hwasan/TestCases/stack-uar.c index 863a84017ee94..8b308a511852e 100644 --- a/compiler-rt/test/hwasan/TestCases/stack-uar.c +++ b/compiler-rt/test/hwasan/TestCases/stack-uar.c @@ -1,5 +1,6 @@ // Tests use-after-return detection and reporting. // RUN: %clang_hwasan -O0 -fno-discard-value-names %s -o %t && not %run %t 2>&1 | FileCheck %s +// RUN: %clang_hwasan -O0 -fno-discard-value-names %s -o %t && not %env_hwasan_opts=symbolize=0 %run %t 2>&1 | FileCheck %s --check-prefix=NOSYM // REQUIRES: stable-runtime @@ -37,5 +38,9 @@ int main() { // CHECK: buggy // CHECK: 4096 zzz + // NOSYM: Previously allocated frames: + // NOSYM-NEXT: sp: 0x{{.*}} #0 0x{{.*}} ({{.*}}/stack-uar.c.tmp+0x{{.*}}){{$}} + // NOSYM-NEXT: 16 CCC; + // CHECK: SUMMARY: HWAddressSanitizer: tag-mismatch {{.*}} in main } diff --git a/compiler-rt/test/hwasan/TestCases/tag_in_free.c b/compiler-rt/test/hwasan/TestCases/tag_in_free.c new file mode 100644 index 0000000000000..51e8d015d36ed --- /dev/null +++ b/compiler-rt/test/hwasan/TestCases/tag_in_free.c @@ -0,0 +1,51 @@ +// RUN: %clang_hwasan -O0 %s -DMALLOC -DFREE -o %t.mf +// RUN: %env_hwasan_opts=tag_in_malloc=0,tag_in_free=1 not %run %t.mf 2>&1 | FileCheck %s --check-prefixes=FREE +// RUN: %env_hwasan_opts=tag_in_malloc=1,tag_in_free=1 not %run %t.mf 2>&1 | FileCheck %s --check-prefixes=MALLOC +// RUN: %env_hwasan_opts=tag_in_malloc=1,tag_in_free=0 not %run %t.mf 2>&1 | FileCheck %s --check-prefixes=MALLOC +// RUN: %env_hwasan_opts=tag_in_malloc=0,tag_in_free=0 %run %t.mf 2>&1 + +// RUN: %clang_hwasan -O0 %s -DFREE -o %t.f +// RUN: %env_hwasan_opts=tag_in_malloc=0,tag_in_free=1 not %run %t.f 2>&1 | FileCheck %s --check-prefixes=FREE +// RUN: %env_hwasan_opts=tag_in_malloc=1,tag_in_free=1 not %run %t.f 2>&1 | FileCheck %s --check-prefixes=FREE +// RUN: %env_hwasan_opts=tag_in_malloc=1,tag_in_free=0 %run %t.f 2>&1 +// RUN: %env_hwasan_opts=tag_in_malloc=0,tag_in_free=0 %run %t.f 2>&1 + +// RUN: %clang_hwasan -O0 %s -DMALLOC -o %t.m +// RUN: %env_hwasan_opts=tag_in_malloc=0,tag_in_free=1 %run %t.m 2>&1 +// RUN: %env_hwasan_opts=tag_in_malloc=1,tag_in_free=1 not %run %t.m 2>&1 | FileCheck %s --check-prefixes=MALLOC +// RUN: %env_hwasan_opts=tag_in_malloc=1,tag_in_free=0 not %run %t.m 2>&1 | FileCheck %s --check-prefixes=MALLOC +// RUN: %env_hwasan_opts=tag_in_malloc=0,tag_in_free=0 %run %t.m 2>&1 + +#include +#include +#include + +int main() { + __hwasan_enable_allocator_tagging(); + // Loop for a while to make sure that the memory for the test below is reused after an earlier free(), + // and is potentially tagged (when tag_in_free == 1). + for (int i = 0; i < 100; ++i) { + char * volatile p = (char*)malloc(10); + free(p); + } + + char * volatile p = (char*)malloc(10); +#ifdef MALLOC + // MALLOC: READ of size 1 at + // MALLOC: is located 6 bytes to the right of 10-byte region + // MALLOC: allocated here: + char volatile x = p[16]; +#endif + free(p); +#ifdef FREE + // FREE: READ of size 1 at + // FREE: is located 0 bytes inside of 10-byte region + // FREE: freed by thread T0 here: + // FREE: previously allocated here: + char volatile y = p[0]; +#endif + + __hwasan_disable_allocator_tagging(); + + return 0; +} diff --git a/compiler-rt/test/hwasan/TestCases/use-after-free.c b/compiler-rt/test/hwasan/TestCases/use-after-free.c index 03a1771c1b8f7..269985740e3ef 100644 --- a/compiler-rt/test/hwasan/TestCases/use-after-free.c +++ b/compiler-rt/test/hwasan/TestCases/use-after-free.c @@ -27,11 +27,11 @@ int main() { // CHECK: is located 5 bytes inside of 10-byte region // // CHECK: freed by thread {{.*}} here: - // CHECK: #0 {{.*}} in {{.*}}free{{.*}} {{.*}}hwasan_interceptors.cc + // CHECK: #0 {{.*}} in {{.*}}free{{.*}} {{.*}}hwasan_interceptors.cpp // CHECK: #1 {{.*}} in main {{.*}}use-after-free.c:[[@LINE-14]] // CHECK: previously allocated here: - // CHECK: #0 {{.*}} in {{.*}}malloc{{.*}} {{.*}}hwasan_interceptors.cc + // CHECK: #0 {{.*}} in {{.*}}malloc{{.*}} {{.*}}hwasan_interceptors.cpp // CHECK: #1 {{.*}} in main {{.*}}use-after-free.c:[[@LINE-19]] // CHECK: Memory tags around the buggy address (one tag corresponds to 16 bytes): // CHECK: =>{{.*}}[[MEM_TAG]] diff --git a/compiler-rt/test/lit.common.cfg b/compiler-rt/test/lit.common.cfg index 6688c717a0240..ed556a7cbe983 100644 --- a/compiler-rt/test/lit.common.cfg +++ b/compiler-rt/test/lit.common.cfg @@ -60,7 +60,12 @@ if config.asan_shadow_scale != '': if config.android: # Prepend the flag so that it can be overridden. config.target_cflags = "-pie -fuse-ld=gold " + config.target_cflags - config.cxx_mode_flags.append('-stdlib=libstdc++') + if config.android_ndk_version < 19: + # With a new compiler and NDK < r19 this flag ends up meaning "link against + # libc++", but NDK r19 makes this mean "link against the stub libstdc++ that + # just contains a handful of ABI functions", which makes most C++ code fail + # to link. In r19 and later we just use the default which is libc++. + config.cxx_mode_flags.append('-stdlib=libstdc++') # Clear some environment variables that might affect Clang. possibly_dangerous_env_vars = ['ASAN_OPTIONS', 'DFSAN_OPTIONS', 'LSAN_OPTIONS', @@ -383,8 +388,9 @@ try: [os.path.join(config.llvm_tools_dir, 'llvm-config'), '--assertion-mode'], stdout = subprocess.PIPE, env=config.environment) -except OSError: - print("Could not find llvm-config in " + config.llvm_tools_dir) +except OSError as e: + print("Could not launch llvm-config in " + config.llvm_tools_dir) + print(" Failed with error #{0}: {1}".format(e.errno, e.strerror)) exit(42) if re.search(r'ON', llvm_config_cmd.stdout.read().decode('ascii')): @@ -396,18 +402,23 @@ llvm_config_cmd.wait() if platform.system() == 'Windows': config.test_retry_attempts = 2 -# Only run up to 3 64-bit sanitized processes simultaneously on Darwin. -# Using more scales badly and hogs the system due to inefficient handling -# of large mmap'd regions (terabytes) by the kernel. +# No throttling on non-Darwin platforms. +lit_config.parallelism_groups['shadow-memory'] = None + if platform.system() == 'Darwin': - lit_config.parallelism_groups["darwin-64bit-sanitizer"] = 3 - -# The current implementation of the tools in sanitizer_common/ios_comamnds -# do not support parallel execution so force sequential execution of the -# tests on iOS devices. -if config.host_os == 'Darwin' and config.apple_platform != "osx" and not config.apple_platform.endswith("sim"): - lit_config.warning("iOS device test cases being run sequentially") - lit_config.parallelism_groups["darwin-ios-device-sanitizer"] = 1 + ios_device = config.apple_platform != 'osx' and not config.apple_platform.endswith('sim') + # Force sequential execution when running tests on iOS devices. + if ios_device: + lit_config.warning('Forcing sequential execution for iOS device tests') + lit_config.parallelism_groups['ios-device'] = 1 + config.parallelism_group = 'ios-device' + + # Only run up to 3 processes that require shadow memory simultaneously on + # 64-bit Darwin. Using more scales badly and hogs the system due to + # inefficient handling of large mmap'd regions (terabytes) by the kernel. + elif config.target_arch in ['x86_64', 'x86_64h']: + lit_config.warning('Throttling sanitizer tests that require shadow memory on Darwin 64bit') + lit_config.parallelism_groups['shadow-memory'] = 3 # Multiple substitutions are necessary to support multiple shared objects used # at once. diff --git a/compiler-rt/test/lit.common.configured.in b/compiler-rt/test/lit.common.configured.in index df326a6b55519..e1884b409e53c 100644 --- a/compiler-rt/test/lit.common.configured.in +++ b/compiler-rt/test/lit.common.configured.in @@ -36,6 +36,7 @@ set_default("use_thinlto", False) set_default("use_lto", config.use_thinlto) set_default("use_newpm", False) set_default("android", @ANDROID_PYBOOL@) +set_default("android_ndk_version", @ANDROID_NDK_VERSION@) set_default("android_serial", "@ANDROID_SERIAL_FOR_TESTING@") set_default("android_files_to_push", []) set_default("have_rpc_xdr_h", @HAVE_RPC_XDR_H@) diff --git a/compiler-rt/test/msan/CMakeLists.txt b/compiler-rt/test/msan/CMakeLists.txt index 7919a6cd2ea03..c6408c1edb035 100644 --- a/compiler-rt/test/msan/CMakeLists.txt +++ b/compiler-rt/test/msan/CMakeLists.txt @@ -43,7 +43,9 @@ if(NOT COMPILER_RT_STANDALONE_BUILD) list(APPEND MSAN_TEST_DEPS msan) endif() -if(COMPILER_RT_INCLUDE_TESTS AND COMPILER_RT_LIBCXX_PATH) +if(COMPILER_RT_INCLUDE_TESTS AND + COMPILER_RT_LIBCXX_PATH AND + COMPILER_RT_LIBCXXABI_PATH) configure_lit_site_cfg( ${CMAKE_CURRENT_SOURCE_DIR}/Unit/lit.site.cfg.in ${CMAKE_CURRENT_BINARY_DIR}/Unit/lit.site.cfg) diff --git a/compiler-rt/test/msan/Linux/bzero.cc b/compiler-rt/test/msan/Linux/bzero.cc new file mode 100644 index 0000000000000..cb319a6cfa1e3 --- /dev/null +++ b/compiler-rt/test/msan/Linux/bzero.cc @@ -0,0 +1,16 @@ +// RUN: %clangxx_msan -O0 %s -o %t && %run %t + +// REQUIRES: !android + +#include +#include +#include + +int main(int argc, char *argv[]) { + char buf[100]; + assert(0 == __msan_test_shadow(buf, sizeof(buf))); + // *& to suppress bzero-to-memset optimization. + (*&bzero)(buf, 50); + assert(50 == __msan_test_shadow(buf, sizeof(buf))); + return 0; +} diff --git a/compiler-rt/test/msan/Linux/forkpty.cc b/compiler-rt/test/msan/Linux/forkpty.cc index c9f04376fd743..dca83d925c20e 100644 --- a/compiler-rt/test/msan/Linux/forkpty.cc +++ b/compiler-rt/test/msan/Linux/forkpty.cc @@ -15,9 +15,12 @@ main (int argc, char** argv) assert(__msan_test_shadow(&master, sizeof(master)) == -1); assert(__msan_test_shadow(&slave, sizeof(slave)) == -1); - char ttyname[255]; - ttyname_r(master, ttyname, sizeof(ttyname)); - assert(__msan_test_shadow(ttyname, strlen(ttyname) + 1) == -1); + char name[255]; + ttyname_r(master, name, sizeof(name)); + assert(__msan_test_shadow(name, strlen(name) + 1) == -1); + + char *name_p = ttyname(master); + assert(__msan_test_shadow(name_p, strlen(name_p) + 1) == -1); int master2; forkpty(&master2, NULL, NULL, NULL); diff --git a/compiler-rt/test/msan/Linux/name_to_handle_at.cc b/compiler-rt/test/msan/Linux/name_to_handle_at.cc index 0ff8d982f4f77..a8bc75fa2ae5c 100644 --- a/compiler-rt/test/msan/Linux/name_to_handle_at.cc +++ b/compiler-rt/test/msan/Linux/name_to_handle_at.cc @@ -14,7 +14,7 @@ int main(void) { handle->handle_bytes = MAX_HANDLE_SZ; int mount_id; - int res = name_to_handle_at(AT_FDCWD, "/bin/cat", handle, &mount_id, 0); + int res = name_to_handle_at(AT_FDCWD, "/dev/null", handle, &mount_id, 0); assert(!res); __msan_check_mem_is_initialized(&mount_id, sizeof(mount_id)); __msan_check_mem_is_initialized(&handle->handle_bytes, diff --git a/compiler-rt/test/msan/memcmp_test.cc b/compiler-rt/test/msan/memcmp_test.cc index 5ade58a6004a6..42230cc4d0c54 100644 --- a/compiler-rt/test/msan/memcmp_test.cc +++ b/compiler-rt/test/msan/memcmp_test.cc @@ -13,6 +13,6 @@ int main(int argc, char **argv) { if (!res) printf("equals"); return 0; - // CHECK: Uninitialized bytes in __interceptor_memcmp at offset 3 + // CHECK: Uninitialized bytes in MemcmpInterceptorCommon at offset 3 // CHECK: MemorySanitizer: use-of-uninitialized-value } diff --git a/compiler-rt/test/msan/scoped-interceptors.cc b/compiler-rt/test/msan/scoped-interceptors.cc index fc7d4578482bd..5eff33d6bf691 100644 --- a/compiler-rt/test/msan/scoped-interceptors.cc +++ b/compiler-rt/test/msan/scoped-interceptors.cc @@ -37,7 +37,7 @@ int main(int argc, char *argv[]) { case '2': { int cmp = memcmp(uninit, uninit, sizeof(uninit)); // BOOM break; - // CASE-2: Uninitialized bytes in __interceptor_memcmp + // CASE-2: Uninitialized bytes in MemcmpInterceptorCommon } case '3': { size_t len = strlen(uninit); // BOOM diff --git a/compiler-rt/test/profile/Inputs/instrprof-gcov-__gcov_flush-multiple.c.gcov b/compiler-rt/test/profile/Inputs/instrprof-gcov-__gcov_flush-multiple.c.gcov index f2141229bd4f3..83755451631dc 100644 --- a/compiler-rt/test/profile/Inputs/instrprof-gcov-__gcov_flush-multiple.c.gcov +++ b/compiler-rt/test/profile/Inputs/instrprof-gcov-__gcov_flush-multiple.c.gcov @@ -1,4 +1,4 @@ -// CHECK: -: 0:Source:{{.*}}Inputs/instrprof-gcov-__gcov_flush-multiple.c +// CHECK: -: 0:Source:{{.*}}Inputs{{[/\\]}}instrprof-gcov-__gcov_flush-multiple.c // CHECK-NEXT: -: 0:Graph:instrprof-gcov-__gcov_flush-multiple.gcno // CHECK-NEXT: -: 0:Data:instrprof-gcov-__gcov_flush-multiple.gcda // CHECK-NEXT: -: 0:Runs:1 diff --git a/compiler-rt/test/profile/Inputs/instrprof-gcov-__gcov_flush-terminate.c.gcov b/compiler-rt/test/profile/Inputs/instrprof-gcov-__gcov_flush-terminate.c.gcov index 69e229a3127ed..1e3a56bd9edb0 100644 --- a/compiler-rt/test/profile/Inputs/instrprof-gcov-__gcov_flush-terminate.c.gcov +++ b/compiler-rt/test/profile/Inputs/instrprof-gcov-__gcov_flush-terminate.c.gcov @@ -1,4 +1,4 @@ -// CHECK: -: 0:Source:{{.*}}Inputs/instrprof-gcov-__gcov_flush-terminate.c +// CHECK: -: 0:Source:{{.*}}Inputs{{[/\\]}}instrprof-gcov-__gcov_flush-terminate.c // CHECK-NEXT: -: 0:Graph:instrprof-gcov-__gcov_flush-terminate.gcno // CHECK-NEXT: -: 0:Data:instrprof-gcov-__gcov_flush-terminate.gcda // CHECK-NEXT: -: 0:Runs:1 diff --git a/compiler-rt/test/profile/Inputs/instrprof-gcov-exceptions.cpp.gcov b/compiler-rt/test/profile/Inputs/instrprof-gcov-exceptions.cpp.gcov index f8e38297475df..aa202763fd564 100644 --- a/compiler-rt/test/profile/Inputs/instrprof-gcov-exceptions.cpp.gcov +++ b/compiler-rt/test/profile/Inputs/instrprof-gcov-exceptions.cpp.gcov @@ -1,4 +1,4 @@ -// CHECK: -: 0:Source:{{.*}}Inputs/instrprof-gcov-exceptions.cpp +// CHECK: -: 0:Source:{{.*}}Inputs{{[/\\]}}instrprof-gcov-exceptions.cpp // CHECK-NEXT: -: 0:Graph:instrprof-gcov-exceptions.gcno // CHECK-NEXT: -: 0:Data:instrprof-gcov-exceptions.gcda // CHECK-NEXT: -: 0:Runs:1 diff --git a/compiler-rt/test/profile/Inputs/instrprof-gcov-execlp.c.gcov b/compiler-rt/test/profile/Inputs/instrprof-gcov-execlp.c.gcov index 7542f6ff73b2d..810046aac396f 100644 --- a/compiler-rt/test/profile/Inputs/instrprof-gcov-execlp.c.gcov +++ b/compiler-rt/test/profile/Inputs/instrprof-gcov-execlp.c.gcov @@ -1,4 +1,4 @@ -//CHECK: -: 0:Source:{{.*}}Inputs/instrprof-gcov-execlp.c +//CHECK: -: 0:Source:{{.*}}Inputs{{[/\\]}}instrprof-gcov-execlp.c //CHECK-NEXT: -: 0:Graph:instrprof-gcov-execlp.gcno //CHECK-NEXT: -: 0:Data:instrprof-gcov-execlp.gcda //CHECK-NEXT: -: 0:Runs:1 diff --git a/compiler-rt/test/profile/Inputs/instrprof-gcov-execvp.c.gcov b/compiler-rt/test/profile/Inputs/instrprof-gcov-execvp.c.gcov index 37cd1e59ab38a..e896cb8917e70 100644 --- a/compiler-rt/test/profile/Inputs/instrprof-gcov-execvp.c.gcov +++ b/compiler-rt/test/profile/Inputs/instrprof-gcov-execvp.c.gcov @@ -1,4 +1,4 @@ -//CHECK: -: 0:Source:{{.*}}Inputs/instrprof-gcov-execvp.c +//CHECK: -: 0:Source:{{.*}}Inputs{{[/\\]}}instrprof-gcov-execvp.c //CHECK-NEXT: -: 0:Graph:instrprof-gcov-execvp.gcno //CHECK-NEXT: -: 0:Data:instrprof-gcov-execvp.gcda //CHECK-NEXT: -: 0:Runs:1 diff --git a/compiler-rt/test/profile/Inputs/instrprof-gcov-fork.c.gcov b/compiler-rt/test/profile/Inputs/instrprof-gcov-fork.c.gcov index c667c7b9e97e0..2825bd5802a79 100644 --- a/compiler-rt/test/profile/Inputs/instrprof-gcov-fork.c.gcov +++ b/compiler-rt/test/profile/Inputs/instrprof-gcov-fork.c.gcov @@ -1,4 +1,4 @@ -// CHECK: -: 0:Source:{{.*}}Inputs/instrprof-gcov-fork.c +// CHECK: -: 0:Source:{{.*}}Inputs{{[/\\]}}instrprof-gcov-fork.c // CHECK-NEXT: -: 0:Graph:instrprof-gcov-fork.gcno // CHECK-NEXT: -: 0:Data:instrprof-gcov-fork.gcda // CHECK-NEXT: -: 0:Runs:1 diff --git a/compiler-rt/test/profile/Inputs/instrprof-gcov-multiple-bbs-single-line.c.gcov b/compiler-rt/test/profile/Inputs/instrprof-gcov-multiple-bbs-single-line.c.gcov index 4bc1c1cd50f75..d1104b7f5bbf2 100644 --- a/compiler-rt/test/profile/Inputs/instrprof-gcov-multiple-bbs-single-line.c.gcov +++ b/compiler-rt/test/profile/Inputs/instrprof-gcov-multiple-bbs-single-line.c.gcov @@ -1,4 +1,4 @@ -// CHECK: -: 0:Source:{{.*}}Inputs/instrprof-gcov-multiple-bbs-single-line.c +// CHECK: -: 0:Source:{{.*}}Inputs{{[/\\]}}instrprof-gcov-multiple-bbs-single-line.c // CHECK-NEXT: -: 0:Graph:instrprof-gcov-multiple-bbs-single-line.gcno // CHECK-NEXT: -: 0:Data:instrprof-gcov-multiple-bbs-single-line.gcda // CHECK-NEXT: -: 0:Runs:1 diff --git a/compiler-rt/test/profile/Inputs/instrprof-gcov-one-line-function.c.gcov b/compiler-rt/test/profile/Inputs/instrprof-gcov-one-line-function.c.gcov index a91b20fdc9a32..5a570a04742df 100644 --- a/compiler-rt/test/profile/Inputs/instrprof-gcov-one-line-function.c.gcov +++ b/compiler-rt/test/profile/Inputs/instrprof-gcov-one-line-function.c.gcov @@ -1,4 +1,4 @@ -// CHECK: -: 0:Source:{{.*}}Inputs/instrprof-gcov-one-line-function.c +// CHECK: -: 0:Source:{{.*}}Inputs{{[/\\]}}instrprof-gcov-one-line-function.c // CHECK-NEXT: -: 0:Graph:instrprof-gcov-one-line-function.gcno // CHECK-NEXT: -: 0:Data:instrprof-gcov-one-line-function.gcda // CHECK-NEXT: -: 0:Runs:1 diff --git a/compiler-rt/test/profile/Inputs/instrprof-gcov-switch1.c.gcov b/compiler-rt/test/profile/Inputs/instrprof-gcov-switch1.c.gcov index 6e9c5228b938a..741dff59954bc 100644 --- a/compiler-rt/test/profile/Inputs/instrprof-gcov-switch1.c.gcov +++ b/compiler-rt/test/profile/Inputs/instrprof-gcov-switch1.c.gcov @@ -1,4 +1,4 @@ -// CHECK: -: 0:Source:{{.*}}Inputs/instrprof-gcov-switch1.c +// CHECK: -: 0:Source:{{.*}}Inputs{{[/\\]}}instrprof-gcov-switch1.c // CHECK-NEXT: -: 0:Graph:instrprof-gcov-switch1.gcno // CHECK-NEXT: -: 0:Data:instrprof-gcov-switch1.gcda // CHECK-NEXT: -: 0:Runs:1 diff --git a/compiler-rt/test/profile/Inputs/instrprof-gcov-switch2.c.gcov b/compiler-rt/test/profile/Inputs/instrprof-gcov-switch2.c.gcov index 47d7f1d7cb41a..c931365ddf484 100644 --- a/compiler-rt/test/profile/Inputs/instrprof-gcov-switch2.c.gcov +++ b/compiler-rt/test/profile/Inputs/instrprof-gcov-switch2.c.gcov @@ -1,4 +1,4 @@ -// CHECK: -: 0:Source:{{.*}}Inputs/instrprof-gcov-switch2.c +// CHECK: -: 0:Source:{{.*}}Inputs{{[/\\]}}instrprof-gcov-switch2.c // CHECK-NEXT: -: 0:Graph:instrprof-gcov-switch2.gcno // CHECK-NEXT: -: 0:Data:instrprof-gcov-switch2.gcda // CHECK-NEXT: -: 0:Runs:1 diff --git a/compiler-rt/test/profile/Inputs/instrprof-shared-lib.c.gcov b/compiler-rt/test/profile/Inputs/instrprof-shared-lib.c.gcov index 620a852575778..7e6d741d5b104 100644 --- a/compiler-rt/test/profile/Inputs/instrprof-shared-lib.c.gcov +++ b/compiler-rt/test/profile/Inputs/instrprof-shared-lib.c.gcov @@ -1,4 +1,4 @@ -// CHECK: -: 0:Source:{{.*}}Inputs/instrprof-shared-lib.c +// CHECK: -: 0:Source:{{.*}}Inputs{{[/\\]}}instrprof-shared-lib.c // CHECK-NEXT: -: 0:Graph:instrprof-shared-lib.gcno // CHECK-NEXT: -: 0:Data:instrprof-shared-lib.gcda // CHECK-NEXT: -: 0:Runs:1 diff --git a/compiler-rt/test/profile/Inputs/instrprof-shared-lib_called-twice.c.gcov b/compiler-rt/test/profile/Inputs/instrprof-shared-lib_called-twice.c.gcov index 39b32b8c097a8..993c6cc508b28 100644 --- a/compiler-rt/test/profile/Inputs/instrprof-shared-lib_called-twice.c.gcov +++ b/compiler-rt/test/profile/Inputs/instrprof-shared-lib_called-twice.c.gcov @@ -1,4 +1,4 @@ -// CHECK: -: 0:Source:{{.*}}Inputs/instrprof-shared-lib.c +// CHECK: -: 0:Source:{{.*}}Inputs{{[/\\]}}instrprof-shared-lib.c // CHECK-NEXT: -: 0:Graph:instrprof-shared-lib.gcno // CHECK-NEXT: -: 0:Data:instrprof-shared-lib.gcda // CHECK-NEXT: -: 0:Runs:1 diff --git a/compiler-rt/test/profile/Inputs/instrprof-shared-lib_in-loop.c.gcov b/compiler-rt/test/profile/Inputs/instrprof-shared-lib_in-loop.c.gcov index 0fc7ccbabab20..69350471312e3 100644 --- a/compiler-rt/test/profile/Inputs/instrprof-shared-lib_in-loop.c.gcov +++ b/compiler-rt/test/profile/Inputs/instrprof-shared-lib_in-loop.c.gcov @@ -1,4 +1,4 @@ -// CHECK: -: 0:Source:{{.*}}Inputs/instrprof-shared-lib.c +// CHECK: -: 0:Source:{{.*}}Inputs{{[/\\]}}instrprof-shared-lib.c // CHECK-NEXT: -: 0:Graph:instrprof-shared-lib.gcno // CHECK-NEXT: -: 0:Data:instrprof-shared-lib.gcda // CHECK-NEXT: -: 0:Runs:1 diff --git a/compiler-rt/test/profile/Inputs/instrprof-shared-main-gcov-flush_no-writeout.c.gcov b/compiler-rt/test/profile/Inputs/instrprof-shared-main-gcov-flush_no-writeout.c.gcov index 6027c64af61b4..0f9826dad80f9 100644 --- a/compiler-rt/test/profile/Inputs/instrprof-shared-main-gcov-flush_no-writeout.c.gcov +++ b/compiler-rt/test/profile/Inputs/instrprof-shared-main-gcov-flush_no-writeout.c.gcov @@ -1,4 +1,4 @@ -// CHECK: -: 0:Source:{{.*}}Inputs/instrprof-shared-main-gcov-flush.c +// CHECK: -: 0:Source:{{.*}}Inputs{{[/\\]}}instrprof-shared-main-gcov-flush.c // CHECK-NEXT: -: 0:Graph:instrprof-shared-main-gcov-flush.gcno // CHECK-NEXT: -: 0:Data:instrprof-shared-main-gcov-flush.gcda // CHECK-NEXT: -: 0:Runs:1 diff --git a/compiler-rt/test/profile/Inputs/instrprof-shared-main-gcov-flush_shared-call-after.c.gcov b/compiler-rt/test/profile/Inputs/instrprof-shared-main-gcov-flush_shared-call-after.c.gcov index fba3f3fe28123..5cc26580b2226 100644 --- a/compiler-rt/test/profile/Inputs/instrprof-shared-main-gcov-flush_shared-call-after.c.gcov +++ b/compiler-rt/test/profile/Inputs/instrprof-shared-main-gcov-flush_shared-call-after.c.gcov @@ -1,4 +1,4 @@ -// CHECK: -: 0:Source:{{.*}}Inputs/instrprof-shared-main-gcov-flush.c +// CHECK: -: 0:Source:{{.*}}Inputs{{[/\\]}}instrprof-shared-main-gcov-flush.c // CHECK-NEXT: -: 0:Graph:instrprof-shared-main-gcov-flush.gcno // CHECK-NEXT: -: 0:Data:instrprof-shared-main-gcov-flush.gcda // CHECK-NEXT: -: 0:Runs:1 diff --git a/compiler-rt/test/profile/Inputs/instrprof-shared-main-gcov-flush_shared-call-before-after.c.gcov b/compiler-rt/test/profile/Inputs/instrprof-shared-main-gcov-flush_shared-call-before-after.c.gcov index 86beda22a1ade..7a6800c47f84f 100644 --- a/compiler-rt/test/profile/Inputs/instrprof-shared-main-gcov-flush_shared-call-before-after.c.gcov +++ b/compiler-rt/test/profile/Inputs/instrprof-shared-main-gcov-flush_shared-call-before-after.c.gcov @@ -1,4 +1,4 @@ -// CHECK: -: 0:Source:{{.*}}Inputs/instrprof-shared-main-gcov-flush.c +// CHECK: -: 0:Source:{{.*}}Inputs{{[/\\]}}instrprof-shared-main-gcov-flush.c // CHECK-NEXT: -: 0:Graph:instrprof-shared-main-gcov-flush.gcno // CHECK-NEXT: -: 0:Data:instrprof-shared-main-gcov-flush.gcda // CHECK-NEXT: -: 0:Runs:1 diff --git a/compiler-rt/test/profile/Inputs/instrprof-shared-main-gcov-flush_shared-call-before.c.gcov b/compiler-rt/test/profile/Inputs/instrprof-shared-main-gcov-flush_shared-call-before.c.gcov index 2e55741cc5365..49995fdc86350 100644 --- a/compiler-rt/test/profile/Inputs/instrprof-shared-main-gcov-flush_shared-call-before.c.gcov +++ b/compiler-rt/test/profile/Inputs/instrprof-shared-main-gcov-flush_shared-call-before.c.gcov @@ -1,4 +1,4 @@ -// CHECK: -: 0:Source:{{.*}}Inputs/instrprof-shared-main-gcov-flush.c +// CHECK: -: 0:Source:{{.*}}Inputs{{[/\\]}}instrprof-shared-main-gcov-flush.c // CHECK-NEXT: -: 0:Graph:instrprof-shared-main-gcov-flush.gcno // CHECK-NEXT: -: 0:Data:instrprof-shared-main-gcov-flush.gcda // CHECK-NEXT: -: 0:Runs:1 diff --git a/compiler-rt/test/profile/Inputs/instrprof-shared-main.c.gcov b/compiler-rt/test/profile/Inputs/instrprof-shared-main.c.gcov index 05cd4e31d6eb0..a31a60238809a 100644 --- a/compiler-rt/test/profile/Inputs/instrprof-shared-main.c.gcov +++ b/compiler-rt/test/profile/Inputs/instrprof-shared-main.c.gcov @@ -1,4 +1,4 @@ -// CHECK: -: 0:Source:{{.*}}Inputs/instrprof-shared-main.c +// CHECK: -: 0:Source:{{.*}}Inputs{{[/\\]}}instrprof-shared-main.c // CHECK-NEXT: -: 0:Graph:instrprof-shared-main.gcno // CHECK-NEXT: -: 0:Data:instrprof-shared-main.gcda // CHECK-NEXT: -: 0:Runs:1 diff --git a/compiler-rt/test/profile/Inputs/instrprof-value-prof-visibility.c b/compiler-rt/test/profile/Inputs/instrprof-value-prof-visibility.c new file mode 100644 index 0000000000000..e691a2d95910b --- /dev/null +++ b/compiler-rt/test/profile/Inputs/instrprof-value-prof-visibility.c @@ -0,0 +1,60 @@ +#include +#include +#include +#ifdef DLOPEN_FUNC_DIR +#include +#endif + +int __llvm_profile_runtime = 0; +int __llvm_profile_write_file(); +void __llvm_profile_reset_counters(void); +void __llvm_profile_initialize_file(void); +struct __llvm_profile_data; +struct ValueProfData; +void lprofMergeValueProfData(struct ValueProfData *, struct __llvm_profile_data *); +/* Force the vp merger module to be linked in. */ +void *Dummy = &lprofMergeValueProfData; + +void callee1() {} +void callee2() {} + +typedef void (*FP)(void); +FP Fps[2] = {callee1, callee2}; + +int main(int argc, char *argv[]) { + __llvm_profile_initialize_file(); + __llvm_profile_write_file(); + __llvm_profile_reset_counters(); + +#ifdef DLOPEN_FUNC_DIR + void *Handle = dlopen(DLOPEN_FUNC_DIR "/func.shared", RTLD_NOW); + if (!Handle) { + fprintf(stderr, "unable to open '" DLOPEN_FUNC_DIR "/func.shared': %s\n", + dlerror()); + return EXIT_FAILURE; + } + + // This tests that lprofMergeValueProfData is not accessed + // from outside a module + void (*SymHandle)(struct ValueProfData *, struct __llvm_profile_data *) = + (void (*)(struct ValueProfData *, struct __llvm_profile_data *))dlsym( + Handle, "lprofMergeValueProfData"); + if (SymHandle) { + fprintf(stderr, + "should not be able to lookup symbol 'lprofMergeValueProfData': %s\n", + dlerror()); + return EXIT_FAILURE; + } + + dlclose(Handle); + +#endif + + Fps[0](); + Fps[1](); + + __llvm_profile_write_file(); + __llvm_profile_reset_counters(); + + return EXIT_SUCCESS; +} diff --git a/compiler-rt/test/profile/Linux/instrprof-value-prof-visibility.test b/compiler-rt/test/profile/Linux/instrprof-value-prof-visibility.test new file mode 100644 index 0000000000000..5b64a94a2f0d3 --- /dev/null +++ b/compiler-rt/test/profile/Linux/instrprof-value-prof-visibility.test @@ -0,0 +1,6 @@ +# This tests that lprofMergeValueProfData is not accessed from outside a module +RUN: mkdir -p %t.d +RUN: %clang_profgen -o %t.d/func.shared -fPIC -shared -fuse-ld=gold -mllvm --enable-value-profiling=true %S/../Inputs/instrprof-value-prof-visibility.c -fdata-sections -ffunction-sections -fuse-ld=gold -Wl,--gc-sections +RUN: %clang_profgen -o %t.d/main -fuse-ld=gold -mllvm --enable-value-profiling=true -DDLOPEN_FUNC_DIR=\"%t.d\" %S/../Inputs/instrprof-value-prof-visibility.c -fdata-sections -ffunction-sections -fuse-ld=gold -Wl,--gc-sections +RUN: env LLVM_PROFILE_FILE=%t.profraw %run %t.d/main + diff --git a/compiler-rt/test/profile/Inputs/instrprof-visibility-helper.cpp b/compiler-rt/test/profile/Posix/Inputs/instrprof-visibility-helper.cpp similarity index 100% rename from compiler-rt/test/profile/Inputs/instrprof-visibility-helper.cpp rename to compiler-rt/test/profile/Posix/Inputs/instrprof-visibility-helper.cpp diff --git a/compiler-rt/test/profile/Posix/instrprof-dlopen-dlclose-gcov.test b/compiler-rt/test/profile/Posix/instrprof-dlopen-dlclose-gcov.test new file mode 100644 index 0000000000000..b845303a8afdc --- /dev/null +++ b/compiler-rt/test/profile/Posix/instrprof-dlopen-dlclose-gcov.test @@ -0,0 +1,33 @@ +# atexit(3) not supported in dlopen(3)ed+dlclose(3)d DSO +XFAIL: netbsd + +RUN: mkdir -p %t.d +RUN: cd %t.d + +RUN: %clang --coverage -o func.shared -fPIC -shared %S/../Inputs/instrprof-dlopen-func.c +RUN: %clang --coverage -o func2.shared -fPIC -shared %S/../Inputs/instrprof-dlopen-func2.c +RUN: %clang --coverage -o func3.shared -fPIC -shared %S/../Inputs/instrprof-dlopen-func3.c +RUN: %clang --coverage -o %t -fPIC -rpath %t.d %S/../Inputs/instrprof-dlopen-dlclose-main.c + +# Test with two dlopened libraries. +RUN: rm -f instrprof-dlopen-dlclose-main.gcda instrprof-dlopen-func.gcda instrprof-dlopen-func2.gcda +RUN: %run %t +RUN: llvm-cov gcov instrprof-dlopen-dlclose-main.gcda +RUN: FileCheck --match-full-lines --strict-whitespace --input-file instrprof-dlopen-dlclose-main.c.gcov %S/../Inputs/instrprof-dlopen-dlclose-main.c.gcov +RUN: llvm-cov gcov instrprof-dlopen-func.gcda +RUN: FileCheck --match-full-lines --strict-whitespace --input-file instrprof-dlopen-func.c.gcov %S/../Inputs/instrprof-dlopen-func.c.gcov +RUN: llvm-cov gcov instrprof-dlopen-func2.gcda +RUN: FileCheck --match-full-lines --strict-whitespace --input-file instrprof-dlopen-func2.c.gcov %S/../Inputs/instrprof-dlopen-func2.c.gcov + +# Test with three dlopened libraries. +RUN: %clang -DUSE_LIB3 --coverage -o %t -fPIC -rpath %t.d %S/../Inputs/instrprof-dlopen-dlclose-main.c +RUN: rm -f instrprof-dlopen-dlclose-main.gcda instrprof-dlopen-func.gcda instrprof-dlopen-func2.gcda instrprof-dlopen-func3.gcda +RUN: %run %t +RUN: llvm-cov gcov instrprof-dlopen-dlclose-main.gcda +RUN: FileCheck --match-full-lines --strict-whitespace --input-file instrprof-dlopen-dlclose-main.c.gcov %S/../Inputs/instrprof-dlopen-dlclose-main_three-libs.c.gcov +RUN: llvm-cov gcov instrprof-dlopen-func.gcda +RUN: FileCheck --match-full-lines --strict-whitespace --input-file instrprof-dlopen-func.c.gcov %S/../Inputs/instrprof-dlopen-func.c.gcov +RUN: llvm-cov gcov instrprof-dlopen-func2.gcda +RUN: FileCheck --match-full-lines --strict-whitespace --input-file instrprof-dlopen-func2.c.gcov %S/../Inputs/instrprof-dlopen-func2.c.gcov +RUN: llvm-cov gcov instrprof-dlopen-func3.gcda +RUN: FileCheck --match-full-lines --strict-whitespace --input-file instrprof-dlopen-func2.c.gcov %S/../Inputs/instrprof-dlopen-func3.c.gcov diff --git a/compiler-rt/test/profile/Posix/instrprof-dlopen.test b/compiler-rt/test/profile/Posix/instrprof-dlopen.test new file mode 100644 index 0000000000000..d84ed748ea713 --- /dev/null +++ b/compiler-rt/test/profile/Posix/instrprof-dlopen.test @@ -0,0 +1,34 @@ +RUN: mkdir -p %t.d +RUN: %clang_profgen -o %t.d/func.shared -fPIC -shared %S/../Inputs/instrprof-dlopen-func.c +RUN: %clang_profgen -o %t.d/func2.shared -fPIC -shared %S/../Inputs/instrprof-dlopen-func2.c +RUN: %clang -o %t-local -fPIC -DDLOPEN_FUNC_DIR=\"%t.d\" -DDLOPEN_FLAGS="RTLD_LAZY | RTLD_LOCAL" %S/../Inputs/instrprof-dlopen-main.c +RUN: %clang -o %t-global -fPIC -DDLOPEN_FUNC_DIR=\"%t.d\" -DDLOPEN_FLAGS="RTLD_LAZY | RTLD_GLOBAL" %S/../Inputs/instrprof-dlopen-main.c + +RUN: %clang -c -o %t.d/main.o %S/../Inputs/instrprof-dlopen-main.c +RUN: %clang_profgen -o %t-static %S/../Inputs/instrprof-dlopen-func.c %S/../Inputs/instrprof-dlopen-func2.c %t.d/main.o + +RUN: env LLVM_PROFILE_FILE=%t-static.profraw %run %t-static +RUN: env LLVM_PROFILE_FILE=%t-local.profraw %run %t-local +RUN: env LLVM_PROFILE_FILE=%t-global.profraw %run %t-global + +RUN: llvm-profdata merge -o %t-static.profdata %t-static.profraw +RUN: llvm-profdata merge -o %t-local.profdata %t-local.profraw +RUN: llvm-profdata merge -o %t-global.profdata %t-global.profraw + +RUN: %clang_profuse=%t-static.profdata -o %t-func.static.ll -S -emit-llvm %S/../Inputs/instrprof-dlopen-func.c +RUN: %clang_profuse=%t-local.profdata -o %t-func.local.ll -S -emit-llvm %S/../Inputs/instrprof-dlopen-func.c +RUN: %clang_profuse=%t-global.profdata -o %t-func.global.ll -S -emit-llvm %S/../Inputs/instrprof-dlopen-func.c +RUN: diff %t-func.static.ll %t-func.local.ll +RUN: diff %t-func.static.ll %t-func.global.ll + +RUN: %clang_profuse=%t-static.profdata -o %t-func2.static.ll -S -emit-llvm %S/../Inputs/instrprof-dlopen-func2.c +RUN: %clang_profuse=%t-local.profdata -o %t-func2.local.ll -S -emit-llvm %S/../Inputs/instrprof-dlopen-func2.c +RUN: %clang_profuse=%t-global.profdata -o %t-func2.global.ll -S -emit-llvm %S/../Inputs/instrprof-dlopen-func2.c +RUN: diff %t-func2.static.ll %t-func2.local.ll +RUN: diff %t-func2.static.ll %t-func2.global.ll + +RUN: %clang_profuse=%t-static.profdata -o %t-main.static.ll -S -emit-llvm %S/../Inputs/instrprof-dlopen-main.c +RUN: %clang_profuse=%t-local.profdata -o %t-main.local.ll -S -emit-llvm %S/../Inputs/instrprof-dlopen-main.c +RUN: %clang_profuse=%t-local.profdata -o %t-main.global.ll -S -emit-llvm %S/../Inputs/instrprof-dlopen-main.c +RUN: diff %t-main.static.ll %t-main.local.ll +RUN: diff %t-main.static.ll %t-main.global.ll diff --git a/compiler-rt/test/profile/Posix/instrprof-dynamic-one-shared.test b/compiler-rt/test/profile/Posix/instrprof-dynamic-one-shared.test new file mode 100644 index 0000000000000..16ae64f471a93 --- /dev/null +++ b/compiler-rt/test/profile/Posix/instrprof-dynamic-one-shared.test @@ -0,0 +1,23 @@ +RUN: mkdir -p %t.d +RUN: %clang_profgen -o %t.d/a.shared -fPIC -shared %S/../Inputs/instrprof-dynamic-a.cpp +RUN: %clang_profgen -o %t-shared -fPIC -rpath %t.d %t.d/a.shared %S/../Inputs/instrprof-dynamic-b.cpp %S/../Inputs/instrprof-dynamic-main.cpp + +RUN: %clang_profgen -o %t-static %S/../Inputs/instrprof-dynamic-a.cpp %S/../Inputs/instrprof-dynamic-b.cpp %S/../Inputs/instrprof-dynamic-main.cpp + +RUN: env LLVM_PROFILE_FILE=%t-static.profraw %run %t-static +RUN: env LLVM_PROFILE_FILE=%t-shared.profraw %run %t-shared + +RUN: llvm-profdata merge -o %t-static.profdata %t-static.profraw +RUN: llvm-profdata merge -o %t-shared.profdata %t-shared.profraw + +RUN: %clang_profuse=%t-static.profdata -o %t-a.static.ll -S -emit-llvm %S/../Inputs/instrprof-dynamic-a.cpp +RUN: %clang_profuse=%t-shared.profdata -o %t-a.shared.ll -S -emit-llvm %S/../Inputs/instrprof-dynamic-a.cpp +RUN: diff %t-a.static.ll %t-a.shared.ll + +RUN: %clang_profuse=%t-static.profdata -o %t-b.static.ll -S -emit-llvm %S/../Inputs/instrprof-dynamic-b.cpp +RUN: %clang_profuse=%t-shared.profdata -o %t-b.shared.ll -S -emit-llvm %S/../Inputs/instrprof-dynamic-b.cpp +RUN: diff %t-b.static.ll %t-b.shared.ll + +RUN: %clang_profuse=%t-static.profdata -o %t-main.static.ll -S -emit-llvm %S/../Inputs/instrprof-dynamic-main.cpp +RUN: %clang_profuse=%t-shared.profdata -o %t-main.shared.ll -S -emit-llvm %S/../Inputs/instrprof-dynamic-main.cpp +RUN: diff %t-main.static.ll %t-main.shared.ll diff --git a/compiler-rt/test/profile/Posix/instrprof-dynamic-two-shared.test b/compiler-rt/test/profile/Posix/instrprof-dynamic-two-shared.test new file mode 100644 index 0000000000000..dd7bacc8aaa7a --- /dev/null +++ b/compiler-rt/test/profile/Posix/instrprof-dynamic-two-shared.test @@ -0,0 +1,24 @@ +RUN: mkdir -p %t.d +RUN: %clang_profgen -o %t.d/a.shared -fPIC -shared %S/../Inputs/instrprof-dynamic-a.cpp +RUN: %clang_profgen -o %t.d/b.shared -fPIC -shared %S/../Inputs/instrprof-dynamic-b.cpp +RUN: %clang_profgen -o %t-shared -fPIC -rpath %t.d %t.d/a.shared %t.d/b.shared %S/../Inputs/instrprof-dynamic-main.cpp + +RUN: %clang_profgen -o %t-static %S/../Inputs/instrprof-dynamic-a.cpp %S/../Inputs/instrprof-dynamic-b.cpp %S/../Inputs/instrprof-dynamic-main.cpp + +RUN: env LLVM_PROFILE_FILE=%t-static.profraw %run %t-static +RUN: env LLVM_PROFILE_FILE=%t-shared.profraw %run %t-shared + +RUN: llvm-profdata merge -o %t-static.profdata %t-static.profraw +RUN: llvm-profdata merge -o %t-shared.profdata %t-shared.profraw + +RUN: %clang_profuse=%t-static.profdata -o %t-a.static.ll -S -emit-llvm %S/../Inputs/instrprof-dynamic-a.cpp +RUN: %clang_profuse=%t-shared.profdata -o %t-a.shared.ll -S -emit-llvm %S/../Inputs/instrprof-dynamic-a.cpp +RUN: diff %t-a.static.ll %t-a.shared.ll + +RUN: %clang_profuse=%t-static.profdata -o %t-b.static.ll -S -emit-llvm %S/../Inputs/instrprof-dynamic-b.cpp +RUN: %clang_profuse=%t-shared.profdata -o %t-b.shared.ll -S -emit-llvm %S/../Inputs/instrprof-dynamic-b.cpp +RUN: diff %t-b.static.ll %t-b.shared.ll + +RUN: %clang_profuse=%t-static.profdata -o %t-main.static.ll -S -emit-llvm %S/../Inputs/instrprof-dynamic-main.cpp +RUN: %clang_profuse=%t-shared.profdata -o %t-main.shared.ll -S -emit-llvm %S/../Inputs/instrprof-dynamic-main.cpp +RUN: diff %t-main.static.ll %t-main.shared.ll diff --git a/compiler-rt/test/profile/instrprof-set-filename-shared.test b/compiler-rt/test/profile/Posix/instrprof-set-filename-shared.test similarity index 81% rename from compiler-rt/test/profile/instrprof-set-filename-shared.test rename to compiler-rt/test/profile/Posix/instrprof-set-filename-shared.test index afcb4b4fd2d62..439c6c0dda8fa 100644 --- a/compiler-rt/test/profile/instrprof-set-filename-shared.test +++ b/compiler-rt/test/profile/Posix/instrprof-set-filename-shared.test @@ -1,7 +1,7 @@ # Test that __llvm_profile_set_filename is honored by shared libary too. RUN: mkdir -p %t.d -RUN: %clang_profgen=%t.shared.profraw -fPIC -shared -o %t.d/t.shared %S/Inputs/instrprof-dlopen-func.c -RUN: %clang_profgen -DCALL_SHARED -o %t.m -O3 -rpath %t.d %t.d/t.shared %S/instrprof-set-filename.c +RUN: %clang_profgen=%t.shared.profraw -fPIC -shared -o %t.d/t.shared %S/../Inputs/instrprof-dlopen-func.c +RUN: %clang_profgen -DCALL_SHARED -o %t.m -O3 -rpath %t.d %t.d/t.shared %S/../instrprof-set-filename.c RUN: %run %t.m %t.main.profraw RUN: llvm-profdata show %t.main.profraw | FileCheck --check-prefix=SHARED %s diff --git a/compiler-rt/test/profile/Posix/instrprof-shared-gcov-flush.test b/compiler-rt/test/profile/Posix/instrprof-shared-gcov-flush.test new file mode 100644 index 0000000000000..8d530fd452a7b --- /dev/null +++ b/compiler-rt/test/profile/Posix/instrprof-shared-gcov-flush.test @@ -0,0 +1,52 @@ +# This test fails on Mac (https://bugs.llvm.org/show_bug.cgi?id=38134) +XFAIL: darwin + +RUN: mkdir -p %t.d +RUN: cd %t.d + +RUN: %clang --coverage -o libfunc.so -fPIC -shared %S/../Inputs/instrprof-shared-lib.c +RUN: test -f instrprof-shared-lib.gcno + +# Test the case where we exit abruptly after calling __gcov_flush, which means we don't write out the counters at exit. +RUN: %clang -DEXIT_ABRUPTLY -DSHARED_CALL_BEFORE_GCOV_FLUSH -DSHARED_CALL_AFTER_GCOV_FLUSH --coverage -o %t -L%t.d -rpath %t.d -lfunc %S/../Inputs/instrprof-shared-main-gcov-flush.c +RUN: test -f instrprof-shared-main-gcov-flush.gcno + +RUN: rm -f instrprof-shared-main-gcov-flush.gcda instrprof-shared-lib.gcda +RUN: %run %t +RUN: llvm-cov gcov instrprof-shared-main-gcov-flush.gcda +RUN: FileCheck --match-full-lines --strict-whitespace --input-file instrprof-shared-main-gcov-flush.c.gcov %S/../Inputs/instrprof-shared-main-gcov-flush_no-writeout.c.gcov +RUN: llvm-cov gcov instrprof-shared-lib.gcda +RUN: FileCheck --match-full-lines --strict-whitespace --input-file instrprof-shared-lib.c.gcov %S/../Inputs/instrprof-shared-lib.c.gcov + +# Test the case where we exit normally and we have a call to the shared library function before __gcov_flush. +RUN: %clang -DSHARED_CALL_BEFORE_GCOV_FLUSH --coverage -o %t -L%t.d -rpath %t.d -lfunc %S/../Inputs/instrprof-shared-main-gcov-flush.c +RUN: test -f instrprof-shared-main-gcov-flush.gcno + +RUN: rm -f instrprof-shared-main-gcov-flush.gcda instrprof-shared-lib.gcda +RUN: %run %t +RUN: llvm-cov gcov instrprof-shared-main-gcov-flush.gcda +RUN: FileCheck --match-full-lines --strict-whitespace --input-file instrprof-shared-main-gcov-flush.c.gcov %S/../Inputs/instrprof-shared-main-gcov-flush_shared-call-before.c.gcov +RUN: llvm-cov gcov instrprof-shared-lib.gcda +RUN: FileCheck --match-full-lines --strict-whitespace --input-file instrprof-shared-lib.c.gcov %S/../Inputs/instrprof-shared-lib.c.gcov + +# Test the case where we exit normally and we have a call to the shared library function after __gcov_flush. +RUN: %clang -DSHARED_CALL_AFTER_GCOV_FLUSH --coverage -o %t -L%t.d -rpath %t.d -lfunc %S/../Inputs/instrprof-shared-main-gcov-flush.c +RUN: test -f instrprof-shared-main-gcov-flush.gcno + +RUN: rm -f instrprof-shared-main-gcov-flush.gcda instrprof-shared-lib.gcda +RUN: %run %t +RUN: llvm-cov gcov instrprof-shared-main-gcov-flush.gcda +RUN: FileCheck --match-full-lines --strict-whitespace --input-file instrprof-shared-main-gcov-flush.c.gcov %S/../Inputs/instrprof-shared-main-gcov-flush_shared-call-after.c.gcov +RUN: llvm-cov gcov instrprof-shared-lib.gcda +RUN: FileCheck --match-full-lines --strict-whitespace --input-file instrprof-shared-lib.c.gcov %S/../Inputs/instrprof-shared-lib.c.gcov + +# Test the case where we exit normally and we have calls to the shared library function before and after __gcov_flush. +RUN: %clang -DSHARED_CALL_BEFORE_GCOV_FLUSH -DSHARED_CALL_AFTER_GCOV_FLUSH --coverage -o %t -L%t.d -rpath %t.d -lfunc %S/../Inputs/instrprof-shared-main-gcov-flush.c +RUN: test -f instrprof-shared-main-gcov-flush.gcno + +RUN: rm -f instrprof-shared-main-gcov-flush.gcda instrprof-shared-lib.gcda +RUN: %run %t +RUN: llvm-cov gcov instrprof-shared-main-gcov-flush.gcda +RUN: FileCheck --match-full-lines --strict-whitespace --input-file instrprof-shared-main-gcov-flush.c.gcov %S/../Inputs/instrprof-shared-main-gcov-flush_shared-call-before-after.c.gcov +RUN: llvm-cov gcov instrprof-shared-lib.gcda +RUN: FileCheck --match-full-lines --strict-whitespace --input-file instrprof-shared-lib.c.gcov %S/../Inputs/instrprof-shared-lib_called-twice.c.gcov diff --git a/compiler-rt/test/profile/instrprof-shared.test b/compiler-rt/test/profile/Posix/instrprof-shared.test similarity index 80% rename from compiler-rt/test/profile/instrprof-shared.test rename to compiler-rt/test/profile/Posix/instrprof-shared.test index b3f0b9ab4bcc9..7087fa2fa33ed 100644 --- a/compiler-rt/test/profile/instrprof-shared.test +++ b/compiler-rt/test/profile/Posix/instrprof-shared.test @@ -14,18 +14,18 @@ enabled behave as expected. """ RUN: mkdir -p %t.d -RUN: %clang_profgen -o %t.d/libt-instr.so -fPIC -shared %S/Inputs/instrprof-shared-lib.c -RUN: %clang -o %t.d/libt-no-instr1.so -fPIC -shared %S/Inputs/instrprof-shared-lib.c -RUN: %clang -c -o %t.d/instrprof-shared-lib-no-instr2.o -fPIC %S/Inputs/instrprof-shared-lib.c +RUN: %clang_profgen -o %t.d/libt-instr.so -fPIC -shared %S/../Inputs/instrprof-shared-lib.c +RUN: %clang -o %t.d/libt-no-instr1.so -fPIC -shared %S/../Inputs/instrprof-shared-lib.c +RUN: %clang -c -o %t.d/instrprof-shared-lib-no-instr2.o -fPIC %S/../Inputs/instrprof-shared-lib.c RUN: %clang_profgen -o %t.d/libt-no-instr2.so -fPIC -shared %t.d/instrprof-shared-lib-no-instr2.o -RUN: %clang_profgen -o %t-instr-instr -L%t.d -rpath %t.d -lt-instr %S/Inputs/instrprof-shared-main.c -RUN: %clang_profgen -o %t-instr-no-instr1 -L%t.d -rpath %t.d -lt-no-instr1 %S/Inputs/instrprof-shared-main.c -RUN: %clang_profgen -o %t-instr-no-instr2 -L%t.d -rpath %t.d -lt-no-instr2 %S/Inputs/instrprof-shared-main.c -RUN: %clang -o %t-no-instr1-instr -L%t.d -rpath %t.d -lt-instr %S/Inputs/instrprof-shared-main.c -RUN: %clang -o %t-no-instr1-no-instr1 -L%t.d -rpath %t.d -lt-no-instr1 %S/Inputs/instrprof-shared-main.c -RUN: %clang -o %t-no-instr1-no-instr2 -L%t.d -rpath %t.d -lt-no-instr2 %S/Inputs/instrprof-shared-main.c -RUN: %clang -c -o %t.d/instrprof-shared-main-no-instr2.o %S/Inputs/instrprof-shared-main.c +RUN: %clang_profgen -o %t-instr-instr -L%t.d -rpath %t.d -lt-instr %S/../Inputs/instrprof-shared-main.c +RUN: %clang_profgen -o %t-instr-no-instr1 -L%t.d -rpath %t.d -lt-no-instr1 %S/../Inputs/instrprof-shared-main.c +RUN: %clang_profgen -o %t-instr-no-instr2 -L%t.d -rpath %t.d -lt-no-instr2 %S/../Inputs/instrprof-shared-main.c +RUN: %clang -o %t-no-instr1-instr -L%t.d -rpath %t.d -lt-instr %S/../Inputs/instrprof-shared-main.c +RUN: %clang -o %t-no-instr1-no-instr1 -L%t.d -rpath %t.d -lt-no-instr1 %S/../Inputs/instrprof-shared-main.c +RUN: %clang -o %t-no-instr1-no-instr2 -L%t.d -rpath %t.d -lt-no-instr2 %S/../Inputs/instrprof-shared-main.c +RUN: %clang -c -o %t.d/instrprof-shared-main-no-instr2.o %S/../Inputs/instrprof-shared-main.c RUN: %clang -o %t-no-instr2-instr -L%t.d -rpath %t.d -lt-instr %t.d/instrprof-shared-main-no-instr2.o RUN: %clang -o %t-no-instr2-no-instr1 -L%t.d -rpath %t.d -lt-no-instr1 %t.d/instrprof-shared-main-no-instr2.o RUN: %clang -o %t-no-instr2-no-instr2 -L%t.d -rpath %t.d -lt-no-instr2 %t.d/instrprof-shared-main-no-instr2.o @@ -57,13 +57,13 @@ RUN: llvm-profdata show -counts --function foo %t-instr-instr.profdata | grep -v RUN: llvm-profdata show -counts --function foo %t-no-instr1-instr.profdata | grep -v 'Total\|Maximum' > %t-foo-2 RUN: llvm-profdata show -counts --function foo %t-no-instr2-instr.profdata | grep -v 'Total\|Maximum' > %t-foo-3 -RUN: %clang_profuse=%t-instr-instr.profdata -o %t-main-instr-instr.ll -S -emit-llvm %S/Inputs/instrprof-shared-main.c -RUN: %clang_profuse=%t-instr-no-instr1.profdata -o %t-main-instr-no-instr1.ll -S -emit-llvm %S/Inputs/instrprof-shared-main.c -RUN: %clang_profuse=%t-instr-no-instr2.profdata -o %t-main-instr-no-instr2.ll -S -emit-llvm %S/Inputs/instrprof-shared-main.c -RUN: %clang_profuse=%t-instr-instr.profdata -o %t-lib-instr-instr.ll -S -emit-llvm %S/Inputs/instrprof-shared-lib.c -RUN: %clang_profuse=%t-no-instr1-instr.profdata -o %t-lib-no-instr1-instr.ll -S -emit-llvm %S/Inputs/instrprof-shared-lib.c -RUN: %clang_profuse=%t-no-instr2-instr.profdata -o %t-lib-no-instr2-instr.ll -S -emit-llvm %S/Inputs/instrprof-shared-lib.c -RUN: %clang_profuse=%t-instr-instr.profdata -o %t-lib-instr-instr.ll -S -emit-llvm %S/Inputs/instrprof-shared-lib.c +RUN: %clang_profuse=%t-instr-instr.profdata -o %t-main-instr-instr.ll -S -emit-llvm %S/../Inputs/instrprof-shared-main.c +RUN: %clang_profuse=%t-instr-no-instr1.profdata -o %t-main-instr-no-instr1.ll -S -emit-llvm %S/../Inputs/instrprof-shared-main.c +RUN: %clang_profuse=%t-instr-no-instr2.profdata -o %t-main-instr-no-instr2.ll -S -emit-llvm %S/../Inputs/instrprof-shared-main.c +RUN: %clang_profuse=%t-instr-instr.profdata -o %t-lib-instr-instr.ll -S -emit-llvm %S/../Inputs/instrprof-shared-lib.c +RUN: %clang_profuse=%t-no-instr1-instr.profdata -o %t-lib-no-instr1-instr.ll -S -emit-llvm %S/../Inputs/instrprof-shared-lib.c +RUN: %clang_profuse=%t-no-instr2-instr.profdata -o %t-lib-no-instr2-instr.ll -S -emit-llvm %S/../Inputs/instrprof-shared-lib.c +RUN: %clang_profuse=%t-instr-instr.profdata -o %t-lib-instr-instr.ll -S -emit-llvm %S/../Inputs/instrprof-shared-lib.c RUN: diff %t-main-instr-no-instr1.ll %t-main-instr-no-instr2.ll RUN: diff %t-lib-no-instr1-instr.ll %t-lib-no-instr2-instr.ll diff --git a/compiler-rt/test/profile/Posix/instrprof-value-prof-shared.test b/compiler-rt/test/profile/Posix/instrprof-value-prof-shared.test new file mode 100644 index 0000000000000..34abe82952a23 --- /dev/null +++ b/compiler-rt/test/profile/Posix/instrprof-value-prof-shared.test @@ -0,0 +1,52 @@ +// RUN: mkdir -p %t.d +// RUN: %clang_profgen -O2 -mllvm -enable-value-profiling=true -mllvm -vp-static-alloc=true -mllvm -vp-counters-per-site=256 -fPIC -shared -o %t.d/t.shared -DSHARED_LIB %S/../Inputs/instrprof-value-prof-real.c +// RUN: %clang_profgen -O2 -mllvm -enable-value-profiling=true -mllvm -vp-static-alloc=true -mllvm -vp-counters-per-site=256 -o %t -rpath %t.d %t.d/t.shared -DCALL_SHARED %S/../Inputs/instrprof-value-prof-real.c +// RUN: env LLVM_PROFILE_FILE=%t.profraw LLVM_VP_MAX_NUM_VALS_PER_SITE=255 %run %t +// RUN: llvm-profdata merge -o %t.profdata %t.profraw +// RUN: llvm-profdata show --all-functions -ic-targets %t.profdata | FileCheck %S/../Inputs/instrprof-value-prof-real.c +// RUN: llvm-profdata show --all-functions -ic-targets %t.profdata | FileCheck %S/../Inputs/instrprof-value-prof-real.c --check-prefix=SHARED + +// IR level instrumentation +// RUN: %clang_pgogen -O2 -mllvm -disable-vp=false -mllvm -vp-static-alloc=true -mllvm -vp-counters-per-site=256 -fPIC -shared -o %t.d/t.ir.shared -DSHARED_LIB %S/../Inputs/instrprof-value-prof-real.c +// RUN: %clang_pgogen -O2 -mllvm -disable-vp=false -mllvm -vp-static-alloc=true -mllvm -vp-counters-per-site=256 -rpath %t.d -o %t.ir %t.d/t.ir.shared -DCALL_SHARED %S/../Inputs/instrprof-value-prof-real.c +// Profile data from shared library will be concatenated to the same raw file. +// RUN: env LLVM_PROFILE_FILE=%t.ir.profraw LLVM_VP_MAX_NUM_VALS_PER_SITE=255 %run %t.ir +// RUN: llvm-profdata merge -o %t.ir.profdata %t.ir.profraw +// RUN: llvm-profdata show --all-functions -ic-targets %t.ir.profdata | FileCheck %S/../Inputs/instrprof-value-prof-real.c +// RUN: llvm-profdata merge -text %t.ir.profdata -o %t.ir.proftxt +// RUN: llvm-profdata show --all-functions -ic-targets %t.ir.profdata | FileCheck %S/../Inputs/instrprof-value-prof-real.c --check-prefix=SHARED +// RUN: FileCheck %S/../Inputs/instrprof-value-prof-real.c --check-prefix=IR < %t.ir.proftxt + +// Same as above but with profile online merging enabled. +// RUN: rm -fr %t.prof/ +// RUN: mkdir -p %t.prof/ +// RUN: %clang_pgogen=%t.prof -O2 -mllvm -disable-vp=false -mllvm -vp-static-alloc=true -mllvm -vp-counters-per-site=256 -fPIC -shared -o %t.d/t.ir.m.shared -DSHARED_LIB %S/../Inputs/instrprof-value-prof-real.c +// RUN: %clang_pgogen=%t.prof -O2 -mllvm -disable-vp=false -mllvm -vp-static-alloc=true -mllvm -vp-counters-per-site=256 -rpath %t.d -o %t.ir.m %t.d/t.ir.m.shared -DCALL_SHARED %S/../Inputs/instrprof-value-prof-real.c +// RUN: env LLVM_VP_MAX_NUM_VALS_PER_SITE=255 %run %t.ir.m +// RUN: llvm-profdata merge -o %t.ir.m.profdata -dump-input-file-list %t.prof/ | count 2 +// RUN: llvm-profdata merge -o %t.ir.m.profdata %t.prof/ +// RUN: llvm-profdata show --all-functions -ic-targets %t.ir.m.profdata | FileCheck %S/../Inputs/instrprof-value-prof-real.c +// RUN: llvm-profdata merge -text %t.ir.m.profdata -o %t.ir.m.proftxt +// RUN: llvm-profdata show --all-functions -ic-targets %t.ir.m.profdata | FileCheck %S/../Inputs/instrprof-value-prof-real.c --check-prefix=SHARED +// RUN: FileCheck %S/../Inputs/instrprof-value-prof-real.c --check-prefix=IR < %t.ir.m.proftxt + + +// IR level instrumentation: dynamic memory allocation +// RUN: %clang_pgogen -O2 -mllvm -disable-vp=false -mllvm -vp-static-alloc=false -mllvm -vp-counters-per-site=256 -fPIC -shared -o %t.d/t.ir.dyn.shared -DSHARED_LIB %S/../Inputs/instrprof-value-prof-real.c +// RUN: %clang_pgogen -O2 -mllvm -disable-vp=false -mllvm -vp-static-alloc=false -mllvm -vp-counters-per-site=256 -rpath %t.d -o %t.ir.dyn %t.d/t.ir.dyn.shared -DCALL_SHARED %S/../Inputs/instrprof-value-prof-real.c +// RUN: env LLVM_PROFILE_FILE=%t.ir.dyn.profraw %run %t.ir.dyn +// RUN: llvm-profdata merge -o %t.ir.dyn.profdata %t.ir.dyn.profraw +// RUN: llvm-profdata show --all-functions -ic-targets %t.ir.dyn.profdata | FileCheck %S/../Inputs/instrprof-value-prof-real.c +// RUN: llvm-profdata merge -text %t.ir.dyn.profdata -o %t.ir.dyn.proftxt +// RUN: llvm-profdata show --all-functions -ic-targets %t.ir.dyn.profdata | FileCheck %S/../Inputs/instrprof-value-prof-real.c --check-prefix=SHARED +// RUN: FileCheck %S/../Inputs/instrprof-value-prof-real.c --check-prefix=IR < %t.ir.dyn.proftxt + +// IR level instrumentation: main program uses static counter, shared library uses dynamic memory alloc. +// RUN: %clang_pgogen -O2 -mllvm -disable-vp=false -mllvm -vp-static-alloc=false -mllvm -vp-counters-per-site=256 -fPIC -shared -o %t.d/t.ir.dyn.shared -DSHARED_LIB %S/../Inputs/instrprof-value-prof-real.c +// RUN: %clang_pgogen -O2 -mllvm -disable-vp=false -mllvm -vp-static-alloc=true -mllvm -vp-counters-per-site=256 -rpath %t.d -o %t.ir.mixed %t.d/t.ir.dyn.shared -DCALL_SHARED %S/../Inputs/instrprof-value-prof-real.c +// RUN: env LLVM_PROFILE_FILE=%t.ir.mixed.profraw LLVM_VP_MAX_NUM_VALS_PER_SITE=255 %run %t.ir.mixed +// RUN: llvm-profdata merge -o %t.ir.mixed.profdata %t.ir.mixed.profraw +// RUN: llvm-profdata show --all-functions -ic-targets %t.ir.mixed.profdata | FileCheck %S/../Inputs/instrprof-value-prof-real.c +// RUN: llvm-profdata merge -text %t.ir.mixed.profdata -o %t.ir.mixed.proftxt +// RUN: llvm-profdata show --all-functions -ic-targets %t.ir.mixed.profdata | FileCheck %S/../Inputs/instrprof-value-prof-real.c --check-prefix=SHARED +// RUN: FileCheck %S/../Inputs/instrprof-value-prof-real.c --check-prefix=IR < %t.ir.mixed.proftxt diff --git a/compiler-rt/test/profile/instrprof-visibility-kinds.inc b/compiler-rt/test/profile/Posix/instrprof-visibility-kinds.inc similarity index 100% rename from compiler-rt/test/profile/instrprof-visibility-kinds.inc rename to compiler-rt/test/profile/Posix/instrprof-visibility-kinds.inc diff --git a/compiler-rt/test/profile/instrprof-visibility.cpp b/compiler-rt/test/profile/Posix/instrprof-visibility.cpp similarity index 100% rename from compiler-rt/test/profile/instrprof-visibility.cpp rename to compiler-rt/test/profile/Posix/instrprof-visibility.cpp diff --git a/compiler-rt/test/profile/Posix/lit.local.cfg b/compiler-rt/test/profile/Posix/lit.local.cfg new file mode 100644 index 0000000000000..60a9460820a62 --- /dev/null +++ b/compiler-rt/test/profile/Posix/lit.local.cfg @@ -0,0 +1,9 @@ +def getRoot(config): + if not config.parent: + return config + return getRoot(config.parent) + +root = getRoot(config) + +if root.host_os in ['Windows']: + config.unsupported = True diff --git a/compiler-rt/test/profile/coverage-inline.cpp b/compiler-rt/test/profile/coverage-inline.cpp new file mode 100644 index 0000000000000..e362e566fb4b4 --- /dev/null +++ b/compiler-rt/test/profile/coverage-inline.cpp @@ -0,0 +1,47 @@ +// Test that the instrumentation puts the right linkage on the profile data for +// inline functions. +// RUN: %clang_profgen -g -fcoverage-mapping -c -o %t1.o %s -DOBJECT_1 +// RUN: %clang_profgen -g -fcoverage-mapping -c -o %t2.o %s +// RUN: %clang_profgen -g -fcoverage-mapping %t1.o %t2.o -o %t.exe +// RUN: env LLVM_PROFILE_FILE=%t.profraw %run %t.exe +// RUN: llvm-profdata show %t.profraw -all-functions | FileCheck %s + +// Again, with optimizations and inlining. This tests that we use comdats +// correctly. +// RUN: %clang_profgen -O2 -g -fcoverage-mapping -c -o %t1.o %s -DOBJECT_1 +// RUN: %clang_profgen -O2 -g -fcoverage-mapping -c -o %t2.o %s +// RUN: %clang_profgen -g -fcoverage-mapping %t1.o %t2.o -o %t.exe +// RUN: env LLVM_PROFILE_FILE=%t.profraw %run %t.exe +// RUN: llvm-profdata show %t.profraw -all-functions | FileCheck %s + +// CHECK: {{.*}}foo{{.*}}: +// CHECK-NEXT: Hash: +// CHECK-NEXT: Counters: 1 +// CHECK-NEXT: Function count: 1 +// CHECK: {{.*}}inline_wrapper{{.*}}: +// CHECK-NEXT: Hash: +// CHECK-NEXT: Counters: 1 +// CHECK-NEXT: Function count: 2 +// CHECK: main: +// CHECK-NEXT: Hash: +// CHECK-NEXT: Counters: 1 +// CHECK-NEXT: Function count: 1 + +extern "C" int puts(const char *); + +inline void inline_wrapper(const char *msg) { + puts(msg); +} + +void foo(); + +#ifdef OBJECT_1 +void foo() { + inline_wrapper("foo"); +} +#else +int main() { + inline_wrapper("main"); + foo(); +} +#endif diff --git a/compiler-rt/test/profile/instrprof-dlopen-dlclose-gcov.test b/compiler-rt/test/profile/instrprof-dlopen-dlclose-gcov.test deleted file mode 100644 index 36b5dbd262dfe..0000000000000 --- a/compiler-rt/test/profile/instrprof-dlopen-dlclose-gcov.test +++ /dev/null @@ -1,33 +0,0 @@ -# atexit(3) not supported in dlopen(3)ed+dlclose(3)d DSO -XFAIL: netbsd - -RUN: mkdir -p %t.d -RUN: cd %t.d - -RUN: %clang --coverage -o func.shared -fPIC -shared %S/Inputs/instrprof-dlopen-func.c -RUN: %clang --coverage -o func2.shared -fPIC -shared %S/Inputs/instrprof-dlopen-func2.c -RUN: %clang --coverage -o func3.shared -fPIC -shared %S/Inputs/instrprof-dlopen-func3.c -RUN: %clang --coverage -o %t -fPIC -rpath %t.d %S/Inputs/instrprof-dlopen-dlclose-main.c - -# Test with two dlopened libraries. -RUN: rm -f instrprof-dlopen-dlclose-main.gcda instrprof-dlopen-func.gcda instrprof-dlopen-func2.gcda -RUN: %run %t -RUN: llvm-cov gcov instrprof-dlopen-dlclose-main.gcda -RUN: FileCheck --match-full-lines --strict-whitespace --input-file instrprof-dlopen-dlclose-main.c.gcov %S/Inputs/instrprof-dlopen-dlclose-main.c.gcov -RUN: llvm-cov gcov instrprof-dlopen-func.gcda -RUN: FileCheck --match-full-lines --strict-whitespace --input-file instrprof-dlopen-func.c.gcov %S/Inputs/instrprof-dlopen-func.c.gcov -RUN: llvm-cov gcov instrprof-dlopen-func2.gcda -RUN: FileCheck --match-full-lines --strict-whitespace --input-file instrprof-dlopen-func2.c.gcov %S/Inputs/instrprof-dlopen-func2.c.gcov - -# Test with three dlopened libraries. -RUN: %clang -DUSE_LIB3 --coverage -o %t -fPIC -rpath %t.d %S/Inputs/instrprof-dlopen-dlclose-main.c -RUN: rm -f instrprof-dlopen-dlclose-main.gcda instrprof-dlopen-func.gcda instrprof-dlopen-func2.gcda instrprof-dlopen-func3.gcda -RUN: %run %t -RUN: llvm-cov gcov instrprof-dlopen-dlclose-main.gcda -RUN: FileCheck --match-full-lines --strict-whitespace --input-file instrprof-dlopen-dlclose-main.c.gcov %S/Inputs/instrprof-dlopen-dlclose-main_three-libs.c.gcov -RUN: llvm-cov gcov instrprof-dlopen-func.gcda -RUN: FileCheck --match-full-lines --strict-whitespace --input-file instrprof-dlopen-func.c.gcov %S/Inputs/instrprof-dlopen-func.c.gcov -RUN: llvm-cov gcov instrprof-dlopen-func2.gcda -RUN: FileCheck --match-full-lines --strict-whitespace --input-file instrprof-dlopen-func2.c.gcov %S/Inputs/instrprof-dlopen-func2.c.gcov -RUN: llvm-cov gcov instrprof-dlopen-func3.gcda -RUN: FileCheck --match-full-lines --strict-whitespace --input-file instrprof-dlopen-func2.c.gcov %S/Inputs/instrprof-dlopen-func3.c.gcov diff --git a/compiler-rt/test/profile/instrprof-dlopen.test b/compiler-rt/test/profile/instrprof-dlopen.test deleted file mode 100644 index ba386e34773bf..0000000000000 --- a/compiler-rt/test/profile/instrprof-dlopen.test +++ /dev/null @@ -1,34 +0,0 @@ -RUN: mkdir -p %t.d -RUN: %clang_profgen -o %t.d/func.shared -fPIC -shared %S/Inputs/instrprof-dlopen-func.c -RUN: %clang_profgen -o %t.d/func2.shared -fPIC -shared %S/Inputs/instrprof-dlopen-func2.c -RUN: %clang -o %t-local -fPIC -DDLOPEN_FUNC_DIR=\"%t.d\" -DDLOPEN_FLAGS="RTLD_LAZY | RTLD_LOCAL" %S/Inputs/instrprof-dlopen-main.c -RUN: %clang -o %t-global -fPIC -DDLOPEN_FUNC_DIR=\"%t.d\" -DDLOPEN_FLAGS="RTLD_LAZY | RTLD_GLOBAL" %S/Inputs/instrprof-dlopen-main.c - -RUN: %clang -c -o %t.d/main.o %S/Inputs/instrprof-dlopen-main.c -RUN: %clang_profgen -o %t-static %S/Inputs/instrprof-dlopen-func.c %S/Inputs/instrprof-dlopen-func2.c %t.d/main.o - -RUN: env LLVM_PROFILE_FILE=%t-static.profraw %run %t-static -RUN: env LLVM_PROFILE_FILE=%t-local.profraw %run %t-local -RUN: env LLVM_PROFILE_FILE=%t-global.profraw %run %t-global - -RUN: llvm-profdata merge -o %t-static.profdata %t-static.profraw -RUN: llvm-profdata merge -o %t-local.profdata %t-local.profraw -RUN: llvm-profdata merge -o %t-global.profdata %t-global.profraw - -RUN: %clang_profuse=%t-static.profdata -o %t-func.static.ll -S -emit-llvm %S/Inputs/instrprof-dlopen-func.c -RUN: %clang_profuse=%t-local.profdata -o %t-func.local.ll -S -emit-llvm %S/Inputs/instrprof-dlopen-func.c -RUN: %clang_profuse=%t-global.profdata -o %t-func.global.ll -S -emit-llvm %S/Inputs/instrprof-dlopen-func.c -RUN: diff %t-func.static.ll %t-func.local.ll -RUN: diff %t-func.static.ll %t-func.global.ll - -RUN: %clang_profuse=%t-static.profdata -o %t-func2.static.ll -S -emit-llvm %S/Inputs/instrprof-dlopen-func2.c -RUN: %clang_profuse=%t-local.profdata -o %t-func2.local.ll -S -emit-llvm %S/Inputs/instrprof-dlopen-func2.c -RUN: %clang_profuse=%t-global.profdata -o %t-func2.global.ll -S -emit-llvm %S/Inputs/instrprof-dlopen-func2.c -RUN: diff %t-func2.static.ll %t-func2.local.ll -RUN: diff %t-func2.static.ll %t-func2.global.ll - -RUN: %clang_profuse=%t-static.profdata -o %t-main.static.ll -S -emit-llvm %S/Inputs/instrprof-dlopen-main.c -RUN: %clang_profuse=%t-local.profdata -o %t-main.local.ll -S -emit-llvm %S/Inputs/instrprof-dlopen-main.c -RUN: %clang_profuse=%t-local.profdata -o %t-main.global.ll -S -emit-llvm %S/Inputs/instrprof-dlopen-main.c -RUN: diff %t-main.static.ll %t-main.local.ll -RUN: diff %t-main.static.ll %t-main.global.ll diff --git a/compiler-rt/test/profile/instrprof-dynamic-one-shared.test b/compiler-rt/test/profile/instrprof-dynamic-one-shared.test deleted file mode 100644 index 38be4fe8bc4ef..0000000000000 --- a/compiler-rt/test/profile/instrprof-dynamic-one-shared.test +++ /dev/null @@ -1,23 +0,0 @@ -RUN: mkdir -p %t.d -RUN: %clang_profgen -o %t.d/a.shared -fPIC -shared %S/Inputs/instrprof-dynamic-a.cpp -RUN: %clang_profgen -o %t-shared -fPIC -rpath %t.d %t.d/a.shared %S/Inputs/instrprof-dynamic-b.cpp %S/Inputs/instrprof-dynamic-main.cpp - -RUN: %clang_profgen -o %t-static %S/Inputs/instrprof-dynamic-a.cpp %S/Inputs/instrprof-dynamic-b.cpp %S/Inputs/instrprof-dynamic-main.cpp - -RUN: env LLVM_PROFILE_FILE=%t-static.profraw %run %t-static -RUN: env LLVM_PROFILE_FILE=%t-shared.profraw %run %t-shared - -RUN: llvm-profdata merge -o %t-static.profdata %t-static.profraw -RUN: llvm-profdata merge -o %t-shared.profdata %t-shared.profraw - -RUN: %clang_profuse=%t-static.profdata -o %t-a.static.ll -S -emit-llvm %S/Inputs/instrprof-dynamic-a.cpp -RUN: %clang_profuse=%t-shared.profdata -o %t-a.shared.ll -S -emit-llvm %S/Inputs/instrprof-dynamic-a.cpp -RUN: diff %t-a.static.ll %t-a.shared.ll - -RUN: %clang_profuse=%t-static.profdata -o %t-b.static.ll -S -emit-llvm %S/Inputs/instrprof-dynamic-b.cpp -RUN: %clang_profuse=%t-shared.profdata -o %t-b.shared.ll -S -emit-llvm %S/Inputs/instrprof-dynamic-b.cpp -RUN: diff %t-b.static.ll %t-b.shared.ll - -RUN: %clang_profuse=%t-static.profdata -o %t-main.static.ll -S -emit-llvm %S/Inputs/instrprof-dynamic-main.cpp -RUN: %clang_profuse=%t-shared.profdata -o %t-main.shared.ll -S -emit-llvm %S/Inputs/instrprof-dynamic-main.cpp -RUN: diff %t-main.static.ll %t-main.shared.ll diff --git a/compiler-rt/test/profile/instrprof-dynamic-two-shared.test b/compiler-rt/test/profile/instrprof-dynamic-two-shared.test deleted file mode 100644 index 830359dec44f1..0000000000000 --- a/compiler-rt/test/profile/instrprof-dynamic-two-shared.test +++ /dev/null @@ -1,24 +0,0 @@ -RUN: mkdir -p %t.d -RUN: %clang_profgen -o %t.d/a.shared -fPIC -shared %S/Inputs/instrprof-dynamic-a.cpp -RUN: %clang_profgen -o %t.d/b.shared -fPIC -shared %S/Inputs/instrprof-dynamic-b.cpp -RUN: %clang_profgen -o %t-shared -fPIC -rpath %t.d %t.d/a.shared %t.d/b.shared %S/Inputs/instrprof-dynamic-main.cpp - -RUN: %clang_profgen -o %t-static %S/Inputs/instrprof-dynamic-a.cpp %S/Inputs/instrprof-dynamic-b.cpp %S/Inputs/instrprof-dynamic-main.cpp - -RUN: env LLVM_PROFILE_FILE=%t-static.profraw %run %t-static -RUN: env LLVM_PROFILE_FILE=%t-shared.profraw %run %t-shared - -RUN: llvm-profdata merge -o %t-static.profdata %t-static.profraw -RUN: llvm-profdata merge -o %t-shared.profdata %t-shared.profraw - -RUN: %clang_profuse=%t-static.profdata -o %t-a.static.ll -S -emit-llvm %S/Inputs/instrprof-dynamic-a.cpp -RUN: %clang_profuse=%t-shared.profdata -o %t-a.shared.ll -S -emit-llvm %S/Inputs/instrprof-dynamic-a.cpp -RUN: diff %t-a.static.ll %t-a.shared.ll - -RUN: %clang_profuse=%t-static.profdata -o %t-b.static.ll -S -emit-llvm %S/Inputs/instrprof-dynamic-b.cpp -RUN: %clang_profuse=%t-shared.profdata -o %t-b.shared.ll -S -emit-llvm %S/Inputs/instrprof-dynamic-b.cpp -RUN: diff %t-b.static.ll %t-b.shared.ll - -RUN: %clang_profuse=%t-static.profdata -o %t-main.static.ll -S -emit-llvm %S/Inputs/instrprof-dynamic-main.cpp -RUN: %clang_profuse=%t-shared.profdata -o %t-main.shared.ll -S -emit-llvm %S/Inputs/instrprof-dynamic-main.cpp -RUN: diff %t-main.static.ll %t-main.shared.ll diff --git a/compiler-rt/test/profile/instrprof-gcov-exceptions.test b/compiler-rt/test/profile/instrprof-gcov-exceptions.test index 20ca47a9528bd..a3dcc55aaf5b6 100644 --- a/compiler-rt/test/profile/instrprof-gcov-exceptions.test +++ b/compiler-rt/test/profile/instrprof-gcov-exceptions.test @@ -17,5 +17,5 @@ RUN: test -f instrprof-gcov-exceptions.gcno RUN: rm -f instrprof-gcov-exceptions.gcda RUN: %run %t RUN: llvm-cov gcov instrprof-gcov-exceptions.gcda -# The result should be the same, not using XFAIL as only this part of the test is failing. -RUN: not FileCheck --match-full-lines --strict-whitespace --input-file instrprof-gcov-exceptions.cpp.gcov %S/Inputs/instrprof-gcov-exceptions.cpp.gcov +# FIXME: The result should be the same, but they are not on some platforms. +RUNX: FileCheck --match-full-lines --strict-whitespace --input-file instrprof-gcov-exceptions.cpp.gcov %S/Inputs/instrprof-gcov-exceptions.cpp.gcov diff --git a/compiler-rt/test/profile/instrprof-icall-promo.test b/compiler-rt/test/profile/instrprof-icall-promo.test index d9b16f67782ec..12e627157ed8f 100644 --- a/compiler-rt/test/profile/instrprof-icall-promo.test +++ b/compiler-rt/test/profile/instrprof-icall-promo.test @@ -12,6 +12,9 @@ RUN: env LLVM_PROFILE_FILE=%t-icall2.profraw %run %t.gen.2 RUN: llvm-profdata merge -o %t-icall2.profdata %t-icall2.profraw RUN: %clangxx_profuse=%t-icall2.profdata -O2 -Rpass=pgo-icall-prom -c -o %t.2.use.o %S/Inputs/instrprof-icall-promo_2.cc 2>&1 | FileCheck %s +FIXME: Relies on vtable layout +XFAIL: msvc + # CHECK: Promote indirect call to diff --git a/compiler-rt/test/profile/instrprof-merge-match.test b/compiler-rt/test/profile/instrprof-merge-match.test index 8345620dcf07f..5448af15893de 100644 --- a/compiler-rt/test/profile/instrprof-merge-match.test +++ b/compiler-rt/test/profile/instrprof-merge-match.test @@ -3,3 +3,5 @@ // RUN: %clang_profgen -o %t -L %t.d -rpath %t.d %S/Inputs/instrprof-merge-match.c -lt // RUN: %run %t +rpath isn't supported on Windows. +UNSUPPORTED: windows diff --git a/compiler-rt/test/profile/instrprof-merge.c b/compiler-rt/test/profile/instrprof-merge.c index ef24c83a10373..8f8d7f458c966 100644 --- a/compiler-rt/test/profile/instrprof-merge.c +++ b/compiler-rt/test/profile/instrprof-merge.c @@ -2,6 +2,9 @@ // RUN: %run %t %t.profraw 1 1 // RUN: llvm-profdata show --all-functions --counts %t.profraw | FileCheck %s +// FIXME: llvm-profdata exits with "Malformed instrumentation profile data" +// XFAIL: msvc + #include #include #include diff --git a/compiler-rt/test/profile/instrprof-path.c b/compiler-rt/test/profile/instrprof-path.c index 90cb1df198f07..e4dc8961212c1 100644 --- a/compiler-rt/test/profile/instrprof-path.c +++ b/compiler-rt/test/profile/instrprof-path.c @@ -1,13 +1,13 @@ // RUN: %clang_pgogen -O2 -o %t.0 %s -// RUN: %clang_pgogen=%t.d1 -O2 -o %t.1 %s -// RUN: %clang_pgogen=%t.d1/%t.d2 -O2 -o %t.2 %s +// RUN: %clang_pgogen=%/t.d1 -O2 -o %t.1 %s +// RUN: %clang_pgogen=%/t.d1/%:t.d2 -O2 -o %t.2 %s // // RUN: %run %t.0 "" -// RUN: env LLVM_PROFILE_FILE=%t.d1/default.profraw %run %t.0 %t.d1/ -// RUN: env LLVM_PROFILE_FILE=%t.d1/%t.d2/default.profraw %run %t.0 %t.d1/%t.d2/ -// RUN: %run %t.1 %t.d1/ -// RUN: %run %t.2 %t.d1/%t.d2/ -// RUN: %run %t.2 %t.d1/%t.d2/ %t.d1/%t.d2/%t.d3/blah.profraw %t.d1/%t.d2/%t.d3/ +// RUN: env LLVM_PROFILE_FILE=%/t.d1/default.profraw %run %t.0 %/t.d1 +// RUN: env LLVM_PROFILE_FILE=%/t.d1/%:t.d2/default.profraw %run %t.0 %/t.d1/%:t.d2 +// RUN: %run %t.1 %/t.d1 +// RUN: %run %t.2 %/t.d1/%:t.d2 +// RUN: %run %t.2 %/t.d1/%:t.d2 %/t.d1/%:t.d2/%:t.d3/blah.profraw %/t.d1/%:t.d2/%:t.d3/ #include @@ -15,7 +15,6 @@ const char *__llvm_profile_get_path_prefix(); void __llvm_profile_set_filename(const char*); int main(int argc, const char *argv[]) { - int i; const char *expected; const char *prefix; if (argc < 2) @@ -24,7 +23,16 @@ int main(int argc, const char *argv[]) { expected = argv[1]; prefix = __llvm_profile_get_path_prefix(); - if (strcmp(prefix, expected)) + // The last character should be a trailing slash. Ignore it in the comparison + // since it could be '/' or '\\'. + int slashpos = strlen(prefix); + if (slashpos > 0) { + --slashpos; + if (prefix[slashpos] != '/' && prefix[slashpos] != '\\') + return 1; + } + + if (strncmp(prefix, expected, slashpos)) return 1; if (argc == 4) { diff --git a/compiler-rt/test/profile/instrprof-shared-gcov-flush.test b/compiler-rt/test/profile/instrprof-shared-gcov-flush.test deleted file mode 100644 index 542db0412437b..0000000000000 --- a/compiler-rt/test/profile/instrprof-shared-gcov-flush.test +++ /dev/null @@ -1,52 +0,0 @@ -# This test fails on Mac (https://bugs.llvm.org/show_bug.cgi?id=38134) -XFAIL: darwin - -RUN: mkdir -p %t.d -RUN: cd %t.d - -RUN: %clang --coverage -o libfunc.so -fPIC -shared %S/Inputs/instrprof-shared-lib.c -RUN: test -f instrprof-shared-lib.gcno - -# Test the case where we exit abruptly after calling __gcov_flush, which means we don't write out the counters at exit. -RUN: %clang -DEXIT_ABRUPTLY -DSHARED_CALL_BEFORE_GCOV_FLUSH -DSHARED_CALL_AFTER_GCOV_FLUSH --coverage -o %t -L%t.d -rpath %t.d -lfunc %S/Inputs/instrprof-shared-main-gcov-flush.c -RUN: test -f instrprof-shared-main-gcov-flush.gcno - -RUN: rm -f instrprof-shared-main-gcov-flush.gcda instrprof-shared-lib.gcda -RUN: %run %t -RUN: llvm-cov gcov instrprof-shared-main-gcov-flush.gcda -RUN: FileCheck --match-full-lines --strict-whitespace --input-file instrprof-shared-main-gcov-flush.c.gcov %S/Inputs/instrprof-shared-main-gcov-flush_no-writeout.c.gcov -RUN: llvm-cov gcov instrprof-shared-lib.gcda -RUN: FileCheck --match-full-lines --strict-whitespace --input-file instrprof-shared-lib.c.gcov %S/Inputs/instrprof-shared-lib.c.gcov - -# Test the case where we exit normally and we have a call to the shared library function before __gcov_flush. -RUN: %clang -DSHARED_CALL_BEFORE_GCOV_FLUSH --coverage -o %t -L%t.d -rpath %t.d -lfunc %S/Inputs/instrprof-shared-main-gcov-flush.c -RUN: test -f instrprof-shared-main-gcov-flush.gcno - -RUN: rm -f instrprof-shared-main-gcov-flush.gcda instrprof-shared-lib.gcda -RUN: %run %t -RUN: llvm-cov gcov instrprof-shared-main-gcov-flush.gcda -RUN: FileCheck --match-full-lines --strict-whitespace --input-file instrprof-shared-main-gcov-flush.c.gcov %S/Inputs/instrprof-shared-main-gcov-flush_shared-call-before.c.gcov -RUN: llvm-cov gcov instrprof-shared-lib.gcda -RUN: FileCheck --match-full-lines --strict-whitespace --input-file instrprof-shared-lib.c.gcov %S/Inputs/instrprof-shared-lib.c.gcov - -# Test the case where we exit normally and we have a call to the shared library function after __gcov_flush. -RUN: %clang -DSHARED_CALL_AFTER_GCOV_FLUSH --coverage -o %t -L%t.d -rpath %t.d -lfunc %S/Inputs/instrprof-shared-main-gcov-flush.c -RUN: test -f instrprof-shared-main-gcov-flush.gcno - -RUN: rm -f instrprof-shared-main-gcov-flush.gcda instrprof-shared-lib.gcda -RUN: %run %t -RUN: llvm-cov gcov instrprof-shared-main-gcov-flush.gcda -RUN: FileCheck --match-full-lines --strict-whitespace --input-file instrprof-shared-main-gcov-flush.c.gcov %S/Inputs/instrprof-shared-main-gcov-flush_shared-call-after.c.gcov -RUN: llvm-cov gcov instrprof-shared-lib.gcda -RUN: FileCheck --match-full-lines --strict-whitespace --input-file instrprof-shared-lib.c.gcov %S/Inputs/instrprof-shared-lib.c.gcov - -# Test the case where we exit normally and we have calls to the shared library function before and after __gcov_flush. -RUN: %clang -DSHARED_CALL_BEFORE_GCOV_FLUSH -DSHARED_CALL_AFTER_GCOV_FLUSH --coverage -o %t -L%t.d -rpath %t.d -lfunc %S/Inputs/instrprof-shared-main-gcov-flush.c -RUN: test -f instrprof-shared-main-gcov-flush.gcno - -RUN: rm -f instrprof-shared-main-gcov-flush.gcda instrprof-shared-lib.gcda -RUN: %run %t -RUN: llvm-cov gcov instrprof-shared-main-gcov-flush.gcda -RUN: FileCheck --match-full-lines --strict-whitespace --input-file instrprof-shared-main-gcov-flush.c.gcov %S/Inputs/instrprof-shared-main-gcov-flush_shared-call-before-after.c.gcov -RUN: llvm-cov gcov instrprof-shared-lib.gcda -RUN: FileCheck --match-full-lines --strict-whitespace --input-file instrprof-shared-lib.c.gcov %S/Inputs/instrprof-shared-lib_called-twice.c.gcov diff --git a/compiler-rt/test/profile/instrprof-value-prof-shared.test b/compiler-rt/test/profile/instrprof-value-prof-shared.test deleted file mode 100644 index a45b0d55b2363..0000000000000 --- a/compiler-rt/test/profile/instrprof-value-prof-shared.test +++ /dev/null @@ -1,52 +0,0 @@ -// RUN: mkdir -p %t.d -// RUN: %clang_profgen -O2 -mllvm -enable-value-profiling=true -mllvm -vp-static-alloc=true -mllvm -vp-counters-per-site=256 -fPIC -shared -o %t.d/t.shared -DSHARED_LIB %S/Inputs/instrprof-value-prof-real.c -// RUN: %clang_profgen -O2 -mllvm -enable-value-profiling=true -mllvm -vp-static-alloc=true -mllvm -vp-counters-per-site=256 -o %t -rpath %t.d %t.d/t.shared -DCALL_SHARED %S/Inputs/instrprof-value-prof-real.c -// RUN: env LLVM_PROFILE_FILE=%t.profraw LLVM_VP_MAX_NUM_VALS_PER_SITE=255 %run %t -// RUN: llvm-profdata merge -o %t.profdata %t.profraw -// RUN: llvm-profdata show --all-functions -ic-targets %t.profdata | FileCheck %S/Inputs/instrprof-value-prof-real.c -// RUN: llvm-profdata show --all-functions -ic-targets %t.profdata | FileCheck %S/Inputs/instrprof-value-prof-real.c --check-prefix=SHARED - -// IR level instrumentation -// RUN: %clang_pgogen -O2 -mllvm -disable-vp=false -mllvm -vp-static-alloc=true -mllvm -vp-counters-per-site=256 -fPIC -shared -o %t.d/t.ir.shared -DSHARED_LIB %S/Inputs/instrprof-value-prof-real.c -// RUN: %clang_pgogen -O2 -mllvm -disable-vp=false -mllvm -vp-static-alloc=true -mllvm -vp-counters-per-site=256 -rpath %t.d -o %t.ir %t.d/t.ir.shared -DCALL_SHARED %S/Inputs/instrprof-value-prof-real.c -// Profile data from shared library will be concatenated to the same raw file. -// RUN: env LLVM_PROFILE_FILE=%t.ir.profraw LLVM_VP_MAX_NUM_VALS_PER_SITE=255 %run %t.ir -// RUN: llvm-profdata merge -o %t.ir.profdata %t.ir.profraw -// RUN: llvm-profdata show --all-functions -ic-targets %t.ir.profdata | FileCheck %S/Inputs/instrprof-value-prof-real.c -// RUN: llvm-profdata merge -text %t.ir.profdata -o %t.ir.proftxt -// RUN: llvm-profdata show --all-functions -ic-targets %t.ir.profdata | FileCheck %S/Inputs/instrprof-value-prof-real.c --check-prefix=SHARED -// RUN: FileCheck %S/Inputs/instrprof-value-prof-real.c --check-prefix=IR < %t.ir.proftxt - -// Same as above but with profile online merging enabled. -// RUN: rm -fr %t.prof/ -// RUN: mkdir -p %t.prof/ -// RUN: %clang_pgogen=%t.prof -O2 -mllvm -disable-vp=false -mllvm -vp-static-alloc=true -mllvm -vp-counters-per-site=256 -fPIC -shared -o %t.d/t.ir.m.shared -DSHARED_LIB %S/Inputs/instrprof-value-prof-real.c -// RUN: %clang_pgogen=%t.prof -O2 -mllvm -disable-vp=false -mllvm -vp-static-alloc=true -mllvm -vp-counters-per-site=256 -rpath %t.d -o %t.ir.m %t.d/t.ir.m.shared -DCALL_SHARED %S/Inputs/instrprof-value-prof-real.c -// RUN: env LLVM_VP_MAX_NUM_VALS_PER_SITE=255 %run %t.ir.m -// RUN: llvm-profdata merge -o %t.ir.m.profdata -dump-input-file-list %t.prof/ | count 2 -// RUN: llvm-profdata merge -o %t.ir.m.profdata %t.prof/ -// RUN: llvm-profdata show --all-functions -ic-targets %t.ir.m.profdata | FileCheck %S/Inputs/instrprof-value-prof-real.c -// RUN: llvm-profdata merge -text %t.ir.m.profdata -o %t.ir.m.proftxt -// RUN: llvm-profdata show --all-functions -ic-targets %t.ir.m.profdata | FileCheck %S/Inputs/instrprof-value-prof-real.c --check-prefix=SHARED -// RUN: FileCheck %S/Inputs/instrprof-value-prof-real.c --check-prefix=IR < %t.ir.m.proftxt - - -// IR level instrumentation: dynamic memory allocation -// RUN: %clang_pgogen -O2 -mllvm -disable-vp=false -mllvm -vp-static-alloc=false -mllvm -vp-counters-per-site=256 -fPIC -shared -o %t.d/t.ir.dyn.shared -DSHARED_LIB %S/Inputs/instrprof-value-prof-real.c -// RUN: %clang_pgogen -O2 -mllvm -disable-vp=false -mllvm -vp-static-alloc=false -mllvm -vp-counters-per-site=256 -rpath %t.d -o %t.ir.dyn %t.d/t.ir.dyn.shared -DCALL_SHARED %S/Inputs/instrprof-value-prof-real.c -// RUN: env LLVM_PROFILE_FILE=%t.ir.dyn.profraw %run %t.ir.dyn -// RUN: llvm-profdata merge -o %t.ir.dyn.profdata %t.ir.dyn.profraw -// RUN: llvm-profdata show --all-functions -ic-targets %t.ir.dyn.profdata | FileCheck %S/Inputs/instrprof-value-prof-real.c -// RUN: llvm-profdata merge -text %t.ir.dyn.profdata -o %t.ir.dyn.proftxt -// RUN: llvm-profdata show --all-functions -ic-targets %t.ir.dyn.profdata | FileCheck %S/Inputs/instrprof-value-prof-real.c --check-prefix=SHARED -// RUN: FileCheck %S/Inputs/instrprof-value-prof-real.c --check-prefix=IR < %t.ir.dyn.proftxt - -// IR level instrumentation: main program uses static counter, shared library uses dynamic memory alloc. -// RUN: %clang_pgogen -O2 -mllvm -disable-vp=false -mllvm -vp-static-alloc=false -mllvm -vp-counters-per-site=256 -fPIC -shared -o %t.d/t.ir.dyn.shared -DSHARED_LIB %S/Inputs/instrprof-value-prof-real.c -// RUN: %clang_pgogen -O2 -mllvm -disable-vp=false -mllvm -vp-static-alloc=true -mllvm -vp-counters-per-site=256 -rpath %t.d -o %t.ir.mixed %t.d/t.ir.dyn.shared -DCALL_SHARED %S/Inputs/instrprof-value-prof-real.c -// RUN: env LLVM_PROFILE_FILE=%t.ir.mixed.profraw LLVM_VP_MAX_NUM_VALS_PER_SITE=255 %run %t.ir.mixed -// RUN: llvm-profdata merge -o %t.ir.mixed.profdata %t.ir.mixed.profraw -// RUN: llvm-profdata show --all-functions -ic-targets %t.ir.mixed.profdata | FileCheck %S/Inputs/instrprof-value-prof-real.c -// RUN: llvm-profdata merge -text %t.ir.mixed.profdata -o %t.ir.mixed.proftxt -// RUN: llvm-profdata show --all-functions -ic-targets %t.ir.mixed.profdata | FileCheck %S/Inputs/instrprof-value-prof-real.c --check-prefix=SHARED -// RUN: FileCheck %S/Inputs/instrprof-value-prof-real.c --check-prefix=IR < %t.ir.mixed.proftxt diff --git a/compiler-rt/test/profile/instrprof-version-mismatch.c b/compiler-rt/test/profile/instrprof-version-mismatch.c index 81ae52119693f..c63b299c76d73 100644 --- a/compiler-rt/test/profile/instrprof-version-mismatch.c +++ b/compiler-rt/test/profile/instrprof-version-mismatch.c @@ -1,6 +1,9 @@ // RUN: %clang_profgen -o %t -O3 %s // RUN: %run %t 1 2>&1 | FileCheck %s +// FIXME: Weak symbols are once again a portability problem for Windows. +// XFAIL: windows + // override the version variable with a bogus version: unsigned long long __llvm_profile_raw_version = 10000; int main(int argc, const char *argv[]) { diff --git a/compiler-rt/test/profile/instrprof-without-libc.c b/compiler-rt/test/profile/instrprof-without-libc.c index 0708833e2bfdf..6e9c1dde01e6a 100644 --- a/compiler-rt/test/profile/instrprof-without-libc.c +++ b/compiler-rt/test/profile/instrprof-without-libc.c @@ -5,6 +5,10 @@ // RUN: llvm-profdata merge -o %t.profdata %t.profraw // RUN: %clang_profuse=%t.profdata -o - -S -emit-llvm %s | FileCheck %s +// This usage of llvm-nm assumes executables have symbol tables. They do not in +// an MSVC environment, so we can't make this test portable. +// UNSUPPORTED: msvc + #include #include diff --git a/compiler-rt/test/profile/lit.cfg b/compiler-rt/test/profile/lit.cfg index 7449650a623c1..e59407d7266f4 100644 --- a/compiler-rt/test/profile/lit.cfg +++ b/compiler-rt/test/profile/lit.cfg @@ -24,6 +24,10 @@ if hasattr(config, 'profile_lit_binary_dir') and \ if config.host_os in ['Linux']: extra_link_flags = ["-ldl"] +elif config.host_os in ['Windows']: + # InstrProf is incompatible with incremental linking. Disable it as a + # workaround. + extra_link_flags = ["-Wl,-incremental:no"] else: extra_link_flags = [] @@ -67,7 +71,7 @@ config.substitutions.append( ("%clangxx_profuse=", build_invocation(clang_cxxfla config.substitutions.append( ("%clang_lto_profgen=", build_invocation(clang_cflags, True) + " -fprofile-instr-generate=") ) -if config.host_os not in ['Darwin', 'FreeBSD', 'Linux', 'NetBSD', 'SunOS']: +if config.host_os not in ['Windows', 'Darwin', 'FreeBSD', 'Linux', 'NetBSD', 'SunOS']: config.unsupported = True if config.target_arch in ['armv7l']: diff --git a/compiler-rt/test/sanitizer_common/TestCases/Darwin/print-stack-trace.cc b/compiler-rt/test/sanitizer_common/TestCases/Darwin/print-stack-trace.cc index 82fc8a845ae77..715282fd76674 100644 --- a/compiler-rt/test/sanitizer_common/TestCases/Darwin/print-stack-trace.cc +++ b/compiler-rt/test/sanitizer_common/TestCases/Darwin/print-stack-trace.cc @@ -1,9 +1,6 @@ // RUN: %clangxx -O0 %s -o %t && %env_tool_opts=stack_trace_format=DEFAULT %run %t 2>&1 | FileCheck %s // RUN: %env_tool_opts=stack_trace_format='"frame:%n lineno:%l"' %run %t 2>&1 | FileCheck %s --check-prefix=CUSTOM -// FIXME(dliew): Make this test work with other sanitizers -// XFAIL: darwin && (lsan || tsan || ubsan) - #include static inline void FooBarBaz() { diff --git a/compiler-rt/test/sanitizer_common/TestCases/Posix/dedup_token_length_test.cc b/compiler-rt/test/sanitizer_common/TestCases/Posix/dedup_token_length_test.cc index 2a3ad6beec069..94c50be169b48 100644 --- a/compiler-rt/test/sanitizer_common/TestCases/Posix/dedup_token_length_test.cc +++ b/compiler-rt/test/sanitizer_common/TestCases/Posix/dedup_token_length_test.cc @@ -10,9 +10,6 @@ // XFAIL: netbsd && !asan -// FIXME(dliew): Make this test work with other sanitizers -// XFAIL: darwin && (lsan || tsan || ubsan) - volatile int *null = 0; namespace Xyz { diff --git a/compiler-rt/test/sanitizer_common/TestCases/Posix/getpw_getgr.cc b/compiler-rt/test/sanitizer_common/TestCases/Posix/getpw_getgr.cc new file mode 100644 index 0000000000000..b4bc9b43d0d04 --- /dev/null +++ b/compiler-rt/test/sanitizer_common/TestCases/Posix/getpw_getgr.cc @@ -0,0 +1,114 @@ +// RUN: %clangxx %s -o %t && %run %t +// UNSUPPORTED: ios + +#include +#include +#include +#include +#include +#include +#include +#include + +std::string any_group; +const int N = 123456; + +void Check(const char *str) { + if (!str) + return; + assert(strlen(str) != N); +} + +void Check(const passwd *result) { + Check(result->pw_name); + Check(result->pw_passwd); + assert(result->pw_uid != N); + assert(result->pw_gid != N); +#if !defined(__ANDROID__) + Check(result->pw_gecos); +#endif + Check(result->pw_dir); + +#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) + assert(result->pw_change != N); + Check(result->pw_class); + assert(result->pw_expire != N); +#endif + +#if defined(__FreeBSD__) + assert(result->pw_fields != N); +#endif + + // SunOS also has pw_age and pw_comment which are documented as unused. +} + +void Check(const group *result) { + Check(result->gr_name); + Check(result->gr_passwd); + assert(result->gr_gid != N); + for (char **mem = result->gr_mem; *mem; ++mem) + Check(*mem); + if (any_group.empty()) + any_group = result->gr_name; +} + +template +void test(Fn f, Args... args) { + T *result = f(args...); + Check(result); +} + +template +void test_r(Fn f, Args... args) { + T gr; + T *result; + char buff[10000]; + assert(!f(args..., &gr, buff, sizeof(buff), &result)); + Check(&gr); + Check(result); +} + +int main(int argc, const char *argv[]) { + test(&getpwuid, 0); + test(&getpwnam, "root"); + test(&getgrgid, 0); + test(&getgrnam, any_group.c_str()); + +#if !defined(__ANDROID__) + setpwent(); + test(&getpwent); + setgrent(); + test(&getgrent); + +#if !defined(__APPLE__) + setpwent(); + test_r(&getpwent_r); + setgrent(); + test_r(&getgrent_r); +#endif + + test_r(&getpwuid_r, 0); + test_r(&getpwnam_r, "root"); + + test_r(&getgrgid_r, 0); + test_r(&getgrnam_r, any_group.c_str()); + +#if defined(__linux__) + auto pwd_file = [] { + return std::unique_ptr(fopen("/etc/passwd", "r"), + &fclose); + }; + auto gr_file = [] { + return std::unique_ptr(fopen("/etc/group", "r"), + &fclose); + }; + test(&fgetpwent, pwd_file().get()); + test(&fgetgrent, gr_file().get()); + test_r(&fgetpwent_r, pwd_file().get()); + test_r(&fgetgrent_r, gr_file().get()); +#endif + +#endif // __ANDROID__ + + return 0; +} diff --git a/compiler-rt/test/sanitizer_common/TestCases/Posix/sanitizer_set_death_callback_test.cc b/compiler-rt/test/sanitizer_common/TestCases/Posix/sanitizer_set_death_callback_test.cc index ee8f822658f5f..9c5ae13cfd8b7 100644 --- a/compiler-rt/test/sanitizer_common/TestCases/Posix/sanitizer_set_death_callback_test.cc +++ b/compiler-rt/test/sanitizer_common/TestCases/Posix/sanitizer_set_death_callback_test.cc @@ -3,7 +3,7 @@ // REQUIRES: stable-runtime // XFAIL: ubsan -// FIXME(dliew): Make this test work on Darwin with LSan +// FIXME: On Darwin, LSAn detects the leak, but does not invoke the death_callback. // XFAIL: darwin && lsan #include diff --git a/compiler-rt/test/sanitizer_common/TestCases/Posix/weak_hook_test.cc b/compiler-rt/test/sanitizer_common/TestCases/Posix/weak_hook_test.cc index 9176a524dbe89..ba98f47b35e08 100644 --- a/compiler-rt/test/sanitizer_common/TestCases/Posix/weak_hook_test.cc +++ b/compiler-rt/test/sanitizer_common/TestCases/Posix/weak_hook_test.cc @@ -6,8 +6,11 @@ // XFAIL: lsan // XFAIL: ubsan -#include #include +#include +#if defined(_GNU_SOURCE) +#include // for bcmp +#endif bool seen_memcmp, seen_strncmp, seen_strncasecmp, seen_strcmp, seen_strcasecmp, seen_strstr, seen_strcasestr, seen_memmem; @@ -59,6 +62,12 @@ int main() { int_sink = memcmp(s1, s2, sizeof(s2)); assert(seen_memcmp); +#if (defined(__linux__) && !defined(__ANDROID__) && defined(_GNU_SOURCE)) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__) + seen_memcmp = false; + int_sink = bcmp(s1, s2, sizeof(s2)); + assert(seen_memcmp); +#endif + int_sink = strncmp(s1, s2, sizeof(s2)); assert(seen_strncmp); diff --git a/compiler-rt/test/sanitizer_common/TestCases/print-stack-trace.cc b/compiler-rt/test/sanitizer_common/TestCases/print-stack-trace.cc index fce8503663af8..e4b8ad2bb2c33 100644 --- a/compiler-rt/test/sanitizer_common/TestCases/print-stack-trace.cc +++ b/compiler-rt/test/sanitizer_common/TestCases/print-stack-trace.cc @@ -5,6 +5,9 @@ // UNSUPPORTED: darwin +// TODO(yln): temporary failing due to refactoring +// UNSUPPORTED: ubsan + #include static inline void FooBarBaz() { diff --git a/compiler-rt/test/sanitizer_common/TestCases/symbolize_stack.cc b/compiler-rt/test/sanitizer_common/TestCases/symbolize_stack.cc index 0a2786931af09..d6ec49b407f5d 100644 --- a/compiler-rt/test/sanitizer_common/TestCases/symbolize_stack.cc +++ b/compiler-rt/test/sanitizer_common/TestCases/symbolize_stack.cc @@ -2,8 +2,8 @@ // Test that symbolizer does not crash on frame with large function name. -// FIXME(dliew): Make this test work with the other sanitizers. -// XFAIL: darwin && (lsan || tsan || ubsan) +// On Darwin LSan reports a false positive +// XFAIL: darwin && lsan #include #include diff --git a/compiler-rt/test/sanitizer_common/Unit/lit.site.cfg.in b/compiler-rt/test/sanitizer_common/Unit/lit.site.cfg.in index c62e23c28803f..46855d9e85456 100644 --- a/compiler-rt/test/sanitizer_common/Unit/lit.site.cfg.in +++ b/compiler-rt/test/sanitizer_common/Unit/lit.site.cfg.in @@ -12,3 +12,6 @@ config.name = 'SanitizerCommon-Unit' config.test_exec_root = os.path.join("@COMPILER_RT_BINARY_DIR@", "lib", "sanitizer_common", "tests") config.test_source_root = config.test_exec_root + +if config.host_os == 'Darwin': + config.parallelism_group = config.darwin_sanitizer_parallelism_group_func diff --git a/compiler-rt/test/sanitizer_common/lit.common.cfg b/compiler-rt/test/sanitizer_common/lit.common.cfg index 75cc7b77e70e7..a9965f070f860 100644 --- a/compiler-rt/test/sanitizer_common/lit.common.cfg +++ b/compiler-rt/test/sanitizer_common/lit.common.cfg @@ -70,3 +70,6 @@ config.suffixes = ['.c', '.cc', '.cpp'] if config.host_os not in ['Linux', 'Darwin', 'NetBSD', 'FreeBSD']: config.unsupported = True + +if not config.parallelism_group: + config.parallelism_group = 'shadow-memory' diff --git a/compiler-rt/test/scudo/CMakeLists.txt b/compiler-rt/test/scudo/CMakeLists.txt index 513168b189d69..7e0702e9bf199 100644 --- a/compiler-rt/test/scudo/CMakeLists.txt +++ b/compiler-rt/test/scudo/CMakeLists.txt @@ -15,15 +15,7 @@ configure_lit_site_cfg( set(SCUDO_TEST_ARCH ${SCUDO_SUPPORTED_ARCH}) foreach(arch ${SCUDO_TEST_ARCH}) - if(ANDROID) - if (${arch} STREQUAL "i386") - set(SCUDO_TEST_TARGET_ARCH i686-android) - else() - set(SCUDO_TEST_TARGET_ARCH ${arch}-android) - endif() - else() - set(SCUDO_TEST_TARGET_ARCH ${arch}) - endif() + set(SCUDO_TEST_TARGET_ARCH ${arch}) string(TOLOWER "-${arch}" SCUDO_TEST_CONFIG_SUFFIX) get_test_cc_for_arch(${arch} SCUDO_TEST_TARGET_CC SCUDO_TEST_TARGET_CFLAGS) string(TOUPPER ${arch} ARCH_UPPER_CASE) @@ -35,6 +27,8 @@ foreach(arch ${SCUDO_TEST_ARCH}) list(APPEND SCUDO_TESTSUITES ${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_NAME}) endforeach() +add_subdirectory(standalone) + add_lit_testsuite(check-scudo "Running the Scudo Hardened Allocator tests" ${SCUDO_TESTSUITES} DEPENDS ${SCUDO_TEST_DEPS}) diff --git a/compiler-rt/test/scudo/standalone/CMakeLists.txt b/compiler-rt/test/scudo/standalone/CMakeLists.txt new file mode 100644 index 0000000000000..9d28d655aab26 --- /dev/null +++ b/compiler-rt/test/scudo/standalone/CMakeLists.txt @@ -0,0 +1,15 @@ +if(COMPILER_RT_INCLUDE_TESTS AND COMPILER_RT_HAS_SCUDO_STANDALONE) + configure_lit_site_cfg( + ${CMAKE_CURRENT_SOURCE_DIR}/unit/lit.site.cfg.in + ${CMAKE_CURRENT_BINARY_DIR}/unit/lit.site.cfg) + list(APPEND SCUDO_STANDALONE_TEST_DEPS ScudoUnitTests) + list(APPEND SCUDO_STANDALONE_TESTSUITES ${CMAKE_CURRENT_BINARY_DIR}/unit) +endif() + +add_lit_testsuite(check-scudo_standalone + "Running Scudo Standalone tests" + ${SCUDO_STANDALONE_TESTSUITES} + DEPENDS ${SCUDO_STANDALONE_TEST_DEPS}) + +set_target_properties(check-scudo_standalone + PROPERTIES FOLDER "Compiler-RT Tests") diff --git a/compiler-rt/test/scudo/standalone/unit/lit.site.cfg.in b/compiler-rt/test/scudo/standalone/unit/lit.site.cfg.in new file mode 100644 index 0000000000000..ef34739b807df --- /dev/null +++ b/compiler-rt/test/scudo/standalone/unit/lit.site.cfg.in @@ -0,0 +1,12 @@ +@LIT_SITE_CFG_IN_HEADER@ + +# Load common config for all compiler-rt unit tests. +lit_config.load_config(config, "@COMPILER_RT_BINARY_DIR@/unittests/lit.common.unit.configured") + +# Setup config name. +config.name = 'ScudoStandalone-Unit' + +# Setup test source and exec root. +# For unit tests, we define it as build directory with unit tests. +config.test_exec_root = "@COMPILER_RT_BINARY_DIR@/lib/scudo/standalone/tests" +config.test_source_root = config.test_exec_root diff --git a/compiler-rt/test/tsan/CMakeLists.txt b/compiler-rt/test/tsan/CMakeLists.txt index ba0fd9f23a33c..2dcf46eee4a81 100644 --- a/compiler-rt/test/tsan/CMakeLists.txt +++ b/compiler-rt/test/tsan/CMakeLists.txt @@ -8,6 +8,7 @@ if(NOT COMPILER_RT_STANDALONE_BUILD) list(APPEND TSAN_TEST_DEPS tsan) endif() if(COMPILER_RT_LIBCXX_PATH AND + COMPILER_RT_LIBCXXABI_PATH AND COMPILER_RT_TEST_COMPILER_ID STREQUAL "Clang" AND NOT APPLE AND NOT ANDROID) list(APPEND TSAN_TEST_DEPS libcxx_tsan) diff --git a/compiler-rt/test/tsan/Linux/check_memcpy.c b/compiler-rt/test/tsan/Linux/check_memcpy.c new file mode 100644 index 0000000000000..75dd7da8316ba --- /dev/null +++ b/compiler-rt/test/tsan/Linux/check_memcpy.c @@ -0,0 +1,17 @@ +// Test that verifies TSan runtime doesn't contain compiler-emitted +// memcpy/memmove calls. It builds the binary with TSan and check's +// its objdump. + +// RUN: %clang_tsan -O1 %s -o %t +// RUN: llvm-objdump -d %t | FileCheck %s + +// REQUIRES: compiler-rt-optimized + +int main() { + return 0; +} + +// CHECK-NOT: callq {{.*<(__interceptor_)?mem(cpy|set)>}} +// tail calls: +// CHECK-NOT: jmpq {{.*<(__interceptor_)?mem(cpy|set)>}} + diff --git a/compiler-rt/test/tsan/Linux/check_memcpy.cc b/compiler-rt/test/tsan/Linux/check_memcpy.cc deleted file mode 100644 index b81efa42ad522..0000000000000 --- a/compiler-rt/test/tsan/Linux/check_memcpy.cc +++ /dev/null @@ -1,17 +0,0 @@ -// Test that verifies TSan runtime doesn't contain compiler-emitted -// memcpy/memmove calls. It builds the binary with TSan and passes it to -// check_memcpy.sh script. - -// RUN: %clangxx_tsan -O1 %s -o %t -// RUN: llvm-objdump -d %t | FileCheck %s - -// REQUIRES: compiler-rt-optimized - -int main() { - return 0; -} - -// CHECK-NOT: callq {{.*<(__interceptor_)?mem(cpy|set)>}} -// tail calls: -// CHECK-NOT: jmpq {{.*<(__interceptor_)?mem(cpy|set)>}} - diff --git a/compiler-rt/test/tsan/dl_iterate_phdr.cc b/compiler-rt/test/tsan/dl_iterate_phdr.cc index 3c9821bf458a4..4a1fcc21c9cc8 100644 --- a/compiler-rt/test/tsan/dl_iterate_phdr.cc +++ b/compiler-rt/test/tsan/dl_iterate_phdr.cc @@ -1,5 +1,5 @@ // RUN: %clangxx_tsan -O1 %s -DBUILD_SO -fPIC -shared -o %t-so.so -// RUN: %clangxx_tsan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s +// RUN: %clangxx_tsan -O1 %s %link_libcxx_tsan -o %t && %run %t 2>&1 | FileCheck %s // dl_iterate_phdr doesn't exist on OS X. // UNSUPPORTED: darwin diff --git a/compiler-rt/test/tsan/dlclose.cc b/compiler-rt/test/tsan/dlclose.cc index d497fd704e4f1..6f0716d80c347 100644 --- a/compiler-rt/test/tsan/dlclose.cc +++ b/compiler-rt/test/tsan/dlclose.cc @@ -1,5 +1,5 @@ // RUN: %clangxx_tsan -O1 %s -DBUILD_SO -fPIC -shared -o %t-so.so -// RUN: %clangxx_tsan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s +// RUN: %clangxx_tsan -O1 %s %link_libcxx_tsan -o %t && %run %t 2>&1 | FileCheck %s // Test case for // https://github.com/google/sanitizers/issues/487 diff --git a/compiler-rt/test/tsan/fiber_asm.cc b/compiler-rt/test/tsan/fiber_asm.cc new file mode 100644 index 0000000000000..806c70cce72a7 --- /dev/null +++ b/compiler-rt/test/tsan/fiber_asm.cc @@ -0,0 +1,86 @@ +// RUN: %clang_tsan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s +// REQUIRES: x86_64-target-arch +// UNSUPPORTED: darwin +#include "test.h" + +struct ucontext { + void *sp; + void *fiber; +}; + +extern "C" { + void ucontext_do_switch(void **save, void **load); + void ucontext_trampoline(); +} + +__asm__(".global ucontext_do_switch\n" + "ucontext_do_switch:\n\t" + "pushq %rbp\n\t" + "pushq %r15\n\t" + "pushq %r14\n\t" + "pushq %r13\n\t" + "pushq %r12\n\t" + "pushq %rbx\n\t" + "movq %rsp, (%rdi)\n\t" + "movq (%rsi), %rsp\n\t" + "popq %rbx\n\t" + "popq %r12\n\t" + "popq %r13\n\t" + "popq %r14\n\t" + "popq %r15\n\t" + "popq %rbp\n\t" + "retq"); + +__asm__(".global ucontext_trampoline\n" + "ucontext_trampoline:\n\t" + ".cfi_startproc\n\t" + ".cfi_undefined rip\n\t" + "movq %r12, %rdi\n\t" + "jmpq *%rbx\n\t" + ".cfi_endproc"); + +void ucontext_init(ucontext *context, void *stack, unsigned stack_sz, + void (*func)(void*), void *arg) { + void **sp = reinterpret_cast(static_cast(stack) + stack_sz); + *(--sp) = 0; + *(--sp) = reinterpret_cast(ucontext_trampoline); + *(--sp) = 0; // rbp + *(--sp) = 0; // r15 + *(--sp) = 0; // r14 + *(--sp) = 0; // r13 + *(--sp) = arg; // r12 + *(--sp) = reinterpret_cast(func); // rbx + context->sp = sp; + context->fiber = __tsan_create_fiber(0); +} + +void ucontext_free(ucontext *context) { + __tsan_destroy_fiber(context->fiber); +} + +__attribute__((no_sanitize_thread)) +void ucontext_switch(ucontext *save, ucontext *load) { + save->fiber = __tsan_get_current_fiber(); + __tsan_switch_to_fiber(load->fiber, 0); + ucontext_do_switch(&save->sp, &load->sp); +} + +char stack[64 * 1024] __attribute__((aligned(16))); + +ucontext uc, orig_uc; + +void func(void *arg) { + __asm__ __volatile__(".cfi_undefined rip"); + ucontext_switch(&uc, &orig_uc); +} + +int main() { + ucontext_init(&uc, stack, sizeof(stack), func, 0); + ucontext_switch(&orig_uc, &uc); + ucontext_free(&uc); + fprintf(stderr, "PASS\n"); + return 0; +} + +// CHECK-NOT: WARNING: ThreadSanitizer: +// CHECK: PASS diff --git a/compiler-rt/test/tsan/fiber_from_thread.cc b/compiler-rt/test/tsan/fiber_from_thread.cc new file mode 100644 index 0000000000000..d8af1e8e7ea96 --- /dev/null +++ b/compiler-rt/test/tsan/fiber_from_thread.cc @@ -0,0 +1,48 @@ +// RUN: %clang_tsan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s +// UNSUPPORTED: darwin +#include "test.h" +#include + +char stack[64 * 1024] __attribute__((aligned(16))); + +ucontext_t uc, orig_uc1, orig_uc2; +void *fiber, *orig_fiber1, *orig_fiber2; + +int var; + +void *Thread(void *x) { + orig_fiber2 = __tsan_get_current_fiber(); + swapcontext(&orig_uc2, &orig_uc1); + return 0; +} + +void func() { + pthread_t t; + pthread_create(&t, 0, Thread, 0); + pthread_join(t, 0); + __tsan_switch_to_fiber(orig_fiber1, 0); + swapcontext(&uc, &orig_uc1); +} + +int main() { + orig_fiber1 = __tsan_get_current_fiber(); + fiber = __tsan_create_fiber(0); + getcontext(&uc); + uc.uc_stack.ss_sp = stack; + uc.uc_stack.ss_size = sizeof(stack); + uc.uc_link = 0; + makecontext(&uc, func, 0); + var = 1; + __tsan_switch_to_fiber(fiber, 0); + swapcontext(&orig_uc1, &uc); + var = 2; + __tsan_switch_to_fiber(orig_fiber2, 0); + swapcontext(&orig_uc1, &orig_uc2); + var = 3; + __tsan_destroy_fiber(fiber); + fprintf(stderr, "PASS\n"); + return 0; +} + +// CHECK-NOT: WARNING: ThreadSanitizer: +// CHECK: PASS diff --git a/compiler-rt/test/tsan/fiber_longjmp.cc b/compiler-rt/test/tsan/fiber_longjmp.cc new file mode 100644 index 0000000000000..27d776a788c36 --- /dev/null +++ b/compiler-rt/test/tsan/fiber_longjmp.cc @@ -0,0 +1,80 @@ +// RUN: %clang_tsan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s +// UNSUPPORTED: darwin +#include "test.h" +#include +#include + +char stack[64 * 1024] __attribute__((aligned(16))); + +sigjmp_buf jmpbuf, orig_jmpbuf[2]; +void *fiber, *orig_fiber[2]; + +const unsigned N = 1000; + +__attribute__((noinline)) +void switch0() { + if (!sigsetjmp(jmpbuf, 0)) { + __tsan_switch_to_fiber(orig_fiber[0], 0); + siglongjmp(orig_jmpbuf[0], 1); + } +} + +void func() { + if (!sigsetjmp(jmpbuf, 0)) { + __tsan_switch_to_fiber(orig_fiber[0], 0); + siglongjmp(orig_jmpbuf[0], 1); + } + for (;;) { + switch0(); + if (!sigsetjmp(jmpbuf, 0)) { + __tsan_switch_to_fiber(orig_fiber[1], 0); + siglongjmp(orig_jmpbuf[1], 1); + } + } +} + +void *Thread(void *x) { + orig_fiber[1] = __tsan_get_current_fiber(); + for (unsigned i = 0; i < N; i++) { + barrier_wait(&barrier); + if (!sigsetjmp(orig_jmpbuf[1], 0)) { + __tsan_switch_to_fiber(fiber, 0); + siglongjmp(jmpbuf, 1); + } + barrier_wait(&barrier); + } + return 0; +} + +int main() { + fiber = __tsan_create_fiber(0); + barrier_init(&barrier, 2); + pthread_t t; + pthread_create(&t, 0, Thread, 0); + orig_fiber[0] = __tsan_get_current_fiber(); + ucontext_t uc, orig_uc; + getcontext(&uc); + uc.uc_stack.ss_sp = stack; + uc.uc_stack.ss_size = sizeof(stack); + uc.uc_link = 0; + makecontext(&uc, func, 0); + if (!sigsetjmp(orig_jmpbuf[0], 0)) { + __tsan_switch_to_fiber(fiber, 0); + swapcontext(&orig_uc, &uc); + } + for (unsigned i = 0; i < N; i++) { + if (!sigsetjmp(orig_jmpbuf[0], 0)) { + __tsan_switch_to_fiber(fiber, 0); + siglongjmp(jmpbuf, 1); + } + barrier_wait(&barrier); + barrier_wait(&barrier); + } + pthread_join(t, 0); + __tsan_destroy_fiber(fiber); + fprintf(stderr, "PASS\n"); + return 0; +} + +// CHECK-NOT: WARNING: ThreadSanitizer: +// CHECK: PASS diff --git a/compiler-rt/test/tsan/fiber_race.cc b/compiler-rt/test/tsan/fiber_race.cc new file mode 100644 index 0000000000000..89bcdddd5c3dc --- /dev/null +++ b/compiler-rt/test/tsan/fiber_race.cc @@ -0,0 +1,36 @@ +// RUN: %clang_tsan -O1 %s -o %t && %deflake %run %t 2>&1 | FileCheck %s +// UNSUPPORTED: darwin +#include "test.h" +#include + +char stack[64 * 1024] __attribute__((aligned(16))); + +ucontext_t uc, orig_uc; +void *fiber, *orig_fiber; + +int var; + +void func() { + var = 1; + __tsan_switch_to_fiber(orig_fiber, __tsan_switch_to_fiber_no_sync); + swapcontext(&uc, &orig_uc); +} + +int main() { + orig_fiber = __tsan_get_current_fiber(); + fiber = __tsan_create_fiber(0); + getcontext(&uc); + uc.uc_stack.ss_sp = stack; + uc.uc_stack.ss_size = sizeof(stack); + uc.uc_link = 0; + makecontext(&uc, func, 0); + var = 2; + __tsan_switch_to_fiber(fiber, __tsan_switch_to_fiber_no_sync); + swapcontext(&orig_uc, &uc); + __tsan_destroy_fiber(fiber); + fprintf(stderr, "PASS\n"); + return 0; +} + +// CHECK: WARNING: ThreadSanitizer: data race +// CHECK: PASS diff --git a/compiler-rt/test/tsan/fiber_simple.cc b/compiler-rt/test/tsan/fiber_simple.cc new file mode 100644 index 0000000000000..ce529e7299d8e --- /dev/null +++ b/compiler-rt/test/tsan/fiber_simple.cc @@ -0,0 +1,36 @@ +// RUN: %clang_tsan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s +// UNSUPPORTED: darwin +#include "test.h" +#include + +char stack[64 * 1024] __attribute__((aligned(16))); + +ucontext_t uc, orig_uc; +void *fiber, *orig_fiber; + +int var; + +void func() { + var = 1; + __tsan_switch_to_fiber(orig_fiber, 0); + swapcontext(&uc, &orig_uc); +} + +int main() { + orig_fiber = __tsan_get_current_fiber(); + fiber = __tsan_create_fiber(0); + getcontext(&uc); + uc.uc_stack.ss_sp = stack; + uc.uc_stack.ss_size = sizeof(stack); + uc.uc_link = 0; + makecontext(&uc, func, 0); + var = 2; + __tsan_switch_to_fiber(fiber, 0); + swapcontext(&orig_uc, &uc); + __tsan_destroy_fiber(fiber); + fprintf(stderr, "PASS\n"); + return 0; +} + +// CHECK-NOT: WARNING: ThreadSanitizer: +// CHECK: PASS diff --git a/compiler-rt/test/tsan/fiber_two_threads.cc b/compiler-rt/test/tsan/fiber_two_threads.cc new file mode 100644 index 0000000000000..eaadb65acc1d7 --- /dev/null +++ b/compiler-rt/test/tsan/fiber_two_threads.cc @@ -0,0 +1,62 @@ +// RUN: %clang_tsan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s +// UNSUPPORTED: darwin +#include "test.h" +#include + +char stack[64 * 1024] __attribute__((aligned(16))); + +ucontext_t uc, orig_uc[2]; +void *fiber, *orig_fiber[2]; + +const unsigned N = 1000; + +__attribute__((noinline)) +void switch0() { + __tsan_switch_to_fiber(orig_fiber[0], 0); + swapcontext(&uc, &orig_uc[0]); +} + +void func() { + for (;;) { + switch0(); + __tsan_switch_to_fiber(orig_fiber[1], 0); + swapcontext(&uc, &orig_uc[1]); + } +} + +void *Thread(void *x) { + orig_fiber[1] = __tsan_get_current_fiber(); + for (unsigned i = 0; i < N; i++) { + barrier_wait(&barrier); + __tsan_switch_to_fiber(fiber, 0); + swapcontext(&orig_uc[1], &uc); + barrier_wait(&barrier); + } + return 0; +} + +int main() { + fiber = __tsan_create_fiber(0); + barrier_init(&barrier, 2); + pthread_t t; + pthread_create(&t, 0, Thread, 0); + orig_fiber[0] = __tsan_get_current_fiber(); + getcontext(&uc); + uc.uc_stack.ss_sp = stack; + uc.uc_stack.ss_size = sizeof(stack); + uc.uc_link = 0; + makecontext(&uc, func, 0); + for (unsigned i = 0; i < N; i++) { + __tsan_switch_to_fiber(fiber, 0); + swapcontext(&orig_uc[0], &uc); + barrier_wait(&barrier); + barrier_wait(&barrier); + } + pthread_join(t, 0); + __tsan_destroy_fiber(fiber); + fprintf(stderr, "PASS\n"); + return 0; +} + +// CHECK-NOT: WARNING: ThreadSanitizer: +// CHECK: PASS diff --git a/compiler-rt/test/tsan/ignore_lib0.cc b/compiler-rt/test/tsan/ignore_lib0.cc index 2b217f21ff561..1d375336b1c02 100644 --- a/compiler-rt/test/tsan/ignore_lib0.cc +++ b/compiler-rt/test/tsan/ignore_lib0.cc @@ -2,7 +2,7 @@ // RUN: mkdir %t-dir // RUN: %clangxx_tsan -O1 %s -DLIB -fPIC -fno-sanitize=thread -shared -o %t-dir/libignore_lib0.so -// RUN: %clangxx_tsan -O1 %s -L%t-dir -lignore_lib0 -o %t +// RUN: %clangxx_tsan -O1 %s -L%t-dir -lignore_lib0 %link_libcxx_tsan -o %t // RUN: echo running w/o suppressions: // RUN: env LD_LIBRARY_PATH=%t-dir${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} %deflake %run %t | FileCheck %s --check-prefix=CHECK-NOSUPP // RUN: echo running with suppressions: diff --git a/compiler-rt/test/tsan/ignore_lib1.cc b/compiler-rt/test/tsan/ignore_lib1.cc index 1660cf3e41f99..2a708eaab4015 100644 --- a/compiler-rt/test/tsan/ignore_lib1.cc +++ b/compiler-rt/test/tsan/ignore_lib1.cc @@ -2,7 +2,7 @@ // RUN: mkdir %t-dir // RUN: %clangxx_tsan -O1 %s -DLIB -fPIC -fno-sanitize=thread -shared -o %t-dir/libignore_lib1.so -// RUN: %clangxx_tsan -O1 %s -o %t-dir/executable +// RUN: %clangxx_tsan -O1 %s %link_libcxx_tsan -o %t-dir/executable // RUN: echo running w/o suppressions: // RUN: %deflake %run %t-dir/executable | FileCheck %s --check-prefix=CHECK-NOSUPP // RUN: echo running with suppressions: diff --git a/compiler-rt/test/tsan/ignore_lib2.cc b/compiler-rt/test/tsan/ignore_lib2.cc index e0dac56701223..05b7c2ed915a7 100644 --- a/compiler-rt/test/tsan/ignore_lib2.cc +++ b/compiler-rt/test/tsan/ignore_lib2.cc @@ -3,7 +3,7 @@ // RUN: %clangxx_tsan -O1 %s -DLIB -fPIC -fno-sanitize=thread -shared -o %t-dir/libignore_lib2_0.so // RUN: %clangxx_tsan -O1 %s -DLIB -fPIC -fno-sanitize=thread -shared -o %t-dir/libignore_lib2_1.so -// RUN: %clangxx_tsan -O1 %s -o %t-dir/executable +// RUN: %clangxx_tsan -O1 %s %link_libcxx_tsan -o %t-dir/executable // RUN: %env_tsan_opts=suppressions='%s.supp' %deflake %run %t-dir/executable | FileCheck %s // Tests that called_from_lib suppression matched against 2 libraries diff --git a/compiler-rt/test/tsan/ignore_lib3.cc b/compiler-rt/test/tsan/ignore_lib3.cc index a5af07fdd112e..b1a3940d03b61 100644 --- a/compiler-rt/test/tsan/ignore_lib3.cc +++ b/compiler-rt/test/tsan/ignore_lib3.cc @@ -2,7 +2,7 @@ // RUN: mkdir %t-dir // RUN: %clangxx_tsan -O1 %s -DLIB -fPIC -fno-sanitize=thread -shared -o %t-dir/libignore_lib3.so -// RUN: %clangxx_tsan -O1 %s -o %t-dir/executable +// RUN: %clangxx_tsan -O1 %s %link_libcxx_tsan -o %t-dir/executable // RUN: %env_tsan_opts=suppressions='%s.supp' %deflake %run %t-dir/executable | FileCheck %s // Tests that unloading of a library matched against called_from_lib suppression diff --git a/compiler-rt/test/tsan/ignore_lib4.cc b/compiler-rt/test/tsan/ignore_lib4.cc index da636ae3bf371..06241c7b89f30 100644 --- a/compiler-rt/test/tsan/ignore_lib4.cc +++ b/compiler-rt/test/tsan/ignore_lib4.cc @@ -2,7 +2,7 @@ // RUN: mkdir %t-dir // RUN: %clangxx_tsan -O1 %s -DLIB -fPIC -shared -o %t-dir/libignore_lib4.so -// RUN: %clangxx_tsan -O1 %s -o %t-dir/executable +// RUN: %clangxx_tsan -O1 %s %link_libcxx_tsan -o %t-dir/executable // RUN: echo "called_from_lib:libignore_lib4.so" > %t-dir/executable.supp // RUN: %env_tsan_opts=suppressions='%t-dir/executable.supp' %run %t-dir/executable 2>&1 | FileCheck %s diff --git a/compiler-rt/test/tsan/ignore_lib5.cc b/compiler-rt/test/tsan/ignore_lib5.cc index 43780daf7b68d..81a1840c95517 100644 --- a/compiler-rt/test/tsan/ignore_lib5.cc +++ b/compiler-rt/test/tsan/ignore_lib5.cc @@ -2,7 +2,7 @@ // RUN: mkdir %t-dir // RUN: %clangxx_tsan -O1 %s -DLIB -fPIC -fno-sanitize=thread -shared -o %t-dir/libignore_lib1.so -// RUN: %clangxx_tsan -O1 %s -o %t-dir/executable +// RUN: %clangxx_tsan -O1 %s %link_libcxx_tsan -o %t-dir/executable // RUN: echo running w/o suppressions: // RUN: %deflake %run %t-dir/executable | FileCheck %s --check-prefix=CHECK-NOSUPP // RUN: echo running with suppressions: diff --git a/compiler-rt/test/tsan/libcxx/std_shared_ptr.cc b/compiler-rt/test/tsan/libcxx/std_shared_ptr.cc index 191a17cc798dd..e8e168a682fa9 100644 --- a/compiler-rt/test/tsan/libcxx/std_shared_ptr.cc +++ b/compiler-rt/test/tsan/libcxx/std_shared_ptr.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_tsan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s +// RUN: %clangxx_tsan -O1 %s %link_libcxx_tsan -o %t && %run %t 2>&1 | FileCheck %s #include #include #include diff --git a/compiler-rt/test/tsan/lit.cfg b/compiler-rt/test/tsan/lit.cfg index 233d273f3130a..50c8a5eea02db 100644 --- a/compiler-rt/test/tsan/lit.cfg +++ b/compiler-rt/test/tsan/lit.cfg @@ -38,7 +38,7 @@ config.substitutions.append(('%env_tsan_opts=', # GCC driver doesn't add necessary compile/link flags with -fsanitize=thread. if config.compiler_id == 'GNU': - extra_cflags = ["-fPIE", "-pthread", "-ldl", "-lstdc++", "-lrt", "-pie"] + extra_cflags = ["-fPIE", "-pthread", "-ldl", "-lrt", "-pie"] else: extra_cflags = [] @@ -59,11 +59,12 @@ if config.has_libcxx and config.host_os != 'Darwin': "tsan", "libcxx_tsan_%s" % config.target_arch) libcxx_incdir = os.path.join(libcxx_path, "include", "c++", "v1") libcxx_libdir = os.path.join(libcxx_path, "lib") - libcxx_so = os.path.join(libcxx_libdir, "libc++.so") + libcxx_a = os.path.join(libcxx_libdir, "libc++.a") clang_tsan_cxxflags += ["-nostdinc++", - "-I%s" % libcxx_incdir, - libcxx_so, - "-Wl,-rpath=%s" % libcxx_libdir] + "-I%s" % libcxx_incdir] + config.substitutions.append( ("%link_libcxx_tsan", libcxx_a) ) +else: + config.substitutions.append( ("%link_libcxx_tsan", "") ) def build_invocation(compile_flags): return " " + " ".join([config.clang] + compile_flags) + " " @@ -85,8 +86,5 @@ if config.host_os not in ['FreeBSD', 'Linux', 'Darwin', 'NetBSD']: if config.android: config.unsupported = True -if config.host_os == 'Darwin': - if config.target_arch in ["x86_64", "x86_64h"]: - config.parallelism_group = "darwin-64bit-sanitizer" - elif config.apple_platform != "osx" and not config.apple_platform.endswith("sim"): - config.parallelism_group = "darwin-ios-device-sanitizer" +if not config.parallelism_group: + config.parallelism_group = 'shadow-memory' diff --git a/compiler-rt/test/tsan/load_shared_lib.cc b/compiler-rt/test/tsan/load_shared_lib.cc index f02280895f836..a8939be4ceef0 100644 --- a/compiler-rt/test/tsan/load_shared_lib.cc +++ b/compiler-rt/test/tsan/load_shared_lib.cc @@ -3,7 +3,7 @@ // symbolized correctly. // RUN: %clangxx_tsan -O1 %s -DBUILD_SO -fPIC -shared -o %t-so.so -// RUN: %clangxx_tsan -O1 %s -o %t -rdynamic && %deflake %run %t | FileCheck %s +// RUN: %clangxx_tsan -O1 %s %link_libcxx_tsan -o %t -rdynamic && %deflake %run %t | FileCheck %s #ifdef BUILD_SO diff --git a/compiler-rt/test/tsan/real_deadlock_detector_stress_test.cc b/compiler-rt/test/tsan/real_deadlock_detector_stress_test.cc index feb1117e80abd..8106ab87222ed 100644 --- a/compiler-rt/test/tsan/real_deadlock_detector_stress_test.cc +++ b/compiler-rt/test/tsan/real_deadlock_detector_stress_test.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_tsan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s +// RUN: %clangxx_tsan -O1 %s %link_libcxx_tsan -o %t && %run %t 2>&1 | FileCheck %s #include #include diff --git a/compiler-rt/test/tsan/static_init6.cc b/compiler-rt/test/tsan/static_init6.cc index 06215ced3c76e..b334981e85b00 100644 --- a/compiler-rt/test/tsan/static_init6.cc +++ b/compiler-rt/test/tsan/static_init6.cc @@ -1,5 +1,4 @@ -// RUN: %clangxx_tsan %linux_static_libstdcplusplus -O1 %s -o %t && %run %t 2>&1 \ -// RUN: | FileCheck %s +// RUN: %clangxx_tsan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s #include #include #include diff --git a/compiler-rt/test/tsan/thread_exit.c b/compiler-rt/test/tsan/thread_exit.c new file mode 100644 index 0000000000000..7038baa4368d5 --- /dev/null +++ b/compiler-rt/test/tsan/thread_exit.c @@ -0,0 +1,29 @@ +// RUN: %clang_tsan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s + +// Crashes on powerpc64be +// UNSUPPORTED: powerpc64 + +#include "test.h" + +int var; + +void *Thread(void *x) { + pthread_exit(&var); + return 0; +} + +int main() { + pthread_t t; + pthread_create(&t, 0, Thread, 0); + void *retval = 0; + pthread_join(t, &retval); + if (retval != &var) { + fprintf(stderr, "Unexpected return value\n"); + exit(1); + } + fprintf(stderr, "PASS\n"); + return 0; +} + +// CHECK-NOT: WARNING: ThreadSanitizer: +// CHECK: PASS diff --git a/compiler-rt/test/ubsan/lit.common.cfg b/compiler-rt/test/ubsan/lit.common.cfg index 9a7a8900e3427..e20832bd655fe 100644 --- a/compiler-rt/test/ubsan/lit.common.cfg +++ b/compiler-rt/test/ubsan/lit.common.cfg @@ -74,8 +74,3 @@ if config.host_os not in ['Linux', 'Darwin', 'FreeBSD', 'Windows', 'NetBSD', 'Su config.available_features.add('arch=' + config.target_arch) config.excludes = ['Inputs'] - -# Limit parallelism if necessary -if config.host_os == 'Darwin': - if config.apple_platform != "osx" and not config.apple_platform.endswith("sim"): - config.parallelism_group = "darwin-ios-device-sanitizer" diff --git a/compiler-rt/unittests/lit.common.unit.cfg b/compiler-rt/unittests/lit.common.unit.cfg index 31206e913bf9b..fba034ae4fce2 100644 --- a/compiler-rt/unittests/lit.common.unit.cfg +++ b/compiler-rt/unittests/lit.common.unit.cfg @@ -30,10 +30,10 @@ if 'TEMP' in os.environ: config.environment['TEMP'] = os.environ['TEMP'] if config.host_os == 'Darwin': - # Only run up to 3 64-bit sanitized processes simultaneously on Darwin. - # Using more scales badly and hogs the system due to inefficient handling - # of large mmap'd regions (terabytes) by the kernel. - lit_config.parallelism_groups["darwin-64bit-sanitizer"] = 3 + # Only run up to 3 processes that require shadow memory simultaneously on + # 64-bit Darwin. Using more scales badly and hogs the system due to + # inefficient handling of large mmap'd regions (terabytes) by the kernel. + lit_config.parallelism_groups["shadow-memory"] = 3 # The test config gets pickled and sent to multiprocessing workers, and that # only works for code if it is stored at the top level of some module. diff --git a/compiler-rt/unittests/lit_unittest_cfg_utils.py b/compiler-rt/unittests/lit_unittest_cfg_utils.py index ff7b1ee0140b4..721e81b9d600c 100644 --- a/compiler-rt/unittests/lit_unittest_cfg_utils.py +++ b/compiler-rt/unittests/lit_unittest_cfg_utils.py @@ -1,4 +1,4 @@ -# Put all 64-bit sanitizer tests in the darwin-64bit-sanitizer parallelism -# group. This will only run three of them concurrently. +# Put all 64-bit tests in the shadow-memory parallelism group. We throttle those +# in our common lit config (lit.common.unit.cfg). def darwin_sanitizer_parallelism_group_func(test): - return "darwin-64bit-sanitizer" if "x86_64" in test.file_path else "" + return "shadow-memory" if "x86_64" in test.file_path else None diff --git a/compiler-rt/utils/generate_netbsd_ioctls.awk b/compiler-rt/utils/generate_netbsd_ioctls.awk index dbd97869581b4..4ae6015f08d98 100755 --- a/compiler-rt/utils/generate_netbsd_ioctls.awk +++ b/compiler-rt/utils/generate_netbsd_ioctls.awk @@ -151,7 +151,6 @@ FNR == 1 { $0 ~ /JOY_GET_X_OFFSET/ || $0 ~ /CHIOGPICKER/ || $0 ~ /SLIOCGUNIT/ || - $0 ~ /SATIOSBUFSIZE/ || $0 ~ /TUNSLMODE/ || $0 ~ /CBQ_IF_ATTACH/ || $0 ~ /CDNR_IF_ATTACH/ || diff --git a/libcxx/CMakeLists.txt b/libcxx/CMakeLists.txt index 9e27ba41e9925..5920cfda09cf4 100644 --- a/libcxx/CMakeLists.txt +++ b/libcxx/CMakeLists.txt @@ -23,7 +23,7 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ) -if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) +if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR OR LIBCXX_STANDALONE_BUILD) project(libcxx CXX C) set(PACKAGE_NAME libcxx) @@ -224,6 +224,7 @@ option(LIBCXXABI_ENABLE_STATIC_UNWINDER "Statically link the LLVM unwinder." OFF # Target options -------------------------------------------------------------- option(LIBCXX_BUILD_32_BITS "Build 32 bit libc++." ${LLVM_BUILD_32_BITS}) +set(LIBCXX_TARGET_TRIPLE "" CACHE STRING "Use alternate target triple.") set(LIBCXX_SYSROOT "" CACHE STRING "Use alternate sysroot.") set(LIBCXX_GCC_TOOLCHAIN "" CACHE STRING "Use alternate GCC toolchain.") @@ -460,20 +461,30 @@ include(HandleLibcxxFlags) # 'config-ix' use them during feature checks. It also adds them to both # 'LIBCXX_COMPILE_FLAGS' and 'LIBCXX_LINK_FLAGS' add_target_flags_if(LIBCXX_BUILD_32_BITS "-m32") -add_target_flags_if(LIBCXX_TARGET_TRIPLE "--target=${LIBCXX_TARGET_TRIPLE}") -add_target_flags_if(LIBCXX_SYSROOT "--sysroot=${LIBCXX_SYSROOT}") -add_target_flags_if(LIBCXX_GCC_TOOLCHAIN "--gcc-toolchain=${LIBCXX_GCC_TOOLCHAIN}") -if (LIBCXX_TARGET_TRIPLE) + +if(LIBCXX_TARGET_TRIPLE) + add_target_flags("--target=${LIBCXX_TARGET_TRIPLE}") +elseif(CMAKE_CXX_COMPILER_TARGET) + set(LIBCXX_TARGET_TRIPLE "${CMAKE_CXX_COMPILER_TARGET}") +endif() +if(LIBCXX_SYSROOT) + add_target_flags("--sysroot=${LIBCXX_SYSROOT}") +elseif(CMAKE_SYSROOT) + set(LIBCXX_SYSROOT "${CMAKE_SYSROOT}") +endif() +if(LIBCXX_GCC_TOOLCHAIN) + add_target_flags("--gcc-toolchain=${LIBCXX_GCC_TOOLCHAIN}") +elseif(CMAKE_CXX_COMPILER_EXTERNAL_TOOLCHAIN) + set(LIBCXX_GCC_TOOLCHAIN "${CMAKE_CXX_COMPILER_EXTERNAL_TOOLCHAIN}") +endif() + +if(LIBCXX_TARGET_TRIPLE) set(TARGET_TRIPLE "${LIBCXX_TARGET_TRIPLE}") endif() # Configure compiler. include(config-ix) -if (LIBCXX_USE_COMPILER_RT) - list(APPEND LIBCXX_LINK_FLAGS "-rtlib=compiler-rt") -endif() - # Configure coverage options. if (LIBCXX_GENERATE_COVERAGE) include(CodeCoverage) @@ -511,11 +522,12 @@ remove_flags("/D_DEBUG" "/MTd" "/MDd" "/MT" "/Md") remove_flags(-Wno-pedantic -pedantic-errors -pedantic) # Required flags ============================================================== -set(LIBCXX_STANDARD_VER c++11 CACHE INTERNAL "internal option to change build dialect") if (LIBCXX_HAS_MUSL_LIBC OR LIBCXX_TARGETING_CLANG_CL) # musl's pthread implementations uses volatile types in their structs which is # not a constexpr in C++11 but is in C++14, so we use C++14 with musl. - set(LIBCXX_STANDARD_VER c++14 CACHE INTERNAL "internal option to change build dialect") + set(LIBCXX_STANDARD_VER c++14 CACHE STRING "internal option to change build dialect") +else() + set(LIBCXX_STANDARD_VER c++11 CACHE STRING "internal option to change build dialect") endif() add_compile_flags_if_supported(-std=${LIBCXX_STANDARD_VER}) add_compile_flags_if_supported("/std:${LIBCXX_STANDARD_VER}") diff --git a/libcxx/cmake/Modules/CheckLibcxxAtomic.cmake b/libcxx/cmake/Modules/CheckLibcxxAtomic.cmake index 98862d42397b6..1e6e5e6376620 100644 --- a/libcxx/cmake/Modules/CheckLibcxxAtomic.cmake +++ b/libcxx/cmake/Modules/CheckLibcxxAtomic.cmake @@ -24,7 +24,7 @@ function(check_cxx_atomics varname) #include std::atomic x; std::atomic y; -int main() { +int main(int, char**) { return x + y; } " ${varname}) diff --git a/libcxx/cmake/Modules/HandleLibCXXABI.cmake b/libcxx/cmake/Modules/HandleLibCXXABI.cmake index 1c19d7e01af77..89f2e97d8b165 100644 --- a/libcxx/cmake/Modules/HandleLibCXXABI.cmake +++ b/libcxx/cmake/Modules/HandleLibCXXABI.cmake @@ -98,7 +98,7 @@ if ("${LIBCXX_CXX_ABI_LIBNAME}" STREQUAL "libstdc++" OR elseif ("${LIBCXX_CXX_ABI_LIBNAME}" STREQUAL "libcxxabi") if (LIBCXX_CXX_ABI_INTREE) # Link against just-built "cxxabi" target. - if (LIBCXX_STATICALLY_LINK_ABI_IN_SHARED_LIBRARY) + if (LIBCXX_ENABLE_STATIC_ABI_LIBRARY) set(CXXABI_LIBNAME cxxabi_static) else() set(CXXABI_LIBNAME cxxabi_shared) diff --git a/libcxx/docs/DesignDocs/AvailabilityMarkup.rst b/libcxx/docs/DesignDocs/AvailabilityMarkup.rst index 4e6d80b50bf82..f076dfecdaaa6 100644 --- a/libcxx/docs/DesignDocs/AvailabilityMarkup.rst +++ b/libcxx/docs/DesignDocs/AvailabilityMarkup.rst @@ -51,6 +51,12 @@ or on a particular symbol: _LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_SIZED_NEW_DELETE void operator delete(void* __p, std::size_t __sz) _NOEXCEPT; +Furthermore, a lit feature should be added to match that availability macro, +so that tests depending on that feature can be marked to XFAIL if the feature +is not supported. This way, the test suite will work on platforms that have +not shipped the feature yet. This can be done by adding the appropriate lit +feature in test/config.py. + Testing ======= diff --git a/libcxx/docs/DesignDocs/DebugMode.rst b/libcxx/docs/DesignDocs/DebugMode.rst index 3b997d4460701..1ce438d5316ce 100644 --- a/libcxx/docs/DesignDocs/DebugMode.rst +++ b/libcxx/docs/DesignDocs/DebugMode.rst @@ -53,7 +53,7 @@ assertion handler as follows: #define _LIBCPP_DEBUG 1 #include - int main() { + int main(int, char**) { std::__libcpp_debug_function = std::__libcpp_throw_debug_function; try { std::string::iterator bad_it; diff --git a/libcxx/docs/DesignDocs/FileTimeType.rst b/libcxx/docs/DesignDocs/FileTimeType.rst index 488ff174b341d..f1e9edd87354a 100644 --- a/libcxx/docs/DesignDocs/FileTimeType.rst +++ b/libcxx/docs/DesignDocs/FileTimeType.rst @@ -119,7 +119,7 @@ to throw in cases where the user was confident the call should succeed. (See bel set_file_times("/tmp/foo", new_times); // OK, supported by most FSes } - int main() { + int main(int, char**) { path p = "/tmp/foo"; file_status st = status(p); if (!exists(st) || !is_regular_file(st)) @@ -128,6 +128,7 @@ to throw in cases where the user was confident the call should succeed. (See bel return 1; // It seems reasonable to assume this call should succeed. file_time_type tp = last_write_time(p); // BAD! Throws value_too_large. + return 0; } diff --git a/libcxx/docs/TestingLibcxx.rst b/libcxx/docs/TestingLibcxx.rst index ebbbf628ac047..d8060fed1f1f5 100644 --- a/libcxx/docs/TestingLibcxx.rst +++ b/libcxx/docs/TestingLibcxx.rst @@ -183,6 +183,14 @@ configuration. Passing the option on the command line will override the default. option is specified or the environment variable LIBCXX_COLOR_DIAGNOSTICS is present then color diagnostics will be enabled. +.. option:: llvm_unwinder + + Enable the use of LLVM unwinder instead of libgcc. + +.. option:: builtins_library + + Path to the builtins library to use instead of libgcc. + Environment Variables --------------------- diff --git a/libcxx/include/CMakeLists.txt b/libcxx/include/CMakeLists.txt index 73f7cfc4d8e38..3bd09b3299ab5 100644 --- a/libcxx/include/CMakeLists.txt +++ b/libcxx/include/CMakeLists.txt @@ -95,6 +95,7 @@ set(files ext/__hash ext/hash_map ext/hash_set + fenv.h filesystem float.h forward_list diff --git a/libcxx/include/__config b/libcxx/include/__config index 3ca6615169765..56b2276745bc4 100644 --- a/libcxx/include/__config +++ b/libcxx/include/__config @@ -38,6 +38,10 @@ # define _LIBCPP_ABI_VERSION 1 #endif +#ifndef __STDC_HOSTED__ +# define _LIBCPP_FREESTANDING +#endif + #ifndef _LIBCPP_STD_VER # if __cplusplus <= 201103L # define _LIBCPP_STD_VER 11 @@ -200,6 +204,10 @@ # endif #endif +#if defined(_LIBCPP_ABI_MICROSOFT) && !defined(_LIBCPP_NO_VCRUNTIME) +# define _LIBCPP_ABI_VCRUNTIME +#endif + // Need to detect which libc we're using if we're on Linux. #if defined(__linux__) # include @@ -910,9 +918,9 @@ template struct __static_assert_check {}; #endif #ifdef __GNUC__ -# define _NOALIAS __attribute__((__malloc__)) +# define _LIBCPP_NOALIAS __attribute__((__malloc__)) #else -# define _NOALIAS +# define _LIBCPP_NOALIAS #endif #if __has_feature(cxx_explicit_conversions) || defined(__IBMCPP__) || \ @@ -985,15 +993,11 @@ template struct __static_assert_check {}; #define _DECLARE_C99_LDBL_MATH 1 #endif -#if defined(_LIBCPP_ABI_MICROSOFT) && !defined(_LIBCPP_NO_VCRUNTIME) -# define _LIBCPP_DEFER_NEW_TO_VCRUNTIME -#endif - // If we are getting operator new from the MSVC CRT, then allocation overloads // for align_val_t were added in 19.12, aka VS 2017 version 15.3. #if defined(_LIBCPP_MSVCRT) && defined(_MSC_VER) && _MSC_VER < 1912 # define _LIBCPP_HAS_NO_LIBRARY_ALIGNED_ALLOCATION -#elif defined(_LIBCPP_DEFER_NEW_TO_VCRUNTIME) && !defined(__cpp_aligned_new) +#elif defined(_LIBCPP_ABI_VCRUNTIME) && !defined(__cpp_aligned_new) // We're defering to Microsoft's STL to provide aligned new et al. We don't // have it unless the language feature test macro is defined. # define _LIBCPP_HAS_NO_LIBRARY_ALIGNED_ALLOCATION @@ -1220,9 +1224,18 @@ _LIBCPP_FUNC_VIS extern "C" void __sanitizer_annotate_contiguous_container( # define _LIBCPP_HAS_GCC_ATOMIC_IMP #endif -#if (!defined(_LIBCPP_HAS_C_ATOMIC_IMP) && !defined(_LIBCPP_HAS_GCC_ATOMIC_IMP)) \ +#if (!defined(_LIBCPP_HAS_C_ATOMIC_IMP) && \ + !defined(_LIBCPP_HAS_GCC_ATOMIC_IMP) && \ + !defined(_LIBCPP_HAS_EXTERNAL_ATOMIC_IMP)) \ || defined(_LIBCPP_HAS_NO_THREADS) -#define _LIBCPP_HAS_NO_ATOMIC_HEADER +# define _LIBCPP_HAS_NO_ATOMIC_HEADER +#else +# ifndef _LIBCPP_ATOMIC_FLAG_TYPE +# define _LIBCPP_ATOMIC_FLAG_TYPE bool +# endif +# ifdef _LIBCPP_FREESTANDING +# define _LIBCPP_ATOMIC_ONLY_USE_BUILTINS +# endif #endif #ifndef _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK diff --git a/libcxx/include/__debug b/libcxx/include/__debug index 6ccb72cb8ad0e..281cf6675c9bc 100644 --- a/libcxx/include/__debug +++ b/libcxx/include/__debug @@ -250,16 +250,22 @@ public: __db_c_const_iterator __c_end() const; __db_i_const_iterator __i_end() const; + typedef __c_node*(_InsertConstruct)(void*, void*, __c_node*); + + template + _LIBCPP_INLINE_VISIBILITY static __c_node* __create_C_node(void *__mem, void *__c, __c_node *__next) { + return ::new(__mem) _C_node<_Cont>(__c, __next); + } + template _LIBCPP_INLINE_VISIBILITY void __insert_c(_Cont* __c) { - __c_node* __n = __insert_c(static_cast(__c)); - ::new(__n) _C_node<_Cont>(__n->__c_, __n->__next_); + __insert_c(static_cast(__c), &__create_C_node<_Cont>); } void __insert_i(void* __i); - __c_node* __insert_c(void* __c); + void __insert_c(void* __c, _InsertConstruct* __fn); void __erase_c(void* __c); void __insert_ic(void* __i, const void* __c); diff --git a/libcxx/include/__hash_table b/libcxx/include/__hash_table index f6b789dc75a2f..4409d6dc564ba 100644 --- a/libcxx/include/__hash_table +++ b/libcxx/include/__hash_table @@ -2371,6 +2371,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_handle_merge_multi( template void __hash_table<_Tp, _Hash, _Equal, _Alloc>::rehash(size_type __n) +_LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK { if (__n == 1) __n = 2; diff --git a/libcxx/include/__locale b/libcxx/include/__locale index d1d66f94d0d75..0a275c07a9abc 100644 --- a/libcxx/include/__locale +++ b/libcxx/include/__locale @@ -1229,8 +1229,6 @@ _LIBCPP_EXTERN_TEMPLATE2(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS codecvt_byname) _LIBCPP_EXTERN_TEMPLATE2(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS codecvt_byname) -_LIBCPP_NORETURN _LIBCPP_FUNC_VIS void __throw_runtime_error(const char*); - template struct __narrow_to_utf8 { diff --git a/libcxx/include/__node_handle b/libcxx/include/__node_handle index 7f3bd9da88bc8..e543fa9b20fd6 100644 --- a/libcxx/include/__node_handle +++ b/libcxx/include/__node_handle @@ -193,8 +193,7 @@ using __map_node_handle = __basic_node_handle< _NodeType, _Alloc, __map_node_handle_specifics>; template -_LIBCPP_TEMPLATE_VIS -struct __insert_return_type +struct _LIBCPP_TEMPLATE_VIS __insert_return_type { _Iterator position; bool inserted; diff --git a/libcxx/include/algorithm b/libcxx/include/algorithm index b52d445225b99..7da753a490d57 100644 --- a/libcxx/include/algorithm +++ b/libcxx/include/algorithm @@ -1610,6 +1610,18 @@ __unwrap_iter(__wrap_iter<_Tp*> __i) return __i.base(); } +template +inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_IF_NODEBUG +typename enable_if +< + is_trivially_copy_assignable<_Tp>::value, + const _Tp* +>::type +__unwrap_iter(__wrap_iter __i) +{ + return __i.base(); +} + #else template diff --git a/libcxx/include/atomic b/libcxx/include/atomic index 60057f1ebe331..e34b8678671b5 100644 --- a/libcxx/include/atomic +++ b/libcxx/include/atomic @@ -20,17 +20,24 @@ namespace std #define __cpp_lib_atomic_is_always_lock_free // as specified by SG10 -// order and consistency - -typedef enum memory_order -{ - memory_order_relaxed, - memory_order_consume, // load-consume - memory_order_acquire, // load-acquire - memory_order_release, // store-release - memory_order_acq_rel, // store-release load-acquire - memory_order_seq_cst // store-release load-acquire -} memory_order; + // order and consistency + + enum memory_order: unspecified // enum class in C++20 + { + relaxed, + consume, // load-consume + acquire, // load-acquire + release, // store-release + acq_rel, // store-release load-acquire + seq_cst // store-release load-acquire + }; + + inline constexpr auto memory_order_relaxed = memory_order::relaxed; + inline constexpr auto memory_order_consume = memory_order::consume; + inline constexpr auto memory_order_acquire = memory_order::acquire; + inline constexpr auto memory_order_release = memory_order::release; + inline constexpr auto memory_order_acq_rel = memory_order::acq_rel; + inline constexpr auto memory_order_seq_cst = memory_order::seq_cst; template T kill_dependency(T y) noexcept; @@ -550,13 +557,13 @@ void atomic_signal_fence(memory_order m) noexcept; #endif #ifdef _LIBCPP_HAS_NO_THREADS -#error is not supported on this single threaded system +# error is not supported on this single threaded system #endif -#if !defined(_LIBCPP_HAS_C_ATOMIC_IMP) && !defined(_LIBCPP_HAS_GCC_ATOMIC_IMP) -#error is not implemented +#ifdef _LIBCPP_HAS_NO_ATOMIC_HEADER +# error is not implemented #endif #ifdef kill_dependency -#error C++ standard library is incompatible with +# error C++ standard library is incompatible with #endif #define _LIBCPP_CHECK_STORE_MEMORY_ORDER(__m) \ @@ -577,49 +584,77 @@ void atomic_signal_fence(memory_order m) noexcept; _LIBCPP_BEGIN_NAMESPACE_STD -typedef enum memory_order -{ - memory_order_relaxed, memory_order_consume, memory_order_acquire, - memory_order_release, memory_order_acq_rel, memory_order_seq_cst +#if _LIBCPP_STD_VER > 17 + +enum class memory_order: unsigned { + relaxed, consume, acquire, release, acq_rel, seq_cst +}; + +inline constexpr auto memory_order_relaxed = memory_order::relaxed; +inline constexpr auto memory_order_consume = memory_order::consume; +inline constexpr auto memory_order_acquire = memory_order::acquire; +inline constexpr auto memory_order_release = memory_order::release; +inline constexpr auto memory_order_acq_rel = memory_order::acq_rel; +inline constexpr auto memory_order_seq_cst = memory_order::seq_cst; + +static_assert((is_same::type, + unsigned>::value), "Underlying type differs from unsigned unexpectedly"); + +#else + +typedef enum memory_order { + memory_order_relaxed, memory_order_consume, memory_order_acquire, + memory_order_release, memory_order_acq_rel, memory_order_seq_cst } memory_order; -#if defined(_LIBCPP_HAS_GCC_ATOMIC_IMP) -namespace __gcc_atomic { -template -struct __gcc_atomic_t { +static_assert((is_same::type, + unsigned>::value), "Underlying type differs from unsigned unexpectedly"); + +#endif // _LIBCPP_STD_VER > 17 + +typedef underlying_type::type __memory_order_underlying_t; // unsigned + + +#if defined(_LIBCPP_HAS_GCC_ATOMIC_IMP) || \ + defined(_LIBCPP_ATOMIC_ONLY_USE_BUILTINS) + +// [atomics.types.generic]p1 guarantees _Tp is trivially copyable. Because +// the default operator= in an object is not volatile, a byte-by-byte copy +// is required. +template _LIBCPP_INLINE_VISIBILITY +typename enable_if::value>::type +__cxx_atomic_assign_volatile(_Tp& __a_value, _Tv const& __val) { + __a_value = __val; +} +template _LIBCPP_INLINE_VISIBILITY +typename enable_if::value>::type +__cxx_atomic_assign_volatile(_Tp volatile& __a_value, _Tv volatile const& __val) { + volatile char* __to = reinterpret_cast(&__a_value); + volatile char* __end = __to + sizeof(_Tp); + volatile const char* __from = reinterpret_cast(&__val); + while (__to != __end) + *__to++ = *__from++; +} -#if _GNUC_VER >= 501 - static_assert(is_trivially_copyable<_Tp>::value, - "std::atomic requires that 'Tp' be a trivially copyable type"); #endif +#if defined(_LIBCPP_HAS_GCC_ATOMIC_IMP) + +template +struct __cxx_atomic_base_impl { + _LIBCPP_INLINE_VISIBILITY #ifndef _LIBCPP_CXX03_LANG - __gcc_atomic_t() _NOEXCEPT = default; + __cxx_atomic_base_impl() _NOEXCEPT = default; #else - __gcc_atomic_t() _NOEXCEPT : __a_value() {} + __cxx_atomic_base_impl() _NOEXCEPT : __a_value() {} #endif // _LIBCPP_CXX03_LANG - _LIBCPP_CONSTEXPR explicit __gcc_atomic_t(_Tp value) _NOEXCEPT + _LIBCPP_CONSTEXPR explicit __cxx_atomic_base_impl(_Tp value) _NOEXCEPT : __a_value(value) {} _Tp __a_value; }; -#define _Atomic(x) __gcc_atomic::__gcc_atomic_t - -template _Tp __create(); - -template -typename enable_if__a_value = __create<_Td>()), char>::type - __test_atomic_assignable(int); -template -__two __test_atomic_assignable(...); - -template -struct __can_assign { - static const bool value = - sizeof(__test_atomic_assignable<_Tp, _Td>(1)) == sizeof(char); -}; -static inline _LIBCPP_CONSTEXPR int __to_gcc_order(memory_order __order) { +_LIBCPP_INLINE_VISIBILITY inline _LIBCPP_CONSTEXPR int __to_gcc_order(memory_order __order) { // Avoid switch statement to make this a constexpr. return __order == memory_order_relaxed ? __ATOMIC_RELAXED: (__order == memory_order_acquire ? __ATOMIC_ACQUIRE: @@ -629,7 +664,7 @@ static inline _LIBCPP_CONSTEXPR int __to_gcc_order(memory_order __order) { __ATOMIC_CONSUME)))); } -static inline _LIBCPP_CONSTEXPR int __to_gcc_failure_order(memory_order __order) { +_LIBCPP_INLINE_VISIBILITY inline _LIBCPP_CONSTEXPR int __to_gcc_failure_order(memory_order __order) { // Avoid switch statement to make this a constexpr. return __order == memory_order_relaxed ? __ATOMIC_RELAXED: (__order == memory_order_acquire ? __ATOMIC_ACQUIRE: @@ -639,133 +674,125 @@ static inline _LIBCPP_CONSTEXPR int __to_gcc_failure_order(memory_order __order) __ATOMIC_CONSUME)))); } -} // namespace __gcc_atomic - -template -static inline -typename enable_if< - __gcc_atomic::__can_assign::value>::type -__c11_atomic_init(volatile _Atomic(_Tp)* __a, _Tp __val) { - __a->__a_value = __val; -} - template -static inline -typename enable_if< - !__gcc_atomic::__can_assign::value && - __gcc_atomic::__can_assign< _Atomic(_Tp)*, _Tp>::value>::type -__c11_atomic_init(volatile _Atomic(_Tp)* __a, _Tp __val) { - // [atomics.types.generic]p1 guarantees _Tp is trivially copyable. Because - // the default operator= in an object is not volatile, a byte-by-byte copy - // is required. - volatile char* to = reinterpret_cast(&__a->__a_value); - volatile char* end = to + sizeof(_Tp); - char* from = reinterpret_cast(&__val); - while (to != end) { - *to++ = *from++; - } +_LIBCPP_INLINE_VISIBILITY +void __cxx_atomic_init(volatile __cxx_atomic_base_impl<_Tp>* __a, _Tp __val) { + __cxx_atomic_assign_volatile(__a->__a_value, __val); } template -static inline void __c11_atomic_init(_Atomic(_Tp)* __a, _Tp __val) { +_LIBCPP_INLINE_VISIBILITY +void __cxx_atomic_init(__cxx_atomic_base_impl<_Tp>* __a, _Tp __val) { __a->__a_value = __val; } -static inline void __c11_atomic_thread_fence(memory_order __order) { - __atomic_thread_fence(__gcc_atomic::__to_gcc_order(__order)); +_LIBCPP_INLINE_VISIBILITY inline +void __cxx_atomic_thread_fence(memory_order __order) { + __atomic_thread_fence(__to_gcc_order(__order)); } -static inline void __c11_atomic_signal_fence(memory_order __order) { - __atomic_signal_fence(__gcc_atomic::__to_gcc_order(__order)); +_LIBCPP_INLINE_VISIBILITY inline +void __cxx_atomic_signal_fence(memory_order __order) { + __atomic_signal_fence(__to_gcc_order(__order)); } template -static inline void __c11_atomic_store(volatile _Atomic(_Tp)* __a, _Tp __val, - memory_order __order) { - return __atomic_store(&__a->__a_value, &__val, - __gcc_atomic::__to_gcc_order(__order)); +_LIBCPP_INLINE_VISIBILITY +void __cxx_atomic_store(volatile __cxx_atomic_base_impl<_Tp>* __a, _Tp __val, + memory_order __order) { + __atomic_store(&__a->__a_value, &__val, + __to_gcc_order(__order)); } template -static inline void __c11_atomic_store(_Atomic(_Tp)* __a, _Tp __val, - memory_order __order) { +_LIBCPP_INLINE_VISIBILITY +void __cxx_atomic_store(__cxx_atomic_base_impl<_Tp>* __a, _Tp __val, + memory_order __order) { __atomic_store(&__a->__a_value, &__val, - __gcc_atomic::__to_gcc_order(__order)); + __to_gcc_order(__order)); } template -static inline _Tp __c11_atomic_load(const volatile _Atomic(_Tp)* __a, - memory_order __order) { +_LIBCPP_INLINE_VISIBILITY +_Tp __cxx_atomic_load(const volatile __cxx_atomic_base_impl<_Tp>* __a, + memory_order __order) { _Tp __ret; __atomic_load(&__a->__a_value, &__ret, - __gcc_atomic::__to_gcc_order(__order)); + __to_gcc_order(__order)); return __ret; } template -static inline _Tp __c11_atomic_load(const _Atomic(_Tp)* __a, memory_order __order) { +_LIBCPP_INLINE_VISIBILITY +_Tp __cxx_atomic_load(const __cxx_atomic_base_impl<_Tp>* __a, memory_order __order) { _Tp __ret; __atomic_load(&__a->__a_value, &__ret, - __gcc_atomic::__to_gcc_order(__order)); + __to_gcc_order(__order)); return __ret; } template -static inline _Tp __c11_atomic_exchange(volatile _Atomic(_Tp)* __a, - _Tp __value, memory_order __order) { +_LIBCPP_INLINE_VISIBILITY +_Tp __cxx_atomic_exchange(volatile __cxx_atomic_base_impl<_Tp>* __a, + _Tp __value, memory_order __order) { _Tp __ret; __atomic_exchange(&__a->__a_value, &__value, &__ret, - __gcc_atomic::__to_gcc_order(__order)); + __to_gcc_order(__order)); return __ret; } template -static inline _Tp __c11_atomic_exchange(_Atomic(_Tp)* __a, _Tp __value, - memory_order __order) { +_LIBCPP_INLINE_VISIBILITY +_Tp __cxx_atomic_exchange(__cxx_atomic_base_impl<_Tp>* __a, _Tp __value, + memory_order __order) { _Tp __ret; __atomic_exchange(&__a->__a_value, &__value, &__ret, - __gcc_atomic::__to_gcc_order(__order)); + __to_gcc_order(__order)); return __ret; } template -static inline bool __c11_atomic_compare_exchange_strong( - volatile _Atomic(_Tp)* __a, _Tp* __expected, _Tp __value, +_LIBCPP_INLINE_VISIBILITY +bool __cxx_atomic_compare_exchange_strong( + volatile __cxx_atomic_base_impl<_Tp>* __a, _Tp* __expected, _Tp __value, memory_order __success, memory_order __failure) { return __atomic_compare_exchange(&__a->__a_value, __expected, &__value, false, - __gcc_atomic::__to_gcc_order(__success), - __gcc_atomic::__to_gcc_failure_order(__failure)); + __to_gcc_order(__success), + __to_gcc_failure_order(__failure)); } template -static inline bool __c11_atomic_compare_exchange_strong( - _Atomic(_Tp)* __a, _Tp* __expected, _Tp __value, memory_order __success, +_LIBCPP_INLINE_VISIBILITY +bool __cxx_atomic_compare_exchange_strong( + __cxx_atomic_base_impl<_Tp>* __a, _Tp* __expected, _Tp __value, memory_order __success, memory_order __failure) { return __atomic_compare_exchange(&__a->__a_value, __expected, &__value, false, - __gcc_atomic::__to_gcc_order(__success), - __gcc_atomic::__to_gcc_failure_order(__failure)); + __to_gcc_order(__success), + __to_gcc_failure_order(__failure)); } template -static inline bool __c11_atomic_compare_exchange_weak( - volatile _Atomic(_Tp)* __a, _Tp* __expected, _Tp __value, +_LIBCPP_INLINE_VISIBILITY +bool __cxx_atomic_compare_exchange_weak( + volatile __cxx_atomic_base_impl<_Tp>* __a, _Tp* __expected, _Tp __value, memory_order __success, memory_order __failure) { return __atomic_compare_exchange(&__a->__a_value, __expected, &__value, true, - __gcc_atomic::__to_gcc_order(__success), - __gcc_atomic::__to_gcc_failure_order(__failure)); + __to_gcc_order(__success), + __to_gcc_failure_order(__failure)); } template -static inline bool __c11_atomic_compare_exchange_weak( - _Atomic(_Tp)* __a, _Tp* __expected, _Tp __value, memory_order __success, +_LIBCPP_INLINE_VISIBILITY +bool __cxx_atomic_compare_exchange_weak( + __cxx_atomic_base_impl<_Tp>* __a, _Tp* __expected, _Tp __value, memory_order __success, memory_order __failure) { return __atomic_compare_exchange(&__a->__a_value, __expected, &__value, true, - __gcc_atomic::__to_gcc_order(__success), - __gcc_atomic::__to_gcc_failure_order(__failure)); + __to_gcc_order(__success), + __to_gcc_failure_order(__failure)); } template @@ -782,80 +809,264 @@ template struct __skip_amt<_Tp[n]> { }; template -static inline _Tp __c11_atomic_fetch_add(volatile _Atomic(_Tp)* __a, - _Td __delta, memory_order __order) { +_LIBCPP_INLINE_VISIBILITY +_Tp __cxx_atomic_fetch_add(volatile __cxx_atomic_base_impl<_Tp>* __a, + _Td __delta, memory_order __order) { return __atomic_fetch_add(&__a->__a_value, __delta * __skip_amt<_Tp>::value, - __gcc_atomic::__to_gcc_order(__order)); + __to_gcc_order(__order)); } template -static inline _Tp __c11_atomic_fetch_add(_Atomic(_Tp)* __a, _Td __delta, - memory_order __order) { +_LIBCPP_INLINE_VISIBILITY +_Tp __cxx_atomic_fetch_add(__cxx_atomic_base_impl<_Tp>* __a, _Td __delta, + memory_order __order) { return __atomic_fetch_add(&__a->__a_value, __delta * __skip_amt<_Tp>::value, - __gcc_atomic::__to_gcc_order(__order)); + __to_gcc_order(__order)); } template -static inline _Tp __c11_atomic_fetch_sub(volatile _Atomic(_Tp)* __a, - _Td __delta, memory_order __order) { +_LIBCPP_INLINE_VISIBILITY +_Tp __cxx_atomic_fetch_sub(volatile __cxx_atomic_base_impl<_Tp>* __a, + _Td __delta, memory_order __order) { return __atomic_fetch_sub(&__a->__a_value, __delta * __skip_amt<_Tp>::value, - __gcc_atomic::__to_gcc_order(__order)); + __to_gcc_order(__order)); } template -static inline _Tp __c11_atomic_fetch_sub(_Atomic(_Tp)* __a, _Td __delta, - memory_order __order) { +_LIBCPP_INLINE_VISIBILITY +_Tp __cxx_atomic_fetch_sub(__cxx_atomic_base_impl<_Tp>* __a, _Td __delta, + memory_order __order) { return __atomic_fetch_sub(&__a->__a_value, __delta * __skip_amt<_Tp>::value, - __gcc_atomic::__to_gcc_order(__order)); + __to_gcc_order(__order)); } template -static inline _Tp __c11_atomic_fetch_and(volatile _Atomic(_Tp)* __a, - _Tp __pattern, memory_order __order) { +_LIBCPP_INLINE_VISIBILITY +_Tp __cxx_atomic_fetch_and(volatile __cxx_atomic_base_impl<_Tp>* __a, + _Tp __pattern, memory_order __order) { return __atomic_fetch_and(&__a->__a_value, __pattern, - __gcc_atomic::__to_gcc_order(__order)); + __to_gcc_order(__order)); } template -static inline _Tp __c11_atomic_fetch_and(_Atomic(_Tp)* __a, - _Tp __pattern, memory_order __order) { +_LIBCPP_INLINE_VISIBILITY +_Tp __cxx_atomic_fetch_and(__cxx_atomic_base_impl<_Tp>* __a, + _Tp __pattern, memory_order __order) { return __atomic_fetch_and(&__a->__a_value, __pattern, - __gcc_atomic::__to_gcc_order(__order)); + __to_gcc_order(__order)); } template -static inline _Tp __c11_atomic_fetch_or(volatile _Atomic(_Tp)* __a, - _Tp __pattern, memory_order __order) { +_LIBCPP_INLINE_VISIBILITY +_Tp __cxx_atomic_fetch_or(volatile __cxx_atomic_base_impl<_Tp>* __a, + _Tp __pattern, memory_order __order) { return __atomic_fetch_or(&__a->__a_value, __pattern, - __gcc_atomic::__to_gcc_order(__order)); + __to_gcc_order(__order)); } template -static inline _Tp __c11_atomic_fetch_or(_Atomic(_Tp)* __a, _Tp __pattern, - memory_order __order) { +_LIBCPP_INLINE_VISIBILITY +_Tp __cxx_atomic_fetch_or(__cxx_atomic_base_impl<_Tp>* __a, _Tp __pattern, + memory_order __order) { return __atomic_fetch_or(&__a->__a_value, __pattern, - __gcc_atomic::__to_gcc_order(__order)); + __to_gcc_order(__order)); } template -static inline _Tp __c11_atomic_fetch_xor(volatile _Atomic(_Tp)* __a, - _Tp __pattern, memory_order __order) { +_LIBCPP_INLINE_VISIBILITY +_Tp __cxx_atomic_fetch_xor(volatile __cxx_atomic_base_impl<_Tp>* __a, + _Tp __pattern, memory_order __order) { return __atomic_fetch_xor(&__a->__a_value, __pattern, - __gcc_atomic::__to_gcc_order(__order)); + __to_gcc_order(__order)); } template -static inline _Tp __c11_atomic_fetch_xor(_Atomic(_Tp)* __a, _Tp __pattern, - memory_order __order) { +_LIBCPP_INLINE_VISIBILITY +_Tp __cxx_atomic_fetch_xor(__cxx_atomic_base_impl<_Tp>* __a, _Tp __pattern, + memory_order __order) { return __atomic_fetch_xor(&__a->__a_value, __pattern, - __gcc_atomic::__to_gcc_order(__order)); + __to_gcc_order(__order)); +} + +#define __cxx_atomic_is_lock_free(__s) __atomic_is_lock_free(__s, 0) + +#elif defined(_LIBCPP_HAS_C_ATOMIC_IMP) + +template +struct __cxx_atomic_base_impl { + + _LIBCPP_INLINE_VISIBILITY +#ifndef _LIBCPP_CXX03_LANG + __cxx_atomic_base_impl() _NOEXCEPT = default; +#else + __cxx_atomic_base_impl() _NOEXCEPT : __a_value() {} +#endif // _LIBCPP_CXX03_LANG + _LIBCPP_CONSTEXPR explicit __cxx_atomic_base_impl(_Tp value) _NOEXCEPT + : __a_value(value) {} + _Atomic(_Tp) __a_value; +}; + +#define __cxx_atomic_is_lock_free(__s) __c11_atomic_is_lock_free(__s) + +_LIBCPP_INLINE_VISIBILITY inline +void __cxx_atomic_thread_fence(memory_order __order) { + __c11_atomic_thread_fence(static_cast<__memory_order_underlying_t>(__order)); +} + +_LIBCPP_INLINE_VISIBILITY inline +void __cxx_atomic_signal_fence(memory_order __order) { + __c11_atomic_signal_fence(static_cast<__memory_order_underlying_t>(__order)); +} + +template +_LIBCPP_INLINE_VISIBILITY +void __cxx_atomic_init(__cxx_atomic_base_impl<_Tp> volatile* __a, _Tp __val) { + __c11_atomic_init(&__a->__a_value, __val); +} +template +_LIBCPP_INLINE_VISIBILITY +void __cxx_atomic_init(__cxx_atomic_base_impl<_Tp> * __a, _Tp __val) { + __c11_atomic_init(&__a->__a_value, __val); +} + +template +_LIBCPP_INLINE_VISIBILITY +void __cxx_atomic_store(__cxx_atomic_base_impl<_Tp> volatile* __a, _Tp __val, memory_order __order) { + __c11_atomic_store(&__a->__a_value, __val, static_cast<__memory_order_underlying_t>(__order)); +} +template +_LIBCPP_INLINE_VISIBILITY +void __cxx_atomic_store(__cxx_atomic_base_impl<_Tp> * __a, _Tp __val, memory_order __order) { + __c11_atomic_store(&__a->__a_value, __val, static_cast<__memory_order_underlying_t>(__order)); +} + +template +_LIBCPP_INLINE_VISIBILITY +_Tp __cxx_atomic_load(__cxx_atomic_base_impl<_Tp> const volatile* __a, memory_order __order) { + using __ptr_type = typename remove_const__a_value)>::type*; + return __c11_atomic_load(const_cast<__ptr_type>(&__a->__a_value), static_cast<__memory_order_underlying_t>(__order)); +} +template +_LIBCPP_INLINE_VISIBILITY +_Tp __cxx_atomic_load(__cxx_atomic_base_impl<_Tp> const* __a, memory_order __order) { + using __ptr_type = typename remove_const__a_value)>::type*; + return __c11_atomic_load(const_cast<__ptr_type>(&__a->__a_value), static_cast<__memory_order_underlying_t>(__order)); +} + +template +_LIBCPP_INLINE_VISIBILITY +_Tp __cxx_atomic_exchange(__cxx_atomic_base_impl<_Tp> volatile* __a, _Tp __value, memory_order __order) { + return __c11_atomic_exchange(&__a->__a_value, __value, static_cast<__memory_order_underlying_t>(__order)); +} +template +_LIBCPP_INLINE_VISIBILITY +_Tp __cxx_atomic_exchange(__cxx_atomic_base_impl<_Tp> * __a, _Tp __value, memory_order __order) { + return __c11_atomic_exchange(&__a->__a_value, __value, static_cast<__memory_order_underlying_t>(__order)); +} + +template +_LIBCPP_INLINE_VISIBILITY +bool __cxx_atomic_compare_exchange_strong(__cxx_atomic_base_impl<_Tp> volatile* __a, _Tp* __expected, _Tp __value, memory_order __success, memory_order __failure) { + return __c11_atomic_compare_exchange_strong(&__a->__a_value, __expected, __value, static_cast<__memory_order_underlying_t>(__success), static_cast<__memory_order_underlying_t>(__failure)); +} +template +_LIBCPP_INLINE_VISIBILITY +bool __cxx_atomic_compare_exchange_strong(__cxx_atomic_base_impl<_Tp> * __a, _Tp* __expected, _Tp __value, memory_order __success, memory_order __failure) { + return __c11_atomic_compare_exchange_strong(&__a->__a_value, __expected, __value, static_cast<__memory_order_underlying_t>(__success), static_cast<__memory_order_underlying_t>(__failure)); +} + +template +_LIBCPP_INLINE_VISIBILITY +bool __cxx_atomic_compare_exchange_weak(__cxx_atomic_base_impl<_Tp> volatile* __a, _Tp* __expected, _Tp __value, memory_order __success, memory_order __failure) { + return __c11_atomic_compare_exchange_weak(&__a->__a_value, __expected, __value, static_cast<__memory_order_underlying_t>(__success), static_cast<__memory_order_underlying_t>(__failure)); +} +template +_LIBCPP_INLINE_VISIBILITY +bool __cxx_atomic_compare_exchange_weak(__cxx_atomic_base_impl<_Tp> * __a, _Tp* __expected, _Tp __value, memory_order __success, memory_order __failure) { + return __c11_atomic_compare_exchange_weak(&__a->__a_value, __expected, __value, static_cast<__memory_order_underlying_t>(__success), static_cast<__memory_order_underlying_t>(__failure)); +} + +template +_LIBCPP_INLINE_VISIBILITY +_Tp __cxx_atomic_fetch_add(__cxx_atomic_base_impl<_Tp> volatile* __a, _Tp __delta, memory_order __order) { + return __c11_atomic_fetch_add(&__a->__a_value, __delta, static_cast<__memory_order_underlying_t>(__order)); +} +template +_LIBCPP_INLINE_VISIBILITY +_Tp __cxx_atomic_fetch_add(__cxx_atomic_base_impl<_Tp> * __a, _Tp __delta, memory_order __order) { + return __c11_atomic_fetch_add(&__a->__a_value, __delta, static_cast<__memory_order_underlying_t>(__order)); +} + +template +_LIBCPP_INLINE_VISIBILITY +_Tp* __cxx_atomic_fetch_add(__cxx_atomic_base_impl<_Tp*> volatile* __a, ptrdiff_t __delta, memory_order __order) { + return __c11_atomic_fetch_add(&__a->__a_value, __delta, static_cast<__memory_order_underlying_t>(__order)); +} +template +_LIBCPP_INLINE_VISIBILITY +_Tp* __cxx_atomic_fetch_add(__cxx_atomic_base_impl<_Tp*> * __a, ptrdiff_t __delta, memory_order __order) { + return __c11_atomic_fetch_add(&__a->__a_value, __delta, static_cast<__memory_order_underlying_t>(__order)); } -#endif // _LIBCPP_HAS_GCC_ATOMIC_IMP + +template +_LIBCPP_INLINE_VISIBILITY +_Tp __cxx_atomic_fetch_sub(__cxx_atomic_base_impl<_Tp> volatile* __a, _Tp __delta, memory_order __order) { + return __c11_atomic_fetch_sub(&__a->__a_value, __delta, static_cast<__memory_order_underlying_t>(__order)); +} +template +_LIBCPP_INLINE_VISIBILITY +_Tp __cxx_atomic_fetch_sub(__cxx_atomic_base_impl<_Tp> * __a, _Tp __delta, memory_order __order) { + return __c11_atomic_fetch_sub(&__a->__a_value, __delta, static_cast<__memory_order_underlying_t>(__order)); +} +template +_LIBCPP_INLINE_VISIBILITY +_Tp* __cxx_atomic_fetch_sub(__cxx_atomic_base_impl<_Tp*> volatile* __a, ptrdiff_t __delta, memory_order __order) { + return __c11_atomic_fetch_sub(&__a->__a_value, __delta, static_cast<__memory_order_underlying_t>(__order)); +} +template +_LIBCPP_INLINE_VISIBILITY +_Tp* __cxx_atomic_fetch_sub(__cxx_atomic_base_impl<_Tp*> * __a, ptrdiff_t __delta, memory_order __order) { + return __c11_atomic_fetch_sub(&__a->__a_value, __delta, static_cast<__memory_order_underlying_t>(__order)); +} + +template +_LIBCPP_INLINE_VISIBILITY +_Tp __cxx_atomic_fetch_and(__cxx_atomic_base_impl<_Tp> volatile* __a, _Tp __pattern, memory_order __order) { + return __c11_atomic_fetch_and(&__a->__a_value, __pattern, static_cast<__memory_order_underlying_t>(__order)); +} +template +_LIBCPP_INLINE_VISIBILITY +_Tp __cxx_atomic_fetch_and(__cxx_atomic_base_impl<_Tp> * __a, _Tp __pattern, memory_order __order) { + return __c11_atomic_fetch_and(&__a->__a_value, __pattern, static_cast<__memory_order_underlying_t>(__order)); +} + +template +_LIBCPP_INLINE_VISIBILITY +_Tp __cxx_atomic_fetch_or(__cxx_atomic_base_impl<_Tp> volatile* __a, _Tp __pattern, memory_order __order) { + return __c11_atomic_fetch_or(&__a->__a_value, __pattern, static_cast<__memory_order_underlying_t>(__order)); +} +template +_LIBCPP_INLINE_VISIBILITY +_Tp __cxx_atomic_fetch_or(__cxx_atomic_base_impl<_Tp> * __a, _Tp __pattern, memory_order __order) { + return __c11_atomic_fetch_or(&__a->__a_value, __pattern, static_cast<__memory_order_underlying_t>(__order)); +} + +template +_LIBCPP_INLINE_VISIBILITY +_Tp __cxx_atomic_fetch_xor(__cxx_atomic_base_impl<_Tp> volatile* __a, _Tp __pattern, memory_order __order) { + return __c11_atomic_fetch_xor(&__a->__a_value, __pattern, static_cast<__memory_order_underlying_t>(__order)); +} +template +_LIBCPP_INLINE_VISIBILITY +_Tp __cxx_atomic_fetch_xor(__cxx_atomic_base_impl<_Tp> * __a, _Tp __pattern, memory_order __order) { + return __c11_atomic_fetch_xor(&__a->__a_value, __pattern, static_cast<__memory_order_underlying_t>(__order)); +} + +#endif // _LIBCPP_HAS_GCC_ATOMIC_IMP, _LIBCPP_HAS_C_ATOMIC_IMP template -inline _LIBCPP_INLINE_VISIBILITY -_Tp -kill_dependency(_Tp __y) _NOEXCEPT +_LIBCPP_INLINE_VISIBILITY +_Tp kill_dependency(_Tp __y) _NOEXCEPT { return __y; } @@ -871,7 +1082,7 @@ kill_dependency(_Tp __y) _NOEXCEPT # define ATOMIC_LONG_LOCK_FREE __CLANG_ATOMIC_LONG_LOCK_FREE # define ATOMIC_LLONG_LOCK_FREE __CLANG_ATOMIC_LLONG_LOCK_FREE # define ATOMIC_POINTER_LOCK_FREE __CLANG_ATOMIC_POINTER_LOCK_FREE -#else +#elif defined(__GCC_ATOMIC_BOOL_LOCK_FREE) # define ATOMIC_BOOL_LOCK_FREE __GCC_ATOMIC_BOOL_LOCK_FREE # define ATOMIC_CHAR_LOCK_FREE __GCC_ATOMIC_CHAR_LOCK_FREE # define ATOMIC_CHAR16_T_LOCK_FREE __GCC_ATOMIC_CHAR16_T_LOCK_FREE @@ -884,12 +1095,352 @@ kill_dependency(_Tp __y) _NOEXCEPT # define ATOMIC_POINTER_LOCK_FREE __GCC_ATOMIC_POINTER_LOCK_FREE #endif +#ifdef _LIBCPP_ATOMIC_ONLY_USE_BUILTINS + +template +struct __cxx_atomic_lock_impl { + + _LIBCPP_INLINE_VISIBILITY + __cxx_atomic_lock_impl() _NOEXCEPT + : __a_value(), __a_lock(0) {} + _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR explicit + __cxx_atomic_lock_impl(_Tp value) _NOEXCEPT + : __a_value(value), __a_lock(0) {} + + _Tp __a_value; + mutable __cxx_atomic_base_impl<_LIBCPP_ATOMIC_FLAG_TYPE> __a_lock; + + _LIBCPP_INLINE_VISIBILITY void __lock() const volatile { + while(1 == __cxx_atomic_exchange(&__a_lock, _LIBCPP_ATOMIC_FLAG_TYPE(true), memory_order_acquire)) + /*spin*/; + } + _LIBCPP_INLINE_VISIBILITY void __lock() const { + while(1 == __cxx_atomic_exchange(&__a_lock, _LIBCPP_ATOMIC_FLAG_TYPE(true), memory_order_acquire)) + /*spin*/; + } + _LIBCPP_INLINE_VISIBILITY void __unlock() const volatile { + __cxx_atomic_store(&__a_lock, _LIBCPP_ATOMIC_FLAG_TYPE(false), memory_order_release); + } + _LIBCPP_INLINE_VISIBILITY void __unlock() const { + __cxx_atomic_store(&__a_lock, _LIBCPP_ATOMIC_FLAG_TYPE(false), memory_order_release); + } + _LIBCPP_INLINE_VISIBILITY _Tp __read() const volatile { + __lock(); + _Tp __old; + __cxx_atomic_assign_volatile(__old, __a_value); + __unlock(); + return __old; + } + _LIBCPP_INLINE_VISIBILITY _Tp __read() const { + __lock(); + _Tp __old = __a_value; + __unlock(); + return __old; + } +}; + +template +_LIBCPP_INLINE_VISIBILITY +void __cxx_atomic_init(volatile __cxx_atomic_lock_impl<_Tp>* __a, _Tp __val) { + __cxx_atomic_assign_volatile(__a->__a_value, __val); +} +template +_LIBCPP_INLINE_VISIBILITY +void __cxx_atomic_init(__cxx_atomic_lock_impl<_Tp>* __a, _Tp __val) { + __a->__a_value = __val; +} + +template +_LIBCPP_INLINE_VISIBILITY +void __cxx_atomic_store(volatile __cxx_atomic_lock_impl<_Tp>* __a, _Tp __val, memory_order) { + __a->__lock(); + __cxx_atomic_assign_volatile(__a->__a_value, __val); + __a->__unlock(); +} +template +_LIBCPP_INLINE_VISIBILITY +void __cxx_atomic_store(__cxx_atomic_lock_impl<_Tp>* __a, _Tp __val, memory_order) { + __a->__lock(); + __a->__a_value = __val; + __a->__unlock(); +} + +template +_LIBCPP_INLINE_VISIBILITY +_Tp __cxx_atomic_load(const volatile __cxx_atomic_lock_impl<_Tp>* __a, memory_order) { + return __a->__read(); +} +template +_LIBCPP_INLINE_VISIBILITY +_Tp __cxx_atomic_load(const __cxx_atomic_lock_impl<_Tp>* __a, memory_order) { + return __a->__read(); +} + +template +_LIBCPP_INLINE_VISIBILITY +_Tp __cxx_atomic_exchange(volatile __cxx_atomic_lock_impl<_Tp>* __a, _Tp __value, memory_order) { + __a->__lock(); + _Tp __old; + __cxx_atomic_assign_volatile(__old, __a->__a_value); + __cxx_atomic_assign_volatile(__a->__a_value, __value); + __a->__unlock(); + return __old; +} +template +_LIBCPP_INLINE_VISIBILITY +_Tp __cxx_atomic_exchange(__cxx_atomic_lock_impl<_Tp>* __a, _Tp __value, memory_order) { + __a->__lock(); + _Tp __old = __a->__a_value; + __a->__a_value = __value; + __a->__unlock(); + return __old; +} + +template +_LIBCPP_INLINE_VISIBILITY +bool __cxx_atomic_compare_exchange_strong(volatile __cxx_atomic_lock_impl<_Tp>* __a, + _Tp* __expected, _Tp __value, memory_order, memory_order) { + __a->__lock(); + _Tp temp; + __cxx_atomic_assign_volatile(temp, __a->__a_value); + bool __ret = temp == *__expected; + if(__ret) + __cxx_atomic_assign_volatile(__a->__a_value, __value); + else + __cxx_atomic_assign_volatile(*__expected, __a->__a_value); + __a->__unlock(); + return __ret; +} +template +_LIBCPP_INLINE_VISIBILITY +bool __cxx_atomic_compare_exchange_strong(__cxx_atomic_lock_impl<_Tp>* __a, + _Tp* __expected, _Tp __value, memory_order, memory_order) { + __a->__lock(); + bool __ret = __a->__a_value == *__expected; + if(__ret) + __a->__a_value = __value; + else + *__expected = __a->__a_value; + __a->__unlock(); + return __ret; +} + +template +_LIBCPP_INLINE_VISIBILITY +bool __cxx_atomic_compare_exchange_weak(volatile __cxx_atomic_lock_impl<_Tp>* __a, + _Tp* __expected, _Tp __value, memory_order, memory_order) { + __a->__lock(); + _Tp temp; + __cxx_atomic_assign_volatile(temp, __a->__a_value); + bool __ret = temp == *__expected; + if(__ret) + __cxx_atomic_assign_volatile(__a->__a_value, __value); + else + __cxx_atomic_assign_volatile(*__expected, __a->__a_value); + __a->__unlock(); + return __ret; +} +template +_LIBCPP_INLINE_VISIBILITY +bool __cxx_atomic_compare_exchange_weak(__cxx_atomic_lock_impl<_Tp>* __a, + _Tp* __expected, _Tp __value, memory_order, memory_order) { + __a->__lock(); + bool __ret = __a->__a_value == *__expected; + if(__ret) + __a->__a_value = __value; + else + *__expected = __a->__a_value; + __a->__unlock(); + return __ret; +} + +template +_LIBCPP_INLINE_VISIBILITY +_Tp __cxx_atomic_fetch_add(volatile __cxx_atomic_lock_impl<_Tp>* __a, + _Td __delta, memory_order) { + __a->__lock(); + _Tp __old; + __cxx_atomic_assign_volatile(__old, __a->__a_value); + __cxx_atomic_assign_volatile(__a->__a_value, _Tp(__old + __delta)); + __a->__unlock(); + return __old; +} +template +_LIBCPP_INLINE_VISIBILITY +_Tp __cxx_atomic_fetch_add(__cxx_atomic_lock_impl<_Tp>* __a, + _Td __delta, memory_order) { + __a->__lock(); + _Tp __old = __a->__a_value; + __a->__a_value += __delta; + __a->__unlock(); + return __old; +} + +template +_LIBCPP_INLINE_VISIBILITY +_Tp* __cxx_atomic_fetch_add(volatile __cxx_atomic_lock_impl<_Tp*>* __a, + ptrdiff_t __delta, memory_order) { + __a->__lock(); + _Tp* __old; + __cxx_atomic_assign_volatile(__old, __a->__a_value); + __cxx_atomic_assign_volatile(__a->__a_value, __old + __delta); + __a->__unlock(); + return __old; +} +template +_LIBCPP_INLINE_VISIBILITY +_Tp* __cxx_atomic_fetch_add(__cxx_atomic_lock_impl<_Tp*>* __a, + ptrdiff_t __delta, memory_order) { + __a->__lock(); + _Tp* __old = __a->__a_value; + __a->__a_value += __delta; + __a->__unlock(); + return __old; +} + +template +_LIBCPP_INLINE_VISIBILITY +_Tp __cxx_atomic_fetch_sub(volatile __cxx_atomic_lock_impl<_Tp>* __a, + _Td __delta, memory_order) { + __a->__lock(); + _Tp __old; + __cxx_atomic_assign_volatile(__old, __a->__a_value); + __cxx_atomic_assign_volatile(__a->__a_value, _Tp(__old - __delta)); + __a->__unlock(); + return __old; +} +template +_LIBCPP_INLINE_VISIBILITY +_Tp __cxx_atomic_fetch_sub(__cxx_atomic_lock_impl<_Tp>* __a, + _Td __delta, memory_order) { + __a->__lock(); + _Tp __old = __a->__a_value; + __a->__a_value -= __delta; + __a->__unlock(); + return __old; +} + +template +_LIBCPP_INLINE_VISIBILITY +_Tp __cxx_atomic_fetch_and(volatile __cxx_atomic_lock_impl<_Tp>* __a, + _Tp __pattern, memory_order) { + __a->__lock(); + _Tp __old; + __cxx_atomic_assign_volatile(__old, __a->__a_value); + __cxx_atomic_assign_volatile(__a->__a_value, _Tp(__old & __pattern)); + __a->__unlock(); + return __old; +} +template +_LIBCPP_INLINE_VISIBILITY +_Tp __cxx_atomic_fetch_and(__cxx_atomic_lock_impl<_Tp>* __a, + _Tp __pattern, memory_order) { + __a->__lock(); + _Tp __old = __a->__a_value; + __a->__a_value &= __pattern; + __a->__unlock(); + return __old; +} + +template +_LIBCPP_INLINE_VISIBILITY +_Tp __cxx_atomic_fetch_or(volatile __cxx_atomic_lock_impl<_Tp>* __a, + _Tp __pattern, memory_order) { + __a->__lock(); + _Tp __old; + __cxx_atomic_assign_volatile(__old, __a->__a_value); + __cxx_atomic_assign_volatile(__a->__a_value, _Tp(__old | __pattern)); + __a->__unlock(); + return __old; +} +template +_LIBCPP_INLINE_VISIBILITY +_Tp __cxx_atomic_fetch_or(__cxx_atomic_lock_impl<_Tp>* __a, + _Tp __pattern, memory_order) { + __a->__lock(); + _Tp __old = __a->__a_value; + __a->__a_value |= __pattern; + __a->__unlock(); + return __old; +} + +template +_LIBCPP_INLINE_VISIBILITY +_Tp __cxx_atomic_fetch_xor(volatile __cxx_atomic_lock_impl<_Tp>* __a, + _Tp __pattern, memory_order) { + __a->__lock(); + _Tp __old; + __cxx_atomic_assign_volatile(__old, __a->__a_value); + __cxx_atomic_assign_volatile(__a->__a_value, _Tp(__old ^ __pattern)); + __a->__unlock(); + return __old; +} +template +_LIBCPP_INLINE_VISIBILITY +_Tp __cxx_atomic_fetch_xor(__cxx_atomic_lock_impl<_Tp>* __a, + _Tp __pattern, memory_order) { + __a->__lock(); + _Tp __old = __a->__a_value; + __a->__a_value ^= __pattern; + __a->__unlock(); + return __old; +} + +#ifdef __cpp_lib_atomic_is_always_lock_free + +template struct __cxx_is_always_lock_free { + enum { __value = __atomic_always_lock_free(sizeof(_Tp), 0) }; }; + +#else + +template struct __cxx_is_always_lock_free { enum { __value = false }; }; +// Implementations must match the C ATOMIC_*_LOCK_FREE macro values. +template<> struct __cxx_is_always_lock_free { enum { __value = 2 == ATOMIC_BOOL_LOCK_FREE }; }; +template<> struct __cxx_is_always_lock_free { enum { __value = 2 == ATOMIC_CHAR_LOCK_FREE }; }; +template<> struct __cxx_is_always_lock_free { enum { __value = 2 == ATOMIC_CHAR_LOCK_FREE }; }; +template<> struct __cxx_is_always_lock_free { enum { __value = 2 == ATOMIC_CHAR_LOCK_FREE }; }; +template<> struct __cxx_is_always_lock_free { enum { __value = 2 == ATOMIC_CHAR16_T_LOCK_FREE }; }; +template<> struct __cxx_is_always_lock_free { enum { __value = 2 == ATOMIC_CHAR32_T_LOCK_FREE }; }; +template<> struct __cxx_is_always_lock_free { enum { __value = 2 == ATOMIC_WCHAR_T_LOCK_FREE }; }; +template<> struct __cxx_is_always_lock_free { enum { __value = 2 == ATOMIC_SHORT_LOCK_FREE }; }; +template<> struct __cxx_is_always_lock_free { enum { __value = 2 == ATOMIC_SHORT_LOCK_FREE }; }; +template<> struct __cxx_is_always_lock_free { enum { __value = 2 == ATOMIC_INT_LOCK_FREE }; }; +template<> struct __cxx_is_always_lock_free { enum { __value = 2 == ATOMIC_INT_LOCK_FREE }; }; +template<> struct __cxx_is_always_lock_free { enum { __value = 2 == ATOMIC_LONG_LOCK_FREE }; }; +template<> struct __cxx_is_always_lock_free { enum { __value = 2 == ATOMIC_LONG_LOCK_FREE }; }; +template<> struct __cxx_is_always_lock_free { enum { __value = 2 == ATOMIC_LLONG_LOCK_FREE }; }; +template<> struct __cxx_is_always_lock_free { enum { __value = 2 == ATOMIC_LLONG_LOCK_FREE }; }; +template struct __cxx_is_always_lock_free<_Tp*> { enum { __value = 2 == ATOMIC_POINTER_LOCK_FREE }; }; +template<> struct __cxx_is_always_lock_free { enum { __value = 2 == ATOMIC_POINTER_LOCK_FREE }; }; + +#endif //__cpp_lib_atomic_is_always_lock_free + +template ::__value, + __cxx_atomic_base_impl<_Tp>, + __cxx_atomic_lock_impl<_Tp> >::type> +#else +template > +#endif //_LIBCPP_ATOMIC_ONLY_USE_BUILTINS +struct __cxx_atomic_impl : public _Base { + +#if _GNUC_VER >= 501 + static_assert(is_trivially_copyable<_Tp>::value, + "std::atomic requires that 'Tp' be a trivially copyable type"); +#endif + + _LIBCPP_INLINE_VISIBILITY __cxx_atomic_impl() _NOEXCEPT _LIBCPP_DEFAULT + _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR explicit __cxx_atomic_impl(_Tp value) _NOEXCEPT + : _Base(value) {} +}; + // general atomic template ::value && !is_same<_Tp, bool>::value> struct __atomic_base // false { - mutable _Atomic(_Tp) __a_; + mutable __cxx_atomic_impl<_Tp> __a_; #if defined(__cpp_lib_atomic_is_always_lock_free) static _LIBCPP_CONSTEXPR bool is_always_lock_free = __atomic_always_lock_free(sizeof(__a_), 0); @@ -897,88 +1448,79 @@ struct __atomic_base // false _LIBCPP_INLINE_VISIBILITY bool is_lock_free() const volatile _NOEXCEPT - { -#if defined(_LIBCPP_HAS_C_ATOMIC_IMP) - return __c11_atomic_is_lock_free(sizeof(_Tp)); -#else - return __atomic_is_lock_free(sizeof(_Tp), 0); -#endif - } + {return __cxx_atomic_is_lock_free(sizeof(_Tp));} _LIBCPP_INLINE_VISIBILITY bool is_lock_free() const _NOEXCEPT {return static_cast<__atomic_base const volatile*>(this)->is_lock_free();} _LIBCPP_INLINE_VISIBILITY void store(_Tp __d, memory_order __m = memory_order_seq_cst) volatile _NOEXCEPT _LIBCPP_CHECK_STORE_MEMORY_ORDER(__m) - {__c11_atomic_store(&__a_, __d, __m);} + {__cxx_atomic_store(&__a_, __d, __m);} _LIBCPP_INLINE_VISIBILITY void store(_Tp __d, memory_order __m = memory_order_seq_cst) _NOEXCEPT _LIBCPP_CHECK_STORE_MEMORY_ORDER(__m) - {__c11_atomic_store(&__a_, __d, __m);} + {__cxx_atomic_store(&__a_, __d, __m);} _LIBCPP_INLINE_VISIBILITY _Tp load(memory_order __m = memory_order_seq_cst) const volatile _NOEXCEPT _LIBCPP_CHECK_LOAD_MEMORY_ORDER(__m) - {return __c11_atomic_load(&__a_, __m);} + {return __cxx_atomic_load(&__a_, __m);} _LIBCPP_INLINE_VISIBILITY _Tp load(memory_order __m = memory_order_seq_cst) const _NOEXCEPT _LIBCPP_CHECK_LOAD_MEMORY_ORDER(__m) - {return __c11_atomic_load(&__a_, __m);} + {return __cxx_atomic_load(&__a_, __m);} _LIBCPP_INLINE_VISIBILITY operator _Tp() const volatile _NOEXCEPT {return load();} _LIBCPP_INLINE_VISIBILITY operator _Tp() const _NOEXCEPT {return load();} _LIBCPP_INLINE_VISIBILITY _Tp exchange(_Tp __d, memory_order __m = memory_order_seq_cst) volatile _NOEXCEPT - {return __c11_atomic_exchange(&__a_, __d, __m);} + {return __cxx_atomic_exchange(&__a_, __d, __m);} _LIBCPP_INLINE_VISIBILITY _Tp exchange(_Tp __d, memory_order __m = memory_order_seq_cst) _NOEXCEPT - {return __c11_atomic_exchange(&__a_, __d, __m);} + {return __cxx_atomic_exchange(&__a_, __d, __m);} _LIBCPP_INLINE_VISIBILITY bool compare_exchange_weak(_Tp& __e, _Tp __d, memory_order __s, memory_order __f) volatile _NOEXCEPT _LIBCPP_CHECK_EXCHANGE_MEMORY_ORDER(__s, __f) - {return __c11_atomic_compare_exchange_weak(&__a_, &__e, __d, __s, __f);} + {return __cxx_atomic_compare_exchange_weak(&__a_, &__e, __d, __s, __f);} _LIBCPP_INLINE_VISIBILITY bool compare_exchange_weak(_Tp& __e, _Tp __d, memory_order __s, memory_order __f) _NOEXCEPT _LIBCPP_CHECK_EXCHANGE_MEMORY_ORDER(__s, __f) - {return __c11_atomic_compare_exchange_weak(&__a_, &__e, __d, __s, __f);} + {return __cxx_atomic_compare_exchange_weak(&__a_, &__e, __d, __s, __f);} _LIBCPP_INLINE_VISIBILITY bool compare_exchange_strong(_Tp& __e, _Tp __d, memory_order __s, memory_order __f) volatile _NOEXCEPT _LIBCPP_CHECK_EXCHANGE_MEMORY_ORDER(__s, __f) - {return __c11_atomic_compare_exchange_strong(&__a_, &__e, __d, __s, __f);} + {return __cxx_atomic_compare_exchange_strong(&__a_, &__e, __d, __s, __f);} _LIBCPP_INLINE_VISIBILITY bool compare_exchange_strong(_Tp& __e, _Tp __d, memory_order __s, memory_order __f) _NOEXCEPT _LIBCPP_CHECK_EXCHANGE_MEMORY_ORDER(__s, __f) - {return __c11_atomic_compare_exchange_strong(&__a_, &__e, __d, __s, __f);} + {return __cxx_atomic_compare_exchange_strong(&__a_, &__e, __d, __s, __f);} _LIBCPP_INLINE_VISIBILITY bool compare_exchange_weak(_Tp& __e, _Tp __d, memory_order __m = memory_order_seq_cst) volatile _NOEXCEPT - {return __c11_atomic_compare_exchange_weak(&__a_, &__e, __d, __m, __m);} + {return __cxx_atomic_compare_exchange_weak(&__a_, &__e, __d, __m, __m);} _LIBCPP_INLINE_VISIBILITY bool compare_exchange_weak(_Tp& __e, _Tp __d, memory_order __m = memory_order_seq_cst) _NOEXCEPT - {return __c11_atomic_compare_exchange_weak(&__a_, &__e, __d, __m, __m);} + {return __cxx_atomic_compare_exchange_weak(&__a_, &__e, __d, __m, __m);} _LIBCPP_INLINE_VISIBILITY bool compare_exchange_strong(_Tp& __e, _Tp __d, memory_order __m = memory_order_seq_cst) volatile _NOEXCEPT - {return __c11_atomic_compare_exchange_strong(&__a_, &__e, __d, __m, __m);} + {return __cxx_atomic_compare_exchange_strong(&__a_, &__e, __d, __m, __m);} _LIBCPP_INLINE_VISIBILITY bool compare_exchange_strong(_Tp& __e, _Tp __d, memory_order __m = memory_order_seq_cst) _NOEXCEPT - {return __c11_atomic_compare_exchange_strong(&__a_, &__e, __d, __m, __m);} + {return __cxx_atomic_compare_exchange_strong(&__a_, &__e, __d, __m, __m);} _LIBCPP_INLINE_VISIBILITY -#ifndef _LIBCPP_CXX03_LANG - __atomic_base() _NOEXCEPT = default; -#else - __atomic_base() _NOEXCEPT : __a_() {} -#endif // _LIBCPP_CXX03_LANG + __atomic_base() _NOEXCEPT _LIBCPP_DEFAULT + + _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR + __atomic_base(_Tp __d) _NOEXCEPT : __a_(__d) {} - _LIBCPP_INLINE_VISIBILITY - _LIBCPP_CONSTEXPR __atomic_base(_Tp __d) _NOEXCEPT : __a_(__d) {} #ifndef _LIBCPP_CXX03_LANG __atomic_base(const __atomic_base&) = delete; __atomic_base& operator=(const __atomic_base&) = delete; @@ -1010,34 +1552,34 @@ struct __atomic_base<_Tp, true> _LIBCPP_INLINE_VISIBILITY _Tp fetch_add(_Tp __op, memory_order __m = memory_order_seq_cst) volatile _NOEXCEPT - {return __c11_atomic_fetch_add(&this->__a_, __op, __m);} + {return __cxx_atomic_fetch_add(&this->__a_, __op, __m);} _LIBCPP_INLINE_VISIBILITY _Tp fetch_add(_Tp __op, memory_order __m = memory_order_seq_cst) _NOEXCEPT - {return __c11_atomic_fetch_add(&this->__a_, __op, __m);} + {return __cxx_atomic_fetch_add(&this->__a_, __op, __m);} _LIBCPP_INLINE_VISIBILITY _Tp fetch_sub(_Tp __op, memory_order __m = memory_order_seq_cst) volatile _NOEXCEPT - {return __c11_atomic_fetch_sub(&this->__a_, __op, __m);} + {return __cxx_atomic_fetch_sub(&this->__a_, __op, __m);} _LIBCPP_INLINE_VISIBILITY _Tp fetch_sub(_Tp __op, memory_order __m = memory_order_seq_cst) _NOEXCEPT - {return __c11_atomic_fetch_sub(&this->__a_, __op, __m);} + {return __cxx_atomic_fetch_sub(&this->__a_, __op, __m);} _LIBCPP_INLINE_VISIBILITY _Tp fetch_and(_Tp __op, memory_order __m = memory_order_seq_cst) volatile _NOEXCEPT - {return __c11_atomic_fetch_and(&this->__a_, __op, __m);} + {return __cxx_atomic_fetch_and(&this->__a_, __op, __m);} _LIBCPP_INLINE_VISIBILITY _Tp fetch_and(_Tp __op, memory_order __m = memory_order_seq_cst) _NOEXCEPT - {return __c11_atomic_fetch_and(&this->__a_, __op, __m);} + {return __cxx_atomic_fetch_and(&this->__a_, __op, __m);} _LIBCPP_INLINE_VISIBILITY _Tp fetch_or(_Tp __op, memory_order __m = memory_order_seq_cst) volatile _NOEXCEPT - {return __c11_atomic_fetch_or(&this->__a_, __op, __m);} + {return __cxx_atomic_fetch_or(&this->__a_, __op, __m);} _LIBCPP_INLINE_VISIBILITY _Tp fetch_or(_Tp __op, memory_order __m = memory_order_seq_cst) _NOEXCEPT - {return __c11_atomic_fetch_or(&this->__a_, __op, __m);} + {return __cxx_atomic_fetch_or(&this->__a_, __op, __m);} _LIBCPP_INLINE_VISIBILITY _Tp fetch_xor(_Tp __op, memory_order __m = memory_order_seq_cst) volatile _NOEXCEPT - {return __c11_atomic_fetch_xor(&this->__a_, __op, __m);} + {return __cxx_atomic_fetch_xor(&this->__a_, __op, __m);} _LIBCPP_INLINE_VISIBILITY _Tp fetch_xor(_Tp __op, memory_order __m = memory_order_seq_cst) _NOEXCEPT - {return __c11_atomic_fetch_xor(&this->__a_, __op, __m);} + {return __cxx_atomic_fetch_xor(&this->__a_, __op, __m);} _LIBCPP_INLINE_VISIBILITY _Tp operator++(int) volatile _NOEXCEPT {return fetch_add(_Tp(1));} @@ -1119,17 +1661,17 @@ struct atomic<_Tp*> _LIBCPP_INLINE_VISIBILITY _Tp* fetch_add(ptrdiff_t __op, memory_order __m = memory_order_seq_cst) volatile _NOEXCEPT - {return __c11_atomic_fetch_add(&this->__a_, __op, __m);} + {return __cxx_atomic_fetch_add(&this->__a_, __op, __m);} _LIBCPP_INLINE_VISIBILITY _Tp* fetch_add(ptrdiff_t __op, memory_order __m = memory_order_seq_cst) _NOEXCEPT - {return __c11_atomic_fetch_add(&this->__a_, __op, __m);} + {return __cxx_atomic_fetch_add(&this->__a_, __op, __m);} _LIBCPP_INLINE_VISIBILITY _Tp* fetch_sub(ptrdiff_t __op, memory_order __m = memory_order_seq_cst) volatile _NOEXCEPT - {return __c11_atomic_fetch_sub(&this->__a_, __op, __m);} + {return __cxx_atomic_fetch_sub(&this->__a_, __op, __m);} _LIBCPP_INLINE_VISIBILITY _Tp* fetch_sub(ptrdiff_t __op, memory_order __m = memory_order_seq_cst) _NOEXCEPT - {return __c11_atomic_fetch_sub(&this->__a_, __op, __m);} + {return __cxx_atomic_fetch_sub(&this->__a_, __op, __m);} _LIBCPP_INLINE_VISIBILITY _Tp* operator++(int) volatile _NOEXCEPT {return fetch_add(1);} @@ -1160,7 +1702,7 @@ struct atomic<_Tp*> // atomic_is_lock_free template -inline _LIBCPP_INLINE_VISIBILITY +_LIBCPP_INLINE_VISIBILITY bool atomic_is_lock_free(const volatile atomic<_Tp>* __o) _NOEXCEPT { @@ -1168,7 +1710,7 @@ atomic_is_lock_free(const volatile atomic<_Tp>* __o) _NOEXCEPT } template -inline _LIBCPP_INLINE_VISIBILITY +_LIBCPP_INLINE_VISIBILITY bool atomic_is_lock_free(const atomic<_Tp>* __o) _NOEXCEPT { @@ -1178,25 +1720,25 @@ atomic_is_lock_free(const atomic<_Tp>* __o) _NOEXCEPT // atomic_init template -inline _LIBCPP_INLINE_VISIBILITY +_LIBCPP_INLINE_VISIBILITY void atomic_init(volatile atomic<_Tp>* __o, _Tp __d) _NOEXCEPT { - __c11_atomic_init(&__o->__a_, __d); + __cxx_atomic_init(&__o->__a_, __d); } template -inline _LIBCPP_INLINE_VISIBILITY +_LIBCPP_INLINE_VISIBILITY void atomic_init(atomic<_Tp>* __o, _Tp __d) _NOEXCEPT { - __c11_atomic_init(&__o->__a_, __d); + __cxx_atomic_init(&__o->__a_, __d); } // atomic_store template -inline _LIBCPP_INLINE_VISIBILITY +_LIBCPP_INLINE_VISIBILITY void atomic_store(volatile atomic<_Tp>* __o, _Tp __d) _NOEXCEPT { @@ -1204,7 +1746,7 @@ atomic_store(volatile atomic<_Tp>* __o, _Tp __d) _NOEXCEPT } template -inline _LIBCPP_INLINE_VISIBILITY +_LIBCPP_INLINE_VISIBILITY void atomic_store(atomic<_Tp>* __o, _Tp __d) _NOEXCEPT { @@ -1214,7 +1756,7 @@ atomic_store(atomic<_Tp>* __o, _Tp __d) _NOEXCEPT // atomic_store_explicit template -inline _LIBCPP_INLINE_VISIBILITY +_LIBCPP_INLINE_VISIBILITY void atomic_store_explicit(volatile atomic<_Tp>* __o, _Tp __d, memory_order __m) _NOEXCEPT _LIBCPP_CHECK_STORE_MEMORY_ORDER(__m) @@ -1223,7 +1765,7 @@ atomic_store_explicit(volatile atomic<_Tp>* __o, _Tp __d, memory_order __m) _NOE } template -inline _LIBCPP_INLINE_VISIBILITY +_LIBCPP_INLINE_VISIBILITY void atomic_store_explicit(atomic<_Tp>* __o, _Tp __d, memory_order __m) _NOEXCEPT _LIBCPP_CHECK_STORE_MEMORY_ORDER(__m) @@ -1234,7 +1776,7 @@ atomic_store_explicit(atomic<_Tp>* __o, _Tp __d, memory_order __m) _NOEXCEPT // atomic_load template -inline _LIBCPP_INLINE_VISIBILITY +_LIBCPP_INLINE_VISIBILITY _Tp atomic_load(const volatile atomic<_Tp>* __o) _NOEXCEPT { @@ -1242,7 +1784,7 @@ atomic_load(const volatile atomic<_Tp>* __o) _NOEXCEPT } template -inline _LIBCPP_INLINE_VISIBILITY +_LIBCPP_INLINE_VISIBILITY _Tp atomic_load(const atomic<_Tp>* __o) _NOEXCEPT { @@ -1252,7 +1794,7 @@ atomic_load(const atomic<_Tp>* __o) _NOEXCEPT // atomic_load_explicit template -inline _LIBCPP_INLINE_VISIBILITY +_LIBCPP_INLINE_VISIBILITY _Tp atomic_load_explicit(const volatile atomic<_Tp>* __o, memory_order __m) _NOEXCEPT _LIBCPP_CHECK_LOAD_MEMORY_ORDER(__m) @@ -1261,7 +1803,7 @@ atomic_load_explicit(const volatile atomic<_Tp>* __o, memory_order __m) _NOEXCEP } template -inline _LIBCPP_INLINE_VISIBILITY +_LIBCPP_INLINE_VISIBILITY _Tp atomic_load_explicit(const atomic<_Tp>* __o, memory_order __m) _NOEXCEPT _LIBCPP_CHECK_LOAD_MEMORY_ORDER(__m) @@ -1272,7 +1814,7 @@ atomic_load_explicit(const atomic<_Tp>* __o, memory_order __m) _NOEXCEPT // atomic_exchange template -inline _LIBCPP_INLINE_VISIBILITY +_LIBCPP_INLINE_VISIBILITY _Tp atomic_exchange(volatile atomic<_Tp>* __o, _Tp __d) _NOEXCEPT { @@ -1280,7 +1822,7 @@ atomic_exchange(volatile atomic<_Tp>* __o, _Tp __d) _NOEXCEPT } template -inline _LIBCPP_INLINE_VISIBILITY +_LIBCPP_INLINE_VISIBILITY _Tp atomic_exchange(atomic<_Tp>* __o, _Tp __d) _NOEXCEPT { @@ -1290,7 +1832,7 @@ atomic_exchange(atomic<_Tp>* __o, _Tp __d) _NOEXCEPT // atomic_exchange_explicit template -inline _LIBCPP_INLINE_VISIBILITY +_LIBCPP_INLINE_VISIBILITY _Tp atomic_exchange_explicit(volatile atomic<_Tp>* __o, _Tp __d, memory_order __m) _NOEXCEPT { @@ -1298,7 +1840,7 @@ atomic_exchange_explicit(volatile atomic<_Tp>* __o, _Tp __d, memory_order __m) _ } template -inline _LIBCPP_INLINE_VISIBILITY +_LIBCPP_INLINE_VISIBILITY _Tp atomic_exchange_explicit(atomic<_Tp>* __o, _Tp __d, memory_order __m) _NOEXCEPT { @@ -1308,7 +1850,7 @@ atomic_exchange_explicit(atomic<_Tp>* __o, _Tp __d, memory_order __m) _NOEXCEPT // atomic_compare_exchange_weak template -inline _LIBCPP_INLINE_VISIBILITY +_LIBCPP_INLINE_VISIBILITY bool atomic_compare_exchange_weak(volatile atomic<_Tp>* __o, _Tp* __e, _Tp __d) _NOEXCEPT { @@ -1316,7 +1858,7 @@ atomic_compare_exchange_weak(volatile atomic<_Tp>* __o, _Tp* __e, _Tp __d) _NOEX } template -inline _LIBCPP_INLINE_VISIBILITY +_LIBCPP_INLINE_VISIBILITY bool atomic_compare_exchange_weak(atomic<_Tp>* __o, _Tp* __e, _Tp __d) _NOEXCEPT { @@ -1326,7 +1868,7 @@ atomic_compare_exchange_weak(atomic<_Tp>* __o, _Tp* __e, _Tp __d) _NOEXCEPT // atomic_compare_exchange_strong template -inline _LIBCPP_INLINE_VISIBILITY +_LIBCPP_INLINE_VISIBILITY bool atomic_compare_exchange_strong(volatile atomic<_Tp>* __o, _Tp* __e, _Tp __d) _NOEXCEPT { @@ -1334,7 +1876,7 @@ atomic_compare_exchange_strong(volatile atomic<_Tp>* __o, _Tp* __e, _Tp __d) _NO } template -inline _LIBCPP_INLINE_VISIBILITY +_LIBCPP_INLINE_VISIBILITY bool atomic_compare_exchange_strong(atomic<_Tp>* __o, _Tp* __e, _Tp __d) _NOEXCEPT { @@ -1344,7 +1886,7 @@ atomic_compare_exchange_strong(atomic<_Tp>* __o, _Tp* __e, _Tp __d) _NOEXCEPT // atomic_compare_exchange_weak_explicit template -inline _LIBCPP_INLINE_VISIBILITY +_LIBCPP_INLINE_VISIBILITY bool atomic_compare_exchange_weak_explicit(volatile atomic<_Tp>* __o, _Tp* __e, _Tp __d, @@ -1355,7 +1897,7 @@ atomic_compare_exchange_weak_explicit(volatile atomic<_Tp>* __o, _Tp* __e, } template -inline _LIBCPP_INLINE_VISIBILITY +_LIBCPP_INLINE_VISIBILITY bool atomic_compare_exchange_weak_explicit(atomic<_Tp>* __o, _Tp* __e, _Tp __d, memory_order __s, memory_order __f) _NOEXCEPT @@ -1367,7 +1909,7 @@ atomic_compare_exchange_weak_explicit(atomic<_Tp>* __o, _Tp* __e, _Tp __d, // atomic_compare_exchange_strong_explicit template -inline _LIBCPP_INLINE_VISIBILITY +_LIBCPP_INLINE_VISIBILITY bool atomic_compare_exchange_strong_explicit(volatile atomic<_Tp>* __o, _Tp* __e, _Tp __d, @@ -1378,7 +1920,7 @@ atomic_compare_exchange_strong_explicit(volatile atomic<_Tp>* __o, } template -inline _LIBCPP_INLINE_VISIBILITY +_LIBCPP_INLINE_VISIBILITY bool atomic_compare_exchange_strong_explicit(atomic<_Tp>* __o, _Tp* __e, _Tp __d, @@ -1391,7 +1933,7 @@ atomic_compare_exchange_strong_explicit(atomic<_Tp>* __o, _Tp* __e, // atomic_fetch_add template -inline _LIBCPP_INLINE_VISIBILITY +_LIBCPP_INLINE_VISIBILITY typename enable_if < is_integral<_Tp>::value && !is_same<_Tp, bool>::value, @@ -1403,7 +1945,7 @@ atomic_fetch_add(volatile atomic<_Tp>* __o, _Tp __op) _NOEXCEPT } template -inline _LIBCPP_INLINE_VISIBILITY +_LIBCPP_INLINE_VISIBILITY typename enable_if < is_integral<_Tp>::value && !is_same<_Tp, bool>::value, @@ -1415,7 +1957,7 @@ atomic_fetch_add(atomic<_Tp>* __o, _Tp __op) _NOEXCEPT } template -inline _LIBCPP_INLINE_VISIBILITY +_LIBCPP_INLINE_VISIBILITY _Tp* atomic_fetch_add(volatile atomic<_Tp*>* __o, ptrdiff_t __op) _NOEXCEPT { @@ -1423,7 +1965,7 @@ atomic_fetch_add(volatile atomic<_Tp*>* __o, ptrdiff_t __op) _NOEXCEPT } template -inline _LIBCPP_INLINE_VISIBILITY +_LIBCPP_INLINE_VISIBILITY _Tp* atomic_fetch_add(atomic<_Tp*>* __o, ptrdiff_t __op) _NOEXCEPT { @@ -1433,7 +1975,7 @@ atomic_fetch_add(atomic<_Tp*>* __o, ptrdiff_t __op) _NOEXCEPT // atomic_fetch_add_explicit template -inline _LIBCPP_INLINE_VISIBILITY +_LIBCPP_INLINE_VISIBILITY typename enable_if < is_integral<_Tp>::value && !is_same<_Tp, bool>::value, @@ -1445,7 +1987,7 @@ atomic_fetch_add_explicit(volatile atomic<_Tp>* __o, _Tp __op, memory_order __m) } template -inline _LIBCPP_INLINE_VISIBILITY +_LIBCPP_INLINE_VISIBILITY typename enable_if < is_integral<_Tp>::value && !is_same<_Tp, bool>::value, @@ -1457,7 +1999,7 @@ atomic_fetch_add_explicit(atomic<_Tp>* __o, _Tp __op, memory_order __m) _NOEXCEP } template -inline _LIBCPP_INLINE_VISIBILITY +_LIBCPP_INLINE_VISIBILITY _Tp* atomic_fetch_add_explicit(volatile atomic<_Tp*>* __o, ptrdiff_t __op, memory_order __m) _NOEXCEPT @@ -1466,7 +2008,7 @@ atomic_fetch_add_explicit(volatile atomic<_Tp*>* __o, ptrdiff_t __op, } template -inline _LIBCPP_INLINE_VISIBILITY +_LIBCPP_INLINE_VISIBILITY _Tp* atomic_fetch_add_explicit(atomic<_Tp*>* __o, ptrdiff_t __op, memory_order __m) _NOEXCEPT { @@ -1476,7 +2018,7 @@ atomic_fetch_add_explicit(atomic<_Tp*>* __o, ptrdiff_t __op, memory_order __m) _ // atomic_fetch_sub template -inline _LIBCPP_INLINE_VISIBILITY +_LIBCPP_INLINE_VISIBILITY typename enable_if < is_integral<_Tp>::value && !is_same<_Tp, bool>::value, @@ -1488,7 +2030,7 @@ atomic_fetch_sub(volatile atomic<_Tp>* __o, _Tp __op) _NOEXCEPT } template -inline _LIBCPP_INLINE_VISIBILITY +_LIBCPP_INLINE_VISIBILITY typename enable_if < is_integral<_Tp>::value && !is_same<_Tp, bool>::value, @@ -1500,7 +2042,7 @@ atomic_fetch_sub(atomic<_Tp>* __o, _Tp __op) _NOEXCEPT } template -inline _LIBCPP_INLINE_VISIBILITY +_LIBCPP_INLINE_VISIBILITY _Tp* atomic_fetch_sub(volatile atomic<_Tp*>* __o, ptrdiff_t __op) _NOEXCEPT { @@ -1508,7 +2050,7 @@ atomic_fetch_sub(volatile atomic<_Tp*>* __o, ptrdiff_t __op) _NOEXCEPT } template -inline _LIBCPP_INLINE_VISIBILITY +_LIBCPP_INLINE_VISIBILITY _Tp* atomic_fetch_sub(atomic<_Tp*>* __o, ptrdiff_t __op) _NOEXCEPT { @@ -1518,7 +2060,7 @@ atomic_fetch_sub(atomic<_Tp*>* __o, ptrdiff_t __op) _NOEXCEPT // atomic_fetch_sub_explicit template -inline _LIBCPP_INLINE_VISIBILITY +_LIBCPP_INLINE_VISIBILITY typename enable_if < is_integral<_Tp>::value && !is_same<_Tp, bool>::value, @@ -1530,7 +2072,7 @@ atomic_fetch_sub_explicit(volatile atomic<_Tp>* __o, _Tp __op, memory_order __m) } template -inline _LIBCPP_INLINE_VISIBILITY +_LIBCPP_INLINE_VISIBILITY typename enable_if < is_integral<_Tp>::value && !is_same<_Tp, bool>::value, @@ -1542,7 +2084,7 @@ atomic_fetch_sub_explicit(atomic<_Tp>* __o, _Tp __op, memory_order __m) _NOEXCEP } template -inline _LIBCPP_INLINE_VISIBILITY +_LIBCPP_INLINE_VISIBILITY _Tp* atomic_fetch_sub_explicit(volatile atomic<_Tp*>* __o, ptrdiff_t __op, memory_order __m) _NOEXCEPT @@ -1551,7 +2093,7 @@ atomic_fetch_sub_explicit(volatile atomic<_Tp*>* __o, ptrdiff_t __op, } template -inline _LIBCPP_INLINE_VISIBILITY +_LIBCPP_INLINE_VISIBILITY _Tp* atomic_fetch_sub_explicit(atomic<_Tp*>* __o, ptrdiff_t __op, memory_order __m) _NOEXCEPT { @@ -1561,7 +2103,7 @@ atomic_fetch_sub_explicit(atomic<_Tp*>* __o, ptrdiff_t __op, memory_order __m) _ // atomic_fetch_and template -inline _LIBCPP_INLINE_VISIBILITY +_LIBCPP_INLINE_VISIBILITY typename enable_if < is_integral<_Tp>::value && !is_same<_Tp, bool>::value, @@ -1573,7 +2115,7 @@ atomic_fetch_and(volatile atomic<_Tp>* __o, _Tp __op) _NOEXCEPT } template -inline _LIBCPP_INLINE_VISIBILITY +_LIBCPP_INLINE_VISIBILITY typename enable_if < is_integral<_Tp>::value && !is_same<_Tp, bool>::value, @@ -1587,7 +2129,7 @@ atomic_fetch_and(atomic<_Tp>* __o, _Tp __op) _NOEXCEPT // atomic_fetch_and_explicit template -inline _LIBCPP_INLINE_VISIBILITY +_LIBCPP_INLINE_VISIBILITY typename enable_if < is_integral<_Tp>::value && !is_same<_Tp, bool>::value, @@ -1599,7 +2141,7 @@ atomic_fetch_and_explicit(volatile atomic<_Tp>* __o, _Tp __op, memory_order __m) } template -inline _LIBCPP_INLINE_VISIBILITY +_LIBCPP_INLINE_VISIBILITY typename enable_if < is_integral<_Tp>::value && !is_same<_Tp, bool>::value, @@ -1613,7 +2155,7 @@ atomic_fetch_and_explicit(atomic<_Tp>* __o, _Tp __op, memory_order __m) _NOEXCEP // atomic_fetch_or template -inline _LIBCPP_INLINE_VISIBILITY +_LIBCPP_INLINE_VISIBILITY typename enable_if < is_integral<_Tp>::value && !is_same<_Tp, bool>::value, @@ -1625,7 +2167,7 @@ atomic_fetch_or(volatile atomic<_Tp>* __o, _Tp __op) _NOEXCEPT } template -inline _LIBCPP_INLINE_VISIBILITY +_LIBCPP_INLINE_VISIBILITY typename enable_if < is_integral<_Tp>::value && !is_same<_Tp, bool>::value, @@ -1639,7 +2181,7 @@ atomic_fetch_or(atomic<_Tp>* __o, _Tp __op) _NOEXCEPT // atomic_fetch_or_explicit template -inline _LIBCPP_INLINE_VISIBILITY +_LIBCPP_INLINE_VISIBILITY typename enable_if < is_integral<_Tp>::value && !is_same<_Tp, bool>::value, @@ -1651,7 +2193,7 @@ atomic_fetch_or_explicit(volatile atomic<_Tp>* __o, _Tp __op, memory_order __m) } template -inline _LIBCPP_INLINE_VISIBILITY +_LIBCPP_INLINE_VISIBILITY typename enable_if < is_integral<_Tp>::value && !is_same<_Tp, bool>::value, @@ -1665,7 +2207,7 @@ atomic_fetch_or_explicit(atomic<_Tp>* __o, _Tp __op, memory_order __m) _NOEXCEPT // atomic_fetch_xor template -inline _LIBCPP_INLINE_VISIBILITY +_LIBCPP_INLINE_VISIBILITY typename enable_if < is_integral<_Tp>::value && !is_same<_Tp, bool>::value, @@ -1677,7 +2219,7 @@ atomic_fetch_xor(volatile atomic<_Tp>* __o, _Tp __op) _NOEXCEPT } template -inline _LIBCPP_INLINE_VISIBILITY +_LIBCPP_INLINE_VISIBILITY typename enable_if < is_integral<_Tp>::value && !is_same<_Tp, bool>::value, @@ -1691,7 +2233,7 @@ atomic_fetch_xor(atomic<_Tp>* __o, _Tp __op) _NOEXCEPT // atomic_fetch_xor_explicit template -inline _LIBCPP_INLINE_VISIBILITY +_LIBCPP_INLINE_VISIBILITY typename enable_if < is_integral<_Tp>::value && !is_same<_Tp, bool>::value, @@ -1703,7 +2245,7 @@ atomic_fetch_xor_explicit(volatile atomic<_Tp>* __o, _Tp __op, memory_order __m) } template -inline _LIBCPP_INLINE_VISIBILITY +_LIBCPP_INLINE_VISIBILITY typename enable_if < is_integral<_Tp>::value && !is_same<_Tp, bool>::value, @@ -1718,27 +2260,23 @@ atomic_fetch_xor_explicit(atomic<_Tp>* __o, _Tp __op, memory_order __m) _NOEXCEP typedef struct atomic_flag { - _Atomic(bool) __a_; + __cxx_atomic_impl<_LIBCPP_ATOMIC_FLAG_TYPE> __a_; _LIBCPP_INLINE_VISIBILITY bool test_and_set(memory_order __m = memory_order_seq_cst) volatile _NOEXCEPT - {return __c11_atomic_exchange(&__a_, true, __m);} + {return __cxx_atomic_exchange(&__a_, _LIBCPP_ATOMIC_FLAG_TYPE(true), __m);} _LIBCPP_INLINE_VISIBILITY bool test_and_set(memory_order __m = memory_order_seq_cst) _NOEXCEPT - {return __c11_atomic_exchange(&__a_, true, __m);} + {return __cxx_atomic_exchange(&__a_, _LIBCPP_ATOMIC_FLAG_TYPE(true), __m);} _LIBCPP_INLINE_VISIBILITY void clear(memory_order __m = memory_order_seq_cst) volatile _NOEXCEPT - {__c11_atomic_store(&__a_, false, __m);} + {__cxx_atomic_store(&__a_, _LIBCPP_ATOMIC_FLAG_TYPE(false), __m);} _LIBCPP_INLINE_VISIBILITY void clear(memory_order __m = memory_order_seq_cst) _NOEXCEPT - {__c11_atomic_store(&__a_, false, __m);} + {__cxx_atomic_store(&__a_, _LIBCPP_ATOMIC_FLAG_TYPE(false), __m);} _LIBCPP_INLINE_VISIBILITY -#ifndef _LIBCPP_CXX03_LANG - atomic_flag() _NOEXCEPT = default; -#else - atomic_flag() _NOEXCEPT : __a_() {} -#endif // _LIBCPP_CXX03_LANG + atomic_flag() _NOEXCEPT _LIBCPP_DEFAULT _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR atomic_flag(bool __b) _NOEXCEPT : __a_(__b) {} // EXTENSION @@ -1817,14 +2355,14 @@ inline _LIBCPP_INLINE_VISIBILITY void atomic_thread_fence(memory_order __m) _NOEXCEPT { - __c11_atomic_thread_fence(__m); + __cxx_atomic_thread_fence(__m); } inline _LIBCPP_INLINE_VISIBILITY void atomic_signal_fence(memory_order __m) _NOEXCEPT { - __c11_atomic_signal_fence(__m); + __cxx_atomic_signal_fence(__m); } // Atomics for standard typedef types diff --git a/libcxx/include/chrono b/libcxx/include/chrono index f7970647e579a..a003751ba3b10 100644 --- a/libcxx/include/chrono +++ b/libcxx/include/chrono @@ -1749,14 +1749,14 @@ public: year() = default; explicit inline constexpr year(int __val) noexcept : __y(static_cast(__val)) {} - inline constexpr year& operator++() noexcept { ++__y; return *this; }; - inline constexpr year operator++(int) noexcept { year __tmp = *this; ++(*this); return __tmp; }; - inline constexpr year& operator--() noexcept { --__y; return *this; }; - inline constexpr year operator--(int) noexcept { year __tmp = *this; --(*this); return __tmp; }; + inline constexpr year& operator++() noexcept { ++__y; return *this; } + inline constexpr year operator++(int) noexcept { year __tmp = *this; ++(*this); return __tmp; } + inline constexpr year& operator--() noexcept { --__y; return *this; } + inline constexpr year operator--(int) noexcept { year __tmp = *this; --(*this); return __tmp; } constexpr year& operator+=(const years& __dy) noexcept; constexpr year& operator-=(const years& __dy) noexcept; inline constexpr year operator+() const noexcept { return *this; } - inline constexpr year operator-() const noexcept { return year{-__y}; }; + inline constexpr year operator-() const noexcept { return year{-__y}; } inline constexpr bool is_leap() const noexcept { return __y % 4 == 0 && (__y % 100 != 0 || __y % 400 == 0); } explicit inline constexpr operator int() const noexcept { return __y; } diff --git a/libcxx/include/exception b/libcxx/include/exception index 63d8ad229c294..05ff6015075f3 100644 --- a/libcxx/include/exception +++ b/libcxx/include/exception @@ -82,7 +82,7 @@ template void rethrow_if_nested(const E& e); #include #include -#if defined(_LIBCPP_ABI_MICROSOFT) && !defined(_LIBCPP_NO_VCRUNTIME) +#if defined(_LIBCPP_ABI_VCRUNTIME) #include #endif @@ -93,7 +93,7 @@ template void rethrow_if_nested(const E& e); namespace std // purposefully not using versioning namespace { -#if !defined(_LIBCPP_ABI_MICROSOFT) || defined(_LIBCPP_NO_VCRUNTIME) +#if !defined(_LIBCPP_ABI_VCRUNTIME) class _LIBCPP_EXCEPTION_ABI exception { public: @@ -110,7 +110,7 @@ public: virtual ~bad_exception() _NOEXCEPT; virtual const char* what() const _NOEXCEPT; }; -#endif // !_LIBCPP_ABI_MICROSOFT || _LIBCPP_NO_VCRUNTIME +#endif // !_LIBCPP_ABI_VCRUNTIME #if _LIBCPP_STD_VER <= 14 \ || defined(_LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS) \ diff --git a/libcxx/include/experimental/functional b/libcxx/include/experimental/functional index 8c55f4f550177..755eda6415569 100644 --- a/libcxx/include/experimental/functional +++ b/libcxx/include/experimental/functional @@ -109,8 +109,7 @@ _LIBCPP_BEGIN_NAMESPACE_LFTS #if _LIBCPP_STD_VER > 11 // default searcher template> -_LIBCPP_TYPE_VIS -class default_searcher { +class _LIBCPP_TYPE_VIS default_searcher { public: _LIBCPP_INLINE_VISIBILITY default_searcher(_ForwardIterator __f, _ForwardIterator __l, @@ -208,8 +207,7 @@ public: template ::value_type>, class _BinaryPredicate = equal_to<>> -_LIBCPP_TYPE_VIS -class boyer_moore_searcher { +class _LIBCPP_TYPE_VIS boyer_moore_searcher { private: typedef typename std::iterator_traits<_RandomAccessIterator1>::difference_type difference_type; typedef typename std::iterator_traits<_RandomAccessIterator1>::value_type value_type; @@ -360,8 +358,7 @@ make_boyer_moore_searcher( _RandomAccessIterator __f, _RandomAccessIterator __l, template ::value_type>, class _BinaryPredicate = equal_to<>> -_LIBCPP_TYPE_VIS -class boyer_moore_horspool_searcher { +class _LIBCPP_TYPE_VIS boyer_moore_horspool_searcher { private: typedef typename std::iterator_traits<_RandomAccessIterator1>::difference_type difference_type; typedef typename std::iterator_traits<_RandomAccessIterator1>::value_type value_type; diff --git a/libcxx/include/fenv.h b/libcxx/include/fenv.h new file mode 100644 index 0000000000000..7cede4b347c24 --- /dev/null +++ b/libcxx/include/fenv.h @@ -0,0 +1,115 @@ +// -*- C++ -*- +//===---------------------------- math.h ----------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#ifndef _LIBCPP_FENV_H +#define _LIBCPP_FENV_H + + +/* + fenv.h synopsis + +This entire header is C99 / C++0X + +Macros: + + FE_DIVBYZERO + FE_INEXACT + FE_INVALID + FE_OVERFLOW + FE_UNDERFLOW + FE_ALL_EXCEPT + FE_DOWNWARD + FE_TONEAREST + FE_TOWARDZERO + FE_UPWARD + FE_DFL_ENV + +Types: + + fenv_t + fexcept_t + +int feclearexcept(int excepts); +int fegetexceptflag(fexcept_t* flagp, int excepts); +int feraiseexcept(int excepts); +int fesetexceptflag(const fexcept_t* flagp, int excepts); +int fetestexcept(int excepts); +int fegetround(); +int fesetround(int round); +int fegetenv(fenv_t* envp); +int feholdexcept(fenv_t* envp); +int fesetenv(const fenv_t* envp); +int feupdateenv(const fenv_t* envp); + + +*/ + +#include <__config> +#include_next + +#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) +#pragma GCC system_header +#endif + +#ifdef __cplusplus + +extern "C++" { + +#ifdef feclearexcept +#undef feclearexcept +#endif + +#ifdef fegetexceptflag +#undef fegetexceptflag +#endif + + +#ifdef feraiseexcept +#undef feraiseexcept +#endif + +#ifdef fesetexceptflag +#undef fesetexceptflag +#endif + + +#ifdef fetestexcept +#undef fetestexcept +#endif + +#ifdef fegetround +#undef fegetround +#endif + +#ifdef fesetround +#undef fesetround +#endif + +#ifdef fegetenv +#undef fegetenv +#endif + +#ifdef feholdexcept +#undef feholdexcept +#endif + + +#ifdef fesetenv +#undef fesetenv +#endif + +#ifdef feupdateenv +#undef feupdateenv +#endif + +} // extern "C++" + +#endif // defined(__cplusplus) + +#endif // _LIBCPP_FENV_H diff --git a/libcxx/include/filesystem b/libcxx/include/filesystem index 7fb25116ba992..7a151d98864de 100644 --- a/libcxx/include/filesystem +++ b/libcxx/include/filesystem @@ -1364,13 +1364,11 @@ private: template _LIBCPP_NORETURN inline _LIBCPP_INLINE_VISIBILITY #ifndef _LIBCPP_NO_EXCEPTIONS - void - __throw_filesystem_error(_Args&&... __args) { +void __throw_filesystem_error(_Args&&... __args) { throw filesystem_error(std::forward<_Args>(__args)...); } #else - void - __throw_filesystem_error(_Args&&...) { +void __throw_filesystem_error(_Args&&...) { _VSTD::abort(); } #endif diff --git a/libcxx/include/ios b/libcxx/include/ios index 9633639630205..96e84eb38356a 100644 --- a/libcxx/include/ios +++ b/libcxx/include/ios @@ -425,6 +425,16 @@ public: virtual ~failure() throw(); }; +_LIBCPP_NORETURN inline _LIBCPP_INLINE_VISIBILITY +void __throw_failure(char const* __msg) { +#ifndef _LIBCPP_NO_EXCEPTIONS + throw ios_base::failure(__msg); +#else + ((void)__msg); + _VSTD::abort(); +#endif +} + class _LIBCPP_TYPE_VIS ios_base::Init { public: diff --git a/libcxx/include/iterator b/libcxx/include/iterator index 242f18814e691..02cbc503c9179 100644 --- a/libcxx/include/iterator +++ b/libcxx/include/iterator @@ -399,6 +399,11 @@ template constexpr auto crend(const C& c) -> decltype(std::rend(c)); // 24.8, container access: template constexpr auto size(const C& c) -> decltype(c.size()); // C++17 template constexpr size_t size(const T (&array)[N]) noexcept; // C++17 + +template constexpr auto ssize(const C& c) + -> common_type_t>; // C++20 +template constexpr ptrdiff_t ssize(const T (&array)[N]) noexcept; // C++20 + template constexpr auto empty(const C& c) -> decltype(c.empty()); // C++17 template constexpr bool empty(const T (&array)[N]) noexcept; // C++17 template constexpr bool empty(initializer_list il) noexcept; // C++17 @@ -1442,7 +1447,7 @@ private: template friend class __wrap_iter; template friend class basic_string; template friend class _LIBCPP_TEMPLATE_VIS vector; - template friend class _LIBCPP_TEMPLATE_VIS span; + template friend class _LIBCPP_TEMPLATE_VIS span; template _LIBCPP_CONSTEXPR_IF_NODEBUG friend @@ -1657,7 +1662,7 @@ struct __libcpp_is_trivial_iterator<__wrap_iter<_Iter> > template -inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 +_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 _Tp* begin(_Tp (&__array)[_Np]) { @@ -1665,7 +1670,7 @@ begin(_Tp (&__array)[_Np]) } template -inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 +_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 _Tp* end(_Tp (&__array)[_Np]) { @@ -1675,7 +1680,7 @@ end(_Tp (&__array)[_Np]) #if !defined(_LIBCPP_CXX03_LANG) template -inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 +_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 auto begin(_Cp& __c) -> decltype(__c.begin()) { @@ -1683,7 +1688,7 @@ begin(_Cp& __c) -> decltype(__c.begin()) } template -inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 +_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 auto begin(const _Cp& __c) -> decltype(__c.begin()) { @@ -1691,7 +1696,7 @@ begin(const _Cp& __c) -> decltype(__c.begin()) } template -inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 +_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 auto end(_Cp& __c) -> decltype(__c.end()) { @@ -1699,7 +1704,7 @@ end(_Cp& __c) -> decltype(__c.end()) } template -inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 +_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 auto end(const _Cp& __c) -> decltype(__c.end()) { @@ -1709,84 +1714,84 @@ end(const _Cp& __c) -> decltype(__c.end()) #if _LIBCPP_STD_VER > 11 template -inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 +_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 reverse_iterator<_Tp*> rbegin(_Tp (&__array)[_Np]) { return reverse_iterator<_Tp*>(__array + _Np); } template -inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 +_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 reverse_iterator<_Tp*> rend(_Tp (&__array)[_Np]) { return reverse_iterator<_Tp*>(__array); } template -inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 +_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 reverse_iterator rbegin(initializer_list<_Ep> __il) { return reverse_iterator(__il.end()); } template -inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 +_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 reverse_iterator rend(initializer_list<_Ep> __il) { return reverse_iterator(__il.begin()); } template -inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 +_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 auto cbegin(const _Cp& __c) -> decltype(_VSTD::begin(__c)) { return _VSTD::begin(__c); } template -inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 +_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 auto cend(const _Cp& __c) -> decltype(_VSTD::end(__c)) { return _VSTD::end(__c); } template -inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 +_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 auto rbegin(_Cp& __c) -> decltype(__c.rbegin()) { return __c.rbegin(); } template -inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 +_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 auto rbegin(const _Cp& __c) -> decltype(__c.rbegin()) { return __c.rbegin(); } template -inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 +_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 auto rend(_Cp& __c) -> decltype(__c.rend()) { return __c.rend(); } template -inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 +_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 auto rend(const _Cp& __c) -> decltype(__c.rend()) { return __c.rend(); } template -inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 +_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 auto crbegin(const _Cp& __c) -> decltype(_VSTD::rbegin(__c)) { return _VSTD::rbegin(__c); } template -inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 +_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 auto crend(const _Cp& __c) -> decltype(_VSTD::rend(__c)) { return _VSTD::rend(__c); @@ -1798,7 +1803,7 @@ auto crend(const _Cp& __c) -> decltype(_VSTD::rend(__c)) #else // defined(_LIBCPP_CXX03_LANG) template -inline _LIBCPP_INLINE_VISIBILITY +_LIBCPP_INLINE_VISIBILITY typename _Cp::iterator begin(_Cp& __c) { @@ -1806,7 +1811,7 @@ begin(_Cp& __c) } template -inline _LIBCPP_INLINE_VISIBILITY +_LIBCPP_INLINE_VISIBILITY typename _Cp::const_iterator begin(const _Cp& __c) { @@ -1814,7 +1819,7 @@ begin(const _Cp& __c) } template -inline _LIBCPP_INLINE_VISIBILITY +_LIBCPP_INLINE_VISIBILITY typename _Cp::iterator end(_Cp& __c) { @@ -1822,7 +1827,7 @@ end(_Cp& __c) } template -inline _LIBCPP_INLINE_VISIBILITY +_LIBCPP_INLINE_VISIBILITY typename _Cp::const_iterator end(const _Cp& __c) { @@ -1848,51 +1853,64 @@ end(const _Cp& __c) // #endif template -inline _LIBCPP_INLINE_VISIBILITY +_LIBCPP_INLINE_VISIBILITY constexpr auto size(const _Cont& __c) _NOEXCEPT_(noexcept(__c.size())) -> decltype (__c.size()) { return __c.size(); } template -inline _LIBCPP_INLINE_VISIBILITY +_LIBCPP_INLINE_VISIBILITY constexpr size_t size(const _Tp (&)[_Sz]) noexcept { return _Sz; } +#if _LIBCPP_STD_VER > 17 template -_LIBCPP_NODISCARD_AFTER_CXX17 inline _LIBCPP_INLINE_VISIBILITY +_LIBCPP_INLINE_VISIBILITY +constexpr auto ssize(const _Cont& __c) +_NOEXCEPT_(noexcept(static_cast>>(__c.size()))) +-> common_type_t> +{ return static_cast>>(__c.size()); } + +template +_LIBCPP_INLINE_VISIBILITY +constexpr ptrdiff_t ssize(const _Tp (&)[_Sz]) noexcept { return _Sz; } +#endif + +template +_LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY constexpr auto empty(const _Cont& __c) _NOEXCEPT_(noexcept(__c.empty())) -> decltype (__c.empty()) { return __c.empty(); } template -_LIBCPP_NODISCARD_AFTER_CXX17 inline _LIBCPP_INLINE_VISIBILITY +_LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY constexpr bool empty(const _Tp (&)[_Sz]) noexcept { return false; } template -_LIBCPP_NODISCARD_AFTER_CXX17 inline _LIBCPP_INLINE_VISIBILITY +_LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY constexpr bool empty(initializer_list<_Ep> __il) noexcept { return __il.size() == 0; } template constexpr -inline _LIBCPP_INLINE_VISIBILITY +_LIBCPP_INLINE_VISIBILITY auto data(_Cont& __c) _NOEXCEPT_(noexcept(__c.data())) -> decltype (__c.data()) { return __c.data(); } template constexpr -inline _LIBCPP_INLINE_VISIBILITY +_LIBCPP_INLINE_VISIBILITY auto data(const _Cont& __c) _NOEXCEPT_(noexcept(__c.data())) -> decltype (__c.data()) { return __c.data(); } template -inline _LIBCPP_INLINE_VISIBILITY +_LIBCPP_INLINE_VISIBILITY constexpr _Tp* data(_Tp (&__array)[_Sz]) noexcept { return __array; } template -inline _LIBCPP_INLINE_VISIBILITY +_LIBCPP_INLINE_VISIBILITY constexpr const _Ep* data(initializer_list<_Ep> __il) noexcept { return __il.begin(); } #endif diff --git a/libcxx/include/map b/libcxx/include/map index 47f5c678bccdd..e21dd5a845449 100644 --- a/libcxx/include/map +++ b/libcxx/include/map @@ -1535,10 +1535,8 @@ map<_Key, _Tp, _Compare, _Allocator>::at(const key_type& __k) { __parent_pointer __parent; __node_base_pointer& __child = __tree_.__find_equal(__parent, __k); -#ifndef _LIBCPP_NO_EXCEPTIONS if (__child == nullptr) - throw out_of_range("map::at: key not found"); -#endif // _LIBCPP_NO_EXCEPTIONS + __throw_out_of_range("map::at: key not found"); return static_cast<__node_pointer>(__child)->__value_.__get_value().second; } @@ -1548,10 +1546,8 @@ map<_Key, _Tp, _Compare, _Allocator>::at(const key_type& __k) const { __parent_pointer __parent; __node_base_pointer __child = __tree_.__find_equal(__parent, __k); -#ifndef _LIBCPP_NO_EXCEPTIONS if (__child == nullptr) - throw out_of_range("map::at: key not found"); -#endif // _LIBCPP_NO_EXCEPTIONS + __throw_out_of_range("map::at: key not found"); return static_cast<__node_pointer>(__child)->__value_.__get_value().second; } diff --git a/libcxx/include/module.modulemap b/libcxx/include/module.modulemap index 6d88f52113cb7..bbfe90ed57f55 100644 --- a/libcxx/include/module.modulemap +++ b/libcxx/include/module.modulemap @@ -24,7 +24,10 @@ module std [system] { header "errno.h" export * } - // provided by C library. + module fenv_h { + header "fenv.h" + export * + } // provided by compiler or C library. module inttypes_h { header "inttypes.h" diff --git a/libcxx/include/new b/libcxx/include/new index b5e8fb4125d25..4cf4c4c1e7b98 100644 --- a/libcxx/include/new +++ b/libcxx/include/new @@ -89,7 +89,7 @@ void operator delete[](void* ptr, void*) noexcept; #include #endif -#if defined(_LIBCPP_ABI_MICROSOFT) && !defined(_LIBCPP_NO_VCRUNTIME) +#if defined(_LIBCPP_ABI_VCRUNTIME) #include #endif @@ -119,7 +119,7 @@ void operator delete[](void* ptr, void*) noexcept; namespace std // purposefully not using versioning namespace { -#if !defined(_LIBCPP_ABI_MICROSOFT) || defined(_LIBCPP_NO_VCRUNTIME) +#if !defined(_LIBCPP_ABI_VCRUNTIME) struct _LIBCPP_TYPE_VIS nothrow_t {}; extern _LIBCPP_FUNC_VIS const nothrow_t nothrow; @@ -145,12 +145,12 @@ typedef void (*new_handler)(); _LIBCPP_FUNC_VIS new_handler set_new_handler(new_handler) _NOEXCEPT; _LIBCPP_FUNC_VIS new_handler get_new_handler() _NOEXCEPT; -#endif // !_LIBCPP_ABI_MICROSOFT || _LIBCPP_NO_VCRUNTIME +#endif // !_LIBCPP_ABI_VCRUNTIME _LIBCPP_NORETURN _LIBCPP_FUNC_VIS void __throw_bad_alloc(); // not in C++ spec #if !defined(_LIBCPP_HAS_NO_LIBRARY_ALIGNED_ALLOCATION) && \ - !defined(_LIBCPP_DEFER_NEW_TO_VCRUNTIME) + !defined(_LIBCPP_ABI_VCRUNTIME) #ifndef _LIBCPP_CXX03_LANG enum class _LIBCPP_ENUM_VIS align_val_t : size_t { }; #else @@ -166,10 +166,10 @@ enum align_val_t { __zero = 0, __max = (size_t)-1 }; #define _THROW_BAD_ALLOC #endif -#if !defined(_LIBCPP_DEFER_NEW_TO_VCRUNTIME) +#if !defined(_LIBCPP_ABI_VCRUNTIME) _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new(std::size_t __sz) _THROW_BAD_ALLOC; -_LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new(std::size_t __sz, const std::nothrow_t&) _NOEXCEPT _NOALIAS; +_LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new(std::size_t __sz, const std::nothrow_t&) _NOEXCEPT _LIBCPP_NOALIAS; _LIBCPP_OVERRIDABLE_FUNC_VIS void operator delete(void* __p) _NOEXCEPT; _LIBCPP_OVERRIDABLE_FUNC_VIS void operator delete(void* __p, const std::nothrow_t&) _NOEXCEPT; #ifndef _LIBCPP_HAS_NO_LIBRARY_SIZED_DEALLOCATION @@ -177,7 +177,7 @@ _LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_SIZED_NEW_DELETE void operato #endif _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new[](std::size_t __sz) _THROW_BAD_ALLOC; -_LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new[](std::size_t __sz, const std::nothrow_t&) _NOEXCEPT _NOALIAS; +_LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new[](std::size_t __sz, const std::nothrow_t&) _NOEXCEPT _LIBCPP_NOALIAS; _LIBCPP_OVERRIDABLE_FUNC_VIS void operator delete[](void* __p) _NOEXCEPT; _LIBCPP_OVERRIDABLE_FUNC_VIS void operator delete[](void* __p, const std::nothrow_t&) _NOEXCEPT; #ifndef _LIBCPP_HAS_NO_LIBRARY_SIZED_DEALLOCATION @@ -186,7 +186,7 @@ _LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_SIZED_NEW_DELETE void operato #ifndef _LIBCPP_HAS_NO_LIBRARY_ALIGNED_ALLOCATION _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new(std::size_t __sz, std::align_val_t) _THROW_BAD_ALLOC; -_LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new(std::size_t __sz, std::align_val_t, const std::nothrow_t&) _NOEXCEPT _NOALIAS; +_LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new(std::size_t __sz, std::align_val_t, const std::nothrow_t&) _NOEXCEPT _LIBCPP_NOALIAS; _LIBCPP_OVERRIDABLE_FUNC_VIS void operator delete(void* __p, std::align_val_t) _NOEXCEPT; _LIBCPP_OVERRIDABLE_FUNC_VIS void operator delete(void* __p, std::align_val_t, const std::nothrow_t&) _NOEXCEPT; #ifndef _LIBCPP_HAS_NO_LIBRARY_SIZED_DEALLOCATION @@ -194,7 +194,7 @@ _LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_SIZED_NEW_DELETE void operato #endif _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new[](std::size_t __sz, std::align_val_t) _THROW_BAD_ALLOC; -_LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new[](std::size_t __sz, std::align_val_t, const std::nothrow_t&) _NOEXCEPT _NOALIAS; +_LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new[](std::size_t __sz, std::align_val_t, const std::nothrow_t&) _NOEXCEPT _LIBCPP_NOALIAS; _LIBCPP_OVERRIDABLE_FUNC_VIS void operator delete[](void* __p, std::align_val_t) _NOEXCEPT; _LIBCPP_OVERRIDABLE_FUNC_VIS void operator delete[](void* __p, std::align_val_t, const std::nothrow_t&) _NOEXCEPT; #ifndef _LIBCPP_HAS_NO_LIBRARY_SIZED_DEALLOCATION @@ -207,7 +207,7 @@ _LIBCPP_NODISCARD_AFTER_CXX17 inline _LIBCPP_INLINE_VISIBILITY void* operator ne inline _LIBCPP_INLINE_VISIBILITY void operator delete (void*, void*) _NOEXCEPT {} inline _LIBCPP_INLINE_VISIBILITY void operator delete[](void*, void*) _NOEXCEPT {} -#endif // !_LIBCPP_DEFER_NEW_TO_VCRUNTIME +#endif // !_LIBCPP_ABI_VCRUNTIME _LIBCPP_BEGIN_NAMESPACE_STD diff --git a/libcxx/include/span b/libcxx/include/span index 774f69823bd0c..1cb1a1835c3d1 100644 --- a/libcxx/include/span +++ b/libcxx/include/span @@ -16,33 +16,35 @@ namespace std { // constants -inline constexpr ptrdiff_t dynamic_extent = -1; +inline constexpr size_t dynamic_extent = numeric_limits::max(); // [views.span], class template span -template +template class span; // [span.objectrep], views of object representation -template +template span(sizeof(ElementType)) * Extent))> as_bytes(span s) noexcept; -template +template span< byte, ((Extent == dynamic_extent) ? dynamic_extent : (static_cast(sizeof(ElementType)) * Extent))> as_writable_bytes(span s) noexcept; namespace std { -template +template class span { public: // constants and types using element_type = ElementType; using value_type = remove_cv_t; - using index_type = ptrdiff_t; + using index_type = size_t; using difference_type = ptrdiff_t; using pointer = element_type*; + using const_pointer = const element_type*; using reference = element_type&; + using const_reference = const element_type&; using iterator = implementation-defined; using const_iterator = implementation-defined; using reverse_iterator = std::reverse_iterator; @@ -64,17 +66,17 @@ public: template constexpr span(const Container& cont); constexpr span(const span& other) noexcept = default; - template + template constexpr span(const span& s) noexcept; ~span() noexcept = default; constexpr span& operator=(const span& other) noexcept = default; // [span.sub], span subviews - template + template constexpr span first() const; - template + template constexpr span last() const; - template + template constexpr span subspan() const; constexpr span first(index_type count) const; @@ -88,7 +90,8 @@ public: // [span.elem], span element access constexpr reference operator[](index_type idx) const; - constexpr reference operator()(index_type idx) const; + constexpr reference front() const; + constexpr reference back() const; constexpr pointer data() const noexcept; // [span.iterators], span iterator support @@ -140,14 +143,14 @@ _LIBCPP_BEGIN_NAMESPACE_STD #if _LIBCPP_STD_VER > 17 -inline constexpr ptrdiff_t dynamic_extent = -1; -template class span; +inline constexpr size_t dynamic_extent = numeric_limits::max(); +template class span; template struct __is_span_impl : public false_type {}; -template +template struct __is_span_impl> : public true_type {}; template @@ -186,18 +189,18 @@ struct __is_span_compatible_container<_Tp, _ElementType, : public true_type {}; -template +template class _LIBCPP_TEMPLATE_VIS span { public: // constants and types using element_type = _Tp; using value_type = remove_cv_t<_Tp>; - using index_type = ptrdiff_t; + using index_type = size_t; using difference_type = ptrdiff_t; using pointer = _Tp *; - using const_pointer = const _Tp *; // not in standard + using const_pointer = const _Tp *; using reference = _Tp &; - using const_reference = const _Tp &; // not in standard + using const_reference = const _Tp &; using iterator = __wrap_iter; using const_iterator = __wrap_iter; using reverse_iterator = _VSTD::reverse_iterator; @@ -222,20 +225,6 @@ public: _LIBCPP_INLINE_VISIBILITY constexpr span( array& __arr) noexcept : __data{__arr.data()} {} _LIBCPP_INLINE_VISIBILITY constexpr span(const array& __arr) noexcept : __data{__arr.data()} {} - template - inline _LIBCPP_INLINE_VISIBILITY - constexpr span( _Container& __c, - enable_if_t<__is_span_compatible_container<_Container, _Tp>::value, nullptr_t> = nullptr) - : __data{_VSTD::data(__c)} - { _LIBCPP_ASSERT(_Extent == _VSTD::size(__c), "size mismatch in span's constructor (container)"); } - - template - inline _LIBCPP_INLINE_VISIBILITY - constexpr span(const _Container& __c, - enable_if_t<__is_span_compatible_container::value, nullptr_t> = nullptr) - : __data{_VSTD::data(__c)} - { _LIBCPP_ASSERT(_Extent == _VSTD::size(__c), "size mismatch in span's constructor (const container)"); } - template inline _LIBCPP_INLINE_VISIBILITY constexpr span(const span<_OtherElementType, _Extent>& __other, @@ -255,20 +244,18 @@ public: // ~span() noexcept = default; - template + template inline _LIBCPP_INLINE_VISIBILITY constexpr span first() const noexcept { - static_assert(_Count >= 0, "Count must be >= 0 in span::first()"); static_assert(_Count <= _Extent, "Count out of range in span::first()"); return {data(), _Count}; } - template + template inline _LIBCPP_INLINE_VISIBILITY constexpr span last() const noexcept { - static_assert(_Count >= 0, "Count must be >= 0 in span::last()"); static_assert(_Count <= _Extent, "Count out of range in span::last()"); return {data() + size() - _Count, _Count}; } @@ -287,7 +274,7 @@ public: return {data() + size() - __count, __count}; } - template + template inline _LIBCPP_INLINE_VISIBILITY constexpr auto subspan() const noexcept -> span @@ -319,10 +306,16 @@ public: return __data[__idx]; } - _LIBCPP_INLINE_VISIBILITY constexpr reference operator()(index_type __idx) const noexcept + _LIBCPP_INLINE_VISIBILITY constexpr reference front() const noexcept { - _LIBCPP_ASSERT(__idx >= 0 && __idx < size(), "span() index out of bounds"); - return __data[__idx]; + static_assert(_Extent > 0, "span[].front() on empty span"); + return __data[0]; + } + + _LIBCPP_INLINE_VISIBILITY constexpr reference back() const noexcept + { + static_assert(_Extent > 0, "span[].back() on empty span"); + return __data[size()-1]; } _LIBCPP_INLINE_VISIBILITY constexpr pointer data() const noexcept { return __data; } @@ -364,12 +357,12 @@ public: // constants and types using element_type = _Tp; using value_type = remove_cv_t<_Tp>; - using index_type = ptrdiff_t; + using index_type = size_t; using difference_type = ptrdiff_t; using pointer = _Tp *; - using const_pointer = const _Tp *; // not in standard + using const_pointer = const _Tp *; using reference = _Tp &; - using const_reference = const _Tp &; // not in standard + using const_reference = const _Tp &; using iterator = __wrap_iter; using const_iterator = __wrap_iter; using reverse_iterator = _VSTD::reverse_iterator; @@ -384,7 +377,7 @@ public: constexpr span& operator=(const span&) noexcept = default; _LIBCPP_INLINE_VISIBILITY constexpr span(pointer __ptr, index_type __count) : __data{__ptr}, __size{__count} {} - _LIBCPP_INLINE_VISIBILITY constexpr span(pointer __f, pointer __l) : __data{__f}, __size{distance(__f, __l)} {} + _LIBCPP_INLINE_VISIBILITY constexpr span(pointer __f, pointer __l) : __data{__f}, __size{static_cast(distance(__f, __l))} {} template inline _LIBCPP_INLINE_VISIBILITY @@ -411,7 +404,7 @@ public: : __data{_VSTD::data(__c)}, __size{(index_type) _VSTD::size(__c)} {} - template + template inline _LIBCPP_INLINE_VISIBILITY constexpr span(const span<_OtherElementType, _OtherExtent>& __other, enable_if_t< @@ -421,20 +414,18 @@ public: // ~span() noexcept = default; - template + template inline _LIBCPP_INLINE_VISIBILITY constexpr span first() const noexcept { - static_assert(_Count >= 0, "Count must be >= 0 in span::first()"); _LIBCPP_ASSERT(_Count <= size(), "Count out of range in span::first()"); return {data(), _Count}; } - template + template inline _LIBCPP_INLINE_VISIBILITY constexpr span last() const noexcept { - static_assert(_Count >= 0, "Count must be >= 0 in span::last()"); _LIBCPP_ASSERT(_Count <= size(), "Count out of range in span::last()"); return {data() + size() - _Count, _Count}; } @@ -453,7 +444,7 @@ public: return {data() + size() - __count, __count}; } - template + template inline _LIBCPP_INLINE_VISIBILITY constexpr span<_Tp, dynamic_extent> subspan() const noexcept { @@ -484,12 +475,19 @@ public: return __data[__idx]; } - _LIBCPP_INLINE_VISIBILITY constexpr reference operator()(index_type __idx) const noexcept + _LIBCPP_INLINE_VISIBILITY constexpr reference front() const noexcept { - _LIBCPP_ASSERT(__idx >= 0 && __idx < size(), "span() index out of bounds"); - return __data[__idx]; + _LIBCPP_ASSERT(!empty(), "span[].front() on empty span"); + return __data[0]; + } + + _LIBCPP_INLINE_VISIBILITY constexpr reference back() const noexcept + { + _LIBCPP_ASSERT(!empty(), "span[].back() on empty span"); + return __data[size()-1]; } + _LIBCPP_INLINE_VISIBILITY constexpr pointer data() const noexcept { return __data; } // [span.iter], span iterator support @@ -524,20 +522,52 @@ private: index_type __size; }; +// tuple interface +template +struct _LIBCPP_TEMPLATE_VIS tuple_size> + : public integral_constant {}; + +template +struct _LIBCPP_TEMPLATE_VIS tuple_size>; // declared but not defined + + +template +class _LIBCPP_TEMPLATE_VIS tuple_element<_Ip, span<_Tp, _Size>> +{ + static_assert( dynamic_extent != _Size, "std::tuple_element<> not supported for std::span"); + static_assert(_Ip < _Size, "Index out of bounds in std::tuple_element<> (std::span)"); +public: + typedef _Tp type; +}; + +template +_LIBCPP_INLINE_VISIBILITY constexpr +_Tp& +get(span<_Tp, _Size> __s) noexcept +{ + static_assert( dynamic_extent != _Size, "std::get<> not supported for std::span"); + static_assert(_Ip < _Size, "Index out of bounds in std::get<> (std::span)"); + return __s[_Ip]; +} + + // as_bytes & as_writeable_bytes -template - auto as_bytes(span<_Tp, _Extent> __s) noexcept - -> decltype(__s.__as_bytes()) - { return __s.__as_bytes(); } - -template - auto as_writeable_bytes(span<_Tp, _Extent> __s) noexcept - -> typename enable_if, decltype(__s.__as_writeable_bytes())>::type - { return __s.__as_writeable_bytes(); } - -template - constexpr void swap(span<_Tp, _Extent> &__lhs, span<_Tp, _Extent> &__rhs) noexcept - { __lhs.swap(__rhs); } +template +_LIBCPP_INLINE_VISIBILITY +auto as_bytes(span<_Tp, _Extent> __s) noexcept +-> decltype(__s.__as_bytes()) +{ return __s.__as_bytes(); } + +template +_LIBCPP_INLINE_VISIBILITY +auto as_writeable_bytes(span<_Tp, _Extent> __s) noexcept +-> enable_if_t, decltype(__s.__as_writeable_bytes())> +{ return __s.__as_writeable_bytes(); } + +template +_LIBCPP_INLINE_VISIBILITY +constexpr void swap(span<_Tp, _Extent> &__lhs, span<_Tp, _Extent> &__rhs) noexcept +{ __lhs.swap(__rhs); } // Deduction guides diff --git a/libcxx/include/tuple b/libcxx/include/tuple index 15cbf2689d4bd..f7e7ee194da92 100644 --- a/libcxx/include/tuple +++ b/libcxx/include/tuple @@ -1120,6 +1120,7 @@ inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 bool operator==(const tuple<_Tp...>& __x, const tuple<_Up...>& __y) { + static_assert (sizeof...(_Tp) == sizeof...(_Up), "Can't compare tuples of different sizes"); return __tuple_equal()(__x, __y); } @@ -1163,6 +1164,7 @@ inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 bool operator<(const tuple<_Tp...>& __x, const tuple<_Up...>& __y) { + static_assert (sizeof...(_Tp) == sizeof...(_Up), "Can't compare tuples of different sizes"); return __tuple_less()(__x, __y); } diff --git a/libcxx/include/type_traits b/libcxx/include/type_traits index 37b7ca1a33e05..cd67eb89e0384 100644 --- a/libcxx/include/type_traits +++ b/libcxx/include/type_traits @@ -90,6 +90,9 @@ namespace std template struct remove_extent; template struct remove_all_extents; + template struct is_bounded_array; // C++20 + template struct is_unbounded_array; // C++20 + // Member introspection: template struct is_pod; template struct is_trivial; @@ -140,7 +143,10 @@ namespace std // Relationships between types: template struct is_same; template struct is_base_of; + template struct is_convertible; + template struct is_nothrow_convertible; // C++20 + template inline constexpr bool is_nothrow_convertible_v; // C++20 template struct is_invocable; template struct is_invocable_r; @@ -196,6 +202,12 @@ namespace std template using remove_all_extents_t = typename remove_all_extents::type; // C++14 + template + inline constexpr bool is_bounded_array_v + = is_bounded_array::value; // C++20 + inline constexpr bool is_unbounded_array_v + = is_unbounded_array::value; // C++20 + // pointer modifications: template using remove_pointer_t = typename remove_pointer::type; // C++14 @@ -1335,6 +1347,26 @@ template struct _LIBCPP_TEMPLATE_VIS remove_all_extents< template using remove_all_extents_t = typename remove_all_extents<_Tp>::type; #endif +#if _LIBCPP_STD_VER > 17 +// is_bounded_array + +template struct _LIBCPP_TEMPLATE_VIS is_bounded_array : false_type {}; +template struct _LIBCPP_TEMPLATE_VIS is_bounded_array<_Tp[_Np]> : true_type {}; + +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR +bool is_bounded_array_v = is_bounded_array<_Tp>::value; + +// is_unbounded_array + +template struct _LIBCPP_TEMPLATE_VIS is_unbounded_array : false_type {}; +template struct _LIBCPP_TEMPLATE_VIS is_unbounded_array<_Tp[]> : true_type {}; + +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR +bool is_unbounded_array_v = is_unbounded_array<_Tp>::value; +#endif + // decay template @@ -1549,6 +1581,32 @@ _LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_convertible_v = is_convertible<_From, _To>::value; #endif +// is_nothrow_convertible + +#if _LIBCPP_STD_VER > 17 + +template +static void __test_noexcept(_Tp) noexcept; + +template +static bool_constant(declval<_Fm>()))> +__is_nothrow_convertible_test(); + +template +struct __is_nothrow_convertible_helper: decltype(__is_nothrow_convertible_test<_Fm, _To>()) +{ }; + +template +struct is_nothrow_convertible : __or_< + __and_, is_void<_Fm>>, + __and_, __is_nothrow_convertible_helper<_Fm, _To>> +>::type { }; + +template +inline constexpr bool is_nothrow_convertible_v = is_nothrow_convertible<_Fm, _To>::value; + +#endif // _LIBCPP_STD_VER > 17 + // is_empty #if __has_feature(is_empty) || (_GNUC_VER >= 407) diff --git a/libcxx/include/typeinfo b/libcxx/include/typeinfo index 5bcb6b2c1bbc0..a52c984961bfc 100644 --- a/libcxx/include/typeinfo +++ b/libcxx/include/typeinfo @@ -68,7 +68,7 @@ public: #pragma GCC system_header #endif -#if defined(_LIBCPP_ABI_MICROSOFT) && !defined(_LIBCPP_NO_VCRUNTIME) +#if defined(_LIBCPP_ABI_VCRUNTIME) #include #else @@ -262,7 +262,7 @@ public: } // std -#endif // defined(_LIBCPP_ABI_MICROSOFT) && !defined(_LIBCPP_NO_VCRUNTIME) +#endif // defined(_LIBCPP_ABI_VCRUNTIME) _LIBCPP_BEGIN_NAMESPACE_STD _LIBCPP_NORETURN inline _LIBCPP_INLINE_VISIBILITY diff --git a/libcxx/include/unordered_map b/libcxx/include/unordered_map index 87278b07d7497..7ae9805d81d33 100644 --- a/libcxx/include/unordered_map +++ b/libcxx/include/unordered_map @@ -1602,10 +1602,8 @@ _Tp& unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::at(const key_type& __k) { iterator __i = find(__k); -#ifndef _LIBCPP_NO_EXCEPTIONS if (__i == end()) - throw out_of_range("unordered_map::at: key not found"); -#endif // _LIBCPP_NO_EXCEPTIONS + __throw_out_of_range("unordered_map::at: key not found"); return __i->second; } @@ -1614,10 +1612,8 @@ const _Tp& unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::at(const key_type& __k) const { const_iterator __i = find(__k); -#ifndef _LIBCPP_NO_EXCEPTIONS if (__i == end()) - throw out_of_range("unordered_map::at: key not found"); -#endif // _LIBCPP_NO_EXCEPTIONS + __throw_out_of_range("unordered_map::at: key not found"); return __i->second; } diff --git a/libcxx/lib/CMakeLists.txt b/libcxx/lib/CMakeLists.txt index 7c5096da00ef2..22a9bf381c8d6 100644 --- a/libcxx/lib/CMakeLists.txt +++ b/libcxx/lib/CMakeLists.txt @@ -148,27 +148,21 @@ if (LIBCXX_OSX_REEXPORT_LIBCXXABI_SYMBOLS) endif() endif() - if ( CMAKE_OSX_DEPLOYMENT_TARGET STREQUAL "10.6" ) - message(FATAL_ERROR "Mac OSX 10.6 is not supported anymore as a deployment " - "target. If you need support for this, please contact " - "the libc++ maintainers.") + if ("armv7" IN_LIST CMAKE_OSX_ARCHITECTURES) + set(RE_EXPORT_LIST "${CMAKE_CURRENT_SOURCE_DIR}/libc++sjlj-abi.exp") else() - if ("armv7" IN_LIST CMAKE_OSX_ARCHITECTURES) - set(RE_EXPORT_LIST "${CMAKE_CURRENT_SOURCE_DIR}/libc++sjlj-abi.exp") - else() - set(RE_EXPORT_LIST "${CMAKE_CURRENT_SOURCE_DIR}/libc++abi${LIBCXX_LIBCPPABI_VERSION}.exp") - endif() - add_link_flags( - "-compatibility_version 1" - "-install_name /usr/lib/libc++.1.dylib" - "-Wl,-unexported_symbols_list,\"${CMAKE_CURRENT_SOURCE_DIR}/libc++unexp.exp\"" - "-Wl,-reexported_symbols_list,\"${RE_EXPORT_LIST}\"" - "-Wl,-force_symbols_not_weak_list,\"${CMAKE_CURRENT_SOURCE_DIR}/notweak.exp\"" - "-Wl,-force_symbols_weak_list,\"${CMAKE_CURRENT_SOURCE_DIR}/weak.exp\"") - - if (NOT LIBCXX_ENABLE_NEW_DELETE_DEFINITIONS) - add_link_flags("-Wl,-reexported_symbols_list,\"${CMAKE_CURRENT_SOURCE_DIR}/libc++abi-new-delete.exp\"") - endif() + set(RE_EXPORT_LIST "${CMAKE_CURRENT_SOURCE_DIR}/libc++abi${LIBCXX_LIBCPPABI_VERSION}.exp") + endif() + add_link_flags( + "-compatibility_version 1" + "-install_name /usr/lib/libc++.1.dylib" + "-Wl,-unexported_symbols_list,\"${CMAKE_CURRENT_SOURCE_DIR}/libc++unexp.exp\"" + "-Wl,-reexported_symbols_list,\"${RE_EXPORT_LIST}\"" + "-Wl,-force_symbols_not_weak_list,\"${CMAKE_CURRENT_SOURCE_DIR}/notweak.exp\"" + "-Wl,-force_symbols_weak_list,\"${CMAKE_CURRENT_SOURCE_DIR}/weak.exp\"") + + if (NOT LIBCXX_ENABLE_NEW_DELETE_DEFINITIONS) + add_link_flags("-Wl,-reexported_symbols_list,\"${CMAKE_CURRENT_SOURCE_DIR}/libc++abi-new-delete.exp\"") endif() endif() @@ -328,7 +322,7 @@ if (LIBCXX_ENABLE_FILESYSTEM) set(filesystem_flags "${LIBCXX_COMPILE_FLAGS}") check_flag_supported(-std=c++14) - if (NOT MSVC AND LIBCXX_SUPPORTS_STD_EQ_CXX14_FLAG) + if (NOT MSVC AND LIBCXX_SUPPORTS_STD_EQ_CXX14_FLAG AND LIBCXX_STANDARD_VER STREQUAL "c++11") string(REPLACE "-std=c++11" "-std=c++14" filesystem_flags "${LIBCXX_COMPILE_FLAGS}") endif() set_target_properties(cxx_filesystem diff --git a/libcxx/lib/abi/8.0/x86_64-apple-darwin.v1.abilist b/libcxx/lib/abi/8.0/x86_64-apple-darwin.v1.abilist new file mode 100644 index 0000000000000..65a034961341b --- /dev/null +++ b/libcxx/lib/abi/8.0/x86_64-apple-darwin.v1.abilist @@ -0,0 +1,2360 @@ +{'type': 'U', 'is_defined': False, 'name': '__ZNKSt10bad_typeid4whatEv'} +{'type': 'I', 'is_defined': True, 'name': '__ZNKSt10bad_typeid4whatEv'} +{'type': 'U', 'is_defined': False, 'name': '__ZNKSt11logic_error4whatEv'} +{'type': 'I', 'is_defined': True, 'name': '__ZNKSt11logic_error4whatEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt12bad_any_cast4whatEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt12experimental15fundamentals_v112bad_any_cast4whatEv'} +{'type': 'U', 'is_defined': False, 'name': '__ZNKSt13bad_exception4whatEv'} +{'type': 'I', 'is_defined': True, 'name': '__ZNKSt13bad_exception4whatEv'} +{'type': 'U', 'is_defined': False, 'name': '__ZNKSt13runtime_error4whatEv'} +{'type': 'I', 'is_defined': True, 'name': '__ZNKSt13runtime_error4whatEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt16nested_exception14rethrow_nestedEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt18bad_variant_access4whatEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt19bad_optional_access4whatEv'} +{'type': 'U', 'is_defined': False, 'name': '__ZNKSt20bad_array_new_length4whatEv'} +{'type': 'I', 'is_defined': True, 'name': '__ZNKSt20bad_array_new_length4whatEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__110__time_put8__do_putEPcRS1_PK2tmcc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__110__time_put8__do_putEPwRS1_PK2tmcc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__110error_code7messageEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__110moneypunctIcLb0EE11do_groupingEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__110moneypunctIcLb0EE13do_neg_formatEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__110moneypunctIcLb0EE13do_pos_formatEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__110moneypunctIcLb0EE14do_curr_symbolEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__110moneypunctIcLb0EE14do_frac_digitsEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__110moneypunctIcLb0EE16do_decimal_pointEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__110moneypunctIcLb0EE16do_negative_signEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__110moneypunctIcLb0EE16do_positive_signEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__110moneypunctIcLb0EE16do_thousands_sepEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__110moneypunctIcLb1EE11do_groupingEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__110moneypunctIcLb1EE13do_neg_formatEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__110moneypunctIcLb1EE13do_pos_formatEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__110moneypunctIcLb1EE14do_curr_symbolEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__110moneypunctIcLb1EE14do_frac_digitsEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__110moneypunctIcLb1EE16do_decimal_pointEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__110moneypunctIcLb1EE16do_negative_signEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__110moneypunctIcLb1EE16do_positive_signEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__110moneypunctIcLb1EE16do_thousands_sepEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__110moneypunctIwLb0EE11do_groupingEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__110moneypunctIwLb0EE13do_neg_formatEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__110moneypunctIwLb0EE13do_pos_formatEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__110moneypunctIwLb0EE14do_curr_symbolEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__110moneypunctIwLb0EE14do_frac_digitsEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__110moneypunctIwLb0EE16do_decimal_pointEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__110moneypunctIwLb0EE16do_negative_signEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__110moneypunctIwLb0EE16do_positive_signEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__110moneypunctIwLb0EE16do_thousands_sepEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__110moneypunctIwLb1EE11do_groupingEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__110moneypunctIwLb1EE13do_neg_formatEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__110moneypunctIwLb1EE13do_pos_formatEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__110moneypunctIwLb1EE14do_curr_symbolEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__110moneypunctIwLb1EE14do_frac_digitsEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__110moneypunctIwLb1EE16do_decimal_pointEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__110moneypunctIwLb1EE16do_negative_signEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__110moneypunctIwLb1EE16do_positive_signEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__110moneypunctIwLb1EE16do_thousands_sepEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__111__libcpp_db15__decrementableEPKv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__111__libcpp_db15__find_c_from_iEPv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__111__libcpp_db15__subscriptableEPKvl'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__111__libcpp_db17__dereferenceableEPKv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__111__libcpp_db17__find_c_and_lockEPv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__111__libcpp_db22__less_than_comparableEPKvS2_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__111__libcpp_db6unlockEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__111__libcpp_db8__find_cEPv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__111__libcpp_db9__addableEPKvl'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__112bad_weak_ptr4whatEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE12find_last_ofEPKcmm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE13find_first_ofEPKcmm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE16find_last_not_ofEPKcmm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE17find_first_not_ofEPKcmm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE2atEm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4copyEPcmm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4findEPKcmm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4findEcm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE5rfindEPKcmm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE5rfindEcm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7compareEPKc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7compareEmmPKc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7compareEmmPKcm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7compareEmmRKS5_mm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE12find_last_ofEPKwmm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE13find_first_ofEPKwmm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE16find_last_not_ofEPKwmm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE17find_first_not_ofEPKwmm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE2atEm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE4copyEPwmm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE4findEPKwmm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE4findEwm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE5rfindEPKwmm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE5rfindEwm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7compareEPKw'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7compareEmmPKw'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7compareEmmPKwm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7compareEmmRKS5_mm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__112ctype_bynameIcE10do_tolowerEPcPKc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__112ctype_bynameIcE10do_tolowerEc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__112ctype_bynameIcE10do_toupperEPcPKc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__112ctype_bynameIcE10do_toupperEc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__112ctype_bynameIwE10do_scan_isEjPKwS3_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__112ctype_bynameIwE10do_tolowerEPwPKw'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__112ctype_bynameIwE10do_tolowerEw'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__112ctype_bynameIwE10do_toupperEPwPKw'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__112ctype_bynameIwE10do_toupperEw'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__112ctype_bynameIwE11do_scan_notEjPKwS3_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__112ctype_bynameIwE5do_isEPKwS3_Pj'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__112ctype_bynameIwE5do_isEjw'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__112ctype_bynameIwE8do_widenEPKcS3_Pw'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__112ctype_bynameIwE8do_widenEc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__112ctype_bynameIwE9do_narrowEPKwS3_cPc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__112ctype_bynameIwE9do_narrowEwc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__112strstreambuf6pcountEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__113random_device7entropyEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__114__codecvt_utf8IDiE10do_unshiftER11__mbstate_tPcS4_RS4_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__114__codecvt_utf8IDiE11do_encodingEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__114__codecvt_utf8IDiE13do_max_lengthEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__114__codecvt_utf8IDiE16do_always_noconvEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__114__codecvt_utf8IDiE5do_inER11__mbstate_tPKcS5_RS5_PDiS7_RS7_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__114__codecvt_utf8IDiE6do_outER11__mbstate_tPKDiS5_RS5_PcS7_RS7_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__114__codecvt_utf8IDiE9do_lengthER11__mbstate_tPKcS5_m'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__114__codecvt_utf8IDsE10do_unshiftER11__mbstate_tPcS4_RS4_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__114__codecvt_utf8IDsE11do_encodingEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__114__codecvt_utf8IDsE13do_max_lengthEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__114__codecvt_utf8IDsE16do_always_noconvEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__114__codecvt_utf8IDsE5do_inER11__mbstate_tPKcS5_RS5_PDsS7_RS7_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__114__codecvt_utf8IDsE6do_outER11__mbstate_tPKDsS5_RS5_PcS7_RS7_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__114__codecvt_utf8IDsE9do_lengthER11__mbstate_tPKcS5_m'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__114__codecvt_utf8IwE10do_unshiftER11__mbstate_tPcS4_RS4_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__114__codecvt_utf8IwE11do_encodingEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__114__codecvt_utf8IwE13do_max_lengthEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__114__codecvt_utf8IwE16do_always_noconvEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__114__codecvt_utf8IwE5do_inER11__mbstate_tPKcS5_RS5_PwS7_RS7_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__114__codecvt_utf8IwE6do_outER11__mbstate_tPKwS5_RS5_PcS7_RS7_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__114__codecvt_utf8IwE9do_lengthER11__mbstate_tPKcS5_m'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__114collate_bynameIcE10do_compareEPKcS3_S3_S3_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__114collate_bynameIcE12do_transformEPKcS3_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__114collate_bynameIwE10do_compareEPKwS3_S3_S3_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__114collate_bynameIwE12do_transformEPKwS3_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__114error_category10equivalentERKNS_10error_codeEi'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__114error_category10equivalentEiRKNS_15error_conditionE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__114error_category23default_error_conditionEi'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IDiLb0EE10do_unshiftER11__mbstate_tPcS4_RS4_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IDiLb0EE11do_encodingEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IDiLb0EE13do_max_lengthEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IDiLb0EE16do_always_noconvEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IDiLb0EE5do_inER11__mbstate_tPKcS5_RS5_PDiS7_RS7_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IDiLb0EE6do_outER11__mbstate_tPKDiS5_RS5_PcS7_RS7_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IDiLb0EE9do_lengthER11__mbstate_tPKcS5_m'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IDiLb1EE10do_unshiftER11__mbstate_tPcS4_RS4_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IDiLb1EE11do_encodingEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IDiLb1EE13do_max_lengthEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IDiLb1EE16do_always_noconvEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IDiLb1EE5do_inER11__mbstate_tPKcS5_RS5_PDiS7_RS7_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IDiLb1EE6do_outER11__mbstate_tPKDiS5_RS5_PcS7_RS7_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IDiLb1EE9do_lengthER11__mbstate_tPKcS5_m'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IDsLb0EE10do_unshiftER11__mbstate_tPcS4_RS4_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IDsLb0EE11do_encodingEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IDsLb0EE13do_max_lengthEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IDsLb0EE16do_always_noconvEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IDsLb0EE5do_inER11__mbstate_tPKcS5_RS5_PDsS7_RS7_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IDsLb0EE6do_outER11__mbstate_tPKDsS5_RS5_PcS7_RS7_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IDsLb0EE9do_lengthER11__mbstate_tPKcS5_m'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IDsLb1EE10do_unshiftER11__mbstate_tPcS4_RS4_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IDsLb1EE11do_encodingEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IDsLb1EE13do_max_lengthEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IDsLb1EE16do_always_noconvEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IDsLb1EE5do_inER11__mbstate_tPKcS5_RS5_PDsS7_RS7_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IDsLb1EE6do_outER11__mbstate_tPKDsS5_RS5_PcS7_RS7_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IDsLb1EE9do_lengthER11__mbstate_tPKcS5_m'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IwLb0EE10do_unshiftER11__mbstate_tPcS4_RS4_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IwLb0EE11do_encodingEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IwLb0EE13do_max_lengthEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IwLb0EE16do_always_noconvEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IwLb0EE5do_inER11__mbstate_tPKcS5_RS5_PwS7_RS7_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IwLb0EE6do_outER11__mbstate_tPKwS5_RS5_PcS7_RS7_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IwLb0EE9do_lengthER11__mbstate_tPKcS5_m'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IwLb1EE10do_unshiftER11__mbstate_tPcS4_RS4_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IwLb1EE11do_encodingEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IwLb1EE13do_max_lengthEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IwLb1EE16do_always_noconvEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IwLb1EE5do_inER11__mbstate_tPKcS5_RS5_PwS7_RS7_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IwLb1EE6do_outER11__mbstate_tPKwS5_RS5_PcS7_RS7_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IwLb1EE9do_lengthER11__mbstate_tPKcS5_m'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__115basic_streambufIcNS_11char_traitsIcEEE6getlocEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__115basic_streambufIwNS_11char_traitsIwEEE6getlocEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__115error_condition7messageEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIcLb0EE11do_groupingEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIcLb0EE13do_neg_formatEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIcLb0EE13do_pos_formatEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIcLb0EE14do_curr_symbolEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIcLb0EE14do_frac_digitsEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIcLb0EE16do_decimal_pointEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIcLb0EE16do_negative_signEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIcLb0EE16do_positive_signEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIcLb0EE16do_thousands_sepEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIcLb1EE11do_groupingEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIcLb1EE13do_neg_formatEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIcLb1EE13do_pos_formatEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIcLb1EE14do_curr_symbolEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIcLb1EE14do_frac_digitsEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIcLb1EE16do_decimal_pointEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIcLb1EE16do_negative_signEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIcLb1EE16do_positive_signEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIcLb1EE16do_thousands_sepEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIwLb0EE11do_groupingEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIwLb0EE13do_neg_formatEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIwLb0EE13do_pos_formatEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIwLb0EE14do_curr_symbolEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIwLb0EE14do_frac_digitsEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIwLb0EE16do_decimal_pointEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIwLb0EE16do_negative_signEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIwLb0EE16do_positive_signEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIwLb0EE16do_thousands_sepEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIwLb1EE11do_groupingEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIwLb1EE13do_neg_formatEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIwLb1EE13do_pos_formatEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIwLb1EE14do_curr_symbolEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIwLb1EE14do_frac_digitsEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIwLb1EE16do_decimal_pointEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIwLb1EE16do_negative_signEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIwLb1EE16do_positive_signEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIwLb1EE16do_thousands_sepEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__118__time_get_storageIcE15__do_date_orderEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__118__time_get_storageIwE15__do_date_orderEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__119__shared_weak_count13__get_deleterERKSt9type_info'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__120__codecvt_utf8_utf16IDiE10do_unshiftER11__mbstate_tPcS4_RS4_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__120__codecvt_utf8_utf16IDiE11do_encodingEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__120__codecvt_utf8_utf16IDiE13do_max_lengthEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__120__codecvt_utf8_utf16IDiE16do_always_noconvEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__120__codecvt_utf8_utf16IDiE5do_inER11__mbstate_tPKcS5_RS5_PDiS7_RS7_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__120__codecvt_utf8_utf16IDiE6do_outER11__mbstate_tPKDiS5_RS5_PcS7_RS7_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__120__codecvt_utf8_utf16IDiE9do_lengthER11__mbstate_tPKcS5_m'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__120__codecvt_utf8_utf16IDsE10do_unshiftER11__mbstate_tPcS4_RS4_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__120__codecvt_utf8_utf16IDsE11do_encodingEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__120__codecvt_utf8_utf16IDsE13do_max_lengthEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__120__codecvt_utf8_utf16IDsE16do_always_noconvEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__120__codecvt_utf8_utf16IDsE5do_inER11__mbstate_tPKcS5_RS5_PDsS7_RS7_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__120__codecvt_utf8_utf16IDsE6do_outER11__mbstate_tPKDsS5_RS5_PcS7_RS7_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__120__codecvt_utf8_utf16IDsE9do_lengthER11__mbstate_tPKcS5_m'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__120__codecvt_utf8_utf16IwE10do_unshiftER11__mbstate_tPcS4_RS4_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__120__codecvt_utf8_utf16IwE11do_encodingEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__120__codecvt_utf8_utf16IwE13do_max_lengthEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__120__codecvt_utf8_utf16IwE16do_always_noconvEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__120__codecvt_utf8_utf16IwE5do_inER11__mbstate_tPKcS5_RS5_PwS7_RS7_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__120__codecvt_utf8_utf16IwE6do_outER11__mbstate_tPKwS5_RS5_PcS7_RS7_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__120__codecvt_utf8_utf16IwE9do_lengthER11__mbstate_tPKcS5_m'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__120__time_get_c_storageIcE3__XEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__120__time_get_c_storageIcE3__cEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__120__time_get_c_storageIcE3__rEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__120__time_get_c_storageIcE3__xEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__120__time_get_c_storageIcE7__am_pmEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__120__time_get_c_storageIcE7__weeksEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__120__time_get_c_storageIcE8__monthsEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__120__time_get_c_storageIwE3__XEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__120__time_get_c_storageIwE3__cEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__120__time_get_c_storageIwE3__rEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__120__time_get_c_storageIwE3__xEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__120__time_get_c_storageIwE7__am_pmEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__120__time_get_c_storageIwE7__weeksEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__120__time_get_c_storageIwE8__monthsEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__120__vector_base_commonILb1EE20__throw_length_errorEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__120__vector_base_commonILb1EE20__throw_out_of_rangeEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__121__basic_string_commonILb1EE20__throw_length_errorEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__121__basic_string_commonILb1EE20__throw_out_of_rangeEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__123__match_any_but_newlineIcE6__execERNS_7__stateIcEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__123__match_any_but_newlineIwE6__execERNS_7__stateIwEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__124__libcpp_debug_exception4whatEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__15ctypeIcE10do_tolowerEPcPKc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__15ctypeIcE10do_tolowerEc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__15ctypeIcE10do_toupperEPcPKc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__15ctypeIcE10do_toupperEc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__15ctypeIcE8do_widenEPKcS3_Pc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__15ctypeIcE8do_widenEc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__15ctypeIcE9do_narrowEPKcS3_cPc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__15ctypeIcE9do_narrowEcc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__15ctypeIwE10do_scan_isEjPKwS3_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__15ctypeIwE10do_tolowerEPwPKw'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__15ctypeIwE10do_tolowerEw'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__15ctypeIwE10do_toupperEPwPKw'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__15ctypeIwE10do_toupperEw'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__15ctypeIwE11do_scan_notEjPKwS3_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__15ctypeIwE5do_isEPKwS3_Pj'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__15ctypeIwE5do_isEjw'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__15ctypeIwE8do_widenEPKcS3_Pw'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__15ctypeIwE8do_widenEc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__15ctypeIwE9do_narrowEPKwS3_cPc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__15ctypeIwE9do_narrowEwc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__16locale4nameEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__16locale9has_facetERNS0_2idE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__16locale9use_facetERNS0_2idE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__16localeeqERKS0_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17codecvtIDic11__mbstate_tE10do_unshiftERS1_PcS4_RS4_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17codecvtIDic11__mbstate_tE11do_encodingEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17codecvtIDic11__mbstate_tE13do_max_lengthEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17codecvtIDic11__mbstate_tE16do_always_noconvEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17codecvtIDic11__mbstate_tE5do_inERS1_PKcS5_RS5_PDiS7_RS7_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17codecvtIDic11__mbstate_tE6do_outERS1_PKDiS5_RS5_PcS7_RS7_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17codecvtIDic11__mbstate_tE9do_lengthERS1_PKcS5_m'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17codecvtIDsc11__mbstate_tE10do_unshiftERS1_PcS4_RS4_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17codecvtIDsc11__mbstate_tE11do_encodingEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17codecvtIDsc11__mbstate_tE13do_max_lengthEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17codecvtIDsc11__mbstate_tE16do_always_noconvEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17codecvtIDsc11__mbstate_tE5do_inERS1_PKcS5_RS5_PDsS7_RS7_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17codecvtIDsc11__mbstate_tE6do_outERS1_PKDsS5_RS5_PcS7_RS7_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17codecvtIDsc11__mbstate_tE9do_lengthERS1_PKcS5_m'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17codecvtIcc11__mbstate_tE10do_unshiftERS1_PcS4_RS4_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17codecvtIcc11__mbstate_tE11do_encodingEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17codecvtIcc11__mbstate_tE13do_max_lengthEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17codecvtIcc11__mbstate_tE16do_always_noconvEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17codecvtIcc11__mbstate_tE5do_inERS1_PKcS5_RS5_PcS7_RS7_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17codecvtIcc11__mbstate_tE6do_outERS1_PKcS5_RS5_PcS7_RS7_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17codecvtIcc11__mbstate_tE9do_lengthERS1_PKcS5_m'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17codecvtIwc11__mbstate_tE10do_unshiftERS1_PcS4_RS4_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17codecvtIwc11__mbstate_tE11do_encodingEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17codecvtIwc11__mbstate_tE13do_max_lengthEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17codecvtIwc11__mbstate_tE16do_always_noconvEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17codecvtIwc11__mbstate_tE5do_inERS1_PKcS5_RS5_PwS7_RS7_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17codecvtIwc11__mbstate_tE6do_outERS1_PKwS5_RS5_PcS7_RS7_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17codecvtIwc11__mbstate_tE9do_lengthERS1_PKcS5_m'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17collateIcE10do_compareEPKcS3_S3_S3_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17collateIcE12do_transformEPKcS3_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17collateIcE7do_hashEPKcS3_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17collateIwE10do_compareEPKwS3_S3_S3_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17collateIwE12do_transformEPKwS3_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17collateIwE7do_hashEPKwS3_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRPv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRb'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRd'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRe'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRf'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRl'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRt'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRx'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRy'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjS8_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRPv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRb'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRd'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRe'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRf'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRl'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRt'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRx'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRy'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjS8_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEcPKv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEcb'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEcd'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEce'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEcl'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEcm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEcx'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEcy'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwPKv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwb'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwd'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwe'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwl'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwx'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwy'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18ios_base6getlocEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18messagesIcE6do_getEliiRKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18messagesIcE7do_openERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERKNS_6localeE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18messagesIcE8do_closeEl'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18messagesIwE6do_getEliiRKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18messagesIwE7do_openERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERKNS_6localeE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18messagesIwE8do_closeEl'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18numpunctIcE11do_groupingEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18numpunctIcE11do_truenameEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18numpunctIcE12do_falsenameEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18numpunctIcE16do_decimal_pointEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18numpunctIcE16do_thousands_sepEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18numpunctIwE11do_groupingEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18numpunctIwE11do_truenameEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18numpunctIwE12do_falsenameEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18numpunctIwE16do_decimal_pointEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18numpunctIwE16do_thousands_sepEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE10__get_hourERiRS4_S4_RjRKNS_5ctypeIcEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE10__get_yearERiRS4_S4_RjRKNS_5ctypeIcEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE11__get_am_pmERiRS4_S4_RjRKNS_5ctypeIcEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE11__get_monthERiRS4_S4_RjRKNS_5ctypeIcEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE11__get_year4ERiRS4_S4_RjRKNS_5ctypeIcEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE11do_get_dateES4_S4_RNS_8ios_baseERjP2tm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE11do_get_timeES4_S4_RNS_8ios_baseERjP2tm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE11do_get_yearES4_S4_RNS_8ios_baseERjP2tm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE12__get_minuteERiRS4_S4_RjRKNS_5ctypeIcEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE12__get_secondERiRS4_S4_RjRKNS_5ctypeIcEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE13__get_12_hourERiRS4_S4_RjRKNS_5ctypeIcEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE13__get_percentERS4_S4_RjRKNS_5ctypeIcEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE13__get_weekdayERiRS4_S4_RjRKNS_5ctypeIcEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE13do_date_orderEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE14do_get_weekdayES4_S4_RNS_8ios_baseERjP2tm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE15__get_monthnameERiRS4_S4_RjRKNS_5ctypeIcEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE16do_get_monthnameES4_S4_RNS_8ios_baseERjP2tm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE17__get_weekdaynameERiRS4_S4_RjRKNS_5ctypeIcEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE17__get_white_spaceERS4_S4_RjRKNS_5ctypeIcEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE18__get_day_year_numERiRS4_S4_RjRKNS_5ctypeIcEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE3getES4_S4_RNS_8ios_baseERjP2tmPKcSC_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjP2tmcc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE9__get_dayERiRS4_S4_RjRKNS_5ctypeIcEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE10__get_hourERiRS4_S4_RjRKNS_5ctypeIwEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE10__get_yearERiRS4_S4_RjRKNS_5ctypeIwEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE11__get_am_pmERiRS4_S4_RjRKNS_5ctypeIwEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE11__get_monthERiRS4_S4_RjRKNS_5ctypeIwEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE11__get_year4ERiRS4_S4_RjRKNS_5ctypeIwEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE11do_get_dateES4_S4_RNS_8ios_baseERjP2tm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE11do_get_timeES4_S4_RNS_8ios_baseERjP2tm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE11do_get_yearES4_S4_RNS_8ios_baseERjP2tm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE12__get_minuteERiRS4_S4_RjRKNS_5ctypeIwEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE12__get_secondERiRS4_S4_RjRKNS_5ctypeIwEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE13__get_12_hourERiRS4_S4_RjRKNS_5ctypeIwEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE13__get_percentERS4_S4_RjRKNS_5ctypeIwEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE13__get_weekdayERiRS4_S4_RjRKNS_5ctypeIwEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE13do_date_orderEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE14do_get_weekdayES4_S4_RNS_8ios_baseERjP2tm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE15__get_monthnameERiRS4_S4_RjRKNS_5ctypeIwEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE16do_get_monthnameES4_S4_RNS_8ios_baseERjP2tm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE17__get_weekdaynameERiRS4_S4_RjRKNS_5ctypeIwEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE17__get_white_spaceERS4_S4_RjRKNS_5ctypeIwEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE18__get_day_year_numERiRS4_S4_RjRKNS_5ctypeIwEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE3getES4_S4_RNS_8ios_baseERjP2tmPKwSC_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjP2tmcc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE9__get_dayERiRS4_S4_RjRKNS_5ctypeIwEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18time_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE3putES4_RNS_8ios_baseEcPK2tmPKcSC_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18time_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEcPK2tmcc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18time_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE3putES4_RNS_8ios_baseEwPK2tmPKwSC_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18time_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwPK2tmcc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__19money_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_bRNS_8ios_baseERjRNS_12basic_stringIcS3_NS_9allocatorIcEEEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__19money_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_bRNS_8ios_baseERjRe'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__19money_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_bRNS_8ios_baseERjRNS_12basic_stringIwS3_NS_9allocatorIwEEEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__19money_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_bRNS_8ios_baseERjRe'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__19money_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_bRNS_8ios_baseEcRKNS_12basic_stringIcS3_NS_9allocatorIcEEEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__19money_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_bRNS_8ios_baseEce'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__19money_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_bRNS_8ios_baseEwRKNS_12basic_stringIwS3_NS_9allocatorIwEEEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__19money_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_bRNS_8ios_baseEwe'} +{'type': 'U', 'is_defined': False, 'name': '__ZNKSt8bad_cast4whatEv'} +{'type': 'I', 'is_defined': True, 'name': '__ZNKSt8bad_cast4whatEv'} +{'type': 'U', 'is_defined': False, 'name': '__ZNKSt9bad_alloc4whatEv'} +{'type': 'I', 'is_defined': True, 'name': '__ZNKSt9bad_alloc4whatEv'} +{'type': 'U', 'is_defined': False, 'name': '__ZNKSt9exception4whatEv'} +{'type': 'I', 'is_defined': True, 'name': '__ZNKSt9exception4whatEv'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt10bad_typeidC1Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt10bad_typeidC1Ev'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt10bad_typeidC2Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt10bad_typeidC2Ev'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt10bad_typeidD0Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt10bad_typeidD0Ev'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt10bad_typeidD1Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt10bad_typeidD1Ev'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt10bad_typeidD2Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt10bad_typeidD2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt11logic_errorC1EPKc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt11logic_errorC1ERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt11logic_errorC1ERKS_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt11logic_errorC2EPKc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt11logic_errorC2ERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt11logic_errorC2ERKS_'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt11logic_errorD0Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt11logic_errorD0Ev'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt11logic_errorD1Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt11logic_errorD1Ev'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt11logic_errorD2Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt11logic_errorD2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt11logic_erroraSERKS_'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt11range_errorD0Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt11range_errorD0Ev'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt11range_errorD1Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt11range_errorD1Ev'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt11range_errorD2Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt11range_errorD2Ev'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt12domain_errorD0Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt12domain_errorD0Ev'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt12domain_errorD1Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt12domain_errorD1Ev'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt12domain_errorD2Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt12domain_errorD2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt12experimental19bad_optional_accessD0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt12experimental19bad_optional_accessD1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt12experimental19bad_optional_accessD2Ev'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt12length_errorD0Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt12length_errorD0Ev'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt12length_errorD1Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt12length_errorD1Ev'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt12length_errorD2Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt12length_errorD2Ev'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt12out_of_rangeD0Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt12out_of_rangeD0Ev'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt12out_of_rangeD1Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt12out_of_rangeD1Ev'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt12out_of_rangeD2Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt12out_of_rangeD2Ev'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt13bad_exceptionD0Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt13bad_exceptionD0Ev'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt13bad_exceptionD1Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt13bad_exceptionD1Ev'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt13bad_exceptionD2Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt13bad_exceptionD2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt13exception_ptrC1ERKS_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt13exception_ptrC2ERKS_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt13exception_ptrD1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt13exception_ptrD2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt13exception_ptraSERKS_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt13runtime_errorC1EPKc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt13runtime_errorC1ERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt13runtime_errorC1ERKS_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt13runtime_errorC2EPKc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt13runtime_errorC2ERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt13runtime_errorC2ERKS_'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt13runtime_errorD0Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt13runtime_errorD0Ev'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt13runtime_errorD1Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt13runtime_errorD1Ev'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt13runtime_errorD2Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt13runtime_errorD2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt13runtime_erroraSERKS_'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt14overflow_errorD0Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt14overflow_errorD0Ev'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt14overflow_errorD1Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt14overflow_errorD1Ev'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt14overflow_errorD2Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt14overflow_errorD2Ev'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt15underflow_errorD0Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt15underflow_errorD0Ev'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt15underflow_errorD1Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt15underflow_errorD1Ev'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt15underflow_errorD2Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt15underflow_errorD2Ev'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt16invalid_argumentD0Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt16invalid_argumentD0Ev'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt16invalid_argumentD1Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt16invalid_argumentD1Ev'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt16invalid_argumentD2Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt16invalid_argumentD2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt16nested_exceptionC1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt16nested_exceptionC2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt16nested_exceptionD0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt16nested_exceptionD1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt16nested_exceptionD2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt19bad_optional_accessD0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt19bad_optional_accessD1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt19bad_optional_accessD2Ev'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt20bad_array_new_lengthC1Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt20bad_array_new_lengthC1Ev'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt20bad_array_new_lengthC2Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt20bad_array_new_lengthC2Ev'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt20bad_array_new_lengthD0Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt20bad_array_new_lengthD0Ev'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt20bad_array_new_lengthD1Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt20bad_array_new_lengthD1Ev'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt20bad_array_new_lengthD2Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt20bad_array_new_lengthD2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__110__time_getC1EPKc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__110__time_getC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__110__time_getC2EPKc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__110__time_getC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__110__time_getD1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__110__time_getD2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__110__time_putC1EPKc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__110__time_putC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__110__time_putC2EPKc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__110__time_putC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__110__time_putD1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__110__time_putD2Ev'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__110adopt_lockE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__110ctype_base5alnumE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__110ctype_base5alphaE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__110ctype_base5blankE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__110ctype_base5cntrlE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__110ctype_base5digitE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__110ctype_base5graphE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__110ctype_base5lowerE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__110ctype_base5printE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__110ctype_base5punctE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__110ctype_base5spaceE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__110ctype_base5upperE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__110ctype_base6xdigitE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__110defer_lockE', 'size': 0} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__110istrstreamD0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__110istrstreamD1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__110istrstreamD2Ev'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__110moneypunctIcLb0EE2idE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__110moneypunctIcLb0EE4intlE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__110moneypunctIcLb1EE2idE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__110moneypunctIcLb1EE4intlE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__110moneypunctIwLb0EE2idE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__110moneypunctIwLb0EE4intlE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__110moneypunctIwLb1EE2idE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__110moneypunctIwLb1EE4intlE', 'size': 0} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__110ostrstreamD0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__110ostrstreamD1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__110ostrstreamD2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__110to_wstringEd'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__110to_wstringEe'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__110to_wstringEf'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__110to_wstringEi'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__110to_wstringEj'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__110to_wstringEl'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__110to_wstringEm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__110to_wstringEx'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__110to_wstringEy'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__111__call_onceERVmPvPFvS2_E'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__111__libcpp_db10__insert_cEPv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__111__libcpp_db10__insert_iEPv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__111__libcpp_db11__insert_icEPvPKv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__111__libcpp_db15__iterator_copyEPvPKv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__111__libcpp_db16__invalidate_allEPv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__111__libcpp_db4swapEPvS1_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__111__libcpp_db9__erase_cEPv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__111__libcpp_db9__erase_iEPv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__111__libcpp_dbC1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__111__libcpp_dbC2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__111__libcpp_dbD1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__111__libcpp_dbD2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__111__money_getIcE13__gather_infoEbRKNS_6localeERNS_10money_base7patternERcS8_RNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEESF_SF_SF_Ri'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__111__money_getIwE13__gather_infoEbRKNS_6localeERNS_10money_base7patternERwS8_RNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERNS9_IwNSA_IwEENSC_IwEEEESJ_SJ_Ri'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__111__money_putIcE13__gather_infoEbbRKNS_6localeERNS_10money_base7patternERcS8_RNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEESF_SF_Ri'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__111__money_putIcE8__formatEPcRS2_S3_jPKcS5_RKNS_5ctypeIcEEbRKNS_10money_base7patternEccRKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEESL_SL_i'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__111__money_putIwE13__gather_infoEbbRKNS_6localeERNS_10money_base7patternERwS8_RNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERNS9_IwNSA_IwEENSC_IwEEEESJ_Ri'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__111__money_putIwE8__formatEPwRS2_S3_jPKwS5_RKNS_5ctypeIwEEbRKNS_10money_base7patternEwwRKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERKNSE_IwNSF_IwEENSH_IwEEEESQ_i'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__111regex_errorC1ENS_15regex_constants10error_typeE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__111regex_errorC2ENS_15regex_constants10error_typeE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__111regex_errorD0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__111regex_errorD1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__111regex_errorD2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__111this_thread9sleep_forERKNS_6chrono8durationIxNS_5ratioILl1ELl1000000000EEEEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__111timed_mutex4lockEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__111timed_mutex6unlockEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__111timed_mutex8try_lockEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__111timed_mutexC1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__111timed_mutexC2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__111timed_mutexD1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__111timed_mutexD2Ev'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__111try_to_lockE', 'size': 0} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112__do_nothingEPv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112__get_sp_mutEPKv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112__next_primeEm'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__112__rs_default4__c_E', 'size': 0} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112__rs_defaultC1ERKS0_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112__rs_defaultC1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112__rs_defaultC2ERKS0_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112__rs_defaultC2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112__rs_defaultD1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112__rs_defaultD2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112__rs_defaultclEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112bad_weak_ptrD0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112bad_weak_ptrD1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112bad_weak_ptrD2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE21__grow_by_and_replaceEmmmmmmPKc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE2atEm'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4nposE', 'size': 0} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE5eraseEmm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcmm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEmc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6appendEPKc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6appendEPKcm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6appendERKS5_mm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6appendEmc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignEPKc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignEPKcm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignERKS5_mm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignEmc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6insertENS_11__wrap_iterIPKcEEc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6insertEmPKc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6insertEmPKcm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6insertEmRKS5_mm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6insertEmmc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6resizeEmc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7replaceEmmPKc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7replaceEmmPKcm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7replaceEmmRKS5_mm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7replaceEmmmc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7reserveEm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9__grow_byEmmmmmm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9push_backEc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC1ERKS5_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC1ERKS5_RKS4_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC1ERKS5_mmRKS4_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2ERKS5_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2ERKS5_RKS4_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2ERKS5_mmRKS4_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEaSERKS5_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEaSEc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE21__grow_by_and_replaceEmmmmmmPKw'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE2atEm'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE4nposE', 'size': 0} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE5eraseEmm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6__initEPKwm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6__initEPKwmm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6__initEmw'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6appendEPKw'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6appendEPKwm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6appendERKS5_mm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6appendEmw'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6assignEPKw'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6assignEPKwm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6assignERKS5_mm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6assignEmw'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6insertENS_11__wrap_iterIPKwEEw'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6insertEmPKw'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6insertEmPKwm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6insertEmRKS5_mm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6insertEmmw'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6resizeEmw'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7replaceEmmPKw'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7replaceEmmPKwm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7replaceEmmRKS5_mm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7replaceEmmmw'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7reserveEm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE9__grow_byEmmmmmm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE9push_backEw'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC1ERKS5_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC1ERKS5_RKS4_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC1ERKS5_mmRKS4_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC2ERKS5_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC2ERKS5_RKS4_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC2ERKS5_mmRKS4_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEED1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEED2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEaSERKS5_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEaSEw'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112ctype_bynameIcEC1EPKcm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112ctype_bynameIcEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112ctype_bynameIcEC2EPKcm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112ctype_bynameIcEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112ctype_bynameIcED0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112ctype_bynameIcED1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112ctype_bynameIcED2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112ctype_bynameIwEC1EPKcm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112ctype_bynameIwEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112ctype_bynameIwEC2EPKcm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112ctype_bynameIwEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112ctype_bynameIwED0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112ctype_bynameIwED1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112ctype_bynameIwED2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112future_errorC1ENS_10error_codeE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112future_errorC2ENS_10error_codeE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112future_errorD0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112future_errorD1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112future_errorD2Ev'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__112placeholders2_1E', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__112placeholders2_2E', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__112placeholders2_3E', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__112placeholders2_4E', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__112placeholders2_5E', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__112placeholders2_6E', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__112placeholders2_7E', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__112placeholders2_8E', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__112placeholders2_9E', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__112placeholders3_10E', 'size': 0} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112strstreambuf3strEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112strstreambuf4swapERS0_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112strstreambuf6__initEPclS1_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112strstreambuf6freezeEb'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112strstreambuf7seekoffExNS_8ios_base7seekdirEj'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112strstreambuf7seekposENS_4fposI11__mbstate_tEEj'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112strstreambuf8overflowEi'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112strstreambuf9pbackfailEi'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112strstreambuf9underflowEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112strstreambufC1EPFPvmEPFvS1_E'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112strstreambufC1EPKal'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112strstreambufC1EPKcl'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112strstreambufC1EPKhl'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112strstreambufC1EPalS1_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112strstreambufC1EPclS1_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112strstreambufC1EPhlS1_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112strstreambufC1El'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112strstreambufC2EPFPvmEPFvS1_E'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112strstreambufC2EPKal'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112strstreambufC2EPKcl'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112strstreambufC2EPKhl'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112strstreambufC2EPalS1_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112strstreambufC2EPclS1_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112strstreambufC2EPhlS1_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112strstreambufC2El'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112strstreambufD0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112strstreambufD1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112strstreambufD2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112system_error6__initERKNS_10error_codeENS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112system_errorC1ENS_10error_codeE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112system_errorC1ENS_10error_codeEPKc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112system_errorC1ENS_10error_codeERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112system_errorC1EiRKNS_14error_categoryE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112system_errorC1EiRKNS_14error_categoryEPKc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112system_errorC1EiRKNS_14error_categoryERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112system_errorC2ENS_10error_codeE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112system_errorC2ENS_10error_codeEPKc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112system_errorC2ENS_10error_codeERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112system_errorC2EiRKNS_14error_categoryE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112system_errorC2EiRKNS_14error_categoryEPKc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112system_errorC2EiRKNS_14error_categoryERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112system_errorD0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112system_errorD1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112system_errorD2Ev'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__113allocator_argE', 'size': 0} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE3getEPcl'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE3getEPclc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE3getERNS_15basic_streambufIcS2_EE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE3getERNS_15basic_streambufIcS2_EEc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE3getERc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE3getEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE4peekEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE4readEPcl'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE4swapERS3_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE4syncEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE5seekgENS_4fposI11__mbstate_tEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE5seekgExNS_8ios_base7seekdirE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE5tellgEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE5ungetEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE6ignoreEli'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE6sentryC1ERS3_b'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE6sentryC2ERS3_b'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE7getlineEPcl'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE7getlineEPclc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE7putbackEc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE8readsomeEPcl'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEEC1EPNS_15basic_streambufIcS2_EE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEEC2EPNS_15basic_streambufIcS2_EE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEED0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEED1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEED2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsEPFRNS_8ios_baseES5_E'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsEPFRNS_9basic_iosIcS2_EES6_E'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsEPFRS3_S4_E'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsEPNS_15basic_streambufIcS2_EE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERPv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERb'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERd'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERe'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERf'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERi'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERj'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERl'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERs'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERt'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERx'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERy'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE3getEPwl'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE3getEPwlw'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE3getERNS_15basic_streambufIwS2_EE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE3getERNS_15basic_streambufIwS2_EEw'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE3getERw'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE3getEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE4peekEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE4readEPwl'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE4swapERS3_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE4syncEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE5seekgENS_4fposI11__mbstate_tEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE5seekgExNS_8ios_base7seekdirE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE5tellgEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE5ungetEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE6ignoreEli'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE6sentryC1ERS3_b'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE6sentryC2ERS3_b'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE7getlineEPwl'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE7getlineEPwlw'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE7putbackEw'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE8readsomeEPwl'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEEC1EPNS_15basic_streambufIwS2_EE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEEC2EPNS_15basic_streambufIwS2_EE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEED0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEED1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEED2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsEPFRNS_8ios_baseES5_E'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsEPFRNS_9basic_iosIwS2_EES6_E'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsEPFRS3_S4_E'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsEPNS_15basic_streambufIwS2_EE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERPv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERb'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERd'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERe'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERf'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERi'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERj'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERl'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERs'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERt'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERx'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERy'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE3putEc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE4swapERS3_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE5flushEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE5seekpENS_4fposI11__mbstate_tEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE5seekpExNS_8ios_base7seekdirE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE5tellpEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE5writeEPKcl'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE6sentryC1ERS3_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE6sentryC2ERS3_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE6sentryD1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE6sentryD2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEEC1EPNS_15basic_streambufIcS2_EE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEEC2EPNS_15basic_streambufIcS2_EE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEED0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEED1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEED2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEPFRNS_8ios_baseES5_E'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEPFRNS_9basic_iosIcS2_EES6_E'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEPFRS3_S4_E'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEPKv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEPNS_15basic_streambufIcS2_EE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEb'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEd'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEe'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEf'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEi'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEj'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEl'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEs'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEt'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEx'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEy'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEE3putEw'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEE4swapERS3_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEE5flushEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEE5seekpENS_4fposI11__mbstate_tEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEE5seekpExNS_8ios_base7seekdirE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEE5tellpEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEE5writeEPKwl'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEE6sentryC1ERS3_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEE6sentryC2ERS3_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEE6sentryD1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEE6sentryD2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEEC1EPNS_15basic_streambufIwS2_EE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEEC2EPNS_15basic_streambufIwS2_EE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEED0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEED1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEED2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEPFRNS_8ios_baseES5_E'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEPFRNS_9basic_iosIwS2_EES6_E'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEPFRS3_S4_E'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEPKv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEPNS_15basic_streambufIwS2_EE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEb'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEd'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEe'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEf'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEi'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEj'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEl'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEs'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEt'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEx'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEy'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113random_deviceC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113random_deviceC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113random_deviceD1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113random_deviceD2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113random_deviceclEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113shared_futureIvED1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113shared_futureIvED2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113shared_futureIvEaSERKS1_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__114__get_const_dbEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__114__num_get_base10__get_baseERNS_8ios_baseE'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__114__num_get_base5__srcE', 'size': 0} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__114__num_put_base12__format_intEPcPKcbj'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__114__num_put_base14__format_floatEPcPKcj'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__114__num_put_base18__identify_paddingEPcS1_RKNS_8ios_baseE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__114__shared_count12__add_sharedEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__114__shared_count16__release_sharedEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__114__shared_countD0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__114__shared_countD1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__114__shared_countD2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__114basic_iostreamIcNS_11char_traitsIcEEE4swapERS3_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__114basic_iostreamIcNS_11char_traitsIcEEEC1EPNS_15basic_streambufIcS2_EE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__114basic_iostreamIcNS_11char_traitsIcEEEC2EPNS_15basic_streambufIcS2_EE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__114basic_iostreamIcNS_11char_traitsIcEEED0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__114basic_iostreamIcNS_11char_traitsIcEEED1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__114basic_iostreamIcNS_11char_traitsIcEEED2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__114codecvt_bynameIDic11__mbstate_tED0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__114codecvt_bynameIDic11__mbstate_tED1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__114codecvt_bynameIDic11__mbstate_tED2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__114codecvt_bynameIDsc11__mbstate_tED0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__114codecvt_bynameIDsc11__mbstate_tED1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__114codecvt_bynameIDsc11__mbstate_tED2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__114codecvt_bynameIcc11__mbstate_tED0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__114codecvt_bynameIcc11__mbstate_tED1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__114codecvt_bynameIcc11__mbstate_tED2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__114codecvt_bynameIwc11__mbstate_tED0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__114codecvt_bynameIwc11__mbstate_tED1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__114codecvt_bynameIwc11__mbstate_tED2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__114collate_bynameIcEC1EPKcm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__114collate_bynameIcEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__114collate_bynameIcEC2EPKcm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__114collate_bynameIcEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__114collate_bynameIcED0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__114collate_bynameIcED1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__114collate_bynameIcED2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__114collate_bynameIwEC1EPKcm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__114collate_bynameIwEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__114collate_bynameIwEC2EPKcm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__114collate_bynameIwEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__114collate_bynameIwED0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__114collate_bynameIwED1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__114collate_bynameIwED2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__114error_categoryC2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__114error_categoryD0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__114error_categoryD1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__114error_categoryD2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115__get_classnameEPKcb'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115__thread_struct25notify_all_at_thread_exitEPNS_18condition_variableEPNS_5mutexE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115__thread_struct27__make_ready_at_thread_exitEPNS_17__assoc_sub_stateE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115__thread_structC1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115__thread_structC2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115__thread_structD1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115__thread_structD2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE10pubseekoffExNS_8ios_base7seekdirEj'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE10pubseekposENS_4fposI11__mbstate_tEEj'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE4setgEPcS4_S4_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE4setpEPcS4_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE4swapERS3_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE4syncEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE5gbumpEi'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE5imbueERKNS_6localeE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE5pbumpEi'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE5sgetcEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE5sgetnEPcl'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE5sputcEc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE5sputnEPKcl'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE5uflowEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE6sbumpcEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE6setbufEPcl'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE6snextcEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE6xsgetnEPcl'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE6xsputnEPKcl'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE7pubsyncEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE7seekoffExNS_8ios_base7seekdirEj'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE7seekposENS_4fposI11__mbstate_tEEj'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE7sungetcEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE8in_availEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE8overflowEi'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE8pubimbueERKNS_6localeE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE9pbackfailEi'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE9pubsetbufEPcl'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE9showmanycEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE9sputbackcEc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE9underflowEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEEC1ERKS3_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEEC1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEEC2ERKS3_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEEC2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEED0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEED1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEED2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEEaSERKS3_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE10pubseekoffExNS_8ios_base7seekdirEj'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE10pubseekposENS_4fposI11__mbstate_tEEj'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE4setgEPwS4_S4_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE4setpEPwS4_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE4swapERS3_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE4syncEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE5gbumpEi'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE5imbueERKNS_6localeE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE5pbumpEi'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE5sgetcEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE5sgetnEPwl'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE5sputcEw'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE5sputnEPKwl'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE5uflowEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE6sbumpcEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE6setbufEPwl'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE6snextcEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE6xsgetnEPwl'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE6xsputnEPKwl'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE7pubsyncEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE7seekoffExNS_8ios_base7seekdirEj'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE7seekposENS_4fposI11__mbstate_tEEj'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE7sungetcEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE8in_availEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE8overflowEi'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE8pubimbueERKNS_6localeE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE9pbackfailEi'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE9pubsetbufEPwl'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE9showmanycEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE9sputbackcEw'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE9underflowEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEEC1ERKS3_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEEC1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEEC2ERKS3_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEEC2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEED0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEED1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEED2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEEaSERKS3_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115future_categoryEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115numpunct_bynameIcE6__initEPKc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115numpunct_bynameIcEC1EPKcm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115numpunct_bynameIcEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115numpunct_bynameIcEC2EPKcm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115numpunct_bynameIcEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115numpunct_bynameIcED0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115numpunct_bynameIcED1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115numpunct_bynameIcED2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115numpunct_bynameIwE6__initEPKc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115numpunct_bynameIwEC1EPKcm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115numpunct_bynameIwEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115numpunct_bynameIwEC2EPKcm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115numpunct_bynameIwEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115numpunct_bynameIwED0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115numpunct_bynameIwED1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115numpunct_bynameIwED2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115recursive_mutex4lockEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115recursive_mutex6unlockEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115recursive_mutex8try_lockEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115recursive_mutexC1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115recursive_mutexC2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115recursive_mutexD1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115recursive_mutexD2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115system_categoryEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__116__check_groupingERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPjS8_Rj'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__116__narrow_to_utf8ILm16EED0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__116__narrow_to_utf8ILm16EED1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__116__narrow_to_utf8ILm16EED2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__116__narrow_to_utf8ILm32EED0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__116__narrow_to_utf8ILm32EED1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__116__narrow_to_utf8ILm32EED2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__116generic_categoryEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__117__assoc_sub_state10__sub_waitERNS_11unique_lockINS_5mutexEEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__117__assoc_sub_state12__make_readyEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__117__assoc_sub_state13set_exceptionESt13exception_ptr'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__117__assoc_sub_state16__on_zero_sharedEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__117__assoc_sub_state24set_value_at_thread_exitEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__117__assoc_sub_state28set_exception_at_thread_exitESt13exception_ptr'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__117__assoc_sub_state4copyEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__117__assoc_sub_state4waitEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__117__assoc_sub_state9__executeEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__117__assoc_sub_state9set_valueEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__117__widen_from_utf8ILm16EED0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__117__widen_from_utf8ILm16EED1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__117__widen_from_utf8ILm16EED2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__117__widen_from_utf8ILm32EED0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__117__widen_from_utf8ILm32EED1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__117__widen_from_utf8ILm32EED2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__117declare_reachableEPv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__117iostream_categoryEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__117moneypunct_bynameIcLb0EE4initEPKc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__117moneypunct_bynameIcLb1EE4initEPKc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__117moneypunct_bynameIwLb0EE4initEPKc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__117moneypunct_bynameIwLb1EE4initEPKc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__118__time_get_storageIcE4initERKNS_5ctypeIcEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__118__time_get_storageIcE9__analyzeEcRKNS_5ctypeIcEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__118__time_get_storageIcEC1EPKc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__118__time_get_storageIcEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__118__time_get_storageIcEC2EPKc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__118__time_get_storageIcEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__118__time_get_storageIwE4initERKNS_5ctypeIwEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__118__time_get_storageIwE9__analyzeEcRKNS_5ctypeIwEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__118__time_get_storageIwEC1EPKc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__118__time_get_storageIwEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__118__time_get_storageIwEC2EPKc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__118__time_get_storageIwEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__118condition_variable10notify_allEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__118condition_variable10notify_oneEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__118condition_variable15__do_timed_waitERNS_11unique_lockINS_5mutexEEENS_6chrono10time_pointINS5_12system_clockENS5_8durationIxNS_5ratioILl1ELl1000000000EEEEEEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__118condition_variable4waitERNS_11unique_lockINS_5mutexEEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__118condition_variableD1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__118condition_variableD2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__118get_pointer_safetyEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__118shared_timed_mutex11lock_sharedEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__118shared_timed_mutex13unlock_sharedEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__118shared_timed_mutex15try_lock_sharedEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__118shared_timed_mutex4lockEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__118shared_timed_mutex6unlockEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__118shared_timed_mutex8try_lockEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__118shared_timed_mutexC1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__118shared_timed_mutexC2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__119__shared_mutex_base11lock_sharedEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__119__shared_mutex_base13unlock_sharedEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__119__shared_mutex_base15try_lock_sharedEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__119__shared_mutex_base4lockEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__119__shared_mutex_base6unlockEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__119__shared_mutex_base8try_lockEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__119__shared_mutex_baseC1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__119__shared_mutex_baseC2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__119__shared_weak_count10__add_weakEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__119__shared_weak_count12__add_sharedEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__119__shared_weak_count14__release_weakEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__119__shared_weak_count16__release_sharedEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__119__shared_weak_count4lockEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__119__shared_weak_countD0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__119__shared_weak_countD1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__119__shared_weak_countD2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__119__thread_local_dataEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__119declare_no_pointersEPcm'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__119piecewise_constructE', 'size': 0} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__120__get_collation_nameEPKc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__120__throw_system_errorEiPKc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__121__throw_runtime_errorEPKc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__121__undeclare_reachableEPv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__121recursive_timed_mutex4lockEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__121recursive_timed_mutex6unlockEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__121recursive_timed_mutex8try_lockEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__121recursive_timed_mutexC1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__121recursive_timed_mutexC2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__121recursive_timed_mutexD1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__121recursive_timed_mutexD2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__121undeclare_no_pointersEPcm'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__123__libcpp_debug_functionE', 'size': 0} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__124__libcpp_debug_exceptionC1ERKNS_19__libcpp_debug_infoE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__124__libcpp_debug_exceptionC1ERKS0_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__124__libcpp_debug_exceptionC1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__124__libcpp_debug_exceptionC2ERKNS_19__libcpp_debug_infoE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__124__libcpp_debug_exceptionC2ERKS0_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__124__libcpp_debug_exceptionC2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__124__libcpp_debug_exceptionD0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__124__libcpp_debug_exceptionD1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__124__libcpp_debug_exceptionD2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__125notify_all_at_thread_exitERNS_18condition_variableENS_11unique_lockINS_5mutexEEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIaaEEPaEEbT0_S5_T_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIccEEPcEEbT0_S5_T_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIddEEPdEEbT0_S5_T_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIeeEEPeEEbT0_S5_T_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIffEEPfEEbT0_S5_T_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIhhEEPhEEbT0_S5_T_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIiiEEPiEEbT0_S5_T_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIjjEEPjEEbT0_S5_T_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIllEEPlEEbT0_S5_T_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__127__insertion_sort_incompleteIRNS_6__lessImmEEPmEEbT0_S5_T_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIssEEPsEEbT0_S5_T_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIttEEPtEEbT0_S5_T_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIwwEEPwEEbT0_S5_T_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIxxEEPxEEbT0_S5_T_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIyyEEPyEEbT0_S5_T_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__127__libcpp_set_debug_functionEPFvRKNS_19__libcpp_debug_infoEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__129__libcpp_abort_debug_functionERKNS_19__libcpp_debug_infoE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__129__libcpp_throw_debug_functionERKNS_19__libcpp_debug_infoE'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__13cinE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__14cerrE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__14clogE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__14coutE', 'size': 0} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__14stodERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__14stodERKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEEPm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__14stofERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__14stofERKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEEPm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__14stoiERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPmi'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__14stoiERKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEEPmi'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__14stolERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPmi'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__14stolERKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEEPmi'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__14wcinE', 'size': 0} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__15alignEmmRPvRm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__15ctypeIcE13classic_tableEv'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__15ctypeIcE2idE', 'size': 0} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__15ctypeIcEC1EPKjbm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__15ctypeIcEC2EPKjbm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__15ctypeIcED0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__15ctypeIcED1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__15ctypeIcED2Ev'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__15ctypeIwE2idE', 'size': 0} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__15ctypeIwED0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__15ctypeIwED1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__15ctypeIwED2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__15mutex4lockEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__15mutex6unlockEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__15mutex8try_lockEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__15mutexD1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__15mutexD2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__15stoldERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__15stoldERKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEEPm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__15stollERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPmi'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__15stollERKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEEPmi'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__15stoulERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPmi'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__15stoulERKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEEPmi'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__15wcerrE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__15wclogE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__15wcoutE', 'size': 0} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16__itoa8__u32toaEjPc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16__itoa8__u64toaEyPc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16__sortIRNS_6__lessIaaEEPaEEvT0_S5_T_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16__sortIRNS_6__lessIccEEPcEEvT0_S5_T_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16__sortIRNS_6__lessIddEEPdEEvT0_S5_T_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16__sortIRNS_6__lessIeeEEPeEEvT0_S5_T_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16__sortIRNS_6__lessIffEEPfEEvT0_S5_T_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16__sortIRNS_6__lessIhhEEPhEEvT0_S5_T_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16__sortIRNS_6__lessIiiEEPiEEvT0_S5_T_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16__sortIRNS_6__lessIjjEEPjEEvT0_S5_T_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16__sortIRNS_6__lessIllEEPlEEvT0_S5_T_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16__sortIRNS_6__lessImmEEPmEEvT0_S5_T_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16__sortIRNS_6__lessIssEEPsEEvT0_S5_T_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16__sortIRNS_6__lessIttEEPtEEvT0_S5_T_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16__sortIRNS_6__lessIwwEEPwEEvT0_S5_T_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16__sortIRNS_6__lessIxxEEPxEEvT0_S5_T_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16__sortIRNS_6__lessIyyEEPyEEvT0_S5_T_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16chrono12steady_clock3nowEv'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__16chrono12steady_clock9is_steadyE', 'size': 0} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16chrono12system_clock11from_time_tEl'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16chrono12system_clock3nowEv'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__16chrono12system_clock9is_steadyE', 'size': 0} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16chrono12system_clock9to_time_tERKNS0_10time_pointIS1_NS0_8durationIxNS_5ratioILl1ELl1000000EEEEEEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16futureIvE3getEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16futureIvEC1EPNS_17__assoc_sub_stateE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16futureIvEC2EPNS_17__assoc_sub_stateE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16futureIvED1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16futureIvED2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16gslice6__initEm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16locale14__install_ctorERKS0_PNS0_5facetEl'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16locale2id5__getEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16locale2id6__initEv'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__16locale2id9__next_idE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__16locale3allE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__16locale4noneE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__16locale4timeE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__16locale5ctypeE', 'size': 0} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16locale5facet16__on_zero_sharedEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16locale5facetD0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16locale5facetD1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16locale5facetD2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16locale6globalERKS0_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16locale7classicEv'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__16locale7collateE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__16locale7numericE', 'size': 0} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16locale8__globalEv'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__16locale8messagesE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__16locale8monetaryE', 'size': 0} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16localeC1EPKc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16localeC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16localeC1ERKS0_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16localeC1ERKS0_PKci'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16localeC1ERKS0_RKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEi'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16localeC1ERKS0_S2_i'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16localeC1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16localeC2EPKc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16localeC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16localeC2ERKS0_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16localeC2ERKS0_PKci'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16localeC2ERKS0_RKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEi'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16localeC2ERKS0_S2_i'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16localeC2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16localeD1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16localeD2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16localeaSERKS0_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16stoullERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPmi'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16stoullERKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEEPmi'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16thread20hardware_concurrencyEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16thread4joinEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16thread6detachEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16threadD1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16threadD2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__17__sort5IRNS_6__lessIeeEEPeEEjT0_S5_S5_S5_S5_T_'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__17codecvtIDic11__mbstate_tE2idE', 'size': 0} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__17codecvtIDic11__mbstate_tED0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__17codecvtIDic11__mbstate_tED1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__17codecvtIDic11__mbstate_tED2Ev'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__17codecvtIDsc11__mbstate_tE2idE', 'size': 0} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__17codecvtIDsc11__mbstate_tED0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__17codecvtIDsc11__mbstate_tED1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__17codecvtIDsc11__mbstate_tED2Ev'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__17codecvtIcc11__mbstate_tE2idE', 'size': 0} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__17codecvtIcc11__mbstate_tED0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__17codecvtIcc11__mbstate_tED1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__17codecvtIcc11__mbstate_tED2Ev'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__17codecvtIwc11__mbstate_tE2idE', 'size': 0} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__17codecvtIwc11__mbstate_tEC1EPKcm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__17codecvtIwc11__mbstate_tEC1Em'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__17codecvtIwc11__mbstate_tEC2EPKcm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__17codecvtIwc11__mbstate_tEC2Em'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__17codecvtIwc11__mbstate_tED0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__17codecvtIwc11__mbstate_tED1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__17codecvtIwc11__mbstate_tED2Ev'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__17collateIcE2idE', 'size': 0} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__17collateIcED0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__17collateIcED1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__17collateIcED2Ev'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__17collateIwE2idE', 'size': 0} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__17collateIwED0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__17collateIwED1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__17collateIwED2Ev'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE2idE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE2idE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE2idE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE2idE', 'size': 0} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__17promiseIvE10get_futureEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__17promiseIvE13set_exceptionESt13exception_ptr'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__17promiseIvE24set_value_at_thread_exitEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__17promiseIvE28set_exception_at_thread_exitESt13exception_ptr'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__17promiseIvE9set_valueEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__17promiseIvEC1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__17promiseIvEC2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__17promiseIvED1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__17promiseIvED2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18__c_node5__addEPNS_8__i_nodeE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18__c_nodeD0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18__c_nodeD1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18__c_nodeD2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18__get_dbEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18__i_nodeD1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18__i_nodeD2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18__rs_getEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18__sp_mut4lockEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18__sp_mut6unlockEv'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__18ios_base10floatfieldE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__18ios_base10scientificE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__18ios_base11adjustfieldE', 'size': 0} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18ios_base15sync_with_stdioEb'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18ios_base16__call_callbacksENS0_5eventE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18ios_base17register_callbackEPFvNS0_5eventERS0_iEi'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__18ios_base2inE', 'size': 0} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18ios_base33__set_badbit_and_consider_rethrowEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18ios_base34__set_failbit_and_consider_rethrowEv'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__18ios_base3appE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__18ios_base3ateE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__18ios_base3decE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__18ios_base3hexE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__18ios_base3octE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__18ios_base3outE', 'size': 0} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18ios_base4InitC1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18ios_base4InitC2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18ios_base4InitD1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18ios_base4InitD2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18ios_base4initEPv'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__18ios_base4leftE', 'size': 0} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18ios_base4moveERS0_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18ios_base4swapERS0_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18ios_base5clearEj'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__18ios_base5fixedE', 'size': 0} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18ios_base5imbueERKNS_6localeE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18ios_base5iwordEi'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18ios_base5pwordEi'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__18ios_base5rightE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__18ios_base5truncE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__18ios_base6badbitE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__18ios_base6binaryE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__18ios_base6eofbitE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__18ios_base6skipwsE', 'size': 0} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18ios_base6xallocEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18ios_base7copyfmtERKS0_'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__18ios_base7failbitE', 'size': 0} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18ios_base7failureC1EPKcRKNS_10error_codeE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18ios_base7failureC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERKNS_10error_codeE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18ios_base7failureC2EPKcRKNS_10error_codeE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18ios_base7failureC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERKNS_10error_codeE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18ios_base7failureD0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18ios_base7failureD1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18ios_base7failureD2Ev'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__18ios_base7goodbitE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__18ios_base7showposE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__18ios_base7unitbufE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__18ios_base8internalE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__18ios_base8showbaseE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__18ios_base9__xindex_E', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__18ios_base9basefieldE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__18ios_base9boolalphaE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__18ios_base9showpointE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__18ios_base9uppercaseE', 'size': 0} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18ios_baseD0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18ios_baseD1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18ios_baseD2Ev'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__18messagesIcE2idE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__18messagesIwE2idE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__18numpunctIcE2idE', 'size': 0} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18numpunctIcEC1Em'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18numpunctIcEC2Em'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18numpunctIcED0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18numpunctIcED1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18numpunctIcED2Ev'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__18numpunctIwE2idE', 'size': 0} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18numpunctIwEC1Em'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18numpunctIwEC2Em'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18numpunctIwED0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18numpunctIwED1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18numpunctIwED2Ev'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE2idE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE2idE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__18time_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE2idE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__18time_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE2idE', 'size': 0} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18valarrayImE6resizeEmm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18valarrayImEC1Em'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18valarrayImEC2Em'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18valarrayImED1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18valarrayImED2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__19__num_getIcE17__stage2_int_loopEciPcRS2_RjcRKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPjRSD_S2_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__19__num_getIcE17__stage2_int_prepERNS_8ios_baseEPcRc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__19__num_getIcE19__stage2_float_loopEcRbRcPcRS4_ccRKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPjRSE_RjS4_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__19__num_getIcE19__stage2_float_prepERNS_8ios_baseEPcRcS5_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__19__num_getIwE17__stage2_int_loopEwiPcRS2_RjwRKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPjRSD_Pw'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__19__num_getIwE17__stage2_int_prepERNS_8ios_baseEPwRw'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__19__num_getIwE19__stage2_float_loopEwRbRcPcRS4_wwRKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPjRSE_RjPw'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__19__num_getIwE19__stage2_float_prepERNS_8ios_baseEPwRwS5_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__19__num_putIcE21__widen_and_group_intEPcS2_S2_S2_RS2_S3_RKNS_6localeE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__19__num_putIcE23__widen_and_group_floatEPcS2_S2_S2_RS2_S3_RKNS_6localeE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__19__num_putIwE21__widen_and_group_intEPcS2_S2_PwRS3_S4_RKNS_6localeE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__19__num_putIwE23__widen_and_group_floatEPcS2_S2_PwRS3_S4_RKNS_6localeE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__19basic_iosIcNS_11char_traitsIcEEE7copyfmtERKS3_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__19basic_iosIcNS_11char_traitsIcEEED0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__19basic_iosIcNS_11char_traitsIcEEED1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__19basic_iosIcNS_11char_traitsIcEEED2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__19basic_iosIwNS_11char_traitsIwEEE7copyfmtERKS3_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__19basic_iosIwNS_11char_traitsIwEEED0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__19basic_iosIwNS_11char_traitsIwEEED1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__19basic_iosIwNS_11char_traitsIwEEED2Ev'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__19money_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE2idE', 'size': 0} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__19money_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE8__do_getERS4_S4_bRKNS_6localeEjRjRbRKNS_5ctypeIcEERNS_10unique_ptrIcPFvPvEEERPcSM_'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__19money_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE2idE', 'size': 0} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__19money_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE8__do_getERS4_S4_bRKNS_6localeEjRjRbRKNS_5ctypeIwEERNS_10unique_ptrIwPFvPvEEERPwSM_'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__19money_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE2idE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__19money_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE2idE', 'size': 0} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__19strstreamD0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__19strstreamD1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__19strstreamD2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__19to_stringEd'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__19to_stringEe'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__19to_stringEf'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__19to_stringEi'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__19to_stringEj'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__19to_stringEl'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__19to_stringEm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__19to_stringEx'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__19to_stringEy'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__1plIcNS_11char_traitsIcEENS_9allocatorIcEEEENS_12basic_stringIT_T0_T1_EEPKS6_RKS9_'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt8bad_castC1Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt8bad_castC1Ev'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt8bad_castC2Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt8bad_castC2Ev'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt8bad_castD0Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt8bad_castD0Ev'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt8bad_castD1Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt8bad_castD1Ev'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt8bad_castD2Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt8bad_castD2Ev'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt9bad_allocC1Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt9bad_allocC1Ev'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt9bad_allocC2Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt9bad_allocC2Ev'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt9bad_allocD0Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt9bad_allocD0Ev'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt9bad_allocD1Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt9bad_allocD1Ev'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt9bad_allocD2Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt9bad_allocD2Ev'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt9exceptionD0Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt9exceptionD0Ev'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt9exceptionD1Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt9exceptionD1Ev'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt9exceptionD2Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt9exceptionD2Ev'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt9type_infoD0Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt9type_infoD0Ev'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt9type_infoD1Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt9type_infoD1Ev'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt9type_infoD2Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt9type_infoD2Ev'} +{'type': 'U', 'is_defined': False, 'name': '__ZSt10unexpectedv'} +{'type': 'I', 'is_defined': True, 'name': '__ZSt10unexpectedv'} +{'type': 'U', 'is_defined': False, 'name': '__ZSt13get_terminatev'} +{'type': 'I', 'is_defined': True, 'name': '__ZSt13get_terminatev'} +{'type': 'U', 'is_defined': False, 'name': '__ZSt13set_terminatePFvvE'} +{'type': 'I', 'is_defined': True, 'name': '__ZSt13set_terminatePFvvE'} +{'type': 'U', 'is_defined': False, 'name': '__ZSt14get_unexpectedv'} +{'type': 'I', 'is_defined': True, 'name': '__ZSt14get_unexpectedv'} +{'type': 'U', 'is_defined': False, 'name': '__ZSt14set_unexpectedPFvvE'} +{'type': 'I', 'is_defined': True, 'name': '__ZSt14set_unexpectedPFvvE'} +{'type': 'U', 'is_defined': False, 'name': '__ZSt15get_new_handlerv'} +{'type': 'I', 'is_defined': True, 'name': '__ZSt15get_new_handlerv'} +{'type': 'U', 'is_defined': False, 'name': '__ZSt15set_new_handlerPFvvE'} +{'type': 'I', 'is_defined': True, 'name': '__ZSt15set_new_handlerPFvvE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZSt17__throw_bad_allocv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZSt17current_exceptionv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZSt17rethrow_exceptionSt13exception_ptr'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZSt18uncaught_exceptionv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZSt19uncaught_exceptionsv'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZSt7nothrow', 'size': 0} +{'type': 'U', 'is_defined': False, 'name': '__ZSt9terminatev'} +{'type': 'I', 'is_defined': True, 'name': '__ZSt9terminatev'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTCNSt3__110istrstreamE0_NS_13basic_istreamIcNS_11char_traitsIcEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTCNSt3__110ostrstreamE0_NS_13basic_ostreamIcNS_11char_traitsIcEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTCNSt3__114basic_iostreamIcNS_11char_traitsIcEEEE0_NS_13basic_istreamIcS2_EE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTCNSt3__114basic_iostreamIcNS_11char_traitsIcEEEE16_NS_13basic_ostreamIcS2_EE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTCNSt3__19strstreamE0_NS_13basic_istreamIcNS_11char_traitsIcEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTCNSt3__19strstreamE0_NS_14basic_iostreamIcNS_11char_traitsIcEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTCNSt3__19strstreamE16_NS_13basic_ostreamIcNS_11char_traitsIcEEEE', 'size': 0} +{'type': 'U', 'is_defined': False, 'name': '__ZTIDi'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIDi'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIDn'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIDn'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIDs'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIDs'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt12experimental15fundamentals_v112bad_any_castE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt12experimental19bad_optional_accessE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__110__time_getE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__110__time_putE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__110ctype_baseE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__110istrstreamE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__110money_baseE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__110moneypunctIcLb0EEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__110moneypunctIcLb1EEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__110moneypunctIwLb0EEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__110moneypunctIwLb1EEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__110ostrstreamE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__111__money_getIcEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__111__money_getIwEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__111__money_putIcEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__111__money_putIwEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__111regex_errorE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__112bad_weak_ptrE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__112codecvt_baseE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__112ctype_bynameIcEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__112ctype_bynameIwEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__112future_errorE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__112strstreambufE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__112system_errorE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__113basic_istreamIcNS_11char_traitsIcEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__113basic_istreamIwNS_11char_traitsIwEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__113basic_ostreamIcNS_11char_traitsIcEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__113basic_ostreamIwNS_11char_traitsIwEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__113messages_baseE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__114__codecvt_utf8IDiEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__114__codecvt_utf8IDsEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__114__codecvt_utf8IwEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__114__num_get_baseE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__114__num_put_baseE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__114__shared_countE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__114basic_iostreamIcNS_11char_traitsIcEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__114codecvt_bynameIDic11__mbstate_tEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__114codecvt_bynameIDsc11__mbstate_tEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__114codecvt_bynameIcc11__mbstate_tEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__114codecvt_bynameIwc11__mbstate_tEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__114collate_bynameIcEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__114collate_bynameIwEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__114error_categoryE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__115__codecvt_utf16IDiLb0EEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__115__codecvt_utf16IDiLb1EEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__115__codecvt_utf16IDsLb0EEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__115__codecvt_utf16IDsLb1EEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__115__codecvt_utf16IwLb0EEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__115__codecvt_utf16IwLb1EEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__115basic_streambufIcNS_11char_traitsIcEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__115basic_streambufIwNS_11char_traitsIwEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__115messages_bynameIcEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__115messages_bynameIwEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__115numpunct_bynameIcEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__115numpunct_bynameIwEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__115time_get_bynameIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__115time_get_bynameIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__115time_put_bynameIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__115time_put_bynameIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__116__narrow_to_utf8ILm16EEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__116__narrow_to_utf8ILm32EEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__117__assoc_sub_stateE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__117__widen_from_utf8ILm16EEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__117__widen_from_utf8ILm32EEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__117moneypunct_bynameIcLb0EEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__117moneypunct_bynameIcLb1EEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__117moneypunct_bynameIwLb0EEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__117moneypunct_bynameIwLb1EEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__118__time_get_storageIcEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__118__time_get_storageIwEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__119__shared_weak_countE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__120__codecvt_utf8_utf16IDiEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__120__codecvt_utf8_utf16IDsEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__120__codecvt_utf8_utf16IwEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__120__time_get_c_storageIcEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__120__time_get_c_storageIwEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__124__libcpp_debug_exceptionE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__15ctypeIcEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__15ctypeIwEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__16locale5facetE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__17codecvtIDic11__mbstate_tEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__17codecvtIDsc11__mbstate_tEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__17codecvtIcc11__mbstate_tEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__17codecvtIwc11__mbstate_tEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__17collateIcEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__17collateIwEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__18__c_nodeE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__18ios_base7failureE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__18ios_baseE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__18messagesIcEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__18messagesIwEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__18numpunctIcEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__18numpunctIwEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__18time_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__18time_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__19__num_getIcEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__19__num_getIwEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__19__num_putIcEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__19__num_putIwEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__19basic_iosIcNS_11char_traitsIcEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__19basic_iosIwNS_11char_traitsIwEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__19money_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__19money_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__19money_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__19money_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__19strstreamE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__19time_baseE', 'size': 0} +{'type': 'U', 'is_defined': False, 'name': '__ZTIPDi'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIPDi'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIPDn'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIPDn'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIPDs'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIPDs'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIPKDi'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIPKDi'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIPKDn'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIPKDn'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIPKDs'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIPKDs'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIPKa'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIPKa'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIPKb'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIPKb'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIPKc'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIPKc'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIPKd'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIPKd'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIPKe'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIPKe'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIPKf'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIPKf'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIPKh'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIPKh'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIPKi'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIPKi'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIPKj'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIPKj'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIPKl'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIPKl'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIPKm'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIPKm'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIPKs'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIPKs'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIPKt'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIPKt'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIPKv'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIPKv'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIPKw'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIPKw'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIPKx'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIPKx'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIPKy'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIPKy'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIPa'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIPa'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIPb'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIPb'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIPc'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIPc'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIPd'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIPd'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIPe'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIPe'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIPf'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIPf'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIPh'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIPh'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIPi'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIPi'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIPj'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIPj'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIPl'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIPl'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIPm'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIPm'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIPs'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIPs'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIPt'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIPt'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIPv'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIPv'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIPw'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIPw'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIPx'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIPx'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIPy'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIPy'} +{'type': 'U', 'is_defined': False, 'name': '__ZTISt10bad_typeid'} +{'type': 'I', 'is_defined': True, 'name': '__ZTISt10bad_typeid'} +{'type': 'U', 'is_defined': False, 'name': '__ZTISt11logic_error'} +{'type': 'I', 'is_defined': True, 'name': '__ZTISt11logic_error'} +{'type': 'U', 'is_defined': False, 'name': '__ZTISt11range_error'} +{'type': 'I', 'is_defined': True, 'name': '__ZTISt11range_error'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTISt12bad_any_cast', 'size': 0} +{'type': 'U', 'is_defined': False, 'name': '__ZTISt12domain_error'} +{'type': 'I', 'is_defined': True, 'name': '__ZTISt12domain_error'} +{'type': 'U', 'is_defined': False, 'name': '__ZTISt12length_error'} +{'type': 'I', 'is_defined': True, 'name': '__ZTISt12length_error'} +{'type': 'U', 'is_defined': False, 'name': '__ZTISt12out_of_range'} +{'type': 'I', 'is_defined': True, 'name': '__ZTISt12out_of_range'} +{'type': 'U', 'is_defined': False, 'name': '__ZTISt13bad_exception'} +{'type': 'I', 'is_defined': True, 'name': '__ZTISt13bad_exception'} +{'type': 'U', 'is_defined': False, 'name': '__ZTISt13runtime_error'} +{'type': 'I', 'is_defined': True, 'name': '__ZTISt13runtime_error'} +{'type': 'U', 'is_defined': False, 'name': '__ZTISt14overflow_error'} +{'type': 'I', 'is_defined': True, 'name': '__ZTISt14overflow_error'} +{'type': 'U', 'is_defined': False, 'name': '__ZTISt15underflow_error'} +{'type': 'I', 'is_defined': True, 'name': '__ZTISt15underflow_error'} +{'type': 'U', 'is_defined': False, 'name': '__ZTISt16invalid_argument'} +{'type': 'I', 'is_defined': True, 'name': '__ZTISt16invalid_argument'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTISt16nested_exception', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTISt18bad_variant_access', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTISt19bad_optional_access', 'size': 0} +{'type': 'U', 'is_defined': False, 'name': '__ZTISt20bad_array_new_length'} +{'type': 'I', 'is_defined': True, 'name': '__ZTISt20bad_array_new_length'} +{'type': 'U', 'is_defined': False, 'name': '__ZTISt8bad_cast'} +{'type': 'I', 'is_defined': True, 'name': '__ZTISt8bad_cast'} +{'type': 'U', 'is_defined': False, 'name': '__ZTISt9bad_alloc'} +{'type': 'I', 'is_defined': True, 'name': '__ZTISt9bad_alloc'} +{'type': 'U', 'is_defined': False, 'name': '__ZTISt9exception'} +{'type': 'I', 'is_defined': True, 'name': '__ZTISt9exception'} +{'type': 'U', 'is_defined': False, 'name': '__ZTISt9type_info'} +{'type': 'I', 'is_defined': True, 'name': '__ZTISt9type_info'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIa'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIa'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIb'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIb'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIc'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIc'} +{'type': 'U', 'is_defined': False, 'name': '__ZTId'} +{'type': 'I', 'is_defined': True, 'name': '__ZTId'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIe'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIe'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIf'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIf'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIh'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIh'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIi'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIi'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIj'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIj'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIl'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIl'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIm'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIm'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIs'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIs'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIt'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIt'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIv'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIv'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIw'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIw'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIx'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIx'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIy'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIy'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSDi'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSDi'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSDn'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSDn'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSDs'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSDs'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSN10__cxxabiv116__enum_type_infoE'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSN10__cxxabiv116__enum_type_infoE'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSN10__cxxabiv117__array_type_infoE'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSN10__cxxabiv117__array_type_infoE'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSN10__cxxabiv117__class_type_infoE'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSN10__cxxabiv117__class_type_infoE'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSN10__cxxabiv117__pbase_type_infoE'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSN10__cxxabiv117__pbase_type_infoE'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSN10__cxxabiv119__pointer_type_infoE'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSN10__cxxabiv119__pointer_type_infoE'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSN10__cxxabiv120__function_type_infoE'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSN10__cxxabiv120__function_type_infoE'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSN10__cxxabiv120__si_class_type_infoE'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSN10__cxxabiv120__si_class_type_infoE'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSN10__cxxabiv121__vmi_class_type_infoE'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSN10__cxxabiv121__vmi_class_type_infoE'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSN10__cxxabiv123__fundamental_type_infoE'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSN10__cxxabiv123__fundamental_type_infoE'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSN10__cxxabiv129__pointer_to_member_type_infoE'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSN10__cxxabiv129__pointer_to_member_type_infoE'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt12experimental15fundamentals_v112bad_any_castE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt12experimental19bad_optional_accessE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__110ctype_baseE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__110istrstreamE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__110money_baseE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__110moneypunctIcLb0EEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__110moneypunctIcLb1EEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__110moneypunctIwLb0EEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__110moneypunctIwLb1EEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__110ostrstreamE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__111regex_errorE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__112bad_weak_ptrE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__112codecvt_baseE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__112ctype_bynameIcEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__112ctype_bynameIwEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__112future_errorE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__112strstreambufE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__112system_errorE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__113basic_istreamIcNS_11char_traitsIcEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__113basic_istreamIwNS_11char_traitsIwEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__113basic_ostreamIcNS_11char_traitsIcEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__113basic_ostreamIwNS_11char_traitsIwEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__113messages_baseE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__114basic_iostreamIcNS_11char_traitsIcEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__114collate_bynameIcEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__114collate_bynameIwEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__114error_categoryE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__115basic_streambufIcNS_11char_traitsIcEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__115basic_streambufIwNS_11char_traitsIwEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__115messages_bynameIcEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__115messages_bynameIwEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__115numpunct_bynameIcEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__115numpunct_bynameIwEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__115time_get_bynameIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__115time_get_bynameIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__115time_put_bynameIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__115time_put_bynameIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__117moneypunct_bynameIcLb0EEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__117moneypunct_bynameIcLb1EEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__117moneypunct_bynameIwLb0EEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__117moneypunct_bynameIwLb1EEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__15ctypeIcEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__15ctypeIwEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__16locale5facetE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__17codecvtIDic11__mbstate_tEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__17codecvtIDsc11__mbstate_tEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__17codecvtIcc11__mbstate_tEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__17codecvtIwc11__mbstate_tEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__17collateIcEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__17collateIwEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__18__c_nodeE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__18ios_base7failureE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__18ios_baseE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__18messagesIcEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__18messagesIwEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__18numpunctIcEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__18numpunctIwEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__18time_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__18time_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__19__num_getIcEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__19__num_getIwEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__19__num_putIcEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__19__num_putIwEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__19basic_iosIcNS_11char_traitsIcEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__19basic_iosIwNS_11char_traitsIwEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__19money_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__19money_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__19money_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__19money_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__19strstreamE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__19time_baseE', 'size': 0} +{'type': 'U', 'is_defined': False, 'name': '__ZTSPDi'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSPDi'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSPDn'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSPDn'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSPDs'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSPDs'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSPKDi'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSPKDi'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSPKDn'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSPKDn'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSPKDs'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSPKDs'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSPKa'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSPKa'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSPKb'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSPKb'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSPKc'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSPKc'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSPKd'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSPKd'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSPKe'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSPKe'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSPKf'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSPKf'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSPKh'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSPKh'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSPKi'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSPKi'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSPKj'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSPKj'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSPKl'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSPKl'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSPKm'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSPKm'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSPKs'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSPKs'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSPKt'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSPKt'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSPKv'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSPKv'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSPKw'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSPKw'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSPKx'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSPKx'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSPKy'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSPKy'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSPa'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSPa'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSPb'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSPb'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSPc'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSPc'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSPd'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSPd'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSPe'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSPe'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSPf'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSPf'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSPh'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSPh'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSPi'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSPi'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSPj'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSPj'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSPl'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSPl'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSPm'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSPm'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSPs'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSPs'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSPt'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSPt'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSPv'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSPv'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSPw'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSPw'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSPx'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSPx'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSPy'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSPy'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSSt10bad_typeid'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSSt10bad_typeid'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSSt11logic_error'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSSt11logic_error'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSSt11range_error'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSSt11range_error'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSSt12bad_any_cast', 'size': 0} +{'type': 'U', 'is_defined': False, 'name': '__ZTSSt12domain_error'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSSt12domain_error'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSSt12length_error'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSSt12length_error'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSSt12out_of_range'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSSt12out_of_range'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSSt13bad_exception'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSSt13bad_exception'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSSt13runtime_error'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSSt13runtime_error'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSSt14overflow_error'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSSt14overflow_error'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSSt15underflow_error'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSSt15underflow_error'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSSt16invalid_argument'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSSt16invalid_argument'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSSt16nested_exception', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSSt18bad_variant_access', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSSt19bad_optional_access', 'size': 0} +{'type': 'U', 'is_defined': False, 'name': '__ZTSSt20bad_array_new_length'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSSt20bad_array_new_length'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSSt8bad_cast'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSSt8bad_cast'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSSt9bad_alloc'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSSt9bad_alloc'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSSt9exception'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSSt9exception'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSSt9type_info'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSSt9type_info'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSa'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSa'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSb'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSb'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSc'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSc'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSd'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSd'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSe'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSe'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSf'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSf'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSh'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSh'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSi'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSi'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSj'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSj'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSl'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSl'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSm'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSm'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSs'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSs'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSt'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSt'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSv'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSv'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSw'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSw'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSx'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSx'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSy'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSy'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTTNSt3__110istrstreamE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTTNSt3__110ostrstreamE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTTNSt3__113basic_istreamIcNS_11char_traitsIcEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTTNSt3__113basic_istreamIwNS_11char_traitsIwEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTTNSt3__113basic_ostreamIcNS_11char_traitsIcEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTTNSt3__113basic_ostreamIwNS_11char_traitsIwEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTTNSt3__114basic_iostreamIcNS_11char_traitsIcEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTTNSt3__19strstreamE', 'size': 0} +{'type': 'U', 'is_defined': False, 'name': '__ZTVN10__cxxabiv116__enum_type_infoE'} +{'type': 'I', 'is_defined': True, 'name': '__ZTVN10__cxxabiv116__enum_type_infoE'} +{'type': 'U', 'is_defined': False, 'name': '__ZTVN10__cxxabiv117__array_type_infoE'} +{'type': 'I', 'is_defined': True, 'name': '__ZTVN10__cxxabiv117__array_type_infoE'} +{'type': 'U', 'is_defined': False, 'name': '__ZTVN10__cxxabiv117__class_type_infoE'} +{'type': 'I', 'is_defined': True, 'name': '__ZTVN10__cxxabiv117__class_type_infoE'} +{'type': 'U', 'is_defined': False, 'name': '__ZTVN10__cxxabiv117__pbase_type_infoE'} +{'type': 'I', 'is_defined': True, 'name': '__ZTVN10__cxxabiv117__pbase_type_infoE'} +{'type': 'U', 'is_defined': False, 'name': '__ZTVN10__cxxabiv119__pointer_type_infoE'} +{'type': 'I', 'is_defined': True, 'name': '__ZTVN10__cxxabiv119__pointer_type_infoE'} +{'type': 'U', 'is_defined': False, 'name': '__ZTVN10__cxxabiv120__function_type_infoE'} +{'type': 'I', 'is_defined': True, 'name': '__ZTVN10__cxxabiv120__function_type_infoE'} +{'type': 'U', 'is_defined': False, 'name': '__ZTVN10__cxxabiv120__si_class_type_infoE'} +{'type': 'I', 'is_defined': True, 'name': '__ZTVN10__cxxabiv120__si_class_type_infoE'} +{'type': 'U', 'is_defined': False, 'name': '__ZTVN10__cxxabiv121__vmi_class_type_infoE'} +{'type': 'I', 'is_defined': True, 'name': '__ZTVN10__cxxabiv121__vmi_class_type_infoE'} +{'type': 'U', 'is_defined': False, 'name': '__ZTVN10__cxxabiv123__fundamental_type_infoE'} +{'type': 'I', 'is_defined': True, 'name': '__ZTVN10__cxxabiv123__fundamental_type_infoE'} +{'type': 'U', 'is_defined': False, 'name': '__ZTVN10__cxxabiv129__pointer_to_member_type_infoE'} +{'type': 'I', 'is_defined': True, 'name': '__ZTVN10__cxxabiv129__pointer_to_member_type_infoE'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt12experimental15fundamentals_v112bad_any_castE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt12experimental19bad_optional_accessE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__110istrstreamE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__110moneypunctIcLb0EEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__110moneypunctIcLb1EEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__110moneypunctIwLb0EEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__110moneypunctIwLb1EEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__110ostrstreamE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__111regex_errorE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__112bad_weak_ptrE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__112ctype_bynameIcEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__112ctype_bynameIwEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__112future_errorE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__112strstreambufE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__112system_errorE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__113basic_istreamIcNS_11char_traitsIcEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__113basic_istreamIwNS_11char_traitsIwEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__113basic_ostreamIcNS_11char_traitsIcEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__113basic_ostreamIwNS_11char_traitsIwEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__114__codecvt_utf8IDiEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__114__codecvt_utf8IDsEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__114__codecvt_utf8IwEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__114__shared_countE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__114basic_iostreamIcNS_11char_traitsIcEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__114codecvt_bynameIDic11__mbstate_tEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__114codecvt_bynameIDsc11__mbstate_tEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__114codecvt_bynameIcc11__mbstate_tEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__114codecvt_bynameIwc11__mbstate_tEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__114collate_bynameIcEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__114collate_bynameIwEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__114error_categoryE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__115__codecvt_utf16IDiLb0EEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__115__codecvt_utf16IDiLb1EEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__115__codecvt_utf16IDsLb0EEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__115__codecvt_utf16IDsLb1EEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__115__codecvt_utf16IwLb0EEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__115__codecvt_utf16IwLb1EEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__115basic_streambufIcNS_11char_traitsIcEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__115basic_streambufIwNS_11char_traitsIwEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__115messages_bynameIcEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__115messages_bynameIwEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__115numpunct_bynameIcEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__115numpunct_bynameIwEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__115time_get_bynameIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__115time_get_bynameIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__115time_put_bynameIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__115time_put_bynameIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__116__narrow_to_utf8ILm16EEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__116__narrow_to_utf8ILm32EEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__117__assoc_sub_stateE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__117__widen_from_utf8ILm16EEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__117__widen_from_utf8ILm32EEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__117moneypunct_bynameIcLb0EEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__117moneypunct_bynameIcLb1EEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__117moneypunct_bynameIwLb0EEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__117moneypunct_bynameIwLb1EEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__119__shared_weak_countE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__120__codecvt_utf8_utf16IDiEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__120__codecvt_utf8_utf16IDsEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__120__codecvt_utf8_utf16IwEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__124__libcpp_debug_exceptionE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__15ctypeIcEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__15ctypeIwEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__16locale5facetE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__17codecvtIDic11__mbstate_tEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__17codecvtIDsc11__mbstate_tEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__17codecvtIcc11__mbstate_tEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__17codecvtIwc11__mbstate_tEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__17collateIcEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__17collateIwEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__18__c_nodeE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__18ios_base7failureE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__18ios_baseE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__18messagesIcEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__18messagesIwEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__18numpunctIcEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__18numpunctIwEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__18time_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__18time_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__19basic_iosIcNS_11char_traitsIcEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__19basic_iosIwNS_11char_traitsIwEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__19money_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__19money_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__19money_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__19money_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__19strstreamE', 'size': 0} +{'type': 'U', 'is_defined': False, 'name': '__ZTVSt10bad_typeid'} +{'type': 'I', 'is_defined': True, 'name': '__ZTVSt10bad_typeid'} +{'type': 'U', 'is_defined': False, 'name': '__ZTVSt11logic_error'} +{'type': 'I', 'is_defined': True, 'name': '__ZTVSt11logic_error'} +{'type': 'U', 'is_defined': False, 'name': '__ZTVSt11range_error'} +{'type': 'I', 'is_defined': True, 'name': '__ZTVSt11range_error'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVSt12bad_any_cast', 'size': 0} +{'type': 'U', 'is_defined': False, 'name': '__ZTVSt12domain_error'} +{'type': 'I', 'is_defined': True, 'name': '__ZTVSt12domain_error'} +{'type': 'U', 'is_defined': False, 'name': '__ZTVSt12length_error'} +{'type': 'I', 'is_defined': True, 'name': '__ZTVSt12length_error'} +{'type': 'U', 'is_defined': False, 'name': '__ZTVSt12out_of_range'} +{'type': 'I', 'is_defined': True, 'name': '__ZTVSt12out_of_range'} +{'type': 'U', 'is_defined': False, 'name': '__ZTVSt13bad_exception'} +{'type': 'I', 'is_defined': True, 'name': '__ZTVSt13bad_exception'} +{'type': 'U', 'is_defined': False, 'name': '__ZTVSt13runtime_error'} +{'type': 'I', 'is_defined': True, 'name': '__ZTVSt13runtime_error'} +{'type': 'U', 'is_defined': False, 'name': '__ZTVSt14overflow_error'} +{'type': 'I', 'is_defined': True, 'name': '__ZTVSt14overflow_error'} +{'type': 'U', 'is_defined': False, 'name': '__ZTVSt15underflow_error'} +{'type': 'I', 'is_defined': True, 'name': '__ZTVSt15underflow_error'} +{'type': 'U', 'is_defined': False, 'name': '__ZTVSt16invalid_argument'} +{'type': 'I', 'is_defined': True, 'name': '__ZTVSt16invalid_argument'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVSt16nested_exception', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVSt18bad_variant_access', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVSt19bad_optional_access', 'size': 0} +{'type': 'U', 'is_defined': False, 'name': '__ZTVSt20bad_array_new_length'} +{'type': 'I', 'is_defined': True, 'name': '__ZTVSt20bad_array_new_length'} +{'type': 'U', 'is_defined': False, 'name': '__ZTVSt8bad_cast'} +{'type': 'I', 'is_defined': True, 'name': '__ZTVSt8bad_cast'} +{'type': 'U', 'is_defined': False, 'name': '__ZTVSt9bad_alloc'} +{'type': 'I', 'is_defined': True, 'name': '__ZTVSt9bad_alloc'} +{'type': 'U', 'is_defined': False, 'name': '__ZTVSt9exception'} +{'type': 'I', 'is_defined': True, 'name': '__ZTVSt9exception'} +{'type': 'U', 'is_defined': False, 'name': '__ZTVSt9type_info'} +{'type': 'I', 'is_defined': True, 'name': '__ZTVSt9type_info'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZThn16_NSt3__114basic_iostreamIcNS_11char_traitsIcEEED0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZThn16_NSt3__114basic_iostreamIcNS_11char_traitsIcEEED1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZThn16_NSt3__19strstreamD0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZThn16_NSt3__19strstreamD1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZTv0_n24_NSt3__110istrstreamD0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZTv0_n24_NSt3__110istrstreamD1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZTv0_n24_NSt3__110ostrstreamD0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZTv0_n24_NSt3__110ostrstreamD1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZTv0_n24_NSt3__113basic_istreamIcNS_11char_traitsIcEEED0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZTv0_n24_NSt3__113basic_istreamIcNS_11char_traitsIcEEED1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZTv0_n24_NSt3__113basic_istreamIwNS_11char_traitsIwEEED0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZTv0_n24_NSt3__113basic_istreamIwNS_11char_traitsIwEEED1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZTv0_n24_NSt3__113basic_ostreamIcNS_11char_traitsIcEEED0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZTv0_n24_NSt3__113basic_ostreamIcNS_11char_traitsIcEEED1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZTv0_n24_NSt3__113basic_ostreamIwNS_11char_traitsIwEEED0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZTv0_n24_NSt3__113basic_ostreamIwNS_11char_traitsIwEEED1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZTv0_n24_NSt3__114basic_iostreamIcNS_11char_traitsIcEEED0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZTv0_n24_NSt3__114basic_iostreamIcNS_11char_traitsIcEEED1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZTv0_n24_NSt3__19strstreamD0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZTv0_n24_NSt3__19strstreamD1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZdaPv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZdaPvRKSt9nothrow_t'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZdaPvSt11align_val_t'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZdaPvSt11align_val_tRKSt9nothrow_t'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZdaPvm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZdaPvmSt11align_val_t'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZdlPv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZdlPvRKSt9nothrow_t'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZdlPvSt11align_val_t'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZdlPvSt11align_val_tRKSt9nothrow_t'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZdlPvm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZdlPvmSt11align_val_t'} +{'type': 'FUNC', 'is_defined': True, 'name': '__Znam'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZnamRKSt9nothrow_t'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZnamSt11align_val_t'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZnamSt11align_val_tRKSt9nothrow_t'} +{'type': 'FUNC', 'is_defined': True, 'name': '__Znwm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZnwmRKSt9nothrow_t'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZnwmSt11align_val_t'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZnwmSt11align_val_tRKSt9nothrow_t'} +{'type': 'U', 'is_defined': False, 'name': '___cxa_allocate_exception'} +{'type': 'I', 'is_defined': True, 'name': '___cxa_allocate_exception'} +{'type': 'U', 'is_defined': False, 'name': '___cxa_atexit'} +{'type': 'U', 'is_defined': False, 'name': '___cxa_bad_cast'} +{'type': 'I', 'is_defined': True, 'name': '___cxa_bad_cast'} +{'type': 'U', 'is_defined': False, 'name': '___cxa_bad_typeid'} +{'type': 'I', 'is_defined': True, 'name': '___cxa_bad_typeid'} +{'type': 'U', 'is_defined': False, 'name': '___cxa_begin_catch'} +{'type': 'I', 'is_defined': True, 'name': '___cxa_begin_catch'} +{'type': 'U', 'is_defined': False, 'name': '___cxa_call_unexpected'} +{'type': 'I', 'is_defined': True, 'name': '___cxa_call_unexpected'} +{'type': 'U', 'is_defined': False, 'name': '___cxa_current_exception_type'} +{'type': 'I', 'is_defined': True, 'name': '___cxa_current_exception_type'} +{'type': 'U', 'is_defined': False, 'name': '___cxa_current_primary_exception'} +{'type': 'U', 'is_defined': False, 'name': '___cxa_decrement_exception_refcount'} +{'type': 'U', 'is_defined': False, 'name': '___cxa_deleted_virtual'} +{'type': 'I', 'is_defined': True, 'name': '___cxa_deleted_virtual'} +{'type': 'U', 'is_defined': False, 'name': '___cxa_demangle'} +{'type': 'I', 'is_defined': True, 'name': '___cxa_demangle'} +{'type': 'U', 'is_defined': False, 'name': '___cxa_end_catch'} +{'type': 'I', 'is_defined': True, 'name': '___cxa_end_catch'} +{'type': 'U', 'is_defined': False, 'name': '___cxa_free_exception'} +{'type': 'I', 'is_defined': True, 'name': '___cxa_free_exception'} +{'type': 'U', 'is_defined': False, 'name': '___cxa_get_exception_ptr'} +{'type': 'I', 'is_defined': True, 'name': '___cxa_get_exception_ptr'} +{'type': 'U', 'is_defined': False, 'name': '___cxa_get_globals'} +{'type': 'I', 'is_defined': True, 'name': '___cxa_get_globals'} +{'type': 'U', 'is_defined': False, 'name': '___cxa_get_globals_fast'} +{'type': 'I', 'is_defined': True, 'name': '___cxa_get_globals_fast'} +{'type': 'U', 'is_defined': False, 'name': '___cxa_guard_abort'} +{'type': 'I', 'is_defined': True, 'name': '___cxa_guard_abort'} +{'type': 'U', 'is_defined': False, 'name': '___cxa_guard_acquire'} +{'type': 'I', 'is_defined': True, 'name': '___cxa_guard_acquire'} +{'type': 'U', 'is_defined': False, 'name': '___cxa_guard_release'} +{'type': 'I', 'is_defined': True, 'name': '___cxa_guard_release'} +{'type': 'U', 'is_defined': False, 'name': '___cxa_increment_exception_refcount'} +{'type': 'U', 'is_defined': False, 'name': '___cxa_pure_virtual'} +{'type': 'I', 'is_defined': True, 'name': '___cxa_pure_virtual'} +{'type': 'U', 'is_defined': False, 'name': '___cxa_rethrow'} +{'type': 'I', 'is_defined': True, 'name': '___cxa_rethrow'} +{'type': 'U', 'is_defined': False, 'name': '___cxa_rethrow_primary_exception'} +{'type': 'U', 'is_defined': False, 'name': '___cxa_throw'} +{'type': 'I', 'is_defined': True, 'name': '___cxa_throw'} +{'type': 'U', 'is_defined': False, 'name': '___cxa_uncaught_exceptions'} +{'type': 'U', 'is_defined': False, 'name': '___cxa_vec_cctor'} +{'type': 'I', 'is_defined': True, 'name': '___cxa_vec_cctor'} +{'type': 'U', 'is_defined': False, 'name': '___cxa_vec_cleanup'} +{'type': 'I', 'is_defined': True, 'name': '___cxa_vec_cleanup'} +{'type': 'U', 'is_defined': False, 'name': '___cxa_vec_ctor'} +{'type': 'I', 'is_defined': True, 'name': '___cxa_vec_ctor'} +{'type': 'U', 'is_defined': False, 'name': '___cxa_vec_delete'} +{'type': 'I', 'is_defined': True, 'name': '___cxa_vec_delete'} +{'type': 'U', 'is_defined': False, 'name': '___cxa_vec_delete2'} +{'type': 'I', 'is_defined': True, 'name': '___cxa_vec_delete2'} +{'type': 'U', 'is_defined': False, 'name': '___cxa_vec_delete3'} +{'type': 'I', 'is_defined': True, 'name': '___cxa_vec_delete3'} +{'type': 'U', 'is_defined': False, 'name': '___cxa_vec_dtor'} +{'type': 'I', 'is_defined': True, 'name': '___cxa_vec_dtor'} +{'type': 'U', 'is_defined': False, 'name': '___cxa_vec_new'} +{'type': 'I', 'is_defined': True, 'name': '___cxa_vec_new'} +{'type': 'U', 'is_defined': False, 'name': '___cxa_vec_new2'} +{'type': 'I', 'is_defined': True, 'name': '___cxa_vec_new2'} +{'type': 'U', 'is_defined': False, 'name': '___cxa_vec_new3'} +{'type': 'I', 'is_defined': True, 'name': '___cxa_vec_new3'} +{'type': 'U', 'is_defined': False, 'name': '___dynamic_cast'} +{'type': 'I', 'is_defined': True, 'name': '___dynamic_cast'} +{'type': 'U', 'is_defined': False, 'name': '___gxx_personality_v0'} +{'type': 'I', 'is_defined': True, 'name': '___gxx_personality_v0'} diff --git a/libcxx/lib/abi/8.0/x86_64-apple-darwin.v2.abilist b/libcxx/lib/abi/8.0/x86_64-apple-darwin.v2.abilist new file mode 100644 index 0000000000000..5880a3bfd4f6f --- /dev/null +++ b/libcxx/lib/abi/8.0/x86_64-apple-darwin.v2.abilist @@ -0,0 +1,2315 @@ +{'type': 'U', 'is_defined': False, 'name': '__ZNKSt10bad_typeid4whatEv'} +{'type': 'I', 'is_defined': True, 'name': '__ZNKSt10bad_typeid4whatEv'} +{'type': 'U', 'is_defined': False, 'name': '__ZNKSt11logic_error4whatEv'} +{'type': 'I', 'is_defined': True, 'name': '__ZNKSt11logic_error4whatEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt12bad_any_cast4whatEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt12experimental15fundamentals_v112bad_any_cast4whatEv'} +{'type': 'U', 'is_defined': False, 'name': '__ZNKSt13bad_exception4whatEv'} +{'type': 'I', 'is_defined': True, 'name': '__ZNKSt13bad_exception4whatEv'} +{'type': 'U', 'is_defined': False, 'name': '__ZNKSt13runtime_error4whatEv'} +{'type': 'I', 'is_defined': True, 'name': '__ZNKSt13runtime_error4whatEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt16nested_exception14rethrow_nestedEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt18bad_variant_access4whatEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt19bad_optional_access4whatEv'} +{'type': 'U', 'is_defined': False, 'name': '__ZNKSt20bad_array_new_length4whatEv'} +{'type': 'I', 'is_defined': True, 'name': '__ZNKSt20bad_array_new_length4whatEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__210__time_put8__do_putEPcRS1_PK2tmcc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__210__time_put8__do_putEPwRS1_PK2tmcc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__210error_code7messageEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__210moneypunctIcLb0EE11do_groupingEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__210moneypunctIcLb0EE13do_neg_formatEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__210moneypunctIcLb0EE13do_pos_formatEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__210moneypunctIcLb0EE14do_curr_symbolEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__210moneypunctIcLb0EE14do_frac_digitsEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__210moneypunctIcLb0EE16do_decimal_pointEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__210moneypunctIcLb0EE16do_negative_signEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__210moneypunctIcLb0EE16do_positive_signEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__210moneypunctIcLb0EE16do_thousands_sepEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__210moneypunctIcLb1EE11do_groupingEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__210moneypunctIcLb1EE13do_neg_formatEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__210moneypunctIcLb1EE13do_pos_formatEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__210moneypunctIcLb1EE14do_curr_symbolEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__210moneypunctIcLb1EE14do_frac_digitsEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__210moneypunctIcLb1EE16do_decimal_pointEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__210moneypunctIcLb1EE16do_negative_signEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__210moneypunctIcLb1EE16do_positive_signEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__210moneypunctIcLb1EE16do_thousands_sepEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__210moneypunctIwLb0EE11do_groupingEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__210moneypunctIwLb0EE13do_neg_formatEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__210moneypunctIwLb0EE13do_pos_formatEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__210moneypunctIwLb0EE14do_curr_symbolEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__210moneypunctIwLb0EE14do_frac_digitsEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__210moneypunctIwLb0EE16do_decimal_pointEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__210moneypunctIwLb0EE16do_negative_signEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__210moneypunctIwLb0EE16do_positive_signEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__210moneypunctIwLb0EE16do_thousands_sepEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__210moneypunctIwLb1EE11do_groupingEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__210moneypunctIwLb1EE13do_neg_formatEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__210moneypunctIwLb1EE13do_pos_formatEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__210moneypunctIwLb1EE14do_curr_symbolEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__210moneypunctIwLb1EE14do_frac_digitsEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__210moneypunctIwLb1EE16do_decimal_pointEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__210moneypunctIwLb1EE16do_negative_signEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__210moneypunctIwLb1EE16do_positive_signEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__210moneypunctIwLb1EE16do_thousands_sepEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__211__libcpp_db15__decrementableEPKv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__211__libcpp_db15__find_c_from_iEPv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__211__libcpp_db15__subscriptableEPKvl'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__211__libcpp_db17__dereferenceableEPKv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__211__libcpp_db17__find_c_and_lockEPv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__211__libcpp_db22__less_than_comparableEPKvS2_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__211__libcpp_db6unlockEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__211__libcpp_db8__find_cEPv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__211__libcpp_db9__addableEPKvl'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__212bad_weak_ptr4whatEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE12find_last_ofEPKcmm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE13find_first_ofEPKcmm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE16find_last_not_ofEPKcmm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE17find_first_not_ofEPKcmm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE2atEm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4copyEPcmm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4findEPKcmm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4findEcm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE5rfindEPKcmm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE5rfindEcm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7compareEPKc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7compareEmmPKc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7compareEmmPKcm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7compareEmmRKS5_mm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE12find_last_ofEPKwmm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE13find_first_ofEPKwmm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE16find_last_not_ofEPKwmm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE17find_first_not_ofEPKwmm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE2atEm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE4copyEPwmm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE4findEPKwmm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE4findEwm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE5rfindEPKwmm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE5rfindEwm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7compareEPKw'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7compareEmmPKw'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7compareEmmPKwm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7compareEmmRKS5_mm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__212ctype_bynameIcE10do_tolowerEPcPKc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__212ctype_bynameIcE10do_tolowerEc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__212ctype_bynameIcE10do_toupperEPcPKc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__212ctype_bynameIcE10do_toupperEc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__212ctype_bynameIwE10do_scan_isEjPKwS3_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__212ctype_bynameIwE10do_tolowerEPwPKw'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__212ctype_bynameIwE10do_tolowerEw'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__212ctype_bynameIwE10do_toupperEPwPKw'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__212ctype_bynameIwE10do_toupperEw'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__212ctype_bynameIwE11do_scan_notEjPKwS3_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__212ctype_bynameIwE5do_isEPKwS3_Pj'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__212ctype_bynameIwE5do_isEjw'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__212ctype_bynameIwE8do_widenEPKcS3_Pw'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__212ctype_bynameIwE8do_widenEc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__212ctype_bynameIwE9do_narrowEPKwS3_cPc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__212ctype_bynameIwE9do_narrowEwc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__212strstreambuf6pcountEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__213random_device7entropyEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__214__codecvt_utf8IDiE10do_unshiftER11__mbstate_tPcS4_RS4_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__214__codecvt_utf8IDiE11do_encodingEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__214__codecvt_utf8IDiE13do_max_lengthEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__214__codecvt_utf8IDiE16do_always_noconvEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__214__codecvt_utf8IDiE5do_inER11__mbstate_tPKcS5_RS5_PDiS7_RS7_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__214__codecvt_utf8IDiE6do_outER11__mbstate_tPKDiS5_RS5_PcS7_RS7_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__214__codecvt_utf8IDiE9do_lengthER11__mbstate_tPKcS5_m'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__214__codecvt_utf8IDsE10do_unshiftER11__mbstate_tPcS4_RS4_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__214__codecvt_utf8IDsE11do_encodingEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__214__codecvt_utf8IDsE13do_max_lengthEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__214__codecvt_utf8IDsE16do_always_noconvEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__214__codecvt_utf8IDsE5do_inER11__mbstate_tPKcS5_RS5_PDsS7_RS7_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__214__codecvt_utf8IDsE6do_outER11__mbstate_tPKDsS5_RS5_PcS7_RS7_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__214__codecvt_utf8IDsE9do_lengthER11__mbstate_tPKcS5_m'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__214__codecvt_utf8IwE10do_unshiftER11__mbstate_tPcS4_RS4_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__214__codecvt_utf8IwE11do_encodingEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__214__codecvt_utf8IwE13do_max_lengthEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__214__codecvt_utf8IwE16do_always_noconvEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__214__codecvt_utf8IwE5do_inER11__mbstate_tPKcS5_RS5_PwS7_RS7_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__214__codecvt_utf8IwE6do_outER11__mbstate_tPKwS5_RS5_PcS7_RS7_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__214__codecvt_utf8IwE9do_lengthER11__mbstate_tPKcS5_m'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__214collate_bynameIcE10do_compareEPKcS3_S3_S3_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__214collate_bynameIcE12do_transformEPKcS3_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__214collate_bynameIwE10do_compareEPKwS3_S3_S3_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__214collate_bynameIwE12do_transformEPKwS3_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__214error_category10equivalentERKNS_10error_codeEi'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__214error_category10equivalentEiRKNS_15error_conditionE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__214error_category23default_error_conditionEi'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IDiLb0EE10do_unshiftER11__mbstate_tPcS4_RS4_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IDiLb0EE11do_encodingEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IDiLb0EE13do_max_lengthEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IDiLb0EE16do_always_noconvEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IDiLb0EE5do_inER11__mbstate_tPKcS5_RS5_PDiS7_RS7_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IDiLb0EE6do_outER11__mbstate_tPKDiS5_RS5_PcS7_RS7_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IDiLb0EE9do_lengthER11__mbstate_tPKcS5_m'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IDiLb1EE10do_unshiftER11__mbstate_tPcS4_RS4_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IDiLb1EE11do_encodingEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IDiLb1EE13do_max_lengthEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IDiLb1EE16do_always_noconvEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IDiLb1EE5do_inER11__mbstate_tPKcS5_RS5_PDiS7_RS7_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IDiLb1EE6do_outER11__mbstate_tPKDiS5_RS5_PcS7_RS7_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IDiLb1EE9do_lengthER11__mbstate_tPKcS5_m'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IDsLb0EE10do_unshiftER11__mbstate_tPcS4_RS4_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IDsLb0EE11do_encodingEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IDsLb0EE13do_max_lengthEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IDsLb0EE16do_always_noconvEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IDsLb0EE5do_inER11__mbstate_tPKcS5_RS5_PDsS7_RS7_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IDsLb0EE6do_outER11__mbstate_tPKDsS5_RS5_PcS7_RS7_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IDsLb0EE9do_lengthER11__mbstate_tPKcS5_m'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IDsLb1EE10do_unshiftER11__mbstate_tPcS4_RS4_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IDsLb1EE11do_encodingEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IDsLb1EE13do_max_lengthEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IDsLb1EE16do_always_noconvEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IDsLb1EE5do_inER11__mbstate_tPKcS5_RS5_PDsS7_RS7_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IDsLb1EE6do_outER11__mbstate_tPKDsS5_RS5_PcS7_RS7_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IDsLb1EE9do_lengthER11__mbstate_tPKcS5_m'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IwLb0EE10do_unshiftER11__mbstate_tPcS4_RS4_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IwLb0EE11do_encodingEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IwLb0EE13do_max_lengthEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IwLb0EE16do_always_noconvEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IwLb0EE5do_inER11__mbstate_tPKcS5_RS5_PwS7_RS7_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IwLb0EE6do_outER11__mbstate_tPKwS5_RS5_PcS7_RS7_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IwLb0EE9do_lengthER11__mbstate_tPKcS5_m'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IwLb1EE10do_unshiftER11__mbstate_tPcS4_RS4_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IwLb1EE11do_encodingEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IwLb1EE13do_max_lengthEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IwLb1EE16do_always_noconvEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IwLb1EE5do_inER11__mbstate_tPKcS5_RS5_PwS7_RS7_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IwLb1EE6do_outER11__mbstate_tPKwS5_RS5_PcS7_RS7_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IwLb1EE9do_lengthER11__mbstate_tPKcS5_m'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__215error_condition7messageEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__217bad_function_call4whatEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIcLb0EE11do_groupingEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIcLb0EE13do_neg_formatEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIcLb0EE13do_pos_formatEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIcLb0EE14do_curr_symbolEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIcLb0EE14do_frac_digitsEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIcLb0EE16do_decimal_pointEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIcLb0EE16do_negative_signEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIcLb0EE16do_positive_signEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIcLb0EE16do_thousands_sepEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIcLb1EE11do_groupingEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIcLb1EE13do_neg_formatEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIcLb1EE13do_pos_formatEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIcLb1EE14do_curr_symbolEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIcLb1EE14do_frac_digitsEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIcLb1EE16do_decimal_pointEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIcLb1EE16do_negative_signEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIcLb1EE16do_positive_signEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIcLb1EE16do_thousands_sepEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIwLb0EE11do_groupingEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIwLb0EE13do_neg_formatEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIwLb0EE13do_pos_formatEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIwLb0EE14do_curr_symbolEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIwLb0EE14do_frac_digitsEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIwLb0EE16do_decimal_pointEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIwLb0EE16do_negative_signEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIwLb0EE16do_positive_signEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIwLb0EE16do_thousands_sepEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIwLb1EE11do_groupingEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIwLb1EE13do_neg_formatEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIwLb1EE13do_pos_formatEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIwLb1EE14do_curr_symbolEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIwLb1EE14do_frac_digitsEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIwLb1EE16do_decimal_pointEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIwLb1EE16do_negative_signEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIwLb1EE16do_positive_signEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIwLb1EE16do_thousands_sepEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__218__time_get_storageIcE15__do_date_orderEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__218__time_get_storageIwE15__do_date_orderEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__219__shared_weak_count13__get_deleterERKSt9type_info'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__220__codecvt_utf8_utf16IDiE10do_unshiftER11__mbstate_tPcS4_RS4_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__220__codecvt_utf8_utf16IDiE11do_encodingEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__220__codecvt_utf8_utf16IDiE13do_max_lengthEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__220__codecvt_utf8_utf16IDiE16do_always_noconvEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__220__codecvt_utf8_utf16IDiE5do_inER11__mbstate_tPKcS5_RS5_PDiS7_RS7_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__220__codecvt_utf8_utf16IDiE6do_outER11__mbstate_tPKDiS5_RS5_PcS7_RS7_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__220__codecvt_utf8_utf16IDiE9do_lengthER11__mbstate_tPKcS5_m'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__220__codecvt_utf8_utf16IDsE10do_unshiftER11__mbstate_tPcS4_RS4_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__220__codecvt_utf8_utf16IDsE11do_encodingEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__220__codecvt_utf8_utf16IDsE13do_max_lengthEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__220__codecvt_utf8_utf16IDsE16do_always_noconvEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__220__codecvt_utf8_utf16IDsE5do_inER11__mbstate_tPKcS5_RS5_PDsS7_RS7_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__220__codecvt_utf8_utf16IDsE6do_outER11__mbstate_tPKDsS5_RS5_PcS7_RS7_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__220__codecvt_utf8_utf16IDsE9do_lengthER11__mbstate_tPKcS5_m'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__220__codecvt_utf8_utf16IwE10do_unshiftER11__mbstate_tPcS4_RS4_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__220__codecvt_utf8_utf16IwE11do_encodingEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__220__codecvt_utf8_utf16IwE13do_max_lengthEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__220__codecvt_utf8_utf16IwE16do_always_noconvEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__220__codecvt_utf8_utf16IwE5do_inER11__mbstate_tPKcS5_RS5_PwS7_RS7_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__220__codecvt_utf8_utf16IwE6do_outER11__mbstate_tPKwS5_RS5_PcS7_RS7_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__220__codecvt_utf8_utf16IwE9do_lengthER11__mbstate_tPKcS5_m'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__220__time_get_c_storageIcE3__XEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__220__time_get_c_storageIcE3__cEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__220__time_get_c_storageIcE3__rEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__220__time_get_c_storageIcE3__xEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__220__time_get_c_storageIcE7__am_pmEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__220__time_get_c_storageIcE7__weeksEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__220__time_get_c_storageIcE8__monthsEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__220__time_get_c_storageIwE3__XEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__220__time_get_c_storageIwE3__cEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__220__time_get_c_storageIwE3__rEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__220__time_get_c_storageIwE3__xEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__220__time_get_c_storageIwE7__am_pmEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__220__time_get_c_storageIwE7__weeksEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__220__time_get_c_storageIwE8__monthsEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__220__vector_base_commonILb1EE20__throw_length_errorEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__220__vector_base_commonILb1EE20__throw_out_of_rangeEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__221__basic_string_commonILb1EE20__throw_length_errorEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__221__basic_string_commonILb1EE20__throw_out_of_rangeEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__223__match_any_but_newlineIcE6__execERNS_7__stateIcEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__223__match_any_but_newlineIwE6__execERNS_7__stateIwEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__224__libcpp_debug_exception4whatEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__25ctypeIcE10do_tolowerEPcPKc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__25ctypeIcE10do_tolowerEc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__25ctypeIcE10do_toupperEPcPKc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__25ctypeIcE10do_toupperEc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__25ctypeIcE8do_widenEPKcS3_Pc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__25ctypeIcE8do_widenEc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__25ctypeIcE9do_narrowEPKcS3_cPc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__25ctypeIcE9do_narrowEcc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__25ctypeIwE10do_scan_isEjPKwS3_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__25ctypeIwE10do_tolowerEPwPKw'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__25ctypeIwE10do_tolowerEw'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__25ctypeIwE10do_toupperEPwPKw'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__25ctypeIwE10do_toupperEw'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__25ctypeIwE11do_scan_notEjPKwS3_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__25ctypeIwE5do_isEPKwS3_Pj'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__25ctypeIwE5do_isEjw'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__25ctypeIwE8do_widenEPKcS3_Pw'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__25ctypeIwE8do_widenEc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__25ctypeIwE9do_narrowEPKwS3_cPc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__25ctypeIwE9do_narrowEwc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__26locale4nameEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__26locale9has_facetERNS0_2idE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__26locale9use_facetERNS0_2idE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__26localeeqERKS0_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27codecvtIDic11__mbstate_tE10do_unshiftERS1_PcS4_RS4_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27codecvtIDic11__mbstate_tE11do_encodingEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27codecvtIDic11__mbstate_tE13do_max_lengthEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27codecvtIDic11__mbstate_tE16do_always_noconvEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27codecvtIDic11__mbstate_tE5do_inERS1_PKcS5_RS5_PDiS7_RS7_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27codecvtIDic11__mbstate_tE6do_outERS1_PKDiS5_RS5_PcS7_RS7_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27codecvtIDic11__mbstate_tE9do_lengthERS1_PKcS5_m'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27codecvtIDsc11__mbstate_tE10do_unshiftERS1_PcS4_RS4_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27codecvtIDsc11__mbstate_tE11do_encodingEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27codecvtIDsc11__mbstate_tE13do_max_lengthEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27codecvtIDsc11__mbstate_tE16do_always_noconvEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27codecvtIDsc11__mbstate_tE5do_inERS1_PKcS5_RS5_PDsS7_RS7_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27codecvtIDsc11__mbstate_tE6do_outERS1_PKDsS5_RS5_PcS7_RS7_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27codecvtIDsc11__mbstate_tE9do_lengthERS1_PKcS5_m'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27codecvtIcc11__mbstate_tE10do_unshiftERS1_PcS4_RS4_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27codecvtIcc11__mbstate_tE11do_encodingEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27codecvtIcc11__mbstate_tE13do_max_lengthEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27codecvtIcc11__mbstate_tE16do_always_noconvEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27codecvtIcc11__mbstate_tE5do_inERS1_PKcS5_RS5_PcS7_RS7_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27codecvtIcc11__mbstate_tE6do_outERS1_PKcS5_RS5_PcS7_RS7_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27codecvtIcc11__mbstate_tE9do_lengthERS1_PKcS5_m'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27codecvtIwc11__mbstate_tE10do_unshiftERS1_PcS4_RS4_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27codecvtIwc11__mbstate_tE11do_encodingEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27codecvtIwc11__mbstate_tE13do_max_lengthEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27codecvtIwc11__mbstate_tE16do_always_noconvEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27codecvtIwc11__mbstate_tE5do_inERS1_PKcS5_RS5_PwS7_RS7_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27codecvtIwc11__mbstate_tE6do_outERS1_PKwS5_RS5_PcS7_RS7_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27codecvtIwc11__mbstate_tE9do_lengthERS1_PKcS5_m'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27collateIcE10do_compareEPKcS3_S3_S3_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27collateIcE12do_transformEPKcS3_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27collateIcE7do_hashEPKcS3_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27collateIwE10do_compareEPKwS3_S3_S3_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27collateIwE12do_transformEPKwS3_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27collateIwE7do_hashEPKwS3_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRPv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRb'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRd'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRe'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRf'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRl'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRt'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRx'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRy'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjS8_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRPv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRb'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRd'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRe'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRf'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRl'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRt'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRx'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRy'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjS8_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEcPKv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEcb'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEcd'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEce'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEcl'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEcm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEcx'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEcy'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwPKv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwb'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwd'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwe'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwl'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwx'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwy'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28ios_base6getlocEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28messagesIcE6do_getEliiRKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28messagesIcE7do_openERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERKNS_6localeE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28messagesIcE8do_closeEl'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28messagesIwE6do_getEliiRKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28messagesIwE7do_openERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERKNS_6localeE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28messagesIwE8do_closeEl'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28numpunctIcE11do_groupingEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28numpunctIcE11do_truenameEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28numpunctIcE12do_falsenameEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28numpunctIcE16do_decimal_pointEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28numpunctIcE16do_thousands_sepEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28numpunctIwE11do_groupingEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28numpunctIwE11do_truenameEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28numpunctIwE12do_falsenameEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28numpunctIwE16do_decimal_pointEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28numpunctIwE16do_thousands_sepEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE10__get_hourERiRS4_S4_RjRKNS_5ctypeIcEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE10__get_yearERiRS4_S4_RjRKNS_5ctypeIcEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE11__get_am_pmERiRS4_S4_RjRKNS_5ctypeIcEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE11__get_monthERiRS4_S4_RjRKNS_5ctypeIcEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE11__get_year4ERiRS4_S4_RjRKNS_5ctypeIcEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE11do_get_dateES4_S4_RNS_8ios_baseERjP2tm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE11do_get_timeES4_S4_RNS_8ios_baseERjP2tm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE11do_get_yearES4_S4_RNS_8ios_baseERjP2tm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE12__get_minuteERiRS4_S4_RjRKNS_5ctypeIcEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE12__get_secondERiRS4_S4_RjRKNS_5ctypeIcEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE13__get_12_hourERiRS4_S4_RjRKNS_5ctypeIcEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE13__get_percentERS4_S4_RjRKNS_5ctypeIcEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE13__get_weekdayERiRS4_S4_RjRKNS_5ctypeIcEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE13do_date_orderEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE14do_get_weekdayES4_S4_RNS_8ios_baseERjP2tm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE15__get_monthnameERiRS4_S4_RjRKNS_5ctypeIcEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE16do_get_monthnameES4_S4_RNS_8ios_baseERjP2tm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE17__get_weekdaynameERiRS4_S4_RjRKNS_5ctypeIcEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE17__get_white_spaceERS4_S4_RjRKNS_5ctypeIcEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE18__get_day_year_numERiRS4_S4_RjRKNS_5ctypeIcEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE3getES4_S4_RNS_8ios_baseERjP2tmPKcSC_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjP2tmcc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE9__get_dayERiRS4_S4_RjRKNS_5ctypeIcEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE10__get_hourERiRS4_S4_RjRKNS_5ctypeIwEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE10__get_yearERiRS4_S4_RjRKNS_5ctypeIwEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE11__get_am_pmERiRS4_S4_RjRKNS_5ctypeIwEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE11__get_monthERiRS4_S4_RjRKNS_5ctypeIwEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE11__get_year4ERiRS4_S4_RjRKNS_5ctypeIwEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE11do_get_dateES4_S4_RNS_8ios_baseERjP2tm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE11do_get_timeES4_S4_RNS_8ios_baseERjP2tm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE11do_get_yearES4_S4_RNS_8ios_baseERjP2tm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE12__get_minuteERiRS4_S4_RjRKNS_5ctypeIwEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE12__get_secondERiRS4_S4_RjRKNS_5ctypeIwEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE13__get_12_hourERiRS4_S4_RjRKNS_5ctypeIwEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE13__get_percentERS4_S4_RjRKNS_5ctypeIwEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE13__get_weekdayERiRS4_S4_RjRKNS_5ctypeIwEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE13do_date_orderEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE14do_get_weekdayES4_S4_RNS_8ios_baseERjP2tm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE15__get_monthnameERiRS4_S4_RjRKNS_5ctypeIwEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE16do_get_monthnameES4_S4_RNS_8ios_baseERjP2tm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE17__get_weekdaynameERiRS4_S4_RjRKNS_5ctypeIwEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE17__get_white_spaceERS4_S4_RjRKNS_5ctypeIwEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE18__get_day_year_numERiRS4_S4_RjRKNS_5ctypeIwEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE3getES4_S4_RNS_8ios_baseERjP2tmPKwSC_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjP2tmcc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE9__get_dayERiRS4_S4_RjRKNS_5ctypeIwEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28time_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE3putES4_RNS_8ios_baseEcPK2tmPKcSC_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28time_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEcPK2tmcc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28time_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE3putES4_RNS_8ios_baseEwPK2tmPKwSC_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28time_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwPK2tmcc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__29__num_getIcE10__do_widenERNS_8ios_baseEPc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__29__num_getIcE12__do_widen_pERNS_8ios_baseEPc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__29__num_getIwE10__do_widenERNS_8ios_baseEPw'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__29__num_getIwE12__do_widen_pERNS_8ios_baseEPc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__29money_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_bRNS_8ios_baseERjRNS_12basic_stringIcS3_NS_9allocatorIcEEEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__29money_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_bRNS_8ios_baseERjRe'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__29money_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_bRNS_8ios_baseERjRNS_12basic_stringIwS3_NS_9allocatorIwEEEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__29money_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_bRNS_8ios_baseERjRe'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__29money_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_bRNS_8ios_baseEcRKNS_12basic_stringIcS3_NS_9allocatorIcEEEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__29money_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_bRNS_8ios_baseEce'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__29money_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_bRNS_8ios_baseEwRKNS_12basic_stringIwS3_NS_9allocatorIwEEEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__29money_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_bRNS_8ios_baseEwe'} +{'type': 'U', 'is_defined': False, 'name': '__ZNKSt8bad_cast4whatEv'} +{'type': 'I', 'is_defined': True, 'name': '__ZNKSt8bad_cast4whatEv'} +{'type': 'U', 'is_defined': False, 'name': '__ZNKSt9bad_alloc4whatEv'} +{'type': 'I', 'is_defined': True, 'name': '__ZNKSt9bad_alloc4whatEv'} +{'type': 'U', 'is_defined': False, 'name': '__ZNKSt9exception4whatEv'} +{'type': 'I', 'is_defined': True, 'name': '__ZNKSt9exception4whatEv'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt10bad_typeidC1Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt10bad_typeidC1Ev'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt10bad_typeidC2Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt10bad_typeidC2Ev'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt10bad_typeidD0Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt10bad_typeidD0Ev'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt10bad_typeidD1Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt10bad_typeidD1Ev'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt10bad_typeidD2Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt10bad_typeidD2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt11logic_errorC1EPKc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt11logic_errorC1ERKNSt3__212basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt11logic_errorC1ERKS_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt11logic_errorC2EPKc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt11logic_errorC2ERKNSt3__212basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt11logic_errorC2ERKS_'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt11logic_errorD0Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt11logic_errorD0Ev'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt11logic_errorD1Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt11logic_errorD1Ev'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt11logic_errorD2Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt11logic_errorD2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt11logic_erroraSERKS_'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt11range_errorD0Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt11range_errorD0Ev'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt11range_errorD1Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt11range_errorD1Ev'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt11range_errorD2Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt11range_errorD2Ev'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt12domain_errorD0Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt12domain_errorD0Ev'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt12domain_errorD1Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt12domain_errorD1Ev'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt12domain_errorD2Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt12domain_errorD2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt12experimental19bad_optional_accessD0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt12experimental19bad_optional_accessD1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt12experimental19bad_optional_accessD2Ev'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt12length_errorD0Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt12length_errorD0Ev'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt12length_errorD1Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt12length_errorD1Ev'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt12length_errorD2Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt12length_errorD2Ev'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt12out_of_rangeD0Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt12out_of_rangeD0Ev'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt12out_of_rangeD1Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt12out_of_rangeD1Ev'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt12out_of_rangeD2Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt12out_of_rangeD2Ev'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt13bad_exceptionD0Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt13bad_exceptionD0Ev'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt13bad_exceptionD1Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt13bad_exceptionD1Ev'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt13bad_exceptionD2Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt13bad_exceptionD2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt13exception_ptrC1ERKS_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt13exception_ptrC2ERKS_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt13exception_ptrD1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt13exception_ptrD2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt13exception_ptraSERKS_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt13runtime_errorC1EPKc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt13runtime_errorC1ERKNSt3__212basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt13runtime_errorC1ERKS_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt13runtime_errorC2EPKc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt13runtime_errorC2ERKNSt3__212basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt13runtime_errorC2ERKS_'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt13runtime_errorD0Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt13runtime_errorD0Ev'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt13runtime_errorD1Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt13runtime_errorD1Ev'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt13runtime_errorD2Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt13runtime_errorD2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt13runtime_erroraSERKS_'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt14overflow_errorD0Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt14overflow_errorD0Ev'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt14overflow_errorD1Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt14overflow_errorD1Ev'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt14overflow_errorD2Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt14overflow_errorD2Ev'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt15underflow_errorD0Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt15underflow_errorD0Ev'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt15underflow_errorD1Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt15underflow_errorD1Ev'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt15underflow_errorD2Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt15underflow_errorD2Ev'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt16invalid_argumentD0Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt16invalid_argumentD0Ev'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt16invalid_argumentD1Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt16invalid_argumentD1Ev'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt16invalid_argumentD2Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt16invalid_argumentD2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt16nested_exceptionC1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt16nested_exceptionC2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt16nested_exceptionD0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt16nested_exceptionD1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt16nested_exceptionD2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt19bad_optional_accessD0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt19bad_optional_accessD1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt19bad_optional_accessD2Ev'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt20bad_array_new_lengthC1Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt20bad_array_new_lengthC1Ev'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt20bad_array_new_lengthC2Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt20bad_array_new_lengthC2Ev'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt20bad_array_new_lengthD0Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt20bad_array_new_lengthD0Ev'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt20bad_array_new_lengthD1Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt20bad_array_new_lengthD1Ev'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt20bad_array_new_lengthD2Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt20bad_array_new_lengthD2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__210__time_getC1EPKc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__210__time_getC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__210__time_getC2EPKc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__210__time_getC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__210__time_getD1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__210__time_getD2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__210__time_putC1EPKc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__210__time_putC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__210__time_putC2EPKc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__210__time_putC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__210__time_putD1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__210__time_putD2Ev'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__210adopt_lockE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__210ctype_base5alnumE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__210ctype_base5alphaE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__210ctype_base5blankE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__210ctype_base5cntrlE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__210ctype_base5digitE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__210ctype_base5graphE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__210ctype_base5lowerE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__210ctype_base5printE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__210ctype_base5punctE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__210ctype_base5spaceE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__210ctype_base5upperE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__210ctype_base6xdigitE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__210defer_lockE', 'size': 0} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__210istrstreamD0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__210istrstreamD1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__210istrstreamD2Ev'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__210moneypunctIcLb0EE2idE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__210moneypunctIcLb0EE4intlE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__210moneypunctIcLb1EE2idE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__210moneypunctIcLb1EE4intlE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__210moneypunctIwLb0EE2idE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__210moneypunctIwLb0EE4intlE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__210moneypunctIwLb1EE2idE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__210moneypunctIwLb1EE4intlE', 'size': 0} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__210ostrstreamD0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__210ostrstreamD1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__210ostrstreamD2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__210to_wstringEd'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__210to_wstringEe'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__210to_wstringEf'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__210to_wstringEi'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__210to_wstringEj'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__210to_wstringEl'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__210to_wstringEm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__210to_wstringEx'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__210to_wstringEy'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__211__call_onceERVmPvPFvS2_E'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__211__libcpp_db10__insert_cEPv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__211__libcpp_db10__insert_iEPv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__211__libcpp_db11__insert_icEPvPKv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__211__libcpp_db15__iterator_copyEPvPKv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__211__libcpp_db16__invalidate_allEPv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__211__libcpp_db4swapEPvS1_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__211__libcpp_db9__erase_cEPv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__211__libcpp_db9__erase_iEPv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__211__libcpp_dbC1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__211__libcpp_dbC2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__211__libcpp_dbD1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__211__libcpp_dbD2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__211__money_getIcE13__gather_infoEbRKNS_6localeERNS_10money_base7patternERcS8_RNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEESF_SF_SF_Ri'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__211__money_getIwE13__gather_infoEbRKNS_6localeERNS_10money_base7patternERwS8_RNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERNS9_IwNSA_IwEENSC_IwEEEESJ_SJ_Ri'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__211__money_putIcE13__gather_infoEbbRKNS_6localeERNS_10money_base7patternERcS8_RNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEESF_SF_Ri'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__211__money_putIcE8__formatEPcRS2_S3_jPKcS5_RKNS_5ctypeIcEEbRKNS_10money_base7patternEccRKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEESL_SL_i'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__211__money_putIwE13__gather_infoEbbRKNS_6localeERNS_10money_base7patternERwS8_RNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERNS9_IwNSA_IwEENSC_IwEEEESJ_Ri'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__211__money_putIwE8__formatEPwRS2_S3_jPKwS5_RKNS_5ctypeIwEEbRKNS_10money_base7patternEwwRKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERKNSE_IwNSF_IwEENSH_IwEEEESQ_i'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__211regex_errorC1ENS_15regex_constants10error_typeE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__211regex_errorC2ENS_15regex_constants10error_typeE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__211regex_errorD0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__211regex_errorD1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__211regex_errorD2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__211this_thread9sleep_forERKNS_6chrono8durationIxNS_5ratioILl1ELl1000000000EEEEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__211timed_mutex4lockEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__211timed_mutex6unlockEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__211timed_mutex8try_lockEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__211timed_mutexC1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__211timed_mutexC2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__211timed_mutexD1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__211timed_mutexD2Ev'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__211try_to_lockE', 'size': 0} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212__do_nothingEPv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212__get_sp_mutEPKv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212__next_primeEm'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__212__rs_default4__c_E', 'size': 0} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212__rs_defaultC1ERKS0_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212__rs_defaultC1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212__rs_defaultC2ERKS0_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212__rs_defaultC2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212__rs_defaultD1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212__rs_defaultD2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212__rs_defaultclEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212bad_weak_ptrD0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212bad_weak_ptrD1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212bad_weak_ptrD2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE21__grow_by_and_replaceEmmmmmmPKc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE2atEm'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4nposE', 'size': 0} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE5eraseEmm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcmm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEmc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6appendEPKc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6appendEPKcm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6appendERKS5_mm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6appendEmc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignEPKc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignEPKcm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignERKS5_mm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignEmc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6insertENS_11__wrap_iterIPKcEEc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6insertEmPKc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6insertEmPKcm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6insertEmRKS5_mm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6insertEmmc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6resizeEmc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7replaceEmmPKc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7replaceEmmPKcm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7replaceEmmRKS5_mm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7replaceEmmmc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7reserveEm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9__grow_byEmmmmmm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9push_backEc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC1ERKS5_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC1ERKS5_RKS4_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC1ERKS5_mmRKS4_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2ERKS5_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2ERKS5_RKS4_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2ERKS5_mmRKS4_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEaSERKS5_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEaSEc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE21__grow_by_and_replaceEmmmmmmPKw'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE2atEm'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE4nposE', 'size': 0} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE5eraseEmm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6__initEPKwm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6__initEPKwmm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6__initEmw'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6appendEPKw'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6appendEPKwm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6appendERKS5_mm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6appendEmw'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6assignEPKw'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6assignEPKwm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6assignERKS5_mm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6assignEmw'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6insertENS_11__wrap_iterIPKwEEw'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6insertEmPKw'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6insertEmPKwm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6insertEmRKS5_mm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6insertEmmw'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6resizeEmw'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7replaceEmmPKw'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7replaceEmmPKwm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7replaceEmmRKS5_mm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7replaceEmmmw'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7reserveEm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE9__grow_byEmmmmmm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE9push_backEw'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC1ERKS5_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC1ERKS5_RKS4_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC1ERKS5_mmRKS4_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC2ERKS5_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC2ERKS5_RKS4_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC2ERKS5_mmRKS4_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEED1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEED2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEaSERKS5_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEaSEw'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212ctype_bynameIcEC1EPKcm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212ctype_bynameIcEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212ctype_bynameIcEC2EPKcm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212ctype_bynameIcEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212ctype_bynameIcED0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212ctype_bynameIcED1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212ctype_bynameIcED2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212ctype_bynameIwEC1EPKcm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212ctype_bynameIwEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212ctype_bynameIwEC2EPKcm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212ctype_bynameIwEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212ctype_bynameIwED0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212ctype_bynameIwED1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212ctype_bynameIwED2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212future_errorC1ENS_10error_codeE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212future_errorC2ENS_10error_codeE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212future_errorD0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212future_errorD1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212future_errorD2Ev'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__212placeholders2_1E', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__212placeholders2_2E', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__212placeholders2_3E', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__212placeholders2_4E', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__212placeholders2_5E', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__212placeholders2_6E', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__212placeholders2_7E', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__212placeholders2_8E', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__212placeholders2_9E', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__212placeholders3_10E', 'size': 0} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212strstreambuf3strEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212strstreambuf4swapERS0_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212strstreambuf6__initEPclS1_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212strstreambuf6freezeEb'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212strstreambuf7seekoffExNS_8ios_base7seekdirEj'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212strstreambuf7seekposENS_4fposI11__mbstate_tEEj'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212strstreambuf8overflowEi'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212strstreambuf9pbackfailEi'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212strstreambuf9underflowEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212strstreambufC1EPFPvmEPFvS1_E'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212strstreambufC1EPKal'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212strstreambufC1EPKcl'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212strstreambufC1EPKhl'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212strstreambufC1EPalS1_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212strstreambufC1EPclS1_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212strstreambufC1EPhlS1_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212strstreambufC1El'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212strstreambufC2EPFPvmEPFvS1_E'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212strstreambufC2EPKal'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212strstreambufC2EPKcl'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212strstreambufC2EPKhl'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212strstreambufC2EPalS1_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212strstreambufC2EPclS1_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212strstreambufC2EPhlS1_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212strstreambufC2El'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212strstreambufD0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212strstreambufD1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212strstreambufD2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212system_error6__initERKNS_10error_codeENS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212system_errorC1ENS_10error_codeE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212system_errorC1ENS_10error_codeEPKc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212system_errorC1ENS_10error_codeERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212system_errorC1EiRKNS_14error_categoryE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212system_errorC1EiRKNS_14error_categoryEPKc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212system_errorC1EiRKNS_14error_categoryERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212system_errorC2ENS_10error_codeE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212system_errorC2ENS_10error_codeEPKc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212system_errorC2ENS_10error_codeERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212system_errorC2EiRKNS_14error_categoryE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212system_errorC2EiRKNS_14error_categoryEPKc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212system_errorC2EiRKNS_14error_categoryERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212system_errorD0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212system_errorD1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212system_errorD2Ev'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__213allocator_argE', 'size': 0} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEE3getEPclc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEE3getERNS_15basic_streambufIcS2_EEc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEE3getEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEE4peekEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEE4readEPcl'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEE4syncEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEE5seekgENS_4fposI11__mbstate_tEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEE5seekgExNS_8ios_base7seekdirE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEE5tellgEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEE5ungetEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEE6ignoreEli'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEE6sentryC1ERS3_b'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEE6sentryC2ERS3_b'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEE7getlineEPclc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEE7putbackEc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEE8readsomeEPcl'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEED0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEED1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEED2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEErsEPNS_15basic_streambufIcS2_EE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEErsERPv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEErsERb'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEErsERd'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEErsERe'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEErsERf'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEErsERi'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEErsERj'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEErsERl'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEErsERm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEErsERs'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEErsERt'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEErsERx'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEErsERy'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEE3getEPwlw'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEE3getERNS_15basic_streambufIwS2_EEw'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEE3getEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEE4peekEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEE4readEPwl'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEE4syncEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEE5seekgENS_4fposI11__mbstate_tEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEE5seekgExNS_8ios_base7seekdirE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEE5tellgEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEE5ungetEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEE6ignoreEli'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEE6sentryC1ERS3_b'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEE6sentryC2ERS3_b'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEE7getlineEPwlw'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEE7putbackEw'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEE8readsomeEPwl'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEED0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEED1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEED2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEErsEPNS_15basic_streambufIwS2_EE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEErsERPv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEErsERb'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEErsERd'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEErsERe'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEErsERf'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEErsERi'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEErsERj'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEErsERl'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEErsERm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEErsERs'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEErsERt'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEErsERx'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEErsERy'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIcNS_11char_traitsIcEEE3putEc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIcNS_11char_traitsIcEEE5flushEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIcNS_11char_traitsIcEEE5writeEPKcl'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIcNS_11char_traitsIcEEE6sentryC1ERS3_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIcNS_11char_traitsIcEEE6sentryC2ERS3_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIcNS_11char_traitsIcEEE6sentryD1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIcNS_11char_traitsIcEEE6sentryD2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIcNS_11char_traitsIcEEED0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIcNS_11char_traitsIcEEED1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIcNS_11char_traitsIcEEED2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIcNS_11char_traitsIcEEElsEPKv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIcNS_11char_traitsIcEEElsEPNS_15basic_streambufIcS2_EE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIcNS_11char_traitsIcEEElsEb'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIcNS_11char_traitsIcEEElsEd'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIcNS_11char_traitsIcEEElsEe'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIcNS_11char_traitsIcEEElsEf'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIcNS_11char_traitsIcEEElsEi'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIcNS_11char_traitsIcEEElsEj'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIcNS_11char_traitsIcEEElsEl'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIcNS_11char_traitsIcEEElsEm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIcNS_11char_traitsIcEEElsEs'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIcNS_11char_traitsIcEEElsEt'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIcNS_11char_traitsIcEEElsEx'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIcNS_11char_traitsIcEEElsEy'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIwNS_11char_traitsIwEEE3putEw'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIwNS_11char_traitsIwEEE5flushEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIwNS_11char_traitsIwEEE5writeEPKwl'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIwNS_11char_traitsIwEEE6sentryC1ERS3_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIwNS_11char_traitsIwEEE6sentryC2ERS3_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIwNS_11char_traitsIwEEE6sentryD1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIwNS_11char_traitsIwEEE6sentryD2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIwNS_11char_traitsIwEEED0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIwNS_11char_traitsIwEEED1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIwNS_11char_traitsIwEEED2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIwNS_11char_traitsIwEEElsEPKv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIwNS_11char_traitsIwEEElsEPNS_15basic_streambufIwS2_EE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIwNS_11char_traitsIwEEElsEb'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIwNS_11char_traitsIwEEElsEd'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIwNS_11char_traitsIwEEElsEe'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIwNS_11char_traitsIwEEElsEf'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIwNS_11char_traitsIwEEElsEi'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIwNS_11char_traitsIwEEElsEj'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIwNS_11char_traitsIwEEElsEl'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIwNS_11char_traitsIwEEElsEm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIwNS_11char_traitsIwEEElsEs'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIwNS_11char_traitsIwEEElsEt'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIwNS_11char_traitsIwEEElsEx'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIwNS_11char_traitsIwEEElsEy'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213random_deviceC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213random_deviceC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213random_deviceD1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213random_deviceD2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213random_deviceclEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213shared_futureIvED1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213shared_futureIvED2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213shared_futureIvEaSERKS1_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__214__get_const_dbEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__214__num_get_base10__get_baseERNS_8ios_baseE'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__214__num_get_base5__srcE', 'size': 0} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__214__num_put_base12__format_intEPcPKcbj'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__214__num_put_base14__format_floatEPcPKcj'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__214__num_put_base18__identify_paddingEPcS1_RKNS_8ios_baseE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__214__shared_countD0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__214__shared_countD1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__214__shared_countD2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__214basic_iostreamIcNS_11char_traitsIcEEED0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__214basic_iostreamIcNS_11char_traitsIcEEED1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__214basic_iostreamIcNS_11char_traitsIcEEED2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__214codecvt_bynameIDic11__mbstate_tED0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__214codecvt_bynameIDic11__mbstate_tED1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__214codecvt_bynameIDic11__mbstate_tED2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__214codecvt_bynameIDsc11__mbstate_tED0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__214codecvt_bynameIDsc11__mbstate_tED1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__214codecvt_bynameIDsc11__mbstate_tED2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__214codecvt_bynameIcc11__mbstate_tED0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__214codecvt_bynameIcc11__mbstate_tED1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__214codecvt_bynameIcc11__mbstate_tED2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__214codecvt_bynameIwc11__mbstate_tED0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__214codecvt_bynameIwc11__mbstate_tED1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__214codecvt_bynameIwc11__mbstate_tED2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__214collate_bynameIcEC1EPKcm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__214collate_bynameIcEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__214collate_bynameIcEC2EPKcm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__214collate_bynameIcEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__214collate_bynameIcED0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__214collate_bynameIcED1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__214collate_bynameIcED2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__214collate_bynameIwEC1EPKcm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__214collate_bynameIwEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__214collate_bynameIwEC2EPKcm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__214collate_bynameIwEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__214collate_bynameIwED0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__214collate_bynameIwED1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__214collate_bynameIwED2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__214error_categoryD0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__214error_categoryD1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__214error_categoryD2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215__get_classnameEPKcb'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215__thread_struct25notify_all_at_thread_exitEPNS_18condition_variableEPNS_5mutexE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215__thread_struct27__make_ready_at_thread_exitEPNS_17__assoc_sub_stateE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215__thread_structC1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215__thread_structC2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215__thread_structD1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215__thread_structD2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIcNS_11char_traitsIcEEE4swapERS3_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIcNS_11char_traitsIcEEE4syncEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIcNS_11char_traitsIcEEE5imbueERKNS_6localeE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIcNS_11char_traitsIcEEE5uflowEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIcNS_11char_traitsIcEEE6setbufEPcl'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIcNS_11char_traitsIcEEE6xsgetnEPcl'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIcNS_11char_traitsIcEEE6xsputnEPKcl'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIcNS_11char_traitsIcEEE7seekoffExNS_8ios_base7seekdirEj'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIcNS_11char_traitsIcEEE7seekposENS_4fposI11__mbstate_tEEj'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIcNS_11char_traitsIcEEE8overflowEi'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIcNS_11char_traitsIcEEE9pbackfailEi'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIcNS_11char_traitsIcEEE9showmanycEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIcNS_11char_traitsIcEEE9underflowEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIcNS_11char_traitsIcEEEC1ERKS3_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIcNS_11char_traitsIcEEEC1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIcNS_11char_traitsIcEEEC2ERKS3_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIcNS_11char_traitsIcEEEC2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIcNS_11char_traitsIcEEED0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIcNS_11char_traitsIcEEED1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIcNS_11char_traitsIcEEED2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIcNS_11char_traitsIcEEEaSERKS3_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIwNS_11char_traitsIwEEE4swapERS3_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIwNS_11char_traitsIwEEE4syncEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIwNS_11char_traitsIwEEE5imbueERKNS_6localeE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIwNS_11char_traitsIwEEE5uflowEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIwNS_11char_traitsIwEEE6setbufEPwl'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIwNS_11char_traitsIwEEE6xsgetnEPwl'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIwNS_11char_traitsIwEEE6xsputnEPKwl'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIwNS_11char_traitsIwEEE7seekoffExNS_8ios_base7seekdirEj'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIwNS_11char_traitsIwEEE7seekposENS_4fposI11__mbstate_tEEj'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIwNS_11char_traitsIwEEE8overflowEi'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIwNS_11char_traitsIwEEE9pbackfailEi'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIwNS_11char_traitsIwEEE9showmanycEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIwNS_11char_traitsIwEEE9underflowEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIwNS_11char_traitsIwEEEC1ERKS3_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIwNS_11char_traitsIwEEEC1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIwNS_11char_traitsIwEEEC2ERKS3_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIwNS_11char_traitsIwEEEC2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIwNS_11char_traitsIwEEED0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIwNS_11char_traitsIwEEED1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIwNS_11char_traitsIwEEED2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIwNS_11char_traitsIwEEEaSERKS3_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215future_categoryEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215numpunct_bynameIcE6__initEPKc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215numpunct_bynameIcEC1EPKcm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215numpunct_bynameIcEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215numpunct_bynameIcEC2EPKcm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215numpunct_bynameIcEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215numpunct_bynameIcED0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215numpunct_bynameIcED1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215numpunct_bynameIcED2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215numpunct_bynameIwE6__initEPKc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215numpunct_bynameIwEC1EPKcm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215numpunct_bynameIwEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215numpunct_bynameIwEC2EPKcm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215numpunct_bynameIwEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215numpunct_bynameIwED0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215numpunct_bynameIwED1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215numpunct_bynameIwED2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215recursive_mutex4lockEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215recursive_mutex6unlockEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215recursive_mutex8try_lockEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215recursive_mutexC1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215recursive_mutexC2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215recursive_mutexD1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215recursive_mutexD2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215system_categoryEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__216__check_groupingERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPjS8_Rj'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__216__narrow_to_utf8ILm16EED0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__216__narrow_to_utf8ILm16EED1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__216__narrow_to_utf8ILm16EED2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__216__narrow_to_utf8ILm32EED0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__216__narrow_to_utf8ILm32EED1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__216__narrow_to_utf8ILm32EED2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__216generic_categoryEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__217__assoc_sub_state10__sub_waitERNS_11unique_lockINS_5mutexEEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__217__assoc_sub_state12__make_readyEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__217__assoc_sub_state13set_exceptionESt13exception_ptr'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__217__assoc_sub_state16__on_zero_sharedEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__217__assoc_sub_state24set_value_at_thread_exitEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__217__assoc_sub_state28set_exception_at_thread_exitESt13exception_ptr'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__217__assoc_sub_state4copyEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__217__assoc_sub_state4waitEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__217__assoc_sub_state9__executeEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__217__assoc_sub_state9set_valueEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__217__widen_from_utf8ILm16EED0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__217__widen_from_utf8ILm16EED1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__217__widen_from_utf8ILm16EED2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__217__widen_from_utf8ILm32EED0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__217__widen_from_utf8ILm32EED1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__217__widen_from_utf8ILm32EED2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__217bad_function_callD0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__217bad_function_callD1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__217bad_function_callD2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__217declare_reachableEPv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__217iostream_categoryEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__217moneypunct_bynameIcLb0EE4initEPKc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__217moneypunct_bynameIcLb1EE4initEPKc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__217moneypunct_bynameIwLb0EE4initEPKc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__217moneypunct_bynameIwLb1EE4initEPKc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__218__time_get_storageIcE4initERKNS_5ctypeIcEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__218__time_get_storageIcE9__analyzeEcRKNS_5ctypeIcEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__218__time_get_storageIcEC1EPKc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__218__time_get_storageIcEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__218__time_get_storageIcEC2EPKc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__218__time_get_storageIcEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__218__time_get_storageIwE4initERKNS_5ctypeIwEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__218__time_get_storageIwE9__analyzeEcRKNS_5ctypeIwEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__218__time_get_storageIwEC1EPKc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__218__time_get_storageIwEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__218__time_get_storageIwEC2EPKc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__218__time_get_storageIwEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__218condition_variable10notify_allEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__218condition_variable10notify_oneEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__218condition_variable15__do_timed_waitERNS_11unique_lockINS_5mutexEEENS_6chrono10time_pointINS5_12system_clockENS5_8durationIxNS_5ratioILl1ELl1000000000EEEEEEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__218condition_variable4waitERNS_11unique_lockINS_5mutexEEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__218condition_variableD1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__218condition_variableD2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__218shared_timed_mutex11lock_sharedEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__218shared_timed_mutex13unlock_sharedEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__218shared_timed_mutex15try_lock_sharedEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__218shared_timed_mutex4lockEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__218shared_timed_mutex6unlockEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__218shared_timed_mutex8try_lockEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__218shared_timed_mutexC1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__218shared_timed_mutexC2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__219__shared_mutex_base11lock_sharedEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__219__shared_mutex_base13unlock_sharedEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__219__shared_mutex_base15try_lock_sharedEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__219__shared_mutex_base4lockEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__219__shared_mutex_base6unlockEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__219__shared_mutex_base8try_lockEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__219__shared_mutex_baseC1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__219__shared_mutex_baseC2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__219__shared_weak_count14__release_weakEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__219__shared_weak_count4lockEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__219__shared_weak_countD0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__219__shared_weak_countD1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__219__shared_weak_countD2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__219__thread_local_dataEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__219declare_no_pointersEPcm'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__219piecewise_constructE', 'size': 0} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__220__get_collation_nameEPKc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__220__throw_system_errorEiPKc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__221__throw_runtime_errorEPKc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__221__undeclare_reachableEPv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__221recursive_timed_mutex4lockEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__221recursive_timed_mutex6unlockEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__221recursive_timed_mutex8try_lockEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__221recursive_timed_mutexC1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__221recursive_timed_mutexC2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__221recursive_timed_mutexD1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__221recursive_timed_mutexD2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__221undeclare_no_pointersEPcm'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__223__libcpp_debug_functionE', 'size': 0} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__224__libcpp_debug_exceptionC1ERKNS_19__libcpp_debug_infoE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__224__libcpp_debug_exceptionC1ERKS0_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__224__libcpp_debug_exceptionC1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__224__libcpp_debug_exceptionC2ERKNS_19__libcpp_debug_infoE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__224__libcpp_debug_exceptionC2ERKS0_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__224__libcpp_debug_exceptionC2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__224__libcpp_debug_exceptionD0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__224__libcpp_debug_exceptionD1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__224__libcpp_debug_exceptionD2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__225notify_all_at_thread_exitERNS_18condition_variableENS_11unique_lockINS_5mutexEEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__227__insertion_sort_incompleteIRNS_6__lessIaaEEPaEEbT0_S5_T_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__227__insertion_sort_incompleteIRNS_6__lessIccEEPcEEbT0_S5_T_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__227__insertion_sort_incompleteIRNS_6__lessIddEEPdEEbT0_S5_T_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__227__insertion_sort_incompleteIRNS_6__lessIeeEEPeEEbT0_S5_T_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__227__insertion_sort_incompleteIRNS_6__lessIffEEPfEEbT0_S5_T_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__227__insertion_sort_incompleteIRNS_6__lessIhhEEPhEEbT0_S5_T_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__227__insertion_sort_incompleteIRNS_6__lessIiiEEPiEEbT0_S5_T_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__227__insertion_sort_incompleteIRNS_6__lessIjjEEPjEEbT0_S5_T_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__227__insertion_sort_incompleteIRNS_6__lessIllEEPlEEbT0_S5_T_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__227__insertion_sort_incompleteIRNS_6__lessImmEEPmEEbT0_S5_T_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__227__insertion_sort_incompleteIRNS_6__lessIssEEPsEEbT0_S5_T_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__227__insertion_sort_incompleteIRNS_6__lessIttEEPtEEbT0_S5_T_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__227__insertion_sort_incompleteIRNS_6__lessIwwEEPwEEbT0_S5_T_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__227__insertion_sort_incompleteIRNS_6__lessIxxEEPxEEbT0_S5_T_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__227__insertion_sort_incompleteIRNS_6__lessIyyEEPyEEbT0_S5_T_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__227__libcpp_set_debug_functionEPFvRKNS_19__libcpp_debug_infoEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__229__libcpp_abort_debug_functionERKNS_19__libcpp_debug_infoE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__229__libcpp_throw_debug_functionERKNS_19__libcpp_debug_infoE'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__23cinE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__24cerrE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__24clogE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__24coutE', 'size': 0} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__24stodERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__24stodERKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEEPm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__24stofERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__24stofERKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEEPm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__24stoiERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPmi'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__24stoiERKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEEPmi'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__24stolERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPmi'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__24stolERKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEEPmi'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__24wcinE', 'size': 0} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__25alignEmmRPvRm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__25ctypeIcE13classic_tableEv'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__25ctypeIcE2idE', 'size': 0} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__25ctypeIcEC1EPKjbm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__25ctypeIcEC2EPKjbm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__25ctypeIcED0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__25ctypeIcED1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__25ctypeIcED2Ev'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__25ctypeIwE2idE', 'size': 0} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__25ctypeIwED0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__25ctypeIwED1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__25ctypeIwED2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__25mutex4lockEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__25mutex6unlockEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__25mutex8try_lockEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__25mutexD1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__25mutexD2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__25stoldERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__25stoldERKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEEPm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__25stollERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPmi'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__25stollERKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEEPmi'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__25stoulERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPmi'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__25stoulERKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEEPmi'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__25wcerrE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__25wclogE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__25wcoutE', 'size': 0} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26__sortIRNS_6__lessIaaEEPaEEvT0_S5_T_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26__sortIRNS_6__lessIccEEPcEEvT0_S5_T_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26__sortIRNS_6__lessIddEEPdEEvT0_S5_T_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26__sortIRNS_6__lessIeeEEPeEEvT0_S5_T_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26__sortIRNS_6__lessIffEEPfEEvT0_S5_T_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26__sortIRNS_6__lessIhhEEPhEEvT0_S5_T_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26__sortIRNS_6__lessIiiEEPiEEvT0_S5_T_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26__sortIRNS_6__lessIjjEEPjEEvT0_S5_T_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26__sortIRNS_6__lessIllEEPlEEvT0_S5_T_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26__sortIRNS_6__lessImmEEPmEEvT0_S5_T_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26__sortIRNS_6__lessIssEEPsEEvT0_S5_T_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26__sortIRNS_6__lessIttEEPtEEvT0_S5_T_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26__sortIRNS_6__lessIwwEEPwEEvT0_S5_T_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26__sortIRNS_6__lessIxxEEPxEEvT0_S5_T_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26__sortIRNS_6__lessIyyEEPyEEvT0_S5_T_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26chrono12steady_clock3nowEv'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__26chrono12steady_clock9is_steadyE', 'size': 0} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26chrono12system_clock11from_time_tEl'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26chrono12system_clock3nowEv'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__26chrono12system_clock9is_steadyE', 'size': 0} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26chrono12system_clock9to_time_tERKNS0_10time_pointIS1_NS0_8durationIxNS_5ratioILl1ELl1000000EEEEEEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26futureIvE3getEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26futureIvEC1EPNS_17__assoc_sub_stateE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26futureIvEC2EPNS_17__assoc_sub_stateE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26futureIvED1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26futureIvED2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26gslice6__initEm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26locale14__install_ctorERKS0_PNS0_5facetEl'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26locale2id5__getEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26locale2id6__initEv'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__26locale2id9__next_idE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__26locale3allE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__26locale4noneE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__26locale4timeE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__26locale5ctypeE', 'size': 0} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26locale5facet16__on_zero_sharedEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26locale5facetD0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26locale5facetD1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26locale5facetD2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26locale6globalERKS0_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26locale7classicEv'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__26locale7collateE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__26locale7numericE', 'size': 0} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26locale8__globalEv'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__26locale8messagesE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__26locale8monetaryE', 'size': 0} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26localeC1EPKc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26localeC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26localeC1ERKS0_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26localeC1ERKS0_PKci'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26localeC1ERKS0_RKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEi'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26localeC1ERKS0_S2_i'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26localeC1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26localeC2EPKc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26localeC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26localeC2ERKS0_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26localeC2ERKS0_PKci'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26localeC2ERKS0_RKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEi'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26localeC2ERKS0_S2_i'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26localeC2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26localeD1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26localeD2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26localeaSERKS0_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26stoullERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPmi'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26stoullERKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEEPmi'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26thread20hardware_concurrencyEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26thread4joinEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26thread6detachEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26threadD1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26threadD2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__27__sort5IRNS_6__lessIeeEEPeEEjT0_S5_S5_S5_S5_T_'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__27codecvtIDic11__mbstate_tE2idE', 'size': 0} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__27codecvtIDic11__mbstate_tED0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__27codecvtIDic11__mbstate_tED1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__27codecvtIDic11__mbstate_tED2Ev'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__27codecvtIDsc11__mbstate_tE2idE', 'size': 0} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__27codecvtIDsc11__mbstate_tED0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__27codecvtIDsc11__mbstate_tED1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__27codecvtIDsc11__mbstate_tED2Ev'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__27codecvtIcc11__mbstate_tE2idE', 'size': 0} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__27codecvtIcc11__mbstate_tED0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__27codecvtIcc11__mbstate_tED1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__27codecvtIcc11__mbstate_tED2Ev'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__27codecvtIwc11__mbstate_tE2idE', 'size': 0} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__27codecvtIwc11__mbstate_tEC1EPKcm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__27codecvtIwc11__mbstate_tEC1Em'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__27codecvtIwc11__mbstate_tEC2EPKcm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__27codecvtIwc11__mbstate_tEC2Em'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__27codecvtIwc11__mbstate_tED0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__27codecvtIwc11__mbstate_tED1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__27codecvtIwc11__mbstate_tED2Ev'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__27collateIcE2idE', 'size': 0} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__27collateIcED0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__27collateIcED1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__27collateIcED2Ev'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__27collateIwE2idE', 'size': 0} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__27collateIwED0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__27collateIwED1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__27collateIwED2Ev'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__27num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE2idE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__27num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE2idE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__27num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE2idE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__27num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE2idE', 'size': 0} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__27promiseIvE10get_futureEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__27promiseIvE13set_exceptionESt13exception_ptr'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__27promiseIvE24set_value_at_thread_exitEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__27promiseIvE28set_exception_at_thread_exitESt13exception_ptr'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__27promiseIvE9set_valueEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__27promiseIvEC1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__27promiseIvEC2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__27promiseIvED1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__27promiseIvED2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__28__c_node5__addEPNS_8__i_nodeE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__28__c_nodeD0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__28__c_nodeD1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__28__c_nodeD2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__28__get_dbEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__28__i_nodeD1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__28__i_nodeD2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__28__rs_getEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__28__sp_mut4lockEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__28__sp_mut6unlockEv'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__28ios_base10floatfieldE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__28ios_base10scientificE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__28ios_base11adjustfieldE', 'size': 0} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__28ios_base15sync_with_stdioEb'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__28ios_base16__call_callbacksENS0_5eventE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__28ios_base17register_callbackEPFvNS0_5eventERS0_iEi'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__28ios_base2inE', 'size': 0} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__28ios_base33__set_badbit_and_consider_rethrowEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__28ios_base34__set_failbit_and_consider_rethrowEv'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__28ios_base3appE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__28ios_base3ateE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__28ios_base3decE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__28ios_base3hexE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__28ios_base3octE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__28ios_base3outE', 'size': 0} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__28ios_base4InitC1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__28ios_base4InitC2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__28ios_base4InitD1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__28ios_base4InitD2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__28ios_base4initEPv'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__28ios_base4leftE', 'size': 0} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__28ios_base4moveERS0_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__28ios_base4swapERS0_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__28ios_base5clearEj'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__28ios_base5fixedE', 'size': 0} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__28ios_base5imbueERKNS_6localeE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__28ios_base5iwordEi'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__28ios_base5pwordEi'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__28ios_base5rightE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__28ios_base5truncE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__28ios_base6badbitE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__28ios_base6binaryE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__28ios_base6eofbitE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__28ios_base6skipwsE', 'size': 0} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__28ios_base6xallocEv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__28ios_base7copyfmtERKS0_'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__28ios_base7failbitE', 'size': 0} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__28ios_base7failureC1EPKcRKNS_10error_codeE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__28ios_base7failureC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERKNS_10error_codeE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__28ios_base7failureC2EPKcRKNS_10error_codeE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__28ios_base7failureC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERKNS_10error_codeE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__28ios_base7failureD0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__28ios_base7failureD1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__28ios_base7failureD2Ev'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__28ios_base7goodbitE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__28ios_base7showposE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__28ios_base7unitbufE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__28ios_base8internalE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__28ios_base8showbaseE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__28ios_base9__xindex_E', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__28ios_base9basefieldE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__28ios_base9boolalphaE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__28ios_base9showpointE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__28ios_base9uppercaseE', 'size': 0} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__28ios_baseD0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__28ios_baseD1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__28ios_baseD2Ev'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__28messagesIcE2idE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__28messagesIwE2idE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__28numpunctIcE2idE', 'size': 0} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__28numpunctIcEC1Em'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__28numpunctIcEC2Em'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__28numpunctIcED0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__28numpunctIcED1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__28numpunctIcED2Ev'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__28numpunctIwE2idE', 'size': 0} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__28numpunctIwEC1Em'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__28numpunctIwEC2Em'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__28numpunctIwED0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__28numpunctIwED1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__28numpunctIwED2Ev'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__28time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE2idE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__28time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE2idE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__28time_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE2idE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__28time_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE2idE', 'size': 0} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__28valarrayImE6resizeEmm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__29__num_getIcE17__stage2_int_loopEciPcRS2_RjcRKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPjRSD_PKc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__29__num_getIcE17__stage2_int_prepERNS_8ios_baseERc'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__29__num_getIcE19__stage2_float_loopEcRbRcPcRS4_ccRKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPjRSE_RjS4_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__29__num_getIcE19__stage2_float_prepERNS_8ios_baseEPcRcS5_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__29__num_getIwE17__stage2_int_loopEwiPcRS2_RjwRKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPjRSD_PKw'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__29__num_getIwE17__stage2_int_prepERNS_8ios_baseERw'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__29__num_getIwE19__stage2_float_loopEwRbRcPcRS4_wwRKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPjRSE_RjPw'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__29__num_getIwE19__stage2_float_prepERNS_8ios_baseEPwRwS5_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__29__num_putIcE21__widen_and_group_intEPcS2_S2_S2_RS2_S3_RKNS_6localeE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__29__num_putIcE23__widen_and_group_floatEPcS2_S2_S2_RS2_S3_RKNS_6localeE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__29__num_putIwE21__widen_and_group_intEPcS2_S2_PwRS3_S4_RKNS_6localeE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__29__num_putIwE23__widen_and_group_floatEPcS2_S2_PwRS3_S4_RKNS_6localeE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__29basic_iosIcNS_11char_traitsIcEEE7copyfmtERKS3_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__29basic_iosIcNS_11char_traitsIcEEED0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__29basic_iosIcNS_11char_traitsIcEEED1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__29basic_iosIcNS_11char_traitsIcEEED2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__29basic_iosIwNS_11char_traitsIwEEE7copyfmtERKS3_'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__29basic_iosIwNS_11char_traitsIwEEED0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__29basic_iosIwNS_11char_traitsIwEEED1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__29basic_iosIwNS_11char_traitsIwEEED2Ev'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__29money_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE2idE', 'size': 0} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__29money_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE8__do_getERS4_S4_bRKNS_6localeEjRjRbRKNS_5ctypeIcEERNS_10unique_ptrIcPFvPvEEERPcSM_'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__29money_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE2idE', 'size': 0} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__29money_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE8__do_getERS4_S4_bRKNS_6localeEjRjRbRKNS_5ctypeIwEERNS_10unique_ptrIwPFvPvEEERPwSM_'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__29money_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE2idE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__29money_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE2idE', 'size': 0} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__29strstreamD0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__29strstreamD1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__29strstreamD2Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__29to_stringEd'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__29to_stringEe'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__29to_stringEf'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__29to_stringEi'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__29to_stringEj'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__29to_stringEl'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__29to_stringEm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__29to_stringEx'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__29to_stringEy'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__2plIcNS_11char_traitsIcEENS_9allocatorIcEEEENS_12basic_stringIT_T0_T1_EEPKS6_RKS9_'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt8bad_castC1Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt8bad_castC1Ev'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt8bad_castC2Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt8bad_castC2Ev'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt8bad_castD0Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt8bad_castD0Ev'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt8bad_castD1Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt8bad_castD1Ev'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt8bad_castD2Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt8bad_castD2Ev'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt9bad_allocC1Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt9bad_allocC1Ev'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt9bad_allocC2Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt9bad_allocC2Ev'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt9bad_allocD0Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt9bad_allocD0Ev'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt9bad_allocD1Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt9bad_allocD1Ev'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt9bad_allocD2Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt9bad_allocD2Ev'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt9exceptionD0Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt9exceptionD0Ev'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt9exceptionD1Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt9exceptionD1Ev'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt9exceptionD2Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt9exceptionD2Ev'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt9type_infoD0Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt9type_infoD0Ev'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt9type_infoD1Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt9type_infoD1Ev'} +{'type': 'U', 'is_defined': False, 'name': '__ZNSt9type_infoD2Ev'} +{'type': 'I', 'is_defined': True, 'name': '__ZNSt9type_infoD2Ev'} +{'type': 'U', 'is_defined': False, 'name': '__ZSt10unexpectedv'} +{'type': 'I', 'is_defined': True, 'name': '__ZSt10unexpectedv'} +{'type': 'U', 'is_defined': False, 'name': '__ZSt13get_terminatev'} +{'type': 'I', 'is_defined': True, 'name': '__ZSt13get_terminatev'} +{'type': 'U', 'is_defined': False, 'name': '__ZSt13set_terminatePFvvE'} +{'type': 'I', 'is_defined': True, 'name': '__ZSt13set_terminatePFvvE'} +{'type': 'U', 'is_defined': False, 'name': '__ZSt14get_unexpectedv'} +{'type': 'I', 'is_defined': True, 'name': '__ZSt14get_unexpectedv'} +{'type': 'U', 'is_defined': False, 'name': '__ZSt14set_unexpectedPFvvE'} +{'type': 'I', 'is_defined': True, 'name': '__ZSt14set_unexpectedPFvvE'} +{'type': 'U', 'is_defined': False, 'name': '__ZSt15get_new_handlerv'} +{'type': 'I', 'is_defined': True, 'name': '__ZSt15get_new_handlerv'} +{'type': 'U', 'is_defined': False, 'name': '__ZSt15set_new_handlerPFvvE'} +{'type': 'I', 'is_defined': True, 'name': '__ZSt15set_new_handlerPFvvE'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZSt17__throw_bad_allocv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZSt17current_exceptionv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZSt17rethrow_exceptionSt13exception_ptr'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZSt18uncaught_exceptionv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZSt19uncaught_exceptionsv'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZSt7nothrow', 'size': 0} +{'type': 'U', 'is_defined': False, 'name': '__ZSt9terminatev'} +{'type': 'I', 'is_defined': True, 'name': '__ZSt9terminatev'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTCNSt3__210istrstreamE0_NS_13basic_istreamIcNS_11char_traitsIcEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTCNSt3__210ostrstreamE0_NS_13basic_ostreamIcNS_11char_traitsIcEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTCNSt3__214basic_iostreamIcNS_11char_traitsIcEEEE0_NS_13basic_istreamIcS2_EE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTCNSt3__214basic_iostreamIcNS_11char_traitsIcEEEE16_NS_13basic_ostreamIcS2_EE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTCNSt3__29strstreamE0_NS_13basic_istreamIcNS_11char_traitsIcEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTCNSt3__29strstreamE0_NS_14basic_iostreamIcNS_11char_traitsIcEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTCNSt3__29strstreamE16_NS_13basic_ostreamIcNS_11char_traitsIcEEEE', 'size': 0} +{'type': 'U', 'is_defined': False, 'name': '__ZTIDi'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIDi'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIDn'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIDn'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIDs'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIDs'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt12experimental15fundamentals_v112bad_any_castE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt12experimental19bad_optional_accessE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__210__time_getE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__210__time_putE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__210ctype_baseE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__210istrstreamE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__210money_baseE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__210moneypunctIcLb0EEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__210moneypunctIcLb1EEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__210moneypunctIwLb0EEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__210moneypunctIwLb1EEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__210ostrstreamE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__211__money_getIcEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__211__money_getIwEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__211__money_putIcEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__211__money_putIwEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__211regex_errorE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__212bad_weak_ptrE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__212codecvt_baseE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__212ctype_bynameIcEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__212ctype_bynameIwEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__212future_errorE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__212strstreambufE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__212system_errorE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__213basic_istreamIcNS_11char_traitsIcEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__213basic_istreamIwNS_11char_traitsIwEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__213basic_ostreamIcNS_11char_traitsIcEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__213basic_ostreamIwNS_11char_traitsIwEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__213messages_baseE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__214__codecvt_utf8IDiEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__214__codecvt_utf8IDsEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__214__codecvt_utf8IwEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__214__num_get_baseE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__214__num_put_baseE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__214__shared_countE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__214basic_iostreamIcNS_11char_traitsIcEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__214codecvt_bynameIDic11__mbstate_tEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__214codecvt_bynameIDsc11__mbstate_tEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__214codecvt_bynameIcc11__mbstate_tEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__214codecvt_bynameIwc11__mbstate_tEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__214collate_bynameIcEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__214collate_bynameIwEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__214error_categoryE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__215__codecvt_utf16IDiLb0EEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__215__codecvt_utf16IDiLb1EEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__215__codecvt_utf16IDsLb0EEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__215__codecvt_utf16IDsLb1EEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__215__codecvt_utf16IwLb0EEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__215__codecvt_utf16IwLb1EEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__215basic_streambufIcNS_11char_traitsIcEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__215basic_streambufIwNS_11char_traitsIwEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__215messages_bynameIcEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__215messages_bynameIwEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__215numpunct_bynameIcEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__215numpunct_bynameIwEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__215time_get_bynameIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__215time_get_bynameIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__215time_put_bynameIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__215time_put_bynameIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__216__narrow_to_utf8ILm16EEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__216__narrow_to_utf8ILm32EEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__217__assoc_sub_stateE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__217__widen_from_utf8ILm16EEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__217__widen_from_utf8ILm32EEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__217bad_function_callE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__217moneypunct_bynameIcLb0EEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__217moneypunct_bynameIcLb1EEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__217moneypunct_bynameIwLb0EEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__217moneypunct_bynameIwLb1EEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__218__time_get_storageIcEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__218__time_get_storageIwEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__219__shared_weak_countE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__220__codecvt_utf8_utf16IDiEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__220__codecvt_utf8_utf16IDsEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__220__codecvt_utf8_utf16IwEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__220__time_get_c_storageIcEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__220__time_get_c_storageIwEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__224__libcpp_debug_exceptionE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__25ctypeIcEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__25ctypeIwEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__26locale5facetE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__27codecvtIDic11__mbstate_tEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__27codecvtIDsc11__mbstate_tEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__27codecvtIcc11__mbstate_tEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__27codecvtIwc11__mbstate_tEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__27collateIcEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__27collateIwEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__27num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__27num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__27num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__27num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__28__c_nodeE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__28ios_base7failureE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__28ios_baseE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__28messagesIcEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__28messagesIwEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__28numpunctIcEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__28numpunctIwEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__28time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__28time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__28time_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__28time_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__29__num_getIcEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__29__num_getIwEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__29__num_putIcEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__29__num_putIwEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__29basic_iosIcNS_11char_traitsIcEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__29basic_iosIwNS_11char_traitsIwEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__29money_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__29money_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__29money_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__29money_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__29strstreamE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__29time_baseE', 'size': 0} +{'type': 'U', 'is_defined': False, 'name': '__ZTIPDi'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIPDi'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIPDn'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIPDn'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIPDs'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIPDs'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIPKDi'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIPKDi'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIPKDn'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIPKDn'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIPKDs'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIPKDs'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIPKa'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIPKa'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIPKb'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIPKb'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIPKc'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIPKc'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIPKd'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIPKd'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIPKe'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIPKe'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIPKf'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIPKf'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIPKh'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIPKh'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIPKi'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIPKi'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIPKj'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIPKj'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIPKl'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIPKl'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIPKm'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIPKm'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIPKs'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIPKs'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIPKt'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIPKt'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIPKv'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIPKv'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIPKw'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIPKw'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIPKx'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIPKx'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIPKy'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIPKy'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIPa'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIPa'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIPb'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIPb'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIPc'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIPc'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIPd'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIPd'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIPe'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIPe'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIPf'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIPf'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIPh'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIPh'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIPi'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIPi'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIPj'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIPj'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIPl'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIPl'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIPm'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIPm'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIPs'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIPs'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIPt'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIPt'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIPv'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIPv'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIPw'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIPw'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIPx'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIPx'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIPy'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIPy'} +{'type': 'U', 'is_defined': False, 'name': '__ZTISt10bad_typeid'} +{'type': 'I', 'is_defined': True, 'name': '__ZTISt10bad_typeid'} +{'type': 'U', 'is_defined': False, 'name': '__ZTISt11logic_error'} +{'type': 'I', 'is_defined': True, 'name': '__ZTISt11logic_error'} +{'type': 'U', 'is_defined': False, 'name': '__ZTISt11range_error'} +{'type': 'I', 'is_defined': True, 'name': '__ZTISt11range_error'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTISt12bad_any_cast', 'size': 0} +{'type': 'U', 'is_defined': False, 'name': '__ZTISt12domain_error'} +{'type': 'I', 'is_defined': True, 'name': '__ZTISt12domain_error'} +{'type': 'U', 'is_defined': False, 'name': '__ZTISt12length_error'} +{'type': 'I', 'is_defined': True, 'name': '__ZTISt12length_error'} +{'type': 'U', 'is_defined': False, 'name': '__ZTISt12out_of_range'} +{'type': 'I', 'is_defined': True, 'name': '__ZTISt12out_of_range'} +{'type': 'U', 'is_defined': False, 'name': '__ZTISt13bad_exception'} +{'type': 'I', 'is_defined': True, 'name': '__ZTISt13bad_exception'} +{'type': 'U', 'is_defined': False, 'name': '__ZTISt13runtime_error'} +{'type': 'I', 'is_defined': True, 'name': '__ZTISt13runtime_error'} +{'type': 'U', 'is_defined': False, 'name': '__ZTISt14overflow_error'} +{'type': 'I', 'is_defined': True, 'name': '__ZTISt14overflow_error'} +{'type': 'U', 'is_defined': False, 'name': '__ZTISt15underflow_error'} +{'type': 'I', 'is_defined': True, 'name': '__ZTISt15underflow_error'} +{'type': 'U', 'is_defined': False, 'name': '__ZTISt16invalid_argument'} +{'type': 'I', 'is_defined': True, 'name': '__ZTISt16invalid_argument'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTISt16nested_exception', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTISt18bad_variant_access', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTISt19bad_optional_access', 'size': 0} +{'type': 'U', 'is_defined': False, 'name': '__ZTISt20bad_array_new_length'} +{'type': 'I', 'is_defined': True, 'name': '__ZTISt20bad_array_new_length'} +{'type': 'U', 'is_defined': False, 'name': '__ZTISt8bad_cast'} +{'type': 'I', 'is_defined': True, 'name': '__ZTISt8bad_cast'} +{'type': 'U', 'is_defined': False, 'name': '__ZTISt9bad_alloc'} +{'type': 'I', 'is_defined': True, 'name': '__ZTISt9bad_alloc'} +{'type': 'U', 'is_defined': False, 'name': '__ZTISt9exception'} +{'type': 'I', 'is_defined': True, 'name': '__ZTISt9exception'} +{'type': 'U', 'is_defined': False, 'name': '__ZTISt9type_info'} +{'type': 'I', 'is_defined': True, 'name': '__ZTISt9type_info'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIa'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIa'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIb'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIb'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIc'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIc'} +{'type': 'U', 'is_defined': False, 'name': '__ZTId'} +{'type': 'I', 'is_defined': True, 'name': '__ZTId'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIe'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIe'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIf'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIf'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIh'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIh'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIi'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIi'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIj'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIj'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIl'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIl'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIm'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIm'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIs'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIs'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIt'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIt'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIv'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIv'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIw'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIw'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIx'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIx'} +{'type': 'U', 'is_defined': False, 'name': '__ZTIy'} +{'type': 'I', 'is_defined': True, 'name': '__ZTIy'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSDi'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSDi'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSDn'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSDn'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSDs'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSDs'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSN10__cxxabiv116__enum_type_infoE'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSN10__cxxabiv116__enum_type_infoE'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSN10__cxxabiv117__array_type_infoE'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSN10__cxxabiv117__array_type_infoE'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSN10__cxxabiv117__class_type_infoE'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSN10__cxxabiv117__class_type_infoE'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSN10__cxxabiv117__pbase_type_infoE'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSN10__cxxabiv117__pbase_type_infoE'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSN10__cxxabiv119__pointer_type_infoE'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSN10__cxxabiv119__pointer_type_infoE'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSN10__cxxabiv120__function_type_infoE'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSN10__cxxabiv120__function_type_infoE'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSN10__cxxabiv120__si_class_type_infoE'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSN10__cxxabiv120__si_class_type_infoE'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSN10__cxxabiv121__vmi_class_type_infoE'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSN10__cxxabiv121__vmi_class_type_infoE'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSN10__cxxabiv123__fundamental_type_infoE'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSN10__cxxabiv123__fundamental_type_infoE'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSN10__cxxabiv129__pointer_to_member_type_infoE'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSN10__cxxabiv129__pointer_to_member_type_infoE'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt12experimental15fundamentals_v112bad_any_castE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt12experimental19bad_optional_accessE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__210__time_getE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__210__time_putE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__210ctype_baseE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__210istrstreamE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__210money_baseE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__210moneypunctIcLb0EEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__210moneypunctIcLb1EEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__210moneypunctIwLb0EEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__210moneypunctIwLb1EEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__210ostrstreamE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__211__money_getIcEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__211__money_getIwEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__211__money_putIcEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__211__money_putIwEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__211regex_errorE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__212bad_weak_ptrE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__212codecvt_baseE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__212ctype_bynameIcEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__212ctype_bynameIwEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__212future_errorE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__212strstreambufE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__212system_errorE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__213basic_istreamIcNS_11char_traitsIcEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__213basic_istreamIwNS_11char_traitsIwEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__213basic_ostreamIcNS_11char_traitsIcEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__213basic_ostreamIwNS_11char_traitsIwEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__213messages_baseE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__214__codecvt_utf8IDiEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__214__codecvt_utf8IDsEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__214__codecvt_utf8IwEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__214__num_get_baseE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__214__num_put_baseE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__214__shared_countE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__214basic_iostreamIcNS_11char_traitsIcEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__214codecvt_bynameIDic11__mbstate_tEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__214codecvt_bynameIDsc11__mbstate_tEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__214codecvt_bynameIcc11__mbstate_tEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__214codecvt_bynameIwc11__mbstate_tEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__214collate_bynameIcEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__214collate_bynameIwEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__214error_categoryE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__215__codecvt_utf16IDiLb0EEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__215__codecvt_utf16IDiLb1EEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__215__codecvt_utf16IDsLb0EEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__215__codecvt_utf16IDsLb1EEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__215__codecvt_utf16IwLb0EEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__215__codecvt_utf16IwLb1EEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__215basic_streambufIcNS_11char_traitsIcEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__215basic_streambufIwNS_11char_traitsIwEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__215messages_bynameIcEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__215messages_bynameIwEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__215numpunct_bynameIcEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__215numpunct_bynameIwEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__215time_get_bynameIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__215time_get_bynameIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__215time_put_bynameIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__215time_put_bynameIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__216__narrow_to_utf8ILm16EEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__216__narrow_to_utf8ILm32EEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__217__assoc_sub_stateE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__217__widen_from_utf8ILm16EEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__217__widen_from_utf8ILm32EEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__217bad_function_callE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__217moneypunct_bynameIcLb0EEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__217moneypunct_bynameIcLb1EEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__217moneypunct_bynameIwLb0EEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__217moneypunct_bynameIwLb1EEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__218__time_get_storageIcEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__218__time_get_storageIwEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__219__shared_weak_countE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__220__codecvt_utf8_utf16IDiEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__220__codecvt_utf8_utf16IDsEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__220__codecvt_utf8_utf16IwEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__220__time_get_c_storageIcEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__220__time_get_c_storageIwEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__224__libcpp_debug_exceptionE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__25ctypeIcEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__25ctypeIwEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__26locale5facetE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__27codecvtIDic11__mbstate_tEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__27codecvtIDsc11__mbstate_tEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__27codecvtIcc11__mbstate_tEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__27codecvtIwc11__mbstate_tEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__27collateIcEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__27collateIwEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__27num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__27num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__27num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__27num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__28__c_nodeE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__28ios_base7failureE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__28ios_baseE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__28messagesIcEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__28messagesIwEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__28numpunctIcEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__28numpunctIwEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__28time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__28time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__28time_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__28time_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__29__num_getIcEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__29__num_getIwEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__29__num_putIcEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__29__num_putIwEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__29basic_iosIcNS_11char_traitsIcEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__29basic_iosIwNS_11char_traitsIwEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__29money_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__29money_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__29money_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__29money_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__29strstreamE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__29time_baseE', 'size': 0} +{'type': 'U', 'is_defined': False, 'name': '__ZTSPDi'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSPDi'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSPDn'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSPDn'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSPDs'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSPDs'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSPKDi'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSPKDi'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSPKDn'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSPKDn'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSPKDs'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSPKDs'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSPKa'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSPKa'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSPKb'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSPKb'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSPKc'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSPKc'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSPKd'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSPKd'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSPKe'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSPKe'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSPKf'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSPKf'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSPKh'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSPKh'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSPKi'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSPKi'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSPKj'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSPKj'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSPKl'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSPKl'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSPKm'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSPKm'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSPKs'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSPKs'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSPKt'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSPKt'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSPKv'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSPKv'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSPKw'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSPKw'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSPKx'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSPKx'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSPKy'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSPKy'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSPa'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSPa'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSPb'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSPb'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSPc'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSPc'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSPd'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSPd'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSPe'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSPe'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSPf'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSPf'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSPh'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSPh'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSPi'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSPi'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSPj'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSPj'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSPl'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSPl'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSPm'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSPm'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSPs'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSPs'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSPt'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSPt'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSPv'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSPv'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSPw'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSPw'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSPx'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSPx'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSPy'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSPy'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSSt10bad_typeid'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSSt10bad_typeid'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSSt11logic_error'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSSt11logic_error'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSSt11range_error'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSSt11range_error'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSSt12bad_any_cast', 'size': 0} +{'type': 'U', 'is_defined': False, 'name': '__ZTSSt12domain_error'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSSt12domain_error'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSSt12length_error'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSSt12length_error'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSSt12out_of_range'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSSt12out_of_range'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSSt13bad_exception'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSSt13bad_exception'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSSt13runtime_error'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSSt13runtime_error'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSSt14overflow_error'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSSt14overflow_error'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSSt15underflow_error'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSSt15underflow_error'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSSt16invalid_argument'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSSt16invalid_argument'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSSt16nested_exception', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSSt18bad_variant_access', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSSt19bad_optional_access', 'size': 0} +{'type': 'U', 'is_defined': False, 'name': '__ZTSSt20bad_array_new_length'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSSt20bad_array_new_length'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSSt8bad_cast'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSSt8bad_cast'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSSt9bad_alloc'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSSt9bad_alloc'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSSt9exception'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSSt9exception'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSSt9type_info'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSSt9type_info'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSa'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSa'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSb'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSb'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSc'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSc'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSd'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSd'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSe'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSe'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSf'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSf'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSh'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSh'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSi'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSi'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSj'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSj'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSl'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSl'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSm'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSm'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSs'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSs'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSt'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSt'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSv'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSv'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSw'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSw'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSx'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSx'} +{'type': 'U', 'is_defined': False, 'name': '__ZTSy'} +{'type': 'I', 'is_defined': True, 'name': '__ZTSy'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTTNSt3__210istrstreamE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTTNSt3__210ostrstreamE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTTNSt3__213basic_istreamIcNS_11char_traitsIcEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTTNSt3__213basic_istreamIwNS_11char_traitsIwEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTTNSt3__213basic_ostreamIcNS_11char_traitsIcEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTTNSt3__213basic_ostreamIwNS_11char_traitsIwEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTTNSt3__214basic_iostreamIcNS_11char_traitsIcEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTTNSt3__29strstreamE', 'size': 0} +{'type': 'U', 'is_defined': False, 'name': '__ZTVN10__cxxabiv116__enum_type_infoE'} +{'type': 'I', 'is_defined': True, 'name': '__ZTVN10__cxxabiv116__enum_type_infoE'} +{'type': 'U', 'is_defined': False, 'name': '__ZTVN10__cxxabiv117__array_type_infoE'} +{'type': 'I', 'is_defined': True, 'name': '__ZTVN10__cxxabiv117__array_type_infoE'} +{'type': 'U', 'is_defined': False, 'name': '__ZTVN10__cxxabiv117__class_type_infoE'} +{'type': 'I', 'is_defined': True, 'name': '__ZTVN10__cxxabiv117__class_type_infoE'} +{'type': 'U', 'is_defined': False, 'name': '__ZTVN10__cxxabiv117__pbase_type_infoE'} +{'type': 'I', 'is_defined': True, 'name': '__ZTVN10__cxxabiv117__pbase_type_infoE'} +{'type': 'U', 'is_defined': False, 'name': '__ZTVN10__cxxabiv119__pointer_type_infoE'} +{'type': 'I', 'is_defined': True, 'name': '__ZTVN10__cxxabiv119__pointer_type_infoE'} +{'type': 'U', 'is_defined': False, 'name': '__ZTVN10__cxxabiv120__function_type_infoE'} +{'type': 'I', 'is_defined': True, 'name': '__ZTVN10__cxxabiv120__function_type_infoE'} +{'type': 'U', 'is_defined': False, 'name': '__ZTVN10__cxxabiv120__si_class_type_infoE'} +{'type': 'I', 'is_defined': True, 'name': '__ZTVN10__cxxabiv120__si_class_type_infoE'} +{'type': 'U', 'is_defined': False, 'name': '__ZTVN10__cxxabiv121__vmi_class_type_infoE'} +{'type': 'I', 'is_defined': True, 'name': '__ZTVN10__cxxabiv121__vmi_class_type_infoE'} +{'type': 'U', 'is_defined': False, 'name': '__ZTVN10__cxxabiv123__fundamental_type_infoE'} +{'type': 'I', 'is_defined': True, 'name': '__ZTVN10__cxxabiv123__fundamental_type_infoE'} +{'type': 'U', 'is_defined': False, 'name': '__ZTVN10__cxxabiv129__pointer_to_member_type_infoE'} +{'type': 'I', 'is_defined': True, 'name': '__ZTVN10__cxxabiv129__pointer_to_member_type_infoE'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt12experimental15fundamentals_v112bad_any_castE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt12experimental19bad_optional_accessE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__210istrstreamE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__210moneypunctIcLb0EEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__210moneypunctIcLb1EEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__210moneypunctIwLb0EEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__210moneypunctIwLb1EEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__210ostrstreamE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__211regex_errorE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__212bad_weak_ptrE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__212ctype_bynameIcEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__212ctype_bynameIwEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__212future_errorE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__212strstreambufE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__212system_errorE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__213basic_istreamIcNS_11char_traitsIcEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__213basic_istreamIwNS_11char_traitsIwEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__213basic_ostreamIcNS_11char_traitsIcEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__213basic_ostreamIwNS_11char_traitsIwEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__214__codecvt_utf8IDiEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__214__codecvt_utf8IDsEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__214__codecvt_utf8IwEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__214__shared_countE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__214basic_iostreamIcNS_11char_traitsIcEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__214codecvt_bynameIDic11__mbstate_tEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__214codecvt_bynameIDsc11__mbstate_tEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__214codecvt_bynameIcc11__mbstate_tEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__214codecvt_bynameIwc11__mbstate_tEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__214collate_bynameIcEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__214collate_bynameIwEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__214error_categoryE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__215__codecvt_utf16IDiLb0EEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__215__codecvt_utf16IDiLb1EEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__215__codecvt_utf16IDsLb0EEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__215__codecvt_utf16IDsLb1EEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__215__codecvt_utf16IwLb0EEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__215__codecvt_utf16IwLb1EEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__215basic_streambufIcNS_11char_traitsIcEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__215basic_streambufIwNS_11char_traitsIwEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__215messages_bynameIcEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__215messages_bynameIwEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__215numpunct_bynameIcEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__215numpunct_bynameIwEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__215time_get_bynameIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__215time_get_bynameIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__215time_put_bynameIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__215time_put_bynameIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__216__narrow_to_utf8ILm16EEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__216__narrow_to_utf8ILm32EEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__217__assoc_sub_stateE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__217__widen_from_utf8ILm16EEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__217__widen_from_utf8ILm32EEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__217bad_function_callE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__217moneypunct_bynameIcLb0EEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__217moneypunct_bynameIcLb1EEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__217moneypunct_bynameIwLb0EEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__217moneypunct_bynameIwLb1EEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__219__shared_weak_countE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__220__codecvt_utf8_utf16IDiEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__220__codecvt_utf8_utf16IDsEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__220__codecvt_utf8_utf16IwEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__224__libcpp_debug_exceptionE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__25ctypeIcEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__25ctypeIwEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__26locale5facetE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__27codecvtIDic11__mbstate_tEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__27codecvtIDsc11__mbstate_tEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__27codecvtIcc11__mbstate_tEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__27codecvtIwc11__mbstate_tEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__27collateIcEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__27collateIwEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__27num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__27num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__27num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__27num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__28__c_nodeE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__28ios_base7failureE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__28ios_baseE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__28messagesIcEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__28messagesIwEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__28numpunctIcEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__28numpunctIwEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__28time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__28time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__28time_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__28time_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__29basic_iosIcNS_11char_traitsIcEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__29basic_iosIwNS_11char_traitsIwEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__29money_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__29money_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__29money_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__29money_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__29strstreamE', 'size': 0} +{'type': 'U', 'is_defined': False, 'name': '__ZTVSt10bad_typeid'} +{'type': 'I', 'is_defined': True, 'name': '__ZTVSt10bad_typeid'} +{'type': 'U', 'is_defined': False, 'name': '__ZTVSt11logic_error'} +{'type': 'I', 'is_defined': True, 'name': '__ZTVSt11logic_error'} +{'type': 'U', 'is_defined': False, 'name': '__ZTVSt11range_error'} +{'type': 'I', 'is_defined': True, 'name': '__ZTVSt11range_error'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVSt12bad_any_cast', 'size': 0} +{'type': 'U', 'is_defined': False, 'name': '__ZTVSt12domain_error'} +{'type': 'I', 'is_defined': True, 'name': '__ZTVSt12domain_error'} +{'type': 'U', 'is_defined': False, 'name': '__ZTVSt12length_error'} +{'type': 'I', 'is_defined': True, 'name': '__ZTVSt12length_error'} +{'type': 'U', 'is_defined': False, 'name': '__ZTVSt12out_of_range'} +{'type': 'I', 'is_defined': True, 'name': '__ZTVSt12out_of_range'} +{'type': 'U', 'is_defined': False, 'name': '__ZTVSt13bad_exception'} +{'type': 'I', 'is_defined': True, 'name': '__ZTVSt13bad_exception'} +{'type': 'U', 'is_defined': False, 'name': '__ZTVSt13runtime_error'} +{'type': 'I', 'is_defined': True, 'name': '__ZTVSt13runtime_error'} +{'type': 'U', 'is_defined': False, 'name': '__ZTVSt14overflow_error'} +{'type': 'I', 'is_defined': True, 'name': '__ZTVSt14overflow_error'} +{'type': 'U', 'is_defined': False, 'name': '__ZTVSt15underflow_error'} +{'type': 'I', 'is_defined': True, 'name': '__ZTVSt15underflow_error'} +{'type': 'U', 'is_defined': False, 'name': '__ZTVSt16invalid_argument'} +{'type': 'I', 'is_defined': True, 'name': '__ZTVSt16invalid_argument'} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVSt16nested_exception', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVSt18bad_variant_access', 'size': 0} +{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVSt19bad_optional_access', 'size': 0} +{'type': 'U', 'is_defined': False, 'name': '__ZTVSt20bad_array_new_length'} +{'type': 'I', 'is_defined': True, 'name': '__ZTVSt20bad_array_new_length'} +{'type': 'U', 'is_defined': False, 'name': '__ZTVSt8bad_cast'} +{'type': 'I', 'is_defined': True, 'name': '__ZTVSt8bad_cast'} +{'type': 'U', 'is_defined': False, 'name': '__ZTVSt9bad_alloc'} +{'type': 'I', 'is_defined': True, 'name': '__ZTVSt9bad_alloc'} +{'type': 'U', 'is_defined': False, 'name': '__ZTVSt9exception'} +{'type': 'I', 'is_defined': True, 'name': '__ZTVSt9exception'} +{'type': 'U', 'is_defined': False, 'name': '__ZTVSt9type_info'} +{'type': 'I', 'is_defined': True, 'name': '__ZTVSt9type_info'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZThn16_NSt3__214basic_iostreamIcNS_11char_traitsIcEEED0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZThn16_NSt3__214basic_iostreamIcNS_11char_traitsIcEEED1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZThn16_NSt3__29strstreamD0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZThn16_NSt3__29strstreamD1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZTv0_n24_NSt3__210istrstreamD0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZTv0_n24_NSt3__210istrstreamD1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZTv0_n24_NSt3__210ostrstreamD0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZTv0_n24_NSt3__210ostrstreamD1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZTv0_n24_NSt3__213basic_istreamIcNS_11char_traitsIcEEED0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZTv0_n24_NSt3__213basic_istreamIcNS_11char_traitsIcEEED1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZTv0_n24_NSt3__213basic_istreamIwNS_11char_traitsIwEEED0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZTv0_n24_NSt3__213basic_istreamIwNS_11char_traitsIwEEED1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZTv0_n24_NSt3__213basic_ostreamIcNS_11char_traitsIcEEED0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZTv0_n24_NSt3__213basic_ostreamIcNS_11char_traitsIcEEED1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZTv0_n24_NSt3__213basic_ostreamIwNS_11char_traitsIwEEED0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZTv0_n24_NSt3__213basic_ostreamIwNS_11char_traitsIwEEED1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZTv0_n24_NSt3__214basic_iostreamIcNS_11char_traitsIcEEED0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZTv0_n24_NSt3__214basic_iostreamIcNS_11char_traitsIcEEED1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZTv0_n24_NSt3__29strstreamD0Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZTv0_n24_NSt3__29strstreamD1Ev'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZdaPv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZdaPvRKSt9nothrow_t'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZdaPvSt11align_val_t'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZdaPvSt11align_val_tRKSt9nothrow_t'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZdaPvm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZdaPvmSt11align_val_t'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZdlPv'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZdlPvRKSt9nothrow_t'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZdlPvSt11align_val_t'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZdlPvSt11align_val_tRKSt9nothrow_t'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZdlPvm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZdlPvmSt11align_val_t'} +{'type': 'FUNC', 'is_defined': True, 'name': '__Znam'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZnamRKSt9nothrow_t'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZnamSt11align_val_t'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZnamSt11align_val_tRKSt9nothrow_t'} +{'type': 'FUNC', 'is_defined': True, 'name': '__Znwm'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZnwmRKSt9nothrow_t'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZnwmSt11align_val_t'} +{'type': 'FUNC', 'is_defined': True, 'name': '__ZnwmSt11align_val_tRKSt9nothrow_t'} +{'type': 'U', 'is_defined': False, 'name': '___cxa_allocate_exception'} +{'type': 'I', 'is_defined': True, 'name': '___cxa_allocate_exception'} +{'type': 'U', 'is_defined': False, 'name': '___cxa_atexit'} +{'type': 'U', 'is_defined': False, 'name': '___cxa_bad_cast'} +{'type': 'I', 'is_defined': True, 'name': '___cxa_bad_cast'} +{'type': 'U', 'is_defined': False, 'name': '___cxa_bad_typeid'} +{'type': 'I', 'is_defined': True, 'name': '___cxa_bad_typeid'} +{'type': 'U', 'is_defined': False, 'name': '___cxa_begin_catch'} +{'type': 'I', 'is_defined': True, 'name': '___cxa_begin_catch'} +{'type': 'U', 'is_defined': False, 'name': '___cxa_call_unexpected'} +{'type': 'I', 'is_defined': True, 'name': '___cxa_call_unexpected'} +{'type': 'U', 'is_defined': False, 'name': '___cxa_current_exception_type'} +{'type': 'I', 'is_defined': True, 'name': '___cxa_current_exception_type'} +{'type': 'U', 'is_defined': False, 'name': '___cxa_current_primary_exception'} +{'type': 'U', 'is_defined': False, 'name': '___cxa_decrement_exception_refcount'} +{'type': 'U', 'is_defined': False, 'name': '___cxa_deleted_virtual'} +{'type': 'I', 'is_defined': True, 'name': '___cxa_deleted_virtual'} +{'type': 'U', 'is_defined': False, 'name': '___cxa_demangle'} +{'type': 'I', 'is_defined': True, 'name': '___cxa_demangle'} +{'type': 'U', 'is_defined': False, 'name': '___cxa_end_catch'} +{'type': 'I', 'is_defined': True, 'name': '___cxa_end_catch'} +{'type': 'U', 'is_defined': False, 'name': '___cxa_free_exception'} +{'type': 'I', 'is_defined': True, 'name': '___cxa_free_exception'} +{'type': 'U', 'is_defined': False, 'name': '___cxa_get_exception_ptr'} +{'type': 'I', 'is_defined': True, 'name': '___cxa_get_exception_ptr'} +{'type': 'U', 'is_defined': False, 'name': '___cxa_get_globals'} +{'type': 'I', 'is_defined': True, 'name': '___cxa_get_globals'} +{'type': 'U', 'is_defined': False, 'name': '___cxa_get_globals_fast'} +{'type': 'I', 'is_defined': True, 'name': '___cxa_get_globals_fast'} +{'type': 'U', 'is_defined': False, 'name': '___cxa_guard_abort'} +{'type': 'I', 'is_defined': True, 'name': '___cxa_guard_abort'} +{'type': 'U', 'is_defined': False, 'name': '___cxa_guard_acquire'} +{'type': 'I', 'is_defined': True, 'name': '___cxa_guard_acquire'} +{'type': 'U', 'is_defined': False, 'name': '___cxa_guard_release'} +{'type': 'I', 'is_defined': True, 'name': '___cxa_guard_release'} +{'type': 'U', 'is_defined': False, 'name': '___cxa_increment_exception_refcount'} +{'type': 'U', 'is_defined': False, 'name': '___cxa_pure_virtual'} +{'type': 'I', 'is_defined': True, 'name': '___cxa_pure_virtual'} +{'type': 'U', 'is_defined': False, 'name': '___cxa_rethrow'} +{'type': 'I', 'is_defined': True, 'name': '___cxa_rethrow'} +{'type': 'U', 'is_defined': False, 'name': '___cxa_rethrow_primary_exception'} +{'type': 'U', 'is_defined': False, 'name': '___cxa_throw'} +{'type': 'I', 'is_defined': True, 'name': '___cxa_throw'} +{'type': 'U', 'is_defined': False, 'name': '___cxa_uncaught_exceptions'} +{'type': 'U', 'is_defined': False, 'name': '___cxa_vec_cctor'} +{'type': 'I', 'is_defined': True, 'name': '___cxa_vec_cctor'} +{'type': 'U', 'is_defined': False, 'name': '___cxa_vec_cleanup'} +{'type': 'I', 'is_defined': True, 'name': '___cxa_vec_cleanup'} +{'type': 'U', 'is_defined': False, 'name': '___cxa_vec_ctor'} +{'type': 'I', 'is_defined': True, 'name': '___cxa_vec_ctor'} +{'type': 'U', 'is_defined': False, 'name': '___cxa_vec_delete'} +{'type': 'I', 'is_defined': True, 'name': '___cxa_vec_delete'} +{'type': 'U', 'is_defined': False, 'name': '___cxa_vec_delete2'} +{'type': 'I', 'is_defined': True, 'name': '___cxa_vec_delete2'} +{'type': 'U', 'is_defined': False, 'name': '___cxa_vec_delete3'} +{'type': 'I', 'is_defined': True, 'name': '___cxa_vec_delete3'} +{'type': 'U', 'is_defined': False, 'name': '___cxa_vec_dtor'} +{'type': 'I', 'is_defined': True, 'name': '___cxa_vec_dtor'} +{'type': 'U', 'is_defined': False, 'name': '___cxa_vec_new'} +{'type': 'I', 'is_defined': True, 'name': '___cxa_vec_new'} +{'type': 'U', 'is_defined': False, 'name': '___cxa_vec_new2'} +{'type': 'I', 'is_defined': True, 'name': '___cxa_vec_new2'} +{'type': 'U', 'is_defined': False, 'name': '___cxa_vec_new3'} +{'type': 'I', 'is_defined': True, 'name': '___cxa_vec_new3'} +{'type': 'U', 'is_defined': False, 'name': '___dynamic_cast'} +{'type': 'I', 'is_defined': True, 'name': '___dynamic_cast'} +{'type': 'U', 'is_defined': False, 'name': '___gxx_personality_v0'} +{'type': 'I', 'is_defined': True, 'name': '___gxx_personality_v0'} diff --git a/libcxx/lib/abi/8.0/x86_64-unknown-linux-gnu.v1.abilist b/libcxx/lib/abi/8.0/x86_64-unknown-linux-gnu.v1.abilist new file mode 100644 index 0000000000000..0be9eb2fcb30c --- /dev/null +++ b/libcxx/lib/abi/8.0/x86_64-unknown-linux-gnu.v1.abilist @@ -0,0 +1,1861 @@ +{'name': '_ZNKSt11logic_error4whatEv', 'is_defined': False, 'type': 'FUNC'} +{'name': '_ZNKSt12bad_any_cast4whatEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt12experimental15fundamentals_v112bad_any_cast4whatEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt13runtime_error4whatEv', 'is_defined': False, 'type': 'FUNC'} +{'name': '_ZNKSt16nested_exception14rethrow_nestedEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt18bad_variant_access4whatEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt19bad_optional_access4whatEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__110__time_put8__do_putEPcRS1_PK2tmcc', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__110__time_put8__do_putEPwRS1_PK2tmcc', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__110error_code7messageEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__110moneypunctIcLb0EE11do_groupingEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__110moneypunctIcLb0EE13do_neg_formatEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__110moneypunctIcLb0EE13do_pos_formatEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__110moneypunctIcLb0EE14do_curr_symbolEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__110moneypunctIcLb0EE14do_frac_digitsEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__110moneypunctIcLb0EE16do_decimal_pointEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__110moneypunctIcLb0EE16do_negative_signEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__110moneypunctIcLb0EE16do_positive_signEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__110moneypunctIcLb0EE16do_thousands_sepEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__110moneypunctIcLb1EE11do_groupingEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__110moneypunctIcLb1EE13do_neg_formatEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__110moneypunctIcLb1EE13do_pos_formatEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__110moneypunctIcLb1EE14do_curr_symbolEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__110moneypunctIcLb1EE14do_frac_digitsEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__110moneypunctIcLb1EE16do_decimal_pointEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__110moneypunctIcLb1EE16do_negative_signEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__110moneypunctIcLb1EE16do_positive_signEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__110moneypunctIcLb1EE16do_thousands_sepEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__110moneypunctIwLb0EE11do_groupingEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__110moneypunctIwLb0EE13do_neg_formatEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__110moneypunctIwLb0EE13do_pos_formatEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__110moneypunctIwLb0EE14do_curr_symbolEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__110moneypunctIwLb0EE14do_frac_digitsEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__110moneypunctIwLb0EE16do_decimal_pointEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__110moneypunctIwLb0EE16do_negative_signEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__110moneypunctIwLb0EE16do_positive_signEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__110moneypunctIwLb0EE16do_thousands_sepEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__110moneypunctIwLb1EE11do_groupingEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__110moneypunctIwLb1EE13do_neg_formatEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__110moneypunctIwLb1EE13do_pos_formatEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__110moneypunctIwLb1EE14do_curr_symbolEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__110moneypunctIwLb1EE14do_frac_digitsEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__110moneypunctIwLb1EE16do_decimal_pointEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__110moneypunctIwLb1EE16do_negative_signEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__110moneypunctIwLb1EE16do_positive_signEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__110moneypunctIwLb1EE16do_thousands_sepEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__111__libcpp_db15__decrementableEPKv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__111__libcpp_db15__find_c_from_iEPv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__111__libcpp_db15__subscriptableEPKvl', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__111__libcpp_db17__dereferenceableEPKv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__111__libcpp_db17__find_c_and_lockEPv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__111__libcpp_db22__less_than_comparableEPKvS2_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__111__libcpp_db6unlockEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__111__libcpp_db8__find_cEPv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__111__libcpp_db9__addableEPKvl', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__112bad_weak_ptr4whatEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE12find_last_ofEPKcmm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE13find_first_ofEPKcmm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE16find_last_not_ofEPKcmm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE17find_first_not_ofEPKcmm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE2atEm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4copyEPcmm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4findEPKcmm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4findEcm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE5rfindEPKcmm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE5rfindEcm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7compareEPKc', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7compareEmmPKc', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7compareEmmPKcm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7compareEmmRKS5_mm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE12find_last_ofEPKwmm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE13find_first_ofEPKwmm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE16find_last_not_ofEPKwmm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE17find_first_not_ofEPKwmm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE2atEm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE4copyEPwmm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE4findEPKwmm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE4findEwm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE5rfindEPKwmm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE5rfindEwm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7compareEPKw', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7compareEmmPKw', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7compareEmmPKwm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7compareEmmRKS5_mm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__112ctype_bynameIcE10do_tolowerEPcPKc', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__112ctype_bynameIcE10do_tolowerEc', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__112ctype_bynameIcE10do_toupperEPcPKc', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__112ctype_bynameIcE10do_toupperEc', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__112ctype_bynameIwE10do_scan_isEtPKwS3_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__112ctype_bynameIwE10do_tolowerEPwPKw', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__112ctype_bynameIwE10do_tolowerEw', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__112ctype_bynameIwE10do_toupperEPwPKw', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__112ctype_bynameIwE10do_toupperEw', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__112ctype_bynameIwE11do_scan_notEtPKwS3_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__112ctype_bynameIwE5do_isEPKwS3_Pt', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__112ctype_bynameIwE5do_isEtw', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__112ctype_bynameIwE8do_widenEPKcS3_Pw', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__112ctype_bynameIwE8do_widenEc', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__112ctype_bynameIwE9do_narrowEPKwS3_cPc', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__112ctype_bynameIwE9do_narrowEwc', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__112strstreambuf6pcountEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__113random_device7entropyEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__114__codecvt_utf8IDiE10do_unshiftER11__mbstate_tPcS4_RS4_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__114__codecvt_utf8IDiE11do_encodingEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__114__codecvt_utf8IDiE13do_max_lengthEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__114__codecvt_utf8IDiE16do_always_noconvEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__114__codecvt_utf8IDiE5do_inER11__mbstate_tPKcS5_RS5_PDiS7_RS7_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__114__codecvt_utf8IDiE6do_outER11__mbstate_tPKDiS5_RS5_PcS7_RS7_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__114__codecvt_utf8IDiE9do_lengthER11__mbstate_tPKcS5_m', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__114__codecvt_utf8IDsE10do_unshiftER11__mbstate_tPcS4_RS4_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__114__codecvt_utf8IDsE11do_encodingEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__114__codecvt_utf8IDsE13do_max_lengthEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__114__codecvt_utf8IDsE16do_always_noconvEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__114__codecvt_utf8IDsE5do_inER11__mbstate_tPKcS5_RS5_PDsS7_RS7_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__114__codecvt_utf8IDsE6do_outER11__mbstate_tPKDsS5_RS5_PcS7_RS7_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__114__codecvt_utf8IDsE9do_lengthER11__mbstate_tPKcS5_m', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__114__codecvt_utf8IwE10do_unshiftER11__mbstate_tPcS4_RS4_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__114__codecvt_utf8IwE11do_encodingEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__114__codecvt_utf8IwE13do_max_lengthEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__114__codecvt_utf8IwE16do_always_noconvEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__114__codecvt_utf8IwE5do_inER11__mbstate_tPKcS5_RS5_PwS7_RS7_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__114__codecvt_utf8IwE6do_outER11__mbstate_tPKwS5_RS5_PcS7_RS7_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__114__codecvt_utf8IwE9do_lengthER11__mbstate_tPKcS5_m', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__114collate_bynameIcE10do_compareEPKcS3_S3_S3_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__114collate_bynameIcE12do_transformEPKcS3_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__114collate_bynameIwE10do_compareEPKwS3_S3_S3_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__114collate_bynameIwE12do_transformEPKwS3_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__114error_category10equivalentERKNS_10error_codeEi', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__114error_category10equivalentEiRKNS_15error_conditionE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__114error_category23default_error_conditionEi', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__115__codecvt_utf16IDiLb0EE10do_unshiftER11__mbstate_tPcS4_RS4_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__115__codecvt_utf16IDiLb0EE11do_encodingEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__115__codecvt_utf16IDiLb0EE13do_max_lengthEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__115__codecvt_utf16IDiLb0EE16do_always_noconvEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__115__codecvt_utf16IDiLb0EE5do_inER11__mbstate_tPKcS5_RS5_PDiS7_RS7_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__115__codecvt_utf16IDiLb0EE6do_outER11__mbstate_tPKDiS5_RS5_PcS7_RS7_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__115__codecvt_utf16IDiLb0EE9do_lengthER11__mbstate_tPKcS5_m', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__115__codecvt_utf16IDiLb1EE10do_unshiftER11__mbstate_tPcS4_RS4_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__115__codecvt_utf16IDiLb1EE11do_encodingEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__115__codecvt_utf16IDiLb1EE13do_max_lengthEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__115__codecvt_utf16IDiLb1EE16do_always_noconvEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__115__codecvt_utf16IDiLb1EE5do_inER11__mbstate_tPKcS5_RS5_PDiS7_RS7_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__115__codecvt_utf16IDiLb1EE6do_outER11__mbstate_tPKDiS5_RS5_PcS7_RS7_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__115__codecvt_utf16IDiLb1EE9do_lengthER11__mbstate_tPKcS5_m', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__115__codecvt_utf16IDsLb0EE10do_unshiftER11__mbstate_tPcS4_RS4_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__115__codecvt_utf16IDsLb0EE11do_encodingEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__115__codecvt_utf16IDsLb0EE13do_max_lengthEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__115__codecvt_utf16IDsLb0EE16do_always_noconvEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__115__codecvt_utf16IDsLb0EE5do_inER11__mbstate_tPKcS5_RS5_PDsS7_RS7_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__115__codecvt_utf16IDsLb0EE6do_outER11__mbstate_tPKDsS5_RS5_PcS7_RS7_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__115__codecvt_utf16IDsLb0EE9do_lengthER11__mbstate_tPKcS5_m', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__115__codecvt_utf16IDsLb1EE10do_unshiftER11__mbstate_tPcS4_RS4_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__115__codecvt_utf16IDsLb1EE11do_encodingEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__115__codecvt_utf16IDsLb1EE13do_max_lengthEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__115__codecvt_utf16IDsLb1EE16do_always_noconvEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__115__codecvt_utf16IDsLb1EE5do_inER11__mbstate_tPKcS5_RS5_PDsS7_RS7_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__115__codecvt_utf16IDsLb1EE6do_outER11__mbstate_tPKDsS5_RS5_PcS7_RS7_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__115__codecvt_utf16IDsLb1EE9do_lengthER11__mbstate_tPKcS5_m', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__115__codecvt_utf16IwLb0EE10do_unshiftER11__mbstate_tPcS4_RS4_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__115__codecvt_utf16IwLb0EE11do_encodingEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__115__codecvt_utf16IwLb0EE13do_max_lengthEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__115__codecvt_utf16IwLb0EE16do_always_noconvEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__115__codecvt_utf16IwLb0EE5do_inER11__mbstate_tPKcS5_RS5_PwS7_RS7_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__115__codecvt_utf16IwLb0EE6do_outER11__mbstate_tPKwS5_RS5_PcS7_RS7_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__115__codecvt_utf16IwLb0EE9do_lengthER11__mbstate_tPKcS5_m', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__115__codecvt_utf16IwLb1EE10do_unshiftER11__mbstate_tPcS4_RS4_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__115__codecvt_utf16IwLb1EE11do_encodingEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__115__codecvt_utf16IwLb1EE13do_max_lengthEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__115__codecvt_utf16IwLb1EE16do_always_noconvEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__115__codecvt_utf16IwLb1EE5do_inER11__mbstate_tPKcS5_RS5_PwS7_RS7_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__115__codecvt_utf16IwLb1EE6do_outER11__mbstate_tPKwS5_RS5_PcS7_RS7_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__115__codecvt_utf16IwLb1EE9do_lengthER11__mbstate_tPKcS5_m', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__115basic_streambufIcNS_11char_traitsIcEEE6getlocEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__115basic_streambufIwNS_11char_traitsIwEEE6getlocEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__115error_condition7messageEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__117moneypunct_bynameIcLb0EE11do_groupingEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__117moneypunct_bynameIcLb0EE13do_neg_formatEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__117moneypunct_bynameIcLb0EE13do_pos_formatEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__117moneypunct_bynameIcLb0EE14do_curr_symbolEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__117moneypunct_bynameIcLb0EE14do_frac_digitsEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__117moneypunct_bynameIcLb0EE16do_decimal_pointEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__117moneypunct_bynameIcLb0EE16do_negative_signEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__117moneypunct_bynameIcLb0EE16do_positive_signEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__117moneypunct_bynameIcLb0EE16do_thousands_sepEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__117moneypunct_bynameIcLb1EE11do_groupingEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__117moneypunct_bynameIcLb1EE13do_neg_formatEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__117moneypunct_bynameIcLb1EE13do_pos_formatEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__117moneypunct_bynameIcLb1EE14do_curr_symbolEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__117moneypunct_bynameIcLb1EE14do_frac_digitsEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__117moneypunct_bynameIcLb1EE16do_decimal_pointEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__117moneypunct_bynameIcLb1EE16do_negative_signEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__117moneypunct_bynameIcLb1EE16do_positive_signEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__117moneypunct_bynameIcLb1EE16do_thousands_sepEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__117moneypunct_bynameIwLb0EE11do_groupingEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__117moneypunct_bynameIwLb0EE13do_neg_formatEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__117moneypunct_bynameIwLb0EE13do_pos_formatEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__117moneypunct_bynameIwLb0EE14do_curr_symbolEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__117moneypunct_bynameIwLb0EE14do_frac_digitsEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__117moneypunct_bynameIwLb0EE16do_decimal_pointEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__117moneypunct_bynameIwLb0EE16do_negative_signEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__117moneypunct_bynameIwLb0EE16do_positive_signEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__117moneypunct_bynameIwLb0EE16do_thousands_sepEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__117moneypunct_bynameIwLb1EE11do_groupingEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__117moneypunct_bynameIwLb1EE13do_neg_formatEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__117moneypunct_bynameIwLb1EE13do_pos_formatEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__117moneypunct_bynameIwLb1EE14do_curr_symbolEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__117moneypunct_bynameIwLb1EE14do_frac_digitsEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__117moneypunct_bynameIwLb1EE16do_decimal_pointEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__117moneypunct_bynameIwLb1EE16do_negative_signEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__117moneypunct_bynameIwLb1EE16do_positive_signEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__117moneypunct_bynameIwLb1EE16do_thousands_sepEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__118__time_get_storageIcE15__do_date_orderEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__118__time_get_storageIwE15__do_date_orderEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__119__shared_weak_count13__get_deleterERKSt9type_info', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__120__codecvt_utf8_utf16IDiE10do_unshiftER11__mbstate_tPcS4_RS4_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__120__codecvt_utf8_utf16IDiE11do_encodingEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__120__codecvt_utf8_utf16IDiE13do_max_lengthEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__120__codecvt_utf8_utf16IDiE16do_always_noconvEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__120__codecvt_utf8_utf16IDiE5do_inER11__mbstate_tPKcS5_RS5_PDiS7_RS7_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__120__codecvt_utf8_utf16IDiE6do_outER11__mbstate_tPKDiS5_RS5_PcS7_RS7_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__120__codecvt_utf8_utf16IDiE9do_lengthER11__mbstate_tPKcS5_m', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__120__codecvt_utf8_utf16IDsE10do_unshiftER11__mbstate_tPcS4_RS4_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__120__codecvt_utf8_utf16IDsE11do_encodingEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__120__codecvt_utf8_utf16IDsE13do_max_lengthEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__120__codecvt_utf8_utf16IDsE16do_always_noconvEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__120__codecvt_utf8_utf16IDsE5do_inER11__mbstate_tPKcS5_RS5_PDsS7_RS7_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__120__codecvt_utf8_utf16IDsE6do_outER11__mbstate_tPKDsS5_RS5_PcS7_RS7_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__120__codecvt_utf8_utf16IDsE9do_lengthER11__mbstate_tPKcS5_m', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__120__codecvt_utf8_utf16IwE10do_unshiftER11__mbstate_tPcS4_RS4_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__120__codecvt_utf8_utf16IwE11do_encodingEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__120__codecvt_utf8_utf16IwE13do_max_lengthEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__120__codecvt_utf8_utf16IwE16do_always_noconvEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__120__codecvt_utf8_utf16IwE5do_inER11__mbstate_tPKcS5_RS5_PwS7_RS7_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__120__codecvt_utf8_utf16IwE6do_outER11__mbstate_tPKwS5_RS5_PcS7_RS7_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__120__codecvt_utf8_utf16IwE9do_lengthER11__mbstate_tPKcS5_m', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__120__time_get_c_storageIcE3__XEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__120__time_get_c_storageIcE3__cEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__120__time_get_c_storageIcE3__rEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__120__time_get_c_storageIcE3__xEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__120__time_get_c_storageIcE7__am_pmEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__120__time_get_c_storageIcE7__weeksEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__120__time_get_c_storageIcE8__monthsEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__120__time_get_c_storageIwE3__XEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__120__time_get_c_storageIwE3__cEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__120__time_get_c_storageIwE3__rEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__120__time_get_c_storageIwE3__xEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__120__time_get_c_storageIwE7__am_pmEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__120__time_get_c_storageIwE7__weeksEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__120__time_get_c_storageIwE8__monthsEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__120__vector_base_commonILb1EE20__throw_length_errorEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__120__vector_base_commonILb1EE20__throw_out_of_rangeEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__121__basic_string_commonILb1EE20__throw_length_errorEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__121__basic_string_commonILb1EE20__throw_out_of_rangeEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__123__match_any_but_newlineIcE6__execERNS_7__stateIcEE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__123__match_any_but_newlineIwE6__execERNS_7__stateIwEE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__124__libcpp_debug_exception4whatEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__15ctypeIcE10do_tolowerEPcPKc', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__15ctypeIcE10do_tolowerEc', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__15ctypeIcE10do_toupperEPcPKc', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__15ctypeIcE10do_toupperEc', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__15ctypeIcE8do_widenEPKcS3_Pc', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__15ctypeIcE8do_widenEc', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__15ctypeIcE9do_narrowEPKcS3_cPc', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__15ctypeIcE9do_narrowEcc', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__15ctypeIwE10do_scan_isEtPKwS3_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__15ctypeIwE10do_tolowerEPwPKw', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__15ctypeIwE10do_tolowerEw', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__15ctypeIwE10do_toupperEPwPKw', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__15ctypeIwE10do_toupperEw', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__15ctypeIwE11do_scan_notEtPKwS3_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__15ctypeIwE5do_isEPKwS3_Pt', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__15ctypeIwE5do_isEtw', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__15ctypeIwE8do_widenEPKcS3_Pw', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__15ctypeIwE8do_widenEc', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__15ctypeIwE9do_narrowEPKwS3_cPc', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__15ctypeIwE9do_narrowEwc', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__16locale4nameEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__16locale9has_facetERNS0_2idE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__16locale9use_facetERNS0_2idE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__16localeeqERKS0_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__17codecvtIDic11__mbstate_tE10do_unshiftERS1_PcS4_RS4_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__17codecvtIDic11__mbstate_tE11do_encodingEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__17codecvtIDic11__mbstate_tE13do_max_lengthEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__17codecvtIDic11__mbstate_tE16do_always_noconvEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__17codecvtIDic11__mbstate_tE5do_inERS1_PKcS5_RS5_PDiS7_RS7_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__17codecvtIDic11__mbstate_tE6do_outERS1_PKDiS5_RS5_PcS7_RS7_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__17codecvtIDic11__mbstate_tE9do_lengthERS1_PKcS5_m', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__17codecvtIDsc11__mbstate_tE10do_unshiftERS1_PcS4_RS4_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__17codecvtIDsc11__mbstate_tE11do_encodingEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__17codecvtIDsc11__mbstate_tE13do_max_lengthEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__17codecvtIDsc11__mbstate_tE16do_always_noconvEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__17codecvtIDsc11__mbstate_tE5do_inERS1_PKcS5_RS5_PDsS7_RS7_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__17codecvtIDsc11__mbstate_tE6do_outERS1_PKDsS5_RS5_PcS7_RS7_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__17codecvtIDsc11__mbstate_tE9do_lengthERS1_PKcS5_m', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__17codecvtIcc11__mbstate_tE10do_unshiftERS1_PcS4_RS4_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__17codecvtIcc11__mbstate_tE11do_encodingEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__17codecvtIcc11__mbstate_tE13do_max_lengthEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__17codecvtIcc11__mbstate_tE16do_always_noconvEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__17codecvtIcc11__mbstate_tE5do_inERS1_PKcS5_RS5_PcS7_RS7_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__17codecvtIcc11__mbstate_tE6do_outERS1_PKcS5_RS5_PcS7_RS7_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__17codecvtIcc11__mbstate_tE9do_lengthERS1_PKcS5_m', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__17codecvtIwc11__mbstate_tE10do_unshiftERS1_PcS4_RS4_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__17codecvtIwc11__mbstate_tE11do_encodingEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__17codecvtIwc11__mbstate_tE13do_max_lengthEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__17codecvtIwc11__mbstate_tE16do_always_noconvEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__17codecvtIwc11__mbstate_tE5do_inERS1_PKcS5_RS5_PwS7_RS7_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__17codecvtIwc11__mbstate_tE6do_outERS1_PKwS5_RS5_PcS7_RS7_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__17codecvtIwc11__mbstate_tE9do_lengthERS1_PKcS5_m', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__17collateIcE10do_compareEPKcS3_S3_S3_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__17collateIcE12do_transformEPKcS3_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__17collateIcE7do_hashEPKcS3_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__17collateIwE10do_compareEPKwS3_S3_S3_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__17collateIwE12do_transformEPKwS3_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__17collateIwE7do_hashEPKwS3_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRPv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRb', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRd', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRe', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRf', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRl', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRt', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRx', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRy', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjS8_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRPv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRb', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRd', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRe', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRf', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRl', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRt', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRx', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRy', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjS8_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEcPKv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEcb', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEcd', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEce', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEcl', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEcm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEcx', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEcy', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwPKv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwb', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwd', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwe', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwl', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwx', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwy', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__18ios_base6getlocEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__18messagesIcE6do_getEliiRKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__18messagesIcE7do_openERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERKNS_6localeE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__18messagesIcE8do_closeEl', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__18messagesIwE6do_getEliiRKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__18messagesIwE7do_openERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERKNS_6localeE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__18messagesIwE8do_closeEl', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__18numpunctIcE11do_groupingEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__18numpunctIcE11do_truenameEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__18numpunctIcE12do_falsenameEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__18numpunctIcE16do_decimal_pointEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__18numpunctIcE16do_thousands_sepEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__18numpunctIwE11do_groupingEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__18numpunctIwE11do_truenameEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__18numpunctIwE12do_falsenameEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__18numpunctIwE16do_decimal_pointEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__18numpunctIwE16do_thousands_sepEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE10__get_hourERiRS4_S4_RjRKNS_5ctypeIcEE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE10__get_yearERiRS4_S4_RjRKNS_5ctypeIcEE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE11__get_am_pmERiRS4_S4_RjRKNS_5ctypeIcEE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE11__get_monthERiRS4_S4_RjRKNS_5ctypeIcEE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE11__get_year4ERiRS4_S4_RjRKNS_5ctypeIcEE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE11do_get_dateES4_S4_RNS_8ios_baseERjP2tm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE11do_get_timeES4_S4_RNS_8ios_baseERjP2tm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE11do_get_yearES4_S4_RNS_8ios_baseERjP2tm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE12__get_minuteERiRS4_S4_RjRKNS_5ctypeIcEE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE12__get_secondERiRS4_S4_RjRKNS_5ctypeIcEE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE13__get_12_hourERiRS4_S4_RjRKNS_5ctypeIcEE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE13__get_percentERS4_S4_RjRKNS_5ctypeIcEE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE13__get_weekdayERiRS4_S4_RjRKNS_5ctypeIcEE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE13do_date_orderEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE14do_get_weekdayES4_S4_RNS_8ios_baseERjP2tm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE15__get_monthnameERiRS4_S4_RjRKNS_5ctypeIcEE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE16do_get_monthnameES4_S4_RNS_8ios_baseERjP2tm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE17__get_weekdaynameERiRS4_S4_RjRKNS_5ctypeIcEE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE17__get_white_spaceERS4_S4_RjRKNS_5ctypeIcEE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE18__get_day_year_numERiRS4_S4_RjRKNS_5ctypeIcEE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE3getES4_S4_RNS_8ios_baseERjP2tmPKcSC_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjP2tmcc', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE9__get_dayERiRS4_S4_RjRKNS_5ctypeIcEE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE10__get_hourERiRS4_S4_RjRKNS_5ctypeIwEE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE10__get_yearERiRS4_S4_RjRKNS_5ctypeIwEE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE11__get_am_pmERiRS4_S4_RjRKNS_5ctypeIwEE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE11__get_monthERiRS4_S4_RjRKNS_5ctypeIwEE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE11__get_year4ERiRS4_S4_RjRKNS_5ctypeIwEE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE11do_get_dateES4_S4_RNS_8ios_baseERjP2tm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE11do_get_timeES4_S4_RNS_8ios_baseERjP2tm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE11do_get_yearES4_S4_RNS_8ios_baseERjP2tm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE12__get_minuteERiRS4_S4_RjRKNS_5ctypeIwEE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE12__get_secondERiRS4_S4_RjRKNS_5ctypeIwEE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE13__get_12_hourERiRS4_S4_RjRKNS_5ctypeIwEE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE13__get_percentERS4_S4_RjRKNS_5ctypeIwEE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE13__get_weekdayERiRS4_S4_RjRKNS_5ctypeIwEE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE13do_date_orderEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE14do_get_weekdayES4_S4_RNS_8ios_baseERjP2tm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE15__get_monthnameERiRS4_S4_RjRKNS_5ctypeIwEE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE16do_get_monthnameES4_S4_RNS_8ios_baseERjP2tm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE17__get_weekdaynameERiRS4_S4_RjRKNS_5ctypeIwEE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE17__get_white_spaceERS4_S4_RjRKNS_5ctypeIwEE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE18__get_day_year_numERiRS4_S4_RjRKNS_5ctypeIwEE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE3getES4_S4_RNS_8ios_baseERjP2tmPKwSC_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjP2tmcc', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE9__get_dayERiRS4_S4_RjRKNS_5ctypeIwEE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__18time_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE3putES4_RNS_8ios_baseEcPK2tmPKcSC_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__18time_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEcPK2tmcc', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__18time_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE3putES4_RNS_8ios_baseEwPK2tmPKwSC_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__18time_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwPK2tmcc', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__19money_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_bRNS_8ios_baseERjRNS_12basic_stringIcS3_NS_9allocatorIcEEEE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__19money_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_bRNS_8ios_baseERjRe', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__19money_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_bRNS_8ios_baseERjRNS_12basic_stringIwS3_NS_9allocatorIwEEEE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__19money_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_bRNS_8ios_baseERjRe', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__19money_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_bRNS_8ios_baseEcRKNS_12basic_stringIcS3_NS_9allocatorIcEEEE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__19money_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_bRNS_8ios_baseEce', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__19money_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_bRNS_8ios_baseEwRKNS_12basic_stringIwS3_NS_9allocatorIwEEEE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNKSt3__19money_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_bRNS_8ios_baseEwe', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt11logic_errorC1EPKc', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt11logic_errorC1ERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt11logic_errorC1ERKS_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt11logic_errorC2EPKc', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt11logic_errorC2ERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt11logic_errorC2ERKS_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt11logic_errorD2Ev', 'is_defined': False, 'type': 'FUNC'} +{'name': '_ZNSt11logic_erroraSERKS_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt12experimental19bad_optional_accessD0Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt12experimental19bad_optional_accessD1Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt12experimental19bad_optional_accessD2Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt12length_errorD1Ev', 'is_defined': False, 'type': 'FUNC'} +{'name': '_ZNSt12out_of_rangeD1Ev', 'is_defined': False, 'type': 'FUNC'} +{'name': '_ZNSt13exception_ptrC1ERKS_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt13exception_ptrC2ERKS_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt13exception_ptrD1Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt13exception_ptrD2Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt13exception_ptraSERKS_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt13runtime_errorC1EPKc', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt13runtime_errorC1ERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt13runtime_errorC1ERKS_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt13runtime_errorC2EPKc', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt13runtime_errorC2ERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt13runtime_errorC2ERKS_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt13runtime_errorD1Ev', 'is_defined': False, 'type': 'FUNC'} +{'name': '_ZNSt13runtime_errorD2Ev', 'is_defined': False, 'type': 'FUNC'} +{'name': '_ZNSt13runtime_erroraSERKS_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt14overflow_errorD1Ev', 'is_defined': False, 'type': 'FUNC'} +{'name': '_ZNSt16invalid_argumentD1Ev', 'is_defined': False, 'type': 'FUNC'} +{'name': '_ZNSt16nested_exceptionC1Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt16nested_exceptionC2Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt16nested_exceptionD0Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt16nested_exceptionD1Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt16nested_exceptionD2Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt19bad_optional_accessD0Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt19bad_optional_accessD1Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt19bad_optional_accessD2Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__110__time_getC1EPKc', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__110__time_getC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__110__time_getC2EPKc', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__110__time_getC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__110__time_getD1Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__110__time_getD2Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__110__time_putC1EPKc', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__110__time_putC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__110__time_putC2EPKc', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__110__time_putC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__110__time_putD1Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__110__time_putD2Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__110adopt_lockE', 'is_defined': True, 'type': 'OBJECT', 'size': 1} +{'name': '_ZNSt3__110ctype_base5alnumE', 'is_defined': True, 'type': 'OBJECT', 'size': 2} +{'name': '_ZNSt3__110ctype_base5alphaE', 'is_defined': True, 'type': 'OBJECT', 'size': 2} +{'name': '_ZNSt3__110ctype_base5blankE', 'is_defined': True, 'type': 'OBJECT', 'size': 2} +{'name': '_ZNSt3__110ctype_base5cntrlE', 'is_defined': True, 'type': 'OBJECT', 'size': 2} +{'name': '_ZNSt3__110ctype_base5digitE', 'is_defined': True, 'type': 'OBJECT', 'size': 2} +{'name': '_ZNSt3__110ctype_base5graphE', 'is_defined': True, 'type': 'OBJECT', 'size': 2} +{'name': '_ZNSt3__110ctype_base5lowerE', 'is_defined': True, 'type': 'OBJECT', 'size': 2} +{'name': '_ZNSt3__110ctype_base5printE', 'is_defined': True, 'type': 'OBJECT', 'size': 2} +{'name': '_ZNSt3__110ctype_base5punctE', 'is_defined': True, 'type': 'OBJECT', 'size': 2} +{'name': '_ZNSt3__110ctype_base5spaceE', 'is_defined': True, 'type': 'OBJECT', 'size': 2} +{'name': '_ZNSt3__110ctype_base5upperE', 'is_defined': True, 'type': 'OBJECT', 'size': 2} +{'name': '_ZNSt3__110ctype_base6xdigitE', 'is_defined': True, 'type': 'OBJECT', 'size': 2} +{'name': '_ZNSt3__110defer_lockE', 'is_defined': True, 'type': 'OBJECT', 'size': 1} +{'name': '_ZNSt3__110istrstreamD0Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__110istrstreamD1Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__110istrstreamD2Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__110moneypunctIcLb0EE2idE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} +{'name': '_ZNSt3__110moneypunctIcLb0EE4intlE', 'is_defined': True, 'type': 'OBJECT', 'size': 1} +{'name': '_ZNSt3__110moneypunctIcLb1EE2idE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} +{'name': '_ZNSt3__110moneypunctIcLb1EE4intlE', 'is_defined': True, 'type': 'OBJECT', 'size': 1} +{'name': '_ZNSt3__110moneypunctIwLb0EE2idE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} +{'name': '_ZNSt3__110moneypunctIwLb0EE4intlE', 'is_defined': True, 'type': 'OBJECT', 'size': 1} +{'name': '_ZNSt3__110moneypunctIwLb1EE2idE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} +{'name': '_ZNSt3__110moneypunctIwLb1EE4intlE', 'is_defined': True, 'type': 'OBJECT', 'size': 1} +{'name': '_ZNSt3__110ostrstreamD0Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__110ostrstreamD1Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__110ostrstreamD2Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__110to_wstringEd', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__110to_wstringEe', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__110to_wstringEf', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__110to_wstringEi', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__110to_wstringEj', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__110to_wstringEl', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__110to_wstringEm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__110to_wstringEx', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__110to_wstringEy', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__111__call_onceERVmPvPFvS2_E', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__111__libcpp_db10__insert_cEPv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__111__libcpp_db10__insert_iEPv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__111__libcpp_db11__insert_icEPvPKv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__111__libcpp_db15__iterator_copyEPvPKv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__111__libcpp_db16__invalidate_allEPv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__111__libcpp_db4swapEPvS1_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__111__libcpp_db9__erase_cEPv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__111__libcpp_db9__erase_iEPv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__111__libcpp_dbC1Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__111__libcpp_dbC2Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__111__libcpp_dbD1Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__111__libcpp_dbD2Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__111__money_getIcE13__gather_infoEbRKNS_6localeERNS_10money_base7patternERcS8_RNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEESF_SF_SF_Ri', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__111__money_getIwE13__gather_infoEbRKNS_6localeERNS_10money_base7patternERwS8_RNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERNS9_IwNSA_IwEENSC_IwEEEESJ_SJ_Ri', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__111__money_putIcE13__gather_infoEbbRKNS_6localeERNS_10money_base7patternERcS8_RNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEESF_SF_Ri', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__111__money_putIcE8__formatEPcRS2_S3_jPKcS5_RKNS_5ctypeIcEEbRKNS_10money_base7patternEccRKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEESL_SL_i', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__111__money_putIwE13__gather_infoEbbRKNS_6localeERNS_10money_base7patternERwS8_RNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERNS9_IwNSA_IwEENSC_IwEEEESJ_Ri', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__111__money_putIwE8__formatEPwRS2_S3_jPKwS5_RKNS_5ctypeIwEEbRKNS_10money_base7patternEwwRKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERKNSE_IwNSF_IwEENSH_IwEEEESQ_i', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__111regex_errorC1ENS_15regex_constants10error_typeE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__111regex_errorC2ENS_15regex_constants10error_typeE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__111regex_errorD0Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__111regex_errorD1Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__111regex_errorD2Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__111this_thread9sleep_forERKNS_6chrono8durationIxNS_5ratioILl1ELl1000000000EEEEE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__111timed_mutex4lockEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__111timed_mutex6unlockEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__111timed_mutex8try_lockEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__111timed_mutexC1Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__111timed_mutexC2Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__111timed_mutexD1Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__111timed_mutexD2Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__111try_to_lockE', 'is_defined': True, 'type': 'OBJECT', 'size': 1} +{'name': '_ZNSt3__112__do_nothingEPv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112__get_sp_mutEPKv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112__next_primeEm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112__rs_default4__c_E', 'is_defined': True, 'type': 'OBJECT', 'size': 4} +{'name': '_ZNSt3__112__rs_defaultC1ERKS0_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112__rs_defaultC1Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112__rs_defaultC2ERKS0_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112__rs_defaultC2Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112__rs_defaultD1Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112__rs_defaultD2Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112__rs_defaultclEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112bad_weak_ptrD0Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112bad_weak_ptrD1Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112bad_weak_ptrD2Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE21__grow_by_and_replaceEmmmmmmPKc', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE2atEm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4nposE', 'is_defined': True, 'type': 'OBJECT', 'size': 8} +{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE5eraseEmm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcmm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEmc', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6appendEPKc', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6appendEPKcm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6appendERKS5_mm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6appendEmc', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignEPKc', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignEPKcm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignERKS5_mm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignEmc', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6insertENS_11__wrap_iterIPKcEEc', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6insertEmPKc', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6insertEmPKcm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6insertEmRKS5_mm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6insertEmmc', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6resizeEmc', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7replaceEmmPKc', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7replaceEmmPKcm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7replaceEmmRKS5_mm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7replaceEmmmc', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7reserveEm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9__grow_byEmmmmmm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9push_backEc', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC1ERKS5_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC1ERKS5_RKS4_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC1ERKS5_mmRKS4_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2ERKS5_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2ERKS5_RKS4_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2ERKS5_mmRKS4_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED1Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEaSERKS5_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEaSEc', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE21__grow_by_and_replaceEmmmmmmPKw', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE2atEm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE4nposE', 'is_defined': True, 'type': 'OBJECT', 'size': 8} +{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE5eraseEmm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6__initEPKwm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6__initEPKwmm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6__initEmw', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6appendEPKw', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6appendEPKwm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6appendERKS5_mm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6appendEmw', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6assignEPKw', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6assignEPKwm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6assignERKS5_mm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6assignEmw', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6insertENS_11__wrap_iterIPKwEEw', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6insertEmPKw', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6insertEmPKwm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6insertEmRKS5_mm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6insertEmmw', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6resizeEmw', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7replaceEmmPKw', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7replaceEmmPKwm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7replaceEmmRKS5_mm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7replaceEmmmw', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7reserveEm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE9__grow_byEmmmmmm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE9push_backEw', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC1ERKS5_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC1ERKS5_RKS4_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC1ERKS5_mmRKS4_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC2ERKS5_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC2ERKS5_RKS4_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC2ERKS5_mmRKS4_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEED1Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEED2Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEaSERKS5_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEaSEw', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112ctype_bynameIcEC1EPKcm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112ctype_bynameIcEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112ctype_bynameIcEC2EPKcm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112ctype_bynameIcEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112ctype_bynameIcED0Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112ctype_bynameIcED1Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112ctype_bynameIcED2Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112ctype_bynameIwEC1EPKcm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112ctype_bynameIwEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112ctype_bynameIwEC2EPKcm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112ctype_bynameIwEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112ctype_bynameIwED0Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112ctype_bynameIwED1Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112ctype_bynameIwED2Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112future_errorC1ENS_10error_codeE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112future_errorC2ENS_10error_codeE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112future_errorD0Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112future_errorD1Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112future_errorD2Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112placeholders2_1E', 'is_defined': True, 'type': 'OBJECT', 'size': 1} +{'name': '_ZNSt3__112placeholders2_2E', 'is_defined': True, 'type': 'OBJECT', 'size': 1} +{'name': '_ZNSt3__112placeholders2_3E', 'is_defined': True, 'type': 'OBJECT', 'size': 1} +{'name': '_ZNSt3__112placeholders2_4E', 'is_defined': True, 'type': 'OBJECT', 'size': 1} +{'name': '_ZNSt3__112placeholders2_5E', 'is_defined': True, 'type': 'OBJECT', 'size': 1} +{'name': '_ZNSt3__112placeholders2_6E', 'is_defined': True, 'type': 'OBJECT', 'size': 1} +{'name': '_ZNSt3__112placeholders2_7E', 'is_defined': True, 'type': 'OBJECT', 'size': 1} +{'name': '_ZNSt3__112placeholders2_8E', 'is_defined': True, 'type': 'OBJECT', 'size': 1} +{'name': '_ZNSt3__112placeholders2_9E', 'is_defined': True, 'type': 'OBJECT', 'size': 1} +{'name': '_ZNSt3__112placeholders3_10E', 'is_defined': True, 'type': 'OBJECT', 'size': 1} +{'name': '_ZNSt3__112strstreambuf3strEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112strstreambuf4swapERS0_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112strstreambuf6__initEPclS1_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112strstreambuf6freezeEb', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112strstreambuf7seekoffExNS_8ios_base7seekdirEj', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112strstreambuf7seekposENS_4fposI11__mbstate_tEEj', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112strstreambuf8overflowEi', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112strstreambuf9pbackfailEi', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112strstreambuf9underflowEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112strstreambufC1EPFPvmEPFvS1_E', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112strstreambufC1EPKal', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112strstreambufC1EPKcl', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112strstreambufC1EPKhl', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112strstreambufC1EPalS1_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112strstreambufC1EPclS1_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112strstreambufC1EPhlS1_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112strstreambufC1El', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112strstreambufC2EPFPvmEPFvS1_E', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112strstreambufC2EPKal', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112strstreambufC2EPKcl', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112strstreambufC2EPKhl', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112strstreambufC2EPalS1_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112strstreambufC2EPclS1_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112strstreambufC2EPhlS1_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112strstreambufC2El', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112strstreambufD0Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112strstreambufD1Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112strstreambufD2Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112system_error6__initERKNS_10error_codeENS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112system_errorC1ENS_10error_codeE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112system_errorC1ENS_10error_codeEPKc', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112system_errorC1ENS_10error_codeERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112system_errorC1EiRKNS_14error_categoryE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112system_errorC1EiRKNS_14error_categoryEPKc', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112system_errorC1EiRKNS_14error_categoryERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112system_errorC2ENS_10error_codeE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112system_errorC2ENS_10error_codeEPKc', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112system_errorC2ENS_10error_codeERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112system_errorC2EiRKNS_14error_categoryE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112system_errorC2EiRKNS_14error_categoryEPKc', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112system_errorC2EiRKNS_14error_categoryERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112system_errorD0Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112system_errorD1Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__112system_errorD2Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113allocator_argE', 'is_defined': True, 'type': 'OBJECT', 'size': 1} +{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE3getEPcl', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE3getEPclc', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE3getERNS_15basic_streambufIcS2_EE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE3getERNS_15basic_streambufIcS2_EEc', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE3getERc', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE3getEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE4peekEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE4readEPcl', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE4swapERS3_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE4syncEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE5seekgENS_4fposI11__mbstate_tEE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE5seekgExNS_8ios_base7seekdirE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE5tellgEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE5ungetEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE6ignoreEli', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE6sentryC1ERS3_b', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE6sentryC2ERS3_b', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE7getlineEPcl', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE7getlineEPclc', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE7putbackEc', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE8readsomeEPcl', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEEC1EPNS_15basic_streambufIcS2_EE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEEC2EPNS_15basic_streambufIcS2_EE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEED0Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEED1Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEED2Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsEPFRNS_8ios_baseES5_E', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsEPFRNS_9basic_iosIcS2_EES6_E', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsEPFRS3_S4_E', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsEPNS_15basic_streambufIcS2_EE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERPv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERb', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERd', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERe', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERf', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERi', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERj', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERl', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERs', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERt', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERx', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERy', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE3getEPwl', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE3getEPwlw', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE3getERNS_15basic_streambufIwS2_EE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE3getERNS_15basic_streambufIwS2_EEw', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE3getERw', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE3getEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE4peekEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE4readEPwl', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE4swapERS3_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE4syncEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE5seekgENS_4fposI11__mbstate_tEE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE5seekgExNS_8ios_base7seekdirE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE5tellgEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE5ungetEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE6ignoreElj', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE6sentryC1ERS3_b', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE6sentryC2ERS3_b', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE7getlineEPwl', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE7getlineEPwlw', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE7putbackEw', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE8readsomeEPwl', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEEC1EPNS_15basic_streambufIwS2_EE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEEC2EPNS_15basic_streambufIwS2_EE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEED0Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEED1Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEED2Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsEPFRNS_8ios_baseES5_E', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsEPFRNS_9basic_iosIwS2_EES6_E', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsEPFRS3_S4_E', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsEPNS_15basic_streambufIwS2_EE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERPv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERb', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERd', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERe', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERf', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERi', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERj', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERl', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERs', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERt', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERx', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERy', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE3putEc', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE4swapERS3_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE5flushEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE5seekpENS_4fposI11__mbstate_tEE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE5seekpExNS_8ios_base7seekdirE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE5tellpEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE5writeEPKcl', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE6sentryC1ERS3_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE6sentryC2ERS3_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE6sentryD1Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE6sentryD2Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEEC1EPNS_15basic_streambufIcS2_EE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEEC2EPNS_15basic_streambufIcS2_EE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEED0Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEED1Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEED2Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEPFRNS_8ios_baseES5_E', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEPFRNS_9basic_iosIcS2_EES6_E', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEPFRS3_S4_E', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEPKv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEPNS_15basic_streambufIcS2_EE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEb', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEd', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEe', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEf', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEi', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEj', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEl', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEs', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEt', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEx', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEy', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEE3putEw', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEE4swapERS3_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEE5flushEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEE5seekpENS_4fposI11__mbstate_tEE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEE5seekpExNS_8ios_base7seekdirE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEE5tellpEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEE5writeEPKwl', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEE6sentryC1ERS3_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEE6sentryC2ERS3_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEE6sentryD1Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEE6sentryD2Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEEC1EPNS_15basic_streambufIwS2_EE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEEC2EPNS_15basic_streambufIwS2_EE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEED0Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEED1Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEED2Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEPFRNS_8ios_baseES5_E', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEPFRNS_9basic_iosIwS2_EES6_E', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEPFRS3_S4_E', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEPKv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEPNS_15basic_streambufIwS2_EE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEb', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEd', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEe', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEf', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEi', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEj', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEl', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEs', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEt', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEx', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEy', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113random_deviceC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113random_deviceC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113random_deviceD1Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113random_deviceD2Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113random_deviceclEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113shared_futureIvED1Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113shared_futureIvED2Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__113shared_futureIvEaSERKS1_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__114__get_const_dbEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__114__num_get_base10__get_baseERNS_8ios_baseE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__114__num_get_base5__srcE', 'is_defined': True, 'type': 'OBJECT', 'size': 33} +{'name': '_ZNSt3__114__num_put_base12__format_intEPcPKcbj', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__114__num_put_base14__format_floatEPcPKcj', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__114__num_put_base18__identify_paddingEPcS1_RKNS_8ios_baseE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__114__shared_count12__add_sharedEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__114__shared_count16__release_sharedEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__114__shared_countD0Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__114__shared_countD1Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__114__shared_countD2Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__114basic_iostreamIcNS_11char_traitsIcEEE4swapERS3_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__114basic_iostreamIcNS_11char_traitsIcEEEC1EPNS_15basic_streambufIcS2_EE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__114basic_iostreamIcNS_11char_traitsIcEEEC2EPNS_15basic_streambufIcS2_EE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__114basic_iostreamIcNS_11char_traitsIcEEED0Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__114basic_iostreamIcNS_11char_traitsIcEEED1Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__114basic_iostreamIcNS_11char_traitsIcEEED2Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__114codecvt_bynameIDic11__mbstate_tED0Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__114codecvt_bynameIDic11__mbstate_tED1Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__114codecvt_bynameIDic11__mbstate_tED2Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__114codecvt_bynameIDsc11__mbstate_tED0Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__114codecvt_bynameIDsc11__mbstate_tED1Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__114codecvt_bynameIDsc11__mbstate_tED2Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__114codecvt_bynameIcc11__mbstate_tED0Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__114codecvt_bynameIcc11__mbstate_tED1Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__114codecvt_bynameIcc11__mbstate_tED2Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__114codecvt_bynameIwc11__mbstate_tED0Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__114codecvt_bynameIwc11__mbstate_tED1Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__114codecvt_bynameIwc11__mbstate_tED2Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__114collate_bynameIcEC1EPKcm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__114collate_bynameIcEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__114collate_bynameIcEC2EPKcm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__114collate_bynameIcEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__114collate_bynameIcED0Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__114collate_bynameIcED1Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__114collate_bynameIcED2Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__114collate_bynameIwEC1EPKcm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__114collate_bynameIwEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__114collate_bynameIwEC2EPKcm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__114collate_bynameIwEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__114collate_bynameIwED0Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__114collate_bynameIwED1Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__114collate_bynameIwED2Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__114error_categoryC2Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__114error_categoryD0Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__114error_categoryD1Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__114error_categoryD2Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115__get_classnameEPKcb', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115__thread_struct25notify_all_at_thread_exitEPNS_18condition_variableEPNS_5mutexE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115__thread_struct27__make_ready_at_thread_exitEPNS_17__assoc_sub_stateE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115__thread_structC1Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115__thread_structC2Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115__thread_structD1Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115__thread_structD2Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE10pubseekoffExNS_8ios_base7seekdirEj', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE10pubseekposENS_4fposI11__mbstate_tEEj', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE4setgEPcS4_S4_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE4setpEPcS4_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE4swapERS3_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE4syncEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE5gbumpEi', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE5imbueERKNS_6localeE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE5pbumpEi', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE5sgetcEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE5sgetnEPcl', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE5sputcEc', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE5sputnEPKcl', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE5uflowEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE6sbumpcEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE6setbufEPcl', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE6snextcEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE6xsgetnEPcl', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE6xsputnEPKcl', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE7pubsyncEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE7seekoffExNS_8ios_base7seekdirEj', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE7seekposENS_4fposI11__mbstate_tEEj', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE7sungetcEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE8in_availEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE8overflowEi', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE8pubimbueERKNS_6localeE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE9pbackfailEi', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE9pubsetbufEPcl', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE9showmanycEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE9sputbackcEc', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE9underflowEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEEC1ERKS3_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEEC1Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEEC2ERKS3_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEEC2Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEED0Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEED1Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEED2Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEEaSERKS3_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE10pubseekoffExNS_8ios_base7seekdirEj', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE10pubseekposENS_4fposI11__mbstate_tEEj', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE4setgEPwS4_S4_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE4setpEPwS4_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE4swapERS3_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE4syncEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE5gbumpEi', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE5imbueERKNS_6localeE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE5pbumpEi', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE5sgetcEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE5sgetnEPwl', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE5sputcEw', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE5sputnEPKwl', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE5uflowEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE6sbumpcEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE6setbufEPwl', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE6snextcEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE6xsgetnEPwl', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE6xsputnEPKwl', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE7pubsyncEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE7seekoffExNS_8ios_base7seekdirEj', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE7seekposENS_4fposI11__mbstate_tEEj', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE7sungetcEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE8in_availEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE8overflowEj', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE8pubimbueERKNS_6localeE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE9pbackfailEj', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE9pubsetbufEPwl', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE9showmanycEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE9sputbackcEw', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE9underflowEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEEC1ERKS3_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEEC1Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEEC2ERKS3_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEEC2Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEED0Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEED1Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEED2Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEEaSERKS3_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115future_categoryEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115numpunct_bynameIcE6__initEPKc', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115numpunct_bynameIcEC1EPKcm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115numpunct_bynameIcEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115numpunct_bynameIcEC2EPKcm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115numpunct_bynameIcEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115numpunct_bynameIcED0Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115numpunct_bynameIcED1Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115numpunct_bynameIcED2Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115numpunct_bynameIwE6__initEPKc', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115numpunct_bynameIwEC1EPKcm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115numpunct_bynameIwEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115numpunct_bynameIwEC2EPKcm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115numpunct_bynameIwEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115numpunct_bynameIwED0Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115numpunct_bynameIwED1Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115numpunct_bynameIwED2Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115recursive_mutex4lockEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115recursive_mutex6unlockEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115recursive_mutex8try_lockEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115recursive_mutexC1Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115recursive_mutexC2Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115recursive_mutexD1Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115recursive_mutexD2Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__115system_categoryEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__116__check_groupingERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPjS8_Rj', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__116__narrow_to_utf8ILm16EED0Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__116__narrow_to_utf8ILm16EED1Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__116__narrow_to_utf8ILm16EED2Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__116__narrow_to_utf8ILm32EED0Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__116__narrow_to_utf8ILm32EED1Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__116__narrow_to_utf8ILm32EED2Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__116generic_categoryEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__117__assoc_sub_state10__sub_waitERNS_11unique_lockINS_5mutexEEE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__117__assoc_sub_state12__make_readyEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__117__assoc_sub_state13set_exceptionESt13exception_ptr', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__117__assoc_sub_state16__on_zero_sharedEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__117__assoc_sub_state24set_value_at_thread_exitEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__117__assoc_sub_state28set_exception_at_thread_exitESt13exception_ptr', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__117__assoc_sub_state4copyEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__117__assoc_sub_state4waitEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__117__assoc_sub_state9__executeEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__117__assoc_sub_state9set_valueEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__117__widen_from_utf8ILm16EED0Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__117__widen_from_utf8ILm16EED1Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__117__widen_from_utf8ILm16EED2Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__117__widen_from_utf8ILm32EED0Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__117__widen_from_utf8ILm32EED1Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__117__widen_from_utf8ILm32EED2Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__117declare_reachableEPv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__117iostream_categoryEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__117moneypunct_bynameIcLb0EE4initEPKc', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__117moneypunct_bynameIcLb1EE4initEPKc', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__117moneypunct_bynameIwLb0EE4initEPKc', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__117moneypunct_bynameIwLb1EE4initEPKc', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__118__time_get_storageIcE4initERKNS_5ctypeIcEE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__118__time_get_storageIcE9__analyzeEcRKNS_5ctypeIcEE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__118__time_get_storageIcEC1EPKc', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__118__time_get_storageIcEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__118__time_get_storageIcEC2EPKc', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__118__time_get_storageIcEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__118__time_get_storageIwE4initERKNS_5ctypeIwEE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__118__time_get_storageIwE9__analyzeEcRKNS_5ctypeIwEE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__118__time_get_storageIwEC1EPKc', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__118__time_get_storageIwEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__118__time_get_storageIwEC2EPKc', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__118__time_get_storageIwEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__118condition_variable10notify_allEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__118condition_variable10notify_oneEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__118condition_variable15__do_timed_waitERNS_11unique_lockINS_5mutexEEENS_6chrono10time_pointINS5_12system_clockENS5_8durationIxNS_5ratioILl1ELl1000000000EEEEEEE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__118condition_variable4waitERNS_11unique_lockINS_5mutexEEE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__118condition_variableD1Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__118condition_variableD2Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__118get_pointer_safetyEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__118shared_timed_mutex11lock_sharedEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__118shared_timed_mutex13unlock_sharedEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__118shared_timed_mutex15try_lock_sharedEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__118shared_timed_mutex4lockEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__118shared_timed_mutex6unlockEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__118shared_timed_mutex8try_lockEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__118shared_timed_mutexC1Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__118shared_timed_mutexC2Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__119__shared_mutex_base11lock_sharedEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__119__shared_mutex_base13unlock_sharedEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__119__shared_mutex_base15try_lock_sharedEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__119__shared_mutex_base4lockEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__119__shared_mutex_base6unlockEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__119__shared_mutex_base8try_lockEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__119__shared_mutex_baseC1Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__119__shared_mutex_baseC2Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__119__shared_weak_count10__add_weakEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__119__shared_weak_count12__add_sharedEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__119__shared_weak_count14__release_weakEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__119__shared_weak_count16__release_sharedEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__119__shared_weak_count4lockEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__119__shared_weak_countD0Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__119__shared_weak_countD1Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__119__shared_weak_countD2Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__119__thread_local_dataEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__119declare_no_pointersEPcm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__119piecewise_constructE', 'is_defined': True, 'type': 'OBJECT', 'size': 1} +{'name': '_ZNSt3__120__get_collation_nameEPKc', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__120__throw_system_errorEiPKc', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__121__throw_runtime_errorEPKc', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__121__undeclare_reachableEPv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__121recursive_timed_mutex4lockEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__121recursive_timed_mutex6unlockEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__121recursive_timed_mutex8try_lockEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__121recursive_timed_mutexC1Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__121recursive_timed_mutexC2Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__121recursive_timed_mutexD1Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__121recursive_timed_mutexD2Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__121undeclare_no_pointersEPcm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__123__libcpp_debug_functionE', 'is_defined': True, 'type': 'OBJECT', 'size': 8} +{'name': '_ZNSt3__124__libcpp_debug_exceptionC1ERKNS_19__libcpp_debug_infoE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__124__libcpp_debug_exceptionC1ERKS0_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__124__libcpp_debug_exceptionC1Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__124__libcpp_debug_exceptionC2ERKNS_19__libcpp_debug_infoE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__124__libcpp_debug_exceptionC2ERKS0_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__124__libcpp_debug_exceptionC2Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__124__libcpp_debug_exceptionD0Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__124__libcpp_debug_exceptionD1Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__124__libcpp_debug_exceptionD2Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__125notify_all_at_thread_exitERNS_18condition_variableENS_11unique_lockINS_5mutexEEE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIaaEEPaEEbT0_S5_T_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIccEEPcEEbT0_S5_T_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIddEEPdEEbT0_S5_T_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIeeEEPeEEbT0_S5_T_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIffEEPfEEbT0_S5_T_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIhhEEPhEEbT0_S5_T_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIiiEEPiEEbT0_S5_T_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIjjEEPjEEbT0_S5_T_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIllEEPlEEbT0_S5_T_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__127__insertion_sort_incompleteIRNS_6__lessImmEEPmEEbT0_S5_T_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIssEEPsEEbT0_S5_T_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIttEEPtEEbT0_S5_T_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIwwEEPwEEbT0_S5_T_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIxxEEPxEEbT0_S5_T_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIyyEEPyEEbT0_S5_T_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__127__libcpp_set_debug_functionEPFvRKNS_19__libcpp_debug_infoEE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__129__libcpp_abort_debug_functionERKNS_19__libcpp_debug_infoE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__129__libcpp_throw_debug_functionERKNS_19__libcpp_debug_infoE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__13cinE', 'is_defined': True, 'type': 'OBJECT', 'size': 168} +{'name': '_ZNSt3__14cerrE', 'is_defined': True, 'type': 'OBJECT', 'size': 160} +{'name': '_ZNSt3__14clogE', 'is_defined': True, 'type': 'OBJECT', 'size': 160} +{'name': '_ZNSt3__14coutE', 'is_defined': True, 'type': 'OBJECT', 'size': 160} +{'name': '_ZNSt3__14stodERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__14stodERKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEEPm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__14stofERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__14stofERKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEEPm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__14stoiERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPmi', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__14stoiERKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEEPmi', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__14stolERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPmi', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__14stolERKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEEPmi', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__14wcinE', 'is_defined': True, 'type': 'OBJECT', 'size': 168} +{'name': '_ZNSt3__15alignEmmRPvRm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__15ctypeIcE13classic_tableEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__15ctypeIcE21__classic_lower_tableEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__15ctypeIcE21__classic_upper_tableEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__15ctypeIcE2idE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} +{'name': '_ZNSt3__15ctypeIcEC1EPKtbm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__15ctypeIcEC2EPKtbm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__15ctypeIcED0Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__15ctypeIcED1Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__15ctypeIcED2Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__15ctypeIwE2idE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} +{'name': '_ZNSt3__15ctypeIwED0Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__15ctypeIwED1Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__15ctypeIwED2Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__15mutex4lockEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__15mutex6unlockEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__15mutex8try_lockEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__15mutexD1Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__15mutexD2Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__15stoldERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__15stoldERKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEEPm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__15stollERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPmi', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__15stollERKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEEPmi', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__15stoulERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPmi', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__15stoulERKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEEPmi', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__15wcerrE', 'is_defined': True, 'type': 'OBJECT', 'size': 160} +{'name': '_ZNSt3__15wclogE', 'is_defined': True, 'type': 'OBJECT', 'size': 160} +{'name': '_ZNSt3__15wcoutE', 'is_defined': True, 'type': 'OBJECT', 'size': 160} +{'name': '_ZNSt3__16__clocEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__16__itoa8__u64toaEmPc', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__16__itoa8__u32toaEjPc', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__16__sortIRNS_6__lessIaaEEPaEEvT0_S5_T_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__16__sortIRNS_6__lessIccEEPcEEvT0_S5_T_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__16__sortIRNS_6__lessIddEEPdEEvT0_S5_T_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__16__sortIRNS_6__lessIeeEEPeEEvT0_S5_T_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__16__sortIRNS_6__lessIffEEPfEEvT0_S5_T_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__16__sortIRNS_6__lessIhhEEPhEEvT0_S5_T_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__16__sortIRNS_6__lessIiiEEPiEEvT0_S5_T_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__16__sortIRNS_6__lessIjjEEPjEEvT0_S5_T_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__16__sortIRNS_6__lessIllEEPlEEvT0_S5_T_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__16__sortIRNS_6__lessImmEEPmEEvT0_S5_T_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__16__sortIRNS_6__lessIssEEPsEEvT0_S5_T_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__16__sortIRNS_6__lessIttEEPtEEvT0_S5_T_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__16__sortIRNS_6__lessIwwEEPwEEvT0_S5_T_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__16__sortIRNS_6__lessIxxEEPxEEvT0_S5_T_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__16__sortIRNS_6__lessIyyEEPyEEvT0_S5_T_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__16chrono12steady_clock3nowEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__16chrono12steady_clock9is_steadyE', 'is_defined': True, 'type': 'OBJECT', 'size': 1} +{'name': '_ZNSt3__16chrono12system_clock11from_time_tEl', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__16chrono12system_clock3nowEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__16chrono12system_clock9is_steadyE', 'is_defined': True, 'type': 'OBJECT', 'size': 1} +{'name': '_ZNSt3__16chrono12system_clock9to_time_tERKNS0_10time_pointIS1_NS0_8durationIxNS_5ratioILl1ELl1000000EEEEEEE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__16futureIvE3getEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__16futureIvEC1EPNS_17__assoc_sub_stateE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__16futureIvEC2EPNS_17__assoc_sub_stateE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__16futureIvED1Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__16futureIvED2Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__16gslice6__initEm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__16locale14__install_ctorERKS0_PNS0_5facetEl', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__16locale2id5__getEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__16locale2id6__initEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__16locale2id9__next_idE', 'is_defined': True, 'type': 'OBJECT', 'size': 4} +{'name': '_ZNSt3__16locale3allE', 'is_defined': True, 'type': 'OBJECT', 'size': 4} +{'name': '_ZNSt3__16locale4noneE', 'is_defined': True, 'type': 'OBJECT', 'size': 4} +{'name': '_ZNSt3__16locale4timeE', 'is_defined': True, 'type': 'OBJECT', 'size': 4} +{'name': '_ZNSt3__16locale5ctypeE', 'is_defined': True, 'type': 'OBJECT', 'size': 4} +{'name': '_ZNSt3__16locale5facet16__on_zero_sharedEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__16locale5facetD0Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__16locale5facetD1Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__16locale5facetD2Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__16locale6globalERKS0_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__16locale7classicEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__16locale7collateE', 'is_defined': True, 'type': 'OBJECT', 'size': 4} +{'name': '_ZNSt3__16locale7numericE', 'is_defined': True, 'type': 'OBJECT', 'size': 4} +{'name': '_ZNSt3__16locale8__globalEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__16locale8messagesE', 'is_defined': True, 'type': 'OBJECT', 'size': 4} +{'name': '_ZNSt3__16locale8monetaryE', 'is_defined': True, 'type': 'OBJECT', 'size': 4} +{'name': '_ZNSt3__16localeC1EPKc', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__16localeC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__16localeC1ERKS0_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__16localeC1ERKS0_PKci', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__16localeC1ERKS0_RKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEi', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__16localeC1ERKS0_S2_i', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__16localeC1Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__16localeC2EPKc', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__16localeC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__16localeC2ERKS0_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__16localeC2ERKS0_PKci', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__16localeC2ERKS0_RKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEi', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__16localeC2ERKS0_S2_i', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__16localeC2Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__16localeD1Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__16localeD2Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__16localeaSERKS0_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__16stoullERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPmi', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__16stoullERKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEEPmi', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__16thread20hardware_concurrencyEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__16thread4joinEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__16thread6detachEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__16threadD1Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__16threadD2Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__17__sort5IRNS_6__lessIeeEEPeEEjT0_S5_S5_S5_S5_T_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__17codecvtIDic11__mbstate_tE2idE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} +{'name': '_ZNSt3__17codecvtIDic11__mbstate_tED0Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__17codecvtIDic11__mbstate_tED1Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__17codecvtIDic11__mbstate_tED2Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__17codecvtIDsc11__mbstate_tE2idE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} +{'name': '_ZNSt3__17codecvtIDsc11__mbstate_tED0Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__17codecvtIDsc11__mbstate_tED1Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__17codecvtIDsc11__mbstate_tED2Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__17codecvtIcc11__mbstate_tE2idE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} +{'name': '_ZNSt3__17codecvtIcc11__mbstate_tED0Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__17codecvtIcc11__mbstate_tED1Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__17codecvtIcc11__mbstate_tED2Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__17codecvtIwc11__mbstate_tE2idE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} +{'name': '_ZNSt3__17codecvtIwc11__mbstate_tEC1EPKcm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__17codecvtIwc11__mbstate_tEC1Em', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__17codecvtIwc11__mbstate_tEC2EPKcm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__17codecvtIwc11__mbstate_tEC2Em', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__17codecvtIwc11__mbstate_tED0Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__17codecvtIwc11__mbstate_tED1Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__17codecvtIwc11__mbstate_tED2Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__17collateIcE2idE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} +{'name': '_ZNSt3__17collateIcED0Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__17collateIcED1Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__17collateIcED2Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__17collateIwE2idE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} +{'name': '_ZNSt3__17collateIwED0Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__17collateIwED1Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__17collateIwED2Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE2idE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} +{'name': '_ZNSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE2idE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} +{'name': '_ZNSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE2idE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} +{'name': '_ZNSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE2idE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} +{'name': '_ZNSt3__17promiseIvE10get_futureEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__17promiseIvE13set_exceptionESt13exception_ptr', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__17promiseIvE24set_value_at_thread_exitEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__17promiseIvE28set_exception_at_thread_exitESt13exception_ptr', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__17promiseIvE9set_valueEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__17promiseIvEC1Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__17promiseIvEC2Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__17promiseIvED1Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__17promiseIvED2Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__18__c_node5__addEPNS_8__i_nodeE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__18__c_nodeD0Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__18__c_nodeD1Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__18__c_nodeD2Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__18__get_dbEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__18__i_nodeD1Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__18__i_nodeD2Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__18__rs_getEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__18__sp_mut4lockEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__18__sp_mut6unlockEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__18ios_base10floatfieldE', 'is_defined': True, 'type': 'OBJECT', 'size': 4} +{'name': '_ZNSt3__18ios_base10scientificE', 'is_defined': True, 'type': 'OBJECT', 'size': 4} +{'name': '_ZNSt3__18ios_base11adjustfieldE', 'is_defined': True, 'type': 'OBJECT', 'size': 4} +{'name': '_ZNSt3__18ios_base15sync_with_stdioEb', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__18ios_base16__call_callbacksENS0_5eventE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__18ios_base17register_callbackEPFvNS0_5eventERS0_iEi', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__18ios_base2inE', 'is_defined': True, 'type': 'OBJECT', 'size': 4} +{'name': '_ZNSt3__18ios_base33__set_badbit_and_consider_rethrowEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__18ios_base34__set_failbit_and_consider_rethrowEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__18ios_base3appE', 'is_defined': True, 'type': 'OBJECT', 'size': 4} +{'name': '_ZNSt3__18ios_base3ateE', 'is_defined': True, 'type': 'OBJECT', 'size': 4} +{'name': '_ZNSt3__18ios_base3decE', 'is_defined': True, 'type': 'OBJECT', 'size': 4} +{'name': '_ZNSt3__18ios_base3hexE', 'is_defined': True, 'type': 'OBJECT', 'size': 4} +{'name': '_ZNSt3__18ios_base3octE', 'is_defined': True, 'type': 'OBJECT', 'size': 4} +{'name': '_ZNSt3__18ios_base3outE', 'is_defined': True, 'type': 'OBJECT', 'size': 4} +{'name': '_ZNSt3__18ios_base4InitC1Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__18ios_base4InitC2Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__18ios_base4InitD1Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__18ios_base4InitD2Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__18ios_base4initEPv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__18ios_base4leftE', 'is_defined': True, 'type': 'OBJECT', 'size': 4} +{'name': '_ZNSt3__18ios_base4moveERS0_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__18ios_base4swapERS0_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__18ios_base5clearEj', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__18ios_base5fixedE', 'is_defined': True, 'type': 'OBJECT', 'size': 4} +{'name': '_ZNSt3__18ios_base5imbueERKNS_6localeE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__18ios_base5iwordEi', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__18ios_base5pwordEi', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__18ios_base5rightE', 'is_defined': True, 'type': 'OBJECT', 'size': 4} +{'name': '_ZNSt3__18ios_base5truncE', 'is_defined': True, 'type': 'OBJECT', 'size': 4} +{'name': '_ZNSt3__18ios_base6badbitE', 'is_defined': True, 'type': 'OBJECT', 'size': 4} +{'name': '_ZNSt3__18ios_base6binaryE', 'is_defined': True, 'type': 'OBJECT', 'size': 4} +{'name': '_ZNSt3__18ios_base6eofbitE', 'is_defined': True, 'type': 'OBJECT', 'size': 4} +{'name': '_ZNSt3__18ios_base6skipwsE', 'is_defined': True, 'type': 'OBJECT', 'size': 4} +{'name': '_ZNSt3__18ios_base6xallocEv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__18ios_base7copyfmtERKS0_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__18ios_base7failbitE', 'is_defined': True, 'type': 'OBJECT', 'size': 4} +{'name': '_ZNSt3__18ios_base7failureC1EPKcRKNS_10error_codeE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__18ios_base7failureC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERKNS_10error_codeE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__18ios_base7failureC2EPKcRKNS_10error_codeE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__18ios_base7failureC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERKNS_10error_codeE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__18ios_base7failureD0Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__18ios_base7failureD1Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__18ios_base7failureD2Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__18ios_base7goodbitE', 'is_defined': True, 'type': 'OBJECT', 'size': 4} +{'name': '_ZNSt3__18ios_base7showposE', 'is_defined': True, 'type': 'OBJECT', 'size': 4} +{'name': '_ZNSt3__18ios_base7unitbufE', 'is_defined': True, 'type': 'OBJECT', 'size': 4} +{'name': '_ZNSt3__18ios_base8internalE', 'is_defined': True, 'type': 'OBJECT', 'size': 4} +{'name': '_ZNSt3__18ios_base8showbaseE', 'is_defined': True, 'type': 'OBJECT', 'size': 4} +{'name': '_ZNSt3__18ios_base9__xindex_E', 'is_defined': True, 'type': 'OBJECT', 'size': 4} +{'name': '_ZNSt3__18ios_base9basefieldE', 'is_defined': True, 'type': 'OBJECT', 'size': 4} +{'name': '_ZNSt3__18ios_base9boolalphaE', 'is_defined': True, 'type': 'OBJECT', 'size': 4} +{'name': '_ZNSt3__18ios_base9showpointE', 'is_defined': True, 'type': 'OBJECT', 'size': 4} +{'name': '_ZNSt3__18ios_base9uppercaseE', 'is_defined': True, 'type': 'OBJECT', 'size': 4} +{'name': '_ZNSt3__18ios_baseD0Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__18ios_baseD1Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__18ios_baseD2Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__18messagesIcE2idE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} +{'name': '_ZNSt3__18messagesIwE2idE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} +{'name': '_ZNSt3__18numpunctIcE2idE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} +{'name': '_ZNSt3__18numpunctIcEC1Em', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__18numpunctIcEC2Em', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__18numpunctIcED0Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__18numpunctIcED1Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__18numpunctIcED2Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__18numpunctIwE2idE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} +{'name': '_ZNSt3__18numpunctIwEC1Em', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__18numpunctIwEC2Em', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__18numpunctIwED0Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__18numpunctIwED1Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__18numpunctIwED2Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE2idE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} +{'name': '_ZNSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE2idE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} +{'name': '_ZNSt3__18time_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE2idE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} +{'name': '_ZNSt3__18time_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE2idE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} +{'name': '_ZNSt3__18valarrayImE6resizeEmm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__18valarrayImEC1Em', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__18valarrayImEC2Em', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__18valarrayImED1Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__18valarrayImED2Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__19__num_getIcE17__stage2_int_loopEciPcRS2_RjcRKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPjRSD_S2_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__19__num_getIcE17__stage2_int_prepERNS_8ios_baseEPcRc', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__19__num_getIcE19__stage2_float_loopEcRbRcPcRS4_ccRKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPjRSE_RjS4_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__19__num_getIcE19__stage2_float_prepERNS_8ios_baseEPcRcS5_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__19__num_getIwE17__stage2_int_loopEwiPcRS2_RjwRKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPjRSD_Pw', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__19__num_getIwE17__stage2_int_prepERNS_8ios_baseEPwRw', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__19__num_getIwE19__stage2_float_loopEwRbRcPcRS4_wwRKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPjRSE_RjPw', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__19__num_getIwE19__stage2_float_prepERNS_8ios_baseEPwRwS5_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__19__num_putIcE21__widen_and_group_intEPcS2_S2_S2_RS2_S3_RKNS_6localeE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__19__num_putIcE23__widen_and_group_floatEPcS2_S2_S2_RS2_S3_RKNS_6localeE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__19__num_putIwE21__widen_and_group_intEPcS2_S2_PwRS3_S4_RKNS_6localeE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__19__num_putIwE23__widen_and_group_floatEPcS2_S2_PwRS3_S4_RKNS_6localeE', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__19basic_iosIcNS_11char_traitsIcEEE7copyfmtERKS3_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__19basic_iosIcNS_11char_traitsIcEEED0Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__19basic_iosIcNS_11char_traitsIcEEED1Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__19basic_iosIcNS_11char_traitsIcEEED2Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__19basic_iosIwNS_11char_traitsIwEEE7copyfmtERKS3_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__19basic_iosIwNS_11char_traitsIwEEED0Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__19basic_iosIwNS_11char_traitsIwEEED1Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__19basic_iosIwNS_11char_traitsIwEEED2Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__19money_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE2idE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} +{'name': '_ZNSt3__19money_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE8__do_getERS4_S4_bRKNS_6localeEjRjRbRKNS_5ctypeIcEERNS_10unique_ptrIcPFvPvEEERPcSM_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__19money_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE2idE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} +{'name': '_ZNSt3__19money_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE8__do_getERS4_S4_bRKNS_6localeEjRjRbRKNS_5ctypeIwEERNS_10unique_ptrIwPFvPvEEERPwSM_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__19money_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE2idE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} +{'name': '_ZNSt3__19money_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE2idE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} +{'name': '_ZNSt3__19strstreamD0Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__19strstreamD1Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__19strstreamD2Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__19to_stringEd', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__19to_stringEe', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__19to_stringEf', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__19to_stringEi', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__19to_stringEj', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__19to_stringEl', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__19to_stringEm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__19to_stringEx', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__19to_stringEy', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt3__1plIcNS_11char_traitsIcEENS_9allocatorIcEEEENS_12basic_stringIT_T0_T1_EEPKS6_RKS9_', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZNSt8bad_castC1Ev', 'is_defined': False, 'type': 'FUNC'} +{'name': '_ZNSt8bad_castD1Ev', 'is_defined': False, 'type': 'FUNC'} +{'name': '_ZNSt8bad_castD2Ev', 'is_defined': False, 'type': 'FUNC'} +{'name': '_ZNSt9bad_allocC1Ev', 'is_defined': False, 'type': 'FUNC'} +{'name': '_ZNSt9bad_allocD1Ev', 'is_defined': False, 'type': 'FUNC'} +{'name': '_ZNSt9exceptionD2Ev', 'is_defined': False, 'type': 'FUNC'} +{'name': '_ZSt15get_new_handlerv', 'is_defined': False, 'type': 'FUNC'} +{'name': '_ZSt17__throw_bad_allocv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZSt17current_exceptionv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZSt17rethrow_exceptionSt13exception_ptr', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZSt18uncaught_exceptionv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZSt19uncaught_exceptionsv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZSt7nothrow', 'is_defined': True, 'type': 'OBJECT', 'size': 1} +{'name': '_ZSt9terminatev', 'is_defined': False, 'type': 'FUNC'} +{'name': '_ZTCNSt3__110istrstreamE0_NS_13basic_istreamIcNS_11char_traitsIcEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 80} +{'name': '_ZTCNSt3__110ostrstreamE0_NS_13basic_ostreamIcNS_11char_traitsIcEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 80} +{'name': '_ZTCNSt3__114basic_iostreamIcNS_11char_traitsIcEEEE0_NS_13basic_istreamIcS2_EE', 'is_defined': True, 'type': 'OBJECT', 'size': 80} +{'name': '_ZTCNSt3__114basic_iostreamIcNS_11char_traitsIcEEEE16_NS_13basic_ostreamIcS2_EE', 'is_defined': True, 'type': 'OBJECT', 'size': 80} +{'name': '_ZTCNSt3__19strstreamE0_NS_13basic_istreamIcNS_11char_traitsIcEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 80} +{'name': '_ZTCNSt3__19strstreamE0_NS_14basic_iostreamIcNS_11char_traitsIcEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 120} +{'name': '_ZTCNSt3__19strstreamE16_NS_13basic_ostreamIcNS_11char_traitsIcEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 80} +{'name': '_ZTINSt12experimental15fundamentals_v112bad_any_castE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} +{'name': '_ZTINSt12experimental19bad_optional_accessE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} +{'name': '_ZTINSt3__110__time_getE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} +{'name': '_ZTINSt3__110__time_putE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} +{'name': '_ZTINSt3__110ctype_baseE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} +{'name': '_ZTINSt3__110istrstreamE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} +{'name': '_ZTINSt3__110money_baseE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} +{'name': '_ZTINSt3__110moneypunctIcLb0EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 56} +{'name': '_ZTINSt3__110moneypunctIcLb1EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 56} +{'name': '_ZTINSt3__110moneypunctIwLb0EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 56} +{'name': '_ZTINSt3__110moneypunctIwLb1EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 56} +{'name': '_ZTINSt3__110ostrstreamE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} +{'name': '_ZTINSt3__111__money_getIcEE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} +{'name': '_ZTINSt3__111__money_getIwEE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} +{'name': '_ZTINSt3__111__money_putIcEE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} +{'name': '_ZTINSt3__111__money_putIwEE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} +{'name': '_ZTINSt3__111regex_errorE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} +{'name': '_ZTINSt3__112bad_weak_ptrE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} +{'name': '_ZTINSt3__112codecvt_baseE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} +{'name': '_ZTINSt3__112ctype_bynameIcEE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} +{'name': '_ZTINSt3__112ctype_bynameIwEE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} +{'name': '_ZTINSt3__112future_errorE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} +{'name': '_ZTINSt3__112strstreambufE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} +{'name': '_ZTINSt3__112system_errorE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} +{'name': '_ZTINSt3__113basic_istreamIcNS_11char_traitsIcEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 40} +{'name': '_ZTINSt3__113basic_istreamIwNS_11char_traitsIwEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 40} +{'name': '_ZTINSt3__113basic_ostreamIcNS_11char_traitsIcEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 40} +{'name': '_ZTINSt3__113basic_ostreamIwNS_11char_traitsIwEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 40} +{'name': '_ZTINSt3__113messages_baseE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} +{'name': '_ZTINSt3__114__codecvt_utf8IDiEE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} +{'name': '_ZTINSt3__114__codecvt_utf8IDsEE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} +{'name': '_ZTINSt3__114__codecvt_utf8IwEE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} +{'name': '_ZTINSt3__114__num_get_baseE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} +{'name': '_ZTINSt3__114__num_put_baseE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} +{'name': '_ZTINSt3__114__shared_countE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} +{'name': '_ZTINSt3__114basic_iostreamIcNS_11char_traitsIcEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 56} +{'name': '_ZTINSt3__114codecvt_bynameIDic11__mbstate_tEE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} +{'name': '_ZTINSt3__114codecvt_bynameIDsc11__mbstate_tEE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} +{'name': '_ZTINSt3__114codecvt_bynameIcc11__mbstate_tEE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} +{'name': '_ZTINSt3__114codecvt_bynameIwc11__mbstate_tEE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} +{'name': '_ZTINSt3__114collate_bynameIcEE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} +{'name': '_ZTINSt3__114collate_bynameIwEE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} +{'name': '_ZTINSt3__114error_categoryE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} +{'name': '_ZTINSt3__115__codecvt_utf16IDiLb0EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} +{'name': '_ZTINSt3__115__codecvt_utf16IDiLb1EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} +{'name': '_ZTINSt3__115__codecvt_utf16IDsLb0EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} +{'name': '_ZTINSt3__115__codecvt_utf16IDsLb1EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} +{'name': '_ZTINSt3__115__codecvt_utf16IwLb0EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} +{'name': '_ZTINSt3__115__codecvt_utf16IwLb1EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} +{'name': '_ZTINSt3__115basic_streambufIcNS_11char_traitsIcEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} +{'name': '_ZTINSt3__115basic_streambufIwNS_11char_traitsIwEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} +{'name': '_ZTINSt3__115messages_bynameIcEE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} +{'name': '_ZTINSt3__115messages_bynameIwEE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} +{'name': '_ZTINSt3__115numpunct_bynameIcEE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} +{'name': '_ZTINSt3__115numpunct_bynameIwEE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} +{'name': '_ZTINSt3__115time_get_bynameIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 56} +{'name': '_ZTINSt3__115time_get_bynameIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 56} +{'name': '_ZTINSt3__115time_put_bynameIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} +{'name': '_ZTINSt3__115time_put_bynameIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} +{'name': '_ZTINSt3__116__narrow_to_utf8ILm16EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} +{'name': '_ZTINSt3__116__narrow_to_utf8ILm32EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} +{'name': '_ZTINSt3__117__assoc_sub_stateE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} +{'name': '_ZTINSt3__117__widen_from_utf8ILm16EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} +{'name': '_ZTINSt3__117__widen_from_utf8ILm32EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} +{'name': '_ZTINSt3__117moneypunct_bynameIcLb0EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} +{'name': '_ZTINSt3__117moneypunct_bynameIcLb1EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} +{'name': '_ZTINSt3__117moneypunct_bynameIwLb0EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} +{'name': '_ZTINSt3__117moneypunct_bynameIwLb1EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} +{'name': '_ZTINSt3__118__time_get_storageIcEE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} +{'name': '_ZTINSt3__118__time_get_storageIwEE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} +{'name': '_ZTINSt3__119__shared_weak_countE', 'is_defined': True, 'type': 'OBJECT', 'size': 40} +{'name': '_ZTINSt3__120__codecvt_utf8_utf16IDiEE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} +{'name': '_ZTINSt3__120__codecvt_utf8_utf16IDsEE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} +{'name': '_ZTINSt3__120__codecvt_utf8_utf16IwEE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} +{'name': '_ZTINSt3__120__time_get_c_storageIcEE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} +{'name': '_ZTINSt3__120__time_get_c_storageIwEE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} +{'name': '_ZTINSt3__124__libcpp_debug_exceptionE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} +{'name': '_ZTINSt3__15ctypeIcEE', 'is_defined': True, 'type': 'OBJECT', 'size': 56} +{'name': '_ZTINSt3__15ctypeIwEE', 'is_defined': True, 'type': 'OBJECT', 'size': 56} +{'name': '_ZTINSt3__16locale5facetE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} +{'name': '_ZTINSt3__17codecvtIDic11__mbstate_tEE', 'is_defined': True, 'type': 'OBJECT', 'size': 56} +{'name': '_ZTINSt3__17codecvtIDsc11__mbstate_tEE', 'is_defined': True, 'type': 'OBJECT', 'size': 56} +{'name': '_ZTINSt3__17codecvtIcc11__mbstate_tEE', 'is_defined': True, 'type': 'OBJECT', 'size': 56} +{'name': '_ZTINSt3__17codecvtIwc11__mbstate_tEE', 'is_defined': True, 'type': 'OBJECT', 'size': 56} +{'name': '_ZTINSt3__17collateIcEE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} +{'name': '_ZTINSt3__17collateIwEE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} +{'name': '_ZTINSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 56} +{'name': '_ZTINSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 56} +{'name': '_ZTINSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 56} +{'name': '_ZTINSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 56} +{'name': '_ZTINSt3__18__c_nodeE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} +{'name': '_ZTINSt3__18ios_base7failureE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} +{'name': '_ZTINSt3__18ios_baseE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} +{'name': '_ZTINSt3__18messagesIcEE', 'is_defined': True, 'type': 'OBJECT', 'size': 56} +{'name': '_ZTINSt3__18messagesIwEE', 'is_defined': True, 'type': 'OBJECT', 'size': 56} +{'name': '_ZTINSt3__18numpunctIcEE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} +{'name': '_ZTINSt3__18numpunctIwEE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} +{'name': '_ZTINSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 72} +{'name': '_ZTINSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 72} +{'name': '_ZTINSt3__18time_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 56} +{'name': '_ZTINSt3__18time_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 56} +{'name': '_ZTINSt3__19__num_getIcEE', 'is_defined': True, 'type': 'OBJECT', 'size': 40} +{'name': '_ZTINSt3__19__num_getIwEE', 'is_defined': True, 'type': 'OBJECT', 'size': 40} +{'name': '_ZTINSt3__19__num_putIcEE', 'is_defined': True, 'type': 'OBJECT', 'size': 40} +{'name': '_ZTINSt3__19__num_putIwEE', 'is_defined': True, 'type': 'OBJECT', 'size': 40} +{'name': '_ZTINSt3__19basic_iosIcNS_11char_traitsIcEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} +{'name': '_ZTINSt3__19basic_iosIwNS_11char_traitsIwEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} +{'name': '_ZTINSt3__19money_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 56} +{'name': '_ZTINSt3__19money_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 56} +{'name': '_ZTINSt3__19money_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 56} +{'name': '_ZTINSt3__19money_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 56} +{'name': '_ZTINSt3__19strstreamE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} +{'name': '_ZTINSt3__19time_baseE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} +{'name': '_ZTISt11logic_error', 'is_defined': False, 'type': 'OBJECT', 'size': 0} +{'name': '_ZTISt12bad_any_cast', 'is_defined': True, 'type': 'OBJECT', 'size': 24} +{'name': '_ZTISt12length_error', 'is_defined': False, 'type': 'OBJECT', 'size': 0} +{'name': '_ZTISt12out_of_range', 'is_defined': False, 'type': 'OBJECT', 'size': 0} +{'name': '_ZTISt13runtime_error', 'is_defined': False, 'type': 'OBJECT', 'size': 0} +{'name': '_ZTISt14overflow_error', 'is_defined': False, 'type': 'OBJECT', 'size': 0} +{'name': '_ZTISt16invalid_argument', 'is_defined': False, 'type': 'OBJECT', 'size': 0} +{'name': '_ZTISt16nested_exception', 'is_defined': True, 'type': 'OBJECT', 'size': 16} +{'name': '_ZTISt18bad_variant_access', 'is_defined': True, 'type': 'OBJECT', 'size': 24} +{'name': '_ZTISt19bad_optional_access', 'is_defined': True, 'type': 'OBJECT', 'size': 24} +{'name': '_ZTISt8bad_cast', 'is_defined': False, 'type': 'OBJECT', 'size': 0} +{'name': '_ZTISt9bad_alloc', 'is_defined': False, 'type': 'OBJECT', 'size': 0} +{'name': '_ZTISt9exception', 'is_defined': False, 'type': 'OBJECT', 'size': 0} +{'name': '_ZTSNSt12experimental15fundamentals_v112bad_any_castE', 'is_defined': True, 'type': 'OBJECT', 'size': 50} +{'name': '_ZTSNSt12experimental19bad_optional_accessE', 'is_defined': True, 'type': 'OBJECT', 'size': 40} +{'name': '_ZTSNSt3__110__time_getE', 'is_defined': True, 'type': 'OBJECT', 'size': 21} +{'name': '_ZTSNSt3__110__time_putE', 'is_defined': True, 'type': 'OBJECT', 'size': 21} +{'name': '_ZTSNSt3__110ctype_baseE', 'is_defined': True, 'type': 'OBJECT', 'size': 21} +{'name': '_ZTSNSt3__110istrstreamE', 'is_defined': True, 'type': 'OBJECT', 'size': 21} +{'name': '_ZTSNSt3__110money_baseE', 'is_defined': True, 'type': 'OBJECT', 'size': 21} +{'name': '_ZTSNSt3__110moneypunctIcLb0EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 28} +{'name': '_ZTSNSt3__110moneypunctIcLb1EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 28} +{'name': '_ZTSNSt3__110moneypunctIwLb0EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 28} +{'name': '_ZTSNSt3__110moneypunctIwLb1EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 28} +{'name': '_ZTSNSt3__110ostrstreamE', 'is_defined': True, 'type': 'OBJECT', 'size': 21} +{'name': '_ZTSNSt3__111__money_getIcEE', 'is_defined': True, 'type': 'OBJECT', 'size': 25} +{'name': '_ZTSNSt3__111__money_getIwEE', 'is_defined': True, 'type': 'OBJECT', 'size': 25} +{'name': '_ZTSNSt3__111__money_putIcEE', 'is_defined': True, 'type': 'OBJECT', 'size': 25} +{'name': '_ZTSNSt3__111__money_putIwEE', 'is_defined': True, 'type': 'OBJECT', 'size': 25} +{'name': '_ZTSNSt3__111regex_errorE', 'is_defined': True, 'type': 'OBJECT', 'size': 22} +{'name': '_ZTSNSt3__112bad_weak_ptrE', 'is_defined': True, 'type': 'OBJECT', 'size': 23} +{'name': '_ZTSNSt3__112codecvt_baseE', 'is_defined': True, 'type': 'OBJECT', 'size': 23} +{'name': '_ZTSNSt3__112ctype_bynameIcEE', 'is_defined': True, 'type': 'OBJECT', 'size': 26} +{'name': '_ZTSNSt3__112ctype_bynameIwEE', 'is_defined': True, 'type': 'OBJECT', 'size': 26} +{'name': '_ZTSNSt3__112future_errorE', 'is_defined': True, 'type': 'OBJECT', 'size': 23} +{'name': '_ZTSNSt3__112strstreambufE', 'is_defined': True, 'type': 'OBJECT', 'size': 23} +{'name': '_ZTSNSt3__112system_errorE', 'is_defined': True, 'type': 'OBJECT', 'size': 23} +{'name': '_ZTSNSt3__113basic_istreamIcNS_11char_traitsIcEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 47} +{'name': '_ZTSNSt3__113basic_istreamIwNS_11char_traitsIwEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 47} +{'name': '_ZTSNSt3__113basic_ostreamIcNS_11char_traitsIcEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 47} +{'name': '_ZTSNSt3__113basic_ostreamIwNS_11char_traitsIwEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 47} +{'name': '_ZTSNSt3__113messages_baseE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} +{'name': '_ZTSNSt3__114__codecvt_utf8IDiEE', 'is_defined': True, 'type': 'OBJECT', 'size': 29} +{'name': '_ZTSNSt3__114__codecvt_utf8IDsEE', 'is_defined': True, 'type': 'OBJECT', 'size': 29} +{'name': '_ZTSNSt3__114__codecvt_utf8IwEE', 'is_defined': True, 'type': 'OBJECT', 'size': 28} +{'name': '_ZTSNSt3__114__num_get_baseE', 'is_defined': True, 'type': 'OBJECT', 'size': 25} +{'name': '_ZTSNSt3__114__num_put_baseE', 'is_defined': True, 'type': 'OBJECT', 'size': 25} +{'name': '_ZTSNSt3__114__shared_countE', 'is_defined': True, 'type': 'OBJECT', 'size': 25} +{'name': '_ZTSNSt3__114basic_iostreamIcNS_11char_traitsIcEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 48} +{'name': '_ZTSNSt3__114codecvt_bynameIDic11__mbstate_tEE', 'is_defined': True, 'type': 'OBJECT', 'size': 43} +{'name': '_ZTSNSt3__114codecvt_bynameIDsc11__mbstate_tEE', 'is_defined': True, 'type': 'OBJECT', 'size': 43} +{'name': '_ZTSNSt3__114codecvt_bynameIcc11__mbstate_tEE', 'is_defined': True, 'type': 'OBJECT', 'size': 42} +{'name': '_ZTSNSt3__114codecvt_bynameIwc11__mbstate_tEE', 'is_defined': True, 'type': 'OBJECT', 'size': 42} +{'name': '_ZTSNSt3__114collate_bynameIcEE', 'is_defined': True, 'type': 'OBJECT', 'size': 28} +{'name': '_ZTSNSt3__114collate_bynameIwEE', 'is_defined': True, 'type': 'OBJECT', 'size': 28} +{'name': '_ZTSNSt3__114error_categoryE', 'is_defined': True, 'type': 'OBJECT', 'size': 25} +{'name': '_ZTSNSt3__115__codecvt_utf16IDiLb0EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 34} +{'name': '_ZTSNSt3__115__codecvt_utf16IDiLb1EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 34} +{'name': '_ZTSNSt3__115__codecvt_utf16IDsLb0EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 34} +{'name': '_ZTSNSt3__115__codecvt_utf16IDsLb1EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 34} +{'name': '_ZTSNSt3__115__codecvt_utf16IwLb0EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 33} +{'name': '_ZTSNSt3__115__codecvt_utf16IwLb1EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 33} +{'name': '_ZTSNSt3__115basic_streambufIcNS_11char_traitsIcEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 49} +{'name': '_ZTSNSt3__115basic_streambufIwNS_11char_traitsIwEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 49} +{'name': '_ZTSNSt3__115messages_bynameIcEE', 'is_defined': True, 'type': 'OBJECT', 'size': 29} +{'name': '_ZTSNSt3__115messages_bynameIwEE', 'is_defined': True, 'type': 'OBJECT', 'size': 29} +{'name': '_ZTSNSt3__115numpunct_bynameIcEE', 'is_defined': True, 'type': 'OBJECT', 'size': 29} +{'name': '_ZTSNSt3__115numpunct_bynameIwEE', 'is_defined': True, 'type': 'OBJECT', 'size': 29} +{'name': '_ZTSNSt3__115time_get_bynameIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 77} +{'name': '_ZTSNSt3__115time_get_bynameIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 77} +{'name': '_ZTSNSt3__115time_put_bynameIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 77} +{'name': '_ZTSNSt3__115time_put_bynameIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 77} +{'name': '_ZTSNSt3__116__narrow_to_utf8ILm16EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 34} +{'name': '_ZTSNSt3__116__narrow_to_utf8ILm32EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 34} +{'name': '_ZTSNSt3__117__assoc_sub_stateE', 'is_defined': True, 'type': 'OBJECT', 'size': 28} +{'name': '_ZTSNSt3__117__widen_from_utf8ILm16EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 35} +{'name': '_ZTSNSt3__117__widen_from_utf8ILm32EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 35} +{'name': '_ZTSNSt3__117moneypunct_bynameIcLb0EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 35} +{'name': '_ZTSNSt3__117moneypunct_bynameIcLb1EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 35} +{'name': '_ZTSNSt3__117moneypunct_bynameIwLb0EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 35} +{'name': '_ZTSNSt3__117moneypunct_bynameIwLb1EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 35} +{'name': '_ZTSNSt3__118__time_get_storageIcEE', 'is_defined': True, 'type': 'OBJECT', 'size': 32} +{'name': '_ZTSNSt3__118__time_get_storageIwEE', 'is_defined': True, 'type': 'OBJECT', 'size': 32} +{'name': '_ZTSNSt3__119__shared_weak_countE', 'is_defined': True, 'type': 'OBJECT', 'size': 30} +{'name': '_ZTSNSt3__120__codecvt_utf8_utf16IDiEE', 'is_defined': True, 'type': 'OBJECT', 'size': 35} +{'name': '_ZTSNSt3__120__codecvt_utf8_utf16IDsEE', 'is_defined': True, 'type': 'OBJECT', 'size': 35} +{'name': '_ZTSNSt3__120__codecvt_utf8_utf16IwEE', 'is_defined': True, 'type': 'OBJECT', 'size': 34} +{'name': '_ZTSNSt3__120__time_get_c_storageIcEE', 'is_defined': True, 'type': 'OBJECT', 'size': 34} +{'name': '_ZTSNSt3__120__time_get_c_storageIwEE', 'is_defined': True, 'type': 'OBJECT', 'size': 34} +{'name': '_ZTSNSt3__124__libcpp_debug_exceptionE', 'is_defined': True, 'type': 'OBJECT', 'size': 35} +{'name': '_ZTSNSt3__15ctypeIcEE', 'is_defined': True, 'type': 'OBJECT', 'size': 18} +{'name': '_ZTSNSt3__15ctypeIwEE', 'is_defined': True, 'type': 'OBJECT', 'size': 18} +{'name': '_ZTSNSt3__16locale5facetE', 'is_defined': True, 'type': 'OBJECT', 'size': 22} +{'name': '_ZTSNSt3__17codecvtIDic11__mbstate_tEE', 'is_defined': True, 'type': 'OBJECT', 'size': 35} +{'name': '_ZTSNSt3__17codecvtIDsc11__mbstate_tEE', 'is_defined': True, 'type': 'OBJECT', 'size': 35} +{'name': '_ZTSNSt3__17codecvtIcc11__mbstate_tEE', 'is_defined': True, 'type': 'OBJECT', 'size': 34} +{'name': '_ZTSNSt3__17codecvtIwc11__mbstate_tEE', 'is_defined': True, 'type': 'OBJECT', 'size': 34} +{'name': '_ZTSNSt3__17collateIcEE', 'is_defined': True, 'type': 'OBJECT', 'size': 20} +{'name': '_ZTSNSt3__17collateIwEE', 'is_defined': True, 'type': 'OBJECT', 'size': 20} +{'name': '_ZTSNSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 68} +{'name': '_ZTSNSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 68} +{'name': '_ZTSNSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 68} +{'name': '_ZTSNSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 68} +{'name': '_ZTSNSt3__18__c_nodeE', 'is_defined': True, 'type': 'OBJECT', 'size': 18} +{'name': '_ZTSNSt3__18ios_base7failureE', 'is_defined': True, 'type': 'OBJECT', 'size': 26} +{'name': '_ZTSNSt3__18ios_baseE', 'is_defined': True, 'type': 'OBJECT', 'size': 18} +{'name': '_ZTSNSt3__18messagesIcEE', 'is_defined': True, 'type': 'OBJECT', 'size': 21} +{'name': '_ZTSNSt3__18messagesIwEE', 'is_defined': True, 'type': 'OBJECT', 'size': 21} +{'name': '_ZTSNSt3__18numpunctIcEE', 'is_defined': True, 'type': 'OBJECT', 'size': 21} +{'name': '_ZTSNSt3__18numpunctIwEE', 'is_defined': True, 'type': 'OBJECT', 'size': 21} +{'name': '_ZTSNSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 69} +{'name': '_ZTSNSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 69} +{'name': '_ZTSNSt3__18time_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 69} +{'name': '_ZTSNSt3__18time_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 69} +{'name': '_ZTSNSt3__19__num_getIcEE', 'is_defined': True, 'type': 'OBJECT', 'size': 22} +{'name': '_ZTSNSt3__19__num_getIwEE', 'is_defined': True, 'type': 'OBJECT', 'size': 22} +{'name': '_ZTSNSt3__19__num_putIcEE', 'is_defined': True, 'type': 'OBJECT', 'size': 22} +{'name': '_ZTSNSt3__19__num_putIwEE', 'is_defined': True, 'type': 'OBJECT', 'size': 22} +{'name': '_ZTSNSt3__19basic_iosIcNS_11char_traitsIcEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 42} +{'name': '_ZTSNSt3__19basic_iosIwNS_11char_traitsIwEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 42} +{'name': '_ZTSNSt3__19money_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 70} +{'name': '_ZTSNSt3__19money_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 70} +{'name': '_ZTSNSt3__19money_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 70} +{'name': '_ZTSNSt3__19money_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 70} +{'name': '_ZTSNSt3__19strstreamE', 'is_defined': True, 'type': 'OBJECT', 'size': 19} +{'name': '_ZTSNSt3__19time_baseE', 'is_defined': True, 'type': 'OBJECT', 'size': 19} +{'name': '_ZTSSt12bad_any_cast', 'is_defined': True, 'type': 'OBJECT', 'size': 17} +{'name': '_ZTSSt16nested_exception', 'is_defined': True, 'type': 'OBJECT', 'size': 21} +{'name': '_ZTSSt18bad_variant_access', 'is_defined': True, 'type': 'OBJECT', 'size': 23} +{'name': '_ZTSSt19bad_optional_access', 'is_defined': True, 'type': 'OBJECT', 'size': 24} +{'name': '_ZTTNSt3__110istrstreamE', 'is_defined': True, 'type': 'OBJECT', 'size': 32} +{'name': '_ZTTNSt3__110ostrstreamE', 'is_defined': True, 'type': 'OBJECT', 'size': 32} +{'name': '_ZTTNSt3__113basic_istreamIcNS_11char_traitsIcEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} +{'name': '_ZTTNSt3__113basic_istreamIwNS_11char_traitsIwEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} +{'name': '_ZTTNSt3__113basic_ostreamIcNS_11char_traitsIcEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} +{'name': '_ZTTNSt3__113basic_ostreamIwNS_11char_traitsIwEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} +{'name': '_ZTTNSt3__114basic_iostreamIcNS_11char_traitsIcEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 56} +{'name': '_ZTTNSt3__19strstreamE', 'is_defined': True, 'type': 'OBJECT', 'size': 80} +{'name': '_ZTVN10__cxxabiv117__class_type_infoE', 'is_defined': False, 'type': 'OBJECT', 'size': 0} +{'name': '_ZTVN10__cxxabiv120__si_class_type_infoE', 'is_defined': False, 'type': 'OBJECT', 'size': 0} +{'name': '_ZTVN10__cxxabiv121__vmi_class_type_infoE', 'is_defined': False, 'type': 'OBJECT', 'size': 0} +{'name': '_ZTVNSt12experimental15fundamentals_v112bad_any_castE', 'is_defined': True, 'type': 'OBJECT', 'size': 40} +{'name': '_ZTVNSt12experimental19bad_optional_accessE', 'is_defined': True, 'type': 'OBJECT', 'size': 40} +{'name': '_ZTVNSt3__110istrstreamE', 'is_defined': True, 'type': 'OBJECT', 'size': 80} +{'name': '_ZTVNSt3__110moneypunctIcLb0EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 112} +{'name': '_ZTVNSt3__110moneypunctIcLb1EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 112} +{'name': '_ZTVNSt3__110moneypunctIwLb0EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 112} +{'name': '_ZTVNSt3__110moneypunctIwLb1EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 112} +{'name': '_ZTVNSt3__110ostrstreamE', 'is_defined': True, 'type': 'OBJECT', 'size': 80} +{'name': '_ZTVNSt3__111regex_errorE', 'is_defined': True, 'type': 'OBJECT', 'size': 40} +{'name': '_ZTVNSt3__112bad_weak_ptrE', 'is_defined': True, 'type': 'OBJECT', 'size': 40} +{'name': '_ZTVNSt3__112ctype_bynameIcEE', 'is_defined': True, 'type': 'OBJECT', 'size': 104} +{'name': '_ZTVNSt3__112ctype_bynameIwEE', 'is_defined': True, 'type': 'OBJECT', 'size': 136} +{'name': '_ZTVNSt3__112future_errorE', 'is_defined': True, 'type': 'OBJECT', 'size': 40} +{'name': '_ZTVNSt3__112strstreambufE', 'is_defined': True, 'type': 'OBJECT', 'size': 128} +{'name': '_ZTVNSt3__112system_errorE', 'is_defined': True, 'type': 'OBJECT', 'size': 40} +{'name': '_ZTVNSt3__113basic_istreamIcNS_11char_traitsIcEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 80} +{'name': '_ZTVNSt3__113basic_istreamIwNS_11char_traitsIwEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 80} +{'name': '_ZTVNSt3__113basic_ostreamIcNS_11char_traitsIcEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 80} +{'name': '_ZTVNSt3__113basic_ostreamIwNS_11char_traitsIwEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 80} +{'name': '_ZTVNSt3__114__codecvt_utf8IDiEE', 'is_defined': True, 'type': 'OBJECT', 'size': 96} +{'name': '_ZTVNSt3__114__codecvt_utf8IDsEE', 'is_defined': True, 'type': 'OBJECT', 'size': 96} +{'name': '_ZTVNSt3__114__codecvt_utf8IwEE', 'is_defined': True, 'type': 'OBJECT', 'size': 96} +{'name': '_ZTVNSt3__114__shared_countE', 'is_defined': True, 'type': 'OBJECT', 'size': 40} +{'name': '_ZTVNSt3__114basic_iostreamIcNS_11char_traitsIcEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 120} +{'name': '_ZTVNSt3__114codecvt_bynameIDic11__mbstate_tEE', 'is_defined': True, 'type': 'OBJECT', 'size': 96} +{'name': '_ZTVNSt3__114codecvt_bynameIDsc11__mbstate_tEE', 'is_defined': True, 'type': 'OBJECT', 'size': 96} +{'name': '_ZTVNSt3__114codecvt_bynameIcc11__mbstate_tEE', 'is_defined': True, 'type': 'OBJECT', 'size': 96} +{'name': '_ZTVNSt3__114codecvt_bynameIwc11__mbstate_tEE', 'is_defined': True, 'type': 'OBJECT', 'size': 96} +{'name': '_ZTVNSt3__114collate_bynameIcEE', 'is_defined': True, 'type': 'OBJECT', 'size': 64} +{'name': '_ZTVNSt3__114collate_bynameIwEE', 'is_defined': True, 'type': 'OBJECT', 'size': 64} +{'name': '_ZTVNSt3__114error_categoryE', 'is_defined': True, 'type': 'OBJECT', 'size': 72} +{'name': '_ZTVNSt3__115__codecvt_utf16IDiLb0EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 96} +{'name': '_ZTVNSt3__115__codecvt_utf16IDiLb1EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 96} +{'name': '_ZTVNSt3__115__codecvt_utf16IDsLb0EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 96} +{'name': '_ZTVNSt3__115__codecvt_utf16IDsLb1EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 96} +{'name': '_ZTVNSt3__115__codecvt_utf16IwLb0EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 96} +{'name': '_ZTVNSt3__115__codecvt_utf16IwLb1EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 96} +{'name': '_ZTVNSt3__115basic_streambufIcNS_11char_traitsIcEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 128} +{'name': '_ZTVNSt3__115basic_streambufIwNS_11char_traitsIwEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 128} +{'name': '_ZTVNSt3__115messages_bynameIcEE', 'is_defined': True, 'type': 'OBJECT', 'size': 64} +{'name': '_ZTVNSt3__115messages_bynameIwEE', 'is_defined': True, 'type': 'OBJECT', 'size': 64} +{'name': '_ZTVNSt3__115numpunct_bynameIcEE', 'is_defined': True, 'type': 'OBJECT', 'size': 80} +{'name': '_ZTVNSt3__115numpunct_bynameIwEE', 'is_defined': True, 'type': 'OBJECT', 'size': 80} +{'name': '_ZTVNSt3__115time_get_bynameIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 224} +{'name': '_ZTVNSt3__115time_get_bynameIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 224} +{'name': '_ZTVNSt3__115time_put_bynameIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 48} +{'name': '_ZTVNSt3__115time_put_bynameIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 48} +{'name': '_ZTVNSt3__116__narrow_to_utf8ILm16EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 96} +{'name': '_ZTVNSt3__116__narrow_to_utf8ILm32EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 96} +{'name': '_ZTVNSt3__117__assoc_sub_stateE', 'is_defined': True, 'type': 'OBJECT', 'size': 48} +{'name': '_ZTVNSt3__117__widen_from_utf8ILm16EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 96} +{'name': '_ZTVNSt3__117__widen_from_utf8ILm32EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 96} +{'name': '_ZTVNSt3__117moneypunct_bynameIcLb0EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 112} +{'name': '_ZTVNSt3__117moneypunct_bynameIcLb1EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 112} +{'name': '_ZTVNSt3__117moneypunct_bynameIwLb0EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 112} +{'name': '_ZTVNSt3__117moneypunct_bynameIwLb1EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 112} +{'name': '_ZTVNSt3__119__shared_weak_countE', 'is_defined': True, 'type': 'OBJECT', 'size': 56} +{'name': '_ZTVNSt3__120__codecvt_utf8_utf16IDiEE', 'is_defined': True, 'type': 'OBJECT', 'size': 96} +{'name': '_ZTVNSt3__120__codecvt_utf8_utf16IDsEE', 'is_defined': True, 'type': 'OBJECT', 'size': 96} +{'name': '_ZTVNSt3__120__codecvt_utf8_utf16IwEE', 'is_defined': True, 'type': 'OBJECT', 'size': 96} +{'name': '_ZTVNSt3__124__libcpp_debug_exceptionE', 'is_defined': True, 'type': 'OBJECT', 'size': 40} +{'name': '_ZTVNSt3__15ctypeIcEE', 'is_defined': True, 'type': 'OBJECT', 'size': 104} +{'name': '_ZTVNSt3__15ctypeIwEE', 'is_defined': True, 'type': 'OBJECT', 'size': 136} +{'name': '_ZTVNSt3__16locale5facetE', 'is_defined': True, 'type': 'OBJECT', 'size': 40} +{'name': '_ZTVNSt3__17codecvtIDic11__mbstate_tEE', 'is_defined': True, 'type': 'OBJECT', 'size': 96} +{'name': '_ZTVNSt3__17codecvtIDsc11__mbstate_tEE', 'is_defined': True, 'type': 'OBJECT', 'size': 96} +{'name': '_ZTVNSt3__17codecvtIcc11__mbstate_tEE', 'is_defined': True, 'type': 'OBJECT', 'size': 96} +{'name': '_ZTVNSt3__17codecvtIwc11__mbstate_tEE', 'is_defined': True, 'type': 'OBJECT', 'size': 96} +{'name': '_ZTVNSt3__17collateIcEE', 'is_defined': True, 'type': 'OBJECT', 'size': 64} +{'name': '_ZTVNSt3__17collateIwEE', 'is_defined': True, 'type': 'OBJECT', 'size': 64} +{'name': '_ZTVNSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 128} +{'name': '_ZTVNSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 128} +{'name': '_ZTVNSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 104} +{'name': '_ZTVNSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 104} +{'name': '_ZTVNSt3__18__c_nodeE', 'is_defined': True, 'type': 'OBJECT', 'size': 64} +{'name': '_ZTVNSt3__18ios_base7failureE', 'is_defined': True, 'type': 'OBJECT', 'size': 40} +{'name': '_ZTVNSt3__18ios_baseE', 'is_defined': True, 'type': 'OBJECT', 'size': 32} +{'name': '_ZTVNSt3__18messagesIcEE', 'is_defined': True, 'type': 'OBJECT', 'size': 64} +{'name': '_ZTVNSt3__18messagesIwEE', 'is_defined': True, 'type': 'OBJECT', 'size': 64} +{'name': '_ZTVNSt3__18numpunctIcEE', 'is_defined': True, 'type': 'OBJECT', 'size': 80} +{'name': '_ZTVNSt3__18numpunctIwEE', 'is_defined': True, 'type': 'OBJECT', 'size': 80} +{'name': '_ZTVNSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 168} +{'name': '_ZTVNSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 168} +{'name': '_ZTVNSt3__18time_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 48} +{'name': '_ZTVNSt3__18time_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 48} +{'name': '_ZTVNSt3__19basic_iosIcNS_11char_traitsIcEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 32} +{'name': '_ZTVNSt3__19basic_iosIwNS_11char_traitsIwEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 32} +{'name': '_ZTVNSt3__19money_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 56} +{'name': '_ZTVNSt3__19money_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 56} +{'name': '_ZTVNSt3__19money_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 56} +{'name': '_ZTVNSt3__19money_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 56} +{'name': '_ZTVNSt3__19strstreamE', 'is_defined': True, 'type': 'OBJECT', 'size': 120} +{'name': '_ZTVSt11logic_error', 'is_defined': False, 'type': 'OBJECT', 'size': 0} +{'name': '_ZTVSt12bad_any_cast', 'is_defined': True, 'type': 'OBJECT', 'size': 40} +{'name': '_ZTVSt12length_error', 'is_defined': False, 'type': 'OBJECT', 'size': 0} +{'name': '_ZTVSt12out_of_range', 'is_defined': False, 'type': 'OBJECT', 'size': 0} +{'name': '_ZTVSt13runtime_error', 'is_defined': False, 'type': 'OBJECT', 'size': 0} +{'name': '_ZTVSt14overflow_error', 'is_defined': False, 'type': 'OBJECT', 'size': 0} +{'name': '_ZTVSt16invalid_argument', 'is_defined': False, 'type': 'OBJECT', 'size': 0} +{'name': '_ZTVSt16nested_exception', 'is_defined': True, 'type': 'OBJECT', 'size': 32} +{'name': '_ZTVSt18bad_variant_access', 'is_defined': True, 'type': 'OBJECT', 'size': 40} +{'name': '_ZTVSt19bad_optional_access', 'is_defined': True, 'type': 'OBJECT', 'size': 40} +{'name': '_ZThn16_NSt3__114basic_iostreamIcNS_11char_traitsIcEEED0Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZThn16_NSt3__114basic_iostreamIcNS_11char_traitsIcEEED1Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZThn16_NSt3__19strstreamD0Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZThn16_NSt3__19strstreamD1Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZTv0_n24_NSt3__110istrstreamD0Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZTv0_n24_NSt3__110istrstreamD1Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZTv0_n24_NSt3__110ostrstreamD0Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZTv0_n24_NSt3__110ostrstreamD1Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZTv0_n24_NSt3__113basic_istreamIcNS_11char_traitsIcEEED0Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZTv0_n24_NSt3__113basic_istreamIcNS_11char_traitsIcEEED1Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZTv0_n24_NSt3__113basic_istreamIwNS_11char_traitsIwEEED0Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZTv0_n24_NSt3__113basic_istreamIwNS_11char_traitsIwEEED1Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZTv0_n24_NSt3__113basic_ostreamIcNS_11char_traitsIcEEED0Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZTv0_n24_NSt3__113basic_ostreamIcNS_11char_traitsIcEEED1Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZTv0_n24_NSt3__113basic_ostreamIwNS_11char_traitsIwEEED0Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZTv0_n24_NSt3__113basic_ostreamIwNS_11char_traitsIwEEED1Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZTv0_n24_NSt3__114basic_iostreamIcNS_11char_traitsIcEEED0Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZTv0_n24_NSt3__114basic_iostreamIcNS_11char_traitsIcEEED1Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZTv0_n24_NSt3__19strstreamD0Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZTv0_n24_NSt3__19strstreamD1Ev', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZdaPv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZdaPvRKSt9nothrow_t', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZdaPvSt11align_val_t', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZdaPvSt11align_val_tRKSt9nothrow_t', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZdaPvm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZdaPvmSt11align_val_t', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZdlPv', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZdlPvRKSt9nothrow_t', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZdlPvSt11align_val_t', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZdlPvSt11align_val_tRKSt9nothrow_t', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZdlPvm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZdlPvmSt11align_val_t', 'is_defined': True, 'type': 'FUNC'} +{'name': '_Znam', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZnamRKSt9nothrow_t', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZnamSt11align_val_t', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZnamSt11align_val_tRKSt9nothrow_t', 'is_defined': True, 'type': 'FUNC'} +{'name': '_Znwm', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZnwmRKSt9nothrow_t', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZnwmSt11align_val_t', 'is_defined': True, 'type': 'FUNC'} +{'name': '_ZnwmSt11align_val_tRKSt9nothrow_t', 'is_defined': True, 'type': 'FUNC'} +{'name': '__cxa_allocate_exception', 'is_defined': False, 'type': 'FUNC'} +{'name': '__cxa_begin_catch', 'is_defined': False, 'type': 'FUNC'} +{'name': '__cxa_current_primary_exception', 'is_defined': False, 'type': 'FUNC'} +{'name': '__cxa_decrement_exception_refcount', 'is_defined': False, 'type': 'FUNC'} +{'name': '__cxa_end_catch', 'is_defined': False, 'type': 'FUNC'} +{'name': '__cxa_free_exception', 'is_defined': False, 'type': 'FUNC'} +{'name': '__cxa_guard_abort', 'is_defined': False, 'type': 'FUNC'} +{'name': '__cxa_guard_acquire', 'is_defined': False, 'type': 'FUNC'} +{'name': '__cxa_guard_release', 'is_defined': False, 'type': 'FUNC'} +{'name': '__cxa_increment_exception_refcount', 'is_defined': False, 'type': 'FUNC'} +{'name': '__cxa_pure_virtual', 'is_defined': False, 'type': 'FUNC'} +{'name': '__cxa_rethrow', 'is_defined': False, 'type': 'FUNC'} +{'name': '__cxa_rethrow_primary_exception', 'is_defined': False, 'type': 'FUNC'} +{'name': '__cxa_throw', 'is_defined': False, 'type': 'FUNC'} +{'name': '__cxa_uncaught_exceptions', 'is_defined': False, 'type': 'FUNC'} diff --git a/libcxx/lib/abi/CHANGELOG.TXT b/libcxx/lib/abi/CHANGELOG.TXT index 95bdb714e682d..60227e3248a39 100644 --- a/libcxx/lib/abi/CHANGELOG.TXT +++ b/libcxx/lib/abi/CHANGELOG.TXT @@ -12,6 +12,32 @@ Afterwards the ABI list should be updated to include the new changes. New entries should be added directly below the "Version" header. +----------- +Version 9.0 +----------- + +* rTBD - Fix -fsanitize=vptr badness in <__debug> + + This patch fixes a lifetime bug when inserting a new container into the debug database. It is + diagnosed by UBSAN when debug mode is enabled. This patch corrects how nodes are constructed + during insertion. + + The fix requires unconditionally breaking the debug mode ABI. Users should not expect ABI + stability from debug mode. + + + x86_64-unknown-linux-gnu + ------------------------ + Symbol added: _ZNSt3__111__libcpp_db10__insert_cEPvPFPNS_8__c_nodeES1_S1_S3_E + Symbol removed: _ZNSt3__111__libcpp_db10__insert_cEPv + + + x86_64-apple-apple-darwin + ------------------------- + Symbol added: __ZNSt3__111__libcpp_db10__insert_cEPvPFPNS_8__c_nodeES1_S1_S3_E + Symbol removed: __ZNSt3__111__libcpp_db10__insert_cEPv + + ----------- Version 8.0 ----------- diff --git a/libcxx/lib/abi/x86_64-apple-darwin.v1.abilist b/libcxx/lib/abi/x86_64-apple-darwin.v1.abilist index 65a034961341b..e861fcab8b38b 100644 --- a/libcxx/lib/abi/x86_64-apple-darwin.v1.abilist +++ b/libcxx/lib/abi/x86_64-apple-darwin.v1.abilist @@ -1,2360 +1,2360 @@ -{'type': 'U', 'is_defined': False, 'name': '__ZNKSt10bad_typeid4whatEv'} -{'type': 'I', 'is_defined': True, 'name': '__ZNKSt10bad_typeid4whatEv'} -{'type': 'U', 'is_defined': False, 'name': '__ZNKSt11logic_error4whatEv'} -{'type': 'I', 'is_defined': True, 'name': '__ZNKSt11logic_error4whatEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt12bad_any_cast4whatEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt12experimental15fundamentals_v112bad_any_cast4whatEv'} -{'type': 'U', 'is_defined': False, 'name': '__ZNKSt13bad_exception4whatEv'} -{'type': 'I', 'is_defined': True, 'name': '__ZNKSt13bad_exception4whatEv'} -{'type': 'U', 'is_defined': False, 'name': '__ZNKSt13runtime_error4whatEv'} -{'type': 'I', 'is_defined': True, 'name': '__ZNKSt13runtime_error4whatEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt16nested_exception14rethrow_nestedEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt18bad_variant_access4whatEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt19bad_optional_access4whatEv'} -{'type': 'U', 'is_defined': False, 'name': '__ZNKSt20bad_array_new_length4whatEv'} -{'type': 'I', 'is_defined': True, 'name': '__ZNKSt20bad_array_new_length4whatEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__110__time_put8__do_putEPcRS1_PK2tmcc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__110__time_put8__do_putEPwRS1_PK2tmcc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__110error_code7messageEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__110moneypunctIcLb0EE11do_groupingEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__110moneypunctIcLb0EE13do_neg_formatEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__110moneypunctIcLb0EE13do_pos_formatEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__110moneypunctIcLb0EE14do_curr_symbolEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__110moneypunctIcLb0EE14do_frac_digitsEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__110moneypunctIcLb0EE16do_decimal_pointEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__110moneypunctIcLb0EE16do_negative_signEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__110moneypunctIcLb0EE16do_positive_signEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__110moneypunctIcLb0EE16do_thousands_sepEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__110moneypunctIcLb1EE11do_groupingEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__110moneypunctIcLb1EE13do_neg_formatEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__110moneypunctIcLb1EE13do_pos_formatEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__110moneypunctIcLb1EE14do_curr_symbolEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__110moneypunctIcLb1EE14do_frac_digitsEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__110moneypunctIcLb1EE16do_decimal_pointEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__110moneypunctIcLb1EE16do_negative_signEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__110moneypunctIcLb1EE16do_positive_signEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__110moneypunctIcLb1EE16do_thousands_sepEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__110moneypunctIwLb0EE11do_groupingEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__110moneypunctIwLb0EE13do_neg_formatEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__110moneypunctIwLb0EE13do_pos_formatEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__110moneypunctIwLb0EE14do_curr_symbolEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__110moneypunctIwLb0EE14do_frac_digitsEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__110moneypunctIwLb0EE16do_decimal_pointEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__110moneypunctIwLb0EE16do_negative_signEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__110moneypunctIwLb0EE16do_positive_signEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__110moneypunctIwLb0EE16do_thousands_sepEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__110moneypunctIwLb1EE11do_groupingEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__110moneypunctIwLb1EE13do_neg_formatEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__110moneypunctIwLb1EE13do_pos_formatEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__110moneypunctIwLb1EE14do_curr_symbolEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__110moneypunctIwLb1EE14do_frac_digitsEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__110moneypunctIwLb1EE16do_decimal_pointEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__110moneypunctIwLb1EE16do_negative_signEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__110moneypunctIwLb1EE16do_positive_signEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__110moneypunctIwLb1EE16do_thousands_sepEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__111__libcpp_db15__decrementableEPKv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__111__libcpp_db15__find_c_from_iEPv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__111__libcpp_db15__subscriptableEPKvl'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__111__libcpp_db17__dereferenceableEPKv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__111__libcpp_db17__find_c_and_lockEPv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__111__libcpp_db22__less_than_comparableEPKvS2_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__111__libcpp_db6unlockEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__111__libcpp_db8__find_cEPv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__111__libcpp_db9__addableEPKvl'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__112bad_weak_ptr4whatEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE12find_last_ofEPKcmm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE13find_first_ofEPKcmm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE16find_last_not_ofEPKcmm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE17find_first_not_ofEPKcmm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE2atEm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4copyEPcmm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4findEPKcmm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4findEcm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE5rfindEPKcmm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE5rfindEcm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7compareEPKc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7compareEmmPKc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7compareEmmPKcm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7compareEmmRKS5_mm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE12find_last_ofEPKwmm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE13find_first_ofEPKwmm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE16find_last_not_ofEPKwmm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE17find_first_not_ofEPKwmm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE2atEm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE4copyEPwmm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE4findEPKwmm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE4findEwm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE5rfindEPKwmm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE5rfindEwm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7compareEPKw'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7compareEmmPKw'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7compareEmmPKwm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7compareEmmRKS5_mm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__112ctype_bynameIcE10do_tolowerEPcPKc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__112ctype_bynameIcE10do_tolowerEc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__112ctype_bynameIcE10do_toupperEPcPKc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__112ctype_bynameIcE10do_toupperEc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__112ctype_bynameIwE10do_scan_isEjPKwS3_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__112ctype_bynameIwE10do_tolowerEPwPKw'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__112ctype_bynameIwE10do_tolowerEw'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__112ctype_bynameIwE10do_toupperEPwPKw'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__112ctype_bynameIwE10do_toupperEw'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__112ctype_bynameIwE11do_scan_notEjPKwS3_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__112ctype_bynameIwE5do_isEPKwS3_Pj'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__112ctype_bynameIwE5do_isEjw'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__112ctype_bynameIwE8do_widenEPKcS3_Pw'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__112ctype_bynameIwE8do_widenEc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__112ctype_bynameIwE9do_narrowEPKwS3_cPc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__112ctype_bynameIwE9do_narrowEwc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__112strstreambuf6pcountEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__113random_device7entropyEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__114__codecvt_utf8IDiE10do_unshiftER11__mbstate_tPcS4_RS4_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__114__codecvt_utf8IDiE11do_encodingEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__114__codecvt_utf8IDiE13do_max_lengthEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__114__codecvt_utf8IDiE16do_always_noconvEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__114__codecvt_utf8IDiE5do_inER11__mbstate_tPKcS5_RS5_PDiS7_RS7_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__114__codecvt_utf8IDiE6do_outER11__mbstate_tPKDiS5_RS5_PcS7_RS7_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__114__codecvt_utf8IDiE9do_lengthER11__mbstate_tPKcS5_m'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__114__codecvt_utf8IDsE10do_unshiftER11__mbstate_tPcS4_RS4_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__114__codecvt_utf8IDsE11do_encodingEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__114__codecvt_utf8IDsE13do_max_lengthEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__114__codecvt_utf8IDsE16do_always_noconvEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__114__codecvt_utf8IDsE5do_inER11__mbstate_tPKcS5_RS5_PDsS7_RS7_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__114__codecvt_utf8IDsE6do_outER11__mbstate_tPKDsS5_RS5_PcS7_RS7_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__114__codecvt_utf8IDsE9do_lengthER11__mbstate_tPKcS5_m'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__114__codecvt_utf8IwE10do_unshiftER11__mbstate_tPcS4_RS4_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__114__codecvt_utf8IwE11do_encodingEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__114__codecvt_utf8IwE13do_max_lengthEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__114__codecvt_utf8IwE16do_always_noconvEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__114__codecvt_utf8IwE5do_inER11__mbstate_tPKcS5_RS5_PwS7_RS7_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__114__codecvt_utf8IwE6do_outER11__mbstate_tPKwS5_RS5_PcS7_RS7_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__114__codecvt_utf8IwE9do_lengthER11__mbstate_tPKcS5_m'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__114collate_bynameIcE10do_compareEPKcS3_S3_S3_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__114collate_bynameIcE12do_transformEPKcS3_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__114collate_bynameIwE10do_compareEPKwS3_S3_S3_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__114collate_bynameIwE12do_transformEPKwS3_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__114error_category10equivalentERKNS_10error_codeEi'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__114error_category10equivalentEiRKNS_15error_conditionE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__114error_category23default_error_conditionEi'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IDiLb0EE10do_unshiftER11__mbstate_tPcS4_RS4_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IDiLb0EE11do_encodingEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IDiLb0EE13do_max_lengthEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IDiLb0EE16do_always_noconvEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IDiLb0EE5do_inER11__mbstate_tPKcS5_RS5_PDiS7_RS7_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IDiLb0EE6do_outER11__mbstate_tPKDiS5_RS5_PcS7_RS7_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IDiLb0EE9do_lengthER11__mbstate_tPKcS5_m'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IDiLb1EE10do_unshiftER11__mbstate_tPcS4_RS4_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IDiLb1EE11do_encodingEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IDiLb1EE13do_max_lengthEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IDiLb1EE16do_always_noconvEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IDiLb1EE5do_inER11__mbstate_tPKcS5_RS5_PDiS7_RS7_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IDiLb1EE6do_outER11__mbstate_tPKDiS5_RS5_PcS7_RS7_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IDiLb1EE9do_lengthER11__mbstate_tPKcS5_m'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IDsLb0EE10do_unshiftER11__mbstate_tPcS4_RS4_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IDsLb0EE11do_encodingEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IDsLb0EE13do_max_lengthEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IDsLb0EE16do_always_noconvEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IDsLb0EE5do_inER11__mbstate_tPKcS5_RS5_PDsS7_RS7_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IDsLb0EE6do_outER11__mbstate_tPKDsS5_RS5_PcS7_RS7_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IDsLb0EE9do_lengthER11__mbstate_tPKcS5_m'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IDsLb1EE10do_unshiftER11__mbstate_tPcS4_RS4_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IDsLb1EE11do_encodingEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IDsLb1EE13do_max_lengthEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IDsLb1EE16do_always_noconvEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IDsLb1EE5do_inER11__mbstate_tPKcS5_RS5_PDsS7_RS7_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IDsLb1EE6do_outER11__mbstate_tPKDsS5_RS5_PcS7_RS7_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IDsLb1EE9do_lengthER11__mbstate_tPKcS5_m'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IwLb0EE10do_unshiftER11__mbstate_tPcS4_RS4_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IwLb0EE11do_encodingEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IwLb0EE13do_max_lengthEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IwLb0EE16do_always_noconvEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IwLb0EE5do_inER11__mbstate_tPKcS5_RS5_PwS7_RS7_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IwLb0EE6do_outER11__mbstate_tPKwS5_RS5_PcS7_RS7_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IwLb0EE9do_lengthER11__mbstate_tPKcS5_m'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IwLb1EE10do_unshiftER11__mbstate_tPcS4_RS4_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IwLb1EE11do_encodingEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IwLb1EE13do_max_lengthEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IwLb1EE16do_always_noconvEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IwLb1EE5do_inER11__mbstate_tPKcS5_RS5_PwS7_RS7_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IwLb1EE6do_outER11__mbstate_tPKwS5_RS5_PcS7_RS7_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IwLb1EE9do_lengthER11__mbstate_tPKcS5_m'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__115basic_streambufIcNS_11char_traitsIcEEE6getlocEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__115basic_streambufIwNS_11char_traitsIwEEE6getlocEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__115error_condition7messageEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIcLb0EE11do_groupingEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIcLb0EE13do_neg_formatEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIcLb0EE13do_pos_formatEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIcLb0EE14do_curr_symbolEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIcLb0EE14do_frac_digitsEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIcLb0EE16do_decimal_pointEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIcLb0EE16do_negative_signEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIcLb0EE16do_positive_signEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIcLb0EE16do_thousands_sepEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIcLb1EE11do_groupingEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIcLb1EE13do_neg_formatEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIcLb1EE13do_pos_formatEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIcLb1EE14do_curr_symbolEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIcLb1EE14do_frac_digitsEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIcLb1EE16do_decimal_pointEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIcLb1EE16do_negative_signEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIcLb1EE16do_positive_signEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIcLb1EE16do_thousands_sepEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIwLb0EE11do_groupingEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIwLb0EE13do_neg_formatEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIwLb0EE13do_pos_formatEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIwLb0EE14do_curr_symbolEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIwLb0EE14do_frac_digitsEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIwLb0EE16do_decimal_pointEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIwLb0EE16do_negative_signEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIwLb0EE16do_positive_signEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIwLb0EE16do_thousands_sepEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIwLb1EE11do_groupingEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIwLb1EE13do_neg_formatEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIwLb1EE13do_pos_formatEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIwLb1EE14do_curr_symbolEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIwLb1EE14do_frac_digitsEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIwLb1EE16do_decimal_pointEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIwLb1EE16do_negative_signEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIwLb1EE16do_positive_signEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIwLb1EE16do_thousands_sepEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__118__time_get_storageIcE15__do_date_orderEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__118__time_get_storageIwE15__do_date_orderEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__119__shared_weak_count13__get_deleterERKSt9type_info'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__120__codecvt_utf8_utf16IDiE10do_unshiftER11__mbstate_tPcS4_RS4_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__120__codecvt_utf8_utf16IDiE11do_encodingEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__120__codecvt_utf8_utf16IDiE13do_max_lengthEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__120__codecvt_utf8_utf16IDiE16do_always_noconvEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__120__codecvt_utf8_utf16IDiE5do_inER11__mbstate_tPKcS5_RS5_PDiS7_RS7_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__120__codecvt_utf8_utf16IDiE6do_outER11__mbstate_tPKDiS5_RS5_PcS7_RS7_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__120__codecvt_utf8_utf16IDiE9do_lengthER11__mbstate_tPKcS5_m'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__120__codecvt_utf8_utf16IDsE10do_unshiftER11__mbstate_tPcS4_RS4_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__120__codecvt_utf8_utf16IDsE11do_encodingEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__120__codecvt_utf8_utf16IDsE13do_max_lengthEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__120__codecvt_utf8_utf16IDsE16do_always_noconvEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__120__codecvt_utf8_utf16IDsE5do_inER11__mbstate_tPKcS5_RS5_PDsS7_RS7_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__120__codecvt_utf8_utf16IDsE6do_outER11__mbstate_tPKDsS5_RS5_PcS7_RS7_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__120__codecvt_utf8_utf16IDsE9do_lengthER11__mbstate_tPKcS5_m'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__120__codecvt_utf8_utf16IwE10do_unshiftER11__mbstate_tPcS4_RS4_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__120__codecvt_utf8_utf16IwE11do_encodingEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__120__codecvt_utf8_utf16IwE13do_max_lengthEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__120__codecvt_utf8_utf16IwE16do_always_noconvEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__120__codecvt_utf8_utf16IwE5do_inER11__mbstate_tPKcS5_RS5_PwS7_RS7_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__120__codecvt_utf8_utf16IwE6do_outER11__mbstate_tPKwS5_RS5_PcS7_RS7_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__120__codecvt_utf8_utf16IwE9do_lengthER11__mbstate_tPKcS5_m'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__120__time_get_c_storageIcE3__XEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__120__time_get_c_storageIcE3__cEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__120__time_get_c_storageIcE3__rEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__120__time_get_c_storageIcE3__xEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__120__time_get_c_storageIcE7__am_pmEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__120__time_get_c_storageIcE7__weeksEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__120__time_get_c_storageIcE8__monthsEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__120__time_get_c_storageIwE3__XEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__120__time_get_c_storageIwE3__cEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__120__time_get_c_storageIwE3__rEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__120__time_get_c_storageIwE3__xEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__120__time_get_c_storageIwE7__am_pmEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__120__time_get_c_storageIwE7__weeksEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__120__time_get_c_storageIwE8__monthsEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__120__vector_base_commonILb1EE20__throw_length_errorEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__120__vector_base_commonILb1EE20__throw_out_of_rangeEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__121__basic_string_commonILb1EE20__throw_length_errorEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__121__basic_string_commonILb1EE20__throw_out_of_rangeEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__123__match_any_but_newlineIcE6__execERNS_7__stateIcEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__123__match_any_but_newlineIwE6__execERNS_7__stateIwEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__124__libcpp_debug_exception4whatEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__15ctypeIcE10do_tolowerEPcPKc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__15ctypeIcE10do_tolowerEc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__15ctypeIcE10do_toupperEPcPKc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__15ctypeIcE10do_toupperEc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__15ctypeIcE8do_widenEPKcS3_Pc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__15ctypeIcE8do_widenEc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__15ctypeIcE9do_narrowEPKcS3_cPc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__15ctypeIcE9do_narrowEcc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__15ctypeIwE10do_scan_isEjPKwS3_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__15ctypeIwE10do_tolowerEPwPKw'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__15ctypeIwE10do_tolowerEw'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__15ctypeIwE10do_toupperEPwPKw'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__15ctypeIwE10do_toupperEw'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__15ctypeIwE11do_scan_notEjPKwS3_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__15ctypeIwE5do_isEPKwS3_Pj'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__15ctypeIwE5do_isEjw'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__15ctypeIwE8do_widenEPKcS3_Pw'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__15ctypeIwE8do_widenEc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__15ctypeIwE9do_narrowEPKwS3_cPc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__15ctypeIwE9do_narrowEwc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__16locale4nameEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__16locale9has_facetERNS0_2idE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__16locale9use_facetERNS0_2idE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__16localeeqERKS0_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17codecvtIDic11__mbstate_tE10do_unshiftERS1_PcS4_RS4_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17codecvtIDic11__mbstate_tE11do_encodingEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17codecvtIDic11__mbstate_tE13do_max_lengthEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17codecvtIDic11__mbstate_tE16do_always_noconvEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17codecvtIDic11__mbstate_tE5do_inERS1_PKcS5_RS5_PDiS7_RS7_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17codecvtIDic11__mbstate_tE6do_outERS1_PKDiS5_RS5_PcS7_RS7_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17codecvtIDic11__mbstate_tE9do_lengthERS1_PKcS5_m'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17codecvtIDsc11__mbstate_tE10do_unshiftERS1_PcS4_RS4_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17codecvtIDsc11__mbstate_tE11do_encodingEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17codecvtIDsc11__mbstate_tE13do_max_lengthEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17codecvtIDsc11__mbstate_tE16do_always_noconvEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17codecvtIDsc11__mbstate_tE5do_inERS1_PKcS5_RS5_PDsS7_RS7_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17codecvtIDsc11__mbstate_tE6do_outERS1_PKDsS5_RS5_PcS7_RS7_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17codecvtIDsc11__mbstate_tE9do_lengthERS1_PKcS5_m'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17codecvtIcc11__mbstate_tE10do_unshiftERS1_PcS4_RS4_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17codecvtIcc11__mbstate_tE11do_encodingEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17codecvtIcc11__mbstate_tE13do_max_lengthEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17codecvtIcc11__mbstate_tE16do_always_noconvEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17codecvtIcc11__mbstate_tE5do_inERS1_PKcS5_RS5_PcS7_RS7_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17codecvtIcc11__mbstate_tE6do_outERS1_PKcS5_RS5_PcS7_RS7_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17codecvtIcc11__mbstate_tE9do_lengthERS1_PKcS5_m'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17codecvtIwc11__mbstate_tE10do_unshiftERS1_PcS4_RS4_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17codecvtIwc11__mbstate_tE11do_encodingEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17codecvtIwc11__mbstate_tE13do_max_lengthEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17codecvtIwc11__mbstate_tE16do_always_noconvEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17codecvtIwc11__mbstate_tE5do_inERS1_PKcS5_RS5_PwS7_RS7_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17codecvtIwc11__mbstate_tE6do_outERS1_PKwS5_RS5_PcS7_RS7_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17codecvtIwc11__mbstate_tE9do_lengthERS1_PKcS5_m'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17collateIcE10do_compareEPKcS3_S3_S3_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17collateIcE12do_transformEPKcS3_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17collateIcE7do_hashEPKcS3_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17collateIwE10do_compareEPKwS3_S3_S3_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17collateIwE12do_transformEPKwS3_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17collateIwE7do_hashEPKwS3_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRPv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRb'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRd'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRe'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRf'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRl'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRt'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRx'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRy'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjS8_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRPv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRb'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRd'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRe'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRf'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRl'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRt'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRx'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRy'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjS8_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEcPKv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEcb'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEcd'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEce'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEcl'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEcm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEcx'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEcy'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwPKv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwb'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwd'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwe'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwl'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwx'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwy'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18ios_base6getlocEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18messagesIcE6do_getEliiRKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18messagesIcE7do_openERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERKNS_6localeE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18messagesIcE8do_closeEl'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18messagesIwE6do_getEliiRKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18messagesIwE7do_openERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERKNS_6localeE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18messagesIwE8do_closeEl'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18numpunctIcE11do_groupingEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18numpunctIcE11do_truenameEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18numpunctIcE12do_falsenameEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18numpunctIcE16do_decimal_pointEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18numpunctIcE16do_thousands_sepEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18numpunctIwE11do_groupingEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18numpunctIwE11do_truenameEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18numpunctIwE12do_falsenameEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18numpunctIwE16do_decimal_pointEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18numpunctIwE16do_thousands_sepEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE10__get_hourERiRS4_S4_RjRKNS_5ctypeIcEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE10__get_yearERiRS4_S4_RjRKNS_5ctypeIcEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE11__get_am_pmERiRS4_S4_RjRKNS_5ctypeIcEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE11__get_monthERiRS4_S4_RjRKNS_5ctypeIcEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE11__get_year4ERiRS4_S4_RjRKNS_5ctypeIcEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE11do_get_dateES4_S4_RNS_8ios_baseERjP2tm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE11do_get_timeES4_S4_RNS_8ios_baseERjP2tm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE11do_get_yearES4_S4_RNS_8ios_baseERjP2tm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE12__get_minuteERiRS4_S4_RjRKNS_5ctypeIcEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE12__get_secondERiRS4_S4_RjRKNS_5ctypeIcEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE13__get_12_hourERiRS4_S4_RjRKNS_5ctypeIcEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE13__get_percentERS4_S4_RjRKNS_5ctypeIcEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE13__get_weekdayERiRS4_S4_RjRKNS_5ctypeIcEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE13do_date_orderEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE14do_get_weekdayES4_S4_RNS_8ios_baseERjP2tm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE15__get_monthnameERiRS4_S4_RjRKNS_5ctypeIcEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE16do_get_monthnameES4_S4_RNS_8ios_baseERjP2tm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE17__get_weekdaynameERiRS4_S4_RjRKNS_5ctypeIcEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE17__get_white_spaceERS4_S4_RjRKNS_5ctypeIcEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE18__get_day_year_numERiRS4_S4_RjRKNS_5ctypeIcEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE3getES4_S4_RNS_8ios_baseERjP2tmPKcSC_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjP2tmcc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE9__get_dayERiRS4_S4_RjRKNS_5ctypeIcEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE10__get_hourERiRS4_S4_RjRKNS_5ctypeIwEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE10__get_yearERiRS4_S4_RjRKNS_5ctypeIwEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE11__get_am_pmERiRS4_S4_RjRKNS_5ctypeIwEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE11__get_monthERiRS4_S4_RjRKNS_5ctypeIwEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE11__get_year4ERiRS4_S4_RjRKNS_5ctypeIwEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE11do_get_dateES4_S4_RNS_8ios_baseERjP2tm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE11do_get_timeES4_S4_RNS_8ios_baseERjP2tm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE11do_get_yearES4_S4_RNS_8ios_baseERjP2tm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE12__get_minuteERiRS4_S4_RjRKNS_5ctypeIwEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE12__get_secondERiRS4_S4_RjRKNS_5ctypeIwEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE13__get_12_hourERiRS4_S4_RjRKNS_5ctypeIwEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE13__get_percentERS4_S4_RjRKNS_5ctypeIwEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE13__get_weekdayERiRS4_S4_RjRKNS_5ctypeIwEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE13do_date_orderEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE14do_get_weekdayES4_S4_RNS_8ios_baseERjP2tm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE15__get_monthnameERiRS4_S4_RjRKNS_5ctypeIwEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE16do_get_monthnameES4_S4_RNS_8ios_baseERjP2tm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE17__get_weekdaynameERiRS4_S4_RjRKNS_5ctypeIwEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE17__get_white_spaceERS4_S4_RjRKNS_5ctypeIwEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE18__get_day_year_numERiRS4_S4_RjRKNS_5ctypeIwEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE3getES4_S4_RNS_8ios_baseERjP2tmPKwSC_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjP2tmcc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE9__get_dayERiRS4_S4_RjRKNS_5ctypeIwEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18time_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE3putES4_RNS_8ios_baseEcPK2tmPKcSC_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18time_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEcPK2tmcc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18time_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE3putES4_RNS_8ios_baseEwPK2tmPKwSC_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__18time_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwPK2tmcc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__19money_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_bRNS_8ios_baseERjRNS_12basic_stringIcS3_NS_9allocatorIcEEEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__19money_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_bRNS_8ios_baseERjRe'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__19money_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_bRNS_8ios_baseERjRNS_12basic_stringIwS3_NS_9allocatorIwEEEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__19money_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_bRNS_8ios_baseERjRe'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__19money_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_bRNS_8ios_baseEcRKNS_12basic_stringIcS3_NS_9allocatorIcEEEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__19money_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_bRNS_8ios_baseEce'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__19money_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_bRNS_8ios_baseEwRKNS_12basic_stringIwS3_NS_9allocatorIwEEEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__19money_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_bRNS_8ios_baseEwe'} -{'type': 'U', 'is_defined': False, 'name': '__ZNKSt8bad_cast4whatEv'} -{'type': 'I', 'is_defined': True, 'name': '__ZNKSt8bad_cast4whatEv'} -{'type': 'U', 'is_defined': False, 'name': '__ZNKSt9bad_alloc4whatEv'} -{'type': 'I', 'is_defined': True, 'name': '__ZNKSt9bad_alloc4whatEv'} -{'type': 'U', 'is_defined': False, 'name': '__ZNKSt9exception4whatEv'} -{'type': 'I', 'is_defined': True, 'name': '__ZNKSt9exception4whatEv'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt10bad_typeidC1Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt10bad_typeidC1Ev'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt10bad_typeidC2Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt10bad_typeidC2Ev'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt10bad_typeidD0Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt10bad_typeidD0Ev'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt10bad_typeidD1Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt10bad_typeidD1Ev'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt10bad_typeidD2Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt10bad_typeidD2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt11logic_errorC1EPKc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt11logic_errorC1ERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt11logic_errorC1ERKS_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt11logic_errorC2EPKc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt11logic_errorC2ERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt11logic_errorC2ERKS_'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt11logic_errorD0Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt11logic_errorD0Ev'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt11logic_errorD1Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt11logic_errorD1Ev'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt11logic_errorD2Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt11logic_errorD2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt11logic_erroraSERKS_'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt11range_errorD0Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt11range_errorD0Ev'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt11range_errorD1Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt11range_errorD1Ev'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt11range_errorD2Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt11range_errorD2Ev'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt12domain_errorD0Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt12domain_errorD0Ev'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt12domain_errorD1Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt12domain_errorD1Ev'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt12domain_errorD2Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt12domain_errorD2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt12experimental19bad_optional_accessD0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt12experimental19bad_optional_accessD1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt12experimental19bad_optional_accessD2Ev'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt12length_errorD0Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt12length_errorD0Ev'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt12length_errorD1Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt12length_errorD1Ev'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt12length_errorD2Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt12length_errorD2Ev'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt12out_of_rangeD0Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt12out_of_rangeD0Ev'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt12out_of_rangeD1Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt12out_of_rangeD1Ev'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt12out_of_rangeD2Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt12out_of_rangeD2Ev'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt13bad_exceptionD0Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt13bad_exceptionD0Ev'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt13bad_exceptionD1Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt13bad_exceptionD1Ev'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt13bad_exceptionD2Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt13bad_exceptionD2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt13exception_ptrC1ERKS_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt13exception_ptrC2ERKS_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt13exception_ptrD1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt13exception_ptrD2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt13exception_ptraSERKS_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt13runtime_errorC1EPKc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt13runtime_errorC1ERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt13runtime_errorC1ERKS_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt13runtime_errorC2EPKc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt13runtime_errorC2ERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt13runtime_errorC2ERKS_'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt13runtime_errorD0Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt13runtime_errorD0Ev'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt13runtime_errorD1Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt13runtime_errorD1Ev'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt13runtime_errorD2Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt13runtime_errorD2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt13runtime_erroraSERKS_'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt14overflow_errorD0Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt14overflow_errorD0Ev'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt14overflow_errorD1Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt14overflow_errorD1Ev'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt14overflow_errorD2Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt14overflow_errorD2Ev'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt15underflow_errorD0Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt15underflow_errorD0Ev'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt15underflow_errorD1Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt15underflow_errorD1Ev'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt15underflow_errorD2Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt15underflow_errorD2Ev'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt16invalid_argumentD0Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt16invalid_argumentD0Ev'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt16invalid_argumentD1Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt16invalid_argumentD1Ev'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt16invalid_argumentD2Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt16invalid_argumentD2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt16nested_exceptionC1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt16nested_exceptionC2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt16nested_exceptionD0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt16nested_exceptionD1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt16nested_exceptionD2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt19bad_optional_accessD0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt19bad_optional_accessD1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt19bad_optional_accessD2Ev'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt20bad_array_new_lengthC1Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt20bad_array_new_lengthC1Ev'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt20bad_array_new_lengthC2Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt20bad_array_new_lengthC2Ev'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt20bad_array_new_lengthD0Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt20bad_array_new_lengthD0Ev'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt20bad_array_new_lengthD1Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt20bad_array_new_lengthD1Ev'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt20bad_array_new_lengthD2Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt20bad_array_new_lengthD2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__110__time_getC1EPKc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__110__time_getC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__110__time_getC2EPKc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__110__time_getC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__110__time_getD1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__110__time_getD2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__110__time_putC1EPKc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__110__time_putC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__110__time_putC2EPKc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__110__time_putC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__110__time_putD1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__110__time_putD2Ev'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__110adopt_lockE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__110ctype_base5alnumE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__110ctype_base5alphaE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__110ctype_base5blankE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__110ctype_base5cntrlE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__110ctype_base5digitE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__110ctype_base5graphE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__110ctype_base5lowerE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__110ctype_base5printE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__110ctype_base5punctE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__110ctype_base5spaceE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__110ctype_base5upperE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__110ctype_base6xdigitE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__110defer_lockE', 'size': 0} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__110istrstreamD0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__110istrstreamD1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__110istrstreamD2Ev'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__110moneypunctIcLb0EE2idE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__110moneypunctIcLb0EE4intlE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__110moneypunctIcLb1EE2idE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__110moneypunctIcLb1EE4intlE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__110moneypunctIwLb0EE2idE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__110moneypunctIwLb0EE4intlE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__110moneypunctIwLb1EE2idE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__110moneypunctIwLb1EE4intlE', 'size': 0} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__110ostrstreamD0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__110ostrstreamD1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__110ostrstreamD2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__110to_wstringEd'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__110to_wstringEe'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__110to_wstringEf'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__110to_wstringEi'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__110to_wstringEj'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__110to_wstringEl'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__110to_wstringEm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__110to_wstringEx'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__110to_wstringEy'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__111__call_onceERVmPvPFvS2_E'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__111__libcpp_db10__insert_cEPv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__111__libcpp_db10__insert_iEPv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__111__libcpp_db11__insert_icEPvPKv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__111__libcpp_db15__iterator_copyEPvPKv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__111__libcpp_db16__invalidate_allEPv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__111__libcpp_db4swapEPvS1_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__111__libcpp_db9__erase_cEPv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__111__libcpp_db9__erase_iEPv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__111__libcpp_dbC1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__111__libcpp_dbC2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__111__libcpp_dbD1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__111__libcpp_dbD2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__111__money_getIcE13__gather_infoEbRKNS_6localeERNS_10money_base7patternERcS8_RNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEESF_SF_SF_Ri'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__111__money_getIwE13__gather_infoEbRKNS_6localeERNS_10money_base7patternERwS8_RNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERNS9_IwNSA_IwEENSC_IwEEEESJ_SJ_Ri'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__111__money_putIcE13__gather_infoEbbRKNS_6localeERNS_10money_base7patternERcS8_RNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEESF_SF_Ri'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__111__money_putIcE8__formatEPcRS2_S3_jPKcS5_RKNS_5ctypeIcEEbRKNS_10money_base7patternEccRKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEESL_SL_i'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__111__money_putIwE13__gather_infoEbbRKNS_6localeERNS_10money_base7patternERwS8_RNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERNS9_IwNSA_IwEENSC_IwEEEESJ_Ri'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__111__money_putIwE8__formatEPwRS2_S3_jPKwS5_RKNS_5ctypeIwEEbRKNS_10money_base7patternEwwRKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERKNSE_IwNSF_IwEENSH_IwEEEESQ_i'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__111regex_errorC1ENS_15regex_constants10error_typeE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__111regex_errorC2ENS_15regex_constants10error_typeE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__111regex_errorD0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__111regex_errorD1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__111regex_errorD2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__111this_thread9sleep_forERKNS_6chrono8durationIxNS_5ratioILl1ELl1000000000EEEEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__111timed_mutex4lockEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__111timed_mutex6unlockEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__111timed_mutex8try_lockEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__111timed_mutexC1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__111timed_mutexC2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__111timed_mutexD1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__111timed_mutexD2Ev'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__111try_to_lockE', 'size': 0} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112__do_nothingEPv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112__get_sp_mutEPKv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112__next_primeEm'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__112__rs_default4__c_E', 'size': 0} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112__rs_defaultC1ERKS0_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112__rs_defaultC1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112__rs_defaultC2ERKS0_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112__rs_defaultC2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112__rs_defaultD1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112__rs_defaultD2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112__rs_defaultclEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112bad_weak_ptrD0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112bad_weak_ptrD1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112bad_weak_ptrD2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE21__grow_by_and_replaceEmmmmmmPKc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE2atEm'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4nposE', 'size': 0} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE5eraseEmm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcmm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEmc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6appendEPKc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6appendEPKcm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6appendERKS5_mm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6appendEmc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignEPKc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignEPKcm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignERKS5_mm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignEmc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6insertENS_11__wrap_iterIPKcEEc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6insertEmPKc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6insertEmPKcm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6insertEmRKS5_mm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6insertEmmc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6resizeEmc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7replaceEmmPKc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7replaceEmmPKcm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7replaceEmmRKS5_mm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7replaceEmmmc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7reserveEm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9__grow_byEmmmmmm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9push_backEc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC1ERKS5_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC1ERKS5_RKS4_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC1ERKS5_mmRKS4_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2ERKS5_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2ERKS5_RKS4_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2ERKS5_mmRKS4_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEaSERKS5_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEaSEc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE21__grow_by_and_replaceEmmmmmmPKw'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE2atEm'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE4nposE', 'size': 0} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE5eraseEmm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6__initEPKwm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6__initEPKwmm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6__initEmw'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6appendEPKw'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6appendEPKwm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6appendERKS5_mm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6appendEmw'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6assignEPKw'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6assignEPKwm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6assignERKS5_mm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6assignEmw'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6insertENS_11__wrap_iterIPKwEEw'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6insertEmPKw'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6insertEmPKwm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6insertEmRKS5_mm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6insertEmmw'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6resizeEmw'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7replaceEmmPKw'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7replaceEmmPKwm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7replaceEmmRKS5_mm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7replaceEmmmw'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7reserveEm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE9__grow_byEmmmmmm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE9push_backEw'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC1ERKS5_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC1ERKS5_RKS4_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC1ERKS5_mmRKS4_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC2ERKS5_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC2ERKS5_RKS4_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC2ERKS5_mmRKS4_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEED1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEED2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEaSERKS5_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEaSEw'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112ctype_bynameIcEC1EPKcm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112ctype_bynameIcEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112ctype_bynameIcEC2EPKcm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112ctype_bynameIcEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112ctype_bynameIcED0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112ctype_bynameIcED1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112ctype_bynameIcED2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112ctype_bynameIwEC1EPKcm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112ctype_bynameIwEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112ctype_bynameIwEC2EPKcm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112ctype_bynameIwEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112ctype_bynameIwED0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112ctype_bynameIwED1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112ctype_bynameIwED2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112future_errorC1ENS_10error_codeE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112future_errorC2ENS_10error_codeE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112future_errorD0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112future_errorD1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112future_errorD2Ev'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__112placeholders2_1E', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__112placeholders2_2E', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__112placeholders2_3E', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__112placeholders2_4E', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__112placeholders2_5E', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__112placeholders2_6E', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__112placeholders2_7E', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__112placeholders2_8E', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__112placeholders2_9E', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__112placeholders3_10E', 'size': 0} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112strstreambuf3strEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112strstreambuf4swapERS0_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112strstreambuf6__initEPclS1_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112strstreambuf6freezeEb'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112strstreambuf7seekoffExNS_8ios_base7seekdirEj'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112strstreambuf7seekposENS_4fposI11__mbstate_tEEj'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112strstreambuf8overflowEi'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112strstreambuf9pbackfailEi'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112strstreambuf9underflowEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112strstreambufC1EPFPvmEPFvS1_E'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112strstreambufC1EPKal'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112strstreambufC1EPKcl'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112strstreambufC1EPKhl'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112strstreambufC1EPalS1_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112strstreambufC1EPclS1_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112strstreambufC1EPhlS1_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112strstreambufC1El'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112strstreambufC2EPFPvmEPFvS1_E'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112strstreambufC2EPKal'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112strstreambufC2EPKcl'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112strstreambufC2EPKhl'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112strstreambufC2EPalS1_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112strstreambufC2EPclS1_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112strstreambufC2EPhlS1_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112strstreambufC2El'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112strstreambufD0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112strstreambufD1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112strstreambufD2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112system_error6__initERKNS_10error_codeENS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112system_errorC1ENS_10error_codeE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112system_errorC1ENS_10error_codeEPKc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112system_errorC1ENS_10error_codeERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112system_errorC1EiRKNS_14error_categoryE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112system_errorC1EiRKNS_14error_categoryEPKc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112system_errorC1EiRKNS_14error_categoryERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112system_errorC2ENS_10error_codeE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112system_errorC2ENS_10error_codeEPKc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112system_errorC2ENS_10error_codeERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112system_errorC2EiRKNS_14error_categoryE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112system_errorC2EiRKNS_14error_categoryEPKc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112system_errorC2EiRKNS_14error_categoryERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112system_errorD0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112system_errorD1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__112system_errorD2Ev'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__113allocator_argE', 'size': 0} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE3getEPcl'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE3getEPclc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE3getERNS_15basic_streambufIcS2_EE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE3getERNS_15basic_streambufIcS2_EEc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE3getERc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE3getEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE4peekEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE4readEPcl'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE4swapERS3_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE4syncEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE5seekgENS_4fposI11__mbstate_tEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE5seekgExNS_8ios_base7seekdirE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE5tellgEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE5ungetEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE6ignoreEli'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE6sentryC1ERS3_b'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE6sentryC2ERS3_b'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE7getlineEPcl'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE7getlineEPclc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE7putbackEc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE8readsomeEPcl'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEEC1EPNS_15basic_streambufIcS2_EE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEEC2EPNS_15basic_streambufIcS2_EE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEED0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEED1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEED2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsEPFRNS_8ios_baseES5_E'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsEPFRNS_9basic_iosIcS2_EES6_E'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsEPFRS3_S4_E'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsEPNS_15basic_streambufIcS2_EE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERPv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERb'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERd'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERe'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERf'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERi'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERj'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERl'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERs'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERt'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERx'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERy'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE3getEPwl'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE3getEPwlw'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE3getERNS_15basic_streambufIwS2_EE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE3getERNS_15basic_streambufIwS2_EEw'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE3getERw'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE3getEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE4peekEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE4readEPwl'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE4swapERS3_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE4syncEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE5seekgENS_4fposI11__mbstate_tEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE5seekgExNS_8ios_base7seekdirE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE5tellgEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE5ungetEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE6ignoreEli'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE6sentryC1ERS3_b'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE6sentryC2ERS3_b'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE7getlineEPwl'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE7getlineEPwlw'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE7putbackEw'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE8readsomeEPwl'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEEC1EPNS_15basic_streambufIwS2_EE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEEC2EPNS_15basic_streambufIwS2_EE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEED0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEED1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEED2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsEPFRNS_8ios_baseES5_E'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsEPFRNS_9basic_iosIwS2_EES6_E'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsEPFRS3_S4_E'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsEPNS_15basic_streambufIwS2_EE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERPv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERb'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERd'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERe'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERf'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERi'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERj'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERl'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERs'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERt'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERx'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERy'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE3putEc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE4swapERS3_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE5flushEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE5seekpENS_4fposI11__mbstate_tEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE5seekpExNS_8ios_base7seekdirE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE5tellpEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE5writeEPKcl'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE6sentryC1ERS3_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE6sentryC2ERS3_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE6sentryD1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE6sentryD2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEEC1EPNS_15basic_streambufIcS2_EE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEEC2EPNS_15basic_streambufIcS2_EE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEED0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEED1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEED2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEPFRNS_8ios_baseES5_E'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEPFRNS_9basic_iosIcS2_EES6_E'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEPFRS3_S4_E'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEPKv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEPNS_15basic_streambufIcS2_EE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEb'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEd'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEe'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEf'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEi'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEj'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEl'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEs'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEt'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEx'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEy'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEE3putEw'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEE4swapERS3_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEE5flushEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEE5seekpENS_4fposI11__mbstate_tEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEE5seekpExNS_8ios_base7seekdirE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEE5tellpEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEE5writeEPKwl'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEE6sentryC1ERS3_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEE6sentryC2ERS3_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEE6sentryD1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEE6sentryD2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEEC1EPNS_15basic_streambufIwS2_EE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEEC2EPNS_15basic_streambufIwS2_EE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEED0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEED1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEED2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEPFRNS_8ios_baseES5_E'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEPFRNS_9basic_iosIwS2_EES6_E'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEPFRS3_S4_E'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEPKv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEPNS_15basic_streambufIwS2_EE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEb'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEd'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEe'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEf'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEi'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEj'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEl'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEs'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEt'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEx'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEy'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113random_deviceC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113random_deviceC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113random_deviceD1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113random_deviceD2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113random_deviceclEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113shared_futureIvED1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113shared_futureIvED2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__113shared_futureIvEaSERKS1_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__114__get_const_dbEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__114__num_get_base10__get_baseERNS_8ios_baseE'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__114__num_get_base5__srcE', 'size': 0} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__114__num_put_base12__format_intEPcPKcbj'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__114__num_put_base14__format_floatEPcPKcj'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__114__num_put_base18__identify_paddingEPcS1_RKNS_8ios_baseE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__114__shared_count12__add_sharedEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__114__shared_count16__release_sharedEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__114__shared_countD0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__114__shared_countD1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__114__shared_countD2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__114basic_iostreamIcNS_11char_traitsIcEEE4swapERS3_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__114basic_iostreamIcNS_11char_traitsIcEEEC1EPNS_15basic_streambufIcS2_EE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__114basic_iostreamIcNS_11char_traitsIcEEEC2EPNS_15basic_streambufIcS2_EE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__114basic_iostreamIcNS_11char_traitsIcEEED0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__114basic_iostreamIcNS_11char_traitsIcEEED1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__114basic_iostreamIcNS_11char_traitsIcEEED2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__114codecvt_bynameIDic11__mbstate_tED0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__114codecvt_bynameIDic11__mbstate_tED1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__114codecvt_bynameIDic11__mbstate_tED2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__114codecvt_bynameIDsc11__mbstate_tED0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__114codecvt_bynameIDsc11__mbstate_tED1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__114codecvt_bynameIDsc11__mbstate_tED2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__114codecvt_bynameIcc11__mbstate_tED0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__114codecvt_bynameIcc11__mbstate_tED1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__114codecvt_bynameIcc11__mbstate_tED2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__114codecvt_bynameIwc11__mbstate_tED0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__114codecvt_bynameIwc11__mbstate_tED1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__114codecvt_bynameIwc11__mbstate_tED2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__114collate_bynameIcEC1EPKcm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__114collate_bynameIcEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__114collate_bynameIcEC2EPKcm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__114collate_bynameIcEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__114collate_bynameIcED0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__114collate_bynameIcED1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__114collate_bynameIcED2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__114collate_bynameIwEC1EPKcm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__114collate_bynameIwEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__114collate_bynameIwEC2EPKcm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__114collate_bynameIwEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__114collate_bynameIwED0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__114collate_bynameIwED1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__114collate_bynameIwED2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__114error_categoryC2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__114error_categoryD0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__114error_categoryD1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__114error_categoryD2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115__get_classnameEPKcb'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115__thread_struct25notify_all_at_thread_exitEPNS_18condition_variableEPNS_5mutexE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115__thread_struct27__make_ready_at_thread_exitEPNS_17__assoc_sub_stateE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115__thread_structC1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115__thread_structC2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115__thread_structD1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115__thread_structD2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE10pubseekoffExNS_8ios_base7seekdirEj'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE10pubseekposENS_4fposI11__mbstate_tEEj'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE4setgEPcS4_S4_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE4setpEPcS4_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE4swapERS3_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE4syncEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE5gbumpEi'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE5imbueERKNS_6localeE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE5pbumpEi'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE5sgetcEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE5sgetnEPcl'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE5sputcEc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE5sputnEPKcl'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE5uflowEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE6sbumpcEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE6setbufEPcl'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE6snextcEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE6xsgetnEPcl'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE6xsputnEPKcl'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE7pubsyncEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE7seekoffExNS_8ios_base7seekdirEj'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE7seekposENS_4fposI11__mbstate_tEEj'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE7sungetcEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE8in_availEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE8overflowEi'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE8pubimbueERKNS_6localeE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE9pbackfailEi'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE9pubsetbufEPcl'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE9showmanycEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE9sputbackcEc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE9underflowEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEEC1ERKS3_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEEC1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEEC2ERKS3_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEEC2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEED0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEED1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEED2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEEaSERKS3_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE10pubseekoffExNS_8ios_base7seekdirEj'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE10pubseekposENS_4fposI11__mbstate_tEEj'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE4setgEPwS4_S4_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE4setpEPwS4_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE4swapERS3_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE4syncEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE5gbumpEi'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE5imbueERKNS_6localeE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE5pbumpEi'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE5sgetcEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE5sgetnEPwl'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE5sputcEw'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE5sputnEPKwl'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE5uflowEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE6sbumpcEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE6setbufEPwl'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE6snextcEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE6xsgetnEPwl'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE6xsputnEPKwl'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE7pubsyncEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE7seekoffExNS_8ios_base7seekdirEj'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE7seekposENS_4fposI11__mbstate_tEEj'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE7sungetcEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE8in_availEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE8overflowEi'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE8pubimbueERKNS_6localeE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE9pbackfailEi'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE9pubsetbufEPwl'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE9showmanycEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE9sputbackcEw'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE9underflowEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEEC1ERKS3_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEEC1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEEC2ERKS3_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEEC2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEED0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEED1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEED2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEEaSERKS3_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115future_categoryEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115numpunct_bynameIcE6__initEPKc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115numpunct_bynameIcEC1EPKcm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115numpunct_bynameIcEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115numpunct_bynameIcEC2EPKcm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115numpunct_bynameIcEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115numpunct_bynameIcED0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115numpunct_bynameIcED1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115numpunct_bynameIcED2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115numpunct_bynameIwE6__initEPKc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115numpunct_bynameIwEC1EPKcm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115numpunct_bynameIwEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115numpunct_bynameIwEC2EPKcm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115numpunct_bynameIwEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115numpunct_bynameIwED0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115numpunct_bynameIwED1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115numpunct_bynameIwED2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115recursive_mutex4lockEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115recursive_mutex6unlockEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115recursive_mutex8try_lockEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115recursive_mutexC1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115recursive_mutexC2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115recursive_mutexD1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115recursive_mutexD2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__115system_categoryEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__116__check_groupingERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPjS8_Rj'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__116__narrow_to_utf8ILm16EED0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__116__narrow_to_utf8ILm16EED1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__116__narrow_to_utf8ILm16EED2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__116__narrow_to_utf8ILm32EED0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__116__narrow_to_utf8ILm32EED1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__116__narrow_to_utf8ILm32EED2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__116generic_categoryEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__117__assoc_sub_state10__sub_waitERNS_11unique_lockINS_5mutexEEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__117__assoc_sub_state12__make_readyEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__117__assoc_sub_state13set_exceptionESt13exception_ptr'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__117__assoc_sub_state16__on_zero_sharedEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__117__assoc_sub_state24set_value_at_thread_exitEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__117__assoc_sub_state28set_exception_at_thread_exitESt13exception_ptr'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__117__assoc_sub_state4copyEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__117__assoc_sub_state4waitEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__117__assoc_sub_state9__executeEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__117__assoc_sub_state9set_valueEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__117__widen_from_utf8ILm16EED0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__117__widen_from_utf8ILm16EED1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__117__widen_from_utf8ILm16EED2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__117__widen_from_utf8ILm32EED0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__117__widen_from_utf8ILm32EED1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__117__widen_from_utf8ILm32EED2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__117declare_reachableEPv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__117iostream_categoryEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__117moneypunct_bynameIcLb0EE4initEPKc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__117moneypunct_bynameIcLb1EE4initEPKc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__117moneypunct_bynameIwLb0EE4initEPKc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__117moneypunct_bynameIwLb1EE4initEPKc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__118__time_get_storageIcE4initERKNS_5ctypeIcEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__118__time_get_storageIcE9__analyzeEcRKNS_5ctypeIcEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__118__time_get_storageIcEC1EPKc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__118__time_get_storageIcEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__118__time_get_storageIcEC2EPKc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__118__time_get_storageIcEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__118__time_get_storageIwE4initERKNS_5ctypeIwEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__118__time_get_storageIwE9__analyzeEcRKNS_5ctypeIwEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__118__time_get_storageIwEC1EPKc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__118__time_get_storageIwEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__118__time_get_storageIwEC2EPKc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__118__time_get_storageIwEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__118condition_variable10notify_allEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__118condition_variable10notify_oneEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__118condition_variable15__do_timed_waitERNS_11unique_lockINS_5mutexEEENS_6chrono10time_pointINS5_12system_clockENS5_8durationIxNS_5ratioILl1ELl1000000000EEEEEEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__118condition_variable4waitERNS_11unique_lockINS_5mutexEEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__118condition_variableD1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__118condition_variableD2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__118get_pointer_safetyEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__118shared_timed_mutex11lock_sharedEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__118shared_timed_mutex13unlock_sharedEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__118shared_timed_mutex15try_lock_sharedEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__118shared_timed_mutex4lockEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__118shared_timed_mutex6unlockEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__118shared_timed_mutex8try_lockEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__118shared_timed_mutexC1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__118shared_timed_mutexC2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__119__shared_mutex_base11lock_sharedEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__119__shared_mutex_base13unlock_sharedEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__119__shared_mutex_base15try_lock_sharedEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__119__shared_mutex_base4lockEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__119__shared_mutex_base6unlockEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__119__shared_mutex_base8try_lockEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__119__shared_mutex_baseC1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__119__shared_mutex_baseC2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__119__shared_weak_count10__add_weakEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__119__shared_weak_count12__add_sharedEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__119__shared_weak_count14__release_weakEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__119__shared_weak_count16__release_sharedEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__119__shared_weak_count4lockEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__119__shared_weak_countD0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__119__shared_weak_countD1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__119__shared_weak_countD2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__119__thread_local_dataEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__119declare_no_pointersEPcm'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__119piecewise_constructE', 'size': 0} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__120__get_collation_nameEPKc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__120__throw_system_errorEiPKc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__121__throw_runtime_errorEPKc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__121__undeclare_reachableEPv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__121recursive_timed_mutex4lockEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__121recursive_timed_mutex6unlockEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__121recursive_timed_mutex8try_lockEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__121recursive_timed_mutexC1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__121recursive_timed_mutexC2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__121recursive_timed_mutexD1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__121recursive_timed_mutexD2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__121undeclare_no_pointersEPcm'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__123__libcpp_debug_functionE', 'size': 0} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__124__libcpp_debug_exceptionC1ERKNS_19__libcpp_debug_infoE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__124__libcpp_debug_exceptionC1ERKS0_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__124__libcpp_debug_exceptionC1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__124__libcpp_debug_exceptionC2ERKNS_19__libcpp_debug_infoE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__124__libcpp_debug_exceptionC2ERKS0_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__124__libcpp_debug_exceptionC2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__124__libcpp_debug_exceptionD0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__124__libcpp_debug_exceptionD1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__124__libcpp_debug_exceptionD2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__125notify_all_at_thread_exitERNS_18condition_variableENS_11unique_lockINS_5mutexEEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIaaEEPaEEbT0_S5_T_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIccEEPcEEbT0_S5_T_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIddEEPdEEbT0_S5_T_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIeeEEPeEEbT0_S5_T_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIffEEPfEEbT0_S5_T_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIhhEEPhEEbT0_S5_T_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIiiEEPiEEbT0_S5_T_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIjjEEPjEEbT0_S5_T_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIllEEPlEEbT0_S5_T_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__127__insertion_sort_incompleteIRNS_6__lessImmEEPmEEbT0_S5_T_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIssEEPsEEbT0_S5_T_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIttEEPtEEbT0_S5_T_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIwwEEPwEEbT0_S5_T_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIxxEEPxEEbT0_S5_T_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIyyEEPyEEbT0_S5_T_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__127__libcpp_set_debug_functionEPFvRKNS_19__libcpp_debug_infoEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__129__libcpp_abort_debug_functionERKNS_19__libcpp_debug_infoE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__129__libcpp_throw_debug_functionERKNS_19__libcpp_debug_infoE'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__13cinE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__14cerrE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__14clogE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__14coutE', 'size': 0} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__14stodERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__14stodERKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEEPm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__14stofERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__14stofERKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEEPm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__14stoiERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPmi'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__14stoiERKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEEPmi'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__14stolERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPmi'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__14stolERKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEEPmi'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__14wcinE', 'size': 0} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__15alignEmmRPvRm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__15ctypeIcE13classic_tableEv'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__15ctypeIcE2idE', 'size': 0} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__15ctypeIcEC1EPKjbm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__15ctypeIcEC2EPKjbm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__15ctypeIcED0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__15ctypeIcED1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__15ctypeIcED2Ev'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__15ctypeIwE2idE', 'size': 0} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__15ctypeIwED0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__15ctypeIwED1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__15ctypeIwED2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__15mutex4lockEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__15mutex6unlockEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__15mutex8try_lockEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__15mutexD1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__15mutexD2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__15stoldERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__15stoldERKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEEPm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__15stollERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPmi'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__15stollERKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEEPmi'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__15stoulERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPmi'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__15stoulERKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEEPmi'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__15wcerrE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__15wclogE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__15wcoutE', 'size': 0} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16__itoa8__u32toaEjPc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16__itoa8__u64toaEyPc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16__sortIRNS_6__lessIaaEEPaEEvT0_S5_T_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16__sortIRNS_6__lessIccEEPcEEvT0_S5_T_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16__sortIRNS_6__lessIddEEPdEEvT0_S5_T_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16__sortIRNS_6__lessIeeEEPeEEvT0_S5_T_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16__sortIRNS_6__lessIffEEPfEEvT0_S5_T_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16__sortIRNS_6__lessIhhEEPhEEvT0_S5_T_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16__sortIRNS_6__lessIiiEEPiEEvT0_S5_T_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16__sortIRNS_6__lessIjjEEPjEEvT0_S5_T_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16__sortIRNS_6__lessIllEEPlEEvT0_S5_T_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16__sortIRNS_6__lessImmEEPmEEvT0_S5_T_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16__sortIRNS_6__lessIssEEPsEEvT0_S5_T_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16__sortIRNS_6__lessIttEEPtEEvT0_S5_T_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16__sortIRNS_6__lessIwwEEPwEEvT0_S5_T_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16__sortIRNS_6__lessIxxEEPxEEvT0_S5_T_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16__sortIRNS_6__lessIyyEEPyEEvT0_S5_T_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16chrono12steady_clock3nowEv'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__16chrono12steady_clock9is_steadyE', 'size': 0} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16chrono12system_clock11from_time_tEl'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16chrono12system_clock3nowEv'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__16chrono12system_clock9is_steadyE', 'size': 0} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16chrono12system_clock9to_time_tERKNS0_10time_pointIS1_NS0_8durationIxNS_5ratioILl1ELl1000000EEEEEEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16futureIvE3getEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16futureIvEC1EPNS_17__assoc_sub_stateE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16futureIvEC2EPNS_17__assoc_sub_stateE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16futureIvED1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16futureIvED2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16gslice6__initEm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16locale14__install_ctorERKS0_PNS0_5facetEl'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16locale2id5__getEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16locale2id6__initEv'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__16locale2id9__next_idE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__16locale3allE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__16locale4noneE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__16locale4timeE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__16locale5ctypeE', 'size': 0} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16locale5facet16__on_zero_sharedEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16locale5facetD0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16locale5facetD1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16locale5facetD2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16locale6globalERKS0_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16locale7classicEv'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__16locale7collateE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__16locale7numericE', 'size': 0} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16locale8__globalEv'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__16locale8messagesE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__16locale8monetaryE', 'size': 0} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16localeC1EPKc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16localeC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16localeC1ERKS0_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16localeC1ERKS0_PKci'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16localeC1ERKS0_RKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEi'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16localeC1ERKS0_S2_i'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16localeC1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16localeC2EPKc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16localeC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16localeC2ERKS0_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16localeC2ERKS0_PKci'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16localeC2ERKS0_RKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEi'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16localeC2ERKS0_S2_i'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16localeC2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16localeD1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16localeD2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16localeaSERKS0_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16stoullERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPmi'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16stoullERKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEEPmi'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16thread20hardware_concurrencyEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16thread4joinEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16thread6detachEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16threadD1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__16threadD2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__17__sort5IRNS_6__lessIeeEEPeEEjT0_S5_S5_S5_S5_T_'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__17codecvtIDic11__mbstate_tE2idE', 'size': 0} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__17codecvtIDic11__mbstate_tED0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__17codecvtIDic11__mbstate_tED1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__17codecvtIDic11__mbstate_tED2Ev'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__17codecvtIDsc11__mbstate_tE2idE', 'size': 0} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__17codecvtIDsc11__mbstate_tED0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__17codecvtIDsc11__mbstate_tED1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__17codecvtIDsc11__mbstate_tED2Ev'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__17codecvtIcc11__mbstate_tE2idE', 'size': 0} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__17codecvtIcc11__mbstate_tED0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__17codecvtIcc11__mbstate_tED1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__17codecvtIcc11__mbstate_tED2Ev'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__17codecvtIwc11__mbstate_tE2idE', 'size': 0} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__17codecvtIwc11__mbstate_tEC1EPKcm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__17codecvtIwc11__mbstate_tEC1Em'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__17codecvtIwc11__mbstate_tEC2EPKcm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__17codecvtIwc11__mbstate_tEC2Em'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__17codecvtIwc11__mbstate_tED0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__17codecvtIwc11__mbstate_tED1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__17codecvtIwc11__mbstate_tED2Ev'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__17collateIcE2idE', 'size': 0} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__17collateIcED0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__17collateIcED1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__17collateIcED2Ev'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__17collateIwE2idE', 'size': 0} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__17collateIwED0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__17collateIwED1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__17collateIwED2Ev'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE2idE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE2idE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE2idE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE2idE', 'size': 0} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__17promiseIvE10get_futureEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__17promiseIvE13set_exceptionESt13exception_ptr'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__17promiseIvE24set_value_at_thread_exitEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__17promiseIvE28set_exception_at_thread_exitESt13exception_ptr'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__17promiseIvE9set_valueEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__17promiseIvEC1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__17promiseIvEC2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__17promiseIvED1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__17promiseIvED2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18__c_node5__addEPNS_8__i_nodeE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18__c_nodeD0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18__c_nodeD1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18__c_nodeD2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18__get_dbEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18__i_nodeD1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18__i_nodeD2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18__rs_getEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18__sp_mut4lockEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18__sp_mut6unlockEv'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__18ios_base10floatfieldE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__18ios_base10scientificE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__18ios_base11adjustfieldE', 'size': 0} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18ios_base15sync_with_stdioEb'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18ios_base16__call_callbacksENS0_5eventE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18ios_base17register_callbackEPFvNS0_5eventERS0_iEi'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__18ios_base2inE', 'size': 0} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18ios_base33__set_badbit_and_consider_rethrowEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18ios_base34__set_failbit_and_consider_rethrowEv'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__18ios_base3appE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__18ios_base3ateE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__18ios_base3decE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__18ios_base3hexE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__18ios_base3octE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__18ios_base3outE', 'size': 0} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18ios_base4InitC1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18ios_base4InitC2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18ios_base4InitD1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18ios_base4InitD2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18ios_base4initEPv'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__18ios_base4leftE', 'size': 0} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18ios_base4moveERS0_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18ios_base4swapERS0_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18ios_base5clearEj'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__18ios_base5fixedE', 'size': 0} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18ios_base5imbueERKNS_6localeE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18ios_base5iwordEi'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18ios_base5pwordEi'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__18ios_base5rightE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__18ios_base5truncE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__18ios_base6badbitE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__18ios_base6binaryE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__18ios_base6eofbitE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__18ios_base6skipwsE', 'size': 0} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18ios_base6xallocEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18ios_base7copyfmtERKS0_'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__18ios_base7failbitE', 'size': 0} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18ios_base7failureC1EPKcRKNS_10error_codeE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18ios_base7failureC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERKNS_10error_codeE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18ios_base7failureC2EPKcRKNS_10error_codeE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18ios_base7failureC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERKNS_10error_codeE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18ios_base7failureD0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18ios_base7failureD1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18ios_base7failureD2Ev'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__18ios_base7goodbitE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__18ios_base7showposE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__18ios_base7unitbufE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__18ios_base8internalE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__18ios_base8showbaseE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__18ios_base9__xindex_E', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__18ios_base9basefieldE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__18ios_base9boolalphaE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__18ios_base9showpointE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__18ios_base9uppercaseE', 'size': 0} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18ios_baseD0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18ios_baseD1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18ios_baseD2Ev'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__18messagesIcE2idE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__18messagesIwE2idE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__18numpunctIcE2idE', 'size': 0} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18numpunctIcEC1Em'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18numpunctIcEC2Em'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18numpunctIcED0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18numpunctIcED1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18numpunctIcED2Ev'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__18numpunctIwE2idE', 'size': 0} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18numpunctIwEC1Em'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18numpunctIwEC2Em'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18numpunctIwED0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18numpunctIwED1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18numpunctIwED2Ev'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE2idE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE2idE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__18time_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE2idE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__18time_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE2idE', 'size': 0} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18valarrayImE6resizeEmm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18valarrayImEC1Em'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18valarrayImEC2Em'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18valarrayImED1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__18valarrayImED2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__19__num_getIcE17__stage2_int_loopEciPcRS2_RjcRKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPjRSD_S2_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__19__num_getIcE17__stage2_int_prepERNS_8ios_baseEPcRc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__19__num_getIcE19__stage2_float_loopEcRbRcPcRS4_ccRKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPjRSE_RjS4_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__19__num_getIcE19__stage2_float_prepERNS_8ios_baseEPcRcS5_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__19__num_getIwE17__stage2_int_loopEwiPcRS2_RjwRKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPjRSD_Pw'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__19__num_getIwE17__stage2_int_prepERNS_8ios_baseEPwRw'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__19__num_getIwE19__stage2_float_loopEwRbRcPcRS4_wwRKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPjRSE_RjPw'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__19__num_getIwE19__stage2_float_prepERNS_8ios_baseEPwRwS5_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__19__num_putIcE21__widen_and_group_intEPcS2_S2_S2_RS2_S3_RKNS_6localeE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__19__num_putIcE23__widen_and_group_floatEPcS2_S2_S2_RS2_S3_RKNS_6localeE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__19__num_putIwE21__widen_and_group_intEPcS2_S2_PwRS3_S4_RKNS_6localeE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__19__num_putIwE23__widen_and_group_floatEPcS2_S2_PwRS3_S4_RKNS_6localeE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__19basic_iosIcNS_11char_traitsIcEEE7copyfmtERKS3_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__19basic_iosIcNS_11char_traitsIcEEED0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__19basic_iosIcNS_11char_traitsIcEEED1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__19basic_iosIcNS_11char_traitsIcEEED2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__19basic_iosIwNS_11char_traitsIwEEE7copyfmtERKS3_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__19basic_iosIwNS_11char_traitsIwEEED0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__19basic_iosIwNS_11char_traitsIwEEED1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__19basic_iosIwNS_11char_traitsIwEEED2Ev'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__19money_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE2idE', 'size': 0} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__19money_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE8__do_getERS4_S4_bRKNS_6localeEjRjRbRKNS_5ctypeIcEERNS_10unique_ptrIcPFvPvEEERPcSM_'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__19money_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE2idE', 'size': 0} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__19money_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE8__do_getERS4_S4_bRKNS_6localeEjRjRbRKNS_5ctypeIwEERNS_10unique_ptrIwPFvPvEEERPwSM_'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__19money_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE2idE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__19money_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE2idE', 'size': 0} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__19strstreamD0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__19strstreamD1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__19strstreamD2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__19to_stringEd'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__19to_stringEe'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__19to_stringEf'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__19to_stringEi'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__19to_stringEj'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__19to_stringEl'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__19to_stringEm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__19to_stringEx'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__19to_stringEy'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__1plIcNS_11char_traitsIcEENS_9allocatorIcEEEENS_12basic_stringIT_T0_T1_EEPKS6_RKS9_'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt8bad_castC1Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt8bad_castC1Ev'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt8bad_castC2Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt8bad_castC2Ev'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt8bad_castD0Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt8bad_castD0Ev'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt8bad_castD1Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt8bad_castD1Ev'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt8bad_castD2Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt8bad_castD2Ev'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt9bad_allocC1Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt9bad_allocC1Ev'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt9bad_allocC2Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt9bad_allocC2Ev'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt9bad_allocD0Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt9bad_allocD0Ev'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt9bad_allocD1Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt9bad_allocD1Ev'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt9bad_allocD2Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt9bad_allocD2Ev'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt9exceptionD0Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt9exceptionD0Ev'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt9exceptionD1Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt9exceptionD1Ev'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt9exceptionD2Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt9exceptionD2Ev'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt9type_infoD0Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt9type_infoD0Ev'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt9type_infoD1Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt9type_infoD1Ev'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt9type_infoD2Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt9type_infoD2Ev'} -{'type': 'U', 'is_defined': False, 'name': '__ZSt10unexpectedv'} -{'type': 'I', 'is_defined': True, 'name': '__ZSt10unexpectedv'} -{'type': 'U', 'is_defined': False, 'name': '__ZSt13get_terminatev'} -{'type': 'I', 'is_defined': True, 'name': '__ZSt13get_terminatev'} -{'type': 'U', 'is_defined': False, 'name': '__ZSt13set_terminatePFvvE'} -{'type': 'I', 'is_defined': True, 'name': '__ZSt13set_terminatePFvvE'} -{'type': 'U', 'is_defined': False, 'name': '__ZSt14get_unexpectedv'} -{'type': 'I', 'is_defined': True, 'name': '__ZSt14get_unexpectedv'} -{'type': 'U', 'is_defined': False, 'name': '__ZSt14set_unexpectedPFvvE'} -{'type': 'I', 'is_defined': True, 'name': '__ZSt14set_unexpectedPFvvE'} -{'type': 'U', 'is_defined': False, 'name': '__ZSt15get_new_handlerv'} -{'type': 'I', 'is_defined': True, 'name': '__ZSt15get_new_handlerv'} -{'type': 'U', 'is_defined': False, 'name': '__ZSt15set_new_handlerPFvvE'} -{'type': 'I', 'is_defined': True, 'name': '__ZSt15set_new_handlerPFvvE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZSt17__throw_bad_allocv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZSt17current_exceptionv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZSt17rethrow_exceptionSt13exception_ptr'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZSt18uncaught_exceptionv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZSt19uncaught_exceptionsv'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZSt7nothrow', 'size': 0} -{'type': 'U', 'is_defined': False, 'name': '__ZSt9terminatev'} -{'type': 'I', 'is_defined': True, 'name': '__ZSt9terminatev'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTCNSt3__110istrstreamE0_NS_13basic_istreamIcNS_11char_traitsIcEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTCNSt3__110ostrstreamE0_NS_13basic_ostreamIcNS_11char_traitsIcEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTCNSt3__114basic_iostreamIcNS_11char_traitsIcEEEE0_NS_13basic_istreamIcS2_EE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTCNSt3__114basic_iostreamIcNS_11char_traitsIcEEEE16_NS_13basic_ostreamIcS2_EE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTCNSt3__19strstreamE0_NS_13basic_istreamIcNS_11char_traitsIcEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTCNSt3__19strstreamE0_NS_14basic_iostreamIcNS_11char_traitsIcEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTCNSt3__19strstreamE16_NS_13basic_ostreamIcNS_11char_traitsIcEEEE', 'size': 0} -{'type': 'U', 'is_defined': False, 'name': '__ZTIDi'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIDi'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIDn'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIDn'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIDs'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIDs'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt12experimental15fundamentals_v112bad_any_castE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt12experimental19bad_optional_accessE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__110__time_getE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__110__time_putE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__110ctype_baseE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__110istrstreamE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__110money_baseE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__110moneypunctIcLb0EEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__110moneypunctIcLb1EEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__110moneypunctIwLb0EEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__110moneypunctIwLb1EEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__110ostrstreamE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__111__money_getIcEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__111__money_getIwEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__111__money_putIcEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__111__money_putIwEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__111regex_errorE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__112bad_weak_ptrE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__112codecvt_baseE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__112ctype_bynameIcEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__112ctype_bynameIwEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__112future_errorE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__112strstreambufE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__112system_errorE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__113basic_istreamIcNS_11char_traitsIcEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__113basic_istreamIwNS_11char_traitsIwEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__113basic_ostreamIcNS_11char_traitsIcEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__113basic_ostreamIwNS_11char_traitsIwEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__113messages_baseE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__114__codecvt_utf8IDiEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__114__codecvt_utf8IDsEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__114__codecvt_utf8IwEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__114__num_get_baseE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__114__num_put_baseE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__114__shared_countE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__114basic_iostreamIcNS_11char_traitsIcEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__114codecvt_bynameIDic11__mbstate_tEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__114codecvt_bynameIDsc11__mbstate_tEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__114codecvt_bynameIcc11__mbstate_tEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__114codecvt_bynameIwc11__mbstate_tEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__114collate_bynameIcEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__114collate_bynameIwEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__114error_categoryE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__115__codecvt_utf16IDiLb0EEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__115__codecvt_utf16IDiLb1EEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__115__codecvt_utf16IDsLb0EEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__115__codecvt_utf16IDsLb1EEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__115__codecvt_utf16IwLb0EEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__115__codecvt_utf16IwLb1EEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__115basic_streambufIcNS_11char_traitsIcEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__115basic_streambufIwNS_11char_traitsIwEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__115messages_bynameIcEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__115messages_bynameIwEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__115numpunct_bynameIcEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__115numpunct_bynameIwEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__115time_get_bynameIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__115time_get_bynameIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__115time_put_bynameIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__115time_put_bynameIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__116__narrow_to_utf8ILm16EEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__116__narrow_to_utf8ILm32EEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__117__assoc_sub_stateE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__117__widen_from_utf8ILm16EEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__117__widen_from_utf8ILm32EEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__117moneypunct_bynameIcLb0EEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__117moneypunct_bynameIcLb1EEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__117moneypunct_bynameIwLb0EEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__117moneypunct_bynameIwLb1EEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__118__time_get_storageIcEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__118__time_get_storageIwEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__119__shared_weak_countE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__120__codecvt_utf8_utf16IDiEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__120__codecvt_utf8_utf16IDsEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__120__codecvt_utf8_utf16IwEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__120__time_get_c_storageIcEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__120__time_get_c_storageIwEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__124__libcpp_debug_exceptionE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__15ctypeIcEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__15ctypeIwEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__16locale5facetE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__17codecvtIDic11__mbstate_tEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__17codecvtIDsc11__mbstate_tEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__17codecvtIcc11__mbstate_tEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__17codecvtIwc11__mbstate_tEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__17collateIcEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__17collateIwEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__18__c_nodeE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__18ios_base7failureE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__18ios_baseE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__18messagesIcEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__18messagesIwEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__18numpunctIcEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__18numpunctIwEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__18time_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__18time_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__19__num_getIcEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__19__num_getIwEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__19__num_putIcEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__19__num_putIwEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__19basic_iosIcNS_11char_traitsIcEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__19basic_iosIwNS_11char_traitsIwEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__19money_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__19money_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__19money_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__19money_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__19strstreamE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__19time_baseE', 'size': 0} -{'type': 'U', 'is_defined': False, 'name': '__ZTIPDi'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIPDi'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIPDn'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIPDn'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIPDs'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIPDs'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIPKDi'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIPKDi'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIPKDn'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIPKDn'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIPKDs'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIPKDs'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIPKa'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIPKa'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIPKb'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIPKb'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIPKc'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIPKc'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIPKd'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIPKd'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIPKe'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIPKe'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIPKf'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIPKf'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIPKh'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIPKh'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIPKi'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIPKi'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIPKj'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIPKj'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIPKl'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIPKl'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIPKm'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIPKm'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIPKs'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIPKs'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIPKt'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIPKt'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIPKv'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIPKv'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIPKw'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIPKw'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIPKx'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIPKx'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIPKy'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIPKy'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIPa'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIPa'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIPb'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIPb'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIPc'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIPc'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIPd'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIPd'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIPe'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIPe'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIPf'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIPf'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIPh'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIPh'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIPi'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIPi'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIPj'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIPj'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIPl'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIPl'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIPm'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIPm'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIPs'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIPs'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIPt'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIPt'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIPv'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIPv'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIPw'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIPw'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIPx'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIPx'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIPy'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIPy'} -{'type': 'U', 'is_defined': False, 'name': '__ZTISt10bad_typeid'} -{'type': 'I', 'is_defined': True, 'name': '__ZTISt10bad_typeid'} -{'type': 'U', 'is_defined': False, 'name': '__ZTISt11logic_error'} -{'type': 'I', 'is_defined': True, 'name': '__ZTISt11logic_error'} -{'type': 'U', 'is_defined': False, 'name': '__ZTISt11range_error'} -{'type': 'I', 'is_defined': True, 'name': '__ZTISt11range_error'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTISt12bad_any_cast', 'size': 0} -{'type': 'U', 'is_defined': False, 'name': '__ZTISt12domain_error'} -{'type': 'I', 'is_defined': True, 'name': '__ZTISt12domain_error'} -{'type': 'U', 'is_defined': False, 'name': '__ZTISt12length_error'} -{'type': 'I', 'is_defined': True, 'name': '__ZTISt12length_error'} -{'type': 'U', 'is_defined': False, 'name': '__ZTISt12out_of_range'} -{'type': 'I', 'is_defined': True, 'name': '__ZTISt12out_of_range'} -{'type': 'U', 'is_defined': False, 'name': '__ZTISt13bad_exception'} -{'type': 'I', 'is_defined': True, 'name': '__ZTISt13bad_exception'} -{'type': 'U', 'is_defined': False, 'name': '__ZTISt13runtime_error'} -{'type': 'I', 'is_defined': True, 'name': '__ZTISt13runtime_error'} -{'type': 'U', 'is_defined': False, 'name': '__ZTISt14overflow_error'} -{'type': 'I', 'is_defined': True, 'name': '__ZTISt14overflow_error'} -{'type': 'U', 'is_defined': False, 'name': '__ZTISt15underflow_error'} -{'type': 'I', 'is_defined': True, 'name': '__ZTISt15underflow_error'} -{'type': 'U', 'is_defined': False, 'name': '__ZTISt16invalid_argument'} -{'type': 'I', 'is_defined': True, 'name': '__ZTISt16invalid_argument'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTISt16nested_exception', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTISt18bad_variant_access', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTISt19bad_optional_access', 'size': 0} -{'type': 'U', 'is_defined': False, 'name': '__ZTISt20bad_array_new_length'} -{'type': 'I', 'is_defined': True, 'name': '__ZTISt20bad_array_new_length'} -{'type': 'U', 'is_defined': False, 'name': '__ZTISt8bad_cast'} -{'type': 'I', 'is_defined': True, 'name': '__ZTISt8bad_cast'} -{'type': 'U', 'is_defined': False, 'name': '__ZTISt9bad_alloc'} -{'type': 'I', 'is_defined': True, 'name': '__ZTISt9bad_alloc'} -{'type': 'U', 'is_defined': False, 'name': '__ZTISt9exception'} -{'type': 'I', 'is_defined': True, 'name': '__ZTISt9exception'} -{'type': 'U', 'is_defined': False, 'name': '__ZTISt9type_info'} -{'type': 'I', 'is_defined': True, 'name': '__ZTISt9type_info'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIa'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIa'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIb'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIb'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIc'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIc'} -{'type': 'U', 'is_defined': False, 'name': '__ZTId'} -{'type': 'I', 'is_defined': True, 'name': '__ZTId'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIe'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIe'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIf'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIf'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIh'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIh'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIi'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIi'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIj'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIj'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIl'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIl'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIm'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIm'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIs'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIs'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIt'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIt'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIv'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIv'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIw'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIw'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIx'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIx'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIy'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIy'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSDi'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSDi'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSDn'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSDn'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSDs'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSDs'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSN10__cxxabiv116__enum_type_infoE'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSN10__cxxabiv116__enum_type_infoE'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSN10__cxxabiv117__array_type_infoE'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSN10__cxxabiv117__array_type_infoE'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSN10__cxxabiv117__class_type_infoE'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSN10__cxxabiv117__class_type_infoE'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSN10__cxxabiv117__pbase_type_infoE'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSN10__cxxabiv117__pbase_type_infoE'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSN10__cxxabiv119__pointer_type_infoE'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSN10__cxxabiv119__pointer_type_infoE'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSN10__cxxabiv120__function_type_infoE'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSN10__cxxabiv120__function_type_infoE'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSN10__cxxabiv120__si_class_type_infoE'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSN10__cxxabiv120__si_class_type_infoE'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSN10__cxxabiv121__vmi_class_type_infoE'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSN10__cxxabiv121__vmi_class_type_infoE'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSN10__cxxabiv123__fundamental_type_infoE'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSN10__cxxabiv123__fundamental_type_infoE'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSN10__cxxabiv129__pointer_to_member_type_infoE'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSN10__cxxabiv129__pointer_to_member_type_infoE'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt12experimental15fundamentals_v112bad_any_castE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt12experimental19bad_optional_accessE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__110ctype_baseE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__110istrstreamE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__110money_baseE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__110moneypunctIcLb0EEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__110moneypunctIcLb1EEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__110moneypunctIwLb0EEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__110moneypunctIwLb1EEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__110ostrstreamE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__111regex_errorE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__112bad_weak_ptrE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__112codecvt_baseE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__112ctype_bynameIcEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__112ctype_bynameIwEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__112future_errorE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__112strstreambufE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__112system_errorE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__113basic_istreamIcNS_11char_traitsIcEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__113basic_istreamIwNS_11char_traitsIwEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__113basic_ostreamIcNS_11char_traitsIcEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__113basic_ostreamIwNS_11char_traitsIwEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__113messages_baseE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__114basic_iostreamIcNS_11char_traitsIcEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__114collate_bynameIcEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__114collate_bynameIwEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__114error_categoryE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__115basic_streambufIcNS_11char_traitsIcEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__115basic_streambufIwNS_11char_traitsIwEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__115messages_bynameIcEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__115messages_bynameIwEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__115numpunct_bynameIcEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__115numpunct_bynameIwEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__115time_get_bynameIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__115time_get_bynameIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__115time_put_bynameIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__115time_put_bynameIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__117moneypunct_bynameIcLb0EEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__117moneypunct_bynameIcLb1EEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__117moneypunct_bynameIwLb0EEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__117moneypunct_bynameIwLb1EEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__15ctypeIcEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__15ctypeIwEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__16locale5facetE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__17codecvtIDic11__mbstate_tEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__17codecvtIDsc11__mbstate_tEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__17codecvtIcc11__mbstate_tEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__17codecvtIwc11__mbstate_tEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__17collateIcEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__17collateIwEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__18__c_nodeE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__18ios_base7failureE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__18ios_baseE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__18messagesIcEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__18messagesIwEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__18numpunctIcEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__18numpunctIwEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__18time_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__18time_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__19__num_getIcEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__19__num_getIwEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__19__num_putIcEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__19__num_putIwEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__19basic_iosIcNS_11char_traitsIcEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__19basic_iosIwNS_11char_traitsIwEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__19money_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__19money_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__19money_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__19money_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__19strstreamE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__19time_baseE', 'size': 0} -{'type': 'U', 'is_defined': False, 'name': '__ZTSPDi'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSPDi'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSPDn'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSPDn'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSPDs'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSPDs'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSPKDi'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSPKDi'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSPKDn'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSPKDn'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSPKDs'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSPKDs'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSPKa'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSPKa'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSPKb'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSPKb'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSPKc'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSPKc'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSPKd'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSPKd'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSPKe'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSPKe'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSPKf'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSPKf'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSPKh'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSPKh'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSPKi'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSPKi'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSPKj'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSPKj'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSPKl'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSPKl'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSPKm'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSPKm'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSPKs'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSPKs'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSPKt'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSPKt'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSPKv'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSPKv'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSPKw'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSPKw'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSPKx'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSPKx'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSPKy'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSPKy'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSPa'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSPa'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSPb'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSPb'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSPc'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSPc'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSPd'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSPd'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSPe'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSPe'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSPf'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSPf'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSPh'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSPh'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSPi'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSPi'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSPj'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSPj'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSPl'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSPl'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSPm'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSPm'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSPs'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSPs'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSPt'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSPt'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSPv'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSPv'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSPw'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSPw'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSPx'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSPx'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSPy'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSPy'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSSt10bad_typeid'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSSt10bad_typeid'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSSt11logic_error'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSSt11logic_error'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSSt11range_error'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSSt11range_error'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSSt12bad_any_cast', 'size': 0} -{'type': 'U', 'is_defined': False, 'name': '__ZTSSt12domain_error'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSSt12domain_error'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSSt12length_error'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSSt12length_error'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSSt12out_of_range'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSSt12out_of_range'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSSt13bad_exception'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSSt13bad_exception'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSSt13runtime_error'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSSt13runtime_error'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSSt14overflow_error'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSSt14overflow_error'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSSt15underflow_error'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSSt15underflow_error'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSSt16invalid_argument'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSSt16invalid_argument'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSSt16nested_exception', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSSt18bad_variant_access', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSSt19bad_optional_access', 'size': 0} -{'type': 'U', 'is_defined': False, 'name': '__ZTSSt20bad_array_new_length'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSSt20bad_array_new_length'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSSt8bad_cast'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSSt8bad_cast'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSSt9bad_alloc'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSSt9bad_alloc'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSSt9exception'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSSt9exception'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSSt9type_info'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSSt9type_info'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSa'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSa'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSb'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSb'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSc'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSc'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSd'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSd'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSe'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSe'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSf'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSf'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSh'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSh'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSi'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSi'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSj'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSj'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSl'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSl'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSm'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSm'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSs'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSs'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSt'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSt'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSv'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSv'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSw'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSw'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSx'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSx'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSy'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSy'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTTNSt3__110istrstreamE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTTNSt3__110ostrstreamE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTTNSt3__113basic_istreamIcNS_11char_traitsIcEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTTNSt3__113basic_istreamIwNS_11char_traitsIwEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTTNSt3__113basic_ostreamIcNS_11char_traitsIcEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTTNSt3__113basic_ostreamIwNS_11char_traitsIwEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTTNSt3__114basic_iostreamIcNS_11char_traitsIcEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTTNSt3__19strstreamE', 'size': 0} -{'type': 'U', 'is_defined': False, 'name': '__ZTVN10__cxxabiv116__enum_type_infoE'} -{'type': 'I', 'is_defined': True, 'name': '__ZTVN10__cxxabiv116__enum_type_infoE'} -{'type': 'U', 'is_defined': False, 'name': '__ZTVN10__cxxabiv117__array_type_infoE'} -{'type': 'I', 'is_defined': True, 'name': '__ZTVN10__cxxabiv117__array_type_infoE'} -{'type': 'U', 'is_defined': False, 'name': '__ZTVN10__cxxabiv117__class_type_infoE'} -{'type': 'I', 'is_defined': True, 'name': '__ZTVN10__cxxabiv117__class_type_infoE'} -{'type': 'U', 'is_defined': False, 'name': '__ZTVN10__cxxabiv117__pbase_type_infoE'} -{'type': 'I', 'is_defined': True, 'name': '__ZTVN10__cxxabiv117__pbase_type_infoE'} -{'type': 'U', 'is_defined': False, 'name': '__ZTVN10__cxxabiv119__pointer_type_infoE'} -{'type': 'I', 'is_defined': True, 'name': '__ZTVN10__cxxabiv119__pointer_type_infoE'} -{'type': 'U', 'is_defined': False, 'name': '__ZTVN10__cxxabiv120__function_type_infoE'} -{'type': 'I', 'is_defined': True, 'name': '__ZTVN10__cxxabiv120__function_type_infoE'} -{'type': 'U', 'is_defined': False, 'name': '__ZTVN10__cxxabiv120__si_class_type_infoE'} -{'type': 'I', 'is_defined': True, 'name': '__ZTVN10__cxxabiv120__si_class_type_infoE'} -{'type': 'U', 'is_defined': False, 'name': '__ZTVN10__cxxabiv121__vmi_class_type_infoE'} -{'type': 'I', 'is_defined': True, 'name': '__ZTVN10__cxxabiv121__vmi_class_type_infoE'} -{'type': 'U', 'is_defined': False, 'name': '__ZTVN10__cxxabiv123__fundamental_type_infoE'} -{'type': 'I', 'is_defined': True, 'name': '__ZTVN10__cxxabiv123__fundamental_type_infoE'} -{'type': 'U', 'is_defined': False, 'name': '__ZTVN10__cxxabiv129__pointer_to_member_type_infoE'} -{'type': 'I', 'is_defined': True, 'name': '__ZTVN10__cxxabiv129__pointer_to_member_type_infoE'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt12experimental15fundamentals_v112bad_any_castE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt12experimental19bad_optional_accessE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__110istrstreamE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__110moneypunctIcLb0EEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__110moneypunctIcLb1EEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__110moneypunctIwLb0EEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__110moneypunctIwLb1EEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__110ostrstreamE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__111regex_errorE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__112bad_weak_ptrE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__112ctype_bynameIcEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__112ctype_bynameIwEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__112future_errorE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__112strstreambufE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__112system_errorE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__113basic_istreamIcNS_11char_traitsIcEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__113basic_istreamIwNS_11char_traitsIwEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__113basic_ostreamIcNS_11char_traitsIcEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__113basic_ostreamIwNS_11char_traitsIwEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__114__codecvt_utf8IDiEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__114__codecvt_utf8IDsEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__114__codecvt_utf8IwEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__114__shared_countE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__114basic_iostreamIcNS_11char_traitsIcEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__114codecvt_bynameIDic11__mbstate_tEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__114codecvt_bynameIDsc11__mbstate_tEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__114codecvt_bynameIcc11__mbstate_tEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__114codecvt_bynameIwc11__mbstate_tEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__114collate_bynameIcEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__114collate_bynameIwEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__114error_categoryE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__115__codecvt_utf16IDiLb0EEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__115__codecvt_utf16IDiLb1EEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__115__codecvt_utf16IDsLb0EEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__115__codecvt_utf16IDsLb1EEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__115__codecvt_utf16IwLb0EEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__115__codecvt_utf16IwLb1EEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__115basic_streambufIcNS_11char_traitsIcEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__115basic_streambufIwNS_11char_traitsIwEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__115messages_bynameIcEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__115messages_bynameIwEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__115numpunct_bynameIcEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__115numpunct_bynameIwEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__115time_get_bynameIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__115time_get_bynameIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__115time_put_bynameIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__115time_put_bynameIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__116__narrow_to_utf8ILm16EEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__116__narrow_to_utf8ILm32EEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__117__assoc_sub_stateE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__117__widen_from_utf8ILm16EEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__117__widen_from_utf8ILm32EEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__117moneypunct_bynameIcLb0EEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__117moneypunct_bynameIcLb1EEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__117moneypunct_bynameIwLb0EEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__117moneypunct_bynameIwLb1EEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__119__shared_weak_countE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__120__codecvt_utf8_utf16IDiEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__120__codecvt_utf8_utf16IDsEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__120__codecvt_utf8_utf16IwEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__124__libcpp_debug_exceptionE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__15ctypeIcEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__15ctypeIwEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__16locale5facetE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__17codecvtIDic11__mbstate_tEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__17codecvtIDsc11__mbstate_tEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__17codecvtIcc11__mbstate_tEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__17codecvtIwc11__mbstate_tEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__17collateIcEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__17collateIwEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__18__c_nodeE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__18ios_base7failureE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__18ios_baseE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__18messagesIcEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__18messagesIwEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__18numpunctIcEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__18numpunctIwEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__18time_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__18time_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__19basic_iosIcNS_11char_traitsIcEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__19basic_iosIwNS_11char_traitsIwEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__19money_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__19money_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__19money_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__19money_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__19strstreamE', 'size': 0} -{'type': 'U', 'is_defined': False, 'name': '__ZTVSt10bad_typeid'} -{'type': 'I', 'is_defined': True, 'name': '__ZTVSt10bad_typeid'} -{'type': 'U', 'is_defined': False, 'name': '__ZTVSt11logic_error'} -{'type': 'I', 'is_defined': True, 'name': '__ZTVSt11logic_error'} -{'type': 'U', 'is_defined': False, 'name': '__ZTVSt11range_error'} -{'type': 'I', 'is_defined': True, 'name': '__ZTVSt11range_error'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVSt12bad_any_cast', 'size': 0} -{'type': 'U', 'is_defined': False, 'name': '__ZTVSt12domain_error'} -{'type': 'I', 'is_defined': True, 'name': '__ZTVSt12domain_error'} -{'type': 'U', 'is_defined': False, 'name': '__ZTVSt12length_error'} -{'type': 'I', 'is_defined': True, 'name': '__ZTVSt12length_error'} -{'type': 'U', 'is_defined': False, 'name': '__ZTVSt12out_of_range'} -{'type': 'I', 'is_defined': True, 'name': '__ZTVSt12out_of_range'} -{'type': 'U', 'is_defined': False, 'name': '__ZTVSt13bad_exception'} -{'type': 'I', 'is_defined': True, 'name': '__ZTVSt13bad_exception'} -{'type': 'U', 'is_defined': False, 'name': '__ZTVSt13runtime_error'} -{'type': 'I', 'is_defined': True, 'name': '__ZTVSt13runtime_error'} -{'type': 'U', 'is_defined': False, 'name': '__ZTVSt14overflow_error'} -{'type': 'I', 'is_defined': True, 'name': '__ZTVSt14overflow_error'} -{'type': 'U', 'is_defined': False, 'name': '__ZTVSt15underflow_error'} -{'type': 'I', 'is_defined': True, 'name': '__ZTVSt15underflow_error'} -{'type': 'U', 'is_defined': False, 'name': '__ZTVSt16invalid_argument'} -{'type': 'I', 'is_defined': True, 'name': '__ZTVSt16invalid_argument'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVSt16nested_exception', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVSt18bad_variant_access', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVSt19bad_optional_access', 'size': 0} -{'type': 'U', 'is_defined': False, 'name': '__ZTVSt20bad_array_new_length'} -{'type': 'I', 'is_defined': True, 'name': '__ZTVSt20bad_array_new_length'} -{'type': 'U', 'is_defined': False, 'name': '__ZTVSt8bad_cast'} -{'type': 'I', 'is_defined': True, 'name': '__ZTVSt8bad_cast'} -{'type': 'U', 'is_defined': False, 'name': '__ZTVSt9bad_alloc'} -{'type': 'I', 'is_defined': True, 'name': '__ZTVSt9bad_alloc'} -{'type': 'U', 'is_defined': False, 'name': '__ZTVSt9exception'} -{'type': 'I', 'is_defined': True, 'name': '__ZTVSt9exception'} -{'type': 'U', 'is_defined': False, 'name': '__ZTVSt9type_info'} -{'type': 'I', 'is_defined': True, 'name': '__ZTVSt9type_info'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZThn16_NSt3__114basic_iostreamIcNS_11char_traitsIcEEED0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZThn16_NSt3__114basic_iostreamIcNS_11char_traitsIcEEED1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZThn16_NSt3__19strstreamD0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZThn16_NSt3__19strstreamD1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZTv0_n24_NSt3__110istrstreamD0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZTv0_n24_NSt3__110istrstreamD1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZTv0_n24_NSt3__110ostrstreamD0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZTv0_n24_NSt3__110ostrstreamD1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZTv0_n24_NSt3__113basic_istreamIcNS_11char_traitsIcEEED0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZTv0_n24_NSt3__113basic_istreamIcNS_11char_traitsIcEEED1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZTv0_n24_NSt3__113basic_istreamIwNS_11char_traitsIwEEED0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZTv0_n24_NSt3__113basic_istreamIwNS_11char_traitsIwEEED1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZTv0_n24_NSt3__113basic_ostreamIcNS_11char_traitsIcEEED0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZTv0_n24_NSt3__113basic_ostreamIcNS_11char_traitsIcEEED1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZTv0_n24_NSt3__113basic_ostreamIwNS_11char_traitsIwEEED0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZTv0_n24_NSt3__113basic_ostreamIwNS_11char_traitsIwEEED1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZTv0_n24_NSt3__114basic_iostreamIcNS_11char_traitsIcEEED0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZTv0_n24_NSt3__114basic_iostreamIcNS_11char_traitsIcEEED1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZTv0_n24_NSt3__19strstreamD0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZTv0_n24_NSt3__19strstreamD1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZdaPv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZdaPvRKSt9nothrow_t'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZdaPvSt11align_val_t'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZdaPvSt11align_val_tRKSt9nothrow_t'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZdaPvm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZdaPvmSt11align_val_t'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZdlPv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZdlPvRKSt9nothrow_t'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZdlPvSt11align_val_t'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZdlPvSt11align_val_tRKSt9nothrow_t'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZdlPvm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZdlPvmSt11align_val_t'} -{'type': 'FUNC', 'is_defined': True, 'name': '__Znam'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZnamRKSt9nothrow_t'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZnamSt11align_val_t'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZnamSt11align_val_tRKSt9nothrow_t'} -{'type': 'FUNC', 'is_defined': True, 'name': '__Znwm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZnwmRKSt9nothrow_t'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZnwmSt11align_val_t'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZnwmSt11align_val_tRKSt9nothrow_t'} -{'type': 'U', 'is_defined': False, 'name': '___cxa_allocate_exception'} -{'type': 'I', 'is_defined': True, 'name': '___cxa_allocate_exception'} -{'type': 'U', 'is_defined': False, 'name': '___cxa_atexit'} -{'type': 'U', 'is_defined': False, 'name': '___cxa_bad_cast'} -{'type': 'I', 'is_defined': True, 'name': '___cxa_bad_cast'} -{'type': 'U', 'is_defined': False, 'name': '___cxa_bad_typeid'} -{'type': 'I', 'is_defined': True, 'name': '___cxa_bad_typeid'} -{'type': 'U', 'is_defined': False, 'name': '___cxa_begin_catch'} -{'type': 'I', 'is_defined': True, 'name': '___cxa_begin_catch'} -{'type': 'U', 'is_defined': False, 'name': '___cxa_call_unexpected'} -{'type': 'I', 'is_defined': True, 'name': '___cxa_call_unexpected'} -{'type': 'U', 'is_defined': False, 'name': '___cxa_current_exception_type'} -{'type': 'I', 'is_defined': True, 'name': '___cxa_current_exception_type'} -{'type': 'U', 'is_defined': False, 'name': '___cxa_current_primary_exception'} -{'type': 'U', 'is_defined': False, 'name': '___cxa_decrement_exception_refcount'} -{'type': 'U', 'is_defined': False, 'name': '___cxa_deleted_virtual'} -{'type': 'I', 'is_defined': True, 'name': '___cxa_deleted_virtual'} -{'type': 'U', 'is_defined': False, 'name': '___cxa_demangle'} -{'type': 'I', 'is_defined': True, 'name': '___cxa_demangle'} -{'type': 'U', 'is_defined': False, 'name': '___cxa_end_catch'} -{'type': 'I', 'is_defined': True, 'name': '___cxa_end_catch'} -{'type': 'U', 'is_defined': False, 'name': '___cxa_free_exception'} -{'type': 'I', 'is_defined': True, 'name': '___cxa_free_exception'} -{'type': 'U', 'is_defined': False, 'name': '___cxa_get_exception_ptr'} -{'type': 'I', 'is_defined': True, 'name': '___cxa_get_exception_ptr'} -{'type': 'U', 'is_defined': False, 'name': '___cxa_get_globals'} -{'type': 'I', 'is_defined': True, 'name': '___cxa_get_globals'} -{'type': 'U', 'is_defined': False, 'name': '___cxa_get_globals_fast'} -{'type': 'I', 'is_defined': True, 'name': '___cxa_get_globals_fast'} -{'type': 'U', 'is_defined': False, 'name': '___cxa_guard_abort'} -{'type': 'I', 'is_defined': True, 'name': '___cxa_guard_abort'} -{'type': 'U', 'is_defined': False, 'name': '___cxa_guard_acquire'} -{'type': 'I', 'is_defined': True, 'name': '___cxa_guard_acquire'} -{'type': 'U', 'is_defined': False, 'name': '___cxa_guard_release'} -{'type': 'I', 'is_defined': True, 'name': '___cxa_guard_release'} -{'type': 'U', 'is_defined': False, 'name': '___cxa_increment_exception_refcount'} -{'type': 'U', 'is_defined': False, 'name': '___cxa_pure_virtual'} -{'type': 'I', 'is_defined': True, 'name': '___cxa_pure_virtual'} -{'type': 'U', 'is_defined': False, 'name': '___cxa_rethrow'} -{'type': 'I', 'is_defined': True, 'name': '___cxa_rethrow'} -{'type': 'U', 'is_defined': False, 'name': '___cxa_rethrow_primary_exception'} -{'type': 'U', 'is_defined': False, 'name': '___cxa_throw'} -{'type': 'I', 'is_defined': True, 'name': '___cxa_throw'} -{'type': 'U', 'is_defined': False, 'name': '___cxa_uncaught_exceptions'} -{'type': 'U', 'is_defined': False, 'name': '___cxa_vec_cctor'} -{'type': 'I', 'is_defined': True, 'name': '___cxa_vec_cctor'} -{'type': 'U', 'is_defined': False, 'name': '___cxa_vec_cleanup'} -{'type': 'I', 'is_defined': True, 'name': '___cxa_vec_cleanup'} -{'type': 'U', 'is_defined': False, 'name': '___cxa_vec_ctor'} -{'type': 'I', 'is_defined': True, 'name': '___cxa_vec_ctor'} -{'type': 'U', 'is_defined': False, 'name': '___cxa_vec_delete'} -{'type': 'I', 'is_defined': True, 'name': '___cxa_vec_delete'} -{'type': 'U', 'is_defined': False, 'name': '___cxa_vec_delete2'} -{'type': 'I', 'is_defined': True, 'name': '___cxa_vec_delete2'} -{'type': 'U', 'is_defined': False, 'name': '___cxa_vec_delete3'} -{'type': 'I', 'is_defined': True, 'name': '___cxa_vec_delete3'} -{'type': 'U', 'is_defined': False, 'name': '___cxa_vec_dtor'} -{'type': 'I', 'is_defined': True, 'name': '___cxa_vec_dtor'} -{'type': 'U', 'is_defined': False, 'name': '___cxa_vec_new'} -{'type': 'I', 'is_defined': True, 'name': '___cxa_vec_new'} -{'type': 'U', 'is_defined': False, 'name': '___cxa_vec_new2'} -{'type': 'I', 'is_defined': True, 'name': '___cxa_vec_new2'} -{'type': 'U', 'is_defined': False, 'name': '___cxa_vec_new3'} -{'type': 'I', 'is_defined': True, 'name': '___cxa_vec_new3'} -{'type': 'U', 'is_defined': False, 'name': '___dynamic_cast'} -{'type': 'I', 'is_defined': True, 'name': '___dynamic_cast'} -{'type': 'U', 'is_defined': False, 'name': '___gxx_personality_v0'} -{'type': 'I', 'is_defined': True, 'name': '___gxx_personality_v0'} +{'is_defined': False, 'name': '__ZNKSt10bad_typeid4whatEv', 'type': 'U'} +{'is_defined': True, 'name': '__ZNKSt10bad_typeid4whatEv', 'type': 'I'} +{'is_defined': False, 'name': '__ZNKSt11logic_error4whatEv', 'type': 'U'} +{'is_defined': True, 'name': '__ZNKSt11logic_error4whatEv', 'type': 'I'} +{'is_defined': True, 'name': '__ZNKSt12bad_any_cast4whatEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt12experimental15fundamentals_v112bad_any_cast4whatEv', 'type': 'FUNC'} +{'is_defined': False, 'name': '__ZNKSt13bad_exception4whatEv', 'type': 'U'} +{'is_defined': True, 'name': '__ZNKSt13bad_exception4whatEv', 'type': 'I'} +{'is_defined': False, 'name': '__ZNKSt13runtime_error4whatEv', 'type': 'U'} +{'is_defined': True, 'name': '__ZNKSt13runtime_error4whatEv', 'type': 'I'} +{'is_defined': True, 'name': '__ZNKSt16nested_exception14rethrow_nestedEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt18bad_variant_access4whatEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt19bad_optional_access4whatEv', 'type': 'FUNC'} +{'is_defined': False, 'name': '__ZNKSt20bad_array_new_length4whatEv', 'type': 'U'} +{'is_defined': True, 'name': '__ZNKSt20bad_array_new_length4whatEv', 'type': 'I'} +{'is_defined': True, 'name': '__ZNKSt3__110__time_put8__do_putEPcRS1_PK2tmcc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__110__time_put8__do_putEPwRS1_PK2tmcc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__110error_code7messageEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__110moneypunctIcLb0EE11do_groupingEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__110moneypunctIcLb0EE13do_neg_formatEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__110moneypunctIcLb0EE13do_pos_formatEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__110moneypunctIcLb0EE14do_curr_symbolEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__110moneypunctIcLb0EE14do_frac_digitsEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__110moneypunctIcLb0EE16do_decimal_pointEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__110moneypunctIcLb0EE16do_negative_signEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__110moneypunctIcLb0EE16do_positive_signEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__110moneypunctIcLb0EE16do_thousands_sepEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__110moneypunctIcLb1EE11do_groupingEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__110moneypunctIcLb1EE13do_neg_formatEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__110moneypunctIcLb1EE13do_pos_formatEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__110moneypunctIcLb1EE14do_curr_symbolEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__110moneypunctIcLb1EE14do_frac_digitsEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__110moneypunctIcLb1EE16do_decimal_pointEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__110moneypunctIcLb1EE16do_negative_signEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__110moneypunctIcLb1EE16do_positive_signEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__110moneypunctIcLb1EE16do_thousands_sepEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__110moneypunctIwLb0EE11do_groupingEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__110moneypunctIwLb0EE13do_neg_formatEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__110moneypunctIwLb0EE13do_pos_formatEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__110moneypunctIwLb0EE14do_curr_symbolEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__110moneypunctIwLb0EE14do_frac_digitsEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__110moneypunctIwLb0EE16do_decimal_pointEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__110moneypunctIwLb0EE16do_negative_signEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__110moneypunctIwLb0EE16do_positive_signEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__110moneypunctIwLb0EE16do_thousands_sepEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__110moneypunctIwLb1EE11do_groupingEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__110moneypunctIwLb1EE13do_neg_formatEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__110moneypunctIwLb1EE13do_pos_formatEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__110moneypunctIwLb1EE14do_curr_symbolEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__110moneypunctIwLb1EE14do_frac_digitsEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__110moneypunctIwLb1EE16do_decimal_pointEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__110moneypunctIwLb1EE16do_negative_signEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__110moneypunctIwLb1EE16do_positive_signEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__110moneypunctIwLb1EE16do_thousands_sepEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__111__libcpp_db15__decrementableEPKv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__111__libcpp_db15__find_c_from_iEPv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__111__libcpp_db15__subscriptableEPKvl', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__111__libcpp_db17__dereferenceableEPKv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__111__libcpp_db17__find_c_and_lockEPv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__111__libcpp_db22__less_than_comparableEPKvS2_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__111__libcpp_db6unlockEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__111__libcpp_db8__find_cEPv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__111__libcpp_db9__addableEPKvl', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__112bad_weak_ptr4whatEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE12find_last_ofEPKcmm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE13find_first_ofEPKcmm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE16find_last_not_ofEPKcmm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE17find_first_not_ofEPKcmm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE2atEm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4copyEPcmm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4findEPKcmm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4findEcm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE5rfindEPKcmm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE5rfindEcm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7compareEPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7compareEmmPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7compareEmmPKcm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7compareEmmRKS5_mm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE12find_last_ofEPKwmm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE13find_first_ofEPKwmm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE16find_last_not_ofEPKwmm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE17find_first_not_ofEPKwmm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE2atEm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE4copyEPwmm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE4findEPKwmm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE4findEwm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE5rfindEPKwmm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE5rfindEwm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7compareEPKw', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7compareEmmPKw', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7compareEmmPKwm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7compareEmmRKS5_mm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__112ctype_bynameIcE10do_tolowerEPcPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__112ctype_bynameIcE10do_tolowerEc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__112ctype_bynameIcE10do_toupperEPcPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__112ctype_bynameIcE10do_toupperEc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__112ctype_bynameIwE10do_scan_isEjPKwS3_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__112ctype_bynameIwE10do_tolowerEPwPKw', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__112ctype_bynameIwE10do_tolowerEw', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__112ctype_bynameIwE10do_toupperEPwPKw', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__112ctype_bynameIwE10do_toupperEw', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__112ctype_bynameIwE11do_scan_notEjPKwS3_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__112ctype_bynameIwE5do_isEPKwS3_Pj', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__112ctype_bynameIwE5do_isEjw', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__112ctype_bynameIwE8do_widenEPKcS3_Pw', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__112ctype_bynameIwE8do_widenEc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__112ctype_bynameIwE9do_narrowEPKwS3_cPc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__112ctype_bynameIwE9do_narrowEwc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__112strstreambuf6pcountEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__113random_device7entropyEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__114__codecvt_utf8IDiE10do_unshiftER11__mbstate_tPcS4_RS4_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__114__codecvt_utf8IDiE11do_encodingEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__114__codecvt_utf8IDiE13do_max_lengthEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__114__codecvt_utf8IDiE16do_always_noconvEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__114__codecvt_utf8IDiE5do_inER11__mbstate_tPKcS5_RS5_PDiS7_RS7_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__114__codecvt_utf8IDiE6do_outER11__mbstate_tPKDiS5_RS5_PcS7_RS7_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__114__codecvt_utf8IDiE9do_lengthER11__mbstate_tPKcS5_m', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__114__codecvt_utf8IDsE10do_unshiftER11__mbstate_tPcS4_RS4_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__114__codecvt_utf8IDsE11do_encodingEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__114__codecvt_utf8IDsE13do_max_lengthEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__114__codecvt_utf8IDsE16do_always_noconvEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__114__codecvt_utf8IDsE5do_inER11__mbstate_tPKcS5_RS5_PDsS7_RS7_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__114__codecvt_utf8IDsE6do_outER11__mbstate_tPKDsS5_RS5_PcS7_RS7_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__114__codecvt_utf8IDsE9do_lengthER11__mbstate_tPKcS5_m', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__114__codecvt_utf8IwE10do_unshiftER11__mbstate_tPcS4_RS4_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__114__codecvt_utf8IwE11do_encodingEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__114__codecvt_utf8IwE13do_max_lengthEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__114__codecvt_utf8IwE16do_always_noconvEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__114__codecvt_utf8IwE5do_inER11__mbstate_tPKcS5_RS5_PwS7_RS7_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__114__codecvt_utf8IwE6do_outER11__mbstate_tPKwS5_RS5_PcS7_RS7_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__114__codecvt_utf8IwE9do_lengthER11__mbstate_tPKcS5_m', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__114collate_bynameIcE10do_compareEPKcS3_S3_S3_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__114collate_bynameIcE12do_transformEPKcS3_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__114collate_bynameIwE10do_compareEPKwS3_S3_S3_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__114collate_bynameIwE12do_transformEPKwS3_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__114error_category10equivalentERKNS_10error_codeEi', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__114error_category10equivalentEiRKNS_15error_conditionE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__114error_category23default_error_conditionEi', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IDiLb0EE10do_unshiftER11__mbstate_tPcS4_RS4_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IDiLb0EE11do_encodingEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IDiLb0EE13do_max_lengthEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IDiLb0EE16do_always_noconvEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IDiLb0EE5do_inER11__mbstate_tPKcS5_RS5_PDiS7_RS7_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IDiLb0EE6do_outER11__mbstate_tPKDiS5_RS5_PcS7_RS7_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IDiLb0EE9do_lengthER11__mbstate_tPKcS5_m', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IDiLb1EE10do_unshiftER11__mbstate_tPcS4_RS4_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IDiLb1EE11do_encodingEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IDiLb1EE13do_max_lengthEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IDiLb1EE16do_always_noconvEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IDiLb1EE5do_inER11__mbstate_tPKcS5_RS5_PDiS7_RS7_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IDiLb1EE6do_outER11__mbstate_tPKDiS5_RS5_PcS7_RS7_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IDiLb1EE9do_lengthER11__mbstate_tPKcS5_m', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IDsLb0EE10do_unshiftER11__mbstate_tPcS4_RS4_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IDsLb0EE11do_encodingEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IDsLb0EE13do_max_lengthEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IDsLb0EE16do_always_noconvEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IDsLb0EE5do_inER11__mbstate_tPKcS5_RS5_PDsS7_RS7_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IDsLb0EE6do_outER11__mbstate_tPKDsS5_RS5_PcS7_RS7_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IDsLb0EE9do_lengthER11__mbstate_tPKcS5_m', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IDsLb1EE10do_unshiftER11__mbstate_tPcS4_RS4_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IDsLb1EE11do_encodingEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IDsLb1EE13do_max_lengthEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IDsLb1EE16do_always_noconvEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IDsLb1EE5do_inER11__mbstate_tPKcS5_RS5_PDsS7_RS7_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IDsLb1EE6do_outER11__mbstate_tPKDsS5_RS5_PcS7_RS7_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IDsLb1EE9do_lengthER11__mbstate_tPKcS5_m', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IwLb0EE10do_unshiftER11__mbstate_tPcS4_RS4_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IwLb0EE11do_encodingEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IwLb0EE13do_max_lengthEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IwLb0EE16do_always_noconvEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IwLb0EE5do_inER11__mbstate_tPKcS5_RS5_PwS7_RS7_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IwLb0EE6do_outER11__mbstate_tPKwS5_RS5_PcS7_RS7_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IwLb0EE9do_lengthER11__mbstate_tPKcS5_m', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IwLb1EE10do_unshiftER11__mbstate_tPcS4_RS4_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IwLb1EE11do_encodingEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IwLb1EE13do_max_lengthEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IwLb1EE16do_always_noconvEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IwLb1EE5do_inER11__mbstate_tPKcS5_RS5_PwS7_RS7_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IwLb1EE6do_outER11__mbstate_tPKwS5_RS5_PcS7_RS7_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__115__codecvt_utf16IwLb1EE9do_lengthER11__mbstate_tPKcS5_m', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__115basic_streambufIcNS_11char_traitsIcEEE6getlocEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__115basic_streambufIwNS_11char_traitsIwEEE6getlocEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__115error_condition7messageEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIcLb0EE11do_groupingEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIcLb0EE13do_neg_formatEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIcLb0EE13do_pos_formatEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIcLb0EE14do_curr_symbolEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIcLb0EE14do_frac_digitsEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIcLb0EE16do_decimal_pointEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIcLb0EE16do_negative_signEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIcLb0EE16do_positive_signEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIcLb0EE16do_thousands_sepEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIcLb1EE11do_groupingEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIcLb1EE13do_neg_formatEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIcLb1EE13do_pos_formatEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIcLb1EE14do_curr_symbolEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIcLb1EE14do_frac_digitsEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIcLb1EE16do_decimal_pointEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIcLb1EE16do_negative_signEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIcLb1EE16do_positive_signEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIcLb1EE16do_thousands_sepEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIwLb0EE11do_groupingEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIwLb0EE13do_neg_formatEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIwLb0EE13do_pos_formatEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIwLb0EE14do_curr_symbolEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIwLb0EE14do_frac_digitsEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIwLb0EE16do_decimal_pointEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIwLb0EE16do_negative_signEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIwLb0EE16do_positive_signEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIwLb0EE16do_thousands_sepEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIwLb1EE11do_groupingEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIwLb1EE13do_neg_formatEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIwLb1EE13do_pos_formatEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIwLb1EE14do_curr_symbolEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIwLb1EE14do_frac_digitsEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIwLb1EE16do_decimal_pointEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIwLb1EE16do_negative_signEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIwLb1EE16do_positive_signEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIwLb1EE16do_thousands_sepEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__118__time_get_storageIcE15__do_date_orderEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__118__time_get_storageIwE15__do_date_orderEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__119__shared_weak_count13__get_deleterERKSt9type_info', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__120__codecvt_utf8_utf16IDiE10do_unshiftER11__mbstate_tPcS4_RS4_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__120__codecvt_utf8_utf16IDiE11do_encodingEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__120__codecvt_utf8_utf16IDiE13do_max_lengthEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__120__codecvt_utf8_utf16IDiE16do_always_noconvEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__120__codecvt_utf8_utf16IDiE5do_inER11__mbstate_tPKcS5_RS5_PDiS7_RS7_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__120__codecvt_utf8_utf16IDiE6do_outER11__mbstate_tPKDiS5_RS5_PcS7_RS7_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__120__codecvt_utf8_utf16IDiE9do_lengthER11__mbstate_tPKcS5_m', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__120__codecvt_utf8_utf16IDsE10do_unshiftER11__mbstate_tPcS4_RS4_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__120__codecvt_utf8_utf16IDsE11do_encodingEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__120__codecvt_utf8_utf16IDsE13do_max_lengthEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__120__codecvt_utf8_utf16IDsE16do_always_noconvEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__120__codecvt_utf8_utf16IDsE5do_inER11__mbstate_tPKcS5_RS5_PDsS7_RS7_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__120__codecvt_utf8_utf16IDsE6do_outER11__mbstate_tPKDsS5_RS5_PcS7_RS7_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__120__codecvt_utf8_utf16IDsE9do_lengthER11__mbstate_tPKcS5_m', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__120__codecvt_utf8_utf16IwE10do_unshiftER11__mbstate_tPcS4_RS4_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__120__codecvt_utf8_utf16IwE11do_encodingEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__120__codecvt_utf8_utf16IwE13do_max_lengthEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__120__codecvt_utf8_utf16IwE16do_always_noconvEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__120__codecvt_utf8_utf16IwE5do_inER11__mbstate_tPKcS5_RS5_PwS7_RS7_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__120__codecvt_utf8_utf16IwE6do_outER11__mbstate_tPKwS5_RS5_PcS7_RS7_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__120__codecvt_utf8_utf16IwE9do_lengthER11__mbstate_tPKcS5_m', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__120__time_get_c_storageIcE3__XEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__120__time_get_c_storageIcE3__cEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__120__time_get_c_storageIcE3__rEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__120__time_get_c_storageIcE3__xEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__120__time_get_c_storageIcE7__am_pmEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__120__time_get_c_storageIcE7__weeksEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__120__time_get_c_storageIcE8__monthsEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__120__time_get_c_storageIwE3__XEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__120__time_get_c_storageIwE3__cEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__120__time_get_c_storageIwE3__rEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__120__time_get_c_storageIwE3__xEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__120__time_get_c_storageIwE7__am_pmEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__120__time_get_c_storageIwE7__weeksEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__120__time_get_c_storageIwE8__monthsEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__120__vector_base_commonILb1EE20__throw_length_errorEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__120__vector_base_commonILb1EE20__throw_out_of_rangeEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__121__basic_string_commonILb1EE20__throw_length_errorEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__121__basic_string_commonILb1EE20__throw_out_of_rangeEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__123__match_any_but_newlineIcE6__execERNS_7__stateIcEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__123__match_any_but_newlineIwE6__execERNS_7__stateIwEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__124__libcpp_debug_exception4whatEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__15ctypeIcE10do_tolowerEPcPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__15ctypeIcE10do_tolowerEc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__15ctypeIcE10do_toupperEPcPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__15ctypeIcE10do_toupperEc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__15ctypeIcE8do_widenEPKcS3_Pc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__15ctypeIcE8do_widenEc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__15ctypeIcE9do_narrowEPKcS3_cPc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__15ctypeIcE9do_narrowEcc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__15ctypeIwE10do_scan_isEjPKwS3_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__15ctypeIwE10do_tolowerEPwPKw', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__15ctypeIwE10do_tolowerEw', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__15ctypeIwE10do_toupperEPwPKw', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__15ctypeIwE10do_toupperEw', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__15ctypeIwE11do_scan_notEjPKwS3_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__15ctypeIwE5do_isEPKwS3_Pj', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__15ctypeIwE5do_isEjw', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__15ctypeIwE8do_widenEPKcS3_Pw', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__15ctypeIwE8do_widenEc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__15ctypeIwE9do_narrowEPKwS3_cPc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__15ctypeIwE9do_narrowEwc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__16locale4nameEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__16locale9has_facetERNS0_2idE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__16locale9use_facetERNS0_2idE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__16localeeqERKS0_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__17codecvtIDic11__mbstate_tE10do_unshiftERS1_PcS4_RS4_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__17codecvtIDic11__mbstate_tE11do_encodingEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__17codecvtIDic11__mbstate_tE13do_max_lengthEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__17codecvtIDic11__mbstate_tE16do_always_noconvEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__17codecvtIDic11__mbstate_tE5do_inERS1_PKcS5_RS5_PDiS7_RS7_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__17codecvtIDic11__mbstate_tE6do_outERS1_PKDiS5_RS5_PcS7_RS7_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__17codecvtIDic11__mbstate_tE9do_lengthERS1_PKcS5_m', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__17codecvtIDsc11__mbstate_tE10do_unshiftERS1_PcS4_RS4_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__17codecvtIDsc11__mbstate_tE11do_encodingEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__17codecvtIDsc11__mbstate_tE13do_max_lengthEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__17codecvtIDsc11__mbstate_tE16do_always_noconvEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__17codecvtIDsc11__mbstate_tE5do_inERS1_PKcS5_RS5_PDsS7_RS7_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__17codecvtIDsc11__mbstate_tE6do_outERS1_PKDsS5_RS5_PcS7_RS7_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__17codecvtIDsc11__mbstate_tE9do_lengthERS1_PKcS5_m', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__17codecvtIcc11__mbstate_tE10do_unshiftERS1_PcS4_RS4_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__17codecvtIcc11__mbstate_tE11do_encodingEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__17codecvtIcc11__mbstate_tE13do_max_lengthEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__17codecvtIcc11__mbstate_tE16do_always_noconvEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__17codecvtIcc11__mbstate_tE5do_inERS1_PKcS5_RS5_PcS7_RS7_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__17codecvtIcc11__mbstate_tE6do_outERS1_PKcS5_RS5_PcS7_RS7_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__17codecvtIcc11__mbstate_tE9do_lengthERS1_PKcS5_m', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__17codecvtIwc11__mbstate_tE10do_unshiftERS1_PcS4_RS4_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__17codecvtIwc11__mbstate_tE11do_encodingEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__17codecvtIwc11__mbstate_tE13do_max_lengthEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__17codecvtIwc11__mbstate_tE16do_always_noconvEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__17codecvtIwc11__mbstate_tE5do_inERS1_PKcS5_RS5_PwS7_RS7_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__17codecvtIwc11__mbstate_tE6do_outERS1_PKwS5_RS5_PcS7_RS7_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__17codecvtIwc11__mbstate_tE9do_lengthERS1_PKcS5_m', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__17collateIcE10do_compareEPKcS3_S3_S3_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__17collateIcE12do_transformEPKcS3_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__17collateIcE7do_hashEPKcS3_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__17collateIwE10do_compareEPKwS3_S3_S3_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__17collateIwE12do_transformEPKwS3_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__17collateIwE7do_hashEPKwS3_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRPv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRb', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRd', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRe', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRf', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRl', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRt', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRx', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRy', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjS8_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRPv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRb', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRd', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRe', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRf', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRl', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRt', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRx', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRy', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjS8_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEcPKv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEcb', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEcd', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEce', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEcl', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEcm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEcx', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEcy', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwPKv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwb', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwd', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwe', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwl', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwx', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwy', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__18ios_base6getlocEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__18messagesIcE6do_getEliiRKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__18messagesIcE7do_openERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERKNS_6localeE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__18messagesIcE8do_closeEl', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__18messagesIwE6do_getEliiRKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__18messagesIwE7do_openERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERKNS_6localeE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__18messagesIwE8do_closeEl', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__18numpunctIcE11do_groupingEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__18numpunctIcE11do_truenameEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__18numpunctIcE12do_falsenameEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__18numpunctIcE16do_decimal_pointEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__18numpunctIcE16do_thousands_sepEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__18numpunctIwE11do_groupingEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__18numpunctIwE11do_truenameEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__18numpunctIwE12do_falsenameEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__18numpunctIwE16do_decimal_pointEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__18numpunctIwE16do_thousands_sepEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE10__get_hourERiRS4_S4_RjRKNS_5ctypeIcEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE10__get_yearERiRS4_S4_RjRKNS_5ctypeIcEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE11__get_am_pmERiRS4_S4_RjRKNS_5ctypeIcEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE11__get_monthERiRS4_S4_RjRKNS_5ctypeIcEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE11__get_year4ERiRS4_S4_RjRKNS_5ctypeIcEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE11do_get_dateES4_S4_RNS_8ios_baseERjP2tm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE11do_get_timeES4_S4_RNS_8ios_baseERjP2tm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE11do_get_yearES4_S4_RNS_8ios_baseERjP2tm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE12__get_minuteERiRS4_S4_RjRKNS_5ctypeIcEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE12__get_secondERiRS4_S4_RjRKNS_5ctypeIcEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE13__get_12_hourERiRS4_S4_RjRKNS_5ctypeIcEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE13__get_percentERS4_S4_RjRKNS_5ctypeIcEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE13__get_weekdayERiRS4_S4_RjRKNS_5ctypeIcEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE13do_date_orderEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE14do_get_weekdayES4_S4_RNS_8ios_baseERjP2tm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE15__get_monthnameERiRS4_S4_RjRKNS_5ctypeIcEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE16do_get_monthnameES4_S4_RNS_8ios_baseERjP2tm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE17__get_weekdaynameERiRS4_S4_RjRKNS_5ctypeIcEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE17__get_white_spaceERS4_S4_RjRKNS_5ctypeIcEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE18__get_day_year_numERiRS4_S4_RjRKNS_5ctypeIcEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE3getES4_S4_RNS_8ios_baseERjP2tmPKcSC_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjP2tmcc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE9__get_dayERiRS4_S4_RjRKNS_5ctypeIcEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE10__get_hourERiRS4_S4_RjRKNS_5ctypeIwEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE10__get_yearERiRS4_S4_RjRKNS_5ctypeIwEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE11__get_am_pmERiRS4_S4_RjRKNS_5ctypeIwEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE11__get_monthERiRS4_S4_RjRKNS_5ctypeIwEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE11__get_year4ERiRS4_S4_RjRKNS_5ctypeIwEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE11do_get_dateES4_S4_RNS_8ios_baseERjP2tm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE11do_get_timeES4_S4_RNS_8ios_baseERjP2tm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE11do_get_yearES4_S4_RNS_8ios_baseERjP2tm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE12__get_minuteERiRS4_S4_RjRKNS_5ctypeIwEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE12__get_secondERiRS4_S4_RjRKNS_5ctypeIwEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE13__get_12_hourERiRS4_S4_RjRKNS_5ctypeIwEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE13__get_percentERS4_S4_RjRKNS_5ctypeIwEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE13__get_weekdayERiRS4_S4_RjRKNS_5ctypeIwEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE13do_date_orderEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE14do_get_weekdayES4_S4_RNS_8ios_baseERjP2tm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE15__get_monthnameERiRS4_S4_RjRKNS_5ctypeIwEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE16do_get_monthnameES4_S4_RNS_8ios_baseERjP2tm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE17__get_weekdaynameERiRS4_S4_RjRKNS_5ctypeIwEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE17__get_white_spaceERS4_S4_RjRKNS_5ctypeIwEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE18__get_day_year_numERiRS4_S4_RjRKNS_5ctypeIwEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE3getES4_S4_RNS_8ios_baseERjP2tmPKwSC_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjP2tmcc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE9__get_dayERiRS4_S4_RjRKNS_5ctypeIwEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__18time_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE3putES4_RNS_8ios_baseEcPK2tmPKcSC_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__18time_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEcPK2tmcc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__18time_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE3putES4_RNS_8ios_baseEwPK2tmPKwSC_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__18time_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwPK2tmcc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__19money_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_bRNS_8ios_baseERjRNS_12basic_stringIcS3_NS_9allocatorIcEEEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__19money_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_bRNS_8ios_baseERjRe', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__19money_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_bRNS_8ios_baseERjRNS_12basic_stringIwS3_NS_9allocatorIwEEEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__19money_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_bRNS_8ios_baseERjRe', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__19money_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_bRNS_8ios_baseEcRKNS_12basic_stringIcS3_NS_9allocatorIcEEEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__19money_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_bRNS_8ios_baseEce', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__19money_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_bRNS_8ios_baseEwRKNS_12basic_stringIwS3_NS_9allocatorIwEEEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__19money_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_bRNS_8ios_baseEwe', 'type': 'FUNC'} +{'is_defined': False, 'name': '__ZNKSt8bad_cast4whatEv', 'type': 'U'} +{'is_defined': True, 'name': '__ZNKSt8bad_cast4whatEv', 'type': 'I'} +{'is_defined': False, 'name': '__ZNKSt9bad_alloc4whatEv', 'type': 'U'} +{'is_defined': True, 'name': '__ZNKSt9bad_alloc4whatEv', 'type': 'I'} +{'is_defined': False, 'name': '__ZNKSt9exception4whatEv', 'type': 'U'} +{'is_defined': True, 'name': '__ZNKSt9exception4whatEv', 'type': 'I'} +{'is_defined': False, 'name': '__ZNSt10bad_typeidC1Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt10bad_typeidC1Ev', 'type': 'I'} +{'is_defined': False, 'name': '__ZNSt10bad_typeidC2Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt10bad_typeidC2Ev', 'type': 'I'} +{'is_defined': False, 'name': '__ZNSt10bad_typeidD0Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt10bad_typeidD0Ev', 'type': 'I'} +{'is_defined': False, 'name': '__ZNSt10bad_typeidD1Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt10bad_typeidD1Ev', 'type': 'I'} +{'is_defined': False, 'name': '__ZNSt10bad_typeidD2Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt10bad_typeidD2Ev', 'type': 'I'} +{'is_defined': True, 'name': '__ZNSt11logic_errorC1EPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt11logic_errorC1ERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt11logic_errorC1ERKS_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt11logic_errorC2EPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt11logic_errorC2ERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt11logic_errorC2ERKS_', 'type': 'FUNC'} +{'is_defined': False, 'name': '__ZNSt11logic_errorD0Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt11logic_errorD0Ev', 'type': 'I'} +{'is_defined': False, 'name': '__ZNSt11logic_errorD1Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt11logic_errorD1Ev', 'type': 'I'} +{'is_defined': False, 'name': '__ZNSt11logic_errorD2Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt11logic_errorD2Ev', 'type': 'I'} +{'is_defined': True, 'name': '__ZNSt11logic_erroraSERKS_', 'type': 'FUNC'} +{'is_defined': False, 'name': '__ZNSt11range_errorD0Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt11range_errorD0Ev', 'type': 'I'} +{'is_defined': False, 'name': '__ZNSt11range_errorD1Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt11range_errorD1Ev', 'type': 'I'} +{'is_defined': False, 'name': '__ZNSt11range_errorD2Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt11range_errorD2Ev', 'type': 'I'} +{'is_defined': False, 'name': '__ZNSt12domain_errorD0Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt12domain_errorD0Ev', 'type': 'I'} +{'is_defined': False, 'name': '__ZNSt12domain_errorD1Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt12domain_errorD1Ev', 'type': 'I'} +{'is_defined': False, 'name': '__ZNSt12domain_errorD2Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt12domain_errorD2Ev', 'type': 'I'} +{'is_defined': True, 'name': '__ZNSt12experimental19bad_optional_accessD0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt12experimental19bad_optional_accessD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt12experimental19bad_optional_accessD2Ev', 'type': 'FUNC'} +{'is_defined': False, 'name': '__ZNSt12length_errorD0Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt12length_errorD0Ev', 'type': 'I'} +{'is_defined': False, 'name': '__ZNSt12length_errorD1Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt12length_errorD1Ev', 'type': 'I'} +{'is_defined': False, 'name': '__ZNSt12length_errorD2Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt12length_errorD2Ev', 'type': 'I'} +{'is_defined': False, 'name': '__ZNSt12out_of_rangeD0Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt12out_of_rangeD0Ev', 'type': 'I'} +{'is_defined': False, 'name': '__ZNSt12out_of_rangeD1Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt12out_of_rangeD1Ev', 'type': 'I'} +{'is_defined': False, 'name': '__ZNSt12out_of_rangeD2Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt12out_of_rangeD2Ev', 'type': 'I'} +{'is_defined': False, 'name': '__ZNSt13bad_exceptionD0Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt13bad_exceptionD0Ev', 'type': 'I'} +{'is_defined': False, 'name': '__ZNSt13bad_exceptionD1Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt13bad_exceptionD1Ev', 'type': 'I'} +{'is_defined': False, 'name': '__ZNSt13bad_exceptionD2Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt13bad_exceptionD2Ev', 'type': 'I'} +{'is_defined': True, 'name': '__ZNSt13exception_ptrC1ERKS_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt13exception_ptrC2ERKS_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt13exception_ptrD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt13exception_ptrD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt13exception_ptraSERKS_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt13runtime_errorC1EPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt13runtime_errorC1ERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt13runtime_errorC1ERKS_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt13runtime_errorC2EPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt13runtime_errorC2ERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt13runtime_errorC2ERKS_', 'type': 'FUNC'} +{'is_defined': False, 'name': '__ZNSt13runtime_errorD0Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt13runtime_errorD0Ev', 'type': 'I'} +{'is_defined': False, 'name': '__ZNSt13runtime_errorD1Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt13runtime_errorD1Ev', 'type': 'I'} +{'is_defined': False, 'name': '__ZNSt13runtime_errorD2Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt13runtime_errorD2Ev', 'type': 'I'} +{'is_defined': True, 'name': '__ZNSt13runtime_erroraSERKS_', 'type': 'FUNC'} +{'is_defined': False, 'name': '__ZNSt14overflow_errorD0Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt14overflow_errorD0Ev', 'type': 'I'} +{'is_defined': False, 'name': '__ZNSt14overflow_errorD1Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt14overflow_errorD1Ev', 'type': 'I'} +{'is_defined': False, 'name': '__ZNSt14overflow_errorD2Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt14overflow_errorD2Ev', 'type': 'I'} +{'is_defined': False, 'name': '__ZNSt15underflow_errorD0Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt15underflow_errorD0Ev', 'type': 'I'} +{'is_defined': False, 'name': '__ZNSt15underflow_errorD1Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt15underflow_errorD1Ev', 'type': 'I'} +{'is_defined': False, 'name': '__ZNSt15underflow_errorD2Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt15underflow_errorD2Ev', 'type': 'I'} +{'is_defined': False, 'name': '__ZNSt16invalid_argumentD0Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt16invalid_argumentD0Ev', 'type': 'I'} +{'is_defined': False, 'name': '__ZNSt16invalid_argumentD1Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt16invalid_argumentD1Ev', 'type': 'I'} +{'is_defined': False, 'name': '__ZNSt16invalid_argumentD2Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt16invalid_argumentD2Ev', 'type': 'I'} +{'is_defined': True, 'name': '__ZNSt16nested_exceptionC1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt16nested_exceptionC2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt16nested_exceptionD0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt16nested_exceptionD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt16nested_exceptionD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt19bad_optional_accessD0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt19bad_optional_accessD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt19bad_optional_accessD2Ev', 'type': 'FUNC'} +{'is_defined': False, 'name': '__ZNSt20bad_array_new_lengthC1Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt20bad_array_new_lengthC1Ev', 'type': 'I'} +{'is_defined': False, 'name': '__ZNSt20bad_array_new_lengthC2Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt20bad_array_new_lengthC2Ev', 'type': 'I'} +{'is_defined': False, 'name': '__ZNSt20bad_array_new_lengthD0Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt20bad_array_new_lengthD0Ev', 'type': 'I'} +{'is_defined': False, 'name': '__ZNSt20bad_array_new_lengthD1Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt20bad_array_new_lengthD1Ev', 'type': 'I'} +{'is_defined': False, 'name': '__ZNSt20bad_array_new_lengthD2Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt20bad_array_new_lengthD2Ev', 'type': 'I'} +{'is_defined': True, 'name': '__ZNSt3__110__time_getC1EPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__110__time_getC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__110__time_getC2EPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__110__time_getC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__110__time_getD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__110__time_getD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__110__time_putC1EPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__110__time_putC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__110__time_putC2EPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__110__time_putC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__110__time_putD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__110__time_putD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__110adopt_lockE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__110ctype_base5alnumE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__110ctype_base5alphaE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__110ctype_base5blankE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__110ctype_base5cntrlE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__110ctype_base5digitE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__110ctype_base5graphE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__110ctype_base5lowerE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__110ctype_base5printE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__110ctype_base5punctE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__110ctype_base5spaceE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__110ctype_base5upperE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__110ctype_base6xdigitE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__110defer_lockE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__110istrstreamD0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__110istrstreamD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__110istrstreamD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__110moneypunctIcLb0EE2idE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__110moneypunctIcLb0EE4intlE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__110moneypunctIcLb1EE2idE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__110moneypunctIcLb1EE4intlE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__110moneypunctIwLb0EE2idE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__110moneypunctIwLb0EE4intlE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__110moneypunctIwLb1EE2idE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__110moneypunctIwLb1EE4intlE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__110ostrstreamD0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__110ostrstreamD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__110ostrstreamD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__110to_wstringEd', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__110to_wstringEe', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__110to_wstringEf', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__110to_wstringEi', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__110to_wstringEj', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__110to_wstringEl', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__110to_wstringEm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__110to_wstringEx', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__110to_wstringEy', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__111__call_onceERVmPvPFvS2_E', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__111__libcpp_db10__insert_cEPvPFPNS_8__c_nodeES1_S1_S3_E', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__111__libcpp_db10__insert_iEPv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__111__libcpp_db11__insert_icEPvPKv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__111__libcpp_db15__iterator_copyEPvPKv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__111__libcpp_db16__invalidate_allEPv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__111__libcpp_db4swapEPvS1_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__111__libcpp_db9__erase_cEPv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__111__libcpp_db9__erase_iEPv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__111__libcpp_dbC1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__111__libcpp_dbC2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__111__libcpp_dbD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__111__libcpp_dbD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__111__money_getIcE13__gather_infoEbRKNS_6localeERNS_10money_base7patternERcS8_RNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEESF_SF_SF_Ri', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__111__money_getIwE13__gather_infoEbRKNS_6localeERNS_10money_base7patternERwS8_RNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERNS9_IwNSA_IwEENSC_IwEEEESJ_SJ_Ri', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__111__money_putIcE13__gather_infoEbbRKNS_6localeERNS_10money_base7patternERcS8_RNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEESF_SF_Ri', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__111__money_putIcE8__formatEPcRS2_S3_jPKcS5_RKNS_5ctypeIcEEbRKNS_10money_base7patternEccRKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEESL_SL_i', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__111__money_putIwE13__gather_infoEbbRKNS_6localeERNS_10money_base7patternERwS8_RNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERNS9_IwNSA_IwEENSC_IwEEEESJ_Ri', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__111__money_putIwE8__formatEPwRS2_S3_jPKwS5_RKNS_5ctypeIwEEbRKNS_10money_base7patternEwwRKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERKNSE_IwNSF_IwEENSH_IwEEEESQ_i', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__111regex_errorC1ENS_15regex_constants10error_typeE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__111regex_errorC2ENS_15regex_constants10error_typeE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__111regex_errorD0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__111regex_errorD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__111regex_errorD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__111this_thread9sleep_forERKNS_6chrono8durationIxNS_5ratioILl1ELl1000000000EEEEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__111timed_mutex4lockEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__111timed_mutex6unlockEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__111timed_mutex8try_lockEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__111timed_mutexC1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__111timed_mutexC2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__111timed_mutexD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__111timed_mutexD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__111try_to_lockE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__112__do_nothingEPv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112__get_sp_mutEPKv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112__next_primeEm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112__rs_default4__c_E', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__112__rs_defaultC1ERKS0_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112__rs_defaultC1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112__rs_defaultC2ERKS0_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112__rs_defaultC2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112__rs_defaultD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112__rs_defaultD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112__rs_defaultclEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112bad_weak_ptrD0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112bad_weak_ptrD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112bad_weak_ptrD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE21__grow_by_and_replaceEmmmmmmPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE2atEm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4nposE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE5eraseEmm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcmm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEmc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6appendEPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6appendEPKcm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6appendERKS5_mm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6appendEmc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignEPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignEPKcm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignERKS5_mm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignEmc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6insertENS_11__wrap_iterIPKcEEc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6insertEmPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6insertEmPKcm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6insertEmRKS5_mm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6insertEmmc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6resizeEmc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7replaceEmmPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7replaceEmmPKcm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7replaceEmmRKS5_mm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7replaceEmmmc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7reserveEm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9__grow_byEmmmmmm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9push_backEc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC1ERKS5_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC1ERKS5_RKS4_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC1ERKS5_mmRKS4_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2ERKS5_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2ERKS5_RKS4_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2ERKS5_mmRKS4_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEaSERKS5_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEaSEc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE21__grow_by_and_replaceEmmmmmmPKw', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE2atEm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE4nposE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE5eraseEmm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6__initEPKwm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6__initEPKwmm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6__initEmw', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6appendEPKw', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6appendEPKwm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6appendERKS5_mm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6appendEmw', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6assignEPKw', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6assignEPKwm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6assignERKS5_mm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6assignEmw', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6insertENS_11__wrap_iterIPKwEEw', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6insertEmPKw', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6insertEmPKwm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6insertEmRKS5_mm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6insertEmmw', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6resizeEmw', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7replaceEmmPKw', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7replaceEmmPKwm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7replaceEmmRKS5_mm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7replaceEmmmw', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7reserveEm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE9__grow_byEmmmmmm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE9push_backEw', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC1ERKS5_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC1ERKS5_RKS4_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC1ERKS5_mmRKS4_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC2ERKS5_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC2ERKS5_RKS4_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC2ERKS5_mmRKS4_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEaSERKS5_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEaSEw', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112ctype_bynameIcEC1EPKcm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112ctype_bynameIcEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112ctype_bynameIcEC2EPKcm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112ctype_bynameIcEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112ctype_bynameIcED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112ctype_bynameIcED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112ctype_bynameIcED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112ctype_bynameIwEC1EPKcm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112ctype_bynameIwEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112ctype_bynameIwEC2EPKcm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112ctype_bynameIwEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112ctype_bynameIwED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112ctype_bynameIwED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112ctype_bynameIwED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112future_errorC1ENS_10error_codeE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112future_errorC2ENS_10error_codeE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112future_errorD0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112future_errorD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112future_errorD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112placeholders2_1E', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__112placeholders2_2E', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__112placeholders2_3E', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__112placeholders2_4E', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__112placeholders2_5E', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__112placeholders2_6E', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__112placeholders2_7E', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__112placeholders2_8E', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__112placeholders2_9E', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__112placeholders3_10E', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__112strstreambuf3strEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112strstreambuf4swapERS0_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112strstreambuf6__initEPclS1_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112strstreambuf6freezeEb', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112strstreambuf7seekoffExNS_8ios_base7seekdirEj', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112strstreambuf7seekposENS_4fposI11__mbstate_tEEj', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112strstreambuf8overflowEi', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112strstreambuf9pbackfailEi', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112strstreambuf9underflowEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112strstreambufC1EPFPvmEPFvS1_E', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112strstreambufC1EPKal', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112strstreambufC1EPKcl', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112strstreambufC1EPKhl', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112strstreambufC1EPalS1_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112strstreambufC1EPclS1_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112strstreambufC1EPhlS1_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112strstreambufC1El', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112strstreambufC2EPFPvmEPFvS1_E', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112strstreambufC2EPKal', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112strstreambufC2EPKcl', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112strstreambufC2EPKhl', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112strstreambufC2EPalS1_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112strstreambufC2EPclS1_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112strstreambufC2EPhlS1_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112strstreambufC2El', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112strstreambufD0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112strstreambufD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112strstreambufD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112system_error6__initERKNS_10error_codeENS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112system_errorC1ENS_10error_codeE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112system_errorC1ENS_10error_codeEPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112system_errorC1ENS_10error_codeERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112system_errorC1EiRKNS_14error_categoryE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112system_errorC1EiRKNS_14error_categoryEPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112system_errorC1EiRKNS_14error_categoryERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112system_errorC2ENS_10error_codeE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112system_errorC2ENS_10error_codeEPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112system_errorC2ENS_10error_codeERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112system_errorC2EiRKNS_14error_categoryE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112system_errorC2EiRKNS_14error_categoryEPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112system_errorC2EiRKNS_14error_categoryERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112system_errorD0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112system_errorD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__112system_errorD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113allocator_argE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE3getEPcl', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE3getEPclc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE3getERNS_15basic_streambufIcS2_EE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE3getERNS_15basic_streambufIcS2_EEc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE3getERc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE3getEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE4peekEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE4readEPcl', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE4swapERS3_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE4syncEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE5seekgENS_4fposI11__mbstate_tEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE5seekgExNS_8ios_base7seekdirE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE5tellgEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE5ungetEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE6ignoreEli', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE6sentryC1ERS3_b', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE6sentryC2ERS3_b', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE7getlineEPcl', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE7getlineEPclc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE7putbackEc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE8readsomeEPcl', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEEC1EPNS_15basic_streambufIcS2_EE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEEC2EPNS_15basic_streambufIcS2_EE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsEPFRNS_8ios_baseES5_E', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsEPFRNS_9basic_iosIcS2_EES6_E', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsEPFRS3_S4_E', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsEPNS_15basic_streambufIcS2_EE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERPv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERb', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERd', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERe', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERf', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERi', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERj', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERl', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERs', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERt', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERx', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERy', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE3getEPwl', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE3getEPwlw', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE3getERNS_15basic_streambufIwS2_EE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE3getERNS_15basic_streambufIwS2_EEw', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE3getERw', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE3getEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE4peekEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE4readEPwl', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE4swapERS3_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE4syncEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE5seekgENS_4fposI11__mbstate_tEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE5seekgExNS_8ios_base7seekdirE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE5tellgEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE5ungetEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE6ignoreEli', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE6sentryC1ERS3_b', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE6sentryC2ERS3_b', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE7getlineEPwl', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE7getlineEPwlw', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE7putbackEw', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE8readsomeEPwl', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEEC1EPNS_15basic_streambufIwS2_EE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEEC2EPNS_15basic_streambufIwS2_EE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsEPFRNS_8ios_baseES5_E', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsEPFRNS_9basic_iosIwS2_EES6_E', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsEPFRS3_S4_E', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsEPNS_15basic_streambufIwS2_EE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERPv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERb', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERd', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERe', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERf', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERi', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERj', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERl', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERs', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERt', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERx', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERy', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE3putEc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE4swapERS3_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE5flushEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE5seekpENS_4fposI11__mbstate_tEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE5seekpExNS_8ios_base7seekdirE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE5tellpEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE5writeEPKcl', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE6sentryC1ERS3_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE6sentryC2ERS3_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE6sentryD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE6sentryD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEEC1EPNS_15basic_streambufIcS2_EE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEEC2EPNS_15basic_streambufIcS2_EE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEPFRNS_8ios_baseES5_E', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEPFRNS_9basic_iosIcS2_EES6_E', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEPFRS3_S4_E', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEPKv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEPNS_15basic_streambufIcS2_EE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEb', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEd', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEe', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEf', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEi', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEj', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEl', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEs', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEt', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEx', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEy', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEE3putEw', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEE4swapERS3_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEE5flushEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEE5seekpENS_4fposI11__mbstate_tEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEE5seekpExNS_8ios_base7seekdirE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEE5tellpEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEE5writeEPKwl', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEE6sentryC1ERS3_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEE6sentryC2ERS3_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEE6sentryD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEE6sentryD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEEC1EPNS_15basic_streambufIwS2_EE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEEC2EPNS_15basic_streambufIwS2_EE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEPFRNS_8ios_baseES5_E', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEPFRNS_9basic_iosIwS2_EES6_E', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEPFRS3_S4_E', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEPKv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEPNS_15basic_streambufIwS2_EE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEb', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEd', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEe', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEf', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEi', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEj', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEl', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEs', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEt', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEx', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEy', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113random_deviceC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113random_deviceC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113random_deviceD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113random_deviceD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113random_deviceclEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113shared_futureIvED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113shared_futureIvED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113shared_futureIvEaSERKS1_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__114__get_const_dbEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__114__num_get_base10__get_baseERNS_8ios_baseE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__114__num_get_base5__srcE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__114__num_put_base12__format_intEPcPKcbj', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__114__num_put_base14__format_floatEPcPKcj', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__114__num_put_base18__identify_paddingEPcS1_RKNS_8ios_baseE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__114__shared_count12__add_sharedEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__114__shared_count16__release_sharedEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__114__shared_countD0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__114__shared_countD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__114__shared_countD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__114basic_iostreamIcNS_11char_traitsIcEEE4swapERS3_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__114basic_iostreamIcNS_11char_traitsIcEEEC1EPNS_15basic_streambufIcS2_EE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__114basic_iostreamIcNS_11char_traitsIcEEEC2EPNS_15basic_streambufIcS2_EE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__114basic_iostreamIcNS_11char_traitsIcEEED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__114basic_iostreamIcNS_11char_traitsIcEEED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__114basic_iostreamIcNS_11char_traitsIcEEED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__114codecvt_bynameIDic11__mbstate_tED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__114codecvt_bynameIDic11__mbstate_tED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__114codecvt_bynameIDic11__mbstate_tED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__114codecvt_bynameIDsc11__mbstate_tED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__114codecvt_bynameIDsc11__mbstate_tED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__114codecvt_bynameIDsc11__mbstate_tED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__114codecvt_bynameIcc11__mbstate_tED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__114codecvt_bynameIcc11__mbstate_tED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__114codecvt_bynameIcc11__mbstate_tED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__114codecvt_bynameIwc11__mbstate_tED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__114codecvt_bynameIwc11__mbstate_tED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__114codecvt_bynameIwc11__mbstate_tED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__114collate_bynameIcEC1EPKcm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__114collate_bynameIcEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__114collate_bynameIcEC2EPKcm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__114collate_bynameIcEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__114collate_bynameIcED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__114collate_bynameIcED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__114collate_bynameIcED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__114collate_bynameIwEC1EPKcm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__114collate_bynameIwEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__114collate_bynameIwEC2EPKcm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__114collate_bynameIwEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__114collate_bynameIwED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__114collate_bynameIwED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__114collate_bynameIwED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__114error_categoryC2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__114error_categoryD0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__114error_categoryD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__114error_categoryD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115__get_classnameEPKcb', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115__thread_struct25notify_all_at_thread_exitEPNS_18condition_variableEPNS_5mutexE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115__thread_struct27__make_ready_at_thread_exitEPNS_17__assoc_sub_stateE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115__thread_structC1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115__thread_structC2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115__thread_structD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115__thread_structD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE10pubseekoffExNS_8ios_base7seekdirEj', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE10pubseekposENS_4fposI11__mbstate_tEEj', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE4setgEPcS4_S4_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE4setpEPcS4_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE4swapERS3_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE4syncEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE5gbumpEi', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE5imbueERKNS_6localeE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE5pbumpEi', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE5sgetcEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE5sgetnEPcl', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE5sputcEc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE5sputnEPKcl', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE5uflowEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE6sbumpcEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE6setbufEPcl', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE6snextcEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE6xsgetnEPcl', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE6xsputnEPKcl', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE7pubsyncEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE7seekoffExNS_8ios_base7seekdirEj', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE7seekposENS_4fposI11__mbstate_tEEj', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE7sungetcEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE8in_availEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE8overflowEi', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE8pubimbueERKNS_6localeE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE9pbackfailEi', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE9pubsetbufEPcl', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE9showmanycEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE9sputbackcEc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE9underflowEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEEC1ERKS3_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEEC1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEEC2ERKS3_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEEC2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115basic_streambufIcNS_11char_traitsIcEEEaSERKS3_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE10pubseekoffExNS_8ios_base7seekdirEj', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE10pubseekposENS_4fposI11__mbstate_tEEj', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE4setgEPwS4_S4_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE4setpEPwS4_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE4swapERS3_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE4syncEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE5gbumpEi', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE5imbueERKNS_6localeE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE5pbumpEi', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE5sgetcEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE5sgetnEPwl', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE5sputcEw', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE5sputnEPKwl', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE5uflowEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE6sbumpcEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE6setbufEPwl', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE6snextcEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE6xsgetnEPwl', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE6xsputnEPKwl', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE7pubsyncEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE7seekoffExNS_8ios_base7seekdirEj', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE7seekposENS_4fposI11__mbstate_tEEj', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE7sungetcEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE8in_availEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE8overflowEi', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE8pubimbueERKNS_6localeE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE9pbackfailEi', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE9pubsetbufEPwl', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE9showmanycEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE9sputbackcEw', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE9underflowEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEEC1ERKS3_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEEC1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEEC2ERKS3_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEEC2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115basic_streambufIwNS_11char_traitsIwEEEaSERKS3_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115future_categoryEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115numpunct_bynameIcE6__initEPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115numpunct_bynameIcEC1EPKcm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115numpunct_bynameIcEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115numpunct_bynameIcEC2EPKcm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115numpunct_bynameIcEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115numpunct_bynameIcED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115numpunct_bynameIcED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115numpunct_bynameIcED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115numpunct_bynameIwE6__initEPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115numpunct_bynameIwEC1EPKcm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115numpunct_bynameIwEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115numpunct_bynameIwEC2EPKcm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115numpunct_bynameIwEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115numpunct_bynameIwED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115numpunct_bynameIwED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115numpunct_bynameIwED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115recursive_mutex4lockEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115recursive_mutex6unlockEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115recursive_mutex8try_lockEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115recursive_mutexC1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115recursive_mutexC2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115recursive_mutexD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115recursive_mutexD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__115system_categoryEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__116__check_groupingERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPjS8_Rj', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__116__narrow_to_utf8ILm16EED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__116__narrow_to_utf8ILm16EED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__116__narrow_to_utf8ILm16EED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__116__narrow_to_utf8ILm32EED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__116__narrow_to_utf8ILm32EED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__116__narrow_to_utf8ILm32EED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__116generic_categoryEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__117__assoc_sub_state10__sub_waitERNS_11unique_lockINS_5mutexEEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__117__assoc_sub_state12__make_readyEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__117__assoc_sub_state13set_exceptionESt13exception_ptr', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__117__assoc_sub_state16__on_zero_sharedEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__117__assoc_sub_state24set_value_at_thread_exitEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__117__assoc_sub_state28set_exception_at_thread_exitESt13exception_ptr', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__117__assoc_sub_state4copyEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__117__assoc_sub_state4waitEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__117__assoc_sub_state9__executeEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__117__assoc_sub_state9set_valueEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__117__widen_from_utf8ILm16EED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__117__widen_from_utf8ILm16EED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__117__widen_from_utf8ILm16EED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__117__widen_from_utf8ILm32EED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__117__widen_from_utf8ILm32EED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__117__widen_from_utf8ILm32EED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__117declare_reachableEPv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__117iostream_categoryEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__117moneypunct_bynameIcLb0EE4initEPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__117moneypunct_bynameIcLb1EE4initEPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__117moneypunct_bynameIwLb0EE4initEPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__117moneypunct_bynameIwLb1EE4initEPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__118__time_get_storageIcE4initERKNS_5ctypeIcEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__118__time_get_storageIcE9__analyzeEcRKNS_5ctypeIcEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__118__time_get_storageIcEC1EPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__118__time_get_storageIcEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__118__time_get_storageIcEC2EPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__118__time_get_storageIcEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__118__time_get_storageIwE4initERKNS_5ctypeIwEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__118__time_get_storageIwE9__analyzeEcRKNS_5ctypeIwEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__118__time_get_storageIwEC1EPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__118__time_get_storageIwEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__118__time_get_storageIwEC2EPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__118__time_get_storageIwEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__118condition_variable10notify_allEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__118condition_variable10notify_oneEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__118condition_variable15__do_timed_waitERNS_11unique_lockINS_5mutexEEENS_6chrono10time_pointINS5_12system_clockENS5_8durationIxNS_5ratioILl1ELl1000000000EEEEEEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__118condition_variable4waitERNS_11unique_lockINS_5mutexEEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__118condition_variableD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__118condition_variableD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__118get_pointer_safetyEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__118shared_timed_mutex11lock_sharedEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__118shared_timed_mutex13unlock_sharedEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__118shared_timed_mutex15try_lock_sharedEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__118shared_timed_mutex4lockEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__118shared_timed_mutex6unlockEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__118shared_timed_mutex8try_lockEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__118shared_timed_mutexC1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__118shared_timed_mutexC2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__119__shared_mutex_base11lock_sharedEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__119__shared_mutex_base13unlock_sharedEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__119__shared_mutex_base15try_lock_sharedEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__119__shared_mutex_base4lockEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__119__shared_mutex_base6unlockEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__119__shared_mutex_base8try_lockEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__119__shared_mutex_baseC1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__119__shared_mutex_baseC2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__119__shared_weak_count10__add_weakEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__119__shared_weak_count12__add_sharedEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__119__shared_weak_count14__release_weakEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__119__shared_weak_count16__release_sharedEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__119__shared_weak_count4lockEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__119__shared_weak_countD0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__119__shared_weak_countD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__119__shared_weak_countD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__119__thread_local_dataEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__119declare_no_pointersEPcm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__119piecewise_constructE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__120__get_collation_nameEPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__120__throw_system_errorEiPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__121__throw_runtime_errorEPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__121__undeclare_reachableEPv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__121recursive_timed_mutex4lockEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__121recursive_timed_mutex6unlockEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__121recursive_timed_mutex8try_lockEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__121recursive_timed_mutexC1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__121recursive_timed_mutexC2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__121recursive_timed_mutexD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__121recursive_timed_mutexD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__121undeclare_no_pointersEPcm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__123__libcpp_debug_functionE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__124__libcpp_debug_exceptionC1ERKNS_19__libcpp_debug_infoE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__124__libcpp_debug_exceptionC1ERKS0_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__124__libcpp_debug_exceptionC1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__124__libcpp_debug_exceptionC2ERKNS_19__libcpp_debug_infoE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__124__libcpp_debug_exceptionC2ERKS0_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__124__libcpp_debug_exceptionC2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__124__libcpp_debug_exceptionD0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__124__libcpp_debug_exceptionD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__124__libcpp_debug_exceptionD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__125notify_all_at_thread_exitERNS_18condition_variableENS_11unique_lockINS_5mutexEEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIaaEEPaEEbT0_S5_T_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIccEEPcEEbT0_S5_T_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIddEEPdEEbT0_S5_T_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIeeEEPeEEbT0_S5_T_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIffEEPfEEbT0_S5_T_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIhhEEPhEEbT0_S5_T_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIiiEEPiEEbT0_S5_T_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIjjEEPjEEbT0_S5_T_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIllEEPlEEbT0_S5_T_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__127__insertion_sort_incompleteIRNS_6__lessImmEEPmEEbT0_S5_T_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIssEEPsEEbT0_S5_T_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIttEEPtEEbT0_S5_T_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIwwEEPwEEbT0_S5_T_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIxxEEPxEEbT0_S5_T_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIyyEEPyEEbT0_S5_T_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__127__libcpp_set_debug_functionEPFvRKNS_19__libcpp_debug_infoEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__129__libcpp_abort_debug_functionERKNS_19__libcpp_debug_infoE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__129__libcpp_throw_debug_functionERKNS_19__libcpp_debug_infoE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__13cinE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__14cerrE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__14clogE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__14coutE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__14stodERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__14stodERKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEEPm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__14stofERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__14stofERKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEEPm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__14stoiERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPmi', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__14stoiERKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEEPmi', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__14stolERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPmi', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__14stolERKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEEPmi', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__14wcinE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__15alignEmmRPvRm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__15ctypeIcE13classic_tableEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__15ctypeIcE2idE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__15ctypeIcEC1EPKjbm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__15ctypeIcEC2EPKjbm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__15ctypeIcED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__15ctypeIcED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__15ctypeIcED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__15ctypeIwE2idE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__15ctypeIwED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__15ctypeIwED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__15ctypeIwED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__15mutex4lockEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__15mutex6unlockEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__15mutex8try_lockEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__15mutexD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__15mutexD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__15stoldERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__15stoldERKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEEPm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__15stollERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPmi', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__15stollERKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEEPmi', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__15stoulERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPmi', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__15stoulERKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEEPmi', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__15wcerrE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__15wclogE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__15wcoutE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__16__itoa8__u32toaEjPc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__16__itoa8__u64toaEyPc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__16__sortIRNS_6__lessIaaEEPaEEvT0_S5_T_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__16__sortIRNS_6__lessIccEEPcEEvT0_S5_T_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__16__sortIRNS_6__lessIddEEPdEEvT0_S5_T_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__16__sortIRNS_6__lessIeeEEPeEEvT0_S5_T_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__16__sortIRNS_6__lessIffEEPfEEvT0_S5_T_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__16__sortIRNS_6__lessIhhEEPhEEvT0_S5_T_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__16__sortIRNS_6__lessIiiEEPiEEvT0_S5_T_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__16__sortIRNS_6__lessIjjEEPjEEvT0_S5_T_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__16__sortIRNS_6__lessIllEEPlEEvT0_S5_T_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__16__sortIRNS_6__lessImmEEPmEEvT0_S5_T_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__16__sortIRNS_6__lessIssEEPsEEvT0_S5_T_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__16__sortIRNS_6__lessIttEEPtEEvT0_S5_T_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__16__sortIRNS_6__lessIwwEEPwEEvT0_S5_T_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__16__sortIRNS_6__lessIxxEEPxEEvT0_S5_T_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__16__sortIRNS_6__lessIyyEEPyEEvT0_S5_T_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__16chrono12steady_clock3nowEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__16chrono12steady_clock9is_steadyE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__16chrono12system_clock11from_time_tEl', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__16chrono12system_clock3nowEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__16chrono12system_clock9is_steadyE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__16chrono12system_clock9to_time_tERKNS0_10time_pointIS1_NS0_8durationIxNS_5ratioILl1ELl1000000EEEEEEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__16futureIvE3getEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__16futureIvEC1EPNS_17__assoc_sub_stateE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__16futureIvEC2EPNS_17__assoc_sub_stateE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__16futureIvED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__16futureIvED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__16gslice6__initEm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__16locale14__install_ctorERKS0_PNS0_5facetEl', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__16locale2id5__getEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__16locale2id6__initEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__16locale2id9__next_idE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__16locale3allE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__16locale4noneE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__16locale4timeE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__16locale5ctypeE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__16locale5facet16__on_zero_sharedEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__16locale5facetD0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__16locale5facetD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__16locale5facetD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__16locale6globalERKS0_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__16locale7classicEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__16locale7collateE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__16locale7numericE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__16locale8__globalEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__16locale8messagesE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__16locale8monetaryE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__16localeC1EPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__16localeC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__16localeC1ERKS0_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__16localeC1ERKS0_PKci', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__16localeC1ERKS0_RKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEi', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__16localeC1ERKS0_S2_i', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__16localeC1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__16localeC2EPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__16localeC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__16localeC2ERKS0_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__16localeC2ERKS0_PKci', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__16localeC2ERKS0_RKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEi', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__16localeC2ERKS0_S2_i', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__16localeC2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__16localeD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__16localeD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__16localeaSERKS0_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__16stoullERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPmi', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__16stoullERKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEEPmi', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__16thread20hardware_concurrencyEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__16thread4joinEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__16thread6detachEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__16threadD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__16threadD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__17__sort5IRNS_6__lessIeeEEPeEEjT0_S5_S5_S5_S5_T_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__17codecvtIDic11__mbstate_tE2idE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__17codecvtIDic11__mbstate_tED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__17codecvtIDic11__mbstate_tED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__17codecvtIDic11__mbstate_tED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__17codecvtIDsc11__mbstate_tE2idE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__17codecvtIDsc11__mbstate_tED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__17codecvtIDsc11__mbstate_tED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__17codecvtIDsc11__mbstate_tED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__17codecvtIcc11__mbstate_tE2idE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__17codecvtIcc11__mbstate_tED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__17codecvtIcc11__mbstate_tED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__17codecvtIcc11__mbstate_tED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__17codecvtIwc11__mbstate_tE2idE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__17codecvtIwc11__mbstate_tEC1EPKcm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__17codecvtIwc11__mbstate_tEC1Em', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__17codecvtIwc11__mbstate_tEC2EPKcm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__17codecvtIwc11__mbstate_tEC2Em', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__17codecvtIwc11__mbstate_tED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__17codecvtIwc11__mbstate_tED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__17codecvtIwc11__mbstate_tED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__17collateIcE2idE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__17collateIcED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__17collateIcED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__17collateIcED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__17collateIwE2idE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__17collateIwED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__17collateIwED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__17collateIwED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE2idE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE2idE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE2idE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE2idE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__17promiseIvE10get_futureEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__17promiseIvE13set_exceptionESt13exception_ptr', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__17promiseIvE24set_value_at_thread_exitEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__17promiseIvE28set_exception_at_thread_exitESt13exception_ptr', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__17promiseIvE9set_valueEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__17promiseIvEC1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__17promiseIvEC2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__17promiseIvED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__17promiseIvED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__18__c_node5__addEPNS_8__i_nodeE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__18__c_nodeD0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__18__c_nodeD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__18__c_nodeD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__18__get_dbEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__18__i_nodeD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__18__i_nodeD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__18__rs_getEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__18__sp_mut4lockEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__18__sp_mut6unlockEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__18ios_base10floatfieldE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__18ios_base10scientificE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__18ios_base11adjustfieldE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__18ios_base15sync_with_stdioEb', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__18ios_base16__call_callbacksENS0_5eventE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__18ios_base17register_callbackEPFvNS0_5eventERS0_iEi', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__18ios_base2inE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__18ios_base33__set_badbit_and_consider_rethrowEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__18ios_base34__set_failbit_and_consider_rethrowEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__18ios_base3appE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__18ios_base3ateE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__18ios_base3decE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__18ios_base3hexE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__18ios_base3octE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__18ios_base3outE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__18ios_base4InitC1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__18ios_base4InitC2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__18ios_base4InitD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__18ios_base4InitD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__18ios_base4initEPv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__18ios_base4leftE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__18ios_base4moveERS0_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__18ios_base4swapERS0_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__18ios_base5clearEj', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__18ios_base5fixedE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__18ios_base5imbueERKNS_6localeE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__18ios_base5iwordEi', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__18ios_base5pwordEi', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__18ios_base5rightE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__18ios_base5truncE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__18ios_base6badbitE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__18ios_base6binaryE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__18ios_base6eofbitE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__18ios_base6skipwsE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__18ios_base6xallocEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__18ios_base7copyfmtERKS0_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__18ios_base7failbitE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__18ios_base7failureC1EPKcRKNS_10error_codeE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__18ios_base7failureC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERKNS_10error_codeE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__18ios_base7failureC2EPKcRKNS_10error_codeE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__18ios_base7failureC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERKNS_10error_codeE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__18ios_base7failureD0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__18ios_base7failureD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__18ios_base7failureD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__18ios_base7goodbitE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__18ios_base7showposE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__18ios_base7unitbufE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__18ios_base8internalE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__18ios_base8showbaseE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__18ios_base9__xindex_E', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__18ios_base9basefieldE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__18ios_base9boolalphaE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__18ios_base9showpointE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__18ios_base9uppercaseE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__18ios_baseD0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__18ios_baseD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__18ios_baseD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__18messagesIcE2idE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__18messagesIwE2idE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__18numpunctIcE2idE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__18numpunctIcEC1Em', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__18numpunctIcEC2Em', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__18numpunctIcED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__18numpunctIcED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__18numpunctIcED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__18numpunctIwE2idE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__18numpunctIwEC1Em', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__18numpunctIwEC2Em', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__18numpunctIwED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__18numpunctIwED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__18numpunctIwED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE2idE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE2idE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__18time_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE2idE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__18time_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE2idE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__18valarrayImE6resizeEmm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__18valarrayImEC1Em', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__18valarrayImEC2Em', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__18valarrayImED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__18valarrayImED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__19__num_getIcE17__stage2_int_loopEciPcRS2_RjcRKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPjRSD_S2_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__19__num_getIcE17__stage2_int_prepERNS_8ios_baseEPcRc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__19__num_getIcE19__stage2_float_loopEcRbRcPcRS4_ccRKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPjRSE_RjS4_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__19__num_getIcE19__stage2_float_prepERNS_8ios_baseEPcRcS5_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__19__num_getIwE17__stage2_int_loopEwiPcRS2_RjwRKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPjRSD_Pw', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__19__num_getIwE17__stage2_int_prepERNS_8ios_baseEPwRw', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__19__num_getIwE19__stage2_float_loopEwRbRcPcRS4_wwRKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPjRSE_RjPw', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__19__num_getIwE19__stage2_float_prepERNS_8ios_baseEPwRwS5_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__19__num_putIcE21__widen_and_group_intEPcS2_S2_S2_RS2_S3_RKNS_6localeE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__19__num_putIcE23__widen_and_group_floatEPcS2_S2_S2_RS2_S3_RKNS_6localeE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__19__num_putIwE21__widen_and_group_intEPcS2_S2_PwRS3_S4_RKNS_6localeE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__19__num_putIwE23__widen_and_group_floatEPcS2_S2_PwRS3_S4_RKNS_6localeE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__19basic_iosIcNS_11char_traitsIcEEE7copyfmtERKS3_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__19basic_iosIcNS_11char_traitsIcEEED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__19basic_iosIcNS_11char_traitsIcEEED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__19basic_iosIcNS_11char_traitsIcEEED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__19basic_iosIwNS_11char_traitsIwEEE7copyfmtERKS3_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__19basic_iosIwNS_11char_traitsIwEEED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__19basic_iosIwNS_11char_traitsIwEEED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__19basic_iosIwNS_11char_traitsIwEEED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__19money_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE2idE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__19money_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE8__do_getERS4_S4_bRKNS_6localeEjRjRbRKNS_5ctypeIcEERNS_10unique_ptrIcPFvPvEEERPcSM_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__19money_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE2idE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__19money_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE8__do_getERS4_S4_bRKNS_6localeEjRjRbRKNS_5ctypeIwEERNS_10unique_ptrIwPFvPvEEERPwSM_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__19money_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE2idE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__19money_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE2idE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__19strstreamD0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__19strstreamD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__19strstreamD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__19to_stringEd', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__19to_stringEe', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__19to_stringEf', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__19to_stringEi', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__19to_stringEj', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__19to_stringEl', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__19to_stringEm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__19to_stringEx', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__19to_stringEy', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__1plIcNS_11char_traitsIcEENS_9allocatorIcEEEENS_12basic_stringIT_T0_T1_EEPKS6_RKS9_', 'type': 'FUNC'} +{'is_defined': False, 'name': '__ZNSt8bad_castC1Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt8bad_castC1Ev', 'type': 'I'} +{'is_defined': False, 'name': '__ZNSt8bad_castC2Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt8bad_castC2Ev', 'type': 'I'} +{'is_defined': False, 'name': '__ZNSt8bad_castD0Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt8bad_castD0Ev', 'type': 'I'} +{'is_defined': False, 'name': '__ZNSt8bad_castD1Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt8bad_castD1Ev', 'type': 'I'} +{'is_defined': False, 'name': '__ZNSt8bad_castD2Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt8bad_castD2Ev', 'type': 'I'} +{'is_defined': False, 'name': '__ZNSt9bad_allocC1Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt9bad_allocC1Ev', 'type': 'I'} +{'is_defined': False, 'name': '__ZNSt9bad_allocC2Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt9bad_allocC2Ev', 'type': 'I'} +{'is_defined': False, 'name': '__ZNSt9bad_allocD0Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt9bad_allocD0Ev', 'type': 'I'} +{'is_defined': False, 'name': '__ZNSt9bad_allocD1Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt9bad_allocD1Ev', 'type': 'I'} +{'is_defined': False, 'name': '__ZNSt9bad_allocD2Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt9bad_allocD2Ev', 'type': 'I'} +{'is_defined': False, 'name': '__ZNSt9exceptionD0Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt9exceptionD0Ev', 'type': 'I'} +{'is_defined': False, 'name': '__ZNSt9exceptionD1Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt9exceptionD1Ev', 'type': 'I'} +{'is_defined': False, 'name': '__ZNSt9exceptionD2Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt9exceptionD2Ev', 'type': 'I'} +{'is_defined': False, 'name': '__ZNSt9type_infoD0Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt9type_infoD0Ev', 'type': 'I'} +{'is_defined': False, 'name': '__ZNSt9type_infoD1Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt9type_infoD1Ev', 'type': 'I'} +{'is_defined': False, 'name': '__ZNSt9type_infoD2Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt9type_infoD2Ev', 'type': 'I'} +{'is_defined': False, 'name': '__ZSt10unexpectedv', 'type': 'U'} +{'is_defined': True, 'name': '__ZSt10unexpectedv', 'type': 'I'} +{'is_defined': False, 'name': '__ZSt13get_terminatev', 'type': 'U'} +{'is_defined': True, 'name': '__ZSt13get_terminatev', 'type': 'I'} +{'is_defined': False, 'name': '__ZSt13set_terminatePFvvE', 'type': 'U'} +{'is_defined': True, 'name': '__ZSt13set_terminatePFvvE', 'type': 'I'} +{'is_defined': False, 'name': '__ZSt14get_unexpectedv', 'type': 'U'} +{'is_defined': True, 'name': '__ZSt14get_unexpectedv', 'type': 'I'} +{'is_defined': False, 'name': '__ZSt14set_unexpectedPFvvE', 'type': 'U'} +{'is_defined': True, 'name': '__ZSt14set_unexpectedPFvvE', 'type': 'I'} +{'is_defined': False, 'name': '__ZSt15get_new_handlerv', 'type': 'U'} +{'is_defined': True, 'name': '__ZSt15get_new_handlerv', 'type': 'I'} +{'is_defined': False, 'name': '__ZSt15set_new_handlerPFvvE', 'type': 'U'} +{'is_defined': True, 'name': '__ZSt15set_new_handlerPFvvE', 'type': 'I'} +{'is_defined': True, 'name': '__ZSt17__throw_bad_allocv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZSt17current_exceptionv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZSt17rethrow_exceptionSt13exception_ptr', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZSt18uncaught_exceptionv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZSt19uncaught_exceptionsv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZSt7nothrow', 'size': 0, 'type': 'OBJECT'} +{'is_defined': False, 'name': '__ZSt9terminatev', 'type': 'U'} +{'is_defined': True, 'name': '__ZSt9terminatev', 'type': 'I'} +{'is_defined': True, 'name': '__ZTCNSt3__110istrstreamE0_NS_13basic_istreamIcNS_11char_traitsIcEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTCNSt3__110ostrstreamE0_NS_13basic_ostreamIcNS_11char_traitsIcEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTCNSt3__114basic_iostreamIcNS_11char_traitsIcEEEE0_NS_13basic_istreamIcS2_EE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTCNSt3__114basic_iostreamIcNS_11char_traitsIcEEEE16_NS_13basic_ostreamIcS2_EE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTCNSt3__19strstreamE0_NS_13basic_istreamIcNS_11char_traitsIcEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTCNSt3__19strstreamE0_NS_14basic_iostreamIcNS_11char_traitsIcEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTCNSt3__19strstreamE16_NS_13basic_ostreamIcNS_11char_traitsIcEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': False, 'name': '__ZTIDi', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIDi', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIDn', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIDn', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIDs', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIDs', 'type': 'I'} +{'is_defined': True, 'name': '__ZTINSt12experimental15fundamentals_v112bad_any_castE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt12experimental19bad_optional_accessE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__110__time_getE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__110__time_putE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__110ctype_baseE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__110istrstreamE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__110money_baseE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__110moneypunctIcLb0EEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__110moneypunctIcLb1EEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__110moneypunctIwLb0EEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__110moneypunctIwLb1EEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__110ostrstreamE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__111__money_getIcEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__111__money_getIwEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__111__money_putIcEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__111__money_putIwEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__111regex_errorE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__112bad_weak_ptrE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__112codecvt_baseE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__112ctype_bynameIcEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__112ctype_bynameIwEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__112future_errorE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__112strstreambufE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__112system_errorE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__113basic_istreamIcNS_11char_traitsIcEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__113basic_istreamIwNS_11char_traitsIwEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__113basic_ostreamIcNS_11char_traitsIcEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__113basic_ostreamIwNS_11char_traitsIwEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__113messages_baseE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__114__codecvt_utf8IDiEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__114__codecvt_utf8IDsEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__114__codecvt_utf8IwEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__114__num_get_baseE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__114__num_put_baseE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__114__shared_countE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__114basic_iostreamIcNS_11char_traitsIcEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__114codecvt_bynameIDic11__mbstate_tEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__114codecvt_bynameIDsc11__mbstate_tEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__114codecvt_bynameIcc11__mbstate_tEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__114codecvt_bynameIwc11__mbstate_tEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__114collate_bynameIcEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__114collate_bynameIwEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__114error_categoryE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__115__codecvt_utf16IDiLb0EEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__115__codecvt_utf16IDiLb1EEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__115__codecvt_utf16IDsLb0EEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__115__codecvt_utf16IDsLb1EEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__115__codecvt_utf16IwLb0EEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__115__codecvt_utf16IwLb1EEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__115basic_streambufIcNS_11char_traitsIcEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__115basic_streambufIwNS_11char_traitsIwEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__115messages_bynameIcEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__115messages_bynameIwEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__115numpunct_bynameIcEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__115numpunct_bynameIwEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__115time_get_bynameIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__115time_get_bynameIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__115time_put_bynameIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__115time_put_bynameIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__116__narrow_to_utf8ILm16EEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__116__narrow_to_utf8ILm32EEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__117__assoc_sub_stateE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__117__widen_from_utf8ILm16EEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__117__widen_from_utf8ILm32EEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__117moneypunct_bynameIcLb0EEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__117moneypunct_bynameIcLb1EEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__117moneypunct_bynameIwLb0EEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__117moneypunct_bynameIwLb1EEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__118__time_get_storageIcEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__118__time_get_storageIwEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__119__shared_weak_countE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__120__codecvt_utf8_utf16IDiEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__120__codecvt_utf8_utf16IDsEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__120__codecvt_utf8_utf16IwEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__120__time_get_c_storageIcEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__120__time_get_c_storageIwEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__124__libcpp_debug_exceptionE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__15ctypeIcEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__15ctypeIwEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__16locale5facetE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__17codecvtIDic11__mbstate_tEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__17codecvtIDsc11__mbstate_tEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__17codecvtIcc11__mbstate_tEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__17codecvtIwc11__mbstate_tEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__17collateIcEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__17collateIwEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__18__c_nodeE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__18ios_base7failureE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__18ios_baseE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__18messagesIcEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__18messagesIwEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__18numpunctIcEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__18numpunctIwEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__18time_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__18time_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__19__num_getIcEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__19__num_getIwEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__19__num_putIcEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__19__num_putIwEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__19basic_iosIcNS_11char_traitsIcEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__19basic_iosIwNS_11char_traitsIwEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__19money_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__19money_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__19money_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__19money_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__19strstreamE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__19time_baseE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': False, 'name': '__ZTIPDi', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIPDi', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIPDn', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIPDn', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIPDs', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIPDs', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIPKDi', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIPKDi', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIPKDn', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIPKDn', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIPKDs', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIPKDs', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIPKa', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIPKa', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIPKb', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIPKb', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIPKc', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIPKc', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIPKd', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIPKd', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIPKe', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIPKe', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIPKf', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIPKf', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIPKh', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIPKh', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIPKi', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIPKi', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIPKj', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIPKj', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIPKl', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIPKl', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIPKm', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIPKm', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIPKs', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIPKs', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIPKt', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIPKt', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIPKv', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIPKv', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIPKw', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIPKw', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIPKx', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIPKx', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIPKy', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIPKy', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIPa', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIPa', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIPb', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIPb', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIPc', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIPc', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIPd', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIPd', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIPe', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIPe', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIPf', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIPf', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIPh', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIPh', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIPi', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIPi', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIPj', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIPj', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIPl', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIPl', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIPm', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIPm', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIPs', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIPs', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIPt', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIPt', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIPv', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIPv', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIPw', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIPw', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIPx', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIPx', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIPy', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIPy', 'type': 'I'} +{'is_defined': False, 'name': '__ZTISt10bad_typeid', 'type': 'U'} +{'is_defined': True, 'name': '__ZTISt10bad_typeid', 'type': 'I'} +{'is_defined': False, 'name': '__ZTISt11logic_error', 'type': 'U'} +{'is_defined': True, 'name': '__ZTISt11logic_error', 'type': 'I'} +{'is_defined': False, 'name': '__ZTISt11range_error', 'type': 'U'} +{'is_defined': True, 'name': '__ZTISt11range_error', 'type': 'I'} +{'is_defined': True, 'name': '__ZTISt12bad_any_cast', 'size': 0, 'type': 'OBJECT'} +{'is_defined': False, 'name': '__ZTISt12domain_error', 'type': 'U'} +{'is_defined': True, 'name': '__ZTISt12domain_error', 'type': 'I'} +{'is_defined': False, 'name': '__ZTISt12length_error', 'type': 'U'} +{'is_defined': True, 'name': '__ZTISt12length_error', 'type': 'I'} +{'is_defined': False, 'name': '__ZTISt12out_of_range', 'type': 'U'} +{'is_defined': True, 'name': '__ZTISt12out_of_range', 'type': 'I'} +{'is_defined': False, 'name': '__ZTISt13bad_exception', 'type': 'U'} +{'is_defined': True, 'name': '__ZTISt13bad_exception', 'type': 'I'} +{'is_defined': False, 'name': '__ZTISt13runtime_error', 'type': 'U'} +{'is_defined': True, 'name': '__ZTISt13runtime_error', 'type': 'I'} +{'is_defined': False, 'name': '__ZTISt14overflow_error', 'type': 'U'} +{'is_defined': True, 'name': '__ZTISt14overflow_error', 'type': 'I'} +{'is_defined': False, 'name': '__ZTISt15underflow_error', 'type': 'U'} +{'is_defined': True, 'name': '__ZTISt15underflow_error', 'type': 'I'} +{'is_defined': False, 'name': '__ZTISt16invalid_argument', 'type': 'U'} +{'is_defined': True, 'name': '__ZTISt16invalid_argument', 'type': 'I'} +{'is_defined': True, 'name': '__ZTISt16nested_exception', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTISt18bad_variant_access', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTISt19bad_optional_access', 'size': 0, 'type': 'OBJECT'} +{'is_defined': False, 'name': '__ZTISt20bad_array_new_length', 'type': 'U'} +{'is_defined': True, 'name': '__ZTISt20bad_array_new_length', 'type': 'I'} +{'is_defined': False, 'name': '__ZTISt8bad_cast', 'type': 'U'} +{'is_defined': True, 'name': '__ZTISt8bad_cast', 'type': 'I'} +{'is_defined': False, 'name': '__ZTISt9bad_alloc', 'type': 'U'} +{'is_defined': True, 'name': '__ZTISt9bad_alloc', 'type': 'I'} +{'is_defined': False, 'name': '__ZTISt9exception', 'type': 'U'} +{'is_defined': True, 'name': '__ZTISt9exception', 'type': 'I'} +{'is_defined': False, 'name': '__ZTISt9type_info', 'type': 'U'} +{'is_defined': True, 'name': '__ZTISt9type_info', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIa', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIa', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIb', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIb', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIc', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIc', 'type': 'I'} +{'is_defined': False, 'name': '__ZTId', 'type': 'U'} +{'is_defined': True, 'name': '__ZTId', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIe', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIe', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIf', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIf', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIh', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIh', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIi', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIi', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIj', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIj', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIl', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIl', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIm', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIm', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIs', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIs', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIt', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIt', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIv', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIv', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIw', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIw', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIx', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIx', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIy', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIy', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSDi', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSDi', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSDn', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSDn', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSDs', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSDs', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSN10__cxxabiv116__enum_type_infoE', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSN10__cxxabiv116__enum_type_infoE', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSN10__cxxabiv117__array_type_infoE', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSN10__cxxabiv117__array_type_infoE', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSN10__cxxabiv117__class_type_infoE', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSN10__cxxabiv117__class_type_infoE', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSN10__cxxabiv117__pbase_type_infoE', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSN10__cxxabiv117__pbase_type_infoE', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSN10__cxxabiv119__pointer_type_infoE', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSN10__cxxabiv119__pointer_type_infoE', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSN10__cxxabiv120__function_type_infoE', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSN10__cxxabiv120__function_type_infoE', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSN10__cxxabiv120__si_class_type_infoE', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSN10__cxxabiv120__si_class_type_infoE', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSN10__cxxabiv121__vmi_class_type_infoE', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSN10__cxxabiv121__vmi_class_type_infoE', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSN10__cxxabiv123__fundamental_type_infoE', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSN10__cxxabiv123__fundamental_type_infoE', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSN10__cxxabiv129__pointer_to_member_type_infoE', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSN10__cxxabiv129__pointer_to_member_type_infoE', 'type': 'I'} +{'is_defined': True, 'name': '__ZTSNSt12experimental15fundamentals_v112bad_any_castE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt12experimental19bad_optional_accessE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__110ctype_baseE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__110istrstreamE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__110money_baseE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__110moneypunctIcLb0EEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__110moneypunctIcLb1EEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__110moneypunctIwLb0EEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__110moneypunctIwLb1EEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__110ostrstreamE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__111regex_errorE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__112bad_weak_ptrE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__112codecvt_baseE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__112ctype_bynameIcEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__112ctype_bynameIwEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__112future_errorE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__112strstreambufE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__112system_errorE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__113basic_istreamIcNS_11char_traitsIcEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__113basic_istreamIwNS_11char_traitsIwEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__113basic_ostreamIcNS_11char_traitsIcEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__113basic_ostreamIwNS_11char_traitsIwEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__113messages_baseE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__114basic_iostreamIcNS_11char_traitsIcEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__114collate_bynameIcEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__114collate_bynameIwEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__114error_categoryE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__115basic_streambufIcNS_11char_traitsIcEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__115basic_streambufIwNS_11char_traitsIwEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__115messages_bynameIcEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__115messages_bynameIwEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__115numpunct_bynameIcEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__115numpunct_bynameIwEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__115time_get_bynameIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__115time_get_bynameIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__115time_put_bynameIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__115time_put_bynameIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__117moneypunct_bynameIcLb0EEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__117moneypunct_bynameIcLb1EEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__117moneypunct_bynameIwLb0EEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__117moneypunct_bynameIwLb1EEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__15ctypeIcEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__15ctypeIwEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__16locale5facetE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__17codecvtIDic11__mbstate_tEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__17codecvtIDsc11__mbstate_tEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__17codecvtIcc11__mbstate_tEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__17codecvtIwc11__mbstate_tEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__17collateIcEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__17collateIwEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__18__c_nodeE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__18ios_base7failureE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__18ios_baseE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__18messagesIcEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__18messagesIwEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__18numpunctIcEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__18numpunctIwEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__18time_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__18time_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__19__num_getIcEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__19__num_getIwEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__19__num_putIcEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__19__num_putIwEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__19basic_iosIcNS_11char_traitsIcEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__19basic_iosIwNS_11char_traitsIwEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__19money_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__19money_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__19money_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__19money_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__19strstreamE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__19time_baseE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': False, 'name': '__ZTSPDi', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSPDi', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSPDn', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSPDn', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSPDs', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSPDs', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSPKDi', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSPKDi', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSPKDn', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSPKDn', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSPKDs', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSPKDs', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSPKa', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSPKa', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSPKb', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSPKb', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSPKc', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSPKc', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSPKd', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSPKd', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSPKe', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSPKe', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSPKf', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSPKf', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSPKh', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSPKh', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSPKi', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSPKi', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSPKj', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSPKj', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSPKl', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSPKl', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSPKm', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSPKm', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSPKs', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSPKs', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSPKt', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSPKt', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSPKv', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSPKv', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSPKw', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSPKw', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSPKx', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSPKx', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSPKy', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSPKy', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSPa', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSPa', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSPb', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSPb', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSPc', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSPc', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSPd', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSPd', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSPe', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSPe', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSPf', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSPf', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSPh', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSPh', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSPi', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSPi', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSPj', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSPj', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSPl', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSPl', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSPm', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSPm', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSPs', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSPs', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSPt', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSPt', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSPv', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSPv', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSPw', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSPw', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSPx', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSPx', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSPy', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSPy', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSSt10bad_typeid', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSSt10bad_typeid', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSSt11logic_error', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSSt11logic_error', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSSt11range_error', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSSt11range_error', 'type': 'I'} +{'is_defined': True, 'name': '__ZTSSt12bad_any_cast', 'size': 0, 'type': 'OBJECT'} +{'is_defined': False, 'name': '__ZTSSt12domain_error', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSSt12domain_error', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSSt12length_error', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSSt12length_error', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSSt12out_of_range', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSSt12out_of_range', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSSt13bad_exception', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSSt13bad_exception', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSSt13runtime_error', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSSt13runtime_error', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSSt14overflow_error', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSSt14overflow_error', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSSt15underflow_error', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSSt15underflow_error', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSSt16invalid_argument', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSSt16invalid_argument', 'type': 'I'} +{'is_defined': True, 'name': '__ZTSSt16nested_exception', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSSt18bad_variant_access', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSSt19bad_optional_access', 'size': 0, 'type': 'OBJECT'} +{'is_defined': False, 'name': '__ZTSSt20bad_array_new_length', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSSt20bad_array_new_length', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSSt8bad_cast', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSSt8bad_cast', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSSt9bad_alloc', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSSt9bad_alloc', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSSt9exception', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSSt9exception', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSSt9type_info', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSSt9type_info', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSa', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSa', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSb', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSb', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSc', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSc', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSd', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSd', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSe', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSe', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSf', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSf', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSh', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSh', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSi', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSi', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSj', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSj', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSl', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSl', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSm', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSm', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSs', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSs', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSt', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSt', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSv', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSv', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSw', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSw', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSx', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSx', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSy', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSy', 'type': 'I'} +{'is_defined': True, 'name': '__ZTTNSt3__110istrstreamE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTTNSt3__110ostrstreamE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTTNSt3__113basic_istreamIcNS_11char_traitsIcEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTTNSt3__113basic_istreamIwNS_11char_traitsIwEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTTNSt3__113basic_ostreamIcNS_11char_traitsIcEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTTNSt3__113basic_ostreamIwNS_11char_traitsIwEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTTNSt3__114basic_iostreamIcNS_11char_traitsIcEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTTNSt3__19strstreamE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': False, 'name': '__ZTVN10__cxxabiv116__enum_type_infoE', 'type': 'U'} +{'is_defined': True, 'name': '__ZTVN10__cxxabiv116__enum_type_infoE', 'type': 'I'} +{'is_defined': False, 'name': '__ZTVN10__cxxabiv117__array_type_infoE', 'type': 'U'} +{'is_defined': True, 'name': '__ZTVN10__cxxabiv117__array_type_infoE', 'type': 'I'} +{'is_defined': False, 'name': '__ZTVN10__cxxabiv117__class_type_infoE', 'type': 'U'} +{'is_defined': True, 'name': '__ZTVN10__cxxabiv117__class_type_infoE', 'type': 'I'} +{'is_defined': False, 'name': '__ZTVN10__cxxabiv117__pbase_type_infoE', 'type': 'U'} +{'is_defined': True, 'name': '__ZTVN10__cxxabiv117__pbase_type_infoE', 'type': 'I'} +{'is_defined': False, 'name': '__ZTVN10__cxxabiv119__pointer_type_infoE', 'type': 'U'} +{'is_defined': True, 'name': '__ZTVN10__cxxabiv119__pointer_type_infoE', 'type': 'I'} +{'is_defined': False, 'name': '__ZTVN10__cxxabiv120__function_type_infoE', 'type': 'U'} +{'is_defined': True, 'name': '__ZTVN10__cxxabiv120__function_type_infoE', 'type': 'I'} +{'is_defined': False, 'name': '__ZTVN10__cxxabiv120__si_class_type_infoE', 'type': 'U'} +{'is_defined': True, 'name': '__ZTVN10__cxxabiv120__si_class_type_infoE', 'type': 'I'} +{'is_defined': False, 'name': '__ZTVN10__cxxabiv121__vmi_class_type_infoE', 'type': 'U'} +{'is_defined': True, 'name': '__ZTVN10__cxxabiv121__vmi_class_type_infoE', 'type': 'I'} +{'is_defined': False, 'name': '__ZTVN10__cxxabiv123__fundamental_type_infoE', 'type': 'U'} +{'is_defined': True, 'name': '__ZTVN10__cxxabiv123__fundamental_type_infoE', 'type': 'I'} +{'is_defined': False, 'name': '__ZTVN10__cxxabiv129__pointer_to_member_type_infoE', 'type': 'U'} +{'is_defined': True, 'name': '__ZTVN10__cxxabiv129__pointer_to_member_type_infoE', 'type': 'I'} +{'is_defined': True, 'name': '__ZTVNSt12experimental15fundamentals_v112bad_any_castE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt12experimental19bad_optional_accessE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__110istrstreamE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__110moneypunctIcLb0EEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__110moneypunctIcLb1EEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__110moneypunctIwLb0EEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__110moneypunctIwLb1EEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__110ostrstreamE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__111regex_errorE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__112bad_weak_ptrE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__112ctype_bynameIcEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__112ctype_bynameIwEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__112future_errorE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__112strstreambufE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__112system_errorE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__113basic_istreamIcNS_11char_traitsIcEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__113basic_istreamIwNS_11char_traitsIwEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__113basic_ostreamIcNS_11char_traitsIcEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__113basic_ostreamIwNS_11char_traitsIwEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__114__codecvt_utf8IDiEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__114__codecvt_utf8IDsEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__114__codecvt_utf8IwEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__114__shared_countE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__114basic_iostreamIcNS_11char_traitsIcEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__114codecvt_bynameIDic11__mbstate_tEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__114codecvt_bynameIDsc11__mbstate_tEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__114codecvt_bynameIcc11__mbstate_tEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__114codecvt_bynameIwc11__mbstate_tEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__114collate_bynameIcEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__114collate_bynameIwEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__114error_categoryE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__115__codecvt_utf16IDiLb0EEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__115__codecvt_utf16IDiLb1EEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__115__codecvt_utf16IDsLb0EEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__115__codecvt_utf16IDsLb1EEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__115__codecvt_utf16IwLb0EEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__115__codecvt_utf16IwLb1EEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__115basic_streambufIcNS_11char_traitsIcEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__115basic_streambufIwNS_11char_traitsIwEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__115messages_bynameIcEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__115messages_bynameIwEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__115numpunct_bynameIcEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__115numpunct_bynameIwEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__115time_get_bynameIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__115time_get_bynameIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__115time_put_bynameIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__115time_put_bynameIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__116__narrow_to_utf8ILm16EEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__116__narrow_to_utf8ILm32EEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__117__assoc_sub_stateE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__117__widen_from_utf8ILm16EEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__117__widen_from_utf8ILm32EEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__117moneypunct_bynameIcLb0EEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__117moneypunct_bynameIcLb1EEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__117moneypunct_bynameIwLb0EEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__117moneypunct_bynameIwLb1EEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__119__shared_weak_countE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__120__codecvt_utf8_utf16IDiEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__120__codecvt_utf8_utf16IDsEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__120__codecvt_utf8_utf16IwEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__124__libcpp_debug_exceptionE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__15ctypeIcEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__15ctypeIwEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__16locale5facetE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__17codecvtIDic11__mbstate_tEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__17codecvtIDsc11__mbstate_tEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__17codecvtIcc11__mbstate_tEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__17codecvtIwc11__mbstate_tEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__17collateIcEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__17collateIwEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__18__c_nodeE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__18ios_base7failureE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__18ios_baseE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__18messagesIcEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__18messagesIwEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__18numpunctIcEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__18numpunctIwEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__18time_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__18time_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__19basic_iosIcNS_11char_traitsIcEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__19basic_iosIwNS_11char_traitsIwEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__19money_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__19money_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__19money_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__19money_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__19strstreamE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': False, 'name': '__ZTVSt10bad_typeid', 'type': 'U'} +{'is_defined': True, 'name': '__ZTVSt10bad_typeid', 'type': 'I'} +{'is_defined': False, 'name': '__ZTVSt11logic_error', 'type': 'U'} +{'is_defined': True, 'name': '__ZTVSt11logic_error', 'type': 'I'} +{'is_defined': False, 'name': '__ZTVSt11range_error', 'type': 'U'} +{'is_defined': True, 'name': '__ZTVSt11range_error', 'type': 'I'} +{'is_defined': True, 'name': '__ZTVSt12bad_any_cast', 'size': 0, 'type': 'OBJECT'} +{'is_defined': False, 'name': '__ZTVSt12domain_error', 'type': 'U'} +{'is_defined': True, 'name': '__ZTVSt12domain_error', 'type': 'I'} +{'is_defined': False, 'name': '__ZTVSt12length_error', 'type': 'U'} +{'is_defined': True, 'name': '__ZTVSt12length_error', 'type': 'I'} +{'is_defined': False, 'name': '__ZTVSt12out_of_range', 'type': 'U'} +{'is_defined': True, 'name': '__ZTVSt12out_of_range', 'type': 'I'} +{'is_defined': False, 'name': '__ZTVSt13bad_exception', 'type': 'U'} +{'is_defined': True, 'name': '__ZTVSt13bad_exception', 'type': 'I'} +{'is_defined': False, 'name': '__ZTVSt13runtime_error', 'type': 'U'} +{'is_defined': True, 'name': '__ZTVSt13runtime_error', 'type': 'I'} +{'is_defined': False, 'name': '__ZTVSt14overflow_error', 'type': 'U'} +{'is_defined': True, 'name': '__ZTVSt14overflow_error', 'type': 'I'} +{'is_defined': False, 'name': '__ZTVSt15underflow_error', 'type': 'U'} +{'is_defined': True, 'name': '__ZTVSt15underflow_error', 'type': 'I'} +{'is_defined': False, 'name': '__ZTVSt16invalid_argument', 'type': 'U'} +{'is_defined': True, 'name': '__ZTVSt16invalid_argument', 'type': 'I'} +{'is_defined': True, 'name': '__ZTVSt16nested_exception', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVSt18bad_variant_access', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVSt19bad_optional_access', 'size': 0, 'type': 'OBJECT'} +{'is_defined': False, 'name': '__ZTVSt20bad_array_new_length', 'type': 'U'} +{'is_defined': True, 'name': '__ZTVSt20bad_array_new_length', 'type': 'I'} +{'is_defined': False, 'name': '__ZTVSt8bad_cast', 'type': 'U'} +{'is_defined': True, 'name': '__ZTVSt8bad_cast', 'type': 'I'} +{'is_defined': False, 'name': '__ZTVSt9bad_alloc', 'type': 'U'} +{'is_defined': True, 'name': '__ZTVSt9bad_alloc', 'type': 'I'} +{'is_defined': False, 'name': '__ZTVSt9exception', 'type': 'U'} +{'is_defined': True, 'name': '__ZTVSt9exception', 'type': 'I'} +{'is_defined': False, 'name': '__ZTVSt9type_info', 'type': 'U'} +{'is_defined': True, 'name': '__ZTVSt9type_info', 'type': 'I'} +{'is_defined': True, 'name': '__ZThn16_NSt3__114basic_iostreamIcNS_11char_traitsIcEEED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZThn16_NSt3__114basic_iostreamIcNS_11char_traitsIcEEED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZThn16_NSt3__19strstreamD0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZThn16_NSt3__19strstreamD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZTv0_n24_NSt3__110istrstreamD0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZTv0_n24_NSt3__110istrstreamD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZTv0_n24_NSt3__110ostrstreamD0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZTv0_n24_NSt3__110ostrstreamD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZTv0_n24_NSt3__113basic_istreamIcNS_11char_traitsIcEEED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZTv0_n24_NSt3__113basic_istreamIcNS_11char_traitsIcEEED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZTv0_n24_NSt3__113basic_istreamIwNS_11char_traitsIwEEED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZTv0_n24_NSt3__113basic_istreamIwNS_11char_traitsIwEEED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZTv0_n24_NSt3__113basic_ostreamIcNS_11char_traitsIcEEED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZTv0_n24_NSt3__113basic_ostreamIcNS_11char_traitsIcEEED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZTv0_n24_NSt3__113basic_ostreamIwNS_11char_traitsIwEEED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZTv0_n24_NSt3__113basic_ostreamIwNS_11char_traitsIwEEED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZTv0_n24_NSt3__114basic_iostreamIcNS_11char_traitsIcEEED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZTv0_n24_NSt3__114basic_iostreamIcNS_11char_traitsIcEEED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZTv0_n24_NSt3__19strstreamD0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZTv0_n24_NSt3__19strstreamD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZdaPv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZdaPvRKSt9nothrow_t', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZdaPvSt11align_val_t', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZdaPvSt11align_val_tRKSt9nothrow_t', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZdaPvm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZdaPvmSt11align_val_t', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZdlPv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZdlPvRKSt9nothrow_t', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZdlPvSt11align_val_t', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZdlPvSt11align_val_tRKSt9nothrow_t', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZdlPvm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZdlPvmSt11align_val_t', 'type': 'FUNC'} +{'is_defined': True, 'name': '__Znam', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZnamRKSt9nothrow_t', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZnamSt11align_val_t', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZnamSt11align_val_tRKSt9nothrow_t', 'type': 'FUNC'} +{'is_defined': True, 'name': '__Znwm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZnwmRKSt9nothrow_t', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZnwmSt11align_val_t', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZnwmSt11align_val_tRKSt9nothrow_t', 'type': 'FUNC'} +{'is_defined': False, 'name': '___cxa_allocate_exception', 'type': 'U'} +{'is_defined': True, 'name': '___cxa_allocate_exception', 'type': 'I'} +{'is_defined': False, 'name': '___cxa_atexit', 'type': 'U'} +{'is_defined': False, 'name': '___cxa_bad_cast', 'type': 'U'} +{'is_defined': True, 'name': '___cxa_bad_cast', 'type': 'I'} +{'is_defined': False, 'name': '___cxa_bad_typeid', 'type': 'U'} +{'is_defined': True, 'name': '___cxa_bad_typeid', 'type': 'I'} +{'is_defined': False, 'name': '___cxa_begin_catch', 'type': 'U'} +{'is_defined': True, 'name': '___cxa_begin_catch', 'type': 'I'} +{'is_defined': False, 'name': '___cxa_call_unexpected', 'type': 'U'} +{'is_defined': True, 'name': '___cxa_call_unexpected', 'type': 'I'} +{'is_defined': False, 'name': '___cxa_current_exception_type', 'type': 'U'} +{'is_defined': True, 'name': '___cxa_current_exception_type', 'type': 'I'} +{'is_defined': False, 'name': '___cxa_current_primary_exception', 'type': 'U'} +{'is_defined': False, 'name': '___cxa_decrement_exception_refcount', 'type': 'U'} +{'is_defined': False, 'name': '___cxa_deleted_virtual', 'type': 'U'} +{'is_defined': True, 'name': '___cxa_deleted_virtual', 'type': 'I'} +{'is_defined': False, 'name': '___cxa_demangle', 'type': 'U'} +{'is_defined': True, 'name': '___cxa_demangle', 'type': 'I'} +{'is_defined': False, 'name': '___cxa_end_catch', 'type': 'U'} +{'is_defined': True, 'name': '___cxa_end_catch', 'type': 'I'} +{'is_defined': False, 'name': '___cxa_free_exception', 'type': 'U'} +{'is_defined': True, 'name': '___cxa_free_exception', 'type': 'I'} +{'is_defined': False, 'name': '___cxa_get_exception_ptr', 'type': 'U'} +{'is_defined': True, 'name': '___cxa_get_exception_ptr', 'type': 'I'} +{'is_defined': False, 'name': '___cxa_get_globals', 'type': 'U'} +{'is_defined': True, 'name': '___cxa_get_globals', 'type': 'I'} +{'is_defined': False, 'name': '___cxa_get_globals_fast', 'type': 'U'} +{'is_defined': True, 'name': '___cxa_get_globals_fast', 'type': 'I'} +{'is_defined': False, 'name': '___cxa_guard_abort', 'type': 'U'} +{'is_defined': True, 'name': '___cxa_guard_abort', 'type': 'I'} +{'is_defined': False, 'name': '___cxa_guard_acquire', 'type': 'U'} +{'is_defined': True, 'name': '___cxa_guard_acquire', 'type': 'I'} +{'is_defined': False, 'name': '___cxa_guard_release', 'type': 'U'} +{'is_defined': True, 'name': '___cxa_guard_release', 'type': 'I'} +{'is_defined': False, 'name': '___cxa_increment_exception_refcount', 'type': 'U'} +{'is_defined': False, 'name': '___cxa_pure_virtual', 'type': 'U'} +{'is_defined': True, 'name': '___cxa_pure_virtual', 'type': 'I'} +{'is_defined': False, 'name': '___cxa_rethrow', 'type': 'U'} +{'is_defined': True, 'name': '___cxa_rethrow', 'type': 'I'} +{'is_defined': False, 'name': '___cxa_rethrow_primary_exception', 'type': 'U'} +{'is_defined': False, 'name': '___cxa_throw', 'type': 'U'} +{'is_defined': True, 'name': '___cxa_throw', 'type': 'I'} +{'is_defined': False, 'name': '___cxa_uncaught_exceptions', 'type': 'U'} +{'is_defined': False, 'name': '___cxa_vec_cctor', 'type': 'U'} +{'is_defined': True, 'name': '___cxa_vec_cctor', 'type': 'I'} +{'is_defined': False, 'name': '___cxa_vec_cleanup', 'type': 'U'} +{'is_defined': True, 'name': '___cxa_vec_cleanup', 'type': 'I'} +{'is_defined': False, 'name': '___cxa_vec_ctor', 'type': 'U'} +{'is_defined': True, 'name': '___cxa_vec_ctor', 'type': 'I'} +{'is_defined': False, 'name': '___cxa_vec_delete', 'type': 'U'} +{'is_defined': True, 'name': '___cxa_vec_delete', 'type': 'I'} +{'is_defined': False, 'name': '___cxa_vec_delete2', 'type': 'U'} +{'is_defined': True, 'name': '___cxa_vec_delete2', 'type': 'I'} +{'is_defined': False, 'name': '___cxa_vec_delete3', 'type': 'U'} +{'is_defined': True, 'name': '___cxa_vec_delete3', 'type': 'I'} +{'is_defined': False, 'name': '___cxa_vec_dtor', 'type': 'U'} +{'is_defined': True, 'name': '___cxa_vec_dtor', 'type': 'I'} +{'is_defined': False, 'name': '___cxa_vec_new', 'type': 'U'} +{'is_defined': True, 'name': '___cxa_vec_new', 'type': 'I'} +{'is_defined': False, 'name': '___cxa_vec_new2', 'type': 'U'} +{'is_defined': True, 'name': '___cxa_vec_new2', 'type': 'I'} +{'is_defined': False, 'name': '___cxa_vec_new3', 'type': 'U'} +{'is_defined': True, 'name': '___cxa_vec_new3', 'type': 'I'} +{'is_defined': False, 'name': '___dynamic_cast', 'type': 'U'} +{'is_defined': True, 'name': '___dynamic_cast', 'type': 'I'} +{'is_defined': False, 'name': '___gxx_personality_v0', 'type': 'U'} +{'is_defined': True, 'name': '___gxx_personality_v0', 'type': 'I'} diff --git a/libcxx/lib/abi/x86_64-apple-darwin.v2.abilist b/libcxx/lib/abi/x86_64-apple-darwin.v2.abilist index 5880a3bfd4f6f..90ea1ebb0ec66 100644 --- a/libcxx/lib/abi/x86_64-apple-darwin.v2.abilist +++ b/libcxx/lib/abi/x86_64-apple-darwin.v2.abilist @@ -1,2315 +1,2321 @@ -{'type': 'U', 'is_defined': False, 'name': '__ZNKSt10bad_typeid4whatEv'} -{'type': 'I', 'is_defined': True, 'name': '__ZNKSt10bad_typeid4whatEv'} -{'type': 'U', 'is_defined': False, 'name': '__ZNKSt11logic_error4whatEv'} -{'type': 'I', 'is_defined': True, 'name': '__ZNKSt11logic_error4whatEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt12bad_any_cast4whatEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt12experimental15fundamentals_v112bad_any_cast4whatEv'} -{'type': 'U', 'is_defined': False, 'name': '__ZNKSt13bad_exception4whatEv'} -{'type': 'I', 'is_defined': True, 'name': '__ZNKSt13bad_exception4whatEv'} -{'type': 'U', 'is_defined': False, 'name': '__ZNKSt13runtime_error4whatEv'} -{'type': 'I', 'is_defined': True, 'name': '__ZNKSt13runtime_error4whatEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt16nested_exception14rethrow_nestedEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt18bad_variant_access4whatEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt19bad_optional_access4whatEv'} -{'type': 'U', 'is_defined': False, 'name': '__ZNKSt20bad_array_new_length4whatEv'} -{'type': 'I', 'is_defined': True, 'name': '__ZNKSt20bad_array_new_length4whatEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__210__time_put8__do_putEPcRS1_PK2tmcc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__210__time_put8__do_putEPwRS1_PK2tmcc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__210error_code7messageEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__210moneypunctIcLb0EE11do_groupingEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__210moneypunctIcLb0EE13do_neg_formatEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__210moneypunctIcLb0EE13do_pos_formatEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__210moneypunctIcLb0EE14do_curr_symbolEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__210moneypunctIcLb0EE14do_frac_digitsEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__210moneypunctIcLb0EE16do_decimal_pointEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__210moneypunctIcLb0EE16do_negative_signEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__210moneypunctIcLb0EE16do_positive_signEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__210moneypunctIcLb0EE16do_thousands_sepEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__210moneypunctIcLb1EE11do_groupingEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__210moneypunctIcLb1EE13do_neg_formatEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__210moneypunctIcLb1EE13do_pos_formatEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__210moneypunctIcLb1EE14do_curr_symbolEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__210moneypunctIcLb1EE14do_frac_digitsEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__210moneypunctIcLb1EE16do_decimal_pointEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__210moneypunctIcLb1EE16do_negative_signEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__210moneypunctIcLb1EE16do_positive_signEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__210moneypunctIcLb1EE16do_thousands_sepEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__210moneypunctIwLb0EE11do_groupingEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__210moneypunctIwLb0EE13do_neg_formatEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__210moneypunctIwLb0EE13do_pos_formatEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__210moneypunctIwLb0EE14do_curr_symbolEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__210moneypunctIwLb0EE14do_frac_digitsEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__210moneypunctIwLb0EE16do_decimal_pointEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__210moneypunctIwLb0EE16do_negative_signEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__210moneypunctIwLb0EE16do_positive_signEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__210moneypunctIwLb0EE16do_thousands_sepEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__210moneypunctIwLb1EE11do_groupingEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__210moneypunctIwLb1EE13do_neg_formatEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__210moneypunctIwLb1EE13do_pos_formatEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__210moneypunctIwLb1EE14do_curr_symbolEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__210moneypunctIwLb1EE14do_frac_digitsEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__210moneypunctIwLb1EE16do_decimal_pointEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__210moneypunctIwLb1EE16do_negative_signEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__210moneypunctIwLb1EE16do_positive_signEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__210moneypunctIwLb1EE16do_thousands_sepEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__211__libcpp_db15__decrementableEPKv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__211__libcpp_db15__find_c_from_iEPv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__211__libcpp_db15__subscriptableEPKvl'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__211__libcpp_db17__dereferenceableEPKv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__211__libcpp_db17__find_c_and_lockEPv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__211__libcpp_db22__less_than_comparableEPKvS2_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__211__libcpp_db6unlockEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__211__libcpp_db8__find_cEPv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__211__libcpp_db9__addableEPKvl'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__212bad_weak_ptr4whatEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE12find_last_ofEPKcmm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE13find_first_ofEPKcmm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE16find_last_not_ofEPKcmm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE17find_first_not_ofEPKcmm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE2atEm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4copyEPcmm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4findEPKcmm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4findEcm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE5rfindEPKcmm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE5rfindEcm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7compareEPKc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7compareEmmPKc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7compareEmmPKcm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7compareEmmRKS5_mm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE12find_last_ofEPKwmm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE13find_first_ofEPKwmm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE16find_last_not_ofEPKwmm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE17find_first_not_ofEPKwmm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE2atEm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE4copyEPwmm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE4findEPKwmm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE4findEwm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE5rfindEPKwmm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE5rfindEwm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7compareEPKw'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7compareEmmPKw'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7compareEmmPKwm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7compareEmmRKS5_mm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__212ctype_bynameIcE10do_tolowerEPcPKc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__212ctype_bynameIcE10do_tolowerEc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__212ctype_bynameIcE10do_toupperEPcPKc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__212ctype_bynameIcE10do_toupperEc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__212ctype_bynameIwE10do_scan_isEjPKwS3_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__212ctype_bynameIwE10do_tolowerEPwPKw'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__212ctype_bynameIwE10do_tolowerEw'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__212ctype_bynameIwE10do_toupperEPwPKw'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__212ctype_bynameIwE10do_toupperEw'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__212ctype_bynameIwE11do_scan_notEjPKwS3_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__212ctype_bynameIwE5do_isEPKwS3_Pj'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__212ctype_bynameIwE5do_isEjw'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__212ctype_bynameIwE8do_widenEPKcS3_Pw'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__212ctype_bynameIwE8do_widenEc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__212ctype_bynameIwE9do_narrowEPKwS3_cPc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__212ctype_bynameIwE9do_narrowEwc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__212strstreambuf6pcountEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__213random_device7entropyEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__214__codecvt_utf8IDiE10do_unshiftER11__mbstate_tPcS4_RS4_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__214__codecvt_utf8IDiE11do_encodingEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__214__codecvt_utf8IDiE13do_max_lengthEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__214__codecvt_utf8IDiE16do_always_noconvEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__214__codecvt_utf8IDiE5do_inER11__mbstate_tPKcS5_RS5_PDiS7_RS7_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__214__codecvt_utf8IDiE6do_outER11__mbstate_tPKDiS5_RS5_PcS7_RS7_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__214__codecvt_utf8IDiE9do_lengthER11__mbstate_tPKcS5_m'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__214__codecvt_utf8IDsE10do_unshiftER11__mbstate_tPcS4_RS4_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__214__codecvt_utf8IDsE11do_encodingEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__214__codecvt_utf8IDsE13do_max_lengthEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__214__codecvt_utf8IDsE16do_always_noconvEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__214__codecvt_utf8IDsE5do_inER11__mbstate_tPKcS5_RS5_PDsS7_RS7_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__214__codecvt_utf8IDsE6do_outER11__mbstate_tPKDsS5_RS5_PcS7_RS7_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__214__codecvt_utf8IDsE9do_lengthER11__mbstate_tPKcS5_m'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__214__codecvt_utf8IwE10do_unshiftER11__mbstate_tPcS4_RS4_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__214__codecvt_utf8IwE11do_encodingEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__214__codecvt_utf8IwE13do_max_lengthEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__214__codecvt_utf8IwE16do_always_noconvEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__214__codecvt_utf8IwE5do_inER11__mbstate_tPKcS5_RS5_PwS7_RS7_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__214__codecvt_utf8IwE6do_outER11__mbstate_tPKwS5_RS5_PcS7_RS7_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__214__codecvt_utf8IwE9do_lengthER11__mbstate_tPKcS5_m'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__214collate_bynameIcE10do_compareEPKcS3_S3_S3_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__214collate_bynameIcE12do_transformEPKcS3_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__214collate_bynameIwE10do_compareEPKwS3_S3_S3_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__214collate_bynameIwE12do_transformEPKwS3_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__214error_category10equivalentERKNS_10error_codeEi'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__214error_category10equivalentEiRKNS_15error_conditionE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__214error_category23default_error_conditionEi'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IDiLb0EE10do_unshiftER11__mbstate_tPcS4_RS4_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IDiLb0EE11do_encodingEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IDiLb0EE13do_max_lengthEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IDiLb0EE16do_always_noconvEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IDiLb0EE5do_inER11__mbstate_tPKcS5_RS5_PDiS7_RS7_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IDiLb0EE6do_outER11__mbstate_tPKDiS5_RS5_PcS7_RS7_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IDiLb0EE9do_lengthER11__mbstate_tPKcS5_m'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IDiLb1EE10do_unshiftER11__mbstate_tPcS4_RS4_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IDiLb1EE11do_encodingEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IDiLb1EE13do_max_lengthEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IDiLb1EE16do_always_noconvEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IDiLb1EE5do_inER11__mbstate_tPKcS5_RS5_PDiS7_RS7_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IDiLb1EE6do_outER11__mbstate_tPKDiS5_RS5_PcS7_RS7_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IDiLb1EE9do_lengthER11__mbstate_tPKcS5_m'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IDsLb0EE10do_unshiftER11__mbstate_tPcS4_RS4_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IDsLb0EE11do_encodingEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IDsLb0EE13do_max_lengthEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IDsLb0EE16do_always_noconvEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IDsLb0EE5do_inER11__mbstate_tPKcS5_RS5_PDsS7_RS7_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IDsLb0EE6do_outER11__mbstate_tPKDsS5_RS5_PcS7_RS7_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IDsLb0EE9do_lengthER11__mbstate_tPKcS5_m'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IDsLb1EE10do_unshiftER11__mbstate_tPcS4_RS4_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IDsLb1EE11do_encodingEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IDsLb1EE13do_max_lengthEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IDsLb1EE16do_always_noconvEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IDsLb1EE5do_inER11__mbstate_tPKcS5_RS5_PDsS7_RS7_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IDsLb1EE6do_outER11__mbstate_tPKDsS5_RS5_PcS7_RS7_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IDsLb1EE9do_lengthER11__mbstate_tPKcS5_m'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IwLb0EE10do_unshiftER11__mbstate_tPcS4_RS4_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IwLb0EE11do_encodingEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IwLb0EE13do_max_lengthEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IwLb0EE16do_always_noconvEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IwLb0EE5do_inER11__mbstate_tPKcS5_RS5_PwS7_RS7_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IwLb0EE6do_outER11__mbstate_tPKwS5_RS5_PcS7_RS7_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IwLb0EE9do_lengthER11__mbstate_tPKcS5_m'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IwLb1EE10do_unshiftER11__mbstate_tPcS4_RS4_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IwLb1EE11do_encodingEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IwLb1EE13do_max_lengthEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IwLb1EE16do_always_noconvEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IwLb1EE5do_inER11__mbstate_tPKcS5_RS5_PwS7_RS7_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IwLb1EE6do_outER11__mbstate_tPKwS5_RS5_PcS7_RS7_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IwLb1EE9do_lengthER11__mbstate_tPKcS5_m'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__215error_condition7messageEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__217bad_function_call4whatEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIcLb0EE11do_groupingEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIcLb0EE13do_neg_formatEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIcLb0EE13do_pos_formatEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIcLb0EE14do_curr_symbolEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIcLb0EE14do_frac_digitsEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIcLb0EE16do_decimal_pointEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIcLb0EE16do_negative_signEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIcLb0EE16do_positive_signEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIcLb0EE16do_thousands_sepEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIcLb1EE11do_groupingEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIcLb1EE13do_neg_formatEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIcLb1EE13do_pos_formatEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIcLb1EE14do_curr_symbolEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIcLb1EE14do_frac_digitsEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIcLb1EE16do_decimal_pointEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIcLb1EE16do_negative_signEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIcLb1EE16do_positive_signEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIcLb1EE16do_thousands_sepEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIwLb0EE11do_groupingEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIwLb0EE13do_neg_formatEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIwLb0EE13do_pos_formatEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIwLb0EE14do_curr_symbolEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIwLb0EE14do_frac_digitsEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIwLb0EE16do_decimal_pointEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIwLb0EE16do_negative_signEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIwLb0EE16do_positive_signEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIwLb0EE16do_thousands_sepEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIwLb1EE11do_groupingEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIwLb1EE13do_neg_formatEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIwLb1EE13do_pos_formatEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIwLb1EE14do_curr_symbolEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIwLb1EE14do_frac_digitsEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIwLb1EE16do_decimal_pointEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIwLb1EE16do_negative_signEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIwLb1EE16do_positive_signEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIwLb1EE16do_thousands_sepEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__218__time_get_storageIcE15__do_date_orderEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__218__time_get_storageIwE15__do_date_orderEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__219__shared_weak_count13__get_deleterERKSt9type_info'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__220__codecvt_utf8_utf16IDiE10do_unshiftER11__mbstate_tPcS4_RS4_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__220__codecvt_utf8_utf16IDiE11do_encodingEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__220__codecvt_utf8_utf16IDiE13do_max_lengthEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__220__codecvt_utf8_utf16IDiE16do_always_noconvEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__220__codecvt_utf8_utf16IDiE5do_inER11__mbstate_tPKcS5_RS5_PDiS7_RS7_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__220__codecvt_utf8_utf16IDiE6do_outER11__mbstate_tPKDiS5_RS5_PcS7_RS7_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__220__codecvt_utf8_utf16IDiE9do_lengthER11__mbstate_tPKcS5_m'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__220__codecvt_utf8_utf16IDsE10do_unshiftER11__mbstate_tPcS4_RS4_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__220__codecvt_utf8_utf16IDsE11do_encodingEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__220__codecvt_utf8_utf16IDsE13do_max_lengthEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__220__codecvt_utf8_utf16IDsE16do_always_noconvEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__220__codecvt_utf8_utf16IDsE5do_inER11__mbstate_tPKcS5_RS5_PDsS7_RS7_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__220__codecvt_utf8_utf16IDsE6do_outER11__mbstate_tPKDsS5_RS5_PcS7_RS7_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__220__codecvt_utf8_utf16IDsE9do_lengthER11__mbstate_tPKcS5_m'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__220__codecvt_utf8_utf16IwE10do_unshiftER11__mbstate_tPcS4_RS4_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__220__codecvt_utf8_utf16IwE11do_encodingEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__220__codecvt_utf8_utf16IwE13do_max_lengthEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__220__codecvt_utf8_utf16IwE16do_always_noconvEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__220__codecvt_utf8_utf16IwE5do_inER11__mbstate_tPKcS5_RS5_PwS7_RS7_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__220__codecvt_utf8_utf16IwE6do_outER11__mbstate_tPKwS5_RS5_PcS7_RS7_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__220__codecvt_utf8_utf16IwE9do_lengthER11__mbstate_tPKcS5_m'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__220__time_get_c_storageIcE3__XEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__220__time_get_c_storageIcE3__cEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__220__time_get_c_storageIcE3__rEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__220__time_get_c_storageIcE3__xEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__220__time_get_c_storageIcE7__am_pmEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__220__time_get_c_storageIcE7__weeksEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__220__time_get_c_storageIcE8__monthsEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__220__time_get_c_storageIwE3__XEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__220__time_get_c_storageIwE3__cEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__220__time_get_c_storageIwE3__rEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__220__time_get_c_storageIwE3__xEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__220__time_get_c_storageIwE7__am_pmEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__220__time_get_c_storageIwE7__weeksEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__220__time_get_c_storageIwE8__monthsEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__220__vector_base_commonILb1EE20__throw_length_errorEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__220__vector_base_commonILb1EE20__throw_out_of_rangeEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__221__basic_string_commonILb1EE20__throw_length_errorEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__221__basic_string_commonILb1EE20__throw_out_of_rangeEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__223__match_any_but_newlineIcE6__execERNS_7__stateIcEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__223__match_any_but_newlineIwE6__execERNS_7__stateIwEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__224__libcpp_debug_exception4whatEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__25ctypeIcE10do_tolowerEPcPKc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__25ctypeIcE10do_tolowerEc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__25ctypeIcE10do_toupperEPcPKc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__25ctypeIcE10do_toupperEc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__25ctypeIcE8do_widenEPKcS3_Pc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__25ctypeIcE8do_widenEc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__25ctypeIcE9do_narrowEPKcS3_cPc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__25ctypeIcE9do_narrowEcc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__25ctypeIwE10do_scan_isEjPKwS3_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__25ctypeIwE10do_tolowerEPwPKw'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__25ctypeIwE10do_tolowerEw'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__25ctypeIwE10do_toupperEPwPKw'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__25ctypeIwE10do_toupperEw'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__25ctypeIwE11do_scan_notEjPKwS3_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__25ctypeIwE5do_isEPKwS3_Pj'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__25ctypeIwE5do_isEjw'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__25ctypeIwE8do_widenEPKcS3_Pw'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__25ctypeIwE8do_widenEc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__25ctypeIwE9do_narrowEPKwS3_cPc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__25ctypeIwE9do_narrowEwc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__26locale4nameEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__26locale9has_facetERNS0_2idE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__26locale9use_facetERNS0_2idE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__26localeeqERKS0_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27codecvtIDic11__mbstate_tE10do_unshiftERS1_PcS4_RS4_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27codecvtIDic11__mbstate_tE11do_encodingEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27codecvtIDic11__mbstate_tE13do_max_lengthEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27codecvtIDic11__mbstate_tE16do_always_noconvEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27codecvtIDic11__mbstate_tE5do_inERS1_PKcS5_RS5_PDiS7_RS7_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27codecvtIDic11__mbstate_tE6do_outERS1_PKDiS5_RS5_PcS7_RS7_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27codecvtIDic11__mbstate_tE9do_lengthERS1_PKcS5_m'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27codecvtIDsc11__mbstate_tE10do_unshiftERS1_PcS4_RS4_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27codecvtIDsc11__mbstate_tE11do_encodingEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27codecvtIDsc11__mbstate_tE13do_max_lengthEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27codecvtIDsc11__mbstate_tE16do_always_noconvEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27codecvtIDsc11__mbstate_tE5do_inERS1_PKcS5_RS5_PDsS7_RS7_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27codecvtIDsc11__mbstate_tE6do_outERS1_PKDsS5_RS5_PcS7_RS7_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27codecvtIDsc11__mbstate_tE9do_lengthERS1_PKcS5_m'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27codecvtIcc11__mbstate_tE10do_unshiftERS1_PcS4_RS4_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27codecvtIcc11__mbstate_tE11do_encodingEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27codecvtIcc11__mbstate_tE13do_max_lengthEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27codecvtIcc11__mbstate_tE16do_always_noconvEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27codecvtIcc11__mbstate_tE5do_inERS1_PKcS5_RS5_PcS7_RS7_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27codecvtIcc11__mbstate_tE6do_outERS1_PKcS5_RS5_PcS7_RS7_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27codecvtIcc11__mbstate_tE9do_lengthERS1_PKcS5_m'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27codecvtIwc11__mbstate_tE10do_unshiftERS1_PcS4_RS4_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27codecvtIwc11__mbstate_tE11do_encodingEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27codecvtIwc11__mbstate_tE13do_max_lengthEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27codecvtIwc11__mbstate_tE16do_always_noconvEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27codecvtIwc11__mbstate_tE5do_inERS1_PKcS5_RS5_PwS7_RS7_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27codecvtIwc11__mbstate_tE6do_outERS1_PKwS5_RS5_PcS7_RS7_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27codecvtIwc11__mbstate_tE9do_lengthERS1_PKcS5_m'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27collateIcE10do_compareEPKcS3_S3_S3_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27collateIcE12do_transformEPKcS3_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27collateIcE7do_hashEPKcS3_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27collateIwE10do_compareEPKwS3_S3_S3_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27collateIwE12do_transformEPKwS3_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27collateIwE7do_hashEPKwS3_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRPv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRb'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRd'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRe'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRf'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRl'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRt'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRx'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRy'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjS8_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRPv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRb'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRd'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRe'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRf'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRl'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRt'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRx'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRy'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjS8_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEcPKv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEcb'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEcd'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEce'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEcl'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEcm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEcx'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEcy'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwPKv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwb'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwd'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwe'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwl'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwx'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__27num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwy'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28ios_base6getlocEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28messagesIcE6do_getEliiRKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28messagesIcE7do_openERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERKNS_6localeE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28messagesIcE8do_closeEl'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28messagesIwE6do_getEliiRKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28messagesIwE7do_openERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERKNS_6localeE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28messagesIwE8do_closeEl'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28numpunctIcE11do_groupingEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28numpunctIcE11do_truenameEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28numpunctIcE12do_falsenameEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28numpunctIcE16do_decimal_pointEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28numpunctIcE16do_thousands_sepEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28numpunctIwE11do_groupingEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28numpunctIwE11do_truenameEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28numpunctIwE12do_falsenameEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28numpunctIwE16do_decimal_pointEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28numpunctIwE16do_thousands_sepEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE10__get_hourERiRS4_S4_RjRKNS_5ctypeIcEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE10__get_yearERiRS4_S4_RjRKNS_5ctypeIcEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE11__get_am_pmERiRS4_S4_RjRKNS_5ctypeIcEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE11__get_monthERiRS4_S4_RjRKNS_5ctypeIcEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE11__get_year4ERiRS4_S4_RjRKNS_5ctypeIcEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE11do_get_dateES4_S4_RNS_8ios_baseERjP2tm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE11do_get_timeES4_S4_RNS_8ios_baseERjP2tm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE11do_get_yearES4_S4_RNS_8ios_baseERjP2tm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE12__get_minuteERiRS4_S4_RjRKNS_5ctypeIcEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE12__get_secondERiRS4_S4_RjRKNS_5ctypeIcEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE13__get_12_hourERiRS4_S4_RjRKNS_5ctypeIcEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE13__get_percentERS4_S4_RjRKNS_5ctypeIcEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE13__get_weekdayERiRS4_S4_RjRKNS_5ctypeIcEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE13do_date_orderEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE14do_get_weekdayES4_S4_RNS_8ios_baseERjP2tm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE15__get_monthnameERiRS4_S4_RjRKNS_5ctypeIcEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE16do_get_monthnameES4_S4_RNS_8ios_baseERjP2tm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE17__get_weekdaynameERiRS4_S4_RjRKNS_5ctypeIcEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE17__get_white_spaceERS4_S4_RjRKNS_5ctypeIcEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE18__get_day_year_numERiRS4_S4_RjRKNS_5ctypeIcEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE3getES4_S4_RNS_8ios_baseERjP2tmPKcSC_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjP2tmcc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE9__get_dayERiRS4_S4_RjRKNS_5ctypeIcEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE10__get_hourERiRS4_S4_RjRKNS_5ctypeIwEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE10__get_yearERiRS4_S4_RjRKNS_5ctypeIwEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE11__get_am_pmERiRS4_S4_RjRKNS_5ctypeIwEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE11__get_monthERiRS4_S4_RjRKNS_5ctypeIwEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE11__get_year4ERiRS4_S4_RjRKNS_5ctypeIwEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE11do_get_dateES4_S4_RNS_8ios_baseERjP2tm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE11do_get_timeES4_S4_RNS_8ios_baseERjP2tm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE11do_get_yearES4_S4_RNS_8ios_baseERjP2tm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE12__get_minuteERiRS4_S4_RjRKNS_5ctypeIwEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE12__get_secondERiRS4_S4_RjRKNS_5ctypeIwEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE13__get_12_hourERiRS4_S4_RjRKNS_5ctypeIwEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE13__get_percentERS4_S4_RjRKNS_5ctypeIwEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE13__get_weekdayERiRS4_S4_RjRKNS_5ctypeIwEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE13do_date_orderEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE14do_get_weekdayES4_S4_RNS_8ios_baseERjP2tm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE15__get_monthnameERiRS4_S4_RjRKNS_5ctypeIwEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE16do_get_monthnameES4_S4_RNS_8ios_baseERjP2tm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE17__get_weekdaynameERiRS4_S4_RjRKNS_5ctypeIwEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE17__get_white_spaceERS4_S4_RjRKNS_5ctypeIwEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE18__get_day_year_numERiRS4_S4_RjRKNS_5ctypeIwEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE3getES4_S4_RNS_8ios_baseERjP2tmPKwSC_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjP2tmcc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE9__get_dayERiRS4_S4_RjRKNS_5ctypeIwEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28time_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE3putES4_RNS_8ios_baseEcPK2tmPKcSC_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28time_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEcPK2tmcc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28time_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE3putES4_RNS_8ios_baseEwPK2tmPKwSC_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__28time_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwPK2tmcc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__29__num_getIcE10__do_widenERNS_8ios_baseEPc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__29__num_getIcE12__do_widen_pERNS_8ios_baseEPc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__29__num_getIwE10__do_widenERNS_8ios_baseEPw'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__29__num_getIwE12__do_widen_pERNS_8ios_baseEPc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__29money_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_bRNS_8ios_baseERjRNS_12basic_stringIcS3_NS_9allocatorIcEEEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__29money_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_bRNS_8ios_baseERjRe'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__29money_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_bRNS_8ios_baseERjRNS_12basic_stringIwS3_NS_9allocatorIwEEEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__29money_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_bRNS_8ios_baseERjRe'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__29money_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_bRNS_8ios_baseEcRKNS_12basic_stringIcS3_NS_9allocatorIcEEEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__29money_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_bRNS_8ios_baseEce'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__29money_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_bRNS_8ios_baseEwRKNS_12basic_stringIwS3_NS_9allocatorIwEEEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__29money_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_bRNS_8ios_baseEwe'} -{'type': 'U', 'is_defined': False, 'name': '__ZNKSt8bad_cast4whatEv'} -{'type': 'I', 'is_defined': True, 'name': '__ZNKSt8bad_cast4whatEv'} -{'type': 'U', 'is_defined': False, 'name': '__ZNKSt9bad_alloc4whatEv'} -{'type': 'I', 'is_defined': True, 'name': '__ZNKSt9bad_alloc4whatEv'} -{'type': 'U', 'is_defined': False, 'name': '__ZNKSt9exception4whatEv'} -{'type': 'I', 'is_defined': True, 'name': '__ZNKSt9exception4whatEv'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt10bad_typeidC1Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt10bad_typeidC1Ev'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt10bad_typeidC2Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt10bad_typeidC2Ev'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt10bad_typeidD0Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt10bad_typeidD0Ev'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt10bad_typeidD1Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt10bad_typeidD1Ev'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt10bad_typeidD2Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt10bad_typeidD2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt11logic_errorC1EPKc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt11logic_errorC1ERKNSt3__212basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt11logic_errorC1ERKS_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt11logic_errorC2EPKc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt11logic_errorC2ERKNSt3__212basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt11logic_errorC2ERKS_'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt11logic_errorD0Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt11logic_errorD0Ev'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt11logic_errorD1Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt11logic_errorD1Ev'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt11logic_errorD2Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt11logic_errorD2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt11logic_erroraSERKS_'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt11range_errorD0Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt11range_errorD0Ev'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt11range_errorD1Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt11range_errorD1Ev'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt11range_errorD2Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt11range_errorD2Ev'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt12domain_errorD0Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt12domain_errorD0Ev'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt12domain_errorD1Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt12domain_errorD1Ev'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt12domain_errorD2Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt12domain_errorD2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt12experimental19bad_optional_accessD0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt12experimental19bad_optional_accessD1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt12experimental19bad_optional_accessD2Ev'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt12length_errorD0Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt12length_errorD0Ev'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt12length_errorD1Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt12length_errorD1Ev'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt12length_errorD2Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt12length_errorD2Ev'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt12out_of_rangeD0Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt12out_of_rangeD0Ev'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt12out_of_rangeD1Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt12out_of_rangeD1Ev'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt12out_of_rangeD2Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt12out_of_rangeD2Ev'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt13bad_exceptionD0Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt13bad_exceptionD0Ev'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt13bad_exceptionD1Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt13bad_exceptionD1Ev'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt13bad_exceptionD2Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt13bad_exceptionD2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt13exception_ptrC1ERKS_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt13exception_ptrC2ERKS_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt13exception_ptrD1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt13exception_ptrD2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt13exception_ptraSERKS_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt13runtime_errorC1EPKc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt13runtime_errorC1ERKNSt3__212basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt13runtime_errorC1ERKS_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt13runtime_errorC2EPKc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt13runtime_errorC2ERKNSt3__212basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt13runtime_errorC2ERKS_'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt13runtime_errorD0Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt13runtime_errorD0Ev'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt13runtime_errorD1Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt13runtime_errorD1Ev'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt13runtime_errorD2Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt13runtime_errorD2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt13runtime_erroraSERKS_'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt14overflow_errorD0Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt14overflow_errorD0Ev'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt14overflow_errorD1Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt14overflow_errorD1Ev'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt14overflow_errorD2Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt14overflow_errorD2Ev'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt15underflow_errorD0Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt15underflow_errorD0Ev'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt15underflow_errorD1Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt15underflow_errorD1Ev'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt15underflow_errorD2Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt15underflow_errorD2Ev'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt16invalid_argumentD0Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt16invalid_argumentD0Ev'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt16invalid_argumentD1Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt16invalid_argumentD1Ev'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt16invalid_argumentD2Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt16invalid_argumentD2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt16nested_exceptionC1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt16nested_exceptionC2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt16nested_exceptionD0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt16nested_exceptionD1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt16nested_exceptionD2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt19bad_optional_accessD0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt19bad_optional_accessD1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt19bad_optional_accessD2Ev'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt20bad_array_new_lengthC1Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt20bad_array_new_lengthC1Ev'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt20bad_array_new_lengthC2Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt20bad_array_new_lengthC2Ev'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt20bad_array_new_lengthD0Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt20bad_array_new_lengthD0Ev'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt20bad_array_new_lengthD1Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt20bad_array_new_lengthD1Ev'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt20bad_array_new_lengthD2Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt20bad_array_new_lengthD2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__210__time_getC1EPKc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__210__time_getC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__210__time_getC2EPKc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__210__time_getC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__210__time_getD1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__210__time_getD2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__210__time_putC1EPKc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__210__time_putC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__210__time_putC2EPKc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__210__time_putC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__210__time_putD1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__210__time_putD2Ev'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__210adopt_lockE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__210ctype_base5alnumE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__210ctype_base5alphaE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__210ctype_base5blankE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__210ctype_base5cntrlE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__210ctype_base5digitE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__210ctype_base5graphE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__210ctype_base5lowerE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__210ctype_base5printE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__210ctype_base5punctE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__210ctype_base5spaceE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__210ctype_base5upperE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__210ctype_base6xdigitE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__210defer_lockE', 'size': 0} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__210istrstreamD0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__210istrstreamD1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__210istrstreamD2Ev'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__210moneypunctIcLb0EE2idE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__210moneypunctIcLb0EE4intlE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__210moneypunctIcLb1EE2idE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__210moneypunctIcLb1EE4intlE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__210moneypunctIwLb0EE2idE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__210moneypunctIwLb0EE4intlE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__210moneypunctIwLb1EE2idE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__210moneypunctIwLb1EE4intlE', 'size': 0} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__210ostrstreamD0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__210ostrstreamD1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__210ostrstreamD2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__210to_wstringEd'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__210to_wstringEe'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__210to_wstringEf'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__210to_wstringEi'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__210to_wstringEj'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__210to_wstringEl'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__210to_wstringEm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__210to_wstringEx'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__210to_wstringEy'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__211__call_onceERVmPvPFvS2_E'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__211__libcpp_db10__insert_cEPv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__211__libcpp_db10__insert_iEPv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__211__libcpp_db11__insert_icEPvPKv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__211__libcpp_db15__iterator_copyEPvPKv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__211__libcpp_db16__invalidate_allEPv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__211__libcpp_db4swapEPvS1_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__211__libcpp_db9__erase_cEPv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__211__libcpp_db9__erase_iEPv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__211__libcpp_dbC1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__211__libcpp_dbC2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__211__libcpp_dbD1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__211__libcpp_dbD2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__211__money_getIcE13__gather_infoEbRKNS_6localeERNS_10money_base7patternERcS8_RNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEESF_SF_SF_Ri'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__211__money_getIwE13__gather_infoEbRKNS_6localeERNS_10money_base7patternERwS8_RNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERNS9_IwNSA_IwEENSC_IwEEEESJ_SJ_Ri'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__211__money_putIcE13__gather_infoEbbRKNS_6localeERNS_10money_base7patternERcS8_RNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEESF_SF_Ri'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__211__money_putIcE8__formatEPcRS2_S3_jPKcS5_RKNS_5ctypeIcEEbRKNS_10money_base7patternEccRKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEESL_SL_i'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__211__money_putIwE13__gather_infoEbbRKNS_6localeERNS_10money_base7patternERwS8_RNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERNS9_IwNSA_IwEENSC_IwEEEESJ_Ri'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__211__money_putIwE8__formatEPwRS2_S3_jPKwS5_RKNS_5ctypeIwEEbRKNS_10money_base7patternEwwRKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERKNSE_IwNSF_IwEENSH_IwEEEESQ_i'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__211regex_errorC1ENS_15regex_constants10error_typeE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__211regex_errorC2ENS_15regex_constants10error_typeE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__211regex_errorD0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__211regex_errorD1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__211regex_errorD2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__211this_thread9sleep_forERKNS_6chrono8durationIxNS_5ratioILl1ELl1000000000EEEEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__211timed_mutex4lockEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__211timed_mutex6unlockEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__211timed_mutex8try_lockEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__211timed_mutexC1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__211timed_mutexC2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__211timed_mutexD1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__211timed_mutexD2Ev'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__211try_to_lockE', 'size': 0} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212__do_nothingEPv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212__get_sp_mutEPKv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212__next_primeEm'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__212__rs_default4__c_E', 'size': 0} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212__rs_defaultC1ERKS0_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212__rs_defaultC1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212__rs_defaultC2ERKS0_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212__rs_defaultC2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212__rs_defaultD1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212__rs_defaultD2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212__rs_defaultclEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212bad_weak_ptrD0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212bad_weak_ptrD1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212bad_weak_ptrD2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE21__grow_by_and_replaceEmmmmmmPKc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE2atEm'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4nposE', 'size': 0} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE5eraseEmm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcmm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEmc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6appendEPKc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6appendEPKcm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6appendERKS5_mm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6appendEmc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignEPKc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignEPKcm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignERKS5_mm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignEmc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6insertENS_11__wrap_iterIPKcEEc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6insertEmPKc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6insertEmPKcm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6insertEmRKS5_mm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6insertEmmc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6resizeEmc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7replaceEmmPKc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7replaceEmmPKcm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7replaceEmmRKS5_mm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7replaceEmmmc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7reserveEm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9__grow_byEmmmmmm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9push_backEc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC1ERKS5_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC1ERKS5_RKS4_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC1ERKS5_mmRKS4_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2ERKS5_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2ERKS5_RKS4_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2ERKS5_mmRKS4_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEaSERKS5_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEaSEc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE21__grow_by_and_replaceEmmmmmmPKw'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE2atEm'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE4nposE', 'size': 0} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE5eraseEmm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6__initEPKwm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6__initEPKwmm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6__initEmw'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6appendEPKw'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6appendEPKwm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6appendERKS5_mm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6appendEmw'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6assignEPKw'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6assignEPKwm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6assignERKS5_mm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6assignEmw'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6insertENS_11__wrap_iterIPKwEEw'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6insertEmPKw'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6insertEmPKwm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6insertEmRKS5_mm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6insertEmmw'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6resizeEmw'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7replaceEmmPKw'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7replaceEmmPKwm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7replaceEmmRKS5_mm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7replaceEmmmw'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7reserveEm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE9__grow_byEmmmmmm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE9push_backEw'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC1ERKS5_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC1ERKS5_RKS4_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC1ERKS5_mmRKS4_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC2ERKS5_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC2ERKS5_RKS4_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC2ERKS5_mmRKS4_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEED1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEED2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEaSERKS5_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEaSEw'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212ctype_bynameIcEC1EPKcm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212ctype_bynameIcEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212ctype_bynameIcEC2EPKcm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212ctype_bynameIcEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212ctype_bynameIcED0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212ctype_bynameIcED1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212ctype_bynameIcED2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212ctype_bynameIwEC1EPKcm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212ctype_bynameIwEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212ctype_bynameIwEC2EPKcm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212ctype_bynameIwEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212ctype_bynameIwED0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212ctype_bynameIwED1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212ctype_bynameIwED2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212future_errorC1ENS_10error_codeE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212future_errorC2ENS_10error_codeE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212future_errorD0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212future_errorD1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212future_errorD2Ev'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__212placeholders2_1E', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__212placeholders2_2E', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__212placeholders2_3E', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__212placeholders2_4E', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__212placeholders2_5E', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__212placeholders2_6E', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__212placeholders2_7E', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__212placeholders2_8E', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__212placeholders2_9E', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__212placeholders3_10E', 'size': 0} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212strstreambuf3strEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212strstreambuf4swapERS0_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212strstreambuf6__initEPclS1_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212strstreambuf6freezeEb'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212strstreambuf7seekoffExNS_8ios_base7seekdirEj'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212strstreambuf7seekposENS_4fposI11__mbstate_tEEj'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212strstreambuf8overflowEi'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212strstreambuf9pbackfailEi'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212strstreambuf9underflowEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212strstreambufC1EPFPvmEPFvS1_E'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212strstreambufC1EPKal'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212strstreambufC1EPKcl'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212strstreambufC1EPKhl'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212strstreambufC1EPalS1_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212strstreambufC1EPclS1_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212strstreambufC1EPhlS1_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212strstreambufC1El'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212strstreambufC2EPFPvmEPFvS1_E'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212strstreambufC2EPKal'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212strstreambufC2EPKcl'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212strstreambufC2EPKhl'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212strstreambufC2EPalS1_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212strstreambufC2EPclS1_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212strstreambufC2EPhlS1_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212strstreambufC2El'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212strstreambufD0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212strstreambufD1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212strstreambufD2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212system_error6__initERKNS_10error_codeENS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212system_errorC1ENS_10error_codeE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212system_errorC1ENS_10error_codeEPKc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212system_errorC1ENS_10error_codeERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212system_errorC1EiRKNS_14error_categoryE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212system_errorC1EiRKNS_14error_categoryEPKc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212system_errorC1EiRKNS_14error_categoryERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212system_errorC2ENS_10error_codeE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212system_errorC2ENS_10error_codeEPKc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212system_errorC2ENS_10error_codeERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212system_errorC2EiRKNS_14error_categoryE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212system_errorC2EiRKNS_14error_categoryEPKc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212system_errorC2EiRKNS_14error_categoryERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212system_errorD0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212system_errorD1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212system_errorD2Ev'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__213allocator_argE', 'size': 0} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEE3getEPclc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEE3getERNS_15basic_streambufIcS2_EEc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEE3getEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEE4peekEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEE4readEPcl'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEE4syncEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEE5seekgENS_4fposI11__mbstate_tEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEE5seekgExNS_8ios_base7seekdirE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEE5tellgEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEE5ungetEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEE6ignoreEli'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEE6sentryC1ERS3_b'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEE6sentryC2ERS3_b'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEE7getlineEPclc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEE7putbackEc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEE8readsomeEPcl'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEED0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEED1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEED2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEErsEPNS_15basic_streambufIcS2_EE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEErsERPv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEErsERb'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEErsERd'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEErsERe'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEErsERf'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEErsERi'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEErsERj'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEErsERl'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEErsERm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEErsERs'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEErsERt'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEErsERx'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEErsERy'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEE3getEPwlw'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEE3getERNS_15basic_streambufIwS2_EEw'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEE3getEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEE4peekEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEE4readEPwl'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEE4syncEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEE5seekgENS_4fposI11__mbstate_tEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEE5seekgExNS_8ios_base7seekdirE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEE5tellgEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEE5ungetEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEE6ignoreEli'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEE6sentryC1ERS3_b'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEE6sentryC2ERS3_b'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEE7getlineEPwlw'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEE7putbackEw'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEE8readsomeEPwl'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEED0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEED1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEED2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEErsEPNS_15basic_streambufIwS2_EE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEErsERPv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEErsERb'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEErsERd'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEErsERe'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEErsERf'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEErsERi'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEErsERj'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEErsERl'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEErsERm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEErsERs'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEErsERt'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEErsERx'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEErsERy'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIcNS_11char_traitsIcEEE3putEc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIcNS_11char_traitsIcEEE5flushEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIcNS_11char_traitsIcEEE5writeEPKcl'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIcNS_11char_traitsIcEEE6sentryC1ERS3_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIcNS_11char_traitsIcEEE6sentryC2ERS3_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIcNS_11char_traitsIcEEE6sentryD1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIcNS_11char_traitsIcEEE6sentryD2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIcNS_11char_traitsIcEEED0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIcNS_11char_traitsIcEEED1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIcNS_11char_traitsIcEEED2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIcNS_11char_traitsIcEEElsEPKv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIcNS_11char_traitsIcEEElsEPNS_15basic_streambufIcS2_EE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIcNS_11char_traitsIcEEElsEb'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIcNS_11char_traitsIcEEElsEd'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIcNS_11char_traitsIcEEElsEe'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIcNS_11char_traitsIcEEElsEf'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIcNS_11char_traitsIcEEElsEi'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIcNS_11char_traitsIcEEElsEj'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIcNS_11char_traitsIcEEElsEl'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIcNS_11char_traitsIcEEElsEm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIcNS_11char_traitsIcEEElsEs'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIcNS_11char_traitsIcEEElsEt'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIcNS_11char_traitsIcEEElsEx'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIcNS_11char_traitsIcEEElsEy'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIwNS_11char_traitsIwEEE3putEw'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIwNS_11char_traitsIwEEE5flushEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIwNS_11char_traitsIwEEE5writeEPKwl'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIwNS_11char_traitsIwEEE6sentryC1ERS3_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIwNS_11char_traitsIwEEE6sentryC2ERS3_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIwNS_11char_traitsIwEEE6sentryD1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIwNS_11char_traitsIwEEE6sentryD2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIwNS_11char_traitsIwEEED0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIwNS_11char_traitsIwEEED1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIwNS_11char_traitsIwEEED2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIwNS_11char_traitsIwEEElsEPKv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIwNS_11char_traitsIwEEElsEPNS_15basic_streambufIwS2_EE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIwNS_11char_traitsIwEEElsEb'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIwNS_11char_traitsIwEEElsEd'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIwNS_11char_traitsIwEEElsEe'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIwNS_11char_traitsIwEEElsEf'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIwNS_11char_traitsIwEEElsEi'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIwNS_11char_traitsIwEEElsEj'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIwNS_11char_traitsIwEEElsEl'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIwNS_11char_traitsIwEEElsEm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIwNS_11char_traitsIwEEElsEs'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIwNS_11char_traitsIwEEElsEt'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIwNS_11char_traitsIwEEElsEx'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIwNS_11char_traitsIwEEElsEy'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213random_deviceC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213random_deviceC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213random_deviceD1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213random_deviceD2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213random_deviceclEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213shared_futureIvED1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213shared_futureIvED2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213shared_futureIvEaSERKS1_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__214__get_const_dbEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__214__num_get_base10__get_baseERNS_8ios_baseE'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__214__num_get_base5__srcE', 'size': 0} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__214__num_put_base12__format_intEPcPKcbj'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__214__num_put_base14__format_floatEPcPKcj'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__214__num_put_base18__identify_paddingEPcS1_RKNS_8ios_baseE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__214__shared_countD0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__214__shared_countD1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__214__shared_countD2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__214basic_iostreamIcNS_11char_traitsIcEEED0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__214basic_iostreamIcNS_11char_traitsIcEEED1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__214basic_iostreamIcNS_11char_traitsIcEEED2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__214codecvt_bynameIDic11__mbstate_tED0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__214codecvt_bynameIDic11__mbstate_tED1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__214codecvt_bynameIDic11__mbstate_tED2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__214codecvt_bynameIDsc11__mbstate_tED0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__214codecvt_bynameIDsc11__mbstate_tED1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__214codecvt_bynameIDsc11__mbstate_tED2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__214codecvt_bynameIcc11__mbstate_tED0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__214codecvt_bynameIcc11__mbstate_tED1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__214codecvt_bynameIcc11__mbstate_tED2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__214codecvt_bynameIwc11__mbstate_tED0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__214codecvt_bynameIwc11__mbstate_tED1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__214codecvt_bynameIwc11__mbstate_tED2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__214collate_bynameIcEC1EPKcm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__214collate_bynameIcEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__214collate_bynameIcEC2EPKcm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__214collate_bynameIcEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__214collate_bynameIcED0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__214collate_bynameIcED1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__214collate_bynameIcED2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__214collate_bynameIwEC1EPKcm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__214collate_bynameIwEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__214collate_bynameIwEC2EPKcm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__214collate_bynameIwEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__214collate_bynameIwED0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__214collate_bynameIwED1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__214collate_bynameIwED2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__214error_categoryD0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__214error_categoryD1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__214error_categoryD2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215__get_classnameEPKcb'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215__thread_struct25notify_all_at_thread_exitEPNS_18condition_variableEPNS_5mutexE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215__thread_struct27__make_ready_at_thread_exitEPNS_17__assoc_sub_stateE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215__thread_structC1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215__thread_structC2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215__thread_structD1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215__thread_structD2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIcNS_11char_traitsIcEEE4swapERS3_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIcNS_11char_traitsIcEEE4syncEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIcNS_11char_traitsIcEEE5imbueERKNS_6localeE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIcNS_11char_traitsIcEEE5uflowEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIcNS_11char_traitsIcEEE6setbufEPcl'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIcNS_11char_traitsIcEEE6xsgetnEPcl'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIcNS_11char_traitsIcEEE6xsputnEPKcl'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIcNS_11char_traitsIcEEE7seekoffExNS_8ios_base7seekdirEj'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIcNS_11char_traitsIcEEE7seekposENS_4fposI11__mbstate_tEEj'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIcNS_11char_traitsIcEEE8overflowEi'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIcNS_11char_traitsIcEEE9pbackfailEi'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIcNS_11char_traitsIcEEE9showmanycEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIcNS_11char_traitsIcEEE9underflowEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIcNS_11char_traitsIcEEEC1ERKS3_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIcNS_11char_traitsIcEEEC1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIcNS_11char_traitsIcEEEC2ERKS3_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIcNS_11char_traitsIcEEEC2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIcNS_11char_traitsIcEEED0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIcNS_11char_traitsIcEEED1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIcNS_11char_traitsIcEEED2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIcNS_11char_traitsIcEEEaSERKS3_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIwNS_11char_traitsIwEEE4swapERS3_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIwNS_11char_traitsIwEEE4syncEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIwNS_11char_traitsIwEEE5imbueERKNS_6localeE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIwNS_11char_traitsIwEEE5uflowEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIwNS_11char_traitsIwEEE6setbufEPwl'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIwNS_11char_traitsIwEEE6xsgetnEPwl'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIwNS_11char_traitsIwEEE6xsputnEPKwl'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIwNS_11char_traitsIwEEE7seekoffExNS_8ios_base7seekdirEj'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIwNS_11char_traitsIwEEE7seekposENS_4fposI11__mbstate_tEEj'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIwNS_11char_traitsIwEEE8overflowEi'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIwNS_11char_traitsIwEEE9pbackfailEi'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIwNS_11char_traitsIwEEE9showmanycEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIwNS_11char_traitsIwEEE9underflowEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIwNS_11char_traitsIwEEEC1ERKS3_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIwNS_11char_traitsIwEEEC1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIwNS_11char_traitsIwEEEC2ERKS3_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIwNS_11char_traitsIwEEEC2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIwNS_11char_traitsIwEEED0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIwNS_11char_traitsIwEEED1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIwNS_11char_traitsIwEEED2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIwNS_11char_traitsIwEEEaSERKS3_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215future_categoryEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215numpunct_bynameIcE6__initEPKc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215numpunct_bynameIcEC1EPKcm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215numpunct_bynameIcEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215numpunct_bynameIcEC2EPKcm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215numpunct_bynameIcEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215numpunct_bynameIcED0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215numpunct_bynameIcED1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215numpunct_bynameIcED2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215numpunct_bynameIwE6__initEPKc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215numpunct_bynameIwEC1EPKcm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215numpunct_bynameIwEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215numpunct_bynameIwEC2EPKcm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215numpunct_bynameIwEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215numpunct_bynameIwED0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215numpunct_bynameIwED1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215numpunct_bynameIwED2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215recursive_mutex4lockEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215recursive_mutex6unlockEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215recursive_mutex8try_lockEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215recursive_mutexC1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215recursive_mutexC2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215recursive_mutexD1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215recursive_mutexD2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215system_categoryEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__216__check_groupingERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPjS8_Rj'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__216__narrow_to_utf8ILm16EED0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__216__narrow_to_utf8ILm16EED1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__216__narrow_to_utf8ILm16EED2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__216__narrow_to_utf8ILm32EED0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__216__narrow_to_utf8ILm32EED1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__216__narrow_to_utf8ILm32EED2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__216generic_categoryEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__217__assoc_sub_state10__sub_waitERNS_11unique_lockINS_5mutexEEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__217__assoc_sub_state12__make_readyEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__217__assoc_sub_state13set_exceptionESt13exception_ptr'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__217__assoc_sub_state16__on_zero_sharedEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__217__assoc_sub_state24set_value_at_thread_exitEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__217__assoc_sub_state28set_exception_at_thread_exitESt13exception_ptr'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__217__assoc_sub_state4copyEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__217__assoc_sub_state4waitEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__217__assoc_sub_state9__executeEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__217__assoc_sub_state9set_valueEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__217__widen_from_utf8ILm16EED0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__217__widen_from_utf8ILm16EED1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__217__widen_from_utf8ILm16EED2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__217__widen_from_utf8ILm32EED0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__217__widen_from_utf8ILm32EED1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__217__widen_from_utf8ILm32EED2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__217bad_function_callD0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__217bad_function_callD1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__217bad_function_callD2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__217declare_reachableEPv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__217iostream_categoryEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__217moneypunct_bynameIcLb0EE4initEPKc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__217moneypunct_bynameIcLb1EE4initEPKc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__217moneypunct_bynameIwLb0EE4initEPKc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__217moneypunct_bynameIwLb1EE4initEPKc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__218__time_get_storageIcE4initERKNS_5ctypeIcEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__218__time_get_storageIcE9__analyzeEcRKNS_5ctypeIcEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__218__time_get_storageIcEC1EPKc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__218__time_get_storageIcEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__218__time_get_storageIcEC2EPKc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__218__time_get_storageIcEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__218__time_get_storageIwE4initERKNS_5ctypeIwEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__218__time_get_storageIwE9__analyzeEcRKNS_5ctypeIwEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__218__time_get_storageIwEC1EPKc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__218__time_get_storageIwEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__218__time_get_storageIwEC2EPKc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__218__time_get_storageIwEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__218condition_variable10notify_allEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__218condition_variable10notify_oneEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__218condition_variable15__do_timed_waitERNS_11unique_lockINS_5mutexEEENS_6chrono10time_pointINS5_12system_clockENS5_8durationIxNS_5ratioILl1ELl1000000000EEEEEEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__218condition_variable4waitERNS_11unique_lockINS_5mutexEEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__218condition_variableD1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__218condition_variableD2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__218shared_timed_mutex11lock_sharedEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__218shared_timed_mutex13unlock_sharedEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__218shared_timed_mutex15try_lock_sharedEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__218shared_timed_mutex4lockEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__218shared_timed_mutex6unlockEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__218shared_timed_mutex8try_lockEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__218shared_timed_mutexC1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__218shared_timed_mutexC2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__219__shared_mutex_base11lock_sharedEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__219__shared_mutex_base13unlock_sharedEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__219__shared_mutex_base15try_lock_sharedEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__219__shared_mutex_base4lockEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__219__shared_mutex_base6unlockEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__219__shared_mutex_base8try_lockEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__219__shared_mutex_baseC1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__219__shared_mutex_baseC2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__219__shared_weak_count14__release_weakEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__219__shared_weak_count4lockEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__219__shared_weak_countD0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__219__shared_weak_countD1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__219__shared_weak_countD2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__219__thread_local_dataEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__219declare_no_pointersEPcm'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__219piecewise_constructE', 'size': 0} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__220__get_collation_nameEPKc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__220__throw_system_errorEiPKc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__221__throw_runtime_errorEPKc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__221__undeclare_reachableEPv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__221recursive_timed_mutex4lockEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__221recursive_timed_mutex6unlockEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__221recursive_timed_mutex8try_lockEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__221recursive_timed_mutexC1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__221recursive_timed_mutexC2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__221recursive_timed_mutexD1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__221recursive_timed_mutexD2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__221undeclare_no_pointersEPcm'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__223__libcpp_debug_functionE', 'size': 0} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__224__libcpp_debug_exceptionC1ERKNS_19__libcpp_debug_infoE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__224__libcpp_debug_exceptionC1ERKS0_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__224__libcpp_debug_exceptionC1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__224__libcpp_debug_exceptionC2ERKNS_19__libcpp_debug_infoE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__224__libcpp_debug_exceptionC2ERKS0_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__224__libcpp_debug_exceptionC2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__224__libcpp_debug_exceptionD0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__224__libcpp_debug_exceptionD1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__224__libcpp_debug_exceptionD2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__225notify_all_at_thread_exitERNS_18condition_variableENS_11unique_lockINS_5mutexEEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__227__insertion_sort_incompleteIRNS_6__lessIaaEEPaEEbT0_S5_T_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__227__insertion_sort_incompleteIRNS_6__lessIccEEPcEEbT0_S5_T_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__227__insertion_sort_incompleteIRNS_6__lessIddEEPdEEbT0_S5_T_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__227__insertion_sort_incompleteIRNS_6__lessIeeEEPeEEbT0_S5_T_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__227__insertion_sort_incompleteIRNS_6__lessIffEEPfEEbT0_S5_T_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__227__insertion_sort_incompleteIRNS_6__lessIhhEEPhEEbT0_S5_T_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__227__insertion_sort_incompleteIRNS_6__lessIiiEEPiEEbT0_S5_T_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__227__insertion_sort_incompleteIRNS_6__lessIjjEEPjEEbT0_S5_T_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__227__insertion_sort_incompleteIRNS_6__lessIllEEPlEEbT0_S5_T_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__227__insertion_sort_incompleteIRNS_6__lessImmEEPmEEbT0_S5_T_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__227__insertion_sort_incompleteIRNS_6__lessIssEEPsEEbT0_S5_T_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__227__insertion_sort_incompleteIRNS_6__lessIttEEPtEEbT0_S5_T_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__227__insertion_sort_incompleteIRNS_6__lessIwwEEPwEEbT0_S5_T_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__227__insertion_sort_incompleteIRNS_6__lessIxxEEPxEEbT0_S5_T_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__227__insertion_sort_incompleteIRNS_6__lessIyyEEPyEEbT0_S5_T_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__227__libcpp_set_debug_functionEPFvRKNS_19__libcpp_debug_infoEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__229__libcpp_abort_debug_functionERKNS_19__libcpp_debug_infoE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__229__libcpp_throw_debug_functionERKNS_19__libcpp_debug_infoE'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__23cinE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__24cerrE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__24clogE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__24coutE', 'size': 0} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__24stodERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__24stodERKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEEPm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__24stofERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__24stofERKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEEPm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__24stoiERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPmi'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__24stoiERKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEEPmi'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__24stolERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPmi'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__24stolERKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEEPmi'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__24wcinE', 'size': 0} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__25alignEmmRPvRm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__25ctypeIcE13classic_tableEv'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__25ctypeIcE2idE', 'size': 0} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__25ctypeIcEC1EPKjbm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__25ctypeIcEC2EPKjbm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__25ctypeIcED0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__25ctypeIcED1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__25ctypeIcED2Ev'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__25ctypeIwE2idE', 'size': 0} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__25ctypeIwED0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__25ctypeIwED1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__25ctypeIwED2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__25mutex4lockEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__25mutex6unlockEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__25mutex8try_lockEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__25mutexD1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__25mutexD2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__25stoldERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__25stoldERKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEEPm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__25stollERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPmi'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__25stollERKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEEPmi'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__25stoulERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPmi'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__25stoulERKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEEPmi'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__25wcerrE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__25wclogE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__25wcoutE', 'size': 0} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26__sortIRNS_6__lessIaaEEPaEEvT0_S5_T_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26__sortIRNS_6__lessIccEEPcEEvT0_S5_T_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26__sortIRNS_6__lessIddEEPdEEvT0_S5_T_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26__sortIRNS_6__lessIeeEEPeEEvT0_S5_T_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26__sortIRNS_6__lessIffEEPfEEvT0_S5_T_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26__sortIRNS_6__lessIhhEEPhEEvT0_S5_T_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26__sortIRNS_6__lessIiiEEPiEEvT0_S5_T_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26__sortIRNS_6__lessIjjEEPjEEvT0_S5_T_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26__sortIRNS_6__lessIllEEPlEEvT0_S5_T_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26__sortIRNS_6__lessImmEEPmEEvT0_S5_T_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26__sortIRNS_6__lessIssEEPsEEvT0_S5_T_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26__sortIRNS_6__lessIttEEPtEEvT0_S5_T_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26__sortIRNS_6__lessIwwEEPwEEvT0_S5_T_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26__sortIRNS_6__lessIxxEEPxEEvT0_S5_T_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26__sortIRNS_6__lessIyyEEPyEEvT0_S5_T_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26chrono12steady_clock3nowEv'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__26chrono12steady_clock9is_steadyE', 'size': 0} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26chrono12system_clock11from_time_tEl'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26chrono12system_clock3nowEv'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__26chrono12system_clock9is_steadyE', 'size': 0} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26chrono12system_clock9to_time_tERKNS0_10time_pointIS1_NS0_8durationIxNS_5ratioILl1ELl1000000EEEEEEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26futureIvE3getEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26futureIvEC1EPNS_17__assoc_sub_stateE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26futureIvEC2EPNS_17__assoc_sub_stateE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26futureIvED1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26futureIvED2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26gslice6__initEm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26locale14__install_ctorERKS0_PNS0_5facetEl'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26locale2id5__getEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26locale2id6__initEv'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__26locale2id9__next_idE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__26locale3allE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__26locale4noneE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__26locale4timeE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__26locale5ctypeE', 'size': 0} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26locale5facet16__on_zero_sharedEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26locale5facetD0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26locale5facetD1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26locale5facetD2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26locale6globalERKS0_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26locale7classicEv'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__26locale7collateE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__26locale7numericE', 'size': 0} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26locale8__globalEv'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__26locale8messagesE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__26locale8monetaryE', 'size': 0} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26localeC1EPKc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26localeC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26localeC1ERKS0_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26localeC1ERKS0_PKci'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26localeC1ERKS0_RKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEi'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26localeC1ERKS0_S2_i'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26localeC1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26localeC2EPKc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26localeC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26localeC2ERKS0_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26localeC2ERKS0_PKci'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26localeC2ERKS0_RKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEi'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26localeC2ERKS0_S2_i'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26localeC2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26localeD1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26localeD2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26localeaSERKS0_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26stoullERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPmi'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26stoullERKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEEPmi'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26thread20hardware_concurrencyEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26thread4joinEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26thread6detachEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26threadD1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__26threadD2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__27__sort5IRNS_6__lessIeeEEPeEEjT0_S5_S5_S5_S5_T_'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__27codecvtIDic11__mbstate_tE2idE', 'size': 0} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__27codecvtIDic11__mbstate_tED0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__27codecvtIDic11__mbstate_tED1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__27codecvtIDic11__mbstate_tED2Ev'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__27codecvtIDsc11__mbstate_tE2idE', 'size': 0} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__27codecvtIDsc11__mbstate_tED0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__27codecvtIDsc11__mbstate_tED1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__27codecvtIDsc11__mbstate_tED2Ev'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__27codecvtIcc11__mbstate_tE2idE', 'size': 0} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__27codecvtIcc11__mbstate_tED0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__27codecvtIcc11__mbstate_tED1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__27codecvtIcc11__mbstate_tED2Ev'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__27codecvtIwc11__mbstate_tE2idE', 'size': 0} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__27codecvtIwc11__mbstate_tEC1EPKcm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__27codecvtIwc11__mbstate_tEC1Em'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__27codecvtIwc11__mbstate_tEC2EPKcm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__27codecvtIwc11__mbstate_tEC2Em'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__27codecvtIwc11__mbstate_tED0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__27codecvtIwc11__mbstate_tED1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__27codecvtIwc11__mbstate_tED2Ev'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__27collateIcE2idE', 'size': 0} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__27collateIcED0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__27collateIcED1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__27collateIcED2Ev'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__27collateIwE2idE', 'size': 0} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__27collateIwED0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__27collateIwED1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__27collateIwED2Ev'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__27num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE2idE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__27num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE2idE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__27num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE2idE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__27num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE2idE', 'size': 0} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__27promiseIvE10get_futureEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__27promiseIvE13set_exceptionESt13exception_ptr'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__27promiseIvE24set_value_at_thread_exitEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__27promiseIvE28set_exception_at_thread_exitESt13exception_ptr'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__27promiseIvE9set_valueEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__27promiseIvEC1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__27promiseIvEC2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__27promiseIvED1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__27promiseIvED2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__28__c_node5__addEPNS_8__i_nodeE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__28__c_nodeD0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__28__c_nodeD1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__28__c_nodeD2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__28__get_dbEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__28__i_nodeD1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__28__i_nodeD2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__28__rs_getEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__28__sp_mut4lockEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__28__sp_mut6unlockEv'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__28ios_base10floatfieldE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__28ios_base10scientificE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__28ios_base11adjustfieldE', 'size': 0} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__28ios_base15sync_with_stdioEb'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__28ios_base16__call_callbacksENS0_5eventE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__28ios_base17register_callbackEPFvNS0_5eventERS0_iEi'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__28ios_base2inE', 'size': 0} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__28ios_base33__set_badbit_and_consider_rethrowEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__28ios_base34__set_failbit_and_consider_rethrowEv'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__28ios_base3appE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__28ios_base3ateE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__28ios_base3decE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__28ios_base3hexE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__28ios_base3octE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__28ios_base3outE', 'size': 0} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__28ios_base4InitC1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__28ios_base4InitC2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__28ios_base4InitD1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__28ios_base4InitD2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__28ios_base4initEPv'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__28ios_base4leftE', 'size': 0} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__28ios_base4moveERS0_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__28ios_base4swapERS0_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__28ios_base5clearEj'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__28ios_base5fixedE', 'size': 0} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__28ios_base5imbueERKNS_6localeE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__28ios_base5iwordEi'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__28ios_base5pwordEi'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__28ios_base5rightE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__28ios_base5truncE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__28ios_base6badbitE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__28ios_base6binaryE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__28ios_base6eofbitE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__28ios_base6skipwsE', 'size': 0} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__28ios_base6xallocEv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__28ios_base7copyfmtERKS0_'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__28ios_base7failbitE', 'size': 0} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__28ios_base7failureC1EPKcRKNS_10error_codeE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__28ios_base7failureC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERKNS_10error_codeE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__28ios_base7failureC2EPKcRKNS_10error_codeE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__28ios_base7failureC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERKNS_10error_codeE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__28ios_base7failureD0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__28ios_base7failureD1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__28ios_base7failureD2Ev'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__28ios_base7goodbitE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__28ios_base7showposE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__28ios_base7unitbufE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__28ios_base8internalE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__28ios_base8showbaseE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__28ios_base9__xindex_E', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__28ios_base9basefieldE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__28ios_base9boolalphaE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__28ios_base9showpointE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__28ios_base9uppercaseE', 'size': 0} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__28ios_baseD0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__28ios_baseD1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__28ios_baseD2Ev'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__28messagesIcE2idE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__28messagesIwE2idE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__28numpunctIcE2idE', 'size': 0} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__28numpunctIcEC1Em'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__28numpunctIcEC2Em'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__28numpunctIcED0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__28numpunctIcED1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__28numpunctIcED2Ev'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__28numpunctIwE2idE', 'size': 0} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__28numpunctIwEC1Em'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__28numpunctIwEC2Em'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__28numpunctIwED0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__28numpunctIwED1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__28numpunctIwED2Ev'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__28time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE2idE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__28time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE2idE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__28time_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE2idE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__28time_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE2idE', 'size': 0} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__28valarrayImE6resizeEmm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__29__num_getIcE17__stage2_int_loopEciPcRS2_RjcRKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPjRSD_PKc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__29__num_getIcE17__stage2_int_prepERNS_8ios_baseERc'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__29__num_getIcE19__stage2_float_loopEcRbRcPcRS4_ccRKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPjRSE_RjS4_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__29__num_getIcE19__stage2_float_prepERNS_8ios_baseEPcRcS5_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__29__num_getIwE17__stage2_int_loopEwiPcRS2_RjwRKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPjRSD_PKw'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__29__num_getIwE17__stage2_int_prepERNS_8ios_baseERw'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__29__num_getIwE19__stage2_float_loopEwRbRcPcRS4_wwRKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPjRSE_RjPw'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__29__num_getIwE19__stage2_float_prepERNS_8ios_baseEPwRwS5_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__29__num_putIcE21__widen_and_group_intEPcS2_S2_S2_RS2_S3_RKNS_6localeE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__29__num_putIcE23__widen_and_group_floatEPcS2_S2_S2_RS2_S3_RKNS_6localeE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__29__num_putIwE21__widen_and_group_intEPcS2_S2_PwRS3_S4_RKNS_6localeE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__29__num_putIwE23__widen_and_group_floatEPcS2_S2_PwRS3_S4_RKNS_6localeE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__29basic_iosIcNS_11char_traitsIcEEE7copyfmtERKS3_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__29basic_iosIcNS_11char_traitsIcEEED0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__29basic_iosIcNS_11char_traitsIcEEED1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__29basic_iosIcNS_11char_traitsIcEEED2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__29basic_iosIwNS_11char_traitsIwEEE7copyfmtERKS3_'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__29basic_iosIwNS_11char_traitsIwEEED0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__29basic_iosIwNS_11char_traitsIwEEED1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__29basic_iosIwNS_11char_traitsIwEEED2Ev'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__29money_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE2idE', 'size': 0} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__29money_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE8__do_getERS4_S4_bRKNS_6localeEjRjRbRKNS_5ctypeIcEERNS_10unique_ptrIcPFvPvEEERPcSM_'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__29money_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE2idE', 'size': 0} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__29money_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE8__do_getERS4_S4_bRKNS_6localeEjRjRbRKNS_5ctypeIwEERNS_10unique_ptrIwPFvPvEEERPwSM_'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__29money_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE2idE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__29money_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE2idE', 'size': 0} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__29strstreamD0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__29strstreamD1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__29strstreamD2Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__29to_stringEd'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__29to_stringEe'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__29to_stringEf'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__29to_stringEi'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__29to_stringEj'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__29to_stringEl'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__29to_stringEm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__29to_stringEx'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__29to_stringEy'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__2plIcNS_11char_traitsIcEENS_9allocatorIcEEEENS_12basic_stringIT_T0_T1_EEPKS6_RKS9_'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt8bad_castC1Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt8bad_castC1Ev'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt8bad_castC2Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt8bad_castC2Ev'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt8bad_castD0Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt8bad_castD0Ev'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt8bad_castD1Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt8bad_castD1Ev'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt8bad_castD2Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt8bad_castD2Ev'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt9bad_allocC1Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt9bad_allocC1Ev'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt9bad_allocC2Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt9bad_allocC2Ev'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt9bad_allocD0Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt9bad_allocD0Ev'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt9bad_allocD1Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt9bad_allocD1Ev'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt9bad_allocD2Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt9bad_allocD2Ev'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt9exceptionD0Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt9exceptionD0Ev'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt9exceptionD1Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt9exceptionD1Ev'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt9exceptionD2Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt9exceptionD2Ev'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt9type_infoD0Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt9type_infoD0Ev'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt9type_infoD1Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt9type_infoD1Ev'} -{'type': 'U', 'is_defined': False, 'name': '__ZNSt9type_infoD2Ev'} -{'type': 'I', 'is_defined': True, 'name': '__ZNSt9type_infoD2Ev'} -{'type': 'U', 'is_defined': False, 'name': '__ZSt10unexpectedv'} -{'type': 'I', 'is_defined': True, 'name': '__ZSt10unexpectedv'} -{'type': 'U', 'is_defined': False, 'name': '__ZSt13get_terminatev'} -{'type': 'I', 'is_defined': True, 'name': '__ZSt13get_terminatev'} -{'type': 'U', 'is_defined': False, 'name': '__ZSt13set_terminatePFvvE'} -{'type': 'I', 'is_defined': True, 'name': '__ZSt13set_terminatePFvvE'} -{'type': 'U', 'is_defined': False, 'name': '__ZSt14get_unexpectedv'} -{'type': 'I', 'is_defined': True, 'name': '__ZSt14get_unexpectedv'} -{'type': 'U', 'is_defined': False, 'name': '__ZSt14set_unexpectedPFvvE'} -{'type': 'I', 'is_defined': True, 'name': '__ZSt14set_unexpectedPFvvE'} -{'type': 'U', 'is_defined': False, 'name': '__ZSt15get_new_handlerv'} -{'type': 'I', 'is_defined': True, 'name': '__ZSt15get_new_handlerv'} -{'type': 'U', 'is_defined': False, 'name': '__ZSt15set_new_handlerPFvvE'} -{'type': 'I', 'is_defined': True, 'name': '__ZSt15set_new_handlerPFvvE'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZSt17__throw_bad_allocv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZSt17current_exceptionv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZSt17rethrow_exceptionSt13exception_ptr'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZSt18uncaught_exceptionv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZSt19uncaught_exceptionsv'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZSt7nothrow', 'size': 0} -{'type': 'U', 'is_defined': False, 'name': '__ZSt9terminatev'} -{'type': 'I', 'is_defined': True, 'name': '__ZSt9terminatev'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTCNSt3__210istrstreamE0_NS_13basic_istreamIcNS_11char_traitsIcEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTCNSt3__210ostrstreamE0_NS_13basic_ostreamIcNS_11char_traitsIcEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTCNSt3__214basic_iostreamIcNS_11char_traitsIcEEEE0_NS_13basic_istreamIcS2_EE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTCNSt3__214basic_iostreamIcNS_11char_traitsIcEEEE16_NS_13basic_ostreamIcS2_EE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTCNSt3__29strstreamE0_NS_13basic_istreamIcNS_11char_traitsIcEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTCNSt3__29strstreamE0_NS_14basic_iostreamIcNS_11char_traitsIcEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTCNSt3__29strstreamE16_NS_13basic_ostreamIcNS_11char_traitsIcEEEE', 'size': 0} -{'type': 'U', 'is_defined': False, 'name': '__ZTIDi'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIDi'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIDn'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIDn'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIDs'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIDs'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt12experimental15fundamentals_v112bad_any_castE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt12experimental19bad_optional_accessE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__210__time_getE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__210__time_putE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__210ctype_baseE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__210istrstreamE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__210money_baseE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__210moneypunctIcLb0EEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__210moneypunctIcLb1EEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__210moneypunctIwLb0EEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__210moneypunctIwLb1EEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__210ostrstreamE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__211__money_getIcEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__211__money_getIwEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__211__money_putIcEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__211__money_putIwEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__211regex_errorE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__212bad_weak_ptrE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__212codecvt_baseE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__212ctype_bynameIcEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__212ctype_bynameIwEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__212future_errorE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__212strstreambufE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__212system_errorE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__213basic_istreamIcNS_11char_traitsIcEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__213basic_istreamIwNS_11char_traitsIwEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__213basic_ostreamIcNS_11char_traitsIcEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__213basic_ostreamIwNS_11char_traitsIwEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__213messages_baseE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__214__codecvt_utf8IDiEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__214__codecvt_utf8IDsEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__214__codecvt_utf8IwEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__214__num_get_baseE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__214__num_put_baseE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__214__shared_countE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__214basic_iostreamIcNS_11char_traitsIcEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__214codecvt_bynameIDic11__mbstate_tEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__214codecvt_bynameIDsc11__mbstate_tEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__214codecvt_bynameIcc11__mbstate_tEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__214codecvt_bynameIwc11__mbstate_tEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__214collate_bynameIcEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__214collate_bynameIwEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__214error_categoryE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__215__codecvt_utf16IDiLb0EEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__215__codecvt_utf16IDiLb1EEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__215__codecvt_utf16IDsLb0EEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__215__codecvt_utf16IDsLb1EEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__215__codecvt_utf16IwLb0EEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__215__codecvt_utf16IwLb1EEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__215basic_streambufIcNS_11char_traitsIcEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__215basic_streambufIwNS_11char_traitsIwEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__215messages_bynameIcEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__215messages_bynameIwEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__215numpunct_bynameIcEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__215numpunct_bynameIwEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__215time_get_bynameIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__215time_get_bynameIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__215time_put_bynameIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__215time_put_bynameIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__216__narrow_to_utf8ILm16EEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__216__narrow_to_utf8ILm32EEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__217__assoc_sub_stateE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__217__widen_from_utf8ILm16EEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__217__widen_from_utf8ILm32EEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__217bad_function_callE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__217moneypunct_bynameIcLb0EEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__217moneypunct_bynameIcLb1EEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__217moneypunct_bynameIwLb0EEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__217moneypunct_bynameIwLb1EEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__218__time_get_storageIcEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__218__time_get_storageIwEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__219__shared_weak_countE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__220__codecvt_utf8_utf16IDiEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__220__codecvt_utf8_utf16IDsEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__220__codecvt_utf8_utf16IwEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__220__time_get_c_storageIcEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__220__time_get_c_storageIwEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__224__libcpp_debug_exceptionE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__25ctypeIcEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__25ctypeIwEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__26locale5facetE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__27codecvtIDic11__mbstate_tEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__27codecvtIDsc11__mbstate_tEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__27codecvtIcc11__mbstate_tEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__27codecvtIwc11__mbstate_tEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__27collateIcEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__27collateIwEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__27num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__27num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__27num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__27num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__28__c_nodeE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__28ios_base7failureE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__28ios_baseE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__28messagesIcEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__28messagesIwEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__28numpunctIcEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__28numpunctIwEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__28time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__28time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__28time_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__28time_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__29__num_getIcEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__29__num_getIwEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__29__num_putIcEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__29__num_putIwEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__29basic_iosIcNS_11char_traitsIcEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__29basic_iosIwNS_11char_traitsIwEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__29money_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__29money_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__29money_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__29money_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__29strstreamE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTINSt3__29time_baseE', 'size': 0} -{'type': 'U', 'is_defined': False, 'name': '__ZTIPDi'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIPDi'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIPDn'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIPDn'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIPDs'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIPDs'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIPKDi'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIPKDi'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIPKDn'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIPKDn'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIPKDs'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIPKDs'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIPKa'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIPKa'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIPKb'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIPKb'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIPKc'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIPKc'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIPKd'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIPKd'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIPKe'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIPKe'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIPKf'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIPKf'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIPKh'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIPKh'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIPKi'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIPKi'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIPKj'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIPKj'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIPKl'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIPKl'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIPKm'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIPKm'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIPKs'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIPKs'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIPKt'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIPKt'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIPKv'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIPKv'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIPKw'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIPKw'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIPKx'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIPKx'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIPKy'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIPKy'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIPa'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIPa'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIPb'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIPb'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIPc'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIPc'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIPd'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIPd'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIPe'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIPe'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIPf'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIPf'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIPh'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIPh'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIPi'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIPi'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIPj'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIPj'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIPl'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIPl'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIPm'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIPm'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIPs'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIPs'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIPt'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIPt'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIPv'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIPv'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIPw'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIPw'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIPx'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIPx'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIPy'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIPy'} -{'type': 'U', 'is_defined': False, 'name': '__ZTISt10bad_typeid'} -{'type': 'I', 'is_defined': True, 'name': '__ZTISt10bad_typeid'} -{'type': 'U', 'is_defined': False, 'name': '__ZTISt11logic_error'} -{'type': 'I', 'is_defined': True, 'name': '__ZTISt11logic_error'} -{'type': 'U', 'is_defined': False, 'name': '__ZTISt11range_error'} -{'type': 'I', 'is_defined': True, 'name': '__ZTISt11range_error'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTISt12bad_any_cast', 'size': 0} -{'type': 'U', 'is_defined': False, 'name': '__ZTISt12domain_error'} -{'type': 'I', 'is_defined': True, 'name': '__ZTISt12domain_error'} -{'type': 'U', 'is_defined': False, 'name': '__ZTISt12length_error'} -{'type': 'I', 'is_defined': True, 'name': '__ZTISt12length_error'} -{'type': 'U', 'is_defined': False, 'name': '__ZTISt12out_of_range'} -{'type': 'I', 'is_defined': True, 'name': '__ZTISt12out_of_range'} -{'type': 'U', 'is_defined': False, 'name': '__ZTISt13bad_exception'} -{'type': 'I', 'is_defined': True, 'name': '__ZTISt13bad_exception'} -{'type': 'U', 'is_defined': False, 'name': '__ZTISt13runtime_error'} -{'type': 'I', 'is_defined': True, 'name': '__ZTISt13runtime_error'} -{'type': 'U', 'is_defined': False, 'name': '__ZTISt14overflow_error'} -{'type': 'I', 'is_defined': True, 'name': '__ZTISt14overflow_error'} -{'type': 'U', 'is_defined': False, 'name': '__ZTISt15underflow_error'} -{'type': 'I', 'is_defined': True, 'name': '__ZTISt15underflow_error'} -{'type': 'U', 'is_defined': False, 'name': '__ZTISt16invalid_argument'} -{'type': 'I', 'is_defined': True, 'name': '__ZTISt16invalid_argument'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTISt16nested_exception', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTISt18bad_variant_access', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTISt19bad_optional_access', 'size': 0} -{'type': 'U', 'is_defined': False, 'name': '__ZTISt20bad_array_new_length'} -{'type': 'I', 'is_defined': True, 'name': '__ZTISt20bad_array_new_length'} -{'type': 'U', 'is_defined': False, 'name': '__ZTISt8bad_cast'} -{'type': 'I', 'is_defined': True, 'name': '__ZTISt8bad_cast'} -{'type': 'U', 'is_defined': False, 'name': '__ZTISt9bad_alloc'} -{'type': 'I', 'is_defined': True, 'name': '__ZTISt9bad_alloc'} -{'type': 'U', 'is_defined': False, 'name': '__ZTISt9exception'} -{'type': 'I', 'is_defined': True, 'name': '__ZTISt9exception'} -{'type': 'U', 'is_defined': False, 'name': '__ZTISt9type_info'} -{'type': 'I', 'is_defined': True, 'name': '__ZTISt9type_info'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIa'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIa'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIb'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIb'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIc'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIc'} -{'type': 'U', 'is_defined': False, 'name': '__ZTId'} -{'type': 'I', 'is_defined': True, 'name': '__ZTId'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIe'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIe'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIf'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIf'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIh'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIh'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIi'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIi'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIj'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIj'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIl'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIl'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIm'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIm'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIs'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIs'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIt'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIt'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIv'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIv'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIw'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIw'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIx'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIx'} -{'type': 'U', 'is_defined': False, 'name': '__ZTIy'} -{'type': 'I', 'is_defined': True, 'name': '__ZTIy'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSDi'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSDi'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSDn'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSDn'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSDs'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSDs'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSN10__cxxabiv116__enum_type_infoE'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSN10__cxxabiv116__enum_type_infoE'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSN10__cxxabiv117__array_type_infoE'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSN10__cxxabiv117__array_type_infoE'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSN10__cxxabiv117__class_type_infoE'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSN10__cxxabiv117__class_type_infoE'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSN10__cxxabiv117__pbase_type_infoE'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSN10__cxxabiv117__pbase_type_infoE'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSN10__cxxabiv119__pointer_type_infoE'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSN10__cxxabiv119__pointer_type_infoE'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSN10__cxxabiv120__function_type_infoE'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSN10__cxxabiv120__function_type_infoE'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSN10__cxxabiv120__si_class_type_infoE'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSN10__cxxabiv120__si_class_type_infoE'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSN10__cxxabiv121__vmi_class_type_infoE'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSN10__cxxabiv121__vmi_class_type_infoE'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSN10__cxxabiv123__fundamental_type_infoE'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSN10__cxxabiv123__fundamental_type_infoE'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSN10__cxxabiv129__pointer_to_member_type_infoE'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSN10__cxxabiv129__pointer_to_member_type_infoE'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt12experimental15fundamentals_v112bad_any_castE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt12experimental19bad_optional_accessE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__210__time_getE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__210__time_putE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__210ctype_baseE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__210istrstreamE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__210money_baseE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__210moneypunctIcLb0EEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__210moneypunctIcLb1EEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__210moneypunctIwLb0EEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__210moneypunctIwLb1EEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__210ostrstreamE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__211__money_getIcEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__211__money_getIwEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__211__money_putIcEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__211__money_putIwEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__211regex_errorE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__212bad_weak_ptrE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__212codecvt_baseE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__212ctype_bynameIcEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__212ctype_bynameIwEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__212future_errorE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__212strstreambufE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__212system_errorE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__213basic_istreamIcNS_11char_traitsIcEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__213basic_istreamIwNS_11char_traitsIwEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__213basic_ostreamIcNS_11char_traitsIcEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__213basic_ostreamIwNS_11char_traitsIwEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__213messages_baseE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__214__codecvt_utf8IDiEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__214__codecvt_utf8IDsEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__214__codecvt_utf8IwEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__214__num_get_baseE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__214__num_put_baseE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__214__shared_countE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__214basic_iostreamIcNS_11char_traitsIcEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__214codecvt_bynameIDic11__mbstate_tEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__214codecvt_bynameIDsc11__mbstate_tEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__214codecvt_bynameIcc11__mbstate_tEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__214codecvt_bynameIwc11__mbstate_tEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__214collate_bynameIcEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__214collate_bynameIwEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__214error_categoryE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__215__codecvt_utf16IDiLb0EEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__215__codecvt_utf16IDiLb1EEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__215__codecvt_utf16IDsLb0EEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__215__codecvt_utf16IDsLb1EEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__215__codecvt_utf16IwLb0EEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__215__codecvt_utf16IwLb1EEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__215basic_streambufIcNS_11char_traitsIcEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__215basic_streambufIwNS_11char_traitsIwEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__215messages_bynameIcEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__215messages_bynameIwEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__215numpunct_bynameIcEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__215numpunct_bynameIwEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__215time_get_bynameIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__215time_get_bynameIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__215time_put_bynameIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__215time_put_bynameIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__216__narrow_to_utf8ILm16EEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__216__narrow_to_utf8ILm32EEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__217__assoc_sub_stateE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__217__widen_from_utf8ILm16EEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__217__widen_from_utf8ILm32EEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__217bad_function_callE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__217moneypunct_bynameIcLb0EEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__217moneypunct_bynameIcLb1EEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__217moneypunct_bynameIwLb0EEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__217moneypunct_bynameIwLb1EEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__218__time_get_storageIcEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__218__time_get_storageIwEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__219__shared_weak_countE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__220__codecvt_utf8_utf16IDiEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__220__codecvt_utf8_utf16IDsEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__220__codecvt_utf8_utf16IwEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__220__time_get_c_storageIcEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__220__time_get_c_storageIwEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__224__libcpp_debug_exceptionE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__25ctypeIcEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__25ctypeIwEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__26locale5facetE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__27codecvtIDic11__mbstate_tEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__27codecvtIDsc11__mbstate_tEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__27codecvtIcc11__mbstate_tEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__27codecvtIwc11__mbstate_tEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__27collateIcEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__27collateIwEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__27num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__27num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__27num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__27num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__28__c_nodeE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__28ios_base7failureE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__28ios_baseE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__28messagesIcEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__28messagesIwEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__28numpunctIcEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__28numpunctIwEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__28time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__28time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__28time_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__28time_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__29__num_getIcEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__29__num_getIwEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__29__num_putIcEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__29__num_putIwEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__29basic_iosIcNS_11char_traitsIcEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__29basic_iosIwNS_11char_traitsIwEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__29money_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__29money_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__29money_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__29money_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__29strstreamE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSNSt3__29time_baseE', 'size': 0} -{'type': 'U', 'is_defined': False, 'name': '__ZTSPDi'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSPDi'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSPDn'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSPDn'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSPDs'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSPDs'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSPKDi'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSPKDi'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSPKDn'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSPKDn'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSPKDs'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSPKDs'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSPKa'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSPKa'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSPKb'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSPKb'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSPKc'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSPKc'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSPKd'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSPKd'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSPKe'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSPKe'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSPKf'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSPKf'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSPKh'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSPKh'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSPKi'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSPKi'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSPKj'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSPKj'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSPKl'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSPKl'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSPKm'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSPKm'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSPKs'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSPKs'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSPKt'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSPKt'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSPKv'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSPKv'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSPKw'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSPKw'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSPKx'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSPKx'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSPKy'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSPKy'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSPa'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSPa'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSPb'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSPb'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSPc'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSPc'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSPd'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSPd'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSPe'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSPe'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSPf'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSPf'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSPh'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSPh'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSPi'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSPi'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSPj'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSPj'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSPl'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSPl'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSPm'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSPm'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSPs'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSPs'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSPt'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSPt'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSPv'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSPv'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSPw'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSPw'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSPx'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSPx'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSPy'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSPy'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSSt10bad_typeid'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSSt10bad_typeid'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSSt11logic_error'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSSt11logic_error'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSSt11range_error'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSSt11range_error'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSSt12bad_any_cast', 'size': 0} -{'type': 'U', 'is_defined': False, 'name': '__ZTSSt12domain_error'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSSt12domain_error'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSSt12length_error'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSSt12length_error'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSSt12out_of_range'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSSt12out_of_range'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSSt13bad_exception'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSSt13bad_exception'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSSt13runtime_error'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSSt13runtime_error'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSSt14overflow_error'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSSt14overflow_error'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSSt15underflow_error'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSSt15underflow_error'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSSt16invalid_argument'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSSt16invalid_argument'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSSt16nested_exception', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSSt18bad_variant_access', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSSt19bad_optional_access', 'size': 0} -{'type': 'U', 'is_defined': False, 'name': '__ZTSSt20bad_array_new_length'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSSt20bad_array_new_length'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSSt8bad_cast'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSSt8bad_cast'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSSt9bad_alloc'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSSt9bad_alloc'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSSt9exception'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSSt9exception'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSSt9type_info'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSSt9type_info'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSa'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSa'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSb'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSb'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSc'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSc'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSd'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSd'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSe'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSe'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSf'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSf'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSh'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSh'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSi'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSi'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSj'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSj'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSl'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSl'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSm'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSm'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSs'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSs'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSt'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSt'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSv'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSv'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSw'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSw'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSx'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSx'} -{'type': 'U', 'is_defined': False, 'name': '__ZTSy'} -{'type': 'I', 'is_defined': True, 'name': '__ZTSy'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTTNSt3__210istrstreamE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTTNSt3__210ostrstreamE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTTNSt3__213basic_istreamIcNS_11char_traitsIcEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTTNSt3__213basic_istreamIwNS_11char_traitsIwEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTTNSt3__213basic_ostreamIcNS_11char_traitsIcEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTTNSt3__213basic_ostreamIwNS_11char_traitsIwEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTTNSt3__214basic_iostreamIcNS_11char_traitsIcEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTTNSt3__29strstreamE', 'size': 0} -{'type': 'U', 'is_defined': False, 'name': '__ZTVN10__cxxabiv116__enum_type_infoE'} -{'type': 'I', 'is_defined': True, 'name': '__ZTVN10__cxxabiv116__enum_type_infoE'} -{'type': 'U', 'is_defined': False, 'name': '__ZTVN10__cxxabiv117__array_type_infoE'} -{'type': 'I', 'is_defined': True, 'name': '__ZTVN10__cxxabiv117__array_type_infoE'} -{'type': 'U', 'is_defined': False, 'name': '__ZTVN10__cxxabiv117__class_type_infoE'} -{'type': 'I', 'is_defined': True, 'name': '__ZTVN10__cxxabiv117__class_type_infoE'} -{'type': 'U', 'is_defined': False, 'name': '__ZTVN10__cxxabiv117__pbase_type_infoE'} -{'type': 'I', 'is_defined': True, 'name': '__ZTVN10__cxxabiv117__pbase_type_infoE'} -{'type': 'U', 'is_defined': False, 'name': '__ZTVN10__cxxabiv119__pointer_type_infoE'} -{'type': 'I', 'is_defined': True, 'name': '__ZTVN10__cxxabiv119__pointer_type_infoE'} -{'type': 'U', 'is_defined': False, 'name': '__ZTVN10__cxxabiv120__function_type_infoE'} -{'type': 'I', 'is_defined': True, 'name': '__ZTVN10__cxxabiv120__function_type_infoE'} -{'type': 'U', 'is_defined': False, 'name': '__ZTVN10__cxxabiv120__si_class_type_infoE'} -{'type': 'I', 'is_defined': True, 'name': '__ZTVN10__cxxabiv120__si_class_type_infoE'} -{'type': 'U', 'is_defined': False, 'name': '__ZTVN10__cxxabiv121__vmi_class_type_infoE'} -{'type': 'I', 'is_defined': True, 'name': '__ZTVN10__cxxabiv121__vmi_class_type_infoE'} -{'type': 'U', 'is_defined': False, 'name': '__ZTVN10__cxxabiv123__fundamental_type_infoE'} -{'type': 'I', 'is_defined': True, 'name': '__ZTVN10__cxxabiv123__fundamental_type_infoE'} -{'type': 'U', 'is_defined': False, 'name': '__ZTVN10__cxxabiv129__pointer_to_member_type_infoE'} -{'type': 'I', 'is_defined': True, 'name': '__ZTVN10__cxxabiv129__pointer_to_member_type_infoE'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt12experimental15fundamentals_v112bad_any_castE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt12experimental19bad_optional_accessE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__210istrstreamE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__210moneypunctIcLb0EEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__210moneypunctIcLb1EEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__210moneypunctIwLb0EEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__210moneypunctIwLb1EEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__210ostrstreamE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__211regex_errorE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__212bad_weak_ptrE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__212ctype_bynameIcEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__212ctype_bynameIwEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__212future_errorE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__212strstreambufE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__212system_errorE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__213basic_istreamIcNS_11char_traitsIcEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__213basic_istreamIwNS_11char_traitsIwEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__213basic_ostreamIcNS_11char_traitsIcEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__213basic_ostreamIwNS_11char_traitsIwEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__214__codecvt_utf8IDiEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__214__codecvt_utf8IDsEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__214__codecvt_utf8IwEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__214__shared_countE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__214basic_iostreamIcNS_11char_traitsIcEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__214codecvt_bynameIDic11__mbstate_tEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__214codecvt_bynameIDsc11__mbstate_tEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__214codecvt_bynameIcc11__mbstate_tEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__214codecvt_bynameIwc11__mbstate_tEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__214collate_bynameIcEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__214collate_bynameIwEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__214error_categoryE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__215__codecvt_utf16IDiLb0EEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__215__codecvt_utf16IDiLb1EEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__215__codecvt_utf16IDsLb0EEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__215__codecvt_utf16IDsLb1EEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__215__codecvt_utf16IwLb0EEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__215__codecvt_utf16IwLb1EEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__215basic_streambufIcNS_11char_traitsIcEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__215basic_streambufIwNS_11char_traitsIwEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__215messages_bynameIcEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__215messages_bynameIwEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__215numpunct_bynameIcEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__215numpunct_bynameIwEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__215time_get_bynameIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__215time_get_bynameIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__215time_put_bynameIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__215time_put_bynameIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__216__narrow_to_utf8ILm16EEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__216__narrow_to_utf8ILm32EEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__217__assoc_sub_stateE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__217__widen_from_utf8ILm16EEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__217__widen_from_utf8ILm32EEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__217bad_function_callE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__217moneypunct_bynameIcLb0EEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__217moneypunct_bynameIcLb1EEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__217moneypunct_bynameIwLb0EEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__217moneypunct_bynameIwLb1EEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__219__shared_weak_countE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__220__codecvt_utf8_utf16IDiEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__220__codecvt_utf8_utf16IDsEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__220__codecvt_utf8_utf16IwEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__224__libcpp_debug_exceptionE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__25ctypeIcEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__25ctypeIwEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__26locale5facetE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__27codecvtIDic11__mbstate_tEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__27codecvtIDsc11__mbstate_tEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__27codecvtIcc11__mbstate_tEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__27codecvtIwc11__mbstate_tEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__27collateIcEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__27collateIwEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__27num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__27num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__27num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__27num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__28__c_nodeE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__28ios_base7failureE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__28ios_baseE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__28messagesIcEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__28messagesIwEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__28numpunctIcEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__28numpunctIwEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__28time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__28time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__28time_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__28time_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__29basic_iosIcNS_11char_traitsIcEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__29basic_iosIwNS_11char_traitsIwEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__29money_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__29money_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__29money_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__29money_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVNSt3__29strstreamE', 'size': 0} -{'type': 'U', 'is_defined': False, 'name': '__ZTVSt10bad_typeid'} -{'type': 'I', 'is_defined': True, 'name': '__ZTVSt10bad_typeid'} -{'type': 'U', 'is_defined': False, 'name': '__ZTVSt11logic_error'} -{'type': 'I', 'is_defined': True, 'name': '__ZTVSt11logic_error'} -{'type': 'U', 'is_defined': False, 'name': '__ZTVSt11range_error'} -{'type': 'I', 'is_defined': True, 'name': '__ZTVSt11range_error'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVSt12bad_any_cast', 'size': 0} -{'type': 'U', 'is_defined': False, 'name': '__ZTVSt12domain_error'} -{'type': 'I', 'is_defined': True, 'name': '__ZTVSt12domain_error'} -{'type': 'U', 'is_defined': False, 'name': '__ZTVSt12length_error'} -{'type': 'I', 'is_defined': True, 'name': '__ZTVSt12length_error'} -{'type': 'U', 'is_defined': False, 'name': '__ZTVSt12out_of_range'} -{'type': 'I', 'is_defined': True, 'name': '__ZTVSt12out_of_range'} -{'type': 'U', 'is_defined': False, 'name': '__ZTVSt13bad_exception'} -{'type': 'I', 'is_defined': True, 'name': '__ZTVSt13bad_exception'} -{'type': 'U', 'is_defined': False, 'name': '__ZTVSt13runtime_error'} -{'type': 'I', 'is_defined': True, 'name': '__ZTVSt13runtime_error'} -{'type': 'U', 'is_defined': False, 'name': '__ZTVSt14overflow_error'} -{'type': 'I', 'is_defined': True, 'name': '__ZTVSt14overflow_error'} -{'type': 'U', 'is_defined': False, 'name': '__ZTVSt15underflow_error'} -{'type': 'I', 'is_defined': True, 'name': '__ZTVSt15underflow_error'} -{'type': 'U', 'is_defined': False, 'name': '__ZTVSt16invalid_argument'} -{'type': 'I', 'is_defined': True, 'name': '__ZTVSt16invalid_argument'} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVSt16nested_exception', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVSt18bad_variant_access', 'size': 0} -{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVSt19bad_optional_access', 'size': 0} -{'type': 'U', 'is_defined': False, 'name': '__ZTVSt20bad_array_new_length'} -{'type': 'I', 'is_defined': True, 'name': '__ZTVSt20bad_array_new_length'} -{'type': 'U', 'is_defined': False, 'name': '__ZTVSt8bad_cast'} -{'type': 'I', 'is_defined': True, 'name': '__ZTVSt8bad_cast'} -{'type': 'U', 'is_defined': False, 'name': '__ZTVSt9bad_alloc'} -{'type': 'I', 'is_defined': True, 'name': '__ZTVSt9bad_alloc'} -{'type': 'U', 'is_defined': False, 'name': '__ZTVSt9exception'} -{'type': 'I', 'is_defined': True, 'name': '__ZTVSt9exception'} -{'type': 'U', 'is_defined': False, 'name': '__ZTVSt9type_info'} -{'type': 'I', 'is_defined': True, 'name': '__ZTVSt9type_info'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZThn16_NSt3__214basic_iostreamIcNS_11char_traitsIcEEED0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZThn16_NSt3__214basic_iostreamIcNS_11char_traitsIcEEED1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZThn16_NSt3__29strstreamD0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZThn16_NSt3__29strstreamD1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZTv0_n24_NSt3__210istrstreamD0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZTv0_n24_NSt3__210istrstreamD1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZTv0_n24_NSt3__210ostrstreamD0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZTv0_n24_NSt3__210ostrstreamD1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZTv0_n24_NSt3__213basic_istreamIcNS_11char_traitsIcEEED0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZTv0_n24_NSt3__213basic_istreamIcNS_11char_traitsIcEEED1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZTv0_n24_NSt3__213basic_istreamIwNS_11char_traitsIwEEED0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZTv0_n24_NSt3__213basic_istreamIwNS_11char_traitsIwEEED1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZTv0_n24_NSt3__213basic_ostreamIcNS_11char_traitsIcEEED0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZTv0_n24_NSt3__213basic_ostreamIcNS_11char_traitsIcEEED1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZTv0_n24_NSt3__213basic_ostreamIwNS_11char_traitsIwEEED0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZTv0_n24_NSt3__213basic_ostreamIwNS_11char_traitsIwEEED1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZTv0_n24_NSt3__214basic_iostreamIcNS_11char_traitsIcEEED0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZTv0_n24_NSt3__214basic_iostreamIcNS_11char_traitsIcEEED1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZTv0_n24_NSt3__29strstreamD0Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZTv0_n24_NSt3__29strstreamD1Ev'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZdaPv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZdaPvRKSt9nothrow_t'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZdaPvSt11align_val_t'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZdaPvSt11align_val_tRKSt9nothrow_t'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZdaPvm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZdaPvmSt11align_val_t'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZdlPv'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZdlPvRKSt9nothrow_t'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZdlPvSt11align_val_t'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZdlPvSt11align_val_tRKSt9nothrow_t'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZdlPvm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZdlPvmSt11align_val_t'} -{'type': 'FUNC', 'is_defined': True, 'name': '__Znam'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZnamRKSt9nothrow_t'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZnamSt11align_val_t'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZnamSt11align_val_tRKSt9nothrow_t'} -{'type': 'FUNC', 'is_defined': True, 'name': '__Znwm'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZnwmRKSt9nothrow_t'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZnwmSt11align_val_t'} -{'type': 'FUNC', 'is_defined': True, 'name': '__ZnwmSt11align_val_tRKSt9nothrow_t'} -{'type': 'U', 'is_defined': False, 'name': '___cxa_allocate_exception'} -{'type': 'I', 'is_defined': True, 'name': '___cxa_allocate_exception'} -{'type': 'U', 'is_defined': False, 'name': '___cxa_atexit'} -{'type': 'U', 'is_defined': False, 'name': '___cxa_bad_cast'} -{'type': 'I', 'is_defined': True, 'name': '___cxa_bad_cast'} -{'type': 'U', 'is_defined': False, 'name': '___cxa_bad_typeid'} -{'type': 'I', 'is_defined': True, 'name': '___cxa_bad_typeid'} -{'type': 'U', 'is_defined': False, 'name': '___cxa_begin_catch'} -{'type': 'I', 'is_defined': True, 'name': '___cxa_begin_catch'} -{'type': 'U', 'is_defined': False, 'name': '___cxa_call_unexpected'} -{'type': 'I', 'is_defined': True, 'name': '___cxa_call_unexpected'} -{'type': 'U', 'is_defined': False, 'name': '___cxa_current_exception_type'} -{'type': 'I', 'is_defined': True, 'name': '___cxa_current_exception_type'} -{'type': 'U', 'is_defined': False, 'name': '___cxa_current_primary_exception'} -{'type': 'U', 'is_defined': False, 'name': '___cxa_decrement_exception_refcount'} -{'type': 'U', 'is_defined': False, 'name': '___cxa_deleted_virtual'} -{'type': 'I', 'is_defined': True, 'name': '___cxa_deleted_virtual'} -{'type': 'U', 'is_defined': False, 'name': '___cxa_demangle'} -{'type': 'I', 'is_defined': True, 'name': '___cxa_demangle'} -{'type': 'U', 'is_defined': False, 'name': '___cxa_end_catch'} -{'type': 'I', 'is_defined': True, 'name': '___cxa_end_catch'} -{'type': 'U', 'is_defined': False, 'name': '___cxa_free_exception'} -{'type': 'I', 'is_defined': True, 'name': '___cxa_free_exception'} -{'type': 'U', 'is_defined': False, 'name': '___cxa_get_exception_ptr'} -{'type': 'I', 'is_defined': True, 'name': '___cxa_get_exception_ptr'} -{'type': 'U', 'is_defined': False, 'name': '___cxa_get_globals'} -{'type': 'I', 'is_defined': True, 'name': '___cxa_get_globals'} -{'type': 'U', 'is_defined': False, 'name': '___cxa_get_globals_fast'} -{'type': 'I', 'is_defined': True, 'name': '___cxa_get_globals_fast'} -{'type': 'U', 'is_defined': False, 'name': '___cxa_guard_abort'} -{'type': 'I', 'is_defined': True, 'name': '___cxa_guard_abort'} -{'type': 'U', 'is_defined': False, 'name': '___cxa_guard_acquire'} -{'type': 'I', 'is_defined': True, 'name': '___cxa_guard_acquire'} -{'type': 'U', 'is_defined': False, 'name': '___cxa_guard_release'} -{'type': 'I', 'is_defined': True, 'name': '___cxa_guard_release'} -{'type': 'U', 'is_defined': False, 'name': '___cxa_increment_exception_refcount'} -{'type': 'U', 'is_defined': False, 'name': '___cxa_pure_virtual'} -{'type': 'I', 'is_defined': True, 'name': '___cxa_pure_virtual'} -{'type': 'U', 'is_defined': False, 'name': '___cxa_rethrow'} -{'type': 'I', 'is_defined': True, 'name': '___cxa_rethrow'} -{'type': 'U', 'is_defined': False, 'name': '___cxa_rethrow_primary_exception'} -{'type': 'U', 'is_defined': False, 'name': '___cxa_throw'} -{'type': 'I', 'is_defined': True, 'name': '___cxa_throw'} -{'type': 'U', 'is_defined': False, 'name': '___cxa_uncaught_exceptions'} -{'type': 'U', 'is_defined': False, 'name': '___cxa_vec_cctor'} -{'type': 'I', 'is_defined': True, 'name': '___cxa_vec_cctor'} -{'type': 'U', 'is_defined': False, 'name': '___cxa_vec_cleanup'} -{'type': 'I', 'is_defined': True, 'name': '___cxa_vec_cleanup'} -{'type': 'U', 'is_defined': False, 'name': '___cxa_vec_ctor'} -{'type': 'I', 'is_defined': True, 'name': '___cxa_vec_ctor'} -{'type': 'U', 'is_defined': False, 'name': '___cxa_vec_delete'} -{'type': 'I', 'is_defined': True, 'name': '___cxa_vec_delete'} -{'type': 'U', 'is_defined': False, 'name': '___cxa_vec_delete2'} -{'type': 'I', 'is_defined': True, 'name': '___cxa_vec_delete2'} -{'type': 'U', 'is_defined': False, 'name': '___cxa_vec_delete3'} -{'type': 'I', 'is_defined': True, 'name': '___cxa_vec_delete3'} -{'type': 'U', 'is_defined': False, 'name': '___cxa_vec_dtor'} -{'type': 'I', 'is_defined': True, 'name': '___cxa_vec_dtor'} -{'type': 'U', 'is_defined': False, 'name': '___cxa_vec_new'} -{'type': 'I', 'is_defined': True, 'name': '___cxa_vec_new'} -{'type': 'U', 'is_defined': False, 'name': '___cxa_vec_new2'} -{'type': 'I', 'is_defined': True, 'name': '___cxa_vec_new2'} -{'type': 'U', 'is_defined': False, 'name': '___cxa_vec_new3'} -{'type': 'I', 'is_defined': True, 'name': '___cxa_vec_new3'} -{'type': 'U', 'is_defined': False, 'name': '___dynamic_cast'} -{'type': 'I', 'is_defined': True, 'name': '___dynamic_cast'} -{'type': 'U', 'is_defined': False, 'name': '___gxx_personality_v0'} -{'type': 'I', 'is_defined': True, 'name': '___gxx_personality_v0'} +{'is_defined': False, 'name': '__ZNKSt10bad_typeid4whatEv', 'type': 'U'} +{'is_defined': True, 'name': '__ZNKSt10bad_typeid4whatEv', 'type': 'I'} +{'is_defined': False, 'name': '__ZNKSt11logic_error4whatEv', 'type': 'U'} +{'is_defined': True, 'name': '__ZNKSt11logic_error4whatEv', 'type': 'I'} +{'is_defined': True, 'name': '__ZNKSt12bad_any_cast4whatEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt12experimental15fundamentals_v112bad_any_cast4whatEv', 'type': 'FUNC'} +{'is_defined': False, 'name': '__ZNKSt13bad_exception4whatEv', 'type': 'U'} +{'is_defined': True, 'name': '__ZNKSt13bad_exception4whatEv', 'type': 'I'} +{'is_defined': False, 'name': '__ZNKSt13runtime_error4whatEv', 'type': 'U'} +{'is_defined': True, 'name': '__ZNKSt13runtime_error4whatEv', 'type': 'I'} +{'is_defined': True, 'name': '__ZNKSt16nested_exception14rethrow_nestedEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt18bad_variant_access4whatEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt19bad_optional_access4whatEv', 'type': 'FUNC'} +{'is_defined': False, 'name': '__ZNKSt20bad_array_new_length4whatEv', 'type': 'U'} +{'is_defined': True, 'name': '__ZNKSt20bad_array_new_length4whatEv', 'type': 'I'} +{'is_defined': True, 'name': '__ZNKSt3__210__time_put8__do_putEPcRS1_PK2tmcc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__210__time_put8__do_putEPwRS1_PK2tmcc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__210error_code7messageEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__210moneypunctIcLb0EE11do_groupingEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__210moneypunctIcLb0EE13do_neg_formatEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__210moneypunctIcLb0EE13do_pos_formatEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__210moneypunctIcLb0EE14do_curr_symbolEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__210moneypunctIcLb0EE14do_frac_digitsEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__210moneypunctIcLb0EE16do_decimal_pointEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__210moneypunctIcLb0EE16do_negative_signEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__210moneypunctIcLb0EE16do_positive_signEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__210moneypunctIcLb0EE16do_thousands_sepEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__210moneypunctIcLb1EE11do_groupingEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__210moneypunctIcLb1EE13do_neg_formatEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__210moneypunctIcLb1EE13do_pos_formatEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__210moneypunctIcLb1EE14do_curr_symbolEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__210moneypunctIcLb1EE14do_frac_digitsEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__210moneypunctIcLb1EE16do_decimal_pointEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__210moneypunctIcLb1EE16do_negative_signEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__210moneypunctIcLb1EE16do_positive_signEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__210moneypunctIcLb1EE16do_thousands_sepEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__210moneypunctIwLb0EE11do_groupingEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__210moneypunctIwLb0EE13do_neg_formatEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__210moneypunctIwLb0EE13do_pos_formatEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__210moneypunctIwLb0EE14do_curr_symbolEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__210moneypunctIwLb0EE14do_frac_digitsEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__210moneypunctIwLb0EE16do_decimal_pointEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__210moneypunctIwLb0EE16do_negative_signEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__210moneypunctIwLb0EE16do_positive_signEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__210moneypunctIwLb0EE16do_thousands_sepEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__210moneypunctIwLb1EE11do_groupingEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__210moneypunctIwLb1EE13do_neg_formatEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__210moneypunctIwLb1EE13do_pos_formatEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__210moneypunctIwLb1EE14do_curr_symbolEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__210moneypunctIwLb1EE14do_frac_digitsEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__210moneypunctIwLb1EE16do_decimal_pointEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__210moneypunctIwLb1EE16do_negative_signEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__210moneypunctIwLb1EE16do_positive_signEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__210moneypunctIwLb1EE16do_thousands_sepEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__211__libcpp_db15__decrementableEPKv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__211__libcpp_db15__find_c_from_iEPv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__211__libcpp_db15__subscriptableEPKvl', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__211__libcpp_db17__dereferenceableEPKv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__211__libcpp_db17__find_c_and_lockEPv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__211__libcpp_db22__less_than_comparableEPKvS2_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__211__libcpp_db6unlockEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__211__libcpp_db8__find_cEPv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__211__libcpp_db9__addableEPKvl', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__212bad_weak_ptr4whatEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE12find_last_ofEPKcmm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE13find_first_ofEPKcmm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE16find_last_not_ofEPKcmm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE17find_first_not_ofEPKcmm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE2atEm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4copyEPcmm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4findEPKcmm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4findEcm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE5rfindEPKcmm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE5rfindEcm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7compareEPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7compareEmmPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7compareEmmPKcm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7compareEmmRKS5_mm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE12find_last_ofEPKwmm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE13find_first_ofEPKwmm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE16find_last_not_ofEPKwmm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE17find_first_not_ofEPKwmm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE2atEm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE4copyEPwmm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE4findEPKwmm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE4findEwm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE5rfindEPKwmm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE5rfindEwm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7compareEPKw', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7compareEmmPKw', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7compareEmmPKwm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7compareEmmRKS5_mm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__212ctype_bynameIcE10do_tolowerEPcPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__212ctype_bynameIcE10do_tolowerEc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__212ctype_bynameIcE10do_toupperEPcPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__212ctype_bynameIcE10do_toupperEc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__212ctype_bynameIwE10do_scan_isEjPKwS3_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__212ctype_bynameIwE10do_tolowerEPwPKw', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__212ctype_bynameIwE10do_tolowerEw', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__212ctype_bynameIwE10do_toupperEPwPKw', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__212ctype_bynameIwE10do_toupperEw', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__212ctype_bynameIwE11do_scan_notEjPKwS3_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__212ctype_bynameIwE5do_isEPKwS3_Pj', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__212ctype_bynameIwE5do_isEjw', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__212ctype_bynameIwE8do_widenEPKcS3_Pw', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__212ctype_bynameIwE8do_widenEc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__212ctype_bynameIwE9do_narrowEPKwS3_cPc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__212ctype_bynameIwE9do_narrowEwc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__212strstreambuf6pcountEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__213random_device7entropyEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__214__codecvt_utf8IDiE10do_unshiftER11__mbstate_tPcS4_RS4_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__214__codecvt_utf8IDiE11do_encodingEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__214__codecvt_utf8IDiE13do_max_lengthEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__214__codecvt_utf8IDiE16do_always_noconvEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__214__codecvt_utf8IDiE5do_inER11__mbstate_tPKcS5_RS5_PDiS7_RS7_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__214__codecvt_utf8IDiE6do_outER11__mbstate_tPKDiS5_RS5_PcS7_RS7_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__214__codecvt_utf8IDiE9do_lengthER11__mbstate_tPKcS5_m', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__214__codecvt_utf8IDsE10do_unshiftER11__mbstate_tPcS4_RS4_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__214__codecvt_utf8IDsE11do_encodingEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__214__codecvt_utf8IDsE13do_max_lengthEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__214__codecvt_utf8IDsE16do_always_noconvEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__214__codecvt_utf8IDsE5do_inER11__mbstate_tPKcS5_RS5_PDsS7_RS7_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__214__codecvt_utf8IDsE6do_outER11__mbstate_tPKDsS5_RS5_PcS7_RS7_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__214__codecvt_utf8IDsE9do_lengthER11__mbstate_tPKcS5_m', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__214__codecvt_utf8IwE10do_unshiftER11__mbstate_tPcS4_RS4_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__214__codecvt_utf8IwE11do_encodingEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__214__codecvt_utf8IwE13do_max_lengthEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__214__codecvt_utf8IwE16do_always_noconvEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__214__codecvt_utf8IwE5do_inER11__mbstate_tPKcS5_RS5_PwS7_RS7_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__214__codecvt_utf8IwE6do_outER11__mbstate_tPKwS5_RS5_PcS7_RS7_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__214__codecvt_utf8IwE9do_lengthER11__mbstate_tPKcS5_m', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__214collate_bynameIcE10do_compareEPKcS3_S3_S3_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__214collate_bynameIcE12do_transformEPKcS3_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__214collate_bynameIwE10do_compareEPKwS3_S3_S3_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__214collate_bynameIwE12do_transformEPKwS3_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__214error_category10equivalentERKNS_10error_codeEi', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__214error_category10equivalentEiRKNS_15error_conditionE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__214error_category23default_error_conditionEi', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IDiLb0EE10do_unshiftER11__mbstate_tPcS4_RS4_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IDiLb0EE11do_encodingEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IDiLb0EE13do_max_lengthEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IDiLb0EE16do_always_noconvEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IDiLb0EE5do_inER11__mbstate_tPKcS5_RS5_PDiS7_RS7_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IDiLb0EE6do_outER11__mbstate_tPKDiS5_RS5_PcS7_RS7_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IDiLb0EE9do_lengthER11__mbstate_tPKcS5_m', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IDiLb1EE10do_unshiftER11__mbstate_tPcS4_RS4_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IDiLb1EE11do_encodingEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IDiLb1EE13do_max_lengthEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IDiLb1EE16do_always_noconvEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IDiLb1EE5do_inER11__mbstate_tPKcS5_RS5_PDiS7_RS7_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IDiLb1EE6do_outER11__mbstate_tPKDiS5_RS5_PcS7_RS7_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IDiLb1EE9do_lengthER11__mbstate_tPKcS5_m', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IDsLb0EE10do_unshiftER11__mbstate_tPcS4_RS4_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IDsLb0EE11do_encodingEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IDsLb0EE13do_max_lengthEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IDsLb0EE16do_always_noconvEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IDsLb0EE5do_inER11__mbstate_tPKcS5_RS5_PDsS7_RS7_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IDsLb0EE6do_outER11__mbstate_tPKDsS5_RS5_PcS7_RS7_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IDsLb0EE9do_lengthER11__mbstate_tPKcS5_m', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IDsLb1EE10do_unshiftER11__mbstate_tPcS4_RS4_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IDsLb1EE11do_encodingEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IDsLb1EE13do_max_lengthEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IDsLb1EE16do_always_noconvEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IDsLb1EE5do_inER11__mbstate_tPKcS5_RS5_PDsS7_RS7_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IDsLb1EE6do_outER11__mbstate_tPKDsS5_RS5_PcS7_RS7_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IDsLb1EE9do_lengthER11__mbstate_tPKcS5_m', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IwLb0EE10do_unshiftER11__mbstate_tPcS4_RS4_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IwLb0EE11do_encodingEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IwLb0EE13do_max_lengthEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IwLb0EE16do_always_noconvEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IwLb0EE5do_inER11__mbstate_tPKcS5_RS5_PwS7_RS7_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IwLb0EE6do_outER11__mbstate_tPKwS5_RS5_PcS7_RS7_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IwLb0EE9do_lengthER11__mbstate_tPKcS5_m', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IwLb1EE10do_unshiftER11__mbstate_tPcS4_RS4_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IwLb1EE11do_encodingEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IwLb1EE13do_max_lengthEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IwLb1EE16do_always_noconvEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IwLb1EE5do_inER11__mbstate_tPKcS5_RS5_PwS7_RS7_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IwLb1EE6do_outER11__mbstate_tPKwS5_RS5_PcS7_RS7_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IwLb1EE9do_lengthER11__mbstate_tPKcS5_m', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__215error_condition7messageEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__217bad_function_call4whatEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIcLb0EE11do_groupingEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIcLb0EE13do_neg_formatEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIcLb0EE13do_pos_formatEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIcLb0EE14do_curr_symbolEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIcLb0EE14do_frac_digitsEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIcLb0EE16do_decimal_pointEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIcLb0EE16do_negative_signEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIcLb0EE16do_positive_signEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIcLb0EE16do_thousands_sepEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIcLb1EE11do_groupingEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIcLb1EE13do_neg_formatEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIcLb1EE13do_pos_formatEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIcLb1EE14do_curr_symbolEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIcLb1EE14do_frac_digitsEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIcLb1EE16do_decimal_pointEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIcLb1EE16do_negative_signEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIcLb1EE16do_positive_signEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIcLb1EE16do_thousands_sepEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIwLb0EE11do_groupingEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIwLb0EE13do_neg_formatEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIwLb0EE13do_pos_formatEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIwLb0EE14do_curr_symbolEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIwLb0EE14do_frac_digitsEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIwLb0EE16do_decimal_pointEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIwLb0EE16do_negative_signEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIwLb0EE16do_positive_signEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIwLb0EE16do_thousands_sepEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIwLb1EE11do_groupingEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIwLb1EE13do_neg_formatEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIwLb1EE13do_pos_formatEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIwLb1EE14do_curr_symbolEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIwLb1EE14do_frac_digitsEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIwLb1EE16do_decimal_pointEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIwLb1EE16do_negative_signEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIwLb1EE16do_positive_signEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIwLb1EE16do_thousands_sepEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__218__time_get_storageIcE15__do_date_orderEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__218__time_get_storageIwE15__do_date_orderEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__219__shared_weak_count13__get_deleterERKSt9type_info', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__220__codecvt_utf8_utf16IDiE10do_unshiftER11__mbstate_tPcS4_RS4_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__220__codecvt_utf8_utf16IDiE11do_encodingEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__220__codecvt_utf8_utf16IDiE13do_max_lengthEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__220__codecvt_utf8_utf16IDiE16do_always_noconvEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__220__codecvt_utf8_utf16IDiE5do_inER11__mbstate_tPKcS5_RS5_PDiS7_RS7_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__220__codecvt_utf8_utf16IDiE6do_outER11__mbstate_tPKDiS5_RS5_PcS7_RS7_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__220__codecvt_utf8_utf16IDiE9do_lengthER11__mbstate_tPKcS5_m', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__220__codecvt_utf8_utf16IDsE10do_unshiftER11__mbstate_tPcS4_RS4_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__220__codecvt_utf8_utf16IDsE11do_encodingEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__220__codecvt_utf8_utf16IDsE13do_max_lengthEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__220__codecvt_utf8_utf16IDsE16do_always_noconvEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__220__codecvt_utf8_utf16IDsE5do_inER11__mbstate_tPKcS5_RS5_PDsS7_RS7_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__220__codecvt_utf8_utf16IDsE6do_outER11__mbstate_tPKDsS5_RS5_PcS7_RS7_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__220__codecvt_utf8_utf16IDsE9do_lengthER11__mbstate_tPKcS5_m', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__220__codecvt_utf8_utf16IwE10do_unshiftER11__mbstate_tPcS4_RS4_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__220__codecvt_utf8_utf16IwE11do_encodingEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__220__codecvt_utf8_utf16IwE13do_max_lengthEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__220__codecvt_utf8_utf16IwE16do_always_noconvEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__220__codecvt_utf8_utf16IwE5do_inER11__mbstate_tPKcS5_RS5_PwS7_RS7_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__220__codecvt_utf8_utf16IwE6do_outER11__mbstate_tPKwS5_RS5_PcS7_RS7_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__220__codecvt_utf8_utf16IwE9do_lengthER11__mbstate_tPKcS5_m', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__220__time_get_c_storageIcE3__XEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__220__time_get_c_storageIcE3__cEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__220__time_get_c_storageIcE3__rEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__220__time_get_c_storageIcE3__xEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__220__time_get_c_storageIcE7__am_pmEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__220__time_get_c_storageIcE7__weeksEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__220__time_get_c_storageIcE8__monthsEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__220__time_get_c_storageIwE3__XEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__220__time_get_c_storageIwE3__cEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__220__time_get_c_storageIwE3__rEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__220__time_get_c_storageIwE3__xEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__220__time_get_c_storageIwE7__am_pmEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__220__time_get_c_storageIwE7__weeksEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__220__time_get_c_storageIwE8__monthsEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__220__vector_base_commonILb1EE20__throw_length_errorEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__220__vector_base_commonILb1EE20__throw_out_of_rangeEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__221__basic_string_commonILb1EE20__throw_length_errorEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__221__basic_string_commonILb1EE20__throw_out_of_rangeEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__223__match_any_but_newlineIcE6__execERNS_7__stateIcEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__223__match_any_but_newlineIwE6__execERNS_7__stateIwEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__224__libcpp_debug_exception4whatEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__25ctypeIcE10do_tolowerEPcPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__25ctypeIcE10do_tolowerEc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__25ctypeIcE10do_toupperEPcPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__25ctypeIcE10do_toupperEc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__25ctypeIcE8do_widenEPKcS3_Pc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__25ctypeIcE8do_widenEc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__25ctypeIcE9do_narrowEPKcS3_cPc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__25ctypeIcE9do_narrowEcc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__25ctypeIwE10do_scan_isEjPKwS3_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__25ctypeIwE10do_tolowerEPwPKw', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__25ctypeIwE10do_tolowerEw', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__25ctypeIwE10do_toupperEPwPKw', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__25ctypeIwE10do_toupperEw', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__25ctypeIwE11do_scan_notEjPKwS3_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__25ctypeIwE5do_isEPKwS3_Pj', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__25ctypeIwE5do_isEjw', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__25ctypeIwE8do_widenEPKcS3_Pw', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__25ctypeIwE8do_widenEc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__25ctypeIwE9do_narrowEPKwS3_cPc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__25ctypeIwE9do_narrowEwc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__26locale4nameEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__26locale9has_facetERNS0_2idE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__26locale9use_facetERNS0_2idE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__26localeeqERKS0_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__27codecvtIDic11__mbstate_tE10do_unshiftERS1_PcS4_RS4_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__27codecvtIDic11__mbstate_tE11do_encodingEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__27codecvtIDic11__mbstate_tE13do_max_lengthEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__27codecvtIDic11__mbstate_tE16do_always_noconvEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__27codecvtIDic11__mbstate_tE5do_inERS1_PKcS5_RS5_PDiS7_RS7_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__27codecvtIDic11__mbstate_tE6do_outERS1_PKDiS5_RS5_PcS7_RS7_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__27codecvtIDic11__mbstate_tE9do_lengthERS1_PKcS5_m', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__27codecvtIDsc11__mbstate_tE10do_unshiftERS1_PcS4_RS4_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__27codecvtIDsc11__mbstate_tE11do_encodingEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__27codecvtIDsc11__mbstate_tE13do_max_lengthEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__27codecvtIDsc11__mbstate_tE16do_always_noconvEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__27codecvtIDsc11__mbstate_tE5do_inERS1_PKcS5_RS5_PDsS7_RS7_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__27codecvtIDsc11__mbstate_tE6do_outERS1_PKDsS5_RS5_PcS7_RS7_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__27codecvtIDsc11__mbstate_tE9do_lengthERS1_PKcS5_m', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__27codecvtIcc11__mbstate_tE10do_unshiftERS1_PcS4_RS4_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__27codecvtIcc11__mbstate_tE11do_encodingEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__27codecvtIcc11__mbstate_tE13do_max_lengthEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__27codecvtIcc11__mbstate_tE16do_always_noconvEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__27codecvtIcc11__mbstate_tE5do_inERS1_PKcS5_RS5_PcS7_RS7_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__27codecvtIcc11__mbstate_tE6do_outERS1_PKcS5_RS5_PcS7_RS7_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__27codecvtIcc11__mbstate_tE9do_lengthERS1_PKcS5_m', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__27codecvtIwc11__mbstate_tE10do_unshiftERS1_PcS4_RS4_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__27codecvtIwc11__mbstate_tE11do_encodingEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__27codecvtIwc11__mbstate_tE13do_max_lengthEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__27codecvtIwc11__mbstate_tE16do_always_noconvEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__27codecvtIwc11__mbstate_tE5do_inERS1_PKcS5_RS5_PwS7_RS7_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__27codecvtIwc11__mbstate_tE6do_outERS1_PKwS5_RS5_PcS7_RS7_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__27codecvtIwc11__mbstate_tE9do_lengthERS1_PKcS5_m', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__27collateIcE10do_compareEPKcS3_S3_S3_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__27collateIcE12do_transformEPKcS3_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__27collateIcE7do_hashEPKcS3_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__27collateIwE10do_compareEPKwS3_S3_S3_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__27collateIwE12do_transformEPKwS3_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__27collateIwE7do_hashEPKwS3_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__27num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRPv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__27num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRb', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__27num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRd', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__27num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRe', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__27num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRf', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__27num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRl', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__27num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__27num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRt', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__27num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRx', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__27num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRy', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__27num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjS8_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__27num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRPv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__27num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRb', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__27num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRd', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__27num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRe', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__27num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRf', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__27num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRl', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__27num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__27num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRt', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__27num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRx', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__27num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRy', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__27num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjS8_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__27num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEcPKv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__27num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEcb', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__27num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEcd', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__27num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEce', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__27num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEcl', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__27num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEcm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__27num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEcx', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__27num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEcy', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__27num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwPKv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__27num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwb', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__27num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwd', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__27num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwe', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__27num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwl', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__27num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__27num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwx', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__27num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwy', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__28ios_base6getlocEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__28messagesIcE6do_getEliiRKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__28messagesIcE7do_openERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERKNS_6localeE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__28messagesIcE8do_closeEl', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__28messagesIwE6do_getEliiRKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__28messagesIwE7do_openERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERKNS_6localeE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__28messagesIwE8do_closeEl', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__28numpunctIcE11do_groupingEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__28numpunctIcE11do_truenameEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__28numpunctIcE12do_falsenameEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__28numpunctIcE16do_decimal_pointEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__28numpunctIcE16do_thousands_sepEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__28numpunctIwE11do_groupingEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__28numpunctIwE11do_truenameEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__28numpunctIwE12do_falsenameEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__28numpunctIwE16do_decimal_pointEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__28numpunctIwE16do_thousands_sepEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__28time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE10__get_hourERiRS4_S4_RjRKNS_5ctypeIcEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__28time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE10__get_yearERiRS4_S4_RjRKNS_5ctypeIcEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__28time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE11__get_am_pmERiRS4_S4_RjRKNS_5ctypeIcEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__28time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE11__get_monthERiRS4_S4_RjRKNS_5ctypeIcEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__28time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE11__get_year4ERiRS4_S4_RjRKNS_5ctypeIcEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__28time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE11do_get_dateES4_S4_RNS_8ios_baseERjP2tm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__28time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE11do_get_timeES4_S4_RNS_8ios_baseERjP2tm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__28time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE11do_get_yearES4_S4_RNS_8ios_baseERjP2tm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__28time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE12__get_minuteERiRS4_S4_RjRKNS_5ctypeIcEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__28time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE12__get_secondERiRS4_S4_RjRKNS_5ctypeIcEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__28time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE13__get_12_hourERiRS4_S4_RjRKNS_5ctypeIcEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__28time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE13__get_percentERS4_S4_RjRKNS_5ctypeIcEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__28time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE13__get_weekdayERiRS4_S4_RjRKNS_5ctypeIcEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__28time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE13do_date_orderEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__28time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE14do_get_weekdayES4_S4_RNS_8ios_baseERjP2tm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__28time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE15__get_monthnameERiRS4_S4_RjRKNS_5ctypeIcEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__28time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE16do_get_monthnameES4_S4_RNS_8ios_baseERjP2tm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__28time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE17__get_weekdaynameERiRS4_S4_RjRKNS_5ctypeIcEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__28time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE17__get_white_spaceERS4_S4_RjRKNS_5ctypeIcEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__28time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE18__get_day_year_numERiRS4_S4_RjRKNS_5ctypeIcEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__28time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE3getES4_S4_RNS_8ios_baseERjP2tmPKcSC_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__28time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjP2tmcc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__28time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE9__get_dayERiRS4_S4_RjRKNS_5ctypeIcEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__28time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE10__get_hourERiRS4_S4_RjRKNS_5ctypeIwEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__28time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE10__get_yearERiRS4_S4_RjRKNS_5ctypeIwEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__28time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE11__get_am_pmERiRS4_S4_RjRKNS_5ctypeIwEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__28time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE11__get_monthERiRS4_S4_RjRKNS_5ctypeIwEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__28time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE11__get_year4ERiRS4_S4_RjRKNS_5ctypeIwEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__28time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE11do_get_dateES4_S4_RNS_8ios_baseERjP2tm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__28time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE11do_get_timeES4_S4_RNS_8ios_baseERjP2tm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__28time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE11do_get_yearES4_S4_RNS_8ios_baseERjP2tm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__28time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE12__get_minuteERiRS4_S4_RjRKNS_5ctypeIwEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__28time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE12__get_secondERiRS4_S4_RjRKNS_5ctypeIwEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__28time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE13__get_12_hourERiRS4_S4_RjRKNS_5ctypeIwEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__28time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE13__get_percentERS4_S4_RjRKNS_5ctypeIwEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__28time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE13__get_weekdayERiRS4_S4_RjRKNS_5ctypeIwEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__28time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE13do_date_orderEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__28time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE14do_get_weekdayES4_S4_RNS_8ios_baseERjP2tm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__28time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE15__get_monthnameERiRS4_S4_RjRKNS_5ctypeIwEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__28time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE16do_get_monthnameES4_S4_RNS_8ios_baseERjP2tm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__28time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE17__get_weekdaynameERiRS4_S4_RjRKNS_5ctypeIwEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__28time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE17__get_white_spaceERS4_S4_RjRKNS_5ctypeIwEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__28time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE18__get_day_year_numERiRS4_S4_RjRKNS_5ctypeIwEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__28time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE3getES4_S4_RNS_8ios_baseERjP2tmPKwSC_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__28time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjP2tmcc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__28time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE9__get_dayERiRS4_S4_RjRKNS_5ctypeIwEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__28time_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE3putES4_RNS_8ios_baseEcPK2tmPKcSC_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__28time_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEcPK2tmcc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__28time_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE3putES4_RNS_8ios_baseEwPK2tmPKwSC_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__28time_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwPK2tmcc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__29__num_getIcE10__do_widenERNS_8ios_baseEPc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__29__num_getIcE12__do_widen_pERNS_8ios_baseEPc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__29__num_getIwE10__do_widenERNS_8ios_baseEPw', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__29__num_getIwE12__do_widen_pERNS_8ios_baseEPc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__29money_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_bRNS_8ios_baseERjRNS_12basic_stringIcS3_NS_9allocatorIcEEEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__29money_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_bRNS_8ios_baseERjRe', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__29money_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_bRNS_8ios_baseERjRNS_12basic_stringIwS3_NS_9allocatorIwEEEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__29money_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_bRNS_8ios_baseERjRe', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__29money_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_bRNS_8ios_baseEcRKNS_12basic_stringIcS3_NS_9allocatorIcEEEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__29money_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_bRNS_8ios_baseEce', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__29money_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_bRNS_8ios_baseEwRKNS_12basic_stringIwS3_NS_9allocatorIwEEEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__29money_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_bRNS_8ios_baseEwe', 'type': 'FUNC'} +{'is_defined': False, 'name': '__ZNKSt8bad_cast4whatEv', 'type': 'U'} +{'is_defined': True, 'name': '__ZNKSt8bad_cast4whatEv', 'type': 'I'} +{'is_defined': False, 'name': '__ZNKSt9bad_alloc4whatEv', 'type': 'U'} +{'is_defined': True, 'name': '__ZNKSt9bad_alloc4whatEv', 'type': 'I'} +{'is_defined': False, 'name': '__ZNKSt9exception4whatEv', 'type': 'U'} +{'is_defined': True, 'name': '__ZNKSt9exception4whatEv', 'type': 'I'} +{'is_defined': False, 'name': '__ZNSt10bad_typeidC1Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt10bad_typeidC1Ev', 'type': 'I'} +{'is_defined': False, 'name': '__ZNSt10bad_typeidC2Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt10bad_typeidC2Ev', 'type': 'I'} +{'is_defined': False, 'name': '__ZNSt10bad_typeidD0Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt10bad_typeidD0Ev', 'type': 'I'} +{'is_defined': False, 'name': '__ZNSt10bad_typeidD1Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt10bad_typeidD1Ev', 'type': 'I'} +{'is_defined': False, 'name': '__ZNSt10bad_typeidD2Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt10bad_typeidD2Ev', 'type': 'I'} +{'is_defined': True, 'name': '__ZNSt11logic_errorC1EPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt11logic_errorC1ERKNSt3__212basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt11logic_errorC1ERKS_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt11logic_errorC2EPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt11logic_errorC2ERKNSt3__212basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt11logic_errorC2ERKS_', 'type': 'FUNC'} +{'is_defined': False, 'name': '__ZNSt11logic_errorD0Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt11logic_errorD0Ev', 'type': 'I'} +{'is_defined': False, 'name': '__ZNSt11logic_errorD1Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt11logic_errorD1Ev', 'type': 'I'} +{'is_defined': False, 'name': '__ZNSt11logic_errorD2Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt11logic_errorD2Ev', 'type': 'I'} +{'is_defined': True, 'name': '__ZNSt11logic_erroraSERKS_', 'type': 'FUNC'} +{'is_defined': False, 'name': '__ZNSt11range_errorD0Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt11range_errorD0Ev', 'type': 'I'} +{'is_defined': False, 'name': '__ZNSt11range_errorD1Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt11range_errorD1Ev', 'type': 'I'} +{'is_defined': False, 'name': '__ZNSt11range_errorD2Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt11range_errorD2Ev', 'type': 'I'} +{'is_defined': False, 'name': '__ZNSt12domain_errorD0Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt12domain_errorD0Ev', 'type': 'I'} +{'is_defined': False, 'name': '__ZNSt12domain_errorD1Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt12domain_errorD1Ev', 'type': 'I'} +{'is_defined': False, 'name': '__ZNSt12domain_errorD2Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt12domain_errorD2Ev', 'type': 'I'} +{'is_defined': True, 'name': '__ZNSt12experimental19bad_optional_accessD0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt12experimental19bad_optional_accessD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt12experimental19bad_optional_accessD2Ev', 'type': 'FUNC'} +{'is_defined': False, 'name': '__ZNSt12length_errorD0Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt12length_errorD0Ev', 'type': 'I'} +{'is_defined': False, 'name': '__ZNSt12length_errorD1Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt12length_errorD1Ev', 'type': 'I'} +{'is_defined': False, 'name': '__ZNSt12length_errorD2Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt12length_errorD2Ev', 'type': 'I'} +{'is_defined': False, 'name': '__ZNSt12out_of_rangeD0Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt12out_of_rangeD0Ev', 'type': 'I'} +{'is_defined': False, 'name': '__ZNSt12out_of_rangeD1Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt12out_of_rangeD1Ev', 'type': 'I'} +{'is_defined': False, 'name': '__ZNSt12out_of_rangeD2Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt12out_of_rangeD2Ev', 'type': 'I'} +{'is_defined': False, 'name': '__ZNSt13bad_exceptionD0Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt13bad_exceptionD0Ev', 'type': 'I'} +{'is_defined': False, 'name': '__ZNSt13bad_exceptionD1Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt13bad_exceptionD1Ev', 'type': 'I'} +{'is_defined': False, 'name': '__ZNSt13bad_exceptionD2Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt13bad_exceptionD2Ev', 'type': 'I'} +{'is_defined': True, 'name': '__ZNSt13exception_ptrC1ERKS_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt13exception_ptrC2ERKS_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt13exception_ptrD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt13exception_ptrD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt13exception_ptraSERKS_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt13runtime_errorC1EPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt13runtime_errorC1ERKNSt3__212basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt13runtime_errorC1ERKS_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt13runtime_errorC2EPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt13runtime_errorC2ERKNSt3__212basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt13runtime_errorC2ERKS_', 'type': 'FUNC'} +{'is_defined': False, 'name': '__ZNSt13runtime_errorD0Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt13runtime_errorD0Ev', 'type': 'I'} +{'is_defined': False, 'name': '__ZNSt13runtime_errorD1Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt13runtime_errorD1Ev', 'type': 'I'} +{'is_defined': False, 'name': '__ZNSt13runtime_errorD2Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt13runtime_errorD2Ev', 'type': 'I'} +{'is_defined': True, 'name': '__ZNSt13runtime_erroraSERKS_', 'type': 'FUNC'} +{'is_defined': False, 'name': '__ZNSt14overflow_errorD0Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt14overflow_errorD0Ev', 'type': 'I'} +{'is_defined': False, 'name': '__ZNSt14overflow_errorD1Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt14overflow_errorD1Ev', 'type': 'I'} +{'is_defined': False, 'name': '__ZNSt14overflow_errorD2Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt14overflow_errorD2Ev', 'type': 'I'} +{'is_defined': False, 'name': '__ZNSt15underflow_errorD0Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt15underflow_errorD0Ev', 'type': 'I'} +{'is_defined': False, 'name': '__ZNSt15underflow_errorD1Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt15underflow_errorD1Ev', 'type': 'I'} +{'is_defined': False, 'name': '__ZNSt15underflow_errorD2Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt15underflow_errorD2Ev', 'type': 'I'} +{'is_defined': False, 'name': '__ZNSt16invalid_argumentD0Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt16invalid_argumentD0Ev', 'type': 'I'} +{'is_defined': False, 'name': '__ZNSt16invalid_argumentD1Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt16invalid_argumentD1Ev', 'type': 'I'} +{'is_defined': False, 'name': '__ZNSt16invalid_argumentD2Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt16invalid_argumentD2Ev', 'type': 'I'} +{'is_defined': True, 'name': '__ZNSt16nested_exceptionC1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt16nested_exceptionC2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt16nested_exceptionD0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt16nested_exceptionD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt16nested_exceptionD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt19bad_optional_accessD0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt19bad_optional_accessD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt19bad_optional_accessD2Ev', 'type': 'FUNC'} +{'is_defined': False, 'name': '__ZNSt20bad_array_new_lengthC1Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt20bad_array_new_lengthC1Ev', 'type': 'I'} +{'is_defined': False, 'name': '__ZNSt20bad_array_new_lengthC2Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt20bad_array_new_lengthC2Ev', 'type': 'I'} +{'is_defined': False, 'name': '__ZNSt20bad_array_new_lengthD0Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt20bad_array_new_lengthD0Ev', 'type': 'I'} +{'is_defined': False, 'name': '__ZNSt20bad_array_new_lengthD1Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt20bad_array_new_lengthD1Ev', 'type': 'I'} +{'is_defined': False, 'name': '__ZNSt20bad_array_new_lengthD2Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt20bad_array_new_lengthD2Ev', 'type': 'I'} +{'is_defined': True, 'name': '__ZNSt3__210__time_getC1EPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__210__time_getC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__210__time_getC2EPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__210__time_getC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__210__time_getD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__210__time_getD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__210__time_putC1EPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__210__time_putC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__210__time_putC2EPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__210__time_putC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__210__time_putD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__210__time_putD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__210adopt_lockE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__210ctype_base5alnumE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__210ctype_base5alphaE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__210ctype_base5blankE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__210ctype_base5cntrlE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__210ctype_base5digitE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__210ctype_base5graphE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__210ctype_base5lowerE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__210ctype_base5printE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__210ctype_base5punctE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__210ctype_base5spaceE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__210ctype_base5upperE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__210ctype_base6xdigitE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__210defer_lockE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__210istrstreamD0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__210istrstreamD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__210istrstreamD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__210moneypunctIcLb0EE2idE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__210moneypunctIcLb0EE4intlE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__210moneypunctIcLb1EE2idE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__210moneypunctIcLb1EE4intlE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__210moneypunctIwLb0EE2idE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__210moneypunctIwLb0EE4intlE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__210moneypunctIwLb1EE2idE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__210moneypunctIwLb1EE4intlE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__210ostrstreamD0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__210ostrstreamD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__210ostrstreamD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__210to_wstringEd', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__210to_wstringEe', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__210to_wstringEf', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__210to_wstringEi', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__210to_wstringEj', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__210to_wstringEl', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__210to_wstringEm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__210to_wstringEx', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__210to_wstringEy', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__211__call_onceERVmPvPFvS2_E', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__211__libcpp_db10__insert_cEPvPFPNS_8__c_nodeES1_S1_S3_E', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__211__libcpp_db10__insert_iEPv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__211__libcpp_db11__insert_icEPvPKv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__211__libcpp_db15__iterator_copyEPvPKv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__211__libcpp_db16__invalidate_allEPv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__211__libcpp_db4swapEPvS1_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__211__libcpp_db9__erase_cEPv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__211__libcpp_db9__erase_iEPv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__211__libcpp_dbC1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__211__libcpp_dbC2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__211__libcpp_dbD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__211__libcpp_dbD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__211__money_getIcE13__gather_infoEbRKNS_6localeERNS_10money_base7patternERcS8_RNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEESF_SF_SF_Ri', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__211__money_getIwE13__gather_infoEbRKNS_6localeERNS_10money_base7patternERwS8_RNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERNS9_IwNSA_IwEENSC_IwEEEESJ_SJ_Ri', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__211__money_putIcE13__gather_infoEbbRKNS_6localeERNS_10money_base7patternERcS8_RNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEESF_SF_Ri', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__211__money_putIcE8__formatEPcRS2_S3_jPKcS5_RKNS_5ctypeIcEEbRKNS_10money_base7patternEccRKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEESL_SL_i', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__211__money_putIwE13__gather_infoEbbRKNS_6localeERNS_10money_base7patternERwS8_RNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERNS9_IwNSA_IwEENSC_IwEEEESJ_Ri', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__211__money_putIwE8__formatEPwRS2_S3_jPKwS5_RKNS_5ctypeIwEEbRKNS_10money_base7patternEwwRKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERKNSE_IwNSF_IwEENSH_IwEEEESQ_i', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__211regex_errorC1ENS_15regex_constants10error_typeE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__211regex_errorC2ENS_15regex_constants10error_typeE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__211regex_errorD0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__211regex_errorD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__211regex_errorD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__211this_thread9sleep_forERKNS_6chrono8durationIxNS_5ratioILl1ELl1000000000EEEEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__211timed_mutex4lockEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__211timed_mutex6unlockEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__211timed_mutex8try_lockEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__211timed_mutexC1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__211timed_mutexC2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__211timed_mutexD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__211timed_mutexD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__211try_to_lockE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__212__do_nothingEPv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212__get_sp_mutEPKv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212__next_primeEm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212__rs_default4__c_E', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__212__rs_defaultC1ERKS0_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212__rs_defaultC1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212__rs_defaultC2ERKS0_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212__rs_defaultC2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212__rs_defaultD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212__rs_defaultD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212__rs_defaultclEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212bad_weak_ptrD0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212bad_weak_ptrD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212bad_weak_ptrD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE21__grow_by_and_replaceEmmmmmmPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE2atEm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4nposE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE5eraseEmm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcmm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEmc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6appendEPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6appendEPKcm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6appendERKS5_mm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6appendEmc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignEPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignEPKcm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignERKS5_mm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignEmc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6insertENS_11__wrap_iterIPKcEEc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6insertEmPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6insertEmPKcm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6insertEmRKS5_mm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6insertEmmc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6resizeEmc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7replaceEmmPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7replaceEmmPKcm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7replaceEmmRKS5_mm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7replaceEmmmc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7reserveEm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9__grow_byEmmmmmm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9push_backEc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC1ERKS5_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC1ERKS5_RKS4_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC1ERKS5_mmRKS4_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2ERKS5_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2ERKS5_RKS4_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2ERKS5_mmRKS4_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEaSERKS5_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEaSEc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE21__grow_by_and_replaceEmmmmmmPKw', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE2atEm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE4nposE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE5eraseEmm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6__initEPKwm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6__initEPKwmm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6__initEmw', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6appendEPKw', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6appendEPKwm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6appendERKS5_mm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6appendEmw', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6assignEPKw', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6assignEPKwm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6assignERKS5_mm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6assignEmw', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6insertENS_11__wrap_iterIPKwEEw', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6insertEmPKw', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6insertEmPKwm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6insertEmRKS5_mm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6insertEmmw', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6resizeEmw', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7replaceEmmPKw', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7replaceEmmPKwm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7replaceEmmRKS5_mm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7replaceEmmmw', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7reserveEm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE9__grow_byEmmmmmm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE9push_backEw', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC1ERKS5_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC1ERKS5_RKS4_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC1ERKS5_mmRKS4_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC2ERKS5_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC2ERKS5_RKS4_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC2ERKS5_mmRKS4_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEaSERKS5_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEaSEw', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212ctype_bynameIcEC1EPKcm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212ctype_bynameIcEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212ctype_bynameIcEC2EPKcm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212ctype_bynameIcEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212ctype_bynameIcED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212ctype_bynameIcED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212ctype_bynameIcED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212ctype_bynameIwEC1EPKcm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212ctype_bynameIwEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212ctype_bynameIwEC2EPKcm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212ctype_bynameIwEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212ctype_bynameIwED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212ctype_bynameIwED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212ctype_bynameIwED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212future_errorC1ENS_10error_codeE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212future_errorC2ENS_10error_codeE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212future_errorD0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212future_errorD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212future_errorD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212placeholders2_1E', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__212placeholders2_2E', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__212placeholders2_3E', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__212placeholders2_4E', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__212placeholders2_5E', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__212placeholders2_6E', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__212placeholders2_7E', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__212placeholders2_8E', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__212placeholders2_9E', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__212placeholders3_10E', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__212strstreambuf3strEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212strstreambuf4swapERS0_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212strstreambuf6__initEPclS1_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212strstreambuf6freezeEb', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212strstreambuf7seekoffExNS_8ios_base7seekdirEj', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212strstreambuf7seekposENS_4fposI11__mbstate_tEEj', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212strstreambuf8overflowEi', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212strstreambuf9pbackfailEi', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212strstreambuf9underflowEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212strstreambufC1EPFPvmEPFvS1_E', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212strstreambufC1EPKal', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212strstreambufC1EPKcl', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212strstreambufC1EPKhl', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212strstreambufC1EPalS1_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212strstreambufC1EPclS1_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212strstreambufC1EPhlS1_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212strstreambufC1El', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212strstreambufC2EPFPvmEPFvS1_E', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212strstreambufC2EPKal', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212strstreambufC2EPKcl', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212strstreambufC2EPKhl', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212strstreambufC2EPalS1_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212strstreambufC2EPclS1_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212strstreambufC2EPhlS1_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212strstreambufC2El', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212strstreambufD0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212strstreambufD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212strstreambufD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212system_error6__initERKNS_10error_codeENS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212system_errorC1ENS_10error_codeE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212system_errorC1ENS_10error_codeEPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212system_errorC1ENS_10error_codeERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212system_errorC1EiRKNS_14error_categoryE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212system_errorC1EiRKNS_14error_categoryEPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212system_errorC1EiRKNS_14error_categoryERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212system_errorC2ENS_10error_codeE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212system_errorC2ENS_10error_codeEPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212system_errorC2ENS_10error_codeERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212system_errorC2EiRKNS_14error_categoryE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212system_errorC2EiRKNS_14error_categoryEPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212system_errorC2EiRKNS_14error_categoryERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212system_errorD0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212system_errorD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__212system_errorD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213allocator_argE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEE3getEPclc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEE3getERNS_15basic_streambufIcS2_EEc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEE3getEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEE4peekEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEE4readEPcl', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEE4syncEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEE5seekgENS_4fposI11__mbstate_tEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEE5seekgExNS_8ios_base7seekdirE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEE5tellgEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEE5ungetEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEE6ignoreEli', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEE6sentryC1ERS3_b', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEE6sentryC2ERS3_b', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEE7getlineEPclc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEE7putbackEc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEE8readsomeEPcl', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEErsEPNS_15basic_streambufIcS2_EE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEErsERPv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEErsERb', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEErsERd', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEErsERe', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEErsERf', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEErsERi', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEErsERj', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEErsERl', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEErsERm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEErsERs', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEErsERt', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEErsERx', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEErsERy', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEE3getEPwlw', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEE3getERNS_15basic_streambufIwS2_EEw', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEE3getEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEE4peekEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEE4readEPwl', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEE4syncEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEE5seekgENS_4fposI11__mbstate_tEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEE5seekgExNS_8ios_base7seekdirE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEE5tellgEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEE5ungetEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEE6ignoreEli', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEE6sentryC1ERS3_b', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEE6sentryC2ERS3_b', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEE7getlineEPwlw', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEE7putbackEw', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEE8readsomeEPwl', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEErsEPNS_15basic_streambufIwS2_EE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEErsERPv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEErsERb', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEErsERd', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEErsERe', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEErsERf', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEErsERi', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEErsERj', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEErsERl', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEErsERm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEErsERs', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEErsERt', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEErsERx', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEErsERy', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIcNS_11char_traitsIcEEE3putEc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIcNS_11char_traitsIcEEE5flushEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIcNS_11char_traitsIcEEE5writeEPKcl', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIcNS_11char_traitsIcEEE6sentryC1ERS3_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIcNS_11char_traitsIcEEE6sentryC2ERS3_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIcNS_11char_traitsIcEEE6sentryD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIcNS_11char_traitsIcEEE6sentryD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIcNS_11char_traitsIcEEED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIcNS_11char_traitsIcEEED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIcNS_11char_traitsIcEEED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIcNS_11char_traitsIcEEElsEPKv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIcNS_11char_traitsIcEEElsEPNS_15basic_streambufIcS2_EE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIcNS_11char_traitsIcEEElsEb', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIcNS_11char_traitsIcEEElsEd', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIcNS_11char_traitsIcEEElsEe', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIcNS_11char_traitsIcEEElsEf', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIcNS_11char_traitsIcEEElsEi', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIcNS_11char_traitsIcEEElsEj', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIcNS_11char_traitsIcEEElsEl', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIcNS_11char_traitsIcEEElsEm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIcNS_11char_traitsIcEEElsEs', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIcNS_11char_traitsIcEEElsEt', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIcNS_11char_traitsIcEEElsEx', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIcNS_11char_traitsIcEEElsEy', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIwNS_11char_traitsIwEEE3putEw', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIwNS_11char_traitsIwEEE5flushEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIwNS_11char_traitsIwEEE5writeEPKwl', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIwNS_11char_traitsIwEEE6sentryC1ERS3_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIwNS_11char_traitsIwEEE6sentryC2ERS3_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIwNS_11char_traitsIwEEE6sentryD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIwNS_11char_traitsIwEEE6sentryD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIwNS_11char_traitsIwEEED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIwNS_11char_traitsIwEEED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIwNS_11char_traitsIwEEED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIwNS_11char_traitsIwEEElsEPKv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIwNS_11char_traitsIwEEElsEPNS_15basic_streambufIwS2_EE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIwNS_11char_traitsIwEEElsEb', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIwNS_11char_traitsIwEEElsEd', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIwNS_11char_traitsIwEEElsEe', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIwNS_11char_traitsIwEEElsEf', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIwNS_11char_traitsIwEEElsEi', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIwNS_11char_traitsIwEEElsEj', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIwNS_11char_traitsIwEEElsEl', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIwNS_11char_traitsIwEEElsEm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIwNS_11char_traitsIwEEElsEs', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIwNS_11char_traitsIwEEElsEt', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIwNS_11char_traitsIwEEElsEx', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIwNS_11char_traitsIwEEElsEy', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213random_deviceC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213random_deviceC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213random_deviceD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213random_deviceD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213random_deviceclEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213shared_futureIvED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213shared_futureIvED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__213shared_futureIvEaSERKS1_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__214__get_const_dbEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__214__num_get_base10__get_baseERNS_8ios_baseE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__214__num_get_base5__srcE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__214__num_put_base12__format_intEPcPKcbj', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__214__num_put_base14__format_floatEPcPKcj', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__214__num_put_base18__identify_paddingEPcS1_RKNS_8ios_baseE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__214__shared_countD0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__214__shared_countD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__214__shared_countD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__214basic_iostreamIcNS_11char_traitsIcEEED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__214basic_iostreamIcNS_11char_traitsIcEEED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__214basic_iostreamIcNS_11char_traitsIcEEED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__214codecvt_bynameIDic11__mbstate_tED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__214codecvt_bynameIDic11__mbstate_tED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__214codecvt_bynameIDic11__mbstate_tED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__214codecvt_bynameIDsc11__mbstate_tED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__214codecvt_bynameIDsc11__mbstate_tED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__214codecvt_bynameIDsc11__mbstate_tED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__214codecvt_bynameIcc11__mbstate_tED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__214codecvt_bynameIcc11__mbstate_tED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__214codecvt_bynameIcc11__mbstate_tED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__214codecvt_bynameIwc11__mbstate_tED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__214codecvt_bynameIwc11__mbstate_tED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__214codecvt_bynameIwc11__mbstate_tED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__214collate_bynameIcEC1EPKcm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__214collate_bynameIcEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__214collate_bynameIcEC2EPKcm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__214collate_bynameIcEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__214collate_bynameIcED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__214collate_bynameIcED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__214collate_bynameIcED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__214collate_bynameIwEC1EPKcm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__214collate_bynameIwEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__214collate_bynameIwEC2EPKcm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__214collate_bynameIwEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__214collate_bynameIwED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__214collate_bynameIwED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__214collate_bynameIwED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__214error_categoryD0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__214error_categoryD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__214error_categoryD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__215__get_classnameEPKcb', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__215__thread_struct25notify_all_at_thread_exitEPNS_18condition_variableEPNS_5mutexE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__215__thread_struct27__make_ready_at_thread_exitEPNS_17__assoc_sub_stateE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__215__thread_structC1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__215__thread_structC2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__215__thread_structD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__215__thread_structD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__215basic_streambufIcNS_11char_traitsIcEEE4swapERS3_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__215basic_streambufIcNS_11char_traitsIcEEE4syncEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__215basic_streambufIcNS_11char_traitsIcEEE5imbueERKNS_6localeE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__215basic_streambufIcNS_11char_traitsIcEEE5uflowEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__215basic_streambufIcNS_11char_traitsIcEEE6setbufEPcl', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__215basic_streambufIcNS_11char_traitsIcEEE6xsgetnEPcl', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__215basic_streambufIcNS_11char_traitsIcEEE6xsputnEPKcl', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__215basic_streambufIcNS_11char_traitsIcEEE7seekoffExNS_8ios_base7seekdirEj', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__215basic_streambufIcNS_11char_traitsIcEEE7seekposENS_4fposI11__mbstate_tEEj', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__215basic_streambufIcNS_11char_traitsIcEEE8overflowEi', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__215basic_streambufIcNS_11char_traitsIcEEE9pbackfailEi', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__215basic_streambufIcNS_11char_traitsIcEEE9showmanycEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__215basic_streambufIcNS_11char_traitsIcEEE9underflowEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__215basic_streambufIcNS_11char_traitsIcEEEC1ERKS3_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__215basic_streambufIcNS_11char_traitsIcEEEC1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__215basic_streambufIcNS_11char_traitsIcEEEC2ERKS3_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__215basic_streambufIcNS_11char_traitsIcEEEC2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__215basic_streambufIcNS_11char_traitsIcEEED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__215basic_streambufIcNS_11char_traitsIcEEED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__215basic_streambufIcNS_11char_traitsIcEEED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__215basic_streambufIcNS_11char_traitsIcEEEaSERKS3_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__215basic_streambufIwNS_11char_traitsIwEEE4swapERS3_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__215basic_streambufIwNS_11char_traitsIwEEE4syncEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__215basic_streambufIwNS_11char_traitsIwEEE5imbueERKNS_6localeE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__215basic_streambufIwNS_11char_traitsIwEEE5uflowEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__215basic_streambufIwNS_11char_traitsIwEEE6setbufEPwl', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__215basic_streambufIwNS_11char_traitsIwEEE6xsgetnEPwl', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__215basic_streambufIwNS_11char_traitsIwEEE6xsputnEPKwl', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__215basic_streambufIwNS_11char_traitsIwEEE7seekoffExNS_8ios_base7seekdirEj', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__215basic_streambufIwNS_11char_traitsIwEEE7seekposENS_4fposI11__mbstate_tEEj', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__215basic_streambufIwNS_11char_traitsIwEEE8overflowEi', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__215basic_streambufIwNS_11char_traitsIwEEE9pbackfailEi', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__215basic_streambufIwNS_11char_traitsIwEEE9showmanycEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__215basic_streambufIwNS_11char_traitsIwEEE9underflowEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__215basic_streambufIwNS_11char_traitsIwEEEC1ERKS3_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__215basic_streambufIwNS_11char_traitsIwEEEC1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__215basic_streambufIwNS_11char_traitsIwEEEC2ERKS3_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__215basic_streambufIwNS_11char_traitsIwEEEC2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__215basic_streambufIwNS_11char_traitsIwEEED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__215basic_streambufIwNS_11char_traitsIwEEED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__215basic_streambufIwNS_11char_traitsIwEEED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__215basic_streambufIwNS_11char_traitsIwEEEaSERKS3_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__215future_categoryEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__215numpunct_bynameIcE6__initEPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__215numpunct_bynameIcEC1EPKcm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__215numpunct_bynameIcEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__215numpunct_bynameIcEC2EPKcm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__215numpunct_bynameIcEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__215numpunct_bynameIcED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__215numpunct_bynameIcED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__215numpunct_bynameIcED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__215numpunct_bynameIwE6__initEPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__215numpunct_bynameIwEC1EPKcm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__215numpunct_bynameIwEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__215numpunct_bynameIwEC2EPKcm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__215numpunct_bynameIwEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__215numpunct_bynameIwED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__215numpunct_bynameIwED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__215numpunct_bynameIwED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__215recursive_mutex4lockEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__215recursive_mutex6unlockEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__215recursive_mutex8try_lockEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__215recursive_mutexC1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__215recursive_mutexC2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__215recursive_mutexD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__215recursive_mutexD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__215system_categoryEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__216__check_groupingERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPjS8_Rj', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__216__narrow_to_utf8ILm16EED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__216__narrow_to_utf8ILm16EED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__216__narrow_to_utf8ILm16EED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__216__narrow_to_utf8ILm32EED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__216__narrow_to_utf8ILm32EED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__216__narrow_to_utf8ILm32EED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__216generic_categoryEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__217__assoc_sub_state10__sub_waitERNS_11unique_lockINS_5mutexEEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__217__assoc_sub_state12__make_readyEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__217__assoc_sub_state13set_exceptionESt13exception_ptr', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__217__assoc_sub_state16__on_zero_sharedEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__217__assoc_sub_state24set_value_at_thread_exitEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__217__assoc_sub_state28set_exception_at_thread_exitESt13exception_ptr', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__217__assoc_sub_state4copyEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__217__assoc_sub_state4waitEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__217__assoc_sub_state9__executeEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__217__assoc_sub_state9set_valueEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__217__widen_from_utf8ILm16EED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__217__widen_from_utf8ILm16EED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__217__widen_from_utf8ILm16EED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__217__widen_from_utf8ILm32EED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__217__widen_from_utf8ILm32EED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__217__widen_from_utf8ILm32EED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__217bad_function_callD0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__217bad_function_callD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__217bad_function_callD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__217declare_reachableEPv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__217iostream_categoryEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__217moneypunct_bynameIcLb0EE4initEPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__217moneypunct_bynameIcLb1EE4initEPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__217moneypunct_bynameIwLb0EE4initEPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__217moneypunct_bynameIwLb1EE4initEPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__218__time_get_storageIcE4initERKNS_5ctypeIcEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__218__time_get_storageIcE9__analyzeEcRKNS_5ctypeIcEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__218__time_get_storageIcEC1EPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__218__time_get_storageIcEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__218__time_get_storageIcEC2EPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__218__time_get_storageIcEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__218__time_get_storageIwE4initERKNS_5ctypeIwEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__218__time_get_storageIwE9__analyzeEcRKNS_5ctypeIwEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__218__time_get_storageIwEC1EPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__218__time_get_storageIwEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__218__time_get_storageIwEC2EPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__218__time_get_storageIwEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__218condition_variable10notify_allEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__218condition_variable10notify_oneEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__218condition_variable15__do_timed_waitERNS_11unique_lockINS_5mutexEEENS_6chrono10time_pointINS5_12system_clockENS5_8durationIxNS_5ratioILl1ELl1000000000EEEEEEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__218condition_variable4waitERNS_11unique_lockINS_5mutexEEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__218condition_variableD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__218condition_variableD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__218shared_timed_mutex11lock_sharedEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__218shared_timed_mutex13unlock_sharedEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__218shared_timed_mutex15try_lock_sharedEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__218shared_timed_mutex4lockEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__218shared_timed_mutex6unlockEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__218shared_timed_mutex8try_lockEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__218shared_timed_mutexC1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__218shared_timed_mutexC2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__219__shared_mutex_base11lock_sharedEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__219__shared_mutex_base13unlock_sharedEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__219__shared_mutex_base15try_lock_sharedEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__219__shared_mutex_base4lockEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__219__shared_mutex_base6unlockEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__219__shared_mutex_base8try_lockEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__219__shared_mutex_baseC1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__219__shared_mutex_baseC2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__219__shared_weak_count14__release_weakEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__219__shared_weak_count4lockEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__219__shared_weak_countD0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__219__shared_weak_countD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__219__shared_weak_countD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__219__thread_local_dataEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__219declare_no_pointersEPcm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__219piecewise_constructE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__220__get_collation_nameEPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__220__throw_system_errorEiPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__221__throw_runtime_errorEPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__221__undeclare_reachableEPv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__221recursive_timed_mutex4lockEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__221recursive_timed_mutex6unlockEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__221recursive_timed_mutex8try_lockEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__221recursive_timed_mutexC1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__221recursive_timed_mutexC2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__221recursive_timed_mutexD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__221recursive_timed_mutexD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__221undeclare_no_pointersEPcm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__223__libcpp_debug_functionE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__224__libcpp_debug_exceptionC1ERKNS_19__libcpp_debug_infoE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__224__libcpp_debug_exceptionC1ERKS0_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__224__libcpp_debug_exceptionC1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__224__libcpp_debug_exceptionC2ERKNS_19__libcpp_debug_infoE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__224__libcpp_debug_exceptionC2ERKS0_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__224__libcpp_debug_exceptionC2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__224__libcpp_debug_exceptionD0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__224__libcpp_debug_exceptionD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__224__libcpp_debug_exceptionD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__225notify_all_at_thread_exitERNS_18condition_variableENS_11unique_lockINS_5mutexEEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__227__insertion_sort_incompleteIRNS_6__lessIaaEEPaEEbT0_S5_T_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__227__insertion_sort_incompleteIRNS_6__lessIccEEPcEEbT0_S5_T_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__227__insertion_sort_incompleteIRNS_6__lessIddEEPdEEbT0_S5_T_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__227__insertion_sort_incompleteIRNS_6__lessIeeEEPeEEbT0_S5_T_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__227__insertion_sort_incompleteIRNS_6__lessIffEEPfEEbT0_S5_T_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__227__insertion_sort_incompleteIRNS_6__lessIhhEEPhEEbT0_S5_T_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__227__insertion_sort_incompleteIRNS_6__lessIiiEEPiEEbT0_S5_T_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__227__insertion_sort_incompleteIRNS_6__lessIjjEEPjEEbT0_S5_T_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__227__insertion_sort_incompleteIRNS_6__lessIllEEPlEEbT0_S5_T_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__227__insertion_sort_incompleteIRNS_6__lessImmEEPmEEbT0_S5_T_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__227__insertion_sort_incompleteIRNS_6__lessIssEEPsEEbT0_S5_T_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__227__insertion_sort_incompleteIRNS_6__lessIttEEPtEEbT0_S5_T_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__227__insertion_sort_incompleteIRNS_6__lessIwwEEPwEEbT0_S5_T_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__227__insertion_sort_incompleteIRNS_6__lessIxxEEPxEEbT0_S5_T_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__227__insertion_sort_incompleteIRNS_6__lessIyyEEPyEEbT0_S5_T_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__227__libcpp_set_debug_functionEPFvRKNS_19__libcpp_debug_infoEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__229__libcpp_abort_debug_functionERKNS_19__libcpp_debug_infoE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__229__libcpp_throw_debug_functionERKNS_19__libcpp_debug_infoE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__23cinE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__24cerrE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__24clogE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__24coutE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__24stodERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__24stodERKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEEPm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__24stofERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__24stofERKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEEPm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__24stoiERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPmi', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__24stoiERKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEEPmi', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__24stolERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPmi', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__24stolERKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEEPmi', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__24wcinE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__25alignEmmRPvRm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__25ctypeIcE13classic_tableEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__25ctypeIcE2idE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__25ctypeIcEC1EPKjbm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__25ctypeIcEC2EPKjbm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__25ctypeIcED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__25ctypeIcED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__25ctypeIcED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__25ctypeIwE2idE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__25ctypeIwED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__25ctypeIwED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__25ctypeIwED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__25mutex4lockEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__25mutex6unlockEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__25mutex8try_lockEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__25mutexD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__25mutexD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__25stoldERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__25stoldERKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEEPm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__25stollERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPmi', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__25stollERKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEEPmi', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__25stoulERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPmi', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__25stoulERKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEEPmi', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__25wcerrE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__25wclogE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__25wcoutE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__26__itoa8__u32toaEjPc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__26__itoa8__u64toaEyPc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__26__sortIRNS_6__lessIaaEEPaEEvT0_S5_T_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__26__sortIRNS_6__lessIccEEPcEEvT0_S5_T_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__26__sortIRNS_6__lessIddEEPdEEvT0_S5_T_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__26__sortIRNS_6__lessIeeEEPeEEvT0_S5_T_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__26__sortIRNS_6__lessIffEEPfEEvT0_S5_T_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__26__sortIRNS_6__lessIhhEEPhEEvT0_S5_T_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__26__sortIRNS_6__lessIiiEEPiEEvT0_S5_T_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__26__sortIRNS_6__lessIjjEEPjEEvT0_S5_T_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__26__sortIRNS_6__lessIllEEPlEEvT0_S5_T_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__26__sortIRNS_6__lessImmEEPmEEvT0_S5_T_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__26__sortIRNS_6__lessIssEEPsEEvT0_S5_T_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__26__sortIRNS_6__lessIttEEPtEEvT0_S5_T_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__26__sortIRNS_6__lessIwwEEPwEEvT0_S5_T_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__26__sortIRNS_6__lessIxxEEPxEEvT0_S5_T_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__26__sortIRNS_6__lessIyyEEPyEEvT0_S5_T_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__26chrono12steady_clock3nowEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__26chrono12steady_clock9is_steadyE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__26chrono12system_clock11from_time_tEl', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__26chrono12system_clock3nowEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__26chrono12system_clock9is_steadyE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__26chrono12system_clock9to_time_tERKNS0_10time_pointIS1_NS0_8durationIxNS_5ratioILl1ELl1000000EEEEEEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__26futureIvE3getEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__26futureIvEC1EPNS_17__assoc_sub_stateE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__26futureIvEC2EPNS_17__assoc_sub_stateE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__26futureIvED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__26futureIvED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__26gslice6__initEm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__26locale14__install_ctorERKS0_PNS0_5facetEl', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__26locale2id5__getEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__26locale2id6__initEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__26locale2id9__next_idE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__26locale3allE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__26locale4noneE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__26locale4timeE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__26locale5ctypeE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__26locale5facet16__on_zero_sharedEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__26locale5facetD0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__26locale5facetD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__26locale5facetD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__26locale6globalERKS0_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__26locale7classicEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__26locale7collateE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__26locale7numericE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__26locale8__globalEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__26locale8messagesE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__26locale8monetaryE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__26localeC1EPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__26localeC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__26localeC1ERKS0_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__26localeC1ERKS0_PKci', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__26localeC1ERKS0_RKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEi', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__26localeC1ERKS0_S2_i', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__26localeC1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__26localeC2EPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__26localeC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__26localeC2ERKS0_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__26localeC2ERKS0_PKci', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__26localeC2ERKS0_RKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEi', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__26localeC2ERKS0_S2_i', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__26localeC2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__26localeD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__26localeD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__26localeaSERKS0_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__26stoullERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPmi', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__26stoullERKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEEPmi', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__26thread20hardware_concurrencyEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__26thread4joinEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__26thread6detachEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__26threadD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__26threadD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__27__sort5IRNS_6__lessIeeEEPeEEjT0_S5_S5_S5_S5_T_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__27codecvtIDic11__mbstate_tE2idE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__27codecvtIDic11__mbstate_tED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__27codecvtIDic11__mbstate_tED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__27codecvtIDic11__mbstate_tED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__27codecvtIDsc11__mbstate_tE2idE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__27codecvtIDsc11__mbstate_tED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__27codecvtIDsc11__mbstate_tED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__27codecvtIDsc11__mbstate_tED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__27codecvtIcc11__mbstate_tE2idE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__27codecvtIcc11__mbstate_tED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__27codecvtIcc11__mbstate_tED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__27codecvtIcc11__mbstate_tED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__27codecvtIwc11__mbstate_tE2idE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__27codecvtIwc11__mbstate_tEC1EPKcm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__27codecvtIwc11__mbstate_tEC1Em', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__27codecvtIwc11__mbstate_tEC2EPKcm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__27codecvtIwc11__mbstate_tEC2Em', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__27codecvtIwc11__mbstate_tED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__27codecvtIwc11__mbstate_tED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__27codecvtIwc11__mbstate_tED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__27collateIcE2idE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__27collateIcED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__27collateIcED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__27collateIcED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__27collateIwE2idE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__27collateIwED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__27collateIwED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__27collateIwED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__27num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE2idE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__27num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE2idE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__27num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE2idE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__27num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE2idE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__27promiseIvE10get_futureEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__27promiseIvE13set_exceptionESt13exception_ptr', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__27promiseIvE24set_value_at_thread_exitEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__27promiseIvE28set_exception_at_thread_exitESt13exception_ptr', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__27promiseIvE9set_valueEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__27promiseIvEC1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__27promiseIvEC2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__27promiseIvED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__27promiseIvED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__28__c_node5__addEPNS_8__i_nodeE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__28__c_nodeD0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__28__c_nodeD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__28__c_nodeD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__28__get_dbEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__28__i_nodeD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__28__i_nodeD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__28__rs_getEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__28__sp_mut4lockEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__28__sp_mut6unlockEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__28ios_base10floatfieldE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__28ios_base10scientificE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__28ios_base11adjustfieldE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__28ios_base15sync_with_stdioEb', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__28ios_base16__call_callbacksENS0_5eventE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__28ios_base17register_callbackEPFvNS0_5eventERS0_iEi', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__28ios_base2inE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__28ios_base33__set_badbit_and_consider_rethrowEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__28ios_base34__set_failbit_and_consider_rethrowEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__28ios_base3appE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__28ios_base3ateE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__28ios_base3decE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__28ios_base3hexE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__28ios_base3octE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__28ios_base3outE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__28ios_base4InitC1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__28ios_base4InitC2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__28ios_base4InitD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__28ios_base4InitD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__28ios_base4initEPv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__28ios_base4leftE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__28ios_base4moveERS0_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__28ios_base4swapERS0_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__28ios_base5clearEj', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__28ios_base5fixedE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__28ios_base5imbueERKNS_6localeE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__28ios_base5iwordEi', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__28ios_base5pwordEi', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__28ios_base5rightE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__28ios_base5truncE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__28ios_base6badbitE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__28ios_base6binaryE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__28ios_base6eofbitE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__28ios_base6skipwsE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__28ios_base6xallocEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__28ios_base7copyfmtERKS0_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__28ios_base7failbitE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__28ios_base7failureC1EPKcRKNS_10error_codeE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__28ios_base7failureC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERKNS_10error_codeE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__28ios_base7failureC2EPKcRKNS_10error_codeE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__28ios_base7failureC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERKNS_10error_codeE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__28ios_base7failureD0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__28ios_base7failureD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__28ios_base7failureD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__28ios_base7goodbitE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__28ios_base7showposE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__28ios_base7unitbufE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__28ios_base8internalE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__28ios_base8showbaseE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__28ios_base9__xindex_E', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__28ios_base9basefieldE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__28ios_base9boolalphaE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__28ios_base9showpointE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__28ios_base9uppercaseE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__28ios_baseD0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__28ios_baseD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__28ios_baseD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__28messagesIcE2idE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__28messagesIwE2idE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__28numpunctIcE2idE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__28numpunctIcEC1Em', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__28numpunctIcEC2Em', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__28numpunctIcED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__28numpunctIcED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__28numpunctIcED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__28numpunctIwE2idE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__28numpunctIwEC1Em', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__28numpunctIwEC2Em', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__28numpunctIwED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__28numpunctIwED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__28numpunctIwED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__28time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE2idE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__28time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE2idE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__28time_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE2idE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__28time_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE2idE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__28valarrayImE6resizeEmm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__28valarrayImEC1Em', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__28valarrayImEC2Em', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__28valarrayImED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__28valarrayImED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__29__num_getIcE17__stage2_int_loopEciPcRS2_RjcRKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPjRSD_PKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__29__num_getIcE17__stage2_int_prepERNS_8ios_baseERc', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__29__num_getIcE19__stage2_float_loopEcRbRcPcRS4_ccRKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPjRSE_RjS4_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__29__num_getIcE19__stage2_float_prepERNS_8ios_baseEPcRcS5_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__29__num_getIwE17__stage2_int_loopEwiPcRS2_RjwRKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPjRSD_PKw', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__29__num_getIwE17__stage2_int_prepERNS_8ios_baseERw', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__29__num_getIwE19__stage2_float_loopEwRbRcPcRS4_wwRKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPjRSE_RjPw', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__29__num_getIwE19__stage2_float_prepERNS_8ios_baseEPwRwS5_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__29__num_putIcE21__widen_and_group_intEPcS2_S2_S2_RS2_S3_RKNS_6localeE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__29__num_putIcE23__widen_and_group_floatEPcS2_S2_S2_RS2_S3_RKNS_6localeE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__29__num_putIwE21__widen_and_group_intEPcS2_S2_PwRS3_S4_RKNS_6localeE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__29__num_putIwE23__widen_and_group_floatEPcS2_S2_PwRS3_S4_RKNS_6localeE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__29basic_iosIcNS_11char_traitsIcEEE7copyfmtERKS3_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__29basic_iosIcNS_11char_traitsIcEEED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__29basic_iosIcNS_11char_traitsIcEEED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__29basic_iosIcNS_11char_traitsIcEEED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__29basic_iosIwNS_11char_traitsIwEEE7copyfmtERKS3_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__29basic_iosIwNS_11char_traitsIwEEED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__29basic_iosIwNS_11char_traitsIwEEED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__29basic_iosIwNS_11char_traitsIwEEED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__29money_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE2idE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__29money_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE8__do_getERS4_S4_bRKNS_6localeEjRjRbRKNS_5ctypeIcEERNS_10unique_ptrIcPFvPvEEERPcSM_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__29money_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE2idE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__29money_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE8__do_getERS4_S4_bRKNS_6localeEjRjRbRKNS_5ctypeIwEERNS_10unique_ptrIwPFvPvEEERPwSM_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__29money_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE2idE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__29money_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE2idE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZNSt3__29strstreamD0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__29strstreamD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__29strstreamD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__29to_stringEd', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__29to_stringEe', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__29to_stringEf', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__29to_stringEi', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__29to_stringEj', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__29to_stringEl', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__29to_stringEm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__29to_stringEx', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__29to_stringEy', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__2plIcNS_11char_traitsIcEENS_9allocatorIcEEEENS_12basic_stringIT_T0_T1_EEPKS6_RKS9_', 'type': 'FUNC'} +{'is_defined': False, 'name': '__ZNSt8bad_castC1Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt8bad_castC1Ev', 'type': 'I'} +{'is_defined': False, 'name': '__ZNSt8bad_castC2Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt8bad_castC2Ev', 'type': 'I'} +{'is_defined': False, 'name': '__ZNSt8bad_castD0Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt8bad_castD0Ev', 'type': 'I'} +{'is_defined': False, 'name': '__ZNSt8bad_castD1Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt8bad_castD1Ev', 'type': 'I'} +{'is_defined': False, 'name': '__ZNSt8bad_castD2Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt8bad_castD2Ev', 'type': 'I'} +{'is_defined': False, 'name': '__ZNSt9bad_allocC1Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt9bad_allocC1Ev', 'type': 'I'} +{'is_defined': False, 'name': '__ZNSt9bad_allocC2Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt9bad_allocC2Ev', 'type': 'I'} +{'is_defined': False, 'name': '__ZNSt9bad_allocD0Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt9bad_allocD0Ev', 'type': 'I'} +{'is_defined': False, 'name': '__ZNSt9bad_allocD1Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt9bad_allocD1Ev', 'type': 'I'} +{'is_defined': False, 'name': '__ZNSt9bad_allocD2Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt9bad_allocD2Ev', 'type': 'I'} +{'is_defined': False, 'name': '__ZNSt9exceptionD0Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt9exceptionD0Ev', 'type': 'I'} +{'is_defined': False, 'name': '__ZNSt9exceptionD1Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt9exceptionD1Ev', 'type': 'I'} +{'is_defined': False, 'name': '__ZNSt9exceptionD2Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt9exceptionD2Ev', 'type': 'I'} +{'is_defined': False, 'name': '__ZNSt9type_infoD0Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt9type_infoD0Ev', 'type': 'I'} +{'is_defined': False, 'name': '__ZNSt9type_infoD1Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt9type_infoD1Ev', 'type': 'I'} +{'is_defined': False, 'name': '__ZNSt9type_infoD2Ev', 'type': 'U'} +{'is_defined': True, 'name': '__ZNSt9type_infoD2Ev', 'type': 'I'} +{'is_defined': False, 'name': '__ZSt10unexpectedv', 'type': 'U'} +{'is_defined': True, 'name': '__ZSt10unexpectedv', 'type': 'I'} +{'is_defined': False, 'name': '__ZSt13get_terminatev', 'type': 'U'} +{'is_defined': True, 'name': '__ZSt13get_terminatev', 'type': 'I'} +{'is_defined': False, 'name': '__ZSt13set_terminatePFvvE', 'type': 'U'} +{'is_defined': True, 'name': '__ZSt13set_terminatePFvvE', 'type': 'I'} +{'is_defined': False, 'name': '__ZSt14get_unexpectedv', 'type': 'U'} +{'is_defined': True, 'name': '__ZSt14get_unexpectedv', 'type': 'I'} +{'is_defined': False, 'name': '__ZSt14set_unexpectedPFvvE', 'type': 'U'} +{'is_defined': True, 'name': '__ZSt14set_unexpectedPFvvE', 'type': 'I'} +{'is_defined': False, 'name': '__ZSt15get_new_handlerv', 'type': 'U'} +{'is_defined': True, 'name': '__ZSt15get_new_handlerv', 'type': 'I'} +{'is_defined': False, 'name': '__ZSt15set_new_handlerPFvvE', 'type': 'U'} +{'is_defined': True, 'name': '__ZSt15set_new_handlerPFvvE', 'type': 'I'} +{'is_defined': True, 'name': '__ZSt17__throw_bad_allocv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZSt17current_exceptionv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZSt17rethrow_exceptionSt13exception_ptr', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZSt18uncaught_exceptionv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZSt19uncaught_exceptionsv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZSt7nothrow', 'size': 0, 'type': 'OBJECT'} +{'is_defined': False, 'name': '__ZSt9terminatev', 'type': 'U'} +{'is_defined': True, 'name': '__ZSt9terminatev', 'type': 'I'} +{'is_defined': True, 'name': '__ZTCNSt3__210istrstreamE0_NS_13basic_istreamIcNS_11char_traitsIcEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTCNSt3__210ostrstreamE0_NS_13basic_ostreamIcNS_11char_traitsIcEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTCNSt3__214basic_iostreamIcNS_11char_traitsIcEEEE0_NS_13basic_istreamIcS2_EE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTCNSt3__214basic_iostreamIcNS_11char_traitsIcEEEE16_NS_13basic_ostreamIcS2_EE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTCNSt3__29strstreamE0_NS_13basic_istreamIcNS_11char_traitsIcEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTCNSt3__29strstreamE0_NS_14basic_iostreamIcNS_11char_traitsIcEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTCNSt3__29strstreamE16_NS_13basic_ostreamIcNS_11char_traitsIcEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': False, 'name': '__ZTIDi', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIDi', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIDn', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIDn', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIDs', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIDs', 'type': 'I'} +{'is_defined': True, 'name': '__ZTINSt12experimental15fundamentals_v112bad_any_castE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt12experimental19bad_optional_accessE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__210__time_getE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__210__time_putE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__210ctype_baseE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__210istrstreamE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__210money_baseE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__210moneypunctIcLb0EEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__210moneypunctIcLb1EEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__210moneypunctIwLb0EEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__210moneypunctIwLb1EEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__210ostrstreamE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__211__money_getIcEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__211__money_getIwEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__211__money_putIcEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__211__money_putIwEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__211regex_errorE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__212bad_weak_ptrE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__212codecvt_baseE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__212ctype_bynameIcEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__212ctype_bynameIwEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__212future_errorE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__212strstreambufE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__212system_errorE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__213basic_istreamIcNS_11char_traitsIcEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__213basic_istreamIwNS_11char_traitsIwEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__213basic_ostreamIcNS_11char_traitsIcEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__213basic_ostreamIwNS_11char_traitsIwEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__213messages_baseE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__214__codecvt_utf8IDiEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__214__codecvt_utf8IDsEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__214__codecvt_utf8IwEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__214__num_get_baseE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__214__num_put_baseE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__214__shared_countE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__214basic_iostreamIcNS_11char_traitsIcEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__214codecvt_bynameIDic11__mbstate_tEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__214codecvt_bynameIDsc11__mbstate_tEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__214codecvt_bynameIcc11__mbstate_tEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__214codecvt_bynameIwc11__mbstate_tEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__214collate_bynameIcEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__214collate_bynameIwEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__214error_categoryE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__215__codecvt_utf16IDiLb0EEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__215__codecvt_utf16IDiLb1EEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__215__codecvt_utf16IDsLb0EEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__215__codecvt_utf16IDsLb1EEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__215__codecvt_utf16IwLb0EEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__215__codecvt_utf16IwLb1EEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__215basic_streambufIcNS_11char_traitsIcEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__215basic_streambufIwNS_11char_traitsIwEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__215messages_bynameIcEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__215messages_bynameIwEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__215numpunct_bynameIcEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__215numpunct_bynameIwEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__215time_get_bynameIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__215time_get_bynameIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__215time_put_bynameIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__215time_put_bynameIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__216__narrow_to_utf8ILm16EEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__216__narrow_to_utf8ILm32EEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__217__assoc_sub_stateE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__217__widen_from_utf8ILm16EEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__217__widen_from_utf8ILm32EEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__217bad_function_callE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__217moneypunct_bynameIcLb0EEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__217moneypunct_bynameIcLb1EEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__217moneypunct_bynameIwLb0EEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__217moneypunct_bynameIwLb1EEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__218__time_get_storageIcEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__218__time_get_storageIwEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__219__shared_weak_countE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__220__codecvt_utf8_utf16IDiEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__220__codecvt_utf8_utf16IDsEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__220__codecvt_utf8_utf16IwEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__220__time_get_c_storageIcEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__220__time_get_c_storageIwEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__224__libcpp_debug_exceptionE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__25ctypeIcEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__25ctypeIwEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__26locale5facetE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__27codecvtIDic11__mbstate_tEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__27codecvtIDsc11__mbstate_tEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__27codecvtIcc11__mbstate_tEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__27codecvtIwc11__mbstate_tEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__27collateIcEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__27collateIwEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__27num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__27num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__27num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__27num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__28__c_nodeE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__28ios_base7failureE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__28ios_baseE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__28messagesIcEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__28messagesIwEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__28numpunctIcEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__28numpunctIwEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__28time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__28time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__28time_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__28time_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__29__num_getIcEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__29__num_getIwEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__29__num_putIcEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__29__num_putIwEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__29basic_iosIcNS_11char_traitsIcEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__29basic_iosIwNS_11char_traitsIwEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__29money_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__29money_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__29money_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__29money_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__29strstreamE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTINSt3__29time_baseE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': False, 'name': '__ZTIPDi', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIPDi', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIPDn', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIPDn', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIPDs', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIPDs', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIPKDi', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIPKDi', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIPKDn', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIPKDn', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIPKDs', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIPKDs', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIPKa', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIPKa', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIPKb', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIPKb', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIPKc', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIPKc', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIPKd', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIPKd', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIPKe', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIPKe', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIPKf', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIPKf', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIPKh', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIPKh', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIPKi', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIPKi', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIPKj', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIPKj', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIPKl', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIPKl', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIPKm', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIPKm', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIPKs', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIPKs', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIPKt', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIPKt', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIPKv', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIPKv', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIPKw', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIPKw', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIPKx', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIPKx', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIPKy', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIPKy', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIPa', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIPa', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIPb', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIPb', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIPc', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIPc', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIPd', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIPd', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIPe', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIPe', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIPf', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIPf', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIPh', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIPh', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIPi', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIPi', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIPj', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIPj', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIPl', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIPl', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIPm', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIPm', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIPs', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIPs', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIPt', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIPt', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIPv', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIPv', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIPw', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIPw', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIPx', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIPx', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIPy', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIPy', 'type': 'I'} +{'is_defined': False, 'name': '__ZTISt10bad_typeid', 'type': 'U'} +{'is_defined': True, 'name': '__ZTISt10bad_typeid', 'type': 'I'} +{'is_defined': False, 'name': '__ZTISt11logic_error', 'type': 'U'} +{'is_defined': True, 'name': '__ZTISt11logic_error', 'type': 'I'} +{'is_defined': False, 'name': '__ZTISt11range_error', 'type': 'U'} +{'is_defined': True, 'name': '__ZTISt11range_error', 'type': 'I'} +{'is_defined': True, 'name': '__ZTISt12bad_any_cast', 'size': 0, 'type': 'OBJECT'} +{'is_defined': False, 'name': '__ZTISt12domain_error', 'type': 'U'} +{'is_defined': True, 'name': '__ZTISt12domain_error', 'type': 'I'} +{'is_defined': False, 'name': '__ZTISt12length_error', 'type': 'U'} +{'is_defined': True, 'name': '__ZTISt12length_error', 'type': 'I'} +{'is_defined': False, 'name': '__ZTISt12out_of_range', 'type': 'U'} +{'is_defined': True, 'name': '__ZTISt12out_of_range', 'type': 'I'} +{'is_defined': False, 'name': '__ZTISt13bad_exception', 'type': 'U'} +{'is_defined': True, 'name': '__ZTISt13bad_exception', 'type': 'I'} +{'is_defined': False, 'name': '__ZTISt13runtime_error', 'type': 'U'} +{'is_defined': True, 'name': '__ZTISt13runtime_error', 'type': 'I'} +{'is_defined': False, 'name': '__ZTISt14overflow_error', 'type': 'U'} +{'is_defined': True, 'name': '__ZTISt14overflow_error', 'type': 'I'} +{'is_defined': False, 'name': '__ZTISt15underflow_error', 'type': 'U'} +{'is_defined': True, 'name': '__ZTISt15underflow_error', 'type': 'I'} +{'is_defined': False, 'name': '__ZTISt16invalid_argument', 'type': 'U'} +{'is_defined': True, 'name': '__ZTISt16invalid_argument', 'type': 'I'} +{'is_defined': True, 'name': '__ZTISt16nested_exception', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTISt18bad_variant_access', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTISt19bad_optional_access', 'size': 0, 'type': 'OBJECT'} +{'is_defined': False, 'name': '__ZTISt20bad_array_new_length', 'type': 'U'} +{'is_defined': True, 'name': '__ZTISt20bad_array_new_length', 'type': 'I'} +{'is_defined': False, 'name': '__ZTISt8bad_cast', 'type': 'U'} +{'is_defined': True, 'name': '__ZTISt8bad_cast', 'type': 'I'} +{'is_defined': False, 'name': '__ZTISt9bad_alloc', 'type': 'U'} +{'is_defined': True, 'name': '__ZTISt9bad_alloc', 'type': 'I'} +{'is_defined': False, 'name': '__ZTISt9exception', 'type': 'U'} +{'is_defined': True, 'name': '__ZTISt9exception', 'type': 'I'} +{'is_defined': False, 'name': '__ZTISt9type_info', 'type': 'U'} +{'is_defined': True, 'name': '__ZTISt9type_info', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIa', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIa', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIb', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIb', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIc', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIc', 'type': 'I'} +{'is_defined': False, 'name': '__ZTId', 'type': 'U'} +{'is_defined': True, 'name': '__ZTId', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIe', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIe', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIf', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIf', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIh', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIh', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIi', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIi', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIj', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIj', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIl', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIl', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIm', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIm', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIs', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIs', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIt', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIt', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIv', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIv', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIw', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIw', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIx', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIx', 'type': 'I'} +{'is_defined': False, 'name': '__ZTIy', 'type': 'U'} +{'is_defined': True, 'name': '__ZTIy', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSDi', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSDi', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSDn', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSDn', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSDs', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSDs', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSN10__cxxabiv116__enum_type_infoE', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSN10__cxxabiv116__enum_type_infoE', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSN10__cxxabiv117__array_type_infoE', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSN10__cxxabiv117__array_type_infoE', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSN10__cxxabiv117__class_type_infoE', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSN10__cxxabiv117__class_type_infoE', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSN10__cxxabiv117__pbase_type_infoE', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSN10__cxxabiv117__pbase_type_infoE', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSN10__cxxabiv119__pointer_type_infoE', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSN10__cxxabiv119__pointer_type_infoE', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSN10__cxxabiv120__function_type_infoE', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSN10__cxxabiv120__function_type_infoE', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSN10__cxxabiv120__si_class_type_infoE', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSN10__cxxabiv120__si_class_type_infoE', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSN10__cxxabiv121__vmi_class_type_infoE', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSN10__cxxabiv121__vmi_class_type_infoE', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSN10__cxxabiv123__fundamental_type_infoE', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSN10__cxxabiv123__fundamental_type_infoE', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSN10__cxxabiv129__pointer_to_member_type_infoE', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSN10__cxxabiv129__pointer_to_member_type_infoE', 'type': 'I'} +{'is_defined': True, 'name': '__ZTSNSt12experimental15fundamentals_v112bad_any_castE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt12experimental19bad_optional_accessE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__210__time_getE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__210__time_putE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__210ctype_baseE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__210istrstreamE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__210money_baseE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__210moneypunctIcLb0EEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__210moneypunctIcLb1EEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__210moneypunctIwLb0EEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__210moneypunctIwLb1EEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__210ostrstreamE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__211__money_getIcEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__211__money_getIwEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__211__money_putIcEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__211__money_putIwEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__211regex_errorE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__212bad_weak_ptrE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__212codecvt_baseE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__212ctype_bynameIcEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__212ctype_bynameIwEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__212future_errorE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__212strstreambufE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__212system_errorE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__213basic_istreamIcNS_11char_traitsIcEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__213basic_istreamIwNS_11char_traitsIwEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__213basic_ostreamIcNS_11char_traitsIcEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__213basic_ostreamIwNS_11char_traitsIwEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__213messages_baseE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__214__codecvt_utf8IDiEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__214__codecvt_utf8IDsEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__214__codecvt_utf8IwEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__214__num_get_baseE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__214__num_put_baseE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__214__shared_countE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__214basic_iostreamIcNS_11char_traitsIcEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__214codecvt_bynameIDic11__mbstate_tEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__214codecvt_bynameIDsc11__mbstate_tEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__214codecvt_bynameIcc11__mbstate_tEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__214codecvt_bynameIwc11__mbstate_tEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__214collate_bynameIcEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__214collate_bynameIwEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__214error_categoryE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__215__codecvt_utf16IDiLb0EEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__215__codecvt_utf16IDiLb1EEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__215__codecvt_utf16IDsLb0EEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__215__codecvt_utf16IDsLb1EEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__215__codecvt_utf16IwLb0EEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__215__codecvt_utf16IwLb1EEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__215basic_streambufIcNS_11char_traitsIcEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__215basic_streambufIwNS_11char_traitsIwEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__215messages_bynameIcEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__215messages_bynameIwEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__215numpunct_bynameIcEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__215numpunct_bynameIwEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__215time_get_bynameIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__215time_get_bynameIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__215time_put_bynameIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__215time_put_bynameIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__216__narrow_to_utf8ILm16EEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__216__narrow_to_utf8ILm32EEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__217__assoc_sub_stateE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__217__widen_from_utf8ILm16EEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__217__widen_from_utf8ILm32EEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__217bad_function_callE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__217moneypunct_bynameIcLb0EEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__217moneypunct_bynameIcLb1EEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__217moneypunct_bynameIwLb0EEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__217moneypunct_bynameIwLb1EEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__218__time_get_storageIcEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__218__time_get_storageIwEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__219__shared_weak_countE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__220__codecvt_utf8_utf16IDiEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__220__codecvt_utf8_utf16IDsEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__220__codecvt_utf8_utf16IwEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__220__time_get_c_storageIcEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__220__time_get_c_storageIwEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__224__libcpp_debug_exceptionE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__25ctypeIcEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__25ctypeIwEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__26locale5facetE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__27codecvtIDic11__mbstate_tEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__27codecvtIDsc11__mbstate_tEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__27codecvtIcc11__mbstate_tEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__27codecvtIwc11__mbstate_tEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__27collateIcEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__27collateIwEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__27num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__27num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__27num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__27num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__28__c_nodeE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__28ios_base7failureE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__28ios_baseE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__28messagesIcEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__28messagesIwEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__28numpunctIcEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__28numpunctIwEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__28time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__28time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__28time_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__28time_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__29__num_getIcEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__29__num_getIwEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__29__num_putIcEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__29__num_putIwEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__29basic_iosIcNS_11char_traitsIcEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__29basic_iosIwNS_11char_traitsIwEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__29money_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__29money_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__29money_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__29money_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__29strstreamE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSNSt3__29time_baseE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': False, 'name': '__ZTSPDi', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSPDi', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSPDn', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSPDn', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSPDs', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSPDs', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSPKDi', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSPKDi', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSPKDn', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSPKDn', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSPKDs', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSPKDs', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSPKa', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSPKa', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSPKb', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSPKb', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSPKc', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSPKc', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSPKd', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSPKd', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSPKe', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSPKe', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSPKf', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSPKf', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSPKh', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSPKh', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSPKi', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSPKi', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSPKj', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSPKj', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSPKl', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSPKl', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSPKm', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSPKm', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSPKs', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSPKs', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSPKt', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSPKt', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSPKv', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSPKv', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSPKw', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSPKw', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSPKx', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSPKx', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSPKy', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSPKy', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSPa', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSPa', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSPb', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSPb', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSPc', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSPc', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSPd', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSPd', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSPe', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSPe', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSPf', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSPf', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSPh', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSPh', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSPi', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSPi', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSPj', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSPj', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSPl', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSPl', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSPm', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSPm', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSPs', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSPs', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSPt', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSPt', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSPv', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSPv', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSPw', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSPw', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSPx', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSPx', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSPy', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSPy', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSSt10bad_typeid', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSSt10bad_typeid', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSSt11logic_error', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSSt11logic_error', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSSt11range_error', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSSt11range_error', 'type': 'I'} +{'is_defined': True, 'name': '__ZTSSt12bad_any_cast', 'size': 0, 'type': 'OBJECT'} +{'is_defined': False, 'name': '__ZTSSt12domain_error', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSSt12domain_error', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSSt12length_error', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSSt12length_error', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSSt12out_of_range', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSSt12out_of_range', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSSt13bad_exception', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSSt13bad_exception', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSSt13runtime_error', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSSt13runtime_error', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSSt14overflow_error', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSSt14overflow_error', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSSt15underflow_error', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSSt15underflow_error', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSSt16invalid_argument', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSSt16invalid_argument', 'type': 'I'} +{'is_defined': True, 'name': '__ZTSSt16nested_exception', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSSt18bad_variant_access', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTSSt19bad_optional_access', 'size': 0, 'type': 'OBJECT'} +{'is_defined': False, 'name': '__ZTSSt20bad_array_new_length', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSSt20bad_array_new_length', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSSt8bad_cast', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSSt8bad_cast', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSSt9bad_alloc', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSSt9bad_alloc', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSSt9exception', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSSt9exception', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSSt9type_info', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSSt9type_info', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSa', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSa', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSb', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSb', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSc', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSc', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSd', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSd', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSe', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSe', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSf', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSf', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSh', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSh', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSi', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSi', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSj', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSj', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSl', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSl', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSm', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSm', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSs', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSs', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSt', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSt', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSv', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSv', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSw', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSw', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSx', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSx', 'type': 'I'} +{'is_defined': False, 'name': '__ZTSy', 'type': 'U'} +{'is_defined': True, 'name': '__ZTSy', 'type': 'I'} +{'is_defined': True, 'name': '__ZTTNSt3__210istrstreamE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTTNSt3__210ostrstreamE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTTNSt3__213basic_istreamIcNS_11char_traitsIcEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTTNSt3__213basic_istreamIwNS_11char_traitsIwEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTTNSt3__213basic_ostreamIcNS_11char_traitsIcEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTTNSt3__213basic_ostreamIwNS_11char_traitsIwEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTTNSt3__214basic_iostreamIcNS_11char_traitsIcEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTTNSt3__29strstreamE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': False, 'name': '__ZTVN10__cxxabiv116__enum_type_infoE', 'type': 'U'} +{'is_defined': True, 'name': '__ZTVN10__cxxabiv116__enum_type_infoE', 'type': 'I'} +{'is_defined': False, 'name': '__ZTVN10__cxxabiv117__array_type_infoE', 'type': 'U'} +{'is_defined': True, 'name': '__ZTVN10__cxxabiv117__array_type_infoE', 'type': 'I'} +{'is_defined': False, 'name': '__ZTVN10__cxxabiv117__class_type_infoE', 'type': 'U'} +{'is_defined': True, 'name': '__ZTVN10__cxxabiv117__class_type_infoE', 'type': 'I'} +{'is_defined': False, 'name': '__ZTVN10__cxxabiv117__pbase_type_infoE', 'type': 'U'} +{'is_defined': True, 'name': '__ZTVN10__cxxabiv117__pbase_type_infoE', 'type': 'I'} +{'is_defined': False, 'name': '__ZTVN10__cxxabiv119__pointer_type_infoE', 'type': 'U'} +{'is_defined': True, 'name': '__ZTVN10__cxxabiv119__pointer_type_infoE', 'type': 'I'} +{'is_defined': False, 'name': '__ZTVN10__cxxabiv120__function_type_infoE', 'type': 'U'} +{'is_defined': True, 'name': '__ZTVN10__cxxabiv120__function_type_infoE', 'type': 'I'} +{'is_defined': False, 'name': '__ZTVN10__cxxabiv120__si_class_type_infoE', 'type': 'U'} +{'is_defined': True, 'name': '__ZTVN10__cxxabiv120__si_class_type_infoE', 'type': 'I'} +{'is_defined': False, 'name': '__ZTVN10__cxxabiv121__vmi_class_type_infoE', 'type': 'U'} +{'is_defined': True, 'name': '__ZTVN10__cxxabiv121__vmi_class_type_infoE', 'type': 'I'} +{'is_defined': False, 'name': '__ZTVN10__cxxabiv123__fundamental_type_infoE', 'type': 'U'} +{'is_defined': True, 'name': '__ZTVN10__cxxabiv123__fundamental_type_infoE', 'type': 'I'} +{'is_defined': False, 'name': '__ZTVN10__cxxabiv129__pointer_to_member_type_infoE', 'type': 'U'} +{'is_defined': True, 'name': '__ZTVN10__cxxabiv129__pointer_to_member_type_infoE', 'type': 'I'} +{'is_defined': True, 'name': '__ZTVNSt12experimental15fundamentals_v112bad_any_castE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt12experimental19bad_optional_accessE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__210istrstreamE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__210moneypunctIcLb0EEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__210moneypunctIcLb1EEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__210moneypunctIwLb0EEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__210moneypunctIwLb1EEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__210ostrstreamE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__211regex_errorE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__212bad_weak_ptrE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__212ctype_bynameIcEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__212ctype_bynameIwEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__212future_errorE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__212strstreambufE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__212system_errorE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__213basic_istreamIcNS_11char_traitsIcEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__213basic_istreamIwNS_11char_traitsIwEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__213basic_ostreamIcNS_11char_traitsIcEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__213basic_ostreamIwNS_11char_traitsIwEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__214__codecvt_utf8IDiEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__214__codecvt_utf8IDsEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__214__codecvt_utf8IwEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__214__shared_countE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__214basic_iostreamIcNS_11char_traitsIcEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__214codecvt_bynameIDic11__mbstate_tEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__214codecvt_bynameIDsc11__mbstate_tEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__214codecvt_bynameIcc11__mbstate_tEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__214codecvt_bynameIwc11__mbstate_tEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__214collate_bynameIcEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__214collate_bynameIwEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__214error_categoryE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__215__codecvt_utf16IDiLb0EEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__215__codecvt_utf16IDiLb1EEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__215__codecvt_utf16IDsLb0EEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__215__codecvt_utf16IDsLb1EEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__215__codecvt_utf16IwLb0EEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__215__codecvt_utf16IwLb1EEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__215basic_streambufIcNS_11char_traitsIcEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__215basic_streambufIwNS_11char_traitsIwEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__215messages_bynameIcEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__215messages_bynameIwEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__215numpunct_bynameIcEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__215numpunct_bynameIwEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__215time_get_bynameIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__215time_get_bynameIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__215time_put_bynameIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__215time_put_bynameIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__216__narrow_to_utf8ILm16EEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__216__narrow_to_utf8ILm32EEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__217__assoc_sub_stateE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__217__widen_from_utf8ILm16EEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__217__widen_from_utf8ILm32EEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__217bad_function_callE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__217moneypunct_bynameIcLb0EEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__217moneypunct_bynameIcLb1EEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__217moneypunct_bynameIwLb0EEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__217moneypunct_bynameIwLb1EEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__219__shared_weak_countE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__220__codecvt_utf8_utf16IDiEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__220__codecvt_utf8_utf16IDsEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__220__codecvt_utf8_utf16IwEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__224__libcpp_debug_exceptionE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__25ctypeIcEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__25ctypeIwEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__26locale5facetE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__27codecvtIDic11__mbstate_tEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__27codecvtIDsc11__mbstate_tEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__27codecvtIcc11__mbstate_tEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__27codecvtIwc11__mbstate_tEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__27collateIcEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__27collateIwEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__27num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__27num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__27num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__27num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__28__c_nodeE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__28ios_base7failureE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__28ios_baseE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__28messagesIcEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__28messagesIwEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__28numpunctIcEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__28numpunctIwEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__28time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__28time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__28time_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__28time_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__29basic_iosIcNS_11char_traitsIcEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__29basic_iosIwNS_11char_traitsIwEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__29money_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__29money_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__29money_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__29money_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVNSt3__29strstreamE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': False, 'name': '__ZTVSt10bad_typeid', 'type': 'U'} +{'is_defined': True, 'name': '__ZTVSt10bad_typeid', 'type': 'I'} +{'is_defined': False, 'name': '__ZTVSt11logic_error', 'type': 'U'} +{'is_defined': True, 'name': '__ZTVSt11logic_error', 'type': 'I'} +{'is_defined': False, 'name': '__ZTVSt11range_error', 'type': 'U'} +{'is_defined': True, 'name': '__ZTVSt11range_error', 'type': 'I'} +{'is_defined': True, 'name': '__ZTVSt12bad_any_cast', 'size': 0, 'type': 'OBJECT'} +{'is_defined': False, 'name': '__ZTVSt12domain_error', 'type': 'U'} +{'is_defined': True, 'name': '__ZTVSt12domain_error', 'type': 'I'} +{'is_defined': False, 'name': '__ZTVSt12length_error', 'type': 'U'} +{'is_defined': True, 'name': '__ZTVSt12length_error', 'type': 'I'} +{'is_defined': False, 'name': '__ZTVSt12out_of_range', 'type': 'U'} +{'is_defined': True, 'name': '__ZTVSt12out_of_range', 'type': 'I'} +{'is_defined': False, 'name': '__ZTVSt13bad_exception', 'type': 'U'} +{'is_defined': True, 'name': '__ZTVSt13bad_exception', 'type': 'I'} +{'is_defined': False, 'name': '__ZTVSt13runtime_error', 'type': 'U'} +{'is_defined': True, 'name': '__ZTVSt13runtime_error', 'type': 'I'} +{'is_defined': False, 'name': '__ZTVSt14overflow_error', 'type': 'U'} +{'is_defined': True, 'name': '__ZTVSt14overflow_error', 'type': 'I'} +{'is_defined': False, 'name': '__ZTVSt15underflow_error', 'type': 'U'} +{'is_defined': True, 'name': '__ZTVSt15underflow_error', 'type': 'I'} +{'is_defined': False, 'name': '__ZTVSt16invalid_argument', 'type': 'U'} +{'is_defined': True, 'name': '__ZTVSt16invalid_argument', 'type': 'I'} +{'is_defined': True, 'name': '__ZTVSt16nested_exception', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVSt18bad_variant_access', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '__ZTVSt19bad_optional_access', 'size': 0, 'type': 'OBJECT'} +{'is_defined': False, 'name': '__ZTVSt20bad_array_new_length', 'type': 'U'} +{'is_defined': True, 'name': '__ZTVSt20bad_array_new_length', 'type': 'I'} +{'is_defined': False, 'name': '__ZTVSt8bad_cast', 'type': 'U'} +{'is_defined': True, 'name': '__ZTVSt8bad_cast', 'type': 'I'} +{'is_defined': False, 'name': '__ZTVSt9bad_alloc', 'type': 'U'} +{'is_defined': True, 'name': '__ZTVSt9bad_alloc', 'type': 'I'} +{'is_defined': False, 'name': '__ZTVSt9exception', 'type': 'U'} +{'is_defined': True, 'name': '__ZTVSt9exception', 'type': 'I'} +{'is_defined': False, 'name': '__ZTVSt9type_info', 'type': 'U'} +{'is_defined': True, 'name': '__ZTVSt9type_info', 'type': 'I'} +{'is_defined': True, 'name': '__ZThn16_NSt3__214basic_iostreamIcNS_11char_traitsIcEEED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZThn16_NSt3__214basic_iostreamIcNS_11char_traitsIcEEED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZThn16_NSt3__29strstreamD0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZThn16_NSt3__29strstreamD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZTv0_n24_NSt3__210istrstreamD0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZTv0_n24_NSt3__210istrstreamD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZTv0_n24_NSt3__210ostrstreamD0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZTv0_n24_NSt3__210ostrstreamD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZTv0_n24_NSt3__213basic_istreamIcNS_11char_traitsIcEEED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZTv0_n24_NSt3__213basic_istreamIcNS_11char_traitsIcEEED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZTv0_n24_NSt3__213basic_istreamIwNS_11char_traitsIwEEED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZTv0_n24_NSt3__213basic_istreamIwNS_11char_traitsIwEEED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZTv0_n24_NSt3__213basic_ostreamIcNS_11char_traitsIcEEED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZTv0_n24_NSt3__213basic_ostreamIcNS_11char_traitsIcEEED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZTv0_n24_NSt3__213basic_ostreamIwNS_11char_traitsIwEEED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZTv0_n24_NSt3__213basic_ostreamIwNS_11char_traitsIwEEED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZTv0_n24_NSt3__214basic_iostreamIcNS_11char_traitsIcEEED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZTv0_n24_NSt3__214basic_iostreamIcNS_11char_traitsIcEEED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZTv0_n24_NSt3__29strstreamD0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZTv0_n24_NSt3__29strstreamD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZdaPv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZdaPvRKSt9nothrow_t', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZdaPvSt11align_val_t', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZdaPvSt11align_val_tRKSt9nothrow_t', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZdaPvm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZdaPvmSt11align_val_t', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZdlPv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZdlPvRKSt9nothrow_t', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZdlPvSt11align_val_t', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZdlPvSt11align_val_tRKSt9nothrow_t', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZdlPvm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZdlPvmSt11align_val_t', 'type': 'FUNC'} +{'is_defined': True, 'name': '__Znam', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZnamRKSt9nothrow_t', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZnamSt11align_val_t', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZnamSt11align_val_tRKSt9nothrow_t', 'type': 'FUNC'} +{'is_defined': True, 'name': '__Znwm', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZnwmRKSt9nothrow_t', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZnwmSt11align_val_t', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZnwmSt11align_val_tRKSt9nothrow_t', 'type': 'FUNC'} +{'is_defined': False, 'name': '___cxa_allocate_exception', 'type': 'U'} +{'is_defined': True, 'name': '___cxa_allocate_exception', 'type': 'I'} +{'is_defined': False, 'name': '___cxa_atexit', 'type': 'U'} +{'is_defined': False, 'name': '___cxa_bad_cast', 'type': 'U'} +{'is_defined': True, 'name': '___cxa_bad_cast', 'type': 'I'} +{'is_defined': False, 'name': '___cxa_bad_typeid', 'type': 'U'} +{'is_defined': True, 'name': '___cxa_bad_typeid', 'type': 'I'} +{'is_defined': False, 'name': '___cxa_begin_catch', 'type': 'U'} +{'is_defined': True, 'name': '___cxa_begin_catch', 'type': 'I'} +{'is_defined': False, 'name': '___cxa_call_unexpected', 'type': 'U'} +{'is_defined': True, 'name': '___cxa_call_unexpected', 'type': 'I'} +{'is_defined': False, 'name': '___cxa_current_exception_type', 'type': 'U'} +{'is_defined': True, 'name': '___cxa_current_exception_type', 'type': 'I'} +{'is_defined': False, 'name': '___cxa_current_primary_exception', 'type': 'U'} +{'is_defined': False, 'name': '___cxa_decrement_exception_refcount', 'type': 'U'} +{'is_defined': False, 'name': '___cxa_deleted_virtual', 'type': 'U'} +{'is_defined': True, 'name': '___cxa_deleted_virtual', 'type': 'I'} +{'is_defined': False, 'name': '___cxa_demangle', 'type': 'U'} +{'is_defined': True, 'name': '___cxa_demangle', 'type': 'I'} +{'is_defined': False, 'name': '___cxa_end_catch', 'type': 'U'} +{'is_defined': True, 'name': '___cxa_end_catch', 'type': 'I'} +{'is_defined': False, 'name': '___cxa_free_exception', 'type': 'U'} +{'is_defined': True, 'name': '___cxa_free_exception', 'type': 'I'} +{'is_defined': False, 'name': '___cxa_get_exception_ptr', 'type': 'U'} +{'is_defined': True, 'name': '___cxa_get_exception_ptr', 'type': 'I'} +{'is_defined': False, 'name': '___cxa_get_globals', 'type': 'U'} +{'is_defined': True, 'name': '___cxa_get_globals', 'type': 'I'} +{'is_defined': False, 'name': '___cxa_get_globals_fast', 'type': 'U'} +{'is_defined': True, 'name': '___cxa_get_globals_fast', 'type': 'I'} +{'is_defined': False, 'name': '___cxa_guard_abort', 'type': 'U'} +{'is_defined': True, 'name': '___cxa_guard_abort', 'type': 'I'} +{'is_defined': False, 'name': '___cxa_guard_acquire', 'type': 'U'} +{'is_defined': True, 'name': '___cxa_guard_acquire', 'type': 'I'} +{'is_defined': False, 'name': '___cxa_guard_release', 'type': 'U'} +{'is_defined': True, 'name': '___cxa_guard_release', 'type': 'I'} +{'is_defined': False, 'name': '___cxa_increment_exception_refcount', 'type': 'U'} +{'is_defined': False, 'name': '___cxa_pure_virtual', 'type': 'U'} +{'is_defined': True, 'name': '___cxa_pure_virtual', 'type': 'I'} +{'is_defined': False, 'name': '___cxa_rethrow', 'type': 'U'} +{'is_defined': True, 'name': '___cxa_rethrow', 'type': 'I'} +{'is_defined': False, 'name': '___cxa_rethrow_primary_exception', 'type': 'U'} +{'is_defined': False, 'name': '___cxa_throw', 'type': 'U'} +{'is_defined': True, 'name': '___cxa_throw', 'type': 'I'} +{'is_defined': False, 'name': '___cxa_uncaught_exceptions', 'type': 'U'} +{'is_defined': False, 'name': '___cxa_vec_cctor', 'type': 'U'} +{'is_defined': True, 'name': '___cxa_vec_cctor', 'type': 'I'} +{'is_defined': False, 'name': '___cxa_vec_cleanup', 'type': 'U'} +{'is_defined': True, 'name': '___cxa_vec_cleanup', 'type': 'I'} +{'is_defined': False, 'name': '___cxa_vec_ctor', 'type': 'U'} +{'is_defined': True, 'name': '___cxa_vec_ctor', 'type': 'I'} +{'is_defined': False, 'name': '___cxa_vec_delete', 'type': 'U'} +{'is_defined': True, 'name': '___cxa_vec_delete', 'type': 'I'} +{'is_defined': False, 'name': '___cxa_vec_delete2', 'type': 'U'} +{'is_defined': True, 'name': '___cxa_vec_delete2', 'type': 'I'} +{'is_defined': False, 'name': '___cxa_vec_delete3', 'type': 'U'} +{'is_defined': True, 'name': '___cxa_vec_delete3', 'type': 'I'} +{'is_defined': False, 'name': '___cxa_vec_dtor', 'type': 'U'} +{'is_defined': True, 'name': '___cxa_vec_dtor', 'type': 'I'} +{'is_defined': False, 'name': '___cxa_vec_new', 'type': 'U'} +{'is_defined': True, 'name': '___cxa_vec_new', 'type': 'I'} +{'is_defined': False, 'name': '___cxa_vec_new2', 'type': 'U'} +{'is_defined': True, 'name': '___cxa_vec_new2', 'type': 'I'} +{'is_defined': False, 'name': '___cxa_vec_new3', 'type': 'U'} +{'is_defined': True, 'name': '___cxa_vec_new3', 'type': 'I'} +{'is_defined': False, 'name': '___dynamic_cast', 'type': 'U'} +{'is_defined': True, 'name': '___dynamic_cast', 'type': 'I'} +{'is_defined': False, 'name': '___gxx_personality_v0', 'type': 'U'} +{'is_defined': True, 'name': '___gxx_personality_v0', 'type': 'I'} diff --git a/libcxx/lib/abi/x86_64-unknown-linux-gnu.v1.abilist b/libcxx/lib/abi/x86_64-unknown-linux-gnu.v1.abilist index 0be9eb2fcb30c..3051d4cb72bce 100644 --- a/libcxx/lib/abi/x86_64-unknown-linux-gnu.v1.abilist +++ b/libcxx/lib/abi/x86_64-unknown-linux-gnu.v1.abilist @@ -1,1861 +1,1861 @@ -{'name': '_ZNKSt11logic_error4whatEv', 'is_defined': False, 'type': 'FUNC'} -{'name': '_ZNKSt12bad_any_cast4whatEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt12experimental15fundamentals_v112bad_any_cast4whatEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt13runtime_error4whatEv', 'is_defined': False, 'type': 'FUNC'} -{'name': '_ZNKSt16nested_exception14rethrow_nestedEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt18bad_variant_access4whatEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt19bad_optional_access4whatEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__110__time_put8__do_putEPcRS1_PK2tmcc', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__110__time_put8__do_putEPwRS1_PK2tmcc', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__110error_code7messageEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__110moneypunctIcLb0EE11do_groupingEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__110moneypunctIcLb0EE13do_neg_formatEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__110moneypunctIcLb0EE13do_pos_formatEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__110moneypunctIcLb0EE14do_curr_symbolEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__110moneypunctIcLb0EE14do_frac_digitsEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__110moneypunctIcLb0EE16do_decimal_pointEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__110moneypunctIcLb0EE16do_negative_signEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__110moneypunctIcLb0EE16do_positive_signEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__110moneypunctIcLb0EE16do_thousands_sepEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__110moneypunctIcLb1EE11do_groupingEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__110moneypunctIcLb1EE13do_neg_formatEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__110moneypunctIcLb1EE13do_pos_formatEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__110moneypunctIcLb1EE14do_curr_symbolEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__110moneypunctIcLb1EE14do_frac_digitsEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__110moneypunctIcLb1EE16do_decimal_pointEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__110moneypunctIcLb1EE16do_negative_signEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__110moneypunctIcLb1EE16do_positive_signEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__110moneypunctIcLb1EE16do_thousands_sepEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__110moneypunctIwLb0EE11do_groupingEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__110moneypunctIwLb0EE13do_neg_formatEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__110moneypunctIwLb0EE13do_pos_formatEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__110moneypunctIwLb0EE14do_curr_symbolEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__110moneypunctIwLb0EE14do_frac_digitsEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__110moneypunctIwLb0EE16do_decimal_pointEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__110moneypunctIwLb0EE16do_negative_signEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__110moneypunctIwLb0EE16do_positive_signEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__110moneypunctIwLb0EE16do_thousands_sepEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__110moneypunctIwLb1EE11do_groupingEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__110moneypunctIwLb1EE13do_neg_formatEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__110moneypunctIwLb1EE13do_pos_formatEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__110moneypunctIwLb1EE14do_curr_symbolEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__110moneypunctIwLb1EE14do_frac_digitsEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__110moneypunctIwLb1EE16do_decimal_pointEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__110moneypunctIwLb1EE16do_negative_signEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__110moneypunctIwLb1EE16do_positive_signEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__110moneypunctIwLb1EE16do_thousands_sepEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__111__libcpp_db15__decrementableEPKv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__111__libcpp_db15__find_c_from_iEPv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__111__libcpp_db15__subscriptableEPKvl', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__111__libcpp_db17__dereferenceableEPKv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__111__libcpp_db17__find_c_and_lockEPv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__111__libcpp_db22__less_than_comparableEPKvS2_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__111__libcpp_db6unlockEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__111__libcpp_db8__find_cEPv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__111__libcpp_db9__addableEPKvl', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__112bad_weak_ptr4whatEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE12find_last_ofEPKcmm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE13find_first_ofEPKcmm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE16find_last_not_ofEPKcmm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE17find_first_not_ofEPKcmm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE2atEm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4copyEPcmm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4findEPKcmm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4findEcm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE5rfindEPKcmm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE5rfindEcm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7compareEPKc', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7compareEmmPKc', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7compareEmmPKcm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7compareEmmRKS5_mm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE12find_last_ofEPKwmm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE13find_first_ofEPKwmm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE16find_last_not_ofEPKwmm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE17find_first_not_ofEPKwmm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE2atEm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE4copyEPwmm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE4findEPKwmm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE4findEwm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE5rfindEPKwmm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE5rfindEwm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7compareEPKw', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7compareEmmPKw', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7compareEmmPKwm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7compareEmmRKS5_mm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__112ctype_bynameIcE10do_tolowerEPcPKc', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__112ctype_bynameIcE10do_tolowerEc', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__112ctype_bynameIcE10do_toupperEPcPKc', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__112ctype_bynameIcE10do_toupperEc', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__112ctype_bynameIwE10do_scan_isEtPKwS3_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__112ctype_bynameIwE10do_tolowerEPwPKw', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__112ctype_bynameIwE10do_tolowerEw', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__112ctype_bynameIwE10do_toupperEPwPKw', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__112ctype_bynameIwE10do_toupperEw', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__112ctype_bynameIwE11do_scan_notEtPKwS3_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__112ctype_bynameIwE5do_isEPKwS3_Pt', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__112ctype_bynameIwE5do_isEtw', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__112ctype_bynameIwE8do_widenEPKcS3_Pw', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__112ctype_bynameIwE8do_widenEc', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__112ctype_bynameIwE9do_narrowEPKwS3_cPc', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__112ctype_bynameIwE9do_narrowEwc', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__112strstreambuf6pcountEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__113random_device7entropyEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__114__codecvt_utf8IDiE10do_unshiftER11__mbstate_tPcS4_RS4_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__114__codecvt_utf8IDiE11do_encodingEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__114__codecvt_utf8IDiE13do_max_lengthEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__114__codecvt_utf8IDiE16do_always_noconvEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__114__codecvt_utf8IDiE5do_inER11__mbstate_tPKcS5_RS5_PDiS7_RS7_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__114__codecvt_utf8IDiE6do_outER11__mbstate_tPKDiS5_RS5_PcS7_RS7_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__114__codecvt_utf8IDiE9do_lengthER11__mbstate_tPKcS5_m', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__114__codecvt_utf8IDsE10do_unshiftER11__mbstate_tPcS4_RS4_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__114__codecvt_utf8IDsE11do_encodingEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__114__codecvt_utf8IDsE13do_max_lengthEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__114__codecvt_utf8IDsE16do_always_noconvEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__114__codecvt_utf8IDsE5do_inER11__mbstate_tPKcS5_RS5_PDsS7_RS7_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__114__codecvt_utf8IDsE6do_outER11__mbstate_tPKDsS5_RS5_PcS7_RS7_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__114__codecvt_utf8IDsE9do_lengthER11__mbstate_tPKcS5_m', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__114__codecvt_utf8IwE10do_unshiftER11__mbstate_tPcS4_RS4_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__114__codecvt_utf8IwE11do_encodingEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__114__codecvt_utf8IwE13do_max_lengthEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__114__codecvt_utf8IwE16do_always_noconvEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__114__codecvt_utf8IwE5do_inER11__mbstate_tPKcS5_RS5_PwS7_RS7_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__114__codecvt_utf8IwE6do_outER11__mbstate_tPKwS5_RS5_PcS7_RS7_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__114__codecvt_utf8IwE9do_lengthER11__mbstate_tPKcS5_m', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__114collate_bynameIcE10do_compareEPKcS3_S3_S3_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__114collate_bynameIcE12do_transformEPKcS3_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__114collate_bynameIwE10do_compareEPKwS3_S3_S3_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__114collate_bynameIwE12do_transformEPKwS3_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__114error_category10equivalentERKNS_10error_codeEi', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__114error_category10equivalentEiRKNS_15error_conditionE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__114error_category23default_error_conditionEi', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__115__codecvt_utf16IDiLb0EE10do_unshiftER11__mbstate_tPcS4_RS4_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__115__codecvt_utf16IDiLb0EE11do_encodingEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__115__codecvt_utf16IDiLb0EE13do_max_lengthEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__115__codecvt_utf16IDiLb0EE16do_always_noconvEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__115__codecvt_utf16IDiLb0EE5do_inER11__mbstate_tPKcS5_RS5_PDiS7_RS7_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__115__codecvt_utf16IDiLb0EE6do_outER11__mbstate_tPKDiS5_RS5_PcS7_RS7_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__115__codecvt_utf16IDiLb0EE9do_lengthER11__mbstate_tPKcS5_m', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__115__codecvt_utf16IDiLb1EE10do_unshiftER11__mbstate_tPcS4_RS4_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__115__codecvt_utf16IDiLb1EE11do_encodingEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__115__codecvt_utf16IDiLb1EE13do_max_lengthEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__115__codecvt_utf16IDiLb1EE16do_always_noconvEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__115__codecvt_utf16IDiLb1EE5do_inER11__mbstate_tPKcS5_RS5_PDiS7_RS7_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__115__codecvt_utf16IDiLb1EE6do_outER11__mbstate_tPKDiS5_RS5_PcS7_RS7_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__115__codecvt_utf16IDiLb1EE9do_lengthER11__mbstate_tPKcS5_m', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__115__codecvt_utf16IDsLb0EE10do_unshiftER11__mbstate_tPcS4_RS4_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__115__codecvt_utf16IDsLb0EE11do_encodingEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__115__codecvt_utf16IDsLb0EE13do_max_lengthEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__115__codecvt_utf16IDsLb0EE16do_always_noconvEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__115__codecvt_utf16IDsLb0EE5do_inER11__mbstate_tPKcS5_RS5_PDsS7_RS7_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__115__codecvt_utf16IDsLb0EE6do_outER11__mbstate_tPKDsS5_RS5_PcS7_RS7_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__115__codecvt_utf16IDsLb0EE9do_lengthER11__mbstate_tPKcS5_m', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__115__codecvt_utf16IDsLb1EE10do_unshiftER11__mbstate_tPcS4_RS4_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__115__codecvt_utf16IDsLb1EE11do_encodingEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__115__codecvt_utf16IDsLb1EE13do_max_lengthEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__115__codecvt_utf16IDsLb1EE16do_always_noconvEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__115__codecvt_utf16IDsLb1EE5do_inER11__mbstate_tPKcS5_RS5_PDsS7_RS7_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__115__codecvt_utf16IDsLb1EE6do_outER11__mbstate_tPKDsS5_RS5_PcS7_RS7_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__115__codecvt_utf16IDsLb1EE9do_lengthER11__mbstate_tPKcS5_m', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__115__codecvt_utf16IwLb0EE10do_unshiftER11__mbstate_tPcS4_RS4_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__115__codecvt_utf16IwLb0EE11do_encodingEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__115__codecvt_utf16IwLb0EE13do_max_lengthEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__115__codecvt_utf16IwLb0EE16do_always_noconvEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__115__codecvt_utf16IwLb0EE5do_inER11__mbstate_tPKcS5_RS5_PwS7_RS7_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__115__codecvt_utf16IwLb0EE6do_outER11__mbstate_tPKwS5_RS5_PcS7_RS7_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__115__codecvt_utf16IwLb0EE9do_lengthER11__mbstate_tPKcS5_m', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__115__codecvt_utf16IwLb1EE10do_unshiftER11__mbstate_tPcS4_RS4_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__115__codecvt_utf16IwLb1EE11do_encodingEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__115__codecvt_utf16IwLb1EE13do_max_lengthEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__115__codecvt_utf16IwLb1EE16do_always_noconvEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__115__codecvt_utf16IwLb1EE5do_inER11__mbstate_tPKcS5_RS5_PwS7_RS7_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__115__codecvt_utf16IwLb1EE6do_outER11__mbstate_tPKwS5_RS5_PcS7_RS7_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__115__codecvt_utf16IwLb1EE9do_lengthER11__mbstate_tPKcS5_m', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__115basic_streambufIcNS_11char_traitsIcEEE6getlocEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__115basic_streambufIwNS_11char_traitsIwEEE6getlocEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__115error_condition7messageEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__117moneypunct_bynameIcLb0EE11do_groupingEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__117moneypunct_bynameIcLb0EE13do_neg_formatEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__117moneypunct_bynameIcLb0EE13do_pos_formatEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__117moneypunct_bynameIcLb0EE14do_curr_symbolEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__117moneypunct_bynameIcLb0EE14do_frac_digitsEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__117moneypunct_bynameIcLb0EE16do_decimal_pointEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__117moneypunct_bynameIcLb0EE16do_negative_signEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__117moneypunct_bynameIcLb0EE16do_positive_signEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__117moneypunct_bynameIcLb0EE16do_thousands_sepEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__117moneypunct_bynameIcLb1EE11do_groupingEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__117moneypunct_bynameIcLb1EE13do_neg_formatEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__117moneypunct_bynameIcLb1EE13do_pos_formatEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__117moneypunct_bynameIcLb1EE14do_curr_symbolEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__117moneypunct_bynameIcLb1EE14do_frac_digitsEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__117moneypunct_bynameIcLb1EE16do_decimal_pointEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__117moneypunct_bynameIcLb1EE16do_negative_signEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__117moneypunct_bynameIcLb1EE16do_positive_signEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__117moneypunct_bynameIcLb1EE16do_thousands_sepEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__117moneypunct_bynameIwLb0EE11do_groupingEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__117moneypunct_bynameIwLb0EE13do_neg_formatEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__117moneypunct_bynameIwLb0EE13do_pos_formatEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__117moneypunct_bynameIwLb0EE14do_curr_symbolEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__117moneypunct_bynameIwLb0EE14do_frac_digitsEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__117moneypunct_bynameIwLb0EE16do_decimal_pointEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__117moneypunct_bynameIwLb0EE16do_negative_signEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__117moneypunct_bynameIwLb0EE16do_positive_signEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__117moneypunct_bynameIwLb0EE16do_thousands_sepEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__117moneypunct_bynameIwLb1EE11do_groupingEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__117moneypunct_bynameIwLb1EE13do_neg_formatEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__117moneypunct_bynameIwLb1EE13do_pos_formatEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__117moneypunct_bynameIwLb1EE14do_curr_symbolEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__117moneypunct_bynameIwLb1EE14do_frac_digitsEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__117moneypunct_bynameIwLb1EE16do_decimal_pointEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__117moneypunct_bynameIwLb1EE16do_negative_signEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__117moneypunct_bynameIwLb1EE16do_positive_signEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__117moneypunct_bynameIwLb1EE16do_thousands_sepEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__118__time_get_storageIcE15__do_date_orderEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__118__time_get_storageIwE15__do_date_orderEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__119__shared_weak_count13__get_deleterERKSt9type_info', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__120__codecvt_utf8_utf16IDiE10do_unshiftER11__mbstate_tPcS4_RS4_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__120__codecvt_utf8_utf16IDiE11do_encodingEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__120__codecvt_utf8_utf16IDiE13do_max_lengthEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__120__codecvt_utf8_utf16IDiE16do_always_noconvEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__120__codecvt_utf8_utf16IDiE5do_inER11__mbstate_tPKcS5_RS5_PDiS7_RS7_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__120__codecvt_utf8_utf16IDiE6do_outER11__mbstate_tPKDiS5_RS5_PcS7_RS7_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__120__codecvt_utf8_utf16IDiE9do_lengthER11__mbstate_tPKcS5_m', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__120__codecvt_utf8_utf16IDsE10do_unshiftER11__mbstate_tPcS4_RS4_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__120__codecvt_utf8_utf16IDsE11do_encodingEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__120__codecvt_utf8_utf16IDsE13do_max_lengthEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__120__codecvt_utf8_utf16IDsE16do_always_noconvEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__120__codecvt_utf8_utf16IDsE5do_inER11__mbstate_tPKcS5_RS5_PDsS7_RS7_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__120__codecvt_utf8_utf16IDsE6do_outER11__mbstate_tPKDsS5_RS5_PcS7_RS7_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__120__codecvt_utf8_utf16IDsE9do_lengthER11__mbstate_tPKcS5_m', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__120__codecvt_utf8_utf16IwE10do_unshiftER11__mbstate_tPcS4_RS4_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__120__codecvt_utf8_utf16IwE11do_encodingEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__120__codecvt_utf8_utf16IwE13do_max_lengthEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__120__codecvt_utf8_utf16IwE16do_always_noconvEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__120__codecvt_utf8_utf16IwE5do_inER11__mbstate_tPKcS5_RS5_PwS7_RS7_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__120__codecvt_utf8_utf16IwE6do_outER11__mbstate_tPKwS5_RS5_PcS7_RS7_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__120__codecvt_utf8_utf16IwE9do_lengthER11__mbstate_tPKcS5_m', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__120__time_get_c_storageIcE3__XEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__120__time_get_c_storageIcE3__cEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__120__time_get_c_storageIcE3__rEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__120__time_get_c_storageIcE3__xEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__120__time_get_c_storageIcE7__am_pmEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__120__time_get_c_storageIcE7__weeksEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__120__time_get_c_storageIcE8__monthsEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__120__time_get_c_storageIwE3__XEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__120__time_get_c_storageIwE3__cEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__120__time_get_c_storageIwE3__rEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__120__time_get_c_storageIwE3__xEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__120__time_get_c_storageIwE7__am_pmEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__120__time_get_c_storageIwE7__weeksEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__120__time_get_c_storageIwE8__monthsEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__120__vector_base_commonILb1EE20__throw_length_errorEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__120__vector_base_commonILb1EE20__throw_out_of_rangeEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__121__basic_string_commonILb1EE20__throw_length_errorEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__121__basic_string_commonILb1EE20__throw_out_of_rangeEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__123__match_any_but_newlineIcE6__execERNS_7__stateIcEE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__123__match_any_but_newlineIwE6__execERNS_7__stateIwEE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__124__libcpp_debug_exception4whatEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__15ctypeIcE10do_tolowerEPcPKc', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__15ctypeIcE10do_tolowerEc', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__15ctypeIcE10do_toupperEPcPKc', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__15ctypeIcE10do_toupperEc', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__15ctypeIcE8do_widenEPKcS3_Pc', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__15ctypeIcE8do_widenEc', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__15ctypeIcE9do_narrowEPKcS3_cPc', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__15ctypeIcE9do_narrowEcc', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__15ctypeIwE10do_scan_isEtPKwS3_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__15ctypeIwE10do_tolowerEPwPKw', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__15ctypeIwE10do_tolowerEw', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__15ctypeIwE10do_toupperEPwPKw', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__15ctypeIwE10do_toupperEw', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__15ctypeIwE11do_scan_notEtPKwS3_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__15ctypeIwE5do_isEPKwS3_Pt', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__15ctypeIwE5do_isEtw', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__15ctypeIwE8do_widenEPKcS3_Pw', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__15ctypeIwE8do_widenEc', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__15ctypeIwE9do_narrowEPKwS3_cPc', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__15ctypeIwE9do_narrowEwc', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__16locale4nameEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__16locale9has_facetERNS0_2idE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__16locale9use_facetERNS0_2idE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__16localeeqERKS0_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__17codecvtIDic11__mbstate_tE10do_unshiftERS1_PcS4_RS4_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__17codecvtIDic11__mbstate_tE11do_encodingEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__17codecvtIDic11__mbstate_tE13do_max_lengthEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__17codecvtIDic11__mbstate_tE16do_always_noconvEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__17codecvtIDic11__mbstate_tE5do_inERS1_PKcS5_RS5_PDiS7_RS7_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__17codecvtIDic11__mbstate_tE6do_outERS1_PKDiS5_RS5_PcS7_RS7_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__17codecvtIDic11__mbstate_tE9do_lengthERS1_PKcS5_m', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__17codecvtIDsc11__mbstate_tE10do_unshiftERS1_PcS4_RS4_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__17codecvtIDsc11__mbstate_tE11do_encodingEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__17codecvtIDsc11__mbstate_tE13do_max_lengthEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__17codecvtIDsc11__mbstate_tE16do_always_noconvEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__17codecvtIDsc11__mbstate_tE5do_inERS1_PKcS5_RS5_PDsS7_RS7_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__17codecvtIDsc11__mbstate_tE6do_outERS1_PKDsS5_RS5_PcS7_RS7_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__17codecvtIDsc11__mbstate_tE9do_lengthERS1_PKcS5_m', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__17codecvtIcc11__mbstate_tE10do_unshiftERS1_PcS4_RS4_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__17codecvtIcc11__mbstate_tE11do_encodingEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__17codecvtIcc11__mbstate_tE13do_max_lengthEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__17codecvtIcc11__mbstate_tE16do_always_noconvEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__17codecvtIcc11__mbstate_tE5do_inERS1_PKcS5_RS5_PcS7_RS7_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__17codecvtIcc11__mbstate_tE6do_outERS1_PKcS5_RS5_PcS7_RS7_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__17codecvtIcc11__mbstate_tE9do_lengthERS1_PKcS5_m', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__17codecvtIwc11__mbstate_tE10do_unshiftERS1_PcS4_RS4_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__17codecvtIwc11__mbstate_tE11do_encodingEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__17codecvtIwc11__mbstate_tE13do_max_lengthEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__17codecvtIwc11__mbstate_tE16do_always_noconvEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__17codecvtIwc11__mbstate_tE5do_inERS1_PKcS5_RS5_PwS7_RS7_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__17codecvtIwc11__mbstate_tE6do_outERS1_PKwS5_RS5_PcS7_RS7_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__17codecvtIwc11__mbstate_tE9do_lengthERS1_PKcS5_m', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__17collateIcE10do_compareEPKcS3_S3_S3_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__17collateIcE12do_transformEPKcS3_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__17collateIcE7do_hashEPKcS3_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__17collateIwE10do_compareEPKwS3_S3_S3_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__17collateIwE12do_transformEPKwS3_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__17collateIwE7do_hashEPKwS3_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRPv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRb', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRd', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRe', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRf', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRl', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRt', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRx', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRy', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjS8_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRPv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRb', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRd', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRe', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRf', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRl', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRt', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRx', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRy', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjS8_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEcPKv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEcb', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEcd', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEce', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEcl', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEcm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEcx', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEcy', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwPKv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwb', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwd', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwe', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwl', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwx', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwy', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__18ios_base6getlocEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__18messagesIcE6do_getEliiRKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__18messagesIcE7do_openERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERKNS_6localeE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__18messagesIcE8do_closeEl', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__18messagesIwE6do_getEliiRKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__18messagesIwE7do_openERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERKNS_6localeE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__18messagesIwE8do_closeEl', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__18numpunctIcE11do_groupingEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__18numpunctIcE11do_truenameEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__18numpunctIcE12do_falsenameEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__18numpunctIcE16do_decimal_pointEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__18numpunctIcE16do_thousands_sepEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__18numpunctIwE11do_groupingEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__18numpunctIwE11do_truenameEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__18numpunctIwE12do_falsenameEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__18numpunctIwE16do_decimal_pointEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__18numpunctIwE16do_thousands_sepEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE10__get_hourERiRS4_S4_RjRKNS_5ctypeIcEE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE10__get_yearERiRS4_S4_RjRKNS_5ctypeIcEE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE11__get_am_pmERiRS4_S4_RjRKNS_5ctypeIcEE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE11__get_monthERiRS4_S4_RjRKNS_5ctypeIcEE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE11__get_year4ERiRS4_S4_RjRKNS_5ctypeIcEE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE11do_get_dateES4_S4_RNS_8ios_baseERjP2tm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE11do_get_timeES4_S4_RNS_8ios_baseERjP2tm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE11do_get_yearES4_S4_RNS_8ios_baseERjP2tm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE12__get_minuteERiRS4_S4_RjRKNS_5ctypeIcEE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE12__get_secondERiRS4_S4_RjRKNS_5ctypeIcEE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE13__get_12_hourERiRS4_S4_RjRKNS_5ctypeIcEE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE13__get_percentERS4_S4_RjRKNS_5ctypeIcEE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE13__get_weekdayERiRS4_S4_RjRKNS_5ctypeIcEE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE13do_date_orderEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE14do_get_weekdayES4_S4_RNS_8ios_baseERjP2tm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE15__get_monthnameERiRS4_S4_RjRKNS_5ctypeIcEE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE16do_get_monthnameES4_S4_RNS_8ios_baseERjP2tm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE17__get_weekdaynameERiRS4_S4_RjRKNS_5ctypeIcEE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE17__get_white_spaceERS4_S4_RjRKNS_5ctypeIcEE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE18__get_day_year_numERiRS4_S4_RjRKNS_5ctypeIcEE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE3getES4_S4_RNS_8ios_baseERjP2tmPKcSC_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjP2tmcc', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE9__get_dayERiRS4_S4_RjRKNS_5ctypeIcEE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE10__get_hourERiRS4_S4_RjRKNS_5ctypeIwEE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE10__get_yearERiRS4_S4_RjRKNS_5ctypeIwEE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE11__get_am_pmERiRS4_S4_RjRKNS_5ctypeIwEE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE11__get_monthERiRS4_S4_RjRKNS_5ctypeIwEE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE11__get_year4ERiRS4_S4_RjRKNS_5ctypeIwEE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE11do_get_dateES4_S4_RNS_8ios_baseERjP2tm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE11do_get_timeES4_S4_RNS_8ios_baseERjP2tm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE11do_get_yearES4_S4_RNS_8ios_baseERjP2tm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE12__get_minuteERiRS4_S4_RjRKNS_5ctypeIwEE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE12__get_secondERiRS4_S4_RjRKNS_5ctypeIwEE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE13__get_12_hourERiRS4_S4_RjRKNS_5ctypeIwEE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE13__get_percentERS4_S4_RjRKNS_5ctypeIwEE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE13__get_weekdayERiRS4_S4_RjRKNS_5ctypeIwEE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE13do_date_orderEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE14do_get_weekdayES4_S4_RNS_8ios_baseERjP2tm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE15__get_monthnameERiRS4_S4_RjRKNS_5ctypeIwEE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE16do_get_monthnameES4_S4_RNS_8ios_baseERjP2tm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE17__get_weekdaynameERiRS4_S4_RjRKNS_5ctypeIwEE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE17__get_white_spaceERS4_S4_RjRKNS_5ctypeIwEE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE18__get_day_year_numERiRS4_S4_RjRKNS_5ctypeIwEE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE3getES4_S4_RNS_8ios_baseERjP2tmPKwSC_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjP2tmcc', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE9__get_dayERiRS4_S4_RjRKNS_5ctypeIwEE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__18time_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE3putES4_RNS_8ios_baseEcPK2tmPKcSC_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__18time_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEcPK2tmcc', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__18time_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE3putES4_RNS_8ios_baseEwPK2tmPKwSC_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__18time_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwPK2tmcc', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__19money_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_bRNS_8ios_baseERjRNS_12basic_stringIcS3_NS_9allocatorIcEEEE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__19money_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_bRNS_8ios_baseERjRe', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__19money_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_bRNS_8ios_baseERjRNS_12basic_stringIwS3_NS_9allocatorIwEEEE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__19money_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_bRNS_8ios_baseERjRe', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__19money_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_bRNS_8ios_baseEcRKNS_12basic_stringIcS3_NS_9allocatorIcEEEE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__19money_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_bRNS_8ios_baseEce', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__19money_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_bRNS_8ios_baseEwRKNS_12basic_stringIwS3_NS_9allocatorIwEEEE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNKSt3__19money_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_bRNS_8ios_baseEwe', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt11logic_errorC1EPKc', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt11logic_errorC1ERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt11logic_errorC1ERKS_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt11logic_errorC2EPKc', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt11logic_errorC2ERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt11logic_errorC2ERKS_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt11logic_errorD2Ev', 'is_defined': False, 'type': 'FUNC'} -{'name': '_ZNSt11logic_erroraSERKS_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt12experimental19bad_optional_accessD0Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt12experimental19bad_optional_accessD1Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt12experimental19bad_optional_accessD2Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt12length_errorD1Ev', 'is_defined': False, 'type': 'FUNC'} -{'name': '_ZNSt12out_of_rangeD1Ev', 'is_defined': False, 'type': 'FUNC'} -{'name': '_ZNSt13exception_ptrC1ERKS_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt13exception_ptrC2ERKS_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt13exception_ptrD1Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt13exception_ptrD2Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt13exception_ptraSERKS_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt13runtime_errorC1EPKc', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt13runtime_errorC1ERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt13runtime_errorC1ERKS_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt13runtime_errorC2EPKc', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt13runtime_errorC2ERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt13runtime_errorC2ERKS_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt13runtime_errorD1Ev', 'is_defined': False, 'type': 'FUNC'} -{'name': '_ZNSt13runtime_errorD2Ev', 'is_defined': False, 'type': 'FUNC'} -{'name': '_ZNSt13runtime_erroraSERKS_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt14overflow_errorD1Ev', 'is_defined': False, 'type': 'FUNC'} -{'name': '_ZNSt16invalid_argumentD1Ev', 'is_defined': False, 'type': 'FUNC'} -{'name': '_ZNSt16nested_exceptionC1Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt16nested_exceptionC2Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt16nested_exceptionD0Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt16nested_exceptionD1Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt16nested_exceptionD2Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt19bad_optional_accessD0Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt19bad_optional_accessD1Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt19bad_optional_accessD2Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__110__time_getC1EPKc', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__110__time_getC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__110__time_getC2EPKc', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__110__time_getC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__110__time_getD1Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__110__time_getD2Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__110__time_putC1EPKc', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__110__time_putC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__110__time_putC2EPKc', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__110__time_putC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__110__time_putD1Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__110__time_putD2Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__110adopt_lockE', 'is_defined': True, 'type': 'OBJECT', 'size': 1} -{'name': '_ZNSt3__110ctype_base5alnumE', 'is_defined': True, 'type': 'OBJECT', 'size': 2} -{'name': '_ZNSt3__110ctype_base5alphaE', 'is_defined': True, 'type': 'OBJECT', 'size': 2} -{'name': '_ZNSt3__110ctype_base5blankE', 'is_defined': True, 'type': 'OBJECT', 'size': 2} -{'name': '_ZNSt3__110ctype_base5cntrlE', 'is_defined': True, 'type': 'OBJECT', 'size': 2} -{'name': '_ZNSt3__110ctype_base5digitE', 'is_defined': True, 'type': 'OBJECT', 'size': 2} -{'name': '_ZNSt3__110ctype_base5graphE', 'is_defined': True, 'type': 'OBJECT', 'size': 2} -{'name': '_ZNSt3__110ctype_base5lowerE', 'is_defined': True, 'type': 'OBJECT', 'size': 2} -{'name': '_ZNSt3__110ctype_base5printE', 'is_defined': True, 'type': 'OBJECT', 'size': 2} -{'name': '_ZNSt3__110ctype_base5punctE', 'is_defined': True, 'type': 'OBJECT', 'size': 2} -{'name': '_ZNSt3__110ctype_base5spaceE', 'is_defined': True, 'type': 'OBJECT', 'size': 2} -{'name': '_ZNSt3__110ctype_base5upperE', 'is_defined': True, 'type': 'OBJECT', 'size': 2} -{'name': '_ZNSt3__110ctype_base6xdigitE', 'is_defined': True, 'type': 'OBJECT', 'size': 2} -{'name': '_ZNSt3__110defer_lockE', 'is_defined': True, 'type': 'OBJECT', 'size': 1} -{'name': '_ZNSt3__110istrstreamD0Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__110istrstreamD1Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__110istrstreamD2Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__110moneypunctIcLb0EE2idE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} -{'name': '_ZNSt3__110moneypunctIcLb0EE4intlE', 'is_defined': True, 'type': 'OBJECT', 'size': 1} -{'name': '_ZNSt3__110moneypunctIcLb1EE2idE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} -{'name': '_ZNSt3__110moneypunctIcLb1EE4intlE', 'is_defined': True, 'type': 'OBJECT', 'size': 1} -{'name': '_ZNSt3__110moneypunctIwLb0EE2idE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} -{'name': '_ZNSt3__110moneypunctIwLb0EE4intlE', 'is_defined': True, 'type': 'OBJECT', 'size': 1} -{'name': '_ZNSt3__110moneypunctIwLb1EE2idE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} -{'name': '_ZNSt3__110moneypunctIwLb1EE4intlE', 'is_defined': True, 'type': 'OBJECT', 'size': 1} -{'name': '_ZNSt3__110ostrstreamD0Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__110ostrstreamD1Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__110ostrstreamD2Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__110to_wstringEd', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__110to_wstringEe', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__110to_wstringEf', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__110to_wstringEi', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__110to_wstringEj', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__110to_wstringEl', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__110to_wstringEm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__110to_wstringEx', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__110to_wstringEy', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__111__call_onceERVmPvPFvS2_E', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__111__libcpp_db10__insert_cEPv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__111__libcpp_db10__insert_iEPv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__111__libcpp_db11__insert_icEPvPKv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__111__libcpp_db15__iterator_copyEPvPKv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__111__libcpp_db16__invalidate_allEPv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__111__libcpp_db4swapEPvS1_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__111__libcpp_db9__erase_cEPv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__111__libcpp_db9__erase_iEPv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__111__libcpp_dbC1Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__111__libcpp_dbC2Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__111__libcpp_dbD1Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__111__libcpp_dbD2Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__111__money_getIcE13__gather_infoEbRKNS_6localeERNS_10money_base7patternERcS8_RNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEESF_SF_SF_Ri', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__111__money_getIwE13__gather_infoEbRKNS_6localeERNS_10money_base7patternERwS8_RNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERNS9_IwNSA_IwEENSC_IwEEEESJ_SJ_Ri', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__111__money_putIcE13__gather_infoEbbRKNS_6localeERNS_10money_base7patternERcS8_RNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEESF_SF_Ri', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__111__money_putIcE8__formatEPcRS2_S3_jPKcS5_RKNS_5ctypeIcEEbRKNS_10money_base7patternEccRKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEESL_SL_i', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__111__money_putIwE13__gather_infoEbbRKNS_6localeERNS_10money_base7patternERwS8_RNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERNS9_IwNSA_IwEENSC_IwEEEESJ_Ri', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__111__money_putIwE8__formatEPwRS2_S3_jPKwS5_RKNS_5ctypeIwEEbRKNS_10money_base7patternEwwRKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERKNSE_IwNSF_IwEENSH_IwEEEESQ_i', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__111regex_errorC1ENS_15regex_constants10error_typeE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__111regex_errorC2ENS_15regex_constants10error_typeE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__111regex_errorD0Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__111regex_errorD1Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__111regex_errorD2Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__111this_thread9sleep_forERKNS_6chrono8durationIxNS_5ratioILl1ELl1000000000EEEEE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__111timed_mutex4lockEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__111timed_mutex6unlockEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__111timed_mutex8try_lockEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__111timed_mutexC1Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__111timed_mutexC2Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__111timed_mutexD1Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__111timed_mutexD2Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__111try_to_lockE', 'is_defined': True, 'type': 'OBJECT', 'size': 1} -{'name': '_ZNSt3__112__do_nothingEPv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112__get_sp_mutEPKv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112__next_primeEm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112__rs_default4__c_E', 'is_defined': True, 'type': 'OBJECT', 'size': 4} -{'name': '_ZNSt3__112__rs_defaultC1ERKS0_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112__rs_defaultC1Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112__rs_defaultC2ERKS0_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112__rs_defaultC2Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112__rs_defaultD1Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112__rs_defaultD2Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112__rs_defaultclEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112bad_weak_ptrD0Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112bad_weak_ptrD1Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112bad_weak_ptrD2Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE21__grow_by_and_replaceEmmmmmmPKc', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE2atEm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4nposE', 'is_defined': True, 'type': 'OBJECT', 'size': 8} -{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE5eraseEmm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcmm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEmc', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6appendEPKc', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6appendEPKcm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6appendERKS5_mm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6appendEmc', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignEPKc', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignEPKcm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignERKS5_mm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignEmc', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6insertENS_11__wrap_iterIPKcEEc', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6insertEmPKc', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6insertEmPKcm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6insertEmRKS5_mm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6insertEmmc', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6resizeEmc', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7replaceEmmPKc', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7replaceEmmPKcm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7replaceEmmRKS5_mm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7replaceEmmmc', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7reserveEm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9__grow_byEmmmmmm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9push_backEc', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC1ERKS5_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC1ERKS5_RKS4_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC1ERKS5_mmRKS4_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2ERKS5_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2ERKS5_RKS4_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2ERKS5_mmRKS4_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED1Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEaSERKS5_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEaSEc', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE21__grow_by_and_replaceEmmmmmmPKw', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE2atEm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE4nposE', 'is_defined': True, 'type': 'OBJECT', 'size': 8} -{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE5eraseEmm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6__initEPKwm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6__initEPKwmm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6__initEmw', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6appendEPKw', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6appendEPKwm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6appendERKS5_mm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6appendEmw', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6assignEPKw', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6assignEPKwm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6assignERKS5_mm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6assignEmw', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6insertENS_11__wrap_iterIPKwEEw', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6insertEmPKw', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6insertEmPKwm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6insertEmRKS5_mm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6insertEmmw', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6resizeEmw', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7replaceEmmPKw', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7replaceEmmPKwm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7replaceEmmRKS5_mm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7replaceEmmmw', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7reserveEm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE9__grow_byEmmmmmm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE9push_backEw', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC1ERKS5_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC1ERKS5_RKS4_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC1ERKS5_mmRKS4_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC2ERKS5_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC2ERKS5_RKS4_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC2ERKS5_mmRKS4_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEED1Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEED2Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEaSERKS5_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEaSEw', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112ctype_bynameIcEC1EPKcm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112ctype_bynameIcEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112ctype_bynameIcEC2EPKcm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112ctype_bynameIcEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112ctype_bynameIcED0Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112ctype_bynameIcED1Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112ctype_bynameIcED2Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112ctype_bynameIwEC1EPKcm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112ctype_bynameIwEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112ctype_bynameIwEC2EPKcm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112ctype_bynameIwEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112ctype_bynameIwED0Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112ctype_bynameIwED1Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112ctype_bynameIwED2Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112future_errorC1ENS_10error_codeE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112future_errorC2ENS_10error_codeE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112future_errorD0Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112future_errorD1Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112future_errorD2Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112placeholders2_1E', 'is_defined': True, 'type': 'OBJECT', 'size': 1} -{'name': '_ZNSt3__112placeholders2_2E', 'is_defined': True, 'type': 'OBJECT', 'size': 1} -{'name': '_ZNSt3__112placeholders2_3E', 'is_defined': True, 'type': 'OBJECT', 'size': 1} -{'name': '_ZNSt3__112placeholders2_4E', 'is_defined': True, 'type': 'OBJECT', 'size': 1} -{'name': '_ZNSt3__112placeholders2_5E', 'is_defined': True, 'type': 'OBJECT', 'size': 1} -{'name': '_ZNSt3__112placeholders2_6E', 'is_defined': True, 'type': 'OBJECT', 'size': 1} -{'name': '_ZNSt3__112placeholders2_7E', 'is_defined': True, 'type': 'OBJECT', 'size': 1} -{'name': '_ZNSt3__112placeholders2_8E', 'is_defined': True, 'type': 'OBJECT', 'size': 1} -{'name': '_ZNSt3__112placeholders2_9E', 'is_defined': True, 'type': 'OBJECT', 'size': 1} -{'name': '_ZNSt3__112placeholders3_10E', 'is_defined': True, 'type': 'OBJECT', 'size': 1} -{'name': '_ZNSt3__112strstreambuf3strEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112strstreambuf4swapERS0_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112strstreambuf6__initEPclS1_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112strstreambuf6freezeEb', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112strstreambuf7seekoffExNS_8ios_base7seekdirEj', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112strstreambuf7seekposENS_4fposI11__mbstate_tEEj', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112strstreambuf8overflowEi', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112strstreambuf9pbackfailEi', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112strstreambuf9underflowEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112strstreambufC1EPFPvmEPFvS1_E', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112strstreambufC1EPKal', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112strstreambufC1EPKcl', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112strstreambufC1EPKhl', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112strstreambufC1EPalS1_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112strstreambufC1EPclS1_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112strstreambufC1EPhlS1_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112strstreambufC1El', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112strstreambufC2EPFPvmEPFvS1_E', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112strstreambufC2EPKal', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112strstreambufC2EPKcl', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112strstreambufC2EPKhl', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112strstreambufC2EPalS1_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112strstreambufC2EPclS1_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112strstreambufC2EPhlS1_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112strstreambufC2El', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112strstreambufD0Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112strstreambufD1Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112strstreambufD2Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112system_error6__initERKNS_10error_codeENS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112system_errorC1ENS_10error_codeE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112system_errorC1ENS_10error_codeEPKc', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112system_errorC1ENS_10error_codeERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112system_errorC1EiRKNS_14error_categoryE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112system_errorC1EiRKNS_14error_categoryEPKc', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112system_errorC1EiRKNS_14error_categoryERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112system_errorC2ENS_10error_codeE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112system_errorC2ENS_10error_codeEPKc', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112system_errorC2ENS_10error_codeERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112system_errorC2EiRKNS_14error_categoryE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112system_errorC2EiRKNS_14error_categoryEPKc', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112system_errorC2EiRKNS_14error_categoryERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112system_errorD0Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112system_errorD1Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__112system_errorD2Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113allocator_argE', 'is_defined': True, 'type': 'OBJECT', 'size': 1} -{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE3getEPcl', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE3getEPclc', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE3getERNS_15basic_streambufIcS2_EE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE3getERNS_15basic_streambufIcS2_EEc', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE3getERc', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE3getEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE4peekEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE4readEPcl', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE4swapERS3_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE4syncEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE5seekgENS_4fposI11__mbstate_tEE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE5seekgExNS_8ios_base7seekdirE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE5tellgEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE5ungetEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE6ignoreEli', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE6sentryC1ERS3_b', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE6sentryC2ERS3_b', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE7getlineEPcl', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE7getlineEPclc', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE7putbackEc', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE8readsomeEPcl', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEEC1EPNS_15basic_streambufIcS2_EE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEEC2EPNS_15basic_streambufIcS2_EE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEED0Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEED1Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEED2Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsEPFRNS_8ios_baseES5_E', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsEPFRNS_9basic_iosIcS2_EES6_E', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsEPFRS3_S4_E', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsEPNS_15basic_streambufIcS2_EE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERPv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERb', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERd', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERe', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERf', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERi', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERj', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERl', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERs', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERt', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERx', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERy', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE3getEPwl', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE3getEPwlw', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE3getERNS_15basic_streambufIwS2_EE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE3getERNS_15basic_streambufIwS2_EEw', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE3getERw', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE3getEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE4peekEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE4readEPwl', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE4swapERS3_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE4syncEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE5seekgENS_4fposI11__mbstate_tEE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE5seekgExNS_8ios_base7seekdirE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE5tellgEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE5ungetEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE6ignoreElj', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE6sentryC1ERS3_b', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE6sentryC2ERS3_b', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE7getlineEPwl', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE7getlineEPwlw', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE7putbackEw', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE8readsomeEPwl', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEEC1EPNS_15basic_streambufIwS2_EE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEEC2EPNS_15basic_streambufIwS2_EE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEED0Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEED1Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEED2Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsEPFRNS_8ios_baseES5_E', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsEPFRNS_9basic_iosIwS2_EES6_E', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsEPFRS3_S4_E', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsEPNS_15basic_streambufIwS2_EE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERPv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERb', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERd', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERe', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERf', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERi', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERj', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERl', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERs', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERt', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERx', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERy', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE3putEc', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE4swapERS3_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE5flushEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE5seekpENS_4fposI11__mbstate_tEE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE5seekpExNS_8ios_base7seekdirE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE5tellpEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE5writeEPKcl', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE6sentryC1ERS3_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE6sentryC2ERS3_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE6sentryD1Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE6sentryD2Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEEC1EPNS_15basic_streambufIcS2_EE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEEC2EPNS_15basic_streambufIcS2_EE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEED0Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEED1Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEED2Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEPFRNS_8ios_baseES5_E', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEPFRNS_9basic_iosIcS2_EES6_E', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEPFRS3_S4_E', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEPKv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEPNS_15basic_streambufIcS2_EE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEb', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEd', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEe', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEf', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEi', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEj', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEl', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEs', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEt', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEx', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEy', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEE3putEw', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEE4swapERS3_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEE5flushEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEE5seekpENS_4fposI11__mbstate_tEE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEE5seekpExNS_8ios_base7seekdirE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEE5tellpEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEE5writeEPKwl', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEE6sentryC1ERS3_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEE6sentryC2ERS3_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEE6sentryD1Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEE6sentryD2Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEEC1EPNS_15basic_streambufIwS2_EE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEEC2EPNS_15basic_streambufIwS2_EE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEED0Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEED1Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEED2Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEPFRNS_8ios_baseES5_E', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEPFRNS_9basic_iosIwS2_EES6_E', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEPFRS3_S4_E', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEPKv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEPNS_15basic_streambufIwS2_EE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEb', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEd', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEe', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEf', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEi', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEj', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEl', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEs', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEt', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEx', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEy', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113random_deviceC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113random_deviceC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113random_deviceD1Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113random_deviceD2Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113random_deviceclEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113shared_futureIvED1Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113shared_futureIvED2Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__113shared_futureIvEaSERKS1_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__114__get_const_dbEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__114__num_get_base10__get_baseERNS_8ios_baseE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__114__num_get_base5__srcE', 'is_defined': True, 'type': 'OBJECT', 'size': 33} -{'name': '_ZNSt3__114__num_put_base12__format_intEPcPKcbj', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__114__num_put_base14__format_floatEPcPKcj', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__114__num_put_base18__identify_paddingEPcS1_RKNS_8ios_baseE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__114__shared_count12__add_sharedEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__114__shared_count16__release_sharedEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__114__shared_countD0Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__114__shared_countD1Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__114__shared_countD2Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__114basic_iostreamIcNS_11char_traitsIcEEE4swapERS3_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__114basic_iostreamIcNS_11char_traitsIcEEEC1EPNS_15basic_streambufIcS2_EE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__114basic_iostreamIcNS_11char_traitsIcEEEC2EPNS_15basic_streambufIcS2_EE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__114basic_iostreamIcNS_11char_traitsIcEEED0Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__114basic_iostreamIcNS_11char_traitsIcEEED1Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__114basic_iostreamIcNS_11char_traitsIcEEED2Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__114codecvt_bynameIDic11__mbstate_tED0Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__114codecvt_bynameIDic11__mbstate_tED1Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__114codecvt_bynameIDic11__mbstate_tED2Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__114codecvt_bynameIDsc11__mbstate_tED0Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__114codecvt_bynameIDsc11__mbstate_tED1Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__114codecvt_bynameIDsc11__mbstate_tED2Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__114codecvt_bynameIcc11__mbstate_tED0Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__114codecvt_bynameIcc11__mbstate_tED1Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__114codecvt_bynameIcc11__mbstate_tED2Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__114codecvt_bynameIwc11__mbstate_tED0Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__114codecvt_bynameIwc11__mbstate_tED1Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__114codecvt_bynameIwc11__mbstate_tED2Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__114collate_bynameIcEC1EPKcm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__114collate_bynameIcEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__114collate_bynameIcEC2EPKcm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__114collate_bynameIcEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__114collate_bynameIcED0Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__114collate_bynameIcED1Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__114collate_bynameIcED2Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__114collate_bynameIwEC1EPKcm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__114collate_bynameIwEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__114collate_bynameIwEC2EPKcm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__114collate_bynameIwEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__114collate_bynameIwED0Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__114collate_bynameIwED1Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__114collate_bynameIwED2Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__114error_categoryC2Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__114error_categoryD0Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__114error_categoryD1Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__114error_categoryD2Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115__get_classnameEPKcb', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115__thread_struct25notify_all_at_thread_exitEPNS_18condition_variableEPNS_5mutexE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115__thread_struct27__make_ready_at_thread_exitEPNS_17__assoc_sub_stateE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115__thread_structC1Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115__thread_structC2Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115__thread_structD1Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115__thread_structD2Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE10pubseekoffExNS_8ios_base7seekdirEj', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE10pubseekposENS_4fposI11__mbstate_tEEj', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE4setgEPcS4_S4_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE4setpEPcS4_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE4swapERS3_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE4syncEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE5gbumpEi', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE5imbueERKNS_6localeE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE5pbumpEi', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE5sgetcEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE5sgetnEPcl', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE5sputcEc', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE5sputnEPKcl', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE5uflowEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE6sbumpcEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE6setbufEPcl', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE6snextcEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE6xsgetnEPcl', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE6xsputnEPKcl', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE7pubsyncEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE7seekoffExNS_8ios_base7seekdirEj', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE7seekposENS_4fposI11__mbstate_tEEj', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE7sungetcEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE8in_availEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE8overflowEi', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE8pubimbueERKNS_6localeE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE9pbackfailEi', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE9pubsetbufEPcl', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE9showmanycEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE9sputbackcEc', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE9underflowEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEEC1ERKS3_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEEC1Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEEC2ERKS3_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEEC2Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEED0Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEED1Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEED2Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEEaSERKS3_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE10pubseekoffExNS_8ios_base7seekdirEj', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE10pubseekposENS_4fposI11__mbstate_tEEj', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE4setgEPwS4_S4_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE4setpEPwS4_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE4swapERS3_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE4syncEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE5gbumpEi', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE5imbueERKNS_6localeE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE5pbumpEi', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE5sgetcEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE5sgetnEPwl', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE5sputcEw', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE5sputnEPKwl', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE5uflowEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE6sbumpcEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE6setbufEPwl', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE6snextcEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE6xsgetnEPwl', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE6xsputnEPKwl', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE7pubsyncEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE7seekoffExNS_8ios_base7seekdirEj', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE7seekposENS_4fposI11__mbstate_tEEj', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE7sungetcEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE8in_availEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE8overflowEj', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE8pubimbueERKNS_6localeE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE9pbackfailEj', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE9pubsetbufEPwl', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE9showmanycEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE9sputbackcEw', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE9underflowEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEEC1ERKS3_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEEC1Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEEC2ERKS3_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEEC2Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEED0Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEED1Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEED2Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEEaSERKS3_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115future_categoryEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115numpunct_bynameIcE6__initEPKc', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115numpunct_bynameIcEC1EPKcm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115numpunct_bynameIcEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115numpunct_bynameIcEC2EPKcm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115numpunct_bynameIcEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115numpunct_bynameIcED0Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115numpunct_bynameIcED1Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115numpunct_bynameIcED2Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115numpunct_bynameIwE6__initEPKc', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115numpunct_bynameIwEC1EPKcm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115numpunct_bynameIwEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115numpunct_bynameIwEC2EPKcm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115numpunct_bynameIwEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115numpunct_bynameIwED0Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115numpunct_bynameIwED1Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115numpunct_bynameIwED2Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115recursive_mutex4lockEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115recursive_mutex6unlockEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115recursive_mutex8try_lockEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115recursive_mutexC1Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115recursive_mutexC2Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115recursive_mutexD1Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115recursive_mutexD2Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__115system_categoryEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__116__check_groupingERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPjS8_Rj', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__116__narrow_to_utf8ILm16EED0Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__116__narrow_to_utf8ILm16EED1Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__116__narrow_to_utf8ILm16EED2Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__116__narrow_to_utf8ILm32EED0Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__116__narrow_to_utf8ILm32EED1Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__116__narrow_to_utf8ILm32EED2Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__116generic_categoryEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__117__assoc_sub_state10__sub_waitERNS_11unique_lockINS_5mutexEEE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__117__assoc_sub_state12__make_readyEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__117__assoc_sub_state13set_exceptionESt13exception_ptr', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__117__assoc_sub_state16__on_zero_sharedEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__117__assoc_sub_state24set_value_at_thread_exitEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__117__assoc_sub_state28set_exception_at_thread_exitESt13exception_ptr', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__117__assoc_sub_state4copyEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__117__assoc_sub_state4waitEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__117__assoc_sub_state9__executeEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__117__assoc_sub_state9set_valueEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__117__widen_from_utf8ILm16EED0Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__117__widen_from_utf8ILm16EED1Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__117__widen_from_utf8ILm16EED2Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__117__widen_from_utf8ILm32EED0Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__117__widen_from_utf8ILm32EED1Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__117__widen_from_utf8ILm32EED2Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__117declare_reachableEPv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__117iostream_categoryEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__117moneypunct_bynameIcLb0EE4initEPKc', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__117moneypunct_bynameIcLb1EE4initEPKc', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__117moneypunct_bynameIwLb0EE4initEPKc', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__117moneypunct_bynameIwLb1EE4initEPKc', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__118__time_get_storageIcE4initERKNS_5ctypeIcEE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__118__time_get_storageIcE9__analyzeEcRKNS_5ctypeIcEE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__118__time_get_storageIcEC1EPKc', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__118__time_get_storageIcEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__118__time_get_storageIcEC2EPKc', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__118__time_get_storageIcEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__118__time_get_storageIwE4initERKNS_5ctypeIwEE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__118__time_get_storageIwE9__analyzeEcRKNS_5ctypeIwEE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__118__time_get_storageIwEC1EPKc', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__118__time_get_storageIwEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__118__time_get_storageIwEC2EPKc', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__118__time_get_storageIwEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__118condition_variable10notify_allEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__118condition_variable10notify_oneEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__118condition_variable15__do_timed_waitERNS_11unique_lockINS_5mutexEEENS_6chrono10time_pointINS5_12system_clockENS5_8durationIxNS_5ratioILl1ELl1000000000EEEEEEE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__118condition_variable4waitERNS_11unique_lockINS_5mutexEEE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__118condition_variableD1Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__118condition_variableD2Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__118get_pointer_safetyEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__118shared_timed_mutex11lock_sharedEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__118shared_timed_mutex13unlock_sharedEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__118shared_timed_mutex15try_lock_sharedEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__118shared_timed_mutex4lockEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__118shared_timed_mutex6unlockEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__118shared_timed_mutex8try_lockEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__118shared_timed_mutexC1Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__118shared_timed_mutexC2Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__119__shared_mutex_base11lock_sharedEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__119__shared_mutex_base13unlock_sharedEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__119__shared_mutex_base15try_lock_sharedEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__119__shared_mutex_base4lockEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__119__shared_mutex_base6unlockEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__119__shared_mutex_base8try_lockEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__119__shared_mutex_baseC1Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__119__shared_mutex_baseC2Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__119__shared_weak_count10__add_weakEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__119__shared_weak_count12__add_sharedEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__119__shared_weak_count14__release_weakEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__119__shared_weak_count16__release_sharedEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__119__shared_weak_count4lockEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__119__shared_weak_countD0Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__119__shared_weak_countD1Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__119__shared_weak_countD2Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__119__thread_local_dataEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__119declare_no_pointersEPcm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__119piecewise_constructE', 'is_defined': True, 'type': 'OBJECT', 'size': 1} -{'name': '_ZNSt3__120__get_collation_nameEPKc', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__120__throw_system_errorEiPKc', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__121__throw_runtime_errorEPKc', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__121__undeclare_reachableEPv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__121recursive_timed_mutex4lockEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__121recursive_timed_mutex6unlockEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__121recursive_timed_mutex8try_lockEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__121recursive_timed_mutexC1Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__121recursive_timed_mutexC2Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__121recursive_timed_mutexD1Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__121recursive_timed_mutexD2Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__121undeclare_no_pointersEPcm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__123__libcpp_debug_functionE', 'is_defined': True, 'type': 'OBJECT', 'size': 8} -{'name': '_ZNSt3__124__libcpp_debug_exceptionC1ERKNS_19__libcpp_debug_infoE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__124__libcpp_debug_exceptionC1ERKS0_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__124__libcpp_debug_exceptionC1Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__124__libcpp_debug_exceptionC2ERKNS_19__libcpp_debug_infoE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__124__libcpp_debug_exceptionC2ERKS0_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__124__libcpp_debug_exceptionC2Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__124__libcpp_debug_exceptionD0Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__124__libcpp_debug_exceptionD1Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__124__libcpp_debug_exceptionD2Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__125notify_all_at_thread_exitERNS_18condition_variableENS_11unique_lockINS_5mutexEEE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIaaEEPaEEbT0_S5_T_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIccEEPcEEbT0_S5_T_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIddEEPdEEbT0_S5_T_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIeeEEPeEEbT0_S5_T_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIffEEPfEEbT0_S5_T_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIhhEEPhEEbT0_S5_T_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIiiEEPiEEbT0_S5_T_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIjjEEPjEEbT0_S5_T_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIllEEPlEEbT0_S5_T_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__127__insertion_sort_incompleteIRNS_6__lessImmEEPmEEbT0_S5_T_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIssEEPsEEbT0_S5_T_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIttEEPtEEbT0_S5_T_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIwwEEPwEEbT0_S5_T_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIxxEEPxEEbT0_S5_T_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIyyEEPyEEbT0_S5_T_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__127__libcpp_set_debug_functionEPFvRKNS_19__libcpp_debug_infoEE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__129__libcpp_abort_debug_functionERKNS_19__libcpp_debug_infoE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__129__libcpp_throw_debug_functionERKNS_19__libcpp_debug_infoE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__13cinE', 'is_defined': True, 'type': 'OBJECT', 'size': 168} -{'name': '_ZNSt3__14cerrE', 'is_defined': True, 'type': 'OBJECT', 'size': 160} -{'name': '_ZNSt3__14clogE', 'is_defined': True, 'type': 'OBJECT', 'size': 160} -{'name': '_ZNSt3__14coutE', 'is_defined': True, 'type': 'OBJECT', 'size': 160} -{'name': '_ZNSt3__14stodERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__14stodERKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEEPm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__14stofERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__14stofERKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEEPm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__14stoiERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPmi', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__14stoiERKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEEPmi', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__14stolERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPmi', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__14stolERKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEEPmi', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__14wcinE', 'is_defined': True, 'type': 'OBJECT', 'size': 168} -{'name': '_ZNSt3__15alignEmmRPvRm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__15ctypeIcE13classic_tableEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__15ctypeIcE21__classic_lower_tableEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__15ctypeIcE21__classic_upper_tableEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__15ctypeIcE2idE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} -{'name': '_ZNSt3__15ctypeIcEC1EPKtbm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__15ctypeIcEC2EPKtbm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__15ctypeIcED0Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__15ctypeIcED1Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__15ctypeIcED2Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__15ctypeIwE2idE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} -{'name': '_ZNSt3__15ctypeIwED0Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__15ctypeIwED1Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__15ctypeIwED2Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__15mutex4lockEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__15mutex6unlockEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__15mutex8try_lockEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__15mutexD1Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__15mutexD2Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__15stoldERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__15stoldERKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEEPm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__15stollERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPmi', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__15stollERKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEEPmi', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__15stoulERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPmi', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__15stoulERKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEEPmi', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__15wcerrE', 'is_defined': True, 'type': 'OBJECT', 'size': 160} -{'name': '_ZNSt3__15wclogE', 'is_defined': True, 'type': 'OBJECT', 'size': 160} -{'name': '_ZNSt3__15wcoutE', 'is_defined': True, 'type': 'OBJECT', 'size': 160} -{'name': '_ZNSt3__16__clocEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__16__itoa8__u64toaEmPc', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__16__itoa8__u32toaEjPc', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__16__sortIRNS_6__lessIaaEEPaEEvT0_S5_T_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__16__sortIRNS_6__lessIccEEPcEEvT0_S5_T_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__16__sortIRNS_6__lessIddEEPdEEvT0_S5_T_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__16__sortIRNS_6__lessIeeEEPeEEvT0_S5_T_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__16__sortIRNS_6__lessIffEEPfEEvT0_S5_T_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__16__sortIRNS_6__lessIhhEEPhEEvT0_S5_T_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__16__sortIRNS_6__lessIiiEEPiEEvT0_S5_T_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__16__sortIRNS_6__lessIjjEEPjEEvT0_S5_T_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__16__sortIRNS_6__lessIllEEPlEEvT0_S5_T_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__16__sortIRNS_6__lessImmEEPmEEvT0_S5_T_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__16__sortIRNS_6__lessIssEEPsEEvT0_S5_T_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__16__sortIRNS_6__lessIttEEPtEEvT0_S5_T_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__16__sortIRNS_6__lessIwwEEPwEEvT0_S5_T_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__16__sortIRNS_6__lessIxxEEPxEEvT0_S5_T_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__16__sortIRNS_6__lessIyyEEPyEEvT0_S5_T_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__16chrono12steady_clock3nowEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__16chrono12steady_clock9is_steadyE', 'is_defined': True, 'type': 'OBJECT', 'size': 1} -{'name': '_ZNSt3__16chrono12system_clock11from_time_tEl', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__16chrono12system_clock3nowEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__16chrono12system_clock9is_steadyE', 'is_defined': True, 'type': 'OBJECT', 'size': 1} -{'name': '_ZNSt3__16chrono12system_clock9to_time_tERKNS0_10time_pointIS1_NS0_8durationIxNS_5ratioILl1ELl1000000EEEEEEE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__16futureIvE3getEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__16futureIvEC1EPNS_17__assoc_sub_stateE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__16futureIvEC2EPNS_17__assoc_sub_stateE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__16futureIvED1Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__16futureIvED2Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__16gslice6__initEm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__16locale14__install_ctorERKS0_PNS0_5facetEl', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__16locale2id5__getEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__16locale2id6__initEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__16locale2id9__next_idE', 'is_defined': True, 'type': 'OBJECT', 'size': 4} -{'name': '_ZNSt3__16locale3allE', 'is_defined': True, 'type': 'OBJECT', 'size': 4} -{'name': '_ZNSt3__16locale4noneE', 'is_defined': True, 'type': 'OBJECT', 'size': 4} -{'name': '_ZNSt3__16locale4timeE', 'is_defined': True, 'type': 'OBJECT', 'size': 4} -{'name': '_ZNSt3__16locale5ctypeE', 'is_defined': True, 'type': 'OBJECT', 'size': 4} -{'name': '_ZNSt3__16locale5facet16__on_zero_sharedEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__16locale5facetD0Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__16locale5facetD1Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__16locale5facetD2Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__16locale6globalERKS0_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__16locale7classicEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__16locale7collateE', 'is_defined': True, 'type': 'OBJECT', 'size': 4} -{'name': '_ZNSt3__16locale7numericE', 'is_defined': True, 'type': 'OBJECT', 'size': 4} -{'name': '_ZNSt3__16locale8__globalEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__16locale8messagesE', 'is_defined': True, 'type': 'OBJECT', 'size': 4} -{'name': '_ZNSt3__16locale8monetaryE', 'is_defined': True, 'type': 'OBJECT', 'size': 4} -{'name': '_ZNSt3__16localeC1EPKc', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__16localeC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__16localeC1ERKS0_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__16localeC1ERKS0_PKci', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__16localeC1ERKS0_RKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEi', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__16localeC1ERKS0_S2_i', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__16localeC1Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__16localeC2EPKc', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__16localeC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__16localeC2ERKS0_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__16localeC2ERKS0_PKci', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__16localeC2ERKS0_RKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEi', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__16localeC2ERKS0_S2_i', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__16localeC2Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__16localeD1Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__16localeD2Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__16localeaSERKS0_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__16stoullERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPmi', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__16stoullERKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEEPmi', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__16thread20hardware_concurrencyEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__16thread4joinEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__16thread6detachEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__16threadD1Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__16threadD2Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__17__sort5IRNS_6__lessIeeEEPeEEjT0_S5_S5_S5_S5_T_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__17codecvtIDic11__mbstate_tE2idE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} -{'name': '_ZNSt3__17codecvtIDic11__mbstate_tED0Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__17codecvtIDic11__mbstate_tED1Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__17codecvtIDic11__mbstate_tED2Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__17codecvtIDsc11__mbstate_tE2idE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} -{'name': '_ZNSt3__17codecvtIDsc11__mbstate_tED0Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__17codecvtIDsc11__mbstate_tED1Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__17codecvtIDsc11__mbstate_tED2Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__17codecvtIcc11__mbstate_tE2idE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} -{'name': '_ZNSt3__17codecvtIcc11__mbstate_tED0Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__17codecvtIcc11__mbstate_tED1Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__17codecvtIcc11__mbstate_tED2Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__17codecvtIwc11__mbstate_tE2idE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} -{'name': '_ZNSt3__17codecvtIwc11__mbstate_tEC1EPKcm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__17codecvtIwc11__mbstate_tEC1Em', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__17codecvtIwc11__mbstate_tEC2EPKcm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__17codecvtIwc11__mbstate_tEC2Em', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__17codecvtIwc11__mbstate_tED0Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__17codecvtIwc11__mbstate_tED1Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__17codecvtIwc11__mbstate_tED2Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__17collateIcE2idE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} -{'name': '_ZNSt3__17collateIcED0Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__17collateIcED1Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__17collateIcED2Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__17collateIwE2idE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} -{'name': '_ZNSt3__17collateIwED0Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__17collateIwED1Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__17collateIwED2Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE2idE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} -{'name': '_ZNSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE2idE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} -{'name': '_ZNSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE2idE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} -{'name': '_ZNSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE2idE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} -{'name': '_ZNSt3__17promiseIvE10get_futureEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__17promiseIvE13set_exceptionESt13exception_ptr', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__17promiseIvE24set_value_at_thread_exitEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__17promiseIvE28set_exception_at_thread_exitESt13exception_ptr', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__17promiseIvE9set_valueEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__17promiseIvEC1Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__17promiseIvEC2Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__17promiseIvED1Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__17promiseIvED2Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__18__c_node5__addEPNS_8__i_nodeE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__18__c_nodeD0Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__18__c_nodeD1Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__18__c_nodeD2Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__18__get_dbEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__18__i_nodeD1Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__18__i_nodeD2Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__18__rs_getEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__18__sp_mut4lockEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__18__sp_mut6unlockEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__18ios_base10floatfieldE', 'is_defined': True, 'type': 'OBJECT', 'size': 4} -{'name': '_ZNSt3__18ios_base10scientificE', 'is_defined': True, 'type': 'OBJECT', 'size': 4} -{'name': '_ZNSt3__18ios_base11adjustfieldE', 'is_defined': True, 'type': 'OBJECT', 'size': 4} -{'name': '_ZNSt3__18ios_base15sync_with_stdioEb', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__18ios_base16__call_callbacksENS0_5eventE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__18ios_base17register_callbackEPFvNS0_5eventERS0_iEi', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__18ios_base2inE', 'is_defined': True, 'type': 'OBJECT', 'size': 4} -{'name': '_ZNSt3__18ios_base33__set_badbit_and_consider_rethrowEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__18ios_base34__set_failbit_and_consider_rethrowEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__18ios_base3appE', 'is_defined': True, 'type': 'OBJECT', 'size': 4} -{'name': '_ZNSt3__18ios_base3ateE', 'is_defined': True, 'type': 'OBJECT', 'size': 4} -{'name': '_ZNSt3__18ios_base3decE', 'is_defined': True, 'type': 'OBJECT', 'size': 4} -{'name': '_ZNSt3__18ios_base3hexE', 'is_defined': True, 'type': 'OBJECT', 'size': 4} -{'name': '_ZNSt3__18ios_base3octE', 'is_defined': True, 'type': 'OBJECT', 'size': 4} -{'name': '_ZNSt3__18ios_base3outE', 'is_defined': True, 'type': 'OBJECT', 'size': 4} -{'name': '_ZNSt3__18ios_base4InitC1Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__18ios_base4InitC2Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__18ios_base4InitD1Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__18ios_base4InitD2Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__18ios_base4initEPv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__18ios_base4leftE', 'is_defined': True, 'type': 'OBJECT', 'size': 4} -{'name': '_ZNSt3__18ios_base4moveERS0_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__18ios_base4swapERS0_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__18ios_base5clearEj', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__18ios_base5fixedE', 'is_defined': True, 'type': 'OBJECT', 'size': 4} -{'name': '_ZNSt3__18ios_base5imbueERKNS_6localeE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__18ios_base5iwordEi', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__18ios_base5pwordEi', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__18ios_base5rightE', 'is_defined': True, 'type': 'OBJECT', 'size': 4} -{'name': '_ZNSt3__18ios_base5truncE', 'is_defined': True, 'type': 'OBJECT', 'size': 4} -{'name': '_ZNSt3__18ios_base6badbitE', 'is_defined': True, 'type': 'OBJECT', 'size': 4} -{'name': '_ZNSt3__18ios_base6binaryE', 'is_defined': True, 'type': 'OBJECT', 'size': 4} -{'name': '_ZNSt3__18ios_base6eofbitE', 'is_defined': True, 'type': 'OBJECT', 'size': 4} -{'name': '_ZNSt3__18ios_base6skipwsE', 'is_defined': True, 'type': 'OBJECT', 'size': 4} -{'name': '_ZNSt3__18ios_base6xallocEv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__18ios_base7copyfmtERKS0_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__18ios_base7failbitE', 'is_defined': True, 'type': 'OBJECT', 'size': 4} -{'name': '_ZNSt3__18ios_base7failureC1EPKcRKNS_10error_codeE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__18ios_base7failureC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERKNS_10error_codeE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__18ios_base7failureC2EPKcRKNS_10error_codeE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__18ios_base7failureC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERKNS_10error_codeE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__18ios_base7failureD0Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__18ios_base7failureD1Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__18ios_base7failureD2Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__18ios_base7goodbitE', 'is_defined': True, 'type': 'OBJECT', 'size': 4} -{'name': '_ZNSt3__18ios_base7showposE', 'is_defined': True, 'type': 'OBJECT', 'size': 4} -{'name': '_ZNSt3__18ios_base7unitbufE', 'is_defined': True, 'type': 'OBJECT', 'size': 4} -{'name': '_ZNSt3__18ios_base8internalE', 'is_defined': True, 'type': 'OBJECT', 'size': 4} -{'name': '_ZNSt3__18ios_base8showbaseE', 'is_defined': True, 'type': 'OBJECT', 'size': 4} -{'name': '_ZNSt3__18ios_base9__xindex_E', 'is_defined': True, 'type': 'OBJECT', 'size': 4} -{'name': '_ZNSt3__18ios_base9basefieldE', 'is_defined': True, 'type': 'OBJECT', 'size': 4} -{'name': '_ZNSt3__18ios_base9boolalphaE', 'is_defined': True, 'type': 'OBJECT', 'size': 4} -{'name': '_ZNSt3__18ios_base9showpointE', 'is_defined': True, 'type': 'OBJECT', 'size': 4} -{'name': '_ZNSt3__18ios_base9uppercaseE', 'is_defined': True, 'type': 'OBJECT', 'size': 4} -{'name': '_ZNSt3__18ios_baseD0Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__18ios_baseD1Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__18ios_baseD2Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__18messagesIcE2idE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} -{'name': '_ZNSt3__18messagesIwE2idE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} -{'name': '_ZNSt3__18numpunctIcE2idE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} -{'name': '_ZNSt3__18numpunctIcEC1Em', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__18numpunctIcEC2Em', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__18numpunctIcED0Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__18numpunctIcED1Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__18numpunctIcED2Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__18numpunctIwE2idE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} -{'name': '_ZNSt3__18numpunctIwEC1Em', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__18numpunctIwEC2Em', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__18numpunctIwED0Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__18numpunctIwED1Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__18numpunctIwED2Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE2idE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} -{'name': '_ZNSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE2idE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} -{'name': '_ZNSt3__18time_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE2idE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} -{'name': '_ZNSt3__18time_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE2idE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} -{'name': '_ZNSt3__18valarrayImE6resizeEmm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__18valarrayImEC1Em', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__18valarrayImEC2Em', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__18valarrayImED1Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__18valarrayImED2Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__19__num_getIcE17__stage2_int_loopEciPcRS2_RjcRKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPjRSD_S2_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__19__num_getIcE17__stage2_int_prepERNS_8ios_baseEPcRc', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__19__num_getIcE19__stage2_float_loopEcRbRcPcRS4_ccRKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPjRSE_RjS4_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__19__num_getIcE19__stage2_float_prepERNS_8ios_baseEPcRcS5_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__19__num_getIwE17__stage2_int_loopEwiPcRS2_RjwRKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPjRSD_Pw', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__19__num_getIwE17__stage2_int_prepERNS_8ios_baseEPwRw', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__19__num_getIwE19__stage2_float_loopEwRbRcPcRS4_wwRKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPjRSE_RjPw', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__19__num_getIwE19__stage2_float_prepERNS_8ios_baseEPwRwS5_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__19__num_putIcE21__widen_and_group_intEPcS2_S2_S2_RS2_S3_RKNS_6localeE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__19__num_putIcE23__widen_and_group_floatEPcS2_S2_S2_RS2_S3_RKNS_6localeE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__19__num_putIwE21__widen_and_group_intEPcS2_S2_PwRS3_S4_RKNS_6localeE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__19__num_putIwE23__widen_and_group_floatEPcS2_S2_PwRS3_S4_RKNS_6localeE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__19basic_iosIcNS_11char_traitsIcEEE7copyfmtERKS3_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__19basic_iosIcNS_11char_traitsIcEEED0Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__19basic_iosIcNS_11char_traitsIcEEED1Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__19basic_iosIcNS_11char_traitsIcEEED2Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__19basic_iosIwNS_11char_traitsIwEEE7copyfmtERKS3_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__19basic_iosIwNS_11char_traitsIwEEED0Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__19basic_iosIwNS_11char_traitsIwEEED1Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__19basic_iosIwNS_11char_traitsIwEEED2Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__19money_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE2idE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} -{'name': '_ZNSt3__19money_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE8__do_getERS4_S4_bRKNS_6localeEjRjRbRKNS_5ctypeIcEERNS_10unique_ptrIcPFvPvEEERPcSM_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__19money_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE2idE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} -{'name': '_ZNSt3__19money_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE8__do_getERS4_S4_bRKNS_6localeEjRjRbRKNS_5ctypeIwEERNS_10unique_ptrIwPFvPvEEERPwSM_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__19money_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE2idE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} -{'name': '_ZNSt3__19money_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE2idE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} -{'name': '_ZNSt3__19strstreamD0Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__19strstreamD1Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__19strstreamD2Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__19to_stringEd', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__19to_stringEe', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__19to_stringEf', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__19to_stringEi', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__19to_stringEj', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__19to_stringEl', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__19to_stringEm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__19to_stringEx', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__19to_stringEy', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__1plIcNS_11char_traitsIcEENS_9allocatorIcEEEENS_12basic_stringIT_T0_T1_EEPKS6_RKS9_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt8bad_castC1Ev', 'is_defined': False, 'type': 'FUNC'} -{'name': '_ZNSt8bad_castD1Ev', 'is_defined': False, 'type': 'FUNC'} -{'name': '_ZNSt8bad_castD2Ev', 'is_defined': False, 'type': 'FUNC'} -{'name': '_ZNSt9bad_allocC1Ev', 'is_defined': False, 'type': 'FUNC'} -{'name': '_ZNSt9bad_allocD1Ev', 'is_defined': False, 'type': 'FUNC'} -{'name': '_ZNSt9exceptionD2Ev', 'is_defined': False, 'type': 'FUNC'} -{'name': '_ZSt15get_new_handlerv', 'is_defined': False, 'type': 'FUNC'} -{'name': '_ZSt17__throw_bad_allocv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZSt17current_exceptionv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZSt17rethrow_exceptionSt13exception_ptr', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZSt18uncaught_exceptionv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZSt19uncaught_exceptionsv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZSt7nothrow', 'is_defined': True, 'type': 'OBJECT', 'size': 1} -{'name': '_ZSt9terminatev', 'is_defined': False, 'type': 'FUNC'} -{'name': '_ZTCNSt3__110istrstreamE0_NS_13basic_istreamIcNS_11char_traitsIcEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 80} -{'name': '_ZTCNSt3__110ostrstreamE0_NS_13basic_ostreamIcNS_11char_traitsIcEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 80} -{'name': '_ZTCNSt3__114basic_iostreamIcNS_11char_traitsIcEEEE0_NS_13basic_istreamIcS2_EE', 'is_defined': True, 'type': 'OBJECT', 'size': 80} -{'name': '_ZTCNSt3__114basic_iostreamIcNS_11char_traitsIcEEEE16_NS_13basic_ostreamIcS2_EE', 'is_defined': True, 'type': 'OBJECT', 'size': 80} -{'name': '_ZTCNSt3__19strstreamE0_NS_13basic_istreamIcNS_11char_traitsIcEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 80} -{'name': '_ZTCNSt3__19strstreamE0_NS_14basic_iostreamIcNS_11char_traitsIcEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 120} -{'name': '_ZTCNSt3__19strstreamE16_NS_13basic_ostreamIcNS_11char_traitsIcEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 80} -{'name': '_ZTINSt12experimental15fundamentals_v112bad_any_castE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} -{'name': '_ZTINSt12experimental19bad_optional_accessE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} -{'name': '_ZTINSt3__110__time_getE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} -{'name': '_ZTINSt3__110__time_putE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} -{'name': '_ZTINSt3__110ctype_baseE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} -{'name': '_ZTINSt3__110istrstreamE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} -{'name': '_ZTINSt3__110money_baseE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} -{'name': '_ZTINSt3__110moneypunctIcLb0EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 56} -{'name': '_ZTINSt3__110moneypunctIcLb1EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 56} -{'name': '_ZTINSt3__110moneypunctIwLb0EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 56} -{'name': '_ZTINSt3__110moneypunctIwLb1EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 56} -{'name': '_ZTINSt3__110ostrstreamE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} -{'name': '_ZTINSt3__111__money_getIcEE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} -{'name': '_ZTINSt3__111__money_getIwEE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} -{'name': '_ZTINSt3__111__money_putIcEE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} -{'name': '_ZTINSt3__111__money_putIwEE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} -{'name': '_ZTINSt3__111regex_errorE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} -{'name': '_ZTINSt3__112bad_weak_ptrE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} -{'name': '_ZTINSt3__112codecvt_baseE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} -{'name': '_ZTINSt3__112ctype_bynameIcEE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} -{'name': '_ZTINSt3__112ctype_bynameIwEE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} -{'name': '_ZTINSt3__112future_errorE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} -{'name': '_ZTINSt3__112strstreambufE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} -{'name': '_ZTINSt3__112system_errorE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} -{'name': '_ZTINSt3__113basic_istreamIcNS_11char_traitsIcEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 40} -{'name': '_ZTINSt3__113basic_istreamIwNS_11char_traitsIwEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 40} -{'name': '_ZTINSt3__113basic_ostreamIcNS_11char_traitsIcEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 40} -{'name': '_ZTINSt3__113basic_ostreamIwNS_11char_traitsIwEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 40} -{'name': '_ZTINSt3__113messages_baseE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} -{'name': '_ZTINSt3__114__codecvt_utf8IDiEE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} -{'name': '_ZTINSt3__114__codecvt_utf8IDsEE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} -{'name': '_ZTINSt3__114__codecvt_utf8IwEE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} -{'name': '_ZTINSt3__114__num_get_baseE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} -{'name': '_ZTINSt3__114__num_put_baseE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} -{'name': '_ZTINSt3__114__shared_countE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} -{'name': '_ZTINSt3__114basic_iostreamIcNS_11char_traitsIcEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 56} -{'name': '_ZTINSt3__114codecvt_bynameIDic11__mbstate_tEE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} -{'name': '_ZTINSt3__114codecvt_bynameIDsc11__mbstate_tEE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} -{'name': '_ZTINSt3__114codecvt_bynameIcc11__mbstate_tEE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} -{'name': '_ZTINSt3__114codecvt_bynameIwc11__mbstate_tEE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} -{'name': '_ZTINSt3__114collate_bynameIcEE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} -{'name': '_ZTINSt3__114collate_bynameIwEE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} -{'name': '_ZTINSt3__114error_categoryE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} -{'name': '_ZTINSt3__115__codecvt_utf16IDiLb0EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} -{'name': '_ZTINSt3__115__codecvt_utf16IDiLb1EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} -{'name': '_ZTINSt3__115__codecvt_utf16IDsLb0EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} -{'name': '_ZTINSt3__115__codecvt_utf16IDsLb1EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} -{'name': '_ZTINSt3__115__codecvt_utf16IwLb0EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} -{'name': '_ZTINSt3__115__codecvt_utf16IwLb1EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} -{'name': '_ZTINSt3__115basic_streambufIcNS_11char_traitsIcEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} -{'name': '_ZTINSt3__115basic_streambufIwNS_11char_traitsIwEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} -{'name': '_ZTINSt3__115messages_bynameIcEE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} -{'name': '_ZTINSt3__115messages_bynameIwEE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} -{'name': '_ZTINSt3__115numpunct_bynameIcEE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} -{'name': '_ZTINSt3__115numpunct_bynameIwEE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} -{'name': '_ZTINSt3__115time_get_bynameIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 56} -{'name': '_ZTINSt3__115time_get_bynameIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 56} -{'name': '_ZTINSt3__115time_put_bynameIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} -{'name': '_ZTINSt3__115time_put_bynameIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} -{'name': '_ZTINSt3__116__narrow_to_utf8ILm16EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} -{'name': '_ZTINSt3__116__narrow_to_utf8ILm32EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} -{'name': '_ZTINSt3__117__assoc_sub_stateE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} -{'name': '_ZTINSt3__117__widen_from_utf8ILm16EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} -{'name': '_ZTINSt3__117__widen_from_utf8ILm32EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} -{'name': '_ZTINSt3__117moneypunct_bynameIcLb0EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} -{'name': '_ZTINSt3__117moneypunct_bynameIcLb1EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} -{'name': '_ZTINSt3__117moneypunct_bynameIwLb0EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} -{'name': '_ZTINSt3__117moneypunct_bynameIwLb1EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} -{'name': '_ZTINSt3__118__time_get_storageIcEE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} -{'name': '_ZTINSt3__118__time_get_storageIwEE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} -{'name': '_ZTINSt3__119__shared_weak_countE', 'is_defined': True, 'type': 'OBJECT', 'size': 40} -{'name': '_ZTINSt3__120__codecvt_utf8_utf16IDiEE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} -{'name': '_ZTINSt3__120__codecvt_utf8_utf16IDsEE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} -{'name': '_ZTINSt3__120__codecvt_utf8_utf16IwEE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} -{'name': '_ZTINSt3__120__time_get_c_storageIcEE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} -{'name': '_ZTINSt3__120__time_get_c_storageIwEE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} -{'name': '_ZTINSt3__124__libcpp_debug_exceptionE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} -{'name': '_ZTINSt3__15ctypeIcEE', 'is_defined': True, 'type': 'OBJECT', 'size': 56} -{'name': '_ZTINSt3__15ctypeIwEE', 'is_defined': True, 'type': 'OBJECT', 'size': 56} -{'name': '_ZTINSt3__16locale5facetE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} -{'name': '_ZTINSt3__17codecvtIDic11__mbstate_tEE', 'is_defined': True, 'type': 'OBJECT', 'size': 56} -{'name': '_ZTINSt3__17codecvtIDsc11__mbstate_tEE', 'is_defined': True, 'type': 'OBJECT', 'size': 56} -{'name': '_ZTINSt3__17codecvtIcc11__mbstate_tEE', 'is_defined': True, 'type': 'OBJECT', 'size': 56} -{'name': '_ZTINSt3__17codecvtIwc11__mbstate_tEE', 'is_defined': True, 'type': 'OBJECT', 'size': 56} -{'name': '_ZTINSt3__17collateIcEE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} -{'name': '_ZTINSt3__17collateIwEE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} -{'name': '_ZTINSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 56} -{'name': '_ZTINSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 56} -{'name': '_ZTINSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 56} -{'name': '_ZTINSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 56} -{'name': '_ZTINSt3__18__c_nodeE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} -{'name': '_ZTINSt3__18ios_base7failureE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} -{'name': '_ZTINSt3__18ios_baseE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} -{'name': '_ZTINSt3__18messagesIcEE', 'is_defined': True, 'type': 'OBJECT', 'size': 56} -{'name': '_ZTINSt3__18messagesIwEE', 'is_defined': True, 'type': 'OBJECT', 'size': 56} -{'name': '_ZTINSt3__18numpunctIcEE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} -{'name': '_ZTINSt3__18numpunctIwEE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} -{'name': '_ZTINSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 72} -{'name': '_ZTINSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 72} -{'name': '_ZTINSt3__18time_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 56} -{'name': '_ZTINSt3__18time_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 56} -{'name': '_ZTINSt3__19__num_getIcEE', 'is_defined': True, 'type': 'OBJECT', 'size': 40} -{'name': '_ZTINSt3__19__num_getIwEE', 'is_defined': True, 'type': 'OBJECT', 'size': 40} -{'name': '_ZTINSt3__19__num_putIcEE', 'is_defined': True, 'type': 'OBJECT', 'size': 40} -{'name': '_ZTINSt3__19__num_putIwEE', 'is_defined': True, 'type': 'OBJECT', 'size': 40} -{'name': '_ZTINSt3__19basic_iosIcNS_11char_traitsIcEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} -{'name': '_ZTINSt3__19basic_iosIwNS_11char_traitsIwEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} -{'name': '_ZTINSt3__19money_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 56} -{'name': '_ZTINSt3__19money_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 56} -{'name': '_ZTINSt3__19money_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 56} -{'name': '_ZTINSt3__19money_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 56} -{'name': '_ZTINSt3__19strstreamE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} -{'name': '_ZTINSt3__19time_baseE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} -{'name': '_ZTISt11logic_error', 'is_defined': False, 'type': 'OBJECT', 'size': 0} -{'name': '_ZTISt12bad_any_cast', 'is_defined': True, 'type': 'OBJECT', 'size': 24} -{'name': '_ZTISt12length_error', 'is_defined': False, 'type': 'OBJECT', 'size': 0} -{'name': '_ZTISt12out_of_range', 'is_defined': False, 'type': 'OBJECT', 'size': 0} -{'name': '_ZTISt13runtime_error', 'is_defined': False, 'type': 'OBJECT', 'size': 0} -{'name': '_ZTISt14overflow_error', 'is_defined': False, 'type': 'OBJECT', 'size': 0} -{'name': '_ZTISt16invalid_argument', 'is_defined': False, 'type': 'OBJECT', 'size': 0} -{'name': '_ZTISt16nested_exception', 'is_defined': True, 'type': 'OBJECT', 'size': 16} -{'name': '_ZTISt18bad_variant_access', 'is_defined': True, 'type': 'OBJECT', 'size': 24} -{'name': '_ZTISt19bad_optional_access', 'is_defined': True, 'type': 'OBJECT', 'size': 24} -{'name': '_ZTISt8bad_cast', 'is_defined': False, 'type': 'OBJECT', 'size': 0} -{'name': '_ZTISt9bad_alloc', 'is_defined': False, 'type': 'OBJECT', 'size': 0} -{'name': '_ZTISt9exception', 'is_defined': False, 'type': 'OBJECT', 'size': 0} -{'name': '_ZTSNSt12experimental15fundamentals_v112bad_any_castE', 'is_defined': True, 'type': 'OBJECT', 'size': 50} -{'name': '_ZTSNSt12experimental19bad_optional_accessE', 'is_defined': True, 'type': 'OBJECT', 'size': 40} -{'name': '_ZTSNSt3__110__time_getE', 'is_defined': True, 'type': 'OBJECT', 'size': 21} -{'name': '_ZTSNSt3__110__time_putE', 'is_defined': True, 'type': 'OBJECT', 'size': 21} -{'name': '_ZTSNSt3__110ctype_baseE', 'is_defined': True, 'type': 'OBJECT', 'size': 21} -{'name': '_ZTSNSt3__110istrstreamE', 'is_defined': True, 'type': 'OBJECT', 'size': 21} -{'name': '_ZTSNSt3__110money_baseE', 'is_defined': True, 'type': 'OBJECT', 'size': 21} -{'name': '_ZTSNSt3__110moneypunctIcLb0EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 28} -{'name': '_ZTSNSt3__110moneypunctIcLb1EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 28} -{'name': '_ZTSNSt3__110moneypunctIwLb0EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 28} -{'name': '_ZTSNSt3__110moneypunctIwLb1EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 28} -{'name': '_ZTSNSt3__110ostrstreamE', 'is_defined': True, 'type': 'OBJECT', 'size': 21} -{'name': '_ZTSNSt3__111__money_getIcEE', 'is_defined': True, 'type': 'OBJECT', 'size': 25} -{'name': '_ZTSNSt3__111__money_getIwEE', 'is_defined': True, 'type': 'OBJECT', 'size': 25} -{'name': '_ZTSNSt3__111__money_putIcEE', 'is_defined': True, 'type': 'OBJECT', 'size': 25} -{'name': '_ZTSNSt3__111__money_putIwEE', 'is_defined': True, 'type': 'OBJECT', 'size': 25} -{'name': '_ZTSNSt3__111regex_errorE', 'is_defined': True, 'type': 'OBJECT', 'size': 22} -{'name': '_ZTSNSt3__112bad_weak_ptrE', 'is_defined': True, 'type': 'OBJECT', 'size': 23} -{'name': '_ZTSNSt3__112codecvt_baseE', 'is_defined': True, 'type': 'OBJECT', 'size': 23} -{'name': '_ZTSNSt3__112ctype_bynameIcEE', 'is_defined': True, 'type': 'OBJECT', 'size': 26} -{'name': '_ZTSNSt3__112ctype_bynameIwEE', 'is_defined': True, 'type': 'OBJECT', 'size': 26} -{'name': '_ZTSNSt3__112future_errorE', 'is_defined': True, 'type': 'OBJECT', 'size': 23} -{'name': '_ZTSNSt3__112strstreambufE', 'is_defined': True, 'type': 'OBJECT', 'size': 23} -{'name': '_ZTSNSt3__112system_errorE', 'is_defined': True, 'type': 'OBJECT', 'size': 23} -{'name': '_ZTSNSt3__113basic_istreamIcNS_11char_traitsIcEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 47} -{'name': '_ZTSNSt3__113basic_istreamIwNS_11char_traitsIwEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 47} -{'name': '_ZTSNSt3__113basic_ostreamIcNS_11char_traitsIcEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 47} -{'name': '_ZTSNSt3__113basic_ostreamIwNS_11char_traitsIwEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 47} -{'name': '_ZTSNSt3__113messages_baseE', 'is_defined': True, 'type': 'OBJECT', 'size': 24} -{'name': '_ZTSNSt3__114__codecvt_utf8IDiEE', 'is_defined': True, 'type': 'OBJECT', 'size': 29} -{'name': '_ZTSNSt3__114__codecvt_utf8IDsEE', 'is_defined': True, 'type': 'OBJECT', 'size': 29} -{'name': '_ZTSNSt3__114__codecvt_utf8IwEE', 'is_defined': True, 'type': 'OBJECT', 'size': 28} -{'name': '_ZTSNSt3__114__num_get_baseE', 'is_defined': True, 'type': 'OBJECT', 'size': 25} -{'name': '_ZTSNSt3__114__num_put_baseE', 'is_defined': True, 'type': 'OBJECT', 'size': 25} -{'name': '_ZTSNSt3__114__shared_countE', 'is_defined': True, 'type': 'OBJECT', 'size': 25} -{'name': '_ZTSNSt3__114basic_iostreamIcNS_11char_traitsIcEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 48} -{'name': '_ZTSNSt3__114codecvt_bynameIDic11__mbstate_tEE', 'is_defined': True, 'type': 'OBJECT', 'size': 43} -{'name': '_ZTSNSt3__114codecvt_bynameIDsc11__mbstate_tEE', 'is_defined': True, 'type': 'OBJECT', 'size': 43} -{'name': '_ZTSNSt3__114codecvt_bynameIcc11__mbstate_tEE', 'is_defined': True, 'type': 'OBJECT', 'size': 42} -{'name': '_ZTSNSt3__114codecvt_bynameIwc11__mbstate_tEE', 'is_defined': True, 'type': 'OBJECT', 'size': 42} -{'name': '_ZTSNSt3__114collate_bynameIcEE', 'is_defined': True, 'type': 'OBJECT', 'size': 28} -{'name': '_ZTSNSt3__114collate_bynameIwEE', 'is_defined': True, 'type': 'OBJECT', 'size': 28} -{'name': '_ZTSNSt3__114error_categoryE', 'is_defined': True, 'type': 'OBJECT', 'size': 25} -{'name': '_ZTSNSt3__115__codecvt_utf16IDiLb0EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 34} -{'name': '_ZTSNSt3__115__codecvt_utf16IDiLb1EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 34} -{'name': '_ZTSNSt3__115__codecvt_utf16IDsLb0EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 34} -{'name': '_ZTSNSt3__115__codecvt_utf16IDsLb1EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 34} -{'name': '_ZTSNSt3__115__codecvt_utf16IwLb0EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 33} -{'name': '_ZTSNSt3__115__codecvt_utf16IwLb1EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 33} -{'name': '_ZTSNSt3__115basic_streambufIcNS_11char_traitsIcEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 49} -{'name': '_ZTSNSt3__115basic_streambufIwNS_11char_traitsIwEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 49} -{'name': '_ZTSNSt3__115messages_bynameIcEE', 'is_defined': True, 'type': 'OBJECT', 'size': 29} -{'name': '_ZTSNSt3__115messages_bynameIwEE', 'is_defined': True, 'type': 'OBJECT', 'size': 29} -{'name': '_ZTSNSt3__115numpunct_bynameIcEE', 'is_defined': True, 'type': 'OBJECT', 'size': 29} -{'name': '_ZTSNSt3__115numpunct_bynameIwEE', 'is_defined': True, 'type': 'OBJECT', 'size': 29} -{'name': '_ZTSNSt3__115time_get_bynameIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 77} -{'name': '_ZTSNSt3__115time_get_bynameIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 77} -{'name': '_ZTSNSt3__115time_put_bynameIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 77} -{'name': '_ZTSNSt3__115time_put_bynameIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 77} -{'name': '_ZTSNSt3__116__narrow_to_utf8ILm16EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 34} -{'name': '_ZTSNSt3__116__narrow_to_utf8ILm32EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 34} -{'name': '_ZTSNSt3__117__assoc_sub_stateE', 'is_defined': True, 'type': 'OBJECT', 'size': 28} -{'name': '_ZTSNSt3__117__widen_from_utf8ILm16EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 35} -{'name': '_ZTSNSt3__117__widen_from_utf8ILm32EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 35} -{'name': '_ZTSNSt3__117moneypunct_bynameIcLb0EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 35} -{'name': '_ZTSNSt3__117moneypunct_bynameIcLb1EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 35} -{'name': '_ZTSNSt3__117moneypunct_bynameIwLb0EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 35} -{'name': '_ZTSNSt3__117moneypunct_bynameIwLb1EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 35} -{'name': '_ZTSNSt3__118__time_get_storageIcEE', 'is_defined': True, 'type': 'OBJECT', 'size': 32} -{'name': '_ZTSNSt3__118__time_get_storageIwEE', 'is_defined': True, 'type': 'OBJECT', 'size': 32} -{'name': '_ZTSNSt3__119__shared_weak_countE', 'is_defined': True, 'type': 'OBJECT', 'size': 30} -{'name': '_ZTSNSt3__120__codecvt_utf8_utf16IDiEE', 'is_defined': True, 'type': 'OBJECT', 'size': 35} -{'name': '_ZTSNSt3__120__codecvt_utf8_utf16IDsEE', 'is_defined': True, 'type': 'OBJECT', 'size': 35} -{'name': '_ZTSNSt3__120__codecvt_utf8_utf16IwEE', 'is_defined': True, 'type': 'OBJECT', 'size': 34} -{'name': '_ZTSNSt3__120__time_get_c_storageIcEE', 'is_defined': True, 'type': 'OBJECT', 'size': 34} -{'name': '_ZTSNSt3__120__time_get_c_storageIwEE', 'is_defined': True, 'type': 'OBJECT', 'size': 34} -{'name': '_ZTSNSt3__124__libcpp_debug_exceptionE', 'is_defined': True, 'type': 'OBJECT', 'size': 35} -{'name': '_ZTSNSt3__15ctypeIcEE', 'is_defined': True, 'type': 'OBJECT', 'size': 18} -{'name': '_ZTSNSt3__15ctypeIwEE', 'is_defined': True, 'type': 'OBJECT', 'size': 18} -{'name': '_ZTSNSt3__16locale5facetE', 'is_defined': True, 'type': 'OBJECT', 'size': 22} -{'name': '_ZTSNSt3__17codecvtIDic11__mbstate_tEE', 'is_defined': True, 'type': 'OBJECT', 'size': 35} -{'name': '_ZTSNSt3__17codecvtIDsc11__mbstate_tEE', 'is_defined': True, 'type': 'OBJECT', 'size': 35} -{'name': '_ZTSNSt3__17codecvtIcc11__mbstate_tEE', 'is_defined': True, 'type': 'OBJECT', 'size': 34} -{'name': '_ZTSNSt3__17codecvtIwc11__mbstate_tEE', 'is_defined': True, 'type': 'OBJECT', 'size': 34} -{'name': '_ZTSNSt3__17collateIcEE', 'is_defined': True, 'type': 'OBJECT', 'size': 20} -{'name': '_ZTSNSt3__17collateIwEE', 'is_defined': True, 'type': 'OBJECT', 'size': 20} -{'name': '_ZTSNSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 68} -{'name': '_ZTSNSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 68} -{'name': '_ZTSNSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 68} -{'name': '_ZTSNSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 68} -{'name': '_ZTSNSt3__18__c_nodeE', 'is_defined': True, 'type': 'OBJECT', 'size': 18} -{'name': '_ZTSNSt3__18ios_base7failureE', 'is_defined': True, 'type': 'OBJECT', 'size': 26} -{'name': '_ZTSNSt3__18ios_baseE', 'is_defined': True, 'type': 'OBJECT', 'size': 18} -{'name': '_ZTSNSt3__18messagesIcEE', 'is_defined': True, 'type': 'OBJECT', 'size': 21} -{'name': '_ZTSNSt3__18messagesIwEE', 'is_defined': True, 'type': 'OBJECT', 'size': 21} -{'name': '_ZTSNSt3__18numpunctIcEE', 'is_defined': True, 'type': 'OBJECT', 'size': 21} -{'name': '_ZTSNSt3__18numpunctIwEE', 'is_defined': True, 'type': 'OBJECT', 'size': 21} -{'name': '_ZTSNSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 69} -{'name': '_ZTSNSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 69} -{'name': '_ZTSNSt3__18time_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 69} -{'name': '_ZTSNSt3__18time_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 69} -{'name': '_ZTSNSt3__19__num_getIcEE', 'is_defined': True, 'type': 'OBJECT', 'size': 22} -{'name': '_ZTSNSt3__19__num_getIwEE', 'is_defined': True, 'type': 'OBJECT', 'size': 22} -{'name': '_ZTSNSt3__19__num_putIcEE', 'is_defined': True, 'type': 'OBJECT', 'size': 22} -{'name': '_ZTSNSt3__19__num_putIwEE', 'is_defined': True, 'type': 'OBJECT', 'size': 22} -{'name': '_ZTSNSt3__19basic_iosIcNS_11char_traitsIcEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 42} -{'name': '_ZTSNSt3__19basic_iosIwNS_11char_traitsIwEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 42} -{'name': '_ZTSNSt3__19money_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 70} -{'name': '_ZTSNSt3__19money_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 70} -{'name': '_ZTSNSt3__19money_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 70} -{'name': '_ZTSNSt3__19money_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 70} -{'name': '_ZTSNSt3__19strstreamE', 'is_defined': True, 'type': 'OBJECT', 'size': 19} -{'name': '_ZTSNSt3__19time_baseE', 'is_defined': True, 'type': 'OBJECT', 'size': 19} -{'name': '_ZTSSt12bad_any_cast', 'is_defined': True, 'type': 'OBJECT', 'size': 17} -{'name': '_ZTSSt16nested_exception', 'is_defined': True, 'type': 'OBJECT', 'size': 21} -{'name': '_ZTSSt18bad_variant_access', 'is_defined': True, 'type': 'OBJECT', 'size': 23} -{'name': '_ZTSSt19bad_optional_access', 'is_defined': True, 'type': 'OBJECT', 'size': 24} -{'name': '_ZTTNSt3__110istrstreamE', 'is_defined': True, 'type': 'OBJECT', 'size': 32} -{'name': '_ZTTNSt3__110ostrstreamE', 'is_defined': True, 'type': 'OBJECT', 'size': 32} -{'name': '_ZTTNSt3__113basic_istreamIcNS_11char_traitsIcEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} -{'name': '_ZTTNSt3__113basic_istreamIwNS_11char_traitsIwEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} -{'name': '_ZTTNSt3__113basic_ostreamIcNS_11char_traitsIcEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} -{'name': '_ZTTNSt3__113basic_ostreamIwNS_11char_traitsIwEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} -{'name': '_ZTTNSt3__114basic_iostreamIcNS_11char_traitsIcEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 56} -{'name': '_ZTTNSt3__19strstreamE', 'is_defined': True, 'type': 'OBJECT', 'size': 80} -{'name': '_ZTVN10__cxxabiv117__class_type_infoE', 'is_defined': False, 'type': 'OBJECT', 'size': 0} -{'name': '_ZTVN10__cxxabiv120__si_class_type_infoE', 'is_defined': False, 'type': 'OBJECT', 'size': 0} -{'name': '_ZTVN10__cxxabiv121__vmi_class_type_infoE', 'is_defined': False, 'type': 'OBJECT', 'size': 0} -{'name': '_ZTVNSt12experimental15fundamentals_v112bad_any_castE', 'is_defined': True, 'type': 'OBJECT', 'size': 40} -{'name': '_ZTVNSt12experimental19bad_optional_accessE', 'is_defined': True, 'type': 'OBJECT', 'size': 40} -{'name': '_ZTVNSt3__110istrstreamE', 'is_defined': True, 'type': 'OBJECT', 'size': 80} -{'name': '_ZTVNSt3__110moneypunctIcLb0EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 112} -{'name': '_ZTVNSt3__110moneypunctIcLb1EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 112} -{'name': '_ZTVNSt3__110moneypunctIwLb0EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 112} -{'name': '_ZTVNSt3__110moneypunctIwLb1EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 112} -{'name': '_ZTVNSt3__110ostrstreamE', 'is_defined': True, 'type': 'OBJECT', 'size': 80} -{'name': '_ZTVNSt3__111regex_errorE', 'is_defined': True, 'type': 'OBJECT', 'size': 40} -{'name': '_ZTVNSt3__112bad_weak_ptrE', 'is_defined': True, 'type': 'OBJECT', 'size': 40} -{'name': '_ZTVNSt3__112ctype_bynameIcEE', 'is_defined': True, 'type': 'OBJECT', 'size': 104} -{'name': '_ZTVNSt3__112ctype_bynameIwEE', 'is_defined': True, 'type': 'OBJECT', 'size': 136} -{'name': '_ZTVNSt3__112future_errorE', 'is_defined': True, 'type': 'OBJECT', 'size': 40} -{'name': '_ZTVNSt3__112strstreambufE', 'is_defined': True, 'type': 'OBJECT', 'size': 128} -{'name': '_ZTVNSt3__112system_errorE', 'is_defined': True, 'type': 'OBJECT', 'size': 40} -{'name': '_ZTVNSt3__113basic_istreamIcNS_11char_traitsIcEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 80} -{'name': '_ZTVNSt3__113basic_istreamIwNS_11char_traitsIwEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 80} -{'name': '_ZTVNSt3__113basic_ostreamIcNS_11char_traitsIcEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 80} -{'name': '_ZTVNSt3__113basic_ostreamIwNS_11char_traitsIwEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 80} -{'name': '_ZTVNSt3__114__codecvt_utf8IDiEE', 'is_defined': True, 'type': 'OBJECT', 'size': 96} -{'name': '_ZTVNSt3__114__codecvt_utf8IDsEE', 'is_defined': True, 'type': 'OBJECT', 'size': 96} -{'name': '_ZTVNSt3__114__codecvt_utf8IwEE', 'is_defined': True, 'type': 'OBJECT', 'size': 96} -{'name': '_ZTVNSt3__114__shared_countE', 'is_defined': True, 'type': 'OBJECT', 'size': 40} -{'name': '_ZTVNSt3__114basic_iostreamIcNS_11char_traitsIcEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 120} -{'name': '_ZTVNSt3__114codecvt_bynameIDic11__mbstate_tEE', 'is_defined': True, 'type': 'OBJECT', 'size': 96} -{'name': '_ZTVNSt3__114codecvt_bynameIDsc11__mbstate_tEE', 'is_defined': True, 'type': 'OBJECT', 'size': 96} -{'name': '_ZTVNSt3__114codecvt_bynameIcc11__mbstate_tEE', 'is_defined': True, 'type': 'OBJECT', 'size': 96} -{'name': '_ZTVNSt3__114codecvt_bynameIwc11__mbstate_tEE', 'is_defined': True, 'type': 'OBJECT', 'size': 96} -{'name': '_ZTVNSt3__114collate_bynameIcEE', 'is_defined': True, 'type': 'OBJECT', 'size': 64} -{'name': '_ZTVNSt3__114collate_bynameIwEE', 'is_defined': True, 'type': 'OBJECT', 'size': 64} -{'name': '_ZTVNSt3__114error_categoryE', 'is_defined': True, 'type': 'OBJECT', 'size': 72} -{'name': '_ZTVNSt3__115__codecvt_utf16IDiLb0EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 96} -{'name': '_ZTVNSt3__115__codecvt_utf16IDiLb1EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 96} -{'name': '_ZTVNSt3__115__codecvt_utf16IDsLb0EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 96} -{'name': '_ZTVNSt3__115__codecvt_utf16IDsLb1EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 96} -{'name': '_ZTVNSt3__115__codecvt_utf16IwLb0EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 96} -{'name': '_ZTVNSt3__115__codecvt_utf16IwLb1EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 96} -{'name': '_ZTVNSt3__115basic_streambufIcNS_11char_traitsIcEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 128} -{'name': '_ZTVNSt3__115basic_streambufIwNS_11char_traitsIwEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 128} -{'name': '_ZTVNSt3__115messages_bynameIcEE', 'is_defined': True, 'type': 'OBJECT', 'size': 64} -{'name': '_ZTVNSt3__115messages_bynameIwEE', 'is_defined': True, 'type': 'OBJECT', 'size': 64} -{'name': '_ZTVNSt3__115numpunct_bynameIcEE', 'is_defined': True, 'type': 'OBJECT', 'size': 80} -{'name': '_ZTVNSt3__115numpunct_bynameIwEE', 'is_defined': True, 'type': 'OBJECT', 'size': 80} -{'name': '_ZTVNSt3__115time_get_bynameIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 224} -{'name': '_ZTVNSt3__115time_get_bynameIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 224} -{'name': '_ZTVNSt3__115time_put_bynameIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 48} -{'name': '_ZTVNSt3__115time_put_bynameIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 48} -{'name': '_ZTVNSt3__116__narrow_to_utf8ILm16EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 96} -{'name': '_ZTVNSt3__116__narrow_to_utf8ILm32EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 96} -{'name': '_ZTVNSt3__117__assoc_sub_stateE', 'is_defined': True, 'type': 'OBJECT', 'size': 48} -{'name': '_ZTVNSt3__117__widen_from_utf8ILm16EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 96} -{'name': '_ZTVNSt3__117__widen_from_utf8ILm32EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 96} -{'name': '_ZTVNSt3__117moneypunct_bynameIcLb0EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 112} -{'name': '_ZTVNSt3__117moneypunct_bynameIcLb1EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 112} -{'name': '_ZTVNSt3__117moneypunct_bynameIwLb0EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 112} -{'name': '_ZTVNSt3__117moneypunct_bynameIwLb1EEE', 'is_defined': True, 'type': 'OBJECT', 'size': 112} -{'name': '_ZTVNSt3__119__shared_weak_countE', 'is_defined': True, 'type': 'OBJECT', 'size': 56} -{'name': '_ZTVNSt3__120__codecvt_utf8_utf16IDiEE', 'is_defined': True, 'type': 'OBJECT', 'size': 96} -{'name': '_ZTVNSt3__120__codecvt_utf8_utf16IDsEE', 'is_defined': True, 'type': 'OBJECT', 'size': 96} -{'name': '_ZTVNSt3__120__codecvt_utf8_utf16IwEE', 'is_defined': True, 'type': 'OBJECT', 'size': 96} -{'name': '_ZTVNSt3__124__libcpp_debug_exceptionE', 'is_defined': True, 'type': 'OBJECT', 'size': 40} -{'name': '_ZTVNSt3__15ctypeIcEE', 'is_defined': True, 'type': 'OBJECT', 'size': 104} -{'name': '_ZTVNSt3__15ctypeIwEE', 'is_defined': True, 'type': 'OBJECT', 'size': 136} -{'name': '_ZTVNSt3__16locale5facetE', 'is_defined': True, 'type': 'OBJECT', 'size': 40} -{'name': '_ZTVNSt3__17codecvtIDic11__mbstate_tEE', 'is_defined': True, 'type': 'OBJECT', 'size': 96} -{'name': '_ZTVNSt3__17codecvtIDsc11__mbstate_tEE', 'is_defined': True, 'type': 'OBJECT', 'size': 96} -{'name': '_ZTVNSt3__17codecvtIcc11__mbstate_tEE', 'is_defined': True, 'type': 'OBJECT', 'size': 96} -{'name': '_ZTVNSt3__17codecvtIwc11__mbstate_tEE', 'is_defined': True, 'type': 'OBJECT', 'size': 96} -{'name': '_ZTVNSt3__17collateIcEE', 'is_defined': True, 'type': 'OBJECT', 'size': 64} -{'name': '_ZTVNSt3__17collateIwEE', 'is_defined': True, 'type': 'OBJECT', 'size': 64} -{'name': '_ZTVNSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 128} -{'name': '_ZTVNSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 128} -{'name': '_ZTVNSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 104} -{'name': '_ZTVNSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 104} -{'name': '_ZTVNSt3__18__c_nodeE', 'is_defined': True, 'type': 'OBJECT', 'size': 64} -{'name': '_ZTVNSt3__18ios_base7failureE', 'is_defined': True, 'type': 'OBJECT', 'size': 40} -{'name': '_ZTVNSt3__18ios_baseE', 'is_defined': True, 'type': 'OBJECT', 'size': 32} -{'name': '_ZTVNSt3__18messagesIcEE', 'is_defined': True, 'type': 'OBJECT', 'size': 64} -{'name': '_ZTVNSt3__18messagesIwEE', 'is_defined': True, 'type': 'OBJECT', 'size': 64} -{'name': '_ZTVNSt3__18numpunctIcEE', 'is_defined': True, 'type': 'OBJECT', 'size': 80} -{'name': '_ZTVNSt3__18numpunctIwEE', 'is_defined': True, 'type': 'OBJECT', 'size': 80} -{'name': '_ZTVNSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 168} -{'name': '_ZTVNSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 168} -{'name': '_ZTVNSt3__18time_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 48} -{'name': '_ZTVNSt3__18time_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 48} -{'name': '_ZTVNSt3__19basic_iosIcNS_11char_traitsIcEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 32} -{'name': '_ZTVNSt3__19basic_iosIwNS_11char_traitsIwEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 32} -{'name': '_ZTVNSt3__19money_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 56} -{'name': '_ZTVNSt3__19money_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 56} -{'name': '_ZTVNSt3__19money_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 56} -{'name': '_ZTVNSt3__19money_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'is_defined': True, 'type': 'OBJECT', 'size': 56} -{'name': '_ZTVNSt3__19strstreamE', 'is_defined': True, 'type': 'OBJECT', 'size': 120} -{'name': '_ZTVSt11logic_error', 'is_defined': False, 'type': 'OBJECT', 'size': 0} -{'name': '_ZTVSt12bad_any_cast', 'is_defined': True, 'type': 'OBJECT', 'size': 40} -{'name': '_ZTVSt12length_error', 'is_defined': False, 'type': 'OBJECT', 'size': 0} -{'name': '_ZTVSt12out_of_range', 'is_defined': False, 'type': 'OBJECT', 'size': 0} -{'name': '_ZTVSt13runtime_error', 'is_defined': False, 'type': 'OBJECT', 'size': 0} -{'name': '_ZTVSt14overflow_error', 'is_defined': False, 'type': 'OBJECT', 'size': 0} -{'name': '_ZTVSt16invalid_argument', 'is_defined': False, 'type': 'OBJECT', 'size': 0} -{'name': '_ZTVSt16nested_exception', 'is_defined': True, 'type': 'OBJECT', 'size': 32} -{'name': '_ZTVSt18bad_variant_access', 'is_defined': True, 'type': 'OBJECT', 'size': 40} -{'name': '_ZTVSt19bad_optional_access', 'is_defined': True, 'type': 'OBJECT', 'size': 40} -{'name': '_ZThn16_NSt3__114basic_iostreamIcNS_11char_traitsIcEEED0Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZThn16_NSt3__114basic_iostreamIcNS_11char_traitsIcEEED1Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZThn16_NSt3__19strstreamD0Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZThn16_NSt3__19strstreamD1Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZTv0_n24_NSt3__110istrstreamD0Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZTv0_n24_NSt3__110istrstreamD1Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZTv0_n24_NSt3__110ostrstreamD0Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZTv0_n24_NSt3__110ostrstreamD1Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZTv0_n24_NSt3__113basic_istreamIcNS_11char_traitsIcEEED0Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZTv0_n24_NSt3__113basic_istreamIcNS_11char_traitsIcEEED1Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZTv0_n24_NSt3__113basic_istreamIwNS_11char_traitsIwEEED0Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZTv0_n24_NSt3__113basic_istreamIwNS_11char_traitsIwEEED1Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZTv0_n24_NSt3__113basic_ostreamIcNS_11char_traitsIcEEED0Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZTv0_n24_NSt3__113basic_ostreamIcNS_11char_traitsIcEEED1Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZTv0_n24_NSt3__113basic_ostreamIwNS_11char_traitsIwEEED0Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZTv0_n24_NSt3__113basic_ostreamIwNS_11char_traitsIwEEED1Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZTv0_n24_NSt3__114basic_iostreamIcNS_11char_traitsIcEEED0Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZTv0_n24_NSt3__114basic_iostreamIcNS_11char_traitsIcEEED1Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZTv0_n24_NSt3__19strstreamD0Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZTv0_n24_NSt3__19strstreamD1Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZdaPv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZdaPvRKSt9nothrow_t', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZdaPvSt11align_val_t', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZdaPvSt11align_val_tRKSt9nothrow_t', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZdaPvm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZdaPvmSt11align_val_t', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZdlPv', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZdlPvRKSt9nothrow_t', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZdlPvSt11align_val_t', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZdlPvSt11align_val_tRKSt9nothrow_t', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZdlPvm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZdlPvmSt11align_val_t', 'is_defined': True, 'type': 'FUNC'} -{'name': '_Znam', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZnamRKSt9nothrow_t', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZnamSt11align_val_t', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZnamSt11align_val_tRKSt9nothrow_t', 'is_defined': True, 'type': 'FUNC'} -{'name': '_Znwm', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZnwmRKSt9nothrow_t', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZnwmSt11align_val_t', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZnwmSt11align_val_tRKSt9nothrow_t', 'is_defined': True, 'type': 'FUNC'} -{'name': '__cxa_allocate_exception', 'is_defined': False, 'type': 'FUNC'} -{'name': '__cxa_begin_catch', 'is_defined': False, 'type': 'FUNC'} -{'name': '__cxa_current_primary_exception', 'is_defined': False, 'type': 'FUNC'} -{'name': '__cxa_decrement_exception_refcount', 'is_defined': False, 'type': 'FUNC'} -{'name': '__cxa_end_catch', 'is_defined': False, 'type': 'FUNC'} -{'name': '__cxa_free_exception', 'is_defined': False, 'type': 'FUNC'} -{'name': '__cxa_guard_abort', 'is_defined': False, 'type': 'FUNC'} -{'name': '__cxa_guard_acquire', 'is_defined': False, 'type': 'FUNC'} -{'name': '__cxa_guard_release', 'is_defined': False, 'type': 'FUNC'} -{'name': '__cxa_increment_exception_refcount', 'is_defined': False, 'type': 'FUNC'} -{'name': '__cxa_pure_virtual', 'is_defined': False, 'type': 'FUNC'} -{'name': '__cxa_rethrow', 'is_defined': False, 'type': 'FUNC'} -{'name': '__cxa_rethrow_primary_exception', 'is_defined': False, 'type': 'FUNC'} -{'name': '__cxa_throw', 'is_defined': False, 'type': 'FUNC'} -{'name': '__cxa_uncaught_exceptions', 'is_defined': False, 'type': 'FUNC'} +{'is_defined': False, 'name': '_ZNKSt11logic_error4whatEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt12bad_any_cast4whatEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt12experimental15fundamentals_v112bad_any_cast4whatEv', 'type': 'FUNC'} +{'is_defined': False, 'name': '_ZNKSt13runtime_error4whatEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt16nested_exception14rethrow_nestedEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt18bad_variant_access4whatEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt19bad_optional_access4whatEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__110__time_put8__do_putEPcRS1_PK2tmcc', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__110__time_put8__do_putEPwRS1_PK2tmcc', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__110error_code7messageEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__110moneypunctIcLb0EE11do_groupingEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__110moneypunctIcLb0EE13do_neg_formatEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__110moneypunctIcLb0EE13do_pos_formatEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__110moneypunctIcLb0EE14do_curr_symbolEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__110moneypunctIcLb0EE14do_frac_digitsEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__110moneypunctIcLb0EE16do_decimal_pointEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__110moneypunctIcLb0EE16do_negative_signEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__110moneypunctIcLb0EE16do_positive_signEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__110moneypunctIcLb0EE16do_thousands_sepEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__110moneypunctIcLb1EE11do_groupingEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__110moneypunctIcLb1EE13do_neg_formatEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__110moneypunctIcLb1EE13do_pos_formatEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__110moneypunctIcLb1EE14do_curr_symbolEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__110moneypunctIcLb1EE14do_frac_digitsEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__110moneypunctIcLb1EE16do_decimal_pointEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__110moneypunctIcLb1EE16do_negative_signEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__110moneypunctIcLb1EE16do_positive_signEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__110moneypunctIcLb1EE16do_thousands_sepEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__110moneypunctIwLb0EE11do_groupingEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__110moneypunctIwLb0EE13do_neg_formatEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__110moneypunctIwLb0EE13do_pos_formatEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__110moneypunctIwLb0EE14do_curr_symbolEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__110moneypunctIwLb0EE14do_frac_digitsEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__110moneypunctIwLb0EE16do_decimal_pointEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__110moneypunctIwLb0EE16do_negative_signEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__110moneypunctIwLb0EE16do_positive_signEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__110moneypunctIwLb0EE16do_thousands_sepEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__110moneypunctIwLb1EE11do_groupingEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__110moneypunctIwLb1EE13do_neg_formatEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__110moneypunctIwLb1EE13do_pos_formatEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__110moneypunctIwLb1EE14do_curr_symbolEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__110moneypunctIwLb1EE14do_frac_digitsEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__110moneypunctIwLb1EE16do_decimal_pointEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__110moneypunctIwLb1EE16do_negative_signEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__110moneypunctIwLb1EE16do_positive_signEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__110moneypunctIwLb1EE16do_thousands_sepEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__111__libcpp_db15__decrementableEPKv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__111__libcpp_db15__find_c_from_iEPv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__111__libcpp_db15__subscriptableEPKvl', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__111__libcpp_db17__dereferenceableEPKv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__111__libcpp_db17__find_c_and_lockEPv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__111__libcpp_db22__less_than_comparableEPKvS2_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__111__libcpp_db6unlockEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__111__libcpp_db8__find_cEPv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__111__libcpp_db9__addableEPKvl', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__112bad_weak_ptr4whatEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE12find_last_ofEPKcmm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE13find_first_ofEPKcmm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE16find_last_not_ofEPKcmm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE17find_first_not_ofEPKcmm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE2atEm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4copyEPcmm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4findEPKcmm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4findEcm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE5rfindEPKcmm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE5rfindEcm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7compareEPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7compareEmmPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7compareEmmPKcm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7compareEmmRKS5_mm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE12find_last_ofEPKwmm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE13find_first_ofEPKwmm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE16find_last_not_ofEPKwmm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE17find_first_not_ofEPKwmm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE2atEm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE4copyEPwmm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE4findEPKwmm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE4findEwm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE5rfindEPKwmm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE5rfindEwm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7compareEPKw', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7compareEmmPKw', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7compareEmmPKwm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7compareEmmRKS5_mm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__112ctype_bynameIcE10do_tolowerEPcPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__112ctype_bynameIcE10do_tolowerEc', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__112ctype_bynameIcE10do_toupperEPcPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__112ctype_bynameIcE10do_toupperEc', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__112ctype_bynameIwE10do_scan_isEtPKwS3_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__112ctype_bynameIwE10do_tolowerEPwPKw', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__112ctype_bynameIwE10do_tolowerEw', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__112ctype_bynameIwE10do_toupperEPwPKw', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__112ctype_bynameIwE10do_toupperEw', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__112ctype_bynameIwE11do_scan_notEtPKwS3_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__112ctype_bynameIwE5do_isEPKwS3_Pt', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__112ctype_bynameIwE5do_isEtw', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__112ctype_bynameIwE8do_widenEPKcS3_Pw', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__112ctype_bynameIwE8do_widenEc', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__112ctype_bynameIwE9do_narrowEPKwS3_cPc', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__112ctype_bynameIwE9do_narrowEwc', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__112strstreambuf6pcountEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__113random_device7entropyEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__114__codecvt_utf8IDiE10do_unshiftER11__mbstate_tPcS4_RS4_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__114__codecvt_utf8IDiE11do_encodingEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__114__codecvt_utf8IDiE13do_max_lengthEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__114__codecvt_utf8IDiE16do_always_noconvEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__114__codecvt_utf8IDiE5do_inER11__mbstate_tPKcS5_RS5_PDiS7_RS7_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__114__codecvt_utf8IDiE6do_outER11__mbstate_tPKDiS5_RS5_PcS7_RS7_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__114__codecvt_utf8IDiE9do_lengthER11__mbstate_tPKcS5_m', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__114__codecvt_utf8IDsE10do_unshiftER11__mbstate_tPcS4_RS4_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__114__codecvt_utf8IDsE11do_encodingEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__114__codecvt_utf8IDsE13do_max_lengthEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__114__codecvt_utf8IDsE16do_always_noconvEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__114__codecvt_utf8IDsE5do_inER11__mbstate_tPKcS5_RS5_PDsS7_RS7_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__114__codecvt_utf8IDsE6do_outER11__mbstate_tPKDsS5_RS5_PcS7_RS7_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__114__codecvt_utf8IDsE9do_lengthER11__mbstate_tPKcS5_m', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__114__codecvt_utf8IwE10do_unshiftER11__mbstate_tPcS4_RS4_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__114__codecvt_utf8IwE11do_encodingEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__114__codecvt_utf8IwE13do_max_lengthEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__114__codecvt_utf8IwE16do_always_noconvEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__114__codecvt_utf8IwE5do_inER11__mbstate_tPKcS5_RS5_PwS7_RS7_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__114__codecvt_utf8IwE6do_outER11__mbstate_tPKwS5_RS5_PcS7_RS7_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__114__codecvt_utf8IwE9do_lengthER11__mbstate_tPKcS5_m', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__114collate_bynameIcE10do_compareEPKcS3_S3_S3_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__114collate_bynameIcE12do_transformEPKcS3_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__114collate_bynameIwE10do_compareEPKwS3_S3_S3_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__114collate_bynameIwE12do_transformEPKwS3_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__114error_category10equivalentERKNS_10error_codeEi', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__114error_category10equivalentEiRKNS_15error_conditionE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__114error_category23default_error_conditionEi', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__115__codecvt_utf16IDiLb0EE10do_unshiftER11__mbstate_tPcS4_RS4_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__115__codecvt_utf16IDiLb0EE11do_encodingEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__115__codecvt_utf16IDiLb0EE13do_max_lengthEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__115__codecvt_utf16IDiLb0EE16do_always_noconvEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__115__codecvt_utf16IDiLb0EE5do_inER11__mbstate_tPKcS5_RS5_PDiS7_RS7_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__115__codecvt_utf16IDiLb0EE6do_outER11__mbstate_tPKDiS5_RS5_PcS7_RS7_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__115__codecvt_utf16IDiLb0EE9do_lengthER11__mbstate_tPKcS5_m', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__115__codecvt_utf16IDiLb1EE10do_unshiftER11__mbstate_tPcS4_RS4_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__115__codecvt_utf16IDiLb1EE11do_encodingEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__115__codecvt_utf16IDiLb1EE13do_max_lengthEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__115__codecvt_utf16IDiLb1EE16do_always_noconvEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__115__codecvt_utf16IDiLb1EE5do_inER11__mbstate_tPKcS5_RS5_PDiS7_RS7_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__115__codecvt_utf16IDiLb1EE6do_outER11__mbstate_tPKDiS5_RS5_PcS7_RS7_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__115__codecvt_utf16IDiLb1EE9do_lengthER11__mbstate_tPKcS5_m', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__115__codecvt_utf16IDsLb0EE10do_unshiftER11__mbstate_tPcS4_RS4_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__115__codecvt_utf16IDsLb0EE11do_encodingEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__115__codecvt_utf16IDsLb0EE13do_max_lengthEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__115__codecvt_utf16IDsLb0EE16do_always_noconvEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__115__codecvt_utf16IDsLb0EE5do_inER11__mbstate_tPKcS5_RS5_PDsS7_RS7_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__115__codecvt_utf16IDsLb0EE6do_outER11__mbstate_tPKDsS5_RS5_PcS7_RS7_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__115__codecvt_utf16IDsLb0EE9do_lengthER11__mbstate_tPKcS5_m', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__115__codecvt_utf16IDsLb1EE10do_unshiftER11__mbstate_tPcS4_RS4_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__115__codecvt_utf16IDsLb1EE11do_encodingEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__115__codecvt_utf16IDsLb1EE13do_max_lengthEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__115__codecvt_utf16IDsLb1EE16do_always_noconvEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__115__codecvt_utf16IDsLb1EE5do_inER11__mbstate_tPKcS5_RS5_PDsS7_RS7_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__115__codecvt_utf16IDsLb1EE6do_outER11__mbstate_tPKDsS5_RS5_PcS7_RS7_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__115__codecvt_utf16IDsLb1EE9do_lengthER11__mbstate_tPKcS5_m', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__115__codecvt_utf16IwLb0EE10do_unshiftER11__mbstate_tPcS4_RS4_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__115__codecvt_utf16IwLb0EE11do_encodingEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__115__codecvt_utf16IwLb0EE13do_max_lengthEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__115__codecvt_utf16IwLb0EE16do_always_noconvEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__115__codecvt_utf16IwLb0EE5do_inER11__mbstate_tPKcS5_RS5_PwS7_RS7_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__115__codecvt_utf16IwLb0EE6do_outER11__mbstate_tPKwS5_RS5_PcS7_RS7_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__115__codecvt_utf16IwLb0EE9do_lengthER11__mbstate_tPKcS5_m', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__115__codecvt_utf16IwLb1EE10do_unshiftER11__mbstate_tPcS4_RS4_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__115__codecvt_utf16IwLb1EE11do_encodingEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__115__codecvt_utf16IwLb1EE13do_max_lengthEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__115__codecvt_utf16IwLb1EE16do_always_noconvEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__115__codecvt_utf16IwLb1EE5do_inER11__mbstate_tPKcS5_RS5_PwS7_RS7_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__115__codecvt_utf16IwLb1EE6do_outER11__mbstate_tPKwS5_RS5_PcS7_RS7_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__115__codecvt_utf16IwLb1EE9do_lengthER11__mbstate_tPKcS5_m', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__115basic_streambufIcNS_11char_traitsIcEEE6getlocEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__115basic_streambufIwNS_11char_traitsIwEEE6getlocEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__115error_condition7messageEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__117moneypunct_bynameIcLb0EE11do_groupingEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__117moneypunct_bynameIcLb0EE13do_neg_formatEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__117moneypunct_bynameIcLb0EE13do_pos_formatEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__117moneypunct_bynameIcLb0EE14do_curr_symbolEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__117moneypunct_bynameIcLb0EE14do_frac_digitsEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__117moneypunct_bynameIcLb0EE16do_decimal_pointEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__117moneypunct_bynameIcLb0EE16do_negative_signEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__117moneypunct_bynameIcLb0EE16do_positive_signEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__117moneypunct_bynameIcLb0EE16do_thousands_sepEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__117moneypunct_bynameIcLb1EE11do_groupingEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__117moneypunct_bynameIcLb1EE13do_neg_formatEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__117moneypunct_bynameIcLb1EE13do_pos_formatEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__117moneypunct_bynameIcLb1EE14do_curr_symbolEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__117moneypunct_bynameIcLb1EE14do_frac_digitsEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__117moneypunct_bynameIcLb1EE16do_decimal_pointEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__117moneypunct_bynameIcLb1EE16do_negative_signEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__117moneypunct_bynameIcLb1EE16do_positive_signEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__117moneypunct_bynameIcLb1EE16do_thousands_sepEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__117moneypunct_bynameIwLb0EE11do_groupingEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__117moneypunct_bynameIwLb0EE13do_neg_formatEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__117moneypunct_bynameIwLb0EE13do_pos_formatEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__117moneypunct_bynameIwLb0EE14do_curr_symbolEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__117moneypunct_bynameIwLb0EE14do_frac_digitsEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__117moneypunct_bynameIwLb0EE16do_decimal_pointEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__117moneypunct_bynameIwLb0EE16do_negative_signEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__117moneypunct_bynameIwLb0EE16do_positive_signEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__117moneypunct_bynameIwLb0EE16do_thousands_sepEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__117moneypunct_bynameIwLb1EE11do_groupingEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__117moneypunct_bynameIwLb1EE13do_neg_formatEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__117moneypunct_bynameIwLb1EE13do_pos_formatEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__117moneypunct_bynameIwLb1EE14do_curr_symbolEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__117moneypunct_bynameIwLb1EE14do_frac_digitsEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__117moneypunct_bynameIwLb1EE16do_decimal_pointEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__117moneypunct_bynameIwLb1EE16do_negative_signEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__117moneypunct_bynameIwLb1EE16do_positive_signEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__117moneypunct_bynameIwLb1EE16do_thousands_sepEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__118__time_get_storageIcE15__do_date_orderEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__118__time_get_storageIwE15__do_date_orderEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__119__shared_weak_count13__get_deleterERKSt9type_info', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__120__codecvt_utf8_utf16IDiE10do_unshiftER11__mbstate_tPcS4_RS4_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__120__codecvt_utf8_utf16IDiE11do_encodingEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__120__codecvt_utf8_utf16IDiE13do_max_lengthEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__120__codecvt_utf8_utf16IDiE16do_always_noconvEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__120__codecvt_utf8_utf16IDiE5do_inER11__mbstate_tPKcS5_RS5_PDiS7_RS7_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__120__codecvt_utf8_utf16IDiE6do_outER11__mbstate_tPKDiS5_RS5_PcS7_RS7_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__120__codecvt_utf8_utf16IDiE9do_lengthER11__mbstate_tPKcS5_m', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__120__codecvt_utf8_utf16IDsE10do_unshiftER11__mbstate_tPcS4_RS4_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__120__codecvt_utf8_utf16IDsE11do_encodingEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__120__codecvt_utf8_utf16IDsE13do_max_lengthEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__120__codecvt_utf8_utf16IDsE16do_always_noconvEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__120__codecvt_utf8_utf16IDsE5do_inER11__mbstate_tPKcS5_RS5_PDsS7_RS7_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__120__codecvt_utf8_utf16IDsE6do_outER11__mbstate_tPKDsS5_RS5_PcS7_RS7_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__120__codecvt_utf8_utf16IDsE9do_lengthER11__mbstate_tPKcS5_m', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__120__codecvt_utf8_utf16IwE10do_unshiftER11__mbstate_tPcS4_RS4_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__120__codecvt_utf8_utf16IwE11do_encodingEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__120__codecvt_utf8_utf16IwE13do_max_lengthEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__120__codecvt_utf8_utf16IwE16do_always_noconvEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__120__codecvt_utf8_utf16IwE5do_inER11__mbstate_tPKcS5_RS5_PwS7_RS7_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__120__codecvt_utf8_utf16IwE6do_outER11__mbstate_tPKwS5_RS5_PcS7_RS7_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__120__codecvt_utf8_utf16IwE9do_lengthER11__mbstate_tPKcS5_m', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__120__time_get_c_storageIcE3__XEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__120__time_get_c_storageIcE3__cEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__120__time_get_c_storageIcE3__rEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__120__time_get_c_storageIcE3__xEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__120__time_get_c_storageIcE7__am_pmEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__120__time_get_c_storageIcE7__weeksEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__120__time_get_c_storageIcE8__monthsEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__120__time_get_c_storageIwE3__XEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__120__time_get_c_storageIwE3__cEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__120__time_get_c_storageIwE3__rEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__120__time_get_c_storageIwE3__xEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__120__time_get_c_storageIwE7__am_pmEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__120__time_get_c_storageIwE7__weeksEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__120__time_get_c_storageIwE8__monthsEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__120__vector_base_commonILb1EE20__throw_length_errorEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__120__vector_base_commonILb1EE20__throw_out_of_rangeEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__121__basic_string_commonILb1EE20__throw_length_errorEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__121__basic_string_commonILb1EE20__throw_out_of_rangeEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__123__match_any_but_newlineIcE6__execERNS_7__stateIcEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__123__match_any_but_newlineIwE6__execERNS_7__stateIwEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__124__libcpp_debug_exception4whatEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__15ctypeIcE10do_tolowerEPcPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__15ctypeIcE10do_tolowerEc', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__15ctypeIcE10do_toupperEPcPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__15ctypeIcE10do_toupperEc', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__15ctypeIcE8do_widenEPKcS3_Pc', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__15ctypeIcE8do_widenEc', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__15ctypeIcE9do_narrowEPKcS3_cPc', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__15ctypeIcE9do_narrowEcc', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__15ctypeIwE10do_scan_isEtPKwS3_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__15ctypeIwE10do_tolowerEPwPKw', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__15ctypeIwE10do_tolowerEw', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__15ctypeIwE10do_toupperEPwPKw', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__15ctypeIwE10do_toupperEw', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__15ctypeIwE11do_scan_notEtPKwS3_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__15ctypeIwE5do_isEPKwS3_Pt', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__15ctypeIwE5do_isEtw', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__15ctypeIwE8do_widenEPKcS3_Pw', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__15ctypeIwE8do_widenEc', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__15ctypeIwE9do_narrowEPKwS3_cPc', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__15ctypeIwE9do_narrowEwc', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__16locale4nameEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__16locale9has_facetERNS0_2idE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__16locale9use_facetERNS0_2idE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__16localeeqERKS0_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__17codecvtIDic11__mbstate_tE10do_unshiftERS1_PcS4_RS4_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__17codecvtIDic11__mbstate_tE11do_encodingEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__17codecvtIDic11__mbstate_tE13do_max_lengthEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__17codecvtIDic11__mbstate_tE16do_always_noconvEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__17codecvtIDic11__mbstate_tE5do_inERS1_PKcS5_RS5_PDiS7_RS7_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__17codecvtIDic11__mbstate_tE6do_outERS1_PKDiS5_RS5_PcS7_RS7_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__17codecvtIDic11__mbstate_tE9do_lengthERS1_PKcS5_m', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__17codecvtIDsc11__mbstate_tE10do_unshiftERS1_PcS4_RS4_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__17codecvtIDsc11__mbstate_tE11do_encodingEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__17codecvtIDsc11__mbstate_tE13do_max_lengthEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__17codecvtIDsc11__mbstate_tE16do_always_noconvEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__17codecvtIDsc11__mbstate_tE5do_inERS1_PKcS5_RS5_PDsS7_RS7_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__17codecvtIDsc11__mbstate_tE6do_outERS1_PKDsS5_RS5_PcS7_RS7_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__17codecvtIDsc11__mbstate_tE9do_lengthERS1_PKcS5_m', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__17codecvtIcc11__mbstate_tE10do_unshiftERS1_PcS4_RS4_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__17codecvtIcc11__mbstate_tE11do_encodingEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__17codecvtIcc11__mbstate_tE13do_max_lengthEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__17codecvtIcc11__mbstate_tE16do_always_noconvEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__17codecvtIcc11__mbstate_tE5do_inERS1_PKcS5_RS5_PcS7_RS7_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__17codecvtIcc11__mbstate_tE6do_outERS1_PKcS5_RS5_PcS7_RS7_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__17codecvtIcc11__mbstate_tE9do_lengthERS1_PKcS5_m', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__17codecvtIwc11__mbstate_tE10do_unshiftERS1_PcS4_RS4_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__17codecvtIwc11__mbstate_tE11do_encodingEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__17codecvtIwc11__mbstate_tE13do_max_lengthEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__17codecvtIwc11__mbstate_tE16do_always_noconvEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__17codecvtIwc11__mbstate_tE5do_inERS1_PKcS5_RS5_PwS7_RS7_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__17codecvtIwc11__mbstate_tE6do_outERS1_PKwS5_RS5_PcS7_RS7_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__17codecvtIwc11__mbstate_tE9do_lengthERS1_PKcS5_m', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__17collateIcE10do_compareEPKcS3_S3_S3_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__17collateIcE12do_transformEPKcS3_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__17collateIcE7do_hashEPKcS3_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__17collateIwE10do_compareEPKwS3_S3_S3_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__17collateIwE12do_transformEPKwS3_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__17collateIwE7do_hashEPKwS3_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRPv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRb', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRd', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRe', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRf', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRl', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRt', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRx', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRy', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjS8_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRPv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRb', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRd', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRe', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRf', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRl', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRt', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRx', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRy', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjS8_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEcPKv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEcb', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEcd', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEce', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEcl', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEcm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEcx', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEcy', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwPKv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwb', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwd', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwe', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwl', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwx', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwy', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__18ios_base6getlocEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__18messagesIcE6do_getEliiRKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__18messagesIcE7do_openERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERKNS_6localeE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__18messagesIcE8do_closeEl', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__18messagesIwE6do_getEliiRKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__18messagesIwE7do_openERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERKNS_6localeE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__18messagesIwE8do_closeEl', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__18numpunctIcE11do_groupingEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__18numpunctIcE11do_truenameEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__18numpunctIcE12do_falsenameEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__18numpunctIcE16do_decimal_pointEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__18numpunctIcE16do_thousands_sepEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__18numpunctIwE11do_groupingEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__18numpunctIwE11do_truenameEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__18numpunctIwE12do_falsenameEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__18numpunctIwE16do_decimal_pointEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__18numpunctIwE16do_thousands_sepEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE10__get_hourERiRS4_S4_RjRKNS_5ctypeIcEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE10__get_yearERiRS4_S4_RjRKNS_5ctypeIcEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE11__get_am_pmERiRS4_S4_RjRKNS_5ctypeIcEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE11__get_monthERiRS4_S4_RjRKNS_5ctypeIcEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE11__get_year4ERiRS4_S4_RjRKNS_5ctypeIcEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE11do_get_dateES4_S4_RNS_8ios_baseERjP2tm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE11do_get_timeES4_S4_RNS_8ios_baseERjP2tm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE11do_get_yearES4_S4_RNS_8ios_baseERjP2tm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE12__get_minuteERiRS4_S4_RjRKNS_5ctypeIcEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE12__get_secondERiRS4_S4_RjRKNS_5ctypeIcEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE13__get_12_hourERiRS4_S4_RjRKNS_5ctypeIcEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE13__get_percentERS4_S4_RjRKNS_5ctypeIcEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE13__get_weekdayERiRS4_S4_RjRKNS_5ctypeIcEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE13do_date_orderEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE14do_get_weekdayES4_S4_RNS_8ios_baseERjP2tm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE15__get_monthnameERiRS4_S4_RjRKNS_5ctypeIcEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE16do_get_monthnameES4_S4_RNS_8ios_baseERjP2tm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE17__get_weekdaynameERiRS4_S4_RjRKNS_5ctypeIcEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE17__get_white_spaceERS4_S4_RjRKNS_5ctypeIcEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE18__get_day_year_numERiRS4_S4_RjRKNS_5ctypeIcEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE3getES4_S4_RNS_8ios_baseERjP2tmPKcSC_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjP2tmcc', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE9__get_dayERiRS4_S4_RjRKNS_5ctypeIcEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE10__get_hourERiRS4_S4_RjRKNS_5ctypeIwEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE10__get_yearERiRS4_S4_RjRKNS_5ctypeIwEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE11__get_am_pmERiRS4_S4_RjRKNS_5ctypeIwEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE11__get_monthERiRS4_S4_RjRKNS_5ctypeIwEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE11__get_year4ERiRS4_S4_RjRKNS_5ctypeIwEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE11do_get_dateES4_S4_RNS_8ios_baseERjP2tm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE11do_get_timeES4_S4_RNS_8ios_baseERjP2tm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE11do_get_yearES4_S4_RNS_8ios_baseERjP2tm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE12__get_minuteERiRS4_S4_RjRKNS_5ctypeIwEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE12__get_secondERiRS4_S4_RjRKNS_5ctypeIwEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE13__get_12_hourERiRS4_S4_RjRKNS_5ctypeIwEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE13__get_percentERS4_S4_RjRKNS_5ctypeIwEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE13__get_weekdayERiRS4_S4_RjRKNS_5ctypeIwEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE13do_date_orderEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE14do_get_weekdayES4_S4_RNS_8ios_baseERjP2tm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE15__get_monthnameERiRS4_S4_RjRKNS_5ctypeIwEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE16do_get_monthnameES4_S4_RNS_8ios_baseERjP2tm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE17__get_weekdaynameERiRS4_S4_RjRKNS_5ctypeIwEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE17__get_white_spaceERS4_S4_RjRKNS_5ctypeIwEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE18__get_day_year_numERiRS4_S4_RjRKNS_5ctypeIwEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE3getES4_S4_RNS_8ios_baseERjP2tmPKwSC_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjP2tmcc', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE9__get_dayERiRS4_S4_RjRKNS_5ctypeIwEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__18time_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE3putES4_RNS_8ios_baseEcPK2tmPKcSC_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__18time_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEcPK2tmcc', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__18time_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE3putES4_RNS_8ios_baseEwPK2tmPKwSC_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__18time_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwPK2tmcc', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__19money_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_bRNS_8ios_baseERjRNS_12basic_stringIcS3_NS_9allocatorIcEEEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__19money_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_bRNS_8ios_baseERjRe', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__19money_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_bRNS_8ios_baseERjRNS_12basic_stringIwS3_NS_9allocatorIwEEEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__19money_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_bRNS_8ios_baseERjRe', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__19money_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_bRNS_8ios_baseEcRKNS_12basic_stringIcS3_NS_9allocatorIcEEEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__19money_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_bRNS_8ios_baseEce', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__19money_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_bRNS_8ios_baseEwRKNS_12basic_stringIwS3_NS_9allocatorIwEEEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__19money_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_bRNS_8ios_baseEwe', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt11logic_errorC1EPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt11logic_errorC1ERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt11logic_errorC1ERKS_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt11logic_errorC2EPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt11logic_errorC2ERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt11logic_errorC2ERKS_', 'type': 'FUNC'} +{'is_defined': False, 'name': '_ZNSt11logic_errorD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt11logic_erroraSERKS_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt12experimental19bad_optional_accessD0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt12experimental19bad_optional_accessD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt12experimental19bad_optional_accessD2Ev', 'type': 'FUNC'} +{'is_defined': False, 'name': '_ZNSt12length_errorD1Ev', 'type': 'FUNC'} +{'is_defined': False, 'name': '_ZNSt12out_of_rangeD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt13exception_ptrC1ERKS_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt13exception_ptrC2ERKS_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt13exception_ptrD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt13exception_ptrD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt13exception_ptraSERKS_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt13runtime_errorC1EPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt13runtime_errorC1ERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt13runtime_errorC1ERKS_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt13runtime_errorC2EPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt13runtime_errorC2ERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt13runtime_errorC2ERKS_', 'type': 'FUNC'} +{'is_defined': False, 'name': '_ZNSt13runtime_errorD1Ev', 'type': 'FUNC'} +{'is_defined': False, 'name': '_ZNSt13runtime_errorD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt13runtime_erroraSERKS_', 'type': 'FUNC'} +{'is_defined': False, 'name': '_ZNSt14overflow_errorD1Ev', 'type': 'FUNC'} +{'is_defined': False, 'name': '_ZNSt16invalid_argumentD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt16nested_exceptionC1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt16nested_exceptionC2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt16nested_exceptionD0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt16nested_exceptionD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt16nested_exceptionD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt19bad_optional_accessD0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt19bad_optional_accessD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt19bad_optional_accessD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__110__time_getC1EPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__110__time_getC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__110__time_getC2EPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__110__time_getC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__110__time_getD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__110__time_getD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__110__time_putC1EPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__110__time_putC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__110__time_putC2EPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__110__time_putC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__110__time_putD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__110__time_putD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__110adopt_lockE', 'size': 1, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__110ctype_base5alnumE', 'size': 2, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__110ctype_base5alphaE', 'size': 2, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__110ctype_base5blankE', 'size': 2, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__110ctype_base5cntrlE', 'size': 2, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__110ctype_base5digitE', 'size': 2, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__110ctype_base5graphE', 'size': 2, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__110ctype_base5lowerE', 'size': 2, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__110ctype_base5printE', 'size': 2, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__110ctype_base5punctE', 'size': 2, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__110ctype_base5spaceE', 'size': 2, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__110ctype_base5upperE', 'size': 2, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__110ctype_base6xdigitE', 'size': 2, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__110defer_lockE', 'size': 1, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__110istrstreamD0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__110istrstreamD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__110istrstreamD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__110moneypunctIcLb0EE2idE', 'size': 16, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__110moneypunctIcLb0EE4intlE', 'size': 1, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__110moneypunctIcLb1EE2idE', 'size': 16, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__110moneypunctIcLb1EE4intlE', 'size': 1, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__110moneypunctIwLb0EE2idE', 'size': 16, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__110moneypunctIwLb0EE4intlE', 'size': 1, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__110moneypunctIwLb1EE2idE', 'size': 16, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__110moneypunctIwLb1EE4intlE', 'size': 1, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__110ostrstreamD0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__110ostrstreamD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__110ostrstreamD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__110to_wstringEd', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__110to_wstringEe', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__110to_wstringEf', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__110to_wstringEi', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__110to_wstringEj', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__110to_wstringEl', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__110to_wstringEm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__110to_wstringEx', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__110to_wstringEy', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__111__call_onceERVmPvPFvS2_E', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__111__libcpp_db10__insert_cEPvPFPNS_8__c_nodeES1_S1_S3_E', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__111__libcpp_db10__insert_iEPv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__111__libcpp_db11__insert_icEPvPKv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__111__libcpp_db15__iterator_copyEPvPKv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__111__libcpp_db16__invalidate_allEPv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__111__libcpp_db4swapEPvS1_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__111__libcpp_db9__erase_cEPv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__111__libcpp_db9__erase_iEPv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__111__libcpp_dbC1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__111__libcpp_dbC2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__111__libcpp_dbD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__111__libcpp_dbD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__111__money_getIcE13__gather_infoEbRKNS_6localeERNS_10money_base7patternERcS8_RNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEESF_SF_SF_Ri', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__111__money_getIwE13__gather_infoEbRKNS_6localeERNS_10money_base7patternERwS8_RNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERNS9_IwNSA_IwEENSC_IwEEEESJ_SJ_Ri', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__111__money_putIcE13__gather_infoEbbRKNS_6localeERNS_10money_base7patternERcS8_RNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEESF_SF_Ri', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__111__money_putIcE8__formatEPcRS2_S3_jPKcS5_RKNS_5ctypeIcEEbRKNS_10money_base7patternEccRKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEESL_SL_i', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__111__money_putIwE13__gather_infoEbbRKNS_6localeERNS_10money_base7patternERwS8_RNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERNS9_IwNSA_IwEENSC_IwEEEESJ_Ri', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__111__money_putIwE8__formatEPwRS2_S3_jPKwS5_RKNS_5ctypeIwEEbRKNS_10money_base7patternEwwRKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERKNSE_IwNSF_IwEENSH_IwEEEESQ_i', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__111regex_errorC1ENS_15regex_constants10error_typeE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__111regex_errorC2ENS_15regex_constants10error_typeE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__111regex_errorD0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__111regex_errorD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__111regex_errorD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__111this_thread9sleep_forERKNS_6chrono8durationIxNS_5ratioILl1ELl1000000000EEEEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__111timed_mutex4lockEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__111timed_mutex6unlockEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__111timed_mutex8try_lockEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__111timed_mutexC1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__111timed_mutexC2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__111timed_mutexD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__111timed_mutexD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__111try_to_lockE', 'size': 1, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__112__do_nothingEPv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112__get_sp_mutEPKv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112__next_primeEm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112__rs_default4__c_E', 'size': 4, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__112__rs_defaultC1ERKS0_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112__rs_defaultC1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112__rs_defaultC2ERKS0_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112__rs_defaultC2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112__rs_defaultD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112__rs_defaultD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112__rs_defaultclEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112bad_weak_ptrD0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112bad_weak_ptrD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112bad_weak_ptrD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE21__grow_by_and_replaceEmmmmmmPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE2atEm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4nposE', 'size': 8, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE5eraseEmm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcmm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEmc', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6appendEPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6appendEPKcm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6appendERKS5_mm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6appendEmc', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignEPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignEPKcm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignERKS5_mm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignEmc', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6insertENS_11__wrap_iterIPKcEEc', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6insertEmPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6insertEmPKcm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6insertEmRKS5_mm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6insertEmmc', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6resizeEmc', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7replaceEmmPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7replaceEmmPKcm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7replaceEmmRKS5_mm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7replaceEmmmc', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7reserveEm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9__grow_byEmmmmmm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9push_backEc', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC1ERKS5_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC1ERKS5_RKS4_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC1ERKS5_mmRKS4_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2ERKS5_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2ERKS5_RKS4_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2ERKS5_mmRKS4_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEaSERKS5_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEaSEc', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE21__grow_by_and_replaceEmmmmmmPKw', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE2atEm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE4nposE', 'size': 8, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE5eraseEmm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6__initEPKwm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6__initEPKwmm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6__initEmw', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6appendEPKw', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6appendEPKwm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6appendERKS5_mm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6appendEmw', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6assignEPKw', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6assignEPKwm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6assignERKS5_mm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6assignEmw', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6insertENS_11__wrap_iterIPKwEEw', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6insertEmPKw', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6insertEmPKwm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6insertEmRKS5_mm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6insertEmmw', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6resizeEmw', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7replaceEmmPKw', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7replaceEmmPKwm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7replaceEmmRKS5_mm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7replaceEmmmw', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7reserveEm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE9__grow_byEmmmmmm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE9push_backEw', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC1ERKS5_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC1ERKS5_RKS4_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC1ERKS5_mmRKS4_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC2ERKS5_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC2ERKS5_RKS4_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC2ERKS5_mmRKS4_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEaSERKS5_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEaSEw', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112ctype_bynameIcEC1EPKcm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112ctype_bynameIcEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112ctype_bynameIcEC2EPKcm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112ctype_bynameIcEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112ctype_bynameIcED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112ctype_bynameIcED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112ctype_bynameIcED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112ctype_bynameIwEC1EPKcm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112ctype_bynameIwEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112ctype_bynameIwEC2EPKcm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112ctype_bynameIwEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112ctype_bynameIwED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112ctype_bynameIwED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112ctype_bynameIwED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112future_errorC1ENS_10error_codeE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112future_errorC2ENS_10error_codeE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112future_errorD0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112future_errorD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112future_errorD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112placeholders2_1E', 'size': 1, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__112placeholders2_2E', 'size': 1, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__112placeholders2_3E', 'size': 1, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__112placeholders2_4E', 'size': 1, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__112placeholders2_5E', 'size': 1, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__112placeholders2_6E', 'size': 1, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__112placeholders2_7E', 'size': 1, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__112placeholders2_8E', 'size': 1, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__112placeholders2_9E', 'size': 1, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__112placeholders3_10E', 'size': 1, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__112strstreambuf3strEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112strstreambuf4swapERS0_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112strstreambuf6__initEPclS1_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112strstreambuf6freezeEb', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112strstreambuf7seekoffExNS_8ios_base7seekdirEj', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112strstreambuf7seekposENS_4fposI11__mbstate_tEEj', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112strstreambuf8overflowEi', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112strstreambuf9pbackfailEi', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112strstreambuf9underflowEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112strstreambufC1EPFPvmEPFvS1_E', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112strstreambufC1EPKal', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112strstreambufC1EPKcl', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112strstreambufC1EPKhl', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112strstreambufC1EPalS1_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112strstreambufC1EPclS1_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112strstreambufC1EPhlS1_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112strstreambufC1El', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112strstreambufC2EPFPvmEPFvS1_E', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112strstreambufC2EPKal', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112strstreambufC2EPKcl', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112strstreambufC2EPKhl', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112strstreambufC2EPalS1_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112strstreambufC2EPclS1_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112strstreambufC2EPhlS1_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112strstreambufC2El', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112strstreambufD0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112strstreambufD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112strstreambufD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112system_error6__initERKNS_10error_codeENS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112system_errorC1ENS_10error_codeE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112system_errorC1ENS_10error_codeEPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112system_errorC1ENS_10error_codeERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112system_errorC1EiRKNS_14error_categoryE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112system_errorC1EiRKNS_14error_categoryEPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112system_errorC1EiRKNS_14error_categoryERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112system_errorC2ENS_10error_codeE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112system_errorC2ENS_10error_codeEPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112system_errorC2ENS_10error_codeERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112system_errorC2EiRKNS_14error_categoryE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112system_errorC2EiRKNS_14error_categoryEPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112system_errorC2EiRKNS_14error_categoryERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112system_errorD0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112system_errorD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__112system_errorD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113allocator_argE', 'size': 1, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE3getEPcl', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE3getEPclc', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE3getERNS_15basic_streambufIcS2_EE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE3getERNS_15basic_streambufIcS2_EEc', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE3getERc', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE3getEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE4peekEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE4readEPcl', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE4swapERS3_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE4syncEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE5seekgENS_4fposI11__mbstate_tEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE5seekgExNS_8ios_base7seekdirE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE5tellgEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE5ungetEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE6ignoreEli', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE6sentryC1ERS3_b', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE6sentryC2ERS3_b', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE7getlineEPcl', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE7getlineEPclc', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE7putbackEc', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE8readsomeEPcl', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEEC1EPNS_15basic_streambufIcS2_EE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEEC2EPNS_15basic_streambufIcS2_EE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsEPFRNS_8ios_baseES5_E', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsEPFRNS_9basic_iosIcS2_EES6_E', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsEPFRS3_S4_E', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsEPNS_15basic_streambufIcS2_EE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERPv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERb', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERd', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERe', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERf', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERi', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERj', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERl', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERs', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERt', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERx', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERy', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE3getEPwl', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE3getEPwlw', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE3getERNS_15basic_streambufIwS2_EE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE3getERNS_15basic_streambufIwS2_EEw', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE3getERw', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE3getEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE4peekEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE4readEPwl', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE4swapERS3_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE4syncEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE5seekgENS_4fposI11__mbstate_tEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE5seekgExNS_8ios_base7seekdirE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE5tellgEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE5ungetEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE6ignoreElj', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE6sentryC1ERS3_b', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE6sentryC2ERS3_b', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE7getlineEPwl', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE7getlineEPwlw', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE7putbackEw', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE8readsomeEPwl', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEEC1EPNS_15basic_streambufIwS2_EE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEEC2EPNS_15basic_streambufIwS2_EE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsEPFRNS_8ios_baseES5_E', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsEPFRNS_9basic_iosIwS2_EES6_E', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsEPFRS3_S4_E', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsEPNS_15basic_streambufIwS2_EE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERPv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERb', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERd', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERe', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERf', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERi', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERj', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERl', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERs', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERt', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERx', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERy', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE3putEc', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE4swapERS3_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE5flushEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE5seekpENS_4fposI11__mbstate_tEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE5seekpExNS_8ios_base7seekdirE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE5tellpEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE5writeEPKcl', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE6sentryC1ERS3_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE6sentryC2ERS3_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE6sentryD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE6sentryD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEEC1EPNS_15basic_streambufIcS2_EE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEEC2EPNS_15basic_streambufIcS2_EE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEPFRNS_8ios_baseES5_E', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEPFRNS_9basic_iosIcS2_EES6_E', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEPFRS3_S4_E', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEPKv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEPNS_15basic_streambufIcS2_EE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEb', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEd', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEe', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEf', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEi', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEj', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEl', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEs', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEt', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEx', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEy', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEE3putEw', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEE4swapERS3_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEE5flushEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEE5seekpENS_4fposI11__mbstate_tEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEE5seekpExNS_8ios_base7seekdirE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEE5tellpEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEE5writeEPKwl', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEE6sentryC1ERS3_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEE6sentryC2ERS3_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEE6sentryD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEE6sentryD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEEC1EPNS_15basic_streambufIwS2_EE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEEC2EPNS_15basic_streambufIwS2_EE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEPFRNS_8ios_baseES5_E', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEPFRNS_9basic_iosIwS2_EES6_E', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEPFRS3_S4_E', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEPKv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEPNS_15basic_streambufIwS2_EE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEb', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEd', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEe', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEf', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEi', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEj', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEl', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEs', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEt', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEx', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEy', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113random_deviceC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113random_deviceC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113random_deviceD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113random_deviceD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113random_deviceclEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113shared_futureIvED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113shared_futureIvED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113shared_futureIvEaSERKS1_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__114__get_const_dbEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__114__num_get_base10__get_baseERNS_8ios_baseE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__114__num_get_base5__srcE', 'size': 33, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__114__num_put_base12__format_intEPcPKcbj', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__114__num_put_base14__format_floatEPcPKcj', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__114__num_put_base18__identify_paddingEPcS1_RKNS_8ios_baseE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__114__shared_count12__add_sharedEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__114__shared_count16__release_sharedEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__114__shared_countD0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__114__shared_countD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__114__shared_countD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__114basic_iostreamIcNS_11char_traitsIcEEE4swapERS3_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__114basic_iostreamIcNS_11char_traitsIcEEEC1EPNS_15basic_streambufIcS2_EE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__114basic_iostreamIcNS_11char_traitsIcEEEC2EPNS_15basic_streambufIcS2_EE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__114basic_iostreamIcNS_11char_traitsIcEEED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__114basic_iostreamIcNS_11char_traitsIcEEED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__114basic_iostreamIcNS_11char_traitsIcEEED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__114codecvt_bynameIDic11__mbstate_tED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__114codecvt_bynameIDic11__mbstate_tED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__114codecvt_bynameIDic11__mbstate_tED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__114codecvt_bynameIDsc11__mbstate_tED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__114codecvt_bynameIDsc11__mbstate_tED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__114codecvt_bynameIDsc11__mbstate_tED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__114codecvt_bynameIcc11__mbstate_tED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__114codecvt_bynameIcc11__mbstate_tED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__114codecvt_bynameIcc11__mbstate_tED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__114codecvt_bynameIwc11__mbstate_tED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__114codecvt_bynameIwc11__mbstate_tED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__114codecvt_bynameIwc11__mbstate_tED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__114collate_bynameIcEC1EPKcm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__114collate_bynameIcEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__114collate_bynameIcEC2EPKcm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__114collate_bynameIcEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__114collate_bynameIcED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__114collate_bynameIcED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__114collate_bynameIcED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__114collate_bynameIwEC1EPKcm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__114collate_bynameIwEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__114collate_bynameIwEC2EPKcm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__114collate_bynameIwEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__114collate_bynameIwED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__114collate_bynameIwED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__114collate_bynameIwED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__114error_categoryC2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__114error_categoryD0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__114error_categoryD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__114error_categoryD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115__get_classnameEPKcb', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115__thread_struct25notify_all_at_thread_exitEPNS_18condition_variableEPNS_5mutexE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115__thread_struct27__make_ready_at_thread_exitEPNS_17__assoc_sub_stateE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115__thread_structC1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115__thread_structC2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115__thread_structD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115__thread_structD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE10pubseekoffExNS_8ios_base7seekdirEj', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE10pubseekposENS_4fposI11__mbstate_tEEj', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE4setgEPcS4_S4_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE4setpEPcS4_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE4swapERS3_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE4syncEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE5gbumpEi', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE5imbueERKNS_6localeE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE5pbumpEi', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE5sgetcEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE5sgetnEPcl', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE5sputcEc', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE5sputnEPKcl', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE5uflowEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE6sbumpcEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE6setbufEPcl', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE6snextcEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE6xsgetnEPcl', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE6xsputnEPKcl', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE7pubsyncEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE7seekoffExNS_8ios_base7seekdirEj', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE7seekposENS_4fposI11__mbstate_tEEj', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE7sungetcEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE8in_availEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE8overflowEi', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE8pubimbueERKNS_6localeE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE9pbackfailEi', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE9pubsetbufEPcl', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE9showmanycEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE9sputbackcEc', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE9underflowEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEEC1ERKS3_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEEC1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEEC2ERKS3_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEEC2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEEaSERKS3_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE10pubseekoffExNS_8ios_base7seekdirEj', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE10pubseekposENS_4fposI11__mbstate_tEEj', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE4setgEPwS4_S4_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE4setpEPwS4_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE4swapERS3_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE4syncEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE5gbumpEi', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE5imbueERKNS_6localeE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE5pbumpEi', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE5sgetcEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE5sgetnEPwl', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE5sputcEw', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE5sputnEPKwl', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE5uflowEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE6sbumpcEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE6setbufEPwl', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE6snextcEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE6xsgetnEPwl', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE6xsputnEPKwl', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE7pubsyncEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE7seekoffExNS_8ios_base7seekdirEj', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE7seekposENS_4fposI11__mbstate_tEEj', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE7sungetcEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE8in_availEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE8overflowEj', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE8pubimbueERKNS_6localeE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE9pbackfailEj', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE9pubsetbufEPwl', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE9showmanycEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE9sputbackcEw', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE9underflowEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEEC1ERKS3_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEEC1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEEC2ERKS3_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEEC2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEEaSERKS3_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115future_categoryEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115numpunct_bynameIcE6__initEPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115numpunct_bynameIcEC1EPKcm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115numpunct_bynameIcEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115numpunct_bynameIcEC2EPKcm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115numpunct_bynameIcEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115numpunct_bynameIcED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115numpunct_bynameIcED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115numpunct_bynameIcED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115numpunct_bynameIwE6__initEPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115numpunct_bynameIwEC1EPKcm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115numpunct_bynameIwEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115numpunct_bynameIwEC2EPKcm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115numpunct_bynameIwEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115numpunct_bynameIwED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115numpunct_bynameIwED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115numpunct_bynameIwED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115recursive_mutex4lockEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115recursive_mutex6unlockEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115recursive_mutex8try_lockEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115recursive_mutexC1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115recursive_mutexC2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115recursive_mutexD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115recursive_mutexD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__115system_categoryEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__116__check_groupingERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPjS8_Rj', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__116__narrow_to_utf8ILm16EED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__116__narrow_to_utf8ILm16EED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__116__narrow_to_utf8ILm16EED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__116__narrow_to_utf8ILm32EED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__116__narrow_to_utf8ILm32EED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__116__narrow_to_utf8ILm32EED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__116generic_categoryEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__117__assoc_sub_state10__sub_waitERNS_11unique_lockINS_5mutexEEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__117__assoc_sub_state12__make_readyEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__117__assoc_sub_state13set_exceptionESt13exception_ptr', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__117__assoc_sub_state16__on_zero_sharedEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__117__assoc_sub_state24set_value_at_thread_exitEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__117__assoc_sub_state28set_exception_at_thread_exitESt13exception_ptr', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__117__assoc_sub_state4copyEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__117__assoc_sub_state4waitEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__117__assoc_sub_state9__executeEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__117__assoc_sub_state9set_valueEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__117__widen_from_utf8ILm16EED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__117__widen_from_utf8ILm16EED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__117__widen_from_utf8ILm16EED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__117__widen_from_utf8ILm32EED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__117__widen_from_utf8ILm32EED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__117__widen_from_utf8ILm32EED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__117declare_reachableEPv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__117iostream_categoryEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__117moneypunct_bynameIcLb0EE4initEPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__117moneypunct_bynameIcLb1EE4initEPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__117moneypunct_bynameIwLb0EE4initEPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__117moneypunct_bynameIwLb1EE4initEPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__118__time_get_storageIcE4initERKNS_5ctypeIcEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__118__time_get_storageIcE9__analyzeEcRKNS_5ctypeIcEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__118__time_get_storageIcEC1EPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__118__time_get_storageIcEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__118__time_get_storageIcEC2EPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__118__time_get_storageIcEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__118__time_get_storageIwE4initERKNS_5ctypeIwEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__118__time_get_storageIwE9__analyzeEcRKNS_5ctypeIwEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__118__time_get_storageIwEC1EPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__118__time_get_storageIwEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__118__time_get_storageIwEC2EPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__118__time_get_storageIwEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__118condition_variable10notify_allEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__118condition_variable10notify_oneEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__118condition_variable15__do_timed_waitERNS_11unique_lockINS_5mutexEEENS_6chrono10time_pointINS5_12system_clockENS5_8durationIxNS_5ratioILl1ELl1000000000EEEEEEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__118condition_variable4waitERNS_11unique_lockINS_5mutexEEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__118condition_variableD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__118condition_variableD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__118get_pointer_safetyEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__118shared_timed_mutex11lock_sharedEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__118shared_timed_mutex13unlock_sharedEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__118shared_timed_mutex15try_lock_sharedEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__118shared_timed_mutex4lockEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__118shared_timed_mutex6unlockEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__118shared_timed_mutex8try_lockEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__118shared_timed_mutexC1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__118shared_timed_mutexC2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__119__shared_mutex_base11lock_sharedEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__119__shared_mutex_base13unlock_sharedEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__119__shared_mutex_base15try_lock_sharedEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__119__shared_mutex_base4lockEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__119__shared_mutex_base6unlockEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__119__shared_mutex_base8try_lockEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__119__shared_mutex_baseC1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__119__shared_mutex_baseC2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__119__shared_weak_count10__add_weakEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__119__shared_weak_count12__add_sharedEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__119__shared_weak_count14__release_weakEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__119__shared_weak_count16__release_sharedEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__119__shared_weak_count4lockEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__119__shared_weak_countD0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__119__shared_weak_countD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__119__shared_weak_countD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__119__thread_local_dataEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__119declare_no_pointersEPcm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__119piecewise_constructE', 'size': 1, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__120__get_collation_nameEPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__120__throw_system_errorEiPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__121__throw_runtime_errorEPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__121__undeclare_reachableEPv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__121recursive_timed_mutex4lockEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__121recursive_timed_mutex6unlockEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__121recursive_timed_mutex8try_lockEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__121recursive_timed_mutexC1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__121recursive_timed_mutexC2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__121recursive_timed_mutexD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__121recursive_timed_mutexD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__121undeclare_no_pointersEPcm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__123__libcpp_debug_functionE', 'size': 8, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__124__libcpp_debug_exceptionC1ERKNS_19__libcpp_debug_infoE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__124__libcpp_debug_exceptionC1ERKS0_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__124__libcpp_debug_exceptionC1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__124__libcpp_debug_exceptionC2ERKNS_19__libcpp_debug_infoE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__124__libcpp_debug_exceptionC2ERKS0_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__124__libcpp_debug_exceptionC2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__124__libcpp_debug_exceptionD0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__124__libcpp_debug_exceptionD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__124__libcpp_debug_exceptionD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__125notify_all_at_thread_exitERNS_18condition_variableENS_11unique_lockINS_5mutexEEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIaaEEPaEEbT0_S5_T_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIccEEPcEEbT0_S5_T_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIddEEPdEEbT0_S5_T_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIeeEEPeEEbT0_S5_T_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIffEEPfEEbT0_S5_T_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIhhEEPhEEbT0_S5_T_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIiiEEPiEEbT0_S5_T_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIjjEEPjEEbT0_S5_T_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIllEEPlEEbT0_S5_T_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__127__insertion_sort_incompleteIRNS_6__lessImmEEPmEEbT0_S5_T_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIssEEPsEEbT0_S5_T_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIttEEPtEEbT0_S5_T_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIwwEEPwEEbT0_S5_T_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIxxEEPxEEbT0_S5_T_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIyyEEPyEEbT0_S5_T_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__127__libcpp_set_debug_functionEPFvRKNS_19__libcpp_debug_infoEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__129__libcpp_abort_debug_functionERKNS_19__libcpp_debug_infoE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__129__libcpp_throw_debug_functionERKNS_19__libcpp_debug_infoE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__13cinE', 'size': 168, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__14cerrE', 'size': 160, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__14clogE', 'size': 160, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__14coutE', 'size': 160, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__14stodERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__14stodERKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEEPm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__14stofERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__14stofERKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEEPm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__14stoiERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPmi', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__14stoiERKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEEPmi', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__14stolERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPmi', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__14stolERKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEEPmi', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__14wcinE', 'size': 168, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__15alignEmmRPvRm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__15ctypeIcE13classic_tableEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__15ctypeIcE21__classic_lower_tableEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__15ctypeIcE21__classic_upper_tableEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__15ctypeIcE2idE', 'size': 16, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__15ctypeIcEC1EPKtbm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__15ctypeIcEC2EPKtbm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__15ctypeIcED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__15ctypeIcED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__15ctypeIcED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__15ctypeIwE2idE', 'size': 16, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__15ctypeIwED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__15ctypeIwED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__15ctypeIwED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__15mutex4lockEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__15mutex6unlockEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__15mutex8try_lockEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__15mutexD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__15mutexD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__15stoldERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__15stoldERKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEEPm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__15stollERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPmi', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__15stollERKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEEPmi', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__15stoulERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPmi', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__15stoulERKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEEPmi', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__15wcerrE', 'size': 160, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__15wclogE', 'size': 160, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__15wcoutE', 'size': 160, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__16__clocEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__16__itoa8__u32toaEjPc', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__16__itoa8__u64toaEmPc', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__16__sortIRNS_6__lessIaaEEPaEEvT0_S5_T_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__16__sortIRNS_6__lessIccEEPcEEvT0_S5_T_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__16__sortIRNS_6__lessIddEEPdEEvT0_S5_T_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__16__sortIRNS_6__lessIeeEEPeEEvT0_S5_T_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__16__sortIRNS_6__lessIffEEPfEEvT0_S5_T_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__16__sortIRNS_6__lessIhhEEPhEEvT0_S5_T_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__16__sortIRNS_6__lessIiiEEPiEEvT0_S5_T_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__16__sortIRNS_6__lessIjjEEPjEEvT0_S5_T_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__16__sortIRNS_6__lessIllEEPlEEvT0_S5_T_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__16__sortIRNS_6__lessImmEEPmEEvT0_S5_T_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__16__sortIRNS_6__lessIssEEPsEEvT0_S5_T_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__16__sortIRNS_6__lessIttEEPtEEvT0_S5_T_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__16__sortIRNS_6__lessIwwEEPwEEvT0_S5_T_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__16__sortIRNS_6__lessIxxEEPxEEvT0_S5_T_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__16__sortIRNS_6__lessIyyEEPyEEvT0_S5_T_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__16chrono12steady_clock3nowEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__16chrono12steady_clock9is_steadyE', 'size': 1, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__16chrono12system_clock11from_time_tEl', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__16chrono12system_clock3nowEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__16chrono12system_clock9is_steadyE', 'size': 1, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__16chrono12system_clock9to_time_tERKNS0_10time_pointIS1_NS0_8durationIxNS_5ratioILl1ELl1000000EEEEEEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__16futureIvE3getEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__16futureIvEC1EPNS_17__assoc_sub_stateE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__16futureIvEC2EPNS_17__assoc_sub_stateE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__16futureIvED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__16futureIvED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__16gslice6__initEm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__16locale14__install_ctorERKS0_PNS0_5facetEl', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__16locale2id5__getEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__16locale2id6__initEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__16locale2id9__next_idE', 'size': 4, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__16locale3allE', 'size': 4, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__16locale4noneE', 'size': 4, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__16locale4timeE', 'size': 4, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__16locale5ctypeE', 'size': 4, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__16locale5facet16__on_zero_sharedEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__16locale5facetD0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__16locale5facetD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__16locale5facetD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__16locale6globalERKS0_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__16locale7classicEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__16locale7collateE', 'size': 4, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__16locale7numericE', 'size': 4, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__16locale8__globalEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__16locale8messagesE', 'size': 4, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__16locale8monetaryE', 'size': 4, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__16localeC1EPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__16localeC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__16localeC1ERKS0_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__16localeC1ERKS0_PKci', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__16localeC1ERKS0_RKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEi', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__16localeC1ERKS0_S2_i', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__16localeC1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__16localeC2EPKc', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__16localeC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__16localeC2ERKS0_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__16localeC2ERKS0_PKci', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__16localeC2ERKS0_RKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEi', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__16localeC2ERKS0_S2_i', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__16localeC2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__16localeD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__16localeD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__16localeaSERKS0_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__16stoullERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPmi', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__16stoullERKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEEPmi', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__16thread20hardware_concurrencyEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__16thread4joinEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__16thread6detachEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__16threadD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__16threadD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__17__sort5IRNS_6__lessIeeEEPeEEjT0_S5_S5_S5_S5_T_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__17codecvtIDic11__mbstate_tE2idE', 'size': 16, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__17codecvtIDic11__mbstate_tED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__17codecvtIDic11__mbstate_tED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__17codecvtIDic11__mbstate_tED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__17codecvtIDsc11__mbstate_tE2idE', 'size': 16, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__17codecvtIDsc11__mbstate_tED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__17codecvtIDsc11__mbstate_tED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__17codecvtIDsc11__mbstate_tED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__17codecvtIcc11__mbstate_tE2idE', 'size': 16, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__17codecvtIcc11__mbstate_tED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__17codecvtIcc11__mbstate_tED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__17codecvtIcc11__mbstate_tED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__17codecvtIwc11__mbstate_tE2idE', 'size': 16, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__17codecvtIwc11__mbstate_tEC1EPKcm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__17codecvtIwc11__mbstate_tEC1Em', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__17codecvtIwc11__mbstate_tEC2EPKcm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__17codecvtIwc11__mbstate_tEC2Em', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__17codecvtIwc11__mbstate_tED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__17codecvtIwc11__mbstate_tED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__17codecvtIwc11__mbstate_tED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__17collateIcE2idE', 'size': 16, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__17collateIcED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__17collateIcED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__17collateIcED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__17collateIwE2idE', 'size': 16, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__17collateIwED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__17collateIwED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__17collateIwED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE2idE', 'size': 16, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE2idE', 'size': 16, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE2idE', 'size': 16, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE2idE', 'size': 16, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__17promiseIvE10get_futureEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__17promiseIvE13set_exceptionESt13exception_ptr', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__17promiseIvE24set_value_at_thread_exitEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__17promiseIvE28set_exception_at_thread_exitESt13exception_ptr', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__17promiseIvE9set_valueEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__17promiseIvEC1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__17promiseIvEC2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__17promiseIvED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__17promiseIvED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__18__c_node5__addEPNS_8__i_nodeE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__18__c_nodeD0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__18__c_nodeD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__18__c_nodeD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__18__get_dbEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__18__i_nodeD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__18__i_nodeD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__18__rs_getEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__18__sp_mut4lockEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__18__sp_mut6unlockEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__18ios_base10floatfieldE', 'size': 4, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__18ios_base10scientificE', 'size': 4, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__18ios_base11adjustfieldE', 'size': 4, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__18ios_base15sync_with_stdioEb', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__18ios_base16__call_callbacksENS0_5eventE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__18ios_base17register_callbackEPFvNS0_5eventERS0_iEi', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__18ios_base2inE', 'size': 4, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__18ios_base33__set_badbit_and_consider_rethrowEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__18ios_base34__set_failbit_and_consider_rethrowEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__18ios_base3appE', 'size': 4, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__18ios_base3ateE', 'size': 4, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__18ios_base3decE', 'size': 4, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__18ios_base3hexE', 'size': 4, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__18ios_base3octE', 'size': 4, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__18ios_base3outE', 'size': 4, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__18ios_base4InitC1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__18ios_base4InitC2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__18ios_base4InitD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__18ios_base4InitD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__18ios_base4initEPv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__18ios_base4leftE', 'size': 4, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__18ios_base4moveERS0_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__18ios_base4swapERS0_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__18ios_base5clearEj', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__18ios_base5fixedE', 'size': 4, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__18ios_base5imbueERKNS_6localeE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__18ios_base5iwordEi', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__18ios_base5pwordEi', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__18ios_base5rightE', 'size': 4, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__18ios_base5truncE', 'size': 4, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__18ios_base6badbitE', 'size': 4, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__18ios_base6binaryE', 'size': 4, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__18ios_base6eofbitE', 'size': 4, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__18ios_base6skipwsE', 'size': 4, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__18ios_base6xallocEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__18ios_base7copyfmtERKS0_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__18ios_base7failbitE', 'size': 4, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__18ios_base7failureC1EPKcRKNS_10error_codeE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__18ios_base7failureC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERKNS_10error_codeE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__18ios_base7failureC2EPKcRKNS_10error_codeE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__18ios_base7failureC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERKNS_10error_codeE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__18ios_base7failureD0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__18ios_base7failureD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__18ios_base7failureD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__18ios_base7goodbitE', 'size': 4, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__18ios_base7showposE', 'size': 4, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__18ios_base7unitbufE', 'size': 4, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__18ios_base8internalE', 'size': 4, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__18ios_base8showbaseE', 'size': 4, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__18ios_base9__xindex_E', 'size': 4, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__18ios_base9basefieldE', 'size': 4, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__18ios_base9boolalphaE', 'size': 4, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__18ios_base9showpointE', 'size': 4, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__18ios_base9uppercaseE', 'size': 4, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__18ios_baseD0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__18ios_baseD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__18ios_baseD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__18messagesIcE2idE', 'size': 16, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__18messagesIwE2idE', 'size': 16, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__18numpunctIcE2idE', 'size': 16, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__18numpunctIcEC1Em', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__18numpunctIcEC2Em', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__18numpunctIcED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__18numpunctIcED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__18numpunctIcED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__18numpunctIwE2idE', 'size': 16, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__18numpunctIwEC1Em', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__18numpunctIwEC2Em', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__18numpunctIwED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__18numpunctIwED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__18numpunctIwED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE2idE', 'size': 16, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE2idE', 'size': 16, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__18time_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE2idE', 'size': 16, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__18time_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE2idE', 'size': 16, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__18valarrayImE6resizeEmm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__18valarrayImEC1Em', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__18valarrayImEC2Em', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__18valarrayImED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__18valarrayImED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__19__num_getIcE17__stage2_int_loopEciPcRS2_RjcRKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPjRSD_S2_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__19__num_getIcE17__stage2_int_prepERNS_8ios_baseEPcRc', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__19__num_getIcE19__stage2_float_loopEcRbRcPcRS4_ccRKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPjRSE_RjS4_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__19__num_getIcE19__stage2_float_prepERNS_8ios_baseEPcRcS5_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__19__num_getIwE17__stage2_int_loopEwiPcRS2_RjwRKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPjRSD_Pw', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__19__num_getIwE17__stage2_int_prepERNS_8ios_baseEPwRw', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__19__num_getIwE19__stage2_float_loopEwRbRcPcRS4_wwRKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPjRSE_RjPw', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__19__num_getIwE19__stage2_float_prepERNS_8ios_baseEPwRwS5_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__19__num_putIcE21__widen_and_group_intEPcS2_S2_S2_RS2_S3_RKNS_6localeE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__19__num_putIcE23__widen_and_group_floatEPcS2_S2_S2_RS2_S3_RKNS_6localeE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__19__num_putIwE21__widen_and_group_intEPcS2_S2_PwRS3_S4_RKNS_6localeE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__19__num_putIwE23__widen_and_group_floatEPcS2_S2_PwRS3_S4_RKNS_6localeE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__19basic_iosIcNS_11char_traitsIcEEE7copyfmtERKS3_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__19basic_iosIcNS_11char_traitsIcEEED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__19basic_iosIcNS_11char_traitsIcEEED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__19basic_iosIcNS_11char_traitsIcEEED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__19basic_iosIwNS_11char_traitsIwEEE7copyfmtERKS3_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__19basic_iosIwNS_11char_traitsIwEEED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__19basic_iosIwNS_11char_traitsIwEEED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__19basic_iosIwNS_11char_traitsIwEEED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__19money_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE2idE', 'size': 16, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__19money_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE8__do_getERS4_S4_bRKNS_6localeEjRjRbRKNS_5ctypeIcEERNS_10unique_ptrIcPFvPvEEERPcSM_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__19money_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE2idE', 'size': 16, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__19money_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE8__do_getERS4_S4_bRKNS_6localeEjRjRbRKNS_5ctypeIwEERNS_10unique_ptrIwPFvPvEEERPwSM_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__19money_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE2idE', 'size': 16, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__19money_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE2idE', 'size': 16, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZNSt3__19strstreamD0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__19strstreamD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__19strstreamD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__19to_stringEd', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__19to_stringEe', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__19to_stringEf', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__19to_stringEi', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__19to_stringEj', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__19to_stringEl', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__19to_stringEm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__19to_stringEx', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__19to_stringEy', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__1plIcNS_11char_traitsIcEENS_9allocatorIcEEEENS_12basic_stringIT_T0_T1_EEPKS6_RKS9_', 'type': 'FUNC'} +{'is_defined': False, 'name': '_ZNSt8bad_castC1Ev', 'type': 'FUNC'} +{'is_defined': False, 'name': '_ZNSt8bad_castD1Ev', 'type': 'FUNC'} +{'is_defined': False, 'name': '_ZNSt8bad_castD2Ev', 'type': 'FUNC'} +{'is_defined': False, 'name': '_ZNSt9bad_allocC1Ev', 'type': 'FUNC'} +{'is_defined': False, 'name': '_ZNSt9bad_allocD1Ev', 'type': 'FUNC'} +{'is_defined': False, 'name': '_ZNSt9exceptionD2Ev', 'type': 'FUNC'} +{'is_defined': False, 'name': '_ZSt15get_new_handlerv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZSt17__throw_bad_allocv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZSt17current_exceptionv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZSt17rethrow_exceptionSt13exception_ptr', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZSt18uncaught_exceptionv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZSt19uncaught_exceptionsv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZSt7nothrow', 'size': 1, 'type': 'OBJECT'} +{'is_defined': False, 'name': '_ZSt9terminatev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZTCNSt3__110istrstreamE0_NS_13basic_istreamIcNS_11char_traitsIcEEEE', 'size': 80, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTCNSt3__110ostrstreamE0_NS_13basic_ostreamIcNS_11char_traitsIcEEEE', 'size': 80, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTCNSt3__114basic_iostreamIcNS_11char_traitsIcEEEE0_NS_13basic_istreamIcS2_EE', 'size': 80, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTCNSt3__114basic_iostreamIcNS_11char_traitsIcEEEE16_NS_13basic_ostreamIcS2_EE', 'size': 80, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTCNSt3__19strstreamE0_NS_13basic_istreamIcNS_11char_traitsIcEEEE', 'size': 80, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTCNSt3__19strstreamE0_NS_14basic_iostreamIcNS_11char_traitsIcEEEE', 'size': 120, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTCNSt3__19strstreamE16_NS_13basic_ostreamIcNS_11char_traitsIcEEEE', 'size': 80, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt12experimental15fundamentals_v112bad_any_castE', 'size': 24, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt12experimental19bad_optional_accessE', 'size': 24, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__110__time_getE', 'size': 16, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__110__time_putE', 'size': 16, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__110ctype_baseE', 'size': 16, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__110istrstreamE', 'size': 24, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__110money_baseE', 'size': 16, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__110moneypunctIcLb0EEE', 'size': 56, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__110moneypunctIcLb1EEE', 'size': 56, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__110moneypunctIwLb0EEE', 'size': 56, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__110moneypunctIwLb1EEE', 'size': 56, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__110ostrstreamE', 'size': 24, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__111__money_getIcEE', 'size': 16, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__111__money_getIwEE', 'size': 16, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__111__money_putIcEE', 'size': 16, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__111__money_putIwEE', 'size': 16, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__111regex_errorE', 'size': 24, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__112bad_weak_ptrE', 'size': 24, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__112codecvt_baseE', 'size': 16, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__112ctype_bynameIcEE', 'size': 24, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__112ctype_bynameIwEE', 'size': 24, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__112future_errorE', 'size': 24, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__112strstreambufE', 'size': 24, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__112system_errorE', 'size': 24, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__113basic_istreamIcNS_11char_traitsIcEEEE', 'size': 40, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__113basic_istreamIwNS_11char_traitsIwEEEE', 'size': 40, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__113basic_ostreamIcNS_11char_traitsIcEEEE', 'size': 40, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__113basic_ostreamIwNS_11char_traitsIwEEEE', 'size': 40, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__113messages_baseE', 'size': 16, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__114__codecvt_utf8IDiEE', 'size': 24, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__114__codecvt_utf8IDsEE', 'size': 24, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__114__codecvt_utf8IwEE', 'size': 24, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__114__num_get_baseE', 'size': 16, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__114__num_put_baseE', 'size': 16, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__114__shared_countE', 'size': 16, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__114basic_iostreamIcNS_11char_traitsIcEEEE', 'size': 56, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__114codecvt_bynameIDic11__mbstate_tEE', 'size': 24, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__114codecvt_bynameIDsc11__mbstate_tEE', 'size': 24, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__114codecvt_bynameIcc11__mbstate_tEE', 'size': 24, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__114codecvt_bynameIwc11__mbstate_tEE', 'size': 24, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__114collate_bynameIcEE', 'size': 24, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__114collate_bynameIwEE', 'size': 24, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__114error_categoryE', 'size': 16, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__115__codecvt_utf16IDiLb0EEE', 'size': 24, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__115__codecvt_utf16IDiLb1EEE', 'size': 24, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__115__codecvt_utf16IDsLb0EEE', 'size': 24, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__115__codecvt_utf16IDsLb1EEE', 'size': 24, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__115__codecvt_utf16IwLb0EEE', 'size': 24, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__115__codecvt_utf16IwLb1EEE', 'size': 24, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__115basic_streambufIcNS_11char_traitsIcEEEE', 'size': 16, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__115basic_streambufIwNS_11char_traitsIwEEEE', 'size': 16, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__115messages_bynameIcEE', 'size': 24, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__115messages_bynameIwEE', 'size': 24, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__115numpunct_bynameIcEE', 'size': 24, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__115numpunct_bynameIwEE', 'size': 24, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__115time_get_bynameIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 56, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__115time_get_bynameIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 56, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__115time_put_bynameIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 24, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__115time_put_bynameIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 24, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__116__narrow_to_utf8ILm16EEE', 'size': 24, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__116__narrow_to_utf8ILm32EEE', 'size': 24, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__117__assoc_sub_stateE', 'size': 24, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__117__widen_from_utf8ILm16EEE', 'size': 24, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__117__widen_from_utf8ILm32EEE', 'size': 24, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__117moneypunct_bynameIcLb0EEE', 'size': 24, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__117moneypunct_bynameIcLb1EEE', 'size': 24, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__117moneypunct_bynameIwLb0EEE', 'size': 24, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__117moneypunct_bynameIwLb1EEE', 'size': 24, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__118__time_get_storageIcEE', 'size': 24, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__118__time_get_storageIwEE', 'size': 24, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__119__shared_weak_countE', 'size': 40, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__120__codecvt_utf8_utf16IDiEE', 'size': 24, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__120__codecvt_utf8_utf16IDsEE', 'size': 24, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__120__codecvt_utf8_utf16IwEE', 'size': 24, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__120__time_get_c_storageIcEE', 'size': 16, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__120__time_get_c_storageIwEE', 'size': 16, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__124__libcpp_debug_exceptionE', 'size': 24, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__15ctypeIcEE', 'size': 56, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__15ctypeIwEE', 'size': 56, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__16locale5facetE', 'size': 24, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__17codecvtIDic11__mbstate_tEE', 'size': 56, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__17codecvtIDsc11__mbstate_tEE', 'size': 56, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__17codecvtIcc11__mbstate_tEE', 'size': 56, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__17codecvtIwc11__mbstate_tEE', 'size': 56, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__17collateIcEE', 'size': 24, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__17collateIwEE', 'size': 24, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 56, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 56, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 56, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 56, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__18__c_nodeE', 'size': 16, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__18ios_base7failureE', 'size': 24, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__18ios_baseE', 'size': 16, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__18messagesIcEE', 'size': 56, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__18messagesIwEE', 'size': 56, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__18numpunctIcEE', 'size': 24, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__18numpunctIwEE', 'size': 24, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 72, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 72, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__18time_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 56, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__18time_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 56, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__19__num_getIcEE', 'size': 40, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__19__num_getIwEE', 'size': 40, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__19__num_putIcEE', 'size': 40, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__19__num_putIwEE', 'size': 40, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__19basic_iosIcNS_11char_traitsIcEEEE', 'size': 24, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__19basic_iosIwNS_11char_traitsIwEEEE', 'size': 24, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__19money_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 56, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__19money_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 56, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__19money_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 56, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__19money_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 56, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__19strstreamE', 'size': 24, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTINSt3__19time_baseE', 'size': 16, 'type': 'OBJECT'} +{'is_defined': False, 'name': '_ZTISt11logic_error', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTISt12bad_any_cast', 'size': 24, 'type': 'OBJECT'} +{'is_defined': False, 'name': '_ZTISt12length_error', 'size': 0, 'type': 'OBJECT'} +{'is_defined': False, 'name': '_ZTISt12out_of_range', 'size': 0, 'type': 'OBJECT'} +{'is_defined': False, 'name': '_ZTISt13runtime_error', 'size': 0, 'type': 'OBJECT'} +{'is_defined': False, 'name': '_ZTISt14overflow_error', 'size': 0, 'type': 'OBJECT'} +{'is_defined': False, 'name': '_ZTISt16invalid_argument', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTISt16nested_exception', 'size': 16, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTISt18bad_variant_access', 'size': 24, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTISt19bad_optional_access', 'size': 24, 'type': 'OBJECT'} +{'is_defined': False, 'name': '_ZTISt8bad_cast', 'size': 0, 'type': 'OBJECT'} +{'is_defined': False, 'name': '_ZTISt9bad_alloc', 'size': 0, 'type': 'OBJECT'} +{'is_defined': False, 'name': '_ZTISt9exception', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt12experimental15fundamentals_v112bad_any_castE', 'size': 50, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt12experimental19bad_optional_accessE', 'size': 40, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__110__time_getE', 'size': 21, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__110__time_putE', 'size': 21, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__110ctype_baseE', 'size': 21, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__110istrstreamE', 'size': 21, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__110money_baseE', 'size': 21, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__110moneypunctIcLb0EEE', 'size': 28, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__110moneypunctIcLb1EEE', 'size': 28, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__110moneypunctIwLb0EEE', 'size': 28, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__110moneypunctIwLb1EEE', 'size': 28, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__110ostrstreamE', 'size': 21, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__111__money_getIcEE', 'size': 25, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__111__money_getIwEE', 'size': 25, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__111__money_putIcEE', 'size': 25, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__111__money_putIwEE', 'size': 25, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__111regex_errorE', 'size': 22, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__112bad_weak_ptrE', 'size': 23, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__112codecvt_baseE', 'size': 23, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__112ctype_bynameIcEE', 'size': 26, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__112ctype_bynameIwEE', 'size': 26, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__112future_errorE', 'size': 23, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__112strstreambufE', 'size': 23, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__112system_errorE', 'size': 23, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__113basic_istreamIcNS_11char_traitsIcEEEE', 'size': 47, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__113basic_istreamIwNS_11char_traitsIwEEEE', 'size': 47, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__113basic_ostreamIcNS_11char_traitsIcEEEE', 'size': 47, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__113basic_ostreamIwNS_11char_traitsIwEEEE', 'size': 47, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__113messages_baseE', 'size': 24, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__114__codecvt_utf8IDiEE', 'size': 29, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__114__codecvt_utf8IDsEE', 'size': 29, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__114__codecvt_utf8IwEE', 'size': 28, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__114__num_get_baseE', 'size': 25, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__114__num_put_baseE', 'size': 25, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__114__shared_countE', 'size': 25, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__114basic_iostreamIcNS_11char_traitsIcEEEE', 'size': 48, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__114codecvt_bynameIDic11__mbstate_tEE', 'size': 43, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__114codecvt_bynameIDsc11__mbstate_tEE', 'size': 43, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__114codecvt_bynameIcc11__mbstate_tEE', 'size': 42, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__114codecvt_bynameIwc11__mbstate_tEE', 'size': 42, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__114collate_bynameIcEE', 'size': 28, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__114collate_bynameIwEE', 'size': 28, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__114error_categoryE', 'size': 25, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__115__codecvt_utf16IDiLb0EEE', 'size': 34, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__115__codecvt_utf16IDiLb1EEE', 'size': 34, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__115__codecvt_utf16IDsLb0EEE', 'size': 34, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__115__codecvt_utf16IDsLb1EEE', 'size': 34, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__115__codecvt_utf16IwLb0EEE', 'size': 33, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__115__codecvt_utf16IwLb1EEE', 'size': 33, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__115basic_streambufIcNS_11char_traitsIcEEEE', 'size': 49, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__115basic_streambufIwNS_11char_traitsIwEEEE', 'size': 49, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__115messages_bynameIcEE', 'size': 29, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__115messages_bynameIwEE', 'size': 29, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__115numpunct_bynameIcEE', 'size': 29, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__115numpunct_bynameIwEE', 'size': 29, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__115time_get_bynameIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 77, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__115time_get_bynameIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 77, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__115time_put_bynameIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 77, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__115time_put_bynameIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 77, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__116__narrow_to_utf8ILm16EEE', 'size': 34, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__116__narrow_to_utf8ILm32EEE', 'size': 34, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__117__assoc_sub_stateE', 'size': 28, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__117__widen_from_utf8ILm16EEE', 'size': 35, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__117__widen_from_utf8ILm32EEE', 'size': 35, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__117moneypunct_bynameIcLb0EEE', 'size': 35, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__117moneypunct_bynameIcLb1EEE', 'size': 35, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__117moneypunct_bynameIwLb0EEE', 'size': 35, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__117moneypunct_bynameIwLb1EEE', 'size': 35, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__118__time_get_storageIcEE', 'size': 32, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__118__time_get_storageIwEE', 'size': 32, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__119__shared_weak_countE', 'size': 30, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__120__codecvt_utf8_utf16IDiEE', 'size': 35, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__120__codecvt_utf8_utf16IDsEE', 'size': 35, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__120__codecvt_utf8_utf16IwEE', 'size': 34, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__120__time_get_c_storageIcEE', 'size': 34, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__120__time_get_c_storageIwEE', 'size': 34, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__124__libcpp_debug_exceptionE', 'size': 35, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__15ctypeIcEE', 'size': 18, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__15ctypeIwEE', 'size': 18, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__16locale5facetE', 'size': 22, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__17codecvtIDic11__mbstate_tEE', 'size': 35, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__17codecvtIDsc11__mbstate_tEE', 'size': 35, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__17codecvtIcc11__mbstate_tEE', 'size': 34, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__17codecvtIwc11__mbstate_tEE', 'size': 34, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__17collateIcEE', 'size': 20, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__17collateIwEE', 'size': 20, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 68, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 68, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 68, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 68, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__18__c_nodeE', 'size': 18, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__18ios_base7failureE', 'size': 26, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__18ios_baseE', 'size': 18, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__18messagesIcEE', 'size': 21, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__18messagesIwEE', 'size': 21, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__18numpunctIcEE', 'size': 21, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__18numpunctIwEE', 'size': 21, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 69, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 69, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__18time_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 69, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__18time_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 69, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__19__num_getIcEE', 'size': 22, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__19__num_getIwEE', 'size': 22, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__19__num_putIcEE', 'size': 22, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__19__num_putIwEE', 'size': 22, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__19basic_iosIcNS_11char_traitsIcEEEE', 'size': 42, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__19basic_iosIwNS_11char_traitsIwEEEE', 'size': 42, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__19money_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 70, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__19money_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 70, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__19money_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 70, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__19money_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 70, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__19strstreamE', 'size': 19, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSNSt3__19time_baseE', 'size': 19, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSSt12bad_any_cast', 'size': 17, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSSt16nested_exception', 'size': 21, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSSt18bad_variant_access', 'size': 23, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTSSt19bad_optional_access', 'size': 24, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTTNSt3__110istrstreamE', 'size': 32, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTTNSt3__110ostrstreamE', 'size': 32, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTTNSt3__113basic_istreamIcNS_11char_traitsIcEEEE', 'size': 16, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTTNSt3__113basic_istreamIwNS_11char_traitsIwEEEE', 'size': 16, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTTNSt3__113basic_ostreamIcNS_11char_traitsIcEEEE', 'size': 16, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTTNSt3__113basic_ostreamIwNS_11char_traitsIwEEEE', 'size': 16, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTTNSt3__114basic_iostreamIcNS_11char_traitsIcEEEE', 'size': 56, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTTNSt3__19strstreamE', 'size': 80, 'type': 'OBJECT'} +{'is_defined': False, 'name': '_ZTVN10__cxxabiv117__class_type_infoE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': False, 'name': '_ZTVN10__cxxabiv120__si_class_type_infoE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': False, 'name': '_ZTVN10__cxxabiv121__vmi_class_type_infoE', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTVNSt12experimental15fundamentals_v112bad_any_castE', 'size': 40, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTVNSt12experimental19bad_optional_accessE', 'size': 40, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTVNSt3__110istrstreamE', 'size': 80, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTVNSt3__110moneypunctIcLb0EEE', 'size': 112, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTVNSt3__110moneypunctIcLb1EEE', 'size': 112, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTVNSt3__110moneypunctIwLb0EEE', 'size': 112, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTVNSt3__110moneypunctIwLb1EEE', 'size': 112, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTVNSt3__110ostrstreamE', 'size': 80, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTVNSt3__111regex_errorE', 'size': 40, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTVNSt3__112bad_weak_ptrE', 'size': 40, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTVNSt3__112ctype_bynameIcEE', 'size': 104, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTVNSt3__112ctype_bynameIwEE', 'size': 136, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTVNSt3__112future_errorE', 'size': 40, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTVNSt3__112strstreambufE', 'size': 128, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTVNSt3__112system_errorE', 'size': 40, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTVNSt3__113basic_istreamIcNS_11char_traitsIcEEEE', 'size': 80, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTVNSt3__113basic_istreamIwNS_11char_traitsIwEEEE', 'size': 80, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTVNSt3__113basic_ostreamIcNS_11char_traitsIcEEEE', 'size': 80, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTVNSt3__113basic_ostreamIwNS_11char_traitsIwEEEE', 'size': 80, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTVNSt3__114__codecvt_utf8IDiEE', 'size': 96, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTVNSt3__114__codecvt_utf8IDsEE', 'size': 96, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTVNSt3__114__codecvt_utf8IwEE', 'size': 96, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTVNSt3__114__shared_countE', 'size': 40, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTVNSt3__114basic_iostreamIcNS_11char_traitsIcEEEE', 'size': 120, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTVNSt3__114codecvt_bynameIDic11__mbstate_tEE', 'size': 96, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTVNSt3__114codecvt_bynameIDsc11__mbstate_tEE', 'size': 96, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTVNSt3__114codecvt_bynameIcc11__mbstate_tEE', 'size': 96, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTVNSt3__114codecvt_bynameIwc11__mbstate_tEE', 'size': 96, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTVNSt3__114collate_bynameIcEE', 'size': 64, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTVNSt3__114collate_bynameIwEE', 'size': 64, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTVNSt3__114error_categoryE', 'size': 72, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTVNSt3__115__codecvt_utf16IDiLb0EEE', 'size': 96, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTVNSt3__115__codecvt_utf16IDiLb1EEE', 'size': 96, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTVNSt3__115__codecvt_utf16IDsLb0EEE', 'size': 96, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTVNSt3__115__codecvt_utf16IDsLb1EEE', 'size': 96, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTVNSt3__115__codecvt_utf16IwLb0EEE', 'size': 96, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTVNSt3__115__codecvt_utf16IwLb1EEE', 'size': 96, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTVNSt3__115basic_streambufIcNS_11char_traitsIcEEEE', 'size': 128, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTVNSt3__115basic_streambufIwNS_11char_traitsIwEEEE', 'size': 128, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTVNSt3__115messages_bynameIcEE', 'size': 64, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTVNSt3__115messages_bynameIwEE', 'size': 64, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTVNSt3__115numpunct_bynameIcEE', 'size': 80, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTVNSt3__115numpunct_bynameIwEE', 'size': 80, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTVNSt3__115time_get_bynameIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 224, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTVNSt3__115time_get_bynameIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 224, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTVNSt3__115time_put_bynameIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 48, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTVNSt3__115time_put_bynameIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 48, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTVNSt3__116__narrow_to_utf8ILm16EEE', 'size': 96, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTVNSt3__116__narrow_to_utf8ILm32EEE', 'size': 96, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTVNSt3__117__assoc_sub_stateE', 'size': 48, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTVNSt3__117__widen_from_utf8ILm16EEE', 'size': 96, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTVNSt3__117__widen_from_utf8ILm32EEE', 'size': 96, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTVNSt3__117moneypunct_bynameIcLb0EEE', 'size': 112, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTVNSt3__117moneypunct_bynameIcLb1EEE', 'size': 112, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTVNSt3__117moneypunct_bynameIwLb0EEE', 'size': 112, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTVNSt3__117moneypunct_bynameIwLb1EEE', 'size': 112, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTVNSt3__119__shared_weak_countE', 'size': 56, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTVNSt3__120__codecvt_utf8_utf16IDiEE', 'size': 96, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTVNSt3__120__codecvt_utf8_utf16IDsEE', 'size': 96, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTVNSt3__120__codecvt_utf8_utf16IwEE', 'size': 96, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTVNSt3__124__libcpp_debug_exceptionE', 'size': 40, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTVNSt3__15ctypeIcEE', 'size': 104, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTVNSt3__15ctypeIwEE', 'size': 136, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTVNSt3__16locale5facetE', 'size': 40, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTVNSt3__17codecvtIDic11__mbstate_tEE', 'size': 96, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTVNSt3__17codecvtIDsc11__mbstate_tEE', 'size': 96, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTVNSt3__17codecvtIcc11__mbstate_tEE', 'size': 96, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTVNSt3__17codecvtIwc11__mbstate_tEE', 'size': 96, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTVNSt3__17collateIcEE', 'size': 64, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTVNSt3__17collateIwEE', 'size': 64, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTVNSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 128, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTVNSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 128, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTVNSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 104, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTVNSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 104, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTVNSt3__18__c_nodeE', 'size': 64, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTVNSt3__18ios_base7failureE', 'size': 40, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTVNSt3__18ios_baseE', 'size': 32, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTVNSt3__18messagesIcEE', 'size': 64, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTVNSt3__18messagesIwEE', 'size': 64, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTVNSt3__18numpunctIcEE', 'size': 80, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTVNSt3__18numpunctIwEE', 'size': 80, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTVNSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 168, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTVNSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 168, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTVNSt3__18time_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 48, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTVNSt3__18time_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 48, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTVNSt3__19basic_iosIcNS_11char_traitsIcEEEE', 'size': 32, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTVNSt3__19basic_iosIwNS_11char_traitsIwEEEE', 'size': 32, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTVNSt3__19money_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 56, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTVNSt3__19money_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 56, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTVNSt3__19money_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 56, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTVNSt3__19money_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 56, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTVNSt3__19strstreamE', 'size': 120, 'type': 'OBJECT'} +{'is_defined': False, 'name': '_ZTVSt11logic_error', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTVSt12bad_any_cast', 'size': 40, 'type': 'OBJECT'} +{'is_defined': False, 'name': '_ZTVSt12length_error', 'size': 0, 'type': 'OBJECT'} +{'is_defined': False, 'name': '_ZTVSt12out_of_range', 'size': 0, 'type': 'OBJECT'} +{'is_defined': False, 'name': '_ZTVSt13runtime_error', 'size': 0, 'type': 'OBJECT'} +{'is_defined': False, 'name': '_ZTVSt14overflow_error', 'size': 0, 'type': 'OBJECT'} +{'is_defined': False, 'name': '_ZTVSt16invalid_argument', 'size': 0, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTVSt16nested_exception', 'size': 32, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTVSt18bad_variant_access', 'size': 40, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZTVSt19bad_optional_access', 'size': 40, 'type': 'OBJECT'} +{'is_defined': True, 'name': '_ZThn16_NSt3__114basic_iostreamIcNS_11char_traitsIcEEED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZThn16_NSt3__114basic_iostreamIcNS_11char_traitsIcEEED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZThn16_NSt3__19strstreamD0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZThn16_NSt3__19strstreamD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZTv0_n24_NSt3__110istrstreamD0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZTv0_n24_NSt3__110istrstreamD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZTv0_n24_NSt3__110ostrstreamD0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZTv0_n24_NSt3__110ostrstreamD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZTv0_n24_NSt3__113basic_istreamIcNS_11char_traitsIcEEED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZTv0_n24_NSt3__113basic_istreamIcNS_11char_traitsIcEEED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZTv0_n24_NSt3__113basic_istreamIwNS_11char_traitsIwEEED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZTv0_n24_NSt3__113basic_istreamIwNS_11char_traitsIwEEED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZTv0_n24_NSt3__113basic_ostreamIcNS_11char_traitsIcEEED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZTv0_n24_NSt3__113basic_ostreamIcNS_11char_traitsIcEEED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZTv0_n24_NSt3__113basic_ostreamIwNS_11char_traitsIwEEED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZTv0_n24_NSt3__113basic_ostreamIwNS_11char_traitsIwEEED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZTv0_n24_NSt3__114basic_iostreamIcNS_11char_traitsIcEEED0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZTv0_n24_NSt3__114basic_iostreamIcNS_11char_traitsIcEEED1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZTv0_n24_NSt3__19strstreamD0Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZTv0_n24_NSt3__19strstreamD1Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZdaPv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZdaPvRKSt9nothrow_t', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZdaPvSt11align_val_t', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZdaPvSt11align_val_tRKSt9nothrow_t', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZdaPvm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZdaPvmSt11align_val_t', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZdlPv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZdlPvRKSt9nothrow_t', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZdlPvSt11align_val_t', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZdlPvSt11align_val_tRKSt9nothrow_t', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZdlPvm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZdlPvmSt11align_val_t', 'type': 'FUNC'} +{'is_defined': True, 'name': '_Znam', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZnamRKSt9nothrow_t', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZnamSt11align_val_t', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZnamSt11align_val_tRKSt9nothrow_t', 'type': 'FUNC'} +{'is_defined': True, 'name': '_Znwm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZnwmRKSt9nothrow_t', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZnwmSt11align_val_t', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZnwmSt11align_val_tRKSt9nothrow_t', 'type': 'FUNC'} +{'is_defined': False, 'name': '__cxa_allocate_exception', 'type': 'FUNC'} +{'is_defined': False, 'name': '__cxa_begin_catch', 'type': 'FUNC'} +{'is_defined': False, 'name': '__cxa_current_primary_exception', 'type': 'FUNC'} +{'is_defined': False, 'name': '__cxa_decrement_exception_refcount', 'type': 'FUNC'} +{'is_defined': False, 'name': '__cxa_end_catch', 'type': 'FUNC'} +{'is_defined': False, 'name': '__cxa_free_exception', 'type': 'FUNC'} +{'is_defined': False, 'name': '__cxa_guard_abort', 'type': 'FUNC'} +{'is_defined': False, 'name': '__cxa_guard_acquire', 'type': 'FUNC'} +{'is_defined': False, 'name': '__cxa_guard_release', 'type': 'FUNC'} +{'is_defined': False, 'name': '__cxa_increment_exception_refcount', 'type': 'FUNC'} +{'is_defined': False, 'name': '__cxa_pure_virtual', 'type': 'FUNC'} +{'is_defined': False, 'name': '__cxa_rethrow', 'type': 'FUNC'} +{'is_defined': False, 'name': '__cxa_rethrow_primary_exception', 'type': 'FUNC'} +{'is_defined': False, 'name': '__cxa_throw', 'type': 'FUNC'} +{'is_defined': False, 'name': '__cxa_uncaught_exceptions', 'type': 'FUNC'} diff --git a/libcxx/src/debug.cpp b/libcxx/src/debug.cpp index 2e88b859be333..28a1f70a59b02 100644 --- a/libcxx/src/debug.cpp +++ b/libcxx/src/debug.cpp @@ -203,8 +203,8 @@ __libcpp_db::__insert_ic(void* __i, const void* __c) i->__c_ = c; } -__c_node* -__libcpp_db::__insert_c(void* __c) +void +__libcpp_db::__insert_c(void* __c, __libcpp_db::_InsertConstruct *__fn) { #ifndef _LIBCPP_HAS_NO_THREADS WLock _(mut()); @@ -234,15 +234,12 @@ __libcpp_db::__insert_c(void* __c) } size_t hc = hash()(__c) % static_cast(__cend_ - __cbeg_); __c_node* p = __cbeg_[hc]; - __c_node* r = __cbeg_[hc] = - static_cast<__c_node*>(malloc(sizeof(__c_node))); - if (__cbeg_[hc] == nullptr) - __throw_bad_alloc(); + void *buf = malloc(sizeof(__c_node)); + if (buf == nullptr) + __throw_bad_alloc(); + __cbeg_[hc] = __fn(buf, __c, p); - r->__c_ = __c; - r->__next_ = p; ++__csz_; - return r; } void diff --git a/libcxx/src/hash.cpp b/libcxx/src/hash.cpp index 1631b91acb191..89bb736c86c22 100644 --- a/libcxx/src/hash.cpp +++ b/libcxx/src/hash.cpp @@ -153,12 +153,8 @@ inline _LIBCPP_INLINE_VISIBILITY typename enable_if<_Sz == 4, void>::type __check_for_overflow(size_t N) { -#ifndef _LIBCPP_NO_EXCEPTIONS if (N > 0xFFFFFFFB) - throw overflow_error("__next_prime overflow"); -#else - (void)N; -#endif + __throw_overflow_error("__next_prime overflow"); } template @@ -166,12 +162,8 @@ inline _LIBCPP_INLINE_VISIBILITY typename enable_if<_Sz == 8, void>::type __check_for_overflow(size_t N) { -#ifndef _LIBCPP_NO_EXCEPTIONS if (N > 0xFFFFFFFFFFFFFFC5ull) - throw overflow_error("__next_prime overflow"); -#else - (void)N; -#endif + __throw_overflow_error("__next_prime overflow"); } size_t diff --git a/libcxx/src/ios.cpp b/libcxx/src/ios.cpp index fdff2e8fe3f2c..2dc84be828739 100644 --- a/libcxx/src/ios.cpp +++ b/libcxx/src/ios.cpp @@ -266,10 +266,9 @@ ios_base::clear(iostate state) __rdstate_ = state; else __rdstate_ = state | badbit; -#ifndef _LIBCPP_NO_EXCEPTIONS + if (((state | (__rdbuf_ ? goodbit : badbit)) & __exceptions_) != 0) - throw failure("ios_base::clear"); -#endif // _LIBCPP_NO_EXCEPTIONS + __throw_failure("ios_base::clear"); } // init @@ -309,35 +308,27 @@ ios_base::copyfmt(const ios_base& rhs) { size_t newesize = sizeof(event_callback) * rhs.__event_size_; new_callbacks.reset(static_cast(malloc(newesize))); -#ifndef _LIBCPP_NO_EXCEPTIONS if (!new_callbacks) - throw bad_alloc(); -#endif // _LIBCPP_NO_EXCEPTIONS + __throw_bad_alloc(); size_t newisize = sizeof(int) * rhs.__event_size_; new_ints.reset(static_cast(malloc(newisize))); -#ifndef _LIBCPP_NO_EXCEPTIONS if (!new_ints) - throw bad_alloc(); -#endif // _LIBCPP_NO_EXCEPTIONS + __throw_bad_alloc(); } if (__iarray_cap_ < rhs.__iarray_size_) { size_t newsize = sizeof(long) * rhs.__iarray_size_; new_longs.reset(static_cast(malloc(newsize))); -#ifndef _LIBCPP_NO_EXCEPTIONS if (!new_longs) - throw bad_alloc(); -#endif // _LIBCPP_NO_EXCEPTIONS + __throw_bad_alloc(); } if (__parray_cap_ < rhs.__parray_size_) { size_t newsize = sizeof(void*) * rhs.__parray_size_; new_pointers.reset(static_cast(malloc(newsize))); -#ifndef _LIBCPP_NO_EXCEPTIONS if (!new_pointers) - throw bad_alloc(); -#endif // _LIBCPP_NO_EXCEPTIONS + __throw_bad_alloc(); } // Got everything we need. Copy everything but __rdstate_, __rdbuf_ and __exceptions_ __fmtflags_ = rhs.__fmtflags_; diff --git a/libcxx/src/locale.cpp b/libcxx/src/locale.cpp index 18edad73f5b49..00eb574ec4512 100644 --- a/libcxx/src/locale.cpp +++ b/libcxx/src/locale.cpp @@ -468,10 +468,8 @@ locale::__imp::install(facet* f, long id) const locale::facet* locale::__imp::use_facet(long id) const { -#ifndef _LIBCPP_NO_EXCEPTIONS if (!has_facet(id)) - throw bad_cast(); -#endif // _LIBCPP_NO_EXCEPTIONS + __throw_bad_cast(); return facets_[static_cast(id)]; } @@ -537,12 +535,8 @@ locale::operator=(const locale& other) _NOEXCEPT } locale::locale(const char* name) -#ifndef _LIBCPP_NO_EXCEPTIONS : __locale_(name ? new __imp(name) - : throw runtime_error("locale constructed with null")) -#else // _LIBCPP_NO_EXCEPTIONS - : __locale_(new __imp(name)) -#endif + : (__throw_runtime_error("locale constructed with null"), (__imp*)0)) { __locale_->__add_shared(); } @@ -554,12 +548,8 @@ locale::locale(const string& name) } locale::locale(const locale& other, const char* name, category c) -#ifndef _LIBCPP_NO_EXCEPTIONS : __locale_(name ? new __imp(*other.__locale_, name, c) - : throw runtime_error("locale constructed with null")) -#else // _LIBCPP_NO_EXCEPTIONS - : __locale_(new __imp(*other.__locale_, name, c)) -#endif + : (__throw_runtime_error("locale constructed with null"), (__imp*)0)) { __locale_->__add_shared(); } diff --git a/libcxx/src/new.cpp b/libcxx/src/new.cpp index 4acb69391e02b..eb629b36fa33e 100644 --- a/libcxx/src/new.cpp +++ b/libcxx/src/new.cpp @@ -12,7 +12,7 @@ #include "include/atomic_support.h" #if defined(_LIBCPP_ABI_MICROSOFT) -#if defined(_LIBCPP_NO_VCRUNTIME) +#if !defined(_LIBCPP_ABI_VCRUNTIME) #include "support/runtime/new_handler_fallback.ipp" #endif #elif defined(LIBCXX_BUILDING_LIBCXXABI) @@ -54,7 +54,7 @@ __throw_bad_alloc() } // std #if !defined(__GLIBCXX__) && \ - !defined(_LIBCPP_DEFER_NEW_TO_VCRUNTIME) && \ + !defined(_LIBCPP_ABI_VCRUNTIME) && \ !defined(_LIBCPP_DISABLE_NEW_DELETE_DEFINITIONS) // Implement all new and delete operators as weak definitions @@ -298,4 +298,4 @@ operator delete[] (void* ptr, size_t, std::align_val_t alignment) _NOEXCEPT } #endif // !_LIBCPP_HAS_NO_LIBRARY_ALIGNED_ALLOCATION -#endif // !__GLIBCXX__ && (!_LIBCPP_ABI_MICROSOFT || _LIBCPP_NO_VCRUNTIME) && !_LIBCPP_DISABLE_NEW_DELETE_DEFINITIONS +#endif // !__GLIBCXX__ && !_LIBCPP_ABI_VCRUNTIME && !_LIBCPP_DISABLE_NEW_DELETE_DEFINITIONS diff --git a/libcxx/src/stdexcept.cpp b/libcxx/src/stdexcept.cpp index 179c25017bcdf..1507062a2a278 100644 --- a/libcxx/src/stdexcept.cpp +++ b/libcxx/src/stdexcept.cpp @@ -77,7 +77,7 @@ runtime_error::what() const _NOEXCEPT return __imp_.c_str(); } -#if !defined(_LIBCPP_ABI_MICROSOFT) || defined(_LIBCPP_NO_VCRUNTIME) +#if !defined(_LIBCPP_ABI_VCRUNTIME) logic_error::~logic_error() _NOEXCEPT {} domain_error::~domain_error() _NOEXCEPT {} diff --git a/libcxx/src/support/runtime/exception_msvc.ipp b/libcxx/src/support/runtime/exception_msvc.ipp index 21119b0e9874d..7315b8261b768 100644 --- a/libcxx/src/support/runtime/exception_msvc.ipp +++ b/libcxx/src/support/runtime/exception_msvc.ipp @@ -82,7 +82,7 @@ int uncaught_exceptions() _NOEXCEPT { return __uncaught_exceptions(); } -#if defined(_LIBCPP_NO_VCRUNTIME) +#if !defined(_LIBCPP_ABI_VCRUNTIME) bad_cast::bad_cast() _NOEXCEPT { } @@ -158,6 +158,6 @@ bad_array_new_length::what() const _NOEXCEPT { return "bad_array_new_length"; } -#endif // _LIBCPP_NO_VCRUNTIME +#endif // !_LIBCPP_ABI_VCRUNTIME } // namespace std diff --git a/libcxx/src/typeinfo.cpp b/libcxx/src/typeinfo.cpp index b49c98273c5f3..5b893b1e68b03 100644 --- a/libcxx/src/typeinfo.cpp +++ b/libcxx/src/typeinfo.cpp @@ -8,7 +8,7 @@ #include "typeinfo" -#if defined(_LIBCPP_ABI_MICROSOFT) && defined(_LIBCPP_NO_VCRUNTIME) +#if defined(_LIBCPP_ABI_MICROSOFT) && !defined(_LIBCPP_ABI_VCRUNTIME) #include int std::type_info::__compare(const type_info &__rhs) const _NOEXCEPT { @@ -49,7 +49,7 @@ size_t std::type_info::hash_code() const _NOEXCEPT { // FIXME: Remove the _LIBCPP_BUILDING_HAS_NO_ABI_LIBRARY configuration. #if (!defined(LIBCXX_BUILDING_LIBCXXABI) && !defined(LIBCXXRT) && \ !defined(__GLIBCXX__) && !defined(__APPLE__) && \ - !(defined(_LIBCPP_ABI_MICROSOFT) && !defined(_LIBCPP_NO_VCRUNTIME))) || \ + !defined(_LIBCPP_ABI_VCRUNTIME)) || \ defined(_LIBCPP_BUILDING_HAS_NO_ABI_LIBRARY) std::type_info::~type_info() { diff --git a/libcxx/test/libcxx/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle.cxx1z.pass.cpp b/libcxx/test/libcxx/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle.cxx1z.pass.cpp index 926ee40f00d2b..0b55ae9507a75 100644 --- a/libcxx/test/libcxx/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle.cxx1z.pass.cpp +++ b/libcxx/test/libcxx/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle.cxx1z.pass.cpp @@ -39,10 +39,12 @@ struct gen }; -int main() +int main(int, char**) { std::vector v; std::random_shuffle(v.begin(), v.end()); gen r; std::random_shuffle(v.begin(), v.end(), r); + + return 0; } diff --git a/libcxx/test/libcxx/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle.depr_in_cxx14.fail.cpp b/libcxx/test/libcxx/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle.depr_in_cxx14.fail.cpp index aca87ffb3c501..7c187edaeec99 100644 --- a/libcxx/test/libcxx/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle.depr_in_cxx14.fail.cpp +++ b/libcxx/test/libcxx/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle.depr_in_cxx14.fail.cpp @@ -40,10 +40,12 @@ struct gen }; -int main() +int main(int, char**) { int v[1] = {1}; std::random_shuffle(&v[0], &v[1]); // expected-error{{'random_shuffle' is deprecated}} gen r; std::random_shuffle(&v[0], &v[1], r); // expected-error{{'random_shuffle' is deprecated}} + + return 0; } diff --git a/libcxx/test/libcxx/algorithms/debug_less.pass.cpp b/libcxx/test/libcxx/algorithms/debug_less.pass.cpp index f5b2796fd4daa..247e07f06e036 100644 --- a/libcxx/test/libcxx/algorithms/debug_less.pass.cpp +++ b/libcxx/test/libcxx/algorithms/debug_less.pass.cpp @@ -210,8 +210,10 @@ void test_upper_and_lower_bound() { } } -int main() { +int main(int, char**) { test_passing(); test_failing(); test_upper_and_lower_bound(); + + return 0; } diff --git a/libcxx/test/libcxx/algorithms/half_positive.pass.cpp b/libcxx/test/libcxx/algorithms/half_positive.pass.cpp index 1434b3e9a4c44..ec2d57c9dd9f7 100644 --- a/libcxx/test/libcxx/algorithms/half_positive.pass.cpp +++ b/libcxx/test/libcxx/algorithms/half_positive.pass.cpp @@ -28,7 +28,7 @@ TEST_CONSTEXPR bool test(IntType max_v = IntType(std::numeric_limits()); @@ -52,4 +52,6 @@ int main() #endif // !defined(_LIBCPP_HAS_NO_INT128) } #endif // TEST_STD_VER >= 11 + + return 0; } diff --git a/libcxx/test/libcxx/algorithms/version.pass.cpp b/libcxx/test/libcxx/algorithms/version.pass.cpp index 4fcd03674c91c..e7d368789421a 100644 --- a/libcxx/test/libcxx/algorithms/version.pass.cpp +++ b/libcxx/test/libcxx/algorithms/version.pass.cpp @@ -14,6 +14,8 @@ #error _LIBCPP_VERSION not defined #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/atomics/atomics.align/align.pass.sh.cpp b/libcxx/test/libcxx/atomics/atomics.align/align.pass.sh.cpp index 7162493c5f3b8..16badab8490a8 100644 --- a/libcxx/test/libcxx/atomics/atomics.align/align.pass.sh.cpp +++ b/libcxx/test/libcxx/atomics/atomics.align/align.pass.sh.cpp @@ -35,7 +35,7 @@ template struct atomic_test : public std::__atomic_base { } }; -int main() { +int main(int, char**) { // structs and unions can't be defined in the template invocation. // Work around this with a typedef. @@ -89,4 +89,6 @@ int main() { CHECK_ALIGNMENT(struct LLIArr16 { long long int i[16]; }); CHECK_ALIGNMENT(struct Padding { char c; /* padding */ long long int i; }); CHECK_ALIGNMENT(union IntFloat { int i; float f; }); + + return 0; } diff --git a/libcxx/test/libcxx/atomics/atomics.flag/init_bool.pass.cpp b/libcxx/test/libcxx/atomics/atomics.flag/init_bool.pass.cpp index 7006a86d451c8..2919fb666bc5a 100644 --- a/libcxx/test/libcxx/atomics/atomics.flag/init_bool.pass.cpp +++ b/libcxx/test/libcxx/atomics/atomics.flag/init_bool.pass.cpp @@ -27,7 +27,7 @@ X x; std::atomic_flag global = ATOMIC_FLAG_INIT; #endif -int main() +int main(int, char**) { #if TEST_STD_VER >= 11 assert(global.test_and_set() == 1); @@ -40,4 +40,6 @@ int main() std::atomic_flag f(true); assert(f.test_and_set() == 1); } + + return 0; } diff --git a/libcxx/test/libcxx/atomics/diagnose_invalid_memory_order.fail.cpp b/libcxx/test/libcxx/atomics/diagnose_invalid_memory_order.fail.cpp index 2869bf96e8846..7bc21851b712c 100644 --- a/libcxx/test/libcxx/atomics/diagnose_invalid_memory_order.fail.cpp +++ b/libcxx/test/libcxx/atomics/diagnose_invalid_memory_order.fail.cpp @@ -19,7 +19,7 @@ #include -int main() { +int main(int, char**) { std::atomic x(42); volatile std::atomic& vx = x; int val1 = 1; ((void)val1); @@ -124,4 +124,6 @@ int main() { std::atomic_compare_exchange_strong_explicit(&x, &val1, val2, std::memory_order_seq_cst, std::memory_order_acquire); std::atomic_compare_exchange_strong_explicit(&x, &val1, val2, std::memory_order_seq_cst, std::memory_order_seq_cst); } + + return 0; } diff --git a/libcxx/test/libcxx/atomics/libcpp-has-no-threads.fail.cpp b/libcxx/test/libcxx/atomics/libcpp-has-no-threads.fail.cpp index 27ae2092933dc..6ee09e206467f 100644 --- a/libcxx/test/libcxx/atomics/libcpp-has-no-threads.fail.cpp +++ b/libcxx/test/libcxx/atomics/libcpp-has-no-threads.fail.cpp @@ -18,6 +18,8 @@ #include -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/atomics/libcpp-has-no-threads.pass.cpp b/libcxx/test/libcxx/atomics/libcpp-has-no-threads.pass.cpp index 41fbe287909f6..af2d55e1a4a3d 100644 --- a/libcxx/test/libcxx/atomics/libcpp-has-no-threads.pass.cpp +++ b/libcxx/test/libcxx/atomics/libcpp-has-no-threads.pass.cpp @@ -12,6 +12,8 @@ 'libcpp-has-no-threads' is available iff _LIBCPP_HAS_NO_THREADS is defined #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/atomics/version.pass.cpp b/libcxx/test/libcxx/atomics/version.pass.cpp index 5d89bc575a3f8..48114a3e5db6d 100644 --- a/libcxx/test/libcxx/atomics/version.pass.cpp +++ b/libcxx/test/libcxx/atomics/version.pass.cpp @@ -16,6 +16,8 @@ #error _LIBCPP_VERSION not defined #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/containers/associative/map/at.abort.pass.cpp b/libcxx/test/libcxx/containers/associative/map/at.abort.pass.cpp new file mode 100644 index 0000000000000..d34f48f4dae25 --- /dev/null +++ b/libcxx/test/libcxx/containers/associative/map/at.abort.pass.cpp @@ -0,0 +1,34 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// + +// class map + +// mapped_type& at(const key_type& k); + +// Make sure we abort() when exceptions are disabled and we fetch a key that +// is not in the map. + +// REQUIRES: libcpp-no-exceptions + +#include +#include +#include + + +void exit_success(int) { + std::_Exit(EXIT_SUCCESS); +} + +int main(int, char**) { + std::signal(SIGABRT, exit_success); + std::map map; + map.at(1); + return EXIT_FAILURE; +} diff --git a/libcxx/test/libcxx/containers/associative/map/at.const.abort.pass.cpp b/libcxx/test/libcxx/containers/associative/map/at.const.abort.pass.cpp new file mode 100644 index 0000000000000..705ada8693633 --- /dev/null +++ b/libcxx/test/libcxx/containers/associative/map/at.const.abort.pass.cpp @@ -0,0 +1,34 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// + +// class map + +// const mapped_type& at(const key_type& k) const; + +// Make sure we abort() when exceptions are disabled and we fetch a key that +// is not in the map. + +// REQUIRES: libcpp-no-exceptions + +#include +#include +#include + + +void exit_success(int) { + std::_Exit(EXIT_SUCCESS); +} + +int main(int, char**) { + std::signal(SIGABRT, exit_success); + std::map const map; + map.at(1); + return EXIT_FAILURE; +} diff --git a/libcxx/test/libcxx/containers/associative/map/version.pass.cpp b/libcxx/test/libcxx/containers/associative/map/version.pass.cpp index da33a03def476..8a498c60dbf6c 100644 --- a/libcxx/test/libcxx/containers/associative/map/version.pass.cpp +++ b/libcxx/test/libcxx/containers/associative/map/version.pass.cpp @@ -14,6 +14,8 @@ #error _LIBCPP_VERSION not defined #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/containers/associative/non_const_comparator.fail.cpp b/libcxx/test/libcxx/containers/associative/non_const_comparator.fail.cpp index 23c6ee8a28ba7..432e7c08d14c6 100644 --- a/libcxx/test/libcxx/containers/associative/non_const_comparator.fail.cpp +++ b/libcxx/test/libcxx/containers/associative/non_const_comparator.fail.cpp @@ -22,7 +22,7 @@ struct BadCompare { } }; -int main() { +int main(int, char**) { static_assert(!std::__invokable::value, ""); static_assert(std::__invokable::value, ""); @@ -44,4 +44,6 @@ int main() { using C = std::multimap; C s; } + + return 0; } diff --git a/libcxx/test/libcxx/containers/associative/set/version.pass.cpp b/libcxx/test/libcxx/containers/associative/set/version.pass.cpp index 57420bae47499..b0d9abd6ac789 100644 --- a/libcxx/test/libcxx/containers/associative/set/version.pass.cpp +++ b/libcxx/test/libcxx/containers/associative/set/version.pass.cpp @@ -14,6 +14,8 @@ #error _LIBCPP_VERSION not defined #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/containers/associative/tree_balance_after_insert.pass.cpp b/libcxx/test/libcxx/containers/associative/tree_balance_after_insert.pass.cpp index 8f17dbba77087..e178a408fb723 100644 --- a/libcxx/test/libcxx/containers/associative/tree_balance_after_insert.pass.cpp +++ b/libcxx/test/libcxx/containers/associative/tree_balance_after_insert.pass.cpp @@ -1608,11 +1608,13 @@ test5() assert(h.__is_black_ == true); } -int main() +int main(int, char**) { test1(); test2(); test3(); test4(); test5(); + + return 0; } diff --git a/libcxx/test/libcxx/containers/associative/tree_key_value_traits.pass.cpp b/libcxx/test/libcxx/containers/associative/tree_key_value_traits.pass.cpp index 3b5ba7d2a1759..12289c84a9cc3 100644 --- a/libcxx/test/libcxx/containers/associative/tree_key_value_traits.pass.cpp +++ b/libcxx/test/libcxx/containers/associative/tree_key_value_traits.pass.cpp @@ -53,6 +53,8 @@ void testKeyValueTrait() { } } -int main() { +int main(int, char**) { testKeyValueTrait(); + + return 0; } diff --git a/libcxx/test/libcxx/containers/associative/tree_left_rotate.pass.cpp b/libcxx/test/libcxx/containers/associative/tree_left_rotate.pass.cpp index c7f136c8cb138..5f775c3f6afed 100644 --- a/libcxx/test/libcxx/containers/associative/tree_left_rotate.pass.cpp +++ b/libcxx/test/libcxx/containers/associative/tree_left_rotate.pass.cpp @@ -93,8 +93,10 @@ test2() assert(c.__right_ == 0); } -int main() +int main(int, char**) { test1(); test2(); + + return 0; } diff --git a/libcxx/test/libcxx/containers/associative/tree_remove.pass.cpp b/libcxx/test/libcxx/containers/associative/tree_remove.pass.cpp index b2c814dd76b3e..c3ec20c55c15a 100644 --- a/libcxx/test/libcxx/containers/associative/tree_remove.pass.cpp +++ b/libcxx/test/libcxx/containers/associative/tree_remove.pass.cpp @@ -1641,10 +1641,12 @@ test4() assert(root.__is_black_ == false); } -int main() +int main(int, char**) { test1(); test2(); test3(); test4(); + + return 0; } diff --git a/libcxx/test/libcxx/containers/associative/tree_right_rotate.pass.cpp b/libcxx/test/libcxx/containers/associative/tree_right_rotate.pass.cpp index bcaf71f0b0190..5332d7b16b6d6 100644 --- a/libcxx/test/libcxx/containers/associative/tree_right_rotate.pass.cpp +++ b/libcxx/test/libcxx/containers/associative/tree_right_rotate.pass.cpp @@ -93,8 +93,10 @@ test2() assert(c.__right_ == 0); } -int main() +int main(int, char**) { test1(); test2(); + + return 0; } diff --git a/libcxx/test/libcxx/containers/associative/undef_min_max.pass.cpp b/libcxx/test/libcxx/containers/associative/undef_min_max.pass.cpp index 8ebd8a4ae213c..53dd87871d309 100644 --- a/libcxx/test/libcxx/containers/associative/undef_min_max.pass.cpp +++ b/libcxx/test/libcxx/containers/associative/undef_min_max.pass.cpp @@ -15,7 +15,9 @@ #include -int main() { +int main(int, char**) { std::map m; ((void)m); + + return 0; } diff --git a/libcxx/test/libcxx/containers/container.adaptors/queue/version.pass.cpp b/libcxx/test/libcxx/containers/container.adaptors/queue/version.pass.cpp index 87d907a5a2f10..353c091795cc1 100644 --- a/libcxx/test/libcxx/containers/container.adaptors/queue/version.pass.cpp +++ b/libcxx/test/libcxx/containers/container.adaptors/queue/version.pass.cpp @@ -14,6 +14,8 @@ #error _LIBCPP_VERSION not defined #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/containers/container.adaptors/stack/version.pass.cpp b/libcxx/test/libcxx/containers/container.adaptors/stack/version.pass.cpp index 00ed12c064239..e8da8c52b7359 100644 --- a/libcxx/test/libcxx/containers/container.adaptors/stack/version.pass.cpp +++ b/libcxx/test/libcxx/containers/container.adaptors/stack/version.pass.cpp @@ -14,6 +14,8 @@ #error _LIBCPP_VERSION not defined #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/containers/gnu_cxx/hash_map.pass.cpp b/libcxx/test/libcxx/containers/gnu_cxx/hash_map.pass.cpp index 9470a9e31df03..12529e0f1ac24 100644 --- a/libcxx/test/libcxx/containers/gnu_cxx/hash_map.pass.cpp +++ b/libcxx/test/libcxx/containers/gnu_cxx/hash_map.pass.cpp @@ -17,9 +17,11 @@ namespace __gnu_cxx { template class hash_map; } -int main() { +int main(int, char**) { typedef __gnu_cxx::hash_map Map; Map m; Map m2(m); ((void)m2); + + return 0; } diff --git a/libcxx/test/libcxx/containers/gnu_cxx/hash_set.pass.cpp b/libcxx/test/libcxx/containers/gnu_cxx/hash_set.pass.cpp index cd6cfeb0a9a43..e4fa988637156 100644 --- a/libcxx/test/libcxx/containers/gnu_cxx/hash_set.pass.cpp +++ b/libcxx/test/libcxx/containers/gnu_cxx/hash_set.pass.cpp @@ -17,9 +17,11 @@ namespace __gnu_cxx { template class hash_set; } -int main() { +int main(int, char**) { typedef __gnu_cxx::hash_set Set; Set s; Set s2(s); ((void)s2); + + return 0; } diff --git a/libcxx/test/libcxx/containers/sequences/array/array.zero/db_back.pass.cpp b/libcxx/test/libcxx/containers/sequences/array/array.zero/db_back.pass.cpp index 3f1084c47d4cb..3c31911666233 100644 --- a/libcxx/test/libcxx/containers/sequences/array/array.zero/db_back.pass.cpp +++ b/libcxx/test/libcxx/containers/sequences/array/array.zero/db_back.pass.cpp @@ -29,7 +29,7 @@ inline bool CheckDebugThrows(Array& Arr) { return false; } -int main() +int main(int, char**) { { typedef std::array C; @@ -45,4 +45,6 @@ int main() assert(CheckDebugThrows(c)); assert(CheckDebugThrows(cc)); } + + return 0; } diff --git a/libcxx/test/libcxx/containers/sequences/array/array.zero/db_front.pass.cpp b/libcxx/test/libcxx/containers/sequences/array/array.zero/db_front.pass.cpp index 6fd053dd6b57f..9f6f09f983d7f 100644 --- a/libcxx/test/libcxx/containers/sequences/array/array.zero/db_front.pass.cpp +++ b/libcxx/test/libcxx/containers/sequences/array/array.zero/db_front.pass.cpp @@ -29,7 +29,7 @@ inline bool CheckDebugThrows(Array& Arr) { return false; } -int main() +int main(int, char**) { { typedef std::array C; @@ -45,4 +45,6 @@ int main() assert(CheckDebugThrows(c)); assert(CheckDebugThrows(cc)); } + + return 0; } diff --git a/libcxx/test/libcxx/containers/sequences/array/array.zero/db_indexing.pass.cpp b/libcxx/test/libcxx/containers/sequences/array/array.zero/db_indexing.pass.cpp index fadc228102780..cb5e99b2924c9 100644 --- a/libcxx/test/libcxx/containers/sequences/array/array.zero/db_indexing.pass.cpp +++ b/libcxx/test/libcxx/containers/sequences/array/array.zero/db_indexing.pass.cpp @@ -29,7 +29,7 @@ inline bool CheckDebugThrows(Array& Arr, size_t Index) { return false; } -int main() +int main(int, char**) { { typedef std::array C; @@ -49,4 +49,6 @@ int main() assert(CheckDebugThrows(cc, 0)); assert(CheckDebugThrows(cc, 1)); } + + return 0; } diff --git a/libcxx/test/libcxx/containers/sequences/array/version.pass.cpp b/libcxx/test/libcxx/containers/sequences/array/version.pass.cpp index 21eb2576476c0..29b15ad3e374f 100644 --- a/libcxx/test/libcxx/containers/sequences/array/version.pass.cpp +++ b/libcxx/test/libcxx/containers/sequences/array/version.pass.cpp @@ -14,6 +14,8 @@ #error _LIBCPP_VERSION not defined #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/containers/sequences/deque/incomplete.pass.cpp b/libcxx/test/libcxx/containers/sequences/deque/incomplete.pass.cpp index 3c5528d280c4f..8179768d586f6 100644 --- a/libcxx/test/libcxx/containers/sequences/deque/incomplete.pass.cpp +++ b/libcxx/test/libcxx/containers/sequences/deque/incomplete.pass.cpp @@ -22,10 +22,12 @@ struct A { std::deque::reverse_iterator it2; }; -int main() +int main(int, char**) { A a; assert(a.d.size() == 0); a.it = a.d.begin(); a.it2 = a.d.rend(); + + return 0; } diff --git a/libcxx/test/libcxx/containers/sequences/deque/pop_back_empty.pass.cpp b/libcxx/test/libcxx/containers/sequences/deque/pop_back_empty.pass.cpp index 2b87e53b9211e..169c0f72d6de6 100644 --- a/libcxx/test/libcxx/containers/sequences/deque/pop_back_empty.pass.cpp +++ b/libcxx/test/libcxx/containers/sequences/deque/pop_back_empty.pass.cpp @@ -16,10 +16,12 @@ #include -int main() { +int main(int, char**) { std::deque q; q.push_back(0); q.pop_back(); q.pop_back(); std::exit(1); + + return 0; } diff --git a/libcxx/test/libcxx/containers/sequences/deque/version.pass.cpp b/libcxx/test/libcxx/containers/sequences/deque/version.pass.cpp index 12256878a3987..8f05025f1aaba 100644 --- a/libcxx/test/libcxx/containers/sequences/deque/version.pass.cpp +++ b/libcxx/test/libcxx/containers/sequences/deque/version.pass.cpp @@ -14,6 +14,8 @@ #error _LIBCPP_VERSION not defined #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/containers/sequences/forwardlist/version.pass.cpp b/libcxx/test/libcxx/containers/sequences/forwardlist/version.pass.cpp index 7e61bde5c58dd..cbe6d5821c152 100644 --- a/libcxx/test/libcxx/containers/sequences/forwardlist/version.pass.cpp +++ b/libcxx/test/libcxx/containers/sequences/forwardlist/version.pass.cpp @@ -14,6 +14,8 @@ #error _LIBCPP_VERSION not defined #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/containers/sequences/list/list.cons/db_copy.pass.cpp b/libcxx/test/libcxx/containers/sequences/list/list.cons/db_copy.pass.cpp index 62695f8f84d30..da0eb5ce0c303 100644 --- a/libcxx/test/libcxx/containers/sequences/list/list.cons/db_copy.pass.cpp +++ b/libcxx/test/libcxx/containers/sequences/list/list.cons/db_copy.pass.cpp @@ -19,7 +19,7 @@ #include #include -int main() +int main(int, char**) { std::list l1; l1.push_back(1); l1.push_back(2); l1.push_back(3); @@ -27,4 +27,6 @@ int main() std::list l2 = l1; l2.erase(i); assert(false); + + return 0; } diff --git a/libcxx/test/libcxx/containers/sequences/list/list.cons/db_move.pass.cpp b/libcxx/test/libcxx/containers/sequences/list/list.cons/db_move.pass.cpp index 02306eb8804ff..dcd05ec419bc7 100644 --- a/libcxx/test/libcxx/containers/sequences/list/list.cons/db_move.pass.cpp +++ b/libcxx/test/libcxx/containers/sequences/list/list.cons/db_move.pass.cpp @@ -25,10 +25,12 @@ #include "test_allocator.h" #include "min_allocator.h" -int main() +int main(int, char**) { std::list l1 = {1, 2, 3}; std::list::iterator i = l1.begin(); std::list l2 = std::move(l1); assert(*l2.erase(i) == 2); + + return 0; } diff --git a/libcxx/test/libcxx/containers/sequences/list/list.modifiers/emplace_db1.pass.cpp b/libcxx/test/libcxx/containers/sequences/list/list.modifiers/emplace_db1.pass.cpp index 9554fd8bc42c6..b570fef66a08f 100644 --- a/libcxx/test/libcxx/containers/sequences/list/list.modifiers/emplace_db1.pass.cpp +++ b/libcxx/test/libcxx/containers/sequences/list/list.modifiers/emplace_db1.pass.cpp @@ -37,10 +37,12 @@ class A double getd() const {return d_;} }; -int main() +int main(int, char**) { std::list c1; std::list c2; std::list::iterator i = c1.emplace(c2.cbegin(), 2, 3.5); assert(false); + + return 0; } diff --git a/libcxx/test/libcxx/containers/sequences/list/list.modifiers/erase_iter_db1.pass.cpp b/libcxx/test/libcxx/containers/sequences/list/list.modifiers/erase_iter_db1.pass.cpp index 6fa81ff47bab3..c573bf7bed665 100644 --- a/libcxx/test/libcxx/containers/sequences/list/list.modifiers/erase_iter_db1.pass.cpp +++ b/libcxx/test/libcxx/containers/sequences/list/list.modifiers/erase_iter_db1.pass.cpp @@ -20,11 +20,13 @@ #include #include -int main() +int main(int, char**) { int a1[] = {1, 2, 3}; std::list l1(a1, a1+3); std::list::const_iterator i = l1.end(); l1.erase(i); assert(false); + + return 0; } diff --git a/libcxx/test/libcxx/containers/sequences/list/list.modifiers/erase_iter_db2.pass.cpp b/libcxx/test/libcxx/containers/sequences/list/list.modifiers/erase_iter_db2.pass.cpp index 45d163a995012..65cc4b8f8d646 100644 --- a/libcxx/test/libcxx/containers/sequences/list/list.modifiers/erase_iter_db2.pass.cpp +++ b/libcxx/test/libcxx/containers/sequences/list/list.modifiers/erase_iter_db2.pass.cpp @@ -20,7 +20,7 @@ #include #include -int main() +int main(int, char**) { int a1[] = {1, 2, 3}; std::list l1(a1, a1+3); @@ -28,4 +28,6 @@ int main() std::list::const_iterator i = l2.begin(); l1.erase(i); assert(false); + + return 0; } diff --git a/libcxx/test/libcxx/containers/sequences/list/list.modifiers/erase_iter_iter_db1.pass.cpp b/libcxx/test/libcxx/containers/sequences/list/list.modifiers/erase_iter_iter_db1.pass.cpp index 5553221c1679e..971f2bd3f5951 100644 --- a/libcxx/test/libcxx/containers/sequences/list/list.modifiers/erase_iter_iter_db1.pass.cpp +++ b/libcxx/test/libcxx/containers/sequences/list/list.modifiers/erase_iter_iter_db1.pass.cpp @@ -20,12 +20,14 @@ #include #include -int main() +int main(int, char**) { int a1[] = {1, 2, 3}; std::list l1(a1, a1+3); std::list l2(a1, a1+3); std::list::iterator i = l1.erase(l2.cbegin(), next(l1.cbegin())); assert(false); + + return 0; } diff --git a/libcxx/test/libcxx/containers/sequences/list/list.modifiers/erase_iter_iter_db2.pass.cpp b/libcxx/test/libcxx/containers/sequences/list/list.modifiers/erase_iter_iter_db2.pass.cpp index 4ebe93b94bd2e..131529e5c7d71 100644 --- a/libcxx/test/libcxx/containers/sequences/list/list.modifiers/erase_iter_iter_db2.pass.cpp +++ b/libcxx/test/libcxx/containers/sequences/list/list.modifiers/erase_iter_iter_db2.pass.cpp @@ -20,11 +20,13 @@ #include #include -int main() +int main(int, char**) { int a1[] = {1, 2, 3}; std::list l1(a1, a1+3); std::list l2(a1, a1+3); std::list::iterator i = l1.erase(l1.cbegin(), next(l2.cbegin())); assert(false); + + return 0; } diff --git a/libcxx/test/libcxx/containers/sequences/list/list.modifiers/erase_iter_iter_db3.pass.cpp b/libcxx/test/libcxx/containers/sequences/list/list.modifiers/erase_iter_iter_db3.pass.cpp index a89ee564569b0..a9a35056ae7c7 100644 --- a/libcxx/test/libcxx/containers/sequences/list/list.modifiers/erase_iter_iter_db3.pass.cpp +++ b/libcxx/test/libcxx/containers/sequences/list/list.modifiers/erase_iter_iter_db3.pass.cpp @@ -20,11 +20,13 @@ #include #include -int main() +int main(int, char**) { int a1[] = {1, 2, 3}; std::list l1(a1, a1+3); std::list l2(a1, a1+3); std::list::iterator i = l1.erase(l2.cbegin(), next(l2.cbegin())); assert(false); + + return 0; } diff --git a/libcxx/test/libcxx/containers/sequences/list/list.modifiers/erase_iter_iter_db4.pass.cpp b/libcxx/test/libcxx/containers/sequences/list/list.modifiers/erase_iter_iter_db4.pass.cpp index 60f9cf2e5221e..642ee4498f5ce 100644 --- a/libcxx/test/libcxx/containers/sequences/list/list.modifiers/erase_iter_iter_db4.pass.cpp +++ b/libcxx/test/libcxx/containers/sequences/list/list.modifiers/erase_iter_iter_db4.pass.cpp @@ -20,10 +20,12 @@ #include #include -int main() +int main(int, char**) { int a1[] = {1, 2, 3}; std::list l1(a1, a1+3); std::list::iterator i = l1.erase(next(l1.cbegin()), l1.cbegin()); assert(false); + + return 0; } diff --git a/libcxx/test/libcxx/containers/sequences/list/list.modifiers/insert_iter_iter_iter_db1.pass.cpp b/libcxx/test/libcxx/containers/sequences/list/list.modifiers/insert_iter_iter_iter_db1.pass.cpp index d3370b5de440b..c7c7f76b9e2f7 100644 --- a/libcxx/test/libcxx/containers/sequences/list/list.modifiers/insert_iter_iter_iter_db1.pass.cpp +++ b/libcxx/test/libcxx/containers/sequences/list/list.modifiers/insert_iter_iter_iter_db1.pass.cpp @@ -23,7 +23,7 @@ #include #include "test_iterators.h" -int main() +int main(int, char**) { { std::list v(100); @@ -35,4 +35,6 @@ int main() input_iterator(a+N)); assert(false); } + + return 0; } diff --git a/libcxx/test/libcxx/containers/sequences/list/list.modifiers/insert_iter_rvalue_db1.pass.cpp b/libcxx/test/libcxx/containers/sequences/list/list.modifiers/insert_iter_rvalue_db1.pass.cpp index d51658473738d..10503bd9cd719 100644 --- a/libcxx/test/libcxx/containers/sequences/list/list.modifiers/insert_iter_rvalue_db1.pass.cpp +++ b/libcxx/test/libcxx/containers/sequences/list/list.modifiers/insert_iter_rvalue_db1.pass.cpp @@ -20,10 +20,12 @@ #include #include -int main() +int main(int, char**) { std::list v1(3); std::list v2(3); v1.insert(v2.begin(), 4); assert(false); + + return 0; } diff --git a/libcxx/test/libcxx/containers/sequences/list/list.modifiers/insert_iter_size_value_db1.pass.cpp b/libcxx/test/libcxx/containers/sequences/list/list.modifiers/insert_iter_size_value_db1.pass.cpp index 5bd20f7b6f936..7a658e3942de8 100644 --- a/libcxx/test/libcxx/containers/sequences/list/list.modifiers/insert_iter_size_value_db1.pass.cpp +++ b/libcxx/test/libcxx/containers/sequences/list/list.modifiers/insert_iter_size_value_db1.pass.cpp @@ -20,10 +20,12 @@ #include #include -int main() +int main(int, char**) { std::list c1(100); std::list c2; std::list::iterator i = c1.insert(next(c2.cbegin(), 10), 5, 1); assert(false); + + return 0; } diff --git a/libcxx/test/libcxx/containers/sequences/list/list.modifiers/insert_iter_value_db1.pass.cpp b/libcxx/test/libcxx/containers/sequences/list/list.modifiers/insert_iter_value_db1.pass.cpp index 1744250916886..cdf01fe9079f2 100644 --- a/libcxx/test/libcxx/containers/sequences/list/list.modifiers/insert_iter_value_db1.pass.cpp +++ b/libcxx/test/libcxx/containers/sequences/list/list.modifiers/insert_iter_value_db1.pass.cpp @@ -21,11 +21,13 @@ #include -int main() +int main(int, char**) { std::list v1(3); std::list v2(3); int i = 4; v1.insert(v2.begin(), i); assert(false); + + return 0; } diff --git a/libcxx/test/libcxx/containers/sequences/list/list.modifiers/pop_back_db1.pass.cpp b/libcxx/test/libcxx/containers/sequences/list/list.modifiers/pop_back_db1.pass.cpp index 4a292ff1f49e8..8649f12a88790 100644 --- a/libcxx/test/libcxx/containers/sequences/list/list.modifiers/pop_back_db1.pass.cpp +++ b/libcxx/test/libcxx/containers/sequences/list/list.modifiers/pop_back_db1.pass.cpp @@ -20,7 +20,7 @@ #include #include -int main() +int main(int, char**) { int a[] = {1, 2, 3}; std::list c(a, a+3); @@ -32,4 +32,6 @@ int main() assert(c.empty()); c.pop_back(); // operation under test assert(false); + + return 0; } diff --git a/libcxx/test/libcxx/containers/sequences/list/list.ops/db_splice_pos_list.pass.cpp b/libcxx/test/libcxx/containers/sequences/list/list.ops/db_splice_pos_list.pass.cpp index 71882fd1476e4..23323d8c6fb75 100644 --- a/libcxx/test/libcxx/containers/sequences/list/list.ops/db_splice_pos_list.pass.cpp +++ b/libcxx/test/libcxx/containers/sequences/list/list.ops/db_splice_pos_list.pass.cpp @@ -20,7 +20,7 @@ #include #include -int main() +int main(int, char**) { { std::list v1(3); @@ -28,4 +28,6 @@ int main() v1.splice(v2.begin(), v2); assert(false); } + + return 0; } diff --git a/libcxx/test/libcxx/containers/sequences/list/list.ops/db_splice_pos_list_iter.pass.cpp b/libcxx/test/libcxx/containers/sequences/list/list.ops/db_splice_pos_list_iter.pass.cpp index cfaf10b51eeff..37a206d2c97ca 100644 --- a/libcxx/test/libcxx/containers/sequences/list/list.ops/db_splice_pos_list_iter.pass.cpp +++ b/libcxx/test/libcxx/containers/sequences/list/list.ops/db_splice_pos_list_iter.pass.cpp @@ -20,7 +20,7 @@ #include #include -int main() +int main(int, char**) { { std::list v1(3); @@ -28,4 +28,6 @@ int main() v1.splice(v1.begin(), v2, v1.begin()); assert(false); } + + return 0; } diff --git a/libcxx/test/libcxx/containers/sequences/list/list.ops/db_splice_pos_list_iter_iter.pass.cpp b/libcxx/test/libcxx/containers/sequences/list/list.ops/db_splice_pos_list_iter_iter.pass.cpp index 9f48a70898342..768c3d6f12200 100644 --- a/libcxx/test/libcxx/containers/sequences/list/list.ops/db_splice_pos_list_iter_iter.pass.cpp +++ b/libcxx/test/libcxx/containers/sequences/list/list.ops/db_splice_pos_list_iter_iter.pass.cpp @@ -20,7 +20,7 @@ #include #include -int main() +int main(int, char**) { { std::list v1(3); @@ -28,4 +28,6 @@ int main() v1.splice(v1.begin(), v2, v2.begin(), v1.end()); assert(false); } + + return 0; } diff --git a/libcxx/test/libcxx/containers/sequences/list/version.pass.cpp b/libcxx/test/libcxx/containers/sequences/list/version.pass.cpp index 92a1988cfc7ff..677c085b41f65 100644 --- a/libcxx/test/libcxx/containers/sequences/list/version.pass.cpp +++ b/libcxx/test/libcxx/containers/sequences/list/version.pass.cpp @@ -14,6 +14,8 @@ #error _LIBCPP_VERSION not defined #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/containers/sequences/vector/asan.pass.cpp b/libcxx/test/libcxx/containers/sequences/vector/asan.pass.cpp index bf29d9b146080..866cce152546d 100644 --- a/libcxx/test/libcxx/containers/sequences/vector/asan.pass.cpp +++ b/libcxx/test/libcxx/containers/sequences/vector/asan.pass.cpp @@ -28,7 +28,7 @@ void do_exit() { exit(0); } -int main() +int main(int, char**) { #if TEST_STD_VER >= 11 { @@ -68,5 +68,5 @@ int main() } } #else -int main () { return 0; } +int main(int, char**) { return 0; } #endif diff --git a/libcxx/test/libcxx/containers/sequences/vector/asan_throw.pass.cpp b/libcxx/test/libcxx/containers/sequences/vector/asan_throw.pass.cpp index ce07bf77820db..443a6f2e92436 100644 --- a/libcxx/test/libcxx/containers/sequences/vector/asan_throw.pass.cpp +++ b/libcxx/test/libcxx/containers/sequences/vector/asan_throw.pass.cpp @@ -219,7 +219,7 @@ void test_resize_param() { assert(is_contiguous_container_asan_correct(v)); } -int main() { +int main(int, char**) { test_push_back(); test_emplace_back(); test_insert_range(); @@ -230,4 +230,6 @@ int main() { test_insert_n2(); test_resize(); test_resize_param(); + + return 0; } diff --git a/libcxx/test/libcxx/containers/sequences/vector/const_value_type.pass.cpp b/libcxx/test/libcxx/containers/sequences/vector/const_value_type.pass.cpp index ffe8ca4cae5e0..d3407e3aa8b16 100644 --- a/libcxx/test/libcxx/containers/sequences/vector/const_value_type.pass.cpp +++ b/libcxx/test/libcxx/containers/sequences/vector/const_value_type.pass.cpp @@ -15,7 +15,9 @@ #include #include -int main() +int main(int, char**) { std::vector v = {1, 2, 3}; + + return 0; } diff --git a/libcxx/test/libcxx/containers/sequences/vector/db_back.pass.cpp b/libcxx/test/libcxx/containers/sequences/vector/db_back.pass.cpp index 21f19a9ecaece..3a35a086b636c 100644 --- a/libcxx/test/libcxx/containers/sequences/vector/db_back.pass.cpp +++ b/libcxx/test/libcxx/containers/sequences/vector/db_back.pass.cpp @@ -23,7 +23,7 @@ #include "test_macros.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef int T; @@ -49,8 +49,10 @@ int main() #else -int main() +int main(int, char**) { + + return 0; } #endif diff --git a/libcxx/test/libcxx/containers/sequences/vector/db_cback.pass.cpp b/libcxx/test/libcxx/containers/sequences/vector/db_cback.pass.cpp index cc1a3d2538911..1c516ba57d960 100644 --- a/libcxx/test/libcxx/containers/sequences/vector/db_cback.pass.cpp +++ b/libcxx/test/libcxx/containers/sequences/vector/db_cback.pass.cpp @@ -23,7 +23,7 @@ #include "test_macros.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef int T; @@ -45,8 +45,10 @@ int main() #else -int main() +int main(int, char**) { + + return 0; } #endif diff --git a/libcxx/test/libcxx/containers/sequences/vector/db_cfront.pass.cpp b/libcxx/test/libcxx/containers/sequences/vector/db_cfront.pass.cpp index 83d9c00b2dc39..1dc7211f20845 100644 --- a/libcxx/test/libcxx/containers/sequences/vector/db_cfront.pass.cpp +++ b/libcxx/test/libcxx/containers/sequences/vector/db_cfront.pass.cpp @@ -23,7 +23,7 @@ #include "test_macros.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef int T; @@ -45,8 +45,10 @@ int main() #else -int main() +int main(int, char**) { + + return 0; } #endif diff --git a/libcxx/test/libcxx/containers/sequences/vector/db_cindex.pass.cpp b/libcxx/test/libcxx/containers/sequences/vector/db_cindex.pass.cpp index fc808eeb99ec4..ceab50a86b9a0 100644 --- a/libcxx/test/libcxx/containers/sequences/vector/db_cindex.pass.cpp +++ b/libcxx/test/libcxx/containers/sequences/vector/db_cindex.pass.cpp @@ -23,7 +23,7 @@ #include "test_macros.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef int T; @@ -47,8 +47,10 @@ int main() #else -int main() +int main(int, char**) { + + return 0; } #endif diff --git a/libcxx/test/libcxx/containers/sequences/vector/db_front.pass.cpp b/libcxx/test/libcxx/containers/sequences/vector/db_front.pass.cpp index df7bd35e061ff..a4aafcaefb7ee 100644 --- a/libcxx/test/libcxx/containers/sequences/vector/db_front.pass.cpp +++ b/libcxx/test/libcxx/containers/sequences/vector/db_front.pass.cpp @@ -23,7 +23,7 @@ #include "test_macros.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef int T; @@ -49,8 +49,10 @@ int main() #else -int main() +int main(int, char**) { + + return 0; } #endif diff --git a/libcxx/test/libcxx/containers/sequences/vector/db_index.pass.cpp b/libcxx/test/libcxx/containers/sequences/vector/db_index.pass.cpp index 5cb19254865df..a17ba27421100 100644 --- a/libcxx/test/libcxx/containers/sequences/vector/db_index.pass.cpp +++ b/libcxx/test/libcxx/containers/sequences/vector/db_index.pass.cpp @@ -23,7 +23,7 @@ #include "test_macros.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef int T; @@ -49,8 +49,10 @@ int main() #else -int main() +int main(int, char**) { + + return 0; } #endif diff --git a/libcxx/test/libcxx/containers/sequences/vector/db_iterators_2.pass.cpp b/libcxx/test/libcxx/containers/sequences/vector/db_iterators_2.pass.cpp index d7222dd184d28..975b5e951158e 100644 --- a/libcxx/test/libcxx/containers/sequences/vector/db_iterators_2.pass.cpp +++ b/libcxx/test/libcxx/containers/sequences/vector/db_iterators_2.pass.cpp @@ -23,7 +23,7 @@ #include "test_macros.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef int T; @@ -47,8 +47,10 @@ int main() #else -int main() +int main(int, char**) { + + return 0; } #endif diff --git a/libcxx/test/libcxx/containers/sequences/vector/db_iterators_3.pass.cpp b/libcxx/test/libcxx/containers/sequences/vector/db_iterators_3.pass.cpp index d39d99c3c3a7b..0dcd6e7f240ae 100644 --- a/libcxx/test/libcxx/containers/sequences/vector/db_iterators_3.pass.cpp +++ b/libcxx/test/libcxx/containers/sequences/vector/db_iterators_3.pass.cpp @@ -23,7 +23,7 @@ #include "test_macros.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef int T; @@ -47,8 +47,10 @@ int main() #else -int main() +int main(int, char**) { + + return 0; } #endif diff --git a/libcxx/test/libcxx/containers/sequences/vector/db_iterators_4.pass.cpp b/libcxx/test/libcxx/containers/sequences/vector/db_iterators_4.pass.cpp index f868b755eb89a..8d048f2fd2781 100644 --- a/libcxx/test/libcxx/containers/sequences/vector/db_iterators_4.pass.cpp +++ b/libcxx/test/libcxx/containers/sequences/vector/db_iterators_4.pass.cpp @@ -23,7 +23,7 @@ #include "test_macros.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef int T; @@ -49,8 +49,10 @@ int main() #else -int main() +int main(int, char**) { + + return 0; } #endif diff --git a/libcxx/test/libcxx/containers/sequences/vector/db_iterators_5.pass.cpp b/libcxx/test/libcxx/containers/sequences/vector/db_iterators_5.pass.cpp index c5039f9f8abca..19060da3d1a84 100644 --- a/libcxx/test/libcxx/containers/sequences/vector/db_iterators_5.pass.cpp +++ b/libcxx/test/libcxx/containers/sequences/vector/db_iterators_5.pass.cpp @@ -23,7 +23,7 @@ #include "test_macros.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef int T; @@ -53,8 +53,10 @@ int main() #else -int main() +int main(int, char**) { + + return 0; } #endif diff --git a/libcxx/test/libcxx/containers/sequences/vector/db_iterators_6.pass.cpp b/libcxx/test/libcxx/containers/sequences/vector/db_iterators_6.pass.cpp index ff60a05a4aea9..13156c22fe38b 100644 --- a/libcxx/test/libcxx/containers/sequences/vector/db_iterators_6.pass.cpp +++ b/libcxx/test/libcxx/containers/sequences/vector/db_iterators_6.pass.cpp @@ -23,7 +23,7 @@ #include "test_macros.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef int T; @@ -51,8 +51,10 @@ int main() #else -int main() +int main(int, char**) { + + return 0; } #endif diff --git a/libcxx/test/libcxx/containers/sequences/vector/db_iterators_7.pass.cpp b/libcxx/test/libcxx/containers/sequences/vector/db_iterators_7.pass.cpp index 8249fd7525229..943c5209b0d51 100644 --- a/libcxx/test/libcxx/containers/sequences/vector/db_iterators_7.pass.cpp +++ b/libcxx/test/libcxx/containers/sequences/vector/db_iterators_7.pass.cpp @@ -23,7 +23,7 @@ #include "test_macros.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef int T; @@ -51,8 +51,10 @@ int main() #else -int main() +int main(int, char**) { + + return 0; } #endif diff --git a/libcxx/test/libcxx/containers/sequences/vector/db_iterators_8.pass.cpp b/libcxx/test/libcxx/containers/sequences/vector/db_iterators_8.pass.cpp index c619f20dd6df8..39f26f66801af 100644 --- a/libcxx/test/libcxx/containers/sequences/vector/db_iterators_8.pass.cpp +++ b/libcxx/test/libcxx/containers/sequences/vector/db_iterators_8.pass.cpp @@ -23,7 +23,7 @@ #include "test_macros.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef int T; @@ -47,8 +47,10 @@ int main() #else -int main() +int main(int, char**) { + + return 0; } #endif diff --git a/libcxx/test/libcxx/containers/sequences/vector/pop_back_empty.pass.cpp b/libcxx/test/libcxx/containers/sequences/vector/pop_back_empty.pass.cpp index 0ce185325957a..1d1e3a1ba3d9a 100644 --- a/libcxx/test/libcxx/containers/sequences/vector/pop_back_empty.pass.cpp +++ b/libcxx/test/libcxx/containers/sequences/vector/pop_back_empty.pass.cpp @@ -16,10 +16,12 @@ #include -int main() { +int main(int, char**) { std::vector v; v.push_back(0); v.pop_back(); v.pop_back(); std::exit(1); + + return 0; } diff --git a/libcxx/test/libcxx/containers/sequences/vector/vector.cons/construct_iter_iter.pass.cpp b/libcxx/test/libcxx/containers/sequences/vector/vector.cons/construct_iter_iter.pass.cpp index ee139c18894c7..81263dec0bda4 100644 --- a/libcxx/test/libcxx/containers/sequences/vector/vector.cons/construct_iter_iter.pass.cpp +++ b/libcxx/test/libcxx/containers/sequences/vector/vector.cons/construct_iter_iter.pass.cpp @@ -48,6 +48,8 @@ void test_ctor_under_alloc() { } } -int main() { +int main(int, char**) { test_ctor_under_alloc(); + + return 0; } diff --git a/libcxx/test/libcxx/containers/sequences/vector/vector.cons/construct_iter_iter_alloc.pass.cpp b/libcxx/test/libcxx/containers/sequences/vector/vector.cons/construct_iter_iter_alloc.pass.cpp index 37814b2f13a34..0100507eab041 100644 --- a/libcxx/test/libcxx/containers/sequences/vector/vector.cons/construct_iter_iter_alloc.pass.cpp +++ b/libcxx/test/libcxx/containers/sequences/vector/vector.cons/construct_iter_iter_alloc.pass.cpp @@ -51,6 +51,8 @@ void test_ctor_under_alloc() { } } -int main() { +int main(int, char**) { test_ctor_under_alloc(); + + return 0; } diff --git a/libcxx/test/libcxx/containers/sequences/vector/version.pass.cpp b/libcxx/test/libcxx/containers/sequences/vector/version.pass.cpp index 16f45fc0b900f..93fd2e679b544 100644 --- a/libcxx/test/libcxx/containers/sequences/vector/version.pass.cpp +++ b/libcxx/test/libcxx/containers/sequences/vector/version.pass.cpp @@ -14,6 +14,8 @@ #error _LIBCPP_VERSION not defined #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/containers/unord/key_value_traits.pass.cpp b/libcxx/test/libcxx/containers/unord/key_value_traits.pass.cpp index c2d754b119acd..c5e420387fdaf 100644 --- a/libcxx/test/libcxx/containers/unord/key_value_traits.pass.cpp +++ b/libcxx/test/libcxx/containers/unord/key_value_traits.pass.cpp @@ -53,6 +53,8 @@ void testKeyValueTrait() { } } -int main() { +int main(int, char**) { testKeyValueTrait(); + + return 0; } diff --git a/libcxx/test/libcxx/containers/unord/next_pow2.pass.cpp b/libcxx/test/libcxx/containers/unord/next_pow2.pass.cpp index 36229dc240968..2b4d02eec38a4 100644 --- a/libcxx/test/libcxx/containers/unord/next_pow2.pass.cpp +++ b/libcxx/test/libcxx/containers/unord/next_pow2.pass.cpp @@ -74,7 +74,7 @@ fuzz_unordered_map_reserve(unsigned num_inserts, assert(m.bucket_count() >= num_reserve2); } -int main() +int main(int, char**) { test_next_pow2(); diff --git a/libcxx/test/libcxx/containers/unord/next_prime.pass.cpp b/libcxx/test/libcxx/containers/unord/next_prime.pass.cpp index e049e451a565e..6a82ea1d6b222 100644 --- a/libcxx/test/libcxx/containers/unord/next_prime.pass.cpp +++ b/libcxx/test/libcxx/containers/unord/next_prime.pass.cpp @@ -36,7 +36,7 @@ is_prime(size_t n) return true; } -int main() +int main(int, char**) { assert(std::__next_prime(0) == 0); for (std::size_t n = 1; n <= 100000; ++n) @@ -47,4 +47,6 @@ int main() assert(!is_prime(i)); assert(is_prime(p)); } + + return 0; } diff --git a/libcxx/test/libcxx/containers/unord/non_const_comparator.fail.cpp b/libcxx/test/libcxx/containers/unord/non_const_comparator.fail.cpp index 15fb8d4eda1b0..8fa500e45e444 100644 --- a/libcxx/test/libcxx/containers/unord/non_const_comparator.fail.cpp +++ b/libcxx/test/libcxx/containers/unord/non_const_comparator.fail.cpp @@ -29,7 +29,7 @@ struct BadEqual { } }; -int main() { +int main(int, char**) { static_assert(!std::__invokable::value, ""); static_assert(std::__invokable::value, ""); @@ -54,4 +54,6 @@ int main() { using C = std::unordered_multimap; C s; } + + return 0; } diff --git a/libcxx/test/libcxx/containers/unord/unord.map/at.abort.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.map/at.abort.pass.cpp new file mode 100644 index 0000000000000..b65af169b9b58 --- /dev/null +++ b/libcxx/test/libcxx/containers/unord/unord.map/at.abort.pass.cpp @@ -0,0 +1,31 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// + +// class unordered_map + +// mapped_type& at(const key_type& k); + +// Make sure we abort() when exceptions are disabled and we fetch a key that +// is not in the map. + +// REQUIRES: libcpp-no-exceptions +// UNSUPPORTED: c++98, c++03 + +#include +#include +#include + + +int main(int, char**) { + std::signal(SIGABRT, [](int) { std::_Exit(EXIT_SUCCESS); }); + std::unordered_map map; + map.at(1); + return EXIT_FAILURE; +} diff --git a/libcxx/test/libcxx/containers/unord/unord.map/at.const.abort.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.map/at.const.abort.pass.cpp new file mode 100644 index 0000000000000..af2a2cd7691a9 --- /dev/null +++ b/libcxx/test/libcxx/containers/unord/unord.map/at.const.abort.pass.cpp @@ -0,0 +1,31 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// + +// class unordered_map + +// const mapped_type& at(const key_type& k) const; + +// Make sure we abort() when exceptions are disabled and we fetch a key that +// is not in the map. + +// REQUIRES: libcpp-no-exceptions +// UNSUPPORTED: c++98, c++03 + +#include +#include +#include + + +int main(int, char**) { + std::signal(SIGABRT, [](int) { std::_Exit(EXIT_SUCCESS); }); + std::unordered_map const map; + map.at(1); + return EXIT_FAILURE; +} diff --git a/libcxx/test/libcxx/containers/unord/unord.map/db_iterators_7.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.map/db_iterators_7.pass.cpp index 0206b998c66fe..9ff6bafc3adef 100644 --- a/libcxx/test/libcxx/containers/unord/unord.map/db_iterators_7.pass.cpp +++ b/libcxx/test/libcxx/containers/unord/unord.map/db_iterators_7.pass.cpp @@ -24,7 +24,7 @@ #include "test_macros.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_map C; @@ -53,8 +53,10 @@ int main() #else -int main() +int main(int, char**) { + + return 0; } #endif diff --git a/libcxx/test/libcxx/containers/unord/unord.map/db_iterators_8.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.map/db_iterators_8.pass.cpp index 79ddccd1f57e0..ef383aa9f5d97 100644 --- a/libcxx/test/libcxx/containers/unord/unord.map/db_iterators_8.pass.cpp +++ b/libcxx/test/libcxx/containers/unord/unord.map/db_iterators_8.pass.cpp @@ -24,7 +24,7 @@ #include "test_macros.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_map C; @@ -49,8 +49,10 @@ int main() #else -int main() +int main(int, char**) { + + return 0; } #endif diff --git a/libcxx/test/libcxx/containers/unord/unord.map/db_local_iterators_7.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.map/db_local_iterators_7.pass.cpp index 002dcd31a980a..5c2b4024ae9a7 100644 --- a/libcxx/test/libcxx/containers/unord/unord.map/db_local_iterators_7.pass.cpp +++ b/libcxx/test/libcxx/containers/unord/unord.map/db_local_iterators_7.pass.cpp @@ -24,7 +24,7 @@ #include "test_macros.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_map C; @@ -50,8 +50,10 @@ int main() #else -int main() +int main(int, char**) { + + return 0; } #endif diff --git a/libcxx/test/libcxx/containers/unord/unord.map/db_local_iterators_8.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.map/db_local_iterators_8.pass.cpp index 887093b3c4b70..8e76f1bda459c 100644 --- a/libcxx/test/libcxx/containers/unord/unord.map/db_local_iterators_8.pass.cpp +++ b/libcxx/test/libcxx/containers/unord/unord.map/db_local_iterators_8.pass.cpp @@ -24,7 +24,7 @@ #include "test_macros.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_map C; @@ -47,8 +47,10 @@ int main() #else -int main() +int main(int, char**) { + + return 0; } #endif diff --git a/libcxx/test/libcxx/containers/unord/unord.map/version.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.map/version.pass.cpp index ce4a2784c6187..983acde548b8f 100644 --- a/libcxx/test/libcxx/containers/unord/unord.map/version.pass.cpp +++ b/libcxx/test/libcxx/containers/unord/unord.map/version.pass.cpp @@ -14,6 +14,8 @@ #error _LIBCPP_VERSION not defined #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/containers/unord/unord.set/missing_hash_specialization.fail.cpp b/libcxx/test/libcxx/containers/unord/unord.set/missing_hash_specialization.fail.cpp index 9ef240df80fea..af94748fdd924 100644 --- a/libcxx/test/libcxx/containers/unord/unord.set/missing_hash_specialization.fail.cpp +++ b/libcxx/test/libcxx/containers/unord/unord.set/missing_hash_specialization.fail.cpp @@ -42,7 +42,7 @@ struct GoodHashNoDefault { size_t operator()(T const&) const { return 0; } }; -int main() { +int main(int, char**) { { using Set = std::unordered_set; @@ -66,4 +66,6 @@ int main() { using Set = std::unordered_set; Set s(/*bucketcount*/42, GoodHashNoDefault(nullptr)); } + + return 0; } diff --git a/libcxx/test/libcxx/containers/unord/unord.set/version.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.set/version.pass.cpp index 477867757d07e..63144528cf930 100644 --- a/libcxx/test/libcxx/containers/unord/unord.set/version.pass.cpp +++ b/libcxx/test/libcxx/containers/unord/unord.set/version.pass.cpp @@ -14,6 +14,8 @@ #error _LIBCPP_VERSION not defined #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/debug/containers/db_associative_container_tests.pass.cpp b/libcxx/test/libcxx/debug/containers/db_associative_container_tests.pass.cpp index e78e4ec760677..d6c231527dda2 100644 --- a/libcxx/test/libcxx/debug/containers/db_associative_container_tests.pass.cpp +++ b/libcxx/test/libcxx/debug/containers/db_associative_container_tests.pass.cpp @@ -51,7 +51,7 @@ struct AssociativeContainerChecks : BasicContainerChecks { // FIXME Add tests here }; -int main() +int main(int, char**) { using SetAlloc = test_allocator; using MapAlloc = test_allocator>; @@ -66,4 +66,6 @@ int main() AssociativeContainerChecks< std::multimap, MapAlloc>, CT_MultiMap>::run(); } + + return 0; } diff --git a/libcxx/test/libcxx/debug/containers/db_sequence_container_iterators.pass.cpp b/libcxx/test/libcxx/debug/containers/db_sequence_container_iterators.pass.cpp index 94ad45b48b17b..6ead98ebcb797 100644 --- a/libcxx/test/libcxx/debug/containers/db_sequence_container_iterators.pass.cpp +++ b/libcxx/test/libcxx/debug/containers/db_sequence_container_iterators.pass.cpp @@ -40,6 +40,7 @@ struct SequenceContainerChecks : BasicContainerChecks { static void run() { Base::run(); try { + SanityTest(); FrontOnEmptyContainer(); if constexpr (CT != CT_ForwardList) { @@ -71,6 +72,12 @@ struct SequenceContainerChecks : BasicContainerChecks { } private: + static void SanityTest() { + CHECKPOINT("sanity test"); + Container C = {1, 1, 1, 1}; + ::DoNotOptimize(&C); + } + static void RemoveFirstElem() { // See llvm.org/PR35564 CHECKPOINT("remove()"); @@ -307,7 +314,7 @@ struct SequenceContainerChecks : BasicContainerChecks { } }; -int main() +int main(int, char**) { using Alloc = test_allocator; { @@ -323,4 +330,6 @@ int main() SequenceContainerChecks< std::deque, CT_Deque>::run(); } + + return 0; } diff --git a/libcxx/test/libcxx/debug/containers/db_string.pass.cpp b/libcxx/test/libcxx/debug/containers/db_string.pass.cpp index e3b2b290dd672..b2812fca61967 100644 --- a/libcxx/test/libcxx/debug/containers/db_string.pass.cpp +++ b/libcxx/test/libcxx/debug/containers/db_string.pass.cpp @@ -93,7 +93,9 @@ struct StringContainerChecks : BasicContainerChecks { } }; -int main() +int main(int, char**) { StringContainerChecks<>::run(); + + return 0; } diff --git a/libcxx/test/libcxx/debug/containers/db_unord_container_tests.pass.cpp b/libcxx/test/libcxx/debug/containers/db_unord_container_tests.pass.cpp index 069c4ae21a67d..8a6da08263bf1 100644 --- a/libcxx/test/libcxx/debug/containers/db_unord_container_tests.pass.cpp +++ b/libcxx/test/libcxx/debug/containers/db_unord_container_tests.pass.cpp @@ -49,7 +49,7 @@ struct UnorderedContainerChecks : BasicContainerChecks { }; -int main() +int main(int, char**) { using SetAlloc = test_allocator; using MapAlloc = test_allocator>; @@ -67,4 +67,6 @@ int main() std::unordered_multiset, std::equal_to, SetAlloc>, CT_UnorderedMultiSet>::run(); } + + return 0; } diff --git a/libcxx/test/libcxx/debug/debug_abort.pass.cpp b/libcxx/test/libcxx/debug/debug_abort.pass.cpp index a9dae6eeae76c..270f2cb0f43b1 100644 --- a/libcxx/test/libcxx/debug/debug_abort.pass.cpp +++ b/libcxx/test/libcxx/debug/debug_abort.pass.cpp @@ -27,7 +27,7 @@ void signal_handler(int signal) std::_Exit(EXIT_FAILURE); } -int main() +int main(int, char**) { if (std::signal(SIGABRT, signal_handler) != SIG_ERR) _LIBCPP_ASSERT(false, "foo"); diff --git a/libcxx/test/libcxx/debug/debug_throw.pass.cpp b/libcxx/test/libcxx/debug/debug_throw.pass.cpp index c17546ebd285d..53e8538c4a6bd 100644 --- a/libcxx/test/libcxx/debug/debug_throw.pass.cpp +++ b/libcxx/test/libcxx/debug/debug_throw.pass.cpp @@ -23,7 +23,7 @@ #include #include <__debug> -int main() +int main(int, char**) { { std::__libcpp_debug_function = std::__libcpp_throw_debug_function; @@ -37,4 +37,6 @@ int main() std::__libcpp_debug_exception >::value), "must be an exception"); } + + return 0; } diff --git a/libcxx/test/libcxx/debug/debug_throw_register.pass.cpp b/libcxx/test/libcxx/debug/debug_throw_register.pass.cpp index 6d345f0ba0fb4..23b4091c3a0cb 100644 --- a/libcxx/test/libcxx/debug/debug_throw_register.pass.cpp +++ b/libcxx/test/libcxx/debug/debug_throw_register.pass.cpp @@ -26,10 +26,12 @@ #include <__debug> #include -int main() +int main(int, char**) { try { _LIBCPP_ASSERT(false, "foo"); assert(false); } catch (...) {} + + return 0; } diff --git a/libcxx/test/libcxx/depr/depr.auto.ptr/auto.ptr/auto_ptr.cxx1z.pass.cpp b/libcxx/test/libcxx/depr/depr.auto.ptr/auto.ptr/auto_ptr.cxx1z.pass.cpp index 3b387b3aba2ba..7f59ca20241e2 100644 --- a/libcxx/test/libcxx/depr/depr.auto.ptr/auto.ptr/auto_ptr.cxx1z.pass.cpp +++ b/libcxx/test/libcxx/depr/depr.auto.ptr/auto.ptr/auto_ptr.cxx1z.pass.cpp @@ -22,7 +22,9 @@ #include #include -int main() +int main(int, char**) { std::auto_ptr p; + + return 0; } diff --git a/libcxx/test/libcxx/depr/depr.auto.ptr/auto.ptr/auto_ptr.depr_in_cxx11.fail.cpp b/libcxx/test/libcxx/depr/depr.auto.ptr/auto.ptr/auto_ptr.depr_in_cxx11.fail.cpp index be0ce6617dddb..db4ac4aae02c5 100644 --- a/libcxx/test/libcxx/depr/depr.auto.ptr/auto.ptr/auto_ptr.depr_in_cxx11.fail.cpp +++ b/libcxx/test/libcxx/depr/depr.auto.ptr/auto.ptr/auto_ptr.depr_in_cxx11.fail.cpp @@ -30,9 +30,11 @@ #include #include "test_macros.h" -int main() +int main(int, char**) { typedef std::auto_ptr AP; // expected-error{{'auto_ptr' is deprecated}} typedef std::auto_ptr APV; // expected-error{{'auto_ptr' is deprecated}} typedef std::auto_ptr_ref APR; // expected-error{{'auto_ptr_ref' is deprecated}} + + return 0; } diff --git a/libcxx/test/libcxx/depr/depr.c.headers/ciso646.pass.cpp b/libcxx/test/libcxx/depr/depr.c.headers/ciso646.pass.cpp index 4009a5ce25e8f..7a83994140d92 100644 --- a/libcxx/test/libcxx/depr/depr.c.headers/ciso646.pass.cpp +++ b/libcxx/test/libcxx/depr/depr.c.headers/ciso646.pass.cpp @@ -14,6 +14,8 @@ #error _LIBCPP_VERSION not defined #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/depr/depr.c.headers/complex.h.pass.cpp b/libcxx/test/libcxx/depr/depr.c.headers/complex.h.pass.cpp index 4f035e014675f..07529aef261d4 100644 --- a/libcxx/test/libcxx/depr/depr.c.headers/complex.h.pass.cpp +++ b/libcxx/test/libcxx/depr/depr.c.headers/complex.h.pass.cpp @@ -14,8 +14,10 @@ #error _LIBCPP_VERSION not defined #endif -int main() +int main(int, char**) { std::complex d; (void)d; + + return 0; } diff --git a/libcxx/test/libcxx/depr/depr.c.headers/extern_c.pass.cpp b/libcxx/test/libcxx/depr/depr.c.headers/extern_c.pass.cpp index 5b036ab41897d..24a104f5edd43 100644 --- a/libcxx/test/libcxx/depr/depr.c.headers/extern_c.pass.cpp +++ b/libcxx/test/libcxx/depr/depr.c.headers/extern_c.pass.cpp @@ -39,4 +39,6 @@ extern "C" { #include } -int main() {} +int main(int, char**) { + return 0; +} diff --git a/libcxx/test/libcxx/depr/depr.c.headers/fenv.pass.cpp b/libcxx/test/libcxx/depr/depr.c.headers/fenv.pass.cpp new file mode 100644 index 0000000000000..9cc7063e8a53b --- /dev/null +++ b/libcxx/test/libcxx/depr/depr.c.headers/fenv.pass.cpp @@ -0,0 +1,19 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// + +#include + +#ifndef _LIBCPP_VERSION +#error _LIBCPP_VERSION not defined +#endif + +int main() +{ +} diff --git a/libcxx/test/libcxx/depr/depr.c.headers/locale_h.pass.cpp b/libcxx/test/libcxx/depr/depr.c.headers/locale_h.pass.cpp index 63f63ef591767..ea117f6b27b33 100644 --- a/libcxx/test/libcxx/depr/depr.c.headers/locale_h.pass.cpp +++ b/libcxx/test/libcxx/depr/depr.c.headers/locale_h.pass.cpp @@ -14,6 +14,8 @@ #error _LIBCPP_VERSION not defined #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/depr/depr.c.headers/tgmath_h.pass.cpp b/libcxx/test/libcxx/depr/depr.c.headers/tgmath_h.pass.cpp index 7252ab00a2cbe..835e2f21616ab 100644 --- a/libcxx/test/libcxx/depr/depr.c.headers/tgmath_h.pass.cpp +++ b/libcxx/test/libcxx/depr/depr.c.headers/tgmath_h.pass.cpp @@ -14,10 +14,12 @@ #error _LIBCPP_VERSION not defined #endif -int main() +int main(int, char**) { std::complex cd; (void)cd; double x = sin(1.0); (void)x; // to placate scan-build + + return 0; } diff --git a/libcxx/test/libcxx/depr/depr.function.objects/adaptors.depr_in_cxx11.fail.cpp b/libcxx/test/libcxx/depr/depr.function.objects/adaptors.depr_in_cxx11.fail.cpp index 489fc874eb09c..e26a7549883a9 100644 --- a/libcxx/test/libcxx/depr/depr.function.objects/adaptors.depr_in_cxx11.fail.cpp +++ b/libcxx/test/libcxx/depr/depr.function.objects/adaptors.depr_in_cxx11.fail.cpp @@ -31,7 +31,7 @@ struct Foo { int identity(int v) { return v; } }; -int main() +int main(int, char**) { typedef std::pointer_to_unary_function PUF; // expected-error{{'pointer_to_unary_function' is deprecated}} typedef std::pointer_to_binary_function PBF; // expected-error{{'pointer_to_binary_function' is deprecated}} @@ -55,4 +55,6 @@ int main() std::mem_fun_ref(&Foo::identity); // expected-error{{'mem_fun_ref' is deprecated}} std::mem_fun_ref(&Foo::const_zero); // expected-error{{'mem_fun_ref' is deprecated}} std::mem_fun_ref(&Foo::const_identity); // expected-error{{'mem_fun_ref' is deprecated}} + + return 0; } diff --git a/libcxx/test/libcxx/depr/depr.function.objects/depr.adaptors.cxx1z.pass.cpp b/libcxx/test/libcxx/depr/depr.function.objects/depr.adaptors.cxx1z.pass.cpp index 5ea5626285bbe..7b759d04bd926 100644 --- a/libcxx/test/libcxx/depr/depr.function.objects/depr.adaptors.cxx1z.pass.cpp +++ b/libcxx/test/libcxx/depr/depr.function.objects/depr.adaptors.cxx1z.pass.cpp @@ -30,7 +30,7 @@ struct Foo { int sum(int a, int b) const { return a + b; } }; -int main() +int main(int, char**) { typedef std::pointer_to_unary_function PUF; typedef std::pointer_to_binary_function PBF; @@ -60,4 +60,6 @@ int main() assert((std::mem_fun_ref(&Foo::zero)(f) == 0)); assert((std::mem_fun_ref(&Foo::identity)(f, 5) == 5)); + + return 0; } diff --git a/libcxx/test/libcxx/depr/depr.str.strstreams/version.pass.cpp b/libcxx/test/libcxx/depr/depr.str.strstreams/version.pass.cpp index 9d6b9762e73c0..148f233cee2c9 100644 --- a/libcxx/test/libcxx/depr/depr.str.strstreams/version.pass.cpp +++ b/libcxx/test/libcxx/depr/depr.str.strstreams/version.pass.cpp @@ -14,6 +14,8 @@ #error _LIBCPP_VERSION not defined #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/depr/enable_removed_cpp17_features.pass.cpp b/libcxx/test/libcxx/depr/enable_removed_cpp17_features.pass.cpp index bd1ee604c7042..2065b2b4eeaf2 100644 --- a/libcxx/test/libcxx/depr/enable_removed_cpp17_features.pass.cpp +++ b/libcxx/test/libcxx/depr/enable_removed_cpp17_features.pass.cpp @@ -21,5 +21,7 @@ #error _LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR must be defined #endif -int main() { +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/depr/exception.unexpected/get_unexpected.pass.cpp b/libcxx/test/libcxx/depr/exception.unexpected/get_unexpected.pass.cpp index 4d49440fc63e0..ca14271f02dcc 100644 --- a/libcxx/test/libcxx/depr/exception.unexpected/get_unexpected.pass.cpp +++ b/libcxx/test/libcxx/depr/exception.unexpected/get_unexpected.pass.cpp @@ -23,7 +23,7 @@ void f3() std::exit(0); } -int main() +int main(int, char**) { std::unexpected_handler old = std::get_unexpected(); @@ -38,4 +38,6 @@ int main() std::set_terminate(f3); (*old)(); assert(0); + + return 0; } diff --git a/libcxx/test/libcxx/depr/exception.unexpected/set_unexpected.pass.cpp b/libcxx/test/libcxx/depr/exception.unexpected/set_unexpected.pass.cpp index 43836f4fb9b57..dd861941a447b 100644 --- a/libcxx/test/libcxx/depr/exception.unexpected/set_unexpected.pass.cpp +++ b/libcxx/test/libcxx/depr/exception.unexpected/set_unexpected.pass.cpp @@ -22,7 +22,7 @@ void f3() std::exit(0); } -int main() +int main(int, char**) { std::unexpected_handler old = std::set_unexpected(f1); // verify there is a previous unexpected handler @@ -33,4 +33,6 @@ int main() std::set_terminate(f3); (*old)(); assert(0); + + return 0; } diff --git a/libcxx/test/libcxx/depr/exception.unexpected/unexpected.pass.cpp b/libcxx/test/libcxx/depr/exception.unexpected/unexpected.pass.cpp index e4d85e1f2da34..b9bdabe0e76e9 100644 --- a/libcxx/test/libcxx/depr/exception.unexpected/unexpected.pass.cpp +++ b/libcxx/test/libcxx/depr/exception.unexpected/unexpected.pass.cpp @@ -19,9 +19,11 @@ void fexit() std::exit(0); } -int main() +int main(int, char**) { std::set_unexpected(fexit); std::unexpected(); assert(false); + + return 0; } diff --git a/libcxx/test/libcxx/depr/exception.unexpected/unexpected_disabled_cpp17.fail.cpp b/libcxx/test/libcxx/depr/exception.unexpected/unexpected_disabled_cpp17.fail.cpp index 6a8549128577e..0388cfaf7ad3a 100644 --- a/libcxx/test/libcxx/depr/exception.unexpected/unexpected_disabled_cpp17.fail.cpp +++ b/libcxx/test/libcxx/depr/exception.unexpected/unexpected_disabled_cpp17.fail.cpp @@ -14,9 +14,11 @@ void f() {} -int main() { +int main(int, char**) { using T = std::unexpected_handler; // expected-error {{no type named 'unexpected_handler' in namespace 'std'}} std::unexpected(); // expected-error {{no member named 'unexpected' in namespace 'std'}} std::get_unexpected(); // expected-error {{no member named 'get_unexpected' in namespace 'std'}} std::set_unexpected(f); // expected-error {{no type named 'set_unexpected' in namespace 'std'}} + + return 0; } diff --git a/libcxx/test/libcxx/diagnostics/assertions/version_cassert.pass.cpp b/libcxx/test/libcxx/diagnostics/assertions/version_cassert.pass.cpp index 374ed6fedac34..f2fb0952402e3 100644 --- a/libcxx/test/libcxx/diagnostics/assertions/version_cassert.pass.cpp +++ b/libcxx/test/libcxx/diagnostics/assertions/version_cassert.pass.cpp @@ -14,6 +14,8 @@ #error _LIBCPP_VERSION not defined #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/diagnostics/enable_nodiscard.fail.cpp b/libcxx/test/libcxx/diagnostics/enable_nodiscard.fail.cpp index d756c3f9ea6c6..0cd74be2f500e 100644 --- a/libcxx/test/libcxx/diagnostics/enable_nodiscard.fail.cpp +++ b/libcxx/test/libcxx/diagnostics/enable_nodiscard.fail.cpp @@ -24,9 +24,11 @@ _LIBCPP_NODISCARD_EXT int foo() { return 42; } _LIBCPP_NODISCARD_AFTER_CXX17 int bar() { return 42; } -int main() { +int main(int, char**) { foo(); // expected-error-re {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} bar(); // expected-error-re {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} (void)foo(); // OK. void casts disable the diagnostic. (void)bar(); + + return 0; } diff --git a/libcxx/test/libcxx/diagnostics/enable_nodiscard_disable_after_cxx17.fail.cpp b/libcxx/test/libcxx/diagnostics/enable_nodiscard_disable_after_cxx17.fail.cpp index a7a81f53ff33b..530ea54ca6088 100644 --- a/libcxx/test/libcxx/diagnostics/enable_nodiscard_disable_after_cxx17.fail.cpp +++ b/libcxx/test/libcxx/diagnostics/enable_nodiscard_disable_after_cxx17.fail.cpp @@ -25,8 +25,10 @@ _LIBCPP_NODISCARD_EXT int foo() { return 42; } _LIBCPP_NODISCARD_AFTER_CXX17 int bar() { return 42; } -int main() { +int main(int, char**) { foo(); // expected-error-re {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} bar(); // OK. (void)foo(); // OK. + + return 0; } diff --git a/libcxx/test/libcxx/diagnostics/enable_nodiscard_disable_nodiscard_ext.fail.cpp b/libcxx/test/libcxx/diagnostics/enable_nodiscard_disable_nodiscard_ext.fail.cpp index 65b3bbeabae47..56df9248da1ba 100644 --- a/libcxx/test/libcxx/diagnostics/enable_nodiscard_disable_nodiscard_ext.fail.cpp +++ b/libcxx/test/libcxx/diagnostics/enable_nodiscard_disable_nodiscard_ext.fail.cpp @@ -23,8 +23,10 @@ _LIBCPP_NODISCARD_EXT int foo() { return 42; } _LIBCPP_NODISCARD_AFTER_CXX17 int bar() { return 42; } -int main() { +int main(int, char**) { bar(); // expected-error-re {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} foo(); // OK. (void)bar(); // OK. + + return 0; } diff --git a/libcxx/test/libcxx/diagnostics/errno/version_cerrno.pass.cpp b/libcxx/test/libcxx/diagnostics/errno/version_cerrno.pass.cpp index c47c75e8c8457..a8c51c01337fb 100644 --- a/libcxx/test/libcxx/diagnostics/errno/version_cerrno.pass.cpp +++ b/libcxx/test/libcxx/diagnostics/errno/version_cerrno.pass.cpp @@ -15,4 +15,6 @@ #error _LIBCPP_VERSION not defined #endif -int main() {} +int main(int, char**) { + return 0; +} diff --git a/libcxx/test/libcxx/diagnostics/nodiscard.pass.cpp b/libcxx/test/libcxx/diagnostics/nodiscard.pass.cpp index 628ff57ee7612..1db9a67a8b309 100644 --- a/libcxx/test/libcxx/diagnostics/nodiscard.pass.cpp +++ b/libcxx/test/libcxx/diagnostics/nodiscard.pass.cpp @@ -14,6 +14,8 @@ _LIBCPP_NODISCARD_EXT int foo() { return 42; } -int main() { +int main(int, char**) { foo(); // OK. + + return 0; } diff --git a/libcxx/test/libcxx/diagnostics/nodiscard_aftercxx17.fail.cpp b/libcxx/test/libcxx/diagnostics/nodiscard_aftercxx17.fail.cpp index 250f858be0136..8cfbc3117853b 100644 --- a/libcxx/test/libcxx/diagnostics/nodiscard_aftercxx17.fail.cpp +++ b/libcxx/test/libcxx/diagnostics/nodiscard_aftercxx17.fail.cpp @@ -16,7 +16,9 @@ _LIBCPP_NODISCARD_AFTER_CXX17 int foo() { return 6; } -int main () +int main(int, char**) { foo(); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} + + return 0; } diff --git a/libcxx/test/libcxx/diagnostics/nodiscard_aftercxx17.pass.cpp b/libcxx/test/libcxx/diagnostics/nodiscard_aftercxx17.pass.cpp index 527487faa9705..959ba4854b871 100644 --- a/libcxx/test/libcxx/diagnostics/nodiscard_aftercxx17.pass.cpp +++ b/libcxx/test/libcxx/diagnostics/nodiscard_aftercxx17.pass.cpp @@ -16,7 +16,9 @@ _LIBCPP_NODISCARD_AFTER_CXX17 int foo() { return 6; } -int main () +int main(int, char**) { foo(); // no error here! + + return 0; } diff --git a/libcxx/test/libcxx/diagnostics/nodiscard_extensions.fail.cpp b/libcxx/test/libcxx/diagnostics/nodiscard_extensions.fail.cpp index 6fc95bbeb99f2..a265e8755b566 100644 --- a/libcxx/test/libcxx/diagnostics/nodiscard_extensions.fail.cpp +++ b/libcxx/test/libcxx/diagnostics/nodiscard_extensions.fail.cpp @@ -26,9 +26,11 @@ #include "test_macros.h" -int main() { +int main(int, char**) { { // expected-error-re@+1 {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}} std::get_temporary_buffer(1); } + + return 0; } diff --git a/libcxx/test/libcxx/diagnostics/nodiscard_extensions.pass.cpp b/libcxx/test/libcxx/diagnostics/nodiscard_extensions.pass.cpp index bd888e5f9c5f9..87615fbd0f5ec 100644 --- a/libcxx/test/libcxx/diagnostics/nodiscard_extensions.pass.cpp +++ b/libcxx/test/libcxx/diagnostics/nodiscard_extensions.pass.cpp @@ -21,8 +21,10 @@ #include "test_macros.h" -int main() { +int main(int, char**) { { std::get_temporary_buffer(1); // intentional memory leak. } + + return 0; } diff --git a/libcxx/test/libcxx/diagnostics/std.exceptions/version.pass.cpp b/libcxx/test/libcxx/diagnostics/std.exceptions/version.pass.cpp index 860c18795171e..147f4d2b9b3d2 100644 --- a/libcxx/test/libcxx/diagnostics/std.exceptions/version.pass.cpp +++ b/libcxx/test/libcxx/diagnostics/std.exceptions/version.pass.cpp @@ -14,6 +14,8 @@ #error _LIBCPP_VERSION not defined #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/diagnostics/syserr/version.pass.cpp b/libcxx/test/libcxx/diagnostics/syserr/version.pass.cpp index 6f2dde8efae34..4b987a668ad68 100644 --- a/libcxx/test/libcxx/diagnostics/syserr/version.pass.cpp +++ b/libcxx/test/libcxx/diagnostics/syserr/version.pass.cpp @@ -14,6 +14,8 @@ #error _LIBCPP_VERSION not defined #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/double_include.sh.cpp b/libcxx/test/libcxx/double_include.sh.cpp index 249b90947f47c..2ee444af566f0 100644 --- a/libcxx/test/libcxx/double_include.sh.cpp +++ b/libcxx/test/libcxx/double_include.sh.cpp @@ -63,6 +63,7 @@ #include #include #include +#include #include #include #include @@ -168,5 +169,5 @@ #include #if defined(WITH_MAIN) -int main() {} +int main(int, char**) { return 0; } #endif diff --git a/libcxx/test/libcxx/experimental/algorithms/header.algorithm.synop/includes.pass.cpp b/libcxx/test/libcxx/experimental/algorithms/header.algorithm.synop/includes.pass.cpp index ecbf562f8802f..271e94347d168 100644 --- a/libcxx/test/libcxx/experimental/algorithms/header.algorithm.synop/includes.pass.cpp +++ b/libcxx/test/libcxx/experimental/algorithms/header.algorithm.synop/includes.pass.cpp @@ -14,6 +14,8 @@ # error " must include " #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/experimental/algorithms/version.pass.cpp b/libcxx/test/libcxx/experimental/algorithms/version.pass.cpp index d0107209fb8fa..c43ad68a96efc 100644 --- a/libcxx/test/libcxx/experimental/algorithms/version.pass.cpp +++ b/libcxx/test/libcxx/experimental/algorithms/version.pass.cpp @@ -14,6 +14,8 @@ # error _LIBCPP_VERSION not defined #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/experimental/diagnostics/syserr/use_header_warning.fail.cpp b/libcxx/test/libcxx/experimental/diagnostics/syserr/use_header_warning.fail.cpp index 5d72e5e934030..a7fef5e734a5e 100644 --- a/libcxx/test/libcxx/experimental/diagnostics/syserr/use_header_warning.fail.cpp +++ b/libcxx/test/libcxx/experimental/diagnostics/syserr/use_header_warning.fail.cpp @@ -14,4 +14,6 @@ // expected-error@experimental/system_error:* {{" has been removed. Use instead."}} -int main() {} +int main(int, char**) { + return 0; +} diff --git a/libcxx/test/libcxx/experimental/diagnostics/syserr/version.pass.cpp b/libcxx/test/libcxx/experimental/diagnostics/syserr/version.pass.cpp index 7d52c955ddc2e..4f6d28c4c3549 100644 --- a/libcxx/test/libcxx/experimental/diagnostics/syserr/version.pass.cpp +++ b/libcxx/test/libcxx/experimental/diagnostics/syserr/version.pass.cpp @@ -17,4 +17,6 @@ #error _LIBCPP_VERSION not defined #endif -int main() {} +int main(int, char**) { + return 0; +} diff --git a/libcxx/test/libcxx/experimental/filesystem/version.pass.cpp b/libcxx/test/libcxx/experimental/filesystem/version.pass.cpp index 09994b6b35f50..d8b2cbbd14f33 100644 --- a/libcxx/test/libcxx/experimental/filesystem/version.pass.cpp +++ b/libcxx/test/libcxx/experimental/filesystem/version.pass.cpp @@ -14,6 +14,8 @@ #error _LIBCPP_VERSION not defined #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/experimental/language.support/support.coroutines/dialect_support.sh.cpp b/libcxx/test/libcxx/experimental/language.support/support.coroutines/dialect_support.sh.cpp index 5dfdbe840ad8a..237fbc4bbd615 100644 --- a/libcxx/test/libcxx/experimental/language.support/support.coroutines/dialect_support.sh.cpp +++ b/libcxx/test/libcxx/experimental/language.support/support.coroutines/dialect_support.sh.cpp @@ -49,10 +49,12 @@ MyFuture test_coro() { co_return; } -int main() +int main(int, char**) { MyFuture f = test_coro(); while (!f.p.done()) f.p.resume(); f.p.destroy(); + + return 0; } diff --git a/libcxx/test/libcxx/experimental/language.support/support.coroutines/version.sh.cpp b/libcxx/test/libcxx/experimental/language.support/support.coroutines/version.sh.cpp index a80e3013b40ee..b11ea931f9212 100644 --- a/libcxx/test/libcxx/experimental/language.support/support.coroutines/version.sh.cpp +++ b/libcxx/test/libcxx/experimental/language.support/support.coroutines/version.sh.cpp @@ -19,6 +19,8 @@ #error _LIBCPP_VERSION must be defined #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/experimental/lit.local.cfg b/libcxx/test/libcxx/experimental/lit.local.cfg new file mode 100644 index 0000000000000..5e2c6324131be --- /dev/null +++ b/libcxx/test/libcxx/experimental/lit.local.cfg @@ -0,0 +1,3 @@ +# Disable all of the experimental tests if the correct feature is not available. +if 'c++experimental' not in config.available_features: + config.unsupported = True diff --git a/libcxx/test/libcxx/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/construct_piecewise_pair.pass.cpp b/libcxx/test/libcxx/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/construct_piecewise_pair.pass.cpp index b92771b4b1298..e12d31d5ff7aa 100644 --- a/libcxx/test/libcxx/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/construct_piecewise_pair.pass.cpp +++ b/libcxx/test/libcxx/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/construct_piecewise_pair.pass.cpp @@ -103,7 +103,7 @@ struct CountCopiesAllocV2 { }; -int main() +int main(int, char**) { { using T = CountCopies; @@ -167,4 +167,6 @@ int main() assert(p.first.alloc == h.M); assert(p.second.count == 2); } + + return 0; } diff --git a/libcxx/test/libcxx/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/db_deallocate.pass.cpp b/libcxx/test/libcxx/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/db_deallocate.pass.cpp index ed583e4e0c9ba..38fa265f8ed2c 100644 --- a/libcxx/test/libcxx/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/db_deallocate.pass.cpp +++ b/libcxx/test/libcxx/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/db_deallocate.pass.cpp @@ -26,7 +26,7 @@ int AssertCount = 0; namespace ex = std::experimental::pmr; -int main() +int main(int, char**) { using Alloc = ex::polymorphic_allocator; using Traits = std::allocator_traits; @@ -38,4 +38,6 @@ int main() assert(AssertCount == 0); a.deallocate(nullptr, maxSize + 1); assert(AssertCount == 1); + + return 0; } diff --git a/libcxx/test/libcxx/experimental/memory/memory.resource.adaptor/memory.resource.adaptor.mem/db_deallocate.pass.cpp b/libcxx/test/libcxx/experimental/memory/memory.resource.adaptor/memory.resource.adaptor.mem/db_deallocate.pass.cpp index cb40761074f9a..d7a56be43877d 100644 --- a/libcxx/test/libcxx/experimental/memory/memory.resource.adaptor/memory.resource.adaptor.mem/db_deallocate.pass.cpp +++ b/libcxx/test/libcxx/experimental/memory/memory.resource.adaptor/memory.resource.adaptor.mem/db_deallocate.pass.cpp @@ -26,7 +26,7 @@ int AssertCount = 0; namespace ex = std::experimental::pmr; -int main() +int main(int, char**) { using Alloc = NullAllocator; @@ -41,4 +41,6 @@ int main() assert(AssertCount == 0); m1.deallocate(nullptr, maxSize + 1); assert(AssertCount >= 1); + + return 0; } diff --git a/libcxx/test/libcxx/experimental/memory/memory.resource.aliases/header_deque_libcpp_version.pass.cpp b/libcxx/test/libcxx/experimental/memory/memory.resource.aliases/header_deque_libcpp_version.pass.cpp index 78586781cf037..53423a7a7a8bc 100644 --- a/libcxx/test/libcxx/experimental/memory/memory.resource.aliases/header_deque_libcpp_version.pass.cpp +++ b/libcxx/test/libcxx/experimental/memory/memory.resource.aliases/header_deque_libcpp_version.pass.cpp @@ -16,6 +16,8 @@ #error header must provide _LIBCPP_VERSION #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/experimental/memory/memory.resource.aliases/header_forward_list_libcpp_version.pass.cpp b/libcxx/test/libcxx/experimental/memory/memory.resource.aliases/header_forward_list_libcpp_version.pass.cpp index 35faa8389676c..8f71d91abad8f 100644 --- a/libcxx/test/libcxx/experimental/memory/memory.resource.aliases/header_forward_list_libcpp_version.pass.cpp +++ b/libcxx/test/libcxx/experimental/memory/memory.resource.aliases/header_forward_list_libcpp_version.pass.cpp @@ -16,6 +16,8 @@ #error header must provide _LIBCPP_VERSION #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/experimental/memory/memory.resource.aliases/header_list_libcpp_version.pass.cpp b/libcxx/test/libcxx/experimental/memory/memory.resource.aliases/header_list_libcpp_version.pass.cpp index e292206217047..3cdf4794d3156 100644 --- a/libcxx/test/libcxx/experimental/memory/memory.resource.aliases/header_list_libcpp_version.pass.cpp +++ b/libcxx/test/libcxx/experimental/memory/memory.resource.aliases/header_list_libcpp_version.pass.cpp @@ -16,6 +16,8 @@ #error header must provide _LIBCPP_VERSION #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/experimental/memory/memory.resource.aliases/header_map_libcpp_version.pass.cpp b/libcxx/test/libcxx/experimental/memory/memory.resource.aliases/header_map_libcpp_version.pass.cpp index f0caac4275f45..94b636f66756d 100644 --- a/libcxx/test/libcxx/experimental/memory/memory.resource.aliases/header_map_libcpp_version.pass.cpp +++ b/libcxx/test/libcxx/experimental/memory/memory.resource.aliases/header_map_libcpp_version.pass.cpp @@ -16,6 +16,8 @@ #error header must provide _LIBCPP_VERSION #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/experimental/memory/memory.resource.aliases/header_regex_libcpp_version.pass.cpp b/libcxx/test/libcxx/experimental/memory/memory.resource.aliases/header_regex_libcpp_version.pass.cpp index 0af172b61e186..a34c52301b68e 100644 --- a/libcxx/test/libcxx/experimental/memory/memory.resource.aliases/header_regex_libcpp_version.pass.cpp +++ b/libcxx/test/libcxx/experimental/memory/memory.resource.aliases/header_regex_libcpp_version.pass.cpp @@ -16,6 +16,8 @@ #error header must provide _LIBCPP_VERSION #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/experimental/memory/memory.resource.aliases/header_set_libcpp_version.pass.cpp b/libcxx/test/libcxx/experimental/memory/memory.resource.aliases/header_set_libcpp_version.pass.cpp index ca5a9faff0f3f..70e34c9b0ca39 100644 --- a/libcxx/test/libcxx/experimental/memory/memory.resource.aliases/header_set_libcpp_version.pass.cpp +++ b/libcxx/test/libcxx/experimental/memory/memory.resource.aliases/header_set_libcpp_version.pass.cpp @@ -16,6 +16,8 @@ #error header must provide _LIBCPP_VERSION #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/experimental/memory/memory.resource.aliases/header_string_libcpp_version.pass.cpp b/libcxx/test/libcxx/experimental/memory/memory.resource.aliases/header_string_libcpp_version.pass.cpp index 99faace64cf9d..7969b4f25b8f4 100644 --- a/libcxx/test/libcxx/experimental/memory/memory.resource.aliases/header_string_libcpp_version.pass.cpp +++ b/libcxx/test/libcxx/experimental/memory/memory.resource.aliases/header_string_libcpp_version.pass.cpp @@ -16,6 +16,8 @@ #error header must provide _LIBCPP_VERSION #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/experimental/memory/memory.resource.aliases/header_unordered_map_libcpp_version.pass.cpp b/libcxx/test/libcxx/experimental/memory/memory.resource.aliases/header_unordered_map_libcpp_version.pass.cpp index ad49a733876ec..71cfb2c1ea802 100644 --- a/libcxx/test/libcxx/experimental/memory/memory.resource.aliases/header_unordered_map_libcpp_version.pass.cpp +++ b/libcxx/test/libcxx/experimental/memory/memory.resource.aliases/header_unordered_map_libcpp_version.pass.cpp @@ -16,6 +16,8 @@ #error header must provide _LIBCPP_VERSION #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/experimental/memory/memory.resource.aliases/header_unordered_set_libcpp_version.pass.cpp b/libcxx/test/libcxx/experimental/memory/memory.resource.aliases/header_unordered_set_libcpp_version.pass.cpp index 619bdb446defa..55a992c7135b6 100644 --- a/libcxx/test/libcxx/experimental/memory/memory.resource.aliases/header_unordered_set_libcpp_version.pass.cpp +++ b/libcxx/test/libcxx/experimental/memory/memory.resource.aliases/header_unordered_set_libcpp_version.pass.cpp @@ -16,6 +16,8 @@ #error header must provide _LIBCPP_VERSION #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/experimental/memory/memory.resource.aliases/header_vector_libcpp_version.pass.cpp b/libcxx/test/libcxx/experimental/memory/memory.resource.aliases/header_vector_libcpp_version.pass.cpp index eb831d6d7ae62..89a8fb0aab9f6 100644 --- a/libcxx/test/libcxx/experimental/memory/memory.resource.aliases/header_vector_libcpp_version.pass.cpp +++ b/libcxx/test/libcxx/experimental/memory/memory.resource.aliases/header_vector_libcpp_version.pass.cpp @@ -16,6 +16,8 @@ #error header must provide _LIBCPP_VERSION #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/experimental/memory/memory.resource.global/global_memory_resource_lifetime.pass.cpp b/libcxx/test/libcxx/experimental/memory/memory.resource.global/global_memory_resource_lifetime.pass.cpp index a3c0ba1ea1b1a..0405992a93a45 100644 --- a/libcxx/test/libcxx/experimental/memory/memory.resource.global/global_memory_resource_lifetime.pass.cpp +++ b/libcxx/test/libcxx/experimental/memory/memory.resource.global/global_memory_resource_lifetime.pass.cpp @@ -6,7 +6,6 @@ // //===----------------------------------------------------------------------===// -// REQUIRES: c++experimental // UNSUPPORTED: c++98, c++03 // @@ -53,8 +52,10 @@ ex::memory_resource* resource = ex::get_default_resource(); POSType constructed_after_resources(resource, resource->allocate(1024), 1024); POSType constructed_after_resources2(nullptr, resource->allocate(1024), 1024); -int main() +int main(int, char**) { swap(constructed_after_resources, constructed_before_resources); swap(constructed_before_resources2, constructed_after_resources2); + + return 0; } diff --git a/libcxx/test/libcxx/experimental/memory/memory.resource.global/new_delete_resource_lifetime.pass.cpp b/libcxx/test/libcxx/experimental/memory/memory.resource.global/new_delete_resource_lifetime.pass.cpp index c6b4011cec03b..16fe293831add 100644 --- a/libcxx/test/libcxx/experimental/memory/memory.resource.global/new_delete_resource_lifetime.pass.cpp +++ b/libcxx/test/libcxx/experimental/memory/memory.resource.global/new_delete_resource_lifetime.pass.cpp @@ -6,7 +6,6 @@ // //===----------------------------------------------------------------------===// -// REQUIRES: c++experimental // UNSUPPORTED: c++98, c++03 // @@ -46,7 +45,9 @@ ex::memory_resource* resource = ex::new_delete_resource(); POSType constructed_after_resources(resource, resource->allocate(1024), 1024); -int main() +int main(int, char**) { swap(constructed_after_resources, constructed_before_resources); + + return 0; } diff --git a/libcxx/test/libcxx/experimental/memory/memory.resource.synop/version.pass.cpp b/libcxx/test/libcxx/experimental/memory/memory.resource.synop/version.pass.cpp index a19049c33f115..e8d6285818202 100644 --- a/libcxx/test/libcxx/experimental/memory/memory.resource.synop/version.pass.cpp +++ b/libcxx/test/libcxx/experimental/memory/memory.resource.synop/version.pass.cpp @@ -16,6 +16,8 @@ #error _LIBCPP_VERSION not defined #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/experimental/numerics/numeric.ops/use_header_warning.fail.cpp b/libcxx/test/libcxx/experimental/numerics/numeric.ops/use_header_warning.fail.cpp index 6560101553f5d..d675acc268f93 100644 --- a/libcxx/test/libcxx/experimental/numerics/numeric.ops/use_header_warning.fail.cpp +++ b/libcxx/test/libcxx/experimental/numerics/numeric.ops/use_header_warning.fail.cpp @@ -14,4 +14,6 @@ // expected-error@experimental/numeric:* {{" has been removed. Use instead."}} -int main() {} +int main(int, char**) { + return 0; +} diff --git a/libcxx/test/libcxx/experimental/numerics/numeric.ops/version.pass.cpp b/libcxx/test/libcxx/experimental/numerics/numeric.ops/version.pass.cpp index 7295852d3324b..f8b642d07b9a2 100644 --- a/libcxx/test/libcxx/experimental/numerics/numeric.ops/version.pass.cpp +++ b/libcxx/test/libcxx/experimental/numerics/numeric.ops/version.pass.cpp @@ -17,4 +17,6 @@ #error _LIBCPP_VERSION not defined #endif -int main() {} +int main(int, char**) { + return 0; +} diff --git a/libcxx/test/libcxx/experimental/strings/string.view/use_header_warning.fail.cpp b/libcxx/test/libcxx/experimental/strings/string.view/use_header_warning.fail.cpp index 10a2ebc122508..139bc2d1f7820 100644 --- a/libcxx/test/libcxx/experimental/strings/string.view/use_header_warning.fail.cpp +++ b/libcxx/test/libcxx/experimental/strings/string.view/use_header_warning.fail.cpp @@ -14,4 +14,6 @@ // expected-error@experimental/string_view:* {{" has been removed. Use instead."}} -int main() {} +int main(int, char**) { + return 0; +} diff --git a/libcxx/test/libcxx/experimental/strings/string.view/version.pass.cpp b/libcxx/test/libcxx/experimental/strings/string.view/version.pass.cpp index c697d67b104f0..7300a5501ebbf 100644 --- a/libcxx/test/libcxx/experimental/strings/string.view/version.pass.cpp +++ b/libcxx/test/libcxx/experimental/strings/string.view/version.pass.cpp @@ -17,4 +17,6 @@ #error _LIBCPP_VERSION not defined #endif -int main() {} +int main(int, char**) { + return 0; +} diff --git a/libcxx/test/libcxx/experimental/utilities/any/use_header_warning.fail.cpp b/libcxx/test/libcxx/experimental/utilities/any/use_header_warning.fail.cpp index 69a67ffafd3ed..1b8918e8090a4 100644 --- a/libcxx/test/libcxx/experimental/utilities/any/use_header_warning.fail.cpp +++ b/libcxx/test/libcxx/experimental/utilities/any/use_header_warning.fail.cpp @@ -14,4 +14,6 @@ // expected-error@experimental/any:* {{" has been removed. Use instead."}} -int main() {} +int main(int, char**) { + return 0; +} diff --git a/libcxx/test/libcxx/experimental/utilities/any/version.pass.cpp b/libcxx/test/libcxx/experimental/utilities/any/version.pass.cpp index ed8d6f7e8662d..ecfdecfea9333 100644 --- a/libcxx/test/libcxx/experimental/utilities/any/version.pass.cpp +++ b/libcxx/test/libcxx/experimental/utilities/any/version.pass.cpp @@ -17,4 +17,6 @@ #error _LIBCPP_VERSION not defined #endif -int main() {} +int main(int, char**) { + return 0; +} diff --git a/libcxx/test/libcxx/experimental/utilities/meta/version.pass.cpp b/libcxx/test/libcxx/experimental/utilities/meta/version.pass.cpp index 9dd3ca83a09bb..3568c6fe53d3f 100644 --- a/libcxx/test/libcxx/experimental/utilities/meta/version.pass.cpp +++ b/libcxx/test/libcxx/experimental/utilities/meta/version.pass.cpp @@ -14,6 +14,8 @@ #error _LIBCPP_VERSION not defined #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/experimental/utilities/optional/use_header_warning.fail.cpp b/libcxx/test/libcxx/experimental/utilities/optional/use_header_warning.fail.cpp index 8b23ac69ab6d5..d2bb9e6e96755 100644 --- a/libcxx/test/libcxx/experimental/utilities/optional/use_header_warning.fail.cpp +++ b/libcxx/test/libcxx/experimental/utilities/optional/use_header_warning.fail.cpp @@ -14,4 +14,6 @@ // expected-error@experimental/optional:* {{" has been removed. Use instead."}} -int main() {} +int main(int, char**) { + return 0; +} diff --git a/libcxx/test/libcxx/experimental/utilities/optional/version.pass.cpp b/libcxx/test/libcxx/experimental/utilities/optional/version.pass.cpp index ead45ebf54f10..0e84f241a6575 100644 --- a/libcxx/test/libcxx/experimental/utilities/optional/version.pass.cpp +++ b/libcxx/test/libcxx/experimental/utilities/optional/version.pass.cpp @@ -17,4 +17,6 @@ #error _LIBCPP_VERSION not defined #endif -int main() {} +int main(int, char**) { + return 0; +} diff --git a/libcxx/test/libcxx/experimental/utilities/ratio/use_header_warning.fail.cpp b/libcxx/test/libcxx/experimental/utilities/ratio/use_header_warning.fail.cpp index 682872fce4af6..a6578ef48b804 100644 --- a/libcxx/test/libcxx/experimental/utilities/ratio/use_header_warning.fail.cpp +++ b/libcxx/test/libcxx/experimental/utilities/ratio/use_header_warning.fail.cpp @@ -14,4 +14,6 @@ // expected-error@experimental/ratio:* {{" has been removed. Use instead."}} -int main() {} +int main(int, char**) { + return 0; +} diff --git a/libcxx/test/libcxx/experimental/utilities/ratio/version.pass.cpp b/libcxx/test/libcxx/experimental/utilities/ratio/version.pass.cpp index 990b91c7159bd..0357c79efeea1 100644 --- a/libcxx/test/libcxx/experimental/utilities/ratio/version.pass.cpp +++ b/libcxx/test/libcxx/experimental/utilities/ratio/version.pass.cpp @@ -17,4 +17,6 @@ #error _LIBCPP_VERSION not defined #endif -int main() {} +int main(int, char**) { + return 0; +} diff --git a/libcxx/test/libcxx/experimental/utilities/time/use_header_warning.fail.cpp b/libcxx/test/libcxx/experimental/utilities/time/use_header_warning.fail.cpp index fc2dc3ad7a93d..093d6fca41813 100644 --- a/libcxx/test/libcxx/experimental/utilities/time/use_header_warning.fail.cpp +++ b/libcxx/test/libcxx/experimental/utilities/time/use_header_warning.fail.cpp @@ -14,4 +14,6 @@ // expected-error@experimental/chrono:* {{" has been removed. Use instead."}} -int main() {} +int main(int, char**) { + return 0; +} diff --git a/libcxx/test/libcxx/experimental/utilities/time/version.pass.cpp b/libcxx/test/libcxx/experimental/utilities/time/version.pass.cpp index f14728679d319..5ff26f7b2dcdb 100644 --- a/libcxx/test/libcxx/experimental/utilities/time/version.pass.cpp +++ b/libcxx/test/libcxx/experimental/utilities/time/version.pass.cpp @@ -17,4 +17,6 @@ #error _LIBCPP_VERSION not defined #endif -int main() {} +int main(int, char**) { + return 0; +} diff --git a/libcxx/test/libcxx/experimental/utilities/tuple/use_header_warning.fail.cpp b/libcxx/test/libcxx/experimental/utilities/tuple/use_header_warning.fail.cpp index 0bc33eca70070..6b378c2ce9246 100644 --- a/libcxx/test/libcxx/experimental/utilities/tuple/use_header_warning.fail.cpp +++ b/libcxx/test/libcxx/experimental/utilities/tuple/use_header_warning.fail.cpp @@ -14,4 +14,6 @@ // expected-error@experimental/tuple:* {{" has been removed. Use instead."}} -int main() {} +int main(int, char**) { + return 0; +} diff --git a/libcxx/test/libcxx/experimental/utilities/tuple/version.pass.cpp b/libcxx/test/libcxx/experimental/utilities/tuple/version.pass.cpp index 8e4bae634ee68..4c1e305a45644 100644 --- a/libcxx/test/libcxx/experimental/utilities/tuple/version.pass.cpp +++ b/libcxx/test/libcxx/experimental/utilities/tuple/version.pass.cpp @@ -17,4 +17,6 @@ #error _LIBCPP_VERSION not defined #endif -int main() {} +int main(int, char**) { + return 0; +} diff --git a/libcxx/test/libcxx/experimental/utilities/utility/version.pass.cpp b/libcxx/test/libcxx/experimental/utilities/utility/version.pass.cpp index 024c5616089c7..5ba32b1ca207d 100644 --- a/libcxx/test/libcxx/experimental/utilities/utility/version.pass.cpp +++ b/libcxx/test/libcxx/experimental/utilities/utility/version.pass.cpp @@ -14,6 +14,8 @@ #error _LIBCPP_VERSION not defined #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/extensions/hash/specializations.fail.cpp b/libcxx/test/libcxx/extensions/hash/specializations.fail.cpp index 19a726bdc1dfb..f81ec5dacb91e 100644 --- a/libcxx/test/libcxx/extensions/hash/specializations.fail.cpp +++ b/libcxx/test/libcxx/extensions/hash/specializations.fail.cpp @@ -10,7 +10,9 @@ #include #include -int main() +int main(int, char**) { assert(__gnu_cxx::hash()(std::string()) == 0); // error + + return 0; } diff --git a/libcxx/test/libcxx/extensions/hash/specializations.pass.cpp b/libcxx/test/libcxx/extensions/hash/specializations.pass.cpp index a3f969ba1a551..9397bbc402937 100644 --- a/libcxx/test/libcxx/extensions/hash/specializations.pass.cpp +++ b/libcxx/test/libcxx/extensions/hash/specializations.pass.cpp @@ -12,7 +12,7 @@ #include #include -int main() +int main(int, char**) { char str[] = "test"; assert(__gnu_cxx::hash()("test") == @@ -27,4 +27,6 @@ int main() assert(__gnu_cxx::hash()(42) == 42); assert(__gnu_cxx::hash()(42) == 42); assert(__gnu_cxx::hash()(42) == 42); + + return 0; } diff --git a/libcxx/test/libcxx/extensions/hash_map/const_iterator.fail.cpp b/libcxx/test/libcxx/extensions/hash_map/const_iterator.fail.cpp index b6389db49dafd..db09e40801a1f 100644 --- a/libcxx/test/libcxx/extensions/hash_map/const_iterator.fail.cpp +++ b/libcxx/test/libcxx/extensions/hash_map/const_iterator.fail.cpp @@ -8,10 +8,12 @@ #include -int main() +int main(int, char**) { __gnu_cxx::hash_map m; m[1] = 1; const __gnu_cxx::hash_map &cm = m; cm.find(1)->second = 2; // error + + return 0; } diff --git a/libcxx/test/libcxx/extensions/nothing_to_do.pass.cpp b/libcxx/test/libcxx/extensions/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/libcxx/extensions/nothing_to_do.pass.cpp +++ b/libcxx/test/libcxx/extensions/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/fuzzing/nth_element.cpp b/libcxx/test/libcxx/fuzzing/nth_element.cpp index a7f9e9c224df4..482aeb65ffe89 100644 --- a/libcxx/test/libcxx/fuzzing/nth_element.cpp +++ b/libcxx/test/libcxx/fuzzing/nth_element.cpp @@ -25,7 +25,7 @@ const char * test_cases[] = { const size_t k_num_tests = sizeof(test_cases)/sizeof(test_cases[0]); -int main () +int main(int, char**) { for (size_t i = 0; i < k_num_tests; ++i) { diff --git a/libcxx/test/libcxx/fuzzing/partial_sort.cpp b/libcxx/test/libcxx/fuzzing/partial_sort.cpp index 2d4d01a0926fa..4f35766633024 100644 --- a/libcxx/test/libcxx/fuzzing/partial_sort.cpp +++ b/libcxx/test/libcxx/fuzzing/partial_sort.cpp @@ -25,7 +25,7 @@ const char * test_cases[] = { const size_t k_num_tests = sizeof(test_cases)/sizeof(test_cases[0]); -int main () +int main(int, char**) { for (size_t i = 0; i < k_num_tests; ++i) { diff --git a/libcxx/test/libcxx/fuzzing/partial_sort_copy.cpp b/libcxx/test/libcxx/fuzzing/partial_sort_copy.cpp index 2a7ccbef455b1..b569f55ebd845 100644 --- a/libcxx/test/libcxx/fuzzing/partial_sort_copy.cpp +++ b/libcxx/test/libcxx/fuzzing/partial_sort_copy.cpp @@ -25,7 +25,7 @@ const char * test_cases[] = { const size_t k_num_tests = sizeof(test_cases)/sizeof(test_cases[0]); -int main () +int main(int, char**) { for (size_t i = 0; i < k_num_tests; ++i) { diff --git a/libcxx/test/libcxx/fuzzing/partition.cpp b/libcxx/test/libcxx/fuzzing/partition.cpp index c03f17f98000b..0833e38e21115 100644 --- a/libcxx/test/libcxx/fuzzing/partition.cpp +++ b/libcxx/test/libcxx/fuzzing/partition.cpp @@ -25,7 +25,7 @@ const char * test_cases[] = { const size_t k_num_tests = sizeof(test_cases)/sizeof(test_cases[0]); -int main () +int main(int, char**) { for (size_t i = 0; i < k_num_tests; ++i) { diff --git a/libcxx/test/libcxx/fuzzing/partition_copy.cpp b/libcxx/test/libcxx/fuzzing/partition_copy.cpp index f7148bbd0ce5d..f336a14cab6da 100644 --- a/libcxx/test/libcxx/fuzzing/partition_copy.cpp +++ b/libcxx/test/libcxx/fuzzing/partition_copy.cpp @@ -25,7 +25,7 @@ const char * test_cases[] = { const size_t k_num_tests = sizeof(test_cases)/sizeof(test_cases[0]); -int main () +int main(int, char**) { for (size_t i = 0; i < k_num_tests; ++i) { diff --git a/libcxx/test/libcxx/fuzzing/regex_ECMAScript.cpp b/libcxx/test/libcxx/fuzzing/regex_ECMAScript.cpp index 51ca6efa77c6b..ca9a7dae52103 100644 --- a/libcxx/test/libcxx/fuzzing/regex_ECMAScript.cpp +++ b/libcxx/test/libcxx/fuzzing/regex_ECMAScript.cpp @@ -24,7 +24,7 @@ const char * test_cases[] = { const size_t k_num_tests = sizeof(test_cases)/sizeof(test_cases[0]); -int main () +int main(int, char**) { for (size_t i = 0; i < k_num_tests; ++i) { diff --git a/libcxx/test/libcxx/fuzzing/regex_POSIX.cpp b/libcxx/test/libcxx/fuzzing/regex_POSIX.cpp index 3fcd1bcda8f3d..69f40de6d1909 100644 --- a/libcxx/test/libcxx/fuzzing/regex_POSIX.cpp +++ b/libcxx/test/libcxx/fuzzing/regex_POSIX.cpp @@ -24,7 +24,7 @@ const char * test_cases[] = { const size_t k_num_tests = sizeof(test_cases)/sizeof(test_cases[0]); -int main () +int main(int, char**) { for (size_t i = 0; i < k_num_tests; ++i) { diff --git a/libcxx/test/libcxx/fuzzing/regex_awk.cpp b/libcxx/test/libcxx/fuzzing/regex_awk.cpp index 51ca6efa77c6b..ca9a7dae52103 100644 --- a/libcxx/test/libcxx/fuzzing/regex_awk.cpp +++ b/libcxx/test/libcxx/fuzzing/regex_awk.cpp @@ -24,7 +24,7 @@ const char * test_cases[] = { const size_t k_num_tests = sizeof(test_cases)/sizeof(test_cases[0]); -int main () +int main(int, char**) { for (size_t i = 0; i < k_num_tests; ++i) { diff --git a/libcxx/test/libcxx/fuzzing/regex_egrep.cpp b/libcxx/test/libcxx/fuzzing/regex_egrep.cpp index e44c9e16321e1..f350f63e334c5 100644 --- a/libcxx/test/libcxx/fuzzing/regex_egrep.cpp +++ b/libcxx/test/libcxx/fuzzing/regex_egrep.cpp @@ -24,7 +24,7 @@ const char * test_cases[] = { const size_t k_num_tests = sizeof(test_cases)/sizeof(test_cases[0]); -int main () +int main(int, char**) { for (size_t i = 0; i < k_num_tests; ++i) { diff --git a/libcxx/test/libcxx/fuzzing/regex_extended.cpp b/libcxx/test/libcxx/fuzzing/regex_extended.cpp index dcb7077eba75f..ae55f5bb83723 100644 --- a/libcxx/test/libcxx/fuzzing/regex_extended.cpp +++ b/libcxx/test/libcxx/fuzzing/regex_extended.cpp @@ -24,7 +24,7 @@ const char * test_cases[] = { const size_t k_num_tests = sizeof(test_cases)/sizeof(test_cases[0]); -int main () +int main(int, char**) { for (size_t i = 0; i < k_num_tests; ++i) { diff --git a/libcxx/test/libcxx/fuzzing/regex_grep.cpp b/libcxx/test/libcxx/fuzzing/regex_grep.cpp index 50ef9b9410d41..ac497b3a9fcf1 100644 --- a/libcxx/test/libcxx/fuzzing/regex_grep.cpp +++ b/libcxx/test/libcxx/fuzzing/regex_grep.cpp @@ -24,7 +24,7 @@ const char * test_cases[] = { const size_t k_num_tests = sizeof(test_cases)/sizeof(test_cases[0]); -int main () +int main(int, char**) { for (size_t i = 0; i < k_num_tests; ++i) { diff --git a/libcxx/test/libcxx/fuzzing/sort.cpp b/libcxx/test/libcxx/fuzzing/sort.cpp index 924c4cf88fb94..43b9064de0331 100644 --- a/libcxx/test/libcxx/fuzzing/sort.cpp +++ b/libcxx/test/libcxx/fuzzing/sort.cpp @@ -25,7 +25,7 @@ const char * test_cases[] = { const size_t k_num_tests = sizeof(test_cases)/sizeof(test_cases[0]); -int main () +int main(int, char**) { for (size_t i = 0; i < k_num_tests; ++i) { diff --git a/libcxx/test/libcxx/fuzzing/stable_partition.cpp b/libcxx/test/libcxx/fuzzing/stable_partition.cpp index af11cb362423b..b236190cbf275 100644 --- a/libcxx/test/libcxx/fuzzing/stable_partition.cpp +++ b/libcxx/test/libcxx/fuzzing/stable_partition.cpp @@ -25,7 +25,7 @@ const char * test_cases[] = { const size_t k_num_tests = sizeof(test_cases)/sizeof(test_cases[0]); -int main () +int main(int, char**) { for (size_t i = 0; i < k_num_tests; ++i) { diff --git a/libcxx/test/libcxx/fuzzing/stable_sort.cpp b/libcxx/test/libcxx/fuzzing/stable_sort.cpp index c32be24864f3e..1c8ac4904256c 100644 --- a/libcxx/test/libcxx/fuzzing/stable_sort.cpp +++ b/libcxx/test/libcxx/fuzzing/stable_sort.cpp @@ -25,7 +25,7 @@ const char * test_cases[] = { const size_t k_num_tests = sizeof(test_cases)/sizeof(test_cases[0]); -int main () +int main(int, char**) { for (size_t i = 0; i < k_num_tests; ++i) { diff --git a/libcxx/test/libcxx/fuzzing/unique.cpp b/libcxx/test/libcxx/fuzzing/unique.cpp index 57317373f9b7f..cab512eb89e87 100644 --- a/libcxx/test/libcxx/fuzzing/unique.cpp +++ b/libcxx/test/libcxx/fuzzing/unique.cpp @@ -25,7 +25,7 @@ const char * test_cases[] = { const size_t k_num_tests = sizeof(test_cases)/sizeof(test_cases[0]); -int main () +int main(int, char**) { for (size_t i = 0; i < k_num_tests; ++i) { diff --git a/libcxx/test/libcxx/fuzzing/unique_copy.cpp b/libcxx/test/libcxx/fuzzing/unique_copy.cpp index c513e60bdc518..311eb4cf64e30 100644 --- a/libcxx/test/libcxx/fuzzing/unique_copy.cpp +++ b/libcxx/test/libcxx/fuzzing/unique_copy.cpp @@ -25,7 +25,7 @@ const char * test_cases[] = { const size_t k_num_tests = sizeof(test_cases)/sizeof(test_cases[0]); -int main () +int main(int, char**) { for (size_t i = 0; i < k_num_tests; ++i) { diff --git a/libcxx/test/libcxx/include_as_c.sh.cpp b/libcxx/test/libcxx/include_as_c.sh.cpp index f0dd9bef17479..67d5e14b3ec18 100644 --- a/libcxx/test/libcxx/include_as_c.sh.cpp +++ b/libcxx/test/libcxx/include_as_c.sh.cpp @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include @@ -33,4 +34,8 @@ #include #include -int main() {} +int main(int argc, char **argv) { + (void)argc; + (void)argv; + return 0; +} diff --git a/libcxx/test/libcxx/input.output/file.streams/c.files/no.global.filesystem.namespace/fopen.fail.cpp b/libcxx/test/libcxx/input.output/file.streams/c.files/no.global.filesystem.namespace/fopen.fail.cpp index 04625da8822d7..1c2c329c27819 100644 --- a/libcxx/test/libcxx/input.output/file.streams/c.files/no.global.filesystem.namespace/fopen.fail.cpp +++ b/libcxx/test/libcxx/input.output/file.streams/c.files/no.global.filesystem.namespace/fopen.fail.cpp @@ -10,7 +10,9 @@ #include -int main() { +int main(int, char**) { // fopen is not available on systems without a global filesystem namespace. std::fopen("", ""); + + return 0; } diff --git a/libcxx/test/libcxx/input.output/file.streams/c.files/no.global.filesystem.namespace/rename.fail.cpp b/libcxx/test/libcxx/input.output/file.streams/c.files/no.global.filesystem.namespace/rename.fail.cpp index 02c9f1fb81aae..61ef15d17155f 100644 --- a/libcxx/test/libcxx/input.output/file.streams/c.files/no.global.filesystem.namespace/rename.fail.cpp +++ b/libcxx/test/libcxx/input.output/file.streams/c.files/no.global.filesystem.namespace/rename.fail.cpp @@ -10,7 +10,9 @@ #include -int main() { +int main(int, char**) { // rename is not available on systems without a global filesystem namespace. std::rename("", ""); + + return 0; } diff --git a/libcxx/test/libcxx/input.output/file.streams/c.files/version_ccstdio.pass.cpp b/libcxx/test/libcxx/input.output/file.streams/c.files/version_ccstdio.pass.cpp index 0325a45e3ccad..d8ff6a7ac0a48 100644 --- a/libcxx/test/libcxx/input.output/file.streams/c.files/version_ccstdio.pass.cpp +++ b/libcxx/test/libcxx/input.output/file.streams/c.files/version_ccstdio.pass.cpp @@ -14,6 +14,8 @@ #error _LIBCPP_VERSION not defined #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/input.output/file.streams/c.files/version_cinttypes.pass.cpp b/libcxx/test/libcxx/input.output/file.streams/c.files/version_cinttypes.pass.cpp index 3104bc9aab30b..23cecf9cbef15 100644 --- a/libcxx/test/libcxx/input.output/file.streams/c.files/version_cinttypes.pass.cpp +++ b/libcxx/test/libcxx/input.output/file.streams/c.files/version_cinttypes.pass.cpp @@ -14,6 +14,8 @@ #error _LIBCPP_VERSION not defined #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/input.output/file.streams/fstreams/filebuf/traits_mismatch.fail.cpp b/libcxx/test/libcxx/input.output/file.streams/fstreams/filebuf/traits_mismatch.fail.cpp index d7e80827a54a2..91b678d1d2d69 100644 --- a/libcxx/test/libcxx/input.output/file.streams/fstreams/filebuf/traits_mismatch.fail.cpp +++ b/libcxx/test/libcxx/input.output/file.streams/fstreams/filebuf/traits_mismatch.fail.cpp @@ -15,9 +15,11 @@ #include -int main() +int main(int, char**) { std::basic_filebuf > f; // expected-error-re@streambuf:* {{static_assert failed{{.*}} "traits_type::char_type must be the same type as CharT"}} + + return 0; } diff --git a/libcxx/test/libcxx/input.output/file.streams/fstreams/fstream.close.pass.cpp b/libcxx/test/libcxx/input.output/file.streams/fstreams/fstream.close.pass.cpp index ff93466da6f97..6af8769815652 100644 --- a/libcxx/test/libcxx/input.output/file.streams/fstreams/fstream.close.pass.cpp +++ b/libcxx/test/libcxx/input.output/file.streams/fstreams/fstream.close.pass.cpp @@ -18,7 +18,7 @@ #include #include "platform_support.h" -int main() +int main(int, char**) { std::string temp = get_temp_file_name(); @@ -31,4 +31,6 @@ int main() assert(!ofs.good()); std::remove(temp.c_str()); + + return 0; } diff --git a/libcxx/test/libcxx/input.output/file.streams/fstreams/fstream.cons/wchar_pointer.pass.cpp b/libcxx/test/libcxx/input.output/file.streams/fstreams/fstream.cons/wchar_pointer.pass.cpp index 70621cf79da8f..19442da51ac65 100644 --- a/libcxx/test/libcxx/input.output/file.streams/fstreams/fstream.cons/wchar_pointer.pass.cpp +++ b/libcxx/test/libcxx/input.output/file.streams/fstreams/fstream.cons/wchar_pointer.pass.cpp @@ -17,7 +17,7 @@ #include #include "platform_support.h" -int main() +int main(int, char**) { #ifdef _LIBCPP_HAS_OPEN_WITH_WCHAR std::wstring temp = get_wide_temp_file_name(); @@ -42,4 +42,6 @@ int main() } _wremove(temp.c_str()); #endif + + return 0; } diff --git a/libcxx/test/libcxx/input.output/file.streams/fstreams/fstream.members/open_wchar_pointer.pass.cpp b/libcxx/test/libcxx/input.output/file.streams/fstreams/fstream.members/open_wchar_pointer.pass.cpp index e7b787592564d..0dead68c97dac 100644 --- a/libcxx/test/libcxx/input.output/file.streams/fstreams/fstream.members/open_wchar_pointer.pass.cpp +++ b/libcxx/test/libcxx/input.output/file.streams/fstreams/fstream.members/open_wchar_pointer.pass.cpp @@ -17,7 +17,7 @@ #include #include "platform_support.h" -int main() +int main(int, char**) { #ifdef _LIBCPP_HAS_OPEN_WITH_WCHAR std::wstring temp = get_wide_temp_file_name(); @@ -48,4 +48,6 @@ int main() } _wremove(temp.c_str()); #endif + + return 0; } diff --git a/libcxx/test/libcxx/input.output/file.streams/fstreams/ifstream.cons/wchar_pointer.pass.cpp b/libcxx/test/libcxx/input.output/file.streams/fstreams/ifstream.cons/wchar_pointer.pass.cpp index 793b0f6b8403d..178c7d69a43ec 100644 --- a/libcxx/test/libcxx/input.output/file.streams/fstreams/ifstream.cons/wchar_pointer.pass.cpp +++ b/libcxx/test/libcxx/input.output/file.streams/fstreams/ifstream.cons/wchar_pointer.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { #ifdef _LIBCPP_HAS_OPEN_WITH_WCHAR { @@ -38,4 +38,6 @@ int main() // test/libcxx/input.output/file.streams/fstreams/ofstream.cons/wchar_pointer.pass.cpp // which creates writable files. #endif + + return 0; } diff --git a/libcxx/test/libcxx/input.output/file.streams/fstreams/ifstream.members/open_wchar_pointer.pass.cpp b/libcxx/test/libcxx/input.output/file.streams/fstreams/ifstream.members/open_wchar_pointer.pass.cpp index effbe1e9b1e29..2e8b3620ed1ae 100644 --- a/libcxx/test/libcxx/input.output/file.streams/fstreams/ifstream.members/open_wchar_pointer.pass.cpp +++ b/libcxx/test/libcxx/input.output/file.streams/fstreams/ifstream.members/open_wchar_pointer.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { #ifdef _LIBCPP_HAS_OPEN_WITH_WCHAR { @@ -44,4 +44,6 @@ int main() assert(c == L'r'); } #endif + + return 0; } diff --git a/libcxx/test/libcxx/input.output/file.streams/fstreams/ofstream.cons/wchar_pointer.pass.cpp b/libcxx/test/libcxx/input.output/file.streams/fstreams/ofstream.cons/wchar_pointer.pass.cpp index 453caa3848735..7d6304cc9c945 100644 --- a/libcxx/test/libcxx/input.output/file.streams/fstreams/ofstream.cons/wchar_pointer.pass.cpp +++ b/libcxx/test/libcxx/input.output/file.streams/fstreams/ofstream.cons/wchar_pointer.pass.cpp @@ -17,7 +17,7 @@ #include #include "platform_support.h" -int main() +int main(int, char**) { #ifdef _LIBCPP_HAS_OPEN_WITH_WCHAR std::wstring temp = get_wide_temp_file_name(); @@ -56,4 +56,6 @@ int main() } _wremove(temp.c_str()); #endif + + return 0; } diff --git a/libcxx/test/libcxx/input.output/file.streams/fstreams/ofstream.members/open_wchar_pointer.pass.cpp b/libcxx/test/libcxx/input.output/file.streams/fstreams/ofstream.members/open_wchar_pointer.pass.cpp index 4a847fab3d8af..58f08b86533ef 100644 --- a/libcxx/test/libcxx/input.output/file.streams/fstreams/ofstream.members/open_wchar_pointer.pass.cpp +++ b/libcxx/test/libcxx/input.output/file.streams/fstreams/ofstream.members/open_wchar_pointer.pass.cpp @@ -17,7 +17,7 @@ #include #include "platform_support.h" -int main() +int main(int, char**) { #ifdef _LIBCPP_HAS_OPEN_WITH_WCHAR std::wstring temp = get_wide_temp_file_name(); @@ -56,4 +56,6 @@ int main() } _wremove(temp.c_str()); #endif + + return 0; } diff --git a/libcxx/test/libcxx/input.output/file.streams/fstreams/traits_mismatch.fail.cpp b/libcxx/test/libcxx/input.output/file.streams/fstreams/traits_mismatch.fail.cpp index 19dd2ac711ba5..432cfccac4695 100644 --- a/libcxx/test/libcxx/input.output/file.streams/fstreams/traits_mismatch.fail.cpp +++ b/libcxx/test/libcxx/input.output/file.streams/fstreams/traits_mismatch.fail.cpp @@ -15,7 +15,7 @@ #include -int main() +int main(int, char**) { std::basic_fstream > f; // expected-error-re@ios:* {{static_assert failed{{.*}} "traits_type::char_type must be the same type as CharT"}} @@ -25,5 +25,7 @@ int main() // exception specifications for types which are already invalid for one reason or another. // For now we tolerate this diagnostic. // expected-error@ostream:* 0-1 {{exception specification of overriding function is more lax than base version}} + + return 0; } diff --git a/libcxx/test/libcxx/input.output/file.streams/fstreams/version.pass.cpp b/libcxx/test/libcxx/input.output/file.streams/fstreams/version.pass.cpp index bc578f1b617d8..51532408873f7 100644 --- a/libcxx/test/libcxx/input.output/file.streams/fstreams/version.pass.cpp +++ b/libcxx/test/libcxx/input.output/file.streams/fstreams/version.pass.cpp @@ -14,6 +14,8 @@ #error _LIBCPP_VERSION not defined #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/input.output/filesystems/class.path/path.itr/iterator_db.pass.cpp b/libcxx/test/libcxx/input.output/filesystems/class.path/path.itr/iterator_db.pass.cpp index 0a9fdb54f3818..396e4ff245cb9 100644 --- a/libcxx/test/libcxx/input.output/filesystems/class.path/path.itr/iterator_db.pass.cpp +++ b/libcxx/test/libcxx/input.output/filesystems/class.path/path.itr/iterator_db.pass.cpp @@ -26,7 +26,7 @@ #include "test_macros.h" #include "filesystem_test_helper.hpp" -int main() { +int main(int, char**) { using namespace fs; using ExType = std::__libcpp_debug_exception; // Test incrementing/decrementing a singular iterator @@ -71,4 +71,6 @@ int main() { assert(false); } catch (ExType const&) {} } + + return 0; } diff --git a/libcxx/test/libcxx/input.output/filesystems/class.path/path.itr/reverse_iterator_produces_diagnostic.fail.cpp b/libcxx/test/libcxx/input.output/filesystems/class.path/path.itr/reverse_iterator_produces_diagnostic.fail.cpp index d32b7303ad72d..5eb5cbdb39e1c 100644 --- a/libcxx/test/libcxx/input.output/filesystems/class.path/path.itr/reverse_iterator_produces_diagnostic.fail.cpp +++ b/libcxx/test/libcxx/input.output/filesystems/class.path/path.itr/reverse_iterator_produces_diagnostic.fail.cpp @@ -16,7 +16,7 @@ #include -int main() { +int main(int, char**) { using namespace fs; using RIt = std::reverse_iterator; @@ -25,4 +25,6 @@ int main() { RIt r; ((void)r); } + + return 0; } diff --git a/libcxx/test/libcxx/input.output/filesystems/class.path/path.req/is_pathable.pass.cpp b/libcxx/test/libcxx/input.output/filesystems/class.path/path.req/is_pathable.pass.cpp index 1cfa173da7c70..a80f02e4ca6ab 100644 --- a/libcxx/test/libcxx/input.output/filesystems/class.path/path.req/is_pathable.pass.cpp +++ b/libcxx/test/libcxx/input.output/filesystems/class.path/path.req/is_pathable.pass.cpp @@ -95,9 +95,11 @@ struct MakeTestType { } }; -int main() { +int main(int, char**) { MakeTestType::Test(); MakeTestType::Test(); MakeTestType::Test(); MakeTestType::Test(); + + return 0; } diff --git a/libcxx/test/libcxx/input.output/filesystems/convert_file_time.sh.cpp b/libcxx/test/libcxx/input.output/filesystems/convert_file_time.sh.cpp index ac64dc7ab1797..55cd659cc4d13 100644 --- a/libcxx/test/libcxx/input.output/filesystems/convert_file_time.sh.cpp +++ b/libcxx/test/libcxx/input.output/filesystems/convert_file_time.sh.cpp @@ -277,7 +277,7 @@ struct TestClock { template using TestFileTimeT = time_point > >; -int main() { +int main(int, char**) { { assert((test_case::test())); } { assert((test_case, int64_t, @@ -303,4 +303,6 @@ int main() { TestTimeSpec >::test())); } #endif + + return 0; } diff --git a/libcxx/test/libcxx/input.output/filesystems/version.pass.cpp b/libcxx/test/libcxx/input.output/filesystems/version.pass.cpp index b94e32cbc2fd7..b0f03174425d6 100644 --- a/libcxx/test/libcxx/input.output/filesystems/version.pass.cpp +++ b/libcxx/test/libcxx/input.output/filesystems/version.pass.cpp @@ -14,6 +14,8 @@ #error _LIBCPP_VERSION not defined #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/input.output/iostream.format/input.streams/traits_mismatch.fail.cpp b/libcxx/test/libcxx/input.output/iostream.format/input.streams/traits_mismatch.fail.cpp index 5be4344ab71ac..32088497a71a6 100644 --- a/libcxx/test/libcxx/input.output/iostream.format/input.streams/traits_mismatch.fail.cpp +++ b/libcxx/test/libcxx/input.output/iostream.format/input.streams/traits_mismatch.fail.cpp @@ -21,8 +21,10 @@ struct test_istream : public std::basic_istream > {}; -int main() +int main(int, char**) { // expected-error-re@ios:* {{static_assert failed{{.*}} "traits_type::char_type must be the same type as CharT"}} + + return 0; } diff --git a/libcxx/test/libcxx/input.output/iostream.format/input.streams/version.pass.cpp b/libcxx/test/libcxx/input.output/iostream.format/input.streams/version.pass.cpp index 65c48c11ba51c..77ed7563bdaa6 100644 --- a/libcxx/test/libcxx/input.output/iostream.format/input.streams/version.pass.cpp +++ b/libcxx/test/libcxx/input.output/iostream.format/input.streams/version.pass.cpp @@ -14,6 +14,8 @@ #error _LIBCPP_VERSION not defined #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/input.output/iostream.format/output.streams/traits_mismatch.fail.cpp b/libcxx/test/libcxx/input.output/iostream.format/output.streams/traits_mismatch.fail.cpp index caa020f173c08..8975097456bfb 100644 --- a/libcxx/test/libcxx/input.output/iostream.format/output.streams/traits_mismatch.fail.cpp +++ b/libcxx/test/libcxx/input.output/iostream.format/output.streams/traits_mismatch.fail.cpp @@ -21,8 +21,10 @@ struct test_ostream : public std::basic_ostream > {}; -int main() +int main(int, char**) { // expected-error-re@ios:* {{static_assert failed{{.*}} "traits_type::char_type must be the same type as CharT"}} + + return 0; } diff --git a/libcxx/test/libcxx/input.output/iostream.format/output.streams/version.pass.cpp b/libcxx/test/libcxx/input.output/iostream.format/output.streams/version.pass.cpp index f381fcffdef95..f16e9a079d012 100644 --- a/libcxx/test/libcxx/input.output/iostream.format/output.streams/version.pass.cpp +++ b/libcxx/test/libcxx/input.output/iostream.format/output.streams/version.pass.cpp @@ -14,6 +14,8 @@ #error _LIBCPP_VERSION not defined #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/input.output/iostream.format/std.manip/version.pass.cpp b/libcxx/test/libcxx/input.output/iostream.format/std.manip/version.pass.cpp index 775eec29529ab..498410ed106ff 100644 --- a/libcxx/test/libcxx/input.output/iostream.format/std.manip/version.pass.cpp +++ b/libcxx/test/libcxx/input.output/iostream.format/std.manip/version.pass.cpp @@ -14,6 +14,8 @@ #error _LIBCPP_VERSION not defined #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/input.output/iostream.forward/version.pass.cpp b/libcxx/test/libcxx/input.output/iostream.forward/version.pass.cpp index 509d7efdbddde..70f1ec6626fb1 100644 --- a/libcxx/test/libcxx/input.output/iostream.forward/version.pass.cpp +++ b/libcxx/test/libcxx/input.output/iostream.forward/version.pass.cpp @@ -14,6 +14,8 @@ #error _LIBCPP_VERSION not defined #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/input.output/iostream.objects/version.pass.cpp b/libcxx/test/libcxx/input.output/iostream.objects/version.pass.cpp index f05cdfff7bbc1..7081e5abf1618 100644 --- a/libcxx/test/libcxx/input.output/iostream.objects/version.pass.cpp +++ b/libcxx/test/libcxx/input.output/iostream.objects/version.pass.cpp @@ -14,6 +14,8 @@ #error _LIBCPP_VERSION not defined #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/input.output/iostreams.base/ios/iostate.flags/clear.abort.pass.cpp b/libcxx/test/libcxx/input.output/iostreams.base/ios/iostate.flags/clear.abort.pass.cpp new file mode 100644 index 0000000000000..e6dc1c981002d --- /dev/null +++ b/libcxx/test/libcxx/input.output/iostreams.base/ios/iostate.flags/clear.abort.pass.cpp @@ -0,0 +1,41 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// + +// template class basic_ios + +// void clear(iostate state); + +// Make sure that we abort() when exceptions are disabled and the exception +// flag is set for the iostate we pass to clear(). + +// REQUIRES: libcpp-no-exceptions + +#include +#include +#include +#include + + +void exit_success(int) { + std::_Exit(EXIT_SUCCESS); +} + +struct testbuf : public std::streambuf {}; + +int main(int, char**) { + std::signal(SIGABRT, exit_success); + + testbuf buf; + std::ios ios(&buf); + ios.exceptions(std::ios::badbit); + ios.clear(std::ios::badbit); + + return EXIT_FAILURE; +} diff --git a/libcxx/test/libcxx/input.output/iostreams.base/version.pass.cpp b/libcxx/test/libcxx/input.output/iostreams.base/version.pass.cpp index 8090783e9667c..4b873a92661f4 100644 --- a/libcxx/test/libcxx/input.output/iostreams.base/version.pass.cpp +++ b/libcxx/test/libcxx/input.output/iostreams.base/version.pass.cpp @@ -14,6 +14,8 @@ #error _LIBCPP_VERSION not defined #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/input.output/stream.buffers/version.pass.cpp b/libcxx/test/libcxx/input.output/stream.buffers/version.pass.cpp index 08cd627855a5e..cc55444b55b79 100644 --- a/libcxx/test/libcxx/input.output/stream.buffers/version.pass.cpp +++ b/libcxx/test/libcxx/input.output/stream.buffers/version.pass.cpp @@ -14,6 +14,8 @@ #error _LIBCPP_VERSION not defined #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/input.output/string.streams/traits_mismatch.fail.cpp b/libcxx/test/libcxx/input.output/string.streams/traits_mismatch.fail.cpp index 0eeb740aa28c7..a046b34abf7ed 100644 --- a/libcxx/test/libcxx/input.output/string.streams/traits_mismatch.fail.cpp +++ b/libcxx/test/libcxx/input.output/string.streams/traits_mismatch.fail.cpp @@ -16,10 +16,12 @@ #include -int main() +int main(int, char**) { std::basic_stringbuf > sb; // expected-error-re@streambuf:* {{static_assert failed{{.*}} "traits_type::char_type must be the same type as CharT"}} // expected-error-re@string:* {{static_assert failed{{.*}} "traits_type::char_type must be the same type as CharT"}} + + return 0; } diff --git a/libcxx/test/libcxx/input.output/string.streams/version.pass.cpp b/libcxx/test/libcxx/input.output/string.streams/version.pass.cpp index 6725d8509a0e9..03beac77bca89 100644 --- a/libcxx/test/libcxx/input.output/string.streams/version.pass.cpp +++ b/libcxx/test/libcxx/input.output/string.streams/version.pass.cpp @@ -14,6 +14,8 @@ #error _LIBCPP_VERSION not defined #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/iterators/failed.pass.cpp b/libcxx/test/libcxx/iterators/failed.pass.cpp index b9bcb02500e9e..e44c15ebaa2d3 100644 --- a/libcxx/test/libcxx/iterators/failed.pass.cpp +++ b/libcxx/test/libcxx/iterators/failed.pass.cpp @@ -18,7 +18,7 @@ #include #include -int main() +int main(int, char**) { { std::ostreambuf_iterator i(nullptr); @@ -28,4 +28,6 @@ int main() std::ostreambuf_iterator i(nullptr); assert(i.failed()); } + + return 0; } diff --git a/libcxx/test/libcxx/iterators/trivial_iterators.pass.cpp b/libcxx/test/libcxx/iterators/trivial_iterators.pass.cpp index 0a77befed7e67..0618731ce75a2 100644 --- a/libcxx/test/libcxx/iterators/trivial_iterators.pass.cpp +++ b/libcxx/test/libcxx/iterators/trivial_iterators.pass.cpp @@ -90,7 +90,7 @@ operator!=(const my_input_iterator& x, const my_input_iterator& y) } -int main() +int main(int, char**) { // basic tests static_assert(( std::__libcpp_is_trivial_iterator::value), ""); @@ -184,4 +184,6 @@ int main() static_assert(( std::__libcpp_is_trivial_iterator::const_iterator> ::value), ""); #endif + + return 0; } diff --git a/libcxx/test/libcxx/iterators/version.pass.cpp b/libcxx/test/libcxx/iterators/version.pass.cpp index 9fe0a9e2eb9dd..16668898a4b4e 100644 --- a/libcxx/test/libcxx/iterators/version.pass.cpp +++ b/libcxx/test/libcxx/iterators/version.pass.cpp @@ -14,6 +14,8 @@ #error _LIBCPP_VERSION not defined #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/language.support/cmp/version.pass.cpp b/libcxx/test/libcxx/language.support/cmp/version.pass.cpp index ae3a573d71a16..9d2ae8ac11356 100644 --- a/libcxx/test/libcxx/language.support/cmp/version.pass.cpp +++ b/libcxx/test/libcxx/language.support/cmp/version.pass.cpp @@ -14,6 +14,8 @@ #error _LIBCPP_VERSION not defined #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/language.support/cstdint/version.pass.cpp b/libcxx/test/libcxx/language.support/cstdint/version.pass.cpp index 31822ac7ad464..9f11f15d118ae 100644 --- a/libcxx/test/libcxx/language.support/cstdint/version.pass.cpp +++ b/libcxx/test/libcxx/language.support/cstdint/version.pass.cpp @@ -14,6 +14,8 @@ #error _LIBCPP_VERSION not defined #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/language.support/cxa_deleted_virtual.pass.cpp b/libcxx/test/libcxx/language.support/cxa_deleted_virtual.pass.cpp index 0439819701c49..b5171a39e1075 100644 --- a/libcxx/test/libcxx/language.support/cxa_deleted_virtual.pass.cpp +++ b/libcxx/test/libcxx/language.support/cxa_deleted_virtual.pass.cpp @@ -21,7 +21,9 @@ // XFAIL: with_system_cxx_lib=macosx10.7 struct S { virtual void f() = delete; virtual ~S() {} }; -int main() { +int main(int, char**) { S *s = new S; delete s; + + return 0; } diff --git a/libcxx/test/libcxx/language.support/has_c11_features.pass.cpp b/libcxx/test/libcxx/language.support/has_c11_features.pass.cpp index 1bba504cd9420..7abdbc1c8619f 100644 --- a/libcxx/test/libcxx/language.support/has_c11_features.pass.cpp +++ b/libcxx/test/libcxx/language.support/has_c11_features.pass.cpp @@ -28,4 +28,6 @@ # endif #endif -int main() {} +int main(int, char**) { + return 0; +} diff --git a/libcxx/test/libcxx/language.support/support.dynamic/libcpp_deallocate.sh.cpp b/libcxx/test/libcxx/language.support/support.dynamic/libcpp_deallocate.sh.cpp index be2e69e6893d5..04ba34ca0eab9 100644 --- a/libcxx/test/libcxx/language.support/support.dynamic/libcpp_deallocate.sh.cpp +++ b/libcxx/test/libcxx/language.support/support.dynamic/libcpp_deallocate.sh.cpp @@ -253,7 +253,9 @@ void test_allocator_and_new_match() { #endif } -int main() { +int main(int, char**) { test_libcpp_dealloc(); test_allocator_and_new_match(); + + return 0; } diff --git a/libcxx/test/libcxx/language.support/support.dynamic/new_faligned_allocation.sh.cpp b/libcxx/test/libcxx/language.support/support.dynamic/new_faligned_allocation.sh.cpp index 65943139f2b40..f3db564784268 100644 --- a/libcxx/test/libcxx/language.support/support.dynamic/new_faligned_allocation.sh.cpp +++ b/libcxx/test/libcxx/language.support/support.dynamic/new_faligned_allocation.sh.cpp @@ -36,7 +36,7 @@ #include "test_macros.h" -int main() { +int main(int, char**) { { static_assert(std::is_enum::value, ""); typedef std::underlying_type::type UT; @@ -88,4 +88,6 @@ int main() { assert(typeid(std::align_val_t).name() == std::string("St11align_val_t")); } #endif + + return 0; } diff --git a/libcxx/test/libcxx/language.support/support.dynamic/version.pass.cpp b/libcxx/test/libcxx/language.support/support.dynamic/version.pass.cpp index a3ca4f6176732..c3f542ca8407d 100644 --- a/libcxx/test/libcxx/language.support/support.dynamic/version.pass.cpp +++ b/libcxx/test/libcxx/language.support/support.dynamic/version.pass.cpp @@ -14,6 +14,8 @@ #error _LIBCPP_VERSION not defined #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/language.support/support.exception/version.pass.cpp b/libcxx/test/libcxx/language.support/support.exception/version.pass.cpp index 1161e67d0c1df..495a8cde9697d 100644 --- a/libcxx/test/libcxx/language.support/support.exception/version.pass.cpp +++ b/libcxx/test/libcxx/language.support/support.exception/version.pass.cpp @@ -14,6 +14,8 @@ #error _LIBCPP_VERSION not defined #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/language.support/support.initlist/version.pass.cpp b/libcxx/test/libcxx/language.support/support.initlist/version.pass.cpp index 9b11ce1c66c4e..6f42987b16e03 100644 --- a/libcxx/test/libcxx/language.support/support.initlist/version.pass.cpp +++ b/libcxx/test/libcxx/language.support/support.initlist/version.pass.cpp @@ -14,6 +14,8 @@ #error _LIBCPP_VERSION not defined #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/language.support/support.limits/c.limits/version_cfloat.pass.cpp b/libcxx/test/libcxx/language.support/support.limits/c.limits/version_cfloat.pass.cpp index ee03d9ef0cf6d..baa925f7d05fb 100644 --- a/libcxx/test/libcxx/language.support/support.limits/c.limits/version_cfloat.pass.cpp +++ b/libcxx/test/libcxx/language.support/support.limits/c.limits/version_cfloat.pass.cpp @@ -14,6 +14,8 @@ #error _LIBCPP_VERSION not defined #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/language.support/support.limits/c.limits/version_climits.pass.cpp b/libcxx/test/libcxx/language.support/support.limits/c.limits/version_climits.pass.cpp index 94fd729c49537..208b16ed78072 100644 --- a/libcxx/test/libcxx/language.support/support.limits/c.limits/version_climits.pass.cpp +++ b/libcxx/test/libcxx/language.support/support.limits/c.limits/version_climits.pass.cpp @@ -14,6 +14,8 @@ #error _LIBCPP_VERSION not defined #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/language.support/support.limits/limits/version.pass.cpp b/libcxx/test/libcxx/language.support/support.limits/limits/version.pass.cpp index 4d9ba38929032..a17643bc45fad 100644 --- a/libcxx/test/libcxx/language.support/support.limits/limits/version.pass.cpp +++ b/libcxx/test/libcxx/language.support/support.limits/limits/version.pass.cpp @@ -14,6 +14,8 @@ #error _LIBCPP_VERSION not defined #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/language.support/support.limits/version.pass.cpp b/libcxx/test/libcxx/language.support/support.limits/version.pass.cpp index e884d285a2b2c..4277147f6e191 100644 --- a/libcxx/test/libcxx/language.support/support.limits/version.pass.cpp +++ b/libcxx/test/libcxx/language.support/support.limits/version.pass.cpp @@ -14,6 +14,8 @@ #error "_LIBCPP_VERSION must be defined after including " #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/language.support/support.rtti/version.pass.cpp b/libcxx/test/libcxx/language.support/support.rtti/version.pass.cpp index 84d74db3d7ce1..3d21c8487b9c1 100644 --- a/libcxx/test/libcxx/language.support/support.rtti/version.pass.cpp +++ b/libcxx/test/libcxx/language.support/support.rtti/version.pass.cpp @@ -14,6 +14,8 @@ #error _LIBCPP_VERSION not defined #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/language.support/support.runtime/version_csetjmp.pass.cpp b/libcxx/test/libcxx/language.support/support.runtime/version_csetjmp.pass.cpp index 261dd3cde0e3c..9bceaf8238f3f 100644 --- a/libcxx/test/libcxx/language.support/support.runtime/version_csetjmp.pass.cpp +++ b/libcxx/test/libcxx/language.support/support.runtime/version_csetjmp.pass.cpp @@ -14,6 +14,8 @@ #error _LIBCPP_VERSION not defined #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/language.support/support.runtime/version_csignal.pass.cpp b/libcxx/test/libcxx/language.support/support.runtime/version_csignal.pass.cpp index a602675ce2942..b93fb0d172c71 100644 --- a/libcxx/test/libcxx/language.support/support.runtime/version_csignal.pass.cpp +++ b/libcxx/test/libcxx/language.support/support.runtime/version_csignal.pass.cpp @@ -14,6 +14,8 @@ #error _LIBCPP_VERSION not defined #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/language.support/support.runtime/version_cstdarg.pass.cpp b/libcxx/test/libcxx/language.support/support.runtime/version_cstdarg.pass.cpp index 1dde2b656aeb3..0ddd98b52c29d 100644 --- a/libcxx/test/libcxx/language.support/support.runtime/version_cstdarg.pass.cpp +++ b/libcxx/test/libcxx/language.support/support.runtime/version_cstdarg.pass.cpp @@ -14,6 +14,8 @@ #error _LIBCPP_VERSION not defined #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/language.support/support.runtime/version_cstdbool.pass.cpp b/libcxx/test/libcxx/language.support/support.runtime/version_cstdbool.pass.cpp index 219efa15367f8..85f1fb34d83b5 100644 --- a/libcxx/test/libcxx/language.support/support.runtime/version_cstdbool.pass.cpp +++ b/libcxx/test/libcxx/language.support/support.runtime/version_cstdbool.pass.cpp @@ -14,6 +14,8 @@ #error _LIBCPP_VERSION not defined #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/language.support/support.runtime/version_cstdlib.pass.cpp b/libcxx/test/libcxx/language.support/support.runtime/version_cstdlib.pass.cpp index 431e3d9a9d27f..9a5a02fb882cb 100644 --- a/libcxx/test/libcxx/language.support/support.runtime/version_cstdlib.pass.cpp +++ b/libcxx/test/libcxx/language.support/support.runtime/version_cstdlib.pass.cpp @@ -14,6 +14,8 @@ #error _LIBCPP_VERSION not defined #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/language.support/support.runtime/version_ctime.pass.cpp b/libcxx/test/libcxx/language.support/support.runtime/version_ctime.pass.cpp index d38788602d329..bc2d039b3d024 100644 --- a/libcxx/test/libcxx/language.support/support.runtime/version_ctime.pass.cpp +++ b/libcxx/test/libcxx/language.support/support.runtime/version_ctime.pass.cpp @@ -14,6 +14,8 @@ #error _LIBCPP_VERSION not defined #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/language.support/support.types/version.pass.cpp b/libcxx/test/libcxx/language.support/support.types/version.pass.cpp index 8c05c656301a4..5dd755c0066ca 100644 --- a/libcxx/test/libcxx/language.support/support.types/version.pass.cpp +++ b/libcxx/test/libcxx/language.support/support.types/version.pass.cpp @@ -14,6 +14,8 @@ #error _LIBCPP_VERSION not defined #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/libcpp_alignof.pass.cpp b/libcxx/test/libcxx/libcpp_alignof.pass.cpp index ab64889b5f26b..0f67210847a87 100644 --- a/libcxx/test/libcxx/libcpp_alignof.pass.cpp +++ b/libcxx/test/libcxx/libcpp_alignof.pass.cpp @@ -28,9 +28,10 @@ void test() { #endif } -int main() { +int main(int, char**) { test(); test(); test(); test(); + return 0; } diff --git a/libcxx/test/libcxx/libcpp_version.pass.cpp b/libcxx/test/libcxx/libcpp_version.pass.cpp index 9d7e6dce111d5..a2d18c3bb3f76 100644 --- a/libcxx/test/libcxx/libcpp_version.pass.cpp +++ b/libcxx/test/libcxx/libcpp_version.pass.cpp @@ -22,6 +22,8 @@ static const int libcpp_version = static_assert(_LIBCPP_VERSION == libcpp_version, "_LIBCPP_VERSION doesn't match __libcpp_version"); -int main() { +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/localization/c.locales/version.pass.cpp b/libcxx/test/libcxx/localization/c.locales/version.pass.cpp index 5a4f1064cc2ea..2dfc76dd909c4 100644 --- a/libcxx/test/libcxx/localization/c.locales/version.pass.cpp +++ b/libcxx/test/libcxx/localization/c.locales/version.pass.cpp @@ -14,6 +14,8 @@ #error _LIBCPP_VERSION not defined #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/localization/locale.categories/__scan_keyword.pass.cpp b/libcxx/test/libcxx/localization/locale.categories/__scan_keyword.pass.cpp index 6da1aa5758e34..b85bd8a580f59 100644 --- a/libcxx/test/libcxx/localization/locale.categories/__scan_keyword.pass.cpp +++ b/libcxx/test/libcxx/localization/locale.categories/__scan_keyword.pass.cpp @@ -38,7 +38,7 @@ #include #include -int main() +int main(int, char**) { const std::ctype& ct = std::use_facet >(std::locale::classic()); std::ios_base::iostate err = std::ios_base::goodbit; @@ -114,4 +114,6 @@ int main() assert(in == input+3); assert(err == std::ios_base::goodbit); } + + return 0; } diff --git a/libcxx/test/libcxx/localization/locale.stdcvt/version.pass.cpp b/libcxx/test/libcxx/localization/locale.stdcvt/version.pass.cpp index 1e346afb6c04d..738ab5e41f42b 100644 --- a/libcxx/test/libcxx/localization/locale.stdcvt/version.pass.cpp +++ b/libcxx/test/libcxx/localization/locale.stdcvt/version.pass.cpp @@ -14,6 +14,8 @@ #error _LIBCPP_VERSION not defined #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/localization/locales/locale.abort.pass.cpp b/libcxx/test/libcxx/localization/locales/locale.abort.pass.cpp new file mode 100644 index 0000000000000..5817ebdfda524 --- /dev/null +++ b/libcxx/test/libcxx/localization/locales/locale.abort.pass.cpp @@ -0,0 +1,34 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// + +// class locale; + +// explicit locale( const char* std_name ); + +// REQUIRES: libcpp-no-exceptions + +// Make sure we abort() when we construct a locale with a null name and +// exceptions are disabled. + +#include +#include +#include + + +void exit_success(int) { + std::_Exit(EXIT_SUCCESS); +} + +int main(int, char**) { + std::signal(SIGABRT, exit_success); + std::locale loc(NULL); + (void)loc; + return EXIT_FAILURE; +} diff --git a/libcxx/test/libcxx/localization/locales/locale.category.abort.pass.cpp b/libcxx/test/libcxx/localization/locales/locale.category.abort.pass.cpp new file mode 100644 index 0000000000000..cf50415a2c99f --- /dev/null +++ b/libcxx/test/libcxx/localization/locales/locale.category.abort.pass.cpp @@ -0,0 +1,34 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// + +// class locale; + +// locale(const locale& other, const char* std_name, category cat); + +// REQUIRES: libcpp-no-exceptions + +// Make sure we abort() when we construct a locale with a null name and +// exceptions are disabled. + +#include +#include +#include + + +void exit_success(int) { + std::_Exit(EXIT_SUCCESS); +} + +int main(int, char**) { + std::signal(SIGABRT, exit_success); + std::locale loc(std::locale(), NULL, std::locale::ctype); + (void)loc; + return EXIT_FAILURE; +} diff --git a/libcxx/test/libcxx/localization/locales/locale.convenience/conversions/conversions.string/ctor_move.pass.cpp b/libcxx/test/libcxx/localization/locales/locale.convenience/conversions/conversions.string/ctor_move.pass.cpp index 996f6bdc60a71..3aac6f532797a 100644 --- a/libcxx/test/libcxx/localization/locales/locale.convenience/conversions/conversions.string/ctor_move.pass.cpp +++ b/libcxx/test/libcxx/localization/locales/locale.convenience/conversions/conversions.string/ctor_move.pass.cpp @@ -21,7 +21,7 @@ #include #include -int main() +int main(int, char**) { typedef std::codecvt_utf8 Codecvt; typedef std::wstring_convert Myconv; @@ -34,4 +34,6 @@ int main() // move construct a new converter and make sure the state is the same. Myconv myconv2(std::move(myconv)); assert(myconv2.converted() == old_converted); + + return 0; } diff --git a/libcxx/test/libcxx/localization/locales/locale/locale.types/locale.facet/facet.pass.cpp b/libcxx/test/libcxx/localization/locales/locale/locale.types/locale.facet/facet.pass.cpp index 668cb55c677fd..7be14d6be2bd8 100644 --- a/libcxx/test/libcxx/localization/locales/locale/locale.types/locale.facet/facet.pass.cpp +++ b/libcxx/test/libcxx/localization/locales/locale/locale.types/locale.facet/facet.pass.cpp @@ -35,7 +35,7 @@ struct my_facet int my_facet::count = 0; -int main() +int main(int, char**) { my_facet* f = new my_facet; f->__add_shared(); @@ -49,4 +49,6 @@ int main() assert(my_facet::count == 1); f->__release_shared(); assert(my_facet::count == 0); + + return 0; } diff --git a/libcxx/test/libcxx/localization/locales/locale/locale.types/locale.id/id.pass.cpp b/libcxx/test/libcxx/localization/locales/locale/locale.types/locale.id/id.pass.cpp index 6844a0ad0b4c8..758d7f8b81a10 100644 --- a/libcxx/test/libcxx/localization/locales/locale/locale.types/locale.id/id.pass.cpp +++ b/libcxx/test/libcxx/localization/locales/locale/locale.types/locale.id/id.pass.cpp @@ -25,7 +25,7 @@ std::locale::id id0; std::locale::id id2; std::locale::id id1; -int main() +int main(int, char**) { long id = id0.__get(); assert(id0.__get() == id+0); @@ -46,4 +46,6 @@ int main() assert(id2.__get() == id+2); assert(id2.__get() == id+2); assert(id2.__get() == id+2); + + return 0; } diff --git a/libcxx/test/libcxx/localization/locales/use_facet.abort.pass.cpp b/libcxx/test/libcxx/localization/locales/use_facet.abort.pass.cpp new file mode 100644 index 0000000000000..64700eab9d192 --- /dev/null +++ b/libcxx/test/libcxx/localization/locales/use_facet.abort.pass.cpp @@ -0,0 +1,37 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// + +// template const Facet& use_facet(const locale& loc); + +// REQUIRES: libcpp-no-exceptions + +// Make sure we abort() when we pass a facet not associated to the locale to +// use_facet() and exceptions are disabled. + +#include +#include +#include + + +struct my_facet : public std::locale::facet { + static std::locale::id id; +}; + +std::locale::id my_facet::id; + +void exit_success(int) { + std::_Exit(EXIT_SUCCESS); +} + +int main(int, char**) { + std::signal(SIGABRT, exit_success); + std::use_facet(std::locale()); + return EXIT_FAILURE; +} diff --git a/libcxx/test/libcxx/localization/version.pass.cpp b/libcxx/test/libcxx/localization/version.pass.cpp index 8b73ba5896599..1d1294593d272 100644 --- a/libcxx/test/libcxx/localization/version.pass.cpp +++ b/libcxx/test/libcxx/localization/version.pass.cpp @@ -14,6 +14,8 @@ #error _LIBCPP_VERSION not defined #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/memory/aligned_allocation_macro.pass.cpp b/libcxx/test/libcxx/memory/aligned_allocation_macro.pass.cpp index b4aad040cf454..7099eed2e0fbb 100644 --- a/libcxx/test/libcxx/memory/aligned_allocation_macro.pass.cpp +++ b/libcxx/test/libcxx/memory/aligned_allocation_macro.pass.cpp @@ -27,4 +27,6 @@ # error "libc++ should have aligned allocation in C++17 and up when targeting a platform that supports it" #endif -int main() { } +int main(int, char**) { + return 0; +} diff --git a/libcxx/test/libcxx/memory/is_allocator.pass.cpp b/libcxx/test/libcxx/memory/is_allocator.pass.cpp index d0f3e9c27d09c..d62a91f7d62ac 100644 --- a/libcxx/test/libcxx/memory/is_allocator.pass.cpp +++ b/libcxx/test/libcxx/memory/is_allocator.pass.cpp @@ -32,10 +32,12 @@ void test_allocators() } -int main() +int main(int, char**) { // test_allocators(); test_allocators(); test_allocators(); test_allocators(); + + return 0; } diff --git a/libcxx/test/libcxx/min_max_macros.sh.cpp b/libcxx/test/libcxx/min_max_macros.sh.cpp index 8351e57898c65..4310294ca0224 100644 --- a/libcxx/test/libcxx/min_max_macros.sh.cpp +++ b/libcxx/test/libcxx/min_max_macros.sh.cpp @@ -101,6 +101,8 @@ TEST_MACROS(); TEST_MACROS(); #include TEST_MACROS(); +#include +TEST_MACROS(); #include TEST_MACROS(); #include diff --git a/libcxx/test/libcxx/modules/cinttypes_exports.sh.cpp b/libcxx/test/libcxx/modules/cinttypes_exports.sh.cpp index 6e6c515e12e6e..a24aafdcc737f 100644 --- a/libcxx/test/libcxx/modules/cinttypes_exports.sh.cpp +++ b/libcxx/test/libcxx/modules/cinttypes_exports.sh.cpp @@ -18,7 +18,9 @@ #include -int main() { +int main(int, char**) { int8_t x; ((void)x); std::int8_t y; ((void)y); + + return 0; } diff --git a/libcxx/test/libcxx/modules/clocale_exports.sh.cpp b/libcxx/test/libcxx/modules/clocale_exports.sh.cpp index 480308c1e5006..3225155ca3685 100644 --- a/libcxx/test/libcxx/modules/clocale_exports.sh.cpp +++ b/libcxx/test/libcxx/modules/clocale_exports.sh.cpp @@ -19,9 +19,11 @@ #define TEST(...) do { using T = decltype( __VA_ARGS__ ); } while(false) -int main() { +int main(int, char**) { std::lconv l; ((void)l); TEST(std::setlocale(0, "")); TEST(std::localeconv()); + + return 0; } diff --git a/libcxx/test/libcxx/modules/cstdint_exports.sh.cpp b/libcxx/test/libcxx/modules/cstdint_exports.sh.cpp index 8ecb15c5cdc44..315d9ac17b916 100644 --- a/libcxx/test/libcxx/modules/cstdint_exports.sh.cpp +++ b/libcxx/test/libcxx/modules/cstdint_exports.sh.cpp @@ -18,7 +18,9 @@ #include -int main() { +int main(int, char**) { int8_t x; ((void)x); std::int8_t y; ((void)y); + + return 0; } diff --git a/libcxx/test/libcxx/modules/inttypes_h_exports.sh.cpp b/libcxx/test/libcxx/modules/inttypes_h_exports.sh.cpp index a51608c67eea8..4cbb1d5742064 100644 --- a/libcxx/test/libcxx/modules/inttypes_h_exports.sh.cpp +++ b/libcxx/test/libcxx/modules/inttypes_h_exports.sh.cpp @@ -18,6 +18,8 @@ #include -int main() { +int main(int, char**) { int8_t x; ((void)x); + + return 0; } diff --git a/libcxx/test/libcxx/modules/stdint_h_exports.sh.cpp b/libcxx/test/libcxx/modules/stdint_h_exports.sh.cpp index 584a46515a7e6..5b35ba30ca6d5 100644 --- a/libcxx/test/libcxx/modules/stdint_h_exports.sh.cpp +++ b/libcxx/test/libcxx/modules/stdint_h_exports.sh.cpp @@ -14,6 +14,8 @@ #include -int main() { +int main(int, char**) { int8_t x; ((void)x); + + return 0; } diff --git a/libcxx/test/libcxx/numerics/c.math/constexpr-fns.pass.cpp b/libcxx/test/libcxx/numerics/c.math/constexpr-fns.pass.cpp index b15467cfd53c2..330b3a134f7b2 100644 --- a/libcxx/test/libcxx/numerics/c.math/constexpr-fns.pass.cpp +++ b/libcxx/test/libcxx/numerics/c.math/constexpr-fns.pass.cpp @@ -26,6 +26,8 @@ static_assert(std::__libcpp_isnan_or_builtin(0.) == false, ""); static_assert(std::__libcpp_isinf_or_builtin(0.0) == false, ""); static_assert(std::__libcpp_isfinite_or_builtin(0.0) == true, ""); -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/numerics/c.math/ctgmath.pass.cpp b/libcxx/test/libcxx/numerics/c.math/ctgmath.pass.cpp index 3b701579538ba..81eac056bef66 100644 --- a/libcxx/test/libcxx/numerics/c.math/ctgmath.pass.cpp +++ b/libcxx/test/libcxx/numerics/c.math/ctgmath.pass.cpp @@ -14,10 +14,12 @@ #error _LIBCPP_VERSION not defined #endif -int main() +int main(int, char**) { std::complex cd; ((void)cd); double x = std::sin(0); ((void)x); + + return 0; } diff --git a/libcxx/test/libcxx/numerics/c.math/fdelayed-template-parsing.sh.cpp b/libcxx/test/libcxx/numerics/c.math/fdelayed-template-parsing.sh.cpp index 6007268b2fff8..37d09a8796f9d 100644 --- a/libcxx/test/libcxx/numerics/c.math/fdelayed-template-parsing.sh.cpp +++ b/libcxx/test/libcxx/numerics/c.math/fdelayed-template-parsing.sh.cpp @@ -18,10 +18,12 @@ #include "test_macros.h" -int main() { +int main(int, char**) { assert(std::isfinite(1.0)); assert(!std::isinf(1.0)); assert(!std::isnan(1.0)); + + return 0; } using namespace std; diff --git a/libcxx/test/libcxx/numerics/c.math/tgmath_h.pass.cpp b/libcxx/test/libcxx/numerics/c.math/tgmath_h.pass.cpp index 3c2388992c7cb..d3cd15ca0283d 100644 --- a/libcxx/test/libcxx/numerics/c.math/tgmath_h.pass.cpp +++ b/libcxx/test/libcxx/numerics/c.math/tgmath_h.pass.cpp @@ -14,6 +14,8 @@ #error _LIBCPP_VERSION not defined #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/numerics/c.math/version_cmath.pass.cpp b/libcxx/test/libcxx/numerics/c.math/version_cmath.pass.cpp index b11a6a2e8ff12..1b4ab9a6d8ea4 100644 --- a/libcxx/test/libcxx/numerics/c.math/version_cmath.pass.cpp +++ b/libcxx/test/libcxx/numerics/c.math/version_cmath.pass.cpp @@ -14,6 +14,8 @@ #error _LIBCPP_VERSION not defined #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/numerics/cfenv/version.pass.cpp b/libcxx/test/libcxx/numerics/cfenv/version.pass.cpp index 8b523916ab800..9ce5b9c4cb230 100644 --- a/libcxx/test/libcxx/numerics/cfenv/version.pass.cpp +++ b/libcxx/test/libcxx/numerics/cfenv/version.pass.cpp @@ -16,6 +16,8 @@ #error _LIBCPP_VERSION not defined #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/numerics/complex.number/__sqr.pass.cpp b/libcxx/test/libcxx/numerics/complex.number/__sqr.pass.cpp index 4ef3d773b4e1f..3a6aec0ac6791 100644 --- a/libcxx/test/libcxx/numerics/complex.number/__sqr.pass.cpp +++ b/libcxx/test/libcxx/numerics/complex.number/__sqr.pass.cpp @@ -72,9 +72,11 @@ test() assert(inf2.real() < 0); } -int main() +int main(int, char**) { test(); test(); test(); + + return 0; } diff --git a/libcxx/test/libcxx/numerics/complex.number/ccmplx/ccomplex.pass.cpp b/libcxx/test/libcxx/numerics/complex.number/ccmplx/ccomplex.pass.cpp index 4fe737ed91510..ff03bd09f841a 100644 --- a/libcxx/test/libcxx/numerics/complex.number/ccmplx/ccomplex.pass.cpp +++ b/libcxx/test/libcxx/numerics/complex.number/ccmplx/ccomplex.pass.cpp @@ -14,8 +14,10 @@ #error _LIBCPP_VERSION not defined #endif -int main() +int main(int, char**) { std::complex d; (void)d; + + return 0; } diff --git a/libcxx/test/libcxx/numerics/complex.number/version.pass.cpp b/libcxx/test/libcxx/numerics/complex.number/version.pass.cpp index c7dfb72dc006a..ec3996e54f3d2 100644 --- a/libcxx/test/libcxx/numerics/complex.number/version.pass.cpp +++ b/libcxx/test/libcxx/numerics/complex.number/version.pass.cpp @@ -14,6 +14,8 @@ #error _LIBCPP_VERSION not defined #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/numerics/numarray/version.pass.cpp b/libcxx/test/libcxx/numerics/numarray/version.pass.cpp index ffe443d092a3f..b921ae247accd 100644 --- a/libcxx/test/libcxx/numerics/numarray/version.pass.cpp +++ b/libcxx/test/libcxx/numerics/numarray/version.pass.cpp @@ -14,6 +14,8 @@ #error _LIBCPP_VERSION not defined #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/numerics/numeric.ops/version.pass.cpp b/libcxx/test/libcxx/numerics/numeric.ops/version.pass.cpp index 2ae08be3e871c..50a07a639368c 100644 --- a/libcxx/test/libcxx/numerics/numeric.ops/version.pass.cpp +++ b/libcxx/test/libcxx/numerics/numeric.ops/version.pass.cpp @@ -14,6 +14,8 @@ #error _LIBCPP_VERSION not defined #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/numerics/rand/rand.synopsis/version.pass.cpp b/libcxx/test/libcxx/numerics/rand/rand.synopsis/version.pass.cpp index faddb6592c2a1..b9f876d0f9c02 100644 --- a/libcxx/test/libcxx/numerics/rand/rand.synopsis/version.pass.cpp +++ b/libcxx/test/libcxx/numerics/rand/rand.synopsis/version.pass.cpp @@ -14,6 +14,8 @@ #error _LIBCPP_VERSION not defined #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/selftest/not_test.sh.cpp b/libcxx/test/libcxx/selftest/not_test.sh.cpp index 4e01967523dfd..8dbf708f0cb1a 100644 --- a/libcxx/test/libcxx/selftest/not_test.sh.cpp +++ b/libcxx/test/libcxx/selftest/not_test.sh.cpp @@ -10,7 +10,7 @@ // RUN: %build // RUN: not %run -int main() +int main(int, char**) { return 1; } diff --git a/libcxx/test/libcxx/selftest/test.arc.pass.mm b/libcxx/test/libcxx/selftest/test.arc.pass.mm index df4e83264bcaf..eecdbb616185d 100644 --- a/libcxx/test/libcxx/selftest/test.arc.pass.mm +++ b/libcxx/test/libcxx/selftest/test.arc.pass.mm @@ -11,6 +11,4 @@ #error "arc should be enabled" #endif -int main() -{ -} +int main(int, char**) { return 0; } diff --git a/libcxx/test/libcxx/selftest/test.pass.cpp b/libcxx/test/libcxx/selftest/test.pass.cpp index 02fe32ece4841..779762e7e995d 100644 --- a/libcxx/test/libcxx/selftest/test.pass.cpp +++ b/libcxx/test/libcxx/selftest/test.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/selftest/test.pass.mm b/libcxx/test/libcxx/selftest/test.pass.mm index e5e5f5c4130b9..ba4d36bbe2110 100644 --- a/libcxx/test/libcxx/selftest/test.pass.mm +++ b/libcxx/test/libcxx/selftest/test.pass.mm @@ -11,6 +11,4 @@ #error "arc should *not* be enabled" #endif -int main() -{ -} +int main(int, char**) { return 0; } diff --git a/libcxx/test/libcxx/selftest/test.sh.cpp b/libcxx/test/libcxx/selftest/test.sh.cpp index b7e5e9d80aec8..1fc175413ab7c 100644 --- a/libcxx/test/libcxx/selftest/test.sh.cpp +++ b/libcxx/test/libcxx/selftest/test.sh.cpp @@ -10,6 +10,8 @@ // RUN: %build // RUN: %run -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/selftest/test_macros.pass.cpp b/libcxx/test/libcxx/selftest/test_macros.pass.cpp index 63659e59470c1..d7baeb2f99fa6 100644 --- a/libcxx/test/libcxx/selftest/test_macros.pass.cpp +++ b/libcxx/test/libcxx/selftest/test_macros.pass.cpp @@ -58,8 +58,10 @@ void test_libcxx_macros() // ===== C++17 features ===== } -int main() +int main(int, char**) { test_noexcept(); test_libcxx_macros(); + + return 0; } diff --git a/libcxx/test/libcxx/strings/basic.string/string.modifiers/clear_and_shrink_db1.pass.cpp b/libcxx/test/libcxx/strings/basic.string/string.modifiers/clear_and_shrink_db1.pass.cpp index 4275bad39370f..b0de5d8792e76 100644 --- a/libcxx/test/libcxx/strings/basic.string/string.modifiers/clear_and_shrink_db1.pass.cpp +++ b/libcxx/test/libcxx/strings/basic.string/string.modifiers/clear_and_shrink_db1.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { std::string l = "Long string so that allocation definitely, for sure, absolutely happens. Probably."; std::string s = "short"; @@ -40,8 +40,10 @@ int main() #else -int main() +int main(int, char**) { + + return 0; } #endif diff --git a/libcxx/test/libcxx/strings/basic.string/string.modifiers/erase_iter_db1.pass.cpp b/libcxx/test/libcxx/strings/basic.string/string.modifiers/erase_iter_db1.pass.cpp index e397e0c8584e8..a5258f95d4d2e 100644 --- a/libcxx/test/libcxx/strings/basic.string/string.modifiers/erase_iter_db1.pass.cpp +++ b/libcxx/test/libcxx/strings/basic.string/string.modifiers/erase_iter_db1.pass.cpp @@ -22,7 +22,7 @@ #include "test_macros.h" #include "min_allocator.h" -int main() +int main(int, char**) { { std::string l1("123"); @@ -43,8 +43,10 @@ int main() #else -int main() +int main(int, char**) { + + return 0; } #endif diff --git a/libcxx/test/libcxx/strings/basic.string/string.modifiers/erase_iter_db2.pass.cpp b/libcxx/test/libcxx/strings/basic.string/string.modifiers/erase_iter_db2.pass.cpp index db11f17a17d49..099ce74f74325 100644 --- a/libcxx/test/libcxx/strings/basic.string/string.modifiers/erase_iter_db2.pass.cpp +++ b/libcxx/test/libcxx/strings/basic.string/string.modifiers/erase_iter_db2.pass.cpp @@ -22,7 +22,7 @@ #include "test_macros.h" #include "min_allocator.h" -int main() +int main(int, char**) { { std::string l1("123"); @@ -45,8 +45,10 @@ int main() #else -int main() +int main(int, char**) { + + return 0; } #endif diff --git a/libcxx/test/libcxx/strings/basic.string/string.modifiers/erase_iter_iter_db1.pass.cpp b/libcxx/test/libcxx/strings/basic.string/string.modifiers/erase_iter_iter_db1.pass.cpp index 736677b5e9f49..1802f6287db29 100644 --- a/libcxx/test/libcxx/strings/basic.string/string.modifiers/erase_iter_iter_db1.pass.cpp +++ b/libcxx/test/libcxx/strings/basic.string/string.modifiers/erase_iter_iter_db1.pass.cpp @@ -22,7 +22,7 @@ #include "test_macros.h" #include "min_allocator.h" -int main() +int main(int, char**) { { std::string l1("123"); @@ -43,8 +43,10 @@ int main() #else -int main() +int main(int, char**) { + + return 0; } #endif diff --git a/libcxx/test/libcxx/strings/basic.string/string.modifiers/erase_iter_iter_db2.pass.cpp b/libcxx/test/libcxx/strings/basic.string/string.modifiers/erase_iter_iter_db2.pass.cpp index 6f10d3f7e97e5..fe65851ef7756 100644 --- a/libcxx/test/libcxx/strings/basic.string/string.modifiers/erase_iter_iter_db2.pass.cpp +++ b/libcxx/test/libcxx/strings/basic.string/string.modifiers/erase_iter_iter_db2.pass.cpp @@ -22,7 +22,7 @@ #include "test_macros.h" #include "min_allocator.h" -int main() +int main(int, char**) { { std::string l1("123"); @@ -43,8 +43,10 @@ int main() #else -int main() +int main(int, char**) { + + return 0; } #endif diff --git a/libcxx/test/libcxx/strings/basic.string/string.modifiers/erase_iter_iter_db3.pass.cpp b/libcxx/test/libcxx/strings/basic.string/string.modifiers/erase_iter_iter_db3.pass.cpp index f6f23f111c125..fad146451262e 100644 --- a/libcxx/test/libcxx/strings/basic.string/string.modifiers/erase_iter_iter_db3.pass.cpp +++ b/libcxx/test/libcxx/strings/basic.string/string.modifiers/erase_iter_iter_db3.pass.cpp @@ -22,7 +22,7 @@ #include "test_macros.h" #include "min_allocator.h" -int main() +int main(int, char**) { { std::string l1("123"); @@ -43,8 +43,10 @@ int main() #else -int main() +int main(int, char**) { + + return 0; } #endif diff --git a/libcxx/test/libcxx/strings/basic.string/string.modifiers/erase_iter_iter_db4.pass.cpp b/libcxx/test/libcxx/strings/basic.string/string.modifiers/erase_iter_iter_db4.pass.cpp index 0446df020c31d..3186ad4492b02 100644 --- a/libcxx/test/libcxx/strings/basic.string/string.modifiers/erase_iter_iter_db4.pass.cpp +++ b/libcxx/test/libcxx/strings/basic.string/string.modifiers/erase_iter_iter_db4.pass.cpp @@ -22,7 +22,7 @@ #include "test_macros.h" #include "min_allocator.h" -int main() +int main(int, char**) { { std::string l1("123"); @@ -41,8 +41,10 @@ int main() #else -int main() +int main(int, char**) { + + return 0; } #endif diff --git a/libcxx/test/libcxx/strings/basic.string/string.modifiers/erase_pop_back_db1.pass.cpp b/libcxx/test/libcxx/strings/basic.string/string.modifiers/erase_pop_back_db1.pass.cpp index 4276dfcdb35b9..2516a69f51f21 100644 --- a/libcxx/test/libcxx/strings/basic.string/string.modifiers/erase_pop_back_db1.pass.cpp +++ b/libcxx/test/libcxx/strings/basic.string/string.modifiers/erase_pop_back_db1.pass.cpp @@ -19,7 +19,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { #if _LIBCPP_DEBUG >= 1 { @@ -28,4 +28,6 @@ int main() assert(false); } #endif + + return 0; } diff --git a/libcxx/test/libcxx/strings/basic.string/string.modifiers/insert_iter_char_db1.pass.cpp b/libcxx/test/libcxx/strings/basic.string/string.modifiers/insert_iter_char_db1.pass.cpp index 39b1fde167e76..7925e1597b728 100644 --- a/libcxx/test/libcxx/strings/basic.string/string.modifiers/insert_iter_char_db1.pass.cpp +++ b/libcxx/test/libcxx/strings/basic.string/string.modifiers/insert_iter_char_db1.pass.cpp @@ -19,7 +19,7 @@ #include -int main() +int main(int, char**) { #if _LIBCPP_DEBUG >= 1 { @@ -30,4 +30,6 @@ int main() assert(false); } #endif + + return 0; } diff --git a/libcxx/test/libcxx/strings/basic.string/string.modifiers/insert_iter_size_char_db1.pass.cpp b/libcxx/test/libcxx/strings/basic.string/string.modifiers/insert_iter_size_char_db1.pass.cpp index fb3771d9193c6..81f888f86950e 100644 --- a/libcxx/test/libcxx/strings/basic.string/string.modifiers/insert_iter_size_char_db1.pass.cpp +++ b/libcxx/test/libcxx/strings/basic.string/string.modifiers/insert_iter_size_char_db1.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { #if _LIBCPP_DEBUG >= 1 { @@ -27,4 +27,6 @@ int main() assert(false); } #endif + + return 0; } diff --git a/libcxx/test/libcxx/strings/basic.string/string.modifiers/resize_default_initialized.pass.cpp b/libcxx/test/libcxx/strings/basic.string/string.modifiers/resize_default_initialized.pass.cpp index ca9fb051277b1..3fab03c01c7fe 100644 --- a/libcxx/test/libcxx/strings/basic.string/string.modifiers/resize_default_initialized.pass.cpp +++ b/libcxx/test/libcxx/strings/basic.string/string.modifiers/resize_default_initialized.pass.cpp @@ -56,7 +56,9 @@ void test_basic() { } } -int main() { +int main(int, char**) { test_basic(); test_buffer_usage(); + + return 0; } diff --git a/libcxx/test/libcxx/strings/c.strings/version_cctype.pass.cpp b/libcxx/test/libcxx/strings/c.strings/version_cctype.pass.cpp index 9a0b4a6f05de5..47e8576798a2b 100644 --- a/libcxx/test/libcxx/strings/c.strings/version_cctype.pass.cpp +++ b/libcxx/test/libcxx/strings/c.strings/version_cctype.pass.cpp @@ -14,6 +14,8 @@ #error _LIBCPP_VERSION not defined #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/strings/c.strings/version_cstring.pass.cpp b/libcxx/test/libcxx/strings/c.strings/version_cstring.pass.cpp index a986f294ea409..21388b41050c2 100644 --- a/libcxx/test/libcxx/strings/c.strings/version_cstring.pass.cpp +++ b/libcxx/test/libcxx/strings/c.strings/version_cstring.pass.cpp @@ -14,6 +14,8 @@ #error _LIBCPP_VERSION not defined #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/strings/c.strings/version_cuchar.pass.cpp b/libcxx/test/libcxx/strings/c.strings/version_cuchar.pass.cpp index 40fa8ef237eab..8c6a9de70739d 100644 --- a/libcxx/test/libcxx/strings/c.strings/version_cuchar.pass.cpp +++ b/libcxx/test/libcxx/strings/c.strings/version_cuchar.pass.cpp @@ -16,6 +16,8 @@ #error _LIBCPP_VERSION not defined #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/strings/c.strings/version_cwchar.pass.cpp b/libcxx/test/libcxx/strings/c.strings/version_cwchar.pass.cpp index 424c85fc2ece8..f7539d4e83866 100644 --- a/libcxx/test/libcxx/strings/c.strings/version_cwchar.pass.cpp +++ b/libcxx/test/libcxx/strings/c.strings/version_cwchar.pass.cpp @@ -14,6 +14,8 @@ #error _LIBCPP_VERSION not defined #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/strings/c.strings/version_cwctype.pass.cpp b/libcxx/test/libcxx/strings/c.strings/version_cwctype.pass.cpp index 62320f8f5ea54..06aacb1fee870 100644 --- a/libcxx/test/libcxx/strings/c.strings/version_cwctype.pass.cpp +++ b/libcxx/test/libcxx/strings/c.strings/version_cwctype.pass.cpp @@ -14,6 +14,8 @@ #error _LIBCPP_VERSION not defined #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/strings/iterators.exceptions.pass.cpp b/libcxx/test/libcxx/strings/iterators.exceptions.pass.cpp index 07787edff618c..471e6bea560dd 100644 --- a/libcxx/test/libcxx/strings/iterators.exceptions.pass.cpp +++ b/libcxx/test/libcxx/strings/iterators.exceptions.pass.cpp @@ -33,7 +33,7 @@ static const bool expected = false; static const bool expected = true; #endif -int main() +int main(int, char**) { // basic tests static_assert(( std::__libcpp_string_gets_noexcept_iterator::value), ""); @@ -84,4 +84,6 @@ int main() static_assert(( std::__libcpp_string_gets_noexcept_iterator::iterator> ::value), ""); static_assert(( std::__libcpp_string_gets_noexcept_iterator::const_iterator> ::value), ""); #endif + + return 0; } diff --git a/libcxx/test/libcxx/strings/iterators.noexcept.pass.cpp b/libcxx/test/libcxx/strings/iterators.noexcept.pass.cpp index 01c15e3c9c95f..b46bc639b7a81 100644 --- a/libcxx/test/libcxx/strings/iterators.noexcept.pass.cpp +++ b/libcxx/test/libcxx/strings/iterators.noexcept.pass.cpp @@ -30,7 +30,7 @@ #include "test_macros.h" #include "test_iterators.h" -int main() +int main(int, char**) { // basic tests static_assert(( std::__libcpp_string_gets_noexcept_iterator::value), ""); @@ -77,4 +77,6 @@ int main() static_assert(( std::__libcpp_string_gets_noexcept_iterator::iterator> ::value), ""); static_assert(( std::__libcpp_string_gets_noexcept_iterator::const_iterator> ::value), ""); #endif + + return 0; } diff --git a/libcxx/test/libcxx/strings/version.pass.cpp b/libcxx/test/libcxx/strings/version.pass.cpp index e378fce09cb0e..f106780e350a7 100644 --- a/libcxx/test/libcxx/strings/version.pass.cpp +++ b/libcxx/test/libcxx/strings/version.pass.cpp @@ -14,6 +14,8 @@ #error _LIBCPP_VERSION not defined #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/thread/futures/futures.promise/set_exception.pass.cpp b/libcxx/test/libcxx/thread/futures/futures.promise/set_exception.pass.cpp index 6109081d1d75d..78a8aaaa52002 100644 --- a/libcxx/test/libcxx/thread/futures/futures.promise/set_exception.pass.cpp +++ b/libcxx/test/libcxx/thread/futures/futures.promise/set_exception.pass.cpp @@ -31,7 +31,7 @@ #include -int main() +int main(int, char**) { typedef std::__libcpp_debug_exception ExType; { @@ -52,4 +52,6 @@ int main() } catch (ExType const&) { } } + + return 0; } diff --git a/libcxx/test/libcxx/thread/futures/futures.promise/set_exception_at_thread_exit.pass.cpp b/libcxx/test/libcxx/thread/futures/futures.promise/set_exception_at_thread_exit.pass.cpp index 35fde08bd845f..baf5ba9bf34c4 100644 --- a/libcxx/test/libcxx/thread/futures/futures.promise/set_exception_at_thread_exit.pass.cpp +++ b/libcxx/test/libcxx/thread/futures/futures.promise/set_exception_at_thread_exit.pass.cpp @@ -31,7 +31,7 @@ #include -int main() +int main(int, char**) { typedef std::__libcpp_debug_exception ExType; { @@ -52,4 +52,6 @@ int main() } catch (ExType const& value) { } } + + return 0; } diff --git a/libcxx/test/libcxx/thread/futures/futures.task/types.pass.cpp b/libcxx/test/libcxx/thread/futures/futures.task/types.pass.cpp index 22aae509e98dd..75bf2950331fd 100644 --- a/libcxx/test/libcxx/thread/futures/futures.task/types.pass.cpp +++ b/libcxx/test/libcxx/thread/futures/futures.task/types.pass.cpp @@ -24,7 +24,9 @@ struct A {}; -int main() +int main(int, char**) { static_assert((std::is_same::result_type, A>::value), ""); + + return 0; } diff --git a/libcxx/test/libcxx/thread/futures/version.pass.cpp b/libcxx/test/libcxx/thread/futures/version.pass.cpp index ceb0a5561f1b5..fd2c30433001c 100644 --- a/libcxx/test/libcxx/thread/futures/version.pass.cpp +++ b/libcxx/test/libcxx/thread/futures/version.pass.cpp @@ -16,6 +16,8 @@ #error _LIBCPP_VERSION not defined #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/thread/thread.condition/PR30202_notify_from_pthread_created_thread.pass.cpp b/libcxx/test/libcxx/thread/thread.condition/PR30202_notify_from_pthread_created_thread.pass.cpp index 8118835545fb1..2ad5c625604c8 100644 --- a/libcxx/test/libcxx/thread/thread.condition/PR30202_notify_from_pthread_created_thread.pass.cpp +++ b/libcxx/test/libcxx/thread/thread.condition/PR30202_notify_from_pthread_created_thread.pass.cpp @@ -45,7 +45,7 @@ void* func(void*) return nullptr; } -int main() +int main(int, char**) { { std::unique_lock lk(mut); @@ -72,4 +72,6 @@ int main() assert(t1-t0 > ms(250)); t.join(); } + + return 0; } diff --git a/libcxx/test/libcxx/thread/thread.condition/thread.condition.condvar/native_handle.pass.cpp b/libcxx/test/libcxx/thread/thread.condition/thread.condition.condvar/native_handle.pass.cpp index f9facefffba89..4b983ff05b201 100644 --- a/libcxx/test/libcxx/thread/thread.condition/thread.condition.condvar/native_handle.pass.cpp +++ b/libcxx/test/libcxx/thread/thread.condition/thread.condition.condvar/native_handle.pass.cpp @@ -20,11 +20,13 @@ #include #include -int main() +int main(int, char**) { static_assert((std::is_same::value), ""); std::condition_variable cv; std::condition_variable::native_handle_type h = cv.native_handle(); assert(h != nullptr); + + return 0; } diff --git a/libcxx/test/libcxx/thread/thread.condition/version.pass.cpp b/libcxx/test/libcxx/thread/thread.condition/version.pass.cpp index b3cfd4a3d2b1f..2354b3b9fd8ed 100644 --- a/libcxx/test/libcxx/thread/thread.condition/version.pass.cpp +++ b/libcxx/test/libcxx/thread/thread.condition/version.pass.cpp @@ -16,6 +16,8 @@ #error _LIBCPP_VERSION not defined #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.class/native_handle.pass.cpp b/libcxx/test/libcxx/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.class/native_handle.pass.cpp index 28137444a0e57..b85efcb64ca5b 100644 --- a/libcxx/test/libcxx/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.class/native_handle.pass.cpp +++ b/libcxx/test/libcxx/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.class/native_handle.pass.cpp @@ -20,9 +20,11 @@ #include #include -int main() +int main(int, char**) { std::mutex m; pthread_mutex_t* h = m.native_handle(); assert(h); + + return 0; } diff --git a/libcxx/test/libcxx/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.recursive/native_handle.pass.cpp b/libcxx/test/libcxx/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.recursive/native_handle.pass.cpp index 2a0eab4f481b3..4a6c53995305f 100644 --- a/libcxx/test/libcxx/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.recursive/native_handle.pass.cpp +++ b/libcxx/test/libcxx/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.recursive/native_handle.pass.cpp @@ -20,9 +20,11 @@ #include #include -int main() +int main(int, char**) { std::recursive_mutex m; pthread_mutex_t* h = m.native_handle(); assert(h); + + return 0; } diff --git a/libcxx/test/libcxx/thread/thread.mutex/thread_safety_annotations_not_enabled.pass.cpp b/libcxx/test/libcxx/thread/thread.mutex/thread_safety_annotations_not_enabled.pass.cpp index 37f912bd99963..65a1d6e1225f5 100644 --- a/libcxx/test/libcxx/thread/thread.mutex/thread_safety_annotations_not_enabled.pass.cpp +++ b/libcxx/test/libcxx/thread/thread.mutex/thread_safety_annotations_not_enabled.pass.cpp @@ -16,10 +16,12 @@ #include -int main() { +int main(int, char**) { std::mutex m; m.lock(); { std::unique_lock g(m, std::adopt_lock); } + + return 0; } diff --git a/libcxx/test/libcxx/thread/thread.mutex/thread_safety_lock_guard.pass.cpp b/libcxx/test/libcxx/thread/thread.mutex/thread_safety_lock_guard.pass.cpp index 58545f8cedb22..8f8b6ce1c33ac 100644 --- a/libcxx/test/libcxx/thread/thread.mutex/thread_safety_lock_guard.pass.cpp +++ b/libcxx/test/libcxx/thread/thread.mutex/thread_safety_lock_guard.pass.cpp @@ -32,8 +32,10 @@ static void scoped() { #endif } -int main() { +int main(int, char**) { scoped(); std::lock_guard lock(m); foo++; + + return 0; } diff --git a/libcxx/test/libcxx/thread/thread.mutex/thread_safety_lock_unlock.pass.cpp b/libcxx/test/libcxx/thread/thread.mutex/thread_safety_lock_unlock.pass.cpp index 5211c5e63b1fd..e29801228627b 100644 --- a/libcxx/test/libcxx/thread/thread.mutex/thread_safety_lock_unlock.pass.cpp +++ b/libcxx/test/libcxx/thread/thread.mutex/thread_safety_lock_unlock.pass.cpp @@ -23,8 +23,10 @@ std::mutex m; int foo __attribute__((guarded_by(m))); -int main() { +int main(int, char**) { m.lock(); foo++; m.unlock(); + + return 0; } diff --git a/libcxx/test/libcxx/thread/thread.mutex/thread_safety_missing_unlock.fail.cpp b/libcxx/test/libcxx/thread/thread.mutex/thread_safety_missing_unlock.fail.cpp index 9479566a9088b..7dd3f5da2990a 100644 --- a/libcxx/test/libcxx/thread/thread.mutex/thread_safety_missing_unlock.fail.cpp +++ b/libcxx/test/libcxx/thread/thread.mutex/thread_safety_missing_unlock.fail.cpp @@ -22,6 +22,8 @@ std::mutex m; -int main() { +int main(int, char**) { m.lock(); + + return 0; } // expected-error {{mutex 'm' is still held at the end of function}} diff --git a/libcxx/test/libcxx/thread/thread.mutex/thread_safety_requires_capability.pass.cpp b/libcxx/test/libcxx/thread/thread.mutex/thread_safety_requires_capability.pass.cpp index 772db283abc87..2e427f217c85a 100644 --- a/libcxx/test/libcxx/thread/thread.mutex/thread_safety_requires_capability.pass.cpp +++ b/libcxx/test/libcxx/thread/thread.mutex/thread_safety_requires_capability.pass.cpp @@ -27,8 +27,10 @@ void increment() __attribute__((requires_capability(m))) { foo++; } -int main() { +int main(int, char**) { m.lock(); increment(); m.unlock(); + + return 0; } diff --git a/libcxx/test/libcxx/thread/thread.mutex/version.pass.cpp b/libcxx/test/libcxx/thread/thread.mutex/version.pass.cpp index c996c1c7a376f..abe4fda96aa14 100644 --- a/libcxx/test/libcxx/thread/thread.mutex/version.pass.cpp +++ b/libcxx/test/libcxx/thread/thread.mutex/version.pass.cpp @@ -14,6 +14,8 @@ #error _LIBCPP_VERSION not defined #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/thread/thread.threads/thread.thread.class/thread.thread.member/native_handle.pass.cpp b/libcxx/test/libcxx/thread/thread.threads/thread.thread.class/thread.thread.member/native_handle.pass.cpp index fa69bec030020..1bf7e521d5cbc 100644 --- a/libcxx/test/libcxx/thread/thread.threads/thread.thread.class/thread.thread.member/native_handle.pass.cpp +++ b/libcxx/test/libcxx/thread/thread.threads/thread.thread.class/thread.thread.member/native_handle.pass.cpp @@ -43,7 +43,7 @@ class G int G::n_alive = 0; bool G::op_run = false; -int main() +int main(int, char**) { { G g; @@ -52,4 +52,6 @@ int main() assert(pid != 0); t0.join(); } + + return 0; } diff --git a/libcxx/test/libcxx/thread/thread.threads/thread.thread.class/types.pass.cpp b/libcxx/test/libcxx/thread/thread.threads/thread.thread.class/types.pass.cpp index 9d021fe16c14a..4f6bd12064b44 100644 --- a/libcxx/test/libcxx/thread/thread.threads/thread.thread.class/types.pass.cpp +++ b/libcxx/test/libcxx/thread/thread.threads/thread.thread.class/types.pass.cpp @@ -21,7 +21,9 @@ #include #include -int main() +int main(int, char**) { static_assert((std::is_same::value), ""); + + return 0; } diff --git a/libcxx/test/libcxx/thread/thread.threads/thread.thread.this/sleep_for.pass.cpp b/libcxx/test/libcxx/thread/thread.threads/thread.thread.this/sleep_for.pass.cpp index 248284ea5131c..f11f40611335b 100644 --- a/libcxx/test/libcxx/thread/thread.threads/thread.thread.this/sleep_for.pass.cpp +++ b/libcxx/test/libcxx/thread/thread.threads/thread.thread.this/sleep_for.pass.cpp @@ -34,7 +34,7 @@ void sig_action(int) {} -int main() +int main(int, char**) { int ec; struct sigaction action; @@ -64,4 +64,6 @@ int main() std::chrono::nanoseconds err = 5 * ms / 100; // The time slept is within 5% of 500ms assert(std::abs(ns.count()) < err.count()); + + return 0; } diff --git a/libcxx/test/libcxx/thread/thread.threads/version.pass.cpp b/libcxx/test/libcxx/thread/thread.threads/version.pass.cpp index 07e6c933f07c3..3d7866228db31 100644 --- a/libcxx/test/libcxx/thread/thread.threads/version.pass.cpp +++ b/libcxx/test/libcxx/thread/thread.threads/version.pass.cpp @@ -16,6 +16,8 @@ #error _LIBCPP_VERSION not defined #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/type_traits/convert_to_integral.pass.cpp b/libcxx/test/libcxx/type_traits/convert_to_integral.pass.cpp index 155f985d1530b..08b6b5e8b2aa4 100644 --- a/libcxx/test/libcxx/type_traits/convert_to_integral.pass.cpp +++ b/libcxx/test/libcxx/type_traits/convert_to_integral.pass.cpp @@ -79,7 +79,7 @@ enum enum2 : unsigned long { value = std::numeric_limits::max() }; -int main() +int main(int, char**) { check_integral_types(); check_integral_types(); @@ -105,4 +105,6 @@ int main() check_enum_types(); typedef std::underlying_type::type Enum2UT; check_enum_types(); + + return 0; } diff --git a/libcxx/test/libcxx/type_traits/lazy_metafunctions.pass.cpp b/libcxx/test/libcxx/type_traits/lazy_metafunctions.pass.cpp index 84e80afe44a1b..2ea1d6891f7b0 100644 --- a/libcxx/test/libcxx/type_traits/lazy_metafunctions.pass.cpp +++ b/libcxx/test/libcxx/type_traits/lazy_metafunctions.pass.cpp @@ -128,9 +128,11 @@ void LazyOrTest() { } -int main() { +int main(int, char**) { LazyEnableIfTest(); LazyNotTest(); LazyAndTest(); LazyOrTest(); + + return 0; } diff --git a/libcxx/test/libcxx/utilities/any/size_and_alignment.pass.cpp b/libcxx/test/libcxx/utilities/any/size_and_alignment.pass.cpp index 99ff5327309aa..4e3646660c42b 100644 --- a/libcxx/test/libcxx/utilities/any/size_and_alignment.pass.cpp +++ b/libcxx/test/libcxx/utilities/any/size_and_alignment.pass.cpp @@ -14,9 +14,11 @@ #include -int main() +int main(int, char**) { using std::any; static_assert(sizeof(any) == sizeof(void*)*4, ""); static_assert(alignof(any) == alignof(void*), ""); + + return 0; } diff --git a/libcxx/test/libcxx/utilities/any/small_type.pass.cpp b/libcxx/test/libcxx/utilities/any/small_type.pass.cpp index f4cd46fdb7cb1..9df6efc1402de 100644 --- a/libcxx/test/libcxx/utilities/any/small_type.pass.cpp +++ b/libcxx/test/libcxx/utilities/any/small_type.pass.cpp @@ -54,7 +54,7 @@ struct alignas(DoubleBufferAlignment) OverSizeAndAlignedType { char buff[BufferSize + 1]; }; -int main() +int main(int, char**) { using std::any; using std::__any_imp::_IsSmallObject; @@ -110,4 +110,6 @@ int main() static_assert(alignof(T) > BufferAlignment, ""); static_assert(!_IsSmallObject::value, ""); } + + return 0; } diff --git a/libcxx/test/libcxx/utilities/any/version.pass.cpp b/libcxx/test/libcxx/utilities/any/version.pass.cpp index 75e4544efe0d2..ee5bc9928e1f1 100644 --- a/libcxx/test/libcxx/utilities/any/version.pass.cpp +++ b/libcxx/test/libcxx/utilities/any/version.pass.cpp @@ -14,6 +14,8 @@ #error _LIBCPP_VERSION not defined #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/utilities/function.objects/func.require/bullet_1_2_3.pass.cpp b/libcxx/test/libcxx/utilities/function.objects/func.require/bullet_1_2_3.pass.cpp index b2946ab815b2f..28ee3a39afeec 100644 --- a/libcxx/test/libcxx/utilities/function.objects/func.require/bullet_1_2_3.pass.cpp +++ b/libcxx/test/libcxx/utilities/function.objects/func.require/bullet_1_2_3.pass.cpp @@ -271,7 +271,7 @@ void test_derived_from_ref_wrap() { } #endif -int main() { +int main(int, char**) { typedef void*& R; typedef ArgType A; TestCase::run(); @@ -367,4 +367,6 @@ int main() { test_derived_from_ref_wrap(); #endif + + return 0; } diff --git a/libcxx/test/libcxx/utilities/function.objects/func.require/bullet_4_5_6.pass.cpp b/libcxx/test/libcxx/utilities/function.objects/func.require/bullet_4_5_6.pass.cpp index 15ab7adb499f4..ff7549d29c9af 100644 --- a/libcxx/test/libcxx/utilities/function.objects/func.require/bullet_4_5_6.pass.cpp +++ b/libcxx/test/libcxx/utilities/function.objects/func.require/bullet_4_5_6.pass.cpp @@ -206,10 +206,12 @@ struct TestCase { -int main() { +int main(int, char**) { TestCase::run(); TestCase::run(); TestCase::run(); TestCase::run(); TestCase::run(); + + return 0; } diff --git a/libcxx/test/libcxx/utilities/function.objects/func.require/bullet_7.pass.cpp b/libcxx/test/libcxx/utilities/function.objects/func.require/bullet_7.pass.cpp index 469452706ff67..fb789fa0a86cc 100644 --- a/libcxx/test/libcxx/utilities/function.objects/func.require/bullet_7.pass.cpp +++ b/libcxx/test/libcxx/utilities/function.objects/func.require/bullet_7.pass.cpp @@ -247,7 +247,7 @@ void runTestCase() { runFunctorTestCase (); }; -int main() { +int main(int, char**) { typedef void*& R; typedef ArgType A; typedef A const CA; @@ -323,4 +323,6 @@ int main() { runFunctorTestCase11(); } #endif + + return 0; } diff --git a/libcxx/test/libcxx/utilities/function.objects/func.require/invoke.pass.cpp b/libcxx/test/libcxx/utilities/function.objects/func.require/invoke.pass.cpp index acc0c778f2e80..e534553a87f04 100644 --- a/libcxx/test/libcxx/utilities/function.objects/func.require/invoke.pass.cpp +++ b/libcxx/test/libcxx/utilities/function.objects/func.require/invoke.pass.cpp @@ -31,7 +31,7 @@ struct Type #endif }; -int main() +int main(int, char**) { static_assert(sizeof(std::__invoke(&Type::f1, std::declval())) == 1, ""); static_assert(sizeof(std::__invoke(&Type::f2, std::declval())) == 2, ""); @@ -41,4 +41,6 @@ int main() static_assert(sizeof(std::__invoke(&Type::g3, std::declval())) == 3, ""); static_assert(sizeof(std::__invoke(&Type::g4, std::declval())) == 4, ""); #endif + + return 0; } diff --git a/libcxx/test/libcxx/utilities/function.objects/refwrap/binary.pass.cpp b/libcxx/test/libcxx/utilities/function.objects/refwrap/binary.pass.cpp index de0b9508ab0db..1f5bbcdef3ba8 100644 --- a/libcxx/test/libcxx/utilities/function.objects/refwrap/binary.pass.cpp +++ b/libcxx/test/libcxx/utilities/function.objects/refwrap/binary.pass.cpp @@ -46,7 +46,7 @@ struct C typedef int result_type; }; -int main() +int main(int, char**) { static_assert((!std::is_base_of, std::reference_wrapper >::value), ""); @@ -76,4 +76,6 @@ int main() std::reference_wrapper >::value), ""); static_assert((std::is_base_of, std::reference_wrapper >::value), ""); + + return 0; } diff --git a/libcxx/test/libcxx/utilities/function.objects/refwrap/unary.pass.cpp b/libcxx/test/libcxx/utilities/function.objects/refwrap/unary.pass.cpp index 27e2763db0706..429722e4711ec 100644 --- a/libcxx/test/libcxx/utilities/function.objects/refwrap/unary.pass.cpp +++ b/libcxx/test/libcxx/utilities/function.objects/refwrap/unary.pass.cpp @@ -46,7 +46,7 @@ struct C typedef int result_type; }; -int main() +int main(int, char**) { static_assert((std::is_base_of, std::reference_wrapper >::value), ""); @@ -74,4 +74,6 @@ int main() std::reference_wrapper >::value), ""); static_assert((!std::is_base_of, std::reference_wrapper >::value), ""); + + return 0; } diff --git a/libcxx/test/libcxx/utilities/function.objects/unord.hash/murmur2_or_cityhash_ubsan_unsigned_overflow_ignored.pass.cpp b/libcxx/test/libcxx/utilities/function.objects/unord.hash/murmur2_or_cityhash_ubsan_unsigned_overflow_ignored.pass.cpp index 7241bc059ce29..54f4db7644605 100644 --- a/libcxx/test/libcxx/utilities/function.objects/unord.hash/murmur2_or_cityhash_ubsan_unsigned_overflow_ignored.pass.cpp +++ b/libcxx/test/libcxx/utilities/function.objects/unord.hash/murmur2_or_cityhash_ubsan_unsigned_overflow_ignored.pass.cpp @@ -28,7 +28,7 @@ void test(const void* key, int len) { } } -int main() { +int main(int, char**) { const std::string TestCases[] = { "abcdaoeuaoeclaoeoaeuaoeuaousaotehu]+}sthoasuthaoesutahoesutaohesutaoeusaoetuhasoetuhaoseutaoseuthaoesutaohes" "00000000000000000000000000000000000000000000000000000000000000000000000", @@ -37,4 +37,6 @@ int main() { const size_t NumCases = sizeof(TestCases)/sizeof(TestCases[0]); for (size_t i=0; i < NumCases; ++i) test(TestCases[i].data(), TestCases[i].length()); + + return 0; } diff --git a/libcxx/test/libcxx/utilities/function.objects/version.pass.cpp b/libcxx/test/libcxx/utilities/function.objects/version.pass.cpp index 41bbca6f638a6..6f8540f1a2425 100644 --- a/libcxx/test/libcxx/utilities/function.objects/version.pass.cpp +++ b/libcxx/test/libcxx/utilities/function.objects/version.pass.cpp @@ -14,6 +14,8 @@ #error _LIBCPP_VERSION not defined #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/utilities/memory/util.dynamic.safety/get_pointer_safety_cxx03.pass.cpp b/libcxx/test/libcxx/utilities/memory/util.dynamic.safety/get_pointer_safety_cxx03.pass.cpp index d0410c51bdcaf..deab4368af29f 100644 --- a/libcxx/test/libcxx/utilities/memory/util.dynamic.safety/get_pointer_safety_cxx03.pass.cpp +++ b/libcxx/test/libcxx/utilities/memory/util.dynamic.safety/get_pointer_safety_cxx03.pass.cpp @@ -28,7 +28,7 @@ void test_pr26961() { } #endif -int main() +int main(int, char**) { #ifndef TEST_IS_UNSUPPORTED { @@ -42,4 +42,6 @@ int main() test_pr26961(); } #endif + + return 0; } diff --git a/libcxx/test/libcxx/utilities/memory/util.dynamic.safety/get_pointer_safety_new_abi.pass.cpp b/libcxx/test/libcxx/utilities/memory/util.dynamic.safety/get_pointer_safety_new_abi.pass.cpp index 2ff19d45e4259..c8e0c7292998e 100644 --- a/libcxx/test/libcxx/utilities/memory/util.dynamic.safety/get_pointer_safety_new_abi.pass.cpp +++ b/libcxx/test/libcxx/utilities/memory/util.dynamic.safety/get_pointer_safety_new_abi.pass.cpp @@ -18,7 +18,7 @@ #include #include -int main() +int main(int, char**) { { static_assert(std::is_enum::value, ""); @@ -34,4 +34,6 @@ int main() r == std::pointer_safety::preferred || r == std::pointer_safety::strict); } + + return 0; } diff --git a/libcxx/test/libcxx/utilities/memory/util.smartptr/race_condition.pass.cpp b/libcxx/test/libcxx/utilities/memory/util.smartptr/race_condition.pass.cpp index e3091aa5a2314..bf12e145942b6 100644 --- a/libcxx/test/libcxx/utilities/memory/util.smartptr/race_condition.pass.cpp +++ b/libcxx/test/libcxx/utilities/memory/util.smartptr/race_condition.pass.cpp @@ -77,7 +77,7 @@ void run_test(Ptr p) { assert(p.use_count() == 3); } -int main() { +int main(int, char**) { { // Test with out-of-place shared_count. Ptr p(new int(42)); @@ -91,4 +91,6 @@ int main() { run_test(p); assert(p.use_count() == 1); } + + return 0; } diff --git a/libcxx/test/libcxx/utilities/memory/util.smartptr/util.smartptr.shared/function_type_default_deleter.fail.cpp b/libcxx/test/libcxx/utilities/memory/util.smartptr/util.smartptr.shared/function_type_default_deleter.fail.cpp index c94ce75fe6857..e9b4257a7240a 100644 --- a/libcxx/test/libcxx/utilities/memory/util.smartptr/util.smartptr.shared/function_type_default_deleter.fail.cpp +++ b/libcxx/test/libcxx/utilities/memory/util.smartptr/util.smartptr.shared/function_type_default_deleter.fail.cpp @@ -29,7 +29,7 @@ struct Deleter { } }; -int main() { +int main(int, char**) { { SPtr<0> s; // OK SPtr<1> s1(nullptr); // OK @@ -41,4 +41,6 @@ int main() { SPtr<4> s4(getFn<4>()); // expected-note {{requested here}} SPtr<5> s5(getFn<5>(), std::default_delete>{}); // expected-note {{requested here}} } + + return 0; } diff --git a/libcxx/test/libcxx/utilities/memory/version.pass.cpp b/libcxx/test/libcxx/utilities/memory/version.pass.cpp index e5359a5d4c794..5b10e1425f5ec 100644 --- a/libcxx/test/libcxx/utilities/memory/version.pass.cpp +++ b/libcxx/test/libcxx/utilities/memory/version.pass.cpp @@ -14,6 +14,8 @@ #error _LIBCPP_VERSION not defined #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/utilities/meta/is_referenceable.pass.cpp b/libcxx/test/libcxx/utilities/meta/is_referenceable.pass.cpp index 376f295d1f31d..bdd0a4574b095 100644 --- a/libcxx/test/libcxx/utilities/meta/is_referenceable.pass.cpp +++ b/libcxx/test/libcxx/utilities/meta/is_referenceable.pass.cpp @@ -189,4 +189,6 @@ static_assert(( std::__is_referenceable::value), ""); #endif -int main () {} +int main(int, char**) { + return 0; +} diff --git a/libcxx/test/libcxx/utilities/meta/meta.unary/meta.unary.prop/__has_operator_addressof.pass.cpp b/libcxx/test/libcxx/utilities/meta/meta.unary/meta.unary.prop/__has_operator_addressof.pass.cpp index 010f8f48dd1d5..80bd2e73861ae 100644 --- a/libcxx/test/libcxx/utilities/meta/meta.unary/meta.unary.prop/__has_operator_addressof.pass.cpp +++ b/libcxx/test/libcxx/utilities/meta/meta.unary/meta.unary.prop/__has_operator_addressof.pass.cpp @@ -55,7 +55,7 @@ struct J }; -int main() +int main(int, char**) { static_assert(std::__has_operator_addressof::value == false, ""); static_assert(std::__has_operator_addressof::value == false, ""); @@ -65,4 +65,6 @@ int main() static_assert(std::__has_operator_addressof::value == true, ""); static_assert(std::__has_operator_addressof::value == true, ""); static_assert(std::__has_operator_addressof::value == true, ""); + + return 0; } diff --git a/libcxx/test/libcxx/utilities/meta/meta.unary/meta.unary.prop/missing_is_aggregate_trait.fail.cpp b/libcxx/test/libcxx/utilities/meta/meta.unary/meta.unary.prop/missing_is_aggregate_trait.fail.cpp index 0be653d7fd9b1..8606769ee1b6c 100644 --- a/libcxx/test/libcxx/utilities/meta/meta.unary/meta.unary.prop/missing_is_aggregate_trait.fail.cpp +++ b/libcxx/test/libcxx/utilities/meta/meta.unary/meta.unary.prop/missing_is_aggregate_trait.fail.cpp @@ -15,7 +15,7 @@ #include -int main () +int main(int, char**) { #ifdef _LIBCPP_HAS_NO_IS_AGGREGATE // This should not compile when _LIBCPP_HAS_NO_IS_AGGREGATE is defined. @@ -24,4 +24,6 @@ int main () #else #error Forcing failure... #endif + + return 0; } diff --git a/libcxx/test/libcxx/utilities/meta/version.pass.cpp b/libcxx/test/libcxx/utilities/meta/version.pass.cpp index 831ca6672febc..7f4cbd841dd81 100644 --- a/libcxx/test/libcxx/utilities/meta/version.pass.cpp +++ b/libcxx/test/libcxx/utilities/meta/version.pass.cpp @@ -14,6 +14,8 @@ #error _LIBCPP_VERSION not defined #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/utilities/optional/optional.object/optional.object.assign/copy.pass.cpp b/libcxx/test/libcxx/utilities/optional/optional.object/optional.object.assign/copy.pass.cpp index 47fb9d5ad1737..1f559904c88d4 100644 --- a/libcxx/test/libcxx/utilities/optional/optional.object/optional.object.assign/copy.pass.cpp +++ b/libcxx/test/libcxx/utilities/optional/optional.object/optional.object.assign/copy.pass.cpp @@ -53,7 +53,7 @@ test() return true; } -int main() +int main(int, char**) { { using T = int; @@ -70,4 +70,6 @@ int main() static_assert(!(std::is_copy_assignable>::value), ""); static_assert(!(std::is_copy_assignable>::value), ""); + + return 0; } diff --git a/libcxx/test/libcxx/utilities/optional/optional.object/optional.object.assign/move.pass.cpp b/libcxx/test/libcxx/utilities/optional/optional.object/optional.object.assign/move.pass.cpp index 5063d69c3f1e6..325bcb452a0fa 100644 --- a/libcxx/test/libcxx/utilities/optional/optional.object/optional.object.assign/move.pass.cpp +++ b/libcxx/test/libcxx/utilities/optional/optional.object/optional.object.assign/move.pass.cpp @@ -50,7 +50,7 @@ test() return true; } -int main() +int main(int, char**) { { using T = int; @@ -67,4 +67,6 @@ int main() static_assert(!(std::is_move_assignable>::value), ""); static_assert(!(std::is_move_assignable>::value), ""); + + return 0; } diff --git a/libcxx/test/libcxx/utilities/optional/optional.object/optional.object.ctor/copy.pass.cpp b/libcxx/test/libcxx/utilities/optional/optional.object/optional.object.ctor/copy.pass.cpp index 50e27e99e6f92..694ab01569cb2 100644 --- a/libcxx/test/libcxx/utilities/optional/optional.object/optional.object.ctor/copy.pass.cpp +++ b/libcxx/test/libcxx/utilities/optional/optional.object/optional.object.ctor/copy.pass.cpp @@ -35,7 +35,7 @@ struct Z Z& operator=(const Z&) = delete; }; -int main() +int main(int, char**) { { using T = int; @@ -55,4 +55,6 @@ int main() static_assert(!(std::is_trivially_copy_constructible>::value), ""); static_assert(!(std::is_copy_constructible>::value), ""); + + return 0; } diff --git a/libcxx/test/libcxx/utilities/optional/optional.object/optional.object.ctor/move.pass.cpp b/libcxx/test/libcxx/utilities/optional/optional.object/optional.object.ctor/move.pass.cpp index ff66a1ea9bb6e..383eaa98649be 100644 --- a/libcxx/test/libcxx/utilities/optional/optional.object/optional.object.ctor/move.pass.cpp +++ b/libcxx/test/libcxx/utilities/optional/optional.object/optional.object.ctor/move.pass.cpp @@ -36,7 +36,7 @@ struct Z Z& operator=(const Z&) = delete; }; -int main() +int main(int, char**) { { using T = int; @@ -56,4 +56,6 @@ int main() static_assert(!(std::is_trivially_move_constructible>::value), ""); static_assert(!(std::is_move_constructible>::value), ""); + + return 0; } diff --git a/libcxx/test/libcxx/utilities/optional/optional.object/triviality.abi.pass.cpp b/libcxx/test/libcxx/utilities/optional/optional.object/triviality.abi.pass.cpp index d09af830fa072..36f5bb9373921 100644 --- a/libcxx/test/libcxx/utilities/optional/optional.object/triviality.abi.pass.cpp +++ b/libcxx/test/libcxx/utilities/optional/optional.object/triviality.abi.pass.cpp @@ -85,7 +85,7 @@ struct TrivialCopyNonTrivialMove { TrivialCopyNonTrivialMove& operator=(TrivialCopyNonTrivialMove&&) { return *this; } }; -int main() +int main(int, char**) { sink( ImplicitTypes::ApplyTypes{}, @@ -94,4 +94,6 @@ int main() NonTrivialTypes::ApplyTypes{}, DoTestsMetafunction{} ); + + return 0; } diff --git a/libcxx/test/libcxx/utilities/optional/version.pass.cpp b/libcxx/test/libcxx/utilities/optional/version.pass.cpp index 7dc36057c7c52..49b263a37e587 100644 --- a/libcxx/test/libcxx/utilities/optional/version.pass.cpp +++ b/libcxx/test/libcxx/utilities/optional/version.pass.cpp @@ -14,6 +14,8 @@ #error _LIBCPP_VERSION not defined #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/utilities/ratio/version.pass.cpp b/libcxx/test/libcxx/utilities/ratio/version.pass.cpp index a38c07515078f..112111c37bfd5 100644 --- a/libcxx/test/libcxx/utilities/ratio/version.pass.cpp +++ b/libcxx/test/libcxx/utilities/ratio/version.pass.cpp @@ -14,6 +14,8 @@ #error _LIBCPP_VERSION not defined #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/utilities/template.bitset/includes.pass.cpp b/libcxx/test/libcxx/utilities/template.bitset/includes.pass.cpp index 78c39989f3af1..3ec17b079ebc8 100644 --- a/libcxx/test/libcxx/utilities/template.bitset/includes.pass.cpp +++ b/libcxx/test/libcxx/utilities/template.bitset/includes.pass.cpp @@ -26,6 +26,8 @@ #error has not been included #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/utilities/template.bitset/version.pass.cpp b/libcxx/test/libcxx/utilities/template.bitset/version.pass.cpp index 9cb31d5fe8adc..94df4d1bab99e 100644 --- a/libcxx/test/libcxx/utilities/template.bitset/version.pass.cpp +++ b/libcxx/test/libcxx/utilities/template.bitset/version.pass.cpp @@ -14,6 +14,8 @@ #error _LIBCPP_VERSION not defined #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/utilities/time/date.time/asctime.thread-unsafe.fail.cpp b/libcxx/test/libcxx/utilities/time/date.time/asctime.thread-unsafe.fail.cpp index 8ea12b712b4f5..ed49ac28693e9 100644 --- a/libcxx/test/libcxx/utilities/time/date.time/asctime.thread-unsafe.fail.cpp +++ b/libcxx/test/libcxx/utilities/time/date.time/asctime.thread-unsafe.fail.cpp @@ -10,8 +10,10 @@ #include -int main() { +int main(int, char**) { // asctime is not thread-safe. std::time_t t = 0; std::asctime(&t); + + return 0; } diff --git a/libcxx/test/libcxx/utilities/time/date.time/ctime.thread-unsafe.fail.cpp b/libcxx/test/libcxx/utilities/time/date.time/ctime.thread-unsafe.fail.cpp index 3e1986bf46cad..741de667e9e70 100644 --- a/libcxx/test/libcxx/utilities/time/date.time/ctime.thread-unsafe.fail.cpp +++ b/libcxx/test/libcxx/utilities/time/date.time/ctime.thread-unsafe.fail.cpp @@ -10,8 +10,10 @@ #include -int main() { +int main(int, char**) { // ctime is not thread-safe. std::time_t t = 0; std::ctime(&t); + + return 0; } diff --git a/libcxx/test/libcxx/utilities/time/date.time/gmtime.thread-unsafe.fail.cpp b/libcxx/test/libcxx/utilities/time/date.time/gmtime.thread-unsafe.fail.cpp index 979c92fbd1fde..ce7f782036b6e 100644 --- a/libcxx/test/libcxx/utilities/time/date.time/gmtime.thread-unsafe.fail.cpp +++ b/libcxx/test/libcxx/utilities/time/date.time/gmtime.thread-unsafe.fail.cpp @@ -10,8 +10,10 @@ #include -int main() { +int main(int, char**) { // gmtime is not thread-safe. std::time_t t = 0; std::gmtime(&t); + + return 0; } diff --git a/libcxx/test/libcxx/utilities/time/date.time/localtime.thread-unsafe.fail.cpp b/libcxx/test/libcxx/utilities/time/date.time/localtime.thread-unsafe.fail.cpp index a68a5c33f044e..8f803d91c0c84 100644 --- a/libcxx/test/libcxx/utilities/time/date.time/localtime.thread-unsafe.fail.cpp +++ b/libcxx/test/libcxx/utilities/time/date.time/localtime.thread-unsafe.fail.cpp @@ -10,8 +10,10 @@ #include -int main() { +int main(int, char**) { // localtime is not thread-safe. std::time_t t = 0; std::localtime(&t); + + return 0; } diff --git a/libcxx/test/libcxx/utilities/time/version.pass.cpp b/libcxx/test/libcxx/utilities/time/version.pass.cpp index 2e3373711202f..d1093dd4afcf6 100644 --- a/libcxx/test/libcxx/utilities/time/version.pass.cpp +++ b/libcxx/test/libcxx/utilities/time/version.pass.cpp @@ -14,6 +14,8 @@ #error _LIBCPP_VERSION not defined #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/utilities/tuple/tuple.tuple/empty_member.pass.cpp b/libcxx/test/libcxx/utilities/tuple/tuple.tuple/empty_member.pass.cpp index 76cb442b268f1..20938208794e5 100644 --- a/libcxx/test/libcxx/utilities/tuple/tuple.tuple/empty_member.pass.cpp +++ b/libcxx/test/libcxx/utilities/tuple/tuple.tuple/empty_member.pass.cpp @@ -20,7 +20,7 @@ struct A {}; struct B {}; -int main() +int main(int, char**) { { typedef std::tuple T; @@ -42,4 +42,6 @@ int main() typedef std::tuple T; static_assert((sizeof(T) == sizeof(int)), ""); } + + return 0; } diff --git a/libcxx/test/libcxx/utilities/tuple/tuple.tuple/tuple.cnstr/PR20855_tuple_ref_binding_diagnostics.fail.cpp b/libcxx/test/libcxx/utilities/tuple/tuple.tuple/tuple.cnstr/PR20855_tuple_ref_binding_diagnostics.fail.cpp index d1a371b5defc6..a4c43ba5d2aa5 100644 --- a/libcxx/test/libcxx/utilities/tuple/tuple.tuple/tuple.cnstr/PR20855_tuple_ref_binding_diagnostics.fail.cpp +++ b/libcxx/test/libcxx/utilities/tuple/tuple.tuple/tuple.cnstr/PR20855_tuple_ref_binding_diagnostics.fail.cpp @@ -43,7 +43,7 @@ template void F(typename CannotDeduce>::type const&) {} -int main() { +int main(int, char**) { #if TEST_HAS_BUILTIN_IDENTIFIER(__reference_binds_to_temporary) // Test that we emit our diagnostic from the library. // expected-error@tuple:* 8 {{"Attempted construction of reference element binds to a temporary whose lifetime has ended"}} @@ -81,4 +81,6 @@ int main() { #error force failure // expected-error@-1 {{force failure}} #endif + + return 0; } diff --git a/libcxx/test/libcxx/utilities/tuple/tuple.tuple/tuple.cnstr/disable_reduced_arity_initialization_extension.pass.cpp b/libcxx/test/libcxx/utilities/tuple/tuple.tuple/tuple.cnstr/disable_reduced_arity_initialization_extension.pass.cpp index 2eb85c6660876..8e4cb52bf18f7 100644 --- a/libcxx/test/libcxx/utilities/tuple/tuple.tuple/tuple.cnstr/disable_reduced_arity_initialization_extension.pass.cpp +++ b/libcxx/test/libcxx/utilities/tuple/tuple.tuple/tuple.cnstr/disable_reduced_arity_initialization_extension.pass.cpp @@ -77,7 +77,7 @@ void test_example_from_docs() { assert(std::get<2>(tup) == std::error_code{}); } -int main() +int main(int, char**) { { using E = MoveOnly; @@ -104,4 +104,6 @@ int main() // constructor extensions. test_default_constructible_extension_sfinae(); test_example_from_docs(); + + return 0; } diff --git a/libcxx/test/libcxx/utilities/tuple/tuple.tuple/tuple.cnstr/enable_reduced_arity_initialization_extension.pass.cpp b/libcxx/test/libcxx/utilities/tuple/tuple.tuple/tuple.cnstr/enable_reduced_arity_initialization_extension.pass.cpp index 12d2268550e25..f012d4c5fa497 100644 --- a/libcxx/test/libcxx/utilities/tuple/tuple.tuple/tuple.cnstr/enable_reduced_arity_initialization_extension.pass.cpp +++ b/libcxx/test/libcxx/utilities/tuple/tuple.tuple/tuple.cnstr/enable_reduced_arity_initialization_extension.pass.cpp @@ -89,7 +89,7 @@ void test_example_from_docs() { assert(std::get<2>(tup) == std::error_code{}); } -int main() +int main(int, char**) { { @@ -113,4 +113,6 @@ int main() // constructor extensions. test_default_constructible_extension_sfinae(); test_example_from_docs(); + + return 0; } diff --git a/libcxx/test/libcxx/utilities/tuple/version.pass.cpp b/libcxx/test/libcxx/utilities/tuple/version.pass.cpp index 8149eb07e0583..28232a99b13f7 100644 --- a/libcxx/test/libcxx/utilities/tuple/version.pass.cpp +++ b/libcxx/test/libcxx/utilities/tuple/version.pass.cpp @@ -14,6 +14,8 @@ #error _LIBCPP_VERSION not defined #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/utilities/type.index/version.pass.cpp b/libcxx/test/libcxx/utilities/type.index/version.pass.cpp index 94a1ebf43cf57..38cd0254a5803 100644 --- a/libcxx/test/libcxx/utilities/type.index/version.pass.cpp +++ b/libcxx/test/libcxx/utilities/type.index/version.pass.cpp @@ -14,6 +14,8 @@ #error _LIBCPP_VERSION not defined #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/utilities/utility/__is_inplace_index.pass.cpp b/libcxx/test/libcxx/utilities/utility/__is_inplace_index.pass.cpp index 8530820127442..a2559f208f37c 100644 --- a/libcxx/test/libcxx/utilities/utility/__is_inplace_index.pass.cpp +++ b/libcxx/test/libcxx/utilities/utility/__is_inplace_index.pass.cpp @@ -14,7 +14,7 @@ struct S {}; -int main() { +int main(int, char**) { using I = std::in_place_index_t<0>; static_assert( std::__is_inplace_index::value, ""); static_assert( std::__is_inplace_index::value, ""); @@ -30,4 +30,6 @@ int main() { static_assert(!std::__is_inplace_index::value, ""); static_assert(!std::__is_inplace_index::value, ""); static_assert(!std::__is_inplace_index::value, ""); + + return 0; } diff --git a/libcxx/test/libcxx/utilities/utility/__is_inplace_type.pass.cpp b/libcxx/test/libcxx/utilities/utility/__is_inplace_type.pass.cpp index 9a6739c275360..534fb50592660 100644 --- a/libcxx/test/libcxx/utilities/utility/__is_inplace_type.pass.cpp +++ b/libcxx/test/libcxx/utilities/utility/__is_inplace_type.pass.cpp @@ -14,7 +14,7 @@ struct S {}; -int main() { +int main(int, char**) { using T = std::in_place_type_t; static_assert( std::__is_inplace_type::value, ""); static_assert( std::__is_inplace_type::value, ""); @@ -30,4 +30,6 @@ int main() { static_assert(!std::__is_inplace_type::value, ""); static_assert(!std::__is_inplace_type::value, ""); static_assert(!std::__is_inplace_type::value, ""); + + return 0; } diff --git a/libcxx/test/libcxx/utilities/utility/pairs/pairs.pair/U_V.pass.cpp b/libcxx/test/libcxx/utilities/utility/pairs/pairs.pair/U_V.pass.cpp index 6e65d9b5289ec..e03fa6d7f3d39 100644 --- a/libcxx/test/libcxx/utilities/utility/pairs/pairs.pair/U_V.pass.cpp +++ b/libcxx/test/libcxx/utilities/utility/pairs/pairs.pair/U_V.pass.cpp @@ -37,7 +37,7 @@ struct ImplicitNothrowT { int value; }; -int main() { +int main(int, char**) { { // explicit noexcept test static_assert(!std::is_nothrow_constructible, int, int>::value, ""); static_assert(!std::is_nothrow_constructible, int, int>::value, ""); @@ -50,4 +50,6 @@ int main() { static_assert(!std::is_nothrow_constructible, int, int>::value, ""); static_assert( std::is_nothrow_constructible, int, int>::value, ""); } + + return 0; } diff --git a/libcxx/test/libcxx/utilities/utility/pairs/pairs.pair/assign_tuple_like.pass.cpp b/libcxx/test/libcxx/utilities/utility/pairs/pairs.pair/assign_tuple_like.pass.cpp index 17a2b5a41ec02..5765700fe1360 100644 --- a/libcxx/test/libcxx/utilities/utility/pairs/pairs.pair/assign_tuple_like.pass.cpp +++ b/libcxx/test/libcxx/utilities/utility/pairs/pairs.pair/assign_tuple_like.pass.cpp @@ -27,7 +27,7 @@ #pragma clang diagnostic ignored "-Wmissing-braces" #endif -int main() +int main(int, char**) { using C = TestTypes::TestType; { @@ -100,4 +100,6 @@ int main() assert(p.first.value == 42); assert(p.second.value == -42); } + + return 0; } diff --git a/libcxx/test/libcxx/utilities/utility/pairs/pairs.pair/const_first_const_second.pass.cpp b/libcxx/test/libcxx/utilities/utility/pairs/pairs.pair/const_first_const_second.pass.cpp index 923bd0dd64ab5..a2fac173ec7cc 100644 --- a/libcxx/test/libcxx/utilities/utility/pairs/pairs.pair/const_first_const_second.pass.cpp +++ b/libcxx/test/libcxx/utilities/utility/pairs/pairs.pair/const_first_const_second.pass.cpp @@ -37,7 +37,7 @@ struct ImplicitNothrowT { ImplicitNothrowT(ImplicitNothrowT const&) noexcept {} }; -int main() { +int main(int, char**) { { // explicit noexcept test static_assert(!std::is_nothrow_constructible, ExplicitT const&, ExplicitT const&>::value, ""); @@ -58,4 +58,6 @@ int main() { static_assert( std::is_nothrow_constructible, ImplicitNothrowT const&, ImplicitNothrowT const&>::value, ""); } + + return 0; } diff --git a/libcxx/test/libcxx/utilities/utility/pairs/pairs.pair/const_pair_U_V.pass.cpp b/libcxx/test/libcxx/utilities/utility/pairs/pairs.pair/const_pair_U_V.pass.cpp index 68d294bd68c4e..16d714ab9a7ed 100644 --- a/libcxx/test/libcxx/utilities/utility/pairs/pairs.pair/const_pair_U_V.pass.cpp +++ b/libcxx/test/libcxx/utilities/utility/pairs/pairs.pair/const_pair_U_V.pass.cpp @@ -39,7 +39,7 @@ struct ImplicitNothrowT { int value; }; -int main() { +int main(int, char**) { { // explicit noexcept test static_assert(!std::is_nothrow_constructible, std::pair const&>::value, ""); @@ -60,4 +60,6 @@ int main() { static_assert( std::is_nothrow_constructible, std::pair const&>::value, ""); } + + return 0; } diff --git a/libcxx/test/libcxx/utilities/utility/pairs/pairs.pair/default.pass.cpp b/libcxx/test/libcxx/utilities/utility/pairs/pairs.pair/default.pass.cpp index efd7fcb40e2ca..a7f0f87645251 100644 --- a/libcxx/test/libcxx/utilities/utility/pairs/pairs.pair/default.pass.cpp +++ b/libcxx/test/libcxx/utilities/utility/pairs/pairs.pair/default.pass.cpp @@ -26,10 +26,12 @@ struct NonThrowingDefault { NonThrowingDefault() noexcept { } }; -int main() { +int main(int, char**) { static_assert(!std::is_nothrow_default_constructible>::value, ""); static_assert(!std::is_nothrow_default_constructible>::value, ""); static_assert(!std::is_nothrow_default_constructible>::value, ""); static_assert( std::is_nothrow_default_constructible>::value, ""); + + return 0; } diff --git a/libcxx/test/libcxx/utilities/utility/pairs/pairs.pair/non_trivial_copy_move_ABI.pass.cpp b/libcxx/test/libcxx/utilities/utility/pairs/pairs.pair/non_trivial_copy_move_ABI.pass.cpp index 076505b46a213..00c1910a3ed17 100644 --- a/libcxx/test/libcxx/utilities/utility/pairs/pairs.pair/non_trivial_copy_move_ABI.pass.cpp +++ b/libcxx/test/libcxx/utilities/utility/pairs/pairs.pair/non_trivial_copy_move_ABI.pass.cpp @@ -158,7 +158,8 @@ void test_layout() { static_assert(offsetof(PairT, first) == 0, ""); } -int main() { +int main(int, char**) { test_trivial(); test_layout(); + return 0; } diff --git a/libcxx/test/libcxx/utilities/utility/pairs/pairs.pair/pair.tuple_element.fail.cpp b/libcxx/test/libcxx/utilities/utility/pairs/pairs.pair/pair.tuple_element.fail.cpp index fa5f2b6d5ef9c..5be63dd92c207 100644 --- a/libcxx/test/libcxx/utilities/utility/pairs/pairs.pair/pair.tuple_element.fail.cpp +++ b/libcxx/test/libcxx/utilities/utility/pairs/pairs.pair/pair.tuple_element.fail.cpp @@ -14,11 +14,13 @@ #include -int main() +int main(int, char**) { { typedef std::pair P; std::tuple_element<2, P>::type foo; // expected-note {{requested here}} // expected-error-re@utility:* {{static_assert failed{{( due to requirement '2U[L]{0,2} < 2')?}} "Index out of bounds in std::tuple_element>"}} } + + return 0; } diff --git a/libcxx/test/libcxx/utilities/utility/pairs/pairs.pair/piecewise.pass.cpp b/libcxx/test/libcxx/utilities/utility/pairs/pairs.pair/piecewise.pass.cpp index 2c636182f41e6..e4c953840129e 100644 --- a/libcxx/test/libcxx/utilities/utility/pairs/pairs.pair/piecewise.pass.cpp +++ b/libcxx/test/libcxx/utilities/utility/pairs/pairs.pair/piecewise.pass.cpp @@ -23,7 +23,7 @@ #include "archetypes.hpp" -int main() { +int main(int, char**) { using NonThrowingConvert = NonThrowingTypes::ConvertingType; using ThrowingConvert = NonTrivialTypes::ConvertingType; static_assert(!std::is_nothrow_constructible, @@ -34,4 +34,6 @@ int main() { std::piecewise_construct_t, std::tuple, std::tuple>::value, ""); static_assert( std::is_nothrow_constructible, std::piecewise_construct_t, std::tuple, std::tuple>::value, ""); + + return 0; } diff --git a/libcxx/test/libcxx/utilities/utility/pairs/pairs.pair/rv_pair_U_V.pass.cpp b/libcxx/test/libcxx/utilities/utility/pairs/pairs.pair/rv_pair_U_V.pass.cpp index c64b92107df9e..8cc83f7bd0b3e 100644 --- a/libcxx/test/libcxx/utilities/utility/pairs/pairs.pair/rv_pair_U_V.pass.cpp +++ b/libcxx/test/libcxx/utilities/utility/pairs/pairs.pair/rv_pair_U_V.pass.cpp @@ -38,7 +38,7 @@ struct ImplicitNothrowT { int value; }; -int main() { +int main(int, char**) { { // explicit noexcept test static_assert(!std::is_nothrow_constructible, std::pair&&>::value, ""); @@ -59,4 +59,6 @@ int main() { static_assert( std::is_nothrow_constructible, std::pair&&>::value, ""); } + + return 0; } diff --git a/libcxx/test/libcxx/utilities/utility/pairs/pairs.pair/trivial_copy_move_ABI.pass.cpp b/libcxx/test/libcxx/utilities/utility/pairs/pairs.pair/trivial_copy_move_ABI.pass.cpp index 39d3365aadecf..1086011c37d82 100644 --- a/libcxx/test/libcxx/utilities/utility/pairs/pairs.pair/trivial_copy_move_ABI.pass.cpp +++ b/libcxx/test/libcxx/utilities/utility/pairs/pairs.pair/trivial_copy_move_ABI.pass.cpp @@ -153,7 +153,8 @@ void test_layout() { static_assert(offsetof(PairT, first) == 0, ""); } -int main() { +int main(int, char**) { test_trivial(); test_layout(); + return 0; } diff --git a/libcxx/test/libcxx/utilities/utility/version.pass.cpp b/libcxx/test/libcxx/utilities/utility/version.pass.cpp index bd64d6e5aa225..ca783db7fc13d 100644 --- a/libcxx/test/libcxx/utilities/utility/version.pass.cpp +++ b/libcxx/test/libcxx/utilities/utility/version.pass.cpp @@ -14,6 +14,8 @@ #error _LIBCPP_VERSION not defined #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/libcxx/utilities/variant/variant.variant/variant.helper/variant_alternative.fail.cpp b/libcxx/test/libcxx/utilities/variant/variant.variant/variant.helper/variant_alternative.fail.cpp index 2249028285b0c..fd23d5b9465d7 100644 --- a/libcxx/test/libcxx/utilities/variant/variant.variant/variant.helper/variant_alternative.fail.cpp +++ b/libcxx/test/libcxx/utilities/variant/variant.variant/variant.helper/variant_alternative.fail.cpp @@ -25,11 +25,13 @@ #include -int main() +int main(int, char**) { { typedef std::variant T; std::variant_alternative<2, T>::type foo; // expected-note {{requested here}} // expected-error-re@variant:* {{static_assert failed{{( due to requirement '2U[L]{0,2} < sizeof...\(_Types\)')?}} "Index out of bounds in std::variant_alternative<>"}} } + + return 0; } diff --git a/libcxx/test/libcxx/utilities/variant/variant.variant/variant_size.pass.cpp b/libcxx/test/libcxx/utilities/variant/variant.variant/variant_size.pass.cpp index 43cb302f95e0f..1bfe0e9fdff4d 100644 --- a/libcxx/test/libcxx/utilities/variant/variant.variant/variant_size.pass.cpp +++ b/libcxx/test/libcxx/utilities/variant/variant.variant/variant_size.pass.cpp @@ -59,10 +59,12 @@ void test_index_internals() { static_assert(std::__variant_npos == IndexLim::max(), ""); } -int main() { +int main(int, char**) { test_index_type(); // This won't compile due to template depth issues. //test_index_type(); test_index_internals(); test_index_internals(); + + return 0; } diff --git a/libcxx/test/libcxx/utilities/variant/version.pass.cpp b/libcxx/test/libcxx/utilities/variant/version.pass.cpp index c614ee4728052..3ef8ed50c9140 100644 --- a/libcxx/test/libcxx/utilities/variant/version.pass.cpp +++ b/libcxx/test/libcxx/utilities/variant/version.pass.cpp @@ -14,6 +14,8 @@ #error _LIBCPP_VERSION not defined #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/lit.site.cfg.in b/libcxx/test/lit.site.cfg.in index 53f797268f170..ed9a711056dc0 100644 --- a/libcxx/test/lit.site.cfg.in +++ b/libcxx/test/lit.site.cfg.in @@ -4,12 +4,12 @@ config.project_obj_root = "@CMAKE_BINARY_DIR@" config.libcxx_src_root = "@LIBCXX_SOURCE_DIR@" config.libcxx_obj_root = "@LIBCXX_BINARY_DIR@" config.cxx_library_root = "@LIBCXX_LIBRARY_DIR@" -config.enable_exceptions = "@LIBCXX_ENABLE_EXCEPTIONS@" -config.enable_experimental = "@LIBCXX_ENABLE_EXPERIMENTAL_LIBRARY@" -config.enable_filesystem = "@LIBCXX_ENABLE_FILESYSTEM@" -config.enable_rtti = "@LIBCXX_ENABLE_RTTI@" -config.enable_shared = "@LIBCXX_ENABLE_SHARED@" -config.enable_32bit = "@LIBCXX_BUILD_32_BITS@" +config.enable_exceptions = @LIBCXX_ENABLE_EXCEPTIONS@ +config.enable_experimental = @LIBCXX_ENABLE_EXPERIMENTAL_LIBRARY@ +config.enable_filesystem = @LIBCXX_ENABLE_FILESYSTEM@ +config.enable_rtti = @LIBCXX_ENABLE_RTTI@ +config.enable_shared = @LIBCXX_ENABLE_SHARED@ +config.enable_32bit = @LIBCXX_BUILD_32_BITS@ config.cxx_abi = "@LIBCXX_CXX_ABI_LIBNAME@" config.use_sanitizer = "@LLVM_USE_SANITIZER@" config.sanitizer_library = "@LIBCXX_SANITIZER_LIBRARY@" @@ -17,22 +17,22 @@ config.abi_library_path = "@LIBCXX_CXX_ABI_LIBRARY_PATH@" config.configuration_variant = "@LIBCXX_LIT_VARIANT@" config.host_triple = "@LLVM_HOST_TRIPLE@" config.target_triple = "@TARGET_TRIPLE@" -config.use_target = len("@LIBCXX_TARGET_TRIPLE@") > 0 +config.use_target = bool("@LIBCXX_TARGET_TRIPLE@") config.sysroot = "@LIBCXX_SYSROOT@" config.gcc_toolchain = "@LIBCXX_GCC_TOOLCHAIN@" -config.generate_coverage = "@LIBCXX_GENERATE_COVERAGE@" +config.generate_coverage = @LIBCXX_GENERATE_COVERAGE@ config.target_info = "@LIBCXX_TARGET_INFO@" config.test_linker_flags = "@LIBCXX_TEST_LINKER_FLAGS@" config.test_compiler_flags = "@LIBCXX_TEST_COMPILER_FLAGS@" config.executor = "@LIBCXX_EXECUTOR@" -config.llvm_unwinder = "@LIBCXXABI_USE_LLVM_UNWINDER@" -config.compiler_rt = "@LIBCXX_USE_COMPILER_RT@" -config.has_libatomic = "@LIBCXX_HAS_ATOMIC_LIB@" -config.use_libatomic = "@LIBCXX_HAVE_CXX_ATOMICS_WITH_LIB@" -config.debug_build = "@LIBCXX_DEBUG_BUILD@" -config.libcxxabi_shared = "@LIBCXXABI_ENABLE_SHARED@" -config.cxx_ext_threads = "@LIBCXX_BUILD_EXTERNAL_THREAD_LIBRARY@" +config.llvm_unwinder = @LIBCXXABI_USE_LLVM_UNWINDER@ +config.builtins_library = "@LIBCXX_BUILTINS_LIBRARY@" +config.has_libatomic = @LIBCXX_HAS_ATOMIC_LIB@ +config.use_libatomic = @LIBCXX_HAVE_CXX_ATOMICS_WITH_LIB@ +config.debug_build = @LIBCXX_DEBUG_BUILD@ +config.libcxxabi_shared = @LIBCXXABI_ENABLE_SHARED@ +config.cxx_ext_threads = @LIBCXX_BUILD_EXTERNAL_THREAD_LIBRARY@ # Let the main config do the real work. config.loaded_site_config = True diff --git a/libcxx/test/nothing_to_do.pass.cpp b/libcxx/test/nothing_to_do.pass.cpp index 02fe32ece4841..779762e7e995d 100644 --- a/libcxx/test/nothing_to_do.pass.cpp +++ b/libcxx/test/nothing_to_do.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.c.library/tested_elsewhere.pass.cpp b/libcxx/test/std/algorithms/alg.c.library/tested_elsewhere.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/algorithms/alg.c.library/tested_elsewhere.pass.cpp +++ b/libcxx/test/std/algorithms/alg.c.library/tested_elsewhere.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.copy/copy.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.copy/copy.pass.cpp index c18550a160aa8..9dcace7a03d1d 100644 --- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.copy/copy.pass.cpp +++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.copy/copy.pass.cpp @@ -46,7 +46,7 @@ test() assert(ia[i] == ib[i]); } -int main() +int main(int, char**) { test, output_iterator >(); test, input_iterator >(); @@ -86,4 +86,6 @@ int main() // #if TEST_STD_VER > 17 // static_assert(test_constexpr()); // #endif + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.copy/copy_backward.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.copy/copy_backward.pass.cpp index bed5ff63629b9..3b20fbde5ba8c 100644 --- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.copy/copy_backward.pass.cpp +++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.copy/copy_backward.pass.cpp @@ -49,7 +49,7 @@ test() assert(ia[i] == ib[i]); } -int main() +int main(int, char**) { test, bidirectional_iterator >(); test, random_access_iterator >(); @@ -66,4 +66,6 @@ int main() // #if TEST_STD_VER > 17 // static_assert(test_constexpr()); // #endif + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.copy/copy_if.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.copy/copy_if.pass.cpp index 3d29d62971c07..903bcbe6c2501 100644 --- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.copy/copy_if.pass.cpp +++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.copy/copy_if.pass.cpp @@ -53,7 +53,7 @@ test() assert(ib[i] % 3 == 0); } -int main() +int main(int, char**) { test, output_iterator >(); test, input_iterator >(); @@ -93,4 +93,6 @@ int main() // #if TEST_STD_VER > 17 // static_assert(test_constexpr()); // #endif + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.copy/copy_n.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.copy/copy_n.pass.cpp index 540211752f3b6..2e181cfd49c74 100644 --- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.copy/copy_n.pass.cpp +++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.copy/copy_n.pass.cpp @@ -49,7 +49,7 @@ test() assert(ia[i] == ib[i]); } -int main() +int main(int, char**) { test, output_iterator >(); test, input_iterator >(); @@ -89,4 +89,6 @@ int main() // #if TEST_STD_VER > 17 // static_assert(test_constexpr()); // #endif + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.fill/fill.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.fill/fill.pass.cpp index bc6a2c80e6f85..da56ec30f128b 100644 --- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.fill/fill.pass.cpp +++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.fill/fill.pass.cpp @@ -56,7 +56,7 @@ test_int() assert(ia[3] == 1); } -int main() +int main(int, char**) { test_char >(); test_char >(); @@ -71,4 +71,6 @@ int main() #if TEST_STD_VER > 17 static_assert(test_constexpr()); #endif + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.fill/fill_n.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.fill/fill_n.pass.cpp index a133ba63b5b71..e774c915fa645 100644 --- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.fill/fill_n.pass.cpp +++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.fill/fill_n.pass.cpp @@ -148,7 +148,7 @@ void test6() } -int main() +int main(int, char**) { test_char >(); test_char >(); @@ -170,4 +170,6 @@ int main() #if TEST_STD_VER > 17 static_assert(test_constexpr()); #endif + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.generate/generate.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.generate/generate.pass.cpp index 4830ea5018bbe..29d32d7156742 100644 --- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.generate/generate.pass.cpp +++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.generate/generate.pass.cpp @@ -51,7 +51,7 @@ test() assert(ia[3] == 1); } -int main() +int main(int, char**) { test >(); test >(); @@ -61,4 +61,6 @@ int main() #if TEST_STD_VER > 17 static_assert(test_constexpr()); #endif + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.generate/generate_n.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.generate/generate_n.pass.cpp index 5b6712d44ad80..4ffdc648f62f3 100644 --- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.generate/generate_n.pass.cpp +++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.generate/generate_n.pass.cpp @@ -74,7 +74,7 @@ test() test2(); } -int main() +int main(int, char**) { test >(); test >(); @@ -84,4 +84,6 @@ int main() #if TEST_STD_VER > 17 static_assert(test_constexpr()); #endif + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.move/move.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.move/move.pass.cpp index cab5e5a4e7c22..cdb126d4942ce 100644 --- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.move/move.pass.cpp +++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.move/move.pass.cpp @@ -54,7 +54,7 @@ test1() } #endif -int main() +int main(int, char**) { test, output_iterator >(); test, input_iterator >(); @@ -127,4 +127,6 @@ int main() test1*, random_access_iterator*> >(); test1*, std::unique_ptr*>(); #endif // TEST_STD_VER >= 11 + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.move/move_backward.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.move/move_backward.pass.cpp index f9a6e77c815f0..365c1a1158d7e 100644 --- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.move/move_backward.pass.cpp +++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.move/move_backward.pass.cpp @@ -54,7 +54,7 @@ test1() } #endif -int main() +int main(int, char**) { test, bidirectional_iterator >(); test, random_access_iterator >(); @@ -81,4 +81,6 @@ int main() test1*, random_access_iterator*> >(); test1*, std::unique_ptr*>(); #endif // TEST_STD_VER >= 11 + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.partitions/is_partitioned.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.partitions/is_partitioned.pass.cpp index 460cc5e058806..6c741490f1f25 100644 --- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.partitions/is_partitioned.pass.cpp +++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.partitions/is_partitioned.pass.cpp @@ -35,7 +35,7 @@ TEST_CONSTEXPR bool test_constexpr() { #endif -int main() { +int main(int, char**) { { const int ia[] = {1, 2, 3, 4, 5, 6}; unary_counting_predicate pred((is_odd())); @@ -94,4 +94,6 @@ int main() { #if TEST_STD_VER > 17 static_assert(test_constexpr()); #endif + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.partitions/partition.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.partitions/partition.pass.cpp index c3749868b974e..97af585b932c5 100644 --- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.partitions/partition.pass.cpp +++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.partitions/partition.pass.cpp @@ -93,9 +93,11 @@ test() assert(!is_odd()(*i)); } -int main() +int main(int, char**) { test >(); test >(); test(); + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.partitions/partition_copy.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.partitions/partition_copy.pass.cpp index fcfcc7c796433..2671363465410 100644 --- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.partitions/partition_copy.pass.cpp +++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.partitions/partition_copy.pass.cpp @@ -43,7 +43,7 @@ TEST_CONSTEXPR bool test_constexpr() { } #endif -int main() +int main(int, char**) { { const int ia[] = {1, 2, 3, 4, 6, 8, 5, 7}; @@ -68,4 +68,6 @@ int main() #if TEST_STD_VER > 17 static_assert(test_constexpr()); #endif + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.partitions/partition_point.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.partitions/partition_point.pass.cpp index e6dd5c0414a5d..5da1b81504377 100644 --- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.partitions/partition_point.pass.cpp +++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.partitions/partition_point.pass.cpp @@ -35,7 +35,7 @@ TEST_CONSTEXPR bool test_constexpr() { #endif -int main() +int main(int, char**) { { const int ia[] = {2, 4, 6, 8, 10}; @@ -89,4 +89,6 @@ int main() #if TEST_STD_VER > 17 static_assert(test_constexpr()); #endif + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.partitions/stable_partition.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.partitions/stable_partition.pass.cpp index 7e886576f7692..0358f7030e8b3 100644 --- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.partitions/stable_partition.pass.cpp +++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.partitions/stable_partition.pass.cpp @@ -301,7 +301,7 @@ test1() #endif // TEST_STD_VER >= 11 -int main() +int main(int, char**) { test*> >(); test*> >(); @@ -310,4 +310,6 @@ int main() #if TEST_STD_VER >= 11 test1*> >(); #endif + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.random.sample/sample.fail.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.random.sample/sample.fail.cpp index a9aa64e4812db..c01104c0cfb54 100644 --- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.random.sample/sample.fail.cpp +++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.random.sample/sample.fail.cpp @@ -32,9 +32,11 @@ template void test() { SampleIterator(oa), os, g); } -int main() { +int main(int, char**) { // expected-error-re@algorithm:* {{static_assert failed{{( due to requirement '.*')?}} "SampleIterator must meet the requirements of RandomAccessIterator"}} // expected-error@algorithm:* 2 {{does not provide a subscript operator}} // expected-error@algorithm:* {{invalid operands}} test, output_iterator >(); + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.random.sample/sample.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.random.sample/sample.pass.cpp index bfc71e779fa63..40f2037f00e6f 100644 --- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.random.sample/sample.pass.cpp +++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.random.sample/sample.pass.cpp @@ -136,7 +136,7 @@ void test_small_population() { } } -int main() { +int main(int, char**) { test(); test(); test(); @@ -156,4 +156,6 @@ int main() { test_small_population(); test_small_population(); test_small_population(); + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.random.sample/sample.stable.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.random.sample/sample.stable.pass.cpp index aa7c74788d74c..58e6084626a90 100644 --- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.random.sample/sample.stable.pass.cpp +++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.random.sample/sample.stable.pass.cpp @@ -48,7 +48,9 @@ void test_stability(bool expect_stable) { assert(expect_stable == !unstable); } -int main() { +int main(int, char**) { test_stability, output_iterator >(true); test_stability, random_access_iterator >(false); + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle.pass.cpp index 6ae7eb964a162..cb83cde936e0a 100644 --- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle.pass.cpp +++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle.pass.cpp @@ -39,7 +39,7 @@ test_with_iterator() } -int main() +int main(int, char**) { int ia[] = {1, 2, 3, 4}; int ia1[] = {1, 4, 3, 2}; @@ -57,4 +57,5 @@ int main() test_with_iterator >(); test_with_iterator(); + return 0; } diff --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle_rand.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle_rand.pass.cpp index ffdb098fc53b8..dd5398dace15a 100644 --- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle_rand.pass.cpp +++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle_rand.pass.cpp @@ -51,8 +51,9 @@ test_with_iterator() } -int main() +int main(int, char**) { test_with_iterator >(); test_with_iterator(); -} \ No newline at end of file + return 0; +} diff --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle_urng.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle_urng.pass.cpp index 865eb48875102..d5f162bced416 100644 --- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle_urng.pass.cpp +++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle_urng.pass.cpp @@ -18,7 +18,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { int ia[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; int ia1[] = {2, 7, 1, 4, 3, 6, 5, 10, 9, 8}; @@ -31,4 +31,6 @@ int main() std::shuffle(ia, ia+sa, std::move(g)); LIBCPP_ASSERT(std::equal(ia, ia+sa, ia2)); assert(std::is_permutation(ia, ia+sa, ia2)); + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.remove/remove.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.remove/remove.pass.cpp index 3c7651189e89b..ebacec5f49367 100644 --- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.remove/remove.pass.cpp +++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.remove/remove.pass.cpp @@ -73,7 +73,7 @@ test1() } #endif // TEST_STD_VER >= 11 -int main() +int main(int, char**) { test >(); test >(); @@ -90,4 +90,6 @@ int main() #if TEST_STD_VER > 17 static_assert(test_constexpr()); #endif + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.remove/remove_copy.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.remove/remove_copy.pass.cpp index ab8d6d8866f6e..8dedddb4c20bf 100644 --- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.remove/remove_copy.pass.cpp +++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.remove/remove_copy.pass.cpp @@ -50,7 +50,7 @@ test() assert(ib[5] == 4); } -int main() +int main(int, char**) { test, output_iterator >(); test, forward_iterator >(); @@ -85,4 +85,6 @@ int main() #if TEST_STD_VER > 17 static_assert(test_constexpr()); #endif + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.remove/remove_copy_if.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.remove/remove_copy_if.pass.cpp index c4ad12fa8cadb..7d10c6bd759ac 100644 --- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.remove/remove_copy_if.pass.cpp +++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.remove/remove_copy_if.pass.cpp @@ -55,7 +55,7 @@ test() assert(ib[5] == 4); } -int main() +int main(int, char**) { test, output_iterator >(); test, forward_iterator >(); @@ -90,4 +90,6 @@ int main() #if TEST_STD_VER > 17 static_assert(test_constexpr()); #endif + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.remove/remove_if.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.remove/remove_if.pass.cpp index 35771b5a0222c..637a91707d34c 100644 --- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.remove/remove_if.pass.cpp +++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.remove/remove_if.pass.cpp @@ -88,7 +88,7 @@ test1() } #endif // TEST_STD_VER >= 11 -int main() +int main(int, char**) { test >(); test >(); @@ -105,4 +105,6 @@ int main() #if TEST_STD_VER > 17 static_assert(test_constexpr()); #endif + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.replace/replace.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.replace/replace.pass.cpp index 2f9dc692a89f2..1e91fc968cb21 100644 --- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.replace/replace.pass.cpp +++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.replace/replace.pass.cpp @@ -47,7 +47,7 @@ test() assert(ia[4] == 4); } -int main() +int main(int, char**) { test >(); test >(); @@ -57,4 +57,6 @@ int main() #if TEST_STD_VER > 17 static_assert(test_constexpr()); #endif + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.replace/replace_copy.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.replace/replace_copy.pass.cpp index a7e38b92bbeb4..da3fabf406b16 100644 --- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.replace/replace_copy.pass.cpp +++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.replace/replace_copy.pass.cpp @@ -54,7 +54,7 @@ test() assert(ib[4] == 4); } -int main() +int main(int, char**) { test, output_iterator >(); test, forward_iterator >(); @@ -89,4 +89,6 @@ int main() #if TEST_STD_VER > 17 static_assert(test_constexpr()); #endif + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.replace/replace_copy_if.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.replace/replace_copy_if.pass.cpp index 3daf1109ffcc8..26cbd705f49b8 100644 --- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.replace/replace_copy_if.pass.cpp +++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.replace/replace_copy_if.pass.cpp @@ -58,7 +58,7 @@ test() assert(ib[4] == 4); } -int main() +int main(int, char**) { test, output_iterator >(); test, forward_iterator >(); @@ -93,4 +93,6 @@ int main() #if TEST_STD_VER > 17 static_assert(test_constexpr()); #endif + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.replace/replace_if.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.replace/replace_if.pass.cpp index d35927a1a9b1d..4f32b6e94a413 100644 --- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.replace/replace_if.pass.cpp +++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.replace/replace_if.pass.cpp @@ -50,7 +50,7 @@ test() assert(ia[4] == 4); } -int main() +int main(int, char**) { test >(); test >(); @@ -60,4 +60,6 @@ int main() #if TEST_STD_VER > 17 static_assert(test_constexpr()); #endif + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.reverse/reverse.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.reverse/reverse.pass.cpp index d39da540582e9..7838a0ca2f12b 100644 --- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.reverse/reverse.pass.cpp +++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.reverse/reverse.pass.cpp @@ -51,9 +51,11 @@ test() assert(id[3] == 0); } -int main() +int main(int, char**) { test >(); test >(); test(); + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.reverse/reverse_copy.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.reverse/reverse_copy.pass.cpp index 4758c4f1ebbed..6967c446b75dd 100644 --- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.reverse/reverse_copy.pass.cpp +++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.reverse/reverse_copy.pass.cpp @@ -72,7 +72,7 @@ test() assert(jd[3] == 0); } -int main() +int main(int, char**) { test, output_iterator >(); test, forward_iterator >(); @@ -95,4 +95,6 @@ int main() #if TEST_STD_VER > 17 static_assert(test_constexpr()); #endif + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.rotate/rotate.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.rotate/rotate.pass.cpp index a588b971c8161..007faf685bfc2 100644 --- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.rotate/rotate.pass.cpp +++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.rotate/rotate.pass.cpp @@ -419,7 +419,7 @@ test1() #endif // TEST_STD_VER >= 11 -int main() +int main(int, char**) { test >(); test >(); @@ -434,4 +434,6 @@ int main() test1*>(); #endif + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.rotate/rotate_copy.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.rotate/rotate_copy.pass.cpp index 5f71e09401555..d66bf8caad6e6 100644 --- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.rotate/rotate_copy.pass.cpp +++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.rotate/rotate_copy.pass.cpp @@ -128,7 +128,7 @@ test() assert(ib[3] == 3); } -int main() +int main(int, char**) { test, output_iterator >(); test, forward_iterator >(); @@ -151,4 +151,6 @@ int main() // #if TEST_STD_VER > 17 // static_assert(test_constexpr()); // #endif + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.swap/iter_swap.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.swap/iter_swap.pass.cpp index 182b17914c8ea..419bb4bbbffa7 100644 --- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.swap/iter_swap.pass.cpp +++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.swap/iter_swap.pass.cpp @@ -16,11 +16,13 @@ #include #include -int main() +int main(int, char**) { int i = 1; int j = 2; std::iter_swap(&i, &j); assert(i == 2); assert(j == 1); + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.swap/swap_ranges.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.swap/swap_ranges.pass.cpp index 43cd4ce63f3a5..a47bbd24d95ea 100644 --- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.swap/swap_ranges.pass.cpp +++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.swap/swap_ranges.pass.cpp @@ -105,7 +105,7 @@ void test2() } } -int main() +int main(int, char**) { test, forward_iterator >(); test, bidirectional_iterator >(); @@ -150,4 +150,6 @@ int main() #endif // TEST_STD_VER >= 11 test2(); + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.transform/binary_transform.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.transform/binary_transform.pass.cpp index dc8101a25e0bd..ca7287bf24ba2 100644 --- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.transform/binary_transform.pass.cpp +++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.transform/binary_transform.pass.cpp @@ -56,7 +56,7 @@ test() assert(ib[4] == 1); } -int main() +int main(int, char**) { test, input_iterator, output_iterator >(); test, input_iterator, input_iterator >(); @@ -236,4 +236,6 @@ int main() #if TEST_STD_VER > 17 static_assert(test_constexpr()); #endif + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.transform/unary_transform.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.transform/unary_transform.pass.cpp index 9fc25adc3309c..85c3868207bcf 100644 --- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.transform/unary_transform.pass.cpp +++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.transform/unary_transform.pass.cpp @@ -57,7 +57,7 @@ test() assert(ib[4] == 5); } -int main() +int main(int, char**) { test, output_iterator >(); test, input_iterator >(); @@ -97,4 +97,6 @@ int main() #if TEST_STD_VER > 17 static_assert(test_constexpr()); #endif + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.unique/unique.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.unique/unique.pass.cpp index 680633745df7e..7046d6a2bd408 100644 --- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.unique/unique.pass.cpp +++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.unique/unique.pass.cpp @@ -181,7 +181,7 @@ test1() } #endif // TEST_STD_VER >= 11 -int main() +int main(int, char**) { test >(); test >(); @@ -198,4 +198,6 @@ int main() #if TEST_STD_VER > 17 static_assert(test_constexpr()); #endif + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.unique/unique_copy.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.unique/unique_copy.pass.cpp index 3c34a9a316017..ba533507cd98c 100644 --- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.unique/unique_copy.pass.cpp +++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.unique/unique_copy.pass.cpp @@ -105,7 +105,7 @@ test() assert(ji[2] == 2); } -int main() +int main(int, char**) { test, output_iterator >(); test, forward_iterator >(); @@ -140,4 +140,6 @@ int main() #if TEST_STD_VER > 17 static_assert(test_constexpr()); #endif + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.unique/unique_copy_pred.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.unique/unique_copy_pred.pass.cpp index b91c05e765224..e8ebeaead8ccf 100644 --- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.unique/unique_copy_pred.pass.cpp +++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.unique/unique_copy_pred.pass.cpp @@ -133,7 +133,7 @@ test() assert(count_equal::count == si-1); } -int main() +int main(int, char**) { test, output_iterator >(); test, forward_iterator >(); @@ -168,4 +168,6 @@ int main() #if TEST_STD_VER > 17 static_assert(test_constexpr()); #endif + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.unique/unique_pred.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.unique/unique_pred.pass.cpp index d48bb6a67436c..9f0c695e212dc 100644 --- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.unique/unique_pred.pass.cpp +++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.unique/unique_pred.pass.cpp @@ -223,7 +223,7 @@ test1() } #endif // TEST_STD_VER >= 11 -int main() +int main(int, char**) { test >(); test >(); @@ -240,4 +240,6 @@ int main() #if TEST_STD_VER > 17 static_assert(test_constexpr()); #endif + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.modifying.operations/nothing_to_do.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/algorithms/alg.modifying.operations/nothing_to_do.pass.cpp +++ b/libcxx/test/std/algorithms/alg.modifying.operations/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.nonmodifying/alg.adjacent.find/adjacent_find.pass.cpp b/libcxx/test/std/algorithms/alg.nonmodifying/alg.adjacent.find/adjacent_find.pass.cpp index de03da4ba1d67..6d57c5869ab70 100644 --- a/libcxx/test/std/algorithms/alg.nonmodifying/alg.adjacent.find/adjacent_find.pass.cpp +++ b/libcxx/test/std/algorithms/alg.nonmodifying/alg.adjacent.find/adjacent_find.pass.cpp @@ -30,7 +30,7 @@ TEST_CONSTEXPR bool test_constexpr() { } #endif -int main() +int main(int, char**) { int ia[] = {0, 1, 2, 2, 0, 1, 2, 3}; const unsigned sa = sizeof(ia)/sizeof(ia[0]); @@ -47,4 +47,6 @@ int main() #if TEST_STD_VER > 17 static_assert(test_constexpr()); #endif + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.nonmodifying/alg.adjacent.find/adjacent_find_pred.pass.cpp b/libcxx/test/std/algorithms/alg.nonmodifying/alg.adjacent.find/adjacent_find_pred.pass.cpp index a542cb81f17c8..c80bc9fff83b6 100644 --- a/libcxx/test/std/algorithms/alg.nonmodifying/alg.adjacent.find/adjacent_find_pred.pass.cpp +++ b/libcxx/test/std/algorithms/alg.nonmodifying/alg.adjacent.find/adjacent_find_pred.pass.cpp @@ -34,7 +34,7 @@ TEST_CONSTEXPR bool test_constexpr() { } #endif -int main() +int main(int, char**) { int ia[] = {0, 1, 2, 2, 0, 1, 2, 3}; const unsigned sa = sizeof(ia)/sizeof(ia[0]); @@ -54,4 +54,6 @@ int main() #if TEST_STD_VER > 17 static_assert(test_constexpr()); #endif + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.nonmodifying/alg.all_of/all_of.pass.cpp b/libcxx/test/std/algorithms/alg.nonmodifying/alg.all_of/all_of.pass.cpp index 61f6c2ceeded5..5c49878f6a49e 100644 --- a/libcxx/test/std/algorithms/alg.nonmodifying/alg.all_of/all_of.pass.cpp +++ b/libcxx/test/std/algorithms/alg.nonmodifying/alg.all_of/all_of.pass.cpp @@ -36,7 +36,7 @@ TEST_CONSTEXPR bool test_constexpr() { } #endif -int main() +int main(int, char**) { { int ia[] = {2, 4, 6, 8}; @@ -58,4 +58,6 @@ int main() #if TEST_STD_VER > 17 static_assert(test_constexpr()); #endif + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.nonmodifying/alg.any_of/any_of.pass.cpp b/libcxx/test/std/algorithms/alg.nonmodifying/alg.any_of/any_of.pass.cpp index ea9f8a4c8d119..22ae581d64b01 100644 --- a/libcxx/test/std/algorithms/alg.nonmodifying/alg.any_of/any_of.pass.cpp +++ b/libcxx/test/std/algorithms/alg.nonmodifying/alg.any_of/any_of.pass.cpp @@ -36,7 +36,7 @@ TEST_CONSTEXPR bool test_constexpr() { } #endif -int main() +int main(int, char**) { { int ia[] = {2, 4, 6, 8}; @@ -66,4 +66,6 @@ int main() #if TEST_STD_VER > 17 static_assert(test_constexpr()); #endif + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.nonmodifying/alg.count/count.pass.cpp b/libcxx/test/std/algorithms/alg.nonmodifying/alg.count/count.pass.cpp index f2e93719e5a75..d864080df8d32 100644 --- a/libcxx/test/std/algorithms/alg.nonmodifying/alg.count/count.pass.cpp +++ b/libcxx/test/std/algorithms/alg.nonmodifying/alg.count/count.pass.cpp @@ -29,7 +29,7 @@ TEST_CONSTEXPR bool test_constexpr() { } #endif -int main() +int main(int, char**) { int ia[] = {0, 1, 2, 2, 0, 1, 2, 3}; const unsigned sa = sizeof(ia)/sizeof(ia[0]); @@ -43,4 +43,6 @@ int main() #if TEST_STD_VER > 17 static_assert(test_constexpr()); #endif + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.nonmodifying/alg.count/count_if.pass.cpp b/libcxx/test/std/algorithms/alg.nonmodifying/alg.count/count_if.pass.cpp index 7f6be6a278fa0..978f5fcdbe58a 100644 --- a/libcxx/test/std/algorithms/alg.nonmodifying/alg.count/count_if.pass.cpp +++ b/libcxx/test/std/algorithms/alg.nonmodifying/alg.count/count_if.pass.cpp @@ -36,7 +36,7 @@ TEST_CONSTEXPR bool test_constexpr() { } #endif -int main() +int main(int, char**) { int ia[] = {0, 1, 2, 2, 0, 1, 2, 3}; const unsigned sa = sizeof(ia)/sizeof(ia[0]); @@ -53,4 +53,6 @@ int main() #if TEST_STD_VER > 17 static_assert(test_constexpr()); #endif + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.nonmodifying/alg.equal/equal.pass.cpp b/libcxx/test/std/algorithms/alg.nonmodifying/alg.equal/equal.pass.cpp index 81d46ce62f155..afd57491a4021 100644 --- a/libcxx/test/std/algorithms/alg.nonmodifying/alg.equal/equal.pass.cpp +++ b/libcxx/test/std/algorithms/alg.nonmodifying/alg.equal/equal.pass.cpp @@ -44,7 +44,7 @@ TEST_CONSTEXPR bool test_constexpr() { #endif -int main() +int main(int, char**) { int ia[] = {0, 1, 2, 3, 4, 5}; const unsigned s = sizeof(ia)/sizeof(ia[0]); @@ -88,4 +88,6 @@ int main() #if TEST_STD_VER > 17 static_assert(test_constexpr()); #endif + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.nonmodifying/alg.equal/equal_pred.pass.cpp b/libcxx/test/std/algorithms/alg.nonmodifying/alg.equal/equal_pred.pass.cpp index 03de33a6b3f8a..2b9619b73ee74 100644 --- a/libcxx/test/std/algorithms/alg.nonmodifying/alg.equal/equal_pred.pass.cpp +++ b/libcxx/test/std/algorithms/alg.nonmodifying/alg.equal/equal_pred.pass.cpp @@ -58,7 +58,7 @@ bool counting_equals ( const T &a, const T &b ) { return a == b; } -int main() +int main(int, char**) { int ia[] = {0, 1, 2, 3, 4, 5}; const unsigned s = sizeof(ia)/sizeof(ia[0]); @@ -114,4 +114,6 @@ int main() #if TEST_STD_VER > 17 static_assert(test_constexpr()); #endif + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.nonmodifying/alg.find.end/find_end.pass.cpp b/libcxx/test/std/algorithms/alg.nonmodifying/alg.find.end/find_end.pass.cpp index 36633ee12f498..3060528a8e899 100644 --- a/libcxx/test/std/algorithms/alg.nonmodifying/alg.find.end/find_end.pass.cpp +++ b/libcxx/test/std/algorithms/alg.nonmodifying/alg.find.end/find_end.pass.cpp @@ -62,7 +62,7 @@ test() assert(std::find_end(Iter1(ia), Iter1(ia), Iter2(b), Iter2(b+1)) == Iter1(ia)); } -int main() +int main(int, char**) { test, forward_iterator >(); test, bidirectional_iterator >(); @@ -77,4 +77,6 @@ int main() #if TEST_STD_VER > 17 static_assert(test_constexpr()); #endif + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.nonmodifying/alg.find.end/find_end_pred.pass.cpp b/libcxx/test/std/algorithms/alg.nonmodifying/alg.find.end/find_end_pred.pass.cpp index 2b3ca1b0404e2..7358cf5f70106 100644 --- a/libcxx/test/std/algorithms/alg.nonmodifying/alg.find.end/find_end_pred.pass.cpp +++ b/libcxx/test/std/algorithms/alg.nonmodifying/alg.find.end/find_end_pred.pass.cpp @@ -92,7 +92,7 @@ test() assert(count_equal::count <= 0); } -int main() +int main(int, char**) { test, forward_iterator >(); test, bidirectional_iterator >(); @@ -107,4 +107,6 @@ int main() #if TEST_STD_VER > 17 static_assert(test_constexpr()); #endif + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.nonmodifying/alg.find.first.of/find_first_of.pass.cpp b/libcxx/test/std/algorithms/alg.nonmodifying/alg.find.first.of/find_first_of.pass.cpp index 1df8c1b82708e..04468f7410382 100644 --- a/libcxx/test/std/algorithms/alg.nonmodifying/alg.find.first.of/find_first_of.pass.cpp +++ b/libcxx/test/std/algorithms/alg.nonmodifying/alg.find.first.of/find_first_of.pass.cpp @@ -38,7 +38,7 @@ TEST_CONSTEXPR bool test_constexpr() { } #endif -int main() +int main(int, char**) { int ia[] = {0, 1, 2, 3, 0, 1, 2, 3}; const unsigned sa = sizeof(ia)/sizeof(ia[0]); @@ -69,4 +69,6 @@ int main() #if TEST_STD_VER > 17 static_assert(test_constexpr()); #endif + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.nonmodifying/alg.find.first.of/find_first_of_pred.pass.cpp b/libcxx/test/std/algorithms/alg.nonmodifying/alg.find.first.of/find_first_of_pred.pass.cpp index cb64ee80acb93..3c32aee0e2461 100644 --- a/libcxx/test/std/algorithms/alg.nonmodifying/alg.find.first.of/find_first_of_pred.pass.cpp +++ b/libcxx/test/std/algorithms/alg.nonmodifying/alg.find.first.of/find_first_of_pred.pass.cpp @@ -40,7 +40,7 @@ constexpr bool test_constexpr() { } #endif -int main() +int main(int, char**) { int ia[] = {0, 1, 2, 3, 0, 1, 2, 3}; const unsigned sa = sizeof(ia)/sizeof(ia[0]); @@ -75,4 +75,6 @@ int main() #if TEST_STD_VER > 17 static_assert(test_constexpr()); #endif + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.nonmodifying/alg.find/find.pass.cpp b/libcxx/test/std/algorithms/alg.nonmodifying/alg.find/find.pass.cpp index de7a4181c2d9c..9dc265f18540c 100644 --- a/libcxx/test/std/algorithms/alg.nonmodifying/alg.find/find.pass.cpp +++ b/libcxx/test/std/algorithms/alg.nonmodifying/alg.find/find.pass.cpp @@ -29,7 +29,7 @@ TEST_CONSTEXPR bool test_constexpr() { } #endif -int main() +int main(int, char**) { int ia[] = {0, 1, 2, 3, 4, 5}; const unsigned s = sizeof(ia)/sizeof(ia[0]); @@ -42,4 +42,6 @@ int main() #if TEST_STD_VER > 17 static_assert(test_constexpr()); #endif + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.nonmodifying/alg.find/find_if.pass.cpp b/libcxx/test/std/algorithms/alg.nonmodifying/alg.find/find_if.pass.cpp index 7b0ae435a8812..6151a55b8f6e1 100644 --- a/libcxx/test/std/algorithms/alg.nonmodifying/alg.find/find_if.pass.cpp +++ b/libcxx/test/std/algorithms/alg.nonmodifying/alg.find/find_if.pass.cpp @@ -37,7 +37,7 @@ TEST_CONSTEXPR bool test_constexpr() { } #endif -int main() +int main(int, char**) { int ia[] = {0, 1, 2, 3, 4, 5}; const unsigned s = sizeof(ia)/sizeof(ia[0]); @@ -53,4 +53,6 @@ int main() #if TEST_STD_VER > 17 static_assert(test_constexpr()); #endif + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.nonmodifying/alg.find/find_if_not.pass.cpp b/libcxx/test/std/algorithms/alg.nonmodifying/alg.find/find_if_not.pass.cpp index 90e952171d49b..36a7542699965 100644 --- a/libcxx/test/std/algorithms/alg.nonmodifying/alg.find/find_if_not.pass.cpp +++ b/libcxx/test/std/algorithms/alg.nonmodifying/alg.find/find_if_not.pass.cpp @@ -37,7 +37,7 @@ TEST_CONSTEXPR bool test_constexpr() { } #endif -int main() +int main(int, char**) { int ia[] = {0, 1, 2, 3, 4, 5}; const unsigned s = sizeof(ia)/sizeof(ia[0]); @@ -53,4 +53,6 @@ int main() #if TEST_STD_VER > 17 static_assert(test_constexpr()); #endif + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.nonmodifying/alg.foreach/for_each_n.pass.cpp b/libcxx/test/std/algorithms/alg.nonmodifying/alg.foreach/for_each_n.pass.cpp index b43acc13a5738..f4dcd2d577ad5 100644 --- a/libcxx/test/std/algorithms/alg.nonmodifying/alg.foreach/for_each_n.pass.cpp +++ b/libcxx/test/std/algorithms/alg.nonmodifying/alg.foreach/for_each_n.pass.cpp @@ -40,7 +40,7 @@ struct for_each_test void operator()(int& i) {++i; ++count;} }; -int main() +int main(int, char**) { typedef input_iterator Iter; int ia[] = {0, 1, 2, 3, 4, 5}; @@ -76,4 +76,6 @@ int main() #if TEST_STD_VER > 17 static_assert(test_constexpr()); #endif + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.nonmodifying/alg.foreach/test.pass.cpp b/libcxx/test/std/algorithms/alg.nonmodifying/alg.foreach/test.pass.cpp index 66336b2f9fa6c..4d129e75578a4 100644 --- a/libcxx/test/std/algorithms/alg.nonmodifying/alg.foreach/test.pass.cpp +++ b/libcxx/test/std/algorithms/alg.nonmodifying/alg.foreach/test.pass.cpp @@ -37,7 +37,7 @@ struct for_each_test void operator()(int& i) {++i; ++count;} }; -int main() +int main(int, char**) { int ia[] = {0, 1, 2, 3, 4, 5}; const unsigned s = sizeof(ia)/sizeof(ia[0]); @@ -51,4 +51,6 @@ int main() #if TEST_STD_VER > 17 static_assert(test_constexpr()); #endif + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.nonmodifying/alg.is_permutation/is_permutation.pass.cpp b/libcxx/test/std/algorithms/alg.nonmodifying/alg.is_permutation/is_permutation.pass.cpp index 3173276d19090..2a2c796caac01 100644 --- a/libcxx/test/std/algorithms/alg.nonmodifying/alg.is_permutation/is_permutation.pass.cpp +++ b/libcxx/test/std/algorithms/alg.nonmodifying/alg.is_permutation/is_permutation.pass.cpp @@ -35,7 +35,7 @@ TEST_CONSTEXPR bool test_constexpr() { } #endif -int main() +int main(int, char**) { { const int ia[] = {0}; @@ -618,4 +618,6 @@ int main() #if TEST_STD_VER > 17 static_assert(test_constexpr()); #endif + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.nonmodifying/alg.is_permutation/is_permutation_pred.pass.cpp b/libcxx/test/std/algorithms/alg.nonmodifying/alg.is_permutation/is_permutation_pred.pass.cpp index 914eccdcd0265..ea4270ec4095b 100644 --- a/libcxx/test/std/algorithms/alg.nonmodifying/alg.is_permutation/is_permutation_pred.pass.cpp +++ b/libcxx/test/std/algorithms/alg.nonmodifying/alg.is_permutation/is_permutation_pred.pass.cpp @@ -55,7 +55,7 @@ struct eq { }; -int main() +int main(int, char**) { { const int ia[] = {0}; @@ -769,4 +769,6 @@ int main() #if TEST_STD_VER > 17 static_assert(test_constexpr()); #endif + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.nonmodifying/alg.none_of/none_of.pass.cpp b/libcxx/test/std/algorithms/alg.nonmodifying/alg.none_of/none_of.pass.cpp index c77ffb220b504..f3a4fea9022da 100644 --- a/libcxx/test/std/algorithms/alg.nonmodifying/alg.none_of/none_of.pass.cpp +++ b/libcxx/test/std/algorithms/alg.nonmodifying/alg.none_of/none_of.pass.cpp @@ -36,7 +36,7 @@ TEST_CONSTEXPR bool test_constexpr() { } #endif -int main() +int main(int, char**) { { int ia[] = {2, 4, 6, 8}; @@ -66,4 +66,6 @@ int main() #if TEST_STD_VER > 17 static_assert(test_constexpr()); #endif + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.nonmodifying/alg.search/search.pass.cpp b/libcxx/test/std/algorithms/alg.nonmodifying/alg.search/search.pass.cpp index a3fedafdc8521..5aaa832ded024 100644 --- a/libcxx/test/std/algorithms/alg.nonmodifying/alg.search/search.pass.cpp +++ b/libcxx/test/std/algorithms/alg.nonmodifying/alg.search/search.pass.cpp @@ -95,7 +95,7 @@ test() assert(std::search(Iter1(ij), Iter1(ij+sj), Iter2(ik), Iter2(ik+sk)) == Iter1(ij+6)); } -int main() +int main(int, char**) { test, forward_iterator >(); test, bidirectional_iterator >(); @@ -121,4 +121,6 @@ int main() #if TEST_STD_VER > 17 static_assert(test_constexpr()); #endif + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.nonmodifying/alg.search/search_n.pass.cpp b/libcxx/test/std/algorithms/alg.nonmodifying/alg.search/search_n.pass.cpp index 50d710e673586..3c86127f38b14 100644 --- a/libcxx/test/std/algorithms/alg.nonmodifying/alg.search/search_n.pass.cpp +++ b/libcxx/test/std/algorithms/alg.nonmodifying/alg.search/search_n.pass.cpp @@ -79,7 +79,7 @@ test() (void)std::search_n(Iter(ic), Iter(ic+sc), UserDefinedIntegral(0), 0); } -int main() +int main(int, char**) { test >(); test >(); @@ -88,4 +88,6 @@ int main() #if TEST_STD_VER > 17 static_assert(test_constexpr()); #endif + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.nonmodifying/alg.search/search_n_pred.pass.cpp b/libcxx/test/std/algorithms/alg.nonmodifying/alg.search/search_n_pred.pass.cpp index befa432bf28fb..1356893909971 100644 --- a/libcxx/test/std/algorithms/alg.nonmodifying/alg.search/search_n_pred.pass.cpp +++ b/libcxx/test/std/algorithms/alg.nonmodifying/alg.search/search_n_pred.pass.cpp @@ -158,7 +158,7 @@ test() count_equal::count = 0; } -int main() +int main(int, char**) { test >(); test >(); @@ -167,4 +167,6 @@ int main() #if TEST_STD_VER > 17 static_assert(test_constexpr()); #endif + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.nonmodifying/alg.search/search_pred.pass.cpp b/libcxx/test/std/algorithms/alg.nonmodifying/alg.search/search_pred.pass.cpp index e61f7f9f0f63e..f835d2f094581 100644 --- a/libcxx/test/std/algorithms/alg.nonmodifying/alg.search/search_pred.pass.cpp +++ b/libcxx/test/std/algorithms/alg.nonmodifying/alg.search/search_pred.pass.cpp @@ -110,7 +110,7 @@ test() assert(count_equal::count <= sh*3); } -int main() +int main(int, char**) { test, forward_iterator >(); test, bidirectional_iterator >(); @@ -125,4 +125,6 @@ int main() #if TEST_STD_VER > 17 static_assert(test_constexpr()); #endif + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.nonmodifying/mismatch/mismatch.pass.cpp b/libcxx/test/std/algorithms/alg.nonmodifying/mismatch/mismatch.pass.cpp index 74502d63156b2..72281b47fd77f 100644 --- a/libcxx/test/std/algorithms/alg.nonmodifying/mismatch/mismatch.pass.cpp +++ b/libcxx/test/std/algorithms/alg.nonmodifying/mismatch/mismatch.pass.cpp @@ -58,7 +58,7 @@ TEST_CONSTEXPR bool test_constexpr() { } #endif -int main() +int main(int, char**) { int ia[] = {0, 1, 2, 2, 0, 1, 2, 3}; const unsigned sa = sizeof(ia)/sizeof(ia[0]); @@ -89,4 +89,6 @@ int main() #if TEST_STD_VER > 17 static_assert(test_constexpr()); #endif + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.nonmodifying/mismatch/mismatch_pred.pass.cpp b/libcxx/test/std/algorithms/alg.nonmodifying/mismatch/mismatch_pred.pass.cpp index 2b21daab0b824..15edec03a25ed 100644 --- a/libcxx/test/std/algorithms/alg.nonmodifying/mismatch/mismatch_pred.pass.cpp +++ b/libcxx/test/std/algorithms/alg.nonmodifying/mismatch/mismatch_pred.pass.cpp @@ -68,7 +68,7 @@ TEST_CONSTEXPR bool test_constexpr() { #define HAS_FOUR_ITERATOR_VERSION #endif -int main() +int main(int, char**) { int ia[] = {0, 1, 2, 2, 0, 1, 2, 3}; const unsigned sa = sizeof(ia)/sizeof(ia[0]); @@ -114,4 +114,6 @@ int main() #if TEST_STD_VER > 17 static_assert(test_constexpr()); #endif + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.nonmodifying/nothing_to_do.pass.cpp b/libcxx/test/std/algorithms/alg.nonmodifying/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/algorithms/alg.nonmodifying/nothing_to_do.pass.cpp +++ b/libcxx/test/std/algorithms/alg.nonmodifying/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.binary.search/binary.search/binary_search.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.binary.search/binary.search/binary_search.pass.cpp index 45c50ed0139e8..3d04d51614086 100644 --- a/libcxx/test/std/algorithms/alg.sorting/alg.binary.search/binary.search/binary_search.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.binary.search/binary.search/binary_search.pass.cpp @@ -61,7 +61,7 @@ test() test(Iter(v.data()), Iter(v.data()+v.size()), M, false); } -int main() +int main(int, char**) { int d[] = {0, 2, 4, 6}; for (int* e = d; e <= d+4; ++e) @@ -76,4 +76,6 @@ int main() #if TEST_STD_VER > 17 static_assert(test_constexpr()); #endif + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.binary.search/binary.search/binary_search_comp.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.binary.search/binary.search/binary_search_comp.pass.cpp index 75d7a64a3115c..a447853d2da23 100644 --- a/libcxx/test/std/algorithms/alg.sorting/alg.binary.search/binary.search/binary_search_comp.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.binary.search/binary.search/binary_search_comp.pass.cpp @@ -62,7 +62,7 @@ test() test(Iter(v.data()), Iter(v.data()+v.size()), M, false); } -int main() +int main(int, char**) { int d[] = {6, 4, 2, 0}; for (int* e = d; e <= d+4; ++e) @@ -77,4 +77,6 @@ int main() #if TEST_STD_VER > 17 static_assert(test_constexpr()); #endif + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.binary.search/equal.range/equal_range.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.binary.search/equal.range/equal_range.pass.cpp index e8b1598329609..e22bd5ad24541 100644 --- a/libcxx/test/std/algorithms/alg.sorting/alg.binary.search/equal.range/equal_range.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.binary.search/equal.range/equal_range.pass.cpp @@ -69,7 +69,7 @@ test() test(Iter(v.data()), Iter(v.data()+v.size()), x); } -int main() +int main(int, char**) { int d[] = {0, 1, 2, 3}; for (int* e = d; e <= d+4; ++e) @@ -84,4 +84,6 @@ int main() #if TEST_STD_VER > 17 static_assert(test_constexpr()); #endif + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.binary.search/equal.range/equal_range_comp.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.binary.search/equal.range/equal_range_comp.pass.cpp index b7b43a829d185..ab36e70331a20 100644 --- a/libcxx/test/std/algorithms/alg.sorting/alg.binary.search/equal.range/equal_range_comp.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.binary.search/equal.range/equal_range_comp.pass.cpp @@ -68,7 +68,7 @@ test() test(Iter(v.data()), Iter(v.data()+v.size()), x); } -int main() +int main(int, char**) { int d[] = {3, 2, 1, 0}; for (int* e = d; e <= d+4; ++e) @@ -83,4 +83,6 @@ int main() #if TEST_STD_VER > 17 static_assert(test_constexpr()); #endif + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.binary.search/lower.bound/lower_bound.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.binary.search/lower.bound/lower_bound.pass.cpp index 8f99ed99e1dae..ce9b71c062424 100644 --- a/libcxx/test/std/algorithms/alg.sorting/alg.binary.search/lower.bound/lower_bound.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.binary.search/lower.bound/lower_bound.pass.cpp @@ -64,7 +64,7 @@ test() test(Iter(v.data()), Iter(v.data()+v.size()), x); } -int main() +int main(int, char**) { int d[] = {0, 1, 2, 3}; for (int* e = d; e <= d+4; ++e) @@ -79,4 +79,6 @@ int main() #if TEST_STD_VER > 17 static_assert(test_constexpr()); #endif + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.binary.search/lower.bound/lower_bound_comp.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.binary.search/lower.bound/lower_bound_comp.pass.cpp index 0190e0f2120d5..b9133028d9ade 100644 --- a/libcxx/test/std/algorithms/alg.sorting/alg.binary.search/lower.bound/lower_bound_comp.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.binary.search/lower.bound/lower_bound_comp.pass.cpp @@ -64,7 +64,7 @@ test() test(Iter(v.data()), Iter(v.data()+v.size()), x); } -int main() +int main(int, char**) { int d[] = {3, 2, 1, 0}; for (int* e = d; e <= d+4; ++e) @@ -79,4 +79,6 @@ int main() #if TEST_STD_VER > 17 static_assert(test_constexpr()); #endif + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.binary.search/nothing_to_do.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.binary.search/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/algorithms/alg.sorting/alg.binary.search/nothing_to_do.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.binary.search/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.binary.search/upper.bound/upper_bound.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.binary.search/upper.bound/upper_bound.pass.cpp index 6748b5ec4a8ea..1f9babde5ec4b 100644 --- a/libcxx/test/std/algorithms/alg.sorting/alg.binary.search/upper.bound/upper_bound.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.binary.search/upper.bound/upper_bound.pass.cpp @@ -61,7 +61,7 @@ test() test(Iter(v.data()), Iter(v.data()+v.size()), x); } -int main() +int main(int, char**) { int d[] = {0, 1, 2, 3}; for (int* e = d; e <= d+4; ++e) @@ -76,4 +76,6 @@ int main() #if TEST_STD_VER > 17 static_assert(test_constexpr()); #endif + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.binary.search/upper.bound/upper_bound_comp.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.binary.search/upper.bound/upper_bound_comp.pass.cpp index 5cbb01abee7e3..86066a620bbe7 100644 --- a/libcxx/test/std/algorithms/alg.sorting/alg.binary.search/upper.bound/upper_bound_comp.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.binary.search/upper.bound/upper_bound_comp.pass.cpp @@ -64,7 +64,7 @@ test() test(Iter(v.data()), Iter(v.data()+v.size()), x); } -int main() +int main(int, char**) { int d[] = {3, 2, 1, 0}; for (int* e = d; e <= d+4; ++e) @@ -79,4 +79,6 @@ int main() #if TEST_STD_VER > 17 static_assert(test_constexpr()); #endif + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.clamp/clamp.comp.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.clamp/clamp.comp.pass.cpp index 4fd10376fa22d..482af9ef33130 100644 --- a/libcxx/test/std/algorithms/alg.sorting/alg.clamp/clamp.comp.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.clamp/clamp.comp.pass.cpp @@ -38,7 +38,7 @@ test(const T& v, const T& lo, const T& hi, C c, const T& x) assert(&std::clamp(v, lo, hi, c) == &x); } -int main() +int main(int, char**) { { int x = 0; @@ -123,4 +123,6 @@ int main() static_assert(std::clamp(x, y, z, std::greater()) == y, "" ); static_assert(std::clamp(y, x, z, std::greater()) == y, "" ); } + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.clamp/clamp.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.clamp/clamp.pass.cpp index 96c3b43df47c1..4066a39453e3f 100644 --- a/libcxx/test/std/algorithms/alg.sorting/alg.clamp/clamp.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.clamp/clamp.pass.cpp @@ -36,7 +36,7 @@ test(const T& a, const T& lo, const T& hi, const T& x) assert(&std::clamp(a, lo, hi) == &x); } -int main() +int main(int, char**) { { int x = 0; @@ -121,4 +121,6 @@ int main() static_assert(std::clamp(x, y, z) == x, "" ); static_assert(std::clamp(y, x, z) == x, "" ); } + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/is.heap/is_heap.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/is.heap/is_heap.pass.cpp index ec78c10af77d7..14b1d1754f22a 100644 --- a/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/is.heap/is_heap.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/is.heap/is_heap.pass.cpp @@ -525,11 +525,13 @@ void test() assert(std::is_heap(i246, i246+7) == (std::is_heap_until(i246, i246+7) == i246+7)); } -int main() +int main(int, char**) { test(); #if TEST_STD_VER > 17 static_assert(test_constexpr()); #endif + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/is.heap/is_heap_comp.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/is.heap/is_heap_comp.pass.cpp index b48db5423403b..9e34458823976 100644 --- a/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/is.heap/is_heap_comp.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/is.heap/is_heap_comp.pass.cpp @@ -526,11 +526,13 @@ void test() assert(std::is_heap(i246, i246+7, std::greater()) == (std::is_heap_until(i246, i246+7, std::greater()) == i246+7)); } -int main() +int main(int, char**) { test(); #if TEST_STD_VER > 17 static_assert(test_constexpr()); #endif + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/is.heap/is_heap_until.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/is.heap/is_heap_until.pass.cpp index 78eb5dd70d960..b9bb3e1f5bfc4 100644 --- a/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/is.heap/is_heap_until.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/is.heap/is_heap_until.pass.cpp @@ -525,11 +525,13 @@ void test() assert(std::is_heap_until(i246, i246+7) == i246+7); } -int main() +int main(int, char**) { test(); #if TEST_STD_VER > 17 static_assert(test_constexpr()); #endif + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/is.heap/is_heap_until_comp.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/is.heap/is_heap_until_comp.pass.cpp index 21b21deca6489..6002f662e1ac3 100644 --- a/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/is.heap/is_heap_until_comp.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/is.heap/is_heap_until_comp.pass.cpp @@ -526,11 +526,13 @@ void test() assert(std::is_heap_until(i246, i246+7, std::greater()) == i246+6); } -int main() +int main(int, char**) { test(); #if TEST_STD_VER > 17 static_assert(test_constexpr()); #endif + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/make.heap/make_heap.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/make.heap/make_heap.pass.cpp index 9d2bb6e231263..3d862ca4f25ec 100644 --- a/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/make.heap/make_heap.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/make.heap/make_heap.pass.cpp @@ -30,7 +30,7 @@ void test(int N) delete [] ia; } -int main() +int main(int, char**) { test(0); test(1); @@ -38,4 +38,6 @@ int main() test(3); test(10); test(1000); + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/make.heap/make_heap_comp.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/make.heap/make_heap_comp.pass.cpp index 18fffd41ef94f..0650f745479d0 100644 --- a/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/make.heap/make_heap_comp.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/make.heap/make_heap_comp.pass.cpp @@ -74,7 +74,7 @@ void test(int N) delete [] ia; } -int main() +int main(int, char**) { test(0); test(1); @@ -97,4 +97,6 @@ int main() delete [] ia; } #endif + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/nothing_to_do.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/nothing_to_do.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/pop.heap/pop_heap.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/pop.heap/pop_heap.pass.cpp index 1f26f6d15b75d..2b434983cfcb3 100644 --- a/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/pop.heap/pop_heap.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/pop.heap/pop_heap.pass.cpp @@ -35,7 +35,9 @@ void test(int N) delete [] ia; } -int main() +int main(int, char**) { test(1000); + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/pop.heap/pop_heap_comp.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/pop.heap/pop_heap_comp.pass.cpp index 74474be43c645..63bd1520f465e 100644 --- a/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/pop.heap/pop_heap_comp.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/pop.heap/pop_heap_comp.pass.cpp @@ -47,7 +47,7 @@ void test(int N) delete [] ia; } -int main() +int main(int, char**) { test(1000); @@ -67,4 +67,6 @@ int main() delete [] ia; } #endif + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/push.heap/push_heap.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/push.heap/push_heap.pass.cpp index d7f681edea198..7db79e3bc5dba 100644 --- a/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/push.heap/push_heap.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/push.heap/push_heap.pass.cpp @@ -34,7 +34,9 @@ void test(int N) delete [] ia; } -int main() +int main(int, char**) { test(1000); + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/push.heap/push_heap_comp.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/push.heap/push_heap_comp.pass.cpp index 536a2687a5e7a..4a47f65bfc326 100644 --- a/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/push.heap/push_heap_comp.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/push.heap/push_heap_comp.pass.cpp @@ -45,7 +45,7 @@ void test(int N) delete [] ia; } -int main() +int main(int, char**) { test(1000); @@ -64,4 +64,6 @@ int main() delete [] ia; } #endif + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/sort.heap/sort_heap.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/sort.heap/sort_heap.pass.cpp index cae2c0d9b380b..947affcf086e0 100644 --- a/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/sort.heap/sort_heap.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/sort.heap/sort_heap.pass.cpp @@ -31,7 +31,7 @@ void test(int N) delete [] ia; } -int main() +int main(int, char**) { test(0); test(1); @@ -39,4 +39,6 @@ int main() test(3); test(10); test(1000); + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/sort.heap/sort_heap_comp.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/sort.heap/sort_heap_comp.pass.cpp index 8bad526bb42fc..151373b7181d5 100644 --- a/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/sort.heap/sort_heap_comp.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/sort.heap/sort_heap_comp.pass.cpp @@ -42,7 +42,7 @@ void test(int N) delete [] ia; } -int main() +int main(int, char**) { test(0); test(1); @@ -64,4 +64,6 @@ int main() delete [] ia; } #endif + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.lex.comparison/lexicographical_compare.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.lex.comparison/lexicographical_compare.pass.cpp index 096c58ce0b78b..f421bfcb8bcd2 100644 --- a/libcxx/test/std/algorithms/alg.sorting/alg.lex.comparison/lexicographical_compare.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.lex.comparison/lexicographical_compare.pass.cpp @@ -46,7 +46,7 @@ test() assert(!std::lexicographical_compare(Iter1(ib+1), Iter1(ib+3), Iter2(ia), Iter2(ia+sa))); } -int main() +int main(int, char**) { test, input_iterator >(); test, forward_iterator >(); @@ -81,4 +81,6 @@ int main() #if TEST_STD_VER > 17 static_assert(test_constexpr()); #endif + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.lex.comparison/lexicographical_compare_comp.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.lex.comparison/lexicographical_compare_comp.pass.cpp index 50050c50aeb73..b0e0ee7d77cca 100644 --- a/libcxx/test/std/algorithms/alg.sorting/alg.lex.comparison/lexicographical_compare_comp.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.lex.comparison/lexicographical_compare_comp.pass.cpp @@ -51,7 +51,7 @@ test() assert( std::lexicographical_compare(Iter1(ib+1), Iter1(ib+3), Iter2(ia), Iter2(ia+sa), c)); } -int main() +int main(int, char**) { test, input_iterator >(); test, forward_iterator >(); @@ -86,4 +86,6 @@ int main() #if TEST_STD_VER > 17 static_assert(test_constexpr()); #endif + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.merge/inplace_merge.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.merge/inplace_merge.pass.cpp index ebe7307289be9..208221416812b 100644 --- a/libcxx/test/std/algorithms/alg.sorting/alg.merge/inplace_merge.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.merge/inplace_merge.pass.cpp @@ -96,7 +96,7 @@ test() test(1000); } -int main() +int main(int, char**) { test >(); test >(); @@ -107,4 +107,6 @@ int main() test >(); test(); #endif // TEST_STD_VER >= 11 + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.merge/inplace_merge_comp.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.merge/inplace_merge_comp.pass.cpp index ce26335cb792a..7ab5c0ca92295 100644 --- a/libcxx/test/std/algorithms/alg.sorting/alg.merge/inplace_merge_comp.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.merge/inplace_merge_comp.pass.cpp @@ -135,7 +135,7 @@ void test_PR31166 () } } -int main() +int main(int, char**) { test >(); test >(); @@ -167,4 +167,6 @@ int main() #endif // TEST_STD_VER >= 11 test_PR31166(); + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.merge/merge.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.merge/merge.pass.cpp index f373f04946b1b..6c6f0c46d446f 100644 --- a/libcxx/test/std/algorithms/alg.sorting/alg.merge/merge.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.merge/merge.pass.cpp @@ -89,7 +89,7 @@ test() } } -int main() +int main(int, char**) { test, input_iterator, output_iterator >(); test, input_iterator, forward_iterator >(); @@ -245,4 +245,6 @@ int main() // Not yet - waiting on std::copy // static_assert(test_constexpr()); #endif + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.merge/merge_comp.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.merge/merge_comp.pass.cpp index c4fd0746b4b0f..508a4f5ab7347 100644 --- a/libcxx/test/std/algorithms/alg.sorting/alg.merge/merge_comp.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.merge/merge_comp.pass.cpp @@ -100,7 +100,7 @@ test() } } -int main() +int main(int, char**) { test, input_iterator, output_iterator >(); test, input_iterator, forward_iterator >(); @@ -256,4 +256,6 @@ int main() // Not yet - waiting on std::copy // static_assert(test_constexpr()); #endif + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.min.max/max.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.min.max/max.pass.cpp index 773e14c466825..f52c72b14ceae 100644 --- a/libcxx/test/std/algorithms/alg.sorting/alg.min.max/max.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.min.max/max.pass.cpp @@ -24,7 +24,7 @@ test(const T& a, const T& b, const T& x) assert(&std::max(a, b) == &x); } -int main() +int main(int, char**) { { int x = 0; @@ -52,4 +52,6 @@ int main() static_assert(std::max(y, x) == x, "" ); } #endif + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.min.max/max_comp.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.min.max/max_comp.pass.cpp index 8488f70033de4..e554b3cd038e8 100644 --- a/libcxx/test/std/algorithms/alg.sorting/alg.min.max/max_comp.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.min.max/max_comp.pass.cpp @@ -26,7 +26,7 @@ test(const T& a, const T& b, C c, const T& x) assert(&std::max(a, b, c) == &x); } -int main() +int main(int, char**) { { int x = 0; @@ -54,4 +54,6 @@ int main() static_assert(std::max(y, x, std::greater()) == y, "" ); } #endif + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.min.max/max_element.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.min.max/max_element.pass.cpp index c6e9e634b1de8..cb5341ca04705 100644 --- a/libcxx/test/std/algorithms/alg.sorting/alg.min.max/max_element.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.min.max/max_element.pass.cpp @@ -71,7 +71,7 @@ void constexpr_test() #endif } -int main() +int main(int, char**) { test >(); test >(); @@ -79,4 +79,6 @@ int main() test(); constexpr_test (); + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.min.max/max_element_comp.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.min.max/max_element_comp.pass.cpp index 0a7d6ef6a8a62..fbcea97b636b2 100644 --- a/libcxx/test/std/algorithms/alg.sorting/alg.min.max/max_element_comp.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.min.max/max_element_comp.pass.cpp @@ -91,7 +91,7 @@ void constexpr_test() #endif } -int main() +int main(int, char**) { test >(); test >(); @@ -100,4 +100,6 @@ int main() test_eq(); constexpr_test(); + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.min.max/max_init_list.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.min.max/max_init_list.pass.cpp index 560051e316798..ff58ba479bdd2 100644 --- a/libcxx/test/std/algorithms/alg.sorting/alg.min.max/max_init_list.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.min.max/max_init_list.pass.cpp @@ -19,7 +19,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { int i = std::max({2, 3, 1}); assert(i == 3); @@ -40,4 +40,6 @@ int main() static_assert(std::max({3, 2, 1}) == 3, ""); } #endif + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.min.max/max_init_list_comp.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.min.max/max_init_list_comp.pass.cpp index 0cdab3aa46a30..4042f48af5b68 100644 --- a/libcxx/test/std/algorithms/alg.sorting/alg.min.max/max_init_list_comp.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.min.max/max_init_list_comp.pass.cpp @@ -20,7 +20,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { int i = std::max({2, 3, 1}, std::greater()); assert(i == 1); @@ -41,4 +41,6 @@ int main() static_assert(std::max({3, 2, 1}, std::greater()) == 1, ""); } #endif + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.min.max/min.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.min.max/min.pass.cpp index a34cb31e7bea5..533077a55ae8b 100644 --- a/libcxx/test/std/algorithms/alg.sorting/alg.min.max/min.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.min.max/min.pass.cpp @@ -24,7 +24,7 @@ test(const T& a, const T& b, const T& x) assert(&std::min(a, b) == &x); } -int main() +int main(int, char**) { { int x = 0; @@ -52,4 +52,6 @@ int main() static_assert(std::min(y, x) == y, "" ); } #endif + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.min.max/min_comp.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.min.max/min_comp.pass.cpp index 4a815dc0be955..4524fe47b802e 100644 --- a/libcxx/test/std/algorithms/alg.sorting/alg.min.max/min_comp.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.min.max/min_comp.pass.cpp @@ -26,7 +26,7 @@ test(const T& a, const T& b, C c, const T& x) assert(&std::min(a, b, c) == &x); } -int main() +int main(int, char**) { { int x = 0; @@ -54,4 +54,6 @@ int main() static_assert(std::min(y, x, std::greater()) == x, "" ); } #endif + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.min.max/min_element.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.min.max/min_element.pass.cpp index b208096d4df5e..151bfa8127aa2 100644 --- a/libcxx/test/std/algorithms/alg.sorting/alg.min.max/min_element.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.min.max/min_element.pass.cpp @@ -71,7 +71,7 @@ void constexpr_test() #endif } -int main() +int main(int, char**) { test >(); test >(); @@ -79,4 +79,6 @@ int main() test(); constexpr_test(); + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.min.max/min_element_comp.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.min.max/min_element_comp.pass.cpp index 89a9227bd2558..cada8b346c7a9 100644 --- a/libcxx/test/std/algorithms/alg.sorting/alg.min.max/min_element_comp.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.min.max/min_element_comp.pass.cpp @@ -91,7 +91,7 @@ void constexpr_test() #endif } -int main() +int main(int, char**) { test >(); test >(); @@ -100,4 +100,6 @@ int main() test_eq(); constexpr_test(); + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.min.max/min_init_list.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.min.max/min_init_list.pass.cpp index ba8da8dfa3987..1253e1a6fffad 100644 --- a/libcxx/test/std/algorithms/alg.sorting/alg.min.max/min_init_list.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.min.max/min_init_list.pass.cpp @@ -19,7 +19,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { int i = std::min({2, 3, 1}); assert(i == 1); @@ -40,4 +40,6 @@ int main() static_assert(std::min({3, 2, 1}) == 1, ""); } #endif + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.min.max/min_init_list_comp.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.min.max/min_init_list_comp.pass.cpp index e5f372367acdf..b0bd5d492fda2 100644 --- a/libcxx/test/std/algorithms/alg.sorting/alg.min.max/min_init_list_comp.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.min.max/min_init_list_comp.pass.cpp @@ -20,7 +20,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { int i = std::min({2, 3, 1}, std::greater()); assert(i == 3); @@ -41,4 +41,6 @@ int main() static_assert(std::min({3, 2, 1}, std::greater()) == 3, ""); } #endif + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.min.max/minmax.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.min.max/minmax.pass.cpp index e7c2ffd5fdf97..0dffd52742c1a 100644 --- a/libcxx/test/std/algorithms/alg.sorting/alg.min.max/minmax.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.min.max/minmax.pass.cpp @@ -26,7 +26,7 @@ test(const T& a, const T& b, const T& x, const T& y) assert(&p.second == &y); } -int main() +int main(int, char**) { { int x = 0; @@ -60,4 +60,6 @@ int main() static_assert(p2.second == x, ""); } #endif + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.min.max/minmax_comp.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.min.max/minmax_comp.pass.cpp index 8eb059119bf50..38ee5a96e5209 100644 --- a/libcxx/test/std/algorithms/alg.sorting/alg.min.max/minmax_comp.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.min.max/minmax_comp.pass.cpp @@ -29,7 +29,7 @@ test(const T& a, const T& b, C c, const T& x, const T& y) } -int main() +int main(int, char**) { { int x = 0; @@ -63,4 +63,6 @@ int main() static_assert(p2.second == y, ""); } #endif + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.min.max/minmax_element.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.min.max/minmax_element.pass.cpp index 14e7b0c06587b..8b56ac180e507 100644 --- a/libcxx/test/std/algorithms/alg.sorting/alg.min.max/minmax_element.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.min.max/minmax_element.pass.cpp @@ -89,7 +89,7 @@ void constexpr_test() #endif } -int main() +int main(int, char**) { test >(); test >(); @@ -97,4 +97,6 @@ int main() test(); constexpr_test(); + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.min.max/minmax_element_comp.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.min.max/minmax_element_comp.pass.cpp index ba7912ed3ded5..3ecc02ce10e1e 100644 --- a/libcxx/test/std/algorithms/alg.sorting/alg.min.max/minmax_element_comp.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.min.max/minmax_element_comp.pass.cpp @@ -96,7 +96,7 @@ void constexpr_test() #endif } -int main() +int main(int, char**) { test >(); test >(); @@ -104,4 +104,6 @@ int main() test(); constexpr_test(); + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.min.max/minmax_init_list.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.min.max/minmax_init_list.pass.cpp index 477a0b893e0bf..e02b9fb38b352 100644 --- a/libcxx/test/std/algorithms/alg.sorting/alg.min.max/minmax_init_list.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.min.max/minmax_init_list.pass.cpp @@ -19,7 +19,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { assert((std::minmax({1, 2, 3}) == std::pair(1, 3))); assert((std::minmax({1, 3, 2}) == std::pair(1, 3))); @@ -37,4 +37,6 @@ int main() static_assert((std::minmax({3, 2, 1}) == std::pair(1, 3)), ""); } #endif + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.min.max/minmax_init_list_comp.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.min.max/minmax_init_list_comp.pass.cpp index 0b834257a55d4..efa0e92fb9501 100644 --- a/libcxx/test/std/algorithms/alg.sorting/alg.min.max/minmax_init_list_comp.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.min.max/minmax_init_list_comp.pass.cpp @@ -35,7 +35,7 @@ void test_all_equal(std::initializer_list il) assert(pred.count() <= ((3 * il.size()) / 2)); } -int main() +int main(int, char**) { assert((std::minmax({1, 2, 3}, std::greater()) == std::pair(3, 1))); assert((std::minmax({1, 3, 2}, std::greater()) == std::pair(3, 1))); @@ -72,4 +72,6 @@ int main() static_assert((std::minmax({3, 2, 1}, std::greater()) == std::pair(3, 1)), ""); } #endif + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.min.max/requires_forward_iterator.fail.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.min.max/requires_forward_iterator.fail.cpp index d19304458c410..e048501753fd0 100644 --- a/libcxx/test/std/algorithms/alg.sorting/alg.min.max/requires_forward_iterator.fail.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.min.max/requires_forward_iterator.fail.cpp @@ -16,7 +16,7 @@ #include "test_iterators.h" -int main() { +int main(int, char**) { int arr[] = {1, 2, 3}; const int *b = std::begin(arr), *e = std::end(arr); typedef input_iterator Iter; @@ -33,4 +33,6 @@ int main() { std::minmax_element(Iter(b), Iter(e)); } + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.nth.element/nth_element.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.nth.element/nth_element.pass.cpp index b331239f1f4fd..abde620d03876 100644 --- a/libcxx/test/std/algorithms/alg.sorting/alg.nth.element/nth_element.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.nth.element/nth_element.pass.cpp @@ -50,7 +50,7 @@ test(int N) test_one(N, N-1); } -int main() +int main(int, char**) { int d = 0; std::nth_element(&d, &d, &d); @@ -62,4 +62,6 @@ int main() test(997); test(1000); test(1009); + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.nth.element/nth_element_comp.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.nth.element/nth_element_comp.pass.cpp index 5f46394278caf..980b2b9881b83 100644 --- a/libcxx/test/std/algorithms/alg.sorting/alg.nth.element/nth_element_comp.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.nth.element/nth_element_comp.pass.cpp @@ -63,7 +63,7 @@ test(int N) test_one(N, N-1); } -int main() +int main(int, char**) { int d = 0; std::nth_element(&d, &d, &d); @@ -85,4 +85,6 @@ int main() assert(static_cast(*v[v.size()/2]) == v.size()/2); } #endif + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.permutation.generators/next_permutation.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.permutation.generators/next_permutation.pass.cpp index 74cd21c5c5b33..62d5b42e23e00 100644 --- a/libcxx/test/std/algorithms/alg.sorting/alg.permutation.generators/next_permutation.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.permutation.generators/next_permutation.pass.cpp @@ -57,9 +57,11 @@ test() } } -int main() +int main(int, char**) { test >(); test >(); test(); + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.permutation.generators/next_permutation_comp.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.permutation.generators/next_permutation_comp.pass.cpp index fed1a2c51ebdd..4416ed1e4a888 100644 --- a/libcxx/test/std/algorithms/alg.sorting/alg.permutation.generators/next_permutation_comp.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.permutation.generators/next_permutation_comp.pass.cpp @@ -59,9 +59,11 @@ test() } } -int main() +int main(int, char**) { test >(); test >(); test(); + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.permutation.generators/prev_permutation.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.permutation.generators/prev_permutation.pass.cpp index 6f11ebda07772..044a6444ab012 100644 --- a/libcxx/test/std/algorithms/alg.sorting/alg.permutation.generators/prev_permutation.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.permutation.generators/prev_permutation.pass.cpp @@ -57,9 +57,11 @@ test() } } -int main() +int main(int, char**) { test >(); test >(); test(); + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.permutation.generators/prev_permutation_comp.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.permutation.generators/prev_permutation_comp.pass.cpp index 1c78728a53d49..760daae36baa2 100644 --- a/libcxx/test/std/algorithms/alg.sorting/alg.permutation.generators/prev_permutation_comp.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.permutation.generators/prev_permutation_comp.pass.cpp @@ -59,9 +59,11 @@ test() } } -int main() +int main(int, char**) { test >(); test >(); test(); + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.set.operations/includes/includes.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.set.operations/includes/includes.pass.cpp index 72f80df566d05..f8e8884085def 100644 --- a/libcxx/test/std/algorithms/alg.sorting/alg.set.operations/includes/includes.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.set.operations/includes/includes.pass.cpp @@ -62,7 +62,7 @@ test() assert(!std::includes(Iter1(ia), Iter1(ia+sa), Iter2(id), Iter2(id+4))); } -int main() +int main(int, char**) { test, input_iterator >(); test, forward_iterator >(); @@ -97,4 +97,6 @@ int main() #if TEST_STD_VER > 17 static_assert(test_constexpr()); #endif + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.set.operations/includes/includes_comp.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.set.operations/includes/includes_comp.pass.cpp index 5d959a0a85583..48bafcb3a84cb 100644 --- a/libcxx/test/std/algorithms/alg.sorting/alg.set.operations/includes/includes_comp.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.set.operations/includes/includes_comp.pass.cpp @@ -65,7 +65,7 @@ test() assert(!std::includes(Iter1(ia), Iter1(ia+sa), Iter2(id), Iter2(id+4), std::less())); } -int main() +int main(int, char**) { test, input_iterator >(); test, forward_iterator >(); @@ -100,4 +100,6 @@ int main() #if TEST_STD_VER > 17 static_assert(test_constexpr()); #endif + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.set.operations/nothing_to_do.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.set.operations/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/algorithms/alg.sorting/alg.set.operations/nothing_to_do.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.set.operations/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.set.operations/set.difference/set_difference.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.set.operations/set.difference/set_difference.pass.cpp index 576b2889aabd5..4d1f537b7f157 100644 --- a/libcxx/test/std/algorithms/alg.sorting/alg.set.operations/set.difference/set_difference.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.set.operations/set.difference/set_difference.pass.cpp @@ -45,7 +45,7 @@ test() assert(std::lexicographical_compare(ic, base(ce), irr, irr+srr) == 0); } -int main() +int main(int, char**) { test, input_iterator, output_iterator >(); test, input_iterator, forward_iterator >(); @@ -196,4 +196,6 @@ int main() test >(); test >(); test(); + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.set.operations/set.difference/set_difference_comp.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.set.operations/set.difference/set_difference_comp.pass.cpp index 8b2f1c0494c25..2597174c6068f 100644 --- a/libcxx/test/std/algorithms/alg.sorting/alg.set.operations/set.difference/set_difference_comp.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.set.operations/set.difference/set_difference_comp.pass.cpp @@ -47,7 +47,7 @@ test() assert(std::lexicographical_compare(ic, base(ce), irr, irr+srr) == 0); } -int main() +int main(int, char**) { test, input_iterator, output_iterator >(); test, input_iterator, forward_iterator >(); @@ -198,4 +198,6 @@ int main() test >(); test >(); test(); + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.set.operations/set.intersection/set_intersection.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.set.operations/set.intersection/set_intersection.pass.cpp index 84b5aa0a96c96..08e08f672aed0 100644 --- a/libcxx/test/std/algorithms/alg.sorting/alg.set.operations/set.intersection/set_intersection.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.set.operations/set.intersection/set_intersection.pass.cpp @@ -62,7 +62,7 @@ test() assert(std::lexicographical_compare(ic, base(ce), ir, ir+sr) == 0); } -int main() +int main(int, char**) { test, input_iterator, output_iterator >(); test, input_iterator, forward_iterator >(); @@ -217,4 +217,6 @@ int main() #if TEST_STD_VER > 17 static_assert(test_constexpr()); #endif + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.set.operations/set.intersection/set_intersection_comp.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.set.operations/set.intersection/set_intersection_comp.pass.cpp index 0511d77f8442b..acdd7b0191b79 100644 --- a/libcxx/test/std/algorithms/alg.sorting/alg.set.operations/set.intersection/set_intersection_comp.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.set.operations/set.intersection/set_intersection_comp.pass.cpp @@ -65,7 +65,7 @@ test() assert(std::lexicographical_compare(ic, base(ce), ir, ir+sr) == 0); } -int main() +int main(int, char**) { test, input_iterator, output_iterator >(); test, input_iterator, forward_iterator >(); @@ -220,4 +220,6 @@ int main() #if TEST_STD_VER > 17 static_assert(test_constexpr()); #endif + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.set.operations/set.symmetric.difference/set_symmetric_difference.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.set.operations/set.symmetric.difference/set_symmetric_difference.pass.cpp index e869169b39bdf..c74d6623bc5fb 100644 --- a/libcxx/test/std/algorithms/alg.sorting/alg.set.operations/set.symmetric.difference/set_symmetric_difference.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.set.operations/set.symmetric.difference/set_symmetric_difference.pass.cpp @@ -44,7 +44,7 @@ test() assert(std::lexicographical_compare(ic, base(ce), ir, ir+sr) == 0); } -int main() +int main(int, char**) { test, input_iterator, output_iterator >(); test, input_iterator, forward_iterator >(); @@ -195,4 +195,6 @@ int main() test >(); test >(); test(); + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.set.operations/set.symmetric.difference/set_symmetric_difference_comp.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.set.operations/set.symmetric.difference/set_symmetric_difference_comp.pass.cpp index a429e59bbc6a6..99e75b1224a9f 100644 --- a/libcxx/test/std/algorithms/alg.sorting/alg.set.operations/set.symmetric.difference/set_symmetric_difference_comp.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.set.operations/set.symmetric.difference/set_symmetric_difference_comp.pass.cpp @@ -48,7 +48,7 @@ test() assert(std::lexicographical_compare(ic, base(ce), ir, ir+sr) == 0); } -int main() +int main(int, char**) { test, input_iterator, output_iterator >(); test, input_iterator, forward_iterator >(); @@ -199,4 +199,6 @@ int main() test >(); test >(); test(); + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.set.operations/set.union/set_union.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.set.operations/set.union/set_union.pass.cpp index bc517543815c4..827c2c1900107 100644 --- a/libcxx/test/std/algorithms/alg.sorting/alg.set.operations/set.union/set_union.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.set.operations/set.union/set_union.pass.cpp @@ -43,7 +43,7 @@ test() assert(std::lexicographical_compare(ic, base(ce), ir, ir+sr) == 0); } -int main() +int main(int, char**) { test, input_iterator, output_iterator >(); test, input_iterator, forward_iterator >(); @@ -194,4 +194,6 @@ int main() test >(); test >(); test(); + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.set.operations/set.union/set_union_comp.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.set.operations/set.union/set_union_comp.pass.cpp index 8ce76754c4640..c8d1d28828c26 100644 --- a/libcxx/test/std/algorithms/alg.sorting/alg.set.operations/set.union/set_union_comp.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.set.operations/set.union/set_union_comp.pass.cpp @@ -45,7 +45,7 @@ test() assert(std::lexicographical_compare(ic, base(ce), ir, ir+sr) == 0); } -int main() +int main(int, char**) { test, input_iterator, output_iterator >(); test, input_iterator, forward_iterator >(); @@ -196,4 +196,6 @@ int main() test >(); test >(); test(); + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.set.operations/set.union/set_union_move.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.set.operations/set.union/set_union_move.pass.cpp index 7af3f23ff4357..45bd455bb8191 100644 --- a/libcxx/test/std/algorithms/alg.sorting/alg.set.operations/set.union/set_union_move.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.set.operations/set.union/set_union_move.pass.cpp @@ -28,7 +28,7 @@ #include "MoveOnly.h" -int main() +int main(int, char**) { std::vector lhs, rhs; lhs.push_back(MoveOnly(2)); @@ -42,4 +42,6 @@ int main() assert(res.size() == 1); assert(res[0].get() == 2); + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.sort/is.sorted/is_sorted.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.sort/is.sorted/is_sorted.pass.cpp index f500aeb0c5a12..6e2ea5f3aed23 100644 --- a/libcxx/test/std/algorithms/alg.sorting/alg.sort/is.sorted/is_sorted.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.sort/is.sorted/is_sorted.pass.cpp @@ -182,7 +182,7 @@ test() } } -int main() +int main(int, char**) { test >(); test >(); @@ -192,4 +192,6 @@ int main() #if TEST_STD_VER > 17 static_assert(test_constexpr()); #endif + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.sort/is.sorted/is_sorted_comp.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.sort/is.sorted/is_sorted_comp.pass.cpp index 5a490977b6b9c..c5624d994d6c4 100644 --- a/libcxx/test/std/algorithms/alg.sorting/alg.sort/is.sorted/is_sorted_comp.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.sort/is.sorted/is_sorted_comp.pass.cpp @@ -183,7 +183,7 @@ test() } } -int main() +int main(int, char**) { test >(); test >(); @@ -193,4 +193,6 @@ int main() #if TEST_STD_VER > 17 static_assert(test_constexpr()); #endif + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.sort/is.sorted/is_sorted_until.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.sort/is.sorted/is_sorted_until.pass.cpp index 726772c5b7832..4396a4fc82025 100644 --- a/libcxx/test/std/algorithms/alg.sorting/alg.sort/is.sorted/is_sorted_until.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.sort/is.sorted/is_sorted_until.pass.cpp @@ -182,7 +182,7 @@ test() } } -int main() +int main(int, char**) { test >(); test >(); @@ -192,4 +192,6 @@ int main() #if TEST_STD_VER > 17 static_assert(test_constexpr()); #endif + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.sort/is.sorted/is_sorted_until_comp.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.sort/is.sorted/is_sorted_until_comp.pass.cpp index cb20c0cbad46e..48696cf083852 100644 --- a/libcxx/test/std/algorithms/alg.sorting/alg.sort/is.sorted/is_sorted_until_comp.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.sort/is.sorted/is_sorted_until_comp.pass.cpp @@ -183,7 +183,7 @@ test() } } -int main() +int main(int, char**) { test >(); test >(); @@ -193,4 +193,6 @@ int main() #if TEST_STD_VER > 17 static_assert(test_constexpr()); #endif + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.sort/nothing_to_do.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.sort/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/algorithms/alg.sorting/alg.sort/nothing_to_do.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.sort/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.sort/partial.sort.copy/partial_sort_copy.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.sort/partial.sort.copy/partial_sort_copy.pass.cpp index ddea611b15824..45a6fef6701d1 100644 --- a/libcxx/test/std/algorithms/alg.sorting/alg.sort/partial.sort.copy/partial_sort_copy.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.sort/partial.sort.copy/partial_sort_copy.pass.cpp @@ -75,7 +75,7 @@ test() test_larger_sorts(1009); } -int main() +int main(int, char**) { int i = 0; std::partial_sort_copy(&i, &i, &i, &i+5); @@ -85,4 +85,6 @@ int main() test >(); test >(); test(); + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.sort/partial.sort.copy/partial_sort_copy_comp.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.sort/partial.sort.copy/partial_sort_copy_comp.pass.cpp index d3e30b9d04bba..a1c2b0f9c8a3a 100644 --- a/libcxx/test/std/algorithms/alg.sorting/alg.sort/partial.sort.copy/partial_sort_copy_comp.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.sort/partial.sort.copy/partial_sort_copy_comp.pass.cpp @@ -79,7 +79,7 @@ test() test_larger_sorts(1009); } -int main() +int main(int, char**) { int i = 0; std::partial_sort_copy(&i, &i, &i, &i+5); @@ -89,4 +89,6 @@ int main() test >(); test >(); test(); + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.sort/partial.sort/partial_sort.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.sort/partial.sort/partial_sort.pass.cpp index 7e52c5747f8fd..b41eb12d6aaf5 100644 --- a/libcxx/test/std/algorithms/alg.sorting/alg.sort/partial.sort/partial_sort.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.sort/partial.sort/partial_sort.pass.cpp @@ -53,7 +53,7 @@ test_larger_sorts(int N) test_larger_sorts(N, N); } -int main() +int main(int, char**) { int i = 0; std::partial_sort(&i, &i, &i); @@ -66,4 +66,6 @@ int main() test_larger_sorts(997); test_larger_sorts(1000); test_larger_sorts(1009); + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.sort/partial.sort/partial_sort_comp.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.sort/partial.sort/partial_sort_comp.pass.cpp index e1143f592f930..f50d04005a408 100644 --- a/libcxx/test/std/algorithms/alg.sorting/alg.sort/partial.sort/partial_sort_comp.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.sort/partial.sort/partial_sort_comp.pass.cpp @@ -66,7 +66,7 @@ test_larger_sorts(int N) test_larger_sorts(N, N); } -int main() +int main(int, char**) { { int i = 0; @@ -92,4 +92,6 @@ int main() assert(*v[i] == i); } #endif + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.sort/sort/sort.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.sort/sort/sort.pass.cpp index c65f13c0748e2..8f2845732cc92 100644 --- a/libcxx/test/std/algorithms/alg.sorting/alg.sort/sort/sort.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.sort/sort/sort.pass.cpp @@ -130,7 +130,7 @@ test_larger_sorts(int N) test_larger_sorts(N, N); } -int main() +int main(int, char**) { // test null range int d = 0; @@ -152,4 +152,6 @@ int main() test_larger_sorts(997); test_larger_sorts(1000); test_larger_sorts(1009); + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.sort/sort/sort_comp.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.sort/sort/sort_comp.pass.cpp index e6896bea41649..832d190ce47b9 100644 --- a/libcxx/test/std/algorithms/alg.sorting/alg.sort/sort/sort_comp.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.sort/sort/sort_comp.pass.cpp @@ -30,7 +30,7 @@ struct indirect_less {return *x < *y;} }; -int main() +int main(int, char**) { { std::vector v(1000); @@ -53,4 +53,6 @@ int main() assert(*v[2] == 2); } #endif + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.sort/stable.sort/stable_sort.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.sort/stable.sort/stable_sort.pass.cpp index 9341d699410cf..c433baab44a6a 100644 --- a/libcxx/test/std/algorithms/alg.sorting/alg.sort/stable.sort/stable_sort.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.sort/stable.sort/stable_sort.pass.cpp @@ -130,7 +130,7 @@ test_larger_sorts(int N) test_larger_sorts(N, N); } -int main() +int main(int, char**) { // test null range int d = 0; @@ -152,4 +152,6 @@ int main() test_larger_sorts(997); test_larger_sorts(1000); test_larger_sorts(1009); + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.sort/stable.sort/stable_sort_comp.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.sort/stable.sort/stable_sort_comp.pass.cpp index 6c5dcabfe323d..8da2b964b7e37 100644 --- a/libcxx/test/std/algorithms/alg.sorting/alg.sort/stable.sort/stable_sort_comp.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.sort/stable.sort/stable_sort_comp.pass.cpp @@ -66,7 +66,7 @@ void test() assert(std::is_sorted(v.begin(), v.end())); } -int main() +int main(int, char**) { test(); @@ -82,4 +82,6 @@ int main() assert(*v[2] == 2); } #endif + + return 0; } diff --git a/libcxx/test/std/algorithms/alg.sorting/nothing_to_do.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/algorithms/alg.sorting/nothing_to_do.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/algorithms/algorithms.general/nothing_to_do.pass.cpp b/libcxx/test/std/algorithms/algorithms.general/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/algorithms/algorithms.general/nothing_to_do.pass.cpp +++ b/libcxx/test/std/algorithms/algorithms.general/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/atomics/atomics.fences/atomic_signal_fence.pass.cpp b/libcxx/test/std/atomics/atomics.fences/atomic_signal_fence.pass.cpp index ae4af5c975019..bf5325940e41c 100644 --- a/libcxx/test/std/atomics/atomics.fences/atomic_signal_fence.pass.cpp +++ b/libcxx/test/std/atomics/atomics.fences/atomic_signal_fence.pass.cpp @@ -14,7 +14,9 @@ #include -int main() +int main(int, char**) { std::atomic_signal_fence(std::memory_order_seq_cst); + + return 0; } diff --git a/libcxx/test/std/atomics/atomics.fences/atomic_thread_fence.pass.cpp b/libcxx/test/std/atomics/atomics.fences/atomic_thread_fence.pass.cpp index 91aeff2823823..d237f2de11878 100644 --- a/libcxx/test/std/atomics/atomics.fences/atomic_thread_fence.pass.cpp +++ b/libcxx/test/std/atomics/atomics.fences/atomic_thread_fence.pass.cpp @@ -14,7 +14,9 @@ #include -int main() +int main(int, char**) { std::atomic_thread_fence(std::memory_order_seq_cst); + + return 0; } diff --git a/libcxx/test/std/atomics/atomics.flag/atomic_flag_clear.pass.cpp b/libcxx/test/std/atomics/atomics.flag/atomic_flag_clear.pass.cpp index 846d86e7a6bff..23cb3d2b6fa40 100644 --- a/libcxx/test/std/atomics/atomics.flag/atomic_flag_clear.pass.cpp +++ b/libcxx/test/std/atomics/atomics.flag/atomic_flag_clear.pass.cpp @@ -18,7 +18,7 @@ #include #include -int main() +int main(int, char**) { { std::atomic_flag f; @@ -34,4 +34,6 @@ int main() atomic_flag_clear(&f); assert(f.test_and_set() == 0); } + + return 0; } diff --git a/libcxx/test/std/atomics/atomics.flag/atomic_flag_clear_explicit.pass.cpp b/libcxx/test/std/atomics/atomics.flag/atomic_flag_clear_explicit.pass.cpp index 104c22b57c07c..d87291297eed5 100644 --- a/libcxx/test/std/atomics/atomics.flag/atomic_flag_clear_explicit.pass.cpp +++ b/libcxx/test/std/atomics/atomics.flag/atomic_flag_clear_explicit.pass.cpp @@ -18,7 +18,7 @@ #include #include -int main() +int main(int, char**) { { std::atomic_flag f; // uninitialized first @@ -62,4 +62,6 @@ int main() atomic_flag_clear_explicit(&f, std::memory_order_seq_cst); assert(f.test_and_set() == 0); } + + return 0; } diff --git a/libcxx/test/std/atomics/atomics.flag/atomic_flag_test_and_set.pass.cpp b/libcxx/test/std/atomics/atomics.flag/atomic_flag_test_and_set.pass.cpp index 009c859ffe482..d73dc316d96e2 100644 --- a/libcxx/test/std/atomics/atomics.flag/atomic_flag_test_and_set.pass.cpp +++ b/libcxx/test/std/atomics/atomics.flag/atomic_flag_test_and_set.pass.cpp @@ -18,7 +18,7 @@ #include #include -int main() +int main(int, char**) { { std::atomic_flag f; @@ -32,4 +32,6 @@ int main() assert(atomic_flag_test_and_set(&f) == 0); assert(f.test_and_set() == 1); } + + return 0; } diff --git a/libcxx/test/std/atomics/atomics.flag/atomic_flag_test_and_set_explicit.pass.cpp b/libcxx/test/std/atomics/atomics.flag/atomic_flag_test_and_set_explicit.pass.cpp index 3a40328be8421..972a6e84b6ff0 100644 --- a/libcxx/test/std/atomics/atomics.flag/atomic_flag_test_and_set_explicit.pass.cpp +++ b/libcxx/test/std/atomics/atomics.flag/atomic_flag_test_and_set_explicit.pass.cpp @@ -18,7 +18,7 @@ #include #include -int main() +int main(int, char**) { { std::atomic_flag f; @@ -92,4 +92,6 @@ int main() assert(atomic_flag_test_and_set_explicit(&f, std::memory_order_seq_cst) == 0); assert(f.test_and_set() == 1); } + + return 0; } diff --git a/libcxx/test/std/atomics/atomics.flag/clear.pass.cpp b/libcxx/test/std/atomics/atomics.flag/clear.pass.cpp index cc877a477b1d3..33378e4bd87ff 100644 --- a/libcxx/test/std/atomics/atomics.flag/clear.pass.cpp +++ b/libcxx/test/std/atomics/atomics.flag/clear.pass.cpp @@ -18,7 +18,7 @@ #include #include -int main() +int main(int, char**) { { std::atomic_flag f; // uninitialized @@ -76,4 +76,6 @@ int main() f.clear(std::memory_order_seq_cst); assert(f.test_and_set() == 0); } + + return 0; } diff --git a/libcxx/test/std/atomics/atomics.flag/copy_assign.fail.cpp b/libcxx/test/std/atomics/atomics.flag/copy_assign.fail.cpp index 9fa766cad2ceb..aa5a24b9e9031 100644 --- a/libcxx/test/std/atomics/atomics.flag/copy_assign.fail.cpp +++ b/libcxx/test/std/atomics/atomics.flag/copy_assign.fail.cpp @@ -15,9 +15,11 @@ #include #include -int main() +int main(int, char**) { std::atomic_flag f0; std::atomic_flag f; f = f0; + + return 0; } diff --git a/libcxx/test/std/atomics/atomics.flag/copy_ctor.fail.cpp b/libcxx/test/std/atomics/atomics.flag/copy_ctor.fail.cpp index f167651c92558..10deaf1256d9b 100644 --- a/libcxx/test/std/atomics/atomics.flag/copy_ctor.fail.cpp +++ b/libcxx/test/std/atomics/atomics.flag/copy_ctor.fail.cpp @@ -15,8 +15,10 @@ #include #include -int main() +int main(int, char**) { std::atomic_flag f0; std::atomic_flag f(f0); + + return 0; } diff --git a/libcxx/test/std/atomics/atomics.flag/copy_volatile_assign.fail.cpp b/libcxx/test/std/atomics/atomics.flag/copy_volatile_assign.fail.cpp index 128778ab92f6b..a453fab28766c 100644 --- a/libcxx/test/std/atomics/atomics.flag/copy_volatile_assign.fail.cpp +++ b/libcxx/test/std/atomics/atomics.flag/copy_volatile_assign.fail.cpp @@ -15,9 +15,11 @@ #include #include -int main() +int main(int, char**) { std::atomic_flag f0; volatile std::atomic_flag f; f = f0; + + return 0; } diff --git a/libcxx/test/std/atomics/atomics.flag/default.pass.cpp b/libcxx/test/std/atomics/atomics.flag/default.pass.cpp index 515e8108c1b7a..6a0d907fde94f 100644 --- a/libcxx/test/std/atomics/atomics.flag/default.pass.cpp +++ b/libcxx/test/std/atomics/atomics.flag/default.pass.cpp @@ -20,7 +20,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { std::atomic_flag f; f.clear(); @@ -32,4 +32,6 @@ int main() assert(!zero.test_and_set()); zero.~A(); } + + return 0; } diff --git a/libcxx/test/std/atomics/atomics.flag/init.pass.cpp b/libcxx/test/std/atomics/atomics.flag/init.pass.cpp index 8ca3bc9ccda7c..a45784d802b3b 100644 --- a/libcxx/test/std/atomics/atomics.flag/init.pass.cpp +++ b/libcxx/test/std/atomics/atomics.flag/init.pass.cpp @@ -18,8 +18,10 @@ #include #include -int main() +int main(int, char**) { std::atomic_flag f = ATOMIC_FLAG_INIT; assert(f.test_and_set() == 0); + + return 0; } diff --git a/libcxx/test/std/atomics/atomics.flag/test_and_set.pass.cpp b/libcxx/test/std/atomics/atomics.flag/test_and_set.pass.cpp index d567734d14605..1a198c1be84f3 100644 --- a/libcxx/test/std/atomics/atomics.flag/test_and_set.pass.cpp +++ b/libcxx/test/std/atomics/atomics.flag/test_and_set.pass.cpp @@ -18,7 +18,7 @@ #include #include -int main() +int main(int, char**) { { std::atomic_flag f; @@ -104,4 +104,6 @@ int main() assert(f.test_and_set(std::memory_order_seq_cst) == 0); assert(f.test_and_set(std::memory_order_seq_cst) == 1); } + + return 0; } diff --git a/libcxx/test/std/atomics/atomics.general/nothing_to_do.pass.cpp b/libcxx/test/std/atomics/atomics.general/nothing_to_do.pass.cpp index 02fe32ece4841..779762e7e995d 100644 --- a/libcxx/test/std/atomics/atomics.general/nothing_to_do.pass.cpp +++ b/libcxx/test/std/atomics/atomics.general/nothing_to_do.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/atomics/atomics.general/replace_failure_order.pass.cpp b/libcxx/test/std/atomics/atomics.general/replace_failure_order.pass.cpp index b246fc016fbb6..ee23841382bfc 100644 --- a/libcxx/test/std/atomics/atomics.general/replace_failure_order.pass.cpp +++ b/libcxx/test/std/atomics/atomics.general/replace_failure_order.pass.cpp @@ -23,7 +23,7 @@ #include -int main() { +int main(int, char**) { std::atomic i; volatile std::atomic v; int exp = 0; diff --git a/libcxx/test/std/atomics/atomics.lockfree/isalwayslockfree.pass.cpp b/libcxx/test/std/atomics/atomics.lockfree/isalwayslockfree.pass.cpp index 5d1f3ba9a7ce1..523f477cad43c 100644 --- a/libcxx/test/std/atomics/atomics.lockfree/isalwayslockfree.pass.cpp +++ b/libcxx/test/std/atomics/atomics.lockfree/isalwayslockfree.pass.cpp @@ -39,8 +39,8 @@ template void checkLongLongTypes() { - static_assert(std::atomic::is_always_lock_free == (2 == ATOMIC_LLONG_LOCK_FREE)); - static_assert(std::atomic::is_always_lock_free == (2 == ATOMIC_LLONG_LOCK_FREE)); + static_assert(std::atomic::is_always_lock_free == (2 == ATOMIC_LLONG_LOCK_FREE), ""); + static_assert(std::atomic::is_always_lock_free == (2 == ATOMIC_LLONG_LOCK_FREE), ""); } // Used to make the calls to __atomic_always_lock_free dependent on a template @@ -116,22 +116,22 @@ void run() CHECK_ALWAYS_LOCK_FREE(union IntFloat { int i; float f; }); // C macro and static constexpr must be consistent. - static_assert(std::atomic::is_always_lock_free == (2 == ATOMIC_BOOL_LOCK_FREE)); - static_assert(std::atomic::is_always_lock_free == (2 == ATOMIC_CHAR_LOCK_FREE)); - static_assert(std::atomic::is_always_lock_free == (2 == ATOMIC_CHAR_LOCK_FREE)); - static_assert(std::atomic::is_always_lock_free == (2 == ATOMIC_CHAR_LOCK_FREE)); - static_assert(std::atomic::is_always_lock_free == (2 == ATOMIC_CHAR16_T_LOCK_FREE)); - static_assert(std::atomic::is_always_lock_free == (2 == ATOMIC_CHAR32_T_LOCK_FREE)); - static_assert(std::atomic::is_always_lock_free == (2 == ATOMIC_WCHAR_T_LOCK_FREE)); - static_assert(std::atomic::is_always_lock_free == (2 == ATOMIC_SHORT_LOCK_FREE)); - static_assert(std::atomic::is_always_lock_free == (2 == ATOMIC_SHORT_LOCK_FREE)); - static_assert(std::atomic::is_always_lock_free == (2 == ATOMIC_INT_LOCK_FREE)); - static_assert(std::atomic::is_always_lock_free == (2 == ATOMIC_INT_LOCK_FREE)); - static_assert(std::atomic::is_always_lock_free == (2 == ATOMIC_LONG_LOCK_FREE)); - static_assert(std::atomic::is_always_lock_free == (2 == ATOMIC_LONG_LOCK_FREE)); + static_assert(std::atomic::is_always_lock_free == (2 == ATOMIC_BOOL_LOCK_FREE), ""); + static_assert(std::atomic::is_always_lock_free == (2 == ATOMIC_CHAR_LOCK_FREE), ""); + static_assert(std::atomic::is_always_lock_free == (2 == ATOMIC_CHAR_LOCK_FREE), ""); + static_assert(std::atomic::is_always_lock_free == (2 == ATOMIC_CHAR_LOCK_FREE), ""); + static_assert(std::atomic::is_always_lock_free == (2 == ATOMIC_CHAR16_T_LOCK_FREE), ""); + static_assert(std::atomic::is_always_lock_free == (2 == ATOMIC_CHAR32_T_LOCK_FREE), ""); + static_assert(std::atomic::is_always_lock_free == (2 == ATOMIC_WCHAR_T_LOCK_FREE), ""); + static_assert(std::atomic::is_always_lock_free == (2 == ATOMIC_SHORT_LOCK_FREE), ""); + static_assert(std::atomic::is_always_lock_free == (2 == ATOMIC_SHORT_LOCK_FREE), ""); + static_assert(std::atomic::is_always_lock_free == (2 == ATOMIC_INT_LOCK_FREE), ""); + static_assert(std::atomic::is_always_lock_free == (2 == ATOMIC_INT_LOCK_FREE), ""); + static_assert(std::atomic::is_always_lock_free == (2 == ATOMIC_LONG_LOCK_FREE), ""); + static_assert(std::atomic::is_always_lock_free == (2 == ATOMIC_LONG_LOCK_FREE), ""); checkLongLongTypes(); - static_assert(std::atomic::is_always_lock_free == (2 == ATOMIC_POINTER_LOCK_FREE)); - static_assert(std::atomic::is_always_lock_free == (2 == ATOMIC_POINTER_LOCK_FREE)); + static_assert(std::atomic::is_always_lock_free == (2 == ATOMIC_POINTER_LOCK_FREE), ""); + static_assert(std::atomic::is_always_lock_free == (2 == ATOMIC_POINTER_LOCK_FREE), ""); } -int main() { run(); } +int main(int, char**) { run(); return 0; } diff --git a/libcxx/test/std/atomics/atomics.lockfree/lockfree.pass.cpp b/libcxx/test/std/atomics/atomics.lockfree/lockfree.pass.cpp index cc448e662881a..b86893e0b9cb5 100644 --- a/libcxx/test/std/atomics/atomics.lockfree/lockfree.pass.cpp +++ b/libcxx/test/std/atomics/atomics.lockfree/lockfree.pass.cpp @@ -24,7 +24,7 @@ #include #include -int main() +int main(int, char**) { assert(ATOMIC_BOOL_LOCK_FREE == 0 || ATOMIC_BOOL_LOCK_FREE == 1 || @@ -56,4 +56,6 @@ int main() assert(ATOMIC_POINTER_LOCK_FREE == 0 || ATOMIC_POINTER_LOCK_FREE == 1 || ATOMIC_POINTER_LOCK_FREE == 2); + + return 0; } diff --git a/libcxx/test/std/atomics/atomics.order/kill_dependency.pass.cpp b/libcxx/test/std/atomics/atomics.order/kill_dependency.pass.cpp index 144bf50590747..998b0cef38b25 100644 --- a/libcxx/test/std/atomics/atomics.order/kill_dependency.pass.cpp +++ b/libcxx/test/std/atomics/atomics.order/kill_dependency.pass.cpp @@ -15,8 +15,10 @@ #include #include -int main() +int main(int, char**) { assert(std::kill_dependency(5) == 5); assert(std::kill_dependency(-5.5) == -5.5); + + return 0; } diff --git a/libcxx/test/std/atomics/atomics.order/memory_order.pass.cpp b/libcxx/test/std/atomics/atomics.order/memory_order.pass.cpp index 69a46eac3d1e3..c756d0b187b81 100644 --- a/libcxx/test/std/atomics/atomics.order/memory_order.pass.cpp +++ b/libcxx/test/std/atomics/atomics.order/memory_order.pass.cpp @@ -19,14 +19,17 @@ #include #include -int main() +int main(int, char**) { - assert(std::memory_order_relaxed == 0); - assert(std::memory_order_consume == 1); - assert(std::memory_order_acquire == 2); - assert(std::memory_order_release == 3); - assert(std::memory_order_acq_rel == 4); - assert(std::memory_order_seq_cst == 5); + assert(static_cast(std::memory_order_relaxed) == 0); + assert(static_cast(std::memory_order_consume) == 1); + assert(static_cast(std::memory_order_acquire) == 2); + assert(static_cast(std::memory_order_release) == 3); + assert(static_cast(std::memory_order_acq_rel) == 4); + assert(static_cast(std::memory_order_seq_cst) == 5); + std::memory_order o = std::memory_order_seq_cst; - assert(o == 5); + assert(static_cast(o) == 5); + + return 0; } diff --git a/libcxx/test/std/atomics/atomics.order/memory_order_new.pass.cpp b/libcxx/test/std/atomics/atomics.order/memory_order_new.pass.cpp new file mode 100644 index 0000000000000..e9a571dfa8b3a --- /dev/null +++ b/libcxx/test/std/atomics/atomics.order/memory_order_new.pass.cpp @@ -0,0 +1,23 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// +// UNSUPPORTED: libcpp-has-no-threads, c++98, c++03, c++11, c++14, c++17 + +#include + +int main(int, char**) +{ + static_assert(std::memory_order_relaxed == std::memory_order::relaxed); + static_assert(std::memory_order_consume == std::memory_order::consume); + static_assert(std::memory_order_acquire == std::memory_order::acquire); + static_assert(std::memory_order_release == std::memory_order::release); + static_assert(std::memory_order_acq_rel == std::memory_order::acq_rel); + static_assert(std::memory_order_seq_cst == std::memory_order::seq_cst); + + return 0; +} diff --git a/libcxx/test/std/atomics/atomics.syn/nothing_to_do.pass.cpp b/libcxx/test/std/atomics/atomics.syn/nothing_to_do.pass.cpp index 02fe32ece4841..779762e7e995d 100644 --- a/libcxx/test/std/atomics/atomics.syn/nothing_to_do.pass.cpp +++ b/libcxx/test/std/atomics/atomics.syn/nothing_to_do.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/atomics/atomics.types.generic/address.pass.cpp b/libcxx/test/std/atomics/atomics.types.generic/address.pass.cpp index 98c8d4f24a24e..598889736ab91 100644 --- a/libcxx/test/std/atomics/atomics.types.generic/address.pass.cpp +++ b/libcxx/test/std/atomics/atomics.types.generic/address.pass.cpp @@ -136,7 +136,9 @@ void test() do_test(); } -int main() +int main(int, char**) { test, int*>(); + + return 0; } diff --git a/libcxx/test/std/atomics/atomics.types.generic/bool.pass.cpp b/libcxx/test/std/atomics/atomics.types.generic/bool.pass.cpp index 33901ce9b318c..154d0bfe67d56 100644 --- a/libcxx/test/std/atomics/atomics.types.generic/bool.pass.cpp +++ b/libcxx/test/std/atomics/atomics.types.generic/bool.pass.cpp @@ -58,7 +58,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { { volatile std::atomic obj(true); @@ -232,4 +232,6 @@ int main() assert(zero == false); zero.~A(); } + + return 0; } diff --git a/libcxx/test/std/atomics/atomics.types.generic/cstdint_typedefs.pass.cpp b/libcxx/test/std/atomics/atomics.types.generic/cstdint_typedefs.pass.cpp index 0c76e7b0fd643..a0648ff9c0a18 100644 --- a/libcxx/test/std/atomics/atomics.types.generic/cstdint_typedefs.pass.cpp +++ b/libcxx/test/std/atomics/atomics.types.generic/cstdint_typedefs.pass.cpp @@ -39,7 +39,7 @@ #include #include -int main() +int main(int, char**) { static_assert((std::is_same, std::atomic_int_least8_t>::value), ""); static_assert((std::is_same, std::atomic_uint_least8_t>::value), ""); @@ -65,4 +65,6 @@ int main() static_assert((std::is_same, std::atomic_ptrdiff_t>::value), ""); static_assert((std::is_same, std::atomic_intmax_t>::value), ""); static_assert((std::is_same, std::atomic_uintmax_t>::value), ""); + + return 0; } diff --git a/libcxx/test/std/atomics/atomics.types.generic/integral.pass.cpp b/libcxx/test/std/atomics/atomics.types.generic/integral.pass.cpp index e59bee43c55d5..62ef06bcc16eb 100644 --- a/libcxx/test/std/atomics/atomics.types.generic/integral.pass.cpp +++ b/libcxx/test/std/atomics/atomics.types.generic/integral.pass.cpp @@ -167,7 +167,7 @@ void test() } -int main() +int main(int, char**) { test(); test(); @@ -220,4 +220,6 @@ int main() test(); test(); test(); + + return 0; } diff --git a/libcxx/test/std/atomics/atomics.types.generic/integral_typedefs.pass.cpp b/libcxx/test/std/atomics/atomics.types.generic/integral_typedefs.pass.cpp index d63043b847321..faa682b8cef25 100644 --- a/libcxx/test/std/atomics/atomics.types.generic/integral_typedefs.pass.cpp +++ b/libcxx/test/std/atomics/atomics.types.generic/integral_typedefs.pass.cpp @@ -40,7 +40,7 @@ #include #include -int main() +int main(int, char**) { static_assert((std::is_same, std::atomic_char>::value), ""); static_assert((std::is_same, std::atomic_schar>::value), ""); @@ -71,4 +71,6 @@ int main() static_assert((std::is_same, std::atomic_uint32_t>::value), ""); static_assert((std::is_same, std::atomic_int64_t>::value), ""); static_assert((std::is_same, std::atomic_uint64_t>::value), ""); + + return 0; } diff --git a/libcxx/test/std/atomics/atomics.types.generic/trivially_copyable.fail.cpp b/libcxx/test/std/atomics/atomics.types.generic/trivially_copyable.fail.cpp index 6ea65495c4342..3ec8ed25c9765 100644 --- a/libcxx/test/std/atomics/atomics.types.generic/trivially_copyable.fail.cpp +++ b/libcxx/test/std/atomics/atomics.types.generic/trivially_copyable.fail.cpp @@ -63,7 +63,9 @@ void test ( T t ) { std::atomic t0(t); } -int main() +int main(int, char**) { test(NotTriviallyCopyable(42)); + + return 0; } diff --git a/libcxx/test/std/atomics/atomics.types.generic/trivially_copyable.pass.cpp b/libcxx/test/std/atomics/atomics.types.generic/trivially_copyable.pass.cpp index 03c68de8658eb..229761eb32685 100644 --- a/libcxx/test/std/atomics/atomics.types.generic/trivially_copyable.pass.cpp +++ b/libcxx/test/std/atomics/atomics.types.generic/trivially_copyable.pass.cpp @@ -68,9 +68,11 @@ void test ( T t ) { std::atomic t0(t); } -int main() +int main(int, char**) { test(TriviallyCopyable(42)); test(std::this_thread::get_id()); test(std::chrono::nanoseconds(2)); + + return 0; } diff --git a/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.arith/nothing_to_do.pass.cpp b/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.arith/nothing_to_do.pass.cpp index 02fe32ece4841..779762e7e995d 100644 --- a/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.arith/nothing_to_do.pass.cpp +++ b/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.arith/nothing_to_do.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.general/nothing_to_do.pass.cpp b/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.general/nothing_to_do.pass.cpp index 02fe32ece4841..779762e7e995d 100644 --- a/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.general/nothing_to_do.pass.cpp +++ b/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.general/nothing_to_do.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.pointer/nothing_to_do.pass.cpp b/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.pointer/nothing_to_do.pass.cpp index 02fe32ece4841..779762e7e995d 100644 --- a/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.pointer/nothing_to_do.pass.cpp +++ b/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.pointer/nothing_to_do.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_compare_exchange_strong.pass.cpp b/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_compare_exchange_strong.pass.cpp index 8d96adeea74d8..041845d5be2a2 100644 --- a/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_compare_exchange_strong.pass.cpp +++ b/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_compare_exchange_strong.pass.cpp @@ -55,7 +55,9 @@ struct TestFn { } }; -int main() +int main(int, char**) { TestEachAtomicType()(); + + return 0; } diff --git a/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_compare_exchange_strong_explicit.pass.cpp b/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_compare_exchange_strong_explicit.pass.cpp index b557817d6908d..99a8508863368 100644 --- a/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_compare_exchange_strong_explicit.pass.cpp +++ b/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_compare_exchange_strong_explicit.pass.cpp @@ -62,7 +62,9 @@ struct TestFn { } }; -int main() +int main(int, char**) { TestEachAtomicType()(); + + return 0; } diff --git a/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_compare_exchange_weak.pass.cpp b/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_compare_exchange_weak.pass.cpp index 53f4174ec86ca..a2a9e205db8ec 100644 --- a/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_compare_exchange_weak.pass.cpp +++ b/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_compare_exchange_weak.pass.cpp @@ -56,7 +56,9 @@ struct TestFn { } }; -int main() +int main(int, char**) { TestEachAtomicType()(); + + return 0; } diff --git a/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_compare_exchange_weak_explicit.pass.cpp b/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_compare_exchange_weak_explicit.pass.cpp index 7edfb91cdc69b..2ad17f1cbe6e7 100644 --- a/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_compare_exchange_weak_explicit.pass.cpp +++ b/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_compare_exchange_weak_explicit.pass.cpp @@ -64,7 +64,9 @@ struct TestFn { } }; -int main() +int main(int, char**) { TestEachAtomicType()(); + + return 0; } diff --git a/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_exchange.pass.cpp b/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_exchange.pass.cpp index 43e6b804ba2e9..d13238e652839 100644 --- a/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_exchange.pass.cpp +++ b/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_exchange.pass.cpp @@ -41,7 +41,9 @@ struct TestFn { }; -int main() +int main(int, char**) { TestEachAtomicType()(); + + return 0; } diff --git a/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_exchange_explicit.pass.cpp b/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_exchange_explicit.pass.cpp index 14e8ed1af60a0..2acbcb20f7ce8 100644 --- a/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_exchange_explicit.pass.cpp +++ b/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_exchange_explicit.pass.cpp @@ -43,7 +43,9 @@ struct TestFn { }; -int main() +int main(int, char**) { TestEachAtomicType()(); + + return 0; } diff --git a/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_add.pass.cpp b/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_add.pass.cpp index deb68b170e4e1..f84a489834867 100644 --- a/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_add.pass.cpp +++ b/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_add.pass.cpp @@ -74,9 +74,11 @@ void testp() } } -int main() +int main(int, char**) { TestEachIntegralType()(); testp(); testp(); + + return 0; } diff --git a/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_add_explicit.pass.cpp b/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_add_explicit.pass.cpp index a75acb34118d0..fbdf3fffcd73e 100644 --- a/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_add_explicit.pass.cpp +++ b/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_add_explicit.pass.cpp @@ -79,9 +79,11 @@ testp() } } -int main() +int main(int, char**) { TestEachIntegralType()(); testp(); testp(); + + return 0; } diff --git a/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_and.pass.cpp b/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_and.pass.cpp index f80d7a82c5d8c..dfaaaa3e5b461 100644 --- a/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_and.pass.cpp +++ b/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_and.pass.cpp @@ -44,7 +44,9 @@ struct TestFn { } }; -int main() +int main(int, char**) { TestEachIntegralType()(); + + return 0; } diff --git a/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_and_explicit.pass.cpp b/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_and_explicit.pass.cpp index 77a89dc79e7b3..d31245a84217c 100644 --- a/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_and_explicit.pass.cpp +++ b/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_and_explicit.pass.cpp @@ -46,7 +46,9 @@ struct TestFn { } }; -int main() +int main(int, char**) { TestEachIntegralType()(); + + return 0; } diff --git a/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_or.pass.cpp b/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_or.pass.cpp index 19c321539e3f1..741dca00e86c7 100644 --- a/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_or.pass.cpp +++ b/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_or.pass.cpp @@ -44,7 +44,9 @@ struct TestFn { } }; -int main() +int main(int, char**) { TestEachIntegralType()(); + + return 0; } diff --git a/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_or_explicit.pass.cpp b/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_or_explicit.pass.cpp index af0a7e8ab8c0c..e56e946f43cb1 100644 --- a/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_or_explicit.pass.cpp +++ b/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_or_explicit.pass.cpp @@ -46,7 +46,9 @@ struct TestFn { } }; -int main() +int main(int, char**) { TestEachIntegralType()(); + + return 0; } diff --git a/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_sub.pass.cpp b/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_sub.pass.cpp index 8298327a994bb..13fde4ad6a75c 100644 --- a/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_sub.pass.cpp +++ b/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_sub.pass.cpp @@ -74,9 +74,11 @@ void testp() } } -int main() +int main(int, char**) { TestEachIntegralType()(); testp(); testp(); + + return 0; } diff --git a/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_sub_explicit.pass.cpp b/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_sub_explicit.pass.cpp index b7447ad7a7211..af97bcc60221e 100644 --- a/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_sub_explicit.pass.cpp +++ b/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_sub_explicit.pass.cpp @@ -79,9 +79,11 @@ void testp() } } -int main() +int main(int, char**) { TestEachIntegralType()(); testp(); testp(); + + return 0; } diff --git a/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_xor.pass.cpp b/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_xor.pass.cpp index 5eaf5039faa29..0e6f99f36291a 100644 --- a/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_xor.pass.cpp +++ b/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_xor.pass.cpp @@ -44,7 +44,9 @@ struct TestFn { } }; -int main() +int main(int, char**) { TestEachIntegralType()(); + + return 0; } diff --git a/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_xor_explicit.pass.cpp b/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_xor_explicit.pass.cpp index 83ac8dbe52f9f..ece15694561e4 100644 --- a/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_xor_explicit.pass.cpp +++ b/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_xor_explicit.pass.cpp @@ -46,7 +46,9 @@ struct TestFn { } }; -int main() +int main(int, char**) { TestEachIntegralType()(); + + return 0; } diff --git a/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_init.pass.cpp b/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_init.pass.cpp index bcb729469fbab..0e5b920f91e8b 100644 --- a/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_init.pass.cpp +++ b/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_init.pass.cpp @@ -38,7 +38,9 @@ struct TestFn { } }; -int main() +int main(int, char**) { TestEachAtomicType()(); + + return 0; } diff --git a/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_is_lock_free.pass.cpp b/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_is_lock_free.pass.cpp index e8352cd8e3cd0..bfa24dae56244 100644 --- a/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_is_lock_free.pass.cpp +++ b/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_is_lock_free.pass.cpp @@ -40,8 +40,10 @@ struct A char _[4]; }; -int main() +int main(int, char**) { TestFn()(); TestEachAtomicType()(); + + return 0; } diff --git a/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_load.pass.cpp b/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_load.pass.cpp index 9431331d676bf..b775c54673726 100644 --- a/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_load.pass.cpp +++ b/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_load.pass.cpp @@ -38,7 +38,9 @@ struct TestFn { } }; -int main() +int main(int, char**) { TestEachAtomicType()(); + + return 0; } diff --git a/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_load_explicit.pass.cpp b/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_load_explicit.pass.cpp index d6cf08605027c..0384baa5a7f4b 100644 --- a/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_load_explicit.pass.cpp +++ b/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_load_explicit.pass.cpp @@ -38,7 +38,9 @@ struct TestFn { } }; -int main() +int main(int, char**) { TestEachAtomicType()(); + + return 0; } diff --git a/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_store.pass.cpp b/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_store.pass.cpp index 6f91792fba61c..0fb3bc7dda936 100644 --- a/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_store.pass.cpp +++ b/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_store.pass.cpp @@ -38,7 +38,9 @@ struct TestFn { }; -int main() +int main(int, char**) { TestEachAtomicType()(); + + return 0; } diff --git a/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_store_explicit.pass.cpp b/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_store_explicit.pass.cpp index c63c5cc1bbb9e..11aa295dee4b2 100644 --- a/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_store_explicit.pass.cpp +++ b/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_store_explicit.pass.cpp @@ -38,7 +38,9 @@ struct TestFn { }; -int main() +int main(int, char**) { TestEachAtomicType()(); + + return 0; } diff --git a/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_var_init.pass.cpp b/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_var_init.pass.cpp index 9111d8bd0371b..1588af3273fb6 100644 --- a/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_var_init.pass.cpp +++ b/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_var_init.pass.cpp @@ -17,8 +17,10 @@ #include #include -int main() +int main(int, char**) { std::atomic v = ATOMIC_VAR_INIT(5); assert(v == 5); + + return 0; } diff --git a/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/ctor.pass.cpp b/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/ctor.pass.cpp index 563a053373e0d..d692e931b49a4 100644 --- a/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/ctor.pass.cpp +++ b/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/ctor.pass.cpp @@ -56,8 +56,10 @@ struct TestFunc { }; -int main() +int main(int, char**) { TestFunc()(); TestEachIntegralType()(); + + return 0; } diff --git a/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.templ/nothing_to_do.pass.cpp b/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.templ/nothing_to_do.pass.cpp index 02fe32ece4841..779762e7e995d 100644 --- a/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.templ/nothing_to_do.pass.cpp +++ b/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.templ/nothing_to_do.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/atomics/atomics.types.operations/nothing_to_do.pass.cpp b/libcxx/test/std/atomics/atomics.types.operations/nothing_to_do.pass.cpp index 02fe32ece4841..779762e7e995d 100644 --- a/libcxx/test/std/atomics/atomics.types.operations/nothing_to_do.pass.cpp +++ b/libcxx/test/std/atomics/atomics.types.operations/nothing_to_do.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/containers/associative/iterator_types.pass.cpp b/libcxx/test/std/containers/associative/iterator_types.pass.cpp index f18fa2b4fc4f6..1b8556fb558aa 100644 --- a/libcxx/test/std/containers/associative/iterator_types.pass.cpp +++ b/libcxx/test/std/containers/associative/iterator_types.pass.cpp @@ -50,7 +50,7 @@ void testSet() { } } -int main() { +int main(int, char**) { { typedef std::map Map; typedef std::pair ValueTp; @@ -127,4 +127,6 @@ int main() { testSet>(); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/associative/map/PR28469_undefined_behavior_segfault.sh.cpp b/libcxx/test/std/containers/associative/map/PR28469_undefined_behavior_segfault.sh.cpp index ff0be20842d03..030fdaf39184a 100644 --- a/libcxx/test/std/containers/associative/map/PR28469_undefined_behavior_segfault.sh.cpp +++ b/libcxx/test/std/containers/associative/map/PR28469_undefined_behavior_segfault.sh.cpp @@ -24,7 +24,9 @@ struct F { F() { m[42] = &dummy; } }; -int main() { +int main(int, char**) { F f; f = F(); + + return 0; } diff --git a/libcxx/test/std/containers/associative/map/allocator_mismatch.fail.cpp b/libcxx/test/std/containers/associative/map/allocator_mismatch.fail.cpp index 08f5ee94fb03a..faec5aa401e13 100644 --- a/libcxx/test/std/containers/associative/map/allocator_mismatch.fail.cpp +++ b/libcxx/test/std/containers/associative/map/allocator_mismatch.fail.cpp @@ -11,7 +11,9 @@ #include -int main() +int main(int, char**) { std::map, std::allocator > m; + + return 0; } diff --git a/libcxx/test/std/containers/associative/map/compare.pass.cpp b/libcxx/test/std/containers/associative/map/compare.pass.cpp index fedc9d2b3a18a..84de271842be6 100644 --- a/libcxx/test/std/containers/associative/map/compare.pass.cpp +++ b/libcxx/test/std/containers/associative/map/compare.pass.cpp @@ -24,7 +24,7 @@ struct Key { bool operator< (const Key&) const { return false; } }; -int main() +int main(int, char**) { typedef std::map MapT; typedef MapT::iterator Iter; @@ -48,4 +48,6 @@ int main() assert(!result2.second); assert(map[Key(0)] == 42); } + + return 0; } diff --git a/libcxx/test/std/containers/associative/map/gcc_workaround.pass.cpp b/libcxx/test/std/containers/associative/map/gcc_workaround.pass.cpp index 622449facc118..6c87e51f79441 100644 --- a/libcxx/test/std/containers/associative/map/gcc_workaround.pass.cpp +++ b/libcxx/test/std/containers/associative/map/gcc_workaround.pass.cpp @@ -1,9 +1,8 @@ //===----------------------------------------------------------------------===// // -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// @@ -15,7 +14,4 @@ std::map::iterator it; using std::set; using std::multiset; -int main(void) -{ - return 0; -} +int main(int, char**) { return 0; } diff --git a/libcxx/test/std/containers/associative/map/incomplete_type.pass.cpp b/libcxx/test/std/containers/associative/map/incomplete_type.pass.cpp index 1bc320e9cbff3..a45c50c32940f 100644 --- a/libcxx/test/std/containers/associative/map/incomplete_type.pass.cpp +++ b/libcxx/test/std/containers/associative/map/incomplete_type.pass.cpp @@ -23,6 +23,8 @@ struct A { inline bool operator==(A const& L, A const& R) { return &L == &R; } inline bool operator<(A const& L, A const& R) { return L.data < R.data; } -int main() { +int main(int, char**) { A a; + + return 0; } diff --git a/libcxx/test/std/containers/associative/map/map.access/at.pass.cpp b/libcxx/test/std/containers/associative/map/map.access/at.pass.cpp index 475dd641cc2c5..c13c6a64acb20 100644 --- a/libcxx/test/std/containers/associative/map/map.access/at.pass.cpp +++ b/libcxx/test/std/containers/associative/map/map.access/at.pass.cpp @@ -20,7 +20,7 @@ #include "min_allocator.h" #include "test_macros.h" -int main() +int main(int, char**) { { typedef std::pair V; @@ -160,4 +160,6 @@ int main() assert(m.size() == 7); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/associative/map/map.access/empty.fail.cpp b/libcxx/test/std/containers/associative/map/map.access/empty.fail.cpp index 0305fdb5684f6..61c4e757b0c36 100644 --- a/libcxx/test/std/containers/associative/map/map.access/empty.fail.cpp +++ b/libcxx/test/std/containers/associative/map/map.access/empty.fail.cpp @@ -20,8 +20,10 @@ #include "test_macros.h" -int main () +int main(int, char**) { std::map c; c.empty(); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} + + return 0; } diff --git a/libcxx/test/std/containers/associative/map/map.access/empty.pass.cpp b/libcxx/test/std/containers/associative/map/map.access/empty.pass.cpp index 1317ee31048d0..cff13df7af288 100644 --- a/libcxx/test/std/containers/associative/map/map.access/empty.pass.cpp +++ b/libcxx/test/std/containers/associative/map/map.access/empty.pass.cpp @@ -17,7 +17,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::map M; @@ -39,4 +39,6 @@ int main() assert(m.empty()); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/associative/map/map.access/index_key.pass.cpp b/libcxx/test/std/containers/associative/map/map.access/index_key.pass.cpp index 1d842205a8fdb..8df052e01627b 100644 --- a/libcxx/test/std/containers/associative/map/map.access/index_key.pass.cpp +++ b/libcxx/test/std/containers/associative/map/map.access/index_key.pass.cpp @@ -23,7 +23,7 @@ #include "container_test_types.h" #endif -int main() +int main(int, char**) { { typedef std::pair V; @@ -139,4 +139,6 @@ int main() assert(m.size() == 8); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/associative/map/map.access/index_rv_key.pass.cpp b/libcxx/test/std/containers/associative/map/map.access/index_rv_key.pass.cpp index 523d4e6d8822e..7effa0c64151e 100644 --- a/libcxx/test/std/containers/associative/map/map.access/index_rv_key.pass.cpp +++ b/libcxx/test/std/containers/associative/map/map.access/index_rv_key.pass.cpp @@ -23,7 +23,7 @@ #include "min_allocator.h" #include "container_test_types.h" -int main() +int main(int, char**) { { std::map m; @@ -76,4 +76,6 @@ int main() } } } + + return 0; } diff --git a/libcxx/test/std/containers/associative/map/map.access/index_tuple.pass.cpp b/libcxx/test/std/containers/associative/map/map.access/index_tuple.pass.cpp index 5f39bece03b5e..bc99f6ef8e3c3 100644 --- a/libcxx/test/std/containers/associative/map/map.access/index_tuple.pass.cpp +++ b/libcxx/test/std/containers/associative/map/map.access/index_tuple.pass.cpp @@ -22,9 +22,11 @@ #include -int main() +int main(int, char**) { using namespace std; map, size_t> m; m[make_tuple(2,3)]=7; + + return 0; } diff --git a/libcxx/test/std/containers/associative/map/map.access/iterator.pass.cpp b/libcxx/test/std/containers/associative/map/map.access/iterator.pass.cpp index c1c503733f25d..39b573a1392e0 100644 --- a/libcxx/test/std/containers/associative/map/map.access/iterator.pass.cpp +++ b/libcxx/test/std/containers/associative/map/map.access/iterator.pass.cpp @@ -32,7 +32,7 @@ #include "test_macros.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::pair V; @@ -225,4 +225,6 @@ int main() assert (!(cii != ii1 )); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/associative/map/map.access/max_size.pass.cpp b/libcxx/test/std/containers/associative/map/map.access/max_size.pass.cpp index 1bb873f4b5d84..b38cf11463897 100644 --- a/libcxx/test/std/containers/associative/map/map.access/max_size.pass.cpp +++ b/libcxx/test/std/containers/associative/map/map.access/max_size.pass.cpp @@ -20,7 +20,7 @@ #include "test_allocator.h" #include "test_macros.h" -int main() +int main(int, char**) { typedef std::pair KV; { @@ -47,4 +47,6 @@ int main() assert(c.max_size() <= max_dist); assert(c.max_size() <= alloc_max_size(c.get_allocator())); } + + return 0; } diff --git a/libcxx/test/std/containers/associative/map/map.access/size.pass.cpp b/libcxx/test/std/containers/associative/map/map.access/size.pass.cpp index 4408dc54e6442..bb4b14e026fb1 100644 --- a/libcxx/test/std/containers/associative/map/map.access/size.pass.cpp +++ b/libcxx/test/std/containers/associative/map/map.access/size.pass.cpp @@ -17,7 +17,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::map M; @@ -55,4 +55,6 @@ int main() assert(m.size() == 0); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/associative/map/map.cons/alloc.pass.cpp b/libcxx/test/std/containers/associative/map/map.cons/alloc.pass.cpp index 04000bec93efd..5bb9abc88f7d3 100644 --- a/libcxx/test/std/containers/associative/map/map.cons/alloc.pass.cpp +++ b/libcxx/test/std/containers/associative/map/map.cons/alloc.pass.cpp @@ -18,7 +18,7 @@ #include "test_allocator.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::less C; @@ -46,4 +46,6 @@ int main() assert(m.get_allocator() == A()); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/associative/map/map.cons/assign_initializer_list.pass.cpp b/libcxx/test/std/containers/associative/map/map.cons/assign_initializer_list.pass.cpp index 664d6cf083ec6..612838ef6670a 100644 --- a/libcxx/test/std/containers/associative/map/map.cons/assign_initializer_list.pass.cpp +++ b/libcxx/test/std/containers/associative/map/map.cons/assign_initializer_list.pass.cpp @@ -19,7 +19,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::pair V; @@ -69,4 +69,6 @@ int main() assert(*next(m.begin()) == V(2, 1)); assert(*next(m.begin(), 2) == V(3, 1)); } + + return 0; } diff --git a/libcxx/test/std/containers/associative/map/map.cons/compare.pass.cpp b/libcxx/test/std/containers/associative/map/map.cons/compare.pass.cpp index 2fb00ebde7c7b..40a8e38aef2f5 100644 --- a/libcxx/test/std/containers/associative/map/map.cons/compare.pass.cpp +++ b/libcxx/test/std/containers/associative/map/map.cons/compare.pass.cpp @@ -20,7 +20,7 @@ #include "../../../test_compare.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef test_compare > C; @@ -38,4 +38,6 @@ int main() assert(m.key_comp() == C(3)); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/associative/map/map.cons/compare_alloc.pass.cpp b/libcxx/test/std/containers/associative/map/map.cons/compare_alloc.pass.cpp index d4de57163d998..71bc32295e062 100644 --- a/libcxx/test/std/containers/associative/map/map.cons/compare_alloc.pass.cpp +++ b/libcxx/test/std/containers/associative/map/map.cons/compare_alloc.pass.cpp @@ -19,7 +19,7 @@ #include "test_allocator.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef test_compare > C; @@ -50,4 +50,6 @@ int main() assert(m.get_allocator() == A{}); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/associative/map/map.cons/compare_copy_constructible.fail.cpp b/libcxx/test/std/containers/associative/map/map.cons/compare_copy_constructible.fail.cpp index 1e75326dee2db..3c714de40af93 100644 --- a/libcxx/test/std/containers/associative/map/map.cons/compare_copy_constructible.fail.cpp +++ b/libcxx/test/std/containers/associative/map/map.cons/compare_copy_constructible.fail.cpp @@ -23,6 +23,8 @@ struct Comp { }; -int main() { +int main(int, char**) { std::map > m; + + return 0; } diff --git a/libcxx/test/std/containers/associative/map/map.cons/copy.pass.cpp b/libcxx/test/std/containers/associative/map/map.cons/copy.pass.cpp index 0e7266d59db23..8eec27b3eabed 100644 --- a/libcxx/test/std/containers/associative/map/map.cons/copy.pass.cpp +++ b/libcxx/test/std/containers/associative/map/map.cons/copy.pass.cpp @@ -20,7 +20,7 @@ #include "test_allocator.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::pair V; @@ -126,4 +126,6 @@ int main() assert(*next(mo.begin(), 2) == V(3, 1)); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/associative/map/map.cons/copy_alloc.pass.cpp b/libcxx/test/std/containers/associative/map/map.cons/copy_alloc.pass.cpp index 0e01b3674dfcb..d25504382e4ef 100644 --- a/libcxx/test/std/containers/associative/map/map.cons/copy_alloc.pass.cpp +++ b/libcxx/test/std/containers/associative/map/map.cons/copy_alloc.pass.cpp @@ -19,7 +19,7 @@ #include "test_allocator.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::pair V; @@ -125,4 +125,6 @@ int main() assert(*next(mo.begin(), 2) == V(3, 1)); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/associative/map/map.cons/copy_assign.pass.cpp b/libcxx/test/std/containers/associative/map/map.cons/copy_assign.pass.cpp index e63cbe951fa75..a902e05603be9 100644 --- a/libcxx/test/std/containers/associative/map/map.cons/copy_assign.pass.cpp +++ b/libcxx/test/std/containers/associative/map/map.cons/copy_assign.pass.cpp @@ -108,7 +108,7 @@ bool balanced_allocs() { } #endif -int main() +int main(int, char**) { { typedef std::pair V; @@ -337,4 +337,6 @@ int main() } assert(balanced_allocs()); #endif + + return 0; } diff --git a/libcxx/test/std/containers/associative/map/map.cons/default.pass.cpp b/libcxx/test/std/containers/associative/map/map.cons/default.pass.cpp index 3a2b7fb4837cc..5d3fcaee117ad 100644 --- a/libcxx/test/std/containers/associative/map/map.cons/default.pass.cpp +++ b/libcxx/test/std/containers/associative/map/map.cons/default.pass.cpp @@ -17,7 +17,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { std::map m; @@ -50,4 +50,6 @@ int main() assert(m.begin() == m.end()); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/associative/map/map.cons/default_noexcept.pass.cpp b/libcxx/test/std/containers/associative/map/map.cons/default_noexcept.pass.cpp index 61f87b3c1c26e..2e4b4242d2d3d 100644 --- a/libcxx/test/std/containers/associative/map/map.cons/default_noexcept.pass.cpp +++ b/libcxx/test/std/containers/associative/map/map.cons/default_noexcept.pass.cpp @@ -33,7 +33,7 @@ struct some_comp bool operator()(const T&, const T&) const { return false; } }; -int main() +int main(int, char**) { typedef std::pair V; #if defined(_LIBCPP_VERSION) @@ -54,4 +54,6 @@ int main() typedef std::map> C; static_assert(!std::is_nothrow_default_constructible::value, ""); } + + return 0; } diff --git a/libcxx/test/std/containers/associative/map/map.cons/default_recursive.pass.cpp b/libcxx/test/std/containers/associative/map/map.cons/default_recursive.pass.cpp index fb01aacf63942..af8fbe79f0bdd 100644 --- a/libcxx/test/std/containers/associative/map/map.cons/default_recursive.pass.cpp +++ b/libcxx/test/std/containers/associative/map/map.cons/default_recursive.pass.cpp @@ -23,6 +23,8 @@ struct X std::map::const_reverse_iterator cri; }; -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/containers/associative/map/map.cons/dtor_noexcept.pass.cpp b/libcxx/test/std/containers/associative/map/map.cons/dtor_noexcept.pass.cpp index fb07754c6acdd..2a2e89bf4405c 100644 --- a/libcxx/test/std/containers/associative/map/map.cons/dtor_noexcept.pass.cpp +++ b/libcxx/test/std/containers/associative/map/map.cons/dtor_noexcept.pass.cpp @@ -27,7 +27,7 @@ struct some_comp bool operator()(const T&, const T&) const noexcept { return false; } }; -int main() +int main(int, char**) { typedef std::pair V; { @@ -48,4 +48,6 @@ int main() static_assert(!std::is_nothrow_destructible::value, ""); } #endif // _LIBCPP_VERSION + + return 0; } diff --git a/libcxx/test/std/containers/associative/map/map.cons/initializer_list.pass.cpp b/libcxx/test/std/containers/associative/map/map.cons/initializer_list.pass.cpp index b7f916c111942..1303f7ef2bad4 100644 --- a/libcxx/test/std/containers/associative/map/map.cons/initializer_list.pass.cpp +++ b/libcxx/test/std/containers/associative/map/map.cons/initializer_list.pass.cpp @@ -19,7 +19,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::pair V; @@ -61,4 +61,6 @@ int main() assert(*next(m.begin()) == V(2, 1)); assert(*next(m.begin(), 2) == V(3, 1)); } + + return 0; } diff --git a/libcxx/test/std/containers/associative/map/map.cons/initializer_list_compare.pass.cpp b/libcxx/test/std/containers/associative/map/map.cons/initializer_list_compare.pass.cpp index 887597768bc72..9b6a47ac334ca 100644 --- a/libcxx/test/std/containers/associative/map/map.cons/initializer_list_compare.pass.cpp +++ b/libcxx/test/std/containers/associative/map/map.cons/initializer_list_compare.pass.cpp @@ -19,7 +19,7 @@ #include "../../../test_compare.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::pair V; @@ -63,4 +63,6 @@ int main() assert(*next(m.begin(), 2) == V(3, 1)); assert(m.key_comp() == C(3)); } + + return 0; } diff --git a/libcxx/test/std/containers/associative/map/map.cons/initializer_list_compare_alloc.pass.cpp b/libcxx/test/std/containers/associative/map/map.cons/initializer_list_compare_alloc.pass.cpp index 5288d64f01d66..0da3115f76f7c 100644 --- a/libcxx/test/std/containers/associative/map/map.cons/initializer_list_compare_alloc.pass.cpp +++ b/libcxx/test/std/containers/associative/map/map.cons/initializer_list_compare_alloc.pass.cpp @@ -20,7 +20,7 @@ #include "test_allocator.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::pair V; @@ -116,4 +116,6 @@ int main() assert(m.key_comp() == C(3)); assert(m.get_allocator() == a); } + + return 0; } diff --git a/libcxx/test/std/containers/associative/map/map.cons/iter_iter.pass.cpp b/libcxx/test/std/containers/associative/map/map.cons/iter_iter.pass.cpp index 2a17bffb50a03..243800cfd9ba9 100644 --- a/libcxx/test/std/containers/associative/map/map.cons/iter_iter.pass.cpp +++ b/libcxx/test/std/containers/associative/map/map.cons/iter_iter.pass.cpp @@ -18,7 +18,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::pair V; @@ -64,4 +64,6 @@ int main() assert(*next(m.begin(), 2) == V(3, 1)); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/associative/map/map.cons/iter_iter_comp.pass.cpp b/libcxx/test/std/containers/associative/map/map.cons/iter_iter_comp.pass.cpp index 41672578333ee..12a079ea01c72 100644 --- a/libcxx/test/std/containers/associative/map/map.cons/iter_iter_comp.pass.cpp +++ b/libcxx/test/std/containers/associative/map/map.cons/iter_iter_comp.pass.cpp @@ -19,7 +19,7 @@ #include "../../../test_compare.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::pair V; @@ -69,4 +69,6 @@ int main() assert(*next(m.begin(), 2) == V(3, 1)); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/associative/map/map.cons/iter_iter_comp_alloc.pass.cpp b/libcxx/test/std/containers/associative/map/map.cons/iter_iter_comp_alloc.pass.cpp index c8861573a77a6..56396799dc9b3 100644 --- a/libcxx/test/std/containers/associative/map/map.cons/iter_iter_comp_alloc.pass.cpp +++ b/libcxx/test/std/containers/associative/map/map.cons/iter_iter_comp_alloc.pass.cpp @@ -22,7 +22,7 @@ #include "test_allocator.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::pair V; @@ -119,4 +119,6 @@ int main() } #endif #endif + + return 0; } diff --git a/libcxx/test/std/containers/associative/map/map.cons/move.pass.cpp b/libcxx/test/std/containers/associative/map/map.cons/move.pass.cpp index f2f8dd8a97641..ecf8c9dabfd1d 100644 --- a/libcxx/test/std/containers/associative/map/map.cons/move.pass.cpp +++ b/libcxx/test/std/containers/associative/map/map.cons/move.pass.cpp @@ -21,7 +21,7 @@ #include "test_allocator.h" #include "min_allocator.h" -int main() +int main(int, char**) { typedef std::pair V; { @@ -114,4 +114,6 @@ int main() assert(mo.size() == 0); assert(distance(mo.begin(), mo.end()) == 0); } + + return 0; } diff --git a/libcxx/test/std/containers/associative/map/map.cons/move_alloc.pass.cpp b/libcxx/test/std/containers/associative/map/map.cons/move_alloc.pass.cpp index cec9253561a32..cc22a4c34fbd2 100644 --- a/libcxx/test/std/containers/associative/map/map.cons/move_alloc.pass.cpp +++ b/libcxx/test/std/containers/associative/map/map.cons/move_alloc.pass.cpp @@ -24,7 +24,7 @@ #include "min_allocator.h" #include "Counter.h" -int main() +int main(int, char**) { { typedef std::pair V; @@ -178,15 +178,18 @@ int main() M m3(std::move(m1), A()); assert(m3 == m2); LIBCPP_ASSERT(m1.empty()); - assert(Counter_base::gConstructed == num+6); + assert(Counter_base::gConstructed >= (int)(num+6)); + assert(Counter_base::gConstructed <= (int)(num+6+m1.size())); { M m4(std::move(m2), A(5)); - assert(Counter_base::gConstructed == num+6); + assert(Counter_base::gConstructed >= (int)(num+6)); + assert(Counter_base::gConstructed <= (int)(num+6+m1.size()+m2.size())); assert(m4 == m3); LIBCPP_ASSERT(m2.empty()); } - assert(Counter_base::gConstructed == num+3); + assert(Counter_base::gConstructed >= (int)(num+3)); + assert(Counter_base::gConstructed <= (int)(num+3+m1.size()+m2.size())); } assert(Counter_base::gConstructed == 0); } @@ -268,4 +271,6 @@ int main() assert(m3.key_comp() == C(5)); LIBCPP_ASSERT(m1.empty()); } + + return 0; } diff --git a/libcxx/test/std/containers/associative/map/map.cons/move_assign.pass.cpp b/libcxx/test/std/containers/associative/map/map.cons/move_assign.pass.cpp index be06d49c958a2..758d0f83f86cb 100644 --- a/libcxx/test/std/containers/associative/map/map.cons/move_assign.pass.cpp +++ b/libcxx/test/std/containers/associative/map/map.cons/move_assign.pass.cpp @@ -22,7 +22,7 @@ #include "test_allocator.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::pair V; @@ -184,4 +184,6 @@ int main() assert(m3.key_comp() == C(5)); assert(m1.empty()); } + + return 0; } diff --git a/libcxx/test/std/containers/associative/map/map.cons/move_assign_noexcept.pass.cpp b/libcxx/test/std/containers/associative/map/map.cons/move_assign_noexcept.pass.cpp index 42bc980b7e018..fcb92607163ed 100644 --- a/libcxx/test/std/containers/associative/map/map.cons/move_assign_noexcept.pass.cpp +++ b/libcxx/test/std/containers/associative/map/map.cons/move_assign_noexcept.pass.cpp @@ -33,7 +33,7 @@ struct some_comp bool operator()(const T&, const T&) const { return false; } }; -int main() +int main(int, char**) { typedef std::pair V; { @@ -54,4 +54,6 @@ int main() typedef std::map> C; static_assert(!std::is_nothrow_move_assignable::value, ""); } + + return 0; } diff --git a/libcxx/test/std/containers/associative/map/map.cons/move_noexcept.pass.cpp b/libcxx/test/std/containers/associative/map/map.cons/move_noexcept.pass.cpp index dd61439ca5f79..44b2b7e22b617 100644 --- a/libcxx/test/std/containers/associative/map/map.cons/move_noexcept.pass.cpp +++ b/libcxx/test/std/containers/associative/map/map.cons/move_noexcept.pass.cpp @@ -31,7 +31,7 @@ struct some_comp bool operator()(const T&, const T&) const { return false; } }; -int main() +int main(int, char**) { #if defined(_LIBCPP_VERSION) typedef std::pair V; @@ -52,4 +52,6 @@ int main() typedef std::map> C; static_assert(!std::is_nothrow_move_constructible::value, ""); } + + return 0; } diff --git a/libcxx/test/std/containers/associative/map/map.erasure/erase_if.pass.cpp b/libcxx/test/std/containers/associative/map/map.erasure/erase_if.pass.cpp index af7accdffc039..88a958368280a 100644 --- a/libcxx/test/std/containers/associative/map/map.erasure/erase_if.pass.cpp +++ b/libcxx/test/std/containers/associative/map/map.erasure/erase_if.pass.cpp @@ -66,7 +66,7 @@ void test() test0({1,2,3}, False, {1,2,3}); } -int main() +int main(int, char**) { test>(); test, min_allocator>>> (); @@ -74,5 +74,7 @@ int main() test>(); test>(); + + return 0; } diff --git a/libcxx/test/std/containers/associative/map/map.modifiers/clear.pass.cpp b/libcxx/test/std/containers/associative/map/map.modifiers/clear.pass.cpp index 895a8115aa064..5c6d00e9f3a8a 100644 --- a/libcxx/test/std/containers/associative/map/map.modifiers/clear.pass.cpp +++ b/libcxx/test/std/containers/associative/map/map.modifiers/clear.pass.cpp @@ -18,7 +18,7 @@ #include "test_macros.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::map M; @@ -62,4 +62,6 @@ int main() assert(m.size() == 0); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/associative/map/map.modifiers/emplace.pass.cpp b/libcxx/test/std/containers/associative/map/map.modifiers/emplace.pass.cpp index 8680ab8213b60..382e5c8badf84 100644 --- a/libcxx/test/std/containers/associative/map/map.modifiers/emplace.pass.cpp +++ b/libcxx/test/std/containers/associative/map/map.modifiers/emplace.pass.cpp @@ -23,7 +23,7 @@ #include "DefaultOnly.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::map M; @@ -159,4 +159,6 @@ int main() assert(m.begin()->first == 2); assert(m.begin()->second == 3.5); } + + return 0; } diff --git a/libcxx/test/std/containers/associative/map/map.modifiers/emplace_hint.pass.cpp b/libcxx/test/std/containers/associative/map/map.modifiers/emplace_hint.pass.cpp index 1c649093fe8aa..516d88054b776 100644 --- a/libcxx/test/std/containers/associative/map/map.modifiers/emplace_hint.pass.cpp +++ b/libcxx/test/std/containers/associative/map/map.modifiers/emplace_hint.pass.cpp @@ -22,7 +22,7 @@ #include "DefaultOnly.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::map M; @@ -154,4 +154,6 @@ int main() assert(m.begin()->first == 2); assert(m.begin()->second == 3.5); } + + return 0; } diff --git a/libcxx/test/std/containers/associative/map/map.modifiers/erase_iter.pass.cpp b/libcxx/test/std/containers/associative/map/map.modifiers/erase_iter.pass.cpp index 57de16478fa58..0f23ef638101a 100644 --- a/libcxx/test/std/containers/associative/map/map.modifiers/erase_iter.pass.cpp +++ b/libcxx/test/std/containers/associative/map/map.modifiers/erase_iter.pass.cpp @@ -25,7 +25,7 @@ struct TemplateConstructor bool operator<(const TemplateConstructor&, const TemplateConstructor&) { return false; } -int main() +int main(int, char**) { { typedef std::map M; @@ -255,4 +255,6 @@ int main() c.erase(it); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/associative/map/map.modifiers/erase_iter_iter.pass.cpp b/libcxx/test/std/containers/associative/map/map.modifiers/erase_iter_iter.pass.cpp index 875fab5389724..71fa96ce11b7e 100644 --- a/libcxx/test/std/containers/associative/map/map.modifiers/erase_iter_iter.pass.cpp +++ b/libcxx/test/std/containers/associative/map/map.modifiers/erase_iter_iter.pass.cpp @@ -17,7 +17,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::map M; @@ -153,4 +153,6 @@ int main() assert(i == m.end()); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/associative/map/map.modifiers/erase_key.pass.cpp b/libcxx/test/std/containers/associative/map/map.modifiers/erase_key.pass.cpp index 23fae9a607988..da96499b09fb5 100644 --- a/libcxx/test/std/containers/associative/map/map.modifiers/erase_key.pass.cpp +++ b/libcxx/test/std/containers/associative/map/map.modifiers/erase_key.pass.cpp @@ -17,7 +17,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::map M; @@ -271,4 +271,6 @@ int main() assert(s == 1); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/associative/map/map.modifiers/extract_iterator.pass.cpp b/libcxx/test/std/containers/associative/map/map.modifiers/extract_iterator.pass.cpp index 95ba2b711b940..f2b67c9ff630a 100644 --- a/libcxx/test/std/containers/associative/map/map.modifiers/extract_iterator.pass.cpp +++ b/libcxx/test/std/containers/associative/map/map.modifiers/extract_iterator.pass.cpp @@ -40,7 +40,7 @@ void test(Container& c) assert(c.size() == 0); } -int main() +int main(int, char**) { { using map_type = std::map; @@ -63,4 +63,6 @@ int main() min_alloc_map m = {{1, 1}, {2, 2}, {3, 3}, {4, 4}, {5, 5}, {6, 6}}; test(m); } + + return 0; } diff --git a/libcxx/test/std/containers/associative/map/map.modifiers/extract_key.pass.cpp b/libcxx/test/std/containers/associative/map/map.modifiers/extract_key.pass.cpp index 70afd45ffb6f4..018e9acf89863 100644 --- a/libcxx/test/std/containers/associative/map/map.modifiers/extract_key.pass.cpp +++ b/libcxx/test/std/containers/associative/map/map.modifiers/extract_key.pass.cpp @@ -45,7 +45,7 @@ void test(Container& c, KeyTypeIter first, KeyTypeIter last) } } -int main() +int main(int, char**) { { std::map m = {{1,1}, {2,2}, {3,3}, {4,4}, {5,5}, {6,6}}; @@ -72,4 +72,6 @@ int main() int keys[] = {1, 2, 3, 4, 5, 6}; test(m, std::begin(keys), std::end(keys)); } + + return 0; } diff --git a/libcxx/test/std/containers/associative/map/map.modifiers/insert_and_emplace_allocator_requirements.pass.cpp b/libcxx/test/std/containers/associative/map/map.modifiers/insert_and_emplace_allocator_requirements.pass.cpp index 9adb3d61957d0..f3e84002123c9 100644 --- a/libcxx/test/std/containers/associative/map/map.modifiers/insert_and_emplace_allocator_requirements.pass.cpp +++ b/libcxx/test/std/containers/associative/map/map.modifiers/insert_and_emplace_allocator_requirements.pass.cpp @@ -21,10 +21,12 @@ #include "container_test_types.h" #include "../../../map_allocator_requirement_test_templates.h" -int main() +int main(int, char**) { testMapInsert >(); testMapInsertHint >(); testMapEmplace >(); testMapEmplaceHint >(); + + return 0; } diff --git a/libcxx/test/std/containers/associative/map/map.modifiers/insert_cv.pass.cpp b/libcxx/test/std/containers/associative/map/map.modifiers/insert_cv.pass.cpp index 50801f72183c3..079b0eaca011a 100644 --- a/libcxx/test/std/containers/associative/map/map.modifiers/insert_cv.pass.cpp +++ b/libcxx/test/std/containers/associative/map/map.modifiers/insert_cv.pass.cpp @@ -59,7 +59,7 @@ void do_insert_cv_test() assert(r.first->second == 3.5); } -int main() +int main(int, char**) { do_insert_cv_test >(); #if TEST_STD_VER >= 11 @@ -68,4 +68,6 @@ int main() do_insert_cv_test(); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/associative/map/map.modifiers/insert_initializer_list.pass.cpp b/libcxx/test/std/containers/associative/map/map.modifiers/insert_initializer_list.pass.cpp index 124a40c330e0e..ea6c1380054ae 100644 --- a/libcxx/test/std/containers/associative/map/map.modifiers/insert_initializer_list.pass.cpp +++ b/libcxx/test/std/containers/associative/map/map.modifiers/insert_initializer_list.pass.cpp @@ -19,7 +19,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::pair V; @@ -65,4 +65,6 @@ int main() assert(*next(m.begin()) == V(2, 1)); assert(*next(m.begin(), 2) == V(3, 1)); } + + return 0; } diff --git a/libcxx/test/std/containers/associative/map/map.modifiers/insert_iter_cv.pass.cpp b/libcxx/test/std/containers/associative/map/map.modifiers/insert_iter_cv.pass.cpp index f993bc2027f88..a49a28c67bf53 100644 --- a/libcxx/test/std/containers/associative/map/map.modifiers/insert_iter_cv.pass.cpp +++ b/libcxx/test/std/containers/associative/map/map.modifiers/insert_iter_cv.pass.cpp @@ -55,7 +55,7 @@ void do_insert_iter_cv_test() assert(r->second == 3.5); } -int main() +int main(int, char**) { do_insert_iter_cv_test >(); #if TEST_STD_VER >= 11 @@ -64,4 +64,6 @@ int main() do_insert_iter_cv_test(); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/associative/map/map.modifiers/insert_iter_iter.pass.cpp b/libcxx/test/std/containers/associative/map/map.modifiers/insert_iter_iter.pass.cpp index 6315bc40ef8b2..a6a7763363b04 100644 --- a/libcxx/test/std/containers/associative/map/map.modifiers/insert_iter_iter.pass.cpp +++ b/libcxx/test/std/containers/associative/map/map.modifiers/insert_iter_iter.pass.cpp @@ -19,7 +19,7 @@ #include "test_iterators.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::map M; @@ -73,4 +73,6 @@ int main() assert(next(m.begin(), 2)->second == 1); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/associative/map/map.modifiers/insert_iter_rv.pass.cpp b/libcxx/test/std/containers/associative/map/map.modifiers/insert_iter_rv.pass.cpp index 45665a411c39f..8cbbebe5d3c20 100644 --- a/libcxx/test/std/containers/associative/map/map.modifiers/insert_iter_rv.pass.cpp +++ b/libcxx/test/std/containers/associative/map/map.modifiers/insert_iter_rv.pass.cpp @@ -53,7 +53,7 @@ void do_insert_iter_rv_test() assert(r->first == 3); assert(r->second == 3); } -int main() +int main(int, char**) { do_insert_iter_rv_test, std::pair>(); do_insert_iter_rv_test, std::pair>(); @@ -94,4 +94,6 @@ int main() assert(r->second == 3); } + + return 0; } diff --git a/libcxx/test/std/containers/associative/map/map.modifiers/insert_node_type.pass.cpp b/libcxx/test/std/containers/associative/map/map.modifiers/insert_node_type.pass.cpp index 3ad5f46b43b47..f3f1662600e15 100644 --- a/libcxx/test/std/containers/associative/map/map.modifiers/insert_node_type.pass.cpp +++ b/libcxx/test/std/containers/associative/map/map.modifiers/insert_node_type.pass.cpp @@ -75,10 +75,12 @@ void test(Container& c) } } -int main() +int main(int, char**) { std::map m; test(m); std::map, min_allocator>> m2; test(m2); + + return 0; } diff --git a/libcxx/test/std/containers/associative/map/map.modifiers/insert_node_type_hint.pass.cpp b/libcxx/test/std/containers/associative/map/map.modifiers/insert_node_type_hint.pass.cpp index 41d264f3f7bb7..084f7ee2c74ab 100644 --- a/libcxx/test/std/containers/associative/map/map.modifiers/insert_node_type_hint.pass.cpp +++ b/libcxx/test/std/containers/associative/map/map.modifiers/insert_node_type_hint.pass.cpp @@ -54,10 +54,12 @@ void test(Container& c) } } -int main() +int main(int, char**) { std::map m; test(m); std::map, min_allocator>> m2; test(m2); + + return 0; } diff --git a/libcxx/test/std/containers/associative/map/map.modifiers/insert_or_assign.pass.cpp b/libcxx/test/std/containers/associative/map/map.modifiers/insert_or_assign.pass.cpp index 69caa8434a4c0..bd9625a09501b 100644 --- a/libcxx/test/std/containers/associative/map/map.modifiers/insert_or_assign.pass.cpp +++ b/libcxx/test/std/containers/associative/map/map.modifiers/insert_or_assign.pass.cpp @@ -56,7 +56,7 @@ class Moveable }; -int main() +int main(int, char**) { { // pair insert_or_assign(const key_type& k, M&& obj); typedef std::map M; @@ -181,4 +181,6 @@ int main() assert(r->first.get() == 3); // key assert(r->second.get() == 5); // value } + + return 0; } diff --git a/libcxx/test/std/containers/associative/map/map.modifiers/insert_rv.pass.cpp b/libcxx/test/std/containers/associative/map/map.modifiers/insert_rv.pass.cpp index 439adfde27f16..e6fb13ee32ce7 100644 --- a/libcxx/test/std/containers/associative/map/map.modifiers/insert_rv.pass.cpp +++ b/libcxx/test/std/containers/associative/map/map.modifiers/insert_rv.pass.cpp @@ -59,7 +59,7 @@ void do_insert_rv_test() assert(r.first->second == 3); } -int main() +int main(int, char**) { do_insert_rv_test, std::pair>(); do_insert_rv_test, std::pair>(); @@ -103,4 +103,6 @@ int main() assert(r.first->first == 3); assert(r.first->second == 3); } + + return 0; } diff --git a/libcxx/test/std/containers/associative/map/map.modifiers/merge.pass.cpp b/libcxx/test/std/containers/associative/map/map.modifiers/merge.pass.cpp index 1cef30944a801..ae943df6a452b 100644 --- a/libcxx/test/std/containers/associative/map/map.modifiers/merge.pass.cpp +++ b/libcxx/test/std/containers/associative/map/map.modifiers/merge.pass.cpp @@ -49,7 +49,7 @@ struct throw_comparator }; #endif -int main() +int main(int, char**) { { std::map src{{1, 0}, {3, 0}, {5, 0}}; @@ -146,4 +146,5 @@ int main() first.merge(std::move(second)); } } + return 0; } diff --git a/libcxx/test/std/containers/associative/map/map.modifiers/try.emplace.pass.cpp b/libcxx/test/std/containers/associative/map/map.modifiers/try.emplace.pass.cpp index 43d5c3cac414a..fe9484a3ce3b1 100644 --- a/libcxx/test/std/containers/associative/map/map.modifiers/try.emplace.pass.cpp +++ b/libcxx/test/std/containers/associative/map/map.modifiers/try.emplace.pass.cpp @@ -54,7 +54,7 @@ class Moveable }; -int main() +int main(int, char**) { { // pair try_emplace(const key_type& k, Args&&... args); typedef std::map M; @@ -178,4 +178,6 @@ int main() assert(r->first.get() == 3); // key assert(r->second.get() == 4); // value } + + return 0; } diff --git a/libcxx/test/std/containers/associative/map/map.ops/count.pass.cpp b/libcxx/test/std/containers/associative/map/map.ops/count.pass.cpp index 9ac980670de34..8abae288bd8ef 100644 --- a/libcxx/test/std/containers/associative/map/map.ops/count.pass.cpp +++ b/libcxx/test/std/containers/associative/map/map.ops/count.pass.cpp @@ -20,7 +20,7 @@ #include "private_constructor.hpp" #include "is_transparent.h" -int main() +int main(int, char**) { { typedef std::pair V; @@ -190,4 +190,6 @@ int main() assert(r == 0); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/associative/map/map.ops/count0.pass.cpp b/libcxx/test/std/containers/associative/map/map.ops/count0.pass.cpp index eeaa41a00b373..cce0444fdc331 100644 --- a/libcxx/test/std/containers/associative/map/map.ops/count0.pass.cpp +++ b/libcxx/test/std/containers/associative/map/map.ops/count0.pass.cpp @@ -25,7 +25,7 @@ #include "is_transparent.h" -int main() +int main(int, char**) { { typedef std::map M; @@ -35,4 +35,6 @@ int main() typedef std::map M; assert(M().count(C2Int{5}) == 0); } + + return 0; } diff --git a/libcxx/test/std/containers/associative/map/map.ops/count1.fail.cpp b/libcxx/test/std/containers/associative/map/map.ops/count1.fail.cpp index 049ee980a8b1c..42dc59c27891f 100644 --- a/libcxx/test/std/containers/associative/map/map.ops/count1.fail.cpp +++ b/libcxx/test/std/containers/associative/map/map.ops/count1.fail.cpp @@ -28,7 +28,7 @@ #error "This test requires is C++14 (or later)" #else -int main() +int main(int, char**) { { typedef std::map M; diff --git a/libcxx/test/std/containers/associative/map/map.ops/count2.fail.cpp b/libcxx/test/std/containers/associative/map/map.ops/count2.fail.cpp index 6b4c07572f992..1fe6b927d8dee 100644 --- a/libcxx/test/std/containers/associative/map/map.ops/count2.fail.cpp +++ b/libcxx/test/std/containers/associative/map/map.ops/count2.fail.cpp @@ -28,7 +28,7 @@ #error "This test requires is C++14 (or later)" #else -int main() +int main(int, char**) { { typedef std::map M; diff --git a/libcxx/test/std/containers/associative/map/map.ops/count3.fail.cpp b/libcxx/test/std/containers/associative/map/map.ops/count3.fail.cpp index 525c57cefdd68..3fd930eb25422 100644 --- a/libcxx/test/std/containers/associative/map/map.ops/count3.fail.cpp +++ b/libcxx/test/std/containers/associative/map/map.ops/count3.fail.cpp @@ -28,7 +28,7 @@ #error "This test requires is C++14 (or later)" #else -int main() +int main(int, char**) { { typedef std::map M; diff --git a/libcxx/test/std/containers/associative/map/map.ops/count_transparent.pass.cpp b/libcxx/test/std/containers/associative/map/map.ops/count_transparent.pass.cpp index fb33d3b0adf3a..fa64902426908 100644 --- a/libcxx/test/std/containers/associative/map/map.ops/count_transparent.pass.cpp +++ b/libcxx/test/std/containers/associative/map/map.ops/count_transparent.pass.cpp @@ -40,10 +40,12 @@ struct Comp { } }; -int main() { +int main(int, char**) { std::map, int, Comp> s{ {{2, 1}, 1}, {{1, 2}, 2}, {{1, 3}, 3}, {{1, 4}, 4}, {{2, 2}, 5}}; auto cnt = s.count(1); assert(cnt == 3); + + return 0; } diff --git a/libcxx/test/std/containers/associative/map/map.ops/equal_range.pass.cpp b/libcxx/test/std/containers/associative/map/map.ops/equal_range.pass.cpp index 3c0c16fb5c259..c46e52c711c57 100644 --- a/libcxx/test/std/containers/associative/map/map.ops/equal_range.pass.cpp +++ b/libcxx/test/std/containers/associative/map/map.ops/equal_range.pass.cpp @@ -21,7 +21,7 @@ #include "private_constructor.hpp" #include "is_transparent.h" -int main() +int main(int, char**) { { typedef std::pair V; @@ -487,4 +487,6 @@ int main() assert(r.second == next(m.begin(), 8)); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/associative/map/map.ops/equal_range0.pass.cpp b/libcxx/test/std/containers/associative/map/map.ops/equal_range0.pass.cpp index 27dac20aed6a8..22f067a2a70cc 100644 --- a/libcxx/test/std/containers/associative/map/map.ops/equal_range0.pass.cpp +++ b/libcxx/test/std/containers/associative/map/map.ops/equal_range0.pass.cpp @@ -25,7 +25,7 @@ #include "is_transparent.h" -int main() +int main(int, char**) { { typedef std::map M; @@ -41,4 +41,6 @@ int main() P result = example.equal_range(C2Int{5}); assert(result.first == result.second); } + + return 0; } diff --git a/libcxx/test/std/containers/associative/map/map.ops/equal_range1.fail.cpp b/libcxx/test/std/containers/associative/map/map.ops/equal_range1.fail.cpp index 629541c1d6343..f8ccfc3d8a56b 100644 --- a/libcxx/test/std/containers/associative/map/map.ops/equal_range1.fail.cpp +++ b/libcxx/test/std/containers/associative/map/map.ops/equal_range1.fail.cpp @@ -28,7 +28,7 @@ #error "This test requires is C++14 (or later)" #else -int main() +int main(int, char**) { { typedef std::map M; diff --git a/libcxx/test/std/containers/associative/map/map.ops/equal_range2.fail.cpp b/libcxx/test/std/containers/associative/map/map.ops/equal_range2.fail.cpp index db3fe9eea617f..dcde9fc2e19c8 100644 --- a/libcxx/test/std/containers/associative/map/map.ops/equal_range2.fail.cpp +++ b/libcxx/test/std/containers/associative/map/map.ops/equal_range2.fail.cpp @@ -28,7 +28,7 @@ #error "This test requires is C++14 (or later)" #else -int main() +int main(int, char**) { { typedef std::map M; diff --git a/libcxx/test/std/containers/associative/map/map.ops/equal_range3.fail.cpp b/libcxx/test/std/containers/associative/map/map.ops/equal_range3.fail.cpp index bdd1ae6814065..f773c482c9f52 100644 --- a/libcxx/test/std/containers/associative/map/map.ops/equal_range3.fail.cpp +++ b/libcxx/test/std/containers/associative/map/map.ops/equal_range3.fail.cpp @@ -28,7 +28,7 @@ #error "This test requires is C++14 (or later)" #else -int main() +int main(int, char**) { { typedef std::map M; diff --git a/libcxx/test/std/containers/associative/map/map.ops/equal_range_transparent.pass.cpp b/libcxx/test/std/containers/associative/map/map.ops/equal_range_transparent.pass.cpp index 4387967eb1fc8..4422135616515 100644 --- a/libcxx/test/std/containers/associative/map/map.ops/equal_range_transparent.pass.cpp +++ b/libcxx/test/std/containers/associative/map/map.ops/equal_range_transparent.pass.cpp @@ -43,7 +43,7 @@ struct Comp { } }; -int main() { +int main(int, char**) { std::map, int, Comp> s{ {{2, 1}, 1}, {{1, 2}, 2}, {{1, 3}, 3}, {{1, 4}, 4}, {{2, 2}, 5}}; @@ -56,4 +56,6 @@ int main() { } assert(nels == 3); + + return 0; } diff --git a/libcxx/test/std/containers/associative/map/map.ops/find.pass.cpp b/libcxx/test/std/containers/associative/map/map.ops/find.pass.cpp index ca01e839c1378..bcf498ecf23e0 100644 --- a/libcxx/test/std/containers/associative/map/map.ops/find.pass.cpp +++ b/libcxx/test/std/containers/associative/map/map.ops/find.pass.cpp @@ -21,7 +21,7 @@ #include "private_constructor.hpp" #include "is_transparent.h" -int main() +int main(int, char**) { { typedef std::pair V; @@ -257,4 +257,6 @@ int main() assert(r == next(m.begin(), 8)); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/associative/map/map.ops/find0.pass.cpp b/libcxx/test/std/containers/associative/map/map.ops/find0.pass.cpp index a684738df96d2..affc61efb545b 100644 --- a/libcxx/test/std/containers/associative/map/map.ops/find0.pass.cpp +++ b/libcxx/test/std/containers/associative/map/map.ops/find0.pass.cpp @@ -25,7 +25,7 @@ #include "is_transparent.h" -int main() +int main(int, char**) { { typedef std::map M; @@ -37,4 +37,6 @@ int main() M example; assert(example.find(C2Int{5}) == example.end()); } + + return 0; } diff --git a/libcxx/test/std/containers/associative/map/map.ops/find1.fail.cpp b/libcxx/test/std/containers/associative/map/map.ops/find1.fail.cpp index 1cad78a398a2e..6bd1a95abc58c 100644 --- a/libcxx/test/std/containers/associative/map/map.ops/find1.fail.cpp +++ b/libcxx/test/std/containers/associative/map/map.ops/find1.fail.cpp @@ -28,7 +28,7 @@ #error "This test requires is C++14 (or later)" #else -int main() +int main(int, char**) { { typedef std::map M; diff --git a/libcxx/test/std/containers/associative/map/map.ops/find2.fail.cpp b/libcxx/test/std/containers/associative/map/map.ops/find2.fail.cpp index cd88583160b19..7af1c0eb8b252 100644 --- a/libcxx/test/std/containers/associative/map/map.ops/find2.fail.cpp +++ b/libcxx/test/std/containers/associative/map/map.ops/find2.fail.cpp @@ -28,7 +28,7 @@ #error "This test requires is C++14 (or later)" #else -int main() +int main(int, char**) { { typedef std::map M; diff --git a/libcxx/test/std/containers/associative/map/map.ops/find3.fail.cpp b/libcxx/test/std/containers/associative/map/map.ops/find3.fail.cpp index 62a4a648f703f..32164fd3a97bb 100644 --- a/libcxx/test/std/containers/associative/map/map.ops/find3.fail.cpp +++ b/libcxx/test/std/containers/associative/map/map.ops/find3.fail.cpp @@ -28,7 +28,7 @@ #error "This test requires is C++14 (or later)" #else -int main() +int main(int, char**) { { typedef std::map M; diff --git a/libcxx/test/std/containers/associative/map/map.ops/lower_bound.pass.cpp b/libcxx/test/std/containers/associative/map/map.ops/lower_bound.pass.cpp index 3572b08f7fae5..5b1c925a6c47d 100644 --- a/libcxx/test/std/containers/associative/map/map.ops/lower_bound.pass.cpp +++ b/libcxx/test/std/containers/associative/map/map.ops/lower_bound.pass.cpp @@ -21,7 +21,7 @@ #include "private_constructor.hpp" #include "is_transparent.h" -int main() +int main(int, char**) { { typedef std::pair V; @@ -369,4 +369,6 @@ int main() assert(r == next(m.begin(), 8)); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/associative/map/map.ops/lower_bound0.pass.cpp b/libcxx/test/std/containers/associative/map/map.ops/lower_bound0.pass.cpp index 50752e8da3388..a92790f2bd6fc 100644 --- a/libcxx/test/std/containers/associative/map/map.ops/lower_bound0.pass.cpp +++ b/libcxx/test/std/containers/associative/map/map.ops/lower_bound0.pass.cpp @@ -25,7 +25,7 @@ #include "is_transparent.h" -int main() +int main(int, char**) { { typedef std::map M; @@ -37,4 +37,6 @@ int main() M example; assert(example.lower_bound(C2Int{5}) == example.end()); } + + return 0; } diff --git a/libcxx/test/std/containers/associative/map/map.ops/lower_bound1.fail.cpp b/libcxx/test/std/containers/associative/map/map.ops/lower_bound1.fail.cpp index 095e1b3b3ed6c..efdc762e8b788 100644 --- a/libcxx/test/std/containers/associative/map/map.ops/lower_bound1.fail.cpp +++ b/libcxx/test/std/containers/associative/map/map.ops/lower_bound1.fail.cpp @@ -28,7 +28,7 @@ #error "This test requires is C++14 (or later)" #else -int main() +int main(int, char**) { { typedef std::map M; diff --git a/libcxx/test/std/containers/associative/map/map.ops/lower_bound2.fail.cpp b/libcxx/test/std/containers/associative/map/map.ops/lower_bound2.fail.cpp index 455e8fa9999e9..362b223ffa062 100644 --- a/libcxx/test/std/containers/associative/map/map.ops/lower_bound2.fail.cpp +++ b/libcxx/test/std/containers/associative/map/map.ops/lower_bound2.fail.cpp @@ -28,7 +28,7 @@ #error "This test requires is C++14 (or later)" #else -int main() +int main(int, char**) { { typedef std::map M; diff --git a/libcxx/test/std/containers/associative/map/map.ops/lower_bound3.fail.cpp b/libcxx/test/std/containers/associative/map/map.ops/lower_bound3.fail.cpp index 8c9ac1d650991..cc8bdf92af743 100644 --- a/libcxx/test/std/containers/associative/map/map.ops/lower_bound3.fail.cpp +++ b/libcxx/test/std/containers/associative/map/map.ops/lower_bound3.fail.cpp @@ -28,7 +28,7 @@ #error "This test requires is C++14 (or later)" #else -int main() +int main(int, char**) { { typedef std::map M; diff --git a/libcxx/test/std/containers/associative/map/map.ops/upper_bound.pass.cpp b/libcxx/test/std/containers/associative/map/map.ops/upper_bound.pass.cpp index 58ccd7f4343fc..c7fdd879a35e8 100644 --- a/libcxx/test/std/containers/associative/map/map.ops/upper_bound.pass.cpp +++ b/libcxx/test/std/containers/associative/map/map.ops/upper_bound.pass.cpp @@ -20,7 +20,7 @@ #include "min_allocator.h" #include "private_constructor.hpp" -int main() +int main(int, char**) { { typedef std::pair V; @@ -332,4 +332,6 @@ int main() assert(r == next(m.begin(), 8)); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/associative/map/map.ops/upper_bound0.pass.cpp b/libcxx/test/std/containers/associative/map/map.ops/upper_bound0.pass.cpp index 723cdc6df6f43..8f58df61b7d97 100644 --- a/libcxx/test/std/containers/associative/map/map.ops/upper_bound0.pass.cpp +++ b/libcxx/test/std/containers/associative/map/map.ops/upper_bound0.pass.cpp @@ -25,7 +25,7 @@ #include "is_transparent.h" -int main() +int main(int, char**) { { typedef std::map M; @@ -37,4 +37,6 @@ int main() M example; assert(example.upper_bound(C2Int{5}) == example.end()); } + + return 0; } diff --git a/libcxx/test/std/containers/associative/map/map.ops/upper_bound1.fail.cpp b/libcxx/test/std/containers/associative/map/map.ops/upper_bound1.fail.cpp index fa4afc987c9d0..8ed0eed59dc45 100644 --- a/libcxx/test/std/containers/associative/map/map.ops/upper_bound1.fail.cpp +++ b/libcxx/test/std/containers/associative/map/map.ops/upper_bound1.fail.cpp @@ -28,7 +28,7 @@ #error "This test requires is C++14 (or later)" #else -int main() +int main(int, char**) { { typedef std::map M; diff --git a/libcxx/test/std/containers/associative/map/map.ops/upper_bound2.fail.cpp b/libcxx/test/std/containers/associative/map/map.ops/upper_bound2.fail.cpp index 5be763366c693..d08b6c0f04e05 100644 --- a/libcxx/test/std/containers/associative/map/map.ops/upper_bound2.fail.cpp +++ b/libcxx/test/std/containers/associative/map/map.ops/upper_bound2.fail.cpp @@ -28,7 +28,7 @@ #error "This test requires is C++14 (or later)" #else -int main() +int main(int, char**) { { typedef std::map M; diff --git a/libcxx/test/std/containers/associative/map/map.ops/upper_bound3.fail.cpp b/libcxx/test/std/containers/associative/map/map.ops/upper_bound3.fail.cpp index 773f114f9a6f0..df7cd22699321 100644 --- a/libcxx/test/std/containers/associative/map/map.ops/upper_bound3.fail.cpp +++ b/libcxx/test/std/containers/associative/map/map.ops/upper_bound3.fail.cpp @@ -28,7 +28,7 @@ #error "This test requires is C++14 (or later)" #else -int main() +int main(int, char**) { { typedef std::map M; diff --git a/libcxx/test/std/containers/associative/map/map.special/member_swap.pass.cpp b/libcxx/test/std/containers/associative/map/map.special/member_swap.pass.cpp index 4f985bae3db55..a41e43f7a0663 100644 --- a/libcxx/test/std/containers/associative/map/map.special/member_swap.pass.cpp +++ b/libcxx/test/std/containers/associative/map/map.special/member_swap.pass.cpp @@ -17,7 +17,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { typedef std::pair V; { @@ -172,4 +172,6 @@ int main() } } #endif + + return 0; } diff --git a/libcxx/test/std/containers/associative/map/map.special/non_member_swap.pass.cpp b/libcxx/test/std/containers/associative/map/map.special/non_member_swap.pass.cpp index aea80f9c3cab3..811acc4573ee8 100644 --- a/libcxx/test/std/containers/associative/map/map.special/non_member_swap.pass.cpp +++ b/libcxx/test/std/containers/associative/map/map.special/non_member_swap.pass.cpp @@ -20,7 +20,7 @@ #include "../../../test_compare.h" #include "min_allocator.h" -int main() +int main(int, char**) { typedef std::pair V; { @@ -277,4 +277,6 @@ int main() assert(m2.get_allocator() == A()); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/associative/map/map.special/swap_noexcept.pass.cpp b/libcxx/test/std/containers/associative/map/map.special/swap_noexcept.pass.cpp index 346057415b234..4e1497f7abe02 100644 --- a/libcxx/test/std/containers/associative/map/map.special/swap_noexcept.pass.cpp +++ b/libcxx/test/std/containers/associative/map/map.special/swap_noexcept.pass.cpp @@ -91,7 +91,7 @@ struct some_alloc3 typedef std::false_type is_always_equal; }; -int main() +int main(int, char**) { typedef std::pair V; { @@ -138,4 +138,6 @@ int main() #endif // _LIBCPP_VERSION #endif + + return 0; } diff --git a/libcxx/test/std/containers/associative/map/types.pass.cpp b/libcxx/test/std/containers/associative/map/types.pass.cpp index f9f7abc28a83d..35fc067433f02 100644 --- a/libcxx/test/std/containers/associative/map/types.pass.cpp +++ b/libcxx/test/std/containers/associative/map/types.pass.cpp @@ -33,7 +33,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::map C; @@ -66,4 +66,6 @@ int main() static_assert((std::is_same::value), ""); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/associative/multimap/allocator_mismatch.fail.cpp b/libcxx/test/std/containers/associative/multimap/allocator_mismatch.fail.cpp index f59df265af325..47dd64ebcaf5f 100644 --- a/libcxx/test/std/containers/associative/multimap/allocator_mismatch.fail.cpp +++ b/libcxx/test/std/containers/associative/multimap/allocator_mismatch.fail.cpp @@ -11,7 +11,9 @@ #include -int main() +int main(int, char**) { std::multimap, std::allocator > m; + + return 0; } diff --git a/libcxx/test/std/containers/associative/multimap/empty.fail.cpp b/libcxx/test/std/containers/associative/multimap/empty.fail.cpp index 91fc1026f371a..bc305b9cc8db4 100644 --- a/libcxx/test/std/containers/associative/multimap/empty.fail.cpp +++ b/libcxx/test/std/containers/associative/multimap/empty.fail.cpp @@ -20,8 +20,10 @@ #include "test_macros.h" -int main () +int main(int, char**) { std::multimap c; c.empty(); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} + + return 0; } diff --git a/libcxx/test/std/containers/associative/multimap/empty.pass.cpp b/libcxx/test/std/containers/associative/multimap/empty.pass.cpp index a83e2265cfa60..12866a0f2d1c9 100644 --- a/libcxx/test/std/containers/associative/multimap/empty.pass.cpp +++ b/libcxx/test/std/containers/associative/multimap/empty.pass.cpp @@ -17,7 +17,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::multimap M; @@ -39,4 +39,6 @@ int main() assert(m.empty()); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/associative/multimap/incomplete_type.pass.cpp b/libcxx/test/std/containers/associative/multimap/incomplete_type.pass.cpp index 5f83dce469e49..0132ce9fe12e7 100644 --- a/libcxx/test/std/containers/associative/multimap/incomplete_type.pass.cpp +++ b/libcxx/test/std/containers/associative/multimap/incomplete_type.pass.cpp @@ -23,6 +23,8 @@ struct A { inline bool operator==(A const& L, A const& R) { return &L == &R; } inline bool operator<(A const& L, A const& R) { return L.data < R.data; } -int main() { +int main(int, char**) { A a; + + return 0; } diff --git a/libcxx/test/std/containers/associative/multimap/iterator.pass.cpp b/libcxx/test/std/containers/associative/multimap/iterator.pass.cpp index f27bce16d5c20..0a61531187e39 100644 --- a/libcxx/test/std/containers/associative/multimap/iterator.pass.cpp +++ b/libcxx/test/std/containers/associative/multimap/iterator.pass.cpp @@ -32,7 +32,7 @@ #include "test_macros.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::pair V; @@ -229,4 +229,6 @@ int main() assert (!(cii != ii1 )); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/associative/multimap/max_size.pass.cpp b/libcxx/test/std/containers/associative/multimap/max_size.pass.cpp index 106bb667ca7aa..a4537c3d1b297 100644 --- a/libcxx/test/std/containers/associative/multimap/max_size.pass.cpp +++ b/libcxx/test/std/containers/associative/multimap/max_size.pass.cpp @@ -20,7 +20,7 @@ #include "test_allocator.h" #include "test_macros.h" -int main() +int main(int, char**) { typedef std::pair KV; { @@ -47,4 +47,6 @@ int main() assert(c.max_size() <= max_dist); assert(c.max_size() <= alloc_max_size(c.get_allocator())); } + + return 0; } diff --git a/libcxx/test/std/containers/associative/multimap/multimap.cons/alloc.pass.cpp b/libcxx/test/std/containers/associative/multimap/multimap.cons/alloc.pass.cpp index e8c35d5a881c2..6e7e3aa09723d 100644 --- a/libcxx/test/std/containers/associative/multimap/multimap.cons/alloc.pass.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.cons/alloc.pass.cpp @@ -18,7 +18,7 @@ #include "test_allocator.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::less C; @@ -46,4 +46,6 @@ int main() assert(m.get_allocator() == A{}); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/associative/multimap/multimap.cons/assign_initializer_list.pass.cpp b/libcxx/test/std/containers/associative/multimap/multimap.cons/assign_initializer_list.pass.cpp index 47e4e71a39fd7..0374062515c68 100644 --- a/libcxx/test/std/containers/associative/multimap/multimap.cons/assign_initializer_list.pass.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.cons/assign_initializer_list.pass.cpp @@ -19,7 +19,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::multimap C; @@ -79,4 +79,6 @@ int main() assert(*++i == V(3, 1.5)); assert(*++i == V(3, 2)); } + + return 0; } diff --git a/libcxx/test/std/containers/associative/multimap/multimap.cons/compare.pass.cpp b/libcxx/test/std/containers/associative/multimap/multimap.cons/compare.pass.cpp index 5b83bb0be1cfc..54bf998ecdd11 100644 --- a/libcxx/test/std/containers/associative/multimap/multimap.cons/compare.pass.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.cons/compare.pass.cpp @@ -20,7 +20,7 @@ #include "../../../test_compare.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef test_compare > C; @@ -38,4 +38,6 @@ int main() assert(m.key_comp() == C(3)); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/associative/multimap/multimap.cons/compare_alloc.pass.cpp b/libcxx/test/std/containers/associative/multimap/multimap.cons/compare_alloc.pass.cpp index 1f11066f86e61..44942036c73bf 100644 --- a/libcxx/test/std/containers/associative/multimap/multimap.cons/compare_alloc.pass.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.cons/compare_alloc.pass.cpp @@ -19,7 +19,7 @@ #include "test_allocator.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef test_compare > C; @@ -50,4 +50,6 @@ int main() assert(m.get_allocator() == A{}); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/associative/multimap/multimap.cons/compare_copy_constructible.fail.cpp b/libcxx/test/std/containers/associative/multimap/multimap.cons/compare_copy_constructible.fail.cpp index 19276a0eef245..23fe479f56cb2 100644 --- a/libcxx/test/std/containers/associative/multimap/multimap.cons/compare_copy_constructible.fail.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.cons/compare_copy_constructible.fail.cpp @@ -23,6 +23,8 @@ struct Comp { }; -int main() { +int main(int, char**) { std::multimap > m; + + return 0; } diff --git a/libcxx/test/std/containers/associative/multimap/multimap.cons/copy.pass.cpp b/libcxx/test/std/containers/associative/multimap/multimap.cons/copy.pass.cpp index c691a19653522..d3b064256776c 100644 --- a/libcxx/test/std/containers/associative/multimap/multimap.cons/copy.pass.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.cons/copy.pass.cpp @@ -20,7 +20,7 @@ #include "test_allocator.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::pair V; @@ -99,4 +99,6 @@ int main() assert(mo.key_comp() == C(5)); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/associative/multimap/multimap.cons/copy_alloc.pass.cpp b/libcxx/test/std/containers/associative/multimap/multimap.cons/copy_alloc.pass.cpp index 3c549d6aed146..7144a25f9d44a 100644 --- a/libcxx/test/std/containers/associative/multimap/multimap.cons/copy_alloc.pass.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.cons/copy_alloc.pass.cpp @@ -19,7 +19,7 @@ #include "test_allocator.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::pair V; @@ -98,4 +98,6 @@ int main() assert(mo.key_comp() == C(5)); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/associative/multimap/multimap.cons/copy_assign.pass.cpp b/libcxx/test/std/containers/associative/multimap/multimap.cons/copy_assign.pass.cpp index d49290868136b..6816a5ee43f0d 100644 --- a/libcxx/test/std/containers/associative/multimap/multimap.cons/copy_assign.pass.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.cons/copy_assign.pass.cpp @@ -19,7 +19,7 @@ #include "test_allocator.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::pair V; @@ -121,4 +121,6 @@ int main() assert(mo.key_comp() == C(5)); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/associative/multimap/multimap.cons/default.pass.cpp b/libcxx/test/std/containers/associative/multimap/multimap.cons/default.pass.cpp index 6c59b603bdf86..6b33088434db5 100644 --- a/libcxx/test/std/containers/associative/multimap/multimap.cons/default.pass.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.cons/default.pass.cpp @@ -17,7 +17,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { std::multimap m; @@ -50,4 +50,6 @@ int main() assert(m.begin() == m.end()); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/associative/multimap/multimap.cons/default_noexcept.pass.cpp b/libcxx/test/std/containers/associative/multimap/multimap.cons/default_noexcept.pass.cpp index d55adedc90630..e5a28601eec9a 100644 --- a/libcxx/test/std/containers/associative/multimap/multimap.cons/default_noexcept.pass.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.cons/default_noexcept.pass.cpp @@ -33,7 +33,7 @@ struct some_comp bool operator()(const T&, const T&) const { return false; } }; -int main() +int main(int, char**) { typedef std::pair V; #if defined(_LIBCPP_VERSION) @@ -54,4 +54,6 @@ int main() typedef std::multimap> C; static_assert(!std::is_nothrow_default_constructible::value, ""); } + + return 0; } diff --git a/libcxx/test/std/containers/associative/multimap/multimap.cons/default_recursive.pass.cpp b/libcxx/test/std/containers/associative/multimap/multimap.cons/default_recursive.pass.cpp index 8d960dbe32daf..b51b6b63b7de8 100644 --- a/libcxx/test/std/containers/associative/multimap/multimap.cons/default_recursive.pass.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.cons/default_recursive.pass.cpp @@ -23,6 +23,8 @@ struct X std::multimap::const_reverse_iterator cri; }; -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/containers/associative/multimap/multimap.cons/dtor_noexcept.pass.cpp b/libcxx/test/std/containers/associative/multimap/multimap.cons/dtor_noexcept.pass.cpp index 01cdff8c3106c..100746789ac27 100644 --- a/libcxx/test/std/containers/associative/multimap/multimap.cons/dtor_noexcept.pass.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.cons/dtor_noexcept.pass.cpp @@ -27,7 +27,7 @@ struct some_comp bool operator()(const T&, const T&) const { return false; } }; -int main() +int main(int, char**) { typedef std::pair V; { @@ -48,4 +48,6 @@ int main() static_assert(!std::is_nothrow_destructible::value, ""); } #endif // _LIBCPP_VERSION + + return 0; } diff --git a/libcxx/test/std/containers/associative/multimap/multimap.cons/initializer_list.pass.cpp b/libcxx/test/std/containers/associative/multimap/multimap.cons/initializer_list.pass.cpp index bd26b397c5df9..2642ba6a8eeb6 100644 --- a/libcxx/test/std/containers/associative/multimap/multimap.cons/initializer_list.pass.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.cons/initializer_list.pass.cpp @@ -19,7 +19,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::multimap C; @@ -77,4 +77,6 @@ int main() assert(*++i == V(3, 1.5)); assert(*++i == V(3, 2)); } + + return 0; } diff --git a/libcxx/test/std/containers/associative/multimap/multimap.cons/initializer_list_compare.pass.cpp b/libcxx/test/std/containers/associative/multimap/multimap.cons/initializer_list_compare.pass.cpp index a3f29e6079468..c8e2d293fa078 100644 --- a/libcxx/test/std/containers/associative/multimap/multimap.cons/initializer_list_compare.pass.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.cons/initializer_list_compare.pass.cpp @@ -19,7 +19,7 @@ #include "../../../test_compare.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef test_compare > Cmp; @@ -85,4 +85,6 @@ int main() assert(*++i == V(3, 2)); assert(m.key_comp() == Cmp(4)); } + + return 0; } diff --git a/libcxx/test/std/containers/associative/multimap/multimap.cons/initializer_list_compare_alloc.pass.cpp b/libcxx/test/std/containers/associative/multimap/multimap.cons/initializer_list_compare_alloc.pass.cpp index 572a3cfb0b6e2..592dec9974974 100644 --- a/libcxx/test/std/containers/associative/multimap/multimap.cons/initializer_list_compare_alloc.pass.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.cons/initializer_list_compare_alloc.pass.cpp @@ -20,7 +20,7 @@ #include "test_allocator.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef test_compare > Cmp; @@ -155,4 +155,6 @@ int main() assert(m.key_comp() == Cmp(4)); assert(m.get_allocator() == A{}); } + + return 0; } diff --git a/libcxx/test/std/containers/associative/multimap/multimap.cons/iter_iter.pass.cpp b/libcxx/test/std/containers/associative/multimap/multimap.cons/iter_iter.pass.cpp index 0ea352404d106..4d92b3d0b7d94 100644 --- a/libcxx/test/std/containers/associative/multimap/multimap.cons/iter_iter.pass.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.cons/iter_iter.pass.cpp @@ -19,7 +19,7 @@ #include "test_macros.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::pair V; @@ -109,4 +109,6 @@ int main() } #endif #endif + + return 0; } diff --git a/libcxx/test/std/containers/associative/multimap/multimap.cons/iter_iter_comp.pass.cpp b/libcxx/test/std/containers/associative/multimap/multimap.cons/iter_iter_comp.pass.cpp index aa114a25a6e29..d10904a4d448b 100644 --- a/libcxx/test/std/containers/associative/multimap/multimap.cons/iter_iter_comp.pass.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.cons/iter_iter_comp.pass.cpp @@ -20,7 +20,7 @@ #include "../../../test_compare.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::pair V; @@ -82,4 +82,6 @@ int main() assert(*next(m.begin(), 8) == V(3, 2)); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/associative/multimap/multimap.cons/iter_iter_comp_alloc.pass.cpp b/libcxx/test/std/containers/associative/multimap/multimap.cons/iter_iter_comp_alloc.pass.cpp index 7d02c753935bd..a71c757ffd727 100644 --- a/libcxx/test/std/containers/associative/multimap/multimap.cons/iter_iter_comp_alloc.pass.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.cons/iter_iter_comp_alloc.pass.cpp @@ -21,7 +21,7 @@ #include "test_allocator.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::pair V; @@ -118,4 +118,6 @@ int main() assert(*next(m.begin(), 8) == V(3, 2)); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/associative/multimap/multimap.cons/move.pass.cpp b/libcxx/test/std/containers/associative/multimap/multimap.cons/move.pass.cpp index 324e0a140c5b3..cef6857740c79 100644 --- a/libcxx/test/std/containers/associative/multimap/multimap.cons/move.pass.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.cons/move.pass.cpp @@ -21,7 +21,7 @@ #include "test_allocator.h" #include "min_allocator.h" -int main() +int main(int, char**) { typedef std::pair V; { @@ -126,4 +126,6 @@ int main() assert(mo.size() == 0); assert(distance(mo.begin(), mo.end()) == 0); } + + return 0; } diff --git a/libcxx/test/std/containers/associative/multimap/multimap.cons/move_alloc.pass.cpp b/libcxx/test/std/containers/associative/multimap/multimap.cons/move_alloc.pass.cpp index 3342a4edaab85..4505cd216ac28 100644 --- a/libcxx/test/std/containers/associative/multimap/multimap.cons/move_alloc.pass.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.cons/move_alloc.pass.cpp @@ -24,7 +24,7 @@ #include "min_allocator.h" #include "Counter.h" -int main() +int main(int, char**) { { typedef std::pair V; @@ -178,15 +178,18 @@ int main() M m3(std::move(m1), A()); assert(m3 == m2); LIBCPP_ASSERT(m1.empty()); - assert(Counter_base::gConstructed == 3*num); + assert(Counter_base::gConstructed >= (int)(3*num)); + assert(Counter_base::gConstructed <= (int)(4*num)); { M m4(std::move(m2), A(5)); - assert(Counter_base::gConstructed == 3*num); + assert(Counter_base::gConstructed >= (int)(3*num)); + assert(Counter_base::gConstructed <= (int)(5*num)); assert(m4 == m3); LIBCPP_ASSERT(m2.empty()); } - assert(Counter_base::gConstructed == 2*num); + assert(Counter_base::gConstructed >= (int)(2*num)); + assert(Counter_base::gConstructed <= (int)(4*num)); } assert(Counter_base::gConstructed == 0); } @@ -268,4 +271,6 @@ int main() assert(m3.key_comp() == C(5)); LIBCPP_ASSERT(m1.empty()); } + + return 0; } diff --git a/libcxx/test/std/containers/associative/multimap/multimap.cons/move_assign.pass.cpp b/libcxx/test/std/containers/associative/multimap/multimap.cons/move_assign.pass.cpp index c1f8e7e5a64f0..386c11ecba2c9 100644 --- a/libcxx/test/std/containers/associative/multimap/multimap.cons/move_assign.pass.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.cons/move_assign.pass.cpp @@ -22,7 +22,7 @@ #include "test_allocator.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::pair V; @@ -184,4 +184,6 @@ int main() assert(m3.key_comp() == C(5)); assert(m1.empty()); } + + return 0; } diff --git a/libcxx/test/std/containers/associative/multimap/multimap.cons/move_assign_noexcept.pass.cpp b/libcxx/test/std/containers/associative/multimap/multimap.cons/move_assign_noexcept.pass.cpp index 41ea65853307d..2afcc5e58f87b 100644 --- a/libcxx/test/std/containers/associative/multimap/multimap.cons/move_assign_noexcept.pass.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.cons/move_assign_noexcept.pass.cpp @@ -33,7 +33,7 @@ struct some_comp bool operator()(const T&, const T&) const { return false; } }; -int main() +int main(int, char**) { typedef std::pair V; { @@ -54,4 +54,6 @@ int main() typedef std::multimap> C; static_assert(!std::is_nothrow_move_assignable::value, ""); } + + return 0; } diff --git a/libcxx/test/std/containers/associative/multimap/multimap.cons/move_noexcept.pass.cpp b/libcxx/test/std/containers/associative/multimap/multimap.cons/move_noexcept.pass.cpp index b1c148a9fac86..377167484205b 100644 --- a/libcxx/test/std/containers/associative/multimap/multimap.cons/move_noexcept.pass.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.cons/move_noexcept.pass.cpp @@ -31,7 +31,7 @@ struct some_comp bool operator()(const T&, const T&) const { return false; } }; -int main() +int main(int, char**) { #if defined(_LIBCPP_VERSION) typedef std::pair V; @@ -52,4 +52,6 @@ int main() typedef std::multimap> C; static_assert(!std::is_nothrow_move_constructible::value, ""); } + + return 0; } diff --git a/libcxx/test/std/containers/associative/multimap/multimap.erasure/erase_if.pass.cpp b/libcxx/test/std/containers/associative/multimap/multimap.erasure/erase_if.pass.cpp index dc448f58d9db0..15893f77b6372 100644 --- a/libcxx/test/std/containers/associative/multimap/multimap.erasure/erase_if.pass.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.erasure/erase_if.pass.cpp @@ -77,7 +77,7 @@ void test() test0({1,2,3}, False, {1,2,3}); } -int main() +int main(int, char**) { test>(); test, min_allocator>>> (); @@ -85,4 +85,6 @@ int main() test>(); test>(); + + return 0; } diff --git a/libcxx/test/std/containers/associative/multimap/multimap.modifiers/clear.pass.cpp b/libcxx/test/std/containers/associative/multimap/multimap.modifiers/clear.pass.cpp index 0cb5cb29b4232..d05a13b5f191e 100644 --- a/libcxx/test/std/containers/associative/multimap/multimap.modifiers/clear.pass.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.modifiers/clear.pass.cpp @@ -18,7 +18,7 @@ #include "test_macros.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::multimap M; @@ -62,4 +62,6 @@ int main() assert(m.size() == 0); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/associative/multimap/multimap.modifiers/emplace.pass.cpp b/libcxx/test/std/containers/associative/multimap/multimap.modifiers/emplace.pass.cpp index 2780d3a532098..76d9b171832b5 100644 --- a/libcxx/test/std/containers/associative/multimap/multimap.modifiers/emplace.pass.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.modifiers/emplace.pass.cpp @@ -22,7 +22,7 @@ #include "DefaultOnly.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::multimap M; @@ -144,4 +144,6 @@ int main() assert(m.begin()->first == 2); assert(m.begin()->second == 3.5); } + + return 0; } diff --git a/libcxx/test/std/containers/associative/multimap/multimap.modifiers/emplace_hint.pass.cpp b/libcxx/test/std/containers/associative/multimap/multimap.modifiers/emplace_hint.pass.cpp index 49ee3069b28de..3ad09f38a70d4 100644 --- a/libcxx/test/std/containers/associative/multimap/multimap.modifiers/emplace_hint.pass.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.modifiers/emplace_hint.pass.cpp @@ -22,7 +22,7 @@ #include "DefaultOnly.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::multimap M; @@ -154,4 +154,6 @@ int main() assert(m.begin()->first == 2); assert(m.begin()->second == 3.5); } + + return 0; } diff --git a/libcxx/test/std/containers/associative/multimap/multimap.modifiers/erase_iter.pass.cpp b/libcxx/test/std/containers/associative/multimap/multimap.modifiers/erase_iter.pass.cpp index 62ab3f5fd3116..a0f70d640bd8a 100644 --- a/libcxx/test/std/containers/associative/multimap/multimap.modifiers/erase_iter.pass.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.modifiers/erase_iter.pass.cpp @@ -25,7 +25,7 @@ struct TemplateConstructor bool operator<(const TemplateConstructor&, const TemplateConstructor&) { return false; } -int main() +int main(int, char**) { { typedef std::multimap M; @@ -297,4 +297,6 @@ int main() c.erase(it); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/associative/multimap/multimap.modifiers/erase_iter_iter.pass.cpp b/libcxx/test/std/containers/associative/multimap/multimap.modifiers/erase_iter_iter.pass.cpp index f561d149b53fc..deef1a1461dc6 100644 --- a/libcxx/test/std/containers/associative/multimap/multimap.modifiers/erase_iter_iter.pass.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.modifiers/erase_iter_iter.pass.cpp @@ -17,7 +17,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::multimap M; @@ -153,4 +153,6 @@ int main() assert(i == m.end()); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/associative/multimap/multimap.modifiers/erase_key.pass.cpp b/libcxx/test/std/containers/associative/multimap/multimap.modifiers/erase_key.pass.cpp index f881c77c27a12..0ab1d4cb8abfd 100644 --- a/libcxx/test/std/containers/associative/multimap/multimap.modifiers/erase_key.pass.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.modifiers/erase_key.pass.cpp @@ -17,7 +17,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::multimap M; @@ -149,4 +149,6 @@ int main() assert(i == 3); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/associative/multimap/multimap.modifiers/extract_iterator.pass.cpp b/libcxx/test/std/containers/associative/multimap/multimap.modifiers/extract_iterator.pass.cpp index a0992d7515754..fe3c788324421 100644 --- a/libcxx/test/std/containers/associative/multimap/multimap.modifiers/extract_iterator.pass.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.modifiers/extract_iterator.pass.cpp @@ -40,7 +40,7 @@ void test(Container& c) assert(c.size() == 0); } -int main() +int main(int, char**) { { using map_type = std::multimap; @@ -63,4 +63,6 @@ int main() min_alloc_map m = {{1, 1}, {2, 2}, {3, 3}, {4, 4}, {5, 5}, {6, 6}}; test(m); } + + return 0; } diff --git a/libcxx/test/std/containers/associative/multimap/multimap.modifiers/extract_key.pass.cpp b/libcxx/test/std/containers/associative/multimap/multimap.modifiers/extract_key.pass.cpp index 687043a4cc5f1..e2a80dab25ff7 100644 --- a/libcxx/test/std/containers/associative/multimap/multimap.modifiers/extract_key.pass.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.modifiers/extract_key.pass.cpp @@ -45,7 +45,7 @@ void test(Container& c, KeyTypeIter first, KeyTypeIter last) } } -int main() +int main(int, char**) { { std::multimap m = {{1,1}, {2,2}, {3,3}, {4,4}, {5,5}, {6,6}}; @@ -72,4 +72,6 @@ int main() int keys[] = {1, 2, 3, 4, 5, 6}; test(m, std::begin(keys), std::end(keys)); } + + return 0; } diff --git a/libcxx/test/std/containers/associative/multimap/multimap.modifiers/insert_allocator_requirements.pass.cpp b/libcxx/test/std/containers/associative/multimap/multimap.modifiers/insert_allocator_requirements.pass.cpp index 008770cbfdd10..9a791af57e61c 100644 --- a/libcxx/test/std/containers/associative/multimap/multimap.modifiers/insert_allocator_requirements.pass.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.modifiers/insert_allocator_requirements.pass.cpp @@ -20,8 +20,10 @@ #include "../../../map_allocator_requirement_test_templates.h" -int main() +int main(int, char**) { testMultimapInsert >(); testMultimapInsertHint >(); + + return 0; } diff --git a/libcxx/test/std/containers/associative/multimap/multimap.modifiers/insert_cv.pass.cpp b/libcxx/test/std/containers/associative/multimap/multimap.modifiers/insert_cv.pass.cpp index 8c4e51b2481bd..b83034448a145 100644 --- a/libcxx/test/std/containers/associative/multimap/multimap.modifiers/insert_cv.pass.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.modifiers/insert_cv.pass.cpp @@ -53,7 +53,7 @@ void do_insert_test() { assert(r->second == 3.5); } -int main() +int main(int, char**) { { typedef std::multimap Container; @@ -65,4 +65,6 @@ int main() do_insert_test(); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/associative/multimap/multimap.modifiers/insert_initializer_list.pass.cpp b/libcxx/test/std/containers/associative/multimap/multimap.modifiers/insert_initializer_list.pass.cpp index 2da3e7d49419c..33104ca88b535 100644 --- a/libcxx/test/std/containers/associative/multimap/multimap.modifiers/insert_initializer_list.pass.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.modifiers/insert_initializer_list.pass.cpp @@ -19,7 +19,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::multimap C; @@ -85,4 +85,6 @@ int main() assert(*++i == V(3, 2)); assert(*++i == V(3, 1.5)); } + + return 0; } diff --git a/libcxx/test/std/containers/associative/multimap/multimap.modifiers/insert_iter_cv.pass.cpp b/libcxx/test/std/containers/associative/multimap/multimap.modifiers/insert_iter_cv.pass.cpp index 946193446b5cc..fb3283f838496 100644 --- a/libcxx/test/std/containers/associative/multimap/multimap.modifiers/insert_iter_cv.pass.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.modifiers/insert_iter_cv.pass.cpp @@ -54,7 +54,7 @@ void do_insert_hint_test() assert(r->second == 4.5); } -int main() +int main(int, char**) { do_insert_hint_test >(); #if TEST_STD_VER >= 11 @@ -63,4 +63,6 @@ int main() do_insert_hint_test(); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/associative/multimap/multimap.modifiers/insert_iter_iter.pass.cpp b/libcxx/test/std/containers/associative/multimap/multimap.modifiers/insert_iter_iter.pass.cpp index f7a11f86c4f93..9533a62896d74 100644 --- a/libcxx/test/std/containers/associative/multimap/multimap.modifiers/insert_iter_iter.pass.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.modifiers/insert_iter_iter.pass.cpp @@ -19,7 +19,7 @@ #include "test_iterators.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::multimap M; @@ -97,4 +97,6 @@ int main() assert(next(m.begin(), 8)->second == 2); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/associative/multimap/multimap.modifiers/insert_iter_rv.pass.cpp b/libcxx/test/std/containers/associative/multimap/multimap.modifiers/insert_iter_rv.pass.cpp index 0912136f18011..5eea856a0d842 100644 --- a/libcxx/test/std/containers/associative/multimap/multimap.modifiers/insert_iter_rv.pass.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.modifiers/insert_iter_rv.pass.cpp @@ -54,7 +54,7 @@ void do_insert_rv_test() assert(r->second == 2); } -int main() +int main(int, char**) { do_insert_rv_test, std::pair >(); do_insert_rv_test, std::pair >(); @@ -95,4 +95,6 @@ int main() assert(r->first == 3); assert(r->second == 2); } + + return 0; } diff --git a/libcxx/test/std/containers/associative/multimap/multimap.modifiers/insert_node_type.pass.cpp b/libcxx/test/std/containers/associative/multimap/multimap.modifiers/insert_node_type.pass.cpp index 71122d3a39a34..7fb62a7c16ee1 100644 --- a/libcxx/test/std/containers/associative/multimap/multimap.modifiers/insert_node_type.pass.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.modifiers/insert_node_type.pass.cpp @@ -68,10 +68,12 @@ void test(Container& c) } } -int main() +int main(int, char**) { std::multimap m; test(m); std::multimap, min_allocator>> m2; test(m2); + + return 0; } diff --git a/libcxx/test/std/containers/associative/multimap/multimap.modifiers/insert_node_type_hint.pass.cpp b/libcxx/test/std/containers/associative/multimap/multimap.modifiers/insert_node_type_hint.pass.cpp index edc7d2bd326e5..847a701369268 100644 --- a/libcxx/test/std/containers/associative/multimap/multimap.modifiers/insert_node_type_hint.pass.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.modifiers/insert_node_type_hint.pass.cpp @@ -54,10 +54,12 @@ void test(Container& c) } } -int main() +int main(int, char**) { std::multimap m; test(m); std::multimap, min_allocator>> m2; test(m2); + + return 0; } diff --git a/libcxx/test/std/containers/associative/multimap/multimap.modifiers/insert_rv.pass.cpp b/libcxx/test/std/containers/associative/multimap/multimap.modifiers/insert_rv.pass.cpp index 041ce97a63d40..05393345c12e3 100644 --- a/libcxx/test/std/containers/associative/multimap/multimap.modifiers/insert_rv.pass.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.modifiers/insert_rv.pass.cpp @@ -54,7 +54,7 @@ void do_insert_rv_test() assert(r->second == 3); } -int main() +int main(int, char**) { do_insert_rv_test>(); { @@ -89,4 +89,6 @@ int main() assert(r->first == 3); assert(r->second == 3); } + + return 0; } diff --git a/libcxx/test/std/containers/associative/multimap/multimap.modifiers/merge.pass.cpp b/libcxx/test/std/containers/associative/multimap/multimap.modifiers/merge.pass.cpp index 449d5d92ddaf5..78b24323d4476 100644 --- a/libcxx/test/std/containers/associative/multimap/multimap.modifiers/merge.pass.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.modifiers/merge.pass.cpp @@ -49,7 +49,7 @@ struct throw_comparator }; #endif -int main() +int main(int, char**) { { std::multimap src{{1, 0}, {3, 0}, {5, 0}}; @@ -146,4 +146,5 @@ int main() first.merge(std::move(second)); } } + return 0; } diff --git a/libcxx/test/std/containers/associative/multimap/multimap.ops/count.pass.cpp b/libcxx/test/std/containers/associative/multimap/multimap.ops/count.pass.cpp index 7bdb4d200709d..053a771bae3c9 100644 --- a/libcxx/test/std/containers/associative/multimap/multimap.ops/count.pass.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.ops/count.pass.cpp @@ -20,7 +20,7 @@ #include "private_constructor.hpp" #include "is_transparent.h" -int main() +int main(int, char**) { typedef std::pair V; { @@ -172,4 +172,6 @@ int main() assert(r == 0); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/associative/multimap/multimap.ops/count0.pass.cpp b/libcxx/test/std/containers/associative/multimap/multimap.ops/count0.pass.cpp index f725d16f8b3e6..75f9f22281655 100644 --- a/libcxx/test/std/containers/associative/multimap/multimap.ops/count0.pass.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.ops/count0.pass.cpp @@ -25,7 +25,7 @@ #include "is_transparent.h" -int main() +int main(int, char**) { { typedef std::multimap M; @@ -35,4 +35,6 @@ int main() typedef std::multimap M; assert(M().count(C2Int{5}) == 0); } + + return 0; } diff --git a/libcxx/test/std/containers/associative/multimap/multimap.ops/count1.fail.cpp b/libcxx/test/std/containers/associative/multimap/multimap.ops/count1.fail.cpp index 28842553b5f2f..594a424fad48f 100644 --- a/libcxx/test/std/containers/associative/multimap/multimap.ops/count1.fail.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.ops/count1.fail.cpp @@ -28,7 +28,7 @@ #error "This test requires is C++14 (or later)" #else -int main() +int main(int, char**) { typedef std::multimap M; diff --git a/libcxx/test/std/containers/associative/multimap/multimap.ops/count2.fail.cpp b/libcxx/test/std/containers/associative/multimap/multimap.ops/count2.fail.cpp index 5f06d32261829..1f98052b7b2ab 100644 --- a/libcxx/test/std/containers/associative/multimap/multimap.ops/count2.fail.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.ops/count2.fail.cpp @@ -28,7 +28,7 @@ #error "This test requires is C++14 (or later)" #else -int main() +int main(int, char**) { typedef std::multimap M; diff --git a/libcxx/test/std/containers/associative/multimap/multimap.ops/count3.fail.cpp b/libcxx/test/std/containers/associative/multimap/multimap.ops/count3.fail.cpp index 2f3aa4dcbf9ec..3304d9f06400b 100644 --- a/libcxx/test/std/containers/associative/multimap/multimap.ops/count3.fail.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.ops/count3.fail.cpp @@ -28,7 +28,7 @@ #error "This test requires is C++14 (or later)" #else -int main() +int main(int, char**) { typedef std::multimap M; diff --git a/libcxx/test/std/containers/associative/multimap/multimap.ops/count_transparent.pass.cpp b/libcxx/test/std/containers/associative/multimap/multimap.ops/count_transparent.pass.cpp index 0483276f84b64..e6348cbef2a5f 100644 --- a/libcxx/test/std/containers/associative/multimap/multimap.ops/count_transparent.pass.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.ops/count_transparent.pass.cpp @@ -40,10 +40,12 @@ struct Comp { } }; -int main() { +int main(int, char**) { std::multimap, int, Comp> s{ {{2, 1}, 1}, {{1, 1}, 2}, {{1, 1}, 3}, {{1, 1}, 4}, {{2, 2}, 5}}; auto cnt = s.count(1); assert(cnt == 3); + + return 0; } diff --git a/libcxx/test/std/containers/associative/multimap/multimap.ops/equal_range.pass.cpp b/libcxx/test/std/containers/associative/multimap/multimap.ops/equal_range.pass.cpp index 47380d881caa7..3d4997f484436 100644 --- a/libcxx/test/std/containers/associative/multimap/multimap.ops/equal_range.pass.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.ops/equal_range.pass.cpp @@ -21,7 +21,7 @@ #include "private_constructor.hpp" #include "is_transparent.h" -int main() +int main(int, char**) { typedef std::pair V; { @@ -283,4 +283,6 @@ int main() assert(r.second == m.end()); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/associative/multimap/multimap.ops/equal_range0.pass.cpp b/libcxx/test/std/containers/associative/multimap/multimap.ops/equal_range0.pass.cpp index 48002b38123ca..c01395f0a4122 100644 --- a/libcxx/test/std/containers/associative/multimap/multimap.ops/equal_range0.pass.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.ops/equal_range0.pass.cpp @@ -25,7 +25,7 @@ #include "is_transparent.h" -int main() +int main(int, char**) { { typedef std::multimap M; @@ -41,4 +41,6 @@ int main() P result = example.equal_range(C2Int{5}); assert(result.first == result.second); } + + return 0; } diff --git a/libcxx/test/std/containers/associative/multimap/multimap.ops/equal_range1.fail.cpp b/libcxx/test/std/containers/associative/multimap/multimap.ops/equal_range1.fail.cpp index ea7941c71f65b..b826f018fae84 100644 --- a/libcxx/test/std/containers/associative/multimap/multimap.ops/equal_range1.fail.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.ops/equal_range1.fail.cpp @@ -28,7 +28,7 @@ #error "This test requires is C++14 (or later)" #else -int main() +int main(int, char**) { typedef std::multimap M; diff --git a/libcxx/test/std/containers/associative/multimap/multimap.ops/equal_range2.fail.cpp b/libcxx/test/std/containers/associative/multimap/multimap.ops/equal_range2.fail.cpp index a6fc925a80757..a533a7144e7a1 100644 --- a/libcxx/test/std/containers/associative/multimap/multimap.ops/equal_range2.fail.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.ops/equal_range2.fail.cpp @@ -28,7 +28,7 @@ #error "This test requires is C++14 (or later)" #else -int main() +int main(int, char**) { { typedef std::multimap M; diff --git a/libcxx/test/std/containers/associative/multimap/multimap.ops/equal_range3.fail.cpp b/libcxx/test/std/containers/associative/multimap/multimap.ops/equal_range3.fail.cpp index 8b5e77242df94..2a26a5849c924 100644 --- a/libcxx/test/std/containers/associative/multimap/multimap.ops/equal_range3.fail.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.ops/equal_range3.fail.cpp @@ -28,7 +28,7 @@ #error "This test requires is C++14 (or later)" #else -int main() +int main(int, char**) { { typedef std::multimap M; diff --git a/libcxx/test/std/containers/associative/multimap/multimap.ops/equal_range_transparent.pass.cpp b/libcxx/test/std/containers/associative/multimap/multimap.ops/equal_range_transparent.pass.cpp index 34326a453b1f9..95af97cee52a5 100644 --- a/libcxx/test/std/containers/associative/multimap/multimap.ops/equal_range_transparent.pass.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.ops/equal_range_transparent.pass.cpp @@ -43,7 +43,7 @@ struct Comp { } }; -int main() { +int main(int, char**) { std::multimap, int, Comp> s{ {{2, 1}, 1}, {{1, 1}, 2}, {{1, 1}, 3}, {{1, 1}, 4}, {{2, 2}, 5}}; @@ -56,4 +56,6 @@ int main() { } assert(nels == 3); + + return 0; } diff --git a/libcxx/test/std/containers/associative/multimap/multimap.ops/find.pass.cpp b/libcxx/test/std/containers/associative/multimap/multimap.ops/find.pass.cpp index 006f98b9635ad..e526d9a3270db 100644 --- a/libcxx/test/std/containers/associative/multimap/multimap.ops/find.pass.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.ops/find.pass.cpp @@ -21,7 +21,7 @@ #include "private_constructor.hpp" #include "is_transparent.h" -int main() +int main(int, char**) { typedef std::pair V; { @@ -219,4 +219,6 @@ int main() assert(r == m.end()); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/associative/multimap/multimap.ops/find0.pass.cpp b/libcxx/test/std/containers/associative/multimap/multimap.ops/find0.pass.cpp index 2516b16e7e5bb..39a8735bccbb0 100644 --- a/libcxx/test/std/containers/associative/multimap/multimap.ops/find0.pass.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.ops/find0.pass.cpp @@ -25,7 +25,7 @@ #include "is_transparent.h" -int main() +int main(int, char**) { { typedef std::multimap M; @@ -37,4 +37,6 @@ int main() M example; assert(example.find(C2Int{5}) == example.end()); } + + return 0; } diff --git a/libcxx/test/std/containers/associative/multimap/multimap.ops/find1.fail.cpp b/libcxx/test/std/containers/associative/multimap/multimap.ops/find1.fail.cpp index 754df859a8a85..a22d1b5a03771 100644 --- a/libcxx/test/std/containers/associative/multimap/multimap.ops/find1.fail.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.ops/find1.fail.cpp @@ -28,7 +28,7 @@ #error "This test requires is C++14 (or later)" #else -int main() +int main(int, char**) { { typedef std::multimap M; diff --git a/libcxx/test/std/containers/associative/multimap/multimap.ops/find2.fail.cpp b/libcxx/test/std/containers/associative/multimap/multimap.ops/find2.fail.cpp index 898fdbafbbf22..cf2e4b4987b9f 100644 --- a/libcxx/test/std/containers/associative/multimap/multimap.ops/find2.fail.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.ops/find2.fail.cpp @@ -28,7 +28,7 @@ #error "This test requires is C++14 (or later)" #else -int main() +int main(int, char**) { { typedef std::multimap M; diff --git a/libcxx/test/std/containers/associative/multimap/multimap.ops/find3.fail.cpp b/libcxx/test/std/containers/associative/multimap/multimap.ops/find3.fail.cpp index 68608e8d04928..2be4062bb5d03 100644 --- a/libcxx/test/std/containers/associative/multimap/multimap.ops/find3.fail.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.ops/find3.fail.cpp @@ -28,7 +28,7 @@ #error "This test requires is C++14 (or later)" #else -int main() +int main(int, char**) { { typedef std::multimap M; diff --git a/libcxx/test/std/containers/associative/multimap/multimap.ops/lower_bound.pass.cpp b/libcxx/test/std/containers/associative/multimap/multimap.ops/lower_bound.pass.cpp index c94f99d49407d..77550b5186aee 100644 --- a/libcxx/test/std/containers/associative/multimap/multimap.ops/lower_bound.pass.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.ops/lower_bound.pass.cpp @@ -21,7 +21,7 @@ #include "private_constructor.hpp" #include "is_transparent.h" -int main() +int main(int, char**) { typedef std::pair V; { @@ -233,4 +233,6 @@ int main() } #endif + + return 0; } diff --git a/libcxx/test/std/containers/associative/multimap/multimap.ops/lower_bound0.pass.cpp b/libcxx/test/std/containers/associative/multimap/multimap.ops/lower_bound0.pass.cpp index fd604d14ebc29..1311c9c5a47be 100644 --- a/libcxx/test/std/containers/associative/multimap/multimap.ops/lower_bound0.pass.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.ops/lower_bound0.pass.cpp @@ -25,7 +25,7 @@ #include "is_transparent.h" -int main() +int main(int, char**) { { typedef std::multimap M; @@ -37,4 +37,6 @@ int main() M example; assert(example.lower_bound(C2Int{5}) == example.end()); } + + return 0; } diff --git a/libcxx/test/std/containers/associative/multimap/multimap.ops/lower_bound1.fail.cpp b/libcxx/test/std/containers/associative/multimap/multimap.ops/lower_bound1.fail.cpp index 510421a8abd94..0279f54bf440a 100644 --- a/libcxx/test/std/containers/associative/multimap/multimap.ops/lower_bound1.fail.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.ops/lower_bound1.fail.cpp @@ -28,7 +28,7 @@ #error "This test requires is C++14 (or later)" #else -int main() +int main(int, char**) { { typedef std::multimap M; diff --git a/libcxx/test/std/containers/associative/multimap/multimap.ops/lower_bound2.fail.cpp b/libcxx/test/std/containers/associative/multimap/multimap.ops/lower_bound2.fail.cpp index afcf3285ad521..2282003f4d44d 100644 --- a/libcxx/test/std/containers/associative/multimap/multimap.ops/lower_bound2.fail.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.ops/lower_bound2.fail.cpp @@ -28,7 +28,7 @@ #error "This test requires is C++14 (or later)" #else -int main() +int main(int, char**) { { typedef std::multimap M; diff --git a/libcxx/test/std/containers/associative/multimap/multimap.ops/lower_bound3.fail.cpp b/libcxx/test/std/containers/associative/multimap/multimap.ops/lower_bound3.fail.cpp index 3c7e276763e28..f5751647ac645 100644 --- a/libcxx/test/std/containers/associative/multimap/multimap.ops/lower_bound3.fail.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.ops/lower_bound3.fail.cpp @@ -28,7 +28,7 @@ #error "This test requires is C++14 (or later)" #else -int main() +int main(int, char**) { { typedef std::multimap M; diff --git a/libcxx/test/std/containers/associative/multimap/multimap.ops/upper_bound.pass.cpp b/libcxx/test/std/containers/associative/multimap/multimap.ops/upper_bound.pass.cpp index 5a0d7c3ce4303..762387d800d88 100644 --- a/libcxx/test/std/containers/associative/multimap/multimap.ops/upper_bound.pass.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.ops/upper_bound.pass.cpp @@ -21,7 +21,7 @@ #include "private_constructor.hpp" #include "is_transparent.h" -int main() +int main(int, char**) { typedef std::pair V; { @@ -232,4 +232,6 @@ int main() } #endif + + return 0; } diff --git a/libcxx/test/std/containers/associative/multimap/multimap.ops/upper_bound0.pass.cpp b/libcxx/test/std/containers/associative/multimap/multimap.ops/upper_bound0.pass.cpp index 5f257ece9f971..28c9ff75a7510 100644 --- a/libcxx/test/std/containers/associative/multimap/multimap.ops/upper_bound0.pass.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.ops/upper_bound0.pass.cpp @@ -25,7 +25,7 @@ #include "is_transparent.h" -int main() +int main(int, char**) { { typedef std::multimap M; @@ -37,4 +37,6 @@ int main() M example; assert(example.upper_bound(C2Int{5}) == example.end()); } + + return 0; } diff --git a/libcxx/test/std/containers/associative/multimap/multimap.ops/upper_bound1.fail.cpp b/libcxx/test/std/containers/associative/multimap/multimap.ops/upper_bound1.fail.cpp index 33775d23872c7..39ecc3cc4cf69 100644 --- a/libcxx/test/std/containers/associative/multimap/multimap.ops/upper_bound1.fail.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.ops/upper_bound1.fail.cpp @@ -28,7 +28,7 @@ #error "This test requires is C++14 (or later)" #else -int main() +int main(int, char**) { { typedef std::multimap M; diff --git a/libcxx/test/std/containers/associative/multimap/multimap.ops/upper_bound2.fail.cpp b/libcxx/test/std/containers/associative/multimap/multimap.ops/upper_bound2.fail.cpp index c2be3e7ebe5fa..f51a199c1198e 100644 --- a/libcxx/test/std/containers/associative/multimap/multimap.ops/upper_bound2.fail.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.ops/upper_bound2.fail.cpp @@ -28,7 +28,7 @@ #error "This test requires is C++14 (or later)" #else -int main() +int main(int, char**) { { typedef std::multimap M; diff --git a/libcxx/test/std/containers/associative/multimap/multimap.ops/upper_bound3.fail.cpp b/libcxx/test/std/containers/associative/multimap/multimap.ops/upper_bound3.fail.cpp index 5c1d2a77bf190..68d05710048f0 100644 --- a/libcxx/test/std/containers/associative/multimap/multimap.ops/upper_bound3.fail.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.ops/upper_bound3.fail.cpp @@ -28,7 +28,7 @@ #error "This test requires is C++14 (or later)" #else -int main() +int main(int, char**) { { typedef std::multimap M; diff --git a/libcxx/test/std/containers/associative/multimap/multimap.special/member_swap.pass.cpp b/libcxx/test/std/containers/associative/multimap/multimap.special/member_swap.pass.cpp index 09740b3f33148..fe8399713efe0 100644 --- a/libcxx/test/std/containers/associative/multimap/multimap.special/member_swap.pass.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.special/member_swap.pass.cpp @@ -17,7 +17,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { typedef std::pair V; { @@ -172,4 +172,6 @@ int main() } } #endif + + return 0; } diff --git a/libcxx/test/std/containers/associative/multimap/multimap.special/non_member_swap.pass.cpp b/libcxx/test/std/containers/associative/multimap/multimap.special/non_member_swap.pass.cpp index b776766dda6c3..3e75991ee9533 100644 --- a/libcxx/test/std/containers/associative/multimap/multimap.special/non_member_swap.pass.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.special/non_member_swap.pass.cpp @@ -20,7 +20,7 @@ #include "../../../test_compare.h" #include "min_allocator.h" -int main() +int main(int, char**) { typedef std::pair V; { @@ -277,4 +277,6 @@ int main() assert(m2.get_allocator() == A()); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/associative/multimap/multimap.special/swap_noexcept.pass.cpp b/libcxx/test/std/containers/associative/multimap/multimap.special/swap_noexcept.pass.cpp index 7c42ff170d843..9d5dab06c892f 100644 --- a/libcxx/test/std/containers/associative/multimap/multimap.special/swap_noexcept.pass.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.special/swap_noexcept.pass.cpp @@ -91,7 +91,7 @@ struct some_alloc3 typedef std::false_type is_always_equal; }; -int main() +int main(int, char**) { typedef std::pair V; { @@ -137,4 +137,6 @@ int main() } #endif // _LIBCPP_VERSION #endif + + return 0; } diff --git a/libcxx/test/std/containers/associative/multimap/scary.pass.cpp b/libcxx/test/std/containers/associative/multimap/scary.pass.cpp index 2032bfc9699e2..faf839b8ee17f 100644 --- a/libcxx/test/std/containers/associative/multimap/scary.pass.cpp +++ b/libcxx/test/std/containers/associative/multimap/scary.pass.cpp @@ -14,11 +14,13 @@ #include -int main() +int main(int, char**) { typedef std::map M1; typedef std::multimap M2; M2::iterator i; M1::iterator j = i; ((void)j); + + return 0; } diff --git a/libcxx/test/std/containers/associative/multimap/size.pass.cpp b/libcxx/test/std/containers/associative/multimap/size.pass.cpp index b608b99e93ca1..df18f7b58ccad 100644 --- a/libcxx/test/std/containers/associative/multimap/size.pass.cpp +++ b/libcxx/test/std/containers/associative/multimap/size.pass.cpp @@ -17,7 +17,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::multimap M; @@ -55,4 +55,6 @@ int main() assert(m.size() == 0); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/associative/multimap/types.pass.cpp b/libcxx/test/std/containers/associative/multimap/types.pass.cpp index 7c91ab3bdad55..67723f5cdc4a6 100644 --- a/libcxx/test/std/containers/associative/multimap/types.pass.cpp +++ b/libcxx/test/std/containers/associative/multimap/types.pass.cpp @@ -33,7 +33,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::multimap C; @@ -66,4 +66,6 @@ int main() static_assert((std::is_same::value), ""); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/associative/multiset/allocator_mismatch.fail.cpp b/libcxx/test/std/containers/associative/multiset/allocator_mismatch.fail.cpp index ffa0e96407413..86e1b307a3de7 100644 --- a/libcxx/test/std/containers/associative/multiset/allocator_mismatch.fail.cpp +++ b/libcxx/test/std/containers/associative/multiset/allocator_mismatch.fail.cpp @@ -11,7 +11,9 @@ #include -int main() +int main(int, char**) { std::multiset, std::allocator > ms; + + return 0; } diff --git a/libcxx/test/std/containers/associative/multiset/clear.pass.cpp b/libcxx/test/std/containers/associative/multiset/clear.pass.cpp index b5ad9e4f30443..93f9fef2caa0a 100644 --- a/libcxx/test/std/containers/associative/multiset/clear.pass.cpp +++ b/libcxx/test/std/containers/associative/multiset/clear.pass.cpp @@ -18,7 +18,7 @@ #include "test_macros.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::multiset M; @@ -62,4 +62,6 @@ int main() assert(m.size() == 0); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/associative/multiset/count.pass.cpp b/libcxx/test/std/containers/associative/multiset/count.pass.cpp index 61d64adb6aea6..3ac6f94230439 100644 --- a/libcxx/test/std/containers/associative/multiset/count.pass.cpp +++ b/libcxx/test/std/containers/associative/multiset/count.pass.cpp @@ -19,7 +19,7 @@ #include "min_allocator.h" #include "private_constructor.hpp" -int main() +int main(int, char**) { { typedef int V; @@ -157,4 +157,6 @@ int main() assert(r == 0); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/associative/multiset/count_transparent.pass.cpp b/libcxx/test/std/containers/associative/multiset/count_transparent.pass.cpp index e26744a75f229..1239286f76c7d 100644 --- a/libcxx/test/std/containers/associative/multiset/count_transparent.pass.cpp +++ b/libcxx/test/std/containers/associative/multiset/count_transparent.pass.cpp @@ -42,9 +42,11 @@ struct Comp { } }; -int main() { +int main(int, char**) { std::multiset, Comp> s{{2, 1}, {1, 1}, {1, 1}, {1, 1}, {2, 2}}; auto cnt = s.count(1); assert(cnt == 3); + + return 0; } diff --git a/libcxx/test/std/containers/associative/multiset/emplace.pass.cpp b/libcxx/test/std/containers/associative/multiset/emplace.pass.cpp index 8e7b6946c3506..1cabd12fce047 100644 --- a/libcxx/test/std/containers/associative/multiset/emplace.pass.cpp +++ b/libcxx/test/std/containers/associative/multiset/emplace.pass.cpp @@ -22,7 +22,7 @@ #include "DefaultOnly.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::multiset M; @@ -77,4 +77,6 @@ int main() assert(m.size() == 1); assert(*r == 2); } + + return 0; } diff --git a/libcxx/test/std/containers/associative/multiset/emplace_hint.pass.cpp b/libcxx/test/std/containers/associative/multiset/emplace_hint.pass.cpp index d8723d8d91623..17db3b4b366ec 100644 --- a/libcxx/test/std/containers/associative/multiset/emplace_hint.pass.cpp +++ b/libcxx/test/std/containers/associative/multiset/emplace_hint.pass.cpp @@ -22,7 +22,7 @@ #include "DefaultOnly.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::multiset M; @@ -77,4 +77,6 @@ int main() assert(m.size() == 1); assert(*r == 2); } + + return 0; } diff --git a/libcxx/test/std/containers/associative/multiset/empty.fail.cpp b/libcxx/test/std/containers/associative/multiset/empty.fail.cpp index 29c31a0899a18..4467b487089b0 100644 --- a/libcxx/test/std/containers/associative/multiset/empty.fail.cpp +++ b/libcxx/test/std/containers/associative/multiset/empty.fail.cpp @@ -20,8 +20,10 @@ #include "test_macros.h" -int main () +int main(int, char**) { std::multiset c; c.empty(); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} + + return 0; } diff --git a/libcxx/test/std/containers/associative/multiset/empty.pass.cpp b/libcxx/test/std/containers/associative/multiset/empty.pass.cpp index f0591d8e3d982..2ca20491fca47 100644 --- a/libcxx/test/std/containers/associative/multiset/empty.pass.cpp +++ b/libcxx/test/std/containers/associative/multiset/empty.pass.cpp @@ -17,7 +17,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::multiset M; @@ -39,4 +39,6 @@ int main() assert(m.empty()); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/associative/multiset/equal_range.pass.cpp b/libcxx/test/std/containers/associative/multiset/equal_range.pass.cpp index 740ecc7f290a0..44c6c17ecce6d 100644 --- a/libcxx/test/std/containers/associative/multiset/equal_range.pass.cpp +++ b/libcxx/test/std/containers/associative/multiset/equal_range.pass.cpp @@ -20,7 +20,7 @@ #include "min_allocator.h" #include "private_constructor.hpp" -int main() +int main(int, char**) { { typedef int V; @@ -260,4 +260,6 @@ int main() assert(r.second == next(m.begin(), 9)); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/associative/multiset/equal_range_transparent.pass.cpp b/libcxx/test/std/containers/associative/multiset/equal_range_transparent.pass.cpp index 075aab1a365ec..d052cf169b713 100644 --- a/libcxx/test/std/containers/associative/multiset/equal_range_transparent.pass.cpp +++ b/libcxx/test/std/containers/associative/multiset/equal_range_transparent.pass.cpp @@ -44,7 +44,7 @@ struct Comp { } }; -int main() { +int main(int, char**) { std::multiset, Comp> s{{2, 1}, {1, 1}, {1, 1}, {1, 1}, {2, 2}}; auto er = s.equal_range(1); @@ -56,4 +56,6 @@ int main() { } assert(nels == 3); + + return 0; } diff --git a/libcxx/test/std/containers/associative/multiset/erase_iter.pass.cpp b/libcxx/test/std/containers/associative/multiset/erase_iter.pass.cpp index 506a0a7c2f90e..bcedbf338a668 100644 --- a/libcxx/test/std/containers/associative/multiset/erase_iter.pass.cpp +++ b/libcxx/test/std/containers/associative/multiset/erase_iter.pass.cpp @@ -25,7 +25,7 @@ struct TemplateConstructor bool operator<(const TemplateConstructor&, const TemplateConstructor&) { return false; } -int main() +int main(int, char**) { { typedef std::multiset M; @@ -199,4 +199,6 @@ int main() c.erase(it); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/associative/multiset/erase_iter_iter.pass.cpp b/libcxx/test/std/containers/associative/multiset/erase_iter_iter.pass.cpp index b1e2d143b7269..03c7252859454 100644 --- a/libcxx/test/std/containers/associative/multiset/erase_iter_iter.pass.cpp +++ b/libcxx/test/std/containers/associative/multiset/erase_iter_iter.pass.cpp @@ -17,7 +17,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::multiset M; @@ -137,4 +137,6 @@ int main() assert(i == m.end()); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/associative/multiset/erase_key.pass.cpp b/libcxx/test/std/containers/associative/multiset/erase_key.pass.cpp index d2c3d17db3293..4b1db05296091 100644 --- a/libcxx/test/std/containers/associative/multiset/erase_key.pass.cpp +++ b/libcxx/test/std/containers/associative/multiset/erase_key.pass.cpp @@ -17,7 +17,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::multiset M; @@ -125,4 +125,6 @@ int main() assert(i == 3); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/associative/multiset/extract_iterator.pass.cpp b/libcxx/test/std/containers/associative/multiset/extract_iterator.pass.cpp index f162081902ff1..ef2a64eded056 100644 --- a/libcxx/test/std/containers/associative/multiset/extract_iterator.pass.cpp +++ b/libcxx/test/std/containers/associative/multiset/extract_iterator.pass.cpp @@ -36,7 +36,7 @@ void test(Container& c) assert(c.size() == 0); } -int main() +int main(int, char**) { { using set_type = std::multiset; @@ -56,4 +56,6 @@ int main() min_alloc_set m = {1, 2, 3, 4, 5, 6}; test(m); } + + return 0; } diff --git a/libcxx/test/std/containers/associative/multiset/extract_key.pass.cpp b/libcxx/test/std/containers/associative/multiset/extract_key.pass.cpp index 7fc0459cae09c..d95667def3a7d 100644 --- a/libcxx/test/std/containers/associative/multiset/extract_key.pass.cpp +++ b/libcxx/test/std/containers/associative/multiset/extract_key.pass.cpp @@ -43,7 +43,7 @@ void test(Container& c, KeyTypeIter first, KeyTypeIter last) } } -int main() +int main(int, char**) { { std::multiset m = {1, 2, 3, 4, 5, 6}; @@ -67,4 +67,6 @@ int main() int keys[] = {1, 2, 3, 4, 5, 6}; test(m, std::begin(keys), std::end(keys)); } + + return 0; } diff --git a/libcxx/test/std/containers/associative/multiset/find.pass.cpp b/libcxx/test/std/containers/associative/multiset/find.pass.cpp index 44d8d051cfcd2..7a6584b2bb1a0 100644 --- a/libcxx/test/std/containers/associative/multiset/find.pass.cpp +++ b/libcxx/test/std/containers/associative/multiset/find.pass.cpp @@ -20,7 +20,7 @@ #include "min_allocator.h" #include "private_constructor.hpp" -int main() +int main(int, char**) { { typedef int V; @@ -237,4 +237,6 @@ int main() assert(r == next(m.begin(), 8)); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/associative/multiset/incomplete_type.pass.cpp b/libcxx/test/std/containers/associative/multiset/incomplete_type.pass.cpp index 71166b2ecd37f..a118a6230ebcf 100644 --- a/libcxx/test/std/containers/associative/multiset/incomplete_type.pass.cpp +++ b/libcxx/test/std/containers/associative/multiset/incomplete_type.pass.cpp @@ -23,6 +23,8 @@ struct A { inline bool operator==(A const& L, A const& R) { return &L == &R; } inline bool operator<(A const& L, A const& R) { return L.data < R.data; } -int main() { +int main(int, char**) { A a; + + return 0; } diff --git a/libcxx/test/std/containers/associative/multiset/insert_cv.pass.cpp b/libcxx/test/std/containers/associative/multiset/insert_cv.pass.cpp index 21fec2cd95b87..856d54da0d4be 100644 --- a/libcxx/test/std/containers/associative/multiset/insert_cv.pass.cpp +++ b/libcxx/test/std/containers/associative/multiset/insert_cv.pass.cpp @@ -48,7 +48,7 @@ void do_insert_cv_test() assert(*r == 3); } -int main() +int main(int, char**) { do_insert_cv_test >(); #if TEST_STD_VER >= 11 @@ -57,4 +57,6 @@ int main() do_insert_cv_test(); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/associative/multiset/insert_emplace_allocator_requirements.pass.cpp b/libcxx/test/std/containers/associative/multiset/insert_emplace_allocator_requirements.pass.cpp index 6b6c22f28513b..083dea73917a1 100644 --- a/libcxx/test/std/containers/associative/multiset/insert_emplace_allocator_requirements.pass.cpp +++ b/libcxx/test/std/containers/associative/multiset/insert_emplace_allocator_requirements.pass.cpp @@ -19,8 +19,10 @@ #include "container_test_types.h" #include "../../set_allocator_requirement_test_templates.h" -int main() +int main(int, char**) { testMultisetInsert >(); testMultisetEmplace >(); + + return 0; } diff --git a/libcxx/test/std/containers/associative/multiset/insert_initializer_list.pass.cpp b/libcxx/test/std/containers/associative/multiset/insert_initializer_list.pass.cpp index 29a746696b6a4..7f7a00c15f838 100644 --- a/libcxx/test/std/containers/associative/multiset/insert_initializer_list.pass.cpp +++ b/libcxx/test/std/containers/associative/multiset/insert_initializer_list.pass.cpp @@ -20,7 +20,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::multiset C; @@ -56,4 +56,6 @@ int main() assert(*++i == V(8)); assert(*++i == V(10)); } + + return 0; } diff --git a/libcxx/test/std/containers/associative/multiset/insert_iter_cv.pass.cpp b/libcxx/test/std/containers/associative/multiset/insert_iter_cv.pass.cpp index b0da5f4f2d76c..e29e7b484eb51 100644 --- a/libcxx/test/std/containers/associative/multiset/insert_iter_cv.pass.cpp +++ b/libcxx/test/std/containers/associative/multiset/insert_iter_cv.pass.cpp @@ -17,7 +17,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::multiset M; @@ -69,4 +69,6 @@ int main() assert(*r == 3); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/associative/multiset/insert_iter_iter.pass.cpp b/libcxx/test/std/containers/associative/multiset/insert_iter_iter.pass.cpp index 07b8000d94178..242b9d7f6cc98 100644 --- a/libcxx/test/std/containers/associative/multiset/insert_iter_iter.pass.cpp +++ b/libcxx/test/std/containers/associative/multiset/insert_iter_iter.pass.cpp @@ -19,7 +19,7 @@ #include "test_iterators.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::multiset M; @@ -81,4 +81,6 @@ int main() assert(*next(m.begin(), 8) == 3); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/associative/multiset/insert_iter_rv.pass.cpp b/libcxx/test/std/containers/associative/multiset/insert_iter_rv.pass.cpp index 3dea1f8a222f4..e905c5c407276 100644 --- a/libcxx/test/std/containers/associative/multiset/insert_iter_rv.pass.cpp +++ b/libcxx/test/std/containers/associative/multiset/insert_iter_rv.pass.cpp @@ -20,7 +20,7 @@ #include "MoveOnly.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::multiset M; @@ -70,4 +70,6 @@ int main() assert(m.size() == 4); assert(*r == 3); } + + return 0; } diff --git a/libcxx/test/std/containers/associative/multiset/insert_node_type.pass.cpp b/libcxx/test/std/containers/associative/multiset/insert_node_type.pass.cpp index b8aad6c8cc6ce..7cf2cebfb5814 100644 --- a/libcxx/test/std/containers/associative/multiset/insert_node_type.pass.cpp +++ b/libcxx/test/std/containers/associative/multiset/insert_node_type.pass.cpp @@ -67,10 +67,12 @@ void test(Container& c) } } -int main() +int main(int, char**) { std::multiset m; test(m); std::multiset, min_allocator> m2; test(m2); + + return 0; } diff --git a/libcxx/test/std/containers/associative/multiset/insert_node_type_hint.pass.cpp b/libcxx/test/std/containers/associative/multiset/insert_node_type_hint.pass.cpp index 3e5b40b96c582..d4d6871fb1374 100644 --- a/libcxx/test/std/containers/associative/multiset/insert_node_type_hint.pass.cpp +++ b/libcxx/test/std/containers/associative/multiset/insert_node_type_hint.pass.cpp @@ -49,10 +49,12 @@ void test(Container& c) } } -int main() +int main(int, char**) { std::multiset m; test(m); std::multiset, min_allocator> m2; test(m2); + + return 0; } diff --git a/libcxx/test/std/containers/associative/multiset/insert_rv.pass.cpp b/libcxx/test/std/containers/associative/multiset/insert_rv.pass.cpp index 9d50c617dc92b..3f73a2813b093 100644 --- a/libcxx/test/std/containers/associative/multiset/insert_rv.pass.cpp +++ b/libcxx/test/std/containers/associative/multiset/insert_rv.pass.cpp @@ -20,7 +20,7 @@ #include "MoveOnly.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::multiset M; @@ -70,4 +70,6 @@ int main() assert(m.size() == 4); assert(*r == 3); } + + return 0; } diff --git a/libcxx/test/std/containers/associative/multiset/iterator.pass.cpp b/libcxx/test/std/containers/associative/multiset/iterator.pass.cpp index bda2c7faa8234..4ab1d79a0491f 100644 --- a/libcxx/test/std/containers/associative/multiset/iterator.pass.cpp +++ b/libcxx/test/std/containers/associative/multiset/iterator.pass.cpp @@ -32,7 +32,7 @@ #include "test_macros.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef int V; @@ -213,4 +213,6 @@ int main() assert (!(cii != ii1 )); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/associative/multiset/lower_bound.pass.cpp b/libcxx/test/std/containers/associative/multiset/lower_bound.pass.cpp index dd9fdf70c7a13..6d31f04c8eeff 100644 --- a/libcxx/test/std/containers/associative/multiset/lower_bound.pass.cpp +++ b/libcxx/test/std/containers/associative/multiset/lower_bound.pass.cpp @@ -20,7 +20,7 @@ #include "min_allocator.h" #include "private_constructor.hpp" -int main() +int main(int, char**) { { typedef int V; @@ -220,4 +220,6 @@ int main() assert(r == next(m.begin(), 9)); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/associative/multiset/max_size.pass.cpp b/libcxx/test/std/containers/associative/multiset/max_size.pass.cpp index 64baa6cb04657..5986df295545a 100644 --- a/libcxx/test/std/containers/associative/multiset/max_size.pass.cpp +++ b/libcxx/test/std/containers/associative/multiset/max_size.pass.cpp @@ -20,7 +20,7 @@ #include "test_allocator.h" #include "test_macros.h" -int main() +int main(int, char**) { { typedef limited_allocator A; @@ -46,4 +46,6 @@ int main() assert(c.max_size() <= max_dist); assert(c.max_size() <= alloc_max_size(c.get_allocator())); } + + return 0; } diff --git a/libcxx/test/std/containers/associative/multiset/merge.pass.cpp b/libcxx/test/std/containers/associative/multiset/merge.pass.cpp index 9d566484c33ba..e7e05b155f4d5 100644 --- a/libcxx/test/std/containers/associative/multiset/merge.pass.cpp +++ b/libcxx/test/std/containers/associative/multiset/merge.pass.cpp @@ -49,7 +49,7 @@ struct throw_comparator }; #endif -int main() +int main(int, char**) { { std::multiset src{1, 3, 5}; @@ -145,4 +145,5 @@ int main() first.merge(std::move(second)); } } + return 0; } diff --git a/libcxx/test/std/containers/associative/multiset/multiset.cons/alloc.pass.cpp b/libcxx/test/std/containers/associative/multiset/multiset.cons/alloc.pass.cpp index 4debe7b4278ef..9ceac884b64dc 100644 --- a/libcxx/test/std/containers/associative/multiset/multiset.cons/alloc.pass.cpp +++ b/libcxx/test/std/containers/associative/multiset/multiset.cons/alloc.pass.cpp @@ -17,7 +17,7 @@ #include "test_allocator.h" -int main() +int main(int, char**) { typedef std::less C; typedef test_allocator A; @@ -25,4 +25,6 @@ int main() assert(m.empty()); assert(m.begin() == m.end()); assert(m.get_allocator() == A(5)); + + return 0; } diff --git a/libcxx/test/std/containers/associative/multiset/multiset.cons/assign_initializer_list.pass.cpp b/libcxx/test/std/containers/associative/multiset/multiset.cons/assign_initializer_list.pass.cpp index f325fe919d4e1..c84b042930ae3 100644 --- a/libcxx/test/std/containers/associative/multiset/multiset.cons/assign_initializer_list.pass.cpp +++ b/libcxx/test/std/containers/associative/multiset/multiset.cons/assign_initializer_list.pass.cpp @@ -19,7 +19,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::multiset C; @@ -51,4 +51,6 @@ int main() assert(*++i == V(5)); assert(*++i == V(6)); } + + return 0; } diff --git a/libcxx/test/std/containers/associative/multiset/multiset.cons/compare.pass.cpp b/libcxx/test/std/containers/associative/multiset/multiset.cons/compare.pass.cpp index b628d50ff86dc..d35de106f8531 100644 --- a/libcxx/test/std/containers/associative/multiset/multiset.cons/compare.pass.cpp +++ b/libcxx/test/std/containers/associative/multiset/multiset.cons/compare.pass.cpp @@ -21,7 +21,7 @@ #include "../../../test_compare.h" -int main() +int main(int, char**) { typedef test_compare > C; const std::multiset m(C(3)); @@ -29,4 +29,6 @@ int main() assert(m.begin() == m.end()); assert(m.key_comp() == C(3)); assert(m.value_comp() == C(3)); + + return 0; } diff --git a/libcxx/test/std/containers/associative/multiset/multiset.cons/compare_alloc.pass.cpp b/libcxx/test/std/containers/associative/multiset/multiset.cons/compare_alloc.pass.cpp index e06c21719b36f..f044b2790b9f5 100644 --- a/libcxx/test/std/containers/associative/multiset/multiset.cons/compare_alloc.pass.cpp +++ b/libcxx/test/std/containers/associative/multiset/multiset.cons/compare_alloc.pass.cpp @@ -18,7 +18,7 @@ #include "../../../test_compare.h" #include "test_allocator.h" -int main() +int main(int, char**) { typedef test_compare > C; typedef test_allocator A; @@ -27,4 +27,6 @@ int main() assert(m.begin() == m.end()); assert(m.key_comp() == C(4)); assert(m.get_allocator() == A(5)); + + return 0; } diff --git a/libcxx/test/std/containers/associative/multiset/multiset.cons/compare_copy_constructible.fail.cpp b/libcxx/test/std/containers/associative/multiset/multiset.cons/compare_copy_constructible.fail.cpp index 09c2ac0936cd2..ae987c64c85ba 100644 --- a/libcxx/test/std/containers/associative/multiset/multiset.cons/compare_copy_constructible.fail.cpp +++ b/libcxx/test/std/containers/associative/multiset/multiset.cons/compare_copy_constructible.fail.cpp @@ -23,6 +23,8 @@ struct Comp { }; -int main() { +int main(int, char**) { std::multiset > m; + + return 0; } diff --git a/libcxx/test/std/containers/associative/multiset/multiset.cons/copy.pass.cpp b/libcxx/test/std/containers/associative/multiset/multiset.cons/copy.pass.cpp index a055b15fce1bc..ac196b5ae33b4 100644 --- a/libcxx/test/std/containers/associative/multiset/multiset.cons/copy.pass.cpp +++ b/libcxx/test/std/containers/associative/multiset/multiset.cons/copy.pass.cpp @@ -19,7 +19,7 @@ #include "../../../test_compare.h" #include "test_allocator.h" -int main() +int main(int, char**) { { typedef int V; @@ -115,4 +115,6 @@ int main() assert(*next(mo.begin(), 8) == 3); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/associative/multiset/multiset.cons/copy_alloc.pass.cpp b/libcxx/test/std/containers/associative/multiset/multiset.cons/copy_alloc.pass.cpp index 4466438ca1edd..25e6d6efb2dfa 100644 --- a/libcxx/test/std/containers/associative/multiset/multiset.cons/copy_alloc.pass.cpp +++ b/libcxx/test/std/containers/associative/multiset/multiset.cons/copy_alloc.pass.cpp @@ -18,7 +18,7 @@ #include "../../../test_compare.h" #include "test_allocator.h" -int main() +int main(int, char**) { typedef int V; V ar[] = @@ -64,4 +64,6 @@ int main() assert(*next(mo.begin(), 6) == 3); assert(*next(mo.begin(), 7) == 3); assert(*next(mo.begin(), 8) == 3); + + return 0; } diff --git a/libcxx/test/std/containers/associative/multiset/multiset.cons/copy_assign.pass.cpp b/libcxx/test/std/containers/associative/multiset/multiset.cons/copy_assign.pass.cpp index 0efa8bec69a95..7992c7cae95bd 100644 --- a/libcxx/test/std/containers/associative/multiset/multiset.cons/copy_assign.pass.cpp +++ b/libcxx/test/std/containers/associative/multiset/multiset.cons/copy_assign.pass.cpp @@ -18,7 +18,7 @@ #include "../../../test_compare.h" #include "test_allocator.h" -int main() +int main(int, char**) { { typedef int V; @@ -134,4 +134,6 @@ int main() assert(*next(mo.begin(), 7) == 3); assert(*next(mo.begin(), 8) == 3); } + + return 0; } diff --git a/libcxx/test/std/containers/associative/multiset/multiset.cons/default.pass.cpp b/libcxx/test/std/containers/associative/multiset/multiset.cons/default.pass.cpp index a84bc6d10e24c..88c5244f8f9e9 100644 --- a/libcxx/test/std/containers/associative/multiset/multiset.cons/default.pass.cpp +++ b/libcxx/test/std/containers/associative/multiset/multiset.cons/default.pass.cpp @@ -17,7 +17,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { std::multiset m; @@ -50,4 +50,6 @@ int main() assert(m.begin() == m.end()); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/associative/multiset/multiset.cons/default_noexcept.pass.cpp b/libcxx/test/std/containers/associative/multiset/multiset.cons/default_noexcept.pass.cpp index 747e948ed8910..7fa25ac478627 100644 --- a/libcxx/test/std/containers/associative/multiset/multiset.cons/default_noexcept.pass.cpp +++ b/libcxx/test/std/containers/associative/multiset/multiset.cons/default_noexcept.pass.cpp @@ -33,7 +33,7 @@ struct some_comp bool operator()(const T&, const T&) const { return false; } }; -int main() +int main(int, char**) { #if defined(_LIBCPP_VERSION) { @@ -53,4 +53,6 @@ int main() typedef std::multiset> C; static_assert(!std::is_nothrow_default_constructible::value, ""); } + + return 0; } diff --git a/libcxx/test/std/containers/associative/multiset/multiset.cons/dtor_noexcept.pass.cpp b/libcxx/test/std/containers/associative/multiset/multiset.cons/dtor_noexcept.pass.cpp index e268282651fbf..8a18a2977de8e 100644 --- a/libcxx/test/std/containers/associative/multiset/multiset.cons/dtor_noexcept.pass.cpp +++ b/libcxx/test/std/containers/associative/multiset/multiset.cons/dtor_noexcept.pass.cpp @@ -27,7 +27,7 @@ struct some_comp bool operator()(const T&, const T&) const { return false; } }; -int main() +int main(int, char**) { { typedef std::multiset C; @@ -47,4 +47,6 @@ int main() static_assert(!std::is_nothrow_destructible::value, ""); } #endif // _LIBCPP_VERSION + + return 0; } diff --git a/libcxx/test/std/containers/associative/multiset/multiset.cons/initializer_list.pass.cpp b/libcxx/test/std/containers/associative/multiset/multiset.cons/initializer_list.pass.cpp index c0a682e91a13f..68a74e80cdc7f 100644 --- a/libcxx/test/std/containers/associative/multiset/multiset.cons/initializer_list.pass.cpp +++ b/libcxx/test/std/containers/associative/multiset/multiset.cons/initializer_list.pass.cpp @@ -20,7 +20,7 @@ #include "test_macros.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::multiset C; @@ -66,4 +66,6 @@ int main() assert(*++i == V(6)); assert(m.get_allocator() == a); } + + return 0; } diff --git a/libcxx/test/std/containers/associative/multiset/multiset.cons/initializer_list_compare.pass.cpp b/libcxx/test/std/containers/associative/multiset/multiset.cons/initializer_list_compare.pass.cpp index 719476c7d174a..cf4c11dcfb622 100644 --- a/libcxx/test/std/containers/associative/multiset/multiset.cons/initializer_list_compare.pass.cpp +++ b/libcxx/test/std/containers/associative/multiset/multiset.cons/initializer_list_compare.pass.cpp @@ -18,7 +18,7 @@ #include #include "../../../test_compare.h" -int main() +int main(int, char**) { typedef test_compare > Cmp; typedef std::multiset C; @@ -34,4 +34,6 @@ int main() assert(*++i == V(5)); assert(*++i == V(6)); assert(m.key_comp() == Cmp(10)); + + return 0; } diff --git a/libcxx/test/std/containers/associative/multiset/multiset.cons/initializer_list_compare_alloc.pass.cpp b/libcxx/test/std/containers/associative/multiset/multiset.cons/initializer_list_compare_alloc.pass.cpp index 61a1f3ca0ffcf..5f26864cd2130 100644 --- a/libcxx/test/std/containers/associative/multiset/multiset.cons/initializer_list_compare_alloc.pass.cpp +++ b/libcxx/test/std/containers/associative/multiset/multiset.cons/initializer_list_compare_alloc.pass.cpp @@ -19,7 +19,7 @@ #include "../../../test_compare.h" #include "test_allocator.h" -int main() +int main(int, char**) { typedef test_compare > Cmp; typedef test_allocator A; @@ -37,4 +37,6 @@ int main() assert(*++i == V(6)); assert(m.key_comp() == Cmp(10)); assert(m.get_allocator() == A(4)); + + return 0; } diff --git a/libcxx/test/std/containers/associative/multiset/multiset.cons/iter_iter.pass.cpp b/libcxx/test/std/containers/associative/multiset/multiset.cons/iter_iter.pass.cpp index a1806ecf9c321..9d521c279055e 100644 --- a/libcxx/test/std/containers/associative/multiset/multiset.cons/iter_iter.pass.cpp +++ b/libcxx/test/std/containers/associative/multiset/multiset.cons/iter_iter.pass.cpp @@ -19,7 +19,7 @@ #include "test_iterators.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef int V; @@ -79,4 +79,6 @@ int main() assert(*next(m.begin(), 8) == 3); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/associative/multiset/multiset.cons/iter_iter_alloc.pass.cpp b/libcxx/test/std/containers/associative/multiset/multiset.cons/iter_iter_alloc.pass.cpp index 3a37ac014eadf..82d9f4aea1c2d 100644 --- a/libcxx/test/std/containers/associative/multiset/multiset.cons/iter_iter_alloc.pass.cpp +++ b/libcxx/test/std/containers/associative/multiset/multiset.cons/iter_iter_alloc.pass.cpp @@ -22,7 +22,7 @@ #include "../../../test_compare.h" #include "test_allocator.h" -int main() +int main(int, char**) { { typedef int V; @@ -91,4 +91,6 @@ int main() assert(m.get_allocator() == a); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/associative/multiset/multiset.cons/iter_iter_comp.pass.cpp b/libcxx/test/std/containers/associative/multiset/multiset.cons/iter_iter_comp.pass.cpp index 77f6b10c4b56e..25b4364c182a9 100644 --- a/libcxx/test/std/containers/associative/multiset/multiset.cons/iter_iter_comp.pass.cpp +++ b/libcxx/test/std/containers/associative/multiset/multiset.cons/iter_iter_comp.pass.cpp @@ -19,7 +19,7 @@ #include "test_iterators.h" #include "../../../test_compare.h" -int main() +int main(int, char**) { typedef int V; V ar[] = @@ -49,4 +49,6 @@ int main() assert(*next(m.begin(), 6) == 3); assert(*next(m.begin(), 7) == 3); assert(*next(m.begin(), 8) == 3); + + return 0; } diff --git a/libcxx/test/std/containers/associative/multiset/multiset.cons/move.pass.cpp b/libcxx/test/std/containers/associative/multiset/multiset.cons/move.pass.cpp index 8d43c098ef0f6..0d6cc72a66eb0 100644 --- a/libcxx/test/std/containers/associative/multiset/multiset.cons/move.pass.cpp +++ b/libcxx/test/std/containers/associative/multiset/multiset.cons/move.pass.cpp @@ -21,7 +21,7 @@ #include "test_allocator.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef int V; @@ -113,4 +113,6 @@ int main() assert(mo.size() == 0); assert(distance(mo.begin(), mo.end()) == 0); } + + return 0; } diff --git a/libcxx/test/std/containers/associative/multiset/multiset.cons/move_alloc.pass.cpp b/libcxx/test/std/containers/associative/multiset/multiset.cons/move_alloc.pass.cpp index c91a97b490f95..3727c143dce0a 100644 --- a/libcxx/test/std/containers/associative/multiset/multiset.cons/move_alloc.pass.cpp +++ b/libcxx/test/std/containers/associative/multiset/multiset.cons/move_alloc.pass.cpp @@ -23,7 +23,7 @@ #include "test_allocator.h" #include "Counter.h" -int main() +int main(int, char**) { { typedef MoveOnly V; @@ -172,16 +172,21 @@ int main() M m3(std::move(m1), A()); assert(m3 == m2); LIBCPP_ASSERT(m1.empty()); - assert(Counter_base::gConstructed == 3*num); + assert(Counter_base::gConstructed >= (int)(3*num)); + assert(Counter_base::gConstructed <= (int)(4*num)); { M m4(std::move(m2), A(5)); - assert(Counter_base::gConstructed == 3*num); + assert(Counter_base::gConstructed >= (int)(3*num)); + assert(Counter_base::gConstructed <= (int)(5*num)); assert(m4 == m3); LIBCPP_ASSERT(m2.empty()); } - assert(Counter_base::gConstructed == 2*num); + assert(Counter_base::gConstructed >= (int)(2*num)); + assert(Counter_base::gConstructed <= (int)(4*num)); } assert(Counter_base::gConstructed == 0); } + + return 0; } diff --git a/libcxx/test/std/containers/associative/multiset/multiset.cons/move_assign.pass.cpp b/libcxx/test/std/containers/associative/multiset/multiset.cons/move_assign.pass.cpp index 263e48b46fc4d..6f584f22cf8af 100644 --- a/libcxx/test/std/containers/associative/multiset/multiset.cons/move_assign.pass.cpp +++ b/libcxx/test/std/containers/associative/multiset/multiset.cons/move_assign.pass.cpp @@ -22,7 +22,7 @@ #include "test_allocator.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef MoveOnly V; @@ -180,4 +180,6 @@ int main() assert(m3.key_comp() == C(5)); assert(m1.empty()); } + + return 0; } diff --git a/libcxx/test/std/containers/associative/multiset/multiset.cons/move_assign_noexcept.pass.cpp b/libcxx/test/std/containers/associative/multiset/multiset.cons/move_assign_noexcept.pass.cpp index aa164edf0c194..026fc1ba7f144 100644 --- a/libcxx/test/std/containers/associative/multiset/multiset.cons/move_assign_noexcept.pass.cpp +++ b/libcxx/test/std/containers/associative/multiset/multiset.cons/move_assign_noexcept.pass.cpp @@ -33,7 +33,7 @@ struct some_comp bool operator()(const T&, const T&) const { return false; } }; -int main() +int main(int, char**) { { typedef std::multiset C; @@ -53,4 +53,6 @@ int main() typedef std::multiset> C; static_assert(!std::is_nothrow_move_assignable::value, ""); } + + return 0; } diff --git a/libcxx/test/std/containers/associative/multiset/multiset.cons/move_noexcept.pass.cpp b/libcxx/test/std/containers/associative/multiset/multiset.cons/move_noexcept.pass.cpp index 41fd86269bcc1..88bbb59a43d4b 100644 --- a/libcxx/test/std/containers/associative/multiset/multiset.cons/move_noexcept.pass.cpp +++ b/libcxx/test/std/containers/associative/multiset/multiset.cons/move_noexcept.pass.cpp @@ -31,7 +31,7 @@ struct some_comp bool operator()(const T&, const T&) const { return false; } }; -int main() +int main(int, char**) { #if defined(_LIBCPP_VERSION) { @@ -51,4 +51,6 @@ int main() typedef std::multiset> C; static_assert(!std::is_nothrow_move_constructible::value, ""); } + + return 0; } diff --git a/libcxx/test/std/containers/associative/multiset/multiset.erasure/erase_if.pass.cpp b/libcxx/test/std/containers/associative/multiset/multiset.erasure/erase_if.pass.cpp index 19a0d131f8715..84d665cb15113 100644 --- a/libcxx/test/std/containers/associative/multiset/multiset.erasure/erase_if.pass.cpp +++ b/libcxx/test/std/containers/associative/multiset/multiset.erasure/erase_if.pass.cpp @@ -66,7 +66,7 @@ void test() test0(S({1,2,3}), False, S({1,2,3})); } -int main() +int main(int, char**) { test>(); test, min_allocator>> (); @@ -74,4 +74,6 @@ int main() test>(); test>(); + + return 0; } diff --git a/libcxx/test/std/containers/associative/multiset/multiset.special/member_swap.pass.cpp b/libcxx/test/std/containers/associative/multiset/multiset.special/member_swap.pass.cpp index be113250225c6..9ac0f1709e956 100644 --- a/libcxx/test/std/containers/associative/multiset/multiset.special/member_swap.pass.cpp +++ b/libcxx/test/std/containers/associative/multiset/multiset.special/member_swap.pass.cpp @@ -17,7 +17,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef int V; @@ -173,4 +173,6 @@ int main() } } #endif + + return 0; } diff --git a/libcxx/test/std/containers/associative/multiset/multiset.special/non_member_swap.pass.cpp b/libcxx/test/std/containers/associative/multiset/multiset.special/non_member_swap.pass.cpp index 9b6d021f5bc86..a3bbf551d3d4d 100644 --- a/libcxx/test/std/containers/associative/multiset/multiset.special/non_member_swap.pass.cpp +++ b/libcxx/test/std/containers/associative/multiset/multiset.special/non_member_swap.pass.cpp @@ -17,7 +17,7 @@ #include "test_allocator.h" #include "../../../test_compare.h" -int main() +int main(int, char**) { typedef int V; { @@ -163,4 +163,6 @@ int main() assert(m2.key_comp() == C(1)); assert(m2.get_allocator() == A(1)); } + + return 0; } diff --git a/libcxx/test/std/containers/associative/multiset/multiset.special/swap_noexcept.pass.cpp b/libcxx/test/std/containers/associative/multiset/multiset.special/swap_noexcept.pass.cpp index 367e6e1c9421d..47a0d411f9383 100644 --- a/libcxx/test/std/containers/associative/multiset/multiset.special/swap_noexcept.pass.cpp +++ b/libcxx/test/std/containers/associative/multiset/multiset.special/swap_noexcept.pass.cpp @@ -91,7 +91,7 @@ struct some_alloc3 typedef std::false_type is_always_equal; }; -int main() +int main(int, char**) { { typedef std::multiset C; @@ -136,4 +136,6 @@ int main() } #endif // _LIBCPP_VERSION #endif + + return 0; } diff --git a/libcxx/test/std/containers/associative/multiset/scary.pass.cpp b/libcxx/test/std/containers/associative/multiset/scary.pass.cpp index 329f9f18fd193..5065ab96eaaac 100644 --- a/libcxx/test/std/containers/associative/multiset/scary.pass.cpp +++ b/libcxx/test/std/containers/associative/multiset/scary.pass.cpp @@ -14,11 +14,13 @@ #include -int main() +int main(int, char**) { typedef std::set M1; typedef std::multiset M2; M2::iterator i; M1::iterator j = i; ((void)j); + + return 0; } diff --git a/libcxx/test/std/containers/associative/multiset/size.pass.cpp b/libcxx/test/std/containers/associative/multiset/size.pass.cpp index ccb3f0f7a7d46..bb5616e9a6218 100644 --- a/libcxx/test/std/containers/associative/multiset/size.pass.cpp +++ b/libcxx/test/std/containers/associative/multiset/size.pass.cpp @@ -17,7 +17,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::multiset M; @@ -55,4 +55,6 @@ int main() assert(m.size() == 0); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/associative/multiset/types.pass.cpp b/libcxx/test/std/containers/associative/multiset/types.pass.cpp index 3ee2fc57087bc..96e8ec4f0b1d2 100644 --- a/libcxx/test/std/containers/associative/multiset/types.pass.cpp +++ b/libcxx/test/std/containers/associative/multiset/types.pass.cpp @@ -33,7 +33,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::multiset C; @@ -66,4 +66,6 @@ int main() static_assert((std::is_same::value), ""); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/associative/multiset/upper_bound.pass.cpp b/libcxx/test/std/containers/associative/multiset/upper_bound.pass.cpp index f2796d7b432bd..99a7e374d12c3 100644 --- a/libcxx/test/std/containers/associative/multiset/upper_bound.pass.cpp +++ b/libcxx/test/std/containers/associative/multiset/upper_bound.pass.cpp @@ -20,7 +20,7 @@ #include "min_allocator.h" #include "private_constructor.hpp" -int main() +int main(int, char**) { { typedef int V; @@ -219,4 +219,6 @@ int main() assert(r == next(m.begin(), 9)); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/associative/set/allocator_mismatch.fail.cpp b/libcxx/test/std/containers/associative/set/allocator_mismatch.fail.cpp index ed36019680a49..69e49351e200d 100644 --- a/libcxx/test/std/containers/associative/set/allocator_mismatch.fail.cpp +++ b/libcxx/test/std/containers/associative/set/allocator_mismatch.fail.cpp @@ -11,7 +11,9 @@ #include -int main() +int main(int, char**) { std::set, std::allocator > s; + + return 0; } diff --git a/libcxx/test/std/containers/associative/set/clear.pass.cpp b/libcxx/test/std/containers/associative/set/clear.pass.cpp index 3f84ee480cb3f..0650e912fd35c 100644 --- a/libcxx/test/std/containers/associative/set/clear.pass.cpp +++ b/libcxx/test/std/containers/associative/set/clear.pass.cpp @@ -18,7 +18,7 @@ #include "test_macros.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::set M; @@ -62,4 +62,6 @@ int main() assert(m.size() == 0); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/associative/set/count.pass.cpp b/libcxx/test/std/containers/associative/set/count.pass.cpp index e915b1cde80ba..8866aa7f0574f 100644 --- a/libcxx/test/std/containers/associative/set/count.pass.cpp +++ b/libcxx/test/std/containers/associative/set/count.pass.cpp @@ -19,7 +19,7 @@ #include "min_allocator.h" #include "private_constructor.hpp" -int main() +int main(int, char**) { { typedef int V; @@ -167,4 +167,6 @@ int main() } #endif + + return 0; } diff --git a/libcxx/test/std/containers/associative/set/count_transparent.pass.cpp b/libcxx/test/std/containers/associative/set/count_transparent.pass.cpp index e8490e6de08b6..d94188def0831 100644 --- a/libcxx/test/std/containers/associative/set/count_transparent.pass.cpp +++ b/libcxx/test/std/containers/associative/set/count_transparent.pass.cpp @@ -42,9 +42,11 @@ struct Comp { } }; -int main() { +int main(int, char**) { std::set, Comp> s{{2, 1}, {1, 2}, {1, 3}, {1, 4}, {2, 2}}; auto cnt = s.count(1); assert(cnt == 3); + + return 0; } diff --git a/libcxx/test/std/containers/associative/set/emplace.pass.cpp b/libcxx/test/std/containers/associative/set/emplace.pass.cpp index fdabf02a81d53..e48f2e1e4474f 100644 --- a/libcxx/test/std/containers/associative/set/emplace.pass.cpp +++ b/libcxx/test/std/containers/associative/set/emplace.pass.cpp @@ -22,7 +22,7 @@ #include "DefaultOnly.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::set M; @@ -84,4 +84,6 @@ int main() assert(m.size() == 1); assert(*r.first == 2); } + + return 0; } diff --git a/libcxx/test/std/containers/associative/set/emplace_hint.pass.cpp b/libcxx/test/std/containers/associative/set/emplace_hint.pass.cpp index 441adaf212505..a7ed7266be208 100644 --- a/libcxx/test/std/containers/associative/set/emplace_hint.pass.cpp +++ b/libcxx/test/std/containers/associative/set/emplace_hint.pass.cpp @@ -22,7 +22,7 @@ #include "DefaultOnly.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::set M; @@ -77,4 +77,6 @@ int main() assert(m.size() == 1); assert(*r == 2); } + + return 0; } diff --git a/libcxx/test/std/containers/associative/set/empty.fail.cpp b/libcxx/test/std/containers/associative/set/empty.fail.cpp index 7954f6f496b17..fc5856fbdbf49 100644 --- a/libcxx/test/std/containers/associative/set/empty.fail.cpp +++ b/libcxx/test/std/containers/associative/set/empty.fail.cpp @@ -20,8 +20,10 @@ #include "test_macros.h" -int main () +int main(int, char**) { std::set c; c.empty(); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} + + return 0; } diff --git a/libcxx/test/std/containers/associative/set/empty.pass.cpp b/libcxx/test/std/containers/associative/set/empty.pass.cpp index 50ce5dd3bf7cc..c00ab68ffc9e4 100644 --- a/libcxx/test/std/containers/associative/set/empty.pass.cpp +++ b/libcxx/test/std/containers/associative/set/empty.pass.cpp @@ -17,7 +17,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::set M; @@ -39,4 +39,6 @@ int main() assert(m.empty()); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/associative/set/equal_range.pass.cpp b/libcxx/test/std/containers/associative/set/equal_range.pass.cpp index da221aa54adc0..5c43706118dff 100644 --- a/libcxx/test/std/containers/associative/set/equal_range.pass.cpp +++ b/libcxx/test/std/containers/associative/set/equal_range.pass.cpp @@ -20,7 +20,7 @@ #include "min_allocator.h" #include "private_constructor.hpp" -int main() +int main(int, char**) { { typedef int V; @@ -367,4 +367,6 @@ int main() assert(r.second == next(m.begin(), 8)); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/associative/set/equal_range_transparent.pass.cpp b/libcxx/test/std/containers/associative/set/equal_range_transparent.pass.cpp index c091aa6b5d88c..b69ff2d522f04 100644 --- a/libcxx/test/std/containers/associative/set/equal_range_transparent.pass.cpp +++ b/libcxx/test/std/containers/associative/set/equal_range_transparent.pass.cpp @@ -44,7 +44,7 @@ struct Comp { } }; -int main() { +int main(int, char**) { std::set, Comp> s{{2, 1}, {1, 2}, {1, 3}, {1, 4}, {2, 2}}; auto er = s.equal_range(1); @@ -56,4 +56,6 @@ int main() { } assert(nels == 3); + + return 0; } diff --git a/libcxx/test/std/containers/associative/set/erase_iter.pass.cpp b/libcxx/test/std/containers/associative/set/erase_iter.pass.cpp index 99650d3d03fa4..49ce4f29e77a3 100644 --- a/libcxx/test/std/containers/associative/set/erase_iter.pass.cpp +++ b/libcxx/test/std/containers/associative/set/erase_iter.pass.cpp @@ -25,7 +25,7 @@ struct TemplateConstructor bool operator<(const TemplateConstructor&, const TemplateConstructor&) { return false; } -int main() +int main(int, char**) { { typedef std::set M; @@ -199,4 +199,6 @@ int main() c.erase(it); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/associative/set/erase_iter_iter.pass.cpp b/libcxx/test/std/containers/associative/set/erase_iter_iter.pass.cpp index b98d83ad8a13c..86fd52c2cb4e4 100644 --- a/libcxx/test/std/containers/associative/set/erase_iter_iter.pass.cpp +++ b/libcxx/test/std/containers/associative/set/erase_iter_iter.pass.cpp @@ -17,7 +17,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::set M; @@ -137,4 +137,6 @@ int main() assert(i == m.end()); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/associative/set/erase_key.pass.cpp b/libcxx/test/std/containers/associative/set/erase_key.pass.cpp index da3ea5c14d8b3..3ceec88500b23 100644 --- a/libcxx/test/std/containers/associative/set/erase_key.pass.cpp +++ b/libcxx/test/std/containers/associative/set/erase_key.pass.cpp @@ -17,7 +17,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::set M; @@ -199,4 +199,6 @@ int main() assert(i == 1); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/associative/set/extract_iterator.pass.cpp b/libcxx/test/std/containers/associative/set/extract_iterator.pass.cpp index da95331f7c7fb..1ba13e318a6c0 100644 --- a/libcxx/test/std/containers/associative/set/extract_iterator.pass.cpp +++ b/libcxx/test/std/containers/associative/set/extract_iterator.pass.cpp @@ -36,7 +36,7 @@ void test(Container& c) assert(c.size() == 0); } -int main() +int main(int, char**) { { using set_type = std::set; @@ -56,4 +56,6 @@ int main() min_alloc_set m = {1, 2, 3, 4, 5, 6}; test(m); } + + return 0; } diff --git a/libcxx/test/std/containers/associative/set/extract_key.pass.cpp b/libcxx/test/std/containers/associative/set/extract_key.pass.cpp index 68f24f6544971..4417e86367b11 100644 --- a/libcxx/test/std/containers/associative/set/extract_key.pass.cpp +++ b/libcxx/test/std/containers/associative/set/extract_key.pass.cpp @@ -43,7 +43,7 @@ void test(Container& c, KeyTypeIter first, KeyTypeIter last) } } -int main() +int main(int, char**) { { std::set m = {1, 2, 3, 4, 5, 6}; @@ -67,4 +67,6 @@ int main() int keys[] = {1, 2, 3, 4, 5, 6}; test(m, std::begin(keys), std::end(keys)); } + + return 0; } diff --git a/libcxx/test/std/containers/associative/set/find.pass.cpp b/libcxx/test/std/containers/associative/set/find.pass.cpp index 50b779afdcfe6..cda1ea87aa5a3 100644 --- a/libcxx/test/std/containers/associative/set/find.pass.cpp +++ b/libcxx/test/std/containers/associative/set/find.pass.cpp @@ -20,7 +20,7 @@ #include "min_allocator.h" #include "private_constructor.hpp" -int main() +int main(int, char**) { { typedef int V; @@ -237,4 +237,6 @@ int main() assert(r == next(m.begin(), 8)); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/associative/set/gcc_workaround.pass.cpp b/libcxx/test/std/containers/associative/set/gcc_workaround.pass.cpp index 2b923b7734031..23db04405df24 100644 --- a/libcxx/test/std/containers/associative/set/gcc_workaround.pass.cpp +++ b/libcxx/test/std/containers/associative/set/gcc_workaround.pass.cpp @@ -1,9 +1,8 @@ //===----------------------------------------------------------------------===// // -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// @@ -15,7 +14,4 @@ std::set s; using std::map; using std::multimap; -int main(void) -{ - return 0; -} +int main(int, char**) { return 0; } diff --git a/libcxx/test/std/containers/associative/set/incomplete_type.pass.cpp b/libcxx/test/std/containers/associative/set/incomplete_type.pass.cpp index 96b2bbf591683..d3b93c59972f8 100644 --- a/libcxx/test/std/containers/associative/set/incomplete_type.pass.cpp +++ b/libcxx/test/std/containers/associative/set/incomplete_type.pass.cpp @@ -23,6 +23,8 @@ struct A { inline bool operator==(A const& L, A const& R) { return &L == &R; } inline bool operator<(A const& L, A const& R) { return L.data < R.data; } -int main() { +int main(int, char**) { A a; + + return 0; } diff --git a/libcxx/test/std/containers/associative/set/insert_and_emplace_allocator_requirements.pass.cpp b/libcxx/test/std/containers/associative/set/insert_and_emplace_allocator_requirements.pass.cpp index 8c60e699af1f2..11be14b02b076 100644 --- a/libcxx/test/std/containers/associative/set/insert_and_emplace_allocator_requirements.pass.cpp +++ b/libcxx/test/std/containers/associative/set/insert_and_emplace_allocator_requirements.pass.cpp @@ -20,9 +20,11 @@ #include "container_test_types.h" #include "../../set_allocator_requirement_test_templates.h" -int main() +int main(int, char**) { testSetInsert >(); testSetEmplace >(); testSetEmplaceHint >(); + + return 0; } diff --git a/libcxx/test/std/containers/associative/set/insert_cv.pass.cpp b/libcxx/test/std/containers/associative/set/insert_cv.pass.cpp index d29a796baa08d..a97e76eb57668 100644 --- a/libcxx/test/std/containers/associative/set/insert_cv.pass.cpp +++ b/libcxx/test/std/containers/associative/set/insert_cv.pass.cpp @@ -53,7 +53,7 @@ void do_insert_cv_test() assert(*r.first == 3); } -int main() +int main(int, char**) { do_insert_cv_test >(); #if TEST_STD_VER >= 11 @@ -62,4 +62,6 @@ int main() do_insert_cv_test(); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/associative/set/insert_initializer_list.pass.cpp b/libcxx/test/std/containers/associative/set/insert_initializer_list.pass.cpp index 46fdecd4fd73d..ce5cc6fd2d745 100644 --- a/libcxx/test/std/containers/associative/set/insert_initializer_list.pass.cpp +++ b/libcxx/test/std/containers/associative/set/insert_initializer_list.pass.cpp @@ -20,7 +20,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::set C; @@ -56,4 +56,6 @@ int main() assert(*++i == V(8)); assert(*++i == V(10)); } + + return 0; } diff --git a/libcxx/test/std/containers/associative/set/insert_iter_cv.pass.cpp b/libcxx/test/std/containers/associative/set/insert_iter_cv.pass.cpp index ab8834e6af8ff..be27e5e4e0754 100644 --- a/libcxx/test/std/containers/associative/set/insert_iter_cv.pass.cpp +++ b/libcxx/test/std/containers/associative/set/insert_iter_cv.pass.cpp @@ -17,7 +17,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::set M; @@ -69,4 +69,6 @@ int main() assert(*r == 3); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/associative/set/insert_iter_iter.pass.cpp b/libcxx/test/std/containers/associative/set/insert_iter_iter.pass.cpp index bf55e31a8bece..35c2dca30f48c 100644 --- a/libcxx/test/std/containers/associative/set/insert_iter_iter.pass.cpp +++ b/libcxx/test/std/containers/associative/set/insert_iter_iter.pass.cpp @@ -19,7 +19,7 @@ #include "test_iterators.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::set M; @@ -69,4 +69,6 @@ int main() assert(*next(m.begin(), 2) == 3); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/associative/set/insert_iter_rv.pass.cpp b/libcxx/test/std/containers/associative/set/insert_iter_rv.pass.cpp index dfe3b52da6c97..08eba9fe60fb1 100644 --- a/libcxx/test/std/containers/associative/set/insert_iter_rv.pass.cpp +++ b/libcxx/test/std/containers/associative/set/insert_iter_rv.pass.cpp @@ -20,7 +20,7 @@ #include "MoveOnly.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::set M; @@ -70,4 +70,6 @@ int main() assert(m.size() == 3); assert(*r == 3); } + + return 0; } diff --git a/libcxx/test/std/containers/associative/set/insert_node_type.pass.cpp b/libcxx/test/std/containers/associative/set/insert_node_type.pass.cpp index 51826f4fd5ab8..188aea2bb0af2 100644 --- a/libcxx/test/std/containers/associative/set/insert_node_type.pass.cpp +++ b/libcxx/test/std/containers/associative/set/insert_node_type.pass.cpp @@ -73,10 +73,12 @@ void test(Container& c) } } -int main() +int main(int, char**) { std::set m; test(m); std::set, min_allocator> m2; test(m2); + + return 0; } diff --git a/libcxx/test/std/containers/associative/set/insert_node_type_hint.pass.cpp b/libcxx/test/std/containers/associative/set/insert_node_type_hint.pass.cpp index 2595a3ca27c4e..6e8c140997c80 100644 --- a/libcxx/test/std/containers/associative/set/insert_node_type_hint.pass.cpp +++ b/libcxx/test/std/containers/associative/set/insert_node_type_hint.pass.cpp @@ -51,10 +51,12 @@ void test(Container& c) } } -int main() +int main(int, char**) { std::set m; test(m); std::set, min_allocator> m2; test(m2); + + return 0; } diff --git a/libcxx/test/std/containers/associative/set/insert_rv.pass.cpp b/libcxx/test/std/containers/associative/set/insert_rv.pass.cpp index 567243ad5b974..092fd8a710b5a 100644 --- a/libcxx/test/std/containers/associative/set/insert_rv.pass.cpp +++ b/libcxx/test/std/containers/associative/set/insert_rv.pass.cpp @@ -20,7 +20,7 @@ #include "MoveOnly.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::set M; @@ -78,4 +78,6 @@ int main() assert(m.size() == 3); assert(*r.first == 3); } + + return 0; } diff --git a/libcxx/test/std/containers/associative/set/iterator.pass.cpp b/libcxx/test/std/containers/associative/set/iterator.pass.cpp index 5212e3fcfa340..da0f9a7b946a7 100644 --- a/libcxx/test/std/containers/associative/set/iterator.pass.cpp +++ b/libcxx/test/std/containers/associative/set/iterator.pass.cpp @@ -32,7 +32,7 @@ #include "test_macros.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef int V; @@ -209,4 +209,6 @@ int main() assert (!(cii != ii1 )); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/associative/set/lower_bound.pass.cpp b/libcxx/test/std/containers/associative/set/lower_bound.pass.cpp index b363524d412fc..9a25950a8515e 100644 --- a/libcxx/test/std/containers/associative/set/lower_bound.pass.cpp +++ b/libcxx/test/std/containers/associative/set/lower_bound.pass.cpp @@ -20,7 +20,7 @@ #include "min_allocator.h" #include "private_constructor.hpp" -int main() +int main(int, char**) { { typedef int V; @@ -334,4 +334,6 @@ int main() } #endif + + return 0; } diff --git a/libcxx/test/std/containers/associative/set/max_size.pass.cpp b/libcxx/test/std/containers/associative/set/max_size.pass.cpp index 8c2c5fd281a9e..e37bfe7142b06 100644 --- a/libcxx/test/std/containers/associative/set/max_size.pass.cpp +++ b/libcxx/test/std/containers/associative/set/max_size.pass.cpp @@ -20,7 +20,7 @@ #include "test_allocator.h" #include "test_macros.h" -int main() +int main(int, char**) { { typedef limited_allocator A; @@ -46,4 +46,6 @@ int main() assert(c.max_size() <= max_dist); assert(c.max_size() <= alloc_max_size(c.get_allocator())); } + + return 0; } diff --git a/libcxx/test/std/containers/associative/set/merge.pass.cpp b/libcxx/test/std/containers/associative/set/merge.pass.cpp index a8b22ea3df34b..62e76ba069bcf 100644 --- a/libcxx/test/std/containers/associative/set/merge.pass.cpp +++ b/libcxx/test/std/containers/associative/set/merge.pass.cpp @@ -49,7 +49,7 @@ struct throw_comparator }; #endif -int main() +int main(int, char**) { { std::set src{1, 3, 5}; @@ -145,4 +145,5 @@ int main() first.merge(std::move(second)); } } + return 0; } diff --git a/libcxx/test/std/containers/associative/set/set.cons/alloc.pass.cpp b/libcxx/test/std/containers/associative/set/set.cons/alloc.pass.cpp index 87bdb7aec7d32..591b28c184b9b 100644 --- a/libcxx/test/std/containers/associative/set/set.cons/alloc.pass.cpp +++ b/libcxx/test/std/containers/associative/set/set.cons/alloc.pass.cpp @@ -17,7 +17,7 @@ #include "test_allocator.h" -int main() +int main(int, char**) { typedef std::less C; typedef test_allocator A; @@ -25,4 +25,6 @@ int main() assert(m.empty()); assert(m.begin() == m.end()); assert(m.get_allocator() == A(5)); + + return 0; } diff --git a/libcxx/test/std/containers/associative/set/set.cons/assign_initializer_list.pass.cpp b/libcxx/test/std/containers/associative/set/set.cons/assign_initializer_list.pass.cpp index 269ae11758f3b..0127b1d8147bf 100644 --- a/libcxx/test/std/containers/associative/set/set.cons/assign_initializer_list.pass.cpp +++ b/libcxx/test/std/containers/associative/set/set.cons/assign_initializer_list.pass.cpp @@ -19,7 +19,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::set C; @@ -51,4 +51,6 @@ int main() assert(*++i == V(5)); assert(*++i == V(6)); } + + return 0; } diff --git a/libcxx/test/std/containers/associative/set/set.cons/compare.pass.cpp b/libcxx/test/std/containers/associative/set/set.cons/compare.pass.cpp index 4a6978d954393..a4e9718e2b40d 100644 --- a/libcxx/test/std/containers/associative/set/set.cons/compare.pass.cpp +++ b/libcxx/test/std/containers/associative/set/set.cons/compare.pass.cpp @@ -21,7 +21,7 @@ #include "../../../test_compare.h" -int main() +int main(int, char**) { typedef test_compare > C; const std::set m(C(3)); @@ -29,4 +29,6 @@ int main() assert(m.begin() == m.end()); assert(m.key_comp() == C(3)); assert(m.value_comp() == C(3)); + + return 0; } diff --git a/libcxx/test/std/containers/associative/set/set.cons/compare_alloc.pass.cpp b/libcxx/test/std/containers/associative/set/set.cons/compare_alloc.pass.cpp index 8264c3f81051d..41c7d02894b1f 100644 --- a/libcxx/test/std/containers/associative/set/set.cons/compare_alloc.pass.cpp +++ b/libcxx/test/std/containers/associative/set/set.cons/compare_alloc.pass.cpp @@ -18,7 +18,7 @@ #include "../../../test_compare.h" #include "test_allocator.h" -int main() +int main(int, char**) { typedef test_compare > C; typedef test_allocator A; @@ -27,4 +27,6 @@ int main() assert(m.begin() == m.end()); assert(m.key_comp() == C(4)); assert(m.get_allocator() == A(5)); + + return 0; } diff --git a/libcxx/test/std/containers/associative/set/set.cons/compare_copy_constructible.fail.cpp b/libcxx/test/std/containers/associative/set/set.cons/compare_copy_constructible.fail.cpp index 84c0b4ea0a95e..58f678dd1a415 100644 --- a/libcxx/test/std/containers/associative/set/set.cons/compare_copy_constructible.fail.cpp +++ b/libcxx/test/std/containers/associative/set/set.cons/compare_copy_constructible.fail.cpp @@ -23,6 +23,8 @@ struct Comp { }; -int main() { +int main(int, char**) { std::set > m; + + return 0; } diff --git a/libcxx/test/std/containers/associative/set/set.cons/copy.pass.cpp b/libcxx/test/std/containers/associative/set/set.cons/copy.pass.cpp index 529d951d282a3..2e256aa172121 100644 --- a/libcxx/test/std/containers/associative/set/set.cons/copy.pass.cpp +++ b/libcxx/test/std/containers/associative/set/set.cons/copy.pass.cpp @@ -19,7 +19,7 @@ #include "../../../test_compare.h" #include "test_allocator.h" -int main() +int main(int, char**) { { typedef int V; @@ -91,4 +91,6 @@ int main() assert(*next(mo.begin(), 2) == 3); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/associative/set/set.cons/copy_alloc.pass.cpp b/libcxx/test/std/containers/associative/set/set.cons/copy_alloc.pass.cpp index 09e7f84ee2f0b..6b1010c33ff27 100644 --- a/libcxx/test/std/containers/associative/set/set.cons/copy_alloc.pass.cpp +++ b/libcxx/test/std/containers/associative/set/set.cons/copy_alloc.pass.cpp @@ -18,7 +18,7 @@ #include "../../../test_compare.h" #include "test_allocator.h" -int main() +int main(int, char**) { typedef int V; V ar[] = @@ -52,4 +52,6 @@ int main() assert(*mo.begin() == 1); assert(*next(mo.begin()) == 2); assert(*next(mo.begin(), 2) == 3); + + return 0; } diff --git a/libcxx/test/std/containers/associative/set/set.cons/copy_assign.pass.cpp b/libcxx/test/std/containers/associative/set/set.cons/copy_assign.pass.cpp index d89c278137b21..c1f37f83dcc86 100644 --- a/libcxx/test/std/containers/associative/set/set.cons/copy_assign.pass.cpp +++ b/libcxx/test/std/containers/associative/set/set.cons/copy_assign.pass.cpp @@ -18,7 +18,7 @@ #include "../../../test_compare.h" #include "test_allocator.h" -int main() +int main(int, char**) { { typedef int V; @@ -105,4 +105,6 @@ int main() assert(*next(mo.begin()) == 2); assert(*next(mo.begin(), 2) == 3); } + + return 0; } diff --git a/libcxx/test/std/containers/associative/set/set.cons/default.pass.cpp b/libcxx/test/std/containers/associative/set/set.cons/default.pass.cpp index 16137d7cc9703..88dc3a262c803 100644 --- a/libcxx/test/std/containers/associative/set/set.cons/default.pass.cpp +++ b/libcxx/test/std/containers/associative/set/set.cons/default.pass.cpp @@ -17,7 +17,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { std::set m; @@ -50,4 +50,6 @@ int main() assert(m.begin() == m.end()); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/associative/set/set.cons/default_noexcept.pass.cpp b/libcxx/test/std/containers/associative/set/set.cons/default_noexcept.pass.cpp index 0c25901be30ba..0305e20f2eecd 100644 --- a/libcxx/test/std/containers/associative/set/set.cons/default_noexcept.pass.cpp +++ b/libcxx/test/std/containers/associative/set/set.cons/default_noexcept.pass.cpp @@ -33,7 +33,7 @@ struct some_comp bool operator()(const T&, const T&) const { return false; } }; -int main() +int main(int, char**) { #if defined(_LIBCPP_VERSION) { @@ -53,4 +53,6 @@ int main() typedef std::set> C; static_assert(!std::is_nothrow_default_constructible::value, ""); } + + return 0; } diff --git a/libcxx/test/std/containers/associative/set/set.cons/dtor_noexcept.pass.cpp b/libcxx/test/std/containers/associative/set/set.cons/dtor_noexcept.pass.cpp index 9ee68bf6d76a0..a06a47168d294 100644 --- a/libcxx/test/std/containers/associative/set/set.cons/dtor_noexcept.pass.cpp +++ b/libcxx/test/std/containers/associative/set/set.cons/dtor_noexcept.pass.cpp @@ -27,7 +27,7 @@ struct some_comp bool operator()(const T&, const T&) const { return false; } }; -int main() +int main(int, char**) { { typedef std::set C; @@ -47,4 +47,6 @@ int main() static_assert(!std::is_nothrow_destructible::value, ""); } #endif // _LIBCPP_VERSION + + return 0; } diff --git a/libcxx/test/std/containers/associative/set/set.cons/initializer_list.pass.cpp b/libcxx/test/std/containers/associative/set/set.cons/initializer_list.pass.cpp index a0cba90bd3e68..e4742bbdae056 100644 --- a/libcxx/test/std/containers/associative/set/set.cons/initializer_list.pass.cpp +++ b/libcxx/test/std/containers/associative/set/set.cons/initializer_list.pass.cpp @@ -19,7 +19,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::set C; @@ -49,4 +49,6 @@ int main() assert(*++i == V(5)); assert(*++i == V(6)); } + + return 0; } diff --git a/libcxx/test/std/containers/associative/set/set.cons/initializer_list_compare.pass.cpp b/libcxx/test/std/containers/associative/set/set.cons/initializer_list_compare.pass.cpp index a0448cdbcba21..cf4b78af9343c 100644 --- a/libcxx/test/std/containers/associative/set/set.cons/initializer_list_compare.pass.cpp +++ b/libcxx/test/std/containers/associative/set/set.cons/initializer_list_compare.pass.cpp @@ -18,7 +18,7 @@ #include #include "../../../test_compare.h" -int main() +int main(int, char**) { typedef test_compare > Cmp; typedef std::set C; @@ -34,4 +34,6 @@ int main() assert(*++i == V(5)); assert(*++i == V(6)); assert(m.key_comp() == Cmp(10)); + + return 0; } diff --git a/libcxx/test/std/containers/associative/set/set.cons/initializer_list_compare_alloc.pass.cpp b/libcxx/test/std/containers/associative/set/set.cons/initializer_list_compare_alloc.pass.cpp index 40990948b7b5e..161cdd8c1c3c1 100644 --- a/libcxx/test/std/containers/associative/set/set.cons/initializer_list_compare_alloc.pass.cpp +++ b/libcxx/test/std/containers/associative/set/set.cons/initializer_list_compare_alloc.pass.cpp @@ -21,7 +21,7 @@ #include "../../../test_compare.h" #include "test_allocator.h" -int main() +int main(int, char**) { { typedef test_compare > Cmp; @@ -58,4 +58,6 @@ int main() assert(*++i == V(6)); assert(m.get_allocator() == A(4)); } + + return 0; } diff --git a/libcxx/test/std/containers/associative/set/set.cons/iter_iter.pass.cpp b/libcxx/test/std/containers/associative/set/set.cons/iter_iter.pass.cpp index 913efe0da62da..25143a7df100b 100644 --- a/libcxx/test/std/containers/associative/set/set.cons/iter_iter.pass.cpp +++ b/libcxx/test/std/containers/associative/set/set.cons/iter_iter.pass.cpp @@ -19,7 +19,7 @@ #include "test_iterators.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef int V; @@ -67,4 +67,6 @@ int main() assert(*next(m.begin(), 2) == 3); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/associative/set/set.cons/iter_iter_alloc.pass.cpp b/libcxx/test/std/containers/associative/set/set.cons/iter_iter_alloc.pass.cpp index 6e3625d0540e3..bf8b97098314c 100644 --- a/libcxx/test/std/containers/associative/set/set.cons/iter_iter_alloc.pass.cpp +++ b/libcxx/test/std/containers/associative/set/set.cons/iter_iter_alloc.pass.cpp @@ -26,7 +26,7 @@ #include "../../../test_compare.h" #include "test_allocator.h" -int main() +int main(int, char**) { { typedef int V; @@ -83,4 +83,6 @@ int main() assert(m.get_allocator() == a); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/associative/set/set.cons/iter_iter_comp.pass.cpp b/libcxx/test/std/containers/associative/set/set.cons/iter_iter_comp.pass.cpp index b75cccc4e40c5..f9c2e4a98ef23 100644 --- a/libcxx/test/std/containers/associative/set/set.cons/iter_iter_comp.pass.cpp +++ b/libcxx/test/std/containers/associative/set/set.cons/iter_iter_comp.pass.cpp @@ -19,7 +19,7 @@ #include "test_iterators.h" #include "../../../test_compare.h" -int main() +int main(int, char**) { typedef int V; V ar[] = @@ -43,4 +43,6 @@ int main() assert(*m.begin() == 1); assert(*next(m.begin()) == 2); assert(*next(m.begin(), 2) == 3); + + return 0; } diff --git a/libcxx/test/std/containers/associative/set/set.cons/move.pass.cpp b/libcxx/test/std/containers/associative/set/set.cons/move.pass.cpp index b2d7b0429b8c3..516274efca400 100644 --- a/libcxx/test/std/containers/associative/set/set.cons/move.pass.cpp +++ b/libcxx/test/std/containers/associative/set/set.cons/move.pass.cpp @@ -21,7 +21,7 @@ #include "test_allocator.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef int V; @@ -101,4 +101,6 @@ int main() assert(mo.size() == 0); assert(distance(mo.begin(), mo.end()) == 0); } + + return 0; } diff --git a/libcxx/test/std/containers/associative/set/set.cons/move_alloc.pass.cpp b/libcxx/test/std/containers/associative/set/set.cons/move_alloc.pass.cpp index 7bae3ed210eb3..63ec296892b0c 100644 --- a/libcxx/test/std/containers/associative/set/set.cons/move_alloc.pass.cpp +++ b/libcxx/test/std/containers/associative/set/set.cons/move_alloc.pass.cpp @@ -23,7 +23,7 @@ #include "test_allocator.h" #include "Counter.h" -int main() +int main(int, char**) { { typedef MoveOnly V; @@ -172,17 +172,22 @@ int main() M m3(std::move(m1), A()); assert(m3 == m2); LIBCPP_ASSERT(m1.empty()); - assert(Counter_base::gConstructed == 6+num); + assert(Counter_base::gConstructed >= (int)(6+num)); + assert(Counter_base::gConstructed <= (int)(m1.size()+6+num)); { M m4(std::move(m2), A(5)); - assert(Counter_base::gConstructed == 6+num); + assert(Counter_base::gConstructed >= (int)(6+num)); + assert(Counter_base::gConstructed <= (int)(m1.size()+m2.size()+6+num)); assert(m4 == m3); LIBCPP_ASSERT(m2.empty()); } - assert(Counter_base::gConstructed == 3+num); + assert(Counter_base::gConstructed >= (int)(3+num)); + assert(Counter_base::gConstructed <= (int)(m1.size()+m2.size()+3+num)); } assert(Counter_base::gConstructed == 0); } + + return 0; } diff --git a/libcxx/test/std/containers/associative/set/set.cons/move_assign.pass.cpp b/libcxx/test/std/containers/associative/set/set.cons/move_assign.pass.cpp index bbd787151ab27..ba5c767f30bc1 100644 --- a/libcxx/test/std/containers/associative/set/set.cons/move_assign.pass.cpp +++ b/libcxx/test/std/containers/associative/set/set.cons/move_assign.pass.cpp @@ -22,7 +22,7 @@ #include "test_allocator.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef MoveOnly V; @@ -180,4 +180,6 @@ int main() assert(m3.key_comp() == C(5)); assert(m1.empty()); } + + return 0; } diff --git a/libcxx/test/std/containers/associative/set/set.cons/move_assign_noexcept.pass.cpp b/libcxx/test/std/containers/associative/set/set.cons/move_assign_noexcept.pass.cpp index 408227e8db345..f6e3c9f32e6a3 100644 --- a/libcxx/test/std/containers/associative/set/set.cons/move_assign_noexcept.pass.cpp +++ b/libcxx/test/std/containers/associative/set/set.cons/move_assign_noexcept.pass.cpp @@ -33,7 +33,7 @@ struct some_comp bool operator()(const T&, const T&) const { return false; } }; -int main() +int main(int, char**) { { typedef std::set C; @@ -53,4 +53,6 @@ int main() typedef std::set> C; static_assert(!std::is_nothrow_move_assignable::value, ""); } + + return 0; } diff --git a/libcxx/test/std/containers/associative/set/set.cons/move_noexcept.pass.cpp b/libcxx/test/std/containers/associative/set/set.cons/move_noexcept.pass.cpp index 6945aa39e45ef..2bcd26de63724 100644 --- a/libcxx/test/std/containers/associative/set/set.cons/move_noexcept.pass.cpp +++ b/libcxx/test/std/containers/associative/set/set.cons/move_noexcept.pass.cpp @@ -31,7 +31,7 @@ struct some_comp bool operator()(const T&, const T&) const { return false; } }; -int main() +int main(int, char**) { #if defined(_LIBCPP_VERSION) { @@ -51,4 +51,6 @@ int main() typedef std::set> C; static_assert(!std::is_nothrow_move_constructible::value, ""); } + + return 0; } diff --git a/libcxx/test/std/containers/associative/set/set.erasure/erase_if.pass.cpp b/libcxx/test/std/containers/associative/set/set.erasure/erase_if.pass.cpp index 3eecab797af7f..43a60d79c02cf 100644 --- a/libcxx/test/std/containers/associative/set/set.erasure/erase_if.pass.cpp +++ b/libcxx/test/std/containers/associative/set/set.erasure/erase_if.pass.cpp @@ -55,7 +55,7 @@ void test() test0(S({1,2,3}), False, S({1,2,3})); } -int main() +int main(int, char**) { test>(); test, min_allocator>> (); @@ -63,4 +63,6 @@ int main() test>(); test>(); + + return 0; } diff --git a/libcxx/test/std/containers/associative/set/set.special/member_swap.pass.cpp b/libcxx/test/std/containers/associative/set/set.special/member_swap.pass.cpp index 02324a36aee7d..455c34ec89bb8 100644 --- a/libcxx/test/std/containers/associative/set/set.special/member_swap.pass.cpp +++ b/libcxx/test/std/containers/associative/set/set.special/member_swap.pass.cpp @@ -17,7 +17,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef int V; @@ -173,4 +173,6 @@ int main() } } #endif + + return 0; } diff --git a/libcxx/test/std/containers/associative/set/set.special/non_member_swap.pass.cpp b/libcxx/test/std/containers/associative/set/set.special/non_member_swap.pass.cpp index 2420dabf6a422..b111de9cac689 100644 --- a/libcxx/test/std/containers/associative/set/set.special/non_member_swap.pass.cpp +++ b/libcxx/test/std/containers/associative/set/set.special/non_member_swap.pass.cpp @@ -17,7 +17,7 @@ #include "test_allocator.h" #include "../../../test_compare.h" -int main() +int main(int, char**) { typedef int V; { @@ -163,4 +163,6 @@ int main() assert(m2.key_comp() == C(1)); assert(m2.get_allocator() == A(1)); } + + return 0; } diff --git a/libcxx/test/std/containers/associative/set/set.special/swap_noexcept.pass.cpp b/libcxx/test/std/containers/associative/set/set.special/swap_noexcept.pass.cpp index fc0eba646e5e1..9fd68f6639564 100644 --- a/libcxx/test/std/containers/associative/set/set.special/swap_noexcept.pass.cpp +++ b/libcxx/test/std/containers/associative/set/set.special/swap_noexcept.pass.cpp @@ -91,7 +91,7 @@ struct some_alloc3 typedef std::false_type is_always_equal; }; -int main() +int main(int, char**) { { typedef std::set C; @@ -137,4 +137,6 @@ int main() #endif // _LIBCPP_VERSION #endif + + return 0; } diff --git a/libcxx/test/std/containers/associative/set/size.pass.cpp b/libcxx/test/std/containers/associative/set/size.pass.cpp index 93b23472540db..b73d833769c2e 100644 --- a/libcxx/test/std/containers/associative/set/size.pass.cpp +++ b/libcxx/test/std/containers/associative/set/size.pass.cpp @@ -17,7 +17,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::set M; @@ -55,4 +55,6 @@ int main() assert(m.size() == 0); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/associative/set/types.pass.cpp b/libcxx/test/std/containers/associative/set/types.pass.cpp index 3b8c0983b1ee6..5c7bd25a5b558 100644 --- a/libcxx/test/std/containers/associative/set/types.pass.cpp +++ b/libcxx/test/std/containers/associative/set/types.pass.cpp @@ -33,7 +33,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::set C; @@ -66,4 +66,6 @@ int main() static_assert((std::is_same::value), ""); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/associative/set/upper_bound.pass.cpp b/libcxx/test/std/containers/associative/set/upper_bound.pass.cpp index 315268a600add..3649a5c045590 100644 --- a/libcxx/test/std/containers/associative/set/upper_bound.pass.cpp +++ b/libcxx/test/std/containers/associative/set/upper_bound.pass.cpp @@ -20,7 +20,7 @@ #include "min_allocator.h" #include "private_constructor.hpp" -int main() +int main(int, char**) { { typedef int V; @@ -333,4 +333,6 @@ int main() assert(r == next(m.begin(), 8)); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/nothing_to_do.pass.cpp b/libcxx/test/std/containers/container.adaptors/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/containers/container.adaptors/nothing_to_do.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons.alloc/ctor_alloc.pass.cpp b/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons.alloc/ctor_alloc.pass.cpp index 293356b386a50..59547203b49b7 100644 --- a/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons.alloc/ctor_alloc.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons.alloc/ctor_alloc.pass.cpp @@ -40,9 +40,11 @@ struct test using base::c; }; -int main() +int main(int, char**) { test q((test_allocator(3))); assert(q.c.get_allocator() == test_allocator(3)); assert(q.c.size() == 0); + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons.alloc/ctor_comp_alloc.pass.cpp b/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons.alloc/ctor_comp_alloc.pass.cpp index 58d61b70eb2ff..40f6bc473c7a7 100644 --- a/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons.alloc/ctor_comp_alloc.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons.alloc/ctor_comp_alloc.pass.cpp @@ -40,9 +40,11 @@ struct test using base::c; }; -int main() +int main(int, char**) { test q(std::less(), test_allocator(3)); assert(q.c.get_allocator() == test_allocator(3)); assert(q.c.size() == 0); + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons.alloc/ctor_comp_cont_alloc.pass.cpp b/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons.alloc/ctor_comp_cont_alloc.pass.cpp index 39c4955659ba9..1f3dd7fbd1679 100644 --- a/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons.alloc/ctor_comp_cont_alloc.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons.alloc/ctor_comp_cont_alloc.pass.cpp @@ -51,7 +51,7 @@ struct test using base::c; }; -int main() +int main(int, char**) { typedef std::vector > C; C v = make(5); @@ -59,4 +59,6 @@ int main() assert(q.c.get_allocator() == test_allocator(3)); assert(q.size() == 5); assert(q.top() == 4); + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons.alloc/ctor_comp_rcont_alloc.pass.cpp b/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons.alloc/ctor_comp_rcont_alloc.pass.cpp index 4609064735fe5..3956f9b974e61 100644 --- a/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons.alloc/ctor_comp_rcont_alloc.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons.alloc/ctor_comp_rcont_alloc.pass.cpp @@ -51,11 +51,13 @@ struct test using base::c; }; -int main() +int main(int, char**) { typedef std::vector > C; test q(std::less(), make(5), test_allocator(3)); assert(q.c.get_allocator() == test_allocator(3)); assert(q.size() == 5); assert(q.top() == 4); + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons.alloc/ctor_copy_alloc.pass.cpp b/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons.alloc/ctor_copy_alloc.pass.cpp index 69ed27c073c21..c461718430c57 100644 --- a/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons.alloc/ctor_copy_alloc.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons.alloc/ctor_copy_alloc.pass.cpp @@ -45,7 +45,7 @@ struct test using base::c; }; -int main() +int main(int, char**) { test qo(std::less(), make > >(5), @@ -54,4 +54,6 @@ int main() assert(q.size() == 5); assert(q.c.get_allocator() == test_allocator(6)); assert(q.top() == int(4)); + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons.alloc/ctor_move_alloc.pass.cpp b/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons.alloc/ctor_move_alloc.pass.cpp index d1ca38e022bd4..98dc207c19990 100644 --- a/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons.alloc/ctor_move_alloc.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons.alloc/ctor_move_alloc.pass.cpp @@ -53,7 +53,7 @@ struct test }; -int main() +int main(int, char**) { test qo(std::less(), make > >(5), @@ -62,4 +62,6 @@ int main() assert(q.size() == 5); assert(q.c.get_allocator() == test_allocator(6)); assert(q.top() == MoveOnly(4)); + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/assign_copy.pass.cpp b/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/assign_copy.pass.cpp index 12c64256111f4..5b7760d0546db 100644 --- a/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/assign_copy.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/assign_copy.pass.cpp @@ -24,7 +24,7 @@ make(int n) return c; } -int main() +int main(int, char**) { std::vector v = make >(5); std::priority_queue, std::greater > qo(std::greater(), v); @@ -32,4 +32,6 @@ int main() q = qo; assert(q.size() == 5); assert(q.top() == 0); + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/assign_move.pass.cpp b/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/assign_move.pass.cpp index 61499209478e4..20f62d9bf64eb 100644 --- a/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/assign_move.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/assign_move.pass.cpp @@ -29,11 +29,13 @@ make(int n) } -int main() +int main(int, char**) { std::priority_queue qo(std::less(), make >(5)); std::priority_queue q; q = std::move(qo); assert(q.size() == 5); assert(q.top() == MoveOnly(4)); + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/ctor_comp.pass.cpp b/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/ctor_comp.pass.cpp index a195b10fc5028..02f1bcaf0592b 100644 --- a/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/ctor_comp.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/ctor_comp.pass.cpp @@ -15,7 +15,7 @@ #include "test_allocator.h" -int main() +int main(int, char**) { std::priority_queue > > q((std::less())); assert(q.size() == 0); @@ -23,4 +23,6 @@ int main() q.push(2); assert(q.size() == 2); assert(q.top() == 2); + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/ctor_comp_container.pass.cpp b/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/ctor_comp_container.pass.cpp index 561b5d48deda7..487b86c5f52cc 100644 --- a/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/ctor_comp_container.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/ctor_comp_container.pass.cpp @@ -24,10 +24,12 @@ make(int n) return c; } -int main() +int main(int, char**) { std::vector v = make >(5); std::priority_queue, std::greater > q(std::greater(), v); assert(q.size() == 5); assert(q.top() == 0); + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/ctor_comp_rcontainer.pass.cpp b/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/ctor_comp_rcontainer.pass.cpp index cb3b97997fa4d..47980032c05d6 100644 --- a/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/ctor_comp_rcontainer.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/ctor_comp_rcontainer.pass.cpp @@ -29,9 +29,11 @@ make(int n) } -int main() +int main(int, char**) { std::priority_queue q(std::less(), make >(5)); assert(q.size() == 5); assert(q.top() == MoveOnly(4)); + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/ctor_copy.pass.cpp b/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/ctor_copy.pass.cpp index 1c63f71520cad..fa8bae2b91bfe 100644 --- a/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/ctor_copy.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/ctor_copy.pass.cpp @@ -24,11 +24,13 @@ make(int n) return c; } -int main() +int main(int, char**) { std::vector v = make >(5); std::priority_queue, std::greater > qo(std::greater(), v); std::priority_queue, std::greater > q = qo; assert(q.size() == 5); assert(q.top() == 0); + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/ctor_default.pass.cpp b/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/ctor_default.pass.cpp index ae0e7badb6d40..4c8dd524aebf4 100644 --- a/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/ctor_default.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/ctor_default.pass.cpp @@ -15,7 +15,7 @@ #include "test_allocator.h" -int main() +int main(int, char**) { std::priority_queue > > q; assert(q.size() == 0); @@ -23,4 +23,6 @@ int main() q.push(2); assert(q.size() == 2); assert(q.top() == 2); + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/ctor_iter_iter.pass.cpp b/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/ctor_iter_iter.pass.cpp index d1cda2029cab0..d2afe72cad5d4 100644 --- a/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/ctor_iter_iter.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/ctor_iter_iter.pass.cpp @@ -15,11 +15,13 @@ #include #include -int main() +int main(int, char**) { int a[] = {3, 5, 2, 0, 6, 8, 1}; int* an = a + sizeof(a)/sizeof(a[0]); std::priority_queue q(a, an); assert(q.size() == static_cast(an - a)); assert(q.top() == 8); + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/ctor_iter_iter_comp.pass.cpp b/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/ctor_iter_iter_comp.pass.cpp index c147b5cfd5000..caee12f0f5e4e 100644 --- a/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/ctor_iter_iter_comp.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/ctor_iter_iter_comp.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { int a[] = {3, 5, 2, 0, 6, 8, 1}; int* an = a + sizeof(a)/sizeof(a[0]); @@ -24,4 +24,6 @@ int main() q(a, an, std::greater()); assert(q.size() == static_cast(an - a)); assert(q.top() == 0); + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/ctor_iter_iter_comp_cont.pass.cpp b/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/ctor_iter_iter_comp_cont.pass.cpp index b5dd515da13e1..0b07667924086 100644 --- a/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/ctor_iter_iter_comp_cont.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/ctor_iter_iter_comp_cont.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { int a[] = {3, 5, 2, 0, 6, 8, 1}; const int n = sizeof(a)/sizeof(a[0]); @@ -23,4 +23,6 @@ int main() std::priority_queue q(a+n/2, a+n, std::less(), v); assert(q.size() == n); assert(q.top() == 8); + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/ctor_iter_iter_comp_rcont.pass.cpp b/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/ctor_iter_iter_comp_rcont.pass.cpp index f2f78685f2471..6bc4417f47859 100644 --- a/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/ctor_iter_iter_comp_rcont.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/ctor_iter_iter_comp_rcont.pass.cpp @@ -19,7 +19,7 @@ #include "MoveOnly.h" -int main() +int main(int, char**) { int a[] = {3, 5, 2, 0, 6, 8, 1}; const int n = sizeof(a)/sizeof(a[0]); @@ -28,4 +28,6 @@ int main() std::vector(a, a+n/2)); assert(q.size() == n); assert(q.top() == MoveOnly(8)); + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/ctor_move.pass.cpp b/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/ctor_move.pass.cpp index 445bdb56675a3..4158012445abe 100644 --- a/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/ctor_move.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/ctor_move.pass.cpp @@ -29,10 +29,12 @@ make(int n) } -int main() +int main(int, char**) { std::priority_queue qo(std::less(), make >(5)); std::priority_queue q = std::move(qo); assert(q.size() == 5); assert(q.top() == MoveOnly(4)); + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/deduct.fail.cpp b/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/deduct.fail.cpp index a37e372edc6c7..a6e579a44562a 100644 --- a/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/deduct.fail.cpp +++ b/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/deduct.fail.cpp @@ -17,7 +17,7 @@ #include -int main() +int main(int, char**) { // Test the explicit deduction guides { @@ -54,4 +54,6 @@ int main() // stack, allocator>> } + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/deduct.pass.cpp b/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/deduct.pass.cpp index f175c7d14898f..45d39ad3ed7ad 100644 --- a/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/deduct.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/deduct.pass.cpp @@ -38,7 +38,7 @@ struct A {}; -int main() +int main(int, char**) { // Test the explicit deduction guides @@ -119,4 +119,6 @@ int main() assert(pri.size() == 4); assert(pri.top() == 0); } + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/default_noexcept.pass.cpp b/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/default_noexcept.pass.cpp index fa0e92a1663ad..d738a553eaf7c 100644 --- a/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/default_noexcept.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/default_noexcept.pass.cpp @@ -23,7 +23,7 @@ #include "test_macros.h" #include "MoveOnly.h" -int main() +int main(int, char**) { #if defined(_LIBCPP_VERSION) { @@ -31,4 +31,6 @@ int main() static_assert(std::is_nothrow_default_constructible::value, ""); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/dtor_noexcept.pass.cpp b/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/dtor_noexcept.pass.cpp index a6418a3c77bd3..af583a9e27a75 100644 --- a/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/dtor_noexcept.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/dtor_noexcept.pass.cpp @@ -17,10 +17,12 @@ #include "MoveOnly.h" -int main() +int main(int, char**) { { typedef std::priority_queue C; static_assert(std::is_nothrow_destructible::value, ""); } + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/move_assign_noexcept.pass.cpp b/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/move_assign_noexcept.pass.cpp index 8c3800ba21ea1..3fbd53dc43e01 100644 --- a/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/move_assign_noexcept.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/move_assign_noexcept.pass.cpp @@ -21,10 +21,12 @@ #include "MoveOnly.h" -int main() +int main(int, char**) { { typedef std::priority_queue C; static_assert(std::is_nothrow_move_assignable::value, ""); } + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/move_noexcept.pass.cpp b/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/move_noexcept.pass.cpp index ae6eb4b087d69..7c6b5f2136f35 100644 --- a/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/move_noexcept.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/move_noexcept.pass.cpp @@ -21,10 +21,12 @@ #include "MoveOnly.h" -int main() +int main(int, char**) { { typedef std::priority_queue C; static_assert(std::is_nothrow_move_constructible::value, ""); } + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.members/emplace.pass.cpp b/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.members/emplace.pass.cpp index 5e5dd9f126d9d..928533075d021 100644 --- a/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.members/emplace.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.members/emplace.pass.cpp @@ -19,7 +19,7 @@ #include "../../../Emplaceable.h" -int main() +int main(int, char**) { std::priority_queue q; q.emplace(1, 2.5); @@ -28,4 +28,6 @@ int main() assert(q.top() == Emplaceable(3, 4.5)); q.emplace(2, 3.5); assert(q.top() == Emplaceable(3, 4.5)); + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.members/empty.fail.cpp b/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.members/empty.fail.cpp index 33b97d533766d..698553d33e10f 100644 --- a/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.members/empty.fail.cpp +++ b/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.members/empty.fail.cpp @@ -20,8 +20,10 @@ #include "test_macros.h" -int main () +int main(int, char**) { std::priority_queue c; c.empty(); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.members/empty.pass.cpp b/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.members/empty.pass.cpp index 60499b853d1d0..f8f9279d576c6 100644 --- a/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.members/empty.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.members/empty.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { std::priority_queue q; assert(q.empty()); @@ -23,4 +23,6 @@ int main() assert(!q.empty()); q.pop(); assert(q.empty()); + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.members/pop.pass.cpp b/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.members/pop.pass.cpp index b6bcb4a72f83d..a6fc9509c8bcf 100644 --- a/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.members/pop.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.members/pop.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { std::priority_queue q; q.push(1); @@ -30,4 +30,6 @@ int main() assert(q.top() == 1); q.pop(); assert(q.empty()); + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.members/push.pass.cpp b/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.members/push.pass.cpp index 8edbe1ad1274e..01c0ab61832a3 100644 --- a/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.members/push.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.members/push.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { std::priority_queue q; q.push(1); @@ -24,4 +24,6 @@ int main() assert(q.top() == 3); q.push(2); assert(q.top() == 3); + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.members/push_rvalue.pass.cpp b/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.members/push_rvalue.pass.cpp index 00bdf0c7e4cbd..cf474dec56552 100644 --- a/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.members/push_rvalue.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.members/push_rvalue.pass.cpp @@ -19,7 +19,7 @@ #include "MoveOnly.h" -int main() +int main(int, char**) { std::priority_queue q; q.push(1); @@ -28,4 +28,6 @@ int main() assert(q.top() == 3); q.push(2); assert(q.top() == 3); + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.members/size.pass.cpp b/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.members/size.pass.cpp index 51eef9eda27b4..393a97c28a418 100644 --- a/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.members/size.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.members/size.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { std::priority_queue q; assert(q.size() == 0); @@ -23,4 +23,6 @@ int main() assert(q.size() == 1); q.pop(); assert(q.size() == 0); + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.members/swap.pass.cpp b/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.members/swap.pass.cpp index 995e1742a5283..bc3f453d886ab 100644 --- a/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.members/swap.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.members/swap.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { std::priority_queue q1; std::priority_queue q2; @@ -26,4 +26,6 @@ int main() assert(q1.empty()); assert(q2.size() == 3); assert(q2.top() == 3); + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.members/top.pass.cpp b/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.members/top.pass.cpp index 22a8174b34fc6..ea0e489f61704 100644 --- a/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.members/top.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.members/top.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { std::priority_queue q; q.push(1); @@ -24,4 +24,6 @@ int main() assert(q.top() == 3); q.push(2); assert(q.top() == 3); + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.special/swap.pass.cpp b/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.special/swap.pass.cpp index 2c9a39f66b0ea..bc75df0d384e1 100644 --- a/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.special/swap.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.special/swap.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { std::priority_queue q1; std::priority_queue q2; @@ -28,4 +28,6 @@ int main() assert(q1.empty()); assert(q2.size() == 3); assert(q2.top() == 3); + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.special/swap_noexcept.pass.cpp b/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.special/swap_noexcept.pass.cpp index f2194ccf8745b..ad4254c2b79f0 100644 --- a/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.special/swap_noexcept.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.special/swap_noexcept.pass.cpp @@ -22,10 +22,12 @@ #include "MoveOnly.h" -int main() +int main(int, char**) { { typedef std::priority_queue C; static_assert(noexcept(swap(std::declval(), std::declval())), ""); } + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/priority.queue/types.fail.cpp b/libcxx/test/std/containers/container.adaptors/priority.queue/types.fail.cpp index 431a4d0d502bd..244028e444d3a 100644 --- a/libcxx/test/std/containers/container.adaptors/priority.queue/types.fail.cpp +++ b/libcxx/test/std/containers/container.adaptors/priority.queue/types.fail.cpp @@ -27,8 +27,10 @@ #include #include -int main() +int main(int, char**) { // LWG#2566 says that the first template param must match the second one's value type std::priority_queue> t; + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/priority.queue/types.pass.cpp b/libcxx/test/std/containers/container.adaptors/priority.queue/types.pass.cpp index 6084e59069e62..5471281905017 100644 --- a/libcxx/test/std/containers/container.adaptors/priority.queue/types.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/priority.queue/types.pass.cpp @@ -50,7 +50,7 @@ struct C typedef int size_type; }; -int main() +int main(int, char**) { static_assert(( std::is_same::container_type, std::vector >::value), ""); static_assert(( std::is_same >::container_type, std::deque >::value), ""); @@ -64,4 +64,6 @@ int main() static_assert(( std::uses_allocator, std::allocator >::value), ""); static_assert((!std::uses_allocator, std::allocator >::value), ""); test t; + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/queue/queue.cons.alloc/ctor_alloc.pass.cpp b/libcxx/test/std/containers/container.adaptors/queue/queue.cons.alloc/ctor_alloc.pass.cpp index d2a85a34847e7..8d916f767718a 100644 --- a/libcxx/test/std/containers/container.adaptors/queue/queue.cons.alloc/ctor_alloc.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/queue/queue.cons.alloc/ctor_alloc.pass.cpp @@ -31,8 +31,10 @@ struct test test_allocator get_allocator() {return c.get_allocator();} }; -int main() +int main(int, char**) { test q(test_allocator(3)); assert(q.get_allocator() == test_allocator(3)); + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/queue/queue.cons.alloc/ctor_container_alloc.pass.cpp b/libcxx/test/std/containers/container.adaptors/queue/queue.cons.alloc/ctor_container_alloc.pass.cpp index fc3549d2da2af..56272064fc22f 100644 --- a/libcxx/test/std/containers/container.adaptors/queue/queue.cons.alloc/ctor_container_alloc.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/queue/queue.cons.alloc/ctor_container_alloc.pass.cpp @@ -44,7 +44,7 @@ struct test test_allocator get_allocator() {return c.get_allocator();} }; -int main() +int main(int, char**) { C d = make(5); test q(d, test_allocator(4)); @@ -55,4 +55,6 @@ int main() assert(q.front() == d[i]); q.pop(); } + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/queue/queue.cons.alloc/ctor_queue_alloc.pass.cpp b/libcxx/test/std/containers/container.adaptors/queue/queue.cons.alloc/ctor_queue_alloc.pass.cpp index 6c7fbbc8110a8..8a66c6f12e7e4 100644 --- a/libcxx/test/std/containers/container.adaptors/queue/queue.cons.alloc/ctor_queue_alloc.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/queue/queue.cons.alloc/ctor_queue_alloc.pass.cpp @@ -42,10 +42,12 @@ struct test allocator_type get_allocator() {return this->c.get_allocator();} }; -int main() +int main(int, char**) { test q(make(5), test_allocator(4)); test q2(q, test_allocator(5)); assert(q2.get_allocator() == test_allocator(5)); assert(q2.size() == 5); + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/queue/queue.cons.alloc/ctor_rcontainer_alloc.pass.cpp b/libcxx/test/std/containers/container.adaptors/queue/queue.cons.alloc/ctor_rcontainer_alloc.pass.cpp index cc6cb5cdbc91c..3af4fb0dacc44 100644 --- a/libcxx/test/std/containers/container.adaptors/queue/queue.cons.alloc/ctor_rcontainer_alloc.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/queue/queue.cons.alloc/ctor_rcontainer_alloc.pass.cpp @@ -48,9 +48,11 @@ struct test }; -int main() +int main(int, char**) { test q(make(5), test_allocator(4)); assert(q.get_allocator() == test_allocator(4)); assert(q.size() == 5); + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/queue/queue.cons.alloc/ctor_rqueue_alloc.pass.cpp b/libcxx/test/std/containers/container.adaptors/queue/queue.cons.alloc/ctor_rqueue_alloc.pass.cpp index cac8bf3cd1f75..29a742df7d41c 100644 --- a/libcxx/test/std/containers/container.adaptors/queue/queue.cons.alloc/ctor_rqueue_alloc.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/queue/queue.cons.alloc/ctor_rqueue_alloc.pass.cpp @@ -48,10 +48,12 @@ struct test }; -int main() +int main(int, char**) { test q(make(5), test_allocator(4)); test q2(std::move(q), test_allocator(5)); assert(q2.get_allocator() == test_allocator(5)); assert(q2.size() == 5); + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/queue/queue.cons/ctor_container.pass.cpp b/libcxx/test/std/containers/container.adaptors/queue/queue.cons/ctor_container.pass.cpp index e9c41a0b612df..dad35d2d1696a 100644 --- a/libcxx/test/std/containers/container.adaptors/queue/queue.cons/ctor_container.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/queue/queue.cons/ctor_container.pass.cpp @@ -24,7 +24,7 @@ make(int n) return c; } -int main() +int main(int, char**) { std::deque d = make >(5); std::queue q(d); @@ -34,4 +34,6 @@ int main() assert(q.front() == d[i]); q.pop(); } + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/queue/queue.cons/ctor_copy.pass.cpp b/libcxx/test/std/containers/container.adaptors/queue/queue.cons/ctor_copy.pass.cpp index 35c2fa0136eaf..19e46a23662e5 100644 --- a/libcxx/test/std/containers/container.adaptors/queue/queue.cons/ctor_copy.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/queue/queue.cons/ctor_copy.pass.cpp @@ -23,9 +23,11 @@ make(int n) return c; } -int main() +int main(int, char**) { std::queue q(make >(5)); std::queue q2 = q; assert(q2 == q); + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/queue/queue.cons/ctor_default.pass.cpp b/libcxx/test/std/containers/container.adaptors/queue/queue.cons/ctor_default.pass.cpp index 0a1d3dd960b18..c5c8b17a6901e 100644 --- a/libcxx/test/std/containers/container.adaptors/queue/queue.cons/ctor_default.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/queue/queue.cons/ctor_default.pass.cpp @@ -15,7 +15,7 @@ #include "test_allocator.h" -int main() +int main(int, char**) { std::queue > > q; assert(q.size() == 0); @@ -24,4 +24,6 @@ int main() assert(q.size() == 2); assert(q.front() == 1); assert(q.back() == 2); + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/queue/queue.cons/ctor_move.pass.cpp b/libcxx/test/std/containers/container.adaptors/queue/queue.cons/ctor_move.pass.cpp index a9def3e333ba0..c275d5d602f8b 100644 --- a/libcxx/test/std/containers/container.adaptors/queue/queue.cons/ctor_move.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/queue/queue.cons/ctor_move.pass.cpp @@ -29,10 +29,12 @@ make(int n) } -int main() +int main(int, char**) { std::queue q(make >(5)); std::queue q2 = std::move(q); assert(q2.size() == 5); assert(q.empty()); + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/queue/queue.cons/ctor_rcontainer.pass.cpp b/libcxx/test/std/containers/container.adaptors/queue/queue.cons/ctor_rcontainer.pass.cpp index 00aba51c3c7da..3812ce9169b5d 100644 --- a/libcxx/test/std/containers/container.adaptors/queue/queue.cons/ctor_rcontainer.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/queue/queue.cons/ctor_rcontainer.pass.cpp @@ -29,8 +29,10 @@ make(int n) } -int main() +int main(int, char**) { std::queue q(make >(5)); assert(q.size() == 5); + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/queue/queue.cons/deduct.fail.cpp b/libcxx/test/std/containers/container.adaptors/queue/queue.cons/deduct.fail.cpp index eecb0343b4c7f..00b39c6a95b12 100644 --- a/libcxx/test/std/containers/container.adaptors/queue/queue.cons/deduct.fail.cpp +++ b/libcxx/test/std/containers/container.adaptors/queue/queue.cons/deduct.fail.cpp @@ -17,7 +17,7 @@ #include -int main() +int main(int, char**) { // Test the explicit deduction guides { @@ -42,4 +42,6 @@ int main() // stack, allocator>> } + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/queue/queue.cons/deduct.pass.cpp b/libcxx/test/std/containers/container.adaptors/queue/queue.cons/deduct.pass.cpp index 45a6f2e75a28e..247da2a3d98fe 100644 --- a/libcxx/test/std/containers/container.adaptors/queue/queue.cons/deduct.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/queue/queue.cons/deduct.pass.cpp @@ -33,7 +33,7 @@ struct A {}; -int main() +int main(int, char**) { // Test the explicit deduction guides @@ -87,4 +87,6 @@ int main() assert(que.back() == 3); } + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/queue/queue.cons/default_noexcept.pass.cpp b/libcxx/test/std/containers/container.adaptors/queue/queue.cons/default_noexcept.pass.cpp index a53dd9492564b..1200f2e2fef27 100644 --- a/libcxx/test/std/containers/container.adaptors/queue/queue.cons/default_noexcept.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/queue/queue.cons/default_noexcept.pass.cpp @@ -21,7 +21,7 @@ #include "test_macros.h" #include "MoveOnly.h" -int main() +int main(int, char**) { #if defined(_LIBCPP_VERSION) { @@ -29,4 +29,6 @@ int main() static_assert(std::is_nothrow_default_constructible::value, ""); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/queue/queue.cons/dtor_noexcept.pass.cpp b/libcxx/test/std/containers/container.adaptors/queue/queue.cons/dtor_noexcept.pass.cpp index 4c87d15e04760..18e42ea3a7eda 100644 --- a/libcxx/test/std/containers/container.adaptors/queue/queue.cons/dtor_noexcept.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/queue/queue.cons/dtor_noexcept.pass.cpp @@ -17,10 +17,12 @@ #include "MoveOnly.h" -int main() +int main(int, char**) { { typedef std::queue C; static_assert(std::is_nothrow_destructible::value, ""); } + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/queue/queue.cons/move_assign_noexcept.pass.cpp b/libcxx/test/std/containers/container.adaptors/queue/queue.cons/move_assign_noexcept.pass.cpp index 93f69059fb314..a82ab8fa41c7c 100644 --- a/libcxx/test/std/containers/container.adaptors/queue/queue.cons/move_assign_noexcept.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/queue/queue.cons/move_assign_noexcept.pass.cpp @@ -20,10 +20,12 @@ #include "MoveOnly.h" -int main() +int main(int, char**) { { typedef std::queue C; static_assert(std::is_nothrow_move_assignable::value, ""); } + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/queue/queue.cons/move_noexcept.pass.cpp b/libcxx/test/std/containers/container.adaptors/queue/queue.cons/move_noexcept.pass.cpp index 24e96edc5e496..e4c170a8bb9d6 100644 --- a/libcxx/test/std/containers/container.adaptors/queue/queue.cons/move_noexcept.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/queue/queue.cons/move_noexcept.pass.cpp @@ -22,7 +22,7 @@ #include "test_macros.h" #include "MoveOnly.h" -int main() +int main(int, char**) { #if defined(_LIBCPP_VERSION) { @@ -30,4 +30,6 @@ int main() static_assert(std::is_nothrow_move_constructible::value, ""); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/queue/queue.defn/assign_copy.pass.cpp b/libcxx/test/std/containers/container.adaptors/queue/queue.defn/assign_copy.pass.cpp index 5fe6b70c64dca..98385a6f7cc3e 100644 --- a/libcxx/test/std/containers/container.adaptors/queue/queue.defn/assign_copy.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/queue/queue.defn/assign_copy.pass.cpp @@ -23,10 +23,12 @@ make(int n) return c; } -int main() +int main(int, char**) { std::queue q(make >(5)); std::queue q2; q2 = q; assert(q2 == q); + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/queue/queue.defn/assign_move.pass.cpp b/libcxx/test/std/containers/container.adaptors/queue/queue.defn/assign_move.pass.cpp index 87c9ad197e651..de30e5cfe2ebc 100644 --- a/libcxx/test/std/containers/container.adaptors/queue/queue.defn/assign_move.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/queue/queue.defn/assign_move.pass.cpp @@ -29,11 +29,13 @@ make(int n) } -int main() +int main(int, char**) { std::queue q(make >(5)); std::queue q2; q2 = std::move(q); assert(q2.size() == 5); assert(q.empty()); + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/queue/queue.defn/back.pass.cpp b/libcxx/test/std/containers/container.adaptors/queue/queue.defn/back.pass.cpp index 115360e0709df..cb115c7022294 100644 --- a/libcxx/test/std/containers/container.adaptors/queue/queue.defn/back.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/queue/queue.defn/back.pass.cpp @@ -13,7 +13,7 @@ #include #include -int main() +int main(int, char**) { std::queue q; assert(q.size() == 0); @@ -22,4 +22,6 @@ int main() q.push(3); int& ir = q.back(); assert(ir == 3); + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/queue/queue.defn/back_const.pass.cpp b/libcxx/test/std/containers/container.adaptors/queue/queue.defn/back_const.pass.cpp index 158aa83a9f0eb..3a6e4c890372f 100644 --- a/libcxx/test/std/containers/container.adaptors/queue/queue.defn/back_const.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/queue/queue.defn/back_const.pass.cpp @@ -13,7 +13,7 @@ #include #include -int main() +int main(int, char**) { std::queue q; assert(q.size() == 0); @@ -23,4 +23,6 @@ int main() const std::queue& cqr = q; const int& cir = cqr.back(); assert(cir == 3); + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/queue/queue.defn/emplace.pass.cpp b/libcxx/test/std/containers/container.adaptors/queue/queue.defn/emplace.pass.cpp index a8e8791ac6982..74afcce974fa6 100644 --- a/libcxx/test/std/containers/container.adaptors/queue/queue.defn/emplace.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/queue/queue.defn/emplace.pass.cpp @@ -37,7 +37,7 @@ void test_return_type() { #endif } -int main() +int main(int, char**) { test_return_type > (); test_return_type > > (); @@ -61,4 +61,6 @@ int main() assert(q.size() == 3); assert(q.front() == Emplaceable(1, 2.5)); assert(q.back() == Emplaceable(3, 4.5)); + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/queue/queue.defn/empty.fail.cpp b/libcxx/test/std/containers/container.adaptors/queue/queue.defn/empty.fail.cpp index f53f9a805e0e3..454bf32bede8e 100644 --- a/libcxx/test/std/containers/container.adaptors/queue/queue.defn/empty.fail.cpp +++ b/libcxx/test/std/containers/container.adaptors/queue/queue.defn/empty.fail.cpp @@ -20,8 +20,10 @@ #include "test_macros.h" -int main () +int main(int, char**) { std::queue c; c.empty(); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/queue/queue.defn/empty.pass.cpp b/libcxx/test/std/containers/container.adaptors/queue/queue.defn/empty.pass.cpp index 095512c212423..cc0fc56b7c4eb 100644 --- a/libcxx/test/std/containers/container.adaptors/queue/queue.defn/empty.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/queue/queue.defn/empty.pass.cpp @@ -13,7 +13,7 @@ #include #include -int main() +int main(int, char**) { std::queue q; assert(q.empty()); @@ -21,4 +21,6 @@ int main() assert(!q.empty()); q.pop(); assert(q.empty()); + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/queue/queue.defn/front.pass.cpp b/libcxx/test/std/containers/container.adaptors/queue/queue.defn/front.pass.cpp index 7ce29976baf1c..9c8d253fb924b 100644 --- a/libcxx/test/std/containers/container.adaptors/queue/queue.defn/front.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/queue/queue.defn/front.pass.cpp @@ -13,7 +13,7 @@ #include #include -int main() +int main(int, char**) { std::queue q; assert(q.size() == 0); @@ -22,4 +22,6 @@ int main() q.push(3); int& ir = q.front(); assert(ir == 1); + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/queue/queue.defn/front_const.pass.cpp b/libcxx/test/std/containers/container.adaptors/queue/queue.defn/front_const.pass.cpp index edcb21ea2242f..5ad1ae97aaec4 100644 --- a/libcxx/test/std/containers/container.adaptors/queue/queue.defn/front_const.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/queue/queue.defn/front_const.pass.cpp @@ -13,7 +13,7 @@ #include #include -int main() +int main(int, char**) { std::queue q; assert(q.size() == 0); @@ -23,4 +23,6 @@ int main() const std::queue& cqr = q; const int& cir = cqr.front(); assert(cir == 1); + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/queue/queue.defn/pop.pass.cpp b/libcxx/test/std/containers/container.adaptors/queue/queue.defn/pop.pass.cpp index 587cf26c3dd82..128cda5123723 100644 --- a/libcxx/test/std/containers/container.adaptors/queue/queue.defn/pop.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/queue/queue.defn/pop.pass.cpp @@ -13,7 +13,7 @@ #include #include -int main() +int main(int, char**) { std::queue q; assert(q.size() == 0); @@ -33,4 +33,6 @@ int main() assert(q.back() == 3); q.pop(); assert(q.size() == 0); + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/queue/queue.defn/push.pass.cpp b/libcxx/test/std/containers/container.adaptors/queue/queue.defn/push.pass.cpp index a9e962f8afe3e..b2a784ccfa856 100644 --- a/libcxx/test/std/containers/container.adaptors/queue/queue.defn/push.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/queue/queue.defn/push.pass.cpp @@ -13,7 +13,7 @@ #include #include -int main() +int main(int, char**) { std::queue q; q.push(1); @@ -28,4 +28,6 @@ int main() assert(q.size() == 3); assert(q.front() == 1); assert(q.back() == 3); + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/queue/queue.defn/push_rv.pass.cpp b/libcxx/test/std/containers/container.adaptors/queue/queue.defn/push_rv.pass.cpp index aafc9563525ce..17c442b151efe 100644 --- a/libcxx/test/std/containers/container.adaptors/queue/queue.defn/push_rv.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/queue/queue.defn/push_rv.pass.cpp @@ -17,7 +17,7 @@ #include "MoveOnly.h" -int main() +int main(int, char**) { std::queue q; q.push(MoveOnly(1)); @@ -32,4 +32,6 @@ int main() assert(q.size() == 3); assert(q.front() == MoveOnly(1)); assert(q.back() == MoveOnly(3)); + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/queue/queue.defn/size.pass.cpp b/libcxx/test/std/containers/container.adaptors/queue/queue.defn/size.pass.cpp index f3ecaa5c4f7ae..fb4fdfcac4d82 100644 --- a/libcxx/test/std/containers/container.adaptors/queue/queue.defn/size.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/queue/queue.defn/size.pass.cpp @@ -13,10 +13,12 @@ #include #include -int main() +int main(int, char**) { std::queue q; assert(q.size() == 0); q.push(1); assert(q.size() == 1); + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/queue/queue.defn/swap.pass.cpp b/libcxx/test/std/containers/container.adaptors/queue/queue.defn/swap.pass.cpp index 9017d21273d59..3635cea4a91ae 100644 --- a/libcxx/test/std/containers/container.adaptors/queue/queue.defn/swap.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/queue/queue.defn/swap.pass.cpp @@ -23,7 +23,7 @@ make(int n) return c; } -int main() +int main(int, char**) { std::queue q1 = make >(5); std::queue q2 = make >(10); @@ -32,4 +32,6 @@ int main() q1.swap(q2); assert(q1 == q2_save); assert(q2 == q1_save); + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/queue/queue.defn/types.fail.cpp b/libcxx/test/std/containers/container.adaptors/queue/queue.defn/types.fail.cpp index b9e018ca13ac5..041008ce6aa20 100644 --- a/libcxx/test/std/containers/container.adaptors/queue/queue.defn/types.fail.cpp +++ b/libcxx/test/std/containers/container.adaptors/queue/queue.defn/types.fail.cpp @@ -12,8 +12,10 @@ #include #include -int main() +int main(int, char**) { // LWG#2566 says that the first template param must match the second one's value type std::queue> t; + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/queue/queue.defn/types.pass.cpp b/libcxx/test/std/containers/container.adaptors/queue/queue.defn/types.pass.cpp index edc41c1a3522e..8623710eaa210 100644 --- a/libcxx/test/std/containers/container.adaptors/queue/queue.defn/types.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/queue/queue.defn/types.pass.cpp @@ -43,7 +43,7 @@ struct C typedef int size_type; }; -int main() +int main(int, char**) { static_assert(( std::is_same::container_type, std::deque >::value), ""); static_assert(( std::is_same >::container_type, std::vector >::value), ""); @@ -54,4 +54,6 @@ int main() static_assert(( std::uses_allocator, std::allocator >::value), ""); static_assert((!std::uses_allocator, std::allocator >::value), ""); test t; + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/queue/queue.ops/eq.pass.cpp b/libcxx/test/std/containers/container.adaptors/queue/queue.ops/eq.pass.cpp index ee36779b5bd26..b4a3327d86b9a 100644 --- a/libcxx/test/std/containers/container.adaptors/queue/queue.ops/eq.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/queue/queue.ops/eq.pass.cpp @@ -27,7 +27,7 @@ make(int n) return c; } -int main() +int main(int, char**) { std::queue q1 = make >(5); std::queue q2 = make >(10); @@ -36,4 +36,6 @@ int main() assert(q1 == q1_save); assert(q1 != q2); assert(q2 == q2_save); + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/queue/queue.ops/lt.pass.cpp b/libcxx/test/std/containers/container.adaptors/queue/queue.ops/lt.pass.cpp index 66ef66c7bd46c..a8eeb1be19747 100644 --- a/libcxx/test/std/containers/container.adaptors/queue/queue.ops/lt.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/queue/queue.ops/lt.pass.cpp @@ -33,7 +33,7 @@ make(int n) return c; } -int main() +int main(int, char**) { std::queue q1 = make >(5); std::queue q2 = make >(10); @@ -41,4 +41,6 @@ int main() assert(q2 > q1); assert(q1 <= q2); assert(q2 >= q1); + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/queue/queue.special/swap.pass.cpp b/libcxx/test/std/containers/container.adaptors/queue/queue.special/swap.pass.cpp index fcaec66d7559a..1adc4f1f474ee 100644 --- a/libcxx/test/std/containers/container.adaptors/queue/queue.special/swap.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/queue/queue.special/swap.pass.cpp @@ -24,7 +24,7 @@ make(int n) return c; } -int main() +int main(int, char**) { std::queue q1 = make >(5); std::queue q2 = make >(10); @@ -33,4 +33,6 @@ int main() swap(q1, q2); assert(q1 == q2_save); assert(q2 == q1_save); + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/queue/queue.special/swap_noexcept.pass.cpp b/libcxx/test/std/containers/container.adaptors/queue/queue.special/swap_noexcept.pass.cpp index 81d728a27d6f6..b8cc387d186b2 100644 --- a/libcxx/test/std/containers/container.adaptors/queue/queue.special/swap_noexcept.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/queue/queue.special/swap_noexcept.pass.cpp @@ -21,10 +21,12 @@ #include "MoveOnly.h" -int main() +int main(int, char**) { { typedef std::queue C; static_assert(noexcept(swap(std::declval(), std::declval())), ""); } + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/stack/stack.cons.alloc/ctor_alloc.pass.cpp b/libcxx/test/std/containers/container.adaptors/stack/stack.cons.alloc/ctor_alloc.pass.cpp index c0023c401387a..9fb09b158dfbc 100644 --- a/libcxx/test/std/containers/container.adaptors/stack/stack.cons.alloc/ctor_alloc.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/stack/stack.cons.alloc/ctor_alloc.pass.cpp @@ -31,8 +31,10 @@ struct test test_allocator get_allocator() {return c.get_allocator();} }; -int main() +int main(int, char**) { test q(test_allocator(3)); assert(q.get_allocator() == test_allocator(3)); + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/stack/stack.cons.alloc/ctor_container_alloc.pass.cpp b/libcxx/test/std/containers/container.adaptors/stack/stack.cons.alloc/ctor_container_alloc.pass.cpp index ef4d25e05e9f5..b0c6f4fcac792 100644 --- a/libcxx/test/std/containers/container.adaptors/stack/stack.cons.alloc/ctor_container_alloc.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/stack/stack.cons.alloc/ctor_container_alloc.pass.cpp @@ -44,7 +44,7 @@ struct test test_allocator get_allocator() {return c.get_allocator();} }; -int main() +int main(int, char**) { C d = make(5); test q(d, test_allocator(4)); @@ -55,4 +55,6 @@ int main() assert(q.top() == d[d.size() - i - 1]); q.pop(); } + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/stack/stack.cons.alloc/ctor_copy_alloc.pass.cpp b/libcxx/test/std/containers/container.adaptors/stack/stack.cons.alloc/ctor_copy_alloc.pass.cpp index f7c0a962021a4..0d8481228fd8d 100644 --- a/libcxx/test/std/containers/container.adaptors/stack/stack.cons.alloc/ctor_copy_alloc.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/stack/stack.cons.alloc/ctor_copy_alloc.pass.cpp @@ -42,10 +42,12 @@ struct test allocator_type get_allocator() {return this->c.get_allocator();} }; -int main() +int main(int, char**) { test q(make(5), test_allocator(4)); test q2(q, test_allocator(5)); assert(q2.get_allocator() == test_allocator(5)); assert(q2.size() == 5); + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/stack/stack.cons.alloc/ctor_rcontainer_alloc.pass.cpp b/libcxx/test/std/containers/container.adaptors/stack/stack.cons.alloc/ctor_rcontainer_alloc.pass.cpp index f33f638b8e5ed..5181c673916c4 100644 --- a/libcxx/test/std/containers/container.adaptors/stack/stack.cons.alloc/ctor_rcontainer_alloc.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/stack/stack.cons.alloc/ctor_rcontainer_alloc.pass.cpp @@ -48,9 +48,11 @@ struct test }; -int main() +int main(int, char**) { test q(make(5), test_allocator(4)); assert(q.get_allocator() == test_allocator(4)); assert(q.size() == 5); + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/stack/stack.cons.alloc/ctor_rqueue_alloc.pass.cpp b/libcxx/test/std/containers/container.adaptors/stack/stack.cons.alloc/ctor_rqueue_alloc.pass.cpp index 2889763ecf089..c5ff35d2d7a72 100644 --- a/libcxx/test/std/containers/container.adaptors/stack/stack.cons.alloc/ctor_rqueue_alloc.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/stack/stack.cons.alloc/ctor_rqueue_alloc.pass.cpp @@ -48,10 +48,12 @@ struct test }; -int main() +int main(int, char**) { test q(make(5), test_allocator(4)); test q2(std::move(q), test_allocator(5)); assert(q2.get_allocator() == test_allocator(5)); assert(q2.size() == 5); + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/stack/stack.cons/ctor_container.pass.cpp b/libcxx/test/std/containers/container.adaptors/stack/stack.cons/ctor_container.pass.cpp index 7db358b3f0dbf..c649e238f5bf3 100644 --- a/libcxx/test/std/containers/container.adaptors/stack/stack.cons/ctor_container.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/stack/stack.cons/ctor_container.pass.cpp @@ -24,7 +24,7 @@ make(int n) return c; } -int main() +int main(int, char**) { std::deque d = make >(5); std::stack q(d); @@ -34,4 +34,6 @@ int main() assert(q.top() == d[d.size() - i - 1]); q.pop(); } + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/stack/stack.cons/ctor_copy.pass.cpp b/libcxx/test/std/containers/container.adaptors/stack/stack.cons/ctor_copy.pass.cpp index 2bbf7cc93c9ec..ef3606366ffeb 100644 --- a/libcxx/test/std/containers/container.adaptors/stack/stack.cons/ctor_copy.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/stack/stack.cons/ctor_copy.pass.cpp @@ -23,9 +23,11 @@ make(int n) return c; } -int main() +int main(int, char**) { std::stack q(make >(5)); std::stack q2 = q; assert(q2 == q); + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/stack/stack.cons/ctor_default.pass.cpp b/libcxx/test/std/containers/container.adaptors/stack/stack.cons/ctor_default.pass.cpp index 731b2fe4ec744..460cf27ec843f 100644 --- a/libcxx/test/std/containers/container.adaptors/stack/stack.cons/ctor_default.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/stack/stack.cons/ctor_default.pass.cpp @@ -16,7 +16,7 @@ #include "test_allocator.h" -int main() +int main(int, char**) { std::stack > > q; assert(q.size() == 0); @@ -24,4 +24,6 @@ int main() q.push(2); assert(q.size() == 2); assert(q.top() == 2); + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/stack/stack.cons/ctor_move.pass.cpp b/libcxx/test/std/containers/container.adaptors/stack/stack.cons/ctor_move.pass.cpp index e5c846df17387..86f4414c91e32 100644 --- a/libcxx/test/std/containers/container.adaptors/stack/stack.cons/ctor_move.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/stack/stack.cons/ctor_move.pass.cpp @@ -29,10 +29,12 @@ make(int n) } -int main() +int main(int, char**) { std::stack q(make >(5)); std::stack q2 = std::move(q); assert(q2.size() == 5); assert(q.empty()); + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/stack/stack.cons/ctor_rcontainer.pass.cpp b/libcxx/test/std/containers/container.adaptors/stack/stack.cons/ctor_rcontainer.pass.cpp index 9ead915216668..28fb5655f94f7 100644 --- a/libcxx/test/std/containers/container.adaptors/stack/stack.cons/ctor_rcontainer.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/stack/stack.cons/ctor_rcontainer.pass.cpp @@ -29,8 +29,10 @@ make(int n) } -int main() +int main(int, char**) { std::stack q(make >(5)); assert(q.size() == 5); + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/stack/stack.cons/deduct.fail.cpp b/libcxx/test/std/containers/container.adaptors/stack/stack.cons/deduct.fail.cpp index bfddd8b598c86..894906fc43f4e 100644 --- a/libcxx/test/std/containers/container.adaptors/stack/stack.cons/deduct.fail.cpp +++ b/libcxx/test/std/containers/container.adaptors/stack/stack.cons/deduct.fail.cpp @@ -24,7 +24,7 @@ #include -int main() +int main(int, char**) { // Test the explicit deduction guides { @@ -49,4 +49,6 @@ int main() // stack, allocator>> } + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/stack/stack.cons/deduct.pass.cpp b/libcxx/test/std/containers/container.adaptors/stack/stack.cons/deduct.pass.cpp index ec724b063b530..dd5ab91a09c9a 100644 --- a/libcxx/test/std/containers/container.adaptors/stack/stack.cons/deduct.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/stack/stack.cons/deduct.pass.cpp @@ -35,7 +35,7 @@ struct A {}; -int main() +int main(int, char**) { // Test the explicit deduction guides @@ -90,4 +90,6 @@ int main() assert(stk.top() == 3); } + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/stack/stack.cons/default_noexcept.pass.cpp b/libcxx/test/std/containers/container.adaptors/stack/stack.cons/default_noexcept.pass.cpp index 2e901843ef776..d06e2865e8aef 100644 --- a/libcxx/test/std/containers/container.adaptors/stack/stack.cons/default_noexcept.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/stack/stack.cons/default_noexcept.pass.cpp @@ -22,7 +22,7 @@ #include "test_macros.h" #include "MoveOnly.h" -int main() +int main(int, char**) { #if defined(_LIBCPP_VERSION) { @@ -30,4 +30,6 @@ int main() static_assert(std::is_nothrow_default_constructible::value, ""); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/stack/stack.cons/dtor_noexcept.pass.cpp b/libcxx/test/std/containers/container.adaptors/stack/stack.cons/dtor_noexcept.pass.cpp index 616f464186e8e..7c5fd648684e7 100644 --- a/libcxx/test/std/containers/container.adaptors/stack/stack.cons/dtor_noexcept.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/stack/stack.cons/dtor_noexcept.pass.cpp @@ -17,10 +17,12 @@ #include "MoveOnly.h" -int main() +int main(int, char**) { { typedef std::stack C; static_assert(std::is_nothrow_destructible::value, ""); } + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/stack/stack.cons/move_assign_noexcept.pass.cpp b/libcxx/test/std/containers/container.adaptors/stack/stack.cons/move_assign_noexcept.pass.cpp index 0e97c0ff66df4..6ed6b8250aa38 100644 --- a/libcxx/test/std/containers/container.adaptors/stack/stack.cons/move_assign_noexcept.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/stack/stack.cons/move_assign_noexcept.pass.cpp @@ -20,10 +20,12 @@ #include "MoveOnly.h" -int main() +int main(int, char**) { { typedef std::stack C; static_assert(std::is_nothrow_move_assignable::value, ""); } + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/stack/stack.cons/move_noexcept.pass.cpp b/libcxx/test/std/containers/container.adaptors/stack/stack.cons/move_noexcept.pass.cpp index e7743ad980770..ddf07c42468d8 100644 --- a/libcxx/test/std/containers/container.adaptors/stack/stack.cons/move_noexcept.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/stack/stack.cons/move_noexcept.pass.cpp @@ -21,7 +21,7 @@ #include "test_macros.h" #include "MoveOnly.h" -int main() +int main(int, char**) { #if defined(_LIBCPP_VERSION) { @@ -29,4 +29,6 @@ int main() static_assert(std::is_nothrow_move_constructible::value, ""); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/stack/stack.defn/assign_copy.pass.cpp b/libcxx/test/std/containers/container.adaptors/stack/stack.defn/assign_copy.pass.cpp index 0f8bf035d9800..df34e4c63c879 100644 --- a/libcxx/test/std/containers/container.adaptors/stack/stack.defn/assign_copy.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/stack/stack.defn/assign_copy.pass.cpp @@ -23,10 +23,12 @@ make(int n) return c; } -int main() +int main(int, char**) { std::stack q(make >(5)); std::stack q2; q2 = q; assert(q2 == q); + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/stack/stack.defn/assign_move.pass.cpp b/libcxx/test/std/containers/container.adaptors/stack/stack.defn/assign_move.pass.cpp index 16609e983bee3..ad77defe21434 100644 --- a/libcxx/test/std/containers/container.adaptors/stack/stack.defn/assign_move.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/stack/stack.defn/assign_move.pass.cpp @@ -29,11 +29,13 @@ make(int n) } -int main() +int main(int, char**) { std::stack q(make >(5)); std::stack q2; q2 = std::move(q); assert(q2.size() == 5); assert(q.empty()); + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/stack/stack.defn/emplace.pass.cpp b/libcxx/test/std/containers/container.adaptors/stack/stack.defn/emplace.pass.cpp index 605440bc48f02..1aa6b62c7bb45 100644 --- a/libcxx/test/std/containers/container.adaptors/stack/stack.defn/emplace.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/stack/stack.defn/emplace.pass.cpp @@ -36,7 +36,7 @@ void test_return_type() { #endif } -int main() +int main(int, char**) { test_return_type > (); test_return_type > > (); @@ -57,4 +57,6 @@ int main() #endif assert(q.size() == 3); assert(q.top() == Emplaceable(3, 4.5)); + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/stack/stack.defn/empty.fail.cpp b/libcxx/test/std/containers/container.adaptors/stack/stack.defn/empty.fail.cpp index afdd996ad7005..54cd986295a68 100644 --- a/libcxx/test/std/containers/container.adaptors/stack/stack.defn/empty.fail.cpp +++ b/libcxx/test/std/containers/container.adaptors/stack/stack.defn/empty.fail.cpp @@ -20,8 +20,10 @@ #include "test_macros.h" -int main () +int main(int, char**) { std::stack c; c.empty(); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/stack/stack.defn/empty.pass.cpp b/libcxx/test/std/containers/container.adaptors/stack/stack.defn/empty.pass.cpp index 37bf18e2d6353..a51045e613df5 100644 --- a/libcxx/test/std/containers/container.adaptors/stack/stack.defn/empty.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/stack/stack.defn/empty.pass.cpp @@ -13,7 +13,7 @@ #include #include -int main() +int main(int, char**) { std::stack q; assert(q.empty()); @@ -21,4 +21,6 @@ int main() assert(!q.empty()); q.pop(); assert(q.empty()); + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/stack/stack.defn/pop.pass.cpp b/libcxx/test/std/containers/container.adaptors/stack/stack.defn/pop.pass.cpp index 756eb01c033e0..95472d7e2c6b2 100644 --- a/libcxx/test/std/containers/container.adaptors/stack/stack.defn/pop.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/stack/stack.defn/pop.pass.cpp @@ -13,7 +13,7 @@ #include #include -int main() +int main(int, char**) { std::stack q; assert(q.size() == 0); @@ -30,4 +30,6 @@ int main() assert(q.top() == 1); q.pop(); assert(q.size() == 0); + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/stack/stack.defn/push.pass.cpp b/libcxx/test/std/containers/container.adaptors/stack/stack.defn/push.pass.cpp index 19615a031dd74..70c085f17dd4e 100644 --- a/libcxx/test/std/containers/container.adaptors/stack/stack.defn/push.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/stack/stack.defn/push.pass.cpp @@ -13,7 +13,7 @@ #include #include -int main() +int main(int, char**) { std::stack q; q.push(1); @@ -25,4 +25,6 @@ int main() q.push(3); assert(q.size() == 3); assert(q.top() == 3); + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/stack/stack.defn/push_rv.pass.cpp b/libcxx/test/std/containers/container.adaptors/stack/stack.defn/push_rv.pass.cpp index f8ad69e99d608..8969d237b54c4 100644 --- a/libcxx/test/std/containers/container.adaptors/stack/stack.defn/push_rv.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/stack/stack.defn/push_rv.pass.cpp @@ -17,7 +17,7 @@ #include "MoveOnly.h" -int main() +int main(int, char**) { std::stack q; q.push(MoveOnly(1)); @@ -29,4 +29,6 @@ int main() q.push(MoveOnly(3)); assert(q.size() == 3); assert(q.top() == MoveOnly(3)); + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/stack/stack.defn/size.pass.cpp b/libcxx/test/std/containers/container.adaptors/stack/stack.defn/size.pass.cpp index 2e2f945b23d19..26f2e22ee8eac 100644 --- a/libcxx/test/std/containers/container.adaptors/stack/stack.defn/size.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/stack/stack.defn/size.pass.cpp @@ -13,10 +13,12 @@ #include #include -int main() +int main(int, char**) { std::stack q; assert(q.size() == 0); q.push(1); assert(q.size() == 1); + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/stack/stack.defn/swap.pass.cpp b/libcxx/test/std/containers/container.adaptors/stack/stack.defn/swap.pass.cpp index 10c44c0df3d3d..88ec3cdfe3d28 100644 --- a/libcxx/test/std/containers/container.adaptors/stack/stack.defn/swap.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/stack/stack.defn/swap.pass.cpp @@ -23,7 +23,7 @@ make(int n) return c; } -int main() +int main(int, char**) { std::stack q1 = make >(5); std::stack q2 = make >(10); @@ -32,4 +32,6 @@ int main() q1.swap(q2); assert(q1 == q2_save); assert(q2 == q1_save); + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/stack/stack.defn/top.pass.cpp b/libcxx/test/std/containers/container.adaptors/stack/stack.defn/top.pass.cpp index f58effe196e90..6923cc9d27be2 100644 --- a/libcxx/test/std/containers/container.adaptors/stack/stack.defn/top.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/stack/stack.defn/top.pass.cpp @@ -13,7 +13,7 @@ #include #include -int main() +int main(int, char**) { std::stack q; assert(q.size() == 0); @@ -22,4 +22,6 @@ int main() q.push(3); int& ir = q.top(); assert(ir == 3); + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/stack/stack.defn/top_const.pass.cpp b/libcxx/test/std/containers/container.adaptors/stack/stack.defn/top_const.pass.cpp index 348946baa6b2b..a5e8c49fa203f 100644 --- a/libcxx/test/std/containers/container.adaptors/stack/stack.defn/top_const.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/stack/stack.defn/top_const.pass.cpp @@ -13,7 +13,7 @@ #include #include -int main() +int main(int, char**) { std::stack q; assert(q.size() == 0); @@ -23,4 +23,6 @@ int main() const std::stack& cqr = q; const int& cir = cqr.top(); assert(cir == 3); + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/stack/stack.defn/types.fail.cpp b/libcxx/test/std/containers/container.adaptors/stack/stack.defn/types.fail.cpp index f343fa109d3be..d5fe97fd5d75f 100644 --- a/libcxx/test/std/containers/container.adaptors/stack/stack.defn/types.fail.cpp +++ b/libcxx/test/std/containers/container.adaptors/stack/stack.defn/types.fail.cpp @@ -27,8 +27,10 @@ #include #include -int main() +int main(int, char**) { // LWG#2566 says that the first template param must match the second one's value type std::stack> t; + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/stack/stack.defn/types.pass.cpp b/libcxx/test/std/containers/container.adaptors/stack/stack.defn/types.pass.cpp index 33308c1adee42..55fc27f8430dc 100644 --- a/libcxx/test/std/containers/container.adaptors/stack/stack.defn/types.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/stack/stack.defn/types.pass.cpp @@ -44,7 +44,7 @@ struct C typedef int size_type; }; -int main() +int main(int, char**) { static_assert(( std::is_same::container_type, std::deque >::value), ""); static_assert(( std::is_same >::container_type, std::vector >::value), ""); @@ -55,4 +55,6 @@ int main() static_assert(( std::uses_allocator, std::allocator >::value), ""); static_assert((!std::uses_allocator, std::allocator >::value), ""); test t; + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/stack/stack.ops/eq.pass.cpp b/libcxx/test/std/containers/container.adaptors/stack/stack.ops/eq.pass.cpp index a6e60f1e0d1e3..306869f0e9b0b 100644 --- a/libcxx/test/std/containers/container.adaptors/stack/stack.ops/eq.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/stack/stack.ops/eq.pass.cpp @@ -27,7 +27,7 @@ make(int n) return c; } -int main() +int main(int, char**) { std::stack q1 = make >(5); std::stack q2 = make >(10); @@ -36,4 +36,6 @@ int main() assert(q1 == q1_save); assert(q1 != q2); assert(q2 == q2_save); + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/stack/stack.ops/lt.pass.cpp b/libcxx/test/std/containers/container.adaptors/stack/stack.ops/lt.pass.cpp index 5494b3dae71b3..3c8734befda21 100644 --- a/libcxx/test/std/containers/container.adaptors/stack/stack.ops/lt.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/stack/stack.ops/lt.pass.cpp @@ -33,7 +33,7 @@ make(int n) return c; } -int main() +int main(int, char**) { std::stack q1 = make >(5); std::stack q2 = make >(10); @@ -41,4 +41,6 @@ int main() assert(q2 > q1); assert(q1 <= q2); assert(q2 >= q1); + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/stack/stack.special/swap.pass.cpp b/libcxx/test/std/containers/container.adaptors/stack/stack.special/swap.pass.cpp index f8f0ed919b85a..cb1323b58737c 100644 --- a/libcxx/test/std/containers/container.adaptors/stack/stack.special/swap.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/stack/stack.special/swap.pass.cpp @@ -24,7 +24,7 @@ make(int n) return c; } -int main() +int main(int, char**) { std::stack q1 = make >(5); std::stack q2 = make >(10); @@ -33,4 +33,6 @@ int main() swap(q1, q2); assert(q1 == q2_save); assert(q2 == q1_save); + + return 0; } diff --git a/libcxx/test/std/containers/container.adaptors/stack/stack.special/swap_noexcept.pass.cpp b/libcxx/test/std/containers/container.adaptors/stack/stack.special/swap_noexcept.pass.cpp index 43195ecc8b984..415ea607e17eb 100644 --- a/libcxx/test/std/containers/container.adaptors/stack/stack.special/swap_noexcept.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/stack/stack.special/swap_noexcept.pass.cpp @@ -21,10 +21,12 @@ #include "MoveOnly.h" -int main() +int main(int, char**) { { typedef std::stack C; static_assert(noexcept(swap(std::declval(), std::declval())), ""); } + + return 0; } diff --git a/libcxx/test/std/containers/container.node/node_handle.pass.cpp b/libcxx/test/std/containers/container.node/node_handle.pass.cpp index 37bb73197af0a..40cd8d0499ad8 100644 --- a/libcxx/test/std/containers/container.node/node_handle.pass.cpp +++ b/libcxx/test/std/containers/container.node/node_handle.pass.cpp @@ -128,7 +128,7 @@ void test_insert_return_type() test_typedef(); } -int main() +int main(int, char**) { test_node_handle_operations>(); test_node_handle_operations_multi>(); @@ -143,4 +143,6 @@ int main() test_insert_return_type>(); test_insert_return_type>(); test_insert_return_type>(); + + return 0; } diff --git a/libcxx/test/std/containers/container.requirements/associative.reqmts/associative.reqmts.except/nothing_to_do.pass.cpp b/libcxx/test/std/containers/container.requirements/associative.reqmts/associative.reqmts.except/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/containers/container.requirements/associative.reqmts/associative.reqmts.except/nothing_to_do.pass.cpp +++ b/libcxx/test/std/containers/container.requirements/associative.reqmts/associative.reqmts.except/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/containers/container.requirements/associative.reqmts/nothing_to_do.pass.cpp b/libcxx/test/std/containers/container.requirements/associative.reqmts/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/containers/container.requirements/associative.reqmts/nothing_to_do.pass.cpp +++ b/libcxx/test/std/containers/container.requirements/associative.reqmts/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/containers/container.requirements/container.requirements.dataraces/nothing_to_do.pass.cpp b/libcxx/test/std/containers/container.requirements/container.requirements.dataraces/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/containers/container.requirements/container.requirements.dataraces/nothing_to_do.pass.cpp +++ b/libcxx/test/std/containers/container.requirements/container.requirements.dataraces/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/containers/container.requirements/container.requirements.general/allocator_move.pass.cpp b/libcxx/test/std/containers/container.requirements/container.requirements.general/allocator_move.pass.cpp index 3914affd306db..98c291c2e4572 100644 --- a/libcxx/test/std/containers/container.requirements/container.requirements.general/allocator_move.pass.cpp +++ b/libcxx/test/std/containers/container.requirements/container.requirements.general/allocator_move.pass.cpp @@ -61,7 +61,7 @@ void test(int expected_num_allocs = 1) { } } -int main() { +int main(int, char**) { { // test sequence containers test > >(); test > >(); @@ -102,4 +102,6 @@ int main() { test, std::equal_to, test_allocator > >(stored_allocators); } + + return 0; } diff --git a/libcxx/test/std/containers/container.requirements/container.requirements.general/nothing_to_do.pass.cpp b/libcxx/test/std/containers/container.requirements/container.requirements.general/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/containers/container.requirements/container.requirements.general/nothing_to_do.pass.cpp +++ b/libcxx/test/std/containers/container.requirements/container.requirements.general/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/containers/container.requirements/nothing_to_do.pass.cpp b/libcxx/test/std/containers/container.requirements/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/containers/container.requirements/nothing_to_do.pass.cpp +++ b/libcxx/test/std/containers/container.requirements/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/containers/container.requirements/sequence.reqmts/nothing_to_do.pass.cpp b/libcxx/test/std/containers/container.requirements/sequence.reqmts/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/containers/container.requirements/sequence.reqmts/nothing_to_do.pass.cpp +++ b/libcxx/test/std/containers/container.requirements/sequence.reqmts/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/containers/container.requirements/unord.req/nothing_to_do.pass.cpp b/libcxx/test/std/containers/container.requirements/unord.req/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/containers/container.requirements/unord.req/nothing_to_do.pass.cpp +++ b/libcxx/test/std/containers/container.requirements/unord.req/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/containers/container.requirements/unord.req/unord.req.except/nothing_to_do.pass.cpp b/libcxx/test/std/containers/container.requirements/unord.req/unord.req.except/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/containers/container.requirements/unord.req/unord.req.except/nothing_to_do.pass.cpp +++ b/libcxx/test/std/containers/container.requirements/unord.req/unord.req.except/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/containers/containers.general/nothing_to_do.pass.cpp b/libcxx/test/std/containers/containers.general/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/containers/containers.general/nothing_to_do.pass.cpp +++ b/libcxx/test/std/containers/containers.general/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/containers/nothing_to_do.pass.cpp b/libcxx/test/std/containers/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/containers/nothing_to_do.pass.cpp +++ b/libcxx/test/std/containers/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/containers/sequences/array/array.cons/deduct.fail.cpp b/libcxx/test/std/containers/sequences/array/array.cons/deduct.fail.cpp index fb882eea071a5..0c0d32f69c1ef 100644 --- a/libcxx/test/std/containers/sequences/array/array.cons/deduct.fail.cpp +++ b/libcxx/test/std/containers/sequences/array/array.cons/deduct.fail.cpp @@ -28,9 +28,11 @@ #include "test_macros.h" -int main() +int main(int, char**) { { std::array arr{1,2,3L}; // expected-error {{no viable constructor or deduction guide for deduction of template arguments of 'array'}} } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/array/array.cons/deduct.pass.cpp b/libcxx/test/std/containers/sequences/array/array.cons/deduct.pass.cpp index fead8cacfdeea..141aafc2a318f 100644 --- a/libcxx/test/std/containers/sequences/array/array.cons/deduct.pass.cpp +++ b/libcxx/test/std/containers/sequences/array/array.cons/deduct.pass.cpp @@ -30,7 +30,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { // Test the explicit deduction guides { @@ -61,4 +61,6 @@ int main() assert(arr[0] == 4.0); assert(arr[1] == 5.0); } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/array/array.cons/default.pass.cpp b/libcxx/test/std/containers/sequences/array/array.cons/default.pass.cpp index 22ed4d8320f46..daa6a52521082 100644 --- a/libcxx/test/std/containers/sequences/array/array.cons/default.pass.cpp +++ b/libcxx/test/std/containers/sequences/array/array.cons/default.pass.cpp @@ -21,7 +21,7 @@ struct NoDefault { NoDefault(int) {} }; -int main() +int main(int, char**) { { typedef double T; @@ -44,4 +44,6 @@ int main() C c2 = {{}}; assert(c2.size() == 0); } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/array/array.cons/implicit_copy.pass.cpp b/libcxx/test/std/containers/sequences/array/array.cons/implicit_copy.pass.cpp index 9d82c93b52c50..c0e205c8322a4 100644 --- a/libcxx/test/std/containers/sequences/array/array.cons/implicit_copy.pass.cpp +++ b/libcxx/test/std/containers/sequences/array/array.cons/implicit_copy.pass.cpp @@ -32,7 +32,7 @@ struct NoDefault { NoDefault(int) {} }; -int main() { +int main(int, char**) { { typedef double T; typedef std::array C; @@ -89,4 +89,6 @@ int main() { TEST_NOT_COPY_ASSIGNABLE(C); } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/array/array.cons/initializer_list.pass.cpp b/libcxx/test/std/containers/sequences/array/array.cons/initializer_list.pass.cpp index 6a9da4e4fdd5b..e85269796fb92 100644 --- a/libcxx/test/std/containers/sequences/array/array.cons/initializer_list.pass.cpp +++ b/libcxx/test/std/containers/sequences/array/array.cons/initializer_list.pass.cpp @@ -17,7 +17,7 @@ // Disable the missing braces warning for this reason. #include "disable_missing_braces_warning.h" -int main() +int main(int, char**) { { typedef double T; @@ -48,4 +48,6 @@ int main() C c = {}; assert(c.size() == 1); } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/array/array.data/data.pass.cpp b/libcxx/test/std/containers/sequences/array/array.data/data.pass.cpp index 36640160ee2c3..ce1843eb5496b 100644 --- a/libcxx/test/std/containers/sequences/array/array.data/data.pass.cpp +++ b/libcxx/test/std/containers/sequences/array/array.data/data.pass.cpp @@ -25,7 +25,7 @@ struct NoDefault { }; -int main() +int main(int, char**) { { typedef double T; @@ -67,4 +67,6 @@ int main() T* p = c.data(); LIBCPP_ASSERT(p != nullptr); } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/array/array.data/data_const.pass.cpp b/libcxx/test/std/containers/sequences/array/array.data/data_const.pass.cpp index 3b035e67ca952..32c05d7ef3592 100644 --- a/libcxx/test/std/containers/sequences/array/array.data/data_const.pass.cpp +++ b/libcxx/test/std/containers/sequences/array/array.data/data_const.pass.cpp @@ -24,7 +24,7 @@ struct NoDefault { NoDefault(int) {} }; -int main() +int main(int, char**) { { typedef double T; @@ -70,4 +70,6 @@ int main() static_assert ( *c2.data() == c2[0], ""); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/array/array.fill/fill.fail.cpp b/libcxx/test/std/containers/sequences/array/array.fill/fill.fail.cpp index 96641c5cb9de5..9f560dab4e43f 100644 --- a/libcxx/test/std/containers/sequences/array/array.fill/fill.fail.cpp +++ b/libcxx/test/std/containers/sequences/array/array.fill/fill.fail.cpp @@ -17,7 +17,7 @@ // Disable the missing braces warning for this reason. #include "disable_missing_braces_warning.h" -int main() { +int main(int, char**) { { typedef double T; typedef std::array C; @@ -25,4 +25,6 @@ int main() { // expected-error-re@array:* {{static_assert failed {{.*}}"cannot fill zero-sized array of type 'const T'"}} c.fill(5.5); // expected-note {{requested here}} } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/array/array.fill/fill.pass.cpp b/libcxx/test/std/containers/sequences/array/array.fill/fill.pass.cpp index d4dfe9a711932..db7363ab9757a 100644 --- a/libcxx/test/std/containers/sequences/array/array.fill/fill.pass.cpp +++ b/libcxx/test/std/containers/sequences/array/array.fill/fill.pass.cpp @@ -17,7 +17,7 @@ // Disable the missing braces warning for this reason. #include "disable_missing_braces_warning.h" -int main() +int main(int, char**) { { typedef double T; @@ -36,4 +36,6 @@ int main() c.fill(5.5); assert(c.size() == 0); } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/array/array.size/size.pass.cpp b/libcxx/test/std/containers/sequences/array/array.size/size.pass.cpp index 038df0160dc24..f837bdcf8fb82 100644 --- a/libcxx/test/std/containers/sequences/array/array.size/size.pass.cpp +++ b/libcxx/test/std/containers/sequences/array/array.size/size.pass.cpp @@ -19,7 +19,7 @@ // Disable the missing braces warning for this reason. #include "disable_missing_braces_warning.h" -int main() +int main(int, char**) { { typedef double T; @@ -55,4 +55,6 @@ int main() static_assert(c.empty(), ""); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/array/array.special/swap.pass.cpp b/libcxx/test/std/containers/sequences/array/array.special/swap.pass.cpp index f4751cc7661df..6c9ed957b836b 100644 --- a/libcxx/test/std/containers/sequences/array/array.special/swap.pass.cpp +++ b/libcxx/test/std/containers/sequences/array/array.special/swap.pass.cpp @@ -35,7 +35,7 @@ std::false_type can_swap_imp(...); template struct can_swap : std::is_same(0)), void> {}; -int main() +int main(int, char**) { { typedef double T; @@ -81,4 +81,6 @@ int main() static_assert(!can_swap::value, ""); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/array/array.swap/swap.fail.cpp b/libcxx/test/std/containers/sequences/array/array.swap/swap.fail.cpp index 3e5dc815c248e..90c1496156aac 100644 --- a/libcxx/test/std/containers/sequences/array/array.swap/swap.fail.cpp +++ b/libcxx/test/std/containers/sequences/array/array.swap/swap.fail.cpp @@ -17,7 +17,7 @@ // Disable the missing braces warning for this reason. #include "disable_missing_braces_warning.h" -int main() { +int main(int, char**) { { typedef double T; typedef std::array C; @@ -26,4 +26,6 @@ int main() { // expected-error-re@array:* {{static_assert failed {{.*}}"cannot swap zero-sized array of type 'const T'"}} c.swap(c2); // expected-note {{requested here}} } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/array/array.swap/swap.pass.cpp b/libcxx/test/std/containers/sequences/array/array.swap/swap.pass.cpp index e23daa88e7976..aac8a13b29a38 100644 --- a/libcxx/test/std/containers/sequences/array/array.swap/swap.pass.cpp +++ b/libcxx/test/std/containers/sequences/array/array.swap/swap.pass.cpp @@ -27,7 +27,7 @@ struct NonSwappable { NonSwappable& operator=(NonSwappable const&); }; -int main() +int main(int, char**) { { typedef double T; @@ -89,4 +89,6 @@ int main() #endif } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/array/array.tuple/get.fail.cpp b/libcxx/test/std/containers/sequences/array/array.tuple/get.fail.cpp index 25bf53835a08c..7bfe670b20d4b 100644 --- a/libcxx/test/std/containers/sequences/array/array.tuple/get.fail.cpp +++ b/libcxx/test/std/containers/sequences/array/array.tuple/get.fail.cpp @@ -23,7 +23,7 @@ // Disable the missing braces warning for this reason. #include "disable_missing_braces_warning.h" -int main() +int main(int, char**) { { typedef double T; @@ -32,4 +32,6 @@ int main() std::get<3>(c) = 5.5; // expected-note {{requested here}} // expected-error-re@array:* {{static_assert failed{{( due to requirement '3U[L]{0,2} < 3U[L]{0,2}')?}} "Index out of bounds in std::get<> (std::array)"}} } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/array/array.tuple/get.pass.cpp b/libcxx/test/std/containers/sequences/array/array.tuple/get.pass.cpp index bbc1c071a79b6..9e94417ac9733 100644 --- a/libcxx/test/std/containers/sequences/array/array.tuple/get.pass.cpp +++ b/libcxx/test/std/containers/sequences/array/array.tuple/get.pass.cpp @@ -30,7 +30,7 @@ struct S { constexpr std::array getArr () { return { 3, 4 }; } #endif -int main() +int main(int, char**) { { typedef double T; @@ -55,4 +55,6 @@ int main() static_assert(std::get<1>(getArr()) == 4, ""); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/array/array.tuple/get_const.pass.cpp b/libcxx/test/std/containers/sequences/array/array.tuple/get_const.pass.cpp index 7b964870b37b8..b22a76185b6fc 100644 --- a/libcxx/test/std/containers/sequences/array/array.tuple/get_const.pass.cpp +++ b/libcxx/test/std/containers/sequences/array/array.tuple/get_const.pass.cpp @@ -19,7 +19,7 @@ // Disable the missing braces warning for this reason. #include "disable_missing_braces_warning.h" -int main() +int main(int, char**) { { typedef double T; @@ -39,4 +39,6 @@ int main() static_assert(std::get<2>(c) == 3.5, ""); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/array/array.tuple/get_const_rv.pass.cpp b/libcxx/test/std/containers/sequences/array/array.tuple/get_const_rv.pass.cpp index 599e919a38486..ce8fc4fd3651c 100644 --- a/libcxx/test/std/containers/sequences/array/array.tuple/get_const_rv.pass.cpp +++ b/libcxx/test/std/containers/sequences/array/array.tuple/get_const_rv.pass.cpp @@ -24,7 +24,7 @@ // Disable the missing braces warning for this reason. #include "disable_missing_braces_warning.h" -int main() +int main(int, char**) { { @@ -47,4 +47,6 @@ int main() static_assert(std::get<2>(std::move(c)) == 3.5, ""); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/array/array.tuple/get_rv.pass.cpp b/libcxx/test/std/containers/sequences/array/array.tuple/get_rv.pass.cpp index 77d4633db5ec4..d36fcdcc20668 100644 --- a/libcxx/test/std/containers/sequences/array/array.tuple/get_rv.pass.cpp +++ b/libcxx/test/std/containers/sequences/array/array.tuple/get_rv.pass.cpp @@ -21,7 +21,7 @@ // Disable the missing braces warning for this reason. #include "disable_missing_braces_warning.h" -int main() +int main(int, char**) { { @@ -31,4 +31,6 @@ int main() T t = std::get<0>(std::move(c)); assert(*t == 3.5); } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/array/array.tuple/tuple_element.fail.cpp b/libcxx/test/std/containers/sequences/array/array.tuple/tuple_element.fail.cpp index 35cd986471723..a4fbd3ab4c214 100644 --- a/libcxx/test/std/containers/sequences/array/array.tuple/tuple_element.fail.cpp +++ b/libcxx/test/std/containers/sequences/array/array.tuple/tuple_element.fail.cpp @@ -23,7 +23,7 @@ // Disable the missing braces warning for this reason. #include "disable_missing_braces_warning.h" -int main() +int main(int, char**) { { typedef double T; @@ -31,4 +31,6 @@ int main() std::tuple_element<3, C> foo; // expected-note {{requested here}} // expected-error-re@array:* {{static_assert failed{{( due to requirement '3U[L]{0,2} < 3U[L]{0,2}')?}} "Index out of bounds in std::tuple_element<> (std::array)"}} } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/array/array.tuple/tuple_element.pass.cpp b/libcxx/test/std/containers/sequences/array/array.tuple/tuple_element.pass.cpp index 6980838ab63db..fbf5210f26fcf 100644 --- a/libcxx/test/std/containers/sequences/array/array.tuple/tuple_element.pass.cpp +++ b/libcxx/test/std/containers/sequences/array/array.tuple/tuple_element.pass.cpp @@ -46,8 +46,10 @@ void test() } } -int main() +int main(int, char**) { test(); test(); + + return 0; } diff --git a/libcxx/test/std/containers/sequences/array/array.tuple/tuple_size.pass.cpp b/libcxx/test/std/containers/sequences/array/array.tuple/tuple_size.pass.cpp index e542f34eefbb7..dddcbcaff7f37 100644 --- a/libcxx/test/std/containers/sequences/array/array.tuple/tuple_size.pass.cpp +++ b/libcxx/test/std/containers/sequences/array/array.tuple/tuple_size.pass.cpp @@ -33,9 +33,11 @@ void test() } } -int main() +int main(int, char**) { test(); test(); test(); + + return 0; } diff --git a/libcxx/test/std/containers/sequences/array/array.zero/tested_elsewhere.pass.cpp b/libcxx/test/std/containers/sequences/array/array.zero/tested_elsewhere.pass.cpp index ba3c5405d0757..966e603d13481 100644 --- a/libcxx/test/std/containers/sequences/array/array.zero/tested_elsewhere.pass.cpp +++ b/libcxx/test/std/containers/sequences/array/array.zero/tested_elsewhere.pass.cpp @@ -12,6 +12,8 @@ #include -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/containers/sequences/array/at.pass.cpp b/libcxx/test/std/containers/sequences/array/at.pass.cpp index b8d1d2b804bbe..0240d5a83728d 100644 --- a/libcxx/test/std/containers/sequences/array/at.pass.cpp +++ b/libcxx/test/std/containers/sequences/array/at.pass.cpp @@ -30,7 +30,7 @@ constexpr bool check_idx( size_t idx, double val ) } #endif -int main() +int main(int, char**) { { typedef double T; @@ -116,4 +116,6 @@ int main() static_assert (check_idx(2, 3.5), ""); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/array/begin.pass.cpp b/libcxx/test/std/containers/sequences/array/begin.pass.cpp index ce023aa3890e6..7b26d231dbdd9 100644 --- a/libcxx/test/std/containers/sequences/array/begin.pass.cpp +++ b/libcxx/test/std/containers/sequences/array/begin.pass.cpp @@ -24,7 +24,7 @@ struct NoDefault { }; -int main() +int main(int, char**) { { typedef double T; @@ -48,4 +48,6 @@ int main() LIBCPP_ASSERT(ib != nullptr); LIBCPP_ASSERT(ie != nullptr); } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/array/compare.fail.cpp b/libcxx/test/std/containers/sequences/array/compare.fail.cpp index 1710fe7888bb8..47859ad49db52 100644 --- a/libcxx/test/std/containers/sequences/array/compare.fail.cpp +++ b/libcxx/test/std/containers/sequences/array/compare.fail.cpp @@ -41,7 +41,7 @@ void test_compare(const Array& LHS, const Array& RHS) { template struct NoCompare {}; -int main() +int main(int, char**) { { typedef NoCompare<0> T; @@ -67,4 +67,6 @@ int main() TEST_IGNORE_NODISCARD (c1 == c1); TEST_IGNORE_NODISCARD (c1 < c1); } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/array/compare.pass.cpp b/libcxx/test/std/containers/sequences/array/compare.pass.cpp index 56eabbd00ab49..c05dd19405bff 100644 --- a/libcxx/test/std/containers/sequences/array/compare.pass.cpp +++ b/libcxx/test/std/containers/sequences/array/compare.pass.cpp @@ -28,7 +28,7 @@ // Disable the missing braces warning for this reason. #include "disable_missing_braces_warning.h" -int main() +int main(int, char**) { { typedef int T; @@ -58,4 +58,6 @@ int main() static_assert(testComparisons6(a2, a1, false, false), ""); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/array/contiguous.pass.cpp b/libcxx/test/std/containers/sequences/array/contiguous.pass.cpp index ce953794a5616..e0ab5b61c4434 100644 --- a/libcxx/test/std/containers/sequences/array/contiguous.pass.cpp +++ b/libcxx/test/std/containers/sequences/array/contiguous.pass.cpp @@ -20,11 +20,13 @@ void test_contiguous ( const C &c ) assert ( *(c.begin() + i) == *(std::addressof(*c.begin()) + i)); } -int main() +int main(int, char**) { { typedef double T; typedef std::array C; test_contiguous (C()); } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/array/empty.fail.cpp b/libcxx/test/std/containers/sequences/array/empty.fail.cpp index 424f715413d03..3bbb3c8e1c045 100644 --- a/libcxx/test/std/containers/sequences/array/empty.fail.cpp +++ b/libcxx/test/std/containers/sequences/array/empty.fail.cpp @@ -20,11 +20,13 @@ #include "test_macros.h" -int main () +int main(int, char**) { std::array c; c.empty(); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} std::array c0; c0.empty(); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} + + return 0; } diff --git a/libcxx/test/std/containers/sequences/array/empty.pass.cpp b/libcxx/test/std/containers/sequences/array/empty.pass.cpp index 4858069470862..a17aa50c5b219 100644 --- a/libcxx/test/std/containers/sequences/array/empty.pass.cpp +++ b/libcxx/test/std/containers/sequences/array/empty.pass.cpp @@ -18,7 +18,7 @@ #include "test_macros.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::array C; @@ -32,4 +32,6 @@ int main() ASSERT_NOEXCEPT(c.empty()); assert( c.empty()); } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/array/front_back.pass.cpp b/libcxx/test/std/containers/sequences/array/front_back.pass.cpp index 13368683a56fd..1a714369ffc3f 100644 --- a/libcxx/test/std/containers/sequences/array/front_back.pass.cpp +++ b/libcxx/test/std/containers/sequences/array/front_back.pass.cpp @@ -36,7 +36,7 @@ constexpr bool check_back( double val ) } #endif -int main() +int main(int, char**) { { typedef double T; @@ -115,4 +115,6 @@ int main() static_assert (check_back (3.5), ""); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/array/indexing.pass.cpp b/libcxx/test/std/containers/sequences/array/indexing.pass.cpp index a33a597fc5e1c..bf55711a14180 100644 --- a/libcxx/test/std/containers/sequences/array/indexing.pass.cpp +++ b/libcxx/test/std/containers/sequences/array/indexing.pass.cpp @@ -30,7 +30,7 @@ constexpr bool check_idx( size_t idx, double val ) } #endif -int main() +int main(int, char**) { { typedef double T; @@ -104,4 +104,6 @@ int main() static_assert (check_idx(2, 3.5), ""); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/array/iterators.pass.cpp b/libcxx/test/std/containers/sequences/array/iterators.pass.cpp index 7e4c9b756206d..71fad183ff730 100644 --- a/libcxx/test/std/containers/sequences/array/iterators.pass.cpp +++ b/libcxx/test/std/containers/sequences/array/iterators.pass.cpp @@ -20,7 +20,7 @@ // Disable the missing braces warning for this reason. #include "disable_missing_braces_warning.h" -int main() +int main(int, char**) { { typedef std::array C; @@ -141,4 +141,6 @@ int main() static_assert ( *std::crbegin(c) == 4, "" ); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/array/max_size.pass.cpp b/libcxx/test/std/containers/sequences/array/max_size.pass.cpp index 1f3ec0472ae2f..a0b77392ee804 100644 --- a/libcxx/test/std/containers/sequences/array/max_size.pass.cpp +++ b/libcxx/test/std/containers/sequences/array/max_size.pass.cpp @@ -18,7 +18,7 @@ #include "test_macros.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::array C; @@ -32,4 +32,6 @@ int main() ASSERT_NOEXCEPT(c.max_size()); assert(c.max_size() == 0); } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/array/size_and_alignment.pass.cpp b/libcxx/test/std/containers/sequences/array/size_and_alignment.pass.cpp index c57740bcaa5b6..f585da6ce7a12 100644 --- a/libcxx/test/std/containers/sequences/array/size_and_alignment.pass.cpp +++ b/libcxx/test/std/containers/sequences/array/size_and_alignment.pass.cpp @@ -57,7 +57,9 @@ struct TEST_ALIGNAS(TEST_ALIGNOF(std::max_align_t) * 2) TestType2 { char data[1000]; }; -int main() { +//static_assert(sizeof(void*) == 4, ""); + +int main(int, char**) { test_type(); test_type(); test_type(); @@ -65,4 +67,6 @@ int main() { test_type(); test_type(); test_type(); + + return 0; } diff --git a/libcxx/test/std/containers/sequences/array/types.pass.cpp b/libcxx/test/std/containers/sequences/array/types.pass.cpp index e76c06e6d4606..f86e008d2e8de 100644 --- a/libcxx/test/std/containers/sequences/array/types.pass.cpp +++ b/libcxx/test/std/containers/sequences/array/types.pass.cpp @@ -47,7 +47,7 @@ void test_iterators() { static_assert((std::is_same::value), ""); } -int main() +int main(int, char**) { { typedef double T; @@ -93,4 +93,6 @@ int main() static_assert((std::is_same::difference_type>::value), ""); } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/deque/allocator_mismatch.fail.cpp b/libcxx/test/std/containers/sequences/deque/allocator_mismatch.fail.cpp index 769aa9ec11338..287faf75ec448 100644 --- a/libcxx/test/std/containers/sequences/deque/allocator_mismatch.fail.cpp +++ b/libcxx/test/std/containers/sequences/deque/allocator_mismatch.fail.cpp @@ -11,7 +11,9 @@ #include -int main() +int main(int, char**) { std::deque > d; + + return 0; } diff --git a/libcxx/test/std/containers/sequences/deque/deque.capacity/access.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.capacity/access.pass.cpp index b63784312d229..86c518450f9e4 100644 --- a/libcxx/test/std/containers/sequences/deque/deque.capacity/access.pass.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.capacity/access.pass.cpp @@ -47,7 +47,7 @@ make(int size, int start = 0 ) return c; } -int main() +int main(int, char**) { { std::deque c = make >(10); @@ -87,4 +87,6 @@ int main() assert(c.back() == 9); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/deque/deque.capacity/empty.fail.cpp b/libcxx/test/std/containers/sequences/deque/deque.capacity/empty.fail.cpp index 701e318973c2a..79e4b30b2b27d 100644 --- a/libcxx/test/std/containers/sequences/deque/deque.capacity/empty.fail.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.capacity/empty.fail.cpp @@ -20,8 +20,10 @@ #include "test_macros.h" -int main () +int main(int, char**) { std::deque c; c.empty(); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} + + return 0; } diff --git a/libcxx/test/std/containers/sequences/deque/deque.capacity/empty.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.capacity/empty.pass.cpp index 7adf6656a7eaf..38859411067d4 100644 --- a/libcxx/test/std/containers/sequences/deque/deque.capacity/empty.pass.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.capacity/empty.pass.cpp @@ -18,7 +18,7 @@ #include "test_macros.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::deque C; @@ -42,4 +42,6 @@ int main() assert(c.empty()); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/deque/deque.capacity/max_size.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.capacity/max_size.pass.cpp index d5b3cc521e6b3..230a46519b107 100644 --- a/libcxx/test/std/containers/sequences/deque/deque.capacity/max_size.pass.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.capacity/max_size.pass.cpp @@ -18,7 +18,7 @@ #include "test_allocator.h" #include "test_macros.h" -int main() { +int main(int, char**) { { typedef limited_allocator A; typedef std::deque C; @@ -43,4 +43,6 @@ int main() { assert(c.max_size() <= max_dist); assert(c.max_size() <= alloc_max_size(c.get_allocator())); } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/deque/deque.capacity/resize_size.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.capacity/resize_size.pass.cpp index 6ef329ee62fda..9161592213b9b 100644 --- a/libcxx/test/std/containers/sequences/deque/deque.capacity/resize_size.pass.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.capacity/resize_size.pass.cpp @@ -65,7 +65,7 @@ testN(int start, int N, int M) test(c1, M); } -int main() +int main(int, char**) { { int rng[] = {0, 1, 2, 3, 1023, 1024, 1025, 2047, 2048, 2049}; @@ -85,4 +85,6 @@ int main() testN>>(rng[i], rng[j], rng[k]); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/deque/deque.capacity/resize_size_value.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.capacity/resize_size_value.pass.cpp index 02910d8bf50d2..876ff2fe5adbe 100644 --- a/libcxx/test/std/containers/sequences/deque/deque.capacity/resize_size_value.pass.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.capacity/resize_size_value.pass.cpp @@ -65,7 +65,7 @@ testN(int start, int N, int M) test(c1, M, -10); } -int main() +int main(int, char**) { { int rng[] = {0, 1, 2, 3, 1023, 1024, 1025, 2047, 2048, 2049}; @@ -85,4 +85,6 @@ int main() testN>>(rng[i], rng[j], rng[k]); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/deque/deque.capacity/shrink_to_fit.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.capacity/shrink_to_fit.pass.cpp index e4f0e2bd002ca..bde2eaaaa38ee 100644 --- a/libcxx/test/std/containers/sequences/deque/deque.capacity/shrink_to_fit.pass.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.capacity/shrink_to_fit.pass.cpp @@ -55,7 +55,7 @@ testN(int start, int N) test(c1); } -int main() +int main(int, char**) { { int rng[] = {0, 1, 2, 3, 1023, 1024, 1025, 2047, 2048, 2049}; @@ -73,4 +73,6 @@ int main() testN> >(rng[i], rng[j]); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/deque/deque.capacity/size.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.capacity/size.pass.cpp index 2b89c0490d996..c70abe421cf28 100644 --- a/libcxx/test/std/containers/sequences/deque/deque.capacity/size.pass.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.capacity/size.pass.cpp @@ -18,7 +18,7 @@ #include "test_macros.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::deque C; @@ -58,4 +58,6 @@ int main() assert(c.size() == 0); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/deque/deque.cons/alloc.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.cons/alloc.pass.cpp index 4dcea9782af5f..e2700b958a73d 100644 --- a/libcxx/test/std/containers/sequences/deque/deque.cons/alloc.pass.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.cons/alloc.pass.cpp @@ -26,7 +26,7 @@ test(const Allocator& a) assert(d.get_allocator() == a); } -int main() +int main(int, char**) { test(std::allocator()); test(test_allocator(3)); @@ -36,4 +36,6 @@ int main() test(explicit_allocator()); test(explicit_allocator{}); #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/deque/deque.cons/assign_initializer_list.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.cons/assign_initializer_list.pass.cpp index 5441583fa81f4..edca369a54ab5 100644 --- a/libcxx/test/std/containers/sequences/deque/deque.cons/assign_initializer_list.pass.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.cons/assign_initializer_list.pass.cpp @@ -17,7 +17,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { std::deque d; @@ -37,4 +37,6 @@ int main() assert(d[2] == 5); assert(d[3] == 6); } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/deque/deque.cons/assign_iter_iter.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.cons/assign_iter_iter.pass.cpp index 6b3b3f19a4355..d59943574f001 100644 --- a/libcxx/test/std/containers/sequences/deque/deque.cons/assign_iter_iter.pass.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.cons/assign_iter_iter.pass.cpp @@ -149,7 +149,9 @@ void test_emplacable_concept() { #endif } -int main() { +int main(int, char**) { basic_test(); test_emplacable_concept(); + + return 0; } diff --git a/libcxx/test/std/containers/sequences/deque/deque.cons/assign_size_value.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.cons/assign_size_value.pass.cpp index ba18ab24eb32f..2875a1776268e 100644 --- a/libcxx/test/std/containers/sequences/deque/deque.cons/assign_size_value.pass.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.cons/assign_size_value.pass.cpp @@ -60,7 +60,7 @@ testN(int start, int N, int M) test(c1, M, -10); } -int main() +int main(int, char**) { { int rng[] = {0, 1, 2, 3, 1023, 1024, 1025, 2047, 2048, 2049}; @@ -80,4 +80,6 @@ int main() testN> >(rng[i], rng[j], rng[k]); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/deque/deque.cons/copy.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.cons/copy.pass.cpp index bb5bb1393c089..2d42ee38a5089 100644 --- a/libcxx/test/std/containers/sequences/deque/deque.cons/copy.pass.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.cons/copy.pass.cpp @@ -25,7 +25,7 @@ test(const C& x) assert(c == x); } -int main() +int main(int, char**) { { int ab[] = {3, 4, 2, 8, 0, 1, 44, 34, 45, 96, 80, 1, 13, 31, 45}; @@ -57,4 +57,6 @@ int main() assert(v2.get_allocator() == v.get_allocator()); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/deque/deque.cons/copy_alloc.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.cons/copy_alloc.pass.cpp index 138e6bdc7e035..4334fd6a539c8 100644 --- a/libcxx/test/std/containers/sequences/deque/deque.cons/copy_alloc.pass.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.cons/copy_alloc.pass.cpp @@ -25,7 +25,7 @@ test(const C& x, const typename C::allocator_type& a) assert(c.get_allocator() == a); } -int main() +int main(int, char**) { { int ab[] = {3, 4, 2, 8, 0, 1, 44, 34, 45, 96, 80, 1, 13, 31, 45}; @@ -47,4 +47,6 @@ int main() min_allocator()); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/deque/deque.cons/deduct.fail.cpp b/libcxx/test/std/containers/sequences/deque/deque.cons/deduct.fail.cpp index 3180384aab51b..99bf89c7908dc 100644 --- a/libcxx/test/std/containers/sequences/deque/deque.cons/deduct.fail.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.cons/deduct.fail.cpp @@ -25,7 +25,7 @@ struct A {}; -int main() +int main(int, char**) { // Test the explicit deduction guides @@ -38,4 +38,6 @@ int main() // deque, allocator>> } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/deque/deque.cons/deduct.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.cons/deduct.pass.cpp index b349819cc7b92..ac08613818a95 100644 --- a/libcxx/test/std/containers/sequences/deque/deque.cons/deduct.pass.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.cons/deduct.pass.cpp @@ -29,7 +29,7 @@ struct A {}; -int main() +int main(int, char**) { // Test the explicit deduction guides @@ -94,4 +94,6 @@ int main() static_assert(std::is_same_v>, ""); assert(deq.size() == 0); } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/deque/deque.cons/default.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.cons/default.pass.cpp index bb84f05f49db3..f132eb5bee85d 100644 --- a/libcxx/test/std/containers/sequences/deque/deque.cons/default.pass.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.cons/default.pass.cpp @@ -29,7 +29,7 @@ test() #endif } -int main() +int main(int, char**) { test >(); test >(); @@ -37,4 +37,6 @@ int main() test >(); test >(); #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/deque/deque.cons/default_noexcept.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.cons/default_noexcept.pass.cpp index fea4799d54da2..abc3de7db991b 100644 --- a/libcxx/test/std/containers/sequences/deque/deque.cons/default_noexcept.pass.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.cons/default_noexcept.pass.cpp @@ -29,7 +29,7 @@ struct some_alloc some_alloc(const some_alloc&); }; -int main() +int main(int, char**) { #if defined(_LIBCPP_VERSION) { @@ -49,4 +49,6 @@ int main() typedef std::deque> C; static_assert(!std::is_nothrow_default_constructible::value, ""); } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/deque/deque.cons/dtor_noexcept.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.cons/dtor_noexcept.pass.cpp index 3dcc15045e20c..7e09148b4fd7c 100644 --- a/libcxx/test/std/containers/sequences/deque/deque.cons/dtor_noexcept.pass.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.cons/dtor_noexcept.pass.cpp @@ -27,7 +27,7 @@ struct some_alloc ~some_alloc() noexcept(false); }; -int main() +int main(int, char**) { { typedef std::deque C; @@ -47,4 +47,6 @@ int main() static_assert(!std::is_nothrow_destructible::value, ""); } #endif // _LIBCPP_VERSION + + return 0; } diff --git a/libcxx/test/std/containers/sequences/deque/deque.cons/initializer_list.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.cons/initializer_list.pass.cpp index b76d0cca57877..02cbadd6c68ee 100644 --- a/libcxx/test/std/containers/sequences/deque/deque.cons/initializer_list.pass.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.cons/initializer_list.pass.cpp @@ -17,7 +17,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { std::deque d = {3, 4, 5, 6}; @@ -35,4 +35,6 @@ int main() assert(d[2] == 5); assert(d[3] == 6); } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/deque/deque.cons/initializer_list_alloc.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.cons/initializer_list_alloc.pass.cpp index e412e94e7e94c..1450c978b6882 100644 --- a/libcxx/test/std/containers/sequences/deque/deque.cons/initializer_list_alloc.pass.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.cons/initializer_list_alloc.pass.cpp @@ -18,7 +18,7 @@ #include "test_allocator.h" #include "min_allocator.h" -int main() +int main(int, char**) { { std::deque> d({3, 4, 5, 6}, test_allocator(3)); @@ -38,4 +38,6 @@ int main() assert(d[2] == 5); assert(d[3] == 6); } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/deque/deque.cons/iter_iter.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.cons/iter_iter.pass.cpp index 6c68cd09016a6..214ac8303bd73 100644 --- a/libcxx/test/std/containers/sequences/deque/deque.cons/iter_iter.pass.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.cons/iter_iter.pass.cpp @@ -105,7 +105,9 @@ void test_emplacable_concept() { #endif } -int main() { +int main(int, char**) { basic_test(); test_emplacable_concept(); + + return 0; } diff --git a/libcxx/test/std/containers/sequences/deque/deque.cons/iter_iter_alloc.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.cons/iter_iter_alloc.pass.cpp index c6391620b2e5a..c72f73a9a8a2b 100644 --- a/libcxx/test/std/containers/sequences/deque/deque.cons/iter_iter_alloc.pass.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.cons/iter_iter_alloc.pass.cpp @@ -96,7 +96,9 @@ void test_emplacable_concept() { #endif } -int main() { +int main(int, char**) { basic_test(); test_emplacable_concept(); + + return 0; } diff --git a/libcxx/test/std/containers/sequences/deque/deque.cons/move.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.cons/move.pass.cpp index ee628c6aa99c5..b8fdc989247ef 100644 --- a/libcxx/test/std/containers/sequences/deque/deque.cons/move.pass.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.cons/move.pass.cpp @@ -19,7 +19,7 @@ #include "test_allocator.h" #include "min_allocator.h" -int main() +int main(int, char**) { { int ab[] = {3, 4, 2, 8, 0, 1, 44, 34, 45, 96, 80, 1, 13, 31, 45}; @@ -68,4 +68,6 @@ int main() assert(c1.size() == 0); assert(c3.get_allocator() == c1.get_allocator()); } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/deque/deque.cons/move_alloc.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.cons/move_alloc.pass.cpp index 54ce39d7e80ef..68dd99f105bb1 100644 --- a/libcxx/test/std/containers/sequences/deque/deque.cons/move_alloc.pass.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.cons/move_alloc.pass.cpp @@ -20,7 +20,7 @@ #include "test_allocator.h" #include "min_allocator.h" -int main() +int main(int, char**) { { int ab[] = {3, 4, 2, 8, 0, 1, 44, 34, 45, 96, 80, 1, 13, 31, 45}; @@ -82,4 +82,6 @@ int main() assert(c3.get_allocator() == A()); LIBCPP_ASSERT(c1.size() == 0); } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/deque/deque.cons/move_assign.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.cons/move_assign.pass.cpp index 325f24c8018dd..5fcfbb8d9baa2 100644 --- a/libcxx/test/std/containers/sequences/deque/deque.cons/move_assign.pass.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.cons/move_assign.pass.cpp @@ -19,7 +19,7 @@ #include "test_allocator.h" #include "min_allocator.h" -int main() +int main(int, char**) { { int ab[] = {3, 4, 2, 8, 0, 1, 44, 34, 45, 96, 80, 1, 13, 31, 45}; @@ -85,4 +85,6 @@ int main() assert(c1.size() == 0); assert(c3.get_allocator() == A()); } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/deque/deque.cons/move_assign_noexcept.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.cons/move_assign_noexcept.pass.cpp index 3facd3084dc84..1d86c14aadd47 100644 --- a/libcxx/test/std/containers/sequences/deque/deque.cons/move_assign_noexcept.pass.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.cons/move_assign_noexcept.pass.cpp @@ -31,7 +31,7 @@ struct some_alloc some_alloc(const some_alloc&); }; -int main() +int main(int, char**) { { typedef std::deque C; @@ -51,4 +51,6 @@ int main() static_assert(!std::is_nothrow_move_assignable::value, ""); } #endif // _LIBCPP_VERSION + + return 0; } diff --git a/libcxx/test/std/containers/sequences/deque/deque.cons/move_noexcept.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.cons/move_noexcept.pass.cpp index b5d3331f43ca0..8b4b4fb1fa5b8 100644 --- a/libcxx/test/std/containers/sequences/deque/deque.cons/move_noexcept.pass.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.cons/move_noexcept.pass.cpp @@ -29,7 +29,7 @@ struct some_alloc some_alloc(const some_alloc&); }; -int main() +int main(int, char**) { #if defined(_LIBCPP_VERSION) { @@ -49,4 +49,6 @@ int main() static_assert(!std::is_nothrow_move_constructible::value, ""); } #endif // _LIBCPP_VERSION + + return 0; } diff --git a/libcxx/test/std/containers/sequences/deque/deque.cons/op_equal.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.cons/op_equal.pass.cpp index 22f015950ebc6..c26ddec0c1949 100644 --- a/libcxx/test/std/containers/sequences/deque/deque.cons/op_equal.pass.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.cons/op_equal.pass.cpp @@ -24,7 +24,7 @@ test(const C& x) assert(c == x); } -int main() +int main(int, char**) { { int ab[] = {3, 4, 2, 8, 0, 1, 44, 34, 45, 96, 80, 1, 13, 31, 45}; @@ -59,4 +59,6 @@ int main() assert(l2.get_allocator() == min_allocator()); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/deque/deque.cons/op_equal_initializer_list.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.cons/op_equal_initializer_list.pass.cpp index 140bb9c764759..5f415020128c9 100644 --- a/libcxx/test/std/containers/sequences/deque/deque.cons/op_equal_initializer_list.pass.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.cons/op_equal_initializer_list.pass.cpp @@ -17,7 +17,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { std::deque d; @@ -37,4 +37,6 @@ int main() assert(d[2] == 5); assert(d[3] == 6); } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/deque/deque.cons/size.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.cons/size.pass.cpp index fe378e58f84a3..b69d2bb598ed5 100644 --- a/libcxx/test/std/containers/sequences/deque/deque.cons/size.pass.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.cons/size.pass.cpp @@ -86,7 +86,7 @@ test(unsigned n) test2 ( n ); } -int main() +int main(int, char**) { test >(0); test >(1); @@ -113,4 +113,6 @@ int main() test3> (3); #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/deque/deque.cons/size_value.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.cons/size_value.pass.cpp index 8926a879396e5..8c432182a679e 100644 --- a/libcxx/test/std/containers/sequences/deque/deque.cons/size_value.pass.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.cons/size_value.pass.cpp @@ -30,7 +30,7 @@ test(unsigned n, const T& x) assert(*i == x); } -int main() +int main(int, char**) { test >(0, 5); test >(1, 10); @@ -48,4 +48,6 @@ int main() #if TEST_STD_VER >= 11 test >(4095, 90); #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/deque/deque.cons/size_value_alloc.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.cons/size_value_alloc.pass.cpp index 80218de73659e..d7e4b3df99165 100644 --- a/libcxx/test/std/containers/sequences/deque/deque.cons/size_value_alloc.pass.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.cons/size_value_alloc.pass.cpp @@ -30,7 +30,7 @@ test(unsigned n, const T& x, const Allocator& a) assert(*i == x); } -int main() +int main(int, char**) { { std::allocator a; @@ -64,4 +64,6 @@ int main() test(4097, 157, a); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/deque/deque.erasure/erase.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.erasure/erase.pass.cpp index 5af8faef47b86..2293ef2053145 100644 --- a/libcxx/test/std/containers/sequences/deque/deque.erasure/erase.pass.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.erasure/erase.pass.cpp @@ -66,7 +66,7 @@ void test() test0(S({1,2,1}), opt(3), S({1,2,1})); } -int main() +int main(int, char**) { test>(); test>> (); @@ -74,4 +74,6 @@ int main() test>(); test>(); + + return 0; } diff --git a/libcxx/test/std/containers/sequences/deque/deque.erasure/erase_if.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.erasure/erase_if.pass.cpp index 181c73686e2bf..e0828a3fad866 100644 --- a/libcxx/test/std/containers/sequences/deque/deque.erasure/erase_if.pass.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.erasure/erase_if.pass.cpp @@ -66,7 +66,7 @@ void test() test0(S({1,2,3}), False, S({1,2,3})); } -int main() +int main(int, char**) { test>(); test>> (); @@ -74,4 +74,6 @@ int main() test>(); test>(); + + return 0; } diff --git a/libcxx/test/std/containers/sequences/deque/deque.modifiers/clear.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.modifiers/clear.pass.cpp index 8cfa82406db1e..becc36878bf42 100644 --- a/libcxx/test/std/containers/sequences/deque/deque.modifiers/clear.pass.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.modifiers/clear.pass.cpp @@ -17,7 +17,7 @@ #include "../../../NotConstructible.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef NotConstructible T; @@ -63,4 +63,6 @@ int main() assert(distance(c.begin(), c.end()) == 0); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/deque/deque.modifiers/emplace.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.modifiers/emplace.pass.cpp index 78278df325c0a..f4713dfdfef7d 100644 --- a/libcxx/test/std/containers/sequences/deque/deque.modifiers/emplace.pass.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.modifiers/emplace.pass.cpp @@ -86,7 +86,7 @@ testN(int start, int N) } -int main() +int main(int, char**) { { int rng[] = {0, 1, 2, 3, 1023, 1024, 1025, 2047, 2048, 2049}; @@ -102,4 +102,6 @@ int main() for (int j = 0; j < N; ++j) testN> >(rng[i], rng[j]); } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/deque/deque.modifiers/emplace_back.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.modifiers/emplace_back.pass.cpp index 835a47a5e83ed..ae04c7d17cf6b 100644 --- a/libcxx/test/std/containers/sequences/deque/deque.modifiers/emplace_back.pass.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.modifiers/emplace_back.pass.cpp @@ -74,7 +74,7 @@ testN(int start, int N) test(c1); } -int main() +int main(int, char**) { { int rng[] = {0, 1, 2, 3, 1023, 1024, 1025, 2047, 2048, 2049}; @@ -101,4 +101,6 @@ int main() c.emplace_front(1, 2, 3); assert(c.size() == 4); } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/deque/deque.modifiers/emplace_front.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.modifiers/emplace_front.pass.cpp index 7f0298cdf28ad..43d6c36d2179b 100644 --- a/libcxx/test/std/containers/sequences/deque/deque.modifiers/emplace_front.pass.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.modifiers/emplace_front.pass.cpp @@ -75,7 +75,7 @@ testN(int start, int N) } -int main() +int main(int, char**) { { int rng[] = {0, 1, 2, 3, 1023, 1024, 1025, 2047, 2048, 2049}; @@ -102,4 +102,6 @@ int main() c.emplace_front(1, 2, 3); assert(c.size() == 4); } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/deque/deque.modifiers/erase_iter.invalidation.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.modifiers/erase_iter.invalidation.pass.cpp index 3a055df9fee70..54395114a0cd8 100644 --- a/libcxx/test/std/containers/sequences/deque/deque.modifiers/erase_iter.invalidation.pass.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.modifiers/erase_iter.invalidation.pass.cpp @@ -54,7 +54,7 @@ void del_at_end(C c) assert(&*it2 == &*it4); } -int main() +int main(int, char**) { std::deque queue; for (int i = 0; i < 20; ++i) @@ -66,4 +66,6 @@ int main() del_at_end(queue); queue.pop_back(); } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/deque/deque.modifiers/erase_iter.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.modifiers/erase_iter.pass.cpp index 79cb562c1c5fe..d8db68368b00a 100644 --- a/libcxx/test/std/containers/sequences/deque/deque.modifiers/erase_iter.pass.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.modifiers/erase_iter.pass.cpp @@ -88,7 +88,7 @@ testN(int start, int N) } } -int main() +int main(int, char**) { { int rng[] = {0, 1, 2, 3, 1023, 1024, 1025, 2047, 2048, 2049}; @@ -121,4 +121,6 @@ int main() assert(v.size() == 0); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/deque/deque.modifiers/erase_iter_iter.invalidation.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.modifiers/erase_iter_iter.invalidation.pass.cpp index fd08b6afec6b2..3a8a06d58cf4b 100644 --- a/libcxx/test/std/containers/sequences/deque/deque.modifiers/erase_iter_iter.invalidation.pass.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.modifiers/erase_iter_iter.invalidation.pass.cpp @@ -59,7 +59,7 @@ void del_at_end(C c, size_t num) } -int main() +int main(int, char**) { std::deque queue; for (int i = 0; i < 20; ++i) @@ -74,4 +74,6 @@ int main() } queue.pop_back(); } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/deque/deque.modifiers/erase_iter_iter.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.modifiers/erase_iter_iter.pass.cpp index c81d9a8bbac40..c738748a6f61f 100644 --- a/libcxx/test/std/containers/sequences/deque/deque.modifiers/erase_iter_iter.pass.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.modifiers/erase_iter_iter.pass.cpp @@ -95,7 +95,7 @@ testN(int start, int N) } } -int main() +int main(int, char**) { { int rng[] = {0, 1, 2, 3, 1023, 1024, 1025, 2047, 2048, 2049}; @@ -127,4 +127,6 @@ int main() assert(v.size() == 0); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/deque/deque.modifiers/insert_iter_initializer_list.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.modifiers/insert_iter_initializer_list.pass.cpp index f14da8a817b53..e0da02f7e7e6d 100644 --- a/libcxx/test/std/containers/sequences/deque/deque.modifiers/insert_iter_initializer_list.pass.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.modifiers/insert_iter_initializer_list.pass.cpp @@ -17,7 +17,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { std::deque d(10, 1); @@ -59,4 +59,6 @@ int main() assert(d[12] == 1); assert(d[13] == 1); } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/deque/deque.modifiers/insert_iter_iter.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.modifiers/insert_iter_iter.pass.cpp index cb36aa2802c70..9a5f05476d393 100644 --- a/libcxx/test/std/containers/sequences/deque/deque.modifiers/insert_iter_iter.pass.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.modifiers/insert_iter_iter.pass.cpp @@ -259,7 +259,7 @@ test_move() #endif } -int main() +int main(int, char**) { { int rng[] = {0, 1, 2, 3, 1023, 1024, 1025, 2047, 2048, 2049}; @@ -285,4 +285,6 @@ int main() test_move > >(); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/deque/deque.modifiers/insert_rvalue.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.modifiers/insert_rvalue.pass.cpp index a9f242706c2c0..eec8e0a499845 100644 --- a/libcxx/test/std/containers/sequences/deque/deque.modifiers/insert_rvalue.pass.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.modifiers/insert_rvalue.pass.cpp @@ -91,7 +91,7 @@ testN(int start, int N) } } -int main() +int main(int, char**) { { int rng[] = {0, 1, 2, 3, 1023, 1024, 1025, 2047, 2048, 2049}; @@ -107,4 +107,6 @@ int main() for (int j = 0; j < N; ++j) testN> >(rng[i], rng[j]); } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/deque/deque.modifiers/insert_size_value.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.modifiers/insert_size_value.pass.cpp index ced0e360ba176..0b95c8fc50a28 100644 --- a/libcxx/test/std/containers/sequences/deque/deque.modifiers/insert_size_value.pass.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.modifiers/insert_size_value.pass.cpp @@ -132,7 +132,7 @@ self_reference_test() } } -int main() +int main(int, char**) { { int rng[] = {0, 1, 2, 3, 1023, 1024, 1025, 2047, 2048, 2049}; @@ -154,4 +154,6 @@ int main() self_reference_test> >(); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/deque/deque.modifiers/insert_value.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.modifiers/insert_value.pass.cpp index 2e16c342a72a6..8dc0b50b570f1 100644 --- a/libcxx/test/std/containers/sequences/deque/deque.modifiers/insert_value.pass.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.modifiers/insert_value.pass.cpp @@ -114,7 +114,7 @@ self_reference_test() } } -int main() +int main(int, char**) { { int rng[] = {0, 1, 2, 3, 1023, 1024, 1025, 2047, 2048, 2049}; @@ -134,4 +134,6 @@ int main() self_reference_test> >(); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/deque/deque.modifiers/pop_back.invalidation.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.modifiers/pop_back.invalidation.pass.cpp index 74c48d326f473..7b5427b83686d 100644 --- a/libcxx/test/std/containers/sequences/deque/deque.modifiers/pop_back.invalidation.pass.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.modifiers/pop_back.invalidation.pass.cpp @@ -34,7 +34,7 @@ void test(C c) assert(&*it2 == &*it4); } -int main() +int main(int, char**) { std::deque queue; for (int i = 0; i < 20; ++i) @@ -45,4 +45,6 @@ int main() test(queue); queue.pop_back(); } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/deque/deque.modifiers/pop_back.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.modifiers/pop_back.pass.cpp index 1eee65186aede..b0315eb54be81 100644 --- a/libcxx/test/std/containers/sequences/deque/deque.modifiers/pop_back.pass.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.modifiers/pop_back.pass.cpp @@ -63,7 +63,7 @@ testN(int start, int N) } } -int main() +int main(int, char**) { { int rng[] = {0, 1, 2, 3, 1023, 1024, 1025, 2047, 2048, 2049}; @@ -81,4 +81,6 @@ int main() testN> >(rng[i], rng[j]); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/deque/deque.modifiers/pop_front.invalidation.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.modifiers/pop_front.invalidation.pass.cpp index e773debde43fa..3ff1b5b9f176a 100644 --- a/libcxx/test/std/containers/sequences/deque/deque.modifiers/pop_front.invalidation.pass.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.modifiers/pop_front.invalidation.pass.cpp @@ -34,7 +34,7 @@ void test(C c) assert(&*it2 == &*it4); } -int main() +int main(int, char**) { std::deque queue; for (int i = 0; i < 20; ++i) @@ -45,4 +45,6 @@ int main() test(queue); queue.pop_back(); } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/deque/deque.modifiers/pop_front.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.modifiers/pop_front.pass.cpp index 672187380a45c..9d25d168492e8 100644 --- a/libcxx/test/std/containers/sequences/deque/deque.modifiers/pop_front.pass.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.modifiers/pop_front.pass.cpp @@ -63,7 +63,7 @@ testN(int start, int N) } } -int main() +int main(int, char**) { { int rng[] = {0, 1, 2, 3, 1023, 1024, 1025, 2047, 2048, 2049}; @@ -81,4 +81,6 @@ int main() testN> >(rng[i], rng[j]); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/deque/deque.modifiers/push_back.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.modifiers/push_back.pass.cpp index be2d72c53584e..d0a73c37f9961 100644 --- a/libcxx/test/std/containers/sequences/deque/deque.modifiers/push_back.pass.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.modifiers/push_back.pass.cpp @@ -53,7 +53,7 @@ void test(int size) } } -int main() +int main(int, char**) { { int rng[] = {0, 1, 2, 3, 1023, 1024, 1025, 2046, 2047, 2048, 2049, 4094, 4095, 4096}; @@ -69,4 +69,6 @@ int main() test> >(rng[j]); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/deque/deque.modifiers/push_back_exception_safety.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.modifiers/push_back_exception_safety.pass.cpp index 4bd62b1091902..d4c46f0bcbc39 100644 --- a/libcxx/test/std/containers/sequences/deque/deque.modifiers/push_back_exception_safety.pass.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.modifiers/push_back_exception_safety.pass.cpp @@ -64,7 +64,7 @@ CMyClass::~CMyClass() { bool operator==(const CMyClass &lhs, const CMyClass &rhs) { return lhs.equal(rhs); } -int main() +int main(int, char**) { CMyClass instance(42); { @@ -98,4 +98,6 @@ int main() assert(vec==vec2); } } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/deque/deque.modifiers/push_back_rvalue.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.modifiers/push_back_rvalue.pass.cpp index aa9366956ff46..29354468134c1 100644 --- a/libcxx/test/std/containers/sequences/deque/deque.modifiers/push_back_rvalue.pass.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.modifiers/push_back_rvalue.pass.cpp @@ -58,7 +58,7 @@ void test(int size) } -int main() +int main(int, char**) { { int rng[] = {0, 1, 2, 3, 1023, 1024, 1025, 2046, 2047, 2048, 2049, 4094, 4095, 4096}; @@ -72,4 +72,6 @@ int main() for (int j = 0; j < N; ++j) test> >(rng[j]); } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/deque/deque.modifiers/push_front.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.modifiers/push_front.pass.cpp index 7e4f7151c5496..dee483c795710 100644 --- a/libcxx/test/std/containers/sequences/deque/deque.modifiers/push_front.pass.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.modifiers/push_front.pass.cpp @@ -62,7 +62,7 @@ testN(int start, int N) test(c1, -10); } -int main() +int main(int, char**) { { int rng[] = {0, 1, 2, 3, 1023, 1024, 1025, 2047, 2048, 2049}; @@ -80,4 +80,6 @@ int main() testN> >(rng[i], rng[j]); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/deque/deque.modifiers/push_front_exception_safety.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.modifiers/push_front_exception_safety.pass.cpp index a6a5200e9a8f3..103f2c41d58f7 100644 --- a/libcxx/test/std/containers/sequences/deque/deque.modifiers/push_front_exception_safety.pass.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.modifiers/push_front_exception_safety.pass.cpp @@ -64,7 +64,7 @@ CMyClass::~CMyClass() { bool operator==(const CMyClass &lhs, const CMyClass &rhs) { return lhs.equal(rhs); } -int main() +int main(int, char**) { CMyClass instance(42); { @@ -98,4 +98,6 @@ int main() assert(vec==vec2); } } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/deque/deque.modifiers/push_front_rvalue.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.modifiers/push_front_rvalue.pass.cpp index 3ffde9bf34f59..7a66554d12701 100644 --- a/libcxx/test/std/containers/sequences/deque/deque.modifiers/push_front_rvalue.pass.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.modifiers/push_front_rvalue.pass.cpp @@ -67,7 +67,7 @@ testN(int start, int N) } -int main() +int main(int, char**) { { int rng[] = {0, 1, 2, 3, 1023, 1024, 1025, 2047, 2048, 2049}; @@ -83,4 +83,6 @@ int main() for (int j = 0; j < N; ++j) testN> >(rng[i], rng[j]); } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/deque/deque.special/copy.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.special/copy.pass.cpp index f6ee7737d83ae..f861c424af4bd 100644 --- a/libcxx/test/std/containers/sequences/deque/deque.special/copy.pass.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.special/copy.pass.cpp @@ -66,7 +66,7 @@ void testN(int start, int N) assert(c1 == c2); } -int main() +int main(int, char**) { { int rng[] = {0, 1, 2, 3, 1023, 1024, 1025, 2047, 2048, 2049}; @@ -84,4 +84,6 @@ int main() testN> >(rng[i], rng[j]); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/deque/deque.special/copy_backward.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.special/copy_backward.pass.cpp index 2e51d13ce7081..b5225ae71bc89 100644 --- a/libcxx/test/std/containers/sequences/deque/deque.special/copy_backward.pass.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.special/copy_backward.pass.cpp @@ -65,7 +65,7 @@ void testN(int start, int N) assert(c1 == c2); } -int main() +int main(int, char**) { { int rng[] = {0, 1, 2, 3, 1023, 1024, 1025, 2047, 2048, 2049}; @@ -83,4 +83,6 @@ int main() testN> >(rng[i], rng[j]); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/deque/deque.special/move.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.special/move.pass.cpp index d26132b3f65d4..d1c2a3d726a26 100644 --- a/libcxx/test/std/containers/sequences/deque/deque.special/move.pass.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.special/move.pass.cpp @@ -65,7 +65,7 @@ void testN(int start, int N) assert(c1 == c2); } -int main() +int main(int, char**) { { int rng[] = {0, 1, 2, 3, 1023, 1024, 1025, 2047, 2048, 2049}; @@ -83,4 +83,6 @@ int main() testN> >(rng[i], rng[j]); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/deque/deque.special/move_backward.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.special/move_backward.pass.cpp index 0f3ab067fc5bd..9193609d200cd 100644 --- a/libcxx/test/std/containers/sequences/deque/deque.special/move_backward.pass.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.special/move_backward.pass.cpp @@ -65,7 +65,7 @@ void testN(int start, int N) assert(c1 == c2); } -int main() +int main(int, char**) { { int rng[] = {0, 1, 2, 3, 1023, 1024, 1025, 2047, 2048, 2049}; @@ -83,4 +83,6 @@ int main() testN > >(rng[i], rng[j]); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/deque/deque.special/swap.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.special/swap.pass.cpp index 56310b80ce8e8..33910e419b73b 100644 --- a/libcxx/test/std/containers/sequences/deque/deque.special/swap.pass.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.special/swap.pass.cpp @@ -50,7 +50,7 @@ void testN(int start, int N, int M) assert(c2 == c1_save); } -int main() +int main(int, char**) { { int rng[] = {0, 1, 2, 3, 1023, 1024, 1025, 2047, 2048, 2049}; @@ -106,4 +106,6 @@ int main() assert(c2.get_allocator() == A()); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/deque/deque.special/swap_noexcept.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.special/swap_noexcept.pass.cpp index 7820480da5f14..edbe21128956c 100644 --- a/libcxx/test/std/containers/sequences/deque/deque.special/swap_noexcept.pass.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.special/swap_noexcept.pass.cpp @@ -52,7 +52,7 @@ struct some_alloc2 typedef std::true_type is_always_equal; }; -int main() +int main(int, char**) { { typedef std::deque C; @@ -85,4 +85,6 @@ int main() } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/deque/iterators.pass.cpp b/libcxx/test/std/containers/sequences/deque/iterators.pass.cpp index 9fe9326ec9054..1f06ffde41ac2 100644 --- a/libcxx/test/std/containers/sequences/deque/iterators.pass.cpp +++ b/libcxx/test/std/containers/sequences/deque/iterators.pass.cpp @@ -22,7 +22,7 @@ #include "test_macros.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::deque C; @@ -76,4 +76,6 @@ int main() // assert ( ii1 != c.end()); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/deque/types.pass.cpp b/libcxx/test/std/containers/sequences/deque/types.pass.cpp index 1310400922f95..cfab930f390d9 100644 --- a/libcxx/test/std/containers/sequences/deque/types.pass.cpp +++ b/libcxx/test/std/containers/sequences/deque/types.pass.cpp @@ -71,7 +71,7 @@ test() typename std::iterator_traits::difference_type>::value), ""); } -int main() +int main(int, char**) { test >(); test >(); @@ -100,4 +100,6 @@ int main() typename std::iterator_traits::difference_type>::value), ""); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/forwardlist/allocator_mismatch.fail.cpp b/libcxx/test/std/containers/sequences/forwardlist/allocator_mismatch.fail.cpp index 6973d9aee3aaf..42fb8da918de3 100644 --- a/libcxx/test/std/containers/sequences/forwardlist/allocator_mismatch.fail.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/allocator_mismatch.fail.cpp @@ -11,7 +11,9 @@ #include -int main() +int main(int, char**) { std::forward_list > fl; + + return 0; } diff --git a/libcxx/test/std/containers/sequences/forwardlist/empty.fail.cpp b/libcxx/test/std/containers/sequences/forwardlist/empty.fail.cpp index effcc27335bc9..2ca3e024e661a 100644 --- a/libcxx/test/std/containers/sequences/forwardlist/empty.fail.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/empty.fail.cpp @@ -20,8 +20,10 @@ #include "test_macros.h" -int main () +int main(int, char**) { std::forward_list c; c.empty(); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} + + return 0; } diff --git a/libcxx/test/std/containers/sequences/forwardlist/empty.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/empty.pass.cpp index 6597c66ea29c3..727904c987133 100644 --- a/libcxx/test/std/containers/sequences/forwardlist/empty.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/empty.pass.cpp @@ -18,7 +18,7 @@ #include "test_macros.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::forward_list C; @@ -42,4 +42,6 @@ int main() assert(c.empty()); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.access/front.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.access/front.pass.cpp index 26bbdb61e6e3f..2509e9b2c4fa4 100644 --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.access/front.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.access/front.pass.cpp @@ -17,7 +17,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef int T; @@ -57,4 +57,6 @@ int main() assert(*c.begin() == 0); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/alloc.fail.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/alloc.fail.cpp index 2057286589c87..bf43ee82ca069 100644 --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/alloc.fail.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/alloc.fail.cpp @@ -16,7 +16,7 @@ #include "test_allocator.h" #include "../../../NotConstructible.h" -int main() +int main(int, char**) { { typedef test_allocator A; @@ -26,4 +26,6 @@ int main() assert(c.get_allocator() == A(12)); assert(c.empty()); } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/alloc.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/alloc.pass.cpp index b70b4e8a28995..c362e20515307 100644 --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/alloc.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/alloc.pass.cpp @@ -17,7 +17,7 @@ #include "../../../NotConstructible.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef test_allocator A; @@ -45,4 +45,6 @@ int main() assert(c.empty()); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/assign_copy.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/assign_copy.pass.cpp index 05a74d50df0f2..e40d405c9328c 100644 --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/assign_copy.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/assign_copy.pass.cpp @@ -17,7 +17,7 @@ #include "test_allocator.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef int T; @@ -142,4 +142,6 @@ int main() assert(c1.get_allocator() == A()); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/assign_init.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/assign_init.pass.cpp index 20ed6c51a8a19..40405dd2e7374 100644 --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/assign_init.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/assign_init.pass.cpp @@ -18,7 +18,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef int T; @@ -64,4 +64,6 @@ int main() assert(*i == 10+n); assert(n == 4); } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/assign_move.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/assign_move.pass.cpp index 24feee382edb5..36e4ea0ca0c5b 100644 --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/assign_move.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/assign_move.pass.cpp @@ -20,7 +20,7 @@ #include "MoveOnly.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef MoveOnly T; @@ -193,4 +193,6 @@ int main() assert(c1.get_allocator() == A()); assert(c0.empty()); } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/assign_op_init.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/assign_op_init.pass.cpp index 42f0a43b93297..14c098b660b0e 100644 --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/assign_op_init.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/assign_op_init.pass.cpp @@ -18,7 +18,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef int T; @@ -64,4 +64,6 @@ int main() assert(*i == 10+n); assert(n == 4); } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/assign_range.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/assign_range.pass.cpp index 098702b440766..c0b934445e0a5 100644 --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/assign_range.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/assign_range.pass.cpp @@ -18,7 +18,7 @@ #include "test_iterators.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef int T; @@ -74,4 +74,6 @@ int main() assert(n == 4); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/assign_size_value.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/assign_size_value.pass.cpp index ec8aadf38c78b..ea4cc811e4bfa 100644 --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/assign_size_value.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/assign_size_value.pass.cpp @@ -16,7 +16,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef int T; @@ -64,4 +64,6 @@ int main() assert(n == 4); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/copy.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/copy.pass.cpp index 551eebb440c8d..681629a2c5e34 100644 --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/copy.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/copy.pass.cpp @@ -18,7 +18,7 @@ #include "test_allocator.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef int T; @@ -64,4 +64,6 @@ int main() assert(c.get_allocator() == A()); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/copy_alloc.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/copy_alloc.pass.cpp index bfcb2b4905299..9788ca5ff6bac 100644 --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/copy_alloc.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/copy_alloc.pass.cpp @@ -17,7 +17,7 @@ #include "test_allocator.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef int T; @@ -63,4 +63,6 @@ int main() assert(c.get_allocator() == A()); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/deduct.fail.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/deduct.fail.cpp index 9c91a031f9919..cc146316ac1d7 100644 --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/deduct.fail.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/deduct.fail.cpp @@ -25,7 +25,7 @@ struct A {}; -int main() +int main(int, char**) { // Test the explicit deduction guides @@ -38,4 +38,6 @@ int main() // forward_list, allocator>> } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/deduct.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/deduct.pass.cpp index e4599d469ea03..fd49de5814e62 100644 --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/deduct.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/deduct.pass.cpp @@ -29,7 +29,7 @@ struct A {}; -int main() +int main(int, char**) { // Test the explicit deduction guides @@ -99,4 +99,6 @@ int main() static_assert(std::is_same_v>, ""); assert(std::distance(fwl.begin(), fwl.end()) == 0); // no size for forward_list } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/default.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/default.pass.cpp index 27eb1577c448b..1694faf466b24 100644 --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/default.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/default.pass.cpp @@ -15,7 +15,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef int T; @@ -37,4 +37,6 @@ int main() assert(c.empty()); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/default_noexcept.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/default_noexcept.pass.cpp index 9926369164645..f9363feb67b71 100644 --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/default_noexcept.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/default_noexcept.pass.cpp @@ -29,7 +29,7 @@ struct some_alloc some_alloc(const some_alloc&); }; -int main() +int main(int, char**) { #if defined(_LIBCPP_VERSION) { @@ -49,4 +49,6 @@ int main() typedef std::forward_list> C; static_assert(!std::is_nothrow_default_constructible::value, ""); } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/default_recursive.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/default_recursive.pass.cpp index ab61b04f93e0f..98b120f5350b9 100644 --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/default_recursive.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/default_recursive.pass.cpp @@ -19,6 +19,8 @@ struct X std::forward_list q; }; -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/dtor_noexcept.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/dtor_noexcept.pass.cpp index ce3d0f4379d6b..ba879964554ab 100644 --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/dtor_noexcept.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/dtor_noexcept.pass.cpp @@ -27,7 +27,7 @@ struct some_alloc ~some_alloc() noexcept(false); }; -int main() +int main(int, char**) { { typedef std::forward_list C; @@ -47,4 +47,6 @@ int main() static_assert(!std::is_nothrow_destructible::value, ""); } #endif // _LIBCPP_VERSION + + return 0; } diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/init.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/init.pass.cpp index ac4bcf4a518f6..fda636073a8f4 100644 --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/init.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/init.pass.cpp @@ -17,7 +17,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef int T; @@ -37,4 +37,6 @@ int main() assert(*i == n); assert(n == 10); } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/init_alloc.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/init_alloc.pass.cpp index 05a31877834a6..cdef7c07ef5df 100644 --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/init_alloc.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/init_alloc.pass.cpp @@ -18,7 +18,7 @@ #include "test_allocator.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef int T; @@ -42,4 +42,6 @@ int main() assert(n == 10); assert(c.get_allocator() == A()); } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/move.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/move.pass.cpp index 428fa04f14807..eedec348783bc 100644 --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/move.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/move.pass.cpp @@ -20,7 +20,7 @@ #include "MoveOnly.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef MoveOnly T; @@ -67,4 +67,6 @@ int main() assert(c0.empty()); assert(c.get_allocator() == A()); } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/move_alloc.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/move_alloc.pass.cpp index 9337b9b0548e1..7db6a41e85e72 100644 --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/move_alloc.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/move_alloc.pass.cpp @@ -20,7 +20,7 @@ #include "MoveOnly.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef MoveOnly T; @@ -67,4 +67,6 @@ int main() assert(c0.empty()); assert(c.get_allocator() == A()); } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/move_assign_noexcept.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/move_assign_noexcept.pass.cpp index 502ca930e599c..486c124af650b 100644 --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/move_assign_noexcept.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/move_assign_noexcept.pass.cpp @@ -31,7 +31,7 @@ struct some_alloc some_alloc(const some_alloc&); }; -int main() +int main(int, char**) { { typedef std::forward_list C; @@ -51,4 +51,6 @@ int main() static_assert(!std::is_nothrow_move_assignable::value, ""); } #endif // _LIBCPP_VERSION + + return 0; } diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/move_noexcept.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/move_noexcept.pass.cpp index ddd3cfe732713..5717bb8911895 100644 --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/move_noexcept.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/move_noexcept.pass.cpp @@ -29,7 +29,7 @@ struct some_alloc some_alloc(const some_alloc&); }; -int main() +int main(int, char**) { #if defined(_LIBCPP_VERSION) { @@ -49,4 +49,6 @@ int main() static_assert(!std::is_nothrow_move_constructible::value, ""); } #endif // _LIBCPP_VERSION + + return 0; } diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/range.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/range.pass.cpp index fb0ec74d6ebfc..ce9cd59d1a3ad 100644 --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/range.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/range.pass.cpp @@ -18,7 +18,7 @@ #include "test_iterators.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef int T; @@ -44,4 +44,6 @@ int main() assert(n == std::end(t) - std::begin(t)); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/range_alloc.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/range_alloc.pass.cpp index 30fe467fdeaa1..1a85d3feebec5 100644 --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/range_alloc.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/range_alloc.pass.cpp @@ -20,7 +20,7 @@ #include "test_iterators.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef int T; @@ -50,4 +50,6 @@ int main() assert(c.get_allocator() == A()); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/size.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/size.pass.cpp index 7514d263ed1a2..ca3931d107d55 100644 --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/size.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/size.pass.cpp @@ -33,7 +33,7 @@ void check_allocator(unsigned n, Allocator const &alloc = Allocator()) #endif } -int main() +int main(int, char**) { { // test that the ctor is explicit typedef std::forward_list C; @@ -70,4 +70,6 @@ int main() check_allocator> ( 3 ); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/size_value.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/size_value.pass.cpp index eee26298e3373..e3f247202d430 100644 --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/size_value.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/size_value.pass.cpp @@ -15,7 +15,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef int T; @@ -41,4 +41,6 @@ int main() assert(n == N); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/size_value_alloc.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/size_value_alloc.pass.cpp index 26b3f8c6f58f1..cc5394f5ab382 100644 --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/size_value_alloc.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/size_value_alloc.pass.cpp @@ -16,7 +16,7 @@ #include "test_allocator.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef test_allocator A; @@ -46,4 +46,6 @@ int main() assert(c.get_allocator() == A()); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.erasure/erase.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.erasure/erase.pass.cpp index 53e99b48c284e..68a26fbc704ff 100644 --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.erasure/erase.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.erasure/erase.pass.cpp @@ -66,7 +66,7 @@ void test() test0(S({1,2,1}), opt(3), S({1,2,1})); } -int main() +int main(int, char**) { test>(); test>> (); @@ -74,4 +74,6 @@ int main() test>(); test>(); + + return 0; } diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.erasure/erase_if.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.erasure/erase_if.pass.cpp index e3e8575403e8e..b2106b8c8de45 100644 --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.erasure/erase_if.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.erasure/erase_if.pass.cpp @@ -66,7 +66,7 @@ void test() test0(S({1,2,3}), False, S({1,2,3})); } -int main() +int main(int, char**) { test>(); test>> (); @@ -74,4 +74,6 @@ int main() test>(); test>(); + + return 0; } diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.iter/before_begin.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.iter/before_begin.pass.cpp index 726051b8e0f4a..638a78327df0d 100644 --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.iter/before_begin.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.iter/before_begin.pass.cpp @@ -18,7 +18,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef int T; @@ -100,4 +100,6 @@ int main() assert(std::distance(i, c.end()) == 11); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.iter/iterators.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.iter/iterators.pass.cpp index 25c2c312bf4b4..e5441109bf373 100644 --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.iter/iterators.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.iter/iterators.pass.cpp @@ -22,7 +22,7 @@ #include "test_macros.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef int T; @@ -142,4 +142,6 @@ int main() // assert ( ii1 != c.end()); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/clear.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/clear.pass.cpp index 5f7ac62c445d5..8ed29ec5afd30 100644 --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/clear.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/clear.pass.cpp @@ -17,7 +17,7 @@ #include "../../../NotConstructible.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef NotConstructible T; @@ -63,4 +63,6 @@ int main() assert(distance(c.begin(), c.end()) == 0); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/emplace_after.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/emplace_after.pass.cpp index 70e7d248fadcf..f2581239824ae 100644 --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/emplace_after.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/emplace_after.pass.cpp @@ -19,7 +19,7 @@ #include "../../../Emplaceable.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef Emplaceable T; @@ -83,4 +83,6 @@ int main() assert(*next(c.begin(), 3) == Emplaceable(2, 3.5)); assert(distance(c.begin(), c.end()) == 4); } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/emplace_front.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/emplace_front.pass.cpp index 121e0178c1c88..1669e0c5c12a3 100644 --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/emplace_front.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/emplace_front.pass.cpp @@ -21,7 +21,7 @@ #include "../../../Emplaceable.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef Emplaceable T; @@ -67,4 +67,6 @@ int main() assert(*next(c.begin()) == Emplaceable()); assert(distance(c.begin(), c.end()) == 2); } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/erase_after_many.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/erase_after_many.pass.cpp index 419ce6891d46e..0a431a8965d46 100644 --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/erase_after_many.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/erase_after_many.pass.cpp @@ -15,7 +15,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef int T; @@ -151,4 +151,6 @@ int main() assert(distance(c.begin(), c.end()) == 0); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/erase_after_one.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/erase_after_one.pass.cpp index 563be1739b1e4..59e687f6c4c3d 100644 --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/erase_after_one.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/erase_after_one.pass.cpp @@ -15,7 +15,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef int T; @@ -93,4 +93,6 @@ int main() assert(distance(c.begin(), c.end()) == 0); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/insert_after_const.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/insert_after_const.pass.cpp index bfc8c04f19f24..3ba4f9e23f190 100644 --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/insert_after_const.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/insert_after_const.pass.cpp @@ -15,7 +15,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef int T; @@ -83,4 +83,6 @@ int main() assert(distance(c.begin(), c.end()) == 4); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/insert_after_init.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/insert_after_init.pass.cpp index 1782bc7fdc0ef..be5c6e5176cf2 100644 --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/insert_after_init.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/insert_after_init.pass.cpp @@ -17,7 +17,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef int T; @@ -69,4 +69,6 @@ int main() assert(*next(c.begin(), 3) == 1); assert(*next(c.begin(), 4) == 2); } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/insert_after_range.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/insert_after_range.pass.cpp index 8ad42aced00fd..4cbc92edd7437 100644 --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/insert_after_range.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/insert_after_range.pass.cpp @@ -18,7 +18,7 @@ #include "test_iterators.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef int T; @@ -76,4 +76,6 @@ int main() assert(*next(c.begin(), 4) == 2); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/insert_after_rv.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/insert_after_rv.pass.cpp index 2aa254bbf6a30..2495a707a9829 100644 --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/insert_after_rv.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/insert_after_rv.pass.cpp @@ -18,7 +18,7 @@ #include "MoveOnly.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef MoveOnly T; @@ -84,4 +84,6 @@ int main() assert(*next(c.begin(), 3) == 2); assert(distance(c.begin(), c.end()) == 4); } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/insert_after_size_value.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/insert_after_size_value.pass.cpp index e1927945af15a..7898fea9219ad 100644 --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/insert_after_size_value.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/insert_after_size_value.pass.cpp @@ -15,7 +15,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef int T; @@ -69,4 +69,6 @@ int main() assert(*next(c.begin(), 4) == 3); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/pop_front.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/pop_front.pass.cpp index 40b092e7697d9..d28f10e81923b 100644 --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/pop_front.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/pop_front.pass.cpp @@ -16,7 +16,7 @@ #include "MoveOnly.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef int T; @@ -70,4 +70,6 @@ int main() assert(distance(c.begin(), c.end()) == 0); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/push_front_const.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/push_front_const.pass.cpp index 15e3bfbc18468..192227ee2b11d 100644 --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/push_front_const.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/push_front_const.pass.cpp @@ -15,7 +15,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef int T; @@ -43,4 +43,6 @@ int main() assert(distance(c.begin(), c.end()) == 2); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/push_front_exception_safety.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/push_front_exception_safety.pass.cpp index 3015abb76db68..8b122f1f937be 100644 --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/push_front_exception_safety.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/push_front_exception_safety.pass.cpp @@ -57,7 +57,7 @@ CMyClass::~CMyClass() { assert(fMagicValue == kFinishedConstructionMagicValue); } -int main() +int main(int, char**) { CMyClass instance; std::forward_list vec; @@ -70,4 +70,6 @@ int main() } catch (...) { } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/push_front_rv.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/push_front_rv.pass.cpp index e768cd0aec30f..268101671cb55 100644 --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/push_front_rv.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/push_front_rv.pass.cpp @@ -18,7 +18,7 @@ #include "MoveOnly.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef MoveOnly T; @@ -44,4 +44,6 @@ int main() assert(*next(c.begin()) == 1); assert(distance(c.begin(), c.end()) == 2); } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/resize_size.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/resize_size.pass.cpp index b79e4fd36e7d9..ed2de98007293 100644 --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/resize_size.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/resize_size.pass.cpp @@ -16,7 +16,7 @@ #include "DefaultOnly.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef DefaultOnly T; @@ -110,4 +110,6 @@ int main() assert(*next(c.begin(), 5) == 0); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/resize_size_value.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/resize_size_value.pass.cpp index 30f99ab9670e4..f6f4027e0fc66 100644 --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/resize_size_value.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/resize_size_value.pass.cpp @@ -21,7 +21,7 @@ #include "container_test_types.h" #endif -int main() +int main(int, char**) { { typedef int T; @@ -98,4 +98,6 @@ int main() } } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/merge.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/merge.pass.cpp index c2e32a754ee95..5a55ae963de36 100644 --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/merge.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/merge.pass.cpp @@ -16,7 +16,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef int T; @@ -44,4 +44,6 @@ int main() assert(c1 == c3); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/merge_pred.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/merge_pred.pass.cpp index 6656f9191ae1a..3de61a37f7253 100644 --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/merge_pred.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/merge_pred.pass.cpp @@ -17,7 +17,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef int T; @@ -45,4 +45,6 @@ int main() assert(c1 == c3); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/remove.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/remove.pass.cpp index fec75668a6561..ca3ec253da326 100644 --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/remove.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/remove.pass.cpp @@ -27,7 +27,7 @@ struct S { }; -int main() +int main(int, char**) { { typedef int T; @@ -151,4 +151,6 @@ int main() assert(c1 == c2); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/remove_if.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/remove_if.pass.cpp index 45a12e7e86482..1b18337bc9934 100644 --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/remove_if.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/remove_if.pass.cpp @@ -24,7 +24,7 @@ bool g(int i) return i < 3; } -int main() +int main(int, char**) { { typedef int T; @@ -152,4 +152,6 @@ int main() assert(cp.count() == static_cast(std::distance(std::begin(t1), std::end(t1)))); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/reverse.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/reverse.pass.cpp index e9fe3cae68ac1..82b6813fff082 100644 --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/reverse.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/reverse.pass.cpp @@ -30,7 +30,7 @@ void test(int N) assert(*j == i); } -int main() +int main(int, char**) { for (int i = 0; i < 10; ++i) test >(i); @@ -38,4 +38,6 @@ int main() for (int i = 0; i < 10; ++i) test> >(i); #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/sort.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/sort.pass.cpp index 239e5f129d678..c76fe03ec1a32 100644 --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/sort.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/sort.pass.cpp @@ -38,7 +38,7 @@ void test(int N) assert(*j == i); } -int main() +int main(int, char**) { for (int i = 0; i < 40; ++i) test >(i); @@ -46,4 +46,6 @@ int main() for (int i = 0; i < 40; ++i) test> >(i); #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/sort_pred.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/sort_pred.pass.cpp index d7e127bf48132..971508ac4103d 100644 --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/sort_pred.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/sort_pred.pass.cpp @@ -39,7 +39,7 @@ void test(int N) assert(*j == N-1-i); } -int main() +int main(int, char**) { for (int i = 0; i < 40; ++i) test >(i); @@ -47,4 +47,6 @@ int main() for (int i = 0; i < 40; ++i) test> >(i); #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/splice_after_flist.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/splice_after_flist.pass.cpp index 6b57b3189749e..e883aee2ce4be 100644 --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/splice_after_flist.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/splice_after_flist.pass.cpp @@ -38,7 +38,7 @@ testd(const C& c, int p, int l) assert(distance(c.begin(), c.end()) == size_t1 + l); } -int main() +int main(int, char**) { { // splicing different containers @@ -72,4 +72,6 @@ int main() } } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/splice_after_one.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/splice_after_one.pass.cpp index a192627d8d18c..87b2f60e1ad04 100644 --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/splice_after_one.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/splice_after_one.pass.cpp @@ -75,7 +75,7 @@ tests(const C& c, int p, int f) assert(distance(c.begin(), c.end()) == size_t1); } -int main() +int main(int, char**) { { // splicing different containers @@ -137,4 +137,6 @@ int main() } } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/splice_after_range.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/splice_after_range.pass.cpp index c836a8bfe6142..32050076c0366 100644 --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/splice_after_range.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/splice_after_range.pass.cpp @@ -75,7 +75,7 @@ tests(const C& c, int p, int f, int l) assert(distance(c.begin(), c.end()) == size_t1); } -int main() +int main(int, char**) { { // splicing different containers @@ -165,4 +165,6 @@ int main() } } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/unique.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/unique.pass.cpp index ccb0f9a8631ab..07a4eae97b0d6 100644 --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/unique.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/unique.pass.cpp @@ -16,7 +16,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef int T; @@ -116,4 +116,6 @@ int main() assert(c1 == c2); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/unique_pred.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/unique_pred.pass.cpp index 1d4a9a0f3ce95..87db88080fc98 100644 --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/unique_pred.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/unique_pred.pass.cpp @@ -21,7 +21,7 @@ bool g(int x, int y) return x == y; } -int main() +int main(int, char**) { { typedef int T; @@ -121,4 +121,6 @@ int main() assert(c1 == c2); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.spec/equal.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.spec/equal.pass.cpp index 9f01fed66465a..a727487ed0d9c 100644 --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.spec/equal.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.spec/equal.pass.cpp @@ -47,7 +47,7 @@ void test(int N, int M) } } -int main() +int main(int, char**) { for (int i = 0; i < 10; ++i) for (int j = 0; j < 10; ++j) @@ -57,4 +57,6 @@ int main() for (int j = 0; j < 10; ++j) test> >(i, j); #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.spec/member_swap.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.spec/member_swap.pass.cpp index 242a00bd86089..5e0438c62bfe4 100644 --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.spec/member_swap.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.spec/member_swap.pass.cpp @@ -17,7 +17,7 @@ #include "test_allocator.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef int T; @@ -256,4 +256,6 @@ int main() assert(c2.get_allocator() == A()); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.spec/non_member_swap.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.spec/non_member_swap.pass.cpp index 44820d9d304e8..5b9b590d55512 100644 --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.spec/non_member_swap.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.spec/non_member_swap.pass.cpp @@ -18,7 +18,7 @@ #include "test_allocator.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef int T; @@ -257,4 +257,6 @@ int main() assert(c2.get_allocator() == A()); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.spec/relational.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.spec/relational.pass.cpp index e65e064ffdafc..29a180a966124 100644 --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.spec/relational.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.spec/relational.pass.cpp @@ -52,7 +52,7 @@ void test(int N, int M) assert(c1 > c2); } -int main() +int main(int, char**) { for (int i = 0; i < 10; ++i) for (int j = 0; j < 10; ++j) @@ -62,4 +62,6 @@ int main() for (int j = 0; j < 10; ++j) test> >(i, j); #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.spec/swap_noexcept.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.spec/swap_noexcept.pass.cpp index ae48d1a4b95c5..6247954958457 100644 --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.spec/swap_noexcept.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.spec/swap_noexcept.pass.cpp @@ -53,7 +53,7 @@ struct some_alloc2 typedef std::true_type is_always_equal; }; -int main() +int main(int, char**) { { typedef std::forward_list C; @@ -85,4 +85,6 @@ int main() static_assert( noexcept(swap(std::declval(), std::declval())), ""); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/forwardlist/incomplete.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/incomplete.pass.cpp index fd789b8c895ff..2bdfad777e8df 100644 --- a/libcxx/test/std/containers/sequences/forwardlist/incomplete.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/incomplete.pass.cpp @@ -33,7 +33,7 @@ struct B { }; #endif -int main() +int main(int, char**) { { A a; @@ -49,4 +49,6 @@ int main() b.it2 = b.d.cbefore_begin(); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/forwardlist/max_size.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/max_size.pass.cpp index 6b93a3db60b0e..08d21d641163f 100644 --- a/libcxx/test/std/containers/sequences/forwardlist/max_size.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/max_size.pass.cpp @@ -18,7 +18,7 @@ #include "test_allocator.h" #include "test_macros.h" -int main() +int main(int, char**) { { typedef limited_allocator A; @@ -44,4 +44,6 @@ int main() assert(c.max_size() <= max_dist); assert(c.max_size() <= alloc_max_size(c.get_allocator())); } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/forwardlist/types.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/types.pass.cpp index ff6c10e46308d..01a7db039d46f 100644 --- a/libcxx/test/std/containers/sequences/forwardlist/types.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/types.pass.cpp @@ -31,7 +31,7 @@ struct A { std::forward_list v; }; // incomplete type support -int main() +int main(int, char**) { { typedef std::forward_list C; @@ -72,4 +72,6 @@ int main() typename std::iterator_traits::difference_type>::value), ""); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/list/allocator_mismatch.fail.cpp b/libcxx/test/std/containers/sequences/list/allocator_mismatch.fail.cpp index 002954b4480f4..39dcde477c291 100644 --- a/libcxx/test/std/containers/sequences/list/allocator_mismatch.fail.cpp +++ b/libcxx/test/std/containers/sequences/list/allocator_mismatch.fail.cpp @@ -11,7 +11,9 @@ #include -int main() +int main(int, char**) { std::list > l; + + return 0; } diff --git a/libcxx/test/std/containers/sequences/list/incomplete_type.pass.cpp b/libcxx/test/std/containers/sequences/list/incomplete_type.pass.cpp index 04b04d0bc2f7d..e68f06176b7b5 100644 --- a/libcxx/test/std/containers/sequences/list/incomplete_type.pass.cpp +++ b/libcxx/test/std/containers/sequences/list/incomplete_type.pass.cpp @@ -21,6 +21,8 @@ struct A { std::list::const_reverse_iterator crit; }; -int main() { +int main(int, char**) { A a; + + return 0; } diff --git a/libcxx/test/std/containers/sequences/list/iterators.pass.cpp b/libcxx/test/std/containers/sequences/list/iterators.pass.cpp index 89cc3932d56f2..0fe92dfba694f 100644 --- a/libcxx/test/std/containers/sequences/list/iterators.pass.cpp +++ b/libcxx/test/std/containers/sequences/list/iterators.pass.cpp @@ -28,7 +28,7 @@ struct A int second; }; -int main() +int main(int, char**) { { typedef int T; @@ -152,4 +152,6 @@ int main() } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/list/list.capacity/empty.fail.cpp b/libcxx/test/std/containers/sequences/list/list.capacity/empty.fail.cpp index 99325fcb67a9b..0cbaa464d4a1d 100644 --- a/libcxx/test/std/containers/sequences/list/list.capacity/empty.fail.cpp +++ b/libcxx/test/std/containers/sequences/list/list.capacity/empty.fail.cpp @@ -20,8 +20,10 @@ #include "test_macros.h" -int main () +int main(int, char**) { std::list c; c.empty(); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} + + return 0; } diff --git a/libcxx/test/std/containers/sequences/list/list.capacity/empty.pass.cpp b/libcxx/test/std/containers/sequences/list/list.capacity/empty.pass.cpp index 27bd73e88459d..7619ec50853ad 100644 --- a/libcxx/test/std/containers/sequences/list/list.capacity/empty.pass.cpp +++ b/libcxx/test/std/containers/sequences/list/list.capacity/empty.pass.cpp @@ -18,7 +18,7 @@ #include "test_macros.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::list C; @@ -42,4 +42,6 @@ int main() assert(c.empty()); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/list/list.capacity/max_size.pass.cpp b/libcxx/test/std/containers/sequences/list/list.capacity/max_size.pass.cpp index e3da37d739798..8560a6a87f05f 100644 --- a/libcxx/test/std/containers/sequences/list/list.capacity/max_size.pass.cpp +++ b/libcxx/test/std/containers/sequences/list/list.capacity/max_size.pass.cpp @@ -18,7 +18,7 @@ #include "test_allocator.h" #include "test_macros.h" -int main() { +int main(int, char**) { { typedef limited_allocator A; typedef std::list C; @@ -43,4 +43,6 @@ int main() { assert(c.max_size() <= max_dist); assert(c.max_size() <= alloc_max_size(c.get_allocator())); } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/list/list.capacity/resize_size.pass.cpp b/libcxx/test/std/containers/sequences/list/list.capacity/resize_size.pass.cpp index 04476900dd0e2..3c9e240d7523b 100644 --- a/libcxx/test/std/containers/sequences/list/list.capacity/resize_size.pass.cpp +++ b/libcxx/test/std/containers/sequences/list/list.capacity/resize_size.pass.cpp @@ -15,7 +15,7 @@ #include "DefaultOnly.h" #include "min_allocator.h" -int main() +int main(int, char**) { { std::list l(5, 2); @@ -77,4 +77,6 @@ int main() } #endif // __LIBCPP_MOVE #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/list/list.capacity/resize_size_value.pass.cpp b/libcxx/test/std/containers/sequences/list/list.capacity/resize_size_value.pass.cpp index 404bb0c1b65cf..db1c1419cca90 100644 --- a/libcxx/test/std/containers/sequences/list/list.capacity/resize_size_value.pass.cpp +++ b/libcxx/test/std/containers/sequences/list/list.capacity/resize_size_value.pass.cpp @@ -15,7 +15,7 @@ #include "DefaultOnly.h" #include "min_allocator.h" -int main() +int main(int, char**) { { std::list l(5, 2); @@ -49,4 +49,6 @@ int main() assert(l.back() == 3.5); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/list/list.capacity/size.pass.cpp b/libcxx/test/std/containers/sequences/list/list.capacity/size.pass.cpp index b28b6572f9e05..d4801e76c2255 100644 --- a/libcxx/test/std/containers/sequences/list/list.capacity/size.pass.cpp +++ b/libcxx/test/std/containers/sequences/list/list.capacity/size.pass.cpp @@ -18,7 +18,7 @@ #include "test_macros.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::list C; @@ -58,4 +58,6 @@ int main() assert(c.size() == 0); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/list/list.cons/assign_copy.pass.cpp b/libcxx/test/std/containers/sequences/list/list.cons/assign_copy.pass.cpp index c4493cac7875a..91ac1cfa6aa4f 100644 --- a/libcxx/test/std/containers/sequences/list/list.cons/assign_copy.pass.cpp +++ b/libcxx/test/std/containers/sequences/list/list.cons/assign_copy.pass.cpp @@ -15,7 +15,7 @@ #include "test_allocator.h" #include "min_allocator.h" -int main() +int main(int, char**) { { std::list > l(3, 2, test_allocator(5)); @@ -40,4 +40,6 @@ int main() assert(l2.get_allocator() == min_allocator()); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/list/list.cons/assign_initializer_list.pass.cpp b/libcxx/test/std/containers/sequences/list/list.cons/assign_initializer_list.pass.cpp index 80d5ad074a904..54c91ae4a12cc 100644 --- a/libcxx/test/std/containers/sequences/list/list.cons/assign_initializer_list.pass.cpp +++ b/libcxx/test/std/containers/sequences/list/list.cons/assign_initializer_list.pass.cpp @@ -17,7 +17,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { std::list d; @@ -39,4 +39,6 @@ int main() assert(*i++ == 5); assert(*i++ == 6); } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/list/list.cons/assign_move.pass.cpp b/libcxx/test/std/containers/sequences/list/list.cons/assign_move.pass.cpp index 7400ba5ca3f4b..1e826ed911503 100644 --- a/libcxx/test/std/containers/sequences/list/list.cons/assign_move.pass.cpp +++ b/libcxx/test/std/containers/sequences/list/list.cons/assign_move.pass.cpp @@ -18,7 +18,7 @@ #include "test_allocator.h" #include "min_allocator.h" -int main() +int main(int, char**) { { std::list > l(test_allocator(5)); @@ -76,4 +76,6 @@ int main() assert(l.empty()); assert(l2.get_allocator() == lo.get_allocator()); } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/list/list.cons/copy.pass.cpp b/libcxx/test/std/containers/sequences/list/list.cons/copy.pass.cpp index 68b2e9d16f413..153cd2dbc96b6 100644 --- a/libcxx/test/std/containers/sequences/list/list.cons/copy.pass.cpp +++ b/libcxx/test/std/containers/sequences/list/list.cons/copy.pass.cpp @@ -18,7 +18,7 @@ #include "test_allocator.h" #include "min_allocator.h" -int main() +int main(int, char**) { { std::list l(3, 2); @@ -50,4 +50,6 @@ int main() assert(l2.get_allocator() == l.get_allocator()); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/list/list.cons/copy_alloc.pass.cpp b/libcxx/test/std/containers/sequences/list/list.cons/copy_alloc.pass.cpp index b722c40e602ab..14e9585022560 100644 --- a/libcxx/test/std/containers/sequences/list/list.cons/copy_alloc.pass.cpp +++ b/libcxx/test/std/containers/sequences/list/list.cons/copy_alloc.pass.cpp @@ -16,7 +16,7 @@ #include "test_allocator.h" #include "min_allocator.h" -int main() +int main(int, char**) { { std::list > l(3, 2, test_allocator(5)); @@ -38,4 +38,6 @@ int main() assert(l2.get_allocator() == min_allocator()); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/list/list.cons/deduct.fail.cpp b/libcxx/test/std/containers/sequences/list/list.cons/deduct.fail.cpp index 6d9833b5f87b8..36982263dfced 100644 --- a/libcxx/test/std/containers/sequences/list/list.cons/deduct.fail.cpp +++ b/libcxx/test/std/containers/sequences/list/list.cons/deduct.fail.cpp @@ -25,7 +25,7 @@ struct A {}; -int main() +int main(int, char**) { // Test the explicit deduction guides @@ -38,4 +38,6 @@ int main() // deque, allocator>> } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/list/list.cons/deduct.pass.cpp b/libcxx/test/std/containers/sequences/list/list.cons/deduct.pass.cpp index 20c017500e00d..03d3f38187e48 100644 --- a/libcxx/test/std/containers/sequences/list/list.cons/deduct.pass.cpp +++ b/libcxx/test/std/containers/sequences/list/list.cons/deduct.pass.cpp @@ -29,7 +29,7 @@ struct A {}; -int main() +int main(int, char**) { // Test the explicit deduction guides @@ -99,4 +99,6 @@ int main() static_assert(std::is_same_v>, ""); assert(lst.size() == 0); } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/list/list.cons/default.pass.cpp b/libcxx/test/std/containers/sequences/list/list.cons/default.pass.cpp index ffbfa0b21dc1f..348390c458607 100644 --- a/libcxx/test/std/containers/sequences/list/list.cons/default.pass.cpp +++ b/libcxx/test/std/containers/sequences/list/list.cons/default.pass.cpp @@ -15,7 +15,7 @@ #include "DefaultOnly.h" #include "min_allocator.h" -int main() +int main(int, char**) { { std::list l; @@ -64,4 +64,6 @@ int main() assert(std::distance(l.begin(), l.end()) == 0); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/list/list.cons/default_noexcept.pass.cpp b/libcxx/test/std/containers/sequences/list/list.cons/default_noexcept.pass.cpp index b41f7320d0fbd..93951e963618c 100644 --- a/libcxx/test/std/containers/sequences/list/list.cons/default_noexcept.pass.cpp +++ b/libcxx/test/std/containers/sequences/list/list.cons/default_noexcept.pass.cpp @@ -29,7 +29,7 @@ struct some_alloc some_alloc(const some_alloc&); }; -int main() +int main(int, char**) { #if defined(_LIBCPP_VERSION) { @@ -49,4 +49,6 @@ int main() typedef std::list> C; static_assert(!std::is_nothrow_default_constructible::value, ""); } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/list/list.cons/default_stack_alloc.pass.cpp b/libcxx/test/std/containers/sequences/list/list.cons/default_stack_alloc.pass.cpp index 1596a4e44b2e8..2e0b5203b8e97 100644 --- a/libcxx/test/std/containers/sequences/list/list.cons/default_stack_alloc.pass.cpp +++ b/libcxx/test/std/containers/sequences/list/list.cons/default_stack_alloc.pass.cpp @@ -15,7 +15,7 @@ #include "test_allocator.h" #include "min_allocator.h" -int main() +int main(int, char**) { { std::list l; @@ -44,4 +44,6 @@ int main() assert(std::distance(l.begin(), l.end()) == 0); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/list/list.cons/dtor_noexcept.pass.cpp b/libcxx/test/std/containers/sequences/list/list.cons/dtor_noexcept.pass.cpp index 64894dc38ddf2..62af49e639aa0 100644 --- a/libcxx/test/std/containers/sequences/list/list.cons/dtor_noexcept.pass.cpp +++ b/libcxx/test/std/containers/sequences/list/list.cons/dtor_noexcept.pass.cpp @@ -27,7 +27,7 @@ struct some_alloc ~some_alloc() noexcept(false); }; -int main() +int main(int, char**) { { typedef std::list C; @@ -47,4 +47,6 @@ int main() static_assert(!std::is_nothrow_destructible::value, ""); } #endif // _LIBCPP_VERSION + + return 0; } diff --git a/libcxx/test/std/containers/sequences/list/list.cons/initializer_list.pass.cpp b/libcxx/test/std/containers/sequences/list/list.cons/initializer_list.pass.cpp index 61a277395e5ca..bd4ffeb137134 100644 --- a/libcxx/test/std/containers/sequences/list/list.cons/initializer_list.pass.cpp +++ b/libcxx/test/std/containers/sequences/list/list.cons/initializer_list.pass.cpp @@ -17,7 +17,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { std::list d = {3, 4, 5, 6}; @@ -37,4 +37,6 @@ int main() assert(*i++ == 5); assert(*i++ == 6); } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/list/list.cons/initializer_list_alloc.pass.cpp b/libcxx/test/std/containers/sequences/list/list.cons/initializer_list_alloc.pass.cpp index ec560ef8d34c7..f6eca2112e1d5 100644 --- a/libcxx/test/std/containers/sequences/list/list.cons/initializer_list_alloc.pass.cpp +++ b/libcxx/test/std/containers/sequences/list/list.cons/initializer_list_alloc.pass.cpp @@ -18,7 +18,7 @@ #include "test_allocator.h" #include "min_allocator.h" -int main() +int main(int, char**) { { std::list> d({3, 4, 5, 6}, test_allocator(3)); @@ -40,4 +40,6 @@ int main() assert(*i++ == 5); assert(*i++ == 6); } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/list/list.cons/input_iterator.pass.cpp b/libcxx/test/std/containers/sequences/list/list.cons/input_iterator.pass.cpp index ef6e11b25f130..f7491f4501f78 100644 --- a/libcxx/test/std/containers/sequences/list/list.cons/input_iterator.pass.cpp +++ b/libcxx/test/std/containers/sequences/list/list.cons/input_iterator.pass.cpp @@ -244,10 +244,12 @@ void test_ctor_under_alloc_with_alloc() { -int main() { +int main(int, char**) { basic_test(); test_emplacable_concept(); test_emplacable_concept_with_alloc(); test_ctor_under_alloc(); test_ctor_under_alloc_with_alloc(); + + return 0; } diff --git a/libcxx/test/std/containers/sequences/list/list.cons/move.pass.cpp b/libcxx/test/std/containers/sequences/list/list.cons/move.pass.cpp index 9ad55ecdb012b..a79a3723231cf 100644 --- a/libcxx/test/std/containers/sequences/list/list.cons/move.pass.cpp +++ b/libcxx/test/std/containers/sequences/list/list.cons/move.pass.cpp @@ -18,7 +18,7 @@ #include "test_allocator.h" #include "min_allocator.h" -int main() +int main(int, char**) { { std::list > l(test_allocator(5)); @@ -59,4 +59,6 @@ int main() assert(l.empty()); assert(l2.get_allocator() == lo.get_allocator()); } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/list/list.cons/move_alloc.pass.cpp b/libcxx/test/std/containers/sequences/list/list.cons/move_alloc.pass.cpp index 80ef7cdde0aa4..d18ea2c4a0f4f 100644 --- a/libcxx/test/std/containers/sequences/list/list.cons/move_alloc.pass.cpp +++ b/libcxx/test/std/containers/sequences/list/list.cons/move_alloc.pass.cpp @@ -18,7 +18,7 @@ #include "test_allocator.h" #include "min_allocator.h" -int main() +int main(int, char**) { { std::list > l(test_allocator(5)); @@ -72,4 +72,6 @@ int main() assert(l.empty()); assert(l2.get_allocator() == min_allocator()); } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/list/list.cons/move_assign_noexcept.pass.cpp b/libcxx/test/std/containers/sequences/list/list.cons/move_assign_noexcept.pass.cpp index b12e3d9e3b71e..c6c714595b4eb 100644 --- a/libcxx/test/std/containers/sequences/list/list.cons/move_assign_noexcept.pass.cpp +++ b/libcxx/test/std/containers/sequences/list/list.cons/move_assign_noexcept.pass.cpp @@ -31,7 +31,7 @@ struct some_alloc some_alloc(const some_alloc&); }; -int main() +int main(int, char**) { { typedef std::list C; @@ -51,4 +51,6 @@ int main() static_assert(!std::is_nothrow_move_assignable::value, ""); } #endif // _LIBCPP_VERSION + + return 0; } diff --git a/libcxx/test/std/containers/sequences/list/list.cons/move_noexcept.pass.cpp b/libcxx/test/std/containers/sequences/list/list.cons/move_noexcept.pass.cpp index 1b40bbdff25e1..43abd019ad4d3 100644 --- a/libcxx/test/std/containers/sequences/list/list.cons/move_noexcept.pass.cpp +++ b/libcxx/test/std/containers/sequences/list/list.cons/move_noexcept.pass.cpp @@ -29,7 +29,7 @@ struct some_alloc some_alloc(const some_alloc&); }; -int main() +int main(int, char**) { #if defined(_LIBCPP_VERSION) { @@ -49,4 +49,6 @@ int main() typedef std::list> C; static_assert(!std::is_nothrow_move_constructible::value, ""); } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/list/list.cons/op_equal_initializer_list.pass.cpp b/libcxx/test/std/containers/sequences/list/list.cons/op_equal_initializer_list.pass.cpp index b0d6a374e1c9b..58ea88f431506 100644 --- a/libcxx/test/std/containers/sequences/list/list.cons/op_equal_initializer_list.pass.cpp +++ b/libcxx/test/std/containers/sequences/list/list.cons/op_equal_initializer_list.pass.cpp @@ -16,7 +16,7 @@ #include #include "min_allocator.h" -int main() +int main(int, char**) { { std::list d; @@ -38,4 +38,6 @@ int main() assert(*i++ == 5); assert(*i++ == 6); } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/list/list.cons/size_type.pass.cpp b/libcxx/test/std/containers/sequences/list/list.cons/size_type.pass.cpp index f11d617e134f9..ef365d09fd435 100644 --- a/libcxx/test/std/containers/sequences/list/list.cons/size_type.pass.cpp +++ b/libcxx/test/std/containers/sequences/list/list.cons/size_type.pass.cpp @@ -37,7 +37,7 @@ test3(unsigned n, Allocator const &alloc = Allocator()) } -int main() +int main(int, char**) { { std::list l(3); @@ -100,4 +100,6 @@ int main() assert(std::distance(l.begin(), l.end()) == 3); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/list/list.cons/size_value_alloc.pass.cpp b/libcxx/test/std/containers/sequences/list/list.cons/size_value_alloc.pass.cpp index 25b3425abe3ca..282de37bbc536 100644 --- a/libcxx/test/std/containers/sequences/list/list.cons/size_value_alloc.pass.cpp +++ b/libcxx/test/std/containers/sequences/list/list.cons/size_value_alloc.pass.cpp @@ -16,7 +16,7 @@ #include "test_allocator.h" #include "min_allocator.h" -int main() +int main(int, char**) { { std::list l(3, 2); @@ -76,4 +76,6 @@ int main() assert(*i == 2); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/list/list.erasure/erase.pass.cpp b/libcxx/test/std/containers/sequences/list/list.erasure/erase.pass.cpp index 6f0b5fc892541..9c03c72824870 100644 --- a/libcxx/test/std/containers/sequences/list/list.erasure/erase.pass.cpp +++ b/libcxx/test/std/containers/sequences/list/list.erasure/erase.pass.cpp @@ -66,7 +66,7 @@ void test() test0(S({1,2,1}), opt(3), S({1,2,1})); } -int main() +int main(int, char**) { test>(); test>> (); @@ -74,4 +74,6 @@ int main() test>(); test>(); + + return 0; } diff --git a/libcxx/test/std/containers/sequences/list/list.erasure/erase_if.pass.cpp b/libcxx/test/std/containers/sequences/list/list.erasure/erase_if.pass.cpp index 152f666331541..f25d3e830f2e8 100644 --- a/libcxx/test/std/containers/sequences/list/list.erasure/erase_if.pass.cpp +++ b/libcxx/test/std/containers/sequences/list/list.erasure/erase_if.pass.cpp @@ -66,7 +66,7 @@ void test() test0(S({1,2,3}), False, S({1,2,3})); } -int main() +int main(int, char**) { test>(); test>> (); @@ -74,4 +74,6 @@ int main() test>(); test>(); + + return 0; } diff --git a/libcxx/test/std/containers/sequences/list/list.modifiers/clear.pass.cpp b/libcxx/test/std/containers/sequences/list/list.modifiers/clear.pass.cpp index ba9e413e52af7..0afd0a5483512 100644 --- a/libcxx/test/std/containers/sequences/list/list.modifiers/clear.pass.cpp +++ b/libcxx/test/std/containers/sequences/list/list.modifiers/clear.pass.cpp @@ -16,7 +16,7 @@ #include "test_macros.h" #include "min_allocator.h" -int main() +int main(int, char**) { { int a[] = {1, 2, 3}; @@ -34,4 +34,6 @@ int main() assert(c.empty()); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/list/list.modifiers/emplace.pass.cpp b/libcxx/test/std/containers/sequences/list/list.modifiers/emplace.pass.cpp index 5183cd9a7f2a9..642e8434221c4 100644 --- a/libcxx/test/std/containers/sequences/list/list.modifiers/emplace.pass.cpp +++ b/libcxx/test/std/containers/sequences/list/list.modifiers/emplace.pass.cpp @@ -34,7 +34,7 @@ class A double getd() const {return d_;} }; -int main() +int main(int, char**) { { std::list c; @@ -63,4 +63,6 @@ int main() assert(c.back().getd() == 4.5); } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/list/list.modifiers/emplace_back.pass.cpp b/libcxx/test/std/containers/sequences/list/list.modifiers/emplace_back.pass.cpp index ca428ec65064d..b7eaa7047bd8e 100644 --- a/libcxx/test/std/containers/sequences/list/list.modifiers/emplace_back.pass.cpp +++ b/libcxx/test/std/containers/sequences/list/list.modifiers/emplace_back.pass.cpp @@ -34,7 +34,7 @@ class A double getd() const {return d_;} }; -int main() +int main(int, char**) { { std::list c; @@ -84,4 +84,6 @@ int main() assert(c.back().geti() == 3); assert(c.back().getd() == 4.5); } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/list/list.modifiers/emplace_front.pass.cpp b/libcxx/test/std/containers/sequences/list/list.modifiers/emplace_front.pass.cpp index 25d7eb37d3be9..eece4186caa10 100644 --- a/libcxx/test/std/containers/sequences/list/list.modifiers/emplace_front.pass.cpp +++ b/libcxx/test/std/containers/sequences/list/list.modifiers/emplace_front.pass.cpp @@ -33,7 +33,7 @@ class A double getd() const {return d_;} }; -int main() +int main(int, char**) { { std::list c; @@ -84,4 +84,6 @@ int main() assert(c.back().geti() == 2); assert(c.back().getd() == 3.5); } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/list/list.modifiers/erase_iter.pass.cpp b/libcxx/test/std/containers/sequences/list/list.modifiers/erase_iter.pass.cpp index 824c3680644eb..87486b61690dd 100644 --- a/libcxx/test/std/containers/sequences/list/list.modifiers/erase_iter.pass.cpp +++ b/libcxx/test/std/containers/sequences/list/list.modifiers/erase_iter.pass.cpp @@ -15,7 +15,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { int a1[] = {1, 2, 3}; @@ -61,4 +61,6 @@ int main() assert(distance(l1.begin(), l1.end()) == 0); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/list/list.modifiers/erase_iter_iter.pass.cpp b/libcxx/test/std/containers/sequences/list/list.modifiers/erase_iter_iter.pass.cpp index 8166efbd34351..1df39913c53ca 100644 --- a/libcxx/test/std/containers/sequences/list/list.modifiers/erase_iter_iter.pass.cpp +++ b/libcxx/test/std/containers/sequences/list/list.modifiers/erase_iter_iter.pass.cpp @@ -15,7 +15,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { int a1[] = {1, 2, 3}; { @@ -80,4 +80,6 @@ int main() assert(i == l1.begin()); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/list/list.modifiers/insert_iter_initializer_list.pass.cpp b/libcxx/test/std/containers/sequences/list/list.modifiers/insert_iter_initializer_list.pass.cpp index 5cfde77e29b3e..98dcd0ba28df7 100644 --- a/libcxx/test/std/containers/sequences/list/list.modifiers/insert_iter_initializer_list.pass.cpp +++ b/libcxx/test/std/containers/sequences/list/list.modifiers/insert_iter_initializer_list.pass.cpp @@ -17,7 +17,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { std::list d(10, 1); @@ -61,4 +61,6 @@ int main() assert(*i++ == 1); assert(*i++ == 1); } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/list/list.modifiers/insert_iter_iter_iter.pass.cpp b/libcxx/test/std/containers/sequences/list/list.modifiers/insert_iter_iter_iter.pass.cpp index 0070266498ffc..22ef0f72b9090 100644 --- a/libcxx/test/std/containers/sequences/list/list.modifiers/insert_iter_iter_iter.pass.cpp +++ b/libcxx/test/std/containers/sequences/list/list.modifiers/insert_iter_iter_iter.pass.cpp @@ -81,10 +81,12 @@ void test() { #endif } -int main() +int main(int, char**) { test >(); #if TEST_STD_VER >= 11 test>>(); #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/list/list.modifiers/insert_iter_rvalue.pass.cpp b/libcxx/test/std/containers/sequences/list/list.modifiers/insert_iter_rvalue.pass.cpp index eefee91238300..4ded48991a5bf 100644 --- a/libcxx/test/std/containers/sequences/list/list.modifiers/insert_iter_rvalue.pass.cpp +++ b/libcxx/test/std/containers/sequences/list/list.modifiers/insert_iter_rvalue.pass.cpp @@ -18,7 +18,7 @@ #include "MoveOnly.h" #include "min_allocator.h" -int main() +int main(int, char**) { { std::list l1; @@ -40,4 +40,6 @@ int main() assert(l1.front() == MoveOnly(2)); assert(l1.back() == MoveOnly(1)); } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/list/list.modifiers/insert_iter_size_value.pass.cpp b/libcxx/test/std/containers/sequences/list/list.modifiers/insert_iter_size_value.pass.cpp index 2fc8ab7c4f5ae..f577fc0bcb4b5 100644 --- a/libcxx/test/std/containers/sequences/list/list.modifiers/insert_iter_size_value.pass.cpp +++ b/libcxx/test/std/containers/sequences/list/list.modifiers/insert_iter_size_value.pass.cpp @@ -44,10 +44,12 @@ void test() { #endif } -int main() +int main(int, char**) { test >(); #if TEST_STD_VER >= 11 test>>(); #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/list/list.modifiers/insert_iter_value.pass.cpp b/libcxx/test/std/containers/sequences/list/list.modifiers/insert_iter_value.pass.cpp index 614f57d1263b5..10a3d9704063c 100644 --- a/libcxx/test/std/containers/sequences/list/list.modifiers/insert_iter_value.pass.cpp +++ b/libcxx/test/std/containers/sequences/list/list.modifiers/insert_iter_value.pass.cpp @@ -46,10 +46,12 @@ void test() #endif } -int main() +int main(int, char**) { test >(); #if TEST_STD_VER >= 11 test>>(); #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/list/list.modifiers/pop_back.pass.cpp b/libcxx/test/std/containers/sequences/list/list.modifiers/pop_back.pass.cpp index 7247e828dda18..c4c88d421d608 100644 --- a/libcxx/test/std/containers/sequences/list/list.modifiers/pop_back.pass.cpp +++ b/libcxx/test/std/containers/sequences/list/list.modifiers/pop_back.pass.cpp @@ -16,7 +16,7 @@ #include "test_macros.h" #include "min_allocator.h" -int main() +int main(int, char**) { { int a[] = {1, 2, 3}; @@ -40,4 +40,6 @@ int main() assert(c.empty()); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/list/list.modifiers/pop_front.pass.cpp b/libcxx/test/std/containers/sequences/list/list.modifiers/pop_front.pass.cpp index 9a0104d030ab0..3decb94c4214f 100644 --- a/libcxx/test/std/containers/sequences/list/list.modifiers/pop_front.pass.cpp +++ b/libcxx/test/std/containers/sequences/list/list.modifiers/pop_front.pass.cpp @@ -15,7 +15,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { int a[] = {1, 2, 3}; @@ -39,4 +39,6 @@ int main() assert(c.empty()); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/list/list.modifiers/push_back.pass.cpp b/libcxx/test/std/containers/sequences/list/list.modifiers/push_back.pass.cpp index dba7c0f681e55..e4aa404416f56 100644 --- a/libcxx/test/std/containers/sequences/list/list.modifiers/push_back.pass.cpp +++ b/libcxx/test/std/containers/sequences/list/list.modifiers/push_back.pass.cpp @@ -15,7 +15,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { std::list c; @@ -33,4 +33,6 @@ int main() assert((c == std::list>(a, a+5))); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/list/list.modifiers/push_back_exception_safety.pass.cpp b/libcxx/test/std/containers/sequences/list/list.modifiers/push_back_exception_safety.pass.cpp index f2b7664a15d3b..a6bbc256e0beb 100644 --- a/libcxx/test/std/containers/sequences/list/list.modifiers/push_back_exception_safety.pass.cpp +++ b/libcxx/test/std/containers/sequences/list/list.modifiers/push_back_exception_safety.pass.cpp @@ -57,7 +57,7 @@ CMyClass::~CMyClass() { assert(fMagicValue == kFinishedConstructionMagicValue); } -int main() +int main(int, char**) { CMyClass instance; std::list vec; @@ -70,4 +70,6 @@ int main() } catch (...) { } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/list/list.modifiers/push_back_rvalue.pass.cpp b/libcxx/test/std/containers/sequences/list/list.modifiers/push_back_rvalue.pass.cpp index 0a4c4014b3871..5894c2cc889d0 100644 --- a/libcxx/test/std/containers/sequences/list/list.modifiers/push_back_rvalue.pass.cpp +++ b/libcxx/test/std/containers/sequences/list/list.modifiers/push_back_rvalue.pass.cpp @@ -18,7 +18,7 @@ #include "MoveOnly.h" #include "min_allocator.h" -int main() +int main(int, char**) { { std::list l1; @@ -40,4 +40,6 @@ int main() assert(l1.front() == MoveOnly(1)); assert(l1.back() == MoveOnly(2)); } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/list/list.modifiers/push_front.pass.cpp b/libcxx/test/std/containers/sequences/list/list.modifiers/push_front.pass.cpp index 980b2515eb07a..27e39e90a7bc3 100644 --- a/libcxx/test/std/containers/sequences/list/list.modifiers/push_front.pass.cpp +++ b/libcxx/test/std/containers/sequences/list/list.modifiers/push_front.pass.cpp @@ -15,7 +15,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { std::list c; @@ -33,4 +33,6 @@ int main() assert((c == std::list>(a, a+5))); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/list/list.modifiers/push_front_exception_safety.pass.cpp b/libcxx/test/std/containers/sequences/list/list.modifiers/push_front_exception_safety.pass.cpp index 7b68039610139..49f86222aeed4 100644 --- a/libcxx/test/std/containers/sequences/list/list.modifiers/push_front_exception_safety.pass.cpp +++ b/libcxx/test/std/containers/sequences/list/list.modifiers/push_front_exception_safety.pass.cpp @@ -57,7 +57,7 @@ CMyClass::~CMyClass() { assert(fMagicValue == kFinishedConstructionMagicValue); } -int main() +int main(int, char**) { CMyClass instance; std::list vec; @@ -70,4 +70,6 @@ int main() } catch (...) { } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/list/list.modifiers/push_front_rvalue.pass.cpp b/libcxx/test/std/containers/sequences/list/list.modifiers/push_front_rvalue.pass.cpp index 5f74b15975ffb..0020112858f03 100644 --- a/libcxx/test/std/containers/sequences/list/list.modifiers/push_front_rvalue.pass.cpp +++ b/libcxx/test/std/containers/sequences/list/list.modifiers/push_front_rvalue.pass.cpp @@ -18,7 +18,7 @@ #include "MoveOnly.h" #include "min_allocator.h" -int main() +int main(int, char**) { { std::list l1; @@ -40,4 +40,6 @@ int main() assert(l1.front() == MoveOnly(2)); assert(l1.back() == MoveOnly(1)); } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/list/list.ops/merge.pass.cpp b/libcxx/test/std/containers/sequences/list/list.ops/merge.pass.cpp index eb60a416547c9..c2a552cf62c10 100644 --- a/libcxx/test/std/containers/sequences/list/list.ops/merge.pass.cpp +++ b/libcxx/test/std/containers/sequences/list/list.ops/merge.pass.cpp @@ -16,7 +16,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { int a1[] = {1, 3, 7, 9, 10}; @@ -48,4 +48,6 @@ int main() assert(c2.empty()); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/list/list.ops/merge_comp.pass.cpp b/libcxx/test/std/containers/sequences/list/list.ops/merge_comp.pass.cpp index d2d048b38310d..911c3d09af18f 100644 --- a/libcxx/test/std/containers/sequences/list/list.ops/merge_comp.pass.cpp +++ b/libcxx/test/std/containers/sequences/list/list.ops/merge_comp.pass.cpp @@ -17,7 +17,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { int a1[] = {10, 9, 7, 3, 1}; @@ -48,4 +48,6 @@ int main() assert(c2.empty()); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/list/list.ops/remove.pass.cpp b/libcxx/test/std/containers/sequences/list/list.ops/remove.pass.cpp index db6fd89a8d941..dab23f0414fa9 100644 --- a/libcxx/test/std/containers/sequences/list/list.ops/remove.pass.cpp +++ b/libcxx/test/std/containers/sequences/list/list.ops/remove.pass.cpp @@ -32,7 +32,7 @@ struct S { int *i_; }; -int main() { +int main(int, char**) { { int a1[] = {1, 2, 3, 4}; int a2[] = {1, 2, 4}; @@ -79,4 +79,6 @@ int main() { assert((c == std::list>(a2, a2 + 3))); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/list/list.ops/remove_if.pass.cpp b/libcxx/test/std/containers/sequences/list/list.ops/remove_if.pass.cpp index 29dfafaaa73ea..f903278b3f1b4 100644 --- a/libcxx/test/std/containers/sequences/list/list.ops/remove_if.pass.cpp +++ b/libcxx/test/std/containers/sequences/list/list.ops/remove_if.pass.cpp @@ -29,7 +29,7 @@ bool g(int i) typedef unary_counting_predicate Predicate; -int main() +int main(int, char**) { { int a1[] = {1, 2, 3, 4}; @@ -60,4 +60,6 @@ int main() assert(cp.count() == 4); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/list/list.ops/reverse.pass.cpp b/libcxx/test/std/containers/sequences/list/list.ops/reverse.pass.cpp index a8e5f50a21a4f..0cf1242df5913 100644 --- a/libcxx/test/std/containers/sequences/list/list.ops/reverse.pass.cpp +++ b/libcxx/test/std/containers/sequences/list/list.ops/reverse.pass.cpp @@ -15,7 +15,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { int a1[] = {11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0}; @@ -33,4 +33,6 @@ int main() assert((c1 == std::list>(a2, a2+sizeof(a2)/sizeof(a2[0])))); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/list/list.ops/sort.pass.cpp b/libcxx/test/std/containers/sequences/list/list.ops/sort.pass.cpp index 9cc92ef0d1953..cd229c2d214f8 100644 --- a/libcxx/test/std/containers/sequences/list/list.ops/sort.pass.cpp +++ b/libcxx/test/std/containers/sequences/list/list.ops/sort.pass.cpp @@ -15,7 +15,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { int a1[] = {4, 8, 1, 0, 5, 7, 2, 3, 6, 11, 10, 9}; @@ -33,4 +33,6 @@ int main() assert((c1 == std::list>(a2, a2+sizeof(a2)/sizeof(a2[0])))); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/list/list.ops/sort_comp.pass.cpp b/libcxx/test/std/containers/sequences/list/list.ops/sort_comp.pass.cpp index f7dc6b0b300a1..a87e32acccb62 100644 --- a/libcxx/test/std/containers/sequences/list/list.ops/sort_comp.pass.cpp +++ b/libcxx/test/std/containers/sequences/list/list.ops/sort_comp.pass.cpp @@ -35,7 +35,7 @@ struct throwingLess { #endif -int main() +int main(int, char**) { { int a1[] = {4, 8, 1, 0, 5, 7, 2, 3, 6, 11, 10, 9}; @@ -75,4 +75,6 @@ int main() assert((c1 == std::list>(a2, a2+sizeof(a2)/sizeof(a2[0])))); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/list/list.ops/splice_pos_list.pass.cpp b/libcxx/test/std/containers/sequences/list/list.ops/splice_pos_list.pass.cpp index e1d9f4c521881..6a921e25ea934 100644 --- a/libcxx/test/std/containers/sequences/list/list.ops/splice_pos_list.pass.cpp +++ b/libcxx/test/std/containers/sequences/list/list.ops/splice_pos_list.pass.cpp @@ -16,7 +16,7 @@ #include "test_macros.h" #include "min_allocator.h" -int main() +int main(int, char**) { int a1[] = {1, 2, 3}; int a2[] = {4, 5, 6}; @@ -780,4 +780,6 @@ int main() assert(*i == 6); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/list/list.ops/splice_pos_list_iter.pass.cpp b/libcxx/test/std/containers/sequences/list/list.ops/splice_pos_list_iter.pass.cpp index b87e6b8252aaf..9388b559fd6e0 100644 --- a/libcxx/test/std/containers/sequences/list/list.ops/splice_pos_list_iter.pass.cpp +++ b/libcxx/test/std/containers/sequences/list/list.ops/splice_pos_list_iter.pass.cpp @@ -16,7 +16,7 @@ #include "test_macros.h" #include "min_allocator.h" -int main() +int main(int, char**) { int a1[] = {1, 2, 3}; int a2[] = {4, 5, 6}; @@ -334,4 +334,6 @@ int main() assert(*i == 2); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/list/list.ops/splice_pos_list_iter_iter.pass.cpp b/libcxx/test/std/containers/sequences/list/list.ops/splice_pos_list_iter_iter.pass.cpp index e4c5752df608f..d22321b244029 100644 --- a/libcxx/test/std/containers/sequences/list/list.ops/splice_pos_list_iter_iter.pass.cpp +++ b/libcxx/test/std/containers/sequences/list/list.ops/splice_pos_list_iter_iter.pass.cpp @@ -16,7 +16,7 @@ #include "test_macros.h" #include "min_allocator.h" -int main() +int main(int, char**) { int a1[] = {1, 2, 3}; int a2[] = {4, 5, 6}; @@ -214,4 +214,6 @@ int main() assert(*i == 4); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/list/list.ops/unique.pass.cpp b/libcxx/test/std/containers/sequences/list/list.ops/unique.pass.cpp index e5e45949168ae..651ffbc7baee8 100644 --- a/libcxx/test/std/containers/sequences/list/list.ops/unique.pass.cpp +++ b/libcxx/test/std/containers/sequences/list/list.ops/unique.pass.cpp @@ -15,7 +15,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { int a1[] = {2, 1, 1, 4, 4, 4, 4, 3, 3}; @@ -33,4 +33,6 @@ int main() assert((c == std::list>(a2, a2+4))); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/list/list.ops/unique_pred.pass.cpp b/libcxx/test/std/containers/sequences/list/list.ops/unique_pred.pass.cpp index a3f149d05edf0..dd0bcd77b6f19 100644 --- a/libcxx/test/std/containers/sequences/list/list.ops/unique_pred.pass.cpp +++ b/libcxx/test/std/containers/sequences/list/list.ops/unique_pred.pass.cpp @@ -20,7 +20,7 @@ bool g(int x, int y) return x == y; } -int main() +int main(int, char**) { { int a1[] = {2, 1, 1, 4, 4, 4, 4, 3, 3}; @@ -38,4 +38,6 @@ int main() assert((c == std::list>(a2, a2+4))); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/list/list.special/swap.pass.cpp b/libcxx/test/std/containers/sequences/list/list.special/swap.pass.cpp index de98cfe9f2a26..be7df207bdd19 100644 --- a/libcxx/test/std/containers/sequences/list/list.special/swap.pass.cpp +++ b/libcxx/test/std/containers/sequences/list/list.special/swap.pass.cpp @@ -16,7 +16,7 @@ #include "test_allocator.h" #include "min_allocator.h" -int main() +int main(int, char**) { { int a1[] = {1, 3, 7, 9, 10}; @@ -136,4 +136,6 @@ int main() assert(c2.get_allocator() == A()); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/list/list.special/swap_noexcept.pass.cpp b/libcxx/test/std/containers/sequences/list/list.special/swap_noexcept.pass.cpp index c6e4f61ef2aee..86634dd838d09 100644 --- a/libcxx/test/std/containers/sequences/list/list.special/swap_noexcept.pass.cpp +++ b/libcxx/test/std/containers/sequences/list/list.special/swap_noexcept.pass.cpp @@ -52,7 +52,7 @@ struct some_alloc2 typedef std::true_type is_always_equal; }; -int main() +int main(int, char**) { { typedef std::list C; @@ -85,4 +85,6 @@ int main() } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/list/types.pass.cpp b/libcxx/test/std/containers/sequences/list/types.pass.cpp index bf872fffd93b6..914f9abab7d07 100644 --- a/libcxx/test/std/containers/sequences/list/types.pass.cpp +++ b/libcxx/test/std/containers/sequences/list/types.pass.cpp @@ -28,7 +28,7 @@ struct A { std::list v; }; // incomplete type support -int main() +int main(int, char**) { { typedef std::list C; @@ -65,4 +65,6 @@ int main() typename std::iterator_traits::difference_type>::value), ""); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/nothing_to_do.pass.cpp b/libcxx/test/std/containers/sequences/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/containers/sequences/nothing_to_do.pass.cpp +++ b/libcxx/test/std/containers/sequences/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector.bool/assign_copy.pass.cpp b/libcxx/test/std/containers/sequences/vector.bool/assign_copy.pass.cpp index cffc3bfff0f4a..5aa86839ff4f0 100644 --- a/libcxx/test/std/containers/sequences/vector.bool/assign_copy.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector.bool/assign_copy.pass.cpp @@ -15,7 +15,7 @@ #include "test_allocator.h" #include "min_allocator.h" -int main() +int main(int, char**) { { std::vector > l(3, true, test_allocator(5)); @@ -40,4 +40,6 @@ int main() assert(l2.get_allocator() == min_allocator()); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector.bool/assign_initializer_list.pass.cpp b/libcxx/test/std/containers/sequences/vector.bool/assign_initializer_list.pass.cpp index 36d32c73c735d..bbd980bd32552 100644 --- a/libcxx/test/std/containers/sequences/vector.bool/assign_initializer_list.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector.bool/assign_initializer_list.pass.cpp @@ -17,7 +17,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { std::vector d; @@ -37,4 +37,6 @@ int main() assert(d[2] == false); assert(d[3] == true); } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector.bool/assign_move.pass.cpp b/libcxx/test/std/containers/sequences/vector.bool/assign_move.pass.cpp index 59fb08fbf2368..b70e9cde65b44 100644 --- a/libcxx/test/std/containers/sequences/vector.bool/assign_move.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector.bool/assign_move.pass.cpp @@ -17,7 +17,7 @@ #include "test_allocator.h" #include "min_allocator.h" -int main() +int main(int, char**) { { std::vector > l(test_allocator(5)); @@ -75,4 +75,6 @@ int main() assert(l.empty()); assert(l2.get_allocator() == lo.get_allocator()); } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector.bool/capacity.pass.cpp b/libcxx/test/std/containers/sequences/vector.bool/capacity.pass.cpp index 14ebc6c1e63d3..e24ebe00c6a04 100644 --- a/libcxx/test/std/containers/sequences/vector.bool/capacity.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector.bool/capacity.pass.cpp @@ -16,7 +16,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { std::vector v; @@ -40,4 +40,6 @@ int main() assert(v.capacity() >= 101); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector.bool/construct_default.pass.cpp b/libcxx/test/std/containers/sequences/vector.bool/construct_default.pass.cpp index e481ece9f71c9..3fd2bf8d195de 100644 --- a/libcxx/test/std/containers/sequences/vector.bool/construct_default.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector.bool/construct_default.pass.cpp @@ -59,7 +59,7 @@ test1(const typename C::allocator_type& a) assert(c.get_allocator() == a); } -int main() +int main(int, char**) { { test0 >(); @@ -75,4 +75,6 @@ int main() test1 > >(explicit_allocator()); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector.bool/construct_iter_iter.pass.cpp b/libcxx/test/std/containers/sequences/vector.bool/construct_iter_iter.pass.cpp index 44931a75c6a76..e20f300982c91 100644 --- a/libcxx/test/std/containers/sequences/vector.bool/construct_iter_iter.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector.bool/construct_iter_iter.pass.cpp @@ -30,7 +30,7 @@ test(Iterator first, Iterator last) assert(*i == *first); } -int main() +int main(int, char**) { bool a[] = {0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 1, 0}; bool* an = a + sizeof(a)/sizeof(a[0]); @@ -46,4 +46,6 @@ int main() test> >(random_access_iterator(a), random_access_iterator(an)); test> >(a, an); #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector.bool/construct_iter_iter_alloc.pass.cpp b/libcxx/test/std/containers/sequences/vector.bool/construct_iter_iter_alloc.pass.cpp index 49d2c23e0ea3c..2aa2b42648f20 100644 --- a/libcxx/test/std/containers/sequences/vector.bool/construct_iter_iter_alloc.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector.bool/construct_iter_iter_alloc.pass.cpp @@ -31,7 +31,7 @@ test(Iterator first, Iterator last, const typename C::allocator_type& a) assert(*i == *first); } -int main() +int main(int, char**) { bool a[] = {0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 1, 0}; bool* an = a + sizeof(a)/sizeof(a[0]); @@ -53,4 +53,6 @@ int main() test> >(a, an, alloc); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector.bool/construct_size.pass.cpp b/libcxx/test/std/containers/sequences/vector.bool/construct_size.pass.cpp index 8300924b6d010..2763df7e11d5c 100644 --- a/libcxx/test/std/containers/sequences/vector.bool/construct_size.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector.bool/construct_size.pass.cpp @@ -56,11 +56,13 @@ test(typename C::size_type n) test2 ( n ); } -int main() +int main(int, char**) { test >(50); #if TEST_STD_VER >= 11 test> >(50); test2> >( 100, test_allocator(23)); #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector.bool/construct_size_value.pass.cpp b/libcxx/test/std/containers/sequences/vector.bool/construct_size_value.pass.cpp index ecde426780992..068989330a31f 100644 --- a/libcxx/test/std/containers/sequences/vector.bool/construct_size_value.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector.bool/construct_size_value.pass.cpp @@ -28,10 +28,12 @@ test(typename C::size_type n, const typename C::value_type& x) assert(*i == x); } -int main() +int main(int, char**) { test >(50, true); #if TEST_STD_VER >= 11 test> >(50, true); #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector.bool/construct_size_value_alloc.pass.cpp b/libcxx/test/std/containers/sequences/vector.bool/construct_size_value_alloc.pass.cpp index c9439246560e2..e19f3c4a9d531 100644 --- a/libcxx/test/std/containers/sequences/vector.bool/construct_size_value_alloc.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector.bool/construct_size_value_alloc.pass.cpp @@ -30,10 +30,12 @@ test(typename C::size_type n, const typename C::value_type& x, assert(*i == x); } -int main() +int main(int, char**) { test >(50, true, std::allocator()); #if TEST_STD_VER >= 11 test> >(50, true, min_allocator()); #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector.bool/copy.pass.cpp b/libcxx/test/std/containers/sequences/vector.bool/copy.pass.cpp index 66a15a4c86129..618a37faf70af 100644 --- a/libcxx/test/std/containers/sequences/vector.bool/copy.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector.bool/copy.pass.cpp @@ -29,7 +29,7 @@ test(const C& x) assert(c == x); } -int main() +int main(int, char**) { { bool a[] = {0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 1, 0}; @@ -61,4 +61,6 @@ int main() assert(v2.get_allocator() == v.get_allocator()); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector.bool/copy_alloc.pass.cpp b/libcxx/test/std/containers/sequences/vector.bool/copy_alloc.pass.cpp index 9a63e5a555d32..7970b2c7ed962 100644 --- a/libcxx/test/std/containers/sequences/vector.bool/copy_alloc.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector.bool/copy_alloc.pass.cpp @@ -28,7 +28,7 @@ test(const C& x, const typename C::allocator_type& a) assert(c == x); } -int main() +int main(int, char**) { { bool a[] = {0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 1, 0}; @@ -60,4 +60,6 @@ int main() assert(l2.get_allocator() == min_allocator()); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector.bool/default_noexcept.pass.cpp b/libcxx/test/std/containers/sequences/vector.bool/default_noexcept.pass.cpp index bffeaf64c74d3..800bd1b4b1c54 100644 --- a/libcxx/test/std/containers/sequences/vector.bool/default_noexcept.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector.bool/default_noexcept.pass.cpp @@ -30,7 +30,7 @@ struct some_alloc some_alloc(const some_alloc&); }; -int main() +int main(int, char**) { #if defined(_LIBCPP_VERSION) { @@ -50,4 +50,6 @@ int main() static_assert(!std::is_nothrow_default_constructible::value, ""); } #endif // _LIBCPP_VERSION + + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector.bool/dtor_noexcept.pass.cpp b/libcxx/test/std/containers/sequences/vector.bool/dtor_noexcept.pass.cpp index 9d7858b4f8c65..949add271a28d 100644 --- a/libcxx/test/std/containers/sequences/vector.bool/dtor_noexcept.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector.bool/dtor_noexcept.pass.cpp @@ -26,7 +26,7 @@ struct some_alloc ~some_alloc() noexcept(false); }; -int main() +int main(int, char**) { { typedef std::vector C; @@ -46,4 +46,6 @@ int main() static_assert(!std::is_nothrow_destructible::value, ""); } #endif // _LIBCPP_VERSION + + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector.bool/emplace.pass.cpp b/libcxx/test/std/containers/sequences/vector.bool/emplace.pass.cpp index 26b9039073c9e..129cbff154ec3 100644 --- a/libcxx/test/std/containers/sequences/vector.bool/emplace.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector.bool/emplace.pass.cpp @@ -16,7 +16,7 @@ #include #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::vector C; @@ -63,4 +63,6 @@ int main() assert(c[1] == true); assert(c.back() == true); } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector.bool/emplace_back.pass.cpp b/libcxx/test/std/containers/sequences/vector.bool/emplace_back.pass.cpp index 0ad7210021448..974b7c24ac7fa 100644 --- a/libcxx/test/std/containers/sequences/vector.bool/emplace_back.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector.bool/emplace_back.pass.cpp @@ -18,7 +18,7 @@ #include "test_macros.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::vector C; @@ -87,4 +87,6 @@ int main() assert(c[1] == true); assert(c.back() == true); } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector.bool/empty.fail.cpp b/libcxx/test/std/containers/sequences/vector.bool/empty.fail.cpp index 0381d7eb24b92..0a84eb79d125d 100644 --- a/libcxx/test/std/containers/sequences/vector.bool/empty.fail.cpp +++ b/libcxx/test/std/containers/sequences/vector.bool/empty.fail.cpp @@ -20,8 +20,10 @@ #include "test_macros.h" -int main () +int main(int, char**) { std::vector c; c.empty(); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} + + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector.bool/empty.pass.cpp b/libcxx/test/std/containers/sequences/vector.bool/empty.pass.cpp index e3226a1283582..e0c0243e13902 100644 --- a/libcxx/test/std/containers/sequences/vector.bool/empty.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector.bool/empty.pass.cpp @@ -18,7 +18,7 @@ #include "test_macros.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::vector C; @@ -42,4 +42,6 @@ int main() assert(c.empty()); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector.bool/enabled_hash.pass.cpp b/libcxx/test/std/containers/sequences/vector.bool/enabled_hash.pass.cpp index ba8bdf5312a07..f6631cf2d49c3 100644 --- a/libcxx/test/std/containers/sequences/vector.bool/enabled_hash.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector.bool/enabled_hash.pass.cpp @@ -18,10 +18,12 @@ #include "poisoned_hash_helper.hpp" #include "min_allocator.h" -int main() { +int main(int, char**) { test_library_hash_specializations_available(); { test_hash_enabled_for_type >(); test_hash_enabled_for_type>>(); } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector.bool/erase_iter.pass.cpp b/libcxx/test/std/containers/sequences/vector.bool/erase_iter.pass.cpp index b0a65c9ae27e4..c3d6bfd5de01f 100644 --- a/libcxx/test/std/containers/sequences/vector.bool/erase_iter.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector.bool/erase_iter.pass.cpp @@ -16,7 +16,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { bool a1[] = {1, 0, 1}; { @@ -61,4 +61,6 @@ int main() assert(distance(l1.begin(), l1.end()) == 0); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector.bool/erase_iter_iter.pass.cpp b/libcxx/test/std/containers/sequences/vector.bool/erase_iter_iter.pass.cpp index b574552309af7..89763017e9714 100644 --- a/libcxx/test/std/containers/sequences/vector.bool/erase_iter_iter.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector.bool/erase_iter_iter.pass.cpp @@ -16,7 +16,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { bool a1[] = {1, 0, 1}; { @@ -81,4 +81,6 @@ int main() assert(i == l1.begin()); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector.bool/find.pass.cpp b/libcxx/test/std/containers/sequences/vector.bool/find.pass.cpp index 265b519de7880..883b5b4dbca58 100644 --- a/libcxx/test/std/containers/sequences/vector.bool/find.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector.bool/find.pass.cpp @@ -18,7 +18,7 @@ #include #include -int main() +int main(int, char**) { { for (unsigned i = 1; i < 256; ++i) @@ -38,4 +38,6 @@ int main() assert(b.end() == j); } } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector.bool/initializer_list.pass.cpp b/libcxx/test/std/containers/sequences/vector.bool/initializer_list.pass.cpp index 9f99675896f20..d510b86fed076 100644 --- a/libcxx/test/std/containers/sequences/vector.bool/initializer_list.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector.bool/initializer_list.pass.cpp @@ -17,7 +17,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { std::vector d = {true, false, false, true}; @@ -35,4 +35,6 @@ int main() assert(d[2] == false); assert(d[3] == true); } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector.bool/initializer_list_alloc.pass.cpp b/libcxx/test/std/containers/sequences/vector.bool/initializer_list_alloc.pass.cpp index 29164b598e666..27d8420a6df7d 100644 --- a/libcxx/test/std/containers/sequences/vector.bool/initializer_list_alloc.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector.bool/initializer_list_alloc.pass.cpp @@ -18,7 +18,7 @@ #include "test_allocator.h" #include "min_allocator.h" -int main() +int main(int, char**) { { std::vector> d({true, false, false, true}, test_allocator(3)); @@ -38,4 +38,6 @@ int main() assert(d[2] == false); assert(d[3] == true); } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector.bool/insert_iter_initializer_list.pass.cpp b/libcxx/test/std/containers/sequences/vector.bool/insert_iter_initializer_list.pass.cpp index 3760a9611bbd6..519752da1030b 100644 --- a/libcxx/test/std/containers/sequences/vector.bool/insert_iter_initializer_list.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector.bool/insert_iter_initializer_list.pass.cpp @@ -17,7 +17,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { std::vector d(10, true); @@ -59,4 +59,6 @@ int main() assert(d[12] == true); assert(d[13] == true); } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector.bool/insert_iter_iter_iter.pass.cpp b/libcxx/test/std/containers/sequences/vector.bool/insert_iter_iter_iter.pass.cpp index 7180bb8c28bf3..b9a92189169e5 100644 --- a/libcxx/test/std/containers/sequences/vector.bool/insert_iter_iter_iter.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector.bool/insert_iter_iter_iter.pass.cpp @@ -20,7 +20,7 @@ #include "test_iterators.h" #include "min_allocator.h" -int main() +int main(int, char**) { { std::vector v(100); @@ -125,4 +125,6 @@ int main() assert(v[j] == 0); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector.bool/insert_iter_size_value.pass.cpp b/libcxx/test/std/containers/sequences/vector.bool/insert_iter_size_value.pass.cpp index 9e13af2ac7d2e..5774ab5f6ca7b 100644 --- a/libcxx/test/std/containers/sequences/vector.bool/insert_iter_size_value.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector.bool/insert_iter_size_value.pass.cpp @@ -17,7 +17,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { std::vector v(100); @@ -78,4 +78,6 @@ int main() assert(v[j] == 0); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector.bool/insert_iter_value.pass.cpp b/libcxx/test/std/containers/sequences/vector.bool/insert_iter_value.pass.cpp index 1c0e8ed03a820..2502865c78e2b 100644 --- a/libcxx/test/std/containers/sequences/vector.bool/insert_iter_value.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector.bool/insert_iter_value.pass.cpp @@ -17,7 +17,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { std::vector v(100); @@ -74,4 +74,6 @@ int main() assert(v[j] == 0); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector.bool/iterators.pass.cpp b/libcxx/test/std/containers/sequences/vector.bool/iterators.pass.cpp index 0780d1dd09331..7714e53b2cd5f 100644 --- a/libcxx/test/std/containers/sequences/vector.bool/iterators.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector.bool/iterators.pass.cpp @@ -22,7 +22,7 @@ #include "test_macros.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef bool T; @@ -120,4 +120,6 @@ int main() assert (ii1 - cii == 0); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector.bool/move.pass.cpp b/libcxx/test/std/containers/sequences/vector.bool/move.pass.cpp index e5752e0843782..4de0604c6a7a1 100644 --- a/libcxx/test/std/containers/sequences/vector.bool/move.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector.bool/move.pass.cpp @@ -18,7 +18,7 @@ #include "test_allocator.h" #include "min_allocator.h" -int main() +int main(int, char**) { { std::vector > l(test_allocator(5)); @@ -89,4 +89,6 @@ int main() assert(a.get_data() == 42); } } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector.bool/move_alloc.pass.cpp b/libcxx/test/std/containers/sequences/vector.bool/move_alloc.pass.cpp index bcf57b6c2c3da..f2ff5303b0fa5 100644 --- a/libcxx/test/std/containers/sequences/vector.bool/move_alloc.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector.bool/move_alloc.pass.cpp @@ -17,7 +17,7 @@ #include "test_allocator.h" #include "min_allocator.h" -int main() +int main(int, char**) { { std::vector > l(test_allocator(5)); @@ -71,4 +71,6 @@ int main() assert(l.empty()); assert(l2.get_allocator() == min_allocator()); } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector.bool/move_assign_noexcept.pass.cpp b/libcxx/test/std/containers/sequences/vector.bool/move_assign_noexcept.pass.cpp index 60517e2065361..6c7fcfca75c48 100644 --- a/libcxx/test/std/containers/sequences/vector.bool/move_assign_noexcept.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector.bool/move_assign_noexcept.pass.cpp @@ -56,7 +56,7 @@ struct some_alloc3 typedef std::false_type is_always_equal; }; -int main() +int main(int, char**) { #if defined(_LIBCPP_VERSION) { @@ -97,4 +97,6 @@ int main() static_assert(!std::is_nothrow_move_assignable::value, ""); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector.bool/move_noexcept.pass.cpp b/libcxx/test/std/containers/sequences/vector.bool/move_noexcept.pass.cpp index 8326e4c427151..a59e1a8eb94fe 100644 --- a/libcxx/test/std/containers/sequences/vector.bool/move_noexcept.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector.bool/move_noexcept.pass.cpp @@ -28,7 +28,7 @@ struct some_alloc some_alloc(const some_alloc&); }; -int main() +int main(int, char**) { #if defined(_LIBCPP_VERSION) { @@ -56,4 +56,6 @@ int main() static_assert(!std::is_nothrow_move_constructible::value, ""); #endif } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector.bool/op_equal_initializer_list.pass.cpp b/libcxx/test/std/containers/sequences/vector.bool/op_equal_initializer_list.pass.cpp index 5263fa3bd3ae2..22384fe8d06c9 100644 --- a/libcxx/test/std/containers/sequences/vector.bool/op_equal_initializer_list.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector.bool/op_equal_initializer_list.pass.cpp @@ -17,7 +17,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { std::vector d; @@ -37,4 +37,6 @@ int main() assert(d[2] == false); assert(d[3] == true); } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector.bool/push_back.pass.cpp b/libcxx/test/std/containers/sequences/vector.bool/push_back.pass.cpp index 2e7d82d961bc0..438869be16cc3 100644 --- a/libcxx/test/std/containers/sequences/vector.bool/push_back.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector.bool/push_back.pass.cpp @@ -17,7 +17,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { bool a[] = {0, 1, 1, 0, 1, 0, 0}; @@ -45,4 +45,6 @@ int main() } } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector.bool/reference.swap.pass.cpp b/libcxx/test/std/containers/sequences/vector.bool/reference.swap.pass.cpp index 22e1091422561..c41bac188364c 100644 --- a/libcxx/test/std/containers/sequences/vector.bool/reference.swap.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector.bool/reference.swap.pass.cpp @@ -16,7 +16,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { bool a[] = {false, true, false, true}; @@ -35,4 +35,6 @@ int main() v.swap(r1, r2); assert( r1); assert(!r2); + + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector.bool/reserve.pass.cpp b/libcxx/test/std/containers/sequences/vector.bool/reserve.pass.cpp index b7430453fae5d..039c1bc18fa34 100644 --- a/libcxx/test/std/containers/sequences/vector.bool/reserve.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector.bool/reserve.pass.cpp @@ -16,7 +16,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { std::vector v; @@ -50,4 +50,6 @@ int main() assert(v.capacity() >= 150); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector.bool/resize_size.pass.cpp b/libcxx/test/std/containers/sequences/vector.bool/resize_size.pass.cpp index 3d926910ce700..53e83ac7effad 100644 --- a/libcxx/test/std/containers/sequences/vector.bool/resize_size.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector.bool/resize_size.pass.cpp @@ -16,7 +16,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { std::vector v(100); @@ -46,4 +46,6 @@ int main() assert(v.capacity() >= 400); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector.bool/resize_size_value.pass.cpp b/libcxx/test/std/containers/sequences/vector.bool/resize_size_value.pass.cpp index 061f8a505e4e1..ef0cb6160c6a3 100644 --- a/libcxx/test/std/containers/sequences/vector.bool/resize_size_value.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector.bool/resize_size_value.pass.cpp @@ -16,7 +16,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { std::vector v(100); @@ -48,4 +48,6 @@ int main() assert(v[i] == 1); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector.bool/shrink_to_fit.pass.cpp b/libcxx/test/std/containers/sequences/vector.bool/shrink_to_fit.pass.cpp index 988ce6e03bfbe..59714d5fb5ccb 100644 --- a/libcxx/test/std/containers/sequences/vector.bool/shrink_to_fit.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector.bool/shrink_to_fit.pass.cpp @@ -16,7 +16,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { std::vector v(100); @@ -34,4 +34,6 @@ int main() assert(v.size() >= 101); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector.bool/size.pass.cpp b/libcxx/test/std/containers/sequences/vector.bool/size.pass.cpp index d8abef9893f1a..db737c930c359 100644 --- a/libcxx/test/std/containers/sequences/vector.bool/size.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector.bool/size.pass.cpp @@ -18,7 +18,7 @@ #include "test_macros.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::vector C; @@ -58,4 +58,6 @@ int main() assert(c.size() == 0); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector.bool/swap.pass.cpp b/libcxx/test/std/containers/sequences/vector.bool/swap.pass.cpp index 9aa579d4a6d3d..9ff11113d82c8 100644 --- a/libcxx/test/std/containers/sequences/vector.bool/swap.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector.bool/swap.pass.cpp @@ -16,7 +16,7 @@ #include "test_allocator.h" #include "min_allocator.h" -int main() +int main(int, char**) { { std::vector v1(100); @@ -94,4 +94,6 @@ int main() assert(v[1] == true); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector.bool/swap_noexcept.pass.cpp b/libcxx/test/std/containers/sequences/vector.bool/swap_noexcept.pass.cpp index dbf0f821f136a..e346c29983f83 100644 --- a/libcxx/test/std/containers/sequences/vector.bool/swap_noexcept.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector.bool/swap_noexcept.pass.cpp @@ -52,7 +52,7 @@ struct some_alloc2 typedef std::true_type is_always_equal; }; -int main() +int main(int, char**) { #if defined(_LIBCPP_VERSION) { @@ -89,4 +89,6 @@ int main() } #endif // _LIBCPP_VERSION #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector.bool/types.pass.cpp b/libcxx/test/std/containers/sequences/vector.bool/types.pass.cpp index 4736f8ac9761c..d15973a38b1b8 100644 --- a/libcxx/test/std/containers/sequences/vector.bool/types.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector.bool/types.pass.cpp @@ -67,7 +67,7 @@ test() std::reverse_iterator >::value), ""); } -int main() +int main(int, char**) { test >(); test >(); @@ -76,4 +76,6 @@ int main() #if TEST_STD_VER >= 11 test >(); #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector.bool/vector_bool.pass.cpp b/libcxx/test/std/containers/sequences/vector.bool/vector_bool.pass.cpp index c0d27e4d29460..5f9ae3decb6ec 100644 --- a/libcxx/test/std/containers/sequences/vector.bool/vector_bool.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector.bool/vector_bool.pass.cpp @@ -23,7 +23,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::vector T; @@ -50,4 +50,6 @@ int main() assert(h(vb) != 0); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector/allocator_mismatch.fail.cpp b/libcxx/test/std/containers/sequences/vector/allocator_mismatch.fail.cpp index 001af629856d5..0c57f16be6c62 100644 --- a/libcxx/test/std/containers/sequences/vector/allocator_mismatch.fail.cpp +++ b/libcxx/test/std/containers/sequences/vector/allocator_mismatch.fail.cpp @@ -11,7 +11,9 @@ #include -int main() +int main(int, char**) { std::vector > v; + + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector/contiguous.pass.cpp b/libcxx/test/std/containers/sequences/vector/contiguous.pass.cpp index 2ac79be6ad170..99d9d6ecae7a3 100644 --- a/libcxx/test/std/containers/sequences/vector/contiguous.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector/contiguous.pass.cpp @@ -23,7 +23,7 @@ void test_contiguous ( const C &c ) assert ( *(c.begin() + static_cast(i)) == *(std::addressof(*c.begin()) + i)); } -int main() +int main(int, char**) { { typedef int T; @@ -48,4 +48,6 @@ int main() test_contiguous(C(9, 11.0, A{})); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector/iterators.pass.cpp b/libcxx/test/std/containers/sequences/vector/iterators.pass.cpp index f8b8ca3176bb6..296c551f76f67 100644 --- a/libcxx/test/std/containers/sequences/vector/iterators.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector/iterators.pass.cpp @@ -28,7 +28,7 @@ struct A int second; }; -int main() +int main(int, char**) { { typedef int T; @@ -166,4 +166,6 @@ int main() assert (ii1 - cii == 0); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector/types.pass.cpp b/libcxx/test/std/containers/sequences/vector/types.pass.cpp index 101355bee7c2b..0a04c25527a63 100644 --- a/libcxx/test/std/containers/sequences/vector/types.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector/types.pass.cpp @@ -78,7 +78,7 @@ test() std::reverse_iterator >::value), ""); } -int main() +int main(int, char**) { test >(); test >(); @@ -104,4 +104,6 @@ int main() // typename std::iterator_traits::difference_type>::value), ""); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector/vector.capacity/capacity.pass.cpp b/libcxx/test/std/containers/sequences/vector/vector.capacity/capacity.pass.cpp index 58dccba224ac9..a8ee9f2296234 100644 --- a/libcxx/test/std/containers/sequences/vector/vector.capacity/capacity.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector/vector.capacity/capacity.pass.cpp @@ -16,7 +16,7 @@ #include "min_allocator.h" #include "asan_testing.h" -int main() +int main(int, char**) { { std::vector v; @@ -44,4 +44,6 @@ int main() assert(is_contiguous_container_asan_correct(v)); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector/vector.capacity/empty.fail.cpp b/libcxx/test/std/containers/sequences/vector/vector.capacity/empty.fail.cpp index 8085bd4846c7f..0f7dc6c64cc00 100644 --- a/libcxx/test/std/containers/sequences/vector/vector.capacity/empty.fail.cpp +++ b/libcxx/test/std/containers/sequences/vector/vector.capacity/empty.fail.cpp @@ -20,8 +20,10 @@ #include "test_macros.h" -int main () +int main(int, char**) { std::vector c; c.empty(); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} + + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector/vector.capacity/empty.pass.cpp b/libcxx/test/std/containers/sequences/vector/vector.capacity/empty.pass.cpp index 594b9e4f48d95..cce2602bd360b 100644 --- a/libcxx/test/std/containers/sequences/vector/vector.capacity/empty.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector/vector.capacity/empty.pass.cpp @@ -18,7 +18,7 @@ #include "test_macros.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::vector C; @@ -42,4 +42,6 @@ int main() assert(c.empty()); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector/vector.capacity/max_size.pass.cpp b/libcxx/test/std/containers/sequences/vector/vector.capacity/max_size.pass.cpp index 3e18d4a4d5bf2..c9cc6d5821c4f 100644 --- a/libcxx/test/std/containers/sequences/vector/vector.capacity/max_size.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector/vector.capacity/max_size.pass.cpp @@ -19,7 +19,7 @@ #include "test_macros.h" -int main() { +int main(int, char**) { { typedef limited_allocator A; typedef std::vector C; @@ -44,4 +44,6 @@ int main() { assert(c.max_size() <= max_dist); assert(c.max_size() <= alloc_max_size(c.get_allocator())); } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector/vector.capacity/reserve.pass.cpp b/libcxx/test/std/containers/sequences/vector/vector.capacity/reserve.pass.cpp index 48f57c99cb466..4cf3b2d338c05 100644 --- a/libcxx/test/std/containers/sequences/vector/vector.capacity/reserve.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector/vector.capacity/reserve.pass.cpp @@ -16,7 +16,7 @@ #include "min_allocator.h" #include "asan_testing.h" -int main() +int main(int, char**) { { std::vector v; @@ -66,4 +66,6 @@ int main() assert(is_contiguous_container_asan_correct(v)); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector/vector.capacity/resize_size.pass.cpp b/libcxx/test/std/containers/sequences/vector/vector.capacity/resize_size.pass.cpp index d4b282518fe03..41188acb7d893 100644 --- a/libcxx/test/std/containers/sequences/vector/vector.capacity/resize_size.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector/vector.capacity/resize_size.pass.cpp @@ -19,7 +19,7 @@ #include "min_allocator.h" #include "asan_testing.h" -int main() +int main(int, char**) { { std::vector v(100); @@ -80,4 +80,6 @@ int main() assert(is_contiguous_container_asan_correct(v)); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector/vector.capacity/resize_size_value.pass.cpp b/libcxx/test/std/containers/sequences/vector/vector.capacity/resize_size_value.pass.cpp index 35b63756a3167..4d9f7931d8aca 100644 --- a/libcxx/test/std/containers/sequences/vector/vector.capacity/resize_size_value.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector/vector.capacity/resize_size_value.pass.cpp @@ -16,7 +16,7 @@ #include "min_allocator.h" #include "asan_testing.h" -int main() +int main(int, char**) { { std::vector v(100); @@ -73,4 +73,6 @@ int main() assert(is_contiguous_container_asan_correct(v)); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector/vector.capacity/shrink_to_fit.pass.cpp b/libcxx/test/std/containers/sequences/vector/vector.capacity/shrink_to_fit.pass.cpp index 1b8d2815ccd77..36125bb932c38 100644 --- a/libcxx/test/std/containers/sequences/vector/vector.capacity/shrink_to_fit.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector/vector.capacity/shrink_to_fit.pass.cpp @@ -16,7 +16,7 @@ #include "min_allocator.h" #include "asan_testing.h" -int main() +int main(int, char**) { { std::vector v(100); @@ -58,4 +58,6 @@ int main() assert(is_contiguous_container_asan_correct(v)); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector/vector.capacity/size.pass.cpp b/libcxx/test/std/containers/sequences/vector/vector.capacity/size.pass.cpp index 8944eca422ef0..373a7069f3a91 100644 --- a/libcxx/test/std/containers/sequences/vector/vector.capacity/size.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector/vector.capacity/size.pass.cpp @@ -18,7 +18,7 @@ #include "test_macros.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::vector C; @@ -58,4 +58,6 @@ int main() assert(c.size() == 0); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector/vector.capacity/swap.pass.cpp b/libcxx/test/std/containers/sequences/vector/vector.capacity/swap.pass.cpp index f66eafe25f5a1..e2fa0d8b92832 100644 --- a/libcxx/test/std/containers/sequences/vector/vector.capacity/swap.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector/vector.capacity/swap.pass.cpp @@ -16,7 +16,7 @@ #include "min_allocator.h" #include "asan_testing.h" -int main() +int main(int, char**) { { std::vector v1(100); @@ -46,4 +46,6 @@ int main() assert(is_contiguous_container_asan_correct(v2)); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector/vector.cons/assign_copy.pass.cpp b/libcxx/test/std/containers/sequences/vector/vector.cons/assign_copy.pass.cpp index 2c087fb498d1b..f6d8dd50b7e50 100644 --- a/libcxx/test/std/containers/sequences/vector/vector.cons/assign_copy.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector/vector.cons/assign_copy.pass.cpp @@ -15,7 +15,7 @@ #include "test_allocator.h" #include "min_allocator.h" -int main() +int main(int, char**) { { std::vector > l(3, 2, test_allocator(5)); @@ -40,4 +40,6 @@ int main() assert(l2.get_allocator() == min_allocator()); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector/vector.cons/assign_initializer_list.pass.cpp b/libcxx/test/std/containers/sequences/vector/vector.cons/assign_initializer_list.pass.cpp index c64c8bf3bce5b..4673df9558de8 100644 --- a/libcxx/test/std/containers/sequences/vector/vector.cons/assign_initializer_list.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector/vector.cons/assign_initializer_list.pass.cpp @@ -30,7 +30,7 @@ void test ( Vec &v ) assert(v[3] == 6); } -int main() +int main(int, char**) { { typedef std::vector V; @@ -48,4 +48,6 @@ int main() test(d1); test(d2); } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector/vector.cons/assign_iter_iter.pass.cpp b/libcxx/test/std/containers/sequences/vector/vector.cons/assign_iter_iter.pass.cpp index 888ffb105d16e..df8450210d8a2 100644 --- a/libcxx/test/std/containers/sequences/vector/vector.cons/assign_iter_iter.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector/vector.cons/assign_iter_iter.pass.cpp @@ -69,7 +69,9 @@ void test_emplaceable_concept() { -int main() +int main(int, char**) { test_emplaceable_concept(); + + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector/vector.cons/assign_move.pass.cpp b/libcxx/test/std/containers/sequences/vector/vector.cons/assign_move.pass.cpp index 1a915060c1a79..4b70c7843f19a 100644 --- a/libcxx/test/std/containers/sequences/vector/vector.cons/assign_move.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector/vector.cons/assign_move.pass.cpp @@ -19,7 +19,7 @@ #include "min_allocator.h" #include "asan_testing.h" -int main() +int main(int, char**) { { std::vector > l(test_allocator(5)); @@ -95,4 +95,6 @@ int main() assert(l2.get_allocator() == lo.get_allocator()); assert(is_contiguous_container_asan_correct(l2)); } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector/vector.cons/assign_size_value.pass.cpp b/libcxx/test/std/containers/sequences/vector/vector.cons/assign_size_value.pass.cpp index 4f05307223422..b85238db9a940 100644 --- a/libcxx/test/std/containers/sequences/vector/vector.cons/assign_size_value.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector/vector.cons/assign_size_value.pass.cpp @@ -29,7 +29,7 @@ void test ( Vec &v ) assert(std::all_of(v.begin(), v.end(), is6)); } -int main() +int main(int, char**) { { typedef std::vector V; @@ -50,4 +50,6 @@ int main() test(d2); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector/vector.cons/construct_default.pass.cpp b/libcxx/test/std/containers/sequences/vector/vector.cons/construct_default.pass.cpp index c31b3c2faa5d8..346c357d3f3ed 100644 --- a/libcxx/test/std/containers/sequences/vector/vector.cons/construct_default.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector/vector.cons/construct_default.pass.cpp @@ -60,7 +60,7 @@ test1(const typename C::allocator_type& a) LIBCPP_ASSERT(is_contiguous_container_asan_correct(c)); } -int main() +int main(int, char**) { { test0 >(); @@ -98,4 +98,6 @@ int main() assert(v.empty()); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector/vector.cons/construct_iter_iter.pass.cpp b/libcxx/test/std/containers/sequences/vector/vector.cons/construct_iter_iter.pass.cpp index 1623c8296be9c..8f8ffa82c0c04 100644 --- a/libcxx/test/std/containers/sequences/vector/vector.cons/construct_iter_iter.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector/vector.cons/construct_iter_iter.pass.cpp @@ -176,9 +176,11 @@ void test_ctor_with_different_value_type() { } -int main() { +int main(int, char**) { basic_test_cases(); emplaceable_concept_tests(); // See PR34898 test_ctor_under_alloc(); test_ctor_with_different_value_type(); + + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector/vector.cons/construct_iter_iter_alloc.pass.cpp b/libcxx/test/std/containers/sequences/vector/vector.cons/construct_iter_iter_alloc.pass.cpp index 6cd319bc8a932..3a97b43b7e042 100644 --- a/libcxx/test/std/containers/sequences/vector/vector.cons/construct_iter_iter_alloc.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector/vector.cons/construct_iter_iter_alloc.pass.cpp @@ -162,8 +162,10 @@ void test_ctor_under_alloc() { #endif } -int main() { +int main(int, char**) { basic_tests(); emplaceable_concept_tests(); // See PR34898 test_ctor_under_alloc(); + + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector/vector.cons/construct_size.pass.cpp b/libcxx/test/std/containers/sequences/vector/vector.cons/construct_size.pass.cpp index fe20a70369444..f111220d3a450 100644 --- a/libcxx/test/std/containers/sequences/vector/vector.cons/construct_size.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector/vector.cons/construct_size.pass.cpp @@ -60,7 +60,7 @@ test(typename C::size_type n) test2 ( n ); } -int main() +int main(int, char**) { test >(50); test >(500); @@ -71,4 +71,6 @@ int main() test2> >( 100, test_allocator(23)); assert(DefaultOnly::count == 0); #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector/vector.cons/construct_size_value.pass.cpp b/libcxx/test/std/containers/sequences/vector/vector.cons/construct_size_value.pass.cpp index c8cd2f2a3c4d7..0839883a9b5b5 100644 --- a/libcxx/test/std/containers/sequences/vector/vector.cons/construct_size_value.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector/vector.cons/construct_size_value.pass.cpp @@ -30,7 +30,7 @@ test(typename C::size_type n, const typename C::value_type& x) assert(*i == x); } -int main() +int main(int, char**) { test >(50, 3); // Add 1 for implementations that dynamically allocate a container proxy. @@ -38,4 +38,6 @@ int main() #if TEST_STD_VER >= 11 test> >(50, 3); #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector/vector.cons/construct_size_value_alloc.pass.cpp b/libcxx/test/std/containers/sequences/vector/vector.cons/construct_size_value_alloc.pass.cpp index c0bba42da4561..1de08853454f8 100644 --- a/libcxx/test/std/containers/sequences/vector/vector.cons/construct_size_value_alloc.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector/vector.cons/construct_size_value_alloc.pass.cpp @@ -31,10 +31,12 @@ test(typename C::size_type n, const typename C::value_type& x, assert(*i == x); } -int main() +int main(int, char**) { test >(50, 3, std::allocator()); #if TEST_STD_VER >= 11 test> >(50, 3, min_allocator()); #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector/vector.cons/copy.pass.cpp b/libcxx/test/std/containers/sequences/vector/vector.cons/copy.pass.cpp index 1542827e35bef..844da38416b0f 100644 --- a/libcxx/test/std/containers/sequences/vector/vector.cons/copy.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector/vector.cons/copy.pass.cpp @@ -30,7 +30,7 @@ test(const C& x) LIBCPP_ASSERT(is_contiguous_container_asan_correct(c)); } -int main() +int main(int, char**) { { int a[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 1, 0}; @@ -74,4 +74,6 @@ int main() assert(is_contiguous_container_asan_correct(v2)); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector/vector.cons/copy_alloc.pass.cpp b/libcxx/test/std/containers/sequences/vector/vector.cons/copy_alloc.pass.cpp index d54fc59f508d3..79b484f78c7cc 100644 --- a/libcxx/test/std/containers/sequences/vector/vector.cons/copy_alloc.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector/vector.cons/copy_alloc.pass.cpp @@ -30,7 +30,7 @@ test(const C& x, const typename C::allocator_type& a) LIBCPP_ASSERT(is_contiguous_container_asan_correct(c)); } -int main() +int main(int, char**) { { int a[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 1, 0}; @@ -62,4 +62,6 @@ int main() assert(l2.get_allocator() == min_allocator()); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector/vector.cons/deduct.fail.cpp b/libcxx/test/std/containers/sequences/vector/vector.cons/deduct.fail.cpp index 0ce0bafbff4fd..beb10498c771f 100644 --- a/libcxx/test/std/containers/sequences/vector/vector.cons/deduct.fail.cpp +++ b/libcxx/test/std/containers/sequences/vector/vector.cons/deduct.fail.cpp @@ -23,7 +23,7 @@ #include -int main() +int main(int, char**) { // Test the explicit deduction guides @@ -36,4 +36,6 @@ int main() // deque, allocator>> } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector/vector.cons/deduct.pass.cpp b/libcxx/test/std/containers/sequences/vector/vector.cons/deduct.pass.cpp index 0ada98c0c9abc..e6b59b40c8fb7 100644 --- a/libcxx/test/std/containers/sequences/vector/vector.cons/deduct.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector/vector.cons/deduct.pass.cpp @@ -29,7 +29,7 @@ struct A {}; -int main() +int main(int, char**) { // Test the explicit deduction guides @@ -112,4 +112,6 @@ int main() static_assert(std::is_same_v>, ""); assert(vec.size() == 0); } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector/vector.cons/default.recursive.pass.cpp b/libcxx/test/std/containers/sequences/vector/vector.cons/default.recursive.pass.cpp index e7298ba85a06a..1558ea4b619f4 100644 --- a/libcxx/test/std/containers/sequences/vector/vector.cons/default.recursive.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector/vector.cons/default.recursive.pass.cpp @@ -17,6 +17,8 @@ struct X std::vector q; }; -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector/vector.cons/default_noexcept.pass.cpp b/libcxx/test/std/containers/sequences/vector/vector.cons/default_noexcept.pass.cpp index 24f78b28244f2..91434964b2ca2 100644 --- a/libcxx/test/std/containers/sequences/vector/vector.cons/default_noexcept.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector/vector.cons/default_noexcept.pass.cpp @@ -29,7 +29,7 @@ struct some_alloc some_alloc(const some_alloc&); }; -int main() +int main(int, char**) { { typedef std::vector C; @@ -47,4 +47,6 @@ int main() typedef std::vector> C; static_assert(!std::is_nothrow_default_constructible::value, ""); } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector/vector.cons/dtor_noexcept.pass.cpp b/libcxx/test/std/containers/sequences/vector/vector.cons/dtor_noexcept.pass.cpp index e02a7b029e23d..f4c05b6e2d56c 100644 --- a/libcxx/test/std/containers/sequences/vector/vector.cons/dtor_noexcept.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector/vector.cons/dtor_noexcept.pass.cpp @@ -27,7 +27,7 @@ struct some_alloc ~some_alloc() noexcept(false); }; -int main() +int main(int, char**) { { typedef std::vector C; @@ -47,4 +47,6 @@ int main() static_assert(!std::is_nothrow_destructible::value, ""); } #endif // _LIBCPP_VERSION + + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector/vector.cons/initializer_list.pass.cpp b/libcxx/test/std/containers/sequences/vector/vector.cons/initializer_list.pass.cpp index a839e03666a22..168e3b58bd5a4 100644 --- a/libcxx/test/std/containers/sequences/vector/vector.cons/initializer_list.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector/vector.cons/initializer_list.pass.cpp @@ -17,7 +17,7 @@ #include "min_allocator.h" #include "asan_testing.h" -int main() +int main(int, char**) { { std::vector d = {3, 4, 5, 6}; @@ -37,4 +37,6 @@ int main() assert(d[2] == 5); assert(d[3] == 6); } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector/vector.cons/initializer_list_alloc.pass.cpp b/libcxx/test/std/containers/sequences/vector/vector.cons/initializer_list_alloc.pass.cpp index f8ea034f74011..633b5c5e2ea12 100644 --- a/libcxx/test/std/containers/sequences/vector/vector.cons/initializer_list_alloc.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector/vector.cons/initializer_list_alloc.pass.cpp @@ -19,7 +19,7 @@ #include "min_allocator.h" #include "asan_testing.h" -int main() +int main(int, char**) { { std::vector> d({3, 4, 5, 6}, test_allocator(3)); @@ -41,4 +41,6 @@ int main() assert(d[2] == 5); assert(d[3] == 6); } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector/vector.cons/move.pass.cpp b/libcxx/test/std/containers/sequences/vector/vector.cons/move.pass.cpp index e5d625b5e3634..938857458b790 100644 --- a/libcxx/test/std/containers/sequences/vector/vector.cons/move.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector/vector.cons/move.pass.cpp @@ -21,7 +21,7 @@ #include "min_allocator.h" #include "asan_testing.h" -int main() +int main(int, char**) { { std::vector > l(test_allocator(5)); @@ -129,4 +129,6 @@ int main() assert(a.get_data() == 42); } } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector/vector.cons/move_alloc.pass.cpp b/libcxx/test/std/containers/sequences/vector/vector.cons/move_alloc.pass.cpp index dcea27a0d7aeb..2f15a14e8c89d 100644 --- a/libcxx/test/std/containers/sequences/vector/vector.cons/move_alloc.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector/vector.cons/move_alloc.pass.cpp @@ -19,7 +19,7 @@ #include "min_allocator.h" #include "asan_testing.h" -int main() +int main(int, char**) { { std::vector > l(test_allocator(5)); @@ -93,4 +93,6 @@ int main() assert(l2.get_allocator() == min_allocator()); assert(is_contiguous_container_asan_correct(l2)); } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector/vector.cons/move_assign_noexcept.pass.cpp b/libcxx/test/std/containers/sequences/vector/vector.cons/move_assign_noexcept.pass.cpp index 8eeb19eb43ad0..c5c5e29cda4f7 100644 --- a/libcxx/test/std/containers/sequences/vector/vector.cons/move_assign_noexcept.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector/vector.cons/move_assign_noexcept.pass.cpp @@ -57,7 +57,7 @@ struct some_alloc3 }; -int main() +int main(int, char**) { { typedef std::vector C; @@ -91,4 +91,6 @@ int main() static_assert(!std::is_nothrow_move_assignable::value, ""); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector/vector.cons/move_noexcept.pass.cpp b/libcxx/test/std/containers/sequences/vector/vector.cons/move_noexcept.pass.cpp index a9a554ad213bc..1228414289f3e 100644 --- a/libcxx/test/std/containers/sequences/vector/vector.cons/move_noexcept.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector/vector.cons/move_noexcept.pass.cpp @@ -28,7 +28,7 @@ struct some_alloc some_alloc(const some_alloc&); }; -int main() +int main(int, char**) { { typedef std::vector C; @@ -51,4 +51,6 @@ int main() static_assert(!std::is_nothrow_move_constructible::value, ""); #endif } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector/vector.cons/op_equal_initializer_list.pass.cpp b/libcxx/test/std/containers/sequences/vector/vector.cons/op_equal_initializer_list.pass.cpp index 941f1e012b3c5..61c20b7c7f062 100644 --- a/libcxx/test/std/containers/sequences/vector/vector.cons/op_equal_initializer_list.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector/vector.cons/op_equal_initializer_list.pass.cpp @@ -18,7 +18,7 @@ #include "min_allocator.h" #include "asan_testing.h" -int main() +int main(int, char**) { { std::vector d; @@ -40,4 +40,6 @@ int main() assert(d[2] == 5); assert(d[3] == 6); } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector/vector.data/data.pass.cpp b/libcxx/test/std/containers/sequences/vector/vector.data/data.pass.cpp index cd176c7017b31..3477c5eb1bd0b 100644 --- a/libcxx/test/std/containers/sequences/vector/vector.data/data.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector/vector.data/data.pass.cpp @@ -25,7 +25,7 @@ struct Nasty { int i_; }; -int main() +int main(int, char**) { { std::vector v; @@ -59,4 +59,6 @@ int main() assert(is_contiguous_container_asan_correct(v)); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector/vector.data/data_const.pass.cpp b/libcxx/test/std/containers/sequences/vector/vector.data/data_const.pass.cpp index 33d973954e2bb..ec5016d2f6cbe 100644 --- a/libcxx/test/std/containers/sequences/vector/vector.data/data_const.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector/vector.data/data_const.pass.cpp @@ -25,7 +25,7 @@ struct Nasty { int i_; }; -int main() +int main(int, char**) { { const std::vector v; @@ -59,4 +59,6 @@ int main() assert(is_contiguous_container_asan_correct(v)); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector/vector.erasure/erase.pass.cpp b/libcxx/test/std/containers/sequences/vector/vector.erasure/erase.pass.cpp index 3a96b55cadfaf..00676b52dc609 100644 --- a/libcxx/test/std/containers/sequences/vector/vector.erasure/erase.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector/vector.erasure/erase.pass.cpp @@ -66,7 +66,7 @@ void test() test0(S({1,2,1}), opt(3), S({1,2,1})); } -int main() +int main(int, char**) { test>(); test>> (); @@ -74,4 +74,6 @@ int main() test>(); test>(); + + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector/vector.erasure/erase_if.pass.cpp b/libcxx/test/std/containers/sequences/vector/vector.erasure/erase_if.pass.cpp index f18c404837716..10d66a29b4e4b 100644 --- a/libcxx/test/std/containers/sequences/vector/vector.erasure/erase_if.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector/vector.erasure/erase_if.pass.cpp @@ -66,7 +66,7 @@ void test() test0(S({1,2,3}), False, S({1,2,3})); } -int main() +int main(int, char**) { test>(); test>> (); @@ -74,4 +74,6 @@ int main() test>(); test>(); + + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector/vector.modifiers/clear.pass.cpp b/libcxx/test/std/containers/sequences/vector/vector.modifiers/clear.pass.cpp index a1ce8f000261a..334c67adcfc67 100644 --- a/libcxx/test/std/containers/sequences/vector/vector.modifiers/clear.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector/vector.modifiers/clear.pass.cpp @@ -17,7 +17,7 @@ #include "min_allocator.h" #include "asan_testing.h" -int main() +int main(int, char**) { { int a[] = {1, 2, 3}; @@ -39,4 +39,6 @@ int main() LIBCPP_ASSERT(is_contiguous_container_asan_correct(c)); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector/vector.modifiers/emplace.pass.cpp b/libcxx/test/std/containers/sequences/vector/vector.modifiers/emplace.pass.cpp index 7acc90b5a69fb..1279fba4ce291 100644 --- a/libcxx/test/std/containers/sequences/vector/vector.modifiers/emplace.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector/vector.modifiers/emplace.pass.cpp @@ -52,7 +52,7 @@ class A double getd() const {return d_;} }; -int main() +int main(int, char**) { { std::vector c; @@ -132,4 +132,6 @@ int main() assert(c.back().geti() == 3); assert(c.back().getd() == 4.5); } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector/vector.modifiers/emplace_back.pass.cpp b/libcxx/test/std/containers/sequences/vector/vector.modifiers/emplace_back.pass.cpp index 6ddc88560d21f..435be207bb44b 100644 --- a/libcxx/test/std/containers/sequences/vector/vector.modifiers/emplace_back.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector/vector.modifiers/emplace_back.pass.cpp @@ -53,7 +53,7 @@ class A double getd() const {return d_;} }; -int main() +int main(int, char**) { { std::vector c; @@ -144,4 +144,6 @@ int main() assert(c.size() == 2); assert(is_contiguous_container_asan_correct(c)); } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector/vector.modifiers/emplace_extra.pass.cpp b/libcxx/test/std/containers/sequences/vector/vector.modifiers/emplace_extra.pass.cpp index 45835c338627d..ec5f778565a6f 100644 --- a/libcxx/test/std/containers/sequences/vector/vector.modifiers/emplace_extra.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector/vector.modifiers/emplace_extra.pass.cpp @@ -18,7 +18,7 @@ #include "min_allocator.h" #include "asan_testing.h" -int main() +int main(int, char**) { { std::vector v; @@ -56,4 +56,6 @@ int main() assert(v[0] == 3); assert(is_contiguous_container_asan_correct(v)); } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector/vector.modifiers/erase_iter.pass.cpp b/libcxx/test/std/containers/sequences/vector/vector.modifiers/erase_iter.pass.cpp index def3b350dd264..aac35f9f8114a 100644 --- a/libcxx/test/std/containers/sequences/vector/vector.modifiers/erase_iter.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector/vector.modifiers/erase_iter.pass.cpp @@ -32,7 +32,7 @@ struct Throws { bool Throws::sThrows = false; #endif -int main() +int main(int, char**) { { int a1[] = {1, 2, 3}; @@ -99,4 +99,6 @@ int main() assert(v.size() == 0); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector/vector.modifiers/erase_iter_iter.pass.cpp b/libcxx/test/std/containers/sequences/vector/vector.modifiers/erase_iter_iter.pass.cpp index aab348f08bf39..7682000d75e77 100644 --- a/libcxx/test/std/containers/sequences/vector/vector.modifiers/erase_iter_iter.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector/vector.modifiers/erase_iter_iter.pass.cpp @@ -32,7 +32,7 @@ struct Throws { bool Throws::sThrows = false; #endif -int main() +int main(int, char**) { int a1[] = {1, 2, 3}; { @@ -152,4 +152,6 @@ int main() assert(v.size() == 0); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector/vector.modifiers/insert_iter_initializer_list.pass.cpp b/libcxx/test/std/containers/sequences/vector/vector.modifiers/insert_iter_initializer_list.pass.cpp index 46b6c010abf8d..30d0cd686a4e0 100644 --- a/libcxx/test/std/containers/sequences/vector/vector.modifiers/insert_iter_initializer_list.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector/vector.modifiers/insert_iter_initializer_list.pass.cpp @@ -18,7 +18,7 @@ #include "min_allocator.h" #include "asan_testing.h" -int main() +int main(int, char**) { { std::vector d(10, 1); @@ -62,4 +62,6 @@ int main() assert(d[12] == 1); assert(d[13] == 1); } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector/vector.modifiers/insert_iter_iter_iter.pass.cpp b/libcxx/test/std/containers/sequences/vector/vector.modifiers/insert_iter_iter_iter.pass.cpp index fadd09e3e5aa2..74cb612aab0f9 100644 --- a/libcxx/test/std/containers/sequences/vector/vector.modifiers/insert_iter_iter_iter.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector/vector.modifiers/insert_iter_iter_iter.pass.cpp @@ -21,7 +21,7 @@ #include "min_allocator.h" #include "asan_testing.h" -int main() +int main(int, char**) { { typedef std::vector V; @@ -171,4 +171,6 @@ int main() assert(v[j] == 0); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector/vector.modifiers/insert_iter_rvalue.pass.cpp b/libcxx/test/std/containers/sequences/vector/vector.modifiers/insert_iter_rvalue.pass.cpp index e2190fd885d04..780bd9c485fd7 100644 --- a/libcxx/test/std/containers/sequences/vector/vector.modifiers/insert_iter_rvalue.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector/vector.modifiers/insert_iter_rvalue.pass.cpp @@ -21,7 +21,7 @@ #include "min_allocator.h" #include "asan_testing.h" -int main() +int main(int, char**) { { std::vector v(100); @@ -62,4 +62,6 @@ int main() for (++j; j < 101; ++j) assert(v[j] == MoveOnly()); } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector/vector.modifiers/insert_iter_size_value.pass.cpp b/libcxx/test/std/containers/sequences/vector/vector.modifiers/insert_iter_size_value.pass.cpp index ddaa4fb6a35e0..5b182f44d6adc 100644 --- a/libcxx/test/std/containers/sequences/vector/vector.modifiers/insert_iter_size_value.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector/vector.modifiers/insert_iter_size_value.pass.cpp @@ -19,7 +19,7 @@ #include "min_allocator.h" #include "asan_testing.h" -int main() +int main(int, char**) { { std::vector v(100); @@ -111,4 +111,6 @@ int main() assert(v[j] == 0); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector/vector.modifiers/insert_iter_value.pass.cpp b/libcxx/test/std/containers/sequences/vector/vector.modifiers/insert_iter_value.pass.cpp index 23f0030ab25cb..2edadd0fe7774 100644 --- a/libcxx/test/std/containers/sequences/vector/vector.modifiers/insert_iter_value.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector/vector.modifiers/insert_iter_value.pass.cpp @@ -19,7 +19,7 @@ #include "min_allocator.h" #include "asan_testing.h" -int main() +int main(int, char**) { { std::vector v(100); @@ -93,4 +93,6 @@ int main() assert(v[j] == 0); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector/vector.modifiers/pop_back.pass.cpp b/libcxx/test/std/containers/sequences/vector/vector.modifiers/pop_back.pass.cpp index c0784f7031ed9..db2337c276ec3 100644 --- a/libcxx/test/std/containers/sequences/vector/vector.modifiers/pop_back.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector/vector.modifiers/pop_back.pass.cpp @@ -18,7 +18,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { std::vector c; @@ -37,4 +37,6 @@ int main() assert(c.size() == 0); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector/vector.modifiers/push_back.pass.cpp b/libcxx/test/std/containers/sequences/vector/vector.modifiers/push_back.pass.cpp index e9bcf24116b8d..d22136ddbcbe7 100644 --- a/libcxx/test/std/containers/sequences/vector/vector.modifiers/push_back.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector/vector.modifiers/push_back.pass.cpp @@ -17,7 +17,7 @@ #include "min_allocator.h" #include "asan_testing.h" -int main() +int main(int, char**) { { std::vector c; @@ -108,4 +108,6 @@ int main() assert(c[j] == j); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector/vector.modifiers/push_back_exception_safety.pass.cpp b/libcxx/test/std/containers/sequences/vector/vector.modifiers/push_back_exception_safety.pass.cpp index 48152cb81cf15..9e25611290cc6 100644 --- a/libcxx/test/std/containers/sequences/vector/vector.modifiers/push_back_exception_safety.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector/vector.modifiers/push_back_exception_safety.pass.cpp @@ -64,7 +64,7 @@ CMyClass::~CMyClass() { bool operator==(const CMyClass &lhs, const CMyClass &rhs) { return lhs.equal(rhs); } -int main() +int main(int, char**) { CMyClass instance(42); std::vector vec; @@ -85,4 +85,6 @@ int main() assert(is_contiguous_container_asan_correct(vec)); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector/vector.modifiers/push_back_rvalue.pass.cpp b/libcxx/test/std/containers/sequences/vector/vector.modifiers/push_back_rvalue.pass.cpp index 070cabe5c2969..d876eb6170a12 100644 --- a/libcxx/test/std/containers/sequences/vector/vector.modifiers/push_back_rvalue.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector/vector.modifiers/push_back_rvalue.pass.cpp @@ -20,7 +20,7 @@ #include "min_allocator.h" #include "asan_testing.h" -int main() +int main(int, char**) { { std::vector c; @@ -109,4 +109,6 @@ int main() for (int j = 0; static_cast(j) < c.size(); ++j) assert(c[j] == MoveOnly(j)); } + + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector/vector.special/swap.pass.cpp b/libcxx/test/std/containers/sequences/vector/vector.special/swap.pass.cpp index d107be98fb5df..2ded4fe750f66 100644 --- a/libcxx/test/std/containers/sequences/vector/vector.special/swap.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector/vector.special/swap.pass.cpp @@ -18,7 +18,7 @@ #include "min_allocator.h" #include "asan_testing.h" -int main() +int main(int, char**) { { int a1[] = {1, 3, 7, 9, 10}; @@ -178,4 +178,6 @@ int main() assert(is_contiguous_container_asan_correct(c2)); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/sequences/vector/vector.special/swap_noexcept.pass.cpp b/libcxx/test/std/containers/sequences/vector/vector.special/swap_noexcept.pass.cpp index 06d89282f2a25..40205b67c3ce9 100644 --- a/libcxx/test/std/containers/sequences/vector/vector.special/swap_noexcept.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector/vector.special/swap_noexcept.pass.cpp @@ -53,7 +53,7 @@ struct some_alloc2 typedef std::true_type is_always_equal; }; -int main() +int main(int, char**) { { typedef std::vector C; @@ -85,4 +85,6 @@ int main() static_assert( noexcept(swap(std::declval(), std::declval())), ""); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/iterator_difference_type.pass.cpp b/libcxx/test/std/containers/unord/iterator_difference_type.pass.cpp index 3f0b61e5f226e..fc5ccbee34f22 100644 --- a/libcxx/test/std/containers/unord/iterator_difference_type.pass.cpp +++ b/libcxx/test/std/containers/unord/iterator_difference_type.pass.cpp @@ -73,7 +73,7 @@ void testUnorderedSet() { } } -int main() { +int main(int, char**) { { typedef std::unordered_map Map; typedef std::pair ValueTp; @@ -150,4 +150,6 @@ int main() { testUnorderedSet>(); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.map/allocator_mismatch.fail.cpp b/libcxx/test/std/containers/unord/unord.map/allocator_mismatch.fail.cpp index 9dc9869eaf7d7..7059220425dd9 100644 --- a/libcxx/test/std/containers/unord/unord.map/allocator_mismatch.fail.cpp +++ b/libcxx/test/std/containers/unord/unord.map/allocator_mismatch.fail.cpp @@ -11,7 +11,9 @@ #include -int main() +int main(int, char**) { std::unordered_map, std::less, std::allocator > m; + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.map/bucket.pass.cpp b/libcxx/test/std/containers/unord/unord.map/bucket.pass.cpp index ae65ac887956a..522b709765095 100644 --- a/libcxx/test/std/containers/unord/unord.map/bucket.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.map/bucket.pass.cpp @@ -25,7 +25,7 @@ #include "test_macros.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_map C; @@ -74,4 +74,6 @@ int main() assert(false); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.map/bucket_count.pass.cpp b/libcxx/test/std/containers/unord/unord.map/bucket_count.pass.cpp index b2529a831adf2..ee1a125232b51 100644 --- a/libcxx/test/std/containers/unord/unord.map/bucket_count.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.map/bucket_count.pass.cpp @@ -21,7 +21,7 @@ #include "test_macros.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_map C; @@ -71,4 +71,6 @@ int main() assert(c.bucket_count() >= 8); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.map/bucket_size.pass.cpp b/libcxx/test/std/containers/unord/unord.map/bucket_size.pass.cpp index 2edb6cc206cd3..439d2b533bf40 100644 --- a/libcxx/test/std/containers/unord/unord.map/bucket_size.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.map/bucket_size.pass.cpp @@ -25,7 +25,7 @@ #include "test_macros.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_map C; @@ -78,4 +78,6 @@ int main() assert(false); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.map/compare.pass.cpp b/libcxx/test/std/containers/unord/unord.map/compare.pass.cpp index 6c5891e1a8d51..7d6cbf9a8ad16 100644 --- a/libcxx/test/std/containers/unord/unord.map/compare.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.map/compare.pass.cpp @@ -32,7 +32,7 @@ namespace std }; } -int main() +int main(int, char**) { typedef std::unordered_map MapT; typedef MapT::iterator Iter; @@ -42,4 +42,6 @@ int main() std::pair result = map.insert(std::make_pair(Key(0), 42)); assert(result.second); assert(result.first->second == 42); + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.map/count.pass.cpp b/libcxx/test/std/containers/unord/unord.map/count.pass.cpp index bd754843cadfe..1a1bea90b8268 100644 --- a/libcxx/test/std/containers/unord/unord.map/count.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.map/count.pass.cpp @@ -20,7 +20,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_map C; @@ -61,4 +61,6 @@ int main() assert(c.count(5) == 0); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.map/empty.fail.cpp b/libcxx/test/std/containers/unord/unord.map/empty.fail.cpp index c4fa89e662db2..283d6fa3e243b 100644 --- a/libcxx/test/std/containers/unord/unord.map/empty.fail.cpp +++ b/libcxx/test/std/containers/unord/unord.map/empty.fail.cpp @@ -20,8 +20,10 @@ #include "test_macros.h" -int main () +int main(int, char**) { std::unordered_map c; c.empty(); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.map/empty.pass.cpp b/libcxx/test/std/containers/unord/unord.map/empty.pass.cpp index 1dcba5cf70f67..da6d48df2d57c 100644 --- a/libcxx/test/std/containers/unord/unord.map/empty.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.map/empty.pass.cpp @@ -18,7 +18,7 @@ #include "test_macros.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_map M; @@ -42,4 +42,6 @@ int main() assert(m.empty()); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.map/eq.pass.cpp b/libcxx/test/std/containers/unord/unord.map/eq.pass.cpp index 99bd1fa67582f..d284e822ade86 100644 --- a/libcxx/test/std/containers/unord/unord.map/eq.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.map/eq.pass.cpp @@ -24,7 +24,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_map C; @@ -159,4 +159,6 @@ int main() assert(!(c1 != c2)); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.map/equal_range_const.pass.cpp b/libcxx/test/std/containers/unord/unord.map/equal_range_const.pass.cpp index a3b2b5c8a972a..b9dd9a64e2ec2 100644 --- a/libcxx/test/std/containers/unord/unord.map/equal_range_const.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.map/equal_range_const.pass.cpp @@ -20,7 +20,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_map C; @@ -71,4 +71,6 @@ int main() assert(std::distance(r.first, r.second) == 0); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.map/equal_range_non_const.pass.cpp b/libcxx/test/std/containers/unord/unord.map/equal_range_non_const.pass.cpp index 505d355d7a366..029222d5caf8e 100644 --- a/libcxx/test/std/containers/unord/unord.map/equal_range_non_const.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.map/equal_range_non_const.pass.cpp @@ -20,7 +20,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_map C; @@ -71,4 +71,6 @@ int main() assert(std::distance(r.first, r.second) == 0); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.map/erase_if.pass.cpp b/libcxx/test/std/containers/unord/unord.map/erase_if.pass.cpp index 5238d9ee0e89e..5498f454388b4 100644 --- a/libcxx/test/std/containers/unord/unord.map/erase_if.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.map/erase_if.pass.cpp @@ -67,7 +67,7 @@ void test() test0({1,2,3}, False, {1,2,3}); } -int main() +int main(int, char**) { test>(); test, std::equal_to, min_allocator>>> (); @@ -75,5 +75,7 @@ int main() test>(); test>(); + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.map/find_const.pass.cpp b/libcxx/test/std/containers/unord/unord.map/find_const.pass.cpp index 65c2a12088f50..1d63b4be2ef08 100644 --- a/libcxx/test/std/containers/unord/unord.map/find_const.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.map/find_const.pass.cpp @@ -20,7 +20,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_map C; @@ -67,4 +67,6 @@ int main() assert(i == c.cend()); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.map/find_non_const.pass.cpp b/libcxx/test/std/containers/unord/unord.map/find_non_const.pass.cpp index e6efa8e06429e..58a9cd35afd46 100644 --- a/libcxx/test/std/containers/unord/unord.map/find_non_const.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.map/find_non_const.pass.cpp @@ -20,7 +20,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_map C; @@ -67,4 +67,6 @@ int main() assert(i == c.end()); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.map/incomplete_type.pass.cpp b/libcxx/test/std/containers/unord/unord.map/incomplete_type.pass.cpp index f6faaac500ec9..ddcd6e14c50b8 100644 --- a/libcxx/test/std/containers/unord/unord.map/incomplete_type.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.map/incomplete_type.pass.cpp @@ -31,6 +31,8 @@ struct A { inline bool operator==(A const& L, A const& R) { return &L == &R; } -int main() { +int main(int, char**) { A a; + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.map/iterators.pass.cpp b/libcxx/test/std/containers/unord/unord.map/iterators.pass.cpp index 609e7d7c4af95..0b4e02e339f62 100644 --- a/libcxx/test/std/containers/unord/unord.map/iterators.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.map/iterators.pass.cpp @@ -27,7 +27,7 @@ #include "test_macros.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_map C; @@ -126,4 +126,6 @@ int main() assert (!(cii != ii1 )); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.map/load_factor.pass.cpp b/libcxx/test/std/containers/unord/unord.map/load_factor.pass.cpp index 418cdf7fd5f66..7a5fde8a48954 100644 --- a/libcxx/test/std/containers/unord/unord.map/load_factor.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.map/load_factor.pass.cpp @@ -23,7 +23,7 @@ #include "test_macros.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_map C; @@ -73,4 +73,6 @@ int main() assert(c.load_factor() == 0); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.map/local_iterators.pass.cpp b/libcxx/test/std/containers/unord/unord.map/local_iterators.pass.cpp index f51df487856e9..e24e1811ac1d8 100644 --- a/libcxx/test/std/containers/unord/unord.map/local_iterators.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.map/local_iterators.pass.cpp @@ -25,7 +25,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_map C; @@ -417,4 +417,6 @@ int main() assert(i->second == "four"); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.map/max_bucket_count.pass.cpp b/libcxx/test/std/containers/unord/unord.map/max_bucket_count.pass.cpp index d9c03128a3ab8..eb8f3e9d2ed5d 100644 --- a/libcxx/test/std/containers/unord/unord.map/max_bucket_count.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.map/max_bucket_count.pass.cpp @@ -21,7 +21,7 @@ #include "test_macros.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_map C; @@ -36,4 +36,6 @@ int main() assert(c.max_bucket_count() > 0); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.map/max_load_factor.pass.cpp b/libcxx/test/std/containers/unord/unord.map/max_load_factor.pass.cpp index e57eb71d32a1c..8620dd1bd46ee 100644 --- a/libcxx/test/std/containers/unord/unord.map/max_load_factor.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.map/max_load_factor.pass.cpp @@ -27,7 +27,7 @@ #include "test_macros.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_map C; @@ -65,4 +65,6 @@ int main() assert(false); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.map/max_size.pass.cpp b/libcxx/test/std/containers/unord/unord.map/max_size.pass.cpp index 3dc62d0b8aa76..7c2ec58de57f4 100644 --- a/libcxx/test/std/containers/unord/unord.map/max_size.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.map/max_size.pass.cpp @@ -20,7 +20,7 @@ #include "test_allocator.h" #include "test_macros.h" -int main() +int main(int, char**) { typedef std::pair KV; { @@ -49,4 +49,6 @@ int main() assert(c.max_size() <= max_dist); assert(c.max_size() <= alloc_max_size(c.get_allocator())); } + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.map/rehash.pass.cpp b/libcxx/test/std/containers/unord/unord.map/rehash.pass.cpp index ff7b1b75f222b..c8f079fb61780 100644 --- a/libcxx/test/std/containers/unord/unord.map/rehash.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.map/rehash.pass.cpp @@ -37,7 +37,7 @@ void test(const C& c) assert(c.at(4) == "four"); } -int main() +int main(int, char**) { { typedef std::unordered_map C; @@ -100,4 +100,6 @@ int main() test(c); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.map/reserve.pass.cpp b/libcxx/test/std/containers/unord/unord.map/reserve.pass.cpp index 983c872379a9a..622a9691e4575 100644 --- a/libcxx/test/std/containers/unord/unord.map/reserve.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.map/reserve.pass.cpp @@ -46,7 +46,7 @@ void reserve_invariant(size_t n) // LWG #2156 } } -int main() +int main(int, char**) { { typedef std::unordered_map C; @@ -104,4 +104,6 @@ int main() } #endif reserve_invariant(20); + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.map/size.pass.cpp b/libcxx/test/std/containers/unord/unord.map/size.pass.cpp index 22a922d1fbe24..d4e7cb97f6491 100644 --- a/libcxx/test/std/containers/unord/unord.map/size.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.map/size.pass.cpp @@ -18,7 +18,7 @@ #include "test_macros.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_map M; @@ -58,4 +58,6 @@ int main() assert(m.size() == 0); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.map/swap_member.pass.cpp b/libcxx/test/std/containers/unord/unord.map/swap_member.pass.cpp index 2763940f8c508..ff9b32e3ea27f 100644 --- a/libcxx/test/std/containers/unord/unord.map/swap_member.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.map/swap_member.pass.cpp @@ -25,7 +25,7 @@ #include "test_allocator.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef test_hash > Hash; @@ -567,4 +567,6 @@ int main() assert(c2.max_load_factor() == 1); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.map/types.pass.cpp b/libcxx/test/std/containers/unord/unord.map/types.pass.cpp index 1c8c86b5d93cc..e194f69f8ac17 100644 --- a/libcxx/test/std/containers/unord/unord.map/types.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.map/types.pass.cpp @@ -32,7 +32,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_map C; @@ -68,4 +68,6 @@ int main() static_assert((std::is_same::value), ""); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/allocator.pass.cpp b/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/allocator.pass.cpp index 0c1ee685b5204..8f1d7561b2470 100644 --- a/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/allocator.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/allocator.pass.cpp @@ -24,7 +24,7 @@ #include "test_allocator.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_map > A; @@ -185,4 +185,6 @@ int main() assert(c.max_load_factor() == 1); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/assign_init.pass.cpp b/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/assign_init.pass.cpp index 8f651b9298343..e9e6289888622 100644 --- a/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/assign_init.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/assign_init.pass.cpp @@ -27,7 +27,7 @@ #include "../../../test_hash.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::allocator > A; @@ -93,4 +93,6 @@ int main() assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/assign_move.pass.cpp b/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/assign_move.pass.cpp index ab0df753a3148..87b80cef1c48a 100644 --- a/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/assign_move.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/assign_move.pass.cpp @@ -29,7 +29,7 @@ #include "test_allocator.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef test_allocator > A; @@ -214,4 +214,6 @@ int main() assert(c.max_load_factor() == 1); assert(c0.size() == 0); } + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/compare_copy_constructible.fail.cpp b/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/compare_copy_constructible.fail.cpp index 1a3cbc38668da..2591c99f4e4f8 100644 --- a/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/compare_copy_constructible.fail.cpp +++ b/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/compare_copy_constructible.fail.cpp @@ -26,6 +26,8 @@ struct Comp { }; -int main() { +int main(int, char**) { std::unordered_map, Comp > m; + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/copy.pass.cpp b/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/copy.pass.cpp index c8e1d73d0ffbc..ee4bc43a54aa9 100644 --- a/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/copy.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/copy.pass.cpp @@ -27,7 +27,7 @@ #include "test_allocator.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_map> C; static_assert(!std::is_nothrow_default_constructible::value, ""); } + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/dtor_noexcept.pass.cpp b/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/dtor_noexcept.pass.cpp index 247e57600d649..4f4331fa0878c 100644 --- a/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/dtor_noexcept.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/dtor_noexcept.pass.cpp @@ -38,7 +38,7 @@ struct some_hash std::size_t operator()(T const&) const; }; -int main() +int main(int, char**) { { typedef std::unordered_map C; @@ -65,4 +65,6 @@ int main() static_assert(!std::is_nothrow_destructible::value, ""); } #endif // _LIBCPP_VERSION + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/hash_copy_constructible.fail.cpp b/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/hash_copy_constructible.fail.cpp index 3da6282407883..026e319fcbdc9 100644 --- a/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/hash_copy_constructible.fail.cpp +++ b/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/hash_copy_constructible.fail.cpp @@ -26,6 +26,8 @@ struct Hash { }; -int main() { +int main(int, char**) { std::unordered_map > m; + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/init.pass.cpp b/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/init.pass.cpp index 6b00cb7c51509..00b4a2f0bc2a8 100644 --- a/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/init.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/init.pass.cpp @@ -29,7 +29,7 @@ #include "test_allocator.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_map 11 + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/init_size.pass.cpp b/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/init_size.pass.cpp index 702b9231ea2b2..f1dbad9feca9f 100644 --- a/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/init_size.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/init_size.pass.cpp @@ -29,7 +29,7 @@ #include "test_allocator.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_map P; @@ -195,4 +195,6 @@ int main() assert(c0.empty()); } + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/move_assign_noexcept.pass.cpp b/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/move_assign_noexcept.pass.cpp index 71e913f27563a..78ac7d787c28b 100644 --- a/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/move_assign_noexcept.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/move_assign_noexcept.pass.cpp @@ -44,7 +44,7 @@ struct some_hash std::size_t operator()(T const&) const; }; -int main() +int main(int, char**) { { typedef std::unordered_map C; @@ -71,4 +71,6 @@ int main() some_comp> C; static_assert(!std::is_nothrow_move_assignable::value, ""); } + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/move_noexcept.pass.cpp b/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/move_noexcept.pass.cpp index 09fefc4baf40d..62175145de9cd 100644 --- a/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/move_noexcept.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/move_noexcept.pass.cpp @@ -41,7 +41,7 @@ struct some_hash std::size_t operator()(T const&) const; }; -int main() +int main(int, char**) { #if defined(_LIBCPP_VERSION) { @@ -68,4 +68,6 @@ int main() some_comp> C; static_assert(!std::is_nothrow_move_constructible::value, ""); } + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/range.pass.cpp b/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/range.pass.cpp index 002a39a861c87..a6d87150846fb 100644 --- a/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/range.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/range.pass.cpp @@ -30,7 +30,7 @@ #include "test_allocator.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_map C; @@ -140,4 +140,6 @@ int main() #endif } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.map/unord.map.elem/index.pass.cpp b/libcxx/test/std/containers/unord/unord.map/unord.map.elem/index.pass.cpp index 4ddb9f986a768..ff83f1d6842b6 100644 --- a/libcxx/test/std/containers/unord/unord.map/unord.map.elem/index.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.map/unord.map.elem/index.pass.cpp @@ -28,7 +28,7 @@ #include "container_test_types.h" #endif -int main() +int main(int, char**) { { typedef std::unordered_map C; @@ -159,4 +159,6 @@ int main() } } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.map/unord.map.elem/index_tuple.pass.cpp b/libcxx/test/std/containers/unord/unord.map/unord.map.elem/index_tuple.pass.cpp index feea53ecdab11..4719b5583b31e 100644 --- a/libcxx/test/std/containers/unord/unord.map/unord.map.elem/index_tuple.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.map/unord.map.elem/index_tuple.pass.cpp @@ -28,8 +28,10 @@ struct my_hash size_t operator()(const tuple&) const {return 0;} }; -int main() +int main(int, char**) { unordered_map, size_t, my_hash> m; m[make_tuple(2,3)]=7; + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/clear.pass.cpp b/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/clear.pass.cpp index 6b0f03d9c2874..64fe72ecdacdb 100644 --- a/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/clear.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/clear.pass.cpp @@ -21,7 +21,7 @@ #include "test_macros.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_map C; @@ -60,4 +60,6 @@ int main() assert(c.size() == 0); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/emplace.pass.cpp b/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/emplace.pass.cpp index 2ea264b53439f..63a269601f093 100644 --- a/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/emplace.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/emplace.pass.cpp @@ -23,7 +23,7 @@ #include "../../../Emplaceable.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_map C; @@ -74,4 +74,6 @@ int main() assert(r.first->first == 5); assert(r.first->second == Emplaceable(6, 7)); } + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/emplace_hint.pass.cpp b/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/emplace_hint.pass.cpp index a130d65c0ce61..01e8d9c6fab7b 100644 --- a/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/emplace_hint.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/emplace_hint.pass.cpp @@ -24,7 +24,7 @@ #include "../../../Emplaceable.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_map C; @@ -71,4 +71,6 @@ int main() assert(r->first == 5); assert(r->second == Emplaceable(6, 7)); } + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/erase_const_iter.pass.cpp b/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/erase_const_iter.pass.cpp index 78e70fbba4b93..1d0b18bf1d47e 100644 --- a/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/erase_const_iter.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/erase_const_iter.pass.cpp @@ -30,7 +30,7 @@ struct TemplateConstructor bool operator==(const TemplateConstructor&, const TemplateConstructor&) { return false; } struct Hash { size_t operator() (const TemplateConstructor &) const { return 0; } }; -int main() +int main(int, char**) { { typedef std::unordered_map C; @@ -89,4 +89,6 @@ int main() m.erase(it); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/erase_iter_db1.pass.cpp b/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/erase_iter_db1.pass.cpp index b923752ef5800..38ba03d5e88f6 100644 --- a/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/erase_iter_db1.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/erase_iter_db1.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::pair P; @@ -31,8 +31,10 @@ int main() #else -int main() +int main(int, char**) { + + return 0; } #endif diff --git a/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/erase_iter_db2.pass.cpp b/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/erase_iter_db2.pass.cpp index fcc499ebf8fa6..887f7859b3e72 100644 --- a/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/erase_iter_db2.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/erase_iter_db2.pass.cpp @@ -19,7 +19,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::pair P; @@ -34,8 +34,10 @@ int main() #else -int main() +int main(int, char**) { + + return 0; } #endif diff --git a/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/erase_iter_iter_db1.pass.cpp b/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/erase_iter_iter_db1.pass.cpp index fd9931ad2a0c5..15c6745adc95f 100644 --- a/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/erase_iter_iter_db1.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/erase_iter_iter_db1.pass.cpp @@ -19,7 +19,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::pair P; @@ -33,8 +33,10 @@ int main() #else -int main() +int main(int, char**) { + + return 0; } #endif diff --git a/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/erase_iter_iter_db2.pass.cpp b/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/erase_iter_iter_db2.pass.cpp index 9f64445af0bbb..0ae0674adb79d 100644 --- a/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/erase_iter_iter_db2.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/erase_iter_iter_db2.pass.cpp @@ -19,7 +19,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::pair P; @@ -33,8 +33,10 @@ int main() #else -int main() +int main(int, char**) { + + return 0; } #endif diff --git a/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/erase_iter_iter_db3.pass.cpp b/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/erase_iter_iter_db3.pass.cpp index 16cf5367fd42f..134d075ec6ec1 100644 --- a/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/erase_iter_iter_db3.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/erase_iter_iter_db3.pass.cpp @@ -19,7 +19,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::pair P; @@ -33,8 +33,10 @@ int main() #else -int main() +int main(int, char**) { + + return 0; } #endif diff --git a/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/erase_iter_iter_db4.pass.cpp b/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/erase_iter_iter_db4.pass.cpp index 2c59093458fa0..17745175bae1a 100644 --- a/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/erase_iter_iter_db4.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/erase_iter_iter_db4.pass.cpp @@ -19,7 +19,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::pair P; @@ -32,8 +32,10 @@ int main() #else -int main() +int main(int, char**) { + + return 0; } #endif diff --git a/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/erase_key.pass.cpp b/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/erase_key.pass.cpp index aa2dea3d9edd4..305d149a58374 100644 --- a/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/erase_key.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/erase_key.pass.cpp @@ -38,7 +38,7 @@ bool only_deletions ( const Unordered &whole, const Unordered &part ) { #endif -int main() +int main(int, char**) { { typedef std::unordered_map C; @@ -174,4 +174,6 @@ int main() assert (only_deletions (m, m2)); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/erase_range.pass.cpp b/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/erase_range.pass.cpp index 5c2c676f2fb38..839d65733dea5 100644 --- a/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/erase_range.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/erase_range.pass.cpp @@ -20,7 +20,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_map C; @@ -95,4 +95,6 @@ int main() assert(k == c.end()); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/extract_iterator.pass.cpp b/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/extract_iterator.pass.cpp index 332eea13fb6f7..3ad30510f92c0 100644 --- a/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/extract_iterator.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/extract_iterator.pass.cpp @@ -40,7 +40,7 @@ void test(Container& c) assert(c.size() == 0); } -int main() +int main(int, char**) { { using map_type = std::unordered_map; @@ -63,4 +63,6 @@ int main() min_alloc_map m = {{1, 1}, {2, 2}, {3, 3}, {4, 4}, {5, 5}, {6, 6}}; test(m); } + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/extract_key.pass.cpp b/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/extract_key.pass.cpp index 3272a438393b9..4d6c24e6e996c 100644 --- a/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/extract_key.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/extract_key.pass.cpp @@ -45,7 +45,7 @@ void test(Container& c, KeyTypeIter first, KeyTypeIter last) } } -int main() +int main(int, char**) { { std::unordered_map m = {{1,1}, {2,2}, {3,3}, {4,4}, {5,5}, {6,6}}; @@ -72,4 +72,6 @@ int main() int keys[] = {1, 2, 3, 4, 5, 6}; test(m, std::begin(keys), std::end(keys)); } + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/insert_and_emplace_allocator_requirements.pass.cpp b/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/insert_and_emplace_allocator_requirements.pass.cpp index f84e98c2babb0..71d456e6619d1 100644 --- a/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/insert_and_emplace_allocator_requirements.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/insert_and_emplace_allocator_requirements.pass.cpp @@ -21,10 +21,12 @@ #include "container_test_types.h" #include "../../../map_allocator_requirement_test_templates.h" -int main() +int main(int, char**) { testMapInsert >(); testMapInsertHint >(); testMapEmplace >(); testMapEmplaceHint >(); + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/insert_const_lvalue.pass.cpp b/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/insert_const_lvalue.pass.cpp index 3b4b7db1dafbb..eb505218fdd1d 100644 --- a/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/insert_const_lvalue.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/insert_const_lvalue.pass.cpp @@ -65,7 +65,7 @@ void do_insert_cv_test() assert(r.first->second == 3); } -int main() +int main(int, char**) { { typedef std::unordered_map M; @@ -78,4 +78,6 @@ int main() do_insert_cv_test(); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/insert_hint_const_lvalue.pass.cpp b/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/insert_hint_const_lvalue.pass.cpp index 60c5d359c73de..b1b77eb9c184e 100644 --- a/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/insert_hint_const_lvalue.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/insert_hint_const_lvalue.pass.cpp @@ -56,7 +56,7 @@ void do_insert_hint_const_lvalue_test() assert(r->second == 4); } -int main() +int main(int, char**) { do_insert_hint_const_lvalue_test >(); #if TEST_STD_VER >= 11 @@ -80,4 +80,6 @@ int main() assert(false); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/insert_hint_rvalue.pass.cpp b/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/insert_hint_rvalue.pass.cpp index 4670fbfbed83d..b7374d1a6eeac 100644 --- a/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/insert_hint_rvalue.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/insert_hint_rvalue.pass.cpp @@ -28,7 +28,7 @@ #include "MoveOnly.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_map C; @@ -173,4 +173,6 @@ int main() assert(false); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/insert_init.pass.cpp b/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/insert_init.pass.cpp index 20b5fb649c80d..27e8747348e7c 100644 --- a/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/insert_init.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/insert_init.pass.cpp @@ -23,7 +23,7 @@ #include "test_iterators.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_map C; @@ -66,4 +66,6 @@ int main() assert(c.at(3) == "three"); assert(c.at(4) == "four"); } + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/insert_node_type.pass.cpp b/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/insert_node_type.pass.cpp index 5840950d7a286..24d0a23a59ff3 100644 --- a/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/insert_node_type.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/insert_node_type.pass.cpp @@ -74,10 +74,12 @@ void test(Container& c) } } -int main() +int main(int, char**) { std::unordered_map m; test(m); std::unordered_map, std::equal_to, min_allocator>> m2; test(m2); + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/insert_node_type_hint.pass.cpp b/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/insert_node_type_hint.pass.cpp index 3a97868804aa7..21ccb88caf0bb 100644 --- a/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/insert_node_type_hint.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/insert_node_type_hint.pass.cpp @@ -54,10 +54,12 @@ void test(Container& c) } } -int main() +int main(int, char**) { std::unordered_map m; test(m); std::unordered_map, std::equal_to, min_allocator>> m2; test(m2); + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/insert_or_assign.pass.cpp b/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/insert_or_assign.pass.cpp index 5c02fc1290dc8..7fc3ff187be43 100644 --- a/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/insert_or_assign.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/insert_or_assign.pass.cpp @@ -61,7 +61,7 @@ namespace std { }; } -int main() +int main(int, char**) { { // pair insert_or_assign(const key_type& k, M&& obj); @@ -188,4 +188,6 @@ int main() assert(r->second.get() == 5); // value } + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/insert_range.pass.cpp b/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/insert_range.pass.cpp index a70703b5fa6d2..1d51bdb4fbc43 100644 --- a/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/insert_range.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/insert_range.pass.cpp @@ -22,7 +22,7 @@ #include "test_iterators.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_map C; @@ -67,4 +67,6 @@ int main() assert(c.at(4) == "four"); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/insert_rvalue.pass.cpp b/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/insert_rvalue.pass.cpp index ed0a2a58df8e0..1f8528ab5b167 100644 --- a/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/insert_rvalue.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/insert_rvalue.pass.cpp @@ -24,7 +24,7 @@ #include "MoveOnly.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_map C; @@ -172,4 +172,6 @@ int main() assert(r.first->first == 5.5); assert(r.first->second == 4); } + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/merge.pass.cpp b/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/merge.pass.cpp index 17be66154a1ca..1437d46d2e287 100644 --- a/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/merge.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/merge.pass.cpp @@ -49,7 +49,7 @@ struct throw_hasher }; #endif -int main() +int main(int, char**) { { std::unordered_map src{{1, 0}, {3, 0}, {5, 0}}; @@ -153,4 +153,5 @@ int main() first.merge(std::move(second)); } } + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/try.emplace.pass.cpp b/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/try.emplace.pass.cpp index dbdb1b89bf66f..c3ee0050a26a1 100644 --- a/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/try.emplace.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/try.emplace.pass.cpp @@ -60,7 +60,7 @@ namespace std { }; } -int main() +int main(int, char**) { { // pair try_emplace(const key_type& k, Args&&... args); @@ -185,4 +185,6 @@ int main() assert(r->first.get() == 3); // key assert(r->second.get() == 4); // value } + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.map/unord.map.swap/db_swap_1.pass.cpp b/libcxx/test/std/containers/unord/unord.map/unord.map.swap/db_swap_1.pass.cpp index e47e7b6600f46..67a49d4bb8bf9 100644 --- a/libcxx/test/std/containers/unord/unord.map/unord.map.swap/db_swap_1.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.map/unord.map.swap/db_swap_1.pass.cpp @@ -21,7 +21,7 @@ #include #include -int main() +int main(int, char**) { #if _LIBCPP_DEBUG >= 1 { @@ -40,4 +40,6 @@ int main() assert(false); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.map/unord.map.swap/swap_noexcept.pass.cpp b/libcxx/test/std/containers/unord/unord.map/unord.map.swap/swap_noexcept.pass.cpp index 2522270fd7ae0..44ee7be490da1 100644 --- a/libcxx/test/std/containers/unord/unord.map/unord.map.swap/swap_noexcept.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.map/unord.map.swap/swap_noexcept.pass.cpp @@ -119,7 +119,7 @@ struct some_alloc3 }; -int main() +int main(int, char**) { typedef std::pair MapType; { @@ -188,4 +188,6 @@ int main() } #endif // _LIBCPP_VERSION #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.map/unord.map.swap/swap_non_member.pass.cpp b/libcxx/test/std/containers/unord/unord.map/unord.map.swap/swap_non_member.pass.cpp index 9966bcd4f9db7..7852394cdfbb8 100644 --- a/libcxx/test/std/containers/unord/unord.map/unord.map.swap/swap_non_member.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.map/unord.map.swap/swap_non_member.pass.cpp @@ -25,7 +25,7 @@ #include "test_allocator.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef test_hash > Hash; @@ -567,4 +567,6 @@ int main() assert(c2.max_load_factor() == 1); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multimap/allocator_mismatch.fail.cpp b/libcxx/test/std/containers/unord/unord.multimap/allocator_mismatch.fail.cpp index f1e7a2a96f5d6..ba24ca3cc9562 100644 --- a/libcxx/test/std/containers/unord/unord.multimap/allocator_mismatch.fail.cpp +++ b/libcxx/test/std/containers/unord/unord.multimap/allocator_mismatch.fail.cpp @@ -11,7 +11,9 @@ #include -int main() +int main(int, char**) { std::unordered_multimap, std::less, std::allocator > m; + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multimap/bucket.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/bucket.pass.cpp index 7b10eb86beb9f..c6c8b217cc4b9 100644 --- a/libcxx/test/std/containers/unord/unord.multimap/bucket.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multimap/bucket.pass.cpp @@ -25,7 +25,7 @@ #include "test_macros.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_multimap C; @@ -74,4 +74,6 @@ int main() assert(false); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multimap/bucket_count.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/bucket_count.pass.cpp index 340c1dcc2c2c6..9c07357190944 100644 --- a/libcxx/test/std/containers/unord/unord.multimap/bucket_count.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multimap/bucket_count.pass.cpp @@ -20,7 +20,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { { typedef std::unordered_multimap C; @@ -44,4 +44,6 @@ int main() const C c(std::begin(a), std::end(a)); assert(c.bucket_count() >= 8); } + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multimap/bucket_size.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/bucket_size.pass.cpp index b7c7d653f5fa6..f491975215342 100644 --- a/libcxx/test/std/containers/unord/unord.multimap/bucket_size.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multimap/bucket_size.pass.cpp @@ -25,7 +25,7 @@ #include "test_macros.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_multimap C; @@ -82,4 +82,6 @@ int main() assert(false); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multimap/count.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/count.pass.cpp index 15134dd0f228c..4a6ec5d6576e8 100644 --- a/libcxx/test/std/containers/unord/unord.multimap/count.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multimap/count.pass.cpp @@ -20,7 +20,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_multimap C; @@ -67,4 +67,6 @@ int main() assert(c.count(5) == 0); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multimap/db_iterators_7.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/db_iterators_7.pass.cpp index 2cffa13a4e052..463b49938efbc 100644 --- a/libcxx/test/std/containers/unord/unord.multimap/db_iterators_7.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multimap/db_iterators_7.pass.cpp @@ -23,7 +23,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_multimap C; @@ -52,8 +52,10 @@ int main() #else -int main() +int main(int, char**) { + + return 0; } #endif diff --git a/libcxx/test/std/containers/unord/unord.multimap/db_iterators_8.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/db_iterators_8.pass.cpp index 62da82f2d1069..38395e5f9605c 100644 --- a/libcxx/test/std/containers/unord/unord.multimap/db_iterators_8.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multimap/db_iterators_8.pass.cpp @@ -23,7 +23,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_multimap C; @@ -48,8 +48,10 @@ int main() #else -int main() +int main(int, char**) { + + return 0; } #endif diff --git a/libcxx/test/std/containers/unord/unord.multimap/db_local_iterators_7.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/db_local_iterators_7.pass.cpp index a609b5dd0cc0f..04d8b3ff06c55 100644 --- a/libcxx/test/std/containers/unord/unord.multimap/db_local_iterators_7.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multimap/db_local_iterators_7.pass.cpp @@ -23,7 +23,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_multimap C; @@ -49,8 +49,10 @@ int main() #else -int main() +int main(int, char**) { + + return 0; } #endif diff --git a/libcxx/test/std/containers/unord/unord.multimap/db_local_iterators_8.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/db_local_iterators_8.pass.cpp index a397cad563ed8..69ef06993dcf0 100644 --- a/libcxx/test/std/containers/unord/unord.multimap/db_local_iterators_8.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multimap/db_local_iterators_8.pass.cpp @@ -23,7 +23,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_multimap C; @@ -46,8 +46,10 @@ int main() #else -int main() +int main(int, char**) { + + return 0; } #endif diff --git a/libcxx/test/std/containers/unord/unord.multimap/empty.fail.cpp b/libcxx/test/std/containers/unord/unord.multimap/empty.fail.cpp index 93ec56e94f759..4eb7bfc9c36c4 100644 --- a/libcxx/test/std/containers/unord/unord.multimap/empty.fail.cpp +++ b/libcxx/test/std/containers/unord/unord.multimap/empty.fail.cpp @@ -20,8 +20,10 @@ #include "test_macros.h" -int main () +int main(int, char**) { std::unordered_multimap c; c.empty(); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multimap/empty.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/empty.pass.cpp index 58f4e602f9b62..6189b7f0e3ded 100644 --- a/libcxx/test/std/containers/unord/unord.multimap/empty.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multimap/empty.pass.cpp @@ -18,7 +18,7 @@ #include "test_macros.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_multimap M; @@ -42,4 +42,6 @@ int main() assert(m.empty()); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multimap/eq.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/eq.pass.cpp index 85dfb00923da4..5751916875fd1 100644 --- a/libcxx/test/std/containers/unord/unord.multimap/eq.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multimap/eq.pass.cpp @@ -24,7 +24,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_multimap C; @@ -177,4 +177,6 @@ int main() assert(!(c1 != c2)); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multimap/equal_range_const.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/equal_range_const.pass.cpp index 88686a1fd3b98..148081be7be6a 100644 --- a/libcxx/test/std/containers/unord/unord.multimap/equal_range_const.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multimap/equal_range_const.pass.cpp @@ -21,7 +21,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_multimap C; @@ -100,4 +100,6 @@ int main() } } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multimap/equal_range_non_const.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/equal_range_non_const.pass.cpp index 5e833c978ada1..5da87166bdab4 100644 --- a/libcxx/test/std/containers/unord/unord.multimap/equal_range_non_const.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multimap/equal_range_non_const.pass.cpp @@ -21,7 +21,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_multimap C; @@ -100,4 +100,6 @@ int main() } } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multimap/erase_if.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/erase_if.pass.cpp index ef44cd81bf86e..2cec092056da2 100644 --- a/libcxx/test/std/containers/unord/unord.multimap/erase_if.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multimap/erase_if.pass.cpp @@ -78,7 +78,7 @@ void test() test0({1,2,3}, False, {1,2,3}); } -int main() +int main(int, char**) { test>(); test, std::equal_to, min_allocator>>> (); @@ -86,4 +86,6 @@ int main() test>(); test>(); + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multimap/find_const.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/find_const.pass.cpp index c48d6ffff1d3b..271bf9d0c6085 100644 --- a/libcxx/test/std/containers/unord/unord.multimap/find_const.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multimap/find_const.pass.cpp @@ -20,7 +20,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_multimap C; @@ -67,4 +67,6 @@ int main() assert(i == c.cend()); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multimap/find_non_const.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/find_non_const.pass.cpp index b8975ef09acd4..3e642e346f149 100644 --- a/libcxx/test/std/containers/unord/unord.multimap/find_non_const.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multimap/find_non_const.pass.cpp @@ -20,7 +20,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_multimap C; @@ -67,4 +67,6 @@ int main() assert(i == c.end()); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multimap/incomplete.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/incomplete.pass.cpp index 77f03f51fc757..6ea4931299b6d 100644 --- a/libcxx/test/std/containers/unord/unord.multimap/incomplete.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multimap/incomplete.pass.cpp @@ -31,6 +31,8 @@ struct A { inline bool operator==(A const& L, A const& R) { return &L == &R; } -int main() { +int main(int, char**) { A a; + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multimap/iterators.fail.cpp b/libcxx/test/std/containers/unord/unord.multimap/iterators.fail.cpp index aed2f713879c1..0c1b50fac059c 100644 --- a/libcxx/test/std/containers/unord/unord.multimap/iterators.fail.cpp +++ b/libcxx/test/std/containers/unord/unord.multimap/iterators.fail.cpp @@ -25,7 +25,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { { typedef std::unordered_multimap C; @@ -67,4 +67,6 @@ int main() assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); } + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multimap/iterators.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/iterators.pass.cpp index e669be6f3b880..5fd52beebbc74 100644 --- a/libcxx/test/std/containers/unord/unord.multimap/iterators.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multimap/iterators.pass.cpp @@ -27,7 +27,7 @@ #include "test_macros.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_multimap C; @@ -132,4 +132,6 @@ int main() assert (!(cii != ii1 )); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multimap/load_factor.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/load_factor.pass.cpp index f1624616ec40a..ae8a8403b8594 100644 --- a/libcxx/test/std/containers/unord/unord.multimap/load_factor.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multimap/load_factor.pass.cpp @@ -22,7 +22,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_multimap C; @@ -72,4 +72,6 @@ int main() assert(c.load_factor() == 0); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multimap/local_iterators.fail.cpp b/libcxx/test/std/containers/unord/unord.multimap/local_iterators.fail.cpp index 313c9e3782d6b..f5af791804bdd 100644 --- a/libcxx/test/std/containers/unord/unord.multimap/local_iterators.fail.cpp +++ b/libcxx/test/std/containers/unord/unord.multimap/local_iterators.fail.cpp @@ -25,7 +25,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { { typedef std::unordered_multimap C; @@ -284,4 +284,6 @@ int main() j = c.cend(b); assert(std::distance(i, j) == 0); } + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multimap/local_iterators.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/local_iterators.pass.cpp index 61815a9c67357..b5dd2d4b0fd03 100644 --- a/libcxx/test/std/containers/unord/unord.multimap/local_iterators.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multimap/local_iterators.pass.cpp @@ -26,7 +26,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_multimap C; @@ -658,4 +658,6 @@ int main() assert(std::distance(i, j) == 0); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multimap/max_bucket_count.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/max_bucket_count.pass.cpp index b2442ff87250e..c55f4de8d44de 100644 --- a/libcxx/test/std/containers/unord/unord.multimap/max_bucket_count.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multimap/max_bucket_count.pass.cpp @@ -20,7 +20,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_multimap C; @@ -35,4 +35,6 @@ int main() assert(c.max_bucket_count() > 0); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multimap/max_load_factor.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/max_load_factor.pass.cpp index a75052ebdb1c4..ed46b681b7d5b 100644 --- a/libcxx/test/std/containers/unord/unord.multimap/max_load_factor.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multimap/max_load_factor.pass.cpp @@ -25,7 +25,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_multimap C; @@ -63,4 +63,6 @@ int main() assert(false); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multimap/max_size.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/max_size.pass.cpp index 5ed732902bf14..d03cf67ae7c69 100644 --- a/libcxx/test/std/containers/unord/unord.multimap/max_size.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multimap/max_size.pass.cpp @@ -20,7 +20,7 @@ #include "test_allocator.h" #include "test_macros.h" -int main() +int main(int, char**) { typedef std::pair KV; { @@ -51,4 +51,6 @@ int main() assert(c.max_size() <= max_dist); assert(c.max_size() <= alloc_max_size(c.get_allocator())); } + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multimap/rehash.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/rehash.pass.cpp index aa8996a1a7a8a..99538e32d8276 100644 --- a/libcxx/test/std/containers/unord/unord.multimap/rehash.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multimap/rehash.pass.cpp @@ -81,7 +81,7 @@ void test(const C& c) assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); } -int main() +int main(int, char**) { { typedef std::unordered_multimap C; @@ -144,4 +144,6 @@ int main() test(c); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multimap/reserve.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/reserve.pass.cpp index 1771faa60c48b..811ac97fb4a26 100644 --- a/libcxx/test/std/containers/unord/unord.multimap/reserve.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multimap/reserve.pass.cpp @@ -61,7 +61,7 @@ void reserve_invariant(size_t n) // LWG #2156 } } -int main() +int main(int, char**) { { typedef std::unordered_multimap C; @@ -119,4 +119,6 @@ int main() } #endif reserve_invariant(20); + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multimap/scary.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/scary.pass.cpp index 321c38ceb26dc..4c4b1cd110e0a 100644 --- a/libcxx/test/std/containers/unord/unord.multimap/scary.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multimap/scary.pass.cpp @@ -14,11 +14,13 @@ #include -int main() +int main(int, char**) { typedef std::unordered_map M1; typedef std::unordered_multimap M2; M2::iterator i; M1::iterator j = i; ((void)j); + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multimap/size.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/size.pass.cpp index c24d93b5bfce1..493b8d757cfdd 100644 --- a/libcxx/test/std/containers/unord/unord.multimap/size.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multimap/size.pass.cpp @@ -18,7 +18,7 @@ #include "test_macros.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_multimap M; @@ -58,4 +58,6 @@ int main() assert(m.size() == 0); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multimap/swap_member.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/swap_member.pass.cpp index f57d821094f99..75806df979178 100644 --- a/libcxx/test/std/containers/unord/unord.multimap/swap_member.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multimap/swap_member.pass.cpp @@ -27,7 +27,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef test_hash > Hash; @@ -653,4 +653,6 @@ int main() assert(c2.max_load_factor() == 1); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multimap/types.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/types.pass.cpp index 5e7e1451b3706..2cb74a1545d7f 100644 --- a/libcxx/test/std/containers/unord/unord.multimap/types.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multimap/types.pass.cpp @@ -32,7 +32,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_multimap C; @@ -68,4 +68,6 @@ int main() static_assert((std::is_same::value), ""); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/allocator.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/allocator.pass.cpp index dadd81765a9be..e15999f183eea 100644 --- a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/allocator.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/allocator.pass.cpp @@ -24,7 +24,7 @@ #include "test_allocator.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_multimap > A; @@ -227,4 +227,6 @@ int main() assert(c.max_load_factor() == 1); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/assign_init.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/assign_init.pass.cpp index cae8605dbb20f..5947905a62e46 100644 --- a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/assign_init.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/assign_init.pass.cpp @@ -28,7 +28,7 @@ #include "test_allocator.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef test_allocator > A; @@ -142,4 +142,6 @@ int main() assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/assign_move.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/assign_move.pass.cpp index f918721113dd4..21c791a814f20 100644 --- a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/assign_move.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/assign_move.pass.cpp @@ -29,7 +29,7 @@ #include "test_allocator.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef test_allocator > A; @@ -291,4 +291,6 @@ int main() assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/compare_copy_constructible.fail.cpp b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/compare_copy_constructible.fail.cpp index 7438bf5301c0d..fe288035fd02f 100644 --- a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/compare_copy_constructible.fail.cpp +++ b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/compare_copy_constructible.fail.cpp @@ -26,6 +26,8 @@ struct Comp { }; -int main() { +int main(int, char**) { std::unordered_multimap, Comp > m; + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/copy.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/copy.pass.cpp index 7747aef541d41..d570162222fd8 100644 --- a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/copy.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/copy.pass.cpp @@ -27,7 +27,7 @@ #include "test_allocator.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_multimap> C; static_assert(!std::is_nothrow_default_constructible::value, ""); } + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/dtor_noexcept.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/dtor_noexcept.pass.cpp index f276bf77731fe..8f677edcb9c0d 100644 --- a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/dtor_noexcept.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/dtor_noexcept.pass.cpp @@ -37,7 +37,7 @@ struct some_hash std::size_t operator()(T const&) const; }; -int main() +int main(int, char**) { { typedef std::unordered_multimap C; @@ -64,4 +64,6 @@ int main() static_assert(!std::is_nothrow_destructible::value, ""); } #endif // _LIBCPP_VERSION + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/hash_copy_constructible.fail.cpp b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/hash_copy_constructible.fail.cpp index f6b8cb23e1805..2681710c94d01 100644 --- a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/hash_copy_constructible.fail.cpp +++ b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/hash_copy_constructible.fail.cpp @@ -26,6 +26,8 @@ struct Hash { }; -int main() { +int main(int, char**) { std::unordered_multimap > m; + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/init.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/init.pass.cpp index 43fb0f971ccc3..aba32bfeb84f3 100644 --- a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/init.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/init.pass.cpp @@ -29,7 +29,7 @@ #include "test_allocator.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_multimap 11 + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/init_size.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/init_size.pass.cpp index 37bf73b5ca1d6..194daf9f956f1 100644 --- a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/init_size.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/init_size.pass.cpp @@ -29,7 +29,7 @@ #include "test_allocator.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_multimap >()); assert((c.get_allocator() == min_allocator >())); } + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/init_size_hash.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/init_size_hash.pass.cpp index 9fbc5893fe98e..4613e3ca55413 100644 --- a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/init_size_hash.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/init_size_hash.pass.cpp @@ -29,7 +29,7 @@ #include "test_allocator.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_multimap >()); assert((c.get_allocator() == min_allocator >())); } + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/init_size_hash_equal.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/init_size_hash_equal.pass.cpp index 398103dee0930..582b68b94e2b3 100644 --- a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/init_size_hash_equal.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/init_size_hash_equal.pass.cpp @@ -30,7 +30,7 @@ #include "test_allocator.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_multimap >(9)); assert((c.get_allocator() == min_allocator >())); } + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/init_size_hash_equal_allocator.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/init_size_hash_equal_allocator.pass.cpp index 2f81c2a01cbd5..9019d9221d012 100644 --- a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/init_size_hash_equal_allocator.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/init_size_hash_equal_allocator.pass.cpp @@ -30,7 +30,7 @@ #include "test_allocator.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_multimap >(9)); assert(c.get_allocator() == A{}); } + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/move.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/move.pass.cpp index 4bfc4d3b7ac09..bfa2327e598b9 100644 --- a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/move.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/move.pass.cpp @@ -29,7 +29,7 @@ #include "test_allocator.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_multimap P; @@ -289,4 +289,6 @@ int main() assert(c0.empty()); } + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/move_assign_noexcept.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/move_assign_noexcept.pass.cpp index 649dfd94b819b..e6f7f4c999bf5 100644 --- a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/move_assign_noexcept.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/move_assign_noexcept.pass.cpp @@ -43,7 +43,7 @@ struct some_hash std::size_t operator()(T const&) const; }; -int main() +int main(int, char**) { { typedef std::unordered_multimap C; @@ -70,4 +70,6 @@ int main() some_comp> C; static_assert(!std::is_nothrow_move_assignable::value, ""); } + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/move_noexcept.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/move_noexcept.pass.cpp index c1f6d3143fa41..68ec2600aeba4 100644 --- a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/move_noexcept.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/move_noexcept.pass.cpp @@ -40,7 +40,7 @@ struct some_hash std::size_t operator()(T const&) const; }; -int main() +int main(int, char**) { #if defined(_LIBCPP_VERSION) { @@ -67,4 +67,6 @@ int main() some_comp> C; static_assert(!std::is_nothrow_move_constructible::value, ""); } + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/range.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/range.pass.cpp index 3158236a46153..4b916fa419a51 100644 --- a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/range.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/range.pass.cpp @@ -30,7 +30,7 @@ #include "test_allocator.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_multimap >())); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/range_size_hash.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/range_size_hash.pass.cpp index a009d1372bc2e..ee9de7a4ec365 100644 --- a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/range_size_hash.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/range_size_hash.pass.cpp @@ -31,7 +31,7 @@ #include "test_allocator.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_multimap >())); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/range_size_hash_equal.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/range_size_hash_equal.pass.cpp index b6548bcc54399..54c1f1e9d8567 100644 --- a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/range_size_hash_equal.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/range_size_hash_equal.pass.cpp @@ -31,7 +31,7 @@ #include "test_allocator.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_multimap >())); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/range_size_hash_equal_allocator.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/range_size_hash_equal_allocator.pass.cpp index 288ad6dd3657a..68181d714c1c5 100644 --- a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/range_size_hash_equal_allocator.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/range_size_hash_equal_allocator.pass.cpp @@ -32,7 +32,7 @@ #include "test_allocator.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_multimap C; @@ -60,4 +60,6 @@ int main() assert(c.size() == 0); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/emplace.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/emplace.pass.cpp index aa38084df8267..1a20fb876daa0 100644 --- a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/emplace.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/emplace.pass.cpp @@ -23,7 +23,7 @@ #include "../../../Emplaceable.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_multimap C; @@ -68,4 +68,6 @@ int main() assert(r->first == 5); assert(r->second == Emplaceable(6, 7)); } + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/emplace_hint.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/emplace_hint.pass.cpp index 3729b9e5f72d6..ef2904f365846 100644 --- a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/emplace_hint.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/emplace_hint.pass.cpp @@ -25,7 +25,7 @@ #include "min_allocator.h" #include "test_macros.h" -int main() +int main(int, char**) { { typedef std::unordered_multimap C; @@ -88,4 +88,6 @@ int main() assert(r->first == 3); LIBCPP_ASSERT(r->second == Emplaceable(5, 6)); } + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/erase_const_iter.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/erase_const_iter.pass.cpp index 0444252566c7c..5ab975077d88d 100644 --- a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/erase_const_iter.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/erase_const_iter.pass.cpp @@ -30,7 +30,7 @@ struct TemplateConstructor bool operator==(const TemplateConstructor&, const TemplateConstructor&) { return false; } struct Hash { size_t operator() (const TemplateConstructor &) const { return 0; } }; -int main() +int main(int, char**) { { typedef std::unordered_multimap C; @@ -143,4 +143,6 @@ int main() m.erase(it); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/erase_iter_db1.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/erase_iter_db1.pass.cpp index 4986848cd2edd..30fae95f7595f 100644 --- a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/erase_iter_db1.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/erase_iter_db1.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::pair P; @@ -31,8 +31,10 @@ int main() #else -int main() +int main(int, char**) { + + return 0; } #endif diff --git a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/erase_iter_db2.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/erase_iter_db2.pass.cpp index 035a796e90d06..3c0418497b0b7 100644 --- a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/erase_iter_db2.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/erase_iter_db2.pass.cpp @@ -19,7 +19,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::pair P; @@ -34,8 +34,10 @@ int main() #else -int main() +int main(int, char**) { + + return 0; } #endif diff --git a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/erase_iter_iter_db1.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/erase_iter_iter_db1.pass.cpp index 8f38b65efc048..6c3a2cf38556f 100644 --- a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/erase_iter_iter_db1.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/erase_iter_iter_db1.pass.cpp @@ -19,7 +19,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::pair P; @@ -33,8 +33,10 @@ int main() #else -int main() +int main(int, char**) { + + return 0; } #endif diff --git a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/erase_iter_iter_db2.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/erase_iter_iter_db2.pass.cpp index 7d6a7794aa944..6b0ea3528c741 100644 --- a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/erase_iter_iter_db2.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/erase_iter_iter_db2.pass.cpp @@ -19,7 +19,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::pair P; @@ -33,8 +33,10 @@ int main() #else -int main() +int main(int, char**) { + + return 0; } #endif diff --git a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/erase_iter_iter_db3.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/erase_iter_iter_db3.pass.cpp index 2502f123d95cf..0b53c1cdf08f9 100644 --- a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/erase_iter_iter_db3.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/erase_iter_iter_db3.pass.cpp @@ -19,7 +19,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::pair P; @@ -33,8 +33,10 @@ int main() #else -int main() +int main(int, char**) { + + return 0; } #endif diff --git a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/erase_iter_iter_db4.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/erase_iter_iter_db4.pass.cpp index a098f2a6698bd..7cea5e78938b0 100644 --- a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/erase_iter_iter_db4.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/erase_iter_iter_db4.pass.cpp @@ -19,7 +19,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::pair P; @@ -32,8 +32,10 @@ int main() #else -int main() +int main(int, char**) { + + return 0; } #endif diff --git a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/erase_key.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/erase_key.pass.cpp index 7a94e3489bf8a..5e19c970a42ce 100644 --- a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/erase_key.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/erase_key.pass.cpp @@ -37,7 +37,7 @@ bool only_deletions ( const Unordered &whole, const Unordered &part ) { } #endif -int main() +int main(int, char**) { { typedef std::unordered_multimap C; @@ -385,4 +385,6 @@ int main() assert (only_deletions (m, m2)); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/erase_range.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/erase_range.pass.cpp index 46ca4b40d5a57..50f058422b930 100644 --- a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/erase_range.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/erase_range.pass.cpp @@ -21,7 +21,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_multimap C; @@ -176,4 +176,6 @@ int main() assert(k == c.end()); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/extract_iterator.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/extract_iterator.pass.cpp index b3ecc3556199c..a06aca77432c7 100644 --- a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/extract_iterator.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/extract_iterator.pass.cpp @@ -40,7 +40,7 @@ void test(Container& c) assert(c.size() == 0); } -int main() +int main(int, char**) { { using map_type = std::unordered_multimap; @@ -63,4 +63,6 @@ int main() min_alloc_map m = {{1, 1}, {2, 2}, {3, 3}, {4, 4}, {5, 5}, {6, 6}}; test(m); } + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/extract_key.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/extract_key.pass.cpp index fb27c14344715..272d5acfb76ab 100644 --- a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/extract_key.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/extract_key.pass.cpp @@ -45,7 +45,7 @@ void test(Container& c, KeyTypeIter first, KeyTypeIter last) } } -int main() +int main(int, char**) { { std::unordered_multimap m = @@ -73,4 +73,6 @@ int main() int keys[] = {1, 2, 3, 4, 5, 6}; test(m, std::begin(keys), std::end(keys)); } + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/insert_allocator_requirements.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/insert_allocator_requirements.pass.cpp index 855b5ea611150..73fe6b49b79c8 100644 --- a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/insert_allocator_requirements.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/insert_allocator_requirements.pass.cpp @@ -19,8 +19,10 @@ #include "container_test_types.h" #include "../../../map_allocator_requirement_test_templates.h" -int main() +int main(int, char**) { testMultimapInsert >(); testMultimapInsertHint >(); + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/insert_const_lvalue.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/insert_const_lvalue.pass.cpp index 112af3ca4113b..8eaa69509495d 100644 --- a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/insert_const_lvalue.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/insert_const_lvalue.pass.cpp @@ -51,7 +51,7 @@ void do_insert_const_lvalue_test() assert(r->second == 4); } -int main() +int main(int, char**) { do_insert_const_lvalue_test >(); #if TEST_STD_VER >= 11 @@ -61,4 +61,6 @@ int main() do_insert_const_lvalue_test(); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/insert_hint_const_lvalue.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/insert_hint_const_lvalue.pass.cpp index b21adc888c134..83cf7b86acb3d 100644 --- a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/insert_hint_const_lvalue.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/insert_hint_const_lvalue.pass.cpp @@ -56,7 +56,7 @@ void do_insert_const_lvalue_test() assert(r->second == 4); } -int main() +int main(int, char**) { do_insert_const_lvalue_test >(); #if TEST_STD_VER >= 11 @@ -79,4 +79,6 @@ int main() assert(false); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/insert_hint_rvalue.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/insert_hint_rvalue.pass.cpp index 1485e2a8392b0..2993fe7572aeb 100644 --- a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/insert_hint_rvalue.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/insert_hint_rvalue.pass.cpp @@ -28,7 +28,7 @@ #include "MoveOnly.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_multimap C; @@ -173,4 +173,6 @@ int main() assert(false); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/insert_init.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/insert_init.pass.cpp index a707f77c59ff6..3a3f98785f25e 100644 --- a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/insert_init.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/insert_init.pass.cpp @@ -24,7 +24,7 @@ #include "test_iterators.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_multimap C; @@ -117,4 +117,6 @@ int main() assert(static_cast(std::distance(c.begin(), c.end())) == c.size()); assert(static_cast(std::distance(c.cbegin(), c.cend())) == c.size()); } + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/insert_node_type.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/insert_node_type.pass.cpp index bbaf6aac0d84b..fd1cfa114cc00 100644 --- a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/insert_node_type.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/insert_node_type.pass.cpp @@ -67,10 +67,12 @@ void test(Container& c) } } -int main() +int main(int, char**) { std::unordered_multimap m; test(m); std::unordered_multimap, std::equal_to, min_allocator>> m2; test(m2); + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/insert_node_type_hint.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/insert_node_type_hint.pass.cpp index ae36abb922943..70d207551a204 100644 --- a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/insert_node_type_hint.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/insert_node_type_hint.pass.cpp @@ -53,10 +53,12 @@ void test(Container& c) } } -int main() +int main(int, char**) { std::unordered_multimap m; test(m); std::unordered_multimap, std::equal_to, min_allocator>> m2; test(m2); + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/insert_range.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/insert_range.pass.cpp index 4d0f37dbb86da..333392af9020e 100644 --- a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/insert_range.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/insert_range.pass.cpp @@ -23,7 +23,7 @@ #include "test_iterators.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_multimap C; @@ -118,4 +118,6 @@ int main() assert(static_cast(std::distance(c.cbegin(), c.cend())) == c.size()); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/insert_rvalue.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/insert_rvalue.pass.cpp index 58bb723797c88..92b91b07c3184 100644 --- a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/insert_rvalue.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/insert_rvalue.pass.cpp @@ -24,7 +24,7 @@ #include "MoveOnly.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_multimap C; @@ -152,4 +152,6 @@ int main() assert(r->first == 5.5); assert(r->second == 4); } + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/merge.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/merge.pass.cpp index 0f590972f37e4..1ce1c8361eee8 100644 --- a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/merge.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/merge.pass.cpp @@ -49,7 +49,7 @@ struct throw_hasher }; #endif -int main() +int main(int, char**) { { std::unordered_multimap src{{1, 0}, {3, 0}, {5, 0}}; @@ -153,4 +153,5 @@ int main() first.merge(std::move(second)); } } + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.swap/db_swap_1.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.swap/db_swap_1.pass.cpp index 8b0b8a4989e25..3e15211d50101 100644 --- a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.swap/db_swap_1.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.swap/db_swap_1.pass.cpp @@ -21,7 +21,7 @@ #include #include -int main() +int main(int, char**) { #if _LIBCPP_DEBUG >= 1 { @@ -40,4 +40,6 @@ int main() assert(false); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.swap/swap_noexcept.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.swap/swap_noexcept.pass.cpp index 6162cb2ff3b02..971fff7930eac 100644 --- a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.swap/swap_noexcept.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.swap/swap_noexcept.pass.cpp @@ -118,7 +118,7 @@ struct some_alloc3 typedef std::false_type is_always_equal; }; -int main() +int main(int, char**) { typedef std::pair V; { @@ -187,4 +187,6 @@ int main() } #endif // _LIBCPP_VERSION #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.swap/swap_non_member.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.swap/swap_non_member.pass.cpp index 7b639ef55996e..406978241d114 100644 --- a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.swap/swap_non_member.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.swap/swap_non_member.pass.cpp @@ -25,7 +25,7 @@ #include "test_allocator.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef test_hash > Hash; @@ -579,4 +579,6 @@ int main() assert(c2.max_load_factor() == 1); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multiset/allocator_mismatch.fail.cpp b/libcxx/test/std/containers/unord/unord.multiset/allocator_mismatch.fail.cpp index 1ff880b4e8aad..6183761a32ce5 100644 --- a/libcxx/test/std/containers/unord/unord.multiset/allocator_mismatch.fail.cpp +++ b/libcxx/test/std/containers/unord/unord.multiset/allocator_mismatch.fail.cpp @@ -11,7 +11,9 @@ #include -int main() +int main(int, char**) { std::unordered_multiset, std::less, std::allocator > v; + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multiset/bucket.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/bucket.pass.cpp index a0837f9fd8657..4aeb849332016 100644 --- a/libcxx/test/std/containers/unord/unord.multiset/bucket.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multiset/bucket.pass.cpp @@ -24,7 +24,7 @@ #include "test_macros.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_multiset C; @@ -73,4 +73,6 @@ int main() assert(false); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multiset/bucket_count.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/bucket_count.pass.cpp index b6f7349612fde..8f389ebc206ba 100644 --- a/libcxx/test/std/containers/unord/unord.multiset/bucket_count.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multiset/bucket_count.pass.cpp @@ -20,7 +20,7 @@ #include "test_macros.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_multiset C; @@ -70,4 +70,6 @@ int main() assert(c.bucket_count() >= 8); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multiset/bucket_size.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/bucket_size.pass.cpp index 78e8c68268a42..99b76972aa03a 100644 --- a/libcxx/test/std/containers/unord/unord.multiset/bucket_size.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multiset/bucket_size.pass.cpp @@ -24,7 +24,7 @@ #include "test_macros.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_multiset C; @@ -81,4 +81,6 @@ int main() assert(false); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multiset/clear.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/clear.pass.cpp index 449de3520ccb2..01ff045938397 100644 --- a/libcxx/test/std/containers/unord/unord.multiset/clear.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multiset/clear.pass.cpp @@ -20,7 +20,7 @@ #include "test_macros.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_multiset C; @@ -59,4 +59,6 @@ int main() assert(c.size() == 0); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multiset/count.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/count.pass.cpp index 2eb50539b2070..40cef2af203f4 100644 --- a/libcxx/test/std/containers/unord/unord.multiset/count.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multiset/count.pass.cpp @@ -19,7 +19,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_multiset C; @@ -66,4 +66,6 @@ int main() assert(c.count(5) == 0); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multiset/db_iterators_7.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/db_iterators_7.pass.cpp index 7f82cf65cb362..8da63023389d7 100644 --- a/libcxx/test/std/containers/unord/unord.multiset/db_iterators_7.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multiset/db_iterators_7.pass.cpp @@ -22,7 +22,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef int T; @@ -50,8 +50,10 @@ int main() #else -int main() +int main(int, char**) { + + return 0; } #endif diff --git a/libcxx/test/std/containers/unord/unord.multiset/db_iterators_8.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/db_iterators_8.pass.cpp index 305a76f240baa..8bc1e5c168d94 100644 --- a/libcxx/test/std/containers/unord/unord.multiset/db_iterators_8.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multiset/db_iterators_8.pass.cpp @@ -22,7 +22,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef int T; @@ -46,8 +46,10 @@ int main() #else -int main() +int main(int, char**) { + + return 0; } #endif diff --git a/libcxx/test/std/containers/unord/unord.multiset/db_local_iterators_7.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/db_local_iterators_7.pass.cpp index e12e3cefb9596..fbf40ca6eab25 100644 --- a/libcxx/test/std/containers/unord/unord.multiset/db_local_iterators_7.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multiset/db_local_iterators_7.pass.cpp @@ -22,7 +22,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef int T; @@ -49,8 +49,10 @@ int main() #else -int main() +int main(int, char**) { + + return 0; } #endif diff --git a/libcxx/test/std/containers/unord/unord.multiset/db_local_iterators_8.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/db_local_iterators_8.pass.cpp index 51ccf32ae0a3c..53c9c9bd58bf2 100644 --- a/libcxx/test/std/containers/unord/unord.multiset/db_local_iterators_8.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multiset/db_local_iterators_8.pass.cpp @@ -22,7 +22,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef int T; @@ -46,8 +46,10 @@ int main() #else -int main() +int main(int, char**) { + + return 0; } #endif diff --git a/libcxx/test/std/containers/unord/unord.multiset/emplace.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/emplace.pass.cpp index efbaa35aaa4de..67c5d1642066f 100644 --- a/libcxx/test/std/containers/unord/unord.multiset/emplace.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multiset/emplace.pass.cpp @@ -23,7 +23,7 @@ #include "../../Emplaceable.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_multiset C; @@ -58,4 +58,6 @@ int main() assert(c.size() == 3); assert(*r == Emplaceable(5, 6)); } + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multiset/emplace_hint.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/emplace_hint.pass.cpp index 715b77425bda6..61f06edd485b4 100644 --- a/libcxx/test/std/containers/unord/unord.multiset/emplace_hint.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multiset/emplace_hint.pass.cpp @@ -24,7 +24,7 @@ #include "../../Emplaceable.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_multiset C; @@ -61,4 +61,6 @@ int main() assert(c.size() == 3); assert(*r == Emplaceable(5, 6)); } + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multiset/empty.fail.cpp b/libcxx/test/std/containers/unord/unord.multiset/empty.fail.cpp index 1aeffd599f1d5..449b2116a547c 100644 --- a/libcxx/test/std/containers/unord/unord.multiset/empty.fail.cpp +++ b/libcxx/test/std/containers/unord/unord.multiset/empty.fail.cpp @@ -20,8 +20,10 @@ #include "test_macros.h" -int main () +int main(int, char**) { std::unordered_multiset c; c.empty(); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multiset/empty.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/empty.pass.cpp index f96e944a3dd51..078f95f564b68 100644 --- a/libcxx/test/std/containers/unord/unord.multiset/empty.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multiset/empty.pass.cpp @@ -18,7 +18,7 @@ #include "test_macros.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_multiset M; @@ -42,4 +42,6 @@ int main() assert(m.empty()); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multiset/eq.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/eq.pass.cpp index 6681e05eea206..761ad7051e7e2 100644 --- a/libcxx/test/std/containers/unord/unord.multiset/eq.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multiset/eq.pass.cpp @@ -23,7 +23,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_multiset C; @@ -176,4 +176,6 @@ int main() assert(!(c1 != c2)); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multiset/equal_range_const.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/equal_range_const.pass.cpp index 77bfb557b4992..ddfd77e18c6cf 100644 --- a/libcxx/test/std/containers/unord/unord.multiset/equal_range_const.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multiset/equal_range_const.pass.cpp @@ -19,7 +19,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_multiset C; @@ -86,4 +86,6 @@ int main() assert(*r.first == 50); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multiset/equal_range_non_const.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/equal_range_non_const.pass.cpp index c3da35a48e710..a148f65b173d1 100644 --- a/libcxx/test/std/containers/unord/unord.multiset/equal_range_non_const.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multiset/equal_range_non_const.pass.cpp @@ -19,7 +19,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_multiset C; @@ -86,4 +86,6 @@ int main() assert(*r.first == 50); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multiset/erase_const_iter.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/erase_const_iter.pass.cpp index daa39956a6d01..0a92f7d06210d 100644 --- a/libcxx/test/std/containers/unord/unord.multiset/erase_const_iter.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multiset/erase_const_iter.pass.cpp @@ -28,7 +28,7 @@ struct TemplateConstructor bool operator==(const TemplateConstructor&, const TemplateConstructor&) { return false; } struct Hash { size_t operator() (const TemplateConstructor &) const { return 0; } }; -int main() +int main(int, char**) { { typedef std::unordered_multiset C; @@ -96,4 +96,6 @@ int main() m.erase(it); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multiset/erase_if.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/erase_if.pass.cpp index 761b94e1d7d55..bd587473ce72c 100644 --- a/libcxx/test/std/containers/unord/unord.multiset/erase_if.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multiset/erase_if.pass.cpp @@ -79,7 +79,7 @@ void test() test0({1,2,3}, False, {1,2,3}); } -int main() +int main(int, char**) { test>(); test, std::equal_to, min_allocator>> (); @@ -87,4 +87,6 @@ int main() test>(); test>(); + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multiset/erase_iter_db1.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/erase_iter_db1.pass.cpp index 742fe2bc2d4b2..073043f5a364b 100644 --- a/libcxx/test/std/containers/unord/unord.multiset/erase_iter_db1.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multiset/erase_iter_db1.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { { int a1[] = {1, 2, 3}; @@ -30,8 +30,10 @@ int main() #else -int main() +int main(int, char**) { + + return 0; } #endif diff --git a/libcxx/test/std/containers/unord/unord.multiset/erase_iter_db2.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/erase_iter_db2.pass.cpp index 9a6e09d4735b5..28768eaf5c2b3 100644 --- a/libcxx/test/std/containers/unord/unord.multiset/erase_iter_db2.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multiset/erase_iter_db2.pass.cpp @@ -19,7 +19,7 @@ #include #include -int main() +int main(int, char**) { { int a1[] = {1, 2, 3}; @@ -33,8 +33,10 @@ int main() #else -int main() +int main(int, char**) { + + return 0; } #endif diff --git a/libcxx/test/std/containers/unord/unord.multiset/erase_iter_iter_db1.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/erase_iter_iter_db1.pass.cpp index dac9ac6afad69..0a9853d66e36c 100644 --- a/libcxx/test/std/containers/unord/unord.multiset/erase_iter_iter_db1.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multiset/erase_iter_iter_db1.pass.cpp @@ -19,7 +19,7 @@ #include #include -int main() +int main(int, char**) { { int a1[] = {1, 2, 3}; @@ -32,8 +32,10 @@ int main() #else -int main() +int main(int, char**) { + + return 0; } #endif diff --git a/libcxx/test/std/containers/unord/unord.multiset/erase_iter_iter_db2.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/erase_iter_iter_db2.pass.cpp index f2eb5277ee741..cc1ec00961a13 100644 --- a/libcxx/test/std/containers/unord/unord.multiset/erase_iter_iter_db2.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multiset/erase_iter_iter_db2.pass.cpp @@ -19,7 +19,7 @@ #include #include -int main() +int main(int, char**) { { int a1[] = {1, 2, 3}; @@ -32,8 +32,10 @@ int main() #else -int main() +int main(int, char**) { + + return 0; } #endif diff --git a/libcxx/test/std/containers/unord/unord.multiset/erase_iter_iter_db3.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/erase_iter_iter_db3.pass.cpp index a3e2d8cce1046..a1de8cb7c7108 100644 --- a/libcxx/test/std/containers/unord/unord.multiset/erase_iter_iter_db3.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multiset/erase_iter_iter_db3.pass.cpp @@ -19,7 +19,7 @@ #include #include -int main() +int main(int, char**) { { int a1[] = {1, 2, 3}; @@ -32,8 +32,10 @@ int main() #else -int main() +int main(int, char**) { + + return 0; } #endif diff --git a/libcxx/test/std/containers/unord/unord.multiset/erase_iter_iter_db4.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/erase_iter_iter_db4.pass.cpp index 41cc1f8737e8d..a82ecfc3cc364 100644 --- a/libcxx/test/std/containers/unord/unord.multiset/erase_iter_iter_db4.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multiset/erase_iter_iter_db4.pass.cpp @@ -19,7 +19,7 @@ #include #include -int main() +int main(int, char**) { { int a1[] = {1, 2, 3}; @@ -31,8 +31,10 @@ int main() #else -int main() +int main(int, char**) { + + return 0; } #endif diff --git a/libcxx/test/std/containers/unord/unord.multiset/erase_key.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/erase_key.pass.cpp index 1ed8cd7049099..ba7248d746885 100644 --- a/libcxx/test/std/containers/unord/unord.multiset/erase_key.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multiset/erase_key.pass.cpp @@ -36,7 +36,7 @@ bool only_deletions ( const Unordered &whole, const Unordered &part ) { } #endif -int main() +int main(int, char**) { { typedef std::unordered_multiset C; @@ -172,4 +172,6 @@ int main() assert (only_deletions (m, m2)); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multiset/erase_range.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/erase_range.pass.cpp index 8c1f8479a6250..c6bb4b597c3f5 100644 --- a/libcxx/test/std/containers/unord/unord.multiset/erase_range.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multiset/erase_range.pass.cpp @@ -20,7 +20,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_multiset C; @@ -91,4 +91,6 @@ int main() assert(k == c.end()); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multiset/extract_iterator.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/extract_iterator.pass.cpp index e0a0f96b9ffd6..01994120c8a30 100644 --- a/libcxx/test/std/containers/unord/unord.multiset/extract_iterator.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multiset/extract_iterator.pass.cpp @@ -36,7 +36,7 @@ void test(Container& c) assert(c.size() == 0); } -int main() +int main(int, char**) { { using set_type = std::unordered_multiset; @@ -56,4 +56,6 @@ int main() min_alloc_set m = {1, 2, 3, 4, 5, 6}; test(m); } + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multiset/extract_key.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/extract_key.pass.cpp index 78d763ff5df9a..380b39f85e2f1 100644 --- a/libcxx/test/std/containers/unord/unord.multiset/extract_key.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multiset/extract_key.pass.cpp @@ -43,7 +43,7 @@ void test(Container& c, KeyTypeIter first, KeyTypeIter last) } } -int main() +int main(int, char**) { { std::unordered_multiset m = {1, 2, 3, 4, 5, 6}; @@ -67,4 +67,6 @@ int main() int keys[] = {1, 2, 3, 4, 5, 6}; test(m, std::begin(keys), std::end(keys)); } + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multiset/find_const.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/find_const.pass.cpp index 8d6da19452a30..efa8bfc12b529 100644 --- a/libcxx/test/std/containers/unord/unord.multiset/find_const.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multiset/find_const.pass.cpp @@ -19,7 +19,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_multiset C; @@ -64,4 +64,6 @@ int main() assert(i == c.cend()); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multiset/find_non_const.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/find_non_const.pass.cpp index 713f1ebe10a23..4eeb8ac6a8054 100644 --- a/libcxx/test/std/containers/unord/unord.multiset/find_non_const.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multiset/find_non_const.pass.cpp @@ -19,7 +19,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_multiset C; @@ -64,4 +64,6 @@ int main() assert(i == c.cend()); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multiset/incomplete.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/incomplete.pass.cpp index 67fe1a9c084fc..0aeb246ca437a 100644 --- a/libcxx/test/std/containers/unord/unord.multiset/incomplete.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multiset/incomplete.pass.cpp @@ -32,6 +32,8 @@ struct A { inline bool operator==(A const& L, A const& R) { return &L == &R; } -int main() { +int main(int, char**) { A a; + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multiset/insert_const_lvalue.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/insert_const_lvalue.pass.cpp index 90666e0c14fcf..8200dc2fc94e7 100644 --- a/libcxx/test/std/containers/unord/unord.multiset/insert_const_lvalue.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multiset/insert_const_lvalue.pass.cpp @@ -46,7 +46,7 @@ void do_insert_const_lvalue_test() assert(*r == 5.5); } -int main() +int main(int, char**) { do_insert_const_lvalue_test >(); #if TEST_STD_VER >= 11 @@ -56,4 +56,6 @@ int main() do_insert_const_lvalue_test(); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multiset/insert_emplace_allocator_requirements.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/insert_emplace_allocator_requirements.pass.cpp index bc14294c38cba..d7474f24e7c0f 100644 --- a/libcxx/test/std/containers/unord/unord.multiset/insert_emplace_allocator_requirements.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multiset/insert_emplace_allocator_requirements.pass.cpp @@ -18,8 +18,10 @@ #include "container_test_types.h" #include "../../set_allocator_requirement_test_templates.h" -int main() +int main(int, char**) { testMultisetInsert >(); testMultisetEmplace >(); + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multiset/insert_hint_const_lvalue.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/insert_hint_const_lvalue.pass.cpp index 283368091e8fd..ede013ef99e43 100644 --- a/libcxx/test/std/containers/unord/unord.multiset/insert_hint_const_lvalue.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multiset/insert_hint_const_lvalue.pass.cpp @@ -51,7 +51,7 @@ void do_insert_hint_const_lvalue_test() assert(*r == 5.5); } -int main() +int main(int, char**) { do_insert_hint_const_lvalue_test >(); #if TEST_STD_VER >= 11 @@ -74,4 +74,6 @@ int main() assert(false); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multiset/insert_hint_rvalue.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/insert_hint_rvalue.pass.cpp index 39c04a1b66c80..ab5302462e97c 100644 --- a/libcxx/test/std/containers/unord/unord.multiset/insert_hint_rvalue.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multiset/insert_hint_rvalue.pass.cpp @@ -21,7 +21,7 @@ #include "MoveOnly.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_multiset C; @@ -115,4 +115,6 @@ int main() assert(*r == 5); } #endif // TEST_STD_VER >= 11 + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multiset/insert_init.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/insert_init.pass.cpp index 60d58c0d24099..4467c74b4395e 100644 --- a/libcxx/test/std/containers/unord/unord.multiset/insert_init.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multiset/insert_init.pass.cpp @@ -22,7 +22,7 @@ #include "test_iterators.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_multiset C; @@ -65,4 +65,6 @@ int main() assert(c.count(3) == 1); assert(c.count(4) == 1); } + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multiset/insert_node_type.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/insert_node_type.pass.cpp index 0a06fe6b922ef..c660ab22d6be3 100644 --- a/libcxx/test/std/containers/unord/unord.multiset/insert_node_type.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multiset/insert_node_type.pass.cpp @@ -66,10 +66,12 @@ void test(Container& c) } } -int main() +int main(int, char**) { std::unordered_multiset m; test(m); std::unordered_multiset, std::equal_to, min_allocator> m2; test(m2); + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multiset/insert_node_type_hint.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/insert_node_type_hint.pass.cpp index 36434680579a6..e95dd31e39ece 100644 --- a/libcxx/test/std/containers/unord/unord.multiset/insert_node_type_hint.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multiset/insert_node_type_hint.pass.cpp @@ -49,10 +49,12 @@ void test(Container& c) } } -int main() +int main(int, char**) { std::unordered_multiset m; test(m); std::unordered_multiset, std::equal_to, min_allocator> m2; test(m2); + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multiset/insert_range.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/insert_range.pass.cpp index 2487a2d4bd1ab..b8742f520b922 100644 --- a/libcxx/test/std/containers/unord/unord.multiset/insert_range.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multiset/insert_range.pass.cpp @@ -21,7 +21,7 @@ #include "test_iterators.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_multiset C; @@ -66,4 +66,6 @@ int main() assert(c.count(4) == 1); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multiset/insert_rvalue.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/insert_rvalue.pass.cpp index 056288c78c135..1bec2b7e6c2e9 100644 --- a/libcxx/test/std/containers/unord/unord.multiset/insert_rvalue.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multiset/insert_rvalue.pass.cpp @@ -21,7 +21,7 @@ #include "MoveOnly.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_multiset C; @@ -111,4 +111,6 @@ int main() assert(*r == 5); } #endif // TEST_STD_VER >= 11 + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multiset/iterators.fail.cpp b/libcxx/test/std/containers/unord/unord.multiset/iterators.fail.cpp index 3cf31d52c0169..2c282fdbaab4b 100644 --- a/libcxx/test/std/containers/unord/unord.multiset/iterators.fail.cpp +++ b/libcxx/test/std/containers/unord/unord.multiset/iterators.fail.cpp @@ -24,7 +24,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { { typedef std::unordered_multiset C; @@ -65,4 +65,6 @@ int main() assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); } + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multiset/iterators.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/iterators.pass.cpp index b6147e9c64daa..2c0cd496ddb24 100644 --- a/libcxx/test/std/containers/unord/unord.multiset/iterators.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multiset/iterators.pass.cpp @@ -26,7 +26,7 @@ #include "test_macros.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_multiset C; @@ -125,4 +125,6 @@ int main() assert (!(cii != ii1 )); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multiset/load_factor.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/load_factor.pass.cpp index ece450ceb1706..bb3350e868988 100644 --- a/libcxx/test/std/containers/unord/unord.multiset/load_factor.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multiset/load_factor.pass.cpp @@ -21,7 +21,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_multiset C; @@ -71,4 +71,6 @@ int main() assert(c.load_factor() == 0); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multiset/local_iterators.fail.cpp b/libcxx/test/std/containers/unord/unord.multiset/local_iterators.fail.cpp index a27353414a62c..d6f1a55fd49cb 100644 --- a/libcxx/test/std/containers/unord/unord.multiset/local_iterators.fail.cpp +++ b/libcxx/test/std/containers/unord/unord.multiset/local_iterators.fail.cpp @@ -24,7 +24,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { { typedef std::unordered_multiset C; @@ -259,4 +259,6 @@ int main() j = c.cend(b); assert(std::distance(i, j) == 0); } + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multiset/local_iterators.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/local_iterators.pass.cpp index b63a94ae10093..5aa65756371c8 100644 --- a/libcxx/test/std/containers/unord/unord.multiset/local_iterators.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multiset/local_iterators.pass.cpp @@ -24,7 +24,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_multiset C; @@ -496,4 +496,6 @@ int main() assert(std::distance(i, j) == 0); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multiset/max_bucket_count.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/max_bucket_count.pass.cpp index c503a35378e3a..7fb76c41c492a 100644 --- a/libcxx/test/std/containers/unord/unord.multiset/max_bucket_count.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multiset/max_bucket_count.pass.cpp @@ -19,7 +19,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_multiset C; @@ -34,4 +34,6 @@ int main() assert(c.max_bucket_count() > 0); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multiset/max_load_factor.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/max_load_factor.pass.cpp index 1a6b1335a62ec..c89aa6d339f13 100644 --- a/libcxx/test/std/containers/unord/unord.multiset/max_load_factor.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multiset/max_load_factor.pass.cpp @@ -24,7 +24,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_multiset C; @@ -62,4 +62,6 @@ int main() assert(false); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multiset/max_size.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/max_size.pass.cpp index a6a7dae25195f..d08cdb6221fd3 100644 --- a/libcxx/test/std/containers/unord/unord.multiset/max_size.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multiset/max_size.pass.cpp @@ -20,7 +20,7 @@ #include "test_allocator.h" #include "test_macros.h" -int main() +int main(int, char**) { { typedef limited_allocator A; @@ -50,4 +50,6 @@ int main() assert(c.max_size() <= max_dist); assert(c.max_size() <= alloc_max_size(c.get_allocator())); } + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multiset/merge.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/merge.pass.cpp index 1082f4990f89c..e951b33d2127b 100644 --- a/libcxx/test/std/containers/unord/unord.multiset/merge.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multiset/merge.pass.cpp @@ -49,7 +49,7 @@ struct throw_hasher }; #endif -int main() +int main(int, char**) { { std::unordered_multiset src{1, 3, 5}; @@ -150,4 +150,5 @@ int main() first.merge(std::move(second)); } } + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multiset/rehash.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/rehash.pass.cpp index 38691f20040dc..8c6699b18e247 100644 --- a/libcxx/test/std/containers/unord/unord.multiset/rehash.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multiset/rehash.pass.cpp @@ -36,7 +36,7 @@ void test(const C& c) assert(c.count(4) == 1); } -int main() +int main(int, char**) { { typedef std::unordered_multiset C; @@ -99,4 +99,6 @@ int main() test(c); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multiset/reserve.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/reserve.pass.cpp index 079786689f6f3..54eada5a76989 100644 --- a/libcxx/test/std/containers/unord/unord.multiset/reserve.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multiset/reserve.pass.cpp @@ -45,7 +45,7 @@ void reserve_invariant(size_t n) // LWG #2156 } } -int main() +int main(int, char**) { { typedef std::unordered_multiset C; @@ -103,4 +103,6 @@ int main() } #endif reserve_invariant(20); + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multiset/scary.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/scary.pass.cpp index 7ef4a513f6423..670c6406a2bd6 100644 --- a/libcxx/test/std/containers/unord/unord.multiset/scary.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multiset/scary.pass.cpp @@ -14,11 +14,13 @@ #include -int main() +int main(int, char**) { typedef std::unordered_set M1; typedef std::unordered_multiset M2; M2::iterator i; M1::iterator j = i; ((void)j); + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multiset/size.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/size.pass.cpp index 3aae7dd53c238..12a4733ccb192 100644 --- a/libcxx/test/std/containers/unord/unord.multiset/size.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multiset/size.pass.cpp @@ -18,7 +18,7 @@ #include "test_macros.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_multiset M; @@ -58,4 +58,6 @@ int main() assert(m.size() == 0); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multiset/swap_member.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/swap_member.pass.cpp index 2937e444e4a8d..bad8df9d9f09c 100644 --- a/libcxx/test/std/containers/unord/unord.multiset/swap_member.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multiset/swap_member.pass.cpp @@ -24,7 +24,7 @@ #include "test_allocator.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef test_hash > Hash; @@ -566,4 +566,6 @@ int main() assert(c2.max_load_factor() == 1); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multiset/types.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/types.pass.cpp index 8b246778d4978..81f8334c28f11 100644 --- a/libcxx/test/std/containers/unord/unord.multiset/types.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multiset/types.pass.cpp @@ -31,7 +31,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_multiset C; @@ -65,4 +65,6 @@ int main() static_assert((std::is_same::value), ""); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/allocator.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/allocator.pass.cpp index e446fa65e32fa..2a3b867b5e0aa 100644 --- a/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/allocator.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/allocator.pass.cpp @@ -24,7 +24,7 @@ #include "test_allocator.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_multiset A; @@ -209,4 +209,6 @@ int main() assert(c.max_load_factor() == 1); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/assign_init.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/assign_init.pass.cpp index cf286319d42b3..795370c44fe8b 100644 --- a/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/assign_init.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/assign_init.pass.cpp @@ -27,7 +27,7 @@ #include "test_allocator.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef test_allocator A; @@ -93,4 +93,6 @@ int main() assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/assign_move.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/assign_move.pass.cpp index 00adca3c4525c..1ed77851cf3f2 100644 --- a/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/assign_move.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/assign_move.pass.cpp @@ -28,7 +28,7 @@ #include "test_allocator.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef test_allocator A; @@ -263,4 +263,6 @@ int main() assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/compare_copy_constructible.fail.cpp b/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/compare_copy_constructible.fail.cpp index b1e161b42e023..4b8d55cac982b 100644 --- a/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/compare_copy_constructible.fail.cpp +++ b/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/compare_copy_constructible.fail.cpp @@ -23,6 +23,8 @@ struct Comp { }; -int main() { +int main(int, char**) { std::unordered_multiset, Comp > m; + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/copy.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/copy.pass.cpp index e3a57fa55549f..f3ca15241ad9d 100644 --- a/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/copy.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/copy.pass.cpp @@ -26,7 +26,7 @@ #include "test_allocator.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_multiset> C; static_assert(!std::is_nothrow_default_constructible::value, ""); } + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/dtor_noexcept.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/dtor_noexcept.pass.cpp index c65c0f15e10fe..1d963b6be7b78 100644 --- a/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/dtor_noexcept.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/dtor_noexcept.pass.cpp @@ -37,7 +37,7 @@ struct some_hash std::size_t operator()(T const&) const; }; -int main() +int main(int, char**) { { typedef std::unordered_multiset C; @@ -64,4 +64,6 @@ int main() static_assert(!std::is_nothrow_destructible::value, ""); } #endif // _LIBCPP_VERSION + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/hash_copy_constructible.fail.cpp b/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/hash_copy_constructible.fail.cpp index 97b031ab81ab8..9e24ce2ecbcde 100644 --- a/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/hash_copy_constructible.fail.cpp +++ b/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/hash_copy_constructible.fail.cpp @@ -23,6 +23,8 @@ struct Hash { }; -int main() { +int main(int, char**) { std::unordered_multiset > m; + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init.pass.cpp index 7b3d996f7880f..d8fc0c0021c75 100644 --- a/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init.pass.cpp @@ -28,7 +28,7 @@ #include "test_allocator.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_multiset 11 + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init_size.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init_size.pass.cpp index 475f2664da0e9..bda874ce55925 100644 --- a/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init_size.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init_size.pass.cpp @@ -28,7 +28,7 @@ #include "test_allocator.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_multiset C; @@ -70,4 +70,6 @@ int main() some_comp> C; static_assert(!std::is_nothrow_move_assignable::value, ""); } + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/move_noexcept.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/move_noexcept.pass.cpp index 03f61a504d3c4..3941940f9a0a0 100644 --- a/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/move_noexcept.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/move_noexcept.pass.cpp @@ -40,7 +40,7 @@ struct some_hash std::size_t operator()(T const&) const; }; -int main() +int main(int, char**) { #if defined(_LIBCPP_VERSION) { @@ -67,4 +67,6 @@ int main() some_comp> C; static_assert(!std::is_nothrow_move_constructible::value, ""); } + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/range.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/range.pass.cpp index 5d729ec49653c..953e702a68245 100644 --- a/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/range.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/range.pass.cpp @@ -28,7 +28,7 @@ #include "test_allocator.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_multiset #include -int main() +int main(int, char**) { #if _LIBCPP_DEBUG >= 1 { @@ -39,4 +39,6 @@ int main() assert(false); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.swap/swap_noexcept.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.swap/swap_noexcept.pass.cpp index 73c3cc66a0d42..3586e8d5bd53f 100644 --- a/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.swap/swap_noexcept.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.swap/swap_noexcept.pass.cpp @@ -118,7 +118,7 @@ struct some_alloc3 typedef std::false_type is_always_equal; }; -int main() +int main(int, char**) { { typedef std::unordered_multiset C; @@ -186,4 +186,6 @@ int main() } #endif // _LIBCPP_VERSION #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.swap/swap_non_member.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.swap/swap_non_member.pass.cpp index 60826ffd199a7..706c995f3de5a 100644 --- a/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.swap/swap_non_member.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.swap/swap_non_member.pass.cpp @@ -24,7 +24,7 @@ #include "test_allocator.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef test_hash > Hash; @@ -566,4 +566,6 @@ int main() assert(c2.max_load_factor() == 1); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.set/allocator_mismatch.fail.cpp b/libcxx/test/std/containers/unord/unord.set/allocator_mismatch.fail.cpp index 6286031e590b2..0d1341e6939cc 100644 --- a/libcxx/test/std/containers/unord/unord.set/allocator_mismatch.fail.cpp +++ b/libcxx/test/std/containers/unord/unord.set/allocator_mismatch.fail.cpp @@ -11,7 +11,9 @@ #include -int main() +int main(int, char**) { std::unordered_set, std::less, std::allocator > v; + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.set/bucket.pass.cpp b/libcxx/test/std/containers/unord/unord.set/bucket.pass.cpp index 58d77e3d57acc..2215b99493b9a 100644 --- a/libcxx/test/std/containers/unord/unord.set/bucket.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.set/bucket.pass.cpp @@ -24,7 +24,7 @@ #include "test_macros.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_set C; @@ -72,4 +72,6 @@ int main() assert(false); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.set/bucket_count.pass.cpp b/libcxx/test/std/containers/unord/unord.set/bucket_count.pass.cpp index 3dadbd21a977a..3a1a78cb3d80a 100644 --- a/libcxx/test/std/containers/unord/unord.set/bucket_count.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.set/bucket_count.pass.cpp @@ -20,7 +20,7 @@ #include "test_macros.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_set C; @@ -68,4 +68,6 @@ int main() assert(c.bucket_count() >= 8); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.set/bucket_size.pass.cpp b/libcxx/test/std/containers/unord/unord.set/bucket_size.pass.cpp index e37e047af66ea..6ca89d5722472 100644 --- a/libcxx/test/std/containers/unord/unord.set/bucket_size.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.set/bucket_size.pass.cpp @@ -24,7 +24,7 @@ #include "test_macros.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_set C; @@ -76,4 +76,6 @@ int main() assert(false); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.set/clear.pass.cpp b/libcxx/test/std/containers/unord/unord.set/clear.pass.cpp index abaaec3e258c3..ab04cdd910599 100644 --- a/libcxx/test/std/containers/unord/unord.set/clear.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.set/clear.pass.cpp @@ -20,7 +20,7 @@ #include "test_macros.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_set C; @@ -58,4 +58,6 @@ int main() assert(c.size() == 0); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.set/count.pass.cpp b/libcxx/test/std/containers/unord/unord.set/count.pass.cpp index 97694684de0a7..971e126fdc676 100644 --- a/libcxx/test/std/containers/unord/unord.set/count.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.set/count.pass.cpp @@ -19,7 +19,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_set C; @@ -65,4 +65,6 @@ int main() assert(c.count(5) == 0); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.set/db_iterators_7.pass.cpp b/libcxx/test/std/containers/unord/unord.set/db_iterators_7.pass.cpp index ef58e2561330a..8420de60d331b 100644 --- a/libcxx/test/std/containers/unord/unord.set/db_iterators_7.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.set/db_iterators_7.pass.cpp @@ -22,7 +22,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef int T; @@ -50,8 +50,10 @@ int main() #else -int main() +int main(int, char**) { + + return 0; } #endif diff --git a/libcxx/test/std/containers/unord/unord.set/db_iterators_8.pass.cpp b/libcxx/test/std/containers/unord/unord.set/db_iterators_8.pass.cpp index 10692fa4904f0..14dccf97db023 100644 --- a/libcxx/test/std/containers/unord/unord.set/db_iterators_8.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.set/db_iterators_8.pass.cpp @@ -22,7 +22,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef int T; @@ -46,8 +46,10 @@ int main() #else -int main() +int main(int, char**) { + + return 0; } #endif diff --git a/libcxx/test/std/containers/unord/unord.set/db_local_iterators_7.pass.cpp b/libcxx/test/std/containers/unord/unord.set/db_local_iterators_7.pass.cpp index e3a04f6a95f2a..ac066af7fbeae 100644 --- a/libcxx/test/std/containers/unord/unord.set/db_local_iterators_7.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.set/db_local_iterators_7.pass.cpp @@ -22,7 +22,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef int T; @@ -49,8 +49,10 @@ int main() #else -int main() +int main(int, char**) { + + return 0; } #endif diff --git a/libcxx/test/std/containers/unord/unord.set/db_local_iterators_8.pass.cpp b/libcxx/test/std/containers/unord/unord.set/db_local_iterators_8.pass.cpp index 57dfda6fc683c..a1595cd360142 100644 --- a/libcxx/test/std/containers/unord/unord.set/db_local_iterators_8.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.set/db_local_iterators_8.pass.cpp @@ -22,7 +22,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef int T; @@ -46,8 +46,10 @@ int main() #else -int main() +int main(int, char**) { + + return 0; } #endif diff --git a/libcxx/test/std/containers/unord/unord.set/emplace.pass.cpp b/libcxx/test/std/containers/unord/unord.set/emplace.pass.cpp index 32e6e348722fa..6616aa51c2cd8 100644 --- a/libcxx/test/std/containers/unord/unord.set/emplace.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.set/emplace.pass.cpp @@ -23,7 +23,7 @@ #include "../../Emplaceable.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_set C; @@ -64,4 +64,6 @@ int main() assert(*r.first == Emplaceable(5, 6)); assert(!r.second); } + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.set/emplace_hint.pass.cpp b/libcxx/test/std/containers/unord/unord.set/emplace_hint.pass.cpp index 1bab8d9c3291a..55b3ccbc97896 100644 --- a/libcxx/test/std/containers/unord/unord.set/emplace_hint.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.set/emplace_hint.pass.cpp @@ -24,7 +24,7 @@ #include "../../Emplaceable.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_set C; @@ -61,4 +61,6 @@ int main() assert(c.size() == 2); assert(*r == Emplaceable(5, 6)); } + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.set/empty.fail.cpp b/libcxx/test/std/containers/unord/unord.set/empty.fail.cpp index f683f23a7f341..11273f44fceb1 100644 --- a/libcxx/test/std/containers/unord/unord.set/empty.fail.cpp +++ b/libcxx/test/std/containers/unord/unord.set/empty.fail.cpp @@ -20,8 +20,10 @@ #include "test_macros.h" -int main () +int main(int, char**) { std::unordered_set c; c.empty(); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.set/empty.pass.cpp b/libcxx/test/std/containers/unord/unord.set/empty.pass.cpp index 3656e60c0eda5..ce9cfdcf5f479 100644 --- a/libcxx/test/std/containers/unord/unord.set/empty.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.set/empty.pass.cpp @@ -18,7 +18,7 @@ #include "test_macros.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_set M; @@ -42,4 +42,6 @@ int main() assert(m.empty()); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.set/eq.pass.cpp b/libcxx/test/std/containers/unord/unord.set/eq.pass.cpp index 82737f1ba0594..5362f57f4f5d2 100644 --- a/libcxx/test/std/containers/unord/unord.set/eq.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.set/eq.pass.cpp @@ -23,7 +23,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_set C; @@ -155,4 +155,6 @@ int main() assert(!(c1 != c2)); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.set/equal_range_const.pass.cpp b/libcxx/test/std/containers/unord/unord.set/equal_range_const.pass.cpp index 587971b743aea..9489deaf2ea44 100644 --- a/libcxx/test/std/containers/unord/unord.set/equal_range_const.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.set/equal_range_const.pass.cpp @@ -19,7 +19,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_set C; @@ -77,4 +77,6 @@ int main() assert(*r.first == 50); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.set/equal_range_non_const.pass.cpp b/libcxx/test/std/containers/unord/unord.set/equal_range_non_const.pass.cpp index 923c1764d9485..6713dbd91e081 100644 --- a/libcxx/test/std/containers/unord/unord.set/equal_range_non_const.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.set/equal_range_non_const.pass.cpp @@ -19,7 +19,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_set C; @@ -77,4 +77,6 @@ int main() assert(*r.first == 50); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.set/erase_const_iter.pass.cpp b/libcxx/test/std/containers/unord/unord.set/erase_const_iter.pass.cpp index 84f4f81d19a8e..3d9cfe6834fa9 100644 --- a/libcxx/test/std/containers/unord/unord.set/erase_const_iter.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.set/erase_const_iter.pass.cpp @@ -28,7 +28,7 @@ struct TemplateConstructor bool operator==(const TemplateConstructor&, const TemplateConstructor&) { return false; } struct Hash { size_t operator() (const TemplateConstructor &) const { return 0; } }; -int main() +int main(int, char**) { { typedef std::unordered_set C; @@ -94,4 +94,6 @@ int main() m.erase(it); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.set/erase_if.pass.cpp b/libcxx/test/std/containers/unord/unord.set/erase_if.pass.cpp index 2b5f8f6c87b38..cbd2ebb1afb30 100644 --- a/libcxx/test/std/containers/unord/unord.set/erase_if.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.set/erase_if.pass.cpp @@ -69,7 +69,7 @@ void test() test0({1,2,3}, False, {1,2,3}); } -int main() +int main(int, char**) { test>(); test, std::equal_to, min_allocator>> (); @@ -77,4 +77,6 @@ int main() test>(); test>(); + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.set/erase_iter_db1.pass.cpp b/libcxx/test/std/containers/unord/unord.set/erase_iter_db1.pass.cpp index 3bf6282ccc2e4..a65086ee8c66a 100644 --- a/libcxx/test/std/containers/unord/unord.set/erase_iter_db1.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.set/erase_iter_db1.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { { int a1[] = {1, 2, 3}; @@ -30,8 +30,10 @@ int main() #else -int main() +int main(int, char**) { + + return 0; } #endif diff --git a/libcxx/test/std/containers/unord/unord.set/erase_iter_db2.pass.cpp b/libcxx/test/std/containers/unord/unord.set/erase_iter_db2.pass.cpp index 34f8a60766e98..c7f64da355cc7 100644 --- a/libcxx/test/std/containers/unord/unord.set/erase_iter_db2.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.set/erase_iter_db2.pass.cpp @@ -19,7 +19,7 @@ #include #include -int main() +int main(int, char**) { { int a1[] = {1, 2, 3}; @@ -33,8 +33,10 @@ int main() #else -int main() +int main(int, char**) { + + return 0; } #endif diff --git a/libcxx/test/std/containers/unord/unord.set/erase_iter_iter_db1.pass.cpp b/libcxx/test/std/containers/unord/unord.set/erase_iter_iter_db1.pass.cpp index bcf3df82b77fc..002a24bf1bc15 100644 --- a/libcxx/test/std/containers/unord/unord.set/erase_iter_iter_db1.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.set/erase_iter_iter_db1.pass.cpp @@ -19,7 +19,7 @@ #include #include -int main() +int main(int, char**) { { int a1[] = {1, 2, 3}; @@ -32,8 +32,10 @@ int main() #else -int main() +int main(int, char**) { + + return 0; } #endif diff --git a/libcxx/test/std/containers/unord/unord.set/erase_iter_iter_db2.pass.cpp b/libcxx/test/std/containers/unord/unord.set/erase_iter_iter_db2.pass.cpp index 1a222d91ba303..59bf0cc33fe6f 100644 --- a/libcxx/test/std/containers/unord/unord.set/erase_iter_iter_db2.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.set/erase_iter_iter_db2.pass.cpp @@ -19,7 +19,7 @@ #include #include -int main() +int main(int, char**) { { int a1[] = {1, 2, 3}; @@ -32,8 +32,10 @@ int main() #else -int main() +int main(int, char**) { + + return 0; } #endif diff --git a/libcxx/test/std/containers/unord/unord.set/erase_iter_iter_db3.pass.cpp b/libcxx/test/std/containers/unord/unord.set/erase_iter_iter_db3.pass.cpp index 83cc5d558d57f..c522fce26336c 100644 --- a/libcxx/test/std/containers/unord/unord.set/erase_iter_iter_db3.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.set/erase_iter_iter_db3.pass.cpp @@ -19,7 +19,7 @@ #include #include -int main() +int main(int, char**) { { int a1[] = {1, 2, 3}; @@ -32,8 +32,10 @@ int main() #else -int main() +int main(int, char**) { + + return 0; } #endif diff --git a/libcxx/test/std/containers/unord/unord.set/erase_iter_iter_db4.pass.cpp b/libcxx/test/std/containers/unord/unord.set/erase_iter_iter_db4.pass.cpp index 218d50137b63c..a7c3c0020756c 100644 --- a/libcxx/test/std/containers/unord/unord.set/erase_iter_iter_db4.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.set/erase_iter_iter_db4.pass.cpp @@ -19,7 +19,7 @@ #include #include -int main() +int main(int, char**) { { int a1[] = {1, 2, 3}; @@ -31,8 +31,10 @@ int main() #else -int main() +int main(int, char**) { + + return 0; } #endif diff --git a/libcxx/test/std/containers/unord/unord.set/erase_key.pass.cpp b/libcxx/test/std/containers/unord/unord.set/erase_key.pass.cpp index ea80e2d019ca2..912a4ae6b15b9 100644 --- a/libcxx/test/std/containers/unord/unord.set/erase_key.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.set/erase_key.pass.cpp @@ -36,7 +36,7 @@ bool only_deletions ( const Unordered &whole, const Unordered &part ) { } #endif -int main() +int main(int, char**) { { typedef std::unordered_set C; @@ -171,4 +171,6 @@ int main() assert (only_deletions (m, m2)); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.set/erase_range.pass.cpp b/libcxx/test/std/containers/unord/unord.set/erase_range.pass.cpp index 11908637bf69f..907063c6a5a93 100644 --- a/libcxx/test/std/containers/unord/unord.set/erase_range.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.set/erase_range.pass.cpp @@ -20,7 +20,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_set C; @@ -90,4 +90,6 @@ int main() assert(k == c.end()); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.set/extract_iterator.pass.cpp b/libcxx/test/std/containers/unord/unord.set/extract_iterator.pass.cpp index e03e11ff6723b..03dfcc6028498 100644 --- a/libcxx/test/std/containers/unord/unord.set/extract_iterator.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.set/extract_iterator.pass.cpp @@ -36,7 +36,7 @@ void test(Container& c) assert(c.size() == 0); } -int main() +int main(int, char**) { { using set_type = std::unordered_set; @@ -56,4 +56,6 @@ int main() min_alloc_set m = {1, 2, 3, 4, 5, 6}; test(m); } + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.set/extract_key.pass.cpp b/libcxx/test/std/containers/unord/unord.set/extract_key.pass.cpp index 9a6123714804d..b2a6f04935b14 100644 --- a/libcxx/test/std/containers/unord/unord.set/extract_key.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.set/extract_key.pass.cpp @@ -43,7 +43,7 @@ void test(Container& c, KeyTypeIter first, KeyTypeIter last) } } -int main() +int main(int, char**) { { std::unordered_set m = {1, 2, 3, 4, 5, 6}; @@ -67,4 +67,6 @@ int main() int keys[] = {1, 2, 3, 4, 5, 6}; test(m, std::begin(keys), std::end(keys)); } + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.set/find_const.pass.cpp b/libcxx/test/std/containers/unord/unord.set/find_const.pass.cpp index e46e3d5f1d7c2..f226a69606fd2 100644 --- a/libcxx/test/std/containers/unord/unord.set/find_const.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.set/find_const.pass.cpp @@ -19,7 +19,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_set C; @@ -63,4 +63,6 @@ int main() assert(i == c.cend()); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.set/find_non_const.pass.cpp b/libcxx/test/std/containers/unord/unord.set/find_non_const.pass.cpp index bbd37754eed12..4b24b2f447c35 100644 --- a/libcxx/test/std/containers/unord/unord.set/find_non_const.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.set/find_non_const.pass.cpp @@ -19,7 +19,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_set C; @@ -63,4 +63,6 @@ int main() assert(i == c.cend()); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.set/incomplete.pass.cpp b/libcxx/test/std/containers/unord/unord.set/incomplete.pass.cpp index 12c95353cf6e8..b77f679fef5c3 100644 --- a/libcxx/test/std/containers/unord/unord.set/incomplete.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.set/incomplete.pass.cpp @@ -32,6 +32,8 @@ struct A { inline bool operator==(A const& L, A const& R) { return &L == &R; } -int main() { +int main(int, char**) { A a; + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.set/insert_and_emplace_allocator_requirements.pass.cpp b/libcxx/test/std/containers/unord/unord.set/insert_and_emplace_allocator_requirements.pass.cpp index fffd108a78337..34905e3c8dcf1 100644 --- a/libcxx/test/std/containers/unord/unord.set/insert_and_emplace_allocator_requirements.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.set/insert_and_emplace_allocator_requirements.pass.cpp @@ -21,8 +21,10 @@ #include "../../set_allocator_requirement_test_templates.h" -int main() +int main(int, char**) { testSetInsert >(); testSetEmplace >(); + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.set/insert_const_lvalue.pass.cpp b/libcxx/test/std/containers/unord/unord.set/insert_const_lvalue.pass.cpp index 820ac6e907c31..097b221a65bd0 100644 --- a/libcxx/test/std/containers/unord/unord.set/insert_const_lvalue.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.set/insert_const_lvalue.pass.cpp @@ -50,7 +50,7 @@ void do_insert_const_lvalue_test() assert(r.second); } -int main() +int main(int, char**) { do_insert_const_lvalue_test >(); #if TEST_STD_VER >= 11 @@ -60,4 +60,6 @@ int main() do_insert_const_lvalue_test(); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.set/insert_hint_const_lvalue.pass.cpp b/libcxx/test/std/containers/unord/unord.set/insert_hint_const_lvalue.pass.cpp index 3ca654764a1cf..e3765ca02cb3e 100644 --- a/libcxx/test/std/containers/unord/unord.set/insert_hint_const_lvalue.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.set/insert_hint_const_lvalue.pass.cpp @@ -51,7 +51,7 @@ void do_insert_hint_const_lvalue_test() assert(*r == 5.5); } -int main() +int main(int, char**) { do_insert_hint_const_lvalue_test >(); #if TEST_STD_VER >= 11 @@ -74,4 +74,6 @@ int main() assert(false); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.set/insert_hint_rvalue.pass.cpp b/libcxx/test/std/containers/unord/unord.set/insert_hint_rvalue.pass.cpp index f4a38dcfbef95..071708e1eacdf 100644 --- a/libcxx/test/std/containers/unord/unord.set/insert_hint_rvalue.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.set/insert_hint_rvalue.pass.cpp @@ -21,7 +21,7 @@ #include "MoveOnly.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_set C; @@ -115,4 +115,6 @@ int main() assert(*r == 5); } #endif // TEST_STD_VER >= 11 + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.set/insert_init.pass.cpp b/libcxx/test/std/containers/unord/unord.set/insert_init.pass.cpp index 2af3d37328707..c60fcb16bff22 100644 --- a/libcxx/test/std/containers/unord/unord.set/insert_init.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.set/insert_init.pass.cpp @@ -22,7 +22,7 @@ #include "test_iterators.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_set C; @@ -65,4 +65,6 @@ int main() assert(c.count(3) == 1); assert(c.count(4) == 1); } + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.set/insert_node_type.pass.cpp b/libcxx/test/std/containers/unord/unord.set/insert_node_type.pass.cpp index 8eed6586556a3..f41c936857bac 100644 --- a/libcxx/test/std/containers/unord/unord.set/insert_node_type.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.set/insert_node_type.pass.cpp @@ -73,10 +73,12 @@ void test(Container& c) } } -int main() +int main(int, char**) { std::unordered_set m; test(m); std::unordered_set, std::equal_to, min_allocator> m2; test(m2); + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.set/insert_node_type_hint.pass.cpp b/libcxx/test/std/containers/unord/unord.set/insert_node_type_hint.pass.cpp index bf8c127764995..ae5e8976e48f5 100644 --- a/libcxx/test/std/containers/unord/unord.set/insert_node_type_hint.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.set/insert_node_type_hint.pass.cpp @@ -51,10 +51,12 @@ void test(Container& c) } } -int main() +int main(int, char**) { std::unordered_set m; test(m); std::unordered_set, std::equal_to, min_allocator> m2; test(m2); + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.set/insert_range.pass.cpp b/libcxx/test/std/containers/unord/unord.set/insert_range.pass.cpp index d0c4d7e85d1b6..cb365483a9db9 100644 --- a/libcxx/test/std/containers/unord/unord.set/insert_range.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.set/insert_range.pass.cpp @@ -21,7 +21,7 @@ #include "test_iterators.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_set C; @@ -66,4 +66,6 @@ int main() assert(c.count(4) == 1); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.set/insert_rvalue.pass.cpp b/libcxx/test/std/containers/unord/unord.set/insert_rvalue.pass.cpp index 75342b7c3bcc1..9edab27404155 100644 --- a/libcxx/test/std/containers/unord/unord.set/insert_rvalue.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.set/insert_rvalue.pass.cpp @@ -21,7 +21,7 @@ #include "MoveOnly.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_set C; @@ -127,4 +127,6 @@ int main() assert(r.second); } #endif // TEST_STD_VER >= 11 + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.set/iterators.fail.cpp b/libcxx/test/std/containers/unord/unord.set/iterators.fail.cpp index 8ded4e0233ac2..de5f88e792fed 100644 --- a/libcxx/test/std/containers/unord/unord.set/iterators.fail.cpp +++ b/libcxx/test/std/containers/unord/unord.set/iterators.fail.cpp @@ -22,7 +22,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::unordered_set C; @@ -63,4 +63,6 @@ int main() assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); } + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.set/iterators.pass.cpp b/libcxx/test/std/containers/unord/unord.set/iterators.pass.cpp index 73b1a4c540287..eb8459101b2a2 100644 --- a/libcxx/test/std/containers/unord/unord.set/iterators.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.set/iterators.pass.cpp @@ -26,7 +26,7 @@ #include "test_macros.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_set C; @@ -125,4 +125,6 @@ int main() assert (!(cii != ii1 )); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.set/load_factor.pass.cpp b/libcxx/test/std/containers/unord/unord.set/load_factor.pass.cpp index 06d17dc905c46..c5857b7b47c88 100644 --- a/libcxx/test/std/containers/unord/unord.set/load_factor.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.set/load_factor.pass.cpp @@ -21,7 +21,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_set C; @@ -71,4 +71,6 @@ int main() assert(c.load_factor() == 0); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.set/local_iterators.fail.cpp b/libcxx/test/std/containers/unord/unord.set/local_iterators.fail.cpp index b7c3d9b6b5446..7bacd2f6f7653 100644 --- a/libcxx/test/std/containers/unord/unord.set/local_iterators.fail.cpp +++ b/libcxx/test/std/containers/unord/unord.set/local_iterators.fail.cpp @@ -22,7 +22,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::unordered_set C; @@ -257,4 +257,6 @@ int main() j = c.cend(b); assert(std::distance(i, j) == 0); } + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.set/local_iterators.pass.cpp b/libcxx/test/std/containers/unord/unord.set/local_iterators.pass.cpp index 0797c1ec8b9e1..ad3de5b0ae0d7 100644 --- a/libcxx/test/std/containers/unord/unord.set/local_iterators.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.set/local_iterators.pass.cpp @@ -24,7 +24,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_set C; @@ -384,4 +384,6 @@ int main() assert(*i == 4); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.set/max_bucket_count.pass.cpp b/libcxx/test/std/containers/unord/unord.set/max_bucket_count.pass.cpp index 88471bbaf8e18..121147a08e7c5 100644 --- a/libcxx/test/std/containers/unord/unord.set/max_bucket_count.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.set/max_bucket_count.pass.cpp @@ -19,7 +19,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_set C; @@ -34,4 +34,6 @@ int main() assert(c.max_bucket_count() > 0); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.set/max_load_factor.pass.cpp b/libcxx/test/std/containers/unord/unord.set/max_load_factor.pass.cpp index 35028a827d1ea..ac345a1d4ea2b 100644 --- a/libcxx/test/std/containers/unord/unord.set/max_load_factor.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.set/max_load_factor.pass.cpp @@ -24,7 +24,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_set C; @@ -62,4 +62,6 @@ int main() assert(false); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.set/max_size.pass.cpp b/libcxx/test/std/containers/unord/unord.set/max_size.pass.cpp index 5ec2af75b7460..aeb1354da5621 100644 --- a/libcxx/test/std/containers/unord/unord.set/max_size.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.set/max_size.pass.cpp @@ -20,7 +20,7 @@ #include "test_allocator.h" #include "test_macros.h" -int main() +int main(int, char**) { { typedef limited_allocator A; @@ -46,4 +46,6 @@ int main() assert(c.max_size() <= max_dist); assert(c.max_size() <= alloc_max_size(c.get_allocator())); } + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.set/merge.pass.cpp b/libcxx/test/std/containers/unord/unord.set/merge.pass.cpp index 91dd476d4f9ac..4a11867ed2adc 100644 --- a/libcxx/test/std/containers/unord/unord.set/merge.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.set/merge.pass.cpp @@ -49,7 +49,7 @@ struct throw_hasher }; #endif -int main() +int main(int, char**) { { std::unordered_set src{1, 3, 5}; @@ -150,4 +150,5 @@ int main() first.merge(std::move(second)); } } + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.set/rehash.pass.cpp b/libcxx/test/std/containers/unord/unord.set/rehash.pass.cpp index c373b1632d52d..e45327ad7ec51 100644 --- a/libcxx/test/std/containers/unord/unord.set/rehash.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.set/rehash.pass.cpp @@ -36,7 +36,7 @@ void test(const C& c) assert(c.count(4) == 1); } -int main() +int main(int, char**) { { typedef std::unordered_set C; @@ -99,4 +99,6 @@ int main() test(c); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.set/reserve.pass.cpp b/libcxx/test/std/containers/unord/unord.set/reserve.pass.cpp index a852f10223da9..7ea358e889d48 100644 --- a/libcxx/test/std/containers/unord/unord.set/reserve.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.set/reserve.pass.cpp @@ -45,7 +45,7 @@ void reserve_invariant(size_t n) // LWG #2156 } } -int main() +int main(int, char**) { { typedef std::unordered_set C; @@ -103,4 +103,6 @@ int main() } #endif reserve_invariant(20); + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.set/size.pass.cpp b/libcxx/test/std/containers/unord/unord.set/size.pass.cpp index e3e488461c97c..f7967fcd5f7a5 100644 --- a/libcxx/test/std/containers/unord/unord.set/size.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.set/size.pass.cpp @@ -18,7 +18,7 @@ #include "test_macros.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_set M; @@ -58,4 +58,6 @@ int main() assert(m.size() == 0); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.set/swap_member.pass.cpp b/libcxx/test/std/containers/unord/unord.set/swap_member.pass.cpp index 9c34e8de9c5b3..0877b14f763f2 100644 --- a/libcxx/test/std/containers/unord/unord.set/swap_member.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.set/swap_member.pass.cpp @@ -24,7 +24,7 @@ #include "test_allocator.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef test_hash > Hash; @@ -566,4 +566,6 @@ int main() assert(c2.max_load_factor() == 1); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.set/types.pass.cpp b/libcxx/test/std/containers/unord/unord.set/types.pass.cpp index 7beafedc2c5db..7b1531dc28f6e 100644 --- a/libcxx/test/std/containers/unord/unord.set/types.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.set/types.pass.cpp @@ -31,7 +31,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_set C; @@ -65,4 +65,6 @@ int main() static_assert((std::is_same::value), ""); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/allocator.pass.cpp b/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/allocator.pass.cpp index d6e604d72024a..920244aae8242 100644 --- a/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/allocator.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/allocator.pass.cpp @@ -24,7 +24,7 @@ #include "test_allocator.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_set A; @@ -184,4 +184,6 @@ int main() assert(c.max_load_factor() == 1); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/assign_init.pass.cpp b/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/assign_init.pass.cpp index 515022124a44b..bbb2045cb9cab 100644 --- a/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/assign_init.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/assign_init.pass.cpp @@ -27,7 +27,7 @@ #include "test_allocator.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef test_allocator A; @@ -93,4 +93,6 @@ int main() assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/assign_move.pass.cpp b/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/assign_move.pass.cpp index 9c8d055a9458a..15741254d9648 100644 --- a/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/assign_move.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/assign_move.pass.cpp @@ -28,7 +28,7 @@ #include "test_allocator.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef test_allocator A; @@ -210,4 +210,6 @@ int main() assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/compare_copy_constructible.fail.cpp b/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/compare_copy_constructible.fail.cpp index 21cd61458c6a4..0638027fd814b 100644 --- a/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/compare_copy_constructible.fail.cpp +++ b/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/compare_copy_constructible.fail.cpp @@ -23,6 +23,8 @@ struct Comp { }; -int main() { +int main(int, char**) { std::unordered_set, Comp > m; + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/copy.pass.cpp b/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/copy.pass.cpp index 652f2e4a44207..179e6e473c8f1 100644 --- a/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/copy.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/copy.pass.cpp @@ -26,7 +26,7 @@ #include "test_allocator.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_set> C; static_assert(!std::is_nothrow_default_constructible::value, ""); } + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/dtor_noexcept.pass.cpp b/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/dtor_noexcept.pass.cpp index 7041c8263a45a..2225469e9e5ab 100644 --- a/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/dtor_noexcept.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/dtor_noexcept.pass.cpp @@ -37,7 +37,7 @@ struct some_hash std::size_t operator()(T const&) const; }; -int main() +int main(int, char**) { { typedef std::unordered_set C; @@ -64,4 +64,6 @@ int main() static_assert(!std::is_nothrow_destructible::value, ""); } #endif // _LIBCPP_VERSION + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/hash_copy_constructible.fail.cpp b/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/hash_copy_constructible.fail.cpp index 0ddae66710c4d..92550a0962fac 100644 --- a/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/hash_copy_constructible.fail.cpp +++ b/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/hash_copy_constructible.fail.cpp @@ -23,6 +23,8 @@ struct Hash { }; -int main() { +int main(int, char**) { std::unordered_set > m; + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/init.pass.cpp b/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/init.pass.cpp index 1550727d8feac..8bf0453c32052 100644 --- a/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/init.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/init.pass.cpp @@ -28,7 +28,7 @@ #include "test_allocator.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_set C; @@ -70,4 +70,6 @@ int main() some_comp> C; static_assert(!std::is_nothrow_move_assignable::value, ""); } + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/move_noexcept.pass.cpp b/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/move_noexcept.pass.cpp index 86a058b076b98..49802f689f33a 100644 --- a/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/move_noexcept.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/move_noexcept.pass.cpp @@ -40,7 +40,7 @@ struct some_hash std::size_t operator()(T const&) const; }; -int main() +int main(int, char**) { #if defined(_LIBCPP_VERSION) { @@ -67,4 +67,6 @@ int main() some_comp> C; static_assert(!std::is_nothrow_move_constructible::value, ""); } + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/range.pass.cpp b/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/range.pass.cpp index 182ce8bee4d3c..dfa46ec568653 100644 --- a/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/range.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/range.pass.cpp @@ -28,7 +28,7 @@ #include "test_allocator.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::unordered_set #include -int main() +int main(int, char**) { #if _LIBCPP_DEBUG >= 1 { @@ -39,4 +39,6 @@ int main() assert(false); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.set/unord.set.swap/swap_noexcept.pass.cpp b/libcxx/test/std/containers/unord/unord.set/unord.set.swap/swap_noexcept.pass.cpp index 61371306ef09a..40bf1894d7624 100644 --- a/libcxx/test/std/containers/unord/unord.set/unord.set.swap/swap_noexcept.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.set/unord.set.swap/swap_noexcept.pass.cpp @@ -118,7 +118,7 @@ struct some_alloc3 typedef std::false_type is_always_equal; }; -int main() +int main(int, char**) { { typedef std::unordered_set C; @@ -186,4 +186,6 @@ int main() } #endif // _LIBCPP_VERSION #endif + + return 0; } diff --git a/libcxx/test/std/containers/unord/unord.set/unord.set.swap/swap_non_member.pass.cpp b/libcxx/test/std/containers/unord/unord.set/unord.set.swap/swap_non_member.pass.cpp index aad68658a3b2f..8f1d9f0c3ee37 100644 --- a/libcxx/test/std/containers/unord/unord.set/unord.set.swap/swap_non_member.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.set/unord.set.swap/swap_non_member.pass.cpp @@ -24,7 +24,7 @@ #include "test_allocator.h" #include "min_allocator.h" -int main() +int main(int, char**) { { typedef test_hash > Hash; @@ -566,4 +566,6 @@ int main() assert(c2.max_load_factor() == 1); } #endif + + return 0; } diff --git a/libcxx/test/std/containers/views/span.cons/array.fail.cpp b/libcxx/test/std/containers/views/span.cons/array.fail.cpp index 7e9d85dcdcb87..f616497718777 100644 --- a/libcxx/test/std/containers/views/span.cons/array.fail.cpp +++ b/libcxx/test/std/containers/views/span.cons/array.fail.cpp @@ -34,7 +34,7 @@ const int carr[] = {4,5,6}; volatile int varr[] = {7,8,9}; const volatile int cvarr[] = {1,3,5}; -int main () +int main(int, char**) { // Size wrong { @@ -68,4 +68,6 @@ int main () std::span< volatile int,3> s6{ carr}; // expected-error {{no matching constructor for initialization of 'std::span'}} std::span< volatile int,3> s7{cvarr}; // expected-error {{no matching constructor for initialization of 'std::span'}} } + + return 0; } diff --git a/libcxx/test/std/containers/views/span.cons/array.pass.cpp b/libcxx/test/std/containers/views/span.cons/array.pass.cpp index d9d1029b623af..5ac7e1a4a19dd 100644 --- a/libcxx/test/std/containers/views/span.cons/array.pass.cpp +++ b/libcxx/test/std/containers/views/span.cons/array.pass.cpp @@ -105,7 +105,7 @@ void testRuntimeSpan() struct A{}; -int main () +int main(int, char**) { static_assert(testConstexprSpan(), ""); static_assert(testConstexprSpan(), ""); @@ -119,4 +119,6 @@ int main () testRuntimeSpan(); checkCV(); + + return 0; } diff --git a/libcxx/test/std/containers/views/span.cons/assign.pass.cpp b/libcxx/test/std/containers/views/span.cons/assign.pass.cpp index ea6028ad065e1..d30869537de45 100644 --- a/libcxx/test/std/containers/views/span.cons/assign.pass.cpp +++ b/libcxx/test/std/containers/views/span.cons/assign.pass.cpp @@ -37,7 +37,7 @@ constexpr int carr3[] = {7,8}; std::string strs[] = {"ABC", "DEF", "GHI"}; -int main () +int main(int, char**) { // constexpr dynamically sized assignment @@ -55,18 +55,18 @@ int main () // On darwin i386, ptrdiff_t is the same as int. constexpr std::span spans[] = { {}, - {carr1, static_cast(0)}, - {carr1, 1}, - {carr1, 2}, - {carr1, 3}, - {carr1, 4}, - {carr2, static_cast(0)}, - {carr2, 1}, - {carr2, 2}, - {carr2, 3}, - {carr3, static_cast(0)}, - {carr3, 1}, - {carr3, 2} + {carr1, static_cast(0)}, + {carr1, 1U}, + {carr1, 2U}, + {carr1, 3U}, + {carr1, 4U}, + {carr2, static_cast(0)}, + {carr2, 1U}, + {carr2, 2U}, + {carr2, 3U}, + {carr3, static_cast(0)}, + {carr3, 1U}, + {carr3, 2U} }; static_assert(std::size(spans) == 13, "" ); @@ -289,4 +289,6 @@ int main () for (size_t j = i; j < std::size(spans); ++j) assert((doAssign(spans[i], spans[j]))); } + + return 0; } diff --git a/libcxx/test/std/containers/views/span.cons/container.fail.cpp b/libcxx/test/std/containers/views/span.cons/container.fail.cpp index cfffa57a1e3db..9bc13a610690a 100644 --- a/libcxx/test/std/containers/views/span.cons/container.fail.cpp +++ b/libcxx/test/std/containers/views/span.cons/container.fail.cpp @@ -16,6 +16,7 @@ // constexpr span(const Container& cont); // // Remarks: These constructors shall not participate in overload resolution unless: +// — extent == dynamic_extent, // — Container is not a specialization of span, // — Container is not a specialization of array, // — is_array_v is false, @@ -63,43 +64,34 @@ struct NotAContainerPrivate { }; -int main () +int main(int, char**) { // Making non-const spans from const sources (a temporary binds to `const &`) { std::span s1{IsAContainer()}; // expected-error {{no matching constructor for initialization of 'std::span'}} - std::span s2{IsAContainer()}; // expected-error {{no matching constructor for initialization of 'std::span'}} std::span s3{std::vector()}; // expected-error {{no matching constructor for initialization of 'std::span'}} - std::span s4{std::vector()}; // expected-error {{no matching constructor for initialization of 'std::span'}} } // Missing size and/or data { std::span s1{NotAContainerNoData()}; // expected-error {{no matching constructor for initialization of 'std::span'}} - std::span s2{NotAContainerNoData()}; // expected-error {{no matching constructor for initialization of 'std::span'}} std::span s3{NotAContainerNoSize()}; // expected-error {{no matching constructor for initialization of 'std::span'}} - std::span s4{NotAContainerNoSize()}; // expected-error {{no matching constructor for initialization of 'std::span'}} std::span s5{NotAContainerPrivate()}; // expected-error {{no matching constructor for initialization of 'std::span'}} - std::span s6{NotAContainerPrivate()}; // expected-error {{no matching constructor for initialization of 'std::span'}} // Again with the standard containers std::span s11{std::deque()}; // expected-error {{no matching constructor for initialization of 'std::span'}} - std::span s12{std::deque()}; // expected-error {{no matching constructor for initialization of 'std::span'}} std::span s13{std::list()}; // expected-error {{no matching constructor for initialization of 'std::span'}} - std::span s14{std::list()}; // expected-error {{no matching constructor for initialization of 'std::span'}} std::span s15{std::forward_list()}; // expected-error {{no matching constructor for initialization of 'std::span'}} - std::span s16{std::forward_list()}; // expected-error {{no matching constructor for initialization of 'std::span'}} } // Not the same type { IsAContainer c; std::span s1{c}; // expected-error {{no matching constructor for initialization of 'std::span'}} - std::span s2{c}; // expected-error {{no matching constructor for initialization of 'std::span'}} } -// CV wrong (dynamically sized) +// CV wrong { IsAContainer c; IsAContainer cv; @@ -114,19 +106,12 @@ int main () std::span< volatile int> s7{cv}; // expected-error {{no matching constructor for initialization of 'std::span'}} } -// CV wrong (statically sized) +// statically sized { - IsAContainer c; - IsAContainer cv; - IsAContainer< volatile int> v; - - std::span< int,1> s1{c}; // expected-error {{no matching constructor for initialization of 'std::span'}} - std::span< int,1> s2{v}; // expected-error {{no matching constructor for initialization of 'std::span'}} - std::span< int,1> s3{cv}; // expected-error {{no matching constructor for initialization of 'std::span'}} - std::span s4{v}; // expected-error {{no matching constructor for initialization of 'std::span'}} - std::span s5{cv}; // expected-error {{no matching constructor for initialization of 'std::span'}} - std::span< volatile int,1> s6{c}; // expected-error {{no matching constructor for initialization of 'std::span'}} - std::span< volatile int,1> s7{cv}; // expected-error {{no matching constructor for initialization of 'std::span'}} + IsAContainer c; + std::span s1{c}; // expected-error {{no matching constructor for initialization of 'std::span'}} } + + return 0; } diff --git a/libcxx/test/std/containers/views/span.cons/container.pass.cpp b/libcxx/test/std/containers/views/span.cons/container.pass.cpp index 4e9001bff8de6..d42013bd268bb 100644 --- a/libcxx/test/std/containers/views/span.cons/container.pass.cpp +++ b/libcxx/test/std/containers/views/span.cons/container.pass.cpp @@ -16,6 +16,7 @@ // constexpr span(const Container& cont); // // Remarks: These constructors shall not participate in overload resolution unless: +// — extent == dynamic_extent, // — Container is not a specialization of span, // — Container is not a specialization of array, // — is_array_v is false, @@ -48,17 +49,12 @@ void checkCV() { std::vector v = {1,2,3}; -// Types the same (dynamic sized) +// Types the same { std::span< int> s1{v}; // a span< int> pointing at int. } -// Types the same (static sized) - { - std::span< int,3> s1{v}; // a span< int> pointing at int. - } - -// types different (dynamic sized) +// types different { std::span s1{v}; // a span pointing at int. std::span< volatile int> s2{v}; // a span< volatile int> pointing at int. @@ -66,24 +62,12 @@ void checkCV() std::span s4{v}; // a span pointing at int. } -// types different (static sized) - { - std::span s1{v}; // a span pointing at int. - std::span< volatile int,3> s2{v}; // a span< volatile int> pointing at int. - std::span< volatile int,3> s3{v}; // a span< volatile int> pointing at const int. - std::span s4{v}; // a span pointing at int. - } - // Constructing a const view from a temporary { std::span s1{IsAContainer()}; - std::span s2{IsAContainer()}; std::span s3{std::vector()}; - std::span s4{std::vector()}; (void) s1; - (void) s2; (void) s3; - (void) s4; } } @@ -92,11 +76,8 @@ template constexpr bool testConstexprSpan() { constexpr IsAContainer val{}; - std::span s1{val}; - std::span s2{val}; - return - s1.data() == val.getV() && s1.size() == 1 - && s2.data() == val.getV() && s2.size() == 1; + std::span s1{val}; + return s1.data() == val.getV() && s1.size() == 1; } @@ -107,17 +88,13 @@ void testRuntimeSpan() const IsAContainer cVal; std::span s1{val}; std::span s2{cVal}; - std::span s3{val}; - std::span s4{cVal}; assert(s1.data() == val.getV() && s1.size() == 1); assert(s2.data() == cVal.getV() && s2.size() == 1); - assert(s3.data() == val.getV() && s3.size() == 1); - assert(s4.data() == cVal.getV() && s4.size() == 1); } struct A{}; -int main () +int main(int, char**) { static_assert(testConstexprSpan(), ""); static_assert(testConstexprSpan(), ""); @@ -131,4 +108,6 @@ int main () testRuntimeSpan(); checkCV(); + + return 0; } diff --git a/libcxx/test/std/containers/views/span.cons/copy.pass.cpp b/libcxx/test/std/containers/views/span.cons/copy.pass.cpp index 1ccb679ce94b5..2ad1cded2165a 100644 --- a/libcxx/test/std/containers/views/span.cons/copy.pass.cpp +++ b/libcxx/test/std/containers/views/span.cons/copy.pass.cpp @@ -42,7 +42,7 @@ void testCV () } -int main () +int main(int, char**) { constexpr int carr[] = {1,2,3}; @@ -67,4 +67,6 @@ int main () testCV(); testCV< volatile int>(); testCV(); + + return 0; } diff --git a/libcxx/test/std/containers/views/span.cons/deduct.pass.cpp b/libcxx/test/std/containers/views/span.cons/deduct.pass.cpp index 7c53388365896..188463bc31f83 100644 --- a/libcxx/test/std/containers/views/span.cons/deduct.pass.cpp +++ b/libcxx/test/std/containers/views/span.cons/deduct.pass.cpp @@ -40,7 +40,7 @@ // Disable the missing braces warning for this reason. #include "disable_missing_braces_warning.h" -int main () +int main(int, char**) { { int arr[] = {1,2,3}; @@ -83,4 +83,6 @@ int main () assert((size_t)s.size() == str.size()); assert((std::equal(s.begin(), s.end(), std::begin(s), std::end(s)))); } + + return 0; } diff --git a/libcxx/test/std/containers/views/span.cons/default.fail.cpp b/libcxx/test/std/containers/views/span.cons/default.fail.cpp index 309f7180c18ed..87a6e7511b7be 100644 --- a/libcxx/test/std/containers/views/span.cons/default.fail.cpp +++ b/libcxx/test/std/containers/views/span.cons/default.fail.cpp @@ -22,10 +22,12 @@ #include "test_macros.h" -int main () +int main(int, char**) { - std::span s; // expected-error-re@span:* {{static_assert failed{{( due to requirement '2[LL]{0,2} == 0')?}} "Can't default construct a statically sized span with size > 0"}} + std::span s; // expected-error-re@span:* {{static_assert failed{{( due to requirement '.*')?}} "Can't default construct a statically sized span with size > 0"}} // TODO: This is what I want: // eXpected-error {{no matching constructor for initialization of 'std::span'}} + + return 0; } diff --git a/libcxx/test/std/containers/views/span.cons/default.pass.cpp b/libcxx/test/std/containers/views/span.cons/default.pass.cpp index 431b7e90bafbd..867026bd9aecc 100644 --- a/libcxx/test/std/containers/views/span.cons/default.pass.cpp +++ b/libcxx/test/std/containers/views/span.cons/default.pass.cpp @@ -64,7 +64,7 @@ void testRuntimeSpan() struct A{}; -int main () +int main(int, char**) { static_assert(testConstexprSpan(), ""); static_assert(testConstexprSpan(), ""); @@ -78,4 +78,6 @@ int main () testRuntimeSpan(); checkCV(); + + return 0; } diff --git a/libcxx/test/std/containers/views/span.cons/ptr_len.fail.cpp b/libcxx/test/std/containers/views/span.cons/ptr_len.fail.cpp index ad63c69b3ea63..d407ae7793645 100644 --- a/libcxx/test/std/containers/views/span.cons/ptr_len.fail.cpp +++ b/libcxx/test/std/containers/views/span.cons/ptr_len.fail.cpp @@ -27,7 +27,7 @@ const int carr[] = {4,5,6}; volatile int varr[] = {7,8,9}; const volatile int cvarr[] = {1,3,5}; -int main () +int main(int, char**) { // We can't check that the size doesn't match - because that's a runtime property // std::span s1(arr, 3); @@ -59,4 +59,6 @@ int main () std::span< volatile int,3> s6{ carr, 3}; // expected-error {{no matching constructor for initialization of 'std::span'}} std::span< volatile int,3> s7{cvarr, 3}; // expected-error {{no matching constructor for initialization of 'std::span'}} } + + return 0; } diff --git a/libcxx/test/std/containers/views/span.cons/ptr_len.pass.cpp b/libcxx/test/std/containers/views/span.cons/ptr_len.pass.cpp index a1a93c71fabfc..2a4b260c87dd7 100644 --- a/libcxx/test/std/containers/views/span.cons/ptr_len.pass.cpp +++ b/libcxx/test/std/containers/views/span.cons/ptr_len.pass.cpp @@ -95,7 +95,7 @@ void testRuntimeSpan() struct A{}; -int main () +int main(int, char**) { static_assert(testConstexprSpan(), ""); static_assert(testConstexprSpan(), ""); @@ -109,4 +109,6 @@ int main () testRuntimeSpan(); checkCV(); + + return 0; } diff --git a/libcxx/test/std/containers/views/span.cons/ptr_ptr.fail.cpp b/libcxx/test/std/containers/views/span.cons/ptr_ptr.fail.cpp index 0bda60c3f0232..9c15ea58c9529 100644 --- a/libcxx/test/std/containers/views/span.cons/ptr_ptr.fail.cpp +++ b/libcxx/test/std/containers/views/span.cons/ptr_ptr.fail.cpp @@ -27,7 +27,7 @@ const int carr[] = {4,5,6}; volatile int varr[] = {7,8,9}; const volatile int cvarr[] = {1,3,5}; -int main () +int main(int, char**) { // We can't check that the size doesn't match - because that's a runtime property // std::span s1(arr, arr + 3); @@ -59,4 +59,6 @@ int main () std::span< volatile int,3> s6{ carr, carr + 3}; // expected-error {{no matching constructor for initialization of 'std::span'}} std::span< volatile int,3> s7{cvarr, cvarr + 3}; // expected-error {{no matching constructor for initialization of 'std::span'}} } + + return 0; } diff --git a/libcxx/test/std/containers/views/span.cons/ptr_ptr.pass.cpp b/libcxx/test/std/containers/views/span.cons/ptr_ptr.pass.cpp index 1d693e39244d3..15c9f303ecb5a 100644 --- a/libcxx/test/std/containers/views/span.cons/ptr_ptr.pass.cpp +++ b/libcxx/test/std/containers/views/span.cons/ptr_ptr.pass.cpp @@ -95,7 +95,7 @@ void testRuntimeSpan() struct A{}; -int main () +int main(int, char**) { static_assert(testConstexprSpan(), ""); static_assert(testConstexprSpan(), ""); @@ -109,4 +109,6 @@ int main () testRuntimeSpan(); checkCV(); + + return 0; } diff --git a/libcxx/test/std/containers/views/span.cons/span.fail.cpp b/libcxx/test/std/containers/views/span.cons/span.fail.cpp index 132d1b15226c9..f559b1fb0c29d 100644 --- a/libcxx/test/std/containers/views/span.cons/span.fail.cpp +++ b/libcxx/test/std/containers/views/span.cons/span.fail.cpp @@ -89,7 +89,7 @@ void checkCV () } } -int main () +int main(int, char**) { std::span sp; std::span sp0; @@ -100,4 +100,6 @@ int main () std::span s4{sp0}; // expected-error {{no matching constructor for initialization of 'std::span'}} checkCV(); + + return 0; } diff --git a/libcxx/test/std/containers/views/span.cons/span.pass.cpp b/libcxx/test/std/containers/views/span.cons/span.pass.cpp index 8ace94f5e0583..74da3fce894a1 100644 --- a/libcxx/test/std/containers/views/span.cons/span.pass.cpp +++ b/libcxx/test/std/containers/views/span.cons/span.pass.cpp @@ -121,7 +121,7 @@ bool testConversionSpan() struct A{}; -int main () +int main(int, char**) { static_assert(testConstexprSpan(), ""); static_assert(testConstexprSpan(), ""); @@ -138,4 +138,6 @@ int main () // assert((testConversionSpan())); checkCV(); + + return 0; } diff --git a/libcxx/test/std/containers/views/span.cons/stdarray.pass.cpp b/libcxx/test/std/containers/views/span.cons/stdarray.pass.cpp index a0b37fe8e64b9..03fdd25342608 100644 --- a/libcxx/test/std/containers/views/span.cons/stdarray.pass.cpp +++ b/libcxx/test/std/containers/views/span.cons/stdarray.pass.cpp @@ -96,7 +96,7 @@ void testRuntimeSpan() struct A{}; -int main () +int main(int, char**) { static_assert(testConstexprSpan(), ""); static_assert(testConstexprSpan(), ""); @@ -110,4 +110,6 @@ int main () testRuntimeSpan(); checkCV(); + + return 0; } diff --git a/libcxx/test/std/containers/views/span.elem/back.pass.cpp b/libcxx/test/std/containers/views/span.elem/back.pass.cpp new file mode 100644 index 0000000000000..775aed6cb0fbf --- /dev/null +++ b/libcxx/test/std/containers/views/span.elem/back.pass.cpp @@ -0,0 +1,75 @@ +// -*- C++ -*- +//===------------------------------ span ---------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===---------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03, c++11, c++14, c++17 + +// + +// constexpr reference back() const noexcept; +// Expects: empty() is false. +// Effects: Equivalent to: return *(data() + (size() - 1)); +// + + +#include +#include +#include + +#include "test_macros.h" + + +template +constexpr bool testConstexprSpan(Span sp) +{ + _LIBCPP_ASSERT(sp.back(), ""); + return std::addressof(sp.back()) == sp.data() + sp.size() - 1; +} + + +template +void testRuntimeSpan(Span sp) +{ + _LIBCPP_ASSERT(sp.back(), ""); + assert(std::addressof(sp.back()) == sp.data() + sp.size() - 1); +} + + +struct A{}; +constexpr int iArr1[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9}; + int iArr2[] = {10, 11, 12, 13, 14, 15, 16, 17, 18, 19}; + +int main(int, char**) +{ + static_assert(testConstexprSpan(std::span(iArr1, 1)), ""); + static_assert(testConstexprSpan(std::span(iArr1, 2)), ""); + static_assert(testConstexprSpan(std::span(iArr1, 3)), ""); + static_assert(testConstexprSpan(std::span(iArr1, 4)), ""); + + static_assert(testConstexprSpan(std::span(iArr1, 1)), ""); + static_assert(testConstexprSpan(std::span(iArr1, 2)), ""); + static_assert(testConstexprSpan(std::span(iArr1, 3)), ""); + static_assert(testConstexprSpan(std::span(iArr1, 4)), ""); + + + testRuntimeSpan(std::span(iArr2, 1)); + testRuntimeSpan(std::span(iArr2, 2)); + testRuntimeSpan(std::span(iArr2, 3)); + testRuntimeSpan(std::span(iArr2, 4)); + + + testRuntimeSpan(std::span(iArr2, 1)); + testRuntimeSpan(std::span(iArr2, 2)); + testRuntimeSpan(std::span(iArr2, 3)); + testRuntimeSpan(std::span(iArr2, 4)); + + std::string s; + testRuntimeSpan(std::span (&s, 1)); + testRuntimeSpan(std::span(&s, 1)); + + return 0; +} diff --git a/libcxx/test/std/containers/views/span.elem/data.pass.cpp b/libcxx/test/std/containers/views/span.elem/data.pass.cpp index ca49eb8900a07..c858a7e11e335 100644 --- a/libcxx/test/std/containers/views/span.elem/data.pass.cpp +++ b/libcxx/test/std/containers/views/span.elem/data.pass.cpp @@ -40,7 +40,7 @@ struct A{}; constexpr int iArr1[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9}; int iArr2[] = {10, 11, 12, 13, 14, 15, 16, 17, 18, 19}; -int main () +int main(int, char**) { // dynamic size @@ -117,4 +117,6 @@ int main () testRuntimeSpan(std::span(&s, 1), &s); testRuntimeSpan(std::span(&s, 1), &s); + + return 0; } diff --git a/libcxx/test/std/containers/views/span.elem/front.pass.cpp b/libcxx/test/std/containers/views/span.elem/front.pass.cpp new file mode 100644 index 0000000000000..ca381b289e5cc --- /dev/null +++ b/libcxx/test/std/containers/views/span.elem/front.pass.cpp @@ -0,0 +1,75 @@ +// -*- C++ -*- +//===------------------------------ span ---------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===---------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03, c++11, c++14, c++17 + +// + +// constexpr reference front() const noexcept; +// Expects: empty() is false. +// Effects: Equivalent to: return *data(); +// + + +#include +#include +#include + +#include "test_macros.h" + + +template +constexpr bool testConstexprSpan(Span sp) +{ + _LIBCPP_ASSERT(sp.front(), ""); + return std::addressof(sp.front()) == sp.data(); +} + + +template +void testRuntimeSpan(Span sp) +{ + _LIBCPP_ASSERT(sp.front(), ""); + assert(std::addressof(sp.front()) == sp.data()); +} + + +struct A{}; +constexpr int iArr1[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9}; + int iArr2[] = {10, 11, 12, 13, 14, 15, 16, 17, 18, 19}; + +int main(int, char**) +{ + static_assert(testConstexprSpan(std::span(iArr1, 1)), ""); + static_assert(testConstexprSpan(std::span(iArr1, 2)), ""); + static_assert(testConstexprSpan(std::span(iArr1, 3)), ""); + static_assert(testConstexprSpan(std::span(iArr1, 4)), ""); + + static_assert(testConstexprSpan(std::span(iArr1, 1)), ""); + static_assert(testConstexprSpan(std::span(iArr1, 2)), ""); + static_assert(testConstexprSpan(std::span(iArr1, 3)), ""); + static_assert(testConstexprSpan(std::span(iArr1, 4)), ""); + + + testRuntimeSpan(std::span(iArr2, 1)); + testRuntimeSpan(std::span(iArr2, 2)); + testRuntimeSpan(std::span(iArr2, 3)); + testRuntimeSpan(std::span(iArr2, 4)); + + + testRuntimeSpan(std::span(iArr2, 1)); + testRuntimeSpan(std::span(iArr2, 2)); + testRuntimeSpan(std::span(iArr2, 3)); + testRuntimeSpan(std::span(iArr2, 4)); + + std::string s; + testRuntimeSpan(std::span (&s, 1)); + testRuntimeSpan(std::span(&s, 1)); + + return 0; +} diff --git a/libcxx/test/std/containers/views/span.elem/op_idx.pass.cpp b/libcxx/test/std/containers/views/span.elem/op_idx.pass.cpp index d11032673fbfd..cb63ec9d17b22 100644 --- a/libcxx/test/std/containers/views/span.elem/op_idx.pass.cpp +++ b/libcxx/test/std/containers/views/span.elem/op_idx.pass.cpp @@ -26,12 +26,10 @@ template constexpr bool testConstexprSpan(Span sp, ptrdiff_t idx) { _LIBCPP_ASSERT(noexcept(sp[idx]), ""); - _LIBCPP_ASSERT(noexcept(sp(idx)), ""); typename Span::reference r1 = sp[idx]; - typename Span::reference r2 = sp(idx); - typename Span::reference r3 = *(sp.data() + idx); - return r1 == r2 && r2 == r3; + typename Span::reference r2 = *(sp.data() + idx); + return r1 == r2; } @@ -39,19 +37,17 @@ template void testRuntimeSpan(Span sp, ptrdiff_t idx) { _LIBCPP_ASSERT(noexcept(sp[idx]), ""); - _LIBCPP_ASSERT(noexcept(sp(idx)), ""); typename Span::reference r1 = sp[idx]; - typename Span::reference r2 = sp(idx); - typename Span::reference r3 = *(sp.data() + idx); - assert(r1 == r2 && r2 == r3); + typename Span::reference r2 = *(sp.data() + idx); + assert(r1 == r2); } struct A{}; constexpr int iArr1[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9}; int iArr2[] = {10, 11, 12, 13, 14, 15, 16, 17, 18, 19}; -int main () +int main(int, char**) { static_assert(testConstexprSpan(std::span(iArr1, 1), 0), ""); @@ -115,4 +111,6 @@ int main () std::string s; testRuntimeSpan(std::span (&s, 1), 0); testRuntimeSpan(std::span(&s, 1), 0); + + return 0; } diff --git a/libcxx/test/std/containers/views/span.iterators/begin.pass.cpp b/libcxx/test/std/containers/views/span.iterators/begin.pass.cpp index 0abae63ff2ff1..c931f1fb04ee2 100644 --- a/libcxx/test/std/containers/views/span.iterators/begin.pass.cpp +++ b/libcxx/test/std/containers/views/span.iterators/begin.pass.cpp @@ -70,7 +70,7 @@ constexpr int iArr1[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9}; int iArr2[] = {10, 11, 12, 13, 14, 15, 16, 17, 18, 19}; -int main() +int main(int, char**) { static_assert(testConstexprSpan(std::span()), ""); static_assert(testConstexprSpan(std::span()), ""); @@ -110,6 +110,8 @@ int main() testRuntimeSpan(std::span(iArr2, 5)); std::string s; - testRuntimeSpan(std::span(&s, (std::ptrdiff_t) 0)); + testRuntimeSpan(std::span(&s, (std::size_t) 0)); testRuntimeSpan(std::span(&s, 1)); + + return 0; } diff --git a/libcxx/test/std/containers/views/span.iterators/end.pass.cpp b/libcxx/test/std/containers/views/span.iterators/end.pass.cpp index a834804d1762a..2dcb1dfd86b75 100644 --- a/libcxx/test/std/containers/views/span.iterators/end.pass.cpp +++ b/libcxx/test/std/containers/views/span.iterators/end.pass.cpp @@ -38,8 +38,8 @@ constexpr bool testConstexprSpan(Span s) ret = ret && (&*(ce-1) == last); } - ret = ret && (( e - s.begin()) == s.size()); - ret = ret && ((ce - s.cbegin()) == s.size()); + ret = ret && (static_cast( e - s.begin()) == s.size()); + ret = ret && (static_cast(ce - s.cbegin()) == s.size()); ret = ret && (e == ce); return ret; @@ -64,8 +64,8 @@ void testRuntimeSpan(Span s) assert( &*(ce-1) == last); } - assert(( e - s.begin()) == s.size()); - assert((ce - s.cbegin()) == s.size()); + assert(static_cast( e - s.begin()) == s.size()); + assert(static_cast(ce - s.cbegin()) == s.size()); assert(e == ce); } @@ -78,7 +78,7 @@ constexpr int iArr1[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9}; int iArr2[] = {10, 11, 12, 13, 14, 15, 16, 17, 18, 19}; -int main() +int main(int, char**) { static_assert(testConstexprSpan(std::span()), ""); static_assert(testConstexprSpan(std::span()), ""); @@ -118,6 +118,8 @@ int main() testRuntimeSpan(std::span(iArr2, 5)); std::string s; - testRuntimeSpan(std::span(&s, (std::ptrdiff_t) 0)); + testRuntimeSpan(std::span(&s, (std::size_t) 0)); testRuntimeSpan(std::span(&s, 1)); + + return 0; } diff --git a/libcxx/test/std/containers/views/span.iterators/rbegin.pass.cpp b/libcxx/test/std/containers/views/span.iterators/rbegin.pass.cpp index 66e1d5ebf96bc..797629a8652d2 100644 --- a/libcxx/test/std/containers/views/span.iterators/rbegin.pass.cpp +++ b/libcxx/test/std/containers/views/span.iterators/rbegin.pass.cpp @@ -71,7 +71,7 @@ constexpr int iArr1[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9}; int iArr2[] = {10, 11, 12, 13, 14, 15, 16, 17, 18, 19}; -int main() +int main(int, char**) { static_assert(testConstexprSpan(std::span()), ""); static_assert(testConstexprSpan(std::span()), ""); @@ -111,6 +111,8 @@ int main() testRuntimeSpan(std::span(iArr2, 5)); std::string s; - testRuntimeSpan(std::span(&s, static_cast(0))); + testRuntimeSpan(std::span(&s, static_cast(0))); testRuntimeSpan(std::span(&s, 1)); + + return 0; } diff --git a/libcxx/test/std/containers/views/span.iterators/rend.pass.cpp b/libcxx/test/std/containers/views/span.iterators/rend.pass.cpp index 7c53cb0becddb..077ee8dcf8e89 100644 --- a/libcxx/test/std/containers/views/span.iterators/rend.pass.cpp +++ b/libcxx/test/std/containers/views/span.iterators/rend.pass.cpp @@ -35,8 +35,8 @@ constexpr bool testConstexprSpan(Span s) ret = ret && (ce != s.crbegin()); } - ret = ret && (( e - s.rbegin()) == s.size()); - ret = ret && ((ce - s.crbegin()) == s.size()); + ret = ret && (static_cast( e - s.rbegin()) == s.size()); + ret = ret && (static_cast(ce - s.crbegin()) == s.size()); ret = ret && (e == ce); return ret; @@ -58,8 +58,8 @@ void testRuntimeSpan(Span s) assert(ce != s.crbegin()); } - assert(( e - s.rbegin()) == s.size()); - assert((ce - s.crbegin()) == s.size()); + assert(static_cast( e - s.rbegin()) == s.size()); + assert(static_cast(ce - s.crbegin()) == s.size()); assert(e == ce); } @@ -72,7 +72,7 @@ constexpr int iArr1[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9}; int iArr2[] = {10, 11, 12, 13, 14, 15, 16, 17, 18, 19}; -int main() +int main(int, char**) { static_assert(testConstexprSpan(std::span()), ""); static_assert(testConstexprSpan(std::span()), ""); @@ -112,6 +112,8 @@ int main() testRuntimeSpan(std::span(iArr2, 5)); std::string s; - testRuntimeSpan(std::span(&s, (std::ptrdiff_t) 0)); + testRuntimeSpan(std::span(&s, (std::size_t) 0)); testRuntimeSpan(std::span(&s, 1)); + + return 0; } diff --git a/libcxx/test/std/containers/views/span.objectrep/as_bytes.pass.cpp b/libcxx/test/std/containers/views/span.objectrep/as_bytes.pass.cpp index 989b6dc5cb69f..12772c42f160b 100644 --- a/libcxx/test/std/containers/views/span.objectrep/as_bytes.pass.cpp +++ b/libcxx/test/std/containers/views/span.objectrep/as_bytes.pass.cpp @@ -45,7 +45,7 @@ void testRuntimeSpan(Span sp) struct A{}; int iArr2[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9}; -int main () +int main(int, char**) { testRuntimeSpan(std::span ()); testRuntimeSpan(std::span ()); @@ -72,6 +72,8 @@ int main () testRuntimeSpan(std::span(iArr2 + 1, 5)); std::string s; - testRuntimeSpan(std::span(&s, (std::ptrdiff_t) 0)); + testRuntimeSpan(std::span(&s, (std::size_t) 0)); testRuntimeSpan(std::span(&s, 1)); + + return 0; } diff --git a/libcxx/test/std/containers/views/span.objectrep/as_writeable_bytes.fail.cpp b/libcxx/test/std/containers/views/span.objectrep/as_writeable_bytes.fail.cpp index 9b0034b9b58a9..9dadedd75238d 100644 --- a/libcxx/test/std/containers/views/span.objectrep/as_writeable_bytes.fail.cpp +++ b/libcxx/test/std/containers/views/span.objectrep/as_writeable_bytes.fail.cpp @@ -28,7 +28,7 @@ const int iArr2[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9}; struct A {}; -int main () +int main(int, char**) { std::as_writeable_bytes(std::span()); // expected-error {{no matching function for call to 'as_writeable_bytes'}} std::as_writeable_bytes(std::span()); // expected-error {{no matching function for call to 'as_writeable_bytes'}} @@ -40,8 +40,10 @@ int main () std::as_writeable_bytes(std::span()); // expected-error {{no matching function for call to 'as_writeable_bytes'}} std::as_writeable_bytes(std::span()); // expected-error {{no matching function for call to 'as_writeable_bytes'}} std::as_writeable_bytes(std::span()); // expected-error {{no matching function for call to 'as_writeable_bytes'}} - std::as_writeable_bytes(std::span()); // expected-error {{no matching function for call to 'as_writeable_bytes'}} + std::as_writeable_bytes(std::span()); // expected-error {{no matching function for call to 'as_writeable_bytes'}} std::as_writeable_bytes(std::span (iArr2, 1)); // expected-error {{no matching function for call to 'as_writeable_bytes'}} std::as_writeable_bytes(std::span(iArr2 + 5, 1)); // expected-error {{no matching function for call to 'as_writeable_bytes'}} + + return 0; } diff --git a/libcxx/test/std/containers/views/span.objectrep/as_writeable_bytes.pass.cpp b/libcxx/test/std/containers/views/span.objectrep/as_writeable_bytes.pass.cpp index 6538a59465a76..b12500d4ffb1d 100644 --- a/libcxx/test/std/containers/views/span.objectrep/as_writeable_bytes.pass.cpp +++ b/libcxx/test/std/containers/views/span.objectrep/as_writeable_bytes.pass.cpp @@ -45,7 +45,7 @@ void testRuntimeSpan(Span sp) struct A{}; int iArr2[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9}; -int main () +int main(int, char**) { testRuntimeSpan(std::span ()); testRuntimeSpan(std::span ()); @@ -72,6 +72,8 @@ int main () testRuntimeSpan(std::span(iArr2 + 1, 5)); std::string s; - testRuntimeSpan(std::span(&s, (std::ptrdiff_t) 0)); + testRuntimeSpan(std::span(&s, (std::size_t) 0)); testRuntimeSpan(std::span(&s, 1)); + + return 0; } diff --git a/libcxx/test/std/containers/views/span.obs/empty.pass.cpp b/libcxx/test/std/containers/views/span.obs/empty.pass.cpp index e0cdb141b1e1a..bae610c72ca6a 100644 --- a/libcxx/test/std/containers/views/span.obs/empty.pass.cpp +++ b/libcxx/test/std/containers/views/span.obs/empty.pass.cpp @@ -24,7 +24,7 @@ struct A{}; constexpr int iArr1[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9}; int iArr2[] = {10, 11, 12, 13, 14, 15, 16, 17, 18, 19}; -int main () +int main(int, char**) { static_assert( noexcept(std::span ().empty()), ""); static_assert( noexcept(std::span().empty()), ""); @@ -67,6 +67,8 @@ int main () assert(!(std::span(iArr2, 5).empty())); std::string s; - assert( ((std::span(&s, (std::ptrdiff_t) 0)).empty())); + assert( ((std::span(&s, (std::size_t) 0)).empty())); assert(!((std::span(&s, 1).empty()))); + + return 0; } diff --git a/libcxx/test/std/containers/views/span.obs/size.pass.cpp b/libcxx/test/std/containers/views/span.obs/size.pass.cpp index 0dc1dd268f8df..f26a22571153c 100644 --- a/libcxx/test/std/containers/views/span.obs/size.pass.cpp +++ b/libcxx/test/std/containers/views/span.obs/size.pass.cpp @@ -22,7 +22,7 @@ template -constexpr bool testConstexprSpan(Span sp, ptrdiff_t sz) +constexpr bool testConstexprSpan(Span sp, size_t sz) { ASSERT_NOEXCEPT(sp.size()); return sp.size() == sz; @@ -30,7 +30,7 @@ constexpr bool testConstexprSpan(Span sp, ptrdiff_t sz) template -void testRuntimeSpan(Span sp, ptrdiff_t sz) +void testRuntimeSpan(Span sp, size_t sz) { ASSERT_NOEXCEPT(sp.size()); assert(sp.size() == sz); @@ -40,7 +40,7 @@ struct A{}; constexpr int iArr1[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9}; int iArr2[] = {10, 11, 12, 13, 14, 15, 16, 17, 18, 19}; -int main () +int main(int, char**) { static_assert(testConstexprSpan(std::span(), 0), ""); static_assert(testConstexprSpan(std::span(), 0), ""); @@ -85,6 +85,8 @@ int main () testRuntimeSpan(std::span(iArr2 + 1, 5), 5); std::string s; - testRuntimeSpan(std::span(&s, (std::ptrdiff_t) 0), 0); + testRuntimeSpan(std::span(&s, (std::size_t) 0), 0); testRuntimeSpan(std::span(&s, 1), 1); + + return 0; } diff --git a/libcxx/test/std/containers/views/span.obs/size_bytes.pass.cpp b/libcxx/test/std/containers/views/span.obs/size_bytes.pass.cpp index fa26a408f30ac..447829d516eb9 100644 --- a/libcxx/test/std/containers/views/span.obs/size_bytes.pass.cpp +++ b/libcxx/test/std/containers/views/span.obs/size_bytes.pass.cpp @@ -41,7 +41,7 @@ struct A{}; constexpr int iArr1[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9}; int iArr2[] = {10, 11, 12, 13, 14, 15, 16, 17, 18, 19}; -int main () +int main(int, char**) { static_assert(testConstexprSpan(std::span(), 0), ""); static_assert(testConstexprSpan(std::span(), 0), ""); @@ -86,6 +86,8 @@ int main () testRuntimeSpan(std::span(iArr2 + 1, 5), 5); std::string s; - testRuntimeSpan(std::span(&s, (std::ptrdiff_t) 0), 0); + testRuntimeSpan(std::span(&s, (std::size_t) 0), 0); testRuntimeSpan(std::span(&s, 1), 1); + + return 0; } diff --git a/libcxx/test/std/containers/views/span.sub/first.pass.cpp b/libcxx/test/std/containers/views/span.sub/first.pass.cpp index 7d66884280ac3..f9da9fdc23387 100644 --- a/libcxx/test/std/containers/views/span.sub/first.pass.cpp +++ b/libcxx/test/std/containers/views/span.sub/first.pass.cpp @@ -68,7 +68,7 @@ constexpr int carr1[] = {1,2,3,4}; int arr[] = {5,6,7}; std::string sarr [] = { "ABC", "DEF", "GHI", "JKL", "MNO"}; -int main () +int main(int, char**) { { using Sp = std::span; @@ -132,4 +132,6 @@ int main () testRuntimeSpan(Sp{sarr}); testRuntimeSpan(Sp{sarr}); } + + return 0; } diff --git a/libcxx/test/std/containers/views/span.sub/last.pass.cpp b/libcxx/test/std/containers/views/span.sub/last.pass.cpp index 1715560477601..e0a399ff9cd3c 100644 --- a/libcxx/test/std/containers/views/span.sub/last.pass.cpp +++ b/libcxx/test/std/containers/views/span.sub/last.pass.cpp @@ -68,7 +68,7 @@ constexpr int carr1[] = {1,2,3,4}; int arr[] = {5,6,7}; std::string sarr [] = { "ABC", "DEF", "GHI", "JKL", "MNO"}; -int main () +int main(int, char**) { { using Sp = std::span; @@ -132,4 +132,6 @@ int main () testRuntimeSpan(Sp{sarr}); testRuntimeSpan(Sp{sarr}); } + + return 0; } diff --git a/libcxx/test/std/containers/views/span.sub/subspan.pass.cpp b/libcxx/test/std/containers/views/span.sub/subspan.pass.cpp index 22446adbbd6ba..9cb7310934720 100644 --- a/libcxx/test/std/containers/views/span.sub/subspan.pass.cpp +++ b/libcxx/test/std/containers/views/span.sub/subspan.pass.cpp @@ -106,7 +106,7 @@ void testRuntimeSpan(Span sp) constexpr int carr1[] = {1,2,3,4}; int arr1[] = {5,6,7}; -int main () +int main(int, char**) { { using Sp = std::span; @@ -206,4 +206,6 @@ int main () testRuntimeSpan(Sp{arr1}); testRuntimeSpan(Sp{arr1}); } + + return 0; } diff --git a/libcxx/test/std/containers/views/span.tuple/get.fail.cpp b/libcxx/test/std/containers/views/span.tuple/get.fail.cpp new file mode 100644 index 0000000000000..7544ea3cd5868 --- /dev/null +++ b/libcxx/test/std/containers/views/span.tuple/get.fail.cpp @@ -0,0 +1,29 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03, c++11, c++14, c++17 + +// + +// template +// constexpr ElementType& get(span s) noexcept; + +#include + +#include "test_macros.h" + + +int main(int, char**) +{ +// No get for dynamic spans + constexpr int arr [] = {0,1,2,3,4,5,6,7,8,9}; + (void) std::get< 0>(std::span(arr, (size_t)0)); // expected-error-re@span:* {{static_assert failed{{( due to requirement '.*')?}} "Index out of bounds in std::get<> (std::span)"}} + (void) std::get< 5>(std::span(arr, 5)); // expected-error-re@span:* {{static_assert failed{{( due to requirement '.*')?}} "Index out of bounds in std::get<> (std::span)"}} + (void) std::get<20>(std::span(arr, 10)); // expected-error-re@span:* {{static_assert failed{{( due to requirement '.*')?}} "Index out of bounds in std::get<> (std::span)"}} + + return 0; +} diff --git a/libcxx/test/std/containers/views/span.tuple/get.pass.cpp b/libcxx/test/std/containers/views/span.tuple/get.pass.cpp new file mode 100644 index 0000000000000..4c8c85ef93ab6 --- /dev/null +++ b/libcxx/test/std/containers/views/span.tuple/get.pass.cpp @@ -0,0 +1,75 @@ +// -*- C++ -*- +//===------------------------------ span ---------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===---------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03, c++11, c++14, c++17 + +// + +// template +// constexpr ElementType& get(span s) noexcept; +// + + +#include +#include +#include + +#include "test_macros.h" + + +template +constexpr bool testConstexprSpan(Span sp, typename Span::pointer ptr) +{ + ASSERT_NOEXCEPT(std::get(sp)); + return std::addressof(std::get(sp)) == ptr; +} + + +template +void testRuntimeSpan(Span sp, typename Span::pointer ptr) +{ + ASSERT_NOEXCEPT(std::get(sp)); + assert(std::addressof(std::get(sp)) == ptr); +} + +struct A{}; +constexpr int iArr1[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9}; + int iArr2[] = {10, 11, 12, 13, 14, 15, 16, 17, 18, 19}; + +int main(int, char**) +{ + +// static size + static_assert(testConstexprSpan<0>(std::span(iArr1, 1), iArr1 + 0), ""); + static_assert(testConstexprSpan<1>(std::span(iArr1, 2), iArr1 + 1), ""); + static_assert(testConstexprSpan<2>(std::span(iArr1, 3), iArr1 + 2), ""); + static_assert(testConstexprSpan<3>(std::span(iArr1, 4), iArr1 + 3), ""); + + static_assert(testConstexprSpan<0>(std::span(iArr1 + 1, 1), iArr1 + 1), ""); + static_assert(testConstexprSpan<1>(std::span(iArr1 + 2, 2), iArr1 + 3), ""); + static_assert(testConstexprSpan<2>(std::span(iArr1 + 3, 3), iArr1 + 5), ""); + static_assert(testConstexprSpan<3>(std::span(iArr1 + 4, 4), iArr1 + 7), ""); + +// static size + testRuntimeSpan<0>(std::span(iArr2, 4), iArr2); + testRuntimeSpan<1>(std::span(iArr2, 1), iArr2 + 1); + testRuntimeSpan<2>(std::span(iArr2, 2), iArr2 + 2); + testRuntimeSpan<3>(std::span(iArr2, 3), iArr2 + 3); + + testRuntimeSpan<0>(std::span(iArr2 + 1, 1), iArr2 + 1); + testRuntimeSpan<1>(std::span(iArr2 + 2, 2), iArr2 + 3); + testRuntimeSpan<2>(std::span(iArr2 + 3, 3), iArr2 + 5); + testRuntimeSpan<3>(std::span(iArr2 + 4, 4), iArr2 + 7); + + + std::string s; + testRuntimeSpan<0>(std::span(&s, 1), &s); + + + return 0; +} diff --git a/libcxx/test/std/containers/views/span.tuple/tuple_element.fail.cpp b/libcxx/test/std/containers/views/span.tuple/tuple_element.fail.cpp new file mode 100644 index 0000000000000..4ecec6bda3f36 --- /dev/null +++ b/libcxx/test/std/containers/views/span.tuple/tuple_element.fail.cpp @@ -0,0 +1,27 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03, c++11, c++14, c++17 + +// + +// tuple_element >::type + +#include + +#include "test_macros.h" + + +int main(int, char**) +{ +// No tuple_element for dynamic spans + using T1 = typename std::tuple_element< 0, std::span>::type; // expected-error-re@span:* {{static_assert failed{{( due to requirement '.*')?}} "Index out of bounds in std::tuple_element<> (std::span)"}} + using T2 = typename std::tuple_element< 5, std::span>::type; // expected-error-re@span:* {{static_assert failed{{( due to requirement '.*')?}} "Index out of bounds in std::tuple_element<> (std::span)"}} + using T3 = typename std::tuple_element<20, std::span>::type; // expected-error-re@span:* {{static_assert failed{{( due to requirement '.*')?}} "Index out of bounds in std::tuple_element<> (std::span)"}} + + return 0; +} diff --git a/libcxx/test/std/containers/views/span.tuple/tuple_element.pass.cpp b/libcxx/test/std/containers/views/span.tuple/tuple_element.pass.cpp new file mode 100644 index 0000000000000..777cb857dc83b --- /dev/null +++ b/libcxx/test/std/containers/views/span.tuple/tuple_element.pass.cpp @@ -0,0 +1,52 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03, c++11, c++14, c++17 + +// + +// tuple_element >::type + +#include + +#include "test_macros.h" + +template +void test() +{ + { + typedef std::span C; + ASSERT_SAME_TYPE(typename std::tuple_element::type, T); + } + { + typedef std::span C; + ASSERT_SAME_TYPE(typename std::tuple_element::type, T const); + } + { + typedef std::span C; + ASSERT_SAME_TYPE(typename std::tuple_element::type, T volatile); + } + { + typedef std::span C; + ASSERT_SAME_TYPE(typename std::tuple_element::type, T const volatile); + } +} + +int main(int, char**) +{ + test(); + test(); + test(); + + test(); + test(); + test(); + test(); + test(); + + return 0; +} diff --git a/libcxx/test/std/containers/views/span.tuple/tuple_size.fail.cpp b/libcxx/test/std/containers/views/span.tuple/tuple_size.fail.cpp new file mode 100644 index 0000000000000..1d3d5b39878f1 --- /dev/null +++ b/libcxx/test/std/containers/views/span.tuple/tuple_size.fail.cpp @@ -0,0 +1,21 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03, c++11, c++14, c++17 + +// + +// tuple_size >::value + +#include + +int main(int, char**) +{ + (void) std::tuple_size>::value; // expected-error-re {{implicit instantiation of undefined template 'std::__1::tuple_size>::value; // expected-error-re {{implicit instantiation of undefined template 'std::__1::tuple_size + +// tuple_size >::value + +#include + +template +void test() +{ + { + typedef std::span C; + static_assert((std::tuple_size::value == N), ""); + } + { + typedef std::span C; + static_assert((std::tuple_size::value == N), ""); + } + { + typedef std::span C; + static_assert((std::tuple_size::value == N), ""); + } + { + typedef std::span C; + static_assert((std::tuple_size::value == N), ""); + } +} + +int main(int, char**) +{ + test(); + test(); + test(); + + return 0; +} diff --git a/libcxx/test/std/containers/views/types.pass.cpp b/libcxx/test/std/containers/views/types.pass.cpp index e8ddbed161f77..60c365b8938b7 100644 --- a/libcxx/test/std/containers/views/types.pass.cpp +++ b/libcxx/test/std/containers/views/types.pass.cpp @@ -16,10 +16,12 @@ // // constants and types // using element_type = ElementType; // using value_type = remove_cv_t; -// using index_type = ptrdiff_t; +// using index_type = size_t; // using difference_type = ptrdiff_t; // using pointer = element_type *; // using reference = element_type &; +// using const_pointe = const element_type *; +// using const_reference = const element_type &; // using iterator = implementation-defined; // using const_iterator = implementation-defined; // using reverse_iterator = std::reverse_iterator; @@ -61,15 +63,17 @@ void testConstIterator() ASSERT_SAME_TYPE(typename ItT::difference_type, typename S::difference_type); } -template +template void testSpan() { ASSERT_SAME_TYPE(typename S::element_type, ElementType); ASSERT_SAME_TYPE(typename S::value_type, std::remove_cv_t); - ASSERT_SAME_TYPE(typename S::index_type, std::ptrdiff_t); + ASSERT_SAME_TYPE(typename S::index_type, std::size_t); ASSERT_SAME_TYPE(typename S::difference_type, std::ptrdiff_t); ASSERT_SAME_TYPE(typename S::pointer, ElementType *); + ASSERT_SAME_TYPE(typename S::const_pointer, const ElementType *); ASSERT_SAME_TYPE(typename S::reference, ElementType &); + ASSERT_SAME_TYPE(typename S::const_reference, const ElementType &); static_assert(S::extent == Size); // check that it exists @@ -83,10 +87,10 @@ void testSpan() template void test() { - testSpan, T, -1>(); - testSpan, const T, -1>(); - testSpan, volatile T, -1>(); - testSpan, const volatile T, -1>(); + testSpan, T, std::dynamic_extent>(); + testSpan, const T, std::dynamic_extent>(); + testSpan, volatile T, std::dynamic_extent>(); + testSpan, const volatile T, std::dynamic_extent>(); testSpan, T, 5>(); testSpan, const T, 5>(); @@ -96,11 +100,13 @@ void test() struct A{}; -int main () +int main(int, char**) { test(); test(); test(); test(); test(); + + return 0; } diff --git a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/assignment.fail.cpp b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/assignment.fail.cpp index 1b2d9043fbad0..2fa102e278374 100644 --- a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/assignment.fail.cpp +++ b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/assignment.fail.cpp @@ -37,7 +37,9 @@ test() assert(A::count == 0); } -int main() +int main(int, char**) { test(); + + return 0; } diff --git a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/assignment.pass.cpp b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/assignment.pass.cpp index a8899e103fd7b..31eb1f67db7eb 100644 --- a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/assignment.pass.cpp +++ b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/assignment.pass.cpp @@ -39,7 +39,9 @@ test() assert(A::count == 0); } -int main() +int main(int, char**) { test(); + + return 0; } diff --git a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/convert.fail.cpp b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/convert.fail.cpp index 9e7505acdd714..2a7fe6640b286 100644 --- a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/convert.fail.cpp +++ b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/convert.fail.cpp @@ -33,7 +33,9 @@ test() assert(B::count == 0); } -int main() +int main(int, char**) { test(); + + return 0; } diff --git a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/convert.pass.cpp b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/convert.pass.cpp index eccfad4cb5f8a..3d574de342a9b 100644 --- a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/convert.pass.cpp +++ b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/convert.pass.cpp @@ -35,7 +35,9 @@ test() assert(B::count == 0); } -int main() +int main(int, char**) { test(); + + return 0; } diff --git a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/convert_assignment.fail.cpp b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/convert_assignment.fail.cpp index c3abdf01062c3..23f6a19995bc1 100644 --- a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/convert_assignment.fail.cpp +++ b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/convert_assignment.fail.cpp @@ -40,7 +40,9 @@ test() assert(B::count == 0); } -int main() +int main(int, char**) { test(); + + return 0; } diff --git a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/convert_assignment.pass.cpp b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/convert_assignment.pass.cpp index 5704f8db076be..dc363c1e9a759 100644 --- a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/convert_assignment.pass.cpp +++ b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/convert_assignment.pass.cpp @@ -42,7 +42,9 @@ test() assert(B::count == 0); } -int main() +int main(int, char**) { test(); + + return 0; } diff --git a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/copy.fail.cpp b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/copy.fail.cpp index 9efb9cdb6ee4b..3684da493529e 100644 --- a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/copy.fail.cpp +++ b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/copy.fail.cpp @@ -31,7 +31,9 @@ test() assert(A::count == 0); } -int main() +int main(int, char**) { test(); + + return 0; } diff --git a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/copy.pass.cpp b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/copy.pass.cpp index 6c9c476cd19fe..0e674f21a348d 100644 --- a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/copy.pass.cpp +++ b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/copy.pass.cpp @@ -33,7 +33,9 @@ test() assert(A::count == 0); } -int main() +int main(int, char**) { test(); + + return 0; } diff --git a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/explicit.fail.cpp b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/explicit.fail.cpp index 7e75911ffa7bd..e91abaf5a1bf2 100644 --- a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/explicit.fail.cpp +++ b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/explicit.fail.cpp @@ -33,7 +33,9 @@ test() } } -int main() +int main(int, char**) { test(); + + return 0; } diff --git a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/pointer.pass.cpp b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/pointer.pass.cpp index 400126e4ab42c..7423c3b73f3c5 100644 --- a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/pointer.pass.cpp +++ b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/pointer.pass.cpp @@ -35,7 +35,9 @@ test() } } -int main() +int main(int, char**) { test(); + + return 0; } diff --git a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/assign_from_auto_ptr_ref.pass.cpp b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/assign_from_auto_ptr_ref.pass.cpp index 0b5b9c5da0b21..0486e02fb83cb 100644 --- a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/assign_from_auto_ptr_ref.pass.cpp +++ b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/assign_from_auto_ptr_ref.pass.cpp @@ -35,7 +35,9 @@ test() assert(A::count == 0); } -int main() +int main(int, char**) { test(); + + return 0; } diff --git a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/convert_from_auto_ptr_ref.pass.cpp b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/convert_from_auto_ptr_ref.pass.cpp index 2e08decfa7d90..7dd37f76026e5 100644 --- a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/convert_from_auto_ptr_ref.pass.cpp +++ b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/convert_from_auto_ptr_ref.pass.cpp @@ -34,7 +34,9 @@ test() assert(B::count == 0); } -int main() +int main(int, char**) { test(); + + return 0; } diff --git a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/convert_to_auto_ptr.pass.cpp b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/convert_to_auto_ptr.pass.cpp index 554ce3165b850..809f6b37e179c 100644 --- a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/convert_to_auto_ptr.pass.cpp +++ b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/convert_to_auto_ptr.pass.cpp @@ -31,7 +31,9 @@ test() std::auto_ptr ap2(source()); } -int main() +int main(int, char**) { test(); + + return 0; } diff --git a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/convert_to_auto_ptr_ref.pass.cpp b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/convert_to_auto_ptr_ref.pass.cpp index bcb7d61c98581..a75f134923635 100644 --- a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/convert_to_auto_ptr_ref.pass.cpp +++ b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/convert_to_auto_ptr_ref.pass.cpp @@ -32,7 +32,9 @@ test() delete p1; } -int main() +int main(int, char**) { test(); + + return 0; } diff --git a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/arrow.pass.cpp b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/arrow.pass.cpp index c10beec7967d2..7878f50f7a9d7 100644 --- a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/arrow.pass.cpp +++ b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/arrow.pass.cpp @@ -32,7 +32,9 @@ test() assert(A::count == 0); } -int main() +int main(int, char**) { test(); + + return 0; } diff --git a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/deref.pass.cpp b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/deref.pass.cpp index 271b4ffb496a2..1e41c8a9daba0 100644 --- a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/deref.pass.cpp +++ b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/deref.pass.cpp @@ -32,7 +32,9 @@ test() assert(A::count == 0); } -int main() +int main(int, char**) { test(); + + return 0; } diff --git a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/release.pass.cpp b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/release.pass.cpp index 2cd0faf2736cb..61b6bbcc6925c 100644 --- a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/release.pass.cpp +++ b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/release.pass.cpp @@ -33,7 +33,9 @@ test() assert(A::count == 0); } -int main() +int main(int, char**) { test(); + + return 0; } diff --git a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/reset.pass.cpp b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/reset.pass.cpp index c74cabf79f30f..d2ebd5668e91b 100644 --- a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/reset.pass.cpp +++ b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/reset.pass.cpp @@ -49,7 +49,9 @@ test() assert(A::count == 0); } -int main() +int main(int, char**) { test(); + + return 0; } diff --git a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/element_type.pass.cpp b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/element_type.pass.cpp index 36e59dd0fa58a..a4dac761526de 100644 --- a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/element_type.pass.cpp +++ b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/element_type.pass.cpp @@ -30,9 +30,11 @@ test() ((void)p); } -int main() +int main(int, char**) { test(); test(); test(); + + return 0; } diff --git a/libcxx/test/std/depr/depr.auto.ptr/nothing_to_do.pass.cpp b/libcxx/test/std/depr/depr.auto.ptr/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/depr/depr.auto.ptr/nothing_to_do.pass.cpp +++ b/libcxx/test/std/depr/depr.auto.ptr/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/depr/depr.c.headers/assert_h.pass.cpp b/libcxx/test/std/depr/depr.c.headers/assert_h.pass.cpp index aee59570a8c04..d680f33efccb9 100644 --- a/libcxx/test/std/depr/depr.c.headers/assert_h.pass.cpp +++ b/libcxx/test/std/depr/depr.c.headers/assert_h.pass.cpp @@ -14,6 +14,8 @@ #error assert not defined #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/depr/depr.c.headers/ciso646.pass.cpp b/libcxx/test/std/depr/depr.c.headers/ciso646.pass.cpp index 2f962bc8b6e8e..3eb4064e69e1f 100644 --- a/libcxx/test/std/depr/depr.c.headers/ciso646.pass.cpp +++ b/libcxx/test/std/depr/depr.c.headers/ciso646.pass.cpp @@ -10,6 +10,8 @@ #include -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/depr/depr.c.headers/complex.h.pass.cpp b/libcxx/test/std/depr/depr.c.headers/complex.h.pass.cpp index 6502bb6696519..d92ddb67b0e8d 100644 --- a/libcxx/test/std/depr/depr.c.headers/complex.h.pass.cpp +++ b/libcxx/test/std/depr/depr.c.headers/complex.h.pass.cpp @@ -10,8 +10,10 @@ #include -int main() +int main(int, char**) { std::complex d; (void)d; + + return 0; } diff --git a/libcxx/test/std/depr/depr.c.headers/ctype_h.pass.cpp b/libcxx/test/std/depr/depr.c.headers/ctype_h.pass.cpp index 7c7c83a836710..61b539d409395 100644 --- a/libcxx/test/std/depr/depr.c.headers/ctype_h.pass.cpp +++ b/libcxx/test/std/depr/depr.c.headers/ctype_h.pass.cpp @@ -68,7 +68,7 @@ #error toupper defined #endif -int main() +int main(int, char**) { static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); @@ -99,4 +99,6 @@ int main() assert(isxdigit('a')); assert(tolower('A') == 'a'); assert(toupper('a') == 'A'); + + return 0; } diff --git a/libcxx/test/std/depr/depr.c.headers/errno_h.pass.cpp b/libcxx/test/std/depr/depr.c.headers/errno_h.pass.cpp index 51ad3fe7c9f00..985cdc7f5c4d2 100644 --- a/libcxx/test/std/depr/depr.c.headers/errno_h.pass.cpp +++ b/libcxx/test/std/depr/depr.c.headers/errno_h.pass.cpp @@ -27,6 +27,8 @@ #error errno not defined #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/depr/depr.c.headers/fenv_h.pass.cpp b/libcxx/test/std/depr/depr.c.headers/fenv_h.pass.cpp index b6c2549b5cbd4..6b38f4e6c5d77 100644 --- a/libcxx/test/std/depr/depr.c.headers/fenv_h.pass.cpp +++ b/libcxx/test/std/depr/depr.c.headers/fenv_h.pass.cpp @@ -57,19 +57,21 @@ #error FE_DFL_ENV not defined #endif -int main() +int main(int, char**) { fenv_t fenv = {}; fexcept_t fex = 0; - static_assert((std::is_same::value), ""); - static_assert((std::is_same::value), ""); - static_assert((std::is_same::value), ""); - static_assert((std::is_same::value), ""); - static_assert((std::is_same::value), ""); - static_assert((std::is_same::value), ""); - static_assert((std::is_same::value), ""); - static_assert((std::is_same::value), ""); - static_assert((std::is_same::value), ""); - static_assert((std::is_same::value), ""); - static_assert((std::is_same::value), ""); + static_assert((std::is_same::value), ""); + static_assert((std::is_same::value), ""); + static_assert((std::is_same::value), ""); + static_assert((std::is_same::value), ""); + static_assert((std::is_same::value), ""); + static_assert((std::is_same::value), ""); + static_assert((std::is_same::value), ""); + static_assert((std::is_same::value), ""); + static_assert((std::is_same::value), ""); + static_assert((std::is_same::value), ""); + static_assert((std::is_same::value), ""); + + return 0; } diff --git a/libcxx/test/std/depr/depr.c.headers/float_h.pass.cpp b/libcxx/test/std/depr/depr.c.headers/float_h.pass.cpp index 3e73b385de7a3..779fbc66f5d02 100644 --- a/libcxx/test/std/depr/depr.c.headers/float_h.pass.cpp +++ b/libcxx/test/std/depr/depr.c.headers/float_h.pass.cpp @@ -178,6 +178,8 @@ #endif #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/depr/depr.c.headers/inttypes_h.pass.cpp b/libcxx/test/std/depr/depr.c.headers/inttypes_h.pass.cpp index 6db3a42f1842a..a088733119e94 100644 --- a/libcxx/test/std/depr/depr.c.headers/inttypes_h.pass.cpp +++ b/libcxx/test/std/depr/depr.c.headers/inttypes_h.pass.cpp @@ -877,7 +877,7 @@ template void test() ((void)t); // Prevent unused warning } -int main() +int main(int, char**) { test(); test(); @@ -927,4 +927,6 @@ int main() static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); + + return 0; } diff --git a/libcxx/test/std/depr/depr.c.headers/iso646_h.pass.cpp b/libcxx/test/std/depr/depr.c.headers/iso646_h.pass.cpp index dee560858a0e9..77ca126278d91 100644 --- a/libcxx/test/std/depr/depr.c.headers/iso646_h.pass.cpp +++ b/libcxx/test/std/depr/depr.c.headers/iso646_h.pass.cpp @@ -10,7 +10,9 @@ #include -int main() +int main(int, char**) { // Nothing to test + + return 0; } diff --git a/libcxx/test/std/depr/depr.c.headers/limits_h.pass.cpp b/libcxx/test/std/depr/depr.c.headers/limits_h.pass.cpp index a8ad39215bee0..5dba10edfb7e1 100644 --- a/libcxx/test/std/depr/depr.c.headers/limits_h.pass.cpp +++ b/libcxx/test/std/depr/depr.c.headers/limits_h.pass.cpp @@ -86,6 +86,8 @@ #error ULLONG_MAX not defined #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/depr/depr.c.headers/locale_h.pass.cpp b/libcxx/test/std/depr/depr.c.headers/locale_h.pass.cpp index 9774dd6e83d01..fd2419bb70757 100644 --- a/libcxx/test/std/depr/depr.c.headers/locale_h.pass.cpp +++ b/libcxx/test/std/depr/depr.c.headers/locale_h.pass.cpp @@ -39,9 +39,11 @@ #error NULL not defined #endif -int main() +int main(int, char**) { lconv lc; ((void)lc); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); + + return 0; } diff --git a/libcxx/test/std/depr/depr.c.headers/math_h.pass.cpp b/libcxx/test/std/depr/depr.c.headers/math_h.pass.cpp index 5625971062550..b0b6c0cb3249f 100644 --- a/libcxx/test/std/depr/depr.c.headers/math_h.pass.cpp +++ b/libcxx/test/std/depr/depr.c.headers/math_h.pass.cpp @@ -1463,7 +1463,7 @@ void test_trunc() assert(trunc(1) == 1); } -int main() +int main(int, char**) { test_abs(); test_acos(); @@ -1535,4 +1535,6 @@ int main() test_scalbn(); test_tgamma(); test_trunc(); + + return 0; } diff --git a/libcxx/test/std/depr/depr.c.headers/setjmp_h.pass.cpp b/libcxx/test/std/depr/depr.c.headers/setjmp_h.pass.cpp index 3c8584b1b2f24..1878f4f847078 100644 --- a/libcxx/test/std/depr/depr.c.headers/setjmp_h.pass.cpp +++ b/libcxx/test/std/depr/depr.c.headers/setjmp_h.pass.cpp @@ -15,10 +15,12 @@ #error setjmp not defined #endif -int main() +int main(int, char**) { jmp_buf jb; ((void)jb); // Prevent unused warning static_assert((std::is_same::value), "std::is_same::value"); + + return 0; } diff --git a/libcxx/test/std/depr/depr.c.headers/signal_h.pass.cpp b/libcxx/test/std/depr/depr.c.headers/signal_h.pass.cpp index e2fc456e44ca4..463d670ba1eba 100644 --- a/libcxx/test/std/depr/depr.c.headers/signal_h.pass.cpp +++ b/libcxx/test/std/depr/depr.c.headers/signal_h.pass.cpp @@ -47,10 +47,12 @@ #error SIGTERM not defined #endif -int main() +int main(int, char**) { sig_atomic_t sig; ((void)sig); typedef void (*func)(int); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); + + return 0; } diff --git a/libcxx/test/std/depr/depr.c.headers/stdarg_h.pass.cpp b/libcxx/test/std/depr/depr.c.headers/stdarg_h.pass.cpp index a336fe59f4ba5..feb9c4a460f38 100644 --- a/libcxx/test/std/depr/depr.c.headers/stdarg_h.pass.cpp +++ b/libcxx/test/std/depr/depr.c.headers/stdarg_h.pass.cpp @@ -30,8 +30,10 @@ #error va_start not defined #endif -int main() +int main(int, char**) { va_list va; ((void)va); + + return 0; } diff --git a/libcxx/test/std/depr/depr.c.headers/stdbool_h.pass.cpp b/libcxx/test/std/depr/depr.c.headers/stdbool_h.pass.cpp index 38dfc6d8496e5..132ad9c5cd964 100644 --- a/libcxx/test/std/depr/depr.c.headers/stdbool_h.pass.cpp +++ b/libcxx/test/std/depr/depr.c.headers/stdbool_h.pass.cpp @@ -26,6 +26,8 @@ #error false should not be defined #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/depr/depr.c.headers/stddef_h.pass.cpp b/libcxx/test/std/depr/depr.c.headers/stddef_h.pass.cpp index 8c420de52e36a..c54c976ee0946 100644 --- a/libcxx/test/std/depr/depr.c.headers/stddef_h.pass.cpp +++ b/libcxx/test/std/depr/depr.c.headers/stddef_h.pass.cpp @@ -22,7 +22,7 @@ #error offsetof not defined #endif -int main() +int main(int, char**) { void *p = NULL; assert(!p); @@ -65,4 +65,6 @@ int main() std::alignment_of::value, "std::alignment_of::value >= " "std::alignment_of::value"); + + return 0; } diff --git a/libcxx/test/std/depr/depr.c.headers/stdint_h.pass.cpp b/libcxx/test/std/depr/depr.c.headers/stdint_h.pass.cpp index e031e21036d5c..68efe7992af93 100644 --- a/libcxx/test/std/depr/depr.c.headers/stdint_h.pass.cpp +++ b/libcxx/test/std/depr/depr.c.headers/stdint_h.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { // typedef int8_t static_assert(sizeof(int8_t)*CHAR_BIT == 8, @@ -287,4 +287,6 @@ int main() #ifndef UINTMAX_C #error UINTMAX_C not defined #endif + + return 0; } diff --git a/libcxx/test/std/depr/depr.c.headers/stdio_h.pass.cpp b/libcxx/test/std/depr/depr.c.headers/stdio_h.pass.cpp index b60279696c08e..97ea0d41519b6 100644 --- a/libcxx/test/std/depr/depr.c.headers/stdio_h.pass.cpp +++ b/libcxx/test/std/depr/depr.c.headers/stdio_h.pass.cpp @@ -103,7 +103,7 @@ #pragma GCC diagnostic ignored "-Wdeprecated-declarations" // for tmpnam #endif -int main() +int main(int, char**) { FILE* fp = 0; fpos_t fpos = fpos_t(); @@ -165,4 +165,6 @@ int main() static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); + + return 0; } diff --git a/libcxx/test/std/depr/depr.c.headers/stdlib_h.pass.cpp b/libcxx/test/std/depr/depr.c.headers/stdlib_h.pass.cpp index c035cf046a722..4c0218d6ef6aa 100644 --- a/libcxx/test/std/depr/depr.c.headers/stdlib_h.pass.cpp +++ b/libcxx/test/std/depr/depr.c.headers/stdlib_h.pass.cpp @@ -63,7 +63,7 @@ #error RAND_MAX not defined #endif -int main() +int main(int, char**) { size_t s = 0; ((void)s); div_t d; ((void)d); @@ -116,4 +116,6 @@ int main() static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); + + return 0; } diff --git a/libcxx/test/std/depr/depr.c.headers/string_h.pass.cpp b/libcxx/test/std/depr/depr.c.headers/string_h.pass.cpp index 62c552b9bec23..8ed1513b35659 100644 --- a/libcxx/test/std/depr/depr.c.headers/string_h.pass.cpp +++ b/libcxx/test/std/depr/depr.c.headers/string_h.pass.cpp @@ -15,7 +15,7 @@ #error NULL not defined #endif -int main() +int main(int, char**) { size_t s = 0; void* vp = 0; @@ -57,4 +57,6 @@ int main() static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); #endif + + return 0; } diff --git a/libcxx/test/std/depr/depr.c.headers/tgmath_h.pass.cpp b/libcxx/test/std/depr/depr.c.headers/tgmath_h.pass.cpp index e9c480605086b..28cf93ada0aba 100644 --- a/libcxx/test/std/depr/depr.c.headers/tgmath_h.pass.cpp +++ b/libcxx/test/std/depr/depr.c.headers/tgmath_h.pass.cpp @@ -10,10 +10,12 @@ #include -int main() +int main(int, char**) { std::complex cd; (void)cd; double x = sin(1.0); (void)x; // to placate scan-build + + return 0; } diff --git a/libcxx/test/std/depr/depr.c.headers/time_h.pass.cpp b/libcxx/test/std/depr/depr.c.headers/time_h.pass.cpp index eb9565128eba8..5c2cc57bc6907 100644 --- a/libcxx/test/std/depr/depr.c.headers/time_h.pass.cpp +++ b/libcxx/test/std/depr/depr.c.headers/time_h.pass.cpp @@ -19,7 +19,7 @@ #error CLOCKS_PER_SEC not defined #endif -int main() +int main(int, char**) { clock_t c = 0; ((void)c); size_t s = 0; @@ -36,4 +36,6 @@ int main() char* c1 = 0; const char* c2 = 0; static_assert((std::is_same::value), ""); + + return 0; } diff --git a/libcxx/test/std/depr/depr.c.headers/uchar_h.pass.cpp b/libcxx/test/std/depr/depr.c.headers/uchar_h.pass.cpp index bff39d2c8554f..cddf7a284a3ac 100644 --- a/libcxx/test/std/depr/depr.c.headers/uchar_h.pass.cpp +++ b/libcxx/test/std/depr/depr.c.headers/uchar_h.pass.cpp @@ -15,6 +15,8 @@ #include -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/depr/depr.c.headers/wchar_h.pass.cpp b/libcxx/test/std/depr/depr.c.headers/wchar_h.pass.cpp index 6072159952c47..b964ea76f9424 100644 --- a/libcxx/test/std/depr/depr.c.headers/wchar_h.pass.cpp +++ b/libcxx/test/std/depr/depr.c.headers/wchar_h.pass.cpp @@ -28,7 +28,7 @@ #error WEOF not defined #endif -int main() +int main(int, char**) { // mbstate_t comes from the underlying C library; it is defined (in C99) as: // a complete object type other than an array type that can hold the conversion @@ -126,4 +126,6 @@ int main() static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); #endif + + return 0; } diff --git a/libcxx/test/std/depr/depr.c.headers/wctype_h.pass.cpp b/libcxx/test/std/depr/depr.c.headers/wctype_h.pass.cpp index f4dc1bf4f7a8d..1774a7f0897e6 100644 --- a/libcxx/test/std/depr/depr.c.headers/wctype_h.pass.cpp +++ b/libcxx/test/std/depr/depr.c.headers/wctype_h.pass.cpp @@ -87,7 +87,7 @@ #error wctrans defined #endif -int main() +int main(int, char**) { wint_t w = 0; wctrans_t wctr = 0; @@ -110,4 +110,6 @@ int main() static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); + + return 0; } diff --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/pointer_to_binary_function.cxx1z.fail.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/pointer_to_binary_function.cxx1z.fail.cpp index 062bbaee8da01..feb345b9ae57b 100644 --- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/pointer_to_binary_function.cxx1z.fail.cpp +++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/pointer_to_binary_function.cxx1z.fail.cpp @@ -18,7 +18,9 @@ double binary_f(int i, short j) {return i - j + .75;} -int main() +int main(int, char**) { typedef std::pointer_to_binary_function F; + + return 0; } diff --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/pointer_to_binary_function.pass.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/pointer_to_binary_function.pass.cpp index 8d099e52ca7bb..53df5f34832cb 100644 --- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/pointer_to_binary_function.pass.cpp +++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/pointer_to_binary_function.pass.cpp @@ -17,10 +17,12 @@ double binary_f(int i, short j) {return i - j + .75;} -int main() +int main(int, char**) { typedef std::pointer_to_binary_function F; static_assert((std::is_base_of, F>::value), ""); const F f(binary_f); assert(f(36, 27) == 9.75); + + return 0; } diff --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/pointer_to_unary_function.cxx1z.fail.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/pointer_to_unary_function.cxx1z.fail.cpp index cc3bb6dcf0e31..9d2d891bb2c5e 100644 --- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/pointer_to_unary_function.cxx1z.fail.cpp +++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/pointer_to_unary_function.cxx1z.fail.cpp @@ -18,7 +18,9 @@ double unary_f(int i) {return 0.5 - i;} -int main() +int main(int, char**) { typedef std::pointer_to_unary_function F; + + return 0; } diff --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/pointer_to_unary_function.pass.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/pointer_to_unary_function.pass.cpp index e039fb4c60abc..776fd309b564d 100644 --- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/pointer_to_unary_function.pass.cpp +++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/pointer_to_unary_function.pass.cpp @@ -17,10 +17,12 @@ double unary_f(int i) {return 0.5 - i;} -int main() +int main(int, char**) { typedef std::pointer_to_unary_function F; static_assert((std::is_base_of, F>::value), ""); const F f(unary_f); assert(f(36) == -35.5); + + return 0; } diff --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/ptr_fun1.cxx1z.fail.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/ptr_fun1.cxx1z.fail.cpp index 3efe3db563801..e0e7889e91f28 100644 --- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/ptr_fun1.cxx1z.fail.cpp +++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/ptr_fun1.cxx1z.fail.cpp @@ -21,7 +21,9 @@ double unary_f(int i) {return 0.5 - i;} -int main() +int main(int, char**) { assert(std::ptr_fun(unary_f)(36) == -35.5); + + return 0; } diff --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/ptr_fun1.pass.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/ptr_fun1.pass.cpp index 323a559815cba..b356be2e90c8e 100644 --- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/ptr_fun1.pass.cpp +++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/ptr_fun1.pass.cpp @@ -19,7 +19,9 @@ double unary_f(int i) {return 0.5 - i;} -int main() +int main(int, char**) { assert(std::ptr_fun(unary_f)(36) == -35.5); + + return 0; } diff --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/ptr_fun2.cxx1z.fail.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/ptr_fun2.cxx1z.fail.cpp index d1ad2636264b4..d975072966e57 100644 --- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/ptr_fun2.cxx1z.fail.cpp +++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/ptr_fun2.cxx1z.fail.cpp @@ -21,7 +21,9 @@ double binary_f(int i, short j) {return i - j + .75;} -int main() +int main(int, char**) { assert(std::ptr_fun(binary_f)(36, 27) == 9.75); + + return 0; } diff --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/ptr_fun2.pass.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/ptr_fun2.pass.cpp index 1bffccff58f6e..885f7db67a42f 100644 --- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/ptr_fun2.pass.cpp +++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/ptr_fun2.pass.cpp @@ -19,7 +19,9 @@ double binary_f(int i, short j) {return i - j + .75;} -int main() +int main(int, char**) { assert(std::ptr_fun(binary_f)(36, 27) == 9.75); + + return 0; } diff --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun.cxx1z.fail.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun.cxx1z.fail.cpp index 86cc02ec3dd65..e346f07ccb8d7 100644 --- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun.cxx1z.fail.cpp +++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun.cxx1z.fail.cpp @@ -27,8 +27,10 @@ struct A double a4(unsigned i) const {return i-1;} }; -int main() +int main(int, char**) { const A a = A(); assert(std::mem_fun(&A::a3)(&a) == 1); + + return 0; } diff --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun.pass.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun.pass.cpp index f4a73e7536295..d7052ee5a3337 100644 --- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun.pass.cpp +++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun.pass.cpp @@ -24,8 +24,10 @@ struct A double a4(unsigned i) const {return i-1;} }; -int main() +int main(int, char**) { const A a = A(); assert(std::mem_fun(&A::a3)(&a) == 1); + + return 0; } diff --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1.cxx1z.fail.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1.cxx1z.fail.cpp index 4f1e0aa70c685..e489a558ebd22 100644 --- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1.cxx1z.fail.cpp +++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1.cxx1z.fail.cpp @@ -27,8 +27,10 @@ struct A double a4(unsigned i) const {return i-1;} }; -int main() +int main(int, char**) { const A a = A(); assert(std::mem_fun(&A::a4)(&a, 6) == 5); + + return 0; } diff --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1.pass.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1.pass.cpp index 6f89ec1802b36..f3c35f257f57e 100644 --- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1.pass.cpp +++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1.pass.cpp @@ -24,8 +24,10 @@ struct A double a4(unsigned i) const {return i-1;} }; -int main() +int main(int, char**) { const A a = A(); assert(std::mem_fun(&A::a4)(&a, 6) == 5); + + return 0; } diff --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1_ref_t.cxx1z.fail.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1_ref_t.cxx1z.fail.cpp index 903e13c9755b6..14368e6e9e632 100644 --- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1_ref_t.cxx1z.fail.cpp +++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1_ref_t.cxx1z.fail.cpp @@ -26,7 +26,9 @@ struct A double a4(unsigned i) const {return i-1;} }; -int main() +int main(int, char**) { typedef std::const_mem_fun1_ref_t F; + + return 0; } diff --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1_ref_t.pass.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1_ref_t.pass.cpp index 6e6c60d60fb7f..50782e09aa4a8 100644 --- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1_ref_t.pass.cpp +++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1_ref_t.pass.cpp @@ -23,11 +23,13 @@ struct A double a4(unsigned i) const {return i-1;} }; -int main() +int main(int, char**) { typedef std::const_mem_fun1_ref_t F; static_assert((std::is_base_of, F>::value), ""); const F f(&A::a4); const A a = A(); assert(f(a, 6) == 5); + + return 0; } diff --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1_t.cxx1z.fail.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1_t.cxx1z.fail.cpp index 242c977a2beb2..afa0b781ffc43 100644 --- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1_t.cxx1z.fail.cpp +++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1_t.cxx1z.fail.cpp @@ -26,7 +26,9 @@ struct A double a4(unsigned i) const {return i-1;} }; -int main() +int main(int, char**) { typedef std::const_mem_fun1_t F; + + return 0; } diff --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1_t.pass.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1_t.pass.cpp index f4a78729e65bf..cf0218e8f9fa1 100644 --- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1_t.pass.cpp +++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1_t.pass.cpp @@ -23,11 +23,13 @@ struct A double a4(unsigned i) const {return i-1;} }; -int main() +int main(int, char**) { typedef std::const_mem_fun1_t F; static_assert((std::is_base_of, F>::value), ""); const F f(&A::a4); const A a = A(); assert(f(&a, 6) == 5); + + return 0; } diff --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref.cxx1z.fail.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref.cxx1z.fail.cpp index 93322099da057..1217cfe597bd4 100644 --- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref.cxx1z.fail.cpp +++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref.cxx1z.fail.cpp @@ -27,8 +27,10 @@ struct A double a4(unsigned i) const {return i-1;} }; -int main() +int main(int, char**) { const A a = A(); assert(std::mem_fun_ref(&A::a3)(a) == 1); + + return 0; } diff --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref.pass.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref.pass.cpp index 5f05821c86454..7765319908cee 100644 --- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref.pass.cpp +++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref.pass.cpp @@ -24,8 +24,10 @@ struct A double a4(unsigned i) const {return i-1;} }; -int main() +int main(int, char**) { const A a = A(); assert(std::mem_fun_ref(&A::a3)(a) == 1); + + return 0; } diff --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref1.cxx1z.fail.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref1.cxx1z.fail.cpp index 44eee11be20b8..58251d1309222 100644 --- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref1.cxx1z.fail.cpp +++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref1.cxx1z.fail.cpp @@ -27,8 +27,10 @@ struct A double a4(unsigned i) const {return i-1;} }; -int main() +int main(int, char**) { const A a = A(); assert(std::mem_fun_ref(&A::a4)(a, 6) == 5); + + return 0; } diff --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref1.pass.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref1.pass.cpp index 55586a91fc369..4015675f8f484 100644 --- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref1.pass.cpp +++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref1.pass.cpp @@ -24,8 +24,10 @@ struct A double a4(unsigned i) const {return i-1;} }; -int main() +int main(int, char**) { const A a = A(); assert(std::mem_fun_ref(&A::a4)(a, 6) == 5); + + return 0; } diff --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref_t.cxx1z.fail.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref_t.cxx1z.fail.cpp index eac5820624b26..577cfe5376084 100644 --- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref_t.cxx1z.fail.cpp +++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref_t.cxx1z.fail.cpp @@ -26,7 +26,9 @@ struct A double a4(unsigned i) const {return i-1;} }; -int main() +int main(int, char**) { typedef std::const_mem_fun_ref_t F; + + return 0; } diff --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref_t.pass.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref_t.pass.cpp index 3654ec2f196b8..61382dc40f85f 100644 --- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref_t.pass.cpp +++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref_t.pass.cpp @@ -23,11 +23,13 @@ struct A double a4(unsigned i) const {return i-1;} }; -int main() +int main(int, char**) { typedef std::const_mem_fun_ref_t F; static_assert((std::is_base_of, F>::value), ""); const F f(&A::a3); const A a = A(); assert(f(a) == 1); + + return 0; } diff --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_t.cxx1z.fail.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_t.cxx1z.fail.cpp index 824cdf9adb748..ee24e4116a1e3 100644 --- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_t.cxx1z.fail.cpp +++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_t.cxx1z.fail.cpp @@ -26,7 +26,9 @@ struct A double a4(unsigned i) const {return i-1;} }; -int main() +int main(int, char**) { typedef std::const_mem_fun_t F; + + return 0; } diff --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_t.pass.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_t.pass.cpp index 2814dccf8444a..ca1065abfe890 100644 --- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_t.pass.cpp +++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_t.pass.cpp @@ -23,11 +23,13 @@ struct A double a4(unsigned i) const {return i-1;} }; -int main() +int main(int, char**) { typedef std::const_mem_fun_t F; static_assert((std::is_base_of, F>::value), ""); const F f(&A::a3); const A a = A(); assert(f(&a) == 1); + + return 0; } diff --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun.cxx1z.fail.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun.cxx1z.fail.cpp index d54896c55a32c..a000ac5ee2fd6 100644 --- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun.cxx1z.fail.cpp +++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun.cxx1z.fail.cpp @@ -27,8 +27,10 @@ struct A double a4(unsigned i) const {return i-1;} }; -int main() +int main(int, char**) { A a; assert(std::mem_fun(&A::a1)(&a) == 5); + + return 0; } diff --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun.pass.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun.pass.cpp index e1bbb65d68bd5..6b707c4ad19ca 100644 --- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun.pass.cpp +++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun.pass.cpp @@ -24,8 +24,10 @@ struct A double a4(unsigned i) const {return i-1;} }; -int main() +int main(int, char**) { A a; assert(std::mem_fun(&A::a1)(&a) == 5); + + return 0; } diff --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1.cxx1z.fail.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1.cxx1z.fail.cpp index c4f9dcb4ebc3d..626c9102e5c56 100644 --- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1.cxx1z.fail.cpp +++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1.cxx1z.fail.cpp @@ -27,8 +27,10 @@ struct A double a4(unsigned i) const {return i-1;} }; -int main() +int main(int, char**) { A a; assert(std::mem_fun(&A::a2)(&a, 5) == 6); + + return 0; } diff --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1.pass.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1.pass.cpp index d5261e211a4a4..5abf157a6ce9f 100644 --- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1.pass.cpp +++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1.pass.cpp @@ -24,8 +24,10 @@ struct A double a4(unsigned i) const {return i-1;} }; -int main() +int main(int, char**) { A a; assert(std::mem_fun(&A::a2)(&a, 5) == 6); + + return 0; } diff --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1_ref_t.cxx1z.fail.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1_ref_t.cxx1z.fail.cpp index 653ea21479bd5..4ac39e764211e 100644 --- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1_ref_t.cxx1z.fail.cpp +++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1_ref_t.cxx1z.fail.cpp @@ -26,7 +26,9 @@ struct A double a4(unsigned i) const {return i-1;} }; -int main() +int main(int, char**) { typedef std::mem_fun1_ref_t F; + + return 0; } diff --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1_ref_t.pass.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1_ref_t.pass.cpp index 416c20856c307..ec21c42c9b6b1 100644 --- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1_ref_t.pass.cpp +++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1_ref_t.pass.cpp @@ -23,11 +23,13 @@ struct A double a4(unsigned i) const {return i-1;} }; -int main() +int main(int, char**) { typedef std::mem_fun1_ref_t F; static_assert((std::is_base_of, F>::value), ""); const F f(&A::a2); A a; assert(f(a, 5) == 6); + + return 0; } diff --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1_t.cxx1z.fail.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1_t.cxx1z.fail.cpp index 3d77237a203ff..6471f8e915317 100644 --- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1_t.cxx1z.fail.cpp +++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1_t.cxx1z.fail.cpp @@ -26,7 +26,9 @@ struct A double a4(unsigned i) const {return i-1;} }; -int main() +int main(int, char**) { typedef std::mem_fun1_t F; + + return 0; } diff --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1_t.pass.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1_t.pass.cpp index 8403d471d68ce..d696bae067e7d 100644 --- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1_t.pass.cpp +++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1_t.pass.cpp @@ -23,11 +23,13 @@ struct A double a4(unsigned i) const {return i-1;} }; -int main() +int main(int, char**) { typedef std::mem_fun1_t F; static_assert((std::is_base_of, F>::value), ""); const F f(&A::a2); A a; assert(f(&a, 5) == 6); + + return 0; } diff --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref.cxx1z.fail.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref.cxx1z.fail.cpp index 4eaa53eeee9a2..e6227509fb05e 100644 --- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref.cxx1z.fail.cpp +++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref.cxx1z.fail.cpp @@ -27,8 +27,10 @@ struct A double a4(unsigned i) const {return i-1;} }; -int main() +int main(int, char**) { A a; assert(std::mem_fun_ref(&A::a1)(a) == 5); + + return 0; } diff --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref.pass.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref.pass.cpp index 6ceff9257c04b..e22a7f03d03a6 100644 --- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref.pass.cpp +++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref.pass.cpp @@ -24,8 +24,10 @@ struct A double a4(unsigned i) const {return i-1;} }; -int main() +int main(int, char**) { A a; assert(std::mem_fun_ref(&A::a1)(a) == 5); + + return 0; } diff --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref1.cxx1z.fail.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref1.cxx1z.fail.cpp index 2a73da49eabf8..c633e769dd65c 100644 --- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref1.cxx1z.fail.cpp +++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref1.cxx1z.fail.cpp @@ -27,8 +27,10 @@ struct A double a4(unsigned i) const {return i-1;} }; -int main() +int main(int, char**) { A a; assert(std::mem_fun_ref(&A::a2)(a, 5) == 6); + + return 0; } diff --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref1.pass.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref1.pass.cpp index 19c4dca9e7a42..1ff7a9af929e6 100644 --- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref1.pass.cpp +++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref1.pass.cpp @@ -24,8 +24,10 @@ struct A double a4(unsigned i) const {return i-1;} }; -int main() +int main(int, char**) { A a; assert(std::mem_fun_ref(&A::a2)(a, 5) == 6); + + return 0; } diff --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref_t.cxx1z.fail.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref_t.cxx1z.fail.cpp index 0717a41b98011..02c3213be1549 100644 --- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref_t.cxx1z.fail.cpp +++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref_t.cxx1z.fail.cpp @@ -26,7 +26,9 @@ struct A double a4(unsigned i) const {return i-1;} }; -int main() +int main(int, char**) { typedef std::mem_fun_ref_t F; + + return 0; } diff --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref_t.pass.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref_t.pass.cpp index 0fac15b3d5c13..037454ed21980 100644 --- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref_t.pass.cpp +++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref_t.pass.cpp @@ -23,11 +23,13 @@ struct A double a4(unsigned i) const {return i-1;} }; -int main() +int main(int, char**) { typedef std::mem_fun_ref_t F; static_assert((std::is_base_of, F>::value), ""); const F f(&A::a1); A a; assert(f(a) == 5); + + return 0; } diff --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_t.cxx1z.fail.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_t.cxx1z.fail.cpp index 25c3ce85f33ca..ec379d7241b30 100644 --- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_t.cxx1z.fail.cpp +++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_t.cxx1z.fail.cpp @@ -26,7 +26,9 @@ struct A double a4(unsigned i) const {return i-1;} }; -int main() +int main(int, char**) { typedef std::mem_fun_t F; + + return 0; } diff --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_t.pass.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_t.pass.cpp index 36205d11b23dc..e14ea14d12af5 100644 --- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_t.pass.cpp +++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_t.pass.cpp @@ -23,11 +23,13 @@ struct A double a4(unsigned i) const {return i-1;} }; -int main() +int main(int, char**) { typedef std::mem_fun_t F; static_assert((std::is_base_of, F>::value), ""); const F f(&A::a1); A a; assert(f(&a) == 5); + + return 0; } diff --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/nothing_to_do.pass.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/nothing_to_do.pass.cpp +++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/depr/depr.function.objects/depr.base/binary_function.pass.cpp b/libcxx/test/std/depr/depr.function.objects/depr.base/binary_function.pass.cpp index affa796364af6..dbe6d1eb9ef90 100644 --- a/libcxx/test/std/depr/depr.function.objects/depr.base/binary_function.pass.cpp +++ b/libcxx/test/std/depr/depr.function.objects/depr.base/binary_function.pass.cpp @@ -21,9 +21,11 @@ #include #include -int main() +int main(int, char**) { static_assert((std::is_same::first_argument_type, int>::value), ""); static_assert((std::is_same::second_argument_type, unsigned>::value), ""); static_assert((std::is_same::result_type, char>::value), ""); + + return 0; } diff --git a/libcxx/test/std/depr/depr.function.objects/depr.base/unary_function.pass.cpp b/libcxx/test/std/depr/depr.function.objects/depr.base/unary_function.pass.cpp index c0be3d8a5e89b..0aaf3fc136c37 100644 --- a/libcxx/test/std/depr/depr.function.objects/depr.base/unary_function.pass.cpp +++ b/libcxx/test/std/depr/depr.function.objects/depr.base/unary_function.pass.cpp @@ -20,8 +20,10 @@ #include #include -int main() +int main(int, char**) { static_assert((std::is_same::argument_type, unsigned>::value), ""); static_assert((std::is_same::result_type, char>::value), ""); + + return 0; } diff --git a/libcxx/test/std/depr/depr.function.objects/nothing_to_do.pass.cpp b/libcxx/test/std/depr/depr.function.objects/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/depr/depr.function.objects/nothing_to_do.pass.cpp +++ b/libcxx/test/std/depr/depr.function.objects/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/depr/depr.ios.members/io_state.pass.cpp b/libcxx/test/std/depr/depr.ios.members/io_state.pass.cpp index 0806205990719..37b23fc5e8c34 100644 --- a/libcxx/test/std/depr/depr.ios.members/io_state.pass.cpp +++ b/libcxx/test/std/depr/depr.ios.members/io_state.pass.cpp @@ -20,10 +20,12 @@ #include #include -int main() +int main(int, char**) { #if TEST_STD_VER <= 14 std::strstream::io_state b = std::strstream::eofbit; assert(b == std::ios::eofbit); #endif + + return 0; } diff --git a/libcxx/test/std/depr/depr.ios.members/open_mode.pass.cpp b/libcxx/test/std/depr/depr.ios.members/open_mode.pass.cpp index b8088f651aa89..57a88c957673a 100644 --- a/libcxx/test/std/depr/depr.ios.members/open_mode.pass.cpp +++ b/libcxx/test/std/depr/depr.ios.members/open_mode.pass.cpp @@ -20,10 +20,12 @@ #include #include -int main() +int main(int, char**) { #if TEST_STD_VER <= 14 std::strstream::open_mode b = std::strstream::app; assert(b == std::ios::app); #endif + + return 0; } diff --git a/libcxx/test/std/depr/depr.ios.members/seek_dir.pass.cpp b/libcxx/test/std/depr/depr.ios.members/seek_dir.pass.cpp index 6c808cb71152f..5b48073bd2f11 100644 --- a/libcxx/test/std/depr/depr.ios.members/seek_dir.pass.cpp +++ b/libcxx/test/std/depr/depr.ios.members/seek_dir.pass.cpp @@ -20,10 +20,12 @@ #include #include -int main() +int main(int, char**) { #if TEST_STD_VER <= 14 std::strstream::seek_dir b = std::strstream::cur; assert(b == std::ios::cur); #endif + + return 0; } diff --git a/libcxx/test/std/depr/depr.ios.members/streamoff.pass.cpp b/libcxx/test/std/depr/depr.ios.members/streamoff.pass.cpp index 66200175c0b6d..8abced55ee4ca 100644 --- a/libcxx/test/std/depr/depr.ios.members/streamoff.pass.cpp +++ b/libcxx/test/std/depr/depr.ios.members/streamoff.pass.cpp @@ -20,10 +20,12 @@ #include #include -int main() +int main(int, char**) { #if TEST_STD_VER <= 14 static_assert((std::is_integral::value), ""); static_assert((std::is_signed::value), ""); #endif + + return 0; } diff --git a/libcxx/test/std/depr/depr.ios.members/streampos.pass.cpp b/libcxx/test/std/depr/depr.ios.members/streampos.pass.cpp index 7af7c97e25ee6..7e95727033a36 100644 --- a/libcxx/test/std/depr/depr.ios.members/streampos.pass.cpp +++ b/libcxx/test/std/depr/depr.ios.members/streampos.pass.cpp @@ -20,9 +20,11 @@ #include #include -int main() +int main(int, char**) { #if TEST_STD_VER <= 14 static_assert((std::is_same::value), ""); #endif + + return 0; } diff --git a/libcxx/test/std/depr/depr.lib.binders/depr.lib.bind.1st/bind1st.depr_in_cxx11.fail.cpp b/libcxx/test/std/depr/depr.lib.binders/depr.lib.bind.1st/bind1st.depr_in_cxx11.fail.cpp index b06816a225e53..e00cfe7c32856 100644 --- a/libcxx/test/std/depr/depr.lib.binders/depr.lib.bind.1st/bind1st.depr_in_cxx11.fail.cpp +++ b/libcxx/test/std/depr/depr.lib.binders/depr.lib.bind.1st/bind1st.depr_in_cxx11.fail.cpp @@ -24,7 +24,9 @@ #include "../test_func.h" #include "test_macros.h" -int main() +int main(int, char**) { std::bind1st(test_func(1), 5); // expected-error{{'bind1st' is deprecated}} + + return 0; } diff --git a/libcxx/test/std/depr/depr.lib.binders/depr.lib.bind.1st/bind1st.pass.cpp b/libcxx/test/std/depr/depr.lib.binders/depr.lib.bind.1st/bind1st.pass.cpp index e9fc7b39c01f7..5d89f369f98df 100644 --- a/libcxx/test/std/depr/depr.lib.binders/depr.lib.bind.1st/bind1st.pass.cpp +++ b/libcxx/test/std/depr/depr.lib.binders/depr.lib.bind.1st/bind1st.pass.cpp @@ -18,7 +18,9 @@ #include "../test_func.h" -int main() +int main(int, char**) { assert(std::bind1st(test_func(1), 5)(10.) == -5.); + + return 0; } diff --git a/libcxx/test/std/depr/depr.lib.binders/depr.lib.bind.2nd/bind2nd.depr_in_cxx11.fail.cpp b/libcxx/test/std/depr/depr.lib.binders/depr.lib.bind.2nd/bind2nd.depr_in_cxx11.fail.cpp index eca83a007b688..d31189b0b980d 100644 --- a/libcxx/test/std/depr/depr.lib.binders/depr.lib.bind.2nd/bind2nd.depr_in_cxx11.fail.cpp +++ b/libcxx/test/std/depr/depr.lib.binders/depr.lib.bind.2nd/bind2nd.depr_in_cxx11.fail.cpp @@ -24,7 +24,9 @@ #include "../test_func.h" #include "test_macros.h" -int main() +int main(int, char**) { std::bind2nd(test_func(1), 5); // expected-error{{'bind2nd' is deprecated}} + + return 0; } diff --git a/libcxx/test/std/depr/depr.lib.binders/depr.lib.bind.2nd/bind2nd.pass.cpp b/libcxx/test/std/depr/depr.lib.binders/depr.lib.bind.2nd/bind2nd.pass.cpp index a7f19fe981345..243ffd1165dd8 100644 --- a/libcxx/test/std/depr/depr.lib.binders/depr.lib.bind.2nd/bind2nd.pass.cpp +++ b/libcxx/test/std/depr/depr.lib.binders/depr.lib.bind.2nd/bind2nd.pass.cpp @@ -18,7 +18,9 @@ #include "../test_func.h" -int main() +int main(int, char**) { assert(std::bind2nd(test_func(1), 5)(10) == 5.); + + return 0; } diff --git a/libcxx/test/std/depr/depr.lib.binders/depr.lib.binder.1st/binder1st.depr_in_cxx11.fail.cpp b/libcxx/test/std/depr/depr.lib.binders/depr.lib.binder.1st/binder1st.depr_in_cxx11.fail.cpp index 3ee4154b925cc..92d93b01f9eed 100644 --- a/libcxx/test/std/depr/depr.lib.binders/depr.lib.binder.1st/binder1st.depr_in_cxx11.fail.cpp +++ b/libcxx/test/std/depr/depr.lib.binders/depr.lib.binder.1st/binder1st.depr_in_cxx11.fail.cpp @@ -24,7 +24,9 @@ #include "../test_func.h" #include "test_macros.h" -int main() +int main(int, char**) { typedef std::binder1st B1ST; // expected-error{{'binder1st' is deprecated}} + + return 0; } diff --git a/libcxx/test/std/depr/depr.lib.binders/depr.lib.binder.1st/binder1st.pass.cpp b/libcxx/test/std/depr/depr.lib.binders/depr.lib.binder.1st/binder1st.pass.cpp index 18d4df48d58a0..66df2614efde8 100644 --- a/libcxx/test/std/depr/depr.lib.binders/depr.lib.binder.1st/binder1st.pass.cpp +++ b/libcxx/test/std/depr/depr.lib.binders/depr.lib.binder.1st/binder1st.pass.cpp @@ -51,8 +51,10 @@ class test } }; -int main() +int main(int, char**) { test t; t.do_test(); + + return 0; } diff --git a/libcxx/test/std/depr/depr.lib.binders/depr.lib.binder.2nd/binder2nd.depr_in_cxx11.fail.cpp b/libcxx/test/std/depr/depr.lib.binders/depr.lib.binder.2nd/binder2nd.depr_in_cxx11.fail.cpp index adecc53bd2a0a..f2dd190726e31 100644 --- a/libcxx/test/std/depr/depr.lib.binders/depr.lib.binder.2nd/binder2nd.depr_in_cxx11.fail.cpp +++ b/libcxx/test/std/depr/depr.lib.binders/depr.lib.binder.2nd/binder2nd.depr_in_cxx11.fail.cpp @@ -24,7 +24,9 @@ #include "../test_func.h" #include "test_macros.h" -int main() +int main(int, char**) { typedef std::binder2nd B2ND; // expected-error{{'binder2nd' is deprecated}} + + return 0; } diff --git a/libcxx/test/std/depr/depr.lib.binders/depr.lib.binder.2nd/binder2nd.pass.cpp b/libcxx/test/std/depr/depr.lib.binders/depr.lib.binder.2nd/binder2nd.pass.cpp index 3671d82448f53..f8cb7d46726c7 100644 --- a/libcxx/test/std/depr/depr.lib.binders/depr.lib.binder.2nd/binder2nd.pass.cpp +++ b/libcxx/test/std/depr/depr.lib.binders/depr.lib.binder.2nd/binder2nd.pass.cpp @@ -51,8 +51,10 @@ class test } }; -int main() +int main(int, char**) { test t; t.do_test(); + + return 0; } diff --git a/libcxx/test/std/depr/depr.lib.binders/nothing_to_do.pass.cpp b/libcxx/test/std/depr/depr.lib.binders/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/depr/depr.lib.binders/nothing_to_do.pass.cpp +++ b/libcxx/test/std/depr/depr.lib.binders/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/depr/depr.str.strstreams/depr.istrstream/depr.istrstream.cons/ccp.pass.cpp b/libcxx/test/std/depr/depr.str.strstreams/depr.istrstream/depr.istrstream.cons/ccp.pass.cpp index 9cce2a3d81bfc..90288578f1510 100644 --- a/libcxx/test/std/depr/depr.str.strstreams/depr.istrstream/depr.istrstream.cons/ccp.pass.cpp +++ b/libcxx/test/std/depr/depr.str.strstreams/depr.istrstream/depr.istrstream.cons/ccp.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { const char buf[] = "123 4.5 dog"; @@ -40,4 +40,6 @@ int main() assert(buf[9] == 'o'); assert(buf[10] == 'g'); } + + return 0; } diff --git a/libcxx/test/std/depr/depr.str.strstreams/depr.istrstream/depr.istrstream.cons/ccp_size.pass.cpp b/libcxx/test/std/depr/depr.str.strstreams/depr.istrstream/depr.istrstream.cons/ccp_size.pass.cpp index 6cf4b621b38ae..867225bf851d5 100644 --- a/libcxx/test/std/depr/depr.str.strstreams/depr.istrstream/depr.istrstream.cons/ccp_size.pass.cpp +++ b/libcxx/test/std/depr/depr.str.strstreams/depr.istrstream/depr.istrstream.cons/ccp_size.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { const char buf[] = "123 4.5 dog"; @@ -40,4 +40,6 @@ int main() assert(buf[5] == '.'); assert(buf[6] == '5'); } + + return 0; } diff --git a/libcxx/test/std/depr/depr.str.strstreams/depr.istrstream/depr.istrstream.cons/cp.pass.cpp b/libcxx/test/std/depr/depr.str.strstreams/depr.istrstream/depr.istrstream.cons/cp.pass.cpp index b73bf32c9cd29..106aaa7687a57 100644 --- a/libcxx/test/std/depr/depr.str.strstreams/depr.istrstream/depr.istrstream.cons/cp.pass.cpp +++ b/libcxx/test/std/depr/depr.str.strstreams/depr.istrstream/depr.istrstream.cons/cp.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { char buf[] = "123 4.5 dog"; @@ -40,4 +40,6 @@ int main() assert(buf[9] == 'g'); assert(buf[10] == 'g'); } + + return 0; } diff --git a/libcxx/test/std/depr/depr.str.strstreams/depr.istrstream/depr.istrstream.cons/cp_size.pass.cpp b/libcxx/test/std/depr/depr.str.strstreams/depr.istrstream/depr.istrstream.cons/cp_size.pass.cpp index 914212031463b..79a0bfeec2fc7 100644 --- a/libcxx/test/std/depr/depr.str.strstreams/depr.istrstream/depr.istrstream.cons/cp_size.pass.cpp +++ b/libcxx/test/std/depr/depr.str.strstreams/depr.istrstream/depr.istrstream.cons/cp_size.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { char buf[] = "123 4.5 dog"; @@ -40,4 +40,6 @@ int main() assert(buf[5] == '5'); assert(buf[6] == '5'); } + + return 0; } diff --git a/libcxx/test/std/depr/depr.str.strstreams/depr.istrstream/depr.istrstream.members/rdbuf.pass.cpp b/libcxx/test/std/depr/depr.str.strstreams/depr.istrstream/depr.istrstream.members/rdbuf.pass.cpp index 66de73a570a80..68b2ee8c40bb6 100644 --- a/libcxx/test/std/depr/depr.str.strstreams/depr.istrstream/depr.istrstream.members/rdbuf.pass.cpp +++ b/libcxx/test/std/depr/depr.str.strstreams/depr.istrstream/depr.istrstream.members/rdbuf.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { { const char buf[] = "123 4.5 dog"; @@ -23,4 +23,6 @@ int main() std::strstreambuf* sb = in.rdbuf(); assert(sb->sgetc() == '1'); } + + return 0; } diff --git a/libcxx/test/std/depr/depr.str.strstreams/depr.istrstream/depr.istrstream.members/str.pass.cpp b/libcxx/test/std/depr/depr.str.strstreams/depr.istrstream/depr.istrstream.members/str.pass.cpp index f4b91c97a74d4..bae10783837bf 100644 --- a/libcxx/test/std/depr/depr.str.strstreams/depr.istrstream/depr.istrstream.members/str.pass.cpp +++ b/libcxx/test/std/depr/depr.str.strstreams/depr.istrstream/depr.istrstream.members/str.pass.cpp @@ -15,11 +15,13 @@ #include #include -int main() +int main(int, char**) { { const char buf[] = "123 4.5 dog"; std::istrstream in(buf); assert(in.str() == std::string("123 4.5 dog")); } + + return 0; } diff --git a/libcxx/test/std/depr/depr.str.strstreams/depr.istrstream/types.pass.cpp b/libcxx/test/std/depr/depr.str.strstreams/depr.istrstream/types.pass.cpp index 94c2a48857823..80f5af082d348 100644 --- a/libcxx/test/std/depr/depr.str.strstreams/depr.istrstream/types.pass.cpp +++ b/libcxx/test/std/depr/depr.str.strstreams/depr.istrstream/types.pass.cpp @@ -16,7 +16,9 @@ #include #include -int main() +int main(int, char**) { static_assert((std::is_base_of::value), ""); + + return 0; } diff --git a/libcxx/test/std/depr/depr.str.strstreams/depr.ostrstream/depr.ostrstream.cons/cp_size_mode.pass.cpp b/libcxx/test/std/depr/depr.str.strstreams/depr.ostrstream/depr.ostrstream.cons/cp_size_mode.pass.cpp index edece7db0a61a..81c84fe321795 100644 --- a/libcxx/test/std/depr/depr.str.strstreams/depr.ostrstream/depr.ostrstream.cons/cp_size_mode.pass.cpp +++ b/libcxx/test/std/depr/depr.str.strstreams/depr.ostrstream/depr.ostrstream.cons/cp_size_mode.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { char buf[] = "123 4.5 dog"; @@ -38,4 +38,6 @@ int main() out << i << ' ' << d << ' ' << s << std::ends; assert(out.str() == std::string("123 4.5 dog321 5.5 cat")); } + + return 0; } diff --git a/libcxx/test/std/depr/depr.str.strstreams/depr.ostrstream/depr.ostrstream.cons/default.pass.cpp b/libcxx/test/std/depr/depr.str.strstreams/depr.ostrstream/depr.ostrstream.cons/default.pass.cpp index 96417da1163bc..5f9e9e6a88ed7 100644 --- a/libcxx/test/std/depr/depr.str.strstreams/depr.ostrstream/depr.ostrstream.cons/default.pass.cpp +++ b/libcxx/test/std/depr/depr.str.strstreams/depr.ostrstream/depr.ostrstream.cons/default.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { std::ostrstream out; int i = 123; @@ -25,4 +25,6 @@ int main() out << i << ' ' << d << ' ' << s << std::ends; assert(out.str() == std::string("123 4.5 dog")); out.freeze(false); + + return 0; } diff --git a/libcxx/test/std/depr/depr.str.strstreams/depr.ostrstream/depr.ostrstream.members/freeze.pass.cpp b/libcxx/test/std/depr/depr.str.strstreams/depr.ostrstream/depr.ostrstream.members/freeze.pass.cpp index 817597168a869..4b3412edc880f 100644 --- a/libcxx/test/std/depr/depr.str.strstreams/depr.ostrstream/depr.ostrstream.members/freeze.pass.cpp +++ b/libcxx/test/std/depr/depr.str.strstreams/depr.ostrstream/depr.ostrstream.members/freeze.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { { std::ostrstream out; @@ -30,4 +30,6 @@ int main() assert(out.str() == std::string("a")); out.freeze(false); } + + return 0; } diff --git a/libcxx/test/std/depr/depr.str.strstreams/depr.ostrstream/depr.ostrstream.members/pcount.pass.cpp b/libcxx/test/std/depr/depr.str.strstreams/depr.ostrstream/depr.ostrstream.members/pcount.pass.cpp index a592848ed0081..73a4bb81e2507 100644 --- a/libcxx/test/std/depr/depr.str.strstreams/depr.ostrstream/depr.ostrstream.members/pcount.pass.cpp +++ b/libcxx/test/std/depr/depr.str.strstreams/depr.ostrstream/depr.ostrstream.members/pcount.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { { std::ostrstream out; @@ -23,4 +23,6 @@ int main() out << 123 << ' ' << 4.5 << ' ' << "dog"; assert(out.pcount() == 11); } + + return 0; } diff --git a/libcxx/test/std/depr/depr.str.strstreams/depr.ostrstream/depr.ostrstream.members/rdbuf.pass.cpp b/libcxx/test/std/depr/depr.str.strstreams/depr.ostrstream/depr.ostrstream.members/rdbuf.pass.cpp index 547dde0644b44..ff58af45b204e 100644 --- a/libcxx/test/std/depr/depr.str.strstreams/depr.ostrstream/depr.ostrstream.members/rdbuf.pass.cpp +++ b/libcxx/test/std/depr/depr.str.strstreams/depr.ostrstream/depr.ostrstream.members/rdbuf.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { { char buf[] = "123 4.5 dog"; @@ -24,4 +24,6 @@ int main() assert(sb->sputc('a') == 'a'); assert(buf == std::string("a23 4.5 dog")); } + + return 0; } diff --git a/libcxx/test/std/depr/depr.str.strstreams/depr.ostrstream/depr.ostrstream.members/str.pass.cpp b/libcxx/test/std/depr/depr.str.strstreams/depr.ostrstream/depr.ostrstream.members/str.pass.cpp index c9f3e8dc0059e..60ec02f341d24 100644 --- a/libcxx/test/std/depr/depr.str.strstreams/depr.ostrstream/depr.ostrstream.members/str.pass.cpp +++ b/libcxx/test/std/depr/depr.str.strstreams/depr.ostrstream/depr.ostrstream.members/str.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { { std::ostrstream out; @@ -23,4 +23,6 @@ int main() assert(out.str() == std::string("123 4.5 dog")); out.freeze(false); } + + return 0; } diff --git a/libcxx/test/std/depr/depr.str.strstreams/depr.ostrstream/types.pass.cpp b/libcxx/test/std/depr/depr.str.strstreams/depr.ostrstream/types.pass.cpp index b394f8326ad89..5fde850372300 100644 --- a/libcxx/test/std/depr/depr.str.strstreams/depr.ostrstream/types.pass.cpp +++ b/libcxx/test/std/depr/depr.str.strstreams/depr.ostrstream/types.pass.cpp @@ -16,7 +16,9 @@ #include #include -int main() +int main(int, char**) { static_assert((std::is_base_of::value), ""); + + return 0; } diff --git a/libcxx/test/std/depr/depr.str.strstreams/depr.strstream/depr.strstream.cons/cp_size_mode.pass.cpp b/libcxx/test/std/depr/depr.str.strstreams/depr.strstream/depr.strstream.cons/cp_size_mode.pass.cpp index 0a54296467092..2387b1eebbe4a 100644 --- a/libcxx/test/std/depr/depr.str.strstreams/depr.strstream/depr.strstream.cons/cp_size_mode.pass.cpp +++ b/libcxx/test/std/depr/depr.str.strstreams/depr.strstream/depr.strstream.cons/cp_size_mode.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { char buf[] = "123 4.5 dog"; @@ -56,4 +56,6 @@ int main() inout << i << ' ' << d << ' ' << s; assert(inout.str() == std::string("123 4.5 dog321 5.5 cat")); } + + return 0; } diff --git a/libcxx/test/std/depr/depr.str.strstreams/depr.strstream/depr.strstream.cons/default.pass.cpp b/libcxx/test/std/depr/depr.str.strstreams/depr.strstream/depr.strstream.cons/default.pass.cpp index ff68a3d1d8bed..0e278490ab7a7 100644 --- a/libcxx/test/std/depr/depr.str.strstreams/depr.strstream/depr.strstream.cons/default.pass.cpp +++ b/libcxx/test/std/depr/depr.str.strstreams/depr.strstream/depr.strstream.cons/default.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { std::strstream inout; int i = 123; @@ -33,4 +33,6 @@ int main() assert(d == 4.5); assert(std::strcmp(s.c_str(), "dog") == 0); inout.freeze(false); + + return 0; } diff --git a/libcxx/test/std/depr/depr.str.strstreams/depr.strstream/depr.strstream.dest/rdbuf.pass.cpp b/libcxx/test/std/depr/depr.str.strstreams/depr.strstream/depr.strstream.dest/rdbuf.pass.cpp index f02e713241624..b4eb17397a626 100644 --- a/libcxx/test/std/depr/depr.str.strstreams/depr.strstream/depr.strstream.dest/rdbuf.pass.cpp +++ b/libcxx/test/std/depr/depr.str.strstreams/depr.strstream/depr.strstream.dest/rdbuf.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { { char buf[] = "123 4.5 dog"; @@ -24,4 +24,6 @@ int main() assert(sb->sputc('a') == 'a'); assert(buf == std::string("a23 4.5 dog")); } + + return 0; } diff --git a/libcxx/test/std/depr/depr.str.strstreams/depr.strstream/depr.strstream.oper/freeze.pass.cpp b/libcxx/test/std/depr/depr.str.strstreams/depr.strstream/depr.strstream.oper/freeze.pass.cpp index 8fd137ea67ee2..dab7c04a6bbae 100644 --- a/libcxx/test/std/depr/depr.str.strstreams/depr.strstream/depr.strstream.oper/freeze.pass.cpp +++ b/libcxx/test/std/depr/depr.str.strstreams/depr.strstream/depr.strstream.oper/freeze.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { { std::strstream out; @@ -30,4 +30,6 @@ int main() assert(out.str() == std::string("a")); out.freeze(false); } + + return 0; } diff --git a/libcxx/test/std/depr/depr.str.strstreams/depr.strstream/depr.strstream.oper/pcount.pass.cpp b/libcxx/test/std/depr/depr.str.strstreams/depr.strstream/depr.strstream.oper/pcount.pass.cpp index 56624f2b26d41..3a7641b23ea69 100644 --- a/libcxx/test/std/depr/depr.str.strstreams/depr.strstream/depr.strstream.oper/pcount.pass.cpp +++ b/libcxx/test/std/depr/depr.str.strstreams/depr.strstream/depr.strstream.oper/pcount.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { { std::strstream out; @@ -23,4 +23,6 @@ int main() out << 123 << ' ' << 4.5 << ' ' << "dog"; assert(out.pcount() == 11); } + + return 0; } diff --git a/libcxx/test/std/depr/depr.str.strstreams/depr.strstream/depr.strstream.oper/str.pass.cpp b/libcxx/test/std/depr/depr.str.strstreams/depr.strstream/depr.strstream.oper/str.pass.cpp index e780e843fbbaf..f3482c756d0d9 100644 --- a/libcxx/test/std/depr/depr.str.strstreams/depr.strstream/depr.strstream.oper/str.pass.cpp +++ b/libcxx/test/std/depr/depr.str.strstreams/depr.strstream/depr.strstream.oper/str.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { { std::strstream out; @@ -23,4 +23,6 @@ int main() assert(out.str() == std::string("123 4.5 dog")); out.freeze(false); } + + return 0; } diff --git a/libcxx/test/std/depr/depr.str.strstreams/depr.strstream/types.pass.cpp b/libcxx/test/std/depr/depr.str.strstreams/depr.strstream/types.pass.cpp index 81979d0af50d0..7944b789996ad 100644 --- a/libcxx/test/std/depr/depr.str.strstreams/depr.strstream/types.pass.cpp +++ b/libcxx/test/std/depr/depr.str.strstreams/depr.strstream/types.pass.cpp @@ -21,11 +21,13 @@ #include #include -int main() +int main(int, char**) { static_assert((std::is_base_of::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::int_type>::value), ""); static_assert((std::is_same::pos_type>::value), ""); static_assert((std::is_same::off_type>::value), ""); + + return 0; } diff --git a/libcxx/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.cons/ccp_size.pass.cpp b/libcxx/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.cons/ccp_size.pass.cpp index e9003c9e63f3d..08cb61914a619 100644 --- a/libcxx/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.cons/ccp_size.pass.cpp +++ b/libcxx/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.cons/ccp_size.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { { const char buf[] = "abcd"; @@ -36,4 +36,6 @@ int main() assert(sb.snextc() == 'd'); assert(sb.snextc() == EOF); } + + return 0; } diff --git a/libcxx/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.cons/cp_size_cp.pass.cpp b/libcxx/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.cons/cp_size_cp.pass.cpp index c5acd63a09783..19eb15f948ce8 100644 --- a/libcxx/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.cons/cp_size_cp.pass.cpp +++ b/libcxx/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.cons/cp_size_cp.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { char buf[] = "abcd"; @@ -93,4 +93,6 @@ int main() assert(sb.snextc() == 'j'); assert(sb.snextc() == EOF); } + + return 0; } diff --git a/libcxx/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.cons/cscp_size.pass.cpp b/libcxx/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.cons/cscp_size.pass.cpp index d38b8d3c8103a..8cba11faca813 100644 --- a/libcxx/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.cons/cscp_size.pass.cpp +++ b/libcxx/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.cons/cscp_size.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { { const signed char buf[] = "abcd"; @@ -36,4 +36,6 @@ int main() assert(sb.snextc() == 'd'); assert(sb.snextc() == EOF); } + + return 0; } diff --git a/libcxx/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.cons/cucp_size.pass.cpp b/libcxx/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.cons/cucp_size.pass.cpp index 03dc3056eca69..9546b74dbd563 100644 --- a/libcxx/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.cons/cucp_size.pass.cpp +++ b/libcxx/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.cons/cucp_size.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { { unsigned char buf[] = "abcd"; @@ -36,4 +36,6 @@ int main() assert(sb.snextc() == 'd'); assert(sb.snextc() == EOF); } + + return 0; } diff --git a/libcxx/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.cons/custom_alloc.pass.cpp b/libcxx/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.cons/custom_alloc.pass.cpp index 997e6707c2f4f..d7587c0055e03 100644 --- a/libcxx/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.cons/custom_alloc.pass.cpp +++ b/libcxx/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.cons/custom_alloc.pass.cpp @@ -38,7 +38,7 @@ struct test {return std::strstreambuf::overflow(c);} }; -int main() +int main(int, char**) { { test s(my_alloc, my_free); @@ -47,4 +47,6 @@ int main() assert(called == 1); } assert(called == 2); + + return 0; } diff --git a/libcxx/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.cons/default.pass.cpp b/libcxx/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.cons/default.pass.cpp index 49da5b2626d5f..2764efd0efda6 100644 --- a/libcxx/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.cons/default.pass.cpp +++ b/libcxx/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.cons/default.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { { std::strstreambuf s; @@ -27,4 +27,6 @@ int main() assert(s.str() == nullptr); assert(s.pcount() == 0); } + + return 0; } diff --git a/libcxx/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.cons/scp_size_scp.pass.cpp b/libcxx/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.cons/scp_size_scp.pass.cpp index 5d419f7a4106f..fdd46164bbbea 100644 --- a/libcxx/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.cons/scp_size_scp.pass.cpp +++ b/libcxx/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.cons/scp_size_scp.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { signed char buf[] = "abcd"; @@ -93,4 +93,6 @@ int main() assert(sb.snextc() == 'j'); assert(sb.snextc() == EOF); } + + return 0; } diff --git a/libcxx/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.cons/ucp_size_ucp.pass.cpp b/libcxx/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.cons/ucp_size_ucp.pass.cpp index 6a7467dece33e..80aafd4481a46 100644 --- a/libcxx/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.cons/ucp_size_ucp.pass.cpp +++ b/libcxx/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.cons/ucp_size_ucp.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { unsigned char buf[] = "abcd"; @@ -93,4 +93,6 @@ int main() assert(sb.snextc() == 'j'); assert(sb.snextc() == EOF); } + + return 0; } diff --git a/libcxx/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.members/freeze.pass.cpp b/libcxx/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.members/freeze.pass.cpp index d798eb308b12d..4cbb7b80aa729 100644 --- a/libcxx/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.members/freeze.pass.cpp +++ b/libcxx/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.members/freeze.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { { std::strstreambuf sb; @@ -24,4 +24,6 @@ int main() sb.freeze(false); assert(sb.sputc('a') == 'a'); } + + return 0; } diff --git a/libcxx/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.members/overflow.pass.cpp b/libcxx/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.members/overflow.pass.cpp index 7d98f8cfd3dc6..b47a34ed8f706 100644 --- a/libcxx/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.members/overflow.pass.cpp +++ b/libcxx/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.members/overflow.pass.cpp @@ -20,7 +20,7 @@ #include #include -int main() { +int main(int, char**) { std::ostrstream oss; std::string s; diff --git a/libcxx/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.members/pcount.pass.cpp b/libcxx/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.members/pcount.pass.cpp index 901dc4a9c5c85..1d2f34d924b2f 100644 --- a/libcxx/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.members/pcount.pass.cpp +++ b/libcxx/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.members/pcount.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { { std::strstreambuf sb; @@ -28,4 +28,6 @@ int main() assert(sb.pcount() == 2); sb.freeze(false); } + + return 0; } diff --git a/libcxx/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.members/str.pass.cpp b/libcxx/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.members/str.pass.cpp index 933b6306e24b2..04ecb94cbd645 100644 --- a/libcxx/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.members/str.pass.cpp +++ b/libcxx/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.members/str.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { { std::strstreambuf sb; @@ -24,4 +24,6 @@ int main() assert(sb.str() == std::string("a")); sb.freeze(false); } + + return 0; } diff --git a/libcxx/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.virtuals/overflow.pass.cpp b/libcxx/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.virtuals/overflow.pass.cpp index 0e5f6a7e6e48b..19cb7abf12f9a 100644 --- a/libcxx/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.virtuals/overflow.pass.cpp +++ b/libcxx/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.virtuals/overflow.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { { char buf[12] = "abc"; @@ -43,4 +43,6 @@ int main() assert(sb.sputc('1') == '1'); assert(sb.str() == std::string("12345678901")); } + + return 0; } diff --git a/libcxx/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.virtuals/pbackfail.pass.cpp b/libcxx/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.virtuals/pbackfail.pass.cpp index 8364ab7ff94c6..59fdb640d53a1 100644 --- a/libcxx/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.virtuals/pbackfail.pass.cpp +++ b/libcxx/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.virtuals/pbackfail.pass.cpp @@ -27,7 +27,7 @@ struct test virtual int_type pbackfail(int_type c = EOF) {return base::pbackfail(c);} }; -int main() +int main(int, char**) { { const char buf[] = "123"; @@ -58,4 +58,6 @@ int main() assert(sb.pbackfail(EOF) == EOF); assert(sb.str() == std::string("133")); } + + return 0; } diff --git a/libcxx/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.virtuals/seekoff.pass.cpp b/libcxx/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.virtuals/seekoff.pass.cpp index 9b5ba9ada70bd..8e1f22eeb117d 100644 --- a/libcxx/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.virtuals/seekoff.pass.cpp +++ b/libcxx/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.virtuals/seekoff.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { char buf[] = "0123456789"; @@ -53,4 +53,6 @@ int main() assert(sb.sputc('c') == 'c'); assert(sb.str() == std::string("012a456c89")); } + + return 0; } diff --git a/libcxx/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.virtuals/seekpos.pass.cpp b/libcxx/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.virtuals/seekpos.pass.cpp index f888a4d88cb5a..9d13dc4aa826b 100644 --- a/libcxx/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.virtuals/seekpos.pass.cpp +++ b/libcxx/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.virtuals/seekpos.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { char buf[] = "0123456789"; @@ -35,4 +35,6 @@ int main() assert(sb.sputc('a') == 'a'); assert(sb.str() == std::string("012a456789")); } + + return 0; } diff --git a/libcxx/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.virtuals/setbuf.pass.cpp b/libcxx/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.virtuals/setbuf.pass.cpp index 85c308ad57c57..c78004e211918 100644 --- a/libcxx/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.virtuals/setbuf.pass.cpp +++ b/libcxx/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.virtuals/setbuf.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { { char buf[] = "0123456789"; @@ -23,4 +23,6 @@ int main() assert(sb.pubsetbuf(0, 0) == &sb); assert(sb.str() == std::string("0123456789")); } + + return 0; } diff --git a/libcxx/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.virtuals/underflow.pass.cpp b/libcxx/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.virtuals/underflow.pass.cpp index a28d943d9b963..e8da2957c6a96 100644 --- a/libcxx/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.virtuals/underflow.pass.cpp +++ b/libcxx/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.virtuals/underflow.pass.cpp @@ -27,7 +27,7 @@ struct test base::int_type underflow() {return base::underflow();} }; -int main() +int main(int, char**) { { char buf[10] = "123"; @@ -47,4 +47,6 @@ int main() assert(sb.underflow() == '4'); assert(sb.underflow() == '4'); } + + return 0; } diff --git a/libcxx/test/std/depr/depr.str.strstreams/depr.strstreambuf/types.pass.cpp b/libcxx/test/std/depr/depr.str.strstreams/depr.strstreambuf/types.pass.cpp index 755916f653c5a..398605af98a5a 100644 --- a/libcxx/test/std/depr/depr.str.strstreams/depr.strstreambuf/types.pass.cpp +++ b/libcxx/test/std/depr/depr.str.strstreams/depr.strstreambuf/types.pass.cpp @@ -14,7 +14,9 @@ #include #include -int main() +int main(int, char**) { static_assert((std::is_base_of::value), ""); + + return 0; } diff --git a/libcxx/test/std/depr/exception.unexpected/nothing_to_do.pass.cpp b/libcxx/test/std/depr/exception.unexpected/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/depr/exception.unexpected/nothing_to_do.pass.cpp +++ b/libcxx/test/std/depr/exception.unexpected/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/depr/exception.unexpected/set.unexpected/get_unexpected.pass.cpp b/libcxx/test/std/depr/exception.unexpected/set.unexpected/get_unexpected.pass.cpp index 0974b2ee95dee..7b11c3037f04b 100644 --- a/libcxx/test/std/depr/exception.unexpected/set.unexpected/get_unexpected.pass.cpp +++ b/libcxx/test/std/depr/exception.unexpected/set.unexpected/get_unexpected.pass.cpp @@ -22,7 +22,7 @@ void f3() std::exit(0); } -int main() +int main(int, char**) { std::unexpected_handler old = std::get_unexpected(); @@ -37,4 +37,6 @@ int main() std::set_terminate(f3); (*old)(); assert(0); + + return 0; } diff --git a/libcxx/test/std/depr/exception.unexpected/set.unexpected/set_unexpected.pass.cpp b/libcxx/test/std/depr/exception.unexpected/set.unexpected/set_unexpected.pass.cpp index f46d1d4eec070..38ae81ec9b074 100644 --- a/libcxx/test/std/depr/exception.unexpected/set.unexpected/set_unexpected.pass.cpp +++ b/libcxx/test/std/depr/exception.unexpected/set.unexpected/set_unexpected.pass.cpp @@ -22,7 +22,7 @@ void f3() std::exit(0); } -int main() +int main(int, char**) { std::unexpected_handler old = std::set_unexpected(f1); // verify there is a previous unexpected handler @@ -33,4 +33,6 @@ int main() std::set_terminate(f3); (*old)(); assert(0); + + return 0; } diff --git a/libcxx/test/std/depr/exception.unexpected/unexpected.handler/unexpected_handler.pass.cpp b/libcxx/test/std/depr/exception.unexpected/unexpected.handler/unexpected_handler.pass.cpp index 549f8e0a5ac8f..e4d4869d77a44 100644 --- a/libcxx/test/std/depr/exception.unexpected/unexpected.handler/unexpected_handler.pass.cpp +++ b/libcxx/test/std/depr/exception.unexpected/unexpected.handler/unexpected_handler.pass.cpp @@ -14,8 +14,10 @@ void f() {} -int main() +int main(int, char**) { std::unexpected_handler p = f; ((void)p); + + return 0; } diff --git a/libcxx/test/std/depr/exception.unexpected/unexpected/unexpected.pass.cpp b/libcxx/test/std/depr/exception.unexpected/unexpected/unexpected.pass.cpp index 883aa923757c6..2562b78848710 100644 --- a/libcxx/test/std/depr/exception.unexpected/unexpected/unexpected.pass.cpp +++ b/libcxx/test/std/depr/exception.unexpected/unexpected/unexpected.pass.cpp @@ -19,9 +19,11 @@ void f1() std::exit(0); } -int main() +int main(int, char**) { std::set_unexpected(f1); std::unexpected(); assert(false); + + return 0; } diff --git a/libcxx/test/std/depr/nothing_to_do.pass.cpp b/libcxx/test/std/depr/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/depr/nothing_to_do.pass.cpp +++ b/libcxx/test/std/depr/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/diagnostics/assertions/cassert.pass.cpp b/libcxx/test/std/diagnostics/assertions/cassert.pass.cpp index fe54e1852df07..a18a4d0df039f 100644 --- a/libcxx/test/std/diagnostics/assertions/cassert.pass.cpp +++ b/libcxx/test/std/diagnostics/assertions/cassert.pass.cpp @@ -14,6 +14,8 @@ #error assert not defined #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/diagnostics/diagnostics.general/nothing_to_do.pass.cpp b/libcxx/test/std/diagnostics/diagnostics.general/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/diagnostics/diagnostics.general/nothing_to_do.pass.cpp +++ b/libcxx/test/std/diagnostics/diagnostics.general/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/diagnostics/errno/cerrno.pass.cpp b/libcxx/test/std/diagnostics/errno/cerrno.pass.cpp index 100e5b30b0df3..452f99e337afa 100644 --- a/libcxx/test/std/diagnostics/errno/cerrno.pass.cpp +++ b/libcxx/test/std/diagnostics/errno/cerrno.pass.cpp @@ -339,6 +339,8 @@ #error errno not defined #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/diagnostics/nothing_to_do.pass.cpp b/libcxx/test/std/diagnostics/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/diagnostics/nothing_to_do.pass.cpp +++ b/libcxx/test/std/diagnostics/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/diagnostics/std.exceptions/domain.error/domain_error.pass.cpp b/libcxx/test/std/diagnostics/std.exceptions/domain.error/domain_error.pass.cpp index 14ded723f161a..31a320d113aef 100644 --- a/libcxx/test/std/diagnostics/std.exceptions/domain.error/domain_error.pass.cpp +++ b/libcxx/test/std/diagnostics/std.exceptions/domain.error/domain_error.pass.cpp @@ -14,7 +14,7 @@ #include #include -int main() +int main(int, char**) { static_assert((std::is_base_of::value), "std::is_base_of::value"); @@ -38,4 +38,6 @@ int main() e2 = e; assert(e2.what() == msg); } + + return 0; } diff --git a/libcxx/test/std/diagnostics/std.exceptions/invalid.argument/invalid_argument.pass.cpp b/libcxx/test/std/diagnostics/std.exceptions/invalid.argument/invalid_argument.pass.cpp index bcdfe477b3573..00d9a9296dfa8 100644 --- a/libcxx/test/std/diagnostics/std.exceptions/invalid.argument/invalid_argument.pass.cpp +++ b/libcxx/test/std/diagnostics/std.exceptions/invalid.argument/invalid_argument.pass.cpp @@ -14,7 +14,7 @@ #include #include -int main() +int main(int, char**) { static_assert((std::is_base_of::value), "std::is_base_of::value"); @@ -38,4 +38,6 @@ int main() e2 = e; assert(e2.what() == msg); } + + return 0; } diff --git a/libcxx/test/std/diagnostics/std.exceptions/length.error/length_error.pass.cpp b/libcxx/test/std/diagnostics/std.exceptions/length.error/length_error.pass.cpp index 754f7906152e0..1e8f1e46c8e2b 100644 --- a/libcxx/test/std/diagnostics/std.exceptions/length.error/length_error.pass.cpp +++ b/libcxx/test/std/diagnostics/std.exceptions/length.error/length_error.pass.cpp @@ -14,7 +14,7 @@ #include #include -int main() +int main(int, char**) { static_assert((std::is_base_of::value), "std::is_base_of::value"); @@ -38,4 +38,6 @@ int main() e2 = e; assert(e2.what() == msg); } + + return 0; } diff --git a/libcxx/test/std/diagnostics/std.exceptions/logic.error/logic_error.pass.cpp b/libcxx/test/std/diagnostics/std.exceptions/logic.error/logic_error.pass.cpp index 279ac7345b741..e30b3b9f8ee33 100644 --- a/libcxx/test/std/diagnostics/std.exceptions/logic.error/logic_error.pass.cpp +++ b/libcxx/test/std/diagnostics/std.exceptions/logic.error/logic_error.pass.cpp @@ -14,7 +14,7 @@ #include #include -int main() +int main(int, char**) { static_assert((std::is_base_of::value), "std::is_base_of::value"); @@ -38,4 +38,6 @@ int main() e2 = e; assert(e2.what() == msg); } + + return 0; } diff --git a/libcxx/test/std/diagnostics/std.exceptions/out.of.range/out_of_range.pass.cpp b/libcxx/test/std/diagnostics/std.exceptions/out.of.range/out_of_range.pass.cpp index 8f5a8f2f806ed..01a5b46b4a45f 100644 --- a/libcxx/test/std/diagnostics/std.exceptions/out.of.range/out_of_range.pass.cpp +++ b/libcxx/test/std/diagnostics/std.exceptions/out.of.range/out_of_range.pass.cpp @@ -14,7 +14,7 @@ #include #include -int main() +int main(int, char**) { static_assert((std::is_base_of::value), "std::is_base_of::value"); @@ -38,4 +38,6 @@ int main() e2 = e; assert(e2.what() == msg); } + + return 0; } diff --git a/libcxx/test/std/diagnostics/std.exceptions/overflow.error/overflow_error.pass.cpp b/libcxx/test/std/diagnostics/std.exceptions/overflow.error/overflow_error.pass.cpp index 0e576290d8ebf..a9e7fb9942298 100644 --- a/libcxx/test/std/diagnostics/std.exceptions/overflow.error/overflow_error.pass.cpp +++ b/libcxx/test/std/diagnostics/std.exceptions/overflow.error/overflow_error.pass.cpp @@ -14,7 +14,7 @@ #include #include -int main() +int main(int, char**) { static_assert((std::is_base_of::value), "std::is_base_of::value"); @@ -38,4 +38,6 @@ int main() e2 = e; assert(e2.what() == msg); } + + return 0; } diff --git a/libcxx/test/std/diagnostics/std.exceptions/range.error/range_error.pass.cpp b/libcxx/test/std/diagnostics/std.exceptions/range.error/range_error.pass.cpp index 211c53d12e269..92d1151ff6c1a 100644 --- a/libcxx/test/std/diagnostics/std.exceptions/range.error/range_error.pass.cpp +++ b/libcxx/test/std/diagnostics/std.exceptions/range.error/range_error.pass.cpp @@ -14,7 +14,7 @@ #include #include -int main() +int main(int, char**) { static_assert((std::is_base_of::value), "std::is_base_of::value"); @@ -38,4 +38,6 @@ int main() e2 = e; assert(e2.what() == msg); } + + return 0; } diff --git a/libcxx/test/std/diagnostics/std.exceptions/runtime.error/runtime_error.pass.cpp b/libcxx/test/std/diagnostics/std.exceptions/runtime.error/runtime_error.pass.cpp index dae3371cd99b9..c4b8eea74c8f6 100644 --- a/libcxx/test/std/diagnostics/std.exceptions/runtime.error/runtime_error.pass.cpp +++ b/libcxx/test/std/diagnostics/std.exceptions/runtime.error/runtime_error.pass.cpp @@ -14,7 +14,7 @@ #include #include -int main() +int main(int, char**) { static_assert((std::is_base_of::value), "std::is_base_of::value"); @@ -38,4 +38,6 @@ int main() e2 = e; assert(e2.what() == msg); } + + return 0; } diff --git a/libcxx/test/std/diagnostics/std.exceptions/underflow.error/underflow_error.pass.cpp b/libcxx/test/std/diagnostics/std.exceptions/underflow.error/underflow_error.pass.cpp index f2588576a6ea8..88a3f46fbdc8c 100644 --- a/libcxx/test/std/diagnostics/std.exceptions/underflow.error/underflow_error.pass.cpp +++ b/libcxx/test/std/diagnostics/std.exceptions/underflow.error/underflow_error.pass.cpp @@ -14,7 +14,7 @@ #include #include -int main() +int main(int, char**) { static_assert((std::is_base_of::value), "std::is_base_of::value"); @@ -38,4 +38,6 @@ int main() e2 = e; assert(e2.what() == msg); } + + return 0; } diff --git a/libcxx/test/std/diagnostics/syserr/errc.pass.cpp b/libcxx/test/std/diagnostics/syserr/errc.pass.cpp index 0738264afdb83..201878d2dd58c 100644 --- a/libcxx/test/std/diagnostics/syserr/errc.pass.cpp +++ b/libcxx/test/std/diagnostics/syserr/errc.pass.cpp @@ -12,7 +12,7 @@ #include -int main() +int main(int, char**) { static_assert(static_cast(std::errc::address_family_not_supported) == EAFNOSUPPORT, ""); static_assert(static_cast(std::errc::address_in_use) == EADDRINUSE, ""); @@ -100,4 +100,6 @@ int main() static_assert(static_cast(std::errc::too_many_symbolic_link_levels) == ELOOP, ""); static_assert(static_cast(std::errc::value_too_large) == EOVERFLOW, ""); static_assert(static_cast(std::errc::wrong_protocol_type) == EPROTOTYPE, ""); + + return 0; } diff --git a/libcxx/test/std/diagnostics/syserr/is_error_code_enum.pass.cpp b/libcxx/test/std/diagnostics/syserr/is_error_code_enum.pass.cpp index 2b1416e15d6c7..2a44b5ee352d3 100644 --- a/libcxx/test/std/diagnostics/syserr/is_error_code_enum.pass.cpp +++ b/libcxx/test/std/diagnostics/syserr/is_error_code_enum.pass.cpp @@ -39,7 +39,7 @@ namespace std } -int main() +int main(int, char**) { test(); test(); @@ -47,4 +47,6 @@ int main() test(); test(); + + return 0; } diff --git a/libcxx/test/std/diagnostics/syserr/is_error_condition_enum.pass.cpp b/libcxx/test/std/diagnostics/syserr/is_error_condition_enum.pass.cpp index 8398c70febbfc..df89fc334b246 100644 --- a/libcxx/test/std/diagnostics/syserr/is_error_condition_enum.pass.cpp +++ b/libcxx/test/std/diagnostics/syserr/is_error_condition_enum.pass.cpp @@ -39,7 +39,7 @@ namespace std } -int main() +int main(int, char**) { test(); test(); @@ -47,4 +47,6 @@ int main() test(); test(); + + return 0; } diff --git a/libcxx/test/std/diagnostics/syserr/syserr.compare/eq_error_code_error_code.pass.cpp b/libcxx/test/std/diagnostics/syserr/syserr.compare/eq_error_code_error_code.pass.cpp index 425406ade4633..0e2dbe552bd72 100644 --- a/libcxx/test/std/diagnostics/syserr/syserr.compare/eq_error_code_error_code.pass.cpp +++ b/libcxx/test/std/diagnostics/syserr/syserr.compare/eq_error_code_error_code.pass.cpp @@ -20,7 +20,7 @@ #include #include -int main() +int main(int, char**) { std::error_code e_code1(5, std::generic_category()); std::error_code e_code2(5, std::system_category()); @@ -102,4 +102,6 @@ int main() assert(e_condition4 != e_condition2); assert(e_condition4 != e_condition3); assert(e_condition4 == e_condition4); + + return 0; } diff --git a/libcxx/test/std/diagnostics/syserr/syserr.errcat/nothing_to_do.pass.cpp b/libcxx/test/std/diagnostics/syserr/syserr.errcat/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/diagnostics/syserr/syserr.errcat/nothing_to_do.pass.cpp +++ b/libcxx/test/std/diagnostics/syserr/syserr.errcat/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.derived/message.pass.cpp b/libcxx/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.derived/message.pass.cpp index 8aa7fedf6f8c5..ed580198efc4c 100644 --- a/libcxx/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.derived/message.pass.cpp +++ b/libcxx/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.derived/message.pass.cpp @@ -18,7 +18,7 @@ #include -int main() +int main(int, char**) { const std::error_category& e_cat1 = std::generic_category(); const std::error_category& e_cat2 = std::system_category(); @@ -30,4 +30,6 @@ int main() assert(!m3.empty()); assert(m1 == m2); assert(m1 != m3); + + return 0; } diff --git a/libcxx/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.nonvirtuals/default_ctor.pass.cpp b/libcxx/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.nonvirtuals/default_ctor.pass.cpp index 8e5bda76297e3..185f96e26eb9e 100644 --- a/libcxx/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.nonvirtuals/default_ctor.pass.cpp +++ b/libcxx/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.nonvirtuals/default_ctor.pass.cpp @@ -27,8 +27,10 @@ class test1 virtual std::string message(int) const {return std::string();} }; -int main() +int main(int, char**) { static_assert(std::is_nothrow_default_constructible::value, "error_category() must exist and be noexcept"); + + return 0; } diff --git a/libcxx/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.nonvirtuals/eq.pass.cpp b/libcxx/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.nonvirtuals/eq.pass.cpp index abe0c36873f7b..ce09481e32488 100644 --- a/libcxx/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.nonvirtuals/eq.pass.cpp +++ b/libcxx/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.nonvirtuals/eq.pass.cpp @@ -15,11 +15,13 @@ #include #include -int main() +int main(int, char**) { const std::error_category& e_cat1 = std::generic_category(); const std::error_category& e_cat2 = std::generic_category(); const std::error_category& e_cat3 = std::system_category(); assert(e_cat1 == e_cat2); assert(!(e_cat1 == e_cat3)); + + return 0; } diff --git a/libcxx/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.nonvirtuals/lt.pass.cpp b/libcxx/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.nonvirtuals/lt.pass.cpp index 9b9a1acc0f25d..db6b3b90814e1 100644 --- a/libcxx/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.nonvirtuals/lt.pass.cpp +++ b/libcxx/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.nonvirtuals/lt.pass.cpp @@ -15,11 +15,13 @@ #include #include -int main() +int main(int, char**) { const std::error_category& e_cat1 = std::generic_category(); const std::error_category& e_cat2 = std::generic_category(); const std::error_category& e_cat3 = std::system_category(); assert(!(e_cat1 < e_cat2) && !(e_cat2 < e_cat1)); assert((e_cat1 < e_cat3) || (e_cat3 < e_cat1)); + + return 0; } diff --git a/libcxx/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.nonvirtuals/neq.pass.cpp b/libcxx/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.nonvirtuals/neq.pass.cpp index 615c9a0bec624..2826018d3d57c 100644 --- a/libcxx/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.nonvirtuals/neq.pass.cpp +++ b/libcxx/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.nonvirtuals/neq.pass.cpp @@ -15,11 +15,13 @@ #include #include -int main() +int main(int, char**) { const std::error_category& e_cat1 = std::generic_category(); const std::error_category& e_cat2 = std::generic_category(); const std::error_category& e_cat3 = std::system_category(); assert(!(e_cat1 != e_cat2)); assert(e_cat1 != e_cat3); + + return 0; } diff --git a/libcxx/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/generic_category.pass.cpp b/libcxx/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/generic_category.pass.cpp index 73967e90f4259..f04427381cbbb 100644 --- a/libcxx/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/generic_category.pass.cpp +++ b/libcxx/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/generic_category.pass.cpp @@ -35,7 +35,7 @@ void test_message_for_bad_value() { assert(errno == E2BIG); } -int main() +int main(int, char**) { const std::error_category& e_cat1 = std::generic_category(); std::string m1 = e_cat1.name(); @@ -43,4 +43,6 @@ int main() { test_message_for_bad_value(); } + + return 0; } diff --git a/libcxx/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/system_category.pass.cpp b/libcxx/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/system_category.pass.cpp index 78d3a3ef00c4e..8374c8766b2ea 100644 --- a/libcxx/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/system_category.pass.cpp +++ b/libcxx/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/system_category.pass.cpp @@ -35,7 +35,7 @@ void test_message_for_bad_value() { assert(errno == E2BIG); } -int main() +int main(int, char**) { const std::error_category& e_cat1 = std::system_category(); std::error_condition e_cond = e_cat1.default_error_condition(5); @@ -47,4 +47,6 @@ int main() { test_message_for_bad_value(); } + + return 0; } diff --git a/libcxx/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.overview/error_category.pass.cpp b/libcxx/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.overview/error_category.pass.cpp index b75b6b92437b2..112c3944885fd 100644 --- a/libcxx/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.overview/error_category.pass.cpp +++ b/libcxx/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.overview/error_category.pass.cpp @@ -12,8 +12,10 @@ #include -int main() +int main(int, char**) { std::error_category* p = 0; ((void)p); + + return 0; } diff --git a/libcxx/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.virtuals/default_error_condition.pass.cpp b/libcxx/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.virtuals/default_error_condition.pass.cpp index 870822cbcbe19..07daf6f491279 100644 --- a/libcxx/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.virtuals/default_error_condition.pass.cpp +++ b/libcxx/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.virtuals/default_error_condition.pass.cpp @@ -15,10 +15,12 @@ #include #include -int main() +int main(int, char**) { const std::error_category& e_cat = std::generic_category(); std::error_condition e_cond = e_cat.default_error_condition(static_cast(std::errc::not_a_directory)); assert(e_cond.category() == e_cat); assert(e_cond.value() == static_cast(std::errc::not_a_directory)); + + return 0; } diff --git a/libcxx/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.virtuals/equivalent_error_code_int.pass.cpp b/libcxx/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.virtuals/equivalent_error_code_int.pass.cpp index 89eb8b475233e..7682227980ed5 100644 --- a/libcxx/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.virtuals/equivalent_error_code_int.pass.cpp +++ b/libcxx/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.virtuals/equivalent_error_code_int.pass.cpp @@ -15,9 +15,11 @@ #include #include -int main() +int main(int, char**) { const std::error_category& e_cat = std::generic_category(); assert(e_cat.equivalent(std::error_code(5, e_cat), 5)); assert(!e_cat.equivalent(std::error_code(5, e_cat), 6)); + + return 0; } diff --git a/libcxx/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.virtuals/equivalent_int_error_condition.pass.cpp b/libcxx/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.virtuals/equivalent_int_error_condition.pass.cpp index 76cc198382b92..7e627d4097a88 100644 --- a/libcxx/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.virtuals/equivalent_int_error_condition.pass.cpp +++ b/libcxx/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.virtuals/equivalent_int_error_condition.pass.cpp @@ -15,10 +15,12 @@ #include #include -int main() +int main(int, char**) { const std::error_category& e_cat = std::generic_category(); std::error_condition e_cond = e_cat.default_error_condition(5); assert(e_cat.equivalent(5, e_cond)); assert(!e_cat.equivalent(6, e_cond)); + + return 0; } diff --git a/libcxx/test/std/diagnostics/syserr/syserr.errcode/nothing_to_do.pass.cpp b/libcxx/test/std/diagnostics/syserr/syserr.errcode/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/diagnostics/syserr/syserr.errcode/nothing_to_do.pass.cpp +++ b/libcxx/test/std/diagnostics/syserr/syserr.errcode/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.constructors/ErrorCodeEnum.pass.cpp b/libcxx/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.constructors/ErrorCodeEnum.pass.cpp index 50f48e170bc7a..bfebd012b8d0d 100644 --- a/libcxx/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.constructors/ErrorCodeEnum.pass.cpp +++ b/libcxx/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.constructors/ErrorCodeEnum.pass.cpp @@ -33,11 +33,13 @@ make_error_code(testing x) return std::error_code(static_cast(x), std::generic_category()); } -int main() +int main(int, char**) { { std::error_code ec(two); assert(ec.value() == 2); assert(ec.category() == std::generic_category()); } + + return 0; } diff --git a/libcxx/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.constructors/default.pass.cpp b/libcxx/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.constructors/default.pass.cpp index 9d7fbba1dfb1e..3a7249edeae74 100644 --- a/libcxx/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.constructors/default.pass.cpp +++ b/libcxx/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.constructors/default.pass.cpp @@ -15,9 +15,11 @@ #include #include -int main() +int main(int, char**) { std::error_code ec; assert(ec.value() == 0); assert(ec.category() == std::system_category()); + + return 0; } diff --git a/libcxx/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.constructors/int_error_category.pass.cpp b/libcxx/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.constructors/int_error_category.pass.cpp index 99d8f94076841..5a2150fbf7ffb 100644 --- a/libcxx/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.constructors/int_error_category.pass.cpp +++ b/libcxx/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.constructors/int_error_category.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { { std::error_code ec(6, std::system_category()); @@ -27,4 +27,6 @@ int main() assert(ec.value() == 8); assert(ec.category() == std::generic_category()); } + + return 0; } diff --git a/libcxx/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.modifiers/ErrorCodeEnum.pass.cpp b/libcxx/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.modifiers/ErrorCodeEnum.pass.cpp index aa99f4b3a891e..a98e22944568f 100644 --- a/libcxx/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.modifiers/ErrorCodeEnum.pass.cpp +++ b/libcxx/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.modifiers/ErrorCodeEnum.pass.cpp @@ -33,7 +33,7 @@ make_error_code(testing x) return std::error_code(static_cast(x), std::generic_category()); } -int main() +int main(int, char**) { { std::error_code ec; @@ -41,4 +41,6 @@ int main() assert(ec.value() == 2); assert(ec.category() == std::generic_category()); } + + return 0; } diff --git a/libcxx/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.modifiers/assign.pass.cpp b/libcxx/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.modifiers/assign.pass.cpp index 2c06d4b937978..998cfd3545e18 100644 --- a/libcxx/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.modifiers/assign.pass.cpp +++ b/libcxx/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.modifiers/assign.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { { std::error_code ec; @@ -29,4 +29,6 @@ int main() assert(ec.value() == 8); assert(ec.category() == std::generic_category()); } + + return 0; } diff --git a/libcxx/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.modifiers/clear.pass.cpp b/libcxx/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.modifiers/clear.pass.cpp index 523562c8e257b..c4b7eca258a43 100644 --- a/libcxx/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.modifiers/clear.pass.cpp +++ b/libcxx/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.modifiers/clear.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { { std::error_code ec; @@ -26,4 +26,6 @@ int main() assert(ec.value() == 0); assert(ec.category() == std::system_category()); } + + return 0; } diff --git a/libcxx/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.nonmembers/lt.pass.cpp b/libcxx/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.nonmembers/lt.pass.cpp index 98f46eea650d6..9dc37fc342528 100644 --- a/libcxx/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.nonmembers/lt.pass.cpp +++ b/libcxx/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.nonmembers/lt.pass.cpp @@ -16,11 +16,13 @@ #include #include -int main() +int main(int, char**) { { const std::error_code ec1(6, std::generic_category()); const std::error_code ec2(7, std::generic_category()); assert(ec1 < ec2); } + + return 0; } diff --git a/libcxx/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.nonmembers/make_error_code.pass.cpp b/libcxx/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.nonmembers/make_error_code.pass.cpp index 7917de06e59bf..1f4603f7c9872 100644 --- a/libcxx/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.nonmembers/make_error_code.pass.cpp +++ b/libcxx/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.nonmembers/make_error_code.pass.cpp @@ -15,11 +15,13 @@ #include #include -int main() +int main(int, char**) { { std::error_code ec = make_error_code(std::errc::operation_canceled); assert(ec.value() == static_cast(std::errc::operation_canceled)); assert(ec.category() == std::generic_category()); } + + return 0; } diff --git a/libcxx/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.nonmembers/stream_inserter.pass.cpp b/libcxx/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.nonmembers/stream_inserter.pass.cpp index 0828c1fb8e545..37e1d817dbbf5 100644 --- a/libcxx/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.nonmembers/stream_inserter.pass.cpp +++ b/libcxx/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.nonmembers/stream_inserter.pass.cpp @@ -18,9 +18,11 @@ #include #include -int main() +int main(int, char**) { std::ostringstream out; out << std::error_code(std::io_errc::stream); assert(out.str() == "iostream:1"); + + return 0; } diff --git a/libcxx/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.observers/bool.fail.cpp b/libcxx/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.observers/bool.fail.cpp index 6b9838ca73d0b..902e108a1c1b4 100644 --- a/libcxx/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.observers/bool.fail.cpp +++ b/libcxx/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.observers/bool.fail.cpp @@ -22,7 +22,7 @@ bool test_func(void) return ec; // conversion to bool is explicit; should fail. } -int main() +int main(int, char**) { return 0; } diff --git a/libcxx/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.observers/bool.pass.cpp b/libcxx/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.observers/bool.pass.cpp index da226788c21cb..11bea5a344e64 100644 --- a/libcxx/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.observers/bool.pass.cpp +++ b/libcxx/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.observers/bool.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { const std::error_code ec(6, std::generic_category()); @@ -26,4 +26,6 @@ int main() const std::error_code ec(0, std::generic_category()); assert(!static_cast(ec)); } + + return 0; } diff --git a/libcxx/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.observers/category.pass.cpp b/libcxx/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.observers/category.pass.cpp index a2a9ef717b273..16197d934a09f 100644 --- a/libcxx/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.observers/category.pass.cpp +++ b/libcxx/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.observers/category.pass.cpp @@ -15,8 +15,10 @@ #include #include -int main() +int main(int, char**) { const std::error_code ec(6, std::generic_category()); assert(ec.category() == std::generic_category()); + + return 0; } diff --git a/libcxx/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.observers/default_error_condition.pass.cpp b/libcxx/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.observers/default_error_condition.pass.cpp index e7119a3e67114..4c92b488e2054 100644 --- a/libcxx/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.observers/default_error_condition.pass.cpp +++ b/libcxx/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.observers/default_error_condition.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { { const std::error_code ec(6, std::generic_category()); @@ -27,4 +27,6 @@ int main() std::error_condition e_cond = ec.default_error_condition(); assert(e_cond == ec); } + + return 0; } diff --git a/libcxx/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.observers/message.pass.cpp b/libcxx/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.observers/message.pass.cpp index 7482914e6728e..513eeae77d5be 100644 --- a/libcxx/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.observers/message.pass.cpp +++ b/libcxx/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.observers/message.pass.cpp @@ -16,8 +16,10 @@ #include #include -int main() +int main(int, char**) { const std::error_code ec(6, std::generic_category()); assert(ec.message() == std::generic_category().message(6)); + + return 0; } diff --git a/libcxx/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.observers/value.pass.cpp b/libcxx/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.observers/value.pass.cpp index 5e15e06300dbf..f1fcee4146991 100644 --- a/libcxx/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.observers/value.pass.cpp +++ b/libcxx/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.observers/value.pass.cpp @@ -15,8 +15,10 @@ #include #include -int main() +int main(int, char**) { const std::error_code ec(6, std::system_category()); assert(ec.value() == 6); + + return 0; } diff --git a/libcxx/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.overview/types.pass.cpp b/libcxx/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.overview/types.pass.cpp index c5f8650d2f54d..b2441ac974652 100644 --- a/libcxx/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.overview/types.pass.cpp +++ b/libcxx/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.overview/types.pass.cpp @@ -14,10 +14,12 @@ #include #include "test_macros.h" -int main() +int main(int, char**) { std::error_code x; TEST_IGNORE_NODISCARD x.category(); // returns a std::error_category & TEST_IGNORE_NODISCARD x.default_error_condition(); // std::error_condition TEST_IGNORE_NODISCARD x.message(); // returns a std::string + + return 0; } diff --git a/libcxx/test/std/diagnostics/syserr/syserr.errcondition/nothing_to_do.pass.cpp b/libcxx/test/std/diagnostics/syserr/syserr.errcondition/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/diagnostics/syserr/syserr.errcondition/nothing_to_do.pass.cpp +++ b/libcxx/test/std/diagnostics/syserr/syserr.errcondition/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.constructors/ErrorConditionEnum.pass.cpp b/libcxx/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.constructors/ErrorConditionEnum.pass.cpp index 34c3af883d5f2..63e718dda308b 100644 --- a/libcxx/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.constructors/ErrorConditionEnum.pass.cpp +++ b/libcxx/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.constructors/ErrorConditionEnum.pass.cpp @@ -15,11 +15,13 @@ #include #include -int main() +int main(int, char**) { { std::error_condition ec(std::errc::not_a_directory); assert(ec.value() == static_cast(std::errc::not_a_directory)); assert(ec.category() == std::generic_category()); } + + return 0; } diff --git a/libcxx/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.constructors/default.pass.cpp b/libcxx/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.constructors/default.pass.cpp index e303920102e12..f39904a12e8f8 100644 --- a/libcxx/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.constructors/default.pass.cpp +++ b/libcxx/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.constructors/default.pass.cpp @@ -15,9 +15,11 @@ #include #include -int main() +int main(int, char**) { std::error_condition ec; assert(ec.value() == 0); assert(ec.category() == std::generic_category()); + + return 0; } diff --git a/libcxx/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.constructors/int_error_category.pass.cpp b/libcxx/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.constructors/int_error_category.pass.cpp index 82b0de8b6cf55..b30c23f1913fc 100644 --- a/libcxx/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.constructors/int_error_category.pass.cpp +++ b/libcxx/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.constructors/int_error_category.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { { std::error_condition ec(6, std::system_category()); @@ -27,4 +27,6 @@ int main() assert(ec.value() == 8); assert(ec.category() == std::generic_category()); } + + return 0; } diff --git a/libcxx/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.modifiers/ErrorConditionEnum.pass.cpp b/libcxx/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.modifiers/ErrorConditionEnum.pass.cpp index 0cefa6e3283fd..129e30e3fa319 100644 --- a/libcxx/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.modifiers/ErrorConditionEnum.pass.cpp +++ b/libcxx/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.modifiers/ErrorConditionEnum.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { { std::error_condition ec; @@ -23,4 +23,6 @@ int main() assert(ec.value() == static_cast(std::errc::not_enough_memory)); assert(ec.category() == std::generic_category()); } + + return 0; } diff --git a/libcxx/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.modifiers/assign.pass.cpp b/libcxx/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.modifiers/assign.pass.cpp index 44ff3f67eff0e..a0e27ee5e7713 100644 --- a/libcxx/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.modifiers/assign.pass.cpp +++ b/libcxx/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.modifiers/assign.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { { std::error_condition ec; @@ -29,4 +29,6 @@ int main() assert(ec.value() == 8); assert(ec.category() == std::generic_category()); } + + return 0; } diff --git a/libcxx/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.modifiers/clear.pass.cpp b/libcxx/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.modifiers/clear.pass.cpp index 9dd5bf3035f1f..5de51aa954a6e 100644 --- a/libcxx/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.modifiers/clear.pass.cpp +++ b/libcxx/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.modifiers/clear.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { { std::error_condition ec; @@ -26,4 +26,6 @@ int main() assert(ec.value() == 0); assert(ec.category() == std::generic_category()); } + + return 0; } diff --git a/libcxx/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.nonmembers/lt.pass.cpp b/libcxx/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.nonmembers/lt.pass.cpp index ce57687518ed1..f1c24514b60dd 100644 --- a/libcxx/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.nonmembers/lt.pass.cpp +++ b/libcxx/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.nonmembers/lt.pass.cpp @@ -16,11 +16,13 @@ #include #include -int main() +int main(int, char**) { { const std::error_condition ec1(6, std::generic_category()); const std::error_condition ec2(7, std::generic_category()); assert(ec1 < ec2); } + + return 0; } diff --git a/libcxx/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.nonmembers/make_error_condition.pass.cpp b/libcxx/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.nonmembers/make_error_condition.pass.cpp index 6f64e49bfe7f1..e9e65db5965b5 100644 --- a/libcxx/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.nonmembers/make_error_condition.pass.cpp +++ b/libcxx/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.nonmembers/make_error_condition.pass.cpp @@ -15,11 +15,13 @@ #include #include -int main() +int main(int, char**) { { const std::error_condition ec1 = std::make_error_condition(std::errc::message_size); assert(ec1.value() == static_cast(std::errc::message_size)); assert(ec1.category() == std::generic_category()); } + + return 0; } diff --git a/libcxx/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.observers/bool.pass.cpp b/libcxx/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.observers/bool.pass.cpp index 8684393dfd13c..bccdf5fb0ac73 100644 --- a/libcxx/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.observers/bool.pass.cpp +++ b/libcxx/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.observers/bool.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { const std::error_condition ec(6, std::generic_category()); @@ -26,4 +26,6 @@ int main() const std::error_condition ec(0, std::generic_category()); assert(!static_cast(ec)); } + + return 0; } diff --git a/libcxx/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.observers/category.pass.cpp b/libcxx/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.observers/category.pass.cpp index d5bbc94b302f8..f4710a7226c06 100644 --- a/libcxx/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.observers/category.pass.cpp +++ b/libcxx/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.observers/category.pass.cpp @@ -15,8 +15,10 @@ #include #include -int main() +int main(int, char**) { const std::error_condition ec(6, std::generic_category()); assert(ec.category() == std::generic_category()); + + return 0; } diff --git a/libcxx/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.observers/message.pass.cpp b/libcxx/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.observers/message.pass.cpp index c5fc8c60a95d0..e533e84ee4bf6 100644 --- a/libcxx/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.observers/message.pass.cpp +++ b/libcxx/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.observers/message.pass.cpp @@ -16,8 +16,10 @@ #include #include -int main() +int main(int, char**) { const std::error_condition ec(6, std::generic_category()); assert(ec.message() == std::generic_category().message(6)); + + return 0; } diff --git a/libcxx/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.observers/value.pass.cpp b/libcxx/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.observers/value.pass.cpp index 03038e1c83072..d78b1787492ba 100644 --- a/libcxx/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.observers/value.pass.cpp +++ b/libcxx/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.observers/value.pass.cpp @@ -15,8 +15,10 @@ #include #include -int main() +int main(int, char**) { const std::error_condition ec(6, std::system_category()); assert(ec.value() == 6); + + return 0; } diff --git a/libcxx/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.overview/types.pass.cpp b/libcxx/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.overview/types.pass.cpp index f6376d523e375..85a0155d75da6 100644 --- a/libcxx/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.overview/types.pass.cpp +++ b/libcxx/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.overview/types.pass.cpp @@ -14,9 +14,11 @@ #include #include "test_macros.h" -int main() +int main(int, char**) { std::error_condition x = std::errc(0); TEST_IGNORE_NODISCARD x.category(); // returns a std::error_condition & TEST_IGNORE_NODISCARD x.message(); // returns a std::string + + return 0; } diff --git a/libcxx/test/std/diagnostics/syserr/syserr.hash/enabled_hash.pass.cpp b/libcxx/test/std/diagnostics/syserr/syserr.hash/enabled_hash.pass.cpp index 6be7b4e9c126d..c127e900a1ce9 100644 --- a/libcxx/test/std/diagnostics/syserr/syserr.hash/enabled_hash.pass.cpp +++ b/libcxx/test/std/diagnostics/syserr/syserr.hash/enabled_hash.pass.cpp @@ -17,10 +17,12 @@ #include "poisoned_hash_helper.hpp" -int main() { +int main(int, char**) { test_library_hash_specializations_available(); { test_hash_enabled_for_type(); test_hash_enabled_for_type(); } + + return 0; } diff --git a/libcxx/test/std/diagnostics/syserr/syserr.hash/error_code.pass.cpp b/libcxx/test/std/diagnostics/syserr/syserr.hash/error_code.pass.cpp index 0158f3ff31d4f..f8c09775f2329 100644 --- a/libcxx/test/std/diagnostics/syserr/syserr.hash/error_code.pass.cpp +++ b/libcxx/test/std/diagnostics/syserr/syserr.hash/error_code.pass.cpp @@ -36,9 +36,11 @@ test(int i) ((void)result); // Prevent unused warning } -int main() +int main(int, char**) { test(0); test(2); test(10); + + return 0; } diff --git a/libcxx/test/std/diagnostics/syserr/syserr.hash/error_condition.pass.cpp b/libcxx/test/std/diagnostics/syserr/syserr.hash/error_condition.pass.cpp index d651e6d5c6d4e..b9b0057b98fb6 100644 --- a/libcxx/test/std/diagnostics/syserr/syserr.hash/error_condition.pass.cpp +++ b/libcxx/test/std/diagnostics/syserr/syserr.hash/error_condition.pass.cpp @@ -36,9 +36,11 @@ test(int i) ((void)result); // Prevent unused warning } -int main() +int main(int, char**) { test(0); test(2); test(10); + + return 0; } diff --git a/libcxx/test/std/diagnostics/syserr/syserr.syserr/nothing_to_do.pass.cpp b/libcxx/test/std/diagnostics/syserr/syserr.syserr/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/diagnostics/syserr/syserr.syserr/nothing_to_do.pass.cpp +++ b/libcxx/test/std/diagnostics/syserr/syserr.syserr/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/diagnostics/syserr/syserr.syserr/syserr.syserr.members/ctor_error_code.pass.cpp b/libcxx/test/std/diagnostics/syserr/syserr.syserr/syserr.syserr.members/ctor_error_code.pass.cpp index 4d59735fe94cd..3e721c2d2e2ca 100644 --- a/libcxx/test/std/diagnostics/syserr/syserr.syserr/syserr.syserr.members/ctor_error_code.pass.cpp +++ b/libcxx/test/std/diagnostics/syserr/syserr.syserr/syserr.syserr.members/ctor_error_code.pass.cpp @@ -18,11 +18,13 @@ #include #include -int main() +int main(int, char**) { std::system_error se(static_cast(std::errc::not_a_directory), std::generic_category(), "some text"); assert(se.code() == std::make_error_code(std::errc::not_a_directory)); std::string what_message(se.what()); assert(what_message.find("Not a directory") != std::string::npos); + + return 0; } diff --git a/libcxx/test/std/diagnostics/syserr/syserr.syserr/syserr.syserr.members/ctor_error_code_const_char_pointer.pass.cpp b/libcxx/test/std/diagnostics/syserr/syserr.syserr/syserr.syserr.members/ctor_error_code_const_char_pointer.pass.cpp index c2b229a9df9c3..d15ff75bf9c3c 100644 --- a/libcxx/test/std/diagnostics/syserr/syserr.syserr/syserr.syserr.members/ctor_error_code_const_char_pointer.pass.cpp +++ b/libcxx/test/std/diagnostics/syserr/syserr.syserr/syserr.syserr.members/ctor_error_code_const_char_pointer.pass.cpp @@ -18,7 +18,7 @@ #include #include -int main() +int main(int, char**) { std::string what_arg("test message"); std::system_error se(make_error_code(std::errc::not_a_directory), what_arg.c_str()); @@ -26,4 +26,6 @@ int main() std::string what_message(se.what()); assert(what_message.find(what_arg) != std::string::npos); assert(what_message.find("Not a directory") != std::string::npos); + + return 0; } diff --git a/libcxx/test/std/diagnostics/syserr/syserr.syserr/syserr.syserr.members/ctor_error_code_string.pass.cpp b/libcxx/test/std/diagnostics/syserr/syserr.syserr/syserr.syserr.members/ctor_error_code_string.pass.cpp index adca00d1eb635..8e2b078005cae 100644 --- a/libcxx/test/std/diagnostics/syserr/syserr.syserr/syserr.syserr.members/ctor_error_code_string.pass.cpp +++ b/libcxx/test/std/diagnostics/syserr/syserr.syserr/syserr.syserr.members/ctor_error_code_string.pass.cpp @@ -18,7 +18,7 @@ #include #include -int main() +int main(int, char**) { std::string what_arg("test message"); std::system_error se(make_error_code(std::errc::not_a_directory), what_arg); @@ -26,4 +26,6 @@ int main() std::string what_message(se.what()); assert(what_message.find(what_arg) != std::string::npos); assert(what_message.find("Not a directory") != std::string::npos); + + return 0; } diff --git a/libcxx/test/std/diagnostics/syserr/syserr.syserr/syserr.syserr.members/ctor_int_error_category.pass.cpp b/libcxx/test/std/diagnostics/syserr/syserr.syserr/syserr.syserr.members/ctor_int_error_category.pass.cpp index d77d20cfe3c05..b1ac08e666d3e 100644 --- a/libcxx/test/std/diagnostics/syserr/syserr.syserr/syserr.syserr.members/ctor_int_error_category.pass.cpp +++ b/libcxx/test/std/diagnostics/syserr/syserr.syserr/syserr.syserr.members/ctor_int_error_category.pass.cpp @@ -18,11 +18,13 @@ #include #include -int main() +int main(int, char**) { std::system_error se(static_cast(std::errc::not_a_directory), std::generic_category()); assert(se.code() == std::make_error_code(std::errc::not_a_directory)); std::string what_message(se.what()); assert(what_message.find("Not a directory") != std::string::npos); + + return 0; } diff --git a/libcxx/test/std/diagnostics/syserr/syserr.syserr/syserr.syserr.members/ctor_int_error_category_const_char_pointer.pass.cpp b/libcxx/test/std/diagnostics/syserr/syserr.syserr/syserr.syserr.members/ctor_int_error_category_const_char_pointer.pass.cpp index 789fed6b62f98..a6d24326783a3 100644 --- a/libcxx/test/std/diagnostics/syserr/syserr.syserr/syserr.syserr.members/ctor_int_error_category_const_char_pointer.pass.cpp +++ b/libcxx/test/std/diagnostics/syserr/syserr.syserr/syserr.syserr.members/ctor_int_error_category_const_char_pointer.pass.cpp @@ -18,7 +18,7 @@ #include #include -int main() +int main(int, char**) { std::string what_arg("test message"); std::system_error se(static_cast(std::errc::not_a_directory), @@ -27,4 +27,6 @@ int main() std::string what_message(se.what()); assert(what_message.find(what_arg) != std::string::npos); assert(what_message.find("Not a directory") != std::string::npos); + + return 0; } diff --git a/libcxx/test/std/diagnostics/syserr/syserr.syserr/syserr.syserr.members/ctor_int_error_category_string.pass.cpp b/libcxx/test/std/diagnostics/syserr/syserr.syserr/syserr.syserr.members/ctor_int_error_category_string.pass.cpp index 29df242f0e269..913c675b9a16b 100644 --- a/libcxx/test/std/diagnostics/syserr/syserr.syserr/syserr.syserr.members/ctor_int_error_category_string.pass.cpp +++ b/libcxx/test/std/diagnostics/syserr/syserr.syserr/syserr.syserr.members/ctor_int_error_category_string.pass.cpp @@ -18,7 +18,7 @@ #include #include -int main() +int main(int, char**) { std::string what_arg("test message"); std::system_error se(static_cast(std::errc::not_a_directory), @@ -27,4 +27,6 @@ int main() std::string what_message(se.what()); assert(what_message.find(what_arg) != std::string::npos); assert(what_message.find("Not a directory") != std::string::npos); + + return 0; } diff --git a/libcxx/test/std/diagnostics/syserr/syserr.syserr/syserr.syserr.overview/nothing_to_do.pass.cpp b/libcxx/test/std/diagnostics/syserr/syserr.syserr/syserr.syserr.overview/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/diagnostics/syserr/syserr.syserr/syserr.syserr.overview/nothing_to_do.pass.cpp +++ b/libcxx/test/std/diagnostics/syserr/syserr.syserr/syserr.syserr.overview/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/experimental/algorithms/alg.search/search.pass.cpp b/libcxx/test/std/experimental/algorithms/alg.search/search.pass.cpp index 4faa6549ebbe0..45b1f09729b64 100644 --- a/libcxx/test/std/experimental/algorithms/alg.search/search.pass.cpp +++ b/libcxx/test/std/experimental/algorithms/alg.search/search.pass.cpp @@ -35,11 +35,13 @@ struct MySearcher { }; -int main() { +int main(int, char**) { typedef int * RI; static_assert((std::is_same::value), "" ); RI it(nullptr); assert(it == std::experimental::search(it, it, MySearcher())); assert(searcher_called == 1); + + return 0; } diff --git a/libcxx/test/std/experimental/filesystem/fs.req.macros/feature_macro.pass.cpp b/libcxx/test/std/experimental/filesystem/fs.req.macros/feature_macro.pass.cpp index 6c216bd20d3ad..595162d309aa3 100644 --- a/libcxx/test/std/experimental/filesystem/fs.req.macros/feature_macro.pass.cpp +++ b/libcxx/test/std/experimental/filesystem/fs.req.macros/feature_macro.pass.cpp @@ -25,4 +25,6 @@ #endif #endif -int main() { } +int main(int, char**) { + return 0; +} diff --git a/libcxx/test/std/experimental/filesystem/fs.req.namespace/namespace.pass.cpp b/libcxx/test/std/experimental/filesystem/fs.req.namespace/namespace.pass.cpp index 5e1920f893507..87086d4295896 100644 --- a/libcxx/test/std/experimental/filesystem/fs.req.namespace/namespace.pass.cpp +++ b/libcxx/test/std/experimental/filesystem/fs.req.namespace/namespace.pass.cpp @@ -15,9 +15,11 @@ #include #include -int main() { +int main(int, char**) { static_assert(std::is_same< std::experimental::filesystem::path, std::experimental::filesystem::v1::path >::value, ""); + + return 0; } diff --git a/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/default.pass.cpp b/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/default.pass.cpp index 21780ab8076bf..35c5e50bbe721 100644 --- a/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/default.pass.cpp +++ b/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/default.pass.cpp @@ -121,7 +121,9 @@ test2() do_search(Iter1(ij), Iter1(ij+sj), Iter2(ik), Iter2(ik+sk), Iter1(ij+6)); } -int main() { +int main(int, char**) { test, random_access_iterator >(); test2, random_access_iterator >(); + + return 0; } diff --git a/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/hash.pass.cpp b/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/hash.pass.cpp index c1546706ec390..245b3ddfc7f92 100644 --- a/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/hash.pass.cpp +++ b/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/hash.pass.cpp @@ -117,7 +117,9 @@ test2() do_search(Iter1(ih), Iter1(ih+sh), Iter2(ii), Iter2(ii+3), Iter1(ih+3), sh*3); } -int main() { +int main(int, char**) { test, random_access_iterator >(); test2, random_access_iterator >(); + + return 0; } diff --git a/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/hash.pred.pass.cpp b/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/hash.pred.pass.cpp index 0614cb98731cd..ad90954758e38 100644 --- a/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/hash.pred.pass.cpp +++ b/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/hash.pred.pass.cpp @@ -135,7 +135,9 @@ test2() do_search(Iter1(ih), Iter1(ih+sh), Iter2(ii), Iter2(ii+3), Iter1(ih+3), sh*3); } -int main() { +int main(int, char**) { test, random_access_iterator >(); test2, random_access_iterator >(); + + return 0; } diff --git a/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/pred.pass.cpp b/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/pred.pass.cpp index 12ab20cdd4424..a361b90b85267 100644 --- a/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/pred.pass.cpp +++ b/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/pred.pass.cpp @@ -126,7 +126,9 @@ test2() do_search(Iter1(ih), Iter1(ih+sh), Iter2(ii), Iter2(ii+3), Iter1(ih+3), sh*3); } -int main() { +int main(int, char**) { test, random_access_iterator >(); test2, random_access_iterator >(); + + return 0; } diff --git a/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/default.pass.cpp b/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/default.pass.cpp index 0cd6174afce1c..95426f81c88f5 100644 --- a/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/default.pass.cpp +++ b/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/default.pass.cpp @@ -121,7 +121,9 @@ test2() do_search(Iter1(ij), Iter1(ij+sj), Iter2(ik), Iter2(ik+sk), Iter1(ij+6)); } -int main() { +int main(int, char**) { test, random_access_iterator >(); test2, random_access_iterator >(); + + return 0; } diff --git a/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/hash.pass.cpp b/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/hash.pass.cpp index 0fe8420a5185a..151a0f46b4186 100644 --- a/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/hash.pass.cpp +++ b/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/hash.pass.cpp @@ -116,7 +116,9 @@ test2() do_search(Iter1(ih), Iter1(ih+sh), Iter2(ii), Iter2(ii+3), Iter1(ih+3), sh*3); } -int main() { +int main(int, char**) { test, random_access_iterator >(); test2, random_access_iterator >(); + + return 0; } diff --git a/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/hash.pred.pass.cpp b/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/hash.pred.pass.cpp index 916660c1eb060..bcdaa87c4a490 100644 --- a/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/hash.pred.pass.cpp +++ b/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/hash.pred.pass.cpp @@ -129,7 +129,9 @@ test2() do_search(Iter1(ih), Iter1(ih+sh), Iter2(ii), Iter2(ii+3), Iter1(ih+3), sh*3); } -int main() { +int main(int, char**) { test, random_access_iterator >(); test2, random_access_iterator >(); + + return 0; } diff --git a/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/pred.pass.cpp b/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/pred.pass.cpp index 3cdac5ffd374a..06a93c5d7b711 100644 --- a/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/pred.pass.cpp +++ b/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/pred.pass.cpp @@ -123,7 +123,9 @@ test2() do_search(Iter1(ih), Iter1(ih+sh), Iter2(ii), Iter2(ii+3), Iter1(ih+3), sh*3); } -int main() { +int main(int, char**) { test, random_access_iterator >(); test2, random_access_iterator >(); + + return 0; } diff --git a/libcxx/test/std/experimental/func/func.searchers/func.searchers.default/default.pass.cpp b/libcxx/test/std/experimental/func/func.searchers/func.searchers.default/default.pass.cpp index 524bba17d4029..b3f6c66387fcb 100644 --- a/libcxx/test/std/experimental/func/func.searchers/func.searchers.default/default.pass.cpp +++ b/libcxx/test/std/experimental/func/func.searchers/func.searchers.default/default.pass.cpp @@ -82,7 +82,7 @@ test() do_search(Iter1(ij), Iter1(ij+sj), Iter2(ik), Iter2(ik+sk), Iter1(ij+6)); } -int main() { +int main(int, char**) { test, forward_iterator >(); test, bidirectional_iterator >(); test, random_access_iterator >(); @@ -92,4 +92,6 @@ int main() { test, forward_iterator >(); test, bidirectional_iterator >(); test, random_access_iterator >(); + + return 0; } diff --git a/libcxx/test/std/experimental/func/func.searchers/func.searchers.default/default.pred.pass.cpp b/libcxx/test/std/experimental/func/func.searchers/func.searchers.default/default.pred.pass.cpp index a4d0b0730a12e..f1573a2e06728 100644 --- a/libcxx/test/std/experimental/func/func.searchers/func.searchers.default/default.pred.pass.cpp +++ b/libcxx/test/std/experimental/func/func.searchers/func.searchers.default/default.pred.pass.cpp @@ -89,7 +89,7 @@ test() do_search(Iter1(ih), Iter1(ih+sh), Iter2(ii), Iter2(ii+3), Iter1(ih+3), sh*3); } -int main() { +int main(int, char**) { test, forward_iterator >(); test, bidirectional_iterator >(); test, random_access_iterator >(); @@ -99,4 +99,6 @@ int main() { test, forward_iterator >(); test, bidirectional_iterator >(); test, random_access_iterator >(); + + return 0; } diff --git a/libcxx/test/std/experimental/func/func.searchers/func.searchers.default/func.searchers.default.creation/make_default_searcher.pass.cpp b/libcxx/test/std/experimental/func/func.searchers/func.searchers.default/func.searchers.default.creation/make_default_searcher.pass.cpp index 3bf33c808b681..5187569ecf382 100644 --- a/libcxx/test/std/experimental/func/func.searchers/func.searchers.default/func.searchers.default.creation/make_default_searcher.pass.cpp +++ b/libcxx/test/std/experimental/func/func.searchers/func.searchers.default/func.searchers.default.creation/make_default_searcher.pass.cpp @@ -67,7 +67,7 @@ test() do_search(Iter1(ij), Iter1(ij+sj), Iter2(ik), Iter2(ik+sk), Iter1(ij+6)); } -int main() { +int main(int, char**) { test, forward_iterator >(); test, bidirectional_iterator >(); test, random_access_iterator >(); @@ -77,4 +77,6 @@ int main() { test, forward_iterator >(); test, bidirectional_iterator >(); test, random_access_iterator >(); + + return 0; } diff --git a/libcxx/test/std/experimental/func/func.searchers/func.searchers.default/func.searchers.default.creation/make_default_searcher.pred.pass.cpp b/libcxx/test/std/experimental/func/func.searchers/func.searchers.default/func.searchers.default.creation/make_default_searcher.pred.pass.cpp index a827f3d2a4b0e..a6996437ec1f3 100644 --- a/libcxx/test/std/experimental/func/func.searchers/func.searchers.default/func.searchers.default.creation/make_default_searcher.pred.pass.cpp +++ b/libcxx/test/std/experimental/func/func.searchers/func.searchers.default/func.searchers.default.creation/make_default_searcher.pred.pass.cpp @@ -74,7 +74,7 @@ test() do_search(Iter1(ih), Iter1(ih+sh), Iter2(ii), Iter2(ii+3), Iter1(ih+3), sh*3); } -int main() { +int main(int, char**) { test, forward_iterator >(); test, bidirectional_iterator >(); test, random_access_iterator >(); @@ -84,4 +84,6 @@ int main() { test, forward_iterator >(); test, bidirectional_iterator >(); test, random_access_iterator >(); + + return 0; } diff --git a/libcxx/test/std/experimental/func/func.searchers/nothing_to_do.pass.cpp b/libcxx/test/std/experimental/func/func.searchers/nothing_to_do.pass.cpp index 02fe32ece4841..779762e7e995d 100644 --- a/libcxx/test/std/experimental/func/func.searchers/nothing_to_do.pass.cpp +++ b/libcxx/test/std/experimental/func/func.searchers/nothing_to_do.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/experimental/func/header.functional.synop/includes.pass.cpp b/libcxx/test/std/experimental/func/header.functional.synop/includes.pass.cpp index 805d8c8fdc9d1..4b913c2d780e1 100644 --- a/libcxx/test/std/experimental/func/header.functional.synop/includes.pass.cpp +++ b/libcxx/test/std/experimental/func/header.functional.synop/includes.pass.cpp @@ -14,7 +14,9 @@ #include -int main() +int main(int, char**) { std::function x; + + return 0; } diff --git a/libcxx/test/std/experimental/func/nothing_to_do.pass.cpp b/libcxx/test/std/experimental/func/nothing_to_do.pass.cpp index 02fe32ece4841..779762e7e995d 100644 --- a/libcxx/test/std/experimental/func/nothing_to_do.pass.cpp +++ b/libcxx/test/std/experimental/func/nothing_to_do.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/experimental/iterator/nothing_to_do.pass.cpp b/libcxx/test/std/experimental/iterator/nothing_to_do.pass.cpp index 85149549f17dc..782c1a03ee553 100644 --- a/libcxx/test/std/experimental/iterator/nothing_to_do.pass.cpp +++ b/libcxx/test/std/experimental/iterator/nothing_to_do.pass.cpp @@ -8,4 +8,6 @@ #include -int main () {} +int main(int, char**) { + return 0; +} diff --git a/libcxx/test/std/experimental/iterator/ostream.joiner/ostream.joiner.cons/ostream_joiner.cons.pass.cpp b/libcxx/test/std/experimental/iterator/ostream.joiner/ostream.joiner.cons/ostream_joiner.cons.pass.cpp index 869af67bc6276..4e3994f956045 100644 --- a/libcxx/test/std/experimental/iterator/ostream.joiner/ostream.joiner.cons/ostream_joiner.cons.pass.cpp +++ b/libcxx/test/std/experimental/iterator/ostream.joiner/ostream.joiner.cons/ostream_joiner.cons.pass.cpp @@ -24,7 +24,7 @@ namespace exp = std::experimental; -int main () { +int main(int, char**) { const char eight = '8'; const std::string nine = "9"; const std::wstring ten = L"10"; @@ -54,4 +54,6 @@ int main () { { exp::ostream_joiner oj(std::wcout, ten); } { exp::ostream_joiner oj(std::wcout, eleven); } - } + + return 0; +} diff --git a/libcxx/test/std/experimental/iterator/ostream.joiner/ostream.joiner.creation/make_ostream_joiner.pass.cpp b/libcxx/test/std/experimental/iterator/ostream.joiner/ostream.joiner.creation/make_ostream_joiner.pass.cpp index b8e98b9048ff8..a2dab9afbb603 100644 --- a/libcxx/test/std/experimental/iterator/ostream.joiner/ostream.joiner.creation/make_ostream_joiner.pass.cpp +++ b/libcxx/test/std/experimental/iterator/ostream.joiner/ostream.joiner.creation/make_ostream_joiner.pass.cpp @@ -39,7 +39,7 @@ void test (Delim &&d, Iter first, Iter last, const CharT *expected ) { assert(sstream.str() == expected); } -int main () { +int main(int, char**) { const char chars[] = "0123456789"; const int ints [] = { 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 }; @@ -49,4 +49,6 @@ int main () { test('x', ints, ints+10, "10x11x12x13x14x15x16x17x18x19"); test("Z", chars, chars+10, "0Z1Z2Z3Z4Z5Z6Z7Z8Z9"); test("z", ints, ints+10, "10z11z12z13z14z15z16z17z18z19"); - } + + return 0; +} diff --git a/libcxx/test/std/experimental/iterator/ostream.joiner/ostream.joiner.ops/ostream_joiner.op.assign.pass.cpp b/libcxx/test/std/experimental/iterator/ostream.joiner/ostream.joiner.ops/ostream_joiner.op.assign.pass.cpp index 674f2863d6a15..c1bf74afcd5ef 100644 --- a/libcxx/test/std/experimental/iterator/ostream.joiner/ostream.joiner.ops/ostream_joiner.op.assign.pass.cpp +++ b/libcxx/test/std/experimental/iterator/ostream.joiner/ostream.joiner.ops/ostream_joiner.op.assign.pass.cpp @@ -67,7 +67,7 @@ void test (Delim &&d, Iter first, Iter last, const CharT *expected ) { assert(sstream.str() == expected); } -int main () { +int main(int, char**) { { const char chars[] = "0123456789"; const int ints [] = { 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 }; @@ -116,4 +116,6 @@ int main () { test(mutating_delimiter(), chars, chars+10, L"0 1!2\"3#4$5%6&7'8(9"); } + + return 0; } diff --git a/libcxx/test/std/experimental/iterator/ostream.joiner/ostream.joiner.ops/ostream_joiner.op.postincrement.pass.cpp b/libcxx/test/std/experimental/iterator/ostream.joiner/ostream.joiner.ops/ostream_joiner.op.postincrement.pass.cpp index 69d2258b13e82..095020eb63ca9 100644 --- a/libcxx/test/std/experimental/iterator/ostream.joiner/ostream.joiner.ops/ostream_joiner.op.postincrement.pass.cpp +++ b/libcxx/test/std/experimental/iterator/ostream.joiner/ostream.joiner.ops/ostream_joiner.op.postincrement.pass.cpp @@ -31,7 +31,7 @@ void test ( exp::ostream_joiner &oj ) { assert( &ret == &oj ); } -int main () { +int main(int, char**) { { exp::ostream_joiner oj(std::cout, '8'); test(oj); } { exp::ostream_joiner oj(std::cout, std::string("9")); test(oj); } @@ -42,4 +42,6 @@ int main () { { exp::ostream_joiner oj(std::wcout, std::string("9")); test(oj); } { exp::ostream_joiner oj(std::wcout, std::wstring(L"10")); test(oj); } { exp::ostream_joiner oj(std::wcout, 11); test(oj); } - } + + return 0; +} diff --git a/libcxx/test/std/experimental/iterator/ostream.joiner/ostream.joiner.ops/ostream_joiner.op.pretincrement.pass.cpp b/libcxx/test/std/experimental/iterator/ostream.joiner/ostream.joiner.ops/ostream_joiner.op.pretincrement.pass.cpp index e7210ac721fe9..2e305c2ff7c7e 100644 --- a/libcxx/test/std/experimental/iterator/ostream.joiner/ostream.joiner.ops/ostream_joiner.op.pretincrement.pass.cpp +++ b/libcxx/test/std/experimental/iterator/ostream.joiner/ostream.joiner.ops/ostream_joiner.op.pretincrement.pass.cpp @@ -31,7 +31,7 @@ void test ( exp::ostream_joiner &oj ) { assert( &ret == &oj ); } -int main () { +int main(int, char**) { { exp::ostream_joiner oj(std::cout, '8'); test(oj); } { exp::ostream_joiner oj(std::cout, std::string("9")); test(oj); } @@ -42,4 +42,6 @@ int main () { { exp::ostream_joiner oj(std::wcout, std::string("9")); test(oj); } { exp::ostream_joiner oj(std::wcout, std::wstring(L"10")); test(oj); } { exp::ostream_joiner oj(std::wcout, 11); test(oj); } - } + + return 0; +} diff --git a/libcxx/test/std/experimental/iterator/ostream.joiner/ostream.joiner.ops/ostream_joiner.op.star.pass.cpp b/libcxx/test/std/experimental/iterator/ostream.joiner/ostream.joiner.ops/ostream_joiner.op.star.pass.cpp index d9661510bee63..74bf9c3091174 100644 --- a/libcxx/test/std/experimental/iterator/ostream.joiner/ostream.joiner.ops/ostream_joiner.op.star.pass.cpp +++ b/libcxx/test/std/experimental/iterator/ostream.joiner/ostream.joiner.ops/ostream_joiner.op.star.pass.cpp @@ -31,7 +31,7 @@ void test ( exp::ostream_joiner &oj ) { assert( &ret == &oj ); } -int main () { +int main(int, char**) { { exp::ostream_joiner oj(std::cout, '8'); test(oj); } { exp::ostream_joiner oj(std::cout, std::string("9")); test(oj); } @@ -42,4 +42,6 @@ int main () { { exp::ostream_joiner oj(std::wcout, std::string("9")); test(oj); } { exp::ostream_joiner oj(std::wcout, std::wstring(L"10")); test(oj); } { exp::ostream_joiner oj(std::wcout, 11); test(oj); } - } + + return 0; +} diff --git a/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.capacity/operator_bool.pass.cpp b/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.capacity/operator_bool.pass.cpp index 99786488114cd..b3fbd27632e2c 100644 --- a/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.capacity/operator_bool.pass.cpp +++ b/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.capacity/operator_bool.pass.cpp @@ -50,8 +50,10 @@ void do_test() { } } -int main() +int main(int, char**) { do_test>(); do_test>(); + + return 0; } diff --git a/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.compare/equal_comp.pass.cpp b/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.compare/equal_comp.pass.cpp index 8b205ab89159a..f6290fdfa9921 100644 --- a/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.compare/equal_comp.pass.cpp +++ b/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.compare/equal_comp.pass.cpp @@ -44,7 +44,7 @@ void do_test(uintptr_t LHSVal, uintptr_t RHSVal) { } } -int main() +int main(int, char**) { std::pair const TestCases[] = { {0, 0}, @@ -56,4 +56,6 @@ int main() do_test>(TC.first, TC.second); do_test>(TC.first, TC.second); } + + return 0; } diff --git a/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.compare/less_comp.pass.cpp b/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.compare/less_comp.pass.cpp index 428b2e4b09e4b..8152b53f988d5 100644 --- a/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.compare/less_comp.pass.cpp +++ b/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.compare/less_comp.pass.cpp @@ -53,7 +53,7 @@ void do_test(uintptr_t LHSVal, uintptr_t RHSVal) { } } -int main() +int main(int, char**) { std::pair const TestCases[] = { {0, 0}, @@ -65,4 +65,6 @@ int main() do_test>(TC.first, TC.second); do_test>(TC.first, TC.second); } + + return 0; } diff --git a/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.completion/done.pass.cpp b/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.completion/done.pass.cpp index 39c279fe82d0e..14ac3976e1936 100644 --- a/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.completion/done.pass.cpp +++ b/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.completion/done.pass.cpp @@ -36,8 +36,10 @@ void do_test(coro::coroutine_handle const& H) { } } -int main() +int main(int, char**) { do_test(coro::coroutine_handle<>{}); do_test(coro::coroutine_handle{}); + + return 0; } diff --git a/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.con/assign.pass.cpp b/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.con/assign.pass.cpp index da14b4b60f956..2af0b717ea698 100644 --- a/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.con/assign.pass.cpp +++ b/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.con/assign.pass.cpp @@ -46,8 +46,10 @@ void do_test() { } } -int main() +int main(int, char**) { do_test>(); do_test>(); + + return 0; } diff --git a/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.con/construct.pass.cpp b/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.con/construct.pass.cpp index 84fa9314dab8b..7832856c1cf64 100644 --- a/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.con/construct.pass.cpp +++ b/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.con/construct.pass.cpp @@ -45,8 +45,10 @@ void do_test() { } } -int main() +int main(int, char**) { do_test>(); do_test>(); + + return 0; } diff --git a/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.export/address.pass.cpp b/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.export/address.pass.cpp index 6559ad52d7faa..3c63dbbeb30e7 100644 --- a/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.export/address.pass.cpp +++ b/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.export/address.pass.cpp @@ -43,8 +43,10 @@ void do_test() { } } -int main() +int main(int, char**) { do_test>(); do_test>(); + + return 0; } diff --git a/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.export/from_address.fail.cpp b/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.export/from_address.fail.cpp index 9e9490a3ee7b3..e9dd0678f4fdc 100644 --- a/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.export/from_address.fail.cpp +++ b/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.export/from_address.fail.cpp @@ -26,7 +26,7 @@ namespace coro = std::experimental; -int main() +int main(int, char**) { { using H = coro::coroutine_handle<>; @@ -42,4 +42,6 @@ int main() // expected-error@experimental/coroutine:* 1 {{coroutine_handle::from_address cannot be called with non-void pointers}} H::from_address((int*)nullptr); // expected-note {{requested here}} } + + return 0; } diff --git a/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.export/from_address.pass.cpp b/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.export/from_address.pass.cpp index e856ca12ed65d..9c4a647e5fc8d 100644 --- a/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.export/from_address.pass.cpp +++ b/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.export/from_address.pass.cpp @@ -38,8 +38,10 @@ void do_test() { } } -int main() +int main(int, char**) { do_test>(); do_test>(); + + return 0; } diff --git a/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.hash/hash.pass.cpp b/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.hash/hash.pass.cpp index 59c20b84930fd..612380b6de026 100644 --- a/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.hash/hash.pass.cpp +++ b/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.hash/hash.pass.cpp @@ -47,7 +47,7 @@ void do_test(uintptr_t LHSVal, uintptr_t RHSVal) { } } -int main() +int main(int, char**) { std::pair const TestCases[] = { {0, 0}, @@ -59,4 +59,6 @@ int main() do_test>(TC.first, TC.second); do_test>(TC.first, TC.second); } + + return 0; } diff --git a/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.noop/noop_coroutine.pass.cpp b/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.noop/noop_coroutine.pass.cpp index eabf03ef0c7ae..27b83ce02e15f 100644 --- a/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.noop/noop_coroutine.pass.cpp +++ b/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.noop/noop_coroutine.pass.cpp @@ -44,7 +44,7 @@ static_assert(std::is_same base = h; @@ -65,10 +65,12 @@ int main() assert(h.address() == base.address()); assert(h.address() != nullptr); assert(coro::coroutine_handle<>::from_address(h.address()) == base); + + return 0; } #else -int main() {} +int main(int, char**) { return 0; } #endif // __has_builtin(__builtin_coro_noop) diff --git a/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.prom/promise.pass.cpp b/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.prom/promise.pass.cpp index 87e182e03dcb3..0f81fdca85b17 100644 --- a/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.prom/promise.pass.cpp +++ b/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.prom/promise.pass.cpp @@ -75,9 +75,11 @@ void do_test(coro::coroutine_handle&& H) { } } -int main() +int main(int, char**) { do_test(coro::coroutine_handle{}); do_test(coro::coroutine_handle{}); do_runtime_test(); + + return 0; } diff --git a/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.resumption/destroy.pass.cpp b/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.resumption/destroy.pass.cpp index 693e0518fddb9..72ba9fee637e7 100644 --- a/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.resumption/destroy.pass.cpp +++ b/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.resumption/destroy.pass.cpp @@ -53,8 +53,10 @@ void do_test(coro::coroutine_handle&& H) { } } -int main() +int main(int, char**) { do_test(coro::coroutine_handle<>{}); do_test(coro::coroutine_handle{}); + + return 0; } diff --git a/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.resumption/resume.pass.cpp b/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.resumption/resume.pass.cpp index 85d84a4351ee4..a3804ae43a5dc 100644 --- a/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.resumption/resume.pass.cpp +++ b/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.resumption/resume.pass.cpp @@ -72,8 +72,10 @@ void do_test(coro::coroutine_handle&& H) { } } -int main() +int main(int, char**) { do_test(coro::coroutine_handle<>{}); do_test(coro::coroutine_handle{}); + + return 0; } diff --git a/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/void_handle.pass.cpp b/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/void_handle.pass.cpp index a2214ba108ce2..8536e23d4624e 100644 --- a/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/void_handle.pass.cpp +++ b/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/void_handle.pass.cpp @@ -41,10 +41,12 @@ void check_type() { static_assert(std::is_same::value, ""); }; -int main() +int main(int, char**) { check_type(); check_type(); check_type(); check_type(); + + return 0; } diff --git a/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.traits/promise_type.pass.cpp b/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.traits/promise_type.pass.cpp index b06dac41bed44..781f264ffd7ac 100644 --- a/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.traits/promise_type.pass.cpp +++ b/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.traits/promise_type.pass.cpp @@ -60,7 +60,7 @@ void check_no_type() { static_assert(!has_promise_type(), ""); } -int main() +int main(int, char**) { { check_type(); @@ -73,4 +73,6 @@ int main() check_no_type(); check_no_type(); } + + return 0; } diff --git a/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.trivial.awaitables/suspend_always.pass.cpp b/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.trivial.awaitables/suspend_always.pass.cpp index 93ac47196671b..89f1619df6037 100644 --- a/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.trivial.awaitables/suspend_always.pass.cpp +++ b/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.trivial.awaitables/suspend_always.pass.cpp @@ -31,7 +31,7 @@ constexpr bool check_suspend_constexpr() { return true; } -int main() +int main(int, char**) { using H = coro::coroutine_handle<>; using S = SuspendT; @@ -69,4 +69,6 @@ int main() // suppress unused warnings for the global constexpr test variable ((void)constexpr_sa); } + + return 0; } diff --git a/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.trivial.awaitables/suspend_never.pass.cpp b/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.trivial.awaitables/suspend_never.pass.cpp index 2ff4594179689..7986b292649d3 100644 --- a/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.trivial.awaitables/suspend_never.pass.cpp +++ b/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.trivial.awaitables/suspend_never.pass.cpp @@ -33,7 +33,7 @@ constexpr bool check_suspend_constexpr() { } -int main() +int main(int, char**) { using H = coro::coroutine_handle<>; using S = SuspendT; @@ -71,4 +71,6 @@ int main() // suppress unused warnings for the global constexpr test variable ((void)constexpr_sn); } + + return 0; } diff --git a/libcxx/test/std/experimental/language.support/support.coroutines/end.to.end/await_result.pass.cpp b/libcxx/test/std/experimental/language.support/support.coroutines/end.to.end/await_result.pass.cpp index a5ec2075612c3..c540ca9fb3537 100644 --- a/libcxx/test/std/experimental/language.support/support.coroutines/end.to.end/await_result.pass.cpp +++ b/libcxx/test/std/experimental/language.support/support.coroutines/end.to.end/await_result.pass.cpp @@ -59,10 +59,12 @@ coro_t f(int n) { coro_t g() { B val = co_await B{}; } -int main() { +int main(int, char**) { last_value = -1; f(0); assert(last_value == 0); f(1); assert(last_value == 42); + + return 0; } diff --git a/libcxx/test/std/experimental/language.support/support.coroutines/end.to.end/bool_await_suspend.pass.cpp b/libcxx/test/std/experimental/language.support/support.coroutines/end.to.end/bool_await_suspend.pass.cpp index ea30b89771f19..fb15ade8bb2ba 100644 --- a/libcxx/test/std/experimental/language.support/support.coroutines/end.to.end/bool_await_suspend.pass.cpp +++ b/libcxx/test/std/experimental/language.support/support.coroutines/end.to.end/bool_await_suspend.pass.cpp @@ -57,7 +57,7 @@ coro_t g() { g_resumed = true; } -int main() { +int main(int, char**) { assert(!f_started && !f_resumed && !g_started && !g_resumed); auto fret = f(); assert(f_started && !f_resumed); @@ -65,4 +65,6 @@ int main() { assert(f_started && !f_resumed); g(); assert(g_started && g_resumed); + + return 0; } diff --git a/libcxx/test/std/experimental/language.support/support.coroutines/end.to.end/expected.pass.cpp b/libcxx/test/std/experimental/language.support/support.coroutines/end.to.end/expected.pass.cpp index 4358f670038e0..a899092d03478 100644 --- a/libcxx/test/std/experimental/language.support/support.coroutines/end.to.end/expected.pass.cpp +++ b/libcxx/test/std/experimental/language.support/support.coroutines/end.to.end/expected.pass.cpp @@ -75,7 +75,7 @@ expected f2() { co_return 200; } -int main() { +int main(int, char**) { auto c1 = f1(); assert(f1_started && f1_resumed); assert(c1.value() == 100); @@ -85,4 +85,6 @@ int main() { assert(f2_started && !f2_resumed); assert(c2.value() == 0); assert(c2.error() == 42); + + return 0; } diff --git a/libcxx/test/std/experimental/language.support/support.coroutines/end.to.end/fullexpr-dtor.pass.cpp b/libcxx/test/std/experimental/language.support/support.coroutines/end.to.end/fullexpr-dtor.pass.cpp index 62fe61a31756f..87d3c8f9d68ff 100644 --- a/libcxx/test/std/experimental/language.support/support.coroutines/end.to.end/fullexpr-dtor.pass.cpp +++ b/libcxx/test/std/experimental/language.support/support.coroutines/end.to.end/fullexpr-dtor.pass.cpp @@ -108,9 +108,11 @@ coro2 d() { assert(dtor_called == 1); } -int main() { +int main(int, char**) { a(); b(); c(); d(); + + return 0; } diff --git a/libcxx/test/std/experimental/language.support/support.coroutines/end.to.end/generator.pass.cpp b/libcxx/test/std/experimental/language.support/support.coroutines/end.to.end/generator.pass.cpp index e885358d2d8f0..84b4deb9ce454 100644 --- a/libcxx/test/std/experimental/language.support/support.coroutines/end.to.end/generator.pass.cpp +++ b/libcxx/test/std/experimental/language.support/support.coroutines/end.to.end/generator.pass.cpp @@ -95,8 +95,10 @@ void test_mini_generator() { assert(sum == 10); } -int main() { +int main(int, char**) { test_count(); test_range(); test_mini_generator(); + + return 0; } diff --git a/libcxx/test/std/experimental/language.support/support.coroutines/end.to.end/go.pass.cpp b/libcxx/test/std/experimental/language.support/support.coroutines/end.to.end/go.pass.cpp index 18e96b680de2b..994bd87d6de44 100644 --- a/libcxx/test/std/experimental/language.support/support.coroutines/end.to.end/go.pass.cpp +++ b/libcxx/test/std/experimental/language.support/support.coroutines/end.to.end/go.pass.cpp @@ -164,7 +164,7 @@ goroutine pusher(channel& left, channel& right) const int N = 100; channel* c = new channel[N + 1]; -int main() { +int main(int, char**) { for (int i = 0; i < N; ++i) goroutine::go(pusher(c[i], c[i + 1])); @@ -172,4 +172,6 @@ int main() { int result = c[N].sync_pull(); assert(result == 100); + + return 0; } diff --git a/libcxx/test/std/experimental/language.support/support.coroutines/end.to.end/multishot_func.pass.cpp b/libcxx/test/std/experimental/language.support/support.coroutines/end.to.end/multishot_func.pass.cpp index 1b7bdd16106d0..fed97ea2308db 100644 --- a/libcxx/test/std/experimental/language.support/support.coroutines/end.to.end/multishot_func.pass.cpp +++ b/libcxx/test/std/experimental/language.support/support.coroutines/end.to.end/multishot_func.pass.cpp @@ -80,7 +80,9 @@ int Do(int acc, int n, func f) { return acc; } -int main() { +int main(int, char**) { int result = Do(1, 10, [](int a, int b) {return a + b;}); assert(result == 46); + + return 0; } diff --git a/libcxx/test/std/experimental/language.support/support.coroutines/end.to.end/oneshot_func.pass.cpp b/libcxx/test/std/experimental/language.support/support.coroutines/end.to.end/oneshot_func.pass.cpp index 567f438daa595..4bab2dd3bf2f9 100644 --- a/libcxx/test/std/experimental/language.support/support.coroutines/end.to.end/oneshot_func.pass.cpp +++ b/libcxx/test/std/experimental/language.support/support.coroutines/end.to.end/oneshot_func.pass.cpp @@ -72,11 +72,13 @@ float fyield(int x) { yielded_values.push_back(x); return static_cast(x + void Do1(func f) { yield(f()); } void Do2(func f) { yield(static_cast(f())); } -int main() { +int main(int, char**) { Do1([] { return yield(43); }); assert((yielded_values == std::vector{43, 44})); yielded_values = {}; Do2([] { return fyield(44); }); assert((yielded_values == std::vector{44, 46})); + + return 0; } diff --git a/libcxx/test/std/experimental/language.support/support.coroutines/includes.pass.cpp b/libcxx/test/std/experimental/language.support/support.coroutines/includes.pass.cpp index 8fc7b4cc80bb5..440ffa113a13f 100644 --- a/libcxx/test/std/experimental/language.support/support.coroutines/includes.pass.cpp +++ b/libcxx/test/std/experimental/language.support/support.coroutines/includes.pass.cpp @@ -15,10 +15,11 @@ #include -int main(){ +int main(int, char**) { // std::nothrow is not implicitly defined by the compiler when the include is // missing, unlike other parts of . Therefore we use std::nothrow to // test for #include (void)std::nothrow; + return 0; } diff --git a/libcxx/test/std/experimental/lit.local.cfg b/libcxx/test/std/experimental/lit.local.cfg new file mode 100644 index 0000000000000..5e2c6324131be --- /dev/null +++ b/libcxx/test/std/experimental/lit.local.cfg @@ -0,0 +1,3 @@ +# Disable all of the experimental tests if the correct feature is not available. +if 'c++experimental' not in config.available_features: + config.unsupported = True diff --git a/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.ctor/assign.pass.cpp b/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.ctor/assign.pass.cpp index 885137e762e12..35a98b789ef77 100644 --- a/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.ctor/assign.pass.cpp +++ b/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.ctor/assign.pass.cpp @@ -20,9 +20,11 @@ namespace ex = std::experimental::pmr; -int main() +int main(int, char**) { typedef ex::polymorphic_allocator T; static_assert(!std::is_copy_assignable::value, ""); static_assert(!std::is_move_assignable::value, ""); + + return 0; } diff --git a/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.ctor/copy.pass.cpp b/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.ctor/copy.pass.cpp index 1500f641d3ffa..ce3c9be105db9 100644 --- a/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.ctor/copy.pass.cpp +++ b/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.ctor/copy.pass.cpp @@ -20,7 +20,7 @@ namespace ex = std::experimental::pmr; -int main() +int main(int, char**) { typedef ex::polymorphic_allocator A1; { @@ -44,4 +44,6 @@ int main() assert(a.resource() == a2.resource()); assert(a2.resource() == (ex::memory_resource*)42); } + + return 0; } diff --git a/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.ctor/default.pass.cpp b/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.ctor/default.pass.cpp index acec1a02def04..59d234eea1ebf 100644 --- a/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.ctor/default.pass.cpp +++ b/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.ctor/default.pass.cpp @@ -6,7 +6,6 @@ // //===----------------------------------------------------------------------===// -// REQUIRES: c++experimental // UNSUPPORTED: c++98, c++03 // @@ -23,7 +22,7 @@ namespace ex = std::experimental::pmr; -int main() +int main(int, char**) { { static_assert( @@ -45,4 +44,6 @@ int main() assert(a.resource() == &R1); assert(a2.resource() == ex::new_delete_resource()); } + + return 0; } diff --git a/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.ctor/memory_resource_convert.pass.cpp b/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.ctor/memory_resource_convert.pass.cpp index 0e963117d66d2..77748ea122a2c 100644 --- a/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.ctor/memory_resource_convert.pass.cpp +++ b/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.ctor/memory_resource_convert.pass.cpp @@ -22,7 +22,7 @@ namespace ex = std::experimental::pmr; -int main() +int main(int, char**) { { typedef ex::polymorphic_allocator A; @@ -41,4 +41,6 @@ int main() A const a(&R); assert(a.resource() == &R); } + + return 0; } diff --git a/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.ctor/other_alloc.pass.cpp b/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.ctor/other_alloc.pass.cpp index c0a685615ca00..21a56f67b5f9e 100644 --- a/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.ctor/other_alloc.pass.cpp +++ b/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.ctor/other_alloc.pass.cpp @@ -22,7 +22,7 @@ namespace ex = std::experimental::pmr; -int main() +int main(int, char**) { typedef ex::polymorphic_allocator A1; typedef ex::polymorphic_allocator A2; @@ -53,4 +53,6 @@ int main() assert(a.resource() == a2.resource()); assert(a2.resource() == (ex::memory_resource*)42); } + + return 0; } diff --git a/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.eq/equal.pass.cpp b/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.eq/equal.pass.cpp index 84672d3b3404e..8b9c976f86d62 100644 --- a/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.eq/equal.pass.cpp +++ b/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.eq/equal.pass.cpp @@ -6,7 +6,6 @@ // //===----------------------------------------------------------------------===// -// REQUIRES: c++experimental // UNSUPPORTED: c++98, c++03 // @@ -26,7 +25,7 @@ namespace ex = std::experimental::pmr; -int main() +int main(int, char**) { typedef ex::polymorphic_allocator A1; typedef ex::polymorphic_allocator A2; @@ -130,4 +129,6 @@ int main() assert(d1.checkIsEqualCalledEq(0)); assert(d2.checkIsEqualCalledEq(1)); } + + return 0; } diff --git a/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.eq/not_equal.pass.cpp b/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.eq/not_equal.pass.cpp index 7ce6ec1fc5e08..e6489be2c36b7 100644 --- a/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.eq/not_equal.pass.cpp +++ b/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.eq/not_equal.pass.cpp @@ -6,7 +6,6 @@ // //===----------------------------------------------------------------------===// -// REQUIRES: c++experimental // UNSUPPORTED: c++98, c++03 // @@ -26,7 +25,7 @@ namespace ex = std::experimental::pmr; -int main() +int main(int, char**) { typedef ex::polymorphic_allocator A1; typedef ex::polymorphic_allocator A2; @@ -101,4 +100,6 @@ int main() assert(d1.checkIsEqualCalledEq(0)); assert(d2.checkIsEqualCalledEq(1)); } + + return 0; } diff --git a/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/allocate.pass.cpp b/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/allocate.pass.cpp index a489e865c67a8..af51ffc82ff03 100644 --- a/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/allocate.pass.cpp +++ b/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/allocate.pass.cpp @@ -6,7 +6,6 @@ // //===----------------------------------------------------------------------===// -// REQUIRES: c++experimental // UNSUPPORTED: c++98, c++03 // @@ -80,7 +79,7 @@ void testAllocForSizeThrows() { } #endif // TEST_HAS_NO_EXCEPTIONS -int main() +int main(int, char**) { { ex::polymorphic_allocator a; @@ -108,4 +107,6 @@ int main() testAllocForSizeThrows<13>(); } #endif + + return 0; } diff --git a/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/construct_pair.pass.cpp b/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/construct_pair.pass.cpp index 66a072fb2db86..4102fa93aa101 100644 --- a/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/construct_pair.pass.cpp +++ b/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/construct_pair.pass.cpp @@ -6,7 +6,6 @@ // //===----------------------------------------------------------------------===// -// REQUIRES: c++experimental // UNSUPPORTED: c++98, c++03 // @@ -34,7 +33,7 @@ struct default_constructible int x{0}; }; -int main() +int main(int, char**) { // pair as T() { @@ -49,4 +48,6 @@ int main() assert(ptr->second.x == 42); std::free(ptr); } + + return 0; } diff --git a/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/construct_pair_const_lvalue_pair.pass.cpp b/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/construct_pair_const_lvalue_pair.pass.cpp index 16309d6626af1..3b97ec30477d3 100644 --- a/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/construct_pair_const_lvalue_pair.pass.cpp +++ b/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/construct_pair_const_lvalue_pair.pass.cpp @@ -6,7 +6,6 @@ // //===----------------------------------------------------------------------===// -// REQUIRES: c++experimental // UNSUPPORTED: c++98, c++03 // @@ -118,7 +117,7 @@ void test_pmr_not_uses_allocator(std::pair const& p) template struct Print; -int main() +int main(int, char**) { using ERT = std::experimental::erased_type; using PMR = ex::memory_resource*; @@ -139,4 +138,6 @@ int main() test_pmr_not_uses_allocator(p); test_pmr_uses_allocator(p); } + + return 0; } diff --git a/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/construct_pair_rvalue.pass.cpp b/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/construct_pair_rvalue.pass.cpp index 91e96cf398263..5e0597e25680f 100644 --- a/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/construct_pair_rvalue.pass.cpp +++ b/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/construct_pair_rvalue.pass.cpp @@ -6,7 +6,6 @@ // //===----------------------------------------------------------------------===// -// REQUIRES: c++experimental // UNSUPPORTED: c++98, c++03 // @@ -114,7 +113,7 @@ void test_pmr_not_uses_allocator(std::pair&& p) } } -int main() +int main(int, char**) { using ERT = std::experimental::erased_type; using PMR = ex::memory_resource*; @@ -135,4 +134,6 @@ int main() test_pmr_not_uses_allocator(std::move(p)); test_pmr_uses_allocator(std::move(p)); } + + return 0; } diff --git a/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/construct_pair_values.pass.cpp b/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/construct_pair_values.pass.cpp index d6fa37b8480d8..1eaae061c26ea 100644 --- a/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/construct_pair_values.pass.cpp +++ b/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/construct_pair_values.pass.cpp @@ -6,7 +6,6 @@ // //===----------------------------------------------------------------------===// -// REQUIRES: c++experimental // UNSUPPORTED: c++98, c++03 // @@ -121,7 +120,7 @@ void test_pmr_not_uses_allocator(TT&& t, UU&& u) } } -int main() +int main(int, char**) { using ERT = std::experimental::erased_type; using PMR = ex::memory_resource*; @@ -140,4 +139,6 @@ int main() test_pmr_not_uses_allocator(std::move(x), y); test_pmr_uses_allocator(std::move(x), y); } + + return 0; } diff --git a/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/construct_piecewise_pair.pass.cpp b/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/construct_piecewise_pair.pass.cpp index f043c301e01d5..f75bd9e985562 100644 --- a/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/construct_piecewise_pair.pass.cpp +++ b/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/construct_piecewise_pair.pass.cpp @@ -6,7 +6,6 @@ // //===----------------------------------------------------------------------===// -// REQUIRES: c++experimental // UNSUPPORTED: c++98, c++03 // @@ -111,7 +110,7 @@ void test_pmr_not_uses_allocator(std::tuple ttuple, std::tuple( t1, std::move(t2)); test_pmr_uses_allocator(std::move(t2), t1); } + + return 0; } diff --git a/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/construct_piecewise_pair_evil.pass.cpp b/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/construct_piecewise_pair_evil.pass.cpp index dc19ae170fb5f..fbe2ea3250e3f 100644 --- a/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/construct_piecewise_pair_evil.pass.cpp +++ b/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/construct_piecewise_pair_evil.pass.cpp @@ -6,7 +6,6 @@ // //===----------------------------------------------------------------------===// -// REQUIRES: c++experimental // UNSUPPORTED: c++98, c++03 // @@ -120,7 +119,7 @@ void test_evil() } } -int main() +int main(int, char**) { test_evil(); test_evil(); @@ -138,4 +137,6 @@ int main() test_evil(); test_evil(); test_evil(); + + return 0; } diff --git a/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/construct_types.pass.cpp b/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/construct_types.pass.cpp index adfe683e23fae..0afc53ba4ca3c 100644 --- a/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/construct_types.pass.cpp +++ b/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/construct_types.pass.cpp @@ -6,7 +6,6 @@ // //===----------------------------------------------------------------------===// -// REQUIRES: c++experimental // UNSUPPORTED: c++98, c++03 // @@ -187,7 +186,7 @@ void test_non_pmr_uses_alloc(AllocObj const& A, Args&&... args) } } -int main() +int main(int, char**) { using ET = std::experimental::erased_type; using PMR = ex::memory_resource*; @@ -223,4 +222,6 @@ int main() test_non_pmr_uses_alloc(std_alloc, cvalue, std::move(value)); test_non_pmr_uses_alloc(test_alloc, cvalue, std::move(value)); } + + return 0; } diff --git a/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/deallocate.pass.cpp b/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/deallocate.pass.cpp index 8dadb1773daa1..9de134008c46b 100644 --- a/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/deallocate.pass.cpp +++ b/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/deallocate.pass.cpp @@ -6,7 +6,6 @@ // //===----------------------------------------------------------------------===// -// REQUIRES: c++experimental // UNSUPPORTED: c++98, c++03 // @@ -41,7 +40,7 @@ void testForSizeAndAlign() { } } -int main() +int main(int, char**) { { ex::polymorphic_allocator a; @@ -58,4 +57,6 @@ int main() testForSizeAndAlign<73, MA>(); testForSizeAndAlign<13, MA>(); } + + return 0; } diff --git a/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/destroy.pass.cpp b/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/destroy.pass.cpp index 75c04c53c9113..2f6853c7848ed 100644 --- a/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/destroy.pass.cpp +++ b/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/destroy.pass.cpp @@ -6,7 +6,6 @@ // //===----------------------------------------------------------------------===// -// REQUIRES: c++experimental // UNSUPPORTED: c++98, c++03 // @@ -32,7 +31,7 @@ struct destroyable ~destroyable() { --count; } }; -int main() +int main(int, char**) { typedef ex::polymorphic_allocator A; { @@ -48,4 +47,6 @@ int main() assert(count == 0); std::free(ptr); } + + return 0; } diff --git a/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/resource.pass.cpp b/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/resource.pass.cpp index 11d392f5939d3..0883b2c5102c3 100644 --- a/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/resource.pass.cpp +++ b/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/resource.pass.cpp @@ -6,7 +6,6 @@ // //===----------------------------------------------------------------------===// -// REQUIRES: c++experimental // UNSUPPORTED: c++98, c++03 // @@ -22,7 +21,7 @@ namespace ex = std::experimental::pmr; -int main() +int main(int, char**) { typedef ex::polymorphic_allocator A; { @@ -53,4 +52,6 @@ int main() assert(a.resource() == mptr); assert(a.resource() == ex::get_default_resource()); } + + return 0; } diff --git a/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/select_on_container_copy_construction.pass.cpp b/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/select_on_container_copy_construction.pass.cpp index 7c7c07d5250dc..9998e58efba87 100644 --- a/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/select_on_container_copy_construction.pass.cpp +++ b/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/select_on_container_copy_construction.pass.cpp @@ -6,7 +6,6 @@ // //===----------------------------------------------------------------------===// -// REQUIRES: c++experimental // UNSUPPORTED: c++98, c++03 // @@ -22,7 +21,7 @@ namespace ex = std::experimental::pmr; -int main() +int main(int, char**) { typedef ex::polymorphic_allocator A; { @@ -49,4 +48,6 @@ int main() assert(other.resource() == mptr); assert(a.resource() == nullptr); } + + return 0; } diff --git a/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.overview/nothing_to_do.pass.cpp b/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.overview/nothing_to_do.pass.cpp index 98c4bdd4f1c1f..796f3c353ba17 100644 --- a/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.overview/nothing_to_do.pass.cpp +++ b/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.overview/nothing_to_do.pass.cpp @@ -6,4 +6,6 @@ // //===----------------------------------------------------------------------===// -int main () {} +int main(int, char**) { + return 0; +} diff --git a/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/nothing_to_do.pass.cpp b/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/nothing_to_do.pass.cpp index 98c4bdd4f1c1f..796f3c353ba17 100644 --- a/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/nothing_to_do.pass.cpp +++ b/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/nothing_to_do.pass.cpp @@ -6,4 +6,6 @@ // //===----------------------------------------------------------------------===// -int main () {} +int main(int, char**) { + return 0; +} diff --git a/libcxx/test/std/experimental/memory/memory.resource.adaptor/memory.resource.adaptor.ctor/alloc_copy.pass.cpp b/libcxx/test/std/experimental/memory/memory.resource.adaptor/memory.resource.adaptor.ctor/alloc_copy.pass.cpp index 09249219f40f3..4466b2b4e5155 100644 --- a/libcxx/test/std/experimental/memory/memory.resource.adaptor/memory.resource.adaptor.ctor/alloc_copy.pass.cpp +++ b/libcxx/test/std/experimental/memory/memory.resource.adaptor/memory.resource.adaptor.ctor/alloc_copy.pass.cpp @@ -21,7 +21,7 @@ namespace ex = std::experimental::pmr; -int main() +int main(int, char**) { typedef CountingAllocator AllocT; typedef ex::resource_adaptor R; @@ -49,4 +49,6 @@ int main() assert(P.move_constructed == 0); assert(r.get_allocator() == a); } + + return 0; } diff --git a/libcxx/test/std/experimental/memory/memory.resource.adaptor/memory.resource.adaptor.ctor/alloc_move.pass.cpp b/libcxx/test/std/experimental/memory/memory.resource.adaptor/memory.resource.adaptor.ctor/alloc_move.pass.cpp index df54ba503aa15..b6af8515100cb 100644 --- a/libcxx/test/std/experimental/memory/memory.resource.adaptor/memory.resource.adaptor.ctor/alloc_move.pass.cpp +++ b/libcxx/test/std/experimental/memory/memory.resource.adaptor/memory.resource.adaptor.ctor/alloc_move.pass.cpp @@ -21,7 +21,7 @@ namespace ex = std::experimental::pmr; -int main() +int main(int, char**) { typedef CountingAllocator AllocT; typedef ex::resource_adaptor R; @@ -40,4 +40,6 @@ int main() assert(P.move_constructed == 1); assert(r.get_allocator() == AllocT{P}); } + + return 0; } diff --git a/libcxx/test/std/experimental/memory/memory.resource.adaptor/memory.resource.adaptor.ctor/default.pass.cpp b/libcxx/test/std/experimental/memory/memory.resource.adaptor/memory.resource.adaptor.ctor/default.pass.cpp index 5550e4fa519a1..53481ab39f215 100644 --- a/libcxx/test/std/experimental/memory/memory.resource.adaptor/memory.resource.adaptor.ctor/default.pass.cpp +++ b/libcxx/test/std/experimental/memory/memory.resource.adaptor/memory.resource.adaptor.ctor/default.pass.cpp @@ -23,7 +23,7 @@ namespace ex = std::experimental::pmr; -int main() +int main(int, char**) { { typedef CountingAllocator AllocT; // Not default constructible @@ -36,4 +36,6 @@ int main() static_assert(std::is_default_constructible::value, ""); R r; ((void)r); } + + return 0; } diff --git a/libcxx/test/std/experimental/memory/memory.resource.adaptor/memory.resource.adaptor.mem/do_allocate_and_deallocate.pass.cpp b/libcxx/test/std/experimental/memory/memory.resource.adaptor/memory.resource.adaptor.mem/do_allocate_and_deallocate.pass.cpp index b2dc3aae18c33..f88d6fcc2d497 100644 --- a/libcxx/test/std/experimental/memory/memory.resource.adaptor/memory.resource.adaptor.mem/do_allocate_and_deallocate.pass.cpp +++ b/libcxx/test/std/experimental/memory/memory.resource.adaptor/memory.resource.adaptor.mem/do_allocate_and_deallocate.pass.cpp @@ -15,6 +15,10 @@ // void * do_allocate(size_t size, size_t align) // void do_deallocate(void*, size_t, size_t) +// When back-deploying to macosx10.7, the RTTI for exception classes +// incorrectly provided by libc++.dylib is mixed with the one in +// libc++abi.dylib and exceptions are not caught properly. +// XFAIL: with_system_cxx_lib=macosx10.7 #include #include @@ -106,9 +110,11 @@ void check_alloc_max_size() { #endif } -int main() +int main(int, char**) { check_allocate_deallocate>(); check_allocate_deallocate>(); check_alloc_max_size(); + + return 0; } diff --git a/libcxx/test/std/experimental/memory/memory.resource.adaptor/memory.resource.adaptor.mem/do_is_equal.pass.cpp b/libcxx/test/std/experimental/memory/memory.resource.adaptor/memory.resource.adaptor.mem/do_is_equal.pass.cpp index baa8e17c52f08..71c36693c3c77 100644 --- a/libcxx/test/std/experimental/memory/memory.resource.adaptor/memory.resource.adaptor.mem/do_is_equal.pass.cpp +++ b/libcxx/test/std/experimental/memory/memory.resource.adaptor/memory.resource.adaptor.mem/do_is_equal.pass.cpp @@ -23,7 +23,7 @@ using std::size_t; namespace ex = std::experimental::pmr; -int main() +int main(int, char**) { typedef CountingAllocator Alloc1; @@ -79,4 +79,6 @@ int main() assert(!m1.is_equal(m2)); assert(!m2.is_equal(m1)); } + + return 0; } diff --git a/libcxx/test/std/experimental/memory/memory.resource.adaptor/memory.resource.adaptor.overview/overview.pass.cpp b/libcxx/test/std/experimental/memory/memory.resource.adaptor/memory.resource.adaptor.overview/overview.pass.cpp index a47968e905a89..873dfd9391cc8 100644 --- a/libcxx/test/std/experimental/memory/memory.resource.adaptor/memory.resource.adaptor.overview/overview.pass.cpp +++ b/libcxx/test/std/experimental/memory/memory.resource.adaptor/memory.resource.adaptor.overview/overview.pass.cpp @@ -19,7 +19,7 @@ namespace ex = std::experimental::pmr; -int main() +int main(int, char**) { typedef ex::resource_adaptor> R; typedef ex::resource_adaptor> R2; @@ -35,4 +35,6 @@ int main() static_assert(std::is_copy_assignable::value, ""); static_assert(std::is_move_assignable::value, ""); } + + return 0; } diff --git a/libcxx/test/std/experimental/memory/memory.resource.aliases/header_deque_synop.pass.cpp b/libcxx/test/std/experimental/memory/memory.resource.aliases/header_deque_synop.pass.cpp index 80e3c6e2e5dc8..6b5a3fbd54231 100644 --- a/libcxx/test/std/experimental/memory/memory.resource.aliases/header_deque_synop.pass.cpp +++ b/libcxx/test/std/experimental/memory/memory.resource.aliases/header_deque_synop.pass.cpp @@ -7,7 +7,6 @@ // //===----------------------------------------------------------------------===// -// REQUIRES: c++experimental // UNSUPPORTED: c++98, c++03 // @@ -26,11 +25,13 @@ namespace pmr = std::experimental::pmr; -int main() +int main(int, char**) { using StdDeque = std::deque>; using PmrDeque = pmr::deque; static_assert(std::is_same::value, ""); PmrDeque d; assert(d.get_allocator().resource() == pmr::get_default_resource()); + + return 0; } diff --git a/libcxx/test/std/experimental/memory/memory.resource.aliases/header_forward_list_synop.pass.cpp b/libcxx/test/std/experimental/memory/memory.resource.aliases/header_forward_list_synop.pass.cpp index 5fc71fb9a1801..5104c44dc7291 100644 --- a/libcxx/test/std/experimental/memory/memory.resource.aliases/header_forward_list_synop.pass.cpp +++ b/libcxx/test/std/experimental/memory/memory.resource.aliases/header_forward_list_synop.pass.cpp @@ -7,7 +7,6 @@ // //===----------------------------------------------------------------------===// -// REQUIRES: c++experimental // UNSUPPORTED: c++98, c++03 // @@ -26,11 +25,13 @@ namespace pmr = std::experimental::pmr; -int main() +int main(int, char**) { using StdForwardList = std::forward_list>; using PmrForwardList = pmr::forward_list; static_assert(std::is_same::value, ""); PmrForwardList d; assert(d.get_allocator().resource() == pmr::get_default_resource()); + + return 0; } diff --git a/libcxx/test/std/experimental/memory/memory.resource.aliases/header_list_synop.pass.cpp b/libcxx/test/std/experimental/memory/memory.resource.aliases/header_list_synop.pass.cpp index 3a13f13038980..e865e28f3b317 100644 --- a/libcxx/test/std/experimental/memory/memory.resource.aliases/header_list_synop.pass.cpp +++ b/libcxx/test/std/experimental/memory/memory.resource.aliases/header_list_synop.pass.cpp @@ -7,7 +7,6 @@ // //===----------------------------------------------------------------------===// -// REQUIRES: c++experimental // UNSUPPORTED: c++98, c++03 // @@ -26,11 +25,13 @@ namespace pmr = std::experimental::pmr; -int main() +int main(int, char**) { using StdList = std::list>; using PmrList = pmr::list; static_assert(std::is_same::value, ""); PmrList d; assert(d.get_allocator().resource() == pmr::get_default_resource()); + + return 0; } diff --git a/libcxx/test/std/experimental/memory/memory.resource.aliases/header_map_synop.pass.cpp b/libcxx/test/std/experimental/memory/memory.resource.aliases/header_map_synop.pass.cpp index 507aaf7b7bc9a..bb3016f9315a2 100644 --- a/libcxx/test/std/experimental/memory/memory.resource.aliases/header_map_synop.pass.cpp +++ b/libcxx/test/std/experimental/memory/memory.resource.aliases/header_map_synop.pass.cpp @@ -7,7 +7,6 @@ // //===----------------------------------------------------------------------===// -// REQUIRES: c++experimental // UNSUPPORTED: c++98, c++03 // @@ -30,7 +29,7 @@ namespace pmr = std::experimental::pmr; -int main() +int main(int, char**) { using K = int; using V = char; @@ -65,4 +64,6 @@ int main() pmr::multimap m; assert(m.get_allocator().resource() == pmr::get_default_resource()); } + + return 0; } diff --git a/libcxx/test/std/experimental/memory/memory.resource.aliases/header_regex_synop.pass.cpp b/libcxx/test/std/experimental/memory/memory.resource.aliases/header_regex_synop.pass.cpp index ffc6f4239d53d..d0f62e57f3cd8 100644 --- a/libcxx/test/std/experimental/memory/memory.resource.aliases/header_regex_synop.pass.cpp +++ b/libcxx/test/std/experimental/memory/memory.resource.aliases/header_regex_synop.pass.cpp @@ -7,7 +7,6 @@ // //===----------------------------------------------------------------------===// -// REQUIRES: c++experimental // UNSUPPORTED: c++98, c++03 // @@ -40,7 +39,7 @@ void test_match_result_typedef() { static_assert(std::is_same::value, ""); } -int main() +int main(int, char**) { { test_match_result_typedef(); @@ -53,4 +52,6 @@ int main() pmr::smatch s; assert(s.get_allocator().resource() == pmr::get_default_resource()); } + + return 0; } diff --git a/libcxx/test/std/experimental/memory/memory.resource.aliases/header_set_synop.pass.cpp b/libcxx/test/std/experimental/memory/memory.resource.aliases/header_set_synop.pass.cpp index 42b6f33ebce11..3bfd5fd6a2352 100644 --- a/libcxx/test/std/experimental/memory/memory.resource.aliases/header_set_synop.pass.cpp +++ b/libcxx/test/std/experimental/memory/memory.resource.aliases/header_set_synop.pass.cpp @@ -7,7 +7,6 @@ // //===----------------------------------------------------------------------===// -// REQUIRES: c++experimental // UNSUPPORTED: c++98, c++03 // @@ -30,7 +29,7 @@ namespace pmr = std::experimental::pmr; -int main() +int main(int, char**) { using V = char; using DC = std::less; @@ -63,4 +62,6 @@ int main() pmr::multiset m; assert(m.get_allocator().resource() == pmr::get_default_resource()); } + + return 0; } diff --git a/libcxx/test/std/experimental/memory/memory.resource.aliases/header_string_synop.pass.cpp b/libcxx/test/std/experimental/memory/memory.resource.aliases/header_string_synop.pass.cpp index 081466dbc7714..b3fdbde6d3e92 100644 --- a/libcxx/test/std/experimental/memory/memory.resource.aliases/header_string_synop.pass.cpp +++ b/libcxx/test/std/experimental/memory/memory.resource.aliases/header_string_synop.pass.cpp @@ -7,7 +7,6 @@ // //===----------------------------------------------------------------------===// -// REQUIRES: c++experimental // UNSUPPORTED: c++98, c++03 // @@ -50,7 +49,7 @@ void test_basic_string_alias() { static_assert(std::is_same::value, ""); } -int main() +int main(int, char**) { { test_string_typedef(); @@ -69,4 +68,6 @@ int main() pmr::string s; assert(s.get_allocator().resource() == pmr::get_default_resource()); } + + return 0; } diff --git a/libcxx/test/std/experimental/memory/memory.resource.aliases/header_unordered_map_synop.pass.cpp b/libcxx/test/std/experimental/memory/memory.resource.aliases/header_unordered_map_synop.pass.cpp index 190cfd40fecde..60a7c5c73666f 100644 --- a/libcxx/test/std/experimental/memory/memory.resource.aliases/header_unordered_map_synop.pass.cpp +++ b/libcxx/test/std/experimental/memory/memory.resource.aliases/header_unordered_map_synop.pass.cpp @@ -7,7 +7,6 @@ // //===----------------------------------------------------------------------===// -// REQUIRES: c++experimental // UNSUPPORTED: c++98, c++03 // @@ -36,7 +35,7 @@ struct MyHash : std::hash {}; template struct MyPred : std::equal_to {}; -int main() +int main(int, char**) { using K = int; using V = char; @@ -83,4 +82,6 @@ int main() pmr::unordered_multimap m; assert(m.get_allocator().resource() == pmr::get_default_resource()); } + + return 0; } diff --git a/libcxx/test/std/experimental/memory/memory.resource.aliases/header_unordered_set_synop.pass.cpp b/libcxx/test/std/experimental/memory/memory.resource.aliases/header_unordered_set_synop.pass.cpp index 7a795d08fae8e..a090c2efa3bdb 100644 --- a/libcxx/test/std/experimental/memory/memory.resource.aliases/header_unordered_set_synop.pass.cpp +++ b/libcxx/test/std/experimental/memory/memory.resource.aliases/header_unordered_set_synop.pass.cpp @@ -7,7 +7,6 @@ // //===----------------------------------------------------------------------===// -// REQUIRES: c++experimental // UNSUPPORTED: c++98, c++03 // @@ -36,7 +35,7 @@ struct MyHash : std::hash {}; template struct MyPred : std::equal_to {}; -int main() +int main(int, char**) { using V = char; using DH = std::hash; @@ -81,4 +80,6 @@ int main() pmr::unordered_multiset m; assert(m.get_allocator().resource() == pmr::get_default_resource()); } + + return 0; } diff --git a/libcxx/test/std/experimental/memory/memory.resource.aliases/header_vector_synop.pass.cpp b/libcxx/test/std/experimental/memory/memory.resource.aliases/header_vector_synop.pass.cpp index ea8d11e147304..9cedde94b0e25 100644 --- a/libcxx/test/std/experimental/memory/memory.resource.aliases/header_vector_synop.pass.cpp +++ b/libcxx/test/std/experimental/memory/memory.resource.aliases/header_vector_synop.pass.cpp @@ -7,7 +7,6 @@ // //===----------------------------------------------------------------------===// -// REQUIRES: c++experimental // UNSUPPORTED: c++98, c++03 // @@ -26,11 +25,13 @@ namespace pmr = std::experimental::pmr; -int main() +int main(int, char**) { using StdVector = std::vector>; using PmrVector = pmr::vector; static_assert(std::is_same::value, ""); PmrVector d; assert(d.get_allocator().resource() == pmr::get_default_resource()); + + return 0; } diff --git a/libcxx/test/std/experimental/memory/memory.resource.global/default_resource.pass.cpp b/libcxx/test/std/experimental/memory/memory.resource.global/default_resource.pass.cpp index 91a9027a2cc36..df32a4dcf64a8 100644 --- a/libcxx/test/std/experimental/memory/memory.resource.global/default_resource.pass.cpp +++ b/libcxx/test/std/experimental/memory/memory.resource.global/default_resource.pass.cpp @@ -6,7 +6,6 @@ // //===----------------------------------------------------------------------===// -// REQUIRES: c++experimental // UNSUPPORTED: c++98, c++03 // @@ -36,7 +35,7 @@ using namespace std::experimental::pmr; -int main() { +int main(int, char**) { TestResource R; { // Test (A) and (B) memory_resource* p = get_default_resource(); @@ -70,4 +69,6 @@ int main() { static_assert(noexcept(set_default_resource(nullptr)), "set_default_resource() must be noexcept"); } + + return 0; } diff --git a/libcxx/test/std/experimental/memory/memory.resource.global/new_delete_resource.pass.cpp b/libcxx/test/std/experimental/memory/memory.resource.global/new_delete_resource.pass.cpp index 958490d78c613..ab0fedcb8f72f 100644 --- a/libcxx/test/std/experimental/memory/memory.resource.global/new_delete_resource.pass.cpp +++ b/libcxx/test/std/experimental/memory/memory.resource.global/new_delete_resource.pass.cpp @@ -6,7 +6,6 @@ // //===----------------------------------------------------------------------===// -// REQUIRES: c++experimental // UNSUPPORTED: c++98, c++03 // @@ -92,10 +91,12 @@ void test_allocate_deallocate() } -int main() +int main(int, char**) { static_assert(noexcept(ex::new_delete_resource()), "Must be noexcept"); test_return(); test_equality(); test_allocate_deallocate(); + + return 0; } diff --git a/libcxx/test/std/experimental/memory/memory.resource.global/null_memory_resource.pass.cpp b/libcxx/test/std/experimental/memory/memory.resource.global/null_memory_resource.pass.cpp index aab29728f8f67..5afbaf4204fa2 100644 --- a/libcxx/test/std/experimental/memory/memory.resource.global/null_memory_resource.pass.cpp +++ b/libcxx/test/std/experimental/memory/memory.resource.global/null_memory_resource.pass.cpp @@ -6,7 +6,6 @@ // //===----------------------------------------------------------------------===// -// REQUIRES: c++experimental // UNSUPPORTED: c++98, c++03 // @@ -108,10 +107,12 @@ void test_deallocate() assert(globalMemCounter.checkDeleteArrayCalledEq(0)); } -int main() +int main(int, char**) { test_return(); test_equality(); test_allocate(); test_deallocate(); + + return 0; } diff --git a/libcxx/test/std/experimental/memory/memory.resource.synop/nothing_to_do.pass.cpp b/libcxx/test/std/experimental/memory/memory.resource.synop/nothing_to_do.pass.cpp index 02fe32ece4841..779762e7e995d 100644 --- a/libcxx/test/std/experimental/memory/memory.resource.synop/nothing_to_do.pass.cpp +++ b/libcxx/test/std/experimental/memory/memory.resource.synop/nothing_to_do.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/experimental/memory/memory.resource/construct.fail.cpp b/libcxx/test/std/experimental/memory/memory.resource/construct.fail.cpp index d23f583505e46..f4d57be8dc67a 100644 --- a/libcxx/test/std/experimental/memory/memory.resource/construct.fail.cpp +++ b/libcxx/test/std/experimental/memory/memory.resource/construct.fail.cpp @@ -18,7 +18,9 @@ namespace ex = std::experimental::pmr; -int main() +int main(int, char**) { ex::memory_resource m; // expected-error {{variable type 'ex::memory_resource' is an abstract class}} + + return 0; } diff --git a/libcxx/test/std/experimental/memory/memory.resource/memory.resource.eq/equal.pass.cpp b/libcxx/test/std/experimental/memory/memory.resource/memory.resource.eq/equal.pass.cpp index 774e6c7e76cf1..f9d4d5beb91f1 100644 --- a/libcxx/test/std/experimental/memory/memory.resource/memory.resource.eq/equal.pass.cpp +++ b/libcxx/test/std/experimental/memory/memory.resource/memory.resource.eq/equal.pass.cpp @@ -21,7 +21,7 @@ namespace ex = std::experimental::pmr; -int main() +int main(int, char**) { // check return types { @@ -72,4 +72,6 @@ int main() assert(r1.checkIsEqualCalledEq(1)); assert(r2.checkIsEqualCalledEq(1)); } + + return 0; } diff --git a/libcxx/test/std/experimental/memory/memory.resource/memory.resource.eq/not_equal.pass.cpp b/libcxx/test/std/experimental/memory/memory.resource/memory.resource.eq/not_equal.pass.cpp index c9ce391381825..037bb1a961377 100644 --- a/libcxx/test/std/experimental/memory/memory.resource/memory.resource.eq/not_equal.pass.cpp +++ b/libcxx/test/std/experimental/memory/memory.resource/memory.resource.eq/not_equal.pass.cpp @@ -20,7 +20,7 @@ namespace ex = std::experimental::pmr; -int main() +int main(int, char**) { // check return types { @@ -71,4 +71,6 @@ int main() assert(!(mr2 != mr1)); assert(r1.checkIsEqualCalledEq(0)); } + + return 0; } diff --git a/libcxx/test/std/experimental/memory/memory.resource/memory.resource.overview/nothing_to_do.pass.cpp b/libcxx/test/std/experimental/memory/memory.resource/memory.resource.overview/nothing_to_do.pass.cpp index 98c4bdd4f1c1f..796f3c353ba17 100644 --- a/libcxx/test/std/experimental/memory/memory.resource/memory.resource.overview/nothing_to_do.pass.cpp +++ b/libcxx/test/std/experimental/memory/memory.resource/memory.resource.overview/nothing_to_do.pass.cpp @@ -6,4 +6,6 @@ // //===----------------------------------------------------------------------===// -int main () {} +int main(int, char**) { + return 0; +} diff --git a/libcxx/test/std/experimental/memory/memory.resource/memory.resource.priv/protected_members.fail.cpp b/libcxx/test/std/experimental/memory/memory.resource/memory.resource.priv/protected_members.fail.cpp index 15db1b365b45c..faa3a252e843d 100644 --- a/libcxx/test/std/experimental/memory/memory.resource/memory.resource.priv/protected_members.fail.cpp +++ b/libcxx/test/std/experimental/memory/memory.resource/memory.resource.priv/protected_members.fail.cpp @@ -18,9 +18,11 @@ namespace ex = std::experimental::pmr; -int main() { +int main(int, char**) { ex::memory_resource *m = ex::new_delete_resource(); m->do_allocate(0, 0); // expected-error{{'do_allocate' is a protected member}} m->do_deallocate(nullptr, 0, 0); // expected-error{{'do_deallocate' is a protected member}} m->do_is_equal(*m); // expected-error{{'do_is_equal' is a protected member}} + + return 0; } diff --git a/libcxx/test/std/experimental/memory/memory.resource/memory.resource.public/allocate.pass.cpp b/libcxx/test/std/experimental/memory/memory.resource/memory.resource.public/allocate.pass.cpp index 77aa1da3c8305..38f49743cca7b 100644 --- a/libcxx/test/std/experimental/memory/memory.resource/memory.resource.public/allocate.pass.cpp +++ b/libcxx/test/std/experimental/memory/memory.resource/memory.resource.public/allocate.pass.cpp @@ -31,7 +31,7 @@ using std::experimental::pmr::memory_resource; -int main() +int main(int, char**) { TestResource R(42); auto& P = R.getController(); @@ -85,4 +85,6 @@ int main() } } #endif + + return 0; } diff --git a/libcxx/test/std/experimental/memory/memory.resource/memory.resource.public/deallocate.pass.cpp b/libcxx/test/std/experimental/memory/memory.resource/memory.resource.public/deallocate.pass.cpp index c76036811b3d3..e8c2d5bfff151 100644 --- a/libcxx/test/std/experimental/memory/memory.resource/memory.resource.public/deallocate.pass.cpp +++ b/libcxx/test/std/experimental/memory/memory.resource/memory.resource.public/deallocate.pass.cpp @@ -30,7 +30,7 @@ using std::experimental::pmr::memory_resource; -int main() +int main(int, char**) { NullResource R(42); auto& P = R.getController(); @@ -70,4 +70,6 @@ int main() assert(P.dealloc_count == 2); assert(P.checkDealloc(p, s, a)); } + + return 0; } diff --git a/libcxx/test/std/experimental/memory/memory.resource/memory.resource.public/dtor.pass.cpp b/libcxx/test/std/experimental/memory/memory.resource/memory.resource.public/dtor.pass.cpp index db9156834fe3f..be5ea2fb008e6 100644 --- a/libcxx/test/std/experimental/memory/memory.resource/memory.resource.public/dtor.pass.cpp +++ b/libcxx/test/std/experimental/memory/memory.resource/memory.resource.public/dtor.pass.cpp @@ -26,7 +26,7 @@ using std::experimental::pmr::memory_resource; -int main() +int main(int, char**) { static_assert( std::has_virtual_destructor::value @@ -55,4 +55,6 @@ int main() assert(TR::resource_constructed == 1); assert(TR::resource_destructed == 1); } + + return 0; } diff --git a/libcxx/test/std/experimental/memory/memory.resource/memory.resource.public/is_equal.pass.cpp b/libcxx/test/std/experimental/memory/memory.resource/memory.resource.public/is_equal.pass.cpp index e2ff9d9d12255..f0e517870852a 100644 --- a/libcxx/test/std/experimental/memory/memory.resource/memory.resource.public/is_equal.pass.cpp +++ b/libcxx/test/std/experimental/memory/memory.resource/memory.resource.public/is_equal.pass.cpp @@ -28,7 +28,7 @@ using std::experimental::pmr::memory_resource; -int main() +int main(int, char**) { { memory_resource const* r1 = nullptr; @@ -89,4 +89,6 @@ int main() assert(P2.checkIsEqualCalledEq(1)); assert(P1.checkIsEqualCalledEq(1)); } + + return 0; } diff --git a/libcxx/test/std/experimental/memory/nothing_to_do.pass.cpp b/libcxx/test/std/experimental/memory/nothing_to_do.pass.cpp index 02fe32ece4841..779762e7e995d 100644 --- a/libcxx/test/std/experimental/memory/nothing_to_do.pass.cpp +++ b/libcxx/test/std/experimental/memory/nothing_to_do.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/experimental/nothing_to_do.pass.cpp b/libcxx/test/std/experimental/nothing_to_do.pass.cpp index 98c4bdd4f1c1f..796f3c353ba17 100644 --- a/libcxx/test/std/experimental/nothing_to_do.pass.cpp +++ b/libcxx/test/std/experimental/nothing_to_do.pass.cpp @@ -6,4 +6,6 @@ // //===----------------------------------------------------------------------===// -int main () {} +int main(int, char**) { + return 0; +} diff --git a/libcxx/test/std/experimental/simd/simd.abi/vector_extension.pass.cpp b/libcxx/test/std/experimental/simd/simd.abi/vector_extension.pass.cpp index a17e96df6a0d0..6bd56d2dda7d4 100644 --- a/libcxx/test/std/experimental/simd/simd.abi/vector_extension.pass.cpp +++ b/libcxx/test/std/experimental/simd/simd.abi/vector_extension.pass.cpp @@ -63,4 +63,6 @@ static_assert(std::is_same, ex::__simd_abi>::value, ""); -int main() {} +int main(int, char**) { + return 0; +} diff --git a/libcxx/test/std/experimental/simd/simd.access/default.pass.cpp b/libcxx/test/std/experimental/simd/simd.access/default.pass.cpp index 9b179f2c79d66..6e6e4fe9e9a2a 100644 --- a/libcxx/test/std/experimental/simd/simd.access/default.pass.cpp +++ b/libcxx/test/std/experimental/simd/simd.access/default.pass.cpp @@ -210,7 +210,9 @@ void test_access() { } } -int main() { +int main(int, char**) { test_access>(); test_access>(); + + return 0; } diff --git a/libcxx/test/std/experimental/simd/simd.casts/simd_cast.pass.cpp b/libcxx/test/std/experimental/simd/simd.casts/simd_cast.pass.cpp index 7f70c5b02bb4c..ec4a32bf9d728 100644 --- a/libcxx/test/std/experimental/simd/simd.casts/simd_cast.pass.cpp +++ b/libcxx/test/std/experimental/simd/simd.casts/simd_cast.pass.cpp @@ -42,4 +42,6 @@ static_assert( ex::simd>::value, ""); -int main() {} +int main(int, char**) { + return 0; +} diff --git a/libcxx/test/std/experimental/simd/simd.casts/static_simd_cast.pass.cpp b/libcxx/test/std/experimental/simd/simd.casts/static_simd_cast.pass.cpp index a01e423583b55..40922ce1153ed 100644 --- a/libcxx/test/std/experimental/simd/simd.casts/static_simd_cast.pass.cpp +++ b/libcxx/test/std/experimental/simd/simd.casts/static_simd_cast.pass.cpp @@ -37,4 +37,6 @@ static_assert( ex::simd>::value, ""); -int main() {} +int main(int, char**) { + return 0; +} diff --git a/libcxx/test/std/experimental/simd/simd.cons/broadcast.pass.cpp b/libcxx/test/std/experimental/simd/simd.cons/broadcast.pass.cpp index 2e34bb9acf093..25dd8a4c53410 100644 --- a/libcxx/test/std/experimental/simd/simd.cons/broadcast.pass.cpp +++ b/libcxx/test/std/experimental/simd/simd.cons/broadcast.pass.cpp @@ -78,8 +78,10 @@ void test_broadcast() { } } -int main() { +int main(int, char**) { test_broadcast>(); test_broadcast>(); test_broadcast>(); + + return 0; } diff --git a/libcxx/test/std/experimental/simd/simd.cons/default.pass.cpp b/libcxx/test/std/experimental/simd/simd.cons/default.pass.cpp index 2e64a8219648e..6eebe0ec0cf83 100644 --- a/libcxx/test/std/experimental/simd/simd.cons/default.pass.cpp +++ b/libcxx/test/std/experimental/simd/simd.cons/default.pass.cpp @@ -18,10 +18,12 @@ namespace ex = std::experimental::parallelism_v2; -int main() { +int main(int, char**) { static_assert(ex::native_simd().size() > 0, ""); static_assert(ex::fixed_size_simd().size() == 4, ""); static_assert(ex::fixed_size_simd().size() == 5, ""); static_assert(ex::fixed_size_simd().size() == 1, ""); static_assert(ex::fixed_size_simd().size() == 32, ""); + + return 0; } diff --git a/libcxx/test/std/experimental/simd/simd.cons/generator.pass.cpp b/libcxx/test/std/experimental/simd/simd.cons/generator.pass.cpp index 542715de66bba..19880e9d3015d 100644 --- a/libcxx/test/std/experimental/simd/simd.cons/generator.pass.cpp +++ b/libcxx/test/std/experimental/simd/simd.cons/generator.pass.cpp @@ -82,9 +82,11 @@ void test_generator() { } } -int main() { +int main(int, char**) { // TODO: adjust the tests when this assertion fails. assert(ex::native_simd::size() >= 4); test_generator>(); test_generator>(); + + return 0; } diff --git a/libcxx/test/std/experimental/simd/simd.cons/load.pass.cpp b/libcxx/test/std/experimental/simd/simd.cons/load.pass.cpp index 3056e47fd4ba1..9440d5aefa358 100644 --- a/libcxx/test/std/experimental/simd/simd.cons/load.pass.cpp +++ b/libcxx/test/std/experimental/simd/simd.cons/load.pass.cpp @@ -107,11 +107,13 @@ void test_converting_load_ctor() { assert(a[3] == 8); } -int main() { +int main(int, char**) { // TODO: adjust the tests when this assertion fails. assert(ex::native_simd::size() >= 4); test_load_ctor>(); test_load_ctor>(); test_converting_load_ctor>(); test_converting_load_ctor>(); + + return 0; } diff --git a/libcxx/test/std/experimental/simd/simd.mem/load.pass.cpp b/libcxx/test/std/experimental/simd/simd.mem/load.pass.cpp index 9bda07ee9ea4b..1a56161c5fb0a 100644 --- a/libcxx/test/std/experimental/simd/simd.mem/load.pass.cpp +++ b/libcxx/test/std/experimental/simd/simd.mem/load.pass.cpp @@ -111,11 +111,13 @@ void test_converting_load() { assert(a[3] == 8); } -int main() { +int main(int, char**) { // TODO: adjust the tests when this assertion fails. assert(ex::native_simd::size() >= 4); test_load>(); test_load>(); test_converting_load>(); test_converting_load>(); + + return 0; } diff --git a/libcxx/test/std/experimental/simd/simd.mem/store.pass.cpp b/libcxx/test/std/experimental/simd/simd.mem/store.pass.cpp index 3faf400006a05..3cc3d1fa14dc7 100644 --- a/libcxx/test/std/experimental/simd/simd.mem/store.pass.cpp +++ b/libcxx/test/std/experimental/simd/simd.mem/store.pass.cpp @@ -85,10 +85,12 @@ void test_converting_store() { assert(buffer[3] == 8.); } -int main() { +int main(int, char**) { // TODO: adjust the tests when this assertion fails. test_store>(); test_store>(); test_converting_store>(); test_converting_store>(); + + return 0; } diff --git a/libcxx/test/std/experimental/simd/simd.traits/abi_for_size.pass.cpp b/libcxx/test/std/experimental/simd/simd.traits/abi_for_size.pass.cpp index a2206780fc76a..2bf28dc8a211b 100644 --- a/libcxx/test/std/experimental/simd/simd.traits/abi_for_size.pass.cpp +++ b/libcxx/test/std/experimental/simd/simd.traits/abi_for_size.pass.cpp @@ -28,4 +28,6 @@ static_assert(std::is_same, ex::simd_abi::fixed_size<4>>::value, ""); -int main() {} +int main(int, char**) { + return 0; +} diff --git a/libcxx/test/std/experimental/simd/simd.traits/is_abi_tag.pass.cpp b/libcxx/test/std/experimental/simd/simd.traits/is_abi_tag.pass.cpp index f07fca8296a3d..db98dae2b6799 100644 --- a/libcxx/test/std/experimental/simd/simd.traits/is_abi_tag.pass.cpp +++ b/libcxx/test/std/experimental/simd/simd.traits/is_abi_tag.pass.cpp @@ -109,4 +109,6 @@ static_assert(!ex::is_abi_tag_v>, ""); static_assert(!ex::is_abi_tag_v>, ""); static_assert(!ex::is_abi_tag_v>, ""); -int main() {} +int main(int, char**) { + return 0; +} diff --git a/libcxx/test/std/experimental/simd/simd.traits/is_simd.pass.cpp b/libcxx/test/std/experimental/simd/simd.traits/is_simd.pass.cpp index 46326ab5fa1d6..c465f0de68169 100644 --- a/libcxx/test/std/experimental/simd/simd.traits/is_simd.pass.cpp +++ b/libcxx/test/std/experimental/simd/simd.traits/is_simd.pass.cpp @@ -125,4 +125,6 @@ static_assert(!ex::is_simd_v>, ""); static_assert(!ex::is_simd_v>, ""); static_assert(!ex::is_simd_v, ""); -int main() {} +int main(int, char**) { + return 0; +} diff --git a/libcxx/test/std/experimental/simd/simd.traits/is_simd_flag_type.pass.cpp b/libcxx/test/std/experimental/simd/simd.traits/is_simd_flag_type.pass.cpp index d91d906caceb6..5fa208a3be775 100644 --- a/libcxx/test/std/experimental/simd/simd.traits/is_simd_flag_type.pass.cpp +++ b/libcxx/test/std/experimental/simd/simd.traits/is_simd_flag_type.pass.cpp @@ -47,4 +47,6 @@ static_assert(!ex::is_simd_flag_type_v, ""); static_assert(!ex::is_simd_flag_type_v>, ""); static_assert(!ex::is_simd_flag_type_v>, ""); -int main() {} +int main(int, char**) { + return 0; +} diff --git a/libcxx/test/std/experimental/simd/simd.traits/is_simd_mask.pass.cpp b/libcxx/test/std/experimental/simd/simd.traits/is_simd_mask.pass.cpp index 5346afef5afd4..348f2bfdfc3bd 100644 --- a/libcxx/test/std/experimental/simd/simd.traits/is_simd_mask.pass.cpp +++ b/libcxx/test/std/experimental/simd/simd.traits/is_simd_mask.pass.cpp @@ -148,4 +148,6 @@ static_assert(!ex::is_simd_mask_v>, ""); static_assert(!ex::is_simd_mask_v>, ""); static_assert(!ex::is_simd_mask_v, ""); -int main() {} +int main(int, char**) { + return 0; +} diff --git a/libcxx/test/std/experimental/utilities/meta/meta.detect/detected_or.pass.cpp b/libcxx/test/std/experimental/utilities/meta/meta.detect/detected_or.pass.cpp index 658bf0c120983..3ad12b617aeef 100644 --- a/libcxx/test/std/experimental/utilities/meta/meta.detect/detected_or.pass.cpp +++ b/libcxx/test/std/experimental/utilities/meta/meta.detect/detected_or.pass.cpp @@ -33,7 +33,9 @@ void test() { static_assert( std::is_same >::value, "" ); } -int main () { +int main(int, char**) { test(); test(); + + return 0; } diff --git a/libcxx/test/std/experimental/utilities/meta/meta.detect/detected_t.pass.cpp b/libcxx/test/std/experimental/utilities/meta/meta.detect/detected_t.pass.cpp index 7d3304fbcb4da..ebb7ecc7d9c04 100644 --- a/libcxx/test/std/experimental/utilities/meta/meta.detect/detected_t.pass.cpp +++ b/libcxx/test/std/experimental/utilities/meta/meta.detect/detected_t.pass.cpp @@ -40,8 +40,10 @@ void test() { static_assert( std::is_same>::value, "" ); } -int main () { +int main(int, char**) { test(); test(); // lookup failure returns nonesuch test(); + + return 0; } diff --git a/libcxx/test/std/experimental/utilities/meta/meta.detect/is_detected.pass.cpp b/libcxx/test/std/experimental/utilities/meta/meta.detect/is_detected.pass.cpp index 24c9d7011742c..60b1acae8807c 100644 --- a/libcxx/test/std/experimental/utilities/meta/meta.detect/is_detected.pass.cpp +++ b/libcxx/test/std/experimental/utilities/meta/meta.detect/is_detected.pass.cpp @@ -29,8 +29,10 @@ void test() { static_assert( b == ex::is_detected_v, "" ); } -int main () { +int main(int, char**) { test(); test(); test(); + + return 0; } diff --git a/libcxx/test/std/experimental/utilities/meta/meta.detect/is_detected_convertible.pass.cpp b/libcxx/test/std/experimental/utilities/meta/meta.detect/is_detected_convertible.pass.cpp index a6252b2458b00..0944cb2d070d5 100644 --- a/libcxx/test/std/experimental/utilities/meta/meta.detect/is_detected_convertible.pass.cpp +++ b/libcxx/test/std/experimental/utilities/meta/meta.detect/is_detected_convertible.pass.cpp @@ -41,9 +41,11 @@ void test() { static_assert( b == ex::is_detected_convertible_v, "" ); } -int main () { +int main(int, char**) { test(); test(); test(); test(); + + return 0; } diff --git a/libcxx/test/std/experimental/utilities/meta/meta.detect/is_detected_exact.pass.cpp b/libcxx/test/std/experimental/utilities/meta/meta.detect/is_detected_exact.pass.cpp index c888d436b04ef..c315640323376 100644 --- a/libcxx/test/std/experimental/utilities/meta/meta.detect/is_detected_exact.pass.cpp +++ b/libcxx/test/std/experimental/utilities/meta/meta.detect/is_detected_exact.pass.cpp @@ -40,9 +40,11 @@ void test() { static_assert( b == ex::is_detected_exact_v, "" ); } -int main () { +int main(int, char**) { test(); test(); test(); test(); + + return 0; } diff --git a/libcxx/test/std/experimental/utilities/nothing_to_do.pass.cpp b/libcxx/test/std/experimental/utilities/nothing_to_do.pass.cpp index 02fe32ece4841..779762e7e995d 100644 --- a/libcxx/test/std/experimental/utilities/nothing_to_do.pass.cpp +++ b/libcxx/test/std/experimental/utilities/nothing_to_do.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.assignment/assign.pass.cpp b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.assignment/assign.pass.cpp index 481fd4f8fb051..078c8c7f0679f 100644 --- a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.assignment/assign.pass.cpp +++ b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.assignment/assign.pass.cpp @@ -20,4 +20,6 @@ using std::experimental::propagate_const; typedef propagate_const P; -int main() { static_assert(!std::is_assignable::value, ""); } +int main(int, char**) { static_assert(!std::is_assignable::value, ""); + return 0; +} diff --git a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.assignment/assign_convertible_element_type.pass.cpp b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.assignment/assign_convertible_element_type.pass.cpp index 7a0fb47ebe03d..512b5998138e5 100644 --- a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.assignment/assign_convertible_element_type.pass.cpp +++ b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.assignment/assign_convertible_element_type.pass.cpp @@ -18,7 +18,7 @@ using std::experimental::propagate_const; -int main() { +int main(int, char**) { typedef propagate_const PY; @@ -30,4 +30,6 @@ int main() { p = x1; assert(*p==1); + + return 0; } diff --git a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.assignment/assign_convertible_propagate_const.pass.cpp b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.assignment/assign_convertible_propagate_const.pass.cpp index 9b6e7045891b8..0da532ab4a283 100644 --- a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.assignment/assign_convertible_propagate_const.pass.cpp +++ b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.assignment/assign_convertible_propagate_const.pass.cpp @@ -21,4 +21,6 @@ using std::experimental::propagate_const; typedef propagate_const PX; typedef propagate_const PY; -int main() { static_assert(!std::is_assignable::value, ""); } +int main(int, char**) { static_assert(!std::is_assignable::value, ""); + return 0; +} diff --git a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.assignment/assign_element_type.pass.cpp b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.assignment/assign_element_type.pass.cpp index d46180ee6f5cc..896ef9c90b986 100644 --- a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.assignment/assign_element_type.pass.cpp +++ b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.assignment/assign_element_type.pass.cpp @@ -18,7 +18,7 @@ using std::experimental::propagate_const; -int main() { +int main(int, char**) { typedef propagate_const P; @@ -30,4 +30,6 @@ int main() { p = x1; assert(*p==1); + + return 0; } diff --git a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.assignment/move_assign.pass.cpp b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.assignment/move_assign.pass.cpp index 3aff459806199..f1546afcc5f28 100644 --- a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.assignment/move_assign.pass.cpp +++ b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.assignment/move_assign.pass.cpp @@ -18,7 +18,7 @@ using std::experimental::propagate_const; -int main() { +int main(int, char**) { typedef propagate_const P; @@ -28,4 +28,6 @@ int main() { p2=std::move(p1); assert(*p2==1); + + return 0; } diff --git a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.assignment/move_assign_convertible.pass.cpp b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.assignment/move_assign_convertible.pass.cpp index 5fe39a435b960..dfff0bc9350aa 100644 --- a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.assignment/move_assign_convertible.pass.cpp +++ b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.assignment/move_assign_convertible.pass.cpp @@ -18,7 +18,7 @@ using std::experimental::propagate_const; -int main() { +int main(int, char**) { typedef propagate_const PX; typedef propagate_const PY; @@ -29,4 +29,6 @@ int main() { py1=std::move(px2); assert(*py1==2); + + return 0; } diff --git a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.assignment/move_assign_convertible_propagate_const.pass.cpp b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.assignment/move_assign_convertible_propagate_const.pass.cpp index b99a25121a0d8..894910eaa8765 100644 --- a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.assignment/move_assign_convertible_propagate_const.pass.cpp +++ b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.assignment/move_assign_convertible_propagate_const.pass.cpp @@ -18,7 +18,7 @@ using std::experimental::propagate_const; -int main() { +int main(int, char**) { typedef propagate_const PX; typedef propagate_const PY; @@ -29,4 +29,6 @@ int main() { py1=std::move(px2); assert(*py1==2); + + return 0; } diff --git a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.ctors/convertible_element_type.explicit.ctor.pass.cpp b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.ctors/convertible_element_type.explicit.ctor.pass.cpp index 10dc724ab58ed..24e27cb6b5608 100644 --- a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.ctors/convertible_element_type.explicit.ctor.pass.cpp +++ b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.ctors/convertible_element_type.explicit.ctor.pass.cpp @@ -20,8 +20,10 @@ using std::experimental::propagate_const; typedef propagate_const P; -int main() { +int main(int, char**) { static_assert(!std::is_convertible::value, ""); static_assert(std::is_constructible::value, ""); + + return 0; } diff --git a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.ctors/convertible_element_type.non-explicit.ctor.pass.cpp b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.ctors/convertible_element_type.non-explicit.ctor.pass.cpp index ec0ad47e713f1..9cb325db00f1b 100644 --- a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.ctors/convertible_element_type.non-explicit.ctor.pass.cpp +++ b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.ctors/convertible_element_type.non-explicit.ctor.pass.cpp @@ -25,7 +25,9 @@ void f(const P& p) assert(*p==2); } -int main() { +int main(int, char**) { f(X(2)); + + return 0; } diff --git a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.ctors/convertible_propagate_const.copy_ctor.pass.cpp b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.ctors/convertible_propagate_const.copy_ctor.pass.cpp index 0320161ba740b..e440245b5e40f 100644 --- a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.ctors/convertible_propagate_const.copy_ctor.pass.cpp +++ b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.ctors/convertible_propagate_const.copy_ctor.pass.cpp @@ -21,5 +21,7 @@ using std::experimental::propagate_const; typedef propagate_const PX; typedef propagate_const PY; -int main() { static_assert(!std::is_constructible::value, ""); } +int main(int, char**) { static_assert(!std::is_constructible::value, ""); + return 0; +} diff --git a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.ctors/convertible_propagate_const.explicit.move_ctor.pass.cpp b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.ctors/convertible_propagate_const.explicit.move_ctor.pass.cpp index aa4f1a3ed62d3..3166ebe70c1a1 100644 --- a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.ctors/convertible_propagate_const.explicit.move_ctor.pass.cpp +++ b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.ctors/convertible_propagate_const.explicit.move_ctor.pass.cpp @@ -21,7 +21,9 @@ using std::experimental::propagate_const; typedef propagate_const PX; typedef propagate_const PY; -int main() { +int main(int, char**) { static_assert(!std::is_convertible::value, ""); static_assert(std::is_constructible::value, ""); + + return 0; } diff --git a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.ctors/convertible_propagate_const.move_ctor.pass.cpp b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.ctors/convertible_propagate_const.move_ctor.pass.cpp index 77f8791a396b5..ea1ac4262f332 100644 --- a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.ctors/convertible_propagate_const.move_ctor.pass.cpp +++ b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.ctors/convertible_propagate_const.move_ctor.pass.cpp @@ -21,10 +21,12 @@ using std::experimental::propagate_const; typedef propagate_const PY; typedef propagate_const PX; -int main() { +int main(int, char**) { PX px(1); PY py(std::move(px)); assert(*py==1); + + return 0; } diff --git a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.ctors/copy_ctor.pass.cpp b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.ctors/copy_ctor.pass.cpp index 0e992a69ba6c1..7c0558f398f66 100644 --- a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.ctors/copy_ctor.pass.cpp +++ b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.ctors/copy_ctor.pass.cpp @@ -20,4 +20,6 @@ using std::experimental::propagate_const; typedef propagate_const P; -int main() { static_assert(!std::is_constructible::value, ""); } +int main(int, char**) { static_assert(!std::is_constructible::value, ""); + return 0; +} diff --git a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.ctors/element_type.explicit.ctor.pass.cpp b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.ctors/element_type.explicit.ctor.pass.cpp index 45a3bd363eebc..aee637620a701 100644 --- a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.ctors/element_type.explicit.ctor.pass.cpp +++ b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.ctors/element_type.explicit.ctor.pass.cpp @@ -20,8 +20,10 @@ using std::experimental::propagate_const; typedef propagate_const P; -int main() { +int main(int, char**) { static_assert(!std::is_convertible::value, ""); static_assert(std::is_constructible::value, ""); + + return 0; } diff --git a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.ctors/element_type.non-explicit.ctor.pass.cpp b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.ctors/element_type.non-explicit.ctor.pass.cpp index b9f6bad69bb60..93e50578a97a7 100644 --- a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.ctors/element_type.non-explicit.ctor.pass.cpp +++ b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.ctors/element_type.non-explicit.ctor.pass.cpp @@ -24,4 +24,6 @@ void f(const P&) { } -int main() { f(2); } +int main(int, char**) { f(2); + return 0; +} diff --git a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.ctors/move_ctor.pass.cpp b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.ctors/move_ctor.pass.cpp index 6badeeede2b25..662a605f49c3e 100644 --- a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.ctors/move_ctor.pass.cpp +++ b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.ctors/move_ctor.pass.cpp @@ -18,11 +18,13 @@ using std::experimental::propagate_const; -int main() { +int main(int, char**) { typedef propagate_const P; P p1(2); P p2(std::move(p1)); assert(*p2 == 2); + + return 0; } diff --git a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.non-const_observers/dereference.pass.cpp b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.non-const_observers/dereference.pass.cpp index 8dffebafa482f..4e47bac3715c7 100644 --- a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.non-const_observers/dereference.pass.cpp +++ b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.non-const_observers/dereference.pass.cpp @@ -27,7 +27,9 @@ constexpr P f() return p; } -int main() { +int main(int, char**) { constexpr P p = f(); static_assert(*p==2,""); + + return 0; } diff --git a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.non-const_observers/explicit_operator_element_type_ptr.pass.cpp b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.non-const_observers/explicit_operator_element_type_ptr.pass.cpp index 53d378391a0e4..6ce5d407c58ef 100644 --- a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.non-const_observers/explicit_operator_element_type_ptr.pass.cpp +++ b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.non-const_observers/explicit_operator_element_type_ptr.pass.cpp @@ -20,4 +20,6 @@ using std::experimental::propagate_const; typedef propagate_const P; -int main() { static_assert(!std::is_convertible::value, ""); } +int main(int, char**) { static_assert(!std::is_convertible::value, ""); + return 0; +} diff --git a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.non-const_observers/get.pass.cpp b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.non-const_observers/get.pass.cpp index 04fe4add1ed0e..1a12c3bdd3d79 100644 --- a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.non-const_observers/get.pass.cpp +++ b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.non-const_observers/get.pass.cpp @@ -27,7 +27,9 @@ constexpr P f() return p; } -int main() { +int main(int, char**) { constexpr P p = f(); static_assert(*(p.get())==2,""); + + return 0; } diff --git a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.non-const_observers/op_arrow.pass.cpp b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.non-const_observers/op_arrow.pass.cpp index d8ea66e8d92b2..bdc6c69373070 100644 --- a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.non-const_observers/op_arrow.pass.cpp +++ b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.non-const_observers/op_arrow.pass.cpp @@ -27,7 +27,9 @@ constexpr P f() return p; } -int main() { +int main(int, char**) { constexpr P p = f(); static_assert(*(p.operator->())==2,""); + + return 0; } diff --git a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.non-const_observers/operator_element_type_ptr.pass.cpp b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.non-const_observers/operator_element_type_ptr.pass.cpp index 87b6889096700..46244b3917239 100644 --- a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.non-const_observers/operator_element_type_ptr.pass.cpp +++ b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.non-const_observers/operator_element_type_ptr.pass.cpp @@ -18,7 +18,7 @@ using std::experimental::propagate_const; -int main() { +int main(int, char**) { typedef propagate_const P; @@ -31,4 +31,6 @@ int main() { *ptr_1 = 2; assert(*ptr_1==2); + + return 0; } diff --git a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.observers/dereference.pass.cpp b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.observers/dereference.pass.cpp index c0a5e1e44e5fc..758bca4694ecc 100644 --- a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.observers/dereference.pass.cpp +++ b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.observers/dereference.pass.cpp @@ -18,11 +18,13 @@ using std::experimental::propagate_const; -int main() { +int main(int, char**) { typedef propagate_const P; constexpr P p(1); static_assert(*p==1,""); + + return 0; } diff --git a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.observers/explicit_operator_element_type_ptr.pass.cpp b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.observers/explicit_operator_element_type_ptr.pass.cpp index b7dd8f843a522..1f98f03d2fa44 100644 --- a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.observers/explicit_operator_element_type_ptr.pass.cpp +++ b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.observers/explicit_operator_element_type_ptr.pass.cpp @@ -20,6 +20,8 @@ using std::experimental::propagate_const; typedef propagate_const P; -int main() { +int main(int, char**) { static_assert(!std::is_convertible::value, ""); + + return 0; } diff --git a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.observers/get.pass.cpp b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.observers/get.pass.cpp index f424fae6456de..71aea68edc21f 100644 --- a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.observers/get.pass.cpp +++ b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.observers/get.pass.cpp @@ -18,11 +18,13 @@ using std::experimental::propagate_const; -int main() { +int main(int, char**) { typedef propagate_const P; constexpr P p(1); static_assert(*(p.get())==1, ""); + + return 0; } diff --git a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.observers/op_arrow.pass.cpp b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.observers/op_arrow.pass.cpp index 14ba32387f8ea..dcb1b92455706 100644 --- a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.observers/op_arrow.pass.cpp +++ b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.observers/op_arrow.pass.cpp @@ -18,11 +18,13 @@ using std::experimental::propagate_const; -int main() { +int main(int, char**) { typedef propagate_const P; constexpr P p(1); static_assert(*(p.operator->())==1,""); + + return 0; } diff --git a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.observers/operator_element_type_ptr.pass.cpp b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.observers/operator_element_type_ptr.pass.cpp index 8c0cb02fc1c8c..bfd295a1fa049 100644 --- a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.observers/operator_element_type_ptr.pass.cpp +++ b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.observers/operator_element_type_ptr.pass.cpp @@ -24,4 +24,6 @@ constexpr P p(1); constexpr const int *ptr_1 = p; -int main() { assert(*ptr_1 == 1); } +int main(int, char**) { assert(*ptr_1 == 1); + return 0; +} diff --git a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/swap.pass.cpp b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/swap.pass.cpp index e6b94957f9d9b..03b32dd0ec6e2 100644 --- a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/swap.pass.cpp +++ b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/swap.pass.cpp @@ -21,11 +21,13 @@ using std::experimental::propagate_const; bool swap_called = false; void swap(X &, X &) { swap_called = true; } -int main() { +int main(int, char**) { typedef propagate_const P; P p1(1); P p2(2); p1.swap(p2); assert(swap_called); + + return 0; } diff --git a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/hash.pass.cpp b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/hash.pass.cpp index 76c683458d8f3..28ac9c22460c3 100644 --- a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/hash.pass.cpp +++ b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/hash.pass.cpp @@ -31,7 +31,7 @@ template <> struct hash }; } // namespace std -int main() { +int main(int, char**) { typedef propagate_const P; @@ -40,4 +40,6 @@ int main() { auto h = std::hash

    (); assert(h(p)==99); + + return 0; } diff --git a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/propagate_const.comparison_function_objects/equal_to.pass.cpp b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/propagate_const.comparison_function_objects/equal_to.pass.cpp index 40f4ae7d519a4..85e400504768a 100644 --- a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/propagate_const.comparison_function_objects/equal_to.pass.cpp +++ b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/propagate_const.comparison_function_objects/equal_to.pass.cpp @@ -20,7 +20,7 @@ using std::experimental::propagate_const; constexpr bool operator==(const X &x1, const X &x2) { return x1.i_ == x2.i_; } -int main() { +int main(int, char**) { typedef propagate_const P; @@ -32,4 +32,6 @@ int main() { assert(c(p1_1,p2_1)); assert(!c(p1_1,p3_2)); + + return 0; } diff --git a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/propagate_const.comparison_function_objects/greater.pass.cpp b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/propagate_const.comparison_function_objects/greater.pass.cpp index f019f07d12576..ab7b5e9a21d5a 100644 --- a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/propagate_const.comparison_function_objects/greater.pass.cpp +++ b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/propagate_const.comparison_function_objects/greater.pass.cpp @@ -20,7 +20,7 @@ using std::experimental::propagate_const; constexpr bool operator>(const X &x1, const X &x2) { return x1.i_ > x2.i_; } -int main() { +int main(int, char**) { typedef propagate_const P; @@ -34,4 +34,6 @@ int main() { assert(!c(p2_1,p1_1)); assert(!c(p1_1,p3_2)); assert(c(p3_2,p1_1)); + + return 0; } diff --git a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/propagate_const.comparison_function_objects/greater_equal.pass.cpp b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/propagate_const.comparison_function_objects/greater_equal.pass.cpp index 8f0e0d8cdf9e2..f30e0e9d22ec7 100644 --- a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/propagate_const.comparison_function_objects/greater_equal.pass.cpp +++ b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/propagate_const.comparison_function_objects/greater_equal.pass.cpp @@ -20,7 +20,7 @@ using std::experimental::propagate_const; constexpr bool operator>=(const X &x1, const X &x2) { return x1.i_ >= x2.i_; } -int main() { +int main(int, char**) { typedef propagate_const P; @@ -34,4 +34,6 @@ int main() { assert(c(p2_1,p1_1)); assert(!c(p1_1,p3_2)); assert(c(p3_2,p1_1)); + + return 0; } diff --git a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/propagate_const.comparison_function_objects/less.pass.cpp b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/propagate_const.comparison_function_objects/less.pass.cpp index 584f52ba6e217..75afd95e115f4 100644 --- a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/propagate_const.comparison_function_objects/less.pass.cpp +++ b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/propagate_const.comparison_function_objects/less.pass.cpp @@ -20,7 +20,7 @@ using std::experimental::propagate_const; constexpr bool operator<(const X &x1, const X &x2) { return x1.i_ < x2.i_; } -int main() { +int main(int, char**) { typedef propagate_const P; @@ -34,4 +34,6 @@ int main() { assert(!c(p2_1,p1_1)); assert(c(p1_1,p3_2)); assert(!c(p3_2,p1_1)); + + return 0; } diff --git a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/propagate_const.comparison_function_objects/less_equal.pass.cpp b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/propagate_const.comparison_function_objects/less_equal.pass.cpp index 4eb25db29b369..4f6523a320f04 100644 --- a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/propagate_const.comparison_function_objects/less_equal.pass.cpp +++ b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/propagate_const.comparison_function_objects/less_equal.pass.cpp @@ -20,7 +20,7 @@ using std::experimental::propagate_const; constexpr bool operator<=(const X &x1, const X &x2) { return x1.i_ <= x2.i_; } -int main() { +int main(int, char**) { typedef propagate_const P; @@ -34,4 +34,6 @@ int main() { assert(c(p2_1,p1_1)); assert(c(p1_1,p3_2)); assert(!c(p3_2,p1_1)); + + return 0; } diff --git a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/propagate_const.comparison_function_objects/not_equal_to.pass.cpp b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/propagate_const.comparison_function_objects/not_equal_to.pass.cpp index 52eadc4b31df6..1c303ae28dba1 100644 --- a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/propagate_const.comparison_function_objects/not_equal_to.pass.cpp +++ b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/propagate_const.comparison_function_objects/not_equal_to.pass.cpp @@ -20,7 +20,7 @@ using std::experimental::propagate_const; constexpr bool operator!=(const X &x1, const X &x2) { return x1.i_ != x2.i_; } -int main() { +int main(int, char**) { typedef propagate_const P; @@ -32,4 +32,6 @@ int main() { assert(!c(p1_1,p2_1)); assert(c(p1_1,p3_2)); + + return 0; } diff --git a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/propagate_const.relops/equal.pass.cpp b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/propagate_const.relops/equal.pass.cpp index 696330a426c4c..dafc355a48e43 100644 --- a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/propagate_const.relops/equal.pass.cpp +++ b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/propagate_const.relops/equal.pass.cpp @@ -33,7 +33,7 @@ constexpr bool operator==(const nullptr_t &, const X &) { return false; } -int main() { +int main(int, char**) { constexpr X x1_1(1); constexpr X x2_1(1); constexpr X x3_2(2); @@ -60,4 +60,6 @@ int main() { static_assert(!(p1_1==nullptr),""); static_assert(!(nullptr==p1_1),""); + + return 0; } diff --git a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/propagate_const.relops/greater_equal.pass.cpp b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/propagate_const.relops/greater_equal.pass.cpp index 8c214f745c8f9..36f3747303eb6 100644 --- a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/propagate_const.relops/greater_equal.pass.cpp +++ b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/propagate_const.relops/greater_equal.pass.cpp @@ -24,7 +24,7 @@ constexpr bool operator>=(const X &lhs, const X &rhs) { return lhs.i_ >= rhs.i_; } -int main() { +int main(int, char**) { constexpr X x1_1(1); constexpr X x2_1(1); constexpr X x3_2(2); @@ -50,4 +50,6 @@ int main() { static_assert(x1_1 >= p2_1, ""); static_assert(!(x1_1 >= p3_2), ""); static_assert(x3_2 >= p1_1, ""); + + return 0; } diff --git a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/propagate_const.relops/greater_than.pass.cpp b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/propagate_const.relops/greater_than.pass.cpp index fb67997859544..6abadb39b238a 100644 --- a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/propagate_const.relops/greater_than.pass.cpp +++ b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/propagate_const.relops/greater_than.pass.cpp @@ -24,7 +24,7 @@ constexpr bool operator>(const X &lhs, const X &rhs) { return lhs.i_ > rhs.i_; } -int main() { +int main(int, char**) { constexpr X x1_1(1); constexpr X x2_1(1); constexpr X x3_2(2); @@ -46,4 +46,6 @@ int main() { static_assert(!(x1_1 > p2_1), ""); static_assert(x3_2 > p1_1, ""); + + return 0; } diff --git a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/propagate_const.relops/less_equal.pass.cpp b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/propagate_const.relops/less_equal.pass.cpp index a1d5b3d9e51fd..703faed74e56f 100644 --- a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/propagate_const.relops/less_equal.pass.cpp +++ b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/propagate_const.relops/less_equal.pass.cpp @@ -24,7 +24,7 @@ constexpr bool operator<=(const X &lhs, const X &rhs) { return lhs.i_ <= rhs.i_; } -int main() { +int main(int, char**) { constexpr X x1_1(1); constexpr X x2_1(1); constexpr X x3_2(2); @@ -51,4 +51,6 @@ int main() { static_assert(x1_1 <= p3_2, ""); static_assert(!(x3_2 <= p1_1), ""); + + return 0; } diff --git a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/propagate_const.relops/less_than.pass.cpp b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/propagate_const.relops/less_than.pass.cpp index 00bf157d9621a..7481418d38439 100644 --- a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/propagate_const.relops/less_than.pass.cpp +++ b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/propagate_const.relops/less_than.pass.cpp @@ -24,7 +24,7 @@ constexpr bool operator<(const X &lhs, const X &rhs) { return lhs.i_ < rhs.i_; } -int main() { +int main(int, char**) { constexpr X x1_1(1); constexpr X x2_1(1); constexpr X x3_2(2); @@ -46,4 +46,6 @@ int main() { static_assert(!(p1_1 < x1_1), ""); static_assert(p1_1 < x3_2, ""); + + return 0; } diff --git a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/propagate_const.relops/not_equal.pass.cpp b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/propagate_const.relops/not_equal.pass.cpp index ba30912dd24ac..ebfc623155768 100644 --- a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/propagate_const.relops/not_equal.pass.cpp +++ b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/propagate_const.relops/not_equal.pass.cpp @@ -33,7 +33,7 @@ constexpr bool operator!=(const nullptr_t &, const X &) { return true; } -int main() { +int main(int, char**) { constexpr X x1_1(1); constexpr X x2_1(1); constexpr X x3_2(2); @@ -58,4 +58,6 @@ int main() { static_assert(p1_1!=nullptr,""); static_assert(nullptr!=p1_1,""); + + return 0; } diff --git a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/swap.pass.cpp b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/swap.pass.cpp index 1df35dd8886c1..84923f78dc1f0 100644 --- a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/swap.pass.cpp +++ b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/swap.pass.cpp @@ -21,10 +21,12 @@ using std::experimental::propagate_const; bool swap_called = false; void swap(X &, X &) { swap_called = true; } -int main() { +int main(int, char**) { typedef propagate_const P; P p1(1); P p2(2); swap(p1, p2); assert(swap_called); + + return 0; } diff --git a/libcxx/test/std/experimental/utilities/utility/utility.erased.type/erased_type.pass.cpp b/libcxx/test/std/experimental/utilities/utility/utility.erased.type/erased_type.pass.cpp index 9c3ac0cc98c99..36bf4f793b4af 100644 --- a/libcxx/test/std/experimental/utilities/utility/utility.erased.type/erased_type.pass.cpp +++ b/libcxx/test/std/experimental/utilities/utility/utility.erased.type/erased_type.pass.cpp @@ -10,8 +10,10 @@ #include -int main() +int main(int, char**) { std::experimental::erased_type e; ((void)e); + + return 0; } diff --git a/libcxx/test/std/experimental/utilities/utility/utility.synop/includes.pass.cpp b/libcxx/test/std/experimental/utilities/utility/utility.synop/includes.pass.cpp index 45140f33302d0..ddf053f2429be 100644 --- a/libcxx/test/std/experimental/utilities/utility/utility.synop/includes.pass.cpp +++ b/libcxx/test/std/experimental/utilities/utility/utility.synop/includes.pass.cpp @@ -14,6 +14,8 @@ # error " must include " #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/input.output/file.streams/c.files/cinttypes.pass.cpp b/libcxx/test/std/input.output/file.streams/c.files/cinttypes.pass.cpp index 675c5751650e5..e9e32bb67342b 100644 --- a/libcxx/test/std/input.output/file.streams/c.files/cinttypes.pass.cpp +++ b/libcxx/test/std/input.output/file.streams/c.files/cinttypes.pass.cpp @@ -877,7 +877,7 @@ template void test() ((void)t); // Prevent unused warning } -int main() +int main(int, char**) { test(); test(); @@ -927,4 +927,6 @@ int main() static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); + + return 0; } diff --git a/libcxx/test/std/input.output/file.streams/c.files/cstdio.pass.cpp b/libcxx/test/std/input.output/file.streams/c.files/cstdio.pass.cpp index 95a5cb6951218..af8dc97a5e83d 100644 --- a/libcxx/test/std/input.output/file.streams/c.files/cstdio.pass.cpp +++ b/libcxx/test/std/input.output/file.streams/c.files/cstdio.pass.cpp @@ -85,7 +85,7 @@ #pragma clang diagnostic ignored "-Wdeprecated-declarations" #endif -int main() +int main(int, char**) { std::FILE* fp = 0; std::fpos_t fpos = std::fpos_t(); @@ -154,4 +154,6 @@ int main() static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); #endif + + return 0; } diff --git a/libcxx/test/std/input.output/file.streams/c.files/gets.fail.cpp b/libcxx/test/std/input.output/file.streams/c.files/gets.fail.cpp index 0772dc9f0fcf2..dae0e42ff34a1 100644 --- a/libcxx/test/std/input.output/file.streams/c.files/gets.fail.cpp +++ b/libcxx/test/std/input.output/file.streams/c.files/gets.fail.cpp @@ -13,7 +13,9 @@ #include -int main() +int main(int, char**) { (void) std::gets((char *) NULL); + + return 0; } diff --git a/libcxx/test/std/input.output/file.streams/fstreams/filebuf.assign/member_swap.pass.cpp b/libcxx/test/std/input.output/file.streams/fstreams/filebuf.assign/member_swap.pass.cpp index b6890b8717de8..9bfcec0a48fa6 100644 --- a/libcxx/test/std/input.output/file.streams/fstreams/filebuf.assign/member_swap.pass.cpp +++ b/libcxx/test/std/input.output/file.streams/fstreams/filebuf.assign/member_swap.pass.cpp @@ -17,7 +17,7 @@ #include #include "platform_support.h" -int main() +int main(int, char**) { std::string temp = get_temp_file_name(); { @@ -50,4 +50,6 @@ int main() assert(f2.sgetc() == L'2'); } std::remove(temp.c_str()); + + return 0; } diff --git a/libcxx/test/std/input.output/file.streams/fstreams/filebuf.assign/move_assign.pass.cpp b/libcxx/test/std/input.output/file.streams/fstreams/filebuf.assign/move_assign.pass.cpp index 0acda35b080e5..a397e6cc1388b 100644 --- a/libcxx/test/std/input.output/file.streams/fstreams/filebuf.assign/move_assign.pass.cpp +++ b/libcxx/test/std/input.output/file.streams/fstreams/filebuf.assign/move_assign.pass.cpp @@ -19,7 +19,7 @@ #include #include "platform_support.h" -int main() +int main(int, char**) { std::string temp = get_temp_file_name(); { @@ -52,4 +52,6 @@ int main() assert(f2.sgetc() == L'2'); } std::remove(temp.c_str()); + + return 0; } diff --git a/libcxx/test/std/input.output/file.streams/fstreams/filebuf.assign/nonmember_swap.pass.cpp b/libcxx/test/std/input.output/file.streams/fstreams/filebuf.assign/nonmember_swap.pass.cpp index 6fd1d2bb47102..f23c119af90d5 100644 --- a/libcxx/test/std/input.output/file.streams/fstreams/filebuf.assign/nonmember_swap.pass.cpp +++ b/libcxx/test/std/input.output/file.streams/fstreams/filebuf.assign/nonmember_swap.pass.cpp @@ -19,7 +19,7 @@ #include #include "platform_support.h" -int main() +int main(int, char**) { std::string temp = get_temp_file_name(); { @@ -52,4 +52,6 @@ int main() assert(f2.sgetc() == L'2'); } std::remove(temp.c_str()); + + return 0; } diff --git a/libcxx/test/std/input.output/file.streams/fstreams/filebuf.cons/default.pass.cpp b/libcxx/test/std/input.output/file.streams/fstreams/filebuf.cons/default.pass.cpp index d9230b04527d4..5efbb03c8a60f 100644 --- a/libcxx/test/std/input.output/file.streams/fstreams/filebuf.cons/default.pass.cpp +++ b/libcxx/test/std/input.output/file.streams/fstreams/filebuf.cons/default.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { std::filebuf f; @@ -26,4 +26,6 @@ int main() std::wfilebuf f; assert(!f.is_open()); } + + return 0; } diff --git a/libcxx/test/std/input.output/file.streams/fstreams/filebuf.cons/move.pass.cpp b/libcxx/test/std/input.output/file.streams/fstreams/filebuf.cons/move.pass.cpp index ad4d37dad6351..922e514d7f453 100644 --- a/libcxx/test/std/input.output/file.streams/fstreams/filebuf.cons/move.pass.cpp +++ b/libcxx/test/std/input.output/file.streams/fstreams/filebuf.cons/move.pass.cpp @@ -19,7 +19,7 @@ #include #include "platform_support.h" -int main() +int main(int, char**) { std::string temp = get_temp_file_name(); { @@ -50,4 +50,6 @@ int main() assert(f2.sgetc() == L'2'); } std::remove(temp.c_str()); + + return 0; } diff --git a/libcxx/test/std/input.output/file.streams/fstreams/filebuf.members/open_path.pass.cpp b/libcxx/test/std/input.output/file.streams/fstreams/filebuf.members/open_path.pass.cpp index 7f7ce344f8601..ea244e1a32d91 100644 --- a/libcxx/test/std/input.output/file.streams/fstreams/filebuf.members/open_path.pass.cpp +++ b/libcxx/test/std/input.output/file.streams/fstreams/filebuf.members/open_path.pass.cpp @@ -19,7 +19,7 @@ namespace fs = std::filesystem; -int main() { +int main(int, char**) { fs::path p = get_temp_file_name(); { @@ -52,4 +52,6 @@ int main() { assert(f.sbumpc() == L'3'); } remove(p.c_str()); + + return 0; } diff --git a/libcxx/test/std/input.output/file.streams/fstreams/filebuf.members/open_pointer.pass.cpp b/libcxx/test/std/input.output/file.streams/fstreams/filebuf.members/open_pointer.pass.cpp index fc3dd6d01cd80..bd662a9f7f825 100644 --- a/libcxx/test/std/input.output/file.streams/fstreams/filebuf.members/open_pointer.pass.cpp +++ b/libcxx/test/std/input.output/file.streams/fstreams/filebuf.members/open_pointer.pass.cpp @@ -14,7 +14,7 @@ #include #include "platform_support.h" -int main() +int main(int, char**) { std::string temp = get_temp_file_name(); { @@ -47,4 +47,6 @@ int main() assert(f.sbumpc() == L'3'); } remove(temp.c_str()); + + return 0; } diff --git a/libcxx/test/std/input.output/file.streams/fstreams/filebuf.virtuals/overflow.pass.cpp b/libcxx/test/std/input.output/file.streams/fstreams/filebuf.virtuals/overflow.pass.cpp index 0aeb505c75cc7..6636a42233242 100644 --- a/libcxx/test/std/input.output/file.streams/fstreams/filebuf.virtuals/overflow.pass.cpp +++ b/libcxx/test/std/input.output/file.streams/fstreams/filebuf.virtuals/overflow.pass.cpp @@ -36,7 +36,7 @@ struct test_buf virtual int_type overflow(int_type c = traits_type::eof()) {return base::overflow(c);} }; -int main() +int main(int, char**) { { test_buf f; @@ -140,4 +140,6 @@ int main() assert(f.sbumpc() == -1); } std::remove("overflow.dat"); + + return 0; } diff --git a/libcxx/test/std/input.output/file.streams/fstreams/filebuf.virtuals/pbackfail.pass.cpp b/libcxx/test/std/input.output/file.streams/fstreams/filebuf.virtuals/pbackfail.pass.cpp index e711b0c9b5ca2..728eec2938e11 100644 --- a/libcxx/test/std/input.output/file.streams/fstreams/filebuf.virtuals/pbackfail.pass.cpp +++ b/libcxx/test/std/input.output/file.streams/fstreams/filebuf.virtuals/pbackfail.pass.cpp @@ -32,7 +32,7 @@ struct test_buf virtual int_type pbackfail(int_type c = traits_type::eof()) {return base::pbackfail(c);} }; -int main() +int main(int, char**) { { test_buf f; @@ -60,4 +60,6 @@ int main() assert(f.sgetc() == '2'); } } + + return 0; } diff --git a/libcxx/test/std/input.output/file.streams/fstreams/filebuf.virtuals/seekoff.pass.cpp b/libcxx/test/std/input.output/file.streams/fstreams/filebuf.virtuals/seekoff.pass.cpp index 9126b3396d72d..6f50357a093d6 100644 --- a/libcxx/test/std/input.output/file.streams/fstreams/filebuf.virtuals/seekoff.pass.cpp +++ b/libcxx/test/std/input.output/file.streams/fstreams/filebuf.virtuals/seekoff.pass.cpp @@ -18,7 +18,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { { char buf[10]; @@ -62,4 +62,6 @@ int main() assert(f.sgetc() == L'l'); } std::remove("seekoff.dat"); + + return 0; } diff --git a/libcxx/test/std/input.output/file.streams/fstreams/filebuf.virtuals/underflow.pass.cpp b/libcxx/test/std/input.output/file.streams/fstreams/filebuf.virtuals/underflow.pass.cpp index 8859b07969d10..47760a9162774 100644 --- a/libcxx/test/std/input.output/file.streams/fstreams/filebuf.virtuals/underflow.pass.cpp +++ b/libcxx/test/std/input.output/file.streams/fstreams/filebuf.virtuals/underflow.pass.cpp @@ -36,7 +36,7 @@ struct test_buf virtual int_type underflow() {return base::underflow();} }; -int main() +int main(int, char**) { { test_buf f; @@ -121,4 +121,6 @@ int main() assert(f.sbumpc() == 0x4E53); assert(f.sbumpc() == static_cast(-1)); } + + return 0; } diff --git a/libcxx/test/std/input.output/file.streams/fstreams/filebuf/types.pass.cpp b/libcxx/test/std/input.output/file.streams/fstreams/filebuf/types.pass.cpp index e0c95f50a2d84..40c010f6f70b5 100644 --- a/libcxx/test/std/input.output/file.streams/fstreams/filebuf/types.pass.cpp +++ b/libcxx/test/std/input.output/file.streams/fstreams/filebuf/types.pass.cpp @@ -22,7 +22,7 @@ #include #include -int main() +int main(int, char**) { static_assert((std::is_base_of, std::basic_filebuf >::value), ""); static_assert((std::is_same::char_type, char>::value), ""); @@ -30,4 +30,6 @@ int main() static_assert((std::is_same::int_type, std::char_traits::int_type>::value), ""); static_assert((std::is_same::pos_type, std::char_traits::pos_type>::value), ""); static_assert((std::is_same::off_type, std::char_traits::off_type>::value), ""); + + return 0; } diff --git a/libcxx/test/std/input.output/file.streams/fstreams/fstream.assign/member_swap.pass.cpp b/libcxx/test/std/input.output/file.streams/fstreams/fstream.assign/member_swap.pass.cpp index 312a68d8307ca..7c94de924d9dc 100644 --- a/libcxx/test/std/input.output/file.streams/fstreams/fstream.assign/member_swap.pass.cpp +++ b/libcxx/test/std/input.output/file.streams/fstreams/fstream.assign/member_swap.pass.cpp @@ -35,7 +35,7 @@ std::pair get_temp_file_names() { return names; } -int main() +int main(int, char**) { std::pair temp_files = get_temp_file_names(); std::string& temp1 = temp_files.first; @@ -87,4 +87,6 @@ int main() } std::remove(temp1.c_str()); std::remove(temp2.c_str()); + + return 0; } diff --git a/libcxx/test/std/input.output/file.streams/fstreams/fstream.assign/move_assign.pass.cpp b/libcxx/test/std/input.output/file.streams/fstreams/fstream.assign/move_assign.pass.cpp index 4ee860a8e9ff3..d2cc6ce722f99 100644 --- a/libcxx/test/std/input.output/file.streams/fstreams/fstream.assign/move_assign.pass.cpp +++ b/libcxx/test/std/input.output/file.streams/fstreams/fstream.assign/move_assign.pass.cpp @@ -19,7 +19,7 @@ #include #include "platform_support.h" -int main() +int main(int, char**) { std::string temp = get_temp_file_name(); { @@ -46,4 +46,6 @@ int main() assert(x == 3.25); } std::remove(temp.c_str()); + + return 0; } diff --git a/libcxx/test/std/input.output/file.streams/fstreams/fstream.assign/nonmember_swap.pass.cpp b/libcxx/test/std/input.output/file.streams/fstreams/fstream.assign/nonmember_swap.pass.cpp index 5a2d826bea61b..071ca5d85e734 100644 --- a/libcxx/test/std/input.output/file.streams/fstreams/fstream.assign/nonmember_swap.pass.cpp +++ b/libcxx/test/std/input.output/file.streams/fstreams/fstream.assign/nonmember_swap.pass.cpp @@ -37,7 +37,7 @@ std::pair get_temp_file_names() { return names; } -int main() +int main(int, char**) { std::pair temp_files = get_temp_file_names(); std::string& temp1 = temp_files.first; @@ -89,4 +89,6 @@ int main() } std::remove(temp1.c_str()); std::remove(temp2.c_str()); + + return 0; } diff --git a/libcxx/test/std/input.output/file.streams/fstreams/fstream.cons/default.pass.cpp b/libcxx/test/std/input.output/file.streams/fstreams/fstream.cons/default.pass.cpp index ede9fd2393a14..b38bbb4431f66 100644 --- a/libcxx/test/std/input.output/file.streams/fstreams/fstream.cons/default.pass.cpp +++ b/libcxx/test/std/input.output/file.streams/fstreams/fstream.cons/default.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { std::fstream fs; @@ -24,4 +24,6 @@ int main() { std::wfstream fs; } + + return 0; } diff --git a/libcxx/test/std/input.output/file.streams/fstreams/fstream.cons/move.pass.cpp b/libcxx/test/std/input.output/file.streams/fstreams/fstream.cons/move.pass.cpp index a213cc64308e4..fb639f1c50b78 100644 --- a/libcxx/test/std/input.output/file.streams/fstreams/fstream.cons/move.pass.cpp +++ b/libcxx/test/std/input.output/file.streams/fstreams/fstream.cons/move.pass.cpp @@ -19,7 +19,7 @@ #include #include "platform_support.h" -int main() +int main(int, char**) { std::string temp = get_temp_file_name(); { @@ -44,4 +44,6 @@ int main() assert(x == 3.25); } std::remove(temp.c_str()); + + return 0; } diff --git a/libcxx/test/std/input.output/file.streams/fstreams/fstream.cons/path.pass.cpp b/libcxx/test/std/input.output/file.streams/fstreams/fstream.cons/path.pass.cpp index f63ae6bddbb65..d86b4b6ccf87d 100644 --- a/libcxx/test/std/input.output/file.streams/fstreams/fstream.cons/path.pass.cpp +++ b/libcxx/test/std/input.output/file.streams/fstreams/fstream.cons/path.pass.cpp @@ -23,7 +23,7 @@ namespace fs = std::filesystem; -int main() { +int main(int, char**) { fs::path p = get_temp_file_name(); { std::fstream fs(p, std::ios_base::in | std::ios_base::out | @@ -45,4 +45,6 @@ int main() { assert(x == 3.25); } std::remove(p.c_str()); + + return 0; } diff --git a/libcxx/test/std/input.output/file.streams/fstreams/fstream.cons/pointer.pass.cpp b/libcxx/test/std/input.output/file.streams/fstreams/fstream.cons/pointer.pass.cpp index 07a6a41134f1a..4cade955b9b41 100644 --- a/libcxx/test/std/input.output/file.streams/fstreams/fstream.cons/pointer.pass.cpp +++ b/libcxx/test/std/input.output/file.streams/fstreams/fstream.cons/pointer.pass.cpp @@ -17,7 +17,7 @@ #include #include "platform_support.h" -int main() +int main(int, char**) { std::string temp = get_temp_file_name(); { @@ -40,4 +40,6 @@ int main() assert(x == 3.25); } std::remove(temp.c_str()); + + return 0; } diff --git a/libcxx/test/std/input.output/file.streams/fstreams/fstream.cons/string.pass.cpp b/libcxx/test/std/input.output/file.streams/fstreams/fstream.cons/string.pass.cpp index 36546035cce60..15a2c70239366 100644 --- a/libcxx/test/std/input.output/file.streams/fstreams/fstream.cons/string.pass.cpp +++ b/libcxx/test/std/input.output/file.streams/fstreams/fstream.cons/string.pass.cpp @@ -17,7 +17,7 @@ #include #include "platform_support.h" -int main() +int main(int, char**) { std::string temp = get_temp_file_name(); { @@ -42,4 +42,6 @@ int main() assert(x == 3.25); } std::remove(temp.c_str()); + + return 0; } diff --git a/libcxx/test/std/input.output/file.streams/fstreams/fstream.members/close.pass.cpp b/libcxx/test/std/input.output/file.streams/fstreams/fstream.members/close.pass.cpp index 818f73be8f094..94a06c4670cca 100644 --- a/libcxx/test/std/input.output/file.streams/fstreams/fstream.members/close.pass.cpp +++ b/libcxx/test/std/input.output/file.streams/fstreams/fstream.members/close.pass.cpp @@ -17,7 +17,7 @@ #include #include "platform_support.h" -int main() +int main(int, char**) { std::string temp = get_temp_file_name(); { @@ -38,4 +38,6 @@ int main() assert(!fs.is_open()); } std::remove(temp.c_str()); + + return 0; } diff --git a/libcxx/test/std/input.output/file.streams/fstreams/fstream.members/open_path.pass.cpp b/libcxx/test/std/input.output/file.streams/fstreams/fstream.members/open_path.pass.cpp index d6722076a97cf..799829e2bb291 100644 --- a/libcxx/test/std/input.output/file.streams/fstreams/fstream.members/open_path.pass.cpp +++ b/libcxx/test/std/input.output/file.streams/fstreams/fstream.members/open_path.pass.cpp @@ -20,7 +20,7 @@ #include #include "platform_support.h" -int main() { +int main(int, char**) { std::filesystem::path p = get_temp_file_name(); { std::fstream stream; @@ -48,4 +48,6 @@ int main() { assert(x == 3.25); } std::remove(p.c_str()); + + return 0; } diff --git a/libcxx/test/std/input.output/file.streams/fstreams/fstream.members/open_pointer.pass.cpp b/libcxx/test/std/input.output/file.streams/fstreams/fstream.members/open_pointer.pass.cpp index 07f5c18f561a8..32f1d0096a301 100644 --- a/libcxx/test/std/input.output/file.streams/fstreams/fstream.members/open_pointer.pass.cpp +++ b/libcxx/test/std/input.output/file.streams/fstreams/fstream.members/open_pointer.pass.cpp @@ -17,7 +17,7 @@ #include #include "platform_support.h" -int main() +int main(int, char**) { std::string temp = get_temp_file_name(); { @@ -46,4 +46,6 @@ int main() assert(x == 3.25); } std::remove(temp.c_str()); + + return 0; } diff --git a/libcxx/test/std/input.output/file.streams/fstreams/fstream.members/open_string.pass.cpp b/libcxx/test/std/input.output/file.streams/fstreams/fstream.members/open_string.pass.cpp index 4bc436b3822b8..90cd5611701bd 100644 --- a/libcxx/test/std/input.output/file.streams/fstreams/fstream.members/open_string.pass.cpp +++ b/libcxx/test/std/input.output/file.streams/fstreams/fstream.members/open_string.pass.cpp @@ -17,7 +17,7 @@ #include #include "platform_support.h" -int main() +int main(int, char**) { std::string temp = get_temp_file_name(); { @@ -46,4 +46,6 @@ int main() assert(x == 3.25); } std::remove(temp.c_str()); + + return 0; } diff --git a/libcxx/test/std/input.output/file.streams/fstreams/fstream.members/rdbuf.pass.cpp b/libcxx/test/std/input.output/file.streams/fstreams/fstream.members/rdbuf.pass.cpp index ecbc15bc3e5e6..0f39fc63b6227 100644 --- a/libcxx/test/std/input.output/file.streams/fstreams/fstream.members/rdbuf.pass.cpp +++ b/libcxx/test/std/input.output/file.streams/fstreams/fstream.members/rdbuf.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { std::fstream fs; @@ -26,4 +26,6 @@ int main() std::wfstream fs; assert(fs.rdbuf()); } + + return 0; } diff --git a/libcxx/test/std/input.output/file.streams/fstreams/fstream/types.pass.cpp b/libcxx/test/std/input.output/file.streams/fstreams/fstream/types.pass.cpp index 3f81e18f4baa9..783cfa3a7369f 100644 --- a/libcxx/test/std/input.output/file.streams/fstreams/fstream/types.pass.cpp +++ b/libcxx/test/std/input.output/file.streams/fstreams/fstream/types.pass.cpp @@ -22,7 +22,7 @@ #include #include -int main() +int main(int, char**) { static_assert((std::is_base_of, std::basic_fstream >::value), ""); static_assert((std::is_same::char_type, char>::value), ""); @@ -30,4 +30,6 @@ int main() static_assert((std::is_same::int_type, std::char_traits::int_type>::value), ""); static_assert((std::is_same::pos_type, std::char_traits::pos_type>::value), ""); static_assert((std::is_same::off_type, std::char_traits::off_type>::value), ""); + + return 0; } diff --git a/libcxx/test/std/input.output/file.streams/fstreams/ifstream.assign/member_swap.pass.cpp b/libcxx/test/std/input.output/file.streams/fstreams/ifstream.assign/member_swap.pass.cpp index e30a9c0600d60..17b88140d540e 100644 --- a/libcxx/test/std/input.output/file.streams/fstreams/ifstream.assign/member_swap.pass.cpp +++ b/libcxx/test/std/input.output/file.streams/fstreams/ifstream.assign/member_swap.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { std::ifstream fs1("test.dat"); @@ -38,4 +38,6 @@ int main() fs2 >> x; assert(x == 3.25); } + + return 0; } diff --git a/libcxx/test/std/input.output/file.streams/fstreams/ifstream.assign/move_assign.pass.cpp b/libcxx/test/std/input.output/file.streams/fstreams/ifstream.assign/move_assign.pass.cpp index 9ccd54eec8f01..d5fe0984ee617 100644 --- a/libcxx/test/std/input.output/file.streams/fstreams/ifstream.assign/move_assign.pass.cpp +++ b/libcxx/test/std/input.output/file.streams/fstreams/ifstream.assign/move_assign.pass.cpp @@ -18,7 +18,7 @@ #include #include -int main() +int main(int, char**) { { std::ifstream fso("test.dat"); @@ -36,4 +36,6 @@ int main() fs >> x; assert(x == 3.25); } + + return 0; } diff --git a/libcxx/test/std/input.output/file.streams/fstreams/ifstream.assign/nonmember_swap.pass.cpp b/libcxx/test/std/input.output/file.streams/fstreams/ifstream.assign/nonmember_swap.pass.cpp index c008fe50fb7f0..c4cd592d11e28 100644 --- a/libcxx/test/std/input.output/file.streams/fstreams/ifstream.assign/nonmember_swap.pass.cpp +++ b/libcxx/test/std/input.output/file.streams/fstreams/ifstream.assign/nonmember_swap.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { { std::ifstream fs1("test.dat"); @@ -39,4 +39,6 @@ int main() fs2 >> x; assert(x == 3.25); } + + return 0; } diff --git a/libcxx/test/std/input.output/file.streams/fstreams/ifstream.cons/default.pass.cpp b/libcxx/test/std/input.output/file.streams/fstreams/ifstream.cons/default.pass.cpp index 896903d36d2f2..7e76d6f8aef88 100644 --- a/libcxx/test/std/input.output/file.streams/fstreams/ifstream.cons/default.pass.cpp +++ b/libcxx/test/std/input.output/file.streams/fstreams/ifstream.cons/default.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { std::ifstream fs; @@ -24,4 +24,6 @@ int main() { std::wifstream fs; } + + return 0; } diff --git a/libcxx/test/std/input.output/file.streams/fstreams/ifstream.cons/move.pass.cpp b/libcxx/test/std/input.output/file.streams/fstreams/ifstream.cons/move.pass.cpp index c7e389e3a70b7..d8a58ac53ceea 100644 --- a/libcxx/test/std/input.output/file.streams/fstreams/ifstream.cons/move.pass.cpp +++ b/libcxx/test/std/input.output/file.streams/fstreams/ifstream.cons/move.pass.cpp @@ -18,7 +18,7 @@ #include #include -int main() +int main(int, char**) { { std::ifstream fso("test.dat"); @@ -34,4 +34,6 @@ int main() fs >> x; assert(x == 3.25); } + + return 0; } diff --git a/libcxx/test/std/input.output/file.streams/fstreams/ifstream.cons/path.pass.cpp b/libcxx/test/std/input.output/file.streams/fstreams/ifstream.cons/path.pass.cpp index 7d6da5b271e33..8a3a361bb398f 100644 --- a/libcxx/test/std/input.output/file.streams/fstreams/ifstream.cons/path.pass.cpp +++ b/libcxx/test/std/input.output/file.streams/fstreams/ifstream.cons/path.pass.cpp @@ -22,7 +22,7 @@ namespace fs = std::filesystem; -int main() { +int main(int, char**) { { fs::path p; static_assert(!std::is_convertible::value, @@ -49,4 +49,6 @@ int main() { // std::wifstream(const fs::path&, std::ios_base::openmode) is tested in // test/std/input.output/file.streams/fstreams/ofstream.cons/string.pass.cpp // which creates writable files. + + return 0; } diff --git a/libcxx/test/std/input.output/file.streams/fstreams/ifstream.cons/pointer.pass.cpp b/libcxx/test/std/input.output/file.streams/fstreams/ifstream.cons/pointer.pass.cpp index 6e0bb2984cce1..d44b3be75d15b 100644 --- a/libcxx/test/std/input.output/file.streams/fstreams/ifstream.cons/pointer.pass.cpp +++ b/libcxx/test/std/input.output/file.streams/fstreams/ifstream.cons/pointer.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { std::ifstream fs("test.dat"); @@ -36,4 +36,6 @@ int main() // std::wifstream(const char*, std::ios_base::openmode) is tested in // test/std/input.output/file.streams/fstreams/ofstream.cons/pointer.pass.cpp // which creates writable files. + + return 0; } diff --git a/libcxx/test/std/input.output/file.streams/fstreams/ifstream.cons/string.pass.cpp b/libcxx/test/std/input.output/file.streams/fstreams/ifstream.cons/string.pass.cpp index a0d90e2559512..c4e979e30c6fc 100644 --- a/libcxx/test/std/input.output/file.streams/fstreams/ifstream.cons/string.pass.cpp +++ b/libcxx/test/std/input.output/file.streams/fstreams/ifstream.cons/string.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { std::ifstream fs(std::string("test.dat")); @@ -36,4 +36,6 @@ int main() // std::wifstream(const std::string&, std::ios_base::openmode) is tested in // test/std/input.output/file.streams/fstreams/ofstream.cons/string.pass.cpp // which creates writable files. + + return 0; } diff --git a/libcxx/test/std/input.output/file.streams/fstreams/ifstream.members/close.pass.cpp b/libcxx/test/std/input.output/file.streams/fstreams/ifstream.members/close.pass.cpp index 609ca4ac15889..e72bd548763f1 100644 --- a/libcxx/test/std/input.output/file.streams/fstreams/ifstream.members/close.pass.cpp +++ b/libcxx/test/std/input.output/file.streams/fstreams/ifstream.members/close.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { std::ifstream fs; @@ -34,4 +34,6 @@ int main() fs.close(); assert(!fs.is_open()); } + + return 0; } diff --git a/libcxx/test/std/input.output/file.streams/fstreams/ifstream.members/open_path.pass.cpp b/libcxx/test/std/input.output/file.streams/fstreams/ifstream.members/open_path.pass.cpp index 4432ea5c62160..bce5fb97dd182 100644 --- a/libcxx/test/std/input.output/file.streams/fstreams/ifstream.members/open_path.pass.cpp +++ b/libcxx/test/std/input.output/file.streams/fstreams/ifstream.members/open_path.pass.cpp @@ -19,7 +19,7 @@ #include #include -int main() { +int main(int, char**) { { std::ifstream fs; assert(!fs.is_open()); @@ -44,4 +44,6 @@ int main() { fs >> c; assert(c == L'r'); } + + return 0; } diff --git a/libcxx/test/std/input.output/file.streams/fstreams/ifstream.members/open_pointer.pass.cpp b/libcxx/test/std/input.output/file.streams/fstreams/ifstream.members/open_pointer.pass.cpp index 3a12c985291f5..50ec53fdc7827 100644 --- a/libcxx/test/std/input.output/file.streams/fstreams/ifstream.members/open_pointer.pass.cpp +++ b/libcxx/test/std/input.output/file.streams/fstreams/ifstream.members/open_pointer.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { std::ifstream fs; @@ -42,4 +42,6 @@ int main() fs >> c; assert(c == L'r'); } + + return 0; } diff --git a/libcxx/test/std/input.output/file.streams/fstreams/ifstream.members/open_string.pass.cpp b/libcxx/test/std/input.output/file.streams/fstreams/ifstream.members/open_string.pass.cpp index e6759ed8caedf..155ae0e631d3b 100644 --- a/libcxx/test/std/input.output/file.streams/fstreams/ifstream.members/open_string.pass.cpp +++ b/libcxx/test/std/input.output/file.streams/fstreams/ifstream.members/open_string.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { std::ifstream fs; @@ -42,4 +42,6 @@ int main() fs >> c; assert(c == L'r'); } + + return 0; } diff --git a/libcxx/test/std/input.output/file.streams/fstreams/ifstream.members/rdbuf.pass.cpp b/libcxx/test/std/input.output/file.streams/fstreams/ifstream.members/rdbuf.pass.cpp index ea64139f13ea1..455d2274e2b7c 100644 --- a/libcxx/test/std/input.output/file.streams/fstreams/ifstream.members/rdbuf.pass.cpp +++ b/libcxx/test/std/input.output/file.streams/fstreams/ifstream.members/rdbuf.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { std::ifstream fs("test.dat"); @@ -28,4 +28,6 @@ int main() std::wfilebuf* fb = fs.rdbuf(); assert(fb->sgetc() == L'r'); } + + return 0; } diff --git a/libcxx/test/std/input.output/file.streams/fstreams/ifstream/types.pass.cpp b/libcxx/test/std/input.output/file.streams/fstreams/ifstream/types.pass.cpp index a3b441f93867d..620c3960895b4 100644 --- a/libcxx/test/std/input.output/file.streams/fstreams/ifstream/types.pass.cpp +++ b/libcxx/test/std/input.output/file.streams/fstreams/ifstream/types.pass.cpp @@ -22,7 +22,7 @@ #include #include -int main() +int main(int, char**) { static_assert((std::is_base_of, std::basic_ifstream >::value), ""); static_assert((std::is_same::char_type, char>::value), ""); @@ -30,4 +30,6 @@ int main() static_assert((std::is_same::int_type, std::char_traits::int_type>::value), ""); static_assert((std::is_same::pos_type, std::char_traits::pos_type>::value), ""); static_assert((std::is_same::off_type, std::char_traits::off_type>::value), ""); + + return 0; } diff --git a/libcxx/test/std/input.output/file.streams/fstreams/ofstream.assign/member_swap.pass.cpp b/libcxx/test/std/input.output/file.streams/fstreams/ofstream.assign/member_swap.pass.cpp index 89e32e97f7621..fcfb94ecf20d1 100644 --- a/libcxx/test/std/input.output/file.streams/fstreams/ofstream.assign/member_swap.pass.cpp +++ b/libcxx/test/std/input.output/file.streams/fstreams/ofstream.assign/member_swap.pass.cpp @@ -35,7 +35,7 @@ std::pair get_temp_file_names() { return names; } -int main() +int main(int, char**) { std::pair temp_files = get_temp_file_names(); std::string& temp1 = temp_files.first; @@ -95,4 +95,6 @@ int main() assert(x == 3.25); } std::remove(temp2.c_str()); + + return 0; } diff --git a/libcxx/test/std/input.output/file.streams/fstreams/ofstream.assign/move_assign.pass.cpp b/libcxx/test/std/input.output/file.streams/fstreams/ofstream.assign/move_assign.pass.cpp index 1eba0d576a07c..fbc3bf59738c3 100644 --- a/libcxx/test/std/input.output/file.streams/fstreams/ofstream.assign/move_assign.pass.cpp +++ b/libcxx/test/std/input.output/file.streams/fstreams/ofstream.assign/move_assign.pass.cpp @@ -19,7 +19,7 @@ #include #include "platform_support.h" -int main() +int main(int, char**) { std::string temp = get_temp_file_name(); { @@ -48,4 +48,6 @@ int main() assert(x == 3.25); } std::remove(temp.c_str()); + + return 0; } diff --git a/libcxx/test/std/input.output/file.streams/fstreams/ofstream.assign/nonmember_swap.pass.cpp b/libcxx/test/std/input.output/file.streams/fstreams/ofstream.assign/nonmember_swap.pass.cpp index 4190db3a6c1f6..3cbf508d94e76 100644 --- a/libcxx/test/std/input.output/file.streams/fstreams/ofstream.assign/nonmember_swap.pass.cpp +++ b/libcxx/test/std/input.output/file.streams/fstreams/ofstream.assign/nonmember_swap.pass.cpp @@ -36,7 +36,7 @@ std::pair get_temp_file_names() { return names; } -int main() +int main(int, char**) { std::pair temp_files = get_temp_file_names(); std::string& temp1 = temp_files.first; @@ -96,4 +96,6 @@ int main() assert(x == 3.25); } std::remove(temp2.c_str()); + + return 0; } diff --git a/libcxx/test/std/input.output/file.streams/fstreams/ofstream.cons/default.pass.cpp b/libcxx/test/std/input.output/file.streams/fstreams/ofstream.cons/default.pass.cpp index f87bb1e7965d7..baa4bfe9d8af3 100644 --- a/libcxx/test/std/input.output/file.streams/fstreams/ofstream.cons/default.pass.cpp +++ b/libcxx/test/std/input.output/file.streams/fstreams/ofstream.cons/default.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { std::ofstream fs; @@ -24,4 +24,6 @@ int main() { std::wofstream fs; } + + return 0; } diff --git a/libcxx/test/std/input.output/file.streams/fstreams/ofstream.cons/move.pass.cpp b/libcxx/test/std/input.output/file.streams/fstreams/ofstream.cons/move.pass.cpp index 85fcffee48509..3a3e11e9114ce 100644 --- a/libcxx/test/std/input.output/file.streams/fstreams/ofstream.cons/move.pass.cpp +++ b/libcxx/test/std/input.output/file.streams/fstreams/ofstream.cons/move.pass.cpp @@ -19,7 +19,7 @@ #include #include "platform_support.h" -int main() +int main(int, char**) { std::string temp = get_temp_file_name(); { @@ -46,4 +46,6 @@ int main() assert(x == 3.25); } std::remove(temp.c_str()); + + return 0; } diff --git a/libcxx/test/std/input.output/file.streams/fstreams/ofstream.cons/path.pass.cpp b/libcxx/test/std/input.output/file.streams/fstreams/ofstream.cons/path.pass.cpp index bad7e4f642819..254d696aaf7ab 100644 --- a/libcxx/test/std/input.output/file.streams/fstreams/ofstream.cons/path.pass.cpp +++ b/libcxx/test/std/input.output/file.streams/fstreams/ofstream.cons/path.pass.cpp @@ -22,7 +22,7 @@ namespace fs = std::filesystem; -int main() { +int main(int, char**) { fs::path p = get_temp_file_name(); { static_assert(!std::is_convertible::value, @@ -65,4 +65,6 @@ int main() { assert(x == 3.25); } std::remove(p.c_str()); + + return 0; } diff --git a/libcxx/test/std/input.output/file.streams/fstreams/ofstream.cons/pointer.pass.cpp b/libcxx/test/std/input.output/file.streams/fstreams/ofstream.cons/pointer.pass.cpp index 5e4a18d1ed795..ce23d5e36f418 100644 --- a/libcxx/test/std/input.output/file.streams/fstreams/ofstream.cons/pointer.pass.cpp +++ b/libcxx/test/std/input.output/file.streams/fstreams/ofstream.cons/pointer.pass.cpp @@ -17,7 +17,7 @@ #include #include "platform_support.h" -int main() +int main(int, char**) { std::string temp = get_temp_file_name(); { @@ -54,4 +54,6 @@ int main() assert(x == 3.25); } std::remove(temp.c_str()); + + return 0; } diff --git a/libcxx/test/std/input.output/file.streams/fstreams/ofstream.cons/string.pass.cpp b/libcxx/test/std/input.output/file.streams/fstreams/ofstream.cons/string.pass.cpp index 41e739abbe29e..c19c278f457de 100644 --- a/libcxx/test/std/input.output/file.streams/fstreams/ofstream.cons/string.pass.cpp +++ b/libcxx/test/std/input.output/file.streams/fstreams/ofstream.cons/string.pass.cpp @@ -17,7 +17,7 @@ #include #include "platform_support.h" -int main() +int main(int, char**) { std::string temp = get_temp_file_name(); { @@ -54,4 +54,6 @@ int main() assert(x == 3.25); } std::remove(temp.c_str()); + + return 0; } diff --git a/libcxx/test/std/input.output/file.streams/fstreams/ofstream.members/close.pass.cpp b/libcxx/test/std/input.output/file.streams/fstreams/ofstream.members/close.pass.cpp index 00a7041915310..3ea39985ecbee 100644 --- a/libcxx/test/std/input.output/file.streams/fstreams/ofstream.members/close.pass.cpp +++ b/libcxx/test/std/input.output/file.streams/fstreams/ofstream.members/close.pass.cpp @@ -17,7 +17,7 @@ #include #include "platform_support.h" -int main() +int main(int, char**) { std::string temp = get_temp_file_name(); { @@ -38,4 +38,6 @@ int main() assert(!fs.is_open()); } std::remove(temp.c_str()); + + return 0; } diff --git a/libcxx/test/std/input.output/file.streams/fstreams/ofstream.members/open_path.pass.cpp b/libcxx/test/std/input.output/file.streams/fstreams/ofstream.members/open_path.pass.cpp index 857b6c68f84de..1b783f6d5e89e 100644 --- a/libcxx/test/std/input.output/file.streams/fstreams/ofstream.members/open_path.pass.cpp +++ b/libcxx/test/std/input.output/file.streams/fstreams/ofstream.members/open_path.pass.cpp @@ -22,7 +22,7 @@ namespace fs = std::filesystem; -int main() { +int main(int, char**) { fs::path p = get_temp_file_name(); { std::ofstream fs; @@ -58,4 +58,6 @@ int main() { assert(c == L'a'); } std::remove(p.c_str()); + + return 0; } diff --git a/libcxx/test/std/input.output/file.streams/fstreams/ofstream.members/open_pointer.pass.cpp b/libcxx/test/std/input.output/file.streams/fstreams/ofstream.members/open_pointer.pass.cpp index 689622741d0c6..5bf58814d26eb 100644 --- a/libcxx/test/std/input.output/file.streams/fstreams/ofstream.members/open_pointer.pass.cpp +++ b/libcxx/test/std/input.output/file.streams/fstreams/ofstream.members/open_pointer.pass.cpp @@ -17,7 +17,7 @@ #include #include "platform_support.h" -int main() +int main(int, char**) { std::string temp = get_temp_file_name(); { @@ -54,4 +54,6 @@ int main() assert(c == L'a'); } std::remove(temp.c_str()); + + return 0; } diff --git a/libcxx/test/std/input.output/file.streams/fstreams/ofstream.members/open_string.pass.cpp b/libcxx/test/std/input.output/file.streams/fstreams/ofstream.members/open_string.pass.cpp index 6a223891a6b6c..52db618e1050d 100644 --- a/libcxx/test/std/input.output/file.streams/fstreams/ofstream.members/open_string.pass.cpp +++ b/libcxx/test/std/input.output/file.streams/fstreams/ofstream.members/open_string.pass.cpp @@ -17,7 +17,7 @@ #include #include "platform_support.h" -int main() +int main(int, char**) { std::string temp = get_temp_file_name(); { @@ -54,4 +54,6 @@ int main() assert(c == L'a'); } std::remove(temp.c_str()); + + return 0; } diff --git a/libcxx/test/std/input.output/file.streams/fstreams/ofstream.members/rdbuf.pass.cpp b/libcxx/test/std/input.output/file.streams/fstreams/ofstream.members/rdbuf.pass.cpp index 6e8f2fc369e87..a7b51fb35d69d 100644 --- a/libcxx/test/std/input.output/file.streams/fstreams/ofstream.members/rdbuf.pass.cpp +++ b/libcxx/test/std/input.output/file.streams/fstreams/ofstream.members/rdbuf.pass.cpp @@ -17,7 +17,7 @@ #include #include "platform_support.h" -int main() +int main(int, char**) { std::string temp = get_temp_file_name(); { @@ -32,4 +32,6 @@ int main() assert(fb->sputc(L'r') == L'r'); } std::remove(temp.c_str()); + + return 0; } diff --git a/libcxx/test/std/input.output/file.streams/fstreams/ofstream/types.pass.cpp b/libcxx/test/std/input.output/file.streams/fstreams/ofstream/types.pass.cpp index 1feb4214a7580..231807195f1c3 100644 --- a/libcxx/test/std/input.output/file.streams/fstreams/ofstream/types.pass.cpp +++ b/libcxx/test/std/input.output/file.streams/fstreams/ofstream/types.pass.cpp @@ -22,7 +22,7 @@ #include #include -int main() +int main(int, char**) { static_assert((std::is_base_of, std::basic_ofstream >::value), ""); static_assert((std::is_same::char_type, char>::value), ""); @@ -30,4 +30,6 @@ int main() static_assert((std::is_same::int_type, std::char_traits::int_type>::value), ""); static_assert((std::is_same::pos_type, std::char_traits::pos_type>::value), ""); static_assert((std::is_same::off_type, std::char_traits::off_type>::value), ""); + + return 0; } diff --git a/libcxx/test/std/input.output/file.streams/nothing_to_do.pass.cpp b/libcxx/test/std/input.output/file.streams/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/input.output/file.streams/nothing_to_do.pass.cpp +++ b/libcxx/test/std/input.output/file.streams/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.cons/default.pass.cpp b/libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.cons/default.pass.cpp index 106eb033fd5f5..1cb88a3510f68 100644 --- a/libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.cons/default.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.cons/default.pass.cpp @@ -18,7 +18,7 @@ #include #include -int main() { +int main(int, char**) { using namespace fs; // Default { @@ -27,4 +27,6 @@ int main() { directory_entry e; assert(e.path() == path()); } + + return 0; } diff --git a/libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.cons/default_const.pass.cpp b/libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.cons/default_const.pass.cpp index 8562312432f8a..0f681531a0913 100644 --- a/libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.cons/default_const.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.cons/default_const.pass.cpp @@ -19,7 +19,7 @@ #include #include -int main() { +int main(int, char**) { using namespace fs; // Default { @@ -28,4 +28,6 @@ int main() { const directory_entry e; assert(e.path() == path()); } + + return 0; } diff --git a/libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.obs/comparisons.pass.cpp b/libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.obs/comparisons.pass.cpp index 10e8c63b6d0ce..12158349ef868 100644 --- a/libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.obs/comparisons.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.obs/comparisons.pass.cpp @@ -74,7 +74,9 @@ void test_comparisons_simple() { } } -int main() { +int main(int, char**) { test_comparison_signatures(); test_comparisons_simple(); + + return 0; } diff --git a/libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.obs/path.pass.cpp b/libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.obs/path.pass.cpp index 185b0ef4a2450..28bd2752ec0ed 100644 --- a/libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.obs/path.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.obs/path.pass.cpp @@ -81,7 +81,9 @@ void test_path_conversion() { } } -int main() { +int main(int, char**) { test_path_method(); test_path_conversion(); + + return 0; } diff --git a/libcxx/test/std/input.output/filesystems/class.directory_iterator/directory_iterator.members/default_ctor.pass.cpp b/libcxx/test/std/input.output/filesystems/class.directory_iterator/directory_iterator.members/default_ctor.pass.cpp index c318bdb33f68a..9f60ec2867454 100644 --- a/libcxx/test/std/input.output/filesystems/class.directory_iterator/directory_iterator.members/default_ctor.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.directory_iterator/directory_iterator.members/default_ctor.pass.cpp @@ -22,7 +22,7 @@ #include "test_macros.h" -int main() { +int main(int, char**) { { static_assert(std::is_nothrow_default_constructible::value, ""); } @@ -31,4 +31,6 @@ int main() { const fs::directory_iterator d2; assert(d1 == d2); } + + return 0; } diff --git a/libcxx/test/std/input.output/filesystems/class.directory_iterator/types.pass.cpp b/libcxx/test/std/input.output/filesystems/class.directory_iterator/types.pass.cpp index bac6939035cb5..3932be0216bd6 100644 --- a/libcxx/test/std/input.output/filesystems/class.directory_iterator/types.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.directory_iterator/types.pass.cpp @@ -25,7 +25,7 @@ #include "test_macros.h" -int main() { +int main(int, char**) { using namespace fs; using D = directory_iterator; ASSERT_SAME_TYPE(D::value_type, directory_entry); @@ -33,4 +33,6 @@ int main() { ASSERT_SAME_TYPE(D::pointer, const directory_entry*); ASSERT_SAME_TYPE(D::reference, const directory_entry&); ASSERT_SAME_TYPE(D::iterator_category, std::input_iterator_tag); + + return 0; } diff --git a/libcxx/test/std/input.output/filesystems/class.file_status/file_status.cons.pass.cpp b/libcxx/test/std/input.output/filesystems/class.file_status/file_status.cons.pass.cpp index 53c619bd8e93d..74fdaaf208440 100644 --- a/libcxx/test/std/input.output/filesystems/class.file_status/file_status.cons.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.file_status/file_status.cons.pass.cpp @@ -22,7 +22,7 @@ #include "test_convertible.hpp" -int main() { +int main(int, char**) { using namespace fs; // Default ctor { @@ -56,4 +56,6 @@ int main() { assert(f.type() == file_type::regular); assert(f.permissions() == perms::owner_read); } + + return 0; } diff --git a/libcxx/test/std/input.output/filesystems/class.file_status/file_status.mods.pass.cpp b/libcxx/test/std/input.output/filesystems/class.file_status/file_status.mods.pass.cpp index 38573beaca857..0ee9f709ba49a 100644 --- a/libcxx/test/std/input.output/filesystems/class.file_status/file_status.mods.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.file_status/file_status.mods.pass.cpp @@ -20,7 +20,7 @@ #include -int main() { +int main(int, char**) { using namespace fs; file_status st; @@ -45,4 +45,6 @@ int main() { st.permissions(perms::owner_read); assert(st.permissions() == perms::owner_read); } + + return 0; } diff --git a/libcxx/test/std/input.output/filesystems/class.file_status/file_status.obs.pass.cpp b/libcxx/test/std/input.output/filesystems/class.file_status/file_status.obs.pass.cpp index 676ceea8dcc9c..ec4863139f487 100644 --- a/libcxx/test/std/input.output/filesystems/class.file_status/file_status.obs.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.file_status/file_status.obs.pass.cpp @@ -20,7 +20,7 @@ #include -int main() { +int main(int, char**) { using namespace fs; const file_status st(file_type::regular, perms::owner_read); @@ -41,4 +41,6 @@ int main() { "operation must return perms"); assert(st.permissions() == perms::owner_read); } + + return 0; } diff --git a/libcxx/test/std/input.output/filesystems/class.filesystem_error/filesystem_error.members.pass.cpp b/libcxx/test/std/input.output/filesystems/class.filesystem_error/filesystem_error.members.pass.cpp index 075a4137d3ac1..d9d1a03332d63 100644 --- a/libcxx/test/std/input.output/filesystems/class.filesystem_error/filesystem_error.members.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.filesystem_error/filesystem_error.members.pass.cpp @@ -94,8 +94,10 @@ void test_signatures() } } -int main() { +int main(int, char**) { static_assert(std::is_base_of::value, ""); test_constructors(); test_signatures(); + + return 0; } diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.itr/iterator.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.itr/iterator.pass.cpp index de1e413be2474..558206d7082f4 100644 --- a/libcxx/test/std/input.output/filesystems/class.path/path.itr/iterator.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.itr/iterator.pass.cpp @@ -97,8 +97,10 @@ void checkBeginEndBasic() { } -int main() { +int main(int, char**) { using namespace fs; checkIteratorConcepts(); checkBeginEndBasic(); // See path.decompose.pass.cpp for more tests. + + return 0; } diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.append.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.append.pass.cpp index fb74c8e194617..2f468e595540a 100644 --- a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.append.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.append.pass.cpp @@ -311,7 +311,7 @@ void test_sfinae() } } -int main() +int main(int, char**) { using namespace fs; for (auto const & TC : Cases) { @@ -335,4 +335,6 @@ int main() doAppendSourceAllocTest(TC); } test_sfinae(); + + return 0; } diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.assign/braced_init.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.assign/braced_init.pass.cpp index eb45c0981d4cf..aff89f27bd396 100644 --- a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.assign/braced_init.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.assign/braced_init.pass.cpp @@ -22,9 +22,11 @@ #include "count_new.hpp" -int main() { +int main(int, char**) { using namespace fs; path p("abc"); p = {}; assert(p.native() == ""); + + return 0; } diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.assign/copy.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.assign/copy.pass.cpp index 04b8f63cbdd24..9265c70f6f425 100644 --- a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.assign/copy.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.assign/copy.pass.cpp @@ -21,7 +21,7 @@ #include "test_macros.h" -int main() { +int main(int, char**) { using namespace fs; static_assert(std::is_copy_assignable::value, ""); static_assert(!std::is_nothrow_copy_assignable::value, "should not be noexcept"); @@ -32,4 +32,6 @@ int main() { assert(p.native() == s); assert(p2.native() == s); assert(&pref == &p2); + + return 0; } diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.assign/move.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.assign/move.pass.cpp index 12422c68e42b7..5e5fb1e0e06c9 100644 --- a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.assign/move.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.assign/move.pass.cpp @@ -22,7 +22,7 @@ #include "count_new.hpp" -int main() { +int main(int, char**) { using namespace fs; static_assert(std::is_nothrow_move_assignable::value, ""); assert(globalMemCounter.checkOutstandingNewEq(0)); @@ -38,4 +38,6 @@ int main() { assert(p.native() != s); // Testing moved from state assert(&pref == &p2); } + + return 0; } diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.assign/source.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.assign/source.pass.cpp index edc0b26384400..9c23e3b3ebf53 100644 --- a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.assign/source.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.assign/source.pass.cpp @@ -228,7 +228,7 @@ void RunStringMoveTest(const char* Expect) { } } -int main() { +int main(int, char**) { for (auto const& MS : PathList) { RunTestCase(MS); RunTestCase(MS); @@ -237,4 +237,6 @@ int main() { RunStringMoveTest(MS); } test_sfinae(); + + return 0; } diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.compare.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.compare.pass.cpp index 41efb7513fa7d..165e62fe4fe78 100644 --- a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.compare.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.compare.pass.cpp @@ -184,7 +184,9 @@ void test_compare_elements() { } } -int main() { +int main(int, char**) { test_compare_basic(); test_compare_elements(); + + return 0; } diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.concat.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.concat.pass.cpp index 842d70543a041..b074e831e15d2 100644 --- a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.concat.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.concat.pass.cpp @@ -325,7 +325,7 @@ void test_sfinae() { } } -int main() +int main(int, char**) { using namespace fs; for (auto const & TC : Cases) { @@ -384,4 +384,6 @@ int main() doConcatECharTest(TC); } test_sfinae(); + + return 0; } diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.construct/copy.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.construct/copy.pass.cpp index 789789779a443..1490c0b9fed8e 100644 --- a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.construct/copy.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.construct/copy.pass.cpp @@ -21,7 +21,7 @@ #include "test_macros.h" -int main() { +int main(int, char**) { using namespace fs; static_assert(std::is_copy_constructible::value, ""); static_assert(!std::is_nothrow_copy_constructible::value, "should not be noexcept"); @@ -30,4 +30,6 @@ int main() { path p2(p); assert(p.native() == s); assert(p2.native() == s); + + return 0; } diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.construct/default.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.construct/default.pass.cpp index 203c0e5ee613b..b31728da1f91a 100644 --- a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.construct/default.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.construct/default.pass.cpp @@ -21,9 +21,11 @@ #include "test_macros.h" -int main() { +int main(int, char**) { using namespace fs; static_assert(std::is_nothrow_default_constructible::value, ""); const path p; assert(p.empty()); + + return 0; } diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.construct/move.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.construct/move.pass.cpp index 4382de14170d8..494a77c3c8648 100644 --- a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.construct/move.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.construct/move.pass.cpp @@ -22,7 +22,7 @@ #include "count_new.hpp" -int main() { +int main(int, char**) { using namespace fs; static_assert(std::is_nothrow_move_constructible::value, ""); assert(globalMemCounter.checkOutstandingNewEq(0)); @@ -36,4 +36,6 @@ int main() { assert(p2.native() == s); assert(p.native() != s); // Testing moved from state } + + return 0; } diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.construct/source.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.construct/source.pass.cpp index b10d3aa88cda8..bcb9986cec919 100644 --- a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.construct/source.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.construct/source.pass.cpp @@ -117,7 +117,7 @@ void test_sfinae() { } } -int main() { +int main(int, char**) { for (auto const& MS : PathList) { RunTestCase(MS); RunTestCase(MS); @@ -125,4 +125,6 @@ int main() { RunTestCase(MS); } test_sfinae(); + + return 0; } diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.decompose/empty.fail.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.decompose/empty.fail.cpp index 481ffcde60f0d..5248f67515ae3 100644 --- a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.decompose/empty.fail.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.decompose/empty.fail.cpp @@ -20,8 +20,10 @@ #include "test_macros.h" -int main () +int main(int, char**) { fs::path c; c.empty(); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} + + return 0; } diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.decompose/path.decompose.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.decompose/path.decompose.pass.cpp index aa511cdf01427..be9cefb76a847 100644 --- a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.decompose/path.decompose.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.decompose/path.decompose.pass.cpp @@ -208,8 +208,10 @@ void decompFilenameTest() } } -int main() +int main(int, char**) { decompPathTest(); decompFilenameTest(); + + return 0; } diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.gen/lexically_normal.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.gen/lexically_normal.pass.cpp index 4d295eec5e62e..f1e616542e9af 100644 --- a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.gen/lexically_normal.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.gen/lexically_normal.pass.cpp @@ -26,7 +26,7 @@ #include "filesystem_test_helper.hpp" -int main() { +int main(int, char**) { // clang-format off struct { std::string input; diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.gen/lexically_relative_and_proximate.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.gen/lexically_relative_and_proximate.pass.cpp index 96fa1597b027e..7e31956ee502f 100644 --- a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.gen/lexically_relative_and_proximate.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.gen/lexically_relative_and_proximate.pass.cpp @@ -27,7 +27,7 @@ #include "filesystem_test_helper.hpp" -int main() { +int main(int, char**) { // clang-format off struct { std::string input; diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.generic.obs/generic_string_alloc.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.generic.obs/generic_string_alloc.pass.cpp index 7cb81ca000857..707a7010ffb4a 100644 --- a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.generic.obs/generic_string_alloc.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.generic.obs/generic_string_alloc.pass.cpp @@ -33,7 +33,7 @@ MultiStringType longString = MKSTR("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQR // generic_string forwards to string. Tests for // string() are in "path.native.op/string_alloc.pass.cpp". // generic_string is minimally tested here. -int main() +int main(int, char**) { using namespace fs; using CharT = wchar_t; @@ -51,4 +51,6 @@ int main() assert(Alloc::alloc_count > 0); assert(Alloc::outstanding_alloc() == 1); } + + return 0; } diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.generic.obs/named_overloads.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.generic.obs/named_overloads.pass.cpp index 2e33769cdb386..04ae673ac4871 100644 --- a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.generic.obs/named_overloads.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.generic.obs/named_overloads.pass.cpp @@ -31,7 +31,7 @@ MultiStringType longString = MKSTR("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/123456789/abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"); -int main() +int main(int, char**) { using namespace fs; auto const& MS = longString; @@ -57,4 +57,6 @@ int main() std::u32string s = p.generic_u32string(); assert(s == (const char32_t*)MS); } + + return 0; } diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.modifiers/clear.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.modifiers/clear.pass.cpp index a224dddfa9794..01538539fafee 100644 --- a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.modifiers/clear.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.modifiers/clear.pass.cpp @@ -24,7 +24,7 @@ #include "filesystem_test_helper.hpp" -int main() { +int main(int, char**) { using namespace fs; { path p; @@ -40,4 +40,6 @@ int main() { p2.clear(); assert(p2.empty()); } + + return 0; } diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.modifiers/make_preferred.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.modifiers/make_preferred.pass.cpp index 43393aba5dab7..4530ef8755497 100644 --- a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.modifiers/make_preferred.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.modifiers/make_preferred.pass.cpp @@ -39,7 +39,7 @@ const MakePreferredTestcase TestCases[] = , {"\\foo\\/bar\\/baz\\"} }; -int main() +int main(int, char**) { // This operation is an identity operation on linux. using namespace fs; @@ -50,4 +50,6 @@ int main() assert(p.native() == TC.value); assert(&Ref == &p); } + + return 0; } diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.modifiers/remove_filename.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.modifiers/remove_filename.pass.cpp index 42191379dbb10..7cb562c227ff8 100644 --- a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.modifiers/remove_filename.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.modifiers/remove_filename.pass.cpp @@ -57,7 +57,7 @@ const RemoveFilenameTestcase TestCases[] = , {"bar/../baz/./file.txt", "bar/../baz/./"} }; -int main() +int main(int, char**) { using namespace fs; for (auto const & TC : TestCases) { @@ -69,4 +69,6 @@ int main() assert(&Ref == &p); assert(!p.has_filename()); } + + return 0; } diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.modifiers/replace_extension.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.modifiers/replace_extension.pass.cpp index 70040c48ae558..6fec420baa029 100644 --- a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.modifiers/replace_extension.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.modifiers/replace_extension.pass.cpp @@ -51,7 +51,7 @@ const ReplaceExtensionTestcase NoArgCases[] = , {"foo..cpp", "foo.", ""} }; -int main() +int main(int, char**) { using namespace fs; for (auto const & TC : TestCases) { @@ -68,4 +68,6 @@ int main() assert(p == TC.expect); assert(&Ref == &p); } + + return 0; } diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.modifiers/replace_filename.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.modifiers/replace_filename.pass.cpp index 3635352210b7f..8142e7907314b 100644 --- a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.modifiers/replace_filename.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.modifiers/replace_filename.pass.cpp @@ -47,7 +47,7 @@ const ReplaceFilenameTestcase TestCases[] = , {"/foo\\baz/bong", "/foo\\baz/bar", "bar"} }; -int main() +int main(int, char**) { using namespace fs; for (auto const & TC : TestCases) { @@ -67,4 +67,6 @@ int main() ASSERT_EQ(p, p2); } } + + return 0; } diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.modifiers/swap.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.modifiers/swap.pass.cpp index ac623dbfcc522..2e9dac5e4386a 100644 --- a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.modifiers/swap.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.modifiers/swap.pass.cpp @@ -41,7 +41,7 @@ const SwapTestcase TestCases[] = #undef LONG_STR1 #undef LONG_STR2 -int main() +int main(int, char**) { using namespace fs; { @@ -76,4 +76,6 @@ int main() } assert(p1 == Val); } + + return 0; } diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.native.obs/c_str.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.native.obs/c_str.pass.cpp index 3f2fac696da4d..8b35ee8c80adc 100644 --- a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.native.obs/c_str.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.native.obs/c_str.pass.cpp @@ -23,7 +23,7 @@ #include "filesystem_test_helper.hpp" -int main() +int main(int, char**) { using namespace fs; const char* const value = "hello world"; @@ -38,4 +38,6 @@ int main() assert(p.c_str() == str_value); assert(p.native().c_str() == p.c_str()); } + + return 0; } diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.native.obs/named_overloads.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.native.obs/named_overloads.pass.cpp index 0d747b188959c..c06de9795e3c1 100644 --- a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.native.obs/named_overloads.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.native.obs/named_overloads.pass.cpp @@ -32,7 +32,7 @@ MultiStringType longString = MKSTR("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/123456789/abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"); -int main() +int main(int, char**) { using namespace fs; auto const& MS = longString; @@ -58,4 +58,6 @@ int main() std::u32string s = p.u32string(); assert(s == (const char32_t*)MS); } + + return 0; } diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.native.obs/native.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.native.obs/native.pass.cpp index 14feaf13e8e56..3b88b5d6c64d5 100644 --- a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.native.obs/native.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.native.obs/native.pass.cpp @@ -22,7 +22,7 @@ #include "filesystem_test_helper.hpp" -int main() +int main(int, char**) { using namespace fs; const char* const value = "hello world"; @@ -35,4 +35,6 @@ int main() path p(value); assert(p.native() == value); } + + return 0; } diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.native.obs/operator_string.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.native.obs/operator_string.pass.cpp index 53fdcc1603491..9f0069051fdc1 100644 --- a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.native.obs/operator_string.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.native.obs/operator_string.pass.cpp @@ -23,7 +23,7 @@ #include "filesystem_test_helper.hpp" -int main() +int main(int, char**) { using namespace fs; using string_type = path::string_type; @@ -42,4 +42,6 @@ int main() assert(s == value); assert(p == value); } + + return 0; } diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.native.obs/string_alloc.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.native.obs/string_alloc.pass.cpp index 86453f8d0b9c5..4ace380b873d8 100644 --- a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.native.obs/string_alloc.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.native.obs/string_alloc.pass.cpp @@ -116,7 +116,7 @@ void doLongStringTest(MultiStringType const& MS) { ///////////////////////////////////////////////////////////////////////////// } -int main() +int main(int, char**) { using namespace fs; { @@ -133,4 +133,6 @@ int main() doLongStringTest(S); doLongStringTest(S); } + + return 0; } diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.query/tested_in_path_decompose.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.query/tested_in_path_decompose.pass.cpp index d825788506b6e..32c37e7f7a5a4 100644 --- a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.query/tested_in_path_decompose.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.query/tested_in_path_decompose.pass.cpp @@ -28,4 +28,6 @@ // bool is_relative() const; // tested in path.decompose -int main() {} +int main(int, char**) { + return 0; +} diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.nonmember/append_op.fail.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.nonmember/append_op.fail.cpp index 7b5082c8f8da4..bcc4758f45ff1 100644 --- a/libcxx/test/std/input.output/filesystems/class.path/path.nonmember/append_op.fail.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.nonmember/append_op.fail.cpp @@ -20,7 +20,9 @@ struct ConvToPath { } }; -int main() { +int main(int, char**) { ConvToPath LHS, RHS; (void)(LHS / RHS); // expected-error {{invalid operands to binary expression}} + + return 0; } \ No newline at end of file diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.nonmember/append_op.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.nonmember/append_op.pass.cpp index 2c7042e9b7bd0..67af37686df59 100644 --- a/libcxx/test/std/input.output/filesystems/class.path/path.nonmember/append_op.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.nonmember/append_op.pass.cpp @@ -20,7 +20,7 @@ #include "filesystem_test_helper.hpp" // This is mainly tested via the member append functions. -int main() +int main(int, char**) { using namespace fs; path p1("abc"); @@ -30,4 +30,6 @@ int main() path p4 = p1 / "def"; assert(p4 == "abc/def"); + + return 0; } diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.nonmember/comparison_ops.fail.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.nonmember/comparison_ops.fail.cpp index 287e315237b1c..8f1732186d895 100644 --- a/libcxx/test/std/input.output/filesystems/class.path/path.nonmember/comparison_ops.fail.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.nonmember/comparison_ops.fail.cpp @@ -21,7 +21,7 @@ struct ConvToPath { } }; -int main() { +int main(int, char**) { ConvToPath LHS, RHS; (void)(LHS == RHS); // expected-error {{invalid operands to binary expression}} (void)(LHS != RHS); // expected-error {{invalid operands to binary expression}} @@ -29,4 +29,6 @@ int main() { (void)(LHS <= RHS); // expected-error {{invalid operands to binary expression}} (void)(LHS > RHS); // expected-error {{invalid operands to binary expression}} (void)(LHS >= RHS); // expected-error {{invalid operands to binary expression}} + + return 0; } \ No newline at end of file diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.nonmember/comparison_ops_tested_elsewhere.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.nonmember/comparison_ops_tested_elsewhere.pass.cpp index 3728db5f224b5..c61a5a0254ccd 100644 --- a/libcxx/test/std/input.output/filesystems/class.path/path.nonmember/comparison_ops_tested_elsewhere.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.nonmember/comparison_ops_tested_elsewhere.pass.cpp @@ -10,4 +10,6 @@ // The comparison operators are tested as part of [path.compare] // in class.path/path.members/path.compare.pass.cpp -int main() {} +int main(int, char**) { + return 0; +} diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.nonmember/hash_value_tested_elswhere.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.nonmember/hash_value_tested_elswhere.pass.cpp index 6cf310be88b3b..49d28daf98f7f 100644 --- a/libcxx/test/std/input.output/filesystems/class.path/path.nonmember/hash_value_tested_elswhere.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.nonmember/hash_value_tested_elswhere.pass.cpp @@ -10,4 +10,6 @@ // The "hash_value" function is tested as part of [path.compare] // in class.path/path.members/path.compare.pass.cpp -int main() {} +int main(int, char**) { + return 0; +} diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.nonmember/path.factory.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.nonmember/path.factory.pass.cpp index 54d0799d92ac5..557849ca8e6c8 100644 --- a/libcxx/test/std/input.output/filesystems/class.path/path.nonmember/path.factory.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.nonmember/path.factory.pass.cpp @@ -25,7 +25,7 @@ #include "filesystem_test_helper.hpp" -int main() +int main(int, char**) { using namespace fs; const char* In1 = "abcd/efg"; @@ -48,4 +48,6 @@ int main() path p = fs::u8path(In3, In3End); assert(p == In1); } + + return 0; } diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.nonmember/path.io.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.nonmember/path.io.pass.cpp index 375e45da8e663..31eea925a5d0e 100644 --- a/libcxx/test/std/input.output/filesystems/class.path/path.nonmember/path.io.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.nonmember/path.io.pass.cpp @@ -88,10 +88,12 @@ void test_LWG2989() { static_assert(!is_istreamable::value, ""); } -int main() { +int main(int, char**) { doIOTest(); doIOTest(); //doIOTest(); //doIOTest(); test_LWG2989(); + + return 0; } diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.nonmember/path.io.unicode_bug.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.nonmember/path.io.unicode_bug.pass.cpp index 2072a9450fbcb..c5bb6bf120f77 100644 --- a/libcxx/test/std/input.output/filesystems/class.path/path.nonmember/path.io.unicode_bug.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.nonmember/path.io.unicode_bug.pass.cpp @@ -62,7 +62,9 @@ void doIOTest() { } -int main() { +int main(int, char**) { doIOTest(); doIOTest(); + + return 0; } diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.nonmember/swap.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.nonmember/swap.pass.cpp index 66d854f00b295..51bb03e9f7cf9 100644 --- a/libcxx/test/std/input.output/filesystems/class.path/path.nonmember/swap.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.nonmember/swap.pass.cpp @@ -22,7 +22,7 @@ // NOTE: this is tested in path.members/path.modifiers via the member swap. -int main() +int main(int, char**) { using namespace fs; const char* value1 = "foo/bar/baz"; @@ -45,4 +45,6 @@ int main() assert(p1.native() == value1); assert(p2.native() == value2); } + + return 0; } diff --git a/libcxx/test/std/input.output/filesystems/class.path/synop.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/synop.pass.cpp index 9b91651e08f04..8aa186e32aeb0 100644 --- a/libcxx/test/std/input.output/filesystems/class.path/synop.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/synop.pass.cpp @@ -23,7 +23,7 @@ #include "test_macros.h" -int main() { +int main(int, char**) { using namespace fs; ASSERT_SAME_TYPE(path::value_type, char); ASSERT_SAME_TYPE(path::string_type, std::basic_string); @@ -34,4 +34,6 @@ int main() { const char* dummy = &path::preferred_separator; ((void)dummy); } + + return 0; } diff --git a/libcxx/test/std/input.output/filesystems/fs.enum/enum.copy_options.pass.cpp b/libcxx/test/std/input.output/filesystems/fs.enum/enum.copy_options.pass.cpp index 25f63a92b3313..b949960df1179 100644 --- a/libcxx/test/std/input.output/filesystems/fs.enum/enum.copy_options.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/fs.enum/enum.copy_options.pass.cpp @@ -22,7 +22,7 @@ constexpr fs::copy_options ME(int val) { return static_cast(val); } -int main() { +int main(int, char**) { typedef fs::copy_options E; static_assert(std::is_enum::value, ""); @@ -59,4 +59,6 @@ int main() { E::create_symlinks == ME(128) && E::create_hard_links == ME(256), "Expected enumeration values do not match"); + + return 0; } diff --git a/libcxx/test/std/input.output/filesystems/fs.enum/enum.directory_options.pass.cpp b/libcxx/test/std/input.output/filesystems/fs.enum/enum.directory_options.pass.cpp index 54574f720f5cc..43b0945978e06 100644 --- a/libcxx/test/std/input.output/filesystems/fs.enum/enum.directory_options.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/fs.enum/enum.directory_options.pass.cpp @@ -23,7 +23,7 @@ constexpr fs::directory_options ME(int val) { return static_cast(val); } -int main() { +int main(int, char**) { typedef fs::directory_options E; static_assert(std::is_enum::value, ""); @@ -41,4 +41,6 @@ int main() { E::skip_permission_denied == ME(2), "Expected enumeration values do not match"); + + return 0; } diff --git a/libcxx/test/std/input.output/filesystems/fs.enum/enum.file_type.pass.cpp b/libcxx/test/std/input.output/filesystems/fs.enum/enum.file_type.pass.cpp index d2162d083834d..c1f16079a5d8a 100644 --- a/libcxx/test/std/input.output/filesystems/fs.enum/enum.file_type.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/fs.enum/enum.file_type.pass.cpp @@ -21,7 +21,7 @@ constexpr fs::file_type ME(int val) { return static_cast(val); } -int main() { +int main(int, char**) { typedef fs::file_type E; static_assert(std::is_enum::value, ""); @@ -43,4 +43,6 @@ int main() { E::socket == ME(7) && E::unknown == ME(8), "Expected enumeration values do not match"); + + return 0; } diff --git a/libcxx/test/std/input.output/filesystems/fs.enum/enum.path.format.pass.cpp b/libcxx/test/std/input.output/filesystems/fs.enum/enum.path.format.pass.cpp index fc11e8a9c1f4f..d60225d4ff658 100644 --- a/libcxx/test/std/input.output/filesystems/fs.enum/enum.path.format.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/fs.enum/enum.path.format.pass.cpp @@ -19,7 +19,7 @@ #include "test_macros.h" -int main() { +int main(int, char**) { typedef fs::path::format E; static_assert(std::is_enum::value, ""); @@ -34,4 +34,6 @@ int main() { E::auto_format != E::generic_format && E::native_format != E::generic_format, "Expected enumeration values are not unique"); + + return 0; } diff --git a/libcxx/test/std/input.output/filesystems/fs.enum/enum.perm_options.pass.cpp b/libcxx/test/std/input.output/filesystems/fs.enum/enum.perm_options.pass.cpp index 117c35875e09f..1fd353d041fba 100644 --- a/libcxx/test/std/input.output/filesystems/fs.enum/enum.perm_options.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/fs.enum/enum.perm_options.pass.cpp @@ -25,7 +25,7 @@ constexpr fs::perm_options ME(int val) { return static_cast(val); } -int main() { +int main(int, char**) { typedef fs::perm_options E; static_assert(std::is_enum::value, ""); @@ -44,4 +44,6 @@ int main() { E::remove == ME(4) && E::nofollow == ME(8), "Expected enumeration values do not match"); + + return 0; } diff --git a/libcxx/test/std/input.output/filesystems/fs.enum/enum.perms.pass.cpp b/libcxx/test/std/input.output/filesystems/fs.enum/enum.perms.pass.cpp index e043c87e5c17b..93b5278fdd481 100644 --- a/libcxx/test/std/input.output/filesystems/fs.enum/enum.perms.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/fs.enum/enum.perms.pass.cpp @@ -23,7 +23,7 @@ constexpr fs::perms ME(int val) { return static_cast(val); } -int main() { +int main(int, char**) { typedef fs::perms E; static_assert(std::is_enum::value, ""); @@ -60,4 +60,6 @@ int main() { E::mask == ME(07777) && E::unknown == ME(0xFFFF), "Expected enumeration values do not match"); + + return 0; } diff --git a/libcxx/test/std/input.output/filesystems/fs.error.report/tested_elsewhere.pass.cpp b/libcxx/test/std/input.output/filesystems/fs.error.report/tested_elsewhere.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/input.output/filesystems/fs.error.report/tested_elsewhere.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/fs.error.report/tested_elsewhere.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/input.output/filesystems/fs.filesystem.synopsis/file_time_type.pass.cpp b/libcxx/test/std/input.output/filesystems/fs.filesystem.synopsis/file_time_type.pass.cpp index 6606c9a27cf18..e88ef1d12c42e 100644 --- a/libcxx/test/std/input.output/filesystems/fs.filesystem.synopsis/file_time_type.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/fs.filesystem.synopsis/file_time_type.pass.cpp @@ -39,7 +39,9 @@ void test_time_point_resolution_and_range() { ASSERT_SAME_TYPE(Period, std::nano); } -int main() { +int main(int, char**) { test_trivial_clock(); test_time_point_resolution_and_range(); + + return 0; } diff --git a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.weakly_canonical/weakly_canonical.pass.cpp b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.weakly_canonical/weakly_canonical.pass.cpp index c655490acf89e..94a8e13bc0881 100644 --- a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.weakly_canonical/weakly_canonical.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.weakly_canonical/weakly_canonical.pass.cpp @@ -25,7 +25,7 @@ #include "filesystem_test_helper.hpp" -int main() { +int main(int, char**) { // clang-format off struct { std::string input; diff --git a/libcxx/test/std/input.output/filesystems/fs.req.macros/feature_macro.pass.cpp b/libcxx/test/std/input.output/filesystems/fs.req.macros/feature_macro.pass.cpp index aa1933cc6b1fb..dad1868bee315 100644 --- a/libcxx/test/std/input.output/filesystems/fs.req.macros/feature_macro.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/fs.req.macros/feature_macro.pass.cpp @@ -25,4 +25,6 @@ #endif #endif -int main() { } +int main(int, char**) { + return 0; +} diff --git a/libcxx/test/std/input.output/filesystems/fs.req.namespace/namespace.fail.cpp b/libcxx/test/std/input.output/filesystems/fs.req.namespace/namespace.fail.cpp index e3030995de148..641621e73384e 100644 --- a/libcxx/test/std/input.output/filesystems/fs.req.namespace/namespace.fail.cpp +++ b/libcxx/test/std/input.output/filesystems/fs.req.namespace/namespace.fail.cpp @@ -23,6 +23,8 @@ using namespace std::filesystem; // expected-error@-5 {{expected namespace name}} #endif -int main() { +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/input.output/filesystems/fs.req.namespace/namespace.pass.cpp b/libcxx/test/std/input.output/filesystems/fs.req.namespace/namespace.pass.cpp index 96ba646ffbeae..6586433690106 100644 --- a/libcxx/test/std/input.output/filesystems/fs.req.namespace/namespace.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/fs.req.namespace/namespace.pass.cpp @@ -17,9 +17,11 @@ using namespace std::filesystem; -int main() { +int main(int, char**) { static_assert(std::is_same< path, std::filesystem::path >::value, ""); + + return 0; } diff --git a/libcxx/test/std/input.output/input.output.general/nothing_to_do.pass.cpp b/libcxx/test/std/input.output/input.output.general/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/input.output/input.output.general/nothing_to_do.pass.cpp +++ b/libcxx/test/std/input.output/input.output.general/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/ext.manip/get_money.pass.cpp b/libcxx/test/std/input.output/iostream.format/ext.manip/get_money.pass.cpp index 0a68da1c44fcd..cb1f2c68ee5ce 100644 --- a/libcxx/test/std/input.output/iostream.format/ext.manip/get_money.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/ext.manip/get_money.pass.cpp @@ -38,7 +38,7 @@ struct testbuf } }; -int main() +int main(int, char**) { { testbuf sb(" -$1,234,567.89"); @@ -72,4 +72,6 @@ int main() is >> std::get_money(x, true); assert(x == -123456789); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/ext.manip/get_time.pass.cpp b/libcxx/test/std/input.output/iostream.format/ext.manip/get_time.pass.cpp index 05ed05c39f722..ebf62c08e720b 100644 --- a/libcxx/test/std/input.output/iostream.format/ext.manip/get_time.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/ext.manip/get_time.pass.cpp @@ -38,7 +38,7 @@ struct testbuf } }; -int main() +int main(int, char**) { { testbuf sb(" Sat Dec 31 23:55:59 2061"); @@ -72,4 +72,6 @@ int main() assert(is.eof()); assert(!is.fail()); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/ext.manip/put_money.pass.cpp b/libcxx/test/std/input.output/iostream.format/ext.manip/put_money.pass.cpp index 0dffdfb5fe175..d924d77bc7d84 100644 --- a/libcxx/test/std/input.output/iostream.format/ext.manip/put_money.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/ext.manip/put_money.pass.cpp @@ -50,7 +50,7 @@ class testbuf } }; -int main() +int main(int, char**) { { testbuf sb; @@ -88,4 +88,6 @@ int main() os << std::put_money(x, true); assert(sb.str() == L"-USD 1,234,567.89"); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/ext.manip/put_time.pass.cpp b/libcxx/test/std/input.output/iostream.format/ext.manip/put_time.pass.cpp index 7dcbcf4883874..faa99e0634386 100644 --- a/libcxx/test/std/input.output/iostream.format/ext.manip/put_time.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/ext.manip/put_time.pass.cpp @@ -50,7 +50,7 @@ class testbuf } }; -int main() +int main(int, char**) { { testbuf sb; @@ -83,4 +83,6 @@ int main() os << std::put_time(&t, L"%a %b %d %H:%M:%S %Y"); assert(sb.str() == L"Sat Dec 31 23:55:59 2061"); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/input.streams/iostreamclass/iostream.assign/member_swap.pass.cpp b/libcxx/test/std/input.output/iostream.format/input.streams/iostreamclass/iostream.assign/member_swap.pass.cpp index b9505c76ed052..44b394b8fb013 100644 --- a/libcxx/test/std/input.output/iostream.format/input.streams/iostreamclass/iostream.assign/member_swap.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/input.streams/iostreamclass/iostream.assign/member_swap.pass.cpp @@ -33,7 +33,7 @@ struct test_iostream void swap(test_iostream& s) {base::swap(s);} }; -int main() +int main(int, char**) { { testbuf sb1; @@ -81,4 +81,6 @@ int main() assert(is2.precision() == 6); assert(is2.getloc().name() == "C"); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/input.streams/iostreamclass/iostream.assign/move_assign.pass.cpp b/libcxx/test/std/input.output/iostream.format/input.streams/iostreamclass/iostream.assign/move_assign.pass.cpp index f53411270b550..c7918ec8d73de 100644 --- a/libcxx/test/std/input.output/iostream.format/input.streams/iostreamclass/iostream.assign/move_assign.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/input.streams/iostreamclass/iostream.assign/move_assign.pass.cpp @@ -38,7 +38,7 @@ struct test_iostream }; -int main() +int main(int, char**) { { testbuf sb1; @@ -86,4 +86,6 @@ int main() assert(is2.precision() == 6); assert(is2.getloc().name() == "C"); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/input.streams/iostreamclass/iostream.cons/move.pass.cpp b/libcxx/test/std/input.output/iostream.format/input.streams/iostreamclass/iostream.cons/move.pass.cpp index 2dc91457ce799..611a7a670d267 100644 --- a/libcxx/test/std/input.output/iostream.format/input.streams/iostreamclass/iostream.cons/move.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/input.streams/iostreamclass/iostream.cons/move.pass.cpp @@ -38,7 +38,7 @@ struct test_iostream }; -int main() +int main(int, char**) { { testbuf sb; @@ -72,4 +72,6 @@ int main() assert(is.precision() == 6); assert(is.getloc().name() == "C"); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/input.streams/iostreamclass/iostream.cons/streambuf.pass.cpp b/libcxx/test/std/input.output/iostream.format/input.streams/iostreamclass/iostream.cons/streambuf.pass.cpp index bf6fe65badc26..c12abc0e2dcb0 100644 --- a/libcxx/test/std/input.output/iostream.format/input.streams/iostreamclass/iostream.cons/streambuf.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/input.streams/iostreamclass/iostream.cons/streambuf.pass.cpp @@ -23,7 +23,7 @@ struct testbuf testbuf() {} }; -int main() +int main(int, char**) { { testbuf sb; @@ -51,4 +51,6 @@ int main() assert(is.getloc().name() == "C"); assert(is.gcount() == 0); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/input.streams/iostreamclass/iostream.dest/nothing_to_do.pass.cpp b/libcxx/test/std/input.output/iostream.format/input.streams/iostreamclass/iostream.dest/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/input.output/iostream.format/input.streams/iostreamclass/iostream.dest/nothing_to_do.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/input.streams/iostreamclass/iostream.dest/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/input.streams/iostreamclass/types.pass.cpp b/libcxx/test/std/input.output/iostream.format/input.streams/iostreamclass/types.pass.cpp index ef7dcd24e3bba..46d7a16aac74c 100644 --- a/libcxx/test/std/input.output/iostream.format/input.streams/iostreamclass/types.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/input.streams/iostreamclass/types.pass.cpp @@ -24,7 +24,7 @@ #include #include -int main() +int main(int, char**) { static_assert((std::is_base_of, std::basic_iostream >::value), ""); static_assert((std::is_base_of, std::basic_iostream >::value), ""); @@ -33,4 +33,6 @@ int main() static_assert((std::is_same::int_type, std::char_traits::int_type>::value), ""); static_assert((std::is_same::pos_type, std::char_traits::pos_type>::value), ""); static_assert((std::is_same::off_type, std::char_traits::off_type>::value), ""); + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/bool.pass.cpp b/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/bool.pass.cpp index 570aeaa393ced..799ec5eaeb534 100644 --- a/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/bool.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/bool.pass.cpp @@ -40,7 +40,7 @@ struct testbuf CharT* egptr() const {return base::egptr();} }; -int main() +int main(int, char**) { { std::istream is((std::streambuf*)0); @@ -75,4 +75,6 @@ int main() assert(!is.eof()); assert(!is.fail()); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/double.pass.cpp b/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/double.pass.cpp index 6a285556d815e..9f9872d9ef860 100644 --- a/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/double.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/double.pass.cpp @@ -40,7 +40,7 @@ struct testbuf CharT* egptr() const {return base::egptr();} }; -int main() +int main(int, char**) { { std::istream is((std::streambuf*)0); @@ -75,4 +75,6 @@ int main() assert(!is.eof()); assert(!is.fail()); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/float.pass.cpp b/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/float.pass.cpp index da93a3bafc234..c2b937a89cfe0 100644 --- a/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/float.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/float.pass.cpp @@ -40,7 +40,7 @@ struct testbuf CharT* egptr() const {return base::egptr();} }; -int main() +int main(int, char**) { { std::istream is((std::streambuf*)0); @@ -75,4 +75,6 @@ int main() assert(!is.eof()); assert(!is.fail()); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/int.pass.cpp b/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/int.pass.cpp index f683bee45da1c..702287be79ec7 100644 --- a/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/int.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/int.pass.cpp @@ -41,7 +41,7 @@ struct testbuf CharT* egptr() const {return base::egptr();} }; -int main() +int main(int, char**) { { std::istream is((std::streambuf*)0); @@ -76,4 +76,6 @@ int main() assert(!is.eof()); assert( is.fail()); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/long.pass.cpp b/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/long.pass.cpp index 0c8eee50d7500..9f9118cbcdc28 100644 --- a/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/long.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/long.pass.cpp @@ -40,7 +40,7 @@ struct testbuf CharT* egptr() const {return base::egptr();} }; -int main() +int main(int, char**) { { std::istream is((std::streambuf*)0); @@ -75,4 +75,6 @@ int main() assert(!is.eof()); assert(!is.fail()); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/long_double.pass.cpp b/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/long_double.pass.cpp index 2fff174cbccc8..bdd30190a5b97 100644 --- a/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/long_double.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/long_double.pass.cpp @@ -40,7 +40,7 @@ struct testbuf CharT* egptr() const {return base::egptr();} }; -int main() +int main(int, char**) { { std::istream is((std::streambuf*)0); @@ -75,4 +75,6 @@ int main() assert(!is.eof()); assert(!is.fail()); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/long_long.pass.cpp b/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/long_long.pass.cpp index 6529ad333f593..1612468f4d76e 100644 --- a/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/long_long.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/long_long.pass.cpp @@ -40,7 +40,7 @@ struct testbuf CharT* egptr() const {return base::egptr();} }; -int main() +int main(int, char**) { { std::istream is((std::streambuf*)0); @@ -75,4 +75,6 @@ int main() assert(!is.eof()); assert(!is.fail()); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/pointer.pass.cpp b/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/pointer.pass.cpp index 3c8a0783fa448..0893d8cdec2b1 100644 --- a/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/pointer.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/pointer.pass.cpp @@ -44,7 +44,7 @@ struct testbuf CharT* egptr() const {return base::egptr();} }; -int main() +int main(int, char**) { { std::istream is((std::streambuf*)0); @@ -97,4 +97,6 @@ int main() assert( is.eof()); assert(!is.fail()); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/short.pass.cpp b/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/short.pass.cpp index bc28ec29ba942..a0d96c3983fe6 100644 --- a/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/short.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/short.pass.cpp @@ -41,7 +41,7 @@ struct testbuf CharT* egptr() const {return base::egptr();} }; -int main() +int main(int, char**) { { std::istream is((std::streambuf*)0); @@ -76,4 +76,6 @@ int main() assert(!is.eof()); assert( is.fail()); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/unsigned_int.pass.cpp b/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/unsigned_int.pass.cpp index 8bbb636e6e8d9..578cfcf0cc4e0 100644 --- a/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/unsigned_int.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/unsigned_int.pass.cpp @@ -40,7 +40,7 @@ struct testbuf CharT* egptr() const {return base::egptr();} }; -int main() +int main(int, char**) { { std::istream is((std::streambuf*)0); @@ -75,4 +75,6 @@ int main() assert(!is.eof()); assert(!is.fail()); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/unsigned_long.pass.cpp b/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/unsigned_long.pass.cpp index 5635339a816c8..f1c150d79200c 100644 --- a/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/unsigned_long.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/unsigned_long.pass.cpp @@ -40,7 +40,7 @@ struct testbuf CharT* egptr() const {return base::egptr();} }; -int main() +int main(int, char**) { { std::istream is((std::streambuf*)0); @@ -75,4 +75,6 @@ int main() assert(!is.eof()); assert(!is.fail()); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/unsigned_long_long.pass.cpp b/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/unsigned_long_long.pass.cpp index 402d3eab0adec..068d31ac8fb66 100644 --- a/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/unsigned_long_long.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/unsigned_long_long.pass.cpp @@ -40,7 +40,7 @@ struct testbuf CharT* egptr() const {return base::egptr();} }; -int main() +int main(int, char**) { { std::istream is((std::streambuf*)0); @@ -75,4 +75,6 @@ int main() assert(!is.eof()); assert(!is.fail()); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/unsigned_short.pass.cpp b/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/unsigned_short.pass.cpp index cedd6a6c8af85..9906bbeac8d77 100644 --- a/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/unsigned_short.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/unsigned_short.pass.cpp @@ -40,7 +40,7 @@ struct testbuf CharT* egptr() const {return base::egptr();} }; -int main() +int main(int, char**) { { std::istream is((std::streambuf*)0); @@ -75,4 +75,6 @@ int main() assert(!is.eof()); assert(!is.fail()); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.reqmts/tested_elsewhere.pass.cpp b/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.reqmts/tested_elsewhere.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.reqmts/tested_elsewhere.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.reqmts/tested_elsewhere.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/basic_ios.pass.cpp b/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/basic_ios.pass.cpp index fadc70943dbc9..704c4997d5290 100644 --- a/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/basic_ios.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/basic_ios.pass.cpp @@ -27,11 +27,13 @@ f(std::basic_ios& is) return is; } -int main() +int main(int, char**) { { std::istream is((std::streambuf*)0); is >> f; assert(f_called == 1); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/chart.pass.cpp b/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/chart.pass.cpp index 51e0aab1a4268..cbb606cdcffac 100644 --- a/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/chart.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/chart.pass.cpp @@ -38,7 +38,7 @@ struct testbuf CharT* egptr() const {return base::egptr();} }; -int main() +int main(int, char**) { { testbuf sb(" "); @@ -83,4 +83,6 @@ int main() assert(!is.fail()); assert(c == L'c'); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/ios_base.pass.cpp b/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/ios_base.pass.cpp index 31023cca89f8e..ec25dc5a7e0e7 100644 --- a/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/ios_base.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/ios_base.pass.cpp @@ -25,11 +25,13 @@ f(std::ios_base& is) return is; } -int main() +int main(int, char**) { { std::istream is((std::streambuf*)0); is >> f; assert(f_called == 1); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/istream.pass.cpp b/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/istream.pass.cpp index 36ea25dafc8bf..f3829c25ac465 100644 --- a/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/istream.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/istream.pass.cpp @@ -27,11 +27,13 @@ f(std::basic_istream& is) return is; } -int main() +int main(int, char**) { { std::istream is((std::streambuf*)0); is >> f; assert(f_called == 1); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/signed_char.pass.cpp b/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/signed_char.pass.cpp index 293cd8b459ad2..bd06de6a07bd6 100644 --- a/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/signed_char.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/signed_char.pass.cpp @@ -38,7 +38,7 @@ struct testbuf CharT* egptr() const {return base::egptr();} }; -int main() +int main(int, char**) { { testbuf sb(" "); @@ -66,4 +66,6 @@ int main() assert(!is.fail()); assert(c == 'c'); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/signed_char_pointer.pass.cpp b/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/signed_char_pointer.pass.cpp index 55db22bce7e07..d5128339a717f 100644 --- a/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/signed_char_pointer.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/signed_char_pointer.pass.cpp @@ -38,7 +38,7 @@ struct testbuf CharT* egptr() const {return base::egptr();} }; -int main() +int main(int, char**) { { testbuf sb(" abcdefghijk "); @@ -103,4 +103,6 @@ int main() assert(std::string((char*)s) == ""); } #endif + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/streambuf.pass.cpp b/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/streambuf.pass.cpp index dbc6e2398dfe0..9feb826906fe4 100644 --- a/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/streambuf.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/streambuf.pass.cpp @@ -55,7 +55,7 @@ class testbuf } }; -int main() +int main(int, char**) { { testbuf sb("testing..."); @@ -65,4 +65,6 @@ int main() assert(sb2.str() == "testing..."); assert(is.gcount() == 10); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/unsigned_char.pass.cpp b/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/unsigned_char.pass.cpp index 17aff9fd8de74..3eceaaeb63f33 100644 --- a/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/unsigned_char.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/unsigned_char.pass.cpp @@ -38,7 +38,7 @@ struct testbuf CharT* egptr() const {return base::egptr();} }; -int main() +int main(int, char**) { { testbuf sb(" "); @@ -66,4 +66,6 @@ int main() assert(!is.fail()); assert(c == 'c'); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/unsigned_char_pointer.pass.cpp b/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/unsigned_char_pointer.pass.cpp index 1873d70fbb2be..14b2993148d36 100644 --- a/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/unsigned_char_pointer.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/unsigned_char_pointer.pass.cpp @@ -38,7 +38,7 @@ struct testbuf CharT* egptr() const {return base::egptr();} }; -int main() +int main(int, char**) { { testbuf sb(" abcdefghijk "); @@ -103,4 +103,6 @@ int main() assert(std::string((char*)s) == ""); } #endif + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/wchar_t_pointer.pass.cpp b/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/wchar_t_pointer.pass.cpp index cc06149b36e3f..f0a9e0710fba9 100644 --- a/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/wchar_t_pointer.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/wchar_t_pointer.pass.cpp @@ -38,7 +38,7 @@ struct testbuf CharT* egptr() const {return base::egptr();} }; -int main() +int main(int, char**) { { testbuf sb(" abcdefghijk "); @@ -114,4 +114,6 @@ int main() assert(std::string(s) == ""); } #endif + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/nothing_to_do.pass.cpp b/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/nothing_to_do.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/input.streams/istream.manip/ws.pass.cpp b/libcxx/test/std/input.output/iostream.format/input.streams/istream.manip/ws.pass.cpp index a1ab81a955329..6786ebf4ca0b4 100644 --- a/libcxx/test/std/input.output/iostream.format/input.streams/istream.manip/ws.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/input.streams/istream.manip/ws.pass.cpp @@ -39,7 +39,7 @@ struct testbuf CharT* egptr() const {return base::egptr();} }; -int main() +int main(int, char**) { { testbuf sb(" 123"); @@ -75,4 +75,6 @@ int main() assert(is.eof()); assert(is.fail()); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/input.streams/istream.rvalue/rvalue.pass.cpp b/libcxx/test/std/input.output/iostream.format/input.streams/istream.rvalue/rvalue.pass.cpp index cd46b14fddee0..8d0af7347031f 100644 --- a/libcxx/test/std/input.output/iostream.format/input.streams/istream.rvalue/rvalue.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/input.streams/istream.rvalue/rvalue.pass.cpp @@ -47,7 +47,7 @@ struct A{}; bool called = false; void operator>>(std::istream&, A&&){ called = true; } -int main() +int main(int, char**) { { testbuf sb(" 123"); @@ -68,4 +68,6 @@ int main() assert(&out == &ss); assert(called); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/get.pass.cpp b/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/get.pass.cpp index b73a2fe72d86b..40a0417413348 100644 --- a/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/get.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/get.pass.cpp @@ -37,7 +37,7 @@ struct testbuf CharT* egptr() const {return base::egptr();} }; -int main() +int main(int, char**) { { testbuf sb(" "); @@ -96,4 +96,6 @@ int main() assert(c == L'c'); assert(is.gcount() == 1); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/get_chart.pass.cpp b/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/get_chart.pass.cpp index 86189b2604920..ae31c9be06d56 100644 --- a/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/get_chart.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/get_chart.pass.cpp @@ -37,7 +37,7 @@ struct testbuf CharT* egptr() const {return base::egptr();} }; -int main() +int main(int, char**) { { testbuf sb(" "); @@ -99,4 +99,6 @@ int main() assert(c == L'c'); assert(is.gcount() == 1); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/get_pointer_size.pass.cpp b/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/get_pointer_size.pass.cpp index ca2827aa0bd71..149392cae3f11 100644 --- a/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/get_pointer_size.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/get_pointer_size.pass.cpp @@ -48,7 +48,7 @@ struct testbuf CharT* egptr() const {return base::egptr();} }; -int main() +int main(int, char**) { { testbuf sb(" \n \n "); @@ -158,4 +158,6 @@ int main() assert(is.gcount() == 1); } #endif + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/get_pointer_size_chart.pass.cpp b/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/get_pointer_size_chart.pass.cpp index efaf168d6d6d3..e7c96d6a266c5 100644 --- a/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/get_pointer_size_chart.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/get_pointer_size_chart.pass.cpp @@ -48,7 +48,7 @@ struct testbuf CharT* egptr() const {return base::egptr();} }; -int main() +int main(int, char**) { { testbuf sb(" * * "); @@ -158,4 +158,6 @@ int main() assert(is.gcount() == 1); } #endif + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/get_streambuf.pass.cpp b/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/get_streambuf.pass.cpp index 35495ef953b6c..dda59d7ff50a9 100644 --- a/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/get_streambuf.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/get_streambuf.pass.cpp @@ -52,7 +52,7 @@ class testbuf } }; -int main() +int main(int, char**) { { testbuf sb("testing\n..."); @@ -84,4 +84,6 @@ int main() assert(!is.fail()); assert(is.gcount() == 3); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/get_streambuf_chart.pass.cpp b/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/get_streambuf_chart.pass.cpp index 514cd2e7f6c42..a1e46c2336c98 100644 --- a/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/get_streambuf_chart.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/get_streambuf_chart.pass.cpp @@ -53,7 +53,7 @@ class testbuf } }; -int main() +int main(int, char**) { { testbuf sb("testing*..."); @@ -85,4 +85,6 @@ int main() assert(!is.fail()); assert(is.gcount() == 3); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/getline_pointer_size.pass.cpp b/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/getline_pointer_size.pass.cpp index 5fa822cd1876b..9c91053ebdbb3 100644 --- a/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/getline_pointer_size.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/getline_pointer_size.pass.cpp @@ -48,7 +48,7 @@ struct testbuf CharT* egptr() const {return base::egptr();} }; -int main() +int main(int, char**) { { testbuf sb(" \n \n "); @@ -142,4 +142,6 @@ int main() assert(is.gcount() == 1); } #endif + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/getline_pointer_size_chart.pass.cpp b/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/getline_pointer_size_chart.pass.cpp index 1cd19c0e1dd00..bee1976e95e16 100644 --- a/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/getline_pointer_size_chart.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/getline_pointer_size_chart.pass.cpp @@ -48,7 +48,7 @@ struct testbuf CharT* egptr() const {return base::egptr();} }; -int main() +int main(int, char**) { { testbuf sb(" * * "); @@ -142,4 +142,6 @@ int main() assert(is.gcount() == 1); } #endif + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/ignore.pass.cpp b/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/ignore.pass.cpp index 99f35aac407a3..7f6348b01a40f 100644 --- a/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/ignore.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/ignore.pass.cpp @@ -38,7 +38,7 @@ struct testbuf CharT* egptr() const {return base::egptr();} }; -int main() +int main(int, char**) { { testbuf sb(" 1\n2345\n6"); @@ -72,4 +72,6 @@ int main() assert(!is.fail()); assert(is.gcount() == 6); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/ignore_0xff.pass.cpp b/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/ignore_0xff.pass.cpp index f2f895d9ce6d8..acf90e560861b 100644 --- a/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/ignore_0xff.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/ignore_0xff.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { int bad=-1; std::ostringstream os; @@ -30,4 +30,6 @@ int main() is.ignore(ignoreLen); std::istringstream::pos_type b=is.tellg(); assert((b-a)==ignoreLen); + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/peek.pass.cpp b/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/peek.pass.cpp index 99b2b69341bf2..17943463e90f9 100644 --- a/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/peek.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/peek.pass.cpp @@ -37,7 +37,7 @@ struct testbuf CharT* egptr() const {return base::egptr();} }; -int main() +int main(int, char**) { { testbuf sb(" 1\n2345\n6"); @@ -65,4 +65,6 @@ int main() assert(!is.fail()); assert(is.gcount() == 0); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/putback.pass.cpp b/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/putback.pass.cpp index 2088e4d14cb88..4ca3a8c0edb4e 100644 --- a/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/putback.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/putback.pass.cpp @@ -37,7 +37,7 @@ struct testbuf CharT* egptr() const {return base::egptr();} }; -int main() +int main(int, char**) { { testbuf sb(" 123456789"); @@ -85,4 +85,6 @@ int main() assert(is.bad()); assert(is.gcount() == 0); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/read.pass.cpp b/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/read.pass.cpp index 962aa8c0386f1..9296e0bfb2e22 100644 --- a/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/read.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/read.pass.cpp @@ -37,7 +37,7 @@ struct testbuf CharT* egptr() const {return base::egptr();} }; -int main() +int main(int, char**) { { testbuf sb(" 123456789"); @@ -77,4 +77,6 @@ int main() assert( is.fail()); assert(is.gcount() == 0); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/readsome.pass.cpp b/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/readsome.pass.cpp index 5cfd028cc6200..f99752cc1a524 100644 --- a/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/readsome.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/readsome.pass.cpp @@ -37,7 +37,7 @@ struct testbuf CharT* egptr() const {return base::egptr();} }; -int main() +int main(int, char**) { { testbuf sb(" 1234567890"); @@ -81,4 +81,6 @@ int main() assert(std::wstring(s, 1) == L"0"); assert(is.readsome(s, 5) == 0); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/seekg.pass.cpp b/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/seekg.pass.cpp index b5e1955a7be81..c16a639786365 100644 --- a/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/seekg.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/seekg.pass.cpp @@ -44,7 +44,7 @@ struct testbuf } }; -int main() +int main(int, char**) { { testbuf sb(" 123456789"); @@ -71,4 +71,6 @@ int main() assert(is.good()); assert(!is.eof()); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/seekg_off.pass.cpp b/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/seekg_off.pass.cpp index d7607b62e9d9a..93a7f1912d963 100644 --- a/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/seekg_off.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/seekg_off.pass.cpp @@ -52,7 +52,7 @@ struct testbuf } }; -int main() +int main(int, char**) { { testbuf sb(" 123456789"); @@ -83,4 +83,6 @@ int main() assert(is.good()); assert(!is.eof()); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/sync.pass.cpp b/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/sync.pass.cpp index 10bc991aa0f59..43ddd811080d9 100644 --- a/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/sync.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/sync.pass.cpp @@ -46,7 +46,7 @@ struct testbuf } }; -int main() +int main(int, char**) { { testbuf sb(" 123456789"); @@ -60,4 +60,6 @@ int main() assert(is.sync() == 0); assert(sync_called == 2); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/tellg.pass.cpp b/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/tellg.pass.cpp index 7f87cada9ac47..918685b8693ee 100644 --- a/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/tellg.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/tellg.pass.cpp @@ -47,7 +47,7 @@ struct testbuf } }; -int main() +int main(int, char**) { { testbuf sb(" 123456789"); @@ -59,4 +59,6 @@ int main() std::wistream is(&sb); assert(is.tellg() == 5); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/unget.pass.cpp b/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/unget.pass.cpp index c982f79cb9663..ca00af4e3c3f1 100644 --- a/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/unget.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/unget.pass.cpp @@ -37,7 +37,7 @@ struct testbuf CharT* egptr() const {return base::egptr();} }; -int main() +int main(int, char**) { { testbuf sb(" 123456789"); @@ -77,4 +77,6 @@ int main() assert(is.bad()); assert(is.gcount() == 0); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/input.streams/istream/istream.assign/member_swap.pass.cpp b/libcxx/test/std/input.output/iostream.format/input.streams/istream/istream.assign/member_swap.pass.cpp index 8e8b16600df50..dbb2bb69e3687 100644 --- a/libcxx/test/std/input.output/iostream.format/input.streams/istream/istream.assign/member_swap.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/input.streams/istream/istream.assign/member_swap.pass.cpp @@ -33,7 +33,7 @@ struct test_istream void swap(test_istream& s) {base::swap(s);} }; -int main() +int main(int, char**) { { testbuf sb1; @@ -81,4 +81,6 @@ int main() assert(is2.precision() == 6); assert(is2.getloc().name() == "C"); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/input.streams/istream/istream.assign/move_assign.pass.cpp b/libcxx/test/std/input.output/iostream.format/input.streams/istream/istream.assign/move_assign.pass.cpp index cc418fd4f1351..455edbf72ac44 100644 --- a/libcxx/test/std/input.output/iostream.format/input.streams/istream/istream.assign/move_assign.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/input.streams/istream/istream.assign/move_assign.pass.cpp @@ -38,7 +38,7 @@ struct test_istream }; -int main() +int main(int, char**) { { testbuf sb1; @@ -86,4 +86,6 @@ int main() assert(is2.precision() == 6); assert(is2.getloc().name() == "C"); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/input.streams/istream/istream.cons/copy.fail.cpp b/libcxx/test/std/input.output/iostream.format/input.streams/istream/istream.cons/copy.fail.cpp index c26ad292ba834..017cc67a1d5e4 100644 --- a/libcxx/test/std/input.output/iostream.format/input.streams/istream/istream.cons/copy.fail.cpp +++ b/libcxx/test/std/input.output/iostream.format/input.streams/istream/istream.cons/copy.fail.cpp @@ -48,7 +48,9 @@ struct test_istream }; -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/input.streams/istream/istream.cons/move.pass.cpp b/libcxx/test/std/input.output/iostream.format/input.streams/istream/istream.cons/move.pass.cpp index 7bf3d6619b09c..4830d04d48c77 100644 --- a/libcxx/test/std/input.output/iostream.format/input.streams/istream/istream.cons/move.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/input.streams/istream/istream.cons/move.pass.cpp @@ -36,7 +36,7 @@ struct test_istream : base(std::move(s)) {} }; -int main() +int main(int, char**) { { testbuf sb; @@ -70,4 +70,6 @@ int main() assert(is.precision() == 6); assert(is.getloc().name() == "C"); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/input.streams/istream/istream.cons/streambuf.pass.cpp b/libcxx/test/std/input.output/iostream.format/input.streams/istream/istream.cons/streambuf.pass.cpp index 71008f7d09607..339489dfb5e6d 100644 --- a/libcxx/test/std/input.output/iostream.format/input.streams/istream/istream.cons/streambuf.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/input.streams/istream/istream.cons/streambuf.pass.cpp @@ -23,7 +23,7 @@ struct testbuf testbuf() {} }; -int main() +int main(int, char**) { { testbuf sb; @@ -51,4 +51,6 @@ int main() assert(is.getloc().name() == "C"); assert(is.gcount() == 0); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/input.streams/istream/istream_sentry/ctor.pass.cpp b/libcxx/test/std/input.output/iostream.format/input.streams/istream/istream_sentry/ctor.pass.cpp index 29fed345a54b4..fdebd66fb76ea 100644 --- a/libcxx/test/std/input.output/iostream.format/input.streams/istream/istream_sentry/ctor.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/input.streams/istream/istream_sentry/ctor.pass.cpp @@ -49,7 +49,7 @@ struct testbuf } }; -int main() +int main(int, char**) { { std::istream is((testbuf*)0); @@ -124,4 +124,6 @@ int main() assert(sync_called == 0); assert(sb.gptr() == sb.eback()); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/input.streams/istream/types.pass.cpp b/libcxx/test/std/input.output/iostream.format/input.streams/istream/types.pass.cpp index 07e2f5558febf..a5362d94b8cb7 100644 --- a/libcxx/test/std/input.output/iostream.format/input.streams/istream/types.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/input.streams/istream/types.pass.cpp @@ -23,7 +23,7 @@ #include #include -int main() +int main(int, char**) { static_assert((std::is_base_of, std::basic_istream >::value), ""); static_assert((std::is_same::char_type, char>::value), ""); @@ -31,4 +31,6 @@ int main() static_assert((std::is_same::int_type, std::char_traits::int_type>::value), ""); static_assert((std::is_same::pos_type, std::char_traits::pos_type>::value), ""); static_assert((std::is_same::off_type, std::char_traits::off_type>::value), ""); + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/nothing_to_do.pass.cpp b/libcxx/test/std/input.output/iostream.format/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/input.output/iostream.format/nothing_to_do.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/output.streams/ostream.assign/member_swap.pass.cpp b/libcxx/test/std/input.output/iostream.format/output.streams/ostream.assign/member_swap.pass.cpp index f322a8145bd8f..433d78ead195d 100644 --- a/libcxx/test/std/input.output/iostream.format/output.streams/ostream.assign/member_swap.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/output.streams/ostream.assign/member_swap.pass.cpp @@ -33,7 +33,7 @@ struct test_ostream void swap(test_ostream& s) {base::swap(s);} }; -int main() +int main(int, char**) { { testbuf sb1; @@ -81,4 +81,6 @@ int main() assert(os2.precision() == 6); assert(os2.getloc().name() == "C"); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/output.streams/ostream.assign/move_assign.pass.cpp b/libcxx/test/std/input.output/iostream.format/output.streams/ostream.assign/move_assign.pass.cpp index a121cd8a5b9bf..4241b02a36d7a 100644 --- a/libcxx/test/std/input.output/iostream.format/output.streams/ostream.assign/move_assign.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/output.streams/ostream.assign/move_assign.pass.cpp @@ -38,7 +38,7 @@ struct test_ostream }; -int main() +int main(int, char**) { { testbuf sb1; @@ -86,4 +86,6 @@ int main() assert(os2.precision() == 6); assert(os2.getloc().name() == "C"); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/output.streams/ostream.cons/move.pass.cpp b/libcxx/test/std/input.output/iostream.format/output.streams/ostream.cons/move.pass.cpp index 155889de7177d..811b7fa85664e 100644 --- a/libcxx/test/std/input.output/iostream.format/output.streams/ostream.cons/move.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/output.streams/ostream.cons/move.pass.cpp @@ -38,7 +38,7 @@ struct test_ostream }; -int main() +int main(int, char**) { { testbuf sb; @@ -68,4 +68,6 @@ int main() assert(os.precision() == 6); assert(os.getloc().name() == "C"); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/output.streams/ostream.cons/streambuf.pass.cpp b/libcxx/test/std/input.output/iostream.format/output.streams/ostream.cons/streambuf.pass.cpp index ea4542be29ec0..78a3a53c74e10 100644 --- a/libcxx/test/std/input.output/iostream.format/output.streams/ostream.cons/streambuf.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/output.streams/ostream.cons/streambuf.pass.cpp @@ -23,7 +23,7 @@ struct testbuf testbuf() {} }; -int main() +int main(int, char**) { { testbuf sb; @@ -49,4 +49,6 @@ int main() assert(os.precision() == 6); assert(os.getloc().name() == "C"); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/nothing_to_do.pass.cpp b/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/nothing_to_do.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.formatted.reqmts/tested_elsewhere.pass.cpp b/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.formatted.reqmts/tested_elsewhere.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.formatted.reqmts/tested_elsewhere.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.formatted.reqmts/tested_elsewhere.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/bool.pass.cpp b/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/bool.pass.cpp index e472c62660d4f..a0622b3656755 100644 --- a/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/bool.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/bool.pass.cpp @@ -48,7 +48,7 @@ class testbuf } }; -int main() +int main(int, char**) { { std::ostream os((std::streambuf*)0); @@ -87,4 +87,6 @@ int main() os << b; assert(sb.str() == "false"); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/double.pass.cpp b/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/double.pass.cpp index f18d9361ac424..2c83723cbfa00 100644 --- a/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/double.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/double.pass.cpp @@ -48,7 +48,7 @@ class testbuf } }; -int main() +int main(int, char**) { { std::ostream os((std::streambuf*)0); @@ -79,4 +79,6 @@ int main() os << n; assert(sb.str() == "-10.5"); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/float.pass.cpp b/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/float.pass.cpp index 041195d0e368a..851086abe4272 100644 --- a/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/float.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/float.pass.cpp @@ -48,7 +48,7 @@ class testbuf } }; -int main() +int main(int, char**) { { std::ostream os((std::streambuf*)0); @@ -79,4 +79,6 @@ int main() os << n; assert(sb.str() == "-10.5"); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/int.pass.cpp b/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/int.pass.cpp index 4657c98f9c93b..7dae78f9def6d 100644 --- a/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/int.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/int.pass.cpp @@ -48,7 +48,7 @@ class testbuf } }; -int main() +int main(int, char**) { { std::ostream os((std::streambuf*)0); @@ -79,4 +79,6 @@ int main() os << n; assert(sb.str() == "fffffff6"); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/long.pass.cpp b/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/long.pass.cpp index cf0184997b8b0..8f2ec631c03f9 100644 --- a/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/long.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/long.pass.cpp @@ -48,7 +48,7 @@ class testbuf } }; -int main() +int main(int, char**) { { std::ostream os((std::streambuf*)0); @@ -79,4 +79,6 @@ int main() os << n; assert(sb.str() == "fffffff6"); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/long_double.pass.cpp b/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/long_double.pass.cpp index cedef612149be..b0c9950bd7ad5 100644 --- a/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/long_double.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/long_double.pass.cpp @@ -48,7 +48,7 @@ class testbuf } }; -int main() +int main(int, char**) { { std::ostream os((std::streambuf*)0); @@ -79,4 +79,6 @@ int main() os << n; assert(sb.str() == "-10.5"); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/long_long.pass.cpp b/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/long_long.pass.cpp index 20b23b80bec93..d87096f7213db 100644 --- a/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/long_long.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/long_long.pass.cpp @@ -48,7 +48,7 @@ class testbuf } }; -int main() +int main(int, char**) { { std::ostream os((std::streambuf*)0); @@ -79,4 +79,6 @@ int main() os << n; assert(sb.str() == "fffffffffffffff6"); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/minmax_showbase.pass.cpp b/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/minmax_showbase.pass.cpp index c101b3cfc9983..6db1b55cca7a1 100644 --- a/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/minmax_showbase.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/minmax_showbase.pass.cpp @@ -45,7 +45,7 @@ static void test(std::ios_base::fmtflags fmt, const char *expected) assert(ss.str() == expected); } -int main() +int main(int, char**) { const std::ios_base::fmtflags o = std::ios_base::oct; const std::ios_base::fmtflags d = std::ios_base::dec; diff --git a/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/minus1.pass.cpp b/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/minus1.pass.cpp index 7d51a4ddd0441..c2b188a15f967 100644 --- a/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/minus1.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/minus1.pass.cpp @@ -58,7 +58,7 @@ void test_hex(const char *expected) assert(str == expected); } -int main() +int main(int, char**) { test_octal( "177777"); @@ -110,4 +110,6 @@ int main() test_hex("FFFFFFFFFFFFFFFF"); test_hex< long long>("FFFFFFFFFFFFFFFF"); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/pointer.pass.cpp b/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/pointer.pass.cpp index 837efd6f38a52..f400f33544bc5 100644 --- a/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/pointer.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/pointer.pass.cpp @@ -48,7 +48,7 @@ class testbuf } }; -int main() +int main(int, char**) { { std::ostream os((std::streambuf*)0); @@ -87,4 +87,6 @@ int main() os << n; assert(os.good()); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/short.pass.cpp b/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/short.pass.cpp index 8e022edad01c1..c45d5797b5ece 100644 --- a/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/short.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/short.pass.cpp @@ -48,7 +48,7 @@ class testbuf } }; -int main() +int main(int, char**) { { std::ostream os((std::streambuf*)0); @@ -79,4 +79,6 @@ int main() os << n; assert(sb.str() == "fff6"); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/unsigned_int.pass.cpp b/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/unsigned_int.pass.cpp index 2d6b0be0274b9..c24381923d1ac 100644 --- a/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/unsigned_int.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/unsigned_int.pass.cpp @@ -48,7 +48,7 @@ class testbuf } }; -int main() +int main(int, char**) { { std::ostream os((std::streambuf*)0); @@ -79,4 +79,6 @@ int main() os << n; assert(sb.str() == "fff6"); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/unsigned_long.pass.cpp b/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/unsigned_long.pass.cpp index 636c87146fe68..03b6396430241 100644 --- a/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/unsigned_long.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/unsigned_long.pass.cpp @@ -48,7 +48,7 @@ class testbuf } }; -int main() +int main(int, char**) { { std::ostream os((std::streambuf*)0); @@ -79,4 +79,6 @@ int main() os << n; assert(sb.str() == "fffffff6"); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/unsigned_long_long.pass.cpp b/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/unsigned_long_long.pass.cpp index 44313251e100a..3c12f148898ce 100644 --- a/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/unsigned_long_long.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/unsigned_long_long.pass.cpp @@ -48,7 +48,7 @@ class testbuf } }; -int main() +int main(int, char**) { { std::ostream os((std::streambuf*)0); @@ -79,4 +79,6 @@ int main() os << n; assert(sb.str() == "fffffffffffffff6"); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/unsigned_short.pass.cpp b/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/unsigned_short.pass.cpp index 16b33f3a94e25..6cc4c71a094a6 100644 --- a/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/unsigned_short.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/unsigned_short.pass.cpp @@ -48,7 +48,7 @@ class testbuf } }; -int main() +int main(int, char**) { { std::ostream os((std::streambuf*)0); @@ -79,4 +79,6 @@ int main() os << n; assert(sb.str() == "fff6"); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/CharT.pass.cpp b/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/CharT.pass.cpp index cb7f0d62f47e5..127c0c7dc5b2b 100644 --- a/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/CharT.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/CharT.pass.cpp @@ -49,7 +49,7 @@ class testbuf } }; -int main() +int main(int, char**) { { std::wostream os((std::wstreambuf*)0); @@ -84,4 +84,6 @@ int main() assert(sb.str() == L"a "); assert(os.width() == 0); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/CharT_pointer.pass.cpp b/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/CharT_pointer.pass.cpp index a07edba5d9f2a..85edde06d4fe1 100644 --- a/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/CharT_pointer.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/CharT_pointer.pass.cpp @@ -49,7 +49,7 @@ class testbuf } }; -int main() +int main(int, char**) { { std::wostream os((std::wstreambuf*)0); @@ -84,4 +84,6 @@ int main() assert(sb.str() == L"123 "); assert(os.width() == 0); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/char.pass.cpp b/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/char.pass.cpp index 6e926d10fb076..5532a68650b92 100644 --- a/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/char.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/char.pass.cpp @@ -49,7 +49,7 @@ class testbuf } }; -int main() +int main(int, char**) { { std::ostream os((std::streambuf*)0); @@ -84,4 +84,6 @@ int main() assert(sb.str() == "a "); assert(os.width() == 0); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/char_pointer.pass.cpp b/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/char_pointer.pass.cpp index 23874768fd0dd..f6e2445faeb7e 100644 --- a/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/char_pointer.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/char_pointer.pass.cpp @@ -49,7 +49,7 @@ class testbuf } }; -int main() +int main(int, char**) { { std::ostream os((std::streambuf*)0); @@ -84,4 +84,6 @@ int main() assert(sb.str() == "123 "); assert(os.width() == 0); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/char_to_wide.pass.cpp b/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/char_to_wide.pass.cpp index f5647e1a9249b..f12478e538418 100644 --- a/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/char_to_wide.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/char_to_wide.pass.cpp @@ -49,7 +49,7 @@ class testbuf } }; -int main() +int main(int, char**) { { std::wostream os((std::wstreambuf*)0); @@ -84,4 +84,6 @@ int main() assert(sb.str() == L"a "); assert(os.width() == 0); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/char_to_wide_pointer.pass.cpp b/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/char_to_wide_pointer.pass.cpp index ff4e85eb90fca..1b11d8550ae2e 100644 --- a/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/char_to_wide_pointer.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/char_to_wide_pointer.pass.cpp @@ -49,7 +49,7 @@ class testbuf } }; -int main() +int main(int, char**) { { std::wostream os((std::wstreambuf*)0); @@ -84,4 +84,6 @@ int main() assert(sb.str() == L"123 "); assert(os.width() == 0); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/signed_char.pass.cpp b/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/signed_char.pass.cpp index ab3e9b580b86b..26f295ec2d083 100644 --- a/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/signed_char.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/signed_char.pass.cpp @@ -49,7 +49,7 @@ class testbuf } }; -int main() +int main(int, char**) { { std::ostream os((std::streambuf*)0); @@ -84,4 +84,6 @@ int main() assert(sb.str() == "a "); assert(os.width() == 0); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/signed_char_pointer.pass.cpp b/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/signed_char_pointer.pass.cpp index 36b9586b81296..83143521bc56c 100644 --- a/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/signed_char_pointer.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/signed_char_pointer.pass.cpp @@ -49,7 +49,7 @@ class testbuf } }; -int main() +int main(int, char**) { { std::ostream os((std::streambuf*)0); @@ -84,4 +84,6 @@ int main() assert(sb.str() == "123 "); assert(os.width() == 0); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/unsigned_char.pass.cpp b/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/unsigned_char.pass.cpp index 95609a2642b2f..e45281f866fa4 100644 --- a/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/unsigned_char.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/unsigned_char.pass.cpp @@ -49,7 +49,7 @@ class testbuf } }; -int main() +int main(int, char**) { { std::ostream os((std::streambuf*)0); @@ -84,4 +84,6 @@ int main() assert(sb.str() == "a "); assert(os.width() == 0); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/unsigned_char_pointer.pass.cpp b/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/unsigned_char_pointer.pass.cpp index ef7e6166e9d49..55b429b2dc4b2 100644 --- a/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/unsigned_char_pointer.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/unsigned_char_pointer.pass.cpp @@ -49,7 +49,7 @@ class testbuf } }; -int main() +int main(int, char**) { { std::ostream os((std::streambuf*)0); @@ -84,4 +84,6 @@ int main() assert(sb.str() == "123 "); assert(os.width() == 0); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters/basic_ios.pass.cpp b/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters/basic_ios.pass.cpp index 1d2056250816b..921311f99cee0 100644 --- a/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters/basic_ios.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters/basic_ios.pass.cpp @@ -57,7 +57,7 @@ f(std::basic_ios& os) return os; } -int main() +int main(int, char**) { { testbuf sb; @@ -66,4 +66,6 @@ int main() os << f; assert( (os.flags() & std::ios_base::uppercase)); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters/ios_base.pass.cpp b/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters/ios_base.pass.cpp index 763be3a8382ab..b10330b7c69a5 100644 --- a/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters/ios_base.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters/ios_base.pass.cpp @@ -48,7 +48,7 @@ class testbuf } }; -int main() +int main(int, char**) { { testbuf sb; @@ -57,4 +57,6 @@ int main() os << std::uppercase; assert( (os.flags() & std::ios_base::uppercase)); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters/ostream.pass.cpp b/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters/ostream.pass.cpp index ab39c28aac66d..e57e5412c39cb 100644 --- a/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters/ostream.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters/ostream.pass.cpp @@ -57,7 +57,7 @@ f(std::basic_ostream& os) return os; } -int main() +int main(int, char**) { { testbuf sb; @@ -65,4 +65,6 @@ int main() os << f; assert(sb.str() == "testing..."); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters/streambuf.pass.cpp b/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters/streambuf.pass.cpp index 5668185b0cf29..d2935ca734a1a 100644 --- a/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters/streambuf.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters/streambuf.pass.cpp @@ -55,7 +55,7 @@ class testbuf } }; -int main() +int main(int, char**) { { testbuf sb; @@ -65,4 +65,6 @@ int main() os << &sb2; assert(sb.str() == "testing..."); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/output.streams/ostream.manip/endl.pass.cpp b/libcxx/test/std/input.output/iostream.format/output.streams/ostream.manip/endl.pass.cpp index c6a7d92180c2a..03cd411294b53 100644 --- a/libcxx/test/std/input.output/iostream.format/output.streams/ostream.manip/endl.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/output.streams/ostream.manip/endl.pass.cpp @@ -58,7 +58,7 @@ class testbuf } }; -int main() +int main(int, char**) { { testbuf sb; @@ -76,4 +76,6 @@ int main() assert(sync_called == 2); assert(os.good()); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/output.streams/ostream.manip/ends.pass.cpp b/libcxx/test/std/input.output/iostream.format/output.streams/ostream.manip/ends.pass.cpp index 20703864bbe4d..5f18aecf907f5 100644 --- a/libcxx/test/std/input.output/iostream.format/output.streams/ostream.manip/ends.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/output.streams/ostream.manip/ends.pass.cpp @@ -49,7 +49,7 @@ class testbuf } }; -int main() +int main(int, char**) { { testbuf sb; @@ -67,4 +67,6 @@ int main() assert(sb.str().back() == 0); assert(os.good()); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/output.streams/ostream.manip/flush.pass.cpp b/libcxx/test/std/input.output/iostream.format/output.streams/ostream.manip/flush.pass.cpp index 8ad82cb3a3062..666a92532f8ab 100644 --- a/libcxx/test/std/input.output/iostream.format/output.streams/ostream.manip/flush.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/output.streams/ostream.manip/flush.pass.cpp @@ -38,7 +38,7 @@ class testbuf } }; -int main() +int main(int, char**) { { testbuf sb; @@ -54,4 +54,6 @@ int main() assert(sync_called == 2); assert(os.good()); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/output.streams/ostream.rvalue/CharT_pointer.pass.cpp b/libcxx/test/std/input.output/iostream.format/output.streams/ostream.rvalue/CharT_pointer.pass.cpp index 7b7890abdddc0..724593f1acda8 100644 --- a/libcxx/test/std/input.output/iostream.format/output.streams/ostream.rvalue/CharT_pointer.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/output.streams/ostream.rvalue/CharT_pointer.pass.cpp @@ -54,7 +54,7 @@ class testbuf }; -int main() +int main(int, char**) { { testbuf sb; @@ -66,4 +66,6 @@ int main() std::wostream(&sb) << L"123"; assert(sb.str() == L"123"); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/output.streams/ostream.seeks/seekp.pass.cpp b/libcxx/test/std/input.output/iostream.format/output.streams/ostream.seeks/seekp.pass.cpp index f48ed92b8b6ab..7be006f1060f0 100644 --- a/libcxx/test/std/input.output/iostream.format/output.streams/ostream.seeks/seekp.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/output.streams/ostream.seeks/seekp.pass.cpp @@ -36,7 +36,7 @@ struct testbuf } }; -int main() +int main(int, char**) { { seekpos_called = 0; @@ -64,4 +64,6 @@ int main() assert(seekpos_called == 1); assert(os.rdstate() == std::ios_base::eofbit); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/output.streams/ostream.seeks/seekp2.pass.cpp b/libcxx/test/std/input.output/iostream.format/output.streams/ostream.seeks/seekp2.pass.cpp index 130528046e3fb..dc8e5ed5cd3ad 100644 --- a/libcxx/test/std/input.output/iostream.format/output.streams/ostream.seeks/seekp2.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/output.streams/ostream.seeks/seekp2.pass.cpp @@ -38,7 +38,7 @@ struct testbuf } }; -int main() +int main(int, char**) { { seekoff_called = 0; @@ -66,4 +66,6 @@ int main() assert(seekoff_called == 1); assert(os.rdstate() == std::ios_base::eofbit); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/output.streams/ostream.seeks/tellp.pass.cpp b/libcxx/test/std/input.output/iostream.format/output.streams/ostream.seeks/tellp.pass.cpp index a93032b20be92..d9361e83978e2 100644 --- a/libcxx/test/std/input.output/iostream.format/output.streams/ostream.seeks/tellp.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/output.streams/ostream.seeks/tellp.pass.cpp @@ -38,7 +38,7 @@ struct testbuf } }; -int main() +int main(int, char**) { { std::ostream os((std::streambuf*)0); @@ -50,4 +50,6 @@ int main() assert(os.tellp() == 10); assert(seekoff_called == 1); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/output.streams/ostream.unformatted/flush.pass.cpp b/libcxx/test/std/input.output/iostream.format/output.streams/ostream.unformatted/flush.pass.cpp index f07af7471bf55..15a3b59ea0a37 100644 --- a/libcxx/test/std/input.output/iostream.format/output.streams/ostream.unformatted/flush.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/output.streams/ostream.unformatted/flush.pass.cpp @@ -38,7 +38,7 @@ class testbuf } }; -int main() +int main(int, char**) { { testbuf sb; @@ -50,4 +50,6 @@ int main() assert(os.bad()); assert(sync_called == 2); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/output.streams/ostream.unformatted/put.pass.cpp b/libcxx/test/std/input.output/iostream.format/output.streams/ostream.unformatted/put.pass.cpp index 4dc25175130ed..79f7d9f9fb8b0 100644 --- a/libcxx/test/std/input.output/iostream.format/output.streams/ostream.unformatted/put.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/output.streams/ostream.unformatted/put.pass.cpp @@ -48,7 +48,7 @@ class testbuf } }; -int main() +int main(int, char**) { { std::wostream os((std::wstreambuf*)0); @@ -72,4 +72,6 @@ int main() assert(sb.str() == "a"); assert(os.good()); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/output.streams/ostream.unformatted/write.pass.cpp b/libcxx/test/std/input.output/iostream.format/output.streams/ostream.unformatted/write.pass.cpp index 4b804a501ff65..9ebfdf54b5087 100644 --- a/libcxx/test/std/input.output/iostream.format/output.streams/ostream.unformatted/write.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/output.streams/ostream.unformatted/write.pass.cpp @@ -48,7 +48,7 @@ class testbuf } }; -int main() +int main(int, char**) { { std::wostream os((std::wstreambuf*)0); @@ -72,4 +72,6 @@ int main() assert(sb.str() == s); assert(os.good()); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/output.streams/ostream/types.pass.cpp b/libcxx/test/std/input.output/iostream.format/output.streams/ostream/types.pass.cpp index dbdb52ee749a6..e0e9cddde410a 100644 --- a/libcxx/test/std/input.output/iostream.format/output.streams/ostream/types.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/output.streams/ostream/types.pass.cpp @@ -23,7 +23,7 @@ #include #include -int main() +int main(int, char**) { static_assert((std::is_base_of, std::basic_ostream >::value), ""); static_assert((std::is_same::char_type, char>::value), ""); @@ -31,4 +31,6 @@ int main() static_assert((std::is_same::int_type, std::char_traits::int_type>::value), ""); static_assert((std::is_same::pos_type, std::char_traits::pos_type>::value), ""); static_assert((std::is_same::off_type, std::char_traits::off_type>::value), ""); + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/output.streams/ostream_sentry/construct.pass.cpp b/libcxx/test/std/input.output/iostream.format/output.streams/ostream_sentry/construct.pass.cpp index f7d78537eb7c7..c21776a9aa4ed 100644 --- a/libcxx/test/std/input.output/iostream.format/output.streams/ostream_sentry/construct.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/output.streams/ostream_sentry/construct.pass.cpp @@ -33,7 +33,7 @@ struct testbuf1 } }; -int main() +int main(int, char**) { { std::ostream os((std::streambuf*)0); @@ -57,4 +57,6 @@ int main() assert(bool(s)); assert(sync_called == 1); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/output.streams/ostream_sentry/destruct.pass.cpp b/libcxx/test/std/input.output/iostream.format/output.streams/ostream_sentry/destruct.pass.cpp index ab67442d7b6c5..66ed0acba266f 100644 --- a/libcxx/test/std/input.output/iostream.format/output.streams/ostream_sentry/destruct.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/output.streams/ostream_sentry/destruct.pass.cpp @@ -35,7 +35,7 @@ struct testbuf1 } }; -int main() +int main(int, char**) { { std::ostream os((std::streambuf*)0); @@ -75,4 +75,6 @@ int main() assert(sync_called == 1); } #endif + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/quoted.manip/quoted.pass.cpp b/libcxx/test/std/input.output/iostream.format/quoted.manip/quoted.pass.cpp index c39c0808716e0..b87797da5a1c0 100644 --- a/libcxx/test/std/input.output/iostream.format/quoted.manip/quoted.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/quoted.manip/quoted.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03, c++11 + // // quoted @@ -15,10 +17,6 @@ #include #include -#include "test_macros.h" - -#if TEST_STD_VER > 11 - template bool is_skipws ( const std::basic_istream& is ) { return ( is.flags() & std::ios_base::skipws ) != 0; @@ -123,7 +121,7 @@ void test_padding () { } -int main() +int main(int, char**) { both_ways ( "" ); // This is a compilation check @@ -173,8 +171,6 @@ int main() assert ( unquote ( "" ) == "" ); // nothing there assert ( unquote ( L"" ) == L"" ); // nothing there test_padding (); - } -#else -int main() {} -#endif + return 0; +} diff --git a/libcxx/test/std/input.output/iostream.format/quoted.manip/quoted_char.fail.cpp b/libcxx/test/std/input.output/iostream.format/quoted.manip/quoted_char.fail.cpp index d7b33cdf23098..4b343013e2583 100644 --- a/libcxx/test/std/input.output/iostream.format/quoted.manip/quoted_char.fail.cpp +++ b/libcxx/test/std/input.output/iostream.format/quoted.manip/quoted_char.fail.cpp @@ -30,7 +30,7 @@ void round_trip ( const char *p ) { -int main() +int main(int, char**) { round_trip ( "Hi Mom" ); } diff --git a/libcxx/test/std/input.output/iostream.format/quoted.manip/quoted_traits.fail.cpp b/libcxx/test/std/input.output/iostream.format/quoted.manip/quoted_traits.fail.cpp index 257826b7dbf14..b19eea376d825 100644 --- a/libcxx/test/std/input.output/iostream.format/quoted.manip/quoted_traits.fail.cpp +++ b/libcxx/test/std/input.output/iostream.format/quoted.manip/quoted_traits.fail.cpp @@ -36,7 +36,7 @@ void round_trip ( const char *p ) { -int main() +int main(int, char**) { round_trip ( "Hi Mom" ); } diff --git a/libcxx/test/std/input.output/iostream.format/std.manip/resetiosflags.pass.cpp b/libcxx/test/std/input.output/iostream.format/std.manip/resetiosflags.pass.cpp index 82ef40c9a12ba..637aa4ee317e5 100644 --- a/libcxx/test/std/input.output/iostream.format/std.manip/resetiosflags.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/std.manip/resetiosflags.pass.cpp @@ -22,7 +22,7 @@ struct testbuf testbuf() {} }; -int main() +int main(int, char**) { { testbuf sb; @@ -52,4 +52,6 @@ int main() os << std::resetiosflags(std::ios_base::skipws); assert(!(os.flags() & std::ios_base::skipws)); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/std.manip/setbase.pass.cpp b/libcxx/test/std/input.output/iostream.format/std.manip/setbase.pass.cpp index 83d4960c4205e..580ae4d24c3cf 100644 --- a/libcxx/test/std/input.output/iostream.format/std.manip/setbase.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/std.manip/setbase.pass.cpp @@ -22,7 +22,7 @@ struct testbuf testbuf() {} }; -int main() +int main(int, char**) { { testbuf sb; @@ -72,4 +72,6 @@ int main() os << std::setbase(15); assert((os.flags() & std::ios_base::basefield) == 0); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/std.manip/setfill.pass.cpp b/libcxx/test/std/input.output/iostream.format/std.manip/setfill.pass.cpp index cc548b37ddd8e..4398ff61301cb 100644 --- a/libcxx/test/std/input.output/iostream.format/std.manip/setfill.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/std.manip/setfill.pass.cpp @@ -21,7 +21,7 @@ struct testbuf testbuf() {} }; -int main() +int main(int, char**) { { testbuf sb; @@ -35,4 +35,6 @@ int main() os << std::setfill(L'*'); assert(os.fill() == L'*'); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/std.manip/setiosflags.pass.cpp b/libcxx/test/std/input.output/iostream.format/std.manip/setiosflags.pass.cpp index f4bf9e7f4fdaf..ccf605ad7adeb 100644 --- a/libcxx/test/std/input.output/iostream.format/std.manip/setiosflags.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/std.manip/setiosflags.pass.cpp @@ -22,7 +22,7 @@ struct testbuf testbuf() {} }; -int main() +int main(int, char**) { { testbuf sb; @@ -52,4 +52,6 @@ int main() os << std::setiosflags(std::ios_base::oct); assert(os.flags() & std::ios_base::oct); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/std.manip/setprecision.pass.cpp b/libcxx/test/std/input.output/iostream.format/std.manip/setprecision.pass.cpp index eef401c63e548..e570faf7cb7be 100644 --- a/libcxx/test/std/input.output/iostream.format/std.manip/setprecision.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/std.manip/setprecision.pass.cpp @@ -22,7 +22,7 @@ struct testbuf testbuf() {} }; -int main() +int main(int, char**) { { testbuf sb; @@ -48,4 +48,6 @@ int main() os << std::setprecision(10); assert(os.precision() == 10); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.format/std.manip/setw.pass.cpp b/libcxx/test/std/input.output/iostream.format/std.manip/setw.pass.cpp index cd5e3f2b3e9d2..44aa41e57465f 100644 --- a/libcxx/test/std/input.output/iostream.format/std.manip/setw.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/std.manip/setw.pass.cpp @@ -22,7 +22,7 @@ struct testbuf testbuf() {} }; -int main() +int main(int, char**) { { testbuf sb; @@ -48,4 +48,6 @@ int main() os << std::setw(10); assert(os.width() == 10); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.forward/iosfwd.pass.cpp b/libcxx/test/std/input.output/iostream.forward/iosfwd.pass.cpp index 1caadd1c09921..5c60dcca2869e 100644 --- a/libcxx/test/std/input.output/iostream.forward/iosfwd.pass.cpp +++ b/libcxx/test/std/input.output/iostream.forward/iosfwd.pass.cpp @@ -17,7 +17,7 @@ template void test() ((void)p); // Prevent unused warning } -int main() +int main(int, char**) { test* >(); test* >(); @@ -119,4 +119,6 @@ int main() test*>(); test(); test(); + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.objects/narrow.stream.objects/cerr.pass.cpp b/libcxx/test/std/input.output/iostream.objects/narrow.stream.objects/cerr.pass.cpp index 1c046bcf4479d..ef3cbf676aa40 100644 --- a/libcxx/test/std/input.output/iostream.objects/narrow.stream.objects/cerr.pass.cpp +++ b/libcxx/test/std/input.output/iostream.objects/narrow.stream.objects/cerr.pass.cpp @@ -13,7 +13,7 @@ #include #include -int main() +int main(int, char**) { #if 0 std::cerr << "Hello World!\n"; @@ -25,4 +25,6 @@ int main() #endif assert(std::cerr.flags() & std::ios_base::unitbuf); #endif // 0 + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.objects/narrow.stream.objects/cin.pass.cpp b/libcxx/test/std/input.output/iostream.objects/narrow.stream.objects/cin.pass.cpp index cce1f3eaf622f..d28255043b601 100644 --- a/libcxx/test/std/input.output/iostream.objects/narrow.stream.objects/cin.pass.cpp +++ b/libcxx/test/std/input.output/iostream.objects/narrow.stream.objects/cin.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { #if 0 std::cout << "Hello World!\n"; @@ -30,4 +30,6 @@ int main() assert(std::cin.tie() == &std::cout); #endif #endif + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.objects/narrow.stream.objects/clog.pass.cpp b/libcxx/test/std/input.output/iostream.objects/narrow.stream.objects/clog.pass.cpp index 49fffca4286a1..97e67fddf81f6 100644 --- a/libcxx/test/std/input.output/iostream.objects/narrow.stream.objects/clog.pass.cpp +++ b/libcxx/test/std/input.output/iostream.objects/narrow.stream.objects/clog.pass.cpp @@ -12,11 +12,13 @@ #include -int main() +int main(int, char**) { #if 0 std::clog << "Hello World!\n"; #else (void)std::clog; #endif + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.objects/narrow.stream.objects/cout.pass.cpp b/libcxx/test/std/input.output/iostream.objects/narrow.stream.objects/cout.pass.cpp index d470956e284dc..44ae085779214 100644 --- a/libcxx/test/std/input.output/iostream.objects/narrow.stream.objects/cout.pass.cpp +++ b/libcxx/test/std/input.output/iostream.objects/narrow.stream.objects/cout.pass.cpp @@ -14,7 +14,7 @@ #include -int main() +int main(int, char**) { #if 0 std::cout << "Hello World!\n"; @@ -25,4 +25,6 @@ int main() #else // 0 (void)std::cout; #endif + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.objects/wide.stream.objects/wcerr.pass.cpp b/libcxx/test/std/input.output/iostream.objects/wide.stream.objects/wcerr.pass.cpp index 516f3b8c994a2..0af3f5ee7e521 100644 --- a/libcxx/test/std/input.output/iostream.objects/wide.stream.objects/wcerr.pass.cpp +++ b/libcxx/test/std/input.output/iostream.objects/wide.stream.objects/wcerr.pass.cpp @@ -13,7 +13,7 @@ #include #include -int main() +int main(int, char**) { #if 0 std::wcerr << L"Hello World!\n"; @@ -25,4 +25,6 @@ int main() #endif assert(std::wcerr.flags() & std::ios_base::unitbuf); #endif // 0 + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.objects/wide.stream.objects/wcin.pass.cpp b/libcxx/test/std/input.output/iostream.objects/wide.stream.objects/wcin.pass.cpp index 862f2203456e3..68c1528602b88 100644 --- a/libcxx/test/std/input.output/iostream.objects/wide.stream.objects/wcin.pass.cpp +++ b/libcxx/test/std/input.output/iostream.objects/wide.stream.objects/wcin.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { #if 0 std::wcout << L"Hello World!\n"; @@ -30,4 +30,6 @@ int main() assert(std::wcin.tie() == &std::wcout); #endif #endif + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.objects/wide.stream.objects/wclog.pass.cpp b/libcxx/test/std/input.output/iostream.objects/wide.stream.objects/wclog.pass.cpp index a6883b257049a..ad7e35b515137 100644 --- a/libcxx/test/std/input.output/iostream.objects/wide.stream.objects/wclog.pass.cpp +++ b/libcxx/test/std/input.output/iostream.objects/wide.stream.objects/wclog.pass.cpp @@ -12,11 +12,13 @@ #include -int main() +int main(int, char**) { #if 0 std::wclog << L"Hello World!\n"; #else (void)std::wclog; #endif + + return 0; } diff --git a/libcxx/test/std/input.output/iostream.objects/wide.stream.objects/wcout.pass.cpp b/libcxx/test/std/input.output/iostream.objects/wide.stream.objects/wcout.pass.cpp index ec5bb50ecb0b4..5703c61639d32 100644 --- a/libcxx/test/std/input.output/iostream.objects/wide.stream.objects/wcout.pass.cpp +++ b/libcxx/test/std/input.output/iostream.objects/wide.stream.objects/wcout.pass.cpp @@ -14,11 +14,13 @@ #include -int main() +int main(int, char**) { #if 0 std::wcout << L"Hello World!\n"; #else (void)std::wcout; #endif + + return 0; } diff --git a/libcxx/test/std/input.output/iostreams.base/fpos/fpos.members/state.pass.cpp b/libcxx/test/std/input.output/iostreams.base/fpos/fpos.members/state.pass.cpp index 9c4d74dcd0959..3938d79804cb6 100644 --- a/libcxx/test/std/input.output/iostreams.base/fpos/fpos.members/state.pass.cpp +++ b/libcxx/test/std/input.output/iostreams.base/fpos/fpos.members/state.pass.cpp @@ -15,9 +15,11 @@ #include #include -int main() +int main(int, char**) { std::fpos f; f.state(3); assert(f.state() == 3); + + return 0; } diff --git a/libcxx/test/std/input.output/iostreams.base/fpos/fpos.operations/addition.pass.cpp b/libcxx/test/std/input.output/iostreams.base/fpos/fpos.operations/addition.pass.cpp index 1b58566088ca3..30bdabc368c68 100644 --- a/libcxx/test/std/input.output/iostreams.base/fpos/fpos.operations/addition.pass.cpp +++ b/libcxx/test/std/input.output/iostreams.base/fpos/fpos.operations/addition.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { typedef std::fpos P; P p(5); @@ -24,4 +24,6 @@ int main() assert(q == P(11)); p += o; assert(p == q); + + return 0; } diff --git a/libcxx/test/std/input.output/iostreams.base/fpos/fpos.operations/ctor_int.pass.cpp b/libcxx/test/std/input.output/iostreams.base/fpos/fpos.operations/ctor_int.pass.cpp index ff30e81afbcee..e27c9068784d6 100644 --- a/libcxx/test/std/input.output/iostreams.base/fpos/fpos.operations/ctor_int.pass.cpp +++ b/libcxx/test/std/input.output/iostreams.base/fpos/fpos.operations/ctor_int.pass.cpp @@ -15,9 +15,11 @@ #include #include -int main() +int main(int, char**) { typedef std::fpos P; P p(5); assert(p == P(5)); + + return 0; } diff --git a/libcxx/test/std/input.output/iostreams.base/fpos/fpos.operations/difference.pass.cpp b/libcxx/test/std/input.output/iostreams.base/fpos/fpos.operations/difference.pass.cpp index 405c98899fc27..114e382a71f9b 100644 --- a/libcxx/test/std/input.output/iostreams.base/fpos/fpos.operations/difference.pass.cpp +++ b/libcxx/test/std/input.output/iostreams.base/fpos/fpos.operations/difference.pass.cpp @@ -15,11 +15,13 @@ #include #include -int main() +int main(int, char**) { typedef std::fpos P; P p(11); P q(6); std::streamoff o = p - q; assert(o == 5); + + return 0; } diff --git a/libcxx/test/std/input.output/iostreams.base/fpos/fpos.operations/eq_int.pass.cpp b/libcxx/test/std/input.output/iostreams.base/fpos/fpos.operations/eq_int.pass.cpp index 20ffe33c413ce..1b1a5f33d1c6a 100644 --- a/libcxx/test/std/input.output/iostreams.base/fpos/fpos.operations/eq_int.pass.cpp +++ b/libcxx/test/std/input.output/iostreams.base/fpos/fpos.operations/eq_int.pass.cpp @@ -15,11 +15,13 @@ #include #include -int main() +int main(int, char**) { typedef std::fpos P; P p(5); P q(6); assert(p == p); assert(p != q); + + return 0; } diff --git a/libcxx/test/std/input.output/iostreams.base/fpos/fpos.operations/offset.pass.cpp b/libcxx/test/std/input.output/iostreams.base/fpos/fpos.operations/offset.pass.cpp index 108cffdf90f92..a8e763f72454f 100644 --- a/libcxx/test/std/input.output/iostreams.base/fpos/fpos.operations/offset.pass.cpp +++ b/libcxx/test/std/input.output/iostreams.base/fpos/fpos.operations/offset.pass.cpp @@ -15,10 +15,12 @@ #include #include -int main() +int main(int, char**) { typedef std::fpos P; P p(std::streamoff(7)); std::streamoff offset(p); assert(offset == 7); + + return 0; } diff --git a/libcxx/test/std/input.output/iostreams.base/fpos/fpos.operations/streamsize.pass.cpp b/libcxx/test/std/input.output/iostreams.base/fpos/fpos.operations/streamsize.pass.cpp index e6cb51ae17407..9d9cd79024e92 100644 --- a/libcxx/test/std/input.output/iostreams.base/fpos/fpos.operations/streamsize.pass.cpp +++ b/libcxx/test/std/input.output/iostreams.base/fpos/fpos.operations/streamsize.pass.cpp @@ -13,11 +13,13 @@ #include #include -int main() +int main(int, char**) { std::streamoff o(5); std::streamsize sz(o); assert(sz == 5); std::streamoff o2(sz); assert(o == o2); + + return 0; } diff --git a/libcxx/test/std/input.output/iostreams.base/fpos/fpos.operations/subtraction.pass.cpp b/libcxx/test/std/input.output/iostreams.base/fpos/fpos.operations/subtraction.pass.cpp index 9991be4f953b8..b38378b7e8cc8 100644 --- a/libcxx/test/std/input.output/iostreams.base/fpos/fpos.operations/subtraction.pass.cpp +++ b/libcxx/test/std/input.output/iostreams.base/fpos/fpos.operations/subtraction.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { typedef std::fpos P; P p(11); @@ -24,4 +24,6 @@ int main() assert(q == P(5)); p -= o; assert(p == q); + + return 0; } diff --git a/libcxx/test/std/input.output/iostreams.base/fpos/nothing_to_do.pass.cpp b/libcxx/test/std/input.output/iostreams.base/fpos/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/input.output/iostreams.base/fpos/nothing_to_do.pass.cpp +++ b/libcxx/test/std/input.output/iostreams.base/fpos/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/input.output/iostreams.base/ios.base/fmtflags.state/flags.pass.cpp b/libcxx/test/std/input.output/iostreams.base/ios.base/fmtflags.state/flags.pass.cpp index 1a958b615b993..da147bd82f8b1 100644 --- a/libcxx/test/std/input.output/iostreams.base/ios.base/fmtflags.state/flags.pass.cpp +++ b/libcxx/test/std/input.output/iostreams.base/ios.base/fmtflags.state/flags.pass.cpp @@ -25,8 +25,10 @@ class test } }; -int main() +int main(int, char**) { const test t; assert(t.flags() == (test::skipws | test::dec)); + + return 0; } diff --git a/libcxx/test/std/input.output/iostreams.base/ios.base/fmtflags.state/flags_fmtflags.pass.cpp b/libcxx/test/std/input.output/iostreams.base/ios.base/fmtflags.state/flags_fmtflags.pass.cpp index 0f49701fbf2b6..ed39a54245a55 100644 --- a/libcxx/test/std/input.output/iostreams.base/ios.base/fmtflags.state/flags_fmtflags.pass.cpp +++ b/libcxx/test/std/input.output/iostreams.base/ios.base/fmtflags.state/flags_fmtflags.pass.cpp @@ -25,11 +25,13 @@ class test } }; -int main() +int main(int, char**) { test t; assert(t.flags() == (test::skipws | test::dec)); test::fmtflags f = t.flags(test::hex | test::right); assert(f == (test::skipws | test::dec)); assert(t.flags() == (test::hex | test::right)); + + return 0; } diff --git a/libcxx/test/std/input.output/iostreams.base/ios.base/fmtflags.state/precision.pass.cpp b/libcxx/test/std/input.output/iostreams.base/ios.base/fmtflags.state/precision.pass.cpp index d22ca2647b571..f6387c828f253 100644 --- a/libcxx/test/std/input.output/iostreams.base/ios.base/fmtflags.state/precision.pass.cpp +++ b/libcxx/test/std/input.output/iostreams.base/ios.base/fmtflags.state/precision.pass.cpp @@ -25,8 +25,10 @@ class test } }; -int main() +int main(int, char**) { const test t; assert(t.precision() == 6); + + return 0; } diff --git a/libcxx/test/std/input.output/iostreams.base/ios.base/fmtflags.state/precision_streamsize.pass.cpp b/libcxx/test/std/input.output/iostreams.base/ios.base/fmtflags.state/precision_streamsize.pass.cpp index ab38ab3d5e890..475ddc47f8ac4 100644 --- a/libcxx/test/std/input.output/iostreams.base/ios.base/fmtflags.state/precision_streamsize.pass.cpp +++ b/libcxx/test/std/input.output/iostreams.base/ios.base/fmtflags.state/precision_streamsize.pass.cpp @@ -25,11 +25,13 @@ class test } }; -int main() +int main(int, char**) { test t; assert(t.precision() == 6); std::streamsize p = t.precision(10); assert(p == 6); assert(t.precision() == 10); + + return 0; } diff --git a/libcxx/test/std/input.output/iostreams.base/ios.base/fmtflags.state/setf_fmtflags.pass.cpp b/libcxx/test/std/input.output/iostreams.base/ios.base/fmtflags.state/setf_fmtflags.pass.cpp index da742974dabf2..d8ca9cc8239eb 100644 --- a/libcxx/test/std/input.output/iostreams.base/ios.base/fmtflags.state/setf_fmtflags.pass.cpp +++ b/libcxx/test/std/input.output/iostreams.base/ios.base/fmtflags.state/setf_fmtflags.pass.cpp @@ -25,11 +25,13 @@ class test } }; -int main() +int main(int, char**) { test t; assert(t.flags() == (test::skipws | test::dec)); test::fmtflags f = t.setf(test::hex | test::right); assert(f == (test::skipws | test::dec)); assert(t.flags() == (test::skipws | test::dec | test::hex | test::right)); + + return 0; } diff --git a/libcxx/test/std/input.output/iostreams.base/ios.base/fmtflags.state/setf_fmtflags_mask.pass.cpp b/libcxx/test/std/input.output/iostreams.base/ios.base/fmtflags.state/setf_fmtflags_mask.pass.cpp index 00ce003dada08..6793ced7fe039 100644 --- a/libcxx/test/std/input.output/iostreams.base/ios.base/fmtflags.state/setf_fmtflags_mask.pass.cpp +++ b/libcxx/test/std/input.output/iostreams.base/ios.base/fmtflags.state/setf_fmtflags_mask.pass.cpp @@ -25,11 +25,13 @@ class test } }; -int main() +int main(int, char**) { test t; assert(t.flags() == (test::skipws | test::dec)); test::fmtflags f = t.setf(test::hex | test::right, test::dec | test::right); assert(f == (test::skipws | test::dec)); assert(t.flags() == (test::skipws | test::right)); + + return 0; } diff --git a/libcxx/test/std/input.output/iostreams.base/ios.base/fmtflags.state/unsetf_mask.pass.cpp b/libcxx/test/std/input.output/iostreams.base/ios.base/fmtflags.state/unsetf_mask.pass.cpp index 49a55cb402326..f20acff1347f3 100644 --- a/libcxx/test/std/input.output/iostreams.base/ios.base/fmtflags.state/unsetf_mask.pass.cpp +++ b/libcxx/test/std/input.output/iostreams.base/ios.base/fmtflags.state/unsetf_mask.pass.cpp @@ -25,10 +25,12 @@ class test } }; -int main() +int main(int, char**) { test t; assert(t.flags() == (test::skipws | test::dec)); t.unsetf(test::dec | test::right); assert(t.flags() == test::skipws); + + return 0; } diff --git a/libcxx/test/std/input.output/iostreams.base/ios.base/fmtflags.state/width.pass.cpp b/libcxx/test/std/input.output/iostreams.base/ios.base/fmtflags.state/width.pass.cpp index d812aa291f128..fc2601a456756 100644 --- a/libcxx/test/std/input.output/iostreams.base/ios.base/fmtflags.state/width.pass.cpp +++ b/libcxx/test/std/input.output/iostreams.base/ios.base/fmtflags.state/width.pass.cpp @@ -25,8 +25,10 @@ class test } }; -int main() +int main(int, char**) { const test t; assert(t.width() == 0); + + return 0; } diff --git a/libcxx/test/std/input.output/iostreams.base/ios.base/fmtflags.state/width_streamsize.pass.cpp b/libcxx/test/std/input.output/iostreams.base/ios.base/fmtflags.state/width_streamsize.pass.cpp index 7c906094804fb..3b389e5fd223f 100644 --- a/libcxx/test/std/input.output/iostreams.base/ios.base/fmtflags.state/width_streamsize.pass.cpp +++ b/libcxx/test/std/input.output/iostreams.base/ios.base/fmtflags.state/width_streamsize.pass.cpp @@ -25,11 +25,13 @@ class test } }; -int main() +int main(int, char**) { test t; assert(t.width() == 0); std::streamsize w = t.width(4); assert(w == 0); assert(t.width() == 4); + + return 0; } diff --git a/libcxx/test/std/input.output/iostreams.base/ios.base/ios.base.callback/register_callback.pass.cpp b/libcxx/test/std/input.output/iostreams.base/ios.base/ios.base.callback/register_callback.pass.cpp index 3de42eabc4ad8..316d23a528bca 100644 --- a/libcxx/test/std/input.output/iostreams.base/ios.base/ios.base.callback/register_callback.pass.cpp +++ b/libcxx/test/std/input.output/iostreams.base/ios.base/ios.base.callback/register_callback.pass.cpp @@ -43,7 +43,7 @@ void f1(std::ios_base::event ev, std::ios_base& stream, int index) } } -int main() +int main(int, char**) { test t; std::ios_base& b = t; @@ -52,4 +52,6 @@ int main() b.register_callback(f1, 4); std::locale l = b.imbue(std::locale(LOCALE_en_US_UTF_8)); assert(f1_called == 3); + + return 0; } diff --git a/libcxx/test/std/input.output/iostreams.base/ios.base/ios.base.cons/dtor.pass.cpp b/libcxx/test/std/input.output/iostreams.base/ios.base/ios.base.cons/dtor.pass.cpp index 12434f5a21944..7c78ea5667d9d 100644 --- a/libcxx/test/std/input.output/iostreams.base/ios.base/ios.base.cons/dtor.pass.cpp +++ b/libcxx/test/std/input.output/iostreams.base/ios.base/ios.base.cons/dtor.pass.cpp @@ -70,7 +70,7 @@ void f3(std::ios_base::event ev, std::ios_base& stream, int index) } } -int main() +int main(int, char**) { { test t; @@ -82,4 +82,6 @@ int main() assert(f1_called); assert(f2_called); assert(f3_called); + + return 0; } diff --git a/libcxx/test/std/input.output/iostreams.base/ios.base/ios.base.locales/getloc.pass.cpp b/libcxx/test/std/input.output/iostreams.base/ios.base/ios.base.locales/getloc.pass.cpp index 821a1f5146112..06b8d83c79ed2 100644 --- a/libcxx/test/std/input.output/iostreams.base/ios.base/ios.base.locales/getloc.pass.cpp +++ b/libcxx/test/std/input.output/iostreams.base/ios.base/ios.base.locales/getloc.pass.cpp @@ -26,8 +26,10 @@ class test } }; -int main() +int main(int, char**) { const test t; assert(t.getloc().name() == std::string("C")); + + return 0; } diff --git a/libcxx/test/std/input.output/iostreams.base/ios.base/ios.base.locales/imbue.pass.cpp b/libcxx/test/std/input.output/iostreams.base/ios.base/ios.base.locales/imbue.pass.cpp index 0fa77cb7ac215..ad8898a170f43 100644 --- a/libcxx/test/std/input.output/iostreams.base/ios.base/ios.base.locales/imbue.pass.cpp +++ b/libcxx/test/std/input.output/iostreams.base/ios.base/ios.base.locales/imbue.pass.cpp @@ -74,7 +74,7 @@ void f3(std::ios_base::event ev, std::ios_base& stream, int index) } } -int main() +int main(int, char**) { test t; std::ios_base& b = t; @@ -87,4 +87,6 @@ int main() assert(f1_called); assert(f2_called); assert(f3_called); + + return 0; } diff --git a/libcxx/test/std/input.output/iostreams.base/ios.base/ios.base.storage/iword.pass.cpp b/libcxx/test/std/input.output/iostreams.base/ios.base/ios.base.storage/iword.pass.cpp index 467b885cebeca..84eb18370c3fe 100644 --- a/libcxx/test/std/input.output/iostreams.base/ios.base/ios.base.storage/iword.pass.cpp +++ b/libcxx/test/std/input.output/iostreams.base/ios.base/ios.base.storage/iword.pass.cpp @@ -29,7 +29,7 @@ class test } }; -int main() +int main(int, char**) { test t; std::ios_base& b = t; @@ -41,4 +41,6 @@ int main() for (int j = 0; j <= i; ++j) assert(b.iword(j) == j); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostreams.base/ios.base/ios.base.storage/pword.pass.cpp b/libcxx/test/std/input.output/iostreams.base/ios.base/ios.base.storage/pword.pass.cpp index 65aca332ac2b5..c4594615daab6 100644 --- a/libcxx/test/std/input.output/iostreams.base/ios.base/ios.base.storage/pword.pass.cpp +++ b/libcxx/test/std/input.output/iostreams.base/ios.base/ios.base.storage/pword.pass.cpp @@ -30,7 +30,7 @@ class test } }; -int main() +int main(int, char**) { test t; std::ios_base& b = t; @@ -42,4 +42,6 @@ int main() for (std::intptr_t j = 0; j <= i; ++j) assert(b.pword(j) == (void*)j); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostreams.base/ios.base/ios.base.storage/xalloc.pass.cpp b/libcxx/test/std/input.output/iostreams.base/ios.base/ios.base.storage/xalloc.pass.cpp index dd95b26819f00..fa666c26d748d 100644 --- a/libcxx/test/std/input.output/iostreams.base/ios.base/ios.base.storage/xalloc.pass.cpp +++ b/libcxx/test/std/input.output/iostreams.base/ios.base/ios.base.storage/xalloc.pass.cpp @@ -15,11 +15,11 @@ #include #include -int main() +int main(int, char**) { - assert(std::ios_base::xalloc() == 0); - assert(std::ios_base::xalloc() == 1); - assert(std::ios_base::xalloc() == 2); - assert(std::ios_base::xalloc() == 3); - assert(std::ios_base::xalloc() == 4); + int index = std::ios_base::xalloc(); + for (int i = 0; i < 10000; ++i) + assert(std::ios_base::xalloc() == ++index); + + return 0; } diff --git a/libcxx/test/std/input.output/iostreams.base/ios.base/ios.members.static/sync_with_stdio.pass.cpp b/libcxx/test/std/input.output/iostreams.base/ios.base/ios.members.static/sync_with_stdio.pass.cpp index 8937f2585bf26..cd219971e549d 100644 --- a/libcxx/test/std/input.output/iostreams.base/ios.base/ios.members.static/sync_with_stdio.pass.cpp +++ b/libcxx/test/std/input.output/iostreams.base/ios.base/ios.members.static/sync_with_stdio.pass.cpp @@ -13,7 +13,7 @@ #include #include -int main() +int main(int, char**) { assert( std::ios_base::sync_with_stdio(false)); assert(!std::ios_base::sync_with_stdio(false)); @@ -23,4 +23,6 @@ int main() assert( std::ios_base::sync_with_stdio(false)); assert(!std::ios_base::sync_with_stdio()); assert( std::ios_base::sync_with_stdio()); + + return 0; } diff --git a/libcxx/test/std/input.output/iostreams.base/ios.base/ios.types/ios_Init/tested_elsewhere.pass.cpp b/libcxx/test/std/input.output/iostreams.base/ios.base/ios.types/ios_Init/tested_elsewhere.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/input.output/iostreams.base/ios.base/ios.types/ios_Init/tested_elsewhere.pass.cpp +++ b/libcxx/test/std/input.output/iostreams.base/ios.base/ios.types/ios_Init/tested_elsewhere.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/input.output/iostreams.base/ios.base/ios.types/ios_failure/ctor_char_pointer_error_code.pass.cpp b/libcxx/test/std/input.output/iostreams.base/ios.base/ios.types/ios_failure/ctor_char_pointer_error_code.pass.cpp index 0fc162599749c..382aeda4f11ea 100644 --- a/libcxx/test/std/input.output/iostreams.base/ios.base/ios.types/ios_failure/ctor_char_pointer_error_code.pass.cpp +++ b/libcxx/test/std/input.output/iostreams.base/ios.base/ios.types/ios_failure/ctor_char_pointer_error_code.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { { std::string what_arg("io test message"); @@ -37,4 +37,6 @@ int main() assert(what_message.find(std::iostream_category().message(static_cast (std::io_errc::stream))) != std::string::npos); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostreams.base/ios.base/ios.types/ios_failure/ctor_string_error_code.pass.cpp b/libcxx/test/std/input.output/iostreams.base/ios.base/ios.types/ios_failure/ctor_string_error_code.pass.cpp index cc607d9458de9..610e6ad1527be 100644 --- a/libcxx/test/std/input.output/iostreams.base/ios.base/ios.types/ios_failure/ctor_string_error_code.pass.cpp +++ b/libcxx/test/std/input.output/iostreams.base/ios.base/ios.types/ios_failure/ctor_string_error_code.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { // LWG2462 std::ios_base::failure is overspecified static_assert((std::is_base_of::value), ""); @@ -40,4 +40,6 @@ int main() assert(what_message.find(std::iostream_category().message(static_cast (std::io_errc::stream))) != std::string::npos); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostreams.base/ios.base/ios.types/ios_fmtflags/fmtflags.pass.cpp b/libcxx/test/std/input.output/iostreams.base/ios.base/ios.types/ios_fmtflags/fmtflags.pass.cpp index 6a51484f3f788..2eed477b0dd48 100644 --- a/libcxx/test/std/input.output/iostreams.base/ios.base/ios.types/ios_fmtflags/fmtflags.pass.cpp +++ b/libcxx/test/std/input.output/iostreams.base/ios.base/ios.types/ios_fmtflags/fmtflags.pass.cpp @@ -32,7 +32,7 @@ #include #include -int main() +int main(int, char**) { assert(std::ios_base::boolalpha); assert(std::ios_base::dec); @@ -77,4 +77,6 @@ int main() | std::ios_base::hex)); assert(std::ios_base::floatfield == (std::ios_base::scientific | std::ios_base::fixed)); + + return 0; } diff --git a/libcxx/test/std/input.output/iostreams.base/ios.base/ios.types/ios_iostate/iostate.pass.cpp b/libcxx/test/std/input.output/iostreams.base/ios.base/ios.types/ios_iostate/iostate.pass.cpp index 64123e5d18691..7e982f25f5f43 100644 --- a/libcxx/test/std/input.output/iostreams.base/ios.base/ios.types/ios_iostate/iostate.pass.cpp +++ b/libcxx/test/std/input.output/iostreams.base/ios.base/ios.types/ios_iostate/iostate.pass.cpp @@ -18,7 +18,7 @@ #include #include -int main() +int main(int, char**) { assert(std::ios_base::badbit); assert(std::ios_base::eofbit); @@ -32,4 +32,6 @@ int main() ); assert(std::ios_base::goodbit == 0); + + return 0; } diff --git a/libcxx/test/std/input.output/iostreams.base/ios.base/ios.types/ios_openmode/openmode.pass.cpp b/libcxx/test/std/input.output/iostreams.base/ios.base/ios.types/ios_openmode/openmode.pass.cpp index 88c292955d3b1..ab21f96b7fcb9 100644 --- a/libcxx/test/std/input.output/iostreams.base/ios.base/ios.types/ios_openmode/openmode.pass.cpp +++ b/libcxx/test/std/input.output/iostreams.base/ios.base/ios.types/ios_openmode/openmode.pass.cpp @@ -20,7 +20,7 @@ #include #include -int main() +int main(int, char**) { assert(std::ios_base::app); assert(std::ios_base::ate); @@ -38,4 +38,6 @@ int main() & std::ios_base::out & std::ios_base::trunc) == 0 ); + + return 0; } diff --git a/libcxx/test/std/input.output/iostreams.base/ios.base/ios.types/ios_seekdir/seekdir.pass.cpp b/libcxx/test/std/input.output/iostreams.base/ios.base/ios.types/ios_seekdir/seekdir.pass.cpp index 3d0c80974fedd..dfa955c7f5538 100644 --- a/libcxx/test/std/input.output/iostreams.base/ios.base/ios.types/ios_seekdir/seekdir.pass.cpp +++ b/libcxx/test/std/input.output/iostreams.base/ios.base/ios.types/ios_seekdir/seekdir.pass.cpp @@ -17,9 +17,11 @@ #include #include -int main() +int main(int, char**) { assert(std::ios_base::beg != std::ios_base::cur); assert(std::ios_base::beg != std::ios_base::end); assert(std::ios_base::cur != std::ios_base::end); + + return 0; } diff --git a/libcxx/test/std/input.output/iostreams.base/ios.base/ios.types/nothing_to_do.pass.cpp b/libcxx/test/std/input.output/iostreams.base/ios.base/ios.types/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/input.output/iostreams.base/ios.base/ios.types/nothing_to_do.pass.cpp +++ b/libcxx/test/std/input.output/iostreams.base/ios.base/ios.types/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/input.output/iostreams.base/ios.base/nothing_to_do.pass.cpp b/libcxx/test/std/input.output/iostreams.base/ios.base/nothing_to_do.pass.cpp index 8e23732f09f10..c4eff25bcb146 100644 --- a/libcxx/test/std/input.output/iostreams.base/ios.base/nothing_to_do.pass.cpp +++ b/libcxx/test/std/input.output/iostreams.base/ios.base/nothing_to_do.pass.cpp @@ -10,6 +10,8 @@ #include -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/input.output/iostreams.base/ios/basic.ios.cons/ctor_streambuf.pass.cpp b/libcxx/test/std/input.output/iostreams.base/ios/basic.ios.cons/ctor_streambuf.pass.cpp index 1bd33e96170bb..01c0d4679bc9f 100644 --- a/libcxx/test/std/input.output/iostreams.base/ios/basic.ios.cons/ctor_streambuf.pass.cpp +++ b/libcxx/test/std/input.output/iostreams.base/ios/basic.ios.cons/ctor_streambuf.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { std::streambuf* sb = 0; @@ -44,4 +44,6 @@ int main() assert(ios.fill() == ' '); assert(ios.getloc() == std::locale()); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostreams.base/ios/basic.ios.members/copyfmt.pass.cpp b/libcxx/test/std/input.output/iostreams.base/ios/basic.ios.members/copyfmt.pass.cpp index 08d00c1c0a985..949c87e0b832c 100644 --- a/libcxx/test/std/input.output/iostreams.base/ios/basic.ios.members/copyfmt.pass.cpp +++ b/libcxx/test/std/input.output/iostreams.base/ios/basic.ios.members/copyfmt.pass.cpp @@ -110,7 +110,7 @@ void g3(std::ios_base::event ev, std::ios_base& stream, int index) } } -int main() +int main(int, char**) { testbuf sb1; std::ios ios1(&sb1); @@ -190,4 +190,6 @@ int main() assert(ios1.tie() == (std::ostream*)2); assert(ios1.fill() == '2'); #endif + + return 0; } diff --git a/libcxx/test/std/input.output/iostreams.base/ios/basic.ios.members/fill.pass.cpp b/libcxx/test/std/input.output/iostreams.base/ios/basic.ios.members/fill.pass.cpp index b5cc96c338486..f45c6c8b25c76 100644 --- a/libcxx/test/std/input.output/iostreams.base/ios/basic.ios.members/fill.pass.cpp +++ b/libcxx/test/std/input.output/iostreams.base/ios/basic.ios.members/fill.pass.cpp @@ -15,8 +15,10 @@ #include #include -int main() +int main(int, char**) { const std::ios ios(0); assert(ios.fill() == ' '); + + return 0; } diff --git a/libcxx/test/std/input.output/iostreams.base/ios/basic.ios.members/fill_char_type.pass.cpp b/libcxx/test/std/input.output/iostreams.base/ios/basic.ios.members/fill_char_type.pass.cpp index b1c56ed539d24..1c42a03fb317b 100644 --- a/libcxx/test/std/input.output/iostreams.base/ios/basic.ios.members/fill_char_type.pass.cpp +++ b/libcxx/test/std/input.output/iostreams.base/ios/basic.ios.members/fill_char_type.pass.cpp @@ -15,11 +15,13 @@ #include #include -int main() +int main(int, char**) { std::ios ios(0); assert(ios.fill() == ' '); char c = ios.fill('*'); assert(c == ' '); assert(ios.fill() == '*'); + + return 0; } diff --git a/libcxx/test/std/input.output/iostreams.base/ios/basic.ios.members/imbue.pass.cpp b/libcxx/test/std/input.output/iostreams.base/ios/basic.ios.members/imbue.pass.cpp index 3874372902f0a..ed0df788daa02 100644 --- a/libcxx/test/std/input.output/iostreams.base/ios/basic.ios.members/imbue.pass.cpp +++ b/libcxx/test/std/input.output/iostreams.base/ios/basic.ios.members/imbue.pass.cpp @@ -68,7 +68,7 @@ void f3(std::ios_base::event ev, std::ios_base& stream, int index) } } -int main() +int main(int, char**) { { std::ios ios(0); @@ -99,4 +99,6 @@ int main() assert(f2_called); assert(f3_called); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostreams.base/ios/basic.ios.members/move.pass.cpp b/libcxx/test/std/input.output/iostreams.base/ios/basic.ios.members/move.pass.cpp index 4c60756746e33..5f99f3db0ae11 100644 --- a/libcxx/test/std/input.output/iostreams.base/ios/basic.ios.members/move.pass.cpp +++ b/libcxx/test/std/input.output/iostreams.base/ios/basic.ios.members/move.pass.cpp @@ -77,7 +77,7 @@ void g3(std::ios_base::event ev, std::ios_base&, int index) } } -int main() +int main(int, char**) { testios ios1; testbuf sb2; @@ -136,4 +136,6 @@ int main() assert(ios2.rdbuf() == &sb2); assert(ios2.tie() == 0); + + return 0; } diff --git a/libcxx/test/std/input.output/iostreams.base/ios/basic.ios.members/narrow.pass.cpp b/libcxx/test/std/input.output/iostreams.base/ios/basic.ios.members/narrow.pass.cpp index b1ffc1e96d6fc..afab4ec5def5d 100644 --- a/libcxx/test/std/input.output/iostreams.base/ios/basic.ios.members/narrow.pass.cpp +++ b/libcxx/test/std/input.output/iostreams.base/ios/basic.ios.members/narrow.pass.cpp @@ -15,9 +15,11 @@ #include #include -int main() +int main(int, char**) { const std::wios ios(0); assert(ios.narrow(L'c', '*') == 'c'); assert(ios.narrow(L'\u203C', '*') == '*'); + + return 0; } diff --git a/libcxx/test/std/input.output/iostreams.base/ios/basic.ios.members/rdbuf.pass.cpp b/libcxx/test/std/input.output/iostreams.base/ios/basic.ios.members/rdbuf.pass.cpp index bc5871f924d83..f104cada62714 100644 --- a/libcxx/test/std/input.output/iostreams.base/ios/basic.ios.members/rdbuf.pass.cpp +++ b/libcxx/test/std/input.output/iostreams.base/ios/basic.ios.members/rdbuf.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { const std::ios ios(0); @@ -27,4 +27,6 @@ int main() const std::ios ios(sb); assert(ios.rdbuf() == sb); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostreams.base/ios/basic.ios.members/rdbuf_streambuf.pass.cpp b/libcxx/test/std/input.output/iostreams.base/ios/basic.ios.members/rdbuf_streambuf.pass.cpp index c1aa1aaf3deba..5c4e24a82ebe7 100644 --- a/libcxx/test/std/input.output/iostreams.base/ios/basic.ios.members/rdbuf_streambuf.pass.cpp +++ b/libcxx/test/std/input.output/iostreams.base/ios/basic.ios.members/rdbuf_streambuf.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { std::ios ios(0); assert(ios.rdbuf() == 0); @@ -30,4 +30,6 @@ int main() assert(sb2 == (std::streambuf*)1); assert(ios.rdbuf() == 0); assert(ios.bad()); + + return 0; } diff --git a/libcxx/test/std/input.output/iostreams.base/ios/basic.ios.members/set_rdbuf.pass.cpp b/libcxx/test/std/input.output/iostreams.base/ios/basic.ios.members/set_rdbuf.pass.cpp index 65f66cb4b63dc..04b1b9ff6b04e 100644 --- a/libcxx/test/std/input.output/iostreams.base/ios/basic.ios.members/set_rdbuf.pass.cpp +++ b/libcxx/test/std/input.output/iostreams.base/ios/basic.ios.members/set_rdbuf.pass.cpp @@ -30,7 +30,7 @@ struct testios void set_rdbuf(std::streambuf* x) {std::ios::set_rdbuf(x);} }; -int main() +int main(int, char**) { testbuf sb1; testbuf sb2; @@ -60,4 +60,6 @@ int main() #endif ios.set_rdbuf(0); assert(ios.rdbuf() == 0); + + return 0; } diff --git a/libcxx/test/std/input.output/iostreams.base/ios/basic.ios.members/swap.pass.cpp b/libcxx/test/std/input.output/iostreams.base/ios/basic.ios.members/swap.pass.cpp index 559768b945b37..40e95bae7047b 100644 --- a/libcxx/test/std/input.output/iostreams.base/ios/basic.ios.members/swap.pass.cpp +++ b/libcxx/test/std/input.output/iostreams.base/ios/basic.ios.members/swap.pass.cpp @@ -70,7 +70,7 @@ void g3(std::ios_base::event, std::ios_base&, int index) g3_called = true; } -int main() +int main(int, char**) { testbuf sb1; testios ios1(&sb1); @@ -164,4 +164,6 @@ int main() ios2.imbue(std::locale("C")); assert(f1_called); assert(f2_called); + + return 0; } diff --git a/libcxx/test/std/input.output/iostreams.base/ios/basic.ios.members/tie.pass.cpp b/libcxx/test/std/input.output/iostreams.base/ios/basic.ios.members/tie.pass.cpp index 6ea816d7d1b73..c0d7ac173324a 100644 --- a/libcxx/test/std/input.output/iostreams.base/ios/basic.ios.members/tie.pass.cpp +++ b/libcxx/test/std/input.output/iostreams.base/ios/basic.ios.members/tie.pass.cpp @@ -15,8 +15,10 @@ #include #include -int main() +int main(int, char**) { const std::basic_ios ios(0); assert(ios.tie() == 0); + + return 0; } diff --git a/libcxx/test/std/input.output/iostreams.base/ios/basic.ios.members/tie_ostream.pass.cpp b/libcxx/test/std/input.output/iostreams.base/ios/basic.ios.members/tie_ostream.pass.cpp index d2bb41c4e283a..4ce5966add870 100644 --- a/libcxx/test/std/input.output/iostreams.base/ios/basic.ios.members/tie_ostream.pass.cpp +++ b/libcxx/test/std/input.output/iostreams.base/ios/basic.ios.members/tie_ostream.pass.cpp @@ -15,11 +15,13 @@ #include #include -int main() +int main(int, char**) { std::ios ios(0); std::ostream* os = (std::ostream*)1; std::ostream* r = ios.tie(os); assert(r == 0); assert(ios.tie() == os); + + return 0; } diff --git a/libcxx/test/std/input.output/iostreams.base/ios/basic.ios.members/widen.pass.cpp b/libcxx/test/std/input.output/iostreams.base/ios/basic.ios.members/widen.pass.cpp index a1585cd545ebf..0ae5637184ceb 100644 --- a/libcxx/test/std/input.output/iostreams.base/ios/basic.ios.members/widen.pass.cpp +++ b/libcxx/test/std/input.output/iostreams.base/ios/basic.ios.members/widen.pass.cpp @@ -15,8 +15,10 @@ #include #include -int main() +int main(int, char**) { const std::ios ios(0); assert(ios.widen('c') == 'c'); + + return 0; } diff --git a/libcxx/test/std/input.output/iostreams.base/ios/iostate.flags/bad.pass.cpp b/libcxx/test/std/input.output/iostreams.base/ios/iostate.flags/bad.pass.cpp index 158c953a40104..2308cfa929f6e 100644 --- a/libcxx/test/std/input.output/iostreams.base/ios/iostate.flags/bad.pass.cpp +++ b/libcxx/test/std/input.output/iostreams.base/ios/iostate.flags/bad.pass.cpp @@ -18,7 +18,7 @@ struct testbuf : public std::streambuf {}; -int main() +int main(int, char**) { { std::ios ios(0); @@ -37,4 +37,6 @@ int main() ios.setstate(std::ios::badbit); assert(ios.bad()); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostreams.base/ios/iostate.flags/bool.pass.cpp b/libcxx/test/std/input.output/iostreams.base/ios/iostate.flags/bool.pass.cpp index 126431ce20de0..24fcbff39260c 100644 --- a/libcxx/test/std/input.output/iostreams.base/ios/iostate.flags/bool.pass.cpp +++ b/libcxx/test/std/input.output/iostreams.base/ios/iostate.flags/bool.pass.cpp @@ -18,7 +18,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { std::ios ios(0); assert(static_cast(ios) == !ios.fail()); @@ -30,4 +30,6 @@ int main() #if TEST_STD_VER >= 11 static_assert((!std::is_convertible::value), ""); #endif + + return 0; } diff --git a/libcxx/test/std/input.output/iostreams.base/ios/iostate.flags/clear.pass.cpp b/libcxx/test/std/input.output/iostreams.base/ios/iostate.flags/clear.pass.cpp index 7938a84cfe455..6fc38fde9baa3 100644 --- a/libcxx/test/std/input.output/iostreams.base/ios/iostate.flags/clear.pass.cpp +++ b/libcxx/test/std/input.output/iostreams.base/ios/iostate.flags/clear.pass.cpp @@ -20,7 +20,7 @@ struct testbuf : public std::streambuf {}; -int main() +int main(int, char**) { { std::ios ios(0); @@ -66,4 +66,6 @@ int main() ios.clear(std::ios::eofbit); assert(ios.rdstate() == std::ios::eofbit); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostreams.base/ios/iostate.flags/eof.pass.cpp b/libcxx/test/std/input.output/iostreams.base/ios/iostate.flags/eof.pass.cpp index bf65663427f6f..bf1d0246d4d08 100644 --- a/libcxx/test/std/input.output/iostreams.base/ios/iostate.flags/eof.pass.cpp +++ b/libcxx/test/std/input.output/iostreams.base/ios/iostate.flags/eof.pass.cpp @@ -18,7 +18,7 @@ struct testbuf : public std::streambuf {}; -int main() +int main(int, char**) { { std::ios ios(0); @@ -33,4 +33,6 @@ int main() ios.setstate(std::ios::eofbit); assert(ios.eof()); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostreams.base/ios/iostate.flags/exceptions.pass.cpp b/libcxx/test/std/input.output/iostreams.base/ios/iostate.flags/exceptions.pass.cpp index 9a6b3233f7fc1..4632e004333fd 100644 --- a/libcxx/test/std/input.output/iostreams.base/ios/iostate.flags/exceptions.pass.cpp +++ b/libcxx/test/std/input.output/iostreams.base/ios/iostate.flags/exceptions.pass.cpp @@ -18,7 +18,7 @@ struct testbuf : public std::streambuf {}; -int main() +int main(int, char**) { { const std::ios ios(0); @@ -29,4 +29,6 @@ int main() const std::ios ios(&sb); assert(ios.exceptions() == std::ios::goodbit); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostreams.base/ios/iostate.flags/exceptions_iostate.pass.cpp b/libcxx/test/std/input.output/iostreams.base/ios/iostate.flags/exceptions_iostate.pass.cpp index 1d56d475a9e27..b8b6577b24395 100644 --- a/libcxx/test/std/input.output/iostreams.base/ios/iostate.flags/exceptions_iostate.pass.cpp +++ b/libcxx/test/std/input.output/iostreams.base/ios/iostate.flags/exceptions_iostate.pass.cpp @@ -20,7 +20,7 @@ struct testbuf : public std::streambuf {}; -int main() +int main(int, char**) { { std::ios ios(0); @@ -48,4 +48,6 @@ int main() ios.exceptions(std::ios::badbit); assert(ios.exceptions() == std::ios::badbit); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostreams.base/ios/iostate.flags/fail.pass.cpp b/libcxx/test/std/input.output/iostreams.base/ios/iostate.flags/fail.pass.cpp index a475c3589ab69..3ae215e45f489 100644 --- a/libcxx/test/std/input.output/iostreams.base/ios/iostate.flags/fail.pass.cpp +++ b/libcxx/test/std/input.output/iostreams.base/ios/iostate.flags/fail.pass.cpp @@ -18,7 +18,7 @@ struct testbuf : public std::streambuf {}; -int main() +int main(int, char**) { { std::ios ios(0); @@ -37,4 +37,6 @@ int main() ios.setstate(std::ios::failbit); assert(ios.fail()); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostreams.base/ios/iostate.flags/good.pass.cpp b/libcxx/test/std/input.output/iostreams.base/ios/iostate.flags/good.pass.cpp index e4f28bfe325c6..19c05edce67b6 100644 --- a/libcxx/test/std/input.output/iostreams.base/ios/iostate.flags/good.pass.cpp +++ b/libcxx/test/std/input.output/iostreams.base/ios/iostate.flags/good.pass.cpp @@ -18,7 +18,7 @@ struct testbuf : public std::streambuf {}; -int main() +int main(int, char**) { { std::ios ios(0); @@ -31,4 +31,6 @@ int main() ios.setstate(std::ios::eofbit); assert(!ios.good()); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostreams.base/ios/iostate.flags/not.pass.cpp b/libcxx/test/std/input.output/iostreams.base/ios/iostate.flags/not.pass.cpp index 151c2244e80bc..20ddb35dccaff 100644 --- a/libcxx/test/std/input.output/iostreams.base/ios/iostate.flags/not.pass.cpp +++ b/libcxx/test/std/input.output/iostreams.base/ios/iostate.flags/not.pass.cpp @@ -15,10 +15,12 @@ #include #include -int main() +int main(int, char**) { std::ios ios(0); assert(!ios == ios.fail()); ios.setstate(std::ios::failbit); assert(!ios == ios.fail()); + + return 0; } diff --git a/libcxx/test/std/input.output/iostreams.base/ios/iostate.flags/rdstate.pass.cpp b/libcxx/test/std/input.output/iostreams.base/ios/iostate.flags/rdstate.pass.cpp index dde113a918c81..37886ac83e2c8 100644 --- a/libcxx/test/std/input.output/iostreams.base/ios/iostate.flags/rdstate.pass.cpp +++ b/libcxx/test/std/input.output/iostreams.base/ios/iostate.flags/rdstate.pass.cpp @@ -15,10 +15,12 @@ #include #include -int main() +int main(int, char**) { std::ios ios(0); assert(ios.rdstate() == std::ios::badbit); ios.setstate(std::ios::failbit); assert(ios.rdstate() == (std::ios::failbit | std::ios::badbit)); + + return 0; } diff --git a/libcxx/test/std/input.output/iostreams.base/ios/iostate.flags/setstate.pass.cpp b/libcxx/test/std/input.output/iostreams.base/ios/iostate.flags/setstate.pass.cpp index 830dd448ef1ec..ea954bee05e90 100644 --- a/libcxx/test/std/input.output/iostreams.base/ios/iostate.flags/setstate.pass.cpp +++ b/libcxx/test/std/input.output/iostreams.base/ios/iostate.flags/setstate.pass.cpp @@ -20,7 +20,7 @@ struct testbuf : public std::streambuf {}; -int main() +int main(int, char**) { { std::ios ios(0); @@ -65,4 +65,6 @@ int main() ios.setstate(std::ios::failbit); assert(ios.rdstate() == (std::ios::eofbit | std::ios::failbit)); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostreams.base/ios/types.pass.cpp b/libcxx/test/std/input.output/iostreams.base/ios/types.pass.cpp index 58165fc44441b..b4a4d7c57d87c 100644 --- a/libcxx/test/std/input.output/iostreams.base/ios/types.pass.cpp +++ b/libcxx/test/std/input.output/iostreams.base/ios/types.pass.cpp @@ -21,7 +21,7 @@ #include #include -int main() +int main(int, char**) { static_assert((std::is_base_of >::value), ""); static_assert((std::is_same::char_type, char>::value), ""); @@ -29,4 +29,6 @@ int main() static_assert((std::is_same::int_type, std::char_traits::int_type>::value), ""); static_assert((std::is_same::pos_type, std::char_traits::pos_type>::value), ""); static_assert((std::is_same::off_type, std::char_traits::off_type>::value), ""); + + return 0; } diff --git a/libcxx/test/std/input.output/iostreams.base/is_error_code_enum_io_errc.pass.cpp b/libcxx/test/std/input.output/iostreams.base/is_error_code_enum_io_errc.pass.cpp index c087871ea844d..76eb83148b398 100644 --- a/libcxx/test/std/input.output/iostreams.base/is_error_code_enum_io_errc.pass.cpp +++ b/libcxx/test/std/input.output/iostreams.base/is_error_code_enum_io_errc.pass.cpp @@ -15,10 +15,12 @@ #include #include "test_macros.h" -int main() +int main(int, char**) { static_assert(std::is_error_code_enum ::value, ""); #if TEST_STD_VER > 14 static_assert(std::is_error_code_enum_v, ""); #endif + + return 0; } diff --git a/libcxx/test/std/input.output/iostreams.base/std.ios.manip/adjustfield.manip/internal.pass.cpp b/libcxx/test/std/input.output/iostreams.base/std.ios.manip/adjustfield.manip/internal.pass.cpp index a214813984eae..fba2e71ca7d3e 100644 --- a/libcxx/test/std/input.output/iostreams.base/std.ios.manip/adjustfield.manip/internal.pass.cpp +++ b/libcxx/test/std/input.output/iostreams.base/std.ios.manip/adjustfield.manip/internal.pass.cpp @@ -18,11 +18,13 @@ struct testbuf : public std::streambuf {}; -int main() +int main(int, char**) { testbuf sb; std::ios ios(&sb); std::ios_base& r = std::internal(ios); assert(&r == &ios); assert(ios.flags() & std::ios::internal); + + return 0; } diff --git a/libcxx/test/std/input.output/iostreams.base/std.ios.manip/adjustfield.manip/left.pass.cpp b/libcxx/test/std/input.output/iostreams.base/std.ios.manip/adjustfield.manip/left.pass.cpp index 1073e2522be90..f89d6b9e78fff 100644 --- a/libcxx/test/std/input.output/iostreams.base/std.ios.manip/adjustfield.manip/left.pass.cpp +++ b/libcxx/test/std/input.output/iostreams.base/std.ios.manip/adjustfield.manip/left.pass.cpp @@ -18,11 +18,13 @@ struct testbuf : public std::streambuf {}; -int main() +int main(int, char**) { testbuf sb; std::ios ios(&sb); std::ios_base& r = std::left(ios); assert(&r == &ios); assert(ios.flags() & std::ios::left); + + return 0; } diff --git a/libcxx/test/std/input.output/iostreams.base/std.ios.manip/adjustfield.manip/right.pass.cpp b/libcxx/test/std/input.output/iostreams.base/std.ios.manip/adjustfield.manip/right.pass.cpp index c391ab8c5006d..399d3ba51dcc3 100644 --- a/libcxx/test/std/input.output/iostreams.base/std.ios.manip/adjustfield.manip/right.pass.cpp +++ b/libcxx/test/std/input.output/iostreams.base/std.ios.manip/adjustfield.manip/right.pass.cpp @@ -18,11 +18,13 @@ struct testbuf : public std::streambuf {}; -int main() +int main(int, char**) { testbuf sb; std::ios ios(&sb); std::ios_base& r = std::right(ios); assert(&r == &ios); assert(ios.flags() & std::ios::right); + + return 0; } diff --git a/libcxx/test/std/input.output/iostreams.base/std.ios.manip/basefield.manip/dec.pass.cpp b/libcxx/test/std/input.output/iostreams.base/std.ios.manip/basefield.manip/dec.pass.cpp index 64351b6b192c4..98740cdc026b2 100644 --- a/libcxx/test/std/input.output/iostreams.base/std.ios.manip/basefield.manip/dec.pass.cpp +++ b/libcxx/test/std/input.output/iostreams.base/std.ios.manip/basefield.manip/dec.pass.cpp @@ -18,11 +18,13 @@ struct testbuf : public std::streambuf {}; -int main() +int main(int, char**) { testbuf sb; std::ios ios(&sb); std::ios_base& r = std::dec(ios); assert(&r == &ios); assert(ios.flags() & std::ios::dec); + + return 0; } diff --git a/libcxx/test/std/input.output/iostreams.base/std.ios.manip/basefield.manip/hex.pass.cpp b/libcxx/test/std/input.output/iostreams.base/std.ios.manip/basefield.manip/hex.pass.cpp index cab0bc258345c..39addcdcf24b5 100644 --- a/libcxx/test/std/input.output/iostreams.base/std.ios.manip/basefield.manip/hex.pass.cpp +++ b/libcxx/test/std/input.output/iostreams.base/std.ios.manip/basefield.manip/hex.pass.cpp @@ -18,11 +18,13 @@ struct testbuf : public std::streambuf {}; -int main() +int main(int, char**) { testbuf sb; std::ios ios(&sb); std::ios_base& r = std::hex(ios); assert(&r == &ios); assert(ios.flags() & std::ios::hex); + + return 0; } diff --git a/libcxx/test/std/input.output/iostreams.base/std.ios.manip/basefield.manip/oct.pass.cpp b/libcxx/test/std/input.output/iostreams.base/std.ios.manip/basefield.manip/oct.pass.cpp index a4073646c4e62..92b2d4ee7efad 100644 --- a/libcxx/test/std/input.output/iostreams.base/std.ios.manip/basefield.manip/oct.pass.cpp +++ b/libcxx/test/std/input.output/iostreams.base/std.ios.manip/basefield.manip/oct.pass.cpp @@ -18,11 +18,13 @@ struct testbuf : public std::streambuf {}; -int main() +int main(int, char**) { testbuf sb; std::ios ios(&sb); std::ios_base& r = std::oct(ios); assert(&r == &ios); assert(ios.flags() & std::ios::oct); + + return 0; } diff --git a/libcxx/test/std/input.output/iostreams.base/std.ios.manip/error.reporting/iostream_category.pass.cpp b/libcxx/test/std/input.output/iostreams.base/std.ios.manip/error.reporting/iostream_category.pass.cpp index 0517481b899a3..e017c632a4d9e 100644 --- a/libcxx/test/std/input.output/iostreams.base/std.ios.manip/error.reporting/iostream_category.pass.cpp +++ b/libcxx/test/std/input.output/iostreams.base/std.ios.manip/error.reporting/iostream_category.pass.cpp @@ -14,9 +14,11 @@ #include #include -int main() +int main(int, char**) { const std::error_category& e_cat1 = std::iostream_category(); std::string m1 = e_cat1.name(); assert(m1 == "iostream"); + + return 0; } diff --git a/libcxx/test/std/input.output/iostreams.base/std.ios.manip/error.reporting/make_error_code.pass.cpp b/libcxx/test/std/input.output/iostreams.base/std.ios.manip/error.reporting/make_error_code.pass.cpp index 745349d14cbc4..060b6284cac18 100644 --- a/libcxx/test/std/input.output/iostreams.base/std.ios.manip/error.reporting/make_error_code.pass.cpp +++ b/libcxx/test/std/input.output/iostreams.base/std.ios.manip/error.reporting/make_error_code.pass.cpp @@ -13,11 +13,13 @@ #include #include -int main() +int main(int, char**) { { std::error_code ec = make_error_code(std::io_errc::stream); assert(ec.value() == static_cast(std::io_errc::stream)); assert(ec.category() == std::iostream_category()); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostreams.base/std.ios.manip/error.reporting/make_error_condition.pass.cpp b/libcxx/test/std/input.output/iostreams.base/std.ios.manip/error.reporting/make_error_condition.pass.cpp index ce9f9f0205224..3970708bfa023 100644 --- a/libcxx/test/std/input.output/iostreams.base/std.ios.manip/error.reporting/make_error_condition.pass.cpp +++ b/libcxx/test/std/input.output/iostreams.base/std.ios.manip/error.reporting/make_error_condition.pass.cpp @@ -13,11 +13,13 @@ #include #include -int main() +int main(int, char**) { { const std::error_condition ec1 = std::make_error_condition(std::io_errc::stream); assert(ec1.value() == static_cast(std::io_errc::stream)); assert(ec1.category() == std::iostream_category()); } + + return 0; } diff --git a/libcxx/test/std/input.output/iostreams.base/std.ios.manip/floatfield.manip/defaultfloat.pass.cpp b/libcxx/test/std/input.output/iostreams.base/std.ios.manip/floatfield.manip/defaultfloat.pass.cpp index 7f04bbc51e7b3..bb8c424a162f4 100644 --- a/libcxx/test/std/input.output/iostreams.base/std.ios.manip/floatfield.manip/defaultfloat.pass.cpp +++ b/libcxx/test/std/input.output/iostreams.base/std.ios.manip/floatfield.manip/defaultfloat.pass.cpp @@ -18,7 +18,7 @@ struct testbuf : public std::streambuf {}; -int main() +int main(int, char**) { testbuf sb; std::ios ios(&sb); @@ -26,4 +26,6 @@ int main() assert(&r == &ios); assert(!(ios.flags() & std::ios::fixed)); assert(!(ios.flags() & std::ios::scientific)); + + return 0; } diff --git a/libcxx/test/std/input.output/iostreams.base/std.ios.manip/floatfield.manip/fixed.pass.cpp b/libcxx/test/std/input.output/iostreams.base/std.ios.manip/floatfield.manip/fixed.pass.cpp index 8dbb7a1d8b4f5..94cbf1a53d9ce 100644 --- a/libcxx/test/std/input.output/iostreams.base/std.ios.manip/floatfield.manip/fixed.pass.cpp +++ b/libcxx/test/std/input.output/iostreams.base/std.ios.manip/floatfield.manip/fixed.pass.cpp @@ -18,11 +18,13 @@ struct testbuf : public std::streambuf {}; -int main() +int main(int, char**) { testbuf sb; std::ios ios(&sb); std::ios_base& r = std::fixed(ios); assert(&r == &ios); assert(ios.flags() & std::ios::fixed); + + return 0; } diff --git a/libcxx/test/std/input.output/iostreams.base/std.ios.manip/floatfield.manip/hexfloat.pass.cpp b/libcxx/test/std/input.output/iostreams.base/std.ios.manip/floatfield.manip/hexfloat.pass.cpp index 24afef8b86ead..c24d7f999d92c 100644 --- a/libcxx/test/std/input.output/iostreams.base/std.ios.manip/floatfield.manip/hexfloat.pass.cpp +++ b/libcxx/test/std/input.output/iostreams.base/std.ios.manip/floatfield.manip/hexfloat.pass.cpp @@ -18,7 +18,7 @@ struct testbuf : public std::streambuf {}; -int main() +int main(int, char**) { testbuf sb; std::ios ios(&sb); @@ -26,4 +26,6 @@ int main() assert(&r == &ios); assert(ios.flags() & std::ios::fixed); assert(ios.flags() & std::ios::scientific); + + return 0; } diff --git a/libcxx/test/std/input.output/iostreams.base/std.ios.manip/floatfield.manip/scientific.pass.cpp b/libcxx/test/std/input.output/iostreams.base/std.ios.manip/floatfield.manip/scientific.pass.cpp index d84aa3775a060..c8a4819447bef 100644 --- a/libcxx/test/std/input.output/iostreams.base/std.ios.manip/floatfield.manip/scientific.pass.cpp +++ b/libcxx/test/std/input.output/iostreams.base/std.ios.manip/floatfield.manip/scientific.pass.cpp @@ -18,11 +18,13 @@ struct testbuf : public std::streambuf {}; -int main() +int main(int, char**) { testbuf sb; std::ios ios(&sb); std::ios_base& r = std::scientific(ios); assert(&r == &ios); assert(ios.flags() & std::ios::scientific); + + return 0; } diff --git a/libcxx/test/std/input.output/iostreams.base/std.ios.manip/fmtflags.manip/boolalpha.pass.cpp b/libcxx/test/std/input.output/iostreams.base/std.ios.manip/fmtflags.manip/boolalpha.pass.cpp index de58c17f060ca..176267dd6fe8e 100644 --- a/libcxx/test/std/input.output/iostreams.base/std.ios.manip/fmtflags.manip/boolalpha.pass.cpp +++ b/libcxx/test/std/input.output/iostreams.base/std.ios.manip/fmtflags.manip/boolalpha.pass.cpp @@ -18,11 +18,13 @@ struct testbuf : public std::streambuf {}; -int main() +int main(int, char**) { testbuf sb; std::ios ios(&sb); std::ios_base& r = std::boolalpha(ios); assert(&r == &ios); assert(ios.flags() & std::ios::boolalpha); + + return 0; } diff --git a/libcxx/test/std/input.output/iostreams.base/std.ios.manip/fmtflags.manip/noboolalpha.pass.cpp b/libcxx/test/std/input.output/iostreams.base/std.ios.manip/fmtflags.manip/noboolalpha.pass.cpp index f67ddabaea366..27d61cee7aa94 100644 --- a/libcxx/test/std/input.output/iostreams.base/std.ios.manip/fmtflags.manip/noboolalpha.pass.cpp +++ b/libcxx/test/std/input.output/iostreams.base/std.ios.manip/fmtflags.manip/noboolalpha.pass.cpp @@ -18,7 +18,7 @@ struct testbuf : public std::streambuf {}; -int main() +int main(int, char**) { testbuf sb; std::ios ios(&sb); @@ -26,4 +26,6 @@ int main() std::ios_base& r = std::noboolalpha(ios); assert(&r == &ios); assert(!(ios.flags() & std::ios::boolalpha)); + + return 0; } diff --git a/libcxx/test/std/input.output/iostreams.base/std.ios.manip/fmtflags.manip/noshowbase.pass.cpp b/libcxx/test/std/input.output/iostreams.base/std.ios.manip/fmtflags.manip/noshowbase.pass.cpp index bd904ad641955..b730afa88baf9 100644 --- a/libcxx/test/std/input.output/iostreams.base/std.ios.manip/fmtflags.manip/noshowbase.pass.cpp +++ b/libcxx/test/std/input.output/iostreams.base/std.ios.manip/fmtflags.manip/noshowbase.pass.cpp @@ -18,7 +18,7 @@ struct testbuf : public std::streambuf {}; -int main() +int main(int, char**) { testbuf sb; std::ios ios(&sb); @@ -26,4 +26,6 @@ int main() std::ios_base& r = std::noshowbase(ios); assert(&r == &ios); assert(!(ios.flags() & std::ios::showbase)); + + return 0; } diff --git a/libcxx/test/std/input.output/iostreams.base/std.ios.manip/fmtflags.manip/noshowpoint.pass.cpp b/libcxx/test/std/input.output/iostreams.base/std.ios.manip/fmtflags.manip/noshowpoint.pass.cpp index 97d9198014c8e..0d9f33ea5c1d3 100644 --- a/libcxx/test/std/input.output/iostreams.base/std.ios.manip/fmtflags.manip/noshowpoint.pass.cpp +++ b/libcxx/test/std/input.output/iostreams.base/std.ios.manip/fmtflags.manip/noshowpoint.pass.cpp @@ -18,7 +18,7 @@ struct testbuf : public std::streambuf {}; -int main() +int main(int, char**) { testbuf sb; std::ios ios(&sb); @@ -26,4 +26,6 @@ int main() std::ios_base& r = std::noshowpoint(ios); assert(&r == &ios); assert(!(ios.flags() & std::ios::showpoint)); + + return 0; } diff --git a/libcxx/test/std/input.output/iostreams.base/std.ios.manip/fmtflags.manip/noshowpos.pass.cpp b/libcxx/test/std/input.output/iostreams.base/std.ios.manip/fmtflags.manip/noshowpos.pass.cpp index 24f8bfca0b04e..fa54cd647355d 100644 --- a/libcxx/test/std/input.output/iostreams.base/std.ios.manip/fmtflags.manip/noshowpos.pass.cpp +++ b/libcxx/test/std/input.output/iostreams.base/std.ios.manip/fmtflags.manip/noshowpos.pass.cpp @@ -18,7 +18,7 @@ struct testbuf : public std::streambuf {}; -int main() +int main(int, char**) { testbuf sb; std::ios ios(&sb); @@ -26,4 +26,6 @@ int main() std::ios_base& r = std::noshowpos(ios); assert(&r == &ios); assert(!(ios.flags() & std::ios::showpos)); + + return 0; } diff --git a/libcxx/test/std/input.output/iostreams.base/std.ios.manip/fmtflags.manip/noskipws.pass.cpp b/libcxx/test/std/input.output/iostreams.base/std.ios.manip/fmtflags.manip/noskipws.pass.cpp index 5d24d3d4190fa..9ee5ea8e61a37 100644 --- a/libcxx/test/std/input.output/iostreams.base/std.ios.manip/fmtflags.manip/noskipws.pass.cpp +++ b/libcxx/test/std/input.output/iostreams.base/std.ios.manip/fmtflags.manip/noskipws.pass.cpp @@ -18,7 +18,7 @@ struct testbuf : public std::streambuf {}; -int main() +int main(int, char**) { testbuf sb; std::ios ios(&sb); @@ -26,4 +26,6 @@ int main() std::ios_base& r = std::noskipws(ios); assert(&r == &ios); assert(!(ios.flags() & std::ios::skipws)); + + return 0; } diff --git a/libcxx/test/std/input.output/iostreams.base/std.ios.manip/fmtflags.manip/nounitbuf.pass.cpp b/libcxx/test/std/input.output/iostreams.base/std.ios.manip/fmtflags.manip/nounitbuf.pass.cpp index 61a7dd29e83f2..ce06e12bd1198 100644 --- a/libcxx/test/std/input.output/iostreams.base/std.ios.manip/fmtflags.manip/nounitbuf.pass.cpp +++ b/libcxx/test/std/input.output/iostreams.base/std.ios.manip/fmtflags.manip/nounitbuf.pass.cpp @@ -18,7 +18,7 @@ struct testbuf : public std::streambuf {}; -int main() +int main(int, char**) { testbuf sb; std::ios ios(&sb); @@ -26,4 +26,6 @@ int main() std::ios_base& r = std::nounitbuf(ios); assert(&r == &ios); assert(!(ios.flags() & std::ios::unitbuf)); + + return 0; } diff --git a/libcxx/test/std/input.output/iostreams.base/std.ios.manip/fmtflags.manip/nouppercase.pass.cpp b/libcxx/test/std/input.output/iostreams.base/std.ios.manip/fmtflags.manip/nouppercase.pass.cpp index 923a6ac754af4..8e0554620997f 100644 --- a/libcxx/test/std/input.output/iostreams.base/std.ios.manip/fmtflags.manip/nouppercase.pass.cpp +++ b/libcxx/test/std/input.output/iostreams.base/std.ios.manip/fmtflags.manip/nouppercase.pass.cpp @@ -18,7 +18,7 @@ struct testbuf : public std::streambuf {}; -int main() +int main(int, char**) { testbuf sb; std::ios ios(&sb); @@ -26,4 +26,6 @@ int main() std::ios_base& r = std::nouppercase(ios); assert(&r == &ios); assert(!(ios.flags() & std::ios::uppercase)); + + return 0; } diff --git a/libcxx/test/std/input.output/iostreams.base/std.ios.manip/fmtflags.manip/showbase.pass.cpp b/libcxx/test/std/input.output/iostreams.base/std.ios.manip/fmtflags.manip/showbase.pass.cpp index d584d3128a8b5..7f1338c5dbfd2 100644 --- a/libcxx/test/std/input.output/iostreams.base/std.ios.manip/fmtflags.manip/showbase.pass.cpp +++ b/libcxx/test/std/input.output/iostreams.base/std.ios.manip/fmtflags.manip/showbase.pass.cpp @@ -18,11 +18,13 @@ struct testbuf : public std::streambuf {}; -int main() +int main(int, char**) { testbuf sb; std::ios ios(&sb); std::ios_base& r = std::showbase(ios); assert(&r == &ios); assert(ios.flags() & std::ios::showbase); + + return 0; } diff --git a/libcxx/test/std/input.output/iostreams.base/std.ios.manip/fmtflags.manip/showpoint.pass.cpp b/libcxx/test/std/input.output/iostreams.base/std.ios.manip/fmtflags.manip/showpoint.pass.cpp index 6cfb73633d133..03cf312d0f313 100644 --- a/libcxx/test/std/input.output/iostreams.base/std.ios.manip/fmtflags.manip/showpoint.pass.cpp +++ b/libcxx/test/std/input.output/iostreams.base/std.ios.manip/fmtflags.manip/showpoint.pass.cpp @@ -18,11 +18,13 @@ struct testbuf : public std::streambuf {}; -int main() +int main(int, char**) { testbuf sb; std::ios ios(&sb); std::ios_base& r = std::showpoint(ios); assert(&r == &ios); assert(ios.flags() & std::ios::showpoint); + + return 0; } diff --git a/libcxx/test/std/input.output/iostreams.base/std.ios.manip/fmtflags.manip/showpos.pass.cpp b/libcxx/test/std/input.output/iostreams.base/std.ios.manip/fmtflags.manip/showpos.pass.cpp index 06f1dd836202e..2fb0d6511549f 100644 --- a/libcxx/test/std/input.output/iostreams.base/std.ios.manip/fmtflags.manip/showpos.pass.cpp +++ b/libcxx/test/std/input.output/iostreams.base/std.ios.manip/fmtflags.manip/showpos.pass.cpp @@ -18,11 +18,13 @@ struct testbuf : public std::streambuf {}; -int main() +int main(int, char**) { testbuf sb; std::ios ios(&sb); std::ios_base& r = std::showpos(ios); assert(&r == &ios); assert(ios.flags() & std::ios::showpos); + + return 0; } diff --git a/libcxx/test/std/input.output/iostreams.base/std.ios.manip/fmtflags.manip/skipws.pass.cpp b/libcxx/test/std/input.output/iostreams.base/std.ios.manip/fmtflags.manip/skipws.pass.cpp index b153bc84018c7..2c64cb8dfb158 100644 --- a/libcxx/test/std/input.output/iostreams.base/std.ios.manip/fmtflags.manip/skipws.pass.cpp +++ b/libcxx/test/std/input.output/iostreams.base/std.ios.manip/fmtflags.manip/skipws.pass.cpp @@ -18,11 +18,13 @@ struct testbuf : public std::streambuf {}; -int main() +int main(int, char**) { testbuf sb; std::ios ios(&sb); std::ios_base& r = std::skipws(ios); assert(&r == &ios); assert(ios.flags() & std::ios::skipws); + + return 0; } diff --git a/libcxx/test/std/input.output/iostreams.base/std.ios.manip/fmtflags.manip/unitbuf.pass.cpp b/libcxx/test/std/input.output/iostreams.base/std.ios.manip/fmtflags.manip/unitbuf.pass.cpp index 22bcf5eb99e35..6acedc6a5c2d4 100644 --- a/libcxx/test/std/input.output/iostreams.base/std.ios.manip/fmtflags.manip/unitbuf.pass.cpp +++ b/libcxx/test/std/input.output/iostreams.base/std.ios.manip/fmtflags.manip/unitbuf.pass.cpp @@ -18,11 +18,13 @@ struct testbuf : public std::streambuf {}; -int main() +int main(int, char**) { testbuf sb; std::ios ios(&sb); std::ios_base& r = std::unitbuf(ios); assert(&r == &ios); assert(ios.flags() & std::ios::unitbuf); + + return 0; } diff --git a/libcxx/test/std/input.output/iostreams.base/std.ios.manip/fmtflags.manip/uppercase.pass.cpp b/libcxx/test/std/input.output/iostreams.base/std.ios.manip/fmtflags.manip/uppercase.pass.cpp index cc2a4bc45e8bb..e97763fff03c2 100644 --- a/libcxx/test/std/input.output/iostreams.base/std.ios.manip/fmtflags.manip/uppercase.pass.cpp +++ b/libcxx/test/std/input.output/iostreams.base/std.ios.manip/fmtflags.manip/uppercase.pass.cpp @@ -18,11 +18,13 @@ struct testbuf : public std::streambuf {}; -int main() +int main(int, char**) { testbuf sb; std::ios ios(&sb); std::ios_base& r = std::uppercase(ios); assert(&r == &ios); assert(ios.flags() & std::ios::uppercase); + + return 0; } diff --git a/libcxx/test/std/input.output/iostreams.base/std.ios.manip/nothing_to_do.pass.cpp b/libcxx/test/std/input.output/iostreams.base/std.ios.manip/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/input.output/iostreams.base/std.ios.manip/nothing_to_do.pass.cpp +++ b/libcxx/test/std/input.output/iostreams.base/std.ios.manip/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/input.output/iostreams.base/stream.types/streamoff.pass.cpp b/libcxx/test/std/input.output/iostreams.base/stream.types/streamoff.pass.cpp index aaa5b871ac226..20b953d552758 100644 --- a/libcxx/test/std/input.output/iostreams.base/stream.types/streamoff.pass.cpp +++ b/libcxx/test/std/input.output/iostreams.base/stream.types/streamoff.pass.cpp @@ -13,8 +13,10 @@ #include #include -int main() +int main(int, char**) { static_assert(std::is_integral::value, ""); static_assert(std::is_signed::value, ""); + + return 0; } diff --git a/libcxx/test/std/input.output/iostreams.base/stream.types/streamsize.pass.cpp b/libcxx/test/std/input.output/iostreams.base/stream.types/streamsize.pass.cpp index 6709323245613..50fa21e8d52c2 100644 --- a/libcxx/test/std/input.output/iostreams.base/stream.types/streamsize.pass.cpp +++ b/libcxx/test/std/input.output/iostreams.base/stream.types/streamsize.pass.cpp @@ -13,8 +13,10 @@ #include #include -int main() +int main(int, char**) { static_assert(std::is_integral::value, ""); static_assert(std::is_signed::value, ""); + + return 0; } diff --git a/libcxx/test/std/input.output/iostreams.requirements/iostream.limits.imbue/tested_elsewhere.pass.cpp b/libcxx/test/std/input.output/iostreams.requirements/iostream.limits.imbue/tested_elsewhere.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/input.output/iostreams.requirements/iostream.limits.imbue/tested_elsewhere.pass.cpp +++ b/libcxx/test/std/input.output/iostreams.requirements/iostream.limits.imbue/tested_elsewhere.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/input.output/iostreams.requirements/iostreams.limits.pos/nothing_to_do.pass.cpp b/libcxx/test/std/input.output/iostreams.requirements/iostreams.limits.pos/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/input.output/iostreams.requirements/iostreams.limits.pos/nothing_to_do.pass.cpp +++ b/libcxx/test/std/input.output/iostreams.requirements/iostreams.limits.pos/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/input.output/iostreams.requirements/iostreams.threadsafety/nothing_to_do.pass.cpp b/libcxx/test/std/input.output/iostreams.requirements/iostreams.threadsafety/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/input.output/iostreams.requirements/iostreams.threadsafety/nothing_to_do.pass.cpp +++ b/libcxx/test/std/input.output/iostreams.requirements/iostreams.threadsafety/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/input.output/iostreams.requirements/nothing_to_do.pass.cpp b/libcxx/test/std/input.output/iostreams.requirements/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/input.output/iostreams.requirements/nothing_to_do.pass.cpp +++ b/libcxx/test/std/input.output/iostreams.requirements/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/input.output/nothing_to_do.pass.cpp b/libcxx/test/std/input.output/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/input.output/nothing_to_do.pass.cpp +++ b/libcxx/test/std/input.output/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/input.output/stream.buffers/streambuf.reqts/tested_elsewhere.pass.cpp b/libcxx/test/std/input.output/stream.buffers/streambuf.reqts/tested_elsewhere.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/input.output/stream.buffers/streambuf.reqts/tested_elsewhere.pass.cpp +++ b/libcxx/test/std/input.output/stream.buffers/streambuf.reqts/tested_elsewhere.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.cons/copy.fail.cpp b/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.cons/copy.fail.cpp index b94714212b100..285485087b42d 100644 --- a/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.cons/copy.fail.cpp +++ b/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.cons/copy.fail.cpp @@ -18,7 +18,9 @@ std::streambuf &get(); -int main() +int main(int, char**) { std::streambuf sb = get(); // expected-error {{calling a protected constructor}} + + return 0; } diff --git a/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.cons/copy.pass.cpp b/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.cons/copy.pass.cpp index c298992917483..405c72995912e 100644 --- a/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.cons/copy.pass.cpp +++ b/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.cons/copy.pass.cpp @@ -49,7 +49,7 @@ struct test } }; -int main() +int main(int, char**) { { test t; @@ -82,4 +82,6 @@ int main() test t; test t2 = t; } + + return 0; } diff --git a/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.cons/default.fail.cpp b/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.cons/default.fail.cpp index 76d47f2a23771..ec7650ae04e50 100644 --- a/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.cons/default.fail.cpp +++ b/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.cons/default.fail.cpp @@ -15,7 +15,9 @@ #include -int main() +int main(int, char**) { std::basic_streambuf sb; + + return 0; } diff --git a/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.cons/default.pass.cpp b/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.cons/default.pass.cpp index 9eebf255760bd..15475d3d68426 100644 --- a/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.cons/default.pass.cpp +++ b/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.cons/default.pass.cpp @@ -35,7 +35,7 @@ struct test } }; -int main() +int main(int, char**) { { test t; @@ -54,4 +54,6 @@ int main() test t; assert(t.getloc().name() == LOCALE_en_US_UTF_8); } + + return 0; } diff --git a/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.members/nothing_to_do.pass.cpp b/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.members/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.members/nothing_to_do.pass.cpp +++ b/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.members/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.members/streambuf.buffer/pubseekoff.pass.cpp b/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.members/streambuf.buffer/pubseekoff.pass.cpp index 741b71e38c2db..b49fc2094ed95 100644 --- a/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.members/streambuf.buffer/pubseekoff.pass.cpp +++ b/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.members/streambuf.buffer/pubseekoff.pass.cpp @@ -24,11 +24,13 @@ struct test test() {} }; -int main() +int main(int, char**) { { test t; assert(t.pubseekoff(0, std::ios_base::beg) == -1); assert(t.pubseekoff(0, std::ios_base::beg, std::ios_base::app) == -1); } + + return 0; } diff --git a/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.members/streambuf.buffer/pubseekpos.pass.cpp b/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.members/streambuf.buffer/pubseekpos.pass.cpp index 2e14de9d28fee..1095c9148c7bd 100644 --- a/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.members/streambuf.buffer/pubseekpos.pass.cpp +++ b/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.members/streambuf.buffer/pubseekpos.pass.cpp @@ -24,10 +24,12 @@ struct test test() {} }; -int main() +int main(int, char**) { { test t; assert(t.pubseekpos(0, std::ios_base::app) == -1); } + + return 0; } diff --git a/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.members/streambuf.buffer/pubsetbuf.pass.cpp b/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.members/streambuf.buffer/pubsetbuf.pass.cpp index fae4dd78fd697..c0efb1710abf9 100644 --- a/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.members/streambuf.buffer/pubsetbuf.pass.cpp +++ b/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.members/streambuf.buffer/pubsetbuf.pass.cpp @@ -23,10 +23,12 @@ struct test test() {} }; -int main() +int main(int, char**) { { test t; assert(t.pubsetbuf(0, 0) == &t); } + + return 0; } diff --git a/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.members/streambuf.buffer/pubsync.pass.cpp b/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.members/streambuf.buffer/pubsync.pass.cpp index 8433a9f31a968..8d7528ee26194 100644 --- a/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.members/streambuf.buffer/pubsync.pass.cpp +++ b/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.members/streambuf.buffer/pubsync.pass.cpp @@ -23,10 +23,12 @@ struct test test() {} }; -int main() +int main(int, char**) { { test t; assert(t.pubsync() == 0); } + + return 0; } diff --git a/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.members/streambuf.locales/locales.pass.cpp b/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.members/streambuf.locales/locales.pass.cpp index ed1d43a8666c6..835944fcf310e 100644 --- a/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.members/streambuf.locales/locales.pass.cpp +++ b/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.members/streambuf.locales/locales.pass.cpp @@ -34,7 +34,7 @@ struct test } }; -int main() +int main(int, char**) { { test t; @@ -48,4 +48,6 @@ int main() LOCALE_en_US_UTF_8); assert(t.getloc().name() == LOCALE_fr_FR_UTF_8); } + + return 0; } diff --git a/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.get/in_avail.pass.cpp b/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.get/in_avail.pass.cpp index ea51ac64df15f..6d11a8e89690a 100644 --- a/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.get/in_avail.pass.cpp +++ b/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.get/in_avail.pass.cpp @@ -38,7 +38,7 @@ struct test } }; -int main() +int main(int, char**) { { test t; @@ -48,4 +48,6 @@ int main() t.setg(in, in+2, in+5); assert(t.in_avail() == 3); } + + return 0; } diff --git a/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.get/sbumpc.pass.cpp b/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.get/sbumpc.pass.cpp index 4aa7a81818b37..4ac2d6fe547f6 100644 --- a/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.get/sbumpc.pass.cpp +++ b/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.get/sbumpc.pass.cpp @@ -38,7 +38,7 @@ struct test } }; -int main() +int main(int, char**) { { test t; @@ -52,4 +52,6 @@ int main() assert(t.sbumpc() == 'B'); assert(uflow_called == 1); } + + return 0; } diff --git a/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.get/sgetc.pass.cpp b/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.get/sgetc.pass.cpp index 2a48158fd41c8..8baefb279cf33 100644 --- a/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.get/sgetc.pass.cpp +++ b/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.get/sgetc.pass.cpp @@ -38,7 +38,7 @@ struct test } }; -int main() +int main(int, char**) { { test t; @@ -52,4 +52,6 @@ int main() assert(t.sgetc() == 'A'); assert(underflow_called == 1); } + + return 0; } diff --git a/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.get/sgetn.pass.cpp b/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.get/sgetn.pass.cpp index 59804043cb09c..9088ed846b943 100644 --- a/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.get/sgetn.pass.cpp +++ b/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.get/sgetn.pass.cpp @@ -31,10 +31,12 @@ struct test } }; -int main() +int main(int, char**) { test t; assert(xsgetn_called == 0); assert(t.sgetn(0, 0) == 10); assert(xsgetn_called == 1); + + return 0; } diff --git a/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.get/snextc.pass.cpp b/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.get/snextc.pass.cpp index 830f27282efd0..54965bca2fc78 100644 --- a/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.get/snextc.pass.cpp +++ b/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.get/snextc.pass.cpp @@ -38,7 +38,7 @@ struct test } }; -int main() +int main(int, char**) { { test t; @@ -52,4 +52,6 @@ int main() assert(t.snextc() == 'C'); assert(uflow_called == 1); } + + return 0; } diff --git a/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.pback/sputbackc.pass.cpp b/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.pback/sputbackc.pass.cpp index a2546b810dff6..3b63ba3cef9cc 100644 --- a/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.pback/sputbackc.pass.cpp +++ b/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.pback/sputbackc.pass.cpp @@ -38,7 +38,7 @@ struct test } }; -int main() +int main(int, char**) { { test t; @@ -52,4 +52,6 @@ int main() assert(t.sputbackc('A') == 'a'); assert(pbackfail_called == 2); } + + return 0; } diff --git a/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.pback/sungetc.pass.cpp b/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.pback/sungetc.pass.cpp index dcdec61a3d4e6..07c1600b0b2f4 100644 --- a/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.pback/sungetc.pass.cpp +++ b/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.pback/sungetc.pass.cpp @@ -38,7 +38,7 @@ struct test } }; -int main() +int main(int, char**) { { test t; @@ -52,4 +52,6 @@ int main() assert(t.sungetc() == 'a'); assert(pbackfail_called == 2); } + + return 0; } diff --git a/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.put/sputc.pass.cpp b/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.put/sputc.pass.cpp index 3d04924b16019..989b61d4e191e 100644 --- a/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.put/sputc.pass.cpp +++ b/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.put/sputc.pass.cpp @@ -42,7 +42,7 @@ struct test } }; -int main() +int main(int, char**) { { test t; @@ -59,4 +59,6 @@ int main() assert(out[0] == 'A'); assert(out[1] == 'B'); } + + return 0; } diff --git a/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.put/sputn.pass.cpp b/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.put/sputn.pass.cpp index bb865636ca33b..01bd9d487d830 100644 --- a/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.put/sputn.pass.cpp +++ b/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.put/sputn.pass.cpp @@ -31,10 +31,12 @@ struct test } }; -int main() +int main(int, char**) { test t; assert(xsputn_called == 0); assert(t.sputn(0, 0) == 5); assert(xsputn_called == 1); + + return 0; } diff --git a/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.protected/nothing_to_do.pass.cpp b/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.protected/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.protected/nothing_to_do.pass.cpp +++ b/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.protected/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.protected/streambuf.assign/assign.pass.cpp b/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.protected/streambuf.assign/assign.pass.cpp index 0c1cd4efbf9b8..6109a6aa47168 100644 --- a/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.protected/streambuf.assign/assign.pass.cpp +++ b/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.protected/streambuf.assign/assign.pass.cpp @@ -50,7 +50,7 @@ struct test } }; -int main() +int main(int, char**) { { test t; @@ -89,4 +89,6 @@ int main() test t2; t2 = t; } + + return 0; } diff --git a/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.protected/streambuf.assign/swap.pass.cpp b/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.protected/streambuf.assign/swap.pass.cpp index 6ece9aa57cf6a..2809d63124fbe 100644 --- a/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.protected/streambuf.assign/swap.pass.cpp +++ b/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.protected/streambuf.assign/swap.pass.cpp @@ -59,7 +59,7 @@ struct test } }; -int main() +int main(int, char**) { { test t; @@ -98,4 +98,6 @@ int main() test t2; t2.swap(t); } + + return 0; } diff --git a/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.protected/streambuf.get.area/gbump.pass.cpp b/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.protected/streambuf.get.area/gbump.pass.cpp index 015a7daa2f7c6..161461dee9521 100644 --- a/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.protected/streambuf.get.area/gbump.pass.cpp +++ b/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.protected/streambuf.get.area/gbump.pass.cpp @@ -41,7 +41,7 @@ struct test } }; -int main() +int main(int, char**) { { test t; @@ -55,4 +55,6 @@ int main() t.setg(in, in+1, in+sizeof(in)/sizeof(in[0])); t.gbump(3); } + + return 0; } diff --git a/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.protected/streambuf.get.area/setg.pass.cpp b/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.protected/streambuf.get.area/setg.pass.cpp index 74152974c07cc..b303465f02da2 100644 --- a/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.protected/streambuf.get.area/setg.pass.cpp +++ b/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.protected/streambuf.get.area/setg.pass.cpp @@ -33,7 +33,7 @@ struct test } }; -int main() +int main(int, char**) { { test t; @@ -45,4 +45,6 @@ int main() wchar_t in[] = L"ABC"; t.setg(in, in+1, in+sizeof(in)/sizeof(in[0])); } + + return 0; } diff --git a/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.protected/streambuf.put.area/pbump.pass.cpp b/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.protected/streambuf.put.area/pbump.pass.cpp index 92b869d31e5a6..e151d32273c25 100644 --- a/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.protected/streambuf.put.area/pbump.pass.cpp +++ b/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.protected/streambuf.put.area/pbump.pass.cpp @@ -41,7 +41,7 @@ struct test } }; -int main() +int main(int, char**) { { test t; @@ -57,4 +57,6 @@ int main() t.pbump(3); t.pbump(1); } + + return 0; } diff --git a/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.protected/streambuf.put.area/pbump2gig.pass.cpp b/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.protected/streambuf.put.area/pbump2gig.pass.cpp index 5811c90196f07..eee48f3dfdb12 100644 --- a/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.protected/streambuf.put.area/pbump2gig.pass.cpp +++ b/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.protected/streambuf.put.area/pbump2gig.pass.cpp @@ -26,7 +26,7 @@ struct SB : std::stringbuf const char* pubpptr() const { return pptr(); } }; -int main() +int main(int, char**) { #ifndef TEST_HAS_NO_EXCEPTIONS try { @@ -40,4 +40,6 @@ int main() catch (const std::length_error &) {} // maybe the string can't take 2GB catch (const std::bad_alloc &) {} // maybe we don't have enough RAM #endif + + return 0; } diff --git a/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.protected/streambuf.put.area/setp.pass.cpp b/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.protected/streambuf.put.area/setp.pass.cpp index 12f955360c9af..6ca36227b53c5 100644 --- a/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.protected/streambuf.put.area/setp.pass.cpp +++ b/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.protected/streambuf.put.area/setp.pass.cpp @@ -33,7 +33,7 @@ struct test } }; -int main() +int main(int, char**) { { test t; @@ -45,4 +45,6 @@ int main() wchar_t in[] = L"ABC"; t.setp(in, in+sizeof(in)/sizeof(in[0])); } + + return 0; } diff --git a/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.virtuals/nothing_to_do.pass.cpp b/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.virtuals/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.virtuals/nothing_to_do.pass.cpp +++ b/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.virtuals/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.buffer/tested_elsewhere.pass.cpp b/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.buffer/tested_elsewhere.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.buffer/tested_elsewhere.pass.cpp +++ b/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.buffer/tested_elsewhere.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.get/showmanyc.pass.cpp b/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.get/showmanyc.pass.cpp index b31408e952d94..5a238e8845522 100644 --- a/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.get/showmanyc.pass.cpp +++ b/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.get/showmanyc.pass.cpp @@ -25,8 +25,10 @@ struct test test() {} }; -int main() +int main(int, char**) { test t; assert(t.in_avail() == 0); + + return 0; } diff --git a/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.get/uflow.pass.cpp b/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.get/uflow.pass.cpp index 1d1ee519f58e7..2f86c3b1a961f 100644 --- a/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.get/uflow.pass.cpp +++ b/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.get/uflow.pass.cpp @@ -25,8 +25,10 @@ struct test }; -int main() +int main(int, char**) { test t; assert(t.sgetc() == -1); + + return 0; } diff --git a/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.get/underflow.pass.cpp b/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.get/underflow.pass.cpp index 2422c52e54b46..1d2ce7c5c2352 100644 --- a/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.get/underflow.pass.cpp +++ b/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.get/underflow.pass.cpp @@ -22,8 +22,10 @@ struct test test() {} }; -int main() +int main(int, char**) { test t; assert(t.sgetc() == -1); + + return 0; } diff --git a/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.get/xsgetn.pass.cpp b/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.get/xsgetn.pass.cpp index 7c5f6b9d6fe56..f5a95821b28c8 100644 --- a/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.get/xsgetn.pass.cpp +++ b/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.get/xsgetn.pass.cpp @@ -30,7 +30,7 @@ struct test } }; -int main() +int main(int, char**) { test t; char input[7] = "123456"; @@ -38,4 +38,6 @@ int main() char output[sizeof(input)] = {0}; assert(t.sgetn(output, 10) == 7); assert(std::strcmp(input, output) == 0); + + return 0; } diff --git a/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.locales/nothing_to_do.pass.cpp b/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.locales/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.locales/nothing_to_do.pass.cpp +++ b/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.locales/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.pback/pbackfail.pass.cpp b/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.pback/pbackfail.pass.cpp index 1f243e958d60a..217ff8c32fcbb 100644 --- a/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.pback/pbackfail.pass.cpp +++ b/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.pback/pbackfail.pass.cpp @@ -24,8 +24,10 @@ struct test test() {} }; -int main() +int main(int, char**) { test t; assert(t.sputbackc('A') == -1); + + return 0; } diff --git a/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.put/overflow.pass.cpp b/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.put/overflow.pass.cpp index ae52b9539ee59..e067088f50b40 100644 --- a/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.put/overflow.pass.cpp +++ b/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.put/overflow.pass.cpp @@ -22,8 +22,10 @@ struct test test() {} }; -int main() +int main(int, char**) { test t; assert(t.sputc('A') == -1); + + return 0; } diff --git a/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.put/xsputn.PR14074.pass.cpp b/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.put/xsputn.PR14074.pass.cpp new file mode 100644 index 0000000000000..d0b7b1971ac19 --- /dev/null +++ b/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.put/xsputn.PR14074.pass.cpp @@ -0,0 +1,63 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// + +// template > +// class basic_streambuf; + +// streamsize xsputn(const char_type* s, streamsize n); + +// Test https://bugs.llvm.org/show_bug.cgi?id=14074. The bug is really inside +// basic_streambuf, but I can't seem to reproduce without going through one +// of its derived classes. + +#include +#include +#include +#include +#include +#include +#include "platform_support.h" + + +// Count the number of bytes in a file -- make sure to use only functionality +// provided by the C library to avoid relying on the C++ library, which we're +// trying to test. +static std::size_t count_bytes(char const* filename) { + std::FILE* f = std::fopen(filename, "rb"); + std::size_t count = 0; + while (std::fgetc(f) != EOF) + ++count; + std::fclose(f); + return count; +} + +int main(int, char**) { + { + // with basic_stringbuf + std::basic_stringbuf buf; + std::streamsize sz = buf.sputn("\xFF", 1); + assert(sz == 1); + assert(buf.str().size() == 1); + } + { + // with basic_filebuf + std::string temp = get_temp_file_name(); + { + std::basic_filebuf buf; + buf.open(temp.c_str(), std::ios_base::out); + std::streamsize sz = buf.sputn("\xFF", 1); + assert(sz == 1); + } + assert(count_bytes(temp.c_str()) == 1); + std::remove(temp.c_str()); + } + + return 0; +} diff --git a/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.put/xsputn.pass.cpp b/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.put/xsputn.pass.cpp index 15d3740412295..1c30c8f2836e4 100644 --- a/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.put/xsputn.pass.cpp +++ b/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.put/xsputn.pass.cpp @@ -30,7 +30,7 @@ struct test } }; -int main() +int main(int, char**) { { test t; @@ -41,4 +41,6 @@ int main() assert(t.sputn(in, sizeof(in)) == sizeof(in)); assert(std::strcmp(in, out) == 0); } + + return 0; } diff --git a/libcxx/test/std/input.output/stream.buffers/streambuf/types.pass.cpp b/libcxx/test/std/input.output/stream.buffers/streambuf/types.pass.cpp index d6ea963df275e..434f8e3ec12ae 100644 --- a/libcxx/test/std/input.output/stream.buffers/streambuf/types.pass.cpp +++ b/libcxx/test/std/input.output/stream.buffers/streambuf/types.pass.cpp @@ -22,7 +22,7 @@ #include #include -int main() +int main(int, char**) { static_assert((std::is_same::value), ""); static_assert((std::is_same >::value), ""); @@ -35,4 +35,6 @@ int main() static_assert((std::is_same::int_type>::value), ""); static_assert((std::is_same::pos_type>::value), ""); static_assert((std::is_same::off_type>::value), ""); + + return 0; } diff --git a/libcxx/test/std/input.output/string.streams/istringstream/istringstream.assign/member_swap.pass.cpp b/libcxx/test/std/input.output/string.streams/istringstream/istringstream.assign/member_swap.pass.cpp index cb4644aad4356..d0a5863ed8489 100644 --- a/libcxx/test/std/input.output/string.streams/istringstream/istringstream.assign/member_swap.pass.cpp +++ b/libcxx/test/std/input.output/string.streams/istringstream/istringstream.assign/member_swap.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { std::istringstream ss0(" 123 456"); @@ -52,4 +52,6 @@ int main() ss0 >> i; assert(i == 321); } + + return 0; } diff --git a/libcxx/test/std/input.output/string.streams/istringstream/istringstream.assign/move.pass.cpp b/libcxx/test/std/input.output/string.streams/istringstream/istringstream.assign/move.pass.cpp index b906db8d5bfcf..5677959438ff2 100644 --- a/libcxx/test/std/input.output/string.streams/istringstream/istringstream.assign/move.pass.cpp +++ b/libcxx/test/std/input.output/string.streams/istringstream/istringstream.assign/move.pass.cpp @@ -18,7 +18,7 @@ #include #include -int main() +int main(int, char**) { { std::istringstream ss0(" 123 456"); @@ -82,4 +82,6 @@ int main() s1 >> s; assert(s == L"Dddddddddddddddddd"); } + + return 0; } diff --git a/libcxx/test/std/input.output/string.streams/istringstream/istringstream.assign/nonmember_swap.pass.cpp b/libcxx/test/std/input.output/string.streams/istringstream/istringstream.assign/nonmember_swap.pass.cpp index 09b6e4b3996db..b8b00310dbe6a 100644 --- a/libcxx/test/std/input.output/string.streams/istringstream/istringstream.assign/nonmember_swap.pass.cpp +++ b/libcxx/test/std/input.output/string.streams/istringstream/istringstream.assign/nonmember_swap.pass.cpp @@ -19,7 +19,7 @@ #include #include -int main() +int main(int, char**) { { std::istringstream ss0(" 123 456"); @@ -55,4 +55,6 @@ int main() ss0 >> i; assert(i == 321); } + + return 0; } diff --git a/libcxx/test/std/input.output/string.streams/istringstream/istringstream.cons/default.pass.cpp b/libcxx/test/std/input.output/string.streams/istringstream/istringstream.cons/default.pass.cpp index 327c4ca124d48..414c2269581ec 100644 --- a/libcxx/test/std/input.output/string.streams/istringstream/istringstream.cons/default.pass.cpp +++ b/libcxx/test/std/input.output/string.streams/istringstream/istringstream.cons/default.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { std::istringstream ss; @@ -42,4 +42,6 @@ int main() assert(ss.good()); assert(ss.str() == L""); } + + return 0; } diff --git a/libcxx/test/std/input.output/string.streams/istringstream/istringstream.cons/move.pass.cpp b/libcxx/test/std/input.output/string.streams/istringstream/istringstream.cons/move.pass.cpp index c5b144b092095..27eb5a745c818 100644 --- a/libcxx/test/std/input.output/string.streams/istringstream/istringstream.cons/move.pass.cpp +++ b/libcxx/test/std/input.output/string.streams/istringstream/istringstream.cons/move.pass.cpp @@ -18,7 +18,7 @@ #include #include -int main() +int main(int, char**) { { std::istringstream ss0(" 123 456"); @@ -44,4 +44,6 @@ int main() ss >> i; assert(i == 456); } + + return 0; } diff --git a/libcxx/test/std/input.output/string.streams/istringstream/istringstream.cons/string.pass.cpp b/libcxx/test/std/input.output/string.streams/istringstream/istringstream.cons/string.pass.cpp index cf3c7d89130b5..04733d6042f93 100644 --- a/libcxx/test/std/input.output/string.streams/istringstream/istringstream.cons/string.pass.cpp +++ b/libcxx/test/std/input.output/string.streams/istringstream/istringstream.cons/string.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { { std::istringstream ss(" 123 456"); @@ -63,4 +63,6 @@ int main() ss >> i; assert(i == 456); } + + return 0; } diff --git a/libcxx/test/std/input.output/string.streams/istringstream/istringstream.members/str.pass.cpp b/libcxx/test/std/input.output/string.streams/istringstream/istringstream.members/str.pass.cpp index 9b706a535ac0a..4c010e2b4346b 100644 --- a/libcxx/test/std/input.output/string.streams/istringstream/istringstream.members/str.pass.cpp +++ b/libcxx/test/std/input.output/string.streams/istringstream/istringstream.members/str.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { std::istringstream ss(" 123 456"); @@ -52,4 +52,6 @@ int main() ss >> i; assert(i == 789); } + + return 0; } diff --git a/libcxx/test/std/input.output/string.streams/istringstream/types.pass.cpp b/libcxx/test/std/input.output/string.streams/istringstream/types.pass.cpp index 0f256cbbdd43a..9731964422974 100644 --- a/libcxx/test/std/input.output/string.streams/istringstream/types.pass.cpp +++ b/libcxx/test/std/input.output/string.streams/istringstream/types.pass.cpp @@ -23,7 +23,7 @@ #include #include -int main() +int main(int, char**) { static_assert((std::is_base_of, std::basic_istringstream >::value), ""); static_assert((std::is_same::char_type, char>::value), ""); @@ -32,4 +32,6 @@ int main() static_assert((std::is_same::pos_type, std::char_traits::pos_type>::value), ""); static_assert((std::is_same::off_type, std::char_traits::off_type>::value), ""); static_assert((std::is_same::allocator_type, std::allocator >::value), ""); + + return 0; } diff --git a/libcxx/test/std/input.output/string.streams/ostringstream/ostringstream.assign/member_swap.pass.cpp b/libcxx/test/std/input.output/string.streams/ostringstream/ostringstream.assign/member_swap.pass.cpp index af5622ee2c973..01cc58ae6ae3b 100644 --- a/libcxx/test/std/input.output/string.streams/ostringstream/ostringstream.assign/member_swap.pass.cpp +++ b/libcxx/test/std/input.output/string.streams/ostringstream/ostringstream.assign/member_swap.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { std::ostringstream ss0(" 123 456"); @@ -44,4 +44,6 @@ int main() ss0 << i << ' ' << 567; assert(ss0.str() == L"234 567"); } + + return 0; } diff --git a/libcxx/test/std/input.output/string.streams/ostringstream/ostringstream.assign/move.pass.cpp b/libcxx/test/std/input.output/string.streams/ostringstream/ostringstream.assign/move.pass.cpp index f44b0fba41af4..bad3c7316d228 100644 --- a/libcxx/test/std/input.output/string.streams/ostringstream/ostringstream.assign/move.pass.cpp +++ b/libcxx/test/std/input.output/string.streams/ostringstream/ostringstream.assign/move.pass.cpp @@ -18,7 +18,7 @@ #include #include -int main() +int main(int, char**) { { std::ostringstream ss0(" 123 456"); @@ -42,4 +42,6 @@ int main() ss << i << ' ' << 567; assert(ss.str() == L"234 5676"); } + + return 0; } diff --git a/libcxx/test/std/input.output/string.streams/ostringstream/ostringstream.assign/nonmember_swap.pass.cpp b/libcxx/test/std/input.output/string.streams/ostringstream/ostringstream.assign/nonmember_swap.pass.cpp index 0793fd295cf1a..d251e6e085f07 100644 --- a/libcxx/test/std/input.output/string.streams/ostringstream/ostringstream.assign/nonmember_swap.pass.cpp +++ b/libcxx/test/std/input.output/string.streams/ostringstream/ostringstream.assign/nonmember_swap.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { std::ostringstream ss0(" 123 456"); @@ -44,4 +44,6 @@ int main() ss0 << i << ' ' << 567; assert(ss0.str() == L"234 567"); } + + return 0; } diff --git a/libcxx/test/std/input.output/string.streams/ostringstream/ostringstream.cons/default.pass.cpp b/libcxx/test/std/input.output/string.streams/ostringstream/ostringstream.cons/default.pass.cpp index 79e0f614c5ad8..f772a9040072c 100644 --- a/libcxx/test/std/input.output/string.streams/ostringstream/ostringstream.cons/default.pass.cpp +++ b/libcxx/test/std/input.output/string.streams/ostringstream/ostringstream.cons/default.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { std::ostringstream ss; @@ -42,4 +42,6 @@ int main() assert(ss.good()); assert(ss.str() == L""); } + + return 0; } diff --git a/libcxx/test/std/input.output/string.streams/ostringstream/ostringstream.cons/move.pass.cpp b/libcxx/test/std/input.output/string.streams/ostringstream/ostringstream.cons/move.pass.cpp index 569310174b81d..3b562bafd52f4 100644 --- a/libcxx/test/std/input.output/string.streams/ostringstream/ostringstream.cons/move.pass.cpp +++ b/libcxx/test/std/input.output/string.streams/ostringstream/ostringstream.cons/move.pass.cpp @@ -18,7 +18,7 @@ #include #include -int main() +int main(int, char**) { { std::ostringstream ss0(" 123 456"); @@ -40,4 +40,6 @@ int main() ss << i << ' ' << 567; assert(ss.str() == L"234 5676"); } + + return 0; } diff --git a/libcxx/test/std/input.output/string.streams/ostringstream/ostringstream.cons/string.pass.cpp b/libcxx/test/std/input.output/string.streams/ostringstream/ostringstream.cons/string.pass.cpp index 8d64dd5e5f173..98782dce1f6e2 100644 --- a/libcxx/test/std/input.output/string.streams/ostringstream/ostringstream.cons/string.pass.cpp +++ b/libcxx/test/std/input.output/string.streams/ostringstream/ostringstream.cons/string.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { { std::ostringstream ss(" 123 456"); @@ -55,4 +55,6 @@ int main() ss << i << ' ' << 567; assert(ss.str() == L"234 5676"); } + + return 0; } diff --git a/libcxx/test/std/input.output/string.streams/ostringstream/ostringstream.members/str.pass.cpp b/libcxx/test/std/input.output/string.streams/ostringstream/ostringstream.members/str.pass.cpp index d74acf3a588ca..56a85159ccae1 100644 --- a/libcxx/test/std/input.output/string.streams/ostringstream/ostringstream.members/str.pass.cpp +++ b/libcxx/test/std/input.output/string.streams/ostringstream/ostringstream.members/str.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { std::ostringstream ss(" 123 456"); @@ -48,4 +48,6 @@ int main() ss << L"abc"; assert(ss.str() == L"abc9"); } + + return 0; } diff --git a/libcxx/test/std/input.output/string.streams/ostringstream/types.pass.cpp b/libcxx/test/std/input.output/string.streams/ostringstream/types.pass.cpp index 15e7dc61fafbe..0da5f98d46ffd 100644 --- a/libcxx/test/std/input.output/string.streams/ostringstream/types.pass.cpp +++ b/libcxx/test/std/input.output/string.streams/ostringstream/types.pass.cpp @@ -23,7 +23,7 @@ #include #include -int main() +int main(int, char**) { static_assert((std::is_base_of, std::basic_ostringstream >::value), ""); static_assert((std::is_same::char_type, char>::value), ""); @@ -32,4 +32,6 @@ int main() static_assert((std::is_same::pos_type, std::char_traits::pos_type>::value), ""); static_assert((std::is_same::off_type, std::char_traits::off_type>::value), ""); static_assert((std::is_same::allocator_type, std::allocator >::value), ""); + + return 0; } diff --git a/libcxx/test/std/input.output/string.streams/stringbuf/stringbuf.assign/member_swap.pass.cpp b/libcxx/test/std/input.output/string.streams/stringbuf/stringbuf.assign/member_swap.pass.cpp index b5dce8fb9140f..6977d3189cf83 100644 --- a/libcxx/test/std/input.output/string.streams/stringbuf/stringbuf.assign/member_swap.pass.cpp +++ b/libcxx/test/std/input.output/string.streams/stringbuf/stringbuf.assign/member_swap.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { std::stringbuf buf1("testing"); @@ -60,4 +60,6 @@ int main() assert(buf.str() == L"testing"); assert(buf1.str() == L""); } + + return 0; } diff --git a/libcxx/test/std/input.output/string.streams/stringbuf/stringbuf.assign/move.pass.cpp b/libcxx/test/std/input.output/string.streams/stringbuf/stringbuf.assign/move.pass.cpp index 2a469ebb79a75..653edc0d19cb7 100644 --- a/libcxx/test/std/input.output/string.streams/stringbuf/stringbuf.assign/move.pass.cpp +++ b/libcxx/test/std/input.output/string.streams/stringbuf/stringbuf.assign/move.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { std::stringbuf buf1("testing"); @@ -54,4 +54,6 @@ int main() buf = move(buf1); assert(buf.str() == L"testing"); } + + return 0; } diff --git a/libcxx/test/std/input.output/string.streams/stringbuf/stringbuf.assign/nonmember_swap.pass.cpp b/libcxx/test/std/input.output/string.streams/stringbuf/stringbuf.assign/nonmember_swap.pass.cpp index 5a57f902af36b..38562fc322057 100644 --- a/libcxx/test/std/input.output/string.streams/stringbuf/stringbuf.assign/nonmember_swap.pass.cpp +++ b/libcxx/test/std/input.output/string.streams/stringbuf/stringbuf.assign/nonmember_swap.pass.cpp @@ -18,7 +18,7 @@ #include #include -int main() +int main(int, char**) { { std::stringbuf buf1("testing"); @@ -62,4 +62,6 @@ int main() assert(buf.str() == L"testing"); assert(buf1.str() == L""); } + + return 0; } diff --git a/libcxx/test/std/input.output/string.streams/stringbuf/stringbuf.cons/default.pass.cpp b/libcxx/test/std/input.output/string.streams/stringbuf/stringbuf.cons/default.pass.cpp index 2121a7a842e42..836509f2fddbf 100644 --- a/libcxx/test/std/input.output/string.streams/stringbuf/stringbuf.cons/default.pass.cpp +++ b/libcxx/test/std/input.output/string.streams/stringbuf/stringbuf.cons/default.pass.cpp @@ -31,7 +31,7 @@ struct testbuf } }; -int main() +int main(int, char**) { { std::stringbuf buf; @@ -49,4 +49,6 @@ int main() testbuf buf; buf.check(); } + + return 0; } diff --git a/libcxx/test/std/input.output/string.streams/stringbuf/stringbuf.cons/move.pass.cpp b/libcxx/test/std/input.output/string.streams/stringbuf/stringbuf.cons/move.pass.cpp index 70eff73849213..a3cccd39c87d2 100644 --- a/libcxx/test/std/input.output/string.streams/stringbuf/stringbuf.cons/move.pass.cpp +++ b/libcxx/test/std/input.output/string.streams/stringbuf/stringbuf.cons/move.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { std::stringbuf buf1("testing"); @@ -48,4 +48,6 @@ int main() std::wstringbuf buf(move(buf1)); assert(buf.str() == L"testing"); } + + return 0; } diff --git a/libcxx/test/std/input.output/string.streams/stringbuf/stringbuf.cons/string.pass.cpp b/libcxx/test/std/input.output/string.streams/stringbuf/stringbuf.cons/string.pass.cpp index 607d314255b62..de211c80ea1be 100644 --- a/libcxx/test/std/input.output/string.streams/stringbuf/stringbuf.cons/string.pass.cpp +++ b/libcxx/test/std/input.output/string.streams/stringbuf/stringbuf.cons/string.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { { std::stringbuf buf("testing"); @@ -43,4 +43,6 @@ int main() std::wstringbuf buf(L"testing", std::ios_base::out); assert(buf.str() == L"testing"); } + + return 0; } diff --git a/libcxx/test/std/input.output/string.streams/stringbuf/stringbuf.members/str.pass.cpp b/libcxx/test/std/input.output/string.streams/stringbuf/stringbuf.members/str.pass.cpp index baf406b696cfd..78b572454a5d3 100644 --- a/libcxx/test/std/input.output/string.streams/stringbuf/stringbuf.members/str.pass.cpp +++ b/libcxx/test/std/input.output/string.streams/stringbuf/stringbuf.members/str.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { std::stringbuf buf("testing"); @@ -30,4 +30,6 @@ int main() buf.str(L"another test"); assert(buf.str() == L"another test"); } + + return 0; } diff --git a/libcxx/test/std/input.output/string.streams/stringbuf/stringbuf.virtuals/overflow.pass.cpp b/libcxx/test/std/input.output/string.streams/stringbuf/stringbuf.virtuals/overflow.pass.cpp index 0f833070525d4..c9fdd0abcc9d1 100644 --- a/libcxx/test/std/input.output/string.streams/stringbuf/stringbuf.virtuals/overflow.pass.cpp +++ b/libcxx/test/std/input.output/string.streams/stringbuf/stringbuf.virtuals/overflow.pass.cpp @@ -34,7 +34,7 @@ struct testbuf void pbump(int n) {base::pbump(n);} }; -int main() +int main(int, char**) { { // sanity check testbuf tb(""); @@ -97,4 +97,6 @@ int main() assert(sb.sputc('2') == '2'); assert(sb.str() == "abc12"); } + + return 0; } diff --git a/libcxx/test/std/input.output/string.streams/stringbuf/stringbuf.virtuals/pbackfail.pass.cpp b/libcxx/test/std/input.output/string.streams/stringbuf/stringbuf.virtuals/pbackfail.pass.cpp index dfbe2084b9ddf..458e393c8ec36 100644 --- a/libcxx/test/std/input.output/string.streams/stringbuf/stringbuf.virtuals/pbackfail.pass.cpp +++ b/libcxx/test/std/input.output/string.streams/stringbuf/stringbuf.virtuals/pbackfail.pass.cpp @@ -32,7 +32,7 @@ struct testbuf void pbump(int n) {base::pbump(n);} }; -int main() +int main(int, char**) { { // sanity check testbuf tb(""); @@ -92,4 +92,6 @@ int main() assert(sb.pbackfail(std::char_traits::eof()) == std::char_traits::eof()); assert(sb.str() == L"133"); } + + return 0; } diff --git a/libcxx/test/std/input.output/string.streams/stringbuf/stringbuf.virtuals/seekoff.pass.cpp b/libcxx/test/std/input.output/string.streams/stringbuf/stringbuf.virtuals/seekoff.pass.cpp index dbe117eaa1733..1bee5c216a523 100644 --- a/libcxx/test/std/input.output/string.streams/stringbuf/stringbuf.virtuals/seekoff.pass.cpp +++ b/libcxx/test/std/input.output/string.streams/stringbuf/stringbuf.virtuals/seekoff.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { { std::stringbuf sb(std::ios_base::in); @@ -163,4 +163,6 @@ int main() assert(sb.sputc(L'c') == L'c'); assert(sb.str() == L"0123456c89"); } + + return 0; } diff --git a/libcxx/test/std/input.output/string.streams/stringbuf/stringbuf.virtuals/seekpos.pass.cpp b/libcxx/test/std/input.output/string.streams/stringbuf/stringbuf.virtuals/seekpos.pass.cpp index 7d687e070c1b6..fde91e74ba035 100644 --- a/libcxx/test/std/input.output/string.streams/stringbuf/stringbuf.virtuals/seekpos.pass.cpp +++ b/libcxx/test/std/input.output/string.streams/stringbuf/stringbuf.virtuals/seekpos.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { { std::stringbuf sb("0123456789", std::ios_base::in); @@ -73,4 +73,6 @@ int main() assert(sb.sputc(L'3') == L'3'); assert(sb.str() == L"0123456789"); } + + return 0; } diff --git a/libcxx/test/std/input.output/string.streams/stringbuf/stringbuf.virtuals/setbuf.pass.cpp b/libcxx/test/std/input.output/string.streams/stringbuf/stringbuf.virtuals/setbuf.pass.cpp index 99bc75e6c8a33..f833debe39da4 100644 --- a/libcxx/test/std/input.output/string.streams/stringbuf/stringbuf.virtuals/setbuf.pass.cpp +++ b/libcxx/test/std/input.output/string.streams/stringbuf/stringbuf.virtuals/setbuf.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { std::stringbuf sb("0123456789"); @@ -28,4 +28,6 @@ int main() assert(sb.pubsetbuf(0, 0) == &sb); assert(sb.str() == L"0123456789"); } + + return 0; } diff --git a/libcxx/test/std/input.output/string.streams/stringbuf/stringbuf.virtuals/underflow.pass.cpp b/libcxx/test/std/input.output/string.streams/stringbuf/stringbuf.virtuals/underflow.pass.cpp index c32449857494b..23b77d229ca80 100644 --- a/libcxx/test/std/input.output/string.streams/stringbuf/stringbuf.virtuals/underflow.pass.cpp +++ b/libcxx/test/std/input.output/string.streams/stringbuf/stringbuf.virtuals/underflow.pass.cpp @@ -28,7 +28,7 @@ struct testbuf void pbump(int n) {base::pbump(n);} }; -int main() +int main(int, char**) { { testbuf sb("123"); @@ -66,4 +66,6 @@ int main() assert(sb.underflow() == L'4'); assert(sb.underflow() == L'4'); } + + return 0; } diff --git a/libcxx/test/std/input.output/string.streams/stringbuf/types.pass.cpp b/libcxx/test/std/input.output/string.streams/stringbuf/types.pass.cpp index 29d651fc5e549..c27db8535991b 100644 --- a/libcxx/test/std/input.output/string.streams/stringbuf/types.pass.cpp +++ b/libcxx/test/std/input.output/string.streams/stringbuf/types.pass.cpp @@ -23,7 +23,7 @@ #include #include -int main() +int main(int, char**) { static_assert((std::is_base_of, std::basic_stringbuf >::value), ""); static_assert((std::is_same::char_type, char>::value), ""); @@ -32,4 +32,6 @@ int main() static_assert((std::is_same::pos_type, std::char_traits::pos_type>::value), ""); static_assert((std::is_same::off_type, std::char_traits::off_type>::value), ""); static_assert((std::is_same::allocator_type, std::allocator >::value), ""); + + return 0; } diff --git a/libcxx/test/std/input.output/string.streams/stringstream.cons/default.pass.cpp b/libcxx/test/std/input.output/string.streams/stringstream.cons/default.pass.cpp index 571c3dc658ed5..11cf288fcc9f1 100644 --- a/libcxx/test/std/input.output/string.streams/stringstream.cons/default.pass.cpp +++ b/libcxx/test/std/input.output/string.streams/stringstream.cons/default.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { std::stringstream ss; @@ -42,4 +42,6 @@ int main() assert(ss.good()); assert(ss.str() == L""); } + + return 0; } diff --git a/libcxx/test/std/input.output/string.streams/stringstream.cons/move.pass.cpp b/libcxx/test/std/input.output/string.streams/stringstream.cons/move.pass.cpp index 671aee553978a..2a73ad9c2157f 100644 --- a/libcxx/test/std/input.output/string.streams/stringstream.cons/move.pass.cpp +++ b/libcxx/test/std/input.output/string.streams/stringstream.cons/move.pass.cpp @@ -18,7 +18,7 @@ #include #include -int main() +int main(int, char**) { { std::stringstream ss0(" 123 456 "); @@ -48,4 +48,6 @@ int main() ss << i << ' ' << 123; assert(ss.str() == L"456 1236 "); } + + return 0; } diff --git a/libcxx/test/std/input.output/string.streams/stringstream.cons/move2.pass.cpp b/libcxx/test/std/input.output/string.streams/stringstream.cons/move2.pass.cpp index 4527cae33f62a..044e62824ca2c 100644 --- a/libcxx/test/std/input.output/string.streams/stringstream.cons/move2.pass.cpp +++ b/libcxx/test/std/input.output/string.streams/stringstream.cons/move2.pass.cpp @@ -21,7 +21,7 @@ #include #include -int main() +int main(int, char**) { std::vector vecis; vecis.push_back(std::istringstream()); @@ -34,4 +34,6 @@ int main() vecis[n].seekg(0, std::ios_base::beg); assert(vecis[n].str().size() == 31); } + + return 0; } diff --git a/libcxx/test/std/input.output/string.streams/stringstream.cons/string.pass.cpp b/libcxx/test/std/input.output/string.streams/stringstream.cons/string.pass.cpp index 7bc383f9a4a6e..29c81b3be6272 100644 --- a/libcxx/test/std/input.output/string.streams/stringstream.cons/string.pass.cpp +++ b/libcxx/test/std/input.output/string.streams/stringstream.cons/string.pass.cpp @@ -27,7 +27,7 @@ struct NoDefaultAllocator : std::allocator }; -int main() +int main(int, char**) { { std::stringstream ss(" 123 456 "); @@ -64,4 +64,6 @@ int main() // This test is not required by the standard, but *where else* could it get the allocator? assert(sb.str().get_allocator() == s.get_allocator()); } + + return 0; } diff --git a/libcxx/test/std/input.output/string.streams/stringstream.cons/stringstream.assign/member_swap.pass.cpp b/libcxx/test/std/input.output/string.streams/stringstream.cons/stringstream.assign/member_swap.pass.cpp index 07d3a1dea9d8b..2e0f4471a1caf 100644 --- a/libcxx/test/std/input.output/string.streams/stringstream.cons/stringstream.assign/member_swap.pass.cpp +++ b/libcxx/test/std/input.output/string.streams/stringstream.cons/stringstream.assign/member_swap.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { std::stringstream ss0(" 123 456 "); @@ -52,4 +52,6 @@ int main() ss0 << i << ' ' << 123; assert(ss0.str() == L"456 123"); } + + return 0; } diff --git a/libcxx/test/std/input.output/string.streams/stringstream.cons/stringstream.assign/move.pass.cpp b/libcxx/test/std/input.output/string.streams/stringstream.cons/stringstream.assign/move.pass.cpp index 0332924a69f05..c3088679ed642 100644 --- a/libcxx/test/std/input.output/string.streams/stringstream.cons/stringstream.assign/move.pass.cpp +++ b/libcxx/test/std/input.output/string.streams/stringstream.cons/stringstream.assign/move.pass.cpp @@ -18,7 +18,7 @@ #include #include -int main() +int main(int, char**) { { std::stringstream ss0(" 123 456 "); @@ -50,4 +50,6 @@ int main() ss << i << ' ' << 123; assert(ss.str() == L"456 1236 "); } + + return 0; } diff --git a/libcxx/test/std/input.output/string.streams/stringstream.cons/stringstream.assign/nonmember_swap.pass.cpp b/libcxx/test/std/input.output/string.streams/stringstream.cons/stringstream.assign/nonmember_swap.pass.cpp index 3225b273e682d..06a95dcb39415 100644 --- a/libcxx/test/std/input.output/string.streams/stringstream.cons/stringstream.assign/nonmember_swap.pass.cpp +++ b/libcxx/test/std/input.output/string.streams/stringstream.cons/stringstream.assign/nonmember_swap.pass.cpp @@ -19,7 +19,7 @@ #include #include -int main() +int main(int, char**) { { std::stringstream ss0(" 123 456 "); @@ -55,4 +55,6 @@ int main() ss0 << i << ' ' << 123; assert(ss0.str() == L"456 123"); } + + return 0; } diff --git a/libcxx/test/std/input.output/string.streams/stringstream.members/str.pass.cpp b/libcxx/test/std/input.output/string.streams/stringstream.members/str.pass.cpp index 392a1680e5c16..1dc655193b8ec 100644 --- a/libcxx/test/std/input.output/string.streams/stringstream.members/str.pass.cpp +++ b/libcxx/test/std/input.output/string.streams/stringstream.members/str.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { std::stringstream ss(" 123 456 "); @@ -63,4 +63,6 @@ int main() ss.write("\xd1", 1); assert(ss.str().length() == 1); } + + return 0; } diff --git a/libcxx/test/std/input.output/string.streams/stringstream/types.pass.cpp b/libcxx/test/std/input.output/string.streams/stringstream/types.pass.cpp index e05048a2df154..580ccb9a4e6e1 100644 --- a/libcxx/test/std/input.output/string.streams/stringstream/types.pass.cpp +++ b/libcxx/test/std/input.output/string.streams/stringstream/types.pass.cpp @@ -23,7 +23,7 @@ #include #include -int main() +int main(int, char**) { static_assert((std::is_base_of, std::basic_stringstream >::value), ""); static_assert((std::is_same::char_type, char>::value), ""); @@ -32,4 +32,6 @@ int main() static_assert((std::is_same::pos_type, std::char_traits::pos_type>::value), ""); static_assert((std::is_same::off_type, std::char_traits::off_type>::value), ""); static_assert((std::is_same::allocator_type, std::allocator >::value), ""); + + return 0; } diff --git a/libcxx/test/std/iterators/iterator.container/data.pass.cpp b/libcxx/test/std/iterators/iterator.container/data.pass.cpp index ab80c1cf5ca87..952dc687083d0 100644 --- a/libcxx/test/std/iterators/iterator.container/data.pass.cpp +++ b/libcxx/test/std/iterators/iterator.container/data.pass.cpp @@ -61,7 +61,7 @@ void test_const_array( const T (&array)[Sz] ) assert ( std::data(array) == &array[0]); } -int main() +int main(int, char**) { std::vector v; v.push_back(1); std::array a; a[0] = 3; @@ -83,4 +83,6 @@ int main() static constexpr int arrA [] { 1, 2, 3 }; test_const_array ( arrA ); + + return 0; } diff --git a/libcxx/test/std/iterators/iterator.container/empty.array.fail.cpp b/libcxx/test/std/iterators/iterator.container/empty.array.fail.cpp index 1cd16ad9a378f..08014776c9df3 100644 --- a/libcxx/test/std/iterators/iterator.container/empty.array.fail.cpp +++ b/libcxx/test/std/iterators/iterator.container/empty.array.fail.cpp @@ -20,8 +20,10 @@ #include "test_macros.h" -int main () +int main(int, char**) { int c[5]; std::empty(c); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} + + return 0; } diff --git a/libcxx/test/std/iterators/iterator.container/empty.container.fail.cpp b/libcxx/test/std/iterators/iterator.container/empty.container.fail.cpp index 4ac2e1335ce4d..153ea13b643e1 100644 --- a/libcxx/test/std/iterators/iterator.container/empty.container.fail.cpp +++ b/libcxx/test/std/iterators/iterator.container/empty.container.fail.cpp @@ -20,8 +20,10 @@ #include "test_macros.h" -int main () +int main(int, char**) { std::vector c; std::empty(c); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} + + return 0; } diff --git a/libcxx/test/std/iterators/iterator.container/empty.initializer_list.fail.cpp b/libcxx/test/std/iterators/iterator.container/empty.initializer_list.fail.cpp index dcdd89a313595..5dafb5119fe91 100644 --- a/libcxx/test/std/iterators/iterator.container/empty.initializer_list.fail.cpp +++ b/libcxx/test/std/iterators/iterator.container/empty.initializer_list.fail.cpp @@ -20,8 +20,10 @@ #include "test_macros.h" -int main () +int main(int, char**) { std::initializer_list c = { 4 }; std::empty(c); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} + + return 0; } diff --git a/libcxx/test/std/iterators/iterator.container/empty.pass.cpp b/libcxx/test/std/iterators/iterator.container/empty.pass.cpp index b792e0066587e..5c46cd6fbf027 100644 --- a/libcxx/test/std/iterators/iterator.container/empty.pass.cpp +++ b/libcxx/test/std/iterators/iterator.container/empty.pass.cpp @@ -60,7 +60,7 @@ void test_const_array( const T (&array)[Sz] ) assert (!std::empty(array)); } -int main() +int main(int, char**) { std::vector v; v.push_back(1); std::list l; l.push_back(2); @@ -85,4 +85,6 @@ int main() static constexpr int arrA [] { 1, 2, 3 }; test_const_array ( arrA ); + + return 0; } diff --git a/libcxx/test/std/iterators/iterator.container/size.pass.cpp b/libcxx/test/std/iterators/iterator.container/size.pass.cpp index 5b78afa266986..ec43c1e9b0282 100644 --- a/libcxx/test/std/iterators/iterator.container/size.pass.cpp +++ b/libcxx/test/std/iterators/iterator.container/size.pass.cpp @@ -27,32 +27,30 @@ template -void test_const_container( const C& c ) +void test_container( C& c) { // Can't say noexcept here because the container might not be assert ( std::size(c) == c.size()); } -template -void test_const_container( const std::initializer_list& c) +template +void test_const_container( const C& c ) { -// ASSERT_NOEXCEPT(std::size(c)); -// For some reason, there isn't a std::size() for initializer lists +// Can't say noexcept here because the container might not be assert ( std::size(c) == c.size()); } -template -void test_container( C& c) +template +void test_const_container( const std::initializer_list& c) { -// Can't say noexcept here because the container might not be + LIBCPP_ASSERT_NOEXCEPT(std::size(c)); // our std::size is conditionally noexcept assert ( std::size(c) == c.size()); } template void test_container( std::initializer_list& c ) { -// ASSERT_NOEXCEPT(std::size(c)); -// For some reason, there isn't a std::size() for initializer lists + LIBCPP_ASSERT_NOEXCEPT(std::size(c)); // our std::size is conditionally noexcept assert ( std::size(c) == c.size()); } @@ -63,7 +61,7 @@ void test_const_array( const T (&array)[Sz] ) assert ( std::size(array) == Sz ); } -int main() +int main(int, char**) { std::vector v; v.push_back(1); std::list l; l.push_back(2); @@ -87,4 +85,6 @@ int main() static constexpr int arrA [] { 1, 2, 3 }; test_const_array ( arrA ); + + return 0; } diff --git a/libcxx/test/std/iterators/iterator.container/ssize.pass.cpp b/libcxx/test/std/iterators/iterator.container/ssize.pass.cpp new file mode 100644 index 0000000000000..c34614dd0debc --- /dev/null +++ b/libcxx/test/std/iterators/iterator.container/ssize.pass.cpp @@ -0,0 +1,120 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// UNSUPPORTED: c++98, c++03, c++11, c++14, c++17 + +// +// template constexpr auto ssize(const C& c) +// -> common_type_t>; // C++20 +// template constexpr ptrdiff_t ssize(const T (&array)[N]) noexcept; // C++20 + +#include +#include +#include +#include +#include +#include +#include + +#include "test_macros.h" + + +struct short_container { + uint16_t size() const { return 60000; } // not noexcept + }; + + + +template +void test_container(C& c) +{ +// Can't say noexcept here because the container might not be + static_assert( std::is_signed_v, ""); + assert ( std::ssize(c) == static_cast(c.size())); +} + +template +void test_const_container(const C& c) +{ +// Can't say noexcept here because the container might not be + static_assert( std::is_signed_v, ""); + assert ( std::ssize(c) == static_cast(c.size())); +} + +template +void test_const_container(const std::initializer_list& c) +{ + LIBCPP_ASSERT_NOEXCEPT(std::ssize(c)); // our std::ssize is conditionally noexcept + static_assert( std::is_signed_v, ""); + assert ( std::ssize(c) == static_cast(c.size())); +} + +template +void test_container(std::initializer_list& c) +{ + LIBCPP_ASSERT_NOEXCEPT(std::ssize(c)); // our std::ssize is conditionally noexcept + static_assert( std::is_signed_v, ""); + assert ( std::ssize(c) == static_cast(c.size())); +} + +template +void test_const_array(const T (&array)[Sz]) +{ + ASSERT_NOEXCEPT(std::ssize(array)); + static_assert( std::is_signed_v, ""); + assert ( std::ssize(array) == Sz ); +} + +int main(int, char**) +{ + std::vector v; v.push_back(1); + std::list l; l.push_back(2); + std::array a; a[0] = 3; + std::initializer_list il = { 4 }; + test_container ( v ); + ASSERT_SAME_TYPE(ptrdiff_t, decltype(std::ssize(v))); + test_container ( l ); + ASSERT_SAME_TYPE(ptrdiff_t, decltype(std::ssize(l))); + test_container ( a ); + ASSERT_SAME_TYPE(ptrdiff_t, decltype(std::ssize(a))); + test_container ( il ); + ASSERT_SAME_TYPE(ptrdiff_t, decltype(std::ssize(il))); + + test_const_container ( v ); + test_const_container ( l ); + test_const_container ( a ); + test_const_container ( il ); + + std::string_view sv{"ABC"}; + test_container ( sv ); + ASSERT_SAME_TYPE(ptrdiff_t, decltype(std::ssize(sv))); + test_const_container ( sv ); + + static constexpr int arrA [] { 1, 2, 3 }; + ASSERT_SAME_TYPE(ptrdiff_t, decltype(std::ssize(arrA))); + static_assert( std::is_signed_v, ""); + test_const_array ( arrA ); + +// From P1227R2: +// Note that the code does not just return the std::make_signed variant of +// the container's size() method, because it's conceivable that a container +// might choose to represent its size as a uint16_t, supporting up to +// 65,535 elements, and it would be a disaster for std::ssize() to turn a +// size of 60,000 into a size of -5,536. + + short_container sc; +// is the return type signed? Is it big enough to hold 60K? +// is the "signed version" of sc.size() too small? + static_assert( std::is_signed_v< decltype(std::ssize(sc))>, ""); + static_assert( std::numeric_limits< decltype(std::ssize(sc))>::max() > 60000, ""); + static_assert( std::numeric_limits>::max() < 60000, ""); + assert (std::ssize(sc) == 60000); + LIBCPP_ASSERT_NOT_NOEXCEPT(std::ssize(sc)); + + return 0; +} diff --git a/libcxx/test/std/iterators/iterator.primitives/iterator.basic/iterator.pass.cpp b/libcxx/test/std/iterators/iterator.primitives/iterator.basic/iterator.pass.cpp index e922a4bfa466a..b5929ca8c1059 100644 --- a/libcxx/test/std/iterators/iterator.primitives/iterator.basic/iterator.pass.cpp +++ b/libcxx/test/std/iterators/iterator.primitives/iterator.basic/iterator.pass.cpp @@ -72,10 +72,12 @@ test5() static_assert((std::is_same::value), ""); } -int main() +int main(int, char**) { test2(); test3(); test4(); test5(); + + return 0; } diff --git a/libcxx/test/std/iterators/iterator.primitives/iterator.operations/advance.pass.cpp b/libcxx/test/std/iterators/iterator.primitives/iterator.operations/advance.pass.cpp index 6382d06c74bb4..454080563708b 100644 --- a/libcxx/test/std/iterators/iterator.primitives/iterator.operations/advance.pass.cpp +++ b/libcxx/test/std/iterators/iterator.primitives/iterator.operations/advance.pass.cpp @@ -42,7 +42,7 @@ constepxr_test(It i, typename std::iterator_traits::difference_type n, It x) } #endif -int main() +int main(int, char**) { { const char* s = "1234567890"; @@ -68,4 +68,6 @@ int main() static_assert( constepxr_test(s+5, -5, s), "" ); } #endif + + return 0; } diff --git a/libcxx/test/std/iterators/iterator.primitives/iterator.operations/distance.pass.cpp b/libcxx/test/std/iterators/iterator.primitives/iterator.operations/distance.pass.cpp index 86fcfbc5853d5..bd1b02a484df7 100644 --- a/libcxx/test/std/iterators/iterator.primitives/iterator.operations/distance.pass.cpp +++ b/libcxx/test/std/iterators/iterator.primitives/iterator.operations/distance.pass.cpp @@ -37,7 +37,7 @@ constexpr_test(It first, It last, typename std::iterator_traits::difference_ } #endif -int main() +int main(int, char**) { { const char* s = "1234567890"; @@ -57,4 +57,6 @@ int main() static_assert( constexpr_test(s, s+10, 10), ""); } #endif + + return 0; } diff --git a/libcxx/test/std/iterators/iterator.primitives/iterator.operations/next.pass.cpp b/libcxx/test/std/iterators/iterator.primitives/iterator.operations/next.pass.cpp index ad99aed99b59c..87f79fbd32bea 100644 --- a/libcxx/test/std/iterators/iterator.primitives/iterator.operations/next.pass.cpp +++ b/libcxx/test/std/iterators/iterator.primitives/iterator.operations/next.pass.cpp @@ -51,7 +51,7 @@ constexpr_test(It i, It x) } #endif -int main() +int main(int, char**) { { const char* s = "1234567890"; @@ -83,4 +83,6 @@ int main() static_assert( constexpr_test(s, s+1), "" ); } #endif + + return 0; } diff --git a/libcxx/test/std/iterators/iterator.primitives/iterator.operations/prev.pass.cpp b/libcxx/test/std/iterators/iterator.primitives/iterator.operations/prev.pass.cpp index b7d99391723c6..2ee0444ce14b4 100644 --- a/libcxx/test/std/iterators/iterator.primitives/iterator.operations/prev.pass.cpp +++ b/libcxx/test/std/iterators/iterator.primitives/iterator.operations/prev.pass.cpp @@ -49,7 +49,7 @@ constexpr_test(It i, It x) } #endif -int main() +int main(int, char**) { { const char* s = "1234567890"; @@ -74,4 +74,6 @@ int main() } #endif + + return 0; } diff --git a/libcxx/test/std/iterators/iterator.primitives/iterator.traits/const_pointer.pass.cpp b/libcxx/test/std/iterators/iterator.primitives/iterator.traits/const_pointer.pass.cpp index 246aeb5e8bb67..5abf59bf3dea6 100644 --- a/libcxx/test/std/iterators/iterator.primitives/iterator.traits/const_pointer.pass.cpp +++ b/libcxx/test/std/iterators/iterator.primitives/iterator.traits/const_pointer.pass.cpp @@ -23,7 +23,7 @@ struct A {}; -int main() +int main(int, char**) { typedef std::iterator_traits It; static_assert((std::is_same::value), ""); @@ -31,4 +31,6 @@ int main() static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); + + return 0; } diff --git a/libcxx/test/std/iterators/iterator.primitives/iterator.traits/const_volatile_pointer.pass.cpp b/libcxx/test/std/iterators/iterator.primitives/iterator.traits/const_volatile_pointer.pass.cpp index 774609e1cc1ed..358abb619b140 100644 --- a/libcxx/test/std/iterators/iterator.primitives/iterator.traits/const_volatile_pointer.pass.cpp +++ b/libcxx/test/std/iterators/iterator.primitives/iterator.traits/const_volatile_pointer.pass.cpp @@ -16,7 +16,7 @@ struct A {}; -int main() +int main(int, char**) { typedef std::iterator_traits It; static_assert((std::is_same::value), ""); @@ -24,4 +24,6 @@ int main() static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); + + return 0; } diff --git a/libcxx/test/std/iterators/iterator.primitives/iterator.traits/empty.fail.cpp b/libcxx/test/std/iterators/iterator.primitives/iterator.traits/empty.fail.cpp index 5c5c07d442da8..728909e693cc6 100644 --- a/libcxx/test/std/iterators/iterator.primitives/iterator.traits/empty.fail.cpp +++ b/libcxx/test/std/iterators/iterator.primitives/iterator.traits/empty.fail.cpp @@ -63,7 +63,7 @@ struct NotAnIteratorNoCategory // typedef std::forward_iterator_tag iterator_category; }; -int main() +int main(int, char**) { { typedef std::iterator_traits T; @@ -118,4 +118,6 @@ int main() typedef T::reference RT; // expected-error-re {{no type named 'reference' in 'std::{{.+}}::iterator_traits<{{.+}}>}} typedef T::iterator_category CT; // expected-error-re {{no type named 'iterator_category' in 'std::{{.+}}::iterator_traits<{{.+}}>}} } + + return 0; } diff --git a/libcxx/test/std/iterators/iterator.primitives/iterator.traits/empty.pass.cpp b/libcxx/test/std/iterators/iterator.primitives/iterator.traits/empty.pass.cpp index 81dca5186eccd..35fc877f2067c 100644 --- a/libcxx/test/std/iterators/iterator.primitives/iterator.traits/empty.pass.cpp +++ b/libcxx/test/std/iterators/iterator.primitives/iterator.traits/empty.pass.cpp @@ -30,8 +30,10 @@ struct has_value_type static const bool value = sizeof(test(0)) == 1; }; -int main() +int main(int, char**) { typedef std::iterator_traits It; static_assert(!(has_value_type::value), ""); + + return 0; } diff --git a/libcxx/test/std/iterators/iterator.primitives/iterator.traits/iterator.pass.cpp b/libcxx/test/std/iterators/iterator.primitives/iterator.traits/iterator.pass.cpp index 1c8d11eb15106..1e4d87c757ccb 100644 --- a/libcxx/test/std/iterators/iterator.primitives/iterator.traits/iterator.pass.cpp +++ b/libcxx/test/std/iterators/iterator.primitives/iterator.traits/iterator.pass.cpp @@ -32,7 +32,7 @@ struct test_iterator typedef std::forward_iterator_tag iterator_category; }; -int main() +int main(int, char**) { typedef std::iterator_traits It; static_assert((std::is_same::value), ""); @@ -40,4 +40,6 @@ int main() static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); + + return 0; } diff --git a/libcxx/test/std/iterators/iterator.primitives/iterator.traits/pointer.pass.cpp b/libcxx/test/std/iterators/iterator.primitives/iterator.traits/pointer.pass.cpp index 3be21c49a3b09..6016f6d408815 100644 --- a/libcxx/test/std/iterators/iterator.primitives/iterator.traits/pointer.pass.cpp +++ b/libcxx/test/std/iterators/iterator.primitives/iterator.traits/pointer.pass.cpp @@ -23,7 +23,7 @@ struct A {}; -int main() +int main(int, char**) { typedef std::iterator_traits It; static_assert((std::is_same::value), ""); @@ -31,4 +31,6 @@ int main() static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); + + return 0; } diff --git a/libcxx/test/std/iterators/iterator.primitives/iterator.traits/volatile_pointer.pass.cpp b/libcxx/test/std/iterators/iterator.primitives/iterator.traits/volatile_pointer.pass.cpp index ebcc30075af27..035360645dc6b 100644 --- a/libcxx/test/std/iterators/iterator.primitives/iterator.traits/volatile_pointer.pass.cpp +++ b/libcxx/test/std/iterators/iterator.primitives/iterator.traits/volatile_pointer.pass.cpp @@ -16,7 +16,7 @@ struct A {}; -int main() +int main(int, char**) { typedef std::iterator_traits It; static_assert((std::is_same::value), ""); @@ -24,4 +24,6 @@ int main() static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); + + return 0; } diff --git a/libcxx/test/std/iterators/iterator.primitives/nothing_to_do.pass.cpp b/libcxx/test/std/iterators/iterator.primitives/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/iterators/iterator.primitives/nothing_to_do.pass.cpp +++ b/libcxx/test/std/iterators/iterator.primitives/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/iterators/iterator.primitives/std.iterator.tags/bidirectional_iterator_tag.pass.cpp b/libcxx/test/std/iterators/iterator.primitives/std.iterator.tags/bidirectional_iterator_tag.pass.cpp index 6d7f64b9a1ed9..8380fb6b4e2c9 100644 --- a/libcxx/test/std/iterators/iterator.primitives/std.iterator.tags/bidirectional_iterator_tag.pass.cpp +++ b/libcxx/test/std/iterators/iterator.primitives/std.iterator.tags/bidirectional_iterator_tag.pass.cpp @@ -13,7 +13,7 @@ #include #include -int main() +int main(int, char**) { std::bidirectional_iterator_tag tag; ((void)tag); // Prevent unused warning @@ -21,4 +21,6 @@ int main() std::bidirectional_iterator_tag>::value), ""); static_assert((!std::is_base_of::value), ""); + + return 0; } diff --git a/libcxx/test/std/iterators/iterator.primitives/std.iterator.tags/forward_iterator_tag.pass.cpp b/libcxx/test/std/iterators/iterator.primitives/std.iterator.tags/forward_iterator_tag.pass.cpp index 753f25c667bfe..0afdc3eca0a14 100644 --- a/libcxx/test/std/iterators/iterator.primitives/std.iterator.tags/forward_iterator_tag.pass.cpp +++ b/libcxx/test/std/iterators/iterator.primitives/std.iterator.tags/forward_iterator_tag.pass.cpp @@ -13,7 +13,7 @@ #include #include -int main() +int main(int, char**) { std::forward_iterator_tag tag; ((void)tag); // Prevent unused warning @@ -21,4 +21,6 @@ int main() std::forward_iterator_tag>::value), ""); static_assert((!std::is_base_of::value), ""); + + return 0; } diff --git a/libcxx/test/std/iterators/iterator.primitives/std.iterator.tags/input_iterator_tag.pass.cpp b/libcxx/test/std/iterators/iterator.primitives/std.iterator.tags/input_iterator_tag.pass.cpp index ac517dd678534..26de37448d108 100644 --- a/libcxx/test/std/iterators/iterator.primitives/std.iterator.tags/input_iterator_tag.pass.cpp +++ b/libcxx/test/std/iterators/iterator.primitives/std.iterator.tags/input_iterator_tag.pass.cpp @@ -13,10 +13,12 @@ #include #include -int main() +int main(int, char**) { std::input_iterator_tag tag; ((void)tag); // Prevent unused warning static_assert((!std::is_base_of::value), ""); + + return 0; } diff --git a/libcxx/test/std/iterators/iterator.primitives/std.iterator.tags/output_iterator_tag.pass.cpp b/libcxx/test/std/iterators/iterator.primitives/std.iterator.tags/output_iterator_tag.pass.cpp index 1635850cf59b8..657e6f8ea1847 100644 --- a/libcxx/test/std/iterators/iterator.primitives/std.iterator.tags/output_iterator_tag.pass.cpp +++ b/libcxx/test/std/iterators/iterator.primitives/std.iterator.tags/output_iterator_tag.pass.cpp @@ -13,10 +13,12 @@ #include #include -int main() +int main(int, char**) { std::output_iterator_tag tag; ((void)tag); // Prevent unused warning static_assert((!std::is_base_of::value), ""); + + return 0; } diff --git a/libcxx/test/std/iterators/iterator.primitives/std.iterator.tags/random_access_iterator_tag.pass.cpp b/libcxx/test/std/iterators/iterator.primitives/std.iterator.tags/random_access_iterator_tag.pass.cpp index da2de46817645..5448a6715738d 100644 --- a/libcxx/test/std/iterators/iterator.primitives/std.iterator.tags/random_access_iterator_tag.pass.cpp +++ b/libcxx/test/std/iterators/iterator.primitives/std.iterator.tags/random_access_iterator_tag.pass.cpp @@ -13,7 +13,7 @@ #include #include -int main() +int main(int, char**) { std::random_access_iterator_tag tag; ((void)tag); // Prevent unused warning @@ -21,4 +21,6 @@ int main() std::random_access_iterator_tag>::value), ""); static_assert((!std::is_base_of::value), ""); + + return 0; } diff --git a/libcxx/test/std/iterators/iterator.range/begin-end.fail.cpp b/libcxx/test/std/iterators/iterator.range/begin-end.fail.cpp index b87b82f272e97..69a2784347475 100644 --- a/libcxx/test/std/iterators/iterator.range/begin-end.fail.cpp +++ b/libcxx/test/std/iterators/iterator.range/begin-end.fail.cpp @@ -40,11 +40,13 @@ namespace Foo { } -int main(){ +int main(int, char**) { // Bug #28927 - shouldn't find these via ADL TEST_IGNORE_NODISCARD std::cbegin (Foo::FakeContainer()); TEST_IGNORE_NODISCARD std::cend (Foo::FakeContainer()); TEST_IGNORE_NODISCARD std::crbegin(Foo::FakeContainer()); TEST_IGNORE_NODISCARD std::crend (Foo::FakeContainer()); + + return 0; } #endif diff --git a/libcxx/test/std/iterators/iterator.range/begin-end.pass.cpp b/libcxx/test/std/iterators/iterator.range/begin-end.pass.cpp index a55e0b639d30f..7580b463dceb8 100644 --- a/libcxx/test/std/iterators/iterator.range/begin-end.pass.cpp +++ b/libcxx/test/std/iterators/iterator.range/begin-end.pass.cpp @@ -135,7 +135,7 @@ void test_const_array( const T (&array)[Sz] ) { #endif } -int main(){ +int main(int, char**) { std::vector v; v.push_back(1); std::list l; l.push_back(2); std::array a; a[0] = 3; @@ -197,4 +197,6 @@ int main(){ static_assert ( *std::crbegin(c) == 4, "" ); } #endif + + return 0; } diff --git a/libcxx/test/std/iterators/iterator.requirements/bidirectional.iterators/nothing_to_do.pass.cpp b/libcxx/test/std/iterators/iterator.requirements/bidirectional.iterators/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/iterators/iterator.requirements/bidirectional.iterators/nothing_to_do.pass.cpp +++ b/libcxx/test/std/iterators/iterator.requirements/bidirectional.iterators/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/iterators/iterator.requirements/forward.iterators/nothing_to_do.pass.cpp b/libcxx/test/std/iterators/iterator.requirements/forward.iterators/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/iterators/iterator.requirements/forward.iterators/nothing_to_do.pass.cpp +++ b/libcxx/test/std/iterators/iterator.requirements/forward.iterators/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/iterators/iterator.requirements/input.iterators/nothing_to_do.pass.cpp b/libcxx/test/std/iterators/iterator.requirements/input.iterators/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/iterators/iterator.requirements/input.iterators/nothing_to_do.pass.cpp +++ b/libcxx/test/std/iterators/iterator.requirements/input.iterators/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/iterators/iterator.requirements/iterator.iterators/nothing_to_do.pass.cpp b/libcxx/test/std/iterators/iterator.requirements/iterator.iterators/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/iterators/iterator.requirements/iterator.iterators/nothing_to_do.pass.cpp +++ b/libcxx/test/std/iterators/iterator.requirements/iterator.iterators/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/iterators/iterator.requirements/iterator.requirements.general/nothing_to_do.pass.cpp b/libcxx/test/std/iterators/iterator.requirements/iterator.requirements.general/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/iterators/iterator.requirements/iterator.requirements.general/nothing_to_do.pass.cpp +++ b/libcxx/test/std/iterators/iterator.requirements/iterator.requirements.general/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/iterators/iterator.requirements/nothing_to_do.pass.cpp b/libcxx/test/std/iterators/iterator.requirements/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/iterators/iterator.requirements/nothing_to_do.pass.cpp +++ b/libcxx/test/std/iterators/iterator.requirements/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/iterators/iterator.requirements/output.iterators/nothing_to_do.pass.cpp b/libcxx/test/std/iterators/iterator.requirements/output.iterators/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/iterators/iterator.requirements/output.iterators/nothing_to_do.pass.cpp +++ b/libcxx/test/std/iterators/iterator.requirements/output.iterators/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/iterators/iterator.requirements/random.access.iterators/nothing_to_do.pass.cpp b/libcxx/test/std/iterators/iterator.requirements/random.access.iterators/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/iterators/iterator.requirements/random.access.iterators/nothing_to_do.pass.cpp +++ b/libcxx/test/std/iterators/iterator.requirements/random.access.iterators/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/iterators/iterator.synopsis/nothing_to_do.pass.cpp b/libcxx/test/std/iterators/iterator.synopsis/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/iterators/iterator.synopsis/nothing_to_do.pass.cpp +++ b/libcxx/test/std/iterators/iterator.synopsis/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/iterators/iterators.general/gcc_workaround.pass.cpp b/libcxx/test/std/iterators/iterators.general/gcc_workaround.pass.cpp index a6be18d10ec40..09b4d76288c5b 100644 --- a/libcxx/test/std/iterators/iterators.general/gcc_workaround.pass.cpp +++ b/libcxx/test/std/iterators/iterators.general/gcc_workaround.pass.cpp @@ -17,4 +17,6 @@ void f(const std::string &s) { TEST_IGNORE_NODISCARD s.begin(); } void AppendTo(const std::vector &v) { TEST_IGNORE_NODISCARD v.begin(); } -int main() {} +int main(int, char**) { + return 0; +} diff --git a/libcxx/test/std/iterators/iterators.general/nothing_to_do.pass.cpp b/libcxx/test/std/iterators/iterators.general/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/iterators/iterators.general/nothing_to_do.pass.cpp +++ b/libcxx/test/std/iterators/iterators.general/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/iterators/predef.iterators/insert.iterators/back.insert.iter.ops/back.insert.iter.cons/container.fail.cpp b/libcxx/test/std/iterators/predef.iterators/insert.iterators/back.insert.iter.ops/back.insert.iter.cons/container.fail.cpp index 1bdd5ddef2582..9aad14992f567 100644 --- a/libcxx/test/std/iterators/predef.iterators/insert.iterators/back.insert.iter.ops/back.insert.iter.cons/container.fail.cpp +++ b/libcxx/test/std/iterators/predef.iterators/insert.iterators/back.insert.iter.ops/back.insert.iter.cons/container.fail.cpp @@ -17,7 +17,9 @@ #include #include -int main() +int main(int, char**) { std::back_insert_iterator > i = std::vector(); + + return 0; } diff --git a/libcxx/test/std/iterators/predef.iterators/insert.iterators/back.insert.iter.ops/back.insert.iter.cons/container.pass.cpp b/libcxx/test/std/iterators/predef.iterators/insert.iterators/back.insert.iter.ops/back.insert.iter.cons/container.pass.cpp index 22f16c2eb09f9..2aad3fa3f4807 100644 --- a/libcxx/test/std/iterators/predef.iterators/insert.iterators/back.insert.iter.ops/back.insert.iter.cons/container.pass.cpp +++ b/libcxx/test/std/iterators/predef.iterators/insert.iterators/back.insert.iter.ops/back.insert.iter.cons/container.pass.cpp @@ -23,8 +23,10 @@ test(C c) std::back_insert_iterator i(c); } -int main() +int main(int, char**) { test(std::vector()); test(nasty_vector()); + + return 0; } diff --git a/libcxx/test/std/iterators/predef.iterators/insert.iterators/back.insert.iter.ops/back.insert.iter.op++/post.pass.cpp b/libcxx/test/std/iterators/predef.iterators/insert.iterators/back.insert.iter.ops/back.insert.iter.op++/post.pass.cpp index ccb22b2bd3d1e..d36b1ce063078 100644 --- a/libcxx/test/std/iterators/predef.iterators/insert.iterators/back.insert.iter.ops/back.insert.iter.op++/post.pass.cpp +++ b/libcxx/test/std/iterators/predef.iterators/insert.iterators/back.insert.iter.ops/back.insert.iter.op++/post.pass.cpp @@ -28,8 +28,10 @@ test(C c) assert(c.back() == 0); } -int main() +int main(int, char**) { test(std::vector()); test(nasty_vector()); + + return 0; } diff --git a/libcxx/test/std/iterators/predef.iterators/insert.iterators/back.insert.iter.ops/back.insert.iter.op++/pre.pass.cpp b/libcxx/test/std/iterators/predef.iterators/insert.iterators/back.insert.iter.ops/back.insert.iter.op++/pre.pass.cpp index acb272b4ced4d..512eb1e56b316 100644 --- a/libcxx/test/std/iterators/predef.iterators/insert.iterators/back.insert.iter.ops/back.insert.iter.op++/pre.pass.cpp +++ b/libcxx/test/std/iterators/predef.iterators/insert.iterators/back.insert.iter.ops/back.insert.iter.op++/pre.pass.cpp @@ -26,8 +26,10 @@ test(C c) assert(&r == &i); } -int main() +int main(int, char**) { test(std::vector()); test(nasty_vector()); + + return 0; } diff --git a/libcxx/test/std/iterators/predef.iterators/insert.iterators/back.insert.iter.ops/back.insert.iter.op=/lv_value.pass.cpp b/libcxx/test/std/iterators/predef.iterators/insert.iterators/back.insert.iter.ops/back.insert.iter.op=/lv_value.pass.cpp index 67772dabc5784..2b76a27148e6c 100644 --- a/libcxx/test/std/iterators/predef.iterators/insert.iterators/back.insert.iter.ops/back.insert.iter.op=/lv_value.pass.cpp +++ b/libcxx/test/std/iterators/predef.iterators/insert.iterators/back.insert.iter.ops/back.insert.iter.op=/lv_value.pass.cpp @@ -39,7 +39,9 @@ class Copyable {return x.data_ == y.data_;} }; -int main() +int main(int, char**) { test(std::vector()); + + return 0; } diff --git a/libcxx/test/std/iterators/predef.iterators/insert.iterators/back.insert.iter.ops/back.insert.iter.op=/rv_value.pass.cpp b/libcxx/test/std/iterators/predef.iterators/insert.iterators/back.insert.iter.ops/back.insert.iter.op=/rv_value.pass.cpp index 93fe8e5fa33da..506b7b6f0005a 100644 --- a/libcxx/test/std/iterators/predef.iterators/insert.iterators/back.insert.iter.ops/back.insert.iter.op=/rv_value.pass.cpp +++ b/libcxx/test/std/iterators/predef.iterators/insert.iterators/back.insert.iter.ops/back.insert.iter.op=/rv_value.pass.cpp @@ -31,7 +31,9 @@ test(C c) assert(c.back() == typename C::value_type()); } -int main() +int main(int, char**) { test(std::vector >()); + + return 0; } diff --git a/libcxx/test/std/iterators/predef.iterators/insert.iterators/back.insert.iter.ops/back.insert.iter.op_astrk/test.pass.cpp b/libcxx/test/std/iterators/predef.iterators/insert.iterators/back.insert.iter.ops/back.insert.iter.op_astrk/test.pass.cpp index b7f11e0f771fa..460f723a407b6 100644 --- a/libcxx/test/std/iterators/predef.iterators/insert.iterators/back.insert.iter.ops/back.insert.iter.op_astrk/test.pass.cpp +++ b/libcxx/test/std/iterators/predef.iterators/insert.iterators/back.insert.iter.ops/back.insert.iter.op_astrk/test.pass.cpp @@ -26,8 +26,10 @@ test(C c) assert(&r == &i); } -int main() +int main(int, char**) { test(std::vector()); test(nasty_vector()); + + return 0; } diff --git a/libcxx/test/std/iterators/predef.iterators/insert.iterators/back.insert.iter.ops/back.inserter/test.pass.cpp b/libcxx/test/std/iterators/predef.iterators/insert.iterators/back.insert.iter.ops/back.inserter/test.pass.cpp index 6c27ce826b2cd..bd6df64488aab 100644 --- a/libcxx/test/std/iterators/predef.iterators/insert.iterators/back.insert.iter.ops/back.inserter/test.pass.cpp +++ b/libcxx/test/std/iterators/predef.iterators/insert.iterators/back.insert.iter.ops/back.inserter/test.pass.cpp @@ -27,8 +27,10 @@ test(C c) assert(c.back() == 0); } -int main() +int main(int, char**) { test(std::vector()); test(nasty_vector()); + + return 0; } diff --git a/libcxx/test/std/iterators/predef.iterators/insert.iterators/back.insert.iter.ops/nothing_to_do.pass.cpp b/libcxx/test/std/iterators/predef.iterators/insert.iterators/back.insert.iter.ops/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/iterators/predef.iterators/insert.iterators/back.insert.iter.ops/nothing_to_do.pass.cpp +++ b/libcxx/test/std/iterators/predef.iterators/insert.iterators/back.insert.iter.ops/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/iterators/predef.iterators/insert.iterators/back.insert.iterator/types.pass.cpp b/libcxx/test/std/iterators/predef.iterators/insert.iterators/back.insert.iterator/types.pass.cpp index 47d38438218af..470392bc55147 100644 --- a/libcxx/test/std/iterators/predef.iterators/insert.iterators/back.insert.iterator/types.pass.cpp +++ b/libcxx/test/std/iterators/predef.iterators/insert.iterators/back.insert.iterator/types.pass.cpp @@ -52,7 +52,9 @@ test() static_assert((std::is_same::value), ""); } -int main() +int main(int, char**) { test >(); + + return 0; } diff --git a/libcxx/test/std/iterators/predef.iterators/insert.iterators/front.insert.iter.ops/front.insert.iter.cons/container.fail.cpp b/libcxx/test/std/iterators/predef.iterators/insert.iterators/front.insert.iter.ops/front.insert.iter.cons/container.fail.cpp index 1ebfd4d3f14bc..eb3346b2e7aea 100644 --- a/libcxx/test/std/iterators/predef.iterators/insert.iterators/front.insert.iter.ops/front.insert.iter.cons/container.fail.cpp +++ b/libcxx/test/std/iterators/predef.iterators/insert.iterators/front.insert.iter.ops/front.insert.iter.cons/container.fail.cpp @@ -17,7 +17,9 @@ #include #include -int main() +int main(int, char**) { std::front_insert_iterator > i = std::list(); + + return 0; } diff --git a/libcxx/test/std/iterators/predef.iterators/insert.iterators/front.insert.iter.ops/front.insert.iter.cons/container.pass.cpp b/libcxx/test/std/iterators/predef.iterators/insert.iterators/front.insert.iter.ops/front.insert.iter.cons/container.pass.cpp index 80307cb1547dd..2ef4ba8799485 100644 --- a/libcxx/test/std/iterators/predef.iterators/insert.iterators/front.insert.iter.ops/front.insert.iter.cons/container.pass.cpp +++ b/libcxx/test/std/iterators/predef.iterators/insert.iterators/front.insert.iter.ops/front.insert.iter.cons/container.pass.cpp @@ -23,8 +23,10 @@ test(C c) std::front_insert_iterator i(c); } -int main() +int main(int, char**) { test(std::list()); test(nasty_list()); + + return 0; } diff --git a/libcxx/test/std/iterators/predef.iterators/insert.iterators/front.insert.iter.ops/front.insert.iter.op++/post.pass.cpp b/libcxx/test/std/iterators/predef.iterators/insert.iterators/front.insert.iter.ops/front.insert.iter.op++/post.pass.cpp index 9b642a7d24e14..7c9b09ffd2aa5 100644 --- a/libcxx/test/std/iterators/predef.iterators/insert.iterators/front.insert.iter.ops/front.insert.iter.op++/post.pass.cpp +++ b/libcxx/test/std/iterators/predef.iterators/insert.iterators/front.insert.iter.ops/front.insert.iter.op++/post.pass.cpp @@ -28,8 +28,10 @@ test(C c) assert(c.back() == 0); } -int main() +int main(int, char**) { test(std::list()); test(nasty_list()); + + return 0; } diff --git a/libcxx/test/std/iterators/predef.iterators/insert.iterators/front.insert.iter.ops/front.insert.iter.op++/pre.pass.cpp b/libcxx/test/std/iterators/predef.iterators/insert.iterators/front.insert.iter.ops/front.insert.iter.op++/pre.pass.cpp index 7aa1d6da6a733..ea5c024105bea 100644 --- a/libcxx/test/std/iterators/predef.iterators/insert.iterators/front.insert.iter.ops/front.insert.iter.op++/pre.pass.cpp +++ b/libcxx/test/std/iterators/predef.iterators/insert.iterators/front.insert.iter.ops/front.insert.iter.op++/pre.pass.cpp @@ -26,8 +26,10 @@ test(C c) assert(&r == &i); } -int main() +int main(int, char**) { test(std::list()); test(nasty_list()); + + return 0; } diff --git a/libcxx/test/std/iterators/predef.iterators/insert.iterators/front.insert.iter.ops/front.insert.iter.op=/lv_value.pass.cpp b/libcxx/test/std/iterators/predef.iterators/insert.iterators/front.insert.iter.ops/front.insert.iter.op=/lv_value.pass.cpp index 555b72d797072..5e1a86d57f0a9 100644 --- a/libcxx/test/std/iterators/predef.iterators/insert.iterators/front.insert.iter.ops/front.insert.iter.op=/lv_value.pass.cpp +++ b/libcxx/test/std/iterators/predef.iterators/insert.iterators/front.insert.iter.ops/front.insert.iter.op=/lv_value.pass.cpp @@ -39,8 +39,10 @@ class Copyable {return x.data_ == y.data_;} }; -int main() +int main(int, char**) { test(std::list()); test(nasty_list()); + + return 0; } diff --git a/libcxx/test/std/iterators/predef.iterators/insert.iterators/front.insert.iter.ops/front.insert.iter.op=/rv_value.pass.cpp b/libcxx/test/std/iterators/predef.iterators/insert.iterators/front.insert.iter.ops/front.insert.iter.op=/rv_value.pass.cpp index ad032a4dde66b..450f395d49a87 100644 --- a/libcxx/test/std/iterators/predef.iterators/insert.iterators/front.insert.iter.ops/front.insert.iter.op=/rv_value.pass.cpp +++ b/libcxx/test/std/iterators/predef.iterators/insert.iterators/front.insert.iter.ops/front.insert.iter.op=/rv_value.pass.cpp @@ -29,7 +29,9 @@ test(C c) assert(c.front() == typename C::value_type()); } -int main() +int main(int, char**) { test(std::list >()); + + return 0; } diff --git a/libcxx/test/std/iterators/predef.iterators/insert.iterators/front.insert.iter.ops/front.insert.iter.op_astrk/test.pass.cpp b/libcxx/test/std/iterators/predef.iterators/insert.iterators/front.insert.iter.ops/front.insert.iter.op_astrk/test.pass.cpp index bf1bf38ad807b..3367229b42220 100644 --- a/libcxx/test/std/iterators/predef.iterators/insert.iterators/front.insert.iter.ops/front.insert.iter.op_astrk/test.pass.cpp +++ b/libcxx/test/std/iterators/predef.iterators/insert.iterators/front.insert.iter.ops/front.insert.iter.op_astrk/test.pass.cpp @@ -26,8 +26,10 @@ test(C c) assert(&r == &i); } -int main() +int main(int, char**) { test(std::list()); test(nasty_list()); + + return 0; } diff --git a/libcxx/test/std/iterators/predef.iterators/insert.iterators/front.insert.iter.ops/front.inserter/test.pass.cpp b/libcxx/test/std/iterators/predef.iterators/insert.iterators/front.insert.iter.ops/front.inserter/test.pass.cpp index f4cc7c984f16e..b7436778d1147 100644 --- a/libcxx/test/std/iterators/predef.iterators/insert.iterators/front.insert.iter.ops/front.inserter/test.pass.cpp +++ b/libcxx/test/std/iterators/predef.iterators/insert.iterators/front.insert.iter.ops/front.inserter/test.pass.cpp @@ -27,8 +27,10 @@ test(C c) assert(c.front() == 0); } -int main() +int main(int, char**) { test(std::list()); test(nasty_list()); + + return 0; } diff --git a/libcxx/test/std/iterators/predef.iterators/insert.iterators/front.insert.iter.ops/nothing_to_do.pass.cpp b/libcxx/test/std/iterators/predef.iterators/insert.iterators/front.insert.iter.ops/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/iterators/predef.iterators/insert.iterators/front.insert.iter.ops/nothing_to_do.pass.cpp +++ b/libcxx/test/std/iterators/predef.iterators/insert.iterators/front.insert.iter.ops/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/iterators/predef.iterators/insert.iterators/front.insert.iterator/types.pass.cpp b/libcxx/test/std/iterators/predef.iterators/insert.iterators/front.insert.iterator/types.pass.cpp index c8609efbe410a..c65a8e6f68d3a 100644 --- a/libcxx/test/std/iterators/predef.iterators/insert.iterators/front.insert.iterator/types.pass.cpp +++ b/libcxx/test/std/iterators/predef.iterators/insert.iterators/front.insert.iterator/types.pass.cpp @@ -53,7 +53,9 @@ test() static_assert((std::is_same::value), ""); } -int main() +int main(int, char**) { test >(); + + return 0; } diff --git a/libcxx/test/std/iterators/predef.iterators/insert.iterators/insert.iter.ops/insert.iter.cons/test.pass.cpp b/libcxx/test/std/iterators/predef.iterators/insert.iterators/insert.iter.ops/insert.iter.cons/test.pass.cpp index ae45c90f34eb5..531dac03c9f16 100644 --- a/libcxx/test/std/iterators/predef.iterators/insert.iterators/insert.iter.ops/insert.iter.cons/test.pass.cpp +++ b/libcxx/test/std/iterators/predef.iterators/insert.iterators/insert.iter.ops/insert.iter.cons/test.pass.cpp @@ -23,8 +23,10 @@ test(C c) std::insert_iterator i(c, c.begin()); } -int main() +int main(int, char**) { test(std::vector()); test(nasty_vector()); + + return 0; } diff --git a/libcxx/test/std/iterators/predef.iterators/insert.iterators/insert.iter.ops/insert.iter.op++/post.pass.cpp b/libcxx/test/std/iterators/predef.iterators/insert.iterators/insert.iter.ops/insert.iter.op++/post.pass.cpp index 22448fddd613b..a3148e2e2a4bd 100644 --- a/libcxx/test/std/iterators/predef.iterators/insert.iterators/insert.iter.ops/insert.iter.op++/post.pass.cpp +++ b/libcxx/test/std/iterators/predef.iterators/insert.iterators/insert.iter.ops/insert.iter.op++/post.pass.cpp @@ -28,8 +28,10 @@ test(C c) assert(c.back() == 0); } -int main() +int main(int, char**) { test(std::vector()); test(nasty_vector()); + + return 0; } diff --git a/libcxx/test/std/iterators/predef.iterators/insert.iterators/insert.iter.ops/insert.iter.op++/pre.pass.cpp b/libcxx/test/std/iterators/predef.iterators/insert.iterators/insert.iter.ops/insert.iter.op++/pre.pass.cpp index c9a8d1ef6e150..99c686095002b 100644 --- a/libcxx/test/std/iterators/predef.iterators/insert.iterators/insert.iter.ops/insert.iter.op++/pre.pass.cpp +++ b/libcxx/test/std/iterators/predef.iterators/insert.iterators/insert.iter.ops/insert.iter.op++/pre.pass.cpp @@ -26,8 +26,10 @@ test(C c) assert(&r == &i); } -int main() +int main(int, char**) { test(std::vector()); test(nasty_vector()); + + return 0; } diff --git a/libcxx/test/std/iterators/predef.iterators/insert.iterators/insert.iter.ops/insert.iter.op=/lv_value.pass.cpp b/libcxx/test/std/iterators/predef.iterators/insert.iterators/insert.iter.ops/insert.iter.op=/lv_value.pass.cpp index c639a2da16936..fe8260b999f6a 100644 --- a/libcxx/test/std/iterators/predef.iterators/insert.iterators/insert.iter.ops/insert.iter.op=/lv_value.pass.cpp +++ b/libcxx/test/std/iterators/predef.iterators/insert.iterators/insert.iter.ops/insert.iter.op=/lv_value.pass.cpp @@ -43,7 +43,7 @@ insert3at(C& c, typename C::iterator i, c.insert(++i, x3); } -int main() +int main(int, char**) { { typedef std::vector C; @@ -81,4 +81,6 @@ int main() insert3at(c2, c2.begin()+3, 'a', 'b', 'c'); test(c1, 3, 'a', 'b', 'c', c2); } + + return 0; } diff --git a/libcxx/test/std/iterators/predef.iterators/insert.iterators/insert.iter.ops/insert.iter.op=/rv_value.pass.cpp b/libcxx/test/std/iterators/predef.iterators/insert.iterators/insert.iter.ops/insert.iter.op=/rv_value.pass.cpp index 671d6bd496b48..7a5addb1ab026 100644 --- a/libcxx/test/std/iterators/predef.iterators/insert.iterators/insert.iter.ops/insert.iter.op=/rv_value.pass.cpp +++ b/libcxx/test/std/iterators/predef.iterators/insert.iterators/insert.iter.ops/insert.iter.op=/rv_value.pass.cpp @@ -52,7 +52,7 @@ struct do_nothing void operator()(void*) const {} }; -int main() +int main(int, char**) { { typedef std::unique_ptr Ptr; @@ -91,4 +91,6 @@ int main() insert3at(c2, c2.begin()+3, Ptr(x+3), Ptr(x+4), Ptr(x+5)); test(std::move(c1), 3, Ptr(x+3), Ptr(x+4), Ptr(x+5), c2); } + + return 0; } diff --git a/libcxx/test/std/iterators/predef.iterators/insert.iterators/insert.iter.ops/insert.iter.op_astrk/test.pass.cpp b/libcxx/test/std/iterators/predef.iterators/insert.iterators/insert.iter.ops/insert.iter.op_astrk/test.pass.cpp index d531e5fe3ac3b..8ef0383eed27c 100644 --- a/libcxx/test/std/iterators/predef.iterators/insert.iterators/insert.iter.ops/insert.iter.op_astrk/test.pass.cpp +++ b/libcxx/test/std/iterators/predef.iterators/insert.iterators/insert.iter.ops/insert.iter.op_astrk/test.pass.cpp @@ -26,8 +26,10 @@ test(C c) assert(&r == &i); } -int main() +int main(int, char**) { test(std::vector()); test(nasty_vector()); + + return 0; } diff --git a/libcxx/test/std/iterators/predef.iterators/insert.iterators/insert.iter.ops/inserter/test.pass.cpp b/libcxx/test/std/iterators/predef.iterators/insert.iterators/insert.iter.ops/inserter/test.pass.cpp index 05ede8a522f3f..e1ee829bce72a 100644 --- a/libcxx/test/std/iterators/predef.iterators/insert.iterators/insert.iter.ops/inserter/test.pass.cpp +++ b/libcxx/test/std/iterators/predef.iterators/insert.iterators/insert.iter.ops/inserter/test.pass.cpp @@ -27,8 +27,10 @@ test(C c) assert(c.back() == 0); } -int main() +int main(int, char**) { test(std::vector()); test(nasty_vector()); + + return 0; } diff --git a/libcxx/test/std/iterators/predef.iterators/insert.iterators/insert.iter.ops/nothing_to_do.pass.cpp b/libcxx/test/std/iterators/predef.iterators/insert.iterators/insert.iter.ops/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/iterators/predef.iterators/insert.iterators/insert.iter.ops/nothing_to_do.pass.cpp +++ b/libcxx/test/std/iterators/predef.iterators/insert.iterators/insert.iter.ops/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/iterators/predef.iterators/insert.iterators/insert.iterator/types.pass.cpp b/libcxx/test/std/iterators/predef.iterators/insert.iterators/insert.iterator/types.pass.cpp index 9d58fc40ccbcd..1e199b3051b31 100644 --- a/libcxx/test/std/iterators/predef.iterators/insert.iterators/insert.iterator/types.pass.cpp +++ b/libcxx/test/std/iterators/predef.iterators/insert.iterators/insert.iterator/types.pass.cpp @@ -58,7 +58,9 @@ test() static_assert((std::is_same::value), ""); } -int main() +int main(int, char**) { test >(); + + return 0; } diff --git a/libcxx/test/std/iterators/predef.iterators/insert.iterators/nothing_to_do.pass.cpp b/libcxx/test/std/iterators/predef.iterators/insert.iterators/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/iterators/predef.iterators/insert.iterators/nothing_to_do.pass.cpp +++ b/libcxx/test/std/iterators/predef.iterators/insert.iterators/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.nonmember/make_move_iterator.pass.cpp b/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.nonmember/make_move_iterator.pass.cpp index 36dfddd7f02ca..3a9b467e06f57 100644 --- a/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.nonmember/make_move_iterator.pass.cpp +++ b/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.nonmember/make_move_iterator.pass.cpp @@ -30,7 +30,7 @@ test(It i) assert(std::make_move_iterator(i) == r); } -int main() +int main(int, char**) { { char s[] = "1234567890"; @@ -53,4 +53,6 @@ int main() static_assert(iter.base() == p); } #endif + + return 0; } diff --git a/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.nonmember/minus.pass.cpp b/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.nonmember/minus.pass.cpp index 67852259734ac..e3b881edc9e11 100644 --- a/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.nonmember/minus.pass.cpp +++ b/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.nonmember/minus.pass.cpp @@ -33,7 +33,7 @@ test(It l, It r, typename std::iterator_traits::difference_type x) assert(r1 - r2 == x); } -int main() +int main(int, char**) { char s[] = "1234567890"; test(random_access_iterator(s+5), random_access_iterator(s), 5); @@ -49,4 +49,6 @@ int main() static_assert( it2 - it1 == 1, ""); } #endif + + return 0; } diff --git a/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.nonmember/plus.pass.cpp b/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.nonmember/plus.pass.cpp index 63c3e8ed5d4da..5e1965e19c270 100644 --- a/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.nonmember/plus.pass.cpp +++ b/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.nonmember/plus.pass.cpp @@ -31,7 +31,7 @@ test(It i, typename std::iterator_traits::difference_type n, It x) assert(rr.base() == x); } -int main() +int main(int, char**) { char s[] = "1234567890"; test(random_access_iterator(s+5), 5, random_access_iterator(s+10)); @@ -49,4 +49,6 @@ int main() static_assert(it2 == it3, ""); } #endif + + return 0; } diff --git a/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.+/difference_type.pass.cpp b/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.+/difference_type.pass.cpp index 95ab190f11ab7..1e3244e19b984 100644 --- a/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.+/difference_type.pass.cpp +++ b/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.+/difference_type.pass.cpp @@ -30,7 +30,7 @@ test(It i, typename std::iterator_traits::difference_type n, It x) assert(rr.base() == x); } -int main() +int main(int, char**) { const char* s = "1234567890"; test(random_access_iterator(s+5), 5, random_access_iterator(s+10)); @@ -48,4 +48,6 @@ int main() static_assert(it2 == it3, ""); } #endif + + return 0; } diff --git a/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.+=/difference_type.pass.cpp b/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.+=/difference_type.pass.cpp index 0af1ff83fbfef..863e06c0e45ce 100644 --- a/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.+=/difference_type.pass.cpp +++ b/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.+=/difference_type.pass.cpp @@ -31,7 +31,7 @@ test(It i, typename std::iterator_traits::difference_type n, It x) assert(&rr == &r); } -int main() +int main(int, char**) { const char* s = "1234567890"; test(random_access_iterator(s+5), 5, random_access_iterator(s+10)); @@ -49,4 +49,6 @@ int main() static_assert(it2 == it3, ""); } #endif + + return 0; } diff --git a/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.-/difference_type.pass.cpp b/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.-/difference_type.pass.cpp index ce0cb93cff846..3cf76f5daea14 100644 --- a/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.-/difference_type.pass.cpp +++ b/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.-/difference_type.pass.cpp @@ -30,7 +30,7 @@ test(It i, typename std::iterator_traits::difference_type n, It x) assert(rr.base() == x); } -int main() +int main(int, char**) { const char* s = "1234567890"; test(random_access_iterator(s+5), 5, random_access_iterator(s)); @@ -48,4 +48,6 @@ int main() static_assert(it2 != it3, ""); } #endif + + return 0; } diff --git a/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.-=/difference_type.pass.cpp b/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.-=/difference_type.pass.cpp index f17543335e51f..5692f708881a8 100644 --- a/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.-=/difference_type.pass.cpp +++ b/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.-=/difference_type.pass.cpp @@ -31,7 +31,7 @@ test(It i, typename std::iterator_traits::difference_type n, It x) assert(&rr == &r); } -int main() +int main(int, char**) { const char* s = "1234567890"; test(random_access_iterator(s+5), 5, random_access_iterator(s)); @@ -45,4 +45,6 @@ int main() static_assert(it1 == it2, ""); } #endif + + return 0; } diff --git a/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.comp/op_eq.pass.cpp b/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.comp/op_eq.pass.cpp index 1e05a50c7f5a8..ecf8f90ea1e9f 100644 --- a/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.comp/op_eq.pass.cpp +++ b/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.comp/op_eq.pass.cpp @@ -32,7 +32,7 @@ test(It l, It r, bool x) assert((r1 == r2) == x); } -int main() +int main(int, char**) { char s[] = "1234567890"; test(input_iterator(s), input_iterator(s), true); @@ -58,4 +58,6 @@ int main() static_assert(!(it2 == it3), ""); } #endif + + return 0; } diff --git a/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.comp/op_gt.pass.cpp b/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.comp/op_gt.pass.cpp index e58a57b50888a..3da38b3766641 100644 --- a/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.comp/op_gt.pass.cpp +++ b/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.comp/op_gt.pass.cpp @@ -32,7 +32,7 @@ test(It l, It r, bool x) assert((r1 > r2) == x); } -int main() +int main(int, char**) { char s[] = "1234567890"; test(random_access_iterator(s), random_access_iterator(s), false); @@ -54,4 +54,6 @@ int main() static_assert( (it2 > it3), ""); } #endif + + return 0; } diff --git a/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.comp/op_gte.pass.cpp b/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.comp/op_gte.pass.cpp index e10962f02cfc9..dceb411515252 100644 --- a/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.comp/op_gte.pass.cpp +++ b/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.comp/op_gte.pass.cpp @@ -32,7 +32,7 @@ test(It l, It r, bool x) assert((r1 >= r2) == x); } -int main() +int main(int, char**) { char s[] = "1234567890"; test(random_access_iterator(s), random_access_iterator(s), true); @@ -54,4 +54,6 @@ int main() static_assert( (it2 >= it3), ""); } #endif + + return 0; } diff --git a/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.comp/op_lt.pass.cpp b/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.comp/op_lt.pass.cpp index ebe90244e26d4..675e55f7881db 100644 --- a/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.comp/op_lt.pass.cpp +++ b/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.comp/op_lt.pass.cpp @@ -32,7 +32,7 @@ test(It l, It r, bool x) assert((r1 < r2) == x); } -int main() +int main(int, char**) { char s[] = "1234567890"; test(random_access_iterator(s), random_access_iterator(s), false); @@ -54,4 +54,6 @@ int main() static_assert(!(it2 < it3), ""); } #endif + + return 0; } diff --git a/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.comp/op_lte.pass.cpp b/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.comp/op_lte.pass.cpp index 72efc481e3fac..a2ac0b7a6f7bb 100644 --- a/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.comp/op_lte.pass.cpp +++ b/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.comp/op_lte.pass.cpp @@ -32,7 +32,7 @@ test(It l, It r, bool x) assert((r1 <= r2) == x); } -int main() +int main(int, char**) { char s[] = "1234567890"; test(random_access_iterator(s), random_access_iterator(s), true); @@ -54,4 +54,6 @@ int main() static_assert(!(it2 <= it3), ""); } #endif + + return 0; } diff --git a/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.comp/op_neq.pass.cpp b/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.comp/op_neq.pass.cpp index 69695e56bbbc3..01a7195d4d647 100644 --- a/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.comp/op_neq.pass.cpp +++ b/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.comp/op_neq.pass.cpp @@ -32,7 +32,7 @@ test(It l, It r, bool x) assert((r1 != r2) == x); } -int main() +int main(int, char**) { char s[] = "1234567890"; test(input_iterator(s), input_iterator(s), false); @@ -58,4 +58,6 @@ int main() static_assert( (it2 != it3), ""); } #endif + + return 0; } diff --git a/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.const/convert.fail.cpp b/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.const/convert.fail.cpp index 56b99025eebcd..b91767b0814fa 100644 --- a/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.const/convert.fail.cpp +++ b/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.const/convert.fail.cpp @@ -29,9 +29,11 @@ test(U u) struct base {}; struct derived {}; -int main() +int main(int, char**) { derived d; test(&d); + + return 0; } diff --git a/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.const/convert.pass.cpp b/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.const/convert.pass.cpp index dae13100db2c3..7f31920f76a9a 100644 --- a/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.const/convert.pass.cpp +++ b/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.const/convert.pass.cpp @@ -34,7 +34,7 @@ test(U u) struct Base {}; struct Derived : Base {}; -int main() +int main(int, char**) { Derived d; @@ -52,4 +52,6 @@ int main() static_assert(it2.base() == p); } #endif + + return 0; } diff --git a/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.const/default.pass.cpp b/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.const/default.pass.cpp index dfd89df807c66..6dfa0d09db902 100644 --- a/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.const/default.pass.cpp +++ b/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.const/default.pass.cpp @@ -27,7 +27,7 @@ test() (void)r; } -int main() +int main(int, char**) { test >(); test >(); @@ -41,4 +41,6 @@ int main() (void)it; } #endif + + return 0; } diff --git a/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.const/iter.fail.cpp b/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.const/iter.fail.cpp index 0b8ea45408907..28648b8153473 100644 --- a/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.const/iter.fail.cpp +++ b/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.const/iter.fail.cpp @@ -23,8 +23,10 @@ test(It i) std::move_iterator r = i; } -int main() +int main(int, char**) { char s[] = "123"; test(s); + + return 0; } diff --git a/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.const/iter.pass.cpp b/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.const/iter.pass.cpp index 5832ecbcf8017..bed97700e7cbc 100644 --- a/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.const/iter.pass.cpp +++ b/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.const/iter.pass.cpp @@ -28,7 +28,7 @@ test(It i) assert(r.base() == i); } -int main() +int main(int, char**) { char s[] = "123"; test(input_iterator(s)); @@ -44,4 +44,6 @@ int main() static_assert(it.base() == p); } #endif + + return 0; } diff --git a/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.conv/tested_elsewhere.pass.cpp b/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.conv/tested_elsewhere.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.conv/tested_elsewhere.pass.cpp +++ b/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.conv/tested_elsewhere.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.decr/post.pass.cpp b/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.decr/post.pass.cpp index 0b6db37e14409..38d52329721ef 100644 --- a/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.decr/post.pass.cpp +++ b/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.decr/post.pass.cpp @@ -30,7 +30,7 @@ test(It i, It x) assert(rr.base() == i); } -int main() +int main(int, char**) { char s[] = "123"; test(bidirectional_iterator(s+1), bidirectional_iterator(s)); @@ -49,4 +49,6 @@ int main() static_assert(it2 == it3, ""); } #endif + + return 0; } diff --git a/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.decr/pre.pass.cpp b/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.decr/pre.pass.cpp index c7c00183c7cad..e98fb6b093649 100644 --- a/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.decr/pre.pass.cpp +++ b/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.decr/pre.pass.cpp @@ -30,7 +30,7 @@ test(It i, It x) assert(&rr == &r); } -int main() +int main(int, char**) { char s[] = "123"; test(bidirectional_iterator(s+1), bidirectional_iterator(s)); @@ -49,4 +49,6 @@ int main() static_assert(it2 != it3, ""); } #endif + + return 0; } diff --git a/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.incr/post.pass.cpp b/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.incr/post.pass.cpp index f37522c13f63d..50597a54b0bf7 100644 --- a/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.incr/post.pass.cpp +++ b/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.incr/post.pass.cpp @@ -30,7 +30,7 @@ test(It i, It x) assert(rr.base() == i); } -int main() +int main(int, char**) { char s[] = "123"; test(input_iterator(s), input_iterator(s+1)); @@ -51,4 +51,6 @@ int main() static_assert(it2 != it3, ""); } #endif + + return 0; } diff --git a/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.incr/pre.pass.cpp b/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.incr/pre.pass.cpp index 4bcbdd5792b17..101f5cdbc0f41 100644 --- a/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.incr/pre.pass.cpp +++ b/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.incr/pre.pass.cpp @@ -30,7 +30,7 @@ test(It i, It x) assert(&rr == &r); } -int main() +int main(int, char**) { char s[] = "123"; test(input_iterator(s), input_iterator(s+1)); @@ -51,4 +51,6 @@ int main() static_assert(it2 == it3, ""); } #endif + + return 0; } diff --git a/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.index/difference_type.pass.cpp b/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.index/difference_type.pass.cpp index d626ff28a3818..ecf3b61058b7f 100644 --- a/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.index/difference_type.pass.cpp +++ b/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.index/difference_type.pass.cpp @@ -38,7 +38,7 @@ struct do_nothing void operator()(void*) const {} }; -int main() +int main(int, char**) { { char s[] = "1234567890"; @@ -64,4 +64,6 @@ int main() static_assert(it1[5] == '6', ""); } #endif + + return 0; } diff --git a/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.ref/op_arrow.pass.cpp b/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.ref/op_arrow.pass.cpp index 027162b90f0d7..6024f99fec3f1 100644 --- a/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.ref/op_arrow.pass.cpp +++ b/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.ref/op_arrow.pass.cpp @@ -27,7 +27,7 @@ test(It i) assert(r.operator->() == i); } -int main() +int main(int, char**) { char s[] = "123"; test(s); @@ -42,4 +42,6 @@ int main() static_assert(it2.operator->() == p + 1, ""); } #endif + + return 0; } diff --git a/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.star/op_star.pass.cpp b/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.star/op_star.pass.cpp index 6dfe0a5173604..e6e826d835256 100644 --- a/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.star/op_star.pass.cpp +++ b/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.star/op_star.pass.cpp @@ -47,7 +47,7 @@ struct do_nothing }; -int main() +int main(int, char**) { { A a; @@ -70,4 +70,6 @@ int main() static_assert(*it2 == p[1], ""); } #endif + + return 0; } diff --git a/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op=/move_iterator.fail.cpp b/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op=/move_iterator.fail.cpp index 68fe476ac64d7..94d012dfb7e32 100644 --- a/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op=/move_iterator.fail.cpp +++ b/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op=/move_iterator.fail.cpp @@ -31,8 +31,10 @@ test(U u) struct base {}; struct derived {}; -int main() +int main(int, char**) { derived d; test(&d); + + return 0; } diff --git a/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op=/move_iterator.pass.cpp b/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op=/move_iterator.pass.cpp index fbc5320feb5c5..84fbccb8be63c 100644 --- a/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op=/move_iterator.pass.cpp +++ b/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op=/move_iterator.pass.cpp @@ -37,7 +37,7 @@ test(U u) struct Base {}; struct Derived : Base {}; -int main() +int main(int, char**) { Derived d; @@ -56,4 +56,6 @@ int main() static_assert(it2.base() == p, ""); } #endif + + return 0; } diff --git a/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/nothing_to_do.pass.cpp b/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/nothing_to_do.pass.cpp +++ b/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.requirements/nothing_to_do.pass.cpp b/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.requirements/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.requirements/nothing_to_do.pass.cpp +++ b/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.requirements/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iterator/types.pass.cpp b/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iterator/types.pass.cpp index 9eb4669c3c59c..905952f42bd4d 100644 --- a/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iterator/types.pass.cpp +++ b/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iterator/types.pass.cpp @@ -55,7 +55,7 @@ test() static_assert((std::is_same::value), ""); } -int main() +int main(int, char**) { test >(); test >(); @@ -91,4 +91,6 @@ int main() static_assert(std::is_same::value, ""); } #endif + + return 0; } diff --git a/libcxx/test/std/iterators/predef.iterators/move.iterators/nothing_to_do.pass.cpp b/libcxx/test/std/iterators/predef.iterators/move.iterators/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/iterators/predef.iterators/move.iterators/nothing_to_do.pass.cpp +++ b/libcxx/test/std/iterators/predef.iterators/move.iterators/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/iterators/predef.iterators/nothing_to_do.pass.cpp b/libcxx/test/std/iterators/predef.iterators/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/iterators/predef.iterators/nothing_to_do.pass.cpp +++ b/libcxx/test/std/iterators/predef.iterators/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/iterators/predef.iterators/reverse.iterators/nothing_to_do.pass.cpp b/libcxx/test/std/iterators/predef.iterators/reverse.iterators/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/iterators/predef.iterators/reverse.iterators/nothing_to_do.pass.cpp +++ b/libcxx/test/std/iterators/predef.iterators/reverse.iterators/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/nothing_to_do.pass.cpp b/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/nothing_to_do.pass.cpp +++ b/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.cons/default.pass.cpp b/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.cons/default.pass.cpp index de035fcd3c9e4..32931eefa9169 100644 --- a/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.cons/default.pass.cpp +++ b/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.cons/default.pass.cpp @@ -27,7 +27,7 @@ test() (void)r; } -int main() +int main(int, char**) { test >(); test >(); @@ -40,4 +40,6 @@ int main() (void)it; } #endif + + return 0; } diff --git a/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.cons/iter.fail.cpp b/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.cons/iter.fail.cpp index bbbf1247f473d..6130386b0d247 100644 --- a/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.cons/iter.fail.cpp +++ b/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.cons/iter.fail.cpp @@ -23,8 +23,10 @@ test(It i) std::reverse_iterator r = i; } -int main() +int main(int, char**) { const char s[] = "123"; test(s); + + return 0; } diff --git a/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.cons/iter.pass.cpp b/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.cons/iter.pass.cpp index 47fc29b094a78..32cc74f9586a1 100644 --- a/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.cons/iter.pass.cpp +++ b/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.cons/iter.pass.cpp @@ -28,7 +28,7 @@ test(It i) assert(r.base() == i); } -int main() +int main(int, char**) { const char s[] = "123"; test(bidirectional_iterator(s)); @@ -42,4 +42,6 @@ int main() static_assert(it.base() == p); } #endif + + return 0; } diff --git a/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.cons/reverse_iterator.fail.cpp b/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.cons/reverse_iterator.fail.cpp index 02ab54a598698..5a878e4937e04 100644 --- a/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.cons/reverse_iterator.fail.cpp +++ b/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.cons/reverse_iterator.fail.cpp @@ -29,9 +29,11 @@ test(U u) struct base {}; struct derived {}; -int main() +int main(int, char**) { derived d; test(&d); + + return 0; } diff --git a/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.cons/reverse_iterator.pass.cpp b/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.cons/reverse_iterator.pass.cpp index db53853dc5920..53b82bd4038c8 100644 --- a/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.cons/reverse_iterator.pass.cpp +++ b/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.cons/reverse_iterator.pass.cpp @@ -34,7 +34,7 @@ test(U u) struct Base {}; struct Derived : Base {}; -int main() +int main(int, char**) { Derived d; @@ -50,4 +50,6 @@ int main() static_assert(it2.base() == p); } #endif + + return 0; } diff --git a/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.conv/tested_elsewhere.pass.cpp b/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.conv/tested_elsewhere.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.conv/tested_elsewhere.pass.cpp +++ b/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.conv/tested_elsewhere.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.make/make_reverse_iterator.pass.cpp b/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.make/make_reverse_iterator.pass.cpp index 8ad3d79b39027..fa7026ddeece6 100644 --- a/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.make/make_reverse_iterator.pass.cpp +++ b/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.make/make_reverse_iterator.pass.cpp @@ -31,7 +31,7 @@ test(It i) assert(r.base() == i); } -int main() +int main(int, char**) { const char* s = "1234567890"; random_access_iteratorb(s); @@ -46,5 +46,7 @@ int main() static_assert(it1.base() == p, ""); } #endif + + return 0; } diff --git a/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.op!=/test.pass.cpp b/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.op!=/test.pass.cpp index c67884d9187d7..f3e7497096795 100644 --- a/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.op!=/test.pass.cpp +++ b/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.op!=/test.pass.cpp @@ -32,7 +32,7 @@ test(It l, It r, bool x) assert((r1 != r2) == x); } -int main() +int main(int, char**) { const char* s = "1234567890"; test(bidirectional_iterator(s), bidirectional_iterator(s), false); @@ -53,4 +53,6 @@ int main() static_assert( (it1 != it3), ""); } #endif + + return 0; } diff --git a/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.op++/post.pass.cpp b/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.op++/post.pass.cpp index 2232a87f5c5e6..d7658ccfc991f 100644 --- a/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.op++/post.pass.cpp +++ b/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.op++/post.pass.cpp @@ -30,7 +30,7 @@ test(It i, It x) assert(rr.base() == i); } -int main() +int main(int, char**) { const char* s = "123"; test(bidirectional_iterator(s+1), bidirectional_iterator(s)); @@ -49,4 +49,6 @@ int main() static_assert(it2 == it3, ""); } #endif + + return 0; } diff --git a/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.op++/pre.pass.cpp b/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.op++/pre.pass.cpp index d2337e2086e98..edc74fab504e4 100644 --- a/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.op++/pre.pass.cpp +++ b/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.op++/pre.pass.cpp @@ -30,7 +30,7 @@ test(It i, It x) assert(&rr == &r); } -int main() +int main(int, char**) { const char* s = "123"; test(bidirectional_iterator(s+1), bidirectional_iterator(s)); @@ -50,4 +50,6 @@ int main() static_assert(*(++std::make_reverse_iterator(p+2)) == '1', ""); } #endif + + return 0; } diff --git a/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.op+/difference_type.pass.cpp b/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.op+/difference_type.pass.cpp index eed06f3df9c24..9b30f59da9347 100644 --- a/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.op+/difference_type.pass.cpp +++ b/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.op+/difference_type.pass.cpp @@ -30,7 +30,7 @@ test(It i, typename std::iterator_traits::difference_type n, It x) assert(rr.base() == x); } -int main() +int main(int, char**) { const char* s = "1234567890"; test(random_access_iterator(s+5), 5, random_access_iterator(s)); @@ -48,4 +48,6 @@ int main() static_assert(it2 != it3, ""); } #endif + + return 0; } diff --git a/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.op+=/difference_type.pass.cpp b/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.op+=/difference_type.pass.cpp index 5460382133c67..229f3ca118812 100644 --- a/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.op+=/difference_type.pass.cpp +++ b/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.op+=/difference_type.pass.cpp @@ -31,7 +31,7 @@ test(It i, typename std::iterator_traits::difference_type n, It x) assert(&rr == &r); } -int main() +int main(int, char**) { const char* s = "1234567890"; test(random_access_iterator(s+5), 5, random_access_iterator(s)); @@ -45,4 +45,6 @@ int main() static_assert(it1 == it2, ""); } #endif + + return 0; } diff --git a/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.op--/post.pass.cpp b/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.op--/post.pass.cpp index 35fdf1b1ed826..8b9912c817343 100644 --- a/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.op--/post.pass.cpp +++ b/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.op--/post.pass.cpp @@ -30,7 +30,7 @@ test(It i, It x) assert(rr.base() == i); } -int main() +int main(int, char**) { const char* s = "123"; test(bidirectional_iterator(s+1), bidirectional_iterator(s+2)); @@ -49,4 +49,6 @@ int main() static_assert(it2 != it3, ""); } #endif + + return 0; } diff --git a/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.op--/pre.pass.cpp b/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.op--/pre.pass.cpp index f0df91777a7f3..9ccab06e83907 100644 --- a/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.op--/pre.pass.cpp +++ b/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.op--/pre.pass.cpp @@ -30,7 +30,7 @@ test(It i, It x) assert(&rr == &r); } -int main() +int main(int, char**) { const char* s = "123"; test(bidirectional_iterator(s+1), bidirectional_iterator(s+2)); @@ -50,4 +50,6 @@ int main() static_assert(*(--std::make_reverse_iterator(p)) == '1', ""); } #endif + + return 0; } diff --git a/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.op-/difference_type.pass.cpp b/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.op-/difference_type.pass.cpp index b59095db8a4e7..0e3a5d36210eb 100644 --- a/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.op-/difference_type.pass.cpp +++ b/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.op-/difference_type.pass.cpp @@ -30,7 +30,7 @@ test(It i, typename std::iterator_traits::difference_type n, It x) assert(rr.base() == x); } -int main() +int main(int, char**) { const char* s = "1234567890"; test(random_access_iterator(s+5), 5, random_access_iterator(s+10)); @@ -48,4 +48,6 @@ int main() static_assert(it2 == it3, ""); } #endif + + return 0; } diff --git a/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.op-=/difference_type.pass.cpp b/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.op-=/difference_type.pass.cpp index a484a67a7ddff..ab92dc0686f5d 100644 --- a/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.op-=/difference_type.pass.cpp +++ b/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.op-=/difference_type.pass.cpp @@ -31,7 +31,7 @@ test(It i, typename std::iterator_traits::difference_type n, It x) assert(&rr == &r); } -int main() +int main(int, char**) { const char* s = "1234567890"; test(random_access_iterator(s+5), 5, random_access_iterator(s+10)); @@ -45,4 +45,6 @@ int main() static_assert(it1 == it2, ""); } #endif + + return 0; } diff --git a/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.op.star/op_star.pass.cpp b/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.op.star/op_star.pass.cpp index efe3dbf9ccd72..820ee00601454 100644 --- a/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.op.star/op_star.pass.cpp +++ b/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.op.star/op_star.pass.cpp @@ -43,7 +43,7 @@ test(It i, typename std::iterator_traits::value_type x) assert(*r == x); } -int main() +int main(int, char**) { A a; test(&a+1, A()); @@ -58,4 +58,6 @@ int main() static_assert(*it2 == p[1], ""); } #endif + + return 0; } diff --git a/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.op=/reverse_iterator.fail.cpp b/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.op=/reverse_iterator.fail.cpp index 0580eb098134d..071e3ef105035 100644 --- a/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.op=/reverse_iterator.fail.cpp +++ b/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.op=/reverse_iterator.fail.cpp @@ -31,8 +31,10 @@ test(U u) struct base {}; struct derived {}; -int main() +int main(int, char**) { derived d; test(&d); + + return 0; } diff --git a/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.op=/reverse_iterator.pass.cpp b/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.op=/reverse_iterator.pass.cpp index e39476a98e912..838bdc917e2a3 100644 --- a/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.op=/reverse_iterator.pass.cpp +++ b/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.op=/reverse_iterator.pass.cpp @@ -37,7 +37,7 @@ test(U u) struct Base {}; struct Derived : Base {}; -int main() +int main(int, char**) { Derived d; @@ -55,4 +55,6 @@ int main() static_assert(it2.base() == p, ""); } #endif + + return 0; } diff --git a/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.op==/test.pass.cpp b/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.op==/test.pass.cpp index 066aa769b373b..7bd699bb9ead9 100644 --- a/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.op==/test.pass.cpp +++ b/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.op==/test.pass.cpp @@ -32,7 +32,7 @@ test(It l, It r, bool x) assert((r1 == r2) == x); } -int main() +int main(int, char**) { const char* s = "1234567890"; test(bidirectional_iterator(s), bidirectional_iterator(s), true); @@ -54,4 +54,6 @@ int main() } #endif + + return 0; } diff --git a/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.opdiff/test.pass.cpp b/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.opdiff/test.pass.cpp index 2c7574eb454bc..ce90123480941 100644 --- a/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.opdiff/test.pass.cpp +++ b/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.opdiff/test.pass.cpp @@ -33,7 +33,7 @@ test(It1 l, It2 r, std::ptrdiff_t x) assert((r1 - r2) == x); } -int main() +int main(int, char**) { char s[3] = {0}; test(random_access_iterator(s), random_access_iterator(s), 0); @@ -53,4 +53,6 @@ int main() static_assert( it2 - it1 == -1, ""); } #endif + + return 0; } diff --git a/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.opgt/test.pass.cpp b/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.opgt/test.pass.cpp index d32932848cf64..86b19e3fc6a32 100644 --- a/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.opgt/test.pass.cpp +++ b/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.opgt/test.pass.cpp @@ -32,7 +32,7 @@ test(It l, It r, bool x) assert((r1 > r2) == x); } -int main() +int main(int, char**) { const char* s = "1234567890"; test(random_access_iterator(s), random_access_iterator(s), false); @@ -53,4 +53,6 @@ int main() static_assert( (it1 > it3), ""); } #endif + + return 0; } diff --git a/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.opgt=/test.pass.cpp b/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.opgt=/test.pass.cpp index b12f7c135d631..de53281202f80 100644 --- a/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.opgt=/test.pass.cpp +++ b/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.opgt=/test.pass.cpp @@ -32,7 +32,7 @@ test(It l, It r, bool x) assert((r1 >= r2) == x); } -int main() +int main(int, char**) { const char* s = "1234567890"; test(random_access_iterator(s), random_access_iterator(s), true); @@ -53,4 +53,6 @@ int main() static_assert( (it1 >= it3), ""); } #endif + + return 0; } diff --git a/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.opindex/difference_type.pass.cpp b/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.opindex/difference_type.pass.cpp index a1b08f65c247b..bc20d1381379f 100644 --- a/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.opindex/difference_type.pass.cpp +++ b/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.opindex/difference_type.pass.cpp @@ -30,7 +30,7 @@ test(It i, typename std::iterator_traits::difference_type n, assert(rr == x); } -int main() +int main(int, char**) { const char* s = "1234567890"; test(random_access_iterator(s+5), 4, '1'); @@ -45,4 +45,6 @@ int main() static_assert(it1[4] == '1', ""); } #endif + + return 0; } diff --git a/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.oplt/test.pass.cpp b/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.oplt/test.pass.cpp index 7e4f27e7a7cd0..e49821f833caf 100644 --- a/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.oplt/test.pass.cpp +++ b/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.oplt/test.pass.cpp @@ -32,7 +32,7 @@ test(It l, It r, bool x) assert((r1 < r2) == x); } -int main() +int main(int, char**) { const char* s = "1234567890"; test(random_access_iterator(s), random_access_iterator(s), false); @@ -53,4 +53,6 @@ int main() static_assert(!(it1 < it3), ""); } #endif + + return 0; } diff --git a/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.oplt=/test.pass.cpp b/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.oplt=/test.pass.cpp index 8934d68efc595..92752361152f6 100644 --- a/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.oplt=/test.pass.cpp +++ b/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.oplt=/test.pass.cpp @@ -32,7 +32,7 @@ test(It l, It r, bool x) assert((r1 <= r2) == x); } -int main() +int main(int, char**) { const char* s = "1234567890"; test(random_access_iterator(s), random_access_iterator(s), true); @@ -53,4 +53,6 @@ int main() static_assert(!(it1 <= it3), ""); } #endif + + return 0; } diff --git a/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.opref/op_arrow.pass.cpp b/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.opref/op_arrow.pass.cpp index ce0b470a61279..f16fb2757a533 100644 --- a/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.opref/op_arrow.pass.cpp +++ b/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.opref/op_arrow.pass.cpp @@ -76,7 +76,7 @@ class C TEST_CONSTEXPR C gC; -int main() +int main(int, char**) { A a; test(&a+1, A()); @@ -115,4 +115,6 @@ int main() { ((void)gC); } + + return 0; } diff --git a/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.opsum/difference_type.pass.cpp b/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.opsum/difference_type.pass.cpp index 25876d0726746..ba38448515d78 100644 --- a/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.opsum/difference_type.pass.cpp +++ b/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.opsum/difference_type.pass.cpp @@ -31,7 +31,7 @@ test(It i, typename std::iterator_traits::difference_type n, It x) assert(rr.base() == x); } -int main() +int main(int, char**) { const char* s = "1234567890"; test(random_access_iterator(s+5), 5, random_access_iterator(s)); @@ -49,4 +49,6 @@ int main() static_assert(it2 != it3, ""); } #endif + + return 0; } diff --git a/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.requirements/nothing_to_do.pass.cpp b/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.requirements/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.requirements/nothing_to_do.pass.cpp +++ b/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.requirements/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iterator/types.pass.cpp b/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iterator/types.pass.cpp index 7242f6a347c3f..11ac625258c71 100644 --- a/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iterator/types.pass.cpp +++ b/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iterator/types.pass.cpp @@ -52,9 +52,11 @@ test() static_assert((std::is_same::value), ""); } -int main() +int main(int, char**) { test >(); test >(); test(); + + return 0; } diff --git a/libcxx/test/std/iterators/stream.iterators/istream.iterator/istream.iterator.cons/copy.pass.cpp b/libcxx/test/std/iterators/stream.iterators/istream.iterator/istream.iterator.cons/copy.pass.cpp index 4ee68b5fc7ae9..d6a3b0862879a 100644 --- a/libcxx/test/std/iterators/stream.iterators/istream.iterator/istream.iterator.cons/copy.pass.cpp +++ b/libcxx/test/std/iterators/stream.iterators/istream.iterator/istream.iterator.cons/copy.pass.cpp @@ -20,7 +20,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { { std::istream_iterator io; @@ -36,4 +36,6 @@ int main() j = *i; assert(j == 1); } + + return 0; } diff --git a/libcxx/test/std/iterators/stream.iterators/istream.iterator/istream.iterator.cons/default.fail.cpp b/libcxx/test/std/iterators/stream.iterators/istream.iterator/istream.iterator.cons/default.fail.cpp index 1ffe4dcfe3cb7..e2bebbaea10c8 100644 --- a/libcxx/test/std/iterators/stream.iterators/istream.iterator/istream.iterator.cons/default.fail.cpp +++ b/libcxx/test/std/iterators/stream.iterators/istream.iterator/istream.iterator.cons/default.fail.cpp @@ -19,7 +19,7 @@ struct S { S(); }; // not constexpr -int main() +int main(int, char**) { #if TEST_STD_VER >= 11 { @@ -28,4 +28,6 @@ int main() #else #error "C++11 only test" #endif + + return 0; } diff --git a/libcxx/test/std/iterators/stream.iterators/istream.iterator/istream.iterator.cons/default.pass.cpp b/libcxx/test/std/iterators/stream.iterators/istream.iterator/istream.iterator.cons/default.pass.cpp index f569d3206d8f5..fa43566ddde93 100644 --- a/libcxx/test/std/iterators/stream.iterators/istream.iterator/istream.iterator.cons/default.pass.cpp +++ b/libcxx/test/std/iterators/stream.iterators/istream.iterator/istream.iterator.cons/default.pass.cpp @@ -42,7 +42,7 @@ void operator ()() const {} #endif -int main() +int main(int, char**) { { typedef std::istream_iterator T; @@ -61,4 +61,6 @@ int main() test_trivial()(); test_trivial()(); #endif + + return 0; } diff --git a/libcxx/test/std/iterators/stream.iterators/istream.iterator/istream.iterator.cons/istream.pass.cpp b/libcxx/test/std/iterators/stream.iterators/istream.iterator/istream.iterator.cons/istream.pass.cpp index 50b40aba48cba..a4c47974daee7 100644 --- a/libcxx/test/std/iterators/stream.iterators/istream.iterator/istream.iterator.cons/istream.pass.cpp +++ b/libcxx/test/std/iterators/stream.iterators/istream.iterator/istream.iterator.cons/istream.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { std::istringstream inf(" 1 23"); std::istream_iterator i(inf); @@ -26,4 +26,6 @@ int main() int j = 0; inf >> j; assert(j == 23); + + return 0; } diff --git a/libcxx/test/std/iterators/stream.iterators/istream.iterator/istream.iterator.ops/arrow.pass.cpp b/libcxx/test/std/iterators/stream.iterators/istream.iterator/istream.iterator.ops/arrow.pass.cpp index a2862b4031f3e..5409cc5955b4c 100644 --- a/libcxx/test/std/iterators/stream.iterators/istream.iterator/istream.iterator.ops/arrow.pass.cpp +++ b/libcxx/test/std/iterators/stream.iterators/istream.iterator/istream.iterator.ops/arrow.pass.cpp @@ -29,10 +29,12 @@ std::istream& operator>>(std::istream& is, A& a) return is >> a.d_ >> a.i_; } -int main() +int main(int, char**) { std::istringstream inf("1.5 23 "); std::istream_iterator i(inf); assert(i->d_ == 1.5); assert(i->i_ == 23); + + return 0; } diff --git a/libcxx/test/std/iterators/stream.iterators/istream.iterator/istream.iterator.ops/dereference.pass.cpp b/libcxx/test/std/iterators/stream.iterators/istream.iterator/istream.iterator.ops/dereference.pass.cpp index 38ffe4bfd7dfe..c99e723b04104 100644 --- a/libcxx/test/std/iterators/stream.iterators/istream.iterator/istream.iterator.ops/dereference.pass.cpp +++ b/libcxx/test/std/iterators/stream.iterators/istream.iterator/istream.iterator.ops/dereference.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { std::istringstream inf(" 1 23"); std::istream_iterator i(inf); @@ -30,4 +30,6 @@ int main() assert(j == 23); j = *i; assert(j == 23); + + return 0; } diff --git a/libcxx/test/std/iterators/stream.iterators/istream.iterator/istream.iterator.ops/equal.pass.cpp b/libcxx/test/std/iterators/stream.iterators/istream.iterator/istream.iterator.ops/equal.pass.cpp index 5ba335c5edf1e..616a3ca38520c 100644 --- a/libcxx/test/std/iterators/stream.iterators/istream.iterator/istream.iterator.ops/equal.pass.cpp +++ b/libcxx/test/std/iterators/stream.iterators/istream.iterator/istream.iterator.ops/equal.pass.cpp @@ -22,7 +22,7 @@ #include #include -int main() +int main(int, char**) { std::istringstream inf1(" 1 23"); std::istringstream inf2(" 1 23"); @@ -51,4 +51,6 @@ int main() assert(std::operator==(i1, i2)); assert(std::operator!=(i1, i3)); + + return 0; } diff --git a/libcxx/test/std/iterators/stream.iterators/istream.iterator/istream.iterator.ops/post_increment.pass.cpp b/libcxx/test/std/iterators/stream.iterators/istream.iterator/istream.iterator.ops/post_increment.pass.cpp index b32f358cf243b..83d206e719b3b 100644 --- a/libcxx/test/std/iterators/stream.iterators/istream.iterator/istream.iterator.ops/post_increment.pass.cpp +++ b/libcxx/test/std/iterators/stream.iterators/istream.iterator/istream.iterator.ops/post_increment.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { std::istringstream inf(" 1 23"); std::istream_iterator i(inf); @@ -28,4 +28,6 @@ int main() j = 0; j = *icopy; assert(j == 1); + + return 0; } diff --git a/libcxx/test/std/iterators/stream.iterators/istream.iterator/istream.iterator.ops/pre_increment.pass.cpp b/libcxx/test/std/iterators/stream.iterators/istream.iterator/istream.iterator.ops/pre_increment.pass.cpp index 6a361ff7172b3..ab61f57f9dc88 100644 --- a/libcxx/test/std/iterators/stream.iterators/istream.iterator/istream.iterator.ops/pre_increment.pass.cpp +++ b/libcxx/test/std/iterators/stream.iterators/istream.iterator/istream.iterator.ops/pre_increment.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { std::istringstream inf(" 1 23"); std::istream_iterator i(inf); @@ -25,4 +25,6 @@ int main() int j = 0; j = *i; assert(j == 23); + + return 0; } diff --git a/libcxx/test/std/iterators/stream.iterators/istream.iterator/types.pass.cpp b/libcxx/test/std/iterators/stream.iterators/istream.iterator/types.pass.cpp index 9a7185c1b8904..5170b1e536581 100644 --- a/libcxx/test/std/iterators/stream.iterators/istream.iterator/types.pass.cpp +++ b/libcxx/test/std/iterators/stream.iterators/istream.iterator/types.pass.cpp @@ -41,7 +41,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { typedef std::istream_iterator I1; // double is trivially destructible #if TEST_STD_VER <= 14 @@ -82,4 +82,6 @@ int main() typedef std::istream_iterator I3; // string is NOT trivially destructible static_assert(!std::is_trivially_copy_constructible::value, ""); static_assert(!std::is_trivially_destructible::value, ""); + + return 0; } diff --git a/libcxx/test/std/iterators/stream.iterators/istreambuf.iterator/istreambuf.iterator.cons/default.pass.cpp b/libcxx/test/std/iterators/stream.iterators/istreambuf.iterator/istreambuf.iterator.cons/default.pass.cpp index d7e1a31e57110..9502e0da7b98e 100644 --- a/libcxx/test/std/iterators/stream.iterators/istreambuf.iterator/istreambuf.iterator.cons/default.pass.cpp +++ b/libcxx/test/std/iterators/stream.iterators/istreambuf.iterator/istreambuf.iterator.cons/default.pass.cpp @@ -21,7 +21,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { { typedef std::istreambuf_iterator T; @@ -41,4 +41,6 @@ int main() (void)it2; #endif } + + return 0; } diff --git a/libcxx/test/std/iterators/stream.iterators/istreambuf.iterator/istreambuf.iterator.cons/istream.pass.cpp b/libcxx/test/std/iterators/stream.iterators/istreambuf.iterator/istreambuf.iterator.cons/istream.pass.cpp index a7927cbb2f0a6..b51d19a8e5e94 100644 --- a/libcxx/test/std/iterators/stream.iterators/istreambuf.iterator/istreambuf.iterator.cons/istream.pass.cpp +++ b/libcxx/test/std/iterators/stream.iterators/istreambuf.iterator/istreambuf.iterator.cons/istream.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { std::istringstream inf; @@ -38,4 +38,6 @@ int main() std::istreambuf_iterator i(inf); assert(i != std::istreambuf_iterator()); } + + return 0; } diff --git a/libcxx/test/std/iterators/stream.iterators/istreambuf.iterator/istreambuf.iterator.cons/proxy.pass.cpp b/libcxx/test/std/iterators/stream.iterators/istreambuf.iterator/istreambuf.iterator.cons/proxy.pass.cpp index 6b4719cadb0bb..87afe840d03e0 100644 --- a/libcxx/test/std/iterators/stream.iterators/istreambuf.iterator/istreambuf.iterator.cons/proxy.pass.cpp +++ b/libcxx/test/std/iterators/stream.iterators/istreambuf.iterator/istreambuf.iterator.cons/proxy.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { std::istringstream inf("abc"); @@ -32,4 +32,6 @@ int main() assert(i != std::istreambuf_iterator()); assert(*i == L'b'); } + + return 0; } diff --git a/libcxx/test/std/iterators/stream.iterators/istreambuf.iterator/istreambuf.iterator.cons/streambuf.pass.cpp b/libcxx/test/std/iterators/stream.iterators/istreambuf.iterator/istreambuf.iterator.cons/streambuf.pass.cpp index 2b94d8c975633..d92cddde1f155 100644 --- a/libcxx/test/std/iterators/stream.iterators/istreambuf.iterator/istreambuf.iterator.cons/streambuf.pass.cpp +++ b/libcxx/test/std/iterators/stream.iterators/istreambuf.iterator/istreambuf.iterator.cons/streambuf.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { std::istreambuf_iterator i(nullptr); @@ -46,4 +46,6 @@ int main() std::istreambuf_iterator i(inf.rdbuf()); assert(i != std::istreambuf_iterator()); } + + return 0; } diff --git a/libcxx/test/std/iterators/stream.iterators/istreambuf.iterator/istreambuf.iterator_equal/equal.pass.cpp b/libcxx/test/std/iterators/stream.iterators/istreambuf.iterator/istreambuf.iterator_equal/equal.pass.cpp index 9b0034131619d..1fcdf7af146d4 100644 --- a/libcxx/test/std/iterators/stream.iterators/istreambuf.iterator/istreambuf.iterator_equal/equal.pass.cpp +++ b/libcxx/test/std/iterators/stream.iterators/istreambuf.iterator/istreambuf.iterator_equal/equal.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { std::istringstream inf1("abc"); @@ -96,4 +96,6 @@ int main() assert( i5.equal(i4)); assert( i5.equal(i5)); } + + return 0; } diff --git a/libcxx/test/std/iterators/stream.iterators/istreambuf.iterator/istreambuf.iterator_op!=/not_equal.pass.cpp b/libcxx/test/std/iterators/stream.iterators/istreambuf.iterator/istreambuf.iterator_op!=/not_equal.pass.cpp index 7e50c68f7c181..d4184aa6ce66c 100644 --- a/libcxx/test/std/iterators/stream.iterators/istreambuf.iterator/istreambuf.iterator_op!=/not_equal.pass.cpp +++ b/libcxx/test/std/iterators/stream.iterators/istreambuf.iterator/istreambuf.iterator_op!=/not_equal.pass.cpp @@ -18,7 +18,7 @@ #include #include -int main() +int main(int, char**) { { std::istringstream inf1("abc"); @@ -98,4 +98,6 @@ int main() assert(!(i5 != i4)); assert(!(i5 != i5)); } + + return 0; } diff --git a/libcxx/test/std/iterators/stream.iterators/istreambuf.iterator/istreambuf.iterator_op++/dereference.pass.cpp b/libcxx/test/std/iterators/stream.iterators/istreambuf.iterator/istreambuf.iterator_op++/dereference.pass.cpp index 28cb7a93a4aa5..d60302ad40d74 100644 --- a/libcxx/test/std/iterators/stream.iterators/istreambuf.iterator/istreambuf.iterator_op++/dereference.pass.cpp +++ b/libcxx/test/std/iterators/stream.iterators/istreambuf.iterator/istreambuf.iterator_op++/dereference.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { std::istringstream inf("abc"); @@ -36,4 +36,6 @@ int main() ++i; assert(*i == L'c'); } + + return 0; } diff --git a/libcxx/test/std/iterators/stream.iterators/istreambuf.iterator/istreambuf.iterator_op==/equal.pass.cpp b/libcxx/test/std/iterators/stream.iterators/istreambuf.iterator/istreambuf.iterator_op==/equal.pass.cpp index ede97380bb8b4..875989f5df568 100644 --- a/libcxx/test/std/iterators/stream.iterators/istreambuf.iterator/istreambuf.iterator_op==/equal.pass.cpp +++ b/libcxx/test/std/iterators/stream.iterators/istreambuf.iterator/istreambuf.iterator_op==/equal.pass.cpp @@ -18,7 +18,7 @@ #include #include -int main() +int main(int, char**) { { std::istringstream inf1("abc"); @@ -98,4 +98,6 @@ int main() assert( (i5 == i4)); assert( (i5 == i5)); } + + return 0; } diff --git a/libcxx/test/std/iterators/stream.iterators/istreambuf.iterator/istreambuf.iterator_op_astrk/post_increment.pass.cpp b/libcxx/test/std/iterators/stream.iterators/istreambuf.iterator/istreambuf.iterator_op_astrk/post_increment.pass.cpp index 15c266d731455..e3121494df420 100644 --- a/libcxx/test/std/iterators/stream.iterators/istreambuf.iterator/istreambuf.iterator_op_astrk/post_increment.pass.cpp +++ b/libcxx/test/std/iterators/stream.iterators/istreambuf.iterator/istreambuf.iterator_op_astrk/post_increment.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { std::istringstream inf("abc"); @@ -34,4 +34,6 @@ int main() assert(*i++ == L'c'); assert(i == std::istreambuf_iterator()); } + + return 0; } diff --git a/libcxx/test/std/iterators/stream.iterators/istreambuf.iterator/istreambuf.iterator_op_astrk/pre_increment.pass.cpp b/libcxx/test/std/iterators/stream.iterators/istreambuf.iterator/istreambuf.iterator_op_astrk/pre_increment.pass.cpp index 148bd725a7f99..9d05cbda340d7 100644 --- a/libcxx/test/std/iterators/stream.iterators/istreambuf.iterator/istreambuf.iterator_op_astrk/pre_increment.pass.cpp +++ b/libcxx/test/std/iterators/stream.iterators/istreambuf.iterator/istreambuf.iterator_op_astrk/pre_increment.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { { std::istringstream inf("abc"); @@ -35,4 +35,6 @@ int main() assert(*++i == L'c'); assert(++i == std::istreambuf_iterator()); } + + return 0; } diff --git a/libcxx/test/std/iterators/stream.iterators/istreambuf.iterator/istreambuf.iterator_proxy/proxy.pass.cpp b/libcxx/test/std/iterators/stream.iterators/istreambuf.iterator/istreambuf.iterator_proxy/proxy.pass.cpp index 2535d99139798..74e1813d512b0 100644 --- a/libcxx/test/std/iterators/stream.iterators/istreambuf.iterator/istreambuf.iterator_proxy/proxy.pass.cpp +++ b/libcxx/test/std/iterators/stream.iterators/istreambuf.iterator/istreambuf.iterator_proxy/proxy.pass.cpp @@ -28,7 +28,7 @@ #include #include -int main() +int main(int, char**) { { std::istringstream inf("abc"); @@ -40,4 +40,6 @@ int main() std::istreambuf_iterator i(inf); assert(*i++ == L'a'); } + + return 0; } diff --git a/libcxx/test/std/iterators/stream.iterators/istreambuf.iterator/types.pass.cpp b/libcxx/test/std/iterators/stream.iterators/istreambuf.iterator/types.pass.cpp index 829d1f0a6dfdd..a6c6435f10a49 100644 --- a/libcxx/test/std/iterators/stream.iterators/istreambuf.iterator/types.pass.cpp +++ b/libcxx/test/std/iterators/stream.iterators/istreambuf.iterator/types.pass.cpp @@ -34,7 +34,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { typedef std::istreambuf_iterator I1; static_assert((std::is_same::value), ""); @@ -65,4 +65,6 @@ int main() static_assert((std::is_nothrow_default_constructible::value), "" ); static_assert((std::is_trivially_copy_constructible::value), "" ); static_assert((std::is_trivially_destructible::value), "" ); + + return 0; } diff --git a/libcxx/test/std/iterators/stream.iterators/iterator.range/begin_array.pass.cpp b/libcxx/test/std/iterators/stream.iterators/iterator.range/begin_array.pass.cpp index 3521b05fa8f0c..8d7500cf292d6 100644 --- a/libcxx/test/std/iterators/stream.iterators/iterator.range/begin_array.pass.cpp +++ b/libcxx/test/std/iterators/stream.iterators/iterator.range/begin_array.pass.cpp @@ -13,11 +13,13 @@ #include #include -int main() +int main(int, char**) { int ia[] = {1, 2, 3}; int* i = std::begin(ia); assert(*i == 1); *i = 2; assert(ia[0] == 2); + + return 0; } diff --git a/libcxx/test/std/iterators/stream.iterators/iterator.range/begin_const.pass.cpp b/libcxx/test/std/iterators/stream.iterators/iterator.range/begin_const.pass.cpp index 255a837e734b6..06b5e7907e806 100644 --- a/libcxx/test/std/iterators/stream.iterators/iterator.range/begin_const.pass.cpp +++ b/libcxx/test/std/iterators/stream.iterators/iterator.range/begin_const.pass.cpp @@ -13,10 +13,12 @@ #include #include -int main() +int main(int, char**) { int ia[] = {1, 2, 3}; const std::vector v(ia, ia + sizeof(ia)/sizeof(ia[0])); std::vector::const_iterator i = begin(v); assert(*i == 1); + + return 0; } diff --git a/libcxx/test/std/iterators/stream.iterators/iterator.range/begin_non_const.pass.cpp b/libcxx/test/std/iterators/stream.iterators/iterator.range/begin_non_const.pass.cpp index bc99f7a408c63..75e61d3b41178 100644 --- a/libcxx/test/std/iterators/stream.iterators/iterator.range/begin_non_const.pass.cpp +++ b/libcxx/test/std/iterators/stream.iterators/iterator.range/begin_non_const.pass.cpp @@ -13,7 +13,7 @@ #include #include -int main() +int main(int, char**) { int ia[] = {1, 2, 3}; std::vector v(ia, ia + sizeof(ia)/sizeof(ia[0])); @@ -21,4 +21,6 @@ int main() assert(*i == 1); *i = 2; assert(*i == 2); + + return 0; } diff --git a/libcxx/test/std/iterators/stream.iterators/iterator.range/end_array.pass.cpp b/libcxx/test/std/iterators/stream.iterators/iterator.range/end_array.pass.cpp index 0f21309baab71..a6721155afd16 100644 --- a/libcxx/test/std/iterators/stream.iterators/iterator.range/end_array.pass.cpp +++ b/libcxx/test/std/iterators/stream.iterators/iterator.range/end_array.pass.cpp @@ -13,11 +13,13 @@ #include #include -int main() +int main(int, char**) { int ia[] = {1, 2, 3}; int* i = std::begin(ia); int* e = std::end(ia); assert(e == ia + 3); assert(e - i == 3); + + return 0; } diff --git a/libcxx/test/std/iterators/stream.iterators/iterator.range/end_const.pass.cpp b/libcxx/test/std/iterators/stream.iterators/iterator.range/end_const.pass.cpp index 45796233202ef..78a6affd8a29c 100644 --- a/libcxx/test/std/iterators/stream.iterators/iterator.range/end_const.pass.cpp +++ b/libcxx/test/std/iterators/stream.iterators/iterator.range/end_const.pass.cpp @@ -13,10 +13,12 @@ #include #include -int main() +int main(int, char**) { int ia[] = {1, 2, 3}; const std::vector v(ia, ia + sizeof(ia)/sizeof(ia[0])); std::vector::const_iterator i = end(v); assert(i == v.cend()); + + return 0; } diff --git a/libcxx/test/std/iterators/stream.iterators/iterator.range/end_non_const.pass.cpp b/libcxx/test/std/iterators/stream.iterators/iterator.range/end_non_const.pass.cpp index 8fa2a4e5600e1..9970ec922c384 100644 --- a/libcxx/test/std/iterators/stream.iterators/iterator.range/end_non_const.pass.cpp +++ b/libcxx/test/std/iterators/stream.iterators/iterator.range/end_non_const.pass.cpp @@ -13,10 +13,12 @@ #include #include -int main() +int main(int, char**) { int ia[] = {1, 2, 3}; std::vector v(ia, ia + sizeof(ia)/sizeof(ia[0])); std::vector::iterator i = end(v); assert(i == v.end()); + + return 0; } diff --git a/libcxx/test/std/iterators/stream.iterators/nothing_to_do.pass.cpp b/libcxx/test/std/iterators/stream.iterators/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/iterators/stream.iterators/nothing_to_do.pass.cpp +++ b/libcxx/test/std/iterators/stream.iterators/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/iterators/stream.iterators/ostream.iterator/ostream.iterator.cons.des/copy.pass.cpp b/libcxx/test/std/iterators/stream.iterators/ostream.iterator/ostream.iterator.cons.des/copy.pass.cpp index 24cf15ff1beb3..491f3bc1cec46 100644 --- a/libcxx/test/std/iterators/stream.iterators/ostream.iterator/ostream.iterator.cons.des/copy.pass.cpp +++ b/libcxx/test/std/iterators/stream.iterators/ostream.iterator/ostream.iterator.cons.des/copy.pass.cpp @@ -16,11 +16,13 @@ #include #include -int main() +int main(int, char**) { std::ostringstream outf; std::ostream_iterator i(outf); std::ostream_iterator j = i; assert(outf.good()); ((void)j); + + return 0; } diff --git a/libcxx/test/std/iterators/stream.iterators/ostream.iterator/ostream.iterator.cons.des/ostream.pass.cpp b/libcxx/test/std/iterators/stream.iterators/ostream.iterator/ostream.iterator.cons.des/ostream.pass.cpp index 1de0ea2eabe2b..78abcfab677e2 100644 --- a/libcxx/test/std/iterators/stream.iterators/ostream.iterator/ostream.iterator.cons.des/ostream.pass.cpp +++ b/libcxx/test/std/iterators/stream.iterators/ostream.iterator/ostream.iterator.cons.des/ostream.pass.cpp @@ -23,7 +23,7 @@ typedef std::basic_ostream BasicStream; void operator&(BasicStream const&) {} -int main() +int main(int, char**) { { std::ostringstream outf; @@ -35,4 +35,6 @@ int main() std::ostream_iterator i(outf); assert(outf.good()); } + + return 0; } diff --git a/libcxx/test/std/iterators/stream.iterators/ostream.iterator/ostream.iterator.cons.des/ostream_delim.pass.cpp b/libcxx/test/std/iterators/stream.iterators/ostream.iterator/ostream.iterator.cons.des/ostream_delim.pass.cpp index 7b4422f94bde7..2c48189f91a88 100644 --- a/libcxx/test/std/iterators/stream.iterators/ostream.iterator/ostream.iterator.cons.des/ostream_delim.pass.cpp +++ b/libcxx/test/std/iterators/stream.iterators/ostream.iterator/ostream.iterator.cons.des/ostream_delim.pass.cpp @@ -24,7 +24,7 @@ typedef std::basic_ostream BasicStream; void operator&(BasicStream const&) {} -int main() +int main(int, char**) { { std::ostringstream outf; @@ -41,4 +41,6 @@ int main() std::ostream_iterator i(outf, ", "); assert(outf.good()); } + + return 0; } diff --git a/libcxx/test/std/iterators/stream.iterators/ostream.iterator/ostream.iterator.ops/assign_t.pass.cpp b/libcxx/test/std/iterators/stream.iterators/ostream.iterator/ostream.iterator.ops/assign_t.pass.cpp index dea585c3c0472..5a2f2cc99f258 100644 --- a/libcxx/test/std/iterators/stream.iterators/ostream.iterator/ostream.iterator.ops/assign_t.pass.cpp +++ b/libcxx/test/std/iterators/stream.iterators/ostream.iterator/ostream.iterator.ops/assign_t.pass.cpp @@ -26,7 +26,7 @@ #pragma warning(disable: 4244) // conversion from 'X' to 'Y', possible loss of data #endif -int main() +int main(int, char**) { { std::ostringstream outf; @@ -52,4 +52,6 @@ int main() i = 2.4; assert(outf.str() == L"2, "); } + + return 0; } diff --git a/libcxx/test/std/iterators/stream.iterators/ostream.iterator/ostream.iterator.ops/dereference.pass.cpp b/libcxx/test/std/iterators/stream.iterators/ostream.iterator/ostream.iterator.ops/dereference.pass.cpp index 4d79f7c1d568a..6cb190ab4913c 100644 --- a/libcxx/test/std/iterators/stream.iterators/ostream.iterator/ostream.iterator.ops/dereference.pass.cpp +++ b/libcxx/test/std/iterators/stream.iterators/ostream.iterator/ostream.iterator.ops/dereference.pass.cpp @@ -16,10 +16,12 @@ #include #include -int main() +int main(int, char**) { std::ostringstream os; std::ostream_iterator i(os); std::ostream_iterator& iref = *i; assert(&iref == &i); + + return 0; } diff --git a/libcxx/test/std/iterators/stream.iterators/ostream.iterator/ostream.iterator.ops/increment.pass.cpp b/libcxx/test/std/iterators/stream.iterators/ostream.iterator/ostream.iterator.ops/increment.pass.cpp index d93aad6cce52b..eedab8115d87c 100644 --- a/libcxx/test/std/iterators/stream.iterators/ostream.iterator/ostream.iterator.ops/increment.pass.cpp +++ b/libcxx/test/std/iterators/stream.iterators/ostream.iterator/ostream.iterator.ops/increment.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { std::ostringstream os; std::ostream_iterator i(os); @@ -25,4 +25,6 @@ int main() assert(&iref1 == &i); std::ostream_iterator& iref2 = i++; assert(&iref2 == &i); + + return 0; } diff --git a/libcxx/test/std/iterators/stream.iterators/ostream.iterator/types.pass.cpp b/libcxx/test/std/iterators/stream.iterators/ostream.iterator/types.pass.cpp index 716ba2bfdc38d..950c7dfe8c0b5 100644 --- a/libcxx/test/std/iterators/stream.iterators/ostream.iterator/types.pass.cpp +++ b/libcxx/test/std/iterators/stream.iterators/ostream.iterator/types.pass.cpp @@ -24,7 +24,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { typedef std::ostream_iterator I1; #if TEST_STD_VER <= 14 @@ -54,4 +54,6 @@ int main() static_assert((std::is_same::value), ""); static_assert((std::is_same >::value), ""); static_assert((std::is_same::value), ""); + + return 0; } diff --git a/libcxx/test/std/iterators/stream.iterators/ostreambuf.iterator/ostreambuf.iter.cons/ostream.pass.cpp b/libcxx/test/std/iterators/stream.iterators/ostreambuf.iterator/ostreambuf.iter.cons/ostream.pass.cpp index 0c28a77ac168b..aa6031a8ad8a5 100644 --- a/libcxx/test/std/iterators/stream.iterators/ostreambuf.iterator/ostreambuf.iter.cons/ostream.pass.cpp +++ b/libcxx/test/std/iterators/stream.iterators/ostreambuf.iterator/ostreambuf.iter.cons/ostream.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { std::ostringstream outf; @@ -28,4 +28,6 @@ int main() std::ostreambuf_iterator i(outf); assert(!i.failed()); } + + return 0; } diff --git a/libcxx/test/std/iterators/stream.iterators/ostreambuf.iterator/ostreambuf.iter.cons/streambuf.pass.cpp b/libcxx/test/std/iterators/stream.iterators/ostreambuf.iterator/ostreambuf.iter.cons/streambuf.pass.cpp index 0d2c85bef849f..2c64dc29fdb26 100644 --- a/libcxx/test/std/iterators/stream.iterators/ostreambuf.iterator/ostreambuf.iter.cons/streambuf.pass.cpp +++ b/libcxx/test/std/iterators/stream.iterators/ostreambuf.iterator/ostreambuf.iter.cons/streambuf.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { std::ostringstream outf; @@ -28,4 +28,6 @@ int main() std::ostreambuf_iterator i(outf.rdbuf()); assert(!i.failed()); } + + return 0; } diff --git a/libcxx/test/std/iterators/stream.iterators/ostreambuf.iterator/ostreambuf.iter.ops/assign_c.pass.cpp b/libcxx/test/std/iterators/stream.iterators/ostreambuf.iterator/ostreambuf.iter.ops/assign_c.pass.cpp index 45e57fc80076f..fe51fba1fd5f8 100644 --- a/libcxx/test/std/iterators/stream.iterators/ostreambuf.iterator/ostreambuf.iter.ops/assign_c.pass.cpp +++ b/libcxx/test/std/iterators/stream.iterators/ostreambuf.iterator/ostreambuf.iter.ops/assign_c.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { { std::ostringstream outf; @@ -35,4 +35,6 @@ int main() i = L'b'; assert(outf.str() == L"ab"); } + + return 0; } diff --git a/libcxx/test/std/iterators/stream.iterators/ostreambuf.iterator/ostreambuf.iter.ops/deref.pass.cpp b/libcxx/test/std/iterators/stream.iterators/ostreambuf.iterator/ostreambuf.iter.ops/deref.pass.cpp index e33a5a5c8f48d..4904320b0a004 100644 --- a/libcxx/test/std/iterators/stream.iterators/ostreambuf.iterator/ostreambuf.iter.ops/deref.pass.cpp +++ b/libcxx/test/std/iterators/stream.iterators/ostreambuf.iterator/ostreambuf.iter.ops/deref.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { std::ostringstream outf; @@ -30,4 +30,6 @@ int main() std::ostreambuf_iterator& iref = *i; assert(&iref == &i); } + + return 0; } diff --git a/libcxx/test/std/iterators/stream.iterators/ostreambuf.iterator/ostreambuf.iter.ops/failed.pass.cpp b/libcxx/test/std/iterators/stream.iterators/ostreambuf.iterator/ostreambuf.iter.ops/failed.pass.cpp index b52fce81344d4..fa67513ad6e28 100644 --- a/libcxx/test/std/iterators/stream.iterators/ostreambuf.iterator/ostreambuf.iter.ops/failed.pass.cpp +++ b/libcxx/test/std/iterators/stream.iterators/ostreambuf.iterator/ostreambuf.iter.ops/failed.pass.cpp @@ -25,7 +25,7 @@ struct my_streambuf : public std::basic_streambuf { int_type sputc(char_type) { return Traits::eof(); } }; -int main() +int main(int, char**) { { my_streambuf buf; @@ -39,4 +39,6 @@ int main() i = L'a'; assert(i.failed()); } + + return 0; } diff --git a/libcxx/test/std/iterators/stream.iterators/ostreambuf.iterator/ostreambuf.iter.ops/increment.pass.cpp b/libcxx/test/std/iterators/stream.iterators/ostreambuf.iterator/ostreambuf.iter.ops/increment.pass.cpp index c765a5c2daad0..81ae55ae7a677 100644 --- a/libcxx/test/std/iterators/stream.iterators/ostreambuf.iterator/ostreambuf.iter.ops/increment.pass.cpp +++ b/libcxx/test/std/iterators/stream.iterators/ostreambuf.iterator/ostreambuf.iter.ops/increment.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { { std::ostringstream outf; @@ -35,4 +35,6 @@ int main() std::ostreambuf_iterator& iref2 = i++; assert(&iref2 == &i); } + + return 0; } diff --git a/libcxx/test/std/iterators/stream.iterators/ostreambuf.iterator/types.pass.cpp b/libcxx/test/std/iterators/stream.iterators/ostreambuf.iterator/types.pass.cpp index 346d8b8496f7f..671a09bb7a3fa 100644 --- a/libcxx/test/std/iterators/stream.iterators/ostreambuf.iterator/types.pass.cpp +++ b/libcxx/test/std/iterators/stream.iterators/ostreambuf.iterator/types.pass.cpp @@ -25,7 +25,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { typedef std::ostreambuf_iterator I1; #if TEST_STD_VER <= 14 @@ -58,4 +58,6 @@ int main() static_assert((std::is_same >::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); + + return 0; } diff --git a/libcxx/test/std/language.support/cmp/cmp.common/common_comparison_category.pass.cpp b/libcxx/test/std/language.support/cmp/cmp.common/common_comparison_category.pass.cpp index 4c999637ffbfc..218291b6b49fc 100644 --- a/libcxx/test/std/language.support/cmp/cmp.common/common_comparison_category.pass.cpp +++ b/libcxx/test/std/language.support/cmp/cmp.common/common_comparison_category.pass.cpp @@ -33,7 +33,7 @@ void test_cat() { // [class.spaceship]p4: The 'common comparison type' U of a possibly-empty list // of 'n' types T0, T1, ..., TN, is defined as follows: -int main() { +int main(int, char**) { using WE = std::weak_equality; using SE = std::strong_equality; using PO = std::partial_ordering; @@ -89,4 +89,6 @@ int main() { test_cat(); test_cat(); } + + return 0; } diff --git a/libcxx/test/std/language.support/cmp/cmp.partialord/partialord.pass.cpp b/libcxx/test/std/language.support/cmp/cmp.partialord/partialord.pass.cpp index 6c51b7a208d20..f2e673db696f9 100644 --- a/libcxx/test/std/language.support/cmp/cmp.partialord/partialord.pass.cpp +++ b/libcxx/test/std/language.support/cmp/cmp.partialord/partialord.pass.cpp @@ -155,9 +155,11 @@ constexpr bool test_constexpr() { return true; } -int main() { +int main(int, char**) { test_static_members(); test_signatures(); static_assert(test_conversion(), "conversion test failed"); static_assert(test_constexpr(), "constexpr test failed"); + + return 0; } diff --git a/libcxx/test/std/language.support/cmp/cmp.strongeq/cmp.strongeq.pass.cpp b/libcxx/test/std/language.support/cmp/cmp.strongeq/cmp.strongeq.pass.cpp index e34cadc55ce08..a5af910a5e05b 100644 --- a/libcxx/test/std/language.support/cmp/cmp.strongeq/cmp.strongeq.pass.cpp +++ b/libcxx/test/std/language.support/cmp/cmp.strongeq/cmp.strongeq.pass.cpp @@ -87,9 +87,11 @@ constexpr bool test_constexpr() { return true; } -int main() { +int main(int, char**) { test_static_members(); test_signatures(); test_conversion(); static_assert(test_constexpr(), "constexpr test failed"); + + return 0; } diff --git a/libcxx/test/std/language.support/cmp/cmp.strongord/strongord.pass.cpp b/libcxx/test/std/language.support/cmp/cmp.strongord/strongord.pass.cpp index 4b75e5d51ef22..a31fd34d4f130 100644 --- a/libcxx/test/std/language.support/cmp/cmp.strongord/strongord.pass.cpp +++ b/libcxx/test/std/language.support/cmp/cmp.strongord/strongord.pass.cpp @@ -203,9 +203,11 @@ constexpr bool test_constexpr() { return true; } -int main() { +int main(int, char**) { test_static_members(); test_signatures(); static_assert(test_conversion(), "conversion test failed"); static_assert(test_constexpr(), "constexpr test failed"); + + return 0; } diff --git a/libcxx/test/std/language.support/cmp/cmp.weakeq/cmp.weakeq.pass.cpp b/libcxx/test/std/language.support/cmp/cmp.weakeq/cmp.weakeq.pass.cpp index dae2f21471722..367aac6bebe71 100644 --- a/libcxx/test/std/language.support/cmp/cmp.weakeq/cmp.weakeq.pass.cpp +++ b/libcxx/test/std/language.support/cmp/cmp.weakeq/cmp.weakeq.pass.cpp @@ -62,8 +62,10 @@ constexpr bool test_constexpr() { return true; } -int main() { +int main(int, char**) { test_static_members(); test_signatures(); static_assert(test_constexpr(), "constexpr test failed"); + + return 0; } diff --git a/libcxx/test/std/language.support/cmp/cmp.weakord/weakord.pass.cpp b/libcxx/test/std/language.support/cmp/cmp.weakord/weakord.pass.cpp index 6e9e7d4410601..ada8d240b6d27 100644 --- a/libcxx/test/std/language.support/cmp/cmp.weakord/weakord.pass.cpp +++ b/libcxx/test/std/language.support/cmp/cmp.weakord/weakord.pass.cpp @@ -160,9 +160,11 @@ constexpr bool test_constexpr() { return true; } -int main() { +int main(int, char**) { test_static_members(); test_signatures(); static_assert(test_conversion(), "conversion test failed"); static_assert(test_constexpr(), "constexpr test failed"); + + return 0; } diff --git a/libcxx/test/std/language.support/cstdint/cstdint.syn/cstdint.pass.cpp b/libcxx/test/std/language.support/cstdint/cstdint.syn/cstdint.pass.cpp index 6f46342da94c0..ec4afd7f69dba 100644 --- a/libcxx/test/std/language.support/cstdint/cstdint.syn/cstdint.pass.cpp +++ b/libcxx/test/std/language.support/cstdint/cstdint.syn/cstdint.pass.cpp @@ -18,7 +18,7 @@ #include #include -int main() +int main(int, char**) { // typedef std::int8_t static_assert(sizeof(std::int8_t)*CHAR_BIT == 8, @@ -288,4 +288,6 @@ int main() #ifndef UINTMAX_C #error UINTMAX_C not defined #endif + + return 0; } diff --git a/libcxx/test/std/language.support/nothing_to_do.pass.cpp b/libcxx/test/std/language.support/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/language.support/nothing_to_do.pass.cpp +++ b/libcxx/test/std/language.support/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/language.support/support.dynamic/align_val_t.pass.cpp b/libcxx/test/std/language.support/support.dynamic/align_val_t.pass.cpp index 1b0b4c00baaaa..6e65518233a89 100644 --- a/libcxx/test/std/language.support/support.dynamic/align_val_t.pass.cpp +++ b/libcxx/test/std/language.support/support.dynamic/align_val_t.pass.cpp @@ -14,7 +14,7 @@ #include "test_macros.h" -int main() { +int main(int, char**) { { static_assert(std::is_enum::value, ""); static_assert(std::is_same::type, std::size_t>::value, ""); @@ -30,4 +30,6 @@ int main() { static_assert(b == std::align_val_t(32), ""); static_assert(static_cast(c) == (std::size_t)-1, ""); } + + return 0; } diff --git a/libcxx/test/std/language.support/support.dynamic/alloc.errors/bad.alloc/bad_alloc.pass.cpp b/libcxx/test/std/language.support/support.dynamic/alloc.errors/bad.alloc/bad_alloc.pass.cpp index 713e66245c05b..f0b2bd21fec69 100644 --- a/libcxx/test/std/language.support/support.dynamic/alloc.errors/bad.alloc/bad_alloc.pass.cpp +++ b/libcxx/test/std/language.support/support.dynamic/alloc.errors/bad.alloc/bad_alloc.pass.cpp @@ -12,7 +12,7 @@ #include #include -int main() +int main(int, char**) { static_assert((std::is_base_of::value), "std::is_base_of::value"); @@ -23,4 +23,6 @@ int main() b2 = b; const char* w = b2.what(); assert(w); + + return 0; } diff --git a/libcxx/test/std/language.support/support.dynamic/alloc.errors/new.badlength/bad_array_new_length.pass.cpp b/libcxx/test/std/language.support/support.dynamic/alloc.errors/new.badlength/bad_array_new_length.pass.cpp index d2fefdd1b9419..35fd130412525 100644 --- a/libcxx/test/std/language.support/support.dynamic/alloc.errors/new.badlength/bad_array_new_length.pass.cpp +++ b/libcxx/test/std/language.support/support.dynamic/alloc.errors/new.badlength/bad_array_new_length.pass.cpp @@ -12,7 +12,7 @@ #include #include -int main() +int main(int, char**) { static_assert((std::is_base_of::value), "std::is_base_of::value"); @@ -23,4 +23,6 @@ int main() b2 = b; const char* w = b2.what(); assert(w); + + return 0; } diff --git a/libcxx/test/std/language.support/support.dynamic/alloc.errors/new.handler/new_handler.pass.cpp b/libcxx/test/std/language.support/support.dynamic/alloc.errors/new.handler/new_handler.pass.cpp index f5681d8d92fcf..b69fe15232c0c 100644 --- a/libcxx/test/std/language.support/support.dynamic/alloc.errors/new.handler/new_handler.pass.cpp +++ b/libcxx/test/std/language.support/support.dynamic/alloc.errors/new.handler/new_handler.pass.cpp @@ -14,9 +14,11 @@ void f() {} -int main() +int main(int, char**) { static_assert((std::is_same::value), ""); std::new_handler p = f; assert(p == &f); + + return 0; } diff --git a/libcxx/test/std/language.support/support.dynamic/alloc.errors/nothing_to_do.pass.cpp b/libcxx/test/std/language.support/support.dynamic/alloc.errors/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/language.support/support.dynamic/alloc.errors/nothing_to_do.pass.cpp +++ b/libcxx/test/std/language.support/support.dynamic/alloc.errors/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/language.support/support.dynamic/alloc.errors/set.new.handler/get_new_handler.pass.cpp b/libcxx/test/std/language.support/support.dynamic/alloc.errors/set.new.handler/get_new_handler.pass.cpp index 922ab9db49c41..a9ed3b0cf3687 100644 --- a/libcxx/test/std/language.support/support.dynamic/alloc.errors/set.new.handler/get_new_handler.pass.cpp +++ b/libcxx/test/std/language.support/support.dynamic/alloc.errors/set.new.handler/get_new_handler.pass.cpp @@ -14,11 +14,13 @@ void f1() {} void f2() {} -int main() +int main(int, char**) { assert(std::get_new_handler() == 0); std::set_new_handler(f1); assert(std::get_new_handler() == f1); std::set_new_handler(f2); assert(std::get_new_handler() == f2); + + return 0; } diff --git a/libcxx/test/std/language.support/support.dynamic/alloc.errors/set.new.handler/set_new_handler.pass.cpp b/libcxx/test/std/language.support/support.dynamic/alloc.errors/set.new.handler/set_new_handler.pass.cpp index 37c477f13120d..cff382b0ee31c 100644 --- a/libcxx/test/std/language.support/support.dynamic/alloc.errors/set.new.handler/set_new_handler.pass.cpp +++ b/libcxx/test/std/language.support/support.dynamic/alloc.errors/set.new.handler/set_new_handler.pass.cpp @@ -14,8 +14,10 @@ void f1() {} void f2() {} -int main() +int main(int, char**) { assert(std::set_new_handler(f1) == 0); assert(std::set_new_handler(f2) == f1); + + return 0; } diff --git a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/delete_align_val_t_replace.pass.cpp b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/delete_align_val_t_replace.pass.cpp index de09a75557abe..0a5265861b616 100644 --- a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/delete_align_val_t_replace.pass.cpp +++ b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/delete_align_val_t_replace.pass.cpp @@ -83,7 +83,7 @@ void operator delete [] (void* p, std::align_val_t) TEST_NOEXCEPT struct alignas(OverAligned) A {}; struct alignas(std::max_align_t) B {}; -int main() +int main(int, char**) { reset(); { @@ -113,4 +113,6 @@ int main() assert(0 == unsized_delete_nothrow_called); assert(1 == aligned_delete_called); } + + return 0; } diff --git a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t.pass.cpp b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t.pass.cpp index bd99495e5737b..e303c820847fb 100644 --- a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t.pass.cpp +++ b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t.pass.cpp @@ -90,7 +90,7 @@ void test_throw_max_size() { #endif } -int main() +int main(int, char**) { { A* ap = new A[2]; @@ -103,4 +103,6 @@ int main() { test_throw_max_size(); } + + return 0; } diff --git a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t_nothrow.pass.cpp b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t_nothrow.pass.cpp index a8367876903a0..ed7a53743f0ef 100644 --- a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t_nothrow.pass.cpp +++ b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t_nothrow.pass.cpp @@ -92,7 +92,7 @@ void test_max_alloc() { #endif } -int main() +int main(int, char**) { { A* ap = new(std::nothrow) A[3]; @@ -105,4 +105,6 @@ int main() { test_max_alloc(); } + + return 0; } diff --git a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t_nothrow_replace.pass.cpp b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t_nothrow_replace.pass.cpp index 5fbcc5ce753b5..49aa2bce3ea29 100644 --- a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t_nothrow_replace.pass.cpp +++ b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t_nothrow_replace.pass.cpp @@ -86,7 +86,7 @@ void operator delete[](void* p, std::align_val_t a) TEST_NOEXCEPT --new_called; } -int main() +int main(int, char**) { { A* ap = new (std::nothrow) A[2]; @@ -106,4 +106,6 @@ int main() assert(!new_called); assert(!B_constructed); } + + return 0; } diff --git a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t_replace.pass.cpp b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t_replace.pass.cpp index 40ba48dec53c5..cb9a2ef7f6ca8 100644 --- a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t_replace.pass.cpp +++ b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t_replace.pass.cpp @@ -66,7 +66,7 @@ void operator delete[](void* p, std::align_val_t) TEST_NOEXCEPT } -int main() +int main(int, char**) { { A* ap = new A[3]; @@ -85,4 +85,6 @@ int main() delete [] bp; assert(!new_called); } + + return 0; } diff --git a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_array.pass.cpp b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_array.pass.cpp index 8365b053c5d5e..55dc5c7533403 100644 --- a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_array.pass.cpp +++ b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_array.pass.cpp @@ -34,7 +34,7 @@ struct A ~A() {--A_constructed;} }; -int main() +int main(int, char**) { #ifndef TEST_HAS_NO_EXCEPTIONS std::set_new_handler(my_new_handler); @@ -60,4 +60,6 @@ int main() delete [] ap; DoNotOptimize(ap); assert(A_constructed == 0); + + return 0; } diff --git a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_array_nothrow.pass.cpp b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_array_nothrow.pass.cpp index 3effc7ea3ec0e..b4d8aa3498605 100644 --- a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_array_nothrow.pass.cpp +++ b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_array_nothrow.pass.cpp @@ -34,7 +34,7 @@ struct A ~A() {--A_constructed;} }; -int main() +int main(int, char**) { std::set_new_handler(my_new_handler); #ifndef TEST_HAS_NO_EXCEPTIONS @@ -59,4 +59,6 @@ int main() delete [] ap; DoNotOptimize(ap); assert(A_constructed == 0); + + return 0; } diff --git a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_array_nothrow_replace.pass.cpp b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_array_nothrow_replace.pass.cpp index a28f7f4f15334..4d90aa9a3fe0b 100644 --- a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_array_nothrow_replace.pass.cpp +++ b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_array_nothrow_replace.pass.cpp @@ -43,7 +43,7 @@ struct A ~A() {--A_constructed;} }; -int main() +int main(int, char**) { A *ap = new (std::nothrow) A[3]; DoNotOptimize(ap); @@ -54,4 +54,6 @@ int main() DoNotOptimize(ap); assert(A_constructed == 0); assert(!new_called); + + return 0; } diff --git a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_array_replace.pass.cpp b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_array_replace.pass.cpp index 4ea28241c079d..e705fc3b499f5 100644 --- a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_array_replace.pass.cpp +++ b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_array_replace.pass.cpp @@ -44,7 +44,7 @@ struct A ~A() {--A_constructed;} }; -int main() +int main(int, char**) { A *ap = new A[3]; DoNotOptimize(ap); @@ -55,4 +55,6 @@ int main() DoNotOptimize(ap); assert(A_constructed == 0); assert(new_called == 0); + + return 0; } diff --git a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size.sh.cpp b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size.sh.cpp index 482a27e9cf688..a04ceb6ad42ee 100644 --- a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size.sh.cpp +++ b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size.sh.cpp @@ -19,7 +19,9 @@ #include -int main () +int main(int, char**) { ::operator new[](4); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}} + + return 0; } diff --git a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size_align.sh.cpp b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size_align.sh.cpp index 6183c0c2ce3b1..e2a61591ad2b5 100644 --- a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size_align.sh.cpp +++ b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size_align.sh.cpp @@ -19,7 +19,9 @@ #include -int main () +int main(int, char**) { ::operator new[](4, std::align_val_t{4}); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}} + + return 0; } diff --git a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size_align_nothrow.sh.cpp b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size_align_nothrow.sh.cpp index 1f39219090b5c..5ad81863d4d82 100644 --- a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size_align_nothrow.sh.cpp +++ b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size_align_nothrow.sh.cpp @@ -19,7 +19,9 @@ #include -int main () +int main(int, char**) { ::operator new[](4, std::align_val_t{4}, std::nothrow); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}} + + return 0; } diff --git a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size_nothrow.sh.cpp b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size_nothrow.sh.cpp index 39de421c283be..53af2c764c005 100644 --- a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size_nothrow.sh.cpp +++ b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size_nothrow.sh.cpp @@ -19,7 +19,9 @@ #include -int main () +int main(int, char**) { ::operator new[](4, std::nothrow); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}} + + return 0; } diff --git a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/sized_delete_array11.pass.cpp b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/sized_delete_array11.pass.cpp index 686ef66bab857..e1a545cc98344 100644 --- a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/sized_delete_array11.pass.cpp +++ b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/sized_delete_array11.pass.cpp @@ -54,7 +54,7 @@ void operator delete[](void* p, std::size_t) TEST_NOEXCEPT // selected. struct A { ~A() {} }; -int main() +int main(int, char**) { A* x = new A[3]; @@ -66,4 +66,6 @@ int main() assert(1 == unsized_delete_called); assert(0 == sized_delete_called); assert(0 == unsized_delete_nothrow_called); + + return 0; } diff --git a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/sized_delete_array14.pass.cpp b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/sized_delete_array14.pass.cpp index 773a9b9928d19..d69c28be72b51 100644 --- a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/sized_delete_array14.pass.cpp +++ b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/sized_delete_array14.pass.cpp @@ -59,7 +59,7 @@ void operator delete[](void* p, std::size_t) TEST_NOEXCEPT // selected. struct A { ~A() {} }; -int main() +int main(int, char**) { A* x = new A[3]; assert(0 == unsized_delete_called); @@ -70,4 +70,6 @@ int main() assert(0 == unsized_delete_called); assert(0 == unsized_delete_nothrow_called); assert(1 == sized_delete_called); + + return 0; } diff --git a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/sized_delete_array_calls_unsized_delete_array.pass.cpp b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/sized_delete_array_calls_unsized_delete_array.pass.cpp index 2d845e6010d4e..026250daeee89 100644 --- a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/sized_delete_array_calls_unsized_delete_array.pass.cpp +++ b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/sized_delete_array_calls_unsized_delete_array.pass.cpp @@ -45,7 +45,7 @@ void operator delete[](void* p, const std::nothrow_t&) TEST_NOEXCEPT // selected. struct A { ~A() {} }; -int main() +int main(int, char**) { A *x = new A[3]; DoNotOptimize(x); @@ -56,4 +56,6 @@ int main() DoNotOptimize(x); assert(1 == delete_called); assert(0 == delete_nothrow_called); + + return 0; } diff --git a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/sized_delete_array_fsizeddeallocation.sh.cpp b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/sized_delete_array_fsizeddeallocation.sh.cpp index a077fb7cec603..41739c0ccdc7f 100644 --- a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/sized_delete_array_fsizeddeallocation.sh.cpp +++ b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/sized_delete_array_fsizeddeallocation.sh.cpp @@ -73,7 +73,7 @@ void operator delete[](void* p, std::size_t) TEST_NOEXCEPT // selected. struct A { ~A() {} }; -int main() +int main(int, char**) { A* x = new A[3]; assert(0 == unsized_delete_called); @@ -84,4 +84,6 @@ int main() assert(0 == unsized_delete_called); assert(0 == unsized_delete_nothrow_called); assert(1 == sized_delete_called); + + return 0; } diff --git a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.dataraces/not_testable.pass.cpp b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.dataraces/not_testable.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.dataraces/not_testable.pass.cpp +++ b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.dataraces/not_testable.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.placement/new.pass.cpp b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.placement/new.pass.cpp index 3cd5e12458fb0..8256b93185dfd 100644 --- a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.placement/new.pass.cpp +++ b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.placement/new.pass.cpp @@ -19,11 +19,13 @@ struct A ~A() {--A_constructed;} }; -int main() +int main(int, char**) { char buf[sizeof(A)]; A* ap = new(buf) A; assert((char*)ap == buf); assert(A_constructed == 1); + + return 0; } diff --git a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.placement/new_array.pass.cpp b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.placement/new_array.pass.cpp index 671a3cc050f9d..8a78df6bffb30 100644 --- a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.placement/new_array.pass.cpp +++ b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.placement/new_array.pass.cpp @@ -19,7 +19,7 @@ struct A ~A() {--A_constructed;} }; -int main() +int main(int, char**) { const std::size_t Size = 3; // placement new might require additional space. @@ -30,4 +30,6 @@ int main() assert((char*)ap >= buf); assert((char*)ap < (buf + ExtraSize)); assert(A_constructed == Size); + + return 0; } diff --git a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.placement/new_array_ptr.fail.cpp b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.placement/new_array_ptr.fail.cpp index b7b17e196e88b..4cba717dba805 100644 --- a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.placement/new_array_ptr.fail.cpp +++ b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.placement/new_array_ptr.fail.cpp @@ -18,8 +18,10 @@ #include "test_macros.h" -int main () +int main(int, char**) { char buffer[100]; ::operator new[](4, buffer); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} + + return 0; } diff --git a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.placement/new_ptr.fail.cpp b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.placement/new_ptr.fail.cpp index 7b5eb19d92cac..05a9b244c1e45 100644 --- a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.placement/new_ptr.fail.cpp +++ b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.placement/new_ptr.fail.cpp @@ -18,8 +18,10 @@ #include "test_macros.h" -int main () +int main(int, char**) { char buffer[100]; ::operator new(4, buffer); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} + + return 0; } diff --git a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/delete_align_val_t_replace.pass.cpp b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/delete_align_val_t_replace.pass.cpp index 63e797480b13a..22abcba05220d 100644 --- a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/delete_align_val_t_replace.pass.cpp +++ b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/delete_align_val_t_replace.pass.cpp @@ -82,7 +82,7 @@ void operator delete(void* p, std::align_val_t) TEST_NOEXCEPT struct alignas(OverAligned) A {}; struct alignas(std::max_align_t) B {}; -int main() +int main(int, char**) { reset(); { @@ -112,4 +112,6 @@ int main() assert(0 == unsized_delete_nothrow_called); assert(1 == aligned_delete_called); } + + return 0; } diff --git a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new.pass.cpp b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new.pass.cpp index 3c73738d6fd83..448da1717900e 100644 --- a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new.pass.cpp +++ b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new.pass.cpp @@ -34,7 +34,7 @@ struct A ~A() {A_constructed = false;} }; -int main() +int main(int, char**) { #ifndef TEST_HAS_NO_EXCEPTIONS std::set_new_handler(my_new_handler); @@ -58,4 +58,6 @@ int main() assert(A_constructed); delete ap; assert(!A_constructed); + + return 0; } diff --git a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t.pass.cpp b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t.pass.cpp index d0d4b98aee46b..0d96db5de485d 100644 --- a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t.pass.cpp +++ b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t.pass.cpp @@ -90,7 +90,7 @@ void test_throw_max_size() { #endif } -int main() +int main(int, char**) { { A* ap = new A; @@ -103,4 +103,6 @@ int main() { test_throw_max_size(); } + + return 0; } diff --git a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t_nothrow.pass.cpp b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t_nothrow.pass.cpp index d0990c0586b47..4b621f78a726a 100644 --- a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t_nothrow.pass.cpp +++ b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t_nothrow.pass.cpp @@ -92,7 +92,7 @@ void test_max_alloc() { #endif } -int main() +int main(int, char**) { { A* ap = new(std::nothrow) A; @@ -105,4 +105,6 @@ int main() { test_max_alloc(); } + + return 0; } diff --git a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t_nothrow_replace.pass.cpp b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t_nothrow_replace.pass.cpp index fa8dc13cf6496..892eac2058265 100644 --- a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t_nothrow_replace.pass.cpp +++ b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t_nothrow_replace.pass.cpp @@ -88,7 +88,7 @@ void operator delete(void* p, std::align_val_t a) TEST_NOEXCEPT } -int main() +int main(int, char**) { { A* ap = new (std::nothrow) A; @@ -108,4 +108,6 @@ int main() assert(!new_called); assert(!B_constructed); } + + return 0; } diff --git a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t_replace.pass.cpp b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t_replace.pass.cpp index d37ca28f03b23..32c27d5899ec9 100644 --- a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t_replace.pass.cpp +++ b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t_replace.pass.cpp @@ -66,7 +66,7 @@ void operator delete(void* p, std::align_val_t) TEST_NOEXCEPT } -int main() +int main(int, char**) { { A* ap = new A; @@ -85,4 +85,6 @@ int main() delete bp; assert(!new_called); } + + return 0; } diff --git a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_nothrow.pass.cpp b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_nothrow.pass.cpp index 6d391645f112c..dfdf7d77e8016 100644 --- a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_nothrow.pass.cpp +++ b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_nothrow.pass.cpp @@ -34,7 +34,7 @@ struct A ~A() {A_constructed = false;} }; -int main() +int main(int, char**) { std::set_new_handler(my_new_handler); #ifndef TEST_HAS_NO_EXCEPTIONS @@ -56,4 +56,6 @@ int main() assert(A_constructed); delete ap; assert(!A_constructed); + + return 0; } diff --git a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_nothrow_replace.pass.cpp b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_nothrow_replace.pass.cpp index b4217525fe660..1f186d8b3d174 100644 --- a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_nothrow_replace.pass.cpp +++ b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_nothrow_replace.pass.cpp @@ -43,7 +43,7 @@ struct A ~A() {A_constructed = false;} }; -int main() +int main(int, char**) { A *ap = new (std::nothrow) A; DoNotOptimize(ap); @@ -54,4 +54,6 @@ int main() DoNotOptimize(ap); assert(!A_constructed); assert(!new_called); + + return 0; } diff --git a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_replace.pass.cpp b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_replace.pass.cpp index 300843b2fa015..4854c2fb77619 100644 --- a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_replace.pass.cpp +++ b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_replace.pass.cpp @@ -42,7 +42,7 @@ struct A ~A() {A_constructed = false;} }; -int main() +int main(int, char**) { A *ap = new A; DoNotOptimize(ap); @@ -53,4 +53,6 @@ int main() DoNotOptimize(ap); assert(!A_constructed); assert(!new_called); + + return 0; } diff --git a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_size.fail.cpp b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_size.fail.cpp index 5042a8d1e497e..4769933d399a1 100644 --- a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_size.fail.cpp +++ b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_size.fail.cpp @@ -18,7 +18,9 @@ #include "test_macros.h" -int main () +int main(int, char**) { ::operator new(4); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} + + return 0; } diff --git a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_size_align.sh.cpp b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_size_align.sh.cpp index e22ea0fdd20fe..a0d99c76d0723 100644 --- a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_size_align.sh.cpp +++ b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_size_align.sh.cpp @@ -19,7 +19,9 @@ #include -int main () +int main(int, char**) { ::operator new(4, std::align_val_t{4}); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}} + + return 0; } diff --git a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_size_align_nothrow.sh.cpp b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_size_align_nothrow.sh.cpp index 617eeae3cfd0a..54b25ac5589ac 100644 --- a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_size_align_nothrow.sh.cpp +++ b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_size_align_nothrow.sh.cpp @@ -19,7 +19,9 @@ #include -int main () +int main(int, char**) { ::operator new(4, std::align_val_t{4}, std::nothrow); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}} + + return 0; } diff --git a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_size_nothrow.fail.cpp b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_size_nothrow.fail.cpp index dd51ad54af930..a0bfa8b7f921f 100644 --- a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_size_nothrow.fail.cpp +++ b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_size_nothrow.fail.cpp @@ -18,7 +18,9 @@ #include "test_macros.h" -int main () +int main(int, char**) { ::operator new(4, std::nothrow); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} + + return 0; } diff --git a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/sized_delete11.pass.cpp b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/sized_delete11.pass.cpp index 779d7b2acfe70..69f8bce276715 100644 --- a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/sized_delete11.pass.cpp +++ b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/sized_delete11.pass.cpp @@ -43,7 +43,7 @@ void operator delete(void* p, std::size_t) TEST_NOEXCEPT std::free(p); } -int main() +int main(int, char**) { int *x = new int(42); DoNotOptimize(x); @@ -56,4 +56,6 @@ int main() assert(1 == unsized_delete_called); assert(0 == sized_delete_called); assert(0 == unsized_delete_nothrow_called); + + return 0; } diff --git a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/sized_delete14.pass.cpp b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/sized_delete14.pass.cpp index bed5cc2323a0b..deb17d1ae7412 100644 --- a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/sized_delete14.pass.cpp +++ b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/sized_delete14.pass.cpp @@ -48,7 +48,7 @@ void operator delete(void* p, std::size_t) TEST_NOEXCEPT std::free(p); } -int main() +int main(int, char**) { int *x = new int(42); DoNotOptimize(x); @@ -61,4 +61,6 @@ int main() assert(0 == unsized_delete_called); assert(1 == sized_delete_called); assert(0 == unsized_delete_nothrow_called); + + return 0; } diff --git a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/sized_delete_calls_unsized_delete.pass.cpp b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/sized_delete_calls_unsized_delete.pass.cpp index 9c54750bde17c..fbc9cf070bcba 100644 --- a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/sized_delete_calls_unsized_delete.pass.cpp +++ b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/sized_delete_calls_unsized_delete.pass.cpp @@ -34,7 +34,7 @@ void operator delete(void* p, const std::nothrow_t&) TEST_NOEXCEPT std::free(p); } -int main() +int main(int, char**) { int *x = new int(42); DoNotOptimize(x); @@ -45,4 +45,6 @@ int main() DoNotOptimize(x); assert(1 == delete_called); assert(0 == delete_nothrow_called); + + return 0; } diff --git a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/sized_delete_fsizeddeallocation.sh.cpp b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/sized_delete_fsizeddeallocation.sh.cpp index be208b43165d8..3d62040cbe81d 100644 --- a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/sized_delete_fsizeddeallocation.sh.cpp +++ b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/sized_delete_fsizeddeallocation.sh.cpp @@ -61,7 +61,7 @@ void operator delete(void* p, std::size_t) TEST_NOEXCEPT std::free(p); } -int main() +int main(int, char**) { int *x = new int(42); DoNotOptimize(x); @@ -74,4 +74,6 @@ int main() assert(1 == sized_delete_called); assert(0 == unsized_delete_called); assert(0 == unsized_delete_nothrow_called); + + return 0; } diff --git a/libcxx/test/std/language.support/support.dynamic/new.delete/nothing_to_do.pass.cpp b/libcxx/test/std/language.support/support.dynamic/new.delete/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/language.support/support.dynamic/new.delete/nothing_to_do.pass.cpp +++ b/libcxx/test/std/language.support/support.dynamic/new.delete/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/language.support/support.dynamic/ptr.launder/launder.nodiscard.fail.cpp b/libcxx/test/std/language.support/support.dynamic/ptr.launder/launder.nodiscard.fail.cpp index 3f105410bad6c..e7252395d3531 100644 --- a/libcxx/test/std/language.support/support.dynamic/ptr.launder/launder.nodiscard.fail.cpp +++ b/libcxx/test/std/language.support/support.dynamic/ptr.launder/launder.nodiscard.fail.cpp @@ -19,8 +19,10 @@ #include "test_macros.h" -int main () +int main(int, char**) { int *p = nullptr; std::launder(p); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} + + return 0; } diff --git a/libcxx/test/std/language.support/support.dynamic/ptr.launder/launder.pass.cpp b/libcxx/test/std/language.support/support.dynamic/ptr.launder/launder.pass.cpp index c3d2271834fa8..f9d4da37146f3 100644 --- a/libcxx/test/std/language.support/support.dynamic/ptr.launder/launder.pass.cpp +++ b/libcxx/test/std/language.support/support.dynamic/ptr.launder/launder.pass.cpp @@ -20,7 +20,7 @@ constexpr int gi = 5; constexpr float gf = 8.f; -int main() { +int main(int, char**) { static_assert(std::launder(&gi) == &gi, "" ); static_assert(std::launder(&gf) == &gf, "" ); @@ -31,4 +31,6 @@ int main() { assert(std::launder(i) == i); assert(std::launder(f) == f); + + return 0; } diff --git a/libcxx/test/std/language.support/support.dynamic/ptr.launder/launder.types.fail.cpp b/libcxx/test/std/language.support/support.dynamic/ptr.launder/launder.types.fail.cpp index f8fd12f1cda48..d97d00194e2c5 100644 --- a/libcxx/test/std/language.support/support.dynamic/ptr.launder/launder.types.fail.cpp +++ b/libcxx/test/std/language.support/support.dynamic/ptr.launder/launder.types.fail.cpp @@ -21,7 +21,7 @@ void foo() {} -int main () +int main(int, char**) { void *p = nullptr; (void) std::launder(( void *) nullptr); @@ -32,4 +32,6 @@ int main () (void) std::launder(foo); // expected-error-re@new:* 1 {{static_assert failed{{.*}} "can't launder functions"}} // expected-error@new:* 0-1 {{function pointer argument to '__builtin_launder' is not allowed}} + + return 0; } diff --git a/libcxx/test/std/language.support/support.exception/bad.exception/bad_exception.pass.cpp b/libcxx/test/std/language.support/support.exception/bad.exception/bad_exception.pass.cpp index c4e1cc7a1abc7..e5f4fbe6dcf9c 100644 --- a/libcxx/test/std/language.support/support.exception/bad.exception/bad_exception.pass.cpp +++ b/libcxx/test/std/language.support/support.exception/bad.exception/bad_exception.pass.cpp @@ -12,7 +12,7 @@ #include #include -int main() +int main(int, char**) { static_assert((std::is_base_of::value), "std::is_base_of::value"); @@ -23,4 +23,6 @@ int main() b2 = b; const char* w = b2.what(); assert(w); + + return 0; } diff --git a/libcxx/test/std/language.support/support.exception/except.nested/assign.pass.cpp b/libcxx/test/std/language.support/support.exception/except.nested/assign.pass.cpp index c03f4bbfd4fba..972649579b1e8 100644 --- a/libcxx/test/std/language.support/support.exception/except.nested/assign.pass.cpp +++ b/libcxx/test/std/language.support/support.exception/except.nested/assign.pass.cpp @@ -26,7 +26,7 @@ class A friend bool operator==(const A& x, const A& y) {return x.data_ == y.data_;} }; -int main() +int main(int, char**) { { std::nested_exception e0; @@ -59,4 +59,6 @@ int main() } } #endif + + return 0; } diff --git a/libcxx/test/std/language.support/support.exception/except.nested/ctor_copy.pass.cpp b/libcxx/test/std/language.support/support.exception/except.nested/ctor_copy.pass.cpp index cc8c998562284..9d65f5fb22bdb 100644 --- a/libcxx/test/std/language.support/support.exception/except.nested/ctor_copy.pass.cpp +++ b/libcxx/test/std/language.support/support.exception/except.nested/ctor_copy.pass.cpp @@ -26,7 +26,7 @@ class A friend bool operator==(const A& x, const A& y) {return x.data_ == y.data_;} }; -int main() +int main(int, char**) { { std::nested_exception e0; @@ -57,4 +57,6 @@ int main() } } #endif + + return 0; } diff --git a/libcxx/test/std/language.support/support.exception/except.nested/ctor_default.pass.cpp b/libcxx/test/std/language.support/support.exception/except.nested/ctor_default.pass.cpp index 5aa762cf7cab6..a96c3d015a18a 100644 --- a/libcxx/test/std/language.support/support.exception/except.nested/ctor_default.pass.cpp +++ b/libcxx/test/std/language.support/support.exception/except.nested/ctor_default.pass.cpp @@ -26,7 +26,7 @@ class A friend bool operator==(const A& x, const A& y) {return x.data_ == y.data_;} }; -int main() +int main(int, char**) { { std::nested_exception e; @@ -55,4 +55,6 @@ int main() } } #endif + + return 0; } diff --git a/libcxx/test/std/language.support/support.exception/except.nested/rethrow_if_nested.pass.cpp b/libcxx/test/std/language.support/support.exception/except.nested/rethrow_if_nested.pass.cpp index 426ea55bff939..01ef7ade7c2b6 100644 --- a/libcxx/test/std/language.support/support.exception/except.nested/rethrow_if_nested.pass.cpp +++ b/libcxx/test/std/language.support/support.exception/except.nested/rethrow_if_nested.pass.cpp @@ -56,7 +56,7 @@ class E1 : public std::nested_exception {}; class E2 : public std::nested_exception {}; class E : public E1, public E2 {}; -int main() +int main(int, char**) { { try @@ -131,4 +131,6 @@ int main() } } + + return 0; } diff --git a/libcxx/test/std/language.support/support.exception/except.nested/rethrow_nested.pass.cpp b/libcxx/test/std/language.support/support.exception/except.nested/rethrow_nested.pass.cpp index ba81b8fe3af91..204c3b567e70c 100644 --- a/libcxx/test/std/language.support/support.exception/except.nested/rethrow_nested.pass.cpp +++ b/libcxx/test/std/language.support/support.exception/except.nested/rethrow_nested.pass.cpp @@ -31,7 +31,7 @@ void go_quietly() std::exit(0); } -int main() +int main(int, char**) { { try @@ -67,4 +67,6 @@ int main() assert(false); } } + + return 0; } diff --git a/libcxx/test/std/language.support/support.exception/except.nested/throw_with_nested.pass.cpp b/libcxx/test/std/language.support/support.exception/except.nested/throw_with_nested.pass.cpp index c0bc423b01b1d..b63053c3304f5 100644 --- a/libcxx/test/std/language.support/support.exception/except.nested/throw_with_nested.pass.cpp +++ b/libcxx/test/std/language.support/support.exception/except.nested/throw_with_nested.pass.cpp @@ -42,7 +42,7 @@ class B struct Final final {}; #endif -int main() +int main(int, char**) { { try @@ -128,4 +128,6 @@ int main() } } #endif + + return 0; } diff --git a/libcxx/test/std/language.support/support.exception/exception.terminate/nothing_to_do.pass.cpp b/libcxx/test/std/language.support/support.exception/exception.terminate/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/language.support/support.exception/exception.terminate/nothing_to_do.pass.cpp +++ b/libcxx/test/std/language.support/support.exception/exception.terminate/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/language.support/support.exception/exception.terminate/set.terminate/get_terminate.pass.cpp b/libcxx/test/std/language.support/support.exception/exception.terminate/set.terminate/get_terminate.pass.cpp index 2ec624ba6545f..851d93bc0c8ae 100644 --- a/libcxx/test/std/language.support/support.exception/exception.terminate/set.terminate/get_terminate.pass.cpp +++ b/libcxx/test/std/language.support/support.exception/exception.terminate/set.terminate/get_terminate.pass.cpp @@ -15,10 +15,12 @@ void f1() {} void f2() {} -int main() +int main(int, char**) { std::set_terminate(f1); assert(std::get_terminate() == f1); std::set_terminate(f2); assert(std::get_terminate() == f2); + + return 0; } diff --git a/libcxx/test/std/language.support/support.exception/exception.terminate/set.terminate/set_terminate.pass.cpp b/libcxx/test/std/language.support/support.exception/exception.terminate/set.terminate/set_terminate.pass.cpp index 9eae3a45edfbf..e4464b9afc1a7 100644 --- a/libcxx/test/std/language.support/support.exception/exception.terminate/set.terminate/set_terminate.pass.cpp +++ b/libcxx/test/std/language.support/support.exception/exception.terminate/set.terminate/set_terminate.pass.cpp @@ -15,8 +15,10 @@ void f1() {} void f2() {} -int main() +int main(int, char**) { std::set_terminate(f1); assert(std::set_terminate(f2) == f1); + + return 0; } diff --git a/libcxx/test/std/language.support/support.exception/exception.terminate/terminate.handler/terminate_handler.pass.cpp b/libcxx/test/std/language.support/support.exception/exception.terminate/terminate.handler/terminate_handler.pass.cpp index 8f889beee8f58..2519f0bc9cebf 100644 --- a/libcxx/test/std/language.support/support.exception/exception.terminate/terminate.handler/terminate_handler.pass.cpp +++ b/libcxx/test/std/language.support/support.exception/exception.terminate/terminate.handler/terminate_handler.pass.cpp @@ -14,9 +14,11 @@ void f() {} -int main() +int main(int, char**) { static_assert((std::is_same::value), ""); std::terminate_handler p = f; assert(p == &f); + + return 0; } diff --git a/libcxx/test/std/language.support/support.exception/exception.terminate/terminate/terminate.pass.cpp b/libcxx/test/std/language.support/support.exception/exception.terminate/terminate/terminate.pass.cpp index 431ad8bf943b7..4243fb5cadf05 100644 --- a/libcxx/test/std/language.support/support.exception/exception.terminate/terminate/terminate.pass.cpp +++ b/libcxx/test/std/language.support/support.exception/exception.terminate/terminate/terminate.pass.cpp @@ -17,9 +17,11 @@ void f1() std::exit(0); } -int main() +int main(int, char**) { std::set_terminate(f1); std::terminate(); assert(false); + + return 0; } diff --git a/libcxx/test/std/language.support/support.exception/exception/exception.pass.cpp b/libcxx/test/std/language.support/support.exception/exception/exception.pass.cpp index bfb27418f531f..893a7d5b36314 100644 --- a/libcxx/test/std/language.support/support.exception/exception/exception.pass.cpp +++ b/libcxx/test/std/language.support/support.exception/exception/exception.pass.cpp @@ -12,7 +12,7 @@ #include #include -int main() +int main(int, char**) { static_assert(std::is_polymorphic::value, "std::is_polymorphic::value"); @@ -21,4 +21,6 @@ int main() b2 = b; const char* w = b2.what(); assert(w); + + return 0; } diff --git a/libcxx/test/std/language.support/support.exception/propagation/current_exception.pass.cpp b/libcxx/test/std/language.support/support.exception/propagation/current_exception.pass.cpp index 3c265d8bb887d..c95368163d41e 100644 --- a/libcxx/test/std/language.support/support.exception/propagation/current_exception.pass.cpp +++ b/libcxx/test/std/language.support/support.exception/propagation/current_exception.pass.cpp @@ -29,7 +29,7 @@ struct A int A::constructed = 0; -int main() +int main(int, char**) { { std::exception_ptr p = std::current_exception(); @@ -270,4 +270,6 @@ int main() assert(p != nullptr); } assert(A::constructed == 0); + + return 0; } diff --git a/libcxx/test/std/language.support/support.exception/propagation/exception_ptr.pass.cpp b/libcxx/test/std/language.support/support.exception/propagation/exception_ptr.pass.cpp index 39f2d6014dcd2..164e7774be9e3 100644 --- a/libcxx/test/std/language.support/support.exception/propagation/exception_ptr.pass.cpp +++ b/libcxx/test/std/language.support/support.exception/propagation/exception_ptr.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { std::exception_ptr p; assert(p == nullptr); @@ -30,4 +30,6 @@ int main() assert(p3 == nullptr); p3 = nullptr; assert(p3 == nullptr); + + return 0; } diff --git a/libcxx/test/std/language.support/support.exception/propagation/make_exception_ptr.pass.cpp b/libcxx/test/std/language.support/support.exception/propagation/make_exception_ptr.pass.cpp index 3db951d281f37..b26212fd136b4 100644 --- a/libcxx/test/std/language.support/support.exception/propagation/make_exception_ptr.pass.cpp +++ b/libcxx/test/std/language.support/support.exception/propagation/make_exception_ptr.pass.cpp @@ -26,7 +26,7 @@ struct A int A::constructed = 0; -int main() +int main(int, char**) { { std::exception_ptr p = std::make_exception_ptr(A(5)); @@ -52,4 +52,6 @@ int main() assert(A::constructed == 0); } assert(A::constructed == 0); + + return 0; } diff --git a/libcxx/test/std/language.support/support.exception/propagation/rethrow_exception.pass.cpp b/libcxx/test/std/language.support/support.exception/propagation/rethrow_exception.pass.cpp index ab2df72e8e83f..015dbef224f7d 100644 --- a/libcxx/test/std/language.support/support.exception/propagation/rethrow_exception.pass.cpp +++ b/libcxx/test/std/language.support/support.exception/propagation/rethrow_exception.pass.cpp @@ -26,7 +26,7 @@ struct A int A::constructed = 0; -int main() +int main(int, char**) { { std::exception_ptr p; @@ -60,4 +60,6 @@ int main() assert(A::constructed == 0); } assert(A::constructed == 0); + + return 0; } diff --git a/libcxx/test/std/language.support/support.exception/uncaught/uncaught_exception.pass.cpp b/libcxx/test/std/language.support/support.exception/uncaught/uncaught_exception.pass.cpp index 29087eb153f96..61cfc8f11c107 100644 --- a/libcxx/test/std/language.support/support.exception/uncaught/uncaught_exception.pass.cpp +++ b/libcxx/test/std/language.support/support.exception/uncaught/uncaught_exception.pass.cpp @@ -29,7 +29,7 @@ struct B } }; -int main() +int main(int, char**) { try { @@ -42,4 +42,6 @@ int main() assert(!std::uncaught_exception()); } assert(!std::uncaught_exception()); + + return 0; } diff --git a/libcxx/test/std/language.support/support.exception/uncaught/uncaught_exceptions.pass.cpp b/libcxx/test/std/language.support/support.exception/uncaught/uncaught_exceptions.pass.cpp index bab33d837e5fd..c25e4d2e069ff 100644 --- a/libcxx/test/std/language.support/support.exception/uncaught/uncaught_exceptions.pass.cpp +++ b/libcxx/test/std/language.support/support.exception/uncaught/uncaught_exceptions.pass.cpp @@ -41,7 +41,7 @@ struct Outer { int d_; }; -int main () { +int main(int, char**) { assert(std::uncaught_exceptions() == 0); { Outer o(0); @@ -58,4 +58,6 @@ int main () { } } assert(std::uncaught_exceptions() == 0); + + return 0; } diff --git a/libcxx/test/std/language.support/support.general/nothing_to_do.pass.cpp b/libcxx/test/std/language.support/support.general/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/language.support/support.general/nothing_to_do.pass.cpp +++ b/libcxx/test/std/language.support/support.general/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/language.support/support.initlist/include_cxx03.pass.cpp b/libcxx/test/std/language.support/support.initlist/include_cxx03.pass.cpp index 343da95f40671..282636ed05b81 100644 --- a/libcxx/test/std/language.support/support.initlist/include_cxx03.pass.cpp +++ b/libcxx/test/std/language.support/support.initlist/include_cxx03.pass.cpp @@ -12,6 +12,8 @@ #include -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/language.support/support.initlist/support.initlist.access/access.pass.cpp b/libcxx/test/std/language.support/support.initlist/support.initlist.access/access.pass.cpp index ff532fbf26729..097f21a5c6977 100644 --- a/libcxx/test/std/language.support/support.initlist/support.initlist.access/access.pass.cpp +++ b/libcxx/test/std/language.support/support.initlist/support.initlist.access/access.pass.cpp @@ -51,11 +51,13 @@ struct B #endif // TEST_STD_VER > 11 -int main() +int main(int, char**) { A test1 = {3, 2, 1}; #if TEST_STD_VER > 11 constexpr B test2 = {3, 2, 1}; (void)test2; #endif // TEST_STD_VER > 11 + + return 0; } diff --git a/libcxx/test/std/language.support/support.initlist/support.initlist.cons/default.pass.cpp b/libcxx/test/std/language.support/support.initlist/support.initlist.cons/default.pass.cpp index dc5c5ffd47aed..8d2e0a7e71382 100644 --- a/libcxx/test/std/language.support/support.initlist/support.initlist.cons/default.pass.cpp +++ b/libcxx/test/std/language.support/support.initlist/support.initlist.cons/default.pass.cpp @@ -19,7 +19,7 @@ struct A {}; -int main() +int main(int, char**) { std::initializer_list il; assert(il.size() == 0); @@ -28,4 +28,6 @@ int main() constexpr std::initializer_list il2; static_assert(il2.size() == 0, ""); #endif // TEST_STD_VER > 11 + + return 0; } diff --git a/libcxx/test/std/language.support/support.initlist/support.initlist.range/begin_end.pass.cpp b/libcxx/test/std/language.support/support.initlist/support.initlist.range/begin_end.pass.cpp index 61bf270844104..ec755bfeb9856 100644 --- a/libcxx/test/std/language.support/support.initlist/support.initlist.range/begin_end.pass.cpp +++ b/libcxx/test/std/language.support/support.initlist/support.initlist.range/begin_end.pass.cpp @@ -49,11 +49,13 @@ struct B #endif // TEST_STD_VER > 11 -int main() +int main(int, char**) { A test1 = {3, 2, 1}; #if TEST_STD_VER > 11 constexpr B test2 = {3, 2, 1}; (void)test2; #endif // TEST_STD_VER > 11 + + return 0; } diff --git a/libcxx/test/std/language.support/support.initlist/types.pass.cpp b/libcxx/test/std/language.support/support.initlist/types.pass.cpp index 9aad9b3f757c2..1b48980a2402d 100644 --- a/libcxx/test/std/language.support/support.initlist/types.pass.cpp +++ b/libcxx/test/std/language.support/support.initlist/types.pass.cpp @@ -25,7 +25,7 @@ struct A {}; -int main() +int main(int, char**) { static_assert((std::is_same::value_type, A>::value), ""); static_assert((std::is_same::reference, const A&>::value), ""); @@ -33,4 +33,6 @@ int main() static_assert((std::is_same::size_type, std::size_t>::value), ""); static_assert((std::is_same::iterator, const A*>::value), ""); static_assert((std::is_same::const_iterator, const A*>::value), ""); + + return 0; } diff --git a/libcxx/test/std/language.support/support.limits/c.limits/cfloat.pass.cpp b/libcxx/test/std/language.support/support.limits/c.limits/cfloat.pass.cpp index ec144a03177cf..12b80adf01169 100644 --- a/libcxx/test/std/language.support/support.limits/c.limits/cfloat.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/c.limits/cfloat.pass.cpp @@ -178,6 +178,8 @@ #endif #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/language.support/support.limits/c.limits/climits.pass.cpp b/libcxx/test/std/language.support/support.limits/c.limits/climits.pass.cpp index 317d5d5094f4f..d124f7ca28d40 100644 --- a/libcxx/test/std/language.support/support.limits/c.limits/climits.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/c.limits/climits.pass.cpp @@ -86,6 +86,8 @@ #error ULLONG_MAX not defined #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/language.support/support.limits/limits/denorm.style/check_values.pass.cpp b/libcxx/test/std/language.support/support.limits/limits/denorm.style/check_values.pass.cpp index 6b48dfbc3795e..adbd102dc2038 100644 --- a/libcxx/test/std/language.support/support.limits/limits/denorm.style/check_values.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/limits/denorm.style/check_values.pass.cpp @@ -18,7 +18,7 @@ struct two {one _[2];}; one test(std::float_round_style); two test(int); -int main() +int main(int, char**) { static_assert(std::round_indeterminate == -1, "std::round_indeterminate == -1"); @@ -34,4 +34,6 @@ int main() "sizeof(test(std::round_to_nearest)) == 1"); static_assert(sizeof(test(1)) == 2, "sizeof(test(1)) == 2"); + + return 0; } diff --git a/libcxx/test/std/language.support/support.limits/limits/is_specialized.pass.cpp b/libcxx/test/std/language.support/support.limits/limits/is_specialized.pass.cpp index 4959d5f54b9d6..b836555afc75b 100644 --- a/libcxx/test/std/language.support/support.limits/limits/is_specialized.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/limits/is_specialized.pass.cpp @@ -39,7 +39,7 @@ void test() "std::numeric_limits::is_specialized"); } -int main() +int main(int, char**) { test(); test(); @@ -67,4 +67,6 @@ int main() test(); static_assert(!std::numeric_limits >::is_specialized, "!std::numeric_limits >::is_specialized"); + + return 0; } diff --git a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/const_data_members.pass.cpp b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/const_data_members.pass.cpp index 012a9a8eef334..b5912130a8db5 100644 --- a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/const_data_members.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/const_data_members.pass.cpp @@ -68,7 +68,7 @@ void test(const T &) {} struct other {}; -int main() +int main(int, char**) { // bool TEST_NUMERIC_LIMITS(bool) @@ -205,4 +205,6 @@ int main() TEST_NUMERIC_LIMITS(const other) TEST_NUMERIC_LIMITS(volatile other) TEST_NUMERIC_LIMITS(const volatile other) + + return 0; } diff --git a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/denorm_min.pass.cpp b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/denorm_min.pass.cpp index d67e8cbaba73b..4f9f62873aa13 100644 --- a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/denorm_min.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/denorm_min.pass.cpp @@ -26,7 +26,7 @@ test(T expected) assert(std::numeric_limits::denorm_min() == expected); } -int main() +int main(int, char**) { test(false); test(0); @@ -65,4 +65,6 @@ int main() #if !defined(__FLT_DENORM_MIN__) && !defined(FLT_TRUE_MIN) #error Test has no expected values for floating point types #endif + + return 0; } diff --git a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/digits.pass.cpp b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/digits.pass.cpp index de9aa3395d6fe..139f4821dc832 100644 --- a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/digits.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/digits.pass.cpp @@ -25,7 +25,7 @@ test() static_assert(std::numeric_limits::digits == expected, "digits test 4"); } -int main() +int main(int, char**) { test(); test::is_signed ? 7 : 8>(); @@ -54,4 +54,6 @@ int main() test(); test(); test(); + + return 0; } diff --git a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/digits10.pass.cpp b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/digits10.pass.cpp index 9c2fcfb179752..efdfd70d79ccd 100644 --- a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/digits10.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/digits10.pass.cpp @@ -29,7 +29,7 @@ test() static_assert(std::numeric_limits::is_bounded, "digits10 test 8"); } -int main() +int main(int, char**) { test(); test(); @@ -58,4 +58,6 @@ int main() test(); test(); test(); + + return 0; } diff --git a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/epsilon.pass.cpp b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/epsilon.pass.cpp index 691bd5b2765c3..60a905f79bb6f 100644 --- a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/epsilon.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/epsilon.pass.cpp @@ -26,7 +26,7 @@ test(T expected) assert(std::numeric_limits::epsilon() == expected); } -int main() +int main(int, char**) { test(false); test(0); @@ -55,4 +55,6 @@ int main() test(FLT_EPSILON); test(DBL_EPSILON); test(LDBL_EPSILON); + + return 0; } diff --git a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/has_denorm.pass.cpp b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/has_denorm.pass.cpp index 05469f08c9631..d5380c1a76391 100644 --- a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/has_denorm.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/has_denorm.pass.cpp @@ -24,7 +24,7 @@ test() static_assert(std::numeric_limits::has_denorm == expected, "has_denorm test 4"); } -int main() +int main(int, char**) { test(); test(); @@ -53,4 +53,6 @@ int main() test(); test(); test(); + + return 0; } diff --git a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/has_denorm_loss.pass.cpp b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/has_denorm_loss.pass.cpp index 89bc78a48c239..77e5de6ab8357 100644 --- a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/has_denorm_loss.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/has_denorm_loss.pass.cpp @@ -24,7 +24,7 @@ test() static_assert(std::numeric_limits::has_denorm_loss == expected, "has_denorm_loss test 4"); } -int main() +int main(int, char**) { test(); test(); @@ -53,4 +53,6 @@ int main() test(); test(); test(); + + return 0; } diff --git a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/has_infinity.pass.cpp b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/has_infinity.pass.cpp index abdd9b544eec3..19d4fe29312e8 100644 --- a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/has_infinity.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/has_infinity.pass.cpp @@ -24,7 +24,7 @@ test() static_assert(std::numeric_limits::has_infinity == expected, "has_infinity test 4"); } -int main() +int main(int, char**) { test(); test(); @@ -53,4 +53,6 @@ int main() test(); test(); test(); + + return 0; } diff --git a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/has_quiet_NaN.pass.cpp b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/has_quiet_NaN.pass.cpp index a351bcef094c9..767df5ac27b4b 100644 --- a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/has_quiet_NaN.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/has_quiet_NaN.pass.cpp @@ -24,7 +24,7 @@ test() static_assert(std::numeric_limits::has_quiet_NaN == expected, "has_quiet_NaN test 4"); } -int main() +int main(int, char**) { test(); test(); @@ -53,4 +53,6 @@ int main() test(); test(); test(); + + return 0; } diff --git a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/has_signaling_NaN.pass.cpp b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/has_signaling_NaN.pass.cpp index bc74464e78811..0908c49bc16eb 100644 --- a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/has_signaling_NaN.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/has_signaling_NaN.pass.cpp @@ -24,7 +24,7 @@ test() static_assert(std::numeric_limits::has_signaling_NaN == expected, "has_signaling_NaN test 4"); } -int main() +int main(int, char**) { test(); test(); @@ -53,4 +53,6 @@ int main() test(); test(); test(); + + return 0; } diff --git a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/infinity.pass.cpp b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/infinity.pass.cpp index 924f32a6b262e..0004e4e6282c4 100644 --- a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/infinity.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/infinity.pass.cpp @@ -28,7 +28,7 @@ test(T expected) extern float zero; -int main() +int main(int, char**) { test(false); test(0); @@ -57,6 +57,8 @@ int main() test(1.f/zero); test(1./zero); test(1./zero); + + return 0; } float zero = 0; diff --git a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/is_bounded.pass.cpp b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/is_bounded.pass.cpp index 8f2cdb0a78fdd..d509be720e7d0 100644 --- a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/is_bounded.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/is_bounded.pass.cpp @@ -24,7 +24,7 @@ test() static_assert(std::numeric_limits::is_bounded == expected, "is_bounded test 4"); } -int main() +int main(int, char**) { test(); test(); @@ -53,4 +53,6 @@ int main() test(); test(); test(); + + return 0; } diff --git a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/is_exact.pass.cpp b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/is_exact.pass.cpp index 2c769d87cf3ae..30dbd9ea11f85 100644 --- a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/is_exact.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/is_exact.pass.cpp @@ -24,7 +24,7 @@ test() static_assert(std::numeric_limits::is_exact == expected, "is_exact test 4"); } -int main() +int main(int, char**) { test(); test(); @@ -53,4 +53,6 @@ int main() test(); test(); test(); + + return 0; } diff --git a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/is_iec559.pass.cpp b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/is_iec559.pass.cpp index c7edf178dc21e..215407d74b347 100644 --- a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/is_iec559.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/is_iec559.pass.cpp @@ -24,7 +24,7 @@ test() static_assert(std::numeric_limits::is_iec559 == expected, "is_iec559 test 4"); } -int main() +int main(int, char**) { test(); test(); @@ -57,4 +57,6 @@ int main() #else test(); #endif + + return 0; } diff --git a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/is_integer.pass.cpp b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/is_integer.pass.cpp index 80a45fa29f8d3..66ce0cb2bad4c 100644 --- a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/is_integer.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/is_integer.pass.cpp @@ -24,7 +24,7 @@ test() static_assert(std::numeric_limits::is_integer == expected, "is_integer test 4"); } -int main() +int main(int, char**) { test(); test(); @@ -53,4 +53,6 @@ int main() test(); test(); test(); + + return 0; } diff --git a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/is_modulo.pass.cpp b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/is_modulo.pass.cpp index c364fd01bd192..2eb2c4ba494d3 100644 --- a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/is_modulo.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/is_modulo.pass.cpp @@ -24,7 +24,7 @@ test() static_assert(std::numeric_limits::is_modulo == expected, "is_modulo test 4"); } -int main() +int main(int, char**) { test(); // test(); // don't know @@ -53,4 +53,6 @@ int main() test(); test(); test(); + + return 0; } diff --git a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/is_signed.pass.cpp b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/is_signed.pass.cpp index 08dc5eb772fdf..818ad4db9f47d 100644 --- a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/is_signed.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/is_signed.pass.cpp @@ -24,7 +24,7 @@ test() static_assert(std::numeric_limits::is_signed == expected, "is_signed test 4"); } -int main() +int main(int, char**) { test(); test(); @@ -53,4 +53,6 @@ int main() test(); test(); test(); + + return 0; } diff --git a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/lowest.pass.cpp b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/lowest.pass.cpp index bb6ae168e7220..adf147c7069a6 100644 --- a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/lowest.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/lowest.pass.cpp @@ -32,7 +32,7 @@ test(T expected) assert(std::numeric_limits::is_bounded); } -int main() +int main(int, char**) { test(false); test(CHAR_MIN); @@ -61,4 +61,6 @@ int main() test(-FLT_MAX); test(-DBL_MAX); test(-LDBL_MAX); + + return 0; } diff --git a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/max.pass.cpp b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/max.pass.cpp index 0bf7237ad9ec9..91f353ab5e20a 100644 --- a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/max.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/max.pass.cpp @@ -32,7 +32,7 @@ test(T expected) assert(std::numeric_limits::is_bounded); } -int main() +int main(int, char**) { test(true); test(CHAR_MAX); @@ -61,4 +61,6 @@ int main() test(FLT_MAX); test(DBL_MAX); test(LDBL_MAX); + + return 0; } diff --git a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/max_digits10.pass.cpp b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/max_digits10.pass.cpp index 4b87148752776..3cf7d50969587 100644 --- a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/max_digits10.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/max_digits10.pass.cpp @@ -25,7 +25,7 @@ test() static_assert(std::numeric_limits::max_digits10 == expected, "max_digits10 test 4"); } -int main() +int main(int, char**) { test(); test(); @@ -54,4 +54,6 @@ int main() test(); test(); test(); + + return 0; } diff --git a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/max_exponent.pass.cpp b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/max_exponent.pass.cpp index 7ce1ac9d7440d..325ad797977c3 100644 --- a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/max_exponent.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/max_exponent.pass.cpp @@ -25,7 +25,7 @@ test() static_assert(std::numeric_limits::max_exponent == expected, "max_exponent test 4"); } -int main() +int main(int, char**) { test(); test(); @@ -54,4 +54,6 @@ int main() test(); test(); test(); + + return 0; } diff --git a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/max_exponent10.pass.cpp b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/max_exponent10.pass.cpp index e2bbdde1096f8..e1a4ffe29beca 100644 --- a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/max_exponent10.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/max_exponent10.pass.cpp @@ -25,7 +25,7 @@ test() static_assert(std::numeric_limits::max_exponent10 == expected, "max_exponent10 test 4"); } -int main() +int main(int, char**) { test(); test(); @@ -54,4 +54,6 @@ int main() test(); test(); test(); + + return 0; } diff --git a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/min.pass.cpp b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/min.pass.cpp index 66ddaa474e94c..0d2cb3c1bc357 100644 --- a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/min.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/min.pass.cpp @@ -32,7 +32,7 @@ test(T expected) assert(std::numeric_limits::is_bounded || !std::numeric_limits::is_signed); } -int main() +int main(int, char**) { test(false); test(CHAR_MIN); @@ -61,4 +61,6 @@ int main() test(FLT_MIN); test(DBL_MIN); test(LDBL_MIN); + + return 0; } diff --git a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/min_exponent.pass.cpp b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/min_exponent.pass.cpp index 8fb4f09f6a741..5708d8a20f59b 100644 --- a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/min_exponent.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/min_exponent.pass.cpp @@ -25,7 +25,7 @@ test() static_assert(std::numeric_limits::min_exponent == expected, "min_exponent test 4"); } -int main() +int main(int, char**) { test(); test(); @@ -54,4 +54,6 @@ int main() test(); test(); test(); + + return 0; } diff --git a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/min_exponent10.pass.cpp b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/min_exponent10.pass.cpp index 812dd53bbe0f0..f598d42fa8e64 100644 --- a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/min_exponent10.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/min_exponent10.pass.cpp @@ -25,7 +25,7 @@ test() static_assert(std::numeric_limits::min_exponent10 == expected, "min_exponent10 test 4"); } -int main() +int main(int, char**) { test(); test(); @@ -54,4 +54,6 @@ int main() test(); test(); test(); + + return 0; } diff --git a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/quiet_NaN.pass.cpp b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/quiet_NaN.pass.cpp index 852cf86a13a71..f4ea61f23dc64 100644 --- a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/quiet_NaN.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/quiet_NaN.pass.cpp @@ -45,7 +45,7 @@ test() test_imp(std::is_floating_point()); } -int main() +int main(int, char**) { test(); test(); @@ -74,4 +74,6 @@ int main() test(); test(); test(); + + return 0; } diff --git a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/radix.pass.cpp b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/radix.pass.cpp index 8c9e48a2d71e6..8f13768b0bdb4 100644 --- a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/radix.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/radix.pass.cpp @@ -25,7 +25,7 @@ test() static_assert(std::numeric_limits::radix == expected, "radix test 4"); } -int main() +int main(int, char**) { test(); test(); @@ -54,4 +54,6 @@ int main() test(); test(); test(); + + return 0; } diff --git a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/round_error.pass.cpp b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/round_error.pass.cpp index f2d962df4b6fd..ddc4490db0beb 100644 --- a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/round_error.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/round_error.pass.cpp @@ -26,7 +26,7 @@ test(T expected) assert(std::numeric_limits::round_error() == expected); } -int main() +int main(int, char**) { test(false); test(0); @@ -55,4 +55,6 @@ int main() test(0.5); test(0.5); test(0.5); + + return 0; } diff --git a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/round_style.pass.cpp b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/round_style.pass.cpp index 43e962961a624..81d4ce6ebcf1d 100644 --- a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/round_style.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/round_style.pass.cpp @@ -24,7 +24,7 @@ test() static_assert(std::numeric_limits::round_style == expected, "round_style test 4"); } -int main() +int main(int, char**) { test(); test(); @@ -53,4 +53,6 @@ int main() test(); test(); test(); + + return 0; } diff --git a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/signaling_NaN.pass.cpp b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/signaling_NaN.pass.cpp index 312f69714982d..701386710955b 100644 --- a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/signaling_NaN.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/signaling_NaN.pass.cpp @@ -45,7 +45,7 @@ test() test_imp(std::is_floating_point()); } -int main() +int main(int, char**) { test(); test(); @@ -74,4 +74,6 @@ int main() test(); test(); test(); + + return 0; } diff --git a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/tinyness_before.pass.cpp b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/tinyness_before.pass.cpp index 3e0ad694b442a..c150e5f23d063 100644 --- a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/tinyness_before.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/tinyness_before.pass.cpp @@ -24,7 +24,7 @@ test() static_assert(std::numeric_limits::tinyness_before == expected, "tinyness_before test 4"); } -int main() +int main(int, char**) { test(); test(); @@ -53,4 +53,6 @@ int main() test(); test(); test(); + + return 0; } diff --git a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/traps.pass.cpp b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/traps.pass.cpp index e71432b18a180..e7ea388192ded 100644 --- a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/traps.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/traps.pass.cpp @@ -31,7 +31,7 @@ test() static_assert(std::numeric_limits::traps == expected, "traps test 4"); } -int main() +int main(int, char**) { test(); test(); @@ -60,4 +60,6 @@ int main() test(); test(); test(); + + return 0; } diff --git a/libcxx/test/std/language.support/support.limits/limits/numeric.limits/default.pass.cpp b/libcxx/test/std/language.support/support.limits/limits/numeric.limits/default.pass.cpp index 3c7cefd55cfd0..6e258c13a7888 100644 --- a/libcxx/test/std/language.support/support.limits/limits/numeric.limits/default.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/limits/numeric.limits/default.pass.cpp @@ -22,7 +22,7 @@ struct A bool operator == (const A& x, const A& y) {return x.data_ == y.data_;} -int main() +int main(int, char**) { static_assert(std::numeric_limits::is_specialized == false, "std::numeric_limits::is_specialized == false"); @@ -79,4 +79,6 @@ int main() "std::numeric_limits::tinyness_before == false"); static_assert(std::numeric_limits::round_style == std::round_toward_zero, "std::numeric_limits::round_style == std::round_toward_zero"); + + return 0; } diff --git a/libcxx/test/std/language.support/support.limits/limits/numeric.special/nothing_to_do.pass.cpp b/libcxx/test/std/language.support/support.limits/limits/numeric.special/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/language.support/support.limits/limits/numeric.special/nothing_to_do.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/limits/numeric.special/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/language.support/support.limits/limits/round.style/check_values.pass.cpp b/libcxx/test/std/language.support/support.limits/limits/round.style/check_values.pass.cpp index c6a01bf66fbcf..b1a4e4450a1ee 100644 --- a/libcxx/test/std/language.support/support.limits/limits/round.style/check_values.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/limits/round.style/check_values.pass.cpp @@ -18,7 +18,7 @@ struct two {one _[2];}; one test(std::float_denorm_style); two test(int); -int main() +int main(int, char**) { static_assert(std::denorm_indeterminate == -1, "std::denorm_indeterminate == -1"); @@ -30,4 +30,6 @@ int main() "sizeof(test(std::denorm_present)) == 1"); static_assert(sizeof(test(1)) == 2, "sizeof(test(1)) == 2"); + + return 0; } diff --git a/libcxx/test/std/language.support/support.limits/nothing_to_do.pass.cpp b/libcxx/test/std/language.support/support.limits/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/language.support/support.limits/nothing_to_do.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/algorithm.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/algorithm.version.pass.cpp index 57234ad4362cd..5458e9194297d 100644 --- a/libcxx/test/std/language.support/support.limits/support.limits.general/algorithm.version.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/algorithm.version.pass.cpp @@ -188,4 +188,4 @@ #endif // TEST_STD_VER > 17 -int main() {} +int main(int, char**) { return 0; } diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/any.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/any.version.pass.cpp index 9bbaca7aa1597..f5255c0e26a6d 100644 --- a/libcxx/test/std/language.support/support.limits/support.limits.general/any.version.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/any.version.pass.cpp @@ -52,4 +52,4 @@ #endif // TEST_STD_VER > 17 -int main() {} +int main(int, char**) { return 0; } diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/array.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/array.version.pass.cpp index 85bda432290ae..d590f98042d52 100644 --- a/libcxx/test/std/language.support/support.limits/support.limits.general/array.version.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/array.version.pass.cpp @@ -101,4 +101,4 @@ #endif // TEST_STD_VER > 17 -int main() {} +int main(int, char**) { return 0; } diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/atomic.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/atomic.version.pass.cpp index 3fb2c7ed14774..d8f6f548cd23f 100644 --- a/libcxx/test/std/language.support/support.limits/support.limits.general/atomic.version.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/atomic.version.pass.cpp @@ -118,4 +118,4 @@ #endif // TEST_STD_VER > 17 -int main() {} +int main(int, char**) { return 0; } diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/bit.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/bit.version.pass.cpp index 6c26e06a0b03b..3e42d06fbe81b 100644 --- a/libcxx/test/std/language.support/support.limits/support.limits.general/bit.version.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/bit.version.pass.cpp @@ -55,4 +55,4 @@ #endif // TEST_STD_VER > 17 -int main() {} +int main(int, char**) { return 0; } diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/charconv.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/charconv.pass.cpp index 045dcb8ac38d8..2afe2e26ba553 100644 --- a/libcxx/test/std/language.support/support.limits/support.limits.general/charconv.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/charconv.pass.cpp @@ -17,7 +17,7 @@ #include #include "test_macros.h" -int main() +int main(int, char**) { // ensure that the macros that are supposed to be defined in are defined. @@ -28,4 +28,6 @@ int main() # error "__cpp_lib_fooby has an invalid value" #endif */ + + return 0; } diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/chrono.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/chrono.version.pass.cpp index 9e434c5c2537d..88da2dcca6d78 100644 --- a/libcxx/test/std/language.support/support.limits/support.limits.general/chrono.version.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/chrono.version.pass.cpp @@ -78,4 +78,4 @@ #endif // TEST_STD_VER > 17 -int main() {} +int main(int, char**) { return 0; } diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/cmath.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/cmath.version.pass.cpp index bcc2053585a0e..d81218e66ab9f 100644 --- a/libcxx/test/std/language.support/support.limits/support.limits.general/cmath.version.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/cmath.version.pass.cpp @@ -87,4 +87,4 @@ #endif // TEST_STD_VER > 17 -int main() {} +int main(int, char**) { return 0; } diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/compare.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/compare.version.pass.cpp index 2864c9f4eb0ce..7f1836fba00e6 100644 --- a/libcxx/test/std/language.support/support.limits/support.limits.general/compare.version.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/compare.version.pass.cpp @@ -55,4 +55,4 @@ #endif // TEST_STD_VER > 17 -int main() {} +int main(int, char**) { return 0; } diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/complex.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/complex.version.pass.cpp index c6a9b16481f03..bcff0bbe1856b 100644 --- a/libcxx/test/std/language.support/support.limits/support.limits.general/complex.version.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/complex.version.pass.cpp @@ -55,4 +55,4 @@ #endif // TEST_STD_VER > 17 -int main() {} +int main(int, char**) { return 0; } diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/concepts.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/concepts.version.pass.cpp index 9d9b9bca3fe81..16febf8d3e24a 100644 --- a/libcxx/test/std/language.support/support.limits/support.limits.general/concepts.version.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/concepts.version.pass.cpp @@ -19,7 +19,7 @@ #include #include "test_macros.h" -int main() +int main(int, char**) { // ensure that the macros that are supposed to be defined in are defined. @@ -30,4 +30,6 @@ int main() # error "__cpp_lib_fooby has an invalid value" #endif */ + + return 0; } diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/cstddef.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/cstddef.version.pass.cpp index 82a0932d0dc90..b18ea07ea0cc6 100644 --- a/libcxx/test/std/language.support/support.limits/support.limits.general/cstddef.version.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/cstddef.version.pass.cpp @@ -52,4 +52,4 @@ #endif // TEST_STD_VER > 17 -int main() {} +int main(int, char**) { return 0; } diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/deque.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/deque.version.pass.cpp index 53a1b33450bd1..9d07dcdd24661 100644 --- a/libcxx/test/std/language.support/support.limits/support.limits.general/deque.version.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/deque.version.pass.cpp @@ -95,4 +95,4 @@ #endif // TEST_STD_VER > 17 -int main() {} +int main(int, char**) { return 0; } diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/exception.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/exception.version.pass.cpp index c27bdc6b06342..1ecebb48f0f54 100644 --- a/libcxx/test/std/language.support/support.limits/support.limits.general/exception.version.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/exception.version.pass.cpp @@ -52,4 +52,4 @@ #endif // TEST_STD_VER > 17 -int main() {} +int main(int, char**) { return 0; } diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/execution.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/execution.version.pass.cpp index 476a31ef93f2e..b05f41bb1731c 100644 --- a/libcxx/test/std/language.support/support.limits/support.limits.general/execution.version.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/execution.version.pass.cpp @@ -19,7 +19,7 @@ #include #include "test_macros.h" -int main() +int main(int, char**) { // ensure that the macros that are supposed to be defined in are defined. @@ -30,4 +30,6 @@ int main() # error "__cpp_lib_fooby has an invalid value" #endif */ + + return 0; } diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/filesystem.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/filesystem.version.pass.cpp index 6638cdee90c88..d1c09fc7ee485 100644 --- a/libcxx/test/std/language.support/support.limits/support.limits.general/filesystem.version.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/filesystem.version.pass.cpp @@ -78,4 +78,4 @@ #endif // TEST_STD_VER > 17 -int main() {} +int main(int, char**) { return 0; } diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/forward_list.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/forward_list.version.pass.cpp index 102cd29ea568f..7ecad6d3e3408 100644 --- a/libcxx/test/std/language.support/support.limits/support.limits.general/forward_list.version.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/forward_list.version.pass.cpp @@ -144,4 +144,4 @@ #endif // TEST_STD_VER > 17 -int main() {} +int main(int, char**) { return 0; } diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/functional.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/functional.version.pass.cpp index e11464231193d..a29a1d708a304 100644 --- a/libcxx/test/std/language.support/support.limits/support.limits.general/functional.version.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/functional.version.pass.cpp @@ -241,4 +241,4 @@ #endif // TEST_STD_VER > 17 -int main() {} +int main(int, char**) { return 0; } diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/iomanip.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/iomanip.version.pass.cpp index bd2ea2417a28e..23378e0e2e3c4 100644 --- a/libcxx/test/std/language.support/support.limits/support.limits.general/iomanip.version.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/iomanip.version.pass.cpp @@ -55,4 +55,4 @@ #endif // TEST_STD_VER > 17 -int main() {} +int main(int, char**) { return 0; } diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/istream.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/istream.version.pass.cpp index 9194ff855281f..3d8fb7a4cf9cb 100644 --- a/libcxx/test/std/language.support/support.limits/support.limits.general/istream.version.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/istream.version.pass.cpp @@ -55,4 +55,4 @@ #endif // TEST_STD_VER > 17 -int main() {} +int main(int, char**) { return 0; } diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/iterator.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/iterator.version.pass.cpp index b1ad28206f77d..9c1719b53cfe6 100644 --- a/libcxx/test/std/language.support/support.limits/support.limits.general/iterator.version.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/iterator.version.pass.cpp @@ -179,4 +179,4 @@ #endif // TEST_STD_VER > 17 -int main() {} +int main(int, char**) { return 0; } diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/limits.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/limits.version.pass.cpp index bb2005e327cac..2d2f243e70411 100644 --- a/libcxx/test/std/language.support/support.limits/support.limits.general/limits.version.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/limits.version.pass.cpp @@ -55,4 +55,4 @@ #endif // TEST_STD_VER > 17 -int main() {} +int main(int, char**) { return 0; } diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/list.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/list.version.pass.cpp index c1159cf73a1f7..b736d1f9a2161 100644 --- a/libcxx/test/std/language.support/support.limits/support.limits.general/list.version.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/list.version.pass.cpp @@ -144,4 +144,4 @@ #endif // TEST_STD_VER > 17 -int main() {} +int main(int, char**) { return 0; } diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/locale.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/locale.version.pass.cpp index c5a5b543650dc..eeea5390afd8c 100644 --- a/libcxx/test/std/language.support/support.limits/support.limits.general/locale.version.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/locale.version.pass.cpp @@ -55,4 +55,4 @@ #endif // TEST_STD_VER > 17 -int main() {} +int main(int, char**) { return 0; } diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/map.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/map.version.pass.cpp index c1ecad7232172..a41dd1b8e9862 100644 --- a/libcxx/test/std/language.support/support.limits/support.limits.general/map.version.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/map.version.pass.cpp @@ -167,4 +167,4 @@ #endif // TEST_STD_VER > 17 -int main() {} +int main(int, char**) { return 0; } diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/memory.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/memory.version.pass.cpp index 55e595fa9a80e..6c845d71febd7 100644 --- a/libcxx/test/std/language.support/support.limits/support.limits.general/memory.version.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/memory.version.pass.cpp @@ -243,4 +243,4 @@ #endif // TEST_STD_VER > 17 -int main() {} +int main(int, char**) { return 0; } diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/memory_resource.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/memory_resource.version.pass.cpp index cb182adc16a1f..d712a8bca8d1f 100644 --- a/libcxx/test/std/language.support/support.limits/support.limits.general/memory_resource.version.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/memory_resource.version.pass.cpp @@ -19,7 +19,7 @@ #include #include "test_macros.h" -int main() +int main(int, char**) { // ensure that the macros that are supposed to be defined in are defined. @@ -30,4 +30,6 @@ int main() # error "__cpp_lib_fooby has an invalid value" #endif */ + + return 0; } diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/mutex.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/mutex.version.pass.cpp index 4986a1f192db2..9dae806b81231 100644 --- a/libcxx/test/std/language.support/support.limits/support.limits.general/mutex.version.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/mutex.version.pass.cpp @@ -52,4 +52,4 @@ #endif // TEST_STD_VER > 17 -int main() {} +int main(int, char**) { return 0; } diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/new.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/new.version.pass.cpp index 95a717dfbd29d..5f012cd55f6c2 100644 --- a/libcxx/test/std/language.support/support.limits/support.limits.general/new.version.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/new.version.pass.cpp @@ -101,4 +101,4 @@ #endif // TEST_STD_VER > 17 -int main() {} +int main(int, char**) { return 0; } diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/numeric.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/numeric.version.pass.cpp index f44cbc2c75c29..eb5eb557b7bb7 100644 --- a/libcxx/test/std/language.support/support.limits/support.limits.general/numeric.version.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/numeric.version.pass.cpp @@ -87,4 +87,4 @@ #endif // TEST_STD_VER > 17 -int main() {} +int main(int, char**) { return 0; } diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/optional.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/optional.version.pass.cpp index 59e698d769df4..d88fbb0fee804 100644 --- a/libcxx/test/std/language.support/support.limits/support.limits.general/optional.version.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/optional.version.pass.cpp @@ -52,4 +52,4 @@ #endif // TEST_STD_VER > 17 -int main() {} +int main(int, char**) { return 0; } diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/ostream.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/ostream.version.pass.cpp index 17be75c2e721f..d3ba25867d053 100644 --- a/libcxx/test/std/language.support/support.limits/support.limits.general/ostream.version.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/ostream.version.pass.cpp @@ -55,4 +55,4 @@ #endif // TEST_STD_VER > 17 -int main() {} +int main(int, char**) { return 0; } diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/regex.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/regex.version.pass.cpp index 412e29c6c5491..66becadbbfb82 100644 --- a/libcxx/test/std/language.support/support.limits/support.limits.general/regex.version.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/regex.version.pass.cpp @@ -52,4 +52,4 @@ #endif // TEST_STD_VER > 17 -int main() {} +int main(int, char**) { return 0; } diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/scoped_allocator.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/scoped_allocator.version.pass.cpp index d111f263c13d2..2ea98256e1bd4 100644 --- a/libcxx/test/std/language.support/support.limits/support.limits.general/scoped_allocator.version.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/scoped_allocator.version.pass.cpp @@ -52,4 +52,4 @@ #endif // TEST_STD_VER > 17 -int main() {} +int main(int, char**) { return 0; } diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/set.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/set.version.pass.cpp index c886850ceba70..80cf9c0af3caa 100644 --- a/libcxx/test/std/language.support/support.limits/support.limits.general/set.version.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/set.version.pass.cpp @@ -144,4 +144,4 @@ #endif // TEST_STD_VER > 17 -int main() {} +int main(int, char**) { return 0; } diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/shared_mutex.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/shared_mutex.version.pass.cpp index 12c58480bdfa8..7c92dfc085cea 100644 --- a/libcxx/test/std/language.support/support.limits/support.limits.general/shared_mutex.version.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/shared_mutex.version.pass.cpp @@ -110,4 +110,4 @@ #endif // TEST_STD_VER > 17 -int main() {} +int main(int, char**) { return 0; } diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/string.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/string.version.pass.cpp index 0f1c37b90e4fe..bdd517da0de6d 100644 --- a/libcxx/test/std/language.support/support.limits/support.limits.general/string.version.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/string.version.pass.cpp @@ -170,4 +170,4 @@ #endif // TEST_STD_VER > 17 -int main() {} +int main(int, char**) { return 0; } diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/string_view.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/string_view.version.pass.cpp index adad6b084e35a..816083e0d7f33 100644 --- a/libcxx/test/std/language.support/support.limits/support.limits.general/string_view.version.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/string_view.version.pass.cpp @@ -104,4 +104,4 @@ #endif // TEST_STD_VER > 17 -int main() {} +int main(int, char**) { return 0; } diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/tuple.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/tuple.version.pass.cpp index e2d9865324eb0..5c1e6580c57d6 100644 --- a/libcxx/test/std/language.support/support.limits/support.limits.general/tuple.version.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/tuple.version.pass.cpp @@ -153,4 +153,4 @@ #endif // TEST_STD_VER > 17 -int main() {} +int main(int, char**) { return 0; } diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/type_traits.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/type_traits.version.pass.cpp index 59994b77956af..7e8b3de35f4c2 100644 --- a/libcxx/test/std/language.support/support.limits/support.limits.general/type_traits.version.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/type_traits.version.pass.cpp @@ -393,4 +393,4 @@ #endif // TEST_STD_VER > 17 -int main() {} +int main(int, char**) { return 0; } diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/unordered_map.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/unordered_map.version.pass.cpp index f6f4e6cecc225..07eb1a9bc351a 100644 --- a/libcxx/test/std/language.support/support.limits/support.limits.general/unordered_map.version.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/unordered_map.version.pass.cpp @@ -167,4 +167,4 @@ #endif // TEST_STD_VER > 17 -int main() {} +int main(int, char**) { return 0; } diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/unordered_set.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/unordered_set.version.pass.cpp index 07a3c302adc81..845318a79a5e9 100644 --- a/libcxx/test/std/language.support/support.limits/support.limits.general/unordered_set.version.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/unordered_set.version.pass.cpp @@ -144,4 +144,4 @@ #endif // TEST_STD_VER > 17 -int main() {} +int main(int, char**) { return 0; } diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/utility.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/utility.version.pass.cpp index 6b051d289d48c..1fd38627a715a 100644 --- a/libcxx/test/std/language.support/support.limits/support.limits.general/utility.version.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/utility.version.pass.cpp @@ -191,4 +191,4 @@ #endif // TEST_STD_VER > 17 -int main() {} +int main(int, char**) { return 0; } diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/variant.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/variant.version.pass.cpp index 23a15a67060ba..7a17307460d81 100644 --- a/libcxx/test/std/language.support/support.limits/support.limits.general/variant.version.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/variant.version.pass.cpp @@ -52,4 +52,4 @@ #endif // TEST_STD_VER > 17 -int main() {} +int main(int, char**) { return 0; } diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/vector.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/vector.version.pass.cpp index c22921e775dbb..3ea2a0cf00b18 100644 --- a/libcxx/test/std/language.support/support.limits/support.limits.general/vector.version.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/vector.version.pass.cpp @@ -118,4 +118,4 @@ #endif // TEST_STD_VER > 17 -int main() {} +int main(int, char**) { return 0; } diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/version.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/version.version.pass.cpp index aa409e1547a4e..b85d42d00ca78 100644 --- a/libcxx/test/std/language.support/support.limits/support.limits.general/version.version.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/version.version.pass.cpp @@ -2174,4 +2174,4 @@ #endif // TEST_STD_VER > 17 -int main() {} +int main(int, char**) { return 0; } diff --git a/libcxx/test/std/language.support/support.limits/version.pass.cpp b/libcxx/test/std/language.support/support.limits/version.pass.cpp index b67df2892f088..783af5c728b5a 100644 --- a/libcxx/test/std/language.support/support.limits/version.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/version.pass.cpp @@ -11,6 +11,8 @@ #include -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/language.support/support.rtti/bad.cast/bad_cast.pass.cpp b/libcxx/test/std/language.support/support.rtti/bad.cast/bad_cast.pass.cpp index 5f9dc962daff2..23afd223cc40e 100644 --- a/libcxx/test/std/language.support/support.rtti/bad.cast/bad_cast.pass.cpp +++ b/libcxx/test/std/language.support/support.rtti/bad.cast/bad_cast.pass.cpp @@ -12,7 +12,7 @@ #include #include -int main() +int main(int, char**) { static_assert((std::is_base_of::value), "std::is_base_of::value"); @@ -23,4 +23,6 @@ int main() b2 = b; const char* w = b2.what(); assert(w); + + return 0; } diff --git a/libcxx/test/std/language.support/support.rtti/bad.typeid/bad_typeid.pass.cpp b/libcxx/test/std/language.support/support.rtti/bad.typeid/bad_typeid.pass.cpp index 90b6bc20a3049..94424bb03ad07 100644 --- a/libcxx/test/std/language.support/support.rtti/bad.typeid/bad_typeid.pass.cpp +++ b/libcxx/test/std/language.support/support.rtti/bad.typeid/bad_typeid.pass.cpp @@ -12,7 +12,7 @@ #include #include -int main() +int main(int, char**) { static_assert((std::is_base_of::value), "std::is_base_of::value"); @@ -23,4 +23,6 @@ int main() b2 = b; const char* w = b2.what(); assert(w); + + return 0; } diff --git a/libcxx/test/std/language.support/support.rtti/type.info/type_info.pass.cpp b/libcxx/test/std/language.support/support.rtti/type.info/type_info.pass.cpp index fec07526a2ed4..980bfeeccdcb6 100644 --- a/libcxx/test/std/language.support/support.rtti/type.info/type_info.pass.cpp +++ b/libcxx/test/std/language.support/support.rtti/type.info/type_info.pass.cpp @@ -16,7 +16,7 @@ bool test_constructor_explicit(std::type_info const&) { return false; } bool test_constructor_explicit(std::string const&) { return true; } -int main() +int main(int, char**) { { const std::type_info& t1 = typeid(int); @@ -36,4 +36,6 @@ int main() // See: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216201 assert(test_constructor_explicit("abc")); } + + return 0; } diff --git a/libcxx/test/std/language.support/support.rtti/type.info/type_info_hash.pass.cpp b/libcxx/test/std/language.support/support.rtti/type.info/type_info_hash.pass.cpp index d519622b7b1a2..c65f3bbf7900e 100644 --- a/libcxx/test/std/language.support/support.rtti/type.info/type_info_hash.pass.cpp +++ b/libcxx/test/std/language.support/support.rtti/type.info/type_info_hash.pass.cpp @@ -12,11 +12,13 @@ #include #include -int main() +int main(int, char**) { const std::type_info& t1 = typeid(int); const std::type_info& t2 = typeid(int); const std::type_info& t3 = typeid(short); assert(t1.hash_code() == t2.hash_code()); assert(t1.hash_code() != t3.hash_code()); + + return 0; } diff --git a/libcxx/test/std/language.support/support.runtime/csetjmp.pass.cpp b/libcxx/test/std/language.support/support.runtime/csetjmp.pass.cpp index dc68bf4a342bd..c1fa71b0e376e 100644 --- a/libcxx/test/std/language.support/support.runtime/csetjmp.pass.cpp +++ b/libcxx/test/std/language.support/support.runtime/csetjmp.pass.cpp @@ -15,10 +15,12 @@ #error setjmp not defined #endif -int main() +int main(int, char**) { std::jmp_buf jb; ((void)jb); // Prevent unused warning static_assert((std::is_same::value), "std::is_same::value"); + + return 0; } diff --git a/libcxx/test/std/language.support/support.runtime/csignal.pass.cpp b/libcxx/test/std/language.support/support.runtime/csignal.pass.cpp index b827236bb7f8b..dcfb4f99f5f24 100644 --- a/libcxx/test/std/language.support/support.runtime/csignal.pass.cpp +++ b/libcxx/test/std/language.support/support.runtime/csignal.pass.cpp @@ -47,11 +47,13 @@ #error SIGTERM not defined #endif -int main() +int main(int, char**) { std::sig_atomic_t sig = 0; ((void)sig); typedef void (*func)(int); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); + + return 0; } diff --git a/libcxx/test/std/language.support/support.runtime/cstdarg.pass.cpp b/libcxx/test/std/language.support/support.runtime/cstdarg.pass.cpp index b3c919af05fb7..8d7fd70b75aa8 100644 --- a/libcxx/test/std/language.support/support.runtime/cstdarg.pass.cpp +++ b/libcxx/test/std/language.support/support.runtime/cstdarg.pass.cpp @@ -30,8 +30,10 @@ #error va_start not defined #endif -int main() +int main(int, char**) { std::va_list va; ((void)va); + + return 0; } diff --git a/libcxx/test/std/language.support/support.runtime/cstdbool.pass.cpp b/libcxx/test/std/language.support/support.runtime/cstdbool.pass.cpp index 98a0e7e498959..461e77c99838e 100644 --- a/libcxx/test/std/language.support/support.runtime/cstdbool.pass.cpp +++ b/libcxx/test/std/language.support/support.runtime/cstdbool.pass.cpp @@ -26,6 +26,8 @@ #error false should not be defined #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/language.support/support.runtime/cstdlib.pass.cpp b/libcxx/test/std/language.support/support.runtime/cstdlib.pass.cpp index bc2cfcbb49df5..d8b6636795d8f 100644 --- a/libcxx/test/std/language.support/support.runtime/cstdlib.pass.cpp +++ b/libcxx/test/std/language.support/support.runtime/cstdlib.pass.cpp @@ -49,7 +49,7 @@ void test_div_struct() { ((void) obj); }; -int main() +int main(int, char**) { std::size_t s = 0; ((void)s); @@ -108,4 +108,6 @@ int main() static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); + + return 0; } diff --git a/libcxx/test/std/language.support/support.runtime/ctime.pass.cpp b/libcxx/test/std/language.support/support.runtime/ctime.pass.cpp index 57fb0124515e1..a8c2dc7ff5675 100644 --- a/libcxx/test/std/language.support/support.runtime/ctime.pass.cpp +++ b/libcxx/test/std/language.support/support.runtime/ctime.pass.cpp @@ -26,7 +26,7 @@ #endif #endif -int main() +int main(int, char**) { std::clock_t c = 0; std::size_t s = 0; @@ -58,4 +58,6 @@ int main() ((void)c1); // Prevent unused warning ((void)c2); // Prevent unused warning static_assert((std::is_same::value), ""); + + return 0; } diff --git a/libcxx/test/std/language.support/support.start.term/quick_exit.pass.cpp b/libcxx/test/std/language.support/support.start.term/quick_exit.pass.cpp index 5b7c36b08af9f..50d408aa0ba0f 100644 --- a/libcxx/test/std/language.support/support.start.term/quick_exit.pass.cpp +++ b/libcxx/test/std/language.support/support.start.term/quick_exit.pass.cpp @@ -13,10 +13,12 @@ void f() {} -int main() +int main(int, char**) { #ifdef _LIBCPP_HAS_QUICK_EXIT std::at_quick_exit(f); std::quick_exit(0); #endif + + return 0; } diff --git a/libcxx/test/std/language.support/support.start.term/quick_exit_check1.fail.cpp b/libcxx/test/std/language.support/support.start.term/quick_exit_check1.fail.cpp index c1703f2bee6c2..63c97f21025f6 100644 --- a/libcxx/test/std/language.support/support.start.term/quick_exit_check1.fail.cpp +++ b/libcxx/test/std/language.support/support.start.term/quick_exit_check1.fail.cpp @@ -15,11 +15,13 @@ void f() {} -int main() +int main(int, char**) { #ifndef _LIBCPP_HAS_QUICK_EXIT std::at_quick_exit(f); #else #error #endif + + return 0; } diff --git a/libcxx/test/std/language.support/support.start.term/quick_exit_check2.fail.cpp b/libcxx/test/std/language.support/support.start.term/quick_exit_check2.fail.cpp index acf10068b9794..28929b1aed346 100644 --- a/libcxx/test/std/language.support/support.start.term/quick_exit_check2.fail.cpp +++ b/libcxx/test/std/language.support/support.start.term/quick_exit_check2.fail.cpp @@ -14,11 +14,13 @@ void f() {} -int main() +int main(int, char**) { #ifndef _LIBCPP_HAS_QUICK_EXIT std::quick_exit(0); #else #error #endif + + return 0; } diff --git a/libcxx/test/std/language.support/support.types/byte.pass.cpp b/libcxx/test/std/language.support/support.types/byte.pass.cpp index a4a9e821908ea..842dc38d35381 100644 --- a/libcxx/test/std/language.support/support.types/byte.pass.cpp +++ b/libcxx/test/std/language.support/support.types/byte.pass.cpp @@ -30,4 +30,6 @@ static_assert(!std::is_same::value, "" ); // The standard doesn't outright say this, but it's pretty clear that it has to be true. static_assert(sizeof(std::byte) == 1, "" ); -int main () {} +int main(int, char**) { + return 0; +} diff --git a/libcxx/test/std/language.support/support.types/byteops/and.assign.pass.cpp b/libcxx/test/std/language.support/support.types/byteops/and.assign.pass.cpp index e4875d38f33d9..9ecdb5f6c0d89 100644 --- a/libcxx/test/std/language.support/support.types/byteops/and.assign.pass.cpp +++ b/libcxx/test/std/language.support/support.types/byteops/and.assign.pass.cpp @@ -20,7 +20,7 @@ constexpr std::byte test(std::byte b1, std::byte b2) { } -int main () { +int main(int, char**) { std::byte b; // not constexpr, just used in noexcept check constexpr std::byte b1{static_cast(1)}; constexpr std::byte b8{static_cast(8)}; @@ -35,4 +35,6 @@ int main () { static_assert(std::to_integer(test(b8, b1)) == 0, ""); static_assert(std::to_integer(test(b9, b1)) == 1, ""); static_assert(std::to_integer(test(b9, b8)) == 8, ""); + + return 0; } diff --git a/libcxx/test/std/language.support/support.types/byteops/and.pass.cpp b/libcxx/test/std/language.support/support.types/byteops/and.pass.cpp index 312e679cd2c95..d1dbc75f70caf 100644 --- a/libcxx/test/std/language.support/support.types/byteops/and.pass.cpp +++ b/libcxx/test/std/language.support/support.types/byteops/and.pass.cpp @@ -13,7 +13,7 @@ // constexpr byte operator&(byte l, byte r) noexcept; -int main () { +int main(int, char**) { constexpr std::byte b1{static_cast(1)}; constexpr std::byte b8{static_cast(8)}; constexpr std::byte b9{static_cast(9)}; @@ -27,4 +27,6 @@ int main () { static_assert(std::to_integer(b8 & b1) == 0, ""); static_assert(std::to_integer(b9 & b1) == 1, ""); static_assert(std::to_integer(b9 & b8) == 8, ""); + + return 0; } diff --git a/libcxx/test/std/language.support/support.types/byteops/enum_direct_init.pass.cpp b/libcxx/test/std/language.support/support.types/byteops/enum_direct_init.pass.cpp index 99660b6b180ab..5111667cee0da 100644 --- a/libcxx/test/std/language.support/support.types/byteops/enum_direct_init.pass.cpp +++ b/libcxx/test/std/language.support/support.types/byteops/enum_direct_init.pass.cpp @@ -14,7 +14,9 @@ // XFAIL: clang-3.5, clang-3.6, clang-3.7, clang-3.8 // XFAIL: apple-clang-6, apple-clang-7, apple-clang-8.0 -int main () { +int main(int, char**) { constexpr std::byte b{42}; static_assert(std::to_integer(b) == 42, ""); + + return 0; } diff --git a/libcxx/test/std/language.support/support.types/byteops/lshift.assign.fail.cpp b/libcxx/test/std/language.support/support.types/byteops/lshift.assign.fail.cpp index 413b62b1f427f..8f2134b20729c 100644 --- a/libcxx/test/std/language.support/support.types/byteops/lshift.assign.fail.cpp +++ b/libcxx/test/std/language.support/support.types/byteops/lshift.assign.fail.cpp @@ -25,6 +25,8 @@ constexpr std::byte test(std::byte b) { } -int main () { +int main(int, char**) { constexpr std::byte b1 = test(std::byte{1}); + + return 0; } diff --git a/libcxx/test/std/language.support/support.types/byteops/lshift.assign.pass.cpp b/libcxx/test/std/language.support/support.types/byteops/lshift.assign.pass.cpp index 9fe86883f4ec6..3647f5c64fc7b 100644 --- a/libcxx/test/std/language.support/support.types/byteops/lshift.assign.pass.cpp +++ b/libcxx/test/std/language.support/support.types/byteops/lshift.assign.pass.cpp @@ -22,7 +22,7 @@ constexpr std::byte test(std::byte b) { } -int main () { +int main(int, char**) { std::byte b; // not constexpr, just used in noexcept check constexpr std::byte b2{static_cast(2)}; constexpr std::byte b3{static_cast(3)}; @@ -32,4 +32,6 @@ int main () { static_assert(std::to_integer(test(b2)) == 8, "" ); static_assert(std::to_integer(test(b3)) == 12, "" ); + + return 0; } diff --git a/libcxx/test/std/language.support/support.types/byteops/lshift.fail.cpp b/libcxx/test/std/language.support/support.types/byteops/lshift.fail.cpp index 6d889ed23e02f..83ce5b81e3f79 100644 --- a/libcxx/test/std/language.support/support.types/byteops/lshift.fail.cpp +++ b/libcxx/test/std/language.support/support.types/byteops/lshift.fail.cpp @@ -16,7 +16,9 @@ // These functions shall not participate in overload resolution unless // is_integral_v is true. -int main () { +int main(int, char**) { constexpr std::byte b1{static_cast(1)}; constexpr std::byte b2 = b1 << 2.0f; + + return 0; } diff --git a/libcxx/test/std/language.support/support.types/byteops/lshift.pass.cpp b/libcxx/test/std/language.support/support.types/byteops/lshift.pass.cpp index 73cc66373c66f..855eebdf4ae00 100644 --- a/libcxx/test/std/language.support/support.types/byteops/lshift.pass.cpp +++ b/libcxx/test/std/language.support/support.types/byteops/lshift.pass.cpp @@ -16,7 +16,7 @@ // These functions shall not participate in overload resolution unless // is_integral_v is true. -int main () { +int main(int, char**) { constexpr std::byte b1{static_cast(1)}; constexpr std::byte b3{static_cast(3)}; @@ -26,4 +26,6 @@ int main () { static_assert(std::to_integer(b1 << 2) == 4, ""); static_assert(std::to_integer(b3 << 4) == 48, ""); static_assert(std::to_integer(b3 << 6) == 192, ""); + + return 0; } diff --git a/libcxx/test/std/language.support/support.types/byteops/not.pass.cpp b/libcxx/test/std/language.support/support.types/byteops/not.pass.cpp index cb94e3659b6f3..d6252aa356e09 100644 --- a/libcxx/test/std/language.support/support.types/byteops/not.pass.cpp +++ b/libcxx/test/std/language.support/support.types/byteops/not.pass.cpp @@ -13,7 +13,7 @@ // constexpr byte operator~(byte b) noexcept; -int main () { +int main(int, char**) { constexpr std::byte b1{static_cast(1)}; constexpr std::byte b2{static_cast(2)}; constexpr std::byte b8{static_cast(8)}; @@ -23,4 +23,6 @@ int main () { static_assert(std::to_integer(~b1) == 254, ""); static_assert(std::to_integer(~b2) == 253, ""); static_assert(std::to_integer(~b8) == 247, ""); + + return 0; } diff --git a/libcxx/test/std/language.support/support.types/byteops/or.assign.pass.cpp b/libcxx/test/std/language.support/support.types/byteops/or.assign.pass.cpp index cad3acef327d7..1216b852b82b3 100644 --- a/libcxx/test/std/language.support/support.types/byteops/or.assign.pass.cpp +++ b/libcxx/test/std/language.support/support.types/byteops/or.assign.pass.cpp @@ -20,7 +20,7 @@ constexpr std::byte test(std::byte b1, std::byte b2) { } -int main () { +int main(int, char**) { std::byte b; // not constexpr, just used in noexcept check constexpr std::byte b1{static_cast(1)}; constexpr std::byte b2{static_cast(2)}; @@ -36,4 +36,6 @@ int main () { static_assert(std::to_integer(test(b8, b1)) == 9, ""); static_assert(std::to_integer(test(b8, b2)) == 10, ""); + + return 0; } diff --git a/libcxx/test/std/language.support/support.types/byteops/or.pass.cpp b/libcxx/test/std/language.support/support.types/byteops/or.pass.cpp index 4b778398d9326..69b5bfaacb2b5 100644 --- a/libcxx/test/std/language.support/support.types/byteops/or.pass.cpp +++ b/libcxx/test/std/language.support/support.types/byteops/or.pass.cpp @@ -13,7 +13,7 @@ // constexpr byte operator|(byte l, byte r) noexcept; -int main () { +int main(int, char**) { constexpr std::byte b1{static_cast(1)}; constexpr std::byte b2{static_cast(2)}; constexpr std::byte b8{static_cast(8)}; @@ -27,4 +27,6 @@ int main () { static_assert(std::to_integer(b2 | b1) == 3, ""); static_assert(std::to_integer(b8 | b1) == 9, ""); static_assert(std::to_integer(b8 | b2) == 10, ""); + + return 0; } diff --git a/libcxx/test/std/language.support/support.types/byteops/rshift.assign.fail.cpp b/libcxx/test/std/language.support/support.types/byteops/rshift.assign.fail.cpp index dcd6567341e6d..714f5cd8b13dd 100644 --- a/libcxx/test/std/language.support/support.types/byteops/rshift.assign.fail.cpp +++ b/libcxx/test/std/language.support/support.types/byteops/rshift.assign.fail.cpp @@ -25,6 +25,8 @@ constexpr std::byte test(std::byte b) { } -int main () { +int main(int, char**) { constexpr std::byte b1 = test(std::byte{1}); + + return 0; } diff --git a/libcxx/test/std/language.support/support.types/byteops/rshift.assign.pass.cpp b/libcxx/test/std/language.support/support.types/byteops/rshift.assign.pass.cpp index bbb921240bb13..b1ca9d8513574 100644 --- a/libcxx/test/std/language.support/support.types/byteops/rshift.assign.pass.cpp +++ b/libcxx/test/std/language.support/support.types/byteops/rshift.assign.pass.cpp @@ -22,7 +22,7 @@ constexpr std::byte test(std::byte b) { } -int main () { +int main(int, char**) { std::byte b; // not constexpr, just used in noexcept check constexpr std::byte b16{static_cast(16)}; constexpr std::byte b192{static_cast(192)}; @@ -31,4 +31,6 @@ int main () { static_assert(std::to_integer(test(b16)) == 4, "" ); static_assert(std::to_integer(test(b192)) == 48, "" ); + + return 0; } diff --git a/libcxx/test/std/language.support/support.types/byteops/rshift.fail.cpp b/libcxx/test/std/language.support/support.types/byteops/rshift.fail.cpp index 1dc5f83cfca21..6af06f4fc68af 100644 --- a/libcxx/test/std/language.support/support.types/byteops/rshift.fail.cpp +++ b/libcxx/test/std/language.support/support.types/byteops/rshift.fail.cpp @@ -16,7 +16,9 @@ // These functions shall not participate in overload resolution unless // is_integral_v is true. -int main () { +int main(int, char**) { constexpr std::byte b1{static_cast(1)}; constexpr std::byte b2 = b1 >> 2.0f; + + return 0; } diff --git a/libcxx/test/std/language.support/support.types/byteops/rshift.pass.cpp b/libcxx/test/std/language.support/support.types/byteops/rshift.pass.cpp index 2ca3c6c20b26a..64db7556cd51a 100644 --- a/libcxx/test/std/language.support/support.types/byteops/rshift.pass.cpp +++ b/libcxx/test/std/language.support/support.types/byteops/rshift.pass.cpp @@ -22,7 +22,7 @@ constexpr std::byte test(std::byte b) { } -int main () { +int main(int, char**) { constexpr std::byte b100{static_cast(100)}; constexpr std::byte b115{static_cast(115)}; @@ -33,4 +33,6 @@ int main () { static_assert(std::to_integer(b115 >> 3) == 14, ""); static_assert(std::to_integer(b115 >> 6) == 1, ""); + + return 0; } diff --git a/libcxx/test/std/language.support/support.types/byteops/to_integer.fail.cpp b/libcxx/test/std/language.support/support.types/byteops/to_integer.fail.cpp index ea3836b16a4ea..64996358c9c6c 100644 --- a/libcxx/test/std/language.support/support.types/byteops/to_integer.fail.cpp +++ b/libcxx/test/std/language.support/support.types/byteops/to_integer.fail.cpp @@ -16,7 +16,9 @@ // This function shall not participate in overload resolution unless // is_integral_v is true. -int main () { +int main(int, char**) { constexpr std::byte b1{static_cast(1)}; auto f = std::to_integer(b1); + + return 0; } diff --git a/libcxx/test/std/language.support/support.types/byteops/to_integer.pass.cpp b/libcxx/test/std/language.support/support.types/byteops/to_integer.pass.cpp index cdae92ac4c913..657d17d9c4516 100644 --- a/libcxx/test/std/language.support/support.types/byteops/to_integer.pass.cpp +++ b/libcxx/test/std/language.support/support.types/byteops/to_integer.pass.cpp @@ -16,7 +16,7 @@ // This function shall not participate in overload resolution unless // is_integral_v is true. -int main () { +int main(int, char**) { constexpr std::byte b1{static_cast(1)}; constexpr std::byte b3{static_cast(3)}; @@ -27,4 +27,6 @@ int main () { static_assert(std::to_integer(b1) == 1, ""); static_assert(std::to_integer(b3) == 3, ""); + + return 0; } diff --git a/libcxx/test/std/language.support/support.types/byteops/xor.assign.pass.cpp b/libcxx/test/std/language.support/support.types/byteops/xor.assign.pass.cpp index 8caeec7dcc521..c82a6fd191b1d 100644 --- a/libcxx/test/std/language.support/support.types/byteops/xor.assign.pass.cpp +++ b/libcxx/test/std/language.support/support.types/byteops/xor.assign.pass.cpp @@ -20,7 +20,7 @@ constexpr std::byte test(std::byte b1, std::byte b2) { } -int main () { +int main(int, char**) { std::byte b; // not constexpr, just used in noexcept check constexpr std::byte b1{static_cast(1)}; constexpr std::byte b8{static_cast(8)}; @@ -35,4 +35,6 @@ int main () { static_assert(std::to_integer(test(b8, b1)) == 9, ""); static_assert(std::to_integer(test(b9, b1)) == 8, ""); static_assert(std::to_integer(test(b9, b8)) == 1, ""); + + return 0; } diff --git a/libcxx/test/std/language.support/support.types/byteops/xor.pass.cpp b/libcxx/test/std/language.support/support.types/byteops/xor.pass.cpp index 1dbf07f36c0ec..150f455b1db40 100644 --- a/libcxx/test/std/language.support/support.types/byteops/xor.pass.cpp +++ b/libcxx/test/std/language.support/support.types/byteops/xor.pass.cpp @@ -13,7 +13,7 @@ // constexpr byte operator^(byte l, byte r) noexcept; -int main () { +int main(int, char**) { constexpr std::byte b1{static_cast(1)}; constexpr std::byte b8{static_cast(8)}; constexpr std::byte b9{static_cast(9)}; @@ -27,4 +27,6 @@ int main () { static_assert(std::to_integer(b8 ^ b1) == 9, ""); static_assert(std::to_integer(b9 ^ b1) == 8, ""); static_assert(std::to_integer(b9 ^ b8) == 1, ""); + + return 0; } diff --git a/libcxx/test/std/language.support/support.types/max_align_t.pass.cpp b/libcxx/test/std/language.support/support.types/max_align_t.pass.cpp index 50c4f5ef5a6dd..a49f598dff7b8 100644 --- a/libcxx/test/std/language.support/support.types/max_align_t.pass.cpp +++ b/libcxx/test/std/language.support/support.types/max_align_t.pass.cpp @@ -15,7 +15,7 @@ #include #include "test_macros.h" -int main() +int main(int, char**) { #if TEST_STD_VER > 17 @@ -40,4 +40,6 @@ int main() std::alignment_of::value, "std::alignment_of::value >= " "std::alignment_of::value"); + + return 0; } diff --git a/libcxx/test/std/language.support/support.types/null.pass.cpp b/libcxx/test/std/language.support/support.types/null.pass.cpp index ce8530a00d47a..66ecdbc147c93 100644 --- a/libcxx/test/std/language.support/support.types/null.pass.cpp +++ b/libcxx/test/std/language.support/support.types/null.pass.cpp @@ -12,6 +12,8 @@ #error NULL not defined #endif -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/language.support/support.types/nullptr_t.pass.cpp b/libcxx/test/std/language.support/support.types/nullptr_t.pass.cpp index 01a674a0a22db..14ab3c65d0245 100644 --- a/libcxx/test/std/language.support/support.types/nullptr_t.pass.cpp +++ b/libcxx/test/std/language.support/support.types/nullptr_t.pass.cpp @@ -74,7 +74,7 @@ void test_nullptr_conversions() { #endif -int main() +int main(int, char**) { static_assert(sizeof(std::nullptr_t) == sizeof(void*), "sizeof(std::nullptr_t) == sizeof(void*)"); @@ -103,4 +103,6 @@ int main() test_comparisons(); } test_nullptr_conversions(); + + return 0; } diff --git a/libcxx/test/std/language.support/support.types/nullptr_t_integral_cast.fail.cpp b/libcxx/test/std/language.support/support.types/nullptr_t_integral_cast.fail.cpp index e6dc3772b0025..5802e46f1b8f6 100644 --- a/libcxx/test/std/language.support/support.types/nullptr_t_integral_cast.fail.cpp +++ b/libcxx/test/std/language.support/support.types/nullptr_t_integral_cast.fail.cpp @@ -10,7 +10,9 @@ #include -int main() +int main(int, char**) { std::ptrdiff_t i = static_cast(nullptr); + + return 0; } diff --git a/libcxx/test/std/language.support/support.types/nullptr_t_integral_cast.pass.cpp b/libcxx/test/std/language.support/support.types/nullptr_t_integral_cast.pass.cpp index ab1f447cdc6f1..b7696df974be1 100644 --- a/libcxx/test/std/language.support/support.types/nullptr_t_integral_cast.pass.cpp +++ b/libcxx/test/std/language.support/support.types/nullptr_t_integral_cast.pass.cpp @@ -16,8 +16,10 @@ #include #include -int main() +int main(int, char**) { std::ptrdiff_t i = reinterpret_cast(nullptr); assert(i == 0); + + return 0; } diff --git a/libcxx/test/std/language.support/support.types/offsetof.pass.cpp b/libcxx/test/std/language.support/support.types/offsetof.pass.cpp index 4a9dfac5e54c9..756f55352ed8e 100644 --- a/libcxx/test/std/language.support/support.types/offsetof.pass.cpp +++ b/libcxx/test/std/language.support/support.types/offsetof.pass.cpp @@ -21,7 +21,9 @@ struct A int x; }; -int main() +int main(int, char**) { static_assert(noexcept(offsetof(A, x)), ""); + + return 0; } diff --git a/libcxx/test/std/language.support/support.types/ptrdiff_t.pass.cpp b/libcxx/test/std/language.support/support.types/ptrdiff_t.pass.cpp index 9c6c36f383d35..de6f7726fe292 100644 --- a/libcxx/test/std/language.support/support.types/ptrdiff_t.pass.cpp +++ b/libcxx/test/std/language.support/support.types/ptrdiff_t.pass.cpp @@ -15,7 +15,7 @@ // 2. be the same sizeof as void*. // 3. be a signed integral. -int main() +int main(int, char**) { static_assert(sizeof(std::ptrdiff_t) == sizeof(void*), "sizeof(std::ptrdiff_t) == sizeof(void*)"); @@ -23,4 +23,6 @@ int main() "std::is_signed::value"); static_assert(std::is_integral::value, "std::is_integral::value"); + + return 0; } diff --git a/libcxx/test/std/language.support/support.types/size_t.pass.cpp b/libcxx/test/std/language.support/support.types/size_t.pass.cpp index ba1f646737857..5c840457b3701 100644 --- a/libcxx/test/std/language.support/support.types/size_t.pass.cpp +++ b/libcxx/test/std/language.support/support.types/size_t.pass.cpp @@ -15,7 +15,7 @@ // 2. be the same sizeof as void*. // 3. be an unsigned integral. -int main() +int main(int, char**) { static_assert(sizeof(std::size_t) == sizeof(void*), "sizeof(std::size_t) == sizeof(void*)"); @@ -23,4 +23,6 @@ int main() "std::is_unsigned::value"); static_assert(std::is_integral::value, "std::is_integral::value"); + + return 0; } diff --git a/libcxx/test/std/localization/c.locales/clocale.pass.cpp b/libcxx/test/std/localization/c.locales/clocale.pass.cpp index 8217dd74da80c..d8bd81b2ba3f1 100644 --- a/libcxx/test/std/localization/c.locales/clocale.pass.cpp +++ b/libcxx/test/std/localization/c.locales/clocale.pass.cpp @@ -43,7 +43,7 @@ #error NULL not defined #endif -int main() +int main(int, char**) { std::lconv lc; ((void)lc); // Prevent unused warning @@ -51,4 +51,6 @@ int main() static_assert((std::is_same::value), ""); #endif static_assert((std::is_same::value), ""); + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.collate/locale.collate.byname/compare.pass.cpp b/libcxx/test/std/localization/locale.categories/category.collate/locale.collate.byname/compare.pass.cpp index 33a94f9900de4..1d76fa6094f0e 100644 --- a/libcxx/test/std/localization/locale.categories/category.collate/locale.collate.byname/compare.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.collate/locale.collate.byname/compare.pass.cpp @@ -32,7 +32,7 @@ #include "platform_support.h" // locale name macros -int main() +int main(int, char**) { { std::locale l(LOCALE_en_US_UTF_8); @@ -68,4 +68,6 @@ int main() s3.data(), s3.data() + s3.size()) == 1); } } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.collate/locale.collate.byname/hash.pass.cpp b/libcxx/test/std/localization/locale.categories/category.collate/locale.collate.byname/hash.pass.cpp index 21cf03681ee41..40c15d6e9f4ee 100644 --- a/libcxx/test/std/localization/locale.categories/category.collate/locale.collate.byname/hash.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.collate/locale.collate.byname/hash.pass.cpp @@ -22,7 +22,7 @@ #include "platform_support.h" // locale name macros -int main() +int main(int, char**) { std::locale l(LOCALE_en_US_UTF_8); { @@ -39,4 +39,6 @@ int main() assert(f.hash(x1.data(), x1.data() + x1.size()) != f.hash(x2.data(), x2.data() + x2.size())); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.collate/locale.collate.byname/transform.pass.cpp b/libcxx/test/std/localization/locale.categories/category.collate/locale.collate.byname/transform.pass.cpp index 7cd3d0fe5e2cd..0b86979f55d2f 100644 --- a/libcxx/test/std/localization/locale.categories/category.collate/locale.collate.byname/transform.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.collate/locale.collate.byname/transform.pass.cpp @@ -25,7 +25,7 @@ #include "platform_support.h" // locale name macros -int main() +int main(int, char**) { { std::locale l(LOCALE_en_US_UTF_8); @@ -53,4 +53,6 @@ int main() assert(f.transform(x.data(), x.data() + x.size()) == x); } } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.collate/locale.collate.byname/types.pass.cpp b/libcxx/test/std/localization/locale.categories/category.collate/locale.collate.byname/types.pass.cpp index f00c8fd959dbf..f4dfd652227a6 100644 --- a/libcxx/test/std/localization/locale.categories/category.collate/locale.collate.byname/types.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.collate/locale.collate.byname/types.pass.cpp @@ -30,7 +30,7 @@ #include "platform_support.h" // locale name macros -int main() +int main(int, char**) { std::locale l(LOCALE_en_US_UTF_8); { @@ -43,4 +43,6 @@ int main() assert(&std::use_facet >(l) == &std::use_facet >(l)); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.collate/locale.collate/ctor.pass.cpp b/libcxx/test/std/localization/locale.categories/category.collate/locale.collate/ctor.pass.cpp index ded9ebae3ad14..856074d391ba7 100644 --- a/libcxx/test/std/localization/locale.categories/category.collate/locale.collate/ctor.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.collate/locale.collate/ctor.pass.cpp @@ -31,7 +31,7 @@ class my_facet template int my_facet::count = 0; -int main() +int main(int, char**) { { std::locale l(std::locale::classic(), new my_facet); @@ -63,4 +63,6 @@ int main() assert(my_facet::count == 1); } assert(my_facet::count == 0); + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.collate/locale.collate/locale.collate.members/compare.pass.cpp b/libcxx/test/std/localization/locale.categories/category.collate/locale.collate/locale.collate.members/compare.pass.cpp index ff5aa4bddc407..bfbbebe398552 100644 --- a/libcxx/test/std/localization/locale.categories/category.collate/locale.collate/locale.collate.members/compare.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.collate/locale.collate/locale.collate.members/compare.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { std::locale l = std::locale::classic(); { @@ -45,4 +45,6 @@ int main() assert(f.compare(ib+1, ib+3, ia, ia+sa) == 1); assert(f.compare(ia, ia+3, ib, ib+3) == 0); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.collate/locale.collate/locale.collate.members/hash.pass.cpp b/libcxx/test/std/localization/locale.categories/category.collate/locale.collate/locale.collate.members/hash.pass.cpp index 61d5a640f365c..07e29b17f6197 100644 --- a/libcxx/test/std/localization/locale.categories/category.collate/locale.collate/locale.collate.members/hash.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.collate/locale.collate/locale.collate.members/hash.pass.cpp @@ -18,7 +18,7 @@ #include #include -int main() +int main(int, char**) { std::locale l = std::locale::classic(); { @@ -35,4 +35,6 @@ int main() assert(f.hash(x1.data(), x1.data() + x1.size()) != f.hash(x2.data(), x2.data() + x2.size())); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.collate/locale.collate/locale.collate.members/transform.pass.cpp b/libcxx/test/std/localization/locale.categories/category.collate/locale.collate/locale.collate.members/transform.pass.cpp index 7b8c9915f28a8..7588a82be4133 100644 --- a/libcxx/test/std/localization/locale.categories/category.collate/locale.collate/locale.collate.members/transform.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.collate/locale.collate/locale.collate.members/transform.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { std::locale l = std::locale::classic(); { @@ -29,4 +29,6 @@ int main() const std::collate& f = std::use_facet >(l); assert(f.transform(x.data(), x.data() + x.size()) == x); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.collate/locale.collate/locale.collate.virtuals/tested_elsewhere.pass.cpp b/libcxx/test/std/localization/locale.categories/category.collate/locale.collate/locale.collate.virtuals/tested_elsewhere.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/localization/locale.categories/category.collate/locale.collate/locale.collate.virtuals/tested_elsewhere.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.collate/locale.collate/locale.collate.virtuals/tested_elsewhere.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.collate/locale.collate/types.pass.cpp b/libcxx/test/std/localization/locale.categories/category.collate/locale.collate/types.pass.cpp index 45957c3be28b0..63e2739f4e6ad 100644 --- a/libcxx/test/std/localization/locale.categories/category.collate/locale.collate/types.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.collate/locale.collate/types.pass.cpp @@ -22,7 +22,7 @@ #include #include -int main() +int main(int, char**) { std::locale l = std::locale::classic(); { @@ -47,4 +47,6 @@ int main() static_assert((std::is_same::string_type, std::wstring>::value), ""); static_assert((std::is_base_of >::value), ""); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.collate/nothing_to_do.pass.cpp b/libcxx/test/std/localization/locale.categories/category.collate/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/localization/locale.categories/category.collate/nothing_to_do.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.collate/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.ctype/ctype_base.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/ctype_base.pass.cpp index 92024149c0895..b7da91b4686cf 100644 --- a/libcxx/test/std/localization/locale.categories/category.ctype/ctype_base.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.ctype/ctype_base.pass.cpp @@ -38,7 +38,7 @@ template void test(const T &) {} -int main() +int main(int, char**) { assert(std::ctype_base::space); assert(std::ctype_base::print); @@ -74,4 +74,6 @@ int main() test(std::ctype_base::blank); test(std::ctype_base::alnum); test(std::ctype_base::graph); + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.dtor/dtor.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.dtor/dtor.pass.cpp index 5ba7a67e40cb2..e38af450f7fb7 100644 --- a/libcxx/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.dtor/dtor.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.dtor/dtor.pass.cpp @@ -17,7 +17,7 @@ #include "count_new.hpp" -int main() +int main(int, char**) { { std::locale l(std::locale::classic(), new std::ctype); @@ -36,4 +36,6 @@ int main() assert(globalMemCounter.checkDeleteArrayCalledEq(0)); } assert(globalMemCounter.checkDeleteArrayCalledEq(1)); + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/ctor.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/ctor.pass.cpp index 20eef3354c58b..4ec37db021a45 100644 --- a/libcxx/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/ctor.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/ctor.pass.cpp @@ -29,7 +29,7 @@ class my_facet int my_facet::count = 0; -int main() +int main(int, char**) { { std::locale l(std::locale::classic(), new my_facet); @@ -46,4 +46,6 @@ int main() assert(my_facet::count == 1); } assert(my_facet::count == 0); + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/is_1.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/is_1.pass.cpp index c4561f7964f3a..562f6c25e6b93 100644 --- a/libcxx/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/is_1.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/is_1.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { std::locale l = std::locale::classic(); { @@ -55,4 +55,6 @@ int main() assert(f.is(F::graph, '.')); assert(!f.is(F::graph, '\x07')); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/is_many.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/is_many.pass.cpp index 9415d8b5a7d93..c073a955e78b2 100644 --- a/libcxx/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/is_many.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/is_many.pass.cpp @@ -19,7 +19,7 @@ #include -int main() +int main(int, char**) { std::locale l = std::locale::classic(); { @@ -114,4 +114,6 @@ int main() assert( (m[5] & F::alnum)); assert( (m[5] & F::graph)); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/narrow_1.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/narrow_1.pass.cpp index b0fa41a2f3dd0..d2fa02201a3eb 100644 --- a/libcxx/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/narrow_1.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/narrow_1.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { std::locale l = std::locale::classic(); { @@ -29,4 +29,6 @@ int main() assert(f.narrow('a', '*') == 'a'); assert(f.narrow('1', '*') == '1'); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/narrow_many.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/narrow_many.pass.cpp index 01bb80534566e..4814695403579 100644 --- a/libcxx/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/narrow_many.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/narrow_many.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { std::locale l = std::locale::classic(); { @@ -34,4 +34,6 @@ int main() assert(v[4] == 'a'); assert(v[5] == '1'); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/scan_is.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/scan_is.pass.cpp index 3f4f049020535..043ca679608c0 100644 --- a/libcxx/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/scan_is.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/scan_is.pass.cpp @@ -19,7 +19,7 @@ #include -int main() +int main(int, char**) { std::locale l = std::locale::classic(); { @@ -40,4 +40,6 @@ int main() assert(f.scan_is(F::alnum, in.data(), in.data() + in.size()) - in.data() == 1); assert(f.scan_is(F::graph, in.data(), in.data() + in.size()) - in.data() == 1); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/scan_not.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/scan_not.pass.cpp index 6cd24a82e07bf..066a06a7f4c51 100644 --- a/libcxx/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/scan_not.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/scan_not.pass.cpp @@ -19,7 +19,7 @@ #include -int main() +int main(int, char**) { std::locale l = std::locale::classic(); { @@ -40,4 +40,6 @@ int main() assert(f.scan_not(F::alnum, in.data(), in.data() + in.size()) - in.data() == 0); assert(f.scan_not(F::graph, in.data(), in.data() + in.size()) - in.data() == 0); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/table.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/table.pass.cpp index 9d815196b1855..6a0fea0b1fde4 100644 --- a/libcxx/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/table.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/table.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { typedef std::ctype F; { @@ -29,4 +29,6 @@ int main() const F& f = std::use_facet(l); assert(f.table() == table); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/tolower_1.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/tolower_1.pass.cpp index 2b817002ce7f2..ddf4fbdb057f6 100644 --- a/libcxx/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/tolower_1.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/tolower_1.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { std::locale l = std::locale::classic(); { @@ -29,4 +29,6 @@ int main() assert(f.tolower('a') == 'a'); assert(f.tolower('1') == '1'); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/tolower_many.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/tolower_many.pass.cpp index 036ed25c6a3e2..b307d46273550 100644 --- a/libcxx/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/tolower_many.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/tolower_many.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { std::locale l = std::locale::classic(); { @@ -32,4 +32,6 @@ int main() assert(in[4] == 'a'); assert(in[5] == '1'); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/toupper_1.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/toupper_1.pass.cpp index c393bb91b8e2b..8b5505910eeb2 100644 --- a/libcxx/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/toupper_1.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/toupper_1.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { std::locale l = std::locale::classic(); { @@ -29,4 +29,6 @@ int main() assert(f.toupper('a') == 'A'); assert(f.toupper('1') == '1'); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/toupper_many.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/toupper_many.pass.cpp index 25af985f7c8f7..3d1c453cf3983 100644 --- a/libcxx/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/toupper_many.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/toupper_many.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { std::locale l = std::locale::classic(); { @@ -32,4 +32,6 @@ int main() assert(in[4] == 'A'); assert(in[5] == '1'); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/widen_1.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/widen_1.pass.cpp index 5b9f74bad918a..81c3ab6b3c41f 100644 --- a/libcxx/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/widen_1.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/widen_1.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { std::locale l = std::locale::classic(); { @@ -29,4 +29,6 @@ int main() assert(f.widen('a') == 'a'); assert(f.widen('1') == '1'); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/widen_many.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/widen_many.pass.cpp index ab3a838c087a3..35d9335c252f8 100644 --- a/libcxx/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/widen_many.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/widen_many.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { std::locale l = std::locale::classic(); { @@ -34,4 +34,6 @@ int main() assert(v[4] == 'a'); assert(v[5] == '1'); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.statics/classic_table.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.statics/classic_table.pass.cpp index 1aef57d3fb75f..7f46238d68246 100644 --- a/libcxx/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.statics/classic_table.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.statics/classic_table.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { typedef std::ctype F; assert(F::classic_table() != 0); @@ -55,4 +55,6 @@ int main() assert(((p[i] & ~set) & defined) == 0); // no extra ones } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.virtuals/tested_elsewhere.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.virtuals/tested_elsewhere.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.virtuals/tested_elsewhere.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.virtuals/tested_elsewhere.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.ctype/facet.ctype.special/types.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/facet.ctype.special/types.pass.cpp index b23f9ef83d822..c46dbb3e6f108 100644 --- a/libcxx/test/std/localization/locale.categories/category.ctype/facet.ctype.special/types.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.ctype/facet.ctype.special/types.pass.cpp @@ -21,7 +21,7 @@ #include #include -int main() +int main(int, char**) { std::locale l = std::locale::classic(); { @@ -35,4 +35,6 @@ int main() static_assert((std::is_base_of >::value), ""); static_assert((std::is_base_of >::value), ""); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt.byname/ctor_char.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt.byname/ctor_char.pass.cpp index d5cde47545388..03d17375e5e52 100644 --- a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt.byname/ctor_char.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt.byname/ctor_char.pass.cpp @@ -36,7 +36,7 @@ class my_facet int my_facet::count = 0; -int main() +int main(int, char**) { { std::locale l(std::locale::classic(), new my_facet(LOCALE_en_US)); @@ -68,4 +68,6 @@ int main() assert(my_facet::count == 1); } assert(my_facet::count == 0); + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt.byname/ctor_char16_t.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt.byname/ctor_char16_t.pass.cpp index 4d2803815de97..eedf192db2693 100644 --- a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt.byname/ctor_char16_t.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt.byname/ctor_char16_t.pass.cpp @@ -34,7 +34,7 @@ class my_facet int my_facet::count = 0; -int main() +int main(int, char**) { { std::locale l(std::locale::classic(), new my_facet("en_US")); @@ -66,4 +66,6 @@ int main() assert(my_facet::count == 1); } assert(my_facet::count == 0); + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt.byname/ctor_char32_t.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt.byname/ctor_char32_t.pass.cpp index 50bf5834902d7..8e5d70356ab2d 100644 --- a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt.byname/ctor_char32_t.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt.byname/ctor_char32_t.pass.cpp @@ -34,7 +34,7 @@ class my_facet int my_facet::count = 0; -int main() +int main(int, char**) { { std::locale l(std::locale::classic(), new my_facet("en_US")); @@ -66,4 +66,6 @@ int main() assert(my_facet::count == 1); } assert(my_facet::count == 0); + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt.byname/ctor_wchar_t.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt.byname/ctor_wchar_t.pass.cpp index 2379b163151f1..5503192ca98b4 100644 --- a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt.byname/ctor_wchar_t.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt.byname/ctor_wchar_t.pass.cpp @@ -38,7 +38,7 @@ class my_facet int my_facet::count = 0; -int main() +int main(int, char**) { { std::locale l(std::locale::classic(), new my_facet(LOCALE_en_US_UTF_8)); @@ -70,4 +70,6 @@ int main() assert(my_facet::count == 1); } assert(my_facet::count == 0); + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/codecvt_base.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/codecvt_base.pass.cpp index f6b94c5f18574..c2e40542e0eac 100644 --- a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/codecvt_base.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/codecvt_base.pass.cpp @@ -17,10 +17,12 @@ #include #include -int main() +int main(int, char**) { assert(std::codecvt_base::ok == 0); assert(std::codecvt_base::partial == 1); assert(std::codecvt_base::error == 2); assert(std::codecvt_base::noconv == 3); + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/ctor_char.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/ctor_char.pass.cpp index e12d301686c57..3f0dc9e7cc191 100644 --- a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/ctor_char.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/ctor_char.pass.cpp @@ -31,7 +31,7 @@ class my_facet int my_facet::count = 0; -int main() +int main(int, char**) { { std::locale l(std::locale::classic(), new my_facet); @@ -48,4 +48,6 @@ int main() assert(my_facet::count == 1); } assert(my_facet::count == 0); + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/ctor_char16_t.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/ctor_char16_t.pass.cpp index e0ed00dfd6169..e2df342d4e6b9 100644 --- a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/ctor_char16_t.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/ctor_char16_t.pass.cpp @@ -35,7 +35,7 @@ int my_facet::count = 0; //#endif -int main() +int main(int, char**) { //#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS { @@ -54,4 +54,6 @@ int main() } assert(my_facet::count == 0); //#endif + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/ctor_char32_t.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/ctor_char32_t.pass.cpp index 56d63764df605..0df7f3515df72 100644 --- a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/ctor_char32_t.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/ctor_char32_t.pass.cpp @@ -35,7 +35,7 @@ int my_facet::count = 0; //#endif -int main() +int main(int, char**) { //#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS { @@ -54,4 +54,6 @@ int main() } assert(my_facet::count == 0); //#endif + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/ctor_wchar_t.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/ctor_wchar_t.pass.cpp index 8f4293ee83b13..6917e1b72206e 100644 --- a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/ctor_wchar_t.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/ctor_wchar_t.pass.cpp @@ -31,7 +31,7 @@ class my_facet int my_facet::count = 0; -int main() +int main(int, char**) { { std::locale l(std::locale::classic(), new my_facet); @@ -48,4 +48,6 @@ int main() assert(my_facet::count == 1); } assert(my_facet::count == 0); + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_always_noconv.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_always_noconv.pass.cpp index 2f84eb6c92b6c..e1741aec05e4b 100644 --- a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_always_noconv.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_always_noconv.pass.cpp @@ -17,9 +17,11 @@ typedef std::codecvt F; -int main() +int main(int, char**) { std::locale l = std::locale::classic(); const F& f = std::use_facet(l); assert(!f.always_noconv()); + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_encoding.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_encoding.pass.cpp index 4a30c4ee8f9c5..f4614984ad74b 100644 --- a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_encoding.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_encoding.pass.cpp @@ -17,9 +17,11 @@ typedef std::codecvt F; -int main() +int main(int, char**) { std::locale l = std::locale::classic(); const F& f = std::use_facet(l); assert(f.encoding() == 0); + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_in.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_in.pass.cpp index 6a883d3d44fe9..2a6a07ef95768 100644 --- a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_in.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_in.pass.cpp @@ -21,7 +21,7 @@ typedef std::codecvt F; -int main() +int main(int, char**) { std::locale l = std::locale::classic(); const char from[] = "some text"; @@ -36,4 +36,6 @@ int main() assert(to_next - to == 9); for (unsigned i = 0; i < 9; ++i) assert(to[i] == from[i]); + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_length.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_length.pass.cpp index a48b902e1ddd6..038ae971136cf 100644 --- a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_length.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_length.pass.cpp @@ -17,7 +17,7 @@ typedef std::codecvt F; -int main() +int main(int, char**) { std::locale l = std::locale::classic(); const F& f = std::use_facet(l); @@ -28,4 +28,6 @@ int main() assert(f.length(mbs, from, from+10, 9) == 9); assert(f.length(mbs, from, from+10, 10) == 10); assert(f.length(mbs, from, from+10, 100) == 10); + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_max_length.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_max_length.pass.cpp index 69c711f60a34b..bcaa7052876dc 100644 --- a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_max_length.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_max_length.pass.cpp @@ -17,9 +17,11 @@ typedef std::codecvt F; -int main() +int main(int, char**) { std::locale l = std::locale::classic(); const F& f = std::use_facet(l); assert(f.max_length() == 4); + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_out.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_out.pass.cpp index 9b5d0f988ab2c..cff42b0c05492 100644 --- a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_out.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_out.pass.cpp @@ -23,7 +23,7 @@ typedef std::codecvt F; -int main() +int main(int, char**) { std::locale l = std::locale::classic(); const F& f = std::use_facet(l); @@ -41,4 +41,6 @@ int main() for (unsigned i = 0; i < 9; ++i) assert(to[i] == from[i]); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_unshift.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_unshift.pass.cpp index bde44c0889ad0..5b027bae7b5b3 100644 --- a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_unshift.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_unshift.pass.cpp @@ -20,7 +20,7 @@ typedef std::codecvt F; -int main() +int main(int, char**) { std::locale l = std::locale::classic(); std::vector to(3); @@ -29,4 +29,6 @@ int main() char* to_next = 0; assert(f.unshift(mbs, to.data(), to.data() + to.size(), to_next) == F::noconv); assert(to_next == to.data()); + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_always_noconv.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_always_noconv.pass.cpp index 2ef1e5c657ddb..2b2f136e3b44c 100644 --- a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_always_noconv.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_always_noconv.pass.cpp @@ -17,9 +17,11 @@ typedef std::codecvt F; -int main() +int main(int, char**) { std::locale l = std::locale::classic(); const F& f = std::use_facet(l); assert(!f.always_noconv()); + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_encoding.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_encoding.pass.cpp index 834bd607689d0..0d2f35fc2c2a4 100644 --- a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_encoding.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_encoding.pass.cpp @@ -17,9 +17,11 @@ typedef std::codecvt F; -int main() +int main(int, char**) { std::locale l = std::locale::classic(); const F& f = std::use_facet(l); assert(f.encoding() == 0); + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_in.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_in.pass.cpp index 8472a569226a1..eb7c53fcea6a0 100644 --- a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_in.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_in.pass.cpp @@ -21,7 +21,7 @@ typedef std::codecvt F; -int main() +int main(int, char**) { std::locale l = std::locale::classic(); const char from[] = "some text"; @@ -36,4 +36,6 @@ int main() assert(to_next - to == 9); for (unsigned i = 0; i < 9; ++i) assert(to[i] == static_cast(from[i])); + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_length.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_length.pass.cpp index 6986314e3f4a3..da853068883b0 100644 --- a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_length.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_length.pass.cpp @@ -17,7 +17,7 @@ typedef std::codecvt F; -int main() +int main(int, char**) { std::locale l = std::locale::classic(); const F& f = std::use_facet(l); @@ -28,4 +28,6 @@ int main() assert(f.length(mbs, from, from+10, 9) == 9); assert(f.length(mbs, from, from+10, 10) == 10); assert(f.length(mbs, from, from+10, 100) == 10); + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_max_length.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_max_length.pass.cpp index 921ec18549c3b..f31dba747c78b 100644 --- a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_max_length.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_max_length.pass.cpp @@ -17,9 +17,11 @@ typedef std::codecvt F; -int main() +int main(int, char**) { std::locale l = std::locale::classic(); const F& f = std::use_facet(l); assert(f.max_length() == 4); + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_out.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_out.pass.cpp index 210f8c052e57d..7ed5609436c48 100644 --- a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_out.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_out.pass.cpp @@ -23,7 +23,7 @@ typedef std::codecvt F; -int main() +int main(int, char**) { std::locale l = std::locale::classic(); const F& f = std::use_facet(l); @@ -41,4 +41,6 @@ int main() for (unsigned i = 0; i < 9; ++i) assert(static_cast(to[i]) == from[i]); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_unshift.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_unshift.pass.cpp index 26981d3c85c1f..aaf9a6a20e698 100644 --- a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_unshift.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_unshift.pass.cpp @@ -20,7 +20,7 @@ typedef std::codecvt F; -int main() +int main(int, char**) { std::locale l = std::locale::classic(); std::vector to(3); @@ -29,4 +29,6 @@ int main() char* to_next = 0; assert(f.unshift(mbs, to.data(), to.data() + to.size(), to_next) == F::noconv); assert(to_next == to.data()); + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char_always_noconv.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char_always_noconv.pass.cpp index 2590c2b0e62b2..c253bbed72f42 100644 --- a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char_always_noconv.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char_always_noconv.pass.cpp @@ -17,9 +17,11 @@ typedef std::codecvt F; -int main() +int main(int, char**) { std::locale l = std::locale::classic(); const F& f = std::use_facet(l); assert(f.always_noconv()); + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char_encoding.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char_encoding.pass.cpp index 571ab84d8881a..79c26add6ab68 100644 --- a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char_encoding.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char_encoding.pass.cpp @@ -17,9 +17,11 @@ typedef std::codecvt F; -int main() +int main(int, char**) { std::locale l = std::locale::classic(); const F& f = std::use_facet(l); assert(f.encoding() == 1); + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char_in.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char_in.pass.cpp index 2b7c610e461d4..1f2cdb6be4587 100644 --- a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char_in.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char_in.pass.cpp @@ -21,7 +21,7 @@ typedef std::codecvt F; -int main() +int main(int, char**) { std::locale l = std::locale::classic(); const std::basic_string from("some text"); @@ -34,4 +34,6 @@ int main() to.data(), to.data() + to.size(), to_next) == F::noconv); assert(from_next == from.data()); assert(to_next == to.data()); + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char_length.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char_length.pass.cpp index b930009b5169e..ad45cba5f4342 100644 --- a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char_length.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char_length.pass.cpp @@ -17,7 +17,7 @@ typedef std::codecvt F; -int main() +int main(int, char**) { std::locale l = std::locale::classic(); const F& f = std::use_facet(l); @@ -28,4 +28,6 @@ int main() assert(f.length(mbs, from, from+10, 10) == 10); assert(f.length(mbs, from, from+10, 11) == 10); assert(f.length(mbs, from, from+10, 100) == 10); + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char_max_length.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char_max_length.pass.cpp index adc0b1707b168..437e72b94cad4 100644 --- a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char_max_length.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char_max_length.pass.cpp @@ -17,9 +17,11 @@ typedef std::codecvt F; -int main() +int main(int, char**) { std::locale l = std::locale::classic(); const F& f = std::use_facet(l); assert(f.max_length() == 1); + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char_out.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char_out.pass.cpp index 28b4be7455bd2..be266746cdab3 100644 --- a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char_out.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char_out.pass.cpp @@ -21,7 +21,7 @@ typedef std::codecvt F; -int main() +int main(int, char**) { std::locale l = std::locale::classic(); const std::basic_string from("some text"); @@ -34,4 +34,6 @@ int main() to.data(), to.data() + to.size(), to_next) == F::noconv); assert(from_next == from.data()); assert(to_next == to.data()); + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char_unshift.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char_unshift.pass.cpp index 56c10aa52e463..a3d9e3d14bdf3 100644 --- a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char_unshift.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char_unshift.pass.cpp @@ -20,7 +20,7 @@ typedef std::codecvt F; -int main() +int main(int, char**) { std::locale l = std::locale::classic(); std::vector to(3); @@ -29,4 +29,6 @@ int main() char* to_next = 0; assert(f.unshift(mbs, to.data(), to.data() + to.size(), to_next) == F::noconv); assert(to_next == to.data()); + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/utf_sanity_check.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/utf_sanity_check.pass.cpp index 2d338dd8ee054..eaae7b6e97bde 100644 --- a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/utf_sanity_check.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/utf_sanity_check.pass.cpp @@ -20,7 +20,7 @@ #include -int main() +int main(int, char**) { typedef std::codecvt F32_8; typedef std::codecvt F16_8; @@ -123,4 +123,6 @@ int main() assert(c32 == c32x); } } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/wchar_t_always_noconv.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/wchar_t_always_noconv.pass.cpp index df64517476731..484b2213d24bd 100644 --- a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/wchar_t_always_noconv.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/wchar_t_always_noconv.pass.cpp @@ -17,9 +17,11 @@ typedef std::codecvt F; -int main() +int main(int, char**) { std::locale l = std::locale::classic(); const F& f = std::use_facet(l); assert(!f.always_noconv()); + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/wchar_t_encoding.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/wchar_t_encoding.pass.cpp index ed33018b274fb..9c075af137288 100644 --- a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/wchar_t_encoding.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/wchar_t_encoding.pass.cpp @@ -17,9 +17,11 @@ typedef std::codecvt F; -int main() +int main(int, char**) { std::locale l = std::locale::classic(); const F& f = std::use_facet(l); assert(f.encoding() == 1); + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/wchar_t_in.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/wchar_t_in.pass.cpp index 7ca632e4e5e63..bec0e6cb0ac75 100644 --- a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/wchar_t_in.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/wchar_t_in.pass.cpp @@ -22,7 +22,7 @@ typedef std::codecvt F; -int main() +int main(int, char**) { std::locale l = std::locale::classic(); const std::basic_string from("some text"); @@ -39,4 +39,6 @@ int main() assert(static_cast(to_next - to.data()) == expected.size()); assert(static_cast(to_next - to.data()) == expected.size()); assert(to == expected); + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/wchar_t_length.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/wchar_t_length.pass.cpp index 0fcab1af7ae2f..4fd5d32938662 100644 --- a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/wchar_t_length.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/wchar_t_length.pass.cpp @@ -17,7 +17,7 @@ typedef std::codecvt F; -int main() +int main(int, char**) { std::locale l = std::locale::classic(); const F& f = std::use_facet(l); @@ -28,4 +28,6 @@ int main() assert(f.length(mbs, from, from+10, 10) == 10); assert(f.length(mbs, from, from+10, 11) == 10); assert(f.length(mbs, from, from+10, 100) == 10); + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/wchar_t_max_length.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/wchar_t_max_length.pass.cpp index fefd11016fed5..90d91315197f2 100644 --- a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/wchar_t_max_length.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/wchar_t_max_length.pass.cpp @@ -17,9 +17,11 @@ typedef std::codecvt F; -int main() +int main(int, char**) { std::locale l = std::locale::classic(); const F& f = std::use_facet(l); assert(f.max_length() == 1); + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/wchar_t_out.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/wchar_t_out.pass.cpp index 8769b88146926..bc12bdbce646e 100644 --- a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/wchar_t_out.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/wchar_t_out.pass.cpp @@ -23,7 +23,7 @@ typedef std::codecvt F; -int main() +int main(int, char**) { std::locale l = std::locale::classic(); const F& f = std::use_facet(l); @@ -67,4 +67,6 @@ int main() assert(static_cast(to_next - to.data()) == to.size()-1); assert(to.data() == std::string("some te")); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/wchar_t_unshift.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/wchar_t_unshift.pass.cpp index 9241c7a47026a..e0f7c3c9520e8 100644 --- a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/wchar_t_unshift.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/wchar_t_unshift.pass.cpp @@ -22,7 +22,7 @@ typedef std::codecvt F; -int main() +int main(int, char**) { std::locale l = std::locale::classic(); std::vector to(3); @@ -31,4 +31,6 @@ int main() F::extern_type* to_next = 0; assert(f.unshift(mbs, to.data(), to.data() + to.size(), to_next) == F::ok); assert(to_next == to.data()); + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.virtuals/tested_elsewhere.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.virtuals/tested_elsewhere.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.virtuals/tested_elsewhere.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.virtuals/tested_elsewhere.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/types_char.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/types_char.pass.cpp index 12fee2682dabe..455cf03ee7161 100644 --- a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/types_char.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/types_char.pass.cpp @@ -24,7 +24,7 @@ #include #include -int main() +int main(int, char**) { typedef std::codecvt F; static_assert((std::is_base_of::value), ""); @@ -37,4 +37,6 @@ int main() const F& f = std::use_facet(l); ((void)f); // Prevent unused warning (void)F::id; + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/types_char16_t.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/types_char16_t.pass.cpp index b01bd5a7abd50..f52c60f1bfd39 100644 --- a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/types_char16_t.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/types_char16_t.pass.cpp @@ -24,7 +24,7 @@ #include #include -int main() +int main(int, char**) { typedef std::codecvt F; static_assert((std::is_base_of::value), ""); @@ -37,4 +37,6 @@ int main() const F& f = std::use_facet(l); (void)F::id; ((void)f); + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/types_char32_t.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/types_char32_t.pass.cpp index 6ad4697542dc5..c75de419c8675 100644 --- a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/types_char32_t.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/types_char32_t.pass.cpp @@ -24,7 +24,7 @@ #include #include -int main() +int main(int, char**) { typedef std::codecvt F; static_assert((std::is_base_of::value), ""); @@ -37,4 +37,6 @@ int main() const F& f = std::use_facet(l); (void)F::id; ((void)f); + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/types_wchar_t.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/types_wchar_t.pass.cpp index 6c19e41a8e447..07e25be718c3e 100644 --- a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/types_wchar_t.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/types_wchar_t.pass.cpp @@ -24,7 +24,7 @@ #include #include -int main() +int main(int, char**) { typedef std::codecvt F; static_assert((std::is_base_of::value), ""); @@ -37,4 +37,6 @@ int main() const F& f = std::use_facet(l); ((void)f); // Prevent unused warning (void)F::id; + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/is_1.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/is_1.pass.cpp index 32acd85d18bb4..3331c5a67d803 100644 --- a/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/is_1.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/is_1.pass.cpp @@ -20,7 +20,7 @@ #include "platform_support.h" // locale name macros -int main() +int main(int, char**) { { std::locale l(LOCALE_en_US_UTF_8); @@ -108,4 +108,6 @@ int main() assert(!f.is(F::upper, L'\x00DA')); } } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/is_many.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/is_many.pass.cpp index 1087b88c0c2b6..6751fd60de0b1 100644 --- a/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/is_many.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/is_many.pass.cpp @@ -23,7 +23,7 @@ #include "platform_support.h" // locale name macros -int main() +int main(int, char**) { { std::locale l(LOCALE_en_US_UTF_8); @@ -243,4 +243,6 @@ int main() assert( (m[6] & F::graph)); } } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/mask.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/mask.pass.cpp index 45d90ddd540fe..3a6360eb9dee8 100644 --- a/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/mask.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/mask.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { std::locale l("C"); @@ -49,4 +49,6 @@ int main() assert( cf.is(CF::alpha, 'a')); } } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/narrow_1.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/narrow_1.pass.cpp index 19d751d29956b..6d19377250194 100644 --- a/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/narrow_1.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/narrow_1.pass.cpp @@ -20,7 +20,7 @@ #include "platform_support.h" // locale name macros -int main() +int main(int, char**) { { std::locale l(std::string(LOCALE_fr_CA_ISO8859_1)); @@ -52,4 +52,6 @@ int main() assert(f.narrow(L'\xDA', '*') == '*'); } } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/narrow_many.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/narrow_many.pass.cpp index c51b97311a15d..7ab4874fbcd3a 100644 --- a/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/narrow_many.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/narrow_many.pass.cpp @@ -22,7 +22,7 @@ #include "platform_support.h" // locale name macros -int main() +int main(int, char**) { { std::locale l(LOCALE_fr_CA_ISO8859_1); @@ -60,4 +60,6 @@ int main() assert(v[6] == '*'); } } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/scan_is.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/scan_is.pass.cpp index 6c875863fb5b7..b736dd7862c8d 100644 --- a/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/scan_is.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/scan_is.pass.cpp @@ -23,7 +23,7 @@ #include "platform_support.h" // locale name macros -int main() +int main(int, char**) { { std::locale l(LOCALE_en_US_UTF_8); @@ -67,4 +67,6 @@ int main() assert(f.scan_is(F::graph, in.data(), in.data() + in.size()) - in.data() == 2); } } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/scan_not.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/scan_not.pass.cpp index dbeeae4c6991a..fa7674a8ca085 100644 --- a/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/scan_not.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/scan_not.pass.cpp @@ -23,7 +23,7 @@ #include "platform_support.h" // locale name macros -int main() +int main(int, char**) { { std::locale l(LOCALE_en_US_UTF_8); @@ -67,4 +67,6 @@ int main() assert(f.scan_not(F::graph, in.data(), in.data() + in.size()) - in.data() == 0); } } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/tolower_1.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/tolower_1.pass.cpp index 3f9ab9dce2717..ab5daa7aa3886 100644 --- a/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/tolower_1.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/tolower_1.pass.cpp @@ -19,7 +19,7 @@ #include "platform_support.h" // locale name macros -int main() +int main(int, char**) { { std::locale l; @@ -88,4 +88,6 @@ int main() assert(f.tolower(L'\xFA') == L'\xFA'); } } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/tolower_many.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/tolower_many.pass.cpp index 29021e0f4cef8..29403cb10101b 100644 --- a/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/tolower_many.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/tolower_many.pass.cpp @@ -20,7 +20,7 @@ #include "platform_support.h" // locale name macros -int main() +int main(int, char**) { { std::locale l; @@ -94,4 +94,6 @@ int main() assert(in[6] == L'1'); } } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_1.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_1.pass.cpp index b9c882c9a7482..56304a7558aa6 100644 --- a/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_1.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_1.pass.cpp @@ -20,7 +20,7 @@ #include "platform_support.h" // locale name macros -int main() +int main(int, char**) { { std::locale l; @@ -90,4 +90,6 @@ int main() assert(f.toupper(L'\xFA') == L'\xFA'); } } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_many.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_many.pass.cpp index 2b0669cb30e22..bfc3bf848ad10 100644 --- a/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_many.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_many.pass.cpp @@ -20,7 +20,7 @@ #include "platform_support.h" // locale name macros -int main() +int main(int, char**) { { std::locale l; @@ -94,4 +94,6 @@ int main() assert(in[6] == L'1'); } } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/types.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/types.pass.cpp index 9ec94681611b3..ce0a0e30ed6cc 100644 --- a/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/types.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/types.pass.cpp @@ -28,7 +28,7 @@ #include "platform_support.h" // locale name macros -int main() +int main(int, char**) { { std::locale l(LOCALE_en_US_UTF_8); @@ -56,4 +56,6 @@ int main() == &std::use_facet >(l)); } } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/widen_1.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/widen_1.pass.cpp index 5752bb82bb8e7..1dc9b7de80566 100644 --- a/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/widen_1.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/widen_1.pass.cpp @@ -23,7 +23,7 @@ #include "platform_support.h" // locale name macros -int main() +int main(int, char**) { { std::locale l; @@ -61,4 +61,6 @@ int main() #endif } } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/widen_many.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/widen_many.pass.cpp index 4f5efca1d66d0..67a97ba68265d 100644 --- a/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/widen_many.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/widen_many.pass.cpp @@ -23,7 +23,7 @@ #include "platform_support.h" // locale name macros -int main() +int main(int, char**) { { std::locale l(LOCALE_en_US_UTF_8); @@ -67,4 +67,6 @@ int main() #endif } } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype/ctor.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype/ctor.pass.cpp index e41b93b78a29e..f53d4e9645d35 100644 --- a/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype/ctor.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype/ctor.pass.cpp @@ -30,7 +30,7 @@ class my_facet template int my_facet::count = 0; -int main() +int main(int, char**) { { std::locale l(std::locale::classic(), new my_facet); @@ -47,4 +47,6 @@ int main() assert(my_facet::count == 1); } assert(my_facet::count == 0); + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/is_1.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/is_1.pass.cpp index a48f75f4f7db6..23a1aa9d21a2e 100644 --- a/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/is_1.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/is_1.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { std::locale l = std::locale::classic(); { @@ -55,4 +55,6 @@ int main() assert(f.is(F::graph, L'.')); assert(!f.is(F::graph, L'\x07')); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/is_many.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/is_many.pass.cpp index f348d208077f6..d9dd5b58ab461 100644 --- a/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/is_many.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/is_many.pass.cpp @@ -19,7 +19,7 @@ #include -int main() +int main(int, char**) { std::locale l = std::locale::classic(); { @@ -114,4 +114,6 @@ int main() assert( (m[5] & F::alnum)); assert( (m[5] & F::graph)); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/narrow_1.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/narrow_1.pass.cpp index 1e1194bdad8ed..55e1f378b4397 100644 --- a/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/narrow_1.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/narrow_1.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { std::locale l = std::locale::classic(); { @@ -29,4 +29,6 @@ int main() assert(f.narrow(L'a', '*') == 'a'); assert(f.narrow(L'1', '*') == '1'); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/narrow_many.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/narrow_many.pass.cpp index 523fb25034276..47c2b51887e3f 100644 --- a/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/narrow_many.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/narrow_many.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { std::locale l = std::locale::classic(); { @@ -34,4 +34,6 @@ int main() assert(v[4] == 'a'); assert(v[5] == '1'); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/scan_is.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/scan_is.pass.cpp index 23718fec18a56..1891b155b312a 100644 --- a/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/scan_is.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/scan_is.pass.cpp @@ -19,7 +19,7 @@ #include -int main() +int main(int, char**) { std::locale l = std::locale::classic(); { @@ -40,4 +40,6 @@ int main() assert(f.scan_is(F::alnum, in.data(), in.data() + in.size()) - in.data() == 1); assert(f.scan_is(F::graph, in.data(), in.data() + in.size()) - in.data() == 1); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/scan_not.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/scan_not.pass.cpp index 22bc14701990c..40cc8c0fa0dff 100644 --- a/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/scan_not.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/scan_not.pass.cpp @@ -19,7 +19,7 @@ #include -int main() +int main(int, char**) { std::locale l = std::locale::classic(); { @@ -40,4 +40,6 @@ int main() assert(f.scan_not(F::alnum, in.data(), in.data() + in.size()) - in.data() == 0); assert(f.scan_not(F::graph, in.data(), in.data() + in.size()) - in.data() == 0); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/tolower_1.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/tolower_1.pass.cpp index b5c402de2124c..1ae14410c6f9e 100644 --- a/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/tolower_1.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/tolower_1.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { std::locale l = std::locale::classic(); { @@ -29,4 +29,6 @@ int main() assert(f.tolower(L'a') == L'a'); assert(f.tolower(L'1') == L'1'); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/tolower_many.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/tolower_many.pass.cpp index 92bbc8ceb431b..711343d3c5aa5 100644 --- a/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/tolower_many.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/tolower_many.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { std::locale l = std::locale::classic(); { @@ -32,4 +32,6 @@ int main() assert(in[4] == L'a'); assert(in[5] == L'1'); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/toupper_1.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/toupper_1.pass.cpp index 0ed6e4504fb59..fbc28a1b87cb8 100644 --- a/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/toupper_1.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/toupper_1.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { std::locale l = std::locale::classic(); { @@ -29,4 +29,6 @@ int main() assert(f.toupper(L'a') == L'A'); assert(f.toupper(L'1') == L'1'); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/toupper_many.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/toupper_many.pass.cpp index 0510778eb3b1a..963e894a7e12d 100644 --- a/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/toupper_many.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/toupper_many.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { std::locale l = std::locale::classic(); { @@ -32,4 +32,6 @@ int main() assert(in[4] == L'A'); assert(in[5] == L'1'); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/widen_1.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/widen_1.pass.cpp index 1737de8f0f7df..c2570a3113643 100644 --- a/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/widen_1.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/widen_1.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { std::locale l = std::locale::classic(); { @@ -29,4 +29,6 @@ int main() assert(f.widen('a') == L'a'); assert(f.widen('1') == L'1'); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/widen_many.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/widen_many.pass.cpp index 3942268ebd240..a43817a25a1c5 100644 --- a/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/widen_many.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/widen_many.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { std::locale l = std::locale::classic(); { @@ -34,4 +34,6 @@ int main() assert(v[4] == L'a'); assert(v[5] == L'1'); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.virtuals/tested_elsewhere.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.virtuals/tested_elsewhere.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.virtuals/tested_elsewhere.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.virtuals/tested_elsewhere.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype/types.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype/types.pass.cpp index 89ac905a2e5e5..35b5d3282b947 100644 --- a/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype/types.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype/types.pass.cpp @@ -21,7 +21,7 @@ #include #include -int main() +int main(int, char**) { std::locale l = std::locale::classic(); { @@ -35,4 +35,6 @@ int main() static_assert((std::is_base_of >::value), ""); static_assert((std::is_base_of >::value), ""); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.messages/locale.messages.byname/nothing_to_do.pass.cpp b/libcxx/test/std/localization/locale.categories/category.messages/locale.messages.byname/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/localization/locale.categories/category.messages/locale.messages.byname/nothing_to_do.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.messages/locale.messages.byname/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.messages/locale.messages/ctor.pass.cpp b/libcxx/test/std/localization/locale.categories/category.messages/locale.messages/ctor.pass.cpp index df42b522c7bb0..ddbbe66694bed 100644 --- a/libcxx/test/std/localization/locale.categories/category.messages/locale.messages/ctor.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.messages/locale.messages/ctor.pass.cpp @@ -31,7 +31,7 @@ class my_facet int my_facet::count = 0; -int main() +int main(int, char**) { { std::locale l(std::locale::classic(), new my_facet); @@ -48,4 +48,6 @@ int main() assert(my_facet::count == 1); } assert(my_facet::count == 0); + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.messages/locale.messages/locale.messages.members/not_testable.pass.cpp b/libcxx/test/std/localization/locale.categories/category.messages/locale.messages/locale.messages.members/not_testable.pass.cpp index 994a97211a4d3..c0166f80f3429 100644 --- a/libcxx/test/std/localization/locale.categories/category.messages/locale.messages/locale.messages.members/not_testable.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.messages/locale.messages/locale.messages.members/not_testable.pass.cpp @@ -28,6 +28,8 @@ class F : std::messages(refs) {} }; -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.messages/locale.messages/locale.messages.virtuals/tested_elsewhere.pass.cpp b/libcxx/test/std/localization/locale.categories/category.messages/locale.messages/locale.messages.virtuals/tested_elsewhere.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/localization/locale.categories/category.messages/locale.messages/locale.messages.virtuals/tested_elsewhere.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.messages/locale.messages/locale.messages.virtuals/tested_elsewhere.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.messages/locale.messages/messages_base.pass.cpp b/libcxx/test/std/localization/locale.categories/category.messages/locale.messages/messages_base.pass.cpp index 7f2e4f9b9abdd..ce6d70be72884 100644 --- a/libcxx/test/std/localization/locale.categories/category.messages/locale.messages/messages_base.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.messages/locale.messages/messages_base.pass.cpp @@ -17,7 +17,9 @@ #include #include -int main() +int main(int, char**) { std::messages_base mb; + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.messages/locale.messages/types.pass.cpp b/libcxx/test/std/localization/locale.categories/category.messages/locale.messages/types.pass.cpp index 454d9b1824271..436290698cc15 100644 --- a/libcxx/test/std/localization/locale.categories/category.messages/locale.messages/types.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.messages/locale.messages/types.pass.cpp @@ -20,7 +20,7 @@ #include #include -int main() +int main(int, char**) { static_assert((std::is_base_of >::value), ""); static_assert((std::is_base_of >::value), ""); @@ -30,4 +30,6 @@ int main() static_assert((std::is_same::char_type, wchar_t>::value), ""); static_assert((std::is_same::string_type, std::string>::value), ""); static_assert((std::is_same::string_type, std::wstring>::value), ""); + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.messages/nothing_to_do.pass.cpp b/libcxx/test/std/localization/locale.categories/category.messages/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/localization/locale.categories/category.messages/nothing_to_do.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.messages/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/ctor.pass.cpp b/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/ctor.pass.cpp index f70f8eeadd3a2..360ff3ad61f5f 100644 --- a/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/ctor.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/ctor.pass.cpp @@ -31,7 +31,7 @@ class my_facet int my_facet::count = 0; -int main() +int main(int, char**) { { std::locale l(std::locale::classic(), new my_facet); @@ -48,4 +48,6 @@ int main() assert(my_facet::count == 1); } assert(my_facet::count == 0); + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_en_US.pass.cpp b/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_en_US.pass.cpp index 94f9bd7a9a636..9fec21f51b96d 100644 --- a/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_en_US.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_en_US.pass.cpp @@ -43,7 +43,7 @@ class my_facetw : Fw(refs) {} }; -int main() +int main(int, char**) { std::ios ios(0); std::string loc_name(LOCALE_en_US_UTF_8); @@ -719,4 +719,6 @@ int main() assert(err == std::ios_base::failbit); } } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_fr_FR.pass.cpp b/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_fr_FR.pass.cpp index 27ae11eed5765..292f5eaea9269 100644 --- a/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_fr_FR.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_fr_FR.pass.cpp @@ -76,7 +76,7 @@ static std::wstring convert_thousands_sep(std::wstring const& in) { #endif } -int main() +int main(int, char**) { std::ios ios(0); std::string loc_name(LOCALE_fr_FR_UTF_8); @@ -753,4 +753,6 @@ int main() assert(ex == 123456789); } } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_ru_RU.pass.cpp b/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_ru_RU.pass.cpp index b543799accbab..c13849804fcdd 100644 --- a/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_ru_RU.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_ru_RU.pass.cpp @@ -55,7 +55,7 @@ class my_facetw : Fw(refs) {} }; -int main() +int main(int, char**) { std::ios ios(0); std::string loc_name(LOCALE_ru_RU_UTF_8); @@ -735,4 +735,6 @@ int main() assert(ex == -123456789); } } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_zh_CN.pass.cpp b/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_zh_CN.pass.cpp index 20ba6f4914a12..9b006f55b7a28 100644 --- a/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_zh_CN.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_zh_CN.pass.cpp @@ -49,7 +49,7 @@ class my_facetw : Fw(refs) {} }; -int main() +int main(int, char**) { std::ios ios(0); std::string loc_name(LOCALE_zh_CN_UTF_8); @@ -725,4 +725,6 @@ int main() assert(err == std::ios_base::failbit); } } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_string_en_US.pass.cpp b/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_string_en_US.pass.cpp index a5cb05334c4e1..1b1a471e185c3 100644 --- a/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_string_en_US.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_string_en_US.pass.cpp @@ -43,7 +43,7 @@ class my_facetw : Fw(refs) {} }; -int main() +int main(int, char**) { std::ios ios(0); std::string loc_name(LOCALE_en_US_UTF_8); @@ -727,4 +727,6 @@ int main() assert(ex == L""); } } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.virtuals/tested_elsewhere.pass.cpp b/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.virtuals/tested_elsewhere.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.virtuals/tested_elsewhere.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.virtuals/tested_elsewhere.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/types.pass.cpp b/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/types.pass.cpp index 9ad7528c2054b..7bc04801efaa9 100644 --- a/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/types.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/types.pass.cpp @@ -20,7 +20,7 @@ #include #include -int main() +int main(int, char**) { static_assert((std::is_base_of >::value), ""); static_assert((std::is_base_of >::value), ""); @@ -30,4 +30,6 @@ int main() static_assert((std::is_same::iter_type, std::istreambuf_iterator >::value), ""); static_assert((std::is_same::string_type, std::string>::value), ""); static_assert((std::is_same::string_type, std::wstring>::value), ""); + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/ctor.pass.cpp b/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/ctor.pass.cpp index bdbb0b6cd6008..309d26c5d74a9 100644 --- a/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/ctor.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/ctor.pass.cpp @@ -31,7 +31,7 @@ class my_facet int my_facet::count = 0; -int main() +int main(int, char**) { { std::locale l(std::locale::classic(), new my_facet); @@ -48,4 +48,6 @@ int main() assert(my_facet::count == 1); } assert(my_facet::count == 0); + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_en_US.pass.cpp b/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_en_US.pass.cpp index 28f7451e9096d..d6e4d6cc1d9a8 100644 --- a/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_en_US.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_en_US.pass.cpp @@ -43,7 +43,7 @@ class my_facetw : Fw(refs) {} }; -int main() +int main(int, char**) { std::ios ios(0); std::string loc_name(LOCALE_en_US_UTF_8); @@ -490,4 +490,6 @@ int main() assert(ios.width() == 0); } } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_fr_FR.pass.cpp b/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_fr_FR.pass.cpp index e9e916a3ce54c..72f3f65706ffd 100644 --- a/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_fr_FR.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_fr_FR.pass.cpp @@ -78,7 +78,7 @@ static std::wstring convert_thousands_sep(std::wstring const& in) { #endif } -int main() +int main(int, char**) { std::ios ios(0); std::string loc_name(LOCALE_fr_FR_UTF_8); @@ -524,4 +524,6 @@ int main() assert(ios.width() == 0); } } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_ru_RU.pass.cpp b/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_ru_RU.pass.cpp index 1894144db6270..36f97b1d8164b 100644 --- a/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_ru_RU.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_ru_RU.pass.cpp @@ -55,7 +55,7 @@ class my_facetw : Fw(refs) {} }; -int main() +int main(int, char**) { std::ios ios(0); std::string loc_name(LOCALE_ru_RU_UTF_8); @@ -501,4 +501,6 @@ int main() assert(ios.width() == 0); } } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_zh_CN.pass.cpp b/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_zh_CN.pass.cpp index 0a3d478ec67d5..a300ba8475238 100644 --- a/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_zh_CN.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_zh_CN.pass.cpp @@ -49,7 +49,7 @@ class my_facetw : Fw(refs) {} }; -int main() +int main(int, char**) { std::ios ios(0); std::string loc_name(LOCALE_zh_CN_UTF_8); @@ -495,4 +495,6 @@ int main() assert(ios.width() == 0); } } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_string_en_US.pass.cpp b/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_string_en_US.pass.cpp index ab4a5c6034b79..cd1ff643f8331 100644 --- a/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_string_en_US.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_string_en_US.pass.cpp @@ -43,7 +43,7 @@ class my_facetw : Fw(refs) {} }; -int main() +int main(int, char**) { std::ios ios(0); std::string loc_name(LOCALE_en_US_UTF_8); @@ -490,4 +490,6 @@ int main() assert(ios.width() == 0); } } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.virtuals/tested_elsewhere.pass.cpp b/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.virtuals/tested_elsewhere.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.virtuals/tested_elsewhere.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.virtuals/tested_elsewhere.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/types.pass.cpp b/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/types.pass.cpp index 27c2ff5d6b3b7..bd797313c85ed 100644 --- a/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/types.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/types.pass.cpp @@ -20,7 +20,7 @@ #include #include -int main() +int main(int, char**) { static_assert((std::is_base_of >::value), ""); static_assert((std::is_base_of >::value), ""); @@ -30,4 +30,6 @@ int main() static_assert((std::is_same::iter_type, std::ostreambuf_iterator >::value), ""); static_assert((std::is_same::string_type, std::string>::value), ""); static_assert((std::is_same::string_type, std::wstring>::value), ""); + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/curr_symbol.pass.cpp b/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/curr_symbol.pass.cpp index f04ff4fb6142a..43a2fbc173d02 100644 --- a/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/curr_symbol.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/curr_symbol.pass.cpp @@ -75,7 +75,7 @@ static bool glibc_version_less_than(char const* version) { } #endif -int main() +int main(int, char**) { { Fnf f("C", 1); @@ -179,4 +179,6 @@ int main() Fwt f(LOCALE_zh_CN_UTF_8, 1); assert(f.curr_symbol() == L"CNY "); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/decimal_point.pass.cpp b/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/decimal_point.pass.cpp index a64388ca5ce75..bec52e6abc0dd 100644 --- a/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/decimal_point.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/decimal_point.pass.cpp @@ -56,7 +56,7 @@ class Fwt : std::moneypunct_byname(nm, refs) {} }; -int main() +int main(int, char**) { { Fnf f("C", 1); @@ -153,4 +153,6 @@ int main() Fwt f(LOCALE_zh_CN_UTF_8, 1); assert(f.decimal_point() == L'.'); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/frac_digits.pass.cpp b/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/frac_digits.pass.cpp index 9bbc76868a8b8..07d78229a4fe1 100644 --- a/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/frac_digits.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/frac_digits.pass.cpp @@ -55,7 +55,7 @@ class Fwt : std::moneypunct_byname(nm, refs) {} }; -int main() +int main(int, char**) { { Fnf f("C", 1); @@ -141,4 +141,6 @@ int main() Fwt f(LOCALE_zh_CN_UTF_8, 1); assert(f.frac_digits() == 2); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/grouping.pass.cpp b/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/grouping.pass.cpp index 7ff50db737f83..2c2da48642e09 100644 --- a/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/grouping.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/grouping.pass.cpp @@ -60,7 +60,7 @@ class Fwt : std::moneypunct_byname(nm, refs) {} }; -int main() +int main(int, char**) { // Monetary grouping strings may be terminated with 0 or CHAR_MAX, defining // how the grouping is repeated. @@ -149,4 +149,6 @@ int main() Fwt f(LOCALE_zh_CN_UTF_8, 1); assert(f.grouping() == "\3"); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/neg_format.pass.cpp b/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/neg_format.pass.cpp index 6cd00de657ce9..f3f637b60df58 100644 --- a/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/neg_format.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/neg_format.pass.cpp @@ -60,7 +60,7 @@ class Fwt : std::moneypunct_byname(nm, refs) {} }; -int main() +int main(int, char**) { { Fnf f("C", 1); @@ -226,4 +226,6 @@ int main() assert(p.field[2] == std::money_base::none); assert(p.field[3] == std::money_base::value); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/negative_sign.pass.cpp b/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/negative_sign.pass.cpp index 6857810bd0300..5567fc08eb541 100644 --- a/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/negative_sign.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/negative_sign.pass.cpp @@ -55,7 +55,7 @@ class Fwt : std::moneypunct_byname(nm, refs) {} }; -int main() +int main(int, char**) { { Fnf f("C", 1); @@ -141,4 +141,6 @@ int main() Fwt f(LOCALE_zh_CN_UTF_8, 1); assert(f.negative_sign() == L"-"); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/pos_format.pass.cpp b/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/pos_format.pass.cpp index ff3cdcdb2fd1c..f7d396a662516 100644 --- a/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/pos_format.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/pos_format.pass.cpp @@ -60,7 +60,7 @@ class Fwt : std::moneypunct_byname(nm, refs) {} }; -int main() +int main(int, char**) { { Fnf f("C", 1); @@ -226,4 +226,6 @@ int main() assert(p.field[2] == std::money_base::none); assert(p.field[3] == std::money_base::value); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/positive_sign.pass.cpp b/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/positive_sign.pass.cpp index 50a7ca939baa7..43dfa2a2f1831 100644 --- a/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/positive_sign.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/positive_sign.pass.cpp @@ -55,7 +55,7 @@ class Fwt : std::moneypunct_byname(nm, refs) {} }; -int main() +int main(int, char**) { { Fnf f("C", 1); @@ -141,4 +141,6 @@ int main() Fwt f(LOCALE_zh_CN_UTF_8, 1); assert(f.positive_sign() == L""); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/thousands_sep.pass.cpp b/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/thousands_sep.pass.cpp index e0bfd88a8bfd0..c789c4e5b1b1e 100644 --- a/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/thousands_sep.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/thousands_sep.pass.cpp @@ -59,7 +59,7 @@ class Fwt : std::moneypunct_byname(nm, refs) {} }; -int main() +int main(int, char**) { { Fnf f("C", 1); @@ -170,4 +170,6 @@ int main() Fwt f(LOCALE_zh_CN_UTF_8, 1); assert(f.thousands_sep() == L','); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct/ctor.pass.cpp b/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct/ctor.pass.cpp index 4717d4c0f1dcc..3b52f7afc742a 100644 --- a/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct/ctor.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct/ctor.pass.cpp @@ -31,7 +31,7 @@ class my_facet int my_facet::count = 0; -int main() +int main(int, char**) { { std::locale l(std::locale::classic(), new my_facet); @@ -48,4 +48,6 @@ int main() assert(my_facet::count == 1); } assert(my_facet::count == 0); + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/curr_symbol.pass.cpp b/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/curr_symbol.pass.cpp index 5773224258678..7b3b75a19c213 100644 --- a/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/curr_symbol.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/curr_symbol.pass.cpp @@ -53,7 +53,7 @@ class Fwt : std::moneypunct(refs) {} }; -int main() +int main(int, char**) { { Fnf f(1); @@ -71,4 +71,6 @@ int main() Fwt f(1); assert(f.curr_symbol() == std::wstring()); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/decimal_point.pass.cpp b/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/decimal_point.pass.cpp index 206f325354d55..34d02032cc935 100644 --- a/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/decimal_point.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/decimal_point.pass.cpp @@ -53,7 +53,7 @@ class Fwt : std::moneypunct(refs) {} }; -int main() +int main(int, char**) { { Fnf f(1); @@ -71,4 +71,6 @@ int main() Fwt f(1); assert(f.decimal_point() == std::numeric_limits::max()); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/frac_digits.pass.cpp b/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/frac_digits.pass.cpp index b27ecd6df9f76..50365584d2453 100644 --- a/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/frac_digits.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/frac_digits.pass.cpp @@ -53,7 +53,7 @@ class Fwt : std::moneypunct(refs) {} }; -int main() +int main(int, char**) { { Fnf f(1); @@ -71,4 +71,6 @@ int main() Fwt f(1); assert(f.frac_digits() == 0); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/grouping.pass.cpp b/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/grouping.pass.cpp index e959ad8abadf4..9e12e322044c5 100644 --- a/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/grouping.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/grouping.pass.cpp @@ -53,7 +53,7 @@ class Fwt : std::moneypunct(refs) {} }; -int main() +int main(int, char**) { { Fnf f(1); @@ -71,4 +71,6 @@ int main() Fwt f(1); assert(f.grouping() == std::string()); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/neg_format.pass.cpp b/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/neg_format.pass.cpp index e9950b1a78ed8..cb51199095981 100644 --- a/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/neg_format.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/neg_format.pass.cpp @@ -50,7 +50,7 @@ class Fwt : std::moneypunct(refs) {} }; -int main() +int main(int, char**) { { Fnf f(1); @@ -84,4 +84,6 @@ int main() assert(p.field[2] == std::money_base::none); assert(p.field[3] == std::money_base::value); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/negative_sign.pass.cpp b/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/negative_sign.pass.cpp index 3ef5e84fc05ce..6f134e7847e5b 100644 --- a/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/negative_sign.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/negative_sign.pass.cpp @@ -54,7 +54,7 @@ class Fwt : std::moneypunct(refs) {} }; -int main() +int main(int, char**) { { Fnf f(1); @@ -72,4 +72,6 @@ int main() Fwt f(1); assert(f.negative_sign() == L"-"); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/pos_format.pass.cpp b/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/pos_format.pass.cpp index 3c3034bbe9ddf..bff44a69d88f2 100644 --- a/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/pos_format.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/pos_format.pass.cpp @@ -50,7 +50,7 @@ class Fwt : std::moneypunct(refs) {} }; -int main() +int main(int, char**) { { Fnf f(1); @@ -84,4 +84,6 @@ int main() assert(p.field[2] == std::money_base::none); assert(p.field[3] == std::money_base::value); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/positive_sign.pass.cpp b/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/positive_sign.pass.cpp index dbe3e4ba78636..8686e20051b25 100644 --- a/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/positive_sign.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/positive_sign.pass.cpp @@ -53,7 +53,7 @@ class Fwt : std::moneypunct(refs) {} }; -int main() +int main(int, char**) { { Fnf f(1); @@ -71,4 +71,6 @@ int main() Fwt f(1); assert(f.positive_sign() == std::wstring()); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/thousands_sep.pass.cpp b/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/thousands_sep.pass.cpp index 7b24c6dc9ed8b..42d28d09656ce 100644 --- a/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/thousands_sep.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/thousands_sep.pass.cpp @@ -53,7 +53,7 @@ class Fwt : std::moneypunct(refs) {} }; -int main() +int main(int, char**) { { Fnf f(1); @@ -71,4 +71,6 @@ int main() Fwt f(1); assert(f.thousands_sep() == std::numeric_limits::max()); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.virtuals/tested_elsewhere.pass.cpp b/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.virtuals/tested_elsewhere.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.virtuals/tested_elsewhere.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.virtuals/tested_elsewhere.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct/money_base.pass.cpp b/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct/money_base.pass.cpp index d02c3b43e8adc..58f04905a0a66 100644 --- a/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct/money_base.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct/money_base.pass.cpp @@ -18,7 +18,7 @@ #include #include -int main() +int main(int, char**) { std::money_base mb; ((void)mb); static_assert(std::money_base::none == 0, ""); @@ -29,4 +29,6 @@ int main() static_assert(sizeof(std::money_base::pattern) == 4, ""); std::money_base::pattern p; p.field[0] = std::money_base::none; + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct/types.pass.cpp b/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct/types.pass.cpp index 439f8c31f732c..24ddadfb3a7e4 100644 --- a/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct/types.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct/types.pass.cpp @@ -29,7 +29,7 @@ template void test(const T &) {} -int main() +int main(int, char**) { static_assert((std::is_base_of >::value), ""); static_assert((std::is_base_of >::value), ""); @@ -44,4 +44,6 @@ int main() test(std::moneypunct::intl); test(std::moneypunct::intl); test(std::moneypunct::intl); + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.monetary/nothing_to_do.pass.cpp b/libcxx/test/std/localization/locale.categories/category.monetary/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/localization/locale.categories/category.monetary/nothing_to_do.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.monetary/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/ctor.pass.cpp b/libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/ctor.pass.cpp index afb58d5e214c2..5a3af4b953659 100644 --- a/libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/ctor.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/ctor.pass.cpp @@ -31,7 +31,7 @@ class my_facet int my_facet::count = 0; -int main() +int main(int, char**) { { std::locale l(std::locale::classic(), new my_facet); @@ -48,4 +48,6 @@ int main() assert(my_facet::count == 1); } assert(my_facet::count == 0); + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_bool.pass.cpp b/libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_bool.pass.cpp index 0c71a7354736e..79aa68dde8b70 100644 --- a/libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_bool.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_bool.pass.cpp @@ -39,7 +39,7 @@ class my_numpunct virtual string_type do_falsename() const {return "no";} }; -int main() +int main(int, char**) { const my_facet f(1); { @@ -96,4 +96,6 @@ int main() assert(ex == "yes"); } } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_double.pass.cpp b/libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_double.pass.cpp index 0d30bbf70964d..062d5cfd40491 100644 --- a/libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_double.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_double.pass.cpp @@ -17876,7 +17876,7 @@ void test8() } } -int main() +int main(int, char**) { test1(); test2(); @@ -17886,4 +17886,6 @@ int main() test6(); test7(); test8(); + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long.pass.cpp b/libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long.pass.cpp index 5cf9bfa1f7adb..1aee8bdfe864a 100644 --- a/libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long.pass.cpp @@ -39,7 +39,7 @@ class my_numpunct virtual std::string do_grouping() const {return std::string("\1\2\3");} }; -int main() +int main(int, char**) { const my_facet f(1); { @@ -340,4 +340,6 @@ int main() assert(ex == "-***1_00_0"); assert(ios.width() == 0); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long_double.pass.cpp b/libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long_double.pass.cpp index 5fcc0e4646bf3..3e71a1dfbfb8b 100644 --- a/libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long_double.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long_double.pass.cpp @@ -26206,7 +26206,7 @@ void test12() #endif } -int main() +int main(int, char**) { test1(); test2(); @@ -26246,4 +26246,6 @@ int main() { long double v = std::nan(""); ((void)v); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long_long.pass.cpp b/libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long_long.pass.cpp index 18d96754be787..a3c49d36ae6d4 100644 --- a/libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long_long.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long_long.pass.cpp @@ -39,7 +39,7 @@ class my_numpunct virtual std::string do_grouping() const {return std::string("\1\2\3");} }; -int main() +int main(int, char**) { const my_facet f(1); { @@ -340,4 +340,6 @@ int main() assert(ex == "-***1_00_0"); assert(ios.width() == 0); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_pointer.pass.cpp b/libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_pointer.pass.cpp index f4fdf762067f5..d366c3842bf91 100644 --- a/libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_pointer.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_pointer.pass.cpp @@ -28,7 +28,7 @@ class my_facet : F(refs) {} }; -int main() +int main(int, char**) { const my_facet f(1); { @@ -45,4 +45,6 @@ int main() assert(rc > 0); assert(ex == expected_str); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_unsigned_long.pass.cpp b/libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_unsigned_long.pass.cpp index 98aba106cc19d..420d22fb02869 100644 --- a/libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_unsigned_long.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_unsigned_long.pass.cpp @@ -39,7 +39,7 @@ class my_numpunct virtual std::string do_grouping() const {return std::string("\1\2\3");} }; -int main() +int main(int, char**) { const my_facet f(1); { @@ -343,4 +343,6 @@ int main() : "18_446_744_073_709_550_61_6")); assert(ios.width() == 0); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_unsigned_long_long.pass.cpp b/libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_unsigned_long_long.pass.cpp index ccebb6ce1a49c..1ad3065c074ba 100644 --- a/libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_unsigned_long_long.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_unsigned_long_long.pass.cpp @@ -39,7 +39,7 @@ class my_numpunct virtual std::string do_grouping() const {return std::string("\1\2\3");} }; -int main() +int main(int, char**) { const my_facet f(1); { @@ -340,4 +340,6 @@ int main() assert(ex == "18_446_744_073_709_550_61_6"); assert(ios.width() == 0); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.virtuals/tested_elsewhere.pass.cpp b/libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.virtuals/tested_elsewhere.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.virtuals/tested_elsewhere.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.virtuals/tested_elsewhere.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/types.pass.cpp b/libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/types.pass.cpp index 19e8ceeb02584..6011c75c1fe69 100644 --- a/libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/types.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/types.pass.cpp @@ -20,7 +20,7 @@ #include #include -int main() +int main(int, char**) { static_assert((std::is_base_of >::value), ""); static_assert((std::is_base_of >::value), ""); @@ -28,4 +28,6 @@ int main() static_assert((std::is_same::char_type, wchar_t>::value), ""); static_assert((std::is_same::iter_type, std::ostreambuf_iterator >::value), ""); static_assert((std::is_same::iter_type, std::ostreambuf_iterator >::value), ""); + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/ctor.pass.cpp b/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/ctor.pass.cpp index 2929fb05e1fbd..096939d08420a 100644 --- a/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/ctor.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/ctor.pass.cpp @@ -31,7 +31,7 @@ class my_facet int my_facet::count = 0; -int main() +int main(int, char**) { { std::locale l(std::locale::classic(), new my_facet); @@ -48,4 +48,6 @@ int main() assert(my_facet::count == 1); } assert(my_facet::count == 0); + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_bool.pass.cpp b/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_bool.pass.cpp index 8b4a33e84719b..b577d96b73c4e 100644 --- a/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_bool.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_bool.pass.cpp @@ -51,7 +51,7 @@ class p2 virtual string_type do_falsename() const {return "ab";} }; -int main() +int main(int, char**) { const my_facet f(1); std::ios ios(0); @@ -226,4 +226,6 @@ int main() assert(err == ios.goodbit); assert(b == true); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_double.pass.cpp b/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_double.pass.cpp index 7e896f705c0a2..3980d488d9635 100644 --- a/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_double.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_double.pass.cpp @@ -48,7 +48,7 @@ class my_numpunct virtual std::string do_grouping() const {return std::string("\1\2\3");} }; -int main() +int main(int, char**) { const my_facet f(1); std::ios ios(0); @@ -278,4 +278,6 @@ int main() assert(err == ios.goodbit); assert(std::abs(v - 3.14159265358979e+10)/3.14159265358979e+10 < 1.e-8); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_float.pass.cpp b/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_float.pass.cpp index aa7ffcb7809ad..1ac313f7d7a37 100644 --- a/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_float.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_float.pass.cpp @@ -35,7 +35,7 @@ class my_facet }; -int main() +int main(int, char**) { const my_facet f(1); std::ios ios(0); @@ -208,4 +208,6 @@ int main() assert(err == ios.goodbit); assert(v == 2); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_long.pass.cpp b/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_long.pass.cpp index 02f2ba6dcb153..13511728678fc 100644 --- a/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_long.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_long.pass.cpp @@ -41,7 +41,7 @@ class my_numpunct virtual std::string do_grouping() const {return std::string("\1\2\3");} }; -int main() +int main(int, char**) { const my_facet f(1); std::ios ios(0); @@ -517,4 +517,6 @@ int main() assert(err == ios.failbit); assert(v == std::numeric_limits::max()); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_long_double.pass.cpp b/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_long_double.pass.cpp index 89fa436a909ea..49e8ae750d9cd 100644 --- a/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_long_double.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_long_double.pass.cpp @@ -35,7 +35,7 @@ class my_facet }; -int main() +int main(int, char**) { const my_facet f(1); std::ios ios(0); @@ -267,4 +267,6 @@ int main() assert(err == ios.goodbit); assert(v == 2); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_long_long.pass.cpp b/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_long_long.pass.cpp index 9f8153c6b2890..c3a66a9836aa6 100644 --- a/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_long_long.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_long_long.pass.cpp @@ -40,7 +40,7 @@ class my_numpunct virtual std::string do_grouping() const {return std::string("\1\2\3");} }; -int main() +int main(int, char**) { const my_facet f(1); std::ios ios(0); @@ -102,4 +102,6 @@ int main() const long long expect = 0x8000000000000000LL; assert(v == expect); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_pointer.pass.cpp b/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_pointer.pass.cpp index 2388dce5fb789..23b6ad932d6ac 100644 --- a/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_pointer.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_pointer.pass.cpp @@ -29,7 +29,7 @@ class my_facet : F(refs) {} }; -int main() +int main(int, char**) { const my_facet f(1); std::ios ios(0); @@ -57,4 +57,6 @@ int main() assert(err == ios.goodbit); assert(p == (void*)0x73); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_unsigned_int.pass.cpp b/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_unsigned_int.pass.cpp index 36aafc2f484d8..8a1ee3914f7d4 100644 --- a/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_unsigned_int.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_unsigned_int.pass.cpp @@ -40,7 +40,7 @@ class my_numpunct virtual std::string do_grouping() const {return std::string("\1\2\3");} }; -int main() +int main(int, char**) { const my_facet f(1); std::ios ios(0); @@ -79,4 +79,6 @@ int main() assert(err == ios.goodbit); assert(v == 0xFFFFFFFF); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_unsigned_long.pass.cpp b/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_unsigned_long.pass.cpp index 47b58b34eedac..e97c460c7e403 100644 --- a/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_unsigned_long.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_unsigned_long.pass.cpp @@ -40,7 +40,7 @@ class my_numpunct virtual std::string do_grouping() const {return std::string("\1\2\3");} }; -int main() +int main(int, char**) { const my_facet f(1); std::ios ios(0); @@ -79,4 +79,6 @@ int main() assert(err == ios.goodbit); assert(v == 0xFFFFFFFF); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_unsigned_long_long.pass.cpp b/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_unsigned_long_long.pass.cpp index 3518c30a03896..a5d57df05cc77 100644 --- a/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_unsigned_long_long.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_unsigned_long_long.pass.cpp @@ -40,7 +40,7 @@ class my_numpunct virtual std::string do_grouping() const {return std::string("\1\2\3");} }; -int main() +int main(int, char**) { const my_facet f(1); std::ios ios(0); @@ -79,4 +79,6 @@ int main() assert(err == ios.goodbit); assert(v == 0xFFFFFFFFFFFFFFFFULL); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_unsigned_short.pass.cpp b/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_unsigned_short.pass.cpp index f83148a1d5098..261cac3725f79 100644 --- a/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_unsigned_short.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_unsigned_short.pass.cpp @@ -40,7 +40,7 @@ class my_numpunct virtual std::string do_grouping() const {return std::string("\1\2\3");} }; -int main() +int main(int, char**) { const my_facet f(1); std::ios ios(0); @@ -79,4 +79,6 @@ int main() assert(err == ios.goodbit); assert(v == 0xFFFF); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/test_min_max.pass.cpp b/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/test_min_max.pass.cpp index 5c6de9709b22a..92cbeda61bbeb 100644 --- a/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/test_min_max.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/test_min_max.pass.cpp @@ -51,7 +51,7 @@ void check_limits() } } -int main() +int main(int, char**) { check_limits(); check_limits(); @@ -61,4 +61,6 @@ int main() check_limits(); check_limits(); check_limits(); + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/test_neg_one.pass.cpp b/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/test_neg_one.pass.cpp index 4faa4155e4879..07a22cb6e55c7 100644 --- a/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/test_neg_one.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/test_neg_one.pass.cpp @@ -148,7 +148,7 @@ void test_negate() { } } -int main() +int main(int, char**) { test_neg_one(); test_neg_one(); @@ -161,4 +161,6 @@ int main() test_negate(); test_negate(); test_negate(); + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.virtuals/tested_elsewhere.pass.cpp b/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.virtuals/tested_elsewhere.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.virtuals/tested_elsewhere.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.virtuals/tested_elsewhere.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/types.pass.cpp b/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/types.pass.cpp index ab8c00edeb68a..42f210d3958d6 100644 --- a/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/types.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/types.pass.cpp @@ -20,7 +20,7 @@ #include #include -int main() +int main(int, char**) { static_assert((std::is_base_of >::value), ""); static_assert((std::is_base_of >::value), ""); @@ -28,4 +28,6 @@ int main() static_assert((std::is_same::char_type, wchar_t>::value), ""); static_assert((std::is_same::iter_type, std::istreambuf_iterator >::value), ""); static_assert((std::is_same::iter_type, std::istreambuf_iterator >::value), ""); + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.numeric/nothing_to_do.pass.cpp b/libcxx/test/std/localization/locale.categories/category.numeric/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/localization/locale.categories/category.numeric/nothing_to_do.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.numeric/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/date_order.pass.cpp b/libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/date_order.pass.cpp index b779be50f475e..30624ecc8912f 100644 --- a/libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/date_order.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/date_order.pass.cpp @@ -33,7 +33,7 @@ class my_facet : F(nm, refs) {} }; -int main() +int main(int, char**) { { const my_facet f(LOCALE_en_US_UTF_8, 1); @@ -51,4 +51,6 @@ int main() const my_facet f(LOCALE_zh_CN_UTF_8, 1); assert(f.date_order() == std::time_base::ymd); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/date_order_wide.pass.cpp b/libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/date_order_wide.pass.cpp index 62ca19784883c..d62071b94e280 100644 --- a/libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/date_order_wide.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/date_order_wide.pass.cpp @@ -33,7 +33,7 @@ class my_facet : F(nm, refs) {} }; -int main() +int main(int, char**) { { const my_facet f(LOCALE_en_US_UTF_8, 1); @@ -51,4 +51,6 @@ int main() const my_facet f(LOCALE_zh_CN_UTF_8, 1); assert(f.date_order() == std::time_base::ymd); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_date.pass.cpp b/libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_date.pass.cpp index 5c0a5ff59a2ec..e5b5913256d7d 100644 --- a/libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_date.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_date.pass.cpp @@ -44,7 +44,7 @@ class my_facet : F(nm, refs) {} }; -int main() +int main(int, char**) { std::ios ios(0); std::ios_base::iostate err; @@ -98,4 +98,6 @@ int main() assert(t.tm_year == 109); assert(err == std::ios_base::eofbit); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_date_wide.pass.cpp b/libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_date_wide.pass.cpp index 7dd82ed63ac1d..5506e4cace8d0 100644 --- a/libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_date_wide.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_date_wide.pass.cpp @@ -44,7 +44,7 @@ class my_facet : F(nm, refs) {} }; -int main() +int main(int, char**) { std::ios ios(0); std::ios_base::iostate err; @@ -97,4 +97,6 @@ int main() assert(t.tm_year == 109); assert(err == std::ios_base::eofbit); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_monthname.pass.cpp b/libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_monthname.pass.cpp index 787d4a00e9f3d..5311a85650806 100644 --- a/libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_monthname.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_monthname.pass.cpp @@ -36,7 +36,7 @@ class my_facet : F(nm, refs) {} }; -int main() +int main(int, char**) { std::ios ios(0); std::ios_base::iostate err; @@ -71,4 +71,6 @@ int main() assert(t.tm_mon == 5); assert(err == std::ios_base::eofbit); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_monthname_wide.pass.cpp b/libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_monthname_wide.pass.cpp index a975bc96293b3..e45260a6690a3 100644 --- a/libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_monthname_wide.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_monthname_wide.pass.cpp @@ -45,7 +45,7 @@ class my_facet2 : F2(nm, refs) {} }; -int main() +int main(int, char**) { std::ios ios(0); std::ios_base::iostate err; @@ -80,4 +80,6 @@ int main() assert(t.tm_mon == 5); assert(err == std::ios_base::eofbit); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_one.pass.cpp b/libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_one.pass.cpp index c63fab2aa74ce..bda40c56d2746 100644 --- a/libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_one.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_one.pass.cpp @@ -42,7 +42,7 @@ class my_facet : F(nm, refs) {} }; -int main() +int main(int, char**) { std::ios ios(0); std::ios_base::iostate err; @@ -167,4 +167,6 @@ int main() assert(t.tm_hour == 23); assert(err == std::ios_base::eofbit); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_one_wide.pass.cpp b/libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_one_wide.pass.cpp index 6c8d86e12ace4..d8715f825d055 100644 --- a/libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_one_wide.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_one_wide.pass.cpp @@ -42,7 +42,7 @@ class my_facet : F(nm, refs) {} }; -int main() +int main(int, char**) { std::ios ios(0); std::ios_base::iostate err; @@ -169,4 +169,6 @@ int main() assert(t.tm_hour == 23); assert(err == std::ios_base::eofbit); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_time.pass.cpp b/libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_time.pass.cpp index bdb61c66d817d..a007415d03403 100644 --- a/libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_time.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_time.pass.cpp @@ -37,7 +37,7 @@ class my_facet : F(nm, refs) {} }; -int main() +int main(int, char**) { std::ios ios(0); std::ios_base::iostate err; @@ -90,4 +90,6 @@ int main() assert(t.tm_sec == 15); assert(err == std::ios_base::eofbit); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_time_wide.pass.cpp b/libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_time_wide.pass.cpp index b0e8b1c39c514..0e2481d6a84cf 100644 --- a/libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_time_wide.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_time_wide.pass.cpp @@ -37,7 +37,7 @@ class my_facet : F(nm, refs) {} }; -int main() +int main(int, char**) { std::ios ios(0); std::ios_base::iostate err; @@ -90,4 +90,6 @@ int main() assert(t.tm_sec == 15); assert(err == std::ios_base::eofbit); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_weekday.pass.cpp b/libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_weekday.pass.cpp index 342c87a48bf9a..308b08529eac0 100644 --- a/libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_weekday.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_weekday.pass.cpp @@ -40,7 +40,7 @@ class my_facet : F(nm, refs) {} }; -int main() +int main(int, char**) { std::ios ios(0); std::ios_base::iostate err; @@ -87,4 +87,6 @@ int main() assert(t.tm_wday == 1); assert(err == std::ios_base::eofbit); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_weekday_wide.pass.cpp b/libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_weekday_wide.pass.cpp index c2566095f732c..c52462e37c2bf 100644 --- a/libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_weekday_wide.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_weekday_wide.pass.cpp @@ -40,7 +40,7 @@ class my_facet : F(nm, refs) {} }; -int main() +int main(int, char**) { std::ios ios(0); std::ios_base::iostate err; @@ -85,4 +85,6 @@ int main() assert(t.tm_wday == 1); assert(err == std::ios_base::eofbit); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_year.pass.cpp b/libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_year.pass.cpp index a53cd059b98b1..09df423719ab1 100644 --- a/libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_year.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_year.pass.cpp @@ -36,7 +36,7 @@ class my_facet : F(nm, refs) {} }; -int main() +int main(int, char**) { std::ios ios(0); std::ios_base::iostate err; @@ -81,4 +81,6 @@ int main() assert(t.tm_year == 109); assert(err == std::ios_base::eofbit); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_year_wide.pass.cpp b/libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_year_wide.pass.cpp index 93ae51e5559d2..78c35e969bdf6 100644 --- a/libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_year_wide.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_year_wide.pass.cpp @@ -36,7 +36,7 @@ class my_facet : F(nm, refs) {} }; -int main() +int main(int, char**) { std::ios ios(0); std::ios_base::iostate err; @@ -81,4 +81,6 @@ int main() assert(t.tm_year == 109); assert(err == std::ios_base::eofbit); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.time/locale.time.get/ctor.pass.cpp b/libcxx/test/std/localization/locale.categories/category.time/locale.time.get/ctor.pass.cpp index a920c5cb903fa..6fb9899de7b09 100644 --- a/libcxx/test/std/localization/locale.categories/category.time/locale.time.get/ctor.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.time/locale.time.get/ctor.pass.cpp @@ -31,7 +31,7 @@ class my_facet int my_facet::count = 0; -int main() +int main(int, char**) { { std::locale l(std::locale::classic(), new my_facet); @@ -48,4 +48,6 @@ int main() assert(my_facet::count == 1); } assert(my_facet::count == 0); + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/date_order.pass.cpp b/libcxx/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/date_order.pass.cpp index e14d1c57f3709..47b06e9df042d 100644 --- a/libcxx/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/date_order.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/date_order.pass.cpp @@ -26,8 +26,10 @@ class my_facet : F(refs) {} }; -int main() +int main(int, char**) { const my_facet f(1); assert(f.date_order() == std::time_base::mdy); + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_date.pass.cpp b/libcxx/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_date.pass.cpp index 3f95fd3b4cb93..1a1dae754f01d 100644 --- a/libcxx/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_date.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_date.pass.cpp @@ -30,7 +30,7 @@ class my_facet : F(refs) {} }; -int main() +int main(int, char**) { const my_facet f(1); std::ios ios(0); @@ -47,4 +47,6 @@ int main() assert(t.tm_year == 105); assert(err == std::ios_base::eofbit); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_date_wide.pass.cpp b/libcxx/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_date_wide.pass.cpp index e7f19a5dad265..1fe184bea2fca 100644 --- a/libcxx/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_date_wide.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_date_wide.pass.cpp @@ -30,7 +30,7 @@ class my_facet : F(refs) {} }; -int main() +int main(int, char**) { const my_facet f(1); std::ios ios(0); @@ -47,4 +47,6 @@ int main() assert(t.tm_year == 105); assert(err == std::ios_base::eofbit); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_many.pass.cpp b/libcxx/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_many.pass.cpp index 22b2825c86537..2416f6275d730 100644 --- a/libcxx/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_many.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_many.pass.cpp @@ -30,7 +30,7 @@ class my_facet : F(refs) {} }; -int main() +int main(int, char**) { const my_facet f(1); std::ios ios(0); @@ -64,4 +64,6 @@ int main() assert(t.tm_min == 27); assert(err == std::ios_base::eofbit); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_monthname.pass.cpp b/libcxx/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_monthname.pass.cpp index e7b86c791064a..8e61dcca876a1 100644 --- a/libcxx/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_monthname.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_monthname.pass.cpp @@ -30,7 +30,7 @@ class my_facet : F(refs) {} }; -int main() +int main(int, char**) { const my_facet f(1); std::ios ios(0); @@ -261,4 +261,6 @@ int main() assert(t.tm_mon == 0); assert(err == std::ios_base::failbit); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_monthname_wide.pass.cpp b/libcxx/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_monthname_wide.pass.cpp index 78d32ece4f1f8..a8eb4864ecb00 100644 --- a/libcxx/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_monthname_wide.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_monthname_wide.pass.cpp @@ -30,7 +30,7 @@ class my_facet : F(refs) {} }; -int main() +int main(int, char**) { const my_facet f(1); std::ios ios(0); @@ -261,4 +261,6 @@ int main() assert(t.tm_mon == 0); assert(err == std::ios_base::failbit); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_one.pass.cpp b/libcxx/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_one.pass.cpp index fb8b498081748..0c6d9085b57ae 100644 --- a/libcxx/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_one.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_one.pass.cpp @@ -29,7 +29,7 @@ class my_facet : F(refs) {} }; -int main() +int main(int, char**) { const my_facet f(1); std::ios ios(0); @@ -301,4 +301,6 @@ int main() assert(i.base() == in+sizeof(in)-1); assert(err == std::ios_base::eofbit); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_time.pass.cpp b/libcxx/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_time.pass.cpp index c2523dc5d2e52..ca0227973dd11 100644 --- a/libcxx/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_time.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_time.pass.cpp @@ -30,7 +30,7 @@ class my_facet : F(refs) {} }; -int main() +int main(int, char**) { const my_facet f(1); std::ios ios(0); @@ -113,4 +113,6 @@ int main() // assert(t.tm_sec == 0); assert(err == std::ios_base::failbit); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_time_wide.pass.cpp b/libcxx/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_time_wide.pass.cpp index f78359c918b7e..98f2a8570ef59 100644 --- a/libcxx/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_time_wide.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_time_wide.pass.cpp @@ -30,7 +30,7 @@ class my_facet : F(refs) {} }; -int main() +int main(int, char**) { const my_facet f(1); std::ios ios(0); @@ -113,4 +113,6 @@ int main() // assert(t.tm_sec == 0); assert(err == std::ios_base::failbit); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_weekday.pass.cpp b/libcxx/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_weekday.pass.cpp index f972a63bf202f..16e853a49915c 100644 --- a/libcxx/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_weekday.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_weekday.pass.cpp @@ -30,7 +30,7 @@ class my_facet : F(refs) {} }; -int main() +int main(int, char**) { const my_facet f(1); std::ios ios(0); @@ -216,4 +216,6 @@ int main() assert(t.tm_wday == 6); assert(err == std::ios_base::eofbit); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_weekday_wide.pass.cpp b/libcxx/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_weekday_wide.pass.cpp index 3e6e982bd8a1d..3b7b4e9d83ba6 100644 --- a/libcxx/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_weekday_wide.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_weekday_wide.pass.cpp @@ -30,7 +30,7 @@ class my_facet : F(refs) {} }; -int main() +int main(int, char**) { const my_facet f(1); std::ios ios(0); @@ -216,4 +216,6 @@ int main() assert(t.tm_wday == 6); assert(err == std::ios_base::eofbit); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_year.pass.cpp b/libcxx/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_year.pass.cpp index 210112f8e3036..8a0b840591442 100644 --- a/libcxx/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_year.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_year.pass.cpp @@ -29,7 +29,7 @@ class my_facet : F(refs) {} }; -int main() +int main(int, char**) { const my_facet f(1); std::ios ios(0); @@ -134,4 +134,6 @@ int main() assert(t.tm_year == 1099); assert(err == std::ios_base::goodbit); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.virtuals/tested_elsewhere.pass.cpp b/libcxx/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.virtuals/tested_elsewhere.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.virtuals/tested_elsewhere.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.virtuals/tested_elsewhere.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.time/locale.time.get/time_base.pass.cpp b/libcxx/test/std/localization/locale.categories/category.time/locale.time.get/time_base.pass.cpp index c046a7de6ce50..c1b509b40d539 100644 --- a/libcxx/test/std/localization/locale.categories/category.time/locale.time.get/time_base.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.time/locale.time.get/time_base.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { std::time_base::dateorder d = std::time_base::no_order; ((void)d); // Prevent unused warning @@ -26,4 +26,6 @@ int main() assert(std::time_base::mdy == 2); assert(std::time_base::ymd == 3); assert(std::time_base::ydm == 4); + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.time/locale.time.get/types.pass.cpp b/libcxx/test/std/localization/locale.categories/category.time/locale.time.get/types.pass.cpp index ba0dd69e45227..bd74f7da8e615 100644 --- a/libcxx/test/std/localization/locale.categories/category.time/locale.time.get/types.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.time/locale.time.get/types.pass.cpp @@ -27,7 +27,7 @@ #include #include -int main() +int main(int, char**) { static_assert((std::is_base_of >::value), ""); static_assert((std::is_base_of >::value), ""); @@ -37,4 +37,6 @@ int main() static_assert((std::is_same::char_type, wchar_t>::value), ""); static_assert((std::is_same::iter_type, std::istreambuf_iterator >::value), ""); static_assert((std::is_same::iter_type, std::istreambuf_iterator >::value), ""); + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.time/locale.time.put.byname/put1.pass.cpp b/libcxx/test/std/localization/locale.categories/category.time/locale.time.put.byname/put1.pass.cpp index 30f1eef6e8f77..cd70133274ec2 100644 --- a/libcxx/test/std/localization/locale.categories/category.time/locale.time.put.byname/put1.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.time/locale.time.put.byname/put1.pass.cpp @@ -45,7 +45,7 @@ class my_facet : F(nm, refs) {} }; -int main() +int main(int, char**) { char str[200]; output_iterator iter; @@ -77,4 +77,6 @@ int main() assert((ex == "Today is Samedi which is abbreviated Sam.")|| (ex == "Today is samedi which is abbreviated sam." )); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.time/locale.time.put/ctor.pass.cpp b/libcxx/test/std/localization/locale.categories/category.time/locale.time.put/ctor.pass.cpp index 2010ef4ffd8cc..9d0ec1ad7183e 100644 --- a/libcxx/test/std/localization/locale.categories/category.time/locale.time.put/ctor.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.time/locale.time.put/ctor.pass.cpp @@ -31,7 +31,7 @@ class my_facet int my_facet::count = 0; -int main() +int main(int, char**) { { std::locale l(std::locale::classic(), new my_facet); @@ -48,4 +48,6 @@ int main() assert(my_facet::count == 1); } assert(my_facet::count == 0); + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.time/locale.time.put/locale.time.put.members/put1.pass.cpp b/libcxx/test/std/localization/locale.categories/category.time/locale.time.put/locale.time.put.members/put1.pass.cpp index 24971f48f7cd1..94faa80f1eff3 100644 --- a/libcxx/test/std/localization/locale.categories/category.time/locale.time.put/locale.time.put.members/put1.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.time/locale.time.put/locale.time.put.members/put1.pass.cpp @@ -27,7 +27,7 @@ class my_facet : F(refs) {} }; -int main() +int main(int, char**) { const my_facet f(1); char str[200]; @@ -57,4 +57,6 @@ int main() std::string ex(str, iter.base()); assert(ex == "The number of the month is 05."); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.time/locale.time.put/locale.time.put.members/put2.pass.cpp b/libcxx/test/std/localization/locale.categories/category.time/locale.time.put/locale.time.put.members/put2.pass.cpp index 9bef3e787c461..a3b6cf5b25cd8 100644 --- a/libcxx/test/std/localization/locale.categories/category.time/locale.time.put/locale.time.put.members/put2.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.time/locale.time.put/locale.time.put.members/put2.pass.cpp @@ -27,7 +27,7 @@ class my_facet : F(refs) {} }; -int main() +int main(int, char**) { const my_facet f(1); char str[200]; @@ -328,4 +328,6 @@ int main() std::string ex(str, iter.base()); assert(ex == "%"); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.time/locale.time.put/locale.time.put.virtuals/tested_elsewhere.pass.cpp b/libcxx/test/std/localization/locale.categories/category.time/locale.time.put/locale.time.put.virtuals/tested_elsewhere.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/localization/locale.categories/category.time/locale.time.put/locale.time.put.virtuals/tested_elsewhere.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.time/locale.time.put/locale.time.put.virtuals/tested_elsewhere.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.time/locale.time.put/types.pass.cpp b/libcxx/test/std/localization/locale.categories/category.time/locale.time.put/types.pass.cpp index c638624d0bb57..4361094f4b0c1 100644 --- a/libcxx/test/std/localization/locale.categories/category.time/locale.time.put/types.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.time/locale.time.put/types.pass.cpp @@ -20,7 +20,7 @@ #include #include -int main() +int main(int, char**) { static_assert((std::is_base_of >::value), ""); static_assert((std::is_base_of >::value), ""); @@ -28,4 +28,6 @@ int main() static_assert((std::is_same::char_type, wchar_t>::value), ""); static_assert((std::is_same::iter_type, std::ostreambuf_iterator >::value), ""); static_assert((std::is_same::iter_type, std::ostreambuf_iterator >::value), ""); + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/category.time/nothing_to_do.pass.cpp b/libcxx/test/std/localization/locale.categories/category.time/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/localization/locale.categories/category.time/nothing_to_do.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.time/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/facet.numpunct/locale.numpunct.byname/decimal_point.pass.cpp b/libcxx/test/std/localization/locale.categories/facet.numpunct/locale.numpunct.byname/decimal_point.pass.cpp index cddc1497e9015..f8132872d4ca4 100644 --- a/libcxx/test/std/localization/locale.categories/facet.numpunct/locale.numpunct.byname/decimal_point.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/facet.numpunct/locale.numpunct.byname/decimal_point.pass.cpp @@ -20,7 +20,7 @@ #include "platform_support.h" // locale name macros -int main() +int main(int, char**) { { std::locale l("C"); @@ -61,4 +61,6 @@ int main() assert(np.decimal_point() == L','); } } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/facet.numpunct/locale.numpunct.byname/grouping.pass.cpp b/libcxx/test/std/localization/locale.categories/facet.numpunct/locale.numpunct.byname/grouping.pass.cpp index c6e67dbfb27d1..4dbc7e7b8f2a9 100644 --- a/libcxx/test/std/localization/locale.categories/facet.numpunct/locale.numpunct.byname/grouping.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/facet.numpunct/locale.numpunct.byname/grouping.pass.cpp @@ -24,7 +24,7 @@ #include "test_macros.h" #include "platform_support.h" // locale name macros -int main() +int main(int, char**) { { std::locale l("C"); @@ -70,4 +70,6 @@ int main() assert(np.grouping() == group); } } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/facet.numpunct/locale.numpunct.byname/thousands_sep.pass.cpp b/libcxx/test/std/localization/locale.categories/facet.numpunct/locale.numpunct.byname/thousands_sep.pass.cpp index 7d6978a936219..2569002402727 100644 --- a/libcxx/test/std/localization/locale.categories/facet.numpunct/locale.numpunct.byname/thousands_sep.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/facet.numpunct/locale.numpunct.byname/thousands_sep.pass.cpp @@ -26,7 +26,7 @@ #include "test_macros.h" #include "platform_support.h" // locale name macros -int main() +int main(int, char**) { { std::locale l("C"); @@ -84,4 +84,6 @@ int main() assert(np.thousands_sep() == wsep); } } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/facet.numpunct/locale.numpunct/ctor.pass.cpp b/libcxx/test/std/localization/locale.categories/facet.numpunct/locale.numpunct/ctor.pass.cpp index 39d0de2775fa9..e3a10a5c3a3d5 100644 --- a/libcxx/test/std/localization/locale.categories/facet.numpunct/locale.numpunct/ctor.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/facet.numpunct/locale.numpunct/ctor.pass.cpp @@ -30,7 +30,7 @@ class my_facet template int my_facet::count = 0; -int main() +int main(int, char**) { { std::locale l(std::locale::classic(), new my_facet); @@ -62,4 +62,6 @@ int main() assert(my_facet::count == 1); } assert(my_facet::count == 0); + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/facet.numpunct/locale.numpunct/facet.numpunct.members/decimal_point.pass.cpp b/libcxx/test/std/localization/locale.categories/facet.numpunct/locale.numpunct/facet.numpunct.members/decimal_point.pass.cpp index 43385c023e8d9..5322c8a87f1a0 100644 --- a/libcxx/test/std/localization/locale.categories/facet.numpunct/locale.numpunct/facet.numpunct.members/decimal_point.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/facet.numpunct/locale.numpunct/facet.numpunct.members/decimal_point.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { std::locale l = std::locale::classic(); { @@ -28,4 +28,6 @@ int main() const std::numpunct& np = std::use_facet >(l); assert(np.decimal_point() == L'.'); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/facet.numpunct/locale.numpunct/facet.numpunct.members/falsename.pass.cpp b/libcxx/test/std/localization/locale.categories/facet.numpunct/locale.numpunct/facet.numpunct.members/falsename.pass.cpp index 7cbf9b43a0d3a..d1f20f3bbdb89 100644 --- a/libcxx/test/std/localization/locale.categories/facet.numpunct/locale.numpunct/facet.numpunct.members/falsename.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/facet.numpunct/locale.numpunct/facet.numpunct.members/falsename.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { std::locale l = std::locale::classic(); { @@ -28,4 +28,6 @@ int main() const std::numpunct& np = std::use_facet >(l); assert(np.falsename() == std::wstring(L"false")); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/facet.numpunct/locale.numpunct/facet.numpunct.members/grouping.pass.cpp b/libcxx/test/std/localization/locale.categories/facet.numpunct/locale.numpunct/facet.numpunct.members/grouping.pass.cpp index 2ce956df73d98..4c23c51acde3f 100644 --- a/libcxx/test/std/localization/locale.categories/facet.numpunct/locale.numpunct/facet.numpunct.members/grouping.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/facet.numpunct/locale.numpunct/facet.numpunct.members/grouping.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { std::locale l = std::locale::classic(); { @@ -28,4 +28,6 @@ int main() const std::numpunct& np = std::use_facet >(l); assert(np.grouping() == std::string()); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/facet.numpunct/locale.numpunct/facet.numpunct.members/thousands_sep.pass.cpp b/libcxx/test/std/localization/locale.categories/facet.numpunct/locale.numpunct/facet.numpunct.members/thousands_sep.pass.cpp index cc47edbf23c0d..2044c98a1df5b 100644 --- a/libcxx/test/std/localization/locale.categories/facet.numpunct/locale.numpunct/facet.numpunct.members/thousands_sep.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/facet.numpunct/locale.numpunct/facet.numpunct.members/thousands_sep.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { std::locale l = std::locale::classic(); { @@ -28,4 +28,6 @@ int main() const std::numpunct& np = std::use_facet >(l); assert(np.thousands_sep() == L','); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/facet.numpunct/locale.numpunct/facet.numpunct.members/truename.pass.cpp b/libcxx/test/std/localization/locale.categories/facet.numpunct/locale.numpunct/facet.numpunct.members/truename.pass.cpp index 96fb3011d6327..359c96bef4ee4 100644 --- a/libcxx/test/std/localization/locale.categories/facet.numpunct/locale.numpunct/facet.numpunct.members/truename.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/facet.numpunct/locale.numpunct/facet.numpunct.members/truename.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { std::locale l = std::locale::classic(); { @@ -28,4 +28,6 @@ int main() const std::numpunct& np = std::use_facet >(l); assert(np.truename() == std::wstring(L"true")); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/facet.numpunct/locale.numpunct/facet.numpunct.virtuals/tested_elsewhere.pass.cpp b/libcxx/test/std/localization/locale.categories/facet.numpunct/locale.numpunct/facet.numpunct.virtuals/tested_elsewhere.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/localization/locale.categories/facet.numpunct/locale.numpunct/facet.numpunct.virtuals/tested_elsewhere.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/facet.numpunct/locale.numpunct/facet.numpunct.virtuals/tested_elsewhere.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/facet.numpunct/locale.numpunct/types.pass.cpp b/libcxx/test/std/localization/locale.categories/facet.numpunct/locale.numpunct/types.pass.cpp index 236d9460d34d4..212670af402a2 100644 --- a/libcxx/test/std/localization/locale.categories/facet.numpunct/locale.numpunct/types.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/facet.numpunct/locale.numpunct/types.pass.cpp @@ -21,7 +21,7 @@ #include #include -int main() +int main(int, char**) { std::locale l = std::locale::classic(); { @@ -46,4 +46,6 @@ int main() static_assert((std::is_same::string_type, std::wstring>::value), ""); static_assert((std::is_base_of >::value), ""); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/facet.numpunct/nothing_to_do.pass.cpp b/libcxx/test/std/localization/locale.categories/facet.numpunct/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/localization/locale.categories/facet.numpunct/nothing_to_do.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/facet.numpunct/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/localization/locale.categories/facets.examples/nothing_to_do.pass.cpp b/libcxx/test/std/localization/locale.categories/facets.examples/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/localization/locale.categories/facets.examples/nothing_to_do.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/facets.examples/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/localization/locale.stdcvt/codecvt_mode.pass.cpp b/libcxx/test/std/localization/locale.stdcvt/codecvt_mode.pass.cpp index 160594850d42a..def721c4aac92 100644 --- a/libcxx/test/std/localization/locale.stdcvt/codecvt_mode.pass.cpp +++ b/libcxx/test/std/localization/locale.stdcvt/codecvt_mode.pass.cpp @@ -18,11 +18,13 @@ #include #include -int main() +int main(int, char**) { assert(std::consume_header == 4); assert(std::generate_header == 2); assert(std::little_endian == 1); std::codecvt_mode e = std::consume_header; assert(e == 4); + + return 0; } diff --git a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf16.pass.cpp b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf16.pass.cpp index 22be9593bd29c..a66129610fe42 100644 --- a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf16.pass.cpp +++ b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf16.pass.cpp @@ -24,7 +24,7 @@ #include "count_new.hpp" -int main() +int main(int, char**) { assert(globalMemCounter.checkOutstandingNewEq(0)); { @@ -38,4 +38,6 @@ int main() assert(globalMemCounter.checkOutstandingNewNotEq(0)); } assert(globalMemCounter.checkOutstandingNewEq(0)); + + return 0; } diff --git a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_always_noconv.pass.cpp b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_always_noconv.pass.cpp index 91d95af9a04d0..6bd37789d3024 100644 --- a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_always_noconv.pass.cpp +++ b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_always_noconv.pass.cpp @@ -21,7 +21,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::codecvt_utf16 C; @@ -41,4 +41,6 @@ int main() bool r = c.always_noconv(); assert(r == false); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_encoding.pass.cpp b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_encoding.pass.cpp index d3fbea6dc2ec8..2e8a1833c7897 100644 --- a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_encoding.pass.cpp +++ b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_encoding.pass.cpp @@ -21,7 +21,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::codecvt_utf16 C; @@ -41,4 +41,6 @@ int main() int r = c.encoding(); assert(r == 0); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_in.pass.cpp b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_in.pass.cpp index e44783564c16f..4ccf933d601ca 100644 --- a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_in.pass.cpp +++ b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_in.pass.cpp @@ -24,7 +24,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::codecvt_utf16 C; @@ -735,4 +735,6 @@ int main() assert(np == n+2); assert(w == 0x56); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_length.pass.cpp b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_length.pass.cpp index 4e6fdf85849ab..39ecb8f0ea095 100644 --- a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_length.pass.cpp +++ b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_length.pass.cpp @@ -22,7 +22,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::codecvt_utf16 C; @@ -445,4 +445,6 @@ int main() r = c.length(m, n, n+2, 2); assert(r == 2); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_max_length.pass.cpp b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_max_length.pass.cpp index 6422d56797b71..fa8c3269ad405 100644 --- a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_max_length.pass.cpp +++ b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_max_length.pass.cpp @@ -21,7 +21,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::codecvt_utf16 C; @@ -59,4 +59,6 @@ int main() int r = c.max_length(); assert(r == 6); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_out.pass.cpp b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_out.pass.cpp index afd1e6ad661ab..beabf842ec38a 100644 --- a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_out.pass.cpp +++ b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_out.pass.cpp @@ -346,7 +346,9 @@ void TestHelper::test() { } } -int main() { +int main(int, char**) { TestHelper::test(); TestHelper::test(); + + return 0; } diff --git a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_unshift.pass.cpp b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_unshift.pass.cpp index 2471ccb195286..2c37e25781568 100644 --- a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_unshift.pass.cpp +++ b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_unshift.pass.cpp @@ -23,7 +23,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::codecvt_utf16 C; @@ -52,4 +52,6 @@ int main() std::codecvt_base::result r = c.unshift(m, n, n+4, np); assert(r == std::codecvt_base::noconv); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8.pass.cpp b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8.pass.cpp index f350b62ca6b5f..450f525092946 100644 --- a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8.pass.cpp +++ b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8.pass.cpp @@ -24,7 +24,7 @@ #include "count_new.hpp" -int main() +int main(int, char**) { assert(globalMemCounter.checkOutstandingNewEq(0)); { @@ -38,4 +38,6 @@ int main() assert(globalMemCounter.checkOutstandingNewNotEq(0)); } assert(globalMemCounter.checkOutstandingNewEq(0)); + + return 0; } diff --git a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_always_noconv.pass.cpp b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_always_noconv.pass.cpp index 167521573bdde..7d7ba19be8d65 100644 --- a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_always_noconv.pass.cpp +++ b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_always_noconv.pass.cpp @@ -21,7 +21,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::codecvt_utf8 C; @@ -41,4 +41,6 @@ int main() bool r = c.always_noconv(); assert(r == false); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_encoding.pass.cpp b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_encoding.pass.cpp index 324546d9936f6..d8e689f62351b 100644 --- a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_encoding.pass.cpp +++ b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_encoding.pass.cpp @@ -21,7 +21,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::codecvt_utf8 C; @@ -41,4 +41,6 @@ int main() int r = c.encoding(); assert(r == 0); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_in.pass.cpp b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_in.pass.cpp index 4f5d3d8fbee02..611d06305c941 100644 --- a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_in.pass.cpp +++ b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_in.pass.cpp @@ -24,7 +24,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::codecvt_utf8 C; @@ -356,4 +356,6 @@ int main() assert(np == n+1); assert(w == 0x56); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_length.pass.cpp b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_length.pass.cpp index 4b5e096afa9bc..2df1c96035c51 100644 --- a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_length.pass.cpp +++ b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_length.pass.cpp @@ -22,7 +22,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::codecvt_utf8 C; @@ -240,4 +240,6 @@ int main() r = c.length(m, n, n+1, 3); assert(r == 1); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_max_length.pass.cpp b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_max_length.pass.cpp index a353ad6cf56eb..57e5f5850c6e0 100644 --- a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_max_length.pass.cpp +++ b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_max_length.pass.cpp @@ -21,7 +21,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::codecvt_utf8 C; @@ -59,4 +59,6 @@ int main() int r = c.max_length(); assert(r == 7); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_out.pass.cpp b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_out.pass.cpp index 430b5c2548c47..f8b56bcb6cf6a 100644 --- a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_out.pass.cpp +++ b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_out.pass.cpp @@ -318,8 +318,10 @@ void TestHelper::test() { } } -int main() { +int main(int, char**) { TestHelper::test(); TestHelper::test(); TestHelper::test(); + + return 0; } diff --git a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_unshift.pass.cpp b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_unshift.pass.cpp index 344b3e503ccb8..a41f997977f9a 100644 --- a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_unshift.pass.cpp +++ b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_unshift.pass.cpp @@ -23,7 +23,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::codecvt_utf8 C; @@ -52,4 +52,6 @@ int main() std::codecvt_base::result r = c.unshift(m, n, n+4, np); assert(r == std::codecvt_base::noconv); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_always_noconv.pass.cpp b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_always_noconv.pass.cpp index 6d658624e0903..c7fe09caf1306 100644 --- a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_always_noconv.pass.cpp +++ b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_always_noconv.pass.cpp @@ -21,7 +21,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::codecvt_utf8_utf16 C; @@ -41,4 +41,6 @@ int main() bool r = c.always_noconv(); assert(r == false); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_encoding.pass.cpp b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_encoding.pass.cpp index a392c8a25b65e..595f7888e1ca6 100644 --- a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_encoding.pass.cpp +++ b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_encoding.pass.cpp @@ -21,7 +21,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::codecvt_utf8_utf16 C; @@ -41,4 +41,6 @@ int main() int r = c.encoding(); assert(r == 0); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_in.pass.cpp b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_in.pass.cpp index aab52fdf12ebe..482521032afd8 100644 --- a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_in.pass.cpp +++ b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_in.pass.cpp @@ -234,10 +234,12 @@ void TestHelper::test() { } } -int main() { +int main(int, char**) { #ifndef _WIN32 TestHelper::test(); #endif TestHelper::test(); TestHelper::test(); + + return 0; } diff --git a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_length.pass.cpp b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_length.pass.cpp index 172a8734de654..33a4b5f04bdaf 100644 --- a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_length.pass.cpp +++ b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_length.pass.cpp @@ -22,7 +22,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::codecvt_utf8_utf16 C; @@ -231,4 +231,6 @@ int main() r = c.length(m, n, n+1, 2); assert(r == 1); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_max_length.pass.cpp b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_max_length.pass.cpp index 247e0ce207a75..5d93d929e5686 100644 --- a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_max_length.pass.cpp +++ b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_max_length.pass.cpp @@ -21,7 +21,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::codecvt_utf8_utf16 C; @@ -59,4 +59,6 @@ int main() int r = c.max_length(); assert(r == 7); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_out.pass.cpp b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_out.pass.cpp index 846df2156713b..89908eb7756a8 100644 --- a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_out.pass.cpp +++ b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_out.pass.cpp @@ -299,10 +299,12 @@ void TestHelper::test() { } } -int main() { +int main(int, char**) { #ifndef _WIN32 TestHelper::test(); #endif TestHelper::test(); TestHelper::test(); + + return 0; } diff --git a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_unshift.pass.cpp b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_unshift.pass.cpp index 96139bd5b6bb7..79b670055d557 100644 --- a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_unshift.pass.cpp +++ b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_unshift.pass.cpp @@ -23,7 +23,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::codecvt_utf8_utf16 C; @@ -52,4 +52,6 @@ int main() std::codecvt_base::result r = c.unshift(m, n, n+4, np); assert(r == std::codecvt_base::noconv); } + + return 0; } diff --git a/libcxx/test/std/localization/locale.syn/nothing_to_do.pass.cpp b/libcxx/test/std/localization/locale.syn/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/localization/locale.syn/nothing_to_do.pass.cpp +++ b/libcxx/test/std/localization/locale.syn/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/localization/locales/locale.convenience/classification/isalnum.pass.cpp b/libcxx/test/std/localization/locales/locale.convenience/classification/isalnum.pass.cpp index 68b9b9f1b73b1..2cf9e4b5749a7 100644 --- a/libcxx/test/std/localization/locales/locale.convenience/classification/isalnum.pass.cpp +++ b/libcxx/test/std/localization/locales/locale.convenience/classification/isalnum.pass.cpp @@ -13,7 +13,7 @@ #include #include -int main() +int main(int, char**) { std::locale l; assert(!std::isalnum(' ', l)); @@ -27,4 +27,6 @@ int main() assert( std::isalnum('f', l)); assert( std::isalnum('9', l)); assert(!std::isalnum('+', l)); + + return 0; } diff --git a/libcxx/test/std/localization/locales/locale.convenience/classification/isalpha.pass.cpp b/libcxx/test/std/localization/locales/locale.convenience/classification/isalpha.pass.cpp index 0e5a777b315f3..800c26cb918c2 100644 --- a/libcxx/test/std/localization/locales/locale.convenience/classification/isalpha.pass.cpp +++ b/libcxx/test/std/localization/locales/locale.convenience/classification/isalpha.pass.cpp @@ -13,7 +13,7 @@ #include #include -int main() +int main(int, char**) { std::locale l; assert(!std::isalpha(' ', l)); @@ -27,4 +27,6 @@ int main() assert( std::isalpha('f', l)); assert(!std::isalpha('9', l)); assert(!std::isalpha('+', l)); + + return 0; } diff --git a/libcxx/test/std/localization/locales/locale.convenience/classification/iscntrl.pass.cpp b/libcxx/test/std/localization/locales/locale.convenience/classification/iscntrl.pass.cpp index afca98b70b954..d5cd4a6b96258 100644 --- a/libcxx/test/std/localization/locales/locale.convenience/classification/iscntrl.pass.cpp +++ b/libcxx/test/std/localization/locales/locale.convenience/classification/iscntrl.pass.cpp @@ -13,7 +13,7 @@ #include #include -int main() +int main(int, char**) { std::locale l; assert(!std::iscntrl(' ', l)); @@ -27,4 +27,6 @@ int main() assert(!std::iscntrl('f', l)); assert(!std::iscntrl('9', l)); assert(!std::iscntrl('+', l)); + + return 0; } diff --git a/libcxx/test/std/localization/locales/locale.convenience/classification/isdigit.pass.cpp b/libcxx/test/std/localization/locales/locale.convenience/classification/isdigit.pass.cpp index 35a4540fdd89e..2e71bd394ac3b 100644 --- a/libcxx/test/std/localization/locales/locale.convenience/classification/isdigit.pass.cpp +++ b/libcxx/test/std/localization/locales/locale.convenience/classification/isdigit.pass.cpp @@ -13,7 +13,7 @@ #include #include -int main() +int main(int, char**) { std::locale l; assert(!std::isdigit(' ', l)); @@ -27,4 +27,6 @@ int main() assert(!std::isdigit('f', l)); assert( std::isdigit('9', l)); assert(!std::isdigit('+', l)); + + return 0; } diff --git a/libcxx/test/std/localization/locales/locale.convenience/classification/isgraph.pass.cpp b/libcxx/test/std/localization/locales/locale.convenience/classification/isgraph.pass.cpp index 3b4d0c55162a3..406b7cbf97367 100644 --- a/libcxx/test/std/localization/locales/locale.convenience/classification/isgraph.pass.cpp +++ b/libcxx/test/std/localization/locales/locale.convenience/classification/isgraph.pass.cpp @@ -13,7 +13,7 @@ #include #include -int main() +int main(int, char**) { std::locale l; assert(!std::isgraph(' ', l)); @@ -27,4 +27,6 @@ int main() assert( std::isgraph('f', l)); assert( std::isgraph('9', l)); assert( std::isgraph('+', l)); + + return 0; } diff --git a/libcxx/test/std/localization/locales/locale.convenience/classification/islower.pass.cpp b/libcxx/test/std/localization/locales/locale.convenience/classification/islower.pass.cpp index 057b7022608d5..2fc9ece026d2f 100644 --- a/libcxx/test/std/localization/locales/locale.convenience/classification/islower.pass.cpp +++ b/libcxx/test/std/localization/locales/locale.convenience/classification/islower.pass.cpp @@ -13,7 +13,7 @@ #include #include -int main() +int main(int, char**) { std::locale l; assert(!std::islower(' ', l)); @@ -27,4 +27,6 @@ int main() assert( std::islower('f', l)); assert(!std::islower('9', l)); assert(!std::islower('+', l)); + + return 0; } diff --git a/libcxx/test/std/localization/locales/locale.convenience/classification/isprint.pass.cpp b/libcxx/test/std/localization/locales/locale.convenience/classification/isprint.pass.cpp index 990fc03eb826b..36fa16cbc7496 100644 --- a/libcxx/test/std/localization/locales/locale.convenience/classification/isprint.pass.cpp +++ b/libcxx/test/std/localization/locales/locale.convenience/classification/isprint.pass.cpp @@ -13,7 +13,7 @@ #include #include -int main() +int main(int, char**) { std::locale l; assert( std::isprint(' ', l)); @@ -27,4 +27,6 @@ int main() assert( std::isprint('f', l)); assert( std::isprint('9', l)); assert( std::isprint('+', l)); + + return 0; } diff --git a/libcxx/test/std/localization/locales/locale.convenience/classification/ispunct.pass.cpp b/libcxx/test/std/localization/locales/locale.convenience/classification/ispunct.pass.cpp index b9fb94a3c4b18..db11337805c0d 100644 --- a/libcxx/test/std/localization/locales/locale.convenience/classification/ispunct.pass.cpp +++ b/libcxx/test/std/localization/locales/locale.convenience/classification/ispunct.pass.cpp @@ -13,7 +13,7 @@ #include #include -int main() +int main(int, char**) { std::locale l; assert(!std::ispunct(' ', l)); @@ -27,4 +27,6 @@ int main() assert(!std::ispunct('f', l)); assert(!std::ispunct('9', l)); assert( std::ispunct('+', l)); + + return 0; } diff --git a/libcxx/test/std/localization/locales/locale.convenience/classification/isspace.pass.cpp b/libcxx/test/std/localization/locales/locale.convenience/classification/isspace.pass.cpp index b00ba46e63081..62e50d2fc25f5 100644 --- a/libcxx/test/std/localization/locales/locale.convenience/classification/isspace.pass.cpp +++ b/libcxx/test/std/localization/locales/locale.convenience/classification/isspace.pass.cpp @@ -13,7 +13,7 @@ #include #include -int main() +int main(int, char**) { std::locale l; assert( std::isspace(' ', l)); @@ -27,4 +27,6 @@ int main() assert(!std::isspace('f', l)); assert(!std::isspace('9', l)); assert(!std::isspace('+', l)); + + return 0; } diff --git a/libcxx/test/std/localization/locales/locale.convenience/classification/isupper.pass.cpp b/libcxx/test/std/localization/locales/locale.convenience/classification/isupper.pass.cpp index c5863beb30ec7..c986c7cdddc2c 100644 --- a/libcxx/test/std/localization/locales/locale.convenience/classification/isupper.pass.cpp +++ b/libcxx/test/std/localization/locales/locale.convenience/classification/isupper.pass.cpp @@ -13,7 +13,7 @@ #include #include -int main() +int main(int, char**) { std::locale l; assert(!std::isupper(' ', l)); @@ -27,4 +27,6 @@ int main() assert(!std::isupper('f', l)); assert(!std::isupper('9', l)); assert(!std::isupper('+', l)); + + return 0; } diff --git a/libcxx/test/std/localization/locales/locale.convenience/classification/isxdigit.pass.cpp b/libcxx/test/std/localization/locales/locale.convenience/classification/isxdigit.pass.cpp index 4a77628db94d4..245f2ed6033cc 100644 --- a/libcxx/test/std/localization/locales/locale.convenience/classification/isxdigit.pass.cpp +++ b/libcxx/test/std/localization/locales/locale.convenience/classification/isxdigit.pass.cpp @@ -13,7 +13,7 @@ #include #include -int main() +int main(int, char**) { std::locale l; assert(!std::isxdigit(' ', l)); @@ -27,4 +27,6 @@ int main() assert( std::isxdigit('f', l)); assert( std::isxdigit('9', l)); assert(!std::isxdigit('+', l)); + + return 0; } diff --git a/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/ctor.pass.cpp b/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/ctor.pass.cpp index c16755e20ed36..f28abb934e069 100644 --- a/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/ctor.pass.cpp +++ b/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/ctor.pass.cpp @@ -21,7 +21,7 @@ #include "test_macros.h" #include "count_new.hpp" -int main() +int main(int, char**) { typedef std::wbuffer_convert > B; #if TEST_STD_VER > 11 @@ -55,4 +55,6 @@ int main() assert(globalMemCounter.checkOutstandingNewNotEq(0)); } assert(globalMemCounter.checkOutstandingNewEq(0)); + + return 0; } diff --git a/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/overflow.pass.cpp b/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/overflow.pass.cpp index 66f95df53c705..7c404288596b0 100644 --- a/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/overflow.pass.cpp +++ b/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/overflow.pass.cpp @@ -37,7 +37,7 @@ struct test_buf virtual int_type overflow(int_type c = traits_type::eof()) {return base::overflow(c);} }; -int main() +int main(int, char**) { { std::ofstream bs("overflow.dat"); @@ -96,4 +96,6 @@ int main() assert(f.get() == -1); } std::remove("overflow.dat"); + + return 0; } diff --git a/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/pbackfail.pass.cpp b/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/pbackfail.pass.cpp index f268f9a2198f1..dc4144b159c76 100644 --- a/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/pbackfail.pass.cpp +++ b/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/pbackfail.pass.cpp @@ -37,7 +37,7 @@ struct test_buf virtual int_type pbackfail(int_type c = traits_type::eof()) {return base::pbackfail(c);} }; -int main() +int main(int, char**) { { std::ifstream bs("underflow.dat"); @@ -55,4 +55,6 @@ int main() assert(f.sbumpc() == L'2'); assert(f.sgetc() == L'3'); } + + return 0; } diff --git a/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/rdbuf.pass.cpp b/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/rdbuf.pass.cpp index ffd5a0df7abd3..b58d1d8eb7bd4 100644 --- a/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/rdbuf.pass.cpp +++ b/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/rdbuf.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { typedef std::wbuffer_convert > B; { @@ -27,4 +27,6 @@ int main() b.rdbuf(s.rdbuf()); assert(b.rdbuf() == s.rdbuf()); } + + return 0; } diff --git a/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/seekoff.pass.cpp b/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/seekoff.pass.cpp index 4494d56c7c328..b50f10cc1714d 100644 --- a/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/seekoff.pass.cpp +++ b/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/seekoff.pass.cpp @@ -31,7 +31,7 @@ class test_codecvt ~test_codecvt() {} }; -int main() +int main(int, char**) { { wchar_t buf[10]; @@ -54,4 +54,6 @@ int main() assert(f.sgetc() == L'l'); } std::remove("seekoff.dat"); + + return 0; } diff --git a/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/state.pass.cpp b/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/state.pass.cpp index 1816ad0c7751a..0541dbfb93b43 100644 --- a/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/state.pass.cpp +++ b/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/state.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { typedef std::wbuffer_convert > B; { @@ -25,4 +25,6 @@ int main() std::mbstate_t s = b.state(); ((void)s); } + + return 0; } diff --git a/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/test.pass.cpp b/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/test.pass.cpp index c22fb6a14a7af..e309f3eb65018 100644 --- a/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/test.pass.cpp +++ b/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/test.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { { std::ofstream bytestream("myfile.txt"); @@ -32,4 +32,6 @@ int main() assert(ws == L"Hello"); } std::remove("myfile.txt"); + + return 0; } diff --git a/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/underflow.pass.cpp b/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/underflow.pass.cpp index 523778f237f3f..6d04935b30112 100644 --- a/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/underflow.pass.cpp +++ b/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/underflow.pass.cpp @@ -37,7 +37,7 @@ struct test_buf virtual int_type underflow() {return base::underflow();} }; -int main() +int main(int, char**) { { std::ifstream bs("underflow.dat"); @@ -80,4 +80,6 @@ int main() assert(f.sbumpc() == 0x4E53); assert(f.sbumpc() == test_buf::traits_type::eof()); } + + return 0; } diff --git a/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.character/tolower.pass.cpp b/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.character/tolower.pass.cpp index 72b939dfb5e81..9885dca53577e 100644 --- a/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.character/tolower.pass.cpp +++ b/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.character/tolower.pass.cpp @@ -13,7 +13,7 @@ #include #include -int main() +int main(int, char**) { std::locale l; assert(std::tolower(' ', l) == ' '); @@ -27,4 +27,6 @@ int main() assert(std::tolower('f', l) == 'f'); assert(std::tolower('9', l) == '9'); assert(std::tolower('+', l) == '+'); + + return 0; } diff --git a/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.character/toupper.pass.cpp b/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.character/toupper.pass.cpp index dbd936529efdd..34f675b0592fc 100644 --- a/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.character/toupper.pass.cpp +++ b/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.character/toupper.pass.cpp @@ -13,7 +13,7 @@ #include #include -int main() +int main(int, char**) { std::locale l; assert(std::toupper(' ', l) == ' '); @@ -27,4 +27,6 @@ int main() assert(std::toupper('f', l) == 'F'); assert(std::toupper('9', l) == '9'); assert(std::toupper('+', l) == '+'); + + return 0; } diff --git a/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/converted.pass.cpp b/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/converted.pass.cpp index b52bbc0bbcb66..802aaf65d0f8f 100644 --- a/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/converted.pass.cpp +++ b/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/converted.pass.cpp @@ -61,4 +61,6 @@ void TestHelper::test() { } } -int main() { TestHelper::test(); } +int main(int, char**) { TestHelper::test(); + return 0; +} diff --git a/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/ctor_codecvt.pass.cpp b/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/ctor_codecvt.pass.cpp index 578547f8ec218..3efd26fb4ce1c 100644 --- a/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/ctor_codecvt.pass.cpp +++ b/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/ctor_codecvt.pass.cpp @@ -18,7 +18,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { { typedef std::codecvt_utf8 Codecvt; @@ -36,4 +36,6 @@ int main() static_assert( std::is_constructible::value, ""); #endif } + + return 0; } diff --git a/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/ctor_codecvt_state.pass.cpp b/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/ctor_codecvt_state.pass.cpp index 0e58bc2252ec5..6e2d5ff5e9c03 100644 --- a/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/ctor_codecvt_state.pass.cpp +++ b/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/ctor_codecvt_state.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::codecvt_utf8 Codecvt; @@ -24,4 +24,6 @@ int main() Myconv myconv(new Codecvt, std::mbstate_t()); assert(myconv.converted() == 0); } + + return 0; } diff --git a/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/ctor_copy.pass.cpp b/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/ctor_copy.pass.cpp index c1a874dc251a5..d035c3160eb4d 100644 --- a/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/ctor_copy.pass.cpp +++ b/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/ctor_copy.pass.cpp @@ -21,10 +21,12 @@ #include #include -int main() +int main(int, char**) { typedef std::codecvt_utf8 Codecvt; typedef std::wstring_convert Myconv; static_assert(!std::is_copy_constructible::value, ""); static_assert(!std::is_copy_assignable::value, ""); + + return 0; } diff --git a/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/ctor_err_string.pass.cpp b/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/ctor_err_string.pass.cpp index 364cfed80c7dd..e284c13c0629e 100644 --- a/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/ctor_err_string.pass.cpp +++ b/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/ctor_err_string.pass.cpp @@ -19,7 +19,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { typedef std::codecvt_utf8 Codecvt; typedef std::wstring_convert Myconv; @@ -70,4 +70,6 @@ int main() std::wstring ws = myconv.from_bytes('\xA5'); assert(ws == L"wide error"); } + + return 0; } diff --git a/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/from_bytes.pass.cpp b/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/from_bytes.pass.cpp index e527f31a1e2a8..c1a26d05582ce 100644 --- a/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/from_bytes.pass.cpp +++ b/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/from_bytes.pass.cpp @@ -68,4 +68,6 @@ void TestHelper::test() { } } -int main() { TestHelper::test(); } +int main(int, char**) { TestHelper::test(); + return 0; +} diff --git a/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/state.pass.cpp b/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/state.pass.cpp index 0fb5b9f342f69..a7588dc252293 100644 --- a/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/state.pass.cpp +++ b/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/state.pass.cpp @@ -15,11 +15,13 @@ #include #include -int main() +int main(int, char**) { typedef std::codecvt_utf8 Codecvt; typedef std::wstring_convert Myconv; Myconv myconv; std::mbstate_t s = myconv.state(); ((void)s); + + return 0; } diff --git a/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/to_bytes.pass.cpp b/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/to_bytes.pass.cpp index 2e4dce8bd72bb..397ba6494eeaa 100644 --- a/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/to_bytes.pass.cpp +++ b/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/to_bytes.pass.cpp @@ -68,4 +68,6 @@ void TestHelper::test() { } } -int main() { TestHelper::test(); } +int main(int, char**) { TestHelper::test(); + return 0; +} diff --git a/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/types.pass.cpp b/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/types.pass.cpp index eb67ecffc11cd..c2dea9a906717 100644 --- a/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/types.pass.cpp +++ b/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/types.pass.cpp @@ -22,7 +22,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::wstring_convert > myconv; @@ -31,4 +31,6 @@ int main() static_assert((std::is_same::value), ""); static_assert((std::is_same::int_type>::value), ""); } + + return 0; } diff --git a/libcxx/test/std/localization/locales/locale.convenience/conversions/nothing_to_do.pass.cpp b/libcxx/test/std/localization/locales/locale.convenience/conversions/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/localization/locales/locale.convenience/conversions/nothing_to_do.pass.cpp +++ b/libcxx/test/std/localization/locales/locale.convenience/conversions/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/localization/locales/locale.convenience/nothing_to_do.pass.cpp b/libcxx/test/std/localization/locales/locale.convenience/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/localization/locales/locale.convenience/nothing_to_do.pass.cpp +++ b/libcxx/test/std/localization/locales/locale.convenience/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/localization/locales/locale.global.templates/has_facet.pass.cpp b/libcxx/test/std/localization/locales/locale.global.templates/has_facet.pass.cpp index a895b1aa10727..66539d1eabaf1 100644 --- a/libcxx/test/std/localization/locales/locale.global.templates/has_facet.pass.cpp +++ b/libcxx/test/std/localization/locales/locale.global.templates/has_facet.pass.cpp @@ -21,11 +21,13 @@ struct my_facet std::locale::id my_facet::id; -int main() +int main(int, char**) { std::locale loc; assert(std::has_facet >(loc)); assert(!std::has_facet(loc)); std::locale loc2(loc, new my_facet); assert(std::has_facet(loc2)); + + return 0; } diff --git a/libcxx/test/std/localization/locales/locale.global.templates/use_facet.pass.cpp b/libcxx/test/std/localization/locales/locale.global.templates/use_facet.pass.cpp index c7f53975d3ae1..3c2cb604232a9 100644 --- a/libcxx/test/std/localization/locales/locale.global.templates/use_facet.pass.cpp +++ b/libcxx/test/std/localization/locales/locale.global.templates/use_facet.pass.cpp @@ -30,7 +30,7 @@ struct my_facet std::locale::id my_facet::id; -int main() +int main(int, char**) { #ifndef TEST_HAS_NO_EXCEPTIONS try @@ -53,4 +53,6 @@ int main() assert(facet_count == 1); } assert(facet_count == 0); + + return 0; } diff --git a/libcxx/test/std/localization/locales/locale/locale.cons/assign.pass.cpp b/libcxx/test/std/localization/locales/locale/locale.cons/assign.pass.cpp index 02b5f1096991c..369fee4cb1985 100644 --- a/libcxx/test/std/localization/locales/locale/locale.cons/assign.pass.cpp +++ b/libcxx/test/std/localization/locales/locale/locale.cons/assign.pass.cpp @@ -56,7 +56,7 @@ void check(const std::locale& loc) assert((std::has_facet >(loc))); } -int main() +int main(int, char**) { { std::locale loc(LOCALE_ru_RU_UTF_8); @@ -67,4 +67,6 @@ int main() check(loc2); } assert(globalMemCounter.checkOutstandingNewEq(0)); + + return 0; } diff --git a/libcxx/test/std/localization/locales/locale/locale.cons/char_pointer.pass.cpp b/libcxx/test/std/localization/locales/locale/locale.cons/char_pointer.pass.cpp index 5424a8b92dd5e..c324f394c8b69 100644 --- a/libcxx/test/std/localization/locales/locale/locale.cons/char_pointer.pass.cpp +++ b/libcxx/test/std/localization/locales/locale/locale.cons/char_pointer.pass.cpp @@ -61,7 +61,7 @@ void check(const std::locale& loc) assert((std::has_facet >(loc))); } -int main() +int main(int, char**) { { std::locale loc(LOCALE_ru_RU_UTF_8); @@ -94,4 +94,6 @@ int main() std::locale ok(""); } assert(globalMemCounter.checkOutstandingNewEq(0)); + + return 0; } diff --git a/libcxx/test/std/localization/locales/locale/locale.cons/copy.pass.cpp b/libcxx/test/std/localization/locales/locale/locale.cons/copy.pass.cpp index 885dfea37b7c0..4f96ab41554b9 100644 --- a/libcxx/test/std/localization/locales/locale/locale.cons/copy.pass.cpp +++ b/libcxx/test/std/localization/locales/locale/locale.cons/copy.pass.cpp @@ -54,7 +54,7 @@ void check(const std::locale& loc) assert((std::has_facet >(loc))); } -int main() +int main(int, char**) { { std::locale loc(LOCALE_fr_FR_UTF_8); @@ -64,4 +64,6 @@ int main() check(loc2); } assert(globalMemCounter.checkOutstandingNewEq(0)); + + return 0; } diff --git a/libcxx/test/std/localization/locales/locale/locale.cons/default.pass.cpp b/libcxx/test/std/localization/locales/locale/locale.cons/default.pass.cpp index 8f79b1842333e..5c1e922cbfe96 100644 --- a/libcxx/test/std/localization/locales/locale/locale.cons/default.pass.cpp +++ b/libcxx/test/std/localization/locales/locale/locale.cons/default.pass.cpp @@ -53,7 +53,7 @@ void check(const std::locale& loc) assert((std::has_facet >(loc))); } -int main() +int main(int, char**) { int ok; { @@ -73,4 +73,6 @@ int main() assert(globalMemCounter.checkOutstandingNewEq(ok)); } assert(globalMemCounter.checkOutstandingNewEq(ok)); + + return 0; } diff --git a/libcxx/test/std/localization/locales/locale/locale.cons/locale_char_pointer_cat.pass.cpp b/libcxx/test/std/localization/locales/locale/locale.cons/locale_char_pointer_cat.pass.cpp index d0ccb8a340540..70f2cb92b797e 100644 --- a/libcxx/test/std/localization/locales/locale/locale.cons/locale_char_pointer_cat.pass.cpp +++ b/libcxx/test/std/localization/locales/locale/locale.cons/locale_char_pointer_cat.pass.cpp @@ -59,7 +59,7 @@ void check(const std::locale& loc) assert((std::has_facet >(loc))); } -int main() +int main(int, char**) { { std::locale loc(LOCALE_ru_RU_UTF_8); @@ -68,4 +68,6 @@ int main() check(loc2); } assert(globalMemCounter.checkOutstandingNewEq(0)); + + return 0; } diff --git a/libcxx/test/std/localization/locales/locale/locale.cons/locale_facetptr.pass.cpp b/libcxx/test/std/localization/locales/locale/locale.cons/locale_facetptr.pass.cpp index 498682f283458..35c06ce50400f 100644 --- a/libcxx/test/std/localization/locales/locale/locale.cons/locale_facetptr.pass.cpp +++ b/libcxx/test/std/localization/locales/locale/locale.cons/locale_facetptr.pass.cpp @@ -65,7 +65,7 @@ struct my_facet std::locale::id my_facet::id; -int main() +int main(int, char**) { { std::locale loc(LOCALE_ru_RU_UTF_8); @@ -85,4 +85,6 @@ int main() assert(loc == loc2); } assert(globalMemCounter.checkOutstandingNewEq(0)); + + return 0; } diff --git a/libcxx/test/std/localization/locales/locale/locale.cons/locale_locale_cat.pass.cpp b/libcxx/test/std/localization/locales/locale/locale.cons/locale_locale_cat.pass.cpp index 79db6f044ca20..ba54e85542edd 100644 --- a/libcxx/test/std/localization/locales/locale/locale.cons/locale_locale_cat.pass.cpp +++ b/libcxx/test/std/localization/locales/locale/locale.cons/locale_locale_cat.pass.cpp @@ -59,7 +59,7 @@ void check(const std::locale& loc) assert((std::has_facet >(loc))); } -int main() +int main(int, char**) { { std::locale loc(LOCALE_ru_RU_UTF_8); @@ -68,4 +68,6 @@ int main() check(loc2); } assert(globalMemCounter.checkOutstandingNewEq(0)); + + return 0; } diff --git a/libcxx/test/std/localization/locales/locale/locale.cons/locale_string_cat.pass.cpp b/libcxx/test/std/localization/locales/locale/locale.cons/locale_string_cat.pass.cpp index 5fdde6c67ff79..3cb3aadac97c4 100644 --- a/libcxx/test/std/localization/locales/locale/locale.cons/locale_string_cat.pass.cpp +++ b/libcxx/test/std/localization/locales/locale/locale.cons/locale_string_cat.pass.cpp @@ -60,7 +60,7 @@ void check(const std::locale& loc) assert((std::has_facet >(loc))); } -int main() +int main(int, char**) { { std::locale loc(LOCALE_ru_RU_UTF_8); @@ -69,4 +69,6 @@ int main() check(loc2); } assert(globalMemCounter.checkOutstandingNewEq(0)); + + return 0; } diff --git a/libcxx/test/std/localization/locales/locale/locale.cons/string.pass.cpp b/libcxx/test/std/localization/locales/locale/locale.cons/string.pass.cpp index 449b9fbc2d1a0..55b2f88c2bef2 100644 --- a/libcxx/test/std/localization/locales/locale/locale.cons/string.pass.cpp +++ b/libcxx/test/std/localization/locales/locale/locale.cons/string.pass.cpp @@ -55,7 +55,7 @@ void check(const std::locale& loc) assert((std::has_facet >(loc))); } -int main() +int main(int, char**) { { std::locale loc(std::string(LOCALE_ru_RU_UTF_8)); @@ -69,4 +69,6 @@ int main() assert(loc != loc3); } assert(globalMemCounter.checkOutstandingNewEq(0)); + + return 0; } diff --git a/libcxx/test/std/localization/locales/locale/locale.members/combine.pass.cpp b/libcxx/test/std/localization/locales/locale/locale.members/combine.pass.cpp index 1a867fbfa6cc5..fc1f3d33bef71 100644 --- a/libcxx/test/std/localization/locales/locale/locale.members/combine.pass.cpp +++ b/libcxx/test/std/localization/locales/locale/locale.members/combine.pass.cpp @@ -63,7 +63,7 @@ struct my_facet std::locale::id my_facet::id; -int main() +int main(int, char**) { { { @@ -95,4 +95,6 @@ int main() assert(globalMemCounter.checkOutstandingNewEq(0)); } #endif + + return 0; } diff --git a/libcxx/test/std/localization/locales/locale/locale.members/name.pass.cpp b/libcxx/test/std/localization/locales/locale/locale.members/name.pass.cpp index 3a6e1b98c539b..96ebdf39147dd 100644 --- a/libcxx/test/std/localization/locales/locale/locale.members/name.pass.cpp +++ b/libcxx/test/std/localization/locales/locale/locale.members/name.pass.cpp @@ -17,7 +17,7 @@ #include "platform_support.h" // locale name macros -int main() +int main(int, char**) { { std::locale loc; @@ -27,4 +27,6 @@ int main() std::locale loc(LOCALE_en_US_UTF_8); assert(loc.name() == LOCALE_en_US_UTF_8); } + + return 0; } diff --git a/libcxx/test/std/localization/locales/locale/locale.operators/compare.pass.cpp b/libcxx/test/std/localization/locales/locale/locale.operators/compare.pass.cpp index b42e55ff67ccb..ea083d1370dab 100644 --- a/libcxx/test/std/localization/locales/locale/locale.operators/compare.pass.cpp +++ b/libcxx/test/std/localization/locales/locale/locale.operators/compare.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { { std::locale l; @@ -30,4 +30,6 @@ int main() assert(l(s3, s2)); } } + + return 0; } diff --git a/libcxx/test/std/localization/locales/locale/locale.operators/eq.pass.cpp b/libcxx/test/std/localization/locales/locale/locale.operators/eq.pass.cpp index aeb8770861560..1efb487bc8dc3 100644 --- a/libcxx/test/std/localization/locales/locale/locale.operators/eq.pass.cpp +++ b/libcxx/test/std/localization/locales/locale/locale.operators/eq.pass.cpp @@ -17,7 +17,7 @@ #include "platform_support.h" // locale name macros -int main() +int main(int, char**) { std::locale cloc; std::locale copy(cloc); @@ -82,4 +82,6 @@ int main() assert(noname2 != noname1); assert(noname2 != nonamec); assert(noname2 == noname2); + + return 0; } diff --git a/libcxx/test/std/localization/locales/locale/locale.statics/classic.pass.cpp b/libcxx/test/std/localization/locales/locale/locale.statics/classic.pass.cpp index 9060ae27d7a31..7594edcc2c633 100644 --- a/libcxx/test/std/localization/locales/locale/locale.statics/classic.pass.cpp +++ b/libcxx/test/std/localization/locales/locale/locale.statics/classic.pass.cpp @@ -48,11 +48,13 @@ void check(const std::locale& loc) assert((std::has_facet >(loc))); } -int main() +int main(int, char**) { std::locale loc = std::locale::classic(); assert(loc.name() == "C"); assert(loc == std::locale("C")); check(loc); check(std::locale("C")); + + return 0; } diff --git a/libcxx/test/std/localization/locales/locale/locale.statics/global.pass.cpp b/libcxx/test/std/localization/locales/locale/locale.statics/global.pass.cpp index 961bb2f4c47bb..57f55aa1a76d6 100644 --- a/libcxx/test/std/localization/locales/locale/locale.statics/global.pass.cpp +++ b/libcxx/test/std/localization/locales/locale/locale.statics/global.pass.cpp @@ -52,7 +52,7 @@ void check(const std::locale& loc) assert((std::has_facet >(loc))); } -int main() +int main(int, char**) { std::locale loc; assert(loc.name() == "C"); @@ -61,4 +61,6 @@ int main() std::locale loc2; check(loc2); assert(loc2 == std::locale(LOCALE_en_US_UTF_8)); + + return 0; } diff --git a/libcxx/test/std/localization/locales/locale/locale.types/locale.category/category.pass.cpp b/libcxx/test/std/localization/locales/locale/locale.types/locale.category/category.pass.cpp index 7724ffd00cee1..11c3de2975f3c 100644 --- a/libcxx/test/std/localization/locales/locale/locale.types/locale.category/category.pass.cpp +++ b/libcxx/test/std/localization/locales/locale/locale.types/locale.category/category.pass.cpp @@ -23,7 +23,7 @@ template void test(const T &) {} -int main() +int main(int, char**) { static_assert((std::is_same::value), ""); assert(std::locale::none == 0); @@ -55,4 +55,6 @@ int main() test(std::locale::time); test(std::locale::messages); test(std::locale::all); + + return 0; } diff --git a/libcxx/test/std/localization/locales/locale/locale.types/locale.facet/tested_elsewhere.pass.cpp b/libcxx/test/std/localization/locales/locale/locale.types/locale.facet/tested_elsewhere.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/localization/locales/locale/locale.types/locale.facet/tested_elsewhere.pass.cpp +++ b/libcxx/test/std/localization/locales/locale/locale.types/locale.facet/tested_elsewhere.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/localization/locales/locale/locale.types/locale.id/tested_elsewhere.pass.cpp b/libcxx/test/std/localization/locales/locale/locale.types/locale.id/tested_elsewhere.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/localization/locales/locale/locale.types/locale.id/tested_elsewhere.pass.cpp +++ b/libcxx/test/std/localization/locales/locale/locale.types/locale.id/tested_elsewhere.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/localization/locales/locale/locale.types/nothing_to_do.pass.cpp b/libcxx/test/std/localization/locales/locale/locale.types/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/localization/locales/locale/locale.types/nothing_to_do.pass.cpp +++ b/libcxx/test/std/localization/locales/locale/locale.types/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/localization/locales/locale/nothing_to_do.pass.cpp b/libcxx/test/std/localization/locales/locale/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/localization/locales/locale/nothing_to_do.pass.cpp +++ b/libcxx/test/std/localization/locales/locale/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/localization/locales/nothing_to_do.pass.cpp b/libcxx/test/std/localization/locales/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/localization/locales/nothing_to_do.pass.cpp +++ b/libcxx/test/std/localization/locales/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/localization/localization.general/nothing_to_do.pass.cpp b/libcxx/test/std/localization/localization.general/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/localization/localization.general/nothing_to_do.pass.cpp +++ b/libcxx/test/std/localization/localization.general/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/nothing_to_do.pass.cpp b/libcxx/test/std/nothing_to_do.pass.cpp index 02fe32ece4841..779762e7e995d 100644 --- a/libcxx/test/std/nothing_to_do.pass.cpp +++ b/libcxx/test/std/nothing_to_do.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/numerics/c.math/cmath.pass.cpp b/libcxx/test/std/numerics/c.math/cmath.pass.cpp index fa90486438789..3f9a5f557cc48 100644 --- a/libcxx/test/std/numerics/c.math/cmath.pass.cpp +++ b/libcxx/test/std/numerics/c.math/cmath.pass.cpp @@ -1514,7 +1514,7 @@ void test_trunc() assert(std::trunc(1) == 1); } -int main() +int main(int, char**) { test_abs(); test_acos(); @@ -1586,4 +1586,6 @@ int main() test_scalbn(); test_tgamma(); test_trunc(); + + return 0; } diff --git a/libcxx/test/std/numerics/c.math/ctgmath.pass.cpp b/libcxx/test/std/numerics/c.math/ctgmath.pass.cpp index c2ea8e8755dc0..4cba6031aafb6 100644 --- a/libcxx/test/std/numerics/c.math/ctgmath.pass.cpp +++ b/libcxx/test/std/numerics/c.math/ctgmath.pass.cpp @@ -10,10 +10,12 @@ #include -int main() +int main(int, char**) { std::complex cd; (void)cd; double x = std::sin(0); ((void)x); // Prevent unused warning + + return 0; } diff --git a/libcxx/test/std/numerics/c.math/tgmath_h.pass.cpp b/libcxx/test/std/numerics/c.math/tgmath_h.pass.cpp index c58827cb4af6d..3fab28b0425d9 100644 --- a/libcxx/test/std/numerics/c.math/tgmath_h.pass.cpp +++ b/libcxx/test/std/numerics/c.math/tgmath_h.pass.cpp @@ -10,6 +10,8 @@ #include -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/numerics/cfenv/cfenv.syn/cfenv.pass.cpp b/libcxx/test/std/numerics/cfenv/cfenv.syn/cfenv.pass.cpp index 671e4d12d54a8..61378439298d2 100644 --- a/libcxx/test/std/numerics/cfenv/cfenv.syn/cfenv.pass.cpp +++ b/libcxx/test/std/numerics/cfenv/cfenv.syn/cfenv.pass.cpp @@ -57,7 +57,7 @@ #error FE_DFL_ENV not defined #endif -int main() +int main(int, char**) { std::fenv_t fenv; std::fexcept_t fex; @@ -74,4 +74,6 @@ int main() static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); + + return 0; } diff --git a/libcxx/test/std/numerics/complex.number/ccmplx/ccomplex.pass.cpp b/libcxx/test/std/numerics/complex.number/ccmplx/ccomplex.pass.cpp index 4be7122e775fe..ad1f4c423ac68 100644 --- a/libcxx/test/std/numerics/complex.number/ccmplx/ccomplex.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/ccmplx/ccomplex.pass.cpp @@ -10,8 +10,10 @@ #include -int main() +int main(int, char**) { std::complex d; (void)d; + + return 0; } diff --git a/libcxx/test/std/numerics/complex.number/cmplx.over/UDT_is_rejected.fail.cpp b/libcxx/test/std/numerics/complex.number/cmplx.over/UDT_is_rejected.fail.cpp index 0e9a7cefc55b0..bc0e5d8142fa8 100644 --- a/libcxx/test/std/numerics/complex.number/cmplx.over/UDT_is_rejected.fail.cpp +++ b/libcxx/test/std/numerics/complex.number/cmplx.over/UDT_is_rejected.fail.cpp @@ -26,7 +26,7 @@ UDT ldt; UDT it; UDT uit; -int main() +int main(int, char**) { { std::real(ft); // expected-error {{no matching function}} @@ -70,4 +70,6 @@ int main() std::proj(it); // expected-error {{no matching function}} std::proj(uit); // expected-error {{no matching function}} } + + return 0; } diff --git a/libcxx/test/std/numerics/complex.number/cmplx.over/arg.pass.cpp b/libcxx/test/std/numerics/complex.number/cmplx.over/arg.pass.cpp index f05c42f25ef65..bbc865a5ad668 100644 --- a/libcxx/test/std/numerics/complex.number/cmplx.over/arg.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/cmplx.over/arg.pass.cpp @@ -43,7 +43,7 @@ test() test(10); } -int main() +int main(int, char**) { test(); test(); @@ -51,4 +51,6 @@ int main() test(); test(); test(); + + return 0; } diff --git a/libcxx/test/std/numerics/complex.number/cmplx.over/conj.pass.cpp b/libcxx/test/std/numerics/complex.number/cmplx.over/conj.pass.cpp index 80bd15714410c..46bf69aade5af 100644 --- a/libcxx/test/std/numerics/complex.number/cmplx.over/conj.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/cmplx.over/conj.pass.cpp @@ -54,7 +54,7 @@ test() test(10); } -int main() +int main(int, char**) { test(); test(); @@ -62,4 +62,6 @@ int main() test(); test(); test(); + + return 0; } diff --git a/libcxx/test/std/numerics/complex.number/cmplx.over/imag.pass.cpp b/libcxx/test/std/numerics/complex.number/cmplx.over/imag.pass.cpp index 8be97fac2a47f..a05781273630c 100644 --- a/libcxx/test/std/numerics/complex.number/cmplx.over/imag.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/cmplx.over/imag.pass.cpp @@ -56,7 +56,7 @@ test() test(); } -int main() +int main(int, char**) { test(); test(); @@ -64,4 +64,6 @@ int main() test(); test(); test(); + + return 0; } diff --git a/libcxx/test/std/numerics/complex.number/cmplx.over/norm.pass.cpp b/libcxx/test/std/numerics/complex.number/cmplx.over/norm.pass.cpp index a3bf9dd27a7d6..69a2eada84cd4 100644 --- a/libcxx/test/std/numerics/complex.number/cmplx.over/norm.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/cmplx.over/norm.pass.cpp @@ -43,7 +43,7 @@ test() test(10); } -int main() +int main(int, char**) { test(); test(); @@ -51,4 +51,6 @@ int main() test(); test(); test(); + + return 0; } diff --git a/libcxx/test/std/numerics/complex.number/cmplx.over/pow.pass.cpp b/libcxx/test/std/numerics/complex.number/cmplx.over/pow.pass.cpp index 60a5b1957b500..802b9e7735a5b 100644 --- a/libcxx/test/std/numerics/complex.number/cmplx.over/pow.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/cmplx.over/pow.pass.cpp @@ -78,7 +78,7 @@ test(typename std::enable_if::value>::type* = 0, typename s test(std::complex(3, 4), std::complex(5, 6)); } -int main() +int main(int, char**) { test(); test(); @@ -100,4 +100,6 @@ int main() test(); test(); + + return 0; } diff --git a/libcxx/test/std/numerics/complex.number/cmplx.over/proj.pass.cpp b/libcxx/test/std/numerics/complex.number/cmplx.over/proj.pass.cpp index a9dfeae578789..41b82b0d7b953 100644 --- a/libcxx/test/std/numerics/complex.number/cmplx.over/proj.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/cmplx.over/proj.pass.cpp @@ -54,7 +54,7 @@ test() test(10); } -int main() +int main(int, char**) { test(); test(); @@ -62,4 +62,6 @@ int main() test(); test(); test(); + + return 0; } diff --git a/libcxx/test/std/numerics/complex.number/cmplx.over/real.pass.cpp b/libcxx/test/std/numerics/complex.number/cmplx.over/real.pass.cpp index 5d0fa76b30f48..41e9c8fe2d6ba 100644 --- a/libcxx/test/std/numerics/complex.number/cmplx.over/real.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/cmplx.over/real.pass.cpp @@ -56,7 +56,7 @@ test() test(); } -int main() +int main(int, char**) { test(); test(); @@ -64,4 +64,6 @@ int main() test(); test(); test(); + + return 0; } diff --git a/libcxx/test/std/numerics/complex.number/complex.literals/literals.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.literals/literals.pass.cpp index ed944eb04aba4..7d8d701fda6b8 100644 --- a/libcxx/test/std/numerics/complex.number/complex.literals/literals.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.literals/literals.pass.cpp @@ -15,7 +15,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { using namespace std::literals::complex_literals; @@ -47,4 +47,6 @@ int main() auto c2 = 3if; assert ( c1 == c2 ); } + + return 0; } diff --git a/libcxx/test/std/numerics/complex.number/complex.literals/literals1.fail.cpp b/libcxx/test/std/numerics/complex.number/complex.literals/literals1.fail.cpp index 0b09858a323f1..c5e6b29101ce5 100644 --- a/libcxx/test/std/numerics/complex.number/complex.literals/literals1.fail.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.literals/literals1.fail.cpp @@ -13,7 +13,9 @@ #include "test_macros.h" -int main() +int main(int, char**) { std::complex foo = 1.0if; // should fail w/conversion operator not found + + return 0; } diff --git a/libcxx/test/std/numerics/complex.number/complex.literals/literals1.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.literals/literals1.pass.cpp index 25d0d1d4412f1..ba9532a5ee321 100644 --- a/libcxx/test/std/numerics/complex.number/complex.literals/literals1.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.literals/literals1.pass.cpp @@ -13,7 +13,7 @@ #include #include -int main() +int main(int, char**) { using namespace std::literals; @@ -37,4 +37,6 @@ int main() auto c2 = 3if; assert ( c1 == c2 ); } + + return 0; } diff --git a/libcxx/test/std/numerics/complex.number/complex.literals/literals2.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.literals/literals2.pass.cpp index 9fbe5572aa608..0b8d2f9cb3fd6 100644 --- a/libcxx/test/std/numerics/complex.number/complex.literals/literals2.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.literals/literals2.pass.cpp @@ -13,7 +13,7 @@ #include #include -int main() +int main(int, char**) { using namespace std; @@ -37,4 +37,6 @@ int main() auto c2 = 3if; assert ( c1 == c2 ); } + + return 0; } diff --git a/libcxx/test/std/numerics/complex.number/complex.member.ops/assignment_complex.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.member.ops/assignment_complex.pass.cpp index 8ab5460a0be09..d0ccb14f156cd 100644 --- a/libcxx/test/std/numerics/complex.number/complex.member.ops/assignment_complex.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.member.ops/assignment_complex.pass.cpp @@ -31,7 +31,7 @@ test() assert(c.imag() == -4.5); } -int main() +int main(int, char**) { test(); test(); @@ -44,4 +44,6 @@ int main() test(); test(); test(); + + return 0; } diff --git a/libcxx/test/std/numerics/complex.number/complex.member.ops/assignment_scalar.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.member.ops/assignment_scalar.pass.cpp index cb9a778c27c68..faab37ea4fdcf 100644 --- a/libcxx/test/std/numerics/complex.number/complex.member.ops/assignment_scalar.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.member.ops/assignment_scalar.pass.cpp @@ -28,9 +28,11 @@ test() assert(c.imag() == 0); } -int main() +int main(int, char**) { test(); test(); test(); + + return 0; } diff --git a/libcxx/test/std/numerics/complex.number/complex.member.ops/divide_equal_complex.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.member.ops/divide_equal_complex.pass.cpp index b1d1288aefa5a..052c2dceeca09 100644 --- a/libcxx/test/std/numerics/complex.number/complex.member.ops/divide_equal_complex.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.member.ops/divide_equal_complex.pass.cpp @@ -44,9 +44,11 @@ test() } -int main() +int main(int, char**) { test(); test(); test(); + + return 0; } diff --git a/libcxx/test/std/numerics/complex.number/complex.member.ops/divide_equal_scalar.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.member.ops/divide_equal_scalar.pass.cpp index 511140c671e30..63d34b0512eeb 100644 --- a/libcxx/test/std/numerics/complex.number/complex.member.ops/divide_equal_scalar.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.member.ops/divide_equal_scalar.pass.cpp @@ -35,9 +35,11 @@ test() assert(c.imag() == 4); } -int main() +int main(int, char**) { test(); test(); test(); + + return 0; } diff --git a/libcxx/test/std/numerics/complex.number/complex.member.ops/minus_equal_complex.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.member.ops/minus_equal_complex.pass.cpp index 11c5c319dbd7e..09cde61241bd6 100644 --- a/libcxx/test/std/numerics/complex.number/complex.member.ops/minus_equal_complex.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.member.ops/minus_equal_complex.pass.cpp @@ -43,9 +43,11 @@ test() assert(c3.imag() == -6); } -int main() +int main(int, char**) { test(); test(); test(); + + return 0; } diff --git a/libcxx/test/std/numerics/complex.number/complex.member.ops/minus_equal_scalar.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.member.ops/minus_equal_scalar.pass.cpp index e3d9da7b50a07..ae5b07157def4 100644 --- a/libcxx/test/std/numerics/complex.number/complex.member.ops/minus_equal_scalar.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.member.ops/minus_equal_scalar.pass.cpp @@ -31,9 +31,11 @@ test() assert(c.imag() == 0); } -int main() +int main(int, char**) { test(); test(); test(); + + return 0; } diff --git a/libcxx/test/std/numerics/complex.number/complex.member.ops/plus_equal_complex.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.member.ops/plus_equal_complex.pass.cpp index d108b8a54ef82..0c86b6750d31b 100644 --- a/libcxx/test/std/numerics/complex.number/complex.member.ops/plus_equal_complex.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.member.ops/plus_equal_complex.pass.cpp @@ -43,9 +43,11 @@ test() assert(c3.imag() == 6); } -int main() +int main(int, char**) { test(); test(); test(); + + return 0; } diff --git a/libcxx/test/std/numerics/complex.number/complex.member.ops/plus_equal_scalar.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.member.ops/plus_equal_scalar.pass.cpp index b417505fa08e6..498724a36270f 100644 --- a/libcxx/test/std/numerics/complex.number/complex.member.ops/plus_equal_scalar.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.member.ops/plus_equal_scalar.pass.cpp @@ -31,9 +31,11 @@ test() assert(c.imag() == 0); } -int main() +int main(int, char**) { test(); test(); test(); + + return 0; } diff --git a/libcxx/test/std/numerics/complex.number/complex.member.ops/times_equal_complex.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.member.ops/times_equal_complex.pass.cpp index 1d04690859738..fc690072bfa17 100644 --- a/libcxx/test/std/numerics/complex.number/complex.member.ops/times_equal_complex.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.member.ops/times_equal_complex.pass.cpp @@ -43,9 +43,11 @@ test() assert(c3.imag() == 3.5); } -int main() +int main(int, char**) { test(); test(); test(); + + return 0; } diff --git a/libcxx/test/std/numerics/complex.number/complex.member.ops/times_equal_scalar.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.member.ops/times_equal_scalar.pass.cpp index f32b247c2c61b..6cb95ea660a26 100644 --- a/libcxx/test/std/numerics/complex.number/complex.member.ops/times_equal_scalar.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.member.ops/times_equal_scalar.pass.cpp @@ -35,9 +35,11 @@ test() assert(c.imag() == 3); } -int main() +int main(int, char**) { test(); test(); test(); + + return 0; } diff --git a/libcxx/test/std/numerics/complex.number/complex.members/construct.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.members/construct.pass.cpp index 75d9b5d672fdf..fa5e5729f4008 100644 --- a/libcxx/test/std/numerics/complex.number/complex.members/construct.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.members/construct.pass.cpp @@ -63,9 +63,11 @@ test() #endif } -int main() +int main(int, char**) { test(); test(); test(); + + return 0; } diff --git a/libcxx/test/std/numerics/complex.number/complex.members/real_imag.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.members/real_imag.pass.cpp index b1b378b5687cd..c4a1ef9353982 100644 --- a/libcxx/test/std/numerics/complex.number/complex.members/real_imag.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.members/real_imag.pass.cpp @@ -56,10 +56,12 @@ test() test_constexpr (); } -int main() +int main(int, char**) { test(); test(); test(); test_constexpr (); + + return 0; } diff --git a/libcxx/test/std/numerics/complex.number/complex.ops/complex_divide_complex.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.ops/complex_divide_complex.pass.cpp index 44837cc09f59f..5166fa57ff14d 100644 --- a/libcxx/test/std/numerics/complex.number/complex.ops/complex_divide_complex.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.ops/complex_divide_complex.pass.cpp @@ -149,10 +149,12 @@ void test_edges() } } -int main() +int main(int, char**) { test(); test(); test(); test_edges(); + + return 0; } diff --git a/libcxx/test/std/numerics/complex.number/complex.ops/complex_divide_scalar.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.ops/complex_divide_scalar.pass.cpp index ec9af0d2131d6..e7a1d81cf6261 100644 --- a/libcxx/test/std/numerics/complex.number/complex.ops/complex_divide_scalar.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.ops/complex_divide_scalar.pass.cpp @@ -32,9 +32,11 @@ test() test(lhs, rhs, x); } -int main() +int main(int, char**) { test(); test(); test(); + + return 0; } diff --git a/libcxx/test/std/numerics/complex.number/complex.ops/complex_equals_complex.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.ops/complex_equals_complex.pass.cpp index 88cee31584ab4..27621f165cf8a 100644 --- a/libcxx/test/std/numerics/complex.number/complex.ops/complex_equals_complex.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.ops/complex_equals_complex.pass.cpp @@ -52,10 +52,12 @@ test() test_constexpr (); } -int main() +int main(int, char**) { test(); test(); test(); // test_constexpr (); + + return 0; } diff --git a/libcxx/test/std/numerics/complex.number/complex.ops/complex_equals_scalar.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.ops/complex_equals_scalar.pass.cpp index e08d85fd1eb5b..1ec74e703f117 100644 --- a/libcxx/test/std/numerics/complex.number/complex.ops/complex_equals_scalar.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.ops/complex_equals_scalar.pass.cpp @@ -73,10 +73,12 @@ test() test_constexpr (); } -int main() +int main(int, char**) { test(); test(); test(); // test_constexpr (); + + return 0; } diff --git a/libcxx/test/std/numerics/complex.number/complex.ops/complex_minus_complex.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.ops/complex_minus_complex.pass.cpp index eb93cbe63eece..999a2c91dc0e7 100644 --- a/libcxx/test/std/numerics/complex.number/complex.ops/complex_minus_complex.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.ops/complex_minus_complex.pass.cpp @@ -40,9 +40,11 @@ test() } } -int main() +int main(int, char**) { test(); test(); test(); + + return 0; } diff --git a/libcxx/test/std/numerics/complex.number/complex.ops/complex_minus_scalar.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.ops/complex_minus_scalar.pass.cpp index 0b81ed949cb49..9aea6819c732a 100644 --- a/libcxx/test/std/numerics/complex.number/complex.ops/complex_minus_scalar.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.ops/complex_minus_scalar.pass.cpp @@ -40,9 +40,11 @@ test() } } -int main() +int main(int, char**) { test(); test(); test(); + + return 0; } diff --git a/libcxx/test/std/numerics/complex.number/complex.ops/complex_not_equals_complex.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.ops/complex_not_equals_complex.pass.cpp index 4ad67be2cc07d..319e453a900a4 100644 --- a/libcxx/test/std/numerics/complex.number/complex.ops/complex_not_equals_complex.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.ops/complex_not_equals_complex.pass.cpp @@ -54,10 +54,12 @@ test() test_constexpr (); } -int main() +int main(int, char**) { test(); test(); test(); // test_constexpr (); + + return 0; } diff --git a/libcxx/test/std/numerics/complex.number/complex.ops/complex_not_equals_scalar.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.ops/complex_not_equals_scalar.pass.cpp index 43f0f8c5d8f0c..69c71cde0434c 100644 --- a/libcxx/test/std/numerics/complex.number/complex.ops/complex_not_equals_scalar.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.ops/complex_not_equals_scalar.pass.cpp @@ -73,10 +73,12 @@ test() test_constexpr (); } -int main() +int main(int, char**) { test(); test(); test(); // test_constexpr (); - } + + return 0; +} diff --git a/libcxx/test/std/numerics/complex.number/complex.ops/complex_plus_complex.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.ops/complex_plus_complex.pass.cpp index 46953f662d0c4..5a2fdcfb0da67 100644 --- a/libcxx/test/std/numerics/complex.number/complex.ops/complex_plus_complex.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.ops/complex_plus_complex.pass.cpp @@ -40,9 +40,11 @@ test() } } -int main() +int main(int, char**) { test(); test(); test(); + + return 0; } diff --git a/libcxx/test/std/numerics/complex.number/complex.ops/complex_plus_scalar.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.ops/complex_plus_scalar.pass.cpp index 7f4a7a2b59c76..4f9dfb1d41667 100644 --- a/libcxx/test/std/numerics/complex.number/complex.ops/complex_plus_scalar.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.ops/complex_plus_scalar.pass.cpp @@ -40,9 +40,11 @@ test() } } -int main() +int main(int, char**) { test(); test(); test(); + + return 0; } diff --git a/libcxx/test/std/numerics/complex.number/complex.ops/complex_times_complex.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.ops/complex_times_complex.pass.cpp index ba499e51bb296..f2203d4db93df 100644 --- a/libcxx/test/std/numerics/complex.number/complex.ops/complex_times_complex.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.ops/complex_times_complex.pass.cpp @@ -151,10 +151,12 @@ void test_edges() } } -int main() +int main(int, char**) { test(); test(); test(); test_edges(); + + return 0; } diff --git a/libcxx/test/std/numerics/complex.number/complex.ops/complex_times_scalar.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.ops/complex_times_scalar.pass.cpp index 94afd4b863fef..9fface6b75f7b 100644 --- a/libcxx/test/std/numerics/complex.number/complex.ops/complex_times_scalar.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.ops/complex_times_scalar.pass.cpp @@ -32,9 +32,11 @@ test() test(lhs, rhs, x); } -int main() +int main(int, char**) { test(); test(); test(); + + return 0; } diff --git a/libcxx/test/std/numerics/complex.number/complex.ops/scalar_divide_complex.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.ops/scalar_divide_complex.pass.cpp index e793c7dc95f06..01b706dd7b2ab 100644 --- a/libcxx/test/std/numerics/complex.number/complex.ops/scalar_divide_complex.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.ops/scalar_divide_complex.pass.cpp @@ -32,9 +32,11 @@ test() test(lhs, rhs, x); } -int main() +int main(int, char**) { test(); test(); test(); + + return 0; } diff --git a/libcxx/test/std/numerics/complex.number/complex.ops/scalar_equals_complex.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.ops/scalar_equals_complex.pass.cpp index 551fd2574a60c..d5dcc29182de0 100644 --- a/libcxx/test/std/numerics/complex.number/complex.ops/scalar_equals_complex.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.ops/scalar_equals_complex.pass.cpp @@ -73,10 +73,12 @@ test() test_constexpr (); } -int main() +int main(int, char**) { test(); test(); test(); // test_constexpr(); + + return 0; } diff --git a/libcxx/test/std/numerics/complex.number/complex.ops/scalar_minus_complex.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.ops/scalar_minus_complex.pass.cpp index b693898272e8e..006572492731e 100644 --- a/libcxx/test/std/numerics/complex.number/complex.ops/scalar_minus_complex.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.ops/scalar_minus_complex.pass.cpp @@ -40,9 +40,11 @@ test() } } -int main() +int main(int, char**) { test(); test(); test(); + + return 0; } diff --git a/libcxx/test/std/numerics/complex.number/complex.ops/scalar_not_equals_complex.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.ops/scalar_not_equals_complex.pass.cpp index 3521814769b14..edff47a016069 100644 --- a/libcxx/test/std/numerics/complex.number/complex.ops/scalar_not_equals_complex.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.ops/scalar_not_equals_complex.pass.cpp @@ -73,10 +73,12 @@ test() test_constexpr (); } -int main() +int main(int, char**) { test(); test(); test(); // test_constexpr(); + + return 0; } diff --git a/libcxx/test/std/numerics/complex.number/complex.ops/scalar_plus_complex.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.ops/scalar_plus_complex.pass.cpp index 52ae2a150799b..d8fc8a6d95841 100644 --- a/libcxx/test/std/numerics/complex.number/complex.ops/scalar_plus_complex.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.ops/scalar_plus_complex.pass.cpp @@ -40,9 +40,11 @@ test() } } -int main() +int main(int, char**) { test(); test(); test(); + + return 0; } diff --git a/libcxx/test/std/numerics/complex.number/complex.ops/scalar_times_complex.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.ops/scalar_times_complex.pass.cpp index 1e96a3d9c3030..a33347db06a27 100644 --- a/libcxx/test/std/numerics/complex.number/complex.ops/scalar_times_complex.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.ops/scalar_times_complex.pass.cpp @@ -32,9 +32,11 @@ test() test(lhs, rhs, x); } -int main() +int main(int, char**) { test(); test(); test(); + + return 0; } diff --git a/libcxx/test/std/numerics/complex.number/complex.ops/stream_input.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.ops/stream_input.pass.cpp index e6d944f42bb23..4f33b97ebc8fc 100644 --- a/libcxx/test/std/numerics/complex.number/complex.ops/stream_input.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.ops/stream_input.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { std::istringstream is("5"); @@ -95,4 +95,6 @@ int main() assert(c == std::complex(-5.5, -6.5)); assert(!is.eof()); } + + return 0; } diff --git a/libcxx/test/std/numerics/complex.number/complex.ops/stream_output.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.ops/stream_output.pass.cpp index 2e72bd8a5e192..2f1fa91e8dcd0 100644 --- a/libcxx/test/std/numerics/complex.number/complex.ops/stream_output.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.ops/stream_output.pass.cpp @@ -16,10 +16,12 @@ #include #include -int main() +int main(int, char**) { std::complex c(1, 2); std::ostringstream os; os << c; assert(os.str() == "(1,2)"); + + return 0; } diff --git a/libcxx/test/std/numerics/complex.number/complex.ops/unary_minus.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.ops/unary_minus.pass.cpp index c61c8779ff1f1..0249240e830e9 100644 --- a/libcxx/test/std/numerics/complex.number/complex.ops/unary_minus.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.ops/unary_minus.pass.cpp @@ -27,9 +27,11 @@ test() assert(c.imag() == -2.5); } -int main() +int main(int, char**) { test(); test(); test(); + + return 0; } diff --git a/libcxx/test/std/numerics/complex.number/complex.ops/unary_plus.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.ops/unary_plus.pass.cpp index e6d2de6e45d29..c5c2b6de12dfb 100644 --- a/libcxx/test/std/numerics/complex.number/complex.ops/unary_plus.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.ops/unary_plus.pass.cpp @@ -27,9 +27,11 @@ test() assert(c.imag() == 2.5); } -int main() +int main(int, char**) { test(); test(); test(); + + return 0; } diff --git a/libcxx/test/std/numerics/complex.number/complex.special/double_float_explicit.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.special/double_float_explicit.pass.cpp index 9681bdb1766fe..f2e64466fbdc8 100644 --- a/libcxx/test/std/numerics/complex.number/complex.special/double_float_explicit.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.special/double_float_explicit.pass.cpp @@ -19,7 +19,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { { const std::complex cd(2.5, 3.5); @@ -35,4 +35,6 @@ int main() static_assert(cf.imag() == cd.imag(), ""); } #endif + + return 0; } diff --git a/libcxx/test/std/numerics/complex.number/complex.special/double_float_implicit.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.special/double_float_implicit.pass.cpp index db4fb2c4fc857..72a4f0241455b 100644 --- a/libcxx/test/std/numerics/complex.number/complex.special/double_float_implicit.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.special/double_float_implicit.pass.cpp @@ -19,7 +19,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { { const std::complex cd(2.5, 3.5); @@ -35,4 +35,6 @@ int main() static_assert(cf.imag() == cd.imag(), ""); } #endif + + return 0; } diff --git a/libcxx/test/std/numerics/complex.number/complex.special/double_long_double_explicit.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.special/double_long_double_explicit.pass.cpp index 09f2b6ae24029..751b3b851ea34 100644 --- a/libcxx/test/std/numerics/complex.number/complex.special/double_long_double_explicit.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.special/double_long_double_explicit.pass.cpp @@ -19,7 +19,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { { const std::complex cd(2.5, 3.5); @@ -35,4 +35,6 @@ int main() static_assert(cf.imag() == cd.imag(), ""); } #endif + + return 0; } diff --git a/libcxx/test/std/numerics/complex.number/complex.special/double_long_double_implicit.fail.cpp b/libcxx/test/std/numerics/complex.number/complex.special/double_long_double_implicit.fail.cpp index 72031e11e9922..51242310a0d81 100644 --- a/libcxx/test/std/numerics/complex.number/complex.special/double_long_double_implicit.fail.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.special/double_long_double_implicit.fail.cpp @@ -17,10 +17,12 @@ #include #include -int main() +int main(int, char**) { const std::complex cd(2.5, 3.5); std::complex cf = cd; assert(cf.real() == cd.real()); assert(cf.imag() == cd.imag()); + + return 0; } diff --git a/libcxx/test/std/numerics/complex.number/complex.special/float_double_explicit.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.special/float_double_explicit.pass.cpp index e2074cbe36610..7ed53c62dfa2f 100644 --- a/libcxx/test/std/numerics/complex.number/complex.special/float_double_explicit.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.special/float_double_explicit.pass.cpp @@ -19,7 +19,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { { const std::complex cd(2.5, 3.5); @@ -35,4 +35,6 @@ int main() static_assert(cf.imag() == cd.imag(), ""); } #endif + + return 0; } diff --git a/libcxx/test/std/numerics/complex.number/complex.special/float_double_implicit.fail.cpp b/libcxx/test/std/numerics/complex.number/complex.special/float_double_implicit.fail.cpp index 66876e0bc9ac0..7274a2121af5a 100644 --- a/libcxx/test/std/numerics/complex.number/complex.special/float_double_implicit.fail.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.special/float_double_implicit.fail.cpp @@ -17,10 +17,12 @@ #include #include -int main() +int main(int, char**) { const std::complex cd(2.5, 3.5); std::complex cf = cd; assert(cf.real() == cd.real()); assert(cf.imag() == cd.imag()); + + return 0; } diff --git a/libcxx/test/std/numerics/complex.number/complex.special/float_long_double_explicit.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.special/float_long_double_explicit.pass.cpp index 5e56346ec1a4a..b191bf6ea34b0 100644 --- a/libcxx/test/std/numerics/complex.number/complex.special/float_long_double_explicit.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.special/float_long_double_explicit.pass.cpp @@ -19,7 +19,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { { const std::complex cd(2.5, 3.5); @@ -35,4 +35,6 @@ int main() static_assert(cf.imag() == cd.imag(), ""); } #endif + + return 0; } diff --git a/libcxx/test/std/numerics/complex.number/complex.special/float_long_double_implicit.fail.cpp b/libcxx/test/std/numerics/complex.number/complex.special/float_long_double_implicit.fail.cpp index 6e9bc5b3a311d..3bf7a03767ec5 100644 --- a/libcxx/test/std/numerics/complex.number/complex.special/float_long_double_implicit.fail.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.special/float_long_double_implicit.fail.cpp @@ -17,10 +17,12 @@ #include #include -int main() +int main(int, char**) { const std::complex cd(2.5, 3.5); std::complex cf = cd; assert(cf.real() == cd.real()); assert(cf.imag() == cd.imag()); + + return 0; } diff --git a/libcxx/test/std/numerics/complex.number/complex.special/long_double_double_explicit.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.special/long_double_double_explicit.pass.cpp index 3b4ce583929d7..e257db2bdf155 100644 --- a/libcxx/test/std/numerics/complex.number/complex.special/long_double_double_explicit.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.special/long_double_double_explicit.pass.cpp @@ -19,7 +19,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { { const std::complex cd(2.5, 3.5); @@ -35,4 +35,6 @@ int main() static_assert(cf.imag() == cd.imag(), ""); } #endif + + return 0; } diff --git a/libcxx/test/std/numerics/complex.number/complex.special/long_double_double_implicit.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.special/long_double_double_implicit.pass.cpp index 5f967668fb314..b47d945fee323 100644 --- a/libcxx/test/std/numerics/complex.number/complex.special/long_double_double_implicit.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.special/long_double_double_implicit.pass.cpp @@ -19,7 +19,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { { const std::complex cd(2.5, 3.5); @@ -35,4 +35,6 @@ int main() static_assert(cf.imag() == cd.imag(), ""); } #endif + + return 0; } diff --git a/libcxx/test/std/numerics/complex.number/complex.special/long_double_float_explicit.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.special/long_double_float_explicit.pass.cpp index afbea2a0c6985..97f91ee07014c 100644 --- a/libcxx/test/std/numerics/complex.number/complex.special/long_double_float_explicit.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.special/long_double_float_explicit.pass.cpp @@ -19,7 +19,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { { const std::complex cd(2.5, 3.5); @@ -35,4 +35,6 @@ int main() static_assert(cf.imag() == cd.imag(), ""); } #endif + + return 0; } diff --git a/libcxx/test/std/numerics/complex.number/complex.special/long_double_float_implicit.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.special/long_double_float_implicit.pass.cpp index e6d19736577b7..51e966d4c1c10 100644 --- a/libcxx/test/std/numerics/complex.number/complex.special/long_double_float_implicit.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.special/long_double_float_implicit.pass.cpp @@ -19,7 +19,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { { const std::complex cd(2.5, 3.5); @@ -35,4 +35,6 @@ int main() static_assert(cf.imag() == cd.imag(), ""); } #endif + + return 0; } diff --git a/libcxx/test/std/numerics/complex.number/complex.synopsis/nothing_to_do.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.synopsis/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/numerics/complex.number/complex.synopsis/nothing_to_do.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.synopsis/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/numerics/complex.number/complex.transcendentals/acos.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.transcendentals/acos.pass.cpp index 76b280af3c6cd..ecb6696890519 100644 --- a/libcxx/test/std/numerics/complex.number/complex.transcendentals/acos.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.transcendentals/acos.pass.cpp @@ -129,10 +129,12 @@ void test_edges() } } -int main() +int main(int, char**) { test(); test(); test(); test_edges(); + + return 0; } diff --git a/libcxx/test/std/numerics/complex.number/complex.transcendentals/acosh.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.transcendentals/acosh.pass.cpp index b981e1a31d1e5..4a22dde0287d0 100644 --- a/libcxx/test/std/numerics/complex.number/complex.transcendentals/acosh.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.transcendentals/acosh.pass.cpp @@ -140,10 +140,12 @@ void test_edges() } } -int main() +int main(int, char**) { test(); test(); test(); test_edges(); + + return 0; } diff --git a/libcxx/test/std/numerics/complex.number/complex.transcendentals/asin.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.transcendentals/asin.pass.cpp index 7d6516aebaea7..91ec6e9bdabf9 100644 --- a/libcxx/test/std/numerics/complex.number/complex.transcendentals/asin.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.transcendentals/asin.pass.cpp @@ -108,10 +108,12 @@ void test_edges() } } -int main() +int main(int, char**) { test(); test(); test(); test_edges(); + + return 0; } diff --git a/libcxx/test/std/numerics/complex.number/complex.transcendentals/asinh.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.transcendentals/asinh.pass.cpp index c6a6d8bb3cbe3..18ac1f17a83f8 100644 --- a/libcxx/test/std/numerics/complex.number/complex.transcendentals/asinh.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.transcendentals/asinh.pass.cpp @@ -117,10 +117,12 @@ void test_edges() } } -int main() +int main(int, char**) { test(); test(); test(); test_edges(); + + return 0; } diff --git a/libcxx/test/std/numerics/complex.number/complex.transcendentals/atan.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.transcendentals/atan.pass.cpp index f4025ae736f4d..1816e2f99b036 100644 --- a/libcxx/test/std/numerics/complex.number/complex.transcendentals/atan.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.transcendentals/atan.pass.cpp @@ -57,10 +57,12 @@ void test_edges() } } -int main() +int main(int, char**) { test(); test(); test(); test_edges(); + + return 0; } diff --git a/libcxx/test/std/numerics/complex.number/complex.transcendentals/atanh.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.transcendentals/atanh.pass.cpp index 4f037377ec6ad..5e4bb13f5afbf 100644 --- a/libcxx/test/std/numerics/complex.number/complex.transcendentals/atanh.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.transcendentals/atanh.pass.cpp @@ -121,10 +121,12 @@ void test_edges() } } -int main() +int main(int, char**) { test(); test(); test(); test_edges(); + + return 0; } diff --git a/libcxx/test/std/numerics/complex.number/complex.transcendentals/cos.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.transcendentals/cos.pass.cpp index ff069397ada3f..2085a4c85c616 100644 --- a/libcxx/test/std/numerics/complex.number/complex.transcendentals/cos.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.transcendentals/cos.pass.cpp @@ -56,10 +56,12 @@ void test_edges() } } -int main() +int main(int, char**) { test(); test(); test(); test_edges(); + + return 0; } diff --git a/libcxx/test/std/numerics/complex.number/complex.transcendentals/cosh.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.transcendentals/cosh.pass.cpp index eb6ef8832ed8b..e95c2968de6c2 100644 --- a/libcxx/test/std/numerics/complex.number/complex.transcendentals/cosh.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.transcendentals/cosh.pass.cpp @@ -106,10 +106,12 @@ void test_edges() } } -int main() +int main(int, char**) { test(); test(); test(); test_edges(); + + return 0; } diff --git a/libcxx/test/std/numerics/complex.number/complex.transcendentals/exp.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.transcendentals/exp.pass.cpp index 9442bb08423a2..fc638d135becd 100644 --- a/libcxx/test/std/numerics/complex.number/complex.transcendentals/exp.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.transcendentals/exp.pass.cpp @@ -104,10 +104,12 @@ void test_edges() } } -int main() +int main(int, char**) { test(); test(); test(); test_edges(); + + return 0; } diff --git a/libcxx/test/std/numerics/complex.number/complex.transcendentals/log.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.transcendentals/log.pass.cpp index 98d3cf45475b8..35f0c5c41b47d 100644 --- a/libcxx/test/std/numerics/complex.number/complex.transcendentals/log.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.transcendentals/log.pass.cpp @@ -121,10 +121,12 @@ void test_edges() } } -int main() +int main(int, char**) { test(); test(); test(); test_edges(); + + return 0; } diff --git a/libcxx/test/std/numerics/complex.number/complex.transcendentals/log10.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.transcendentals/log10.pass.cpp index 299e037a6ed8d..676175507c9d6 100644 --- a/libcxx/test/std/numerics/complex.number/complex.transcendentals/log10.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.transcendentals/log10.pass.cpp @@ -55,10 +55,12 @@ void test_edges() } } -int main() +int main(int, char**) { test(); test(); test(); test_edges(); + + return 0; } diff --git a/libcxx/test/std/numerics/complex.number/complex.transcendentals/pow_complex_complex.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.transcendentals/pow_complex_complex.pass.cpp index 8485277927eec..d34ab0c7ca1c1 100644 --- a/libcxx/test/std/numerics/complex.number/complex.transcendentals/pow_complex_complex.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.transcendentals/pow_complex_complex.pass.cpp @@ -60,10 +60,12 @@ void test_edges() } } -int main() +int main(int, char**) { test(); test(); test(); test_edges(); + + return 0; } diff --git a/libcxx/test/std/numerics/complex.number/complex.transcendentals/pow_complex_scalar.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.transcendentals/pow_complex_scalar.pass.cpp index 55120dcd524a0..7ffdd6136e66b 100644 --- a/libcxx/test/std/numerics/complex.number/complex.transcendentals/pow_complex_scalar.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.transcendentals/pow_complex_scalar.pass.cpp @@ -58,10 +58,12 @@ void test_edges() } } -int main() +int main(int, char**) { test(); test(); test(); test_edges(); + + return 0; } diff --git a/libcxx/test/std/numerics/complex.number/complex.transcendentals/pow_scalar_complex.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.transcendentals/pow_scalar_complex.pass.cpp index 81b4b2ca765ac..e4b5d3d14b6e5 100644 --- a/libcxx/test/std/numerics/complex.number/complex.transcendentals/pow_scalar_complex.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.transcendentals/pow_scalar_complex.pass.cpp @@ -58,10 +58,12 @@ void test_edges() } } -int main() +int main(int, char**) { test(); test(); test(); test_edges(); + + return 0; } diff --git a/libcxx/test/std/numerics/complex.number/complex.transcendentals/sin.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.transcendentals/sin.pass.cpp index 2c2b8cbb923be..6e33f705454c6 100644 --- a/libcxx/test/std/numerics/complex.number/complex.transcendentals/sin.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.transcendentals/sin.pass.cpp @@ -57,10 +57,12 @@ void test_edges() } } -int main() +int main(int, char**) { test(); test(); test(); test_edges(); + + return 0; } diff --git a/libcxx/test/std/numerics/complex.number/complex.transcendentals/sinh.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.transcendentals/sinh.pass.cpp index a2668320f68a1..7a9e7989830fc 100644 --- a/libcxx/test/std/numerics/complex.number/complex.transcendentals/sinh.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.transcendentals/sinh.pass.cpp @@ -107,10 +107,12 @@ void test_edges() } } -int main() +int main(int, char**) { test(); test(); test(); test_edges(); + + return 0; } diff --git a/libcxx/test/std/numerics/complex.number/complex.transcendentals/sqrt.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.transcendentals/sqrt.pass.cpp index 007bf2ac32def..a0b8433022fca 100644 --- a/libcxx/test/std/numerics/complex.number/complex.transcendentals/sqrt.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.transcendentals/sqrt.pass.cpp @@ -99,10 +99,12 @@ void test_edges() } } -int main() +int main(int, char**) { test(); test(); test(); test_edges(); + + return 0; } diff --git a/libcxx/test/std/numerics/complex.number/complex.transcendentals/tan.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.transcendentals/tan.pass.cpp index e7c80a3095c76..b4bc207fcccb6 100644 --- a/libcxx/test/std/numerics/complex.number/complex.transcendentals/tan.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.transcendentals/tan.pass.cpp @@ -58,10 +58,12 @@ void test_edges() } } -int main() +int main(int, char**) { test(); test(); test(); test_edges(); + + return 0; } diff --git a/libcxx/test/std/numerics/complex.number/complex.transcendentals/tanh.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.transcendentals/tanh.pass.cpp index 511cdeefae333..1be3a2cd0e776 100644 --- a/libcxx/test/std/numerics/complex.number/complex.transcendentals/tanh.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.transcendentals/tanh.pass.cpp @@ -89,10 +89,12 @@ void test_edges() } } -int main() +int main(int, char**) { test(); test(); test(); test_edges(); + + return 0; } diff --git a/libcxx/test/std/numerics/complex.number/complex.value.ops/abs.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.value.ops/abs.pass.cpp index 8fa09a7ef3a1f..7a518fc378ee8 100644 --- a/libcxx/test/std/numerics/complex.number/complex.value.ops/abs.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.value.ops/abs.pass.cpp @@ -53,10 +53,12 @@ void test_edges() } } -int main() +int main(int, char**) { test(); test(); test(); test_edges(); + + return 0; } diff --git a/libcxx/test/std/numerics/complex.number/complex.value.ops/arg.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.value.ops/arg.pass.cpp index 27366ec0efa3d..280ccc8cbc4ba 100644 --- a/libcxx/test/std/numerics/complex.number/complex.value.ops/arg.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.value.ops/arg.pass.cpp @@ -125,10 +125,12 @@ void test_edges() } } -int main() +int main(int, char**) { test(); test(); test(); test_edges(); + + return 0; } diff --git a/libcxx/test/std/numerics/complex.number/complex.value.ops/conj.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.value.ops/conj.pass.cpp index 7d6472aa6ee90..8c144ffbf2f7a 100644 --- a/libcxx/test/std/numerics/complex.number/complex.value.ops/conj.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.value.ops/conj.pass.cpp @@ -32,9 +32,11 @@ test() test(std::complex(-1, -2), std::complex(-1, 2)); } -int main() +int main(int, char**) { test(); test(); test(); + + return 0; } diff --git a/libcxx/test/std/numerics/complex.number/complex.value.ops/imag.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.value.ops/imag.pass.cpp index d4bf0d8c120a4..fe7cb3a96809e 100644 --- a/libcxx/test/std/numerics/complex.number/complex.value.ops/imag.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.value.ops/imag.pass.cpp @@ -23,9 +23,11 @@ test() assert(imag(z) == 2.5); } -int main() +int main(int, char**) { test(); test(); test(); + + return 0; } diff --git a/libcxx/test/std/numerics/complex.number/complex.value.ops/norm.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.value.ops/norm.pass.cpp index aeb13c80b1e68..fe197ff21c21a 100644 --- a/libcxx/test/std/numerics/complex.number/complex.value.ops/norm.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.value.ops/norm.pass.cpp @@ -53,10 +53,12 @@ void test_edges() } } -int main() +int main(int, char**) { test(); test(); test(); test_edges(); + + return 0; } diff --git a/libcxx/test/std/numerics/complex.number/complex.value.ops/polar.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.value.ops/polar.pass.cpp index 3f7c497c27b83..b7450abed6804 100644 --- a/libcxx/test/std/numerics/complex.number/complex.value.ops/polar.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.value.ops/polar.pass.cpp @@ -102,10 +102,12 @@ void test_edges() } } -int main() +int main(int, char**) { test(); test(); test(); test_edges(); + + return 0; } diff --git a/libcxx/test/std/numerics/complex.number/complex.value.ops/proj.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.value.ops/proj.pass.cpp index 6de4a0af8fab6..238429b5520b7 100644 --- a/libcxx/test/std/numerics/complex.number/complex.value.ops/proj.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.value.ops/proj.pass.cpp @@ -61,10 +61,12 @@ void test_edges() } } -int main() +int main(int, char**) { test(); test(); test(); test_edges(); + + return 0; } diff --git a/libcxx/test/std/numerics/complex.number/complex.value.ops/real.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.value.ops/real.pass.cpp index a94ba9f140122..138785900c3cc 100644 --- a/libcxx/test/std/numerics/complex.number/complex.value.ops/real.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.value.ops/real.pass.cpp @@ -23,9 +23,11 @@ test() assert(real(z) == 1.5); } -int main() +int main(int, char**) { test(); test(); test(); + + return 0; } diff --git a/libcxx/test/std/numerics/complex.number/complex/types.pass.cpp b/libcxx/test/std/numerics/complex.number/complex/types.pass.cpp index 3b2f3f7b85cc6..517743071dccc 100644 --- a/libcxx/test/std/numerics/complex.number/complex/types.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex/types.pass.cpp @@ -27,9 +27,11 @@ test() static_assert((std::is_same::value), ""); } -int main() +int main(int, char**) { test(); test(); test(); + + return 0; } diff --git a/libcxx/test/std/numerics/complex.number/layout.pass.cpp b/libcxx/test/std/numerics/complex.number/layout.pass.cpp index a154f5e40ae16..bcb81189abca4 100644 --- a/libcxx/test/std/numerics/complex.number/layout.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/layout.pass.cpp @@ -27,9 +27,11 @@ test() assert(a[1] == z.imag()); } -int main() +int main(int, char**) { test(); test(); test(); + + return 0; } diff --git a/libcxx/test/std/numerics/nothing_to_do.pass.cpp b/libcxx/test/std/numerics/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/numerics/nothing_to_do.pass.cpp +++ b/libcxx/test/std/numerics/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/class.gslice/gslice.access/tested_elsewhere.pass.cpp b/libcxx/test/std/numerics/numarray/class.gslice/gslice.access/tested_elsewhere.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/numerics/numarray/class.gslice/gslice.access/tested_elsewhere.pass.cpp +++ b/libcxx/test/std/numerics/numarray/class.gslice/gslice.access/tested_elsewhere.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/class.gslice/gslice.cons/default.pass.cpp b/libcxx/test/std/numerics/numarray/class.gslice/gslice.cons/default.pass.cpp index 854b5cb35f1af..312425afbf1af 100644 --- a/libcxx/test/std/numerics/numarray/class.gslice/gslice.cons/default.pass.cpp +++ b/libcxx/test/std/numerics/numarray/class.gslice/gslice.cons/default.pass.cpp @@ -15,10 +15,12 @@ #include #include -int main() +int main(int, char**) { std::gslice gs; assert(gs.start() == 0); assert(gs.size().size() == 0); assert(gs.stride().size() == 0); + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/class.gslice/gslice.cons/start_size_stride.pass.cpp b/libcxx/test/std/numerics/numarray/class.gslice/gslice.cons/start_size_stride.pass.cpp index 2faff95c7c1f0..682bb83fd1cde 100644 --- a/libcxx/test/std/numerics/numarray/class.gslice/gslice.cons/start_size_stride.pass.cpp +++ b/libcxx/test/std/numerics/numarray/class.gslice/gslice.cons/start_size_stride.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { std::size_t a1[] = {1, 2, 3}; std::size_t a2[] = {4, 5, 6}; @@ -34,4 +34,6 @@ int main() assert(r[0] == 4); assert(r[1] == 5); assert(r[2] == 6); + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/class.gslice/nothing_to_do.pass.cpp b/libcxx/test/std/numerics/numarray/class.gslice/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/numerics/numarray/class.gslice/nothing_to_do.pass.cpp +++ b/libcxx/test/std/numerics/numarray/class.gslice/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/class.slice/cons.slice/default.pass.cpp b/libcxx/test/std/numerics/numarray/class.slice/cons.slice/default.pass.cpp index c03de23437d61..92c17b8a2c499 100644 --- a/libcxx/test/std/numerics/numarray/class.slice/cons.slice/default.pass.cpp +++ b/libcxx/test/std/numerics/numarray/class.slice/cons.slice/default.pass.cpp @@ -15,10 +15,12 @@ #include #include -int main() +int main(int, char**) { std::slice s; assert(s.start() == 0); assert(s.size() == 0); assert(s.stride() == 0); + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/class.slice/cons.slice/start_size_stride.pass.cpp b/libcxx/test/std/numerics/numarray/class.slice/cons.slice/start_size_stride.pass.cpp index c74f20d5ad35f..72bff97571298 100644 --- a/libcxx/test/std/numerics/numarray/class.slice/cons.slice/start_size_stride.pass.cpp +++ b/libcxx/test/std/numerics/numarray/class.slice/cons.slice/start_size_stride.pass.cpp @@ -15,10 +15,12 @@ #include #include -int main() +int main(int, char**) { std::slice s(1, 3, 2); assert(s.start() == 1); assert(s.size() == 3); assert(s.stride() == 2); + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/class.slice/nothing_to_do.pass.cpp b/libcxx/test/std/numerics/numarray/class.slice/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/numerics/numarray/class.slice/nothing_to_do.pass.cpp +++ b/libcxx/test/std/numerics/numarray/class.slice/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/class.slice/slice.access/tested_elsewhere.pass.cpp b/libcxx/test/std/numerics/numarray/class.slice/slice.access/tested_elsewhere.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/numerics/numarray/class.slice/slice.access/tested_elsewhere.pass.cpp +++ b/libcxx/test/std/numerics/numarray/class.slice/slice.access/tested_elsewhere.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.gslice.array/default.fail.cpp b/libcxx/test/std/numerics/numarray/template.gslice.array/default.fail.cpp index dbad4eebb32eb..4429367cf6c79 100644 --- a/libcxx/test/std/numerics/numarray/template.gslice.array/default.fail.cpp +++ b/libcxx/test/std/numerics/numarray/template.gslice.array/default.fail.cpp @@ -15,7 +15,9 @@ #include #include -int main() +int main(int, char**) { std::gslice_array gs; + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.gslice.array/gslice.array.assign/gslice_array.pass.cpp b/libcxx/test/std/numerics/numarray/template.gslice.array/gslice.array.assign/gslice_array.pass.cpp index a2f0014279be6..3a916257b88c6 100644 --- a/libcxx/test/std/numerics/numarray/template.gslice.array/gslice.array.assign/gslice_array.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.gslice.array/gslice.array.assign/gslice_array.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { int a1[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, @@ -77,4 +77,6 @@ int main() assert(v1[38] == 38); assert(v1[39] == 39); assert(v1[40] == 40); + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.gslice.array/gslice.array.assign/valarray.pass.cpp b/libcxx/test/std/numerics/numarray/template.gslice.array/gslice.array.assign/valarray.pass.cpp index 147c6e29d1217..e1aca3b7ca894 100644 --- a/libcxx/test/std/numerics/numarray/template.gslice.array/gslice.array.assign/valarray.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.gslice.array/gslice.array.assign/valarray.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { int a1[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, @@ -73,4 +73,6 @@ int main() assert(v1[38] == 38); assert(v1[39] == 39); assert(v1[40] == 40); + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.gslice.array/gslice.array.comp.assign/addition.pass.cpp b/libcxx/test/std/numerics/numarray/template.gslice.array/gslice.array.comp.assign/addition.pass.cpp index fb1f3b5eeca20..9c82a6f949166 100644 --- a/libcxx/test/std/numerics/numarray/template.gslice.array/gslice.array.comp.assign/addition.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.gslice.array/gslice.array.comp.assign/addition.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { int a1[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, @@ -73,4 +73,6 @@ int main() assert(v1[38] == 38); assert(v1[39] == 39); assert(v1[40] == 40); + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.gslice.array/gslice.array.comp.assign/and.pass.cpp b/libcxx/test/std/numerics/numarray/template.gslice.array/gslice.array.comp.assign/and.pass.cpp index 4aa5f0245e721..bfe8ab288df1e 100644 --- a/libcxx/test/std/numerics/numarray/template.gslice.array/gslice.array.comp.assign/and.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.gslice.array/gslice.array.comp.assign/and.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { int a1[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, @@ -73,4 +73,6 @@ int main() assert(v1[38] == 38); assert(v1[39] == 39); assert(v1[40] == 40); + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.gslice.array/gslice.array.comp.assign/divide.pass.cpp b/libcxx/test/std/numerics/numarray/template.gslice.array/gslice.array.comp.assign/divide.pass.cpp index 9631d67b0bb44..ec54bc4bb90db 100644 --- a/libcxx/test/std/numerics/numarray/template.gslice.array/gslice.array.comp.assign/divide.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.gslice.array/gslice.array.comp.assign/divide.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { int a1[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, @@ -73,4 +73,6 @@ int main() assert(v1[38] == 38); assert(v1[39] == 39); assert(v1[40] == 40); + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.gslice.array/gslice.array.comp.assign/modulo.pass.cpp b/libcxx/test/std/numerics/numarray/template.gslice.array/gslice.array.comp.assign/modulo.pass.cpp index d74ceaf96d366..63ad3a7778ebb 100644 --- a/libcxx/test/std/numerics/numarray/template.gslice.array/gslice.array.comp.assign/modulo.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.gslice.array/gslice.array.comp.assign/modulo.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { int a1[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, @@ -73,4 +73,6 @@ int main() assert(v1[38] == 38); assert(v1[39] == 39); assert(v1[40] == 40); + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.gslice.array/gslice.array.comp.assign/multiply.pass.cpp b/libcxx/test/std/numerics/numarray/template.gslice.array/gslice.array.comp.assign/multiply.pass.cpp index 9ed9fcd957033..b22fd3015d9f1 100644 --- a/libcxx/test/std/numerics/numarray/template.gslice.array/gslice.array.comp.assign/multiply.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.gslice.array/gslice.array.comp.assign/multiply.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { int a1[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, @@ -73,4 +73,6 @@ int main() assert(v1[38] == 38); assert(v1[39] == 39); assert(v1[40] == 40); + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.gslice.array/gslice.array.comp.assign/or.pass.cpp b/libcxx/test/std/numerics/numarray/template.gslice.array/gslice.array.comp.assign/or.pass.cpp index f6c1007e880de..0b068935f91d5 100644 --- a/libcxx/test/std/numerics/numarray/template.gslice.array/gslice.array.comp.assign/or.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.gslice.array/gslice.array.comp.assign/or.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { int a1[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, @@ -73,4 +73,6 @@ int main() assert(v1[38] == 38); assert(v1[39] == 39); assert(v1[40] == 40); + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.gslice.array/gslice.array.comp.assign/shift_left.pass.cpp b/libcxx/test/std/numerics/numarray/template.gslice.array/gslice.array.comp.assign/shift_left.pass.cpp index 92987929e0874..912e48acab336 100644 --- a/libcxx/test/std/numerics/numarray/template.gslice.array/gslice.array.comp.assign/shift_left.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.gslice.array/gslice.array.comp.assign/shift_left.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { int a1[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, @@ -73,4 +73,6 @@ int main() assert(v1[38] == 38); assert(v1[39] == 39); assert(v1[40] == 40); + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.gslice.array/gslice.array.comp.assign/shift_right.pass.cpp b/libcxx/test/std/numerics/numarray/template.gslice.array/gslice.array.comp.assign/shift_right.pass.cpp index e617158498e1a..2c8598f7b1dbd 100644 --- a/libcxx/test/std/numerics/numarray/template.gslice.array/gslice.array.comp.assign/shift_right.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.gslice.array/gslice.array.comp.assign/shift_right.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { int a1[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, @@ -73,4 +73,6 @@ int main() assert(v1[38] == 38); assert(v1[39] == 39); assert(v1[40] == 40); + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.gslice.array/gslice.array.comp.assign/subtraction.pass.cpp b/libcxx/test/std/numerics/numarray/template.gslice.array/gslice.array.comp.assign/subtraction.pass.cpp index 6b5075e05f722..8b1271b04c737 100644 --- a/libcxx/test/std/numerics/numarray/template.gslice.array/gslice.array.comp.assign/subtraction.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.gslice.array/gslice.array.comp.assign/subtraction.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { int a1[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, @@ -73,4 +73,6 @@ int main() assert(v1[38] == 38); assert(v1[39] == 39); assert(v1[40] == 40); + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.gslice.array/gslice.array.comp.assign/xor.pass.cpp b/libcxx/test/std/numerics/numarray/template.gslice.array/gslice.array.comp.assign/xor.pass.cpp index 285e44cde693f..9a981ece8296f 100644 --- a/libcxx/test/std/numerics/numarray/template.gslice.array/gslice.array.comp.assign/xor.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.gslice.array/gslice.array.comp.assign/xor.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { int a1[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, @@ -73,4 +73,6 @@ int main() assert(v1[38] == 38); assert(v1[39] == 39); assert(v1[40] == 40); + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.gslice.array/gslice.array.fill/assign_value.pass.cpp b/libcxx/test/std/numerics/numarray/template.gslice.array/gslice.array.fill/assign_value.pass.cpp index d3e987078980d..c7c0925809359 100644 --- a/libcxx/test/std/numerics/numarray/template.gslice.array/gslice.array.fill/assign_value.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.gslice.array/gslice.array.fill/assign_value.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { int a1[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, @@ -70,4 +70,6 @@ int main() assert(v1[38] == 38); assert(v1[39] == 39); assert(v1[40] == 40); + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.gslice.array/types.pass.cpp b/libcxx/test/std/numerics/numarray/template.gslice.array/types.pass.cpp index 4fcc771775768..9263c0e051f12 100644 --- a/libcxx/test/std/numerics/numarray/template.gslice.array/types.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.gslice.array/types.pass.cpp @@ -17,7 +17,9 @@ #include #include -int main() +int main(int, char**) { static_assert((std::is_same::value_type, int>::value), ""); + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.indirect.array/default.fail.cpp b/libcxx/test/std/numerics/numarray/template.indirect.array/default.fail.cpp index 203a9172686a5..988cdad9048d4 100644 --- a/libcxx/test/std/numerics/numarray/template.indirect.array/default.fail.cpp +++ b/libcxx/test/std/numerics/numarray/template.indirect.array/default.fail.cpp @@ -15,7 +15,9 @@ #include #include -int main() +int main(int, char**) { std::indirect_array ia; + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.indirect.array/indirect.array.assign/indirect_array.pass.cpp b/libcxx/test/std/numerics/numarray/template.indirect.array/indirect.array.assign/indirect_array.pass.cpp index 5b27d5e0a3461..c19152bb9bd2b 100644 --- a/libcxx/test/std/numerics/numarray/template.indirect.array/indirect.array.assign/indirect_array.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.indirect.array/indirect.array.assign/indirect_array.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { int a1[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, @@ -76,4 +76,6 @@ int main() assert(v1[38] == 38); assert(v1[39] == 39); assert(v1[40] == 40); + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.indirect.array/indirect.array.assign/valarray.pass.cpp b/libcxx/test/std/numerics/numarray/template.indirect.array/indirect.array.assign/valarray.pass.cpp index f3f0a49a4f1bf..0bc4b58179ab2 100644 --- a/libcxx/test/std/numerics/numarray/template.indirect.array/indirect.array.assign/valarray.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.indirect.array/indirect.array.assign/valarray.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { int a1[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, @@ -73,4 +73,6 @@ int main() assert(v1[38] == 38); assert(v1[39] == 39); assert(v1[40] == 40); + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.indirect.array/indirect.array.comp.assign/addition.pass.cpp b/libcxx/test/std/numerics/numarray/template.indirect.array/indirect.array.comp.assign/addition.pass.cpp index 297b9ed85a91b..3ed95f9cb1e21 100644 --- a/libcxx/test/std/numerics/numarray/template.indirect.array/indirect.array.comp.assign/addition.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.indirect.array/indirect.array.comp.assign/addition.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { int a1[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, @@ -73,4 +73,6 @@ int main() assert(v1[38] == 38); assert(v1[39] == 39); assert(v1[40] == 40); + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.indirect.array/indirect.array.comp.assign/and.pass.cpp b/libcxx/test/std/numerics/numarray/template.indirect.array/indirect.array.comp.assign/and.pass.cpp index 1dcb9c0b1df6f..00fd2f18da72a 100644 --- a/libcxx/test/std/numerics/numarray/template.indirect.array/indirect.array.comp.assign/and.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.indirect.array/indirect.array.comp.assign/and.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { int a1[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, @@ -73,4 +73,6 @@ int main() assert(v1[38] == 38); assert(v1[39] == 39); assert(v1[40] == 40); + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.indirect.array/indirect.array.comp.assign/divide.pass.cpp b/libcxx/test/std/numerics/numarray/template.indirect.array/indirect.array.comp.assign/divide.pass.cpp index 1112bca9f56bc..1a9ca265ad9f2 100644 --- a/libcxx/test/std/numerics/numarray/template.indirect.array/indirect.array.comp.assign/divide.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.indirect.array/indirect.array.comp.assign/divide.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { int a1[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, @@ -73,4 +73,6 @@ int main() assert(v1[38] == 38); assert(v1[39] == 39); assert(v1[40] == 40); + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.indirect.array/indirect.array.comp.assign/modulo.pass.cpp b/libcxx/test/std/numerics/numarray/template.indirect.array/indirect.array.comp.assign/modulo.pass.cpp index 061735a261481..bad0b950e35bf 100644 --- a/libcxx/test/std/numerics/numarray/template.indirect.array/indirect.array.comp.assign/modulo.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.indirect.array/indirect.array.comp.assign/modulo.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { int a1[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, @@ -73,4 +73,6 @@ int main() assert(v1[38] == 38); assert(v1[39] == 39); assert(v1[40] == 40); + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.indirect.array/indirect.array.comp.assign/multiply.pass.cpp b/libcxx/test/std/numerics/numarray/template.indirect.array/indirect.array.comp.assign/multiply.pass.cpp index d64ff33f1d789..7e78f0a8f39f9 100644 --- a/libcxx/test/std/numerics/numarray/template.indirect.array/indirect.array.comp.assign/multiply.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.indirect.array/indirect.array.comp.assign/multiply.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { int a1[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, @@ -73,4 +73,6 @@ int main() assert(v1[38] == 38); assert(v1[39] == 39); assert(v1[40] == 40); + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.indirect.array/indirect.array.comp.assign/or.pass.cpp b/libcxx/test/std/numerics/numarray/template.indirect.array/indirect.array.comp.assign/or.pass.cpp index 11240333ca850..ba32accc64a42 100644 --- a/libcxx/test/std/numerics/numarray/template.indirect.array/indirect.array.comp.assign/or.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.indirect.array/indirect.array.comp.assign/or.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { int a1[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, @@ -73,4 +73,6 @@ int main() assert(v1[38] == 38); assert(v1[39] == 39); assert(v1[40] == 40); + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.indirect.array/indirect.array.comp.assign/shift_left.pass.cpp b/libcxx/test/std/numerics/numarray/template.indirect.array/indirect.array.comp.assign/shift_left.pass.cpp index 160bb8059504c..deff80cc3a427 100644 --- a/libcxx/test/std/numerics/numarray/template.indirect.array/indirect.array.comp.assign/shift_left.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.indirect.array/indirect.array.comp.assign/shift_left.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { int a1[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, @@ -73,4 +73,6 @@ int main() assert(v1[38] == 38); assert(v1[39] == 39); assert(v1[40] == 40); + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.indirect.array/indirect.array.comp.assign/shift_right.pass.cpp b/libcxx/test/std/numerics/numarray/template.indirect.array/indirect.array.comp.assign/shift_right.pass.cpp index fbebc1a2514be..d2ac739541f9a 100644 --- a/libcxx/test/std/numerics/numarray/template.indirect.array/indirect.array.comp.assign/shift_right.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.indirect.array/indirect.array.comp.assign/shift_right.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { int a1[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, @@ -73,4 +73,6 @@ int main() assert(v1[38] == 38); assert(v1[39] == 39); assert(v1[40] == 40); + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.indirect.array/indirect.array.comp.assign/subtraction.pass.cpp b/libcxx/test/std/numerics/numarray/template.indirect.array/indirect.array.comp.assign/subtraction.pass.cpp index 1d4a5bf141e47..d94422c09276a 100644 --- a/libcxx/test/std/numerics/numarray/template.indirect.array/indirect.array.comp.assign/subtraction.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.indirect.array/indirect.array.comp.assign/subtraction.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { int a1[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, @@ -73,4 +73,6 @@ int main() assert(v1[38] == 38); assert(v1[39] == 39); assert(v1[40] == 40); + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.indirect.array/indirect.array.comp.assign/xor.pass.cpp b/libcxx/test/std/numerics/numarray/template.indirect.array/indirect.array.comp.assign/xor.pass.cpp index 0a643445453d5..06e06682740ff 100644 --- a/libcxx/test/std/numerics/numarray/template.indirect.array/indirect.array.comp.assign/xor.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.indirect.array/indirect.array.comp.assign/xor.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { int a1[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, @@ -73,4 +73,6 @@ int main() assert(v1[38] == 38); assert(v1[39] == 39); assert(v1[40] == 40); + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.indirect.array/indirect.array.fill/assign_value.pass.cpp b/libcxx/test/std/numerics/numarray/template.indirect.array/indirect.array.fill/assign_value.pass.cpp index d49f2a0f6ac0f..e327d2630e84d 100644 --- a/libcxx/test/std/numerics/numarray/template.indirect.array/indirect.array.fill/assign_value.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.indirect.array/indirect.array.fill/assign_value.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { int a1[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, @@ -70,4 +70,6 @@ int main() assert(v1[38] == 38); assert(v1[39] == 39); assert(v1[40] == 40); + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.indirect.array/types.pass.cpp b/libcxx/test/std/numerics/numarray/template.indirect.array/types.pass.cpp index 6cc9988aa91ed..5d06c5baf677e 100644 --- a/libcxx/test/std/numerics/numarray/template.indirect.array/types.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.indirect.array/types.pass.cpp @@ -17,7 +17,9 @@ #include #include -int main() +int main(int, char**) { static_assert((std::is_same::value_type, int>::value), ""); + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.mask.array/default.fail.cpp b/libcxx/test/std/numerics/numarray/template.mask.array/default.fail.cpp index 5bec2dcad6158..f22298bf9079d 100644 --- a/libcxx/test/std/numerics/numarray/template.mask.array/default.fail.cpp +++ b/libcxx/test/std/numerics/numarray/template.mask.array/default.fail.cpp @@ -15,7 +15,9 @@ #include #include -int main() +int main(int, char**) { std::mask_array s; + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.mask.array/mask.array.assign/mask_array.pass.cpp b/libcxx/test/std/numerics/numarray/template.mask.array/mask.array.assign/mask_array.pass.cpp index d160405562977..22ce22ad62c01 100644 --- a/libcxx/test/std/numerics/numarray/template.mask.array/mask.array.assign/mask_array.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.mask.array/mask.array.assign/mask_array.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { { int a1[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}; @@ -62,4 +62,6 @@ int main() std::mask_array const & r = (m1 = m2); assert(&r == &m1); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.mask.array/mask.array.assign/valarray.pass.cpp b/libcxx/test/std/numerics/numarray/template.mask.array/mask.array.assign/valarray.pass.cpp index e7e0d3740a74a..e364c442ff7a3 100644 --- a/libcxx/test/std/numerics/numarray/template.mask.array/mask.array.assign/valarray.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.mask.array/mask.array.assign/valarray.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { int a1[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}; const std::size_t N1 = sizeof(a1)/sizeof(a1[0]); @@ -45,4 +45,6 @@ int main() assert(v1[13] == 13); assert(v1[14] == 14); assert(v1[15] == 15); + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.mask.array/mask.array.comp.assign/addition.pass.cpp b/libcxx/test/std/numerics/numarray/template.mask.array/mask.array.comp.assign/addition.pass.cpp index 084a0d11b8c09..e8f0958b53c12 100644 --- a/libcxx/test/std/numerics/numarray/template.mask.array/mask.array.comp.assign/addition.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.mask.array/mask.array.comp.assign/addition.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { int a1[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}; const std::size_t N1 = sizeof(a1)/sizeof(a1[0]); @@ -45,4 +45,6 @@ int main() assert(v1[13] == 13); assert(v1[14] == 14); assert(v1[15] == 15); + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.mask.array/mask.array.comp.assign/and.pass.cpp b/libcxx/test/std/numerics/numarray/template.mask.array/mask.array.comp.assign/and.pass.cpp index e797343b619e7..ab2937986c2cc 100644 --- a/libcxx/test/std/numerics/numarray/template.mask.array/mask.array.comp.assign/and.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.mask.array/mask.array.comp.assign/and.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { int a1[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}; const std::size_t N1 = sizeof(a1)/sizeof(a1[0]); @@ -45,4 +45,6 @@ int main() assert(v1[13] == 13); assert(v1[14] == 14); assert(v1[15] == 15); + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.mask.array/mask.array.comp.assign/divide.pass.cpp b/libcxx/test/std/numerics/numarray/template.mask.array/mask.array.comp.assign/divide.pass.cpp index dc7bbb2f13841..cd67632efd052 100644 --- a/libcxx/test/std/numerics/numarray/template.mask.array/mask.array.comp.assign/divide.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.mask.array/mask.array.comp.assign/divide.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { int a1[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}; const std::size_t N1 = sizeof(a1)/sizeof(a1[0]); @@ -45,4 +45,6 @@ int main() assert(v1[13] == 13); assert(v1[14] == 14); assert(v1[15] == 15); + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.mask.array/mask.array.comp.assign/modulo.pass.cpp b/libcxx/test/std/numerics/numarray/template.mask.array/mask.array.comp.assign/modulo.pass.cpp index 302cdcc3e593f..7cf8b585d0347 100644 --- a/libcxx/test/std/numerics/numarray/template.mask.array/mask.array.comp.assign/modulo.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.mask.array/mask.array.comp.assign/modulo.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { int a1[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}; const std::size_t N1 = sizeof(a1)/sizeof(a1[0]); @@ -45,4 +45,6 @@ int main() assert(v1[13] == 13); assert(v1[14] == 14); assert(v1[15] == 15); + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.mask.array/mask.array.comp.assign/multiply.pass.cpp b/libcxx/test/std/numerics/numarray/template.mask.array/mask.array.comp.assign/multiply.pass.cpp index cfe282203ca98..537bf40d8d688 100644 --- a/libcxx/test/std/numerics/numarray/template.mask.array/mask.array.comp.assign/multiply.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.mask.array/mask.array.comp.assign/multiply.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { int a1[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}; const std::size_t N1 = sizeof(a1)/sizeof(a1[0]); @@ -45,4 +45,6 @@ int main() assert(v1[13] == 13); assert(v1[14] == 14); assert(v1[15] == 15); + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.mask.array/mask.array.comp.assign/or.pass.cpp b/libcxx/test/std/numerics/numarray/template.mask.array/mask.array.comp.assign/or.pass.cpp index 2fdfe0de2905a..d0297b831e899 100644 --- a/libcxx/test/std/numerics/numarray/template.mask.array/mask.array.comp.assign/or.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.mask.array/mask.array.comp.assign/or.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { int a1[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}; const std::size_t N1 = sizeof(a1)/sizeof(a1[0]); @@ -45,4 +45,6 @@ int main() assert(v1[13] == 13); assert(v1[14] == 14); assert(v1[15] == 15); + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.mask.array/mask.array.comp.assign/shift_left.pass.cpp b/libcxx/test/std/numerics/numarray/template.mask.array/mask.array.comp.assign/shift_left.pass.cpp index aaf6f2d43ff71..eee4c1d461c96 100644 --- a/libcxx/test/std/numerics/numarray/template.mask.array/mask.array.comp.assign/shift_left.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.mask.array/mask.array.comp.assign/shift_left.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { int a1[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}; const std::size_t N1 = sizeof(a1)/sizeof(a1[0]); @@ -45,4 +45,6 @@ int main() assert(v1[13] == 13); assert(v1[14] == 14); assert(v1[15] == 15); + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.mask.array/mask.array.comp.assign/shift_right.pass.cpp b/libcxx/test/std/numerics/numarray/template.mask.array/mask.array.comp.assign/shift_right.pass.cpp index 15d745e0208ad..b65c19f99c43e 100644 --- a/libcxx/test/std/numerics/numarray/template.mask.array/mask.array.comp.assign/shift_right.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.mask.array/mask.array.comp.assign/shift_right.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { int a1[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}; const std::size_t N1 = sizeof(a1)/sizeof(a1[0]); @@ -45,4 +45,6 @@ int main() assert(v1[13] == 13); assert(v1[14] == 14); assert(v1[15] == 15); + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.mask.array/mask.array.comp.assign/subtraction.pass.cpp b/libcxx/test/std/numerics/numarray/template.mask.array/mask.array.comp.assign/subtraction.pass.cpp index 7b09a0ec489f4..40fddd123a08d 100644 --- a/libcxx/test/std/numerics/numarray/template.mask.array/mask.array.comp.assign/subtraction.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.mask.array/mask.array.comp.assign/subtraction.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { int a1[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}; const std::size_t N1 = sizeof(a1)/sizeof(a1[0]); @@ -45,4 +45,6 @@ int main() assert(v1[13] == 13); assert(v1[14] == 14); assert(v1[15] == 15); + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.mask.array/mask.array.comp.assign/xor.pass.cpp b/libcxx/test/std/numerics/numarray/template.mask.array/mask.array.comp.assign/xor.pass.cpp index 5487ea024012a..a04b6da270557 100644 --- a/libcxx/test/std/numerics/numarray/template.mask.array/mask.array.comp.assign/xor.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.mask.array/mask.array.comp.assign/xor.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { int a1[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}; const std::size_t N1 = sizeof(a1)/sizeof(a1[0]); @@ -45,4 +45,6 @@ int main() assert(v1[13] == 13); assert(v1[14] == 14); assert(v1[15] == 15); + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.mask.array/mask.array.fill/assign_value.pass.cpp b/libcxx/test/std/numerics/numarray/template.mask.array/mask.array.fill/assign_value.pass.cpp index 63558d8d53550..bb4fd85912b41 100644 --- a/libcxx/test/std/numerics/numarray/template.mask.array/mask.array.fill/assign_value.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.mask.array/mask.array.fill/assign_value.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { int a1[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}; const std::size_t N1 = sizeof(a1)/sizeof(a1[0]); @@ -41,4 +41,6 @@ int main() assert(v1[13] == 13); assert(v1[14] == 14); assert(v1[15] == 15); + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.mask.array/types.pass.cpp b/libcxx/test/std/numerics/numarray/template.mask.array/types.pass.cpp index 6848c655b5663..1d4acea6f11bf 100644 --- a/libcxx/test/std/numerics/numarray/template.mask.array/types.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.mask.array/types.pass.cpp @@ -17,7 +17,9 @@ #include #include -int main() +int main(int, char**) { static_assert((std::is_same::value_type, int>::value), ""); + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.slice.array/default.fail.cpp b/libcxx/test/std/numerics/numarray/template.slice.array/default.fail.cpp index 59f5fdf0ec56f..90b1845ba5f30 100644 --- a/libcxx/test/std/numerics/numarray/template.slice.array/default.fail.cpp +++ b/libcxx/test/std/numerics/numarray/template.slice.array/default.fail.cpp @@ -15,7 +15,9 @@ #include #include -int main() +int main(int, char**) { std::slice_array s; + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.slice.array/slice.arr.assign/slice_array.pass.cpp b/libcxx/test/std/numerics/numarray/template.slice.array/slice.arr.assign/slice_array.pass.cpp index 40dc0be7101a7..9683c7dfbd2c1 100644 --- a/libcxx/test/std/numerics/numarray/template.slice.array/slice.arr.assign/slice_array.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.slice.array/slice.arr.assign/slice_array.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { { int a1[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}; @@ -50,4 +50,6 @@ int main() std::slice_array const & s3 = (s1 = s2); assert(&s1 == &s3); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.slice.array/slice.arr.assign/valarray.pass.cpp b/libcxx/test/std/numerics/numarray/template.slice.array/slice.arr.assign/valarray.pass.cpp index 7ea08cfaea9b0..88a5b44ab24f0 100644 --- a/libcxx/test/std/numerics/numarray/template.slice.array/slice.arr.assign/valarray.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.slice.array/slice.arr.assign/valarray.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { int a1[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}; int a2[] = {-1, -2, -3, -4, -5}; @@ -39,4 +39,6 @@ int main() assert(v1[13] == -5); assert(v1[14] == 14); assert(v1[15] == 15); + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.slice.array/slice.arr.comp.assign/addition.pass.cpp b/libcxx/test/std/numerics/numarray/template.slice.array/slice.arr.comp.assign/addition.pass.cpp index 5934c2015c4b3..0433877e749ad 100644 --- a/libcxx/test/std/numerics/numarray/template.slice.array/slice.arr.comp.assign/addition.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.slice.array/slice.arr.comp.assign/addition.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { int a1[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}; int a2[] = {-1, -2, -3, -4, -5}; @@ -39,4 +39,6 @@ int main() assert(v1[13] == 8); assert(v1[14] == 14); assert(v1[15] == 15); + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.slice.array/slice.arr.comp.assign/and.pass.cpp b/libcxx/test/std/numerics/numarray/template.slice.array/slice.arr.comp.assign/and.pass.cpp index 3af46538bad29..90bbe4ef33379 100644 --- a/libcxx/test/std/numerics/numarray/template.slice.array/slice.arr.comp.assign/and.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.slice.array/slice.arr.comp.assign/and.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { int a1[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}; int a2[] = {1, 2, 3, 4, 5}; @@ -39,4 +39,6 @@ int main() assert(v1[13] == 5); assert(v1[14] == 14); assert(v1[15] == 15); + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.slice.array/slice.arr.comp.assign/divide.pass.cpp b/libcxx/test/std/numerics/numarray/template.slice.array/slice.arr.comp.assign/divide.pass.cpp index 508ebbbd8cab5..ae1383b84bdea 100644 --- a/libcxx/test/std/numerics/numarray/template.slice.array/slice.arr.comp.assign/divide.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.slice.array/slice.arr.comp.assign/divide.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { int a1[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}; int a2[] = {-1, -2, -3, -4, -5}; @@ -39,4 +39,6 @@ int main() assert(v1[13] == -2); assert(v1[14] == 14); assert(v1[15] == 15); + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.slice.array/slice.arr.comp.assign/modulo.pass.cpp b/libcxx/test/std/numerics/numarray/template.slice.array/slice.arr.comp.assign/modulo.pass.cpp index 7b3919e49f087..89c1acfb3817b 100644 --- a/libcxx/test/std/numerics/numarray/template.slice.array/slice.arr.comp.assign/modulo.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.slice.array/slice.arr.comp.assign/modulo.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { int a1[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}; int a2[] = {-1, -2, -3, -4, -5}; @@ -39,4 +39,6 @@ int main() assert(v1[13] == 3); assert(v1[14] == 14); assert(v1[15] == 15); + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.slice.array/slice.arr.comp.assign/multiply.pass.cpp b/libcxx/test/std/numerics/numarray/template.slice.array/slice.arr.comp.assign/multiply.pass.cpp index ffcd854241950..b7c6b13530a18 100644 --- a/libcxx/test/std/numerics/numarray/template.slice.array/slice.arr.comp.assign/multiply.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.slice.array/slice.arr.comp.assign/multiply.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { int a1[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}; int a2[] = {-1, -2, -3, -4, -5}; @@ -39,4 +39,6 @@ int main() assert(v1[13] == -65); assert(v1[14] == 14); assert(v1[15] == 15); + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.slice.array/slice.arr.comp.assign/or.pass.cpp b/libcxx/test/std/numerics/numarray/template.slice.array/slice.arr.comp.assign/or.pass.cpp index b405442344726..0f37579e86d5a 100644 --- a/libcxx/test/std/numerics/numarray/template.slice.array/slice.arr.comp.assign/or.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.slice.array/slice.arr.comp.assign/or.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { int a1[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}; int a2[] = {1, 2, 3, 4, 5}; @@ -39,4 +39,6 @@ int main() assert(v1[13] == 13); assert(v1[14] == 14); assert(v1[15] == 15); + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.slice.array/slice.arr.comp.assign/shift_left.pass.cpp b/libcxx/test/std/numerics/numarray/template.slice.array/slice.arr.comp.assign/shift_left.pass.cpp index fcf51bb185705..547a8cd279a50 100644 --- a/libcxx/test/std/numerics/numarray/template.slice.array/slice.arr.comp.assign/shift_left.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.slice.array/slice.arr.comp.assign/shift_left.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { int a1[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}; int a2[] = {1, 2, 3, 4, 5}; @@ -39,4 +39,6 @@ int main() assert(v1[13] == 416); assert(v1[14] == 14); assert(v1[15] == 15); + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.slice.array/slice.arr.comp.assign/shift_right.pass.cpp b/libcxx/test/std/numerics/numarray/template.slice.array/slice.arr.comp.assign/shift_right.pass.cpp index 4c79b559b02a6..99c4ef94311bd 100644 --- a/libcxx/test/std/numerics/numarray/template.slice.array/slice.arr.comp.assign/shift_right.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.slice.array/slice.arr.comp.assign/shift_right.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { int a1[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}; int a2[] = {1, 2, 3, 4, 5}; @@ -39,4 +39,6 @@ int main() assert(v1[13] == 0); assert(v1[14] == 14); assert(v1[15] == 15); + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.slice.array/slice.arr.comp.assign/subtraction.pass.cpp b/libcxx/test/std/numerics/numarray/template.slice.array/slice.arr.comp.assign/subtraction.pass.cpp index aae003cf31832..db513bc9629f1 100644 --- a/libcxx/test/std/numerics/numarray/template.slice.array/slice.arr.comp.assign/subtraction.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.slice.array/slice.arr.comp.assign/subtraction.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { int a1[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}; int a2[] = {-1, -2, -3, -4, -5}; @@ -39,4 +39,6 @@ int main() assert(v1[13] == 18); assert(v1[14] == 14); assert(v1[15] == 15); + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.slice.array/slice.arr.comp.assign/xor.pass.cpp b/libcxx/test/std/numerics/numarray/template.slice.array/slice.arr.comp.assign/xor.pass.cpp index afebc882049b8..4ecba47238e20 100644 --- a/libcxx/test/std/numerics/numarray/template.slice.array/slice.arr.comp.assign/xor.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.slice.array/slice.arr.comp.assign/xor.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { int a1[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}; int a2[] = {1, 2, 3, 4, 5}; @@ -39,4 +39,6 @@ int main() assert(v1[13] == 8); assert(v1[14] == 14); assert(v1[15] == 15); + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.slice.array/slice.arr.fill/assign_value.pass.cpp b/libcxx/test/std/numerics/numarray/template.slice.array/slice.arr.fill/assign_value.pass.cpp index ed1b219a654ee..ab2156b462728 100644 --- a/libcxx/test/std/numerics/numarray/template.slice.array/slice.arr.fill/assign_value.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.slice.array/slice.arr.fill/assign_value.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { int a1[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}; std::valarray v1(a1, sizeof(a1)/sizeof(a1[0])); @@ -37,4 +37,6 @@ int main() assert(v1[13] == 20); assert(v1[14] == 14); assert(v1[15] == 15); + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.slice.array/types.pass.cpp b/libcxx/test/std/numerics/numarray/template.slice.array/types.pass.cpp index 0d1989a48474d..fccde7edb6bb0 100644 --- a/libcxx/test/std/numerics/numarray/template.slice.array/types.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.slice.array/types.pass.cpp @@ -17,7 +17,9 @@ #include #include -int main() +int main(int, char**) { static_assert((std::is_same::value_type, int>::value), ""); + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.valarray/types.pass.cpp b/libcxx/test/std/numerics/numarray/template.valarray/types.pass.cpp index 301192ef8c93d..f37ba0f77171a 100644 --- a/libcxx/test/std/numerics/numarray/template.valarray/types.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.valarray/types.pass.cpp @@ -18,8 +18,10 @@ #include #include -int main() +int main(int, char**) { static_assert((std::is_same::value_type, int>::value), ""); static_assert((std::is_same::value_type, double>::value), ""); + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.valarray/valarray.access/access.pass.cpp b/libcxx/test/std/numerics/numarray/template.valarray/valarray.access/access.pass.cpp index dc90dbef9bf33..d92154130b88d 100644 --- a/libcxx/test/std/numerics/numarray/template.valarray/valarray.access/access.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.valarray/valarray.access/access.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { { typedef int T; @@ -29,4 +29,6 @@ int main() assert(v[i] == static_cast(i)); } } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.valarray/valarray.access/const_access.pass.cpp b/libcxx/test/std/numerics/numarray/template.valarray/valarray.access/const_access.pass.cpp index a4c81440ed2a0..a0174ccb3ff63 100644 --- a/libcxx/test/std/numerics/numarray/template.valarray/valarray.access/const_access.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.valarray/valarray.access/const_access.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { { typedef int T; @@ -27,4 +27,6 @@ int main() assert(v[i] == a[i]); } } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.valarray/valarray.assign/copy_assign.pass.cpp b/libcxx/test/std/numerics/numarray/template.valarray/valarray.assign/copy_assign.pass.cpp index 24f6cc54bb787..777d922a43738 100644 --- a/libcxx/test/std/numerics/numarray/template.valarray/valarray.assign/copy_assign.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.valarray/valarray.assign/copy_assign.pass.cpp @@ -31,7 +31,7 @@ bool operator==(const S& lhs, const S& rhs) return lhs.x_ == rhs.x_; } -int main() +int main(int, char**) { { typedef int T; @@ -82,4 +82,6 @@ int main() assert(v2[i] == v[i]); assert(!S::default_ctor_called); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.valarray/valarray.assign/gslice_array_assign.pass.cpp b/libcxx/test/std/numerics/numarray/template.valarray/valarray.assign/gslice_array_assign.pass.cpp index 625cf17a8678f..df5ae916225b9 100644 --- a/libcxx/test/std/numerics/numarray/template.valarray/valarray.assign/gslice_array_assign.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.valarray/valarray.assign/gslice_array_assign.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { int a[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, @@ -54,4 +54,6 @@ int main() assert(v[21] == 34); assert(v[22] == 35); assert(v[23] == 36); + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.valarray/valarray.assign/indirect_array_assign.pass.cpp b/libcxx/test/std/numerics/numarray/template.valarray/valarray.assign/indirect_array_assign.pass.cpp index 3c351d0b3f97d..f8b5243b91905 100644 --- a/libcxx/test/std/numerics/numarray/template.valarray/valarray.assign/indirect_array_assign.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.valarray/valarray.assign/indirect_array_assign.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { int a[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, @@ -54,4 +54,6 @@ int main() assert(v[21] == 34); assert(v[22] == 35); assert(v[23] == 36); + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.valarray/valarray.assign/initializer_list_assign.pass.cpp b/libcxx/test/std/numerics/numarray/template.valarray/valarray.assign/initializer_list_assign.pass.cpp index 4f9b60db6426a..1f9e5a51f6ecd 100644 --- a/libcxx/test/std/numerics/numarray/template.valarray/valarray.assign/initializer_list_assign.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.valarray/valarray.assign/initializer_list_assign.pass.cpp @@ -33,7 +33,7 @@ bool operator==(const S& lhs, const S& rhs) return lhs.x_ == rhs.x_; } -int main() +int main(int, char**) { { typedef int T; @@ -80,4 +80,6 @@ int main() assert(v2[i] == a[i]); assert(!S::default_ctor_called); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.valarray/valarray.assign/mask_array_assign.pass.cpp b/libcxx/test/std/numerics/numarray/template.valarray/valarray.assign/mask_array_assign.pass.cpp index 592e306e70cfd..aeb95a10b74d2 100644 --- a/libcxx/test/std/numerics/numarray/template.valarray/valarray.assign/mask_array_assign.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.valarray/valarray.assign/mask_array_assign.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { int a1[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}; const std::size_t N1 = sizeof(a1)/sizeof(a1[0]); @@ -31,4 +31,6 @@ int main() assert(v2[ 2] == 4); assert(v2[ 3] == 7); assert(v2[ 4] == 11); + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.valarray/valarray.assign/move_assign.pass.cpp b/libcxx/test/std/numerics/numarray/template.valarray/valarray.assign/move_assign.pass.cpp index 263c093b91128..522c0a2a33e42 100644 --- a/libcxx/test/std/numerics/numarray/template.valarray/valarray.assign/move_assign.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.valarray/valarray.assign/move_assign.pass.cpp @@ -18,7 +18,7 @@ #include #include -int main() +int main(int, char**) { { typedef int T; @@ -60,4 +60,6 @@ int main() assert(v2[i][j] == a[i][j]); } } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.valarray/valarray.assign/slice_array_assign.pass.cpp b/libcxx/test/std/numerics/numarray/template.valarray/valarray.assign/slice_array_assign.pass.cpp index 5ccfa2e08d590..68b0e37d410a7 100644 --- a/libcxx/test/std/numerics/numarray/template.valarray/valarray.assign/slice_array_assign.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.valarray/valarray.assign/slice_array_assign.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { int a[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}; std::valarray v1(a, sizeof(a)/sizeof(a[0])); @@ -27,4 +27,6 @@ int main() assert(v[2] == 7); assert(v[3] == 10); assert(v[4] == 13); + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.valarray/valarray.assign/value_assign.pass.cpp b/libcxx/test/std/numerics/numarray/template.valarray/valarray.assign/value_assign.pass.cpp index c722f8b1e240b..3adb1465cf565 100644 --- a/libcxx/test/std/numerics/numarray/template.valarray/valarray.assign/value_assign.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.valarray/valarray.assign/value_assign.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef int T; @@ -28,4 +28,6 @@ int main() for (std::size_t i = 0; i < v.size(); ++i) assert(v[i] == 7); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/and_valarray.pass.cpp b/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/and_valarray.pass.cpp index d6f7c57d53dec..60b30715312c7 100644 --- a/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/and_valarray.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/and_valarray.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef int T; @@ -33,4 +33,6 @@ int main() for (std::size_t i = 0; i < v1.size(); ++i) assert(v1[i] == v3[i]); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/and_value.pass.cpp b/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/and_value.pass.cpp index 6c37d2bc1bb15..2873721504115 100644 --- a/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/and_value.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/and_value.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef int T; @@ -30,4 +30,6 @@ int main() for (std::size_t i = 0; i < v1.size(); ++i) assert(v1[i] == v2[i]); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/divide_valarray.pass.cpp b/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/divide_valarray.pass.cpp index a5cccdc8695cd..fdb9975d5d3fe 100644 --- a/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/divide_valarray.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/divide_valarray.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef int T; @@ -33,4 +33,6 @@ int main() for (std::size_t i = 0; i < v1.size(); ++i) assert(v1[i] == v3[i]); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/divide_value.pass.cpp b/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/divide_value.pass.cpp index bff87ab95662b..a309767ffba38 100644 --- a/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/divide_value.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/divide_value.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef int T; @@ -30,4 +30,6 @@ int main() for (std::size_t i = 0; i < v1.size(); ++i) assert(v1[i] == v2[i]); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/minus_valarray.pass.cpp b/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/minus_valarray.pass.cpp index e574de21f037e..a8ef9152b00f7 100644 --- a/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/minus_valarray.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/minus_valarray.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef int T; @@ -33,4 +33,6 @@ int main() for (std::size_t i = 0; i < v1.size(); ++i) assert(v1[i] == v3[i]); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/minus_value.pass.cpp b/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/minus_value.pass.cpp index 0dee79df70f97..263ac820a7201 100644 --- a/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/minus_value.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/minus_value.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef int T; @@ -30,4 +30,6 @@ int main() for (std::size_t i = 0; i < v1.size(); ++i) assert(v1[i] == v2[i]); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/modulo_valarray.pass.cpp b/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/modulo_valarray.pass.cpp index 5dc7ca5cea4b1..79cfeb0c41597 100644 --- a/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/modulo_valarray.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/modulo_valarray.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef int T; @@ -33,4 +33,6 @@ int main() for (std::size_t i = 0; i < v1.size(); ++i) assert(v2[i] == v3[i]); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/modulo_value.pass.cpp b/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/modulo_value.pass.cpp index 0e306cefc222b..b0ea0a2986bdc 100644 --- a/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/modulo_value.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/modulo_value.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef int T; @@ -30,4 +30,6 @@ int main() for (std::size_t i = 0; i < v1.size(); ++i) assert(v1[i] == v2[i]); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/or_valarray.pass.cpp b/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/or_valarray.pass.cpp index 97e3b9b994be5..df962a044f27e 100644 --- a/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/or_valarray.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/or_valarray.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef int T; @@ -33,4 +33,6 @@ int main() for (std::size_t i = 0; i < v1.size(); ++i) assert(v1[i] == v3[i]); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/or_value.pass.cpp b/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/or_value.pass.cpp index ba44c578df947..1be8942ab7a50 100644 --- a/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/or_value.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/or_value.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef int T; @@ -30,4 +30,6 @@ int main() for (std::size_t i = 0; i < v1.size(); ++i) assert(v1[i] == v2[i]); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/plus_valarray.pass.cpp b/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/plus_valarray.pass.cpp index 67ed8bc5c0e44..3700e5c4758c8 100644 --- a/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/plus_valarray.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/plus_valarray.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef int T; @@ -33,4 +33,6 @@ int main() for (std::size_t i = 0; i < v1.size(); ++i) assert(v1[i] == v3[i]); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/plus_value.pass.cpp b/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/plus_value.pass.cpp index 730ac7f15d1f5..c8c5d1ef9c640 100644 --- a/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/plus_value.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/plus_value.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef int T; @@ -30,4 +30,6 @@ int main() for (std::size_t i = 0; i < v1.size(); ++i) assert(v1[i] == v2[i]); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/shift_left_valarray.pass.cpp b/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/shift_left_valarray.pass.cpp index 91ea80ed28696..f642ce4316dc2 100644 --- a/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/shift_left_valarray.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/shift_left_valarray.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef int T; @@ -33,4 +33,6 @@ int main() for (std::size_t i = 0; i < v1.size(); ++i) assert(v1[i] == v3[i]); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/shift_left_value.pass.cpp b/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/shift_left_value.pass.cpp index abbb0023cc382..8cba6b4dac5a0 100644 --- a/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/shift_left_value.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/shift_left_value.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef int T; @@ -30,4 +30,6 @@ int main() for (std::size_t i = 0; i < v1.size(); ++i) assert(v1[i] == v2[i]); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/shift_right_valarray.pass.cpp b/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/shift_right_valarray.pass.cpp index f5fc5c7248a45..d50971b394daf 100644 --- a/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/shift_right_valarray.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/shift_right_valarray.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef int T; @@ -33,4 +33,6 @@ int main() for (std::size_t i = 0; i < v1.size(); ++i) assert(v1[i] == v3[i]); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/shift_right_value.pass.cpp b/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/shift_right_value.pass.cpp index 00f5e25602633..670599afd3459 100644 --- a/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/shift_right_value.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/shift_right_value.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef int T; @@ -30,4 +30,6 @@ int main() for (std::size_t i = 0; i < v1.size(); ++i) assert(v1[i] == v2[i]); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/times_valarray.pass.cpp b/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/times_valarray.pass.cpp index 00ac963b71ee7..f7e3da5bf9a46 100644 --- a/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/times_valarray.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/times_valarray.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef int T; @@ -33,4 +33,6 @@ int main() for (std::size_t i = 0; i < v1.size(); ++i) assert(v1[i] == v3[i]); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/times_value.pass.cpp b/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/times_value.pass.cpp index a039f9f8c8b28..9632799683b6f 100644 --- a/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/times_value.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/times_value.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef int T; @@ -30,4 +30,6 @@ int main() for (std::size_t i = 0; i < v1.size(); ++i) assert(v1[i] == v2[i]); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/xor_valarray.pass.cpp b/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/xor_valarray.pass.cpp index f9d8ba3b54666..bf08055117ad8 100644 --- a/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/xor_valarray.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/xor_valarray.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef int T; @@ -33,4 +33,6 @@ int main() for (std::size_t i = 0; i < v1.size(); ++i) assert(v1[i] == v3[i]); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/xor_value.pass.cpp b/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/xor_value.pass.cpp index 02c1398244c68..0a3d3200f90f5 100644 --- a/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/xor_value.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/xor_value.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef int T; @@ -30,4 +30,6 @@ int main() for (std::size_t i = 0; i < v1.size(); ++i) assert(v1[i] == v2[i]); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.valarray/valarray.cons/copy.pass.cpp b/libcxx/test/std/numerics/numarray/template.valarray/valarray.cons/copy.pass.cpp index a97a250474ed8..8a9c6baae3a02 100644 --- a/libcxx/test/std/numerics/numarray/template.valarray/valarray.cons/copy.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.valarray/valarray.cons/copy.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef int T; @@ -52,4 +52,6 @@ int main() assert(v2[i][j] == v[i][j]); } } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.valarray/valarray.cons/default.pass.cpp b/libcxx/test/std/numerics/numarray/template.valarray/valarray.cons/default.pass.cpp index ff4a7a2544415..b560398024445 100644 --- a/libcxx/test/std/numerics/numarray/template.valarray/valarray.cons/default.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.valarray/valarray.cons/default.pass.cpp @@ -22,7 +22,7 @@ struct S { bool S::ctor_called = false; -int main() +int main(int, char**) { { std::valarray v; @@ -45,4 +45,6 @@ int main() assert(v.size() == 0); assert(!S::ctor_called); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.valarray/valarray.cons/gslice_array.pass.cpp b/libcxx/test/std/numerics/numarray/template.valarray/valarray.cons/gslice_array.pass.cpp index 7e061f50a860a..fdab3e3e8e4bb 100644 --- a/libcxx/test/std/numerics/numarray/template.valarray/valarray.cons/gslice_array.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.valarray/valarray.cons/gslice_array.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { int a[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, @@ -53,4 +53,6 @@ int main() assert(v[21] == 34); assert(v[22] == 35); assert(v[23] == 36); + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.valarray/valarray.cons/indirect_array.pass.cpp b/libcxx/test/std/numerics/numarray/template.valarray/valarray.cons/indirect_array.pass.cpp index e525b2a4f6a8c..3a62b0a54793f 100644 --- a/libcxx/test/std/numerics/numarray/template.valarray/valarray.cons/indirect_array.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.valarray/valarray.cons/indirect_array.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { int a[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, @@ -53,4 +53,6 @@ int main() assert(v[21] == 34); assert(v[22] == 35); assert(v[23] == 36); + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.valarray/valarray.cons/initializer_list.pass.cpp b/libcxx/test/std/numerics/numarray/template.valarray/valarray.cons/initializer_list.pass.cpp index bd47c57980b5f..1f5986eda1806 100644 --- a/libcxx/test/std/numerics/numarray/template.valarray/valarray.cons/initializer_list.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.valarray/valarray.cons/initializer_list.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { { typedef int T; @@ -37,4 +37,6 @@ int main() for (unsigned i = 0; i < N; ++i) assert(v[i] == a[i]); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.valarray/valarray.cons/mask_array.pass.cpp b/libcxx/test/std/numerics/numarray/template.valarray/valarray.cons/mask_array.pass.cpp index e9deea94a1724..4559c36e7cac9 100644 --- a/libcxx/test/std/numerics/numarray/template.valarray/valarray.cons/mask_array.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.valarray/valarray.cons/mask_array.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { int a1[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}; const std::size_t N1 = sizeof(a1)/sizeof(a1[0]); @@ -30,4 +30,6 @@ int main() assert(v2[ 2] == 4); assert(v2[ 3] == 7); assert(v2[ 4] == 11); + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.valarray/valarray.cons/move.pass.cpp b/libcxx/test/std/numerics/numarray/template.valarray/valarray.cons/move.pass.cpp index 010649a92b8d3..0ef6f3cee532f 100644 --- a/libcxx/test/std/numerics/numarray/template.valarray/valarray.cons/move.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.valarray/valarray.cons/move.pass.cpp @@ -19,7 +19,7 @@ #include #include -int main() +int main(int, char**) { { typedef int T; @@ -58,4 +58,6 @@ int main() assert(v2[i][j] == a[i][j]); } } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.valarray/valarray.cons/pointer_size.pass.cpp b/libcxx/test/std/numerics/numarray/template.valarray/valarray.cons/pointer_size.pass.cpp index 84d51b035e9c5..a0b4a31aebe2c 100644 --- a/libcxx/test/std/numerics/numarray/template.valarray/valarray.cons/pointer_size.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.valarray/valarray.cons/pointer_size.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef int T; @@ -49,4 +49,6 @@ int main() assert(v[i][j] == a[i][j]); } } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.valarray/valarray.cons/size.pass.cpp b/libcxx/test/std/numerics/numarray/template.valarray/valarray.cons/size.pass.cpp index 7e539d9c21f88..95417e58a63bc 100644 --- a/libcxx/test/std/numerics/numarray/template.valarray/valarray.cons/size.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.valarray/valarray.cons/size.pass.cpp @@ -24,7 +24,7 @@ struct S { size_t S::cnt_dtor = 0; -int main() +int main(int, char**) { { std::valarray v(100); @@ -51,4 +51,6 @@ int main() assert(v[i].x == 1); } assert(S::cnt_dtor == 100); + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.valarray/valarray.cons/slice_array.pass.cpp b/libcxx/test/std/numerics/numarray/template.valarray/valarray.cons/slice_array.pass.cpp index c5667671f3e57..332a617153d64 100644 --- a/libcxx/test/std/numerics/numarray/template.valarray/valarray.cons/slice_array.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.valarray/valarray.cons/slice_array.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { int a[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}; std::valarray v1(a, sizeof(a)/sizeof(a[0])); @@ -26,4 +26,6 @@ int main() assert(v[2] == 7); assert(v[3] == 10); assert(v[4] == 13); + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.valarray/valarray.cons/value_size.pass.cpp b/libcxx/test/std/numerics/numarray/template.valarray/valarray.cons/value_size.pass.cpp index 6e43de782bce2..03e4add4648a0 100644 --- a/libcxx/test/std/numerics/numarray/template.valarray/valarray.cons/value_size.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.valarray/valarray.cons/value_size.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { { std::valarray v(5, 100); @@ -35,4 +35,6 @@ int main() for (int i = 0; i < 100; ++i) assert(v[i].size() == 10); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.valarray/valarray.members/apply_cref.pass.cpp b/libcxx/test/std/numerics/numarray/template.valarray/valarray.members/apply_cref.pass.cpp index 7d4d079231a4e..65277870aa57b 100644 --- a/libcxx/test/std/numerics/numarray/template.valarray/valarray.members/apply_cref.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.valarray/valarray.members/apply_cref.pass.cpp @@ -19,7 +19,7 @@ typedef int T; T f(const T& t) {return t + 5;} -int main() +int main(int, char**) { { T a1[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; @@ -47,4 +47,6 @@ int main() for (unsigned i = 0; i < N1; ++i) assert(v2[i] == a2[i]); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.valarray/valarray.members/apply_value.pass.cpp b/libcxx/test/std/numerics/numarray/template.valarray/valarray.members/apply_value.pass.cpp index d43810062f640..fd100b5e54e6d 100644 --- a/libcxx/test/std/numerics/numarray/template.valarray/valarray.members/apply_value.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.valarray/valarray.members/apply_value.pass.cpp @@ -19,7 +19,7 @@ typedef int T; T f(T t) {return t + 5;} -int main() +int main(int, char**) { { T a1[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; @@ -47,4 +47,6 @@ int main() for (unsigned i = 0; i < N1; ++i) assert(v2[i] == a2[i]); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.valarray/valarray.members/cshift.pass.cpp b/libcxx/test/std/numerics/numarray/template.valarray/valarray.members/cshift.pass.cpp index 1aa6a3e9abb65..14ca081a1e918 100644 --- a/libcxx/test/std/numerics/numarray/template.valarray/valarray.members/cshift.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.valarray/valarray.members/cshift.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { { typedef int T; @@ -123,4 +123,6 @@ int main() for (unsigned i = 0; i < N1; ++i) assert(v2[i] == a2[i]); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.valarray/valarray.members/max.pass.cpp b/libcxx/test/std/numerics/numarray/template.valarray/valarray.members/max.pass.cpp index cc80ea8e07f1b..bdd84c118367a 100644 --- a/libcxx/test/std/numerics/numarray/template.valarray/valarray.members/max.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.valarray/valarray.members/max.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { { typedef double T; @@ -36,4 +36,6 @@ int main() std::valarray v1(a1, N1); assert((2*v1).max() == 8.0); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.valarray/valarray.members/min.pass.cpp b/libcxx/test/std/numerics/numarray/template.valarray/valarray.members/min.pass.cpp index 37d8f3a313645..ca04a930853d5 100644 --- a/libcxx/test/std/numerics/numarray/template.valarray/valarray.members/min.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.valarray/valarray.members/min.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { { typedef double T; @@ -36,4 +36,6 @@ int main() std::valarray v1(a1, N1); assert((2*v1).min() == -6.0); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.valarray/valarray.members/resize.pass.cpp b/libcxx/test/std/numerics/numarray/template.valarray/valarray.members/resize.pass.cpp index 82dd0bd38aacc..e92e7420b3cb0 100644 --- a/libcxx/test/std/numerics/numarray/template.valarray/valarray.members/resize.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.valarray/valarray.members/resize.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef int T; @@ -38,4 +38,6 @@ int main() for (std::size_t i = 0; i < v1.size(); ++i) assert(v1[i] == 0); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.valarray/valarray.members/shift.pass.cpp b/libcxx/test/std/numerics/numarray/template.valarray/valarray.members/shift.pass.cpp index 2be57bff3fd39..1a7628eb34951 100644 --- a/libcxx/test/std/numerics/numarray/template.valarray/valarray.members/shift.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.valarray/valarray.members/shift.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { { typedef int T; @@ -123,4 +123,6 @@ int main() for (unsigned i = 0; i < N1; ++i) assert(v2[i] == a2[i]); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.valarray/valarray.members/size.pass.cpp b/libcxx/test/std/numerics/numarray/template.valarray/valarray.members/size.pass.cpp index 3498cc59cb55c..f790627233de8 100644 --- a/libcxx/test/std/numerics/numarray/template.valarray/valarray.members/size.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.valarray/valarray.members/size.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { { typedef int T; @@ -37,4 +37,6 @@ int main() std::valarray v1; assert(v1.size() == N1); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.valarray/valarray.members/sum.pass.cpp b/libcxx/test/std/numerics/numarray/template.valarray/valarray.members/sum.pass.cpp index b1c530aa4fe47..084f00fb97ee1 100644 --- a/libcxx/test/std/numerics/numarray/template.valarray/valarray.members/sum.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.valarray/valarray.members/sum.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { { typedef double T; @@ -24,4 +24,6 @@ int main() std::valarray v1(a1, N1); assert(v1.sum() == 16.5); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.valarray/valarray.members/swap.pass.cpp b/libcxx/test/std/numerics/numarray/template.valarray/valarray.members/swap.pass.cpp index 23cf807afc222..12a7d8fd8ea6f 100644 --- a/libcxx/test/std/numerics/numarray/template.valarray/valarray.members/swap.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.valarray/valarray.members/swap.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef int T; @@ -82,4 +82,6 @@ int main() for (std::size_t i = 0; i < v2.size(); ++i) assert(v2[i] == v1_save[i]); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.valarray/valarray.sub/gslice_const.pass.cpp b/libcxx/test/std/numerics/numarray/template.valarray/valarray.sub/gslice_const.pass.cpp index 32e6b5561a81b..d84309f221e97 100644 --- a/libcxx/test/std/numerics/numarray/template.valarray/valarray.sub/gslice_const.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.valarray/valarray.sub/gslice_const.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { int a1[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, @@ -73,4 +73,6 @@ int main() assert(v1[38] == 38); assert(v1[39] == 39); assert(v1[40] == 40); + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.valarray/valarray.sub/gslice_non_const.pass.cpp b/libcxx/test/std/numerics/numarray/template.valarray/valarray.sub/gslice_non_const.pass.cpp index 12caa6118a296..ac69718780666 100644 --- a/libcxx/test/std/numerics/numarray/template.valarray/valarray.sub/gslice_non_const.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.valarray/valarray.sub/gslice_non_const.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { int a[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, @@ -53,4 +53,6 @@ int main() assert(v[21] == 34); assert(v[22] == 35); assert(v[23] == 36); + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.valarray/valarray.sub/indirect_array_const.pass.cpp b/libcxx/test/std/numerics/numarray/template.valarray/valarray.sub/indirect_array_const.pass.cpp index d210e5120dc3f..7e5ef15464885 100644 --- a/libcxx/test/std/numerics/numarray/template.valarray/valarray.sub/indirect_array_const.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.valarray/valarray.sub/indirect_array_const.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { int a[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, @@ -53,4 +53,6 @@ int main() assert(v[21] == 34); assert(v[22] == 35); assert(v[23] == 36); + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.valarray/valarray.sub/indirect_array_non_const.pass.cpp b/libcxx/test/std/numerics/numarray/template.valarray/valarray.sub/indirect_array_non_const.pass.cpp index 053e9267e72c5..82a5f14485a16 100644 --- a/libcxx/test/std/numerics/numarray/template.valarray/valarray.sub/indirect_array_non_const.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.valarray/valarray.sub/indirect_array_non_const.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { int a[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, @@ -54,4 +54,6 @@ int main() assert(v[21] == 34); assert(v[22] == 35); assert(v[23] == 36); + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.valarray/valarray.sub/slice_const.pass.cpp b/libcxx/test/std/numerics/numarray/template.valarray/valarray.sub/slice_const.pass.cpp index 3eaafee7ee8f8..d689ce9236e5e 100644 --- a/libcxx/test/std/numerics/numarray/template.valarray/valarray.sub/slice_const.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.valarray/valarray.sub/slice_const.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { int a1[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}; std::valarray v1(a1, sizeof(a1)/sizeof(a1[0])); @@ -26,4 +26,6 @@ int main() assert(v2[2] == 7); assert(v2[3] == 10); assert(v2[4] == 13); + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.valarray/valarray.sub/slice_non_const.pass.cpp b/libcxx/test/std/numerics/numarray/template.valarray/valarray.sub/slice_non_const.pass.cpp index d4cb64cf96419..a6c7cb7e884d5 100644 --- a/libcxx/test/std/numerics/numarray/template.valarray/valarray.sub/slice_non_const.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.valarray/valarray.sub/slice_non_const.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { int a1[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}; int a2[] = {-1, -2, -3, -4, -5}; @@ -39,4 +39,6 @@ int main() assert(v1[13] == -5); assert(v1[14] == 14); assert(v1[15] == 15); + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.valarray/valarray.sub/valarray_bool_const.pass.cpp b/libcxx/test/std/numerics/numarray/template.valarray/valarray.sub/valarray_bool_const.pass.cpp index 77e86ac7312fa..13cafbccb482b 100644 --- a/libcxx/test/std/numerics/numarray/template.valarray/valarray.sub/valarray_bool_const.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.valarray/valarray.sub/valarray_bool_const.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { int a1[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}; const std::size_t N1 = sizeof(a1)/sizeof(a1[0]); @@ -30,4 +30,6 @@ int main() assert(v2[ 2] == 4); assert(v2[ 3] == 7); assert(v2[ 4] == 11); + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.valarray/valarray.sub/valarray_bool_non_const.pass.cpp b/libcxx/test/std/numerics/numarray/template.valarray/valarray.sub/valarray_bool_non_const.pass.cpp index 6ea9e18496dac..34b4cfdb5f688 100644 --- a/libcxx/test/std/numerics/numarray/template.valarray/valarray.sub/valarray_bool_non_const.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.valarray/valarray.sub/valarray_bool_non_const.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { int a1[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}; const std::size_t N1 = sizeof(a1)/sizeof(a1[0]); @@ -31,4 +31,6 @@ int main() assert(v2[ 2] == 4); assert(v2[ 3] == 7); assert(v2[ 4] == 11); + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.valarray/valarray.unary/bit_not.pass.cpp b/libcxx/test/std/numerics/numarray/template.valarray/valarray.unary/bit_not.pass.cpp index 8bb23c0b45c38..7f31355d0e040 100644 --- a/libcxx/test/std/numerics/numarray/template.valarray/valarray.unary/bit_not.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.valarray/valarray.unary/bit_not.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef int T; @@ -52,4 +52,6 @@ int main() for (std::size_t i = 0; i < v2.size(); ++i) assert(v2[i] == ~(2*v[i])); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.valarray/valarray.unary/negate.pass.cpp b/libcxx/test/std/numerics/numarray/template.valarray/valarray.unary/negate.pass.cpp index 2827488d275f5..a89b24d233b13 100644 --- a/libcxx/test/std/numerics/numarray/template.valarray/valarray.unary/negate.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.valarray/valarray.unary/negate.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef int T; @@ -62,4 +62,6 @@ int main() for (std::size_t i = 0; i < v2.size(); ++i) assert(v2[i] == -2*v[i]); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.valarray/valarray.unary/not.pass.cpp b/libcxx/test/std/numerics/numarray/template.valarray/valarray.unary/not.pass.cpp index 64e902146a2bb..3975510fba76c 100644 --- a/libcxx/test/std/numerics/numarray/template.valarray/valarray.unary/not.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.valarray/valarray.unary/not.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef int T; @@ -38,4 +38,6 @@ int main() for (std::size_t i = 0; i < v2.size(); ++i) assert(v2[i] == !(2 * v[i])); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/template.valarray/valarray.unary/plus.pass.cpp b/libcxx/test/std/numerics/numarray/template.valarray/valarray.unary/plus.pass.cpp index 113bb12e96efe..b1f7f313f3f49 100644 --- a/libcxx/test/std/numerics/numarray/template.valarray/valarray.unary/plus.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.valarray/valarray.unary/plus.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef int T; @@ -62,4 +62,6 @@ int main() for (std::size_t i = 0; i < v2.size(); ++i) assert(v2[i] == +2*v[i]); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/valarray.nonmembers/nothing_to_do.pass.cpp b/libcxx/test/std/numerics/numarray/valarray.nonmembers/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/numerics/numarray/valarray.nonmembers/nothing_to_do.pass.cpp +++ b/libcxx/test/std/numerics/numarray/valarray.nonmembers/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/and_valarray_valarray.pass.cpp b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/and_valarray_valarray.pass.cpp index d195f1d248ab8..3be9074db3c8e 100644 --- a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/and_valarray_valarray.pass.cpp +++ b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/and_valarray_valarray.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef int T; @@ -32,4 +32,6 @@ int main() for (std::size_t i = 0; i < v1.size(); ++i) assert(v3[i] == a3[i]); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/and_valarray_value.pass.cpp b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/and_valarray_value.pass.cpp index 4e083bd15d85e..4f1bf8ad66b4e 100644 --- a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/and_valarray_value.pass.cpp +++ b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/and_valarray_value.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef int T; @@ -29,4 +29,6 @@ int main() for (std::size_t i = 0; i < v2.size(); ++i) assert(v2[i] == a2[i]); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/and_value_valarray.pass.cpp b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/and_value_valarray.pass.cpp index 89fdd065a2d9a..05990124e2615 100644 --- a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/and_value_valarray.pass.cpp +++ b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/and_value_valarray.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef int T; @@ -29,4 +29,6 @@ int main() for (std::size_t i = 0; i < v2.size(); ++i) assert(v2[i] == a2[i]); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/divide_valarray_valarray.pass.cpp b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/divide_valarray_valarray.pass.cpp index 4b76423ae8cf6..50c6a14848aad 100644 --- a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/divide_valarray_valarray.pass.cpp +++ b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/divide_valarray_valarray.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef int T; @@ -32,4 +32,6 @@ int main() for (std::size_t i = 0; i < v1.size(); ++i) assert(v3[i] == a3[i]); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/divide_valarray_value.pass.cpp b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/divide_valarray_value.pass.cpp index babecfe99679a..f5e0b27271ab7 100644 --- a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/divide_valarray_value.pass.cpp +++ b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/divide_valarray_value.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef int T; @@ -29,4 +29,6 @@ int main() for (std::size_t i = 0; i < v2.size(); ++i) assert(v2[i] == a2[i]); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/divide_value_valarray.pass.cpp b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/divide_value_valarray.pass.cpp index 29316e4c7c4d1..dde6955bbb717 100644 --- a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/divide_value_valarray.pass.cpp +++ b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/divide_value_valarray.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef int T; @@ -29,4 +29,6 @@ int main() for (std::size_t i = 0; i < v2.size(); ++i) assert(v2[i] == a2[i]); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/minus_valarray_valarray.pass.cpp b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/minus_valarray_valarray.pass.cpp index af78964cace4f..f1df168b3554a 100644 --- a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/minus_valarray_valarray.pass.cpp +++ b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/minus_valarray_valarray.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef int T; @@ -32,4 +32,6 @@ int main() for (std::size_t i = 0; i < v1.size(); ++i) assert(v3[i] == a3[i]); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/minus_valarray_value.pass.cpp b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/minus_valarray_value.pass.cpp index e6760c2306a6b..0ea4f0c1d8847 100644 --- a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/minus_valarray_value.pass.cpp +++ b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/minus_valarray_value.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef int T; @@ -29,4 +29,6 @@ int main() for (std::size_t i = 0; i < v2.size(); ++i) assert(v2[i] == a2[i]); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/minus_value_valarray.pass.cpp b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/minus_value_valarray.pass.cpp index 1d984be798e6f..f2131d10e0cdc 100644 --- a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/minus_value_valarray.pass.cpp +++ b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/minus_value_valarray.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef int T; @@ -29,4 +29,6 @@ int main() for (std::size_t i = 0; i < v2.size(); ++i) assert(v2[i] == a2[i]); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/modulo_valarray_valarray.pass.cpp b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/modulo_valarray_valarray.pass.cpp index 948688ba3a059..22d82f4b57e52 100644 --- a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/modulo_valarray_valarray.pass.cpp +++ b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/modulo_valarray_valarray.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef int T; @@ -32,4 +32,6 @@ int main() for (std::size_t i = 0; i < v1.size(); ++i) assert(v3[i] == a3[i]); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/modulo_valarray_value.pass.cpp b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/modulo_valarray_value.pass.cpp index 101b32d5309a4..f498e7af58888 100644 --- a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/modulo_valarray_value.pass.cpp +++ b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/modulo_valarray_value.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef int T; @@ -29,4 +29,6 @@ int main() for (std::size_t i = 0; i < v2.size(); ++i) assert(v2[i] == a2[i]); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/modulo_value_valarray.pass.cpp b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/modulo_value_valarray.pass.cpp index dc2ecc0f8d33d..fbd407ce29ab4 100644 --- a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/modulo_value_valarray.pass.cpp +++ b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/modulo_value_valarray.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef int T; @@ -29,4 +29,6 @@ int main() for (std::size_t i = 0; i < v2.size(); ++i) assert(v2[i] == a2[i]); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/or_valarray_valarray.pass.cpp b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/or_valarray_valarray.pass.cpp index c01d33a2bd480..f305243d5a5da 100644 --- a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/or_valarray_valarray.pass.cpp +++ b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/or_valarray_valarray.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef int T; @@ -32,4 +32,6 @@ int main() for (std::size_t i = 0; i < v1.size(); ++i) assert(v3[i] == a3[i]); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/or_valarray_value.pass.cpp b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/or_valarray_value.pass.cpp index 328afb2a46204..90fa4b4fd0275 100644 --- a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/or_valarray_value.pass.cpp +++ b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/or_valarray_value.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef int T; @@ -29,4 +29,6 @@ int main() for (std::size_t i = 0; i < v2.size(); ++i) assert(v2[i] == a2[i]); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/or_value_valarray.pass.cpp b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/or_value_valarray.pass.cpp index e5ca459632e26..295dd6bdc5fed 100644 --- a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/or_value_valarray.pass.cpp +++ b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/or_value_valarray.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef int T; @@ -29,4 +29,6 @@ int main() for (std::size_t i = 0; i < v2.size(); ++i) assert(v2[i] == a2[i]); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/plus_valarray_valarray.pass.cpp b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/plus_valarray_valarray.pass.cpp index c65a7b2a6c625..19a410e4faaea 100644 --- a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/plus_valarray_valarray.pass.cpp +++ b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/plus_valarray_valarray.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef int T; @@ -32,4 +32,6 @@ int main() for (std::size_t i = 0; i < v1.size(); ++i) assert(v3[i] == a3[i]); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/plus_valarray_value.pass.cpp b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/plus_valarray_value.pass.cpp index 46b7fbb559128..2aef9c1a17451 100644 --- a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/plus_valarray_value.pass.cpp +++ b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/plus_valarray_value.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef int T; @@ -29,4 +29,6 @@ int main() for (std::size_t i = 0; i < v2.size(); ++i) assert(v2[i] == a2[i]); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/plus_value_valarray.pass.cpp b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/plus_value_valarray.pass.cpp index 97b7791deda13..ba598f62ddc7a 100644 --- a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/plus_value_valarray.pass.cpp +++ b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/plus_value_valarray.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef int T; @@ -29,4 +29,6 @@ int main() for (std::size_t i = 0; i < v2.size(); ++i) assert(v2[i] == a2[i]); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/shift_left_valarray_valarray.pass.cpp b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/shift_left_valarray_valarray.pass.cpp index 90f9d756c6dc4..e71fa1056ead7 100644 --- a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/shift_left_valarray_valarray.pass.cpp +++ b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/shift_left_valarray_valarray.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef int T; @@ -32,4 +32,6 @@ int main() for (std::size_t i = 0; i < v1.size(); ++i) assert(v3[i] == a3[i]); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/shift_left_valarray_value.pass.cpp b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/shift_left_valarray_value.pass.cpp index 5136d3fd99a3b..3945c1bf4547b 100644 --- a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/shift_left_valarray_value.pass.cpp +++ b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/shift_left_valarray_value.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef int T; @@ -29,4 +29,6 @@ int main() for (std::size_t i = 0; i < v2.size(); ++i) assert(v2[i] == a2[i]); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/shift_left_value_valarray.pass.cpp b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/shift_left_value_valarray.pass.cpp index 697b46db846ec..93276345210fb 100644 --- a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/shift_left_value_valarray.pass.cpp +++ b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/shift_left_value_valarray.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef int T; @@ -29,4 +29,6 @@ int main() for (std::size_t i = 0; i < v2.size(); ++i) assert(v2[i] == a2[i]); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/shift_right_valarray_valarray.pass.cpp b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/shift_right_valarray_valarray.pass.cpp index 4194c191a24fa..9422d6be871c7 100644 --- a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/shift_right_valarray_valarray.pass.cpp +++ b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/shift_right_valarray_valarray.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef int T; @@ -32,4 +32,6 @@ int main() for (std::size_t i = 0; i < v1.size(); ++i) assert(v3[i] == a3[i]); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/shift_right_valarray_value.pass.cpp b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/shift_right_valarray_value.pass.cpp index 4aabb8a941cca..8a68f30ca6f8a 100644 --- a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/shift_right_valarray_value.pass.cpp +++ b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/shift_right_valarray_value.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef int T; @@ -29,4 +29,6 @@ int main() for (std::size_t i = 0; i < v2.size(); ++i) assert(v2[i] == a2[i]); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/shift_right_value_valarray.pass.cpp b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/shift_right_value_valarray.pass.cpp index cccdca18ca4b1..519fd2b3bd9d2 100644 --- a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/shift_right_value_valarray.pass.cpp +++ b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/shift_right_value_valarray.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef int T; @@ -29,4 +29,6 @@ int main() for (std::size_t i = 0; i < v2.size(); ++i) assert(v2[i] == a2[i]); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/times_valarray_valarray.pass.cpp b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/times_valarray_valarray.pass.cpp index c15b794ce3583..bc5e7329c8a1d 100644 --- a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/times_valarray_valarray.pass.cpp +++ b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/times_valarray_valarray.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef int T; @@ -32,4 +32,6 @@ int main() for (std::size_t i = 0; i < v1.size(); ++i) assert(v3[i] == a3[i]); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/times_valarray_value.pass.cpp b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/times_valarray_value.pass.cpp index 155ea25b580ca..330f5e0a70b20 100644 --- a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/times_valarray_value.pass.cpp +++ b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/times_valarray_value.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef int T; @@ -29,4 +29,6 @@ int main() for (std::size_t i = 0; i < v2.size(); ++i) assert(v2[i] == a2[i]); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/times_value_valarray.pass.cpp b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/times_value_valarray.pass.cpp index b825ad54e1c8e..4fa8bb2d20966 100644 --- a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/times_value_valarray.pass.cpp +++ b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/times_value_valarray.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef int T; @@ -29,4 +29,6 @@ int main() for (std::size_t i = 0; i < v2.size(); ++i) assert(v2[i] == a2[i]); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/xor_valarray_valarray.pass.cpp b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/xor_valarray_valarray.pass.cpp index 5e07f5d44663d..fd4fb084c0a65 100644 --- a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/xor_valarray_valarray.pass.cpp +++ b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/xor_valarray_valarray.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef int T; @@ -32,4 +32,6 @@ int main() for (std::size_t i = 0; i < v1.size(); ++i) assert(v3[i] == a3[i]); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/xor_valarray_value.pass.cpp b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/xor_valarray_value.pass.cpp index bc22ebaddf0b4..c5082f553c734 100644 --- a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/xor_valarray_value.pass.cpp +++ b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/xor_valarray_value.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef int T; @@ -29,4 +29,6 @@ int main() for (std::size_t i = 0; i < v2.size(); ++i) assert(v2[i] == a2[i]); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/xor_value_valarray.pass.cpp b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/xor_value_valarray.pass.cpp index 14574a10d9f9c..377f03ed38d54 100644 --- a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/xor_value_valarray.pass.cpp +++ b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.binary/xor_value_valarray.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef int T; @@ -29,4 +29,6 @@ int main() for (std::size_t i = 0; i < v2.size(); ++i) assert(v2[i] == a2[i]); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/and_valarray_valarray.pass.cpp b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/and_valarray_valarray.pass.cpp index 3e0951b6e2d38..3f3ede056ee38 100644 --- a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/and_valarray_valarray.pass.cpp +++ b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/and_valarray_valarray.pass.cpp @@ -18,7 +18,7 @@ #include #include -int main() +int main(int, char**) { { typedef int T; @@ -34,4 +34,6 @@ int main() for (std::size_t i = 0; i < v1.size(); ++i) assert(v3[i] == a3[i]); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/and_valarray_value.pass.cpp b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/and_valarray_value.pass.cpp index 75bce73a24920..de5808e5710b2 100644 --- a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/and_valarray_value.pass.cpp +++ b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/and_valarray_value.pass.cpp @@ -18,7 +18,7 @@ #include #include -int main() +int main(int, char**) { { typedef int T; @@ -42,4 +42,6 @@ int main() for (std::size_t i = 0; i < v1.size(); ++i) assert(v3[i] == a3[i]); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/and_value_valarray.pass.cpp b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/and_value_valarray.pass.cpp index a6cd5e836d6fe..c73ec1e54cb23 100644 --- a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/and_value_valarray.pass.cpp +++ b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/and_value_valarray.pass.cpp @@ -18,7 +18,7 @@ #include #include -int main() +int main(int, char**) { { typedef int T; @@ -42,4 +42,6 @@ int main() for (std::size_t i = 0; i < v3.size(); ++i) assert(v3[i] == a3[i]); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/equal_valarray_valarray.pass.cpp b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/equal_valarray_valarray.pass.cpp index 3b43c1097407d..187126fc8ed1d 100644 --- a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/equal_valarray_valarray.pass.cpp +++ b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/equal_valarray_valarray.pass.cpp @@ -18,7 +18,7 @@ #include #include -int main() +int main(int, char**) { { typedef int T; @@ -34,4 +34,6 @@ int main() for (std::size_t i = 0; i < v1.size(); ++i) assert(v3[i] == a3[i]); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/equal_valarray_value.pass.cpp b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/equal_valarray_value.pass.cpp index 1bd1fa0e81bd5..01c04a62c8002 100644 --- a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/equal_valarray_value.pass.cpp +++ b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/equal_valarray_value.pass.cpp @@ -18,7 +18,7 @@ #include #include -int main() +int main(int, char**) { { typedef int T; @@ -31,4 +31,6 @@ int main() for (std::size_t i = 0; i < v1.size(); ++i) assert(v3[i] == a3[i]); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/equal_value_valarray.pass.cpp b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/equal_value_valarray.pass.cpp index 5fb05f60ae45c..b0db6a0d18e22 100644 --- a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/equal_value_valarray.pass.cpp +++ b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/equal_value_valarray.pass.cpp @@ -18,7 +18,7 @@ #include #include -int main() +int main(int, char**) { { typedef int T; @@ -31,4 +31,6 @@ int main() for (std::size_t i = 0; i < v3.size(); ++i) assert(v3[i] == a3[i]); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/greater_equal_valarray_valarray.pass.cpp b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/greater_equal_valarray_valarray.pass.cpp index 6f7678fc7f542..c8de6208aaee4 100644 --- a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/greater_equal_valarray_valarray.pass.cpp +++ b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/greater_equal_valarray_valarray.pass.cpp @@ -18,7 +18,7 @@ #include #include -int main() +int main(int, char**) { { typedef int T; @@ -34,4 +34,6 @@ int main() for (std::size_t i = 0; i < v1.size(); ++i) assert(v3[i] == a3[i]); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/greater_equal_valarray_value.pass.cpp b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/greater_equal_valarray_value.pass.cpp index f26e946942a1d..cf568b5307b26 100644 --- a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/greater_equal_valarray_value.pass.cpp +++ b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/greater_equal_valarray_value.pass.cpp @@ -18,7 +18,7 @@ #include #include -int main() +int main(int, char**) { { typedef int T; @@ -31,4 +31,6 @@ int main() for (std::size_t i = 0; i < v1.size(); ++i) assert(v3[i] == a3[i]); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/greater_equal_value_valarray.pass.cpp b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/greater_equal_value_valarray.pass.cpp index 2c795aae31173..c66a60e062c89 100644 --- a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/greater_equal_value_valarray.pass.cpp +++ b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/greater_equal_value_valarray.pass.cpp @@ -18,7 +18,7 @@ #include #include -int main() +int main(int, char**) { { typedef int T; @@ -31,4 +31,6 @@ int main() for (std::size_t i = 0; i < v3.size(); ++i) assert(v3[i] == a3[i]); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/greater_valarray_valarray.pass.cpp b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/greater_valarray_valarray.pass.cpp index 03468763f1350..351b662be07bb 100644 --- a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/greater_valarray_valarray.pass.cpp +++ b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/greater_valarray_valarray.pass.cpp @@ -18,7 +18,7 @@ #include #include -int main() +int main(int, char**) { { typedef int T; @@ -34,4 +34,6 @@ int main() for (std::size_t i = 0; i < v1.size(); ++i) assert(v3[i] == a3[i]); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/greater_valarray_value.pass.cpp b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/greater_valarray_value.pass.cpp index 970f8d8d56792..f895b0783b714 100644 --- a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/greater_valarray_value.pass.cpp +++ b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/greater_valarray_value.pass.cpp @@ -18,7 +18,7 @@ #include #include -int main() +int main(int, char**) { { typedef int T; @@ -31,4 +31,6 @@ int main() for (std::size_t i = 0; i < v1.size(); ++i) assert(v3[i] == a3[i]); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/greater_value_valarray.pass.cpp b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/greater_value_valarray.pass.cpp index ad30ae4254143..a54b770256bea 100644 --- a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/greater_value_valarray.pass.cpp +++ b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/greater_value_valarray.pass.cpp @@ -18,7 +18,7 @@ #include #include -int main() +int main(int, char**) { { typedef int T; @@ -31,4 +31,6 @@ int main() for (std::size_t i = 0; i < v3.size(); ++i) assert(v3[i] == a3[i]); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/less_equal_valarray_valarray.pass.cpp b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/less_equal_valarray_valarray.pass.cpp index 86e5553a8cd86..c8812f3fd89ec 100644 --- a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/less_equal_valarray_valarray.pass.cpp +++ b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/less_equal_valarray_valarray.pass.cpp @@ -18,7 +18,7 @@ #include #include -int main() +int main(int, char**) { { typedef int T; @@ -34,4 +34,6 @@ int main() for (std::size_t i = 0; i < v1.size(); ++i) assert(v3[i] == a3[i]); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/less_equal_valarray_value.pass.cpp b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/less_equal_valarray_value.pass.cpp index d520a21b96534..03caf34a60a39 100644 --- a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/less_equal_valarray_value.pass.cpp +++ b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/less_equal_valarray_value.pass.cpp @@ -18,7 +18,7 @@ #include #include -int main() +int main(int, char**) { { typedef int T; @@ -31,4 +31,6 @@ int main() for (std::size_t i = 0; i < v1.size(); ++i) assert(v3[i] == a3[i]); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/less_equal_value_valarray.pass.cpp b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/less_equal_value_valarray.pass.cpp index 2055f7554a11e..5026b73d4e21e 100644 --- a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/less_equal_value_valarray.pass.cpp +++ b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/less_equal_value_valarray.pass.cpp @@ -18,7 +18,7 @@ #include #include -int main() +int main(int, char**) { { typedef int T; @@ -31,4 +31,6 @@ int main() for (std::size_t i = 0; i < v3.size(); ++i) assert(v3[i] == a3[i]); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/less_valarray_valarray.pass.cpp b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/less_valarray_valarray.pass.cpp index 0eb137ca07a9e..59943f912e3bd 100644 --- a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/less_valarray_valarray.pass.cpp +++ b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/less_valarray_valarray.pass.cpp @@ -18,7 +18,7 @@ #include #include -int main() +int main(int, char**) { { typedef int T; @@ -34,4 +34,6 @@ int main() for (std::size_t i = 0; i < v1.size(); ++i) assert(v3[i] == a3[i]); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/less_valarray_value.pass.cpp b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/less_valarray_value.pass.cpp index d7d6b7d8b4422..9ced475713922 100644 --- a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/less_valarray_value.pass.cpp +++ b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/less_valarray_value.pass.cpp @@ -18,7 +18,7 @@ #include #include -int main() +int main(int, char**) { { typedef int T; @@ -31,4 +31,6 @@ int main() for (std::size_t i = 0; i < v1.size(); ++i) assert(v3[i] == a3[i]); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/less_value_valarray.pass.cpp b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/less_value_valarray.pass.cpp index 34419bdece015..770d5a96f7dca 100644 --- a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/less_value_valarray.pass.cpp +++ b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/less_value_valarray.pass.cpp @@ -18,7 +18,7 @@ #include #include -int main() +int main(int, char**) { { typedef int T; @@ -31,4 +31,6 @@ int main() for (std::size_t i = 0; i < v3.size(); ++i) assert(v3[i] == a3[i]); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/not_equal_valarray_valarray.pass.cpp b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/not_equal_valarray_valarray.pass.cpp index 4daca5332a874..1892a70717639 100644 --- a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/not_equal_valarray_valarray.pass.cpp +++ b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/not_equal_valarray_valarray.pass.cpp @@ -18,7 +18,7 @@ #include #include -int main() +int main(int, char**) { { typedef int T; @@ -34,4 +34,6 @@ int main() for (std::size_t i = 0; i < v1.size(); ++i) assert(v3[i] == a3[i]); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/not_equal_valarray_value.pass.cpp b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/not_equal_valarray_value.pass.cpp index add76d16c007b..3cdb89739583a 100644 --- a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/not_equal_valarray_value.pass.cpp +++ b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/not_equal_valarray_value.pass.cpp @@ -18,7 +18,7 @@ #include #include -int main() +int main(int, char**) { { typedef int T; @@ -31,4 +31,6 @@ int main() for (std::size_t i = 0; i < v1.size(); ++i) assert(v3[i] == a3[i]); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/not_equal_value_valarray.pass.cpp b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/not_equal_value_valarray.pass.cpp index a350380514010..49ffeda05ae5c 100644 --- a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/not_equal_value_valarray.pass.cpp +++ b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/not_equal_value_valarray.pass.cpp @@ -18,7 +18,7 @@ #include #include -int main() +int main(int, char**) { { typedef int T; @@ -31,4 +31,6 @@ int main() for (std::size_t i = 0; i < v3.size(); ++i) assert(v3[i] == a3[i]); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/or_valarray_valarray.pass.cpp b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/or_valarray_valarray.pass.cpp index ef2b165098041..f62cb4f8cc2fc 100644 --- a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/or_valarray_valarray.pass.cpp +++ b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/or_valarray_valarray.pass.cpp @@ -18,7 +18,7 @@ #include #include -int main() +int main(int, char**) { { typedef int T; @@ -34,4 +34,6 @@ int main() for (std::size_t i = 0; i < v1.size(); ++i) assert(v3[i] == a3[i]); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/or_valarray_value.pass.cpp b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/or_valarray_value.pass.cpp index 60f14f2bb564c..df73f85e398bf 100644 --- a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/or_valarray_value.pass.cpp +++ b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/or_valarray_value.pass.cpp @@ -18,7 +18,7 @@ #include #include -int main() +int main(int, char**) { { typedef int T; @@ -42,4 +42,6 @@ int main() for (std::size_t i = 0; i < v1.size(); ++i) assert(v3[i] == a3[i]); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/or_value_valarray.pass.cpp b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/or_value_valarray.pass.cpp index 0d9a3124e6c39..3798acc67d951 100644 --- a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/or_value_valarray.pass.cpp +++ b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/or_value_valarray.pass.cpp @@ -18,7 +18,7 @@ #include #include -int main() +int main(int, char**) { { typedef int T; @@ -42,4 +42,6 @@ int main() for (std::size_t i = 0; i < v3.size(); ++i) assert(v3[i] == a3[i]); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.special/swap.pass.cpp b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.special/swap.pass.cpp index 4783508372190..2200ddfe015ae 100644 --- a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.special/swap.pass.cpp +++ b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.special/swap.pass.cpp @@ -18,7 +18,7 @@ #include #include -int main() +int main(int, char**) { { typedef int T; @@ -84,4 +84,6 @@ int main() for (std::size_t i = 0; i < v2.size(); ++i) assert(v2[i] == v1_save[i]); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.transcend/abs_valarray.pass.cpp b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.transcend/abs_valarray.pass.cpp index ff5c7d89a7a76..d721c8442634f 100644 --- a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.transcend/abs_valarray.pass.cpp +++ b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.transcend/abs_valarray.pass.cpp @@ -18,7 +18,7 @@ #include #include -int main() +int main(int, char**) { { typedef double T; @@ -31,4 +31,6 @@ int main() for (std::size_t i = 0; i < v3.size(); ++i) assert(v3[i] == a3[i]); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.transcend/acos_valarray.pass.cpp b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.transcend/acos_valarray.pass.cpp index bee16abd7984e..18b5bcb5b6c2a 100644 --- a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.transcend/acos_valarray.pass.cpp +++ b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.transcend/acos_valarray.pass.cpp @@ -31,7 +31,7 @@ bool is_about(double x, double y, int p) return a == o.str(); } -int main() +int main(int, char**) { { typedef double T; @@ -48,4 +48,6 @@ int main() for (std::size_t i = 0; i < v3.size(); ++i) assert(is_about(v3[i], a3[i], 10)); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.transcend/asin_valarray.pass.cpp b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.transcend/asin_valarray.pass.cpp index 4cecd8cace16f..9401200e5c7b1 100644 --- a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.transcend/asin_valarray.pass.cpp +++ b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.transcend/asin_valarray.pass.cpp @@ -31,7 +31,7 @@ bool is_about(double x, double y, int p) return a == o.str(); } -int main() +int main(int, char**) { { typedef double T; @@ -48,4 +48,6 @@ int main() for (std::size_t i = 0; i < v3.size(); ++i) assert(is_about(v3[i], a3[i], 10)); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.transcend/atan2_valarray_valarray.pass.cpp b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.transcend/atan2_valarray_valarray.pass.cpp index 7e81821dd449d..fcbd63b8317b3 100644 --- a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.transcend/atan2_valarray_valarray.pass.cpp +++ b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.transcend/atan2_valarray_valarray.pass.cpp @@ -31,7 +31,7 @@ bool is_about(double x, double y, int p) return a == o.str(); } -int main() +int main(int, char**) { { typedef double T; @@ -50,4 +50,6 @@ int main() for (std::size_t i = 0; i < v3.size(); ++i) assert(is_about(v3[i], a3[i], 10)); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.transcend/atan2_valarray_value.pass.cpp b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.transcend/atan2_valarray_value.pass.cpp index 3ab73757778dc..59928d447ea7d 100644 --- a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.transcend/atan2_valarray_value.pass.cpp +++ b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.transcend/atan2_valarray_value.pass.cpp @@ -31,7 +31,7 @@ bool is_about(double x, double y, int p) return a == o.str(); } -int main() +int main(int, char**) { { typedef double T; @@ -48,4 +48,6 @@ int main() for (std::size_t i = 0; i < v3.size(); ++i) assert(is_about(v3[i], a3[i], 10)); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.transcend/atan2_value_valarray.pass.cpp b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.transcend/atan2_value_valarray.pass.cpp index 07e7894ae1490..ed42627d1f911 100644 --- a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.transcend/atan2_value_valarray.pass.cpp +++ b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.transcend/atan2_value_valarray.pass.cpp @@ -31,7 +31,7 @@ bool is_about(double x, double y, int p) return a == o.str(); } -int main() +int main(int, char**) { { typedef double T; @@ -48,4 +48,6 @@ int main() for (std::size_t i = 0; i < v3.size(); ++i) assert(is_about(v3[i], a3[i], 10)); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.transcend/atan_valarray.pass.cpp b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.transcend/atan_valarray.pass.cpp index 567f568a9155b..7176b9343e535 100644 --- a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.transcend/atan_valarray.pass.cpp +++ b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.transcend/atan_valarray.pass.cpp @@ -31,7 +31,7 @@ bool is_about(double x, double y, int p) return a == o.str(); } -int main() +int main(int, char**) { { typedef double T; @@ -48,4 +48,6 @@ int main() for (std::size_t i = 0; i < v3.size(); ++i) assert(is_about(v3[i], a3[i], 10)); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.transcend/cos_valarray.pass.cpp b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.transcend/cos_valarray.pass.cpp index 182b8bc3a9f5e..bc58e4af23cb2 100644 --- a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.transcend/cos_valarray.pass.cpp +++ b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.transcend/cos_valarray.pass.cpp @@ -31,7 +31,7 @@ bool is_about(double x, double y, int p) return a == o.str(); } -int main() +int main(int, char**) { { typedef double T; @@ -48,4 +48,6 @@ int main() for (std::size_t i = 0; i < v3.size(); ++i) assert(is_about(v3[i], a3[i], 10)); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.transcend/cosh_valarray.pass.cpp b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.transcend/cosh_valarray.pass.cpp index fb0965bb3b23d..b453edd08c8c1 100644 --- a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.transcend/cosh_valarray.pass.cpp +++ b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.transcend/cosh_valarray.pass.cpp @@ -31,7 +31,7 @@ bool is_about(double x, double y, int p) return a == o.str(); } -int main() +int main(int, char**) { { typedef double T; @@ -48,4 +48,6 @@ int main() for (std::size_t i = 0; i < v3.size(); ++i) assert(is_about(v3[i], a3[i], 10)); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.transcend/exp_valarray.pass.cpp b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.transcend/exp_valarray.pass.cpp index 3c19e3edfa16b..8e95f870410e2 100644 --- a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.transcend/exp_valarray.pass.cpp +++ b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.transcend/exp_valarray.pass.cpp @@ -31,7 +31,7 @@ bool is_about(double x, double y, int p) return a == o.str(); } -int main() +int main(int, char**) { { typedef double T; @@ -48,4 +48,6 @@ int main() for (std::size_t i = 0; i < v3.size(); ++i) assert(is_about(v3[i], a3[i], 10)); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.transcend/log10_valarray.pass.cpp b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.transcend/log10_valarray.pass.cpp index 70ba211a82ad9..39514ed6833fe 100644 --- a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.transcend/log10_valarray.pass.cpp +++ b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.transcend/log10_valarray.pass.cpp @@ -31,7 +31,7 @@ bool is_about(double x, double y, int p) return a == o.str(); } -int main() +int main(int, char**) { { typedef double T; @@ -48,4 +48,6 @@ int main() for (std::size_t i = 0; i < v3.size(); ++i) assert(is_about(v3[i], a3[i], 10)); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.transcend/log_valarray.pass.cpp b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.transcend/log_valarray.pass.cpp index 3e616a062bb7a..050d58fa5991b 100644 --- a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.transcend/log_valarray.pass.cpp +++ b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.transcend/log_valarray.pass.cpp @@ -31,7 +31,7 @@ bool is_about(double x, double y, int p) return a == o.str(); } -int main() +int main(int, char**) { { typedef double T; @@ -48,4 +48,6 @@ int main() for (std::size_t i = 0; i < v3.size(); ++i) assert(is_about(v3[i], a3[i], 10)); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.transcend/pow_valarray_valarray.pass.cpp b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.transcend/pow_valarray_valarray.pass.cpp index 096cd5d322e52..93b8a14cbe69e 100644 --- a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.transcend/pow_valarray_valarray.pass.cpp +++ b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.transcend/pow_valarray_valarray.pass.cpp @@ -31,7 +31,7 @@ bool is_about(double x, double y, int p) return a == o.str(); } -int main() +int main(int, char**) { { typedef double T; @@ -50,4 +50,6 @@ int main() for (std::size_t i = 0; i < v3.size(); ++i) assert(is_about(v3[i], a3[i], 10)); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.transcend/pow_valarray_value.pass.cpp b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.transcend/pow_valarray_value.pass.cpp index 902c9f3216fc9..62c140c04da47 100644 --- a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.transcend/pow_valarray_value.pass.cpp +++ b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.transcend/pow_valarray_value.pass.cpp @@ -31,7 +31,7 @@ bool is_about(double x, double y, int p) return a == o.str(); } -int main() +int main(int, char**) { { typedef double T; @@ -48,4 +48,6 @@ int main() for (std::size_t i = 0; i < v3.size(); ++i) assert(is_about(v3[i], a3[i], 10)); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.transcend/pow_value_valarray.pass.cpp b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.transcend/pow_value_valarray.pass.cpp index 39449782330ca..0c8a76b6dac36 100644 --- a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.transcend/pow_value_valarray.pass.cpp +++ b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.transcend/pow_value_valarray.pass.cpp @@ -31,7 +31,7 @@ bool is_about(double x, double y, int p) return a == o.str(); } -int main() +int main(int, char**) { { typedef double T; @@ -48,4 +48,6 @@ int main() for (std::size_t i = 0; i < v3.size(); ++i) assert(is_about(v3[i], a3[i], 10)); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.transcend/sin_valarray.pass.cpp b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.transcend/sin_valarray.pass.cpp index 2cf38b88bda16..92d6f4492a5b9 100644 --- a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.transcend/sin_valarray.pass.cpp +++ b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.transcend/sin_valarray.pass.cpp @@ -31,7 +31,7 @@ bool is_about(double x, double y, int p) return a == o.str(); } -int main() +int main(int, char**) { { typedef double T; @@ -48,4 +48,6 @@ int main() for (std::size_t i = 0; i < v3.size(); ++i) assert(is_about(v3[i], a3[i], 10)); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.transcend/sinh_valarray.pass.cpp b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.transcend/sinh_valarray.pass.cpp index fa591d0c6e394..190c212ac8bca 100644 --- a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.transcend/sinh_valarray.pass.cpp +++ b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.transcend/sinh_valarray.pass.cpp @@ -31,7 +31,7 @@ bool is_about(double x, double y, int p) return a == o.str(); } -int main() +int main(int, char**) { { typedef double T; @@ -48,4 +48,6 @@ int main() for (std::size_t i = 0; i < v3.size(); ++i) assert(is_about(v3[i], a3[i], 10)); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.transcend/sqrt_valarray.pass.cpp b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.transcend/sqrt_valarray.pass.cpp index eb40e61b314be..805bde633e3e1 100644 --- a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.transcend/sqrt_valarray.pass.cpp +++ b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.transcend/sqrt_valarray.pass.cpp @@ -31,7 +31,7 @@ bool is_about(double x, double y, int p) return a == o.str(); } -int main() +int main(int, char**) { { typedef double T; @@ -48,4 +48,6 @@ int main() for (std::size_t i = 0; i < v3.size(); ++i) assert(is_about(v3[i], a3[i], 10)); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.transcend/tan_valarray.pass.cpp b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.transcend/tan_valarray.pass.cpp index 6395ee55079fc..4f5b69d0884bd 100644 --- a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.transcend/tan_valarray.pass.cpp +++ b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.transcend/tan_valarray.pass.cpp @@ -31,7 +31,7 @@ bool is_about(double x, double y, int p) return a == o.str(); } -int main() +int main(int, char**) { { typedef double T; @@ -48,4 +48,6 @@ int main() for (std::size_t i = 0; i < v3.size(); ++i) assert(is_about(v3[i], a3[i], 10)); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.transcend/tanh_valarray.pass.cpp b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.transcend/tanh_valarray.pass.cpp index 10e0a22be2cb0..c63696a838057 100644 --- a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.transcend/tanh_valarray.pass.cpp +++ b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.transcend/tanh_valarray.pass.cpp @@ -31,7 +31,7 @@ bool is_about(double x, double y, int p) return a == o.str(); } -int main() +int main(int, char**) { { typedef double T; @@ -48,4 +48,6 @@ int main() for (std::size_t i = 0; i < v3.size(); ++i) assert(is_about(v3[i], a3[i], 10)); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/valarray.range/begin_const.pass.cpp b/libcxx/test/std/numerics/numarray/valarray.range/begin_const.pass.cpp index db39ab4a1cd88..35e5e4206aa73 100644 --- a/libcxx/test/std/numerics/numarray/valarray.range/begin_const.pass.cpp +++ b/libcxx/test/std/numerics/numarray/valarray.range/begin_const.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { { typedef int T; @@ -26,4 +26,6 @@ int main() const std::valarray v(a, N); assert(v[0] == 1); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/valarray.range/begin_non_const.pass.cpp b/libcxx/test/std/numerics/numarray/valarray.range/begin_non_const.pass.cpp index fb4013dee6a32..e0d8e71da260b 100644 --- a/libcxx/test/std/numerics/numarray/valarray.range/begin_non_const.pass.cpp +++ b/libcxx/test/std/numerics/numarray/valarray.range/begin_non_const.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { { typedef int T; @@ -27,4 +27,6 @@ int main() *begin(v) = 10; assert(v[0] == 10); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/valarray.range/end_const.pass.cpp b/libcxx/test/std/numerics/numarray/valarray.range/end_const.pass.cpp index 113216ad067a0..d1424d3f0c170 100644 --- a/libcxx/test/std/numerics/numarray/valarray.range/end_const.pass.cpp +++ b/libcxx/test/std/numerics/numarray/valarray.range/end_const.pass.cpp @@ -18,7 +18,7 @@ #include #include -int main() +int main(int, char**) { { typedef int T; @@ -28,4 +28,6 @@ int main() assert(v[v.size()-1] == 5); assert(static_cast(end(v) - begin(v)) == v.size()); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/valarray.range/end_non_const.pass.cpp b/libcxx/test/std/numerics/numarray/valarray.range/end_non_const.pass.cpp index c5d54729aaa80..5e1cbd4a80510 100644 --- a/libcxx/test/std/numerics/numarray/valarray.range/end_non_const.pass.cpp +++ b/libcxx/test/std/numerics/numarray/valarray.range/end_non_const.pass.cpp @@ -18,7 +18,7 @@ #include #include -int main() +int main(int, char**) { { typedef int T; @@ -29,4 +29,6 @@ int main() assert(v[v.size()-1] == 10); assert(static_cast(end(v) - begin(v)) == v.size()); } + + return 0; } diff --git a/libcxx/test/std/numerics/numarray/valarray.syn/nothing_to_do.pass.cpp b/libcxx/test/std/numerics/numarray/valarray.syn/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/numerics/numarray/valarray.syn/nothing_to_do.pass.cpp +++ b/libcxx/test/std/numerics/numarray/valarray.syn/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/numerics/numeric.ops/accumulate/accumulate.pass.cpp b/libcxx/test/std/numerics/numeric.ops/accumulate/accumulate.pass.cpp index 2a14a7d8e5e82..80a048d07ed93 100644 --- a/libcxx/test/std/numerics/numeric.ops/accumulate/accumulate.pass.cpp +++ b/libcxx/test/std/numerics/numeric.ops/accumulate/accumulate.pass.cpp @@ -42,11 +42,13 @@ test() test(Iter(ia), Iter(ia+sa), 10, 31); } -int main() +int main(int, char**) { test >(); test >(); test >(); test >(); test(); + + return 0; } diff --git a/libcxx/test/std/numerics/numeric.ops/accumulate/accumulate_op.pass.cpp b/libcxx/test/std/numerics/numeric.ops/accumulate/accumulate_op.pass.cpp index a6dc04b2dfaed..c7a55b971e697 100644 --- a/libcxx/test/std/numerics/numeric.ops/accumulate/accumulate_op.pass.cpp +++ b/libcxx/test/std/numerics/numeric.ops/accumulate/accumulate_op.pass.cpp @@ -44,11 +44,13 @@ test() test(Iter(ia), Iter(ia+sa), 10, 7200); } -int main() +int main(int, char**) { test >(); test >(); test >(); test >(); test(); + + return 0; } diff --git a/libcxx/test/std/numerics/numeric.ops/adjacent.difference/adjacent_difference.pass.cpp b/libcxx/test/std/numerics/numeric.ops/adjacent.difference/adjacent_difference.pass.cpp index ac0b177417381..3e043e5cb8fe2 100644 --- a/libcxx/test/std/numerics/numeric.ops/adjacent.difference/adjacent_difference.pass.cpp +++ b/libcxx/test/std/numerics/numeric.ops/adjacent.difference/adjacent_difference.pass.cpp @@ -75,7 +75,7 @@ class Y #endif -int main() +int main(int, char**) { test, output_iterator >(); test, forward_iterator >(); @@ -112,4 +112,6 @@ int main() Y y[3] = {Y(1), Y(2), Y(3)}; std::adjacent_difference(x, x+3, y); #endif + + return 0; } diff --git a/libcxx/test/std/numerics/numeric.ops/adjacent.difference/adjacent_difference_op.pass.cpp b/libcxx/test/std/numerics/numeric.ops/adjacent.difference/adjacent_difference_op.pass.cpp index 967ec2ea345c2..9a10105d04909 100644 --- a/libcxx/test/std/numerics/numeric.ops/adjacent.difference/adjacent_difference_op.pass.cpp +++ b/libcxx/test/std/numerics/numeric.ops/adjacent.difference/adjacent_difference_op.pass.cpp @@ -78,7 +78,7 @@ class Y #endif -int main() +int main(int, char**) { test, output_iterator >(); test, forward_iterator >(); @@ -115,4 +115,6 @@ int main() Y y[3] = {Y(1), Y(2), Y(3)}; std::adjacent_difference(x, x+3, y, std::minus()); #endif + + return 0; } diff --git a/libcxx/test/std/numerics/numeric.ops/exclusive.scan/exclusive_scan.pass.cpp b/libcxx/test/std/numerics/numeric.ops/exclusive.scan/exclusive_scan.pass.cpp index 5568e0d805cc0..447ceb61ed8f4 100644 --- a/libcxx/test/std/numerics/numeric.ops/exclusive.scan/exclusive_scan.pass.cpp +++ b/libcxx/test/std/numerics/numeric.ops/exclusive.scan/exclusive_scan.pass.cpp @@ -85,7 +85,7 @@ void basic_tests() } -int main() +int main(int, char**) { basic_tests(); @@ -96,4 +96,6 @@ int main() test >(); test(); test< int*>(); + + return 0; } diff --git a/libcxx/test/std/numerics/numeric.ops/exclusive.scan/exclusive_scan_init_op.pass.cpp b/libcxx/test/std/numerics/numeric.ops/exclusive.scan/exclusive_scan_init_op.pass.cpp index 78c8325e2192d..46cb0800b7b5b 100644 --- a/libcxx/test/std/numerics/numeric.ops/exclusive.scan/exclusive_scan_init_op.pass.cpp +++ b/libcxx/test/std/numerics/numeric.ops/exclusive.scan/exclusive_scan_init_op.pass.cpp @@ -59,7 +59,7 @@ test() } } -int main() +int main(int, char**) { // All the iterator categories test >(); @@ -85,4 +85,6 @@ int main() assert(res[i] == j); } } + + return 0; } diff --git a/libcxx/test/std/numerics/numeric.ops/inclusive.scan/inclusive_scan.pass.cpp b/libcxx/test/std/numerics/numeric.ops/inclusive.scan/inclusive_scan.pass.cpp index b02ce5408bffa..0ab019c5e000f 100644 --- a/libcxx/test/std/numerics/numeric.ops/inclusive.scan/inclusive_scan.pass.cpp +++ b/libcxx/test/std/numerics/numeric.ops/inclusive.scan/inclusive_scan.pass.cpp @@ -90,7 +90,7 @@ void basic_tests() } } -int main() +int main(int, char**) { basic_tests(); @@ -101,4 +101,6 @@ int main() test >(); test(); test< int*>(); + + return 0; } diff --git a/libcxx/test/std/numerics/numeric.ops/inclusive.scan/inclusive_scan_op.pass.cpp b/libcxx/test/std/numerics/numeric.ops/inclusive.scan/inclusive_scan_op.pass.cpp index 07561175b1035..88633ac84ede2 100644 --- a/libcxx/test/std/numerics/numeric.ops/inclusive.scan/inclusive_scan_op.pass.cpp +++ b/libcxx/test/std/numerics/numeric.ops/inclusive.scan/inclusive_scan_op.pass.cpp @@ -97,7 +97,7 @@ void basic_tests() } -int main() +int main(int, char**) { basic_tests(); @@ -110,4 +110,6 @@ int main() // test(); // test< int*>(); + + return 0; } diff --git a/libcxx/test/std/numerics/numeric.ops/inclusive.scan/inclusive_scan_op_init.pass.cpp b/libcxx/test/std/numerics/numeric.ops/inclusive.scan/inclusive_scan_op_init.pass.cpp index 06a1874540a0d..c6e691aeeb827 100644 --- a/libcxx/test/std/numerics/numeric.ops/inclusive.scan/inclusive_scan_op_init.pass.cpp +++ b/libcxx/test/std/numerics/numeric.ops/inclusive.scan/inclusive_scan_op_init.pass.cpp @@ -113,7 +113,7 @@ void basic_tests() } -int main() +int main(int, char**) { basic_tests(); @@ -126,4 +126,6 @@ int main() test(); test< int*>(); + + return 0; } diff --git a/libcxx/test/std/numerics/numeric.ops/inner.product/inner_product.pass.cpp b/libcxx/test/std/numerics/numeric.ops/inner.product/inner_product.pass.cpp index fec9182b128e3..fa5c1e8341a7e 100644 --- a/libcxx/test/std/numerics/numeric.ops/inner.product/inner_product.pass.cpp +++ b/libcxx/test/std/numerics/numeric.ops/inner.product/inner_product.pass.cpp @@ -47,7 +47,7 @@ test() test(Iter1(a), Iter1(a+sa), Iter2(b), 10, 66); } -int main() +int main(int, char**) { test, input_iterator >(); test, forward_iterator >(); @@ -78,4 +78,6 @@ int main() test >(); test >(); test(); + + return 0; } diff --git a/libcxx/test/std/numerics/numeric.ops/inner.product/inner_product_comp.pass.cpp b/libcxx/test/std/numerics/numeric.ops/inner.product/inner_product_comp.pass.cpp index d0d152db1ae7e..e42e3cea9154d 100644 --- a/libcxx/test/std/numerics/numeric.ops/inner.product/inner_product_comp.pass.cpp +++ b/libcxx/test/std/numerics/numeric.ops/inner.product/inner_product_comp.pass.cpp @@ -50,7 +50,7 @@ test() test(Iter1(a), Iter1(a+sa), Iter2(b), 10, 1176490); } -int main() +int main(int, char**) { test, input_iterator >(); test, forward_iterator >(); @@ -81,4 +81,6 @@ int main() test >(); test >(); test(); + + return 0; } diff --git a/libcxx/test/std/numerics/numeric.ops/numeric.iota/iota.pass.cpp b/libcxx/test/std/numerics/numeric.ops/numeric.iota/iota.pass.cpp index 3128674253db3..2c1c08e8b540a 100644 --- a/libcxx/test/std/numerics/numeric.ops/numeric.iota/iota.pass.cpp +++ b/libcxx/test/std/numerics/numeric.ops/numeric.iota/iota.pass.cpp @@ -28,10 +28,12 @@ test() assert(ia[i] == ir[i]); } -int main() +int main(int, char**) { test >(); test >(); test >(); test(); + + return 0; } diff --git a/libcxx/test/std/numerics/numeric.ops/numeric.ops.gcd/gcd.bool1.fail.cpp b/libcxx/test/std/numerics/numeric.ops/numeric.ops.gcd/gcd.bool1.fail.cpp index 70173d08be69d..1c56a670731b2 100644 --- a/libcxx/test/std/numerics/numeric.ops/numeric.ops.gcd/gcd.bool1.fail.cpp +++ b/libcxx/test/std/numerics/numeric.ops/numeric.ops.gcd/gcd.bool1.fail.cpp @@ -18,7 +18,9 @@ #include -int main() +int main(int, char**) { std::gcd(false, 4); + + return 0; } diff --git a/libcxx/test/std/numerics/numeric.ops/numeric.ops.gcd/gcd.bool2.fail.cpp b/libcxx/test/std/numerics/numeric.ops/numeric.ops.gcd/gcd.bool2.fail.cpp index 106434d972626..9390e50f1e783 100644 --- a/libcxx/test/std/numerics/numeric.ops/numeric.ops.gcd/gcd.bool2.fail.cpp +++ b/libcxx/test/std/numerics/numeric.ops/numeric.ops.gcd/gcd.bool2.fail.cpp @@ -18,7 +18,9 @@ #include -int main() +int main(int, char**) { std::gcd(2, true); + + return 0; } diff --git a/libcxx/test/std/numerics/numeric.ops/numeric.ops.gcd/gcd.bool3.fail.cpp b/libcxx/test/std/numerics/numeric.ops/numeric.ops.gcd/gcd.bool3.fail.cpp index 138bdd6db851b..2aceb285bfe05 100644 --- a/libcxx/test/std/numerics/numeric.ops/numeric.ops.gcd/gcd.bool3.fail.cpp +++ b/libcxx/test/std/numerics/numeric.ops/numeric.ops.gcd/gcd.bool3.fail.cpp @@ -18,7 +18,9 @@ #include -int main() +int main(int, char**) { std::gcd(false, 4); + + return 0; } diff --git a/libcxx/test/std/numerics/numeric.ops/numeric.ops.gcd/gcd.bool4.fail.cpp b/libcxx/test/std/numerics/numeric.ops/numeric.ops.gcd/gcd.bool4.fail.cpp index 8e8e7559320ca..234a4d7cefa46 100644 --- a/libcxx/test/std/numerics/numeric.ops/numeric.ops.gcd/gcd.bool4.fail.cpp +++ b/libcxx/test/std/numerics/numeric.ops/numeric.ops.gcd/gcd.bool4.fail.cpp @@ -18,7 +18,9 @@ #include -int main() +int main(int, char**) { std::gcd(2, true); + + return 0; } diff --git a/libcxx/test/std/numerics/numeric.ops/numeric.ops.gcd/gcd.not_integral1.fail.cpp b/libcxx/test/std/numerics/numeric.ops/numeric.ops.gcd/gcd.not_integral1.fail.cpp index 7bcf29d13c271..1aeb5249fff7a 100644 --- a/libcxx/test/std/numerics/numeric.ops/numeric.ops.gcd/gcd.not_integral1.fail.cpp +++ b/libcxx/test/std/numerics/numeric.ops/numeric.ops.gcd/gcd.not_integral1.fail.cpp @@ -18,7 +18,9 @@ #include -int main() +int main(int, char**) { std::gcd(2.0, 4); + + return 0; } diff --git a/libcxx/test/std/numerics/numeric.ops/numeric.ops.gcd/gcd.not_integral2.fail.cpp b/libcxx/test/std/numerics/numeric.ops/numeric.ops.gcd/gcd.not_integral2.fail.cpp index aceb0ff63a9b8..89079181b514a 100644 --- a/libcxx/test/std/numerics/numeric.ops/numeric.ops.gcd/gcd.not_integral2.fail.cpp +++ b/libcxx/test/std/numerics/numeric.ops/numeric.ops.gcd/gcd.not_integral2.fail.cpp @@ -18,7 +18,9 @@ #include -int main() +int main(int, char**) { std::gcd(4, 6.0); + + return 0; } diff --git a/libcxx/test/std/numerics/numeric.ops/numeric.ops.gcd/gcd.pass.cpp b/libcxx/test/std/numerics/numeric.ops/numeric.ops.gcd/gcd.pass.cpp index 83a90b984c531..bba3780bdc820 100644 --- a/libcxx/test/std/numerics/numeric.ops/numeric.ops.gcd/gcd.pass.cpp +++ b/libcxx/test/std/numerics/numeric.ops/numeric.ops.gcd/gcd.pass.cpp @@ -91,7 +91,7 @@ constexpr bool do_test(int = 0) return accumulate; } -int main() +int main(int, char**) { auto non_cce = std::rand(); // a value that can't possibly be constexpr @@ -141,4 +141,6 @@ int main() static_assert(std::is_same_v, ""); assert(res == 2); } + + return 0; } diff --git a/libcxx/test/std/numerics/numeric.ops/numeric.ops.lcm/lcm.bool1.fail.cpp b/libcxx/test/std/numerics/numeric.ops/numeric.ops.lcm/lcm.bool1.fail.cpp index 43fc1f5bfa59d..ab199d7a8e53c 100644 --- a/libcxx/test/std/numerics/numeric.ops/numeric.ops.lcm/lcm.bool1.fail.cpp +++ b/libcxx/test/std/numerics/numeric.ops/numeric.ops.lcm/lcm.bool1.fail.cpp @@ -18,7 +18,9 @@ #include -int main() +int main(int, char**) { std::lcm(false, 4); + + return 0; } diff --git a/libcxx/test/std/numerics/numeric.ops/numeric.ops.lcm/lcm.bool2.fail.cpp b/libcxx/test/std/numerics/numeric.ops/numeric.ops.lcm/lcm.bool2.fail.cpp index b9e1128dc9b96..68bfd1d217185 100644 --- a/libcxx/test/std/numerics/numeric.ops/numeric.ops.lcm/lcm.bool2.fail.cpp +++ b/libcxx/test/std/numerics/numeric.ops/numeric.ops.lcm/lcm.bool2.fail.cpp @@ -18,7 +18,9 @@ #include -int main() +int main(int, char**) { std::lcm(2, true); + + return 0; } diff --git a/libcxx/test/std/numerics/numeric.ops/numeric.ops.lcm/lcm.bool3.fail.cpp b/libcxx/test/std/numerics/numeric.ops/numeric.ops.lcm/lcm.bool3.fail.cpp index 763b65f99f67b..4f4042267eb6c 100644 --- a/libcxx/test/std/numerics/numeric.ops/numeric.ops.lcm/lcm.bool3.fail.cpp +++ b/libcxx/test/std/numerics/numeric.ops/numeric.ops.lcm/lcm.bool3.fail.cpp @@ -18,7 +18,9 @@ #include -int main() +int main(int, char**) { std::lcm(false, 4); + + return 0; } diff --git a/libcxx/test/std/numerics/numeric.ops/numeric.ops.lcm/lcm.bool4.fail.cpp b/libcxx/test/std/numerics/numeric.ops/numeric.ops.lcm/lcm.bool4.fail.cpp index dd7c43a41f7f5..2cdbcefdc2dbf 100644 --- a/libcxx/test/std/numerics/numeric.ops/numeric.ops.lcm/lcm.bool4.fail.cpp +++ b/libcxx/test/std/numerics/numeric.ops/numeric.ops.lcm/lcm.bool4.fail.cpp @@ -18,7 +18,9 @@ #include -int main() +int main(int, char**) { std::lcm(2, true); + + return 0; } diff --git a/libcxx/test/std/numerics/numeric.ops/numeric.ops.lcm/lcm.not_integral1.fail.cpp b/libcxx/test/std/numerics/numeric.ops/numeric.ops.lcm/lcm.not_integral1.fail.cpp index 81f25887e5a6c..968034b0228eb 100644 --- a/libcxx/test/std/numerics/numeric.ops/numeric.ops.lcm/lcm.not_integral1.fail.cpp +++ b/libcxx/test/std/numerics/numeric.ops/numeric.ops.lcm/lcm.not_integral1.fail.cpp @@ -18,7 +18,9 @@ #include -int main() +int main(int, char**) { std::lcm(2.0, 4); + + return 0; } diff --git a/libcxx/test/std/numerics/numeric.ops/numeric.ops.lcm/lcm.not_integral2.fail.cpp b/libcxx/test/std/numerics/numeric.ops/numeric.ops.lcm/lcm.not_integral2.fail.cpp index ef039ca7984d7..ed2813f6a34d9 100644 --- a/libcxx/test/std/numerics/numeric.ops/numeric.ops.lcm/lcm.not_integral2.fail.cpp +++ b/libcxx/test/std/numerics/numeric.ops/numeric.ops.lcm/lcm.not_integral2.fail.cpp @@ -18,7 +18,9 @@ #include -int main() +int main(int, char**) { std::lcm(4, 6.0); + + return 0; } diff --git a/libcxx/test/std/numerics/numeric.ops/numeric.ops.lcm/lcm.pass.cpp b/libcxx/test/std/numerics/numeric.ops/numeric.ops.lcm/lcm.pass.cpp index a42303776b2d5..8a05670613453 100644 --- a/libcxx/test/std/numerics/numeric.ops/numeric.ops.lcm/lcm.pass.cpp +++ b/libcxx/test/std/numerics/numeric.ops/numeric.ops.lcm/lcm.pass.cpp @@ -90,7 +90,7 @@ constexpr bool do_test(int = 0) return accumulate; } -int main() +int main(int, char**) { auto non_cce = std::rand(); // a value that can't possibly be constexpr @@ -141,4 +141,6 @@ int main() static_assert(std::is_same_v, ""); assert(res1 == 1324997410816LL); } + + return 0; } diff --git a/libcxx/test/std/numerics/numeric.ops/partial.sum/partial_sum.pass.cpp b/libcxx/test/std/numerics/numeric.ops/partial.sum/partial_sum.pass.cpp index 90a74e22f5efe..4ea410712ca6c 100644 --- a/libcxx/test/std/numerics/numeric.ops/partial.sum/partial_sum.pass.cpp +++ b/libcxx/test/std/numerics/numeric.ops/partial.sum/partial_sum.pass.cpp @@ -35,7 +35,7 @@ test() assert(ib[i] == ir[i]); } -int main() +int main(int, char**) { test, output_iterator >(); test, forward_iterator >(); @@ -66,4 +66,6 @@ int main() test >(); test >(); test(); + + return 0; } diff --git a/libcxx/test/std/numerics/numeric.ops/partial.sum/partial_sum_op.pass.cpp b/libcxx/test/std/numerics/numeric.ops/partial.sum/partial_sum_op.pass.cpp index eadcd5a3a1e8e..ab51b5b5b2425 100644 --- a/libcxx/test/std/numerics/numeric.ops/partial.sum/partial_sum_op.pass.cpp +++ b/libcxx/test/std/numerics/numeric.ops/partial.sum/partial_sum_op.pass.cpp @@ -37,7 +37,7 @@ test() assert(ib[i] == ir[i]); } -int main() +int main(int, char**) { test, output_iterator >(); test, forward_iterator >(); @@ -68,4 +68,6 @@ int main() test >(); test >(); test(); + + return 0; } diff --git a/libcxx/test/std/numerics/numeric.ops/reduce/reduce.pass.cpp b/libcxx/test/std/numerics/numeric.ops/reduce/reduce.pass.cpp index ebdaaac91e0a6..031a12d290b0e 100644 --- a/libcxx/test/std/numerics/numeric.ops/reduce/reduce.pass.cpp +++ b/libcxx/test/std/numerics/numeric.ops/reduce/reduce.pass.cpp @@ -46,7 +46,7 @@ void test_return_type() static_assert( std::is_same_v ); } -int main() +int main(int, char**) { test_return_type(); test_return_type(); @@ -59,4 +59,6 @@ int main() test >(); test >(); test(); + + return 0; } diff --git a/libcxx/test/std/numerics/numeric.ops/reduce/reduce_init.pass.cpp b/libcxx/test/std/numerics/numeric.ops/reduce/reduce_init.pass.cpp index 22b5a7239c4ac..19c6b7d5fc8d2 100644 --- a/libcxx/test/std/numerics/numeric.ops/reduce/reduce_init.pass.cpp +++ b/libcxx/test/std/numerics/numeric.ops/reduce/reduce_init.pass.cpp @@ -48,7 +48,7 @@ void test_return_type() static_assert( std::is_same_v ); } -int main() +int main(int, char**) { test_return_type(); test_return_type(); @@ -63,4 +63,6 @@ int main() test >(); test >(); test(); + + return 0; } diff --git a/libcxx/test/std/numerics/numeric.ops/reduce/reduce_init_op.pass.cpp b/libcxx/test/std/numerics/numeric.ops/reduce/reduce_init_op.pass.cpp index 7c26921716af1..adcf928796834 100644 --- a/libcxx/test/std/numerics/numeric.ops/reduce/reduce_init_op.pass.cpp +++ b/libcxx/test/std/numerics/numeric.ops/reduce/reduce_init_op.pass.cpp @@ -48,7 +48,7 @@ void test_return_type() static_assert( std::is_same_v()))>, "" ); } -int main() +int main(int, char**) { test_return_type(); test_return_type(); @@ -70,4 +70,6 @@ int main() unsigned res = std::reduce(v.begin(), v.end(), 1U, std::multiplies<>()); assert(res == 40320); // 8! will not fit into a char } + + return 0; } diff --git a/libcxx/test/std/numerics/numeric.ops/transform.exclusive.scan/transform_exclusive_scan_init_bop_uop.pass.cpp b/libcxx/test/std/numerics/numeric.ops/transform.exclusive.scan/transform_exclusive_scan_init_bop_uop.pass.cpp index dc9412ec1f501..528802cb4bfee 100644 --- a/libcxx/test/std/numerics/numeric.ops/transform.exclusive.scan/transform_exclusive_scan_init_bop_uop.pass.cpp +++ b/libcxx/test/std/numerics/numeric.ops/transform.exclusive.scan/transform_exclusive_scan_init_bop_uop.pass.cpp @@ -139,7 +139,7 @@ void basic_tests() } } -int main() +int main(int, char**) { basic_tests(); @@ -150,4 +150,6 @@ int main() test >(); test(); test< int*>(); + + return 0; } diff --git a/libcxx/test/std/numerics/numeric.ops/transform.inclusive.scan/transform_inclusive_scan_bop_uop.pass.cpp b/libcxx/test/std/numerics/numeric.ops/transform.inclusive.scan/transform_inclusive_scan_bop_uop.pass.cpp index 412c4b2922c8c..f7a32131719f3 100644 --- a/libcxx/test/std/numerics/numeric.ops/transform.inclusive.scan/transform_inclusive_scan_bop_uop.pass.cpp +++ b/libcxx/test/std/numerics/numeric.ops/transform.inclusive.scan/transform_inclusive_scan_bop_uop.pass.cpp @@ -113,7 +113,7 @@ void basic_tests() } } -int main() +int main(int, char**) { basic_tests(); @@ -124,4 +124,6 @@ int main() test >(); test(); test< int*>(); + + return 0; } diff --git a/libcxx/test/std/numerics/numeric.ops/transform.inclusive.scan/transform_inclusive_scan_bop_uop_init.pass.cpp b/libcxx/test/std/numerics/numeric.ops/transform.inclusive.scan/transform_inclusive_scan_bop_uop_init.pass.cpp index d29131bd1a5c1..56e5bc6e75c87 100644 --- a/libcxx/test/std/numerics/numeric.ops/transform.inclusive.scan/transform_inclusive_scan_bop_uop_init.pass.cpp +++ b/libcxx/test/std/numerics/numeric.ops/transform.inclusive.scan/transform_inclusive_scan_bop_uop_init.pass.cpp @@ -139,7 +139,7 @@ void basic_tests() } } -int main() +int main(int, char**) { basic_tests(); @@ -150,4 +150,6 @@ int main() test >(); test(); test< int*>(); + + return 0; } diff --git a/libcxx/test/std/numerics/numeric.ops/transform.reduce/transform_reduce_iter_iter_init_bop_uop.pass.cpp b/libcxx/test/std/numerics/numeric.ops/transform.reduce/transform_reduce_iter_iter_init_bop_uop.pass.cpp index 541fbb76f9fa7..38071531b22ac 100644 --- a/libcxx/test/std/numerics/numeric.ops/transform.reduce/transform_reduce_iter_iter_init_bop_uop.pass.cpp +++ b/libcxx/test/std/numerics/numeric.ops/transform.reduce/transform_reduce_iter_iter_init_bop_uop.pass.cpp @@ -91,7 +91,7 @@ void test_move_only_types() [](const MoveOnly& target) { return MoveOnly{target.get() * 10}; }).get()); } -int main() +int main(int, char**) { test_return_type(); test_return_type(); @@ -117,4 +117,6 @@ int main() } test_move_only_types(); + + return 0; } diff --git a/libcxx/test/std/numerics/numeric.ops/transform.reduce/transform_reduce_iter_iter_iter_init.pass.cpp b/libcxx/test/std/numerics/numeric.ops/transform.reduce/transform_reduce_iter_iter_iter_init.pass.cpp index 8f846a8930eac..d74267c71fb31 100644 --- a/libcxx/test/std/numerics/numeric.ops/transform.reduce/transform_reduce_iter_iter_iter_init.pass.cpp +++ b/libcxx/test/std/numerics/numeric.ops/transform.reduce/transform_reduce_iter_iter_iter_init.pass.cpp @@ -65,7 +65,7 @@ void test_move_only_types() std::transform_reduce(std::begin(ia), std::end(ia), std::begin(ib), MoveOnly{0}).get()); } -int main() +int main(int, char**) { test_return_type(); test_return_type(); @@ -103,4 +103,6 @@ int main() test< int*, unsigned int *>(); test_move_only_types(); + + return 0; } diff --git a/libcxx/test/std/numerics/numeric.ops/transform.reduce/transform_reduce_iter_iter_iter_init_op_op.pass.cpp b/libcxx/test/std/numerics/numeric.ops/transform.reduce/transform_reduce_iter_iter_iter_init_op_op.pass.cpp index 586e7b180dbde..27bad12ce6191 100644 --- a/libcxx/test/std/numerics/numeric.ops/transform.reduce/transform_reduce_iter_iter_iter_init_op_op.pass.cpp +++ b/libcxx/test/std/numerics/numeric.ops/transform.reduce/transform_reduce_iter_iter_iter_init_op_op.pass.cpp @@ -69,7 +69,7 @@ void test_move_only_types() [](const MoveOnly& lhs, const MoveOnly& rhs) { return MoveOnly{lhs.get() * rhs.get()}; }).get()); } -int main() +int main(int, char**) { test_return_type(); test_return_type(); @@ -107,4 +107,6 @@ int main() test< int*, unsigned int *>(); test_move_only_types(); + + return 0; } diff --git a/libcxx/test/std/numerics/numeric.requirements/nothing_to_do.pass.cpp b/libcxx/test/std/numerics/numeric.requirements/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/numerics/numeric.requirements/nothing_to_do.pass.cpp +++ b/libcxx/test/std/numerics/numeric.requirements/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/numerics/numerics.general/nothing_to_do.pass.cpp b/libcxx/test/std/numerics/numerics.general/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/numerics/numerics.general/nothing_to_do.pass.cpp +++ b/libcxx/test/std/numerics/numerics.general/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/numerics/rand/nothing_to_do.pass.cpp b/libcxx/test/std/numerics/rand/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/numerics/rand/nothing_to_do.pass.cpp +++ b/libcxx/test/std/numerics/rand/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.adapt/nothing_to_do.pass.cpp b/libcxx/test/std/numerics/rand/rand.adapt/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/numerics/rand/rand.adapt/nothing_to_do.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.adapt/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.disc/assign.pass.cpp b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.disc/assign.pass.cpp index dbc038fc5bcad..5deb1d50cfa41 100644 --- a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.disc/assign.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.disc/assign.pass.cpp @@ -48,8 +48,10 @@ test2() assert(e1 == e2); } -int main() +int main(int, char**) { test1(); test2(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.disc/copy.pass.cpp b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.disc/copy.pass.cpp index 78bc6b2972a90..443f4f8d86c80 100644 --- a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.disc/copy.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.disc/copy.pass.cpp @@ -46,8 +46,10 @@ test2() assert(e1 == e2); } -int main() +int main(int, char**) { test1(); test2(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.disc/ctor_engine_copy.pass.cpp b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.disc/ctor_engine_copy.pass.cpp index a0833fb4a725e..57f2bcc76a31f 100644 --- a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.disc/ctor_engine_copy.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.disc/ctor_engine_copy.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::ranlux24_base Engine; @@ -25,4 +25,6 @@ int main() Adaptor a(e); assert(a.base() == e); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.disc/ctor_engine_move.pass.cpp b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.disc/ctor_engine_move.pass.cpp index 5df116384d7ad..ade8e8d81cff0 100644 --- a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.disc/ctor_engine_move.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.disc/ctor_engine_move.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::ranlux24_base Engine; @@ -26,4 +26,6 @@ int main() Adaptor a(std::move(e0)); assert(a.base() == e); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.disc/ctor_result_type.pass.cpp b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.disc/ctor_result_type.pass.cpp index 4022917b9f01d..6fe0947631c90 100644 --- a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.disc/ctor_result_type.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.disc/ctor_result_type.pass.cpp @@ -43,8 +43,10 @@ test2() assert(os.str() == a); } -int main() +int main(int, char**) { test1(); test2(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.disc/ctor_sseq.pass.cpp b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.disc/ctor_sseq.pass.cpp index c56bf4503ce45..fe2d9fea312ca 100644 --- a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.disc/ctor_sseq.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.disc/ctor_sseq.pass.cpp @@ -47,8 +47,10 @@ test2() assert(os.str() == a); } -int main() +int main(int, char**) { test1(); test2(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.disc/default.pass.cpp b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.disc/default.pass.cpp index 703dd3d7c9e53..32af7046fdd08 100644 --- a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.disc/default.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.disc/default.pass.cpp @@ -34,8 +34,10 @@ test2() assert(e1() == 23459059301164ull); } -int main() +int main(int, char**) { test1(); test2(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.disc/discard.pass.cpp b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.disc/discard.pass.cpp index ca675b9ffba7f..a6f4d64e3343a 100644 --- a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.disc/discard.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.disc/discard.pass.cpp @@ -44,8 +44,10 @@ test2() assert(e1 == e2); } -int main() +int main(int, char**) { test1(); test2(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.disc/eval.pass.cpp b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.disc/eval.pass.cpp index 33e0f73ee869d..75f07aecae57c 100644 --- a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.disc/eval.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.disc/eval.pass.cpp @@ -34,8 +34,10 @@ test2() assert(e() == 276846226770426ull); } -int main() +int main(int, char**) { test1(); test2(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.disc/io.pass.cpp b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.disc/io.pass.cpp index ebfddfc371d88..a9fbd7963e86a 100644 --- a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.disc/io.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.disc/io.pass.cpp @@ -55,8 +55,10 @@ test2() assert(e1 == e2); } -int main() +int main(int, char**) { test1(); test2(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.disc/result_type.pass.cpp b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.disc/result_type.pass.cpp index 7df00d8e62980..a18e09bd15f86 100644 --- a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.disc/result_type.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.disc/result_type.pass.cpp @@ -34,8 +34,10 @@ test2() std::uint_fast64_t>::value), ""); } -int main() +int main(int, char**) { test1(); test2(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.disc/seed_result_type.pass.cpp b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.disc/seed_result_type.pass.cpp index 0dff0790c6aba..bfa93767eaaa8 100644 --- a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.disc/seed_result_type.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.disc/seed_result_type.pass.cpp @@ -42,8 +42,10 @@ test2() } } -int main() +int main(int, char**) { test1(); test2(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.disc/seed_sseq.pass.cpp b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.disc/seed_sseq.pass.cpp index 738b306b256f2..5506cffa11735 100644 --- a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.disc/seed_sseq.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.disc/seed_sseq.pass.cpp @@ -40,8 +40,10 @@ test2() assert(e1 == e2); } -int main() +int main(int, char**) { test1(); test2(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.disc/values.pass.cpp b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.disc/values.pass.cpp index fef9ab497373c..423a629e7f20f 100644 --- a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.disc/values.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.disc/values.pass.cpp @@ -64,8 +64,10 @@ test2() where(E::used_block); } -int main() +int main(int, char**) { test1(); test2(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.ibits/assign.pass.cpp b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.ibits/assign.pass.cpp index def8387e169e6..79205aacc73db 100644 --- a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.ibits/assign.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.ibits/assign.pass.cpp @@ -48,8 +48,10 @@ test2() assert(e1 == e2); } -int main() +int main(int, char**) { test1(); test2(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.ibits/copy.pass.cpp b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.ibits/copy.pass.cpp index 179ffaf46d190..22e68626ede73 100644 --- a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.ibits/copy.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.ibits/copy.pass.cpp @@ -46,8 +46,10 @@ test2() assert(e1 == e2); } -int main() +int main(int, char**) { test1(); test2(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.ibits/ctor_engine_copy.pass.cpp b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.ibits/ctor_engine_copy.pass.cpp index c858600ccb1fe..65fad3e2f8348 100644 --- a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.ibits/ctor_engine_copy.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.ibits/ctor_engine_copy.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::mt19937 Engine; @@ -25,4 +25,6 @@ int main() Adaptor a(e); assert(a.base() == e); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.ibits/ctor_engine_move.pass.cpp b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.ibits/ctor_engine_move.pass.cpp index 1ecf36c43c5e8..f3b1d526fde2b 100644 --- a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.ibits/ctor_engine_move.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.ibits/ctor_engine_move.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::mt19937 Engine; @@ -26,4 +26,6 @@ int main() Adaptor a(std::move(e0)); assert(a.base() == e); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.ibits/ctor_result_type.pass.cpp b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.ibits/ctor_result_type.pass.cpp index 9fa1383a84186..84817b16ea4df 100644 --- a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.ibits/ctor_result_type.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.ibits/ctor_result_type.pass.cpp @@ -43,8 +43,10 @@ test2() assert(os.str() == a); } -int main() +int main(int, char**) { test1(); test2(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.ibits/ctor_sseq.pass.cpp b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.ibits/ctor_sseq.pass.cpp index a179753a88e1f..d2792f98f05d9 100644 --- a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.ibits/ctor_sseq.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.ibits/ctor_sseq.pass.cpp @@ -47,8 +47,10 @@ test2() assert(os.str() == a); } -int main() +int main(int, char**) { test1(); test2(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.ibits/default.pass.cpp b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.ibits/default.pass.cpp index 422aaf936e35e..d7e72e3e72af0 100644 --- a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.ibits/default.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.ibits/default.pass.cpp @@ -34,8 +34,10 @@ test2() assert(e1() == 18223106896348967647ull); } -int main() +int main(int, char**) { test1(); test2(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.ibits/discard.pass.cpp b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.ibits/discard.pass.cpp index fa735c09e720c..8f292192361e0 100644 --- a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.ibits/discard.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.ibits/discard.pass.cpp @@ -44,8 +44,10 @@ test2() assert(e1 == e2); } -int main() +int main(int, char**) { test1(); test2(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.ibits/eval.pass.cpp b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.ibits/eval.pass.cpp index 036dc1fbc9a16..9d60eaba39aea 100644 --- a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.ibits/eval.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.ibits/eval.pass.cpp @@ -129,7 +129,7 @@ test8() assert(e() == 16470362623952407241ull); } -int main() +int main(int, char**) { test1(); test2(); @@ -139,4 +139,6 @@ int main() test6(); test7(); test8(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.ibits/io.pass.cpp b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.ibits/io.pass.cpp index 0362cbfc23a20..b1a73193c243b 100644 --- a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.ibits/io.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.ibits/io.pass.cpp @@ -55,8 +55,10 @@ test2() assert(e1 == e2); } -int main() +int main(int, char**) { test1(); test2(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.ibits/result_type.pass.cpp b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.ibits/result_type.pass.cpp index ee47a38b9e388..1b6fb87e347fc 100644 --- a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.ibits/result_type.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.ibits/result_type.pass.cpp @@ -77,8 +77,10 @@ test2() unsigned long long>::value), ""); } -int main() +int main(int, char**) { test1(); test2(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.ibits/seed_result_type.pass.cpp b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.ibits/seed_result_type.pass.cpp index 204c89739c552..8225044d778be 100644 --- a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.ibits/seed_result_type.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.ibits/seed_result_type.pass.cpp @@ -42,8 +42,10 @@ test2() } } -int main() +int main(int, char**) { test1(); test2(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.ibits/seed_sseq.pass.cpp b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.ibits/seed_sseq.pass.cpp index 5c1c34e728d74..04374d00098f8 100644 --- a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.ibits/seed_sseq.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.ibits/seed_sseq.pass.cpp @@ -40,8 +40,10 @@ test2() assert(e1 == e2); } -int main() +int main(int, char**) { test1(); test2(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.ibits/values.pass.cpp b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.ibits/values.pass.cpp index 10d9f4d7554be..be25ad1e2b046 100644 --- a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.ibits/values.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.ibits/values.pass.cpp @@ -51,8 +51,10 @@ test2() #endif } -int main() +int main(int, char**) { test1(); test2(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.shuf/assign.pass.cpp b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.shuf/assign.pass.cpp index d3518432c38e1..da08f58edb69b 100644 --- a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.shuf/assign.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.shuf/assign.pass.cpp @@ -32,7 +32,9 @@ test1() assert(e1 == e2); } -int main() +int main(int, char**) { test1(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.shuf/copy.pass.cpp b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.shuf/copy.pass.cpp index 7c4930879ae4c..5788371c36e65 100644 --- a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.shuf/copy.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.shuf/copy.pass.cpp @@ -31,7 +31,9 @@ test1() assert(e1 == e2); } -int main() +int main(int, char**) { test1(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.shuf/ctor_engine_copy.pass.cpp b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.shuf/ctor_engine_copy.pass.cpp index 4bd8052627c07..0cc29d496dc8c 100644 --- a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.shuf/ctor_engine_copy.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.shuf/ctor_engine_copy.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::minstd_rand0 Engine; @@ -29,4 +29,6 @@ int main() assert(a.base() == e); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.shuf/ctor_engine_move.pass.cpp b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.shuf/ctor_engine_move.pass.cpp index 6daa356a7dc19..35474e6a0d6a5 100644 --- a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.shuf/ctor_engine_move.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.shuf/ctor_engine_move.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::minstd_rand0 Engine; @@ -30,4 +30,6 @@ int main() assert(a.base() == e); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.shuf/ctor_result_type.pass.cpp b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.shuf/ctor_result_type.pass.cpp index ba0350fc5fb94..5ca51e151e074 100644 --- a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.shuf/ctor_result_type.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.shuf/ctor_result_type.pass.cpp @@ -69,7 +69,9 @@ test1() assert(os.str() == a); } -int main() +int main(int, char**) { test1(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.shuf/ctor_sseq.pass.cpp b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.shuf/ctor_sseq.pass.cpp index 3d3c06db2a222..136e7fe873f93 100644 --- a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.shuf/ctor_sseq.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.shuf/ctor_sseq.pass.cpp @@ -72,7 +72,9 @@ test1() assert(os.str() == a); } -int main() +int main(int, char**) { test1(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.shuf/default.pass.cpp b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.shuf/default.pass.cpp index 438c60790f070..fff5cee2d0759 100644 --- a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.shuf/default.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.shuf/default.pass.cpp @@ -25,7 +25,9 @@ test1() assert(e1() == 152607844u); } -int main() +int main(int, char**) { test1(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.shuf/discard.pass.cpp b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.shuf/discard.pass.cpp index 3e98bf554d502..1b86048c2e29d 100644 --- a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.shuf/discard.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.shuf/discard.pass.cpp @@ -30,7 +30,9 @@ test1() assert(e1 == e2); } -int main() +int main(int, char**) { test1(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.shuf/eval.pass.cpp b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.shuf/eval.pass.cpp index fa7056ca965f6..4eecfea81b76e 100644 --- a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.shuf/eval.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.shuf/eval.pass.cpp @@ -86,9 +86,11 @@ test3() assert(e() == 500); } -int main() +int main(int, char**) { test1(); test2(); test3(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.shuf/io.pass.cpp b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.shuf/io.pass.cpp index 5d7a49a5f3bc2..5d80b3afcbcd1 100644 --- a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.shuf/io.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.shuf/io.pass.cpp @@ -41,7 +41,9 @@ test1() assert(e1 == e2); } -int main() +int main(int, char**) { test1(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.shuf/result_type.pass.cpp b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.shuf/result_type.pass.cpp index 5ba0b5ed2f515..bcb08557c86a6 100644 --- a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.shuf/result_type.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.shuf/result_type.pass.cpp @@ -77,8 +77,10 @@ test2() unsigned long long>::value), ""); } -int main() +int main(int, char**) { test1(); test2(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.shuf/seed_result_type.pass.cpp b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.shuf/seed_result_type.pass.cpp index 0d71f27e28a84..24ccfbbf8e0b8 100644 --- a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.shuf/seed_result_type.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.shuf/seed_result_type.pass.cpp @@ -29,7 +29,9 @@ test1() } } -int main() +int main(int, char**) { test1(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.shuf/seed_sseq.pass.cpp b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.shuf/seed_sseq.pass.cpp index 0a5d386b1e5c4..8dfbcb00ee71c 100644 --- a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.shuf/seed_sseq.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.shuf/seed_sseq.pass.cpp @@ -28,7 +28,9 @@ test1() assert(e1 == e2); } -int main() +int main(int, char**) { test1(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.shuf/values.pass.cpp b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.shuf/values.pass.cpp index 8f9e52442a962..d98fdf58a82d9 100644 --- a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.shuf/values.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.shuf/values.pass.cpp @@ -44,7 +44,9 @@ test1() where(E::table_size); } -int main() +int main(int, char**) { test1(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.device/ctor.pass.cpp b/libcxx/test/std/numerics/rand/rand.device/ctor.pass.cpp index c9838f681448d..24e372795f05f 100644 --- a/libcxx/test/std/numerics/rand/rand.device/ctor.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.device/ctor.pass.cpp @@ -62,7 +62,7 @@ void check_random_device_invalid(const std::string &token) { } -int main() { +int main(int, char**) { { std::random_device r; } @@ -99,4 +99,6 @@ int main() { std::random_device r; } #endif // !defined(_WIN32) + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.device/entropy.pass.cpp b/libcxx/test/std/numerics/rand/rand.device/entropy.pass.cpp index 3819713774332..539c238ba3a48 100644 --- a/libcxx/test/std/numerics/rand/rand.device/entropy.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.device/entropy.pass.cpp @@ -15,9 +15,11 @@ #include #include -int main() +int main(int, char**) { std::random_device r; double e = r.entropy(); ((void)e); // Prevent unused warning + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.device/eval.pass.cpp b/libcxx/test/std/numerics/rand/rand.device/eval.pass.cpp index b5b8aa11fd526..4b68282f77c00 100644 --- a/libcxx/test/std/numerics/rand/rand.device/eval.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.device/eval.pass.cpp @@ -26,7 +26,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { { std::random_device r; @@ -45,4 +45,6 @@ int main() { } #endif + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/nothing_to_do.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/nothing_to_do.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/nothing_to_do.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/nothing_to_do.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bernoulli/assign.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bernoulli/assign.pass.cpp index bbd200d21c975..5ed93470d030a 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bernoulli/assign.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bernoulli/assign.pass.cpp @@ -26,7 +26,9 @@ test1() assert(d1 == d2); } -int main() +int main(int, char**) { test1(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bernoulli/copy.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bernoulli/copy.pass.cpp index bf4291cec18f7..e3d866ad46168 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bernoulli/copy.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bernoulli/copy.pass.cpp @@ -24,7 +24,9 @@ test1() assert(d1 == d2); } -int main() +int main(int, char**) { test1(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bernoulli/ctor_double.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bernoulli/ctor_double.pass.cpp index 1d9a22d1e7ddf..a8f76bb232491 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bernoulli/ctor_double.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bernoulli/ctor_double.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::bernoulli_distribution D; @@ -32,4 +32,6 @@ int main() D d(0.75); assert(d.p() == 0.75); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bernoulli/ctor_param.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bernoulli/ctor_param.pass.cpp index 5543f40732235..a568cb2b78a03 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bernoulli/ctor_param.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bernoulli/ctor_param.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::bernoulli_distribution D; @@ -24,4 +24,6 @@ int main() D d(p); assert(d.p() == 0.25); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bernoulli/eq.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bernoulli/eq.pass.cpp index faa683d4db8a6..24babc11829fa 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bernoulli/eq.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bernoulli/eq.pass.cpp @@ -18,7 +18,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::bernoulli_distribution D; @@ -32,4 +32,6 @@ int main() D d2(.25); assert(d1 != d2); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bernoulli/eval.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bernoulli/eval.pass.cpp index a16d524750894..e28c39099f88f 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bernoulli/eval.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bernoulli/eval.pass.cpp @@ -26,7 +26,7 @@ sqr(T x) return x * x; } -int main() +int main(int, char**) { { typedef std::bernoulli_distribution D; @@ -100,4 +100,6 @@ int main() assert(std::abs((skew - x_skew) / x_skew) < 0.01); assert(std::abs((kurtosis - x_kurtosis) / x_kurtosis) < 0.02); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bernoulli/eval_param.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bernoulli/eval_param.pass.cpp index 6d83410d83eee..bf1d1174337cc 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bernoulli/eval_param.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bernoulli/eval_param.pass.cpp @@ -26,7 +26,7 @@ sqr(T x) return x * x; } -int main() +int main(int, char**) { { typedef std::bernoulli_distribution D; @@ -104,4 +104,6 @@ int main() assert(std::abs((skew - x_skew) / x_skew) < 0.01); assert(std::abs((kurtosis - x_kurtosis) / x_kurtosis) < 0.02); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bernoulli/get_param.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bernoulli/get_param.pass.cpp index d24316d878c7e..0e960d6acbadf 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bernoulli/get_param.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bernoulli/get_param.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::bernoulli_distribution D; @@ -24,4 +24,6 @@ int main() D d(p); assert(d.param() == p); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bernoulli/io.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bernoulli/io.pass.cpp index 5107e900604dc..7c7829796d8f5 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bernoulli/io.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bernoulli/io.pass.cpp @@ -24,7 +24,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::bernoulli_distribution D; @@ -36,4 +36,6 @@ int main() is >> d2; assert(d1 == d2); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bernoulli/max.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bernoulli/max.pass.cpp index acb1ada865b34..6f4ac7e3d4758 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bernoulli/max.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bernoulli/max.pass.cpp @@ -15,11 +15,13 @@ #include #include -int main() +int main(int, char**) { { typedef std::bernoulli_distribution D; D d(.25); assert(d.max() == true); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bernoulli/min.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bernoulli/min.pass.cpp index 626f014b82c90..8c369dbf82809 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bernoulli/min.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bernoulli/min.pass.cpp @@ -15,11 +15,13 @@ #include #include -int main() +int main(int, char**) { { typedef std::bernoulli_distribution D; D d(.5); assert(d.min() == false); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bernoulli/param_assign.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bernoulli/param_assign.pass.cpp index f8ea5be59d114..b4fcd04ecfc34 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bernoulli/param_assign.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bernoulli/param_assign.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::bernoulli_distribution D; @@ -26,4 +26,6 @@ int main() p = p0; assert(p.p() == .7); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bernoulli/param_copy.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bernoulli/param_copy.pass.cpp index 91a8bacb7f86f..96ddd4bc4a9c5 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bernoulli/param_copy.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bernoulli/param_copy.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::bernoulli_distribution D; @@ -25,4 +25,6 @@ int main() param_type p = p0; assert(p.p() == .125); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bernoulli/param_ctor.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bernoulli/param_ctor.pass.cpp index cf1b7d391af50..612e6c6860ce3 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bernoulli/param_ctor.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bernoulli/param_ctor.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::bernoulli_distribution D; @@ -30,4 +30,6 @@ int main() param_type p(0.25); assert(p.p() == 0.25); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bernoulli/param_eq.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bernoulli/param_eq.pass.cpp index b41a8f7785ac2..cde5611ec37d8 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bernoulli/param_eq.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bernoulli/param_eq.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::bernoulli_distribution D; @@ -32,4 +32,6 @@ int main() param_type p2(0.5); assert(p1 != p2); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bernoulli/param_types.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bernoulli/param_types.pass.cpp index a8d6ba15fac8b..e1d9532f019ff 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bernoulli/param_types.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bernoulli/param_types.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::bernoulli_distribution D; @@ -23,4 +23,6 @@ int main() typedef param_type::distribution_type distribution_type; static_assert((std::is_same::value), ""); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bernoulli/set_param.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bernoulli/set_param.pass.cpp index 55af455973c2a..03e3d8a8c78d6 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bernoulli/set_param.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bernoulli/set_param.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::bernoulli_distribution D; @@ -25,4 +25,6 @@ int main() d.param(p); assert(d.param() == p); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bernoulli/types.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bernoulli/types.pass.cpp index 0be93b4b0d5e2..539b809b068a8 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bernoulli/types.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bernoulli/types.pass.cpp @@ -15,11 +15,13 @@ #include #include -int main() +int main(int, char**) { { typedef std::bernoulli_distribution D; typedef D::result_type result_type; static_assert((std::is_same::value), ""); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bin/assign.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bin/assign.pass.cpp index 746a35fb54a5a..e997198adb6e9 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bin/assign.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bin/assign.pass.cpp @@ -27,7 +27,9 @@ test1() assert(d1 == d2); } -int main() +int main(int, char**) { test1(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bin/copy.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bin/copy.pass.cpp index f66192938482b..2c2b65c9441a8 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bin/copy.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bin/copy.pass.cpp @@ -25,7 +25,9 @@ test1() assert(d1 == d2); } -int main() +int main(int, char**) { test1(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bin/ctor_int_double.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bin/ctor_int_double.pass.cpp index f9ff59cd487fd..26a6e3a6622b8 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bin/ctor_int_double.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bin/ctor_int_double.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::binomial_distribution<> D; @@ -36,4 +36,6 @@ int main() assert(d.t() == 3); assert(d.p() == 0.75); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bin/ctor_param.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bin/ctor_param.pass.cpp index 569ec41c39ddc..fa69b91237ac8 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bin/ctor_param.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bin/ctor_param.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::binomial_distribution<> D; @@ -26,4 +26,6 @@ int main() assert(d.t() == 5); assert(d.p() == 0.25); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bin/eq.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bin/eq.pass.cpp index b6c8aeb4a2470..dbe086ad4c726 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bin/eq.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bin/eq.pass.cpp @@ -19,7 +19,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::binomial_distribution<> D; @@ -39,4 +39,6 @@ int main() D d2(4, .25); assert(d1 != d2); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bin/eval.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bin/eval.pass.cpp index 06f16c25777e8..fea71ccb87614 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bin/eval.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bin/eval.pass.cpp @@ -506,7 +506,7 @@ test11() // assert(kurtosis == x_kurtosis); } -int main() +int main(int, char**) { test1(); test2(); @@ -519,4 +519,6 @@ int main() test9(); test10(); test11(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bin/eval_param.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bin/eval_param.pass.cpp index 78a9e6e3b04bc..cd4d006787817 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bin/eval_param.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bin/eval_param.pass.cpp @@ -28,7 +28,7 @@ sqr(T x) return x * x; } -int main() +int main(int, char**) { { typedef std::binomial_distribution<> D; @@ -156,4 +156,6 @@ int main() assert(std::abs((skew - x_skew) / x_skew) < 0.04); assert(std::abs((kurtosis - x_kurtosis) / x_kurtosis) < 0.3); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bin/get_param.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bin/get_param.pass.cpp index 304a6b61a621b..a3ba48f55832e 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bin/get_param.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bin/get_param.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::binomial_distribution<> D; @@ -25,4 +25,6 @@ int main() D d(p); assert(d.param() == p); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bin/io.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bin/io.pass.cpp index 90eeb394c5d0e..cb272152a3bae 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bin/io.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bin/io.pass.cpp @@ -25,7 +25,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::binomial_distribution<> D; @@ -37,4 +37,6 @@ int main() is >> d2; assert(d1 == d2); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bin/max.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bin/max.pass.cpp index 946e7ed93c3a4..c8ca662b630ec 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bin/max.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bin/max.pass.cpp @@ -16,11 +16,13 @@ #include #include -int main() +int main(int, char**) { { typedef std::binomial_distribution<> D; D d(4, .25); assert(d.max() == 4); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bin/min.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bin/min.pass.cpp index c6ac01110b453..ce793f67b7f53 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bin/min.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bin/min.pass.cpp @@ -16,11 +16,13 @@ #include #include -int main() +int main(int, char**) { { typedef std::binomial_distribution<> D; D d(4, .5); assert(d.min() == 0); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bin/param_assign.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bin/param_assign.pass.cpp index 24250bbcea997..069d6e440b85a 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bin/param_assign.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bin/param_assign.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::binomial_distribution<> D; @@ -28,4 +28,6 @@ int main() assert(p.t() == 6); assert(p.p() == .7); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bin/param_copy.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bin/param_copy.pass.cpp index 9445502ed0279..f2b78e6d8f4d0 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bin/param_copy.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bin/param_copy.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::binomial_distribution<> D; @@ -27,4 +27,6 @@ int main() assert(p.t() == 10); assert(p.p() == .125); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bin/param_ctor.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bin/param_ctor.pass.cpp index 2a7f92843798c..8ba09a681b2a5 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bin/param_ctor.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bin/param_ctor.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::binomial_distribution<> D; @@ -40,4 +40,6 @@ int main() assert(p.t() == 10); assert(p.p() == 0.25); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bin/param_eq.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bin/param_eq.pass.cpp index 0e705adcf6f0f..0ba4381ad185b 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bin/param_eq.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bin/param_eq.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::binomial_distribution<> D; @@ -33,4 +33,6 @@ int main() param_type p2(3, 0.5); assert(p1 != p2); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bin/param_types.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bin/param_types.pass.cpp index 4e95286f37d23..ba94d412a9f39 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bin/param_types.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bin/param_types.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::binomial_distribution<> D; @@ -24,4 +24,6 @@ int main() typedef param_type::distribution_type distribution_type; static_assert((std::is_same::value), ""); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bin/set_param.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bin/set_param.pass.cpp index 66f1d875d5097..ec82a93ffc07d 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bin/set_param.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bin/set_param.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::binomial_distribution<> D; @@ -26,4 +26,6 @@ int main() d.param(p); assert(d.param() == p); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bin/types.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bin/types.pass.cpp index 60f8114990677..c52681a1354ec 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bin/types.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bin/types.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::binomial_distribution<> D; @@ -28,4 +28,6 @@ int main() typedef D::result_type result_type; static_assert((std::is_same::value), ""); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.geo/assign.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.geo/assign.pass.cpp index 99d7a6dc138f8..ae49feb3e3d4b 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.geo/assign.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.geo/assign.pass.cpp @@ -27,7 +27,9 @@ test1() assert(d1 == d2); } -int main() +int main(int, char**) { test1(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.geo/copy.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.geo/copy.pass.cpp index ea83185e5989b..73ff6d68f9546 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.geo/copy.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.geo/copy.pass.cpp @@ -25,7 +25,9 @@ test1() assert(d1 == d2); } -int main() +int main(int, char**) { test1(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.geo/ctor_double.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.geo/ctor_double.pass.cpp index f099589c8a4da..1d4388e4dc34b 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.geo/ctor_double.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.geo/ctor_double.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::geometric_distribution<> D; @@ -28,4 +28,6 @@ int main() D d(0.75); assert(d.p() == 0.75); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.geo/ctor_param.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.geo/ctor_param.pass.cpp index f682fb71c74a6..3bcebc36f80ff 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.geo/ctor_param.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.geo/ctor_param.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::geometric_distribution<> D; @@ -25,4 +25,6 @@ int main() D d(p); assert(d.p() == 0.25); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.geo/eq.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.geo/eq.pass.cpp index aa358fe74e14e..47ea0f282476e 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.geo/eq.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.geo/eq.pass.cpp @@ -19,7 +19,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::geometric_distribution<> D; @@ -33,4 +33,6 @@ int main() D d2(.25); assert(d1 != d2); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.geo/eval.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.geo/eval.pass.cpp index 4addb5e153bb8..46ec881219363 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.geo/eval.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.geo/eval.pass.cpp @@ -286,7 +286,7 @@ test6() assert(std::abs((kurtosis - x_kurtosis) / x_kurtosis) < 0.02); } -int main() +int main(int, char**) { test1(); test2(); @@ -294,4 +294,6 @@ int main() test4(); test5(); test6(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.geo/eval_param.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.geo/eval_param.pass.cpp index a3194c4d1236f..825fa3f5c4d52 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.geo/eval_param.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.geo/eval_param.pass.cpp @@ -28,7 +28,7 @@ sqr(T x) return x * x; } -int main() +int main(int, char**) { { typedef std::geometric_distribution<> D; @@ -156,4 +156,6 @@ int main() assert(std::abs((skew - x_skew) / x_skew) < 0.01); assert(std::abs((kurtosis - x_kurtosis) / x_kurtosis) < 0.02); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.geo/get_param.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.geo/get_param.pass.cpp index 2ef2406200e37..35679a8627e6f 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.geo/get_param.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.geo/get_param.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::geometric_distribution<> D; @@ -25,4 +25,6 @@ int main() D d(p); assert(d.param() == p); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.geo/io.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.geo/io.pass.cpp index fb419b4684938..36de49f78cfc4 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.geo/io.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.geo/io.pass.cpp @@ -25,7 +25,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::geometric_distribution<> D; @@ -37,4 +37,6 @@ int main() is >> d2; assert(d1 == d2); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.geo/max.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.geo/max.pass.cpp index 00a3780edc6d2..9e785da2eed78 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.geo/max.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.geo/max.pass.cpp @@ -16,11 +16,13 @@ #include #include -int main() +int main(int, char**) { { typedef std::geometric_distribution<> D; D d(.25); assert(d.max() == std::numeric_limits::max()); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.geo/min.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.geo/min.pass.cpp index ab9e964f0af77..63f69f25e2abb 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.geo/min.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.geo/min.pass.cpp @@ -16,11 +16,13 @@ #include #include -int main() +int main(int, char**) { { typedef std::geometric_distribution<> D; D d(.5); assert(d.min() == 0); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.geo/param_assign.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.geo/param_assign.pass.cpp index 0b6033d395b44..c88af2d68e1a0 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.geo/param_assign.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.geo/param_assign.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::geometric_distribution<> D; @@ -27,4 +27,6 @@ int main() p = p0; assert(p.p() == .7); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.geo/param_copy.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.geo/param_copy.pass.cpp index 92f9177673a02..117b98bc12972 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.geo/param_copy.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.geo/param_copy.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::geometric_distribution<> D; @@ -26,4 +26,6 @@ int main() param_type p = p0; assert(p.p() == .125); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.geo/param_ctor.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.geo/param_ctor.pass.cpp index 75a9b436d5488..71710228597d7 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.geo/param_ctor.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.geo/param_ctor.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::geometric_distribution<> D; @@ -31,4 +31,6 @@ int main() param_type p(0.25); assert(p.p() == 0.25); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.geo/param_eq.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.geo/param_eq.pass.cpp index 973491fd8ec06..a741f06f603b2 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.geo/param_eq.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.geo/param_eq.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::geometric_distribution<> D; @@ -33,4 +33,6 @@ int main() param_type p2(0.5); assert(p1 != p2); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.geo/param_types.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.geo/param_types.pass.cpp index bb80250a1b879..2f9efc268c923 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.geo/param_types.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.geo/param_types.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::geometric_distribution<> D; @@ -24,4 +24,6 @@ int main() typedef param_type::distribution_type distribution_type; static_assert((std::is_same::value), ""); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.geo/set_param.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.geo/set_param.pass.cpp index e66f9ace40fa7..74d49d5d8e2e9 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.geo/set_param.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.geo/set_param.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::geometric_distribution<> D; @@ -26,4 +26,6 @@ int main() d.param(p); assert(d.param() == p); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.geo/types.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.geo/types.pass.cpp index 528996f504120..a62b66134e7bc 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.geo/types.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.geo/types.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::geometric_distribution<> D; @@ -28,4 +28,6 @@ int main() typedef D::result_type result_type; static_assert((std::is_same::value), ""); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.negbin/assign.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.negbin/assign.pass.cpp index 8b6d1e5a55f65..20f7f9ffd10c8 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.negbin/assign.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.negbin/assign.pass.cpp @@ -27,7 +27,9 @@ test1() assert(d1 == d2); } -int main() +int main(int, char**) { test1(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.negbin/copy.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.negbin/copy.pass.cpp index 68c7703b27085..73ee12e430ba8 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.negbin/copy.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.negbin/copy.pass.cpp @@ -25,7 +25,9 @@ test1() assert(d1 == d2); } -int main() +int main(int, char**) { test1(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.negbin/ctor_int_double.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.negbin/ctor_int_double.pass.cpp index 3b18e806890ac..0b9418b7c26a3 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.negbin/ctor_int_double.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.negbin/ctor_int_double.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::negative_binomial_distribution<> D; @@ -36,4 +36,6 @@ int main() assert(d.k() == 3); assert(d.p() == 0.75); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.negbin/ctor_param.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.negbin/ctor_param.pass.cpp index 51b875da9688b..485a3ae98f9c6 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.negbin/ctor_param.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.negbin/ctor_param.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::negative_binomial_distribution<> D; @@ -26,4 +26,6 @@ int main() assert(d.k() == 5); assert(d.p() == 0.25); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.negbin/eq.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.negbin/eq.pass.cpp index 7fa43ae9ad7bb..b93084e479f43 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.negbin/eq.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.negbin/eq.pass.cpp @@ -19,7 +19,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::negative_binomial_distribution<> D; @@ -39,4 +39,6 @@ int main() D d2(4, .25); assert(d1 != d2); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.negbin/eval.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.negbin/eval.pass.cpp index 039403eea2f6e..4a8f78842466f 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.negbin/eval.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.negbin/eval.pass.cpp @@ -284,7 +284,7 @@ test6() assert(std::abs((kurtosis - x_kurtosis) / x_kurtosis) < 0.03); } -int main() +int main(int, char**) { test1(); test2(); @@ -292,4 +292,6 @@ int main() test4(); test5(); test6(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.negbin/eval_param.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.negbin/eval_param.pass.cpp index d1f6b62581a39..b99f6fb07e5f1 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.negbin/eval_param.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.negbin/eval_param.pass.cpp @@ -28,7 +28,7 @@ sqr(T x) return x * x; } -int main() +int main(int, char**) { { typedef std::negative_binomial_distribution<> D; @@ -156,4 +156,6 @@ int main() assert(std::abs((skew - x_skew) / x_skew) < 0.01); assert(std::abs((kurtosis - x_kurtosis) / x_kurtosis) < 0.03); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.negbin/get_param.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.negbin/get_param.pass.cpp index 0cfe69f0ee4c5..63fe3804315c5 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.negbin/get_param.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.negbin/get_param.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::negative_binomial_distribution<> D; @@ -25,4 +25,6 @@ int main() D d(p); assert(d.param() == p); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.negbin/io.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.negbin/io.pass.cpp index cb5ca473f5493..a26f199061748 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.negbin/io.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.negbin/io.pass.cpp @@ -25,7 +25,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::negative_binomial_distribution<> D; @@ -37,4 +37,6 @@ int main() is >> d2; assert(d1 == d2); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.negbin/max.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.negbin/max.pass.cpp index c5c1cc10676b4..3bc54a4be4d59 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.negbin/max.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.negbin/max.pass.cpp @@ -16,11 +16,13 @@ #include #include -int main() +int main(int, char**) { { typedef std::negative_binomial_distribution<> D; D d(4, .25); assert(d.max() == std::numeric_limits::max()); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.negbin/min.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.negbin/min.pass.cpp index 2dfa797ccc86a..b2354d77c0e35 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.negbin/min.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.negbin/min.pass.cpp @@ -16,11 +16,13 @@ #include #include -int main() +int main(int, char**) { { typedef std::negative_binomial_distribution<> D; D d(4, .5); assert(d.min() == 0); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.negbin/param_assign.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.negbin/param_assign.pass.cpp index d2e948771615a..7968b01e84360 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.negbin/param_assign.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.negbin/param_assign.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::negative_binomial_distribution<> D; @@ -28,4 +28,6 @@ int main() assert(p.k() == 6); assert(p.p() == .7); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.negbin/param_copy.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.negbin/param_copy.pass.cpp index ded91956961b4..b16818b26a483 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.negbin/param_copy.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.negbin/param_copy.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::negative_binomial_distribution<> D; @@ -27,4 +27,6 @@ int main() assert(p.k() == 10); assert(p.p() == .125); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.negbin/param_ctor.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.negbin/param_ctor.pass.cpp index 0fc228a32d159..ad7908d314c1c 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.negbin/param_ctor.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.negbin/param_ctor.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::negative_binomial_distribution<> D; @@ -40,4 +40,6 @@ int main() assert(p.k() == 10); assert(p.p() == 0.25); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.negbin/param_eq.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.negbin/param_eq.pass.cpp index d65fa544f7a8a..793b4361cd944 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.negbin/param_eq.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.negbin/param_eq.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::negative_binomial_distribution<> D; @@ -33,4 +33,6 @@ int main() param_type p2(3, 0.5); assert(p1 != p2); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.negbin/param_types.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.negbin/param_types.pass.cpp index 0ac9230ce02c1..c0164edc8faad 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.negbin/param_types.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.negbin/param_types.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::negative_binomial_distribution<> D; @@ -24,4 +24,6 @@ int main() typedef param_type::distribution_type distribution_type; static_assert((std::is_same::value), ""); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.negbin/set_param.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.negbin/set_param.pass.cpp index d785330a4e383..8971be5ee48b6 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.negbin/set_param.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.negbin/set_param.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::negative_binomial_distribution<> D; @@ -26,4 +26,6 @@ int main() d.param(p); assert(d.param() == p); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.negbin/types.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.negbin/types.pass.cpp index 6d2b75585b9cc..ea177377a8815 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.negbin/types.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.negbin/types.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::negative_binomial_distribution<> D; @@ -28,4 +28,6 @@ int main() typedef D::result_type result_type; static_assert((std::is_same::value), ""); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/nothing_to_do.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/nothing_to_do.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.cauchy/assign.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.cauchy/assign.pass.cpp index 66d5a7adeaa10..dfe8785ff9fb0 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.cauchy/assign.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.cauchy/assign.pass.cpp @@ -27,7 +27,9 @@ test1() assert(d1 == d2); } -int main() +int main(int, char**) { test1(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.cauchy/copy.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.cauchy/copy.pass.cpp index 3d7db5423b4d5..85511d161077b 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.cauchy/copy.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.cauchy/copy.pass.cpp @@ -25,7 +25,9 @@ test1() assert(d1 == d2); } -int main() +int main(int, char**) { test1(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.cauchy/ctor_double_double.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.cauchy/ctor_double_double.pass.cpp index eb4068c4b2e5a..f452b6e0bf377 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.cauchy/ctor_double_double.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.cauchy/ctor_double_double.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::cauchy_distribution<> D; @@ -36,4 +36,6 @@ int main() assert(d.a() == 14.5); assert(d.b() == 5.25); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.cauchy/ctor_param.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.cauchy/ctor_param.pass.cpp index aedfbb5d3b62b..3a8ed3cc959fc 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.cauchy/ctor_param.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.cauchy/ctor_param.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::cauchy_distribution<> D; @@ -26,4 +26,6 @@ int main() assert(d.a() == 0.25); assert(d.b() == 10); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.cauchy/eq.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.cauchy/eq.pass.cpp index e4e29635697a0..bc42b94f9ec56 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.cauchy/eq.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.cauchy/eq.pass.cpp @@ -19,7 +19,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::cauchy_distribution<> D; @@ -33,4 +33,6 @@ int main() D d2(2.5, 4.5); assert(d1 != d2); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.cauchy/eval.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.cauchy/eval.pass.cpp index f578164bdef15..2b63645ae7d92 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.cauchy/eval.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.cauchy/eval.pass.cpp @@ -26,7 +26,7 @@ f(double x, double a, double b) return 1/3.1415926535897932 * std::atan((x - a)/b) + .5; } -int main() +int main(int, char**) { { typedef std::cauchy_distribution<> D; @@ -73,4 +73,6 @@ int main() for (int i = 0; i < N; ++i) assert(std::abs(f(u[i], a, b) - double(i)/N) < .001); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.cauchy/eval_param.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.cauchy/eval_param.pass.cpp index 450e19225632e..56921fe0fa729 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.cauchy/eval_param.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.cauchy/eval_param.pass.cpp @@ -26,7 +26,7 @@ f(double x, double a, double b) return 1/3.1415926535897932 * std::atan((x - a)/b) + .5; } -int main() +int main(int, char**) { { typedef std::cauchy_distribution<> D; @@ -79,4 +79,6 @@ int main() for (int i = 0; i < N; ++i) assert(std::abs(f(u[i], a, b) - double(i)/N) < .001); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.cauchy/get_param.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.cauchy/get_param.pass.cpp index 635d116eb0e04..c3c88b8d7e0ab 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.cauchy/get_param.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.cauchy/get_param.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::cauchy_distribution<> D; @@ -25,4 +25,6 @@ int main() D d(p); assert(d.param() == p); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.cauchy/io.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.cauchy/io.pass.cpp index 73a7e11aeb85b..db50cfd5c9383 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.cauchy/io.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.cauchy/io.pass.cpp @@ -25,7 +25,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::cauchy_distribution<> D; @@ -37,4 +37,6 @@ int main() is >> d2; assert(d1 == d2); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.cauchy/max.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.cauchy/max.pass.cpp index bfde51747e8fe..963e8ed379b86 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.cauchy/max.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.cauchy/max.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::cauchy_distribution<> D; @@ -24,4 +24,6 @@ int main() D::result_type m = d.max(); assert(m == INFINITY); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.cauchy/min.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.cauchy/min.pass.cpp index 2e2ba7db80302..59044b8e27268 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.cauchy/min.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.cauchy/min.pass.cpp @@ -16,11 +16,13 @@ #include #include -int main() +int main(int, char**) { { typedef std::cauchy_distribution<> D; D d(.5, .5); assert(d.min() == -INFINITY); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.cauchy/param_assign.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.cauchy/param_assign.pass.cpp index c2a7a04dcdb32..04d94e74db5fc 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.cauchy/param_assign.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.cauchy/param_assign.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::cauchy_distribution<> D; @@ -28,4 +28,6 @@ int main() assert(p.a() == .75); assert(p.b() == 6); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.cauchy/param_copy.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.cauchy/param_copy.pass.cpp index 0ee42ef64180a..88739df6827cd 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.cauchy/param_copy.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.cauchy/param_copy.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::cauchy_distribution<> D; @@ -27,4 +27,6 @@ int main() assert(p.a() == 10); assert(p.b() == .125); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.cauchy/param_ctor.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.cauchy/param_ctor.pass.cpp index 3c44670683da4..8563bafbb8c20 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.cauchy/param_ctor.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.cauchy/param_ctor.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::cauchy_distribution<> D; @@ -40,4 +40,6 @@ int main() assert(p.a() == 10); assert(p.b() == 5); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.cauchy/param_eq.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.cauchy/param_eq.pass.cpp index 12ce7de78a01a..97553701ecf00 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.cauchy/param_eq.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.cauchy/param_eq.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::cauchy_distribution<> D; @@ -33,4 +33,6 @@ int main() param_type p2(0.5, .5); assert(p1 != p2); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.cauchy/param_types.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.cauchy/param_types.pass.cpp index 327d1e7d63be6..ca0539c414059 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.cauchy/param_types.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.cauchy/param_types.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::cauchy_distribution<> D; @@ -24,4 +24,6 @@ int main() typedef param_type::distribution_type distribution_type; static_assert((std::is_same::value), ""); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.cauchy/set_param.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.cauchy/set_param.pass.cpp index 9b5b4af160bde..ba66ec16ab653 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.cauchy/set_param.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.cauchy/set_param.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::cauchy_distribution<> D; @@ -26,4 +26,6 @@ int main() d.param(p); assert(d.param() == p); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.cauchy/types.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.cauchy/types.pass.cpp index b88e6328ab226..09f79da51260e 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.cauchy/types.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.cauchy/types.pass.cpp @@ -18,7 +18,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::cauchy_distribution<> D; @@ -30,4 +30,6 @@ int main() typedef D::result_type result_type; static_assert((std::is_same::value), ""); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.chisq/assign.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.chisq/assign.pass.cpp index cd25b1929b04e..75242c2b9438d 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.chisq/assign.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.chisq/assign.pass.cpp @@ -27,7 +27,9 @@ test1() assert(d1 == d2); } -int main() +int main(int, char**) { test1(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.chisq/copy.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.chisq/copy.pass.cpp index c7881c686032f..3eeba40d01e50 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.chisq/copy.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.chisq/copy.pass.cpp @@ -25,7 +25,9 @@ test1() assert(d1 == d2); } -int main() +int main(int, char**) { test1(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.chisq/ctor_double.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.chisq/ctor_double.pass.cpp index 77279803e9fd4..a778b2face488 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.chisq/ctor_double.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.chisq/ctor_double.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::chi_squared_distribution<> D; @@ -28,4 +28,6 @@ int main() D d(14.5); assert(d.n() == 14.5); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.chisq/ctor_param.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.chisq/ctor_param.pass.cpp index 7cf8c7dfb5ad4..922e44f6116f9 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.chisq/ctor_param.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.chisq/ctor_param.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::chi_squared_distribution<> D; @@ -25,4 +25,6 @@ int main() D d(p); assert(d.n() == 0.25); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.chisq/eq.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.chisq/eq.pass.cpp index f26b78a79969a..8b9ad4574286c 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.chisq/eq.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.chisq/eq.pass.cpp @@ -19,7 +19,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::chi_squared_distribution<> D; @@ -33,4 +33,6 @@ int main() D d2(4.5); assert(d1 != d2); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.chisq/eval.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.chisq/eval.pass.cpp index 81f3359ebc5c4..b080886a8d16c 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.chisq/eval.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.chisq/eval.pass.cpp @@ -29,7 +29,7 @@ sqr(T x) return x * x; } -int main() +int main(int, char**) { { typedef std::chi_squared_distribution<> D; @@ -148,4 +148,6 @@ int main() assert(std::abs((skew - x_skew) / x_skew) < 0.01); assert(std::abs((kurtosis - x_kurtosis) / x_kurtosis) < 0.01); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.chisq/eval_param.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.chisq/eval_param.pass.cpp index 09a33327f4dc2..86ac86ed35084 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.chisq/eval_param.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.chisq/eval_param.pass.cpp @@ -29,7 +29,7 @@ sqr(T x) return x * x; } -int main() +int main(int, char**) { { typedef std::chi_squared_distribution<> D; @@ -154,4 +154,6 @@ int main() assert(std::abs((skew - x_skew) / x_skew) < 0.01); assert(std::abs((kurtosis - x_kurtosis) / x_kurtosis) < 0.01); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.chisq/get_param.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.chisq/get_param.pass.cpp index 0173fb3f41e5a..55fda0872c65b 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.chisq/get_param.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.chisq/get_param.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::chi_squared_distribution<> D; @@ -25,4 +25,6 @@ int main() D d(p); assert(d.param() == p); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.chisq/io.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.chisq/io.pass.cpp index fde2fecf009f4..1017861318f2a 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.chisq/io.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.chisq/io.pass.cpp @@ -25,7 +25,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::chi_squared_distribution<> D; @@ -37,4 +37,6 @@ int main() is >> d2; assert(d1 == d2); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.chisq/max.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.chisq/max.pass.cpp index d5b337f2c56aa..19ab87ca9e3b9 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.chisq/max.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.chisq/max.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::chi_squared_distribution<> D; @@ -24,4 +24,6 @@ int main() D::result_type m = d.max(); assert(m == INFINITY); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.chisq/min.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.chisq/min.pass.cpp index 54d800559c6a0..af5b4561728ba 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.chisq/min.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.chisq/min.pass.cpp @@ -16,11 +16,13 @@ #include #include -int main() +int main(int, char**) { { typedef std::chi_squared_distribution<> D; D d(.5); assert(d.min() == 0); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.chisq/param_assign.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.chisq/param_assign.pass.cpp index fa243f22c34ed..0b13690f2b0f3 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.chisq/param_assign.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.chisq/param_assign.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::chi_squared_distribution<> D; @@ -27,4 +27,6 @@ int main() p = p0; assert(p.n() == .75); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.chisq/param_copy.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.chisq/param_copy.pass.cpp index c73f93a321f1f..22fe4b4ec306a 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.chisq/param_copy.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.chisq/param_copy.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::chi_squared_distribution<> D; @@ -26,4 +26,6 @@ int main() param_type p = p0; assert(p.n() == 10); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.chisq/param_ctor.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.chisq/param_ctor.pass.cpp index 34476f939f525..b3bbd8668a0a4 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.chisq/param_ctor.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.chisq/param_ctor.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::chi_squared_distribution<> D; @@ -31,4 +31,6 @@ int main() param_type p(10); assert(p.n() == 10); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.chisq/param_eq.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.chisq/param_eq.pass.cpp index e40f5d19f8f57..f615acad8c5e7 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.chisq/param_eq.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.chisq/param_eq.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::chi_squared_distribution<> D; @@ -33,4 +33,6 @@ int main() param_type p2(0.5); assert(p1 != p2); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.chisq/param_types.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.chisq/param_types.pass.cpp index 4ecb983b2424a..a6727c429fa79 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.chisq/param_types.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.chisq/param_types.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::chi_squared_distribution<> D; @@ -24,4 +24,6 @@ int main() typedef param_type::distribution_type distribution_type; static_assert((std::is_same::value), ""); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.chisq/set_param.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.chisq/set_param.pass.cpp index eecfbf2feee1c..d497407e1e0e7 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.chisq/set_param.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.chisq/set_param.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::chi_squared_distribution<> D; @@ -26,4 +26,6 @@ int main() d.param(p); assert(d.param() == p); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.chisq/types.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.chisq/types.pass.cpp index d211af8bbc8f9..e33551debf2ab 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.chisq/types.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.chisq/types.pass.cpp @@ -18,7 +18,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::chi_squared_distribution<> D; @@ -30,4 +30,6 @@ int main() typedef D::result_type result_type; static_assert((std::is_same::value), ""); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.f/assign.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.f/assign.pass.cpp index c7eb0f983b105..c73d46ccb0f3a 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.f/assign.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.f/assign.pass.cpp @@ -27,7 +27,9 @@ test1() assert(d1 == d2); } -int main() +int main(int, char**) { test1(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.f/copy.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.f/copy.pass.cpp index 6ef45d0d55af3..9a9670154b432 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.f/copy.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.f/copy.pass.cpp @@ -25,7 +25,9 @@ test1() assert(d1 == d2); } -int main() +int main(int, char**) { test1(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.f/ctor_double_double.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.f/ctor_double_double.pass.cpp index 8b5acf39993c8..b29664ee48638 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.f/ctor_double_double.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.f/ctor_double_double.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::fisher_f_distribution<> D; @@ -36,4 +36,6 @@ int main() assert(d.m() == 14.5); assert(d.n() == 5.25); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.f/ctor_param.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.f/ctor_param.pass.cpp index 2762c8dbb0fb3..3318d52229fe9 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.f/ctor_param.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.f/ctor_param.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::fisher_f_distribution<> D; @@ -26,4 +26,6 @@ int main() assert(d.m() == 0.25); assert(d.n() == 10); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.f/eq.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.f/eq.pass.cpp index ea040c9c62c2a..b91da051158df 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.f/eq.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.f/eq.pass.cpp @@ -19,7 +19,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::fisher_f_distribution<> D; @@ -33,4 +33,6 @@ int main() D d2(2.5, 4.5); assert(d1 != d2); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.f/eval.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.f/eval.pass.cpp index 55c8ccf1b0aba..9a4cdf175d222 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.f/eval.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.f/eval.pass.cpp @@ -45,7 +45,7 @@ f(double x, double m, double n) return I(m * x / (m*x + n), static_cast(m/2), static_cast(n/2)); } -int main() +int main(int, char**) { // Purposefully only testing even integral values of m and n (for now) { @@ -99,4 +99,6 @@ int main() for (int i = 0; i < N; ++i) assert(std::abs(f(u[i], d.m(), d.n()) - double(i)/N) < .01); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.f/eval_param.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.f/eval_param.pass.cpp index 13818e02600f2..59a19d57ed269 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.f/eval_param.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.f/eval_param.pass.cpp @@ -45,7 +45,7 @@ f(double x, double m, double n) return I(m * x / (m*x + n), static_cast(m/2), static_cast(n/2)); } -int main() +int main(int, char**) { // Purposefully only testing even integral values of m and n (for now) { @@ -105,4 +105,6 @@ int main() for (int i = 0; i < N; ++i) assert(std::abs(f(u[i], p.m(), p.n()) - double(i)/N) < .01); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.f/get_param.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.f/get_param.pass.cpp index 386696acec5a5..716d852dd10e5 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.f/get_param.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.f/get_param.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::fisher_f_distribution<> D; @@ -25,4 +25,6 @@ int main() D d(p); assert(d.param() == p); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.f/io.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.f/io.pass.cpp index c08d61e1d2459..870d086ccd650 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.f/io.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.f/io.pass.cpp @@ -25,7 +25,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::fisher_f_distribution<> D; @@ -37,4 +37,6 @@ int main() is >> d2; assert(d1 == d2); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.f/max.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.f/max.pass.cpp index 27bd09fc142d2..5e9c2968bd7c7 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.f/max.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.f/max.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::fisher_f_distribution<> D; @@ -24,4 +24,6 @@ int main() D::result_type m = d.max(); assert(m == INFINITY); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.f/min.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.f/min.pass.cpp index a3e382c7f9ace..8aca42d94e7ac 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.f/min.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.f/min.pass.cpp @@ -16,11 +16,13 @@ #include #include -int main() +int main(int, char**) { { typedef std::fisher_f_distribution<> D; D d(.5, .5); assert(d.min() == 0); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.f/param_assign.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.f/param_assign.pass.cpp index d026525e73258..3622aeb3933c7 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.f/param_assign.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.f/param_assign.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::fisher_f_distribution<> D; @@ -28,4 +28,6 @@ int main() assert(p.m() == .75); assert(p.n() == 6); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.f/param_copy.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.f/param_copy.pass.cpp index 21364a393e525..cc936174c3825 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.f/param_copy.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.f/param_copy.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::fisher_f_distribution<> D; @@ -27,4 +27,6 @@ int main() assert(p.m() == 10); assert(p.n() == .125); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.f/param_ctor.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.f/param_ctor.pass.cpp index 7adacd37b9061..b7bef507d08ea 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.f/param_ctor.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.f/param_ctor.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::fisher_f_distribution<> D; @@ -40,4 +40,6 @@ int main() assert(p.m() == 10); assert(p.n() == 5); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.f/param_eq.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.f/param_eq.pass.cpp index f4fb9bb9f65ea..1345723ec1b2d 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.f/param_eq.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.f/param_eq.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::fisher_f_distribution<> D; @@ -33,4 +33,6 @@ int main() param_type p2(0.5, .5); assert(p1 != p2); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.f/param_types.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.f/param_types.pass.cpp index 3a716bf7c8924..8fdb9fccfcc9a 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.f/param_types.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.f/param_types.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::fisher_f_distribution<> D; @@ -24,4 +24,6 @@ int main() typedef param_type::distribution_type distribution_type; static_assert((std::is_same::value), ""); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.f/set_param.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.f/set_param.pass.cpp index 9164f750fe04f..cad5deda3ca77 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.f/set_param.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.f/set_param.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::fisher_f_distribution<> D; @@ -26,4 +26,6 @@ int main() d.param(p); assert(d.param() == p); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.f/types.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.f/types.pass.cpp index ee96f34606673..567ed9f127371 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.f/types.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.f/types.pass.cpp @@ -18,7 +18,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::fisher_f_distribution<> D; @@ -30,4 +30,6 @@ int main() typedef D::result_type result_type; static_assert((std::is_same::value), ""); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.lognormal/assign.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.lognormal/assign.pass.cpp index 20157a2eda04c..567ae63b8a545 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.lognormal/assign.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.lognormal/assign.pass.cpp @@ -27,7 +27,9 @@ test1() assert(d1 == d2); } -int main() +int main(int, char**) { test1(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.lognormal/copy.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.lognormal/copy.pass.cpp index 4e73c9d220982..f27ea836a9912 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.lognormal/copy.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.lognormal/copy.pass.cpp @@ -25,7 +25,9 @@ test1() assert(d1 == d2); } -int main() +int main(int, char**) { test1(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.lognormal/ctor_double_double.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.lognormal/ctor_double_double.pass.cpp index d1116cca6e158..e19839f2a483a 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.lognormal/ctor_double_double.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.lognormal/ctor_double_double.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::lognormal_distribution<> D; @@ -36,4 +36,6 @@ int main() assert(d.m() == 14.5); assert(d.s() == 5.25); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.lognormal/ctor_param.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.lognormal/ctor_param.pass.cpp index f88d433059bf3..09ee798b8fd82 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.lognormal/ctor_param.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.lognormal/ctor_param.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::lognormal_distribution<> D; @@ -26,4 +26,6 @@ int main() assert(d.m() == 0.25); assert(d.s() == 10); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.lognormal/eq.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.lognormal/eq.pass.cpp index 627f57961207c..7257f57b1dcc9 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.lognormal/eq.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.lognormal/eq.pass.cpp @@ -19,7 +19,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::lognormal_distribution<> D; @@ -33,4 +33,6 @@ int main() D d2(2.5, 4.5); assert(d1 != d2); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.lognormal/eval.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.lognormal/eval.pass.cpp index bcbc04c32fbb6..90841754881c7 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.lognormal/eval.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.lognormal/eval.pass.cpp @@ -248,11 +248,13 @@ test5() assert(std::abs((kurtosis - x_kurtosis) / x_kurtosis) < 0.7); } -int main() +int main(int, char**) { test1(); test2(); test3(); test4(); test5(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.lognormal/eval_param.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.lognormal/eval_param.pass.cpp index 350a32587635e..1c40e66b224f5 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.lognormal/eval_param.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.lognormal/eval_param.pass.cpp @@ -258,11 +258,13 @@ test5() assert(std::abs((kurtosis - x_kurtosis) / x_kurtosis) < 0.7); } -int main() +int main(int, char**) { test1(); test2(); test3(); test4(); test5(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.lognormal/get_param.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.lognormal/get_param.pass.cpp index a553901fe2f13..e56cae65b364a 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.lognormal/get_param.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.lognormal/get_param.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::lognormal_distribution<> D; @@ -25,4 +25,6 @@ int main() D d(p); assert(d.param() == p); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.lognormal/io.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.lognormal/io.pass.cpp index 10ee0e8200376..204a8f5f3b2d8 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.lognormal/io.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.lognormal/io.pass.cpp @@ -25,7 +25,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::lognormal_distribution<> D; @@ -37,4 +37,6 @@ int main() is >> d2; assert(d1 == d2); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.lognormal/max.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.lognormal/max.pass.cpp index 815db8a8935fc..2297a4160d340 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.lognormal/max.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.lognormal/max.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::lognormal_distribution<> D; @@ -24,4 +24,6 @@ int main() D::result_type m = d.max(); assert(m == INFINITY); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.lognormal/min.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.lognormal/min.pass.cpp index d199cc0b99902..84154865b93ce 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.lognormal/min.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.lognormal/min.pass.cpp @@ -16,11 +16,13 @@ #include #include -int main() +int main(int, char**) { { typedef std::lognormal_distribution<> D; D d(.5, .5); assert(d.min() == 0); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.lognormal/param_assign.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.lognormal/param_assign.pass.cpp index 3597e6d470fcf..9999b8499f04a 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.lognormal/param_assign.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.lognormal/param_assign.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::lognormal_distribution<> D; @@ -28,4 +28,6 @@ int main() assert(p.m() == .75); assert(p.s() == 6); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.lognormal/param_copy.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.lognormal/param_copy.pass.cpp index a0657ce5cca2c..6ad49592fb191 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.lognormal/param_copy.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.lognormal/param_copy.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::lognormal_distribution<> D; @@ -27,4 +27,6 @@ int main() assert(p.m() == 10); assert(p.s() == .125); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.lognormal/param_ctor.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.lognormal/param_ctor.pass.cpp index cd533afd87785..cb1735b790f69 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.lognormal/param_ctor.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.lognormal/param_ctor.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::lognormal_distribution<> D; @@ -40,4 +40,6 @@ int main() assert(p.m() == 10); assert(p.s() == 5); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.lognormal/param_eq.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.lognormal/param_eq.pass.cpp index 8e4cd9a6ffa52..a6be4db10ad2e 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.lognormal/param_eq.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.lognormal/param_eq.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::lognormal_distribution<> D; @@ -33,4 +33,6 @@ int main() param_type p2(0.5, .5); assert(p1 != p2); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.lognormal/param_types.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.lognormal/param_types.pass.cpp index 7f2b726b14767..99f13be070ca4 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.lognormal/param_types.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.lognormal/param_types.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::lognormal_distribution<> D; @@ -24,4 +24,6 @@ int main() typedef param_type::distribution_type distribution_type; static_assert((std::is_same::value), ""); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.lognormal/set_param.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.lognormal/set_param.pass.cpp index bc67664b0e5c3..9924757177d66 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.lognormal/set_param.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.lognormal/set_param.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::lognormal_distribution<> D; @@ -26,4 +26,6 @@ int main() d.param(p); assert(d.param() == p); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.lognormal/types.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.lognormal/types.pass.cpp index ae8b59b661517..6bff26088a05a 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.lognormal/types.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.lognormal/types.pass.cpp @@ -18,7 +18,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::lognormal_distribution<> D; @@ -30,4 +30,6 @@ int main() typedef D::result_type result_type; static_assert((std::is_same::value), ""); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.normal/assign.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.normal/assign.pass.cpp index 77c3cfbe2dae2..492a0ea6aefd8 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.normal/assign.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.normal/assign.pass.cpp @@ -27,7 +27,9 @@ test1() assert(d1 == d2); } -int main() +int main(int, char**) { test1(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.normal/copy.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.normal/copy.pass.cpp index fa130e4c9a86d..f2326bbc34332 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.normal/copy.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.normal/copy.pass.cpp @@ -25,7 +25,9 @@ test1() assert(d1 == d2); } -int main() +int main(int, char**) { test1(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.normal/ctor_double_double.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.normal/ctor_double_double.pass.cpp index 5081372829bd1..2c4462f252a1d 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.normal/ctor_double_double.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.normal/ctor_double_double.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::normal_distribution<> D; @@ -36,4 +36,6 @@ int main() assert(d.mean() == 14.5); assert(d.stddev() == 5.25); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.normal/ctor_param.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.normal/ctor_param.pass.cpp index bdb5c69f65895..66331187c52fc 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.normal/ctor_param.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.normal/ctor_param.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::normal_distribution<> D; @@ -26,4 +26,6 @@ int main() assert(d.mean() == 0.25); assert(d.stddev() == 10); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.normal/eq.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.normal/eq.pass.cpp index ff62af2804860..87b7c4d7d0d58 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.normal/eq.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.normal/eq.pass.cpp @@ -19,7 +19,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::normal_distribution<> D; @@ -33,4 +33,6 @@ int main() D d2(2.5, 4.5); assert(d1 != d2); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.normal/eval.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.normal/eval.pass.cpp index b2cf8534d921c..5362aef09f80e 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.normal/eval.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.normal/eval.pass.cpp @@ -29,7 +29,7 @@ sqr(T x) return x * x; } -int main() +int main(int, char**) { { typedef std::normal_distribution<> D; @@ -66,4 +66,6 @@ int main() assert(std::abs(skew - x_skew) < 0.01); assert(std::abs(kurtosis - x_kurtosis) < 0.01); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.normal/eval_param.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.normal/eval_param.pass.cpp index 55f0c8180e6cd..343bdd7dc6f7c 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.normal/eval_param.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.normal/eval_param.pass.cpp @@ -29,7 +29,7 @@ sqr(T x) return x * x; } -int main() +int main(int, char**) { { typedef std::normal_distribution<> D; @@ -68,4 +68,6 @@ int main() assert(std::abs(skew - x_skew) < 0.01); assert(std::abs(kurtosis - x_kurtosis) < 0.01); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.normal/get_param.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.normal/get_param.pass.cpp index f173955013f5a..a293371069b4a 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.normal/get_param.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.normal/get_param.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::normal_distribution<> D; @@ -25,4 +25,6 @@ int main() D d(p); assert(d.param() == p); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.normal/io.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.normal/io.pass.cpp index 765c451878974..601f8d58014b9 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.normal/io.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.normal/io.pass.cpp @@ -25,7 +25,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::normal_distribution<> D; @@ -37,4 +37,6 @@ int main() is >> d2; assert(d1 == d2); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.normal/max.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.normal/max.pass.cpp index 9218cfa8359b4..24adfc05c7ca1 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.normal/max.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.normal/max.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::normal_distribution<> D; @@ -24,4 +24,6 @@ int main() D::result_type m = d.max(); assert(m == INFINITY); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.normal/min.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.normal/min.pass.cpp index 1ec4564252772..0e2c27a183e3f 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.normal/min.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.normal/min.pass.cpp @@ -16,11 +16,13 @@ #include #include -int main() +int main(int, char**) { { typedef std::normal_distribution<> D; D d(.5, .5); assert(d.min() == -INFINITY); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.normal/param_assign.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.normal/param_assign.pass.cpp index 08195232ebaee..4a37869230bd6 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.normal/param_assign.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.normal/param_assign.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::normal_distribution<> D; @@ -28,4 +28,6 @@ int main() assert(p.mean() == .75); assert(p.stddev() == 6); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.normal/param_copy.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.normal/param_copy.pass.cpp index cc16ec7e3c1dd..7ae72e6dfd229 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.normal/param_copy.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.normal/param_copy.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::normal_distribution<> D; @@ -27,4 +27,6 @@ int main() assert(p.mean() == 10); assert(p.stddev() == .125); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.normal/param_ctor.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.normal/param_ctor.pass.cpp index f58fd3b5aea5a..e947060e52098 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.normal/param_ctor.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.normal/param_ctor.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::normal_distribution<> D; @@ -40,4 +40,6 @@ int main() assert(p.mean() == 10); assert(p.stddev() == 5); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.normal/param_eq.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.normal/param_eq.pass.cpp index 859dba8a4a612..cf7fa39cf31bd 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.normal/param_eq.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.normal/param_eq.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::normal_distribution<> D; @@ -33,4 +33,6 @@ int main() param_type p2(0.5, .5); assert(p1 != p2); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.normal/param_types.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.normal/param_types.pass.cpp index ef88be7996ed3..2fef65e8c2946 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.normal/param_types.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.normal/param_types.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::normal_distribution<> D; @@ -24,4 +24,6 @@ int main() typedef param_type::distribution_type distribution_type; static_assert((std::is_same::value), ""); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.normal/set_param.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.normal/set_param.pass.cpp index 7b4e9ca4b1c01..46f1cb2ee0596 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.normal/set_param.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.normal/set_param.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::normal_distribution<> D; @@ -26,4 +26,6 @@ int main() d.param(p); assert(d.param() == p); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.normal/types.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.normal/types.pass.cpp index 754e2c28dd291..f532786c9d8d0 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.normal/types.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.normal/types.pass.cpp @@ -18,7 +18,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::normal_distribution<> D; @@ -30,4 +30,6 @@ int main() typedef D::result_type result_type; static_assert((std::is_same::value), ""); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.t/assign.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.t/assign.pass.cpp index e2566347ea376..bb6ced5e8875d 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.t/assign.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.t/assign.pass.cpp @@ -27,7 +27,9 @@ test1() assert(d1 == d2); } -int main() +int main(int, char**) { test1(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.t/copy.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.t/copy.pass.cpp index 0f64eb7cc62ea..a6aa61180fa96 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.t/copy.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.t/copy.pass.cpp @@ -25,7 +25,9 @@ test1() assert(d1 == d2); } -int main() +int main(int, char**) { test1(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.t/ctor_double.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.t/ctor_double.pass.cpp index 88827fee4d3f2..a133ff30c622b 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.t/ctor_double.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.t/ctor_double.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::student_t_distribution<> D; @@ -28,4 +28,6 @@ int main() D d(14.5); assert(d.n() == 14.5); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.t/ctor_param.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.t/ctor_param.pass.cpp index ba286242ce317..be11e9224c16c 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.t/ctor_param.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.t/ctor_param.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::student_t_distribution<> D; @@ -25,4 +25,6 @@ int main() D d(p); assert(d.n() == 0.25); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.t/eq.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.t/eq.pass.cpp index e513658138ab6..2de6ca5513bd8 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.t/eq.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.t/eq.pass.cpp @@ -19,7 +19,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::student_t_distribution<> D; @@ -33,4 +33,6 @@ int main() D d2(4.5); assert(d1 != d2); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.t/eval.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.t/eval.pass.cpp index d8b3783e9e3ad..bb1630ea44df1 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.t/eval.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.t/eval.pass.cpp @@ -28,7 +28,7 @@ sqr(T x) return x * x; } -int main() +int main(int, char**) { { typedef std::student_t_distribution<> D; @@ -135,4 +135,6 @@ int main() assert(std::abs(skew - x_skew) < 0.01); assert(std::abs((kurtosis - x_kurtosis) / x_kurtosis) < 0.02); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.t/eval_param.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.t/eval_param.pass.cpp index cb47b07a6d0f6..3b939010a99ab 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.t/eval_param.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.t/eval_param.pass.cpp @@ -28,7 +28,7 @@ sqr(T x) return x * x; } -int main() +int main(int, char**) { { typedef std::student_t_distribution<> D; @@ -141,4 +141,6 @@ int main() assert(std::abs(skew - x_skew) < 0.01); assert(std::abs((kurtosis - x_kurtosis) / x_kurtosis) < 0.02); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.t/get_param.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.t/get_param.pass.cpp index f1cd34de749fd..170aed3dbec4a 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.t/get_param.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.t/get_param.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::student_t_distribution<> D; @@ -25,4 +25,6 @@ int main() D d(p); assert(d.param() == p); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.t/io.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.t/io.pass.cpp index 8fb8381daf97b..60f9a6fb3ffc9 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.t/io.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.t/io.pass.cpp @@ -25,7 +25,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::student_t_distribution<> D; @@ -37,4 +37,6 @@ int main() is >> d2; assert(d1 == d2); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.t/max.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.t/max.pass.cpp index f64207c4063ab..f2fe365443b73 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.t/max.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.t/max.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::student_t_distribution<> D; @@ -24,4 +24,6 @@ int main() D::result_type m = d.max(); assert(m == INFINITY); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.t/min.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.t/min.pass.cpp index 8f6d4f65b0c1f..ab98be4504f64 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.t/min.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.t/min.pass.cpp @@ -16,11 +16,13 @@ #include #include -int main() +int main(int, char**) { { typedef std::student_t_distribution<> D; D d(.5); assert(d.min() == -INFINITY); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.t/param_assign.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.t/param_assign.pass.cpp index 25137f9c136b2..54e9313ae677d 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.t/param_assign.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.t/param_assign.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::student_t_distribution<> D; @@ -27,4 +27,6 @@ int main() p = p0; assert(p.n() == .75); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.t/param_copy.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.t/param_copy.pass.cpp index b207d7dec3b04..a27a735ca41a8 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.t/param_copy.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.t/param_copy.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::student_t_distribution<> D; @@ -26,4 +26,6 @@ int main() param_type p = p0; assert(p.n() == 10); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.t/param_ctor.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.t/param_ctor.pass.cpp index bcaac8774e2c2..897a3e3cff482 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.t/param_ctor.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.t/param_ctor.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::student_t_distribution<> D; @@ -31,4 +31,6 @@ int main() param_type p(10); assert(p.n() == 10); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.t/param_eq.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.t/param_eq.pass.cpp index eea4cc99bd8db..cd3a04a341e15 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.t/param_eq.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.t/param_eq.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::student_t_distribution<> D; @@ -33,4 +33,6 @@ int main() param_type p2(0.5); assert(p1 != p2); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.t/param_types.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.t/param_types.pass.cpp index b064d111ce333..1acecc1d11032 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.t/param_types.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.t/param_types.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::student_t_distribution<> D; @@ -24,4 +24,6 @@ int main() typedef param_type::distribution_type distribution_type; static_assert((std::is_same::value), ""); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.t/set_param.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.t/set_param.pass.cpp index 2b451681114d6..85c6a3cb1cda3 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.t/set_param.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.t/set_param.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::student_t_distribution<> D; @@ -26,4 +26,6 @@ int main() d.param(p); assert(d.param() == p); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.t/types.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.t/types.pass.cpp index c9fc1aaccdaa5..f89da9f9ede58 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.t/types.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.t/types.pass.cpp @@ -18,7 +18,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::student_t_distribution<> D; @@ -30,4 +30,6 @@ int main() typedef D::result_type result_type; static_assert((std::is_same::value), ""); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/nothing_to_do.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/nothing_to_do.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.exp/assign.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.exp/assign.pass.cpp index 8ce712a54694f..bfee1f279ad84 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.exp/assign.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.exp/assign.pass.cpp @@ -27,7 +27,9 @@ test1() assert(d1 == d2); } -int main() +int main(int, char**) { test1(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.exp/copy.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.exp/copy.pass.cpp index df5b00fb8bc94..41119b4fefc3c 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.exp/copy.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.exp/copy.pass.cpp @@ -25,7 +25,9 @@ test1() assert(d1 == d2); } -int main() +int main(int, char**) { test1(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.exp/ctor_double.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.exp/ctor_double.pass.cpp index 479f221e0374a..530d7de9a93cf 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.exp/ctor_double.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.exp/ctor_double.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::exponential_distribution<> D; @@ -28,4 +28,6 @@ int main() D d(3.5); assert(d.lambda() == 3.5); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.exp/ctor_param.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.exp/ctor_param.pass.cpp index 31926e520ed0f..174e91f8f3112 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.exp/ctor_param.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.exp/ctor_param.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::exponential_distribution<> D; @@ -25,4 +25,6 @@ int main() D d(p); assert(d.lambda() == 0.25); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.exp/eq.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.exp/eq.pass.cpp index 27841184cc1df..609f226a54000 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.exp/eq.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.exp/eq.pass.cpp @@ -19,7 +19,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::exponential_distribution<> D; @@ -33,4 +33,6 @@ int main() D d2(.25); assert(d1 != d2); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.exp/eval.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.exp/eval.pass.cpp index db71f9c905b01..bfe7e8da385a5 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.exp/eval.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.exp/eval.pass.cpp @@ -29,7 +29,7 @@ sqr(T x) return x * x; } -int main() +int main(int, char**) { { typedef std::exponential_distribution<> D; @@ -148,4 +148,6 @@ int main() assert(std::abs((skew - x_skew) / x_skew) < 0.01); assert(std::abs((kurtosis - x_kurtosis) / x_kurtosis) < 0.01); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.exp/eval_param.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.exp/eval_param.pass.cpp index 28f6e6d78ac12..00054a76e68f3 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.exp/eval_param.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.exp/eval_param.pass.cpp @@ -29,7 +29,7 @@ sqr(T x) return x * x; } -int main() +int main(int, char**) { { typedef std::exponential_distribution<> D; @@ -72,4 +72,6 @@ int main() assert(std::abs((skew - x_skew) / x_skew) < 0.01); assert(std::abs((kurtosis - x_kurtosis) / x_kurtosis) < 0.01); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.exp/get_param.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.exp/get_param.pass.cpp index c33383261f150..9cb46bf04f690 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.exp/get_param.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.exp/get_param.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::exponential_distribution<> D; @@ -25,4 +25,6 @@ int main() D d(p); assert(d.param() == p); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.exp/io.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.exp/io.pass.cpp index d8b4da1f37b83..e8613480c6e94 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.exp/io.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.exp/io.pass.cpp @@ -25,7 +25,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::exponential_distribution<> D; @@ -37,4 +37,6 @@ int main() is >> d2; assert(d1 == d2); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.exp/max.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.exp/max.pass.cpp index bf02b03bddfa8..9859883c1257b 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.exp/max.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.exp/max.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::exponential_distribution<> D; @@ -24,4 +24,6 @@ int main() D::result_type m = d.max(); assert(m == std::numeric_limits::infinity()); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.exp/min.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.exp/min.pass.cpp index abca78185c646..e1957295213fb 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.exp/min.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.exp/min.pass.cpp @@ -16,11 +16,13 @@ #include #include -int main() +int main(int, char**) { { typedef std::exponential_distribution<> D; D d(.5); assert(d.min() == 0); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.exp/param_assign.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.exp/param_assign.pass.cpp index 47ca9d508a282..9958d632b2a82 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.exp/param_assign.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.exp/param_assign.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::exponential_distribution<> D; @@ -27,4 +27,6 @@ int main() p = p0; assert(p.lambda() == .7); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.exp/param_copy.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.exp/param_copy.pass.cpp index df00ddd2286b4..676eac6465bd6 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.exp/param_copy.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.exp/param_copy.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::exponential_distribution<> D; @@ -26,4 +26,6 @@ int main() param_type p = p0; assert(p.lambda() == .125); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.exp/param_ctor.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.exp/param_ctor.pass.cpp index 9eb9881f5e7d5..8483bf9ff7505 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.exp/param_ctor.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.exp/param_ctor.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::exponential_distribution<> D; @@ -31,4 +31,6 @@ int main() param_type p(10); assert(p.lambda() == 10); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.exp/param_eq.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.exp/param_eq.pass.cpp index 085f55639de2e..e36ffe029f7ad 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.exp/param_eq.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.exp/param_eq.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::exponential_distribution<> D; @@ -33,4 +33,6 @@ int main() param_type p2(0.5); assert(p1 != p2); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.exp/param_types.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.exp/param_types.pass.cpp index 9e43dff4a99a7..1b137acf9a907 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.exp/param_types.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.exp/param_types.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::exponential_distribution<> D; @@ -24,4 +24,6 @@ int main() typedef param_type::distribution_type distribution_type; static_assert((std::is_same::value), ""); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.exp/set_param.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.exp/set_param.pass.cpp index bc36185782a12..7147b313c79fa 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.exp/set_param.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.exp/set_param.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::exponential_distribution<> D; @@ -26,4 +26,6 @@ int main() d.param(p); assert(d.param() == p); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.exp/types.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.exp/types.pass.cpp index fe9f84be0db0d..289c2f1a4a126 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.exp/types.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.exp/types.pass.cpp @@ -18,7 +18,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::exponential_distribution<> D; @@ -30,4 +30,6 @@ int main() typedef D::result_type result_type; static_assert((std::is_same::value), ""); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.extreme/assign.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.extreme/assign.pass.cpp index 8aab78c0798e5..15333b04804e9 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.extreme/assign.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.extreme/assign.pass.cpp @@ -27,7 +27,9 @@ test1() assert(d1 == d2); } -int main() +int main(int, char**) { test1(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.extreme/copy.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.extreme/copy.pass.cpp index 48f8b46b79242..a71dd8e31a41c 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.extreme/copy.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.extreme/copy.pass.cpp @@ -25,7 +25,9 @@ test1() assert(d1 == d2); } -int main() +int main(int, char**) { test1(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.extreme/ctor_double_double.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.extreme/ctor_double_double.pass.cpp index 2b02acf62d9f9..1123da3f2262d 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.extreme/ctor_double_double.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.extreme/ctor_double_double.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::extreme_value_distribution<> D; @@ -36,4 +36,6 @@ int main() assert(d.a() == 14.5); assert(d.b() == 5.25); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.extreme/ctor_param.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.extreme/ctor_param.pass.cpp index 3e569438a00cc..4160b0337e3ab 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.extreme/ctor_param.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.extreme/ctor_param.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::extreme_value_distribution<> D; @@ -26,4 +26,6 @@ int main() assert(d.a() == 0.25); assert(d.b() == 10); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.extreme/eq.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.extreme/eq.pass.cpp index 8d5e08f5ce0b1..ab14c2ac5c466 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.extreme/eq.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.extreme/eq.pass.cpp @@ -19,7 +19,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::extreme_value_distribution<> D; @@ -33,4 +33,6 @@ int main() D d2(2.5, 4.5); assert(d1 != d2); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.extreme/eval.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.extreme/eval.pass.cpp index 42ccae9c85eba..c83e78e01f695 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.extreme/eval.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.extreme/eval.pass.cpp @@ -192,10 +192,12 @@ test4() assert(std::abs((kurtosis - x_kurtosis) / x_kurtosis) < 0.01); } -int main() +int main(int, char**) { test1(); test2(); test3(); test4(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.extreme/eval_param.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.extreme/eval_param.pass.cpp index ef1ca6aafe527..bf3df44555986 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.extreme/eval_param.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.extreme/eval_param.pass.cpp @@ -200,10 +200,12 @@ test4() assert(std::abs((kurtosis - x_kurtosis) / x_kurtosis) < 0.01); } -int main() +int main(int, char**) { test1(); test2(); test3(); test4(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.extreme/get_param.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.extreme/get_param.pass.cpp index fe300d6920ca7..27499a49a5f86 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.extreme/get_param.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.extreme/get_param.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::extreme_value_distribution<> D; @@ -25,4 +25,6 @@ int main() D d(p); assert(d.param() == p); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.extreme/io.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.extreme/io.pass.cpp index 9fefd6058b4ae..219d0f1e2da7b 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.extreme/io.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.extreme/io.pass.cpp @@ -25,7 +25,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::extreme_value_distribution<> D; @@ -37,4 +37,6 @@ int main() is >> d2; assert(d1 == d2); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.extreme/max.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.extreme/max.pass.cpp index b16f7f2a5c19c..bfa6f24835654 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.extreme/max.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.extreme/max.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::extreme_value_distribution<> D; @@ -24,4 +24,6 @@ int main() D::result_type m = d.max(); assert(m == INFINITY); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.extreme/min.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.extreme/min.pass.cpp index 199c14e5f7593..bd97a0ba3965d 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.extreme/min.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.extreme/min.pass.cpp @@ -16,11 +16,13 @@ #include #include -int main() +int main(int, char**) { { typedef std::extreme_value_distribution<> D; D d(.5, .5); assert(d.min() == -INFINITY); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.extreme/param_assign.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.extreme/param_assign.pass.cpp index cd2aac8cafd66..b92b6fbe93396 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.extreme/param_assign.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.extreme/param_assign.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::extreme_value_distribution<> D; @@ -28,4 +28,6 @@ int main() assert(p.a() == .75); assert(p.b() == 6); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.extreme/param_copy.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.extreme/param_copy.pass.cpp index 58ad1f2c97239..f64a32030506c 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.extreme/param_copy.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.extreme/param_copy.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::extreme_value_distribution<> D; @@ -27,4 +27,6 @@ int main() assert(p.a() == 10); assert(p.b() == .125); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.extreme/param_ctor.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.extreme/param_ctor.pass.cpp index 3dd5e788e89f6..906f7160afc7a 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.extreme/param_ctor.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.extreme/param_ctor.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::extreme_value_distribution<> D; @@ -40,4 +40,6 @@ int main() assert(p.a() == 10); assert(p.b() == 5); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.extreme/param_eq.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.extreme/param_eq.pass.cpp index 532452c2e77bb..c4e4a7060ea9e 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.extreme/param_eq.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.extreme/param_eq.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::extreme_value_distribution<> D; @@ -33,4 +33,6 @@ int main() param_type p2(0.5, .5); assert(p1 != p2); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.extreme/param_types.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.extreme/param_types.pass.cpp index af00f4b7ff02c..30c46459bb6a4 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.extreme/param_types.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.extreme/param_types.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::extreme_value_distribution<> D; @@ -24,4 +24,6 @@ int main() typedef param_type::distribution_type distribution_type; static_assert((std::is_same::value), ""); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.extreme/set_param.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.extreme/set_param.pass.cpp index f7ff8fdf473a2..88fff04fb102d 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.extreme/set_param.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.extreme/set_param.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::extreme_value_distribution<> D; @@ -26,4 +26,6 @@ int main() d.param(p); assert(d.param() == p); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.extreme/types.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.extreme/types.pass.cpp index 53ad76218b3ee..e96c0d4ad4555 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.extreme/types.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.extreme/types.pass.cpp @@ -18,7 +18,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::extreme_value_distribution<> D; @@ -30,4 +30,6 @@ int main() typedef D::result_type result_type; static_assert((std::is_same::value), ""); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.gamma/assign.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.gamma/assign.pass.cpp index 707c5b4b1da87..35eb5c277cb2c 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.gamma/assign.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.gamma/assign.pass.cpp @@ -27,7 +27,9 @@ test1() assert(d1 == d2); } -int main() +int main(int, char**) { test1(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.gamma/copy.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.gamma/copy.pass.cpp index b080f76a8a80d..962374efe876e 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.gamma/copy.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.gamma/copy.pass.cpp @@ -25,7 +25,9 @@ test1() assert(d1 == d2); } -int main() +int main(int, char**) { test1(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.gamma/ctor_double_double.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.gamma/ctor_double_double.pass.cpp index c359c08db1508..31ce06d15aa9d 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.gamma/ctor_double_double.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.gamma/ctor_double_double.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::gamma_distribution<> D; @@ -36,4 +36,6 @@ int main() assert(d.alpha() == 14.5); assert(d.beta() == 5.25); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.gamma/ctor_param.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.gamma/ctor_param.pass.cpp index a475a67f5a480..c78821f871dd0 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.gamma/ctor_param.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.gamma/ctor_param.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::gamma_distribution<> D; @@ -26,4 +26,6 @@ int main() assert(d.alpha() == 0.25); assert(d.beta() == 10); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.gamma/eq.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.gamma/eq.pass.cpp index 932c57a06f903..ee365f8e7c278 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.gamma/eq.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.gamma/eq.pass.cpp @@ -19,7 +19,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::gamma_distribution<> D; @@ -33,4 +33,6 @@ int main() D d2(2.5, 4.5); assert(d1 != d2); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.gamma/eval.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.gamma/eval.pass.cpp index b972c3f5e8b6e..f9e678d1caab2 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.gamma/eval.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.gamma/eval.pass.cpp @@ -28,7 +28,7 @@ sqr(T x) return x * x; } -int main() +int main(int, char**) { { typedef std::gamma_distribution<> D; @@ -147,4 +147,6 @@ int main() assert(std::abs((skew - x_skew) / x_skew) < 0.01); assert(std::abs((kurtosis - x_kurtosis) / x_kurtosis) < 0.01); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.gamma/eval_param.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.gamma/eval_param.pass.cpp index 803daa82e3ef0..aeb0bbf31e0f2 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.gamma/eval_param.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.gamma/eval_param.pass.cpp @@ -28,7 +28,7 @@ sqr(T x) return x * x; } -int main() +int main(int, char**) { { typedef std::gamma_distribution<> D; @@ -153,4 +153,6 @@ int main() assert(std::abs((skew - x_skew) / x_skew) < 0.01); assert(std::abs((kurtosis - x_kurtosis) / x_kurtosis) < 0.01); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.gamma/get_param.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.gamma/get_param.pass.cpp index 31bbbfca87abb..82b1c9bfd7823 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.gamma/get_param.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.gamma/get_param.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::gamma_distribution<> D; @@ -25,4 +25,6 @@ int main() D d(p); assert(d.param() == p); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.gamma/io.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.gamma/io.pass.cpp index 6824616bdfccf..6732ca210ffa3 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.gamma/io.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.gamma/io.pass.cpp @@ -25,7 +25,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::gamma_distribution<> D; @@ -37,4 +37,6 @@ int main() is >> d2; assert(d1 == d2); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.gamma/max.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.gamma/max.pass.cpp index 29df499678d9a..eb9e2b4f2e0f0 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.gamma/max.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.gamma/max.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::gamma_distribution<> D; @@ -24,4 +24,6 @@ int main() D::result_type m = d.max(); assert(m == INFINITY); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.gamma/min.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.gamma/min.pass.cpp index 37eba2f10cf8e..3eda5a65183cc 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.gamma/min.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.gamma/min.pass.cpp @@ -16,11 +16,13 @@ #include #include -int main() +int main(int, char**) { { typedef std::gamma_distribution<> D; D d(.5, .5); assert(d.min() == 0); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.gamma/param_assign.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.gamma/param_assign.pass.cpp index 4470505003e18..28d3997c4d61c 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.gamma/param_assign.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.gamma/param_assign.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::gamma_distribution<> D; @@ -28,4 +28,6 @@ int main() assert(p.alpha() == .75); assert(p.beta() == 6); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.gamma/param_copy.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.gamma/param_copy.pass.cpp index d7eb86d23a4e0..dc2b32dd7eecf 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.gamma/param_copy.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.gamma/param_copy.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::gamma_distribution<> D; @@ -27,4 +27,6 @@ int main() assert(p.alpha() == 10); assert(p.beta() == .125); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.gamma/param_ctor.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.gamma/param_ctor.pass.cpp index 3c72bee5aaee9..333b670f1dae3 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.gamma/param_ctor.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.gamma/param_ctor.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::gamma_distribution<> D; @@ -40,4 +40,6 @@ int main() assert(p.alpha() == 10); assert(p.beta() == 5); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.gamma/param_eq.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.gamma/param_eq.pass.cpp index d8cbeb23af191..2ba854163de9c 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.gamma/param_eq.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.gamma/param_eq.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::gamma_distribution<> D; @@ -33,4 +33,6 @@ int main() param_type p2(0.5, .5); assert(p1 != p2); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.gamma/param_types.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.gamma/param_types.pass.cpp index f9467d6a1a8cc..0fc07ef95843e 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.gamma/param_types.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.gamma/param_types.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::gamma_distribution<> D; @@ -24,4 +24,6 @@ int main() typedef param_type::distribution_type distribution_type; static_assert((std::is_same::value), ""); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.gamma/set_param.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.gamma/set_param.pass.cpp index ca1c4b48d7d75..4af868a270be3 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.gamma/set_param.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.gamma/set_param.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::gamma_distribution<> D; @@ -26,4 +26,6 @@ int main() d.param(p); assert(d.param() == p); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.gamma/types.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.gamma/types.pass.cpp index 197a9b224d575..31a33c0cf8acd 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.gamma/types.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.gamma/types.pass.cpp @@ -18,7 +18,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::gamma_distribution<> D; @@ -30,4 +30,6 @@ int main() typedef D::result_type result_type; static_assert((std::is_same::value), ""); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.poisson/assign.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.poisson/assign.pass.cpp index ee487a416684f..4379d0bfd0559 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.poisson/assign.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.poisson/assign.pass.cpp @@ -27,7 +27,9 @@ test1() assert(d1 == d2); } -int main() +int main(int, char**) { test1(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.poisson/copy.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.poisson/copy.pass.cpp index 2e141ca929550..60fa5193360b0 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.poisson/copy.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.poisson/copy.pass.cpp @@ -25,7 +25,9 @@ test1() assert(d1 == d2); } -int main() +int main(int, char**) { test1(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.poisson/ctor_double.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.poisson/ctor_double.pass.cpp index d5f86cb03f931..e27d13331d25d 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.poisson/ctor_double.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.poisson/ctor_double.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::poisson_distribution<> D; @@ -28,4 +28,6 @@ int main() D d(3.5); assert(d.mean() == 3.5); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.poisson/ctor_param.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.poisson/ctor_param.pass.cpp index c8ee8414682b2..117adb25a5045 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.poisson/ctor_param.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.poisson/ctor_param.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::poisson_distribution<> D; @@ -25,4 +25,6 @@ int main() D d(p); assert(d.mean() == 0.25); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.poisson/eq.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.poisson/eq.pass.cpp index cc7a8bd9d64b4..0d7dda0d9725b 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.poisson/eq.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.poisson/eq.pass.cpp @@ -19,7 +19,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::poisson_distribution<> D; @@ -33,4 +33,6 @@ int main() D d2(.25); assert(d1 != d2); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.poisson/eval.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.poisson/eval.pass.cpp index 0e3d1c2e4d0e7..588eddba2ebc2 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.poisson/eval.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.poisson/eval.pass.cpp @@ -28,7 +28,7 @@ sqr(T x) return x * x; } -int main() +int main(int, char**) { { typedef std::poisson_distribution<> D; @@ -147,4 +147,6 @@ int main() assert(std::abs((skew - x_skew) / x_skew) < 0.01); assert(std::abs((kurtosis - x_kurtosis) / x_kurtosis) < 0.01); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.poisson/eval_param.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.poisson/eval_param.pass.cpp index 27b6a9c39c4df..67f726843134a 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.poisson/eval_param.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.poisson/eval_param.pass.cpp @@ -28,7 +28,7 @@ sqr(T x) return x * x; } -int main() +int main(int, char**) { { typedef std::poisson_distribution<> D; @@ -153,4 +153,6 @@ int main() assert(std::abs((skew - x_skew) / x_skew) < 0.01); assert(std::abs((kurtosis - x_kurtosis) / x_kurtosis) < 0.01); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.poisson/get_param.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.poisson/get_param.pass.cpp index 8d2b76df24ca6..a55a3837c7fcc 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.poisson/get_param.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.poisson/get_param.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::poisson_distribution<> D; @@ -25,4 +25,6 @@ int main() D d(p); assert(d.param() == p); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.poisson/io.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.poisson/io.pass.cpp index e8ffce1faf4eb..4aec884f6b90b 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.poisson/io.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.poisson/io.pass.cpp @@ -25,7 +25,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::poisson_distribution<> D; @@ -37,4 +37,6 @@ int main() is >> d2; assert(d1 == d2); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.poisson/max.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.poisson/max.pass.cpp index 853d70749a303..b1cb125084a3f 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.poisson/max.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.poisson/max.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::poisson_distribution<> D; @@ -24,4 +24,6 @@ int main() D::result_type m = d.max(); assert(m == std::numeric_limits::max()); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.poisson/min.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.poisson/min.pass.cpp index da95d9c4cef95..e65319c56c216 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.poisson/min.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.poisson/min.pass.cpp @@ -16,11 +16,13 @@ #include #include -int main() +int main(int, char**) { { typedef std::poisson_distribution<> D; D d(.5); assert(d.min() == 0); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.poisson/param_assign.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.poisson/param_assign.pass.cpp index 1982ff5dedc99..393153a7c0621 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.poisson/param_assign.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.poisson/param_assign.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::poisson_distribution<> D; @@ -27,4 +27,6 @@ int main() p = p0; assert(p.mean() == .7); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.poisson/param_copy.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.poisson/param_copy.pass.cpp index 841c7ddacae79..a02e7250fc71f 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.poisson/param_copy.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.poisson/param_copy.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::poisson_distribution<> D; @@ -26,4 +26,6 @@ int main() param_type p = p0; assert(p.mean() == .125); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.poisson/param_ctor.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.poisson/param_ctor.pass.cpp index 8dea424b488e9..1e395fdfd22a6 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.poisson/param_ctor.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.poisson/param_ctor.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::poisson_distribution<> D; @@ -31,4 +31,6 @@ int main() param_type p(10); assert(p.mean() == 10); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.poisson/param_eq.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.poisson/param_eq.pass.cpp index 307a0d08df193..5e9aa27ccf442 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.poisson/param_eq.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.poisson/param_eq.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::poisson_distribution<> D; @@ -33,4 +33,6 @@ int main() param_type p2(0.5); assert(p1 != p2); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.poisson/param_types.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.poisson/param_types.pass.cpp index c4e1e434a9d01..b81d15cf0be15 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.poisson/param_types.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.poisson/param_types.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::poisson_distribution<> D; @@ -24,4 +24,6 @@ int main() typedef param_type::distribution_type distribution_type; static_assert((std::is_same::value), ""); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.poisson/set_param.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.poisson/set_param.pass.cpp index 406b8472284b5..d75e6a1daf8e0 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.poisson/set_param.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.poisson/set_param.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::poisson_distribution<> D; @@ -26,4 +26,6 @@ int main() d.param(p); assert(d.param() == p); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.poisson/types.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.poisson/types.pass.cpp index 16165b0b76803..982919268be43 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.poisson/types.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.poisson/types.pass.cpp @@ -18,7 +18,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::poisson_distribution<> D; @@ -30,4 +30,6 @@ int main() typedef D::result_type result_type; static_assert((std::is_same::value), ""); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.weibull/assign.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.weibull/assign.pass.cpp index c6090b523d93a..ff81b81208318 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.weibull/assign.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.weibull/assign.pass.cpp @@ -27,7 +27,9 @@ test1() assert(d1 == d2); } -int main() +int main(int, char**) { test1(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.weibull/copy.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.weibull/copy.pass.cpp index 22d51fc34283a..0cfafa7257a91 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.weibull/copy.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.weibull/copy.pass.cpp @@ -25,7 +25,9 @@ test1() assert(d1 == d2); } -int main() +int main(int, char**) { test1(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.weibull/ctor_double_double.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.weibull/ctor_double_double.pass.cpp index ac093c5f50129..3f4d55eb9bd13 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.weibull/ctor_double_double.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.weibull/ctor_double_double.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::weibull_distribution<> D; @@ -36,4 +36,6 @@ int main() assert(d.a() == 14.5); assert(d.b() == 5.25); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.weibull/ctor_param.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.weibull/ctor_param.pass.cpp index 4faae698b5e38..e876a2df0e686 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.weibull/ctor_param.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.weibull/ctor_param.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::weibull_distribution<> D; @@ -26,4 +26,6 @@ int main() assert(d.a() == 0.25); assert(d.b() == 10); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.weibull/eq.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.weibull/eq.pass.cpp index 12a3e2354d815..1de323aef1043 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.weibull/eq.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.weibull/eq.pass.cpp @@ -19,7 +19,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::weibull_distribution<> D; @@ -33,4 +33,6 @@ int main() D d2(2.5, 4.5); assert(d1 != d2); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.weibull/eval.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.weibull/eval.pass.cpp index 6d086b87d9a85..88e40b29c5487 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.weibull/eval.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.weibull/eval.pass.cpp @@ -29,7 +29,7 @@ sqr(T x) return x * x; } -int main() +int main(int, char**) { { typedef std::weibull_distribution<> D; @@ -160,4 +160,6 @@ int main() assert(std::abs((skew - x_skew) / x_skew) < 0.01); assert(std::abs((kurtosis - x_kurtosis) / x_kurtosis) < 0.03); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.weibull/eval_param.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.weibull/eval_param.pass.cpp index 6142f847d37e4..3959f440797d2 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.weibull/eval_param.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.weibull/eval_param.pass.cpp @@ -29,7 +29,7 @@ sqr(T x) return x * x; } -int main() +int main(int, char**) { { typedef std::weibull_distribution<> D; @@ -166,4 +166,6 @@ int main() assert(std::abs((skew - x_skew) / x_skew) < 0.01); assert(std::abs((kurtosis - x_kurtosis) / x_kurtosis) < 0.03); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.weibull/get_param.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.weibull/get_param.pass.cpp index fcc21fb29105b..c2fbf7b98b9ec 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.weibull/get_param.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.weibull/get_param.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::weibull_distribution<> D; @@ -25,4 +25,6 @@ int main() D d(p); assert(d.param() == p); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.weibull/io.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.weibull/io.pass.cpp index 7ecc16f57355c..6b4f4e9ddbb66 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.weibull/io.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.weibull/io.pass.cpp @@ -25,7 +25,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::weibull_distribution<> D; @@ -37,4 +37,6 @@ int main() is >> d2; assert(d1 == d2); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.weibull/max.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.weibull/max.pass.cpp index 30b504a9643e3..3d9fe0b357afb 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.weibull/max.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.weibull/max.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::weibull_distribution<> D; @@ -24,4 +24,6 @@ int main() D::result_type m = d.max(); assert(m == INFINITY); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.weibull/min.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.weibull/min.pass.cpp index 16a89bcd43c54..f92384041ac43 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.weibull/min.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.weibull/min.pass.cpp @@ -16,11 +16,13 @@ #include #include -int main() +int main(int, char**) { { typedef std::weibull_distribution<> D; D d(.5, .5); assert(d.min() == 0); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.weibull/param_assign.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.weibull/param_assign.pass.cpp index 3be04f268915c..add72f68563e4 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.weibull/param_assign.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.weibull/param_assign.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::weibull_distribution<> D; @@ -28,4 +28,6 @@ int main() assert(p.a() == .75); assert(p.b() == 6); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.weibull/param_copy.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.weibull/param_copy.pass.cpp index 800d6302a86ac..f2b7e95a4c33c 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.weibull/param_copy.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.weibull/param_copy.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::weibull_distribution<> D; @@ -27,4 +27,6 @@ int main() assert(p.a() == 10); assert(p.b() == .125); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.weibull/param_ctor.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.weibull/param_ctor.pass.cpp index f88ba35456396..6a03330c15628 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.weibull/param_ctor.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.weibull/param_ctor.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::weibull_distribution<> D; @@ -40,4 +40,6 @@ int main() assert(p.a() == 10); assert(p.b() == 5); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.weibull/param_eq.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.weibull/param_eq.pass.cpp index 621eda13f5488..e47f576728c2d 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.weibull/param_eq.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.weibull/param_eq.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::weibull_distribution<> D; @@ -33,4 +33,6 @@ int main() param_type p2(0.5, .5); assert(p1 != p2); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.weibull/param_types.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.weibull/param_types.pass.cpp index cd7d5209f50ce..08c58d03d1a26 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.weibull/param_types.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.weibull/param_types.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::weibull_distribution<> D; @@ -24,4 +24,6 @@ int main() typedef param_type::distribution_type distribution_type; static_assert((std::is_same::value), ""); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.weibull/set_param.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.weibull/set_param.pass.cpp index 05acfd5e6507f..f3c5a20d29e51 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.weibull/set_param.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.weibull/set_param.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::weibull_distribution<> D; @@ -26,4 +26,6 @@ int main() d.param(p); assert(d.param() == p); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.weibull/types.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.weibull/types.pass.cpp index bd9b474794f29..51b97e081d7fc 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.weibull/types.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.weibull/types.pass.cpp @@ -18,7 +18,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::weibull_distribution<> D; @@ -30,4 +30,6 @@ int main() typedef D::result_type result_type; static_assert((std::is_same::value), ""); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/nothing_to_do.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/nothing_to_do.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/assign.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/assign.pass.cpp index a6d6822b6f81e..f1d5b3b24c2d7 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/assign.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/assign.pass.cpp @@ -28,7 +28,9 @@ test1() assert(d1 == d2); } -int main() +int main(int, char**) { test1(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/copy.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/copy.pass.cpp index 0b1b7b919c327..19f8dc179e287 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/copy.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/copy.pass.cpp @@ -26,7 +26,9 @@ test1() assert(d1 == d2); } -int main() +int main(int, char**) { test1(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/ctor_default.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/ctor_default.pass.cpp index 89fc479f2ba05..f8d769dbda071 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/ctor_default.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/ctor_default.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::discrete_distribution<> D; @@ -25,4 +25,6 @@ int main() assert(p.size() == 1); assert(p[0] == 1); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/ctor_func.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/ctor_func.pass.cpp index 700eb91bae7b6..198b845b3e67e 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/ctor_func.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/ctor_func.pass.cpp @@ -23,7 +23,7 @@ double fw(double x) return x+1; } -int main() +int main(int, char**) { { typedef std::discrete_distribution<> D; @@ -56,4 +56,6 @@ int main() assert(p[1] == .21875); assert(p[2] == .28125); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/ctor_init.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/ctor_init.pass.cpp index 51e43f4d2fec7..a9c1e2bb42c74 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/ctor_init.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/ctor_init.pass.cpp @@ -18,7 +18,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::discrete_distribution<> D; @@ -77,4 +77,6 @@ int main() assert(p[1] == 0); assert(p[2] == 1); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/ctor_iterator.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/ctor_iterator.pass.cpp index eafbd1b564d62..66912cf4a94eb 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/ctor_iterator.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/ctor_iterator.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::discrete_distribution<> D; @@ -83,4 +83,6 @@ int main() assert(p[1] == 0); assert(p[2] == 1); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/ctor_param.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/ctor_param.pass.cpp index 8a18ab83e279f..a25c9fbd31c19 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/ctor_param.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/ctor_param.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::discrete_distribution<> D; @@ -29,4 +29,6 @@ int main() assert(p[0] == 0.25); assert(p[1] == 0.75); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/eq.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/eq.pass.cpp index 302e171ca0837..409cc39ebb14c 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/eq.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/eq.pass.cpp @@ -19,7 +19,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::discrete_distribution<> D; @@ -41,4 +41,6 @@ int main() D d2; assert(d1 != d2); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/eval.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/eval.pass.cpp index 170fc16a7f627..5dd70d144fa5e 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/eval.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/eval.pass.cpp @@ -19,7 +19,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::discrete_distribution<> D; @@ -275,4 +275,6 @@ int main() else assert(u[i] == 0); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/eval_param.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/eval_param.pass.cpp index dbfd5da94bbc0..6cc4e90b25eb6 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/eval_param.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/eval_param.pass.cpp @@ -19,7 +19,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::discrete_distribution<> D; @@ -41,4 +41,6 @@ int main() for (int i = 0; i <= 2; ++i) assert(std::abs((double)u[i]/N - prob[i]) / prob[i] < 0.001); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/get_param.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/get_param.pass.cpp index 26ef68c66deeb..59e33128243fe 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/get_param.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/get_param.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::discrete_distribution<> D; @@ -26,4 +26,6 @@ int main() D d(p); assert(d.param() == p); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/io.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/io.pass.cpp index 4e95cc477144c..ff9434c8a16ae 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/io.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/io.pass.cpp @@ -25,7 +25,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::discrete_distribution<> D; @@ -38,4 +38,6 @@ int main() is >> d2; assert(d1 == d2); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/max.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/max.pass.cpp index c6356cf7697b6..d365763914fa6 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/max.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/max.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::discrete_distribution<> D; @@ -30,4 +30,6 @@ int main() D d(p0, p0+4); assert(d.max() == 3); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/min.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/min.pass.cpp index b40c4c513369d..259eddc5d0237 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/min.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/min.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::discrete_distribution<> D; @@ -24,4 +24,6 @@ int main() D d(p0, p0+3); assert(d.min() == 0); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/param_assign.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/param_assign.pass.cpp index 23decd2b831b9..c50a2536c2092 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/param_assign.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/param_assign.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::discrete_distribution<> D; @@ -28,4 +28,6 @@ int main() p = p0; assert(p == p0); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/param_copy.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/param_copy.pass.cpp index a50a5f4244da7..9b7e6b9edcf6b 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/param_copy.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/param_copy.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::discrete_distribution<> D; @@ -27,4 +27,6 @@ int main() param_type p = p0; assert(p == p0); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/param_ctor_default.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/param_ctor_default.pass.cpp index b915e2cb58b34..680ce405c7e7f 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/param_ctor_default.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/param_ctor_default.pass.cpp @@ -18,7 +18,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::discrete_distribution<> D; @@ -28,4 +28,6 @@ int main() assert(p.size() == 1); assert(p[0] == 1); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/param_ctor_func.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/param_ctor_func.pass.cpp index 8d00e62833446..4dd919dc4ecde 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/param_ctor_func.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/param_ctor_func.pass.cpp @@ -23,7 +23,7 @@ double fw(double x) return x+1; } -int main() +int main(int, char**) { { typedef std::discrete_distribution<> D; @@ -60,4 +60,6 @@ int main() assert(p[1] == .21875); assert(p[2] == .28125); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/param_ctor_init.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/param_ctor_init.pass.cpp index 69ffe3d461204..91adbdb07dae4 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/param_ctor_init.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/param_ctor_init.pass.cpp @@ -18,7 +18,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::discrete_distribution<> D; @@ -84,4 +84,6 @@ int main() assert(p[1] == 0); assert(p[2] == 1); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/param_ctor_iterator.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/param_ctor_iterator.pass.cpp index aa7d6bfb820b5..b553ffab127eb 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/param_ctor_iterator.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/param_ctor_iterator.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::discrete_distribution<> D; @@ -90,4 +90,6 @@ int main() assert(p[1] == 0); assert(p[2] == 1); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/param_eq.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/param_eq.pass.cpp index aac1d00fed810..3ca6786933fa9 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/param_eq.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/param_eq.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::discrete_distribution<> D; @@ -35,4 +35,6 @@ int main() param_type p2; assert(p1 != p2); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/param_types.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/param_types.pass.cpp index 558f8ad7f7191..fab19160264ca 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/param_types.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/param_types.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::discrete_distribution<> D; @@ -24,4 +24,6 @@ int main() typedef param_type::distribution_type distribution_type; static_assert((std::is_same::value), ""); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/set_param.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/set_param.pass.cpp index 9334f724563a7..9858a30a77872 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/set_param.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/set_param.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::discrete_distribution<> D; @@ -27,4 +27,6 @@ int main() d.param(p); assert(d.param() == p); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/types.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/types.pass.cpp index 99a474a4cf87c..d45475ba36fdd 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/types.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/types.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::discrete_distribution<> D; @@ -28,4 +28,6 @@ int main() typedef D::result_type result_type; static_assert((std::is_same::value), ""); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/assign.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/assign.pass.cpp index 1de6fd363ec46..3b63601aee9f5 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/assign.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/assign.pass.cpp @@ -29,7 +29,9 @@ test1() assert(d1 == d2); } -int main() +int main(int, char**) { test1(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/copy.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/copy.pass.cpp index 6d8e36ef3dc92..82b0d8ef3f935 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/copy.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/copy.pass.cpp @@ -27,7 +27,9 @@ test1() assert(d1 == d2); } -int main() +int main(int, char**) { test1(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/ctor_default.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/ctor_default.pass.cpp index f05cd9941f79b..836b690082a93 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/ctor_default.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/ctor_default.pass.cpp @@ -18,7 +18,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::piecewise_constant_distribution<> D; @@ -31,4 +31,6 @@ int main() assert(dn.size() == 1); assert(dn[0] == 1); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/ctor_func.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/ctor_func.pass.cpp index 7c8ae7fa88a16..7e7537ad80491 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/ctor_func.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/ctor_func.pass.cpp @@ -23,7 +23,7 @@ double fw(double x) return 2*x; } -int main() +int main(int, char**) { { typedef std::piecewise_constant_distribution<> D; @@ -60,4 +60,6 @@ int main() assert(dn[0] == 0.1); assert(dn[1] == 0.15); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/ctor_init_func.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/ctor_init_func.pass.cpp index f86cbf56c4c41..22c8a1f4ef27a 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/ctor_init_func.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/ctor_init_func.pass.cpp @@ -26,7 +26,7 @@ double f(double x) return x*2; } -int main() +int main(int, char**) { { typedef std::piecewise_constant_distribution<> D; @@ -74,4 +74,6 @@ int main() assert(dn[0] == 0.203125); assert(dn[1] == 0.1484375); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/ctor_iterator.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/ctor_iterator.pass.cpp index 463e78c850ab3..695a7ba5f1686 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/ctor_iterator.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/ctor_iterator.pass.cpp @@ -19,7 +19,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::piecewise_constant_distribution<> D; @@ -92,4 +92,6 @@ int main() assert(dn[1] == .3125); assert(dn[2] == .125); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/ctor_param.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/ctor_param.pass.cpp index e9439d2933d1c..1a10bb31b3608 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/ctor_param.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/ctor_param.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::piecewise_constant_distribution<> D; @@ -37,4 +37,6 @@ int main() assert(dn[1] == .3125); assert(dn[2] == .125); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/eq.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/eq.pass.cpp index 7cd8b1e069e60..18b5d59bd108c 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/eq.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/eq.pass.cpp @@ -19,7 +19,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::piecewise_constant_distribution<> D; @@ -43,4 +43,6 @@ int main() D d2; assert(d1 != d2); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/eval.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/eval.pass.cpp index 048fb2d2221e4..d00be22e551b9 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/eval.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/eval.pass.cpp @@ -723,7 +723,7 @@ test11() } } -int main() +int main(int, char**) { test1(); test2(); @@ -736,4 +736,6 @@ int main() test9(); test10(); test11(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/eval_param.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/eval_param.pass.cpp index 0d0e6e50d8a43..c82a6b8515aa1 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/eval_param.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/eval_param.pass.cpp @@ -31,7 +31,7 @@ sqr(T x) return x*x; } -int main() +int main(int, char**) { { typedef std::piecewise_constant_distribution<> D; @@ -95,4 +95,6 @@ int main() } } } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/get_param.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/get_param.pass.cpp index b842d2433f8b7..90f469480d9a6 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/get_param.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/get_param.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::piecewise_constant_distribution<> D; @@ -28,4 +28,6 @@ int main() D d(pa); assert(d.param() == pa); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/io.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/io.pass.cpp index e4748c15e5cb1..b22fdfa584086 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/io.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/io.pass.cpp @@ -25,7 +25,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::piecewise_constant_distribution<> D; @@ -40,4 +40,6 @@ int main() is >> d2; assert(d1 == d2); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/max.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/max.pass.cpp index 7de0052dfb748..19c11c66f229a 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/max.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/max.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::piecewise_constant_distribution<> D; @@ -26,4 +26,6 @@ int main() D d(b, b+Np+1, p); assert(d.max() == 17); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/min.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/min.pass.cpp index 601eeecc4ca65..8a5fe519fb623 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/min.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/min.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::piecewise_constant_distribution<> D; @@ -26,4 +26,6 @@ int main() D d(b, b+Np+1, p); assert(d.min() == 10); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/param_assign.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/param_assign.pass.cpp index 87d78547a5541..7c42c738c145b 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/param_assign.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/param_assign.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::piecewise_constant_distribution<> D; @@ -30,4 +30,6 @@ int main() p1 = p0; assert(p1 == p0); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/param_copy.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/param_copy.pass.cpp index b9a22a1534009..f9eec8d731f01 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/param_copy.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/param_copy.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::piecewise_constant_distribution<> D; @@ -29,4 +29,6 @@ int main() P p1 = p0; assert(p1 == p0); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/param_ctor_default.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/param_ctor_default.pass.cpp index 4b3dad0af47bc..ac2f724b08ed3 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/param_ctor_default.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/param_ctor_default.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::piecewise_constant_distribution<> D; @@ -30,4 +30,6 @@ int main() assert(dn.size() == 1); assert(dn[0] == 1); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/param_ctor_func.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/param_ctor_func.pass.cpp index a8adb5be1c045..d14a50817c63c 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/param_ctor_func.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/param_ctor_func.pass.cpp @@ -23,7 +23,7 @@ double fw(double x) return 2*x; } -int main() +int main(int, char**) { { typedef std::piecewise_constant_distribution<> D; @@ -63,4 +63,6 @@ int main() assert(dn[0] == 0.1); assert(dn[1] == 0.15); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/param_ctor_init_func.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/param_ctor_init_func.pass.cpp index 20a2cdbdcb2a8..b7e5a49639e5c 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/param_ctor_init_func.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/param_ctor_init_func.pass.cpp @@ -23,7 +23,7 @@ double f(double x) return x*2; } -int main() +int main(int, char**) { { typedef std::piecewise_constant_distribution<> D; @@ -75,4 +75,6 @@ int main() assert(dn[0] == 0.203125); assert(dn[1] == 0.1484375); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/param_ctor_iterator.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/param_ctor_iterator.pass.cpp index 2b11672e263a8..96dda54d2465a 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/param_ctor_iterator.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/param_ctor_iterator.pass.cpp @@ -18,7 +18,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::piecewise_constant_distribution<> D; @@ -96,4 +96,6 @@ int main() assert(dn[1] == .3125); assert(dn[2] == .125); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/param_eq.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/param_eq.pass.cpp index c3fe7c42b874a..4571613f98791 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/param_eq.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/param_eq.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::piecewise_constant_distribution<> D; @@ -37,4 +37,6 @@ int main() P p2(b, b+4, p); assert(p1 != p2); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/param_types.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/param_types.pass.cpp index 99132cdd8edd4..3d4c25e882a61 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/param_types.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/param_types.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::piecewise_constant_distribution<> D; @@ -24,4 +24,6 @@ int main() typedef param_type::distribution_type distribution_type; static_assert((std::is_same::value), ""); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/set_param.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/set_param.pass.cpp index b87bd85bc2c16..a34187cb2cecd 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/set_param.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/set_param.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::piecewise_constant_distribution<> D; @@ -28,4 +28,6 @@ int main() d.param(pa); assert(d.param() == pa); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/types.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/types.pass.cpp index bfc3cb774994f..eec866112d8cf 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/types.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/types.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::piecewise_constant_distribution<> D; @@ -28,4 +28,6 @@ int main() typedef D::result_type result_type; static_assert((std::is_same::value), ""); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/assign.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/assign.pass.cpp index d150c8668ed1b..ff478a05b79aa 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/assign.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/assign.pass.cpp @@ -29,7 +29,9 @@ test1() assert(d1 == d2); } -int main() +int main(int, char**) { test1(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/copy.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/copy.pass.cpp index bb87e31136e42..ba5e6d59a17a9 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/copy.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/copy.pass.cpp @@ -27,7 +27,9 @@ test1() assert(d1 == d2); } -int main() +int main(int, char**) { test1(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/ctor_default.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/ctor_default.pass.cpp index f96a044a48838..ded81c974fca7 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/ctor_default.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/ctor_default.pass.cpp @@ -18,7 +18,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::piecewise_linear_distribution<> D; @@ -32,4 +32,6 @@ int main() assert(dn[0] == 1); assert(dn[1] == 1); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/ctor_func.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/ctor_func.pass.cpp index fd42c225647c1..175774dc00677 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/ctor_func.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/ctor_func.pass.cpp @@ -25,7 +25,7 @@ double fw(double x) return 2*x; } -int main() +int main(int, char**) { { typedef std::piecewise_linear_distribution<> D; @@ -65,4 +65,6 @@ int main() assert(dn[1] == 0.125); assert(dn[2] == 0.175); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/ctor_init_func.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/ctor_init_func.pass.cpp index e4db52bc95278..ab29fecf6154d 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/ctor_init_func.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/ctor_init_func.pass.cpp @@ -26,7 +26,7 @@ double f(double x) return x*2; } -int main() +int main(int, char**) { { typedef std::piecewise_linear_distribution<> D; @@ -78,4 +78,6 @@ int main() assert(dn[1] == 0.125); assert(dn[2] == 0.175); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/ctor_iterator.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/ctor_iterator.pass.cpp index 13517e1cc9fc3..541976ad1d54a 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/ctor_iterator.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/ctor_iterator.pass.cpp @@ -19,7 +19,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::piecewise_linear_distribution<> D; @@ -97,4 +97,6 @@ int main() assert(dn[2] == 1/4.5); assert(dn[3] == 0); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/ctor_param.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/ctor_param.pass.cpp index 2592763cfa63d..1ecbe87c20db4 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/ctor_param.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/ctor_param.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::piecewise_linear_distribution<> D; @@ -38,4 +38,6 @@ int main() assert(dn[2] == 12.5/256.25); assert(dn[3] == 0); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/eq.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/eq.pass.cpp index 019335ee72e07..19eda7357b20d 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/eq.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/eq.pass.cpp @@ -19,7 +19,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::piecewise_linear_distribution<> D; @@ -43,4 +43,6 @@ int main() D d2; assert(d1 != d2); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/eval.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/eval.pass.cpp index 1aab615ad0e7e..6476f3567ff0e 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/eval.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/eval.pass.cpp @@ -354,7 +354,7 @@ test6() } } -int main() +int main(int, char**) { test1(); test2(); @@ -362,4 +362,6 @@ int main() test4(); test5(); test6(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/eval_param.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/eval_param.pass.cpp index 11f2c492685d8..621320ca49e03 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/eval_param.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/eval_param.pass.cpp @@ -37,7 +37,7 @@ f(double x, double a, double m, double b, double c) return a + m*(sqr(x) - sqr(b))/2 + c*(x-b); } -int main() +int main(int, char**) { { typedef std::piecewise_linear_distribution<> D; @@ -90,4 +90,6 @@ int main() assert(std::abs(f(u[i], a, m, bk, c) - double(i)/N) < .001); } } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/get_param.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/get_param.pass.cpp index 56e648f50f79f..7776330c04979 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/get_param.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/get_param.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::piecewise_linear_distribution<> D; @@ -28,4 +28,6 @@ int main() D d(pa); assert(d.param() == pa); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/io.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/io.pass.cpp index 845b64a9f3731..258fdb77b8324 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/io.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/io.pass.cpp @@ -25,7 +25,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::piecewise_linear_distribution<> D; @@ -40,4 +40,6 @@ int main() is >> d2; assert(d1 == d2); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/max.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/max.pass.cpp index aa46f40b019b8..ea6530eae0086 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/max.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/max.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::piecewise_linear_distribution<> D; @@ -26,4 +26,6 @@ int main() D d(b, b+Np, p); assert(d.max() == 17); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/min.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/min.pass.cpp index 28a1b68f208f8..80c77d6e32727 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/min.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/min.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::piecewise_linear_distribution<> D; @@ -26,4 +26,6 @@ int main() D d(b, b+Np, p); assert(d.min() == 10); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/param_assign.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/param_assign.pass.cpp index 3534a8935a1aa..145e616306d53 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/param_assign.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/param_assign.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::piecewise_linear_distribution<> D; @@ -30,4 +30,6 @@ int main() p1 = p0; assert(p1 == p0); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/param_copy.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/param_copy.pass.cpp index 8d784c66969ab..b409f58f08ec7 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/param_copy.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/param_copy.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::piecewise_linear_distribution<> D; @@ -29,4 +29,6 @@ int main() P p1 = p0; assert(p1 == p0); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/param_ctor_default.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/param_ctor_default.pass.cpp index 5d543cf5973eb..69d4d71f4e4f9 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/param_ctor_default.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/param_ctor_default.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::piecewise_linear_distribution<> D; @@ -31,4 +31,6 @@ int main() assert(dn[0] == 1); assert(dn[1] == 1); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/param_ctor_func.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/param_ctor_func.pass.cpp index 48e34c743c029..c6ea33b1f15f9 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/param_ctor_func.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/param_ctor_func.pass.cpp @@ -23,7 +23,7 @@ double fw(double x) return 2*x; } -int main() +int main(int, char**) { { typedef std::piecewise_linear_distribution<> D; @@ -66,4 +66,6 @@ int main() assert(dn[1] == 0.125); assert(dn[2] == 0.175); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/param_ctor_init_func.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/param_ctor_init_func.pass.cpp index cff26c592b8d7..3972715d0afb0 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/param_ctor_init_func.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/param_ctor_init_func.pass.cpp @@ -23,7 +23,7 @@ double f(double x) return x*2; } -int main() +int main(int, char**) { { typedef std::piecewise_linear_distribution<> D; @@ -79,4 +79,6 @@ int main() assert(dn[1] == 0.125); assert(dn[2] == 0.175); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/param_ctor_iterator.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/param_ctor_iterator.pass.cpp index 61122d6f62573..4a51902a00f4d 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/param_ctor_iterator.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/param_ctor_iterator.pass.cpp @@ -18,7 +18,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::piecewise_linear_distribution<> D; @@ -101,4 +101,6 @@ int main() assert(dn[2] == 1/4.5); assert(dn[3] == 0); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/param_eq.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/param_eq.pass.cpp index aab37f7bacbb9..e7a15d683059d 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/param_eq.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/param_eq.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::piecewise_linear_distribution<> D; @@ -37,4 +37,6 @@ int main() P p2(b, b+4, p); assert(p1 != p2); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/param_types.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/param_types.pass.cpp index 0907745d874cf..f6d65ddcc8e77 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/param_types.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/param_types.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::piecewise_linear_distribution<> D; @@ -24,4 +24,6 @@ int main() typedef param_type::distribution_type distribution_type; static_assert((std::is_same::value), ""); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/set_param.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/set_param.pass.cpp index ff96a86573bc6..c5697d7ce6485 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/set_param.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/set_param.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::piecewise_linear_distribution<> D; @@ -28,4 +28,6 @@ int main() d.param(pa); assert(d.param() == pa); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/types.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/types.pass.cpp index d53117395c40f..9d8bdf6fca13d 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/types.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/types.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::piecewise_linear_distribution<> D; @@ -28,4 +28,6 @@ int main() typedef D::result_type result_type; static_assert((std::is_same::value), ""); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/nothing_to_do.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/nothing_to_do.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.int/assign.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.int/assign.pass.cpp index 9c4d970b2a6e7..e34abf08899ed 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.int/assign.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.int/assign.pass.cpp @@ -27,7 +27,9 @@ test1() assert(d1 == d2); } -int main() +int main(int, char**) { test1(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.int/copy.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.int/copy.pass.cpp index 8ddf2f0b37010..796aebacc7dbe 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.int/copy.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.int/copy.pass.cpp @@ -25,7 +25,9 @@ test1() assert(d1 == d2); } -int main() +int main(int, char**) { test1(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.int/ctor_int_int.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.int/ctor_int_int.pass.cpp index edbc060d03827..8a4fd33589ba7 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.int/ctor_int_int.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.int/ctor_int_int.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::uniform_int_distribution<> D; @@ -37,4 +37,6 @@ int main() assert(d.a() == -6); assert(d.b() == 106); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.int/ctor_param.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.int/ctor_param.pass.cpp index c462f279cb0c1..2546810ec5716 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.int/ctor_param.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.int/ctor_param.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::uniform_int_distribution<> D; @@ -26,4 +26,6 @@ int main() assert(d.a() == 3); assert(d.b() == 8); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.int/eq.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.int/eq.pass.cpp index d1614923eb8a5..47e1c89532d49 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.int/eq.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.int/eq.pass.cpp @@ -19,7 +19,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::uniform_int_distribution<> D; @@ -33,4 +33,6 @@ int main() D d2(3, 9); assert(d1 != d2); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.int/eval.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.int/eval.pass.cpp index 9056a983b2272..a4e769bd77e65 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.int/eval.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.int/eval.pass.cpp @@ -29,7 +29,7 @@ sqr(T x) return x * x; } -int main() +int main(int, char**) { { typedef std::uniform_int_distribution<> D; @@ -452,4 +452,6 @@ int main() assert(std::abs(skew - x_skew) < 0.01); assert(std::abs((kurtosis - x_kurtosis) / x_kurtosis) < 0.01); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.int/eval_param.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.int/eval_param.pass.cpp index 3d4524ca18f89..77257a8656a82 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.int/eval_param.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.int/eval_param.pass.cpp @@ -27,7 +27,7 @@ sqr(T x) return x * x; } -int main() +int main(int, char**) { { typedef std::uniform_int_distribution<> D; @@ -72,4 +72,6 @@ int main() assert(std::abs(skew - x_skew) < 0.01); assert(std::abs((kurtosis - x_kurtosis) / x_kurtosis) < 0.01); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.int/get_param.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.int/get_param.pass.cpp index 199d9a5b24ac8..62d144fe59528 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.int/get_param.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.int/get_param.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::uniform_int_distribution<> D; @@ -25,4 +25,6 @@ int main() D d(p); assert(d.param() == p); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.int/io.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.int/io.pass.cpp index 2205a3f479c23..3e029696508e6 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.int/io.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.int/io.pass.cpp @@ -25,7 +25,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::uniform_int_distribution<> D; @@ -37,4 +37,6 @@ int main() is >> d2; assert(d1 == d2); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.int/max.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.int/max.pass.cpp index cd196ee15fa7b..58ac8571f5b11 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.int/max.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.int/max.pass.cpp @@ -16,11 +16,13 @@ #include #include -int main() +int main(int, char**) { { typedef std::uniform_int_distribution<> D; D d(3, 8); assert(d.max() == 8); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.int/min.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.int/min.pass.cpp index d1b79a7ff6d67..18b9b50457293 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.int/min.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.int/min.pass.cpp @@ -16,11 +16,13 @@ #include #include -int main() +int main(int, char**) { { typedef std::uniform_int_distribution<> D; D d(3, 8); assert(d.min() == 3); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.int/param_assign.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.int/param_assign.pass.cpp index eeb8e635cbfbe..33d677a91312e 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.int/param_assign.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.int/param_assign.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::uniform_int_distribution D; @@ -28,4 +28,6 @@ int main() assert(p.a() == 5); assert(p.b() == 10); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.int/param_copy.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.int/param_copy.pass.cpp index 33f49ede48599..1eae36b9632f0 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.int/param_copy.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.int/param_copy.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::uniform_int_distribution D; @@ -27,4 +27,6 @@ int main() assert(p.a() == 5); assert(p.b() == 10); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.int/param_ctor.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.int/param_ctor.pass.cpp index da9c08ae8f8a3..6fbf499ca5e2c 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.int/param_ctor.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.int/param_ctor.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::uniform_int_distribution D; @@ -40,4 +40,6 @@ int main() assert(p.a() == 5); assert(p.b() == 10); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.int/param_eq.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.int/param_eq.pass.cpp index 7f76fcc0a8dec..b58a965676a56 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.int/param_eq.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.int/param_eq.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::uniform_int_distribution D; @@ -33,4 +33,6 @@ int main() param_type p2(6, 10); assert(p1 != p2); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.int/param_types.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.int/param_types.pass.cpp index 84af7f98d556d..b4844a64b01bd 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.int/param_types.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.int/param_types.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::uniform_int_distribution D; @@ -24,4 +24,6 @@ int main() typedef param_type::distribution_type distribution_type; static_assert((std::is_same::value), ""); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.int/set_param.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.int/set_param.pass.cpp index a67791f3fb6bc..59b7b0728b5e9 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.int/set_param.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.int/set_param.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::uniform_int_distribution<> D; @@ -26,4 +26,6 @@ int main() d.param(p); assert(d.param() == p); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.int/types.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.int/types.pass.cpp index 5cd31e5f6683e..60ff1cb3303a6 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.int/types.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.int/types.pass.cpp @@ -16,11 +16,13 @@ #include #include -int main() +int main(int, char**) { { typedef std::uniform_int_distribution D; typedef D::result_type result_type; static_assert((std::is_same::value), ""); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.real/assign.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.real/assign.pass.cpp index ebdfd0292e461..e348c04ed60dc 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.real/assign.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.real/assign.pass.cpp @@ -27,7 +27,9 @@ test1() assert(d1 == d2); } -int main() +int main(int, char**) { test1(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.real/copy.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.real/copy.pass.cpp index d53952ccf7237..4fcc9efc3e6a8 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.real/copy.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.real/copy.pass.cpp @@ -25,7 +25,9 @@ test1() assert(d1 == d2); } -int main() +int main(int, char**) { test1(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.real/ctor_int_int.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.real/ctor_int_int.pass.cpp index 8cb0a1f4318b3..c252c5bbbe34e 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.real/ctor_int_int.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.real/ctor_int_int.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::uniform_real_distribution<> D; @@ -37,4 +37,6 @@ int main() assert(d.a() == -6); assert(d.b() == 106); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.real/ctor_param.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.real/ctor_param.pass.cpp index b2913b7722cbe..20df543ea3def 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.real/ctor_param.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.real/ctor_param.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::uniform_real_distribution<> D; @@ -26,4 +26,6 @@ int main() assert(d.a() == 3.5); assert(d.b() == 8); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.real/eq.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.real/eq.pass.cpp index ef0eecafdb367..fb318626d5529 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.real/eq.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.real/eq.pass.cpp @@ -19,7 +19,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::uniform_real_distribution<> D; @@ -33,4 +33,6 @@ int main() D d2(3, 8.1); assert(d1 != d2); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.real/eval.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.real/eval.pass.cpp index aaffa8035dbf2..99fe1f825ecaf 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.real/eval.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.real/eval.pass.cpp @@ -29,7 +29,7 @@ sqr(T x) return x * x; } -int main() +int main(int, char**) { { typedef std::uniform_real_distribution<> D; @@ -471,4 +471,6 @@ int main() assert(std::abs(skew - x_skew) < 0.01); assert(std::abs((kurtosis - x_kurtosis) / x_kurtosis) < 0.01); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.real/eval_param.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.real/eval_param.pass.cpp index 79763903b2f8f..495f0e9c34a1a 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.real/eval_param.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.real/eval_param.pass.cpp @@ -27,7 +27,7 @@ sqr(T x) return x * x; } -int main() +int main(int, char**) { { typedef std::uniform_real_distribution<> D; @@ -71,4 +71,6 @@ int main() assert(std::abs(skew - x_skew) < 0.01); assert(std::abs((kurtosis - x_kurtosis) / x_kurtosis) < 0.01); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.real/get_param.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.real/get_param.pass.cpp index 58918c24f22e0..b603755452580 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.real/get_param.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.real/get_param.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::uniform_real_distribution<> D; @@ -25,4 +25,6 @@ int main() D d(p); assert(d.param() == p); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.real/io.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.real/io.pass.cpp index afea0a72037cf..1f6eb580657a6 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.real/io.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.real/io.pass.cpp @@ -25,7 +25,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::uniform_real_distribution<> D; @@ -37,4 +37,6 @@ int main() is >> d2; assert(d1 == d2); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.real/max.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.real/max.pass.cpp index ecda47ac3c09d..ea75181f80ea1 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.real/max.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.real/max.pass.cpp @@ -16,11 +16,13 @@ #include #include -int main() +int main(int, char**) { { typedef std::uniform_real_distribution<> D; D d(3, 8); assert(d.max() == 8); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.real/min.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.real/min.pass.cpp index 77545c8f2e484..46455e8b41664 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.real/min.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.real/min.pass.cpp @@ -16,11 +16,13 @@ #include #include -int main() +int main(int, char**) { { typedef std::uniform_real_distribution<> D; D d(3, 8); assert(d.min() == 3); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.real/param_assign.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.real/param_assign.pass.cpp index 1575b7feb5209..ab4d5969377d4 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.real/param_assign.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.real/param_assign.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::uniform_real_distribution D; @@ -28,4 +28,6 @@ int main() assert(p.a() == 5); assert(p.b() == 10); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.real/param_copy.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.real/param_copy.pass.cpp index 9510b2bd518eb..24260405cfc49 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.real/param_copy.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.real/param_copy.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::uniform_real_distribution D; @@ -27,4 +27,6 @@ int main() assert(p.a() == 5); assert(p.b() == 10); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.real/param_ctor.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.real/param_ctor.pass.cpp index 67dc714e49ace..15cad423ef00b 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.real/param_ctor.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.real/param_ctor.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::uniform_real_distribution D; @@ -40,4 +40,6 @@ int main() assert(p.a() == 5); assert(p.b() == 10); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.real/param_eq.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.real/param_eq.pass.cpp index e9ee0056420dd..2127aebf482a0 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.real/param_eq.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.real/param_eq.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::uniform_real_distribution D; @@ -33,4 +33,6 @@ int main() param_type p2(6, 10); assert(p1 != p2); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.real/param_types.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.real/param_types.pass.cpp index 5c5ad23315433..d2677580e346a 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.real/param_types.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.real/param_types.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::uniform_real_distribution D; @@ -24,4 +24,6 @@ int main() typedef param_type::distribution_type distribution_type; static_assert((std::is_same::value), ""); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.real/set_param.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.real/set_param.pass.cpp index 021404ba40e64..f651d72d1b618 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.real/set_param.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.real/set_param.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::uniform_real_distribution<> D; @@ -26,4 +26,6 @@ int main() d.param(p); assert(d.param() == p); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.real/types.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.real/types.pass.cpp index 5b75a06570bc2..431b7374a0bd4 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.real/types.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.real/types.pass.cpp @@ -16,11 +16,13 @@ #include #include -int main() +int main(int, char**) { { typedef std::uniform_real_distribution D; typedef D::result_type result_type; static_assert((std::is_same::value), ""); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.eng/nothing_to_do.pass.cpp b/libcxx/test/std/numerics/rand/rand.eng/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/numerics/rand/rand.eng/nothing_to_do.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.eng/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.eng/rand.eng.lcong/assign.pass.cpp b/libcxx/test/std/numerics/rand/rand.eng/rand.eng.lcong/assign.pass.cpp index 313f4278d79f5..cfaad1a33a5a9 100644 --- a/libcxx/test/std/numerics/rand/rand.eng/rand.eng.lcong/assign.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.eng/rand.eng.lcong/assign.pass.cpp @@ -48,10 +48,12 @@ test() test1(); } -int main() +int main(int, char**) { test(); test(); test(); test(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.eng/rand.eng.lcong/copy.pass.cpp b/libcxx/test/std/numerics/rand/rand.eng/rand.eng.lcong/copy.pass.cpp index c49d361787a05..35585423442ed 100644 --- a/libcxx/test/std/numerics/rand/rand.eng/rand.eng.lcong/copy.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.eng/rand.eng.lcong/copy.pass.cpp @@ -48,10 +48,12 @@ test() test1(); } -int main() +int main(int, char**) { test(); test(); test(); test(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.eng/rand.eng.lcong/ctor_result_type.pass.cpp b/libcxx/test/std/numerics/rand/rand.eng/rand.eng.lcong/ctor_result_type.pass.cpp index 97d2ef2d29057..4f2da2f612ad6 100644 --- a/libcxx/test/std/numerics/rand/rand.eng/rand.eng.lcong/ctor_result_type.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.eng/rand.eng.lcong/ctor_result_type.pass.cpp @@ -129,7 +129,7 @@ test4() } } -int main() +int main(int, char**) { test1(); test1(); @@ -150,4 +150,6 @@ int main() test4(); test4(); test4(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.eng/rand.eng.lcong/ctor_sseq.pass.cpp b/libcxx/test/std/numerics/rand/rand.eng/rand.eng.lcong/ctor_sseq.pass.cpp index a489bcd18da72..7e82f6395f931 100644 --- a/libcxx/test/std/numerics/rand/rand.eng/rand.eng.lcong/ctor_sseq.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.eng/rand.eng.lcong/ctor_sseq.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { unsigned a[] = {3, 5, 7}; @@ -25,4 +25,6 @@ int main() std::linear_congruential_engine e2(4); assert(e1 == e2); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.eng/rand.eng.lcong/default.pass.cpp b/libcxx/test/std/numerics/rand/rand.eng/rand.eng.lcong/default.pass.cpp index 67846b06dd28b..372d98a656c71 100644 --- a/libcxx/test/std/numerics/rand/rand.eng/rand.eng.lcong/default.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.eng/rand.eng.lcong/default.pass.cpp @@ -46,10 +46,12 @@ test() test1(); } -int main() +int main(int, char**) { test(); test(); test(); test(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.eng/rand.eng.lcong/discard.pass.cpp b/libcxx/test/std/numerics/rand/rand.eng/rand.eng.lcong/discard.pass.cpp index 4848a3d76f6e3..dcbb3e0656be2 100644 --- a/libcxx/test/std/numerics/rand/rand.eng/rand.eng.lcong/discard.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.eng/rand.eng.lcong/discard.pass.cpp @@ -56,7 +56,7 @@ other() assert(e1 == e2); } -int main() +int main(int, char**) { rand0(); rand0(); @@ -69,4 +69,6 @@ int main() other(); other(); other(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.eng/rand.eng.lcong/eval.pass.cpp b/libcxx/test/std/numerics/rand/rand.eng/rand.eng.lcong/eval.pass.cpp index ec217f306f09c..3ee4d9113aceb 100644 --- a/libcxx/test/std/numerics/rand/rand.eng/rand.eng.lcong/eval.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.eng/rand.eng.lcong/eval.pass.cpp @@ -70,7 +70,7 @@ Haldir() assert(e() == 217250280); } -int main() +int main(int, char**) { randu(); randu(); @@ -83,4 +83,6 @@ int main() Haldir(); Haldir(); Haldir(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.eng/rand.eng.lcong/io.pass.cpp b/libcxx/test/std/numerics/rand/rand.eng/rand.eng.lcong/io.pass.cpp index 04159baa5d7a8..b12de7b019036 100644 --- a/libcxx/test/std/numerics/rand/rand.eng/rand.eng.lcong/io.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.eng/rand.eng.lcong/io.pass.cpp @@ -27,7 +27,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::linear_congruential_engine E; @@ -40,4 +40,6 @@ int main() is >> e2; assert(e1 == e2); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.eng/rand.eng.lcong/result_type.pass.cpp b/libcxx/test/std/numerics/rand/rand.eng/rand.eng.lcong/result_type.pass.cpp index 569e76050b322..e0bb2e02cc17a 100644 --- a/libcxx/test/std/numerics/rand/rand.eng/rand.eng.lcong/result_type.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.eng/rand.eng.lcong/result_type.pass.cpp @@ -27,10 +27,12 @@ test() T>::value), ""); } -int main() +int main(int, char**) { test(); test(); test(); test(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.eng/rand.eng.lcong/seed_result_type.pass.cpp b/libcxx/test/std/numerics/rand/rand.eng/rand.eng.lcong/seed_result_type.pass.cpp index da944061bff40..3103bf7efb521 100644 --- a/libcxx/test/std/numerics/rand/rand.eng/rand.eng.lcong/seed_result_type.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.eng/rand.eng.lcong/seed_result_type.pass.cpp @@ -30,10 +30,12 @@ test1() } } -int main() +int main(int, char**) { test1(); test1(); test1(); test1(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.eng/rand.eng.lcong/seed_sseq.pass.cpp b/libcxx/test/std/numerics/rand/rand.eng/rand.eng.lcong/seed_sseq.pass.cpp index c3aec15f6d58e..e7725bd0b581a 100644 --- a/libcxx/test/std/numerics/rand/rand.eng/rand.eng.lcong/seed_sseq.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.eng/rand.eng.lcong/seed_sseq.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { unsigned a[] = {3, 5, 7}; @@ -35,4 +35,6 @@ int main() E e2(sseq); assert(e1 == e2); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.eng/rand.eng.lcong/values.pass.cpp b/libcxx/test/std/numerics/rand/rand.eng/rand.eng.lcong/values.pass.cpp index b649b24bb4cdd..a8c86bad30679 100644 --- a/libcxx/test/std/numerics/rand/rand.eng/rand.eng.lcong/values.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.eng/rand.eng.lcong/values.pass.cpp @@ -85,10 +85,12 @@ test() test1(); } -int main() +int main(int, char**) { test(); test(); test(); test(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.eng/rand.eng.mers/assign.pass.cpp b/libcxx/test/std/numerics/rand/rand.eng/rand.eng.mers/assign.pass.cpp index 3ac6d303296f5..3e1002b061eb6 100644 --- a/libcxx/test/std/numerics/rand/rand.eng/rand.eng.mers/assign.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.eng/rand.eng.mers/assign.pass.cpp @@ -50,8 +50,10 @@ test2() assert(e1 == e2); } -int main() +int main(int, char**) { test1(); test2(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.eng/rand.eng.mers/copy.pass.cpp b/libcxx/test/std/numerics/rand/rand.eng/rand.eng.mers/copy.pass.cpp index eb0486aa784ed..b1273f1bbc32d 100644 --- a/libcxx/test/std/numerics/rand/rand.eng/rand.eng.mers/copy.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.eng/rand.eng.mers/copy.pass.cpp @@ -48,8 +48,10 @@ test2() assert(e1 == e2); } -int main() +int main(int, char**) { test1(); test2(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.eng/rand.eng.mers/ctor_result_type.pass.cpp b/libcxx/test/std/numerics/rand/rand.eng/rand.eng.mers/ctor_result_type.pass.cpp index ae89e6e79e7f4..4eca3baad324a 100644 --- a/libcxx/test/std/numerics/rand/rand.eng/rand.eng.mers/ctor_result_type.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.eng/rand.eng.mers/ctor_result_type.pass.cpp @@ -237,8 +237,10 @@ test2() assert(os.str() == a); } -int main() +int main(int, char**) { test1(); test2(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.eng/rand.eng.mers/ctor_sseq.pass.cpp b/libcxx/test/std/numerics/rand/rand.eng/rand.eng.mers/ctor_sseq.pass.cpp index d695441cd68b2..b46029a292392 100644 --- a/libcxx/test/std/numerics/rand/rand.eng/rand.eng.mers/ctor_sseq.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.eng/rand.eng.mers/ctor_sseq.pass.cpp @@ -301,8 +301,10 @@ test2() assert(os.str() == a); } -int main() +int main(int, char**) { test1(); test2(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.eng/rand.eng.mers/ctor_sseq_all_zero.pass.cpp b/libcxx/test/std/numerics/rand/rand.eng/rand.eng.mers/ctor_sseq_all_zero.pass.cpp index 9f298ea4995bc..a2489cf63660a 100644 --- a/libcxx/test/std/numerics/rand/rand.eng/rand.eng.mers/ctor_sseq_all_zero.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.eng/rand.eng.mers/ctor_sseq_all_zero.pass.cpp @@ -71,10 +71,12 @@ void test(void) { assert(e() == X0); } -int main() { +int main(int, char**) { // Test for k == 1: word_size <= 32. test(); // Test for k == 2: (32 < word_size <= 64). test(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.eng/rand.eng.mers/default.pass.cpp b/libcxx/test/std/numerics/rand/rand.eng/rand.eng.mers/default.pass.cpp index 2d91db790da08..35364f312a932 100644 --- a/libcxx/test/std/numerics/rand/rand.eng/rand.eng.mers/default.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.eng/rand.eng.mers/default.pass.cpp @@ -37,8 +37,10 @@ test2() assert(e1() == 14514284786278117030ull); } -int main() +int main(int, char**) { test1(); test2(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.eng/rand.eng.mers/discard.pass.cpp b/libcxx/test/std/numerics/rand/rand.eng/rand.eng.mers/discard.pass.cpp index 58d59975defe4..750afb1e8a112 100644 --- a/libcxx/test/std/numerics/rand/rand.eng/rand.eng.mers/discard.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.eng/rand.eng.mers/discard.pass.cpp @@ -47,8 +47,10 @@ test2() assert(e1 == e2); } -int main() +int main(int, char**) { test1(); test2(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.eng/rand.eng.mers/eval.pass.cpp b/libcxx/test/std/numerics/rand/rand.eng/rand.eng.mers/eval.pass.cpp index 9d44192f3f388..03e87dad8c45f 100644 --- a/libcxx/test/std/numerics/rand/rand.eng/rand.eng.mers/eval.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.eng/rand.eng.mers/eval.pass.cpp @@ -37,8 +37,10 @@ test2() assert(e() == 13109570281517897720ull); } -int main() +int main(int, char**) { test1(); test2(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.eng/rand.eng.mers/io.pass.cpp b/libcxx/test/std/numerics/rand/rand.eng/rand.eng.mers/io.pass.cpp index 8f7c699ee6510..cbc764e8dd6eb 100644 --- a/libcxx/test/std/numerics/rand/rand.eng/rand.eng.mers/io.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.eng/rand.eng.mers/io.pass.cpp @@ -61,8 +61,10 @@ test2() assert(e1 == e2); } -int main() +int main(int, char**) { test1(); test2(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.eng/rand.eng.mers/result_type.pass.cpp b/libcxx/test/std/numerics/rand/rand.eng/rand.eng.mers/result_type.pass.cpp index ce0506043c989..7987d65748e74 100644 --- a/libcxx/test/std/numerics/rand/rand.eng/rand.eng.mers/result_type.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.eng/rand.eng.mers/result_type.pass.cpp @@ -36,8 +36,10 @@ test2() std::uint_fast64_t>::value), ""); } -int main() +int main(int, char**) { test1(); test2(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.eng/rand.eng.mers/seed_result_type.pass.cpp b/libcxx/test/std/numerics/rand/rand.eng/rand.eng.mers/seed_result_type.pass.cpp index ef529ffcf6b24..ff7d07374cbf1 100644 --- a/libcxx/test/std/numerics/rand/rand.eng/rand.eng.mers/seed_result_type.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.eng/rand.eng.mers/seed_result_type.pass.cpp @@ -44,8 +44,10 @@ test2() } } -int main() +int main(int, char**) { test1(); test2(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.eng/rand.eng.mers/seed_sseq.pass.cpp b/libcxx/test/std/numerics/rand/rand.eng/rand.eng.mers/seed_sseq.pass.cpp index 3d05ce779cf0e..8ad2ec289f685 100644 --- a/libcxx/test/std/numerics/rand/rand.eng/rand.eng.mers/seed_sseq.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.eng/rand.eng.mers/seed_sseq.pass.cpp @@ -42,8 +42,10 @@ test2() assert(e1 == e2); } -int main() +int main(int, char**) { test1(); test2(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.eng/rand.eng.mers/values.pass.cpp b/libcxx/test/std/numerics/rand/rand.eng/rand.eng.mers/values.pass.cpp index 62ac9f516a87c..1af1d85b25fe4 100644 --- a/libcxx/test/std/numerics/rand/rand.eng/rand.eng.mers/values.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.eng/rand.eng.mers/values.pass.cpp @@ -126,8 +126,10 @@ test2() where(E::default_seed); } -int main() +int main(int, char**) { test1(); test2(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.eng/rand.eng.sub/assign.pass.cpp b/libcxx/test/std/numerics/rand/rand.eng/rand.eng.sub/assign.pass.cpp index c05831165f8b9..e6cce1b2da70f 100644 --- a/libcxx/test/std/numerics/rand/rand.eng/rand.eng.sub/assign.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.eng/rand.eng.sub/assign.pass.cpp @@ -48,8 +48,10 @@ test2() assert(e1 == e2); } -int main() +int main(int, char**) { test1(); test2(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.eng/rand.eng.sub/copy.pass.cpp b/libcxx/test/std/numerics/rand/rand.eng/rand.eng.sub/copy.pass.cpp index 70a2b5b2cf778..c39f39858e417 100644 --- a/libcxx/test/std/numerics/rand/rand.eng/rand.eng.sub/copy.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.eng/rand.eng.sub/copy.pass.cpp @@ -46,8 +46,10 @@ test2() assert(e1 == e2); } -int main() +int main(int, char**) { test1(); test2(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.eng/rand.eng.sub/ctor_result_type.pass.cpp b/libcxx/test/std/numerics/rand/rand.eng/rand.eng.sub/ctor_result_type.pass.cpp index 3045b06c92f36..5a178e82e6f41 100644 --- a/libcxx/test/std/numerics/rand/rand.eng/rand.eng.sub/ctor_result_type.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.eng/rand.eng.sub/ctor_result_type.pass.cpp @@ -43,8 +43,10 @@ test2() assert(os.str() == a); } -int main() +int main(int, char**) { test1(); test2(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.eng/rand.eng.sub/ctor_sseq.pass.cpp b/libcxx/test/std/numerics/rand/rand.eng/rand.eng.sub/ctor_sseq.pass.cpp index 361a0fc25dd33..0ed496e71af0c 100644 --- a/libcxx/test/std/numerics/rand/rand.eng/rand.eng.sub/ctor_sseq.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.eng/rand.eng.sub/ctor_sseq.pass.cpp @@ -47,8 +47,10 @@ test2() assert(os.str() == a); } -int main() +int main(int, char**) { test1(); test2(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.eng/rand.eng.sub/default.pass.cpp b/libcxx/test/std/numerics/rand/rand.eng/rand.eng.sub/default.pass.cpp index 13dede1aa949f..dbc4c5b4cb82c 100644 --- a/libcxx/test/std/numerics/rand/rand.eng/rand.eng.sub/default.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.eng/rand.eng.sub/default.pass.cpp @@ -34,8 +34,10 @@ test2() assert(e1() == 23459059301164ull); } -int main() +int main(int, char**) { test1(); test2(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.eng/rand.eng.sub/discard.pass.cpp b/libcxx/test/std/numerics/rand/rand.eng/rand.eng.sub/discard.pass.cpp index f4824cd9a1ca7..4d039289bffbb 100644 --- a/libcxx/test/std/numerics/rand/rand.eng/rand.eng.sub/discard.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.eng/rand.eng.sub/discard.pass.cpp @@ -44,8 +44,10 @@ test2() assert(e1 == e2); } -int main() +int main(int, char**) { test1(); test2(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.eng/rand.eng.sub/eval.pass.cpp b/libcxx/test/std/numerics/rand/rand.eng/rand.eng.sub/eval.pass.cpp index 818d66c441e58..d8d03c09ee5a9 100644 --- a/libcxx/test/std/numerics/rand/rand.eng/rand.eng.sub/eval.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.eng/rand.eng.sub/eval.pass.cpp @@ -34,8 +34,10 @@ test2() assert(e() == 276846226770426ull); } -int main() +int main(int, char**) { test1(); test2(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.eng/rand.eng.sub/io.pass.cpp b/libcxx/test/std/numerics/rand/rand.eng/rand.eng.sub/io.pass.cpp index 88d0910d2e719..d3eeda3be4a8f 100644 --- a/libcxx/test/std/numerics/rand/rand.eng/rand.eng.sub/io.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.eng/rand.eng.sub/io.pass.cpp @@ -55,8 +55,10 @@ test2() assert(e1 == e2); } -int main() +int main(int, char**) { test1(); test2(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.eng/rand.eng.sub/result_type.pass.cpp b/libcxx/test/std/numerics/rand/rand.eng/rand.eng.sub/result_type.pass.cpp index cc0fa903adc49..5312bb1ff3aff 100644 --- a/libcxx/test/std/numerics/rand/rand.eng/rand.eng.sub/result_type.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.eng/rand.eng.sub/result_type.pass.cpp @@ -34,8 +34,10 @@ test2() std::uint_fast64_t>::value), ""); } -int main() +int main(int, char**) { test1(); test2(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.eng/rand.eng.sub/seed_result_type.pass.cpp b/libcxx/test/std/numerics/rand/rand.eng/rand.eng.sub/seed_result_type.pass.cpp index 201ec38d1e594..637841a679bfd 100644 --- a/libcxx/test/std/numerics/rand/rand.eng/rand.eng.sub/seed_result_type.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.eng/rand.eng.sub/seed_result_type.pass.cpp @@ -42,8 +42,10 @@ test2() } } -int main() +int main(int, char**) { test1(); test2(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.eng/rand.eng.sub/seed_sseq.pass.cpp b/libcxx/test/std/numerics/rand/rand.eng/rand.eng.sub/seed_sseq.pass.cpp index 2a178388ce075..85199c0ef3b85 100644 --- a/libcxx/test/std/numerics/rand/rand.eng/rand.eng.sub/seed_sseq.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.eng/rand.eng.sub/seed_sseq.pass.cpp @@ -40,8 +40,10 @@ test2() assert(e1 == e2); } -int main() +int main(int, char**) { test1(); test2(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.eng/rand.eng.sub/values.pass.cpp b/libcxx/test/std/numerics/rand/rand.eng/rand.eng.sub/values.pass.cpp index 758a5957f120a..a877eff1383be 100644 --- a/libcxx/test/std/numerics/rand/rand.eng/rand.eng.sub/values.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.eng/rand.eng.sub/values.pass.cpp @@ -74,8 +74,10 @@ test2() where(E::default_seed); } -int main() +int main(int, char**) { test1(); test2(); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.predef/default_random_engine.pass.cpp b/libcxx/test/std/numerics/rand/rand.predef/default_random_engine.pass.cpp index a5b9334c61766..b06cd4656610d 100644 --- a/libcxx/test/std/numerics/rand/rand.predef/default_random_engine.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.predef/default_random_engine.pass.cpp @@ -15,9 +15,11 @@ #include "test_macros.h" -int main() +int main(int, char**) { std::default_random_engine e; e.discard(9999); LIBCPP_ASSERT(e() == 399268537u); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.predef/knuth_b.pass.cpp b/libcxx/test/std/numerics/rand/rand.predef/knuth_b.pass.cpp index a06bbe966efe8..d81f788e5e052 100644 --- a/libcxx/test/std/numerics/rand/rand.predef/knuth_b.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.predef/knuth_b.pass.cpp @@ -13,9 +13,11 @@ #include #include -int main() +int main(int, char**) { std::knuth_b e; e.discard(9999); assert(e() == 1112339016u); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.predef/minstd_rand.pass.cpp b/libcxx/test/std/numerics/rand/rand.predef/minstd_rand.pass.cpp index 9a44b4c0ab005..d38b009e5f8b1 100644 --- a/libcxx/test/std/numerics/rand/rand.predef/minstd_rand.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.predef/minstd_rand.pass.cpp @@ -14,9 +14,11 @@ #include #include -int main() +int main(int, char**) { std::minstd_rand e; e.discard(9999); assert(e() == 399268537u); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.predef/minstd_rand0.pass.cpp b/libcxx/test/std/numerics/rand/rand.predef/minstd_rand0.pass.cpp index f676f5f00e9ff..4e4f07eae781c 100644 --- a/libcxx/test/std/numerics/rand/rand.predef/minstd_rand0.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.predef/minstd_rand0.pass.cpp @@ -14,9 +14,11 @@ #include #include -int main() +int main(int, char**) { std::minstd_rand0 e; e.discard(9999); assert(e() == 1043618065u); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.predef/mt19937.pass.cpp b/libcxx/test/std/numerics/rand/rand.predef/mt19937.pass.cpp index 2816661632531..16390964f58a6 100644 --- a/libcxx/test/std/numerics/rand/rand.predef/mt19937.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.predef/mt19937.pass.cpp @@ -18,9 +18,11 @@ #include #include -int main() +int main(int, char**) { std::mt19937 e; e.discard(9999); assert(e() == 4123659995u); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.predef/mt19937_64.pass.cpp b/libcxx/test/std/numerics/rand/rand.predef/mt19937_64.pass.cpp index 80ffb429e54da..c6a3b4ebdf91d 100644 --- a/libcxx/test/std/numerics/rand/rand.predef/mt19937_64.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.predef/mt19937_64.pass.cpp @@ -18,9 +18,11 @@ #include #include -int main() +int main(int, char**) { std::mt19937_64 e; e.discard(9999); assert(e() == 9981545732273789042ull); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.predef/ranlux24.pass.cpp b/libcxx/test/std/numerics/rand/rand.predef/ranlux24.pass.cpp index c58f09dcc806e..9805d1add87db 100644 --- a/libcxx/test/std/numerics/rand/rand.predef/ranlux24.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.predef/ranlux24.pass.cpp @@ -13,9 +13,11 @@ #include #include -int main() +int main(int, char**) { std::ranlux24 e; e.discard(9999); assert(e() == 9901578u); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.predef/ranlux24_base.pass.cpp b/libcxx/test/std/numerics/rand/rand.predef/ranlux24_base.pass.cpp index 30d94e696637e..21c68699bfaee 100644 --- a/libcxx/test/std/numerics/rand/rand.predef/ranlux24_base.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.predef/ranlux24_base.pass.cpp @@ -13,9 +13,11 @@ #include #include -int main() +int main(int, char**) { std::ranlux24_base e; e.discard(9999); assert(e() == 7937952u); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.predef/ranlux48.pass.cpp b/libcxx/test/std/numerics/rand/rand.predef/ranlux48.pass.cpp index 22c45db40b182..2ab37e1c72885 100644 --- a/libcxx/test/std/numerics/rand/rand.predef/ranlux48.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.predef/ranlux48.pass.cpp @@ -13,9 +13,11 @@ #include #include -int main() +int main(int, char**) { std::ranlux48 e; e.discard(9999); assert(e() == 249142670248501ull); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.predef/ranlux48_base.pass.cpp b/libcxx/test/std/numerics/rand/rand.predef/ranlux48_base.pass.cpp index 8faefbb4cc231..93bb14c5c939d 100644 --- a/libcxx/test/std/numerics/rand/rand.predef/ranlux48_base.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.predef/ranlux48_base.pass.cpp @@ -13,9 +13,11 @@ #include #include -int main() +int main(int, char**) { std::ranlux48_base e; e.discard(9999); assert(e() == 61839128582725ull); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.req/nothing_to_do.pass.cpp b/libcxx/test/std/numerics/rand/rand.req/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/numerics/rand/rand.req/nothing_to_do.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.req/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.req/rand.req.adapt/nothing_to_do.pass.cpp b/libcxx/test/std/numerics/rand/rand.req/rand.req.adapt/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/numerics/rand/rand.req/rand.req.adapt/nothing_to_do.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.req/rand.req.adapt/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.req/rand.req.dst/nothing_to_do.pass.cpp b/libcxx/test/std/numerics/rand/rand.req/rand.req.dst/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/numerics/rand/rand.req/rand.req.dst/nothing_to_do.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.req/rand.req.dst/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.req/rand.req.eng/nothing_to_do.pass.cpp b/libcxx/test/std/numerics/rand/rand.req/rand.req.eng/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/numerics/rand/rand.req/rand.req.eng/nothing_to_do.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.req/rand.req.eng/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.req/rand.req.genl/nothing_to_do.pass.cpp b/libcxx/test/std/numerics/rand/rand.req/rand.req.genl/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/numerics/rand/rand.req/rand.req.genl/nothing_to_do.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.req/rand.req.genl/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.req/rand.req.seedseq/nothing_to_do.pass.cpp b/libcxx/test/std/numerics/rand/rand.req/rand.req.seedseq/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/numerics/rand/rand.req/rand.req.seedseq/nothing_to_do.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.req/rand.req.seedseq/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.req/rand.req.urng/nothing_to_do.pass.cpp b/libcxx/test/std/numerics/rand/rand.req/rand.req.urng/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/numerics/rand/rand.req/rand.req.urng/nothing_to_do.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.req/rand.req.urng/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.util/nothing_to_do.pass.cpp b/libcxx/test/std/numerics/rand/rand.util/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/numerics/rand/rand.util/nothing_to_do.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.util/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.util/rand.util.canonical/generate_canonical.pass.cpp b/libcxx/test/std/numerics/rand/rand.util/rand.util.canonical/generate_canonical.pass.cpp index 62e129b989f43..a05c0846af70b 100644 --- a/libcxx/test/std/numerics/rand/rand.util/rand.util.canonical/generate_canonical.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.util/rand.util.canonical/generate_canonical.pass.cpp @@ -16,7 +16,7 @@ #include "truncate_fp.h" -int main() +int main(int, char**) { { typedef std::minstd_rand0 E; @@ -98,4 +98,6 @@ int main() (282475249 - E::min()) * (E::max() - E::min() + F(1))) / ((E::max() - E::min() + F(1)) * (E::max() - E::min() + F(1))))); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.util/rand.util.seedseq/assign.fail.cpp b/libcxx/test/std/numerics/rand/rand.util/rand.util.seedseq/assign.fail.cpp index f9a5bc05ecd7d..de06a5e9b57d7 100644 --- a/libcxx/test/std/numerics/rand/rand.util/rand.util.seedseq/assign.fail.cpp +++ b/libcxx/test/std/numerics/rand/rand.util/rand.util.seedseq/assign.fail.cpp @@ -14,9 +14,11 @@ #include -int main() +int main(int, char**) { std::seed_seq s0; std::seed_seq s; s = s0; + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.util/rand.util.seedseq/copy.fail.cpp b/libcxx/test/std/numerics/rand/rand.util/rand.util.seedseq/copy.fail.cpp index 5e6ed7a01d4e9..7c3c38ea7a1dd 100644 --- a/libcxx/test/std/numerics/rand/rand.util/rand.util.seedseq/copy.fail.cpp +++ b/libcxx/test/std/numerics/rand/rand.util/rand.util.seedseq/copy.fail.cpp @@ -14,8 +14,10 @@ #include -int main() +int main(int, char**) { std::seed_seq s0; std::seed_seq s(s0); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.util/rand.util.seedseq/default.pass.cpp b/libcxx/test/std/numerics/rand/rand.util/rand.util.seedseq/default.pass.cpp index 1002ea8a440b6..87608e63c04dc 100644 --- a/libcxx/test/std/numerics/rand/rand.util/rand.util.seedseq/default.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.util/rand.util.seedseq/default.pass.cpp @@ -15,8 +15,10 @@ #include #include -int main() +int main(int, char**) { std::seed_seq s; assert(s.size() == 0); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.util/rand.util.seedseq/generate.pass.cpp b/libcxx/test/std/numerics/rand/rand.util/rand.util.seedseq/generate.pass.cpp index db32abddc6fcf..e328777782b8b 100644 --- a/libcxx/test/std/numerics/rand/rand.util/rand.util.seedseq/generate.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.util/rand.util.seedseq/generate.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { // These numbers generated from a slightly altered version of dSFMT @@ -801,4 +801,6 @@ int main() for (int i = 0; i < n; ++i) assert(a[i] == b[i]); } + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.util/rand.util.seedseq/initializer_list.pass.cpp b/libcxx/test/std/numerics/rand/rand.util/rand.util.seedseq/initializer_list.pass.cpp index 2d1656a3c03c3..656981b1a9303 100644 --- a/libcxx/test/std/numerics/rand/rand.util/rand.util.seedseq/initializer_list.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.util/rand.util.seedseq/initializer_list.pass.cpp @@ -18,7 +18,7 @@ #include #include -int main() +int main(int, char**) { std::seed_seq s= {5, 4, 3, 2, 1}; assert(s.size() == 5); @@ -29,4 +29,6 @@ int main() assert(b[2] == 3); assert(b[3] == 2); assert(b[4] == 1); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.util/rand.util.seedseq/iterator.pass.cpp b/libcxx/test/std/numerics/rand/rand.util/rand.util.seedseq/iterator.pass.cpp index 3b1a79ec39518..10f7b34727e37 100644 --- a/libcxx/test/std/numerics/rand/rand.util/rand.util.seedseq/iterator.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.util/rand.util.seedseq/iterator.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { unsigned a[5] = {5, 4, 3, 2, 1}; std::seed_seq s(a, a+5); @@ -28,4 +28,6 @@ int main() assert(b[2] == 3); assert(b[3] == 2); assert(b[4] == 1); + + return 0; } diff --git a/libcxx/test/std/numerics/rand/rand.util/rand.util.seedseq/types.pass.cpp b/libcxx/test/std/numerics/rand/rand.util/rand.util.seedseq/types.pass.cpp index d169811db2985..50cfa7d59ccd9 100644 --- a/libcxx/test/std/numerics/rand/rand.util/rand.util.seedseq/types.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.util/rand.util.seedseq/types.pass.cpp @@ -17,7 +17,9 @@ #include #include -int main() +int main(int, char**) { static_assert((std::is_same::value), ""); + + return 0; } diff --git a/libcxx/test/std/re/nothing_to_do.pass.cpp b/libcxx/test/std/re/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/re/nothing_to_do.pass.cpp +++ b/libcxx/test/std/re/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/re/re.alg/nothing_to_do.pass.cpp b/libcxx/test/std/re/re.alg/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/re/re.alg/nothing_to_do.pass.cpp +++ b/libcxx/test/std/re/re.alg/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/re/re.alg/re.alg.match/awk.pass.cpp b/libcxx/test/std/re/re.alg/re.alg.match/awk.pass.cpp index 095980c605535..43fc9b89cb850 100644 --- a/libcxx/test/std/re/re.alg/re.alg.match/awk.pass.cpp +++ b/libcxx/test/std/re/re.alg/re.alg.match/awk.pass.cpp @@ -27,7 +27,7 @@ #include "platform_support.h" // locale name macros -int main() +int main(int, char**) { { std::cmatch m; @@ -1391,4 +1391,5 @@ int main() assert(m.position(0) == 0); assert(m.str(0) == s); } + return 0; } diff --git a/libcxx/test/std/re/re.alg/re.alg.match/basic.fail.cpp b/libcxx/test/std/re/re.alg/re.alg.match/basic.fail.cpp index bc5e4b75d9392..d71fc280a29f2 100644 --- a/libcxx/test/std/re/re.alg/re.alg.match/basic.fail.cpp +++ b/libcxx/test/std/re/re.alg/re.alg.match/basic.fail.cpp @@ -25,11 +25,13 @@ #error #endif -int main() +int main(int, char**) { { std::smatch m; std::regex re{"*"}; std::regex_match(std::string("abcde"), m, re); } + + return 0; } diff --git a/libcxx/test/std/re/re.alg/re.alg.match/basic.pass.cpp b/libcxx/test/std/re/re.alg/re.alg.match/basic.pass.cpp index d6a0b0da71da8..b2fa6e941356d 100644 --- a/libcxx/test/std/re/re.alg/re.alg.match/basic.pass.cpp +++ b/libcxx/test/std/re/re.alg/re.alg.match/basic.pass.cpp @@ -30,7 +30,7 @@ #include "platform_support.h" // locale name macros -int main() +int main(int, char**) { { std::cmatch m; @@ -1367,4 +1367,6 @@ int main() assert(m.position(0) == 0); assert(m.str(0) == s); } + + return 0; } diff --git a/libcxx/test/std/re/re.alg/re.alg.match/ecma.pass.cpp b/libcxx/test/std/re/re.alg/re.alg.match/ecma.pass.cpp index c1e910c77aa2e..e15533da6f317 100644 --- a/libcxx/test/std/re/re.alg/re.alg.match/ecma.pass.cpp +++ b/libcxx/test/std/re/re.alg/re.alg.match/ecma.pass.cpp @@ -30,7 +30,7 @@ #include "platform_support.h" // locale name macros -int main() +int main(int, char**) { { std::cmatch m; @@ -1391,4 +1391,6 @@ int main() assert(m.position(0) == 0); assert(m.str(0) == s); } + + return 0; } diff --git a/libcxx/test/std/re/re.alg/re.alg.match/egrep.pass.cpp b/libcxx/test/std/re/re.alg/re.alg.match/egrep.pass.cpp index 8789e7d73706c..4e1b6940c09e1 100644 --- a/libcxx/test/std/re/re.alg/re.alg.match/egrep.pass.cpp +++ b/libcxx/test/std/re/re.alg/re.alg.match/egrep.pass.cpp @@ -21,7 +21,7 @@ #include "test_macros.h" #include "test_iterators.h" -int main() +int main(int, char**) { { std::cmatch m; @@ -78,4 +78,6 @@ int main() assert(m.position(0) == 0); assert(m.str(0) == "tourna"); } + + return 0; } diff --git a/libcxx/test/std/re/re.alg/re.alg.match/exponential.pass.cpp b/libcxx/test/std/re/re.alg/re.alg.match/exponential.pass.cpp index f23bef36ec1d7..a1ba80f268110 100644 --- a/libcxx/test/std/re/re.alg/re.alg.match/exponential.pass.cpp +++ b/libcxx/test/std/re/re.alg/re.alg.match/exponential.pass.cpp @@ -23,7 +23,7 @@ #include #include "test_macros.h" -int main() { +int main(int, char**) { for (std::regex_constants::syntax_option_type op : {std::regex::ECMAScript, std::regex::extended, std::regex::egrep, std::regex::awk}) { diff --git a/libcxx/test/std/re/re.alg/re.alg.match/extended.pass.cpp b/libcxx/test/std/re/re.alg/re.alg.match/extended.pass.cpp index b04d750a3f3ad..9415505faaf82 100644 --- a/libcxx/test/std/re/re.alg/re.alg.match/extended.pass.cpp +++ b/libcxx/test/std/re/re.alg/re.alg.match/extended.pass.cpp @@ -30,7 +30,7 @@ #include "platform_support.h" // locale name macros -int main() +int main(int, char**) { { std::cmatch m; @@ -1363,4 +1363,6 @@ int main() assert(m.position(0) == 0); assert(m.str(0) == s); } + + return 0; } diff --git a/libcxx/test/std/re/re.alg/re.alg.match/grep.pass.cpp b/libcxx/test/std/re/re.alg/re.alg.match/grep.pass.cpp index 0c68dca69835d..0f75d618c0c02 100644 --- a/libcxx/test/std/re/re.alg/re.alg.match/grep.pass.cpp +++ b/libcxx/test/std/re/re.alg/re.alg.match/grep.pass.cpp @@ -21,7 +21,7 @@ #include "test_macros.h" #include "test_iterators.h" -int main() +int main(int, char**) { { std::cmatch m; @@ -46,4 +46,6 @@ int main() std::regex_constants::grep))); assert(m.size() == 0); } + + return 0; } diff --git a/libcxx/test/std/re/re.alg/re.alg.match/inverted_character_classes.pass.cpp b/libcxx/test/std/re/re.alg/re.alg.match/inverted_character_classes.pass.cpp index 67bfd96f4dd8d..d48d86ee64cf2 100644 --- a/libcxx/test/std/re/re.alg/re.alg.match/inverted_character_classes.pass.cpp +++ b/libcxx/test/std/re/re.alg/re.alg.match/inverted_character_classes.pass.cpp @@ -15,7 +15,7 @@ #include -int main() { +int main(int, char**) { assert(std::regex_match("X", std::regex("[X]"))); assert(std::regex_match("X", std::regex("[XY]"))); assert(!std::regex_match("X", std::regex("[^X]"))); @@ -40,4 +40,6 @@ int main() { assert(!std::regex_match("_", std::regex("[\\W]"))); assert(std::regex_match("X", std::regex("[^\\W]"))); assert(std::regex_match("_", std::regex("[^\\W]"))); + + return 0; } diff --git a/libcxx/test/std/re/re.alg/re.alg.match/lookahead_capture.pass.cpp b/libcxx/test/std/re/re.alg/re.alg.match/lookahead_capture.pass.cpp index ec8467f4e63c4..1550f3728563a 100644 --- a/libcxx/test/std/re/re.alg/re.alg.match/lookahead_capture.pass.cpp +++ b/libcxx/test/std/re/re.alg/re.alg.match/lookahead_capture.pass.cpp @@ -24,7 +24,7 @@ #include "test_macros.h" #include "test_iterators.h" -int main() +int main(int, char**) { { std::regex re("^(?=(.))a$"); @@ -95,4 +95,6 @@ int main() assert(m[3] == "a"); assert(m[4] == ""); } + + return 0; } diff --git a/libcxx/test/std/re/re.alg/re.alg.match/parse_curly_brackets.pass.cpp b/libcxx/test/std/re/re.alg/re.alg.match/parse_curly_brackets.pass.cpp index b6d3e1ae334ee..291798cfcc9a9 100644 --- a/libcxx/test/std/re/re.alg/re.alg.match/parse_curly_brackets.pass.cpp +++ b/libcxx/test/std/re/re.alg/re.alg.match/parse_curly_brackets.pass.cpp @@ -62,10 +62,12 @@ test4() assert((std::regex_match(target, smatch, regex))); } -int main() +int main(int, char**) { test1(); test2(); test3(); test4(); + + return 0; } diff --git a/libcxx/test/std/re/re.alg/re.alg.replace/exponential.pass.cpp b/libcxx/test/std/re/re.alg/re.alg.replace/exponential.pass.cpp index 715aa0affe47b..868c3d8350b37 100644 --- a/libcxx/test/std/re/re.alg/re.alg.replace/exponential.pass.cpp +++ b/libcxx/test/std/re/re.alg/re.alg.replace/exponential.pass.cpp @@ -24,7 +24,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { try { std::regex re("a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?aaaaaaaaaaaaaaaaaaaa"); @@ -35,4 +35,5 @@ int main() } catch (const std::regex_error &e) { assert(e.code() == std::regex_constants::error_complexity); } + return 0; } diff --git a/libcxx/test/std/re/re.alg/re.alg.replace/test1.pass.cpp b/libcxx/test/std/re/re.alg/re.alg.replace/test1.pass.cpp index df68aae9381fc..7e5332aaff872 100644 --- a/libcxx/test/std/re/re.alg/re.alg.replace/test1.pass.cpp +++ b/libcxx/test/std/re/re.alg/re.alg.replace/test1.pass.cpp @@ -24,7 +24,7 @@ #include "test_macros.h" #include "test_iterators.h" -int main() +int main(int, char**) { { std::regex phone_numbers("\\d{3}-\\d{4}"); @@ -104,4 +104,6 @@ int main() assert(r.base() == buf+12); assert(buf == std::string("123-555-1234")); } + + return 0; } diff --git a/libcxx/test/std/re/re.alg/re.alg.replace/test2.pass.cpp b/libcxx/test/std/re/re.alg/re.alg.replace/test2.pass.cpp index 1cfaec6797e3d..d5e3b64a3ebe9 100644 --- a/libcxx/test/std/re/re.alg/re.alg.replace/test2.pass.cpp +++ b/libcxx/test/std/re/re.alg/re.alg.replace/test2.pass.cpp @@ -24,7 +24,7 @@ #include "test_macros.h" #include "test_iterators.h" -int main() +int main(int, char**) { { std::regex phone_numbers("\\d{3}-\\d{4}"); @@ -104,4 +104,6 @@ int main() assert(r.base() == buf+12); assert(buf == std::string("123-555-1234")); } + + return 0; } diff --git a/libcxx/test/std/re/re.alg/re.alg.replace/test3.pass.cpp b/libcxx/test/std/re/re.alg/re.alg.replace/test3.pass.cpp index ebfb20d7bd57f..09ecc53a9f998 100644 --- a/libcxx/test/std/re/re.alg/re.alg.replace/test3.pass.cpp +++ b/libcxx/test/std/re/re.alg/re.alg.replace/test3.pass.cpp @@ -20,7 +20,7 @@ #include #include "test_macros.h" -int main() +int main(int, char**) { { std::regex phone_numbers("\\d{3}-\\d{4}"); @@ -70,4 +70,6 @@ int main() std::regex_constants::format_no_copy); assert(r == "123-555-1234"); } + + return 0; } diff --git a/libcxx/test/std/re/re.alg/re.alg.replace/test4.pass.cpp b/libcxx/test/std/re/re.alg/re.alg.replace/test4.pass.cpp index 88816e3d7ac22..4d567ed1f644f 100644 --- a/libcxx/test/std/re/re.alg/re.alg.replace/test4.pass.cpp +++ b/libcxx/test/std/re/re.alg/re.alg.replace/test4.pass.cpp @@ -19,7 +19,7 @@ #include #include "test_macros.h" -int main() +int main(int, char**) { { std::regex phone_numbers("\\d{3}-\\d{4}"); @@ -69,4 +69,6 @@ int main() std::regex_constants::format_no_copy); assert(r == "123-555-1234"); } + + return 0; } diff --git a/libcxx/test/std/re/re.alg/re.alg.replace/test5.pass.cpp b/libcxx/test/std/re/re.alg/re.alg.replace/test5.pass.cpp index bcff51eddd131..585a60f8780e1 100644 --- a/libcxx/test/std/re/re.alg/re.alg.replace/test5.pass.cpp +++ b/libcxx/test/std/re/re.alg/re.alg.replace/test5.pass.cpp @@ -20,7 +20,7 @@ #include #include "test_macros.h" -int main() +int main(int, char**) { { std::regex phone_numbers("\\d{3}-\\d{4}"); @@ -70,4 +70,6 @@ int main() std::regex_constants::format_no_copy); assert(r == "123-555-1234"); } + + return 0; } diff --git a/libcxx/test/std/re/re.alg/re.alg.replace/test6.pass.cpp b/libcxx/test/std/re/re.alg/re.alg.replace/test6.pass.cpp index 923230aea4b9f..66a910172c497 100644 --- a/libcxx/test/std/re/re.alg/re.alg.replace/test6.pass.cpp +++ b/libcxx/test/std/re/re.alg/re.alg.replace/test6.pass.cpp @@ -20,7 +20,7 @@ #include #include "test_macros.h" -int main() +int main(int, char**) { { std::regex phone_numbers("\\d{3}-\\d{4}"); @@ -70,4 +70,6 @@ int main() std::regex_constants::format_no_copy); assert(r == "123-555-1234"); } + + return 0; } diff --git a/libcxx/test/std/re/re.alg/re.alg.search/awk.pass.cpp b/libcxx/test/std/re/re.alg/re.alg.search/awk.pass.cpp index 13f9646f42b90..0f8fb14f586f4 100644 --- a/libcxx/test/std/re/re.alg/re.alg.search/awk.pass.cpp +++ b/libcxx/test/std/re/re.alg/re.alg.search/awk.pass.cpp @@ -30,7 +30,7 @@ #include "platform_support.h" // locale name macros -int main() +int main(int, char**) { { std::cmatch m; @@ -1574,4 +1574,6 @@ int main() assert(m.position(0) == 0); assert(m.str(0) == s); } + + return 0; } diff --git a/libcxx/test/std/re/re.alg/re.alg.search/backup.pass.cpp b/libcxx/test/std/re/re.alg/re.alg.search/backup.pass.cpp index 710cf226c971f..d27124a8d8039 100644 --- a/libcxx/test/std/re/re.alg/re.alg.search/backup.pass.cpp +++ b/libcxx/test/std/re/re.alg/re.alg.search/backup.pass.cpp @@ -21,7 +21,7 @@ #include #include "test_macros.h" -int main() +int main(int, char**) { // This regex_iterator uses regex_search(__wrap_iter<_Iter> __first, ...) // Test for https://bugs.llvm.org/show_bug.cgi?id=16240 fixed in r185273. @@ -60,4 +60,6 @@ int main() ++it; assert(it == end); } + + return 0; } diff --git a/libcxx/test/std/re/re.alg/re.alg.search/basic.fail.cpp b/libcxx/test/std/re/re.alg/re.alg.search/basic.fail.cpp index d84b1c97bdc7c..fb9677f7e9392 100644 --- a/libcxx/test/std/re/re.alg/re.alg.search/basic.fail.cpp +++ b/libcxx/test/std/re/re.alg/re.alg.search/basic.fail.cpp @@ -25,11 +25,13 @@ #error #endif -int main() +int main(int, char**) { { std::smatch m; std::regex re{"*"}; std::regex_search(std::string("abcde"), m, re); } + + return 0; } diff --git a/libcxx/test/std/re/re.alg/re.alg.search/basic.pass.cpp b/libcxx/test/std/re/re.alg/re.alg.search/basic.pass.cpp index ee919b223b64b..bd96c9830c080 100644 --- a/libcxx/test/std/re/re.alg/re.alg.search/basic.pass.cpp +++ b/libcxx/test/std/re/re.alg/re.alg.search/basic.pass.cpp @@ -30,7 +30,7 @@ #include "platform_support.h" // locale name macros -int main() +int main(int, char**) { { std::cmatch m; @@ -1547,4 +1547,6 @@ int main() assert(m.position(0) == 0); assert(m.str(0) == s); } + + return 0; } diff --git a/libcxx/test/std/re/re.alg/re.alg.search/ecma.pass.cpp b/libcxx/test/std/re/re.alg/re.alg.search/ecma.pass.cpp index afc5a005b6aa5..7e74caa0808aa 100644 --- a/libcxx/test/std/re/re.alg/re.alg.search/ecma.pass.cpp +++ b/libcxx/test/std/re/re.alg/re.alg.search/ecma.pass.cpp @@ -30,7 +30,7 @@ #include "platform_support.h" // locale name macros -int main() +int main(int, char**) { { std::cmatch m; @@ -1589,4 +1589,6 @@ int main() assert(m.position(0) == 0); assert(m.str(0) == s); } + + return 0; } diff --git a/libcxx/test/std/re/re.alg/re.alg.search/egrep.pass.cpp b/libcxx/test/std/re/re.alg/re.alg.search/egrep.pass.cpp index 4e32952608805..df8560f5fa8c4 100644 --- a/libcxx/test/std/re/re.alg/re.alg.search/egrep.pass.cpp +++ b/libcxx/test/std/re/re.alg/re.alg.search/egrep.pass.cpp @@ -21,7 +21,7 @@ #include "test_macros.h" #include "test_iterators.h" -int main() +int main(int, char**) { { std::cmatch m; @@ -87,4 +87,6 @@ int main() assert(m.position(0) == 0); assert(m.str(0) == "tourna"); } + + return 0; } diff --git a/libcxx/test/std/re/re.alg/re.alg.search/exponential.pass.cpp b/libcxx/test/std/re/re.alg/re.alg.search/exponential.pass.cpp index 6de3bbffd6726..a9eb2b2b94e65 100644 --- a/libcxx/test/std/re/re.alg/re.alg.search/exponential.pass.cpp +++ b/libcxx/test/std/re/re.alg/re.alg.search/exponential.pass.cpp @@ -23,7 +23,7 @@ #include #include "test_macros.h" -int main() { +int main(int, char**) { for (std::regex_constants::syntax_option_type op : {std::regex::ECMAScript, std::regex::extended, std::regex::egrep, std::regex::awk}) { diff --git a/libcxx/test/std/re/re.alg/re.alg.search/extended.pass.cpp b/libcxx/test/std/re/re.alg/re.alg.search/extended.pass.cpp index 6c9cabeff24b2..62e4822dbd17a 100644 --- a/libcxx/test/std/re/re.alg/re.alg.search/extended.pass.cpp +++ b/libcxx/test/std/re/re.alg/re.alg.search/extended.pass.cpp @@ -30,7 +30,7 @@ #include "platform_support.h" // locale name macros -int main() +int main(int, char**) { { std::cmatch m; @@ -1543,4 +1543,6 @@ int main() assert(m.position(0) == 0); assert(m.str(0) == s); } + + return 0; } diff --git a/libcxx/test/std/re/re.alg/re.alg.search/grep.pass.cpp b/libcxx/test/std/re/re.alg/re.alg.search/grep.pass.cpp index 8844b4e6fb95a..29300a818119b 100644 --- a/libcxx/test/std/re/re.alg/re.alg.search/grep.pass.cpp +++ b/libcxx/test/std/re/re.alg/re.alg.search/grep.pass.cpp @@ -50,7 +50,7 @@ void fuzz_tests() // patterns that the fuzzer has found #endif } -int main() +int main(int, char**) { { std::cmatch m; @@ -85,4 +85,6 @@ int main() assert(m.str(0) == ""); } fuzz_tests(); + + return 0; } diff --git a/libcxx/test/std/re/re.alg/re.alg.search/invert_neg_word_search.pass.cpp b/libcxx/test/std/re/re.alg/re.alg.search/invert_neg_word_search.pass.cpp index 98343f55401d2..63fd5ae57aec9 100644 --- a/libcxx/test/std/re/re.alg/re.alg.search/invert_neg_word_search.pass.cpp +++ b/libcxx/test/std/re/re.alg/re.alg.search/invert_neg_word_search.pass.cpp @@ -20,7 +20,7 @@ // PR34310 -int main() +int main(int, char**) { assert(std::regex_search("HelloWorld", std::regex("[^\\W]"))); assert(std::regex_search("_", std::regex("[^\\W]"))); diff --git a/libcxx/test/std/re/re.alg/re.alg.search/lookahead.pass.cpp b/libcxx/test/std/re/re.alg/re.alg.search/lookahead.pass.cpp index b4a47f09b9e67..7846eca2abec4 100644 --- a/libcxx/test/std/re/re.alg/re.alg.search/lookahead.pass.cpp +++ b/libcxx/test/std/re/re.alg/re.alg.search/lookahead.pass.cpp @@ -21,8 +21,10 @@ #include #include "test_macros.h" -int main() +int main(int, char**) { assert(!std::regex_search("ab", std::regex("(?=^)b"))); assert(!std::regex_search("ab", std::regex("a(?=^)b"))); + + return 0; } diff --git a/libcxx/test/std/re/re.alg/re.alg.search/no_update_pos.pass.cpp b/libcxx/test/std/re/re.alg/re.alg.search/no_update_pos.pass.cpp index 8bfcfa007fb1f..73158dc53c912 100644 --- a/libcxx/test/std/re/re.alg/re.alg.search/no_update_pos.pass.cpp +++ b/libcxx/test/std/re/re.alg/re.alg.search/no_update_pos.pass.cpp @@ -19,7 +19,7 @@ #include #include "test_macros.h" -int main() +int main(int, char**) { // Iterating over /^a/ should yield one instance at the beginning // of the text. @@ -35,4 +35,6 @@ int main() ++it; assert(it == end); + + return 0; } diff --git a/libcxx/test/std/re/re.alg/re.except/nothing_to_do.pass.cpp b/libcxx/test/std/re/re.alg/re.except/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/re/re.alg/re.except/nothing_to_do.pass.cpp +++ b/libcxx/test/std/re/re.alg/re.except/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/re/re.badexp/regex_error.pass.cpp b/libcxx/test/std/re/re.badexp/regex_error.pass.cpp index efcc44f6a46a8..a3f4476b05d2d 100644 --- a/libcxx/test/std/re/re.badexp/regex_error.pass.cpp +++ b/libcxx/test/std/re/re.badexp/regex_error.pass.cpp @@ -21,7 +21,7 @@ #include #include "test_macros.h" -int main() +int main(int, char**) { { std::regex_error e(std::regex_constants::error_collate); @@ -93,4 +93,6 @@ int main() assert(e.what() == std::string("There was insufficient memory to determine whether the regular " "expression could match the specified character sequence.")); } + + return 0; } diff --git a/libcxx/test/std/re/re.const/nothing_to_do.pass.cpp b/libcxx/test/std/re/re.const/nothing_to_do.pass.cpp index 02fe32ece4841..779762e7e995d 100644 --- a/libcxx/test/std/re/re.const/nothing_to_do.pass.cpp +++ b/libcxx/test/std/re/re.const/nothing_to_do.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/re/re.const/re.err/error_type.pass.cpp b/libcxx/test/std/re/re.const/re.err/error_type.pass.cpp index 4369e01706add..51979a5113fdb 100644 --- a/libcxx/test/std/re/re.const/re.err/error_type.pass.cpp +++ b/libcxx/test/std/re/re.const/re.err/error_type.pass.cpp @@ -35,7 +35,7 @@ #include #include "test_macros.h" -int main() +int main(int, char**) { assert(std::regex_constants::error_collate != 0); assert(std::regex_constants::error_ctype != 0); @@ -140,4 +140,6 @@ int main() assert(std::regex_constants::error_badrepeat != std::regex_constants::error_stack); assert(std::regex_constants::error_complexity != std::regex_constants::error_stack); + + return 0; } diff --git a/libcxx/test/std/re/re.const/re.matchflag/match_flag_type.pass.cpp b/libcxx/test/std/re/re.const/re.matchflag/match_flag_type.pass.cpp index bed42547bca1b..812601463c142 100644 --- a/libcxx/test/std/re/re.const/re.matchflag/match_flag_type.pass.cpp +++ b/libcxx/test/std/re/re.const/re.matchflag/match_flag_type.pass.cpp @@ -35,7 +35,7 @@ #include #include "test_macros.h" -int main() +int main(int, char**) { assert(std::regex_constants::match_default == 0); assert(std::regex_constants::match_not_bol != 0); @@ -125,4 +125,6 @@ int main() e1 &= e2; e1 |= e2; e1 ^= e2; + + return 0; } diff --git a/libcxx/test/std/re/re.const/re.matchflag/match_not_bol.pass.cpp b/libcxx/test/std/re/re.const/re.matchflag/match_not_bol.pass.cpp index e327366304208..82395e2f2d4d5 100644 --- a/libcxx/test/std/re/re.const/re.matchflag/match_not_bol.pass.cpp +++ b/libcxx/test/std/re/re.const/re.matchflag/match_not_bol.pass.cpp @@ -18,7 +18,7 @@ #include #include "test_macros.h" -int main() +int main(int, char**) { { std::string target = "foo"; @@ -47,4 +47,6 @@ int main() assert( std::regex_search(target, re)); assert( std::regex_search(target, re, std::regex_constants::match_not_bol)); } + + return 0; } diff --git a/libcxx/test/std/re/re.const/re.matchflag/match_not_eol.pass.cpp b/libcxx/test/std/re/re.const/re.matchflag/match_not_eol.pass.cpp index 3d238c5d019de..8b13c68bcc3e5 100644 --- a/libcxx/test/std/re/re.const/re.matchflag/match_not_eol.pass.cpp +++ b/libcxx/test/std/re/re.const/re.matchflag/match_not_eol.pass.cpp @@ -18,7 +18,7 @@ #include #include "test_macros.h" -int main() +int main(int, char**) { { std::string target = "foo"; @@ -47,4 +47,6 @@ int main() assert( std::regex_search(target, re)); assert( std::regex_search(target, re, std::regex_constants::match_not_eol)); } + + return 0; } diff --git a/libcxx/test/std/re/re.const/re.matchflag/match_not_null.pass.cpp b/libcxx/test/std/re/re.const/re.matchflag/match_not_null.pass.cpp index d3389e6b65367..645f79a0d85c9 100644 --- a/libcxx/test/std/re/re.const/re.matchflag/match_not_null.pass.cpp +++ b/libcxx/test/std/re/re.const/re.matchflag/match_not_null.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { // When match_not_null is on, the regex engine should reject empty matches and // move on to try other solutions. diff --git a/libcxx/test/std/re/re.const/re.synopt/syntax_option_type.pass.cpp b/libcxx/test/std/re/re.const/re.synopt/syntax_option_type.pass.cpp index 7af7e8cf4d14d..49ce2b5c4827b 100644 --- a/libcxx/test/std/re/re.const/re.synopt/syntax_option_type.pass.cpp +++ b/libcxx/test/std/re/re.const/re.synopt/syntax_option_type.pass.cpp @@ -32,7 +32,7 @@ #include #include "test_macros.h" -int main() +int main(int, char**) { assert(std::regex_constants::icase != 0); assert(std::regex_constants::nosubs != 0); @@ -111,4 +111,6 @@ int main() e1 &= e2; e1 |= e2; e1 ^= e2; + + return 0; } diff --git a/libcxx/test/std/re/re.def/defns.regex.collating.element/nothing_to_do.pass.cpp b/libcxx/test/std/re/re.def/defns.regex.collating.element/nothing_to_do.pass.cpp index 02fe32ece4841..779762e7e995d 100644 --- a/libcxx/test/std/re/re.def/defns.regex.collating.element/nothing_to_do.pass.cpp +++ b/libcxx/test/std/re/re.def/defns.regex.collating.element/nothing_to_do.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/re/re.def/defns.regex.finite.state.machine/nothing_to_do.pass.cpp b/libcxx/test/std/re/re.def/defns.regex.finite.state.machine/nothing_to_do.pass.cpp index 02fe32ece4841..779762e7e995d 100644 --- a/libcxx/test/std/re/re.def/defns.regex.finite.state.machine/nothing_to_do.pass.cpp +++ b/libcxx/test/std/re/re.def/defns.regex.finite.state.machine/nothing_to_do.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/re/re.def/defns.regex.format.specifier/nothing_to_do.pass.cpp b/libcxx/test/std/re/re.def/defns.regex.format.specifier/nothing_to_do.pass.cpp index 02fe32ece4841..779762e7e995d 100644 --- a/libcxx/test/std/re/re.def/defns.regex.format.specifier/nothing_to_do.pass.cpp +++ b/libcxx/test/std/re/re.def/defns.regex.format.specifier/nothing_to_do.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/re/re.def/defns.regex.matched/nothing_to_do.pass.cpp b/libcxx/test/std/re/re.def/defns.regex.matched/nothing_to_do.pass.cpp index 02fe32ece4841..779762e7e995d 100644 --- a/libcxx/test/std/re/re.def/defns.regex.matched/nothing_to_do.pass.cpp +++ b/libcxx/test/std/re/re.def/defns.regex.matched/nothing_to_do.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/re/re.def/defns.regex.primary.equivalence.class/nothing_to_do.pass.cpp b/libcxx/test/std/re/re.def/defns.regex.primary.equivalence.class/nothing_to_do.pass.cpp index 02fe32ece4841..779762e7e995d 100644 --- a/libcxx/test/std/re/re.def/defns.regex.primary.equivalence.class/nothing_to_do.pass.cpp +++ b/libcxx/test/std/re/re.def/defns.regex.primary.equivalence.class/nothing_to_do.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/re/re.def/defns.regex.regular.expression/nothing_to_do.pass.cpp b/libcxx/test/std/re/re.def/defns.regex.regular.expression/nothing_to_do.pass.cpp index 02fe32ece4841..779762e7e995d 100644 --- a/libcxx/test/std/re/re.def/defns.regex.regular.expression/nothing_to_do.pass.cpp +++ b/libcxx/test/std/re/re.def/defns.regex.regular.expression/nothing_to_do.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/re/re.def/defns.regex.subexpression/nothing_to_do.pass.cpp b/libcxx/test/std/re/re.def/defns.regex.subexpression/nothing_to_do.pass.cpp index 02fe32ece4841..779762e7e995d 100644 --- a/libcxx/test/std/re/re.def/defns.regex.subexpression/nothing_to_do.pass.cpp +++ b/libcxx/test/std/re/re.def/defns.regex.subexpression/nothing_to_do.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/re/re.def/nothing_to_do.pass.cpp b/libcxx/test/std/re/re.def/nothing_to_do.pass.cpp index 02fe32ece4841..779762e7e995d 100644 --- a/libcxx/test/std/re/re.def/nothing_to_do.pass.cpp +++ b/libcxx/test/std/re/re.def/nothing_to_do.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/re/re.general/nothing_to_do.pass.cpp b/libcxx/test/std/re/re.general/nothing_to_do.pass.cpp index 02fe32ece4841..779762e7e995d 100644 --- a/libcxx/test/std/re/re.general/nothing_to_do.pass.cpp +++ b/libcxx/test/std/re/re.general/nothing_to_do.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/re/re.grammar/excessive_brace_count.pass.cpp b/libcxx/test/std/re/re.grammar/excessive_brace_count.pass.cpp index 49bd06e5cac11..a5f28d2eec0d4 100644 --- a/libcxx/test/std/re/re.grammar/excessive_brace_count.pass.cpp +++ b/libcxx/test/std/re/re.grammar/excessive_brace_count.pass.cpp @@ -16,7 +16,7 @@ #include #include "test_macros.h" -int main() { +int main(int, char**) { for (std::regex_constants::syntax_option_type op : {std::regex::basic, std::regex::grep}) { try { diff --git a/libcxx/test/std/re/re.grammar/nothing_to_do.pass.cpp b/libcxx/test/std/re/re.grammar/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/re/re.grammar/nothing_to_do.pass.cpp +++ b/libcxx/test/std/re/re.grammar/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/re/re.iter/nothing_to_do.pass.cpp b/libcxx/test/std/re/re.iter/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/re/re.iter/nothing_to_do.pass.cpp +++ b/libcxx/test/std/re/re.iter/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/re/re.iter/re.regiter/re.regiter.cnstr/cnstr.fail.cpp b/libcxx/test/std/re/re.iter/re.regiter/re.regiter.cnstr/cnstr.fail.cpp index 17cce2cb4c459..34d1ce6ed8e6d 100644 --- a/libcxx/test/std/re/re.iter/re.regiter/re.regiter.cnstr/cnstr.fail.cpp +++ b/libcxx/test/std/re/re.iter/re.regiter/re.regiter.cnstr/cnstr.fail.cpp @@ -24,7 +24,7 @@ #error #endif -int main() +int main(int, char**) { { const char phone_book[] = "555-1234, 555-2345, 555-3456"; @@ -32,4 +32,6 @@ int main() std::begin(phone_book), std::end(phone_book), std::regex("\\d{3}-\\d{4}")); } + + return 0; } diff --git a/libcxx/test/std/re/re.iter/re.regiter/re.regiter.cnstr/cnstr.pass.cpp b/libcxx/test/std/re/re.iter/re.regiter/re.regiter.cnstr/cnstr.pass.cpp index d944806fded52..a6d1059745105 100644 --- a/libcxx/test/std/re/re.iter/re.regiter/re.regiter.cnstr/cnstr.pass.cpp +++ b/libcxx/test/std/re/re.iter/re.regiter/re.regiter.cnstr/cnstr.pass.cpp @@ -18,7 +18,7 @@ #include #include "test_macros.h" -int main() +int main(int, char**) { { std::regex phone_numbers("\\d{3}-\\d{4}"); @@ -41,4 +41,6 @@ int main() ++i; assert(i == std::cregex_iterator()); } + + return 0; } diff --git a/libcxx/test/std/re/re.iter/re.regiter/re.regiter.cnstr/default.pass.cpp b/libcxx/test/std/re/re.iter/re.regiter/re.regiter.cnstr/default.pass.cpp index ca5670bbb47e7..75bd9cab5f21f 100644 --- a/libcxx/test/std/re/re.iter/re.regiter/re.regiter.cnstr/default.pass.cpp +++ b/libcxx/test/std/re/re.iter/re.regiter/re.regiter.cnstr/default.pass.cpp @@ -25,8 +25,10 @@ test() assert(i1 == I()); } -int main() +int main(int, char**) { test(); test(); + + return 0; } diff --git a/libcxx/test/std/re/re.iter/re.regiter/re.regiter.comp/tested_elsewhere.pass.cpp b/libcxx/test/std/re/re.iter/re.regiter/re.regiter.comp/tested_elsewhere.pass.cpp index 55b506be101a9..f7f71bc8b7c5a 100644 --- a/libcxx/test/std/re/re.iter/re.regiter/re.regiter.comp/tested_elsewhere.pass.cpp +++ b/libcxx/test/std/re/re.iter/re.regiter/re.regiter.comp/tested_elsewhere.pass.cpp @@ -13,6 +13,8 @@ // bool operator==(const regex_iterator& right) const; // bool operator!=(const regex_iterator& right) const; -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/re/re.iter/re.regiter/re.regiter.deref/deref.pass.cpp b/libcxx/test/std/re/re.iter/re.regiter/re.regiter.deref/deref.pass.cpp index 2643cebc76b03..11b12b2eef8c4 100644 --- a/libcxx/test/std/re/re.iter/re.regiter/re.regiter.deref/deref.pass.cpp +++ b/libcxx/test/std/re/re.iter/re.regiter/re.regiter.deref/deref.pass.cpp @@ -16,7 +16,7 @@ #include #include "test_macros.h" -int main() +int main(int, char**) { { std::regex phone_numbers("\\d{3}-\\d{4}"); @@ -39,4 +39,6 @@ int main() ++i; assert(i == std::cregex_iterator()); } + + return 0; } diff --git a/libcxx/test/std/re/re.iter/re.regiter/re.regiter.incr/post.pass.cpp b/libcxx/test/std/re/re.iter/re.regiter/re.regiter.incr/post.pass.cpp index be4126e3e33f5..ad65f7c13b495 100644 --- a/libcxx/test/std/re/re.iter/re.regiter/re.regiter.incr/post.pass.cpp +++ b/libcxx/test/std/re/re.iter/re.regiter/re.regiter.incr/post.pass.cpp @@ -16,7 +16,7 @@ #include #include "test_macros.h" -int main() +int main(int, char**) { { std::regex phone_numbers("\\d{3}-\\d{4}"); @@ -112,4 +112,6 @@ int main() ++i; assert(i == e); } + + return 0; } diff --git a/libcxx/test/std/re/re.iter/re.regiter/types.pass.cpp b/libcxx/test/std/re/re.iter/re.regiter/types.pass.cpp index 07c3fa64bc758..b96fec78a3c05 100644 --- a/libcxx/test/std/re/re.iter/re.regiter/types.pass.cpp +++ b/libcxx/test/std/re/re.iter/re.regiter/types.pass.cpp @@ -38,8 +38,10 @@ test() static_assert((std::is_same::value), ""); } -int main() +int main(int, char**) { test(); test(); + + return 0; } diff --git a/libcxx/test/std/re/re.iter/re.tokiter/re.tokiter.cnstr/array.fail.cpp b/libcxx/test/std/re/re.iter/re.tokiter/re.tokiter.cnstr/array.fail.cpp index bddf58210c5ae..a03fd52c03562 100644 --- a/libcxx/test/std/re/re.iter/re.tokiter/re.tokiter.cnstr/array.fail.cpp +++ b/libcxx/test/std/re/re.iter/re.tokiter/re.tokiter.cnstr/array.fail.cpp @@ -26,7 +26,7 @@ #error #endif -int main() +int main(int, char**) { { std::regex phone_numbers("\\d{3}-(\\d{4})"); @@ -35,4 +35,6 @@ int main() std::cregex_token_iterator i(std::begin(phone_book), std::end(phone_book)-1, std::regex("\\d{3}-\\d{4}"), indices); } + + return 0; } diff --git a/libcxx/test/std/re/re.iter/re.tokiter/re.tokiter.cnstr/array.pass.cpp b/libcxx/test/std/re/re.iter/re.tokiter/re.tokiter.cnstr/array.pass.cpp index eadfbdb44d495..254909a92e03d 100644 --- a/libcxx/test/std/re/re.iter/re.tokiter/re.tokiter.cnstr/array.pass.cpp +++ b/libcxx/test/std/re/re.iter/re.tokiter/re.tokiter.cnstr/array.pass.cpp @@ -21,7 +21,7 @@ #include #include "test_macros.h" -int main() +int main(int, char**) { { std::regex phone_numbers("\\d{3}-(\\d{4})"); @@ -61,4 +61,6 @@ int main() ++i; assert(i == std::cregex_token_iterator()); } + + return 0; } diff --git a/libcxx/test/std/re/re.iter/re.tokiter/re.tokiter.cnstr/default.pass.cpp b/libcxx/test/std/re/re.iter/re.tokiter/re.tokiter.cnstr/default.pass.cpp index cdbf1a5917dd1..bb70095f139f3 100644 --- a/libcxx/test/std/re/re.iter/re.tokiter/re.tokiter.cnstr/default.pass.cpp +++ b/libcxx/test/std/re/re.iter/re.tokiter/re.tokiter.cnstr/default.pass.cpp @@ -25,8 +25,10 @@ test() assert(i1 == I()); } -int main() +int main(int, char**) { test(); test(); + + return 0; } diff --git a/libcxx/test/std/re/re.iter/re.tokiter/re.tokiter.cnstr/init.fail.cpp b/libcxx/test/std/re/re.iter/re.tokiter/re.tokiter.cnstr/init.fail.cpp index 87a227af05804..b6913e6b32d12 100644 --- a/libcxx/test/std/re/re.iter/re.tokiter/re.tokiter.cnstr/init.fail.cpp +++ b/libcxx/test/std/re/re.iter/re.tokiter/re.tokiter.cnstr/init.fail.cpp @@ -24,7 +24,7 @@ #error #endif -int main() +int main(int, char**) { { std::regex phone_numbers("\\d{3}-(\\d{4})"); @@ -32,4 +32,6 @@ int main() std::cregex_token_iterator i(std::begin(phone_book), std::end(phone_book)-1, std::regex("\\d{3}-\\d{4}"), {-1, 0, 1}); } + + return 0; } diff --git a/libcxx/test/std/re/re.iter/re.tokiter/re.tokiter.cnstr/init.pass.cpp b/libcxx/test/std/re/re.iter/re.tokiter/re.tokiter.cnstr/init.pass.cpp index 8ecd0bab44f4e..322c2682daf76 100644 --- a/libcxx/test/std/re/re.iter/re.tokiter/re.tokiter.cnstr/init.pass.cpp +++ b/libcxx/test/std/re/re.iter/re.tokiter/re.tokiter.cnstr/init.pass.cpp @@ -22,7 +22,7 @@ #include #include "test_macros.h" -int main() +int main(int, char**) { { std::regex phone_numbers("\\d{3}-(\\d{4})"); @@ -61,4 +61,6 @@ int main() ++i; assert(i == std::cregex_token_iterator()); } + + return 0; } diff --git a/libcxx/test/std/re/re.iter/re.tokiter/re.tokiter.cnstr/int.fail.cpp b/libcxx/test/std/re/re.iter/re.tokiter/re.tokiter.cnstr/int.fail.cpp index 82e0678182fab..3c39d4983e26c 100644 --- a/libcxx/test/std/re/re.iter/re.tokiter/re.tokiter.cnstr/int.fail.cpp +++ b/libcxx/test/std/re/re.iter/re.tokiter/re.tokiter.cnstr/int.fail.cpp @@ -23,7 +23,7 @@ #error #endif -int main() +int main(int, char**) { { std::regex phone_numbers("\\d{3}-\\d{4}"); @@ -31,4 +31,6 @@ int main() std::cregex_token_iterator i(std::begin(phone_book), std::end(phone_book)-1, std::regex("\\d{3}-\\d{4}"), -1); } + + return 0; } diff --git a/libcxx/test/std/re/re.iter/re.tokiter/re.tokiter.cnstr/int.pass.cpp b/libcxx/test/std/re/re.iter/re.tokiter/re.tokiter.cnstr/int.pass.cpp index c2213a0af48ed..1e5ba2eca12a0 100644 --- a/libcxx/test/std/re/re.iter/re.tokiter/re.tokiter.cnstr/int.pass.cpp +++ b/libcxx/test/std/re/re.iter/re.tokiter/re.tokiter.cnstr/int.pass.cpp @@ -19,7 +19,7 @@ #include #include "test_macros.h" -int main() +int main(int, char**) { { std::regex phone_numbers("\\d{3}-\\d{4}"); @@ -72,4 +72,6 @@ int main() ++i; assert(i == std::cregex_token_iterator()); } + + return 0; } diff --git a/libcxx/test/std/re/re.iter/re.tokiter/re.tokiter.cnstr/vector.fail.cpp b/libcxx/test/std/re/re.iter/re.tokiter/re.tokiter.cnstr/vector.fail.cpp index 9e8fe86ed28ea..9b07df9d1a783 100644 --- a/libcxx/test/std/re/re.iter/re.tokiter/re.tokiter.cnstr/vector.fail.cpp +++ b/libcxx/test/std/re/re.iter/re.tokiter/re.tokiter.cnstr/vector.fail.cpp @@ -25,7 +25,7 @@ #error #endif -int main() +int main(int, char**) { { std::regex phone_numbers("\\d{3}-(\\d{4})"); @@ -36,4 +36,6 @@ int main() std::cregex_token_iterator i(std::begin(phone_book), std::end(phone_book)-1, std::regex("\\d{3}-\\d{4}"), v); } + + return 0; } diff --git a/libcxx/test/std/re/re.iter/re.tokiter/re.tokiter.cnstr/vector.pass.cpp b/libcxx/test/std/re/re.iter/re.tokiter/re.tokiter.cnstr/vector.pass.cpp index 5f31c57953389..1d77deb918583 100644 --- a/libcxx/test/std/re/re.iter/re.tokiter/re.tokiter.cnstr/vector.pass.cpp +++ b/libcxx/test/std/re/re.iter/re.tokiter/re.tokiter.cnstr/vector.pass.cpp @@ -20,7 +20,7 @@ #include #include "test_macros.h" -int main() +int main(int, char**) { { std::regex phone_numbers("\\d{3}-(\\d{4})"); @@ -125,4 +125,6 @@ int main() ++i; assert(i == std::cregex_token_iterator()); } + + return 0; } diff --git a/libcxx/test/std/re/re.iter/re.tokiter/re.tokiter.comp/equal.pass.cpp b/libcxx/test/std/re/re.iter/re.tokiter/re.tokiter.comp/equal.pass.cpp index f4de410b2114d..1c602010319e8 100644 --- a/libcxx/test/std/re/re.iter/re.tokiter/re.tokiter.comp/equal.pass.cpp +++ b/libcxx/test/std/re/re.iter/re.tokiter/re.tokiter.comp/equal.pass.cpp @@ -17,7 +17,7 @@ #include #include "test_macros.h" -int main() +int main(int, char**) { { std::regex phone_numbers("\\d{3}-\\d{4}"); @@ -33,4 +33,6 @@ int main() assert(!(i2 == i)); assert(i2 != i); } + + return 0; } diff --git a/libcxx/test/std/re/re.iter/re.tokiter/re.tokiter.deref/deref.pass.cpp b/libcxx/test/std/re/re.iter/re.tokiter/re.tokiter.deref/deref.pass.cpp index edde79c16419f..facd243675b0c 100644 --- a/libcxx/test/std/re/re.iter/re.tokiter/re.tokiter.deref/deref.pass.cpp +++ b/libcxx/test/std/re/re.iter/re.tokiter/re.tokiter.deref/deref.pass.cpp @@ -16,7 +16,7 @@ #include #include "test_macros.h" -int main() +int main(int, char**) { { std::regex phone_numbers("\\d{3}-\\d{4}"); @@ -69,4 +69,6 @@ int main() ++i; assert(i == std::cregex_token_iterator()); } + + return 0; } diff --git a/libcxx/test/std/re/re.iter/re.tokiter/re.tokiter.incr/post.pass.cpp b/libcxx/test/std/re/re.iter/re.tokiter/re.tokiter.incr/post.pass.cpp index c4095ebf6ec21..15f1bb7c85167 100644 --- a/libcxx/test/std/re/re.iter/re.tokiter/re.tokiter.incr/post.pass.cpp +++ b/libcxx/test/std/re/re.iter/re.tokiter/re.tokiter.incr/post.pass.cpp @@ -16,7 +16,7 @@ #include #include "test_macros.h" -int main() +int main(int, char**) { { std::regex phone_numbers("\\d{3}-\\d{4}"); @@ -132,4 +132,6 @@ int main() i++; assert(i == std::cregex_token_iterator()); } + + return 0; } diff --git a/libcxx/test/std/re/re.iter/re.tokiter/types.pass.cpp b/libcxx/test/std/re/re.iter/re.tokiter/types.pass.cpp index 58803aa1ad323..73ad58f4eecfb 100644 --- a/libcxx/test/std/re/re.iter/re.tokiter/types.pass.cpp +++ b/libcxx/test/std/re/re.iter/re.tokiter/types.pass.cpp @@ -38,8 +38,10 @@ test() static_assert((std::is_same::value), ""); } -int main() +int main(int, char**) { test(); test(); + + return 0; } diff --git a/libcxx/test/std/re/re.regex/re.regex.assign/assign.il.pass.cpp b/libcxx/test/std/re/re.regex/re.regex.assign/assign.il.pass.cpp index daaac65bed643..532a72073e689 100644 --- a/libcxx/test/std/re/re.regex/re.regex.assign/assign.il.pass.cpp +++ b/libcxx/test/std/re/re.regex/re.regex.assign/assign.il.pass.cpp @@ -20,7 +20,7 @@ #include #include "test_macros.h" -int main() +int main(int, char**) { std::regex r2; r2.assign({'(', 'a', '(', '[', 'b', 'c', ']', ')', ')'}); @@ -30,4 +30,6 @@ int main() r2.assign({'(', 'a', '(', '[', 'b', 'c', ']', ')', ')'}, std::regex::extended); assert(r2.flags() == std::regex::extended); assert(r2.mark_count() == 2); + + return 0; } diff --git a/libcxx/test/std/re/re.regex/re.regex.assign/assign.pass.cpp b/libcxx/test/std/re/re.regex/re.regex.assign/assign.pass.cpp index 9507ea310120a..c580ab96cbab0 100644 --- a/libcxx/test/std/re/re.regex/re.regex.assign/assign.pass.cpp +++ b/libcxx/test/std/re/re.regex/re.regex.assign/assign.pass.cpp @@ -16,7 +16,7 @@ #include #include "test_macros.h" -int main() +int main(int, char**) { std::regex r1("(a([bc]))"); std::regex r2; @@ -34,4 +34,6 @@ int main() assert(r2.mark_count() == 2); assert(std::regex_search("ab", r2)); #endif + + return 0; } diff --git a/libcxx/test/std/re/re.regex/re.regex.assign/assign_iter_iter_flag.pass.cpp b/libcxx/test/std/re/re.regex/re.regex.assign/assign_iter_iter_flag.pass.cpp index 9eba95b33bfe9..dd32c9466df2d 100644 --- a/libcxx/test/std/re/re.regex/re.regex.assign/assign_iter_iter_flag.pass.cpp +++ b/libcxx/test/std/re/re.regex/re.regex.assign/assign_iter_iter_flag.pass.cpp @@ -21,7 +21,7 @@ #include "test_macros.h" #include "test_iterators.h" -int main() +int main(int, char**) { typedef input_iterator I; typedef forward_iterator F; @@ -43,4 +43,6 @@ int main() r2.assign(F(s4.begin()), F(s4.end()), std::regex::extended); assert(r2.flags() == std::regex::extended); assert(r2.mark_count() == 2); + + return 0; } diff --git a/libcxx/test/std/re/re.regex/re.regex.assign/assign_ptr_flag.pass.cpp b/libcxx/test/std/re/re.regex/re.regex.assign/assign_ptr_flag.pass.cpp index 30c7281daccb7..9445bbaf9ff6f 100644 --- a/libcxx/test/std/re/re.regex/re.regex.assign/assign_ptr_flag.pass.cpp +++ b/libcxx/test/std/re/re.regex/re.regex.assign/assign_ptr_flag.pass.cpp @@ -16,7 +16,7 @@ #include #include "test_macros.h" -int main() +int main(int, char**) { std::regex r2; r2.assign("(a([bc]))"); @@ -26,4 +26,6 @@ int main() r2.assign("(a([bc]))", std::regex::extended); assert(r2.flags() == std::regex::extended); assert(r2.mark_count() == 2); + + return 0; } diff --git a/libcxx/test/std/re/re.regex/re.regex.assign/assign_ptr_size_flag.pass.cpp b/libcxx/test/std/re/re.regex/re.regex.assign/assign_ptr_size_flag.pass.cpp index 08fdf871dcc98..cdbdae430543b 100644 --- a/libcxx/test/std/re/re.regex/re.regex.assign/assign_ptr_size_flag.pass.cpp +++ b/libcxx/test/std/re/re.regex/re.regex.assign/assign_ptr_size_flag.pass.cpp @@ -16,10 +16,12 @@ #include #include "test_macros.h" -int main() +int main(int, char**) { std::regex r2; r2.assign("(a([bc]))", 9, std::regex::extended); assert(r2.flags() == std::regex::extended); assert(r2.mark_count() == 2); + + return 0; } diff --git a/libcxx/test/std/re/re.regex/re.regex.assign/assign_string_flag.pass.cpp b/libcxx/test/std/re/re.regex/re.regex.assign/assign_string_flag.pass.cpp index 7ea385967c346..4b1bcef9a6b3b 100644 --- a/libcxx/test/std/re/re.regex/re.regex.assign/assign_string_flag.pass.cpp +++ b/libcxx/test/std/re/re.regex/re.regex.assign/assign_string_flag.pass.cpp @@ -18,7 +18,7 @@ #include #include "test_macros.h" -int main() +int main(int, char**) { std::regex r2; r2.assign(std::string("(a([bc]))")); @@ -28,4 +28,6 @@ int main() r2.assign(std::string("(a([bc]))"), std::regex::extended); assert(r2.flags() == std::regex::extended); assert(r2.mark_count() == 2); + + return 0; } diff --git a/libcxx/test/std/re/re.regex/re.regex.assign/copy.pass.cpp b/libcxx/test/std/re/re.regex/re.regex.assign/copy.pass.cpp index c74f0a6f029c0..1abb721516516 100644 --- a/libcxx/test/std/re/re.regex/re.regex.assign/copy.pass.cpp +++ b/libcxx/test/std/re/re.regex/re.regex.assign/copy.pass.cpp @@ -16,11 +16,13 @@ #include #include "test_macros.h" -int main() +int main(int, char**) { std::regex r1("(a([bc]))"); std::regex r2; r2 = r1; assert(r2.flags() == std::regex::ECMAScript); assert(r2.mark_count() == 2); + + return 0; } diff --git a/libcxx/test/std/re/re.regex/re.regex.assign/il.pass.cpp b/libcxx/test/std/re/re.regex/re.regex.assign/il.pass.cpp index 75803e6002d6b..880fd5c79c8b3 100644 --- a/libcxx/test/std/re/re.regex/re.regex.assign/il.pass.cpp +++ b/libcxx/test/std/re/re.regex/re.regex.assign/il.pass.cpp @@ -18,10 +18,12 @@ #include #include "test_macros.h" -int main() +int main(int, char**) { std::regex r2; r2 = {'(', 'a', '(', '[', 'b', 'c', ']', ')', ')'}; assert(r2.flags() == std::regex::ECMAScript); assert(r2.mark_count() == 2); + + return 0; } diff --git a/libcxx/test/std/re/re.regex/re.regex.assign/ptr.pass.cpp b/libcxx/test/std/re/re.regex/re.regex.assign/ptr.pass.cpp index f2ca05a9bfef7..3791f81527283 100644 --- a/libcxx/test/std/re/re.regex/re.regex.assign/ptr.pass.cpp +++ b/libcxx/test/std/re/re.regex/re.regex.assign/ptr.pass.cpp @@ -16,10 +16,12 @@ #include #include "test_macros.h" -int main() +int main(int, char**) { std::regex r2; r2 = "(a([bc]))"; assert(r2.flags() == std::regex::ECMAScript); assert(r2.mark_count() == 2); + + return 0; } diff --git a/libcxx/test/std/re/re.regex/re.regex.assign/string.pass.cpp b/libcxx/test/std/re/re.regex/re.regex.assign/string.pass.cpp index 3cb8e8b41be7d..e33819ab3c37e 100644 --- a/libcxx/test/std/re/re.regex/re.regex.assign/string.pass.cpp +++ b/libcxx/test/std/re/re.regex/re.regex.assign/string.pass.cpp @@ -17,10 +17,12 @@ #include #include "test_macros.h" -int main() +int main(int, char**) { std::regex r2; r2 = std::string("(a([bc]))"); assert(r2.flags() == std::regex::ECMAScript); assert(r2.mark_count() == 2); + + return 0; } diff --git a/libcxx/test/std/re/re.regex/re.regex.const/constants.pass.cpp b/libcxx/test/std/re/re.regex/re.regex.const/constants.pass.cpp index 3fc28e4ec9b7c..5d8d48d0590da 100644 --- a/libcxx/test/std/re/re.regex/re.regex.const/constants.pass.cpp +++ b/libcxx/test/std/re/re.regex/re.regex.const/constants.pass.cpp @@ -58,8 +58,10 @@ test() where(BR::egrep); } -int main() +int main(int, char**) { test(); test(); + + return 0; } diff --git a/libcxx/test/std/re/re.regex/re.regex.construct/awk_oct.pass.cpp b/libcxx/test/std/re/re.regex/re.regex.construct/awk_oct.pass.cpp index eabf8eab9f2f8..2e7eed350c030 100644 --- a/libcxx/test/std/re/re.regex/re.regex.construct/awk_oct.pass.cpp +++ b/libcxx/test/std/re/re.regex/re.regex.construct/awk_oct.pass.cpp @@ -17,7 +17,7 @@ #include #include "test_macros.h" -int main() +int main(int, char**) { using std::regex_constants::awk; @@ -25,4 +25,6 @@ int main() assert(std::regex_match("\41", std::regex("\\41", awk))); assert(std::regex_match("\141", std::regex("\\141", awk))); assert(std::regex_match("\141" "1", std::regex("\\1411", awk))); + + return 0; } diff --git a/libcxx/test/std/re/re.regex/re.regex.construct/bad_backref.pass.cpp b/libcxx/test/std/re/re.regex/re.regex.construct/bad_backref.pass.cpp index cc1b081c7dfd9..0a15b6453c8d3 100644 --- a/libcxx/test/std/re/re.regex/re.regex.construct/bad_backref.pass.cpp +++ b/libcxx/test/std/re/re.regex/re.regex.construct/bad_backref.pass.cpp @@ -29,7 +29,7 @@ static bool error_badbackref_thrown(const char *pat) return result; } -int main() +int main(int, char**) { assert(error_badbackref_thrown("\\1abc")); // no references assert(error_badbackref_thrown("ab(c)\\2def")); // only one reference @@ -41,4 +41,6 @@ int main() const char *pat1 = "a(b)c\\1234"; std::regex re(pat1, pat1 + 7); // extra chars after the end. } + + return 0; } diff --git a/libcxx/test/std/re/re.regex/re.regex.construct/bad_ctype.pass.cpp b/libcxx/test/std/re/re.regex/re.regex.construct/bad_ctype.pass.cpp index dc24531cb48ab..5752d5cd681ca 100644 --- a/libcxx/test/std/re/re.regex/re.regex.construct/bad_ctype.pass.cpp +++ b/libcxx/test/std/re/re.regex/re.regex.construct/bad_ctype.pass.cpp @@ -29,8 +29,10 @@ static bool error_ctype_thrown(const char *pat) return result; } -int main() +int main(int, char**) { assert(error_ctype_thrown("[[::]]")); assert(error_ctype_thrown("[[:error:]]")); + + return 0; } diff --git a/libcxx/test/std/re/re.regex/re.regex.construct/bad_escape.pass.cpp b/libcxx/test/std/re/re.regex/re.regex.construct/bad_escape.pass.cpp index f9e589ce7c713..041d55bdf88d9 100644 --- a/libcxx/test/std/re/re.regex/re.regex.construct/bad_escape.pass.cpp +++ b/libcxx/test/std/re/re.regex/re.regex.construct/bad_escape.pass.cpp @@ -29,7 +29,7 @@ static bool error_escape_thrown(const char *pat) return result; } -int main() +int main(int, char**) { assert(error_escape_thrown("[\\a]")); assert(error_escape_thrown("\\a")); @@ -44,4 +44,6 @@ int main() assert(!error_escape_thrown("[\\cA]")); assert(!error_escape_thrown("\\cA")); + + return 0; } diff --git a/libcxx/test/std/re/re.regex/re.regex.construct/bad_repeat.pass.cpp b/libcxx/test/std/re/re.regex/re.regex.construct/bad_repeat.pass.cpp index 2d07e1e8cf331..1af8b5ba651d9 100644 --- a/libcxx/test/std/re/re.regex/re.regex.construct/bad_repeat.pass.cpp +++ b/libcxx/test/std/re/re.regex/re.regex.construct/bad_repeat.pass.cpp @@ -29,7 +29,7 @@ static bool error_badrepeat_thrown(const char *pat) return result; } -int main() +int main(int, char**) { assert(error_badrepeat_thrown("?a")); assert(error_badrepeat_thrown("*a")); @@ -40,4 +40,6 @@ int main() assert(error_badrepeat_thrown("*(a+)")); assert(error_badrepeat_thrown("+(a+)")); assert(error_badrepeat_thrown("{(a+)")); + + return 0; } diff --git a/libcxx/test/std/re/re.regex/re.regex.construct/copy.pass.cpp b/libcxx/test/std/re/re.regex/re.regex.construct/copy.pass.cpp index 588f673bf4fb7..f3db8fe06113b 100644 --- a/libcxx/test/std/re/re.regex/re.regex.construct/copy.pass.cpp +++ b/libcxx/test/std/re/re.regex/re.regex.construct/copy.pass.cpp @@ -16,10 +16,12 @@ #include #include "test_macros.h" -int main() +int main(int, char**) { std::regex r1("(a([bc]))"); std::regex r2 = r1; assert(r2.flags() == std::regex::ECMAScript); assert(r2.mark_count() == 2); + + return 0; } diff --git a/libcxx/test/std/re/re.regex/re.regex.construct/deduct.fail.cpp b/libcxx/test/std/re/re.regex/re.regex.construct/deduct.fail.cpp index 5ece59ad263bd..30ec49c833b0e 100644 --- a/libcxx/test/std/re/re.regex/re.regex.construct/deduct.fail.cpp +++ b/libcxx/test/std/re/re.regex/re.regex.construct/deduct.fail.cpp @@ -24,7 +24,7 @@ #include -int main() +int main(int, char**) { // Test the explicit deduction guides { @@ -41,4 +41,6 @@ int main() // Test the implicit deduction guides + + return 0; } diff --git a/libcxx/test/std/re/re.regex/re.regex.construct/deduct.pass.cpp b/libcxx/test/std/re/re.regex/re.regex.construct/deduct.pass.cpp index 5d7493ae64028..47e5a1dba7f60 100644 --- a/libcxx/test/std/re/re.regex/re.regex.construct/deduct.pass.cpp +++ b/libcxx/test/std/re/re.regex/re.regex.construct/deduct.pass.cpp @@ -31,7 +31,7 @@ using namespace std::literals; struct A {}; -int main() +int main(int, char**) { // Test the explicit deduction guides @@ -133,4 +133,6 @@ int main() assert(re.flags() == std::regex_constants::grep); assert(re.mark_count() == 0); } + + return 0; } diff --git a/libcxx/test/std/re/re.regex/re.regex.construct/default.pass.cpp b/libcxx/test/std/re/re.regex/re.regex.construct/default.pass.cpp index b5c1521fce58a..f706229e68370 100644 --- a/libcxx/test/std/re/re.regex/re.regex.construct/default.pass.cpp +++ b/libcxx/test/std/re/re.regex/re.regex.construct/default.pass.cpp @@ -25,8 +25,10 @@ test() assert(r.mark_count() == 0); } -int main() +int main(int, char**) { test(); test(); + + return 0; } diff --git a/libcxx/test/std/re/re.regex/re.regex.construct/il_flg.pass.cpp b/libcxx/test/std/re/re.regex/re.regex.construct/il_flg.pass.cpp index aac13147e81af..aaf5bc25a7cd2 100644 --- a/libcxx/test/std/re/re.regex/re.regex.construct/il_flg.pass.cpp +++ b/libcxx/test/std/re/re.regex/re.regex.construct/il_flg.pass.cpp @@ -29,7 +29,7 @@ test(std::initializer_list il, std::regex_constants::syntax_option_type f, } -int main() +int main(int, char**) { std::string s1("\\(a\\)"); std::string s2("\\(a[bc]\\)"); @@ -65,4 +65,6 @@ int main() test({'\\', '(', 'a', '[', 'b', 'c', ']', '\\', ')'}, std::regex_constants::egrep, 0); test({'\\', '(', 'a', '\\', '(', '[', 'b', 'c', ']', '\\', ')', '\\', ')'}, std::regex_constants::egrep, 0); test({'(', 'a', '(', '[', 'b', 'c', ']', ')', ')'}, std::regex_constants::egrep, 2); + + return 0; } diff --git a/libcxx/test/std/re/re.regex/re.regex.construct/iter_iter.pass.cpp b/libcxx/test/std/re/re.regex/re.regex.construct/iter_iter.pass.cpp index 0b5d0c5041339..3dcf29fa00965 100644 --- a/libcxx/test/std/re/re.regex/re.regex.construct/iter_iter.pass.cpp +++ b/libcxx/test/std/re/re.regex/re.regex.construct/iter_iter.pass.cpp @@ -28,7 +28,7 @@ test(Iter first, Iter last, unsigned mc) assert(r.mark_count() == mc); } -int main() +int main(int, char**) { typedef forward_iterator F; std::string s1("\\(a\\)"); @@ -40,4 +40,6 @@ int main() test(F(s2.begin()), F(s2.end()), 0); test(F(s3.begin()), F(s3.end()), 0); test(F(s4.begin()), F(s4.end()), 2); + + return 0; } diff --git a/libcxx/test/std/re/re.regex/re.regex.construct/iter_iter_flg.pass.cpp b/libcxx/test/std/re/re.regex/re.regex.construct/iter_iter_flg.pass.cpp index 37878347f9597..22423c0928207 100644 --- a/libcxx/test/std/re/re.regex/re.regex.construct/iter_iter_flg.pass.cpp +++ b/libcxx/test/std/re/re.regex/re.regex.construct/iter_iter_flg.pass.cpp @@ -29,7 +29,7 @@ test(Iter first, Iter last, std::regex_constants::syntax_option_type f, unsigned assert(r.mark_count() == mc); } -int main() +int main(int, char**) { typedef forward_iterator F; std::string s1("\\(a\\)"); @@ -66,4 +66,6 @@ int main() test(F(s2.begin()), F(s2.end()), std::regex_constants::egrep, 0); test(F(s3.begin()), F(s3.end()), std::regex_constants::egrep, 0); test(F(s4.begin()), F(s4.end()), std::regex_constants::egrep, 2); + + return 0; } diff --git a/libcxx/test/std/re/re.regex/re.regex.construct/ptr.pass.cpp b/libcxx/test/std/re/re.regex/re.regex.construct/ptr.pass.cpp index 877b9a4c6eef0..b71d9eb7f497c 100644 --- a/libcxx/test/std/re/re.regex/re.regex.construct/ptr.pass.cpp +++ b/libcxx/test/std/re/re.regex/re.regex.construct/ptr.pass.cpp @@ -25,10 +25,12 @@ test(const CharT* p, unsigned mc) assert(r.mark_count() == mc); } -int main() +int main(int, char**) { test("\\(a\\)", 0); test("\\(a[bc]\\)", 0); test("\\(a\\([bc]\\)\\)", 0); test("(a([bc]))", 2); + + return 0; } diff --git a/libcxx/test/std/re/re.regex/re.regex.construct/ptr_flg.pass.cpp b/libcxx/test/std/re/re.regex/re.regex.construct/ptr_flg.pass.cpp index 998f28db89257..e918b03116ba9 100644 --- a/libcxx/test/std/re/re.regex/re.regex.construct/ptr_flg.pass.cpp +++ b/libcxx/test/std/re/re.regex/re.regex.construct/ptr_flg.pass.cpp @@ -25,7 +25,7 @@ test(const CharT* p, std::regex_constants::syntax_option_type f, unsigned mc) assert(r.mark_count() == mc); } -int main() +int main(int, char**) { test("\\(a\\)", std::regex_constants::basic, 1); test("\\(a[bc]\\)", std::regex_constants::basic, 1); @@ -56,4 +56,6 @@ int main() test("\\(a[bc]\\)", std::regex_constants::egrep, 0); test("\\(a\\([bc]\\)\\)", std::regex_constants::egrep, 0); test("(a([bc]))", std::regex_constants::egrep, 2); + + return 0; } diff --git a/libcxx/test/std/re/re.regex/re.regex.construct/ptr_size.pass.cpp b/libcxx/test/std/re/re.regex/re.regex.construct/ptr_size.pass.cpp index 03a53b7697932..29fa3ca57ac2d 100644 --- a/libcxx/test/std/re/re.regex/re.regex.construct/ptr_size.pass.cpp +++ b/libcxx/test/std/re/re.regex/re.regex.construct/ptr_size.pass.cpp @@ -24,7 +24,7 @@ test(const CharT* p, std::size_t len, unsigned mc) assert(r.mark_count() == mc); } -int main() +int main(int, char**) { test("\\(a\\)", 5, 0); test("\\(a[bc]\\)", 9, 0); @@ -35,4 +35,6 @@ int main() test("(\0)(b)(c)(d)", 9, 3); test("(\0)(b)(c)(d)", 3, 1); test("(\0)(b)(c)(d)", 0, 0); + + return 0; } diff --git a/libcxx/test/std/re/re.regex/re.regex.construct/ptr_size_flg.pass.cpp b/libcxx/test/std/re/re.regex/re.regex.construct/ptr_size_flg.pass.cpp index 8546c167355ee..07f3947318ed3 100644 --- a/libcxx/test/std/re/re.regex/re.regex.construct/ptr_size_flg.pass.cpp +++ b/libcxx/test/std/re/re.regex/re.regex.construct/ptr_size_flg.pass.cpp @@ -26,7 +26,7 @@ test(const CharT* p, std::size_t len, std::regex_constants::syntax_option_type f assert(r.mark_count() == mc); } -int main() +int main(int, char**) { test("\\(a\\)", 5, std::regex_constants::basic, 1); test("\\(a[bc]\\)", 9, std::regex_constants::basic, 1); @@ -57,4 +57,6 @@ int main() test("\\(a[bc]\\)", 9, std::regex_constants::egrep, 0); test("\\(a\\([bc]\\)\\)", 13, std::regex_constants::egrep, 0); test("(a([bc]))", 9, std::regex_constants::egrep, 2); + + return 0; } diff --git a/libcxx/test/std/re/re.regex/re.regex.construct/string.pass.cpp b/libcxx/test/std/re/re.regex/re.regex.construct/string.pass.cpp index 58f607183e941..ecd0451d82b82 100644 --- a/libcxx/test/std/re/re.regex/re.regex.construct/string.pass.cpp +++ b/libcxx/test/std/re/re.regex/re.regex.construct/string.pass.cpp @@ -26,10 +26,12 @@ test(const String& p, unsigned mc) assert(r.mark_count() == mc); } -int main() +int main(int, char**) { test(std::string("\\(a\\)"), 0); test(std::string("\\(a[bc]\\)"), 0); test(std::string("\\(a\\([bc]\\)\\)"), 0); test(std::string("(a([bc]))"), 2); + + return 0; } diff --git a/libcxx/test/std/re/re.regex/re.regex.construct/string_flg.pass.cpp b/libcxx/test/std/re/re.regex/re.regex.construct/string_flg.pass.cpp index 6d504db3334c9..b6bd8c53c5ae2 100644 --- a/libcxx/test/std/re/re.regex/re.regex.construct/string_flg.pass.cpp +++ b/libcxx/test/std/re/re.regex/re.regex.construct/string_flg.pass.cpp @@ -27,7 +27,7 @@ test(const String& p, std::regex_constants::syntax_option_type f, unsigned mc) assert(r.mark_count() == mc); } -int main() +int main(int, char**) { test(std::string("\\(a\\)"), std::regex_constants::basic, 1); test(std::string("\\(a[bc]\\)"), std::regex_constants::basic, 1); @@ -58,4 +58,6 @@ int main() test(std::string("\\(a[bc]\\)"), std::regex_constants::egrep, 0); test(std::string("\\(a\\([bc]\\)\\)"), std::regex_constants::egrep, 0); test(std::string("(a([bc]))"), std::regex_constants::egrep, 2); + + return 0; } diff --git a/libcxx/test/std/re/re.regex/re.regex.locale/imbue.pass.cpp b/libcxx/test/std/re/re.regex/re.regex.locale/imbue.pass.cpp index a985a74e945a1..27647f1238b42 100644 --- a/libcxx/test/std/re/re.regex/re.regex.locale/imbue.pass.cpp +++ b/libcxx/test/std/re/re.regex/re.regex.locale/imbue.pass.cpp @@ -21,7 +21,7 @@ #include "test_macros.h" #include "platform_support.h" // locale name macros -int main() +int main(int, char**) { std::regex r; std::locale loc = r.imbue(std::locale(LOCALE_en_US_UTF_8)); @@ -30,4 +30,6 @@ int main() loc = r.imbue(std::locale("C")); assert(loc.name() == LOCALE_en_US_UTF_8); assert(r.getloc().name() == "C"); + + return 0; } diff --git a/libcxx/test/std/re/re.regex/re.regex.nonmemb/nothing_to_do.pass.cpp b/libcxx/test/std/re/re.regex/re.regex.nonmemb/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/re/re.regex/re.regex.nonmemb/nothing_to_do.pass.cpp +++ b/libcxx/test/std/re/re.regex/re.regex.nonmemb/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/re/re.regex/re.regex.nonmemb/re.regex.nmswap/swap.pass.cpp b/libcxx/test/std/re/re.regex/re.regex.nonmemb/re.regex.nmswap/swap.pass.cpp index dc5ad95cb0fe7..bb3291be6f05f 100644 --- a/libcxx/test/std/re/re.regex/re.regex.nonmemb/re.regex.nmswap/swap.pass.cpp +++ b/libcxx/test/std/re/re.regex/re.regex.nonmemb/re.regex.nmswap/swap.pass.cpp @@ -17,7 +17,7 @@ #include #include "test_macros.h" -int main() +int main(int, char**) { std::regex r1("(a([bc]))"); std::regex r2; @@ -26,4 +26,6 @@ int main() assert(r1.mark_count() == 0); assert(r2.flags() == std::regex::ECMAScript); assert(r2.mark_count() == 2); + + return 0; } diff --git a/libcxx/test/std/re/re.regex/re.regex.operations/tested_elsewhere.pass.cpp b/libcxx/test/std/re/re.regex/re.regex.operations/tested_elsewhere.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/re/re.regex/re.regex.operations/tested_elsewhere.pass.cpp +++ b/libcxx/test/std/re/re.regex/re.regex.operations/tested_elsewhere.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/re/re.regex/re.regex.swap/swap.pass.cpp b/libcxx/test/std/re/re.regex/re.regex.swap/swap.pass.cpp index b519edc256bda..5092d57c14811 100644 --- a/libcxx/test/std/re/re.regex/re.regex.swap/swap.pass.cpp +++ b/libcxx/test/std/re/re.regex/re.regex.swap/swap.pass.cpp @@ -16,7 +16,7 @@ #include #include "test_macros.h" -int main() +int main(int, char**) { std::regex r1("(a([bc]))"); std::regex r2; @@ -25,4 +25,6 @@ int main() assert(r1.mark_count() == 0); assert(r2.flags() == std::regex::ECMAScript); assert(r2.mark_count() == 2); + + return 0; } diff --git a/libcxx/test/std/re/re.regex/types.pass.cpp b/libcxx/test/std/re/re.regex/types.pass.cpp index 21a563890af24..a13ad180d3cb4 100644 --- a/libcxx/test/std/re/re.regex/types.pass.cpp +++ b/libcxx/test/std/re/re.regex/types.pass.cpp @@ -23,7 +23,7 @@ #include #include "test_macros.h" -int main() +int main(int, char**) { static_assert((std::is_same::value_type, char>::value), ""); static_assert((std::is_same::traits_type, std::regex_traits >::value), ""); @@ -38,4 +38,6 @@ int main() static_assert((std::is_same::flag_type, std::regex_constants::syntax_option_type>::value), ""); static_assert((std::is_same::locale_type, std::locale>::value), ""); + + return 0; } diff --git a/libcxx/test/std/re/re.req/nothing_to_do.pass.cpp b/libcxx/test/std/re/re.req/nothing_to_do.pass.cpp index 02fe32ece4841..779762e7e995d 100644 --- a/libcxx/test/std/re/re.req/nothing_to_do.pass.cpp +++ b/libcxx/test/std/re/re.req/nothing_to_do.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/re/re.results/re.results.acc/begin_end.pass.cpp b/libcxx/test/std/re/re.results/re.results.acc/begin_end.pass.cpp index d83ef300f8199..48fff58b019ee 100644 --- a/libcxx/test/std/re/re.results/re.results.acc/begin_end.pass.cpp +++ b/libcxx/test/std/re/re.results/re.results.acc/begin_end.pass.cpp @@ -33,7 +33,9 @@ test() assert(*i == m[j]); } -int main() +int main(int, char**) { test(); + + return 0; } diff --git a/libcxx/test/std/re/re.results/re.results.acc/cbegin_cend.pass.cpp b/libcxx/test/std/re/re.results/re.results.acc/cbegin_cend.pass.cpp index 9b8db258777a2..bd9009a8a447c 100644 --- a/libcxx/test/std/re/re.results/re.results.acc/cbegin_cend.pass.cpp +++ b/libcxx/test/std/re/re.results/re.results.acc/cbegin_cend.pass.cpp @@ -33,7 +33,9 @@ test() assert(*i == m[j]); } -int main() +int main(int, char**) { test(); + + return 0; } diff --git a/libcxx/test/std/re/re.results/re.results.acc/index.pass.cpp b/libcxx/test/std/re/re.results/re.results.acc/index.pass.cpp index e3f6215e9f44c..a5c25a82c81b1 100644 --- a/libcxx/test/std/re/re.results/re.results.acc/index.pass.cpp +++ b/libcxx/test/std/re/re.results/re.results.acc/index.pass.cpp @@ -46,8 +46,10 @@ test(std::regex_constants::syntax_option_type syntax) assert(m[4].matched == false); } -int main() +int main(int, char**) { test(std::regex_constants::ECMAScript); test(std::regex_constants::extended); + + return 0; } diff --git a/libcxx/test/std/re/re.results/re.results.acc/length.pass.cpp b/libcxx/test/std/re/re.results/re.results.acc/length.pass.cpp index d7d68c5e03220..266ba692ff4dc 100644 --- a/libcxx/test/std/re/re.results/re.results.acc/length.pass.cpp +++ b/libcxx/test/std/re/re.results/re.results.acc/length.pass.cpp @@ -30,7 +30,9 @@ test() assert(m.length(4) == m[4].length()); } -int main() +int main(int, char**) { test(); + + return 0; } diff --git a/libcxx/test/std/re/re.results/re.results.acc/position.pass.cpp b/libcxx/test/std/re/re.results/re.results.acc/position.pass.cpp index 18aa79a48925c..34256de3585cc 100644 --- a/libcxx/test/std/re/re.results/re.results.acc/position.pass.cpp +++ b/libcxx/test/std/re/re.results/re.results.acc/position.pass.cpp @@ -30,7 +30,9 @@ test() assert(m.position(4) == std::distance(s, m[4].first)); } -int main() +int main(int, char**) { test(); + + return 0; } diff --git a/libcxx/test/std/re/re.results/re.results.acc/prefix.pass.cpp b/libcxx/test/std/re/re.results/re.results.acc/prefix.pass.cpp index ab389cc453674..b2cd48d4db60a 100644 --- a/libcxx/test/std/re/re.results/re.results.acc/prefix.pass.cpp +++ b/libcxx/test/std/re/re.results/re.results.acc/prefix.pass.cpp @@ -28,7 +28,9 @@ test() assert(m.prefix().matched == true); } -int main() +int main(int, char**) { test(); + + return 0; } diff --git a/libcxx/test/std/re/re.results/re.results.acc/str.pass.cpp b/libcxx/test/std/re/re.results/re.results.acc/str.pass.cpp index ae5f5c7f652b4..ae4387d463aa6 100644 --- a/libcxx/test/std/re/re.results/re.results.acc/str.pass.cpp +++ b/libcxx/test/std/re/re.results/re.results.acc/str.pass.cpp @@ -30,7 +30,9 @@ test() assert(m.str(4) == std::string(m[4])); } -int main() +int main(int, char**) { test(); + + return 0; } diff --git a/libcxx/test/std/re/re.results/re.results.acc/suffix.pass.cpp b/libcxx/test/std/re/re.results/re.results.acc/suffix.pass.cpp index 7e88ab106d102..c9d3855e9bd74 100644 --- a/libcxx/test/std/re/re.results/re.results.acc/suffix.pass.cpp +++ b/libcxx/test/std/re/re.results/re.results.acc/suffix.pass.cpp @@ -28,7 +28,9 @@ test() assert(m.suffix().matched == true); } -int main() +int main(int, char**) { test(); + + return 0; } diff --git a/libcxx/test/std/re/re.results/re.results.all/get_allocator.pass.cpp b/libcxx/test/std/re/re.results/re.results.all/get_allocator.pass.cpp index 1e0a3ce27c844..f0dcd7b6d42c3 100644 --- a/libcxx/test/std/re/re.results/re.results.all/get_allocator.pass.cpp +++ b/libcxx/test/std/re/re.results/re.results.all/get_allocator.pass.cpp @@ -28,8 +28,10 @@ test(const Allocator& a) assert(m.get_allocator() == a); } -int main() +int main(int, char**) { test(test_allocator >(3)); test(test_allocator >(3)); + + return 0; } diff --git a/libcxx/test/std/re/re.results/re.results.const/allocator.pass.cpp b/libcxx/test/std/re/re.results/re.results.const/allocator.pass.cpp index f8a5a83fed8db..99ecb667b7528 100644 --- a/libcxx/test/std/re/re.results/re.results.const/allocator.pass.cpp +++ b/libcxx/test/std/re/re.results/re.results.const/allocator.pass.cpp @@ -28,8 +28,10 @@ test(const Allocator& a) assert(m.get_allocator() == a); } -int main() +int main(int, char**) { test(test_allocator >(3)); test(test_allocator >(3)); + + return 0; } diff --git a/libcxx/test/std/re/re.results/re.results.const/copy.pass.cpp b/libcxx/test/std/re/re.results/re.results.const/copy.pass.cpp index f6733bdd14809..a1dbea0e84026 100644 --- a/libcxx/test/std/re/re.results/re.results.const/copy.pass.cpp +++ b/libcxx/test/std/re/re.results/re.results.const/copy.pass.cpp @@ -30,11 +30,13 @@ test(const Allocator& a) assert(m1.get_allocator() == m0.get_allocator()); } -int main() +int main(int, char**) { test (std::allocator >()); test(std::allocator >()); test (test_allocator >(3)); test(test_allocator >(3)); + + return 0; } diff --git a/libcxx/test/std/re/re.results/re.results.const/copy_assign.pass.cpp b/libcxx/test/std/re/re.results/re.results.const/copy_assign.pass.cpp index 3429b066beed6..943037e752fdc 100644 --- a/libcxx/test/std/re/re.results/re.results.const/copy_assign.pass.cpp +++ b/libcxx/test/std/re/re.results/re.results.const/copy_assign.pass.cpp @@ -34,7 +34,7 @@ test(const Allocator& a) assert(m1.get_allocator() == Allocator()); } -int main() +int main(int, char**) { test (std::allocator >()); test(std::allocator >()); @@ -46,4 +46,6 @@ int main() // other_allocator has POCCA -> true test (other_allocator >(3)); test(other_allocator >(3)); + + return 0; } diff --git a/libcxx/test/std/re/re.results/re.results.const/default.pass.cpp b/libcxx/test/std/re/re.results/re.results.const/default.pass.cpp index 80f4a0269ebd1..a70c3441db3f4 100644 --- a/libcxx/test/std/re/re.results/re.results.const/default.pass.cpp +++ b/libcxx/test/std/re/re.results/re.results.const/default.pass.cpp @@ -26,8 +26,10 @@ test() assert(m.get_allocator() == std::allocator >()); } -int main() +int main(int, char**) { test(); test(); + + return 0; } diff --git a/libcxx/test/std/re/re.results/re.results.const/move.pass.cpp b/libcxx/test/std/re/re.results/re.results.const/move.pass.cpp index b3d2a0f4179f9..778e31b26f7ee 100644 --- a/libcxx/test/std/re/re.results/re.results.const/move.pass.cpp +++ b/libcxx/test/std/re/re.results/re.results.const/move.pass.cpp @@ -35,7 +35,7 @@ test(const Allocator& a) assert(m1.get_allocator() == a); } -int main() +int main(int, char**) { test (std::allocator >()); test(std::allocator >()); @@ -44,4 +44,6 @@ int main() assert(test_alloc_base::moved == 1); test(test_allocator >(3)); assert(test_alloc_base::moved == 2); + + return 0; } diff --git a/libcxx/test/std/re/re.results/re.results.const/move_assign.pass.cpp b/libcxx/test/std/re/re.results/re.results.const/move_assign.pass.cpp index 55c66e9e196cb..2a62af8f29778 100644 --- a/libcxx/test/std/re/re.results/re.results.const/move_assign.pass.cpp +++ b/libcxx/test/std/re/re.results/re.results.const/move_assign.pass.cpp @@ -35,7 +35,7 @@ test(const Allocator& a) assert(m1.get_allocator() == Allocator()); } -int main() +int main(int, char**) { test (std::allocator >()); test(std::allocator >()); @@ -47,4 +47,6 @@ int main() // other_allocator has POCMA -> true test (other_allocator >(3)); test(other_allocator >(3)); + + return 0; } diff --git a/libcxx/test/std/re/re.results/re.results.form/form1.pass.cpp b/libcxx/test/std/re/re.results/re.results.form/form1.pass.cpp index 6046f9be0958c..f435de8276bb7 100644 --- a/libcxx/test/std/re/re.results/re.results.form/form1.pass.cpp +++ b/libcxx/test/std/re/re.results/re.results.form/form1.pass.cpp @@ -21,7 +21,7 @@ #include "test_macros.h" #include "test_iterators.h" -int main() +int main(int, char**) { { std::match_results m; @@ -152,4 +152,6 @@ int main() assert(r == out + 34); assert(std::wstring(out) == L"match: cdefghi, m[1]: efg, m[2]: e"); } + + return 0; } diff --git a/libcxx/test/std/re/re.results/re.results.form/form2.pass.cpp b/libcxx/test/std/re/re.results/re.results.form/form2.pass.cpp index 2c9d30eb2e249..b28c064e105ba 100644 --- a/libcxx/test/std/re/re.results/re.results.form/form2.pass.cpp +++ b/libcxx/test/std/re/re.results/re.results.form/form2.pass.cpp @@ -24,7 +24,7 @@ #include "test_iterators.h" #include "test_allocator.h" -int main() +int main(int, char**) { typedef std::basic_string, test_allocator > nstr; typedef std::basic_string, test_allocator > wstr; @@ -99,4 +99,6 @@ int main() assert(r == out + 34); assert(std::wstring(out) == L"match: cdefghi, m[1]: efg, m[2]: e"); } + + return 0; } diff --git a/libcxx/test/std/re/re.results/re.results.form/form3.pass.cpp b/libcxx/test/std/re/re.results/re.results.form/form3.pass.cpp index ca1a30732bd12..62a735ca600b5 100644 --- a/libcxx/test/std/re/re.results/re.results.form/form3.pass.cpp +++ b/libcxx/test/std/re/re.results/re.results.form/form3.pass.cpp @@ -23,7 +23,7 @@ #include "test_macros.h" #include "test_allocator.h" -int main() +int main(int, char**) { typedef std::basic_string, test_allocator > nstr; typedef std::basic_string, test_allocator > wstr; @@ -82,4 +82,6 @@ int main() wstr out = m.format(fmt, std::regex_constants::format_sed); assert(out == L"match: cdefghi, m[1]: efg, m[2]: e"); } + + return 0; } diff --git a/libcxx/test/std/re/re.results/re.results.form/form4.pass.cpp b/libcxx/test/std/re/re.results/re.results.form/form4.pass.cpp index d46d6248d744b..658e788b6395a 100644 --- a/libcxx/test/std/re/re.results/re.results.form/form4.pass.cpp +++ b/libcxx/test/std/re/re.results/re.results.form/form4.pass.cpp @@ -20,7 +20,7 @@ #include #include "test_macros.h" -int main() +int main(int, char**) { { std::match_results m; @@ -77,4 +77,6 @@ int main() std::wstring out = m.format(fmt, std::regex_constants::format_sed); assert(out == L"match: cdefghi, m[1]: efg, m[2]: e"); } + + return 0; } diff --git a/libcxx/test/std/re/re.results/re.results.nonmember/equal.pass.cpp b/libcxx/test/std/re/re.results/re.results.nonmember/equal.pass.cpp index e0b53609af604..3723ad4740f47 100644 --- a/libcxx/test/std/re/re.results/re.results.nonmember/equal.pass.cpp +++ b/libcxx/test/std/re/re.results/re.results.nonmember/equal.pass.cpp @@ -40,7 +40,9 @@ test() assert(m1 == m2); } -int main() +int main(int, char**) { test(); + + return 0; } diff --git a/libcxx/test/std/re/re.results/re.results.size/empty.fail.cpp b/libcxx/test/std/re/re.results/re.results.size/empty.fail.cpp index 7a92dd88ef7ee..e17c77424656f 100644 --- a/libcxx/test/std/re/re.results/re.results.size/empty.fail.cpp +++ b/libcxx/test/std/re/re.results/re.results.size/empty.fail.cpp @@ -19,8 +19,10 @@ #include "test_macros.h" -int main () +int main(int, char**) { std::match_results c; c.empty(); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} + + return 0; } diff --git a/libcxx/test/std/re/re.results/re.results.size/empty.pass.cpp b/libcxx/test/std/re/re.results/re.results.size/empty.pass.cpp index 4644a8afb64fd..7eaed34ac6ab8 100644 --- a/libcxx/test/std/re/re.results/re.results.size/empty.pass.cpp +++ b/libcxx/test/std/re/re.results/re.results.size/empty.pass.cpp @@ -30,7 +30,9 @@ test() assert(m.size() == 3); } -int main() +int main(int, char**) { test(); + + return 0; } diff --git a/libcxx/test/std/re/re.results/re.results.size/max_size.pass.cpp b/libcxx/test/std/re/re.results/re.results.size/max_size.pass.cpp index 5293f45f78e93..184933d135c76 100644 --- a/libcxx/test/std/re/re.results/re.results.size/max_size.pass.cpp +++ b/libcxx/test/std/re/re.results/re.results.size/max_size.pass.cpp @@ -24,8 +24,10 @@ test() assert(m.max_size() > 0); } -int main() +int main(int, char**) { test(); test(); + + return 0; } diff --git a/libcxx/test/std/re/re.results/re.results.state/ready.pass.cpp b/libcxx/test/std/re/re.results/re.results.state/ready.pass.cpp index daa1bf33730f9..476a66fdfba47 100644 --- a/libcxx/test/std/re/re.results/re.results.state/ready.pass.cpp +++ b/libcxx/test/std/re/re.results/re.results.state/ready.pass.cpp @@ -36,8 +36,10 @@ test2() assert(m.ready() == true); } -int main() +int main(int, char**) { test1(); test2(); + + return 0; } diff --git a/libcxx/test/std/re/re.results/re.results.swap/member_swap.pass.cpp b/libcxx/test/std/re/re.results/re.results.swap/member_swap.pass.cpp index 9cb6ae4417b3c..967fe11c5ac4b 100644 --- a/libcxx/test/std/re/re.results/re.results.swap/member_swap.pass.cpp +++ b/libcxx/test/std/re/re.results/re.results.swap/member_swap.pass.cpp @@ -33,7 +33,9 @@ test() assert(m2 == m1_save); } -int main() +int main(int, char**) { test(); + + return 0; } diff --git a/libcxx/test/std/re/re.results/re.results.swap/non_member_swap.pass.cpp b/libcxx/test/std/re/re.results/re.results.swap/non_member_swap.pass.cpp index 21724fc49336a..59ba59f3d6493 100644 --- a/libcxx/test/std/re/re.results/re.results.swap/non_member_swap.pass.cpp +++ b/libcxx/test/std/re/re.results/re.results.swap/non_member_swap.pass.cpp @@ -35,7 +35,9 @@ test() assert(m2 == m1_save); } -int main() +int main(int, char**) { test(); + + return 0; } diff --git a/libcxx/test/std/re/re.results/types.pass.cpp b/libcxx/test/std/re/re.results/types.pass.cpp index 3f5a31d0d9d0c..0fd8220843b17 100644 --- a/libcxx/test/std/re/re.results/types.pass.cpp +++ b/libcxx/test/std/re/re.results/types.pass.cpp @@ -44,8 +44,10 @@ test() static_assert((std::is_same >::value), ""); } -int main() +int main(int, char**) { test(); test(); + + return 0; } diff --git a/libcxx/test/std/re/re.submatch/re.submatch.members/compare_string_type.pass.cpp b/libcxx/test/std/re/re.submatch/re.submatch.members/compare_string_type.pass.cpp index 050680ae7f2ec..6b57a193aeda4 100644 --- a/libcxx/test/std/re/re.submatch/re.submatch.members/compare_string_type.pass.cpp +++ b/libcxx/test/std/re/re.submatch/re.submatch.members/compare_string_type.pass.cpp @@ -16,7 +16,7 @@ #include #include "test_macros.h" -int main() +int main(int, char**) { { typedef char CharT; @@ -44,4 +44,6 @@ int main() assert(sm.compare(string()) > 0); assert(sm.compare(string(L"123")) == 0); } + + return 0; } diff --git a/libcxx/test/std/re/re.submatch/re.submatch.members/compare_sub_match.pass.cpp b/libcxx/test/std/re/re.submatch/re.submatch.members/compare_sub_match.pass.cpp index 6e7d34d78e5b9..6d0976bbf2164 100644 --- a/libcxx/test/std/re/re.submatch/re.submatch.members/compare_sub_match.pass.cpp +++ b/libcxx/test/std/re/re.submatch/re.submatch.members/compare_sub_match.pass.cpp @@ -16,7 +16,7 @@ #include #include "test_macros.h" -int main() +int main(int, char**) { { typedef char CharT; @@ -50,4 +50,6 @@ int main() sm2.matched = true; assert(sm.compare(sm2) == 0); } + + return 0; } diff --git a/libcxx/test/std/re/re.submatch/re.submatch.members/compare_value_type_ptr.pass.cpp b/libcxx/test/std/re/re.submatch/re.submatch.members/compare_value_type_ptr.pass.cpp index 672d4aa32c1fd..42e6ab94a1726 100644 --- a/libcxx/test/std/re/re.submatch/re.submatch.members/compare_value_type_ptr.pass.cpp +++ b/libcxx/test/std/re/re.submatch/re.submatch.members/compare_value_type_ptr.pass.cpp @@ -16,7 +16,7 @@ #include #include "test_macros.h" -int main() +int main(int, char**) { { typedef char CharT; @@ -42,4 +42,6 @@ int main() assert(sm.compare(L"") > 0); assert(sm.compare(L"123") == 0); } + + return 0; } diff --git a/libcxx/test/std/re/re.submatch/re.submatch.members/default.pass.cpp b/libcxx/test/std/re/re.submatch/re.submatch.members/default.pass.cpp index a2473552ea098..c34591f228430 100644 --- a/libcxx/test/std/re/re.submatch/re.submatch.members/default.pass.cpp +++ b/libcxx/test/std/re/re.submatch/re.submatch.members/default.pass.cpp @@ -16,7 +16,7 @@ #include #include "test_macros.h" -int main() +int main(int, char**) { { typedef char CharT; @@ -30,4 +30,6 @@ int main() SM sm; assert(sm.matched == false); } + + return 0; } diff --git a/libcxx/test/std/re/re.submatch/re.submatch.members/length.pass.cpp b/libcxx/test/std/re/re.submatch/re.submatch.members/length.pass.cpp index 459a8fe912d09..5246eb3511bae 100644 --- a/libcxx/test/std/re/re.submatch/re.submatch.members/length.pass.cpp +++ b/libcxx/test/std/re/re.submatch/re.submatch.members/length.pass.cpp @@ -16,7 +16,7 @@ #include #include "test_macros.h" -int main() +int main(int, char**) { { typedef char CharT; @@ -40,4 +40,6 @@ int main() sm.matched = true; assert(sm.length() == 3); } + + return 0; } diff --git a/libcxx/test/std/re/re.submatch/re.submatch.members/operator_string.pass.cpp b/libcxx/test/std/re/re.submatch/re.submatch.members/operator_string.pass.cpp index 47659e59cce34..051ecc3e873d3 100644 --- a/libcxx/test/std/re/re.submatch/re.submatch.members/operator_string.pass.cpp +++ b/libcxx/test/std/re/re.submatch/re.submatch.members/operator_string.pass.cpp @@ -16,7 +16,7 @@ #include #include "test_macros.h" -int main() +int main(int, char**) { { typedef char CharT; @@ -44,4 +44,6 @@ int main() str = sm; assert(str == std::wstring(L"123")); } + + return 0; } diff --git a/libcxx/test/std/re/re.submatch/re.submatch.members/str.pass.cpp b/libcxx/test/std/re/re.submatch/re.submatch.members/str.pass.cpp index c09783b80cfbd..af39ee9c30fc9 100644 --- a/libcxx/test/std/re/re.submatch/re.submatch.members/str.pass.cpp +++ b/libcxx/test/std/re/re.submatch/re.submatch.members/str.pass.cpp @@ -16,7 +16,7 @@ #include #include "test_macros.h" -int main() +int main(int, char**) { { typedef char CharT; @@ -44,4 +44,6 @@ int main() str = sm.str(); assert(str == std::wstring(L"123")); } + + return 0; } diff --git a/libcxx/test/std/re/re.submatch/re.submatch.op/compare.pass.cpp b/libcxx/test/std/re/re.submatch/re.submatch.op/compare.pass.cpp index ad65ec54d30a6..e332a8379837e 100644 --- a/libcxx/test/std/re/re.submatch/re.submatch.op/compare.pass.cpp +++ b/libcxx/test/std/re/re.submatch/re.submatch.op/compare.pass.cpp @@ -276,7 +276,7 @@ test(const std::basic_string& x, const std::basic_string& y, bool assert((sm1 >= y[0]) == (x >= string(1, y[0]))); } -int main() +int main(int, char**) { test(std::string("123"), std::string("123")); test(std::string("1234"), std::string("123")); @@ -284,4 +284,6 @@ int main() test(std::wstring(L"1234"), std::wstring(L"123")); test(std::string("123\000" "56", 6), std::string("123\000" "56", 6), false); test(std::wstring(L"123\000" L"56", 6), std::wstring(L"123\000" L"56", 6), false); + + return 0; } diff --git a/libcxx/test/std/re/re.submatch/re.submatch.op/stream.pass.cpp b/libcxx/test/std/re/re.submatch/re.submatch.op/stream.pass.cpp index 63c7d815c3c19..070266d9e58a2 100644 --- a/libcxx/test/std/re/re.submatch/re.submatch.op/stream.pass.cpp +++ b/libcxx/test/std/re/re.submatch/re.submatch.op/stream.pass.cpp @@ -35,8 +35,10 @@ test(const std::basic_string& s) assert(os.str() == s); } -int main() +int main(int, char**) { test(std::string("123")); test(std::wstring(L"123")); + + return 0; } diff --git a/libcxx/test/std/re/re.submatch/types.pass.cpp b/libcxx/test/std/re/re.submatch/types.pass.cpp index 8141a5302fbcb..831eec1da05bf 100644 --- a/libcxx/test/std/re/re.submatch/types.pass.cpp +++ b/libcxx/test/std/re/re.submatch/types.pass.cpp @@ -27,7 +27,7 @@ #include #include "test_macros.h" -int main() +int main(int, char**) { { typedef std::sub_match SM; @@ -61,4 +61,6 @@ int main() static_assert((std::is_same >::value), ""); static_assert((std::is_same >::value), ""); } + + return 0; } diff --git a/libcxx/test/std/re/re.syn/cmatch.pass.cpp b/libcxx/test/std/re/re.syn/cmatch.pass.cpp index 1e7149bb7da24..7b85a69a2ff82 100644 --- a/libcxx/test/std/re/re.syn/cmatch.pass.cpp +++ b/libcxx/test/std/re/re.syn/cmatch.pass.cpp @@ -14,7 +14,9 @@ #include #include "test_macros.h" -int main() +int main(int, char**) { static_assert((std::is_same, std::cmatch>::value), ""); + + return 0; } diff --git a/libcxx/test/std/re/re.syn/cregex_iterator.pass.cpp b/libcxx/test/std/re/re.syn/cregex_iterator.pass.cpp index 15c7ea8cfa425..29fdadeb66921 100644 --- a/libcxx/test/std/re/re.syn/cregex_iterator.pass.cpp +++ b/libcxx/test/std/re/re.syn/cregex_iterator.pass.cpp @@ -14,7 +14,9 @@ #include #include "test_macros.h" -int main() +int main(int, char**) { static_assert((std::is_same, std::cregex_iterator>::value), ""); + + return 0; } diff --git a/libcxx/test/std/re/re.syn/cregex_token_iterator.pass.cpp b/libcxx/test/std/re/re.syn/cregex_token_iterator.pass.cpp index a5b1bc58340a0..7ca531dfe6333 100644 --- a/libcxx/test/std/re/re.syn/cregex_token_iterator.pass.cpp +++ b/libcxx/test/std/re/re.syn/cregex_token_iterator.pass.cpp @@ -14,7 +14,9 @@ #include #include "test_macros.h" -int main() +int main(int, char**) { static_assert((std::is_same, std::cregex_token_iterator>::value), ""); + + return 0; } diff --git a/libcxx/test/std/re/re.syn/csub_match.pass.cpp b/libcxx/test/std/re/re.syn/csub_match.pass.cpp index 7c3d644fd11f2..2ace0b983bf07 100644 --- a/libcxx/test/std/re/re.syn/csub_match.pass.cpp +++ b/libcxx/test/std/re/re.syn/csub_match.pass.cpp @@ -14,7 +14,9 @@ #include #include "test_macros.h" -int main() +int main(int, char**) { static_assert((std::is_same, std::csub_match>::value), ""); + + return 0; } diff --git a/libcxx/test/std/re/re.syn/regex.pass.cpp b/libcxx/test/std/re/re.syn/regex.pass.cpp index 1fe91ec349b52..0b4c07b6ff181 100644 --- a/libcxx/test/std/re/re.syn/regex.pass.cpp +++ b/libcxx/test/std/re/re.syn/regex.pass.cpp @@ -14,7 +14,9 @@ #include #include "test_macros.h" -int main() +int main(int, char**) { static_assert((std::is_same, std::regex>::value), ""); + + return 0; } diff --git a/libcxx/test/std/re/re.syn/smatch.pass.cpp b/libcxx/test/std/re/re.syn/smatch.pass.cpp index bee9f9f0d6338..01fa1e95552b7 100644 --- a/libcxx/test/std/re/re.syn/smatch.pass.cpp +++ b/libcxx/test/std/re/re.syn/smatch.pass.cpp @@ -14,7 +14,9 @@ #include #include "test_macros.h" -int main() +int main(int, char**) { static_assert((std::is_same, std::smatch>::value), ""); + + return 0; } diff --git a/libcxx/test/std/re/re.syn/sregex_iterator.pass.cpp b/libcxx/test/std/re/re.syn/sregex_iterator.pass.cpp index a691cc799a70c..1ae462c6b7788 100644 --- a/libcxx/test/std/re/re.syn/sregex_iterator.pass.cpp +++ b/libcxx/test/std/re/re.syn/sregex_iterator.pass.cpp @@ -14,7 +14,9 @@ #include #include "test_macros.h" -int main() +int main(int, char**) { static_assert((std::is_same, std::sregex_iterator>::value), ""); + + return 0; } diff --git a/libcxx/test/std/re/re.syn/sregex_token_iterator.pass.cpp b/libcxx/test/std/re/re.syn/sregex_token_iterator.pass.cpp index 6d148280d7380..4b67b66f2914c 100644 --- a/libcxx/test/std/re/re.syn/sregex_token_iterator.pass.cpp +++ b/libcxx/test/std/re/re.syn/sregex_token_iterator.pass.cpp @@ -14,7 +14,9 @@ #include #include "test_macros.h" -int main() +int main(int, char**) { static_assert((std::is_same, std::sregex_token_iterator>::value), ""); + + return 0; } diff --git a/libcxx/test/std/re/re.syn/ssub_match.pass.cpp b/libcxx/test/std/re/re.syn/ssub_match.pass.cpp index 0730d667ef17f..fe3312968498e 100644 --- a/libcxx/test/std/re/re.syn/ssub_match.pass.cpp +++ b/libcxx/test/std/re/re.syn/ssub_match.pass.cpp @@ -14,7 +14,9 @@ #include #include "test_macros.h" -int main() +int main(int, char**) { static_assert((std::is_same, std::ssub_match>::value), ""); + + return 0; } diff --git a/libcxx/test/std/re/re.syn/wcmatch.pass.cpp b/libcxx/test/std/re/re.syn/wcmatch.pass.cpp index 4c9b7e1f27217..f373e57ac465a 100644 --- a/libcxx/test/std/re/re.syn/wcmatch.pass.cpp +++ b/libcxx/test/std/re/re.syn/wcmatch.pass.cpp @@ -14,7 +14,9 @@ #include #include "test_macros.h" -int main() +int main(int, char**) { static_assert((std::is_same, std::wcmatch>::value), ""); + + return 0; } diff --git a/libcxx/test/std/re/re.syn/wcregex_iterator.pass.cpp b/libcxx/test/std/re/re.syn/wcregex_iterator.pass.cpp index c81aa78c1577c..3425c98fe8c3e 100644 --- a/libcxx/test/std/re/re.syn/wcregex_iterator.pass.cpp +++ b/libcxx/test/std/re/re.syn/wcregex_iterator.pass.cpp @@ -14,7 +14,9 @@ #include #include "test_macros.h" -int main() +int main(int, char**) { static_assert((std::is_same, std::wcregex_iterator>::value), ""); + + return 0; } diff --git a/libcxx/test/std/re/re.syn/wcregex_token_iterator.pass.cpp b/libcxx/test/std/re/re.syn/wcregex_token_iterator.pass.cpp index 9d407103aab45..217653837e0ae 100644 --- a/libcxx/test/std/re/re.syn/wcregex_token_iterator.pass.cpp +++ b/libcxx/test/std/re/re.syn/wcregex_token_iterator.pass.cpp @@ -14,7 +14,9 @@ #include #include "test_macros.h" -int main() +int main(int, char**) { static_assert((std::is_same, std::wcregex_token_iterator>::value), ""); + + return 0; } diff --git a/libcxx/test/std/re/re.syn/wcsub_match.pass.cpp b/libcxx/test/std/re/re.syn/wcsub_match.pass.cpp index 7f18b272f99b3..86a2103b8bd55 100644 --- a/libcxx/test/std/re/re.syn/wcsub_match.pass.cpp +++ b/libcxx/test/std/re/re.syn/wcsub_match.pass.cpp @@ -14,7 +14,9 @@ #include #include "test_macros.h" -int main() +int main(int, char**) { static_assert((std::is_same, std::wcsub_match>::value), ""); + + return 0; } diff --git a/libcxx/test/std/re/re.syn/wregex.pass.cpp b/libcxx/test/std/re/re.syn/wregex.pass.cpp index 9622b89d6d782..5be6f6fb59ec8 100644 --- a/libcxx/test/std/re/re.syn/wregex.pass.cpp +++ b/libcxx/test/std/re/re.syn/wregex.pass.cpp @@ -14,7 +14,9 @@ #include #include "test_macros.h" -int main() +int main(int, char**) { static_assert((std::is_same, std::wregex>::value), ""); + + return 0; } diff --git a/libcxx/test/std/re/re.syn/wsmatch.pass.cpp b/libcxx/test/std/re/re.syn/wsmatch.pass.cpp index 98bcbdc4dcf61..760057e6a7458 100644 --- a/libcxx/test/std/re/re.syn/wsmatch.pass.cpp +++ b/libcxx/test/std/re/re.syn/wsmatch.pass.cpp @@ -14,7 +14,9 @@ #include #include "test_macros.h" -int main() +int main(int, char**) { static_assert((std::is_same, std::wsmatch>::value), ""); + + return 0; } diff --git a/libcxx/test/std/re/re.syn/wsregex_iterator.pass.cpp b/libcxx/test/std/re/re.syn/wsregex_iterator.pass.cpp index 1f733d9050dd7..b1d7edf87702e 100644 --- a/libcxx/test/std/re/re.syn/wsregex_iterator.pass.cpp +++ b/libcxx/test/std/re/re.syn/wsregex_iterator.pass.cpp @@ -14,7 +14,9 @@ #include #include "test_macros.h" -int main() +int main(int, char**) { static_assert((std::is_same, std::wsregex_iterator>::value), ""); + + return 0; } diff --git a/libcxx/test/std/re/re.syn/wsregex_token_iterator.pass.cpp b/libcxx/test/std/re/re.syn/wsregex_token_iterator.pass.cpp index b65e4134589b0..58454a59e938a 100644 --- a/libcxx/test/std/re/re.syn/wsregex_token_iterator.pass.cpp +++ b/libcxx/test/std/re/re.syn/wsregex_token_iterator.pass.cpp @@ -14,7 +14,9 @@ #include #include "test_macros.h" -int main() +int main(int, char**) { static_assert((std::is_same, std::wsregex_token_iterator>::value), ""); + + return 0; } diff --git a/libcxx/test/std/re/re.syn/wssub_match.pass.cpp b/libcxx/test/std/re/re.syn/wssub_match.pass.cpp index 8f82b34d295cc..7ca6dc7734c5d 100644 --- a/libcxx/test/std/re/re.syn/wssub_match.pass.cpp +++ b/libcxx/test/std/re/re.syn/wssub_match.pass.cpp @@ -14,7 +14,9 @@ #include #include "test_macros.h" -int main() +int main(int, char**) { static_assert((std::is_same, std::wssub_match>::value), ""); + + return 0; } diff --git a/libcxx/test/std/re/re.traits/default.pass.cpp b/libcxx/test/std/re/re.traits/default.pass.cpp index b49cc86470115..459f044e037a3 100644 --- a/libcxx/test/std/re/re.traits/default.pass.cpp +++ b/libcxx/test/std/re/re.traits/default.pass.cpp @@ -21,7 +21,7 @@ #include "test_macros.h" #include "platform_support.h" // locale name macros -int main() +int main(int, char**) { { std::regex_traits t1; @@ -36,4 +36,6 @@ int main() std::regex_traits t2; assert(t2.getloc().name() == LOCALE_en_US_UTF_8); } + + return 0; } diff --git a/libcxx/test/std/re/re.traits/getloc.pass.cpp b/libcxx/test/std/re/re.traits/getloc.pass.cpp index 82e804dc681c0..dbc35dec39aa3 100644 --- a/libcxx/test/std/re/re.traits/getloc.pass.cpp +++ b/libcxx/test/std/re/re.traits/getloc.pass.cpp @@ -20,7 +20,7 @@ #include "test_macros.h" #include "platform_support.h" // locale name macros -int main() +int main(int, char**) { { std::regex_traits t1; @@ -35,4 +35,6 @@ int main() std::regex_traits t2; assert(t2.getloc().name() == LOCALE_en_US_UTF_8); } + + return 0; } diff --git a/libcxx/test/std/re/re.traits/imbue.pass.cpp b/libcxx/test/std/re/re.traits/imbue.pass.cpp index d2343f2712e8c..0200ce01e3c0f 100644 --- a/libcxx/test/std/re/re.traits/imbue.pass.cpp +++ b/libcxx/test/std/re/re.traits/imbue.pass.cpp @@ -21,7 +21,7 @@ #include "test_macros.h" #include "platform_support.h" // locale name macros -int main() +int main(int, char**) { { std::regex_traits t; @@ -29,4 +29,6 @@ int main() assert(loc.name() == "C"); assert(t.getloc().name() == LOCALE_en_US_UTF_8); } + + return 0; } diff --git a/libcxx/test/std/re/re.traits/isctype.pass.cpp b/libcxx/test/std/re/re.traits/isctype.pass.cpp index a2f9e2b93d89c..1eed193ae00f4 100644 --- a/libcxx/test/std/re/re.traits/isctype.pass.cpp +++ b/libcxx/test/std/re/re.traits/isctype.pass.cpp @@ -20,7 +20,7 @@ #include #include "test_macros.h" -int main() +int main(int, char**) { { std::regex_traits t; @@ -280,4 +280,6 @@ int main() assert(!t.isctype(L'-', t.lookup_classname(s.begin(), s.end()))); assert(!t.isctype(L'@', t.lookup_classname(s.begin(), s.end()))); } + + return 0; } diff --git a/libcxx/test/std/re/re.traits/length.pass.cpp b/libcxx/test/std/re/re.traits/length.pass.cpp index 822f781abc46a..dce6284bc195e 100644 --- a/libcxx/test/std/re/re.traits/length.pass.cpp +++ b/libcxx/test/std/re/re.traits/length.pass.cpp @@ -17,7 +17,7 @@ #include #include "test_macros.h" -int main() +int main(int, char**) { assert(std::regex_traits::length("") == 0); assert(std::regex_traits::length("1") == 1); @@ -28,4 +28,6 @@ int main() assert(std::regex_traits::length(L"1") == 1); assert(std::regex_traits::length(L"12") == 2); assert(std::regex_traits::length(L"123") == 3); + + return 0; } diff --git a/libcxx/test/std/re/re.traits/lookup_classname.pass.cpp b/libcxx/test/std/re/re.traits/lookup_classname.pass.cpp index 74207a0191b78..38bafa67ebf1d 100644 --- a/libcxx/test/std/re/re.traits/lookup_classname.pass.cpp +++ b/libcxx/test/std/re/re.traits/lookup_classname.pass.cpp @@ -53,7 +53,7 @@ test_w(const char_type* A, assert(!matches_underscore && "should not match underscore"); } -int main() +int main(int, char**) { // if __regex_word is not distinct from all the classes, bad things happen // See https://bugs.llvm.org/show_bug.cgi?id=26476 for an example. @@ -243,4 +243,6 @@ int main() test(L"dig", std::ctype_base::mask()); test(L"", std::ctype_base::mask()); test(L"digits", std::ctype_base::mask()); + + return 0; } diff --git a/libcxx/test/std/re/re.traits/lookup_collatename.pass.cpp b/libcxx/test/std/re/re.traits/lookup_collatename.pass.cpp index 3e1fd860a0bb6..aeb7c50bb8177 100644 --- a/libcxx/test/std/re/re.traits/lookup_collatename.pass.cpp +++ b/libcxx/test/std/re/re.traits/lookup_collatename.pass.cpp @@ -39,7 +39,7 @@ test(const char_type* A, const std::basic_string& expected) assert(t.lookup_collatename(F(A), F(A + t.length(A))) == expected); } -int main() +int main(int, char**) { test("NUL", std::string("\x00", 1)); test("alert", std::string("\x07")); @@ -192,4 +192,6 @@ int main() std::locale::global(std::locale(LOCALE_cs_CZ_ISO8859_2)); test(L"ch", std::wstring(L"ch")); std::locale::global(std::locale("C")); + + return 0; } diff --git a/libcxx/test/std/re/re.traits/transform.pass.cpp b/libcxx/test/std/re/re.traits/transform.pass.cpp index 75a6c40c76c46..0125d419eaec2 100644 --- a/libcxx/test/std/re/re.traits/transform.pass.cpp +++ b/libcxx/test/std/re/re.traits/transform.pass.cpp @@ -25,7 +25,7 @@ #include "test_iterators.h" #include "platform_support.h" // locale name macros -int main() +int main(int, char**) { { std::regex_traits t; @@ -45,4 +45,6 @@ int main() t.imbue(std::locale(LOCALE_cs_CZ_ISO8859_2)); assert(t.transform(F(a), F(a+1)) < t.transform(F(B), F(B+1))); } + + return 0; } diff --git a/libcxx/test/std/re/re.traits/transform_primary.pass.cpp b/libcxx/test/std/re/re.traits/transform_primary.pass.cpp index b2dab418a6e01..e24125e0691eb 100644 --- a/libcxx/test/std/re/re.traits/transform_primary.pass.cpp +++ b/libcxx/test/std/re/re.traits/transform_primary.pass.cpp @@ -27,7 +27,7 @@ #include "test_iterators.h" #include "platform_support.h" // locale name macros -int main() +int main(int, char**) { { std::regex_traits t; @@ -51,4 +51,6 @@ int main() assert(t.transform_primary(F(A), F(A+1)) == t.transform_primary(F(Aacute), F(Aacute+1))); } + + return 0; } diff --git a/libcxx/test/std/re/re.traits/translate.pass.cpp b/libcxx/test/std/re/re.traits/translate.pass.cpp index 96c77f97c8a0b..e56af4df37cdc 100644 --- a/libcxx/test/std/re/re.traits/translate.pass.cpp +++ b/libcxx/test/std/re/re.traits/translate.pass.cpp @@ -17,7 +17,7 @@ #include #include "test_macros.h" -int main() +int main(int, char**) { { std::regex_traits t; @@ -31,4 +31,6 @@ int main() assert(t.translate(L'B') == L'B'); assert(t.translate(L'c') == L'c'); } + + return 0; } diff --git a/libcxx/test/std/re/re.traits/translate_nocase.pass.cpp b/libcxx/test/std/re/re.traits/translate_nocase.pass.cpp index 893c0cd284ea7..6e9f01d162698 100644 --- a/libcxx/test/std/re/re.traits/translate_nocase.pass.cpp +++ b/libcxx/test/std/re/re.traits/translate_nocase.pass.cpp @@ -21,7 +21,7 @@ #include "test_macros.h" #include "platform_support.h" -int main() +int main(int, char**) { { std::regex_traits t; @@ -61,4 +61,6 @@ int main() assert(t.translate_nocase(L'\xDA') == L'\xFA'); assert(t.translate_nocase(L'\xFA') == L'\xFA'); } + + return 0; } diff --git a/libcxx/test/std/re/re.traits/types.pass.cpp b/libcxx/test/std/re/re.traits/types.pass.cpp index 0d7a2f29b721d..c3a8770f01d18 100644 --- a/libcxx/test/std/re/re.traits/types.pass.cpp +++ b/libcxx/test/std/re/re.traits/types.pass.cpp @@ -21,7 +21,7 @@ #include #include "test_macros.h" -int main() +int main(int, char**) { static_assert((std::is_same::char_type, char>::value), ""); static_assert((std::is_same::string_type, std::string>::value), ""); @@ -29,4 +29,6 @@ int main() static_assert((std::is_same::char_type, wchar_t>::value), ""); static_assert((std::is_same::string_type, std::wstring>::value), ""); static_assert((std::is_same::locale_type, std::locale>::value), ""); + + return 0; } diff --git a/libcxx/test/std/re/re.traits/value.pass.cpp b/libcxx/test/std/re/re.traits/value.pass.cpp index 89bf9c3527c93..b7ca1fb7c07a4 100644 --- a/libcxx/test/std/re/re.traits/value.pass.cpp +++ b/libcxx/test/std/re/re.traits/value.pass.cpp @@ -16,7 +16,7 @@ #include #include "test_macros.h" -int main() +int main(int, char**) { { std::regex_traits t; @@ -122,4 +122,6 @@ int main() assert(t.value(c, 16) == -1); } } + + return 0; } diff --git a/libcxx/test/std/strings/basic.string.hash/enabled_hashes.pass.cpp b/libcxx/test/std/strings/basic.string.hash/enabled_hashes.pass.cpp index 10504c50151a1..0fecb1bb081ff 100644 --- a/libcxx/test/std/strings/basic.string.hash/enabled_hashes.pass.cpp +++ b/libcxx/test/std/strings/basic.string.hash/enabled_hashes.pass.cpp @@ -17,7 +17,7 @@ #include "poisoned_hash_helper.hpp" -int main() { +int main(int, char**) { test_library_hash_specializations_available(); { test_hash_enabled_for_type(); @@ -30,4 +30,6 @@ int main() { test_hash_enabled_for_type(); #endif } + + return 0; } diff --git a/libcxx/test/std/strings/basic.string.hash/strings.pass.cpp b/libcxx/test/std/strings/basic.string.hash/strings.pass.cpp index ea97e64f203bb..c2a2ef9564724 100644 --- a/libcxx/test/std/strings/basic.string.hash/strings.pass.cpp +++ b/libcxx/test/std/strings/basic.string.hash/strings.pass.cpp @@ -40,7 +40,7 @@ test() assert(h(s1) != h(s2)); } -int main() +int main(int, char**) { test(); #if defined(__cpp_lib_char8_t) && __cpp_lib_char8_t >= 201811L @@ -51,4 +51,6 @@ int main() test(); #endif // _LIBCPP_HAS_NO_UNICODE_CHARS test(); + + return 0; } diff --git a/libcxx/test/std/strings/basic.string.literals/literal.pass.cpp b/libcxx/test/std/strings/basic.string.literals/literal.pass.cpp index eed5c9420ac63..a51d0d9ac8c0f 100644 --- a/libcxx/test/std/strings/basic.string.literals/literal.pass.cpp +++ b/libcxx/test/std/strings/basic.string.literals/literal.pass.cpp @@ -21,7 +21,7 @@ #endif -int main() +int main(int, char**) { using namespace std::literals::string_literals; @@ -54,4 +54,6 @@ int main() Lfoo = L"ABC"s; assert( Lfoo == L"ABC"); assert( Lfoo == std::wstring ( L"ABC")); ufoo = u"ABC"s; assert( ufoo == u"ABC"); assert( ufoo == std::u16string( u"ABC")); Ufoo = U"ABC"s; assert( Ufoo == U"ABC"); assert( Ufoo == std::u32string( U"ABC")); + + return 0; } diff --git a/libcxx/test/std/strings/basic.string.literals/literal1.fail.cpp b/libcxx/test/std/strings/basic.string.literals/literal1.fail.cpp index 129d2844777b7..be4604059fe99 100644 --- a/libcxx/test/std/strings/basic.string.literals/literal1.fail.cpp +++ b/libcxx/test/std/strings/basic.string.literals/literal1.fail.cpp @@ -12,9 +12,11 @@ #include #include -int main() +int main(int, char**) { using std::string; string foo = ""s; // should fail w/conversion operator not found + + return 0; } diff --git a/libcxx/test/std/strings/basic.string.literals/literal1.pass.cpp b/libcxx/test/std/strings/basic.string.literals/literal1.pass.cpp index 5134ec79aaa03..92777c4f428fe 100644 --- a/libcxx/test/std/strings/basic.string.literals/literal1.pass.cpp +++ b/libcxx/test/std/strings/basic.string.literals/literal1.pass.cpp @@ -12,9 +12,11 @@ #include #include -int main() +int main(int, char**) { using namespace std::literals; std::string foo = ""s; + + return 0; } diff --git a/libcxx/test/std/strings/basic.string.literals/literal2.fail.cpp b/libcxx/test/std/strings/basic.string.literals/literal2.fail.cpp index 3ebbfa24c137d..54a0a9e405bbe 100644 --- a/libcxx/test/std/strings/basic.string.literals/literal2.fail.cpp +++ b/libcxx/test/std/strings/basic.string.literals/literal2.fail.cpp @@ -12,7 +12,9 @@ #include #include -int main() +int main(int, char**) { std::string foo = ""s; // should fail w/conversion operator not found + + return 0; } diff --git a/libcxx/test/std/strings/basic.string.literals/literal2.pass.cpp b/libcxx/test/std/strings/basic.string.literals/literal2.pass.cpp index ac41ce94c9b5b..6f73ae9a10376 100644 --- a/libcxx/test/std/strings/basic.string.literals/literal2.pass.cpp +++ b/libcxx/test/std/strings/basic.string.literals/literal2.pass.cpp @@ -12,9 +12,11 @@ #include #include -int main() +int main(int, char**) { using namespace std::literals::string_literals; std::string foo = ""s; + + return 0; } diff --git a/libcxx/test/std/strings/basic.string.literals/literal3.pass.cpp b/libcxx/test/std/strings/basic.string.literals/literal3.pass.cpp index c5ca6708addca..b7a8d55368753 100644 --- a/libcxx/test/std/strings/basic.string.literals/literal3.pass.cpp +++ b/libcxx/test/std/strings/basic.string.literals/literal3.pass.cpp @@ -12,9 +12,11 @@ #include #include -int main() +int main(int, char**) { using namespace std; string foo = ""s; + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/allocator_mismatch.fail.cpp b/libcxx/test/std/strings/basic.string/allocator_mismatch.fail.cpp index ae63acfcec119..1d016991f0c62 100644 --- a/libcxx/test/std/strings/basic.string/allocator_mismatch.fail.cpp +++ b/libcxx/test/std/strings/basic.string/allocator_mismatch.fail.cpp @@ -11,7 +11,9 @@ #include -int main() +int main(int, char**) { std::basic_string, std::allocator > s; + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/char.bad.fail.cpp b/libcxx/test/std/strings/basic.string/char.bad.fail.cpp index d78cb6aad9828..bace91c3222b4 100644 --- a/libcxx/test/std/strings/basic.string/char.bad.fail.cpp +++ b/libcxx/test/std/strings/basic.string/char.bad.fail.cpp @@ -26,7 +26,7 @@ struct NotStandardLayout { int two; }; -int main() +int main(int, char**) { { // array @@ -49,4 +49,6 @@ int main() std::basic_string > s; // expected-error-re@string:* {{static_assert failed{{.*}} "Character type of basic_string must be standard-layout"}} } + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.access/at.pass.cpp b/libcxx/test/std/strings/basic.string/string.access/at.pass.cpp index 6515e2727211b..2105a1504f496 100644 --- a/libcxx/test/std/strings/basic.string/string.access/at.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.access/at.pass.cpp @@ -11,6 +11,11 @@ // const_reference at(size_type pos) const; // reference at(size_type pos); +// When back-deploying to macosx10.7, the RTTI for exception classes +// incorrectly provided by libc++.dylib is mixed with the one in +// libc++abi.dylib and exceptions are not caught properly. +// XFAIL: with_system_cxx_lib=macosx10.7 + #include #include #include @@ -54,7 +59,7 @@ test(S s, typename S::size_type pos) #endif } -int main() +int main(int, char**) { { typedef std::string S; @@ -74,4 +79,6 @@ int main() test(S("123"), 3); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.access/back.pass.cpp b/libcxx/test/std/strings/basic.string/string.access/back.pass.cpp index b4108010ac371..3831da0845cf8 100644 --- a/libcxx/test/std/strings/basic.string/string.access/back.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.access/back.pass.cpp @@ -31,7 +31,7 @@ test(S s) assert(s.back() == typename S::value_type('z')); } -int main() +int main(int, char**) { { typedef std::string S; @@ -52,4 +52,6 @@ int main() assert(false); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.access/db_back.pass.cpp b/libcxx/test/std/strings/basic.string/string.access/db_back.pass.cpp index 5034bfa11a9e7..e1cf707a6f0b1 100644 --- a/libcxx/test/std/strings/basic.string/string.access/db_back.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.access/db_back.pass.cpp @@ -22,7 +22,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::string S; @@ -46,8 +46,10 @@ int main() #else -int main() +int main(int, char**) { + + return 0; } #endif diff --git a/libcxx/test/std/strings/basic.string/string.access/db_cback.pass.cpp b/libcxx/test/std/strings/basic.string/string.access/db_cback.pass.cpp index ddffb6cd7871a..e3e6db525e4c3 100644 --- a/libcxx/test/std/strings/basic.string/string.access/db_cback.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.access/db_cback.pass.cpp @@ -22,7 +22,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::string S; @@ -42,8 +42,10 @@ int main() #else -int main() +int main(int, char**) { + + return 0; } #endif diff --git a/libcxx/test/std/strings/basic.string/string.access/db_cfront.pass.cpp b/libcxx/test/std/strings/basic.string/string.access/db_cfront.pass.cpp index e171883dc366c..c9b2ba7c88ed4 100644 --- a/libcxx/test/std/strings/basic.string/string.access/db_cfront.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.access/db_cfront.pass.cpp @@ -22,7 +22,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::string S; @@ -42,8 +42,10 @@ int main() #else -int main() +int main(int, char**) { + + return 0; } #endif diff --git a/libcxx/test/std/strings/basic.string/string.access/db_cindex.pass.cpp b/libcxx/test/std/strings/basic.string/string.access/db_cindex.pass.cpp index 770ab333c8b4e..c7b430efc9834 100644 --- a/libcxx/test/std/strings/basic.string/string.access/db_cindex.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.access/db_cindex.pass.cpp @@ -22,7 +22,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::string S; @@ -44,8 +44,10 @@ int main() #else -int main() +int main(int, char**) { + + return 0; } #endif diff --git a/libcxx/test/std/strings/basic.string/string.access/db_front.pass.cpp b/libcxx/test/std/strings/basic.string/string.access/db_front.pass.cpp index 7f2db649a1248..73db22405103a 100644 --- a/libcxx/test/std/strings/basic.string/string.access/db_front.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.access/db_front.pass.cpp @@ -22,7 +22,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::string S; @@ -46,8 +46,10 @@ int main() #else -int main() +int main(int, char**) { + + return 0; } #endif diff --git a/libcxx/test/std/strings/basic.string/string.access/db_index.pass.cpp b/libcxx/test/std/strings/basic.string/string.access/db_index.pass.cpp index 40318e3988ff9..d3f2e8d28d0eb 100644 --- a/libcxx/test/std/strings/basic.string/string.access/db_index.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.access/db_index.pass.cpp @@ -22,7 +22,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::string S; @@ -44,8 +44,10 @@ int main() #else -int main() +int main(int, char**) { + + return 0; } #endif diff --git a/libcxx/test/std/strings/basic.string/string.access/front.pass.cpp b/libcxx/test/std/strings/basic.string/string.access/front.pass.cpp index 5eee328feca0c..d51a12f0a77b5 100644 --- a/libcxx/test/std/strings/basic.string/string.access/front.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.access/front.pass.cpp @@ -31,7 +31,7 @@ test(S s) assert(s.front() == typename S::value_type('z')); } -int main() +int main(int, char**) { { typedef std::string S; @@ -52,4 +52,6 @@ int main() assert(false); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.access/index.pass.cpp b/libcxx/test/std/strings/basic.string/string.access/index.pass.cpp index d529567c6fb26..3a1224ca301d0 100644 --- a/libcxx/test/std/strings/basic.string/string.access/index.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.access/index.pass.cpp @@ -20,7 +20,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::string S; @@ -59,4 +59,6 @@ int main() assert(false); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.capacity/capacity.pass.cpp b/libcxx/test/std/strings/basic.string/string.capacity/capacity.pass.cpp index 9f09dea1d3ef2..02187c5193af9 100644 --- a/libcxx/test/std/strings/basic.string/string.capacity/capacity.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.capacity/capacity.pass.cpp @@ -40,7 +40,7 @@ test(S s) S::allocator_type::throw_after = INT_MAX; } -int main() +int main(int, char**) { { typedef std::basic_string, test_allocator > S; @@ -60,4 +60,6 @@ int main() assert(s.capacity() > 0); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.capacity/clear.pass.cpp b/libcxx/test/std/strings/basic.string/string.capacity/clear.pass.cpp index 4f75e013401ed..914842bb7a653 100644 --- a/libcxx/test/std/strings/basic.string/string.capacity/clear.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.capacity/clear.pass.cpp @@ -23,7 +23,7 @@ test(S s) assert(s.size() == 0); } -int main() +int main(int, char**) { { typedef std::string S; @@ -53,4 +53,6 @@ int main() test(s); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.capacity/empty.fail.cpp b/libcxx/test/std/strings/basic.string/string.capacity/empty.fail.cpp index 2359dea942d10..1bfa388b7b9c6 100644 --- a/libcxx/test/std/strings/basic.string/string.capacity/empty.fail.cpp +++ b/libcxx/test/std/strings/basic.string/string.capacity/empty.fail.cpp @@ -20,8 +20,10 @@ #include "test_macros.h" -int main () +int main(int, char**) { std::string c; c.empty(); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.capacity/empty.pass.cpp b/libcxx/test/std/strings/basic.string/string.capacity/empty.pass.cpp index 56d925d571c6f..47827db7f75c1 100644 --- a/libcxx/test/std/strings/basic.string/string.capacity/empty.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.capacity/empty.pass.cpp @@ -24,7 +24,7 @@ test(const S& s) assert(s.empty() == (s.size() == 0)); } -int main() +int main(int, char**) { { typedef std::string S; @@ -40,4 +40,6 @@ int main() test(S("12345678901234567890123456789012345678901234567890")); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.capacity/length.pass.cpp b/libcxx/test/std/strings/basic.string/string.capacity/length.pass.cpp index 617d81a9205a6..b61ec488e27e3 100644 --- a/libcxx/test/std/strings/basic.string/string.capacity/length.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.capacity/length.pass.cpp @@ -22,7 +22,7 @@ test(const S& s) assert(s.length() == s.size()); } -int main() +int main(int, char**) { { typedef std::string S; @@ -38,4 +38,6 @@ int main() test(S("12345678901234567890123456789012345678901234567890")); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.capacity/max_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.capacity/max_size.pass.cpp index 68017f45349c9..8f8c9a3fb428c 100644 --- a/libcxx/test/std/strings/basic.string/string.capacity/max_size.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.capacity/max_size.pass.cpp @@ -54,7 +54,7 @@ test(const S& s) test2(s); } -int main() +int main(int, char**) { { typedef std::string S; @@ -70,4 +70,6 @@ int main() test(S("12345678901234567890123456789012345678901234567890")); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.capacity/over_max_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.capacity/over_max_size.pass.cpp index 414b6742495c8..9832df536c9ad 100644 --- a/libcxx/test/std/strings/basic.string/string.capacity/over_max_size.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.capacity/over_max_size.pass.cpp @@ -35,7 +35,7 @@ test(const S& s) assert ( false ); } -int main() +int main(int, char**) { { typedef std::string S; @@ -51,4 +51,6 @@ int main() test(S("12345678901234567890123456789012345678901234567890")); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.capacity/reserve.pass.cpp b/libcxx/test/std/strings/basic.string/string.capacity/reserve.pass.cpp index 33699a79932d5..34582a40dda8b 100644 --- a/libcxx/test/std/strings/basic.string/string.capacity/reserve.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.capacity/reserve.pass.cpp @@ -12,6 +12,11 @@ // void reserve(); // void reserve(size_type res_arg); +// When back-deploying to macosx10.7, the RTTI for exception classes +// incorrectly provided by libc++.dylib is mixed with the one in +// libc++abi.dylib and exceptions are not caught properly. +// XFAIL: with_system_cxx_lib=macosx10.7 + #include #include #include @@ -65,7 +70,7 @@ test(S s, typename S::size_type res_arg) #endif } -int main() +int main(int, char**) { { typedef std::string S; @@ -131,4 +136,6 @@ int main() } } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.capacity/resize_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.capacity/resize_size.pass.cpp index ad37dc30a1e40..da692633ae7e4 100644 --- a/libcxx/test/std/strings/basic.string/string.capacity/resize_size.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.capacity/resize_size.pass.cpp @@ -10,6 +10,11 @@ // void resize(size_type n); +// When back-deploying to macosx10.7, the RTTI for exception classes +// incorrectly provided by libc++.dylib is mixed with the one in +// libc++abi.dylib and exceptions are not caught properly. +// XFAIL: with_system_cxx_lib=macosx10.7 + #include #include #include @@ -43,7 +48,7 @@ test(S s, typename S::size_type n, S expected) #endif } -int main() +int main(int, char**) { { typedef std::string S; @@ -85,4 +90,6 @@ int main() test(S(), S::npos, S("not going to happen")); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.capacity/resize_size_char.pass.cpp b/libcxx/test/std/strings/basic.string/string.capacity/resize_size_char.pass.cpp index b9005341456b8..c52bd9922762b 100644 --- a/libcxx/test/std/strings/basic.string/string.capacity/resize_size_char.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.capacity/resize_size_char.pass.cpp @@ -10,6 +10,11 @@ // void resize(size_type n, charT c); +// When back-deploying to macosx10.7, the RTTI for exception classes +// incorrectly provided by libc++.dylib is mixed with the one in +// libc++abi.dylib and exceptions are not caught properly. +// XFAIL: with_system_cxx_lib=macosx10.7 + #include #include #include @@ -43,7 +48,7 @@ test(S s, typename S::size_type n, typename S::value_type c, S expected) #endif } -int main() +int main(int, char**) { { typedef std::string S; @@ -85,4 +90,6 @@ int main() test(S(), S::npos, 'a', S("not going to happen")); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.capacity/shrink_to_fit.pass.cpp b/libcxx/test/std/strings/basic.string/string.capacity/shrink_to_fit.pass.cpp index ee91ac1676b4b..2c6ce0df6f9fb 100644 --- a/libcxx/test/std/strings/basic.string/string.capacity/shrink_to_fit.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.capacity/shrink_to_fit.pass.cpp @@ -29,7 +29,7 @@ test(S s) assert(s.capacity() >= s.size()); } -int main() +int main(int, char**) { { typedef std::string S; @@ -59,4 +59,6 @@ int main() test(s); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.capacity/size.pass.cpp b/libcxx/test/std/strings/basic.string/string.capacity/size.pass.cpp index 16b236eebb879..f3f89a5a6d861 100644 --- a/libcxx/test/std/strings/basic.string/string.capacity/size.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.capacity/size.pass.cpp @@ -22,7 +22,7 @@ test(const S& s, typename S::size_type c) assert(s.size() == c); } -int main() +int main(int, char**) { { typedef std::string S; @@ -38,4 +38,6 @@ int main() test(S("12345678901234567890123456789012345678901234567890"), 50); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.cons/T_size_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.cons/T_size_size.pass.cpp index 4f8158ea56d29..38725979f9d08 100644 --- a/libcxx/test/std/strings/basic.string/string.cons/T_size_size.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.cons/T_size_size.pass.cpp @@ -91,7 +91,7 @@ test(SV sv, std::size_t pos, std::size_t n, const typename S::allocator_type& a) #endif } -int main() +int main(int, char**) { { @@ -183,4 +183,6 @@ int main() S s7(s.data(), 2); // calls ctor(const char *, len) assert(s7 == "AB"); } + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.cons/alloc.pass.cpp b/libcxx/test/std/strings/basic.string/string.cons/alloc.pass.cpp index a2518a184c0a2..765f61eafb813 100644 --- a/libcxx/test/std/strings/basic.string/string.cons/alloc.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.cons/alloc.pass.cpp @@ -85,11 +85,13 @@ test2() #endif -int main() +int main(int, char**) { test, test_allocator > >(); #if TEST_STD_VER >= 11 test2, min_allocator > >(); test2, explicit_allocator > >(); #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.cons/brace_assignment.pass.cpp b/libcxx/test/std/strings/basic.string/string.cons/brace_assignment.pass.cpp index 44db3c14059e6..5e77e46b2e43f 100644 --- a/libcxx/test/std/strings/basic.string/string.cons/brace_assignment.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.cons/brace_assignment.pass.cpp @@ -18,7 +18,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { // Test that assignment from {} and {ptr, len} are allowed and are not // ambiguous. @@ -32,4 +32,6 @@ int main() s = {"abc", 2}; assert(s == "ab"); } + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.cons/char_assignment.pass.cpp b/libcxx/test/std/strings/basic.string/string.cons/char_assignment.pass.cpp index e3976cffa94b5..53f676e3bb38a 100644 --- a/libcxx/test/std/strings/basic.string/string.cons/char_assignment.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.cons/char_assignment.pass.cpp @@ -28,7 +28,7 @@ test(S s1, typename S::value_type s2) assert(s1.capacity() >= s1.size()); } -int main() +int main(int, char**) { { typedef std::string S; @@ -46,4 +46,6 @@ int main() test(S("1234567890123456789012345678901234567890123456789012345678901234567890"), 'a'); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.cons/copy.pass.cpp b/libcxx/test/std/strings/basic.string/string.cons/copy.pass.cpp index f2cfa8a0e379e..0024f2defac63 100644 --- a/libcxx/test/std/strings/basic.string/string.cons/copy.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.cons/copy.pass.cpp @@ -28,7 +28,7 @@ test(S s1) assert(s2.get_allocator() == s1.get_allocator()); } -int main() +int main(int, char**) { { typedef test_allocator A; @@ -46,4 +46,6 @@ int main() test(S("1234567890123456789012345678901234567890123456789012345678901234567890", A())); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.cons/copy_alloc.pass.cpp b/libcxx/test/std/strings/basic.string/string.cons/copy_alloc.pass.cpp index 57a17e8abb9c9..a635f017e8045 100644 --- a/libcxx/test/std/strings/basic.string/string.cons/copy_alloc.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.cons/copy_alloc.pass.cpp @@ -87,7 +87,7 @@ test(S s1, const typename S::allocator_type& a) assert(s2.get_allocator() == a); } -int main() +int main(int, char**) { { typedef test_allocator A; @@ -127,4 +127,6 @@ int main() } #endif #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.cons/copy_assignment.pass.cpp b/libcxx/test/std/strings/basic.string/string.cons/copy_assignment.pass.cpp index a3c1389dafebf..8b3b7ac04c8ea 100644 --- a/libcxx/test/std/strings/basic.string/string.cons/copy_assignment.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.cons/copy_assignment.pass.cpp @@ -27,7 +27,7 @@ test(S s1, const S& s2) assert(s1.capacity() >= s1.size()); } -int main() +int main(int, char**) { { typedef std::string S; @@ -76,4 +76,6 @@ int main() assert(s == "a"); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.cons/default_noexcept.pass.cpp b/libcxx/test/std/strings/basic.string/string.cons/default_noexcept.pass.cpp index 1ab00b60e111a..301876b2c3b60 100644 --- a/libcxx/test/std/strings/basic.string/string.cons/default_noexcept.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.cons/default_noexcept.pass.cpp @@ -21,7 +21,7 @@ #include "test_macros.h" #include "test_allocator.h" -int main() +int main(int, char**) { { typedef std::string C; @@ -35,4 +35,6 @@ int main() typedef std::basic_string, limited_allocator> C; static_assert(!std::is_nothrow_default_constructible::value, ""); } + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.cons/dtor_noexcept.pass.cpp b/libcxx/test/std/strings/basic.string/string.cons/dtor_noexcept.pass.cpp index 5b57fe3cadc70..d1372d2964371 100644 --- a/libcxx/test/std/strings/basic.string/string.cons/dtor_noexcept.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.cons/dtor_noexcept.pass.cpp @@ -32,7 +32,7 @@ struct throwing_alloc std::string s; std::wstring ws; -int main() +int main(int, char**) { { typedef std::string C; @@ -48,4 +48,6 @@ int main() static_assert(!std::is_nothrow_destructible::value, ""); } #endif // _LIBCPP_VERSION + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.cons/implicit_deduction_guides.pass.cpp b/libcxx/test/std/strings/basic.string/string.cons/implicit_deduction_guides.pass.cpp index 7eb364e62391b..9e31d3e6f9e17 100644 --- a/libcxx/test/std/strings/basic.string/string.cons/implicit_deduction_guides.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.cons/implicit_deduction_guides.pass.cpp @@ -46,7 +46,7 @@ using BStr = std::basic_string, Alloc>; // (13) basic_string(initializer_list, A const& = A()) // (14) basic_string(BSV, A const& = A()) // (15) basic_string(const T&, size_type, size_type, A const& = A()) -int main() +int main(int, char**) { using TestSizeT = test_allocator::size_type; { // Testing (1) @@ -313,4 +313,6 @@ int main() ASSERT_SAME_TYPE(decltype(w), ExpectW); assert(w == L"cd"); } + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.cons/initializer_list.pass.cpp b/libcxx/test/std/strings/basic.string/string.cons/initializer_list.pass.cpp index 3a8914cd3d805..a106203d49ca4 100644 --- a/libcxx/test/std/strings/basic.string/string.cons/initializer_list.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.cons/initializer_list.pass.cpp @@ -18,7 +18,7 @@ #include "test_allocator.h" #include "min_allocator.h" -int main() +int main(int, char**) { { std::string s = {'a', 'b', 'c'}; @@ -40,4 +40,6 @@ int main() s = {L'a', L'b', L'c'}; assert(s == L"abc"); } + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.cons/initializer_list_assignment.pass.cpp b/libcxx/test/std/strings/basic.string/string.cons/initializer_list_assignment.pass.cpp index 6a512f274137c..dcb9bb911b439 100644 --- a/libcxx/test/std/strings/basic.string/string.cons/initializer_list_assignment.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.cons/initializer_list_assignment.pass.cpp @@ -17,7 +17,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { std::string s; @@ -30,4 +30,6 @@ int main() s = {'a', 'b', 'c'}; assert(s == "abc"); } + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.cons/iter_alloc.pass.cpp b/libcxx/test/std/strings/basic.string/string.cons/iter_alloc.pass.cpp index 6966e6e5d24c6..042018cb53232 100644 --- a/libcxx/test/std/strings/basic.string/string.cons/iter_alloc.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.cons/iter_alloc.pass.cpp @@ -56,7 +56,7 @@ test(It first, It last, const A& a) assert(s2.capacity() >= s2.size()); } -int main() +int main(int, char**) { { typedef test_allocator A; @@ -116,4 +116,6 @@ int main() test(input_iterator(s), input_iterator(s+50), A()); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.cons/iter_alloc_deduction.fail.cpp b/libcxx/test/std/strings/basic.string/string.cons/iter_alloc_deduction.fail.cpp index f87aac5f0e707..57fd550ac47c7 100644 --- a/libcxx/test/std/strings/basic.string/string.cons/iter_alloc_deduction.fail.cpp +++ b/libcxx/test/std/strings/basic.string/string.cons/iter_alloc_deduction.fail.cpp @@ -35,7 +35,7 @@ class NotAnItertor {}; template struct NotAnAllocator { typedef T value_type; }; -int main() +int main(int, char**) { { // Not an iterator at all std::basic_string s1{NotAnItertor{}, NotAnItertor{}, std::allocator{}}; // expected-error {{no viable constructor or deduction guide for deduction of template arguments of 'basic_string'}} @@ -52,4 +52,6 @@ int main() std::basic_string s1{s, s+10, NotAnAllocator{}}; // expected-error {{no viable constructor or deduction guide for deduction of template arguments of 'basic_string'}} } + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.cons/iter_alloc_deduction.pass.cpp b/libcxx/test/std/strings/basic.string/string.cons/iter_alloc_deduction.pass.cpp index dac9ee33277bd..44daab4fcdc96 100644 --- a/libcxx/test/std/strings/basic.string/string.cons/iter_alloc_deduction.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.cons/iter_alloc_deduction.pass.cpp @@ -36,7 +36,7 @@ #include "../input_iterator.h" #include "min_allocator.h" -int main() +int main(int, char**) { { const char* s = "12345678901234"; @@ -89,4 +89,6 @@ int main() assert(s1.size() == 10); assert(s1.compare(0, s1.size(), s, s1.size()) == 0); } + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.cons/move.pass.cpp b/libcxx/test/std/strings/basic.string/string.cons/move.pass.cpp index 1c11368c7ea7f..729c8e806906c 100644 --- a/libcxx/test/std/strings/basic.string/string.cons/move.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.cons/move.pass.cpp @@ -32,7 +32,7 @@ test(S s0) assert(s2.get_allocator() == s1.get_allocator()); } -int main() +int main(int, char**) { { typedef test_allocator A; @@ -48,4 +48,6 @@ int main() test(S("1", A())); test(S("1234567890123456789012345678901234567890123456789012345678901234567890", A())); } + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.cons/move_alloc.pass.cpp b/libcxx/test/std/strings/basic.string/string.cons/move_alloc.pass.cpp index e426e2dc85dd3..63e349e71ce51 100644 --- a/libcxx/test/std/strings/basic.string/string.cons/move_alloc.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.cons/move_alloc.pass.cpp @@ -34,7 +34,7 @@ test(S s0, const typename S::allocator_type& a) } -int main() +int main(int, char**) { { typedef test_allocator A; @@ -74,4 +74,6 @@ int main() test(S("1"), A()); test(S("1234567890123456789012345678901234567890123456789012345678901234567890"), A()); } + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.cons/move_assign_noexcept.pass.cpp b/libcxx/test/std/strings/basic.string/string.cons/move_assign_noexcept.pass.cpp index 88bc123107125..2a00898c1deac 100644 --- a/libcxx/test/std/strings/basic.string/string.cons/move_assign_noexcept.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.cons/move_assign_noexcept.pass.cpp @@ -62,7 +62,7 @@ struct some_alloc3 typedef std::false_type is_always_equal; }; -int main() +int main(int, char**) { { typedef std::string C; @@ -93,4 +93,6 @@ int main() static_assert(!std::is_nothrow_move_assignable::value, ""); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.cons/move_assignment.pass.cpp b/libcxx/test/std/strings/basic.string/string.cons/move_assignment.pass.cpp index b039e79554fa3..9684fe7380a48 100644 --- a/libcxx/test/std/strings/basic.string/string.cons/move_assignment.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.cons/move_assignment.pass.cpp @@ -32,7 +32,7 @@ test(S s1, S s2) assert(s1.capacity() >= s1.size()); } -int main() +int main(int, char**) { { typedef std::string S; @@ -70,4 +70,6 @@ int main() "1234567890123456789012345678901234567890123456789012345678901234567890"), S("abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz")); } + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.cons/move_noexcept.pass.cpp b/libcxx/test/std/strings/basic.string/string.cons/move_noexcept.pass.cpp index 374183f99ff3c..ee839cf261c3f 100644 --- a/libcxx/test/std/strings/basic.string/string.cons/move_noexcept.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.cons/move_noexcept.pass.cpp @@ -21,7 +21,7 @@ #include "test_macros.h" #include "test_allocator.h" -int main() +int main(int, char**) { { typedef std::string C; @@ -39,4 +39,6 @@ int main() static_assert( std::is_nothrow_move_constructible::value, ""); #endif } + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.cons/pointer_alloc.pass.cpp b/libcxx/test/std/strings/basic.string/string.cons/pointer_alloc.pass.cpp index b68c5228a4ba4..d67f1231fd34d 100644 --- a/libcxx/test/std/strings/basic.string/string.cons/pointer_alloc.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.cons/pointer_alloc.pass.cpp @@ -51,7 +51,7 @@ test(const charT* s, const A& a) assert(s2.capacity() >= s2.size()); } -int main() +int main(int, char**) { { typedef test_allocator A; @@ -85,4 +85,6 @@ int main() test("123456798012345679801234567980123456798012345679801234567980", A()); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.cons/pointer_assignment.pass.cpp b/libcxx/test/std/strings/basic.string/string.cons/pointer_assignment.pass.cpp index 1216f3f18cd0d..4a885485bea52 100644 --- a/libcxx/test/std/strings/basic.string/string.cons/pointer_assignment.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.cons/pointer_assignment.pass.cpp @@ -29,7 +29,7 @@ test(S s1, const typename S::value_type* s2) assert(s1.capacity() >= s1.size()); } -int main() +int main(int, char**) { { typedef std::string S; @@ -69,4 +69,6 @@ int main() "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz"); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.cons/pointer_size_alloc.pass.cpp b/libcxx/test/std/strings/basic.string/string.cons/pointer_size_alloc.pass.cpp index 96457135ed182..75ad883fcf168 100644 --- a/libcxx/test/std/strings/basic.string/string.cons/pointer_size_alloc.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.cons/pointer_size_alloc.pass.cpp @@ -48,7 +48,7 @@ test(const charT* s, unsigned n, const A& a) assert(s2.capacity() >= s2.size()); } -int main() +int main(int, char**) { { typedef test_allocator A; @@ -90,4 +90,6 @@ int main() assert(s == "a"); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.cons/size_char_alloc.pass.cpp b/libcxx/test/std/strings/basic.string/string.cons/size_char_alloc.pass.cpp index 21ed485ef1353..d509971910f11 100644 --- a/libcxx/test/std/strings/basic.string/string.cons/size_char_alloc.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.cons/size_char_alloc.pass.cpp @@ -80,7 +80,7 @@ test(Tp n, Tp c, const A& a) assert(s2.capacity() >= s2.size()); } -int main() +int main(int, char**) { { typedef test_allocator A; @@ -120,4 +120,6 @@ int main() test(static_cast(100), static_cast(65), A()); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.cons/string_view.fail.cpp b/libcxx/test/std/strings/basic.string/string.cons/string_view.fail.cpp index d7a054073d405..61d5b3db4e942 100644 --- a/libcxx/test/std/strings/basic.string/string.cons/string_view.fail.cpp +++ b/libcxx/test/std/strings/basic.string/string.cons/string_view.fail.cpp @@ -15,8 +15,10 @@ void foo ( const string &s ) {} -int main() +int main(int, char**) { std::string_view sv = "ABCDE"; foo(sv); // requires implicit conversion from string_view to string + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.cons/string_view.pass.cpp b/libcxx/test/std/strings/basic.string/string.cons/string_view.pass.cpp index f50d9e51981f3..b423c327dca29 100644 --- a/libcxx/test/std/strings/basic.string/string.cons/string_view.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.cons/string_view.pass.cpp @@ -71,7 +71,7 @@ test(std::basic_string_view sv, const A& a) } } -int main() +int main(int, char**) { { typedef test_allocator A; @@ -107,4 +107,6 @@ int main() test(SV("123456798012345679801234567980123456798012345679801234567980"), A()); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.cons/string_view_assignment.pass.cpp b/libcxx/test/std/strings/basic.string/string.cons/string_view_assignment.pass.cpp index 9a50f62a7ae25..942d990ee503f 100644 --- a/libcxx/test/std/strings/basic.string/string.cons/string_view_assignment.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.cons/string_view_assignment.pass.cpp @@ -28,7 +28,7 @@ test(S s1, SV sv) assert(s1.capacity() >= s1.size()); } -int main() +int main(int, char**) { { typedef std::string S; @@ -70,4 +70,6 @@ int main() SV("abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz")); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.cons/string_view_deduction.fail.cpp b/libcxx/test/std/strings/basic.string/string.cons/string_view_deduction.fail.cpp index 23e6668e69cff..62ce16eca161e 100644 --- a/libcxx/test/std/strings/basic.string/string.cons/string_view_deduction.fail.cpp +++ b/libcxx/test/std/strings/basic.string/string.cons/string_view_deduction.fail.cpp @@ -31,10 +31,12 @@ #include #include -int main() +int main(int, char**) { { std::string_view sv = "12345678901234"; std::basic_string s1{sv, 23}; // expected-error {{no viable constructor or deduction guide for deduction of template arguments of 'basic_string'}} } + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.cons/string_view_deduction.pass.cpp b/libcxx/test/std/strings/basic.string/string.cons/string_view_deduction.pass.cpp index ee731581fb636..b3adc41464f5e 100644 --- a/libcxx/test/std/strings/basic.string/string.cons/string_view_deduction.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.cons/string_view_deduction.pass.cpp @@ -38,7 +38,7 @@ #include "../input_iterator.h" #include "min_allocator.h" -int main() +int main(int, char**) { { std::string_view sv = "12345678901234"; @@ -103,4 +103,6 @@ int main() assert(s1.size() == sv.size()); assert(s1.compare(0, s1.size(), sv.data(), s1.size()) == 0); } + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.cons/string_view_size_size_deduction.fail.cpp b/libcxx/test/std/strings/basic.string/string.cons/string_view_size_size_deduction.fail.cpp index ce4e695377fef..cff605677de92 100644 --- a/libcxx/test/std/strings/basic.string/string.cons/string_view_size_size_deduction.fail.cpp +++ b/libcxx/test/std/strings/basic.string/string.cons/string_view_size_size_deduction.fail.cpp @@ -37,10 +37,12 @@ #include #include -int main() +int main(int, char**) { { std::string_view sv = "12345678901234"; std::basic_string s1{sv, 0, 4, 23}; // expected-error {{no viable constructor or deduction guide for deduction of template arguments of 'basic_string'}} } + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.cons/string_view_size_size_deduction.pass.cpp b/libcxx/test/std/strings/basic.string/string.cons/string_view_size_size_deduction.pass.cpp index daba3bd12046e..983ab78e4ce4d 100644 --- a/libcxx/test/std/strings/basic.string/string.cons/string_view_size_size_deduction.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.cons/string_view_size_size_deduction.pass.cpp @@ -42,7 +42,7 @@ #include "../input_iterator.h" #include "min_allocator.h" -int main() +int main(int, char**) { { std::string_view sv = "12345678901234"; @@ -107,4 +107,6 @@ int main() assert(s1.size() == 4); assert(s1.compare(0, s1.size(), sv.data(), s1.size()) == 0); } + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.cons/substr.pass.cpp b/libcxx/test/std/strings/basic.string/string.cons/substr.pass.cpp index 05c53ac23db33..585b684f3fbaa 100644 --- a/libcxx/test/std/strings/basic.string/string.cons/substr.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.cons/substr.pass.cpp @@ -16,6 +16,11 @@ // size_type pos, // const Allocator& a = Allocator()); +// When back-deploying to macosx10.7, the RTTI for exception classes +// incorrectly provided by libc++.dylib is mixed with the one in +// libc++abi.dylib and exceptions are not caught properly. +// XFAIL: with_system_cxx_lib=macosx10.7 + #include #include #include @@ -140,7 +145,7 @@ void test2583() #endif #endif -int main() +int main(int, char**) { { typedef test_allocator A; @@ -224,4 +229,6 @@ int main() test2583(); #endif #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.ends_with/ends_with.char.pass.cpp b/libcxx/test/std/strings/basic.string/string.ends_with/ends_with.char.pass.cpp index 7d1c26418be40..e2afe04202c51 100644 --- a/libcxx/test/std/strings/basic.string/string.ends_with/ends_with.char.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.ends_with/ends_with.char.pass.cpp @@ -16,7 +16,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { { typedef std::string S; @@ -30,4 +30,6 @@ int main() assert ( s2.ends_with('e')); assert (!s2.ends_with('x')); } + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.ends_with/ends_with.ptr.pass.cpp b/libcxx/test/std/strings/basic.string/string.ends_with/ends_with.ptr.pass.cpp index 87b94042ffe4f..a4f8b1aa39c25 100644 --- a/libcxx/test/std/strings/basic.string/string.ends_with/ends_with.ptr.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.ends_with/ends_with.ptr.pass.cpp @@ -16,7 +16,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { { typedef std::string S; @@ -59,4 +59,6 @@ int main() assert (!sNot.ends_with("abcde")); assert ( sNot.ends_with("def")); } + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.ends_with/ends_with.string_view.pass.cpp b/libcxx/test/std/strings/basic.string/string.ends_with/ends_with.string_view.pass.cpp index 3d75e23dac7c2..cbfffcfce98da 100644 --- a/libcxx/test/std/strings/basic.string/string.ends_with/ends_with.string_view.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.ends_with/ends_with.string_view.pass.cpp @@ -16,7 +16,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { { typedef std::string S; @@ -68,4 +68,6 @@ int main() assert (!sNot.ends_with(sv5)); assert ( sNot.ends_with(svNot)); } + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.iterators/begin.pass.cpp b/libcxx/test/std/strings/basic.string/string.iterators/begin.pass.cpp index eedc9b991a208..fbae9fab7d2f1 100644 --- a/libcxx/test/std/strings/basic.string/string.iterators/begin.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.iterators/begin.pass.cpp @@ -30,7 +30,7 @@ test(S s) assert(b == cb); } -int main() +int main(int, char**) { { typedef std::string S; @@ -44,4 +44,6 @@ int main() test(S("123")); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.iterators/cbegin.pass.cpp b/libcxx/test/std/strings/basic.string/string.iterators/cbegin.pass.cpp index 720ba53e73828..9886d56bbd98b 100644 --- a/libcxx/test/std/strings/basic.string/string.iterators/cbegin.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.iterators/cbegin.pass.cpp @@ -27,7 +27,7 @@ test(const S& s) assert(cb == s.begin()); } -int main() +int main(int, char**) { { typedef std::string S; @@ -41,4 +41,6 @@ int main() test(S("123")); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.iterators/cend.pass.cpp b/libcxx/test/std/strings/basic.string/string.iterators/cend.pass.cpp index 07d885aee884e..1a3d30775f2ef 100644 --- a/libcxx/test/std/strings/basic.string/string.iterators/cend.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.iterators/cend.pass.cpp @@ -23,7 +23,7 @@ test(const S& s) assert(ce == s.end()); } -int main() +int main(int, char**) { { typedef std::string S; @@ -37,4 +37,6 @@ int main() test(S("123")); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.iterators/crbegin.pass.cpp b/libcxx/test/std/strings/basic.string/string.iterators/crbegin.pass.cpp index 2b8837fd3d2b2..687c34368ae8d 100644 --- a/libcxx/test/std/strings/basic.string/string.iterators/crbegin.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.iterators/crbegin.pass.cpp @@ -27,7 +27,7 @@ test(const S& s) assert(cb == s.rbegin()); } -int main() +int main(int, char**) { { typedef std::string S; @@ -41,4 +41,6 @@ int main() test(S("123")); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.iterators/crend.pass.cpp b/libcxx/test/std/strings/basic.string/string.iterators/crend.pass.cpp index c74b907fe7c12..86aaad699d4c5 100644 --- a/libcxx/test/std/strings/basic.string/string.iterators/crend.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.iterators/crend.pass.cpp @@ -23,7 +23,7 @@ test(const S& s) assert(ce == s.rend()); } -int main() +int main(int, char**) { { typedef std::string S; @@ -37,4 +37,6 @@ int main() test(S("123")); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.iterators/db_iterators_2.pass.cpp b/libcxx/test/std/strings/basic.string/string.iterators/db_iterators_2.pass.cpp index 074fa84bd8d78..469632394763e 100644 --- a/libcxx/test/std/strings/basic.string/string.iterators/db_iterators_2.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.iterators/db_iterators_2.pass.cpp @@ -22,7 +22,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::string S; @@ -44,8 +44,10 @@ int main() #else -int main() +int main(int, char**) { + + return 0; } #endif diff --git a/libcxx/test/std/strings/basic.string/string.iterators/db_iterators_3.pass.cpp b/libcxx/test/std/strings/basic.string/string.iterators/db_iterators_3.pass.cpp index 9c63eeafe397a..7dbbbbb4cbac7 100644 --- a/libcxx/test/std/strings/basic.string/string.iterators/db_iterators_3.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.iterators/db_iterators_3.pass.cpp @@ -22,7 +22,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::string S; @@ -44,8 +44,10 @@ int main() #else -int main() +int main(int, char**) { + + return 0; } #endif diff --git a/libcxx/test/std/strings/basic.string/string.iterators/db_iterators_4.pass.cpp b/libcxx/test/std/strings/basic.string/string.iterators/db_iterators_4.pass.cpp index c01b22662b68b..1a46f86c28d76 100644 --- a/libcxx/test/std/strings/basic.string/string.iterators/db_iterators_4.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.iterators/db_iterators_4.pass.cpp @@ -22,7 +22,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::string C; @@ -46,8 +46,10 @@ int main() #else -int main() +int main(int, char**) { + + return 0; } #endif diff --git a/libcxx/test/std/strings/basic.string/string.iterators/db_iterators_5.pass.cpp b/libcxx/test/std/strings/basic.string/string.iterators/db_iterators_5.pass.cpp index a5a8d917b9330..77caf1b814a16 100644 --- a/libcxx/test/std/strings/basic.string/string.iterators/db_iterators_5.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.iterators/db_iterators_5.pass.cpp @@ -22,7 +22,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::string C; @@ -50,8 +50,10 @@ int main() #else -int main() +int main(int, char**) { + + return 0; } #endif diff --git a/libcxx/test/std/strings/basic.string/string.iterators/db_iterators_6.pass.cpp b/libcxx/test/std/strings/basic.string/string.iterators/db_iterators_6.pass.cpp index b4c7fb38006b4..126c3661c3925 100644 --- a/libcxx/test/std/strings/basic.string/string.iterators/db_iterators_6.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.iterators/db_iterators_6.pass.cpp @@ -22,7 +22,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::string C; @@ -48,8 +48,10 @@ int main() #else -int main() +int main(int, char**) { + + return 0; } #endif diff --git a/libcxx/test/std/strings/basic.string/string.iterators/db_iterators_7.pass.cpp b/libcxx/test/std/strings/basic.string/string.iterators/db_iterators_7.pass.cpp index 6a262e0f39750..f1083a43954c8 100644 --- a/libcxx/test/std/strings/basic.string/string.iterators/db_iterators_7.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.iterators/db_iterators_7.pass.cpp @@ -22,7 +22,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::string C; @@ -48,8 +48,10 @@ int main() #else -int main() +int main(int, char**) { + + return 0; } #endif diff --git a/libcxx/test/std/strings/basic.string/string.iterators/db_iterators_8.pass.cpp b/libcxx/test/std/strings/basic.string/string.iterators/db_iterators_8.pass.cpp index f3b5656f76610..c69f8ca4b0314 100644 --- a/libcxx/test/std/strings/basic.string/string.iterators/db_iterators_8.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.iterators/db_iterators_8.pass.cpp @@ -22,7 +22,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { typedef std::string C; @@ -44,8 +44,10 @@ int main() #else -int main() +int main(int, char**) { + + return 0; } #endif diff --git a/libcxx/test/std/strings/basic.string/string.iterators/end.pass.cpp b/libcxx/test/std/strings/basic.string/string.iterators/end.pass.cpp index 8d287f6f799bf..86b00a3706d15 100644 --- a/libcxx/test/std/strings/basic.string/string.iterators/end.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.iterators/end.pass.cpp @@ -33,7 +33,7 @@ test(S s) assert(static_cast(ce - cs.begin()) == cs.size()); } -int main() +int main(int, char**) { { typedef std::string S; @@ -47,4 +47,6 @@ int main() test(S("123")); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.iterators/iterators.pass.cpp b/libcxx/test/std/strings/basic.string/string.iterators/iterators.pass.cpp index 3d907602317c0..08448b1fd89f5 100644 --- a/libcxx/test/std/strings/basic.string/string.iterators/iterators.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.iterators/iterators.pass.cpp @@ -20,7 +20,7 @@ #include #include -int main() +int main(int, char**) { { // N3644 testing typedef std::string C; @@ -83,4 +83,6 @@ int main() assert ( !(ii1 != ii2 )); assert ( !(ii1 != cii )); } + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.iterators/rbegin.pass.cpp b/libcxx/test/std/strings/basic.string/string.iterators/rbegin.pass.cpp index 8de45475f62ad..479584c3708b9 100644 --- a/libcxx/test/std/strings/basic.string/string.iterators/rbegin.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.iterators/rbegin.pass.cpp @@ -30,7 +30,7 @@ test(S s) assert(b == cb); } -int main() +int main(int, char**) { { typedef std::string S; @@ -44,4 +44,6 @@ int main() test(S("123")); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.iterators/rend.pass.cpp b/libcxx/test/std/strings/basic.string/string.iterators/rend.pass.cpp index 1edcb27af0708..9b54058a60d8a 100644 --- a/libcxx/test/std/strings/basic.string/string.iterators/rend.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.iterators/rend.pass.cpp @@ -33,7 +33,7 @@ test(S s) assert(static_cast(ce - cs.rbegin()) == cs.size()); } -int main() +int main(int, char**) { { typedef std::string S; @@ -47,4 +47,6 @@ int main() test(S("123")); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.modifiers/nothing_to_do.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/strings/basic.string/string.modifiers/nothing_to_do.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.modifiers/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_append/T_size_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_append/T_size_size.pass.cpp index f2848295baf67..a165d92fffc1c 100644 --- a/libcxx/test/std/strings/basic.string/string.modifiers/string_append/T_size_size.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_append/T_size_size.pass.cpp @@ -11,6 +11,11 @@ // template // basic_string& append(const T& t, size_type pos, size_type n=npos); // C++17 +// When back-deploying to macosx10.7, the RTTI for exception classes +// incorrectly provided by libc++.dylib is mixed with the one in +// libc++abi.dylib and exceptions are not caught properly. +// XFAIL: with_system_cxx_lib=macosx10.7 + #include #include #include @@ -71,7 +76,7 @@ test_npos(S s, SV sv, typename S::size_type pos, S expected) #endif } -int main() +int main(int, char**) { { typedef std::string S; @@ -196,4 +201,6 @@ int main() s.append(sv, 0, std::string::npos); assert(s == "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ"); } + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_append/initializer_list.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_append/initializer_list.pass.cpp index 04483865d5609..da74fb4e09c0c 100644 --- a/libcxx/test/std/strings/basic.string/string.modifiers/string_append/initializer_list.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_append/initializer_list.pass.cpp @@ -18,7 +18,7 @@ #include "test_macros.h" #include "min_allocator.h" -int main() +int main(int, char**) { { std::string s("123"); @@ -31,4 +31,6 @@ int main() s.append({'a', 'b', 'c'}); assert(s == "123abc"); } + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_append/iterator.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_append/iterator.pass.cpp index 08f554b34d47d..8f280e828d905 100644 --- a/libcxx/test/std/strings/basic.string/string.modifiers/string_append/iterator.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_append/iterator.pass.cpp @@ -42,7 +42,7 @@ test_exceptions(S s, It first, It last) } #endif -int main() +int main(int, char**) { { typedef std::string S; @@ -219,4 +219,6 @@ int main() s.append(MoveIt(It(std::begin(p))), MoveIt(It(std::end(p) - 1))); assert(s == "ABCD"); } + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_append/pointer.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_append/pointer.pass.cpp index dec79a67cd12b..eba693d0e3d13 100644 --- a/libcxx/test/std/strings/basic.string/string.modifiers/string_append/pointer.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_append/pointer.pass.cpp @@ -26,7 +26,7 @@ test(S s, const typename S::value_type* str, S expected) assert(s == expected); } -int main() +int main(int, char**) { { typedef std::string S; @@ -76,4 +76,6 @@ int main() s_long.append(s_long.c_str()); assert(s_long == "Lorem ipsum dolor sit amet, consectetur/Lorem ipsum dolor sit amet, consectetur/"); } + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_append/pointer_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_append/pointer_size.pass.cpp index 2fb973ae98353..c214ab7c2ac3d 100644 --- a/libcxx/test/std/strings/basic.string/string.modifiers/string_append/pointer_size.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_append/pointer_size.pass.cpp @@ -27,7 +27,7 @@ test(S s, const typename S::value_type* str, typename S::size_type n, S expected assert(s == expected); } -int main() +int main(int, char**) { { typedef std::string S; @@ -85,4 +85,6 @@ int main() s_long.append(s_long.data(), s_long.size()); assert(s_long == "Lorem ipsum dolor sit amet, consectetur/Lorem ipsum dolor sit amet, consectetur/"); } + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_append/push_back.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_append/push_back.pass.cpp index a2b9ad1e470d5..f1b34ad6cffb3 100644 --- a/libcxx/test/std/strings/basic.string/string.modifiers/string_append/push_back.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_append/push_back.pass.cpp @@ -31,7 +31,7 @@ test(S s, typename S::value_type c, S expected) assert(s == expected); } -int main() +int main(int, char**) { { typedef std::string S; @@ -56,4 +56,6 @@ int main() s.push_back(vl); s.push_back(vl); } + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_append/size_char.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_append/size_char.pass.cpp index 59d0199a2bf61..c406248929172 100644 --- a/libcxx/test/std/strings/basic.string/string.modifiers/string_append/size_char.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_append/size_char.pass.cpp @@ -26,7 +26,7 @@ test(S s, typename S::size_type n, typename S::value_type c, S expected) assert(s == expected); } -int main() +int main(int, char**) { { typedef std::string S; @@ -60,4 +60,6 @@ int main() test(S("12345678901234567890"), 10, 'a', S("12345678901234567890aaaaaaaaaa")); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_append/string.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_append/string.pass.cpp index c0c625f2e22e0..5e551d7a2b12f 100644 --- a/libcxx/test/std/strings/basic.string/string.modifiers/string_append/string.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_append/string.pass.cpp @@ -26,7 +26,7 @@ test(S s, S str, S expected) assert(s == expected); } -int main() +int main(int, char**) { { typedef std::string S; @@ -85,4 +85,6 @@ int main() assert(s == "a"); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_append/string_size_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_append/string_size_size.pass.cpp index 21ddd9bb2254a..84bd37a320d85 100644 --- a/libcxx/test/std/strings/basic.string/string.modifiers/string_append/string_size_size.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_append/string_size_size.pass.cpp @@ -12,6 +12,11 @@ // append(const basic_string& str, size_type pos, size_type n = npos); // the "= npos" was added for C++14 +// When back-deploying to macosx10.7, the RTTI for exception classes +// incorrectly provided by libc++.dylib is mixed with the one in +// libc++abi.dylib and exceptions are not caught properly. +// XFAIL: with_system_cxx_lib=macosx10.7 + #include #include #include @@ -71,7 +76,7 @@ test_npos(S s, S str, typename S::size_type pos, S expected) #endif } -int main() +int main(int, char**) { { typedef std::string S; @@ -133,4 +138,6 @@ int main() test_npos(S(), S("12345"), 5, S("")); test_npos(S(), S("12345"), 6, S("not happening")); } + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_append/string_view.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_append/string_view.pass.cpp index 301fc77b7044e..d0fb1cc3315e6 100644 --- a/libcxx/test/std/strings/basic.string/string.modifiers/string_append/string_view.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_append/string_view.pass.cpp @@ -27,7 +27,7 @@ test(S s, SV sv, S expected) assert(s == expected); } -int main() +int main(int, char**) { { typedef std::string S; @@ -79,4 +79,6 @@ int main() S("1234567890123456789012345678901234567890")); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_assign/T_size_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_assign/T_size_size.pass.cpp index b054171225727..0bb8a3f3a4996 100644 --- a/libcxx/test/std/strings/basic.string/string.modifiers/string_assign/T_size_size.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_assign/T_size_size.pass.cpp @@ -11,6 +11,11 @@ // template // basic_string& assign(const T& t, size_type pos, size_type n=npos); // C++17 +// When back-deploying to macosx10.7, the RTTI for exception classes +// incorrectly provided by libc++.dylib is mixed with the one in +// libc++abi.dylib and exceptions are not caught properly. +// XFAIL: with_system_cxx_lib=macosx10.7 + #include #include #include @@ -70,7 +75,7 @@ test_npos(S s, SV sv, typename S::size_type pos, S expected) #endif } -int main() +int main(int, char**) { { typedef std::string S; @@ -191,4 +196,6 @@ int main() s.assign(sv, 0, std::string::npos); assert(s == "ABCDEFGHIJKLMNOPQRSTUVWXYZ"); } + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_assign/initializer_list.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_assign/initializer_list.pass.cpp index 72097dae630e5..692b84b557d89 100644 --- a/libcxx/test/std/strings/basic.string/string.modifiers/string_assign/initializer_list.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_assign/initializer_list.pass.cpp @@ -18,7 +18,7 @@ #include "test_macros.h" #include "min_allocator.h" -int main() +int main(int, char**) { { std::string s("123"); @@ -31,4 +31,6 @@ int main() s.assign({'a', 'b', 'c'}); assert(s == "abc"); } + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_assign/iterator.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_assign/iterator.pass.cpp index 4bf805c99d6a9..c03b5efdfd577 100644 --- a/libcxx/test/std/strings/basic.string/string.modifiers/string_assign/iterator.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_assign/iterator.pass.cpp @@ -43,7 +43,7 @@ test_exceptions(S s, It first, It last) } #endif -int main() +int main(int, char**) { { typedef std::string S; @@ -204,4 +204,6 @@ int main() s.assign(p, p + 4); assert(s == "ABCD"); } + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_assign/pointer.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_assign/pointer.pass.cpp index 62a173a186d52..325c354c56ae7 100644 --- a/libcxx/test/std/strings/basic.string/string.modifiers/string_assign/pointer.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_assign/pointer.pass.cpp @@ -26,7 +26,7 @@ test(S s, const typename S::value_type* str, S expected) assert(s == expected); } -int main() +int main(int, char**) { { typedef std::string S; @@ -74,4 +74,6 @@ int main() s_long.assign(s_long.c_str() + 30); assert(s_long == "nsectetur/"); } + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_assign/pointer_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_assign/pointer_size.pass.cpp index 442d8c000245e..5d3fe262184f5 100644 --- a/libcxx/test/std/strings/basic.string/string.modifiers/string_assign/pointer_size.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_assign/pointer_size.pass.cpp @@ -27,7 +27,7 @@ test(S s, const typename S::value_type* str, typename S::size_type n, S expected assert(s == expected); } -int main() +int main(int, char**) { { typedef std::string S; @@ -85,4 +85,6 @@ int main() s_long.assign(s_long.data() + 2, 8 ); assert(s_long == "rem ipsu"); } + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_assign/rv_string.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_assign/rv_string.pass.cpp index 3d401c8a917e8..ac26f369ddb99 100644 --- a/libcxx/test/std/strings/basic.string/string.modifiers/string_assign/rv_string.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_assign/rv_string.pass.cpp @@ -27,7 +27,7 @@ test(S s, S str, S expected) assert(s == expected); } -int main() +int main(int, char**) { { typedef std::string S; @@ -77,4 +77,6 @@ int main() S("12345678901234567890")); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_assign/size_char.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_assign/size_char.pass.cpp index 8c69b138f9fa0..4e5ecad2e9da8 100644 --- a/libcxx/test/std/strings/basic.string/string.modifiers/string_assign/size_char.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_assign/size_char.pass.cpp @@ -26,7 +26,7 @@ test(S s, typename S::size_type n, typename S::value_type c, S expected) assert(s == expected); } -int main() +int main(int, char**) { { typedef std::string S; @@ -60,4 +60,6 @@ int main() test(S("12345678901234567890"), 10, 'a', S(10, 'a')); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_assign/string.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_assign/string.pass.cpp index 274703a565d5a..fae45c80de0c6 100644 --- a/libcxx/test/std/strings/basic.string/string.modifiers/string_assign/string.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_assign/string.pass.cpp @@ -37,7 +37,7 @@ testAlloc(S s, S str, const typename S::allocator_type& a) assert(s.get_allocator() == a); } -int main() +int main(int, char**) { { typedef std::string S; @@ -113,4 +113,6 @@ int main() static_assert(noexcept(S().assign(S())), ""); // LWG#2063 } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_assign/string_size_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_assign/string_size_size.pass.cpp index 76dd273455ba6..b1b3bdc249afe 100644 --- a/libcxx/test/std/strings/basic.string/string.modifiers/string_assign/string_size_size.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_assign/string_size_size.pass.cpp @@ -12,6 +12,11 @@ // assign(const basic_string& str, size_type pos, size_type n=npos); // the =npos was added for C++14 +// When back-deploying to macosx10.7, the RTTI for exception classes +// incorrectly provided by libc++.dylib is mixed with the one in +// libc++abi.dylib and exceptions are not caught properly. +// XFAIL: with_system_cxx_lib=macosx10.7 + #include #include #include @@ -71,7 +76,7 @@ test_npos(S s, S str, typename S::size_type pos, S expected) #endif } -int main() +int main(int, char**) { { typedef std::string S; @@ -133,4 +138,6 @@ int main() test_npos(S(), S("12345"), 5, S("")); test_npos(S(), S("12345"), 6, S("not happening")); } + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_assign/string_view.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_assign/string_view.pass.cpp index d445ad9b793f7..2d1158e41deba 100644 --- a/libcxx/test/std/strings/basic.string/string.modifiers/string_assign/string_view.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_assign/string_view.pass.cpp @@ -38,7 +38,7 @@ testAlloc(S s, SV sv, const typename S::allocator_type& a) assert(s.get_allocator() == a); } -int main() +int main(int, char**) { { typedef std::string S; @@ -101,4 +101,6 @@ int main() testAlloc(S(), SV("12345678901234567890"), min_allocator()); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_copy/copy.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_copy/copy.pass.cpp index 81dc3329c43b7..7f9c758998d7d 100644 --- a/libcxx/test/std/strings/basic.string/string.modifiers/string_copy/copy.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_copy/copy.pass.cpp @@ -10,6 +10,11 @@ // size_type copy(charT* s, size_type n, size_type pos = 0) const; +// When back-deploying to macosx10.7, the RTTI for exception classes +// incorrectly provided by libc++.dylib is mixed with the one in +// libc++abi.dylib and exceptions are not caught properly. +// XFAIL: with_system_cxx_lib=macosx10.7 + #include #include #include @@ -49,7 +54,7 @@ test(S str, typename S::value_type* s, typename S::size_type n, #endif } -int main() +int main(int, char**) { { typedef std::string S; @@ -177,4 +182,6 @@ int main() test(S("abcdefghijklmnopqrst"), s, 21, 0); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_erase/iter.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_erase/iter.pass.cpp index 1923c62b4d27e..12b13d738cc49 100644 --- a/libcxx/test/std/strings/basic.string/string.modifiers/string_erase/iter.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_erase/iter.pass.cpp @@ -28,7 +28,7 @@ test(S s, typename S::difference_type pos, S expected) assert(i - s.begin() == pos); } -int main() +int main(int, char**) { { typedef std::string S; @@ -62,4 +62,6 @@ int main() test(S("abcdefghijklmnopqrst"), 19, S("abcdefghijklmnopqrs")); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_erase/iter_iter.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_erase/iter_iter.pass.cpp index 0eba9361d8aba..a5e6d1251d1c6 100644 --- a/libcxx/test/std/strings/basic.string/string.modifiers/string_erase/iter_iter.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_erase/iter_iter.pass.cpp @@ -29,7 +29,7 @@ test(S s, typename S::difference_type pos, typename S::difference_type n, S expe assert(i - s.begin() == pos); } -int main() +int main(int, char**) { { typedef std::string S; @@ -147,4 +147,6 @@ int main() test(S("abcdefghijklmnopqrst"), 20, 0, S("abcdefghijklmnopqrst")); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_erase/pop_back.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_erase/pop_back.pass.cpp index e6f2a4e60351d..e6490abcd2eff 100644 --- a/libcxx/test/std/strings/basic.string/string.modifiers/string_erase/pop_back.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_erase/pop_back.pass.cpp @@ -26,7 +26,7 @@ test(S s, S expected) assert(s == expected); } -int main() +int main(int, char**) { { typedef std::string S; @@ -42,4 +42,6 @@ int main() test(S("abcdefghijklmnopqrst"), S("abcdefghijklmnopqrs")); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_erase/size_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_erase/size_size.pass.cpp index a8e31c9c6942e..ee5380edab114 100644 --- a/libcxx/test/std/strings/basic.string/string.modifiers/string_erase/size_size.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_erase/size_size.pass.cpp @@ -11,6 +11,11 @@ // basic_string& // erase(size_type pos = 0, size_type n = npos); +// When back-deploying to macosx10.7, the RTTI for exception classes +// incorrectly provided by libc++.dylib is mixed with the one in +// libc++abi.dylib and exceptions are not caught properly. +// XFAIL: with_system_cxx_lib=macosx10.7 + #include #include #include @@ -88,7 +93,7 @@ test(S s, S expected) assert(s == expected); } -int main() +int main(int, char**) { { typedef std::string S; @@ -298,4 +303,6 @@ int main() test(S("abcdefghijklmnopqrst"), S("")); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_insert/iter_char.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_insert/iter_char.pass.cpp index d570428c054dd..ef6144dadb5c2 100644 --- a/libcxx/test/std/strings/basic.string/string.modifiers/string_insert/iter_char.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_insert/iter_char.pass.cpp @@ -32,7 +32,7 @@ test(S& s, typename S::const_iterator p, typename S::value_type c, S expected) assert(i == p); } -int main() +int main(int, char**) { { typedef std::string S; @@ -72,4 +72,6 @@ int main() test(s, s.begin()+6, 'C', S("a567ABC1432dcb")); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_insert/iter_initializer_list.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_insert/iter_initializer_list.pass.cpp index 0acc50b454986..6dd043c6db93a 100644 --- a/libcxx/test/std/strings/basic.string/string.modifiers/string_insert/iter_initializer_list.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_insert/iter_initializer_list.pass.cpp @@ -18,7 +18,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { std::string s("123456"); @@ -33,4 +33,6 @@ int main() assert(i - s.begin() == 3); assert(s == "123abc456"); } + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_insert/iter_iter_iter.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_insert/iter_iter_iter.pass.cpp index c1b16872928e6..6d4f1a6686e9e 100644 --- a/libcxx/test/std/strings/basic.string/string.modifiers/string_insert/iter_iter_iter.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_insert/iter_iter_iter.pass.cpp @@ -49,7 +49,7 @@ test_exceptions(S s, typename S::difference_type pos, It first, It last) } #endif -int main() +int main(int, char**) { { typedef std::string S; @@ -218,4 +218,6 @@ int main() s.insert(s.begin(), MoveIt(It(std::begin(p))), MoveIt(It(std::end(p) - 1))); assert(s == "ABCD"); } + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_insert/iter_size_char.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_insert/iter_size_char.pass.cpp index ac29e3b3325ca..699b67924b1a8 100644 --- a/libcxx/test/std/strings/basic.string/string.modifiers/string_insert/iter_size_char.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_insert/iter_size_char.pass.cpp @@ -28,7 +28,7 @@ test(S s, typename S::difference_type pos, typename S::size_type n, assert(s == expected); } -int main() +int main(int, char**) { { typedef std::string S; @@ -166,4 +166,6 @@ int main() test(S("abcdefghijklmnopqrst"), 20, 20, '1', S("abcdefghijklmnopqrst11111111111111111111")); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_insert/size_T_size_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_insert/size_T_size_size.pass.cpp index fb8c7e63a5c2b..49e0f920e7bbf 100644 --- a/libcxx/test/std/strings/basic.string/string.modifiers/string_insert/size_T_size_size.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_insert/size_T_size_size.pass.cpp @@ -13,6 +13,11 @@ // // Mostly we're testing string_view here +// When back-deploying to macosx10.7, the RTTI for exception classes +// incorrectly provided by libc++.dylib is mixed with the one in +// libc++abi.dylib and exceptions are not caught properly. +// XFAIL: with_system_cxx_lib=macosx10.7 + #include #include #include @@ -1729,7 +1734,7 @@ void test30() test_npos(S("abcdefghijklmnopqrst"), 10, SV("12345"), 6, S("can't happen")); } -int main() +int main(int, char**) { { typedef std::string S; @@ -1838,4 +1843,6 @@ int main() assert(s == ""); s.clear(); } + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_insert/size_pointer.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_insert/size_pointer.pass.cpp index ee7ef204a33fe..dca1fb6a53e2c 100644 --- a/libcxx/test/std/strings/basic.string/string.modifiers/string_insert/size_pointer.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_insert/size_pointer.pass.cpp @@ -11,6 +11,11 @@ // basic_string& // insert(size_type pos, const charT* s); +// When back-deploying to macosx10.7, the RTTI for exception classes +// incorrectly provided by libc++.dylib is mixed with the one in +// libc++abi.dylib and exceptions are not caught properly. +// XFAIL: with_system_cxx_lib=macosx10.7 + #include #include #include @@ -47,7 +52,7 @@ test(S s, typename S::size_type pos, const typename S::value_type* str, S expect #endif } -int main() +int main(int, char**) { { typedef std::string S; @@ -233,4 +238,6 @@ int main() s_long.insert(0, s_long.c_str()); assert(s_long == "Lorem ipsum dolor sit amet, consectetur/Lorem ipsum dolor sit amet, consectetur/"); } + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_insert/size_pointer_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_insert/size_pointer_size.pass.cpp index 67a034005283a..b34340c3f1515 100644 --- a/libcxx/test/std/strings/basic.string/string.modifiers/string_insert/size_pointer_size.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_insert/size_pointer_size.pass.cpp @@ -11,6 +11,11 @@ // basic_string& // insert(size_type pos, const charT* s, size_type n); +// When back-deploying to macosx10.7, the RTTI for exception classes +// incorrectly provided by libc++.dylib is mixed with the one in +// libc++abi.dylib and exceptions are not caught properly. +// XFAIL: with_system_cxx_lib=macosx10.7 + #include #include #include @@ -48,7 +53,7 @@ test(S s, typename S::size_type pos, const typename S::value_type* str, #endif } -int main() +int main(int, char**) { { typedef std::string S; @@ -714,4 +719,6 @@ int main() s_long.insert(0, s_long.data(), s_long.size()); assert(s_long == "Lorem ipsum dolor sit amet, consectetur/Lorem ipsum dolor sit amet, consectetur/"); } + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_insert/size_size_char.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_insert/size_size_char.pass.cpp index e64e9c997e364..411f936433aaf 100644 --- a/libcxx/test/std/strings/basic.string/string.modifiers/string_insert/size_size_char.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_insert/size_size_char.pass.cpp @@ -11,6 +11,11 @@ // basic_string& // insert(size_type pos, size_type n, charT c); +// When back-deploying to macosx10.7, the RTTI for exception classes +// incorrectly provided by libc++.dylib is mixed with the one in +// libc++abi.dylib and exceptions are not caught properly. +// XFAIL: with_system_cxx_lib=macosx10.7 + #include #include #include @@ -48,7 +53,7 @@ test(S s, typename S::size_type pos, typename S::size_type n, #endif } -int main() +int main(int, char**) { { typedef std::string S; @@ -218,4 +223,6 @@ int main() test(S("abcdefghijklmnopqrst"), 21, 20, '1', S("can't happen")); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_insert/size_string.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_insert/size_string.pass.cpp index 2f74fec3f7942..65f19f1f9e89d 100644 --- a/libcxx/test/std/strings/basic.string/string.modifiers/string_insert/size_string.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_insert/size_string.pass.cpp @@ -11,6 +11,11 @@ // basic_string& // insert(size_type pos1, const basic_string& str); +// When back-deploying to macosx10.7, the RTTI for exception classes +// incorrectly provided by libc++.dylib is mixed with the one in +// libc++abi.dylib and exceptions are not caught properly. +// XFAIL: with_system_cxx_lib=macosx10.7 + #include #include #include @@ -47,7 +52,7 @@ test(S s, typename S::size_type pos, S str, S expected) #endif } -int main() +int main(int, char**) { { typedef std::string S; @@ -226,4 +231,6 @@ int main() assert(s == "a"); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_insert/size_string_size_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_insert/size_string_size_size.pass.cpp index 23b8852b4c383..d82a81e40e57d 100644 --- a/libcxx/test/std/strings/basic.string/string.modifiers/string_insert/size_string_size_size.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_insert/size_string_size_size.pass.cpp @@ -13,6 +13,11 @@ // size_type pos2, size_type n=npos); // the "=npos" was added in C++14 +// When back-deploying to macosx10.7, the RTTI for exception classes +// incorrectly provided by libc++.dylib is mixed with the one in +// libc++abi.dylib and exceptions are not caught properly. +// XFAIL: with_system_cxx_lib=macosx10.7 + #include #include #include @@ -1727,7 +1732,7 @@ void test30() test_npos(S("abcdefghijklmnopqrst"), 10, S("12345"), 6, S("can't happen")); } -int main() +int main(int, char**) { { typedef std::string S; @@ -1799,4 +1804,6 @@ int main() test30(); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_insert/string_view.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_insert/string_view.pass.cpp index 0596ce9849e50..e81825c2d2cb0 100644 --- a/libcxx/test/std/strings/basic.string/string.modifiers/string_insert/string_view.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_insert/string_view.pass.cpp @@ -11,6 +11,11 @@ // basic_string& // insert(size_type pos, string_view sv); +// When back-deploying to macosx10.7, the RTTI for exception classes +// incorrectly provided by libc++.dylib is mixed with the one in +// libc++abi.dylib and exceptions are not caught properly. +// XFAIL: with_system_cxx_lib=macosx10.7 + #include #include #include @@ -47,7 +52,7 @@ test(S s, typename S::size_type pos, SV sv, S expected) #endif } -int main() +int main(int, char**) { { typedef std::string S; @@ -235,4 +240,6 @@ int main() s_long.insert(0, s_long.c_str()); assert(s_long == "Lorem ipsum dolor sit amet, consectetur/Lorem ipsum dolor sit amet, consectetur/"); } + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_op_plus_equal/char.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_op_plus_equal/char.pass.cpp index 3c15f6f919eb1..2cc4496eb678f 100644 --- a/libcxx/test/std/strings/basic.string/string.modifiers/string_op_plus_equal/char.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_op_plus_equal/char.pass.cpp @@ -25,7 +25,7 @@ test(S s, typename S::value_type str, S expected) assert(s == expected); } -int main() +int main(int, char**) { { typedef std::string S; @@ -43,4 +43,6 @@ int main() test(S("12345678901234567890"), 'a', S("12345678901234567890a")); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_op_plus_equal/initializer_list.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_op_plus_equal/initializer_list.pass.cpp index 7f27559f0e653..689389eb7a64d 100644 --- a/libcxx/test/std/strings/basic.string/string.modifiers/string_op_plus_equal/initializer_list.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_op_plus_equal/initializer_list.pass.cpp @@ -17,7 +17,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { std::string s("123"); @@ -30,4 +30,6 @@ int main() s += {'a', 'b', 'c'}; assert(s == "123abc"); } + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_op_plus_equal/pointer.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_op_plus_equal/pointer.pass.cpp index 3a76969351837..a9edf17be5b1a 100644 --- a/libcxx/test/std/strings/basic.string/string.modifiers/string_op_plus_equal/pointer.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_op_plus_equal/pointer.pass.cpp @@ -25,7 +25,7 @@ test(S s, const typename S::value_type* str, S expected) assert(s == expected); } -int main() +int main(int, char**) { { typedef std::string S; @@ -75,4 +75,6 @@ int main() S("1234567890123456789012345678901234567890")); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_op_plus_equal/string.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_op_plus_equal/string.pass.cpp index 53e1cacf4a173..f81d4bec0d240 100644 --- a/libcxx/test/std/strings/basic.string/string.modifiers/string_op_plus_equal/string.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_op_plus_equal/string.pass.cpp @@ -26,7 +26,7 @@ test(S s, S str, S expected) assert(s == expected); } -int main() +int main(int, char**) { { typedef std::string S; @@ -85,4 +85,6 @@ int main() assert(s == "a"); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/iter_iter_initializer_list.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/iter_iter_initializer_list.pass.cpp index 8e8a1f8ef9e85..3df49f32535b9 100644 --- a/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/iter_iter_initializer_list.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/iter_iter_initializer_list.pass.cpp @@ -17,7 +17,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { std::string s("123def456"); @@ -30,4 +30,6 @@ int main() s.replace(s.cbegin() + 3, s.cbegin() + 6, {'a', 'b', 'c'}); assert(s == "123abc456"); } + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/iter_iter_iter_iter.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/iter_iter_iter_iter.pass.cpp index fc6f33beafeda..47a1193be7327 100644 --- a/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/iter_iter_iter_iter.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/iter_iter_iter_iter.pass.cpp @@ -963,7 +963,7 @@ void test8() test(S("abcdefghijklmnopqrst"), 20, 0, str, str+20, S("abcdefghijklmnopqrst12345678901234567890")); } -int main() +int main(int, char**) { { typedef std::string S; @@ -1036,4 +1036,6 @@ int main() s.replace(s.begin(), s.end(), p, p + 4); assert(s == "EFGH"); } + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/iter_iter_pointer.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/iter_iter_pointer.pass.cpp index ccbd0ff66fbea..8ed1dc3df3059 100644 --- a/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/iter_iter_pointer.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/iter_iter_pointer.pass.cpp @@ -265,7 +265,7 @@ void test2() test(S("abcdefghijklmnopqrst"), 20, 0, "12345678901234567890", S("abcdefghijklmnopqrst12345678901234567890")); } -int main() +int main(int, char**) { { typedef std::string S; @@ -297,4 +297,6 @@ int main() s_long.replace(s_long.begin(), s_long.begin(), s_long.c_str()); assert(s_long == "Lorem ipsum dolor sit amet, consectetur/Lorem ipsum dolor sit amet, consectetur/"); } + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/iter_iter_pointer_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/iter_iter_pointer_size.pass.cpp index 79ae58fce2ebd..39b518c9146d1 100644 --- a/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/iter_iter_pointer_size.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/iter_iter_pointer_size.pass.cpp @@ -943,7 +943,7 @@ void test8() test(S("abcdefghijklmnopqrst"), 20, 0, "12345678901234567890", 20, S("abcdefghijklmnopqrst12345678901234567890")); } -int main() +int main(int, char**) { { typedef std::string S; @@ -987,4 +987,6 @@ int main() s_long.replace(s_long.begin(), s_long.begin(), s_long.data(), s_long.size()); assert(s_long == "Lorem ipsum dolor sit amet, consectetur/Lorem ipsum dolor sit amet, consectetur/"); } + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/iter_iter_size_char.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/iter_iter_size_char.pass.cpp index 8a79b733fe223..e60c69f7a275c 100644 --- a/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/iter_iter_size_char.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/iter_iter_size_char.pass.cpp @@ -265,7 +265,7 @@ void test2() test(S("abcdefghijklmnopqrst"), 20, 0, 20, '3', S("abcdefghijklmnopqrst33333333333333333333")); } -int main() +int main(int, char**) { { typedef std::string S; @@ -281,4 +281,6 @@ int main() test2(); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/iter_iter_string.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/iter_iter_string.pass.cpp index b47d2931b9b24..7008736610f98 100644 --- a/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/iter_iter_string.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/iter_iter_string.pass.cpp @@ -264,7 +264,7 @@ void test2() test(S("abcdefghijklmnopqrst"), 20, 0, S("12345678901234567890"), S("abcdefghijklmnopqrst12345678901234567890")); } -int main() +int main(int, char**) { { typedef std::string S; @@ -289,4 +289,6 @@ int main() assert(s == "a"); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/iter_iter_string_view.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/iter_iter_string_view.pass.cpp index 81ecca69fb3b4..0acf82868532f 100644 --- a/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/iter_iter_string_view.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/iter_iter_string_view.pass.cpp @@ -264,7 +264,7 @@ void test2() test(S("abcdefghijklmnopqrst"), 20, 0, SV("12345678901234567890"), S("abcdefghijklmnopqrst12345678901234567890")); } -int main() +int main(int, char**) { { typedef std::string S; @@ -282,4 +282,6 @@ int main() test2(); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/size_size_T_size_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/size_size_T_size_size.pass.cpp index b320eff372c8f..8097bed7325e4 100644 --- a/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/size_size_T_size_size.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/size_size_T_size_size.pass.cpp @@ -14,6 +14,11 @@ // // Mostly we're testing string_view here +// When back-deploying to macosx10.7, the RTTI for exception classes +// incorrectly provided by libc++.dylib is mixed with the one in +// libc++abi.dylib and exceptions are not caught properly. +// XFAIL: with_system_cxx_lib=macosx10.7 + #include #include #include @@ -5869,7 +5874,7 @@ void test55() test_npos(S("abcdefghij"), 9, 2, SV("12345"), 6, S("can't happen")); } -int main() +int main(int, char**) { { typedef std::string S; @@ -6025,4 +6030,6 @@ int main() s.replace(0, 4, arr, 0, std::string::npos); // calls replace(pos1, n1, string("IJKL"), pos, npos) assert(s == "IJKL"); } + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/size_size_pointer.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/size_size_pointer.pass.cpp index 6718242e0e8c1..b33ba0f3b9418 100644 --- a/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/size_size_pointer.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/size_size_pointer.pass.cpp @@ -11,6 +11,11 @@ // basic_string& // replace(size_type pos, size_type n1, const charT* s); +// When back-deploying to macosx10.7, the RTTI for exception classes +// incorrectly provided by libc++.dylib is mixed with the one in +// libc++abi.dylib and exceptions are not caught properly. +// XFAIL: with_system_cxx_lib=macosx10.7 + #include #include #include @@ -363,7 +368,7 @@ void test2() test(S("abcdefghijklmnopqrst"), 21, 0, "12345678901234567890", S("can't happen")); } -int main() +int main(int, char**) { { typedef std::string S; @@ -379,4 +384,6 @@ int main() test2(); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/size_size_pointer_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/size_size_pointer_size.pass.cpp index 53465bf680e37..7b22303ee54e7 100644 --- a/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/size_size_pointer_size.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/size_size_pointer_size.pass.cpp @@ -11,6 +11,11 @@ // basic_string& // replace(size_type pos, size_type n1, const charT* s, size_type n2); +// When back-deploying to macosx10.7, the RTTI for exception classes +// incorrectly provided by libc++.dylib is mixed with the one in +// libc++abi.dylib and exceptions are not caught properly. +// XFAIL: with_system_cxx_lib=macosx10.7 + #include #include #include @@ -1297,7 +1302,7 @@ void test11() test(S("abcdefghijklmnopqrst"), 21, 0, "12345678901234567890", 20, S("can't happen")); } -int main() +int main(int, char**) { { typedef std::string S; @@ -1331,4 +1336,6 @@ int main() test11(); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/size_size_size_char.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/size_size_size_char.pass.cpp index 2e8c4527cc7c6..4e296e9cad617 100644 --- a/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/size_size_size_char.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/size_size_size_char.pass.cpp @@ -11,6 +11,11 @@ // basic_string& // replace(size_type pos, size_type n1, size_type n2, charT c); +// When back-deploying to macosx10.7, the RTTI for exception classes +// incorrectly provided by libc++.dylib is mixed with the one in +// libc++abi.dylib and exceptions are not caught properly. +// XFAIL: with_system_cxx_lib=macosx10.7 + #include #include #include @@ -364,7 +369,7 @@ void test2() test(S("abcdefghijklmnopqrst"), 21, 0, 20, '2', S("can't happen")); } -int main() +int main(int, char**) { { typedef std::string S; @@ -380,4 +385,6 @@ int main() test2(); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/size_size_string.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/size_size_string.pass.cpp index 85306d595953d..1fe5c5a445319 100644 --- a/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/size_size_string.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/size_size_string.pass.cpp @@ -11,6 +11,11 @@ // basic_string& // replace(size_type pos1, size_type n1, const basic_string& str); +// When back-deploying to macosx10.7, the RTTI for exception classes +// incorrectly provided by libc++.dylib is mixed with the one in +// libc++abi.dylib and exceptions are not caught properly. +// XFAIL: with_system_cxx_lib=macosx10.7 + #include #include #include @@ -362,7 +367,7 @@ void test2() test(S("abcdefghijklmnopqrst"), 21, 0, S("12345678901234567890"), S("can't happen")); } -int main() +int main(int, char**) { { typedef std::string S; @@ -387,4 +392,6 @@ int main() assert(s == "a"); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/size_size_string_size_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/size_size_string_size_size.pass.cpp index 7a75f03e59bea..4bd3889f52045 100644 --- a/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/size_size_string_size_size.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/size_size_string_size_size.pass.cpp @@ -13,6 +13,11 @@ // size_type pos2, size_type n2=npos); // the "=npos" was added in C++14 +// When back-deploying to macosx10.7, the RTTI for exception classes +// incorrectly provided by libc++.dylib is mixed with the one in +// libc++abi.dylib and exceptions are not caught properly. +// XFAIL: with_system_cxx_lib=macosx10.7 + #include #include #include @@ -5859,7 +5864,7 @@ void test55() test_npos(S("abcdefghij"), 9, 2, S("12345"), 6, S("can't happen")); } -int main() +int main(int, char**) { { typedef std::string S; @@ -5981,4 +5986,6 @@ int main() test55(); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/size_size_string_view.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/size_size_string_view.pass.cpp index 9b35da025f92d..22b2309358171 100644 --- a/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/size_size_string_view.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/size_size_string_view.pass.cpp @@ -11,6 +11,11 @@ // basic_string& // replace(size_type pos1, size_type n1, basic_string_view sv); +// When back-deploying to macosx10.7, the RTTI for exception classes +// incorrectly provided by libc++.dylib is mixed with the one in +// libc++abi.dylib and exceptions are not caught properly. +// XFAIL: with_system_cxx_lib=macosx10.7 + #include #include #include @@ -362,7 +367,7 @@ void test2() test(S("abcdefghijklmnopqrst"), 21, 0, SV("12345678901234567890"), S("can't happen")); } -int main() +int main(int, char**) { { typedef std::string S; @@ -380,4 +385,6 @@ int main() test2(); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_swap/swap.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_swap/swap.pass.cpp index 79adee48764e8..8fdf3fea9b4f2 100644 --- a/libcxx/test/std/strings/basic.string/string.modifiers/string_swap/swap.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_swap/swap.pass.cpp @@ -31,7 +31,7 @@ test(S s1, S s2) assert(s2 == s1_); } -int main() +int main(int, char**) { { typedef std::string S; @@ -73,4 +73,6 @@ int main() test(S("abcdefghijklmnopqrst"), S("12345678901234567890")); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.nonmembers/nothing_to_do.pass.cpp b/libcxx/test/std/strings/basic.string/string.nonmembers/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/strings/basic.string/string.nonmembers/nothing_to_do.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.nonmembers/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.nonmembers/string.io/get_line.pass.cpp b/libcxx/test/std/strings/basic.string/string.nonmembers/string.io/get_line.pass.cpp index 9937863b28af1..8e663cb4f6044 100644 --- a/libcxx/test/std/strings/basic.string/string.nonmembers/string.io/get_line.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.nonmembers/string.io/get_line.pass.cpp @@ -19,7 +19,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { std::istringstream in(" abc\n def\n ghij"); @@ -77,4 +77,6 @@ int main() assert(s == L" ghij"); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.nonmembers/string.io/get_line_delim.pass.cpp b/libcxx/test/std/strings/basic.string/string.nonmembers/string.io/get_line_delim.pass.cpp index 965137c1d3081..b081b55c920ca 100644 --- a/libcxx/test/std/strings/basic.string/string.nonmembers/string.io/get_line_delim.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.nonmembers/string.io/get_line_delim.pass.cpp @@ -19,7 +19,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { std::istringstream in(" abc* def** ghij"); @@ -89,4 +89,6 @@ int main() assert(s == L" ghij"); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.nonmembers/string.io/get_line_delim_rv.pass.cpp b/libcxx/test/std/strings/basic.string/string.nonmembers/string.io/get_line_delim_rv.pass.cpp index b2255d068b2be..b1511f21192d5 100644 --- a/libcxx/test/std/strings/basic.string/string.nonmembers/string.io/get_line_delim_rv.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.nonmembers/string.io/get_line_delim_rv.pass.cpp @@ -21,7 +21,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { std::string s("initial text"); @@ -45,4 +45,6 @@ int main() getline(std::wistringstream(L" abc* def* ghij"), s, L'*'); assert(s == L" abc"); } + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.nonmembers/string.io/get_line_rv.pass.cpp b/libcxx/test/std/strings/basic.string/string.nonmembers/string.io/get_line_rv.pass.cpp index a87529a0eab72..cf4772c43d355 100644 --- a/libcxx/test/std/strings/basic.string/string.nonmembers/string.io/get_line_rv.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.nonmembers/string.io/get_line_rv.pass.cpp @@ -21,7 +21,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { std::string s("initial text"); @@ -45,4 +45,6 @@ int main() getline(std::wistringstream(L" abc\n def\n ghij"), s); assert(s == L" abc"); } + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.nonmembers/string.io/stream_extract.pass.cpp b/libcxx/test/std/strings/basic.string/string.nonmembers/string.io/stream_extract.pass.cpp index 85f399dcd0da9..389701d1d5187 100644 --- a/libcxx/test/std/strings/basic.string/string.nonmembers/string.io/stream_extract.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.nonmembers/string.io/stream_extract.pass.cpp @@ -19,7 +19,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { std::istringstream in("a bc defghij"); @@ -113,4 +113,6 @@ int main() assert(in.fail()); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.nonmembers/string.io/stream_insert.pass.cpp b/libcxx/test/std/strings/basic.string/string.nonmembers/string.io/stream_insert.pass.cpp index eb272c29bc63e..b30fd5afaf5f9 100644 --- a/libcxx/test/std/strings/basic.string/string.nonmembers/string.io/stream_insert.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.nonmembers/string.io/stream_insert.pass.cpp @@ -19,7 +19,7 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { std::ostringstream out; @@ -87,4 +87,6 @@ int main() assert(L" " + s == out.str()); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.nonmembers/string.special/swap.pass.cpp b/libcxx/test/std/strings/basic.string/string.nonmembers/string.special/swap.pass.cpp index 944bd45539112..f644f2870753d 100644 --- a/libcxx/test/std/strings/basic.string/string.nonmembers/string.special/swap.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.nonmembers/string.special/swap.pass.cpp @@ -33,7 +33,7 @@ test(S s1, S s2) assert(s2 == s1_); } -int main() +int main(int, char**) { { typedef std::string S; @@ -75,4 +75,6 @@ int main() test(S("abcdefghijklmnopqrst"), S("12345678901234567890")); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.nonmembers/string.special/swap_noexcept.pass.cpp b/libcxx/test/std/strings/basic.string/string.nonmembers/string.special/swap_noexcept.pass.cpp index a00eb17be591f..3f6ce447cf705 100644 --- a/libcxx/test/std/strings/basic.string/string.nonmembers/string.special/swap_noexcept.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.nonmembers/string.special/swap_noexcept.pass.cpp @@ -53,7 +53,7 @@ struct some_alloc2 typedef std::true_type is_always_equal; }; -int main() +int main(int, char**) { { typedef std::string C; @@ -81,4 +81,6 @@ int main() static_assert( noexcept(swap(std::declval(), std::declval())), ""); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.nonmembers/string_op!=/pointer_string.pass.cpp b/libcxx/test/std/strings/basic.string/string.nonmembers/string_op!=/pointer_string.pass.cpp index 527d59d68878d..bf2cc8413ab12 100644 --- a/libcxx/test/std/strings/basic.string/string.nonmembers/string_op!=/pointer_string.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.nonmembers/string_op!=/pointer_string.pass.cpp @@ -23,7 +23,7 @@ test(const typename S::value_type* lhs, const S& rhs, bool x) assert((lhs != rhs) == x); } -int main() +int main(int, char**) { { typedef std::string S; @@ -65,4 +65,6 @@ int main() test("abcdefghijklmnopqrst", S("abcdefghijklmnopqrst"), false); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.nonmembers/string_op!=/string_pointer.pass.cpp b/libcxx/test/std/strings/basic.string/string.nonmembers/string_op!=/string_pointer.pass.cpp index b1e6fa73d4f42..76e0abe23784c 100644 --- a/libcxx/test/std/strings/basic.string/string.nonmembers/string_op!=/string_pointer.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.nonmembers/string_op!=/string_pointer.pass.cpp @@ -23,7 +23,7 @@ test(const S& lhs, const typename S::value_type* rhs, bool x) assert((lhs != rhs) == x); } -int main() +int main(int, char**) { { typedef std::string S; @@ -65,4 +65,6 @@ int main() test(S("abcdefghijklmnopqrst"), "abcdefghijklmnopqrst", false); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.nonmembers/string_op!=/string_string.pass.cpp b/libcxx/test/std/strings/basic.string/string.nonmembers/string_op!=/string_string.pass.cpp index 9825c1b38308b..30aeb501a5927 100644 --- a/libcxx/test/std/strings/basic.string/string.nonmembers/string_op!=/string_string.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.nonmembers/string_op!=/string_string.pass.cpp @@ -24,7 +24,7 @@ test(const S& lhs, const S& rhs, bool x) assert((lhs != rhs) == x); } -int main() +int main(int, char**) { { typedef std::string S; @@ -66,4 +66,6 @@ int main() test(S("abcdefghijklmnopqrst"), S("abcdefghijklmnopqrst"), false); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.nonmembers/string_op!=/string_string_view.pass.cpp b/libcxx/test/std/strings/basic.string/string.nonmembers/string_op!=/string_string_view.pass.cpp index 7108d819e0b5a..5b01455e7f8bb 100644 --- a/libcxx/test/std/strings/basic.string/string.nonmembers/string_op!=/string_string_view.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.nonmembers/string_op!=/string_string_view.pass.cpp @@ -22,7 +22,7 @@ test(const S& lhs, SV rhs, bool x) assert((lhs != rhs) == x); } -int main() +int main(int, char**) { { typedef std::string S; @@ -66,4 +66,6 @@ int main() test(S("abcdefghijklmnopqrst"), SV("abcdefghijklmnopqrst"), false); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.nonmembers/string_op!=/string_view_string.pass.cpp b/libcxx/test/std/strings/basic.string/string.nonmembers/string_op!=/string_view_string.pass.cpp index 8f3906bf18bd8..2d6957e3494c3 100644 --- a/libcxx/test/std/strings/basic.string/string.nonmembers/string_op!=/string_view_string.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.nonmembers/string_op!=/string_view_string.pass.cpp @@ -22,7 +22,7 @@ test(SV lhs, const S& rhs, bool x) assert((lhs != rhs) == x); } -int main() +int main(int, char**) { { typedef std::string S; @@ -66,4 +66,6 @@ int main() test(SV("abcdefghijklmnopqrst"), S("abcdefghijklmnopqrst"), false); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.nonmembers/string_op+/char_string.pass.cpp b/libcxx/test/std/strings/basic.string/string.nonmembers/string_op+/char_string.pass.cpp index c24d80768424d..9ab3c0611971d 100644 --- a/libcxx/test/std/strings/basic.string/string.nonmembers/string_op+/char_string.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.nonmembers/string_op+/char_string.pass.cpp @@ -35,7 +35,7 @@ void test1(typename S::value_type lhs, S&& rhs, const S& x) { } #endif -int main() { +int main(int, char**) { { typedef std::string S; test0('a', S(""), S("a")); @@ -66,4 +66,6 @@ int main() { test1('a', S("12345678901234567890"), S("a12345678901234567890")); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.nonmembers/string_op+/pointer_string.pass.cpp b/libcxx/test/std/strings/basic.string/string.nonmembers/string_op+/pointer_string.pass.cpp index 654eca290f5b0..cf13fbb51d6e1 100644 --- a/libcxx/test/std/strings/basic.string/string.nonmembers/string_op+/pointer_string.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.nonmembers/string_op+/pointer_string.pass.cpp @@ -35,7 +35,7 @@ void test1(const typename S::value_type* lhs, S&& rhs, const S& x) { } #endif -int main() { +int main(int, char**) { { typedef std::string S; test0("", S(""), S("")); @@ -127,4 +127,6 @@ int main() { S("abcdefghijklmnopqrst12345678901234567890")); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.nonmembers/string_op+/string_char.pass.cpp b/libcxx/test/std/strings/basic.string/string.nonmembers/string_op+/string_char.pass.cpp index 5196aba1a693a..32411144db276 100644 --- a/libcxx/test/std/strings/basic.string/string.nonmembers/string_op+/string_char.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.nonmembers/string_op+/string_char.pass.cpp @@ -35,7 +35,7 @@ void test1(S&& lhs, typename S::value_type rhs, const S& x) { } #endif -int main() { +int main(int, char**) { { typedef std::string S; test0(S(""), '1', S("1")); @@ -66,4 +66,6 @@ int main() { test1(S("abcdefghijklmnopqrst"), '1', S("abcdefghijklmnopqrst1")); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.nonmembers/string_op+/string_pointer.pass.cpp b/libcxx/test/std/strings/basic.string/string.nonmembers/string_op+/string_pointer.pass.cpp index ef8b8001009eb..4fec848296623 100644 --- a/libcxx/test/std/strings/basic.string/string.nonmembers/string_op+/string_pointer.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.nonmembers/string_op+/string_pointer.pass.cpp @@ -35,7 +35,7 @@ void test1(S&& lhs, const typename S::value_type* rhs, const S& x) { } #endif -int main() { +int main(int, char**) { { typedef std::string S; test0(S(""), "", S("")); @@ -126,4 +126,6 @@ int main() { S("abcdefghijklmnopqrst12345678901234567890")); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.nonmembers/string_op+/string_string.pass.cpp b/libcxx/test/std/strings/basic.string/string.nonmembers/string_op+/string_string.pass.cpp index 2bc38c71a00bf..00aaf5cc09217 100644 --- a/libcxx/test/std/strings/basic.string/string.nonmembers/string_op+/string_string.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.nonmembers/string_op+/string_string.pass.cpp @@ -58,7 +58,7 @@ void test3(S&& lhs, S&& rhs, const S& x) { #endif -int main() { +int main(int, char**) { { typedef std::string S; test0(S(""), S(""), S("")); @@ -245,4 +245,6 @@ int main() { S("abcdefghijklmnopqrst12345678901234567890")); } #endif // TEST_STD_VER >= 11 + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.nonmembers/string_operator==/pointer_string.pass.cpp b/libcxx/test/std/strings/basic.string/string.nonmembers/string_operator==/pointer_string.pass.cpp index 11ad5f151940f..5db04b3a8d679 100644 --- a/libcxx/test/std/strings/basic.string/string.nonmembers/string_operator==/pointer_string.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.nonmembers/string_operator==/pointer_string.pass.cpp @@ -23,7 +23,7 @@ test(const typename S::value_type* lhs, const S& rhs, bool x) assert((lhs == rhs) == x); } -int main() +int main(int, char**) { { typedef std::string S; @@ -65,4 +65,6 @@ int main() test("abcdefghijklmnopqrst", S("abcdefghijklmnopqrst"), true); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.nonmembers/string_operator==/string_pointer.pass.cpp b/libcxx/test/std/strings/basic.string/string.nonmembers/string_operator==/string_pointer.pass.cpp index f020c2234f3a8..aa79e17d12193 100644 --- a/libcxx/test/std/strings/basic.string/string.nonmembers/string_operator==/string_pointer.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.nonmembers/string_operator==/string_pointer.pass.cpp @@ -23,7 +23,7 @@ test(const S& lhs, const typename S::value_type* rhs, bool x) assert((lhs == rhs) == x); } -int main() +int main(int, char**) { { typedef std::string S; @@ -65,4 +65,6 @@ int main() test(S("abcdefghijklmnopqrst"), "abcdefghijklmnopqrst", true); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.nonmembers/string_operator==/string_string.pass.cpp b/libcxx/test/std/strings/basic.string/string.nonmembers/string_operator==/string_string.pass.cpp index 39ec5cc06e4d5..357a91fd9f595 100644 --- a/libcxx/test/std/strings/basic.string/string.nonmembers/string_operator==/string_string.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.nonmembers/string_operator==/string_string.pass.cpp @@ -24,7 +24,7 @@ test(const S& lhs, const S& rhs, bool x) assert((lhs == rhs) == x); } -int main() +int main(int, char**) { { typedef std::string S; @@ -66,4 +66,6 @@ int main() test(S("abcdefghijklmnopqrst"), S("abcdefghijklmnopqrst"), true); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.nonmembers/string_operator==/string_string_view.pass.cpp b/libcxx/test/std/strings/basic.string/string.nonmembers/string_operator==/string_string_view.pass.cpp index f4791e3b54c7c..06c16d0707912 100644 --- a/libcxx/test/std/strings/basic.string/string.nonmembers/string_operator==/string_string_view.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.nonmembers/string_operator==/string_string_view.pass.cpp @@ -22,7 +22,7 @@ test(const S& lhs, SV rhs, bool x) assert((lhs == rhs) == x); } -int main() +int main(int, char**) { { typedef std::string S; @@ -66,4 +66,6 @@ int main() test(S("abcdefghijklmnopqrst"), SV("abcdefghijklmnopqrst"), true); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.nonmembers/string_operator==/string_view_string.pass.cpp b/libcxx/test/std/strings/basic.string/string.nonmembers/string_operator==/string_view_string.pass.cpp index fdf89a2c9c4f9..7ebdc0934930e 100644 --- a/libcxx/test/std/strings/basic.string/string.nonmembers/string_operator==/string_view_string.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.nonmembers/string_operator==/string_view_string.pass.cpp @@ -22,7 +22,7 @@ test(SV lhs, const S& rhs, bool x) assert((lhs == rhs) == x); } -int main() +int main(int, char**) { { typedef std::string S; @@ -66,4 +66,6 @@ int main() test(SV("abcdefghijklmnopqrst"), S("abcdefghijklmnopqrst"), true); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.nonmembers/string_opgt/pointer_string.pass.cpp b/libcxx/test/std/strings/basic.string/string.nonmembers/string_opgt/pointer_string.pass.cpp index dd27087b66c48..db28cd4d1b464 100644 --- a/libcxx/test/std/strings/basic.string/string.nonmembers/string_opgt/pointer_string.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.nonmembers/string_opgt/pointer_string.pass.cpp @@ -23,7 +23,7 @@ test(const typename S::value_type* lhs, const S& rhs, bool x) assert((lhs > rhs) == x); } -int main() +int main(int, char**) { { typedef std::string S; @@ -65,4 +65,6 @@ int main() test("abcdefghijklmnopqrst", S("abcdefghijklmnopqrst"), false); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.nonmembers/string_opgt/string_pointer.pass.cpp b/libcxx/test/std/strings/basic.string/string.nonmembers/string_opgt/string_pointer.pass.cpp index 4109eab333643..56521e91662be 100644 --- a/libcxx/test/std/strings/basic.string/string.nonmembers/string_opgt/string_pointer.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.nonmembers/string_opgt/string_pointer.pass.cpp @@ -23,7 +23,7 @@ test(const S& lhs, const typename S::value_type* rhs, bool x) assert((lhs > rhs) == x); } -int main() +int main(int, char**) { { typedef std::string S; @@ -65,4 +65,6 @@ int main() test(S("abcdefghijklmnopqrst"), "abcdefghijklmnopqrst", false); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.nonmembers/string_opgt/string_string.pass.cpp b/libcxx/test/std/strings/basic.string/string.nonmembers/string_opgt/string_string.pass.cpp index 3514ffc11bc43..0cfafb80911eb 100644 --- a/libcxx/test/std/strings/basic.string/string.nonmembers/string_opgt/string_string.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.nonmembers/string_opgt/string_string.pass.cpp @@ -24,7 +24,7 @@ test(const S& lhs, const S& rhs, bool x) assert((lhs > rhs) == x); } -int main() +int main(int, char**) { { typedef std::string S; @@ -66,4 +66,6 @@ int main() test(S("abcdefghijklmnopqrst"), S("abcdefghijklmnopqrst"), false); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.nonmembers/string_opgt/string_string_view.pass.cpp b/libcxx/test/std/strings/basic.string/string.nonmembers/string_opgt/string_string_view.pass.cpp index 8ad82bf01f20c..692fbd4fe8168 100644 --- a/libcxx/test/std/strings/basic.string/string.nonmembers/string_opgt/string_string_view.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.nonmembers/string_opgt/string_string_view.pass.cpp @@ -22,7 +22,7 @@ test(const S& lhs, SV rhs, bool x) assert((lhs > rhs) == x); } -int main() +int main(int, char**) { { typedef std::string S; @@ -66,4 +66,6 @@ int main() test(S("abcdefghijklmnopqrst"), SV("abcdefghijklmnopqrst"), false); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.nonmembers/string_opgt/string_view_string.pass.cpp b/libcxx/test/std/strings/basic.string/string.nonmembers/string_opgt/string_view_string.pass.cpp index af98fa1536385..f6a2fa55588f3 100644 --- a/libcxx/test/std/strings/basic.string/string.nonmembers/string_opgt/string_view_string.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.nonmembers/string_opgt/string_view_string.pass.cpp @@ -22,7 +22,7 @@ test(SV lhs, const S& rhs, bool x) assert((lhs > rhs) == x); } -int main() +int main(int, char**) { { typedef std::string S; @@ -66,4 +66,6 @@ int main() test(SV("abcdefghijklmnopqrst"), S("abcdefghijklmnopqrst"), false); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.nonmembers/string_opgt=/pointer_string.pass.cpp b/libcxx/test/std/strings/basic.string/string.nonmembers/string_opgt=/pointer_string.pass.cpp index 0d7e5acea1c90..e868531a6833a 100644 --- a/libcxx/test/std/strings/basic.string/string.nonmembers/string_opgt=/pointer_string.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.nonmembers/string_opgt=/pointer_string.pass.cpp @@ -23,7 +23,7 @@ test(const typename S::value_type* lhs, const S& rhs, bool x) assert((lhs >= rhs) == x); } -int main() +int main(int, char**) { { typedef std::string S; @@ -65,4 +65,6 @@ int main() test("abcdefghijklmnopqrst", S("abcdefghijklmnopqrst"), true); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.nonmembers/string_opgt=/string_pointer.pass.cpp b/libcxx/test/std/strings/basic.string/string.nonmembers/string_opgt=/string_pointer.pass.cpp index 93b9d2a874d52..8aad50782472c 100644 --- a/libcxx/test/std/strings/basic.string/string.nonmembers/string_opgt=/string_pointer.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.nonmembers/string_opgt=/string_pointer.pass.cpp @@ -23,7 +23,7 @@ test(const S& lhs, const typename S::value_type* rhs, bool x) assert((lhs >= rhs) == x); } -int main() +int main(int, char**) { { typedef std::string S; @@ -65,4 +65,6 @@ int main() test(S("abcdefghijklmnopqrst"), "abcdefghijklmnopqrst", true); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.nonmembers/string_opgt=/string_string.pass.cpp b/libcxx/test/std/strings/basic.string/string.nonmembers/string_opgt=/string_string.pass.cpp index 06f23205904e7..f0ab16cbb62af 100644 --- a/libcxx/test/std/strings/basic.string/string.nonmembers/string_opgt=/string_string.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.nonmembers/string_opgt=/string_string.pass.cpp @@ -24,7 +24,7 @@ test(const S& lhs, const S& rhs, bool x) assert((lhs >= rhs) == x); } -int main() +int main(int, char**) { { typedef std::string S; @@ -66,4 +66,6 @@ int main() test(S("abcdefghijklmnopqrst"), S("abcdefghijklmnopqrst"), true); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.nonmembers/string_opgt=/string_string_view.pass.cpp b/libcxx/test/std/strings/basic.string/string.nonmembers/string_opgt=/string_string_view.pass.cpp index 27c2b35d3553b..c7eb3e3e45ec9 100644 --- a/libcxx/test/std/strings/basic.string/string.nonmembers/string_opgt=/string_string_view.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.nonmembers/string_opgt=/string_string_view.pass.cpp @@ -22,7 +22,7 @@ test(const S& lhs, SV rhs, bool x) assert((lhs >= rhs) == x); } -int main() +int main(int, char**) { { typedef std::string S; @@ -66,4 +66,6 @@ int main() test(S("abcdefghijklmnopqrst"), SV("abcdefghijklmnopqrst"), true); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.nonmembers/string_opgt=/string_view_string.pass.cpp b/libcxx/test/std/strings/basic.string/string.nonmembers/string_opgt=/string_view_string.pass.cpp index ff4a35b39bf2f..b49c1348a9909 100644 --- a/libcxx/test/std/strings/basic.string/string.nonmembers/string_opgt=/string_view_string.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.nonmembers/string_opgt=/string_view_string.pass.cpp @@ -22,7 +22,7 @@ test(SV lhs, const S& rhs, bool x) assert((lhs >= rhs) == x); } -int main() +int main(int, char**) { { typedef std::string S; @@ -66,4 +66,6 @@ int main() test(SV("abcdefghijklmnopqrst"), S("abcdefghijklmnopqrst"), true); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.nonmembers/string_oplt/pointer_string.pass.cpp b/libcxx/test/std/strings/basic.string/string.nonmembers/string_oplt/pointer_string.pass.cpp index 0c3943d7db2fc..1609c4d87d997 100644 --- a/libcxx/test/std/strings/basic.string/string.nonmembers/string_oplt/pointer_string.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.nonmembers/string_oplt/pointer_string.pass.cpp @@ -23,7 +23,7 @@ test(const typename S::value_type* lhs, const S& rhs, bool x) assert((lhs < rhs) == x); } -int main() +int main(int, char**) { { typedef std::string S; @@ -65,4 +65,6 @@ int main() test("abcdefghijklmnopqrst", S("abcdefghijklmnopqrst"), false); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.nonmembers/string_oplt/string_pointer.pass.cpp b/libcxx/test/std/strings/basic.string/string.nonmembers/string_oplt/string_pointer.pass.cpp index d91c3b1aeef39..079344bb8295d 100644 --- a/libcxx/test/std/strings/basic.string/string.nonmembers/string_oplt/string_pointer.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.nonmembers/string_oplt/string_pointer.pass.cpp @@ -23,7 +23,7 @@ test(const S& lhs, const typename S::value_type* rhs, bool x) assert((lhs < rhs) == x); } -int main() +int main(int, char**) { { typedef std::string S; @@ -65,4 +65,6 @@ int main() test(S("abcdefghijklmnopqrst"), "abcdefghijklmnopqrst", false); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.nonmembers/string_oplt/string_string.pass.cpp b/libcxx/test/std/strings/basic.string/string.nonmembers/string_oplt/string_string.pass.cpp index 0b05b6c359298..586faa40f0734 100644 --- a/libcxx/test/std/strings/basic.string/string.nonmembers/string_oplt/string_string.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.nonmembers/string_oplt/string_string.pass.cpp @@ -24,7 +24,7 @@ test(const S& lhs, const S& rhs, bool x) assert((lhs < rhs) == x); } -int main() +int main(int, char**) { { typedef std::string S; @@ -66,4 +66,6 @@ int main() test(S("abcdefghijklmnopqrst"), S("abcdefghijklmnopqrst"), false); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.nonmembers/string_oplt/string_string_view.pass.cpp b/libcxx/test/std/strings/basic.string/string.nonmembers/string_oplt/string_string_view.pass.cpp index eec351c24ec77..79393def5ddde 100644 --- a/libcxx/test/std/strings/basic.string/string.nonmembers/string_oplt/string_string_view.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.nonmembers/string_oplt/string_string_view.pass.cpp @@ -22,7 +22,7 @@ test(const S& lhs, SV rhs, bool x) assert((lhs < rhs) == x); } -int main() +int main(int, char**) { { typedef std::string S; @@ -66,4 +66,6 @@ int main() test(S("abcdefghijklmnopqrst"), SV("abcdefghijklmnopqrst"), false); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.nonmembers/string_oplt/string_view_string.pass.cpp b/libcxx/test/std/strings/basic.string/string.nonmembers/string_oplt/string_view_string.pass.cpp index 9b2b7ddd9a31c..7e8b139c332a3 100644 --- a/libcxx/test/std/strings/basic.string/string.nonmembers/string_oplt/string_view_string.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.nonmembers/string_oplt/string_view_string.pass.cpp @@ -22,7 +22,7 @@ test(SV lhs, const S& rhs, bool x) assert((lhs < rhs) == x); } -int main() +int main(int, char**) { { typedef std::string S; @@ -66,4 +66,6 @@ int main() test(SV("abcdefghijklmnopqrst"), S("abcdefghijklmnopqrst"), false); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.nonmembers/string_oplt=/pointer_string.pass.cpp b/libcxx/test/std/strings/basic.string/string.nonmembers/string_oplt=/pointer_string.pass.cpp index 5354e6b75c467..cae9233dfb261 100644 --- a/libcxx/test/std/strings/basic.string/string.nonmembers/string_oplt=/pointer_string.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.nonmembers/string_oplt=/pointer_string.pass.cpp @@ -23,7 +23,7 @@ test(const typename S::value_type* lhs, const S& rhs, bool x) assert((lhs <= rhs) == x); } -int main() +int main(int, char**) { { typedef std::string S; @@ -65,4 +65,6 @@ int main() test("abcdefghijklmnopqrst", S("abcdefghijklmnopqrst"), true); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.nonmembers/string_oplt=/string_pointer.pass.cpp b/libcxx/test/std/strings/basic.string/string.nonmembers/string_oplt=/string_pointer.pass.cpp index 5fe8948dd61e6..07f9b355185e5 100644 --- a/libcxx/test/std/strings/basic.string/string.nonmembers/string_oplt=/string_pointer.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.nonmembers/string_oplt=/string_pointer.pass.cpp @@ -23,7 +23,7 @@ test(const S& lhs, const typename S::value_type* rhs, bool x) assert((lhs <= rhs) == x); } -int main() +int main(int, char**) { { typedef std::string S; @@ -65,4 +65,6 @@ int main() test(S("abcdefghijklmnopqrst"), "abcdefghijklmnopqrst", true); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.nonmembers/string_oplt=/string_string.pass.cpp b/libcxx/test/std/strings/basic.string/string.nonmembers/string_oplt=/string_string.pass.cpp index 1261f518541e9..8d40f2f0a5b1f 100644 --- a/libcxx/test/std/strings/basic.string/string.nonmembers/string_oplt=/string_string.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.nonmembers/string_oplt=/string_string.pass.cpp @@ -24,7 +24,7 @@ test(const S& lhs, const S& rhs, bool x) assert((lhs <= rhs) == x); } -int main() +int main(int, char**) { { typedef std::string S; @@ -66,4 +66,6 @@ int main() test(S("abcdefghijklmnopqrst"), S("abcdefghijklmnopqrst"), true); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.nonmembers/string_oplt=/string_string_view.pass.cpp b/libcxx/test/std/strings/basic.string/string.nonmembers/string_oplt=/string_string_view.pass.cpp index bdaa49a63a1c2..3df9e39cc0da6 100644 --- a/libcxx/test/std/strings/basic.string/string.nonmembers/string_oplt=/string_string_view.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.nonmembers/string_oplt=/string_string_view.pass.cpp @@ -22,7 +22,7 @@ test(const S& lhs, SV rhs, bool x) assert((lhs <= rhs) == x); } -int main() +int main(int, char**) { { typedef std::string S; @@ -66,4 +66,6 @@ int main() test(S("abcdefghijklmnopqrst"), SV("abcdefghijklmnopqrst"), true); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.nonmembers/string_oplt=/string_view_string.pass.cpp b/libcxx/test/std/strings/basic.string/string.nonmembers/string_oplt=/string_view_string.pass.cpp index 64d286cd8906f..cb7b1a4c451b7 100644 --- a/libcxx/test/std/strings/basic.string/string.nonmembers/string_oplt=/string_view_string.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.nonmembers/string_oplt=/string_view_string.pass.cpp @@ -22,7 +22,7 @@ test(SV lhs, const S& rhs, bool x) assert((lhs <= rhs) == x); } -int main() +int main(int, char**) { { typedef std::string S; @@ -66,4 +66,6 @@ int main() test(SV("abcdefghijklmnopqrst"), S("abcdefghijklmnopqrst"), true); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.ops/nothing_to_do.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/strings/basic.string/string.ops/nothing_to_do.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.ops/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.ops/string.accessors/c_str.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string.accessors/c_str.pass.cpp index 7c713e4b0b3c9..2677230c2d528 100644 --- a/libcxx/test/std/strings/basic.string/string.ops/string.accessors/c_str.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.ops/string.accessors/c_str.pass.cpp @@ -30,7 +30,7 @@ test(const S& s) assert(T::eq(str[0], typename S::value_type())); } -int main() +int main(int, char**) { { typedef std::string S; @@ -48,4 +48,6 @@ int main() test(S("abcdefghijklmnopqrst")); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.ops/string.accessors/data.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string.accessors/data.pass.cpp index 9c643a1723682..6aa07302a951d 100644 --- a/libcxx/test/std/strings/basic.string/string.ops/string.accessors/data.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.ops/string.accessors/data.pass.cpp @@ -47,7 +47,7 @@ test_nonconst(S& s) assert(T::eq(str[0], typename S::value_type())); } -int main() +int main(int, char**) { { typedef std::string S; @@ -74,4 +74,6 @@ int main() S s4("abcdefghijklmnopqrst"); test_nonconst(s4); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.ops/string.accessors/get_allocator.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string.accessors/get_allocator.pass.cpp index 6261ad55f1a94..7edf5a88d9db1 100644 --- a/libcxx/test/std/strings/basic.string/string.ops/string.accessors/get_allocator.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.ops/string.accessors/get_allocator.pass.cpp @@ -23,7 +23,7 @@ test(const S& s, const typename S::allocator_type& a) assert(s.get_allocator() == a); } -int main() +int main(int, char**) { { typedef test_allocator A; @@ -43,4 +43,6 @@ int main() test(S("abcdefghijklmnopqrst", A()), A()); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.ops/string_compare/pointer.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_compare/pointer.pass.cpp index 6219d6babfc4d..0af8ce02f9534 100644 --- a/libcxx/test/std/strings/basic.string/string.ops/string_compare/pointer.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.ops/string_compare/pointer.pass.cpp @@ -31,7 +31,7 @@ test(const S& s, const typename S::value_type* str, int x) assert(sign(s.compare(str)) == sign(x)); } -int main() +int main(int, char**) { { typedef std::string S; @@ -73,4 +73,6 @@ int main() test(S("abcdefghijklmnopqrst"), "abcdefghijklmnopqrst", 0); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.ops/string_compare/size_size_T_size_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_compare/size_size_T_size_size.pass.cpp index ad781f23c26dd..abab9879a14ea 100644 --- a/libcxx/test/std/strings/basic.string/string.ops/string_compare/size_size_T_size_size.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.ops/string_compare/size_size_T_size_size.pass.cpp @@ -5840,7 +5840,7 @@ void test55() test_npos(S("abcde"), 0, 0, SV("abcdefghij"), 5, -5); } -int main() +int main(int, char**) { { typedef std::string S; @@ -5989,4 +5989,6 @@ int main() // calls compare(size, size, string(arr), 0, npos) assert(s.compare(0, 4, arr, 0, std::string::npos) == 0); } + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.ops/string_compare/size_size_pointer.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_compare/size_size_pointer.pass.cpp index aa44e16a9c388..0a806b5892e9d 100644 --- a/libcxx/test/std/strings/basic.string/string.ops/string_compare/size_size_pointer.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.ops/string_compare/size_size_pointer.pass.cpp @@ -10,6 +10,11 @@ // int compare(size_type pos, size_type n1, const charT *s) const; +// When back-deploying to macosx10.7, the RTTI for exception classes +// incorrectly provided by libc++.dylib is mixed with the one in +// libc++abi.dylib and exceptions are not caught properly. +// XFAIL: with_system_cxx_lib=macosx10.7 + #include #include #include @@ -361,7 +366,7 @@ void test2() test(S("abcdefghijklmnopqrst"), 21, 0, "abcdefghijklmnopqrst", 0); } -int main() +int main(int, char**) { { typedef std::string S; @@ -377,4 +382,6 @@ int main() test2(); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.ops/string_compare/size_size_pointer_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_compare/size_size_pointer_size.pass.cpp index f9c0244ec3f11..3299943b86b74 100644 --- a/libcxx/test/std/strings/basic.string/string.ops/string_compare/size_size_pointer_size.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.ops/string_compare/size_size_pointer_size.pass.cpp @@ -10,6 +10,11 @@ // int compare(size_type pos, size_type n1, const charT *s, size_type n2) const; +// When back-deploying to macosx10.7, the RTTI for exception classes +// incorrectly provided by libc++.dylib is mixed with the one in +// libc++abi.dylib and exceptions are not caught properly. +// XFAIL: with_system_cxx_lib=macosx10.7 + #include #include #include @@ -1294,7 +1299,7 @@ void test11() test(S("abcdefghijklmnopqrst"), 21, 0, "abcdefghijklmnopqrst", 20, 0); } -int main() +int main(int, char**) { { typedef std::string S; @@ -1328,4 +1333,6 @@ int main() test11(); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.ops/string_compare/size_size_string.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_compare/size_size_string.pass.cpp index 06b5e531018bd..80e06816210de 100644 --- a/libcxx/test/std/strings/basic.string/string.ops/string_compare/size_size_string.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.ops/string_compare/size_size_string.pass.cpp @@ -10,6 +10,11 @@ // int compare(size_type pos1, size_type n1, const basic_string& str) const; +// When back-deploying to macosx10.7, the RTTI for exception classes +// incorrectly provided by libc++.dylib is mixed with the one in +// libc++abi.dylib and exceptions are not caught properly. +// XFAIL: with_system_cxx_lib=macosx10.7 + #include #include #include @@ -360,7 +365,7 @@ void test2() test(S("abcdefghijklmnopqrst"), 21, 0, S("abcdefghijklmnopqrst"), 0); } -int main() +int main(int, char**) { { typedef std::string S; @@ -383,4 +388,6 @@ int main() assert(s.compare(0, 1, {"abc", 1}) < 0); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.ops/string_compare/size_size_string_size_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_compare/size_size_string_size_size.pass.cpp index 6a231a867c35e..fa78590368729 100644 --- a/libcxx/test/std/strings/basic.string/string.ops/string_compare/size_size_string_size_size.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.ops/string_compare/size_size_string_size_size.pass.cpp @@ -12,6 +12,11 @@ // size_type pos2, size_type n2=npos) const; // the "=npos" was added in C++14 +// When back-deploying to macosx10.7, the RTTI for exception classes +// incorrectly provided by libc++.dylib is mixed with the one in +// libc++abi.dylib and exceptions are not caught properly. +// XFAIL: with_system_cxx_lib=macosx10.7 + #include #include #include @@ -5836,7 +5841,7 @@ void test55() test_npos(S("abcde"), 0, 0, S("abcdefghij"), 5, -5); } -int main() +int main(int, char**) { { typedef std::string S; @@ -5958,4 +5963,6 @@ int main() test55(); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.ops/string_compare/size_size_string_view.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_compare/size_size_string_view.pass.cpp index 00245e834d72c..b313dc0df5533 100644 --- a/libcxx/test/std/strings/basic.string/string.ops/string_compare/size_size_string_view.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.ops/string_compare/size_size_string_view.pass.cpp @@ -10,6 +10,11 @@ // int compare(size_type pos1, size_type n1, basic_string_vew sv) const; +// When back-deploying to macosx10.7, the RTTI for exception classes +// incorrectly provided by libc++.dylib is mixed with the one in +// libc++abi.dylib and exceptions are not caught properly. +// XFAIL: with_system_cxx_lib=macosx10.7 + #include #include #include @@ -361,7 +366,7 @@ void test2() test(S("abcdefghijklmnopqrst"), 21, 0, SV("abcdefghijklmnopqrst"), 0); } -int main() +int main(int, char**) { { typedef std::string S; @@ -379,4 +384,6 @@ int main() test2(); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.ops/string_compare/string.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_compare/string.pass.cpp index 7c3bdb1595ee2..279ae3075846c 100644 --- a/libcxx/test/std/strings/basic.string/string.ops/string_compare/string.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.ops/string_compare/string.pass.cpp @@ -32,7 +32,7 @@ test(const S& s, const S& str, int x) assert(sign(s.compare(str)) == sign(x)); } -int main() +int main(int, char**) { { typedef std::string S; @@ -81,4 +81,6 @@ int main() assert(s.compare({"abc", 1}) < 0); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.ops/string_compare/string_view.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_compare/string_view.pass.cpp index 3e123ad7acebf..2abc7fc1ac189 100644 --- a/libcxx/test/std/strings/basic.string/string.ops/string_compare/string_view.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.ops/string_compare/string_view.pass.cpp @@ -31,7 +31,7 @@ test(const S& s, SV sv, int x) assert(sign(s.compare(sv)) == sign(x)); } -int main() +int main(int, char**) { { typedef std::string S; @@ -75,4 +75,6 @@ int main() test(S("abcdefghijklmnopqrst"), SV("abcdefghijklmnopqrst"), 0); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.ops/string_find.first.not.of/char_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_find.first.not.of/char_size.pass.cpp index 2c4994670c86b..7bada8446ffa2 100644 --- a/libcxx/test/std/strings/basic.string/string.ops/string_find.first.not.of/char_size.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.ops/string_find.first.not.of/char_size.pass.cpp @@ -34,7 +34,7 @@ test(const S& s, typename S::value_type c, typename S::size_type x) assert(x < s.size()); } -int main() +int main(int, char**) { { typedef std::string S; @@ -98,4 +98,6 @@ int main() test(S("laenfsbridchgotmkqpj"), 'q', 0); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.ops/string_find.first.not.of/pointer_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_find.first.not.of/pointer_size.pass.cpp index cb6fc1e97288e..bd20ea1bb4a1d 100644 --- a/libcxx/test/std/strings/basic.string/string.ops/string_find.first.not.of/pointer_size.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.ops/string_find.first.not.of/pointer_size.pass.cpp @@ -140,7 +140,7 @@ void test1() test(S("pniotcfrhqsmgdkjbael"), "htaobedqikfplcgjsmrn", S::npos); } -int main() +int main(int, char**) { { typedef std::string S; @@ -154,4 +154,6 @@ int main() test1(); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.ops/string_find.first.not.of/pointer_size_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_find.first.not.of/pointer_size_size.pass.cpp index 708a04352f98d..46c5511d9aefa 100644 --- a/libcxx/test/std/strings/basic.string/string.ops/string_find.first.not.of/pointer_size_size.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.ops/string_find.first.not.of/pointer_size_size.pass.cpp @@ -365,7 +365,7 @@ void test3() test(S("hnbrcplsjfgiktoedmaq"), "qprlsfojamgndekthibc", 21, 20, S::npos); } -int main() +int main(int, char**) { { typedef std::string S; @@ -383,4 +383,6 @@ int main() test3(); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.ops/string_find.first.not.of/string_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_find.first.not.of/string_size.pass.cpp index 1ea41354f28ac..7f12ab1ba27ce 100644 --- a/libcxx/test/std/strings/basic.string/string.ops/string_find.first.not.of/string_size.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.ops/string_find.first.not.of/string_size.pass.cpp @@ -140,7 +140,7 @@ void test1() test(S("pniotcfrhqsmgdkjbael"), S("htaobedqikfplcgjsmrn"), S::npos); } -int main() +int main(int, char**) { { typedef std::string S; @@ -161,4 +161,6 @@ int main() assert(s.find_first_not_of({"abc", 1}) == 0); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.ops/string_find.first.not.of/string_view_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_find.first.not.of/string_view_size.pass.cpp index 3cb3e74204d77..54ce737ecc608 100644 --- a/libcxx/test/std/strings/basic.string/string.ops/string_find.first.not.of/string_view_size.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.ops/string_find.first.not.of/string_view_size.pass.cpp @@ -139,7 +139,7 @@ void test1() test(S("pniotcfrhqsmgdkjbael"), SV("htaobedqikfplcgjsmrn"), S::npos); } -int main() +int main(int, char**) { { typedef std::string S; @@ -155,4 +155,6 @@ int main() test1(); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.ops/string_find.first.of/char_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_find.first.of/char_size.pass.cpp index cf8548744f8bc..da630f07e762f 100644 --- a/libcxx/test/std/strings/basic.string/string.ops/string_find.first.of/char_size.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.ops/string_find.first.of/char_size.pass.cpp @@ -34,7 +34,7 @@ test(const S& s, typename S::value_type c, typename S::size_type x) assert(x < s.size()); } -int main() +int main(int, char**) { { typedef std::string S; @@ -94,4 +94,6 @@ int main() test(S("laenfsbridchgotmkqpj"), 'e', 2); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.ops/string_find.first.of/pointer_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_find.first.of/pointer_size.pass.cpp index 4c435537c464d..2162ea14cf1f8 100644 --- a/libcxx/test/std/strings/basic.string/string.ops/string_find.first.of/pointer_size.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.ops/string_find.first.of/pointer_size.pass.cpp @@ -140,7 +140,7 @@ void test1() test(S("pniotcfrhqsmgdkjbael"), "htaobedqikfplcgjsmrn", 0); } -int main() +int main(int, char**) { { typedef std::string S; @@ -154,4 +154,6 @@ int main() test1(); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.ops/string_find.first.of/pointer_size_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_find.first.of/pointer_size_size.pass.cpp index c8b62b1f45492..e0bb0f2fb777d 100644 --- a/libcxx/test/std/strings/basic.string/string.ops/string_find.first.of/pointer_size_size.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.ops/string_find.first.of/pointer_size_size.pass.cpp @@ -365,7 +365,7 @@ void test3() test(S("hnbrcplsjfgiktoedmaq"), "qprlsfojamgndekthibc", 21, 20, S::npos); } -int main() +int main(int, char**) { { typedef std::string S; @@ -383,4 +383,6 @@ int main() test3(); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.ops/string_find.first.of/string_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_find.first.of/string_size.pass.cpp index fc79c89d151c0..1ae2123c3eb47 100644 --- a/libcxx/test/std/strings/basic.string/string.ops/string_find.first.of/string_size.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.ops/string_find.first.of/string_size.pass.cpp @@ -140,7 +140,7 @@ void test1() test(S("pniotcfrhqsmgdkjbael"), S("htaobedqikfplcgjsmrn"), 0); } -int main() +int main(int, char**) { { typedef std::string S; @@ -161,4 +161,6 @@ int main() assert(s.find_first_of({"abc", 1}) == std::string::npos); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.ops/string_find.first.of/string_view_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_find.first.of/string_view_size.pass.cpp index ae29e47481bed..8cd272408a02c 100644 --- a/libcxx/test/std/strings/basic.string/string.ops/string_find.first.of/string_view_size.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.ops/string_find.first.of/string_view_size.pass.cpp @@ -139,7 +139,7 @@ void test1() test(S("pniotcfrhqsmgdkjbael"), SV("htaobedqikfplcgjsmrn"), 0); } -int main() +int main(int, char**) { { typedef std::string S; @@ -155,4 +155,6 @@ int main() test1(); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.ops/string_find.last.not.of/char_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_find.last.not.of/char_size.pass.cpp index 6276c49107560..fd77eb89d86fe 100644 --- a/libcxx/test/std/strings/basic.string/string.ops/string_find.last.not.of/char_size.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.ops/string_find.last.not.of/char_size.pass.cpp @@ -34,7 +34,7 @@ test(const S& s, typename S::value_type c, typename S::size_type x) assert(x < s.size()); } -int main() +int main(int, char**) { { typedef std::string S; @@ -94,4 +94,6 @@ int main() test(S("laenfsbridchgotmkqpj"), 'i', 19); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.ops/string_find.last.not.of/pointer_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_find.last.not.of/pointer_size.pass.cpp index 5cc9c0bf40ab3..1234ccb4de205 100644 --- a/libcxx/test/std/strings/basic.string/string.ops/string_find.last.not.of/pointer_size.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.ops/string_find.last.not.of/pointer_size.pass.cpp @@ -140,7 +140,7 @@ void test1() test(S("pniotcfrhqsmgdkjbael"), "htaobedqikfplcgjsmrn", S::npos); } -int main() +int main(int, char**) { { typedef std::string S; @@ -154,4 +154,6 @@ int main() test1(); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.ops/string_find.last.not.of/pointer_size_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_find.last.not.of/pointer_size_size.pass.cpp index 76834c2e81dc5..4c07f4d6129ba 100644 --- a/libcxx/test/std/strings/basic.string/string.ops/string_find.last.not.of/pointer_size_size.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.ops/string_find.last.not.of/pointer_size_size.pass.cpp @@ -365,7 +365,7 @@ void test3() test(S("hnbrcplsjfgiktoedmaq"), "qprlsfojamgndekthibc", 21, 20, S::npos); } -int main() +int main(int, char**) { { typedef std::string S; @@ -383,4 +383,6 @@ int main() test3(); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.ops/string_find.last.not.of/string_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_find.last.not.of/string_size.pass.cpp index 254e639dcfbdf..8232612c1e707 100644 --- a/libcxx/test/std/strings/basic.string/string.ops/string_find.last.not.of/string_size.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.ops/string_find.last.not.of/string_size.pass.cpp @@ -140,7 +140,7 @@ void test1() test(S("pniotcfrhqsmgdkjbael"), S("htaobedqikfplcgjsmrn"), S::npos); } -int main() +int main(int, char**) { { typedef std::string S; @@ -161,4 +161,6 @@ int main() assert(s.find_last_not_of({"abc", 1}) == s.size() - 1); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.ops/string_find.last.not.of/string_view_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_find.last.not.of/string_view_size.pass.cpp index 421ec966db27e..da5054b7df658 100644 --- a/libcxx/test/std/strings/basic.string/string.ops/string_find.last.not.of/string_view_size.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.ops/string_find.last.not.of/string_view_size.pass.cpp @@ -139,7 +139,7 @@ void test1() test(S("pniotcfrhqsmgdkjbael"), SV("htaobedqikfplcgjsmrn"), S::npos); } -int main() +int main(int, char**) { { typedef std::string S; @@ -155,4 +155,6 @@ int main() // test1(); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.ops/string_find.last.of/char_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_find.last.of/char_size.pass.cpp index 2c5359e5edfa4..4292b1eb8bff9 100644 --- a/libcxx/test/std/strings/basic.string/string.ops/string_find.last.of/char_size.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.ops/string_find.last.of/char_size.pass.cpp @@ -34,7 +34,7 @@ test(const S& s, typename S::value_type c, typename S::size_type x) assert(x < s.size()); } -int main() +int main(int, char**) { { typedef std::string S; @@ -94,4 +94,6 @@ int main() test(S("laenfsbridchgotmkqpj"), 'm', 15); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.ops/string_find.last.of/pointer_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_find.last.of/pointer_size.pass.cpp index 6a320788d4bc8..0b86a10c5122d 100644 --- a/libcxx/test/std/strings/basic.string/string.ops/string_find.last.of/pointer_size.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.ops/string_find.last.of/pointer_size.pass.cpp @@ -140,7 +140,7 @@ void test1() test(S("pniotcfrhqsmgdkjbael"), "htaobedqikfplcgjsmrn", 19); } -int main() +int main(int, char**) { { typedef std::string S; @@ -154,4 +154,6 @@ int main() test1(); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.ops/string_find.last.of/pointer_size_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_find.last.of/pointer_size_size.pass.cpp index 46d61a44aec05..9c5f670a9c723 100644 --- a/libcxx/test/std/strings/basic.string/string.ops/string_find.last.of/pointer_size_size.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.ops/string_find.last.of/pointer_size_size.pass.cpp @@ -365,7 +365,7 @@ void test3() test(S("hnbrcplsjfgiktoedmaq"), "qprlsfojamgndekthibc", 21, 20, 19); } -int main() +int main(int, char**) { { typedef std::string S; @@ -383,4 +383,6 @@ int main() test3(); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.ops/string_find.last.of/string_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_find.last.of/string_size.pass.cpp index c5f1a3a7d9623..f3ddb468d4988 100644 --- a/libcxx/test/std/strings/basic.string/string.ops/string_find.last.of/string_size.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.ops/string_find.last.of/string_size.pass.cpp @@ -140,7 +140,7 @@ void test1() test(S("pniotcfrhqsmgdkjbael"), S("htaobedqikfplcgjsmrn"), 19); } -int main() +int main(int, char**) { { typedef std::string S; @@ -161,4 +161,6 @@ int main() assert(s.find_last_of({"abc", 1}) == std::string::npos); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.ops/string_find.last.of/string_view_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_find.last.of/string_view_size.pass.cpp index f98d66eec45ae..ccf181faa5559 100644 --- a/libcxx/test/std/strings/basic.string/string.ops/string_find.last.of/string_view_size.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.ops/string_find.last.of/string_view_size.pass.cpp @@ -139,7 +139,7 @@ void test1() test(S("pniotcfrhqsmgdkjbael"), SV("htaobedqikfplcgjsmrn"), 19); } -int main() +int main(int, char**) { { typedef std::string S; @@ -155,4 +155,6 @@ int main() test1(); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.ops/string_find/char_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_find/char_size.pass.cpp index c346a0196f38a..5700d09575fbb 100644 --- a/libcxx/test/std/strings/basic.string/string.ops/string_find/char_size.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.ops/string_find/char_size.pass.cpp @@ -34,7 +34,7 @@ test(const S& s, typename S::value_type c, typename S::size_type x) assert(0 <= x && x + 1 <= s.size()); } -int main() +int main(int, char**) { { typedef std::string S; @@ -94,4 +94,6 @@ int main() test(S("abcdeabcdeabcdeabcde"), 'c', 2); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.ops/string_find/pointer_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_find/pointer_size.pass.cpp index a6136d3f84429..6e7ae3d41f4b5 100644 --- a/libcxx/test/std/strings/basic.string/string.ops/string_find/pointer_size.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.ops/string_find/pointer_size.pass.cpp @@ -146,7 +146,7 @@ void test1() test(S("abcdeabcdeabcdeabcde"), "abcdeabcdeabcdeabcde", 0); } -int main() +int main(int, char**) { { typedef std::string S; @@ -160,4 +160,6 @@ int main() test1(); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.ops/string_find/pointer_size_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_find/pointer_size_size.pass.cpp index 176ffbb563a89..fad7507173da2 100644 --- a/libcxx/test/std/strings/basic.string/string.ops/string_find/pointer_size_size.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.ops/string_find/pointer_size_size.pass.cpp @@ -365,7 +365,7 @@ void test3() test(S("abcdeabcdeabcdeabcde"), "abcdeabcdeabcdeabcde", 21, 20, S::npos); } -int main() +int main(int, char**) { { typedef std::string S; @@ -383,4 +383,6 @@ int main() test3(); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.ops/string_find/string_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_find/string_size.pass.cpp index 482648ab3b049..e8a91dd1f67b1 100644 --- a/libcxx/test/std/strings/basic.string/string.ops/string_find/string_size.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.ops/string_find/string_size.pass.cpp @@ -140,7 +140,7 @@ void test1() test(S("abcdeabcdeabcdeabcde"), S("abcdeabcdeabcdeabcde"), 0); } -int main() +int main(int, char**) { { typedef std::string S; @@ -161,4 +161,6 @@ int main() assert(s.find({"abc", 1}) == std::string::npos); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.ops/string_find/string_view_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_find/string_view_size.pass.cpp index d84a41e4ca865..c1e78af10250a 100644 --- a/libcxx/test/std/strings/basic.string/string.ops/string_find/string_view_size.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.ops/string_find/string_view_size.pass.cpp @@ -139,7 +139,7 @@ void test1() test(S("abcdeabcdeabcdeabcde"), SV("abcdeabcdeabcdeabcde"), 0); } -int main() +int main(int, char**) { { typedef std::string S; @@ -155,4 +155,6 @@ int main() test1(); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.ops/string_rfind/char_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_rfind/char_size.pass.cpp index 9a30a63d172e4..46ced31239188 100644 --- a/libcxx/test/std/strings/basic.string/string.ops/string_rfind/char_size.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.ops/string_rfind/char_size.pass.cpp @@ -34,7 +34,7 @@ test(const S& s, typename S::value_type c, typename S::size_type x) assert(x + 1 <= s.size()); } -int main() +int main(int, char**) { { typedef std::string S; @@ -94,4 +94,6 @@ int main() test(S("abcdeabcdeabcdeabcde"), 'b', 16); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.ops/string_rfind/pointer_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_rfind/pointer_size.pass.cpp index 57a4d06bd134a..715b5e5785566 100644 --- a/libcxx/test/std/strings/basic.string/string.ops/string_rfind/pointer_size.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.ops/string_rfind/pointer_size.pass.cpp @@ -147,7 +147,7 @@ void test1() test(S("abcdeabcdeabcdeabcde"), "abcdeabcdeabcdeabcde", 0); } -int main() +int main(int, char**) { { typedef std::string S; @@ -161,4 +161,6 @@ int main() test1(); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.ops/string_rfind/pointer_size_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_rfind/pointer_size_size.pass.cpp index 786affd27bca9..e96700952277f 100644 --- a/libcxx/test/std/strings/basic.string/string.ops/string_rfind/pointer_size_size.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.ops/string_rfind/pointer_size_size.pass.cpp @@ -365,7 +365,7 @@ void test3() test(S("abcdeabcdeabcdeabcde"), "abcdeabcdeabcdeabcde", 21, 20, 0); } -int main() +int main(int, char**) { { typedef std::string S; @@ -383,4 +383,6 @@ int main() test3(); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.ops/string_rfind/string_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_rfind/string_size.pass.cpp index c83acbf4d5d2f..74cfb02ee28c7 100644 --- a/libcxx/test/std/strings/basic.string/string.ops/string_rfind/string_size.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.ops/string_rfind/string_size.pass.cpp @@ -140,7 +140,7 @@ void test1() test(S("abcdeabcdeabcdeabcde"), S("abcdeabcdeabcdeabcde"), 0); } -int main() +int main(int, char**) { { typedef std::string S; @@ -161,4 +161,6 @@ int main() assert(s.rfind({"abc", 1}) == std::string::npos); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.ops/string_rfind/string_view_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_rfind/string_view_size.pass.cpp index 3657e028c2e62..ea4f9c2059709 100644 --- a/libcxx/test/std/strings/basic.string/string.ops/string_rfind/string_view_size.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.ops/string_rfind/string_view_size.pass.cpp @@ -139,7 +139,7 @@ void test1() test(S("abcdeabcdeabcdeabcde"), SV("abcdeabcdeabcdeabcde"), 0); } -int main() +int main(int, char**) { { typedef std::string S; @@ -155,4 +155,6 @@ int main() test1(); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.ops/string_substr/substr.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_substr/substr.pass.cpp index 767dc506339b1..b089d8f20dedc 100644 --- a/libcxx/test/std/strings/basic.string/string.ops/string_substr/substr.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.ops/string_substr/substr.pass.cpp @@ -10,6 +10,11 @@ // basic_string substr(size_type pos = 0, size_type n = npos) const; +// When back-deploying to macosx10.7, the RTTI for exception classes +// incorrectly provided by libc++.dylib is mixed with the one in +// libc++abi.dylib and exceptions are not caught properly. +// XFAIL: with_system_cxx_lib=macosx10.7 + #include #include #include @@ -47,7 +52,7 @@ test(const S& s, typename S::size_type pos, typename S::size_type n) #endif } -int main() +int main(int, char**) { { typedef std::string S; @@ -173,4 +178,6 @@ int main() test(S("dplqartnfgejichmoskb"), 21, 0); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.require/contiguous.pass.cpp b/libcxx/test/std/strings/basic.string/string.require/contiguous.pass.cpp index fb2e3e6ce6bbb..be090c90e1772 100644 --- a/libcxx/test/std/strings/basic.string/string.require/contiguous.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.require/contiguous.pass.cpp @@ -24,7 +24,7 @@ void test_contiguous ( const C &c ) assert ( *(c.begin() + static_cast(i)) == *(std::addressof(*c.begin()) + i)); } -int main() +int main(int, char**) { { typedef std::string S; @@ -49,4 +49,6 @@ int main() test_contiguous(S("1234567890123456789012345678901234567890123456789012345678901234567890", A())); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.starts_with/starts_with.char.pass.cpp b/libcxx/test/std/strings/basic.string/string.starts_with/starts_with.char.pass.cpp index bc9fb26a5d218..8eae5f7c86c97 100644 --- a/libcxx/test/std/strings/basic.string/string.starts_with/starts_with.char.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.starts_with/starts_with.char.pass.cpp @@ -16,7 +16,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { { typedef std::string S; @@ -30,4 +30,6 @@ int main() assert ( s2.starts_with('a')); assert (!s2.starts_with('x')); } + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.starts_with/starts_with.ptr.pass.cpp b/libcxx/test/std/strings/basic.string/string.starts_with/starts_with.ptr.pass.cpp index ff46fc33d91d1..412ed574c7818 100644 --- a/libcxx/test/std/strings/basic.string/string.starts_with/starts_with.ptr.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.starts_with/starts_with.ptr.pass.cpp @@ -16,7 +16,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { { typedef std::string S; @@ -58,4 +58,6 @@ int main() assert (!sNot.starts_with("abcde")); assert ( sNot.starts_with("def")); } + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/string.starts_with/starts_with.string_view.pass.cpp b/libcxx/test/std/strings/basic.string/string.starts_with/starts_with.string_view.pass.cpp index acb90a0c8b1a3..c951b4c737458 100644 --- a/libcxx/test/std/strings/basic.string/string.starts_with/starts_with.string_view.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.starts_with/starts_with.string_view.pass.cpp @@ -16,7 +16,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { { typedef std::string S; @@ -68,4 +68,6 @@ int main() assert (!sNot.starts_with(sv5)); assert ( sNot.starts_with(svNot)); } + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/traits_mismatch.fail.cpp b/libcxx/test/std/strings/basic.string/traits_mismatch.fail.cpp index 7e57ae1a7b14c..47524d2c34d90 100644 --- a/libcxx/test/std/strings/basic.string/traits_mismatch.fail.cpp +++ b/libcxx/test/std/strings/basic.string/traits_mismatch.fail.cpp @@ -11,7 +11,9 @@ #include -int main() +int main(int, char**) { std::basic_string> s; + + return 0; } diff --git a/libcxx/test/std/strings/basic.string/types.pass.cpp b/libcxx/test/std/strings/basic.string/types.pass.cpp index 0d074fe05fb31..5aa2c7cf8bebd 100644 --- a/libcxx/test/std/strings/basic.string/types.pass.cpp +++ b/libcxx/test/std/strings/basic.string/types.pass.cpp @@ -70,7 +70,7 @@ test() static_assert(S::npos == -1, ""); } -int main() +int main(int, char**) { test, test_allocator >(); test, std::allocator >(); @@ -81,4 +81,6 @@ int main() #if TEST_STD_VER >= 11 test, min_allocator >(); #endif + + return 0; } diff --git a/libcxx/test/std/strings/c.strings/cctype.pass.cpp b/libcxx/test/std/strings/c.strings/cctype.pass.cpp index feb5c29d22f04..c26c1e6a20fcb 100644 --- a/libcxx/test/std/strings/c.strings/cctype.pass.cpp +++ b/libcxx/test/std/strings/c.strings/cctype.pass.cpp @@ -70,7 +70,7 @@ #error toupper defined #endif -int main() +int main(int, char**) { ASSERT_SAME_TYPE(int, decltype(std::isalnum(0))); @@ -102,4 +102,6 @@ int main() assert( std::isxdigit('a')); assert( std::tolower('A') == 'a'); assert( std::toupper('a') == 'A'); + + return 0; } diff --git a/libcxx/test/std/strings/c.strings/cstring.pass.cpp b/libcxx/test/std/strings/c.strings/cstring.pass.cpp index c61f5c4ff8ae2..c8ee2789df47a 100644 --- a/libcxx/test/std/strings/c.strings/cstring.pass.cpp +++ b/libcxx/test/std/strings/c.strings/cstring.pass.cpp @@ -17,7 +17,7 @@ #error NULL not defined #endif -int main() +int main(int, char**) { std::size_t s = 0; void* vp = 0; @@ -60,4 +60,6 @@ int main() ASSERT_SAME_TYPE(const char*, decltype(std::strrchr(cpc, 0))); ASSERT_SAME_TYPE(const char*, decltype(std::strstr(cpc, cpc))); #endif + + return 0; } diff --git a/libcxx/test/std/strings/c.strings/cuchar.pass.cpp b/libcxx/test/std/strings/c.strings/cuchar.pass.cpp index 989ca6b04275e..4271503d4e242 100644 --- a/libcxx/test/std/strings/c.strings/cuchar.pass.cpp +++ b/libcxx/test/std/strings/c.strings/cuchar.pass.cpp @@ -14,6 +14,8 @@ #include "test_macros.h" -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/strings/c.strings/cwchar.pass.cpp b/libcxx/test/std/strings/c.strings/cwchar.pass.cpp index c7558859e1ba8..667910bc1a1f2 100644 --- a/libcxx/test/std/strings/c.strings/cwchar.pass.cpp +++ b/libcxx/test/std/strings/c.strings/cwchar.pass.cpp @@ -31,7 +31,7 @@ #error WEOF not defined #endif -int main() +int main(int, char**) { std::mbstate_t mb = {}; std::size_t s = 0; @@ -128,4 +128,6 @@ int main() ASSERT_SAME_TYPE(int, decltype(std::vwprintf(L"", va))); ASSERT_SAME_TYPE(int, decltype(std::wprintf(L""))); #endif + + return 0; } diff --git a/libcxx/test/std/strings/c.strings/cwctype.pass.cpp b/libcxx/test/std/strings/c.strings/cwctype.pass.cpp index a7d9560d71ea2..3bcda1a472c80 100644 --- a/libcxx/test/std/strings/c.strings/cwctype.pass.cpp +++ b/libcxx/test/std/strings/c.strings/cwctype.pass.cpp @@ -90,7 +90,7 @@ #error wctrans defined #endif -int main() +int main(int, char**) { std::wint_t w = 0; ASSERT_SAME_TYPE(int, decltype(std::iswalnum(w))); @@ -113,4 +113,6 @@ int main() ASSERT_SAME_TYPE(std::wint_t, decltype(std::towupper(w))); ASSERT_SAME_TYPE(std::wint_t, decltype(std::towctrans(w, std::wctrans_t()))); ASSERT_SAME_TYPE(std::wctrans_t, decltype(std::wctrans(""))); + + return 0; } diff --git a/libcxx/test/std/strings/char.traits/char.traits.require/nothing_to_do.pass.cpp b/libcxx/test/std/strings/char.traits/char.traits.require/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/strings/char.traits/char.traits.require/nothing_to_do.pass.cpp +++ b/libcxx/test/std/strings/char.traits/char.traits.require/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char/assign2.pass.cpp b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char/assign2.pass.cpp index 8f80a53ed706d..c60e6db9fc47f 100644 --- a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char/assign2.pass.cpp +++ b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char/assign2.pass.cpp @@ -27,7 +27,7 @@ constexpr bool test_constexpr() } #endif -int main() +int main(int, char**) { char c = '\0'; std::char_traits::assign(c, 'a'); @@ -36,4 +36,6 @@ int main() #if TEST_STD_VER > 14 static_assert(test_constexpr(), "" ); #endif + + return 0; } diff --git a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char/assign3.pass.cpp b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char/assign3.pass.cpp index 74e0f907672f9..e2cbe3d5dbe0d 100644 --- a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char/assign3.pass.cpp +++ b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char/assign3.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { char s2[3] = {0}; assert(std::char_traits::assign(s2, 3, char(5)) == s2); @@ -23,4 +23,6 @@ int main() assert(s2[1] == char(5)); assert(s2[2] == char(5)); assert(std::char_traits::assign(NULL, 0, char(5)) == NULL); + + return 0; } diff --git a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char/compare.pass.cpp b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char/compare.pass.cpp index 637095127bce3..4926b6296e73b 100644 --- a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char/compare.pass.cpp +++ b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char/compare.pass.cpp @@ -27,7 +27,7 @@ constexpr bool test_constexpr() } #endif -int main() +int main(int, char**) { assert(std::char_traits::compare("", "", 0) == 0); assert(std::char_traits::compare(NULL, NULL, 0) == 0); @@ -53,4 +53,6 @@ int main() #if TEST_STD_VER > 14 static_assert(test_constexpr(), "" ); #endif + + return 0; } diff --git a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char/copy.pass.cpp b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char/copy.pass.cpp index bd12bfd21e40e..3a8e3bda6bc17 100644 --- a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char/copy.pass.cpp +++ b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char/copy.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { char s1[] = {1, 2, 3}; char s2[3] = {0}; @@ -25,4 +25,6 @@ int main() assert(s2[2] == char(3)); assert(std::char_traits::copy(NULL, s1, 0) == NULL); assert(std::char_traits::copy(s1, NULL, 0) == s1); + + return 0; } diff --git a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char/eof.pass.cpp b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char/eof.pass.cpp index ad99e30b24e20..0ea0995da1fd0 100644 --- a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char/eof.pass.cpp +++ b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char/eof.pass.cpp @@ -15,7 +15,9 @@ #include #include -int main() +int main(int, char**) { assert(std::char_traits::eof() == EOF); + + return 0; } diff --git a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char/eq.pass.cpp b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char/eq.pass.cpp index 7895baf997519..f0cef792d1456 100644 --- a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char/eq.pass.cpp +++ b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char/eq.pass.cpp @@ -15,8 +15,10 @@ #include #include -int main() +int main(int, char**) { assert(std::char_traits::eq('a', 'a')); assert(!std::char_traits::eq('a', 'A')); + + return 0; } diff --git a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char/eq_int_type.pass.cpp b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char/eq_int_type.pass.cpp index ca6808f865c13..0fbb4389c6015 100644 --- a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char/eq_int_type.pass.cpp +++ b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char/eq_int_type.pass.cpp @@ -15,11 +15,13 @@ #include #include -int main() +int main(int, char**) { assert( std::char_traits::eq_int_type('a', 'a')); assert(!std::char_traits::eq_int_type('a', 'A')); assert(!std::char_traits::eq_int_type(std::char_traits::eof(), 'A')); assert( std::char_traits::eq_int_type(std::char_traits::eof(), std::char_traits::eof())); + + return 0; } diff --git a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char/find.pass.cpp b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char/find.pass.cpp index 242d3a17392cd..9745008408002 100644 --- a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char/find.pass.cpp +++ b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char/find.pass.cpp @@ -29,7 +29,7 @@ constexpr bool test_constexpr() } #endif -int main() +int main(int, char**) { char s1[] = {1, 2, 3}; assert(std::char_traits::find(s1, 3, char(1)) == s1); @@ -42,4 +42,6 @@ int main() #if TEST_STD_VER > 14 static_assert(test_constexpr(), "" ); #endif + + return 0; } diff --git a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char/length.pass.cpp b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char/length.pass.cpp index f556c952eac47..8be4e0a705519 100644 --- a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char/length.pass.cpp +++ b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char/length.pass.cpp @@ -27,7 +27,7 @@ constexpr bool test_constexpr() #endif -int main() +int main(int, char**) { assert(std::char_traits::length("") == 0); assert(std::char_traits::length("a") == 1); @@ -38,4 +38,6 @@ int main() #if TEST_STD_VER > 14 static_assert(test_constexpr(), "" ); #endif + + return 0; } diff --git a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char/lt.pass.cpp b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char/lt.pass.cpp index 497679636ec9c..e62090cf4c467 100644 --- a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char/lt.pass.cpp +++ b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char/lt.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { assert( std::char_traits::lt('\0', 'A')); assert(!std::char_traits::lt('A', '\0')); @@ -29,4 +29,6 @@ int main() assert( std::char_traits::lt(' ', 'A')); assert( std::char_traits::lt('A', '~')); + + return 0; } diff --git a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char/move.pass.cpp b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char/move.pass.cpp index c1f885939ba5c..ecbb61901a908 100644 --- a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char/move.pass.cpp +++ b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char/move.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { char s1[] = {1, 2, 3}; assert(std::char_traits::move(s1, s1+1, 2) == s1); @@ -29,4 +29,6 @@ int main() assert(s1[2] == char(3)); assert(std::char_traits::move(NULL, s1, 0) == NULL); assert(std::char_traits::move(s1, NULL, 0) == s1); + + return 0; } diff --git a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char/not_eof.pass.cpp b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char/not_eof.pass.cpp index 01568e5a4285c..1c37a7c2efbaf 100644 --- a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char/not_eof.pass.cpp +++ b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char/not_eof.pass.cpp @@ -15,11 +15,13 @@ #include #include -int main() +int main(int, char**) { assert(std::char_traits::not_eof('a') == 'a'); assert(std::char_traits::not_eof('A') == 'A'); assert(std::char_traits::not_eof(0) == 0); assert(std::char_traits::not_eof(std::char_traits::eof()) != std::char_traits::eof()); + + return 0; } diff --git a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char/to_char_type.pass.cpp b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char/to_char_type.pass.cpp index fbf8f2f584b93..d8a957016f9d8 100644 --- a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char/to_char_type.pass.cpp +++ b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char/to_char_type.pass.cpp @@ -15,9 +15,11 @@ #include #include -int main() +int main(int, char**) { assert(std::char_traits::to_char_type('a') == 'a'); assert(std::char_traits::to_char_type('A') == 'A'); assert(std::char_traits::to_char_type(0) == 0); + + return 0; } diff --git a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char/to_int_type.pass.cpp b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char/to_int_type.pass.cpp index eb8df3b6913f3..dd903f9e6c02d 100644 --- a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char/to_int_type.pass.cpp +++ b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char/to_int_type.pass.cpp @@ -15,9 +15,11 @@ #include #include -int main() +int main(int, char**) { assert(std::char_traits::to_int_type('a') == 'a'); assert(std::char_traits::to_int_type('A') == 'A'); assert(std::char_traits::to_int_type(0) == 0); + + return 0; } diff --git a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char/types.pass.cpp b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char/types.pass.cpp index 6439c1ea07e57..30d31ebc920fb 100644 --- a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char/types.pass.cpp +++ b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char/types.pass.cpp @@ -19,11 +19,13 @@ #include #include -int main() +int main(int, char**) { static_assert((std::is_same::char_type, char>::value), ""); static_assert((std::is_same::int_type, int>::value), ""); static_assert((std::is_same::off_type, std::streamoff>::value), ""); static_assert((std::is_same::pos_type, std::streampos>::value), ""); static_assert((std::is_same::state_type, std::mbstate_t>::value), ""); + + return 0; } diff --git a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/assign2.pass.cpp b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/assign2.pass.cpp index 77b8687e8c69c..017d0e7acce4f 100644 --- a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/assign2.pass.cpp +++ b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/assign2.pass.cpp @@ -27,7 +27,7 @@ constexpr bool test_constexpr() } #endif -int main() +int main(int, char**) { #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS #if TEST_STD_VER >= 11 @@ -40,4 +40,6 @@ int main() static_assert(test_constexpr(), "" ); #endif #endif // _LIBCPP_HAS_NO_UNICODE_CHARS + + return 0; } diff --git a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/assign3.pass.cpp b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/assign3.pass.cpp index c623baa248cb3..8838b81e14b4f 100644 --- a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/assign3.pass.cpp +++ b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/assign3.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS char16_t s2[3] = {0}; @@ -25,4 +25,6 @@ int main() assert(s2[2] == char16_t(5)); assert(std::char_traits::assign(NULL, 0, char16_t(5)) == NULL); #endif // _LIBCPP_HAS_NO_UNICODE_CHARS + + return 0; } diff --git a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/compare.pass.cpp b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/compare.pass.cpp index 2e3b18aca07dd..d0782c0933880 100644 --- a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/compare.pass.cpp +++ b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/compare.pass.cpp @@ -28,7 +28,7 @@ constexpr bool test_constexpr() #endif -int main() +int main(int, char**) { #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS #if TEST_STD_VER >= 11 @@ -58,4 +58,6 @@ int main() static_assert(test_constexpr(), "" ); #endif #endif // _LIBCPP_HAS_NO_UNICODE_CHARS + + return 0; } diff --git a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/copy.pass.cpp b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/copy.pass.cpp index 0bf5d47eeb5f5..102f15acdee3e 100644 --- a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/copy.pass.cpp +++ b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/copy.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS char16_t s1[] = {1, 2, 3}; @@ -27,4 +27,6 @@ int main() assert(std::char_traits::copy(NULL, s1, 0) == NULL); assert(std::char_traits::copy(s1, NULL, 0) == s1); #endif // _LIBCPP_HAS_NO_UNICODE_CHARS + + return 0; } diff --git a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/eof.pass.cpp b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/eof.pass.cpp index bb0a4506a9a53..c80b0792a4923 100644 --- a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/eof.pass.cpp +++ b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/eof.pass.cpp @@ -15,10 +15,12 @@ #include #include -int main() +int main(int, char**) { #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS std::char_traits::int_type i = std::char_traits::eof(); ((void)i); // Prevent unused warning #endif + + return 0; } diff --git a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/eq.pass.cpp b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/eq.pass.cpp index f4abe84dbd64d..1c705109f2859 100644 --- a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/eq.pass.cpp +++ b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/eq.pass.cpp @@ -17,7 +17,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS #if TEST_STD_VER >= 11 @@ -25,4 +25,6 @@ int main() assert(!std::char_traits::eq(u'a', u'A')); #endif #endif // _LIBCPP_HAS_NO_UNICODE_CHARS + + return 0; } diff --git a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/eq_int_type.pass.cpp b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/eq_int_type.pass.cpp index 9a24cf13d0c83..bef97d612eb77 100644 --- a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/eq_int_type.pass.cpp +++ b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/eq_int_type.pass.cpp @@ -17,7 +17,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS #if TEST_STD_VER >= 11 @@ -28,4 +28,6 @@ int main() assert( std::char_traits::eq_int_type(std::char_traits::eof(), std::char_traits::eof())); #endif // _LIBCPP_HAS_NO_UNICODE_CHARS + + return 0; } diff --git a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/find.pass.cpp b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/find.pass.cpp index cd31e5925dea4..2ca7e534327cc 100644 --- a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/find.pass.cpp +++ b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/find.pass.cpp @@ -29,7 +29,7 @@ constexpr bool test_constexpr() } #endif -int main() +int main(int, char**) { #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS char16_t s1[] = {1, 2, 3}; @@ -44,4 +44,6 @@ int main() static_assert(test_constexpr(), "" ); #endif #endif // _LIBCPP_HAS_NO_UNICODE_CHARS + + return 0; } diff --git a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/length.pass.cpp b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/length.pass.cpp index 2a2a35702fc0c..f487c410b0b72 100644 --- a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/length.pass.cpp +++ b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/length.pass.cpp @@ -26,7 +26,7 @@ constexpr bool test_constexpr() } #endif -int main() +int main(int, char**) { #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS #if TEST_STD_VER >= 11 @@ -41,4 +41,6 @@ int main() static_assert(test_constexpr(), "" ); #endif #endif // _LIBCPP_HAS_NO_UNICODE_CHARS + + return 0; } diff --git a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/lt.pass.cpp b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/lt.pass.cpp index 4ade9b6f06d6b..a43a9e45cc2b7 100644 --- a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/lt.pass.cpp +++ b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/lt.pass.cpp @@ -17,7 +17,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS #if TEST_STD_VER >= 11 @@ -25,4 +25,6 @@ int main() assert( std::char_traits::lt(u'A', u'a')); #endif #endif // _LIBCPP_HAS_NO_UNICODE_CHARS + + return 0; } diff --git a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/move.pass.cpp b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/move.pass.cpp index ddf07a022c92a..aa55e0d11ce90 100644 --- a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/move.pass.cpp +++ b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/move.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS char16_t s1[] = {1, 2, 3}; @@ -31,4 +31,6 @@ int main() assert(std::char_traits::move(NULL, s1, 0) == NULL); assert(std::char_traits::move(s1, NULL, 0) == s1); #endif // _LIBCPP_HAS_NO_UNICODE_CHARS + + return 0; } diff --git a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/not_eof.pass.cpp b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/not_eof.pass.cpp index ea6f0ab17cdb6..bf26b4cf33090 100644 --- a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/not_eof.pass.cpp +++ b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/not_eof.pass.cpp @@ -17,7 +17,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS #if TEST_STD_VER >= 11 @@ -28,4 +28,6 @@ int main() assert(std::char_traits::not_eof(std::char_traits::eof()) != std::char_traits::eof()); #endif // _LIBCPP_HAS_NO_UNICODE_CHARS + + return 0; } diff --git a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/to_char_type.pass.cpp b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/to_char_type.pass.cpp index 9256a528172c3..738754bf9838a 100644 --- a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/to_char_type.pass.cpp +++ b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/to_char_type.pass.cpp @@ -17,7 +17,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS #if TEST_STD_VER >= 11 @@ -26,4 +26,6 @@ int main() #endif assert(std::char_traits::to_char_type(0) == 0); #endif // _LIBCPP_HAS_NO_UNICODE_CHARS + + return 0; } diff --git a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/to_int_type.pass.cpp b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/to_int_type.pass.cpp index 411f5202b11cd..83fff60b8865f 100644 --- a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/to_int_type.pass.cpp +++ b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/to_int_type.pass.cpp @@ -17,7 +17,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS #if TEST_STD_VER >= 11 @@ -26,4 +26,6 @@ int main() #endif assert(std::char_traits::to_int_type(0) == 0); #endif // _LIBCPP_HAS_NO_UNICODE_CHARS + + return 0; } diff --git a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/types.pass.cpp b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/types.pass.cpp index ae8792c490119..41e3fd4d57b1a 100644 --- a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/types.pass.cpp +++ b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/types.pass.cpp @@ -20,7 +20,7 @@ #include #include -int main() +int main(int, char**) { #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS static_assert((std::is_same::char_type, char16_t>::value), ""); @@ -29,4 +29,6 @@ int main() static_assert((std::is_same::pos_type, std::u16streampos>::value), ""); static_assert((std::is_same::state_type, std::mbstate_t>::value), ""); #endif // _LIBCPP_HAS_NO_UNICODE_CHARS + + return 0; } diff --git a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/assign2.pass.cpp b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/assign2.pass.cpp index 90388aa43f82a..f77d54f791624 100644 --- a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/assign2.pass.cpp +++ b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/assign2.pass.cpp @@ -27,7 +27,7 @@ constexpr bool test_constexpr() } #endif -int main() +int main(int, char**) { #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS #if TEST_STD_VER >= 11 @@ -40,4 +40,6 @@ int main() static_assert(test_constexpr(), "" ); #endif #endif // _LIBCPP_HAS_NO_UNICODE_CHARS + + return 0; } diff --git a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/assign3.pass.cpp b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/assign3.pass.cpp index af69fdcfa2af6..26985481c1f4f 100644 --- a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/assign3.pass.cpp +++ b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/assign3.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS char32_t s2[3] = {0}; @@ -25,4 +25,6 @@ int main() assert(s2[2] == char32_t(5)); assert(std::char_traits::assign(NULL, 0, char32_t(5)) == NULL); #endif // _LIBCPP_HAS_NO_UNICODE_CHARS + + return 0; } diff --git a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/compare.pass.cpp b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/compare.pass.cpp index 5d1cfa84248e0..f2dd01ac9aa6a 100644 --- a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/compare.pass.cpp +++ b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/compare.pass.cpp @@ -27,7 +27,7 @@ constexpr bool test_constexpr() } #endif -int main() +int main(int, char**) { #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS #if TEST_STD_VER >= 11 @@ -57,4 +57,6 @@ int main() static_assert(test_constexpr(), "" ); #endif #endif // _LIBCPP_HAS_NO_UNICODE_CHARS + + return 0; } diff --git a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/copy.pass.cpp b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/copy.pass.cpp index d9f983b5bd6b0..8b2d6ce907428 100644 --- a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/copy.pass.cpp +++ b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/copy.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS char32_t s1[] = {1, 2, 3}; @@ -27,4 +27,6 @@ int main() assert(std::char_traits::copy(NULL, s1, 0) == NULL); assert(std::char_traits::copy(s1, NULL, 0) == s1); #endif // _LIBCPP_HAS_NO_UNICODE_CHARS + + return 0; } diff --git a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/eof.pass.cpp b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/eof.pass.cpp index ac042907ab86c..5c28f47bb4839 100644 --- a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/eof.pass.cpp +++ b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/eof.pass.cpp @@ -15,10 +15,12 @@ #include #include -int main() +int main(int, char**) { #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS std::char_traits::int_type i = std::char_traits::eof(); ((void)i); // Prevent unused warning #endif + + return 0; } diff --git a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/eq.pass.cpp b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/eq.pass.cpp index aef7ebb703dbe..516f38bd08715 100644 --- a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/eq.pass.cpp +++ b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/eq.pass.cpp @@ -17,7 +17,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS #if TEST_STD_VER >= 11 @@ -25,4 +25,6 @@ int main() assert(!std::char_traits::eq(U'a', U'A')); #endif #endif // _LIBCPP_HAS_NO_UNICODE_CHARS + + return 0; } diff --git a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/eq_int_type.pass.cpp b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/eq_int_type.pass.cpp index 91b2fb0fbada9..5d241159f72ec 100644 --- a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/eq_int_type.pass.cpp +++ b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/eq_int_type.pass.cpp @@ -17,7 +17,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS #if TEST_STD_VER >= 11 @@ -28,4 +28,6 @@ int main() assert( std::char_traits::eq_int_type(std::char_traits::eof(), std::char_traits::eof())); #endif // _LIBCPP_HAS_NO_UNICODE_CHARS + + return 0; } diff --git a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/find.pass.cpp b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/find.pass.cpp index ac1723a6535e2..5a89596dee9dc 100644 --- a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/find.pass.cpp +++ b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/find.pass.cpp @@ -29,7 +29,7 @@ constexpr bool test_constexpr() } #endif -int main() +int main(int, char**) { #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS char32_t s1[] = {1, 2, 3}; @@ -44,4 +44,6 @@ int main() static_assert(test_constexpr(), "" ); #endif #endif // _LIBCPP_HAS_NO_UNICODE_CHARS + + return 0; } diff --git a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/length.pass.cpp b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/length.pass.cpp index c4c01ddf1a477..ef2ea3419bd29 100644 --- a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/length.pass.cpp +++ b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/length.pass.cpp @@ -26,7 +26,7 @@ constexpr bool test_constexpr() } #endif -int main() +int main(int, char**) { #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS #if TEST_STD_VER >= 11 @@ -41,4 +41,6 @@ int main() static_assert(test_constexpr(), "" ); #endif #endif // _LIBCPP_HAS_NO_UNICODE_CHARS + + return 0; } diff --git a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/lt.pass.cpp b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/lt.pass.cpp index d3fe9a4516e12..51c1faf9ef2b3 100644 --- a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/lt.pass.cpp +++ b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/lt.pass.cpp @@ -17,7 +17,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS #if TEST_STD_VER >= 11 @@ -25,4 +25,6 @@ int main() assert( std::char_traits::lt(U'A', U'a')); #endif #endif // _LIBCPP_HAS_NO_UNICODE_CHARS + + return 0; } diff --git a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/move.pass.cpp b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/move.pass.cpp index 0ac49d0c9c321..7cda99bd8300e 100644 --- a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/move.pass.cpp +++ b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/move.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS char32_t s1[] = {1, 2, 3}; @@ -31,4 +31,6 @@ int main() assert(std::char_traits::move(NULL, s1, 0) == NULL); assert(std::char_traits::move(s1, NULL, 0) == s1); #endif // _LIBCPP_HAS_NO_UNICODE_CHARS + + return 0; } diff --git a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/not_eof.pass.cpp b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/not_eof.pass.cpp index dbe1dfe8b3024..aeba1228e6f63 100644 --- a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/not_eof.pass.cpp +++ b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/not_eof.pass.cpp @@ -17,7 +17,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS #if TEST_STD_VER >= 11 @@ -28,4 +28,6 @@ int main() assert(std::char_traits::not_eof(std::char_traits::eof()) != std::char_traits::eof()); #endif // _LIBCPP_HAS_NO_UNICODE_CHARS + + return 0; } diff --git a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/to_char_type.pass.cpp b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/to_char_type.pass.cpp index 1c16a55b81181..75104e7bf1687 100644 --- a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/to_char_type.pass.cpp +++ b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/to_char_type.pass.cpp @@ -17,7 +17,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS #if TEST_STD_VER >= 11 @@ -26,4 +26,6 @@ int main() #endif assert(std::char_traits::to_char_type(0) == 0); #endif // _LIBCPP_HAS_NO_UNICODE_CHARS + + return 0; } diff --git a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/to_int_type.pass.cpp b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/to_int_type.pass.cpp index 4ec9a9b631f77..8299e94dabdba 100644 --- a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/to_int_type.pass.cpp +++ b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/to_int_type.pass.cpp @@ -17,7 +17,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS #if TEST_STD_VER >= 11 @@ -26,4 +26,6 @@ int main() #endif assert(std::char_traits::to_int_type(0) == 0); #endif // _LIBCPP_HAS_NO_UNICODE_CHARS + + return 0; } diff --git a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/types.pass.cpp b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/types.pass.cpp index 65624dd5efd51..5ec558f54700c 100644 --- a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/types.pass.cpp +++ b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/types.pass.cpp @@ -20,7 +20,7 @@ #include #include -int main() +int main(int, char**) { #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS static_assert((std::is_same::char_type, char32_t>::value), ""); @@ -29,4 +29,6 @@ int main() static_assert((std::is_same::pos_type, std::u32streampos>::value), ""); static_assert((std::is_same::state_type, std::mbstate_t>::value), ""); #endif // _LIBCPP_HAS_NO_UNICODE_CHARS + + return 0; } diff --git a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char8_t/assign2.pass.cpp b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char8_t/assign2.pass.cpp index b14662d09be33..c669ab9c1a650 100644 --- a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char8_t/assign2.pass.cpp +++ b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char8_t/assign2.pass.cpp @@ -25,7 +25,7 @@ constexpr bool test_constexpr() return c == u'a'; } -int main() +int main(int, char**) { char8_t c = u8'\0'; std::char_traits::assign(c, u8'a'); @@ -34,5 +34,7 @@ int main() static_assert(test_constexpr(), ""); } #else -int main () {} +int main(int, char**) { + return 0; +} #endif diff --git a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char8_t/assign3.pass.cpp b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char8_t/assign3.pass.cpp index eae7c82ba86e5..f9c176e9b2f50 100644 --- a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char8_t/assign3.pass.cpp +++ b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char8_t/assign3.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { #if defined(__cpp_lib_char8_t) && __cpp_lib_char8_t >= 201811L char8_t s2[3] = {0}; @@ -26,4 +26,6 @@ int main() assert(s2[2] == char8_t(5)); assert(std::char_traits::assign(NULL, 0, char8_t(5)) == NULL); #endif + + return 0; } diff --git a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char8_t/compare.pass.cpp b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char8_t/compare.pass.cpp index 0ac815b9b1787..063ab5dc51625 100644 --- a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char8_t/compare.pass.cpp +++ b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char8_t/compare.pass.cpp @@ -27,7 +27,7 @@ constexpr bool test_constexpr() } -int main() +int main(int, char**) { assert(std::char_traits::compare(u8"", u8"", 0) == 0); assert(std::char_traits::compare(NULL, NULL, 0) == 0); @@ -53,5 +53,7 @@ int main() static_assert(test_constexpr(), "" ); } #else -int main () {} +int main(int, char**) { + return 0; +} #endif diff --git a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char8_t/copy.pass.cpp b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char8_t/copy.pass.cpp index 2f091029b06f6..7bf949197a84c 100644 --- a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char8_t/copy.pass.cpp +++ b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char8_t/copy.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { #if defined(__cpp_lib_char8_t) && __cpp_lib_char8_t >= 201811L char8_t s1[] = {1, 2, 3}; @@ -28,4 +28,6 @@ int main() assert(std::char_traits::copy(NULL, s1, 0) == NULL); assert(std::char_traits::copy(s1, NULL, 0) == s1); #endif + + return 0; } diff --git a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char8_t/eof.pass.cpp b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char8_t/eof.pass.cpp index 9d13d7dd0a601..e112556886dcf 100644 --- a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char8_t/eof.pass.cpp +++ b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char8_t/eof.pass.cpp @@ -16,10 +16,12 @@ #include #include -int main() +int main(int, char**) { #if defined(__cpp_lib_char8_t) && __cpp_lib_char8_t >= 201811L std::char_traits::int_type i = std::char_traits::eof(); ((void)i); // Prevent unused warning #endif + + return 0; } diff --git a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char8_t/eq.pass.cpp b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char8_t/eq.pass.cpp index 4d334110f3628..6e32c85bbe3e4 100644 --- a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char8_t/eq.pass.cpp +++ b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char8_t/eq.pass.cpp @@ -18,10 +18,12 @@ #include "test_macros.h" -int main() +int main(int, char**) { #if defined(__cpp_lib_char8_t) && __cpp_lib_char8_t >= 201811L assert( std::char_traits::eq(u8'a', u8'a')); assert(!std::char_traits::eq(u8'a', u8'A')); #endif + + return 0; } diff --git a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char8_t/eq_int_type.pass.cpp b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char8_t/eq_int_type.pass.cpp index 6cc58eba1dbf7..8c5e19717478b 100644 --- a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char8_t/eq_int_type.pass.cpp +++ b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char8_t/eq_int_type.pass.cpp @@ -18,7 +18,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { #if defined(__cpp_lib_char8_t) && __cpp_lib_char8_t >= 201811L assert( std::char_traits::eq_int_type(u8'a', u8'a')); @@ -27,4 +27,6 @@ int main() assert( std::char_traits::eq_int_type(std::char_traits::eof(), std::char_traits::eof())); #endif + + return 0; } diff --git a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char8_t/find.pass.cpp b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char8_t/find.pass.cpp index 9d2e62e348cb3..170539e0694e1 100644 --- a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char8_t/find.pass.cpp +++ b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char8_t/find.pass.cpp @@ -28,7 +28,7 @@ constexpr bool test_constexpr() && std::char_traits::find(p, 3, u8'4') == nullptr; } -int main() +int main(int, char**) { char8_t s1[] = {1, 2, 3}; assert(std::char_traits::find(s1, 3, char8_t(1)) == s1); @@ -41,5 +41,7 @@ int main() static_assert(test_constexpr(), "" ); } #else -int main () {} +int main(int, char**) { + return 0; +} #endif diff --git a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char8_t/length.pass.cpp b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char8_t/length.pass.cpp index 10f800127b6f2..ce2c717cc5724 100644 --- a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char8_t/length.pass.cpp +++ b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char8_t/length.pass.cpp @@ -25,7 +25,7 @@ constexpr bool test_constexpr() && std::char_traits::length(u8"abcd") == 4; } -int main() +int main(int, char**) { assert(std::char_traits::length(u8"") == 0); assert(std::char_traits::length(u8"a") == 1); @@ -36,5 +36,7 @@ int main() static_assert(test_constexpr(), ""); } #else -int main() { } +int main(int, char**) { + return 0; +} #endif diff --git a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char8_t/lt.pass.cpp b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char8_t/lt.pass.cpp index 4653007bf7275..a4fb125120302 100644 --- a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char8_t/lt.pass.cpp +++ b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char8_t/lt.pass.cpp @@ -18,10 +18,12 @@ #include "test_macros.h" -int main() +int main(int, char**) { #if defined(__cpp_lib_char8_t) && __cpp_lib_char8_t >= 201811L assert(!std::char_traits::lt(u8'a', u8'a')); assert( std::char_traits::lt(u8'A', u8'a')); #endif + + return 0; } diff --git a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char8_t/move.pass.cpp b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char8_t/move.pass.cpp index 5ca536966cd49..a5e1359dd4d77 100644 --- a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char8_t/move.pass.cpp +++ b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char8_t/move.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { #if defined(__cpp_lib_char8_t) && __cpp_lib_char8_t >= 201811L char8_t s1[] = {1, 2, 3}; @@ -32,4 +32,6 @@ int main() assert(std::char_traits::move(NULL, s1, 0) == NULL); assert(std::char_traits::move(s1, NULL, 0) == s1); #endif + + return 0; } diff --git a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char8_t/not_eof.pass.cpp b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char8_t/not_eof.pass.cpp index 69e8ddac8cc4e..3d1141d72d723 100644 --- a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char8_t/not_eof.pass.cpp +++ b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char8_t/not_eof.pass.cpp @@ -18,7 +18,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { #if defined(__cpp_lib_char8_t) && __cpp_lib_char8_t >= 201811L assert(std::char_traits::not_eof(u8'a') == u8'a'); @@ -27,4 +27,6 @@ int main() assert(std::char_traits::not_eof(std::char_traits::eof()) != std::char_traits::eof()); #endif + + return 0; } diff --git a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char8_t/to_char_type.pass.cpp b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char8_t/to_char_type.pass.cpp index 0b021d2834029..4edc49452efe0 100644 --- a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char8_t/to_char_type.pass.cpp +++ b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char8_t/to_char_type.pass.cpp @@ -18,11 +18,13 @@ #include "test_macros.h" -int main() +int main(int, char**) { #if defined(__cpp_lib_char8_t) && __cpp_lib_char8_t >= 201811L assert(std::char_traits::to_char_type(u8'a') == u8'a'); assert(std::char_traits::to_char_type(u8'A') == u8'A'); assert(std::char_traits::to_char_type(0) == 0); #endif + + return 0; } diff --git a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char8_t/to_int_type.pass.cpp b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char8_t/to_int_type.pass.cpp index 98974ab86b1ab..ab3c9dc7993a9 100644 --- a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char8_t/to_int_type.pass.cpp +++ b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char8_t/to_int_type.pass.cpp @@ -18,11 +18,13 @@ #include "test_macros.h" -int main() +int main(int, char**) { #if defined(__cpp_lib_char8_t) && __cpp_lib_char8_t >= 201811L assert(std::char_traits::to_int_type(u8'a') == u8'a'); assert(std::char_traits::to_int_type(u8'A') == u8'A'); assert(std::char_traits::to_int_type(0) == 0); #endif + + return 0; } diff --git a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char8_t/types.pass.cpp b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char8_t/types.pass.cpp index cfb20faaf751d..245dcd87d99cf 100644 --- a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char8_t/types.pass.cpp +++ b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char8_t/types.pass.cpp @@ -21,7 +21,7 @@ #include #include -int main() +int main(int, char**) { #if defined(__cpp_lib_char8_t) && __cpp_lib_char8_t >= 201811L static_assert((std::is_same::char_type, char8_t>::value), ""); @@ -30,4 +30,6 @@ int main() static_assert((std::is_same::pos_type, std::u16streampos>::value), ""); static_assert((std::is_same::state_type, std::mbstate_t>::value), ""); #endif + + return 0; } diff --git a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.wchar.t/assign2.pass.cpp b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.wchar.t/assign2.pass.cpp index 9b9b0ea491c71..25e427014483f 100644 --- a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.wchar.t/assign2.pass.cpp +++ b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.wchar.t/assign2.pass.cpp @@ -27,7 +27,7 @@ constexpr bool test_constexpr() } #endif -int main() +int main(int, char**) { wchar_t c = L'\0'; std::char_traits::assign(c, L'a'); @@ -36,4 +36,6 @@ int main() #if TEST_STD_VER > 14 static_assert(test_constexpr(), "" ); #endif + + return 0; } diff --git a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.wchar.t/assign3.pass.cpp b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.wchar.t/assign3.pass.cpp index 42df4081d50fe..d4ed434094581 100644 --- a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.wchar.t/assign3.pass.cpp +++ b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.wchar.t/assign3.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { wchar_t s2[3] = {0}; assert(std::char_traits::assign(s2, 3, wchar_t(5)) == s2); @@ -23,4 +23,6 @@ int main() assert(s2[1] == wchar_t(5)); assert(s2[2] == wchar_t(5)); assert(std::char_traits::assign(NULL, 0, wchar_t(5)) == NULL); + + return 0; } diff --git a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.wchar.t/compare.pass.cpp b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.wchar.t/compare.pass.cpp index d6272f39357f9..1c2e11912f83f 100644 --- a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.wchar.t/compare.pass.cpp +++ b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.wchar.t/compare.pass.cpp @@ -27,7 +27,7 @@ constexpr bool test_constexpr() } #endif -int main() +int main(int, char**) { assert(std::char_traits::compare(L"", L"", 0) == 0); assert(std::char_traits::compare(NULL, NULL, 0) == 0); @@ -53,4 +53,6 @@ int main() #if TEST_STD_VER > 14 static_assert(test_constexpr(), "" ); #endif + + return 0; } diff --git a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.wchar.t/copy.pass.cpp b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.wchar.t/copy.pass.cpp index f90688a9aac76..309c21316c434 100644 --- a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.wchar.t/copy.pass.cpp +++ b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.wchar.t/copy.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { wchar_t s1[] = {1, 2, 3}; wchar_t s2[3] = {0}; @@ -25,4 +25,6 @@ int main() assert(s2[2] == wchar_t(3)); assert(std::char_traits::copy(NULL, s1, 0) == NULL); assert(std::char_traits::copy(s1, NULL, 0) == s1); + + return 0; } diff --git a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.wchar.t/eof.pass.cpp b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.wchar.t/eof.pass.cpp index 9b466a5f0cc72..6190220fe9012 100644 --- a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.wchar.t/eof.pass.cpp +++ b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.wchar.t/eof.pass.cpp @@ -15,7 +15,9 @@ #include #include -int main() +int main(int, char**) { assert(std::char_traits::eof() == WEOF); + + return 0; } diff --git a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.wchar.t/eq.pass.cpp b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.wchar.t/eq.pass.cpp index a89a0002da7ae..701a6502fc6e2 100644 --- a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.wchar.t/eq.pass.cpp +++ b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.wchar.t/eq.pass.cpp @@ -15,8 +15,10 @@ #include #include -int main() +int main(int, char**) { assert(std::char_traits::eq(L'a', L'a')); assert(!std::char_traits::eq(L'a', L'A')); + + return 0; } diff --git a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.wchar.t/eq_int_type.pass.cpp b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.wchar.t/eq_int_type.pass.cpp index e7e8285ca0f30..b218186b43f80 100644 --- a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.wchar.t/eq_int_type.pass.cpp +++ b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.wchar.t/eq_int_type.pass.cpp @@ -15,11 +15,13 @@ #include #include -int main() +int main(int, char**) { assert( std::char_traits::eq_int_type(L'a', L'a')); assert(!std::char_traits::eq_int_type(L'a', L'A')); assert(!std::char_traits::eq_int_type(std::char_traits::eof(), L'A')); assert( std::char_traits::eq_int_type(std::char_traits::eof(), std::char_traits::eof())); + + return 0; } diff --git a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.wchar.t/find.pass.cpp b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.wchar.t/find.pass.cpp index ed59397cc2c7d..78a9ad5c3f90e 100644 --- a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.wchar.t/find.pass.cpp +++ b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.wchar.t/find.pass.cpp @@ -29,7 +29,7 @@ constexpr bool test_constexpr() } #endif -int main() +int main(int, char**) { wchar_t s1[] = {1, 2, 3}; assert(std::char_traits::find(s1, 3, wchar_t(1)) == s1); @@ -42,4 +42,6 @@ int main() #if TEST_STD_VER > 14 static_assert(test_constexpr(), "" ); #endif + + return 0; } diff --git a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.wchar.t/length.pass.cpp b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.wchar.t/length.pass.cpp index a9176c8d459e3..742189205ab91 100644 --- a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.wchar.t/length.pass.cpp +++ b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.wchar.t/length.pass.cpp @@ -26,7 +26,7 @@ constexpr bool test_constexpr() } #endif -int main() +int main(int, char**) { assert(std::char_traits::length(L"") == 0); assert(std::char_traits::length(L"a") == 1); @@ -37,4 +37,6 @@ int main() #if TEST_STD_VER > 14 static_assert(test_constexpr(), "" ); #endif + + return 0; } diff --git a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.wchar.t/lt.pass.cpp b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.wchar.t/lt.pass.cpp index f7950b782bb6f..9abd9cf59d7a7 100644 --- a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.wchar.t/lt.pass.cpp +++ b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.wchar.t/lt.pass.cpp @@ -15,8 +15,10 @@ #include #include -int main() +int main(int, char**) { assert(!std::char_traits::lt(L'a', L'a')); assert( std::char_traits::lt(L'A', L'a')); + + return 0; } diff --git a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.wchar.t/move.pass.cpp b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.wchar.t/move.pass.cpp index d833bc0b5b2a0..341a90233a838 100644 --- a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.wchar.t/move.pass.cpp +++ b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.wchar.t/move.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { wchar_t s1[] = {1, 2, 3}; assert(std::char_traits::move(s1, s1+1, 2) == s1); @@ -29,4 +29,6 @@ int main() assert(s1[2] == wchar_t(3)); assert(std::char_traits::move(NULL, s1, 0) == NULL); assert(std::char_traits::move(s1, NULL, 0) == s1); + + return 0; } diff --git a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.wchar.t/not_eof.pass.cpp b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.wchar.t/not_eof.pass.cpp index 751903beae409..92f08b1d52004 100644 --- a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.wchar.t/not_eof.pass.cpp +++ b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.wchar.t/not_eof.pass.cpp @@ -15,11 +15,13 @@ #include #include -int main() +int main(int, char**) { assert(std::char_traits::not_eof(L'a') == L'a'); assert(std::char_traits::not_eof(L'A') == L'A'); assert(std::char_traits::not_eof(0) == 0); assert(std::char_traits::not_eof(std::char_traits::eof()) != std::char_traits::eof()); + + return 0; } diff --git a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.wchar.t/to_char_type.pass.cpp b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.wchar.t/to_char_type.pass.cpp index 7654c32873f7a..f479bec9daf40 100644 --- a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.wchar.t/to_char_type.pass.cpp +++ b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.wchar.t/to_char_type.pass.cpp @@ -15,9 +15,11 @@ #include #include -int main() +int main(int, char**) { assert(std::char_traits::to_char_type(L'a') == L'a'); assert(std::char_traits::to_char_type(L'A') == L'A'); assert(std::char_traits::to_char_type(0) == 0); + + return 0; } diff --git a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.wchar.t/to_int_type.pass.cpp b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.wchar.t/to_int_type.pass.cpp index a003bdc1115a5..11fe2419b1a59 100644 --- a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.wchar.t/to_int_type.pass.cpp +++ b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.wchar.t/to_int_type.pass.cpp @@ -15,9 +15,11 @@ #include #include -int main() +int main(int, char**) { assert(std::char_traits::to_int_type(L'a') == L'a'); assert(std::char_traits::to_int_type(L'A') == L'A'); assert(std::char_traits::to_int_type(0) == 0); + + return 0; } diff --git a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.wchar.t/types.pass.cpp b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.wchar.t/types.pass.cpp index c367be47ef392..9781d55e392ba 100644 --- a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.wchar.t/types.pass.cpp +++ b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.wchar.t/types.pass.cpp @@ -19,11 +19,13 @@ #include #include -int main() +int main(int, char**) { static_assert((std::is_same::char_type, wchar_t>::value), ""); static_assert((std::is_same::int_type, std::wint_t>::value), ""); static_assert((std::is_same::off_type, std::streamoff>::value), ""); static_assert((std::is_same::pos_type, std::wstreampos>::value), ""); static_assert((std::is_same::state_type, std::mbstate_t>::value), ""); + + return 0; } diff --git a/libcxx/test/std/strings/char.traits/char.traits.specializations/nothing_to_do.pass.cpp b/libcxx/test/std/strings/char.traits/char.traits.specializations/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/strings/char.traits/char.traits.specializations/nothing_to_do.pass.cpp +++ b/libcxx/test/std/strings/char.traits/char.traits.specializations/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/strings/char.traits/char.traits.typedefs/nothing_to_do.pass.cpp b/libcxx/test/std/strings/char.traits/char.traits.typedefs/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/strings/char.traits/char.traits.typedefs/nothing_to_do.pass.cpp +++ b/libcxx/test/std/strings/char.traits/char.traits.typedefs/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/strings/char.traits/nothing_to_do.pass.cpp b/libcxx/test/std/strings/char.traits/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/strings/char.traits/nothing_to_do.pass.cpp +++ b/libcxx/test/std/strings/char.traits/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/strings/string.classes/typedefs.pass.cpp b/libcxx/test/std/strings/string.classes/typedefs.pass.cpp index 14fe388770511..cbc028391b58f 100644 --- a/libcxx/test/std/strings/string.classes/typedefs.pass.cpp +++ b/libcxx/test/std/strings/string.classes/typedefs.pass.cpp @@ -22,7 +22,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { static_assert((std::is_same >::value), ""); static_assert((std::is_same >::value), ""); @@ -33,4 +33,6 @@ int main() static_assert((std::is_same >::value), ""); static_assert((std::is_same >::value), ""); #endif // _LIBCPP_HAS_NO_UNICODE_CHARS + + return 0; } diff --git a/libcxx/test/std/strings/string.conversions/stod.pass.cpp b/libcxx/test/std/strings/string.conversions/stod.pass.cpp index 9909497e696c7..9456d4e89cf29 100644 --- a/libcxx/test/std/strings/string.conversions/stod.pass.cpp +++ b/libcxx/test/std/strings/string.conversions/stod.pass.cpp @@ -11,6 +11,11 @@ // double stod(const string& str, size_t *idx = 0); // double stod(const wstring& str, size_t *idx = 0); +// When back-deploying to macosx10.7, the RTTI for exception classes +// incorrectly provided by libc++.dylib is mixed with the one in +// libc++abi.dylib and exceptions are not caught properly. +// XFAIL: with_system_cxx_lib=macosx10.7 + #include #include #include @@ -18,7 +23,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { assert(std::stod("0") == 0); assert(std::stod(L"0") == 0); @@ -185,4 +190,6 @@ int main() assert(idx == 0); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/string.conversions/stof.pass.cpp b/libcxx/test/std/strings/string.conversions/stof.pass.cpp index 8e7f4b4ecfc28..2c8e4c9b927d2 100644 --- a/libcxx/test/std/strings/string.conversions/stof.pass.cpp +++ b/libcxx/test/std/strings/string.conversions/stof.pass.cpp @@ -22,7 +22,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { assert(std::stof("0") == 0); assert(std::stof(L"0") == 0); @@ -186,4 +186,6 @@ int main() assert(idx == 0); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/string.conversions/stoi.pass.cpp b/libcxx/test/std/strings/string.conversions/stoi.pass.cpp index 36998336c2e62..6f273321de7cb 100644 --- a/libcxx/test/std/strings/string.conversions/stoi.pass.cpp +++ b/libcxx/test/std/strings/string.conversions/stoi.pass.cpp @@ -11,13 +11,18 @@ // int stoi(const string& str, size_t *idx = 0, int base = 10); // int stoi(const wstring& str, size_t *idx = 0, int base = 10); +// When back-deploying to macosx10.7, the RTTI for exception classes +// incorrectly provided by libc++.dylib is mixed with the one in +// libc++abi.dylib and exceptions are not caught properly. +// XFAIL: with_system_cxx_lib=macosx10.7 + #include #include #include #include "test_macros.h" -int main() +int main(int, char**) { assert(std::stoi("0") == 0); assert(std::stoi(L"0") == 0); @@ -109,4 +114,6 @@ int main() assert(idx == 0); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/string.conversions/stol.pass.cpp b/libcxx/test/std/strings/string.conversions/stol.pass.cpp index 8e18a0088cac9..ef0cbb4ed3c28 100644 --- a/libcxx/test/std/strings/string.conversions/stol.pass.cpp +++ b/libcxx/test/std/strings/string.conversions/stol.pass.cpp @@ -21,7 +21,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { assert(std::stol("0") == 0); assert(std::stol(L"0") == 0); @@ -113,4 +113,6 @@ int main() assert(idx == 0); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/string.conversions/stold.pass.cpp b/libcxx/test/std/strings/string.conversions/stold.pass.cpp index 4677bd7d2eb45..7876440e6e1ba 100644 --- a/libcxx/test/std/strings/string.conversions/stold.pass.cpp +++ b/libcxx/test/std/strings/string.conversions/stold.pass.cpp @@ -11,6 +11,11 @@ // long double stold(const string& str, size_t *idx = 0); // long double stold(const wstring& str, size_t *idx = 0); +// When back-deploying to macosx10.7, the RTTI for exception classes +// incorrectly provided by libc++.dylib is mixed with the one in +// libc++abi.dylib and exceptions are not caught properly. +// XFAIL: with_system_cxx_lib=macosx10.7 + #include #include @@ -19,7 +24,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { assert(std::stold("0") == 0); assert(std::stold(L"0") == 0); @@ -188,4 +193,6 @@ int main() assert(idx == 0); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/string.conversions/stoll.pass.cpp b/libcxx/test/std/strings/string.conversions/stoll.pass.cpp index f8a5a6b0e0fa7..73d5e82015fcf 100644 --- a/libcxx/test/std/strings/string.conversions/stoll.pass.cpp +++ b/libcxx/test/std/strings/string.conversions/stoll.pass.cpp @@ -21,7 +21,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { assert(std::stoll("0") == 0); assert(std::stoll(L"0") == 0); @@ -112,4 +112,6 @@ int main() assert(idx == 0); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/string.conversions/stoul.pass.cpp b/libcxx/test/std/strings/string.conversions/stoul.pass.cpp index e60a6a071ad87..6ef861396cd50 100644 --- a/libcxx/test/std/strings/string.conversions/stoul.pass.cpp +++ b/libcxx/test/std/strings/string.conversions/stoul.pass.cpp @@ -21,7 +21,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { assert(std::stoul("0") == 0); assert(std::stoul(L"0") == 0); @@ -111,4 +111,6 @@ int main() assert(idx == 0); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/string.conversions/stoull.pass.cpp b/libcxx/test/std/strings/string.conversions/stoull.pass.cpp index 32369664d0872..3e21c683af4e3 100644 --- a/libcxx/test/std/strings/string.conversions/stoull.pass.cpp +++ b/libcxx/test/std/strings/string.conversions/stoull.pass.cpp @@ -21,7 +21,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { assert(std::stoull("0") == 0); assert(std::stoull(L"0") == 0); @@ -112,4 +112,6 @@ int main() assert(idx == 0); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/string.conversions/to_string.pass.cpp b/libcxx/test/std/strings/string.conversions/to_string.pass.cpp index 864425134e067..23729cd4f49ed 100644 --- a/libcxx/test/std/strings/string.conversions/to_string.pass.cpp +++ b/libcxx/test/std/strings/string.conversions/to_string.pass.cpp @@ -112,7 +112,7 @@ test_float() } } -int main() +int main(int, char**) { test_signed(); test_signed(); @@ -123,4 +123,6 @@ int main() test_float(); test_float(); test_float(); + + return 0; } diff --git a/libcxx/test/std/strings/string.conversions/to_wstring.pass.cpp b/libcxx/test/std/strings/string.conversions/to_wstring.pass.cpp index 82c3f617b9e07..02a262a0f29ba 100644 --- a/libcxx/test/std/strings/string.conversions/to_wstring.pass.cpp +++ b/libcxx/test/std/strings/string.conversions/to_wstring.pass.cpp @@ -112,7 +112,7 @@ test_float() } } -int main() +int main(int, char**) { test_signed(); test_signed(); @@ -123,4 +123,6 @@ int main() test_float(); test_float(); test_float(); + + return 0; } diff --git a/libcxx/test/std/strings/string.view/char.bad.fail.cpp b/libcxx/test/std/strings/string.view/char.bad.fail.cpp index 3d04cd085c521..522466613caad 100644 --- a/libcxx/test/std/strings/string.view/char.bad.fail.cpp +++ b/libcxx/test/std/strings/string.view/char.bad.fail.cpp @@ -26,7 +26,7 @@ struct NotStandardLayout { int two; }; -int main() +int main(int, char**) { { // array @@ -49,4 +49,6 @@ int main() std::basic_string_view > sv; // expected-error-re@string_view:* {{static_assert failed{{.*}} "Character type of basic_string_view must be standard-layout"}} } + + return 0; } diff --git a/libcxx/test/std/strings/string.view/string.view.access/at.pass.cpp b/libcxx/test/std/strings/string.view/string.view.access/at.pass.cpp index b4b2667bbe28a..3d741c33ffbd0 100644 --- a/libcxx/test/std/strings/string.view/string.view.access/at.pass.cpp +++ b/libcxx/test/std/strings/string.view/string.view.access/at.pass.cpp @@ -36,7 +36,7 @@ void test ( const CharT *s, size_t len ) { #endif } -int main () { +int main(int, char**) { test ( "ABCDE", 5 ); test ( "a", 1 ); @@ -59,4 +59,6 @@ int main () { static_assert ( sv.at(1) == 'B', "" ); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/string.view/string.view.access/back.pass.cpp b/libcxx/test/std/strings/string.view/string.view.access/back.pass.cpp index 8c8fd420d79f8..4505f1cf98180 100644 --- a/libcxx/test/std/strings/string.view/string.view.access/back.pass.cpp +++ b/libcxx/test/std/strings/string.view/string.view.access/back.pass.cpp @@ -24,7 +24,7 @@ bool test ( const CharT *s, size_t len ) { return &sv.back() == s + len - 1; } -int main () { +int main(int, char**) { assert ( test ( "ABCDE", 5 )); assert ( test ( "a", 1 )); @@ -46,4 +46,6 @@ int main () { static_assert ( sv.back() == 'B', "" ); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/string.view/string.view.access/data.pass.cpp b/libcxx/test/std/strings/string.view/string.view.access/data.pass.cpp index 85e02ceb0a757..9ab83dfb2f53a 100644 --- a/libcxx/test/std/strings/string.view/string.view.access/data.pass.cpp +++ b/libcxx/test/std/strings/string.view/string.view.access/data.pass.cpp @@ -27,7 +27,7 @@ void test ( const CharT *s, size_t len ) { #endif } -int main () { +int main(int, char**) { test ( "ABCDE", 5 ); test ( "a", 1 ); @@ -50,4 +50,6 @@ int main () { static_assert( sv.data() == s, "" ); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/string.view/string.view.access/front.pass.cpp b/libcxx/test/std/strings/string.view/string.view.access/front.pass.cpp index 6e73202d67632..554ed1bab1228 100644 --- a/libcxx/test/std/strings/string.view/string.view.access/front.pass.cpp +++ b/libcxx/test/std/strings/string.view/string.view.access/front.pass.cpp @@ -24,7 +24,7 @@ bool test ( const CharT *s, size_t len ) { return &sv.front() == s; } -int main () { +int main(int, char**) { assert ( test ( "ABCDE", 5 )); assert ( test ( "a", 1 )); @@ -46,4 +46,6 @@ int main () { static_assert ( sv.front() == 'A', "" ); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/string.view/string.view.access/index.pass.cpp b/libcxx/test/std/strings/string.view/string.view.access/index.pass.cpp index 87598dffe735c..33992de7c0500 100644 --- a/libcxx/test/std/strings/string.view/string.view.access/index.pass.cpp +++ b/libcxx/test/std/strings/string.view/string.view.access/index.pass.cpp @@ -26,7 +26,7 @@ void test ( const CharT *s, size_t len ) { } } -int main () { +int main(int, char**) { test ( "ABCDE", 5 ); test ( "a", 1 ); @@ -49,4 +49,6 @@ int main () { static_assert ( sv[1] == 'B', "" ); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/string.view/string.view.capacity/capacity.pass.cpp b/libcxx/test/std/strings/string.view/string.view.capacity/capacity.pass.cpp index 93cc762832f2a..025d905a33356 100644 --- a/libcxx/test/std/strings/string.view/string.view.capacity/capacity.pass.cpp +++ b/libcxx/test/std/strings/string.view/string.view.capacity/capacity.pass.cpp @@ -62,7 +62,7 @@ void test2 ( const CharT *s, size_t len ) { } } -int main () { +int main(int, char**) { test1 (); #if defined(__cpp_lib_char8_t) && __cpp_lib_char8_t >= 201811L test1 (); @@ -99,4 +99,6 @@ int main () { test2 ( U"a", 1 ); test2 ( U"", 0 ); #endif + + return 0; } diff --git a/libcxx/test/std/strings/string.view/string.view.capacity/empty.fail.cpp b/libcxx/test/std/strings/string.view/string.view.capacity/empty.fail.cpp index 74bd413020d35..1dd1dcf7cb5b2 100644 --- a/libcxx/test/std/strings/string.view/string.view.capacity/empty.fail.cpp +++ b/libcxx/test/std/strings/string.view/string.view.capacity/empty.fail.cpp @@ -20,8 +20,10 @@ #include "test_macros.h" -int main () +int main(int, char**) { std::string_view c; c.empty(); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} + + return 0; } diff --git a/libcxx/test/std/strings/string.view/string.view.comparison/opeq.string_view.pointer.pass.cpp b/libcxx/test/std/strings/string.view/string.view.comparison/opeq.string_view.pointer.pass.cpp index bb6c34316521f..e771bd328a9f3 100644 --- a/libcxx/test/std/strings/string.view/string.view.comparison/opeq.string_view.pointer.pass.cpp +++ b/libcxx/test/std/strings/string.view/string.view.comparison/opeq.string_view.pointer.pass.cpp @@ -27,7 +27,7 @@ test(S lhs, const typename S::value_type* rhs, bool x) assert((rhs == lhs) == x); } -int main() +int main(int, char**) { { typedef std::string_view S; @@ -65,4 +65,6 @@ int main() static_assert (!("abcde0" == sv2), "" ); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/string.view/string.view.comparison/opeq.string_view.string.pass.cpp b/libcxx/test/std/strings/string.view/string.view.comparison/opeq.string_view.string.pass.cpp index bb142b0b3c31b..d27d4c4458825 100644 --- a/libcxx/test/std/strings/string.view/string.view.comparison/opeq.string_view.string.pass.cpp +++ b/libcxx/test/std/strings/string.view/string.view.comparison/opeq.string_view.string.pass.cpp @@ -25,7 +25,7 @@ test(const std::string &lhs, S rhs, bool x) assert((rhs == lhs) == x); } -int main() +int main(int, char**) { { typedef std::string_view S; @@ -46,5 +46,7 @@ int main() test("abcdefghijklmnopqrst", S("abcdefghij"), false); test("abcdefghijklmnopqrst", S("abcdefghijklmnopqrst"), true); } + + return 0; } diff --git a/libcxx/test/std/strings/string.view/string.view.comparison/opeq.string_view.string_view.pass.cpp b/libcxx/test/std/strings/string.view/string.view.comparison/opeq.string_view.string_view.pass.cpp index d7b113c120b12..259711e3c5267 100644 --- a/libcxx/test/std/strings/string.view/string.view.comparison/opeq.string_view.string_view.pass.cpp +++ b/libcxx/test/std/strings/string.view/string.view.comparison/opeq.string_view.string_view.pass.cpp @@ -26,7 +26,7 @@ test(S lhs, S rhs, bool x) assert((rhs == lhs) == x); } -int main() +int main(int, char**) { { typedef std::string_view S; @@ -58,4 +58,6 @@ int main() static_assert (!(sv1 == sv3), "" ); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/string.view/string.view.comparison/opge.string_view.pointer.pass.cpp b/libcxx/test/std/strings/string.view/string.view.comparison/opge.string_view.pointer.pass.cpp index 4f32425dc49fc..5fa57eb394c50 100644 --- a/libcxx/test/std/strings/string.view/string.view.comparison/opge.string_view.pointer.pass.cpp +++ b/libcxx/test/std/strings/string.view/string.view.comparison/opge.string_view.pointer.pass.cpp @@ -27,7 +27,7 @@ test(const typename S::value_type* lhs, const S& rhs, bool x, bool y) assert((rhs >= lhs) == y); } -int main() +int main(int, char**) { { typedef std::string_view S; @@ -68,4 +68,6 @@ int main() static_assert ( "abcde0" >= sv2, "" ); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/string.view/string.view.comparison/opge.string_view.string.pass.cpp b/libcxx/test/std/strings/string.view/string.view.comparison/opge.string_view.string.pass.cpp index 9cbe389cd486f..dddaa390ed379 100644 --- a/libcxx/test/std/strings/string.view/string.view.comparison/opge.string_view.string.pass.cpp +++ b/libcxx/test/std/strings/string.view/string.view.comparison/opge.string_view.string.pass.cpp @@ -25,7 +25,7 @@ test(const S& lhs, const typename S::value_type* rhs, bool x, bool y) assert((rhs >= lhs) == y); } -int main() +int main(int, char**) { { typedef std::string_view S; @@ -46,4 +46,6 @@ int main() test(S("abcdefghijklmnopqrst"), "abcdefghij", true, false); test(S("abcdefghijklmnopqrst"), "abcdefghijklmnopqrst", true, true); } + + return 0; } diff --git a/libcxx/test/std/strings/string.view/string.view.comparison/opge.string_view.string_view.pass.cpp b/libcxx/test/std/strings/string.view/string.view.comparison/opge.string_view.string_view.pass.cpp index 81fee1f395350..d35bea575c85e 100644 --- a/libcxx/test/std/strings/string.view/string.view.comparison/opge.string_view.string_view.pass.cpp +++ b/libcxx/test/std/strings/string.view/string.view.comparison/opge.string_view.string_view.pass.cpp @@ -26,7 +26,7 @@ test(const S& lhs, const S& rhs, bool x, bool y) assert((rhs >= lhs) == y); } -int main() +int main(int, char**) { { typedef std::string_view S; @@ -61,4 +61,6 @@ int main() static_assert ( sv2 >= sv1, "" ); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/string.view/string.view.comparison/opgt.string_view.pointer.pass.cpp b/libcxx/test/std/strings/string.view/string.view.comparison/opgt.string_view.pointer.pass.cpp index c295645a9b721..80dcc7b497b9a 100644 --- a/libcxx/test/std/strings/string.view/string.view.comparison/opgt.string_view.pointer.pass.cpp +++ b/libcxx/test/std/strings/string.view/string.view.comparison/opgt.string_view.pointer.pass.cpp @@ -27,7 +27,7 @@ test(const typename S::value_type* lhs, const S& rhs, bool x, bool y) assert((rhs > lhs) == y); } -int main() +int main(int, char**) { { typedef std::string_view S; @@ -68,4 +68,6 @@ int main() static_assert ( "abcde0" > sv2, "" ); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/string.view/string.view.comparison/opgt.string_view.string.pass.cpp b/libcxx/test/std/strings/string.view/string.view.comparison/opgt.string_view.string.pass.cpp index b07b6a7aca2ce..84c9478bfc5d5 100644 --- a/libcxx/test/std/strings/string.view/string.view.comparison/opgt.string_view.string.pass.cpp +++ b/libcxx/test/std/strings/string.view/string.view.comparison/opgt.string_view.string.pass.cpp @@ -25,7 +25,7 @@ test(const S& lhs, const typename S::value_type* rhs, bool x, bool y) assert((rhs > lhs) == y); } -int main() +int main(int, char**) { { typedef std::string_view S; @@ -46,4 +46,6 @@ int main() test(S("abcdefghijklmnopqrst"), "abcdefghij", true, false); test(S("abcdefghijklmnopqrst"), "abcdefghijklmnopqrst", false, false); } + + return 0; } diff --git a/libcxx/test/std/strings/string.view/string.view.comparison/opgt.string_view.string_view.pass.cpp b/libcxx/test/std/strings/string.view/string.view.comparison/opgt.string_view.string_view.pass.cpp index 984f2c6a32ee8..ec31d5c2c1dbc 100644 --- a/libcxx/test/std/strings/string.view/string.view.comparison/opgt.string_view.string_view.pass.cpp +++ b/libcxx/test/std/strings/string.view/string.view.comparison/opgt.string_view.string_view.pass.cpp @@ -26,7 +26,7 @@ test(const S& lhs, const S& rhs, bool x, bool y) assert((rhs > lhs) == y); } -int main() +int main(int, char**) { { typedef std::string_view S; @@ -61,4 +61,6 @@ int main() static_assert ( sv2 > sv1, "" ); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/string.view/string.view.comparison/ople.string_view.pointer.pass.cpp b/libcxx/test/std/strings/string.view/string.view.comparison/ople.string_view.pointer.pass.cpp index 81d0d167a0006..4f582239a83ff 100644 --- a/libcxx/test/std/strings/string.view/string.view.comparison/ople.string_view.pointer.pass.cpp +++ b/libcxx/test/std/strings/string.view/string.view.comparison/ople.string_view.pointer.pass.cpp @@ -27,7 +27,7 @@ test(const typename S::value_type* lhs, const S& rhs, bool x, bool y) assert((rhs <= lhs) == y); } -int main() +int main(int, char**) { { typedef std::string_view S; @@ -68,4 +68,6 @@ int main() static_assert (!("abcde0" <= sv2), "" ); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/string.view/string.view.comparison/ople.string_view.string.pass.cpp b/libcxx/test/std/strings/string.view/string.view.comparison/ople.string_view.string.pass.cpp index 3cdb0215e48fc..80e80757bf9f5 100644 --- a/libcxx/test/std/strings/string.view/string.view.comparison/ople.string_view.string.pass.cpp +++ b/libcxx/test/std/strings/string.view/string.view.comparison/ople.string_view.string.pass.cpp @@ -25,7 +25,7 @@ test(const S& lhs, const typename S::value_type* rhs, bool x, bool y) assert((rhs <= lhs) == y); } -int main() +int main(int, char**) { { typedef std::string_view S; @@ -46,4 +46,6 @@ int main() test(S("abcdefghijklmnopqrst"), "abcdefghij", false, true); test(S("abcdefghijklmnopqrst"), "abcdefghijklmnopqrst", true, true); } + + return 0; } diff --git a/libcxx/test/std/strings/string.view/string.view.comparison/ople.string_view.string_view.pass.cpp b/libcxx/test/std/strings/string.view/string.view.comparison/ople.string_view.string_view.pass.cpp index 3ec0222f66f08..b1c186124250b 100644 --- a/libcxx/test/std/strings/string.view/string.view.comparison/ople.string_view.string_view.pass.cpp +++ b/libcxx/test/std/strings/string.view/string.view.comparison/ople.string_view.string_view.pass.cpp @@ -26,7 +26,7 @@ test(const S& lhs, const S& rhs, bool x, bool y) assert((rhs <= lhs) == y); } -int main() +int main(int, char**) { { typedef std::string_view S; @@ -61,4 +61,6 @@ int main() static_assert (!(sv2 <= sv1), "" ); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/string.view/string.view.comparison/oplt.string_view.pointer.pass.cpp b/libcxx/test/std/strings/string.view/string.view.comparison/oplt.string_view.pointer.pass.cpp index f8093c86a73fc..14bba2abfe6f4 100644 --- a/libcxx/test/std/strings/string.view/string.view.comparison/oplt.string_view.pointer.pass.cpp +++ b/libcxx/test/std/strings/string.view/string.view.comparison/oplt.string_view.pointer.pass.cpp @@ -27,7 +27,7 @@ test(const typename S::value_type* lhs, const S& rhs, bool x, bool y) assert((rhs < lhs) == y); } -int main() +int main(int, char**) { { typedef std::string_view S; @@ -68,4 +68,6 @@ int main() static_assert (!("abcde0" < sv2), "" ); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/string.view/string.view.comparison/oplt.string_view.string.pass.cpp b/libcxx/test/std/strings/string.view/string.view.comparison/oplt.string_view.string.pass.cpp index e7341f17d1f74..f611bac7a846b 100644 --- a/libcxx/test/std/strings/string.view/string.view.comparison/oplt.string_view.string.pass.cpp +++ b/libcxx/test/std/strings/string.view/string.view.comparison/oplt.string_view.string.pass.cpp @@ -25,7 +25,7 @@ test(const S& lhs, const typename S::value_type* rhs, bool x, bool y) assert((rhs < lhs) == y); } -int main() +int main(int, char**) { { typedef std::string_view S; @@ -46,4 +46,6 @@ int main() test(S("abcdefghijklmnopqrst"), "abcdefghij", false, true); test(S("abcdefghijklmnopqrst"), "abcdefghijklmnopqrst", false, false); } + + return 0; } diff --git a/libcxx/test/std/strings/string.view/string.view.comparison/oplt.string_view.string_view.pass.cpp b/libcxx/test/std/strings/string.view/string.view.comparison/oplt.string_view.string_view.pass.cpp index a7e51f9af8c52..f44e373619ad6 100644 --- a/libcxx/test/std/strings/string.view/string.view.comparison/oplt.string_view.string_view.pass.cpp +++ b/libcxx/test/std/strings/string.view/string.view.comparison/oplt.string_view.string_view.pass.cpp @@ -26,7 +26,7 @@ test(const S& lhs, const S& rhs, bool x, bool y) assert((rhs < lhs) == y); } -int main() +int main(int, char**) { { typedef std::string_view S; @@ -61,4 +61,6 @@ int main() static_assert (!(sv2 < sv1), "" ); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/string.view/string.view.comparison/opne.string_view.pointer.pass.cpp b/libcxx/test/std/strings/string.view/string.view.comparison/opne.string_view.pointer.pass.cpp index 1531626a88463..6b8add831469d 100644 --- a/libcxx/test/std/strings/string.view/string.view.comparison/opne.string_view.pointer.pass.cpp +++ b/libcxx/test/std/strings/string.view/string.view.comparison/opne.string_view.pointer.pass.cpp @@ -27,7 +27,7 @@ test(S lhs, const typename S::value_type* rhs, bool x) assert((rhs != lhs) == x); } -int main() +int main(int, char**) { { typedef std::string_view S; @@ -66,4 +66,6 @@ int main() static_assert ( "abcde0" != sv2, "" ); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/string.view/string.view.comparison/opne.string_view.string.pass.cpp b/libcxx/test/std/strings/string.view/string.view.comparison/opne.string_view.string.pass.cpp index 8e5539a80795c..613eaf7b32f9c 100644 --- a/libcxx/test/std/strings/string.view/string.view.comparison/opne.string_view.string.pass.cpp +++ b/libcxx/test/std/strings/string.view/string.view.comparison/opne.string_view.string.pass.cpp @@ -25,7 +25,7 @@ test(const std::string &lhs, S rhs, bool x) assert((rhs != lhs) == x); } -int main() +int main(int, char**) { { typedef std::string_view S; @@ -46,4 +46,6 @@ int main() test("abcdefghijklmnopqrst", S("abcdefghij"), true); test("abcdefghijklmnopqrst", S("abcdefghijklmnopqrst"), false); } + + return 0; } diff --git a/libcxx/test/std/strings/string.view/string.view.comparison/opne.string_view.string_view.pass.cpp b/libcxx/test/std/strings/string.view/string.view.comparison/opne.string_view.string_view.pass.cpp index 0e01e94db4334..90d153335ff06 100644 --- a/libcxx/test/std/strings/string.view/string.view.comparison/opne.string_view.string_view.pass.cpp +++ b/libcxx/test/std/strings/string.view/string.view.comparison/opne.string_view.string_view.pass.cpp @@ -26,7 +26,7 @@ test(S lhs, S rhs, bool x) assert((rhs != lhs) == x); } -int main() +int main(int, char**) { { typedef std::string_view S; @@ -58,4 +58,6 @@ int main() static_assert ( sv1 != sv3, "" ); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/string.view/string.view.cons/assign.pass.cpp b/libcxx/test/std/strings/string.view/string.view.cons/assign.pass.cpp index 8247c53c73902..b2bf8ed7198b3 100644 --- a/libcxx/test/std/strings/string.view/string.view.cons/assign.pass.cpp +++ b/libcxx/test/std/strings/string.view/string.view.cons/assign.pass.cpp @@ -29,7 +29,7 @@ bool test (T sv0) return sv0.size() == sv1.size() && sv0.data() == sv1.data(); } -int main () { +int main(int, char**) { assert( test ( "1234")); #if defined(__cpp_lib_char8_t) && __cpp_lib_char8_t >= 201811L @@ -54,4 +54,6 @@ int main () { #endif static_assert( test ({ L"abc", 3}), ""); #endif + + return 0; } diff --git a/libcxx/test/std/strings/string.view/string.view.cons/default.pass.cpp b/libcxx/test/std/strings/string.view/string.view.cons/default.pass.cpp index fe1fa97401210..07a453b2369bc 100644 --- a/libcxx/test/std/strings/string.view/string.view.cons/default.pass.cpp +++ b/libcxx/test/std/strings/string.view/string.view.cons/default.pass.cpp @@ -35,7 +35,7 @@ void test () { } } -int main () { +int main(int, char**) { test (); test (); #if defined(__cpp_lib_char8_t) && __cpp_lib_char8_t >= 201811L @@ -44,4 +44,6 @@ int main () { test (); test (); + + return 0; } diff --git a/libcxx/test/std/strings/string.view/string.view.cons/from_literal.pass.cpp b/libcxx/test/std/strings/string.view/string.view.cons/from_literal.pass.cpp index 7430f4ad6b53e..bcd83da74c67a 100644 --- a/libcxx/test/std/strings/string.view/string.view.cons/from_literal.pass.cpp +++ b/libcxx/test/std/strings/string.view/string.view.cons/from_literal.pass.cpp @@ -39,7 +39,7 @@ void test ( const CharT *s ) { } -int main () { +int main(int, char**) { test ( "QBCDE" ); test ( "A" ); @@ -65,4 +65,6 @@ int main () { static_assert ( sv1.size() == 5, ""); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/string.view/string.view.cons/from_ptr_len.pass.cpp b/libcxx/test/std/strings/string.view/string.view.cons/from_ptr_len.pass.cpp index 8ad0449aaca7c..92ae675a399ab 100644 --- a/libcxx/test/std/strings/string.view/string.view.cons/from_ptr_len.pass.cpp +++ b/libcxx/test/std/strings/string.view/string.view.cons/from_ptr_len.pass.cpp @@ -31,7 +31,7 @@ void test ( const CharT *s, size_t sz ) { } } -int main () { +int main(int, char**) { test ( "QBCDE", 5 ); test ( "QBCDE", 2 ); @@ -82,4 +82,6 @@ int main () { } #endif #endif + + return 0; } diff --git a/libcxx/test/std/strings/string.view/string.view.cons/from_string.pass.cpp b/libcxx/test/std/strings/string.view/string.view.cons/from_string.pass.cpp index 5e4a2d31908bd..2043d662a7a0a 100644 --- a/libcxx/test/std/strings/string.view/string.view.cons/from_string.pass.cpp +++ b/libcxx/test/std/strings/string.view/string.view.cons/from_string.pass.cpp @@ -31,7 +31,7 @@ void test ( const std::basic_string &str ) { assert ( sv1.data() == str.data()); } -int main () { +int main(int, char**) { test ( std::string("QBCDE") ); test ( std::string("") ); @@ -61,4 +61,6 @@ int main () { test ( std::basic_string("") ); test ( std::basic_string() ); + + return 0; } diff --git a/libcxx/test/std/strings/string.view/string.view.cons/from_string1.fail.cpp b/libcxx/test/std/strings/string.view/string.view.cons/from_string1.fail.cpp index 343600625e8f9..3c464d7fe3ebe 100644 --- a/libcxx/test/std/strings/string.view/string.view.cons/from_string1.fail.cpp +++ b/libcxx/test/std/strings/string.view/string.view.cons/from_string1.fail.cpp @@ -18,7 +18,7 @@ struct dummy_char_traits : public std::char_traits {}; -int main () { +int main(int, char**) { using string_view = std::basic_string_view; using string = std:: basic_string ; @@ -28,4 +28,6 @@ int main () { assert ( sv1.size() == s.size()); assert ( sv1.data() == s.data()); } + + return 0; } diff --git a/libcxx/test/std/strings/string.view/string.view.cons/from_string2.fail.cpp b/libcxx/test/std/strings/string.view/string.view.cons/from_string2.fail.cpp index 2a0544defeac1..482d220013b0c 100644 --- a/libcxx/test/std/strings/string.view/string.view.cons/from_string2.fail.cpp +++ b/libcxx/test/std/strings/string.view/string.view.cons/from_string2.fail.cpp @@ -18,7 +18,7 @@ struct dummy_char_traits : public std::char_traits {}; -int main () { +int main(int, char**) { using string_view = std::basic_string_view; using string = std:: basic_string ; @@ -28,4 +28,6 @@ int main () { assert ( sv1.size() == s.size()); assert ( sv1.data() == s.data()); } + + return 0; } diff --git a/libcxx/test/std/strings/string.view/string.view.cons/implicit_deduction_guides.pass.cpp b/libcxx/test/std/strings/string.view/string.view.cons/implicit_deduction_guides.pass.cpp index 3f1f562a4752a..b95dca63dfdcf 100644 --- a/libcxx/test/std/strings/string.view/string.view.cons/implicit_deduction_guides.pass.cpp +++ b/libcxx/test/std/strings/string.view/string.view.cons/implicit_deduction_guides.pass.cpp @@ -26,7 +26,7 @@ // (2) basic_string_view(const basic_string_view&) // (3) basic_string_view(const CharT*, size_type) // (4) basic_string_view(const CharT*) -int main() +int main(int, char**) { { // Testing (1) // Nothing TODO. Cannot deduce without any arguments. @@ -61,4 +61,6 @@ int main() ASSERT_SAME_TYPE(decltype(w), std::wstring_view); assert(w == L"abcdef"); } + + return 0; } diff --git a/libcxx/test/std/strings/string.view/string.view.find/find_char_size.pass.cpp b/libcxx/test/std/strings/string.view/string.view.find/find_char_size.pass.cpp index 8898d11afbff2..82173a93a8841 100644 --- a/libcxx/test/std/strings/string.view/string.view.find/find_char_size.pass.cpp +++ b/libcxx/test/std/strings/string.view/string.view.find/find_char_size.pass.cpp @@ -35,7 +35,7 @@ test(const S& s, typename S::value_type c, typename S::size_type x) assert(0 <= x && x + 1 <= s.size()); } -int main() +int main(int, char**) { { typedef std::string_view S; @@ -81,4 +81,6 @@ int main() static_assert (sv2.find( 'c', 4 ) == SV::npos, "" ); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/string.view/string.view.find/find_first_not_of_char_size.pass.cpp b/libcxx/test/std/strings/string.view/string.view.find/find_first_not_of_char_size.pass.cpp index aae4048ac5282..4566adabfd3c8 100644 --- a/libcxx/test/std/strings/string.view/string.view.find/find_first_not_of_char_size.pass.cpp +++ b/libcxx/test/std/strings/string.view/string.view.find/find_first_not_of_char_size.pass.cpp @@ -35,7 +35,7 @@ test(const S& s, typename S::value_type c, typename S::size_type x) assert(x < s.size()); } -int main() +int main(int, char**) { { typedef std::string_view S; @@ -81,4 +81,6 @@ int main() static_assert (sv2.find_first_not_of( 'q', 5 ) == SV::npos, "" ); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/string.view/string.view.find/find_first_not_of_pointer_size.pass.cpp b/libcxx/test/std/strings/string.view/string.view.find/find_first_not_of_pointer_size.pass.cpp index 0020e60b80181..17c3c5293f057 100644 --- a/libcxx/test/std/strings/string.view/string.view.find/find_first_not_of_pointer_size.pass.cpp +++ b/libcxx/test/std/strings/string.view/string.view.find/find_first_not_of_pointer_size.pass.cpp @@ -141,7 +141,7 @@ void test1() test(S("pniotcfrhqsmgdkjbael"), "htaobedqikfplcgjsmrn", S::npos); } -int main() +int main(int, char**) { { typedef std::string_view S; @@ -162,4 +162,6 @@ int main() static_assert (sv2.find_first_not_of( "lecar", 0) == 1, "" ); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/string.view/string.view.find/find_first_not_of_pointer_size_size.pass.cpp b/libcxx/test/std/strings/string.view/string.view.find/find_first_not_of_pointer_size_size.pass.cpp index 52f0696769394..707a7a96439bd 100644 --- a/libcxx/test/std/strings/string.view/string.view.find/find_first_not_of_pointer_size_size.pass.cpp +++ b/libcxx/test/std/strings/string.view/string.view.find/find_first_not_of_pointer_size_size.pass.cpp @@ -366,7 +366,7 @@ void test3() test(S("hnbrcplsjfgiktoedmaq"), "qprlsfojamgndekthibc", 21, 20, S::npos); } -int main() +int main(int, char**) { { typedef std::string_view S; @@ -389,4 +389,6 @@ int main() static_assert (sv2.find_first_not_of( "lecar", 0, 5) == 1, "" ); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/string.view/string.view.find/find_first_not_of_string_view_size.pass.cpp b/libcxx/test/std/strings/string.view/string.view.find/find_first_not_of_string_view_size.pass.cpp index 9378c6a0f45e2..37445b578c72b 100644 --- a/libcxx/test/std/strings/string.view/string.view.find/find_first_not_of_string_view_size.pass.cpp +++ b/libcxx/test/std/strings/string.view/string.view.find/find_first_not_of_string_view_size.pass.cpp @@ -137,11 +137,13 @@ void test1() test(S("pniotcfrhqsmgdkjbael"), S("htaobedqikfplcgjsmrn"), S::npos); } -int main() +int main(int, char**) { { typedef std::string_view S; test0(); test1(); } + + return 0; } diff --git a/libcxx/test/std/strings/string.view/string.view.find/find_first_of_char_size.pass.cpp b/libcxx/test/std/strings/string.view/string.view.find/find_first_of_char_size.pass.cpp index 6be6ddcd99c8e..d4916bec32fe3 100644 --- a/libcxx/test/std/strings/string.view/string.view.find/find_first_of_char_size.pass.cpp +++ b/libcxx/test/std/strings/string.view/string.view.find/find_first_of_char_size.pass.cpp @@ -35,7 +35,7 @@ test(const S& s, typename S::value_type c, typename S::size_type x) assert(x < s.size()); } -int main() +int main(int, char**) { { typedef std::string_view S; @@ -79,4 +79,6 @@ int main() static_assert (sv2.find_first_of( 'e', 5 ) == SV::npos, "" ); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/string.view/string.view.find/find_first_of_pointer_size.pass.cpp b/libcxx/test/std/strings/string.view/string.view.find/find_first_of_pointer_size.pass.cpp index bc3ea554bdedd..7e43109afdd90 100644 --- a/libcxx/test/std/strings/string.view/string.view.find/find_first_of_pointer_size.pass.cpp +++ b/libcxx/test/std/strings/string.view/string.view.find/find_first_of_pointer_size.pass.cpp @@ -141,7 +141,7 @@ void test1() test(S("pniotcfrhqsmgdkjbael"), "htaobedqikfplcgjsmrn", 0); } -int main() +int main(int, char**) { { typedef std::string_view S; @@ -162,4 +162,6 @@ int main() static_assert (sv2.find_first_of( "lecar", 0) == 0, "" ); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/string.view/string.view.find/find_first_of_pointer_size_size.pass.cpp b/libcxx/test/std/strings/string.view/string.view.find/find_first_of_pointer_size_size.pass.cpp index cd978436eb5be..165fb2362ae7e 100644 --- a/libcxx/test/std/strings/string.view/string.view.find/find_first_of_pointer_size_size.pass.cpp +++ b/libcxx/test/std/strings/string.view/string.view.find/find_first_of_pointer_size_size.pass.cpp @@ -366,7 +366,7 @@ void test3() test(S("hnbrcplsjfgiktoedmaq"), "qprlsfojamgndekthibc", 21, 20, S::npos); } -int main() +int main(int, char**) { { typedef std::string_view S; @@ -389,4 +389,6 @@ int main() static_assert (sv2.find_first_of( "lecar", 0, 5) == 0, "" ); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/string.view/string.view.find/find_first_of_string_view_size.pass.cpp b/libcxx/test/std/strings/string.view/string.view.find/find_first_of_string_view_size.pass.cpp index 545f4e51508d1..c705f0266d867 100644 --- a/libcxx/test/std/strings/string.view/string.view.find/find_first_of_string_view_size.pass.cpp +++ b/libcxx/test/std/strings/string.view/string.view.find/find_first_of_string_view_size.pass.cpp @@ -137,11 +137,13 @@ void test1() test(S("pniotcfrhqsmgdkjbael"), S("htaobedqikfplcgjsmrn"), 0); } -int main() +int main(int, char**) { { typedef std::string_view S; test0(); test1(); } + + return 0; } diff --git a/libcxx/test/std/strings/string.view/string.view.find/find_last_not_of_char_size.pass.cpp b/libcxx/test/std/strings/string.view/string.view.find/find_last_not_of_char_size.pass.cpp index 8d80557d4c554..0b6e6cfb0fa61 100644 --- a/libcxx/test/std/strings/string.view/string.view.find/find_last_not_of_char_size.pass.cpp +++ b/libcxx/test/std/strings/string.view/string.view.find/find_last_not_of_char_size.pass.cpp @@ -35,7 +35,7 @@ test(const S& s, typename S::value_type c, typename S::size_type x) assert(x < s.size()); } -int main() +int main(int, char**) { { typedef std::string_view S; @@ -79,4 +79,6 @@ int main() static_assert (sv2.find_last_not_of( 'e', 5 ) == 3, "" ); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/string.view/string.view.find/find_last_not_of_pointer_size.pass.cpp b/libcxx/test/std/strings/string.view/string.view.find/find_last_not_of_pointer_size.pass.cpp index f7daf3fa3bd27..fe17b779dd9a6 100644 --- a/libcxx/test/std/strings/string.view/string.view.find/find_last_not_of_pointer_size.pass.cpp +++ b/libcxx/test/std/strings/string.view/string.view.find/find_last_not_of_pointer_size.pass.cpp @@ -141,7 +141,7 @@ void test1() test(S("pniotcfrhqsmgdkjbael"), "htaobedqikfplcgjsmrn", S::npos); } -int main() +int main(int, char**) { { typedef std::string_view S; @@ -162,4 +162,6 @@ int main() static_assert (sv2.find_last_not_of( "lecar", 5) == 3, "" ); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/string.view/string.view.find/find_last_not_of_pointer_size_size.pass.cpp b/libcxx/test/std/strings/string.view/string.view.find/find_last_not_of_pointer_size_size.pass.cpp index 8fd255395252d..11a5c27e8da5f 100644 --- a/libcxx/test/std/strings/string.view/string.view.find/find_last_not_of_pointer_size_size.pass.cpp +++ b/libcxx/test/std/strings/string.view/string.view.find/find_last_not_of_pointer_size_size.pass.cpp @@ -366,7 +366,7 @@ void test3() test(S("hnbrcplsjfgiktoedmaq"), "qprlsfojamgndekthibc", 21, 20, S::npos); } -int main() +int main(int, char**) { { typedef std::string_view S; @@ -389,4 +389,6 @@ int main() static_assert (sv2.find_last_not_of( "lecar", 5, 0) == 4, "" ); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/string.view/string.view.find/find_last_not_of_string_view_size.pass.cpp b/libcxx/test/std/strings/string.view/string.view.find/find_last_not_of_string_view_size.pass.cpp index 06a31a1d6614e..e90e38c0d7085 100644 --- a/libcxx/test/std/strings/string.view/string.view.find/find_last_not_of_string_view_size.pass.cpp +++ b/libcxx/test/std/strings/string.view/string.view.find/find_last_not_of_string_view_size.pass.cpp @@ -137,11 +137,13 @@ void test1() test(S("pniotcfrhqsmgdkjbael"), S("htaobedqikfplcgjsmrn"), S::npos); } -int main() +int main(int, char**) { { typedef std::string_view S; test0(); test1(); } + + return 0; } diff --git a/libcxx/test/std/strings/string.view/string.view.find/find_last_of_char_size.pass.cpp b/libcxx/test/std/strings/string.view/string.view.find/find_last_of_char_size.pass.cpp index 147e191b23773..fdcf3173671cb 100644 --- a/libcxx/test/std/strings/string.view/string.view.find/find_last_of_char_size.pass.cpp +++ b/libcxx/test/std/strings/string.view/string.view.find/find_last_of_char_size.pass.cpp @@ -35,7 +35,7 @@ test(const S& s, typename S::value_type c, typename S::size_type x) assert(x < s.size()); } -int main() +int main(int, char**) { { typedef std::string_view S; @@ -79,4 +79,6 @@ int main() static_assert (sv2.find_last_of( 'e', 5 ) == 4, "" ); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/string.view/string.view.find/find_last_of_pointer_size.pass.cpp b/libcxx/test/std/strings/string.view/string.view.find/find_last_of_pointer_size.pass.cpp index 5a12718314cee..640f48375965f 100644 --- a/libcxx/test/std/strings/string.view/string.view.find/find_last_of_pointer_size.pass.cpp +++ b/libcxx/test/std/strings/string.view/string.view.find/find_last_of_pointer_size.pass.cpp @@ -141,7 +141,7 @@ void test1() test(S("pniotcfrhqsmgdkjbael"), "htaobedqikfplcgjsmrn", 19); } -int main() +int main(int, char**) { { typedef std::string_view S; @@ -162,4 +162,6 @@ int main() static_assert (sv2.find_last_of( "lecar", 5) == 4, "" ); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/string.view/string.view.find/find_last_of_pointer_size_size.pass.cpp b/libcxx/test/std/strings/string.view/string.view.find/find_last_of_pointer_size_size.pass.cpp index 984029826912c..e82c935b5ff73 100644 --- a/libcxx/test/std/strings/string.view/string.view.find/find_last_of_pointer_size_size.pass.cpp +++ b/libcxx/test/std/strings/string.view/string.view.find/find_last_of_pointer_size_size.pass.cpp @@ -366,7 +366,7 @@ void test3() test(S("hnbrcplsjfgiktoedmaq"), "qprlsfojamgndekthibc", 21, 20, 19); } -int main() +int main(int, char**) { { typedef std::string_view S; @@ -389,4 +389,6 @@ int main() static_assert (sv2.find_last_of( "lecar", 5, 5) == 4, "" ); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/string.view/string.view.find/find_last_of_string_view_size.pass.cpp b/libcxx/test/std/strings/string.view/string.view.find/find_last_of_string_view_size.pass.cpp index 84b5a96df5d70..02c1184eec8a7 100644 --- a/libcxx/test/std/strings/string.view/string.view.find/find_last_of_string_view_size.pass.cpp +++ b/libcxx/test/std/strings/string.view/string.view.find/find_last_of_string_view_size.pass.cpp @@ -137,11 +137,13 @@ void test1() test(S("pniotcfrhqsmgdkjbael"), S("htaobedqikfplcgjsmrn"), 19); } -int main() +int main(int, char**) { { typedef std::string_view S; test0(); test1(); } + + return 0; } diff --git a/libcxx/test/std/strings/string.view/string.view.find/find_pointer_size.pass.cpp b/libcxx/test/std/strings/string.view/string.view.find/find_pointer_size.pass.cpp index 2be32a46a95fd..3f4fee54ef49b 100644 --- a/libcxx/test/std/strings/string.view/string.view.find/find_pointer_size.pass.cpp +++ b/libcxx/test/std/strings/string.view/string.view.find/find_pointer_size.pass.cpp @@ -147,7 +147,7 @@ void test1() test(S("abcdeabcdeabcdeabcde"), "abcdeabcdeabcdeabcde", 0); } -int main() +int main(int, char**) { { typedef std::string_view S; @@ -168,4 +168,6 @@ int main() static_assert (sv2.find( "abcde", 1) == SV::npos, "" ); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/string.view/string.view.find/find_pointer_size_size.pass.cpp b/libcxx/test/std/strings/string.view/string.view.find/find_pointer_size_size.pass.cpp index 0f7d295a4a56a..74caa6fea7b96 100644 --- a/libcxx/test/std/strings/string.view/string.view.find/find_pointer_size_size.pass.cpp +++ b/libcxx/test/std/strings/string.view/string.view.find/find_pointer_size_size.pass.cpp @@ -366,7 +366,7 @@ void test3() test(S("abcdeabcdeabcdeabcde"), "abcdeabcdeabcdeabcde", 21, 20, S::npos); } -int main() +int main(int, char**) { { typedef std::string_view S; @@ -390,4 +390,6 @@ int main() static_assert (sv2.find( "abcde", 0, 1 ) == 0, "" ); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/string.view/string.view.find/find_string_view_size.pass.cpp b/libcxx/test/std/strings/string.view/string.view.find/find_string_view_size.pass.cpp index 0a5cec54eda76..ed3b7c11c0240 100644 --- a/libcxx/test/std/strings/string.view/string.view.find/find_string_view_size.pass.cpp +++ b/libcxx/test/std/strings/string.view/string.view.find/find_string_view_size.pass.cpp @@ -140,7 +140,7 @@ void test1() test(S("abcdeabcdeabcdeabcde"), S("abcdeabcdeabcdeabcde"), 0); } -int main() +int main(int, char**) { { typedef std::string_view S; @@ -161,4 +161,6 @@ int main() static_assert (sv2.find(sv2, 1 ) == SV::npos, "" ); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/string.view/string.view.find/rfind_char_size.pass.cpp b/libcxx/test/std/strings/string.view/string.view.find/rfind_char_size.pass.cpp index 62f50ed878611..959bb05f87115 100644 --- a/libcxx/test/std/strings/string.view/string.view.find/rfind_char_size.pass.cpp +++ b/libcxx/test/std/strings/string.view/string.view.find/rfind_char_size.pass.cpp @@ -34,7 +34,7 @@ test(const S& s, typename S::value_type c, typename S::size_type x) assert(x + 1 <= s.size()); } -int main() +int main(int, char**) { { typedef std::string_view S; @@ -80,4 +80,6 @@ int main() static_assert (sv2.rfind( 'b', 4 ) == 1, "" ); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/string.view/string.view.find/rfind_pointer_size.pass.cpp b/libcxx/test/std/strings/string.view/string.view.find/rfind_pointer_size.pass.cpp index 0ff2be51fc10e..6010083ab1489 100644 --- a/libcxx/test/std/strings/string.view/string.view.find/rfind_pointer_size.pass.cpp +++ b/libcxx/test/std/strings/string.view/string.view.find/rfind_pointer_size.pass.cpp @@ -147,7 +147,7 @@ void test1() test(S("abcdeabcdeabcdeabcde"), "abcdeabcdeabcdeabcde", 0); } -int main() +int main(int, char**) { { typedef std::string_view S; @@ -168,4 +168,6 @@ int main() static_assert (sv2.rfind( "abcde", 1) == 0, "" ); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/string.view/string.view.find/rfind_pointer_size_size.pass.cpp b/libcxx/test/std/strings/string.view/string.view.find/rfind_pointer_size_size.pass.cpp index 18fd8437d7e96..c3ca97e7ff97d 100644 --- a/libcxx/test/std/strings/string.view/string.view.find/rfind_pointer_size_size.pass.cpp +++ b/libcxx/test/std/strings/string.view/string.view.find/rfind_pointer_size_size.pass.cpp @@ -365,7 +365,7 @@ void test3() test(S("abcdeabcdeabcdeabcde"), "abcdeabcdeabcdeabcde", 21, 20, 0); } -int main() +int main(int, char**) { { typedef std::string_view S; @@ -389,4 +389,6 @@ int main() static_assert (sv2.rfind( "abcde", 0, 1 ) == 0, "" ); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/string.view/string.view.find/rfind_string_view_size.pass.cpp b/libcxx/test/std/strings/string.view/string.view.find/rfind_string_view_size.pass.cpp index dfc4a83614954..c4ceef331361b 100644 --- a/libcxx/test/std/strings/string.view/string.view.find/rfind_string_view_size.pass.cpp +++ b/libcxx/test/std/strings/string.view/string.view.find/rfind_string_view_size.pass.cpp @@ -140,7 +140,7 @@ void test1() test(S("abcdeabcdeabcdeabcde"), S("abcdeabcdeabcdeabcde"), 0); } -int main() +int main(int, char**) { { typedef std::string_view S; @@ -161,4 +161,6 @@ int main() static_assert (sv2.rfind(sv2, 1) == 0, "" ); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/string.view/string.view.hash/enabled_hashes.pass.cpp b/libcxx/test/std/strings/string.view/string.view.hash/enabled_hashes.pass.cpp index 21dcbdf30390c..d52f16303b6ab 100644 --- a/libcxx/test/std/strings/string.view/string.view.hash/enabled_hashes.pass.cpp +++ b/libcxx/test/std/strings/string.view/string.view.hash/enabled_hashes.pass.cpp @@ -17,7 +17,7 @@ #include "poisoned_hash_helper.hpp" -int main() { +int main(int, char**) { test_library_hash_specializations_available(); { test_hash_enabled_for_type(); @@ -30,4 +30,6 @@ int main() { test_hash_enabled_for_type(); #endif } + + return 0; } diff --git a/libcxx/test/std/strings/string.view/string.view.hash/string_view.pass.cpp b/libcxx/test/std/strings/string.view/string.view.hash/string_view.pass.cpp index 7cb7754038ccc..0e296f2096dc0 100644 --- a/libcxx/test/std/strings/string.view/string.view.hash/string_view.pass.cpp +++ b/libcxx/test/std/strings/string.view/string.view.hash/string_view.pass.cpp @@ -55,7 +55,7 @@ test() assert(sh(ss2) == h(s2)); } -int main() +int main(int, char**) { test(); #if defined(__cpp_lib_char8_t) && __cpp_lib_char8_t >= 201811L @@ -66,4 +66,6 @@ int main() test(); #endif // _LIBCPP_HAS_NO_UNICODE_CHARS test(); + + return 0; } diff --git a/libcxx/test/std/strings/string.view/string.view.io/stream_insert.pass.cpp b/libcxx/test/std/strings/string.view/string.view.io/stream_insert.pass.cpp index c721b2fcfe3b0..d4dcbdc6b0a7d 100644 --- a/libcxx/test/std/strings/string.view/string.view.io/stream_insert.pass.cpp +++ b/libcxx/test/std/strings/string.view/string.view.io/stream_insert.pass.cpp @@ -20,7 +20,7 @@ using std::string_view; using std::wstring_view; -int main() +int main(int, char**) { { std::ostringstream out; @@ -54,4 +54,6 @@ int main() assert(out.good()); assert(L" " + s == out.str()); } + + return 0; } diff --git a/libcxx/test/std/strings/string.view/string.view.iterators/begin.pass.cpp b/libcxx/test/std/strings/string.view/string.view.iterators/begin.pass.cpp index 0926f7f90220a..ba700c8abbc16 100644 --- a/libcxx/test/std/strings/string.view/string.view.iterators/begin.pass.cpp +++ b/libcxx/test/std/strings/string.view/string.view.iterators/begin.pass.cpp @@ -39,7 +39,7 @@ test(S s) } -int main() +int main(int, char**) { typedef std::string_view string_view; #if defined(__cpp_lib_char8_t) && __cpp_lib_char8_t >= 201811L @@ -90,4 +90,6 @@ int main() static_assert ( *wsv.cbegin() == wsv[0], "" ); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/string.view/string.view.iterators/end.pass.cpp b/libcxx/test/std/strings/string.view/string.view.iterators/end.pass.cpp index 1287cc201baa6..59c29e2dbdd9f 100644 --- a/libcxx/test/std/strings/string.view/string.view.iterators/end.pass.cpp +++ b/libcxx/test/std/strings/string.view/string.view.iterators/end.pass.cpp @@ -48,7 +48,7 @@ test(S s) } -int main() +int main(int, char**) { typedef std::string_view string_view; #if defined(__cpp_lib_char8_t) && __cpp_lib_char8_t >= 201811L @@ -99,4 +99,6 @@ int main() static_assert ( wsv.begin() != wsv.cend(), "" ); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/string.view/string.view.iterators/rbegin.pass.cpp b/libcxx/test/std/strings/string.view/string.view.iterators/rbegin.pass.cpp index 43d1906c8f52f..a57d7b454a3de 100644 --- a/libcxx/test/std/strings/string.view/string.view.iterators/rbegin.pass.cpp +++ b/libcxx/test/std/strings/string.view/string.view.iterators/rbegin.pass.cpp @@ -40,7 +40,7 @@ test(S s) } -int main() +int main(int, char**) { typedef std::string_view string_view; #if defined(__cpp_lib_char8_t) && __cpp_lib_char8_t >= 201811L @@ -91,4 +91,6 @@ int main() static_assert ( *wsv.crbegin() == wsv[2], "" ); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/string.view/string.view.iterators/rend.pass.cpp b/libcxx/test/std/strings/string.view/string.view.iterators/rend.pass.cpp index a4eed7d974350..e0db02c22f69f 100644 --- a/libcxx/test/std/strings/string.view/string.view.iterators/rend.pass.cpp +++ b/libcxx/test/std/strings/string.view/string.view.iterators/rend.pass.cpp @@ -48,7 +48,7 @@ test(S s) } -int main() +int main(int, char**) { typedef std::string_view string_view; #if defined(__cpp_lib_char8_t) && __cpp_lib_char8_t >= 201811L @@ -99,4 +99,6 @@ int main() static_assert ( *--wsv.crend() == wsv[0], "" ); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/string.view/string.view.modifiers/remove_prefix.pass.cpp b/libcxx/test/std/strings/string.view/string.view.modifiers/remove_prefix.pass.cpp index 08fe79e8f8253..2287ba6c80022 100644 --- a/libcxx/test/std/strings/string.view/string.view.modifiers/remove_prefix.pass.cpp +++ b/libcxx/test/std/strings/string.view/string.view.modifiers/remove_prefix.pass.cpp @@ -47,7 +47,7 @@ constexpr size_t test_ce ( size_t n, size_t k ) { } #endif -int main () { +int main(int, char**) { test ( "ABCDE", 5 ); test ( "a", 1 ); test ( "", 0 ); @@ -74,4 +74,6 @@ int main () { static_assert ( test_ce ( 9, 3 ) == 6, "" ); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/string.view/string.view.modifiers/remove_suffix.pass.cpp b/libcxx/test/std/strings/string.view/string.view.modifiers/remove_suffix.pass.cpp index be9ca1e1fc97f..0636bcea9573d 100644 --- a/libcxx/test/std/strings/string.view/string.view.modifiers/remove_suffix.pass.cpp +++ b/libcxx/test/std/strings/string.view/string.view.modifiers/remove_suffix.pass.cpp @@ -47,7 +47,7 @@ constexpr size_t test_ce ( size_t n, size_t k ) { } #endif -int main () { +int main(int, char**) { test ( "ABCDE", 5 ); test ( "a", 1 ); test ( "", 0 ); @@ -74,4 +74,6 @@ int main () { static_assert ( test_ce ( 9, 3 ) == 6, "" ); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/string.view/string.view.modifiers/swap.pass.cpp b/libcxx/test/std/strings/string.view/string.view.modifiers/swap.pass.cpp index 9b8eedd701bf7..2fc286e96a5b6 100644 --- a/libcxx/test/std/strings/string.view/string.view.modifiers/swap.pass.cpp +++ b/libcxx/test/std/strings/string.view/string.view.modifiers/swap.pass.cpp @@ -46,7 +46,7 @@ constexpr size_t test_ce ( size_t n, size_t k ) { #endif -int main () { +int main(int, char**) { test ( "ABCDE", 5 ); test ( "a", 1 ); test ( "", 0 ); @@ -72,4 +72,6 @@ int main () { static_assert ( test_ce (0, 1) == 1, "" ); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/string.view/string.view.nonmem/quoted.pass.cpp b/libcxx/test/std/strings/string.view/string.view.nonmem/quoted.pass.cpp index f335da9585d87..ecc24abf4be22 100644 --- a/libcxx/test/std/strings/string.view/string.view.nonmem/quoted.pass.cpp +++ b/libcxx/test/std/strings/string.view/string.view.nonmem/quoted.pass.cpp @@ -160,7 +160,7 @@ std::wstring unquote ( const wchar_t *p, wchar_t delim='"', wchar_t escape='\\' return s; } -int main() +int main(int, char**) { round_trip ( "" ); round_trip_ws ( "" ); @@ -207,7 +207,11 @@ int main() assert ( unquote ( "" ) == "" ); // nothing there assert ( unquote ( L"" ) == L"" ); // nothing there - } + + return 0; +} #else -int main() {} +int main(int, char**) { + return 0; +} #endif diff --git a/libcxx/test/std/strings/string.view/string.view.ops/compare.pointer.pass.cpp b/libcxx/test/std/strings/string.view/string.view.ops/compare.pointer.pass.cpp index e9a854b34fa9e..0c04ce5e48bc4 100644 --- a/libcxx/test/std/strings/string.view/string.view.ops/compare.pointer.pass.cpp +++ b/libcxx/test/std/strings/string.view/string.view.ops/compare.pointer.pass.cpp @@ -32,7 +32,7 @@ test( const CharT *s1, const CharT *s2, int expected) test1 ( sv1, s2, expected ); } -int main() +int main(int, char**) { { test("", "", 0); @@ -123,4 +123,6 @@ int main() static_assert ( sv2.compare("abcde") == 0, "" ); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/string.view/string.view.ops/compare.pointer_size.pass.cpp b/libcxx/test/std/strings/string.view/string.view.ops/compare.pointer_size.pass.cpp index 6f45222ff6c4e..974e687100d6d 100644 --- a/libcxx/test/std/strings/string.view/string.view.ops/compare.pointer_size.pass.cpp +++ b/libcxx/test/std/strings/string.view/string.view.ops/compare.pointer_size.pass.cpp @@ -354,7 +354,7 @@ void test2() } -int main() +int main(int, char**) { test0(); test1(); @@ -449,4 +449,6 @@ int main() static_assert ( sv2.compare(0, 6, "abcde") == 0, "" ); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/string.view/string.view.ops/compare.size_size_sv.pass.cpp b/libcxx/test/std/strings/string.view/string.view.ops/compare.size_size_sv.pass.cpp index 452addc12dfda..73773fb26ee4f 100644 --- a/libcxx/test/std/strings/string.view/string.view.ops/compare.size_size_sv.pass.cpp +++ b/libcxx/test/std/strings/string.view/string.view.ops/compare.size_size_sv.pass.cpp @@ -354,7 +354,7 @@ void test2() } -int main () { +int main(int, char**) { test0(); test1(); test2(); @@ -398,4 +398,6 @@ int main () { static_assert ( sv1.compare(2, 4, sv2) == 1, "" ); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/string.view/string.view.ops/compare.size_size_sv_pointer_size.pass.cpp b/libcxx/test/std/strings/string.view/string.view.ops/compare.size_size_sv_pointer_size.pass.cpp index d11f003313f77..df4e7394db982 100644 --- a/libcxx/test/std/strings/string.view/string.view.ops/compare.size_size_sv_pointer_size.pass.cpp +++ b/libcxx/test/std/strings/string.view/string.view.ops/compare.size_size_sv_pointer_size.pass.cpp @@ -1291,7 +1291,7 @@ void test11() } -int main () { +int main(int, char**) { test0(); test1(); test2(); @@ -1349,4 +1349,6 @@ int main () { static_assert ( sv2.compare(0, 0, "abcde", 1, 0) == 0, "" ); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/string.view/string.view.ops/compare.size_size_sv_size_size.pass.cpp b/libcxx/test/std/strings/string.view/string.view.ops/compare.size_size_sv_size_size.pass.cpp index 3f6e5787603b3..56b6ec1f404c9 100644 --- a/libcxx/test/std/strings/string.view/string.view.ops/compare.size_size_sv_size_size.pass.cpp +++ b/libcxx/test/std/strings/string.view/string.view.ops/compare.size_size_sv_size_size.pass.cpp @@ -5747,7 +5747,7 @@ void test54() } -int main () { +int main(int, char**) { test0(); test1(); test2(); @@ -5844,4 +5844,6 @@ int main () { static_assert ( sv1.compare(2, 4, "abcde", 3, 4) == -1, "" ); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/string.view/string.view.ops/compare.sv.pass.cpp b/libcxx/test/std/strings/string.view/string.view.ops/compare.sv.pass.cpp index e65a7451f47cb..9c27f26745989 100644 --- a/libcxx/test/std/strings/string.view/string.view.ops/compare.sv.pass.cpp +++ b/libcxx/test/std/strings/string.view/string.view.ops/compare.sv.pass.cpp @@ -34,7 +34,7 @@ void test ( const CharT *s1, const CharT *s2, int expected ) { test1(sv1, sv2, expected); } -int main () { +int main(int, char**) { test("", "", 0); test("", "abcde", -5); @@ -118,4 +118,6 @@ int main () { static_assert ( sv2.compare(sv3) < 0, "" ); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/string.view/string.view.ops/copy.pass.cpp b/libcxx/test/std/strings/string.view/string.view.ops/copy.pass.cpp index 3ec48b08c3310..e96650992cba6 100644 --- a/libcxx/test/std/strings/string.view/string.view.ops/copy.pass.cpp +++ b/libcxx/test/std/strings/string.view/string.view.ops/copy.pass.cpp @@ -77,7 +77,7 @@ void test ( const CharT *s ) { } -int main () { +int main(int, char**) { test ( "ABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDE" ); test ( "ABCDE"); test ( "a" ); @@ -99,4 +99,6 @@ int main () { test ( U"a" ); test ( U"" ); #endif + + return 0; } diff --git a/libcxx/test/std/strings/string.view/string.view.ops/substr.pass.cpp b/libcxx/test/std/strings/string.view/string.view.ops/substr.pass.cpp index 4391bb5134214..c2fd01f5724a2 100644 --- a/libcxx/test/std/strings/string.view/string.view.ops/substr.pass.cpp +++ b/libcxx/test/std/strings/string.view/string.view.ops/substr.pass.cpp @@ -69,7 +69,7 @@ void test ( const CharT *s ) { test1(sv1, sv1.size() + 1, string_view_t::npos); } -int main () { +int main(int, char**) { test ( "ABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDE" ); test ( "ABCDE"); test ( "a" ); @@ -117,4 +117,6 @@ int main () { } } #endif + + return 0; } diff --git a/libcxx/test/std/strings/string.view/string.view.synop/nothing_to_do.pass.cpp b/libcxx/test/std/strings/string.view/string.view.synop/nothing_to_do.pass.cpp index 3f07051d03a6f..45edec7f4b068 100644 --- a/libcxx/test/std/strings/string.view/string.view.synop/nothing_to_do.pass.cpp +++ b/libcxx/test/std/strings/string.view/string.view.synop/nothing_to_do.pass.cpp @@ -8,4 +8,6 @@ #include -int main () {} +int main(int, char**) { + return 0; +} diff --git a/libcxx/test/std/strings/string.view/string.view.template/ends_with.char.pass.cpp b/libcxx/test/std/strings/string.view/string.view.template/ends_with.char.pass.cpp index c89fdb8e4e863..c037330742755 100644 --- a/libcxx/test/std/strings/string.view/string.view.template/ends_with.char.pass.cpp +++ b/libcxx/test/std/strings/string.view/string.view.template/ends_with.char.pass.cpp @@ -17,7 +17,7 @@ #include "test_macros.h" #include "constexpr_char_traits.hpp" -int main() +int main(int, char**) { { typedef std::string_view SV; @@ -43,4 +43,6 @@ int main() static_assert (!sv2.ends_with('x'), "" ); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/string.view/string.view.template/ends_with.ptr.pass.cpp b/libcxx/test/std/strings/string.view/string.view.template/ends_with.ptr.pass.cpp index 4ef1c8e2f9870..64caf5cc0d551 100644 --- a/libcxx/test/std/strings/string.view/string.view.template/ends_with.ptr.pass.cpp +++ b/libcxx/test/std/strings/string.view/string.view.template/ends_with.ptr.pass.cpp @@ -17,7 +17,7 @@ #include "test_macros.h" #include "constexpr_char_traits.hpp" -int main() +int main(int, char**) { { typedef std::string_view SV; @@ -100,4 +100,6 @@ int main() static_assert ( svNot.ends_with("def"), "" ); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/string.view/string.view.template/ends_with.string_view.pass.cpp b/libcxx/test/std/strings/string.view/string.view.template/ends_with.string_view.pass.cpp index 2d115c104b470..b5f67f8ddd128 100644 --- a/libcxx/test/std/strings/string.view/string.view.template/ends_with.string_view.pass.cpp +++ b/libcxx/test/std/strings/string.view/string.view.template/ends_with.string_view.pass.cpp @@ -17,7 +17,7 @@ #include "test_macros.h" #include "constexpr_char_traits.hpp" -int main() +int main(int, char**) { { typedef std::string_view SV; @@ -100,4 +100,6 @@ int main() static_assert ( svNot.ends_with(svNot), "" ); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/string.view/string.view.template/nothing_to_do.pass.cpp b/libcxx/test/std/strings/string.view/string.view.template/nothing_to_do.pass.cpp index 3f07051d03a6f..45edec7f4b068 100644 --- a/libcxx/test/std/strings/string.view/string.view.template/nothing_to_do.pass.cpp +++ b/libcxx/test/std/strings/string.view/string.view.template/nothing_to_do.pass.cpp @@ -8,4 +8,6 @@ #include -int main () {} +int main(int, char**) { + return 0; +} diff --git a/libcxx/test/std/strings/string.view/string.view.template/starts_with.char.pass.cpp b/libcxx/test/std/strings/string.view/string.view.template/starts_with.char.pass.cpp index d35222bbf87eb..d43944fdec7cc 100644 --- a/libcxx/test/std/strings/string.view/string.view.template/starts_with.char.pass.cpp +++ b/libcxx/test/std/strings/string.view/string.view.template/starts_with.char.pass.cpp @@ -17,7 +17,7 @@ #include "test_macros.h" #include "constexpr_char_traits.hpp" -int main() +int main(int, char**) { { typedef std::string_view SV; @@ -43,4 +43,6 @@ int main() static_assert (!sv2.starts_with('x'), "" ); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/string.view/string.view.template/starts_with.ptr.pass.cpp b/libcxx/test/std/strings/string.view/string.view.template/starts_with.ptr.pass.cpp index a3ffde5c58486..ce651ec57e0e5 100644 --- a/libcxx/test/std/strings/string.view/string.view.template/starts_with.ptr.pass.cpp +++ b/libcxx/test/std/strings/string.view/string.view.template/starts_with.ptr.pass.cpp @@ -17,7 +17,7 @@ #include "test_macros.h" #include "constexpr_char_traits.hpp" -int main() +int main(int, char**) { { typedef std::string_view SV; @@ -100,4 +100,6 @@ int main() static_assert ( svNot.starts_with("def"), "" ); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/string.view/string.view.template/starts_with.string_view.pass.cpp b/libcxx/test/std/strings/string.view/string.view.template/starts_with.string_view.pass.cpp index 5a5adbd8470ea..3d184bae0eb52 100644 --- a/libcxx/test/std/strings/string.view/string.view.template/starts_with.string_view.pass.cpp +++ b/libcxx/test/std/strings/string.view/string.view.template/starts_with.string_view.pass.cpp @@ -17,7 +17,7 @@ #include "test_macros.h" #include "constexpr_char_traits.hpp" -int main() +int main(int, char**) { { typedef std::string_view SV; @@ -100,4 +100,6 @@ int main() static_assert ( svNot.starts_with(svNot), "" ); } #endif + + return 0; } diff --git a/libcxx/test/std/strings/string.view/string_view.literals/literal.pass.cpp b/libcxx/test/std/strings/string.view/string_view.literals/literal.pass.cpp index c7d0e054df16c..a8a1dff640450 100644 --- a/libcxx/test/std/strings/string.view/string_view.literals/literal.pass.cpp +++ b/libcxx/test/std/strings/string.view/string_view.literals/literal.pass.cpp @@ -23,7 +23,7 @@ typedef std::string_view u8string_view; #endif -int main() +int main(int, char**) { using namespace std::literals::string_view_literals; @@ -69,4 +69,6 @@ int main() static_assert(noexcept( L"ABC"sv), ""); static_assert(noexcept( u"ABC"sv), ""); static_assert(noexcept( U"ABC"sv), ""); + + return 0; } diff --git a/libcxx/test/std/strings/string.view/string_view.literals/literal1.fail.cpp b/libcxx/test/std/strings/string.view/string_view.literals/literal1.fail.cpp index 05e66bf1eafce..5bf108bbef227 100644 --- a/libcxx/test/std/strings/string.view/string_view.literals/literal1.fail.cpp +++ b/libcxx/test/std/strings/string.view/string_view.literals/literal1.fail.cpp @@ -14,9 +14,11 @@ #include #include -int main() +int main(int, char**) { using std::string_view; string_view foo = ""sv; // should fail w/conversion operator not found + + return 0; } diff --git a/libcxx/test/std/strings/string.view/string_view.literals/literal1.pass.cpp b/libcxx/test/std/strings/string.view/string_view.literals/literal1.pass.cpp index 956d7d26a3208..ba667e09cd189 100644 --- a/libcxx/test/std/strings/string.view/string_view.literals/literal1.pass.cpp +++ b/libcxx/test/std/strings/string.view/string_view.literals/literal1.pass.cpp @@ -15,10 +15,12 @@ #include #include -int main() +int main(int, char**) { using namespace std::literals; std::string_view foo = ""sv; assert(foo.length() == 0); + + return 0; } diff --git a/libcxx/test/std/strings/string.view/string_view.literals/literal2.fail.cpp b/libcxx/test/std/strings/string.view/string_view.literals/literal2.fail.cpp index 672201bb9a0a6..2287e1ce92a44 100644 --- a/libcxx/test/std/strings/string.view/string_view.literals/literal2.fail.cpp +++ b/libcxx/test/std/strings/string.view/string_view.literals/literal2.fail.cpp @@ -14,7 +14,9 @@ #include #include -int main() +int main(int, char**) { std::string_view foo = ""sv; // should fail w/conversion operator not found + + return 0; } diff --git a/libcxx/test/std/strings/string.view/string_view.literals/literal2.pass.cpp b/libcxx/test/std/strings/string.view/string_view.literals/literal2.pass.cpp index 653738dc5a3af..cb49280bfec59 100644 --- a/libcxx/test/std/strings/string.view/string_view.literals/literal2.pass.cpp +++ b/libcxx/test/std/strings/string.view/string_view.literals/literal2.pass.cpp @@ -15,10 +15,12 @@ #include #include -int main() +int main(int, char**) { using namespace std::literals::string_view_literals; std::string_view foo = ""sv; assert(foo.length() == 0); + + return 0; } diff --git a/libcxx/test/std/strings/string.view/string_view.literals/literal3.pass.cpp b/libcxx/test/std/strings/string.view/string_view.literals/literal3.pass.cpp index 814ec0cbdfe95..710933dd95a48 100644 --- a/libcxx/test/std/strings/string.view/string_view.literals/literal3.pass.cpp +++ b/libcxx/test/std/strings/string.view/string_view.literals/literal3.pass.cpp @@ -15,10 +15,12 @@ #include #include -int main() +int main(int, char**) { using namespace std; string_view foo = ""sv; assert(foo.length() == 0); + + return 0; } diff --git a/libcxx/test/std/strings/string.view/traits_mismatch.fail.cpp b/libcxx/test/std/strings/string.view/traits_mismatch.fail.cpp index 6a32051a1c3f3..5cf3fa94793a3 100644 --- a/libcxx/test/std/strings/string.view/traits_mismatch.fail.cpp +++ b/libcxx/test/std/strings/string.view/traits_mismatch.fail.cpp @@ -11,7 +11,9 @@ #include -int main() +int main(int, char**) { std::basic_string_view> s; + + return 0; } diff --git a/libcxx/test/std/strings/string.view/types.pass.cpp b/libcxx/test/std/strings/string.view/types.pass.cpp index d8bb0f7373784..d90f777babf69 100644 --- a/libcxx/test/std/strings/string.view/types.pass.cpp +++ b/libcxx/test/std/strings/string.view/types.pass.cpp @@ -67,7 +67,7 @@ test() static_assert((std::is_same::value), ""); } -int main() +int main(int, char**) { test >(); test >(); @@ -76,4 +76,6 @@ int main() #endif static_assert((std::is_same::traits_type, std::char_traits >::value), ""); + + return 0; } diff --git a/libcxx/test/std/strings/strings.erasure/erase.pass.cpp b/libcxx/test/std/strings/strings.erasure/erase.pass.cpp index 250fe94a6f280..5013300d28b74 100644 --- a/libcxx/test/std/strings/strings.erasure/erase.pass.cpp +++ b/libcxx/test/std/strings/strings.erasure/erase.pass.cpp @@ -67,9 +67,11 @@ void test() test0(S("aba"), opt('c'), S("aba")); } -int main() +int main(int, char**) { test(); test, min_allocator>> (); test, test_allocator>> (); + + return 0; } diff --git a/libcxx/test/std/strings/strings.erasure/erase_if.pass.cpp b/libcxx/test/std/strings/strings.erasure/erase_if.pass.cpp index 06b9cc2279ad2..5f2fb0117f84d 100644 --- a/libcxx/test/std/strings/strings.erasure/erase_if.pass.cpp +++ b/libcxx/test/std/strings/strings.erasure/erase_if.pass.cpp @@ -67,9 +67,11 @@ void test() test0(S("aba"), True, S("")); } -int main() +int main(int, char**) { test(); test, min_allocator>> (); test, test_allocator>> (); + + return 0; } diff --git a/libcxx/test/std/strings/strings.general/nothing_to_do.pass.cpp b/libcxx/test/std/strings/strings.general/nothing_to_do.pass.cpp index 02fe32ece4841..779762e7e995d 100644 --- a/libcxx/test/std/strings/strings.general/nothing_to_do.pass.cpp +++ b/libcxx/test/std/strings/strings.general/nothing_to_do.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/thread/futures/futures.async/async.fail.cpp b/libcxx/test/std/thread/futures/futures.async/async.fail.cpp index f93c3ef20ffc9..3e7fb80e0e1fc 100644 --- a/libcxx/test/std/thread/futures/futures.async/async.fail.cpp +++ b/libcxx/test/std/thread/futures/futures.async/async.fail.cpp @@ -30,8 +30,10 @@ int foo (int x) { return x; } -int main () +int main(int, char**) { std::async( foo, 3); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} std::async(std::launch::async, foo, 3); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} + + return 0; } diff --git a/libcxx/test/std/thread/futures/futures.async/async.pass.cpp b/libcxx/test/std/thread/futures/futures.async/async.pass.cpp index 1083cb47d444b..225b63ec8899a 100644 --- a/libcxx/test/std/thread/futures/futures.async/async.pass.cpp +++ b/libcxx/test/std/thread/futures/futures.async/async.pass.cpp @@ -102,7 +102,7 @@ void test(CheckLamdba&& getAndCheckFn, bool IsDeferred, Args&&... args) { } } -int main() +int main(int, char**) { // The default launch policy is implementation defined. libc++ defines // it to be std::launch::async. @@ -151,4 +151,5 @@ int main() try { f.get(); assert (false); } catch ( int ) {} } #endif + return 0; } diff --git a/libcxx/test/std/thread/futures/futures.async/async_race.38682.pass.cpp b/libcxx/test/std/thread/futures/futures.async/async_race.38682.pass.cpp index 6e115f00404ca..826704a75d363 100644 --- a/libcxx/test/std/thread/futures/futures.async/async_race.38682.pass.cpp +++ b/libcxx/test/std/thread/futures/futures.async/async_race.38682.pass.cpp @@ -38,7 +38,7 @@ static int& worker_ref(int& i) { return i; } static void worker_void() { } -int main() { +int main(int, char**) { // future { std::vector const v{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; @@ -65,4 +65,6 @@ int main() { fut.get(); } } + + return 0; } diff --git a/libcxx/test/std/thread/futures/futures.async/async_race.pass.cpp b/libcxx/test/std/thread/futures/futures.async/async_race.pass.cpp index 62e09723e9ead..9da57e38ae93f 100644 --- a/libcxx/test/std/thread/futures/futures.async/async_race.pass.cpp +++ b/libcxx/test/std/thread/futures/futures.async/async_race.pass.cpp @@ -62,6 +62,8 @@ void test_each() { } } -int main() { +int main(int, char**) { for (int i=0; i < 25; ++i) test_each(); + + return 0; } diff --git a/libcxx/test/std/thread/futures/futures.errors/default_error_condition.pass.cpp b/libcxx/test/std/thread/futures/futures.errors/default_error_condition.pass.cpp index 1676d4babaed0..fbb7eb13d92fd 100644 --- a/libcxx/test/std/thread/futures/futures.errors/default_error_condition.pass.cpp +++ b/libcxx/test/std/thread/futures/futures.errors/default_error_condition.pass.cpp @@ -17,10 +17,12 @@ #include #include -int main() +int main(int, char**) { const std::error_category& e_cat = std::future_category(); std::error_condition e_cond = e_cat.default_error_condition(static_cast(std::errc::not_a_directory)); assert(e_cond.category() == e_cat); assert(e_cond.value() == static_cast(std::errc::not_a_directory)); + + return 0; } diff --git a/libcxx/test/std/thread/futures/futures.errors/equivalent_error_code_int.pass.cpp b/libcxx/test/std/thread/futures/futures.errors/equivalent_error_code_int.pass.cpp index cb3f813936774..3ba3410942dac 100644 --- a/libcxx/test/std/thread/futures/futures.errors/equivalent_error_code_int.pass.cpp +++ b/libcxx/test/std/thread/futures/futures.errors/equivalent_error_code_int.pass.cpp @@ -17,9 +17,11 @@ #include #include -int main() +int main(int, char**) { const std::error_category& e_cat = std::future_category(); assert(e_cat.equivalent(std::error_code(5, e_cat), 5)); assert(!e_cat.equivalent(std::error_code(5, e_cat), 6)); + + return 0; } diff --git a/libcxx/test/std/thread/futures/futures.errors/equivalent_int_error_condition.pass.cpp b/libcxx/test/std/thread/futures/futures.errors/equivalent_int_error_condition.pass.cpp index f39de5b11f704..9d0e1cf31ba89 100644 --- a/libcxx/test/std/thread/futures/futures.errors/equivalent_int_error_condition.pass.cpp +++ b/libcxx/test/std/thread/futures/futures.errors/equivalent_int_error_condition.pass.cpp @@ -17,10 +17,12 @@ #include #include -int main() +int main(int, char**) { const std::error_category& e_cat = std::future_category(); std::error_condition e_cond = e_cat.default_error_condition(5); assert(e_cat.equivalent(5, e_cond)); assert(!e_cat.equivalent(6, e_cond)); + + return 0; } diff --git a/libcxx/test/std/thread/futures/futures.errors/future_category.pass.cpp b/libcxx/test/std/thread/futures/futures.errors/future_category.pass.cpp index e9e784c28d151..7b9d72344251a 100644 --- a/libcxx/test/std/thread/futures/futures.errors/future_category.pass.cpp +++ b/libcxx/test/std/thread/futures/futures.errors/future_category.pass.cpp @@ -16,8 +16,10 @@ #include #include -int main() +int main(int, char**) { const std::error_category& ec = std::future_category(); assert(std::strcmp(ec.name(), "future") == 0); + + return 0; } diff --git a/libcxx/test/std/thread/futures/futures.errors/make_error_code.pass.cpp b/libcxx/test/std/thread/futures/futures.errors/make_error_code.pass.cpp index 9e39585c84627..d9e50bf42d347 100644 --- a/libcxx/test/std/thread/futures/futures.errors/make_error_code.pass.cpp +++ b/libcxx/test/std/thread/futures/futures.errors/make_error_code.pass.cpp @@ -17,11 +17,13 @@ #include #include -int main() +int main(int, char**) { { std::error_code ec = make_error_code(std::future_errc::broken_promise); assert(ec.value() == static_cast(std::future_errc::broken_promise)); assert(ec.category() == std::future_category()); } + + return 0; } diff --git a/libcxx/test/std/thread/futures/futures.errors/make_error_condition.pass.cpp b/libcxx/test/std/thread/futures/futures.errors/make_error_condition.pass.cpp index f8cbbdedbded4..d055591024657 100644 --- a/libcxx/test/std/thread/futures/futures.errors/make_error_condition.pass.cpp +++ b/libcxx/test/std/thread/futures/futures.errors/make_error_condition.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { { const std::error_condition ec1 = @@ -26,4 +26,6 @@ int main() static_cast(std::future_errc::future_already_retrieved)); assert(ec1.category() == std::future_category()); } + + return 0; } diff --git a/libcxx/test/std/thread/futures/futures.future_error/code.pass.cpp b/libcxx/test/std/thread/futures/futures.future_error/code.pass.cpp index 63769f018b7e2..53acba393fb8a 100644 --- a/libcxx/test/std/thread/futures/futures.future_error/code.pass.cpp +++ b/libcxx/test/std/thread/futures/futures.future_error/code.pass.cpp @@ -21,7 +21,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { { std::error_code ec = std::make_error_code(std::future_errc::broken_promise); @@ -53,4 +53,6 @@ int main() assert(f.code() == std::make_error_code(std::future_errc::no_state)); } #endif + + return 0; } diff --git a/libcxx/test/std/thread/futures/futures.future_error/types.pass.cpp b/libcxx/test/std/thread/futures/futures.future_error/types.pass.cpp index 911f562e510fe..edf18ba5a9a02 100644 --- a/libcxx/test/std/thread/futures/futures.future_error/types.pass.cpp +++ b/libcxx/test/std/thread/futures/futures.future_error/types.pass.cpp @@ -15,8 +15,10 @@ #include #include -int main() +int main(int, char**) { static_assert((std::is_convertible::value), ""); + + return 0; } diff --git a/libcxx/test/std/thread/futures/futures.future_error/what.pass.cpp b/libcxx/test/std/thread/futures/futures.future_error/what.pass.cpp index bae25af1fab65..468aeb85bece0 100644 --- a/libcxx/test/std/thread/futures/futures.future_error/what.pass.cpp +++ b/libcxx/test/std/thread/futures/futures.future_error/what.pass.cpp @@ -29,7 +29,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { { std::future_error f(std::make_error_code(std::future_errc::broken_promise)); @@ -50,4 +50,6 @@ int main() LIBCPP_ASSERT(std::strcmp(f.what(), "Operation not permitted on an object without " "an associated state.") == 0); } + + return 0; } diff --git a/libcxx/test/std/thread/futures/futures.overview/future_errc.pass.cpp b/libcxx/test/std/thread/futures/futures.overview/future_errc.pass.cpp index 383407d1328e7..d7840f45ce6bf 100644 --- a/libcxx/test/std/thread/futures/futures.overview/future_errc.pass.cpp +++ b/libcxx/test/std/thread/futures/futures.overview/future_errc.pass.cpp @@ -23,7 +23,7 @@ #include -int main() +int main(int, char**) { static_assert(std::future_errc::broken_promise != std::future_errc::future_already_retrieved, ""); static_assert(std::future_errc::broken_promise != std::future_errc::promise_already_satisfied, ""); @@ -36,4 +36,6 @@ int main() static_assert(std::future_errc::future_already_retrieved != static_cast(0), ""); static_assert(std::future_errc::promise_already_satisfied != static_cast(0), ""); static_assert(std::future_errc::no_state != static_cast(0), ""); + + return 0; } diff --git a/libcxx/test/std/thread/futures/futures.overview/future_status.pass.cpp b/libcxx/test/std/thread/futures/futures.overview/future_status.pass.cpp index 23c5bac06b796..ceff64f7ebb2d 100644 --- a/libcxx/test/std/thread/futures/futures.overview/future_status.pass.cpp +++ b/libcxx/test/std/thread/futures/futures.overview/future_status.pass.cpp @@ -19,9 +19,11 @@ #include -int main() +int main(int, char**) { static_assert(static_cast(std::future_status::ready) == 0, ""); static_assert(static_cast(std::future_status::timeout) == 1, ""); static_assert(static_cast(std::future_status::deferred) == 2, ""); + + return 0; } diff --git a/libcxx/test/std/thread/futures/futures.overview/is_error_code_enum_future_errc.pass.cpp b/libcxx/test/std/thread/futures/futures.overview/is_error_code_enum_future_errc.pass.cpp index f8a0d8a649285..c7e2c2aebaa35 100644 --- a/libcxx/test/std/thread/futures/futures.overview/is_error_code_enum_future_errc.pass.cpp +++ b/libcxx/test/std/thread/futures/futures.overview/is_error_code_enum_future_errc.pass.cpp @@ -15,10 +15,12 @@ #include #include "test_macros.h" -int main() +int main(int, char**) { static_assert(std::is_error_code_enum ::value, ""); #if TEST_STD_VER > 14 static_assert(std::is_error_code_enum_v, ""); #endif + + return 0; } diff --git a/libcxx/test/std/thread/futures/futures.overview/launch.pass.cpp b/libcxx/test/std/thread/futures/futures.overview/launch.pass.cpp index 0ed166028c4ca..6d405b508eddf 100644 --- a/libcxx/test/std/thread/futures/futures.overview/launch.pass.cpp +++ b/libcxx/test/std/thread/futures/futures.overview/launch.pass.cpp @@ -22,7 +22,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { #ifdef _LIBCPP_HAS_NO_STRONG_ENUMS LIBCPP_STATIC_ASSERT(static_cast(std::launch::any) == @@ -43,4 +43,6 @@ int main() #endif static_assert(static_cast(std::launch::async) == 1, ""); static_assert(static_cast(std::launch::deferred) == 2, ""); + + return 0; } diff --git a/libcxx/test/std/thread/futures/futures.promise/alloc_ctor.pass.cpp b/libcxx/test/std/thread/futures/futures.promise/alloc_ctor.pass.cpp index 1ad295220af7b..ece8b94a5632a 100644 --- a/libcxx/test/std/thread/futures/futures.promise/alloc_ctor.pass.cpp +++ b/libcxx/test/std/thread/futures/futures.promise/alloc_ctor.pass.cpp @@ -22,7 +22,7 @@ #include "test_allocator.h" #include "min_allocator.h" -int main() +int main(int, char**) { assert(test_alloc_base::alloc_count == 0); { @@ -81,4 +81,6 @@ int main() std::future f = p.get_future(); assert(f.valid()); } + + return 0; } diff --git a/libcxx/test/std/thread/futures/futures.promise/copy_assign.fail.cpp b/libcxx/test/std/thread/futures/futures.promise/copy_assign.fail.cpp index 895ccf7fd5b45..bf46a6847cbfc 100644 --- a/libcxx/test/std/thread/futures/futures.promise/copy_assign.fail.cpp +++ b/libcxx/test/std/thread/futures/futures.promise/copy_assign.fail.cpp @@ -18,7 +18,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { #if TEST_STD_VER >= 11 { @@ -47,4 +47,6 @@ int main() p = p0; // expected-error {{'operator=' is a private member of 'std::__1::promise'}} } #endif + + return 0; } diff --git a/libcxx/test/std/thread/futures/futures.promise/copy_ctor.fail.cpp b/libcxx/test/std/thread/futures/futures.promise/copy_ctor.fail.cpp index 00af4af49ce0a..8f90f3da7feea 100644 --- a/libcxx/test/std/thread/futures/futures.promise/copy_ctor.fail.cpp +++ b/libcxx/test/std/thread/futures/futures.promise/copy_ctor.fail.cpp @@ -18,7 +18,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { #if TEST_STD_VER >= 11 { @@ -47,4 +47,6 @@ int main() std::promise p(p0); // expected-error {{calling a private constructor of class 'std::__1::promise'}} } #endif + + return 0; } diff --git a/libcxx/test/std/thread/futures/futures.promise/default.pass.cpp b/libcxx/test/std/thread/futures/futures.promise/default.pass.cpp index f0e3a786d6cd6..600f99dd992fa 100644 --- a/libcxx/test/std/thread/futures/futures.promise/default.pass.cpp +++ b/libcxx/test/std/thread/futures/futures.promise/default.pass.cpp @@ -18,7 +18,7 @@ #include #include -int main() +int main(int, char**) { { std::promise p; @@ -35,4 +35,6 @@ int main() std::future f = p.get_future(); assert(f.valid()); } + + return 0; } diff --git a/libcxx/test/std/thread/futures/futures.promise/dtor.pass.cpp b/libcxx/test/std/thread/futures/futures.promise/dtor.pass.cpp index 4d3bd9cb98864..49c4b4685dbdf 100644 --- a/libcxx/test/std/thread/futures/futures.promise/dtor.pass.cpp +++ b/libcxx/test/std/thread/futures/futures.promise/dtor.pass.cpp @@ -20,7 +20,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { { typedef int T; @@ -123,4 +123,6 @@ int main() } } #endif + + return 0; } diff --git a/libcxx/test/std/thread/futures/futures.promise/get_future.pass.cpp b/libcxx/test/std/thread/futures/futures.promise/get_future.pass.cpp index 3805a96d04a15..6385f6345debe 100644 --- a/libcxx/test/std/thread/futures/futures.promise/get_future.pass.cpp +++ b/libcxx/test/std/thread/futures/futures.promise/get_future.pass.cpp @@ -20,7 +20,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { { std::promise p; @@ -56,4 +56,6 @@ int main() } } #endif + + return 0; } diff --git a/libcxx/test/std/thread/futures/futures.promise/move_assign.pass.cpp b/libcxx/test/std/thread/futures/futures.promise/move_assign.pass.cpp index 46860fbe8406b..6592e0bb881d4 100644 --- a/libcxx/test/std/thread/futures/futures.promise/move_assign.pass.cpp +++ b/libcxx/test/std/thread/futures/futures.promise/move_assign.pass.cpp @@ -21,7 +21,7 @@ #include "test_macros.h" #include "test_allocator.h" -int main() +int main(int, char**) { assert(test_alloc_base::alloc_count == 0); { @@ -93,4 +93,6 @@ int main() assert(test_alloc_base::alloc_count == 1); } assert(test_alloc_base::alloc_count == 0); + + return 0; } diff --git a/libcxx/test/std/thread/futures/futures.promise/move_ctor.pass.cpp b/libcxx/test/std/thread/futures/futures.promise/move_ctor.pass.cpp index d119b188df1b9..1551420e9781c 100644 --- a/libcxx/test/std/thread/futures/futures.promise/move_ctor.pass.cpp +++ b/libcxx/test/std/thread/futures/futures.promise/move_ctor.pass.cpp @@ -21,7 +21,7 @@ #include "test_macros.h" #include "test_allocator.h" -int main() +int main(int, char**) { assert(test_alloc_base::alloc_count == 0); { @@ -87,4 +87,6 @@ int main() #endif } assert(test_alloc_base::alloc_count == 0); + + return 0; } diff --git a/libcxx/test/std/thread/futures/futures.promise/set_exception.pass.cpp b/libcxx/test/std/thread/futures/futures.promise/set_exception.pass.cpp index bb763e9ac511d..030620ad43f85 100644 --- a/libcxx/test/std/thread/futures/futures.promise/set_exception.pass.cpp +++ b/libcxx/test/std/thread/futures/futures.promise/set_exception.pass.cpp @@ -19,7 +19,7 @@ #include #include -int main() +int main(int, char**) { { typedef int T; @@ -45,4 +45,6 @@ int main() assert(e.code() == make_error_code(std::future_errc::promise_already_satisfied)); } } + + return 0; } diff --git a/libcxx/test/std/thread/futures/futures.promise/set_exception_at_thread_exit.pass.cpp b/libcxx/test/std/thread/futures/futures.promise/set_exception_at_thread_exit.pass.cpp index c464d083bb553..a1a32882beeda 100644 --- a/libcxx/test/std/thread/futures/futures.promise/set_exception_at_thread_exit.pass.cpp +++ b/libcxx/test/std/thread/futures/futures.promise/set_exception_at_thread_exit.pass.cpp @@ -24,7 +24,7 @@ void func(std::promise p) p.set_exception_at_thread_exit(std::make_exception_ptr(3)); } -int main() +int main(int, char**) { { typedef int T; @@ -41,4 +41,6 @@ int main() assert(i == 3); } } + + return 0; } diff --git a/libcxx/test/std/thread/futures/futures.promise/set_lvalue.pass.cpp b/libcxx/test/std/thread/futures/futures.promise/set_lvalue.pass.cpp index 9b72e480371cd..db8bb5704c514 100644 --- a/libcxx/test/std/thread/futures/futures.promise/set_lvalue.pass.cpp +++ b/libcxx/test/std/thread/futures/futures.promise/set_lvalue.pass.cpp @@ -20,7 +20,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { { typedef int& T; @@ -44,4 +44,6 @@ int main() } #endif } + + return 0; } diff --git a/libcxx/test/std/thread/futures/futures.promise/set_lvalue_at_thread_exit.pass.cpp b/libcxx/test/std/thread/futures/futures.promise/set_lvalue_at_thread_exit.pass.cpp index 0fa28031dd051..9c3b09086b3da 100644 --- a/libcxx/test/std/thread/futures/futures.promise/set_lvalue_at_thread_exit.pass.cpp +++ b/libcxx/test/std/thread/futures/futures.promise/set_lvalue_at_thread_exit.pass.cpp @@ -27,7 +27,7 @@ void func(std::promise p) i = 4; } -int main() +int main(int, char**) { { std::promise p; @@ -35,4 +35,6 @@ int main() std::thread(func, std::move(p)).detach(); assert(f.get() == 4); } + + return 0; } diff --git a/libcxx/test/std/thread/futures/futures.promise/set_rvalue.pass.cpp b/libcxx/test/std/thread/futures/futures.promise/set_rvalue.pass.cpp index d0f2bda437816..7f54baa8cec92 100644 --- a/libcxx/test/std/thread/futures/futures.promise/set_rvalue.pass.cpp +++ b/libcxx/test/std/thread/futures/futures.promise/set_rvalue.pass.cpp @@ -26,7 +26,7 @@ struct A A(A&&) {throw 9;} }; -int main() +int main(int, char**) { { typedef std::unique_ptr T; @@ -60,4 +60,6 @@ int main() assert(j == 9); } } + + return 0; } diff --git a/libcxx/test/std/thread/futures/futures.promise/set_rvalue_at_thread_exit.pass.cpp b/libcxx/test/std/thread/futures/futures.promise/set_rvalue_at_thread_exit.pass.cpp index a5574238da599..bddd661355699 100644 --- a/libcxx/test/std/thread/futures/futures.promise/set_rvalue_at_thread_exit.pass.cpp +++ b/libcxx/test/std/thread/futures/futures.promise/set_rvalue_at_thread_exit.pass.cpp @@ -23,7 +23,7 @@ void func(std::promise> p) p.set_value_at_thread_exit(std::unique_ptr(new int(5))); } -int main() +int main(int, char**) { { std::promise> p; @@ -31,4 +31,6 @@ int main() std::thread(func, std::move(p)).detach(); assert(*f.get() == 5); } + + return 0; } diff --git a/libcxx/test/std/thread/futures/futures.promise/set_value_at_thread_exit_const.pass.cpp b/libcxx/test/std/thread/futures/futures.promise/set_value_at_thread_exit_const.pass.cpp index 4760611771a2a..9258a001149ad 100644 --- a/libcxx/test/std/thread/futures/futures.promise/set_value_at_thread_exit_const.pass.cpp +++ b/libcxx/test/std/thread/futures/futures.promise/set_value_at_thread_exit_const.pass.cpp @@ -24,7 +24,7 @@ void func(std::promise p) p.set_value_at_thread_exit(i); } -int main() +int main(int, char**) { { std::promise p; @@ -32,4 +32,6 @@ int main() std::thread(func, std::move(p)).detach(); assert(f.get() == 5); } + + return 0; } diff --git a/libcxx/test/std/thread/futures/futures.promise/set_value_at_thread_exit_void.pass.cpp b/libcxx/test/std/thread/futures/futures.promise/set_value_at_thread_exit_void.pass.cpp index e2b8ae9a5da1b..1a204421ee929 100644 --- a/libcxx/test/std/thread/futures/futures.promise/set_value_at_thread_exit_void.pass.cpp +++ b/libcxx/test/std/thread/futures/futures.promise/set_value_at_thread_exit_void.pass.cpp @@ -27,7 +27,7 @@ void func(std::promise p) i = 1; } -int main() +int main(int, char**) { { std::promise p; @@ -36,4 +36,6 @@ int main() f.get(); assert(i == 1); } + + return 0; } diff --git a/libcxx/test/std/thread/futures/futures.promise/set_value_const.pass.cpp b/libcxx/test/std/thread/futures/futures.promise/set_value_const.pass.cpp index 942481542f9f5..e58d2d24588a9 100644 --- a/libcxx/test/std/thread/futures/futures.promise/set_value_const.pass.cpp +++ b/libcxx/test/std/thread/futures/futures.promise/set_value_const.pass.cpp @@ -28,7 +28,7 @@ struct A } }; -int main() +int main(int, char**) { { typedef int T; @@ -68,4 +68,6 @@ int main() } #endif } + + return 0; } diff --git a/libcxx/test/std/thread/futures/futures.promise/set_value_void.pass.cpp b/libcxx/test/std/thread/futures/futures.promise/set_value_void.pass.cpp index 330d5b025089e..d505b3aabf4b9 100644 --- a/libcxx/test/std/thread/futures/futures.promise/set_value_void.pass.cpp +++ b/libcxx/test/std/thread/futures/futures.promise/set_value_void.pass.cpp @@ -19,7 +19,7 @@ #include #include -int main() +int main(int, char**) { { typedef void T; @@ -37,4 +37,6 @@ int main() assert(e.code() == make_error_code(std::future_errc::promise_already_satisfied)); } } + + return 0; } diff --git a/libcxx/test/std/thread/futures/futures.promise/swap.pass.cpp b/libcxx/test/std/thread/futures/futures.promise/swap.pass.cpp index ec72f8794b0b4..2b78b1d384b4b 100644 --- a/libcxx/test/std/thread/futures/futures.promise/swap.pass.cpp +++ b/libcxx/test/std/thread/futures/futures.promise/swap.pass.cpp @@ -22,7 +22,7 @@ #include "test_allocator.h" -int main() +int main(int, char**) { assert(test_alloc_base::alloc_count == 0); { @@ -81,4 +81,6 @@ int main() assert(test_alloc_base::alloc_count == 1); } assert(test_alloc_base::alloc_count == 0); + + return 0; } diff --git a/libcxx/test/std/thread/futures/futures.promise/uses_allocator.pass.cpp b/libcxx/test/std/thread/futures/futures.promise/uses_allocator.pass.cpp index 928ede9fb83d3..1a5028bce3ac2 100644 --- a/libcxx/test/std/thread/futures/futures.promise/uses_allocator.pass.cpp +++ b/libcxx/test/std/thread/futures/futures.promise/uses_allocator.pass.cpp @@ -19,9 +19,11 @@ #include #include "test_allocator.h" -int main() +int main(int, char**) { static_assert((std::uses_allocator, test_allocator >::value), ""); static_assert((std::uses_allocator, test_allocator >::value), ""); static_assert((std::uses_allocator, test_allocator >::value), ""); + + return 0; } diff --git a/libcxx/test/std/thread/futures/futures.shared_future/copy_assign.pass.cpp b/libcxx/test/std/thread/futures/futures.shared_future/copy_assign.pass.cpp index 44c538c972e26..e5cc33a0c9493 100644 --- a/libcxx/test/std/thread/futures/futures.shared_future/copy_assign.pass.cpp +++ b/libcxx/test/std/thread/futures/futures.shared_future/copy_assign.pass.cpp @@ -21,7 +21,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { { typedef int T; @@ -77,4 +77,6 @@ int main() assert(!f0.valid()); assert(!f.valid()); } + + return 0; } diff --git a/libcxx/test/std/thread/futures/futures.shared_future/copy_ctor.pass.cpp b/libcxx/test/std/thread/futures/futures.shared_future/copy_ctor.pass.cpp index 2878c40d10ba3..01b5572e3f3b5 100644 --- a/libcxx/test/std/thread/futures/futures.shared_future/copy_ctor.pass.cpp +++ b/libcxx/test/std/thread/futures/futures.shared_future/copy_ctor.pass.cpp @@ -21,7 +21,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { { typedef int T; @@ -71,4 +71,6 @@ int main() assert(!f0.valid()); assert(!f.valid()); } + + return 0; } diff --git a/libcxx/test/std/thread/futures/futures.shared_future/ctor_future.pass.cpp b/libcxx/test/std/thread/futures/futures.shared_future/ctor_future.pass.cpp index 10b84a4118ad9..b75450cb9e97d 100644 --- a/libcxx/test/std/thread/futures/futures.shared_future/ctor_future.pass.cpp +++ b/libcxx/test/std/thread/futures/futures.shared_future/ctor_future.pass.cpp @@ -18,7 +18,7 @@ #include #include -int main() +int main(int, char**) { { typedef int T; @@ -65,4 +65,6 @@ int main() assert(!f0.valid()); assert(!f.valid()); } + + return 0; } diff --git a/libcxx/test/std/thread/futures/futures.shared_future/default.pass.cpp b/libcxx/test/std/thread/futures/futures.shared_future/default.pass.cpp index 2229ee58e3ddb..0387b97a70c8c 100644 --- a/libcxx/test/std/thread/futures/futures.shared_future/default.pass.cpp +++ b/libcxx/test/std/thread/futures/futures.shared_future/default.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { { std::shared_future f; @@ -31,4 +31,6 @@ int main() std::shared_future f; assert(!f.valid()); } + + return 0; } diff --git a/libcxx/test/std/thread/futures/futures.shared_future/dtor.pass.cpp b/libcxx/test/std/thread/futures/futures.shared_future/dtor.pass.cpp index 964180b989802..fe49c2208ee97 100644 --- a/libcxx/test/std/thread/futures/futures.shared_future/dtor.pass.cpp +++ b/libcxx/test/std/thread/futures/futures.shared_future/dtor.pass.cpp @@ -21,7 +21,7 @@ #include "test_allocator.h" -int main() +int main(int, char**) { assert(test_alloc_base::alloc_count == 0); { @@ -66,4 +66,6 @@ int main() assert(f.valid()); } assert(test_alloc_base::alloc_count == 0); + + return 0; } diff --git a/libcxx/test/std/thread/futures/futures.shared_future/get.pass.cpp b/libcxx/test/std/thread/futures/futures.shared_future/get.pass.cpp index b7767b379aca0..038ca71510f3f 100644 --- a/libcxx/test/std/thread/futures/futures.shared_future/get.pass.cpp +++ b/libcxx/test/std/thread/futures/futures.shared_future/get.pass.cpp @@ -61,7 +61,7 @@ void func6(std::promise p) p.set_exception(std::make_exception_ptr('c')); } -int main() +int main(int, char**) { { typedef int T; @@ -150,4 +150,6 @@ int main() } #endif } + + return 0; } diff --git a/libcxx/test/std/thread/futures/futures.shared_future/move_assign.pass.cpp b/libcxx/test/std/thread/futures/futures.shared_future/move_assign.pass.cpp index b68ee6921de02..3940530528db7 100644 --- a/libcxx/test/std/thread/futures/futures.shared_future/move_assign.pass.cpp +++ b/libcxx/test/std/thread/futures/futures.shared_future/move_assign.pass.cpp @@ -18,7 +18,7 @@ #include #include -int main() +int main(int, char**) { { typedef int T; @@ -71,4 +71,6 @@ int main() assert(!f0.valid()); assert(!f.valid()); } + + return 0; } diff --git a/libcxx/test/std/thread/futures/futures.shared_future/move_ctor.pass.cpp b/libcxx/test/std/thread/futures/futures.shared_future/move_ctor.pass.cpp index c2b52dc1b18d2..e1d982d0ee10a 100644 --- a/libcxx/test/std/thread/futures/futures.shared_future/move_ctor.pass.cpp +++ b/libcxx/test/std/thread/futures/futures.shared_future/move_ctor.pass.cpp @@ -18,7 +18,7 @@ #include #include -int main() +int main(int, char**) { { typedef int T; @@ -65,4 +65,6 @@ int main() assert(!f0.valid()); assert(!f.valid()); } + + return 0; } diff --git a/libcxx/test/std/thread/futures/futures.shared_future/wait.pass.cpp b/libcxx/test/std/thread/futures/futures.shared_future/wait.pass.cpp index 11dc4ba3d1396..f78ca6bfc4205 100644 --- a/libcxx/test/std/thread/futures/futures.shared_future/wait.pass.cpp +++ b/libcxx/test/std/thread/futures/futures.shared_future/wait.pass.cpp @@ -39,7 +39,7 @@ void func5(std::promise p) p.set_value(); } -int main() +int main(int, char**) { typedef std::chrono::high_resolution_clock Clock; typedef std::chrono::duration ms; @@ -85,4 +85,6 @@ int main() assert(f.valid()); assert(t1-t0 < ms(5)); } + + return 0; } diff --git a/libcxx/test/std/thread/futures/futures.shared_future/wait_for.pass.cpp b/libcxx/test/std/thread/futures/futures.shared_future/wait_for.pass.cpp index 4fbd8ae797701..913127af3272a 100644 --- a/libcxx/test/std/thread/futures/futures.shared_future/wait_for.pass.cpp +++ b/libcxx/test/std/thread/futures/futures.shared_future/wait_for.pass.cpp @@ -43,7 +43,7 @@ void func5(std::promise p) p.set_value(); } -int main() +int main(int, char**) { typedef std::chrono::high_resolution_clock Clock; { @@ -94,4 +94,6 @@ int main() assert(f.valid()); assert(t1-t0 < ms(5)); } + + return 0; } diff --git a/libcxx/test/std/thread/futures/futures.shared_future/wait_until.pass.cpp b/libcxx/test/std/thread/futures/futures.shared_future/wait_until.pass.cpp index 02b0ce716e012..09787fedc3a63 100644 --- a/libcxx/test/std/thread/futures/futures.shared_future/wait_until.pass.cpp +++ b/libcxx/test/std/thread/futures/futures.shared_future/wait_until.pass.cpp @@ -62,7 +62,7 @@ void func5(std::promise p) set_worker_thread_state(WorkerThreadState::Exiting); } -int main() +int main(int, char**) { typedef std::chrono::high_resolution_clock Clock; { @@ -128,4 +128,6 @@ int main() assert(f.valid()); assert(t1-t0 < ms(5)); } + + return 0; } diff --git a/libcxx/test/std/thread/futures/futures.state/nothing_to_do.pass.cpp b/libcxx/test/std/thread/futures/futures.state/nothing_to_do.pass.cpp index 02fe32ece4841..779762e7e995d 100644 --- a/libcxx/test/std/thread/futures/futures.state/nothing_to_do.pass.cpp +++ b/libcxx/test/std/thread/futures/futures.state/nothing_to_do.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/thread/futures/futures.task/futures.task.members/assign_copy.fail.cpp b/libcxx/test/std/thread/futures/futures.task/futures.task.members/assign_copy.fail.cpp index b14f2381a8dea..a8b8581893dd5 100644 --- a/libcxx/test/std/thread/futures/futures.task/futures.task.members/assign_copy.fail.cpp +++ b/libcxx/test/std/thread/futures/futures.task/futures.task.members/assign_copy.fail.cpp @@ -17,10 +17,12 @@ #include -int main() +int main(int, char**) { { std::packaged_task p0, p; p = p0; // expected-error {{overload resolution selected deleted operator '='}} } + + return 0; } diff --git a/libcxx/test/std/thread/futures/futures.task/futures.task.members/assign_move.pass.cpp b/libcxx/test/std/thread/futures/futures.task/futures.task.members/assign_move.pass.cpp index 655a9d7f8daa7..9da7a96e241c1 100644 --- a/libcxx/test/std/thread/futures/futures.task/futures.task.members/assign_move.pass.cpp +++ b/libcxx/test/std/thread/futures/futures.task/futures.task.members/assign_move.pass.cpp @@ -28,7 +28,7 @@ class A long operator()(long i, long j) const {return data_ + i + j;} }; -int main() +int main(int, char**) { { std::packaged_task p0(A(5)); @@ -47,4 +47,6 @@ int main() assert(!p0.valid()); assert(!p.valid()); } + + return 0; } diff --git a/libcxx/test/std/thread/futures/futures.task/futures.task.members/ctor1.fail.cpp b/libcxx/test/std/thread/futures/futures.task/futures.task.members/ctor1.fail.cpp index fbe3b55a81d75..ec081dc328ef8 100644 --- a/libcxx/test/std/thread/futures/futures.task/futures.task.members/ctor1.fail.cpp +++ b/libcxx/test/std/thread/futures/futures.task/futures.task.members/ctor1.fail.cpp @@ -25,11 +25,13 @@ typedef std::packaged_task PT; typedef volatile std::packaged_task VPT; -int main() +int main(int, char**) { VPT init{}; auto const& c_init = init; PT p1{init}; // expected-error {{no matching constructor}} PT p2{c_init}; // expected-error {{no matching constructor}} PT p3{std::move(init)}; // expected-error {{no matching constructor for initialization of 'PT' (aka 'packaged_task')}} + + return 0; } diff --git a/libcxx/test/std/thread/futures/futures.task/futures.task.members/ctor2.fail.cpp b/libcxx/test/std/thread/futures/futures.task/futures.task.members/ctor2.fail.cpp index cae4e1afd45c5..76273a3eaa79d 100644 --- a/libcxx/test/std/thread/futures/futures.task/futures.task.members/ctor2.fail.cpp +++ b/libcxx/test/std/thread/futures/futures.task/futures.task.members/ctor2.fail.cpp @@ -26,8 +26,10 @@ struct A {}; typedef std::packaged_task PT; typedef volatile std::packaged_task VPT; -int main() +int main(int, char**) { PT p { std::allocator_arg_t{}, test_allocator{}, VPT {}}; // expected-error {{no matching constructor for initialization of 'PT' (aka 'packaged_task')}} // expected-note-re@future:* 1 {{candidate template ignored: {{(disabled by 'enable_if')|(requirement '.*' was not satisfied)}}}} + + return 0; } diff --git a/libcxx/test/std/thread/futures/futures.task/futures.task.members/ctor_copy.fail.cpp b/libcxx/test/std/thread/futures/futures.task/futures.task.members/ctor_copy.fail.cpp index 6416df4de91b2..0816a1cc5b644 100644 --- a/libcxx/test/std/thread/futures/futures.task/futures.task.members/ctor_copy.fail.cpp +++ b/libcxx/test/std/thread/futures/futures.task/futures.task.members/ctor_copy.fail.cpp @@ -18,10 +18,12 @@ #include -int main() +int main(int, char**) { { std::packaged_task p0; std::packaged_task p(p0); // expected-error {{call to deleted constructor of 'std::packaged_task'}} } + + return 0; } diff --git a/libcxx/test/std/thread/futures/futures.task/futures.task.members/ctor_default.pass.cpp b/libcxx/test/std/thread/futures/futures.task/futures.task.members/ctor_default.pass.cpp index 30c45eaab5163..5472c717adce4 100644 --- a/libcxx/test/std/thread/futures/futures.task/futures.task.members/ctor_default.pass.cpp +++ b/libcxx/test/std/thread/futures/futures.task/futures.task.members/ctor_default.pass.cpp @@ -20,8 +20,10 @@ struct A {}; -int main() +int main(int, char**) { std::packaged_task p; assert(!p.valid()); + + return 0; } diff --git a/libcxx/test/std/thread/futures/futures.task/futures.task.members/ctor_func.pass.cpp b/libcxx/test/std/thread/futures/futures.task/futures.task.members/ctor_func.pass.cpp index 3da276ba8c3f4..20ee8b4b4d2d6 100644 --- a/libcxx/test/std/thread/futures/futures.task/futures.task.members/ctor_func.pass.cpp +++ b/libcxx/test/std/thread/futures/futures.task/futures.task.members/ctor_func.pass.cpp @@ -39,7 +39,7 @@ int A::n_copies = 0; int func(int i) { return i; } -int main() +int main(int, char**) { { std::packaged_task p(A(5)); @@ -76,4 +76,6 @@ int main() p(4); assert(f.get() == 4); } + + return 0; } diff --git a/libcxx/test/std/thread/futures/futures.task/futures.task.members/ctor_func_alloc.pass.cpp b/libcxx/test/std/thread/futures/futures.task/futures.task.members/ctor_func_alloc.pass.cpp index 334ed8f9806ca..766987ce0dfc3 100644 --- a/libcxx/test/std/thread/futures/futures.task/futures.task.members/ctor_func_alloc.pass.cpp +++ b/libcxx/test/std/thread/futures/futures.task/futures.task.members/ctor_func_alloc.pass.cpp @@ -44,7 +44,7 @@ int A::n_copies = 0; int func(int i) { return i; } -int main() +int main(int, char**) { { std::packaged_task p(std::allocator_arg, @@ -123,4 +123,6 @@ int main() } A::n_copies = 0; A::n_moves = 0; + + return 0; } diff --git a/libcxx/test/std/thread/futures/futures.task/futures.task.members/ctor_move.pass.cpp b/libcxx/test/std/thread/futures/futures.task/futures.task.members/ctor_move.pass.cpp index e2e44473ef275..c517182d3ad78 100644 --- a/libcxx/test/std/thread/futures/futures.task/futures.task.members/ctor_move.pass.cpp +++ b/libcxx/test/std/thread/futures/futures.task/futures.task.members/ctor_move.pass.cpp @@ -28,7 +28,7 @@ class A long operator()(long i, long j) const {return data_ + i + j;} }; -int main() +int main(int, char**) { { std::packaged_task p0(A(5)); @@ -45,4 +45,6 @@ int main() assert(!p0.valid()); assert(!p.valid()); } + + return 0; } diff --git a/libcxx/test/std/thread/futures/futures.task/futures.task.members/dtor.pass.cpp b/libcxx/test/std/thread/futures/futures.task/futures.task.members/dtor.pass.cpp index e910d7c4ce8e0..3b794b7f6c9e6 100644 --- a/libcxx/test/std/thread/futures/futures.task/futures.task.members/dtor.pass.cpp +++ b/libcxx/test/std/thread/futures/futures.task/futures.task.members/dtor.pass.cpp @@ -39,7 +39,7 @@ void func2(std::packaged_task p) p(3, 'a'); } -int main() +int main(int, char**) { #ifndef TEST_HAS_NO_EXCEPTIONS { @@ -64,4 +64,6 @@ int main() std::thread(func2, std::move(p)).detach(); assert(f.get() == 105.0); } + + return 0; } diff --git a/libcxx/test/std/thread/futures/futures.task/futures.task.members/get_future.pass.cpp b/libcxx/test/std/thread/futures/futures.task/futures.task.members/get_future.pass.cpp index a4c9c7af490ae..8713db0a7e8d4 100644 --- a/libcxx/test/std/thread/futures/futures.task/futures.task.members/get_future.pass.cpp +++ b/libcxx/test/std/thread/futures/futures.task/futures.task.members/get_future.pass.cpp @@ -30,7 +30,7 @@ class A long operator()(long i, long j) const {return data_ + i + j;} }; -int main() +int main(int, char**) { { std::packaged_task p(A(5)); @@ -65,4 +65,6 @@ int main() } } #endif + + return 0; } diff --git a/libcxx/test/std/thread/futures/futures.task/futures.task.members/make_ready_at_thread_exit.pass.cpp b/libcxx/test/std/thread/futures/futures.task/futures.task.members/make_ready_at_thread_exit.pass.cpp index 21a567ca0bd3b..470099522985b 100644 --- a/libcxx/test/std/thread/futures/futures.task/futures.task.members/make_ready_at_thread_exit.pass.cpp +++ b/libcxx/test/std/thread/futures/futures.task/futures.task.members/make_ready_at_thread_exit.pass.cpp @@ -80,7 +80,7 @@ void func3(std::packaged_task p) #endif } -int main() +int main(int, char**) { { std::packaged_task p(A(5)); @@ -115,4 +115,6 @@ int main() t.join(); } #endif + + return 0; } diff --git a/libcxx/test/std/thread/futures/futures.task/futures.task.members/operator.pass.cpp b/libcxx/test/std/thread/futures/futures.task/futures.task.members/operator.pass.cpp index e148ddfc97a91..536888057a99f 100644 --- a/libcxx/test/std/thread/futures/futures.task/futures.task.members/operator.pass.cpp +++ b/libcxx/test/std/thread/futures/futures.task/futures.task.members/operator.pass.cpp @@ -80,7 +80,7 @@ void func3(std::packaged_task p) #endif } -int main() +int main(int, char**) { { std::packaged_task p(A(5)); @@ -116,4 +116,6 @@ int main() t.join(); } #endif + + return 0; } diff --git a/libcxx/test/std/thread/futures/futures.task/futures.task.members/reset.pass.cpp b/libcxx/test/std/thread/futures/futures.task/futures.task.members/reset.pass.cpp index 7e4dd5522ca30..e9f59cdfe3cc3 100644 --- a/libcxx/test/std/thread/futures/futures.task/futures.task.members/reset.pass.cpp +++ b/libcxx/test/std/thread/futures/futures.task/futures.task.members/reset.pass.cpp @@ -33,7 +33,7 @@ class A } }; -int main() +int main(int, char**) { { std::packaged_task p(A(5)); @@ -59,4 +59,6 @@ int main() } } #endif + + return 0; } diff --git a/libcxx/test/std/thread/futures/futures.task/futures.task.members/swap.pass.cpp b/libcxx/test/std/thread/futures/futures.task/futures.task.members/swap.pass.cpp index 22e680f2acaa6..2cd97900df721 100644 --- a/libcxx/test/std/thread/futures/futures.task/futures.task.members/swap.pass.cpp +++ b/libcxx/test/std/thread/futures/futures.task/futures.task.members/swap.pass.cpp @@ -28,7 +28,7 @@ class A long operator()(long i, long j) const {return data_ + i + j;} }; -int main() +int main(int, char**) { { std::packaged_task p0(A(5)); @@ -47,4 +47,6 @@ int main() assert(!p0.valid()); assert(!p.valid()); } + + return 0; } diff --git a/libcxx/test/std/thread/futures/futures.task/futures.task.nonmembers/swap.pass.cpp b/libcxx/test/std/thread/futures/futures.task/futures.task.nonmembers/swap.pass.cpp index b344398fe52ba..8c1c19eca6208 100644 --- a/libcxx/test/std/thread/futures/futures.task/futures.task.nonmembers/swap.pass.cpp +++ b/libcxx/test/std/thread/futures/futures.task/futures.task.nonmembers/swap.pass.cpp @@ -30,7 +30,7 @@ class A long operator()(long i, long j) const {return data_ + i + j;} }; -int main() +int main(int, char**) { { std::packaged_task p0(A(5)); @@ -49,4 +49,6 @@ int main() assert(!p0.valid()); assert(!p.valid()); } + + return 0; } diff --git a/libcxx/test/std/thread/futures/futures.task/futures.task.nonmembers/uses_allocator.pass.cpp b/libcxx/test/std/thread/futures/futures.task/futures.task.nonmembers/uses_allocator.pass.cpp index 24727b5d32bde..5257a7008cd2d 100644 --- a/libcxx/test/std/thread/futures/futures.task/futures.task.nonmembers/uses_allocator.pass.cpp +++ b/libcxx/test/std/thread/futures/futures.task/futures.task.nonmembers/uses_allocator.pass.cpp @@ -27,7 +27,9 @@ #include #include "test_allocator.h" -int main() +int main(int, char**) { static_assert((std::uses_allocator, test_allocator >::value), ""); + + return 0; } diff --git a/libcxx/test/std/thread/futures/futures.unique_future/copy_assign.fail.cpp b/libcxx/test/std/thread/futures/futures.unique_future/copy_assign.fail.cpp index 63e92f0214036..3a1a4d6be6c1e 100644 --- a/libcxx/test/std/thread/futures/futures.unique_future/copy_assign.fail.cpp +++ b/libcxx/test/std/thread/futures/futures.unique_future/copy_assign.fail.cpp @@ -18,7 +18,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { #if TEST_STD_VER >= 11 { @@ -47,4 +47,6 @@ int main() f = f0; // expected-error {{'operator=' is a private member of 'std::__1::future'}} } #endif + + return 0; } diff --git a/libcxx/test/std/thread/futures/futures.unique_future/copy_ctor.fail.cpp b/libcxx/test/std/thread/futures/futures.unique_future/copy_ctor.fail.cpp index 0d1a5884b933a..4a8b98c1982e5 100644 --- a/libcxx/test/std/thread/futures/futures.unique_future/copy_ctor.fail.cpp +++ b/libcxx/test/std/thread/futures/futures.unique_future/copy_ctor.fail.cpp @@ -18,7 +18,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { #if TEST_STD_VER >= 11 { @@ -47,4 +47,6 @@ int main() std::future f = f0; // expected-error {{calling a private constructor of class 'std::__1::future'}} } #endif + + return 0; } diff --git a/libcxx/test/std/thread/futures/futures.unique_future/default.pass.cpp b/libcxx/test/std/thread/futures/futures.unique_future/default.pass.cpp index 0f11aa3340729..60ef645e3c955 100644 --- a/libcxx/test/std/thread/futures/futures.unique_future/default.pass.cpp +++ b/libcxx/test/std/thread/futures/futures.unique_future/default.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { { std::future f; @@ -31,4 +31,6 @@ int main() std::future f; assert(!f.valid()); } + + return 0; } diff --git a/libcxx/test/std/thread/futures/futures.unique_future/dtor.pass.cpp b/libcxx/test/std/thread/futures/futures.unique_future/dtor.pass.cpp index 4105d3f906367..ec27219daffbf 100644 --- a/libcxx/test/std/thread/futures/futures.unique_future/dtor.pass.cpp +++ b/libcxx/test/std/thread/futures/futures.unique_future/dtor.pass.cpp @@ -21,7 +21,7 @@ #include "test_allocator.h" -int main() +int main(int, char**) { assert(test_alloc_base::alloc_count == 0); { @@ -66,4 +66,6 @@ int main() assert(f.valid()); } assert(test_alloc_base::alloc_count == 0); + + return 0; } diff --git a/libcxx/test/std/thread/futures/futures.unique_future/get.pass.cpp b/libcxx/test/std/thread/futures/futures.unique_future/get.pass.cpp index 3d50d896a8938..2e3e326489779 100644 --- a/libcxx/test/std/thread/futures/futures.unique_future/get.pass.cpp +++ b/libcxx/test/std/thread/futures/futures.unique_future/get.pass.cpp @@ -61,7 +61,7 @@ void func6(std::promise p) p.set_exception(std::make_exception_ptr('c')); } -int main() +int main(int, char**) { { typedef int T; @@ -150,4 +150,6 @@ int main() } #endif } + + return 0; } diff --git a/libcxx/test/std/thread/futures/futures.unique_future/move_assign.pass.cpp b/libcxx/test/std/thread/futures/futures.unique_future/move_assign.pass.cpp index 7d2ad6218a293..b0f0e2b5c54b2 100644 --- a/libcxx/test/std/thread/futures/futures.unique_future/move_assign.pass.cpp +++ b/libcxx/test/std/thread/futures/futures.unique_future/move_assign.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { { typedef int T; @@ -70,4 +70,6 @@ int main() assert(!f0.valid()); assert(!f.valid()); } + + return 0; } diff --git a/libcxx/test/std/thread/futures/futures.unique_future/move_ctor.pass.cpp b/libcxx/test/std/thread/futures/futures.unique_future/move_ctor.pass.cpp index 0b0e4913cf524..aca5dda64f59b 100644 --- a/libcxx/test/std/thread/futures/futures.unique_future/move_ctor.pass.cpp +++ b/libcxx/test/std/thread/futures/futures.unique_future/move_ctor.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { { typedef int T; @@ -64,4 +64,6 @@ int main() assert(!f0.valid()); assert(!f.valid()); } + + return 0; } diff --git a/libcxx/test/std/thread/futures/futures.unique_future/share.pass.cpp b/libcxx/test/std/thread/futures/futures.unique_future/share.pass.cpp index 392a43a476344..979f93cccf7b7 100644 --- a/libcxx/test/std/thread/futures/futures.unique_future/share.pass.cpp +++ b/libcxx/test/std/thread/futures/futures.unique_future/share.pass.cpp @@ -18,7 +18,7 @@ #include #include -int main() +int main(int, char**) { { typedef int T; @@ -71,4 +71,6 @@ int main() assert(!f0.valid()); assert(!f.valid()); } + + return 0; } diff --git a/libcxx/test/std/thread/futures/futures.unique_future/wait.pass.cpp b/libcxx/test/std/thread/futures/futures.unique_future/wait.pass.cpp index 0ec23f27ed0f6..11fc80868f6d4 100644 --- a/libcxx/test/std/thread/futures/futures.unique_future/wait.pass.cpp +++ b/libcxx/test/std/thread/futures/futures.unique_future/wait.pass.cpp @@ -39,7 +39,7 @@ void func5(std::promise p) p.set_value(); } -int main() +int main(int, char**) { typedef std::chrono::high_resolution_clock Clock; typedef std::chrono::duration ms; @@ -85,4 +85,6 @@ int main() assert(f.valid()); assert(t1-t0 < ms(5)); } + + return 0; } diff --git a/libcxx/test/std/thread/futures/futures.unique_future/wait_for.pass.cpp b/libcxx/test/std/thread/futures/futures.unique_future/wait_for.pass.cpp index 5b8a01aaf16be..91f962fd18f81 100644 --- a/libcxx/test/std/thread/futures/futures.unique_future/wait_for.pass.cpp +++ b/libcxx/test/std/thread/futures/futures.unique_future/wait_for.pass.cpp @@ -43,7 +43,7 @@ void func5(std::promise p) p.set_value(); } -int main() +int main(int, char**) { typedef std::chrono::high_resolution_clock Clock; { @@ -94,4 +94,6 @@ int main() assert(f.valid()); assert(t1-t0 < ms(50)); } + + return 0; } diff --git a/libcxx/test/std/thread/futures/futures.unique_future/wait_until.pass.cpp b/libcxx/test/std/thread/futures/futures.unique_future/wait_until.pass.cpp index 79da1c0e3ee5e..28d9b638aed2d 100644 --- a/libcxx/test/std/thread/futures/futures.unique_future/wait_until.pass.cpp +++ b/libcxx/test/std/thread/futures/futures.unique_future/wait_until.pass.cpp @@ -60,7 +60,7 @@ void func5(std::promise p) set_worker_thread_state(WorkerThreadState::Exiting); } -int main() +int main(int, char**) { typedef std::chrono::high_resolution_clock Clock; { @@ -126,4 +126,6 @@ int main() assert(f.valid()); assert(t1-t0 < ms(5)); } + + return 0; } diff --git a/libcxx/test/std/thread/macro.pass.cpp b/libcxx/test/std/thread/macro.pass.cpp index bfae0bbee5e5f..640db4aaa3ef1 100644 --- a/libcxx/test/std/thread/macro.pass.cpp +++ b/libcxx/test/std/thread/macro.pass.cpp @@ -14,9 +14,11 @@ #include -int main() +int main(int, char**) { #ifndef __STDCPP_THREADS__ #error __STDCPP_THREADS__ is not defined #endif + + return 0; } diff --git a/libcxx/test/std/thread/thread.condition/cv_status.pass.cpp b/libcxx/test/std/thread/thread.condition/cv_status.pass.cpp index af8a10ada41c8..af980c3eed365 100644 --- a/libcxx/test/std/thread/thread.condition/cv_status.pass.cpp +++ b/libcxx/test/std/thread/thread.condition/cv_status.pass.cpp @@ -15,8 +15,10 @@ #include #include -int main() +int main(int, char**) { assert(static_cast(std::cv_status::no_timeout) == 0); assert(static_cast(std::cv_status::timeout) == 1); + + return 0; } diff --git a/libcxx/test/std/thread/thread.condition/notify_all_at_thread_exit.pass.cpp b/libcxx/test/std/thread/thread.condition/notify_all_at_thread_exit.pass.cpp index 22fbc98e2a760..9a0e51e3bfcf0 100644 --- a/libcxx/test/std/thread/thread.condition/notify_all_at_thread_exit.pass.cpp +++ b/libcxx/test/std/thread/thread.condition/notify_all_at_thread_exit.pass.cpp @@ -36,7 +36,7 @@ void func() std::this_thread::sleep_for(ms(300)); } -int main() +int main(int, char**) { std::unique_lock lk(mut); std::thread t(func); @@ -45,4 +45,6 @@ int main() Clock::time_point t1 = Clock::now(); assert(t1-t0 > ms(250)); t.join(); + + return 0; } diff --git a/libcxx/test/std/thread/thread.condition/thread.condition.condvar/assign.fail.cpp b/libcxx/test/std/thread/thread.condition/thread.condition.condvar/assign.fail.cpp index e308b20e87661..a367051fec30a 100644 --- a/libcxx/test/std/thread/thread.condition/thread.condition.condvar/assign.fail.cpp +++ b/libcxx/test/std/thread/thread.condition/thread.condition.condvar/assign.fail.cpp @@ -15,9 +15,11 @@ #include #include -int main() +int main(int, char**) { std::condition_variable cv0; std::condition_variable cv1; cv1 = cv0; + + return 0; } diff --git a/libcxx/test/std/thread/thread.condition/thread.condition.condvar/copy.fail.cpp b/libcxx/test/std/thread/thread.condition/thread.condition.condvar/copy.fail.cpp index d0c4c653dd3ef..f9d6076579202 100644 --- a/libcxx/test/std/thread/thread.condition/thread.condition.condvar/copy.fail.cpp +++ b/libcxx/test/std/thread/thread.condition/thread.condition.condvar/copy.fail.cpp @@ -15,8 +15,10 @@ #include #include -int main() +int main(int, char**) { std::condition_variable cv0; std::condition_variable cv1(cv0); + + return 0; } diff --git a/libcxx/test/std/thread/thread.condition/thread.condition.condvar/default.pass.cpp b/libcxx/test/std/thread/thread.condition/thread.condition.condvar/default.pass.cpp index 879d3c7dcad01..aab97f9e14a76 100644 --- a/libcxx/test/std/thread/thread.condition/thread.condition.condvar/default.pass.cpp +++ b/libcxx/test/std/thread/thread.condition/thread.condition.condvar/default.pass.cpp @@ -17,7 +17,9 @@ #include #include -int main() +int main(int, char**) { std::condition_variable cv; + + return 0; } diff --git a/libcxx/test/std/thread/thread.condition/thread.condition.condvar/destructor.pass.cpp b/libcxx/test/std/thread/thread.condition/thread.condition.condvar/destructor.pass.cpp index 85c83f92ac8e9..6550109fd7954 100644 --- a/libcxx/test/std/thread/thread.condition/thread.condition.condvar/destructor.pass.cpp +++ b/libcxx/test/std/thread/thread.condition/thread.condition.condvar/destructor.pass.cpp @@ -43,7 +43,7 @@ void g() cv->wait(lk); } -int main() +int main(int, char**) { cv = new std::condition_variable; std::thread th2(g); @@ -54,4 +54,6 @@ int main() std::thread th1(f); th1.join(); th2.join(); + + return 0; } diff --git a/libcxx/test/std/thread/thread.condition/thread.condition.condvar/notify_all.pass.cpp b/libcxx/test/std/thread/thread.condition/thread.condition.condvar/notify_all.pass.cpp index c281a9d2097c9..46c53a863f581 100644 --- a/libcxx/test/std/thread/thread.condition/thread.condition.condvar/notify_all.pass.cpp +++ b/libcxx/test/std/thread/thread.condition/thread.condition.condvar/notify_all.pass.cpp @@ -46,7 +46,7 @@ void f2() test2 = 2; } -int main() +int main(int, char**) { std::thread t1(f1); std::thread t2(f2); @@ -65,4 +65,6 @@ int main() t2.join(); assert(test1 == 2); assert(test2 == 2); + + return 0; } diff --git a/libcxx/test/std/thread/thread.condition/thread.condition.condvar/notify_one.pass.cpp b/libcxx/test/std/thread/thread.condition/thread.condition.condvar/notify_one.pass.cpp index f72d36e8abf6f..eb1de67db9fa2 100644 --- a/libcxx/test/std/thread/thread.condition/thread.condition.condvar/notify_one.pass.cpp +++ b/libcxx/test/std/thread/thread.condition/thread.condition.condvar/notify_one.pass.cpp @@ -47,7 +47,7 @@ void f2() test2 = 2; } -int main() +int main(int, char**) { std::thread t1(f1); std::thread t2(f2); @@ -95,4 +95,6 @@ int main() } else assert(false); + + return 0; } diff --git a/libcxx/test/std/thread/thread.condition/thread.condition.condvar/wait.pass.cpp b/libcxx/test/std/thread/thread.condition/thread.condition.condvar/wait.pass.cpp index a34207406411a..03bcfeea94d76 100644 --- a/libcxx/test/std/thread/thread.condition/thread.condition.condvar/wait.pass.cpp +++ b/libcxx/test/std/thread/thread.condition/thread.condition.condvar/wait.pass.cpp @@ -36,7 +36,7 @@ void f() assert(test2 != 0); } -int main() +int main(int, char**) { std::unique_locklk(mut); std::thread t(f); @@ -48,4 +48,6 @@ int main() lk.unlock(); cv.notify_one(); t.join(); + + return 0; } diff --git a/libcxx/test/std/thread/thread.condition/thread.condition.condvar/wait_for.pass.cpp b/libcxx/test/std/thread/thread.condition/thread.condition.condvar/wait_for.pass.cpp index f34b230c2433c..505997fff4630 100644 --- a/libcxx/test/std/thread/thread.condition/thread.condition.condvar/wait_for.pass.cpp +++ b/libcxx/test/std/thread/thread.condition/thread.condition.condvar/wait_for.pass.cpp @@ -59,7 +59,7 @@ void f() ++runs; } -int main() +int main(int, char**) { { std::unique_locklk(mut); @@ -85,4 +85,6 @@ int main() lk.unlock(); t.join(); } + + return 0; } diff --git a/libcxx/test/std/thread/thread.condition/thread.condition.condvar/wait_for_pred.pass.cpp b/libcxx/test/std/thread/thread.condition/thread.condition.condvar/wait_for_pred.pass.cpp index a61b000bdc91d..e92ce4583c554 100644 --- a/libcxx/test/std/thread/thread.condition/thread.condition.condvar/wait_for_pred.pass.cpp +++ b/libcxx/test/std/thread/thread.condition/thread.condition.condvar/wait_for_pred.pass.cpp @@ -66,7 +66,7 @@ void f() ++runs; } -int main() +int main(int, char**) { { std::unique_locklk(mut); @@ -92,4 +92,6 @@ int main() lk.unlock(); t.join(); } + + return 0; } diff --git a/libcxx/test/std/thread/thread.condition/thread.condition.condvar/wait_pred.pass.cpp b/libcxx/test/std/thread/thread.condition/thread.condition.condvar/wait_pred.pass.cpp index f99436a5e29b1..0de8524ed1ed8 100644 --- a/libcxx/test/std/thread/thread.condition/thread.condition.condvar/wait_pred.pass.cpp +++ b/libcxx/test/std/thread/thread.condition/thread.condition.condvar/wait_pred.pass.cpp @@ -46,7 +46,7 @@ void f() assert(test2 != 0); } -int main() +int main(int, char**) { std::unique_locklk(mut); std::thread t(f); @@ -58,4 +58,6 @@ int main() lk.unlock(); cv.notify_one(); t.join(); + + return 0; } diff --git a/libcxx/test/std/thread/thread.condition/thread.condition.condvar/wait_until.pass.cpp b/libcxx/test/std/thread/thread.condition/thread.condition.condvar/wait_until.pass.cpp index f954ae25ee246..7f1bdf827cbff 100644 --- a/libcxx/test/std/thread/thread.condition/thread.condition.condvar/wait_until.pass.cpp +++ b/libcxx/test/std/thread/thread.condition/thread.condition.condvar/wait_until.pass.cpp @@ -72,7 +72,7 @@ void f() ++runs; } -int main() +int main(int, char**) { { std::unique_locklk(mut); @@ -98,4 +98,6 @@ int main() lk.unlock(); t.join(); } + + return 0; } diff --git a/libcxx/test/std/thread/thread.condition/thread.condition.condvar/wait_until_pred.pass.cpp b/libcxx/test/std/thread/thread.condition/thread.condition.condvar/wait_until_pred.pass.cpp index 8307a52c0e39d..f21b1b54bc66a 100644 --- a/libcxx/test/std/thread/thread.condition/thread.condition.condvar/wait_until_pred.pass.cpp +++ b/libcxx/test/std/thread/thread.condition/thread.condition.condvar/wait_until_pred.pass.cpp @@ -85,7 +85,7 @@ void f() ++runs; } -int main() +int main(int, char**) { { std::unique_locklk(mut); @@ -111,4 +111,6 @@ int main() lk.unlock(); t.join(); } + + return 0; } diff --git a/libcxx/test/std/thread/thread.condition/thread.condition.condvarany/assign.fail.cpp b/libcxx/test/std/thread/thread.condition/thread.condition.condvarany/assign.fail.cpp index 214164ea72ac6..0c2adc9a5381c 100644 --- a/libcxx/test/std/thread/thread.condition/thread.condition.condvarany/assign.fail.cpp +++ b/libcxx/test/std/thread/thread.condition/thread.condition.condvarany/assign.fail.cpp @@ -15,9 +15,11 @@ #include #include -int main() +int main(int, char**) { std::condition_variable_any cv0; std::condition_variable_any cv1; cv1 = cv0; + + return 0; } diff --git a/libcxx/test/std/thread/thread.condition/thread.condition.condvarany/copy.fail.cpp b/libcxx/test/std/thread/thread.condition/thread.condition.condvarany/copy.fail.cpp index 6eafc62024f35..5aff93ba0fac9 100644 --- a/libcxx/test/std/thread/thread.condition/thread.condition.condvarany/copy.fail.cpp +++ b/libcxx/test/std/thread/thread.condition/thread.condition.condvarany/copy.fail.cpp @@ -15,8 +15,10 @@ #include #include -int main() +int main(int, char**) { std::condition_variable_any cv0; std::condition_variable_any cv1(cv0); + + return 0; } diff --git a/libcxx/test/std/thread/thread.condition/thread.condition.condvarany/default.pass.cpp b/libcxx/test/std/thread/thread.condition/thread.condition.condvarany/default.pass.cpp index 05ebff0680743..0c35da0321b2f 100644 --- a/libcxx/test/std/thread/thread.condition/thread.condition.condvarany/default.pass.cpp +++ b/libcxx/test/std/thread/thread.condition/thread.condition.condvarany/default.pass.cpp @@ -17,7 +17,9 @@ #include #include -int main() +int main(int, char**) { std::condition_variable_any cv; + + return 0; } diff --git a/libcxx/test/std/thread/thread.condition/thread.condition.condvarany/destructor.pass.cpp b/libcxx/test/std/thread/thread.condition/thread.condition.condvarany/destructor.pass.cpp index 57b3024fe0a30..35580d4293b40 100644 --- a/libcxx/test/std/thread/thread.condition/thread.condition.condvarany/destructor.pass.cpp +++ b/libcxx/test/std/thread/thread.condition/thread.condition.condvarany/destructor.pass.cpp @@ -44,7 +44,7 @@ void g() m.unlock(); } -int main() +int main(int, char**) { cv = new std::condition_variable_any; std::thread th2(g); @@ -55,4 +55,6 @@ int main() std::thread th1(f); th1.join(); th2.join(); + + return 0; } diff --git a/libcxx/test/std/thread/thread.condition/thread.condition.condvarany/notify_all.pass.cpp b/libcxx/test/std/thread/thread.condition/thread.condition.condvarany/notify_all.pass.cpp index cb79d8a6b6c6d..d12c936028859 100644 --- a/libcxx/test/std/thread/thread.condition/thread.condition.condvarany/notify_all.pass.cpp +++ b/libcxx/test/std/thread/thread.condition/thread.condition.condvarany/notify_all.pass.cpp @@ -50,7 +50,7 @@ void f2() test2 = 2; } -int main() +int main(int, char**) { std::thread t1(f1); std::thread t2(f2); @@ -69,4 +69,6 @@ int main() t2.join(); assert(test1 == 2); assert(test2 == 2); + + return 0; } diff --git a/libcxx/test/std/thread/thread.condition/thread.condition.condvarany/notify_one.pass.cpp b/libcxx/test/std/thread/thread.condition/thread.condition.condvarany/notify_one.pass.cpp index e5c0a0943c9ed..27a0f87e59fe7 100644 --- a/libcxx/test/std/thread/thread.condition/thread.condition.condvarany/notify_one.pass.cpp +++ b/libcxx/test/std/thread/thread.condition/thread.condition.condvarany/notify_one.pass.cpp @@ -52,7 +52,7 @@ void f2() test2 = 2; } -int main() +int main(int, char**) { std::thread t1(f1); std::thread t2(f2); @@ -96,4 +96,6 @@ int main() } else assert(false); + + return 0; } diff --git a/libcxx/test/std/thread/thread.condition/thread.condition.condvarany/wait.pass.cpp b/libcxx/test/std/thread/thread.condition/thread.condition.condvarany/wait.pass.cpp index 741094bddfaa8..a3b2e87c9e9eb 100644 --- a/libcxx/test/std/thread/thread.condition/thread.condition.condvarany/wait.pass.cpp +++ b/libcxx/test/std/thread/thread.condition/thread.condition.condvarany/wait.pass.cpp @@ -41,7 +41,7 @@ void f() assert(test2 != 0); } -int main() +int main(int, char**) { L1 lk(m0); std::thread t(f); @@ -53,4 +53,6 @@ int main() lk.unlock(); cv.notify_one(); t.join(); + + return 0; } diff --git a/libcxx/test/std/thread/thread.condition/thread.condition.condvarany/wait_for.pass.cpp b/libcxx/test/std/thread/thread.condition/thread.condition.condvarany/wait_for.pass.cpp index ec4eb3398960d..d472a698feca6 100644 --- a/libcxx/test/std/thread/thread.condition/thread.condition.condvarany/wait_for.pass.cpp +++ b/libcxx/test/std/thread/thread.condition/thread.condition.condvarany/wait_for.pass.cpp @@ -62,7 +62,7 @@ void f() ++runs; } -int main() +int main(int, char**) { { L1 lk(m0); @@ -88,4 +88,6 @@ int main() lk.unlock(); t.join(); } + + return 0; } diff --git a/libcxx/test/std/thread/thread.condition/thread.condition.condvarany/wait_for_pred.pass.cpp b/libcxx/test/std/thread/thread.condition/thread.condition.condvarany/wait_for_pred.pass.cpp index 81d69861fe990..cbf0193ade392 100644 --- a/libcxx/test/std/thread/thread.condition/thread.condition.condvarany/wait_for_pred.pass.cpp +++ b/libcxx/test/std/thread/thread.condition/thread.condition.condvarany/wait_for_pred.pass.cpp @@ -70,7 +70,7 @@ void f() ++runs; } -int main() +int main(int, char**) { { expect_result = true; @@ -98,4 +98,6 @@ int main() lk.unlock(); t.join(); } + + return 0; } diff --git a/libcxx/test/std/thread/thread.condition/thread.condition.condvarany/wait_pred.pass.cpp b/libcxx/test/std/thread/thread.condition/thread.condition.condvarany/wait_pred.pass.cpp index d76cbd443a903..eafc434d0c283 100644 --- a/libcxx/test/std/thread/thread.condition/thread.condition.condvarany/wait_pred.pass.cpp +++ b/libcxx/test/std/thread/thread.condition/thread.condition.condvarany/wait_pred.pass.cpp @@ -50,7 +50,7 @@ void f() assert(test2 != 0); } -int main() +int main(int, char**) { L1 lk(m0); std::thread t(f); @@ -62,4 +62,6 @@ int main() lk.unlock(); cv.notify_one(); t.join(); + + return 0; } diff --git a/libcxx/test/std/thread/thread.condition/thread.condition.condvarany/wait_terminates.sh.cpp b/libcxx/test/std/thread/thread.condition/thread.condition.condvarany/wait_terminates.sh.cpp index 796b66e99b6ab..8afa0515920c7 100644 --- a/libcxx/test/std/thread/thread.condition/thread.condition.condvarany/wait_terminates.sh.cpp +++ b/libcxx/test/std/thread/thread.condition/thread.condition.condvarany/wait_terminates.sh.cpp @@ -109,7 +109,7 @@ void signal_me() { typedef std::chrono::system_clock Clock; typedef std::chrono::milliseconds MS; -int main(int argc, char** argv) { +int main(int argc, char **argv) { assert(argc == 2); int id = std::stoi(argv[1]); assert(id >= 1 && id <= 6); @@ -130,4 +130,6 @@ int main(int argc, char** argv) { } } catch (...) {} assert(false); + + return 0; } diff --git a/libcxx/test/std/thread/thread.condition/thread.condition.condvarany/wait_until.pass.cpp b/libcxx/test/std/thread/thread.condition/thread.condition.condvarany/wait_until.pass.cpp index 276597350f6df..e14944906b710 100644 --- a/libcxx/test/std/thread/thread.condition/thread.condition.condvarany/wait_until.pass.cpp +++ b/libcxx/test/std/thread/thread.condition/thread.condition.condvarany/wait_until.pass.cpp @@ -75,7 +75,7 @@ void f() ++runs; } -int main() +int main(int, char**) { { L1 lk(m0); @@ -101,4 +101,6 @@ int main() lk.unlock(); t.join(); } + + return 0; } diff --git a/libcxx/test/std/thread/thread.condition/thread.condition.condvarany/wait_until_pred.pass.cpp b/libcxx/test/std/thread/thread.condition/thread.condition.condvarany/wait_until_pred.pass.cpp index 0216688d7e2ad..5eb253a75fc56 100644 --- a/libcxx/test/std/thread/thread.condition/thread.condition.condvarany/wait_until_pred.pass.cpp +++ b/libcxx/test/std/thread/thread.condition/thread.condition.condvarany/wait_until_pred.pass.cpp @@ -89,7 +89,7 @@ void f() ++runs; } -int main() +int main(int, char**) { { L1 lk(m0); @@ -115,4 +115,6 @@ int main() lk.unlock(); t.join(); } + + return 0; } diff --git a/libcxx/test/std/thread/thread.general/nothing_to_do.pass.cpp b/libcxx/test/std/thread/thread.general/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/thread/thread.general/nothing_to_do.pass.cpp +++ b/libcxx/test/std/thread/thread.general/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.lock.algorithm/lock.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.lock.algorithm/lock.pass.cpp index 1c7de83494000..207b0753e7262 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.lock.algorithm/lock.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.lock.algorithm/lock.pass.cpp @@ -92,7 +92,7 @@ class L2 bool locked() const {return locked_;} }; -int main() +int main(int, char**) { { L0 l0; @@ -518,4 +518,6 @@ int main() } #endif // TEST_HAS_NO_EXCEPTIONS #endif // TEST_STD_VER >= 11 + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.lock.algorithm/try_lock.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.lock.algorithm/try_lock.pass.cpp index 7856ab96f8b7b..50ff29ce95978 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.lock.algorithm/try_lock.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.lock.algorithm/try_lock.pass.cpp @@ -72,7 +72,7 @@ class L2 bool locked() const {return locked_;} }; -int main() +int main(int, char**) { { L0 l0; @@ -522,4 +522,6 @@ int main() assert(!l3.locked()); } #endif // TEST_STD_VER >= 11 + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.guard/adopt_lock.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.guard/adopt_lock.pass.cpp index 273a4881355d3..fc76eb34eb4ae 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.guard/adopt_lock.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.guard/adopt_lock.pass.cpp @@ -42,11 +42,13 @@ void f() assert(d < ms(50)); // within 50ms } -int main() +int main(int, char**) { m.lock(); std::thread t(f); std::this_thread::sleep_for(ms(250)); m.unlock(); t.join(); + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.guard/assign.fail.cpp b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.guard/assign.fail.cpp index b22e0db9efdb5..2d0f438ed0391 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.guard/assign.fail.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.guard/assign.fail.cpp @@ -14,11 +14,13 @@ #include -int main() +int main(int, char**) { std::mutex m0; std::mutex m1; std::lock_guard lg0(m0); std::lock_guard lg(m1); lg = lg0; + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.guard/copy.fail.cpp b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.guard/copy.fail.cpp index 1852db1e5a09b..e99517e47e8c6 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.guard/copy.fail.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.guard/copy.fail.cpp @@ -14,9 +14,11 @@ #include -int main() +int main(int, char**) { std::mutex m; std::lock_guard lg0(m); std::lock_guard lg(lg0); + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.guard/mutex.fail.cpp b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.guard/mutex.fail.cpp index 52a0397de55b8..383c1539a60bc 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.guard/mutex.fail.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.guard/mutex.fail.cpp @@ -16,8 +16,10 @@ #include -int main() +int main(int, char**) { std::mutex m; std::lock_guard lg = m; // expected-error{{no viable conversion}} + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.guard/mutex.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.guard/mutex.pass.cpp index 84353486bac5d..fa6aa4615aa83 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.guard/mutex.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.guard/mutex.pass.cpp @@ -46,7 +46,7 @@ void f() assert(d < ms(200)); // within 200ms } -int main() +int main(int, char**) { m.lock(); std::thread t(f); @@ -58,4 +58,6 @@ int main() std::lock_guard lg(m); static_assert((std::is_same>::value), "" ); #endif + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.guard/types.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.guard/types.pass.cpp index 745633b55c750..b9cdb4dec5df2 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.guard/types.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.guard/types.pass.cpp @@ -21,8 +21,10 @@ #include #include -int main() +int main(int, char**) { static_assert((std::is_same::mutex_type, std::mutex>::value), ""); + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.scoped/adopt_lock.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.scoped/adopt_lock.pass.cpp index edaf09c5a1dbc..63e0626d532d5 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.scoped/adopt_lock.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.scoped/adopt_lock.pass.cpp @@ -31,7 +31,7 @@ struct TestMutex { TestMutex& operator=(TestMutex const&) = delete; }; -int main() +int main(int, char**) { { using LG = std::scoped_lock<>; @@ -68,4 +68,6 @@ int main() assert(!m1.locked && !m2.locked && !m3.locked); } + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.scoped/assign.fail.cpp b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.scoped/assign.fail.cpp index d88b4dedc933a..66a68bb276557 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.scoped/assign.fail.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.scoped/assign.fail.cpp @@ -18,7 +18,7 @@ #include #include "test_macros.h" -int main() +int main(int, char**) { using M = std::mutex; M m0, m1, m2; @@ -46,4 +46,6 @@ int main() LG lg2(om0, om1, om2); lg1 = lg2; // expected-error{{overload resolution selected deleted operator '='}} } + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.scoped/copy.fail.cpp b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.scoped/copy.fail.cpp index 16938731b7b81..3829d15a6254e 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.scoped/copy.fail.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.scoped/copy.fail.cpp @@ -18,7 +18,7 @@ #include #include "test_macros.h" -int main() +int main(int, char**) { using M = std::mutex; M m0, m1, m2; @@ -42,4 +42,6 @@ int main() const LG Orig(m0, m1, m2); LG Copy(Orig); // expected-error{{call to deleted constructor of 'LG'}} } + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.scoped/mutex.fail.cpp b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.scoped/mutex.fail.cpp index 4f25ec237aa24..0c9258887d3d6 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.scoped/mutex.fail.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.scoped/mutex.fail.cpp @@ -21,7 +21,7 @@ template void test_conversion(LG) {} -int main() +int main(int, char**) { using M = std::mutex; M m0, m1, m2; @@ -49,4 +49,6 @@ int main() LG lg = {m0, m1, m2}; // expected-error{{chosen constructor is explicit in copy-initialization}} test_conversion({n0, n1, n2}); // expected-error{{no matching function for call}} } + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.scoped/mutex.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.scoped/mutex.pass.cpp index 219c389aa0270..3a633c39b0385 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.scoped/mutex.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.scoped/mutex.pass.cpp @@ -61,7 +61,7 @@ struct TestMutexThrows { }; #endif // !defined(TEST_HAS_NO_EXCEPTIONS) -int main() +int main(int, char**) { { using LG = std::scoped_lock<>; @@ -151,4 +151,6 @@ int main() } } #endif + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.scoped/types.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.scoped/types.pass.cpp index 5228ccead8769..62621fccad710 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.scoped/types.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.scoped/types.pass.cpp @@ -36,7 +36,7 @@ constexpr bool has_mutex_type() { return !std::is_same(0)), NAT>::value; } -int main() +int main(int, char**) { { using T = std::scoped_lock<>; @@ -74,4 +74,6 @@ int main() using T = std::scoped_lock; static_assert(!has_mutex_type(), ""); } + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/copy_assign.fail.cpp b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/copy_assign.fail.cpp index ff6c376da2c7c..1b31fbc50d244 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/copy_assign.fail.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/copy_assign.fail.cpp @@ -18,9 +18,11 @@ std::shared_timed_mutex m0; std::shared_timed_mutex m1; -int main() +int main(int, char**) { std::shared_lock lk0(m0); std::shared_lock lk1(m1); lk1 = lk0; + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/copy_ctor.fail.cpp b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/copy_ctor.fail.cpp index 6f1f2e9ab0488..48da3c715fa39 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/copy_ctor.fail.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/copy_ctor.fail.cpp @@ -17,8 +17,10 @@ std::shared_timed_mutex m; -int main() +int main(int, char**) { std::shared_lock lk0(m); std::shared_lock lk = lk0; + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/default.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/default.pass.cpp index 2d571cb51db25..0543ae72e82f7 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/default.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/default.pass.cpp @@ -18,9 +18,11 @@ #include #include -int main() +int main(int, char**) { std::shared_lock ul; assert(!ul.owns_lock()); assert(ul.mutex() == nullptr); + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/move_assign.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/move_assign.pass.cpp index 960948421d28c..999d65f028b31 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/move_assign.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/move_assign.pass.cpp @@ -20,7 +20,7 @@ #include "nasty_containers.hpp" -int main() +int main(int, char**) { { typedef std::shared_timed_mutex M; @@ -46,4 +46,6 @@ int main() assert(lk0.mutex() == nullptr); assert(lk0.owns_lock() == false); } + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/move_ctor.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/move_ctor.pass.cpp index 6be2e774b0069..1f61e21fbcf0a 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/move_ctor.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/move_ctor.pass.cpp @@ -19,7 +19,7 @@ #include #include "nasty_containers.hpp" -int main() +int main(int, char**) { { typedef std::shared_timed_mutex M; @@ -41,4 +41,6 @@ int main() assert(lk0.mutex() == nullptr); assert(lk0.owns_lock() == false); } + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/mutex.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/mutex.pass.cpp index 1204eb1f01802..14c084f008dd0 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/mutex.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/mutex.pass.cpp @@ -71,7 +71,7 @@ void g() assert(d < Tolerance); // within tolerance } -int main() +int main(int, char**) { std::vector v; { @@ -99,4 +99,6 @@ int main() std::shared_lock sl(m); static_assert((std::is_same>::value), "" ); #endif + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/mutex_adopt_lock.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/mutex_adopt_lock.pass.cpp index 2b5fae21bdc22..86d54b5083bf5 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/mutex_adopt_lock.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/mutex_adopt_lock.pass.cpp @@ -19,7 +19,7 @@ #include #include "nasty_containers.hpp" -int main() +int main(int, char**) { { typedef std::shared_timed_mutex M; @@ -37,4 +37,6 @@ int main() assert(lk.mutex() == std::addressof(m)); assert(lk.owns_lock() == true); } + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/mutex_defer_lock.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/mutex_defer_lock.pass.cpp index c7d0a192b7915..5a085d2e6ae15 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/mutex_defer_lock.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/mutex_defer_lock.pass.cpp @@ -19,7 +19,7 @@ #include #include "nasty_containers.hpp" -int main() +int main(int, char**) { { typedef std::shared_timed_mutex M; @@ -35,4 +35,6 @@ int main() assert(lk.mutex() == std::addressof(m)); assert(lk.owns_lock() == false); } + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/mutex_duration.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/mutex_duration.pass.cpp index f633c2e8c65aa..3228f938f9036 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/mutex_duration.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/mutex_duration.pass.cpp @@ -66,7 +66,7 @@ void f2() assert(d < Tolerance); // within 50ms } -int main() +int main(int, char**) { { m.lock(); @@ -88,4 +88,6 @@ int main() for (auto& t : v) t.join(); } + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/mutex_time_point.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/mutex_time_point.pass.cpp index c899cea3e0476..f62e739443a55 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/mutex_time_point.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/mutex_time_point.pass.cpp @@ -65,7 +65,7 @@ void f2() assert(d < Tolerance); // within 50ms } -int main() +int main(int, char**) { { m.lock(); @@ -87,4 +87,6 @@ int main() for (auto& t : v) t.join(); } + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/mutex_try_to_lock.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/mutex_try_to_lock.pass.cpp index 4375a2b9978f4..7dd7c16fe5bca 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/mutex_try_to_lock.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/mutex_try_to_lock.pass.cpp @@ -57,7 +57,7 @@ void f() assert(d < ms(200)); // within 200ms } -int main() +int main(int, char**) { m.lock(); std::vector v; @@ -67,4 +67,6 @@ int main() m.unlock(); for (auto& t : v) t.join(); + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.locking/lock.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.locking/lock.pass.cpp index 7726337c8c788..5f084b21259f0 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.locking/lock.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.locking/lock.pass.cpp @@ -80,7 +80,7 @@ void f() #endif } -int main() +int main(int, char**) { m.lock(); std::vector v; @@ -90,4 +90,6 @@ int main() m.unlock(); for (auto& t : v) t.join(); + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.locking/try_lock.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.locking/try_lock.pass.cpp index 884dd47b09236..488260618bc84 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.locking/try_lock.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.locking/try_lock.pass.cpp @@ -34,7 +34,7 @@ struct mutex mutex m; -int main() +int main(int, char**) { std::shared_lock lk(m, std::defer_lock); assert(lk.try_lock() == true); @@ -67,4 +67,6 @@ int main() assert(e.code().value() == EPERM); } #endif + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.locking/try_lock_for.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.locking/try_lock_for.pass.cpp index e6df4f121f379..b2c1776839b93 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.locking/try_lock_for.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.locking/try_lock_for.pass.cpp @@ -39,7 +39,7 @@ struct mutex mutex m; -int main() +int main(int, char**) { std::shared_lock lk(m, std::defer_lock); assert(lk.try_lock_for(ms(5)) == true); @@ -72,4 +72,6 @@ int main() assert(e.code().value() == EPERM); } #endif + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.locking/try_lock_until.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.locking/try_lock_until.pass.cpp index 74e0ecc23e744..59bcd4a0bd82c 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.locking/try_lock_until.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.locking/try_lock_until.pass.cpp @@ -38,7 +38,7 @@ struct mutex mutex m; -int main() +int main(int, char**) { typedef std::chrono::steady_clock Clock; std::shared_lock lk(m, std::defer_lock); @@ -72,4 +72,6 @@ int main() assert(e.code().value() == EPERM); } #endif + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.locking/unlock.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.locking/unlock.pass.cpp index 6c100470e34f9..b0e337bda5fb2 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.locking/unlock.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.locking/unlock.pass.cpp @@ -30,7 +30,7 @@ struct mutex mutex m; -int main() +int main(int, char**) { std::shared_lock lk(m); lk.unlock(); @@ -59,4 +59,6 @@ int main() assert(e.code().value() == EPERM); } #endif + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.mod/member_swap.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.mod/member_swap.pass.cpp index 22eb3ee48e661..ce385ddbd6615 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.mod/member_swap.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.mod/member_swap.pass.cpp @@ -26,7 +26,7 @@ struct mutex mutex m; -int main() +int main(int, char**) { std::shared_lock lk1(m); std::shared_lock lk2; @@ -36,4 +36,6 @@ int main() assert(lk2.mutex() == &m); assert(lk2.owns_lock() == true); static_assert(noexcept(lk1.swap(lk2)), "member swap must be noexcept"); + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.mod/nonmember_swap.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.mod/nonmember_swap.pass.cpp index 65e05d39f5c5b..cec13f0f2f7e1 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.mod/nonmember_swap.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.mod/nonmember_swap.pass.cpp @@ -27,7 +27,7 @@ struct mutex mutex m; -int main() +int main(int, char**) { std::shared_lock lk1(m); std::shared_lock lk2; @@ -37,4 +37,6 @@ int main() assert(lk2.mutex() == &m); assert(lk2.owns_lock() == true); static_assert(noexcept(swap(lk1, lk2)), "non-member swap must be noexcept"); + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.mod/release.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.mod/release.pass.cpp index d387a83518052..f2e5820cf0c70 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.mod/release.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.mod/release.pass.cpp @@ -31,7 +31,7 @@ int mutex::unlock_count = 0; mutex m; -int main() +int main(int, char**) { std::shared_lock lk(m); assert(lk.mutex() == &m); @@ -44,4 +44,6 @@ int main() assert(mutex::lock_count == 1); assert(mutex::unlock_count == 0); static_assert(noexcept(lk.release()), "release must be noexcept"); + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.obs/mutex.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.obs/mutex.pass.cpp index 28685954ba770..867bae0e37150 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.obs/mutex.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.obs/mutex.pass.cpp @@ -20,7 +20,7 @@ std::shared_timed_mutex m; -int main() +int main(int, char**) { std::shared_lock lk0; assert(lk0.mutex() == nullptr); @@ -29,4 +29,6 @@ int main() lk1.unlock(); assert(lk1.mutex() == &m); static_assert(noexcept(lk0.mutex()), "mutex() must be noexcept"); + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.obs/op_bool.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.obs/op_bool.pass.cpp index 1064d727c69fb..82d737ee5e599 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.obs/op_bool.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.obs/op_bool.pass.cpp @@ -20,7 +20,7 @@ std::shared_timed_mutex m; -int main() +int main(int, char**) { std::shared_lock lk0; assert(static_cast(lk0) == false); @@ -29,4 +29,6 @@ int main() lk1.unlock(); assert(static_cast(lk1) == false); static_assert(noexcept(static_cast(lk0)), "explicit operator bool() must be noexcept"); + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.obs/owns_lock.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.obs/owns_lock.pass.cpp index 36a2c0f835dc2..f949684e834df 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.obs/owns_lock.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.obs/owns_lock.pass.cpp @@ -20,7 +20,7 @@ std::shared_timed_mutex m; -int main() +int main(int, char**) { std::shared_lock lk0; assert(lk0.owns_lock() == false); @@ -29,4 +29,6 @@ int main() lk1.unlock(); assert(lk1.owns_lock() == false); static_assert(noexcept(lk0.owns_lock()), "owns_lock must be noexcept"); + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/types.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/types.pass.cpp index c5be52afea2ae..44d19e8dbb4dc 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/types.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/types.pass.cpp @@ -23,8 +23,10 @@ #include #include -int main() +int main(int, char**) { static_assert((std::is_same::mutex_type, std::mutex>::value), ""); + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/copy_assign.fail.cpp b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/copy_assign.fail.cpp index 0579910465736..799cb61f9b21e 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/copy_assign.fail.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/copy_assign.fail.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::mutex M; @@ -29,4 +29,6 @@ int main() assert(lk0.mutex() == nullptr); assert(lk0.owns_lock() == false); } + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/copy_ctor.fail.cpp b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/copy_ctor.fail.cpp index 12045f9989d58..e258198e60bbf 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/copy_ctor.fail.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/copy_ctor.fail.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::mutex M; @@ -27,4 +27,6 @@ int main() assert(lk0.mutex() == nullptr); assert(lk0.owns_lock() == false); } + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/default.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/default.pass.cpp index 46f4f1e801334..74b2651410233 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/default.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/default.pass.cpp @@ -17,9 +17,11 @@ #include #include -int main() +int main(int, char**) { std::unique_lock ul; assert(!ul.owns_lock()); assert(ul.mutex() == nullptr); + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/move_assign.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/move_assign.pass.cpp index 16b1bd8c554b5..1e663766b10ba 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/move_assign.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/move_assign.pass.cpp @@ -18,7 +18,7 @@ #include #include "nasty_containers.hpp" -int main() +int main(int, char**) { { typedef std::mutex M; @@ -44,4 +44,6 @@ int main() assert(lk0.mutex() == nullptr); assert(lk0.owns_lock() == false); } + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/move_ctor.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/move_ctor.pass.cpp index 2c4993702b10a..8ea0a1f2d461c 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/move_ctor.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/move_ctor.pass.cpp @@ -18,7 +18,7 @@ #include #include "nasty_containers.hpp" -int main() +int main(int, char**) { { typedef std::mutex M; @@ -40,4 +40,6 @@ int main() assert(lk0.mutex() == nullptr); assert(lk0.owns_lock() == false); } + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/mutex.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/mutex.pass.cpp index 30897b3d86213..61c0dacf17a47 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/mutex.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/mutex.pass.cpp @@ -46,7 +46,7 @@ void f() assert(d < ms(50)); // within 50ms } -int main() +int main(int, char**) { m.lock(); std::thread t(f); @@ -58,4 +58,6 @@ int main() std::unique_lock ul(m); static_assert((std::is_same>::value), "" ); #endif + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/mutex_adopt_lock.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/mutex_adopt_lock.pass.cpp index 1c258d6a64a31..d957c6d24b026 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/mutex_adopt_lock.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/mutex_adopt_lock.pass.cpp @@ -18,7 +18,7 @@ #include #include "nasty_containers.hpp" -int main() +int main(int, char**) { { typedef std::mutex M; @@ -36,4 +36,6 @@ int main() assert(lk.mutex() == std::addressof(m)); assert(lk.owns_lock() == true); } + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/mutex_defer_lock.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/mutex_defer_lock.pass.cpp index 5f4ab4e7413c6..af6853160f620 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/mutex_defer_lock.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/mutex_defer_lock.pass.cpp @@ -18,7 +18,7 @@ #include #include "nasty_containers.hpp" -int main() +int main(int, char**) { { typedef std::mutex M; @@ -34,4 +34,6 @@ int main() assert(lk.mutex() == std::addressof(m)); assert(lk.owns_lock() == false); } + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/mutex_duration.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/mutex_duration.pass.cpp index 8fee76b8fe71a..8699dd554affb 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/mutex_duration.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/mutex_duration.pass.cpp @@ -50,7 +50,7 @@ void f2() assert(d < ms(50)); // within 50ms } -int main() +int main(int, char**) { { m.lock(); @@ -66,4 +66,6 @@ int main() m.unlock(); t.join(); } + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/mutex_time_point.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/mutex_time_point.pass.cpp index 4cd2efeba2b3a..ab46dacad3c76 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/mutex_time_point.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/mutex_time_point.pass.cpp @@ -50,7 +50,7 @@ void f2() assert(d < ms(50)); // within 50ms } -int main() +int main(int, char**) { { m.lock(); @@ -66,4 +66,6 @@ int main() m.unlock(); t.join(); } + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/mutex_try_to_lock.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/mutex_try_to_lock.pass.cpp index 3c385808bf3d8..448be8e7e142b 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/mutex_try_to_lock.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/mutex_try_to_lock.pass.cpp @@ -53,11 +53,13 @@ void f() assert(d < ms(200)); // within 200ms } -int main() +int main(int, char**) { m.lock(); std::thread t(f); std::this_thread::sleep_for(ms(250)); m.unlock(); t.join(); + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.locking/lock.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.locking/lock.pass.cpp index 536a0d7d22c01..b8a0c2d343e55 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.locking/lock.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.locking/lock.pass.cpp @@ -66,11 +66,13 @@ void f() #endif } -int main() +int main(int, char**) { m.lock(); std::thread t(f); std::this_thread::sleep_for(ms(250)); m.unlock(); t.join(); + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.locking/try_lock.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.locking/try_lock.pass.cpp index cfc0befcab1da..a6247df7ede89 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.locking/try_lock.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.locking/try_lock.pass.cpp @@ -33,7 +33,7 @@ struct mutex mutex m; -int main() +int main(int, char**) { std::unique_lock lk(m, std::defer_lock); assert(lk.try_lock() == true); @@ -66,4 +66,6 @@ int main() assert(e.code().value() == EPERM); } #endif + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.locking/try_lock_for.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.locking/try_lock_for.pass.cpp index f1a2ef6c41418..a6166ceda869c 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.locking/try_lock_for.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.locking/try_lock_for.pass.cpp @@ -38,7 +38,7 @@ struct mutex mutex m; -int main() +int main(int, char**) { std::unique_lock lk(m, std::defer_lock); assert(lk.try_lock_for(ms(5)) == true); @@ -71,4 +71,6 @@ int main() assert(e.code().value() == EPERM); } #endif + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.locking/try_lock_until.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.locking/try_lock_until.pass.cpp index 60616da935f51..6c7da1c0cdff2 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.locking/try_lock_until.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.locking/try_lock_until.pass.cpp @@ -37,7 +37,7 @@ struct mutex mutex m; -int main() +int main(int, char**) { typedef std::chrono::steady_clock Clock; std::unique_lock lk(m, std::defer_lock); @@ -71,4 +71,6 @@ int main() assert(e.code().value() == EPERM); } #endif + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.locking/unlock.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.locking/unlock.pass.cpp index bb0c00ded28b8..1f0a0e529dc49 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.locking/unlock.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.locking/unlock.pass.cpp @@ -29,7 +29,7 @@ struct mutex mutex m; -int main() +int main(int, char**) { std::unique_lock lk(m); lk.unlock(); @@ -58,4 +58,6 @@ int main() assert(e.code().value() == EPERM); } #endif + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.mod/member_swap.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.mod/member_swap.pass.cpp index 3c89d6cf8e02d..707755f59a8d6 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.mod/member_swap.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.mod/member_swap.pass.cpp @@ -25,7 +25,7 @@ struct mutex mutex m; -int main() +int main(int, char**) { std::unique_lock lk1(m); std::unique_lock lk2; @@ -34,4 +34,6 @@ int main() assert(lk1.owns_lock() == false); assert(lk2.mutex() == &m); assert(lk2.owns_lock() == true); + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.mod/nonmember_swap.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.mod/nonmember_swap.pass.cpp index ea99ba9e5ff3b..1c05657d6babd 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.mod/nonmember_swap.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.mod/nonmember_swap.pass.cpp @@ -26,7 +26,7 @@ struct mutex mutex m; -int main() +int main(int, char**) { std::unique_lock lk1(m); std::unique_lock lk2; @@ -35,4 +35,6 @@ int main() assert(lk1.owns_lock() == false); assert(lk2.mutex() == &m); assert(lk2.owns_lock() == true); + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.mod/release.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.mod/release.pass.cpp index 9dc9ec3a1ab63..9751149b9bd91 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.mod/release.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.mod/release.pass.cpp @@ -30,7 +30,7 @@ int mutex::unlock_count = 0; mutex m; -int main() +int main(int, char**) { std::unique_lock lk(m); assert(lk.mutex() == &m); @@ -42,4 +42,6 @@ int main() assert(lk.owns_lock() == false); assert(mutex::lock_count == 1); assert(mutex::unlock_count == 0); + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.obs/mutex.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.obs/mutex.pass.cpp index 6e6fb6b76ff5e..899f965dfe18a 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.obs/mutex.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.obs/mutex.pass.cpp @@ -19,7 +19,7 @@ std::mutex m; -int main() +int main(int, char**) { std::unique_lock lk0; assert(lk0.mutex() == nullptr); @@ -27,4 +27,6 @@ int main() assert(lk1.mutex() == &m); lk1.unlock(); assert(lk1.mutex() == &m); + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.obs/op_bool.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.obs/op_bool.pass.cpp index 184bc71f5b7cb..1affe8deb19dd 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.obs/op_bool.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.obs/op_bool.pass.cpp @@ -19,7 +19,7 @@ std::mutex m; -int main() +int main(int, char**) { std::unique_lock lk0; assert(static_cast(lk0) == false); @@ -27,4 +27,6 @@ int main() assert(static_cast(lk1) == true); lk1.unlock(); assert(static_cast(lk1) == false); + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.obs/owns_lock.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.obs/owns_lock.pass.cpp index 68f944e2663b6..2c5496b294b34 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.obs/owns_lock.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.obs/owns_lock.pass.cpp @@ -19,7 +19,7 @@ std::mutex m; -int main() +int main(int, char**) { std::unique_lock lk0; assert(lk0.owns_lock() == false); @@ -27,4 +27,6 @@ int main() assert(lk1.owns_lock() == true); lk1.unlock(); assert(lk1.owns_lock() == false); + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/types.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/types.pass.cpp index 44b1265e7ead6..7dc093ac6390a 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/types.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/types.pass.cpp @@ -21,8 +21,10 @@ #include #include -int main() +int main(int, char**) { static_assert((std::is_same::mutex_type, std::mutex>::value), ""); + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.lock/types.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.lock/types.pass.cpp index 8d6a1fbcef9a7..150d9b4aafc61 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.lock/types.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.lock/types.pass.cpp @@ -21,7 +21,7 @@ #include #include -int main() +int main(int, char**) { typedef std::defer_lock_t T1; typedef std::try_to_lock_t T2; @@ -30,4 +30,6 @@ int main() T1 t1 = std::defer_lock; ((void)t1); T2 t2 = std::try_to_lock; ((void)t2); T3 t3 = std::adopt_lock; ((void)t3); + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/nothing_to_do.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/nothing_to_do.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.general/nothing_to_do.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.general/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.general/nothing_to_do.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.general/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/nothing_to_do.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/nothing_to_do.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.class/assign.fail.cpp b/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.class/assign.fail.cpp index d2d34a289ead2..ba09ed1a706ea 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.class/assign.fail.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.class/assign.fail.cpp @@ -14,9 +14,11 @@ #include -int main() +int main(int, char**) { std::mutex m0; std::mutex m1; m1 = m0; + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.class/copy.fail.cpp b/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.class/copy.fail.cpp index 5e1f17dc18672..9edfb7267dee6 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.class/copy.fail.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.class/copy.fail.cpp @@ -14,8 +14,10 @@ #include -int main() +int main(int, char**) { std::mutex m0; std::mutex m1(m0); + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.class/default.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.class/default.pass.cpp index aa8a34b073512..b5a608eeb0cec 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.class/default.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.class/default.pass.cpp @@ -17,8 +17,10 @@ #include #include -int main() +int main(int, char**) { static_assert(std::is_nothrow_default_constructible::value, ""); std::mutex m; + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.class/lock.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.class/lock.pass.cpp index 912b647d3d2c6..dcb4b8ff8591d 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.class/lock.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.class/lock.pass.cpp @@ -41,11 +41,13 @@ void f() assert(d < ms(50)); // within 50ms } -int main() +int main(int, char**) { m.lock(); std::thread t(f); std::this_thread::sleep_for(ms(250)); m.unlock(); t.join(); + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.class/try_lock.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.class/try_lock.pass.cpp index 9d3d53dab3139..71221558331ac 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.class/try_lock.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.class/try_lock.pass.cpp @@ -41,11 +41,13 @@ void f() assert(d < ms(200)); // within 200ms } -int main() +int main(int, char**) { m.lock(); std::thread t(f); std::this_thread::sleep_for(ms(250)); m.unlock(); t.join(); + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.recursive/assign.fail.cpp b/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.recursive/assign.fail.cpp index 613eae74de5e6..0cf3c5bca1e1b 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.recursive/assign.fail.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.recursive/assign.fail.cpp @@ -14,9 +14,11 @@ #include -int main() +int main(int, char**) { std::recursive_mutex m0; std::recursive_mutex m1; m1 = m0; + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.recursive/copy.fail.cpp b/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.recursive/copy.fail.cpp index 812951b46ec88..454d7797373ca 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.recursive/copy.fail.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.recursive/copy.fail.cpp @@ -14,8 +14,10 @@ #include -int main() +int main(int, char**) { std::recursive_mutex m0; std::recursive_mutex m1(m0); + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.recursive/default.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.recursive/default.pass.cpp index 9c63a803703bb..e32c92f0c97b8 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.recursive/default.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.recursive/default.pass.cpp @@ -16,7 +16,9 @@ #include -int main() +int main(int, char**) { std::recursive_mutex m; + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.recursive/lock.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.recursive/lock.pass.cpp index 0342b4c2cf291..f8744a9b750ea 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.recursive/lock.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.recursive/lock.pass.cpp @@ -41,11 +41,13 @@ void f() assert(d < ms(200)); // within 200ms } -int main() +int main(int, char**) { m.lock(); std::thread t(f); std::this_thread::sleep_for(ms(250)); m.unlock(); t.join(); + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.recursive/try_lock.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.recursive/try_lock.pass.cpp index b5b256566f757..092343fe752a4 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.recursive/try_lock.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.recursive/try_lock.pass.cpp @@ -43,11 +43,13 @@ void f() assert(d < ms(200)); // within 200ms } -int main() +int main(int, char**) { m.lock(); std::thread t(f); std::this_thread::sleep_for(ms(250)); m.unlock(); t.join(); + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.shared_mutex.requirements/nothing_to_do.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.shared_mutex.requirements/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.shared_mutex.requirements/nothing_to_do.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.shared_mutex.requirements/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.shared_mutex.requirements/thread.shared_mutex.class/assign.fail.cpp b/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.shared_mutex.requirements/thread.shared_mutex.class/assign.fail.cpp index 6b589f97d9713..337fcdf08b497 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.shared_mutex.requirements/thread.shared_mutex.class/assign.fail.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.shared_mutex.requirements/thread.shared_mutex.class/assign.fail.cpp @@ -17,9 +17,11 @@ #include -int main() +int main(int, char**) { std::shared_mutex m0; std::shared_mutex m1; m1 = m0; // expected-error {{overload resolution selected deleted operator '='}} + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.shared_mutex.requirements/thread.shared_mutex.class/copy.fail.cpp b/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.shared_mutex.requirements/thread.shared_mutex.class/copy.fail.cpp index 0c4fb55f14a41..93d02885a5902 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.shared_mutex.requirements/thread.shared_mutex.class/copy.fail.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.shared_mutex.requirements/thread.shared_mutex.class/copy.fail.cpp @@ -17,8 +17,10 @@ #include -int main() +int main(int, char**) { std::shared_mutex m0; std::shared_mutex m1(m0); // expected-error {{call to deleted constructor of 'std::shared_mutex'}} + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.shared_mutex.requirements/thread.shared_mutex.class/default.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.shared_mutex.requirements/thread.shared_mutex.class/default.pass.cpp index ac8b9b076cbb7..ecd29b7485a74 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.shared_mutex.requirements/thread.shared_mutex.class/default.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.shared_mutex.requirements/thread.shared_mutex.class/default.pass.cpp @@ -17,7 +17,9 @@ #include -int main() +int main(int, char**) { std::shared_mutex m; + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.shared_mutex.requirements/thread.shared_mutex.class/lock.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.shared_mutex.requirements/thread.shared_mutex.class/lock.pass.cpp index 3eb434a803450..74c66d0f672b8 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.shared_mutex.requirements/thread.shared_mutex.class/lock.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.shared_mutex.requirements/thread.shared_mutex.class/lock.pass.cpp @@ -53,11 +53,13 @@ void f() assert(d < Tolerance); // within tolerance } -int main() +int main(int, char**) { m.lock(); std::thread t(f); std::this_thread::sleep_for(WaitTime); m.unlock(); t.join(); + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.shared_mutex.requirements/thread.shared_mutex.class/lock_shared.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.shared_mutex.requirements/thread.shared_mutex.class/lock_shared.pass.cpp index 38be785c8677d..7707af8d8b8fe 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.shared_mutex.requirements/thread.shared_mutex.class/lock_shared.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.shared_mutex.requirements/thread.shared_mutex.class/lock_shared.pass.cpp @@ -65,7 +65,7 @@ void g() } -int main() +int main(int, char**) { m.lock(); std::vector v; @@ -84,4 +84,6 @@ int main() for (auto& t : v) t.join(); q.join(); + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.shared_mutex.requirements/thread.shared_mutex.class/try_lock.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.shared_mutex.requirements/thread.shared_mutex.class/try_lock.pass.cpp index fff58b1ff72d1..9d6b558ffe127 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.shared_mutex.requirements/thread.shared_mutex.class/try_lock.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.shared_mutex.requirements/thread.shared_mutex.class/try_lock.pass.cpp @@ -9,6 +9,8 @@ // UNSUPPORTED: libcpp-has-no-threads // UNSUPPORTED: c++98, c++03, c++11, c++14 +// FLAKY_TEST. + // // class shared_mutex; @@ -42,11 +44,13 @@ void f() assert(d < ms(200)); // within 200ms } -int main() +int main(int, char**) { m.lock(); std::thread t(f); std::this_thread::sleep_for(ms(250)); m.unlock(); t.join(); + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.shared_mutex.requirements/thread.shared_mutex.class/try_lock_shared.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.shared_mutex.requirements/thread.shared_mutex.class/try_lock_shared.pass.cpp index 26bf18868f694..b9538b5649757 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.shared_mutex.requirements/thread.shared_mutex.class/try_lock_shared.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.shared_mutex.requirements/thread.shared_mutex.class/try_lock_shared.pass.cpp @@ -46,7 +46,7 @@ void f() } -int main() +int main(int, char**) { m.lock(); std::vector v; @@ -56,4 +56,6 @@ int main() m.unlock(); for (auto& t : v) t.join(); + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/nothing_to_do.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/nothing_to_do.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/assign.fail.cpp b/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/assign.fail.cpp index c710e0510f774..483111db97e45 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/assign.fail.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/assign.fail.cpp @@ -15,9 +15,11 @@ #include -int main() +int main(int, char**) { std::shared_timed_mutex m0; std::shared_timed_mutex m1; m1 = m0; + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/copy.fail.cpp b/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/copy.fail.cpp index dba5e3114173c..7483b1f519376 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/copy.fail.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/copy.fail.cpp @@ -15,8 +15,10 @@ #include -int main() +int main(int, char**) { std::shared_timed_mutex m0; std::shared_timed_mutex m1(m0); + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/default.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/default.pass.cpp index 8fe432fc19188..83b30b98dd91e 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/default.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/default.pass.cpp @@ -17,7 +17,9 @@ #include -int main() +int main(int, char**) { std::shared_timed_mutex m; + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/lock.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/lock.pass.cpp index c3be2b616636f..56464b24005d9 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/lock.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/lock.pass.cpp @@ -55,11 +55,13 @@ void f() assert(d < ms(50)); // within 50ms } -int main() +int main(int, char**) { m.lock(); std::thread t(f); std::this_thread::sleep_for(ms(250)); m.unlock(); t.join(); + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/lock_shared.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/lock_shared.pass.cpp index 0702ba01c079d..08d35861e4708 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/lock_shared.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/lock_shared.pass.cpp @@ -67,7 +67,7 @@ void g() } -int main() +int main(int, char**) { m.lock(); std::vector v; @@ -86,4 +86,6 @@ int main() for (auto& t : v) t.join(); q.join(); + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/try_lock.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/try_lock.pass.cpp index 4927c3654b743..6b2d9a543e57e 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/try_lock.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/try_lock.pass.cpp @@ -42,11 +42,13 @@ void f() assert(d < ms(200)); // within 200ms } -int main() +int main(int, char**) { m.lock(); std::thread t(f); std::this_thread::sleep_for(ms(250)); m.unlock(); t.join(); + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/try_lock_for.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/try_lock_for.pass.cpp index d2a24fb81cad5..45fea3e96fc66 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/try_lock_for.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/try_lock_for.pass.cpp @@ -64,7 +64,7 @@ void f2() assert(d < Tolerance); // within tolerance } -int main() +int main(int, char**) { { m.lock(); @@ -80,4 +80,6 @@ int main() m.unlock(); t.join(); } + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/try_lock_shared.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/try_lock_shared.pass.cpp index 7e0886de44766..830445af9a01d 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/try_lock_shared.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/try_lock_shared.pass.cpp @@ -54,7 +54,7 @@ void f() assert(d < Tolerance); // within tolerance } -int main() +int main(int, char**) { m.lock(); std::vector v; @@ -64,4 +64,6 @@ int main() m.unlock(); for (auto& t : v) t.join(); + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/try_lock_shared_for.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/try_lock_shared_for.pass.cpp index 250ff9be932ee..d89e4aa8cfc59 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/try_lock_shared_for.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/try_lock_shared_for.pass.cpp @@ -64,7 +64,7 @@ void f2() assert(d < Tolerance); // within 50ms } -int main() +int main(int, char**) { { m.lock(); @@ -86,4 +86,6 @@ int main() for (auto& t : v) t.join(); } + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/try_lock_shared_until.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/try_lock_shared_until.pass.cpp index de6c58463878e..5898fe41e0541 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/try_lock_shared_until.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/try_lock_shared_until.pass.cpp @@ -64,7 +64,7 @@ void f2() assert(d < Tolerance); // within tolerance } -int main() +int main(int, char**) { { m.lock(); @@ -86,4 +86,6 @@ int main() for (auto& t : v) t.join(); } + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/try_lock_until.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/try_lock_until.pass.cpp index 40cdfe844001c..9539215c46fc9 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/try_lock_until.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/try_lock_until.pass.cpp @@ -64,7 +64,7 @@ void f2() assert(d < Tolerance); // within tolerance } -int main() +int main(int, char**) { { m.lock(); @@ -80,4 +80,6 @@ int main() m.unlock(); t.join(); } + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/try_lock_until_deadlock_bug.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/try_lock_until_deadlock_bug.pass.cpp index fb766e1617a3e..865ab92545a6f 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/try_lock_until_deadlock_bug.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/try_lock_until_deadlock_bug.pass.cpp @@ -47,7 +47,7 @@ void blocked_reader() { m.unlock_shared(); } -int main() +int main(int, char**) { typedef std::chrono::steady_clock Clock; @@ -66,4 +66,6 @@ int main() t1.join(); t2.join(); t3.join(); + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.timedmutex.requirements/nothing_to_do.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.timedmutex.requirements/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.timedmutex.requirements/nothing_to_do.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.timedmutex.requirements/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.timedmutex.requirements/thread.timedmutex.class/assign.fail.cpp b/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.timedmutex.requirements/thread.timedmutex.class/assign.fail.cpp index 902b5ec42a6a9..d0fabc678f26c 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.timedmutex.requirements/thread.timedmutex.class/assign.fail.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.timedmutex.requirements/thread.timedmutex.class/assign.fail.cpp @@ -14,9 +14,11 @@ #include -int main() +int main(int, char**) { std::timed_mutex m0; std::timed_mutex m1; m1 = m0; + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.timedmutex.requirements/thread.timedmutex.class/copy.fail.cpp b/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.timedmutex.requirements/thread.timedmutex.class/copy.fail.cpp index 803b330d6a9b6..a3efb2feeeeda 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.timedmutex.requirements/thread.timedmutex.class/copy.fail.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.timedmutex.requirements/thread.timedmutex.class/copy.fail.cpp @@ -14,8 +14,10 @@ #include -int main() +int main(int, char**) { std::timed_mutex m0; std::timed_mutex m1(m0); + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.timedmutex.requirements/thread.timedmutex.class/default.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.timedmutex.requirements/thread.timedmutex.class/default.pass.cpp index aae979043bf1a..c879f192ee18a 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.timedmutex.requirements/thread.timedmutex.class/default.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.timedmutex.requirements/thread.timedmutex.class/default.pass.cpp @@ -16,7 +16,9 @@ #include -int main() +int main(int, char**) { std::timed_mutex m; + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.timedmutex.requirements/thread.timedmutex.class/lock.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.timedmutex.requirements/thread.timedmutex.class/lock.pass.cpp index 7b351829ab416..8ef3a83471bde 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.timedmutex.requirements/thread.timedmutex.class/lock.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.timedmutex.requirements/thread.timedmutex.class/lock.pass.cpp @@ -39,11 +39,13 @@ void f() assert(d < ms(50)); // within 50ms } -int main() +int main(int, char**) { m.lock(); std::thread t(f); std::this_thread::sleep_for(ms(250)); m.unlock(); t.join(); + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.timedmutex.requirements/thread.timedmutex.class/try_lock.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.timedmutex.requirements/thread.timedmutex.class/try_lock.pass.cpp index d61f62635e88c..7398b7f6d0b8d 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.timedmutex.requirements/thread.timedmutex.class/try_lock.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.timedmutex.requirements/thread.timedmutex.class/try_lock.pass.cpp @@ -41,11 +41,13 @@ void f() assert(d < ms(200)); // within 200ms } -int main() +int main(int, char**) { m.lock(); std::thread t(f); std::this_thread::sleep_for(ms(250)); m.unlock(); t.join(); + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.timedmutex.requirements/thread.timedmutex.class/try_lock_for.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.timedmutex.requirements/thread.timedmutex.class/try_lock_for.pass.cpp index 2e050d91702a4..0103cdf64195e 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.timedmutex.requirements/thread.timedmutex.class/try_lock_for.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.timedmutex.requirements/thread.timedmutex.class/try_lock_for.pass.cpp @@ -47,7 +47,7 @@ void f2() assert(d < ms(50)); // within 50ms } -int main() +int main(int, char**) { { m.lock(); @@ -63,4 +63,6 @@ int main() m.unlock(); t.join(); } + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.timedmutex.requirements/thread.timedmutex.class/try_lock_until.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.timedmutex.requirements/thread.timedmutex.class/try_lock_until.pass.cpp index adf711593c421..350bb767d48ea 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.timedmutex.requirements/thread.timedmutex.class/try_lock_until.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.timedmutex.requirements/thread.timedmutex.class/try_lock_until.pass.cpp @@ -47,7 +47,7 @@ void f2() assert(d < ms(50)); // within 50ms } -int main() +int main(int, char**) { { m.lock(); @@ -63,4 +63,6 @@ int main() m.unlock(); t.join(); } + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.timedmutex.requirements/thread.timedmutex.recursive/assign.fail.cpp b/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.timedmutex.requirements/thread.timedmutex.recursive/assign.fail.cpp index e34b2b9980a46..44be06d675413 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.timedmutex.requirements/thread.timedmutex.recursive/assign.fail.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.timedmutex.requirements/thread.timedmutex.recursive/assign.fail.cpp @@ -14,9 +14,11 @@ #include -int main() +int main(int, char**) { std::recursive_timed_mutex m0; std::recursive_timed_mutex m1; m1 = m0; + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.timedmutex.requirements/thread.timedmutex.recursive/copy.fail.cpp b/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.timedmutex.requirements/thread.timedmutex.recursive/copy.fail.cpp index cbdd2eb634af8..154a0192d14db 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.timedmutex.requirements/thread.timedmutex.recursive/copy.fail.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.timedmutex.requirements/thread.timedmutex.recursive/copy.fail.cpp @@ -14,8 +14,10 @@ #include -int main() +int main(int, char**) { std::recursive_timed_mutex m0; std::recursive_timed_mutex m1(m0); + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.timedmutex.requirements/thread.timedmutex.recursive/default.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.timedmutex.requirements/thread.timedmutex.recursive/default.pass.cpp index 98de22eccc8c8..ee6124c027b7e 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.timedmutex.requirements/thread.timedmutex.recursive/default.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.timedmutex.requirements/thread.timedmutex.recursive/default.pass.cpp @@ -16,7 +16,9 @@ #include -int main() +int main(int, char**) { std::recursive_timed_mutex m; + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.timedmutex.requirements/thread.timedmutex.recursive/lock.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.timedmutex.requirements/thread.timedmutex.recursive/lock.pass.cpp index aba747b95206b..adb54872e9bb1 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.timedmutex.requirements/thread.timedmutex.recursive/lock.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.timedmutex.requirements/thread.timedmutex.recursive/lock.pass.cpp @@ -43,11 +43,13 @@ void f() assert(d < ms(50)); // within 50ms } -int main() +int main(int, char**) { m.lock(); std::thread t(f); std::this_thread::sleep_for(ms(250)); m.unlock(); t.join(); + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.timedmutex.requirements/thread.timedmutex.recursive/try_lock.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.timedmutex.requirements/thread.timedmutex.recursive/try_lock.pass.cpp index 9d73bb57f332e..05b22c0deb1ff 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.timedmutex.requirements/thread.timedmutex.recursive/try_lock.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.timedmutex.requirements/thread.timedmutex.recursive/try_lock.pass.cpp @@ -43,11 +43,13 @@ void f() assert(d < ms(200)); // within 200ms } -int main() +int main(int, char**) { m.lock(); std::thread t(f); std::this_thread::sleep_for(ms(250)); m.unlock(); t.join(); + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.timedmutex.requirements/thread.timedmutex.recursive/try_lock_for.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.timedmutex.requirements/thread.timedmutex.recursive/try_lock_for.pass.cpp index feab814953bec..9e5ad5ee9a5da 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.timedmutex.requirements/thread.timedmutex.recursive/try_lock_for.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.timedmutex.requirements/thread.timedmutex.recursive/try_lock_for.pass.cpp @@ -49,7 +49,7 @@ void f2() assert(d < ns(50000000)); // within 50ms } -int main() +int main(int, char**) { { m.lock(); @@ -65,4 +65,6 @@ int main() m.unlock(); t.join(); } + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.timedmutex.requirements/thread.timedmutex.recursive/try_lock_until.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.timedmutex.requirements/thread.timedmutex.recursive/try_lock_until.pass.cpp index b795315b28dc8..f6b9d106a1b76 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.timedmutex.requirements/thread.timedmutex.recursive/try_lock_until.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.timedmutex.requirements/thread.timedmutex.recursive/try_lock_until.pass.cpp @@ -49,7 +49,7 @@ void f2() assert(d < ms(50)); // within 50ms } -int main() +int main(int, char**) { { m.lock(); @@ -65,4 +65,6 @@ int main() m.unlock(); t.join(); } + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.once/nothing_to_do.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.once/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.once/nothing_to_do.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.once/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.once/thread.once.callonce/call_once.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.once/thread.once.callonce/call_once.pass.cpp index be5056e40f7bb..398ee058c128e 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.once/thread.once.callonce/call_once.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.once/thread.once.callonce/call_once.pass.cpp @@ -186,7 +186,7 @@ struct RefQual #endif // TEST_STD_VER >= 11 -int main() +int main(int, char**) { // check basic functionality { @@ -253,4 +253,6 @@ int main() assert(rq.rv_called == 1); } #endif // TEST_STD_VER >= 11 + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.once/thread.once.callonce/race.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.once/thread.once.callonce/race.pass.cpp index ebba7f3d4f46c..511aa3e804b05 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.once/thread.once.callonce/race.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.once/thread.once.callonce/race.pass.cpp @@ -37,11 +37,13 @@ void f0() assert(global == 1); } -int main() +int main(int, char**) { std::thread t0(f0); std::thread t1(f0); t0.join(); t1.join(); assert(global == 1); + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.once/thread.once.onceflag/assign.fail.cpp b/libcxx/test/std/thread/thread.mutex/thread.once/thread.once.onceflag/assign.fail.cpp index dd6fe09c3b81a..40d408d54ce33 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.once/thread.once.onceflag/assign.fail.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.once/thread.once.onceflag/assign.fail.cpp @@ -14,9 +14,11 @@ #include -int main() +int main(int, char**) { std::once_flag f; std::once_flag f2; f2 = f; + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.once/thread.once.onceflag/copy.fail.cpp b/libcxx/test/std/thread/thread.mutex/thread.once/thread.once.onceflag/copy.fail.cpp index ca428ffb438e8..9b7c19a96720d 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.once/thread.once.onceflag/copy.fail.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.once/thread.once.onceflag/copy.fail.cpp @@ -14,8 +14,10 @@ #include -int main() +int main(int, char**) { std::once_flag f; std::once_flag f2(f); + + return 0; } diff --git a/libcxx/test/std/thread/thread.mutex/thread.once/thread.once.onceflag/default.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.once/thread.once.onceflag/default.pass.cpp index 4a1655ffeba48..28d93dc7f383f 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.once/thread.once.onceflag/default.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.once/thread.once.onceflag/default.pass.cpp @@ -15,7 +15,7 @@ #include #include "test_macros.h" -int main() +int main(int, char**) { { std::once_flag f; @@ -27,4 +27,6 @@ int main() (void)f; } #endif + + return 0; } diff --git a/libcxx/test/std/thread/thread.req/nothing_to_do.pass.cpp b/libcxx/test/std/thread/thread.req/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/thread/thread.req/nothing_to_do.pass.cpp +++ b/libcxx/test/std/thread/thread.req/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/thread/thread.req/thread.req.exception/nothing_to_do.pass.cpp b/libcxx/test/std/thread/thread.req/thread.req.exception/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/thread/thread.req/thread.req.exception/nothing_to_do.pass.cpp +++ b/libcxx/test/std/thread/thread.req/thread.req.exception/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/thread/thread.req/thread.req.lockable/nothing_to_do.pass.cpp b/libcxx/test/std/thread/thread.req/thread.req.lockable/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/thread/thread.req/thread.req.lockable/nothing_to_do.pass.cpp +++ b/libcxx/test/std/thread/thread.req/thread.req.lockable/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/thread/thread.req/thread.req.lockable/thread.req.lockable.basic/nothing_to_do.pass.cpp b/libcxx/test/std/thread/thread.req/thread.req.lockable/thread.req.lockable.basic/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/thread/thread.req/thread.req.lockable/thread.req.lockable.basic/nothing_to_do.pass.cpp +++ b/libcxx/test/std/thread/thread.req/thread.req.lockable/thread.req.lockable.basic/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/thread/thread.req/thread.req.lockable/thread.req.lockable.general/nothing_to_do.pass.cpp b/libcxx/test/std/thread/thread.req/thread.req.lockable/thread.req.lockable.general/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/thread/thread.req/thread.req.lockable/thread.req.lockable.general/nothing_to_do.pass.cpp +++ b/libcxx/test/std/thread/thread.req/thread.req.lockable/thread.req.lockable.general/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/thread/thread.req/thread.req.lockable/thread.req.lockable.req/nothing_to_do.pass.cpp b/libcxx/test/std/thread/thread.req/thread.req.lockable/thread.req.lockable.req/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/thread/thread.req/thread.req.lockable/thread.req.lockable.req/nothing_to_do.pass.cpp +++ b/libcxx/test/std/thread/thread.req/thread.req.lockable/thread.req.lockable.req/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/thread/thread.req/thread.req.lockable/thread.req.lockable.timed/nothing_to_do.pass.cpp b/libcxx/test/std/thread/thread.req/thread.req.lockable/thread.req.lockable.timed/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/thread/thread.req/thread.req.lockable/thread.req.lockable.timed/nothing_to_do.pass.cpp +++ b/libcxx/test/std/thread/thread.req/thread.req.lockable/thread.req.lockable.timed/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/thread/thread.req/thread.req.native/nothing_to_do.pass.cpp b/libcxx/test/std/thread/thread.req/thread.req.native/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/thread/thread.req/thread.req.native/nothing_to_do.pass.cpp +++ b/libcxx/test/std/thread/thread.req/thread.req.native/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/thread/thread.req/thread.req.paramname/nothing_to_do.pass.cpp b/libcxx/test/std/thread/thread.req/thread.req.paramname/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/thread/thread.req/thread.req.paramname/nothing_to_do.pass.cpp +++ b/libcxx/test/std/thread/thread.req/thread.req.paramname/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/thread/thread.req/thread.req.timing/nothing_to_do.pass.cpp b/libcxx/test/std/thread/thread.req/thread.req.timing/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/thread/thread.req/thread.req.timing/nothing_to_do.pass.cpp +++ b/libcxx/test/std/thread/thread.req/thread.req.timing/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.algorithm/swap.pass.cpp b/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.algorithm/swap.pass.cpp index 64a4136862734..68f20d7532b5c 100644 --- a/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.algorithm/swap.pass.cpp +++ b/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.algorithm/swap.pass.cpp @@ -41,7 +41,7 @@ class G int G::n_alive = 0; bool G::op_run = false; -int main() +int main(int, char**) { { G g; @@ -54,4 +54,6 @@ int main() assert(t1.get_id() == id0); t1.join(); } + + return 0; } diff --git a/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.assign/copy.fail.cpp b/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.assign/copy.fail.cpp index 1afaaf7bd6128..e67ceea5db619 100644 --- a/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.assign/copy.fail.cpp +++ b/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.assign/copy.fail.cpp @@ -40,11 +40,13 @@ class G int G::n_alive = 0; bool G::op_run = false; -int main() +int main(int, char**) { { std::thread t0(G()); std::thread t1; t1 = t0; } + + return 0; } diff --git a/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.assign/move.pass.cpp b/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.assign/move.pass.cpp index e2f3d38fc065e..cbc32c8c2ce1d 100644 --- a/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.assign/move.pass.cpp +++ b/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.assign/move.pass.cpp @@ -41,7 +41,7 @@ class G int G::n_alive = 0; bool G::op_run = false; -int main() +int main(int, char**) { { assert(G::n_alive == 0); @@ -59,4 +59,6 @@ int main() assert(G::n_alive == 0); assert(G::op_run); } + + return 0; } diff --git a/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.assign/move2.pass.cpp b/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.assign/move2.pass.cpp index 9a4d6e910207f..81c6d77e8a719 100644 --- a/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.assign/move2.pass.cpp +++ b/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.assign/move2.pass.cpp @@ -51,7 +51,7 @@ void f1() std::_Exit(0); } -int main() +int main(int, char**) { std::set_terminate(f1); { @@ -61,4 +61,6 @@ int main() t0 = std::move(t1); assert(false); } + + return 0; } diff --git a/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.constr/F.pass.cpp b/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.constr/F.pass.cpp index af2450f182f52..13c69180a4d67 100644 --- a/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.constr/F.pass.cpp +++ b/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.constr/F.pass.cpp @@ -144,7 +144,7 @@ void test_throwing_new_during_thread_creation() { #endif } -int main() +int main(int, char**) { test_throwing_new_during_thread_creation(); { @@ -200,4 +200,6 @@ int main() t.join(); } #endif + + return 0; } diff --git a/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.constr/constr.fail.cpp b/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.constr/constr.fail.cpp index c24b0413b2086..26231373f80c3 100644 --- a/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.constr/constr.fail.cpp +++ b/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.constr/constr.fail.cpp @@ -18,8 +18,10 @@ #include #include -int main() +int main(int, char**) { volatile std::thread t1; std::thread t2 ( t1, 1, 2.0 ); + + return 0; } diff --git a/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.constr/copy.fail.cpp b/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.constr/copy.fail.cpp index 4a2e6f0d44b31..2a3632cd42fb6 100644 --- a/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.constr/copy.fail.cpp +++ b/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.constr/copy.fail.cpp @@ -48,7 +48,7 @@ class G int G::n_alive = 0; bool G::op_run = false; -int main() +int main(int, char**) { { assert(G::n_alive == 0); @@ -62,4 +62,6 @@ int main() assert(G::n_alive == 0); assert(G::op_run); } + + return 0; } diff --git a/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.constr/default.pass.cpp b/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.constr/default.pass.cpp index d635470db3123..135d3ceba9997 100644 --- a/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.constr/default.pass.cpp +++ b/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.constr/default.pass.cpp @@ -17,8 +17,10 @@ #include #include -int main() +int main(int, char**) { std::thread t; assert(t.get_id() == std::thread::id()); + + return 0; } diff --git a/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.constr/move.pass.cpp b/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.constr/move.pass.cpp index 7e34729b3a747..25703b2c3cabe 100644 --- a/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.constr/move.pass.cpp +++ b/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.constr/move.pass.cpp @@ -50,7 +50,7 @@ class G int G::n_alive = 0; bool G::op_run = false; -int main() +int main(int, char**) { { G g; @@ -66,4 +66,6 @@ int main() assert(G::op_run); } assert(G::n_alive == 0); + + return 0; } diff --git a/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.destr/dtor.pass.cpp b/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.destr/dtor.pass.cpp index 202d61b8f227e..320b4459b94c6 100644 --- a/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.destr/dtor.pass.cpp +++ b/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.destr/dtor.pass.cpp @@ -47,7 +47,7 @@ void f1() std::_Exit(0); } -int main() +int main(int, char**) { std::set_terminate(f1); { @@ -60,4 +60,6 @@ int main() } } assert(false); + + return 0; } diff --git a/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/assign.pass.cpp b/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/assign.pass.cpp index 4447600486a74..fb4b7eb5ae054 100644 --- a/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/assign.pass.cpp +++ b/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/assign.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { std::thread::id id0; std::thread::id id1; @@ -25,4 +25,6 @@ int main() assert(id1 == id0); id1 = std::this_thread::get_id(); assert(id1 != id0); + + return 0; } diff --git a/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/copy.pass.cpp b/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/copy.pass.cpp index 52d4f2cf377db..f95617b4f53ca 100644 --- a/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/copy.pass.cpp +++ b/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/copy.pass.cpp @@ -17,9 +17,11 @@ #include #include -int main() +int main(int, char**) { std::thread::id id0; std::thread::id id1 = id0; assert(id1 == id0); + + return 0; } diff --git a/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/default.pass.cpp b/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/default.pass.cpp index a9778f047d2d9..32a083ca8aae6 100644 --- a/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/default.pass.cpp +++ b/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/default.pass.cpp @@ -17,8 +17,10 @@ #include #include -int main() +int main(int, char**) { std::thread::id id; assert(id == std::thread::id()); + + return 0; } diff --git a/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/enabled_hashes.pass.cpp b/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/enabled_hashes.pass.cpp index 7a2fa869d627b..3858508e1c9a1 100644 --- a/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/enabled_hashes.pass.cpp +++ b/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/enabled_hashes.pass.cpp @@ -18,9 +18,11 @@ #include "poisoned_hash_helper.hpp" -int main() { +int main(int, char**) { test_library_hash_specializations_available(); { test_hash_enabled_for_type(); } + + return 0; } diff --git a/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/eq.pass.cpp b/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/eq.pass.cpp index cf89066a5099f..5c557fddc7f91 100644 --- a/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/eq.pass.cpp +++ b/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/eq.pass.cpp @@ -18,7 +18,7 @@ #include #include -int main() +int main(int, char**) { std::thread::id id0; std::thread::id id1; @@ -28,4 +28,6 @@ int main() id1 = std::this_thread::get_id(); assert(!(id1 == id0)); assert( (id1 != id0)); + + return 0; } diff --git a/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/lt.pass.cpp b/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/lt.pass.cpp index 69ea217b50615..8af73045a792e 100644 --- a/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/lt.pass.cpp +++ b/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/lt.pass.cpp @@ -20,7 +20,7 @@ #include #include -int main() +int main(int, char**) { std::thread::id id0; std::thread::id id1; @@ -39,4 +39,6 @@ int main() assert( (id0 > id2)); assert( (id0 >= id2)); } + + return 0; } diff --git a/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/stream.pass.cpp b/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/stream.pass.cpp index d07f26b169837..a1541c12e2293 100644 --- a/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/stream.pass.cpp +++ b/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/stream.pass.cpp @@ -20,9 +20,11 @@ #include #include -int main() +int main(int, char**) { std::thread::id id0 = std::this_thread::get_id(); std::ostringstream os; os << id0; + + return 0; } diff --git a/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/thread_id.pass.cpp b/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/thread_id.pass.cpp index 325c0bfebd492..80bcbf97c1dcc 100644 --- a/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/thread_id.pass.cpp +++ b/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/thread_id.pass.cpp @@ -24,7 +24,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { std::thread::id id1; std::thread::id id2 = std::this_thread::get_id(); @@ -34,4 +34,6 @@ int main() ASSERT_NOEXCEPT(H()(id2)); H h; assert(h(id1) != h(id2)); + + return 0; } diff --git a/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.member/detach.pass.cpp b/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.member/detach.pass.cpp index 8debe7770dd1f..bf72e3437a473 100644 --- a/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.member/detach.pass.cpp +++ b/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.member/detach.pass.cpp @@ -61,7 +61,7 @@ bool G::op_run = false; void foo() {} -int main() +int main(int, char**) { { G g; @@ -86,4 +86,6 @@ int main() } } #endif + + return 0; } diff --git a/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.member/get_id.pass.cpp b/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.member/get_id.pass.cpp index 99cdec9134c92..006bc1e65c49d 100644 --- a/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.member/get_id.pass.cpp +++ b/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.member/get_id.pass.cpp @@ -41,7 +41,7 @@ class G int G::n_alive = 0; bool G::op_run = false; -int main() +int main(int, char**) { { G g; @@ -54,4 +54,6 @@ int main() assert(t1.get_id() == std::thread::id()); t0.join(); } + + return 0; } diff --git a/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.member/join.pass.cpp b/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.member/join.pass.cpp index c21de04ea346d..b64a111c6be74 100644 --- a/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.member/join.pass.cpp +++ b/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.member/join.pass.cpp @@ -46,7 +46,7 @@ bool G::op_run = false; void foo() {} -int main() +int main(int, char**) { { G g; @@ -73,4 +73,6 @@ int main() } } #endif + + return 0; } diff --git a/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.member/joinable.pass.cpp b/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.member/joinable.pass.cpp index 3db473ab181de..6f1308cbad097 100644 --- a/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.member/joinable.pass.cpp +++ b/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.member/joinable.pass.cpp @@ -41,7 +41,7 @@ class G int G::n_alive = 0; bool G::op_run = false; -int main() +int main(int, char**) { { G g; @@ -50,4 +50,6 @@ int main() t0.join(); assert(!t0.joinable()); } + + return 0; } diff --git a/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.member/swap.pass.cpp b/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.member/swap.pass.cpp index 66c810b1b7e24..f43805d7fe6f9 100644 --- a/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.member/swap.pass.cpp +++ b/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.member/swap.pass.cpp @@ -41,7 +41,7 @@ class G int G::n_alive = 0; bool G::op_run = false; -int main() +int main(int, char**) { { G g; @@ -54,4 +54,6 @@ int main() assert(t1.get_id() == id0); t1.join(); } + + return 0; } diff --git a/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.static/hardware_concurrency.pass.cpp b/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.static/hardware_concurrency.pass.cpp index 3500f2c169ac6..5493f27a4940e 100644 --- a/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.static/hardware_concurrency.pass.cpp +++ b/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.static/hardware_concurrency.pass.cpp @@ -17,7 +17,9 @@ #include #include -int main() +int main(int, char**) { assert(std::thread::hardware_concurrency() > 0); + + return 0; } diff --git a/libcxx/test/std/thread/thread.threads/thread.thread.this/get_id.pass.cpp b/libcxx/test/std/thread/thread.threads/thread.thread.this/get_id.pass.cpp index 864518dd8ffb0..1bf46cdb54f4b 100644 --- a/libcxx/test/std/thread/thread.threads/thread.thread.this/get_id.pass.cpp +++ b/libcxx/test/std/thread/thread.threads/thread.thread.this/get_id.pass.cpp @@ -15,8 +15,10 @@ #include #include -int main() +int main(int, char**) { std::thread::id id = std::this_thread::get_id(); assert(id != std::thread::id()); + + return 0; } diff --git a/libcxx/test/std/thread/thread.threads/thread.thread.this/sleep_for_tested_elsewhere.pass.cpp b/libcxx/test/std/thread/thread.threads/thread.thread.this/sleep_for_tested_elsewhere.pass.cpp index 59791c84cdb85..7c8552ea86539 100644 --- a/libcxx/test/std/thread/thread.threads/thread.thread.this/sleep_for_tested_elsewhere.pass.cpp +++ b/libcxx/test/std/thread/thread.threads/thread.thread.this/sleep_for_tested_elsewhere.pass.cpp @@ -16,6 +16,8 @@ // is therefore non-standard. For this reason the test lives under the 'libcxx' // subdirectory. -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/thread/thread.threads/thread.thread.this/sleep_until.pass.cpp b/libcxx/test/std/thread/thread.threads/thread.thread.this/sleep_until.pass.cpp index 5fbaf9d877322..c73144db0c15d 100644 --- a/libcxx/test/std/thread/thread.threads/thread.thread.this/sleep_until.pass.cpp +++ b/libcxx/test/std/thread/thread.threads/thread.thread.this/sleep_until.pass.cpp @@ -18,7 +18,7 @@ #include #include -int main() +int main(int, char**) { typedef std::chrono::system_clock Clock; typedef Clock::time_point time_point; @@ -30,4 +30,6 @@ int main() std::chrono::nanoseconds err = 5 * ms / 100; // The time slept is within 5% of 500ms assert(std::abs(ns.count()) < err.count()); + + return 0; } diff --git a/libcxx/test/std/thread/thread.threads/thread.thread.this/yield.pass.cpp b/libcxx/test/std/thread/thread.threads/thread.thread.this/yield.pass.cpp index 5c1caa0cbe0de..6f772b5c2860c 100644 --- a/libcxx/test/std/thread/thread.threads/thread.thread.this/yield.pass.cpp +++ b/libcxx/test/std/thread/thread.threads/thread.thread.this/yield.pass.cpp @@ -15,7 +15,9 @@ #include #include -int main() +int main(int, char**) { std::this_thread::yield(); + + return 0; } diff --git a/libcxx/test/std/type_traits/is_nothrow_convertible.pass.cpp b/libcxx/test/std/type_traits/is_nothrow_convertible.pass.cpp new file mode 100644 index 0000000000000..2a953d90b8e18 --- /dev/null +++ b/libcxx/test/std/type_traits/is_nothrow_convertible.pass.cpp @@ -0,0 +1,58 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// + +// +// UNSUPPORTED: c++98, c++03, c++11, c++14, c++17 + +#include + +struct A {}; +struct B { +public: + operator A() { return a; } A a; +}; + +class C { }; +class D { +public: + operator C() noexcept { return c; } C c; +}; + +int main(int, char**) { + static_assert((std::is_nothrow_convertible::value), ""); + static_assert(!(std::is_nothrow_convertible::value), ""); + + static_assert(!(std::is_nothrow_convertible::value), ""); + static_assert((std::is_nothrow_convertible::value), ""); + + static_assert((std::is_nothrow_convertible_v), ""); + static_assert(!(std::is_nothrow_convertible_v), ""); + + static_assert(!(std::is_nothrow_convertible_v), ""); + static_assert((std::is_nothrow_convertible_v), ""); + + static_assert((std::is_nothrow_convertible_v), ""); + static_assert((std::is_nothrow_convertible_v), ""); + static_assert((std::is_nothrow_convertible_v), ""); + static_assert((std::is_nothrow_convertible_v), ""); + + static_assert(!(std::is_nothrow_convertible_v), ""); + static_assert(!(std::is_nothrow_convertible_v), ""); + static_assert(!(std::is_nothrow_convertible_v), ""); + static_assert(!(std::is_nothrow_convertible_v), ""); + static_assert(!(std::is_nothrow_convertible_v), ""); + static_assert(!(std::is_nothrow_convertible_v), ""); + + typedef void V(); + typedef int I(); + static_assert(!(std::is_nothrow_convertible_v), ""); + static_assert(!(std::is_nothrow_convertible_v), ""); + + return 0; +} diff --git a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.cnstr/allocs.pass.cpp b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.cnstr/allocs.pass.cpp index 6ea9a8ec8beb3..961eda3ac8f06 100644 --- a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.cnstr/allocs.pass.cpp +++ b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.cnstr/allocs.pass.cpp @@ -22,7 +22,7 @@ #include "allocators.h" -int main() +int main(int, char**) { { typedef std::scoped_allocator_adaptor> A; @@ -113,4 +113,6 @@ int main() std::scoped_allocator_adaptor>, std::scoped_allocator_adaptor>>::value, ""); } + + return 0; } diff --git a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.cnstr/converting_copy.pass.cpp b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.cnstr/converting_copy.pass.cpp index c1460603486f5..d3734cae10e9a 100644 --- a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.cnstr/converting_copy.pass.cpp +++ b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.cnstr/converting_copy.pass.cpp @@ -22,7 +22,7 @@ #include "allocators.h" -int main() +int main(int, char**) { { typedef std::scoped_allocator_adaptor> B; @@ -64,4 +64,6 @@ int main() assert(a2 == a1); } + + return 0; } diff --git a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.cnstr/converting_move.pass.cpp b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.cnstr/converting_move.pass.cpp index 99f0e38fc853d..427e299578802 100644 --- a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.cnstr/converting_move.pass.cpp +++ b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.cnstr/converting_move.pass.cpp @@ -22,7 +22,7 @@ #include "allocators.h" -int main() +int main(int, char**) { { typedef std::scoped_allocator_adaptor> B; @@ -69,4 +69,6 @@ int main() assert(A3::move_called == true); assert(a2 == a1); } + + return 0; } diff --git a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.cnstr/copy.pass.cpp b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.cnstr/copy.pass.cpp index 38878e234e921..69b767b909e2a 100644 --- a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.cnstr/copy.pass.cpp +++ b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.cnstr/copy.pass.cpp @@ -20,7 +20,7 @@ #include "allocators.h" -int main() +int main(int, char**) { { typedef std::scoped_allocator_adaptor> A; @@ -64,4 +64,6 @@ int main() assert(A3::move_called == false); assert(a2 == a1); } + + return 0; } diff --git a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.cnstr/default.pass.cpp b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.cnstr/default.pass.cpp index ac27f8b546504..fdf21cec3e08c 100644 --- a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.cnstr/default.pass.cpp +++ b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.cnstr/default.pass.cpp @@ -20,7 +20,7 @@ #include "allocators.h" -int main() +int main(int, char**) { { typedef std::scoped_allocator_adaptor> A; @@ -53,4 +53,6 @@ int main() assert(A3::move_called == false); } + + return 0; } diff --git a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/allocate_size.fail.cpp b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/allocate_size.fail.cpp index 7b093826a8525..6d644db85e8c5 100644 --- a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/allocate_size.fail.cpp +++ b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/allocate_size.fail.cpp @@ -21,8 +21,10 @@ #include "allocators.h" -int main() +int main(int, char**) { std::scoped_allocator_adaptor> a; a.allocate(10); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} + + return 0; } diff --git a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/allocate_size.pass.cpp b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/allocate_size.pass.cpp index 057541dd0993e..05a1649e4a6dd 100644 --- a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/allocate_size.pass.cpp +++ b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/allocate_size.pass.cpp @@ -20,7 +20,7 @@ #include "allocators.h" -int main() +int main(int, char**) { { typedef std::scoped_allocator_adaptor> A; @@ -44,4 +44,6 @@ int main() assert(A1::allocate_called == true); } + + return 0; } diff --git a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/allocate_size_hint.fail.cpp b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/allocate_size_hint.fail.cpp index ffc59b800419b..7cf3d41090964 100644 --- a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/allocate_size_hint.fail.cpp +++ b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/allocate_size_hint.fail.cpp @@ -21,8 +21,10 @@ #include "allocators.h" -int main() +int main(int, char**) { std::scoped_allocator_adaptor> a; a.allocate(10, (const void*)0); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} + + return 0; } diff --git a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/allocate_size_hint.pass.cpp b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/allocate_size_hint.pass.cpp index afe3e40d9f113..db9338d31b861 100644 --- a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/allocate_size_hint.pass.cpp +++ b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/allocate_size_hint.pass.cpp @@ -20,7 +20,7 @@ #include "allocators.h" -int main() +int main(int, char**) { { typedef std::scoped_allocator_adaptor> A; @@ -65,4 +65,6 @@ int main() assert(a.allocate(10, (const void*)20) == (int*)20); assert(A2::allocate_called == true); } + + return 0; } diff --git a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/construct.pass.cpp b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/construct.pass.cpp index 6e02326fa4b6f..97ae33d9157ae 100644 --- a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/construct.pass.cpp +++ b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/construct.pass.cpp @@ -110,7 +110,7 @@ struct F bool F::constructed = false; -int main() +int main(int, char**) { { @@ -184,4 +184,6 @@ int main() assert(A3::constructed); s->~S(); } + + return 0; } diff --git a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/construct_pair.pass.cpp b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/construct_pair.pass.cpp index 85fdd38f00daa..7aa45f05add9d 100644 --- a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/construct_pair.pass.cpp +++ b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/construct_pair.pass.cpp @@ -135,7 +135,9 @@ void test_with_inner_alloc() std::free(ptr); } } -int main() { +int main(int, char**) { test_no_inner_alloc(); test_with_inner_alloc(); + + return 0; } diff --git a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/construct_pair_const_lvalue_pair.pass.cpp b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/construct_pair_const_lvalue_pair.pass.cpp index 30fea45b0215d..d1a03bc05fce0 100644 --- a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/construct_pair_const_lvalue_pair.pass.cpp +++ b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/construct_pair_const_lvalue_pair.pass.cpp @@ -151,7 +151,9 @@ void test_with_inner_alloc() std::free(ptr); } } -int main() { +int main(int, char**) { test_no_inner_alloc(); test_with_inner_alloc(); + + return 0; } diff --git a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/construct_pair_piecewise.pass.cpp b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/construct_pair_piecewise.pass.cpp index c6e13bc1839da..14f413bd86715 100644 --- a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/construct_pair_piecewise.pass.cpp +++ b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/construct_pair_piecewise.pass.cpp @@ -152,7 +152,9 @@ void test_with_inner_alloc() std::free(ptr); } } -int main() { +int main(int, char**) { test_no_inner_alloc(); test_with_inner_alloc(); + + return 0; } diff --git a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/construct_pair_rvalue.pass.cpp b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/construct_pair_rvalue.pass.cpp index 243b9e9979e34..c26b4652cc490 100644 --- a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/construct_pair_rvalue.pass.cpp +++ b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/construct_pair_rvalue.pass.cpp @@ -151,7 +151,9 @@ void test_with_inner_alloc() std::free(ptr); } } -int main() { +int main(int, char**) { test_no_inner_alloc(); test_with_inner_alloc(); + + return 0; } diff --git a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/construct_pair_values.pass.cpp b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/construct_pair_values.pass.cpp index acbe241e7c69e..7a4b14956f034 100644 --- a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/construct_pair_values.pass.cpp +++ b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/construct_pair_values.pass.cpp @@ -143,7 +143,9 @@ void test_with_inner_alloc() std::free(ptr); } } -int main() { +int main(int, char**) { test_no_inner_alloc(); test_with_inner_alloc(); + + return 0; } diff --git a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/construct_type.pass.cpp b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/construct_type.pass.cpp index 6a65d2ac6a037..e93f37f412e5b 100644 --- a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/construct_type.pass.cpp +++ b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/construct_type.pass.cpp @@ -125,8 +125,10 @@ void test_bullet_three() { POuter.reset(); } -int main() { +int main(int, char**) { test_bullet_one(); test_bullet_two(); test_bullet_three(); + + return 0; } diff --git a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/deallocate.pass.cpp b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/deallocate.pass.cpp index e5c17edaf12b8..425f00ad4f43d 100644 --- a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/deallocate.pass.cpp +++ b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/deallocate.pass.cpp @@ -20,7 +20,7 @@ #include "allocators.h" -int main() +int main(int, char**) { { @@ -42,4 +42,6 @@ int main() assert((A1::deallocate_called == std::pair((int*)10, 20))); } + + return 0; } diff --git a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/destroy.pass.cpp b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/destroy.pass.cpp index 02c7afe4a1411..50c9d24f07d3b 100644 --- a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/destroy.pass.cpp +++ b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/destroy.pass.cpp @@ -31,7 +31,7 @@ struct B bool B::constructed = false; -int main() +int main(int, char**) { { typedef std::scoped_allocator_adaptor> A; @@ -65,4 +65,6 @@ int main() assert(A3::destroy_called); } + + return 0; } diff --git a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/inner_allocator.pass.cpp b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/inner_allocator.pass.cpp index ad0f2e2951f13..7e73939f8ee05 100644 --- a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/inner_allocator.pass.cpp +++ b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/inner_allocator.pass.cpp @@ -21,7 +21,7 @@ #include "allocators.h" -int main() +int main(int, char**) { { typedef std::scoped_allocator_adaptor> A; @@ -40,4 +40,6 @@ int main() std::scoped_allocator_adaptor, A3>(A2(6), A3(8)))); } + + return 0; } diff --git a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/max_size.pass.cpp b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/max_size.pass.cpp index 51a9f811786b3..de9cf4d0cad75 100644 --- a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/max_size.pass.cpp +++ b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/max_size.pass.cpp @@ -20,7 +20,7 @@ #include "allocators.h" -int main() +int main(int, char**) { { typedef std::scoped_allocator_adaptor> A; @@ -38,4 +38,6 @@ int main() assert(a.max_size() == 200); } + + return 0; } diff --git a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/outer_allocator.pass.cpp b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/outer_allocator.pass.cpp index ccea2b2c0e121..9a90d17c0c6bf 100644 --- a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/outer_allocator.pass.cpp +++ b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/outer_allocator.pass.cpp @@ -21,7 +21,7 @@ #include "allocators.h" -int main() +int main(int, char**) { { @@ -39,4 +39,6 @@ int main() A a(A1(5), A2(6), A3(8)); assert(a.outer_allocator() == A1(5)); } + + return 0; } diff --git a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/select_on_container_copy_construction.pass.cpp b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/select_on_container_copy_construction.pass.cpp index ef42207574f4a..8253fee5518d3 100644 --- a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/select_on_container_copy_construction.pass.cpp +++ b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/select_on_container_copy_construction.pass.cpp @@ -20,7 +20,7 @@ #include "allocators.h" -int main() +int main(int, char**) { { typedef std::scoped_allocator_adaptor> A; @@ -50,4 +50,6 @@ int main() assert(a2.inner_allocator().inner_allocator().outer_allocator().id() == -1); } + + return 0; } diff --git a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.types/allocator_pointers.pass.cpp b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.types/allocator_pointers.pass.cpp index 49f242ddf596d..e17a6e9c5cb19 100644 --- a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.types/allocator_pointers.pass.cpp +++ b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.types/allocator_pointers.pass.cpp @@ -6,13 +6,12 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + #include #include #include -#include "test_macros.h" - -#if TEST_STD_VER >= 11 // #include // // template @@ -109,7 +108,7 @@ void test_void_pointer() struct Foo { int x; }; -int main() +int main(int, char**) { test_pointer>> (); test_pointer>> (); @@ -118,7 +117,6 @@ int main() test_void_pointer>> (); test_void_pointer>> (); test_void_pointer>> (); + + return 0; } -#else -int main() {} -#endif diff --git a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.types/inner_allocator_type.pass.cpp b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.types/inner_allocator_type.pass.cpp index 056189044284a..2aa7a98911477 100644 --- a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.types/inner_allocator_type.pass.cpp +++ b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.types/inner_allocator_type.pass.cpp @@ -20,7 +20,7 @@ #include "allocators.h" -int main() +int main(int, char**) { static_assert((std::is_same< std::scoped_allocator_adaptor>::inner_allocator_type, @@ -33,4 +33,6 @@ int main() static_assert((std::is_same< std::scoped_allocator_adaptor, A2, A3>::inner_allocator_type, std::scoped_allocator_adaptor, A3>>::value), ""); + + return 0; } diff --git a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.types/is_always_equal.pass.cpp b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.types/is_always_equal.pass.cpp index a549366c9d9b3..628505f65cdc4 100644 --- a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.types/is_always_equal.pass.cpp +++ b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.types/is_always_equal.pass.cpp @@ -21,7 +21,7 @@ #include "allocators.h" #include "min_allocator.h" -int main() +int main(int, char**) { // sanity checks static_assert( (std::is_same< @@ -68,4 +68,6 @@ int main() std::allocator_traits>::is_always_equal::value && std::allocator_traits>::is_always_equal::value) ), ""); + + return 0; } diff --git a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.types/propagate_on_container_copy_assignment.pass.cpp b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.types/propagate_on_container_copy_assignment.pass.cpp index 6f3605224bf82..fea53af299e7c 100644 --- a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.types/propagate_on_container_copy_assignment.pass.cpp +++ b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.types/propagate_on_container_copy_assignment.pass.cpp @@ -20,7 +20,7 @@ #include "allocators.h" -int main() +int main(int, char**) { static_assert((std::is_same< std::scoped_allocator_adaptor>::propagate_on_container_copy_assignment, @@ -34,4 +34,6 @@ int main() std::scoped_allocator_adaptor, A2, A3>::propagate_on_container_copy_assignment, std::true_type>::value), ""); + + return 0; } diff --git a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.types/propagate_on_container_move_assignment.pass.cpp b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.types/propagate_on_container_move_assignment.pass.cpp index 5c207c930c456..d04ea6f1a4399 100644 --- a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.types/propagate_on_container_move_assignment.pass.cpp +++ b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.types/propagate_on_container_move_assignment.pass.cpp @@ -20,7 +20,7 @@ #include "allocators.h" -int main() +int main(int, char**) { static_assert((std::is_same< std::scoped_allocator_adaptor>::propagate_on_container_move_assignment, @@ -34,4 +34,6 @@ int main() std::scoped_allocator_adaptor, A2, A3>::propagate_on_container_move_assignment, std::true_type>::value), ""); + + return 0; } diff --git a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.types/propagate_on_container_swap.pass.cpp b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.types/propagate_on_container_swap.pass.cpp index 5b70dd8fb924f..fcec67879fcac 100644 --- a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.types/propagate_on_container_swap.pass.cpp +++ b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.types/propagate_on_container_swap.pass.cpp @@ -20,7 +20,7 @@ #include "allocators.h" -int main() +int main(int, char**) { static_assert((std::is_same< std::scoped_allocator_adaptor>::propagate_on_container_swap, @@ -33,4 +33,6 @@ int main() static_assert((std::is_same< std::scoped_allocator_adaptor, A2, A3>::propagate_on_container_swap, std::true_type>::value), ""); + + return 0; } diff --git a/libcxx/test/std/utilities/allocator.adaptor/scoped.adaptor.operators/copy_assign.pass.cpp b/libcxx/test/std/utilities/allocator.adaptor/scoped.adaptor.operators/copy_assign.pass.cpp index 0f3813e1ab9b2..1f871876f1359 100644 --- a/libcxx/test/std/utilities/allocator.adaptor/scoped.adaptor.operators/copy_assign.pass.cpp +++ b/libcxx/test/std/utilities/allocator.adaptor/scoped.adaptor.operators/copy_assign.pass.cpp @@ -21,7 +21,7 @@ #include "allocators.h" -int main() +int main(int, char**) { { typedef std::scoped_allocator_adaptor> A; @@ -68,4 +68,6 @@ int main() assert(A3::move_called == false); assert(aN == a1); } + + return 0; } diff --git a/libcxx/test/std/utilities/allocator.adaptor/scoped.adaptor.operators/eq.pass.cpp b/libcxx/test/std/utilities/allocator.adaptor/scoped.adaptor.operators/eq.pass.cpp index 22987adefe743..aaf5c1d59add5 100644 --- a/libcxx/test/std/utilities/allocator.adaptor/scoped.adaptor.operators/eq.pass.cpp +++ b/libcxx/test/std/utilities/allocator.adaptor/scoped.adaptor.operators/eq.pass.cpp @@ -28,7 +28,7 @@ #include "allocators.h" -int main() +int main(int, char**) { { typedef std::scoped_allocator_adaptor> A; @@ -58,4 +58,6 @@ int main() assert(a2 != a1); assert(!(a2 == a1)); } + + return 0; } diff --git a/libcxx/test/std/utilities/allocator.adaptor/scoped.adaptor.operators/move_assign.pass.cpp b/libcxx/test/std/utilities/allocator.adaptor/scoped.adaptor.operators/move_assign.pass.cpp index 0342f614c989e..c17c6d3843997 100644 --- a/libcxx/test/std/utilities/allocator.adaptor/scoped.adaptor.operators/move_assign.pass.cpp +++ b/libcxx/test/std/utilities/allocator.adaptor/scoped.adaptor.operators/move_assign.pass.cpp @@ -21,7 +21,7 @@ #include "allocators.h" -int main() +int main(int, char**) { { typedef std::scoped_allocator_adaptor> A; @@ -68,4 +68,6 @@ int main() assert(A3::move_called == true); assert(aN == a1); } + + return 0; } diff --git a/libcxx/test/std/utilities/allocator.adaptor/types.pass.cpp b/libcxx/test/std/utilities/allocator.adaptor/types.pass.cpp index 00a007f06ea20..7820e29eef27f 100644 --- a/libcxx/test/std/utilities/allocator.adaptor/types.pass.cpp +++ b/libcxx/test/std/utilities/allocator.adaptor/types.pass.cpp @@ -29,7 +29,7 @@ #include "allocators.h" -int main() +int main(int, char**) { static_assert((std::is_base_of< A1, @@ -96,4 +96,6 @@ int main() static_assert((std::is_same< std::scoped_allocator_adaptor, A1>::const_void_pointer, const void*>::value), ""); + + return 0; } diff --git a/libcxx/test/std/utilities/any/any.class/any.assign/copy.pass.cpp b/libcxx/test/std/utilities/any/any.class/any.assign/copy.pass.cpp index 0a8c3f7814bc6..d818400c5dec5 100644 --- a/libcxx/test/std/utilities/any/any.class/any.assign/copy.pass.cpp +++ b/libcxx/test/std/utilities/any/any.class/any.assign/copy.pass.cpp @@ -8,13 +8,7 @@ // UNSUPPORTED: c++98, c++03, c++11, c++14 -// XFAIL: availability=macosx10.13 -// XFAIL: availability=macosx10.12 -// XFAIL: availability=macosx10.11 -// XFAIL: availability=macosx10.10 -// XFAIL: availability=macosx10.9 -// XFAIL: availability=macosx10.7 -// XFAIL: availability=macosx10.8 +// XFAIL: dylib-has-no-bad_any_cast && !libcpp-no-exceptions // @@ -191,7 +185,7 @@ void test_copy_assign_throws() #endif } -int main() { +int main(int, char**) { test_copy_assign(); test_copy_assign(); test_copy_assign(); @@ -201,4 +195,6 @@ int main() { test_copy_assign_self(); test_copy_assign_throws(); test_copy_assign_throws(); + + return 0; } diff --git a/libcxx/test/std/utilities/any/any.class/any.assign/move.pass.cpp b/libcxx/test/std/utilities/any/any.class/any.assign/move.pass.cpp index 4baadb2bbad28..165cc00960341 100644 --- a/libcxx/test/std/utilities/any/any.class/any.assign/move.pass.cpp +++ b/libcxx/test/std/utilities/any/any.class/any.assign/move.pass.cpp @@ -8,13 +8,7 @@ // UNSUPPORTED: c++98, c++03, c++11, c++14 -// XFAIL: availability=macosx10.13 -// XFAIL: availability=macosx10.12 -// XFAIL: availability=macosx10.11 -// XFAIL: availability=macosx10.10 -// XFAIL: availability=macosx10.9 -// XFAIL: availability=macosx10.8 -// XFAIL: availability=macosx10.7 +// XFAIL: dylib-has-no-bad_any_cast && !libcpp-no-exceptions // @@ -104,7 +98,7 @@ void test_move_assign_noexcept() { ); } -int main() { +int main(int, char**) { test_move_assign_noexcept(); test_move_assign(); test_move_assign(); @@ -112,4 +106,6 @@ int main() { test_move_assign(); test_move_assign_empty(); test_move_assign_empty(); + + return 0; } diff --git a/libcxx/test/std/utilities/any/any.class/any.assign/value.pass.cpp b/libcxx/test/std/utilities/any/any.class/any.assign/value.pass.cpp index 7ccec4b3f88d0..8ca93df34ad36 100644 --- a/libcxx/test/std/utilities/any/any.class/any.assign/value.pass.cpp +++ b/libcxx/test/std/utilities/any/any.class/any.assign/value.pass.cpp @@ -8,13 +8,7 @@ // UNSUPPORTED: c++98, c++03, c++11, c++14 -// XFAIL: availability=macosx10.13 -// XFAIL: availability=macosx10.12 -// XFAIL: availability=macosx10.11 -// XFAIL: availability=macosx10.10 -// XFAIL: availability=macosx10.9 -// XFAIL: availability=macosx10.8 -// XFAIL: availability=macosx10.7 +// XFAIL: dylib-has-no-bad_any_cast && !libcpp-no-exceptions // @@ -202,7 +196,7 @@ void test_sfinae_constraints() { } } -int main() { +int main(int, char**) { test_assign_value(); test_assign_value(); test_assign_value(); @@ -213,4 +207,6 @@ int main() { test_assign_throws(); test_assign_throws(); test_sfinae_constraints(); + + return 0; } diff --git a/libcxx/test/std/utilities/any/any.class/any.cons/copy.pass.cpp b/libcxx/test/std/utilities/any/any.class/any.cons/copy.pass.cpp index 6c4e9576d4401..fbb5f181a24ea 100644 --- a/libcxx/test/std/utilities/any/any.class/any.cons/copy.pass.cpp +++ b/libcxx/test/std/utilities/any/any.class/any.cons/copy.pass.cpp @@ -8,13 +8,7 @@ // UNSUPPORTED: c++98, c++03, c++11, c++14 -// XFAIL: availability=macosx10.13 -// XFAIL: availability=macosx10.12 -// XFAIL: availability=macosx10.11 -// XFAIL: availability=macosx10.10 -// XFAIL: availability=macosx10.9 -// XFAIL: availability=macosx10.8 -// XFAIL: availability=macosx10.7 +// XFAIL: dylib-has-no-bad_any_cast && !libcpp-no-exceptions // @@ -98,10 +92,12 @@ void test_copy() assert(Type::count == 0); } -int main() { +int main(int, char**) { test_copy(); test_copy(); test_copy_empty(); test_copy_throws(); test_copy_throws(); + + return 0; } diff --git a/libcxx/test/std/utilities/any/any.class/any.cons/default.pass.cpp b/libcxx/test/std/utilities/any/any.class/any.cons/default.pass.cpp index 12692a1711306..6cd7b8937d20b 100644 --- a/libcxx/test/std/utilities/any/any.class/any.cons/default.pass.cpp +++ b/libcxx/test/std/utilities/any/any.class/any.cons/default.pass.cpp @@ -20,7 +20,7 @@ #include "any_helpers.h" #include "count_new.hpp" -int main() +int main(int, char**) { using std::any; { @@ -43,4 +43,6 @@ int main() any const a; assertEmpty(a); } + + return 0; } diff --git a/libcxx/test/std/utilities/any/any.class/any.cons/in_place_type.pass.cpp b/libcxx/test/std/utilities/any/any.class/any.cons/in_place_type.pass.cpp index f696ac5a206f5..bfe86e800e932 100644 --- a/libcxx/test/std/utilities/any/any.class/any.cons/in_place_type.pass.cpp +++ b/libcxx/test/std/utilities/any/any.class/any.cons/in_place_type.pass.cpp @@ -8,13 +8,7 @@ // UNSUPPORTED: c++98, c++03, c++11, c++14 -// XFAIL: availability=macosx10.13 -// XFAIL: availability=macosx10.12 -// XFAIL: availability=macosx10.11 -// XFAIL: availability=macosx10.10 -// XFAIL: availability=macosx10.9 -// XFAIL: availability=macosx10.8 -// XFAIL: availability=macosx10.7 +// XFAIL: dylib-has-no-bad_any_cast && !libcpp-no-exceptions // @@ -187,7 +181,7 @@ void test_constructor_explicit() { static_assert(std::is_constructible&, int>::value, ""); } -int main() { +int main(int, char**) { test_in_place_type(); test_in_place_type(); test_in_place_type(); @@ -198,4 +192,6 @@ int main() { test_in_place_type_decayed(); test_ctor_sfinae(); test_constructor_explicit(); + + return 0; } diff --git a/libcxx/test/std/utilities/any/any.class/any.cons/move.pass.cpp b/libcxx/test/std/utilities/any/any.class/any.cons/move.pass.cpp index 265972a01e9b1..3c0780c0a3f36 100644 --- a/libcxx/test/std/utilities/any/any.class/any.cons/move.pass.cpp +++ b/libcxx/test/std/utilities/any/any.class/any.cons/move.pass.cpp @@ -8,13 +8,7 @@ // UNSUPPORTED: c++98, c++03, c++11, c++14 -// XFAIL: availability=macosx10.13 -// XFAIL: availability=macosx10.12 -// XFAIL: availability=macosx10.11 -// XFAIL: availability=macosx10.10 -// XFAIL: availability=macosx10.9 -// XFAIL: availability=macosx10.8 -// XFAIL: availability=macosx10.7 +// XFAIL: dylib-has-no-bad_any_cast && !libcpp-no-exceptions // @@ -95,7 +89,7 @@ void test_move() { assert(Type::count == 0); } -int main() +int main(int, char**) { // noexcept test { @@ -108,4 +102,6 @@ int main() test_move(); test_move_empty(); test_move_does_not_throw(); + + return 0; } diff --git a/libcxx/test/std/utilities/any/any.class/any.cons/value.pass.cpp b/libcxx/test/std/utilities/any/any.class/any.cons/value.pass.cpp index c80a407ff0635..e39c7307ecb9e 100644 --- a/libcxx/test/std/utilities/any/any.class/any.cons/value.pass.cpp +++ b/libcxx/test/std/utilities/any/any.class/any.cons/value.pass.cpp @@ -8,13 +8,7 @@ // UNSUPPORTED: c++98, c++03, c++11, c++14 -// XFAIL: availability=macosx10.13 -// XFAIL: availability=macosx10.12 -// XFAIL: availability=macosx10.11 -// XFAIL: availability=macosx10.10 -// XFAIL: availability=macosx10.9 -// XFAIL: availability=macosx10.8 -// XFAIL: availability=macosx10.7 +// XFAIL: dylib-has-no-bad_any_cast && !libcpp-no-exceptions // @@ -151,11 +145,13 @@ void test_sfinae_constraints() { } } -int main() { +int main(int, char**) { test_copy_move_value(); test_copy_move_value(); test_copy_value_throws(); test_copy_value_throws(); test_move_value_throws(); test_sfinae_constraints(); + + return 0; } diff --git a/libcxx/test/std/utilities/any/any.class/any.modifiers/emplace.pass.cpp b/libcxx/test/std/utilities/any/any.class/any.modifiers/emplace.pass.cpp index 3ac003dd086ce..8a5e433786d6d 100644 --- a/libcxx/test/std/utilities/any/any.class/any.modifiers/emplace.pass.cpp +++ b/libcxx/test/std/utilities/any/any.class/any.modifiers/emplace.pass.cpp @@ -8,13 +8,7 @@ // UNSUPPORTED: c++98, c++03, c++11, c++14 -// XFAIL: availability=macosx10.13 -// XFAIL: availability=macosx10.12 -// XFAIL: availability=macosx10.11 -// XFAIL: availability=macosx10.10 -// XFAIL: availability=macosx10.9 -// XFAIL: availability=macosx10.8 -// XFAIL: availability=macosx10.7 +// XFAIL: dylib-has-no-bad_any_cast && !libcpp-no-exceptions // @@ -275,7 +269,7 @@ void test_emplace_sfinae_constraints() { } } -int main() { +int main(int, char**) { test_emplace_type(); test_emplace_type(); test_emplace_type(); @@ -288,4 +282,6 @@ int main() { test_emplace_throws(); test_emplace_throws(); #endif + + return 0; } diff --git a/libcxx/test/std/utilities/any/any.class/any.modifiers/reset.pass.cpp b/libcxx/test/std/utilities/any/any.class/any.modifiers/reset.pass.cpp index 352b25b8010af..a8ac0d6012ecb 100644 --- a/libcxx/test/std/utilities/any/any.class/any.modifiers/reset.pass.cpp +++ b/libcxx/test/std/utilities/any/any.class/any.modifiers/reset.pass.cpp @@ -8,13 +8,7 @@ // UNSUPPORTED: c++98, c++03, c++11, c++14 -// XFAIL: availability=macosx10.13 -// XFAIL: availability=macosx10.12 -// XFAIL: availability=macosx10.11 -// XFAIL: availability=macosx10.10 -// XFAIL: availability=macosx10.9 -// XFAIL: availability=macosx10.8 -// XFAIL: availability=macosx10.7 +// XFAIL: dylib-has-no-bad_any_cast && !libcpp-no-exceptions // @@ -25,7 +19,7 @@ #include "any_helpers.h" -int main() +int main(int, char**) { using std::any; using std::any_cast; @@ -67,4 +61,6 @@ int main() assertEmpty(a); assert(large::count == 0); } + + return 0; } diff --git a/libcxx/test/std/utilities/any/any.class/any.modifiers/swap.pass.cpp b/libcxx/test/std/utilities/any/any.class/any.modifiers/swap.pass.cpp index f1ff60d478ba8..f49511138dd58 100644 --- a/libcxx/test/std/utilities/any/any.class/any.modifiers/swap.pass.cpp +++ b/libcxx/test/std/utilities/any/any.class/any.modifiers/swap.pass.cpp @@ -8,13 +8,7 @@ // UNSUPPORTED: c++98, c++03, c++11, c++14 -// XFAIL: availability=macosx10.13 -// XFAIL: availability=macosx10.12 -// XFAIL: availability=macosx10.11 -// XFAIL: availability=macosx10.10 -// XFAIL: availability=macosx10.9 -// XFAIL: availability=macosx10.8 -// XFAIL: availability=macosx10.7 +// XFAIL: dylib-has-no-bad_any_cast && !libcpp-no-exceptions // @@ -127,7 +121,7 @@ void test_self_swap() { assert(large::count == 0); } -int main() +int main(int, char**) { test_noexcept(); test_swap_empty(); @@ -137,4 +131,6 @@ int main() test_swap(); test_swap(); test_self_swap(); + + return 0; } diff --git a/libcxx/test/std/utilities/any/any.class/any.observers/has_value.pass.cpp b/libcxx/test/std/utilities/any/any.class/any.observers/has_value.pass.cpp index 9b747dca6102b..54b4153c9749e 100644 --- a/libcxx/test/std/utilities/any/any.class/any.observers/has_value.pass.cpp +++ b/libcxx/test/std/utilities/any/any.class/any.observers/has_value.pass.cpp @@ -17,7 +17,7 @@ #include "any_helpers.h" -int main() +int main(int, char**) { using std::any; // noexcept test @@ -60,4 +60,6 @@ int main() a = l; assert(a.has_value()); } + + return 0; } diff --git a/libcxx/test/std/utilities/any/any.class/any.observers/type.pass.cpp b/libcxx/test/std/utilities/any/any.class/any.observers/type.pass.cpp index 8d3b4081405c0..bb9089cd83e30 100644 --- a/libcxx/test/std/utilities/any/any.class/any.observers/type.pass.cpp +++ b/libcxx/test/std/utilities/any/any.class/any.observers/type.pass.cpp @@ -18,7 +18,7 @@ #include #include "any_helpers.h" -int main() +int main(int, char**) { using std::any; { @@ -37,4 +37,6 @@ int main() any const a(l); assert(a.type() == typeid(large)); } + + return 0; } diff --git a/libcxx/test/std/utilities/any/any.class/not_literal_type.pass.cpp b/libcxx/test/std/utilities/any/any.class/not_literal_type.pass.cpp index b757f7b0bbe13..3a275d51e4ac7 100644 --- a/libcxx/test/std/utilities/any/any.class/not_literal_type.pass.cpp +++ b/libcxx/test/std/utilities/any/any.class/not_literal_type.pass.cpp @@ -15,6 +15,8 @@ #include #include -int main () { +int main(int, char**) { static_assert(!std::is_literal_type::value, ""); + + return 0; } diff --git a/libcxx/test/std/utilities/any/any.nonmembers/any.cast/any_cast_pointer.pass.cpp b/libcxx/test/std/utilities/any/any.nonmembers/any.cast/any_cast_pointer.pass.cpp index 8de9164c31ff4..58f58afa99c14 100644 --- a/libcxx/test/std/utilities/any/any.nonmembers/any.cast/any_cast_pointer.pass.cpp +++ b/libcxx/test/std/utilities/any/any.nonmembers/any.cast/any_cast_pointer.pass.cpp @@ -8,13 +8,7 @@ // UNSUPPORTED: c++98, c++03, c++11, c++14 -// XFAIL: availability=macosx10.13 -// XFAIL: availability=macosx10.12 -// XFAIL: availability=macosx10.11 -// XFAIL: availability=macosx10.10 -// XFAIL: availability=macosx10.9 -// XFAIL: availability=macosx10.8 -// XFAIL: availability=macosx10.7 +// XFAIL: dylib-has-no-bad_any_cast && !libcpp-no-exceptions // @@ -166,7 +160,7 @@ void test_cast_function_pointer() { assert(fn_ptr == test_fn); } -int main() { +int main(int, char**) { test_cast_is_noexcept(); test_cast_return_type(); test_cast_nullptr(); @@ -175,4 +169,6 @@ int main() { test_cast(); test_cast_non_copyable_type(); test_cast_function_pointer(); + + return 0; } diff --git a/libcxx/test/std/utilities/any/any.nonmembers/any.cast/any_cast_reference.pass.cpp b/libcxx/test/std/utilities/any/any.nonmembers/any.cast/any_cast_reference.pass.cpp index 810c482df7821..1216444800207 100644 --- a/libcxx/test/std/utilities/any/any.nonmembers/any.cast/any_cast_reference.pass.cpp +++ b/libcxx/test/std/utilities/any/any.nonmembers/any.cast/any_cast_reference.pass.cpp @@ -8,13 +8,7 @@ // UNSUPPORTED: c++98, c++03, c++11, c++14 -// XFAIL: availability=macosx10.13 -// XFAIL: availability=macosx10.12 -// XFAIL: availability=macosx10.11 -// XFAIL: availability=macosx10.10 -// XFAIL: availability=macosx10.9 -// XFAIL: availability=macosx10.8 -// XFAIL: availability=macosx10.7 +// XFAIL: dylib-has-no-bad_any_cast && !libcpp-no-exceptions // @@ -309,7 +303,7 @@ void test_cast_to_value() { assert(Type::count == 0); } -int main() { +int main(int, char**) { test_cast_is_not_noexcept(); test_cast_return_type(); test_cast_empty(); @@ -317,4 +311,6 @@ int main() { test_cast_to_reference(); test_cast_to_value(); test_cast_to_value(); + + return 0; } diff --git a/libcxx/test/std/utilities/any/any.nonmembers/any.cast/any_cast_request_invalid_value_category.fail.cpp b/libcxx/test/std/utilities/any/any.nonmembers/any.cast/any_cast_request_invalid_value_category.fail.cpp index cd69a3d8508af..396d994d22dd2 100644 --- a/libcxx/test/std/utilities/any/any.nonmembers/any.cast/any_cast_request_invalid_value_category.fail.cpp +++ b/libcxx/test/std/utilities/any/any.nonmembers/any.cast/any_cast_request_invalid_value_category.fail.cpp @@ -61,9 +61,11 @@ void test_rvalue_any_cast_request_lvalue() any_cast(42); } -int main() +int main(int, char**) { test_const_lvalue_cast_request_non_const_lvalue(); test_lvalue_any_cast_request_rvalue(); test_rvalue_any_cast_request_lvalue(); + + return 0; } diff --git a/libcxx/test/std/utilities/any/any.nonmembers/any.cast/const_correctness.fail.cpp b/libcxx/test/std/utilities/any/any.nonmembers/any.cast/const_correctness.fail.cpp index c0c6e03fdcf32..8669de4fddb19 100644 --- a/libcxx/test/std/utilities/any/any.nonmembers/any.cast/const_correctness.fail.cpp +++ b/libcxx/test/std/utilities/any/any.nonmembers/any.cast/const_correctness.fail.cpp @@ -24,7 +24,7 @@ struct TestType2 {}; // is triggered by these tests. // expected-error@const_correctness.fail.cpp:* 0+ {{call to unavailable function 'any_cast': introduced in macOS 10.14}} -int main() +int main(int, char**) { using std::any; using std::any_cast; @@ -46,4 +46,6 @@ int main() // expected-error@any:* {{cannot cast from lvalue of type 'const TestType2' to rvalue reference type 'TestType2 &&'; types are not compatible}} // expected-error-re@any:* {{static_assert failed{{.*}} "ValueType is required to be a const lvalue reference or a CopyConstructible type"}} any_cast(static_cast(a)); // expected-note {{requested here}} + + return 0; } diff --git a/libcxx/test/std/utilities/any/any.nonmembers/any.cast/not_copy_constructible.fail.cpp b/libcxx/test/std/utilities/any/any.nonmembers/any.cast/not_copy_constructible.fail.cpp index c90df2ebd3739..97f1d9795bc0e 100644 --- a/libcxx/test/std/utilities/any/any.nonmembers/any.cast/not_copy_constructible.fail.cpp +++ b/libcxx/test/std/utilities/any/any.nonmembers/any.cast/not_copy_constructible.fail.cpp @@ -43,7 +43,7 @@ struct no_move { // is triggered by these tests. // expected-error@not_copy_constructible.fail.cpp:* 0+ {{call to unavailable function 'any_cast': introduced in macOS 10.14}} -int main() { +int main(int, char**) { any a; // expected-error-re@any:* {{static_assert failed{{.*}} "ValueType is required to be an lvalue reference or a CopyConstructible type"}} // expected-error@any:* {{static_cast from 'no_copy' to 'no_copy' uses deleted function}} @@ -58,4 +58,6 @@ int main() { // expected-error-re@any:* {{static_assert failed{{.*}} "ValueType is required to be an rvalue reference or a CopyConstructible type"}} // expected-error@any:* {{static_cast from 'typename remove_reference::type' (aka 'no_move') to 'no_move' uses deleted function}} any_cast(static_cast(a)); + + return 0; } diff --git a/libcxx/test/std/utilities/any/any.nonmembers/any.cast/reference_types.fail.cpp b/libcxx/test/std/utilities/any/any.nonmembers/any.cast/reference_types.fail.cpp index 19453582479cb..1ce06e289a900 100644 --- a/libcxx/test/std/utilities/any/any.nonmembers/any.cast/reference_types.fail.cpp +++ b/libcxx/test/std/utilities/any/any.nonmembers/any.cast/reference_types.fail.cpp @@ -21,7 +21,7 @@ using std::any; using std::any_cast; -int main() +int main(int, char**) { any a(1); @@ -50,4 +50,6 @@ int main() // expected-error-re@any:* 1 {{static_assert failed{{.*}} "_ValueType may not be a reference."}} any_cast(&a2); // expected-note {{requested here}} + + return 0; } diff --git a/libcxx/test/std/utilities/any/any.nonmembers/make_any.pass.cpp b/libcxx/test/std/utilities/any/any.nonmembers/make_any.pass.cpp index e185f239f6981..9c5dda2066c59 100644 --- a/libcxx/test/std/utilities/any/any.nonmembers/make_any.pass.cpp +++ b/libcxx/test/std/utilities/any/any.nonmembers/make_any.pass.cpp @@ -8,13 +8,7 @@ // UNSUPPORTED: c++98, c++03, c++11, c++14 -// XFAIL: availability=macosx10.13 -// XFAIL: availability=macosx10.12 -// XFAIL: availability=macosx10.11 -// XFAIL: availability=macosx10.10 -// XFAIL: availability=macosx10.9 -// XFAIL: availability=macosx10.8 -// XFAIL: availability=macosx10.7 +// XFAIL: dylib-has-no-bad_any_cast && !libcpp-no-exceptions // @@ -131,7 +125,7 @@ void test_make_any_throws() #endif -int main() { +int main(int, char**) { test_make_any_type(); test_make_any_type(); test_make_any_type(); @@ -144,4 +138,6 @@ int main() { test_make_any_throws(); #endif + + return 0; } diff --git a/libcxx/test/std/utilities/any/any.nonmembers/swap.pass.cpp b/libcxx/test/std/utilities/any/any.nonmembers/swap.pass.cpp index 3e5a91d0d2360..5461a4d0cdf14 100644 --- a/libcxx/test/std/utilities/any/any.nonmembers/swap.pass.cpp +++ b/libcxx/test/std/utilities/any/any.nonmembers/swap.pass.cpp @@ -8,13 +8,7 @@ // UNSUPPORTED: c++98, c++03, c++11, c++14 -// XFAIL: availability=macosx10.13 -// XFAIL: availability=macosx10.12 -// XFAIL: availability=macosx10.11 -// XFAIL: availability=macosx10.10 -// XFAIL: availability=macosx10.9 -// XFAIL: availability=macosx10.8 -// XFAIL: availability=macosx10.7 +// XFAIL: dylib-has-no-bad_any_cast && !libcpp-no-exceptions // @@ -28,7 +22,7 @@ using std::any; using std::any_cast; -int main() +int main(int, char**) { { // test noexcept @@ -44,4 +38,6 @@ int main() assert(any_cast(a1) == 2); assert(any_cast(a2) == 1); } + + return 0; } diff --git a/libcxx/test/std/utilities/charconv/charconv.from.chars/integral.bool.fail.cpp b/libcxx/test/std/utilities/charconv/charconv.from.chars/integral.bool.fail.cpp index 35ddfa32e887c..2e744cc81875f 100644 --- a/libcxx/test/std/utilities/charconv/charconv.from.chars/integral.bool.fail.cpp +++ b/libcxx/test/std/utilities/charconv/charconv.from.chars/integral.bool.fail.cpp @@ -18,7 +18,7 @@ #include -int main() +int main(int, char**) { using std::from_chars; char buf[] = "01001"; @@ -26,4 +26,6 @@ int main() from_chars(buf, buf + sizeof(buf), lv); // expected-error {{call to deleted function}} from_chars(buf, buf + sizeof(buf), lv, 16); // expected-error {{call to deleted function}} + + return 0; } diff --git a/libcxx/test/std/utilities/charconv/charconv.from.chars/integral.pass.cpp b/libcxx/test/std/utilities/charconv/charconv.from.chars/integral.pass.cpp index 9f05250d356eb..d750cb4a89c4d 100644 --- a/libcxx/test/std/utilities/charconv/charconv.from.chars/integral.pass.cpp +++ b/libcxx/test/std/utilities/charconv/charconv.from.chars/integral.pass.cpp @@ -183,8 +183,10 @@ struct test_signed : roundtrip_test_base } }; -int main() +int main(int, char**) { run(integrals); run(all_signed); + + return 0; } diff --git a/libcxx/test/std/utilities/charconv/charconv.to.chars/integral.bool.fail.cpp b/libcxx/test/std/utilities/charconv/charconv.to.chars/integral.bool.fail.cpp index 36c7d3ccadb56..5c947d122f49f 100644 --- a/libcxx/test/std/utilities/charconv/charconv.to.chars/integral.bool.fail.cpp +++ b/libcxx/test/std/utilities/charconv/charconv.to.chars/integral.bool.fail.cpp @@ -18,7 +18,7 @@ #include -int main() +int main(int, char**) { using std::to_chars; char buf[10]; @@ -26,4 +26,6 @@ int main() to_chars(buf, buf + sizeof(buf), false); // expected-error {{call to deleted function}} to_chars(buf, buf + sizeof(buf), lv, 16); // expected-error {{call to deleted function}} + + return 0; } diff --git a/libcxx/test/std/utilities/charconv/charconv.to.chars/integral.pass.cpp b/libcxx/test/std/utilities/charconv/charconv.to.chars/integral.pass.cpp index 18ddf203b3e04..c034151de8a8a 100644 --- a/libcxx/test/std/utilities/charconv/charconv.to.chars/integral.pass.cpp +++ b/libcxx/test/std/utilities/charconv/charconv.to.chars/integral.pass.cpp @@ -81,8 +81,10 @@ struct test_signed : to_chars_test_base } }; -int main() +int main(int, char**) { run(integrals); run(all_signed); + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/arithmetic.operations/divides.pass.cpp b/libcxx/test/std/utilities/function.objects/arithmetic.operations/divides.pass.cpp index c191b191bcdcc..1dbbd8533c7d2 100644 --- a/libcxx/test/std/utilities/function.objects/arithmetic.operations/divides.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/arithmetic.operations/divides.pass.cpp @@ -16,7 +16,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { typedef std::divides F; const F f = F(); @@ -37,4 +37,6 @@ int main() constexpr double bar = std::divides<> () (3.0, 2); static_assert ( bar == 1.5, "" ); // exact in binary #endif + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/arithmetic.operations/minus.pass.cpp b/libcxx/test/std/utilities/function.objects/arithmetic.operations/minus.pass.cpp index 54ab577ea432c..186695f7b93eb 100644 --- a/libcxx/test/std/utilities/function.objects/arithmetic.operations/minus.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/arithmetic.operations/minus.pass.cpp @@ -16,7 +16,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { typedef std::minus F; const F f = F(); @@ -37,4 +37,6 @@ int main() constexpr double bar = std::minus<> () (3.0, 2); static_assert ( bar == 1.0, "" ); #endif + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/arithmetic.operations/modulus.pass.cpp b/libcxx/test/std/utilities/function.objects/arithmetic.operations/modulus.pass.cpp index f426c57cfee60..3679a2d32513a 100644 --- a/libcxx/test/std/utilities/function.objects/arithmetic.operations/modulus.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/arithmetic.operations/modulus.pass.cpp @@ -16,7 +16,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { typedef std::modulus F; const F f = F(); @@ -37,4 +37,6 @@ int main() constexpr int bar = std::modulus<> () (3L, 2); static_assert ( bar == 1, "" ); #endif + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/arithmetic.operations/multiplies.pass.cpp b/libcxx/test/std/utilities/function.objects/arithmetic.operations/multiplies.pass.cpp index 5ef4791b59ea6..a09e59c784c79 100644 --- a/libcxx/test/std/utilities/function.objects/arithmetic.operations/multiplies.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/arithmetic.operations/multiplies.pass.cpp @@ -16,7 +16,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { typedef std::multiplies F; const F f = F(); @@ -37,4 +37,6 @@ int main() constexpr double bar = std::multiplies<> () (3.0, 2); static_assert ( bar == 6.0, "" ); #endif + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/arithmetic.operations/negate.pass.cpp b/libcxx/test/std/utilities/function.objects/arithmetic.operations/negate.pass.cpp index d7346c769f721..553bf83e2d4c2 100644 --- a/libcxx/test/std/utilities/function.objects/arithmetic.operations/negate.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/arithmetic.operations/negate.pass.cpp @@ -16,7 +16,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { typedef std::negate F; const F f = F(); @@ -36,4 +36,6 @@ int main() constexpr double bar = std::negate<> () (3.0); static_assert ( bar == -3.0, "" ); #endif + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/arithmetic.operations/plus.pass.cpp b/libcxx/test/std/utilities/function.objects/arithmetic.operations/plus.pass.cpp index 6bca266e07816..b2614f4304d20 100644 --- a/libcxx/test/std/utilities/function.objects/arithmetic.operations/plus.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/arithmetic.operations/plus.pass.cpp @@ -16,7 +16,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { typedef std::plus F; const F f = F(); @@ -37,4 +37,6 @@ int main() constexpr double bar = std::plus<> () (3.0, 2); static_assert ( bar == 5.0, "" ); #endif + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/arithmetic.operations/transparent.pass.cpp b/libcxx/test/std/utilities/function.objects/arithmetic.operations/transparent.pass.cpp index ca57c223a2aa6..154a0f8877a5f 100644 --- a/libcxx/test/std/utilities/function.objects/arithmetic.operations/transparent.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/arithmetic.operations/transparent.pass.cpp @@ -22,7 +22,7 @@ struct is_transparent }; -int main () +int main(int, char**) { static_assert ( !is_transparent>::value, "" ); static_assert ( !is_transparent>::value, "" ); diff --git a/libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.bind/PR23141_invoke_not_constexpr.pass.cpp b/libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.bind/PR23141_invoke_not_constexpr.pass.cpp index 4c025d1415afe..931778f54d91c 100644 --- a/libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.bind/PR23141_invoke_not_constexpr.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.bind/PR23141_invoke_not_constexpr.pass.cpp @@ -28,7 +28,9 @@ struct Fun } }; -int main() +int main(int, char**) { std::bind(Fun{}, std::placeholders::_1, 42)("hello"); + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.bind/bind_return_type.pass.cpp b/libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.bind/bind_return_type.pass.cpp index fc089e16528d4..7010b33f3314e 100644 --- a/libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.bind/bind_return_type.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.bind/bind_return_type.pass.cpp @@ -115,7 +115,7 @@ void do_test_r(Fn* func) { } } -int main() +int main(int, char**) { do_test(return_value); do_test(return_lvalue); @@ -129,4 +129,6 @@ int main() do_test_r(return_rvalue); do_test_r(return_const_rvalue); + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.bind/copy.pass.cpp b/libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.bind/copy.pass.cpp index ccc6c27e716f4..8beeb3321d517 100644 --- a/libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.bind/copy.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.bind/copy.pass.cpp @@ -26,11 +26,13 @@ float _pow(float a, float b) return std::pow(a, b); } -int main() +int main(int, char**) { std::function fnc = _pow; auto task = std::bind(fnc, 2.f, 4.f); auto task2(task); assert(task() == 16); assert(task2() == 16); + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.bind/invoke_function_object.pass.cpp b/libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.bind/invoke_function_object.pass.cpp index b386b99a90fb4..b87918da11047 100644 --- a/libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.bind/invoke_function_object.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.bind/invoke_function_object.pass.cpp @@ -38,7 +38,7 @@ struct BadUnaryFunction } }; -int main() +int main(int, char**) { // Check that BadUnaryFunction::operator()(S const &) is not // instantiated when checking if BadUnaryFunction is a nested bind @@ -47,4 +47,6 @@ int main() b(0); auto b2 = std::bind(DummyUnaryFunction(), BadUnaryFunction()); b2(0); + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.bind/invoke_int_0.pass.cpp b/libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.bind/invoke_int_0.pass.cpp index 8d6bc70e79a80..a77e1895d6f74 100644 --- a/libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.bind/invoke_int_0.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.bind/invoke_int_0.pass.cpp @@ -40,7 +40,7 @@ struct A_int_0 int operator()() const {return 5;} }; -int main() +int main(int, char**) { test(std::bind(f), 1); test(std::bind(&f), 1); @@ -51,4 +51,6 @@ int main() test(std::bind(&f), 1); test(std::bind(A_int_0()), 4); test_const(std::bind(A_int_0()), 5); + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.bind/invoke_lvalue.pass.cpp b/libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.bind/invoke_lvalue.pass.cpp index 92f65af2c91bf..9b81d3301325c 100644 --- a/libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.bind/invoke_lvalue.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.bind/invoke_lvalue.pass.cpp @@ -280,10 +280,12 @@ test3() assert(b); } -int main() +int main(int, char**) { test_void_1(); test_int_1(); test_void_2(); test3(); + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.bind/invoke_rvalue.pass.cpp b/libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.bind/invoke_rvalue.pass.cpp index b7facb38ac6ec..10d2ce017f8fa 100644 --- a/libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.bind/invoke_rvalue.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.bind/invoke_rvalue.pass.cpp @@ -258,10 +258,12 @@ void test_nested() assert(std::bind(f_nested, std::bind(g_nested, _1))(3) == 31); } -int main() +int main(int, char**) { test_void_1(); test_int_1(); test_void_2(); test_nested(); + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.bind/invoke_void_0.pass.cpp b/libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.bind/invoke_void_0.pass.cpp index cc982d1b80f9a..2c8e56f034e8c 100644 --- a/libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.bind/invoke_void_0.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.bind/invoke_void_0.pass.cpp @@ -54,7 +54,7 @@ struct A_int_0 int operator()() const {count += 2; return 5;} }; -int main() +int main(int, char**) { test(std::bind(f)); test(std::bind(&f)); @@ -70,4 +70,6 @@ int main() test(std::bind(&g)); test(std::bind(A_int_0())); test_const(std::bind(A_int_0())); + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.bind/nested.pass.cpp b/libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.bind/nested.pass.cpp index c4d82948e374b..0d5be34135393 100644 --- a/libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.bind/nested.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.bind/nested.pass.cpp @@ -41,11 +41,13 @@ struct plus_one } }; -int main() +int main(int, char**) { using std::placeholders::_1; auto g = std::bind(power(), 2, _1); assert(g(5) == 32); assert(std::bind(plus_one(), g)(5) == 33); + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.isbind/is_bind_expression.pass.cpp b/libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.isbind/is_bind_expression.pass.cpp index cf065e4e3823d..8314dbe1e8e2a 100644 --- a/libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.isbind/is_bind_expression.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.isbind/is_bind_expression.pass.cpp @@ -27,11 +27,13 @@ test(const T&) struct C {}; -int main() +int main(int, char**) { test(std::bind(C())); test(std::bind(C(), std::placeholders::_2)); test(std::bind(C())); test(1); test(std::placeholders::_2); + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.isbind/is_bind_expression_03.pass.cpp b/libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.isbind/is_bind_expression_03.pass.cpp index da7880fb25fe7..c1af159b29366 100644 --- a/libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.isbind/is_bind_expression_03.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.isbind/is_bind_expression_03.pass.cpp @@ -24,7 +24,7 @@ void test() { struct C {}; -int main() { +int main(int, char**) { test(); test(); test(); @@ -35,4 +35,6 @@ int main() { test(); test(); test(); + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.isbind/is_placeholder.pass.cpp b/libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.isbind/is_placeholder.pass.cpp index ecaa45bba28dd..d2ccf1fafdccf 100644 --- a/libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.isbind/is_placeholder.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.isbind/is_placeholder.pass.cpp @@ -25,7 +25,7 @@ test(const T&) struct C {}; -int main() +int main(int, char**) { test<1>(std::placeholders::_1); test<2>(std::placeholders::_2); @@ -41,4 +41,6 @@ int main() test<0>(5.5); test<0>('a'); test<0>(C()); + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.place/placeholders.pass.cpp b/libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.place/placeholders.pass.cpp index 8e4ec60ef13d6..b71aae818a062 100644 --- a/libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.place/placeholders.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.place/placeholders.pass.cpp @@ -80,7 +80,7 @@ void use_placeholders_to_prevent_unused_warning() { #endif } -int main() +int main(int, char**) { use_placeholders_to_prevent_unused_warning(); test(std::placeholders::_1); @@ -93,4 +93,6 @@ int main() test(std::placeholders::_8); test(std::placeholders::_9); test(std::placeholders::_10); + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/bind/func.bind/nothing_to_do.pass.cpp b/libcxx/test/std/utilities/function.objects/bind/func.bind/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/utilities/function.objects/bind/func.bind/nothing_to_do.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/bind/func.bind/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/bind/nothing_to_do.pass.cpp b/libcxx/test/std/utilities/function.objects/bind/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/utilities/function.objects/bind/nothing_to_do.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/bind/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/bitwise.operations/bit_and.pass.cpp b/libcxx/test/std/utilities/function.objects/bitwise.operations/bit_and.pass.cpp index 664e3f25dd6bb..aa5324621454a 100644 --- a/libcxx/test/std/utilities/function.objects/bitwise.operations/bit_and.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/bitwise.operations/bit_and.pass.cpp @@ -16,7 +16,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { typedef std::bit_and F; const F f = F(); @@ -57,4 +57,6 @@ int main() constexpr int bar = std::bit_and<> () (0x58D3L, 0xEA95); static_assert ( bar == 0x4891, "" ); #endif + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/bitwise.operations/bit_not.pass.cpp b/libcxx/test/std/utilities/function.objects/bitwise.operations/bit_not.pass.cpp index e18139bc607dd..8bfa48f3e70ca 100644 --- a/libcxx/test/std/utilities/function.objects/bitwise.operations/bit_not.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/bitwise.operations/bit_not.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { typedef std::bit_not F; const F f = F(); @@ -42,4 +42,6 @@ int main() constexpr int bar = std::bit_not<> () (0xEA95) & 0xFFFF; static_assert ( bar == 0x156A, "" ); + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/bitwise.operations/bit_or.pass.cpp b/libcxx/test/std/utilities/function.objects/bitwise.operations/bit_or.pass.cpp index 19bd1a731c805..8abcd63afaa7b 100644 --- a/libcxx/test/std/utilities/function.objects/bitwise.operations/bit_or.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/bitwise.operations/bit_or.pass.cpp @@ -16,7 +16,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { typedef std::bit_or F; const F f = F(); @@ -57,4 +57,6 @@ int main() constexpr int bar = std::bit_or<> () (0x58D3L, 0xEA95); static_assert ( bar == 0xFAD7, "" ); #endif + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/bitwise.operations/bit_xor.pass.cpp b/libcxx/test/std/utilities/function.objects/bitwise.operations/bit_xor.pass.cpp index 757417a2cb53f..070bd4c5f7b1c 100644 --- a/libcxx/test/std/utilities/function.objects/bitwise.operations/bit_xor.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/bitwise.operations/bit_xor.pass.cpp @@ -16,7 +16,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { { typedef std::bit_xor F; @@ -61,4 +61,6 @@ int main() static_assert ( bar == 0xB246, "" ); } #endif + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/bitwise.operations/transparent.pass.cpp b/libcxx/test/std/utilities/function.objects/bitwise.operations/transparent.pass.cpp index c360a51b4e9e7..5ad0f233f19e9 100644 --- a/libcxx/test/std/utilities/function.objects/bitwise.operations/transparent.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/bitwise.operations/transparent.pass.cpp @@ -22,7 +22,7 @@ struct is_transparent }; -int main () { +int main(int, char**) { static_assert ( !is_transparent>::value, "" ); static_assert ( !is_transparent>::value, "" ); static_assert ( is_transparent>::value, "" ); diff --git a/libcxx/test/std/utilities/function.objects/comparisons/constexpr_init.pass.cpp b/libcxx/test/std/utilities/function.objects/comparisons/constexpr_init.pass.cpp index 7632dc580610e..a0c41432ec434 100644 --- a/libcxx/test/std/utilities/function.objects/comparisons/constexpr_init.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/comparisons/constexpr_init.pass.cpp @@ -42,6 +42,8 @@ static_assert(test_constexpr_context(), ""); static_assert(test_constexpr_context(), ""); -int main() { +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/comparisons/equal_to.pass.cpp b/libcxx/test/std/utilities/function.objects/comparisons/equal_to.pass.cpp index 7ec8f66328d97..beed574f89e68 100644 --- a/libcxx/test/std/utilities/function.objects/comparisons/equal_to.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/comparisons/equal_to.pass.cpp @@ -16,7 +16,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { typedef std::equal_to F; const F f = F(); @@ -39,4 +39,6 @@ int main() constexpr bool bar = std::equal_to<> () (36.0, 36); static_assert ( bar, "" ); #endif + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/comparisons/greater.pass.cpp b/libcxx/test/std/utilities/function.objects/comparisons/greater.pass.cpp index 12111ef28e393..35c05757c8ca7 100644 --- a/libcxx/test/std/utilities/function.objects/comparisons/greater.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/comparisons/greater.pass.cpp @@ -17,7 +17,7 @@ #include "test_macros.h" #include "pointer_comparison_test_helper.hpp" -int main() +int main(int, char**) { typedef std::greater F; const F f = F(); @@ -49,4 +49,6 @@ int main() constexpr bool bar = std::greater<> () (36.0, 36); static_assert ( !bar, "" ); #endif + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/comparisons/greater_equal.pass.cpp b/libcxx/test/std/utilities/function.objects/comparisons/greater_equal.pass.cpp index 1ac67eadc38aa..9a6d36c4176b7 100644 --- a/libcxx/test/std/utilities/function.objects/comparisons/greater_equal.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/comparisons/greater_equal.pass.cpp @@ -17,7 +17,7 @@ #include "test_macros.h" #include "pointer_comparison_test_helper.hpp" -int main() +int main(int, char**) { typedef std::greater_equal F; const F f = F(); @@ -49,4 +49,6 @@ int main() constexpr bool bar = std::greater_equal<> () (36.0, 36); static_assert ( bar, "" ); #endif + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/comparisons/less.pass.cpp b/libcxx/test/std/utilities/function.objects/comparisons/less.pass.cpp index abfe09ad58d22..31a2f975b1895 100644 --- a/libcxx/test/std/utilities/function.objects/comparisons/less.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/comparisons/less.pass.cpp @@ -17,7 +17,7 @@ #include "test_macros.h" #include "pointer_comparison_test_helper.hpp" -int main() +int main(int, char**) { typedef std::less F; const F f = F(); @@ -48,4 +48,6 @@ int main() constexpr bool bar = std::less<> () (36.0, 36); static_assert ( !bar, "" ); #endif + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/comparisons/less_equal.pass.cpp b/libcxx/test/std/utilities/function.objects/comparisons/less_equal.pass.cpp index 2e733042409a2..31cbed1717250 100644 --- a/libcxx/test/std/utilities/function.objects/comparisons/less_equal.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/comparisons/less_equal.pass.cpp @@ -17,7 +17,7 @@ #include "test_macros.h" #include "pointer_comparison_test_helper.hpp" -int main() +int main(int, char**) { typedef std::less_equal F; const F f = F(); @@ -49,4 +49,6 @@ int main() constexpr bool bar = std::less_equal<> () (36.0, 36); static_assert ( bar, "" ); #endif + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/comparisons/not_equal_to.pass.cpp b/libcxx/test/std/utilities/function.objects/comparisons/not_equal_to.pass.cpp index fd329157058d3..0e405de1be972 100644 --- a/libcxx/test/std/utilities/function.objects/comparisons/not_equal_to.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/comparisons/not_equal_to.pass.cpp @@ -16,7 +16,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { typedef std::not_equal_to F; const F f = F(); @@ -41,4 +41,6 @@ int main() constexpr bool bar = std::not_equal_to<> () (36.0, 36); static_assert ( !bar, "" ); #endif + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/comparisons/transparent.pass.cpp b/libcxx/test/std/utilities/function.objects/comparisons/transparent.pass.cpp index f3896770ec04d..4be81925b7f70 100644 --- a/libcxx/test/std/utilities/function.objects/comparisons/transparent.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/comparisons/transparent.pass.cpp @@ -22,7 +22,7 @@ struct is_transparent }; -int main () +int main(int, char**) { static_assert ( !is_transparent>::value, "" ); static_assert ( !is_transparent>::value, "" ); diff --git a/libcxx/test/std/utilities/function.objects/func.def/nothing_to_do.pass.cpp b/libcxx/test/std/utilities/function.objects/func.def/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/utilities/function.objects/func.def/nothing_to_do.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/func.def/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/func.invoke/invoke.pass.cpp b/libcxx/test/std/utilities/function.objects/func.invoke/invoke.pass.cpp index b0a41447e05a2..57350f16c4000 100644 --- a/libcxx/test/std/utilities/function.objects/func.invoke/invoke.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/func.invoke/invoke.pass.cpp @@ -340,9 +340,11 @@ void noexcept_test() { } } -int main() { +int main(int, char**) { bullet_one_two_tests(); bullet_three_four_tests(); bullet_five_tests(); noexcept_test(); + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/func.invoke/invoke_feature_test_macro.pass.cpp b/libcxx/test/std/utilities/function.objects/func.invoke/invoke_feature_test_macro.pass.cpp index f7f63a0bd8beb..b0404659d78c5 100644 --- a/libcxx/test/std/utilities/function.objects/func.invoke/invoke_feature_test_macro.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/func.invoke/invoke_feature_test_macro.pass.cpp @@ -31,8 +31,10 @@ int foo(int) { return 42; } -int main() { +int main(int, char**) { #if defined(__cpp_lib_invoke) assert(std::invoke(foo, 101) == 42); #endif + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/func.memfn/member_data.fail.cpp b/libcxx/test/std/utilities/function.objects/func.memfn/member_data.fail.cpp index 483f7a327c3d4..130644fbd29ea 100644 --- a/libcxx/test/std/utilities/function.objects/func.memfn/member_data.fail.cpp +++ b/libcxx/test/std/utilities/function.objects/func.memfn/member_data.fail.cpp @@ -35,7 +35,9 @@ test(F f) } } -int main() +int main(int, char**) { test(std::mem_fn(&A::data_)); + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/func.memfn/member_data.pass.cpp b/libcxx/test/std/utilities/function.objects/func.memfn/member_data.pass.cpp index 75211ba21e0a7..52581881a5b2c 100644 --- a/libcxx/test/std/utilities/function.objects/func.memfn/member_data.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/func.memfn/member_data.pass.cpp @@ -36,7 +36,9 @@ test(F f) } } -int main() +int main(int, char**) { test(std::mem_fn(&A::data_)); + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/func.memfn/member_function.pass.cpp b/libcxx/test/std/utilities/function.objects/func.memfn/member_function.pass.cpp index a04e49efa209e..a271c067008b9 100644 --- a/libcxx/test/std/utilities/function.objects/func.memfn/member_function.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/func.memfn/member_function.pass.cpp @@ -65,7 +65,7 @@ test2(F f) } } -int main() +int main(int, char**) { test0(std::mem_fn(&A::test0)); test1(std::mem_fn(&A::test1)); @@ -73,4 +73,6 @@ int main() #if TEST_STD_VER >= 11 static_assert((noexcept(std::mem_fn(&A::test0))), ""); // LWG#2489 #endif + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/func.memfn/member_function_const.pass.cpp b/libcxx/test/std/utilities/function.objects/func.memfn/member_function_const.pass.cpp index 9ea6531a2ec67..dc93196cdc396 100644 --- a/libcxx/test/std/utilities/function.objects/func.memfn/member_function_const.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/func.memfn/member_function_const.pass.cpp @@ -69,9 +69,11 @@ test2(F f) } } -int main() +int main(int, char**) { test0(std::mem_fn(&A::test0)); test1(std::mem_fn(&A::test1)); test2(std::mem_fn(&A::test2)); + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/func.memfn/member_function_const_volatile.pass.cpp b/libcxx/test/std/utilities/function.objects/func.memfn/member_function_const_volatile.pass.cpp index 9258c0a03f425..594e1de8ad631 100644 --- a/libcxx/test/std/utilities/function.objects/func.memfn/member_function_const_volatile.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/func.memfn/member_function_const_volatile.pass.cpp @@ -69,9 +69,11 @@ test2(F f) } } -int main() +int main(int, char**) { test0(std::mem_fn(&A::test0)); test1(std::mem_fn(&A::test1)); test2(std::mem_fn(&A::test2)); + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/func.memfn/member_function_volatile.pass.cpp b/libcxx/test/std/utilities/function.objects/func.memfn/member_function_volatile.pass.cpp index c22baecd9b82e..04439387dfec9 100644 --- a/libcxx/test/std/utilities/function.objects/func.memfn/member_function_volatile.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/func.memfn/member_function_volatile.pass.cpp @@ -69,9 +69,11 @@ test2(F f) } } -int main() +int main(int, char**) { test0(std::mem_fn(&A::test0)); test1(std::mem_fn(&A::test1)); test2(std::mem_fn(&A::test2)); + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/func.not_fn/not_fn.pass.cpp b/libcxx/test/std/utilities/function.objects/func.not_fn/not_fn.pass.cpp index c3adbf7ffc526..a1c77841247eb 100644 --- a/libcxx/test/std/utilities/function.objects/func.not_fn/not_fn.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/func.not_fn/not_fn.pass.cpp @@ -602,7 +602,7 @@ void test_lwg2767() { } } -int main() +int main(int, char**) { constructor_tests(); return_type_tests(); @@ -612,4 +612,6 @@ int main() call_operator_forwarding_test(); call_operator_noexcept_test(); test_lwg2767(); + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/func.require/INVOKE_tested_elsewhere.pass.cpp b/libcxx/test/std/utilities/function.objects/func.require/INVOKE_tested_elsewhere.pass.cpp index 2bb9cb583710b..00b7d53be3a41 100644 --- a/libcxx/test/std/utilities/function.objects/func.require/INVOKE_tested_elsewhere.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/func.require/INVOKE_tested_elsewhere.pass.cpp @@ -12,4 +12,6 @@ // since they require calling the implementation specific "__invoke" and // "__invoke_constexpr" functions. -int main() {} +int main(int, char**) { + return 0; +} diff --git a/libcxx/test/std/utilities/function.objects/func.require/binary_function.pass.cpp b/libcxx/test/std/utilities/function.objects/func.require/binary_function.pass.cpp index 76ba44fc99484..79a4855ea02bd 100644 --- a/libcxx/test/std/utilities/function.objects/func.require/binary_function.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/func.require/binary_function.pass.cpp @@ -15,10 +15,12 @@ #include #include -int main() +int main(int, char**) { typedef std::binary_function bf; static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/func.require/unary_function.pass.cpp b/libcxx/test/std/utilities/function.objects/func.require/unary_function.pass.cpp index 0d178b0dc6d47..f68b4b37c7332 100644 --- a/libcxx/test/std/utilities/function.objects/func.require/unary_function.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/func.require/unary_function.pass.cpp @@ -15,9 +15,11 @@ #include #include -int main() +int main(int, char**) { typedef std::unary_function uf; static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/func.search/func.search.bm/default.pass.cpp b/libcxx/test/std/utilities/function.objects/func.search/func.search.bm/default.pass.cpp index 3293a3215ede7..55cde8fe77764 100644 --- a/libcxx/test/std/utilities/function.objects/func.search/func.search.bm/default.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/func.search/func.search.bm/default.pass.cpp @@ -122,7 +122,9 @@ test2() do_search(Iter1(ij), Iter1(ij+sj), Iter2(ik), Iter2(ik+sk), Iter1(ij+6)); } -int main() { +int main(int, char**) { test, random_access_iterator >(); test2, random_access_iterator >(); + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/func.search/func.search.bm/hash.pass.cpp b/libcxx/test/std/utilities/function.objects/func.search/func.search.bm/hash.pass.cpp index d0ce11b08bbb7..106b0d37f61c9 100644 --- a/libcxx/test/std/utilities/function.objects/func.search/func.search.bm/hash.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/func.search/func.search.bm/hash.pass.cpp @@ -118,7 +118,9 @@ test2() do_search(Iter1(ih), Iter1(ih+sh), Iter2(ii), Iter2(ii+3), Iter1(ih+3), sh*3); } -int main() { +int main(int, char**) { test, random_access_iterator >(); test2, random_access_iterator >(); + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/func.search/func.search.bm/hash.pred.pass.cpp b/libcxx/test/std/utilities/function.objects/func.search/func.search.bm/hash.pred.pass.cpp index 59178deb61333..be4db4e5a5418 100644 --- a/libcxx/test/std/utilities/function.objects/func.search/func.search.bm/hash.pred.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/func.search/func.search.bm/hash.pred.pass.cpp @@ -136,7 +136,9 @@ test2() do_search(Iter1(ih), Iter1(ih+sh), Iter2(ii), Iter2(ii+3), Iter1(ih+3), sh*3); } -int main() { +int main(int, char**) { test, random_access_iterator >(); test2, random_access_iterator >(); + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/func.search/func.search.bm/pred.pass.cpp b/libcxx/test/std/utilities/function.objects/func.search/func.search.bm/pred.pass.cpp index 7f3e837a70ebf..3656caa874988 100644 --- a/libcxx/test/std/utilities/function.objects/func.search/func.search.bm/pred.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/func.search/func.search.bm/pred.pass.cpp @@ -127,7 +127,9 @@ test2() do_search(Iter1(ih), Iter1(ih+sh), Iter2(ii), Iter2(ii+3), Iter1(ih+3), sh*3); } -int main() { +int main(int, char**) { test, random_access_iterator >(); test2, random_access_iterator >(); + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/func.search/func.search.bmh/default.pass.cpp b/libcxx/test/std/utilities/function.objects/func.search/func.search.bmh/default.pass.cpp index 04adb178bf1fc..0b345deedc1c3 100644 --- a/libcxx/test/std/utilities/function.objects/func.search/func.search.bmh/default.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/func.search/func.search.bmh/default.pass.cpp @@ -122,7 +122,9 @@ test2() do_search(Iter1(ij), Iter1(ij+sj), Iter2(ik), Iter2(ik+sk), Iter1(ij+6)); } -int main() { +int main(int, char**) { test, random_access_iterator >(); test2, random_access_iterator >(); + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/func.search/func.search.bmh/hash.pass.cpp b/libcxx/test/std/utilities/function.objects/func.search/func.search.bmh/hash.pass.cpp index dca6911758353..4106c5d6ae7fb 100644 --- a/libcxx/test/std/utilities/function.objects/func.search/func.search.bmh/hash.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/func.search/func.search.bmh/hash.pass.cpp @@ -117,7 +117,9 @@ test2() do_search(Iter1(ih), Iter1(ih+sh), Iter2(ii), Iter2(ii+3), Iter1(ih+3), sh*3); } -int main() { +int main(int, char**) { test, random_access_iterator >(); test2, random_access_iterator >(); + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/func.search/func.search.bmh/hash.pred.pass.cpp b/libcxx/test/std/utilities/function.objects/func.search/func.search.bmh/hash.pred.pass.cpp index 6a5c215a7fd0b..757bcc75792c8 100644 --- a/libcxx/test/std/utilities/function.objects/func.search/func.search.bmh/hash.pred.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/func.search/func.search.bmh/hash.pred.pass.cpp @@ -130,7 +130,9 @@ test2() do_search(Iter1(ih), Iter1(ih+sh), Iter2(ii), Iter2(ii+3), Iter1(ih+3), sh*3); } -int main() { +int main(int, char**) { test, random_access_iterator >(); test2, random_access_iterator >(); + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/func.search/func.search.bmh/pred.pass.cpp b/libcxx/test/std/utilities/function.objects/func.search/func.search.bmh/pred.pass.cpp index 27c3d0c82c25b..3a20b88512fae 100644 --- a/libcxx/test/std/utilities/function.objects/func.search/func.search.bmh/pred.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/func.search/func.search.bmh/pred.pass.cpp @@ -124,7 +124,9 @@ test2() do_search(Iter1(ih), Iter1(ih+sh), Iter2(ii), Iter2(ii+3), Iter1(ih+3), sh*3); } -int main() { +int main(int, char**) { test, random_access_iterator >(); test2, random_access_iterator >(); + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/func.search/func.search.default/default.pass.cpp b/libcxx/test/std/utilities/function.objects/func.search/func.search.default/default.pass.cpp index 098b8ac113df2..eaf5eeb8273fc 100644 --- a/libcxx/test/std/utilities/function.objects/func.search/func.search.default/default.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/func.search/func.search.default/default.pass.cpp @@ -82,7 +82,7 @@ test() do_search(Iter1(ij), Iter1(ij+sj), Iter2(ik), Iter2(ik+sk), Iter1(ij+6)); } -int main() { +int main(int, char**) { test, forward_iterator >(); test, bidirectional_iterator >(); test, random_access_iterator >(); @@ -92,4 +92,6 @@ int main() { test, forward_iterator >(); test, bidirectional_iterator >(); test, random_access_iterator >(); + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/func.search/func.search.default/default.pred.pass.cpp b/libcxx/test/std/utilities/function.objects/func.search/func.search.default/default.pred.pass.cpp index 4b0f016d712fc..773336f662664 100644 --- a/libcxx/test/std/utilities/function.objects/func.search/func.search.default/default.pred.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/func.search/func.search.default/default.pred.pass.cpp @@ -89,7 +89,7 @@ test() do_search(Iter1(ih), Iter1(ih+sh), Iter2(ii), Iter2(ii+3), Iter1(ih+3), sh*3); } -int main() { +int main(int, char**) { test, forward_iterator >(); test, bidirectional_iterator >(); test, random_access_iterator >(); @@ -99,4 +99,6 @@ int main() { test, forward_iterator >(); test, bidirectional_iterator >(); test, random_access_iterator >(); + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/func.search/nothing_to_do.pass.cpp b/libcxx/test/std/utilities/function.objects/func.search/nothing_to_do.pass.cpp index 02fe32ece4841..779762e7e995d 100644 --- a/libcxx/test/std/utilities/function.objects/func.search/nothing_to_do.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/func.search/nothing_to_do.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.badcall/bad_function_call.pass.cpp b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.badcall/bad_function_call.pass.cpp index 2ec1d53c56e9d..eb223b88e4908 100644 --- a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.badcall/bad_function_call.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.badcall/bad_function_call.pass.cpp @@ -19,7 +19,9 @@ #include #include -int main() +int main(int, char**) { static_assert((std::is_base_of::value), ""); + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.badcall/func.wrap.badcall.const/bad_function_call_ctor.pass.cpp b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.badcall/func.wrap.badcall.const/bad_function_call_ctor.pass.cpp index 6b6ee8a64a76d..385919227e056 100644 --- a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.badcall/func.wrap.badcall.const/bad_function_call_ctor.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.badcall/func.wrap.badcall.const/bad_function_call_ctor.pass.cpp @@ -13,7 +13,9 @@ #include #include -int main() +int main(int, char**) { std::bad_function_call ex; + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/derive_from.fail.cpp b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/derive_from.fail.cpp index 50fb4f19d5b5c..2a34eff92e2de 100644 --- a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/derive_from.fail.cpp +++ b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/derive_from.fail.cpp @@ -18,7 +18,9 @@ struct S : public std::function { using function::function; }; -int main() { +int main(int, char**) { S f1( [](){} ); S f2(std::allocator_arg, std::allocator{}, f1); + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/derive_from.pass.cpp b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/derive_from.pass.cpp index 8c50c284b4275..70f68d2f49b71 100644 --- a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/derive_from.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/derive_from.pass.cpp @@ -20,10 +20,12 @@ using Fn = std::function; struct S : public std::function { using function::function; }; -int main() { +int main(int, char**) { S s( [](){} ); S f1( s ); #if TEST_STD_VER <= 14 S f2(std::allocator_arg, std::allocator{}, s); #endif + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.alg/swap.pass.cpp b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.alg/swap.pass.cpp index b6dbcab5301b0..ec25bdf7802ba 100644 --- a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.alg/swap.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.alg/swap.pass.cpp @@ -57,7 +57,7 @@ int A::count = 0; int g(int) {return 0;} int h(int) {return 1;} -int main() +int main(int, char**) { assert(globalMemCounter.checkOutstandingNewEq(0)); { @@ -132,4 +132,6 @@ int main() } assert(A::count == 0); assert(globalMemCounter.checkOutstandingNewEq(0)); + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.cap/operator_bool.pass.cpp b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.cap/operator_bool.pass.cpp index 1b55baa02e1af..ab5eef37270cf 100644 --- a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.cap/operator_bool.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.cap/operator_bool.pass.cpp @@ -17,7 +17,7 @@ int g(int) {return 0;} -int main() +int main(int, char**) { { std::function f; @@ -25,4 +25,6 @@ int main() f = g; assert(f); } + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/F.pass.cpp b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/F.pass.cpp index c32baebb51d0c..fe5d24806b70e 100644 --- a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/F.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/F.pass.cpp @@ -60,7 +60,7 @@ struct LValueCallable { }; #endif -int main() +int main(int, char**) { assert(globalMemCounter.checkOutstandingNewEq(0)); { @@ -111,4 +111,6 @@ int main() static_assert(!std::is_constructible::value, ""); } #endif + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/F_assign.pass.cpp b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/F_assign.pass.cpp index abff663cb72ce..f70a2087cc2ef 100644 --- a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/F_assign.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/F_assign.pass.cpp @@ -63,7 +63,7 @@ struct LValueCallable { }; #endif -int main() +int main(int, char**) { assert(globalMemCounter.checkOutstandingNewEq(0)); { @@ -115,4 +115,6 @@ int main() static_assert(!std::is_assignable::value, ""); } #endif + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/F_incomplete.pass.cpp b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/F_incomplete.pass.cpp index 1598486661cff..21c2f216efe8b 100644 --- a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/F_incomplete.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/F_incomplete.pass.cpp @@ -58,6 +58,8 @@ void test_pr34298() } } -int main() { +int main(int, char**) { test_pr34298(); + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/F_nullptr.pass.cpp b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/F_nullptr.pass.cpp index 89b7876235ec1..ebea3d0aa9546 100644 --- a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/F_nullptr.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/F_nullptr.pass.cpp @@ -239,8 +239,10 @@ void test_md() { test_imp(); } -int main() { +int main(int, char**) { test_func(); test_mf(); test_md(); + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc.fail.cpp b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc.fail.cpp index acbeb9f9c9883..50a11fb81989e 100644 --- a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc.fail.cpp +++ b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc.fail.cpp @@ -18,7 +18,9 @@ #include "min_allocator.h" -int main() +int main(int, char**) { std::function f(std::allocator_arg, std::allocator()); + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc.pass.cpp b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc.pass.cpp index b048109e54ba9..3b37ce6ffdc33 100644 --- a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc.pass.cpp @@ -20,10 +20,12 @@ #include "min_allocator.h" -int main() +int main(int, char**) { { std::function f(std::allocator_arg, bare_allocator()); assert(!f); } + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_F.fail.cpp b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_F.fail.cpp index bddc92787192d..c31c0a21f32c2 100644 --- a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_F.fail.cpp +++ b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_F.fail.cpp @@ -22,7 +22,9 @@ void foo(int) {} -int main() +int main(int, char**) { std::function f(std::allocator_arg, std::allocator(), foo); + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_F.pass.cpp b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_F.pass.cpp index 4d49434f3170d..6fa0d6faeaf08 100644 --- a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_F.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_F.pass.cpp @@ -106,7 +106,7 @@ void test_for_alloc(Alloc& alloc) { test_MemFunClass(alloc); } -int main() +int main(int, char**) { { bare_allocator bare_alloc; @@ -126,4 +126,6 @@ int main() } #endif + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_function.fail.cpp b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_function.fail.cpp index b6703c0b7b925..621588f8156c6 100644 --- a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_function.fail.cpp +++ b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_function.fail.cpp @@ -21,9 +21,11 @@ #include "test_macros.h" -int main() +int main(int, char**) { typedef std::function F; F f1; F f2(std::allocator_arg, std::allocator(), f1); + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_function.pass.cpp b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_function.pass.cpp index 39050e6f1534f..583ca162ebf3b 100644 --- a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_function.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_function.pass.cpp @@ -111,7 +111,7 @@ void test_for_alloc(Alloc& alloc) test_MemFunClass(alloc); } -int main() +int main(int, char**) { { bare_allocator alloc; @@ -121,4 +121,6 @@ int main() non_default_test_allocator alloc(42); test_for_alloc(alloc); } + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_nullptr.fail.cpp b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_nullptr.fail.cpp index 32d19ebf7049c..52bc528fe591f 100644 --- a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_nullptr.fail.cpp +++ b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_nullptr.fail.cpp @@ -20,7 +20,9 @@ #include "min_allocator.h" -int main() +int main(int, char**) { std::function f(std::allocator_arg, std::allocator(), nullptr); + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_nullptr.pass.cpp b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_nullptr.pass.cpp index 6378a6cd9d346..653057f6ec9e0 100644 --- a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_nullptr.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_nullptr.pass.cpp @@ -20,8 +20,10 @@ #include "min_allocator.h" -int main() +int main(int, char**) { std::function f(std::allocator_arg, bare_allocator(), nullptr); assert(!f); + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_rfunction.fail.cpp b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_rfunction.fail.cpp index 558b7814cedae..643cad8f07421 100644 --- a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_rfunction.fail.cpp +++ b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_rfunction.fail.cpp @@ -50,10 +50,12 @@ int A::count = 0; int g(int) { return 0; } -int main() +int main(int, char**) { { std::function f = A(); std::function f2(std::allocator_arg, std::allocator(), std::move(f)); } + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_rfunction.pass.cpp b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_rfunction.pass.cpp index 8f379e3030592..064046d0b2dd3 100644 --- a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_rfunction.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_rfunction.pass.cpp @@ -54,7 +54,7 @@ int A::count = 0; int g(int) { return 0; } -int main() +int main(int, char**) { assert(globalMemCounter.checkOutstandingNewEq(0)); { @@ -105,4 +105,6 @@ int main() assert(f2.target()); assert(f.target()); // f is unchanged because the target is small } + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/copy_assign.pass.cpp b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/copy_assign.pass.cpp index df2a43aba9dd9..d7b11ae1bfdde 100644 --- a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/copy_assign.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/copy_assign.pass.cpp @@ -48,7 +48,7 @@ int g(int) { return 0; } int g2(int, int) { return 2; } int g3(int, int, int) { return 3; } -int main() { +int main(int, char**) { assert(globalMemCounter.checkOutstandingNewEq(0)); { std::function f = A(); @@ -134,4 +134,6 @@ int main() { assert(f.target() == 0); } #endif + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/copy_move.pass.cpp b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/copy_move.pass.cpp index 9f03ee7a1f9ba..dbbde5ce47356 100644 --- a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/copy_move.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/copy_move.pass.cpp @@ -50,7 +50,7 @@ int A::count = 0; int g(int) {return 0;} -int main() +int main(int, char**) { assert(globalMemCounter.checkOutstandingNewEq(0)); { @@ -161,4 +161,6 @@ int main() LIBCPP_ASSERT(f.target()); // f is unchanged because the target is small } #endif // TEST_STD_VER >= 11 + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/default.pass.cpp b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/default.pass.cpp index 06ea4e058d06d..e89bafba775a2 100644 --- a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/default.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/default.pass.cpp @@ -10,13 +10,15 @@ // class function -// explicit function(); +// function(); #include #include -int main() +int main(int, char**) { std::function f; assert(!f); + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/move_reentrant.pass.cpp b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/move_reentrant.pass.cpp index 026cfc2d48449..e15fbbaae54db 100644 --- a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/move_reentrant.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/move_reentrant.pass.cpp @@ -33,7 +33,7 @@ struct A std::function A::global; bool A::cancel = false; -int main() +int main(int, char**) { A::global = A(); assert(A::global.target()); @@ -42,4 +42,6 @@ int main() A::cancel = true; A::global = std::function(nullptr); assert(!A::global.target()); + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/nullptr_t.pass.cpp b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/nullptr_t.pass.cpp index b685d53bfa092..d58e191c4709a 100644 --- a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/nullptr_t.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/nullptr_t.pass.cpp @@ -15,8 +15,10 @@ #include #include -int main() +int main(int, char**) { std::function f(nullptr); assert(!f); + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/nullptr_t_assign.pass.cpp b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/nullptr_t_assign.pass.cpp index 7a8d3e380e2a5..ff81080ffdaf1 100644 --- a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/nullptr_t_assign.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/nullptr_t_assign.pass.cpp @@ -46,7 +46,7 @@ int A::count = 0; int g(int) {return 0;} -int main() +int main(int, char**) { assert(globalMemCounter.checkOutstandingNewEq(0)); { @@ -68,4 +68,6 @@ int main() assert(globalMemCounter.checkOutstandingNewEq(0)); assert(f.target() == 0); } + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/nullptr_t_assign_reentrant.pass.cpp b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/nullptr_t_assign_reentrant.pass.cpp index c4006a7c9fd24..def86085ddb42 100644 --- a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/nullptr_t_assign_reentrant.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/nullptr_t_assign_reentrant.pass.cpp @@ -33,7 +33,7 @@ struct A std::function A::global; bool A::cancel = false; -int main() +int main(int, char**) { A::global = A(); assert(A::global.target()); @@ -42,4 +42,6 @@ int main() A::cancel = true; A::global = nullptr; assert(!A::global.target()); + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.inv/invoke.fail.cpp b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.inv/invoke.fail.cpp index 5f91e5c87d9d6..0f8e051d4067c 100644 --- a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.inv/invoke.fail.cpp +++ b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.inv/invoke.fail.cpp @@ -39,7 +39,9 @@ test_int_1() } } -int main() +int main(int, char**) { test_int_1(); + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.inv/invoke.pass.cpp b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.inv/invoke.pass.cpp index 7775cad67736b..fb67a3abf4ada 100644 --- a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.inv/invoke.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.inv/invoke.pass.cpp @@ -401,7 +401,7 @@ void test_int_2() } } -int main() +int main(int, char**) { test_void_0(); test_int_0(); @@ -409,4 +409,6 @@ int main() test_int_1(); test_void_2(); test_int_2(); + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.mod/assign_F_alloc.pass.cpp b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.mod/assign_F_alloc.pass.cpp index 5a6f503a28498..8ddd1cd2b187c 100644 --- a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.mod/assign_F_alloc.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.mod/assign_F_alloc.pass.cpp @@ -48,7 +48,7 @@ class A int A::count = 0; -int main() +int main(int, char**) { #if TEST_STD_VER <= 14 { @@ -60,4 +60,6 @@ int main() } assert(A::count == 0); #endif + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.mod/swap.pass.cpp b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.mod/swap.pass.cpp index a75aee33048a0..93997a0b55f8f 100644 --- a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.mod/swap.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.mod/swap.pass.cpp @@ -57,7 +57,7 @@ int h(int) { return 1; } int g2(int, int) { return 2; } int g3(int, int, int) { return 3; } -int main() { +int main(int, char**) { assert(globalMemCounter.checkOutstandingNewEq(0)); { std::function f1 = A(1); @@ -189,4 +189,6 @@ int main() { } assert(globalMemCounter.checkOutstandingNewEq(0)); assert(A::count == 0); + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.nullptr/operator_==.pass.cpp b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.nullptr/operator_==.pass.cpp index c68a1ca8262b7..698a461c8f031 100644 --- a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.nullptr/operator_==.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.nullptr/operator_==.pass.cpp @@ -27,7 +27,7 @@ int g(int) {return 0;} -int main() +int main(int, char**) { { std::function f; @@ -37,4 +37,6 @@ int main() assert(f != nullptr); assert(nullptr != f); } + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.targ/target.pass.cpp b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.targ/target.pass.cpp index 7b59b56d09213..d5031ba06e77c 100644 --- a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.targ/target.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.targ/target.pass.cpp @@ -55,7 +55,7 @@ int A::count = 0; int g(int) {return 0;} -int main() +int main(int, char**) { { std::function f = A(); @@ -89,4 +89,6 @@ int main() assert(f.target() == nullptr); } assert(A::count == 0); + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.targ/target_type.pass.cpp b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.targ/target_type.pass.cpp index 52d07a45a5084..d9c8fc48d758a 100644 --- a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.targ/target_type.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.targ/target_type.pass.cpp @@ -47,7 +47,7 @@ int A::count = 0; int g(int) {return 0;} -int main() +int main(int, char**) { { std::function f = A(); @@ -57,4 +57,6 @@ int main() std::function f; assert(f.target_type() == typeid(void)); } + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/types.pass.cpp b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/types.pass.cpp index 496dee8ae7508..8083ad83ac0cf 100644 --- a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/types.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/types.pass.cpp @@ -98,10 +98,12 @@ void test_other_function () static_assert((!has_second_argument_type::value), "" ); } -int main() +int main(int, char**) { test_nullary_function, int>(); test_unary_function , double, int>(); test_binary_function , double, int, char>(); test_other_function , double>(); + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/func.wrap/nothing_to_do.pass.cpp b/libcxx/test/std/utilities/function.objects/func.wrap/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/utilities/function.objects/func.wrap/nothing_to_do.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/func.wrap/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/logical.operations/logical_and.pass.cpp b/libcxx/test/std/utilities/function.objects/logical.operations/logical_and.pass.cpp index 1b0a1c63f16c8..29767a58c48bc 100644 --- a/libcxx/test/std/utilities/function.objects/logical.operations/logical_and.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/logical.operations/logical_and.pass.cpp @@ -16,7 +16,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { typedef std::logical_and F; const F f = F(); @@ -48,4 +48,6 @@ int main() constexpr bool bar = std::logical_and<> () (36.0, 36); static_assert ( bar, "" ); #endif + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/logical.operations/logical_not.pass.cpp b/libcxx/test/std/utilities/function.objects/logical.operations/logical_not.pass.cpp index 2c0c9f3bc9001..e93fd06fdd5aa 100644 --- a/libcxx/test/std/utilities/function.objects/logical.operations/logical_not.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/logical.operations/logical_not.pass.cpp @@ -16,7 +16,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { typedef std::logical_not F; const F f = F(); @@ -38,4 +38,6 @@ int main() constexpr bool bar = std::logical_not<> () (36); static_assert ( !bar, "" ); #endif + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/logical.operations/logical_or.pass.cpp b/libcxx/test/std/utilities/function.objects/logical.operations/logical_or.pass.cpp index 497a9d981f1e2..abe536572ea43 100644 --- a/libcxx/test/std/utilities/function.objects/logical.operations/logical_or.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/logical.operations/logical_or.pass.cpp @@ -16,7 +16,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { typedef std::logical_or F; const F f = F(); @@ -47,4 +47,6 @@ int main() constexpr bool bar = std::logical_or<> () (36.0, 36); static_assert ( bar, "" ); #endif + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/logical.operations/transparent.pass.cpp b/libcxx/test/std/utilities/function.objects/logical.operations/transparent.pass.cpp index 3aa24c4433045..eb590b31a014e 100644 --- a/libcxx/test/std/utilities/function.objects/logical.operations/transparent.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/logical.operations/transparent.pass.cpp @@ -22,7 +22,7 @@ struct is_transparent }; -int main () +int main(int, char**) { static_assert ( !is_transparent>::value, "" ); static_assert ( !is_transparent>::value, "" ); diff --git a/libcxx/test/std/utilities/function.objects/negators/binary_negate.depr_in_cxx17.fail.cpp b/libcxx/test/std/utilities/function.objects/negators/binary_negate.depr_in_cxx17.fail.cpp index ca8b76711cf35..713afc6656268 100644 --- a/libcxx/test/std/utilities/function.objects/negators/binary_negate.depr_in_cxx17.fail.cpp +++ b/libcxx/test/std/utilities/function.objects/negators/binary_negate.depr_in_cxx17.fail.cpp @@ -28,7 +28,9 @@ struct Predicate { bool operator()(first_argument_type, second_argument_type) const { return true; } }; -int main() { +int main(int, char**) { std::binary_negate f((Predicate())); // expected-error{{'binary_negate' is deprecated}} (void)f; + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/negators/binary_negate.pass.cpp b/libcxx/test/std/utilities/function.objects/negators/binary_negate.pass.cpp index 1e7edcb324268..41541c10ff1eb 100644 --- a/libcxx/test/std/utilities/function.objects/negators/binary_negate.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/negators/binary_negate.pass.cpp @@ -14,7 +14,7 @@ #include #include -int main() +int main(int, char**) { typedef std::binary_negate > F; const F f = F(std::logical_and()); @@ -25,4 +25,6 @@ int main() assert( f(36, 0)); assert( f(0, 36)); assert( f(0, 0)); + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/negators/not1.depr_in_cxx17.fail.cpp b/libcxx/test/std/utilities/function.objects/negators/not1.depr_in_cxx17.fail.cpp index 9fbe6db66f925..407cbd4fc2648 100644 --- a/libcxx/test/std/utilities/function.objects/negators/not1.depr_in_cxx17.fail.cpp +++ b/libcxx/test/std/utilities/function.objects/negators/not1.depr_in_cxx17.fail.cpp @@ -27,6 +27,8 @@ struct Predicate { bool operator()(argument_type) const { return true; } }; -int main() { +int main(int, char**) { std::not1(Predicate()); // expected-error{{'not1' is deprecated}} + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/negators/not1.pass.cpp b/libcxx/test/std/utilities/function.objects/negators/not1.pass.cpp index 33268222b5d9a..07c160a97abf1 100644 --- a/libcxx/test/std/utilities/function.objects/negators/not1.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/negators/not1.pass.cpp @@ -13,9 +13,11 @@ #include #include -int main() +int main(int, char**) { typedef std::logical_not F; assert(std::not1(F())(36)); assert(!std::not1(F())(0)); + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/negators/not2.depr_in_cxx17.fail.cpp b/libcxx/test/std/utilities/function.objects/negators/not2.depr_in_cxx17.fail.cpp index 032ce3429dc16..24178e0a05dca 100644 --- a/libcxx/test/std/utilities/function.objects/negators/not2.depr_in_cxx17.fail.cpp +++ b/libcxx/test/std/utilities/function.objects/negators/not2.depr_in_cxx17.fail.cpp @@ -28,6 +28,8 @@ struct Predicate { bool operator()(first_argument_type, second_argument_type) const { return true; } }; -int main() { +int main(int, char**) { std::not2(Predicate()); // expected-error{{'not2' is deprecated}} + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/negators/not2.pass.cpp b/libcxx/test/std/utilities/function.objects/negators/not2.pass.cpp index 208d33b4a3eaa..d9f3c95fd8969 100644 --- a/libcxx/test/std/utilities/function.objects/negators/not2.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/negators/not2.pass.cpp @@ -13,11 +13,13 @@ #include #include -int main() +int main(int, char**) { typedef std::logical_and F; assert(!std::not2(F())(36, 36)); assert( std::not2(F())(36, 0)); assert( std::not2(F())(0, 36)); assert( std::not2(F())(0, 0)); + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/negators/unary_negate.depr_in_cxx17.fail.cpp b/libcxx/test/std/utilities/function.objects/negators/unary_negate.depr_in_cxx17.fail.cpp index 99cdf136d6422..15a0a277826ea 100644 --- a/libcxx/test/std/utilities/function.objects/negators/unary_negate.depr_in_cxx17.fail.cpp +++ b/libcxx/test/std/utilities/function.objects/negators/unary_negate.depr_in_cxx17.fail.cpp @@ -27,7 +27,9 @@ struct Predicate { bool operator()(argument_type) const { return true; } }; -int main() { +int main(int, char**) { std::unary_negate f((Predicate())); // expected-error{{'unary_negate' is deprecated}} (void)f; + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/negators/unary_negate.pass.cpp b/libcxx/test/std/utilities/function.objects/negators/unary_negate.pass.cpp index ec00c3e32a2f0..54fd54f396934 100644 --- a/libcxx/test/std/utilities/function.objects/negators/unary_negate.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/negators/unary_negate.pass.cpp @@ -14,7 +14,7 @@ #include #include -int main() +int main(int, char**) { typedef std::unary_negate > F; const F f = F(std::logical_not()); @@ -22,4 +22,6 @@ int main() static_assert((std::is_same::value), "" ); assert(f(36)); assert(!f(0)); + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/refwrap/refwrap.access/conversion.pass.cpp b/libcxx/test/std/utilities/function.objects/refwrap/refwrap.access/conversion.pass.cpp index 5e67db520fb55..c15989f003e70 100644 --- a/libcxx/test/std/utilities/function.objects/refwrap/refwrap.access/conversion.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/refwrap/refwrap.access/conversion.pass.cpp @@ -30,7 +30,7 @@ test(T& t) void f() {} -int main() +int main(int, char**) { void (*fp)() = f; test(fp); @@ -41,4 +41,6 @@ int main() test(i); const int j = 0; test(j); + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/refwrap/refwrap.assign/copy_assign.pass.cpp b/libcxx/test/std/utilities/function.objects/refwrap/refwrap.assign/copy_assign.pass.cpp index 16ce961126cbf..3ef0cdda8696f 100644 --- a/libcxx/test/std/utilities/function.objects/refwrap/refwrap.assign/copy_assign.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/refwrap/refwrap.assign/copy_assign.pass.cpp @@ -42,7 +42,7 @@ test_function() assert(&r2.get() == &f); } -int main() +int main(int, char**) { void (*fp)() = f; test(fp); @@ -53,4 +53,6 @@ int main() test(i); const int j = 0; test(j); + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/refwrap/refwrap.const/copy_ctor.pass.cpp b/libcxx/test/std/utilities/function.objects/refwrap/refwrap.const/copy_ctor.pass.cpp index 64726b53ef878..355047d98ceba 100644 --- a/libcxx/test/std/utilities/function.objects/refwrap/refwrap.const/copy_ctor.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/refwrap/refwrap.const/copy_ctor.pass.cpp @@ -30,7 +30,7 @@ test(T& t) void f() {} -int main() +int main(int, char**) { void (*fp)() = f; test(fp); @@ -41,4 +41,6 @@ int main() test(i); const int j = 0; test(j); + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/refwrap/refwrap.const/type_ctor.fail.cpp b/libcxx/test/std/utilities/function.objects/refwrap/refwrap.const/type_ctor.fail.cpp index f7a6670b431f3..f02a9974d7da0 100644 --- a/libcxx/test/std/utilities/function.objects/refwrap/refwrap.const/type_ctor.fail.cpp +++ b/libcxx/test/std/utilities/function.objects/refwrap/refwrap.const/type_ctor.fail.cpp @@ -17,7 +17,9 @@ #include #include -int main() +int main(int, char**) { std::reference_wrapper r(3); + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/refwrap/refwrap.const/type_ctor.pass.cpp b/libcxx/test/std/utilities/function.objects/refwrap/refwrap.const/type_ctor.pass.cpp index 2cbb1a010f12c..a43d0fd25109f 100644 --- a/libcxx/test/std/utilities/function.objects/refwrap/refwrap.const/type_ctor.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/refwrap/refwrap.const/type_ctor.pass.cpp @@ -29,7 +29,7 @@ test(T& t) void f() {} -int main() +int main(int, char**) { void (*fp)() = f; test(fp); @@ -40,4 +40,6 @@ int main() test(i); const int j = 0; test(j); + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/refwrap/refwrap.helpers/cref_1.pass.cpp b/libcxx/test/std/utilities/function.objects/refwrap/refwrap.helpers/cref_1.pass.cpp index b16a4b476c3dc..d4cb421f53eb4 100644 --- a/libcxx/test/std/utilities/function.objects/refwrap/refwrap.helpers/cref_1.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/refwrap/refwrap.helpers/cref_1.pass.cpp @@ -15,9 +15,11 @@ #include #include -int main() +int main(int, char**) { int i = 0; std::reference_wrapper r = std::cref(i); assert(&r.get() == &i); + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/refwrap/refwrap.helpers/cref_2.pass.cpp b/libcxx/test/std/utilities/function.objects/refwrap/refwrap.helpers/cref_2.pass.cpp index 3023f8da2a3b5..093b7e230fd49 100644 --- a/libcxx/test/std/utilities/function.objects/refwrap/refwrap.helpers/cref_2.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/refwrap/refwrap.helpers/cref_2.pass.cpp @@ -15,10 +15,12 @@ #include #include -int main() +int main(int, char**) { const int i = 0; std::reference_wrapper r1 = std::cref(i); std::reference_wrapper r2 = std::cref(r1); assert(&r2.get() == &i); + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/refwrap/refwrap.helpers/ref_1.fail.cpp b/libcxx/test/std/utilities/function.objects/refwrap/refwrap.helpers/ref_1.fail.cpp index 9e283d1bfaf14..c07028d21ddda 100644 --- a/libcxx/test/std/utilities/function.objects/refwrap/refwrap.helpers/ref_1.fail.cpp +++ b/libcxx/test/std/utilities/function.objects/refwrap/refwrap.helpers/ref_1.fail.cpp @@ -22,7 +22,9 @@ struct A {}; const A source() {return A();} -int main() +int main(int, char**) { std::reference_wrapper r = std::ref(source()); + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/refwrap/refwrap.helpers/ref_1.pass.cpp b/libcxx/test/std/utilities/function.objects/refwrap/refwrap.helpers/ref_1.pass.cpp index a8af5aa4cfe3e..f64d8ad8caeba 100644 --- a/libcxx/test/std/utilities/function.objects/refwrap/refwrap.helpers/ref_1.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/refwrap/refwrap.helpers/ref_1.pass.cpp @@ -15,9 +15,11 @@ #include #include -int main() +int main(int, char**) { int i = 0; std::reference_wrapper r = std::ref(i); assert(&r.get() == &i); + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/refwrap/refwrap.helpers/ref_2.pass.cpp b/libcxx/test/std/utilities/function.objects/refwrap/refwrap.helpers/ref_2.pass.cpp index fee5009a73b72..4fdaf992c64d0 100644 --- a/libcxx/test/std/utilities/function.objects/refwrap/refwrap.helpers/ref_2.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/refwrap/refwrap.helpers/ref_2.pass.cpp @@ -22,7 +22,7 @@ bool is5 ( int i ) { return i == 5; } template bool call_pred ( T pred ) { return pred(5); } -int main() +int main(int, char**) { { int i = 0; @@ -39,4 +39,6 @@ int main() assert(call_pred(std::ref(cp))); assert(cp.count() == 2); } + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/refwrap/refwrap.invoke/invoke.fail.cpp b/libcxx/test/std/utilities/function.objects/refwrap/refwrap.invoke/invoke.fail.cpp index 6302c51b8ad96..d54d5184c65be 100644 --- a/libcxx/test/std/utilities/function.objects/refwrap/refwrap.invoke/invoke.fail.cpp +++ b/libcxx/test/std/utilities/function.objects/refwrap/refwrap.invoke/invoke.fail.cpp @@ -45,7 +45,9 @@ test_int_1() } } -int main() +int main(int, char**) { test_int_1(); + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/refwrap/refwrap.invoke/invoke.pass.cpp b/libcxx/test/std/utilities/function.objects/refwrap/refwrap.invoke/invoke.pass.cpp index 425bc6df0c82c..fd31041330dd3 100644 --- a/libcxx/test/std/utilities/function.objects/refwrap/refwrap.invoke/invoke.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/refwrap/refwrap.invoke/invoke.pass.cpp @@ -319,10 +319,12 @@ testint_2() } } -int main() +int main(int, char**) { test_void_1(); test_int_1(); test_void_2(); testint_2(); + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/refwrap/refwrap.invoke/invoke_int_0.pass.cpp b/libcxx/test/std/utilities/function.objects/refwrap/refwrap.invoke/invoke_int_0.pass.cpp index 37d7cfca9deea..67cf51f33596f 100644 --- a/libcxx/test/std/utilities/function.objects/refwrap/refwrap.invoke/invoke_int_0.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/refwrap/refwrap.invoke/invoke_int_0.pass.cpp @@ -69,7 +69,9 @@ struct A_void_1 } }; -int main() +int main(int, char**) { test_int_0(); + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/refwrap/refwrap.invoke/invoke_void_0.pass.cpp b/libcxx/test/std/utilities/function.objects/refwrap/refwrap.invoke/invoke_void_0.pass.cpp index 735bfd890dd30..18e655313336d 100644 --- a/libcxx/test/std/utilities/function.objects/refwrap/refwrap.invoke/invoke_void_0.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/refwrap/refwrap.invoke/invoke_void_0.pass.cpp @@ -61,7 +61,9 @@ test_void_0() } } -int main() +int main(int, char**) { test_void_0(); + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/refwrap/type.pass.cpp b/libcxx/test/std/utilities/function.objects/refwrap/type.pass.cpp index ef46e15d0a043..d17ab8100ef0d 100644 --- a/libcxx/test/std/utilities/function.objects/refwrap/type.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/refwrap/type.pass.cpp @@ -17,7 +17,7 @@ class C {}; -int main() +int main(int, char**) { static_assert((std::is_same::type, C>::value), ""); @@ -33,4 +33,6 @@ int main() int*(C::*)(double*)>::value), ""); static_assert((std::is_same::type, int (C::*)(double*) const volatile>::value), ""); + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/refwrap/type_properties.pass.cpp b/libcxx/test/std/utilities/function.objects/refwrap/type_properties.pass.cpp index 14a06a9c316d0..17eef26f07a6d 100644 --- a/libcxx/test/std/utilities/function.objects/refwrap/type_properties.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/refwrap/type_properties.pass.cpp @@ -52,7 +52,7 @@ void test() #endif } -int main() +int main(int, char**) { test(); test(); @@ -60,4 +60,6 @@ int main() #if TEST_STD_VER >= 11 test(); #endif + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/refwrap/unwrap_ref_decay.pass.cpp b/libcxx/test/std/utilities/function.objects/refwrap/unwrap_ref_decay.pass.cpp index 9aaa2827997d4..1987898393cd1 100644 --- a/libcxx/test/std/utilities/function.objects/refwrap/unwrap_ref_decay.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/refwrap/unwrap_ref_decay.pass.cpp @@ -28,7 +28,7 @@ void check() { struct T { }; -int main() { +int main(int, char**) { check(); check(); check(); @@ -54,4 +54,6 @@ int main() { check&, T (&)[3]>(); check, T (&)()>(); check&, T (&)()>(); + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/refwrap/unwrap_reference.pass.cpp b/libcxx/test/std/utilities/function.objects/refwrap/unwrap_reference.pass.cpp index f6d48a51e8b49..209d5e2a0bc93 100644 --- a/libcxx/test/std/utilities/function.objects/refwrap/unwrap_reference.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/refwrap/unwrap_reference.pass.cpp @@ -39,7 +39,7 @@ void check() { struct T { }; -int main() { +int main(int, char**) { check(); check(); check(); @@ -47,4 +47,6 @@ int main() { check(); check(); check(); + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/refwrap/weak_result.pass.cpp b/libcxx/test/std/utilities/function.objects/refwrap/weak_result.pass.cpp index 50cda11693274..5a6a41fdbe0eb 100644 --- a/libcxx/test/std/utilities/function.objects/refwrap/weak_result.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/refwrap/weak_result.pass.cpp @@ -68,7 +68,7 @@ struct has_result_type static const bool value = sizeof(test(0)) == 1; }; -int main() +int main(int, char**) { static_assert((std::is_same::result_type, char>::value), ""); @@ -93,4 +93,6 @@ int main() static_assert(has_result_type >::value, ""); static_assert(!has_result_type >::value, ""); static_assert(!has_result_type >::value, ""); + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/unord.hash/enabled_hashes.pass.cpp b/libcxx/test/std/utilities/function.objects/unord.hash/enabled_hashes.pass.cpp index 90ab8e1bb79d2..8f6c3e14e2cf9 100644 --- a/libcxx/test/std/utilities/function.objects/unord.hash/enabled_hashes.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/unord.hash/enabled_hashes.pass.cpp @@ -17,6 +17,8 @@ #include "poisoned_hash_helper.hpp" -int main() { +int main(int, char**) { test_library_hash_specializations_available(); + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/unord.hash/enum.fail.cpp b/libcxx/test/std/utilities/function.objects/unord.hash/enum.fail.cpp index b824b51ea7991..2e36b4c55318a 100644 --- a/libcxx/test/std/utilities/function.objects/unord.hash/enum.fail.cpp +++ b/libcxx/test/std/utilities/function.objects/unord.hash/enum.fail.cpp @@ -16,8 +16,10 @@ struct X {}; -int main() +int main(int, char**) { X x; size_t h = std::hash{} ( x ); + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/unord.hash/enum.pass.cpp b/libcxx/test/std/utilities/function.objects/unord.hash/enum.pass.cpp index 96c667febcb8e..e172bc2f34694 100644 --- a/libcxx/test/std/utilities/function.objects/unord.hash/enum.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/unord.hash/enum.pass.cpp @@ -49,7 +49,7 @@ test() } } -int main() +int main(int, char**) { test(); @@ -59,4 +59,6 @@ int main() test(); test(); + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/unord.hash/floating.pass.cpp b/libcxx/test/std/utilities/function.objects/unord.hash/floating.pass.cpp index 1ab1643413a9f..31b1b2d07e407 100644 --- a/libcxx/test/std/utilities/function.objects/unord.hash/floating.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/unord.hash/floating.pass.cpp @@ -64,9 +64,11 @@ test() assert(pinf != ninf); } -int main() +int main(int, char**) { test(); test(); test(); + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/unord.hash/integral.pass.cpp b/libcxx/test/std/utilities/function.objects/unord.hash/integral.pass.cpp index 761c76dc141e4..dbd44a88207b3 100644 --- a/libcxx/test/std/utilities/function.objects/unord.hash/integral.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/unord.hash/integral.pass.cpp @@ -46,7 +46,7 @@ test() } } -int main() +int main(int, char**) { test(); test(); @@ -108,4 +108,6 @@ int main() test<__int128_t>(); test<__uint128_t>(); #endif + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/unord.hash/non_enum.pass.cpp b/libcxx/test/std/utilities/function.objects/unord.hash/non_enum.pass.cpp index 6efcebc4ebeae..c47f8fa76a4b3 100644 --- a/libcxx/test/std/utilities/function.objects/unord.hash/non_enum.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/unord.hash/non_enum.pass.cpp @@ -22,7 +22,7 @@ struct X {}; -int main() +int main(int, char**) { using H = std::hash; static_assert(!std::is_default_constructible::value, ""); @@ -34,4 +34,6 @@ int main() static_assert(!std::is_invocable::value, ""); static_assert(!std::is_invocable::value, ""); #endif + + return 0; } diff --git a/libcxx/test/std/utilities/function.objects/unord.hash/pointer.pass.cpp b/libcxx/test/std/utilities/function.objects/unord.hash/pointer.pass.cpp index cbf2c736eabba..17dfdce2d4a85 100644 --- a/libcxx/test/std/utilities/function.objects/unord.hash/pointer.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/unord.hash/pointer.pass.cpp @@ -52,8 +52,10 @@ void test_nullptr() #endif } -int main() +int main(int, char**) { test(); test_nullptr(); + + return 0; } diff --git a/libcxx/test/std/utilities/intseq/intseq.general/integer_seq.pass.cpp b/libcxx/test/std/utilities/intseq/intseq.general/integer_seq.pass.cpp index 8da459ff81d6e..90b09132d9e4c 100644 --- a/libcxx/test/std/utilities/intseq/intseq.general/integer_seq.pass.cpp +++ b/libcxx/test/std/utilities/intseq/intseq.general/integer_seq.pass.cpp @@ -21,7 +21,7 @@ auto extract ( const AtContainer &t, const std::integer_sequence ) -> decltype ( std::make_tuple ( std::get(t)... )) { return std::make_tuple ( std::get(t)... ); } -int main() +int main(int, char**) { // Make a couple of sequences using int3 = std::make_integer_sequence; // generates int: 0,1,2 @@ -76,4 +76,6 @@ int main() auto tsizemix = extract ( tup, sizemix ()); static_assert ( std::tuple_size::value == sizemix::size (), "tsizemix size wrong"); assert ( tsizemix == std::make_tuple ( 11, 11, 12, 13, 15 )); + + return 0; } diff --git a/libcxx/test/std/utilities/intseq/intseq.intseq/integer_seq.fail.cpp b/libcxx/test/std/utilities/intseq/intseq.intseq/integer_seq.fail.cpp index 44ffb01787627..248b346e33a0d 100644 --- a/libcxx/test/std/utilities/intseq/intseq.intseq/integer_seq.fail.cpp +++ b/libcxx/test/std/utilities/intseq/intseq.intseq/integer_seq.fail.cpp @@ -23,7 +23,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { #if TEST_STD_VER > 11 @@ -36,4 +36,6 @@ int main() X #endif // TEST_STD_VER > 11 + + return 0; } diff --git a/libcxx/test/std/utilities/intseq/intseq.intseq/integer_seq.pass.cpp b/libcxx/test/std/utilities/intseq/intseq.intseq/integer_seq.pass.cpp index 653d2988a7cc2..a8e14c9a9cdd8 100644 --- a/libcxx/test/std/utilities/intseq/intseq.intseq/integer_seq.pass.cpp +++ b/libcxx/test/std/utilities/intseq/intseq.intseq/integer_seq.pass.cpp @@ -22,7 +22,7 @@ #include #include -int main() +int main(int, char**) { // Make a few of sequences using int3 = std::integer_sequence; @@ -42,4 +42,6 @@ int main() static_assert ( std::is_same::value, "bool0 type wrong" ); static_assert ( bool0::size() == 0, "bool0 size wrong" ); + + return 0; } diff --git a/libcxx/test/std/utilities/intseq/intseq.make/make_integer_seq.fail.cpp b/libcxx/test/std/utilities/intseq/intseq.make/make_integer_seq.fail.cpp index 2f2a6608b2c87..ec2e8cc7c2c39 100644 --- a/libcxx/test/std/utilities/intseq/intseq.make/make_integer_seq.fail.cpp +++ b/libcxx/test/std/utilities/intseq/intseq.make/make_integer_seq.fail.cpp @@ -22,7 +22,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { typedef std::make_integer_sequence MakeSeqT; @@ -33,4 +33,6 @@ int main() #else MakeSeqT i; // expected-error@utility:* {{static_assert failed "std::make_integer_sequence must have a non-negative sequence length"}} #endif + + return 0; } diff --git a/libcxx/test/std/utilities/intseq/intseq.make/make_integer_seq.pass.cpp b/libcxx/test/std/utilities/intseq/intseq.make/make_integer_seq.pass.cpp index 3c522c73bf986..50b49dd725e40 100644 --- a/libcxx/test/std/utilities/intseq/intseq.make/make_integer_seq.pass.cpp +++ b/libcxx/test/std/utilities/intseq/intseq.make/make_integer_seq.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { static_assert(std::is_same, std::integer_sequence>::value, ""); static_assert(std::is_same, std::integer_sequence>::value, ""); @@ -28,4 +28,6 @@ int main() static_assert(std::is_same, std::integer_sequence>::value, ""); static_assert(std::is_same, std::integer_sequence>::value, ""); static_assert(std::is_same, std::integer_sequence>::value, ""); + + return 0; } diff --git a/libcxx/test/std/utilities/intseq/nothing_to_do.pass.cpp b/libcxx/test/std/utilities/intseq/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/utilities/intseq/nothing_to_do.pass.cpp +++ b/libcxx/test/std/utilities/intseq/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/utilities/memory/allocator.tag/allocator_arg.pass.cpp b/libcxx/test/std/utilities/memory/allocator.tag/allocator_arg.pass.cpp index b095dbfaf1660..1a58726a85462 100644 --- a/libcxx/test/std/utilities/memory/allocator.tag/allocator_arg.pass.cpp +++ b/libcxx/test/std/utilities/memory/allocator.tag/allocator_arg.pass.cpp @@ -15,7 +15,9 @@ void test(std::allocator_arg_t) {} -int main() +int main(int, char**) { test(std::allocator_arg); + + return 0; } diff --git a/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.members/allocate.fail.cpp b/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.members/allocate.fail.cpp index 60f267fa5e399..47cfbb0494b56 100644 --- a/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.members/allocate.fail.cpp +++ b/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.members/allocate.fail.cpp @@ -42,9 +42,11 @@ struct A } }; -int main() +int main(int, char**) { A a; std::allocator_traits >::allocate(a, 10); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} std::allocator_traits >::allocate(a, 10, nullptr); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} + + return 0; } diff --git a/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.members/allocate.pass.cpp b/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.members/allocate.pass.cpp index a892be03d9dd4..0ac2f266e8155 100644 --- a/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.members/allocate.pass.cpp +++ b/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.members/allocate.pass.cpp @@ -33,7 +33,7 @@ struct A } }; -int main() +int main(int, char**) { { A a; @@ -45,4 +45,6 @@ int main() Alloc a; assert(std::allocator_traits::allocate(a, 10) == reinterpret_cast(static_cast(0xDEADBEEF))); } + + return 0; } diff --git a/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.members/allocate_hint.pass.cpp b/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.members/allocate_hint.pass.cpp index 9d4631740b050..e95247163988c 100644 --- a/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.members/allocate_hint.pass.cpp +++ b/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.members/allocate_hint.pass.cpp @@ -53,7 +53,7 @@ struct B }; -int main() +int main(int, char**) { #if TEST_STD_VER >= 11 { @@ -77,4 +77,6 @@ int main() Alloc b; assert(std::allocator_traits::allocate(b, 11, nullptr) == reinterpret_cast(static_cast(0xFEADBEEF))); } + + return 0; } diff --git a/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.members/construct.pass.cpp b/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.members/construct.pass.cpp index 252d99a7a7499..67a2e8f4ac8b2 100644 --- a/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.members/construct.pass.cpp +++ b/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.members/construct.pass.cpp @@ -81,7 +81,7 @@ struct A2 int A2::count = 0; -int main() +int main(int, char**) { { A0::count = 0; @@ -149,4 +149,6 @@ int main() assert(b_construct == 1); } #endif + + return 0; } diff --git a/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.members/deallocate.pass.cpp b/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.members/deallocate.pass.cpp index 94f10b64dba91..c738416e01dce 100644 --- a/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.members/deallocate.pass.cpp +++ b/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.members/deallocate.pass.cpp @@ -36,7 +36,7 @@ struct A } }; -int main() +int main(int, char**) { { A a; @@ -51,4 +51,6 @@ int main() std::allocator_traits::deallocate(a, reinterpret_cast(static_cast(0xDEADBEEF)), 10); assert(called == 1); } + + return 0; } diff --git a/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.members/destroy.pass.cpp b/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.members/destroy.pass.cpp index 677c647a27dc6..70890d8512fd2 100644 --- a/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.members/destroy.pass.cpp +++ b/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.members/destroy.pass.cpp @@ -54,7 +54,7 @@ struct A0 int A0::count = 0; -int main() +int main(int, char**) { { A0::count = 0; @@ -86,4 +86,6 @@ int main() assert(b_destroy == 1); } #endif + + return 0; } diff --git a/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.members/max_size.pass.cpp b/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.members/max_size.pass.cpp index a51ec6e95ac13..b758c9add8c0e 100644 --- a/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.members/max_size.pass.cpp +++ b/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.members/max_size.pass.cpp @@ -42,7 +42,7 @@ struct B } }; -int main() +int main(int, char**) { { B b; @@ -74,4 +74,6 @@ int main() static_assert(noexcept(std::allocator_traits>::max_size(a)) == true, ""); } #endif + + return 0; } diff --git a/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.members/select_on_container_copy_construction.pass.cpp b/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.members/select_on_container_copy_construction.pass.cpp index 9594531dad9ab..be837670dd3f3 100644 --- a/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.members/select_on_container_copy_construction.pass.cpp +++ b/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.members/select_on_container_copy_construction.pass.cpp @@ -47,7 +47,7 @@ struct B } }; -int main() +int main(int, char**) { { A a; @@ -73,4 +73,6 @@ int main() assert(std::allocator_traits >::select_on_container_copy_construction(b).id == 100); } #endif + + return 0; } diff --git a/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.types/const_pointer.pass.cpp b/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.types/const_pointer.pass.cpp index f153d95b4aa44..756958b584f3f 100644 --- a/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.types/const_pointer.pass.cpp +++ b/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.types/const_pointer.pass.cpp @@ -55,7 +55,7 @@ struct D { typedef void const_pointer; }; -int main() +int main(int, char**) { static_assert((std::is_same >::const_pointer, Ptr >::value), ""); static_assert((std::is_same >::const_pointer, const char*>::value), ""); @@ -63,4 +63,6 @@ int main() #if TEST_STD_VER >= 11 static_assert((std::is_same >::const_pointer, const char*>::value), ""); #endif + + return 0; } diff --git a/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.types/const_void_pointer.pass.cpp b/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.types/const_void_pointer.pass.cpp index 3acedde65443f..4fcc2fb7c15ec 100644 --- a/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.types/const_void_pointer.pass.cpp +++ b/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.types/const_void_pointer.pass.cpp @@ -57,7 +57,7 @@ struct D typedef int const_void_pointer; }; -int main() +int main(int, char**) { static_assert((std::is_same >::const_void_pointer, Ptr >::value), ""); static_assert((std::is_same >::const_void_pointer, const void*>::value), ""); @@ -65,4 +65,6 @@ int main() #if TEST_STD_VER >= 11 static_assert((std::is_same >::const_void_pointer, const void*>::value), ""); #endif + + return 0; } diff --git a/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.types/difference_type.pass.cpp b/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.types/difference_type.pass.cpp index b0ee16350839a..35721f1cbba9d 100644 --- a/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.types/difference_type.pass.cpp +++ b/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.types/difference_type.pass.cpp @@ -66,7 +66,7 @@ struct pointer_traits::pointer> } -int main() +int main(int, char**) { static_assert((std::is_same >::difference_type, short>::value), ""); static_assert((std::is_same >::difference_type, std::ptrdiff_t>::value), ""); @@ -74,4 +74,6 @@ int main() #if TEST_STD_VER >= 11 static_assert((std::is_same >::difference_type, std::ptrdiff_t>::value), ""); #endif + + return 0; } diff --git a/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.types/is_always_equal.pass.cpp b/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.types/is_always_equal.pass.cpp index fae61849331a8..42b0fbab19ccd 100644 --- a/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.types/is_always_equal.pass.cpp +++ b/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.types/is_always_equal.pass.cpp @@ -39,7 +39,7 @@ struct C int not_empty_; // some random member variable }; -int main() +int main(int, char**) { static_assert((std::is_same >::is_always_equal, std::true_type>::value), ""); static_assert((std::is_same >::is_always_equal, std::true_type>::value), ""); @@ -48,4 +48,6 @@ int main() static_assert((std::is_same >::is_always_equal, std::true_type>::value), ""); static_assert((std::is_same >::is_always_equal, std::true_type>::value), ""); static_assert((std::is_same >::is_always_equal, std::false_type>::value), ""); + + return 0; } diff --git a/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.types/pointer.pass.cpp b/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.types/pointer.pass.cpp index 60f3d257afd97..58b306660a863 100644 --- a/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.types/pointer.pass.cpp +++ b/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.types/pointer.pass.cpp @@ -43,11 +43,13 @@ struct C { typedef void pointer; }; -int main() +int main(int, char**) { static_assert((std::is_same >::pointer, Ptr >::value), ""); static_assert((std::is_same >::pointer, char*>::value), ""); #if TEST_STD_VER >= 11 static_assert((std::is_same >::pointer, char*>::value), ""); #endif + + return 0; } diff --git a/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.types/propagate_on_container_copy_assignment.pass.cpp b/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.types/propagate_on_container_copy_assignment.pass.cpp index c8451b2a975b9..b049159e2d1b9 100644 --- a/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.types/propagate_on_container_copy_assignment.pass.cpp +++ b/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.types/propagate_on_container_copy_assignment.pass.cpp @@ -43,11 +43,13 @@ struct C typedef std::true_type propagate_on_container_copy_assignment; }; -int main() +int main(int, char**) { static_assert((std::is_same >::propagate_on_container_copy_assignment, std::true_type>::value), ""); static_assert((std::is_same >::propagate_on_container_copy_assignment, std::false_type>::value), ""); #if TEST_STD_VER >= 11 static_assert((std::is_same >::propagate_on_container_copy_assignment, std::false_type>::value), ""); #endif + + return 0; } diff --git a/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.types/propagate_on_container_move_assignment.pass.cpp b/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.types/propagate_on_container_move_assignment.pass.cpp index 7c58ac8811ba5..602ba96d5c114 100644 --- a/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.types/propagate_on_container_move_assignment.pass.cpp +++ b/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.types/propagate_on_container_move_assignment.pass.cpp @@ -44,11 +44,13 @@ struct C }; -int main() +int main(int, char**) { static_assert((std::is_same >::propagate_on_container_move_assignment, std::true_type>::value), ""); static_assert((std::is_same >::propagate_on_container_move_assignment, std::false_type>::value), ""); #if TEST_STD_VER >= 11 static_assert((std::is_same >::propagate_on_container_move_assignment, std::false_type>::value), ""); #endif + + return 0; } diff --git a/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.types/propagate_on_container_swap.pass.cpp b/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.types/propagate_on_container_swap.pass.cpp index 7a6bcd460a6e1..5ae53015fa34a 100644 --- a/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.types/propagate_on_container_swap.pass.cpp +++ b/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.types/propagate_on_container_swap.pass.cpp @@ -42,11 +42,13 @@ struct C typedef std::true_type propagate_on_container_swap; }; -int main() +int main(int, char**) { static_assert((std::is_same >::propagate_on_container_swap, std::true_type>::value), ""); static_assert((std::is_same >::propagate_on_container_swap, std::false_type>::value), ""); #if TEST_STD_VER >= 11 static_assert((std::is_same >::propagate_on_container_swap, std::false_type>::value), ""); #endif + + return 0; } diff --git a/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.types/rebind_alloc.pass.cpp b/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.types/rebind_alloc.pass.cpp index eaadeb17048db..d0d8476a89a9e 100644 --- a/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.types/rebind_alloc.pass.cpp +++ b/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.types/rebind_alloc.pass.cpp @@ -80,7 +80,7 @@ struct G { }; }; -int main() +int main(int, char**) { #if TEST_STD_VER >= 11 static_assert((std::is_same >::rebind_alloc, ReboundA >::value), ""); @@ -97,4 +97,6 @@ int main() static_assert((std::is_same >::rebind_alloc::other, D >::value), ""); static_assert((std::is_same >::rebind_alloc::other, E >::value), ""); #endif + + return 0; } diff --git a/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.types/size_type.pass.cpp b/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.types/size_type.pass.cpp index 42b29a39c7b33..cd74671390e7e 100644 --- a/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.types/size_type.pass.cpp +++ b/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.types/size_type.pass.cpp @@ -62,7 +62,7 @@ struct pointer_traits::pointer> } -int main() +int main(int, char**) { static_assert((std::is_same >::size_type, unsigned short>::value), ""); static_assert((std::is_same >::size_type, @@ -72,4 +72,6 @@ int main() #if TEST_STD_VER >= 11 static_assert((std::is_same >::size_type, unsigned short>::value), ""); #endif + + return 0; } diff --git a/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.types/void_pointer.pass.cpp b/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.types/void_pointer.pass.cpp index 687d892f0cfed..55954dc7091ab 100644 --- a/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.types/void_pointer.pass.cpp +++ b/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.types/void_pointer.pass.cpp @@ -56,7 +56,7 @@ struct D typedef void void_pointer; }; -int main() +int main(int, char**) { static_assert((std::is_same >::void_pointer, Ptr >::value), ""); static_assert((std::is_same >::void_pointer, void*>::value), ""); @@ -64,4 +64,6 @@ int main() #if TEST_STD_VER >= 11 static_assert((std::is_same >::void_pointer, void*>::value), ""); #endif + + return 0; } diff --git a/libcxx/test/std/utilities/memory/allocator.traits/allocator_type.pass.cpp b/libcxx/test/std/utilities/memory/allocator.traits/allocator_type.pass.cpp index d5977f0a28ffd..840ad820e1fe1 100644 --- a/libcxx/test/std/utilities/memory/allocator.traits/allocator_type.pass.cpp +++ b/libcxx/test/std/utilities/memory/allocator.traits/allocator_type.pass.cpp @@ -24,7 +24,9 @@ struct A typedef T value_type; }; -int main() +int main(int, char**) { static_assert((std::is_same >::allocator_type, A >::value), ""); + + return 0; } diff --git a/libcxx/test/std/utilities/memory/allocator.traits/rebind_traits.pass.cpp b/libcxx/test/std/utilities/memory/allocator.traits/rebind_traits.pass.cpp index 475ab04b83994..01aac9445c838 100644 --- a/libcxx/test/std/utilities/memory/allocator.traits/rebind_traits.pass.cpp +++ b/libcxx/test/std/utilities/memory/allocator.traits/rebind_traits.pass.cpp @@ -62,7 +62,7 @@ struct E template struct rebind {typedef ReboundA otter;}; }; -int main() +int main(int, char**) { #if TEST_STD_VER >= 11 static_assert((std::is_same >::rebind_traits, std::allocator_traits > >::value), ""); @@ -77,4 +77,6 @@ int main() static_assert((std::is_same >::rebind_traits::other, std::allocator_traits > >::value), ""); static_assert((std::is_same >::rebind_traits::other, std::allocator_traits > >::value), ""); #endif + + return 0; } diff --git a/libcxx/test/std/utilities/memory/allocator.traits/value_type.pass.cpp b/libcxx/test/std/utilities/memory/allocator.traits/value_type.pass.cpp index dec3a41e374a3..047d40d5c89a1 100644 --- a/libcxx/test/std/utilities/memory/allocator.traits/value_type.pass.cpp +++ b/libcxx/test/std/utilities/memory/allocator.traits/value_type.pass.cpp @@ -24,7 +24,9 @@ struct A typedef T value_type; }; -int main() +int main(int, char**) { static_assert((std::is_same >::value_type, char>::value), ""); + + return 0; } diff --git a/libcxx/test/std/utilities/memory/allocator.uses/allocator.uses.construction/tested_elsewhere.pass.cpp b/libcxx/test/std/utilities/memory/allocator.uses/allocator.uses.construction/tested_elsewhere.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/utilities/memory/allocator.uses/allocator.uses.construction/tested_elsewhere.pass.cpp +++ b/libcxx/test/std/utilities/memory/allocator.uses/allocator.uses.construction/tested_elsewhere.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/utilities/memory/allocator.uses/allocator.uses.trait/uses_allocator.pass.cpp b/libcxx/test/std/utilities/memory/allocator.uses/allocator.uses.trait/uses_allocator.pass.cpp index 5b7f710eab05d..d9d4fc3d837c8 100644 --- a/libcxx/test/std/utilities/memory/allocator.uses/allocator.uses.trait/uses_allocator.pass.cpp +++ b/libcxx/test/std/utilities/memory/allocator.uses/allocator.uses.trait/uses_allocator.pass.cpp @@ -47,7 +47,7 @@ test() #endif } -int main() +int main(int, char**) { test >(); test, std::allocator >(); @@ -71,4 +71,6 @@ int main() // #if TEST_STD_VER >= 11 // static_assert((!std::uses_allocator::value), ""); // #endif + + return 0; } diff --git a/libcxx/test/std/utilities/memory/allocator.uses/nothing_to_do.pass.cpp b/libcxx/test/std/utilities/memory/allocator.uses/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/utilities/memory/allocator.uses/nothing_to_do.pass.cpp +++ b/libcxx/test/std/utilities/memory/allocator.uses/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/utilities/memory/c.malloc/nothing_to_do.pass.cpp b/libcxx/test/std/utilities/memory/c.malloc/nothing_to_do.pass.cpp index a8d90b1ce6f49..7e6c6780070ac 100644 --- a/libcxx/test/std/utilities/memory/c.malloc/nothing_to_do.pass.cpp +++ b/libcxx/test/std/utilities/memory/c.malloc/nothing_to_do.pass.cpp @@ -8,6 +8,8 @@ // and are already tested elsewhere -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/utilities/memory/default.allocator/allocator.ctor.pass.cpp b/libcxx/test/std/utilities/memory/default.allocator/allocator.ctor.pass.cpp index 7aa2dbfeb0373..57946be085a17 100644 --- a/libcxx/test/std/utilities/memory/default.allocator/allocator.ctor.pass.cpp +++ b/libcxx/test/std/utilities/memory/default.allocator/allocator.ctor.pass.cpp @@ -25,7 +25,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { { typedef std::allocator AC; @@ -46,4 +46,6 @@ int main() (void) a3; } + + return 0; } diff --git a/libcxx/test/std/utilities/memory/default.allocator/allocator.globals/eq.pass.cpp b/libcxx/test/std/utilities/memory/default.allocator/allocator.globals/eq.pass.cpp index b38daf8e91263..63412bce1f4b5 100644 --- a/libcxx/test/std/utilities/memory/default.allocator/allocator.globals/eq.pass.cpp +++ b/libcxx/test/std/utilities/memory/default.allocator/allocator.globals/eq.pass.cpp @@ -21,10 +21,12 @@ #include #include -int main() +int main(int, char**) { std::allocator a1; std::allocator a2; assert(a1 == a2); assert(!(a1 != a2)); + + return 0; } diff --git a/libcxx/test/std/utilities/memory/default.allocator/allocator.members/address.pass.cpp b/libcxx/test/std/utilities/memory/default.allocator/allocator.members/address.pass.cpp index bb1bb4f11ee37..c4ff55d0eab29 100644 --- a/libcxx/test/std/utilities/memory/default.allocator/allocator.members/address.pass.cpp +++ b/libcxx/test/std/utilities/memory/default.allocator/allocator.members/address.pass.cpp @@ -31,8 +31,10 @@ struct A void operator&() const {} }; -int main() +int main(int, char**) { test_address(); test_address(); + + return 0; } diff --git a/libcxx/test/std/utilities/memory/default.allocator/allocator.members/allocate.fail.cpp b/libcxx/test/std/utilities/memory/default.allocator/allocator.members/allocate.fail.cpp index df4124f51ed22..889804f3b71a1 100644 --- a/libcxx/test/std/utilities/memory/default.allocator/allocator.members/allocate.fail.cpp +++ b/libcxx/test/std/utilities/memory/default.allocator/allocator.members/allocate.fail.cpp @@ -19,9 +19,11 @@ #include "test_macros.h" -int main() +int main(int, char**) { std::allocator a; a.allocate(3); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} a.allocate(3, nullptr); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} + + return 0; } diff --git a/libcxx/test/std/utilities/memory/default.allocator/allocator.members/allocate.pass.cpp b/libcxx/test/std/utilities/memory/default.allocator/allocator.members/allocate.pass.cpp index 14e5a8a3c79dc..8392cbdb7099f 100644 --- a/libcxx/test/std/utilities/memory/default.allocator/allocator.members/allocate.pass.cpp +++ b/libcxx/test/std/utilities/memory/default.allocator/allocator.members/allocate.pass.cpp @@ -99,7 +99,7 @@ void test_aligned() { } } -int main() { +int main(int, char**) { test_aligned<1>(); test_aligned<2>(); test_aligned<4>(); @@ -108,4 +108,6 @@ int main() { test_aligned(); test_aligned(); test_aligned(); + + return 0; } diff --git a/libcxx/test/std/utilities/memory/default.allocator/allocator.members/allocate.size.pass.cpp b/libcxx/test/std/utilities/memory/default.allocator/allocator.members/allocate.size.pass.cpp index 09a9bd912d0ed..459b96ea244c5 100644 --- a/libcxx/test/std/utilities/memory/default.allocator/allocator.members/allocate.size.pass.cpp +++ b/libcxx/test/std/utilities/memory/default.allocator/allocator.members/allocate.size.pass.cpp @@ -12,6 +12,11 @@ // allocator: // pointer allocate(size_type n, allocator::const_pointer hint=0); +// When back-deploying to macosx10.7, the RTTI for exception classes +// incorrectly provided by libc++.dylib is mixed with the one in +// libc++abi.dylib and exceptions are not caught properly. +// XFAIL: with_system_cxx_lib=macosx10.7 + #include #include @@ -39,8 +44,10 @@ void test() test_max ((size_t) -1); // way too large } -int main() +int main(int, char**) { test(); LIBCPP_ONLY(test()); + + return 0; } diff --git a/libcxx/test/std/utilities/memory/default.allocator/allocator.members/construct.pass.cpp b/libcxx/test/std/utilities/memory/default.allocator/allocator.members/construct.pass.cpp index 322881b1536af..96954e04b0873 100644 --- a/libcxx/test/std/utilities/memory/default.allocator/allocator.members/construct.pass.cpp +++ b/libcxx/test/std/utilities/memory/default.allocator/allocator.members/construct.pass.cpp @@ -53,7 +53,7 @@ class move_only }; #endif // TEST_STD_VER >= 11 -int main() +int main(int, char**) { { std::allocator a; @@ -139,4 +139,6 @@ int main() assert(move_only_constructed == 0); } #endif + + return 0; } diff --git a/libcxx/test/std/utilities/memory/default.allocator/allocator.members/max_size.pass.cpp b/libcxx/test/std/utilities/memory/default.allocator/allocator.members/max_size.pass.cpp index 50076ce02f42c..c2094bc044a5e 100644 --- a/libcxx/test/std/utilities/memory/default.allocator/allocator.members/max_size.pass.cpp +++ b/libcxx/test/std/utilities/memory/default.allocator/allocator.members/max_size.pass.cpp @@ -18,9 +18,11 @@ int new_called = 0; -int main() +int main(int, char**) { const std::allocator a; std::size_t M = a.max_size(); assert(M > 0xFFFF && M <= (std::numeric_limits::max() / sizeof(int))); + + return 0; } diff --git a/libcxx/test/std/utilities/memory/default.allocator/allocator_pointers.pass.cpp b/libcxx/test/std/utilities/memory/default.allocator/allocator_pointers.pass.cpp index 375b96f831b2b..ad4319410a792 100644 --- a/libcxx/test/std/utilities/memory/default.allocator/allocator_pointers.pass.cpp +++ b/libcxx/test/std/utilities/memory/default.allocator/allocator_pointers.pass.cpp @@ -6,12 +6,11 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + #include #include -#include "test_macros.h" - -#if TEST_STD_VER >= 11 // #include // // template @@ -108,7 +107,7 @@ void test_void_pointer() struct Foo { int x; }; -int main() +int main(int, char**) { test_pointer> (); test_pointer> (); @@ -117,7 +116,6 @@ int main() test_void_pointer> (); test_void_pointer> (); test_void_pointer> (); + + return 0; } -#else -int main() {} -#endif diff --git a/libcxx/test/std/utilities/memory/default.allocator/allocator_types.pass.cpp b/libcxx/test/std/utilities/memory/default.allocator/allocator_types.pass.cpp index 9cd5815645ddc..0bff67efbd9cd 100644 --- a/libcxx/test/std/utilities/memory/default.allocator/allocator_types.pass.cpp +++ b/libcxx/test/std/utilities/memory/default.allocator/allocator_types.pass.cpp @@ -33,7 +33,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { static_assert((std::is_same::size_type, std::size_t>::value), ""); static_assert((std::is_same::difference_type, std::ptrdiff_t>::value), ""); @@ -53,4 +53,6 @@ int main() a2 = a; std::allocator a3 = a2; ((void)a3); + + return 0; } diff --git a/libcxx/test/std/utilities/memory/default.allocator/allocator_void.pass.cpp b/libcxx/test/std/utilities/memory/default.allocator/allocator_void.pass.cpp index 1f13c8be6ca92..528902d2112d9 100644 --- a/libcxx/test/std/utilities/memory/default.allocator/allocator_void.pass.cpp +++ b/libcxx/test/std/utilities/memory/default.allocator/allocator_void.pass.cpp @@ -22,7 +22,7 @@ #include #include -int main() +int main(int, char**) { static_assert((std::is_same::pointer, void*>::value), ""); static_assert((std::is_same::const_pointer, const void*>::value), ""); @@ -32,4 +32,6 @@ int main() std::allocator a; std::allocator a2 = a; a2 = a; + + return 0; } diff --git a/libcxx/test/std/utilities/memory/pointer.conversion/to_address.pass.cpp b/libcxx/test/std/utilities/memory/pointer.conversion/to_address.pass.cpp index 0fd45fd913c8a..7d55974dd9337 100644 --- a/libcxx/test/std/utilities/memory/pointer.conversion/to_address.pass.cpp +++ b/libcxx/test/std/utilities/memory/pointer.conversion/to_address.pass.cpp @@ -99,7 +99,7 @@ struct pointer_traits<::P4> int n = 0; static_assert(std::to_address(&n) == &n); -int main() +int main(int, char**) { int i = 0; ASSERT_NOEXCEPT(std::to_address(&i)); @@ -116,4 +116,6 @@ int main() P4 p4(&i); ASSERT_NOEXCEPT(std::to_address(p4)); assert(std::to_address(p4) == &i); + + return 0; } diff --git a/libcxx/test/std/utilities/memory/pointer.traits/difference_type.pass.cpp b/libcxx/test/std/utilities/memory/pointer.traits/difference_type.pass.cpp index 867bd46cd2989..3eaedab16700b 100644 --- a/libcxx/test/std/utilities/memory/pointer.traits/difference_type.pass.cpp +++ b/libcxx/test/std/utilities/memory/pointer.traits/difference_type.pass.cpp @@ -18,7 +18,9 @@ #include #include -int main() +int main(int, char**) { static_assert((std::is_same::difference_type, std::ptrdiff_t>::value), ""); + + return 0; } diff --git a/libcxx/test/std/utilities/memory/pointer.traits/element_type.pass.cpp b/libcxx/test/std/utilities/memory/pointer.traits/element_type.pass.cpp index 42db90ff6efaa..505881ddeeaf0 100644 --- a/libcxx/test/std/utilities/memory/pointer.traits/element_type.pass.cpp +++ b/libcxx/test/std/utilities/memory/pointer.traits/element_type.pass.cpp @@ -18,7 +18,9 @@ #include #include -int main() +int main(int, char**) { static_assert((std::is_same::element_type, const short>::value), ""); + + return 0; } diff --git a/libcxx/test/std/utilities/memory/pointer.traits/pointer.pass.cpp b/libcxx/test/std/utilities/memory/pointer.traits/pointer.pass.cpp index 4a74b5d589490..110a993dc6605 100644 --- a/libcxx/test/std/utilities/memory/pointer.traits/pointer.pass.cpp +++ b/libcxx/test/std/utilities/memory/pointer.traits/pointer.pass.cpp @@ -24,8 +24,10 @@ struct A typedef char difference_type; }; -int main() +int main(int, char**) { static_assert((std::is_same::pointer, A>::value), ""); static_assert((std::is_same::pointer, int*>::value), ""); + + return 0; } diff --git a/libcxx/test/std/utilities/memory/pointer.traits/pointer.traits.functions/pointer_to.pass.cpp b/libcxx/test/std/utilities/memory/pointer.traits/pointer.traits.functions/pointer_to.pass.cpp index 0b412dac4635b..9e6a48930e28d 100644 --- a/libcxx/test/std/utilities/memory/pointer.traits/pointer.traits.functions/pointer_to.pass.cpp +++ b/libcxx/test/std/utilities/memory/pointer.traits/pointer.traits.functions/pointer_to.pass.cpp @@ -34,7 +34,7 @@ struct A {return A(&et);} }; -int main() +int main(int, char**) { { int i = 0; @@ -45,4 +45,6 @@ int main() { (std::pointer_traits >::element_type)0; } + + return 0; } diff --git a/libcxx/test/std/utilities/memory/pointer.traits/pointer.traits.types/difference_type.pass.cpp b/libcxx/test/std/utilities/memory/pointer.traits/pointer.traits.types/difference_type.pass.cpp index 7e08235399ed2..d4d763c69eaec 100644 --- a/libcxx/test/std/utilities/memory/pointer.traits/pointer.traits.types/difference_type.pass.cpp +++ b/libcxx/test/std/utilities/memory/pointer.traits/pointer.traits.types/difference_type.pass.cpp @@ -52,7 +52,7 @@ struct F { typedef int difference_type; }; -int main() +int main(int, char**) { static_assert((std::is_same::difference_type, char>::value), ""); static_assert((std::is_same::difference_type, std::ptrdiff_t>::value), ""); @@ -62,4 +62,6 @@ int main() #if TEST_STD_VER >= 11 static_assert((std::is_same>::difference_type, std::ptrdiff_t>::value), ""); #endif + + return 0; } diff --git a/libcxx/test/std/utilities/memory/pointer.traits/pointer.traits.types/element_type.pass.cpp b/libcxx/test/std/utilities/memory/pointer.traits/pointer.traits.types/element_type.pass.cpp index 8184d2d002774..c0efdeab0b31b 100644 --- a/libcxx/test/std/utilities/memory/pointer.traits/pointer.traits.types/element_type.pass.cpp +++ b/libcxx/test/std/utilities/memory/pointer.traits/pointer.traits.types/element_type.pass.cpp @@ -53,7 +53,7 @@ struct F { typedef int element_type; }; -int main() +int main(int, char**) { static_assert((std::is_same::element_type, char>::value), ""); static_assert((std::is_same >::element_type, char>::value), ""); @@ -64,4 +64,6 @@ int main() static_assert((std::is_same>::element_type, double>::value), ""); #endif + + return 0; } diff --git a/libcxx/test/std/utilities/memory/pointer.traits/pointer.traits.types/rebind.pass.cpp b/libcxx/test/std/utilities/memory/pointer.traits/pointer.traits.types/rebind.pass.cpp index 407f4bcfb9f98..a79f339166462 100644 --- a/libcxx/test/std/utilities/memory/pointer.traits/pointer.traits.types/rebind.pass.cpp +++ b/libcxx/test/std/utilities/memory/pointer.traits/pointer.traits.types/rebind.pass.cpp @@ -81,7 +81,7 @@ struct G #endif -int main() +int main(int, char**) { #if TEST_STD_VER >= 11 static_assert((std::is_same >::rebind, A >::value), ""); @@ -101,4 +101,6 @@ int main() static_assert((std::is_same >::rebind::other, D1 >::value), ""); static_assert((std::is_same >::rebind::other, E >::value), ""); #endif + + return 0; } diff --git a/libcxx/test/std/utilities/memory/pointer.traits/pointer_to.pass.cpp b/libcxx/test/std/utilities/memory/pointer.traits/pointer_to.pass.cpp index 968d3ee1e72d9..e9b858c7fd943 100644 --- a/libcxx/test/std/utilities/memory/pointer.traits/pointer_to.pass.cpp +++ b/libcxx/test/std/utilities/memory/pointer.traits/pointer_to.pass.cpp @@ -35,9 +35,11 @@ bool check() { return true; } -int main() { +int main(int, char**) { check(); #if TEST_STD_VER > 17 static_assert(check(), ""); #endif + + return 0; } diff --git a/libcxx/test/std/utilities/memory/pointer.traits/rebind.pass.cpp b/libcxx/test/std/utilities/memory/pointer.traits/rebind.pass.cpp index 823d4f11f23be..f64213c9b887c 100644 --- a/libcxx/test/std/utilities/memory/pointer.traits/rebind.pass.cpp +++ b/libcxx/test/std/utilities/memory/pointer.traits/rebind.pass.cpp @@ -20,11 +20,13 @@ #include "test_macros.h" -int main() +int main(int, char**) { #if TEST_STD_VER >= 11 static_assert((std::is_same::rebind, double*>::value), ""); #else static_assert((std::is_same::rebind::other, double*>::value), ""); #endif + + return 0; } diff --git a/libcxx/test/std/utilities/memory/ptr.align/align.pass.cpp b/libcxx/test/std/utilities/memory/ptr.align/align.pass.cpp index c7a181eb79e01..3d0216cce5333 100644 --- a/libcxx/test/std/utilities/memory/ptr.align/align.pass.cpp +++ b/libcxx/test/std/utilities/memory/ptr.align/align.pass.cpp @@ -13,7 +13,7 @@ #include #include -int main() +int main(int, char**) { const unsigned N = 20; char buf[N]; @@ -80,4 +80,6 @@ int main() assert(p == &buf[0]); assert(r == nullptr); assert(s == N); + + return 0; } diff --git a/libcxx/test/std/utilities/memory/specialized.algorithms/nothing_to_do.pass.cpp b/libcxx/test/std/utilities/memory/specialized.algorithms/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/utilities/memory/specialized.algorithms/nothing_to_do.pass.cpp +++ b/libcxx/test/std/utilities/memory/specialized.algorithms/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/utilities/memory/specialized.algorithms/specialized.addressof/addressof.pass.cpp b/libcxx/test/std/utilities/memory/specialized.algorithms/specialized.addressof/addressof.pass.cpp index 956e6b1187c89..f6310c7bc9116 100644 --- a/libcxx/test/std/utilities/memory/specialized.algorithms/specialized.addressof/addressof.pass.cpp +++ b/libcxx/test/std/utilities/memory/specialized.algorithms/specialized.addressof/addressof.pass.cpp @@ -26,7 +26,7 @@ struct nothing { } }; -int main() +int main(int, char**) { { int i; @@ -47,4 +47,6 @@ int main() }; assert(std::addressof(n) == (void*)std::addressof(i)); } + + return 0; } diff --git a/libcxx/test/std/utilities/memory/specialized.algorithms/specialized.addressof/addressof.temp.fail.cpp b/libcxx/test/std/utilities/memory/specialized.algorithms/specialized.addressof/addressof.temp.fail.cpp index c12bf41e8ea71..f7033014d3712 100644 --- a/libcxx/test/std/utilities/memory/specialized.algorithms/specialized.addressof/addressof.temp.fail.cpp +++ b/libcxx/test/std/utilities/memory/specialized.algorithms/specialized.addressof/addressof.temp.fail.cpp @@ -15,11 +15,13 @@ #include "test_macros.h" -int main() +int main(int, char**) { #if TEST_STD_VER > 14 const int *p = std::addressof(0); #else #error #endif + + return 0; } diff --git a/libcxx/test/std/utilities/memory/specialized.algorithms/specialized.addressof/constexpr_addressof.pass.cpp b/libcxx/test/std/utilities/memory/specialized.algorithms/specialized.addressof/constexpr_addressof.pass.cpp index c042dd5c37b84..f14a0e7fc898c 100644 --- a/libcxx/test/std/utilities/memory/specialized.algorithms/specialized.addressof/constexpr_addressof.pass.cpp +++ b/libcxx/test/std/utilities/memory/specialized.algorithms/specialized.addressof/constexpr_addressof.pass.cpp @@ -32,10 +32,12 @@ constexpr int i = 0; constexpr double d = 0.0; constexpr A a{}; -int main() +int main(int, char**) { static_assert(std::addressof(i) == &i, ""); static_assert(std::addressof(d) == &d, ""); constexpr const A* ap = std::addressof(a); static_assert(&ap->n == &a.n, ""); + + return 0; } diff --git a/libcxx/test/std/utilities/memory/specialized.algorithms/specialized.destroy/destroy.pass.cpp b/libcxx/test/std/utilities/memory/specialized.algorithms/specialized.destroy/destroy.pass.cpp index f812bb85a625d..4dbc20aba39c7 100644 --- a/libcxx/test/std/utilities/memory/specialized.algorithms/specialized.destroy/destroy.pass.cpp +++ b/libcxx/test/std/utilities/memory/specialized.algorithms/specialized.destroy/destroy.pass.cpp @@ -30,7 +30,7 @@ struct Counted { }; int Counted::count = 0; -int main() +int main(int, char**) { using It = forward_iterator; const int N = 5; @@ -43,4 +43,6 @@ int main() assert(Counted::count == 4); std::destroy(It(p), It(p + 4)); assert(Counted::count == 0); + + return 0; } diff --git a/libcxx/test/std/utilities/memory/specialized.algorithms/specialized.destroy/destroy_at.pass.cpp b/libcxx/test/std/utilities/memory/specialized.algorithms/specialized.destroy/destroy_at.pass.cpp index 28450faa10fb9..d505222b02d7d 100644 --- a/libcxx/test/std/utilities/memory/specialized.algorithms/specialized.destroy/destroy_at.pass.cpp +++ b/libcxx/test/std/utilities/memory/specialized.algorithms/specialized.destroy/destroy_at.pass.cpp @@ -41,7 +41,7 @@ struct DCounted : VCounted { friend void operator&(DCounted) = delete; }; -int main() +int main(int, char**) { { void* mem1 = std::malloc(sizeof(Counted)); @@ -74,4 +74,6 @@ int main() std::free(mem1); std::free(mem2); } + + return 0; } diff --git a/libcxx/test/std/utilities/memory/specialized.algorithms/specialized.destroy/destroy_n.pass.cpp b/libcxx/test/std/utilities/memory/specialized.algorithms/specialized.destroy/destroy_n.pass.cpp index 90836b2335518..0dcc8e5a65798 100644 --- a/libcxx/test/std/utilities/memory/specialized.algorithms/specialized.destroy/destroy_n.pass.cpp +++ b/libcxx/test/std/utilities/memory/specialized.algorithms/specialized.destroy/destroy_n.pass.cpp @@ -30,7 +30,7 @@ struct Counted { }; int Counted::count = 0; -int main() +int main(int, char**) { using It = forward_iterator; const int N = 5; @@ -45,4 +45,6 @@ int main() It it = std::destroy_n(It(p), 4); assert(it == It(p+4)); assert(Counted::count == 0); + + return 0; } diff --git a/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.construct.default/uninitialized_default_construct.pass.cpp b/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.construct.default/uninitialized_default_construct.pass.cpp index bd9ef7b403fa7..67dd6fbd2984a 100644 --- a/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.construct.default/uninitialized_default_construct.pass.cpp +++ b/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.construct.default/uninitialized_default_construct.pass.cpp @@ -103,9 +103,11 @@ void test_value_initialized() assert(pool[4] == -1); } -int main() +int main(int, char**) { test_counted(); test_value_initialized(); test_ctor_throws(); + + return 0; } diff --git a/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.construct.default/uninitialized_default_construct_n.pass.cpp b/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.construct.default/uninitialized_default_construct_n.pass.cpp index d2f6e094a85f2..1052355a4f22e 100644 --- a/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.construct.default/uninitialized_default_construct_n.pass.cpp +++ b/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.construct.default/uninitialized_default_construct_n.pass.cpp @@ -107,9 +107,11 @@ void test_value_initialized() } -int main() +int main(int, char**) { test_counted(); test_value_initialized(); test_ctor_throws(); + + return 0; } diff --git a/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.construct.value/uninitialized_value_construct.pass.cpp b/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.construct.value/uninitialized_value_construct.pass.cpp index 50ce122484814..5dfcd83fe9bbb 100644 --- a/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.construct.value/uninitialized_value_construct.pass.cpp +++ b/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.construct.value/uninitialized_value_construct.pass.cpp @@ -102,9 +102,11 @@ void test_value_initialized() assert(pool[4] == 0); } -int main() +int main(int, char**) { test_counted(); test_value_initialized(); test_ctor_throws(); + + return 0; } diff --git a/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.construct.value/uninitialized_value_construct_n.pass.cpp b/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.construct.value/uninitialized_value_construct_n.pass.cpp index 4d89f9cac4c6b..e43102ba4aac4 100644 --- a/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.construct.value/uninitialized_value_construct_n.pass.cpp +++ b/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.construct.value/uninitialized_value_construct_n.pass.cpp @@ -107,8 +107,10 @@ void test_value_initialized() assert(pool[4] == 0); } -int main() +int main(int, char**) { test_counted(); test_value_initialized(); + + return 0; } diff --git a/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.copy/uninitialized_copy.pass.cpp b/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.copy/uninitialized_copy.pass.cpp index b81d561e08969..2618bd5339c9e 100644 --- a/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.copy/uninitialized_copy.pass.cpp +++ b/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.copy/uninitialized_copy.pass.cpp @@ -47,7 +47,7 @@ struct Nasty int Nasty::counter_ = 0; -int main() +int main(int, char**) { { const int N = 5; @@ -85,4 +85,6 @@ int main() } } + + return 0; } diff --git a/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.copy/uninitialized_copy_n.pass.cpp b/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.copy/uninitialized_copy_n.pass.cpp index c3f46bebe6705..1a237a7929dbc 100644 --- a/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.copy/uninitialized_copy_n.pass.cpp +++ b/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.copy/uninitialized_copy_n.pass.cpp @@ -47,7 +47,7 @@ struct Nasty int Nasty::counter_ = 0; -int main() +int main(int, char**) { { const int N = 5; @@ -84,4 +84,6 @@ int main() assert( p[i].i_ == i); } } + + return 0; } diff --git a/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.fill.n/uninitialized_fill_n.pass.cpp b/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.fill.n/uninitialized_fill_n.pass.cpp index 5c177663e4009..4dfde4f6e877c 100644 --- a/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.fill.n/uninitialized_fill_n.pass.cpp +++ b/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.fill.n/uninitialized_fill_n.pass.cpp @@ -46,7 +46,7 @@ struct Nasty int Nasty::counter_ = 0; -int main() +int main(int, char**) { { const int N = 5; @@ -84,4 +84,6 @@ int main() } } + + return 0; } diff --git a/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.fill/uninitialized_fill.pass.cpp b/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.fill/uninitialized_fill.pass.cpp index f7790fc4519f4..1996ec6c6fffa 100644 --- a/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.fill/uninitialized_fill.pass.cpp +++ b/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.fill/uninitialized_fill.pass.cpp @@ -47,7 +47,7 @@ struct Nasty int Nasty::counter_ = 0; -int main() +int main(int, char**) { { const int N = 5; @@ -81,4 +81,6 @@ int main() for (int i = 0; i < N; ++i) assert(bp[i].i_ == 23); } + + return 0; } diff --git a/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.move/uninitialized_move.pass.cpp b/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.move/uninitialized_move.pass.cpp index a0717e61b2ca0..e17f5734bb26d 100644 --- a/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.move/uninitialized_move.pass.cpp +++ b/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.move/uninitialized_move.pass.cpp @@ -107,7 +107,9 @@ void test_counted() assert(Counted::count == 0); } -int main() { +int main(int, char**) { test_counted(); test_ctor_throws(); + + return 0; } diff --git a/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.move/uninitialized_move_n.pass.cpp b/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.move/uninitialized_move_n.pass.cpp index 755384074215a..ee364aaf5b9b6 100644 --- a/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.move/uninitialized_move_n.pass.cpp +++ b/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.move/uninitialized_move_n.pass.cpp @@ -109,8 +109,10 @@ void test_counted() assert(Counted::count == 0); } -int main() +int main(int, char**) { test_counted(); test_ctor_throws(); + + return 0; } diff --git a/libcxx/test/std/utilities/memory/storage.iterator/raw_storage_iterator.base.pass.cpp b/libcxx/test/std/utilities/memory/storage.iterator/raw_storage_iterator.base.pass.cpp index 531158ba1585b..5355d09ac26be 100644 --- a/libcxx/test/std/utilities/memory/storage.iterator/raw_storage_iterator.base.pass.cpp +++ b/libcxx/test/std/utilities/memory/storage.iterator/raw_storage_iterator.base.pass.cpp @@ -36,7 +36,7 @@ struct A A* operator& () DELETE_FUNCTION; }; -int main() +int main(int, char**) { #if TEST_STD_VER >= 14 typedef std::aligned_storage<3*sizeof(A), std::alignment_of::value>::type @@ -54,4 +54,6 @@ int main() assert(it.base() == ap + 1); // next place to write } #endif + + return 0; } diff --git a/libcxx/test/std/utilities/memory/storage.iterator/raw_storage_iterator.pass.cpp b/libcxx/test/std/utilities/memory/storage.iterator/raw_storage_iterator.pass.cpp index 90bb956fc03d8..2b9b33fd9b998 100644 --- a/libcxx/test/std/utilities/memory/storage.iterator/raw_storage_iterator.pass.cpp +++ b/libcxx/test/std/utilities/memory/storage.iterator/raw_storage_iterator.pass.cpp @@ -36,7 +36,7 @@ struct A A* operator& () DELETE_FUNCTION; }; -int main() +int main(int, char**) { { typedef A S; @@ -67,4 +67,6 @@ int main() assert(ap->get() == 1); // original value } #endif + + return 0; } diff --git a/libcxx/test/std/utilities/memory/temporary.buffer/overaligned.pass.cpp b/libcxx/test/std/utilities/memory/temporary.buffer/overaligned.pass.cpp index fd818577b0627..db71c69bf26cd 100644 --- a/libcxx/test/std/utilities/memory/temporary.buffer/overaligned.pass.cpp +++ b/libcxx/test/std/utilities/memory/temporary.buffer/overaligned.pass.cpp @@ -25,10 +25,12 @@ struct alignas(32) A { int field; }; -int main() +int main(int, char**) { std::pair ip = std::get_temporary_buffer(5); assert(!(ip.first == nullptr) ^ (ip.second == 0)); assert(reinterpret_cast(ip.first) % alignof(A) == 0); std::return_temporary_buffer(ip.first); + + return 0; } diff --git a/libcxx/test/std/utilities/memory/temporary.buffer/temporary_buffer.pass.cpp b/libcxx/test/std/utilities/memory/temporary.buffer/temporary_buffer.pass.cpp index 22efde4af8fff..32a58e5a657be 100644 --- a/libcxx/test/std/utilities/memory/temporary.buffer/temporary_buffer.pass.cpp +++ b/libcxx/test/std/utilities/memory/temporary.buffer/temporary_buffer.pass.cpp @@ -19,10 +19,12 @@ #include #include -int main() +int main(int, char**) { std::pair ip = std::get_temporary_buffer(5); assert(ip.first); assert(ip.second == 5); std::return_temporary_buffer(ip.first); + + return 0; } diff --git a/libcxx/test/std/utilities/memory/unique.ptr/unique.ptr.special/io.fail.cpp b/libcxx/test/std/utilities/memory/unique.ptr/unique.ptr.special/io.fail.cpp index c9d1c8b46975e..bc6846fe7f5df 100644 --- a/libcxx/test/std/utilities/memory/unique.ptr/unique.ptr.special/io.fail.cpp +++ b/libcxx/test/std/utilities/memory/unique.ptr/unique.ptr.special/io.fail.cpp @@ -26,9 +26,11 @@ #include "min_allocator.h" #include "deleter_types.h" -int main() +int main(int, char**) { std::unique_ptr> p; std::ostringstream os; os << p; // expected-error {{invalid operands to binary expression}} + + return 0; } diff --git a/libcxx/test/std/utilities/memory/unique.ptr/unique.ptr.special/io.pass.cpp b/libcxx/test/std/utilities/memory/unique.ptr/unique.ptr.special/io.pass.cpp index e350a0385d657..b9b158a9d2b74 100644 --- a/libcxx/test/std/utilities/memory/unique.ptr/unique.ptr.special/io.pass.cpp +++ b/libcxx/test/std/utilities/memory/unique.ptr/unique.ptr.special/io.pass.cpp @@ -21,11 +21,13 @@ #include #include -int main() +int main(int, char**) { std::unique_ptr p(new int(3)); std::ostringstream os; assert(os.str().empty()); os << p; assert(!os.str().empty()); + + return 0; } diff --git a/libcxx/test/std/utilities/memory/util.dynamic.safety/declare_no_pointers.pass.cpp b/libcxx/test/std/utilities/memory/util.dynamic.safety/declare_no_pointers.pass.cpp index 5c99a9721a0f9..a2b6cf22ed8fe 100644 --- a/libcxx/test/std/utilities/memory/util.dynamic.safety/declare_no_pointers.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.dynamic.safety/declare_no_pointers.pass.cpp @@ -13,10 +13,12 @@ #include -int main() +int main(int, char**) { char* p = new char[10]; std::declare_no_pointers(p, 10); std::undeclare_no_pointers(p, 10); delete [] p; + + return 0; } diff --git a/libcxx/test/std/utilities/memory/util.dynamic.safety/declare_reachable.pass.cpp b/libcxx/test/std/utilities/memory/util.dynamic.safety/declare_reachable.pass.cpp index 4a71817d4037e..c923089fa978d 100644 --- a/libcxx/test/std/utilities/memory/util.dynamic.safety/declare_reachable.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.dynamic.safety/declare_reachable.pass.cpp @@ -14,10 +14,12 @@ #include #include -int main() +int main(int, char**) { int* p = new int; std::declare_reachable(p); assert(std::undeclare_reachable(p) == p); delete p; + + return 0; } diff --git a/libcxx/test/std/utilities/memory/util.dynamic.safety/get_pointer_safety.pass.cpp b/libcxx/test/std/utilities/memory/util.dynamic.safety/get_pointer_safety.pass.cpp index 4fc2e010f793e..2fea98364b479 100644 --- a/libcxx/test/std/utilities/memory/util.dynamic.safety/get_pointer_safety.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.dynamic.safety/get_pointer_safety.pass.cpp @@ -22,7 +22,7 @@ void test_pr26961() { assert(d == std::get_pointer_safety()); } -int main() +int main(int, char**) { { std::pointer_safety r = std::get_pointer_safety(); @@ -33,4 +33,6 @@ int main() { test_pr26961(); } + + return 0; } diff --git a/libcxx/test/std/utilities/memory/util.smartptr/nothing_to_do.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/nothing_to_do.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.enab/enable_shared_from_this.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.enab/enable_shared_from_this.pass.cpp index 0f7c44fd8fdde..fe7567eebc14d 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.enab/enable_shared_from_this.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.enab/enable_shared_from_this.pass.cpp @@ -52,7 +52,7 @@ struct PrivateBase : private std::enable_shared_from_this { }; -int main() +int main(int, char**) { { // https://bugs.llvm.org/show_bug.cgi?id=18843 std::shared_ptr t1(new T); @@ -167,4 +167,6 @@ int main() assert(my_weak.lock().get() == ptr); } #endif + + return 0; } diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.hash/enabled_hash.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.hash/enabled_hash.pass.cpp index bd7f644c3ec46..440fa8ac480d9 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.hash/enabled_hash.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.hash/enabled_hash.pass.cpp @@ -17,6 +17,8 @@ #include "poisoned_hash_helper.hpp" -int main() { +int main(int, char**) { test_library_hash_specializations_available(); + + return 0; } diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.hash/hash_shared_ptr.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.hash/hash_shared_ptr.pass.cpp index 8db542c079467..34717ad4256ac 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.hash/hash_shared_ptr.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.hash/hash_shared_ptr.pass.cpp @@ -25,7 +25,7 @@ struct A {}; #endif -int main() +int main(int, char**) { { int* ptr = new int; @@ -40,4 +40,6 @@ int main() test_hash_enabled_for_type>(); } #endif + + return 0; } diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.hash/hash_unique_ptr.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.hash/hash_unique_ptr.pass.cpp index 4f942f6c2d921..5cae6ca7d458f 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.hash/hash_unique_ptr.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.hash/hash_unique_ptr.pass.cpp @@ -60,7 +60,7 @@ struct A {}; #endif // TEST_STD_VER >= 11 -int main() +int main(int, char**) { { int* ptr = new int; @@ -99,4 +99,6 @@ int main() #endif } #endif + + return 0; } diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_compare_exchange_strong.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_compare_exchange_strong.pass.cpp index 45c82c4bafa17..7737cfd4da099 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_compare_exchange_strong.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_compare_exchange_strong.pass.cpp @@ -29,7 +29,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { { std::shared_ptr p(new int(4)); @@ -51,4 +51,6 @@ int main() assert(*v == 4); assert(*w == 2); } + + return 0; } diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_compare_exchange_strong_explicit.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_compare_exchange_strong_explicit.pass.cpp index d1589aaddba83..9198ca68cd8fa 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_compare_exchange_strong_explicit.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_compare_exchange_strong_explicit.pass.cpp @@ -30,7 +30,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { { std::shared_ptr p(new int(4)); @@ -56,4 +56,6 @@ int main() assert(*v == 4); assert(*w == 2); } + + return 0; } diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_compare_exchange_weak.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_compare_exchange_weak.pass.cpp index fb09a19fd058d..da52811c9c033 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_compare_exchange_weak.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_compare_exchange_weak.pass.cpp @@ -29,7 +29,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { { std::shared_ptr p(new int(4)); @@ -51,4 +51,6 @@ int main() assert(*v == 4); assert(*w == 2); } + + return 0; } diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_compare_exchange_weak_explicit.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_compare_exchange_weak_explicit.pass.cpp index 2a9b6ce124492..703bf008f4f82 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_compare_exchange_weak_explicit.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_compare_exchange_weak_explicit.pass.cpp @@ -30,7 +30,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { { std::shared_ptr p(new int(4)); @@ -56,4 +56,6 @@ int main() assert(*v == 4); assert(*w == 2); } + + return 0; } diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_exchange.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_exchange.pass.cpp index cf6ad5b0037c5..b51a24aefb931 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_exchange.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_exchange.pass.cpp @@ -28,7 +28,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { { std::shared_ptr p(new int(4)); @@ -37,4 +37,6 @@ int main() assert(*p == 3); assert(*r == 4); } + + return 0; } diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_exchange_explicit.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_exchange_explicit.pass.cpp index f177420fe94eb..b59b515a5c2ee 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_exchange_explicit.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_exchange_explicit.pass.cpp @@ -28,7 +28,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { { std::shared_ptr p(new int(4)); @@ -37,4 +37,6 @@ int main() assert(*p == 3); assert(*r == 4); } + + return 0; } diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_is_lock_free.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_is_lock_free.pass.cpp index 3b267f99d0925..e8bb64dccb6f3 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_is_lock_free.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_is_lock_free.pass.cpp @@ -23,10 +23,12 @@ #include "test_macros.h" -int main() +int main(int, char**) { { const std::shared_ptr p(new int(3)); assert(std::atomic_is_lock_free(&p) == false); } + + return 0; } diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_load.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_load.pass.cpp index b36580ef21718..63416faf3299a 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_load.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_load.pass.cpp @@ -28,11 +28,13 @@ #include "test_macros.h" -int main() +int main(int, char**) { { std::shared_ptr p(new int(3)); std::shared_ptr q = std::atomic_load(&p); assert(*q == *p); } + + return 0; } diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_load_explicit.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_load_explicit.pass.cpp index 40f6b49d6c661..0708f874b2696 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_load_explicit.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_load_explicit.pass.cpp @@ -28,11 +28,13 @@ #include "test_macros.h" -int main() +int main(int, char**) { { const std::shared_ptr p(new int(3)); std::shared_ptr q = std::atomic_load_explicit(&p, std::memory_order_relaxed); assert(*q == *p); } + + return 0; } diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_store.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_store.pass.cpp index 3c6de40f11791..42d7099a9df0c 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_store.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_store.pass.cpp @@ -28,7 +28,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { { std::shared_ptr p; @@ -36,4 +36,6 @@ int main() std::atomic_store(&p, r); assert(*p == *r); } + + return 0; } diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_store_explicit.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_store_explicit.pass.cpp index dd4001a82ff59..7da4de3fa47f8 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_store_explicit.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_store_explicit.pass.cpp @@ -28,7 +28,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { { std::shared_ptr p; @@ -36,4 +36,6 @@ int main() std::atomic_store_explicit(&p, r, std::memory_order_seq_cst); assert(*p == *r); } + + return 0; } diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/types.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/types.pass.cpp index 4a96f8181b2d0..c3aedd5b1ad27 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/types.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/types.pass.cpp @@ -22,10 +22,12 @@ struct A; // purposefully incomplete -int main() +int main(int, char**) { static_assert((std::is_same::element_type, A>::value), ""); #if TEST_STD_VER > 14 static_assert((std::is_same::weak_type, std::weak_ptr>::value), ""); #endif + + return 0; } diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.getdeleter/get_deleter.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.getdeleter/get_deleter.pass.cpp index babf1c6ee5ba4..209e3fe71af4d 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.getdeleter/get_deleter.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.getdeleter/get_deleter.pass.cpp @@ -27,7 +27,7 @@ struct A int A::count = 0; -int main() +int main(int, char**) { { { @@ -63,4 +63,6 @@ int main() std::default_delete* d = std::get_deleter >(p); assert(d == 0); } + + return 0; } diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/auto_ptr_Y.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/auto_ptr_Y.pass.cpp index 69ad9513b6c53..a154a121c7fac 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/auto_ptr_Y.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/auto_ptr_Y.pass.cpp @@ -40,7 +40,7 @@ struct A int A::count = 0; -int main() +int main(int, char**) { { std::auto_ptr pA(new A); @@ -110,4 +110,6 @@ int main() } assert(B::count == 0); assert(A::count == 0); + + return 0; } diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/shared_ptr.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/shared_ptr.pass.cpp index 6d2000c1375fc..e362f4d8d4e42 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/shared_ptr.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/shared_ptr.pass.cpp @@ -39,7 +39,7 @@ struct A int A::count = 0; -int main() +int main(int, char**) { { const std::shared_ptr pA(new A); @@ -117,4 +117,6 @@ int main() } assert(B::count == 0); assert(A::count == 0); + + return 0; } diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/shared_ptr_Y.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/shared_ptr_Y.pass.cpp index 23b587d0b7d72..2b666315ef2f8 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/shared_ptr_Y.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/shared_ptr_Y.pass.cpp @@ -39,7 +39,7 @@ struct A int A::count = 0; -int main() +int main(int, char**) { { const std::shared_ptr pA(new A); @@ -117,4 +117,6 @@ int main() } assert(B::count == 0); assert(A::count == 0); + + return 0; } diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/shared_ptr_Y_rv.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/shared_ptr_Y_rv.pass.cpp index a3ba5877f490c..6787c33c297f1 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/shared_ptr_Y_rv.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/shared_ptr_Y_rv.pass.cpp @@ -41,7 +41,7 @@ struct A int A::count = 0; -int main() +int main(int, char**) { { std::shared_ptr pA(new A); @@ -119,4 +119,6 @@ int main() } assert(B::count == 0); assert(A::count == 0); + + return 0; } diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/shared_ptr_rv.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/shared_ptr_rv.pass.cpp index 8c63b14b27d8b..e921a09918985 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/shared_ptr_rv.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/shared_ptr_rv.pass.cpp @@ -41,7 +41,7 @@ struct A int A::count = 0; -int main() +int main(int, char**) { { std::shared_ptr pA(new A); @@ -119,4 +119,6 @@ int main() } assert(B::count == 0); assert(A::count == 0); + + return 0; } diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/unique_ptr_Y.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/unique_ptr_Y.pass.cpp index b7fc447b05710..4abe371bc0747 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/unique_ptr_Y.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/unique_ptr_Y.pass.cpp @@ -39,7 +39,7 @@ struct A int A::count = 0; -int main() +int main(int, char**) { { std::unique_ptr pA(new A); @@ -109,4 +109,6 @@ int main() } assert(B::count == 0); assert(A::count == 0); + + return 0; } diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.cast/const_pointer_cast.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.cast/const_pointer_cast.pass.cpp index 53955aaa21855..51e2949b6c609 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.cast/const_pointer_cast.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.cast/const_pointer_cast.pass.cpp @@ -39,7 +39,7 @@ struct A int A::count = 0; -int main() +int main(int, char**) { { const std::shared_ptr pA(new A); @@ -53,4 +53,6 @@ int main() assert(pB.get() == pA.get()); assert(!pB.owner_before(pA) && !pA.owner_before(pB)); } + + return 0; } diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.cast/dynamic_pointer_cast.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.cast/dynamic_pointer_cast.pass.cpp index c27f9503b62a5..76009b96abde8 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.cast/dynamic_pointer_cast.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.cast/dynamic_pointer_cast.pass.cpp @@ -39,7 +39,7 @@ struct A int A::count = 0; -int main() +int main(int, char**) { { const std::shared_ptr pB(new A); @@ -53,4 +53,6 @@ int main() assert(pA.get() == 0); assert(pA.use_count() == 0); } + + return 0; } diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.cast/static_pointer_cast.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.cast/static_pointer_cast.pass.cpp index ec72834d5cdff..9ea544fee0123 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.cast/static_pointer_cast.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.cast/static_pointer_cast.pass.cpp @@ -39,7 +39,7 @@ struct A int A::count = 0; -int main() +int main(int, char**) { { const std::shared_ptr pA(new A); @@ -65,4 +65,6 @@ int main() assert(pB.get() == pA.get()); assert(!pB.owner_before(pA) && !pA.owner_before(pB)); } + + return 0; } diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.cmp/cmp_nullptr.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.cmp/cmp_nullptr.pass.cpp index 6936744c1abe5..98b5bbf0d67d9 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.cmp/cmp_nullptr.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.cmp/cmp_nullptr.pass.cpp @@ -40,7 +40,7 @@ void do_nothing(int*) {} -int main() +int main(int, char**) { const std::shared_ptr p1(new int(1)); assert(!(p1 == nullptr)); @@ -65,4 +65,6 @@ int main() assert(!(nullptr > p2)); assert( (p2 >= nullptr)); assert( (nullptr >= p2)); + + return 0; } diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.cmp/eq.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.cmp/eq.pass.cpp index 1257ea65fd838..e25ba611744aa 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.cmp/eq.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.cmp/eq.pass.cpp @@ -18,7 +18,7 @@ void do_nothing(int*) {} -int main() +int main(int, char**) { int* ptr1(new int); int* ptr2(new int); @@ -27,4 +27,6 @@ int main() const std::shared_ptr p3(ptr2, do_nothing); assert(p1 != p2); assert(p2 == p3); + + return 0; } diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.cmp/lt.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.cmp/lt.pass.cpp index 15e13688b4df8..fdef32d518ac4 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.cmp/lt.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.cmp/lt.pass.cpp @@ -17,7 +17,7 @@ void do_nothing(int*) {} -int main() +int main(int, char**) { int* ptr1(new int); int* ptr2(new int); @@ -26,4 +26,6 @@ int main() const std::shared_ptr p3(ptr2, do_nothing); assert((p1 < p2) == (ptr1 < ptr2)); assert(!(p2 < p3) && !(p3 < p2)); + + return 0; } diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/auto_ptr.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/auto_ptr.pass.cpp index 6558e230dffd1..282ddd0e0ead3 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/auto_ptr.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/auto_ptr.pass.cpp @@ -43,7 +43,7 @@ struct A int A::count = 0; -int main() +int main(int, char**) { { std::auto_ptr ptr(new A); @@ -94,4 +94,6 @@ int main() assert(A::count == 0); assert(globalMemCounter.checkOutstandingNewEq(0)); #endif // !defined(TEST_HAS_NO_EXCEPTIONS) && !defined(DISABLE_NEW_COUNT) + + return 0; } diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/default.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/default.pass.cpp index c70e537a9afba..247ca0fa924f7 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/default.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/default.pass.cpp @@ -13,9 +13,11 @@ #include #include -int main() +int main(int, char**) { std::shared_ptr p; assert(p.use_count() == 0); assert(p.get() == 0); + + return 0; } diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/nullptr_t.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/nullptr_t.pass.cpp index a46b31aa5a9e9..f29dd1cf7ea81 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/nullptr_t.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/nullptr_t.pass.cpp @@ -13,9 +13,11 @@ #include #include -int main() +int main(int, char**) { std::shared_ptr p(nullptr); assert(p.use_count() == 0); assert(p.get() == 0); + + return 0; } diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/nullptr_t_deleter.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/nullptr_t_deleter.pass.cpp index 9644e4f0f991b..ee5861122bfc0 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/nullptr_t_deleter.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/nullptr_t_deleter.pass.cpp @@ -27,7 +27,7 @@ struct A int A::count = 0; -int main() +int main(int, char**) { { std::shared_ptr p(nullptr, test_deleter(3)); @@ -43,4 +43,6 @@ int main() assert(A::count == 0); assert(test_deleter::count == 0); assert(test_deleter::dealloc_count == 1); + + return 0; } diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/nullptr_t_deleter_allocator.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/nullptr_t_deleter_allocator.pass.cpp index bc1d3584e1e78..0881e8cf42d24 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/nullptr_t_deleter_allocator.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/nullptr_t_deleter_allocator.pass.cpp @@ -27,7 +27,7 @@ struct A int A::count = 0; -int main() +int main(int, char**) { { std::shared_ptr p(nullptr, test_deleter(3), test_allocator(5)); @@ -81,4 +81,6 @@ int main() assert(test_deleter::count == 0); assert(test_deleter::dealloc_count == 1); #endif + + return 0; } diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/nullptr_t_deleter_allocator_throw.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/nullptr_t_deleter_allocator_throw.pass.cpp index 1948c6860ab62..4700df0085c3e 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/nullptr_t_deleter_allocator_throw.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/nullptr_t_deleter_allocator_throw.pass.cpp @@ -27,7 +27,7 @@ struct A int A::count = 0; -int main() +int main(int, char**) { try { @@ -43,4 +43,6 @@ int main() assert(test_allocator::count == 0); assert(test_allocator::alloc_count == 0); } + + return 0; } diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/nullptr_t_deleter_throw.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/nullptr_t_deleter_throw.pass.cpp index 075cadf43d6a7..7d2628d60dcb5 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/nullptr_t_deleter_throw.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/nullptr_t_deleter_throw.pass.cpp @@ -37,7 +37,7 @@ struct A int A::count = 0; -int main() +int main(int, char**) { globalMemCounter.throw_after = 0; try @@ -51,4 +51,6 @@ int main() assert(test_deleter::count == 0); assert(test_deleter::dealloc_count == 1); } + + return 0; } diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/pointer.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/pointer.pass.cpp index 67f0ffd2a809d..b55d764a6c413 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/pointer.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/pointer.pass.cpp @@ -24,7 +24,7 @@ struct A int A::count = 0; -int main() +int main(int, char**) { { A* ptr = new A; @@ -42,4 +42,6 @@ int main() assert(p.get() == ptr); } assert(A::count == 0); + + return 0; } diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/pointer_deleter.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/pointer_deleter.pass.cpp index 120171456be6e..fd98193826e1f 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/pointer_deleter.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/pointer_deleter.pass.cpp @@ -27,7 +27,7 @@ struct A int A::count = 0; -int main() +int main(int, char**) { { A* ptr = new A; @@ -44,4 +44,6 @@ int main() assert(A::count == 0); assert(test_deleter::count == 0); assert(test_deleter::dealloc_count == 1); + + return 0; } diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/pointer_deleter_allocator.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/pointer_deleter_allocator.pass.cpp index 79a0bc84a39d3..0ec18a7aebd52 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/pointer_deleter_allocator.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/pointer_deleter_allocator.pass.cpp @@ -28,7 +28,7 @@ struct A int A::count = 0; -int main() +int main(int, char**) { { A* ptr = new A; @@ -85,4 +85,6 @@ int main() assert(test_deleter::count == 0); assert(test_deleter::dealloc_count == 1); #endif + + return 0; } diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/pointer_deleter_allocator_throw.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/pointer_deleter_allocator_throw.pass.cpp index ad020f89fd38f..5f2984c7e22d2 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/pointer_deleter_allocator_throw.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/pointer_deleter_allocator_throw.pass.cpp @@ -27,7 +27,7 @@ struct A int A::count = 0; -int main() +int main(int, char**) { A* ptr = new A; try @@ -44,4 +44,6 @@ int main() assert(test_allocator::count == 0); assert(test_allocator::alloc_count == 0); } + + return 0; } diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/pointer_deleter_throw.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/pointer_deleter_throw.pass.cpp index 6af99aaf55ec3..da12e42ca0b2c 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/pointer_deleter_throw.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/pointer_deleter_throw.pass.cpp @@ -34,7 +34,7 @@ struct A int A::count = 0; -int main() +int main(int, char**) { A* ptr = new A; globalMemCounter.throw_after = 0; @@ -50,4 +50,6 @@ int main() assert(test_deleter::dealloc_count == 1); } assert(globalMemCounter.checkOutstandingNewEq(0)); + + return 0; } diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/pointer_throw.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/pointer_throw.pass.cpp index 95da6f691061b..15e776003d9dd 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/pointer_throw.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/pointer_throw.pass.cpp @@ -33,7 +33,7 @@ struct A int A::count = 0; -int main() +int main(int, char**) { A* ptr = new A; assert(A::count == 1); @@ -48,4 +48,6 @@ int main() assert(A::count == 0); } assert(globalMemCounter.checkOutstandingNewEq(0)); + + return 0; } diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/shared_ptr.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/shared_ptr.pass.cpp index 44a5be4714bed..091782f02f3aa 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/shared_ptr.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/shared_ptr.pass.cpp @@ -26,7 +26,7 @@ struct A int A::count = 0; -int main() +int main(int, char**) { { std::shared_ptr pA(new A); @@ -58,4 +58,6 @@ int main() assert(A::count == 0); } assert(A::count == 0); + + return 0; } diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/shared_ptr_Y.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/shared_ptr_Y.pass.cpp index 3b7279087ffc6..01a74898f9cb3 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/shared_ptr_Y.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/shared_ptr_Y.pass.cpp @@ -50,7 +50,7 @@ struct C int C::count = 0; -int main() +int main(int, char**) { static_assert(( std::is_convertible, std::shared_ptr >::value), ""); static_assert((!std::is_convertible, std::shared_ptr >::value), ""); @@ -93,4 +93,6 @@ int main() } assert(B::count == 0); assert(A::count == 0); + + return 0; } diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/shared_ptr_Y_rv.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/shared_ptr_Y_rv.pass.cpp index 8d3af186e50ee..cc86d12dfcf5c 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/shared_ptr_Y_rv.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/shared_ptr_Y_rv.pass.cpp @@ -54,7 +54,7 @@ struct C int C::count = 0; -int main() +int main(int, char**) { static_assert(( std::is_convertible, std::shared_ptr >::value), ""); static_assert((!std::is_convertible, std::shared_ptr >::value), ""); @@ -109,4 +109,6 @@ int main() } assert(B::count == 0); assert(A::count == 0); + + return 0; } diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/shared_ptr_pointer.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/shared_ptr_pointer.pass.cpp index 06a285cd2ced1..83a9a9720dc41 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/shared_ptr_pointer.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/shared_ptr_pointer.pass.cpp @@ -37,7 +37,7 @@ struct A int A::count = 0; -int main() +int main(int, char**) { { std::shared_ptr pA(new A); @@ -57,4 +57,6 @@ int main() } assert(A::count == 0); assert(B::count == 0); + + return 0; } diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/shared_ptr_rv.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/shared_ptr_rv.pass.cpp index d9eef4a238877..86797a047e8c0 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/shared_ptr_rv.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/shared_ptr_rv.pass.cpp @@ -30,7 +30,7 @@ struct A int A::count = 0; -int main() +int main(int, char**) { { std::shared_ptr pA(new A); @@ -73,4 +73,6 @@ int main() assert(A::count == 0); } assert(A::count == 0); + + return 0; } diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/unique_ptr.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/unique_ptr.pass.cpp index d235a50b9a15c..6fd812fca0a06 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/unique_ptr.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/unique_ptr.pass.cpp @@ -49,7 +49,7 @@ void fn ( const std::shared_ptr &) { assert (false); } template void assert_deleter ( T * ) { assert(false); } -int main() +int main(int, char**) { { std::unique_ptr ptr(new A); @@ -97,4 +97,6 @@ int main() std::shared_ptr p2(std::move(p)); // should not call deleter when going out of scope } #endif + + return 0; } diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/weak_ptr.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/weak_ptr.pass.cpp index 117a74aaa57b0..9174f39be37bd 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/weak_ptr.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/weak_ptr.pass.cpp @@ -40,7 +40,7 @@ struct A int A::count = 0; -int main() +int main(int, char**) { #ifndef TEST_HAS_NO_EXCEPTIONS { @@ -81,4 +81,6 @@ int main() } assert(A::count == 0); #endif + + return 0; } diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/allocate_shared.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/allocate_shared.pass.cpp index 354a23e7015e8..06c2bba6705a8 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/allocate_shared.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/allocate_shared.pass.cpp @@ -51,7 +51,7 @@ struct A int A::count = 0; -int main() +int main(int, char**) { { int i = 67; @@ -82,4 +82,6 @@ int main() assert(p->get_char() == 'f'); } assert(A::count == 0); + + return 0; } diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/allocate_shared_cxx03.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/allocate_shared_cxx03.pass.cpp index 0783b6e7f1cc8..00f79cc19d2c5 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/allocate_shared_cxx03.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/allocate_shared_cxx03.pass.cpp @@ -97,7 +97,7 @@ void test() assert(Three::count == 0); } -int main() +int main(int, char**) { { int i = 67; @@ -114,4 +114,6 @@ int main() #if TEST_STD_VER >= 11 test >(); #endif + + return 0; } diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/make_shared.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/make_shared.pass.cpp index 2535519b9e7af..aed060e5790eb 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/make_shared.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/make_shared.pass.cpp @@ -73,7 +73,7 @@ void test_pointer_to_function() { void test_pointer_to_function() {} #endif // _LIBCPP_VERSION -int main() +int main(int, char**) { int nc = globalMemCounter.outstanding_new; { @@ -107,4 +107,6 @@ int main() } #endif assert(A::count == 0); + + return 0; } diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/make_shared.private.fail.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/make_shared.private.fail.cpp index fd5ebdccab39d..e17d7424be444 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/make_shared.private.fail.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/make_shared.private.fail.cpp @@ -22,7 +22,9 @@ struct S { S () {}; // ctor is private }; -int main() +int main(int, char**) { std::shared_ptr p = std::make_shared(); + + return 0; } diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/make_shared.protected.fail.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/make_shared.protected.fail.cpp index 8ba4a69c3c464..d4d8fb630c99e 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/make_shared.protected.fail.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/make_shared.protected.fail.cpp @@ -22,7 +22,9 @@ struct S { S () {}; // ctor is protected }; -int main() +int main(int, char**) { std::shared_ptr p = std::make_shared(); // expected-error-re@memory:* {{static_assert failed{{.*}} "Can't construct object in make_shared"}} + + return 0; } diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/make_shared.volatile.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/make_shared.volatile.pass.cpp index c50b68f70975c..aa038f7475f83 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/make_shared.volatile.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/make_shared.volatile.pass.cpp @@ -52,9 +52,11 @@ void test(const T &t0) } -int main() +int main(int, char**) { test(true); test(3); test(5.0); + + return 0; } diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.dest/tested_elsewhere.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.dest/tested_elsewhere.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.dest/tested_elsewhere.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.dest/tested_elsewhere.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.io/io.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.io/io.pass.cpp index cf3aac86aec4f..b09550a6eab27 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.io/io.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.io/io.pass.cpp @@ -18,11 +18,13 @@ #include #include -int main() +int main(int, char**) { std::shared_ptr p(new int(3)); std::ostringstream os; assert(os.str().empty()); os << p; assert(!os.str().empty()); + + return 0; } diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.mod/reset.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.mod/reset.pass.cpp index 3943b5892ba0f..c9df003192b91 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.mod/reset.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.mod/reset.pass.cpp @@ -38,7 +38,7 @@ struct A int A::count = 0; -int main() +int main(int, char**) { { std::shared_ptr p(new B); @@ -58,4 +58,6 @@ int main() assert(p.get() == 0); } assert(A::count == 0); + + return 0; } diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.mod/reset_pointer.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.mod/reset_pointer.pass.cpp index 3e91fa3de5681..c3582416584a0 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.mod/reset_pointer.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.mod/reset_pointer.pass.cpp @@ -38,7 +38,7 @@ struct A int A::count = 0; -int main() +int main(int, char**) { { std::shared_ptr p(new B); @@ -60,4 +60,6 @@ int main() assert(p.get() == ptr); } assert(A::count == 0); + + return 0; } diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.mod/reset_pointer_deleter.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.mod/reset_pointer_deleter.pass.cpp index 70a2024cce298..e7d457fa13988 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.mod/reset_pointer_deleter.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.mod/reset_pointer_deleter.pass.cpp @@ -39,7 +39,7 @@ struct A int A::count = 0; -int main() +int main(int, char**) { { std::shared_ptr p(new B); @@ -75,4 +75,6 @@ int main() assert(A::count == 0); assert(test_deleter::count == 0); assert(test_deleter::dealloc_count == 2); + + return 0; } diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.mod/reset_pointer_deleter_allocator.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.mod/reset_pointer_deleter_allocator.pass.cpp index d4db96826e36d..9e2bd1012900f 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.mod/reset_pointer_deleter_allocator.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.mod/reset_pointer_deleter_allocator.pass.cpp @@ -40,7 +40,7 @@ struct A int A::count = 0; -int main() +int main(int, char**) { { std::shared_ptr p(new B); @@ -84,4 +84,6 @@ int main() assert(test_deleter::dealloc_count == 2); assert(test_allocator::count == 0); assert(test_allocator::alloc_count == 0); + + return 0; } diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.mod/swap.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.mod/swap.pass.cpp index a47e67f04a983..a27949ebb8039 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.mod/swap.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.mod/swap.pass.cpp @@ -26,7 +26,7 @@ struct A int A::count = 0; -int main() +int main(int, char**) { { A* ptr1 = new A; @@ -100,4 +100,6 @@ int main() assert(A::count == 0); } assert(A::count == 0); + + return 0; } diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.obs/arrow.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.obs/arrow.pass.cpp index 5f7d6582b6f07..77bf3a22e0806 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.obs/arrow.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.obs/arrow.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { const std::shared_ptr > p(new std::pair(3, 4)); assert(p->first == 3); @@ -25,4 +25,6 @@ int main() p->second = 6; assert(p->first == 5); assert(p->second == 6); + + return 0; } diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.obs/dereference.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.obs/dereference.pass.cpp index 4b2a495a89b8c..a6f75533acb9c 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.obs/dereference.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.obs/dereference.pass.cpp @@ -15,10 +15,12 @@ #include #include -int main() +int main(int, char**) { const std::shared_ptr p(new int(32)); assert(*p == 32); *p = 3; assert(*p == 3); + + return 0; } diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.obs/op_bool.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.obs/op_bool.pass.cpp index 4c6790f867c96..247deb07bb99a 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.obs/op_bool.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.obs/op_bool.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { { const std::shared_ptr p(new int(32)); @@ -25,4 +25,6 @@ int main() const std::shared_ptr p; assert(!p); } + + return 0; } diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.obs/owner_before_shared_ptr.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.obs/owner_before_shared_ptr.pass.cpp index c6ae19911c326..497a53b214439 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.obs/owner_before_shared_ptr.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.obs/owner_before_shared_ptr.pass.cpp @@ -16,7 +16,7 @@ #include #include "test_macros.h" -int main() +int main(int, char**) { const std::shared_ptr p1(new int); const std::shared_ptr p2 = p1; @@ -26,4 +26,6 @@ int main() assert(p1.owner_before(p3) || p3.owner_before(p1)); assert(p3.owner_before(p1) == p3.owner_before(p2)); ASSERT_NOEXCEPT(p1.owner_before(p2)); + + return 0; } diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.obs/owner_before_weak_ptr.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.obs/owner_before_weak_ptr.pass.cpp index e857aa6a83d3e..07c7a06442049 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.obs/owner_before_weak_ptr.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.obs/owner_before_weak_ptr.pass.cpp @@ -16,7 +16,7 @@ #include #include "test_macros.h" -int main() +int main(int, char**) { const std::shared_ptr p1(new int); const std::shared_ptr p2 = p1; @@ -29,4 +29,6 @@ int main() assert(p1.owner_before(w3) || p3.owner_before(w1)); assert(p3.owner_before(w1) == p3.owner_before(w2)); ASSERT_NOEXCEPT(p1.owner_before(w2)); + + return 0; } diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.obs/unique.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.obs/unique.pass.cpp index 14a2fe992f193..dfad31385173c 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.obs/unique.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.obs/unique.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { const std::shared_ptr p(new int(32)); assert(p.unique()); @@ -24,4 +24,6 @@ int main() assert(!p.unique()); } assert(p.unique()); + + return 0; } diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.spec/swap.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.spec/swap.pass.cpp index b40e4705acfe3..b0bfcae9ae4cf 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.spec/swap.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.spec/swap.pass.cpp @@ -27,7 +27,7 @@ struct A int A::count = 0; -int main() +int main(int, char**) { { A* ptr1 = new A; @@ -101,4 +101,6 @@ int main() assert(A::count == 0); } assert(A::count == 0); + + return 0; } diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/types.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/types.pass.cpp index 2263eb810cbd3..f5bdb876b466e 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/types.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/types.pass.cpp @@ -19,7 +19,9 @@ struct A; // purposefully incomplete -int main() +int main(int, char**) { static_assert((std::is_same::element_type, A>::value), ""); + + return 0; } diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.ownerless/owner_less.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.ownerless/owner_less.pass.cpp index c65755d8ea42c..b3cc13d72a895 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.ownerless/owner_less.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.ownerless/owner_less.pass.cpp @@ -52,7 +52,7 @@ struct X {}; -int main() +int main(int, char**) { const std::shared_ptr p1(new int); const std::shared_ptr p2 = p1; @@ -128,4 +128,6 @@ int main() assert(s.find(vp) == s.end()); } #endif + + return 0; } diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.assign/shared_ptr_Y.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.assign/shared_ptr_Y.pass.cpp index 1362537e03078..02f180d3d6431 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.assign/shared_ptr_Y.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.assign/shared_ptr_Y.pass.cpp @@ -39,7 +39,7 @@ struct A int A::count = 0; -int main() +int main(int, char**) { { const std::shared_ptr pA(new A); @@ -57,4 +57,6 @@ int main() } assert(B::count == 0); assert(A::count == 0); + + return 0; } diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.assign/weak_ptr.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.assign/weak_ptr.pass.cpp index 739165c3cab7d..f41c391c4c24c 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.assign/weak_ptr.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.assign/weak_ptr.pass.cpp @@ -39,7 +39,7 @@ struct A int A::count = 0; -int main() +int main(int, char**) { { const std::shared_ptr ps(new A); @@ -74,4 +74,6 @@ int main() } assert(B::count == 0); assert(A::count == 0); + + return 0; } diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.assign/weak_ptr_Y.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.assign/weak_ptr_Y.pass.cpp index f763dc4639559..33b2ddd422aff 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.assign/weak_ptr_Y.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.assign/weak_ptr_Y.pass.cpp @@ -39,7 +39,7 @@ struct A int A::count = 0; -int main() +int main(int, char**) { { const std::shared_ptr ps(new A); @@ -74,4 +74,6 @@ int main() } assert(B::count == 0); assert(A::count == 0); + + return 0; } diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.const/default.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.const/default.pass.cpp index b29623f296ab0..e5a70abe417d5 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.const/default.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.const/default.pass.cpp @@ -17,8 +17,10 @@ struct A; -int main() +int main(int, char**) { std::weak_ptr p; assert(p.use_count() == 0); + + return 0; } diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.const/shared_ptr_Y.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.const/shared_ptr_Y.pass.cpp index 8aaeab0c9049a..45be55e66f8e1 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.const/shared_ptr_Y.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.const/shared_ptr_Y.pass.cpp @@ -50,7 +50,7 @@ struct C int C::count = 0; -int main() +int main(int, char**) { static_assert(( std::is_convertible, std::weak_ptr >::value), ""); static_assert((!std::is_convertible, std::shared_ptr >::value), ""); @@ -91,4 +91,6 @@ int main() } assert(B::count == 0); assert(A::count == 0); + + return 0; } diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.const/weak_ptr.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.const/weak_ptr.pass.cpp index 351b66323db3b..658b233c41c7b 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.const/weak_ptr.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.const/weak_ptr.pass.cpp @@ -61,7 +61,7 @@ template void sink (std::weak_ptr &&) {} #endif -int main() +int main(int, char**) { { const std::shared_ptr ps(new A); @@ -112,4 +112,6 @@ int main() assert(B::count == 0); assert(A::count == 0); #endif + + return 0; } diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.const/weak_ptr_Y.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.const/weak_ptr_Y.pass.cpp index e155e4faa1354..4268fda3aba42 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.const/weak_ptr_Y.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.const/weak_ptr_Y.pass.cpp @@ -54,7 +54,7 @@ int C::count = 0; template std::weak_ptr source (std::shared_ptr p) { return std::weak_ptr(p); } -int main() +int main(int, char**) { static_assert(( std::is_convertible, std::weak_ptr >::value), ""); static_assert((!std::is_convertible, std::weak_ptr >::value), ""); @@ -104,4 +104,6 @@ int main() } assert(B::count == 0); assert(A::count == 0); + + return 0; } diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.dest/tested_elsewhere.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.dest/tested_elsewhere.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.dest/tested_elsewhere.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.dest/tested_elsewhere.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.mod/reset.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.mod/reset.pass.cpp index 7c3bcb6c641c3..eae249ca1a534 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.mod/reset.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.mod/reset.pass.cpp @@ -26,7 +26,7 @@ struct A int A::count = 0; -int main() +int main(int, char**) { { std::shared_ptr p1(new A); @@ -37,4 +37,6 @@ int main() assert(p1.use_count() == 1); } assert(A::count == 0); + + return 0; } diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.mod/swap.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.mod/swap.pass.cpp index 38b1dee093af7..76703d0ddd755 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.mod/swap.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.mod/swap.pass.cpp @@ -26,7 +26,7 @@ struct A int A::count = 0; -int main() +int main(int, char**) { { A* ptr1 = new A; @@ -45,4 +45,6 @@ int main() } } assert(A::count == 0); + + return 0; } diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.obs/expired.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.obs/expired.pass.cpp index f2fccb5589da9..5fb2dd4f95bf2 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.obs/expired.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.obs/expired.pass.cpp @@ -26,7 +26,7 @@ struct A int A::count = 0; -int main() +int main(int, char**) { { std::weak_ptr wp; @@ -42,4 +42,6 @@ int main() assert(wp.use_count() == 0); assert(wp.expired() == (wp.use_count() == 0)); } + + return 0; } diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.obs/lock.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.obs/lock.pass.cpp index 883de740cce20..50ff84318efcf 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.obs/lock.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.obs/lock.pass.cpp @@ -26,7 +26,7 @@ struct A int A::count = 0; -int main() +int main(int, char**) { { std::weak_ptr wp; @@ -54,4 +54,6 @@ int main() assert(A::count == 0); } assert(A::count == 0); + + return 0; } diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.obs/not_less_than.fail.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.obs/not_less_than.fail.cpp index c916a8907402b..2df6d6a0e322a 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.obs/not_less_than.fail.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.obs/not_less_than.fail.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { const std::shared_ptr p1(new int); const std::shared_ptr p2(new int); @@ -23,4 +23,6 @@ int main() const std::weak_ptr w2(p2); bool b = w1 < w2; + + return 0; } diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.obs/owner_before_shared_ptr.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.obs/owner_before_shared_ptr.pass.cpp index d8483d9b65ea3..4d26f5f2b3325 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.obs/owner_before_shared_ptr.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.obs/owner_before_shared_ptr.pass.cpp @@ -16,7 +16,7 @@ #include #include "test_macros.h" -int main() +int main(int, char**) { const std::shared_ptr p1(new int); const std::shared_ptr p2 = p1; @@ -29,4 +29,6 @@ int main() assert(w1.owner_before(p3) || w3.owner_before(p1)); assert(w3.owner_before(p1) == w3.owner_before(p2)); ASSERT_NOEXCEPT(w1.owner_before(p2)); + + return 0; } diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.obs/owner_before_weak_ptr.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.obs/owner_before_weak_ptr.pass.cpp index b323da7d50349..39993cd8f6a6c 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.obs/owner_before_weak_ptr.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.obs/owner_before_weak_ptr.pass.cpp @@ -16,7 +16,7 @@ #include #include "test_macros.h" -int main() +int main(int, char**) { const std::shared_ptr p1(new int); const std::shared_ptr p2 = p1; @@ -29,4 +29,6 @@ int main() assert(w1.owner_before(w3) || w3.owner_before(w1)); assert(w3.owner_before(w1) == w3.owner_before(w2)); ASSERT_NOEXCEPT(w1.owner_before(w2)); + + return 0; } diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.spec/swap.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.spec/swap.pass.cpp index e13d5aeaf6367..53bc3eb9cd86a 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.spec/swap.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.spec/swap.pass.cpp @@ -27,7 +27,7 @@ struct A int A::count = 0; -int main() +int main(int, char**) { { A* ptr1 = new A; @@ -46,4 +46,6 @@ int main() } } assert(A::count == 0); + + return 0; } diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weakptr/bad_weak_ptr.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weakptr/bad_weak_ptr.pass.cpp index a85120ae05f74..f3e26dee54e83 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weakptr/bad_weak_ptr.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weakptr/bad_weak_ptr.pass.cpp @@ -20,11 +20,13 @@ #include #include -int main() +int main(int, char**) { static_assert((std::is_base_of::value), ""); std::bad_weak_ptr e; std::bad_weak_ptr e2 = e; e2 = e; assert(std::strcmp(e.what(), "bad_weak_ptr") == 0); + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.help/bool_constant.pass.cpp b/libcxx/test/std/utilities/meta/meta.help/bool_constant.pass.cpp index b9037f5270412..917f8b919fa98 100644 --- a/libcxx/test/std/utilities/meta/meta.help/bool_constant.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.help/bool_constant.pass.cpp @@ -15,7 +15,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { #if TEST_STD_VER > 14 typedef std::bool_constant _t; @@ -30,4 +30,6 @@ int main() static_assert((std::is_same<_f::type, _f>::value), ""); static_assert((_f() == false), ""); #endif + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.help/integral_constant.pass.cpp b/libcxx/test/std/utilities/meta/meta.help/integral_constant.pass.cpp index 89d648750955b..f312acad65768 100644 --- a/libcxx/test/std/utilities/meta/meta.help/integral_constant.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.help/integral_constant.pass.cpp @@ -15,7 +15,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { typedef std::integral_constant _5; static_assert(_5::value == 5, ""); @@ -47,4 +47,6 @@ int main() std::true_type t1; std::true_type t2 = t1; assert(t2); + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.logical/conjunction.pass.cpp b/libcxx/test/std/utilities/meta/meta.logical/conjunction.pass.cpp index 0b9a036213050..e37769576d2fe 100644 --- a/libcxx/test/std/utilities/meta/meta.logical/conjunction.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.logical/conjunction.pass.cpp @@ -19,7 +19,7 @@ struct True { static constexpr bool value = true; }; struct False { static constexpr bool value = false; }; -int main() +int main(int, char**) { static_assert ( std::conjunction<>::value, "" ); static_assert ( std::conjunction::value, "" ); @@ -62,4 +62,6 @@ int main() static_assert ( std::conjunction_v, "" ); static_assert (!std::conjunction_v, "" ); + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.logical/disjunction.pass.cpp b/libcxx/test/std/utilities/meta/meta.logical/disjunction.pass.cpp index 00a1b306d61a2..baaed6f03ceea 100644 --- a/libcxx/test/std/utilities/meta/meta.logical/disjunction.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.logical/disjunction.pass.cpp @@ -19,7 +19,7 @@ struct True { static constexpr bool value = true; }; struct False { static constexpr bool value = false; }; -int main() +int main(int, char**) { static_assert (!std::disjunction<>::value, "" ); static_assert ( std::disjunction::value, "" ); @@ -62,4 +62,6 @@ int main() static_assert ( std::disjunction_v, "" ); static_assert (!std::disjunction_v, "" ); + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.logical/negation.pass.cpp b/libcxx/test/std/utilities/meta/meta.logical/negation.pass.cpp index d399a5c84e61a..88ca693d31b39 100644 --- a/libcxx/test/std/utilities/meta/meta.logical/negation.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.logical/negation.pass.cpp @@ -19,7 +19,7 @@ struct True { static constexpr bool value = true; }; struct False { static constexpr bool value = false; }; -int main() +int main(int, char**) { static_assert (!std::negation::value, "" ); static_assert ( std::negation::value, "" ); @@ -35,4 +35,6 @@ int main() static_assert ( std::negation>::value, "" ); static_assert (!std::negation>::value, "" ); + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.rel/is_base_of.pass.cpp b/libcxx/test/std/utilities/meta/meta.rel/is_base_of.pass.cpp index c2b84b35427fb..ec27581a4f99c 100644 --- a/libcxx/test/std/utilities/meta/meta.rel/is_base_of.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.rel/is_base_of.pass.cpp @@ -40,7 +40,7 @@ struct B1 : B {}; struct B2 : B {}; struct D : private B1, private B2 {}; -int main() +int main(int, char**) { test_is_base_of(); test_is_base_of(); @@ -53,4 +53,6 @@ int main() test_is_not_base_of(); test_is_not_base_of(); test_is_not_base_of(); + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.rel/is_convertible.pass.cpp b/libcxx/test/std/utilities/meta/meta.rel/is_convertible.pass.cpp index faffaf6b3d658..b1722b0fcecae 100644 --- a/libcxx/test/std/utilities/meta/meta.rel/is_convertible.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.rel/is_convertible.pass.cpp @@ -60,7 +60,7 @@ class CannotInstantiate { enum { X = T::ThisExpressionWillBlowUp }; }; -int main() +int main(int, char**) { // void test_is_convertible (); @@ -259,4 +259,6 @@ int main() // Ensure that CannotInstantiate is not instantiated by is_convertible when it is not needed. // For example CannotInstantiate is instatiated as a part of ADL lookup for arguments of type CannotInstantiate*. static_assert((std::is_convertible*, CannotInstantiate*>::value), ""); + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.rel/is_invocable.pass.cpp b/libcxx/test/std/utilities/meta/meta.rel/is_invocable.pass.cpp index dab17974bb8a1..fa0c0c82e8ad6 100644 --- a/libcxx/test/std/utilities/meta/meta.rel/is_invocable.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.rel/is_invocable.pass.cpp @@ -46,7 +46,7 @@ struct Sink { void operator()(Args&&...) const {} }; -int main() { +int main(int, char**) { using AbominableFunc = void(...) const; // Non-callable things @@ -241,4 +241,5 @@ int main() { static_assert(std::is_invocable_r_v, ""); static_assert(!std::is_invocable_r_v, ""); } + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.rel/is_nothrow_invocable.pass.cpp b/libcxx/test/std/utilities/meta/meta.rel/is_nothrow_invocable.pass.cpp index f21e99b02d052..baf64c12f9e72 100644 --- a/libcxx/test/std/utilities/meta/meta.rel/is_nothrow_invocable.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.rel/is_nothrow_invocable.pass.cpp @@ -80,7 +80,7 @@ void test_noexcept_function_pointers() { #endif } -int main() { +int main(int, char**) { using AbominableFunc = void(...) const noexcept; // Non-callable things { @@ -212,4 +212,6 @@ int main() { static_assert(!std::is_nothrow_invocable_r_v, ""); } test_noexcept_function_pointers(); + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.rel/is_same.pass.cpp b/libcxx/test/std/utilities/meta/meta.rel/is_same.pass.cpp index 6345805500849..739713bf4c2f2 100644 --- a/libcxx/test/std/utilities/meta/meta.rel/is_same.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.rel/is_same.pass.cpp @@ -56,7 +56,7 @@ class Class ~Class(); }; -int main() +int main(int, char**) { test_is_same(); test_is_same(); @@ -69,4 +69,6 @@ int main() test_is_not_same(); test_is_not_same(); test_is_not_same(); + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.rqmts/nothing_to_do.pass.cpp b/libcxx/test/std/utilities/meta/meta.rqmts/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/utilities/meta/meta.rqmts/nothing_to_do.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.rqmts/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.trans/meta.trans.arr/remove_all_extents.pass.cpp b/libcxx/test/std/utilities/meta/meta.trans/meta.trans.arr/remove_all_extents.pass.cpp index 62699fed46eff..a887d52bbc0bd 100644 --- a/libcxx/test/std/utilities/meta/meta.trans/meta.trans.arr/remove_all_extents.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.trans/meta.trans.arr/remove_all_extents.pass.cpp @@ -25,7 +25,7 @@ void test_remove_all_extents() #endif } -int main() +int main(int, char**) { test_remove_all_extents (); test_remove_all_extents (); @@ -39,4 +39,6 @@ int main() test_remove_all_extents (); test_remove_all_extents (); test_remove_all_extents (); + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.trans/meta.trans.arr/remove_extent.pass.cpp b/libcxx/test/std/utilities/meta/meta.trans/meta.trans.arr/remove_extent.pass.cpp index 1c0f988481745..a0b19d6a64a1d 100644 --- a/libcxx/test/std/utilities/meta/meta.trans/meta.trans.arr/remove_extent.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.trans/meta.trans.arr/remove_extent.pass.cpp @@ -26,7 +26,7 @@ void test_remove_extent() } -int main() +int main(int, char**) { test_remove_extent (); test_remove_extent (); @@ -40,4 +40,6 @@ int main() test_remove_extent (); test_remove_extent (); test_remove_extent (); + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.trans/meta.trans.cv/add_const.pass.cpp b/libcxx/test/std/utilities/meta/meta.trans/meta.trans.cv/add_const.pass.cpp index c7fb61232b368..edde6565744c6 100644 --- a/libcxx/test/std/utilities/meta/meta.trans/meta.trans.cv/add_const.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.trans/meta.trans.cv/add_const.pass.cpp @@ -32,7 +32,7 @@ void test_add_const() test_add_const_imp(); } -int main() +int main(int, char**) { test_add_const(); test_add_const(); @@ -41,4 +41,6 @@ int main() test_add_const(); test_add_const(); test_add_const(); + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.trans/meta.trans.cv/add_cv.pass.cpp b/libcxx/test/std/utilities/meta/meta.trans/meta.trans.cv/add_cv.pass.cpp index 0662c9dd400fb..5621bbf4263c1 100644 --- a/libcxx/test/std/utilities/meta/meta.trans/meta.trans.cv/add_cv.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.trans/meta.trans.cv/add_cv.pass.cpp @@ -32,7 +32,7 @@ void test_add_cv() test_add_cv_imp(); } -int main() +int main(int, char**) { test_add_cv(); test_add_cv(); @@ -41,4 +41,6 @@ int main() test_add_cv(); test_add_cv(); test_add_cv(); + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.trans/meta.trans.cv/add_volatile.pass.cpp b/libcxx/test/std/utilities/meta/meta.trans/meta.trans.cv/add_volatile.pass.cpp index 476a780a423d6..6dfaa60f894c0 100644 --- a/libcxx/test/std/utilities/meta/meta.trans/meta.trans.cv/add_volatile.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.trans/meta.trans.cv/add_volatile.pass.cpp @@ -32,7 +32,7 @@ void test_add_volatile() test_add_volatile_imp(); } -int main() +int main(int, char**) { test_add_volatile(); test_add_volatile(); @@ -41,4 +41,6 @@ int main() test_add_volatile(); test_add_volatile(); test_add_volatile(); + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.trans/meta.trans.cv/remove_const.pass.cpp b/libcxx/test/std/utilities/meta/meta.trans/meta.trans.cv/remove_const.pass.cpp index d53d6f805f9b6..3c927e7c92e75 100644 --- a/libcxx/test/std/utilities/meta/meta.trans/meta.trans.cv/remove_const.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.trans/meta.trans.cv/remove_const.pass.cpp @@ -32,7 +32,7 @@ void test_remove_const() test_remove_const_imp(); } -int main() +int main(int, char**) { test_remove_const(); test_remove_const(); @@ -41,4 +41,6 @@ int main() test_remove_const(); test_remove_const(); test_remove_const(); + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.trans/meta.trans.cv/remove_cv.pass.cpp b/libcxx/test/std/utilities/meta/meta.trans/meta.trans.cv/remove_cv.pass.cpp index 569b9642d35cb..2dc8d26e0e39f 100644 --- a/libcxx/test/std/utilities/meta/meta.trans/meta.trans.cv/remove_cv.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.trans/meta.trans.cv/remove_cv.pass.cpp @@ -32,7 +32,7 @@ void test_remove_cv() test_remove_cv_imp(); } -int main() +int main(int, char**) { test_remove_cv(); test_remove_cv(); @@ -41,4 +41,6 @@ int main() test_remove_cv(); test_remove_cv(); test_remove_cv(); + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.trans/meta.trans.cv/remove_volatile.pass.cpp b/libcxx/test/std/utilities/meta/meta.trans/meta.trans.cv/remove_volatile.pass.cpp index 358d2fa8bfdd5..fb45d94395e34 100644 --- a/libcxx/test/std/utilities/meta/meta.trans/meta.trans.cv/remove_volatile.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.trans/meta.trans.cv/remove_volatile.pass.cpp @@ -32,7 +32,7 @@ void test_remove_volatile() test_remove_volatile_imp(); } -int main() +int main(int, char**) { test_remove_volatile(); test_remove_volatile(); @@ -41,4 +41,6 @@ int main() test_remove_volatile(); test_remove_volatile(); test_remove_volatile(); + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/aligned_storage.pass.cpp b/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/aligned_storage.pass.cpp index 08c0b8bb162f0..3e80402e81426 100644 --- a/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/aligned_storage.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/aligned_storage.pass.cpp @@ -17,7 +17,7 @@ #include // for std::max_align_t #include "test_macros.h" -int main() +int main(int, char**) { { typedef std::aligned_storage<10, 1 >::type T1; @@ -285,4 +285,6 @@ int main() static_assert(std::alignment_of::value == 8, ""); static_assert(sizeof(T1) == 16, ""); } + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/aligned_union.fail.cpp b/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/aligned_union.fail.cpp index 2564f11200510..cf9fe632dd34b 100644 --- a/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/aligned_union.fail.cpp +++ b/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/aligned_union.fail.cpp @@ -16,7 +16,9 @@ class A; // Incomplete -int main() +int main(int, char**) { typedef std::aligned_union<10, A>::type T1; + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/aligned_union.pass.cpp b/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/aligned_union.pass.cpp index 800a0074cb9e7..789fd12a9ff5d 100644 --- a/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/aligned_union.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/aligned_union.pass.cpp @@ -19,7 +19,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { { typedef std::aligned_union<10, char >::type T1; @@ -111,4 +111,6 @@ int main() static_assert(std::alignment_of::value == 4, ""); static_assert(sizeof(T1) == 4, ""); } + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/common_type.pass.cpp b/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/common_type.pass.cpp index 70d2ddf095a9e..f96603b30b6b6 100644 --- a/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/common_type.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/common_type.pass.cpp @@ -234,7 +234,7 @@ static_assert(is_same::type, const char&>::val } // namespace note_b_example #endif // TEST_STD_VER >= 11 -int main() +int main(int, char**) { static_assert((std::is_same::type, int>::value), ""); static_assert((std::is_same::type, char>::value), ""); @@ -307,4 +307,6 @@ int main() static_assert((std::is_same::type, int>::value), ""); static_assert((std::is_same::type, int>::value), ""); static_assert((std::is_same::type, int>::value), ""); + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/conditional.pass.cpp b/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/conditional.pass.cpp index b408dfb2c2cee..288376ac93c66 100644 --- a/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/conditional.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/conditional.pass.cpp @@ -14,7 +14,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { static_assert((std::is_same::type, char>::value), ""); static_assert((std::is_same::type, int>::value), ""); @@ -22,4 +22,6 @@ int main() static_assert((std::is_same, char>::value), ""); static_assert((std::is_same, int>::value), ""); #endif + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/decay.pass.cpp b/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/decay.pass.cpp index a6f85e921b8b1..94d9720399f7f 100644 --- a/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/decay.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/decay.pass.cpp @@ -23,7 +23,7 @@ void test_decay() #endif } -int main() +int main(int, char**) { test_decay(); test_decay(); @@ -38,4 +38,6 @@ int main() test_decay(); test_decay(); #endif + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/enable_if.fail.cpp b/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/enable_if.fail.cpp index c7b0763e1d8bc..c033d1aef2624 100644 --- a/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/enable_if.fail.cpp +++ b/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/enable_if.fail.cpp @@ -12,7 +12,9 @@ #include -int main() +int main(int, char**) { typedef std::enable_if::type A; + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/enable_if.pass.cpp b/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/enable_if.pass.cpp index bb107d90ad9ef..c02c6efdb2dc2 100644 --- a/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/enable_if.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/enable_if.pass.cpp @@ -14,7 +14,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { static_assert((std::is_same::type, void>::value), ""); static_assert((std::is_same::type, int>::value), ""); @@ -22,4 +22,6 @@ int main() static_assert((std::is_same, void>::value), ""); static_assert((std::is_same, int>::value), ""); #endif + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/enable_if2.fail.cpp b/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/enable_if2.fail.cpp index 70aa3e2121fac..79382d35993cb 100644 --- a/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/enable_if2.fail.cpp +++ b/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/enable_if2.fail.cpp @@ -13,7 +13,9 @@ #include -int main() +int main(int, char**) { typedef std::enable_if_t A; + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/remove_cvref.pass.cpp b/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/remove_cvref.pass.cpp index e67cab8e4a891..e6a01a77ac53c 100644 --- a/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/remove_cvref.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/remove_cvref.pass.cpp @@ -23,7 +23,7 @@ void test_remove_cvref() static_assert((std::is_same< std::remove_cvref_t, U>::value), ""); } -int main() +int main(int, char**) { test_remove_cvref(); test_remove_cvref(); @@ -48,4 +48,6 @@ int main() test_remove_cvref(); test_remove_cvref(); test_remove_cvref(); + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/result_of.pass.cpp b/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/result_of.pass.cpp index 313691f322801..34dd6d8ea0320 100644 --- a/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/result_of.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/result_of.pass.cpp @@ -92,7 +92,7 @@ void test_no_result() #endif } -int main() +int main(int, char**) { typedef NotDerived ND; { // functor object @@ -366,4 +366,6 @@ int main() #endif test_no_result(); } + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/result_of11.pass.cpp b/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/result_of11.pass.cpp index 55fef6a406e4b..4c020d3da776b 100644 --- a/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/result_of11.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/result_of11.pass.cpp @@ -55,7 +55,7 @@ void test_result_of_imp() #endif } -int main() +int main(int, char**) { { typedef char F::*PMD; @@ -168,4 +168,6 @@ int main() test_result_of_imp )) () const, int>(); } test_result_of_imp(); + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/type_identity.pass.cpp b/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/type_identity.pass.cpp index 2946e17f55db2..7e90c3df9c6c7 100644 --- a/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/type_identity.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/type_identity.pass.cpp @@ -22,7 +22,7 @@ void test_type_identity() static_assert((std::is_same< std::type_identity_t, T>::value), ""); } -int main() +int main(int, char**) { test_type_identity(); test_type_identity(); @@ -36,4 +36,6 @@ int main() test_type_identity(); test_type_identity(); test_type_identity(); + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/underlying_type.pass.cpp b/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/underlying_type.pass.cpp index ed1bdc44c6928..be1c739ee8297 100644 --- a/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/underlying_type.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/underlying_type.pass.cpp @@ -27,7 +27,7 @@ enum E { V = INT_MIN }; enum F { W = UINT_MAX }; #endif // TEST_UNSIGNED_UNDERLYING_TYPE -int main() +int main(int, char**) { static_assert((std::is_same::type, int>::value), "E has the wrong underlying type"); @@ -52,4 +52,6 @@ int main() static_assert((std::is_same, char>::value), ""); #endif // TEST_STD_VER > 11 #endif // TEST_STD_VER >= 11 + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.trans/meta.trans.ptr/add_pointer.pass.cpp b/libcxx/test/std/utilities/meta/meta.trans/meta.trans.ptr/add_pointer.pass.cpp index ec4e270be4770..22c0b79d6f2ef 100644 --- a/libcxx/test/std/utilities/meta/meta.trans/meta.trans.ptr/add_pointer.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.trans/meta.trans.ptr/add_pointer.pass.cpp @@ -45,7 +45,7 @@ void test_function1() struct Foo {}; -int main() +int main(int, char**) { test_add_pointer(); test_add_pointer(); @@ -76,4 +76,6 @@ int main() test_function0(); test_function0(); #endif + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.trans/meta.trans.ptr/remove_pointer.pass.cpp b/libcxx/test/std/utilities/meta/meta.trans/meta.trans.ptr/remove_pointer.pass.cpp index 1f62b141251a2..ba7cceb2968df 100644 --- a/libcxx/test/std/utilities/meta/meta.trans/meta.trans.ptr/remove_pointer.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.trans/meta.trans.ptr/remove_pointer.pass.cpp @@ -22,7 +22,7 @@ void test_remove_pointer() #endif } -int main() +int main(int, char**) { test_remove_pointer(); test_remove_pointer(); @@ -40,4 +40,6 @@ int main() test_remove_pointer(); test_remove_pointer(); test_remove_pointer(); + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.trans/meta.trans.ref/add_lvalue_ref.pass.cpp b/libcxx/test/std/utilities/meta/meta.trans/meta.trans.ref/add_lvalue_ref.pass.cpp index 68d8aef35e1ac..dadcafca6b029 100644 --- a/libcxx/test/std/utilities/meta/meta.trans/meta.trans.ref/add_lvalue_ref.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.trans/meta.trans.ref/add_lvalue_ref.pass.cpp @@ -44,7 +44,7 @@ void test_function1() struct Foo {}; -int main() +int main(int, char**) { test_add_lvalue_reference(); test_add_lvalue_reference(); @@ -75,4 +75,6 @@ int main() test_function0(); test_function0(); #endif + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.trans/meta.trans.ref/add_rvalue_ref.pass.cpp b/libcxx/test/std/utilities/meta/meta.trans/meta.trans.ref/add_rvalue_ref.pass.cpp index c13a623663127..34c6cd3dd6ddf 100644 --- a/libcxx/test/std/utilities/meta/meta.trans/meta.trans.ref/add_rvalue_ref.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.trans/meta.trans.ref/add_rvalue_ref.pass.cpp @@ -46,7 +46,7 @@ void test_function1() struct Foo {}; -int main() +int main(int, char**) { test_add_rvalue_reference(); test_add_rvalue_reference(); @@ -73,4 +73,6 @@ int main() test_function0(); test_function0(); test_function0(); + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.trans/meta.trans.ref/remove_ref.pass.cpp b/libcxx/test/std/utilities/meta/meta.trans/meta.trans.ref/remove_ref.pass.cpp index 1cecd51e28d95..5612ba678abac 100644 --- a/libcxx/test/std/utilities/meta/meta.trans/meta.trans.ref/remove_ref.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.trans/meta.trans.ref/remove_ref.pass.cpp @@ -22,7 +22,7 @@ void test_remove_reference() #endif } -int main() +int main(int, char**) { test_remove_reference(); test_remove_reference(); @@ -43,4 +43,6 @@ int main() test_remove_reference(); test_remove_reference(); #endif + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.trans/meta.trans.sign/make_signed.pass.cpp b/libcxx/test/std/utilities/meta/meta.trans/meta.trans.sign/make_signed.pass.cpp index b962782d03d71..fa6ce8e3e4d2d 100644 --- a/libcxx/test/std/utilities/meta/meta.trans/meta.trans.sign/make_signed.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.trans/meta.trans.sign/make_signed.pass.cpp @@ -42,7 +42,7 @@ void test_make_signed() #endif } -int main() +int main(int, char**) { test_make_signed< signed char, signed char >(); test_make_signed< unsigned char, signed char >(); @@ -66,4 +66,6 @@ int main() test_make_signed< HugeEnum, __int128_t >(); # endif #endif + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.trans/meta.trans.sign/make_unsigned.pass.cpp b/libcxx/test/std/utilities/meta/meta.trans/meta.trans.sign/make_unsigned.pass.cpp index 606fdf426a90e..cf5404f8c9003 100644 --- a/libcxx/test/std/utilities/meta/meta.trans/meta.trans.sign/make_unsigned.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.trans/meta.trans.sign/make_unsigned.pass.cpp @@ -42,7 +42,7 @@ void test_make_unsigned() #endif } -int main() +int main(int, char**) { test_make_unsigned (); test_make_unsigned (); @@ -67,4 +67,6 @@ int main() test_make_unsigned(); # endif #endif + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.trans/nothing_to_do.pass.cpp b/libcxx/test/std/utilities/meta/meta.trans/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/utilities/meta/meta.trans/nothing_to_do.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.trans/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.type.synop/endian.pass.cpp b/libcxx/test/std/utilities/meta/meta.type.synop/endian.pass.cpp index 65ba301926123..52924b357b8e5 100644 --- a/libcxx/test/std/utilities/meta/meta.type.synop/endian.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.type.synop/endian.pass.cpp @@ -17,7 +17,7 @@ #include "test_macros.h" -int main() { +int main(int, char**) { static_assert(std::is_enum::value, ""); // Check that E is a scoped enum by checking for conversions. @@ -43,4 +43,6 @@ int main() { assert ((c[0] == 1) == (std::endian::native == std::endian::big)); } + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.type.synop/nothing_to_do.pass.cpp b/libcxx/test/std/utilities/meta/meta.type.synop/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/utilities/meta/meta.type.synop/nothing_to_do.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.type.synop/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.unary.prop.query/alignment_of.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary.prop.query/alignment_of.pass.cpp index 903098415beea..43cc5bfcefc35 100644 --- a/libcxx/test/std/utilities/meta/meta.unary.prop.query/alignment_of.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary.prop.query/alignment_of.pass.cpp @@ -39,7 +39,7 @@ class Class ~Class(); }; -int main() +int main(int, char**) { test_alignment_of(); test_alignment_of(); @@ -57,4 +57,6 @@ int main() test_alignment_of(); #endif test_alignment_of(); + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.unary.prop.query/extent.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary.prop.query/extent.pass.cpp index bfd36533ebb00..927ce1373cc06 100644 --- a/libcxx/test/std/utilities/meta/meta.unary.prop.query/extent.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary.prop.query/extent.pass.cpp @@ -50,7 +50,7 @@ class Class ~Class(); }; -int main() +int main(int, char**) { test_extent(); test_extent(); @@ -70,4 +70,6 @@ int main() test_extent1(); test_extent1(); test_extent1(); + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.unary.prop.query/rank.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary.prop.query/rank.pass.cpp index 74a3637a475ad..6c2eecb86db7c 100644 --- a/libcxx/test/std/utilities/meta/meta.unary.prop.query/rank.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary.prop.query/rank.pass.cpp @@ -35,7 +35,7 @@ class Class ~Class(); }; -int main() +int main(int, char**) { test_rank(); test_rank(); @@ -50,4 +50,6 @@ int main() test_rank(); test_rank(); test_rank(); + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.unary.prop.query/void_t.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary.prop.query/void_t.pass.cpp index af46f4726fc12..652eddaa88ad1 100644 --- a/libcxx/test/std/utilities/meta/meta.unary.prop.query/void_t.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary.prop.query/void_t.pass.cpp @@ -45,7 +45,7 @@ class Class ~Class(); }; -int main() +int main(int, char**) { static_assert( std::is_same>::value, ""); @@ -64,4 +64,6 @@ int main() test2(); static_assert( std::is_same>::value, ""); + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.unary.prop.query/void_t_feature_test_macro.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary.prop.query/void_t_feature_test_macro.pass.cpp index 25b8d715aed35..90514eaaebf0e 100644 --- a/libcxx/test/std/utilities/meta/meta.unary.prop.query/void_t_feature_test_macro.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary.prop.query/void_t_feature_test_macro.pass.cpp @@ -27,9 +27,11 @@ # endif #endif -int main() +int main(int, char**) { #if defined(__cpp_lib_void_t) static_assert(std::is_same_v, void>, ""); #endif + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/array.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/array.pass.cpp index 1e2dc42ae216e..9f3d8f558d113 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/array.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/array.pass.cpp @@ -48,7 +48,7 @@ typedef const char const_array[3]; typedef char incomplete_array[]; struct Incomplete; -int main() +int main(int, char**) { test_array(); test_array(); @@ -57,4 +57,6 @@ int main() // LWG#2582 static_assert(!std::is_array::value, ""); + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/class.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/class.pass.cpp index 93bf9efb42fe8..3dd696932bc13 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/class.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/class.pass.cpp @@ -49,11 +49,13 @@ class Class struct incomplete_type; -int main() +int main(int, char**) { test_class(); test_class(); // LWG#2582 static_assert( std::is_class::value, ""); + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/enum.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/enum.pass.cpp index 95f71b68a2e5b..5fa8499303c54 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/enum.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/enum.pass.cpp @@ -46,10 +46,12 @@ void test_enum() enum Enum {zero, one}; struct incomplete_type; -int main() +int main(int, char**) { test_enum(); // LWG#2582 static_assert(!std::is_enum::value, ""); + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/floating_point.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/floating_point.pass.cpp index c4cf7153b4406..1f7556c7a0115 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/floating_point.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/floating_point.pass.cpp @@ -45,7 +45,7 @@ void test_floating_point() struct incomplete_type; -int main() +int main(int, char**) { test_floating_point(); test_floating_point(); @@ -53,4 +53,6 @@ int main() // LWG#2582 static_assert(!std::is_floating_point::value, ""); + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/function.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/function.pass.cpp index 19ad3e92b84c8..d7453be469cc8 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/function.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/function.pass.cpp @@ -66,7 +66,7 @@ void test() struct incomplete_type; -int main() +int main(int, char**) { TEST_REGULAR( void () ); TEST_REGULAR( void (int) ); @@ -89,4 +89,6 @@ int main() // LWG#2582 static_assert(!std::is_function::value, ""); + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/integral.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/integral.pass.cpp index 74977e4b160a6..df66316b9c8ea 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/integral.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/integral.pass.cpp @@ -45,7 +45,7 @@ void test_integral() struct incomplete_type; -int main() +int main(int, char**) { test_integral(); test_integral(); @@ -67,4 +67,6 @@ int main() // LWG#2582 static_assert(!std::is_integral::value, ""); + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/is_array.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/is_array.pass.cpp index 8611daa15f161..3205819911c17 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/is_array.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/is_array.pass.cpp @@ -70,7 +70,7 @@ struct incomplete_type; typedef void (*FunctionPtr)(); -int main() +int main(int, char**) { test_is_array(); test_is_array(); @@ -90,4 +90,6 @@ int main() test_is_not_array(); test_is_not_array(); test_is_not_array(); // LWG#2582 + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/is_class.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/is_class.pass.cpp index 6eda248f7c5d2..def798b779b15 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/is_class.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/is_class.pass.cpp @@ -70,7 +70,7 @@ struct incomplete_type; typedef void (*FunctionPtr)(); -int main() +int main(int, char**) { test_is_class(); test_is_class(); @@ -96,4 +96,6 @@ int main() test_is_not_class(); test_is_not_class(); test_is_not_class(); + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/is_enum.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/is_enum.pass.cpp index 0261581f6bffe..7d4b67fd872b5 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/is_enum.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/is_enum.pass.cpp @@ -70,7 +70,7 @@ struct incomplete_type; typedef void (*FunctionPtr)(); -int main() +int main(int, char**) { test_is_enum(); @@ -91,4 +91,6 @@ int main() test_is_not_enum(); test_is_not_enum(); test_is_not_enum(); + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/is_floating_point.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/is_floating_point.pass.cpp index 78e581a0c4f7a..e628451dc7d11 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/is_floating_point.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/is_floating_point.pass.cpp @@ -70,7 +70,7 @@ struct incomplete_type; typedef void (*FunctionPtr)(); -int main() +int main(int, char**) { test_is_floating_point(); test_is_floating_point(); @@ -99,4 +99,6 @@ int main() test_is_not_floating_point(); test_is_not_floating_point(); test_is_not_floating_point(); + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/is_function.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/is_function.pass.cpp index 0f2304fe7cde4..b582499cb8b88 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/is_function.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/is_function.pass.cpp @@ -74,7 +74,7 @@ struct incomplete_type; typedef void (*FunctionPtr)(); -int main() +int main(int, char**) { test_is_function(); test_is_function(); @@ -105,4 +105,6 @@ int main() test_is_function(); test_is_function(); #endif + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/is_integral.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/is_integral.pass.cpp index ede74445e286e..216df3b56116a 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/is_integral.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/is_integral.pass.cpp @@ -71,7 +71,7 @@ struct incomplete_type; typedef void (*FunctionPtr)(); -int main() +int main(int, char**) { test_is_integral(); test_is_integral(); @@ -105,4 +105,6 @@ int main() test_is_not_integral(); test_is_not_integral(); test_is_not_integral(); + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/is_lvalue_reference.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/is_lvalue_reference.pass.cpp index fe045a2973536..ed32cd9b999b0 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/is_lvalue_reference.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/is_lvalue_reference.pass.cpp @@ -72,7 +72,7 @@ struct incomplete_type; typedef void (*FunctionPtr)(); -int main() +int main(int, char**) { test_is_lvalue_reference(); @@ -93,4 +93,6 @@ int main() test_is_not_lvalue_reference(); test_is_not_lvalue_reference(); test_is_not_lvalue_reference(); + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/is_member_object_pointer.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/is_member_object_pointer.pass.cpp index 7e20b58fc01e7..95a8b5585788e 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/is_member_object_pointer.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/is_member_object_pointer.pass.cpp @@ -71,7 +71,7 @@ struct incomplete_type; typedef void (*FunctionPtr)(); -int main() +int main(int, char**) { test_is_member_object_pointer(); test_is_member_object_pointer(); @@ -95,4 +95,6 @@ int main() test_is_not_member_object_pointer(); test_is_not_member_object_pointer(); test_is_not_member_object_pointer(); + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/is_member_pointer.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/is_member_pointer.pass.cpp index 0a1b95354f5cd..cf46c7261db3e 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/is_member_pointer.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/is_member_pointer.pass.cpp @@ -71,7 +71,7 @@ struct incomplete_type; typedef void (*FunctionPtr)(); -int main() +int main(int, char**) { test_is_member_pointer(); test_is_member_pointer(); @@ -102,4 +102,6 @@ int main() test_is_member_pointer(); test_is_member_pointer(); #endif + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/is_null_pointer.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/is_null_pointer.pass.cpp index 762c21406d3d0..7ad765d8bbd0e 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/is_null_pointer.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/is_null_pointer.pass.cpp @@ -72,7 +72,7 @@ struct incomplete_type; typedef void (*FunctionPtr)(); -int main() +int main(int, char**) { test_is_null_pointer(); @@ -93,4 +93,6 @@ int main() test_is_not_null_pointer(); test_is_not_null_pointer(); test_is_not_null_pointer(); + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/is_pointer.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/is_pointer.pass.cpp index 9fa33b93c532c..18609b812ea0b 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/is_pointer.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/is_pointer.pass.cpp @@ -70,7 +70,7 @@ struct incomplete_type; typedef void (*FunctionPtr)(); -int main() +int main(int, char**) { test_is_pointer(); test_is_pointer(); @@ -92,4 +92,6 @@ int main() test_is_not_pointer(); test_is_not_pointer(); test_is_not_pointer(); + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/is_rvalue_reference.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/is_rvalue_reference.pass.cpp index 92e86713cc80a..d17ed5feeff6d 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/is_rvalue_reference.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/is_rvalue_reference.pass.cpp @@ -72,7 +72,7 @@ struct incomplete_type; typedef void (*FunctionPtr)(); -int main() +int main(int, char**) { test_is_rvalue_reference(); @@ -93,4 +93,6 @@ int main() test_is_not_rvalue_reference(); test_is_not_rvalue_reference(); test_is_not_rvalue_reference(); + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/is_union.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/is_union.pass.cpp index 0fc3c4361fee5..a86147a9acd2e 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/is_union.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/is_union.pass.cpp @@ -70,7 +70,7 @@ struct incomplete_type; typedef void (*FunctionPtr)(); -int main() +int main(int, char**) { test_is_union(); @@ -91,4 +91,6 @@ int main() test_is_not_union(); test_is_not_union(); test_is_not_union(); + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/is_void.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/is_void.pass.cpp index 0bfeaddee83c4..ccbca97539857 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/is_void.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/is_void.pass.cpp @@ -70,7 +70,7 @@ struct incomplete_type; typedef void (*FunctionPtr)(); -int main() +int main(int, char**) { test_is_void(); @@ -90,4 +90,6 @@ int main() test_is_not_void(); test_is_not_void(); test_is_not_void(); + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/lvalue_ref.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/lvalue_ref.pass.cpp index b4f010749e859..1c431edfa5f84 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/lvalue_ref.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/lvalue_ref.pass.cpp @@ -37,11 +37,13 @@ void test_lvalue_ref() struct incomplete_type; -int main() +int main(int, char**) { test_lvalue_ref(); test_lvalue_ref(); // LWG#2582 static_assert(!std::is_lvalue_reference::value, ""); + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/member_function_pointer.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/member_function_pointer.pass.cpp index 345195e0e368a..fdbfd90394015 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/member_function_pointer.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/member_function_pointer.pass.cpp @@ -52,7 +52,7 @@ class Class struct incomplete_type; -int main() +int main(int, char**) { test_member_function_pointer(); test_member_function_pointer(); @@ -225,4 +225,6 @@ int main() // LWG#2582 static_assert(!std::is_member_function_pointer::value, ""); + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/member_function_pointer_no_variadics.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/member_function_pointer_no_variadics.pass.cpp index 672a90a6f7686..916c580d59120 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/member_function_pointer_no_variadics.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/member_function_pointer_no_variadics.pass.cpp @@ -51,7 +51,7 @@ class Class struct incomplete_type; -int main() +int main(int, char**) { test_member_function_pointer(); test_member_function_pointer(); @@ -79,4 +79,6 @@ int main() // LWG#2582 static_assert(!std::is_member_function_pointer::value, ""); + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/member_object_pointer.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/member_object_pointer.pass.cpp index 2f77553fd58f3..b22e59e379db9 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/member_object_pointer.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/member_object_pointer.pass.cpp @@ -49,10 +49,12 @@ class Class struct incomplete_type; -int main() +int main(int, char**) { test_member_object_pointer(); // LWG#2582 static_assert(!std::is_member_object_pointer::value, ""); + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/nullptr.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/nullptr.pass.cpp index 759eee6681a5c..0b25ac1ba957c 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/nullptr.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/nullptr.pass.cpp @@ -11,11 +11,11 @@ // nullptr_t // is_null_pointer +// UNSUPPORTED: c++98, c++03, c++11 + #include #include // for std::nullptr_t -#include "test_macros.h" -#if TEST_STD_VER > 11 template void test_nullptr_imp() { @@ -46,13 +46,11 @@ void test_nullptr() struct incomplete_type; -int main() +int main(int, char**) { test_nullptr(); // LWG#2582 static_assert(!std::is_null_pointer::value, ""); + return 0; } -#else -int main() {} -#endif diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/pointer.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/pointer.pass.cpp index 68964f52616f8..68f4186db5602 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/pointer.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/pointer.pass.cpp @@ -46,7 +46,7 @@ void test_pointer() struct incomplete_type; -int main() +int main(int, char**) { test_pointer(); test_pointer(); @@ -55,4 +55,6 @@ int main() // LWG#2582 static_assert(!std::is_pointer::value, ""); + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/rvalue_ref.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/rvalue_ref.pass.cpp index cf0b246c6a1af..e40a2a0144363 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/rvalue_ref.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/rvalue_ref.pass.cpp @@ -38,11 +38,13 @@ void test_rvalue_ref() struct incomplete_type; -int main() +int main(int, char**) { test_rvalue_ref(); test_rvalue_ref(); // LWG#2582 static_assert(!std::is_rvalue_reference::value, ""); + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/union.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/union.pass.cpp index 683eed65a285c..a840f5bb29507 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/union.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/union.pass.cpp @@ -51,10 +51,12 @@ union Union struct incomplete_type; -int main() +int main(int, char**) { test_union(); // LWG#2582 static_assert(!std::is_union::value, ""); + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/void.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/void.pass.cpp index 047de20045bf9..d9defa528be3f 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/void.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/void.pass.cpp @@ -45,10 +45,12 @@ void test_void() struct incomplete_type; -int main() +int main(int, char**) { test_void(); // LWG#2582 static_assert(!std::is_void::value, ""); + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/array.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/array.pass.cpp index b0ced4a9ce483..487e14446c32c 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/array.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/array.pass.cpp @@ -39,10 +39,12 @@ typedef char incomplete_array[]; class incomplete_type; -int main() +int main(int, char**) { test_array(); test_array(); test_array(); test_array(); + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/class.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/class.pass.cpp index bff535c9ade66..bc072198f2ebd 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/class.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/class.pass.cpp @@ -39,8 +39,10 @@ class Class class incomplete_type; -int main() +int main(int, char**) { test_class(); test_class(); + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/enum.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/enum.pass.cpp index 33807bc4d0704..71c74f2ba045b 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/enum.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/enum.pass.cpp @@ -35,7 +35,9 @@ void test_enum() enum Enum {zero, one}; -int main() +int main(int, char**) { test_enum(); + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/floating_point.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/floating_point.pass.cpp index 1a1eaee321c7e..957473c2a91b8 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/floating_point.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/floating_point.pass.cpp @@ -33,9 +33,11 @@ void test_floating_point() test_floating_point_imp(); } -int main() +int main(int, char**) { test_floating_point(); test_floating_point(); test_floating_point(); + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/function.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/function.pass.cpp index 193cf688fe252..c27b1237ebf90 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/function.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/function.pass.cpp @@ -33,10 +33,12 @@ void test_function() test_function_imp(); } -int main() +int main(int, char**) { test_function(); test_function(); test_function(); test_function(); + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/integral.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/integral.pass.cpp index d349b75f7beb1..cac606a516e44 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/integral.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/integral.pass.cpp @@ -33,7 +33,7 @@ void test_integral() test_integral_imp(); } -int main() +int main(int, char**) { test_integral(); test_integral(); @@ -52,4 +52,6 @@ int main() test_integral<__int128_t>(); test_integral<__uint128_t>(); #endif + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/is_arithmetic.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/is_arithmetic.pass.cpp index ff0ff7a34c82e..683e885e288d8 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/is_arithmetic.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/is_arithmetic.pass.cpp @@ -72,7 +72,7 @@ enum Enum {zero, one}; typedef void (*FunctionPtr)(); -int main() +int main(int, char**) { test_is_arithmetic(); test_is_arithmetic(); @@ -103,4 +103,6 @@ int main() test_is_not_arithmetic(); test_is_not_arithmetic(); test_is_not_arithmetic(); + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/is_bounded_array.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/is_bounded_array.pass.cpp new file mode 100644 index 0000000000000..7a46b97fbd089 --- /dev/null +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/is_bounded_array.pass.cpp @@ -0,0 +1,71 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03, c++11, c++14, c++17 + +// type_traits + +// is_bounded_array +// T is an array type of known bound ([dcl.array]) + +#include + +template +void test_array_imp() +{ + static_assert( B == std::is_bounded_array::value, "" ); + static_assert( B == std::is_bounded_array_v, "" ); +} + +template +void test_array() +{ + test_array_imp(); + test_array_imp(); + test_array_imp(); + test_array_imp(); +} + +typedef char array[3]; +typedef char incomplete_array[]; + +class incomplete_type; + +class Empty {}; +union Union {}; + +class Abstract +{ + virtual ~Abstract() = 0; +}; + +enum Enum {zero, one}; +typedef void (*FunctionPtr)(); + +int main(int, char**) +{ +// Non-array types + test_array(); + test_array(); + test_array(); + test_array(); + test_array(); + test_array(); + test_array(); + test_array(); + test_array(); + test_array(); + test_array(); + test_array(); + +// Array types + test_array(); + test_array(); + test_array(); + + return 0; +} diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/is_compound.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/is_compound.pass.cpp index a0d03dd6e5106..4d789066d6e34 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/is_compound.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/is_compound.pass.cpp @@ -72,7 +72,7 @@ enum Enum {zero, one}; typedef void (*FunctionPtr)(); -int main() +int main(int, char**) { test_is_compound(); test_is_compound(); @@ -94,4 +94,6 @@ int main() test_is_not_compound(); test_is_not_compound(); test_is_not_compound(); + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/is_fundamental.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/is_fundamental.pass.cpp index 343b1291a0f20..b1a38360297d5 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/is_fundamental.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/is_fundamental.pass.cpp @@ -72,7 +72,7 @@ enum Enum {zero, one}; typedef void (*FunctionPtr)(); -int main() +int main(int, char**) { test_is_fundamental(); test_is_fundamental(); @@ -111,4 +111,6 @@ int main() test_is_not_fundamental(); test_is_not_fundamental(); test_is_not_fundamental(); + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/is_member_pointer.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/is_member_pointer.pass.cpp index e5486f73e9e7a..82f0ae9aa477a 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/is_member_pointer.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/is_member_pointer.pass.cpp @@ -72,7 +72,7 @@ enum Enum {zero, one}; typedef void (*FunctionPtr)(); -int main() +int main(int, char**) { // Arithmetic types (3.9.1), enumeration types, pointer types, pointer to member types (3.9.2), // std::nullptr_t, and cv-qualified versions of these types (3.9.3) @@ -101,4 +101,6 @@ int main() test_is_not_member_pointer(); test_is_not_member_pointer(); test_is_not_member_pointer(); + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/is_object.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/is_object.pass.cpp index 8ec4a6d0fd93b..8a6f6d84cfc5d 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/is_object.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/is_object.pass.cpp @@ -72,7 +72,7 @@ enum Enum {zero, one}; typedef void (*FunctionPtr)(); -int main() +int main(int, char**) { // An object type is a (possibly cv-qualified) type that is not a function type, // not a reference type, and not a void type. @@ -99,4 +99,6 @@ int main() test_is_not_object(); test_is_not_object(); test_is_not_object(); + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/is_reference.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/is_reference.pass.cpp index a511daf3522f9..bb8a2d62ca99a 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/is_reference.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/is_reference.pass.cpp @@ -72,7 +72,7 @@ enum Enum {zero, one}; typedef void (*FunctionPtr)(); -int main() +int main(int, char**) { test_is_reference(); #if TEST_STD_VER >= 11 @@ -100,4 +100,6 @@ int main() test_is_not_reference(); test_is_not_reference(); + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/is_scalar.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/is_scalar.pass.cpp index c20f1e8ef5a48..804c6848eab19 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/is_scalar.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/is_scalar.pass.cpp @@ -72,7 +72,7 @@ enum Enum {zero, one}; typedef void (*FunctionPtr)(); -int main() +int main(int, char**) { // Arithmetic types (3.9.1), enumeration types, pointer types, pointer to member types (3.9.2), // std::nullptr_t, and cv-qualified versions of these types (3.9.3) @@ -110,4 +110,6 @@ int main() test_is_not_scalar(); test_is_not_scalar(); test_is_not_scalar(); + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/is_unbounded_array.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/is_unbounded_array.pass.cpp new file mode 100644 index 0000000000000..3a561b0b01637 --- /dev/null +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/is_unbounded_array.pass.cpp @@ -0,0 +1,71 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03, c++11, c++14, c++17 + +// type_traits + +// is_unbounded_array +// T is an array type of unknown bound ([dcl.array]) + +#include + +template +void test_array_imp() +{ + static_assert( B == std::is_unbounded_array::value, "" ); + static_assert( B == std::is_unbounded_array_v, "" ); +} + +template +void test_array() +{ + test_array_imp(); + test_array_imp(); + test_array_imp(); + test_array_imp(); +} + +typedef char array[3]; +typedef char incomplete_array[]; + +class incomplete_type; + +class Empty {}; +union Union {}; + +class Abstract +{ + virtual ~Abstract() = 0; +}; + +enum Enum {zero, one}; +typedef void (*FunctionPtr)(); + +int main(int, char**) +{ +// Non-array types + test_array(); + test_array(); + test_array(); + test_array(); + test_array(); + test_array(); + test_array(); + test_array(); + test_array(); + test_array(); + test_array(); + test_array(); + +// Array types + test_array(); + test_array(); + test_array(); + + return 0; +} diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/lvalue_ref.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/lvalue_ref.pass.cpp index 0ce0423f646af..44027dadb2648 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/lvalue_ref.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/lvalue_ref.pass.cpp @@ -24,8 +24,10 @@ void test_lvalue_ref() static_assert(!std::is_member_pointer::value, ""); } -int main() +int main(int, char**) { test_lvalue_ref(); test_lvalue_ref(); + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/member_function_pointer.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/member_function_pointer.pass.cpp index cc75ef9666adc..fda2e81818a24 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/member_function_pointer.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/member_function_pointer.pass.cpp @@ -37,9 +37,11 @@ class Class { }; -int main() +int main(int, char**) { test_member_function_pointer(); test_member_function_pointer(); test_member_function_pointer(); + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/member_object_pointer.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/member_object_pointer.pass.cpp index ea130274211f0..3e8117b6a01a4 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/member_object_pointer.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/member_object_pointer.pass.cpp @@ -37,7 +37,9 @@ class Class { }; -int main() +int main(int, char**) { test_member_object_pointer(); + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/pointer.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/pointer.pass.cpp index 61ae96e5b35f7..f5677b95b679d 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/pointer.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/pointer.pass.cpp @@ -33,10 +33,12 @@ void test_pointer() test_pointer_imp(); } -int main() +int main(int, char**) { test_pointer(); test_pointer(); test_pointer(); test_pointer(); + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/rvalue_ref.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/rvalue_ref.pass.cpp index 63180a00807dc..341b9462692a0 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/rvalue_ref.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/rvalue_ref.pass.cpp @@ -26,8 +26,10 @@ void test_rvalue_ref() static_assert(!std::is_member_pointer::value, ""); } -int main() +int main(int, char**) { test_rvalue_ref(); test_rvalue_ref(); + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/union.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/union.pass.cpp index d30354d1a258a..fb48a70f35fd2 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/union.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/union.pass.cpp @@ -39,7 +39,9 @@ union Union double __; }; -int main() +int main(int, char**) { test_union(); + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/void.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/void.pass.cpp index 3559d7b831167..657f72774f49b 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/void.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/void.pass.cpp @@ -33,7 +33,9 @@ void test_void() test_void_imp(); } -int main() +int main(int, char**) { test_void(); + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/has_unique_object_representations.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/has_unique_object_representations.pass.cpp index d778526b540ef..e6f70123b2c97 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/has_unique_object_representations.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/has_unique_object_representations.pass.cpp @@ -80,7 +80,7 @@ struct B }; -int main() +int main(int, char**) { test_has_not_has_unique_object_representations(); test_has_not_has_unique_object_representations(); @@ -102,4 +102,6 @@ int main() test_has_unique_object_representations(); test_has_unique_object_representations(); + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/has_virtual_destructor.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/has_virtual_destructor.pass.cpp index 9ee9bf163bae9..57c1027c3ba52 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/has_virtual_destructor.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/has_virtual_destructor.pass.cpp @@ -70,7 +70,7 @@ struct A ~A(); }; -int main() +int main(int, char**) { test_has_not_virtual_destructor(); test_has_not_virtual_destructor(); @@ -87,4 +87,6 @@ int main() test_has_virtual_destructor(); test_has_virtual_destructor(); + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_abstract.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_abstract.pass.cpp index cbc0317900d86..ee6a12e4bd87e 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_abstract.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_abstract.pass.cpp @@ -72,7 +72,7 @@ struct AbstractTemplate { template <> struct AbstractTemplate {}; -int main() +int main(int, char**) { test_is_not_abstract(); test_is_not_abstract(); @@ -90,4 +90,6 @@ int main() test_is_abstract(); test_is_abstract >(); test_is_not_abstract >(); + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_aggregate.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_aggregate.pass.cpp index a8f19fd100eea..843231f46053f 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_aggregate.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_aggregate.pass.cpp @@ -56,7 +56,7 @@ struct HasPriv { struct Union { int x; void* y; }; -int main () +int main(int, char**) { { test_false(); @@ -75,4 +75,6 @@ int main () test_true(); test_true(); } + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_assignable.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_assignable.pass.cpp index eb98ddb547b5e..8e5e2cc6e0477 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_assignable.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_assignable.pass.cpp @@ -58,7 +58,7 @@ struct E template struct X { T t; }; -int main() +int main(int, char**) { test_is_assignable (); test_is_assignable (); @@ -79,4 +79,6 @@ int main() // pointer to incomplete template type test_is_assignable*&, X*> (); + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_const.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_const.pass.cpp index fdbdfbd596c5a..0af73cf7e0c7a 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_const.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_const.pass.cpp @@ -30,7 +30,7 @@ void test_is_const() struct A; // incomplete -int main() +int main(int, char**) { test_is_const(); test_is_const(); @@ -44,4 +44,6 @@ int main() static_assert(!std::is_const::value, ""); static_assert(!std::is_const::value, ""); + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_constructible.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_constructible.pass.cpp index f78319aff8d06..a5b723c0e5970 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_constructible.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_constructible.pass.cpp @@ -147,7 +147,7 @@ static constexpr bool clang_disallows_valid_static_cast_bug = #endif -int main() +int main(int, char**) { typedef Base B; typedef Derived D; @@ -301,4 +301,6 @@ int main() test_is_not_constructible (); #endif #endif // TEST_STD_VER >= 11 + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_copy_assignable.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_copy_assignable.pass.cpp index 24719bfb89bc6..3f10907a4aaca 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_copy_assignable.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_copy_assignable.pass.cpp @@ -63,7 +63,7 @@ struct C void operator=(C&); // not const }; -int main() +int main(int, char**) { test_is_copy_assignable (); test_is_copy_assignable (); @@ -81,4 +81,6 @@ int main() #endif test_is_not_copy_assignable (); test_is_not_copy_assignable (); + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_copy_constructible.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_copy_constructible.pass.cpp index 457270a89259a..f64c40e862b0b 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_copy_constructible.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_copy_constructible.pass.cpp @@ -70,7 +70,7 @@ struct C void operator=(C&); // not const }; -int main() +int main(int, char**) { test_is_copy_constructible(); test_is_copy_constructible(); @@ -91,4 +91,6 @@ int main() #if TEST_STD_VER >= 11 test_is_not_copy_constructible(); #endif + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_default_constructible.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_default_constructible.pass.cpp index aef79f7fab9db..ce2ec95618e5f 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_default_constructible.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_default_constructible.pass.cpp @@ -81,7 +81,7 @@ class B B(); }; -int main() +int main(int, char**) { test_is_default_constructible(); test_is_default_constructible(); @@ -122,4 +122,6 @@ int main() test_is_not_default_constructible (); #endif #endif + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_destructible.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_destructible.pass.cpp index 8722b78fe436b..1a32efa427209 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_destructible.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_destructible.pass.cpp @@ -97,7 +97,7 @@ struct DeletedVirtualPrivateDestructor { private: virtual ~DeletedVirtualPri #endif -int main() +int main(int, char**) { test_is_destructible(); test_is_destructible(); @@ -142,4 +142,6 @@ int main() test_is_not_destructible(); #endif + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_empty.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_empty.pass.cpp index 6dafb55a3871e..850af8b7a75a0 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_empty.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_empty.pass.cpp @@ -78,7 +78,7 @@ struct bit_one int : 1; }; -int main() +int main(int, char**) { test_is_not_empty(); test_is_not_empty(); @@ -100,4 +100,6 @@ int main() test_is_empty(); test_is_empty(); test_is_empty(); + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_final.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_final.pass.cpp index 61aed970ec3eb..4cded0f928e81 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_final.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_final.pass.cpp @@ -48,7 +48,7 @@ void test_is_not_final() #endif } -int main () +int main(int, char**) { test_is_not_final(); test_is_not_final(); @@ -58,4 +58,6 @@ int main () test_is_not_final(); test_is_final (); test_is_not_final(); + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_literal_type.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_literal_type.pass.cpp index 80bb49509b953..b86ff5a854656 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_literal_type.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_literal_type.pass.cpp @@ -69,7 +69,7 @@ enum Enum {zero, one}; typedef void (*FunctionPtr)(); -int main() +int main(int, char**) { #if TEST_STD_VER >= 11 test_is_literal_type(); @@ -101,4 +101,6 @@ int main() test_is_not_literal_type(); test_is_not_literal_type(); + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_move_assignable.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_move_assignable.pass.cpp index edf825dd716ac..5a330c6d34b77 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_move_assignable.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_move_assignable.pass.cpp @@ -53,7 +53,7 @@ struct A A(); }; -int main() +int main(int, char**) { test_is_move_assignable (); test_is_move_assignable (); @@ -68,4 +68,6 @@ int main() test_is_not_move_assignable (); #endif test_is_not_move_assignable (); + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_move_constructible.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_move_constructible.pass.cpp index 3052d3925d7a5..06ca5c4630c60 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_move_constructible.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_move_constructible.pass.cpp @@ -66,7 +66,7 @@ struct B #endif }; -int main() +int main(int, char**) { test_is_not_move_constructible(); test_is_not_move_constructible(); @@ -84,4 +84,6 @@ int main() test_is_move_constructible(); test_is_move_constructible(); test_is_move_constructible(); + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_assignable.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_assignable.pass.cpp index c0a22e3b7a02a..be1f016a4eb39 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_assignable.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_assignable.pass.cpp @@ -45,7 +45,7 @@ struct C void operator=(C&); // not const }; -int main() +int main(int, char**) { test_is_nothrow_assignable (); test_is_nothrow_assignable (); @@ -58,4 +58,6 @@ int main() test_is_not_nothrow_assignable (); test_is_not_nothrow_assignable (); test_is_not_nothrow_assignable (); + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_constructible.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_constructible.pass.cpp index e9c256acaff37..0d171261a5973 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_constructible.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_constructible.pass.cpp @@ -97,7 +97,7 @@ struct Tuple { }; #endif -int main() +int main(int, char**) { test_is_nothrow_constructible (); test_is_nothrow_constructible (); @@ -114,4 +114,6 @@ int main() static_assert(!std::is_constructible::value, ""); test_is_not_nothrow_constructible (); // See bug #19616. #endif + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_copy_assignable.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_copy_assignable.pass.cpp index a3d2611c93aeb..64895adf45c46 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_copy_assignable.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_copy_assignable.pass.cpp @@ -52,7 +52,7 @@ struct A A& operator=(const A&); }; -int main() +int main(int, char**) { test_has_nothrow_assign(); test_has_nothrow_assign(); @@ -68,4 +68,6 @@ int main() test_has_not_nothrow_assign(); test_has_not_nothrow_assign(); + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_copy_constructible.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_copy_constructible.pass.cpp index 4caaeca259d81..6b1708839ae2e 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_copy_constructible.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_copy_constructible.pass.cpp @@ -55,7 +55,7 @@ struct A A(const A&); }; -int main() +int main(int, char**) { test_has_not_nothrow_copy_constructor(); test_has_not_nothrow_copy_constructor(); @@ -68,4 +68,6 @@ int main() test_is_nothrow_copy_constructible(); test_is_nothrow_copy_constructible(); test_is_nothrow_copy_constructible(); + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_default_constructible.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_default_constructible.pass.cpp index 6e443b303cee2..c30facc516ba7 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_default_constructible.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_default_constructible.pass.cpp @@ -67,7 +67,7 @@ struct DThrows }; #endif -int main() +int main(int, char**) { test_has_not_nothrow_default_constructor(); test_has_not_nothrow_default_constructor(); @@ -84,4 +84,6 @@ int main() test_is_nothrow_default_constructible(); test_is_nothrow_default_constructible(); test_is_nothrow_default_constructible(); + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_destructible.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_destructible.pass.cpp index f58a93ce28ac4..817d696d11fd8 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_destructible.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_destructible.pass.cpp @@ -79,7 +79,7 @@ class Abstract }; -int main() +int main(int, char**) { test_is_not_nothrow_destructible(); test_is_not_nothrow_destructible(); @@ -110,4 +110,6 @@ int main() test_is_not_nothrow_destructible(); test_is_not_nothrow_destructible(); #endif + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_move_assignable.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_move_assignable.pass.cpp index cb446ef0123e8..4bcbabbcc4add 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_move_assignable.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_move_assignable.pass.cpp @@ -52,7 +52,7 @@ struct A A& operator=(const A&); }; -int main() +int main(int, char**) { test_has_nothrow_assign(); test_has_nothrow_assign(); @@ -66,4 +66,6 @@ int main() test_has_not_nothrow_assign(); test_has_not_nothrow_assign(); + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_move_constructible.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_move_constructible.pass.cpp index ce002e8204c60..ab9e0c6bb4fae 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_move_constructible.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_move_constructible.pass.cpp @@ -55,7 +55,7 @@ struct A A(const A&); }; -int main() +int main(int, char**) { test_has_not_nothrow_move_constructor(); test_has_not_nothrow_move_constructor(); @@ -68,4 +68,6 @@ int main() test_is_nothrow_move_constructible(); test_is_nothrow_move_constructible(); test_is_nothrow_move_constructible(); + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_swappable.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_swappable.pass.cpp index c90f938c5dcf4..f554199c6060b 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_swappable.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_swappable.pass.cpp @@ -46,7 +46,7 @@ struct ThrowingMove { } // namespace MyNS -int main() +int main(int, char**) { using namespace MyNS; { @@ -79,4 +79,6 @@ int main() static_assert(std::is_nothrow_swappable_v, ""); static_assert(!std::is_nothrow_swappable_v, ""); } + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_swappable_with.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_swappable_with.pass.cpp index 2121f75b092d8..fb4beac17c9ac 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_swappable_with.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_swappable_with.pass.cpp @@ -45,7 +45,7 @@ void swap(M&&, M&&) noexcept {} } // namespace MyNS -int main() +int main(int, char**) { using namespace MyNS; { @@ -77,4 +77,6 @@ int main() static_assert(std::is_nothrow_swappable_with_v, ""); static_assert(!std::is_nothrow_swappable_with_v, ""); } + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_pod.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_pod.pass.cpp index f0dac244c9bc6..87fe6ebbee883 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_pod.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_pod.pass.cpp @@ -49,7 +49,7 @@ class Class ~Class(); }; -int main() +int main(int, char**) { test_is_not_pod(); test_is_not_pod(); @@ -61,4 +61,6 @@ int main() test_is_pod(); test_is_pod(); test_is_pod(); + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_polymorphic.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_polymorphic.pass.cpp index feb8f270e5241..8829fea6bd73a 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_polymorphic.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_polymorphic.pass.cpp @@ -72,7 +72,7 @@ class Final { }; #endif -int main() +int main(int, char**) { test_is_not_polymorphic(); test_is_not_polymorphic(); @@ -91,4 +91,6 @@ int main() test_is_polymorphic(); test_is_polymorphic(); + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_signed.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_signed.pass.cpp index 5e9042c797e30..4936cc788e250 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_signed.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_signed.pass.cpp @@ -51,7 +51,7 @@ class Class struct A; // incomplete -int main() +int main(int, char**) { test_is_not_signed(); test_is_not_signed(); @@ -71,4 +71,6 @@ int main() test_is_signed<__int128_t>(); test_is_not_signed<__uint128_t>(); #endif + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_standard_layout.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_standard_layout.pass.cpp index 10f23cca988d5..fb096c89ad06b 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_standard_layout.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_standard_layout.pass.cpp @@ -50,11 +50,13 @@ struct pair T2 second; }; -int main() +int main(int, char**) { test_is_standard_layout (); test_is_standard_layout (); test_is_standard_layout > (); test_is_not_standard_layout (); + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_swappable.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_swappable.pass.cpp index 3e0980bd5cf21..5768a954d64ff 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_swappable.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_swappable.pass.cpp @@ -63,7 +63,7 @@ void swap(T&, T&) {} } // end namespace MyNS2 -int main() +int main(int, char**) { using namespace MyNS; { @@ -94,4 +94,6 @@ int main() static_assert(std::is_swappable_v, ""); static_assert(!std::is_swappable_v, ""); } + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_swappable_include_order.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_swappable_include_order.pass.cpp index 5d21f3699b33d..5931e7ce7f30f 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_swappable_include_order.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_swappable_include_order.pass.cpp @@ -23,7 +23,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { // Use a builtin type so we don't get ADL lookup. typedef double T[17][29]; @@ -39,4 +39,6 @@ int main() std::iter_swap(t1, t2); std::swap_ranges(t1, t1 + 17, t2); } + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_swappable_with.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_swappable_with.pass.cpp index f11f93338602d..cd65d14efc0d5 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_swappable_with.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_swappable_with.pass.cpp @@ -45,7 +45,7 @@ void swap(M&&, M&&) {} } // namespace MyNS -int main() +int main(int, char**) { using namespace MyNS; { @@ -74,4 +74,6 @@ int main() static_assert(std::is_swappable_with_v, ""); static_assert(!std::is_swappable_with_v, ""); } + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivial.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivial.pass.cpp index 4350f12997f7a..8bb1b7c9b09dd 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivial.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivial.pass.cpp @@ -51,7 +51,7 @@ class B B(); }; -int main() +int main(int, char**) { test_is_trivial (); test_is_trivial (); @@ -59,4 +59,6 @@ int main() test_is_not_trivial (); test_is_not_trivial (); test_is_not_trivial (); + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_assignable.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_assignable.pass.cpp index a85f57a5e0049..124480c075551 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_assignable.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_assignable.pass.cpp @@ -47,7 +47,7 @@ struct C void operator=(C&); // not const }; -int main() +int main(int, char**) { test_is_trivially_assignable (); test_is_trivially_assignable (); @@ -58,4 +58,6 @@ int main() test_is_not_trivially_assignable (); test_is_not_trivially_assignable (); test_is_not_trivially_assignable (); + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_constructible.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_constructible.pass.cpp index 78ae8cfa99f9a..42d54bd7e25a1 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_constructible.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_constructible.pass.cpp @@ -65,7 +65,7 @@ struct A A(int, double); }; -int main() +int main(int, char**) { test_is_trivially_constructible (); test_is_trivially_constructible (); @@ -73,4 +73,6 @@ int main() test_is_not_trivially_constructible (); test_is_not_trivially_constructible (); test_is_not_trivially_constructible (); + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_copy_assignable.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_copy_assignable.pass.cpp index 853c8aa32b5d6..91fbf69f4f29f 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_copy_assignable.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_copy_assignable.pass.cpp @@ -59,7 +59,7 @@ struct A A& operator=(const A&); }; -int main() +int main(int, char**) { test_has_trivially_copy_assignable(); test_has_trivially_copy_assignable(); @@ -76,4 +76,6 @@ int main() test_has_not_trivially_copy_assignable(); test_has_not_trivially_copy_assignable(); + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_copy_constructible.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_copy_constructible.pass.cpp index decd7ffeafa9d..5744d2ca0e8ff 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_copy_constructible.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_copy_constructible.pass.cpp @@ -65,7 +65,7 @@ struct A A(const A&); }; -int main() +int main(int, char**) { test_has_not_trivial_copy_constructor(); test_has_not_trivial_copy_constructor(); @@ -80,4 +80,6 @@ int main() test_is_trivially_copy_constructible(); test_is_trivially_copy_constructible(); test_is_trivially_copy_constructible(); + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_copyable.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_copyable.pass.cpp index 073ea681d6ec0..51ac0803e66e7 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_copyable.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_copyable.pass.cpp @@ -65,7 +65,7 @@ class C C(); }; -int main() +int main(int, char**) { test_is_trivially_copyable (); test_is_trivially_copyable (); @@ -76,4 +76,6 @@ int main() test_is_not_trivially_copyable (); test_is_not_trivially_copyable (); test_is_not_trivially_copyable (); + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_default_constructible.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_default_constructible.pass.cpp index 2f70ba606a294..03ac030a3d7b4 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_default_constructible.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_default_constructible.pass.cpp @@ -69,7 +69,7 @@ struct A A(); }; -int main() +int main(int, char**) { test_has_not_trivial_default_constructor(); test_has_not_trivial_default_constructor(); @@ -85,4 +85,6 @@ int main() test_is_trivially_default_constructible(); test_is_trivially_default_constructible(); test_is_trivially_default_constructible(); + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_destructible.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_destructible.pass.cpp index 37ea513fcf2a8..e79e4926b0d3b 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_destructible.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_destructible.pass.cpp @@ -87,7 +87,7 @@ struct A ~A(); }; -int main() +int main(int, char**) { test_is_not_trivially_destructible(); test_is_not_trivially_destructible(); @@ -115,4 +115,6 @@ int main() test_is_not_trivially_destructible(); test_is_not_trivially_destructible(); #endif + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_move_assignable.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_move_assignable.pass.cpp index c4aa7b7dced96..0a91efdf089e1 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_move_assignable.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_move_assignable.pass.cpp @@ -59,7 +59,7 @@ struct A A& operator=(const A&); }; -int main() +int main(int, char**) { test_has_trivial_assign(); test_has_trivial_assign(); @@ -76,4 +76,6 @@ int main() test_has_not_trivial_assign(); test_has_not_trivial_assign(); + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_move_constructible.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_move_constructible.pass.cpp index 6f47ed6fd4d4d..78c10a1320a32 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_move_constructible.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_move_constructible.pass.cpp @@ -75,7 +75,7 @@ struct MoveOnly2 #endif -int main() +int main(int, char**) { test_has_not_trivial_move_constructor(); test_has_not_trivial_move_constructor(); @@ -94,4 +94,6 @@ int main() static_assert(!std::is_trivially_move_constructible::value, ""); static_assert( std::is_trivially_move_constructible::value, ""); #endif + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_unsigned.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_unsigned.pass.cpp index 86e5611c7b235..bc70a43b9bd50 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_unsigned.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_unsigned.pass.cpp @@ -51,7 +51,7 @@ class Class struct A; // incomplete -int main() +int main(int, char**) { test_is_not_unsigned(); test_is_not_unsigned(); @@ -71,4 +71,6 @@ int main() test_is_unsigned<__uint128_t>(); test_is_not_unsigned<__int128_t>(); #endif + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_volatile.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_volatile.pass.cpp index 28cb29f3bd963..cb0fc3c6ea8a2 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_volatile.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_volatile.pass.cpp @@ -30,7 +30,7 @@ void test_is_volatile() struct A; // incomplete -int main() +int main(int, char**) { test_is_volatile(); test_is_volatile(); @@ -44,4 +44,6 @@ int main() static_assert(!std::is_volatile::value, ""); static_assert(!std::is_volatile::value, ""); + + return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.unary/nothing_to_do.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/nothing_to_do.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/utilities/nothing_to_do.pass.cpp b/libcxx/test/std/utilities/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/utilities/nothing_to_do.pass.cpp +++ b/libcxx/test/std/utilities/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/utilities/optional/optional.bad_optional_access/default.pass.cpp b/libcxx/test/std/utilities/optional/optional.bad_optional_access/default.pass.cpp index cfae639636acf..6f119b274231b 100644 --- a/libcxx/test/std/utilities/optional/optional.bad_optional_access/default.pass.cpp +++ b/libcxx/test/std/utilities/optional/optional.bad_optional_access/default.pass.cpp @@ -8,13 +8,7 @@ // UNSUPPORTED: c++98, c++03, c++11, c++14 -// XFAIL: availability=macosx10.13 -// XFAIL: availability=macosx10.12 -// XFAIL: availability=macosx10.11 -// XFAIL: availability=macosx10.10 -// XFAIL: availability=macosx10.9 -// XFAIL: availability=macosx10.7 -// XFAIL: availability=macosx10.8 +// XFAIL: dylib-has-no-bad_optional_access // @@ -23,8 +17,10 @@ #include #include -int main() +int main(int, char**) { using std::bad_optional_access; bad_optional_access ex; + + return 0; } diff --git a/libcxx/test/std/utilities/optional/optional.bad_optional_access/derive.pass.cpp b/libcxx/test/std/utilities/optional/optional.bad_optional_access/derive.pass.cpp index 80f2372e45692..975d8678b89ce 100644 --- a/libcxx/test/std/utilities/optional/optional.bad_optional_access/derive.pass.cpp +++ b/libcxx/test/std/utilities/optional/optional.bad_optional_access/derive.pass.cpp @@ -7,14 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++98, c++03, c++11, c++14 - -// XFAIL: availability=macosx10.13 -// XFAIL: availability=macosx10.12 -// XFAIL: availability=macosx10.11 -// XFAIL: availability=macosx10.10 -// XFAIL: availability=macosx10.9 -// XFAIL: availability=macosx10.8 -// XFAIL: availability=macosx10.7 +// XFAIL: dylib-has-no-bad_optional_access // @@ -23,10 +16,12 @@ #include #include -int main() +int main(int, char**) { using std::bad_optional_access; static_assert(std::is_base_of::value, ""); static_assert(std::is_convertible::value, ""); + + return 0; } diff --git a/libcxx/test/std/utilities/optional/optional.comp_with_t/equal.pass.cpp b/libcxx/test/std/utilities/optional/optional.comp_with_t/equal.pass.cpp index dbf8a0564b50f..4f7aedbcb0f06 100644 --- a/libcxx/test/std/utilities/optional/optional.comp_with_t/equal.pass.cpp +++ b/libcxx/test/std/utilities/optional/optional.comp_with_t/equal.pass.cpp @@ -26,7 +26,7 @@ constexpr bool operator==(const X& lhs, const X& rhs) { return lhs.i_ == rhs.i_; } -int main() { +int main(int, char**) { { typedef X T; typedef optional O; @@ -60,4 +60,6 @@ int main() { static_assert(o1 == 42, ""); static_assert(!(101 == o1), ""); } + + return 0; } diff --git a/libcxx/test/std/utilities/optional/optional.comp_with_t/greater.pass.cpp b/libcxx/test/std/utilities/optional/optional.comp_with_t/greater.pass.cpp index 539e35fe0651a..373634f68c2dc 100644 --- a/libcxx/test/std/utilities/optional/optional.comp_with_t/greater.pass.cpp +++ b/libcxx/test/std/utilities/optional/optional.comp_with_t/greater.pass.cpp @@ -24,7 +24,7 @@ struct X { constexpr bool operator>(const X& lhs, const X& rhs) { return lhs.i_ > rhs.i_; } -int main() { +int main(int, char**) { { typedef X T; typedef optional O; @@ -60,4 +60,6 @@ int main() { static_assert(o1 > 11, ""); static_assert(!(42 > o1), ""); } + + return 0; } diff --git a/libcxx/test/std/utilities/optional/optional.comp_with_t/greater_equal.pass.cpp b/libcxx/test/std/utilities/optional/optional.comp_with_t/greater_equal.pass.cpp index c7bbbda8580f1..5d4839734bb90 100644 --- a/libcxx/test/std/utilities/optional/optional.comp_with_t/greater_equal.pass.cpp +++ b/libcxx/test/std/utilities/optional/optional.comp_with_t/greater_equal.pass.cpp @@ -26,7 +26,7 @@ constexpr bool operator>=(const X& lhs, const X& rhs) { return lhs.i_ >= rhs.i_; } -int main() { +int main(int, char**) { { typedef X T; typedef optional O; @@ -62,4 +62,6 @@ int main() { static_assert(o1 >= 42, ""); static_assert(!(11 >= o1), ""); } + + return 0; } diff --git a/libcxx/test/std/utilities/optional/optional.comp_with_t/less_equal.pass.cpp b/libcxx/test/std/utilities/optional/optional.comp_with_t/less_equal.pass.cpp index 73ed8564340d5..a601939c5b39d 100644 --- a/libcxx/test/std/utilities/optional/optional.comp_with_t/less_equal.pass.cpp +++ b/libcxx/test/std/utilities/optional/optional.comp_with_t/less_equal.pass.cpp @@ -26,7 +26,7 @@ constexpr bool operator<=(const X& lhs, const X& rhs) { return lhs.i_ <= rhs.i_; } -int main() { +int main(int, char**) { { typedef X T; typedef optional O; @@ -62,4 +62,6 @@ int main() { static_assert(o1 <= 42, ""); static_assert(!(101 <= o1), ""); } + + return 0; } diff --git a/libcxx/test/std/utilities/optional/optional.comp_with_t/less_than.pass.cpp b/libcxx/test/std/utilities/optional/optional.comp_with_t/less_than.pass.cpp index c0c111afdca51..7320955908a4d 100644 --- a/libcxx/test/std/utilities/optional/optional.comp_with_t/less_than.pass.cpp +++ b/libcxx/test/std/utilities/optional/optional.comp_with_t/less_than.pass.cpp @@ -24,7 +24,7 @@ struct X { constexpr bool operator<(const X& lhs, const X& rhs) { return lhs.i_ < rhs.i_; } -int main() { +int main(int, char**) { { typedef X T; typedef optional O; @@ -60,4 +60,6 @@ int main() { static_assert(o1 < 101, ""); static_assert(!(42 < o1), ""); } + + return 0; } diff --git a/libcxx/test/std/utilities/optional/optional.comp_with_t/not_equal.pass.cpp b/libcxx/test/std/utilities/optional/optional.comp_with_t/not_equal.pass.cpp index 949a03a8c5b49..0d14f1e97a952 100644 --- a/libcxx/test/std/utilities/optional/optional.comp_with_t/not_equal.pass.cpp +++ b/libcxx/test/std/utilities/optional/optional.comp_with_t/not_equal.pass.cpp @@ -26,7 +26,7 @@ constexpr bool operator!=(const X& lhs, const X& rhs) { return lhs.i_ != rhs.i_; } -int main() { +int main(int, char**) { { typedef X T; typedef optional O; @@ -60,4 +60,6 @@ int main() { static_assert(o1 != 101, ""); static_assert(!(42 != o1), ""); } + + return 0; } diff --git a/libcxx/test/std/utilities/optional/optional.hash/enabled_hash.pass.cpp b/libcxx/test/std/utilities/optional/optional.hash/enabled_hash.pass.cpp index a842804f374eb..66ab089dc3077 100644 --- a/libcxx/test/std/utilities/optional/optional.hash/enabled_hash.pass.cpp +++ b/libcxx/test/std/utilities/optional/optional.hash/enabled_hash.pass.cpp @@ -17,9 +17,11 @@ #include "poisoned_hash_helper.hpp" -int main() { +int main(int, char**) { test_library_hash_specializations_available(); { } + + return 0; } diff --git a/libcxx/test/std/utilities/optional/optional.hash/hash.pass.cpp b/libcxx/test/std/utilities/optional/optional.hash/hash.pass.cpp index 0f74557b73009..aa89a51d8d402 100644 --- a/libcxx/test/std/utilities/optional/optional.hash/hash.pass.cpp +++ b/libcxx/test/std/utilities/optional/optional.hash/hash.pass.cpp @@ -30,7 +30,7 @@ struct hash { } -int main() +int main(int, char**) { using std::optional; const std::size_t nullopt_hash = @@ -76,4 +76,6 @@ int main() test_hash_enabled_for_type>(); test_hash_enabled_for_type>(); } + + return 0; } diff --git a/libcxx/test/std/utilities/optional/optional.nullops/equal.pass.cpp b/libcxx/test/std/utilities/optional/optional.nullops/equal.pass.cpp index 05413c1f14dd4..5894462205abc 100644 --- a/libcxx/test/std/utilities/optional/optional.nullops/equal.pass.cpp +++ b/libcxx/test/std/utilities/optional/optional.nullops/equal.pass.cpp @@ -14,7 +14,7 @@ #include -int main() +int main(int, char**) { using std::optional; using std::nullopt_t; @@ -35,4 +35,6 @@ int main() static_assert (noexcept(nullopt == o1), ""); static_assert (noexcept(o1 == nullopt), ""); } + + return 0; } diff --git a/libcxx/test/std/utilities/optional/optional.nullops/greater.pass.cpp b/libcxx/test/std/utilities/optional/optional.nullops/greater.pass.cpp index 7bc764d01b8fe..59dc62fce17d5 100644 --- a/libcxx/test/std/utilities/optional/optional.nullops/greater.pass.cpp +++ b/libcxx/test/std/utilities/optional/optional.nullops/greater.pass.cpp @@ -14,7 +14,7 @@ #include -int main() +int main(int, char**) { using std::optional; using std::nullopt_t; @@ -35,4 +35,6 @@ int main() static_assert (noexcept(nullopt > o1), ""); static_assert (noexcept(o1 > nullopt), ""); } + + return 0; } diff --git a/libcxx/test/std/utilities/optional/optional.nullops/greater_equal.pass.cpp b/libcxx/test/std/utilities/optional/optional.nullops/greater_equal.pass.cpp index 7c77a95a15037..e23e8794f441d 100644 --- a/libcxx/test/std/utilities/optional/optional.nullops/greater_equal.pass.cpp +++ b/libcxx/test/std/utilities/optional/optional.nullops/greater_equal.pass.cpp @@ -14,7 +14,7 @@ #include -int main() +int main(int, char**) { using std::optional; using std::nullopt_t; @@ -35,4 +35,6 @@ int main() static_assert (noexcept(nullopt >= o1), ""); static_assert (noexcept(o1 >= nullopt), ""); } + + return 0; } diff --git a/libcxx/test/std/utilities/optional/optional.nullops/less_equal.pass.cpp b/libcxx/test/std/utilities/optional/optional.nullops/less_equal.pass.cpp index 1d3994e4a508b..96f0754e40b3b 100644 --- a/libcxx/test/std/utilities/optional/optional.nullops/less_equal.pass.cpp +++ b/libcxx/test/std/utilities/optional/optional.nullops/less_equal.pass.cpp @@ -15,7 +15,7 @@ #include -int main() +int main(int, char**) { using std::optional; using std::nullopt_t; @@ -36,4 +36,6 @@ int main() static_assert (noexcept(nullopt <= o1), ""); static_assert (noexcept(o1 <= nullopt), ""); } + + return 0; } diff --git a/libcxx/test/std/utilities/optional/optional.nullops/less_than.pass.cpp b/libcxx/test/std/utilities/optional/optional.nullops/less_than.pass.cpp index 3b313c946d78b..872f3159a92fe 100644 --- a/libcxx/test/std/utilities/optional/optional.nullops/less_than.pass.cpp +++ b/libcxx/test/std/utilities/optional/optional.nullops/less_than.pass.cpp @@ -14,7 +14,7 @@ #include -int main() +int main(int, char**) { using std::optional; using std::nullopt_t; @@ -35,4 +35,6 @@ int main() static_assert (noexcept(nullopt < o1), ""); static_assert (noexcept(o1 < nullopt), ""); } + + return 0; } diff --git a/libcxx/test/std/utilities/optional/optional.nullops/not_equal.pass.cpp b/libcxx/test/std/utilities/optional/optional.nullops/not_equal.pass.cpp index 9b3c41c1c48eb..7eea0fa8856eb 100644 --- a/libcxx/test/std/utilities/optional/optional.nullops/not_equal.pass.cpp +++ b/libcxx/test/std/utilities/optional/optional.nullops/not_equal.pass.cpp @@ -14,7 +14,7 @@ #include -int main() +int main(int, char**) { using std::optional; using std::nullopt_t; @@ -35,4 +35,6 @@ int main() static_assert (noexcept(nullopt != o1), ""); static_assert (noexcept(o1 != nullopt), ""); } + + return 0; } diff --git a/libcxx/test/std/utilities/optional/optional.nullopt/nullopt_t.fail.cpp b/libcxx/test/std/utilities/optional/optional.nullopt/nullopt_t.fail.cpp index 9cbbc8bd9728b..2a7822ebb637d 100644 --- a/libcxx/test/std/utilities/optional/optional.nullopt/nullopt_t.fail.cpp +++ b/libcxx/test/std/utilities/optional/optional.nullopt/nullopt_t.fail.cpp @@ -18,7 +18,9 @@ #include -int main() +int main(int, char**) { std::nullopt_t n = {}; + + return 0; } diff --git a/libcxx/test/std/utilities/optional/optional.nullopt/nullopt_t.pass.cpp b/libcxx/test/std/utilities/optional/optional.nullopt/nullopt_t.pass.cpp index f664433cb42d4..c9d843e9c2af6 100644 --- a/libcxx/test/std/utilities/optional/optional.nullopt/nullopt_t.pass.cpp +++ b/libcxx/test/std/utilities/optional/optional.nullopt/nullopt_t.pass.cpp @@ -29,11 +29,13 @@ constexpr bool test() return true; } -int main() +int main(int, char**) { static_assert(std::is_empty_v); static_assert(!std::is_default_constructible_v); static_assert(std::is_same_v); static_assert(test()); + + return 0; } diff --git a/libcxx/test/std/utilities/optional/optional.object/optional.object.assign/assign_value.pass.cpp b/libcxx/test/std/utilities/optional/optional.object/optional.object.assign/assign_value.pass.cpp index e40af08233a61..8d2a8a00c943c 100644 --- a/libcxx/test/std/utilities/optional/optional.object/optional.object.assign/assign_value.pass.cpp +++ b/libcxx/test/std/utilities/optional/optional.object/optional.object.assign/assign_value.pass.cpp @@ -241,7 +241,7 @@ enum MyEnum { Zero, One, Two, Three, FortyTwo = 42 }; using Fn = void(*)(); -int main() +int main(int, char**) { test_sfinae(); // Test with instrumented type @@ -268,4 +268,6 @@ int main() assert(**opt == 3); } test_throws(); + + return 0; } diff --git a/libcxx/test/std/utilities/optional/optional.object/optional.object.assign/const_optional_U.pass.cpp b/libcxx/test/std/utilities/optional/optional.object/optional.object.assign/const_optional_U.pass.cpp index a9a1c07d898aa..6ccaafa6d6f28 100644 --- a/libcxx/test/std/utilities/optional/optional.object/optional.object.assign/const_optional_U.pass.cpp +++ b/libcxx/test/std/utilities/optional/optional.object/optional.object.assign/const_optional_U.pass.cpp @@ -196,7 +196,7 @@ void test_ambigious_assign() { } -int main() +int main(int, char**) { test_with_test_type(); test_ambigious_assign(); @@ -250,4 +250,6 @@ int main() } } #endif + + return 0; } diff --git a/libcxx/test/std/utilities/optional/optional.object/optional.object.assign/copy.pass.cpp b/libcxx/test/std/utilities/optional/optional.object/optional.object.assign/copy.pass.cpp index 8a4540e18e6cb..5900e60461ebb 100644 --- a/libcxx/test/std/utilities/optional/optional.object/optional.object.assign/copy.pass.cpp +++ b/libcxx/test/std/utilities/optional/optional.object/optional.object.assign/copy.pass.cpp @@ -48,7 +48,7 @@ constexpr bool assign_value(optional&& lhs) { return lhs.has_value() && rhs.has_value() && *lhs == *rhs; } -int main() +int main(int, char**) { { using O = optional; @@ -102,4 +102,6 @@ int main() } } #endif + + return 0; } diff --git a/libcxx/test/std/utilities/optional/optional.object/optional.object.assign/emplace.pass.cpp b/libcxx/test/std/utilities/optional/optional.object/optional.object.assign/emplace.pass.cpp index cf09bb5ddded7..c5cebc5420bc9 100644 --- a/libcxx/test/std/utilities/optional/optional.object/optional.object.assign/emplace.pass.cpp +++ b/libcxx/test/std/utilities/optional/optional.object/optional.object.assign/emplace.pass.cpp @@ -208,7 +208,7 @@ void test_on_test_type() { -int main() +int main(int, char**) { { test_on_test_type(); @@ -265,4 +265,6 @@ int main() } } #endif + + return 0; } diff --git a/libcxx/test/std/utilities/optional/optional.object/optional.object.assign/emplace_initializer_list.pass.cpp b/libcxx/test/std/utilities/optional/optional.object/optional.object.assign/emplace_initializer_list.pass.cpp index 9141bea11c98c..446e9ae9668cd 100644 --- a/libcxx/test/std/utilities/optional/optional.object/optional.object.assign/emplace_initializer_list.pass.cpp +++ b/libcxx/test/std/utilities/optional/optional.object/optional.object.assign/emplace_initializer_list.pass.cpp @@ -69,7 +69,7 @@ class Z bool Z::dtor_called = false; -int main() +int main(int, char**) { { X x; @@ -117,4 +117,6 @@ int main() } } #endif + + return 0; } diff --git a/libcxx/test/std/utilities/optional/optional.object/optional.object.assign/move.pass.cpp b/libcxx/test/std/utilities/optional/optional.object/optional.object.assign/move.pass.cpp index 0c36da93d9298..c862c5f0efd2b 100644 --- a/libcxx/test/std/utilities/optional/optional.object/optional.object.assign/move.pass.cpp +++ b/libcxx/test/std/utilities/optional/optional.object/optional.object.assign/move.pass.cpp @@ -66,7 +66,7 @@ constexpr bool assign_value(optional&& lhs) { return lhs.has_value() && rhs.has_value() && *lhs == Tp{101}; } -int main() +int main(int, char**) { { static_assert(std::is_nothrow_move_assignable>::value, ""); @@ -204,4 +204,5 @@ int main() }; static_assert(std::is_nothrow_move_assignable>::value, ""); } + return 0; } diff --git a/libcxx/test/std/utilities/optional/optional.object/optional.object.assign/nullopt_t.pass.cpp b/libcxx/test/std/utilities/optional/optional.object/optional.object.assign/nullopt_t.pass.cpp index e6b67430fff3a..af582d7320578 100644 --- a/libcxx/test/std/utilities/optional/optional.object/optional.object.assign/nullopt_t.pass.cpp +++ b/libcxx/test/std/utilities/optional/optional.object/optional.object.assign/nullopt_t.pass.cpp @@ -22,7 +22,7 @@ using std::optional; using std::nullopt_t; using std::nullopt; -int main() +int main(int, char**) { { optional opt; @@ -63,4 +63,6 @@ int main() assert(TT::alive == 0); assert(TT::destroyed == 1); TT::reset(); + + return 0; } diff --git a/libcxx/test/std/utilities/optional/optional.object/optional.object.assign/optional_U.pass.cpp b/libcxx/test/std/utilities/optional/optional.object/optional.object.assign/optional_U.pass.cpp index d043fd1def8d8..cabaa070b27b9 100644 --- a/libcxx/test/std/utilities/optional/optional.object/optional.object.assign/optional_U.pass.cpp +++ b/libcxx/test/std/utilities/optional/optional.object/optional.object.assign/optional_U.pass.cpp @@ -201,7 +201,7 @@ void test_ambigious_assign() { } -int main() +int main(int, char**) { test_with_test_type(); test_ambigious_assign(); @@ -264,4 +264,6 @@ int main() } } #endif + + return 0; } diff --git a/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/U.pass.cpp b/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/U.pass.cpp index 861ab91d80fda..b5966dfa55a93 100644 --- a/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/U.pass.cpp +++ b/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/U.pass.cpp @@ -8,13 +8,7 @@ // // UNSUPPORTED: c++98, c++03, c++11, c++14 -// XFAIL: availability=macosx10.13 -// XFAIL: availability=macosx10.12 -// XFAIL: availability=macosx10.11 -// XFAIL: availability=macosx10.10 -// XFAIL: availability=macosx10.9 -// XFAIL: availability=macosx10.8 -// XFAIL: availability=macosx10.7 +// XFAIL: dylib-has-no-bad_optional_access && !libcpp-no-exceptions // @@ -153,7 +147,9 @@ void test_explicit() { #endif } -int main() { +int main(int, char**) { test_implicit(); test_explicit(); + + return 0; } diff --git a/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/const_T.pass.cpp b/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/const_T.pass.cpp index 462811e51033a..f20a840b0b3a4 100644 --- a/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/const_T.pass.cpp +++ b/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/const_T.pass.cpp @@ -8,13 +8,7 @@ // // UNSUPPORTED: c++98, c++03, c++11, c++14 -// XFAIL: availability=macosx10.13 -// XFAIL: availability=macosx10.12 -// XFAIL: availability=macosx10.11 -// XFAIL: availability=macosx10.10 -// XFAIL: availability=macosx10.9 -// XFAIL: availability=macosx10.8 -// XFAIL: availability=macosx10.7 +// XFAIL: dylib-has-no-bad_optional_access && !libcpp-no-exceptions // @@ -29,7 +23,7 @@ using std::optional; -int main() +int main(int, char**) { { typedef int T; @@ -132,4 +126,6 @@ int main() } } #endif + + return 0; } diff --git a/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/const_optional_U.pass.cpp b/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/const_optional_U.pass.cpp index 4666d6d9b7f08..b28d22330a996 100644 --- a/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/const_optional_U.pass.cpp +++ b/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/const_optional_U.pass.cpp @@ -78,7 +78,7 @@ class Z }; -int main() +int main(int, char**) { { typedef short U; @@ -130,4 +130,6 @@ int main() } static_assert(!(std::is_constructible, const optional&>::value), ""); + + return 0; } diff --git a/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/copy.pass.cpp b/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/copy.pass.cpp index 844abda00ee31..e6793cd479414 100644 --- a/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/copy.pass.cpp +++ b/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/copy.pass.cpp @@ -113,7 +113,7 @@ void test_reference_extension() #endif } -int main() +int main(int, char**) { test(); test(3); @@ -169,4 +169,6 @@ int main() constexpr std::optional o2 = o1; static_assert( *o2 == 4, "" ); } + + return 0; } diff --git a/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/deduct.fail.cpp b/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/deduct.fail.cpp index 9439642418fb2..7c6ae9bcdac98 100644 --- a/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/deduct.fail.cpp +++ b/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/deduct.fail.cpp @@ -23,7 +23,7 @@ struct A {}; -int main() +int main(int, char**) { // Test the explicit deduction guides @@ -42,4 +42,6 @@ int main() // optional(nullopt_t) std::optional opt(std::nullopt); // expected-error-re@optional:* {{static_assert failed{{.*}} "instantiation of optional with nullopt_t is ill-formed"}} } + + return 0; } diff --git a/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/deduct.pass.cpp b/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/deduct.pass.cpp index 973b49dff1900..fa2edfcdd69bf 100644 --- a/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/deduct.pass.cpp +++ b/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/deduct.pass.cpp @@ -23,7 +23,7 @@ struct A {}; -int main() +int main(int, char**) { // Test the explicit deduction guides { @@ -50,4 +50,6 @@ int main() assert(static_cast(opt) == static_cast(source)); assert(*opt == *source); } + + return 0; } diff --git a/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/default.pass.cpp b/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/default.pass.cpp index a00fa170609df..3dd38da9d5713 100644 --- a/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/default.pass.cpp +++ b/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/default.pass.cpp @@ -61,7 +61,7 @@ test() }; } -int main() +int main(int, char**) { test_constexpr>(); test_constexpr>(); @@ -77,4 +77,6 @@ int main() test_constexpr>(); test_constexpr>(); #endif + + return 0; } diff --git a/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/explicit_const_optional_U.pass.cpp b/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/explicit_const_optional_U.pass.cpp index 37adf8bbe06d6..7741e0353426d 100644 --- a/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/explicit_const_optional_U.pass.cpp +++ b/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/explicit_const_optional_U.pass.cpp @@ -79,7 +79,7 @@ class Z }; -int main() +int main(int, char**) { { typedef X T; @@ -117,4 +117,6 @@ int main() optional rhs(3); test(rhs, true); } + + return 0; } diff --git a/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/explicit_optional_U.pass.cpp b/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/explicit_optional_U.pass.cpp index ea4b7aa50dae4..71febba35298b 100644 --- a/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/explicit_optional_U.pass.cpp +++ b/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/explicit_optional_U.pass.cpp @@ -62,7 +62,7 @@ class Z explicit Z(int) { TEST_THROW(6); } }; -int main() +int main(int, char**) { { optional rhs; @@ -80,4 +80,6 @@ int main() optional rhs(3); test(std::move(rhs), true); } + + return 0; } diff --git a/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/in_place_t.pass.cpp b/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/in_place_t.pass.cpp index 5cd23bad04502..db995b4a7e80f 100644 --- a/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/in_place_t.pass.cpp +++ b/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/in_place_t.pass.cpp @@ -58,7 +58,7 @@ class Z }; -int main() +int main(int, char**) { { constexpr optional opt(in_place, 5); @@ -144,4 +144,6 @@ int main() } } #endif + + return 0; } diff --git a/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/initializer_list.pass.cpp b/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/initializer_list.pass.cpp index f62e6a3a89eff..c8c76df2567f7 100644 --- a/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/initializer_list.pass.cpp +++ b/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/initializer_list.pass.cpp @@ -66,7 +66,7 @@ class Z {return x.i_ == y.i_ && x.j_ == y.j_;} }; -int main() +int main(int, char**) { { static_assert(!std::is_constructible&>::value, ""); @@ -112,4 +112,6 @@ int main() } } #endif + + return 0; } diff --git a/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/move.fail.cpp b/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/move.fail.cpp index 622b8e428a02d..a8634b961c756 100644 --- a/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/move.fail.cpp +++ b/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/move.fail.cpp @@ -28,9 +28,11 @@ struct S { }; -int main() +int main(int, char**) { static_assert (!std::is_trivially_move_constructible_v, "" ); constexpr std::optional o1; constexpr std::optional o2 = std::move(o1); // not constexpr + + return 0; } diff --git a/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/move.pass.cpp b/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/move.pass.cpp index afba631bf957f..4c58d45b5af67 100644 --- a/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/move.pass.cpp +++ b/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/move.pass.cpp @@ -8,13 +8,7 @@ // UNSUPPORTED: c++98, c++03, c++11, c++14 -// XFAIL: availability=macosx10.13 -// XFAIL: availability=macosx10.12 -// XFAIL: availability=macosx10.11 -// XFAIL: availability=macosx10.10 -// XFAIL: availability=macosx10.9 -// XFAIL: availability=macosx10.8 -// XFAIL: availability=macosx10.7 +// XFAIL: dylib-has-no-bad_optional_access && !libcpp-no-exceptions // @@ -151,7 +145,7 @@ void test_reference_extension() } -int main() +int main(int, char**) { test(); test(3); @@ -225,4 +219,6 @@ int main() constexpr std::optional o2 = std::move(o1); static_assert( *o2 == 4, "" ); } + + return 0; } diff --git a/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/nullopt_t.pass.cpp b/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/nullopt_t.pass.cpp index 850ed6ecaadd6..927ac19ead121 100644 --- a/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/nullopt_t.pass.cpp +++ b/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/nullopt_t.pass.cpp @@ -61,7 +61,7 @@ test() }; } -int main() +int main(int, char**) { test_constexpr>(); test_constexpr>(); @@ -69,4 +69,6 @@ int main() test_constexpr>(); test_constexpr>(); test>(); + + return 0; } diff --git a/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/optional_U.pass.cpp b/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/optional_U.pass.cpp index fd74f9ae18c26..fe4252b49c796 100644 --- a/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/optional_U.pass.cpp +++ b/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/optional_U.pass.cpp @@ -61,7 +61,7 @@ struct Z Z(int) { TEST_THROW(6); } }; -int main() +int main(int, char**) { { optional rhs; @@ -89,4 +89,6 @@ int main() } static_assert(!(std::is_constructible, optional>::value), ""); + + return 0; } diff --git a/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/rvalue_T.pass.cpp b/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/rvalue_T.pass.cpp index 5e9a216dcb961..f2e7882e8ee31 100644 --- a/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/rvalue_T.pass.cpp +++ b/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/rvalue_T.pass.cpp @@ -8,13 +8,7 @@ // // UNSUPPORTED: c++98, c++03, c++11, c++14 -// XFAIL: availability=macosx10.13 -// XFAIL: availability=macosx10.12 -// XFAIL: availability=macosx10.11 -// XFAIL: availability=macosx10.10 -// XFAIL: availability=macosx10.9 -// XFAIL: availability=macosx10.8 -// XFAIL: availability=macosx10.7 +// XFAIL: dylib-has-no-bad_optional_access && !libcpp-no-exceptions // @@ -39,7 +33,7 @@ class Z }; -int main() +int main(int, char**) { { typedef int T; @@ -157,4 +151,6 @@ int main() } } #endif + + return 0; } diff --git a/libcxx/test/std/utilities/optional/optional.object/optional.object.dtor/dtor.pass.cpp b/libcxx/test/std/utilities/optional/optional.object/optional.object.dtor/dtor.pass.cpp index ca96586a1391d..23497bc4c4786 100644 --- a/libcxx/test/std/utilities/optional/optional.object/optional.object.dtor/dtor.pass.cpp +++ b/libcxx/test/std/utilities/optional/optional.object/optional.object.dtor/dtor.pass.cpp @@ -32,7 +32,7 @@ class X bool X::dtor_called = false; -int main() +int main(int, char**) { { typedef int T; @@ -64,4 +64,6 @@ int main() } assert(X::dtor_called == true); } + + return 0; } diff --git a/libcxx/test/std/utilities/optional/optional.object/optional.object.mod/reset.pass.cpp b/libcxx/test/std/utilities/optional/optional.object/optional.object.mod/reset.pass.cpp index e766db87eb6c3..704606c6f75c7 100644 --- a/libcxx/test/std/utilities/optional/optional.object/optional.object.mod/reset.pass.cpp +++ b/libcxx/test/std/utilities/optional/optional.object/optional.object.mod/reset.pass.cpp @@ -26,7 +26,7 @@ struct X bool X::dtor_called = false; -int main() +int main(int, char**) { { optional opt; @@ -55,4 +55,6 @@ int main() assert(static_cast(opt) == false); X::dtor_called = false; } + + return 0; } diff --git a/libcxx/test/std/utilities/optional/optional.object/optional.object.observe/bool.pass.cpp b/libcxx/test/std/utilities/optional/optional.object/optional.object.observe/bool.pass.cpp index 29bf20bbd0841..7c008ef62093b 100644 --- a/libcxx/test/std/utilities/optional/optional.object/optional.object.observe/bool.pass.cpp +++ b/libcxx/test/std/utilities/optional/optional.object/optional.object.observe/bool.pass.cpp @@ -17,7 +17,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { using std::optional; { @@ -33,4 +33,6 @@ int main() constexpr optional opt(0); static_assert(opt, ""); } + + return 0; } diff --git a/libcxx/test/std/utilities/optional/optional.object/optional.object.observe/dereference.pass.cpp b/libcxx/test/std/utilities/optional/optional.object/optional.object.observe/dereference.pass.cpp index b109346f588c6..368f84155dbde 100644 --- a/libcxx/test/std/utilities/optional/optional.object/optional.object.observe/dereference.pass.cpp +++ b/libcxx/test/std/utilities/optional/optional.object/optional.object.observe/dereference.pass.cpp @@ -43,7 +43,7 @@ test() return (*opt).test(); } -int main() +int main(int, char**) { { optional opt; ((void)opt); @@ -69,4 +69,6 @@ int main() assert(false); } #endif // _LIBCPP_DEBUG + + return 0; } diff --git a/libcxx/test/std/utilities/optional/optional.object/optional.object.observe/dereference_const.pass.cpp b/libcxx/test/std/utilities/optional/optional.object/optional.object.observe/dereference_const.pass.cpp index 6663d88513f66..99a60e8dd6f75 100644 --- a/libcxx/test/std/utilities/optional/optional.object/optional.object.observe/dereference_const.pass.cpp +++ b/libcxx/test/std/utilities/optional/optional.object/optional.object.observe/dereference_const.pass.cpp @@ -36,7 +36,7 @@ struct Y int test() const {return 2;} }; -int main() +int main(int, char**) { { const optional opt; ((void)opt); @@ -65,4 +65,6 @@ int main() assert(false); } #endif // _LIBCPP_DEBUG + + return 0; } diff --git a/libcxx/test/std/utilities/optional/optional.object/optional.object.observe/dereference_const_rvalue.pass.cpp b/libcxx/test/std/utilities/optional/optional.object/optional.object.observe/dereference_const_rvalue.pass.cpp index 02466d53b11b1..ca494c5a83d39 100644 --- a/libcxx/test/std/utilities/optional/optional.object/optional.object.observe/dereference_const_rvalue.pass.cpp +++ b/libcxx/test/std/utilities/optional/optional.object/optional.object.observe/dereference_const_rvalue.pass.cpp @@ -36,7 +36,7 @@ struct Y int test() const && {return 2;} }; -int main() +int main(int, char**) { { const optional opt; ((void)opt); @@ -65,4 +65,6 @@ int main() assert(false); } #endif // _LIBCPP_DEBUG + + return 0; } diff --git a/libcxx/test/std/utilities/optional/optional.object/optional.object.observe/dereference_rvalue.pass.cpp b/libcxx/test/std/utilities/optional/optional.object/optional.object.observe/dereference_rvalue.pass.cpp index 7dca9f6134515..f1b2ca393af3b 100644 --- a/libcxx/test/std/utilities/optional/optional.object/optional.object.observe/dereference_rvalue.pass.cpp +++ b/libcxx/test/std/utilities/optional/optional.object/optional.object.observe/dereference_rvalue.pass.cpp @@ -43,7 +43,7 @@ test() return (*std::move(opt)).test(); } -int main() +int main(int, char**) { { optional opt; ((void)opt); @@ -69,4 +69,6 @@ int main() assert(false); } #endif // _LIBCPP_DEBUG + + return 0; } diff --git a/libcxx/test/std/utilities/optional/optional.object/optional.object.observe/has_value.pass.cpp b/libcxx/test/std/utilities/optional/optional.object/optional.object.observe/has_value.pass.cpp index 59ce4c7e8eec7..560fa8894b7b8 100644 --- a/libcxx/test/std/utilities/optional/optional.object/optional.object.observe/has_value.pass.cpp +++ b/libcxx/test/std/utilities/optional/optional.object/optional.object.observe/has_value.pass.cpp @@ -17,7 +17,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { using std::optional; { @@ -33,4 +33,6 @@ int main() constexpr optional opt(0); static_assert(opt.has_value(), ""); } + + return 0; } diff --git a/libcxx/test/std/utilities/optional/optional.object/optional.object.observe/op_arrow.pass.cpp b/libcxx/test/std/utilities/optional/optional.object/optional.object.observe/op_arrow.pass.cpp index ac0b9a5278804..8c6c098614048 100644 --- a/libcxx/test/std/utilities/optional/optional.object/optional.object.observe/op_arrow.pass.cpp +++ b/libcxx/test/std/utilities/optional/optional.object/optional.object.observe/op_arrow.pass.cpp @@ -40,7 +40,7 @@ test() return opt->test(); } -int main() +int main(int, char**) { { std::optional opt; ((void)opt); @@ -68,4 +68,6 @@ int main() assert(false); } #endif // _LIBCPP_DEBUG + + return 0; } diff --git a/libcxx/test/std/utilities/optional/optional.object/optional.object.observe/op_arrow_const.pass.cpp b/libcxx/test/std/utilities/optional/optional.object/optional.object.observe/op_arrow_const.pass.cpp index fd7e683be77cf..b9539828a983c 100644 --- a/libcxx/test/std/utilities/optional/optional.object/optional.object.observe/op_arrow_const.pass.cpp +++ b/libcxx/test/std/utilities/optional/optional.object/optional.object.observe/op_arrow_const.pass.cpp @@ -39,7 +39,7 @@ struct Z constexpr int test() const {return 1;} }; -int main() +int main(int, char**) { { const std::optional opt; ((void)opt); @@ -72,4 +72,6 @@ int main() assert(false); } #endif // _LIBCPP_DEBUG + + return 0; } diff --git a/libcxx/test/std/utilities/optional/optional.object/optional.object.observe/value.pass.cpp b/libcxx/test/std/utilities/optional/optional.object/optional.object.observe/value.pass.cpp index 04a4fcffd9092..a37d0f34e65ff 100644 --- a/libcxx/test/std/utilities/optional/optional.object/optional.object.observe/value.pass.cpp +++ b/libcxx/test/std/utilities/optional/optional.object/optional.object.observe/value.pass.cpp @@ -8,13 +8,7 @@ // UNSUPPORTED: c++98, c++03, c++11, c++14 -// XFAIL: availability=macosx10.13 -// XFAIL: availability=macosx10.12 -// XFAIL: availability=macosx10.11 -// XFAIL: availability=macosx10.10 -// XFAIL: availability=macosx10.9 -// XFAIL: availability=macosx10.8 -// XFAIL: availability=macosx10.7 +// XFAIL: dylib-has-no-bad_optional_access && !libcpp-no-exceptions // @@ -52,7 +46,7 @@ test() } -int main() +int main(int, char**) { { optional opt; ((void)opt); @@ -78,4 +72,6 @@ int main() } #endif static_assert(test() == 7, ""); + + return 0; } diff --git a/libcxx/test/std/utilities/optional/optional.object/optional.object.observe/value_const.fail.cpp b/libcxx/test/std/utilities/optional/optional.object/optional.object.observe/value_const.fail.cpp index ab6504dba9f93..5e81f2fb11d2a 100644 --- a/libcxx/test/std/utilities/optional/optional.object/optional.object.observe/value_const.fail.cpp +++ b/libcxx/test/std/utilities/optional/optional.object/optional.object.observe/value_const.fail.cpp @@ -23,10 +23,12 @@ struct X int test() {return 4;} }; -int main() +int main(int, char**) { { constexpr optional opt; static_assert(opt.value().test() == 3, ""); } + + return 0; } diff --git a/libcxx/test/std/utilities/optional/optional.object/optional.object.observe/value_const.pass.cpp b/libcxx/test/std/utilities/optional/optional.object/optional.object.observe/value_const.pass.cpp index dcc9306b152cc..4533208d6b398 100644 --- a/libcxx/test/std/utilities/optional/optional.object/optional.object.observe/value_const.pass.cpp +++ b/libcxx/test/std/utilities/optional/optional.object/optional.object.observe/value_const.pass.cpp @@ -8,13 +8,7 @@ // UNSUPPORTED: c++98, c++03, c++11, c++14 -// XFAIL: availability=macosx10.13 -// XFAIL: availability=macosx10.12 -// XFAIL: availability=macosx10.11 -// XFAIL: availability=macosx10.10 -// XFAIL: availability=macosx10.9 -// XFAIL: availability=macosx10.8 -// XFAIL: availability=macosx10.7 +// XFAIL: dylib-has-no-bad_optional_access && !libcpp-no-exceptions // @@ -41,7 +35,7 @@ struct X int test() && {return 6;} }; -int main() +int main(int, char**) { { const optional opt; ((void)opt); @@ -69,4 +63,6 @@ int main() } } #endif + + return 0; } diff --git a/libcxx/test/std/utilities/optional/optional.object/optional.object.observe/value_const_rvalue.pass.cpp b/libcxx/test/std/utilities/optional/optional.object/optional.object.observe/value_const_rvalue.pass.cpp index 5e218d80e3f64..9719a1ebda7e9 100644 --- a/libcxx/test/std/utilities/optional/optional.object/optional.object.observe/value_const_rvalue.pass.cpp +++ b/libcxx/test/std/utilities/optional/optional.object/optional.object.observe/value_const_rvalue.pass.cpp @@ -8,13 +8,7 @@ // UNSUPPORTED: c++98, c++03, c++11, c++14 -// XFAIL: availability=macosx10.13 -// XFAIL: availability=macosx10.12 -// XFAIL: availability=macosx10.11 -// XFAIL: availability=macosx10.10 -// XFAIL: availability=macosx10.9 -// XFAIL: availability=macosx10.8 -// XFAIL: availability=macosx10.7 +// XFAIL: dylib-has-no-bad_optional_access && !libcpp-no-exceptions // @@ -41,7 +35,7 @@ struct X int test() && {return 6;} }; -int main() +int main(int, char**) { { const optional opt; ((void)opt); @@ -69,4 +63,6 @@ int main() } } #endif + + return 0; } diff --git a/libcxx/test/std/utilities/optional/optional.object/optional.object.observe/value_or.pass.cpp b/libcxx/test/std/utilities/optional/optional.object/optional.object.observe/value_or.pass.cpp index 93ec45b0bec14..8f22f1c0dc8e5 100644 --- a/libcxx/test/std/utilities/optional/optional.object/optional.object.observe/value_or.pass.cpp +++ b/libcxx/test/std/utilities/optional/optional.object/optional.object.observe/value_or.pass.cpp @@ -67,7 +67,9 @@ constexpr int test() return 0; } -int main() +int main(int, char**) { static_assert(test() == 0); + + return 0; } diff --git a/libcxx/test/std/utilities/optional/optional.object/optional.object.observe/value_or_const.pass.cpp b/libcxx/test/std/utilities/optional/optional.object/optional.object.observe/value_or_const.pass.cpp index 0b4c7928f212f..736fe791af62e 100644 --- a/libcxx/test/std/utilities/optional/optional.object/optional.object.observe/value_or_const.pass.cpp +++ b/libcxx/test/std/utilities/optional/optional.object/optional.object.observe/value_or_const.pass.cpp @@ -35,7 +35,7 @@ struct X {return x.i_ == y.i_;} }; -int main() +int main(int, char**) { { constexpr optional opt(2); @@ -73,4 +73,6 @@ int main() const optional opt; assert(opt.value_or(Y(3)) == 4); } + + return 0; } diff --git a/libcxx/test/std/utilities/optional/optional.object/optional.object.observe/value_rvalue.pass.cpp b/libcxx/test/std/utilities/optional/optional.object/optional.object.observe/value_rvalue.pass.cpp index 21f630e8c364d..215db7f1b9a18 100644 --- a/libcxx/test/std/utilities/optional/optional.object/optional.object.observe/value_rvalue.pass.cpp +++ b/libcxx/test/std/utilities/optional/optional.object/optional.object.observe/value_rvalue.pass.cpp @@ -9,13 +9,7 @@ // UNSUPPORTED: c++98, c++03, c++11, c++14 // -// XFAIL: availability=macosx10.13 -// XFAIL: availability=macosx10.12 -// XFAIL: availability=macosx10.11 -// XFAIL: availability=macosx10.10 -// XFAIL: availability=macosx10.9 -// XFAIL: availability=macosx10.8 -// XFAIL: availability=macosx10.7 +// XFAIL: dylib-has-no-bad_optional_access && !libcpp-no-exceptions // constexpr T& optional::value() &&; @@ -50,7 +44,7 @@ test() return std::move(opt).value().test(); } -int main() +int main(int, char**) { { optional opt; ((void)opt); @@ -76,4 +70,6 @@ int main() } #endif static_assert(test() == 7, ""); + + return 0; } diff --git a/libcxx/test/std/utilities/optional/optional.object/optional.object.swap/swap.pass.cpp b/libcxx/test/std/utilities/optional/optional.object/optional.object.swap/swap.pass.cpp index 7d79251e2413e..e881a0c6286a0 100644 --- a/libcxx/test/std/utilities/optional/optional.object/optional.object.swap/swap.pass.cpp +++ b/libcxx/test/std/utilities/optional/optional.object/optional.object.swap/swap.pass.cpp @@ -64,7 +64,7 @@ class Z }; -int main() +int main(int, char**) { { optional opt1; @@ -302,4 +302,6 @@ int main() assert(*opt2 == 2); } #endif + + return 0; } diff --git a/libcxx/test/std/utilities/optional/optional.object/optional_requires_destructible_object.fail.cpp b/libcxx/test/std/utilities/optional/optional.object/optional_requires_destructible_object.fail.cpp index 67e1b76d7cbcf..531173ade8b78 100644 --- a/libcxx/test/std/utilities/optional/optional.object/optional_requires_destructible_object.fail.cpp +++ b/libcxx/test/std/utilities/optional/optional.object/optional_requires_destructible_object.fail.cpp @@ -21,7 +21,7 @@ struct X ~X() {} }; -int main() +int main(int, char**) { using std::optional; { @@ -46,4 +46,6 @@ int main() } // FIXME these are garbage diagnostics that Clang should not produce // expected-error@optional:* 0+ {{is not a base class}} + + return 0; } diff --git a/libcxx/test/std/utilities/optional/optional.object/special_members.pass.cpp b/libcxx/test/std/utilities/optional/optional.object/special_members.pass.cpp index a315ed8ca7594..28783264d715f 100644 --- a/libcxx/test/std/utilities/optional/optional.object/special_members.pass.cpp +++ b/libcxx/test/std/utilities/optional/optional.object/special_members.pass.cpp @@ -52,11 +52,12 @@ struct DoTestsMetafunction { DoTestsMetafunction() { sink(SpecialMemberTest{}...); } }; -int main() { +int main(int, char**) { sink( ImplicitTypes::ApplyTypes{}, ExplicitTypes::ApplyTypes{}, NonLiteralTypes::ApplyTypes{}, NonTrivialTypes::ApplyTypes{} ); + return 0; } diff --git a/libcxx/test/std/utilities/optional/optional.object/triviality.pass.cpp b/libcxx/test/std/utilities/optional/optional.object/triviality.pass.cpp index 7c82e17d6118b..f53d86000e7c7 100644 --- a/libcxx/test/std/utilities/optional/optional.object/triviality.pass.cpp +++ b/libcxx/test/std/utilities/optional/optional.object/triviality.pass.cpp @@ -85,7 +85,7 @@ struct TrivialCopyNonTrivialMove { TrivialCopyNonTrivialMove& operator=(TrivialCopyNonTrivialMove&&) { return *this; } }; -int main() { +int main(int, char**) { sink( ImplicitTypes::ApplyTypes{}, ExplicitTypes::ApplyTypes{}, @@ -93,4 +93,5 @@ int main() { NonTrivialTypes::ApplyTypes{}, DoTestsMetafunction{} ); + return 0; } diff --git a/libcxx/test/std/utilities/optional/optional.object/types.pass.cpp b/libcxx/test/std/utilities/optional/optional.object/types.pass.cpp index cef295754ee83..7c32d1857cd00 100644 --- a/libcxx/test/std/utilities/optional/optional.object/types.pass.cpp +++ b/libcxx/test/std/utilities/optional/optional.object/types.pass.cpp @@ -28,10 +28,12 @@ test() static_assert(std::is_same::value, ""); } -int main() +int main(int, char**) { test, int>(); test, const int>(); test, double>(); test, const double>(); + + return 0; } diff --git a/libcxx/test/std/utilities/optional/optional.relops/equal.pass.cpp b/libcxx/test/std/utilities/optional/optional.relops/equal.pass.cpp index baeb16bb6b854..4fc85157a7685 100644 --- a/libcxx/test/std/utilities/optional/optional.relops/equal.pass.cpp +++ b/libcxx/test/std/utilities/optional/optional.relops/equal.pass.cpp @@ -27,7 +27,7 @@ constexpr bool operator==(const X& lhs, const X& rhs) { return lhs.i_ == rhs.i_; } -int main() { +int main(int, char**) { { typedef X T; typedef optional O; @@ -82,4 +82,6 @@ int main() { static_assert(o1 == O2(42), ""); static_assert(!(O2(101) == o1), ""); } + + return 0; } diff --git a/libcxx/test/std/utilities/optional/optional.relops/greater_equal.pass.cpp b/libcxx/test/std/utilities/optional/optional.relops/greater_equal.pass.cpp index 3a88640cad903..4bc9720aa7f7a 100644 --- a/libcxx/test/std/utilities/optional/optional.relops/greater_equal.pass.cpp +++ b/libcxx/test/std/utilities/optional/optional.relops/greater_equal.pass.cpp @@ -25,7 +25,7 @@ constexpr bool operator>=(const X& lhs, const X& rhs) { return lhs.i_ >= rhs.i_; } -int main() { +int main(int, char**) { { typedef optional O; @@ -79,4 +79,6 @@ int main() { static_assert(o1 >= O2(42), ""); static_assert(!(O2(1) >= o1), ""); } + + return 0; } diff --git a/libcxx/test/std/utilities/optional/optional.relops/greater_than.pass.cpp b/libcxx/test/std/utilities/optional/optional.relops/greater_than.pass.cpp index 7f7b24a75f68b..d168cd70635a5 100644 --- a/libcxx/test/std/utilities/optional/optional.relops/greater_than.pass.cpp +++ b/libcxx/test/std/utilities/optional/optional.relops/greater_than.pass.cpp @@ -23,7 +23,7 @@ struct X { constexpr bool operator>(const X& lhs, const X& rhs) { return lhs.i_ > rhs.i_; } -int main() { +int main(int, char**) { { typedef optional O; @@ -77,4 +77,6 @@ int main() { static_assert(o1 > O2(1), ""); static_assert(!(O2(42) > o1), ""); } + + return 0; } diff --git a/libcxx/test/std/utilities/optional/optional.relops/less_equal.pass.cpp b/libcxx/test/std/utilities/optional/optional.relops/less_equal.pass.cpp index e9180cb3ee6c0..835be64f8fbee 100644 --- a/libcxx/test/std/utilities/optional/optional.relops/less_equal.pass.cpp +++ b/libcxx/test/std/utilities/optional/optional.relops/less_equal.pass.cpp @@ -25,7 +25,7 @@ constexpr bool operator<=(const X& lhs, const X& rhs) { return lhs.i_ <= rhs.i_; } -int main() { +int main(int, char**) { { typedef optional O; @@ -79,4 +79,6 @@ int main() { static_assert(o1 <= O2(42), ""); static_assert(!(O2(101) <= o1), ""); } + + return 0; } diff --git a/libcxx/test/std/utilities/optional/optional.relops/less_than.pass.cpp b/libcxx/test/std/utilities/optional/optional.relops/less_than.pass.cpp index 29fa36a3edbe9..832de4b2981a6 100644 --- a/libcxx/test/std/utilities/optional/optional.relops/less_than.pass.cpp +++ b/libcxx/test/std/utilities/optional/optional.relops/less_than.pass.cpp @@ -23,7 +23,7 @@ struct X { constexpr bool operator<(const X& lhs, const X& rhs) { return lhs.i_ < rhs.i_; } -int main() { +int main(int, char**) { { typedef optional O; @@ -77,4 +77,6 @@ int main() { static_assert(o1 < O2(101), ""); static_assert(!(O2(101) < o1), ""); } + + return 0; } diff --git a/libcxx/test/std/utilities/optional/optional.relops/not_equal.pass.cpp b/libcxx/test/std/utilities/optional/optional.relops/not_equal.pass.cpp index 9f690477e0eab..ab00b7aab18dc 100644 --- a/libcxx/test/std/utilities/optional/optional.relops/not_equal.pass.cpp +++ b/libcxx/test/std/utilities/optional/optional.relops/not_equal.pass.cpp @@ -27,7 +27,7 @@ constexpr bool operator!=(const X& lhs, const X& rhs) { return lhs.i_ != rhs.i_; } -int main() { +int main(int, char**) { { typedef X T; typedef optional O; @@ -82,4 +82,6 @@ int main() { static_assert(o1 != O2(101), ""); static_assert(!(O2(42) != o1), ""); } + + return 0; } diff --git a/libcxx/test/std/utilities/optional/optional.specalg/make_optional.pass.cpp b/libcxx/test/std/utilities/optional/optional.specalg/make_optional.pass.cpp index fef17e772774a..f93913e5bd1c5 100644 --- a/libcxx/test/std/utilities/optional/optional.specalg/make_optional.pass.cpp +++ b/libcxx/test/std/utilities/optional/optional.specalg/make_optional.pass.cpp @@ -7,16 +7,10 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++98, c++03, c++11, c++14 -// - -// XFAIL: availability=macosx10.13 -// XFAIL: availability=macosx10.12 -// XFAIL: availability=macosx10.11 -// XFAIL: availability=macosx10.10 -// XFAIL: availability=macosx10.9 -// XFAIL: availability=macosx10.8 -// XFAIL: availability=macosx10.7 +// XFAIL: dylib-has-no-bad_optional_access && !libcpp-no-exceptions +// +// // template // constexpr optional> make_optional(T&& v); @@ -27,7 +21,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { using std::optional; using std::make_optional; @@ -55,4 +49,6 @@ int main() assert(**opt == 3); assert(s == nullptr); } + + return 0; } diff --git a/libcxx/test/std/utilities/optional/optional.specalg/make_optional_explicit.pass.cpp b/libcxx/test/std/utilities/optional/optional.specalg/make_optional_explicit.pass.cpp index 675e900367367..d3461542b93e8 100644 --- a/libcxx/test/std/utilities/optional/optional.specalg/make_optional_explicit.pass.cpp +++ b/libcxx/test/std/utilities/optional/optional.specalg/make_optional_explicit.pass.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { using std::optional; using std::make_optional; @@ -41,4 +41,6 @@ int main() auto opt = make_optional(4, 'X'); assert(*opt == "XXXX"); } + + return 0; } diff --git a/libcxx/test/std/utilities/optional/optional.specalg/make_optional_explicit_initializer_list.pass.cpp b/libcxx/test/std/utilities/optional/optional.specalg/make_optional_explicit_initializer_list.pass.cpp index 4a9040e50f7cf..40b20bed52b9e 100644 --- a/libcxx/test/std/utilities/optional/optional.specalg/make_optional_explicit_initializer_list.pass.cpp +++ b/libcxx/test/std/utilities/optional/optional.specalg/make_optional_explicit_initializer_list.pass.cpp @@ -27,7 +27,7 @@ struct TestT { : x(*il.begin()), size(static_cast(il.size())) {} }; -int main() +int main(int, char**) { using std::make_optional; { @@ -49,4 +49,6 @@ int main() auto opt = make_optional({'a', 'b', 'c'}, std::allocator{}); assert(*opt == "abc"); } + + return 0; } diff --git a/libcxx/test/std/utilities/optional/optional.specalg/swap.pass.cpp b/libcxx/test/std/utilities/optional/optional.specalg/swap.pass.cpp index 3f37ac6e272b4..1a548e8cc2e7d 100644 --- a/libcxx/test/std/utilities/optional/optional.specalg/swap.pass.cpp +++ b/libcxx/test/std/utilities/optional/optional.specalg/swap.pass.cpp @@ -109,7 +109,7 @@ void test_swap_sfinae() { } } -int main() +int main(int, char**) { test_swap_sfinae(); { @@ -348,4 +348,6 @@ int main() assert(*opt2 == 2); } #endif // TEST_HAS_NO_EXCEPTIONS + + return 0; } diff --git a/libcxx/test/std/utilities/optional/optional.syn/optional_in_place_t.fail.cpp b/libcxx/test/std/utilities/optional/optional.syn/optional_in_place_t.fail.cpp index aca546d6c4473..b7d3b71e0d3a6 100644 --- a/libcxx/test/std/utilities/optional/optional.syn/optional_in_place_t.fail.cpp +++ b/libcxx/test/std/utilities/optional/optional.syn/optional_in_place_t.fail.cpp @@ -14,7 +14,7 @@ #include -int main() +int main(int, char**) { using std::optional; using std::in_place_t; @@ -22,4 +22,6 @@ int main() optional opt; // expected-note {{requested here}} // expected-error@optional:* {{"instantiation of optional with in_place_t is ill-formed"}} + + return 0; } diff --git a/libcxx/test/std/utilities/optional/optional.syn/optional_includes_initializer_list.pass.cpp b/libcxx/test/std/utilities/optional/optional.syn/optional_includes_initializer_list.pass.cpp index 28904aecf121d..daaad5664b6b8 100644 --- a/libcxx/test/std/utilities/optional/optional.syn/optional_includes_initializer_list.pass.cpp +++ b/libcxx/test/std/utilities/optional/optional.syn/optional_includes_initializer_list.pass.cpp @@ -13,10 +13,12 @@ #include -int main() +int main(int, char**) { using std::optional; std::initializer_list list; (void)list; + + return 0; } diff --git a/libcxx/test/std/utilities/optional/optional.syn/optional_nullopt_t.fail.cpp b/libcxx/test/std/utilities/optional/optional.syn/optional_nullopt_t.fail.cpp index 4fe41b44518fc..a4abbf02779d6 100644 --- a/libcxx/test/std/utilities/optional/optional.syn/optional_nullopt_t.fail.cpp +++ b/libcxx/test/std/utilities/optional/optional.syn/optional_nullopt_t.fail.cpp @@ -14,7 +14,7 @@ #include -int main() +int main(int, char**) { using std::optional; using std::nullopt_t; @@ -25,4 +25,6 @@ int main() optional opt2; // expected-note 1 {{requested here}} optional opt3; // expected-note 1 {{requested here}} // expected-error@optional:* 4 {{instantiation of optional with nullopt_t is ill-formed}} + + return 0; } diff --git a/libcxx/test/std/utilities/ratio/ratio.arithmetic/ratio_add.fail.cpp b/libcxx/test/std/utilities/ratio/ratio.arithmetic/ratio_add.fail.cpp index d7f775eee6e35..abf75631f861d 100644 --- a/libcxx/test/std/utilities/ratio/ratio.arithmetic/ratio_add.fail.cpp +++ b/libcxx/test/std/utilities/ratio/ratio.arithmetic/ratio_add.fail.cpp @@ -10,9 +10,11 @@ #include -int main() +int main(int, char**) { typedef std::ratio<0x7FFFFFFFFFFFFFFFLL, 1> R1; typedef std::ratio<1, 1> R2; typedef std::ratio_add::type R; + + return 0; } diff --git a/libcxx/test/std/utilities/ratio/ratio.arithmetic/ratio_add.pass.cpp b/libcxx/test/std/utilities/ratio/ratio.arithmetic/ratio_add.pass.cpp index ae43ac9222b08..c62f75a0d875f 100644 --- a/libcxx/test/std/utilities/ratio/ratio.arithmetic/ratio_add.pass.cpp +++ b/libcxx/test/std/utilities/ratio/ratio.arithmetic/ratio_add.pass.cpp @@ -10,7 +10,7 @@ #include -int main() +int main(int, char**) { { typedef std::ratio<1, 1> R1; @@ -72,4 +72,6 @@ int main() typedef std::ratio_add::type R; static_assert(R::num == 1 && R::den == 1, ""); } + + return 0; } diff --git a/libcxx/test/std/utilities/ratio/ratio.arithmetic/ratio_divide.fail.cpp b/libcxx/test/std/utilities/ratio/ratio.arithmetic/ratio_divide.fail.cpp index ea96434b8552b..387f6290368ec 100644 --- a/libcxx/test/std/utilities/ratio/ratio.arithmetic/ratio_divide.fail.cpp +++ b/libcxx/test/std/utilities/ratio/ratio.arithmetic/ratio_divide.fail.cpp @@ -10,9 +10,11 @@ #include -int main() +int main(int, char**) { typedef std::ratio<0x7FFFFFFFFFFFFFFFLL, 1> R1; typedef std::ratio<1, 2> R2; typedef std::ratio_divide::type R; + + return 0; } diff --git a/libcxx/test/std/utilities/ratio/ratio.arithmetic/ratio_divide.pass.cpp b/libcxx/test/std/utilities/ratio/ratio.arithmetic/ratio_divide.pass.cpp index 0b93e1a9cea06..ce7f69473bc79 100644 --- a/libcxx/test/std/utilities/ratio/ratio.arithmetic/ratio_divide.pass.cpp +++ b/libcxx/test/std/utilities/ratio/ratio.arithmetic/ratio_divide.pass.cpp @@ -10,7 +10,7 @@ #include -int main() +int main(int, char**) { { typedef std::ratio<1, 1> R1; @@ -54,4 +54,6 @@ int main() typedef std::ratio_divide::type R; static_assert(R::num == 630992477165LL && R::den == 127339199162436LL, ""); } + + return 0; } diff --git a/libcxx/test/std/utilities/ratio/ratio.arithmetic/ratio_multiply.fail.cpp b/libcxx/test/std/utilities/ratio/ratio.arithmetic/ratio_multiply.fail.cpp index b884f4e2cb8d6..ef59bb39e41f3 100644 --- a/libcxx/test/std/utilities/ratio/ratio.arithmetic/ratio_multiply.fail.cpp +++ b/libcxx/test/std/utilities/ratio/ratio.arithmetic/ratio_multiply.fail.cpp @@ -10,9 +10,11 @@ #include -int main() +int main(int, char**) { typedef std::ratio<0x7FFFFFFFFFFFFFFFLL, 1> R1; typedef std::ratio<2, 1> R2; typedef std::ratio_multiply::type R; + + return 0; } diff --git a/libcxx/test/std/utilities/ratio/ratio.arithmetic/ratio_multiply.pass.cpp b/libcxx/test/std/utilities/ratio/ratio.arithmetic/ratio_multiply.pass.cpp index 876158994e7ca..e20f234434743 100644 --- a/libcxx/test/std/utilities/ratio/ratio.arithmetic/ratio_multiply.pass.cpp +++ b/libcxx/test/std/utilities/ratio/ratio.arithmetic/ratio_multiply.pass.cpp @@ -10,7 +10,7 @@ #include -int main() +int main(int, char**) { { typedef std::ratio<1, 1> R1; @@ -54,4 +54,6 @@ int main() typedef std::ratio_multiply::type R; static_assert(R::num == 15519594064236LL && R::den == 5177331081415LL, ""); } + + return 0; } diff --git a/libcxx/test/std/utilities/ratio/ratio.arithmetic/ratio_subtract.fail.cpp b/libcxx/test/std/utilities/ratio/ratio.arithmetic/ratio_subtract.fail.cpp index 95e9c823908f2..8b00462dc48ed 100644 --- a/libcxx/test/std/utilities/ratio/ratio.arithmetic/ratio_subtract.fail.cpp +++ b/libcxx/test/std/utilities/ratio/ratio.arithmetic/ratio_subtract.fail.cpp @@ -10,9 +10,11 @@ #include -int main() +int main(int, char**) { typedef std::ratio<-0x7FFFFFFFFFFFFFFFLL, 1> R1; typedef std::ratio<1, 1> R2; typedef std::ratio_subtract::type R; + + return 0; } diff --git a/libcxx/test/std/utilities/ratio/ratio.arithmetic/ratio_subtract.pass.cpp b/libcxx/test/std/utilities/ratio/ratio.arithmetic/ratio_subtract.pass.cpp index dbb9480475d30..e3871f7a7cfc9 100644 --- a/libcxx/test/std/utilities/ratio/ratio.arithmetic/ratio_subtract.pass.cpp +++ b/libcxx/test/std/utilities/ratio/ratio.arithmetic/ratio_subtract.pass.cpp @@ -10,7 +10,7 @@ #include -int main() +int main(int, char**) { { typedef std::ratio<1, 1> R1; @@ -72,4 +72,6 @@ int main() typedef std::ratio_subtract::type R; static_assert(R::num == -1 && R::den == 1, ""); } + + return 0; } diff --git a/libcxx/test/std/utilities/ratio/ratio.comparison/ratio_equal.pass.cpp b/libcxx/test/std/utilities/ratio/ratio.comparison/ratio_equal.pass.cpp index 9f547cdea565e..d0b1d5a17be11 100644 --- a/libcxx/test/std/utilities/ratio/ratio.comparison/ratio_equal.pass.cpp +++ b/libcxx/test/std/utilities/ratio/ratio.comparison/ratio_equal.pass.cpp @@ -21,7 +21,7 @@ void test() #endif } -int main() +int main(int, char**) { { typedef std::ratio<1, 1> R1; @@ -63,4 +63,6 @@ int main() typedef std::ratio<1, -0x7FFFFFFFFFFFFFFFLL> R2; test(); } + + return 0; } diff --git a/libcxx/test/std/utilities/ratio/ratio.comparison/ratio_greater.pass.cpp b/libcxx/test/std/utilities/ratio/ratio.comparison/ratio_greater.pass.cpp index ab6deac86d05e..dfb0e8fe87e28 100644 --- a/libcxx/test/std/utilities/ratio/ratio.comparison/ratio_greater.pass.cpp +++ b/libcxx/test/std/utilities/ratio/ratio.comparison/ratio_greater.pass.cpp @@ -21,7 +21,7 @@ void test() #endif } -int main() +int main(int, char**) { { typedef std::ratio<1, 1> R1; @@ -63,4 +63,6 @@ int main() typedef std::ratio<1, -0x7FFFFFFFFFFFFFFFLL> R2; test(); } + + return 0; } diff --git a/libcxx/test/std/utilities/ratio/ratio.comparison/ratio_greater_equal.pass.cpp b/libcxx/test/std/utilities/ratio/ratio.comparison/ratio_greater_equal.pass.cpp index 79942fa6d0d35..811706c58aaa9 100644 --- a/libcxx/test/std/utilities/ratio/ratio.comparison/ratio_greater_equal.pass.cpp +++ b/libcxx/test/std/utilities/ratio/ratio.comparison/ratio_greater_equal.pass.cpp @@ -21,7 +21,7 @@ void test() #endif } -int main() +int main(int, char**) { { typedef std::ratio<1, 1> R1; @@ -63,4 +63,6 @@ int main() typedef std::ratio<1, -0x7FFFFFFFFFFFFFFFLL> R2; test(); } + + return 0; } diff --git a/libcxx/test/std/utilities/ratio/ratio.comparison/ratio_less.pass.cpp b/libcxx/test/std/utilities/ratio/ratio.comparison/ratio_less.pass.cpp index a80112ca4b8ed..45ba7cbf16cbd 100644 --- a/libcxx/test/std/utilities/ratio/ratio.comparison/ratio_less.pass.cpp +++ b/libcxx/test/std/utilities/ratio/ratio.comparison/ratio_less.pass.cpp @@ -21,7 +21,7 @@ void test() #endif } -int main() +int main(int, char**) { { typedef std::ratio<1, 1> R1; @@ -93,4 +93,6 @@ int main() typedef std::ratio<641981, 1339063> R2; test(); } + + return 0; } diff --git a/libcxx/test/std/utilities/ratio/ratio.comparison/ratio_less_equal.pass.cpp b/libcxx/test/std/utilities/ratio/ratio.comparison/ratio_less_equal.pass.cpp index c5dbdedc8f6a1..ebb8624a85f25 100644 --- a/libcxx/test/std/utilities/ratio/ratio.comparison/ratio_less_equal.pass.cpp +++ b/libcxx/test/std/utilities/ratio/ratio.comparison/ratio_less_equal.pass.cpp @@ -21,7 +21,7 @@ void test() #endif } -int main() +int main(int, char**) { { typedef std::ratio<1, 1> R1; @@ -63,4 +63,6 @@ int main() typedef std::ratio<1, -0x7FFFFFFFFFFFFFFFLL> R2; test(); } + + return 0; } diff --git a/libcxx/test/std/utilities/ratio/ratio.comparison/ratio_not_equal.pass.cpp b/libcxx/test/std/utilities/ratio/ratio.comparison/ratio_not_equal.pass.cpp index 68e6aba35d0f4..5000e73d3fcf8 100644 --- a/libcxx/test/std/utilities/ratio/ratio.comparison/ratio_not_equal.pass.cpp +++ b/libcxx/test/std/utilities/ratio/ratio.comparison/ratio_not_equal.pass.cpp @@ -21,7 +21,7 @@ void test() #endif } -int main() +int main(int, char**) { { typedef std::ratio<1, 1> R1; @@ -63,4 +63,6 @@ int main() typedef std::ratio<1, -0x7FFFFFFFFFFFFFFFLL> R2; test(); } + + return 0; } diff --git a/libcxx/test/std/utilities/ratio/ratio.ratio/ratio.pass.cpp b/libcxx/test/std/utilities/ratio/ratio.ratio/ratio.pass.cpp index bb3bb159bde2d..336d7d8e5b58d 100644 --- a/libcxx/test/std/utilities/ratio/ratio.ratio/ratio.pass.cpp +++ b/libcxx/test/std/utilities/ratio/ratio.ratio/ratio.pass.cpp @@ -18,7 +18,7 @@ void test() static_assert((std::ratio::den == eD), ""); } -int main() +int main(int, char**) { test<1, 1, 1, 1>(); test<1, 10, 1, 10>(); @@ -40,4 +40,6 @@ int main() test<-0x7FFFFFFFFFFFFFFFLL, 127, -72624976668147841LL, 1>(); test<0x7FFFFFFFFFFFFFFFLL, -127, -72624976668147841LL, 1>(); test<-0x7FFFFFFFFFFFFFFFLL, -127, 72624976668147841LL, 1>(); + + return 0; } diff --git a/libcxx/test/std/utilities/ratio/ratio.ratio/ratio1.fail.cpp b/libcxx/test/std/utilities/ratio/ratio.ratio/ratio1.fail.cpp index 1c143f659cb81..0841d858dc96c 100644 --- a/libcxx/test/std/utilities/ratio/ratio.ratio/ratio1.fail.cpp +++ b/libcxx/test/std/utilities/ratio/ratio.ratio/ratio1.fail.cpp @@ -11,7 +11,9 @@ #include #include -int main() +int main(int, char**) { const std::intmax_t t1 = std::ratio<1, 0>::num; + + return 0; } diff --git a/libcxx/test/std/utilities/ratio/ratio.ratio/ratio2.fail.cpp b/libcxx/test/std/utilities/ratio/ratio.ratio/ratio2.fail.cpp index bf56271fbbebe..f8bebc8624dfa 100644 --- a/libcxx/test/std/utilities/ratio/ratio.ratio/ratio2.fail.cpp +++ b/libcxx/test/std/utilities/ratio/ratio.ratio/ratio2.fail.cpp @@ -12,7 +12,9 @@ #include #include -int main() +int main(int, char**) { const std::intmax_t t1 = std::ratio<0x8000000000000000ULL, 1>::num; + + return 0; } diff --git a/libcxx/test/std/utilities/ratio/ratio.ratio/ratio3.fail.cpp b/libcxx/test/std/utilities/ratio/ratio.ratio/ratio3.fail.cpp index 6e44427f841bf..78310c6a2454e 100644 --- a/libcxx/test/std/utilities/ratio/ratio.ratio/ratio3.fail.cpp +++ b/libcxx/test/std/utilities/ratio/ratio.ratio/ratio3.fail.cpp @@ -12,7 +12,9 @@ #include #include -int main() +int main(int, char**) { const std::intmax_t t1 = std::ratio<1, 0x8000000000000000ULL>::num; + + return 0; } diff --git a/libcxx/test/std/utilities/ratio/ratio.si/nothing_to_do.pass.cpp b/libcxx/test/std/utilities/ratio/ratio.si/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/utilities/ratio/ratio.si/nothing_to_do.pass.cpp +++ b/libcxx/test/std/utilities/ratio/ratio.si/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/utilities/ratio/typedefs.pass.cpp b/libcxx/test/std/utilities/ratio/typedefs.pass.cpp index 3f54f555a89f6..8e24ff9749d35 100644 --- a/libcxx/test/std/utilities/ratio/typedefs.pass.cpp +++ b/libcxx/test/std/utilities/ratio/typedefs.pass.cpp @@ -10,7 +10,7 @@ #include -int main() +int main(int, char**) { static_assert(std::atto::num == 1 && std::atto::den == 1000000000000000000ULL, ""); static_assert(std::femto::num == 1 && std::femto::den == 1000000000000000ULL, ""); @@ -28,4 +28,6 @@ int main() static_assert(std::tera::num == 1000000000000ULL && std::tera::den == 1, ""); static_assert(std::peta::num == 1000000000000000ULL && std::peta::den == 1, ""); static_assert(std::exa::num == 1000000000000000000ULL && std::exa::den == 1, ""); + + return 0; } diff --git a/libcxx/test/std/utilities/smartptr/unique.ptr/nothing_to_do.pass.cpp b/libcxx/test/std/utilities/smartptr/unique.ptr/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/utilities/smartptr/unique.ptr/nothing_to_do.pass.cpp +++ b/libcxx/test/std/utilities/smartptr/unique.ptr/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/pointer_type.pass.cpp b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/pointer_type.pass.cpp index cb7a5bbf6abbb..f0ca5b0ea86f0 100644 --- a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/pointer_type.pass.cpp +++ b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/pointer_type.pass.cpp @@ -54,7 +54,9 @@ void test_basic() { #endif } -int main() { +int main(int, char**) { test_basic(); test_basic(); + + return 0; } diff --git a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.asgn/move.pass.cpp b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.asgn/move.pass.cpp index e11ec4b40042b..bc42afda3094b 100644 --- a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.asgn/move.pass.cpp +++ b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.asgn/move.pass.cpp @@ -107,7 +107,7 @@ void test_sfinae() { } -int main() { +int main(int, char**) { { test_basic(); test_sfinae(); @@ -116,4 +116,6 @@ int main() { test_basic(); test_sfinae(); } + + return 0; } diff --git a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.asgn/move_convert.pass.cpp b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.asgn/move_convert.pass.cpp index b89a452014d5e..c9ebdf6334488 100644 --- a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.asgn/move_convert.pass.cpp +++ b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.asgn/move_convert.pass.cpp @@ -405,7 +405,7 @@ void test_deleter_value_category() { } } -int main() { +int main(int, char**) { { test_sfinae(); test_noexcept(); @@ -416,4 +416,6 @@ int main() { test_noexcept(); test_deleter_value_category(); } + + return 0; } diff --git a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.asgn/move_convert.runtime.pass.cpp b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.asgn/move_convert.runtime.pass.cpp index 0800f869fe657..ce912546533f7 100644 --- a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.asgn/move_convert.runtime.pass.cpp +++ b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.asgn/move_convert.runtime.pass.cpp @@ -114,7 +114,9 @@ void test_sfinae() { } } -int main() { +int main(int, char**) { test_sfinae(); // FIXME: add tests + + return 0; } diff --git a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.asgn/move_convert.single.pass.cpp b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.asgn/move_convert.single.pass.cpp index 2b9bdb8c330f7..d5f46935a19ac 100644 --- a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.asgn/move_convert.single.pass.cpp +++ b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.asgn/move_convert.single.pass.cpp @@ -113,7 +113,7 @@ void test_sfinae() { } } -int main() { +int main(int, char**) { test_sfinae(); { std::unique_ptr bptr(new B); @@ -141,4 +141,6 @@ int main() { } assert(A::count == 0); assert(B::count == 0); + + return 0; } diff --git a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.asgn/null.pass.cpp b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.asgn/null.pass.cpp index 28ea9d7b04db8..ecba79dfd3278 100644 --- a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.asgn/null.pass.cpp +++ b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.asgn/null.pass.cpp @@ -32,7 +32,9 @@ void test_basic() { assert(A::count == 0); } -int main() { +int main(int, char**) { test_basic(); test_basic(); + + return 0; } diff --git a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.asgn/nullptr.pass.cpp b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.asgn/nullptr.pass.cpp index 91349cb300ecc..5cd44b2f64701 100644 --- a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.asgn/nullptr.pass.cpp +++ b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.asgn/nullptr.pass.cpp @@ -33,7 +33,9 @@ void test_basic() { assert(A::count == 0); } -int main() { +int main(int, char**) { test_basic(); test_basic(); + + return 0; } diff --git a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/auto_pointer.pass.cpp b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/auto_pointer.pass.cpp index e2fe7bb0dd38e..577a906fb0ef7 100644 --- a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/auto_pointer.pass.cpp +++ b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/auto_pointer.pass.cpp @@ -61,7 +61,7 @@ void test_sfinae() { } } -int main() { +int main(int, char**) { { B* p = new B; std::auto_ptr ap(p); @@ -93,4 +93,6 @@ int main() { } #endif test_sfinae(); + + return 0; } diff --git a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/default.pass.cpp b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/default.pass.cpp index 3145c0c9f0830..1bd53b9a9ca5e 100644 --- a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/default.pass.cpp +++ b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/default.pass.cpp @@ -94,7 +94,7 @@ DEFINE_AND_RUN_IS_INCOMPLETE_TEST({ doIncompleteTypeTest >(0); }) -int main() { +int main(int, char**) { { test_sfinae(); test_basic(); @@ -103,4 +103,6 @@ int main() { test_sfinae(); test_basic(); } + + return 0; } diff --git a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/move.pass.cpp b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/move.pass.cpp index f95897b9f927a..7c07b2ec9845a 100644 --- a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/move.pass.cpp +++ b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/move.pass.cpp @@ -159,7 +159,7 @@ void test_noexcept() { #endif } -int main() { +int main(int, char**) { { test_basic(); test_sfinae(); @@ -170,4 +170,6 @@ int main() { test_sfinae(); test_noexcept(); } + + return 0; } diff --git a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/move_convert.pass.cpp b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/move_convert.pass.cpp index f19943a46cc51..3d0bb1cd1f64c 100644 --- a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/move_convert.pass.cpp +++ b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/move_convert.pass.cpp @@ -204,7 +204,7 @@ void test_deleter_value_category() { } -int main() { +int main(int, char**) { { test_sfinae(); test_noexcept(); @@ -215,4 +215,6 @@ int main() { test_noexcept(); test_deleter_value_category(); } + + return 0; } diff --git a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/move_convert.runtime.pass.cpp b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/move_convert.runtime.pass.cpp index 010c2293a1603..bcf85b11031ec 100644 --- a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/move_convert.runtime.pass.cpp +++ b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/move_convert.runtime.pass.cpp @@ -77,6 +77,8 @@ void test_sfinae() { } -int main() { +int main(int, char**) { test_sfinae(); + + return 0; } diff --git a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/move_convert.single.pass.cpp b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/move_convert.single.pass.cpp index d269544c33146..1dcf0cf325c33 100644 --- a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/move_convert.single.pass.cpp +++ b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/move_convert.single.pass.cpp @@ -157,7 +157,7 @@ void test_noexcept() { } } -int main() { +int main(int, char**) { { test_sfinae(); test_noexcept(); @@ -244,4 +244,6 @@ int main() { } checkNoneAlive(); } + + return 0; } diff --git a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/null.pass.cpp b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/null.pass.cpp index e2694b38af815..d24538832763f 100644 --- a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/null.pass.cpp +++ b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/null.pass.cpp @@ -61,7 +61,7 @@ void test_pointer_deleter_ctor() { } } -int main() { +int main(int, char**) { { // test_pointer_ctor(); test_pointer_deleter_ctor(); @@ -70,4 +70,6 @@ int main() { test_pointer_ctor(); test_pointer_deleter_ctor(); } + + return 0; } diff --git a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/nullptr.pass.cpp b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/nullptr.pass.cpp index 8d3f94715c88f..9ec7f7a4e1d9b 100644 --- a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/nullptr.pass.cpp +++ b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/nullptr.pass.cpp @@ -93,7 +93,7 @@ DEFINE_AND_RUN_IS_INCOMPLETE_TEST({ checkNumIncompleteTypeAlive(0); }) -int main() { +int main(int, char**) { { test_basic(); test_sfinae(); @@ -102,4 +102,6 @@ int main() { test_basic(); test_sfinae(); } + + return 0; } diff --git a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/pointer.pass.cpp b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/pointer.pass.cpp index 55a5f48b2d33f..48d41fc5c0fa4 100644 --- a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/pointer.pass.cpp +++ b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/pointer.pass.cpp @@ -156,7 +156,7 @@ DEFINE_AND_RUN_IS_INCOMPLETE_TEST({ checkNumIncompleteTypeAlive(0); }) -int main() { +int main(int, char**) { { test_pointer(); test_derived(); @@ -167,4 +167,6 @@ int main() { test_sfinae(); test_sfinae_runtime(); } + + return 0; } diff --git a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/pointer_deleter.fail.cpp b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/pointer_deleter.fail.cpp index 4c5536d939c01..ccb4924d02409 100644 --- a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/pointer_deleter.fail.cpp +++ b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/pointer_deleter.fail.cpp @@ -22,7 +22,9 @@ struct Deleter { void operator()(int* p) const { delete p; } }; -int main() { +int main(int, char**) { // expected-error@+1 {{call to deleted constructor of 'std::unique_ptr}} std::unique_ptr s((int*)nullptr, Deleter()); + + return 0; } diff --git a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/pointer_deleter.pass.cpp b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/pointer_deleter.pass.cpp index 246af44f97fba..59861effb4eff 100644 --- a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/pointer_deleter.pass.cpp +++ b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/pointer_deleter.pass.cpp @@ -309,7 +309,7 @@ void test_nullptr() { #endif } -int main() { +int main(int, char**) { { test_basic(); test_nullptr(); @@ -324,4 +324,6 @@ int main() { test_sfinae_runtime(); test_noexcept(); } + + return 0; } diff --git a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.dtor/null.pass.cpp b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.dtor/null.pass.cpp index e7b916558998c..9ef48b2e4af76 100644 --- a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.dtor/null.pass.cpp +++ b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.dtor/null.pass.cpp @@ -41,7 +41,9 @@ void test_basic() { assert(d.state() == 0); } -int main() { +int main(int, char**) { test_basic(); test_basic(); + + return 0; } diff --git a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.modifiers/release.pass.cpp b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.modifiers/release.pass.cpp index cc2a8366e9d8d..f080165d561ad 100644 --- a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.modifiers/release.pass.cpp +++ b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.modifiers/release.pass.cpp @@ -49,7 +49,9 @@ void test_basic() { assert(A::count == 0); } -int main() { +int main(int, char**) { test_basic(); test_basic(); + + return 0; } diff --git a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.modifiers/reset.pass.cpp b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.modifiers/reset.pass.cpp index f271a7fb47b9b..46569918a5f98 100644 --- a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.modifiers/reset.pass.cpp +++ b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.modifiers/reset.pass.cpp @@ -102,7 +102,7 @@ void test_reset_no_arg() { assert(A::count == 0); } -int main() { +int main(int, char**) { { test_reset_pointer(); test_reset_nullptr(); @@ -113,4 +113,6 @@ int main() { test_reset_nullptr(); test_reset_no_arg(); } + + return 0; } diff --git a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.modifiers/reset.runtime.fail.cpp b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.modifiers/reset.runtime.fail.cpp index 98a4125ba771a..7e3085a5b0fbf 100644 --- a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.modifiers/reset.runtime.fail.cpp +++ b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.modifiers/reset.runtime.fail.cpp @@ -17,7 +17,7 @@ #include "unique_ptr_test_helper.h" -int main() { +int main(int, char**) { { std::unique_ptr p; p.reset(static_cast(nullptr)); // expected-error {{no matching member function for call to 'reset'}} @@ -26,4 +26,6 @@ int main() { std::unique_ptr p; p.reset(static_cast(nullptr)); // expected-error {{no matching member function for call to 'reset'}} } + + return 0; } diff --git a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.modifiers/reset.single.pass.cpp b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.modifiers/reset.single.pass.cpp index e9d43b6024767..4f5a519b798ba 100644 --- a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.modifiers/reset.single.pass.cpp +++ b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.modifiers/reset.single.pass.cpp @@ -17,7 +17,7 @@ #include "unique_ptr_test_helper.h" -int main() { +int main(int, char**) { { std::unique_ptr p(new A); assert(A::count == 1); @@ -42,4 +42,6 @@ int main() { } assert(A::count == 0); assert(B::count == 0); + + return 0; } diff --git a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.modifiers/reset_self.pass.cpp b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.modifiers/reset_self.pass.cpp index 129e3ea45b1df..d5e15aafe24c8 100644 --- a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.modifiers/reset_self.pass.cpp +++ b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.modifiers/reset_self.pass.cpp @@ -21,4 +21,6 @@ struct A { void reset() { ptr_.reset(); } }; -int main() { (new A)->reset(); } +int main(int, char**) { (new A)->reset(); + return 0; +} diff --git a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.modifiers/swap.pass.cpp b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.modifiers/swap.pass.cpp index 935ebab7fda38..35e997e30659f 100644 --- a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.modifiers/swap.pass.cpp +++ b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.modifiers/swap.pass.cpp @@ -81,7 +81,9 @@ void test_basic() { assert(TT::count == 0); } -int main() { +int main(int, char**) { test_basic(); test_basic(); + + return 0; } diff --git a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/dereference.runtime.fail.cpp b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/dereference.runtime.fail.cpp index 0fd37cbfa062e..8a5566b915c0f 100644 --- a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/dereference.runtime.fail.cpp +++ b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/dereference.runtime.fail.cpp @@ -15,9 +15,11 @@ #include #include -int main() { +int main(int, char**) { std::unique_ptr p(new int(3)); const std::unique_ptr& cp = p; TEST_IGNORE_NODISCARD (*p); // expected-error {{indirection requires pointer operand ('std::unique_ptr' invalid)}} TEST_IGNORE_NODISCARD (*cp); // expected-error {{indirection requires pointer operand ('const std::unique_ptr' invalid)}} + + return 0; } diff --git a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/dereference.single.pass.cpp b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/dereference.single.pass.cpp index 49cfccb6f85d7..254d88bb6cf66 100644 --- a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/dereference.single.pass.cpp +++ b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/dereference.single.pass.cpp @@ -15,7 +15,9 @@ #include #include -int main() { +int main(int, char**) { std::unique_ptr p(new int(3)); assert(*p == 3); + + return 0; } diff --git a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/explicit_bool.pass.cpp b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/explicit_bool.pass.cpp index ce45882a8bf1b..500821fb8175b 100644 --- a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/explicit_bool.pass.cpp +++ b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/explicit_bool.pass.cpp @@ -59,7 +59,9 @@ void test_basic() { } } -int main() { +int main(int, char**) { test_basic(); test_basic(); + + return 0; } diff --git a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/get.pass.cpp b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/get.pass.cpp index 76f2b4c67129a..1ff965f563e12 100644 --- a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/get.pass.cpp +++ b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/get.pass.cpp @@ -44,7 +44,9 @@ void test_basic() { } } -int main() { +int main(int, char**) { test_basic(); test_basic(); + + return 0; } diff --git a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/get_deleter.pass.cpp b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/get_deleter.pass.cpp index 31f33a265c67a..e440a95991c72 100644 --- a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/get_deleter.pass.cpp +++ b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/get_deleter.pass.cpp @@ -58,7 +58,9 @@ void test_basic() { } } -int main() { +int main(int, char**) { test_basic(); test_basic(); + + return 0; } diff --git a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/op_arrow.runtime.fail.cpp b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/op_arrow.runtime.fail.cpp index 886fc95d9deea..4fa94f137ce8e 100644 --- a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/op_arrow.runtime.fail.cpp +++ b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/op_arrow.runtime.fail.cpp @@ -19,7 +19,7 @@ struct V { int member; }; -int main() { +int main(int, char**) { std::unique_ptr p; std::unique_ptr const& cp = p; @@ -28,4 +28,6 @@ int main() { cp->member; // expected-error {{member reference type 'const std::unique_ptr' is not a pointer}} // expected-error@-1 {{no member named 'member'}} + + return 0; } diff --git a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/op_arrow.single.pass.cpp b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/op_arrow.single.pass.cpp index 0bc0c7718b800..f31ca6b286d12 100644 --- a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/op_arrow.single.pass.cpp +++ b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/op_arrow.single.pass.cpp @@ -21,7 +21,9 @@ struct A { A() : i_(7) {} }; -int main() { +int main(int, char**) { std::unique_ptr p(new A); assert(p->i_ == 7); + + return 0; } diff --git a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/op_subscript.runtime.pass.cpp b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/op_subscript.runtime.pass.cpp index 2b97f8fe56946..21e7e661688ab 100644 --- a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/op_subscript.runtime.pass.cpp +++ b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/op_subscript.runtime.pass.cpp @@ -33,7 +33,7 @@ class A { int A::next_ = 0; -int main() { +int main(int, char**) { std::unique_ptr p(new A[3]); assert(p[0] == 1); assert(p[1] == 2); @@ -44,4 +44,6 @@ int main() { assert(p[0] == 3); assert(p[1] == 2); assert(p[2] == 1); + + return 0; } diff --git a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/op_subscript.single.fail.cpp b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/op_subscript.single.fail.cpp index e5a960a6e804c..66286aa862088 100644 --- a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/op_subscript.single.fail.cpp +++ b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/op_subscript.single.fail.cpp @@ -15,9 +15,11 @@ #include #include -int main() { +int main(int, char**) { std::unique_ptr p(new int[3]); std::unique_ptr const& cp = p; p[0]; // expected-error {{type 'std::unique_ptr' does not provide a subscript operator}} cp[1]; // expected-error {{type 'const std::unique_ptr' does not provide a subscript operator}} + + return 0; } diff --git a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.create/make_unique.array.pass.cpp b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.create/make_unique.array.pass.cpp index a77194ecf95e5..715335eb1cd06 100644 --- a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.create/make_unique.array.pass.cpp +++ b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.create/make_unique.array.pass.cpp @@ -21,7 +21,7 @@ class foo { int val_; }; -int main() +int main(int, char**) { { auto p1 = std::make_unique(5); @@ -40,4 +40,6 @@ int main() for ( int i = 0; i < 7; ++i ) assert ( p3[i].get () == 3 ); } + + return 0; } diff --git a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.create/make_unique.array1.fail.cpp b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.create/make_unique.array1.fail.cpp index a0e256fcf1e62..56adccf176af9 100644 --- a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.create/make_unique.array1.fail.cpp +++ b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.create/make_unique.array1.fail.cpp @@ -10,7 +10,9 @@ #include #include -int main() +int main(int, char**) { auto up1 = std::make_unique("error"); // doesn't compile - no bound + + return 0; } diff --git a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.create/make_unique.array2.fail.cpp b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.create/make_unique.array2.fail.cpp index 0f366c6c3e2ba..fda45ab894611 100644 --- a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.create/make_unique.array2.fail.cpp +++ b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.create/make_unique.array2.fail.cpp @@ -10,7 +10,9 @@ #include #include -int main() +int main(int, char**) { auto up2 = std::make_unique(10, 20, 30, 40); + + return 0; } diff --git a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.create/make_unique.array3.fail.cpp b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.create/make_unique.array3.fail.cpp index 90622fed10791..9fa05c79d93fc 100644 --- a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.create/make_unique.array3.fail.cpp +++ b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.create/make_unique.array3.fail.cpp @@ -10,7 +10,9 @@ #include #include -int main() +int main(int, char**) { auto up3 = std::make_unique(); // this is deleted + + return 0; } diff --git a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.create/make_unique.array4.fail.cpp b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.create/make_unique.array4.fail.cpp index 5c10ac6bb24ff..d98f052b54ff7 100644 --- a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.create/make_unique.array4.fail.cpp +++ b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.create/make_unique.array4.fail.cpp @@ -10,7 +10,9 @@ #include #include -int main() +int main(int, char**) { auto up4 = std::make_unique(11, 22, 33, 44, 55); // deleted + + return 0; } diff --git a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.create/make_unique.single.pass.cpp b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.create/make_unique.single.pass.cpp index 4adf2e9ae4205..08062c122e185 100644 --- a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.create/make_unique.single.pass.cpp +++ b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.create/make_unique.single.pass.cpp @@ -11,7 +11,7 @@ #include #include -int main() +int main(int, char**) { { std::unique_ptr p1 = std::make_unique(1); @@ -28,4 +28,6 @@ int main() p2 = std::make_unique ( 6, 'z' ); assert ( *p2 == "zzzzzz" ); } + + return 0; } diff --git a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.dltr/nothing_to_do.pass.cpp b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.dltr/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.dltr/nothing_to_do.pass.cpp +++ b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.dltr/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.dflt/convert_ctor.pass.cpp b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.dflt/convert_ctor.pass.cpp index 85605a2fc4294..6b8407c571a4e 100644 --- a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.dflt/convert_ctor.pass.cpp +++ b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.dflt/convert_ctor.pass.cpp @@ -34,7 +34,7 @@ struct B int B::count = 0; -int main() +int main(int, char**) { std::default_delete d2; std::default_delete d1 = d2; @@ -44,4 +44,6 @@ int main() d1(p); assert(A::count == 0); assert(B::count == 0); + + return 0; } diff --git a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.dflt/default.pass.cpp b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.dflt/default.pass.cpp index c0a10e5e3ebe5..e7cbeaba5e0c1 100644 --- a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.dflt/default.pass.cpp +++ b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.dflt/default.pass.cpp @@ -23,11 +23,13 @@ struct A int A::count = 0; -int main() +int main(int, char**) { std::default_delete d; A* p = new A; assert(A::count == 1); d(p); assert(A::count == 0); + + return 0; } diff --git a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.dflt/incomplete.fail.cpp b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.dflt/incomplete.fail.cpp index b09640215a28c..75f02d7c6c6fd 100644 --- a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.dflt/incomplete.fail.cpp +++ b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.dflt/incomplete.fail.cpp @@ -17,9 +17,11 @@ struct A; -int main() +int main(int, char**) { std::default_delete d; A* p = 0; d(p); + + return 0; } diff --git a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.dflt/void.fail.cpp b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.dflt/void.fail.cpp index d03468c03800c..3bffeb5769497 100644 --- a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.dflt/void.fail.cpp +++ b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.dflt/void.fail.cpp @@ -15,9 +15,11 @@ #include #include -int main() +int main(int, char**) { std::default_delete d; const void* p = 0; d(p); + + return 0; } diff --git a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.dflt1/convert_ctor.fail.cpp b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.dflt1/convert_ctor.fail.cpp index 699d20ed4f7de..4a2bb5f7da77f 100644 --- a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.dflt1/convert_ctor.fail.cpp +++ b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.dflt1/convert_ctor.fail.cpp @@ -24,8 +24,10 @@ struct B { }; -int main() +int main(int, char**) { std::default_delete d2; std::default_delete d1 = d2; + + return 0; } diff --git a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.dflt1/convert_ctor.pass.cpp b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.dflt1/convert_ctor.pass.cpp index c2bfd31de1ce4..14e210598c11a 100644 --- a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.dflt1/convert_ctor.pass.cpp +++ b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.dflt1/convert_ctor.pass.cpp @@ -19,9 +19,11 @@ #include #include -int main() +int main(int, char**) { std::default_delete d1; std::default_delete d2 = d1; ((void)d2); + + return 0; } diff --git a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.dflt1/default.pass.cpp b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.dflt1/default.pass.cpp index 246cf9d8dc589..9b220462b67d0 100644 --- a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.dflt1/default.pass.cpp +++ b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.dflt1/default.pass.cpp @@ -25,11 +25,13 @@ struct A int A::count = 0; -int main() +int main(int, char**) { std::default_delete d; A* p = new A[3]; assert(A::count == 3); d(p); assert(A::count == 0); + + return 0; } diff --git a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.dflt1/incomplete.fail.cpp b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.dflt1/incomplete.fail.cpp index 48ac045526eda..54fe0fcf793b9 100644 --- a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.dflt1/incomplete.fail.cpp +++ b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.dflt1/incomplete.fail.cpp @@ -17,9 +17,11 @@ struct A; -int main() +int main(int, char**) { std::default_delete d; A* p = 0; d(p); + + return 0; } diff --git a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.general/nothing_to_do.pass.cpp b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.general/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.general/nothing_to_do.pass.cpp +++ b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.general/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.special/cmp_nullptr.pass.cpp b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.special/cmp_nullptr.pass.cpp index 774bc62d21bb9..52c399e64f721 100644 --- a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.special/cmp_nullptr.pass.cpp +++ b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.special/cmp_nullptr.pass.cpp @@ -40,7 +40,7 @@ void do_nothing(int*) {} -int main() +int main(int, char**) { const std::unique_ptr p1(new int(1)); assert(!(p1 == nullptr)); @@ -65,4 +65,6 @@ int main() assert(!(nullptr > p2)); assert( (p2 >= nullptr)); assert( (nullptr >= p2)); + + return 0; } diff --git a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.special/eq.pass.cpp b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.special/eq.pass.cpp index e1f3e762d6928..ce83b575031e6 100644 --- a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.special/eq.pass.cpp +++ b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.special/eq.pass.cpp @@ -44,7 +44,7 @@ struct B int B::count = 0; -int main() +int main(int, char**) { { const std::unique_ptr > p1(new A); @@ -82,4 +82,6 @@ int main() assert(p1 == p2); assert(!(p1 != p2)); } + + return 0; } diff --git a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.special/rel.pass.cpp b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.special/rel.pass.cpp index 167dd7826c5ef..5fad4beb6c6ea 100644 --- a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.special/rel.pass.cpp +++ b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.special/rel.pass.cpp @@ -52,7 +52,7 @@ struct B int B::count = 0; -int main() +int main(int, char**) { { const std::unique_ptr > p1(new A); @@ -96,4 +96,6 @@ int main() assert((p1 < p2) == !(p1 <= p2)); assert((p1 < p2) == !(p1 >= p2)); } + + return 0; } diff --git a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.special/swap.pass.cpp b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.special/swap.pass.cpp index 67cb170e4f9f3..4e45bbaef355e 100644 --- a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.special/swap.pass.cpp +++ b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.special/swap.pass.cpp @@ -44,7 +44,7 @@ struct NonSwappableDeleter { }; -int main() +int main(int, char**) { { A* p1 = new A(1); @@ -98,4 +98,6 @@ int main() std::swap(p, p2); } #endif + + return 0; } diff --git a/libcxx/test/std/utilities/template.bitset/bitset.cons/char_ptr_ctor.pass.cpp b/libcxx/test/std/utilities/template.bitset/bitset.cons/char_ptr_ctor.pass.cpp index 8219296523bdc..ee6405bde1e72 100644 --- a/libcxx/test/std/utilities/template.bitset/bitset.cons/char_ptr_ctor.pass.cpp +++ b/libcxx/test/std/utilities/template.bitset/bitset.cons/char_ptr_ctor.pass.cpp @@ -46,7 +46,7 @@ void test_char_pointer_ctor() } } -int main() +int main(int, char**) { test_char_pointer_ctor<0>(); test_char_pointer_ctor<1>(); @@ -57,4 +57,6 @@ int main() test_char_pointer_ctor<64>(); test_char_pointer_ctor<65>(); test_char_pointer_ctor<1000>(); + + return 0; } diff --git a/libcxx/test/std/utilities/template.bitset/bitset.cons/default.pass.cpp b/libcxx/test/std/utilities/template.bitset/bitset.cons/default.pass.cpp index 0c88ba36ab69f..bb5de6b18c72f 100644 --- a/libcxx/test/std/utilities/template.bitset/bitset.cons/default.pass.cpp +++ b/libcxx/test/std/utilities/template.bitset/bitset.cons/default.pass.cpp @@ -35,7 +35,7 @@ void test_default_ctor() } -int main() +int main(int, char**) { test_default_ctor<0>(); test_default_ctor<1>(); @@ -46,4 +46,6 @@ int main() test_default_ctor<64>(); test_default_ctor<65>(); test_default_ctor<1000>(); + + return 0; } diff --git a/libcxx/test/std/utilities/template.bitset/bitset.cons/string_ctor.pass.cpp b/libcxx/test/std/utilities/template.bitset/bitset.cons/string_ctor.pass.cpp index f5052b5efbb44..453db91f29db5 100644 --- a/libcxx/test/std/utilities/template.bitset/bitset.cons/string_ctor.pass.cpp +++ b/libcxx/test/std/utilities/template.bitset/bitset.cons/string_ctor.pass.cpp @@ -74,7 +74,7 @@ void test_string_ctor() } } -int main() +int main(int, char**) { test_string_ctor<0>(); test_string_ctor<1>(); @@ -85,4 +85,6 @@ int main() test_string_ctor<64>(); test_string_ctor<65>(); test_string_ctor<1000>(); + + return 0; } diff --git a/libcxx/test/std/utilities/template.bitset/bitset.cons/ull_ctor.pass.cpp b/libcxx/test/std/utilities/template.bitset/bitset.cons/ull_ctor.pass.cpp index a09ce57e34657..4697d8bd380a4 100644 --- a/libcxx/test/std/utilities/template.bitset/bitset.cons/ull_ctor.pass.cpp +++ b/libcxx/test/std/utilities/template.bitset/bitset.cons/ull_ctor.pass.cpp @@ -39,7 +39,7 @@ void test_val_ctor() #endif } -int main() +int main(int, char**) { test_val_ctor<0>(); test_val_ctor<1>(); @@ -50,4 +50,6 @@ int main() test_val_ctor<64>(); test_val_ctor<65>(); test_val_ctor<1000>(); + + return 0; } diff --git a/libcxx/test/std/utilities/template.bitset/bitset.hash/bitset.pass.cpp b/libcxx/test/std/utilities/template.bitset/bitset.hash/bitset.pass.cpp index 95347a2bc53de..dfac9d94af7c7 100644 --- a/libcxx/test/std/utilities/template.bitset/bitset.hash/bitset.pass.cpp +++ b/libcxx/test/std/utilities/template.bitset/bitset.hash/bitset.pass.cpp @@ -38,10 +38,12 @@ test() ((void)result); // Prevent unused warning } -int main() +int main(int, char**) { test<0>(); test<10>(); test<100>(); test<1000>(); + + return 0; } diff --git a/libcxx/test/std/utilities/template.bitset/bitset.hash/enabled_hash.pass.cpp b/libcxx/test/std/utilities/template.bitset/bitset.hash/enabled_hash.pass.cpp index 05d286f9058cf..a499b66fdb584 100644 --- a/libcxx/test/std/utilities/template.bitset/bitset.hash/enabled_hash.pass.cpp +++ b/libcxx/test/std/utilities/template.bitset/bitset.hash/enabled_hash.pass.cpp @@ -17,7 +17,7 @@ #include "poisoned_hash_helper.hpp" -int main() { +int main(int, char**) { test_library_hash_specializations_available(); { test_hash_enabled_for_type >(); @@ -25,4 +25,6 @@ int main() { test_hash_enabled_for_type >(); test_hash_enabled_for_type >(); } + + return 0; } diff --git a/libcxx/test/std/utilities/template.bitset/bitset.members/all.pass.cpp b/libcxx/test/std/utilities/template.bitset/bitset.members/all.pass.cpp index 4ac3bae75a8e3..fe9e0e0a363b6 100644 --- a/libcxx/test/std/utilities/template.bitset/bitset.members/all.pass.cpp +++ b/libcxx/test/std/utilities/template.bitset/bitset.members/all.pass.cpp @@ -28,7 +28,7 @@ void test_all() } } -int main() +int main(int, char**) { test_all<0>(); test_all<1>(); @@ -39,4 +39,6 @@ int main() test_all<64>(); test_all<65>(); test_all<1000>(); + + return 0; } diff --git a/libcxx/test/std/utilities/template.bitset/bitset.members/any.pass.cpp b/libcxx/test/std/utilities/template.bitset/bitset.members/any.pass.cpp index 0483a04ffa2a8..95b640178b973 100644 --- a/libcxx/test/std/utilities/template.bitset/bitset.members/any.pass.cpp +++ b/libcxx/test/std/utilities/template.bitset/bitset.members/any.pass.cpp @@ -31,7 +31,7 @@ void test_any() } } -int main() +int main(int, char**) { test_any<0>(); test_any<1>(); @@ -42,4 +42,6 @@ int main() test_any<64>(); test_any<65>(); test_any<1000>(); + + return 0; } diff --git a/libcxx/test/std/utilities/template.bitset/bitset.members/count.pass.cpp b/libcxx/test/std/utilities/template.bitset/bitset.members/count.pass.cpp index 9b66e93e25fea..5b04666bc2aeb 100644 --- a/libcxx/test/std/utilities/template.bitset/bitset.members/count.pass.cpp +++ b/libcxx/test/std/utilities/template.bitset/bitset.members/count.pass.cpp @@ -42,7 +42,7 @@ void test_count() assert(c1 == c2); } -int main() +int main(int, char**) { test_count<0>(); test_count<1>(); @@ -53,4 +53,6 @@ int main() test_count<64>(); test_count<65>(); test_count<1000>(); + + return 0; } diff --git a/libcxx/test/std/utilities/template.bitset/bitset.members/flip_all.pass.cpp b/libcxx/test/std/utilities/template.bitset/bitset.members/flip_all.pass.cpp index b3f515c0c3f41..14bd9eadf98a5 100644 --- a/libcxx/test/std/utilities/template.bitset/bitset.members/flip_all.pass.cpp +++ b/libcxx/test/std/utilities/template.bitset/bitset.members/flip_all.pass.cpp @@ -40,7 +40,7 @@ void test_flip_all() assert(v2[i] == ~v1[i]); } -int main() +int main(int, char**) { test_flip_all<0>(); test_flip_all<1>(); @@ -51,4 +51,6 @@ int main() test_flip_all<64>(); test_flip_all<65>(); test_flip_all<1000>(); + + return 0; } diff --git a/libcxx/test/std/utilities/template.bitset/bitset.members/flip_one.pass.cpp b/libcxx/test/std/utilities/template.bitset/bitset.members/flip_one.pass.cpp index 96569e565e624..235b7e1a7aecf 100644 --- a/libcxx/test/std/utilities/template.bitset/bitset.members/flip_one.pass.cpp +++ b/libcxx/test/std/utilities/template.bitset/bitset.members/flip_one.pass.cpp @@ -58,7 +58,7 @@ void test_flip_one(bool test_throws) #endif } -int main() +int main(int, char**) { test_flip_one<0>(true); test_flip_one<1>(true); @@ -69,4 +69,6 @@ int main() test_flip_one<64>(false); test_flip_one<65>(false); test_flip_one<1000>(false); + + return 0; } diff --git a/libcxx/test/std/utilities/template.bitset/bitset.members/index.pass.cpp b/libcxx/test/std/utilities/template.bitset/bitset.members/index.pass.cpp index fb68df5aa38bc..a6eea1450074a 100644 --- a/libcxx/test/std/utilities/template.bitset/bitset.members/index.pass.cpp +++ b/libcxx/test/std/utilities/template.bitset/bitset.members/index.pass.cpp @@ -60,7 +60,7 @@ void test_index_const() } } -int main() +int main(int, char**) { test_index_const<0>(); test_index_const<1>(); @@ -71,4 +71,6 @@ int main() test_index_const<64>(); test_index_const<65>(); test_index_const<1000>(); + + return 0; } diff --git a/libcxx/test/std/utilities/template.bitset/bitset.members/index_const.pass.cpp b/libcxx/test/std/utilities/template.bitset/bitset.members/index_const.pass.cpp index 54a1a31c0dbc7..9c6e28a88948a 100644 --- a/libcxx/test/std/utilities/template.bitset/bitset.members/index_const.pass.cpp +++ b/libcxx/test/std/utilities/template.bitset/bitset.members/index_const.pass.cpp @@ -42,7 +42,7 @@ void test_index_const() } } -int main() +int main(int, char**) { test_index_const<0>(); test_index_const<1>(); @@ -53,4 +53,6 @@ int main() test_index_const<64>(); test_index_const<65>(); test_index_const<1000>(); + + return 0; } diff --git a/libcxx/test/std/utilities/template.bitset/bitset.members/left_shift.pass.cpp b/libcxx/test/std/utilities/template.bitset/bitset.members/left_shift.pass.cpp index 27a20b4f64acd..59a7954a0df26 100644 --- a/libcxx/test/std/utilities/template.bitset/bitset.members/left_shift.pass.cpp +++ b/libcxx/test/std/utilities/template.bitset/bitset.members/left_shift.pass.cpp @@ -41,7 +41,7 @@ void test_left_shift() } } -int main() +int main(int, char**) { test_left_shift<0>(); test_left_shift<1>(); @@ -52,4 +52,6 @@ int main() test_left_shift<64>(); test_left_shift<65>(); test_left_shift<1000>(); + + return 0; } diff --git a/libcxx/test/std/utilities/template.bitset/bitset.members/left_shift_eq.pass.cpp b/libcxx/test/std/utilities/template.bitset/bitset.members/left_shift_eq.pass.cpp index c3becacd333ba..ad307ae826282 100644 --- a/libcxx/test/std/utilities/template.bitset/bitset.members/left_shift_eq.pass.cpp +++ b/libcxx/test/std/utilities/template.bitset/bitset.members/left_shift_eq.pass.cpp @@ -46,7 +46,7 @@ void test_left_shift() } } -int main() +int main(int, char**) { test_left_shift<0>(); test_left_shift<1>(); @@ -57,4 +57,6 @@ int main() test_left_shift<64>(); test_left_shift<65>(); test_left_shift<1000>(); + + return 0; } diff --git a/libcxx/test/std/utilities/template.bitset/bitset.members/none.pass.cpp b/libcxx/test/std/utilities/template.bitset/bitset.members/none.pass.cpp index d5004fbb68664..2588ac60f7b37 100644 --- a/libcxx/test/std/utilities/template.bitset/bitset.members/none.pass.cpp +++ b/libcxx/test/std/utilities/template.bitset/bitset.members/none.pass.cpp @@ -31,7 +31,7 @@ void test_none() } } -int main() +int main(int, char**) { test_none<0>(); test_none<1>(); @@ -42,4 +42,6 @@ int main() test_none<64>(); test_none<65>(); test_none<1000>(); + + return 0; } diff --git a/libcxx/test/std/utilities/template.bitset/bitset.members/not_all.pass.cpp b/libcxx/test/std/utilities/template.bitset/bitset.members/not_all.pass.cpp index 87c3efd1fc335..17b2d4293ac2a 100644 --- a/libcxx/test/std/utilities/template.bitset/bitset.members/not_all.pass.cpp +++ b/libcxx/test/std/utilities/template.bitset/bitset.members/not_all.pass.cpp @@ -39,7 +39,7 @@ void test_not_all() assert(v2[i] == ~v1[i]); } -int main() +int main(int, char**) { test_not_all<0>(); test_not_all<1>(); @@ -50,4 +50,6 @@ int main() test_not_all<64>(); test_not_all<65>(); test_not_all<1000>(); + + return 0; } diff --git a/libcxx/test/std/utilities/template.bitset/bitset.members/op_and_eq.pass.cpp b/libcxx/test/std/utilities/template.bitset/bitset.members/op_and_eq.pass.cpp index 38564bba5f82e..8560be2467e43 100644 --- a/libcxx/test/std/utilities/template.bitset/bitset.members/op_and_eq.pass.cpp +++ b/libcxx/test/std/utilities/template.bitset/bitset.members/op_and_eq.pass.cpp @@ -41,7 +41,7 @@ void test_op_and_eq() assert(v1[i] == (v3[i] && v2[i])); } -int main() +int main(int, char**) { test_op_and_eq<0>(); test_op_and_eq<1>(); @@ -52,4 +52,6 @@ int main() test_op_and_eq<64>(); test_op_and_eq<65>(); test_op_and_eq<1000>(); + + return 0; } diff --git a/libcxx/test/std/utilities/template.bitset/bitset.members/op_eq_eq.pass.cpp b/libcxx/test/std/utilities/template.bitset/bitset.members/op_eq_eq.pass.cpp index 7c428bce061c7..d2363023e6298 100644 --- a/libcxx/test/std/utilities/template.bitset/bitset.members/op_eq_eq.pass.cpp +++ b/libcxx/test/std/utilities/template.bitset/bitset.members/op_eq_eq.pass.cpp @@ -48,7 +48,7 @@ void test_equality() } } -int main() +int main(int, char**) { test_equality<0>(); test_equality<1>(); @@ -59,4 +59,6 @@ int main() test_equality<64>(); test_equality<65>(); test_equality<1000>(); + + return 0; } diff --git a/libcxx/test/std/utilities/template.bitset/bitset.members/op_or_eq.pass.cpp b/libcxx/test/std/utilities/template.bitset/bitset.members/op_or_eq.pass.cpp index f96c77bc2e68b..42d525e5b49e7 100644 --- a/libcxx/test/std/utilities/template.bitset/bitset.members/op_or_eq.pass.cpp +++ b/libcxx/test/std/utilities/template.bitset/bitset.members/op_or_eq.pass.cpp @@ -41,7 +41,7 @@ void test_op_or_eq() assert(v1[i] == (v3[i] || v2[i])); } -int main() +int main(int, char**) { test_op_or_eq<0>(); test_op_or_eq<1>(); @@ -52,4 +52,6 @@ int main() test_op_or_eq<64>(); test_op_or_eq<65>(); test_op_or_eq<1000>(); + + return 0; } diff --git a/libcxx/test/std/utilities/template.bitset/bitset.members/op_xor_eq.pass.cpp b/libcxx/test/std/utilities/template.bitset/bitset.members/op_xor_eq.pass.cpp index 647c5c028befd..44d58d8a15501 100644 --- a/libcxx/test/std/utilities/template.bitset/bitset.members/op_xor_eq.pass.cpp +++ b/libcxx/test/std/utilities/template.bitset/bitset.members/op_xor_eq.pass.cpp @@ -41,7 +41,7 @@ void test_op_xor_eq() assert(v1[i] == (v3[i] != v2[i])); } -int main() +int main(int, char**) { test_op_xor_eq<0>(); test_op_xor_eq<1>(); @@ -52,4 +52,6 @@ int main() test_op_xor_eq<64>(); test_op_xor_eq<65>(); test_op_xor_eq<1000>(); + + return 0; } diff --git a/libcxx/test/std/utilities/template.bitset/bitset.members/reset_all.pass.cpp b/libcxx/test/std/utilities/template.bitset/bitset.members/reset_all.pass.cpp index ae43bd7e99fb0..91041176ddb90 100644 --- a/libcxx/test/std/utilities/template.bitset/bitset.members/reset_all.pass.cpp +++ b/libcxx/test/std/utilities/template.bitset/bitset.members/reset_all.pass.cpp @@ -29,7 +29,7 @@ void test_reset_all() assert(!v[i]); } -int main() +int main(int, char**) { test_reset_all<0>(); test_reset_all<1>(); @@ -40,4 +40,6 @@ int main() test_reset_all<64>(); test_reset_all<65>(); test_reset_all<1000>(); + + return 0; } diff --git a/libcxx/test/std/utilities/template.bitset/bitset.members/reset_one.pass.cpp b/libcxx/test/std/utilities/template.bitset/bitset.members/reset_one.pass.cpp index ec92f6656b32c..1abb4914bfa30 100644 --- a/libcxx/test/std/utilities/template.bitset/bitset.members/reset_one.pass.cpp +++ b/libcxx/test/std/utilities/template.bitset/bitset.members/reset_one.pass.cpp @@ -43,7 +43,7 @@ void test_reset_one(bool test_throws) #endif } -int main() +int main(int, char**) { test_reset_one<0>(true); test_reset_one<1>(true); @@ -54,4 +54,6 @@ int main() test_reset_one<64>(false); test_reset_one<65>(false); test_reset_one<1000>(false); + + return 0; } diff --git a/libcxx/test/std/utilities/template.bitset/bitset.members/right_shift.pass.cpp b/libcxx/test/std/utilities/template.bitset/bitset.members/right_shift.pass.cpp index a94f9bf0921ae..e05c3316bb5e5 100644 --- a/libcxx/test/std/utilities/template.bitset/bitset.members/right_shift.pass.cpp +++ b/libcxx/test/std/utilities/template.bitset/bitset.members/right_shift.pass.cpp @@ -41,7 +41,7 @@ void test_right_shift() } } -int main() +int main(int, char**) { test_right_shift<0>(); test_right_shift<1>(); @@ -52,4 +52,6 @@ int main() test_right_shift<64>(); test_right_shift<65>(); test_right_shift<1000>(); + + return 0; } diff --git a/libcxx/test/std/utilities/template.bitset/bitset.members/right_shift_eq.pass.cpp b/libcxx/test/std/utilities/template.bitset/bitset.members/right_shift_eq.pass.cpp index 387f68249e330..f23fbeebc8787 100644 --- a/libcxx/test/std/utilities/template.bitset/bitset.members/right_shift_eq.pass.cpp +++ b/libcxx/test/std/utilities/template.bitset/bitset.members/right_shift_eq.pass.cpp @@ -46,7 +46,7 @@ void test_right_shift() } } -int main() +int main(int, char**) { test_right_shift<0>(); test_right_shift<1>(); @@ -57,4 +57,6 @@ int main() test_right_shift<64>(); test_right_shift<65>(); test_right_shift<1000>(); + + return 0; } diff --git a/libcxx/test/std/utilities/template.bitset/bitset.members/set_all.pass.cpp b/libcxx/test/std/utilities/template.bitset/bitset.members/set_all.pass.cpp index 68f8c58bb2c44..ca4708cc43e12 100644 --- a/libcxx/test/std/utilities/template.bitset/bitset.members/set_all.pass.cpp +++ b/libcxx/test/std/utilities/template.bitset/bitset.members/set_all.pass.cpp @@ -28,7 +28,7 @@ void test_set_all() assert(v[i]); } -int main() +int main(int, char**) { test_set_all<0>(); test_set_all<1>(); @@ -39,4 +39,6 @@ int main() test_set_all<64>(); test_set_all<65>(); test_set_all<1000>(); + + return 0; } diff --git a/libcxx/test/std/utilities/template.bitset/bitset.members/set_one.pass.cpp b/libcxx/test/std/utilities/template.bitset/bitset.members/set_one.pass.cpp index f660a440947f6..f723eebe08515 100644 --- a/libcxx/test/std/utilities/template.bitset/bitset.members/set_one.pass.cpp +++ b/libcxx/test/std/utilities/template.bitset/bitset.members/set_one.pass.cpp @@ -52,7 +52,7 @@ void test_set_one(bool test_throws) #endif } -int main() +int main(int, char**) { test_set_one<0>(true); test_set_one<1>(true); @@ -63,4 +63,6 @@ int main() test_set_one<64>(false); test_set_one<65>(false); test_set_one<1000>(false); + + return 0; } diff --git a/libcxx/test/std/utilities/template.bitset/bitset.members/size.pass.cpp b/libcxx/test/std/utilities/template.bitset/bitset.members/size.pass.cpp index f1719ab2e4162..41318d99eef88 100644 --- a/libcxx/test/std/utilities/template.bitset/bitset.members/size.pass.cpp +++ b/libcxx/test/std/utilities/template.bitset/bitset.members/size.pass.cpp @@ -18,7 +18,7 @@ void test_size() assert(v.size() == N); } -int main() +int main(int, char**) { test_size<0>(); test_size<1>(); @@ -29,4 +29,6 @@ int main() test_size<64>(); test_size<65>(); test_size<1000>(); + + return 0; } diff --git a/libcxx/test/std/utilities/template.bitset/bitset.members/test.pass.cpp b/libcxx/test/std/utilities/template.bitset/bitset.members/test.pass.cpp index df3ee16be7e15..5d566f5d0cf19 100644 --- a/libcxx/test/std/utilities/template.bitset/bitset.members/test.pass.cpp +++ b/libcxx/test/std/utilities/template.bitset/bitset.members/test.pass.cpp @@ -53,7 +53,7 @@ void test_test(bool test_throws) #endif } -int main() +int main(int, char**) { test_test<0>(true); test_test<1>(true); @@ -64,4 +64,6 @@ int main() test_test<64>(false); test_test<65>(false); test_test<1000>(false); + + return 0; } diff --git a/libcxx/test/std/utilities/template.bitset/bitset.members/to_string.pass.cpp b/libcxx/test/std/utilities/template.bitset/bitset.members/to_string.pass.cpp index d897944729651..3897e10375f7e 100644 --- a/libcxx/test/std/utilities/template.bitset/bitset.members/to_string.pass.cpp +++ b/libcxx/test/std/utilities/template.bitset/bitset.members/to_string.pass.cpp @@ -153,7 +153,7 @@ void test_to_string() } } -int main() +int main(int, char**) { test_to_string<0>(); test_to_string<1>(); @@ -164,4 +164,6 @@ int main() test_to_string<64>(); test_to_string<65>(); test_to_string<1000>(); + + return 0; } diff --git a/libcxx/test/std/utilities/template.bitset/bitset.members/to_ullong.pass.cpp b/libcxx/test/std/utilities/template.bitset/bitset.members/to_ullong.pass.cpp index 1ea9b0f81f155..c43ef90aeefbe 100644 --- a/libcxx/test/std/utilities/template.bitset/bitset.members/to_ullong.pass.cpp +++ b/libcxx/test/std/utilities/template.bitset/bitset.members/to_ullong.pass.cpp @@ -44,7 +44,7 @@ void test_to_ullong() } } -int main() +int main(int, char**) { // test_to_ullong<0>(); test_to_ullong<1>(); @@ -55,4 +55,6 @@ int main() test_to_ullong<64>(); test_to_ullong<65>(); test_to_ullong<1000>(); + + return 0; } diff --git a/libcxx/test/std/utilities/template.bitset/bitset.members/to_ulong.pass.cpp b/libcxx/test/std/utilities/template.bitset/bitset.members/to_ulong.pass.cpp index 71910f322b28f..c6cf6b19a1851 100644 --- a/libcxx/test/std/utilities/template.bitset/bitset.members/to_ulong.pass.cpp +++ b/libcxx/test/std/utilities/template.bitset/bitset.members/to_ulong.pass.cpp @@ -46,7 +46,7 @@ void test_to_ulong() } } -int main() +int main(int, char**) { test_to_ulong<0>(); test_to_ulong<1>(); @@ -57,4 +57,6 @@ int main() test_to_ulong<64>(); test_to_ulong<65>(); test_to_ulong<1000>(); + + return 0; } diff --git a/libcxx/test/std/utilities/template.bitset/bitset.operators/op_and.pass.cpp b/libcxx/test/std/utilities/template.bitset/bitset.operators/op_and.pass.cpp index af69d3951b746..21d5d08058ca7 100644 --- a/libcxx/test/std/utilities/template.bitset/bitset.operators/op_and.pass.cpp +++ b/libcxx/test/std/utilities/template.bitset/bitset.operators/op_and.pass.cpp @@ -39,7 +39,7 @@ void test_op_and() assert((v1 & v2) == (v3 &= v2)); } -int main() +int main(int, char**) { test_op_and<0>(); test_op_and<1>(); @@ -50,4 +50,6 @@ int main() test_op_and<64>(); test_op_and<65>(); test_op_and<1000>(); + + return 0; } diff --git a/libcxx/test/std/utilities/template.bitset/bitset.operators/op_not.pass.cpp b/libcxx/test/std/utilities/template.bitset/bitset.operators/op_not.pass.cpp index 8d9b2bdfb29d4..4a71385a941fa 100644 --- a/libcxx/test/std/utilities/template.bitset/bitset.operators/op_not.pass.cpp +++ b/libcxx/test/std/utilities/template.bitset/bitset.operators/op_not.pass.cpp @@ -39,7 +39,7 @@ void test_op_not() assert((v1 ^ v2) == (v3 ^= v2)); } -int main() +int main(int, char**) { test_op_not<0>(); test_op_not<1>(); @@ -50,4 +50,6 @@ int main() test_op_not<64>(); test_op_not<65>(); test_op_not<1000>(); + + return 0; } diff --git a/libcxx/test/std/utilities/template.bitset/bitset.operators/op_or.pass.cpp b/libcxx/test/std/utilities/template.bitset/bitset.operators/op_or.pass.cpp index c2cada15ea15f..bc4847c19e409 100644 --- a/libcxx/test/std/utilities/template.bitset/bitset.operators/op_or.pass.cpp +++ b/libcxx/test/std/utilities/template.bitset/bitset.operators/op_or.pass.cpp @@ -39,7 +39,7 @@ void test_op_or() assert((v1 | v2) == (v3 |= v2)); } -int main() +int main(int, char**) { test_op_or<0>(); test_op_or<1>(); @@ -50,4 +50,6 @@ int main() test_op_or<64>(); test_op_or<65>(); test_op_or<1000>(); + + return 0; } diff --git a/libcxx/test/std/utilities/template.bitset/bitset.operators/stream_in.pass.cpp b/libcxx/test/std/utilities/template.bitset/bitset.operators/stream_in.pass.cpp index 714fcd3ed2fb6..9abe19c7c87aa 100644 --- a/libcxx/test/std/utilities/template.bitset/bitset.operators/stream_in.pass.cpp +++ b/libcxx/test/std/utilities/template.bitset/bitset.operators/stream_in.pass.cpp @@ -16,10 +16,12 @@ #include #include -int main() +int main(int, char**) { std::istringstream in("01011010"); std::bitset<8> b; in >> b; assert(b.to_ulong() == 0x5A); + + return 0; } diff --git a/libcxx/test/std/utilities/template.bitset/bitset.operators/stream_out.pass.cpp b/libcxx/test/std/utilities/template.bitset/bitset.operators/stream_out.pass.cpp index 06a36604ac485..2c4ce1e48817e 100644 --- a/libcxx/test/std/utilities/template.bitset/bitset.operators/stream_out.pass.cpp +++ b/libcxx/test/std/utilities/template.bitset/bitset.operators/stream_out.pass.cpp @@ -16,10 +16,12 @@ #include #include -int main() +int main(int, char**) { std::ostringstream os; std::bitset<8> b(0x5A); os << b; assert(os.str() == "01011010"); + + return 0; } diff --git a/libcxx/test/std/utilities/template.bitset/includes.pass.cpp b/libcxx/test/std/utilities/template.bitset/includes.pass.cpp index c98b150e792aa..90695ed3dccc5 100644 --- a/libcxx/test/std/utilities/template.bitset/includes.pass.cpp +++ b/libcxx/test/std/utilities/template.bitset/includes.pass.cpp @@ -12,7 +12,7 @@ template void test_typedef() {} -int main() +int main(int, char**) { { // test for std::string s; ((void)s); @@ -24,4 +24,6 @@ int main() test_typedef(); test_typedef(); } + + return 0; } diff --git a/libcxx/test/std/utilities/time/date.time/ctime.pass.cpp b/libcxx/test/std/utilities/time/date.time/ctime.pass.cpp index 3fa04b7799965..ac29fd7818049 100644 --- a/libcxx/test/std/utilities/time/date.time/ctime.pass.cpp +++ b/libcxx/test/std/utilities/time/date.time/ctime.pass.cpp @@ -29,7 +29,7 @@ #pragma GCC diagnostic ignored "-Wformat-zero-length" #endif -int main() +int main(int, char**) { std::clock_t c = 0; std::size_t s = 0; @@ -60,4 +60,6 @@ int main() static_assert((std::is_same::value), ""); #endif static_assert((std::is_same::value), ""); + + return 0; } diff --git a/libcxx/test/std/utilities/time/days.pass.cpp b/libcxx/test/std/utilities/time/days.pass.cpp index a22f97b8f527f..43b53ea33cb89 100644 --- a/libcxx/test/std/utilities/time/days.pass.cpp +++ b/libcxx/test/std/utilities/time/days.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { typedef std::chrono::days D; typedef D::rep Rep; @@ -24,4 +24,6 @@ int main() static_assert(std::is_integral::value, ""); static_assert(std::numeric_limits::digits >= 25, ""); static_assert(std::is_same_v, std::chrono::hours::period>>, ""); + + return 0; } diff --git a/libcxx/test/std/utilities/time/hours.pass.cpp b/libcxx/test/std/utilities/time/hours.pass.cpp index e04888f2e2a21..97fc2621b6acb 100644 --- a/libcxx/test/std/utilities/time/hours.pass.cpp +++ b/libcxx/test/std/utilities/time/hours.pass.cpp @@ -14,7 +14,7 @@ #include #include -int main() +int main(int, char**) { typedef std::chrono::hours D; typedef D::rep Rep; @@ -23,4 +23,6 @@ int main() static_assert(std::is_integral::value, ""); static_assert(std::numeric_limits::digits >= 22, ""); static_assert((std::is_same >::value), ""); + + return 0; } diff --git a/libcxx/test/std/utilities/time/microseconds.pass.cpp b/libcxx/test/std/utilities/time/microseconds.pass.cpp index 20e12a9a288b9..ded1c22fe14f9 100644 --- a/libcxx/test/std/utilities/time/microseconds.pass.cpp +++ b/libcxx/test/std/utilities/time/microseconds.pass.cpp @@ -14,7 +14,7 @@ #include #include -int main() +int main(int, char**) { typedef std::chrono::microseconds D; typedef D::rep Rep; @@ -23,4 +23,6 @@ int main() static_assert(std::is_integral::value, ""); static_assert(std::numeric_limits::digits >= 54, ""); static_assert((std::is_same::value), ""); + + return 0; } diff --git a/libcxx/test/std/utilities/time/milliseconds.pass.cpp b/libcxx/test/std/utilities/time/milliseconds.pass.cpp index 6183b929f1987..b1fe99e1209f3 100644 --- a/libcxx/test/std/utilities/time/milliseconds.pass.cpp +++ b/libcxx/test/std/utilities/time/milliseconds.pass.cpp @@ -14,7 +14,7 @@ #include #include -int main() +int main(int, char**) { typedef std::chrono::milliseconds D; typedef D::rep Rep; @@ -23,4 +23,6 @@ int main() static_assert(std::is_integral::value, ""); static_assert(std::numeric_limits::digits >= 44, ""); static_assert((std::is_same::value), ""); + + return 0; } diff --git a/libcxx/test/std/utilities/time/minutes.pass.cpp b/libcxx/test/std/utilities/time/minutes.pass.cpp index 413d8cd6f697c..23f0bf2877dee 100644 --- a/libcxx/test/std/utilities/time/minutes.pass.cpp +++ b/libcxx/test/std/utilities/time/minutes.pass.cpp @@ -14,7 +14,7 @@ #include #include -int main() +int main(int, char**) { typedef std::chrono::minutes D; typedef D::rep Rep; @@ -23,4 +23,6 @@ int main() static_assert(std::is_integral::value, ""); static_assert(std::numeric_limits::digits >= 28, ""); static_assert((std::is_same >::value), ""); + + return 0; } diff --git a/libcxx/test/std/utilities/time/months.pass.cpp b/libcxx/test/std/utilities/time/months.pass.cpp index ff40823f1ead1..b14b2fab533ed 100644 --- a/libcxx/test/std/utilities/time/months.pass.cpp +++ b/libcxx/test/std/utilities/time/months.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { typedef std::chrono::months D; typedef D::rep Rep; @@ -25,4 +25,6 @@ int main() static_assert(std::is_integral::value, ""); static_assert(std::numeric_limits::digits >= 20, ""); static_assert(std::is_same_v>>, ""); + + return 0; } diff --git a/libcxx/test/std/utilities/time/nanoseconds.pass.cpp b/libcxx/test/std/utilities/time/nanoseconds.pass.cpp index c14389da728ee..d58a375c2a59b 100644 --- a/libcxx/test/std/utilities/time/nanoseconds.pass.cpp +++ b/libcxx/test/std/utilities/time/nanoseconds.pass.cpp @@ -14,7 +14,7 @@ #include #include -int main() +int main(int, char**) { typedef std::chrono::nanoseconds D; typedef D::rep Rep; @@ -23,4 +23,6 @@ int main() static_assert(std::is_integral::value, ""); static_assert(std::numeric_limits::digits >= 63, ""); static_assert((std::is_same::value), ""); + + return 0; } diff --git a/libcxx/test/std/utilities/time/seconds.pass.cpp b/libcxx/test/std/utilities/time/seconds.pass.cpp index bd2d6d2b3f576..45a3f1d8e7fb2 100644 --- a/libcxx/test/std/utilities/time/seconds.pass.cpp +++ b/libcxx/test/std/utilities/time/seconds.pass.cpp @@ -14,7 +14,7 @@ #include #include -int main() +int main(int, char**) { typedef std::chrono::seconds D; typedef D::rep Rep; @@ -23,4 +23,6 @@ int main() static_assert(std::is_integral::value, ""); static_assert(std::numeric_limits::digits >= 34, ""); static_assert((std::is_same >::value), ""); + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/nothing_to_do.pass.cpp b/libcxx/test/std/utilities/time/time.cal/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/utilities/time/time.cal/nothing_to_do.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.day/time.cal.day.members/ctor.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.day/time.cal.day.members/ctor.pass.cpp index 3a3978cb0828c..5c945fab75ec6 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.day/time.cal.day.members/ctor.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.day/time.cal.day.members/ctor.pass.cpp @@ -23,7 +23,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { using day = std::chrono::day; @@ -42,4 +42,6 @@ int main() day day(i); assert(static_cast(day) == i); } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.day/time.cal.day.members/decrement.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.day/time.cal.day.members/decrement.pass.cpp index c53af65112e06..f5323f65956bd 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.day/time.cal.day.members/decrement.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.day/time.cal.day.members/decrement.pass.cpp @@ -30,7 +30,7 @@ constexpr bool testConstexpr() return true; } -int main() +int main(int, char**) { using day = std::chrono::day; ASSERT_NOEXCEPT(--(std::declval()) ); @@ -48,4 +48,6 @@ int main() assert(static_cast(day--) == i - 1); assert(static_cast(day) == i - 2); } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.day/time.cal.day.members/increment.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.day/time.cal.day.members/increment.pass.cpp index b26d2285aa401..0be8c847f302e 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.day/time.cal.day.members/increment.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.day/time.cal.day.members/increment.pass.cpp @@ -30,7 +30,7 @@ constexpr bool testConstexpr() return true; } -int main() +int main(int, char**) { using day = std::chrono::day; ASSERT_NOEXCEPT(++(std::declval()) ); @@ -48,4 +48,6 @@ int main() assert(static_cast(day++) == i + 1); assert(static_cast(day) == i + 2); } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.day/time.cal.day.members/ok.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.day/time.cal.day.members/ok.pass.cpp index 8a04298ab3cd5..131df7533c6af 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.day/time.cal.day.members/ok.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.day/time.cal.day.members/ok.pass.cpp @@ -19,7 +19,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { using day = std::chrono::day; ASSERT_NOEXCEPT( std::declval().ok()); @@ -33,4 +33,6 @@ int main() assert(day{i}.ok()); for (unsigned i = 32; i <= 255; ++i) assert(!day{i}.ok()); + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.day/time.cal.day.members/plus_minus_equal.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.day/time.cal.day.members/plus_minus_equal.pass.cpp index 42f12af552eab..d182d6c926f0e 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.day/time.cal.day.members/plus_minus_equal.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.day/time.cal.day.members/plus_minus_equal.pass.cpp @@ -32,7 +32,7 @@ constexpr bool testConstexpr() return true; } -int main() +int main(int, char**) { using day = std::chrono::day; using days = std::chrono::days; @@ -53,4 +53,6 @@ int main() assert(static_cast(day -= days{12}) == i + 10); assert(static_cast(day) == i + 10); } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.day/time.cal.day.nonmembers/comparisons.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.day/time.cal.day.nonmembers/comparisons.pass.cpp index 6b8a42772726a..75bc4cf529af0 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.day/time.cal.day.nonmembers/comparisons.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.day/time.cal.day.nonmembers/comparisons.pass.cpp @@ -23,7 +23,7 @@ #include "test_macros.h" #include "test_comparisons.h" -int main() +int main(int, char**) { using day = std::chrono::day; @@ -40,4 +40,6 @@ int main() for (unsigned i = 1; i < 10; ++i) for (unsigned j = 1; j < 10; ++j) assert(testComparisons6Values(i, j)); + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.day/time.cal.day.nonmembers/literals.fail.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.day/time.cal.day.nonmembers/literals.fail.cpp index 36352fa35d66b..6331bcf1b2307 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.day/time.cal.day.nonmembers/literals.fail.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.day/time.cal.day.nonmembers/literals.fail.cpp @@ -20,8 +20,10 @@ #include "test_macros.h" -int main() +int main(int, char**) { using day = std::chrono::day; day d1 = 4d; // expected-error-re {{no matching literal operator for call to 'operator""d' {{.*}}}} + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.day/time.cal.day.nonmembers/literals.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.day/time.cal.day.nonmembers/literals.pass.cpp index b3febd4ebe243..a887736f6e803 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.day/time.cal.day.nonmembers/literals.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.day/time.cal.day.nonmembers/literals.pass.cpp @@ -20,7 +20,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { { using namespace std::chrono; @@ -43,4 +43,6 @@ int main() assert (d1 == std::chrono::day(4)); } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.day/time.cal.day.nonmembers/minus.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.day/time.cal.day.nonmembers/minus.pass.cpp index 4953d1afe4ef7..e8ade305adc64 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.day/time.cal.day.nonmembers/minus.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.day/time.cal.day.nonmembers/minus.pass.cpp @@ -33,7 +33,7 @@ constexpr bool testConstexpr() return true; } -int main() +int main(int, char**) { using day = std::chrono::day; using days = std::chrono::days; @@ -54,4 +54,6 @@ int main() assert(static_cast(d1) == 12 - i); assert(off.count() == static_cast(12 - i)); // days is signed } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.day/time.cal.day.nonmembers/plus.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.day/time.cal.day.nonmembers/plus.pass.cpp index 10cec0a62d887..e219c7d3c7ae6 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.day/time.cal.day.nonmembers/plus.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.day/time.cal.day.nonmembers/plus.pass.cpp @@ -33,7 +33,7 @@ constexpr bool testConstexpr() return true; } -int main() +int main(int, char**) { using day = std::chrono::day; using days = std::chrono::days; @@ -55,4 +55,6 @@ int main() assert(static_cast(d1) == i + 12); assert(static_cast(d2) == i + 12); } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.day/time.cal.day.nonmembers/streaming.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.day/time.cal.day.nonmembers/streaming.pass.cpp index ad3d4f3f9e6c1..23ce736c61d87 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.day/time.cal.day.nonmembers/streaming.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.day/time.cal.day.nonmembers/streaming.pass.cpp @@ -48,8 +48,10 @@ #include "test_macros.h" -int main() +int main(int, char**) { using day = std::chrono::day; std::cout << day{1}; + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.day/types.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.day/types.pass.cpp index d437a6ae3f49d..3c26c57535f30 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.day/types.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.day/types.pass.cpp @@ -16,10 +16,12 @@ #include "test_macros.h" -int main() +int main(int, char**) { using day = std::chrono::day; static_assert(std::is_trivially_copyable_v, ""); static_assert(std::is_standard_layout_v, ""); + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.last/types.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.last/types.pass.cpp index 10396919bd446..084a6aa8dc59e 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.last/types.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.last/types.pass.cpp @@ -21,7 +21,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { using last_spec = std::chrono::last_spec; @@ -29,4 +29,6 @@ int main() static_assert(std::is_trivially_copyable_v, ""); static_assert(std::is_standard_layout_v, ""); + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.md/time.cal.md.members/ctor.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.md/time.cal.md.members/ctor.pass.cpp index f3dadd2f6b02a..48642987a7c12 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.md/time.cal.md.members/ctor.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.md/time.cal.md.members/ctor.pass.cpp @@ -25,7 +25,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { using day = std::chrono::day; using month = std::chrono::month; @@ -43,4 +43,6 @@ int main() static_assert( md1.month() == std::chrono::January, ""); static_assert( md1.day() == day{4}, ""); static_assert( md1.ok(), ""); + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.md/time.cal.md.members/day.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.md/time.cal.md.members/day.pass.cpp index c9c247d508f3e..7137433a9fb63 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.md/time.cal.md.members/day.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.md/time.cal.md.members/day.pass.cpp @@ -19,7 +19,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { using day = std::chrono::day; using month_day = std::chrono::month_day; @@ -34,4 +34,6 @@ int main() month_day md(std::chrono::March, day{i}); assert( static_cast(md.day()) == i); } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.md/time.cal.md.members/month.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.md/time.cal.md.members/month.pass.cpp index e1b46190f0a3b..b4744e6d4c731 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.md/time.cal.md.members/month.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.md/time.cal.md.members/month.pass.cpp @@ -19,7 +19,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { using day = std::chrono::day; using month = std::chrono::month; @@ -35,4 +35,6 @@ int main() month_day md(month{i}, day{1}); assert( static_cast(md.month()) == i); } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.md/time.cal.md.members/ok.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.md/time.cal.md.members/ok.pass.cpp index 649f099686718..5e4c0082f5fdb 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.md/time.cal.md.members/ok.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.md/time.cal.md.members/ok.pass.cpp @@ -21,7 +21,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { using day = std::chrono::day; using month = std::chrono::month; @@ -51,4 +51,6 @@ int main() // If the month is not ok, all the days are bad for (unsigned i = 1; i <= 35; ++i) assert(!(month_day{month{13}, day{i}}.ok())); + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.md/time.cal.md.nonmembers/comparisons.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.md/time.cal.md.nonmembers/comparisons.pass.cpp index c186f594c64f9..d7e535a72e7c7 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.md/time.cal.md.nonmembers/comparisons.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.md/time.cal.md.nonmembers/comparisons.pass.cpp @@ -26,7 +26,7 @@ #include "test_macros.h" #include "test_comparisons.h" -int main() +int main(int, char**) { using day = std::chrono::day; using month = std::chrono::month; @@ -66,4 +66,6 @@ int main() month_day{month{2}, day{j}}, i == j, i < j ))); + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.md/time.cal.md.nonmembers/streaming.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.md/time.cal.md.nonmembers/streaming.pass.cpp index dbebdfa7d0e8c..8eef5f0309562 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.md/time.cal.md.nonmembers/streaming.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.md/time.cal.md.nonmembers/streaming.pass.cpp @@ -31,10 +31,12 @@ #include #include "test_macros.h" -int main() +int main(int, char**) { using month_day = std::chrono::month_day; using month = std::chrono::month; using day = std::chrono::day; std::cout << month_day{month{1}, day{1}}; + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.md/types.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.md/types.pass.cpp index ba7c336a6341a..507855a990fca 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.md/types.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.md/types.pass.cpp @@ -16,10 +16,12 @@ #include "test_macros.h" -int main() +int main(int, char**) { using month_day = std::chrono::month_day; static_assert(std::is_trivially_copyable_v, ""); static_assert(std::is_standard_layout_v, ""); + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.mdlast/comparisons.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.mdlast/comparisons.pass.cpp index ba9eda73a4ae2..265e7be372dc7 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.mdlast/comparisons.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.mdlast/comparisons.pass.cpp @@ -24,7 +24,7 @@ #include "test_macros.h" #include "test_comparisons.h" -int main() +int main(int, char**) { using month = std::chrono::month; using month_day_last = std::chrono::month_day_last; @@ -39,4 +39,6 @@ int main() for (unsigned i = 1; i < 12; ++i) for (unsigned j = 1; j < 12; ++j) assert((testComparisons6Values(month{i}, month{j}))); + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.mdlast/ctor.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.mdlast/ctor.pass.cpp index 4bf983f3b4007..3696bb907d87c 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.mdlast/ctor.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.mdlast/ctor.pass.cpp @@ -23,7 +23,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { using month = std::chrono::month; using month_day_last = std::chrono::month_day_last; @@ -37,4 +37,6 @@ int main() constexpr month_day_last md1{std::chrono::January}; static_assert( md1.month() == std::chrono::January, ""); static_assert( md1.ok(), ""); + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.mdlast/month.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.mdlast/month.pass.cpp index b9945b6d88dc2..6bf75892da9a0 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.mdlast/month.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.mdlast/month.pass.cpp @@ -19,7 +19,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { using month = std::chrono::month; using month_day_last = std::chrono::month_day_last; @@ -34,4 +34,6 @@ int main() month_day_last mdl(month{i}); assert( static_cast(mdl.month()) == i); } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.mdlast/ok.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.mdlast/ok.pass.cpp index 38c52e2295893..730ab3b25d64a 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.mdlast/ok.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.mdlast/ok.pass.cpp @@ -19,7 +19,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { using month = std::chrono::month; using month_day_last = std::chrono::month_day_last; @@ -42,4 +42,6 @@ int main() month_day_last mdl{month{i}}; assert(!mdl.ok()); } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.mdlast/streaming.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.mdlast/streaming.pass.cpp index ebb915598545b..1b4a8f108cb27 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.mdlast/streaming.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.mdlast/streaming.pass.cpp @@ -25,9 +25,11 @@ #include "test_macros.h" -int main() +int main(int, char**) { using month_day_last = std::chrono::month_day_last; using month = std::chrono::month; std::cout << month_day_last{month{1}}; + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.mdlast/types.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.mdlast/types.pass.cpp index e3f02a8854917..c6eebc42de196 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.mdlast/types.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.mdlast/types.pass.cpp @@ -17,10 +17,12 @@ #include "test_macros.h" -int main() +int main(int, char**) { using month_day_last = std::chrono::month_day_last; static_assert(std::is_trivially_copyable_v, ""); static_assert(std::is_standard_layout_v, ""); + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.month/time.cal.month.members/ctor.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.month/time.cal.month.members/ctor.pass.cpp index d0ed4d37d01a7..6800a03e18ad8 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.month/time.cal.month.members/ctor.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.month/time.cal.month.members/ctor.pass.cpp @@ -23,7 +23,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { using month = std::chrono::month; @@ -42,4 +42,6 @@ int main() month m(i); assert(static_cast(m) == i); } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.month/time.cal.month.members/decrement.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.month/time.cal.month.members/decrement.pass.cpp index 2cab328cfcbec..6d7edc508c13f 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.month/time.cal.month.members/decrement.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.month/time.cal.month.members/decrement.pass.cpp @@ -30,7 +30,7 @@ constexpr bool testConstexpr() return true; } -int main() +int main(int, char**) { using month = std::chrono::month; @@ -49,4 +49,6 @@ int main() assert(static_cast(month--) == i - 1); assert(static_cast(month) == i - 2); } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.month/time.cal.month.members/increment.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.month/time.cal.month.members/increment.pass.cpp index 81162edf6ca4d..7bcd5bed71618 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.month/time.cal.month.members/increment.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.month/time.cal.month.members/increment.pass.cpp @@ -30,7 +30,7 @@ constexpr bool testConstexpr() return true; } -int main() +int main(int, char**) { using month = std::chrono::month; ASSERT_NOEXCEPT(++(std::declval()) ); @@ -48,4 +48,6 @@ int main() assert(static_cast(month++) == i + 1); assert(static_cast(month) == i + 2); } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.month/time.cal.month.members/ok.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.month/time.cal.month.members/ok.pass.cpp index 7cb5edad47f52..a001c74a3fadc 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.month/time.cal.month.members/ok.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.month/time.cal.month.members/ok.pass.cpp @@ -19,7 +19,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { using month = std::chrono::month; @@ -34,4 +34,6 @@ int main() assert(month{i}.ok()); for (unsigned i = 13; i <= 255; ++i) assert(!month{i}.ok()); + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.month/time.cal.month.members/plus_minus_equal.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.month/time.cal.month.members/plus_minus_equal.pass.cpp index 7ca4a6e5f4c3e..a792072afa26d 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.month/time.cal.month.members/plus_minus_equal.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.month/time.cal.month.members/plus_minus_equal.pass.cpp @@ -32,7 +32,7 @@ constexpr bool testConstexpr() return true; } -int main() +int main(int, char**) { using month = std::chrono::month; using months = std::chrono::months; @@ -63,4 +63,6 @@ int main() assert(static_cast(month -= months{ 9}) == static_cast(exp)); assert(static_cast(month) == static_cast(exp)); } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.month/time.cal.month.nonmembers/comparisons.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.month/time.cal.month.nonmembers/comparisons.pass.cpp index aa37fde3b29c6..f69fec8aaac7d 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.month/time.cal.month.nonmembers/comparisons.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.month/time.cal.month.nonmembers/comparisons.pass.cpp @@ -26,7 +26,7 @@ #include "test_comparisons.h" -int main() +int main(int, char**) { using month = std::chrono::month; @@ -43,4 +43,6 @@ int main() for (unsigned i = 1; i < 10; ++i) for (unsigned j = 10; j < 10; ++j) assert(testComparisons6Values(i, j)); + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.month/time.cal.month.nonmembers/literals.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.month/time.cal.month.nonmembers/literals.pass.cpp index 807cf29881b82..9832fe37681cd 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.month/time.cal.month.nonmembers/literals.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.month/time.cal.month.nonmembers/literals.pass.cpp @@ -29,7 +29,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { ASSERT_SAME_TYPE(const std::chrono::month, decltype(std::chrono::January)); @@ -83,4 +83,6 @@ int main() assert(static_cast(std::chrono::October) == 10); assert(static_cast(std::chrono::November) == 11); assert(static_cast(std::chrono::December) == 12); + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.month/time.cal.month.nonmembers/minus.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.month/time.cal.month.nonmembers/minus.pass.cpp index 291d299e3af68..cda36412741dc 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.month/time.cal.month.nonmembers/minus.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.month/time.cal.month.nonmembers/minus.pass.cpp @@ -44,7 +44,7 @@ constexpr bool testConstexpr() #include -int main() +int main(int, char**) { using month = std::chrono::month; using months = std::chrono::months; @@ -68,4 +68,6 @@ static_assert(testConstexpr(), ""); assert(static_cast(m1) == static_cast(exp)); // assert(off.count() == static_cast(exp)); } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.month/time.cal.month.nonmembers/plus.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.month/time.cal.month.nonmembers/plus.pass.cpp index 87b39003b1e55..58a951e1b0e76 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.month/time.cal.month.nonmembers/plus.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.month/time.cal.month.nonmembers/plus.pass.cpp @@ -43,7 +43,7 @@ constexpr bool testConstexpr() return true; } -int main() +int main(int, char**) { using month = std::chrono::month; using months = std::chrono::months; @@ -68,4 +68,6 @@ int main() assert(static_cast(m1) == exp); assert(static_cast(m2) == exp); } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.month/time.cal.month.nonmembers/streaming.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.month/time.cal.month.nonmembers/streaming.pass.cpp index 5f3f3884f6b39..1d3aa7ce4e889 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.month/time.cal.month.nonmembers/streaming.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.month/time.cal.month.nonmembers/streaming.pass.cpp @@ -45,8 +45,10 @@ #include "test_macros.h" -int main() +int main(int, char**) { using month = std::chrono::month; std::cout << month{1}; + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.month/types.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.month/types.pass.cpp index b3e5024656ffa..a6e67f1013451 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.month/types.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.month/types.pass.cpp @@ -16,10 +16,12 @@ #include "test_macros.h" -int main() +int main(int, char**) { using month = std::chrono::month; static_assert(std::is_trivially_copyable_v, ""); static_assert(std::is_standard_layout_v, ""); + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.mwd/time.cal.mwd.members/ctor.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.mwd/time.cal.mwd.members/ctor.pass.cpp index 8d0b560b1fd01..8804e71e3e8e4 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.mwd/time.cal.mwd.members/ctor.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.mwd/time.cal.mwd.members/ctor.pass.cpp @@ -24,7 +24,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { using month_weekday = std::chrono::month_weekday; using month = std::chrono::month; @@ -42,4 +42,6 @@ int main() static_assert( md1.month() == std::chrono::January, ""); static_assert( md1.weekday_indexed() == weekday_indexed{std::chrono::Friday, 4}, ""); static_assert( md1.ok(), ""); + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.mwd/time.cal.mwd.members/month.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.mwd/time.cal.mwd.members/month.pass.cpp index 99bdcb1607cfa..35e7c83c7928a 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.mwd/time.cal.mwd.members/month.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.mwd/time.cal.mwd.members/month.pass.cpp @@ -19,7 +19,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { using month_weekday = std::chrono::month_weekday; using month = std::chrono::month; @@ -38,4 +38,6 @@ int main() month_weekday md(month{i}, weekday_indexed{Sunday, 1}); assert( static_cast(md.month()) == i); } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.mwd/time.cal.mwd.members/ok.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.mwd/time.cal.mwd.members/ok.pass.cpp index b4999652fd573..2ff1bf735f2f1 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.mwd/time.cal.mwd.members/ok.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.mwd/time.cal.mwd.members/ok.pass.cpp @@ -19,7 +19,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { using month_weekday = std::chrono::month_weekday; using month = std::chrono::month; @@ -47,4 +47,6 @@ int main() // If the month is not ok, all the weekday_indexed are bad for (unsigned i = 1; i <= 10; ++i) assert(!(month_weekday{month{13}, weekday_indexed{Sunday, i}}.ok())); + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.mwd/time.cal.mwd.members/weekday_indexed.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.mwd/time.cal.mwd.members/weekday_indexed.pass.cpp index d80ae29d0480e..13a1bba53ddda 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.mwd/time.cal.mwd.members/weekday_indexed.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.mwd/time.cal.mwd.members/weekday_indexed.pass.cpp @@ -19,7 +19,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { using month_weekday = std::chrono::month_weekday; using month = std::chrono::month; @@ -39,4 +39,6 @@ int main() assert( static_cast(md.weekday_indexed().weekday() == Sunday)); assert( static_cast(md.weekday_indexed().index() == i)); } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.mwd/time.cal.mwd.nonmembers/comparisons.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.mwd/time.cal.mwd.nonmembers/comparisons.pass.cpp index 64df8840e7404..46f756de06c1a 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.mwd/time.cal.mwd.nonmembers/comparisons.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.mwd/time.cal.mwd.nonmembers/comparisons.pass.cpp @@ -21,7 +21,7 @@ #include "test_macros.h" #include "test_comparisons.h" -int main() +int main(int, char**) { using month_weekday = std::chrono::month_weekday; using month = std::chrono::month; @@ -82,4 +82,6 @@ int main() month_weekday{month{2}, weekday_indexed{weekday{i}, 2}}, month_weekday{month{2}, weekday_indexed{weekday{j}, 2}}, i == j))); + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.mwd/time.cal.mwd.nonmembers/streaming.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.mwd/time.cal.mwd.nonmembers/streaming.pass.cpp index e7981b5713a12..11a1d4ecd0444 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.mwd/time.cal.mwd.nonmembers/streaming.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.mwd/time.cal.mwd.nonmembers/streaming.pass.cpp @@ -24,7 +24,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { using month_weekday = std::chrono::month_weekday; using month = std::chrono::month; @@ -32,4 +32,6 @@ int main() using weekday = std::chrono::weekday; std::cout << month_weekday{month{1}, weekday_indexed{weekday{3}, 3}}; + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.mwd/types.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.mwd/types.pass.cpp index 67c3f17b94652..bd4f4e1d492f8 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.mwd/types.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.mwd/types.pass.cpp @@ -16,10 +16,12 @@ #include "test_macros.h" -int main() +int main(int, char**) { using month_weekday = std::chrono::month_weekday; static_assert(std::is_trivially_copyable_v, ""); static_assert(std::is_standard_layout_v, ""); + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.mwdlast/time.cal.mwdlast.members/ctor.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.mwdlast/time.cal.mwdlast.members/ctor.pass.cpp index fa5ca0443580c..d83bbe92f11b4 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.mwdlast/time.cal.mwdlast.members/ctor.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.mwdlast/time.cal.mwdlast.members/ctor.pass.cpp @@ -27,7 +27,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { using month = std::chrono::month; using weekday = std::chrono::weekday; @@ -56,4 +56,6 @@ int main() static_assert( mwdl3.month() == January, ""); static_assert( mwdl3.weekday_last() == weekday_last{weekday{4}}, ""); static_assert( mwdl3.ok(), ""); + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.mwdlast/time.cal.mwdlast.members/month.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.mwdlast/time.cal.mwdlast.members/month.pass.cpp index 3561651c28adc..a32b089961527 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.mwdlast/time.cal.mwdlast.members/month.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.mwdlast/time.cal.mwdlast.members/month.pass.cpp @@ -19,7 +19,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { using month = std::chrono::month; using weekday = std::chrono::weekday; @@ -38,4 +38,6 @@ int main() month_weekday_last mdl(month{i}, weekday_last{Tuesday}); assert( static_cast(mdl.month()) == i); } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.mwdlast/time.cal.mwdlast.members/ok.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.mwdlast/time.cal.mwdlast.members/ok.pass.cpp index 10245f938d68c..02df5fbd22bd0 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.mwdlast/time.cal.mwdlast.members/ok.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.mwdlast/time.cal.mwdlast.members/ok.pass.cpp @@ -19,7 +19,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { using month = std::chrono::month; using weekday = std::chrono::weekday; @@ -48,4 +48,6 @@ int main() month_weekday_last mwdl{January, weekday_last{weekday{i}}}; assert( mwdl.ok() == weekday_last{weekday{i}}.ok()); } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.mwdlast/time.cal.mwdlast.members/weekday_last.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.mwdlast/time.cal.mwdlast.members/weekday_last.pass.cpp index 4afa6cca73475..4ecf6d24628df 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.mwdlast/time.cal.mwdlast.members/weekday_last.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.mwdlast/time.cal.mwdlast.members/weekday_last.pass.cpp @@ -19,7 +19,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { using month = std::chrono::month; using weekday = std::chrono::weekday; @@ -40,4 +40,6 @@ int main() month_weekday_last mdl(January, weekday_last{weekday{i}}); assert( static_cast(mdl.weekday_last().weekday()) == i); } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.mwdlast/time.cal.mwdlast.nonmembers/comparisons.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.mwdlast/time.cal.mwdlast.nonmembers/comparisons.pass.cpp index 4d0e935f11a02..911693c25bf47 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.mwdlast/time.cal.mwdlast.nonmembers/comparisons.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.mwdlast/time.cal.mwdlast.nonmembers/comparisons.pass.cpp @@ -24,7 +24,7 @@ #include "test_macros.h" #include "test_comparisons.h" -int main() +int main(int, char**) { using month = std::chrono::month; using weekday_last = std::chrono::weekday_last; @@ -69,4 +69,6 @@ int main() month_weekday_last{month{1}, weekday_last{weekday{1}}}, month_weekday_last{month{2}, weekday_last{weekday{2}}}, false))); + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.mwdlast/time.cal.mwdlast.nonmembers/streaming.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.mwdlast/time.cal.mwdlast.nonmembers/streaming.pass.cpp index 2bf0e1ec43b75..75654b1b3a2d2 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.mwdlast/time.cal.mwdlast.nonmembers/streaming.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.mwdlast/time.cal.mwdlast.nonmembers/streaming.pass.cpp @@ -25,7 +25,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { using month_weekday_last = std::chrono::month_weekday_last; using month = std::chrono::month; @@ -33,4 +33,6 @@ int main() using weekday_last = std::chrono::weekday_last; std::cout << month_weekday_last{month{1}, weekday_last{weekday{3}}}; + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.mwdlast/types.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.mwdlast/types.pass.cpp index 2271f42c0313c..2f2676d7a5242 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.mwdlast/types.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.mwdlast/types.pass.cpp @@ -17,10 +17,12 @@ #include "test_macros.h" -int main() +int main(int, char**) { using month_weekday_last = std::chrono::month_weekday_last; static_assert(std::is_trivially_copyable_v, ""); static_assert(std::is_standard_layout_v, ""); + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.operators/month_day.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.operators/month_day.pass.cpp index e51fb4fa47eb3..e9eb80bfd98f7 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.operators/month_day.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.operators/month_day.pass.cpp @@ -38,7 +38,7 @@ #include "test_macros.h" #include "test_comparisons.h" -int main() +int main(int, char**) { using month_day = std::chrono::month_day; using month = std::chrono::month; @@ -104,4 +104,6 @@ int main() assert(md1 == md2); } } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.operators/month_day_last.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.operators/month_day_last.pass.cpp index 27043b88c639a..84c2c6eaa3919 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.operators/month_day_last.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.operators/month_day_last.pass.cpp @@ -46,7 +46,7 @@ #include "test_macros.h" #include "test_comparisons.h" -int main() +int main(int, char**) { using month = std::chrono::month; using month_day_last = std::chrono::month_day_last; @@ -103,4 +103,6 @@ int main() } } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.operators/month_weekday.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.operators/month_weekday.pass.cpp index 4dc6db768e283..60b788de1e457 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.operators/month_weekday.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.operators/month_weekday.pass.cpp @@ -44,7 +44,7 @@ #include "test_macros.h" #include "test_comparisons.h" -int main() +int main(int, char**) { using month_weekday = std::chrono::month_weekday; using month = std::chrono::month; @@ -111,4 +111,6 @@ int main() assert(mwd1 == mwd2); } } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.operators/month_weekday_last.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.operators/month_weekday_last.pass.cpp index 25d25b26d9b59..07e5d8d75d620 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.operators/month_weekday_last.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.operators/month_weekday_last.pass.cpp @@ -36,7 +36,7 @@ #include "test_macros.h" #include "test_comparisons.h" -int main() +int main(int, char**) { using month_weekday = std::chrono::month_weekday; using month = std::chrono::month; @@ -103,4 +103,6 @@ int main() assert(mwd1 == mwd2); } } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.operators/year_month.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.operators/year_month.pass.cpp index 6ef320ebb79cc..ba2b5c187f6fa 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.operators/year_month.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.operators/year_month.pass.cpp @@ -25,7 +25,7 @@ #include "test_macros.h" #include "test_comparisons.h" -int main() +int main(int, char**) { using month = std::chrono::month; using year = std::chrono::year; @@ -64,4 +64,6 @@ int main() assert(static_cast(ym.month()) == j); } } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.operators/year_month_day.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.operators/year_month_day.pass.cpp index a8df70096325d..a5aa4d0ef59dd 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.operators/year_month_day.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.operators/year_month_day.pass.cpp @@ -42,7 +42,7 @@ #include "test_macros.h" #include "test_comparisons.h" -int main() +int main(int, char**) { using year = std::chrono::year; using month = std::chrono::month; @@ -187,4 +187,6 @@ int main() } } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.operators/year_month_day_last.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.operators/year_month_day_last.pass.cpp index 2556bb93f3675..fd55e38b4c4ee 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.operators/year_month_day_last.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.operators/year_month_day_last.pass.cpp @@ -38,7 +38,7 @@ #include "test_macros.h" #include "test_comparisons.h" -int main() +int main(int, char**) { using month = std::chrono::month; using year_month = std::chrono::year_month; @@ -121,4 +121,6 @@ int main() assert(ymdl1 == ymdl2); } } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.operators/year_month_weekday.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.operators/year_month_weekday.pass.cpp index af27c945e0975..4e71435805aa4 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.operators/year_month_weekday.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.operators/year_month_weekday.pass.cpp @@ -37,7 +37,7 @@ #include "test_macros.h" #include "test_comparisons.h" -int main() +int main(int, char**) { using year = std::chrono::year; using year_month = std::chrono::year_month; @@ -141,4 +141,6 @@ int main() assert(ymd1 == ymd2); } } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.operators/year_month_weekday_last.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.operators/year_month_weekday_last.pass.cpp index ff467aa60c3ec..62b1f46765cdf 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.operators/year_month_weekday_last.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.operators/year_month_weekday_last.pass.cpp @@ -39,7 +39,7 @@ #include "test_macros.h" #include "test_comparisons.h" -int main() +int main(int, char**) { using year_month = std::chrono::year_month; using year = std::chrono::year; @@ -149,4 +149,6 @@ int main() assert(ymwdl1 == ymwdl2); } } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.wdidx/time.cal.wdidx.members/ctor.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.wdidx/time.cal.wdidx.members/ctor.pass.cpp index b9facef63e736..4a64b932b686a 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.wdidx/time.cal.wdidx.members/ctor.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.wdidx/time.cal.wdidx.members/ctor.pass.cpp @@ -26,7 +26,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { using weekday = std::chrono::weekday; using weekday_indexed = std::chrono::weekday_indexed; @@ -57,4 +57,6 @@ int main() weekday_indexed wdi(std::chrono::Tuesday, i); assert(!wdi.ok()); } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.wdidx/time.cal.wdidx.members/index.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.wdidx/time.cal.wdidx.members/index.pass.cpp index 043a98accf55f..4942f7164807e 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.wdidx/time.cal.wdidx.members/index.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.wdidx/time.cal.wdidx.members/index.pass.cpp @@ -19,7 +19,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { using weekday = std::chrono::weekday; using weekday_indexed = std::chrono::weekday_indexed; @@ -34,4 +34,6 @@ int main() weekday_indexed wdi(weekday{2}, i); assert( static_cast(wdi.index()) == i); } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.wdidx/time.cal.wdidx.members/ok.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.wdidx/time.cal.wdidx.members/ok.pass.cpp index 1cdfb29c96ead..a2b5b48e4fc64 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.wdidx/time.cal.wdidx.members/ok.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.wdidx/time.cal.wdidx.members/ok.pass.cpp @@ -19,7 +19,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { using weekday = std::chrono::weekday; using weekday_indexed = std::chrono::weekday_indexed; @@ -45,4 +45,6 @@ int main() // Not a valid weekday assert(!(weekday_indexed(weekday{9U}, 1).ok())); + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.wdidx/time.cal.wdidx.members/weekday.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.wdidx/time.cal.wdidx.members/weekday.pass.cpp index 47f50b6d672b7..e9c204d08b152 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.wdidx/time.cal.wdidx.members/weekday.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.wdidx/time.cal.wdidx.members/weekday.pass.cpp @@ -19,7 +19,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { using weekday = std::chrono::weekday; using weekday_indexed = std::chrono::weekday_indexed; @@ -35,4 +35,6 @@ int main() weekday_indexed wdi(weekday{i}, 2); assert( static_cast(wdi.weekday()) == i); } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.wdidx/time.cal.wdidx.nonmembers/comparisons.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.wdidx/time.cal.wdidx.nonmembers/comparisons.pass.cpp index 963f9f15ec853..104c59abf7826 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.wdidx/time.cal.wdidx.nonmembers/comparisons.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.wdidx/time.cal.wdidx.nonmembers/comparisons.pass.cpp @@ -22,7 +22,7 @@ #include "test_macros.h" #include "test_comparisons.h" -int main() +int main(int, char**) { using weekday = std::chrono::weekday; using weekday_indexed = std::chrono::weekday_indexed; @@ -44,4 +44,6 @@ int main() static_assert( (weekday_indexed{weekday{1}, 2} != weekday_indexed{weekday{1}, 1}), ""); static_assert(!(weekday_indexed{weekday{1}, 2} == weekday_indexed{weekday{2}, 2}), ""); static_assert( (weekday_indexed{weekday{1}, 2} != weekday_indexed{weekday{2}, 2}), ""); + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.wdidx/time.cal.wdidx.nonmembers/streaming.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.wdidx/time.cal.wdidx.nonmembers/streaming.pass.cpp index 810b2cb0c499a..5052a18245812 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.wdidx/time.cal.wdidx.nonmembers/streaming.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.wdidx/time.cal.wdidx.nonmembers/streaming.pass.cpp @@ -26,10 +26,12 @@ #include "test_macros.h" -int main() +int main(int, char**) { using weekday_indexed = std::chrono::weekday_indexed; using weekday = std::chrono::weekday; std::cout << weekday_indexed{weekday{3}}; + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.wdidx/types.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.wdidx/types.pass.cpp index 74634da8a5897..260b50f465dfc 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.wdidx/types.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.wdidx/types.pass.cpp @@ -16,10 +16,12 @@ #include "test_macros.h" -int main() +int main(int, char**) { using weekday_indexed = std::chrono::weekday_indexed; static_assert(std::is_trivially_copyable_v, ""); static_assert(std::is_standard_layout_v, ""); + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.wdlast/time.cal.wdlast.members/ctor.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.wdlast/time.cal.wdlast.members/ctor.pass.cpp index f7fa66320412b..a569144d06822 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.wdlast/time.cal.wdlast.members/ctor.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.wdlast/time.cal.wdlast.members/ctor.pass.cpp @@ -23,7 +23,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { using weekday = std::chrono::weekday; using weekday_last = std::chrono::weekday_last; @@ -43,4 +43,6 @@ int main() weekday_last wdl{weekday{i}}; assert(wdl.weekday() == weekday{i}); } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.wdlast/time.cal.wdlast.members/ok.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.wdlast/time.cal.wdlast.members/ok.pass.cpp index d708a8124634c..eb0636aa9cf30 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.wdlast/time.cal.wdlast.members/ok.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.wdlast/time.cal.wdlast.members/ok.pass.cpp @@ -19,7 +19,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { using weekday = std::chrono::weekday; using weekday_last = std::chrono::weekday_last; @@ -33,4 +33,6 @@ int main() for (unsigned i = 0; i <= 255; ++i) assert(weekday_last{weekday{i}}.ok() == weekday{i}.ok()); + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.wdlast/time.cal.wdlast.members/weekday.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.wdlast/time.cal.wdlast.members/weekday.pass.cpp index 48767b3b86e9d..c5eb6e1320151 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.wdlast/time.cal.wdlast.members/weekday.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.wdlast/time.cal.wdlast.members/weekday.pass.cpp @@ -19,7 +19,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { using weekday = std::chrono::weekday; using weekday_last = std::chrono::weekday_last; @@ -29,4 +29,6 @@ int main() for (unsigned i = 0; i <= 255; ++i) assert(weekday_last{weekday{i}}.weekday() == weekday{i}); + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.wdlast/time.cal.wdlast.nonmembers/comparisons.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.wdlast/time.cal.wdlast.nonmembers/comparisons.pass.cpp index 1a9fc97eb5171..c5ca36e828804 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.wdlast/time.cal.wdlast.nonmembers/comparisons.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.wdlast/time.cal.wdlast.nonmembers/comparisons.pass.cpp @@ -21,7 +21,7 @@ #include "test_macros.h" #include "test_comparisons.h" -int main() +int main(int, char**) { using weekday = std::chrono::weekday; using weekday_last = std::chrono::weekday_last; @@ -39,4 +39,6 @@ int main() for (unsigned i = 0; i < 6; ++i) for (unsigned j = 0; j < 6; ++j) assert(testComparisons2Values(weekday{i}, weekday{j})); + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.wdlast/time.cal.wdlast.nonmembers/streaming.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.wdlast/time.cal.wdlast.nonmembers/streaming.pass.cpp index efb598472552b..85a40a3dc4cb4 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.wdlast/time.cal.wdlast.nonmembers/streaming.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.wdlast/time.cal.wdlast.nonmembers/streaming.pass.cpp @@ -24,10 +24,12 @@ #include "test_macros.h" -int main() +int main(int, char**) { using weekday_last = std::chrono::weekday_last; using weekday = std::chrono::weekday; std::cout << weekday_last{weekday{3}}; + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.wdlast/types.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.wdlast/types.pass.cpp index c986f99c3324d..ff9d54f88daad 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.wdlast/types.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.wdlast/types.pass.cpp @@ -16,10 +16,12 @@ #include "test_macros.h" -int main() +int main(int, char**) { using weekday_last = std::chrono::weekday_last; static_assert(std::is_trivially_copyable_v, ""); static_assert(std::is_standard_layout_v, ""); + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.weekday/time.cal.weekday.members/ctor.local_days.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.weekday/time.cal.weekday.members/ctor.local_days.pass.cpp index ee241c8e7c9f8..06656fb442a37 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.weekday/time.cal.weekday.members/ctor.local_days.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.weekday/time.cal.weekday.members/ctor.local_days.pass.cpp @@ -29,7 +29,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { using local_days = std::chrono::local_days; using days = std::chrono::days; @@ -69,4 +69,6 @@ int main() assert( wd.ok()); assert(static_cast(wd) == 3); } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.weekday/time.cal.weekday.members/ctor.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.weekday/time.cal.weekday.members/ctor.pass.cpp index 9ec3afb2144fb..470b9d79d237c 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.weekday/time.cal.weekday.members/ctor.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.weekday/time.cal.weekday.members/ctor.pass.cpp @@ -26,7 +26,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { using weekday = std::chrono::weekday; @@ -47,4 +47,6 @@ int main() } // TODO - sys_days and local_days ctor tests + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.weekday/time.cal.weekday.members/ctor.sys_days.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.weekday/time.cal.weekday.members/ctor.sys_days.pass.cpp index 920b53e783cfd..e00184a99150a 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.weekday/time.cal.weekday.members/ctor.sys_days.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.weekday/time.cal.weekday.members/ctor.sys_days.pass.cpp @@ -29,7 +29,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { using sys_days = std::chrono::sys_days; using days = std::chrono::days; @@ -69,4 +69,6 @@ int main() assert( wd.ok()); assert(static_cast(wd) == 3); } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.weekday/time.cal.weekday.members/decrement.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.weekday/time.cal.weekday.members/decrement.pass.cpp index c8b023a37c515..d574e1db9b604 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.weekday/time.cal.weekday.members/decrement.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.weekday/time.cal.weekday.members/decrement.pass.cpp @@ -31,7 +31,7 @@ constexpr bool testConstexpr() return true; } -int main() +int main(int, char**) { using weekday = std::chrono::weekday; ASSERT_NOEXCEPT(--(std::declval()) ); @@ -49,4 +49,6 @@ int main() assert((static_cast(wd--) == euclidian_subtraction(i, 1))); assert((static_cast(wd) == euclidian_subtraction(i, 2))); } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.weekday/time.cal.weekday.members/increment.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.weekday/time.cal.weekday.members/increment.pass.cpp index d9239ff8f906e..bb62e0120ef02 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.weekday/time.cal.weekday.members/increment.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.weekday/time.cal.weekday.members/increment.pass.cpp @@ -31,7 +31,7 @@ constexpr bool testConstexpr() return true; } -int main() +int main(int, char**) { using weekday = std::chrono::weekday; ASSERT_NOEXCEPT(++(std::declval()) ); @@ -49,4 +49,6 @@ int main() assert((static_cast(wd++) == euclidian_addition(i, 1))); assert((static_cast(wd) == euclidian_addition(i, 2))); } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.weekday/time.cal.weekday.members/ok.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.weekday/time.cal.weekday.members/ok.pass.cpp index f8bd9d43a25ff..f2f6e2e980299 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.weekday/time.cal.weekday.members/ok.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.weekday/time.cal.weekday.members/ok.pass.cpp @@ -19,7 +19,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { using weekday = std::chrono::weekday; @@ -34,4 +34,6 @@ int main() assert(weekday{i}.ok()); for (unsigned i = 7; i <= 255; ++i) assert(!weekday{i}.ok()); + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.weekday/time.cal.weekday.members/operator[].pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.weekday/time.cal.weekday.members/operator[].pass.cpp index aa0f3f7e59e51..d7d2d6faf30cc 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.weekday/time.cal.weekday.members/operator[].pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.weekday/time.cal.weekday.members/operator[].pass.cpp @@ -21,7 +21,7 @@ #include "test_macros.h" #include "../../euclidian.h" -int main() +int main(int, char**) { using weekday = std::chrono::weekday; using weekday_last = std::chrono::weekday_last; @@ -55,4 +55,6 @@ int main() assert(wdi.index() == j); assert(wdi.ok()); } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.weekday/time.cal.weekday.members/plus_minus_equal.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.weekday/time.cal.weekday.members/plus_minus_equal.pass.cpp index e0963540cf2fc..d99b0349399d0 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.weekday/time.cal.weekday.members/plus_minus_equal.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.weekday/time.cal.weekday.members/plus_minus_equal.pass.cpp @@ -33,7 +33,7 @@ constexpr bool testConstexpr() return true; } -int main() +int main(int, char**) { using weekday = std::chrono::weekday; using days = std::chrono::days; @@ -59,4 +59,6 @@ int main() assert((static_cast(wd -= days{4}) == euclidian_subtraction(i, 4))); assert((static_cast(wd) == euclidian_subtraction(i, 4))); } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.weekday/time.cal.weekday.nonmembers/comparisons.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.weekday/time.cal.weekday.nonmembers/comparisons.pass.cpp index c042ac14778a2..982b3bccbc698 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.weekday/time.cal.weekday.nonmembers/comparisons.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.weekday/time.cal.weekday.nonmembers/comparisons.pass.cpp @@ -21,7 +21,7 @@ #include "test_macros.h" #include "test_comparisons.h" -int main() +int main(int, char**) { using weekday = std::chrono::weekday; @@ -38,4 +38,6 @@ int main() for (unsigned i = 0; i < 6; ++i) for (unsigned j = 0; j < 6; ++j) assert(testComparisons2Values(i, j)); + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.weekday/time.cal.weekday.nonmembers/literals.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.weekday/time.cal.weekday.nonmembers/literals.pass.cpp index 8f713aad2808d..7529864a5bb37 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.weekday/time.cal.weekday.nonmembers/literals.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.weekday/time.cal.weekday.nonmembers/literals.pass.cpp @@ -24,7 +24,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { ASSERT_SAME_TYPE(const std::chrono::weekday, decltype(std::chrono::Sunday)); @@ -58,4 +58,6 @@ int main() assert(static_cast(std::chrono::Thursday) == 4); assert(static_cast(std::chrono::Friday) == 5); assert(static_cast(std::chrono::Saturday) == 6); + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.weekday/time.cal.weekday.nonmembers/minus.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.weekday/time.cal.weekday.nonmembers/minus.pass.cpp index 2bf0ed7899530..f296fc6d68eb1 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.weekday/time.cal.weekday.nonmembers/minus.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.weekday/time.cal.weekday.nonmembers/minus.pass.cpp @@ -44,7 +44,7 @@ constexpr bool testConstexpr() return true; } -int main() +int main(int, char**) { using weekday = std::chrono::weekday; using days = std::chrono::days; @@ -72,4 +72,6 @@ int main() assert(weekday{i} + d == weekday{j}); } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.weekday/time.cal.weekday.nonmembers/plus.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.weekday/time.cal.weekday.nonmembers/plus.pass.cpp index 287834cd7e866..78d332b96cbe2 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.weekday/time.cal.weekday.nonmembers/plus.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.weekday/time.cal.weekday.nonmembers/plus.pass.cpp @@ -44,7 +44,7 @@ constexpr bool testConstexpr() return true; } -int main() +int main(int, char**) { using weekday = std::chrono::weekday; using days = std::chrono::days; @@ -66,4 +66,6 @@ int main() assert((static_cast(wd1) == euclidian_addition(i, j))); assert((static_cast(wd2) == euclidian_addition(i, j))); } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.weekday/time.cal.weekday.nonmembers/streaming.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.weekday/time.cal.weekday.nonmembers/streaming.pass.cpp index aef5a82e78d21..43825b60e99fe 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.weekday/time.cal.weekday.nonmembers/streaming.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.weekday/time.cal.weekday.nonmembers/streaming.pass.cpp @@ -47,9 +47,11 @@ #include "test_macros.h" -int main() +int main(int, char**) { using weekday = std::chrono::weekday; std::cout << weekday{3}; + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.weekday/types.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.weekday/types.pass.cpp index ed355b0251554..7264a210f59f4 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.weekday/types.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.weekday/types.pass.cpp @@ -16,10 +16,12 @@ #include "test_macros.h" -int main() +int main(int, char**) { using weekday = std::chrono::weekday; static_assert(std::is_trivially_copyable_v, ""); static_assert(std::is_standard_layout_v, ""); + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.members/ctor.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.members/ctor.pass.cpp index 5f8b4660a241e..e46b556306430 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.members/ctor.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.members/ctor.pass.cpp @@ -23,7 +23,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { using year = std::chrono::year; @@ -42,4 +42,6 @@ int main() year year(i); assert(static_cast(year) == i); } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.members/decrement.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.members/decrement.pass.cpp index e8473bf981092..893c48aab476a 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.members/decrement.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.members/decrement.pass.cpp @@ -30,7 +30,7 @@ constexpr bool testConstexpr() return true; } -int main() +int main(int, char**) { using year = std::chrono::year; ASSERT_NOEXCEPT(--(std::declval()) ); @@ -48,4 +48,6 @@ int main() assert(static_cast(year--) == i - 1); assert(static_cast(year) == i - 2); } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.members/increment.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.members/increment.pass.cpp index 759fb66617bd2..ef2a6f3fbee67 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.members/increment.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.members/increment.pass.cpp @@ -30,7 +30,7 @@ constexpr bool testConstexpr() return true; } -int main() +int main(int, char**) { using year = std::chrono::year; ASSERT_NOEXCEPT(++(std::declval()) ); @@ -48,4 +48,6 @@ int main() assert(static_cast(year++) == i + 1); assert(static_cast(year) == i + 2); } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.members/is_leap.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.members/is_leap.pass.cpp index b1785b86c5984..37031dbbabc2d 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.members/is_leap.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.members/is_leap.pass.cpp @@ -20,7 +20,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { using year = std::chrono::year; @@ -49,4 +49,6 @@ int main() assert(!year{ 2003}.is_leap()); assert( year{ 2004}.is_leap()); assert(!year{ 2100}.is_leap()); + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.members/ok.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.members/ok.pass.cpp index dfc2ad3ffe45f..f56ee34d59839 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.members/ok.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.members/ok.pass.cpp @@ -24,7 +24,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { using year = std::chrono::year; @@ -49,4 +49,6 @@ int main() assert(year{ 20001}.ok()); static_assert(!year{-32768}.ok(), ""); + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.members/plus_minus.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.members/plus_minus.pass.cpp index 65b1494587bda..0adb0f9fe58a5 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.members/plus_minus.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.members/plus_minus.pass.cpp @@ -28,7 +28,7 @@ constexpr bool testConstexpr() return true; } -int main() +int main(int, char**) { using year = std::chrono::year; @@ -46,4 +46,6 @@ int main() assert(static_cast(+year) == i); assert(static_cast(-year) == -i); } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.members/plus_minus_equal.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.members/plus_minus_equal.pass.cpp index a00a36f2dcac5..b79713ed1c8a0 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.members/plus_minus_equal.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.members/plus_minus_equal.pass.cpp @@ -32,7 +32,7 @@ constexpr bool testConstexpr() return true; } -int main() +int main(int, char**) { using year = std::chrono::year; using years = std::chrono::years; @@ -53,4 +53,6 @@ int main() assert(static_cast(year -= years{ 9}) == i + 1); assert(static_cast(year) == i + 1); } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.nonmembers/comparisons.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.nonmembers/comparisons.pass.cpp index 8d675f4db3911..9e84fe36ee0e7 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.nonmembers/comparisons.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.nonmembers/comparisons.pass.cpp @@ -26,7 +26,7 @@ #include "test_comparisons.h" -int main() +int main(int, char**) { using year = std::chrono::year; @@ -43,4 +43,6 @@ int main() for (int i = 1; i < 10; ++i) for (int j = 1; j < 10; ++j) assert(testComparisons6Values(i, j)); + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.nonmembers/literals.fail.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.nonmembers/literals.fail.cpp index c6138c7af1c72..50c7b7bc0a613 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.nonmembers/literals.fail.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.nonmembers/literals.fail.cpp @@ -20,8 +20,10 @@ #include "test_macros.h" -int main() +int main(int, char**) { using std::chrono::year; year d1 = 1234y; // expected-error-re {{no matching literal operator for call to 'operator""y' {{.*}}}} + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.nonmembers/literals.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.nonmembers/literals.pass.cpp index 6ebd0e66fdde4..a2bec73e69656 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.nonmembers/literals.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.nonmembers/literals.pass.cpp @@ -20,7 +20,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { { using namespace std::chrono; @@ -40,4 +40,6 @@ int main() std::chrono::year y1 = 2020y; assert (y1 == std::chrono::year(2020)); } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.nonmembers/minus.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.nonmembers/minus.pass.cpp index 3e3e0b77db415..f112345c0ad6c 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.nonmembers/minus.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.nonmembers/minus.pass.cpp @@ -37,7 +37,7 @@ constexpr bool testConstexpr() return true; } -int main() +int main(int, char**) { using year = std::chrono::year; using years = std::chrono::years; @@ -58,4 +58,6 @@ int main() assert(static_cast(y1) == 1223 - i); assert(ys1.count() == 1223 - i); } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.nonmembers/plus.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.nonmembers/plus.pass.cpp index 15c713defb43a..d73f6fc88b3b5 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.nonmembers/plus.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.nonmembers/plus.pass.cpp @@ -33,7 +33,7 @@ constexpr bool testConstexpr() return true; } -int main() +int main(int, char**) { using year = std::chrono::year; using years = std::chrono::years; @@ -55,4 +55,6 @@ int main() assert(static_cast(y1) == i + 1223); assert(static_cast(y2) == i + 1223); } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.nonmembers/streaming.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.nonmembers/streaming.pass.cpp index 2c52cde0a43e0..1b278f2b9033e 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.nonmembers/streaming.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.nonmembers/streaming.pass.cpp @@ -46,9 +46,11 @@ #include "test_macros.h" -int main() +int main(int, char**) { using year = std::chrono::year; std::cout << year{2018}; + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.year/types.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.year/types.pass.cpp index 10bea23a035fb..2acb0f104d3bc 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.year/types.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.year/types.pass.cpp @@ -16,10 +16,12 @@ #include "test_macros.h" -int main() +int main(int, char**) { using year = std::chrono::year; static_assert(std::is_trivially_copyable_v, ""); static_assert(std::is_standard_layout_v, ""); + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.ym/time.cal.ym.members/ctor.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.ym/time.cal.ym.members/ctor.pass.cpp index 090a1ac212c65..1c05cf7a6b698 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.ym/time.cal.ym.members/ctor.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.ym/time.cal.ym.members/ctor.pass.cpp @@ -25,7 +25,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { using year = std::chrono::year; using month = std::chrono::month; @@ -48,4 +48,6 @@ int main() static_assert( ym2.year() == year{2018}, ""); static_assert( ym2.month() == month{}, ""); static_assert(!ym2.ok(), ""); + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.ym/time.cal.ym.members/month.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.ym/time.cal.ym.members/month.pass.cpp index 97334b2050338..7e0cd17f4670c 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.ym/time.cal.ym.members/month.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.ym/time.cal.ym.members/month.pass.cpp @@ -19,7 +19,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { using year = std::chrono::year; using month = std::chrono::month; @@ -35,4 +35,6 @@ int main() year_month ym(year{1234}, month{i}); assert( static_cast(ym.month()) == i); } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.ym/time.cal.ym.members/ok.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.ym/time.cal.ym.members/ok.pass.cpp index 54e67dff9a3eb..463289ee43f6b 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.ym/time.cal.ym.members/ok.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.ym/time.cal.ym.members/ok.pass.cpp @@ -19,7 +19,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { using month = std::chrono::month; using year = std::chrono::year; @@ -46,4 +46,6 @@ int main() year_month ym{year{i}, January}; assert( ym.ok() == year{i}.ok()); } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.ym/time.cal.ym.members/plus_minus_equal_month.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.ym/time.cal.ym.members/plus_minus_equal_month.pass.cpp index 76f3b3355d222..a403462ff797e 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.ym/time.cal.ym.members/plus_minus_equal_month.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.ym/time.cal.ym.members/plus_minus_equal_month.pass.cpp @@ -32,7 +32,7 @@ constexpr bool testConstexpr(D d1) return true; } -int main() +int main(int, char**) { using month = std::chrono::month; using months = std::chrono::months; @@ -60,4 +60,6 @@ int main() assert(static_cast((ym ).month()) == i + 1); assert(ym.year() == y); } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.ym/time.cal.ym.members/plus_minus_equal_year.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.ym/time.cal.ym.members/plus_minus_equal_year.pass.cpp index 05cd60844d99b..adf08fc24b820 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.ym/time.cal.ym.members/plus_minus_equal_year.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.ym/time.cal.ym.members/plus_minus_equal_year.pass.cpp @@ -32,7 +32,7 @@ constexpr bool testConstexpr(D d1) return true; } -int main() +int main(int, char**) { using month = std::chrono::month; using year = std::chrono::year; @@ -61,4 +61,6 @@ int main() assert(static_cast((ym ).year()) == i + 1); assert(ym.month() == m); } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.ym/time.cal.ym.members/year.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.ym/time.cal.ym.members/year.pass.cpp index e8476b042809c..024f3140425e3 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.ym/time.cal.ym.members/year.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.ym/time.cal.ym.members/year.pass.cpp @@ -19,7 +19,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { using year = std::chrono::year; using month = std::chrono::month; @@ -35,4 +35,6 @@ int main() year_month ym(year{i}, month{}); assert( static_cast(ym.year()) == i); } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.ym/time.cal.ym.nonmembers/comparisons.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.ym/time.cal.ym.nonmembers/comparisons.pass.cpp index e1ab033c7c79c..d102b0a5620a1 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.ym/time.cal.ym.nonmembers/comparisons.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.ym/time.cal.ym.nonmembers/comparisons.pass.cpp @@ -26,7 +26,7 @@ #include "test_macros.h" #include "test_comparisons.h" -int main() +int main(int, char**) { using year = std::chrono::year; using month = std::chrono::month; @@ -65,4 +65,6 @@ int main() year_month{year{i}, std::chrono::January}, year_month{year{j}, std::chrono::January}, i == j, i < j ))); + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.ym/time.cal.ym.nonmembers/minus.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.ym/time.cal.ym.nonmembers/minus.pass.cpp index 2999560f16ff9..d7756d10d2583 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.ym/time.cal.ym.nonmembers/minus.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.ym/time.cal.ym.nonmembers/minus.pass.cpp @@ -29,7 +29,7 @@ #include -int main() +int main(int, char**) { using year = std::chrono::year; using years = std::chrono::years; @@ -86,4 +86,6 @@ int main() // TODO: different year } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.ym/time.cal.ym.nonmembers/plus.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.ym/time.cal.ym.nonmembers/plus.pass.cpp index dc721adeedbb6..5698e724470d8 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.ym/time.cal.ym.nonmembers/plus.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.ym/time.cal.ym.nonmembers/plus.pass.cpp @@ -51,7 +51,7 @@ constexpr bool testConstexprMonths(std::chrono::year_month ym) } -int main() +int main(int, char**) { using year = std::chrono::year; using years = std::chrono::years; @@ -102,4 +102,6 @@ int main() assert(ym1 == ym2); } } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.ym/time.cal.ym.nonmembers/streaming.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.ym/time.cal.ym.nonmembers/streaming.pass.cpp index e75fc21bf889d..43af6c2f7195c 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.ym/time.cal.ym.nonmembers/streaming.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.ym/time.cal.ym.nonmembers/streaming.pass.cpp @@ -46,11 +46,13 @@ #include "test_macros.h" -int main() +int main(int, char**) { using year_month = std::chrono::year_month; using year = std::chrono::year; using month = std::chrono::month; std::cout << year_month{year{2018}, month{3}}; + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.ym/types.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.ym/types.pass.cpp index a3b9999f8fd89..2e88c6bb6b60c 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.ym/types.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.ym/types.pass.cpp @@ -16,10 +16,12 @@ #include "test_macros.h" -int main() +int main(int, char**) { using year_month = std::chrono::year_month; static_assert(std::is_trivially_copyable_v, ""); static_assert(std::is_standard_layout_v, ""); + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.members/ctor.local_days.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.members/ctor.local_days.pass.cpp index 9cebaa6836ae2..274cb6a266fcb 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.members/ctor.local_days.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.members/ctor.local_days.pass.cpp @@ -29,7 +29,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { using year = std::chrono::year; using day = std::chrono::day; @@ -81,4 +81,6 @@ int main() assert( ymd.month() == std::chrono::November); assert( ymd.day() == day{29}); } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.members/ctor.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.members/ctor.pass.cpp index a5818849add2f..fdef9517e4a45 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.members/ctor.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.members/ctor.pass.cpp @@ -28,7 +28,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { using year = std::chrono::year; using month = std::chrono::month; @@ -52,4 +52,6 @@ int main() static_assert( ym1.day() == day{12}, ""); static_assert( ym1.ok(), ""); + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.members/ctor.sys_days.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.members/ctor.sys_days.pass.cpp index 7344c10c1ad4a..433468477d5d9 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.members/ctor.sys_days.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.members/ctor.sys_days.pass.cpp @@ -28,7 +28,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { using year = std::chrono::year; using day = std::chrono::day; @@ -80,4 +80,6 @@ int main() assert( ymd.month() == std::chrono::November); assert( ymd.day() == day{29}); } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.members/ctor.year_month_day_last.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.members/ctor.year_month_day_last.pass.cpp index 913b403952b20..d4e8fc83d5bbf 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.members/ctor.year_month_day_last.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.members/ctor.year_month_day_last.pass.cpp @@ -26,7 +26,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { using year = std::chrono::year; using month = std::chrono::month; @@ -76,4 +76,6 @@ int main() assert( ymd.day() == day{28}); assert( ymd.ok()); } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.members/day.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.members/day.pass.cpp index 12e1515b1718c..9a068737ddc41 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.members/day.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.members/day.pass.cpp @@ -19,7 +19,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { using year = std::chrono::year; using month = std::chrono::month; @@ -36,4 +36,6 @@ int main() year_month_day ymd(year{1234}, month{2}, day{i}); assert( static_cast(ymd.day()) == i); } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.members/month.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.members/month.pass.cpp index 8c091d0516532..f1dd2e6893a9e 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.members/month.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.members/month.pass.cpp @@ -19,7 +19,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { using year = std::chrono::year; using month = std::chrono::month; @@ -36,4 +36,6 @@ int main() year_month_day ymd(year{1234}, month{i}, day{12}); assert( static_cast(ymd.month()) == i); } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.members/ok.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.members/ok.pass.cpp index edb55f58b4c6a..cab639b820aa3 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.members/ok.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.members/ok.pass.cpp @@ -19,7 +19,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { using year = std::chrono::year; using month = std::chrono::month; @@ -92,4 +92,6 @@ int main() year_month_day ym{year{i}, January, day{12}}; assert( ym.ok() == year{i}.ok()); } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.members/op.local_days.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.members/op.local_days.pass.cpp index 02212dc9094a8..038d21c4670c7 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.members/op.local_days.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.members/op.local_days.pass.cpp @@ -44,7 +44,7 @@ void RunTheExample() static_assert(year_month_day{local_days{year{2017}/January/32}} == year{2017}/February/1); } -int main() +int main(int, char**) { using year = std::chrono::year; using month = std::chrono::month; @@ -90,4 +90,5 @@ int main() assert( year_month_day{sd} == ymd); // and back } + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.members/op.sys_days.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.members/op.sys_days.pass.cpp index 5925cb0cb5cea..a956845508591 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.members/op.sys_days.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.members/op.sys_days.pass.cpp @@ -44,7 +44,7 @@ void RunTheExample() static_assert(year_month_day{sys_days{year{2017}/January/32}} == year{2017}/February/1); } -int main() +int main(int, char**) { using year = std::chrono::year; using month = std::chrono::month; @@ -90,4 +90,5 @@ int main() assert( year_month_day{sd} == ymd); // and back } + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.members/plus_minus_equal_month.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.members/plus_minus_equal_month.pass.cpp index 173b8b6a2fbb7..8530248d1d61c 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.members/plus_minus_equal_month.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.members/plus_minus_equal_month.pass.cpp @@ -32,7 +32,7 @@ constexpr bool testConstexpr(D d1) return true; } -int main() +int main(int, char**) { using year = std::chrono::year; using month = std::chrono::month; @@ -66,4 +66,6 @@ int main() assert(ym.year() == y); assert(ym.day() == d); } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.members/plus_minus_equal_year.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.members/plus_minus_equal_year.pass.cpp index 1d99512915202..ae134d1a24041 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.members/plus_minus_equal_year.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.members/plus_minus_equal_year.pass.cpp @@ -32,7 +32,7 @@ constexpr bool testConstexpr(D d1) return true; } -int main() +int main(int, char**) { using year = std::chrono::year; using month = std::chrono::month; @@ -66,4 +66,6 @@ int main() assert(ym.month() == m); assert(ym.day() == d); } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.members/year.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.members/year.pass.cpp index 465fa9d93dbee..fc5a407249363 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.members/year.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.members/year.pass.cpp @@ -19,7 +19,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { using year = std::chrono::year; using month = std::chrono::month; @@ -36,4 +36,6 @@ int main() year_month_day ym(year{i}, month{}, day{}); assert( static_cast(ym.year()) == i); } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.nonmembers/comparisons.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.nonmembers/comparisons.pass.cpp index 8d5bf89553cdd..0d15589252a1c 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.nonmembers/comparisons.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.nonmembers/comparisons.pass.cpp @@ -29,7 +29,7 @@ #include "test_macros.h" #include "test_comparisons.h" -int main() +int main(int, char**) { using day = std::chrono::day; using year = std::chrono::year; @@ -114,4 +114,6 @@ int main() year_month_day{year{i}, January, day{12}}, year_month_day{year{j}, January, day{12}}, i == j, i < j ))); + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.nonmembers/minus.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.nonmembers/minus.pass.cpp index 4d5625ba7396a..3c921def3b886 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.nonmembers/minus.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.nonmembers/minus.pass.cpp @@ -33,7 +33,7 @@ constexpr bool test_constexpr () ; } -int main() +int main(int, char**) { using year = std::chrono::year; using month = std::chrono::month; @@ -56,4 +56,6 @@ int main() assert(ym1.month() == January); assert(ym1.day() == day{10}); } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.nonmembers/plus.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.nonmembers/plus.pass.cpp index 2913eb2374316..8d5e02543aaa6 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.nonmembers/plus.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.nonmembers/plus.pass.cpp @@ -51,7 +51,7 @@ constexpr bool testConstexprMonths(std::chrono::year_month_day ym) } -int main() +int main(int, char**) { using day = std::chrono::day; using year = std::chrono::year; @@ -108,4 +108,6 @@ int main() } } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.nonmembers/streaming.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.nonmembers/streaming.pass.cpp index cce42bc616dbe..47b6f02490d95 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.nonmembers/streaming.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.nonmembers/streaming.pass.cpp @@ -46,7 +46,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { using year_month_day = std::chrono::year_month_day; using year = std::chrono::year; @@ -54,4 +54,6 @@ int main() using day = std::chrono::day; std::cout << year_month_day{year{2018}, month{3}, day{12}}; + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.ymd/types.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.ymd/types.pass.cpp index c61d1c9960f6a..58acd143df9d5 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.ymd/types.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.ymd/types.pass.cpp @@ -16,10 +16,12 @@ #include "test_macros.h" -int main() +int main(int, char**) { using year_month_day = std::chrono::year_month_day; static_assert(std::is_trivially_copyable_v, ""); static_assert(std::is_standard_layout_v, ""); + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/ctor.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/ctor.pass.cpp index d27c3c67e5ec1..bd4729f6a0ef3 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/ctor.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/ctor.pass.cpp @@ -27,7 +27,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { using year = std::chrono::year; using month = std::chrono::month; @@ -49,4 +49,6 @@ int main() static_assert( ymdl1.month() == January, ""); static_assert( ymdl1.month_day_last() == month_day_last{January}, ""); static_assert( ymdl1.ok(), ""); + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/day.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/day.pass.cpp index 24682b6957fcc..2f0e2ba17a7a9 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/day.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/day.pass.cpp @@ -19,7 +19,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { using year = std::chrono::year; using month = std::chrono::month; @@ -47,4 +47,6 @@ int main() assert((year_month_day_last{year{2019}, month_day_last{month{ 2}}}.day() == day{28})); assert((year_month_day_last{year{2020}, month_day_last{month{ 2}}}.day() == day{29})); assert((year_month_day_last{year{2021}, month_day_last{month{ 2}}}.day() == day{28})); + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/month.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/month.pass.cpp index cf1024a8ce3e3..5b68aa1d95cb7 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/month.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/month.pass.cpp @@ -19,7 +19,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { using year = std::chrono::year; using month = std::chrono::month; @@ -34,4 +34,6 @@ int main() year_month_day_last ymd(year{1234}, month_day_last{month{i}}); assert( static_cast(ymd.month()) == i); } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/month_day_last.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/month_day_last.pass.cpp index 5c99d947124d0..cca9026b650b5 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/month_day_last.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/month_day_last.pass.cpp @@ -19,7 +19,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { using year = std::chrono::year; using month = std::chrono::month; @@ -34,4 +34,6 @@ int main() year_month_day_last ymdl(year{1234}, month_day_last{month{i}}); assert( static_cast(ymdl.month_day_last().month()) == i); } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/ok.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/ok.pass.cpp index bb4c410d449f8..d40de103c2ab2 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/ok.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/ok.pass.cpp @@ -19,7 +19,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { using year = std::chrono::year; using month = std::chrono::month; @@ -48,4 +48,6 @@ int main() year_month_day_last ym{year{i}, month_day_last{January}}; assert( ym.ok() == year{i}.ok()); } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/op_local_days.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/op_local_days.pass.cpp index 83f8b70dc79b8..a96dff338bea2 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/op_local_days.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/op_local_days.pass.cpp @@ -19,7 +19,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { using year = std::chrono::year; using month_day_last = std::chrono::month_day_last; @@ -57,4 +57,6 @@ int main() assert(sd.time_since_epoch() == days{-(10957+33)}); } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/op_sys_days.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/op_sys_days.pass.cpp index 9a32112c901fc..250ca0f112395 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/op_sys_days.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/op_sys_days.pass.cpp @@ -19,7 +19,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { using year = std::chrono::year; using month_day_last = std::chrono::month_day_last; @@ -57,4 +57,6 @@ int main() assert(sd.time_since_epoch() == days{-(10957+33)}); } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/plus_minus_equal_month.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/plus_minus_equal_month.pass.cpp index 2c4d1ff1f1708..7091f64ea339b 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/plus_minus_equal_month.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/plus_minus_equal_month.pass.cpp @@ -32,7 +32,7 @@ constexpr bool testConstexpr(D d1) return true; } -int main() +int main(int, char**) { using year = std::chrono::year; using month = std::chrono::month; @@ -62,4 +62,6 @@ int main() assert(static_cast((ym ).month()) == i + 1); assert(ym.year() == y); } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/plus_minus_equal_year.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/plus_minus_equal_year.pass.cpp index 00335e15d54fa..3c1ad352737bc 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/plus_minus_equal_year.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/plus_minus_equal_year.pass.cpp @@ -32,7 +32,7 @@ constexpr bool testConstexpr(D d1) return true; } -int main() +int main(int, char**) { using year = std::chrono::year; using month = std::chrono::month; @@ -61,4 +61,6 @@ int main() assert(static_cast((ymdl ).year()) == i + 1); assert(ymdl.month_day_last() == mdl); } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/year.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/year.pass.cpp index 49387091d761a..c0db150f96d55 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/year.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/year.pass.cpp @@ -19,7 +19,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { using year = std::chrono::year; using month = std::chrono::month; @@ -34,4 +34,6 @@ int main() year_month_day_last ym(year{i}, month_day_last{month{}}); assert( static_cast(ym.year()) == i); } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.nonmembers/comparisons.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.nonmembers/comparisons.pass.cpp index 9db4b6aa6d929..c56491f96cb2c 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.nonmembers/comparisons.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.nonmembers/comparisons.pass.cpp @@ -26,7 +26,7 @@ #include "test_macros.h" #include "test_comparisons.h" -int main() +int main(int, char**) { using year = std::chrono::year; using month = std::chrono::month; @@ -83,4 +83,6 @@ int main() year_month_day_last{year{i}, month_day_last{January}}, year_month_day_last{year{j}, month_day_last{January}}, i == j, i < j ))); + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.nonmembers/minus.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.nonmembers/minus.pass.cpp index 7f5a796dfab26..8ea3025d6070b 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.nonmembers/minus.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.nonmembers/minus.pass.cpp @@ -47,7 +47,7 @@ constexpr bool testConstexprMonths (std::chrono::year_month_day_last ymdl) ; } -int main() +int main(int, char**) { using year = std::chrono::year; using month = std::chrono::month; @@ -87,4 +87,6 @@ int main() } } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.nonmembers/plus.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.nonmembers/plus.pass.cpp index c494620df6e4e..75cabbdcd2802 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.nonmembers/plus.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.nonmembers/plus.pass.cpp @@ -63,7 +63,7 @@ constexpr bool testConstexprMonths(std::chrono::year_month_day_last ymdl) } -int main() +int main(int, char**) { using year = std::chrono::year; using month = std::chrono::month; @@ -118,4 +118,6 @@ int main() } } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.nonmembers/streaming.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.nonmembers/streaming.pass.cpp index 268eb88fe172e..eca8d3d68518b 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.nonmembers/streaming.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.nonmembers/streaming.pass.cpp @@ -25,7 +25,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { using year_month_day_last = std::chrono::year_month_day_last; using year = std::chrono::year; @@ -33,4 +33,6 @@ int main() using month_day_last = std::chrono::month_day_last; std::cout << year_month_day_last{year{2018}, month_day_last{month{3}}}; + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/ctor.local_days.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/ctor.local_days.pass.cpp index 0eae24e459cff..bb4e7d0440547 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/ctor.local_days.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/ctor.local_days.pass.cpp @@ -29,7 +29,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { using year = std::chrono::year; using days = std::chrono::days; @@ -91,4 +91,6 @@ int main() assert((ymwd.weekday_indexed() == weekday_indexed{std::chrono::Wednesday, 5})); assert( ymwd == year_month_weekday{local_days{ymwd}}); // round trip } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/ctor.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/ctor.pass.cpp index dab8b21577bac..81030ff559d21 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/ctor.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/ctor.pass.cpp @@ -30,7 +30,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { using year = std::chrono::year; using month = std::chrono::month; @@ -60,4 +60,6 @@ int main() static_assert( ym1.weekday_indexed() == weekday_indexed{Tuesday, 1}, ""); static_assert( ym1.ok(), ""); + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/ctor.sys_days.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/ctor.sys_days.pass.cpp index 96261c54e3c9b..5ae9900a9834e 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/ctor.sys_days.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/ctor.sys_days.pass.cpp @@ -28,7 +28,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { using year = std::chrono::year; using days = std::chrono::days; @@ -90,4 +90,6 @@ int main() assert((ymwd.weekday_indexed() == weekday_indexed{std::chrono::Wednesday, 5})); assert( ymwd == year_month_weekday{sys_days{ymwd}}); // round trip } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/index.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/index.pass.cpp index 4c0bc13c1868f..ecbd8aec8302a 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/index.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/index.pass.cpp @@ -19,7 +19,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { using year = std::chrono::year; using month = std::chrono::month; @@ -37,4 +37,6 @@ int main() year_month_weekday ymwd0(year{1234}, month{2}, weekday_indexed{weekday{2}, i}); assert(ymwd0.index() == i); } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/month.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/month.pass.cpp index 0e2d41a771fe6..c300fd5d36afd 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/month.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/month.pass.cpp @@ -19,7 +19,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { using year = std::chrono::year; using month = std::chrono::month; @@ -36,4 +36,6 @@ int main() year_month_weekday ymd(year{1234}, month{i}, weekday_indexed{}); assert( static_cast(ymd.month()) == i); } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/ok.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/ok.pass.cpp index f66d6a083c425..7e8599e0509dd 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/ok.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/ok.pass.cpp @@ -19,7 +19,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { using year = std::chrono::year; using month = std::chrono::month; @@ -71,4 +71,6 @@ int main() year_month_weekday ym{year{i}, January, weekday_indexed{Tuesday, 1}}; assert((ym.ok() == year{i}.ok())); } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/op.local_days.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/op.local_days.pass.cpp index 788af65355561..e86e5b0fa6e37 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/op.local_days.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/op.local_days.pass.cpp @@ -25,7 +25,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { using year = std::chrono::year; using month = std::chrono::month; @@ -70,4 +70,5 @@ int main() assert( year_month_weekday{sd} == ymwd); // and back } + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/op.sys_days.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/op.sys_days.pass.cpp index 111cf5f38db87..afb1d70148adf 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/op.sys_days.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/op.sys_days.pass.cpp @@ -25,7 +25,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { using year = std::chrono::year; using month = std::chrono::month; @@ -70,4 +70,5 @@ int main() assert( year_month_weekday{sd} == ymwd); // and back } + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/plus_minus_equal_month.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/plus_minus_equal_month.pass.cpp index 7e20a8eb05a28..fd53279ddde2e 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/plus_minus_equal_month.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/plus_minus_equal_month.pass.cpp @@ -32,7 +32,7 @@ constexpr bool testConstexpr(D d1) return true; } -int main() +int main(int, char**) { using year = std::chrono::year; using month = std::chrono::month; @@ -76,4 +76,6 @@ int main() assert(ymwd.weekday() == Tuesday); assert(ymwd.index() == 2); } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/plus_minus_equal_year.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/plus_minus_equal_year.pass.cpp index 4deee9bc35d06..cf229febe0839 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/plus_minus_equal_year.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/plus_minus_equal_year.pass.cpp @@ -32,7 +32,7 @@ constexpr bool testConstexpr(D d1) return true; } -int main() +int main(int, char**) { using year = std::chrono::year; using month = std::chrono::month; @@ -76,4 +76,6 @@ int main() assert(ymwd.weekday() == Tuesday); assert(ymwd.index() == 2); } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/weekday.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/weekday.pass.cpp index 1b9c8ad1041e0..dac1f7cc0490a 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/weekday.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/weekday.pass.cpp @@ -19,7 +19,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { using year = std::chrono::year; using month = std::chrono::month; @@ -37,4 +37,6 @@ int main() year_month_weekday ymwd0(year{1234}, month{2}, weekday_indexed{weekday{i}, 1}); assert(static_cast(ymwd0.weekday()) == i); } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/weekday_indexed.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/weekday_indexed.pass.cpp index 4a9832323f154..f089a8cb93e1f 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/weekday_indexed.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/weekday_indexed.pass.cpp @@ -19,7 +19,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { using year = std::chrono::year; using month = std::chrono::month; @@ -41,4 +41,6 @@ int main() assert( static_cast(ymwd1.weekday_indexed().weekday()) == 2); assert( static_cast(ymwd1.weekday_indexed().index()) == i); } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/year.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/year.pass.cpp index 8103c28aa60f5..1ead67570cf38 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/year.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/year.pass.cpp @@ -19,7 +19,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { using year = std::chrono::year; using month = std::chrono::month; @@ -36,4 +36,6 @@ int main() year_month_weekday ym(year{i}, month{1}, weekday_indexed{}); assert( static_cast(ym.year()) == i); } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.nonmembers/comparisons.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.nonmembers/comparisons.pass.cpp index 847699b25165c..5631127222b1f 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.nonmembers/comparisons.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.nonmembers/comparisons.pass.cpp @@ -22,7 +22,7 @@ #include "test_macros.h" #include "test_comparisons.h" -int main() +int main(int, char**) { using year = std::chrono::year; using month = std::chrono::month; @@ -109,4 +109,6 @@ int main() year_month_weekday{year{i}, January, weekday_indexed{Tuesday, 1}}, year_month_weekday{year{j}, January, weekday_indexed{Tuesday, 1}}, i == j))); + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.nonmembers/minus.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.nonmembers/minus.pass.cpp index ff472fdc6ceb1..47cfbea6a6794 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.nonmembers/minus.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.nonmembers/minus.pass.cpp @@ -50,7 +50,7 @@ constexpr bool testConstexprMonths () } -int main() +int main(int, char**) { using year = std::chrono::year; using month = std::chrono::month; @@ -96,4 +96,6 @@ int main() assert(ym1.index() == 2); } } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.nonmembers/plus.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.nonmembers/plus.pass.cpp index bc72d958ca07a..29df4776e2bf5 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.nonmembers/plus.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.nonmembers/plus.pass.cpp @@ -51,7 +51,7 @@ constexpr bool testConstexprMonths(std::chrono::year_month_weekday ym) } -int main() +int main(int, char**) { using year = std::chrono::year; using month = std::chrono::month; @@ -116,4 +116,6 @@ int main() } } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.nonmembers/streaming.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.nonmembers/streaming.pass.cpp index eb92cf05e47a4..411e4335fd0d2 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.nonmembers/streaming.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.nonmembers/streaming.pass.cpp @@ -45,7 +45,7 @@ #include #include "test_macros.h" -int main() +int main(int, char**) { using year_month_weekday = std::chrono::year_month_weekday; using year = std::chrono::year; @@ -53,4 +53,6 @@ int main() using weekday = std::chrono::weekday; std::cout << year_month_weekday{year{2018}, month{3}, weekday{4}}; + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.ymwd/types.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.ymwd/types.pass.cpp index 449098c4f18bf..76e2e0f237e6b 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.ymwd/types.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.ymwd/types.pass.cpp @@ -16,10 +16,12 @@ #include "test_macros.h" -int main() +int main(int, char**) { using year_month_weekday = std::chrono::year_month_weekday; static_assert(std::is_trivially_copyable_v, ""); static_assert(std::is_standard_layout_v, ""); + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.members/ctor.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.members/ctor.pass.cpp index 1db6850dbcec4..31d2e9ca7061f 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.members/ctor.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.members/ctor.pass.cpp @@ -28,7 +28,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { using year = std::chrono::year; using month = std::chrono::month; @@ -48,4 +48,6 @@ int main() static_assert( ym1.weekday_last() == weekday_last{Tuesday}, ""); static_assert( ym1.ok(), ""); + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.members/month.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.members/month.pass.cpp index 7b95084b214ca..df62d010ab641 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.members/month.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.members/month.pass.cpp @@ -19,7 +19,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { using year = std::chrono::year; using month = std::chrono::month; @@ -37,4 +37,6 @@ int main() year_month_weekday_last ymd(year{1234}, month{i}, weekday_last{weekday{}}); assert( static_cast(ymd.month()) == i); } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.members/ok.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.members/ok.pass.cpp index 1cffb4565b7f9..c18b926704c72 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.members/ok.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.members/ok.pass.cpp @@ -19,7 +19,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { using year = std::chrono::year; using month = std::chrono::month; @@ -69,4 +69,6 @@ int main() year_month_weekday_last ym{year{i}, January, weekday_last{Tuesday}}; assert((ym.ok() == year{i}.ok())); } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.members/op_local_days.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.members/op_local_days.pass.cpp index 83f8b70dc79b8..c663406ee43ec 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.members/op_local_days.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.members/op_local_days.pass.cpp @@ -19,7 +19,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { using year = std::chrono::year; using month_day_last = std::chrono::month_day_last; @@ -57,4 +57,6 @@ int main() assert(sd.time_since_epoch() == days{-(10957+33)}); } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.members/op_sys_days.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.members/op_sys_days.pass.cpp index cc3da2992e831..cb75842c64c27 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.members/op_sys_days.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.members/op_sys_days.pass.cpp @@ -22,7 +22,7 @@ #include -int main() +int main(int, char**) { using year = std::chrono::year; using month = std::chrono::month; @@ -65,4 +65,6 @@ int main() assert(sd.time_since_epoch() == days{-(10957+35)}); } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.members/plus_minus_equal_month.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.members/plus_minus_equal_month.pass.cpp index ad513c5d0cf41..b2bb1361b6b9c 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.members/plus_minus_equal_month.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.members/plus_minus_equal_month.pass.cpp @@ -32,7 +32,7 @@ constexpr bool testConstexpr(D d1) return true; } -int main() +int main(int, char**) { using year = std::chrono::year; using month = std::chrono::month; @@ -71,4 +71,6 @@ int main() assert(ymwd.year() == y); assert(ymwd.weekday() == Tuesday); } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.members/plus_minus_equal_year.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.members/plus_minus_equal_year.pass.cpp index 7d9255fe494f6..8ced182d6c8e5 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.members/plus_minus_equal_year.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.members/plus_minus_equal_year.pass.cpp @@ -32,7 +32,7 @@ constexpr bool testConstexpr(D d1) return true; } -int main() +int main(int, char**) { using year = std::chrono::year; using month = std::chrono::month; @@ -72,4 +72,6 @@ int main() assert(ymwd.month() == January); assert(ymwd.weekday() == Tuesday); } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.members/weekday.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.members/weekday.pass.cpp index cc0521354f9c4..1de0b83230987 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.members/weekday.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.members/weekday.pass.cpp @@ -19,7 +19,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { using year = std::chrono::year; using month = std::chrono::month; @@ -37,4 +37,6 @@ int main() year_month_weekday_last ymwdl(year{1}, month{1}, weekday_last{weekday{i}}); assert(static_cast(ymwdl.weekday()) == i); } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.members/year.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.members/year.pass.cpp index 4011f0673ff5e..4e94079114557 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.members/year.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.members/year.pass.cpp @@ -19,7 +19,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { using year = std::chrono::year; using month = std::chrono::month; @@ -37,4 +37,6 @@ int main() year_month_weekday_last ymwdl(year{i}, month{1}, weekday_last{weekday{}}); assert(static_cast(ymwdl.year()) == i); } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.nonmembers/comparisons.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.nonmembers/comparisons.pass.cpp index a13b11f8c10e1..24074f33cbcb9 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.nonmembers/comparisons.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.nonmembers/comparisons.pass.cpp @@ -22,7 +22,7 @@ #include "test_macros.h" #include "test_comparisons.h" -int main() +int main(int, char**) { using year = std::chrono::year; using month = std::chrono::month; @@ -110,4 +110,6 @@ int main() year_month_weekday_last{year{i}, January, weekday_last{Tuesday}}, year_month_weekday_last{year{j}, January, weekday_last{Tuesday}}, i == j))); + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.nonmembers/minus.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.nonmembers/minus.pass.cpp index 20a58152f33e5..d58c461be8b37 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.nonmembers/minus.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.nonmembers/minus.pass.cpp @@ -40,7 +40,7 @@ constexpr bool testConstexprMonths(std::chrono::year_month_weekday_last ym) return true; } -int main() +int main(int, char**) { using year = std::chrono::year; using month = std::chrono::month; @@ -89,4 +89,6 @@ int main() } } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.nonmembers/plus.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.nonmembers/plus.pass.cpp index 45dd7562dc0f3..fe246cf42ba81 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.nonmembers/plus.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.nonmembers/plus.pass.cpp @@ -47,7 +47,7 @@ constexpr bool testConstexprMonths(std::chrono::year_month_weekday_last ym) } -int main() +int main(int, char**) { using year = std::chrono::year; using month = std::chrono::month; @@ -112,4 +112,6 @@ int main() } } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.nonmembers/streaming.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.nonmembers/streaming.pass.cpp index 6e4409c7138eb..cdfe55f165091 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.nonmembers/streaming.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.nonmembers/streaming.pass.cpp @@ -25,7 +25,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { using year_month_weekday_last = std::chrono::year_month_weekday_last; using year = std::chrono::year; @@ -34,4 +34,6 @@ int main() using weekday_last = std::chrono::weekday_last; std::cout << year_month_weekday_last{year{2018}, month{3}, weekday_last{weekday{4}}}; + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.ymwdlast/types.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.ymwdlast/types.pass.cpp index e0580fac76fa9..70dea7bf922c4 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.ymwdlast/types.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.ymwdlast/types.pass.cpp @@ -16,10 +16,12 @@ #include "test_macros.h" -int main() +int main(int, char**) { using year_month_weekday_last = std::chrono::year_month_weekday_last; static_assert(std::is_trivially_copyable_v, ""); static_assert(std::is_standard_layout_v, ""); + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.clock.req/nothing_to_do.pass.cpp b/libcxx/test/std/utilities/time/time.clock.req/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/utilities/time/time.clock.req/nothing_to_do.pass.cpp +++ b/libcxx/test/std/utilities/time/time.clock.req/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.clock/nothing_to_do.pass.cpp b/libcxx/test/std/utilities/time/time.clock/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/utilities/time/time.clock/nothing_to_do.pass.cpp +++ b/libcxx/test/std/utilities/time/time.clock/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.clock/time.clock.file/consistency.pass.cpp b/libcxx/test/std/utilities/time/time.clock/time.clock.file/consistency.pass.cpp index 332d8163cb6fd..165bec2e117b2 100644 --- a/libcxx/test/std/utilities/time/time.clock/time.clock.file/consistency.pass.cpp +++ b/libcxx/test/std/utilities/time/time.clock/time.clock.file/consistency.pass.cpp @@ -22,7 +22,7 @@ template void test(const T &) {} -int main() +int main(int, char**) { typedef std::chrono::file_clock C; static_assert((std::is_same::value), ""); @@ -31,4 +31,6 @@ int main() static_assert((std::is_same::value), ""); static_assert(!C::is_steady, ""); test(std::chrono::file_clock::is_steady); + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.clock/time.clock.file/file_time.pass.cpp b/libcxx/test/std/utilities/time/time.clock/time.clock.file/file_time.pass.cpp index 75652f3ecd0ab..61d92381fc8c0 100644 --- a/libcxx/test/std/utilities/time/time.clock/time.clock.file/file_time.pass.cpp +++ b/libcxx/test/std/utilities/time/time.clock/time.clock.file/file_time.pass.cpp @@ -21,8 +21,10 @@ void test() { ASSERT_SAME_TYPE(std::chrono::file_time, std::chrono::time_point); } -int main() { +int main(int, char**) { test(); test(); test(); + + return 0; } \ No newline at end of file diff --git a/libcxx/test/std/utilities/time/time.clock/time.clock.file/now.pass.cpp b/libcxx/test/std/utilities/time/time.clock/time.clock.file/now.pass.cpp index 3b51b91b501aa..79cdf06120ca2 100644 --- a/libcxx/test/std/utilities/time/time.clock/time.clock.file/now.pass.cpp +++ b/libcxx/test/std/utilities/time/time.clock/time.clock.file/now.pass.cpp @@ -22,7 +22,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { typedef std::chrono::file_clock C; ASSERT_NOEXCEPT(C::now()); @@ -31,4 +31,6 @@ int main() assert(t1.time_since_epoch().count() != 0); assert(C::time_point::min() < t1); assert(C::time_point::max() > t1); + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.clock/time.clock.file/rep_signed.pass.cpp b/libcxx/test/std/utilities/time/time.clock/time.clock.file/rep_signed.pass.cpp index c36649a5d414d..821072e6df6c6 100644 --- a/libcxx/test/std/utilities/time/time.clock/time.clock.file/rep_signed.pass.cpp +++ b/libcxx/test/std/utilities/time/time.clock/time.clock.file/rep_signed.pass.cpp @@ -20,9 +20,11 @@ #include #include -int main() +int main(int, char**) { static_assert(std::is_signed::value, ""); assert(std::chrono::file_clock::duration::min() < std::chrono::file_clock::duration::zero()); + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.clock/time.clock.hires/consistency.pass.cpp b/libcxx/test/std/utilities/time/time.clock/time.clock.hires/consistency.pass.cpp index 6f06e718e257b..1650d3b6b5f3e 100644 --- a/libcxx/test/std/utilities/time/time.clock/time.clock.hires/consistency.pass.cpp +++ b/libcxx/test/std/utilities/time/time.clock/time.clock.hires/consistency.pass.cpp @@ -27,7 +27,7 @@ template void test(const T &) {} -int main() +int main(int, char**) { typedef std::chrono::high_resolution_clock C; static_assert((std::is_same::value), ""); @@ -35,4 +35,6 @@ int main() static_assert((std::is_same::value), ""); static_assert(C::is_steady || !C::is_steady, ""); test(std::chrono::high_resolution_clock::is_steady); + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.clock/time.clock.hires/now.pass.cpp b/libcxx/test/std/utilities/time/time.clock/time.clock.hires/now.pass.cpp index c1d879c6f3b00..ddf3ced87dac1 100644 --- a/libcxx/test/std/utilities/time/time.clock/time.clock.hires/now.pass.cpp +++ b/libcxx/test/std/utilities/time/time.clock/time.clock.hires/now.pass.cpp @@ -15,11 +15,13 @@ #include #include -int main() +int main(int, char**) { typedef std::chrono::high_resolution_clock C; C::time_point t1 = C::now(); assert(t1.time_since_epoch().count() != 0); assert(C::time_point::min() < t1); assert(C::time_point::max() > t1); + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.clock/time.clock.steady/consistency.pass.cpp b/libcxx/test/std/utilities/time/time.clock/time.clock.steady/consistency.pass.cpp index 1577bc180086e..0797f2cb5bcf1 100644 --- a/libcxx/test/std/utilities/time/time.clock/time.clock.steady/consistency.pass.cpp +++ b/libcxx/test/std/utilities/time/time.clock/time.clock.steady/consistency.pass.cpp @@ -29,7 +29,7 @@ template void test(const T &) {} -int main() +int main(int, char**) { typedef std::chrono::steady_clock C; static_assert((std::is_same::value), ""); @@ -37,4 +37,6 @@ int main() static_assert((std::is_same::value), ""); static_assert(C::is_steady, ""); test(std::chrono::steady_clock::is_steady); + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.clock/time.clock.steady/now.pass.cpp b/libcxx/test/std/utilities/time/time.clock/time.clock.steady/now.pass.cpp index 248f1523f87f8..7d268fd67ded9 100644 --- a/libcxx/test/std/utilities/time/time.clock/time.clock.steady/now.pass.cpp +++ b/libcxx/test/std/utilities/time/time.clock/time.clock.steady/now.pass.cpp @@ -17,10 +17,12 @@ #include #include -int main() +int main(int, char**) { typedef std::chrono::steady_clock C; C::time_point t1 = C::now(); C::time_point t2 = C::now(); assert(t2 >= t1); + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.clock/time.clock.system/consistency.pass.cpp b/libcxx/test/std/utilities/time/time.clock/time.clock.system/consistency.pass.cpp index b15a8e2124d9b..b92652134ad6a 100644 --- a/libcxx/test/std/utilities/time/time.clock/time.clock.system/consistency.pass.cpp +++ b/libcxx/test/std/utilities/time/time.clock/time.clock.system/consistency.pass.cpp @@ -27,7 +27,7 @@ template void test(const T &) {} -int main() +int main(int, char**) { typedef std::chrono::system_clock C; static_assert((std::is_same::value), ""); @@ -36,4 +36,6 @@ int main() static_assert((std::is_same::value), ""); static_assert((C::is_steady || !C::is_steady), ""); test(std::chrono::system_clock::is_steady); + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.clock/time.clock.system/from_time_t.pass.cpp b/libcxx/test/std/utilities/time/time.clock/time.clock.system/from_time_t.pass.cpp index e6acef241c68e..54252718d4af1 100644 --- a/libcxx/test/std/utilities/time/time.clock/time.clock.system/from_time_t.pass.cpp +++ b/libcxx/test/std/utilities/time/time.clock/time.clock.system/from_time_t.pass.cpp @@ -15,9 +15,11 @@ #include #include -int main() +int main(int, char**) { typedef std::chrono::system_clock C; C::time_point t1 = C::from_time_t(C::to_time_t(C::now())); ((void)t1); + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.clock/time.clock.system/local_time.types.pass.cpp b/libcxx/test/std/utilities/time/time.clock/time.clock.system/local_time.types.pass.cpp index 398cdb9d760bc..5802166c876d5 100644 --- a/libcxx/test/std/utilities/time/time.clock/time.clock.system/local_time.types.pass.cpp +++ b/libcxx/test/std/utilities/time/time.clock/time.clock.system/local_time.types.pass.cpp @@ -26,7 +26,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { using local_t = std::chrono::local_t; using year = std::chrono::year; @@ -61,4 +61,6 @@ int main() ASSERT_SAME_TYPE(decltype(s0.time_since_epoch()), seconds); assert( s0.time_since_epoch().count() == 0); assert( s1.time_since_epoch().count() == 946684800L); + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.clock/time.clock.system/now.pass.cpp b/libcxx/test/std/utilities/time/time.clock/time.clock.system/now.pass.cpp index 00a163685f640..9d74541f98960 100644 --- a/libcxx/test/std/utilities/time/time.clock/time.clock.system/now.pass.cpp +++ b/libcxx/test/std/utilities/time/time.clock/time.clock.system/now.pass.cpp @@ -15,11 +15,13 @@ #include #include -int main() +int main(int, char**) { typedef std::chrono::system_clock C; C::time_point t1 = C::now(); assert(t1.time_since_epoch().count() != 0); assert(C::time_point::min() < t1); assert(C::time_point::max() > t1); + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.clock/time.clock.system/rep_signed.pass.cpp b/libcxx/test/std/utilities/time/time.clock/time.clock.system/rep_signed.pass.cpp index cae8375d87324..967af52e11d23 100644 --- a/libcxx/test/std/utilities/time/time.clock/time.clock.system/rep_signed.pass.cpp +++ b/libcxx/test/std/utilities/time/time.clock/time.clock.system/rep_signed.pass.cpp @@ -15,8 +15,10 @@ #include #include -int main() +int main(int, char**) { assert(std::chrono::system_clock::duration::min() < std::chrono::system_clock::duration::zero()); + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.clock/time.clock.system/sys.time.types.pass.cpp b/libcxx/test/std/utilities/time/time.clock/time.clock.system/sys.time.types.pass.cpp index 516f54914fd44..174fbe9414420 100644 --- a/libcxx/test/std/utilities/time/time.clock/time.clock.system/sys.time.types.pass.cpp +++ b/libcxx/test/std/utilities/time/time.clock/time.clock.system/sys.time.types.pass.cpp @@ -25,7 +25,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { using system_clock = std::chrono::system_clock; using year = std::chrono::year; @@ -60,4 +60,6 @@ int main() ASSERT_SAME_TYPE(decltype(s0.time_since_epoch()), seconds); assert( s0.time_since_epoch().count() == 0); assert( s1.time_since_epoch().count() == 946684800L); + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.clock/time.clock.system/to_time_t.pass.cpp b/libcxx/test/std/utilities/time/time.clock/time.clock.system/to_time_t.pass.cpp index 0819a7b547f63..86b37bb6bd1bd 100644 --- a/libcxx/test/std/utilities/time/time.clock/time.clock.system/to_time_t.pass.cpp +++ b/libcxx/test/std/utilities/time/time.clock/time.clock.system/to_time_t.pass.cpp @@ -15,9 +15,11 @@ #include #include -int main() +int main(int, char**) { typedef std::chrono::system_clock C; std::time_t t1 = C::to_time_t(C::now()); ((void)t1); + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.duration/default_ratio.pass.cpp b/libcxx/test/std/utilities/time/time.duration/default_ratio.pass.cpp index 92c015eef3253..08870488c16a5 100644 --- a/libcxx/test/std/utilities/time/time.duration/default_ratio.pass.cpp +++ b/libcxx/test/std/utilities/time/time.duration/default_ratio.pass.cpp @@ -18,8 +18,10 @@ #include #include -int main() +int main(int, char**) { static_assert((std::is_same >, std::chrono::duration >::value), ""); + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.duration/duration.fail.cpp b/libcxx/test/std/utilities/time/time.duration/duration.fail.cpp index 94e239c1f7cef..02029c02bbeca 100644 --- a/libcxx/test/std/utilities/time/time.duration/duration.fail.cpp +++ b/libcxx/test/std/utilities/time/time.duration/duration.fail.cpp @@ -15,8 +15,10 @@ #include -int main() +int main(int, char**) { typedef std::chrono::duration D; D d; + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.duration/positive_num.fail.cpp b/libcxx/test/std/utilities/time/time.duration/positive_num.fail.cpp index 6e78f77656183..737576205cf07 100644 --- a/libcxx/test/std/utilities/time/time.duration/positive_num.fail.cpp +++ b/libcxx/test/std/utilities/time/time.duration/positive_num.fail.cpp @@ -14,8 +14,10 @@ #include -int main() +int main(int, char**) { typedef std::chrono::duration > D; D d; + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.duration/ratio.fail.cpp b/libcxx/test/std/utilities/time/time.duration/ratio.fail.cpp index 21873788a36c9..20298b772cb5c 100644 --- a/libcxx/test/std/utilities/time/time.duration/ratio.fail.cpp +++ b/libcxx/test/std/utilities/time/time.duration/ratio.fail.cpp @@ -22,8 +22,10 @@ class Ratio static const int den = D; }; -int main() +int main(int, char**) { typedef std::chrono::duration > D; D d; + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.duration/time.duration.alg/abs.fail.cpp b/libcxx/test/std/utilities/time/time.duration/time.duration.alg/abs.fail.cpp index 6331dc95a9a31..8d807c7a9b395 100644 --- a/libcxx/test/std/utilities/time/time.duration/time.duration.alg/abs.fail.cpp +++ b/libcxx/test/std/utilities/time/time.duration/time.duration.alg/abs.fail.cpp @@ -20,7 +20,9 @@ typedef std::chrono::duration unsigned_secs; -int main() +int main(int, char**) { std::chrono::abs(unsigned_secs(0)); + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.duration/time.duration.alg/abs.pass.cpp b/libcxx/test/std/utilities/time/time.duration/time.duration.alg/abs.pass.cpp index 5cb52ba76232b..06f9a7c7f036a 100644 --- a/libcxx/test/std/utilities/time/time.duration/time.duration.alg/abs.pass.cpp +++ b/libcxx/test/std/utilities/time/time.duration/time.duration.alg/abs.pass.cpp @@ -30,7 +30,7 @@ test(const Duration& f, const Duration& d) } } -int main() +int main(int, char**) { // 7290000ms is 2 hours, 1 minute, and 30 seconds test(std::chrono::milliseconds( 7290000), std::chrono::milliseconds( 7290000)); @@ -46,4 +46,6 @@ int main() constexpr std::chrono::hours h2 = std::chrono::abs(std::chrono::hours(3)); static_assert(h2.count() == 3, ""); } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.duration/time.duration.arithmetic/op_++.pass.cpp b/libcxx/test/std/utilities/time/time.duration/time.duration.arithmetic/op_++.pass.cpp index 9d6566a082ca2..d0e47b7fa8d5e 100644 --- a/libcxx/test/std/utilities/time/time.duration/time.duration.arithmetic/op_++.pass.cpp +++ b/libcxx/test/std/utilities/time/time.duration/time.duration.arithmetic/op_++.pass.cpp @@ -25,7 +25,7 @@ constexpr bool test_constexpr() } #endif -int main() +int main(int, char**) { { std::chrono::hours h(3); @@ -37,4 +37,6 @@ int main() #if TEST_STD_VER > 14 static_assert(test_constexpr(), ""); #endif + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.duration/time.duration.arithmetic/op_++int.pass.cpp b/libcxx/test/std/utilities/time/time.duration/time.duration.arithmetic/op_++int.pass.cpp index 78beffe2617a9..084819af3ce8f 100644 --- a/libcxx/test/std/utilities/time/time.duration/time.duration.arithmetic/op_++int.pass.cpp +++ b/libcxx/test/std/utilities/time/time.duration/time.duration.arithmetic/op_++int.pass.cpp @@ -26,7 +26,7 @@ constexpr bool test_constexpr() } #endif -int main() +int main(int, char**) { { std::chrono::hours h1(3); @@ -38,4 +38,6 @@ int main() #if TEST_STD_VER > 14 static_assert(test_constexpr(), ""); #endif + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.duration/time.duration.arithmetic/op_+.pass.cpp b/libcxx/test/std/utilities/time/time.duration/time.duration.arithmetic/op_+.pass.cpp index 0b8f49fc38f65..a9d136f792ae6 100644 --- a/libcxx/test/std/utilities/time/time.duration/time.duration.arithmetic/op_+.pass.cpp +++ b/libcxx/test/std/utilities/time/time.duration/time.duration.arithmetic/op_+.pass.cpp @@ -17,7 +17,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { { const std::chrono::minutes m(3); @@ -42,4 +42,6 @@ int main() static_assert( (std::is_same< decltype(zero+one), D1>::value), ""); static_assert( (std::is_same< decltype(+one), D1>::value), ""); } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.duration/time.duration.arithmetic/op_+=.pass.cpp b/libcxx/test/std/utilities/time/time.duration/time.duration.arithmetic/op_+=.pass.cpp index 0e907b573b22e..4247f2d56893a 100644 --- a/libcxx/test/std/utilities/time/time.duration/time.duration.arithmetic/op_+=.pass.cpp +++ b/libcxx/test/std/utilities/time/time.duration/time.duration.arithmetic/op_+=.pass.cpp @@ -28,7 +28,7 @@ constexpr bool test_constexpr() } #endif -int main() +int main(int, char**) { { std::chrono::seconds s(3); @@ -41,4 +41,6 @@ int main() #if TEST_STD_VER > 14 static_assert(test_constexpr(), ""); #endif + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.duration/time.duration.arithmetic/op_--.pass.cpp b/libcxx/test/std/utilities/time/time.duration/time.duration.arithmetic/op_--.pass.cpp index c9f1278a37619..cfdb7075b3732 100644 --- a/libcxx/test/std/utilities/time/time.duration/time.duration.arithmetic/op_--.pass.cpp +++ b/libcxx/test/std/utilities/time/time.duration/time.duration.arithmetic/op_--.pass.cpp @@ -25,7 +25,7 @@ constexpr bool test_constexpr() } #endif -int main() +int main(int, char**) { { std::chrono::hours h(3); @@ -37,4 +37,6 @@ int main() #if TEST_STD_VER > 14 static_assert(test_constexpr(), ""); #endif + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.duration/time.duration.arithmetic/op_--int.pass.cpp b/libcxx/test/std/utilities/time/time.duration/time.duration.arithmetic/op_--int.pass.cpp index 5abecee1648d2..4afb86e0caf24 100644 --- a/libcxx/test/std/utilities/time/time.duration/time.duration.arithmetic/op_--int.pass.cpp +++ b/libcxx/test/std/utilities/time/time.duration/time.duration.arithmetic/op_--int.pass.cpp @@ -27,7 +27,7 @@ constexpr bool test_constexpr() #endif -int main() +int main(int, char**) { { std::chrono::hours h1(3); @@ -39,4 +39,6 @@ int main() #if TEST_STD_VER > 14 static_assert(test_constexpr(), ""); #endif + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.duration/time.duration.arithmetic/op_-.pass.cpp b/libcxx/test/std/utilities/time/time.duration/time.duration.arithmetic/op_-.pass.cpp index f7ab6d2e299fb..fe065ff5f997c 100644 --- a/libcxx/test/std/utilities/time/time.duration/time.duration.arithmetic/op_-.pass.cpp +++ b/libcxx/test/std/utilities/time/time.duration/time.duration.arithmetic/op_-.pass.cpp @@ -17,7 +17,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { { const std::chrono::minutes m(3); @@ -43,4 +43,6 @@ int main() static_assert( (std::is_same< decltype(-one), D1>::value), ""); static_assert( (std::is_same< decltype(+one), D1>::value), ""); } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.duration/time.duration.arithmetic/op_-=.pass.cpp b/libcxx/test/std/utilities/time/time.duration/time.duration.arithmetic/op_-=.pass.cpp index 1752d5257b806..b457619e15492 100644 --- a/libcxx/test/std/utilities/time/time.duration/time.duration.arithmetic/op_-=.pass.cpp +++ b/libcxx/test/std/utilities/time/time.duration/time.duration.arithmetic/op_-=.pass.cpp @@ -28,7 +28,7 @@ constexpr bool test_constexpr() } #endif -int main() +int main(int, char**) { { std::chrono::seconds s(3); @@ -41,4 +41,6 @@ int main() #if TEST_STD_VER > 14 static_assert(test_constexpr(), ""); #endif + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.duration/time.duration.arithmetic/op_divide=.pass.cpp b/libcxx/test/std/utilities/time/time.duration/time.duration.arithmetic/op_divide=.pass.cpp index 4f79398f73b8a..753ea5a8bc1eb 100644 --- a/libcxx/test/std/utilities/time/time.duration/time.duration.arithmetic/op_divide=.pass.cpp +++ b/libcxx/test/std/utilities/time/time.duration/time.duration.arithmetic/op_divide=.pass.cpp @@ -26,7 +26,7 @@ constexpr bool test_constexpr() } #endif -int main() +int main(int, char**) { { std::chrono::nanoseconds ns(15); @@ -37,4 +37,6 @@ int main() #if TEST_STD_VER > 14 static_assert(test_constexpr(), ""); #endif + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.duration/time.duration.arithmetic/op_mod=duration.pass.cpp b/libcxx/test/std/utilities/time/time.duration/time.duration.arithmetic/op_mod=duration.pass.cpp index 89b550d015c0d..649f4aa1a4cef 100644 --- a/libcxx/test/std/utilities/time/time.duration/time.duration.arithmetic/op_mod=duration.pass.cpp +++ b/libcxx/test/std/utilities/time/time.duration/time.duration.arithmetic/op_mod=duration.pass.cpp @@ -27,7 +27,7 @@ constexpr bool test_constexpr() } #endif -int main() +int main(int, char**) { { std::chrono::microseconds us1(11); @@ -41,4 +41,6 @@ int main() #if TEST_STD_VER > 14 static_assert(test_constexpr(), ""); #endif + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.duration/time.duration.arithmetic/op_mod=rep.pass.cpp b/libcxx/test/std/utilities/time/time.duration/time.duration.arithmetic/op_mod=rep.pass.cpp index 8ef16c7ff7c92..0eb73ee674f11 100644 --- a/libcxx/test/std/utilities/time/time.duration/time.duration.arithmetic/op_mod=rep.pass.cpp +++ b/libcxx/test/std/utilities/time/time.duration/time.duration.arithmetic/op_mod=rep.pass.cpp @@ -26,7 +26,7 @@ constexpr bool test_constexpr() } #endif -int main() +int main(int, char**) { { std::chrono::microseconds us(11); @@ -37,4 +37,6 @@ int main() #if TEST_STD_VER > 14 static_assert(test_constexpr(), ""); #endif + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.duration/time.duration.arithmetic/op_times=.pass.cpp b/libcxx/test/std/utilities/time/time.duration/time.duration.arithmetic/op_times=.pass.cpp index b4b76fb6f5056..51c20c5076496 100644 --- a/libcxx/test/std/utilities/time/time.duration/time.duration.arithmetic/op_times=.pass.cpp +++ b/libcxx/test/std/utilities/time/time.duration/time.duration.arithmetic/op_times=.pass.cpp @@ -26,7 +26,7 @@ constexpr bool test_constexpr() } #endif -int main() +int main(int, char**) { { std::chrono::nanoseconds ns(3); @@ -37,4 +37,6 @@ int main() #if TEST_STD_VER > 14 static_assert(test_constexpr(), ""); #endif + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.duration/time.duration.cast/ceil.fail.cpp b/libcxx/test/std/utilities/time/time.duration/time.duration.cast/ceil.fail.cpp index e557bc21fb561..a9711f448c878 100644 --- a/libcxx/test/std/utilities/time/time.duration/time.duration.cast/ceil.fail.cpp +++ b/libcxx/test/std/utilities/time/time.duration/time.duration.cast/ceil.fail.cpp @@ -19,7 +19,9 @@ #include -int main() +int main(int, char**) { std::chrono::ceil(std::chrono::milliseconds(3)); + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.duration/time.duration.cast/ceil.pass.cpp b/libcxx/test/std/utilities/time/time.duration/time.duration.cast/ceil.pass.cpp index b509182c41ea5..a6e1982d04458 100644 --- a/libcxx/test/std/utilities/time/time.duration/time.duration.cast/ceil.pass.cpp +++ b/libcxx/test/std/utilities/time/time.duration/time.duration.cast/ceil.pass.cpp @@ -32,7 +32,7 @@ test(const FromDuration& f, const ToDuration& d) } } -int main() +int main(int, char**) { // 7290000ms is 2 hours, 1 minute, and 30 seconds test(std::chrono::milliseconds( 7290000), std::chrono::hours( 3)); @@ -47,4 +47,6 @@ int main() constexpr std::chrono::hours h2 = std::chrono::ceil(std::chrono::milliseconds(-9000000)); static_assert(h2.count() == -2, ""); } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.duration/time.duration.cast/duration_cast.pass.cpp b/libcxx/test/std/utilities/time/time.duration/time.duration.cast/duration_cast.pass.cpp index 5187d3d0e7cc2..4151756764abf 100644 --- a/libcxx/test/std/utilities/time/time.duration/time.duration.cast/duration_cast.pass.cpp +++ b/libcxx/test/std/utilities/time/time.duration/time.duration.cast/duration_cast.pass.cpp @@ -32,7 +32,7 @@ test(const FromDuration& f, const ToDuration& d) } } -int main() +int main(int, char**) { test(std::chrono::milliseconds(7265000), std::chrono::hours(2)); test(std::chrono::milliseconds(7265000), std::chrono::minutes(121)); @@ -50,4 +50,6 @@ int main() static_assert(h.count() == 2, ""); } #endif + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.duration/time.duration.cast/floor.fail.cpp b/libcxx/test/std/utilities/time/time.duration/time.duration.cast/floor.fail.cpp index 62dd5a51d6064..c119a800cfaee 100644 --- a/libcxx/test/std/utilities/time/time.duration/time.duration.cast/floor.fail.cpp +++ b/libcxx/test/std/utilities/time/time.duration/time.duration.cast/floor.fail.cpp @@ -19,7 +19,9 @@ #include -int main() +int main(int, char**) { std::chrono::floor(std::chrono::milliseconds(3)); + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.duration/time.duration.cast/floor.pass.cpp b/libcxx/test/std/utilities/time/time.duration/time.duration.cast/floor.pass.cpp index 29142bdcf3e26..6783b1f67eda5 100644 --- a/libcxx/test/std/utilities/time/time.duration/time.duration.cast/floor.pass.cpp +++ b/libcxx/test/std/utilities/time/time.duration/time.duration.cast/floor.pass.cpp @@ -31,7 +31,7 @@ test(const FromDuration& f, const ToDuration& d) } } -int main() +int main(int, char**) { // 7290000ms is 2 hours, 1 minute, and 30 seconds test(std::chrono::milliseconds( 7290000), std::chrono::hours( 2)); @@ -46,4 +46,6 @@ int main() constexpr std::chrono::hours h2 = std::chrono::floor(std::chrono::milliseconds(-9000000)); static_assert(h2.count() == -3, ""); } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.duration/time.duration.cast/round.fail.cpp b/libcxx/test/std/utilities/time/time.duration/time.duration.cast/round.fail.cpp index aadfbfdc47eb3..93366b83618db 100644 --- a/libcxx/test/std/utilities/time/time.duration/time.duration.cast/round.fail.cpp +++ b/libcxx/test/std/utilities/time/time.duration/time.duration.cast/round.fail.cpp @@ -19,7 +19,9 @@ #include -int main() +int main(int, char**) { std::chrono::round(std::chrono::milliseconds(3)); + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.duration/time.duration.cast/round.pass.cpp b/libcxx/test/std/utilities/time/time.duration/time.duration.cast/round.pass.cpp index b0789b7917d79..ebd2e3194a4ac 100644 --- a/libcxx/test/std/utilities/time/time.duration/time.duration.cast/round.pass.cpp +++ b/libcxx/test/std/utilities/time/time.duration/time.duration.cast/round.pass.cpp @@ -31,7 +31,7 @@ test(const FromDuration& f, const ToDuration& d) } } -int main() +int main(int, char**) { // 7290000ms is 2 hours, 1 minute, and 30 seconds test(std::chrono::milliseconds( 7290000), std::chrono::hours( 2)); @@ -46,4 +46,6 @@ int main() constexpr std::chrono::hours h2 = std::chrono::round(std::chrono::milliseconds(-9000000)); static_assert(h2.count() == -2, ""); } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.duration/time.duration.cast/toduration.fail.cpp b/libcxx/test/std/utilities/time/time.duration/time.duration.cast/toduration.fail.cpp index a46aa526bda8e..0f52c36d86cae 100644 --- a/libcxx/test/std/utilities/time/time.duration/time.duration.cast/toduration.fail.cpp +++ b/libcxx/test/std/utilities/time/time.duration/time.duration.cast/toduration.fail.cpp @@ -18,7 +18,9 @@ #include -int main() +int main(int, char**) { std::chrono::duration_cast(std::chrono::milliseconds(3)); + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.duration/time.duration.comparisons/op_equal.pass.cpp b/libcxx/test/std/utilities/time/time.duration/time.duration.comparisons/op_equal.pass.cpp index 912d22fdf0eee..c27b528017ec9 100644 --- a/libcxx/test/std/utilities/time/time.duration/time.duration.comparisons/op_equal.pass.cpp +++ b/libcxx/test/std/utilities/time/time.duration/time.duration.comparisons/op_equal.pass.cpp @@ -25,7 +25,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { { std::chrono::seconds s1(3); @@ -113,4 +113,6 @@ int main() static_assert(!(s1 != s2), ""); } #endif + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.duration/time.duration.comparisons/op_less.pass.cpp b/libcxx/test/std/utilities/time/time.duration/time.duration.comparisons/op_less.pass.cpp index 9eea6ceb3bde8..de476357650c9 100644 --- a/libcxx/test/std/utilities/time/time.duration/time.duration.comparisons/op_less.pass.cpp +++ b/libcxx/test/std/utilities/time/time.duration/time.duration.comparisons/op_less.pass.cpp @@ -35,7 +35,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { { std::chrono::seconds s1(3); @@ -151,4 +151,6 @@ int main() static_assert( (s1 >= s2), ""); } #endif + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.duration/time.duration.cons/convert_exact.pass.cpp b/libcxx/test/std/utilities/time/time.duration/time.duration.cons/convert_exact.pass.cpp index 0f6fb8d3590c8..4c0af92b23d03 100644 --- a/libcxx/test/std/utilities/time/time.duration/time.duration.cons/convert_exact.pass.cpp +++ b/libcxx/test/std/utilities/time/time.duration/time.duration.cons/convert_exact.pass.cpp @@ -20,7 +20,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { { std::chrono::milliseconds ms(1); @@ -34,4 +34,6 @@ int main() static_assert(us.count() == 1000, ""); } #endif + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.duration/time.duration.cons/convert_float_to_int.fail.cpp b/libcxx/test/std/utilities/time/time.duration/time.duration.cons/convert_float_to_int.fail.cpp index b35c01c40ec4d..4311c1bde3831 100644 --- a/libcxx/test/std/utilities/time/time.duration/time.duration.cons/convert_float_to_int.fail.cpp +++ b/libcxx/test/std/utilities/time/time.duration/time.duration.cons/convert_float_to_int.fail.cpp @@ -17,8 +17,10 @@ #include -int main() +int main(int, char**) { std::chrono::duration d; std::chrono::duration i = d; + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.duration/time.duration.cons/convert_inexact.fail.cpp b/libcxx/test/std/utilities/time/time.duration/time.duration.cons/convert_inexact.fail.cpp index b66b2f3c601d6..fb0b488f7d8df 100644 --- a/libcxx/test/std/utilities/time/time.duration/time.duration.cons/convert_inexact.fail.cpp +++ b/libcxx/test/std/utilities/time/time.duration/time.duration.cons/convert_inexact.fail.cpp @@ -17,8 +17,10 @@ #include -int main() +int main(int, char**) { std::chrono::microseconds us(1); std::chrono::milliseconds ms = us; + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.duration/time.duration.cons/convert_inexact.pass.cpp b/libcxx/test/std/utilities/time/time.duration/time.duration.cons/convert_inexact.pass.cpp index 5624327badc92..f72c69c7ef1ab 100644 --- a/libcxx/test/std/utilities/time/time.duration/time.duration.cons/convert_inexact.pass.cpp +++ b/libcxx/test/std/utilities/time/time.duration/time.duration.cons/convert_inexact.pass.cpp @@ -20,7 +20,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { { std::chrono::duration us(1); @@ -34,4 +34,6 @@ int main() static_assert(ms.count() == 1./1000, ""); } #endif + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.duration/time.duration.cons/convert_int_to_float.pass.cpp b/libcxx/test/std/utilities/time/time.duration/time.duration.cons/convert_int_to_float.pass.cpp index a63471bc37dc7..fb127226a6c45 100644 --- a/libcxx/test/std/utilities/time/time.duration/time.duration.cons/convert_int_to_float.pass.cpp +++ b/libcxx/test/std/utilities/time/time.duration/time.duration.cons/convert_int_to_float.pass.cpp @@ -20,7 +20,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { { std::chrono::duration i(3); @@ -34,4 +34,6 @@ int main() static_assert(d.count() == 3000, ""); } #endif + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.duration/time.duration.cons/convert_overflow.pass.cpp b/libcxx/test/std/utilities/time/time.duration/time.duration.cons/convert_overflow.pass.cpp index 68484d1fb51f7..5b963f2b1f4cb 100644 --- a/libcxx/test/std/utilities/time/time.duration/time.duration.cons/convert_overflow.pass.cpp +++ b/libcxx/test/std/utilities/time/time.duration/time.duration.cons/convert_overflow.pass.cpp @@ -26,11 +26,13 @@ void f(std::chrono::seconds) called = true; } -int main() +int main(int, char**) { { std::chrono::duration r(1); f(r); assert(called); } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.duration/time.duration.cons/default.pass.cpp b/libcxx/test/std/utilities/time/time.duration/time.duration.cons/default.pass.cpp index 9edcd46f902fc..c598afa365109 100644 --- a/libcxx/test/std/utilities/time/time.duration/time.duration.cons/default.pass.cpp +++ b/libcxx/test/std/utilities/time/time.duration/time.duration.cons/default.pass.cpp @@ -32,7 +32,9 @@ test() #endif } -int main() +int main(int, char**) { test >(); + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.duration/time.duration.cons/rep.pass.cpp b/libcxx/test/std/utilities/time/time.duration/time.duration.cons/rep.pass.cpp index f89263bf9b091..d1a808ba15412 100644 --- a/libcxx/test/std/utilities/time/time.duration/time.duration.cons/rep.pass.cpp +++ b/libcxx/test/std/utilities/time/time.duration/time.duration.cons/rep.pass.cpp @@ -31,10 +31,12 @@ test(R r) #endif } -int main() +int main(int, char**) { test >(5); test > >(5); test > >(Rep(3)); test > >(5.5); + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.duration/time.duration.cons/rep01.fail.cpp b/libcxx/test/std/utilities/time/time.duration/time.duration.cons/rep01.fail.cpp index fc6f5700a6a98..f1e60f5e54d3f 100644 --- a/libcxx/test/std/utilities/time/time.duration/time.duration.cons/rep01.fail.cpp +++ b/libcxx/test/std/utilities/time/time.duration/time.duration.cons/rep01.fail.cpp @@ -19,7 +19,9 @@ #include "../../rep.h" -int main() +int main(int, char**) { std::chrono::duration d = 1; + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.duration/time.duration.cons/rep02.fail.cpp b/libcxx/test/std/utilities/time/time.duration/time.duration.cons/rep02.fail.cpp index bdbe7211b817c..4a09325065cae 100644 --- a/libcxx/test/std/utilities/time/time.duration/time.duration.cons/rep02.fail.cpp +++ b/libcxx/test/std/utilities/time/time.duration/time.duration.cons/rep02.fail.cpp @@ -19,7 +19,9 @@ #include "../../rep.h" -int main() +int main(int, char**) { std::chrono::duration d(1); + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.duration/time.duration.cons/rep02.pass.cpp b/libcxx/test/std/utilities/time/time.duration/time.duration.cons/rep02.pass.cpp index 3ecb76135e1fa..1719b1302bafb 100644 --- a/libcxx/test/std/utilities/time/time.duration/time.duration.cons/rep02.pass.cpp +++ b/libcxx/test/std/utilities/time/time.duration/time.duration.cons/rep02.pass.cpp @@ -20,7 +20,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { std::chrono::duration d(5); assert(d.count() == 5); @@ -28,4 +28,6 @@ int main() constexpr std::chrono::duration d2(5); static_assert(d2.count() == 5, ""); #endif + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.duration/time.duration.cons/rep03.fail.cpp b/libcxx/test/std/utilities/time/time.duration/time.duration.cons/rep03.fail.cpp index 831370994ee60..6b4d0020379c0 100644 --- a/libcxx/test/std/utilities/time/time.duration/time.duration.cons/rep03.fail.cpp +++ b/libcxx/test/std/utilities/time/time.duration/time.duration.cons/rep03.fail.cpp @@ -17,7 +17,9 @@ #include -int main() +int main(int, char**) { std::chrono::duration d(1.); + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.duration/time.duration.literals/literals.pass.cpp b/libcxx/test/std/utilities/time/time.duration/time.duration.literals/literals.pass.cpp index 13ad165b7bfc8..0d924f8f70beb 100644 --- a/libcxx/test/std/utilities/time/time.duration/time.duration.literals/literals.pass.cpp +++ b/libcxx/test/std/utilities/time/time.duration/time.duration.literals/literals.pass.cpp @@ -15,7 +15,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { using namespace std::literals::chrono_literals; @@ -57,4 +57,6 @@ int main() auto ns2 = 645.ns; assert ( ns == ns2 ); + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.duration/time.duration.literals/literals1.fail.cpp b/libcxx/test/std/utilities/time/time.duration/time.duration.literals/literals1.fail.cpp index 025100c592847..97e29e8768286 100644 --- a/libcxx/test/std/utilities/time/time.duration/time.duration.literals/literals1.fail.cpp +++ b/libcxx/test/std/utilities/time/time.duration/time.duration.literals/literals1.fail.cpp @@ -11,8 +11,10 @@ #include #include -int main() +int main(int, char**) { std::chrono::hours h = 4h; // should fail w/conversion operator not found + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.duration/time.duration.literals/literals1.pass.cpp b/libcxx/test/std/utilities/time/time.duration/time.duration.literals/literals1.pass.cpp index 9ca29086777e6..2e5b7bbb87b6c 100644 --- a/libcxx/test/std/utilities/time/time.duration/time.duration.literals/literals1.pass.cpp +++ b/libcxx/test/std/utilities/time/time.duration/time.duration.literals/literals1.pass.cpp @@ -11,7 +11,7 @@ #include #include -int main() +int main(int, char**) { using namespace std::chrono; @@ -67,4 +67,6 @@ int main() assert(November == month(11)); assert(December == month(12)); #endif + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.duration/time.duration.literals/literals2.fail.cpp b/libcxx/test/std/utilities/time/time.duration/time.duration.literals/literals2.fail.cpp index 5c38db52713d5..dbc91559031e0 100644 --- a/libcxx/test/std/utilities/time/time.duration/time.duration.literals/literals2.fail.cpp +++ b/libcxx/test/std/utilities/time/time.duration/time.duration.literals/literals2.fail.cpp @@ -11,9 +11,11 @@ #include #include -int main() +int main(int, char**) { using std::chrono::hours; hours foo = 4h; // should fail w/conversion operator not found + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.duration/time.duration.literals/literals2.pass.cpp b/libcxx/test/std/utilities/time/time.duration/time.duration.literals/literals2.pass.cpp index 4070910325491..d0b8b33e4934c 100644 --- a/libcxx/test/std/utilities/time/time.duration/time.duration.literals/literals2.pass.cpp +++ b/libcxx/test/std/utilities/time/time.duration/time.duration.literals/literals2.pass.cpp @@ -13,7 +13,7 @@ #include #include -int main() +int main(int, char**) { using namespace std::literals; @@ -46,4 +46,6 @@ int main() assert ( ns == std::chrono::nanoseconds(645)); auto ns2 = 645.ns; assert ( ns == ns2 ); + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.duration/time.duration.nonmember/op_+.pass.cpp b/libcxx/test/std/utilities/time/time.duration/time.duration.nonmember/op_+.pass.cpp index 30aa62cd9d1d6..ad381f0056584 100644 --- a/libcxx/test/std/utilities/time/time.duration/time.duration.nonmember/op_+.pass.cpp +++ b/libcxx/test/std/utilities/time/time.duration/time.duration.nonmember/op_+.pass.cpp @@ -19,7 +19,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { { std::chrono::seconds s1(3); @@ -71,4 +71,6 @@ int main() static_assert(r.count() == 75, ""); } #endif + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.duration/time.duration.nonmember/op_-.pass.cpp b/libcxx/test/std/utilities/time/time.duration/time.duration.nonmember/op_-.pass.cpp index cb0a53fdf54a9..86ced3fbcbd2a 100644 --- a/libcxx/test/std/utilities/time/time.duration/time.duration.nonmember/op_-.pass.cpp +++ b/libcxx/test/std/utilities/time/time.duration/time.duration.nonmember/op_-.pass.cpp @@ -20,7 +20,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { { std::chrono::seconds s1(3); @@ -72,4 +72,6 @@ int main() static_assert(r.count() == -15, ""); } #endif + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.duration/time.duration.nonmember/op_divide_duration.pass.cpp b/libcxx/test/std/utilities/time/time.duration/time.duration.nonmember/op_divide_duration.pass.cpp index 40f521bae01de..e4190fe338543 100644 --- a/libcxx/test/std/utilities/time/time.duration/time.duration.nonmember/op_divide_duration.pass.cpp +++ b/libcxx/test/std/utilities/time/time.duration/time.duration.nonmember/op_divide_duration.pass.cpp @@ -21,7 +21,7 @@ #include "test_macros.h" #include "truncate_fp.h" -int main() +int main(int, char**) { { std::chrono::nanoseconds ns1(15); @@ -65,4 +65,6 @@ int main() static_assert(s1 / s2 == 20./3, ""); } #endif + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.duration/time.duration.nonmember/op_divide_rep.fail.cpp b/libcxx/test/std/utilities/time/time.duration/time.duration.nonmember/op_divide_rep.fail.cpp index 41c55fccaebe1..327ff563567f3 100644 --- a/libcxx/test/std/utilities/time/time.duration/time.duration.nonmember/op_divide_rep.fail.cpp +++ b/libcxx/test/std/utilities/time/time.duration/time.duration.nonmember/op_divide_rep.fail.cpp @@ -18,8 +18,10 @@ #include "../../rep.h" -int main() +int main(int, char**) { std::chrono::duration d(Rep(15)); d = d / 5; + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.duration/time.duration.nonmember/op_divide_rep.pass.cpp b/libcxx/test/std/utilities/time/time.duration/time.duration.nonmember/op_divide_rep.pass.cpp index 8718ad75730da..94da11302bf72 100644 --- a/libcxx/test/std/utilities/time/time.duration/time.duration.nonmember/op_divide_rep.pass.cpp +++ b/libcxx/test/std/utilities/time/time.duration/time.duration.nonmember/op_divide_rep.pass.cpp @@ -20,7 +20,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { { std::chrono::nanoseconds ns(15); @@ -34,4 +34,6 @@ int main() static_assert(ns2.count() == 3, ""); } #endif + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.duration/time.duration.nonmember/op_mod_duration.pass.cpp b/libcxx/test/std/utilities/time/time.duration/time.duration.nonmember/op_mod_duration.pass.cpp index 7a2063ca54e95..e7007c1fe35aa 100644 --- a/libcxx/test/std/utilities/time/time.duration/time.duration.nonmember/op_mod_duration.pass.cpp +++ b/libcxx/test/std/utilities/time/time.duration/time.duration.nonmember/op_mod_duration.pass.cpp @@ -20,7 +20,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { { std::chrono::nanoseconds ns1(15); @@ -60,4 +60,6 @@ int main() static_assert(r.count() == 24, ""); } #endif + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.duration/time.duration.nonmember/op_mod_rep.fail.cpp b/libcxx/test/std/utilities/time/time.duration/time.duration.nonmember/op_mod_rep.fail.cpp index 3ee0578f805d6..f2a5885aba628 100644 --- a/libcxx/test/std/utilities/time/time.duration/time.duration.nonmember/op_mod_rep.fail.cpp +++ b/libcxx/test/std/utilities/time/time.duration/time.duration.nonmember/op_mod_rep.fail.cpp @@ -18,8 +18,10 @@ #include "../../rep.h" -int main() +int main(int, char**) { std::chrono::duration d(Rep(15)); d = d % 5; + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.duration/time.duration.nonmember/op_mod_rep.pass.cpp b/libcxx/test/std/utilities/time/time.duration/time.duration.nonmember/op_mod_rep.pass.cpp index 6d7e285d9b8ac..754b9800a7d90 100644 --- a/libcxx/test/std/utilities/time/time.duration/time.duration.nonmember/op_mod_rep.pass.cpp +++ b/libcxx/test/std/utilities/time/time.duration/time.duration.nonmember/op_mod_rep.pass.cpp @@ -20,7 +20,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { { std::chrono::nanoseconds ns(15); @@ -34,4 +34,6 @@ int main() static_assert(ns2.count() == 3, ""); } #endif + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.duration/time.duration.nonmember/op_times_rep.pass.cpp b/libcxx/test/std/utilities/time/time.duration/time.duration.nonmember/op_times_rep.pass.cpp index 19e33366f71cf..c3e499638082f 100644 --- a/libcxx/test/std/utilities/time/time.duration/time.duration.nonmember/op_times_rep.pass.cpp +++ b/libcxx/test/std/utilities/time/time.duration/time.duration.nonmember/op_times_rep.pass.cpp @@ -25,7 +25,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { { std::chrono::nanoseconds ns(3); @@ -43,4 +43,6 @@ int main() static_assert(ns3.count() == 18, ""); } #endif + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.duration/time.duration.nonmember/op_times_rep1.fail.cpp b/libcxx/test/std/utilities/time/time.duration/time.duration.nonmember/op_times_rep1.fail.cpp index 6ad3c7928a909..44a77cea18a6f 100644 --- a/libcxx/test/std/utilities/time/time.duration/time.duration.nonmember/op_times_rep1.fail.cpp +++ b/libcxx/test/std/utilities/time/time.duration/time.duration.nonmember/op_times_rep1.fail.cpp @@ -22,8 +22,10 @@ #include "../../rep.h" -int main() +int main(int, char**) { std::chrono::duration d; d = d * 5; + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.duration/time.duration.nonmember/op_times_rep2.fail.cpp b/libcxx/test/std/utilities/time/time.duration/time.duration.nonmember/op_times_rep2.fail.cpp index 5cc717c5c0497..9ce82582cf3b9 100644 --- a/libcxx/test/std/utilities/time/time.duration/time.duration.nonmember/op_times_rep2.fail.cpp +++ b/libcxx/test/std/utilities/time/time.duration/time.duration.nonmember/op_times_rep2.fail.cpp @@ -22,8 +22,10 @@ #include "../../rep.h" -int main() +int main(int, char**) { std::chrono::duration d; d = 5 * d; + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.duration/time.duration.observer/tested_elsewhere.pass.cpp b/libcxx/test/std/utilities/time/time.duration/time.duration.observer/tested_elsewhere.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/utilities/time/time.duration/time.duration.observer/tested_elsewhere.pass.cpp +++ b/libcxx/test/std/utilities/time/time.duration/time.duration.observer/tested_elsewhere.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.duration/time.duration.special/max.pass.cpp b/libcxx/test/std/utilities/time/time.duration/time.duration.special/max.pass.cpp index c6f3f1e654785..58de66a01583d 100644 --- a/libcxx/test/std/utilities/time/time.duration/time.duration.special/max.pass.cpp +++ b/libcxx/test/std/utilities/time/time.duration/time.duration.special/max.pass.cpp @@ -40,8 +40,10 @@ void test() #endif } -int main() +int main(int, char**) { test >(); test >(); + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.duration/time.duration.special/min.pass.cpp b/libcxx/test/std/utilities/time/time.duration/time.duration.special/min.pass.cpp index b16e608dcc756..9b0113b2980de 100644 --- a/libcxx/test/std/utilities/time/time.duration/time.duration.special/min.pass.cpp +++ b/libcxx/test/std/utilities/time/time.duration/time.duration.special/min.pass.cpp @@ -40,8 +40,10 @@ void test() #endif } -int main() +int main(int, char**) { test >(); test >(); + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.duration/time.duration.special/zero.pass.cpp b/libcxx/test/std/utilities/time/time.duration/time.duration.special/zero.pass.cpp index f3065c3054262..34a05b5f0715f 100644 --- a/libcxx/test/std/utilities/time/time.duration/time.duration.special/zero.pass.cpp +++ b/libcxx/test/std/utilities/time/time.duration/time.duration.special/zero.pass.cpp @@ -39,8 +39,10 @@ void test() #endif } -int main() +int main(int, char**) { test >(); test >(); + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.duration/types.pass.cpp b/libcxx/test/std/utilities/time/time.duration/types.pass.cpp index 9e5abbc20a707..250e532859e9d 100644 --- a/libcxx/test/std/utilities/time/time.duration/types.pass.cpp +++ b/libcxx/test/std/utilities/time/time.duration/types.pass.cpp @@ -18,9 +18,11 @@ #include #include -int main() +int main(int, char**) { typedef std::chrono::duration > D; static_assert((std::is_same::value), ""); static_assert((std::is_same >::value), ""); + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.point/default_duration.pass.cpp b/libcxx/test/std/utilities/time/time.point/default_duration.pass.cpp index e645e2970c634..8a58413a0aafd 100644 --- a/libcxx/test/std/utilities/time/time.point/default_duration.pass.cpp +++ b/libcxx/test/std/utilities/time/time.point/default_duration.pass.cpp @@ -18,8 +18,10 @@ #include #include -int main() +int main(int, char**) { static_assert((std::is_same::duration>::value), ""); + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.point/duration.fail.cpp b/libcxx/test/std/utilities/time/time.point/duration.fail.cpp index a4881acc93112..6461eb3d96f5f 100644 --- a/libcxx/test/std/utilities/time/time.point/duration.fail.cpp +++ b/libcxx/test/std/utilities/time/time.point/duration.fail.cpp @@ -14,8 +14,10 @@ #include -int main() +int main(int, char**) { typedef std::chrono::time_point T; T t; + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.point/time.point.arithmetic/op_+=.pass.cpp b/libcxx/test/std/utilities/time/time.point/time.point.arithmetic/op_+=.pass.cpp index 999071b72c69b..002fffc3882a1 100644 --- a/libcxx/test/std/utilities/time/time.point/time.point.arithmetic/op_+=.pass.cpp +++ b/libcxx/test/std/utilities/time/time.point/time.point.arithmetic/op_+=.pass.cpp @@ -29,7 +29,7 @@ constexpr bool constexpr_test() } #endif -int main() +int main(int, char**) { { typedef std::chrono::system_clock Clock; @@ -42,4 +42,6 @@ int main() #if TEST_STD_VER > 14 static_assert(constexpr_test(), ""); #endif + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.point/time.point.arithmetic/op_-=.pass.cpp b/libcxx/test/std/utilities/time/time.point/time.point.arithmetic/op_-=.pass.cpp index 3d62cdedaac48..2365d539ca775 100644 --- a/libcxx/test/std/utilities/time/time.point/time.point.arithmetic/op_-=.pass.cpp +++ b/libcxx/test/std/utilities/time/time.point/time.point.arithmetic/op_-=.pass.cpp @@ -29,7 +29,7 @@ constexpr bool constexpr_test() } #endif -int main() +int main(int, char**) { { typedef std::chrono::system_clock Clock; @@ -42,4 +42,6 @@ int main() #if TEST_STD_VER > 14 static_assert(constexpr_test(), ""); #endif + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.point/time.point.cast/ceil.fail.cpp b/libcxx/test/std/utilities/time/time.point/time.point.cast/ceil.fail.cpp index 4a90ec870cf55..fb82fdffe4d2a 100644 --- a/libcxx/test/std/utilities/time/time.point/time.point.cast/ceil.fail.cpp +++ b/libcxx/test/std/utilities/time/time.point/time.point.cast/ceil.fail.cpp @@ -19,7 +19,9 @@ #include -int main() +int main(int, char**) { std::chrono::ceil(std::chrono::system_clock::now()); + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.point/time.point.cast/ceil.pass.cpp b/libcxx/test/std/utilities/time/time.point/time.point.cast/ceil.pass.cpp index efd2a3e592b45..8dfd1bdaa38f8 100644 --- a/libcxx/test/std/utilities/time/time.point/time.point.cast/ceil.pass.cpp +++ b/libcxx/test/std/utilities/time/time.point/time.point.cast/ceil.pass.cpp @@ -49,7 +49,7 @@ void test_constexpr () } -int main() +int main(int, char**) { // 7290000ms is 2 hours, 1 minute, and 30 seconds test(std::chrono::milliseconds( 7290000), std::chrono::hours( 3)); @@ -65,4 +65,6 @@ int main() test_constexpr (); test_constexpr (); + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.point/time.point.cast/floor.fail.cpp b/libcxx/test/std/utilities/time/time.point/time.point.cast/floor.fail.cpp index c5dfba6c4f175..12b1dec9fd509 100644 --- a/libcxx/test/std/utilities/time/time.point/time.point.cast/floor.fail.cpp +++ b/libcxx/test/std/utilities/time/time.point/time.point.cast/floor.fail.cpp @@ -19,7 +19,9 @@ #include -int main() +int main(int, char**) { std::chrono::floor(std::chrono::system_clock::now()); + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.point/time.point.cast/floor.pass.cpp b/libcxx/test/std/utilities/time/time.point/time.point.cast/floor.pass.cpp index db2391d2518fb..d50fff4a1c88b 100644 --- a/libcxx/test/std/utilities/time/time.point/time.point.cast/floor.pass.cpp +++ b/libcxx/test/std/utilities/time/time.point/time.point.cast/floor.pass.cpp @@ -48,7 +48,7 @@ void test_constexpr () } } -int main() +int main(int, char**) { // 7290000ms is 2 hours, 1 minute, and 30 seconds test(std::chrono::milliseconds( 7290000), std::chrono::hours( 2)); @@ -64,4 +64,6 @@ int main() test_constexpr (); test_constexpr (); + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.point/time.point.cast/round.fail.cpp b/libcxx/test/std/utilities/time/time.point/time.point.cast/round.fail.cpp index 6c6f9c5bf5c51..a5436c684040d 100644 --- a/libcxx/test/std/utilities/time/time.point/time.point.cast/round.fail.cpp +++ b/libcxx/test/std/utilities/time/time.point/time.point.cast/round.fail.cpp @@ -19,7 +19,9 @@ #include -int main() +int main(int, char**) { std::chrono::round(std::chrono::system_clock::now()); + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.point/time.point.cast/round.pass.cpp b/libcxx/test/std/utilities/time/time.point/time.point.cast/round.pass.cpp index e68e233969d14..d8bb1b505b148 100644 --- a/libcxx/test/std/utilities/time/time.point/time.point.cast/round.pass.cpp +++ b/libcxx/test/std/utilities/time/time.point/time.point.cast/round.pass.cpp @@ -48,7 +48,7 @@ void test_constexpr () } } -int main() +int main(int, char**) { // 7290000ms is 2 hours, 1 minute, and 30 seconds test(std::chrono::milliseconds( 7290000), std::chrono::hours( 2)); @@ -64,4 +64,6 @@ int main() test_constexpr (); test_constexpr (); + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.point/time.point.cast/time_point_cast.pass.cpp b/libcxx/test/std/utilities/time/time.point/time.point.cast/time_point_cast.pass.cpp index 5779ef9208ad3..90e6ccef666bb 100644 --- a/libcxx/test/std/utilities/time/time.point/time.point.cast/time_point_cast.pass.cpp +++ b/libcxx/test/std/utilities/time/time.point/time.point.cast/time_point_cast.pass.cpp @@ -54,7 +54,7 @@ void test_constexpr () #endif -int main() +int main(int, char**) { test(std::chrono::milliseconds(7265000), std::chrono::hours(2)); test(std::chrono::milliseconds(7265000), std::chrono::minutes(121)); @@ -78,4 +78,6 @@ int main() test_constexpr>, 9, T1, 10> (); } #endif + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.point/time.point.cast/toduration.fail.cpp b/libcxx/test/std/utilities/time/time.point/time.point.cast/toduration.fail.cpp index 9e1f903b93f57..c16492f730a17 100644 --- a/libcxx/test/std/utilities/time/time.point/time.point.cast/toduration.fail.cpp +++ b/libcxx/test/std/utilities/time/time.point/time.point.cast/toduration.fail.cpp @@ -18,10 +18,12 @@ #include -int main() +int main(int, char**) { typedef std::chrono::system_clock Clock; typedef std::chrono::time_point FromTimePoint; typedef std::chrono::time_point ToTimePoint; std::chrono::time_point_cast(FromTimePoint(std::chrono::milliseconds(3))); + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.point/time.point.comparisons/op_equal.fail.cpp b/libcxx/test/std/utilities/time/time.point/time.point.comparisons/op_equal.fail.cpp index e2b3508e00008..2b5795026b34a 100644 --- a/libcxx/test/std/utilities/time/time.point/time.point.comparisons/op_equal.fail.cpp +++ b/libcxx/test/std/utilities/time/time.point/time.point.comparisons/op_equal.fail.cpp @@ -24,7 +24,7 @@ #include "../../clock.h" -int main() +int main(int, char**) { typedef std::chrono::system_clock Clock1; typedef Clock Clock2; @@ -36,4 +36,6 @@ int main() T1 t1(Duration1(3)); T2 t2(Duration2(3000)); t1 == t2; + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.point/time.point.comparisons/op_equal.pass.cpp b/libcxx/test/std/utilities/time/time.point/time.point.comparisons/op_equal.pass.cpp index cc2ef33376309..f110ec5d4064c 100644 --- a/libcxx/test/std/utilities/time/time.point/time.point.comparisons/op_equal.pass.cpp +++ b/libcxx/test/std/utilities/time/time.point/time.point.comparisons/op_equal.pass.cpp @@ -23,7 +23,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { typedef std::chrono::system_clock Clock; typedef std::chrono::milliseconds Duration1; @@ -82,4 +82,6 @@ int main() static_assert( (t1 != t2), ""); } #endif + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.point/time.point.comparisons/op_less.fail.cpp b/libcxx/test/std/utilities/time/time.point/time.point.comparisons/op_less.fail.cpp index 04f7639d605b5..3d158ea890fc7 100644 --- a/libcxx/test/std/utilities/time/time.point/time.point.comparisons/op_less.fail.cpp +++ b/libcxx/test/std/utilities/time/time.point/time.point.comparisons/op_less.fail.cpp @@ -32,7 +32,7 @@ #include "../../clock.h" -int main() +int main(int, char**) { typedef std::chrono::system_clock Clock1; typedef Clock Clock2; @@ -44,4 +44,6 @@ int main() T1 t1(Duration1(3)); T2 t2(Duration2(3000)); t1 < t2; + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.point/time.point.comparisons/op_less.pass.cpp b/libcxx/test/std/utilities/time/time.point/time.point.comparisons/op_less.pass.cpp index 57d24d08d0236..3b4aa6abecf9a 100644 --- a/libcxx/test/std/utilities/time/time.point/time.point.comparisons/op_less.pass.cpp +++ b/libcxx/test/std/utilities/time/time.point/time.point.comparisons/op_less.pass.cpp @@ -31,7 +31,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { typedef std::chrono::system_clock Clock; typedef std::chrono::milliseconds Duration1; @@ -106,4 +106,6 @@ int main() static_assert(!(t1 >= t2), ""); } #endif + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.point/time.point.cons/convert.fail.cpp b/libcxx/test/std/utilities/time/time.point/time.point.cons/convert.fail.cpp index a68d4b0f304c1..2e601179a7da8 100644 --- a/libcxx/test/std/utilities/time/time.point/time.point.cons/convert.fail.cpp +++ b/libcxx/test/std/utilities/time/time.point/time.point.cons/convert.fail.cpp @@ -17,7 +17,7 @@ #include -int main() +int main(int, char**) { typedef std::chrono::system_clock Clock; typedef std::chrono::milliseconds Duration1; @@ -26,4 +26,6 @@ int main() std::chrono::time_point t2(Duration2(3)); std::chrono::time_point t1 = t2; } + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.point/time.point.cons/convert.pass.cpp b/libcxx/test/std/utilities/time/time.point/time.point.cons/convert.pass.cpp index 91bcebb1a91c3..f9b35c9573858 100644 --- a/libcxx/test/std/utilities/time/time.point/time.point.cons/convert.pass.cpp +++ b/libcxx/test/std/utilities/time/time.point/time.point.cons/convert.pass.cpp @@ -18,7 +18,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { typedef std::chrono::system_clock Clock; typedef std::chrono::microseconds Duration1; @@ -35,4 +35,6 @@ int main() static_assert(t1.time_since_epoch() == Duration1(3000), ""); } #endif + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.point/time.point.cons/default.pass.cpp b/libcxx/test/std/utilities/time/time.point/time.point.cons/default.pass.cpp index 2deb8ae298cd9..b40113999a573 100644 --- a/libcxx/test/std/utilities/time/time.point/time.point.cons/default.pass.cpp +++ b/libcxx/test/std/utilities/time/time.point/time.point.cons/default.pass.cpp @@ -18,7 +18,7 @@ #include "test_macros.h" #include "../../rep.h" -int main() +int main(int, char**) { typedef std::chrono::system_clock Clock; typedef std::chrono::duration Duration; @@ -32,4 +32,6 @@ int main() static_assert(t.time_since_epoch() == Duration::zero(), ""); } #endif + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.point/time.point.cons/duration.fail.cpp b/libcxx/test/std/utilities/time/time.point/time.point.cons/duration.fail.cpp index 4a42eef305712..b28116236d051 100644 --- a/libcxx/test/std/utilities/time/time.point/time.point.cons/duration.fail.cpp +++ b/libcxx/test/std/utilities/time/time.point/time.point.cons/duration.fail.cpp @@ -16,9 +16,11 @@ #include -int main() +int main(int, char**) { typedef std::chrono::system_clock Clock; typedef std::chrono::milliseconds Duration; std::chrono::time_point t = Duration(3); + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.point/time.point.cons/duration.pass.cpp b/libcxx/test/std/utilities/time/time.point/time.point.cons/duration.pass.cpp index 0830eea91198e..078c6641e76df 100644 --- a/libcxx/test/std/utilities/time/time.point/time.point.cons/duration.pass.cpp +++ b/libcxx/test/std/utilities/time/time.point/time.point.cons/duration.pass.cpp @@ -17,7 +17,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { typedef std::chrono::system_clock Clock; typedef std::chrono::milliseconds Duration; @@ -39,4 +39,6 @@ int main() static_assert(t.time_since_epoch() == Duration(3000), ""); } #endif + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.point/time.point.nonmember/op_+.pass.cpp b/libcxx/test/std/utilities/time/time.point/time.point.nonmember/op_+.pass.cpp index df6c691572e49..7d78f7f43290a 100644 --- a/libcxx/test/std/utilities/time/time.point/time.point.nonmember/op_+.pass.cpp +++ b/libcxx/test/std/utilities/time/time.point/time.point.nonmember/op_+.pass.cpp @@ -23,7 +23,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { typedef std::chrono::system_clock Clock; typedef std::chrono::milliseconds Duration1; @@ -44,4 +44,6 @@ int main() static_assert(t3.time_since_epoch() == Duration2(3006), ""); } #endif + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.point/time.point.nonmember/op_-duration.pass.cpp b/libcxx/test/std/utilities/time/time.point/time.point.nonmember/op_-duration.pass.cpp index 876d42d560d02..6fe8769695b1a 100644 --- a/libcxx/test/std/utilities/time/time.point/time.point.nonmember/op_-duration.pass.cpp +++ b/libcxx/test/std/utilities/time/time.point/time.point.nonmember/op_-duration.pass.cpp @@ -30,7 +30,7 @@ void test2739() // LWG2739 assert(t1 < t0); } -int main() +int main(int, char**) { typedef std::chrono::system_clock Clock; typedef std::chrono::milliseconds Duration1; @@ -49,4 +49,6 @@ int main() #endif test2739(); test2739(); + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.point/time.point.nonmember/op_-time_point.pass.cpp b/libcxx/test/std/utilities/time/time.point/time.point.nonmember/op_-time_point.pass.cpp index 851869d4d0d5b..22e4520f36004 100644 --- a/libcxx/test/std/utilities/time/time.point/time.point.nonmember/op_-time_point.pass.cpp +++ b/libcxx/test/std/utilities/time/time.point/time.point.nonmember/op_-time_point.pass.cpp @@ -19,7 +19,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { typedef std::chrono::system_clock Clock; typedef std::chrono::milliseconds Duration1; @@ -36,4 +36,6 @@ int main() static_assert((t1 - t2) == Duration2(2995), ""); } #endif + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.point/time.point.observer/tested_elsewhere.pass.cpp b/libcxx/test/std/utilities/time/time.point/time.point.observer/tested_elsewhere.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/utilities/time/time.point/time.point.observer/tested_elsewhere.pass.cpp +++ b/libcxx/test/std/utilities/time/time.point/time.point.observer/tested_elsewhere.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.point/time.point.special/max.pass.cpp b/libcxx/test/std/utilities/time/time.point/time.point.special/max.pass.cpp index c8f2d41be9750..e7826b1a61011 100644 --- a/libcxx/test/std/utilities/time/time.point/time.point.special/max.pass.cpp +++ b/libcxx/test/std/utilities/time/time.point/time.point.special/max.pass.cpp @@ -17,7 +17,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { typedef std::chrono::system_clock Clock; typedef std::chrono::milliseconds Duration; @@ -27,4 +27,6 @@ int main() ASSERT_NOEXCEPT( TP::max()); #endif assert(TP::max() == TP(Duration::max())); + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.point/time.point.special/min.pass.cpp b/libcxx/test/std/utilities/time/time.point/time.point.special/min.pass.cpp index 1cac230624fa6..fae3339b03d84 100644 --- a/libcxx/test/std/utilities/time/time.point/time.point.special/min.pass.cpp +++ b/libcxx/test/std/utilities/time/time.point/time.point.special/min.pass.cpp @@ -17,7 +17,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { typedef std::chrono::system_clock Clock; typedef std::chrono::milliseconds Duration; @@ -27,4 +27,6 @@ int main() ASSERT_NOEXCEPT( TP::max()); #endif assert(TP::min() == TP(Duration::min())); + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.traits/nothing_to_do.pass.cpp b/libcxx/test/std/utilities/time/time.traits/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/utilities/time/time.traits/nothing_to_do.pass.cpp +++ b/libcxx/test/std/utilities/time/time.traits/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.traits/time.traits.duration_values/max.pass.cpp b/libcxx/test/std/utilities/time/time.traits/time.traits.duration_values/max.pass.cpp index f44a7964f02b1..8d244c77346b8 100644 --- a/libcxx/test/std/utilities/time/time.traits/time.traits.duration_values/max.pass.cpp +++ b/libcxx/test/std/utilities/time/time.traits/time.traits.duration_values/max.pass.cpp @@ -17,7 +17,7 @@ #include "test_macros.h" #include "../../rep.h" -int main() +int main(int, char**) { assert(std::chrono::duration_values::max() == std::numeric_limits::max()); @@ -42,4 +42,6 @@ int main() ASSERT_NOEXCEPT(std::chrono::duration_values::max()); ASSERT_NOEXCEPT(std::chrono::duration_values::max()); #endif + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.traits/time.traits.duration_values/min.pass.cpp b/libcxx/test/std/utilities/time/time.traits/time.traits.duration_values/min.pass.cpp index c64746d9fc7b6..4ff03c6228682 100644 --- a/libcxx/test/std/utilities/time/time.traits/time.traits.duration_values/min.pass.cpp +++ b/libcxx/test/std/utilities/time/time.traits/time.traits.duration_values/min.pass.cpp @@ -17,7 +17,7 @@ #include "test_macros.h" #include "../../rep.h" -int main() +int main(int, char**) { assert(std::chrono::duration_values::min() == std::numeric_limits::lowest()); @@ -42,4 +42,6 @@ int main() ASSERT_NOEXCEPT(std::chrono::duration_values::min()); ASSERT_NOEXCEPT(std::chrono::duration_values::min()); #endif + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.traits/time.traits.duration_values/zero.pass.cpp b/libcxx/test/std/utilities/time/time.traits/time.traits.duration_values/zero.pass.cpp index 6eec47ce3b0ea..d9de07b414e98 100644 --- a/libcxx/test/std/utilities/time/time.traits/time.traits.duration_values/zero.pass.cpp +++ b/libcxx/test/std/utilities/time/time.traits/time.traits.duration_values/zero.pass.cpp @@ -16,7 +16,7 @@ #include "test_macros.h" #include "../../rep.h" -int main() +int main(int, char**) { assert(std::chrono::duration_values::zero() == 0); assert(std::chrono::duration_values::zero() == 0); @@ -31,4 +31,6 @@ int main() ASSERT_NOEXCEPT(std::chrono::duration_values::zero()); ASSERT_NOEXCEPT(std::chrono::duration_values::zero()); #endif + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.traits/time.traits.is_fp/treat_as_floating_point.pass.cpp b/libcxx/test/std/utilities/time/time.traits/time.traits.is_fp/treat_as_floating_point.pass.cpp index cf588f5c0af57..9db3d96d26d60 100644 --- a/libcxx/test/std/utilities/time/time.traits/time.traits.is_fp/treat_as_floating_point.pass.cpp +++ b/libcxx/test/std/utilities/time/time.traits/time.traits.is_fp/treat_as_floating_point.pass.cpp @@ -29,7 +29,7 @@ test() struct A {}; -int main() +int main(int, char**) { test(); test(); @@ -39,4 +39,6 @@ int main() test(); test(); test(); + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.traits/time.traits.specializations/duration.pass.cpp b/libcxx/test/std/utilities/time/time.traits/time.traits.specializations/duration.pass.cpp index 39afe6a5f53a0..3dde540472705 100644 --- a/libcxx/test/std/utilities/time/time.traits/time.traits.specializations/duration.pass.cpp +++ b/libcxx/test/std/utilities/time/time.traits/time.traits.specializations/duration.pass.cpp @@ -24,7 +24,7 @@ test() static_assert((std::is_same::value), ""); } -int main() +int main(int, char**) { test >, std::chrono::duration >, @@ -38,4 +38,6 @@ int main() test >, std::chrono::duration >, std::chrono::duration > >(); + + return 0; } diff --git a/libcxx/test/std/utilities/time/time.traits/time.traits.specializations/time_point.pass.cpp b/libcxx/test/std/utilities/time/time.traits/time.traits.specializations/time_point.pass.cpp index bf880fcd2b70d..d73bb8ae6fdaf 100644 --- a/libcxx/test/std/utilities/time/time.traits/time.traits.specializations/time_point.pass.cpp +++ b/libcxx/test/std/utilities/time/time.traits/time.traits.specializations/time_point.pass.cpp @@ -28,7 +28,7 @@ test() static_assert((std::is_same::value), ""); } -int main() +int main(int, char**) { test >, std::chrono::duration >, @@ -42,4 +42,6 @@ int main() test >, std::chrono::duration >, std::chrono::duration > >(); + + return 0; } diff --git a/libcxx/test/std/utilities/time/weeks.pass.cpp b/libcxx/test/std/utilities/time/weeks.pass.cpp index 2231c69550c04..5a0cf3417f51f 100644 --- a/libcxx/test/std/utilities/time/weeks.pass.cpp +++ b/libcxx/test/std/utilities/time/weeks.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { typedef std::chrono::weeks D; typedef D::rep Rep; @@ -24,4 +24,6 @@ int main() static_assert(std::is_integral::value, ""); static_assert(std::numeric_limits::digits >= 22, ""); static_assert(std::is_same_v, std::chrono::days::period>>, ""); + + return 0; } diff --git a/libcxx/test/std/utilities/time/years.pass.cpp b/libcxx/test/std/utilities/time/years.pass.cpp index c2229caee6384..5016369268a48 100644 --- a/libcxx/test/std/utilities/time/years.pass.cpp +++ b/libcxx/test/std/utilities/time/years.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { typedef std::chrono::years D; typedef D::rep Rep; @@ -24,4 +24,6 @@ int main() static_assert(std::is_integral::value, ""); static_assert(std::numeric_limits::digits >= 17, ""); static_assert(std::is_same_v, std::chrono::days::period>>, ""); + + return 0; } diff --git a/libcxx/test/std/utilities/tuple/tuple.general/ignore.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.general/ignore.pass.cpp index d216c19fc5404..5d0409a7ca33e 100644 --- a/libcxx/test/std/utilities/tuple/tuple.general/ignore.pass.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.general/ignore.pass.cpp @@ -39,7 +39,7 @@ constexpr bool test_ignore_constexpr() return true; } -int main() { +int main(int, char**) { { constexpr auto& ignore_v = std::ignore; ((void)ignore_v); @@ -50,4 +50,6 @@ int main() { { LIBCPP_STATIC_ASSERT(std::is_trivial::value, ""); } + + return 0; } diff --git a/libcxx/test/std/utilities/tuple/tuple.general/tuple.smartptr.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.general/tuple.smartptr.pass.cpp index 326d7bb589e20..d57e7ad1825a0 100644 --- a/libcxx/test/std/utilities/tuple/tuple.general/tuple.smartptr.pass.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.general/tuple.smartptr.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main () { +int main(int, char**) { { std::tuple> up; std::tuple> sp; @@ -29,4 +29,6 @@ int main () { // Smart pointers of type 'T[N]' are not tested here since they are not // supported by the standard nor by libc++'s implementation. // See https://reviews.llvm.org/D21320 for more information. + + return 0; } diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/TupleFunction.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/TupleFunction.pass.cpp index b9e6e111ca1db..ede72c2a50fc0 100644 --- a/libcxx/test/std/utilities/tuple/tuple.tuple/TupleFunction.pass.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/TupleFunction.pass.cpp @@ -6,11 +6,9 @@ // //===----------------------------------------------------------------------===// -// This is for bugs 18853 and 19118 - -#include "test_macros.h" +// UNSUPPORTED: c++98, c++03 -#if TEST_STD_VER >= 11 +// This is for bugs 18853 and 19118 #include #include @@ -25,11 +23,10 @@ struct X void operator()() {} }; -int main() +int main(int, char**) { X x; std::function f(x); + + return 0; } -#else -int main () {} -#endif diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.apply/apply.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.apply/apply.pass.cpp index 2daef09fb08d1..52e94cc0b61b0 100644 --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.apply/apply.pass.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.apply/apply.pass.cpp @@ -265,9 +265,11 @@ void test_return_type() test<13, int const volatile *>(); } -int main() { +int main(int, char**) { test_constexpr_evaluation(); test_call_quals_and_arg_types(); test_return_type(); test_noexcept(); + + return 0; } diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.apply/apply_extended_types.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.apply/apply_extended_types.pass.cpp index 978c923ef0c87..851a535eb49c5 100644 --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.apply/apply_extended_types.pass.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.apply/apply_extended_types.pass.cpp @@ -360,7 +360,7 @@ void test_ext_int_2() } } -int main() +int main(int, char**) { { test_ext_int_0< @@ -422,4 +422,6 @@ int main() , std::tuple, std::tuple >(); } + + return 0; } diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.apply/apply_large_arity.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.apply/apply_large_arity.pass.cpp index 138f074b243cd..004a5d46435c4 100644 --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.apply/apply_large_arity.pass.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.apply/apply_large_arity.pass.cpp @@ -129,7 +129,7 @@ void test_one() } } -int main() +int main(int, char**) { // Instantiate with 1-5 arguments. test_all<1>(); @@ -140,4 +140,6 @@ int main() // Stress test with 256 test_one<256>(); + + return 0; } diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.apply/make_from_tuple.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.apply/make_from_tuple.pass.cpp index 6afd8882512fd..53574ee1d8063 100644 --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.apply/make_from_tuple.pass.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.apply/make_from_tuple.pass.cpp @@ -205,9 +205,11 @@ void test_noexcept() { } } -int main() +int main(int, char**) { test_constexpr_construction(); test_perfect_forwarding(); test_noexcept(); + + return 0; } diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.assign/const_pair.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.assign/const_pair.pass.cpp index bf4a8cc0dbb70..9353add370fb4 100644 --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.assign/const_pair.pass.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.assign/const_pair.pass.cpp @@ -19,7 +19,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::pair T0; @@ -30,4 +30,6 @@ int main() assert(std::get<0>(t1) == 2); assert(std::get<1>(t1) == short('a')); } + + return 0; } diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.assign/convert_copy.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.assign/convert_copy.pass.cpp index e21118a2f55d4..8b9447c990019 100644 --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.assign/convert_copy.pass.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.assign/convert_copy.pass.cpp @@ -32,7 +32,7 @@ struct D explicit D(int i = 0) : B(i) {} }; -int main() +int main(int, char**) { { typedef std::tuple T0; @@ -85,4 +85,6 @@ int main() assert(std::get<0>(t) == 43); assert(&std::get<0>(t) == &x); } + + return 0; } diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.assign/convert_move.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.assign/convert_move.pass.cpp index 95b1e2769de2b..71855a309c596 100644 --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.assign/convert_move.pass.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.assign/convert_move.pass.cpp @@ -43,7 +43,7 @@ struct E { } }; -int main() +int main(int, char**) { { typedef std::tuple T0; @@ -106,4 +106,6 @@ int main() assert(std::get<0>(t) == 43); assert(&std::get<0>(t) == &x); } + + return 0; } diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.assign/copy.fail.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.assign/copy.fail.cpp index 167d442b726fd..c3fa6495ff7af 100644 --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.assign/copy.fail.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.assign/copy.fail.cpp @@ -19,7 +19,7 @@ #include "MoveOnly.h" -int main() +int main(int, char**) { { typedef std::tuple T; @@ -27,4 +27,6 @@ int main() T t; t = t0; } + + return 0; } diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.assign/copy.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.assign/copy.pass.cpp index 5162c40533dcc..f6ff1041e5c0a 100644 --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.assign/copy.pass.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.assign/copy.pass.cpp @@ -35,7 +35,7 @@ struct MoveAssignable { MoveAssignable& operator=(MoveAssignable&&) = default; }; -int main() +int main(int, char**) { { typedef std::tuple<> T; @@ -100,4 +100,6 @@ int main() using T = std::tuple; static_assert(!std::is_copy_assignable::value, ""); } + + return 0; } diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.assign/move.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.assign/move.pass.cpp index 4545cf4df2bee..575c3b1dfad6e 100644 --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.assign/move.pass.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.assign/move.pass.cpp @@ -48,7 +48,7 @@ int CountAssign::copied = 0; int CountAssign::moved = 0; -int main() +int main(int, char**) { { typedef std::tuple<> T; @@ -122,4 +122,6 @@ int main() assert(CountAssign::copied == 1); assert(CountAssign::moved == 0); } + + return 0; } diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.assign/move_pair.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.assign/move_pair.pass.cpp index 2dec9fffae531..9681a238a9d87 100644 --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.assign/move_pair.pass.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.assign/move_pair.pass.cpp @@ -35,7 +35,7 @@ struct D explicit D(int i) : B(i) {} }; -int main() +int main(int, char**) { { typedef std::pair> T0; @@ -46,4 +46,6 @@ int main() assert(std::get<0>(t1) == 2); assert(std::get<1>(t1)->id_ == 3); } + + return 0; } diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.assign/tuple_array_template_depth.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.assign/tuple_array_template_depth.pass.cpp index 5e31090c9d59f..5796e8dbe0800 100644 --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.assign/tuple_array_template_depth.pass.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.assign/tuple_array_template_depth.pass.cpp @@ -25,9 +25,11 @@ typedef std::array array_t; typedef std::tuple tuple_t; -int main() +int main(int, char**) { array_t arr; tuple_t tup; tup = arr; + + return 0; } diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/PR20855_tuple_ref_binding_diagnostics.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/PR20855_tuple_ref_binding_diagnostics.pass.cpp index b6e444c659ff2..973aa93df3cc0 100644 --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/PR20855_tuple_ref_binding_diagnostics.pass.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/PR20855_tuple_ref_binding_diagnostics.pass.cpp @@ -131,7 +131,9 @@ void allocator_tests() { } -int main() { +int main(int, char**) { compile_tests(); allocator_tests(); + + return 0; } diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/PR22806_constrain_tuple_like_ctor.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/PR22806_constrain_tuple_like_ctor.pass.cpp index 79064fb09c462..1e1b0846cc28f 100644 --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/PR22806_constrain_tuple_like_ctor.pass.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/PR22806_constrain_tuple_like_ctor.pass.cpp @@ -78,7 +78,7 @@ struct ConvertibleFromInt { ConvertibleFromInt(int) : state(FromInt) {} }; -int main() +int main(int, char**) { // Test for the creation of dangling references when a tuple is used to // store a reference to another tuple as its only element. @@ -174,4 +174,6 @@ int main() std::tuple t2 = {t1}; assert(std::get<0>(t2).state == VT::FromInt); } + + return 0; } diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/PR23256_constrain_UTypes_ctor.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/PR23256_constrain_UTypes_ctor.pass.cpp index 8992f7b820546..919d88e46a3e1 100644 --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/PR23256_constrain_UTypes_ctor.pass.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/PR23256_constrain_UTypes_ctor.pass.cpp @@ -57,7 +57,7 @@ struct ExplicitUnconstrainedCtor { }; -int main() { +int main(int, char**) { typedef UnconstrainedCtor A; typedef ExplicitUnconstrainedCtor ExplicitA; { @@ -94,4 +94,6 @@ int main() { std::tuple t2(std::forward_as_tuple(ExplicitA{})); ((void)t2); } + + return 0; } diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/PR27684_contains_ref_to_incomplete_type.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/PR27684_contains_ref_to_incomplete_type.pass.cpp index 9f8658aa6420c..1493f4f81609a 100644 --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/PR27684_contains_ref_to_incomplete_type.pass.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/PR27684_contains_ref_to_incomplete_type.pass.cpp @@ -29,7 +29,7 @@ extern IncompleteType inc2; IncompleteType const& cinc1 = inc1; IncompleteType const& cinc2 = inc2; -int main() { +int main(int, char**) { using IT = IncompleteType; { // try calling tuple(Tp const&...) using Tup = std::tuple; @@ -43,6 +43,8 @@ int main() { assert(&std::get<0>(t) == &inc1); assert(&std::get<1>(t) == &inc2); } + + return 0; } struct IncompleteType {}; diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/PR31384.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/PR31384.pass.cpp index b0dd392f171bd..6c44f7027eedd 100644 --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/PR31384.pass.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/PR31384.pass.cpp @@ -44,7 +44,7 @@ struct ExplicitDerived : std::tuple { explicit operator std::tuple() && { ++count; return {}; } }; -int main() { +int main(int, char**) { { std::tuple foo = Derived{42}; ((void)foo); assert(count == 1); @@ -84,4 +84,6 @@ int main() { } count = 0; + + return 0; } diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/UTypes.fail.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/UTypes.fail.cpp index 3a0e0f888e94e..3b9d0beead997 100644 --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/UTypes.fail.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/UTypes.fail.cpp @@ -42,9 +42,11 @@ class MoveOnly bool operator< (const MoveOnly& x) const {return data_ < x.data_;} }; -int main() +int main(int, char**) { { std::tuple t = 1; } + + return 0; } diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/UTypes.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/UTypes.pass.cpp index f43e6d8bcedba..916255c967ac4 100644 --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/UTypes.pass.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/UTypes.pass.cpp @@ -102,7 +102,7 @@ void test_default_constructible_extension_sfinae() #endif } -int main() +int main(int, char**) { { std::tuple t(MoveOnly(0)); @@ -156,4 +156,6 @@ int main() // Check that SFINAE is properly applied with the default reduced arity // constructor extensions. test_default_constructible_extension_sfinae(); + + return 0; } diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc.pass.cpp index e4ed476900294..c5f52a92846c5 100644 --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc.pass.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc.pass.cpp @@ -39,7 +39,7 @@ struct NonDefaultConstructible { struct DerivedFromAllocArgT : std::allocator_arg_t {}; -int main() +int main(int, char**) { { std::tuple<> t(std::allocator_arg, A1()); @@ -105,4 +105,6 @@ int main() std::tuple t2(42, 42); (void)t2; } + + return 0; } diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_UTypes.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_UTypes.pass.cpp index 99155823b3afc..57e2f1b41887e 100644 --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_UTypes.pass.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_UTypes.pass.cpp @@ -77,7 +77,7 @@ struct Explicit { explicit Explicit(int x) : value(x) {} }; -int main() +int main(int, char**) { { std::tuple t{std::allocator_arg, std::allocator{}, 42}; @@ -148,4 +148,6 @@ int main() // ensure that the "reduced-arity-initialization" extension is not offered // for these constructors. test_uses_allocator_sfinae_evaluation(); + + return 0; } diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_const_Types.fail.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_const_Types.fail.cpp index 1759ba4f3c4b8..76f99e1978ddf 100644 --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_const_Types.fail.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_const_Types.fail.cpp @@ -35,8 +35,10 @@ std::tuple non_const_explicity_copy_test() { return {std::allocator_arg, std::allocator{}, e}; // expected-error@-1 {{chosen constructor is explicit in copy-initialization}} } -int main() +int main(int, char**) { const_explicit_copy_test(); non_const_explicity_copy_test(); + + return 0; } diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_const_Types.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_const_Types.pass.cpp index 10647a49d14b2..3b5b27f7b1509 100644 --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_const_Types.pass.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_const_Types.pass.cpp @@ -40,7 +40,7 @@ std::tuple testImplicitCopy2() { return {std::allocator_arg, std::allocator{}, i}; } -int main() +int main(int, char**) { { // check that the literal '0' can implicitly initialize a stored pointer. @@ -94,4 +94,6 @@ int main() assert(!alloc_last::allocator_constructed); assert(std::get<2>(t) == alloc_last(3)); } + + return 0; } diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_const_pair.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_const_pair.pass.cpp index baafee879f9e5..a7cffa72db6e8 100644 --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_const_pair.pass.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_const_pair.pass.cpp @@ -23,7 +23,7 @@ #include "../alloc_first.h" #include "../alloc_last.h" -int main() +int main(int, char**) { { typedef std::pair T0; @@ -55,4 +55,6 @@ int main() assert(std::get<0>(t1) == 2); assert(std::get<1>(t1) == 3); } + + return 0; } diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_convert_copy.fail.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_convert_copy.fail.cpp index 8d0482859a0cc..ca9518d6b2bc9 100644 --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_convert_copy.fail.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_convert_copy.fail.cpp @@ -36,7 +36,9 @@ std::tuple non_const_explicit_copy_test() { // expected-error@-1 {{chosen constructor is explicit in copy-initialization}} } -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_convert_copy.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_convert_copy.pass.cpp index bcece6098302b..083e15797f645 100644 --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_convert_copy.pass.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_convert_copy.pass.cpp @@ -33,7 +33,7 @@ struct Implicit { Implicit(int x) : value(x) {} }; -int main() +int main(int, char**) { { typedef std::tuple T0; @@ -86,4 +86,6 @@ int main() std::tuple t2 = {std::allocator_arg, std::allocator{}, t1}; assert(std::get<0>(t2).value == 42); } + + return 0; } diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_convert_move.fail.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_convert_move.fail.cpp index ed485c901073b..7a2a5ffff5de2 100644 --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_convert_move.fail.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_convert_move.fail.cpp @@ -29,7 +29,9 @@ std::tuple explicit_move_test() { // expected-error@-1 {{chosen constructor is explicit in copy-initialization}} } -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_convert_move.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_convert_move.pass.cpp index e86ec8aea9266..1f33ef2fc6e3a 100644 --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_convert_move.pass.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_convert_move.pass.cpp @@ -49,7 +49,7 @@ struct Implicit { Implicit(int x) : value(x) {} }; -int main() +int main(int, char**) { { typedef std::tuple T0; @@ -100,4 +100,6 @@ int main() std::tuple t2 = {std::allocator_arg, std::allocator{}, std::move(t1)}; assert(std::get<0>(t2).value == 42); } + + return 0; } diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_copy.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_copy.pass.cpp index 19829a967bb79..1db842b8d91f0 100644 --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_copy.pass.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_copy.pass.cpp @@ -22,7 +22,7 @@ #include "../alloc_first.h" #include "../alloc_last.h" -int main() +int main(int, char**) { { typedef std::tuple<> T; @@ -77,4 +77,6 @@ int main() assert(std::get<2>(t) == 3); } #endif + + return 0; } diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_move.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_move.pass.cpp index c77484de54b37..fc25a4fc6a4bb 100644 --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_move.pass.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_move.pass.cpp @@ -23,7 +23,7 @@ #include "../alloc_first.h" #include "../alloc_last.h" -int main() +int main(int, char**) { { typedef std::tuple<> T; @@ -76,4 +76,6 @@ int main() assert(std::get<2>(t) == 3); } #endif + + return 0; } diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_move_pair.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_move_pair.pass.cpp index 3da2d8a466daf..e45702d88b78a 100644 --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_move_pair.pass.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_move_pair.pass.cpp @@ -39,7 +39,7 @@ struct D explicit D(int i) : B(i) {} }; -int main() +int main(int, char**) { { typedef std::pair> T0; @@ -51,4 +51,6 @@ int main() assert(std::get<0>(t1) == 2); assert(std::get<1>(t1)->id_ == 3); } + + return 0; } diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/const_Types.fail.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/const_Types.fail.cpp index 2a405c1a4af55..bb7c557350558 100644 --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/const_Types.fail.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/const_Types.fail.cpp @@ -42,6 +42,8 @@ std::tuple const_explicit_copy_no_brace() { // expected-error@-1 {{no viable conversion}} } -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/const_Types.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/const_Types.pass.cpp index 955a83a6e880e..d4c29c93c379e 100644 --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/const_Types.pass.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/const_Types.pass.cpp @@ -76,7 +76,7 @@ std::tuple testImplicitCopy3() { return i; } -int main() +int main(int, char**) { { // check that the literal '0' can implicitly initialize a stored pointer. @@ -159,4 +159,6 @@ int main() assert(std::get<3>(t) == 0.0); } #endif + + return 0; } diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/const_Types2.fail.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/const_Types2.fail.cpp index 35e82277f8ddf..8804c27b8a23b 100644 --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/const_Types2.fail.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/const_Types2.fail.cpp @@ -18,9 +18,11 @@ #include #include -int main() +int main(int, char**) { { std::tuple t(2, nullptr, "text"); } + + return 0; } diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/const_pair.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/const_pair.pass.cpp index 0fd29b22fd738..bbe51e3925414 100644 --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/const_pair.pass.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/const_pair.pass.cpp @@ -20,7 +20,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { { typedef std::pair T0; @@ -42,4 +42,6 @@ int main() static_assert(std::get<1>(t1) == short('a'), ""); } #endif + + return 0; } diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/convert_copy.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/convert_copy.pass.cpp index 98d002b80424f..41f73328ab7b0 100644 --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/convert_copy.pass.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/convert_copy.pass.cpp @@ -64,7 +64,7 @@ struct C #endif -int main() +int main(int, char**) { { typedef std::tuple T0; @@ -136,4 +136,6 @@ int main() std::tuple t2 = t1; assert(std::get<0>(t2).value == 42); } + + return 0; } diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/convert_move.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/convert_move.pass.cpp index 79332841eb86b..071f13cf9136b 100644 --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/convert_move.pass.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/convert_move.pass.cpp @@ -44,7 +44,7 @@ struct D explicit D(int i) : B(i) {} }; -int main() +int main(int, char**) { { typedef std::tuple T0; @@ -100,4 +100,6 @@ int main() std::tuple t2 = std::move(t1); assert(std::get<0>(t2).value == 42); } + + return 0; } diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/copy.fail.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/copy.fail.cpp index f82dc6b1ff2be..7eeb65a8fdd51 100644 --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/copy.fail.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/copy.fail.cpp @@ -19,11 +19,13 @@ #include "MoveOnly.h" -int main() +int main(int, char**) { { typedef std::tuple T; T t0(MoveOnly(2)); T t = t0; } + + return 0; } diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/copy.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/copy.pass.cpp index 7c581cb771406..0127813040070 100644 --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/copy.pass.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/copy.pass.cpp @@ -22,7 +22,7 @@ struct Empty {}; -int main() +int main(int, char**) { { typedef std::tuple<> T; @@ -66,4 +66,6 @@ int main() ((void)e); // Prevent unused warning } #endif + + return 0; } diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/default.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/default.pass.cpp index 15bcde7e97328..ae296f73945c0 100644 --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/default.pass.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/default.pass.cpp @@ -44,7 +44,7 @@ struct IllFormedDefault { int value; }; -int main() +int main(int, char**) { { std::tuple<> t; @@ -106,4 +106,6 @@ int main() IllFormedDefault v(0); std::tuple t(v); } + + return 0; } diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/dtor.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/dtor.pass.cpp index 1d4779aae3698..80b09b8718082 100644 --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/dtor.pass.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/dtor.pass.cpp @@ -23,7 +23,7 @@ #include #include -int main() +int main(int, char**) { static_assert(std::is_trivially_destructible< std::tuple<> >::value, ""); @@ -35,4 +35,6 @@ int main() std::tuple >::value, ""); static_assert(!std::is_trivially_destructible< std::tuple >::value, ""); + + return 0; } diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/implicit_deduction_guides.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/implicit_deduction_guides.pass.cpp index ea393abafe440..3ff089a0b311d 100644 --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/implicit_deduction_guides.pass.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/implicit_deduction_guides.pass.cpp @@ -149,7 +149,9 @@ void test_empty_specialization() } } -int main() { +int main(int, char**) { test_primary_template(); test_empty_specialization(); + + return 0; } diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/move.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/move.pass.cpp index 98a12a972f876..977dc4c326419 100644 --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/move.pass.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/move.pass.cpp @@ -80,7 +80,7 @@ void test_sfinae() { } } -int main() +int main(int, char**) { { typedef std::tuple<> T; @@ -121,4 +121,6 @@ int main() test_sfinae(); test_sfinae(); } + + return 0; } diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/move_pair.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/move_pair.pass.cpp index 3953ee150a222..635be614b9a42 100644 --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/move_pair.pass.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/move_pair.pass.cpp @@ -34,7 +34,7 @@ struct D explicit D(int i) : B(i) {} }; -int main() +int main(int, char**) { { typedef std::pair> T0; @@ -44,4 +44,6 @@ int main() assert(std::get<0>(t1) == 2); assert(std::get<1>(t1)->id_ == 3); } + + return 0; } diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/test_lazy_sfinae.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/test_lazy_sfinae.pass.cpp index 2486851564371..bdbe4fc4b44d2 100644 --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/test_lazy_sfinae.pass.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/test_lazy_sfinae.pass.cpp @@ -95,7 +95,9 @@ void test_const_Types_lazy_sfinae() assert(std::get<0>(t).value == 42); } -int main() { +int main(int, char**) { test_tuple_like_lazy_sfinae(); test_const_Types_lazy_sfinae(); + + return 0; } diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/tuple_array_template_depth.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/tuple_array_template_depth.pass.cpp index b84dba37899ad..2f9447f2a7d44 100644 --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/tuple_array_template_depth.pass.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/tuple_array_template_depth.pass.cpp @@ -28,8 +28,10 @@ typedef std::array array_t; typedef std::tuple tuple_t; -int main() +int main(int, char**) { array_t arr; tuple_t tup(arr); + + return 0; } diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.creation/forward_as_tuple.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.creation/forward_as_tuple.pass.cpp index 5a7940da65692..8dc1e48f8675e 100644 --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.creation/forward_as_tuple.pass.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.creation/forward_as_tuple.pass.cpp @@ -64,7 +64,7 @@ test3(const Tuple&) } #endif -int main() +int main(int, char**) { { test0(std::forward_as_tuple()); @@ -84,4 +84,6 @@ int main() static_assert ( test3 (std::forward_as_tuple(i, c)) == 2, "" ); #endif } + + return 0; } diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.creation/make_tuple.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.creation/make_tuple.pass.cpp index 3f0dae093f067..444e978b01e5d 100644 --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.creation/make_tuple.pass.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.creation/make_tuple.pass.cpp @@ -21,7 +21,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { { int i = 0; @@ -50,4 +50,6 @@ int main() static_assert (d1 == 3.14, "" ); } #endif + + return 0; } diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.creation/tie.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.creation/tie.pass.cpp index f703ef2c849ca..53ccc23b97c6c 100644 --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.creation/tie.pass.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.creation/tie.pass.cpp @@ -39,7 +39,7 @@ constexpr bool test_tie_constexpr() { } #endif -int main() +int main(int, char**) { { int i = 0; @@ -60,4 +60,6 @@ int main() static_assert(test_tie_constexpr(), ""); } #endif + + return 0; } diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.creation/tuple_cat.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.creation/tuple_cat.pass.cpp index 927fc2ab891ad..40efbd1b80149 100644 --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.creation/tuple_cat.pass.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.creation/tuple_cat.pass.cpp @@ -23,7 +23,7 @@ #include "test_macros.h" #include "MoveOnly.h" -int main() +int main(int, char**) { { std::tuple<> t = std::tuple_cat(); @@ -238,4 +238,6 @@ int main() ); assert(t2 == std::make_tuple(std::make_tuple(1), std::make_tuple(2))); } + + return 0; } diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.elem/get_const.fail.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.elem/get_const.fail.cpp index 4c0b5a6b460c1..650303ff7b296 100644 --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.elem/get_const.fail.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.elem/get_const.fail.cpp @@ -20,7 +20,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::tuple T; @@ -37,4 +37,6 @@ int main() std::get<1>(t) = "four"; } + + return 0; } diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.elem/get_const.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.elem/get_const.pass.cpp index 5ca0bd8e9633b..a280c500ba58b 100644 --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.elem/get_const.pass.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.elem/get_const.pass.cpp @@ -24,7 +24,7 @@ struct Empty {}; -int main() +int main(int, char**) { { typedef std::tuple T; @@ -64,4 +64,6 @@ int main() assert(std::get<2>(t) == 5); assert(d == 2.5); } + + return 0; } diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.elem/get_const_rv.fail.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.elem/get_const_rv.fail.cpp index 373d84bad99a0..cf0e88246d37d 100644 --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.elem/get_const_rv.fail.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.elem/get_const_rv.fail.cpp @@ -23,11 +23,13 @@ template void cref(T const&&) = delete; std::tuple const tup4() { return std::make_tuple(4); } -int main() +int main(int, char**) { // LWG2485: tuple should not open a hole in the type system, get() should // imitate [expr.ref]'s rules for accessing data members { cref(std::get<0>(tup4())); // expected-error {{call to deleted function 'cref'}} } + + return 0; } diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.elem/get_const_rv.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.elem/get_const_rv.pass.cpp index 4c2654cd7354a..5801d5a5e65e0 100644 --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.elem/get_const_rv.pass.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.elem/get_const_rv.pass.cpp @@ -24,7 +24,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { { typedef std::tuple T; @@ -76,4 +76,6 @@ int main() static_assert(std::get<1>(std::move(t)) == 5, ""); } #endif + + return 0; } diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.elem/get_non_const.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.elem/get_non_const.pass.cpp index 3708e5cb0ca7b..3cbf01b25f86a 100644 --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.elem/get_non_const.pass.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.elem/get_non_const.pass.cpp @@ -36,7 +36,7 @@ struct S { constexpr std::tuple getP () { return { 3, 4 }; } #endif -int main() +int main(int, char**) { { typedef std::tuple T; @@ -81,4 +81,6 @@ int main() } #endif + + return 0; } diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.elem/get_rv.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.elem/get_rv.pass.cpp index 114672b7c7a5f..ae968403b0151 100644 --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.elem/get_rv.pass.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.elem/get_rv.pass.cpp @@ -21,7 +21,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::tuple > T; @@ -29,4 +29,6 @@ int main() std::unique_ptr p = std::get<0>(std::move(t)); assert(*p == 3); } + + return 0; } diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.elem/tuple.by.type.fail.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.elem/tuple.by.type.fail.cpp index f85c8098f7db1..51bf1d550cd05 100644 --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.elem/tuple.by.type.fail.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.elem/tuple.by.type.fail.cpp @@ -31,8 +31,10 @@ void test_bad_return_type() { upint p = std::get(t); // expected-error{{deleted copy constructor}} } -int main() +int main(int, char**) { test_bad_index(); test_bad_return_type(); + + return 0; } diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.elem/tuple.by.type.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.elem/tuple.by.type.pass.cpp index 9df8ce381a7c4..7dd4e8f10adb6 100644 --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.elem/tuple.by.type.pass.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.elem/tuple.by.type.pass.cpp @@ -17,7 +17,7 @@ #include -int main() +int main(int, char**) { typedef std::complex cf; { @@ -90,4 +90,6 @@ int main() static_assert(std::get(std::move(t)) == 1, ""); static_assert(std::get(std::move(t)) == 2, ""); } + + return 0; } diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple.include.array.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple.include.array.pass.cpp index e56f86a1ccaf5..a97e60ca7799c 100644 --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple.include.array.pass.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple.include.array.pass.cpp @@ -40,7 +40,7 @@ void test() static_assert((std::is_same::type, const volatile U>::value), ""); } -int main() +int main(int, char**) { test, 5, int, 0>(); test, 5, int, 1>(); @@ -48,4 +48,6 @@ int main() test, 4, volatile int, 3>(); test, 3, char *, 1>(); test, 3, char *, 2>(); + + return 0; } diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple.include.utility.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple.include.utility.pass.cpp index eb1704c943b74..fdfb8b8b0a8fe 100644 --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple.include.utility.pass.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple.include.utility.pass.cpp @@ -38,7 +38,7 @@ void test() static_assert((std::is_same::type, const volatile U>::value), ""); } -int main() +int main(int, char**) { test, 2, int, 0>(); test, 2, int, 1>(); @@ -46,4 +46,6 @@ int main() test, 2, volatile int, 1>(); test, 2, char *, 0>(); test, 2, int, 1>(); + + return 0; } diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_element.fail.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_element.fail.cpp index a1c42921ba288..24b735b7e685f 100644 --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_element.fail.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_element.fail.cpp @@ -22,7 +22,7 @@ #include #include -int main() +int main(int, char**) { using T = std::tuple; using E1 = typename std::tuple_element<1, T &>::type; // expected-error{{undefined template}} @@ -30,4 +30,6 @@ int main() using E3 = typename std::tuple_element<4, T const>::type; // expected-error@__tuple:* 2 {{static_assert failed}} + + return 0; } diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_element.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_element.pass.cpp index ecb6ea087ef08..5ad2b08220e2b 100644 --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_element.pass.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_element.pass.cpp @@ -39,7 +39,7 @@ void test() #endif } -int main() +int main(int, char**) { test, 0, int>(); test, 0, char>(); @@ -47,4 +47,6 @@ int main() test, 0, int*>(); test, 1, char>(); test, 2, int>(); + + return 0; } diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size.fail.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size.fail.cpp index aa20818393b33..9b065b3b9f6c8 100644 --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size.fail.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size.fail.cpp @@ -18,9 +18,11 @@ #include -int main() +int main(int, char**) { (void)std::tuple_size &>::value; // expected-error {{implicit instantiation of undefined template}} (void)std::tuple_size::value; // expected-error {{implicit instantiation of undefined template}} (void)std::tuple_size*>::value; // expected-error {{implicit instantiation of undefined template}} + + return 0; } diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size.pass.cpp index 2a602b1ca260b..f27c7eb470a5b 100644 --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size.pass.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size.pass.cpp @@ -32,10 +32,12 @@ void test() std::tuple_size >::value), ""); } -int main() +int main(int, char**) { test, 0>(); test, 1>(); test, 2>(); test, 3>(); + + return 0; } diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_incomplete.fail.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_incomplete.fail.cpp index 3d092506828de..83b773abf229f 100644 --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_incomplete.fail.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_incomplete.fail.cpp @@ -39,7 +39,7 @@ struct std::tuple_size { template <> struct std::tuple_size {}; -int main() +int main(int, char**) { // Test that tuple_size is not incomplete when tuple_size::value // is well-formed but not a constant expression. @@ -59,4 +59,6 @@ int main() // expected-error@__tuple:* 1 {{no member named 'value'}} (void)std::tuple_size::value; // expected-note {{here}} } + + return 0; } diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_incomplete.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_incomplete.pass.cpp index 44e100c6d36c5..32bad3317bcfa 100644 --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_incomplete.pass.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_incomplete.pass.cpp @@ -50,7 +50,7 @@ void test_incomplete() { } -int main() +int main(int, char**) { test_complete >(); test_complete >(); @@ -63,4 +63,6 @@ int main() test_incomplete(); test_incomplete&>(); test_incomplete(); + + return 0; } diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_structured_bindings.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_structured_bindings.pass.cpp index f191f9f64d787..00f7ff2697266 100644 --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_structured_bindings.pass.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_structured_bindings.pass.cpp @@ -139,11 +139,13 @@ void test_after_tuple_size_specialization() { assert(p == -1); } -int main() { +int main(int, char**) { test_decomp_user_type(); test_decomp_tuple(); test_decomp_pair(); test_decomp_array(); test_before_tuple_size_specialization(); test_after_tuple_size_specialization(); + + return 0; } diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_v.fail.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_v.fail.cpp index 820cb0443f8fc..8bd3fbd579e1e 100644 --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_v.fail.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_v.fail.cpp @@ -16,10 +16,12 @@ #include -int main() +int main(int, char**) { (void)std::tuple_size_v &>; // expected-note {{requested here}} (void)std::tuple_size_v; // expected-note {{requested here}} (void)std::tuple_size_v*>; // expected-note {{requested here}} // expected-error@tuple:* 3 {{implicit instantiation of undefined template}} + + return 0; } diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_v.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_v.pass.cpp index b2b3e72b9be2e..bd01f49497c02 100644 --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_v.pass.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_v.pass.cpp @@ -26,7 +26,7 @@ void test() static_assert(std::tuple_size_v == std::tuple_size::value, ""); } -int main() +int main(int, char**) { test, 0>(); @@ -39,4 +39,6 @@ int main() test, 3>(); test, 3>(); + + return 0; } diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_value_sfinae.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_value_sfinae.pass.cpp index 9c00418768f18..2efbfa50e1561 100644 --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_value_sfinae.pass.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_value_sfinae.pass.cpp @@ -27,7 +27,7 @@ template constexpr bool has_value() { return has_value(0); } struct Dummy {}; -int main() { +int main(int, char**) { // Test that the ::value member does not exist static_assert(has_value const>(), ""); static_assert(has_value volatile>(), ""); @@ -35,4 +35,6 @@ int main() { static_assert(!has_value(), ""); static_assert(!has_value(), ""); static_assert(!has_value&>(), ""); + + return 0; } diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.rel/eq.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.rel/eq.pass.cpp index 709f747c74444..0302c839e7439 100644 --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.rel/eq.pass.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.rel/eq.pass.cpp @@ -22,7 +22,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { { typedef std::tuple<> T1; @@ -154,4 +154,6 @@ int main() static_assert(t1 != t2, ""); } #endif + + return 0; } diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.rel/lt.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.rel/lt.pass.cpp index 9f29c6c4a1b54..64ed9b4a90e73 100644 --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.rel/lt.pass.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.rel/lt.pass.cpp @@ -34,7 +34,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { { typedef std::tuple<> T1; @@ -208,4 +208,6 @@ int main() static_assert(!(t1 >= t2), ""); } #endif + + return 0; } diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.special/non_member_swap.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.special/non_member_swap.pass.cpp index 079977016b859..eee8f18196afb 100644 --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.special/non_member_swap.pass.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.special/non_member_swap.pass.cpp @@ -20,7 +20,7 @@ #include "MoveOnly.h" -int main() +int main(int, char**) { { typedef std::tuple<> T; @@ -58,4 +58,6 @@ int main() assert(std::get<1>(t1) == 1); assert(std::get<2>(t1) == 2); } + + return 0; } diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.swap/member_swap.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.swap/member_swap.pass.cpp index 097f69b42eab0..951a88726098b 100644 --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.swap/member_swap.pass.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.swap/member_swap.pass.cpp @@ -19,7 +19,7 @@ #include "MoveOnly.h" -int main() +int main(int, char**) { { typedef std::tuple<> T; @@ -57,4 +57,6 @@ int main() assert(std::get<1>(t1) == 1); assert(std::get<2>(t1) == 2); } + + return 0; } diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.traits/uses_allocator.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.traits/uses_allocator.pass.cpp index 5e4722874af36..b04c491ede6f6 100644 --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.traits/uses_allocator.pass.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.traits/uses_allocator.pass.cpp @@ -20,7 +20,7 @@ struct A {}; -int main() +int main(int, char**) { { typedef std::tuple<> T; @@ -42,4 +42,6 @@ int main() static_assert((std::is_base_of>::value), ""); } + + return 0; } diff --git a/libcxx/test/std/utilities/type.index/type.index.hash/enabled_hash.pass.cpp b/libcxx/test/std/utilities/type.index/type.index.hash/enabled_hash.pass.cpp index daa287e3e0114..710b33878d9d6 100644 --- a/libcxx/test/std/utilities/type.index/type.index.hash/enabled_hash.pass.cpp +++ b/libcxx/test/std/utilities/type.index/type.index.hash/enabled_hash.pass.cpp @@ -17,6 +17,8 @@ #include "poisoned_hash_helper.hpp" -int main() { +int main(int, char**) { test_library_hash_specializations_available(); + + return 0; } diff --git a/libcxx/test/std/utilities/type.index/type.index.hash/hash.pass.cpp b/libcxx/test/std/utilities/type.index/type.index.hash/hash.pass.cpp index 139847fdae5dc..8192a9020f708 100644 --- a/libcxx/test/std/utilities/type.index/type.index.hash/hash.pass.cpp +++ b/libcxx/test/std/utilities/type.index/type.index.hash/hash.pass.cpp @@ -21,7 +21,7 @@ #include #include -int main() +int main(int, char**) { typedef std::hash H; static_assert((std::is_same::value), "" ); @@ -29,4 +29,6 @@ int main() std::type_index t1 = typeid(int); assert(std::hash()(t1) == t1.hash_code()); + + return 0; } diff --git a/libcxx/test/std/utilities/type.index/type.index.members/ctor.pass.cpp b/libcxx/test/std/utilities/type.index/type.index.members/ctor.pass.cpp index cafeebb0930cf..c133130f10e2e 100644 --- a/libcxx/test/std/utilities/type.index/type.index.members/ctor.pass.cpp +++ b/libcxx/test/std/utilities/type.index/type.index.members/ctor.pass.cpp @@ -16,9 +16,11 @@ #include #include -int main() +int main(int, char**) { std::type_info const & info = typeid(int); std::type_index t1(info); assert(t1.name() == info.name()); + + return 0; } diff --git a/libcxx/test/std/utilities/type.index/type.index.members/eq.pass.cpp b/libcxx/test/std/utilities/type.index/type.index.members/eq.pass.cpp index 210d0ab028ce0..97f6448b73e85 100644 --- a/libcxx/test/std/utilities/type.index/type.index.members/eq.pass.cpp +++ b/libcxx/test/std/utilities/type.index/type.index.members/eq.pass.cpp @@ -16,11 +16,13 @@ #include #include -int main() +int main(int, char**) { std::type_index t1 = typeid(int); std::type_index t2 = typeid(int); std::type_index t3 = typeid(long); assert(t1 == t2); assert(t1 != t3); + + return 0; } diff --git a/libcxx/test/std/utilities/type.index/type.index.members/hash_code.pass.cpp b/libcxx/test/std/utilities/type.index/type.index.members/hash_code.pass.cpp index f5b6cc35c7d38..0619ff754439d 100644 --- a/libcxx/test/std/utilities/type.index/type.index.members/hash_code.pass.cpp +++ b/libcxx/test/std/utilities/type.index/type.index.members/hash_code.pass.cpp @@ -15,9 +15,11 @@ #include #include -int main() +int main(int, char**) { const std::type_info& ti = typeid(int); std::type_index t1 = typeid(int); assert(t1.hash_code() == ti.hash_code()); + + return 0; } diff --git a/libcxx/test/std/utilities/type.index/type.index.members/lt.pass.cpp b/libcxx/test/std/utilities/type.index/type.index.members/lt.pass.cpp index 1f631b7b99755..e24b3975e66dd 100644 --- a/libcxx/test/std/utilities/type.index/type.index.members/lt.pass.cpp +++ b/libcxx/test/std/utilities/type.index/type.index.members/lt.pass.cpp @@ -18,7 +18,7 @@ #include #include -int main() +int main(int, char**) { std::type_index t1 = typeid(int); std::type_index t2 = typeid(int); @@ -41,4 +41,6 @@ int main() assert( (t1 > t3)); assert( (t1 >= t3)); } + + return 0; } diff --git a/libcxx/test/std/utilities/type.index/type.index.members/name.pass.cpp b/libcxx/test/std/utilities/type.index/type.index.members/name.pass.cpp index 1b01f52f9f747..ee91629b35cf4 100644 --- a/libcxx/test/std/utilities/type.index/type.index.members/name.pass.cpp +++ b/libcxx/test/std/utilities/type.index/type.index.members/name.pass.cpp @@ -16,9 +16,11 @@ #include #include -int main() +int main(int, char**) { const std::type_info& ti = typeid(int); std::type_index t1 = typeid(int); assert(std::string(t1.name()) == ti.name()); + + return 0; } diff --git a/libcxx/test/std/utilities/type.index/type.index.overview/copy_assign.pass.cpp b/libcxx/test/std/utilities/type.index/type.index.overview/copy_assign.pass.cpp index b7fbb6f91cf97..72cae39d045eb 100644 --- a/libcxx/test/std/utilities/type.index/type.index.overview/copy_assign.pass.cpp +++ b/libcxx/test/std/utilities/type.index/type.index.overview/copy_assign.pass.cpp @@ -15,11 +15,13 @@ #include #include -int main() +int main(int, char**) { std::type_index t1(typeid(int)); std::type_index t2(typeid(double)); assert(t2 != t1); t2 = t1; assert(t2 == t1); + + return 0; } diff --git a/libcxx/test/std/utilities/type.index/type.index.overview/copy_ctor.pass.cpp b/libcxx/test/std/utilities/type.index/type.index.overview/copy_ctor.pass.cpp index 9520cd8f67e9f..df0df2e8c92bf 100644 --- a/libcxx/test/std/utilities/type.index/type.index.overview/copy_ctor.pass.cpp +++ b/libcxx/test/std/utilities/type.index/type.index.overview/copy_ctor.pass.cpp @@ -15,9 +15,11 @@ #include #include -int main() +int main(int, char**) { std::type_index t1(typeid(int)); std::type_index t2 = t1; assert(t2 == t1); + + return 0; } diff --git a/libcxx/test/std/utilities/type.index/type.index.synopsis/hash_type_index.pass.cpp b/libcxx/test/std/utilities/type.index/type.index.synopsis/hash_type_index.pass.cpp index 333e04b1811fa..e8ce292cca0e9 100644 --- a/libcxx/test/std/utilities/type.index/type.index.synopsis/hash_type_index.pass.cpp +++ b/libcxx/test/std/utilities/type.index/type.index.synopsis/hash_type_index.pass.cpp @@ -22,7 +22,7 @@ #include "poisoned_hash_helper.hpp" #endif -int main() +int main(int, char**) { { typedef std::hash H; @@ -34,4 +34,6 @@ int main() test_hash_enabled_for_type(std::type_index(typeid(int))); } #endif + + return 0; } diff --git a/libcxx/test/std/utilities/utilities.general/nothing_to_do.pass.cpp b/libcxx/test/std/utilities/utilities.general/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/utilities/utilities.general/nothing_to_do.pass.cpp +++ b/libcxx/test/std/utilities/utilities.general/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/utilities/utility.requirements/allocator.requirements/nothing_to_do.pass.cpp b/libcxx/test/std/utilities/utility.requirements/allocator.requirements/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/utilities/utility.requirements/allocator.requirements/nothing_to_do.pass.cpp +++ b/libcxx/test/std/utilities/utility.requirements/allocator.requirements/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/utilities/utility.requirements/hash.requirements/nothing_to_do.pass.cpp b/libcxx/test/std/utilities/utility.requirements/hash.requirements/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/utilities/utility.requirements/hash.requirements/nothing_to_do.pass.cpp +++ b/libcxx/test/std/utilities/utility.requirements/hash.requirements/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/utilities/utility.requirements/nothing_to_do.pass.cpp b/libcxx/test/std/utilities/utility.requirements/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/utilities/utility.requirements/nothing_to_do.pass.cpp +++ b/libcxx/test/std/utilities/utility.requirements/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/utilities/utility.requirements/nullablepointer.requirements/nothing_to_do.pass.cpp b/libcxx/test/std/utilities/utility.requirements/nullablepointer.requirements/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/utilities/utility.requirements/nullablepointer.requirements/nothing_to_do.pass.cpp +++ b/libcxx/test/std/utilities/utility.requirements/nullablepointer.requirements/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/utilities/utility.requirements/swappable.requirements/nothing_to_do.pass.cpp b/libcxx/test/std/utilities/utility.requirements/swappable.requirements/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/utilities/utility.requirements/swappable.requirements/nothing_to_do.pass.cpp +++ b/libcxx/test/std/utilities/utility.requirements/swappable.requirements/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/utilities/utility.requirements/utility.arg.requirements/nothing_to_do.pass.cpp b/libcxx/test/std/utilities/utility.requirements/utility.arg.requirements/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/utilities/utility.requirements/utility.arg.requirements/nothing_to_do.pass.cpp +++ b/libcxx/test/std/utilities/utility.requirements/utility.arg.requirements/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/utilities/utility/as_const/as_const.fail.cpp b/libcxx/test/std/utilities/utility/as_const/as_const.fail.cpp index 5f3b78b7245fb..1bb2e64c371fd 100644 --- a/libcxx/test/std/utilities/utility/as_const/as_const.fail.cpp +++ b/libcxx/test/std/utilities/utility/as_const/as_const.fail.cpp @@ -15,7 +15,9 @@ struct S {int i;}; -int main() +int main(int, char**) { std::as_const(S{}); + + return 0; } diff --git a/libcxx/test/std/utilities/utility/as_const/as_const.pass.cpp b/libcxx/test/std/utilities/utility/as_const/as_const.pass.cpp index 284e5b7b3d65c..32d240a0b41b9 100644 --- a/libcxx/test/std/utilities/utility/as_const/as_const.pass.cpp +++ b/libcxx/test/std/utilities/utility/as_const/as_const.pass.cpp @@ -34,7 +34,7 @@ void test(T& t) assert(std::as_const(t) == t); } -int main() +int main(int, char**) { int i = 3; double d = 4.0; @@ -42,4 +42,6 @@ int main() test(i); test(d); test(s); + + return 0; } diff --git a/libcxx/test/std/utilities/utility/declval/declval.pass.cpp b/libcxx/test/std/utilities/utility/declval/declval.pass.cpp index b298d58a018b9..6509fd4377cca 100644 --- a/libcxx/test/std/utilities/utility/declval/declval.pass.cpp +++ b/libcxx/test/std/utilities/utility/declval/declval.pass.cpp @@ -21,11 +21,13 @@ class A A& operator=(const A&); }; -int main() +int main(int, char**) { #if TEST_STD_VER >= 11 static_assert((std::is_same()), A&&>::value), ""); #else static_assert((std::is_same()), A&>::value), ""); #endif + + return 0; } diff --git a/libcxx/test/std/utilities/utility/exchange/exchange.pass.cpp b/libcxx/test/std/utilities/utility/exchange/exchange.pass.cpp index 1defcbfb3392e..41e8abb43e516 100644 --- a/libcxx/test/std/utilities/utility/exchange/exchange.pass.cpp +++ b/libcxx/test/std/utilities/utility/exchange/exchange.pass.cpp @@ -39,7 +39,7 @@ TEST_CONSTEXPR bool test_constexpr() { -int main() +int main(int, char**) { { int v = 12; @@ -80,4 +80,6 @@ int main() #if TEST_STD_VER > 17 static_assert(test_constexpr()); #endif + + return 0; } diff --git a/libcxx/test/std/utilities/utility/forward/forward.fail.cpp b/libcxx/test/std/utilities/utility/forward/forward.fail.cpp index a689b1d0dfe86..4efc1b6aad152 100644 --- a/libcxx/test/std/utilities/utility/forward/forward.fail.cpp +++ b/libcxx/test/std/utilities/utility/forward/forward.fail.cpp @@ -19,7 +19,7 @@ struct A A source() {return A();} const A csource() {return A();} -int main() +int main(int, char**) { #if TEST_STD_VER >= 11 { @@ -49,4 +49,6 @@ int main() A a; std::forward(a); // expected-error {{no matching function for call to 'forward'}} } + + return 0; } diff --git a/libcxx/test/std/utilities/utility/forward/forward.pass.cpp b/libcxx/test/std/utilities/utility/forward/forward.pass.cpp index 394c016e2c311..b2f7c960392db 100644 --- a/libcxx/test/std/utilities/utility/forward/forward.pass.cpp +++ b/libcxx/test/std/utilities/utility/forward/forward.pass.cpp @@ -41,7 +41,7 @@ constexpr bool test_constexpr_forward() { #endif } -int main() +int main(int, char**) { A a; const A ca = A(); @@ -87,4 +87,6 @@ int main() static_assert(std::forward(i2) == 42, ""); } #endif + + return 0; } diff --git a/libcxx/test/std/utilities/utility/forward/forward_03.pass.cpp b/libcxx/test/std/utilities/utility/forward/forward_03.pass.cpp index c5a2507a750dd..522382dc7ed98 100644 --- a/libcxx/test/std/utilities/utility/forward/forward_03.pass.cpp +++ b/libcxx/test/std/utilities/utility/forward/forward_03.pass.cpp @@ -28,7 +28,7 @@ struct eight {one _[8];}; one test(A&); two test(const A&); -int main() +int main(int, char**) { A a; const A ca = A(); @@ -54,4 +54,6 @@ int main() static_assert(sizeof(test(std::forward(ca))) == 2, ""); static_assert(sizeof(test(std::forward(csource()))) == 2, ""); #endif + + return 0; } diff --git a/libcxx/test/std/utilities/utility/forward/move.fail.cpp b/libcxx/test/std/utilities/utility/forward/move.fail.cpp index bd8fd46a97e0e..86f3cc3e5d0d9 100644 --- a/libcxx/test/std/utilities/utility/forward/move.fail.cpp +++ b/libcxx/test/std/utilities/utility/forward/move.fail.cpp @@ -24,10 +24,12 @@ const move_only csource() {return move_only();} void test(move_only) {} -int main() +int main(int, char**) { move_only a; const move_only ca = move_only(); test(std::move(ca)); // c + + return 0; } diff --git a/libcxx/test/std/utilities/utility/forward/move.pass.cpp b/libcxx/test/std/utilities/utility/forward/move.pass.cpp index c98efa1c345cf..3db61cda27d1e 100644 --- a/libcxx/test/std/utilities/utility/forward/move.pass.cpp +++ b/libcxx/test/std/utilities/utility/forward/move.pass.cpp @@ -62,7 +62,7 @@ constexpr bool test_constexpr_move() { #endif } -int main() +int main(int, char**) { { // Test return type and noexcept. static_assert(std::is_same::value, ""); @@ -117,4 +117,6 @@ int main() static_assert(std::move(y) == 42, ""); } #endif + + return 0; } diff --git a/libcxx/test/std/utilities/utility/forward/move_if_noexcept.pass.cpp b/libcxx/test/std/utilities/utility/forward/move_if_noexcept.pass.cpp index 52a276c2412e6..11ea3c58f0972 100644 --- a/libcxx/test/std/utilities/utility/forward/move_if_noexcept.pass.cpp +++ b/libcxx/test/std/utilities/utility/forward/move_if_noexcept.pass.cpp @@ -39,7 +39,7 @@ struct legacy legacy(const legacy&); }; -int main() +int main(int, char**) { int i = 0; const int ci = 0; @@ -71,4 +71,6 @@ int main() static_assert(i2 == 23, "" ); #endif + + return 0; } diff --git a/libcxx/test/std/utilities/utility/operators/rel_ops.pass.cpp b/libcxx/test/std/utilities/utility/operators/rel_ops.pass.cpp index 9c8dbedcc65bd..42e808665628d 100644 --- a/libcxx/test/std/utilities/utility/operators/rel_ops.pass.cpp +++ b/libcxx/test/std/utilities/utility/operators/rel_ops.pass.cpp @@ -32,7 +32,7 @@ operator < (const A& x, const A& y) return x.data_ < y.data_; } -int main() +int main(int, char**) { using namespace std::rel_ops; A a1(1); @@ -45,4 +45,6 @@ int main() assert(a1 <= a2); assert(a2 >= a2); assert(a2 >= a1); + + return 0; } diff --git a/libcxx/test/std/utilities/utility/pairs/nothing_to_do.pass.cpp b/libcxx/test/std/utilities/utility/pairs/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/utilities/utility/pairs/nothing_to_do.pass.cpp +++ b/libcxx/test/std/utilities/utility/pairs/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/utilities/utility/pairs/pair.astuple/get_const.fail.cpp b/libcxx/test/std/utilities/utility/pairs/pair.astuple/get_const.fail.cpp index e14a1c46a7bb6..e186514f0eab2 100644 --- a/libcxx/test/std/utilities/utility/pairs/pair.astuple/get_const.fail.cpp +++ b/libcxx/test/std/utilities/utility/pairs/pair.astuple/get_const.fail.cpp @@ -17,7 +17,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::pair P; @@ -26,4 +26,6 @@ int main() assert(std::get<1>(p) == 4); std::get<0>(p) = 5; } + + return 0; } diff --git a/libcxx/test/std/utilities/utility/pairs/pair.astuple/get_const.pass.cpp b/libcxx/test/std/utilities/utility/pairs/pair.astuple/get_const.pass.cpp index 2b164deb45719..d9747b337e86b 100644 --- a/libcxx/test/std/utilities/utility/pairs/pair.astuple/get_const.pass.cpp +++ b/libcxx/test/std/utilities/utility/pairs/pair.astuple/get_const.pass.cpp @@ -19,7 +19,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { { typedef std::pair P; @@ -36,4 +36,6 @@ int main() static_assert(std::get<1>(p1) == 4, ""); } #endif + + return 0; } diff --git a/libcxx/test/std/utilities/utility/pairs/pair.astuple/get_const_rv.pass.cpp b/libcxx/test/std/utilities/utility/pairs/pair.astuple/get_const_rv.pass.cpp index 05c81a23b5862..a477c5150ab9d 100644 --- a/libcxx/test/std/utilities/utility/pairs/pair.astuple/get_const_rv.pass.cpp +++ b/libcxx/test/std/utilities/utility/pairs/pair.astuple/get_const_rv.pass.cpp @@ -23,7 +23,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { { typedef std::pair, short> P; @@ -62,4 +62,6 @@ int main() static_assert(std::get<1>(std::move(p1)) == 4, ""); } #endif + + return 0; } diff --git a/libcxx/test/std/utilities/utility/pairs/pair.astuple/get_non_const.pass.cpp b/libcxx/test/std/utilities/utility/pairs/pair.astuple/get_non_const.pass.cpp index 45fb7aa794269..6119cd5c8ce97 100644 --- a/libcxx/test/std/utilities/utility/pairs/pair.astuple/get_non_const.pass.cpp +++ b/libcxx/test/std/utilities/utility/pairs/pair.astuple/get_non_const.pass.cpp @@ -29,7 +29,7 @@ struct S { constexpr std::pair getP () { return { 3, 4 }; } #endif -int main() +int main(int, char**) { { typedef std::pair P; @@ -49,4 +49,6 @@ int main() } #endif + + return 0; } diff --git a/libcxx/test/std/utilities/utility/pairs/pair.astuple/get_rv.pass.cpp b/libcxx/test/std/utilities/utility/pairs/pair.astuple/get_rv.pass.cpp index 9ca7b4df6df9c..e0ce55bba90f8 100644 --- a/libcxx/test/std/utilities/utility/pairs/pair.astuple/get_rv.pass.cpp +++ b/libcxx/test/std/utilities/utility/pairs/pair.astuple/get_rv.pass.cpp @@ -20,7 +20,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::pair, short> P; @@ -28,4 +28,6 @@ int main() std::unique_ptr ptr = std::get<0>(std::move(p)); assert(*ptr == 3); } + + return 0; } diff --git a/libcxx/test/std/utilities/utility/pairs/pair.astuple/pairs.by.type.pass.cpp b/libcxx/test/std/utilities/utility/pairs/pair.astuple/pairs.by.type.pass.cpp index 99fb2cd225974..f2d3359e7a57b 100644 --- a/libcxx/test/std/utilities/utility/pairs/pair.astuple/pairs.by.type.pass.cpp +++ b/libcxx/test/std/utilities/utility/pairs/pair.astuple/pairs.by.type.pass.cpp @@ -16,7 +16,7 @@ #include -int main() +int main(int, char**) { typedef std::complex cf; { @@ -81,4 +81,6 @@ int main() static_assert(std::get(std::move(p)) == 1, ""); static_assert(std::get(std::move(p)) == 2, ""); } + + return 0; } diff --git a/libcxx/test/std/utilities/utility/pairs/pair.astuple/pairs.by.type1.fail.cpp b/libcxx/test/std/utilities/utility/pairs/pair.astuple/pairs.by.type1.fail.cpp index bba71cb8de226..dce209921b88b 100644 --- a/libcxx/test/std/utilities/utility/pairs/pair.astuple/pairs.by.type1.fail.cpp +++ b/libcxx/test/std/utilities/utility/pairs/pair.astuple/pairs.by.type1.fail.cpp @@ -12,9 +12,11 @@ #include -int main() +int main(int, char**) { typedef std::complex cf; auto t1 = std::make_pair ( 42, 3.4 ); assert (( std::get(t1) == cf {1,2} )); // no such type + + return 0; } diff --git a/libcxx/test/std/utilities/utility/pairs/pair.astuple/pairs.by.type2.fail.cpp b/libcxx/test/std/utilities/utility/pairs/pair.astuple/pairs.by.type2.fail.cpp index c79e0788ce047..4c2ea88e6b8d6 100644 --- a/libcxx/test/std/utilities/utility/pairs/pair.astuple/pairs.by.type2.fail.cpp +++ b/libcxx/test/std/utilities/utility/pairs/pair.astuple/pairs.by.type2.fail.cpp @@ -12,9 +12,11 @@ #include -int main() +int main(int, char**) { typedef std::complex cf; auto t1 = std::make_pair ( 42, 43 ); assert ( std::get(t1) == 42 ); // two ints + + return 0; } diff --git a/libcxx/test/std/utilities/utility/pairs/pair.astuple/pairs.by.type3.fail.cpp b/libcxx/test/std/utilities/utility/pairs/pair.astuple/pairs.by.type3.fail.cpp index 4787d0e2eddf6..e30b787e1fd73 100644 --- a/libcxx/test/std/utilities/utility/pairs/pair.astuple/pairs.by.type3.fail.cpp +++ b/libcxx/test/std/utilities/utility/pairs/pair.astuple/pairs.by.type3.fail.cpp @@ -12,9 +12,11 @@ #include -int main() +int main(int, char**) { typedef std::unique_ptr upint; std::pair t(upint(new int(4)), 23); upint p = std::get(t); + + return 0; } diff --git a/libcxx/test/std/utilities/utility/pairs/pair.astuple/tuple_element.fail.cpp b/libcxx/test/std/utilities/utility/pairs/pair.astuple/tuple_element.fail.cpp index ba571fda1eb30..e53ca898d2687 100644 --- a/libcxx/test/std/utilities/utility/pairs/pair.astuple/tuple_element.fail.cpp +++ b/libcxx/test/std/utilities/utility/pairs/pair.astuple/tuple_element.fail.cpp @@ -14,8 +14,10 @@ #include -int main() +int main(int, char**) { typedef std::pair T; std::tuple_element<2, T>::type foo; // expected-error@utility:* {{Index out of bounds in std::tuple_element>}} + + return 0; } diff --git a/libcxx/test/std/utilities/utility/pairs/pair.astuple/tuple_element.pass.cpp b/libcxx/test/std/utilities/utility/pairs/pair.astuple/tuple_element.pass.cpp index 4ba58143442a5..1e41e3fda5d44 100644 --- a/libcxx/test/std/utilities/utility/pairs/pair.astuple/tuple_element.pass.cpp +++ b/libcxx/test/std/utilities/utility/pairs/pair.astuple/tuple_element.pass.cpp @@ -47,8 +47,10 @@ void test() } } -int main() +int main(int, char**) { test(); test(); + + return 0; } diff --git a/libcxx/test/std/utilities/utility/pairs/pair.astuple/tuple_size.pass.cpp b/libcxx/test/std/utilities/utility/pairs/pair.astuple/tuple_size.pass.cpp index a88b845969289..3b95b4749dd74 100644 --- a/libcxx/test/std/utilities/utility/pairs/pair.astuple/tuple_size.pass.cpp +++ b/libcxx/test/std/utilities/utility/pairs/pair.astuple/tuple_size.pass.cpp @@ -14,7 +14,7 @@ #include -int main() +int main(int, char**) { { typedef std::pair P1; @@ -32,4 +32,6 @@ int main() typedef std::pair const volatile P1; static_assert((std::tuple_size::value == 2), ""); } + + return 0; } diff --git a/libcxx/test/std/utilities/utility/pairs/pair.piecewise/piecewise_construct.pass.cpp b/libcxx/test/std/utilities/utility/pairs/pair.piecewise/piecewise_construct.pass.cpp index 72eb312081eaf..98f864caf1f03 100644 --- a/libcxx/test/std/utilities/utility/pairs/pair.piecewise/piecewise_construct.pass.cpp +++ b/libcxx/test/std/utilities/utility/pairs/pair.piecewise/piecewise_construct.pass.cpp @@ -41,7 +41,7 @@ class B unsigned get_u2() const {return u2_;} }; -int main() +int main(int, char**) { std::pair p(std::piecewise_construct, std::make_tuple(4, 'a'), @@ -51,4 +51,6 @@ int main() assert(p.second.get_d() == 3.5); assert(p.second.get_u1() == 6u); assert(p.second.get_u2() == 2u); + + return 0; } diff --git a/libcxx/test/std/utilities/utility/pairs/pairs.general/nothing_to_do.pass.cpp b/libcxx/test/std/utilities/utility/pairs/pairs.general/nothing_to_do.pass.cpp index f77636c84755e..1f764da05d6b5 100644 --- a/libcxx/test/std/utilities/utility/pairs/pairs.general/nothing_to_do.pass.cpp +++ b/libcxx/test/std/utilities/utility/pairs/pairs.general/nothing_to_do.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/std/utilities/utility/pairs/pairs.pair/U_V.pass.cpp b/libcxx/test/std/utilities/utility/pairs/pairs.pair/U_V.pass.cpp index 11403c91de04d..0f22808de482c 100644 --- a/libcxx/test/std/utilities/utility/pairs/pairs.pair/U_V.pass.cpp +++ b/libcxx/test/std/utilities/utility/pairs/pairs.pair/U_V.pass.cpp @@ -46,7 +46,7 @@ struct ImplicitT { }; -int main() +int main(int, char**) { { typedef std::pair, short*> P; @@ -96,4 +96,6 @@ int main() static_assert(p.second.value == 43, ""); } #endif + + return 0; } diff --git a/libcxx/test/std/utilities/utility/pairs/pairs.pair/assign_const_pair_U_V.pass.cpp b/libcxx/test/std/utilities/utility/pairs/pairs.pair/assign_const_pair_U_V.pass.cpp index 5af432b991a58..834d73dd7f5e4 100644 --- a/libcxx/test/std/utilities/utility/pairs/pairs.pair/assign_const_pair_U_V.pass.cpp +++ b/libcxx/test/std/utilities/utility/pairs/pairs.pair/assign_const_pair_U_V.pass.cpp @@ -20,7 +20,7 @@ #include "archetypes.hpp" #endif -int main() +int main(int, char**) { { typedef std::pair P1; @@ -48,4 +48,6 @@ int main() assert(p.second.value == -42); } #endif + + return 0; } diff --git a/libcxx/test/std/utilities/utility/pairs/pairs.pair/assign_pair.pass.cpp b/libcxx/test/std/utilities/utility/pairs/pairs.pair/assign_pair.pass.cpp index db671a1501a8f..f4dfe5e1b941c 100644 --- a/libcxx/test/std/utilities/utility/pairs/pairs.pair/assign_pair.pass.cpp +++ b/libcxx/test/std/utilities/utility/pairs/pairs.pair/assign_pair.pass.cpp @@ -49,7 +49,7 @@ int CountAssign::moved = 0; struct Incomplete; extern Incomplete inc_obj; -int main() +int main(int, char**) { { typedef std::pair P; @@ -94,6 +94,8 @@ int main() P p(42, inc_obj); assert(&p.second == &inc_obj); } + + return 0; } struct Incomplete {}; diff --git a/libcxx/test/std/utilities/utility/pairs/pairs.pair/assign_pair_cxx03.pass.cpp b/libcxx/test/std/utilities/utility/pairs/pairs.pair/assign_pair_cxx03.pass.cpp index 53cc49183f787..47f85eaa6b4f4 100644 --- a/libcxx/test/std/utilities/utility/pairs/pairs.pair/assign_pair_cxx03.pass.cpp +++ b/libcxx/test/std/utilities/utility/pairs/pairs.pair/assign_pair_cxx03.pass.cpp @@ -27,7 +27,7 @@ struct NonAssignable { struct Incomplete; extern Incomplete inc_obj; -int main() +int main(int, char**) { { // Test that we don't constrain the assignment operator in C++03 mode. @@ -42,6 +42,8 @@ int main() P p(42, inc_obj); assert(&p.second == &inc_obj); } + + return 0; } struct Incomplete {}; diff --git a/libcxx/test/std/utilities/utility/pairs/pairs.pair/assign_rv_pair.pass.cpp b/libcxx/test/std/utilities/utility/pairs/pairs.pair/assign_rv_pair.pass.cpp index 91427ca7f2c4c..b4f0c01094d09 100644 --- a/libcxx/test/std/utilities/utility/pairs/pairs.pair/assign_rv_pair.pass.cpp +++ b/libcxx/test/std/utilities/utility/pairs/pairs.pair/assign_rv_pair.pass.cpp @@ -45,7 +45,7 @@ struct CountAssign { int CountAssign::copied = 0; int CountAssign::moved = 0; -int main() +int main(int, char**) { { typedef std::pair, int> P; @@ -92,4 +92,6 @@ int main() assert(CountAssign::moved == 1); assert(CountAssign::copied == 0); } + + return 0; } diff --git a/libcxx/test/std/utilities/utility/pairs/pairs.pair/assign_rv_pair_U_V.pass.cpp b/libcxx/test/std/utilities/utility/pairs/pairs.pair/assign_rv_pair_U_V.pass.cpp index 7248c2ffa02cb..0be0a4e9526c4 100644 --- a/libcxx/test/std/utilities/utility/pairs/pairs.pair/assign_rv_pair_U_V.pass.cpp +++ b/libcxx/test/std/utilities/utility/pairs/pairs.pair/assign_rv_pair_U_V.pass.cpp @@ -29,7 +29,7 @@ struct Derived { }; -int main() +int main(int, char**) { { typedef std::pair, short> P1; @@ -55,4 +55,6 @@ int main() assert(p.first == 42); assert(p.second.value == -42); } + + return 0; } diff --git a/libcxx/test/std/utilities/utility/pairs/pairs.pair/const_first_const_second.pass.cpp b/libcxx/test/std/utilities/utility/pairs/pairs.pair/const_first_const_second.pass.cpp index fcaa44849cb94..e147d75585684 100644 --- a/libcxx/test/std/utilities/utility/pairs/pairs.pair/const_first_const_second.pass.cpp +++ b/libcxx/test/std/utilities/utility/pairs/pairs.pair/const_first_const_second.pass.cpp @@ -46,7 +46,7 @@ void test_sfinae() { static_assert(test_convertible() == CanConvert, ""); } -int main() +int main(int, char**) { { typedef std::pair P; @@ -94,4 +94,6 @@ int main() static_assert(p.second == 10, ""); } #endif + + return 0; } diff --git a/libcxx/test/std/utilities/utility/pairs/pairs.pair/const_first_const_second_cxx03.pass.cpp b/libcxx/test/std/utilities/utility/pairs/pairs.pair/const_first_const_second_cxx03.pass.cpp index 4759303d663ce..880179723fbd2 100644 --- a/libcxx/test/std/utilities/utility/pairs/pairs.pair/const_first_const_second_cxx03.pass.cpp +++ b/libcxx/test/std/utilities/utility/pairs/pairs.pair/const_first_const_second_cxx03.pass.cpp @@ -24,7 +24,7 @@ class A bool operator==(const A& a) const {return data_ == a.data_;} }; -int main() +int main(int, char**) { { typedef std::pair P; @@ -38,4 +38,6 @@ int main() assert(p.first == A(1)); assert(p.second == 2); } + + return 0; } diff --git a/libcxx/test/std/utilities/utility/pairs/pairs.pair/const_pair_U_V.pass.cpp b/libcxx/test/std/utilities/utility/pairs/pairs.pair/const_pair_U_V.pass.cpp index c9c733d8cbec2..ce1e86c1a8bb2 100644 --- a/libcxx/test/std/utilities/utility/pairs/pairs.pair/const_pair_U_V.pass.cpp +++ b/libcxx/test/std/utilities/utility/pairs/pairs.pair/const_pair_U_V.pass.cpp @@ -53,7 +53,7 @@ struct ImplicitT { int value; }; -int main() +int main(int, char**) { { typedef std::pair P1; @@ -177,4 +177,6 @@ int main() static_assert(p2.second.value == 101, ""); } #endif + + return 0; } diff --git a/libcxx/test/std/utilities/utility/pairs/pairs.pair/const_pair_U_V_cxx03.pass.cpp b/libcxx/test/std/utilities/utility/pairs/pairs.pair/const_pair_U_V_cxx03.pass.cpp index 8a3fca758ebce..9f6498806f31a 100644 --- a/libcxx/test/std/utilities/utility/pairs/pairs.pair/const_pair_U_V_cxx03.pass.cpp +++ b/libcxx/test/std/utilities/utility/pairs/pairs.pair/const_pair_U_V_cxx03.pass.cpp @@ -15,7 +15,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::pair P1; @@ -25,4 +25,6 @@ int main() assert(p2.first == 3); assert(p2.second == 4); } + + return 0; } diff --git a/libcxx/test/std/utilities/utility/pairs/pairs.pair/copy_ctor.pass.cpp b/libcxx/test/std/utilities/utility/pairs/pairs.pair/copy_ctor.pass.cpp index bee96000e52d9..81a32901abe6c 100644 --- a/libcxx/test/std/utilities/utility/pairs/pairs.pair/copy_ctor.pass.cpp +++ b/libcxx/test/std/utilities/utility/pairs/pairs.pair/copy_ctor.pass.cpp @@ -17,7 +17,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { { typedef std::pair P1; @@ -35,4 +35,6 @@ int main() static_assert(p2.second == 4, ""); } #endif + + return 0; } diff --git a/libcxx/test/std/utilities/utility/pairs/pairs.pair/default-sfinae.pass.cpp b/libcxx/test/std/utilities/utility/pairs/pairs.pair/default-sfinae.pass.cpp index b3a248c886298..70557aa923cd2 100644 --- a/libcxx/test/std/utilities/utility/pairs/pairs.pair/default-sfinae.pass.cpp +++ b/libcxx/test/std/utilities/utility/pairs/pairs.pair/default-sfinae.pass.cpp @@ -139,7 +139,7 @@ void test_illformed_default() } -int main() +int main(int, char**) { { // Check that pair can still be used even if @@ -160,4 +160,6 @@ int main() test_is_default_constructible(); test_is_default_constructible>(); } + + return 0; } diff --git a/libcxx/test/std/utilities/utility/pairs/pairs.pair/default.pass.cpp b/libcxx/test/std/utilities/utility/pairs/pairs.pair/default.pass.cpp index 9a07814b12379..dc1f37b666b88 100644 --- a/libcxx/test/std/utilities/utility/pairs/pairs.pair/default.pass.cpp +++ b/libcxx/test/std/utilities/utility/pairs/pairs.pair/default.pass.cpp @@ -28,7 +28,7 @@ #include "test_macros.h" #include "archetypes.hpp" -int main() +int main(int, char**) { { typedef std::pair P; @@ -51,4 +51,6 @@ int main() static_assert(!std::is_default_constructible::value, ""); } #endif + + return 0; } diff --git a/libcxx/test/std/utilities/utility/pairs/pairs.pair/dtor.pass.cpp b/libcxx/test/std/utilities/utility/pairs/pairs.pair/dtor.pass.cpp index df9cbc757567f..268ec4294c7f3 100644 --- a/libcxx/test/std/utilities/utility/pairs/pairs.pair/dtor.pass.cpp +++ b/libcxx/test/std/utilities/utility/pairs/pairs.pair/dtor.pass.cpp @@ -26,10 +26,12 @@ #include "test_macros.h" -int main() +int main(int, char**) { static_assert((std::is_trivially_destructible< std::pair >::value), ""); static_assert((!std::is_trivially_destructible< std::pair >::value), ""); + + return 0; } diff --git a/libcxx/test/std/utilities/utility/pairs/pairs.pair/implicit_deduction_guides.pass.cpp b/libcxx/test/std/utilities/utility/pairs/pairs.pair/implicit_deduction_guides.pass.cpp index 4b7529388cdc6..ca5a728844e61 100644 --- a/libcxx/test/std/utilities/utility/pairs/pairs.pair/implicit_deduction_guides.pass.cpp +++ b/libcxx/test/std/utilities/utility/pairs/pairs.pair/implicit_deduction_guides.pass.cpp @@ -39,7 +39,7 @@ // (6) explicit pair(pair const&) -> pair // (7) pair(pair &&) -> pair // (8) explicit pair(pair &&) -> pair -int main() +int main(int, char**) { using E = ExplicitTestTypes::TestType; static_assert(!std::is_convertible::value, ""); @@ -76,4 +76,6 @@ int main() std::pair p1(std::move(p)); ASSERT_SAME_TYPE(decltype(p1), std::pair); } + + return 0; } diff --git a/libcxx/test/std/utilities/utility/pairs/pairs.pair/move_ctor.pass.cpp b/libcxx/test/std/utilities/utility/pairs/pairs.pair/move_ctor.pass.cpp index 92a0aa42b1402..53d81ac7aac78 100644 --- a/libcxx/test/std/utilities/utility/pairs/pairs.pair/move_ctor.pass.cpp +++ b/libcxx/test/std/utilities/utility/pairs/pairs.pair/move_ctor.pass.cpp @@ -25,7 +25,7 @@ struct Dummy { Dummy(Dummy &&) = default; }; -int main() +int main(int, char**) { { typedef std::pair P1; @@ -40,4 +40,6 @@ int main() static_assert(!std::is_copy_constructible

    ::value, ""); static_assert(std::is_move_constructible

    ::value, ""); } + + return 0; } diff --git a/libcxx/test/std/utilities/utility/pairs/pairs.pair/not_constexpr_cxx11.fail.cpp b/libcxx/test/std/utilities/utility/pairs/pairs.pair/not_constexpr_cxx11.fail.cpp index 325499eafaff7..88d0f96493999 100644 --- a/libcxx/test/std/utilities/utility/pairs/pairs.pair/not_constexpr_cxx11.fail.cpp +++ b/libcxx/test/std/utilities/utility/pairs/pairs.pair/not_constexpr_cxx11.fail.cpp @@ -27,7 +27,7 @@ struct ImplicitT { int value; }; -int main() +int main(int, char**) { { using P = std::pair; @@ -53,4 +53,6 @@ int main() constexpr P U_V = {42, 101}; // expected-error {{must be initialized by a constant expression}} constexpr P pair_U_V = other; // expected-error {{must be initialized by a constant expression}} } + + return 0; } diff --git a/libcxx/test/std/utilities/utility/pairs/pairs.pair/piecewise.pass.cpp b/libcxx/test/std/utilities/utility/pairs/pairs.pair/piecewise.pass.cpp index 3c93eeb3dca69..26b02f383ad5b 100644 --- a/libcxx/test/std/utilities/utility/pairs/pairs.pair/piecewise.pass.cpp +++ b/libcxx/test/std/utilities/utility/pairs/pairs.pair/piecewise.pass.cpp @@ -21,7 +21,7 @@ #include -int main() +int main(int, char**) { { typedef std::pair P1; @@ -32,4 +32,6 @@ int main() assert(p3.first == P1(3, nullptr)); assert(p3.second == P2(nullptr, 4)); } + + return 0; } diff --git a/libcxx/test/std/utilities/utility/pairs/pairs.pair/rv_pair_U_V.pass.cpp b/libcxx/test/std/utilities/utility/pairs/pairs.pair/rv_pair_U_V.pass.cpp index b38ca2a3b7266..0e3d9a1cb70bc 100644 --- a/libcxx/test/std/utilities/utility/pairs/pairs.pair/rv_pair_U_V.pass.cpp +++ b/libcxx/test/std/utilities/utility/pairs/pairs.pair/rv_pair_U_V.pass.cpp @@ -63,7 +63,7 @@ struct ImplicitT { int value; }; -int main() +int main(int, char**) { { typedef std::pair, int> P1; @@ -173,4 +173,6 @@ int main() static_assert(p2.second.value == 43, ""); } #endif + + return 0; } diff --git a/libcxx/test/std/utilities/utility/pairs/pairs.pair/special_member_generation_test.pass.cpp b/libcxx/test/std/utilities/utility/pairs/pairs.pair/special_member_generation_test.pass.cpp index 48ea5fac6e948..db174e829bd4d 100644 --- a/libcxx/test/std/utilities/utility/pairs/pairs.pair/special_member_generation_test.pass.cpp +++ b/libcxx/test/std/utilities/utility/pairs/pairs.pair/special_member_generation_test.pass.cpp @@ -120,7 +120,9 @@ void test_assignment_operator_exists() { } } -int main() { +int main(int, char**) { test_constructors_exist(); test_assignment_operator_exists(); + + return 0; } diff --git a/libcxx/test/std/utilities/utility/pairs/pairs.pair/swap.pass.cpp b/libcxx/test/std/utilities/utility/pairs/pairs.pair/swap.pass.cpp index 58a5c29326a7b..faaae1bc255aa 100644 --- a/libcxx/test/std/utilities/utility/pairs/pairs.pair/swap.pass.cpp +++ b/libcxx/test/std/utilities/utility/pairs/pairs.pair/swap.pass.cpp @@ -24,7 +24,7 @@ struct S { bool operator==(int x) const { return i == x; } }; -int main() +int main(int, char**) { { typedef std::pair P1; @@ -46,4 +46,6 @@ int main() assert(p2.first == 3); assert(p2.second == 4); } + + return 0; } diff --git a/libcxx/test/std/utilities/utility/pairs/pairs.pair/trivial_copy_move.pass.cpp b/libcxx/test/std/utilities/utility/pairs/pairs.pair/trivial_copy_move.pass.cpp index e4b444a349f47..6841f28655388 100644 --- a/libcxx/test/std/utilities/utility/pairs/pairs.pair/trivial_copy_move.pass.cpp +++ b/libcxx/test/std/utilities/utility/pairs/pairs.pair/trivial_copy_move.pass.cpp @@ -26,7 +26,7 @@ struct Dummy { Dummy(Dummy &&) = default; }; -int main() +int main(int, char**) { typedef std::pair P; { @@ -52,4 +52,6 @@ int main() #endif } #endif + + return 0; } diff --git a/libcxx/test/std/utilities/utility/pairs/pairs.pair/types.pass.cpp b/libcxx/test/std/utilities/utility/pairs/pairs.pair/types.pass.cpp index abda1d8c3b9c2..25108de5bbeef 100644 --- a/libcxx/test/std/utilities/utility/pairs/pairs.pair/types.pass.cpp +++ b/libcxx/test/std/utilities/utility/pairs/pairs.pair/types.pass.cpp @@ -17,9 +17,11 @@ #include #include -int main() +int main(int, char**) { typedef std::pair P; static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); + + return 0; } diff --git a/libcxx/test/std/utilities/utility/pairs/pairs.spec/comparison.pass.cpp b/libcxx/test/std/utilities/utility/pairs/pairs.spec/comparison.pass.cpp index 3b994dfd4dfeb..12d6ab019170d 100644 --- a/libcxx/test/std/utilities/utility/pairs/pairs.spec/comparison.pass.cpp +++ b/libcxx/test/std/utilities/utility/pairs/pairs.spec/comparison.pass.cpp @@ -23,7 +23,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { { typedef std::pair P; @@ -94,4 +94,6 @@ int main() static_assert( (p1 >= p2), ""); } #endif + + return 0; } diff --git a/libcxx/test/std/utilities/utility/pairs/pairs.spec/make_pair.pass.cpp b/libcxx/test/std/utilities/utility/pairs/pairs.spec/make_pair.pass.cpp index 3586243f8bacf..dff26e57f0b35 100644 --- a/libcxx/test/std/utilities/utility/pairs/pairs.spec/make_pair.pass.cpp +++ b/libcxx/test/std/utilities/utility/pairs/pairs.spec/make_pair.pass.cpp @@ -17,7 +17,7 @@ #include "test_macros.h" -int main() +int main(int, char**) { { typedef std::pair P1; @@ -49,4 +49,6 @@ int main() } #endif + + return 0; } diff --git a/libcxx/test/std/utilities/utility/pairs/pairs.spec/non_member_swap.pass.cpp b/libcxx/test/std/utilities/utility/pairs/pairs.spec/non_member_swap.pass.cpp index 62fa942479469..87432767217b7 100644 --- a/libcxx/test/std/utilities/utility/pairs/pairs.spec/non_member_swap.pass.cpp +++ b/libcxx/test/std/utilities/utility/pairs/pairs.spec/non_member_swap.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() +int main(int, char**) { { typedef std::pair P1; @@ -28,4 +28,6 @@ int main() assert(p2.first == 3); assert(p2.second == 4); } + + return 0; } diff --git a/libcxx/test/std/utilities/utility/synopsis.pass.cpp b/libcxx/test/std/utilities/utility/synopsis.pass.cpp index 90c5e32186d18..5a703e1b2e580 100644 --- a/libcxx/test/std/utilities/utility/synopsis.pass.cpp +++ b/libcxx/test/std/utilities/utility/synopsis.pass.cpp @@ -13,9 +13,11 @@ #include -int main() +int main(int, char**) { std::initializer_list x; (void)x; + + return 0; } diff --git a/libcxx/test/std/utilities/utility/utility.inplace/inplace.pass.cpp b/libcxx/test/std/utilities/utility/utility.inplace/inplace.pass.cpp index 53fa3cf66555f..155b2c0eb215c 100644 --- a/libcxx/test/std/utilities/utility/utility.inplace/inplace.pass.cpp +++ b/libcxx/test/std/utilities/utility/utility.inplace/inplace.pass.cpp @@ -42,7 +42,7 @@ constexpr bool check_tag(Up) { && std::is_same::value; } -int main() { +int main(int, char**) { // test in_place_t { using T = std::in_place_t; @@ -70,4 +70,6 @@ int main() { static_assert(check_tag(std::in_place_index<1>)); static_assert(check_tag(std::in_place_index(-1)>)); } + + return 0; } diff --git a/libcxx/test/std/utilities/utility/utility.swap/swap.pass.cpp b/libcxx/test/std/utilities/utility/utility.swap/swap.pass.cpp index 9dda5a42c1f7e..f52af4cb896e9 100644 --- a/libcxx/test/std/utilities/utility/utility.swap/swap.pass.cpp +++ b/libcxx/test/std/utilities/utility/utility.swap/swap.pass.cpp @@ -62,7 +62,7 @@ constexpr bool can_swap() { } #endif -int main() +int main(int, char**) { { @@ -99,4 +99,6 @@ int main() static_assert(noexcept(std::swap(nm, nm)), ""); } #endif + + return 0; } diff --git a/libcxx/test/std/utilities/utility/utility.swap/swap_array.pass.cpp b/libcxx/test/std/utilities/utility/utility.swap/swap_array.pass.cpp index 202e8d33f2363..015e85a013571 100644 --- a/libcxx/test/std/utilities/utility/utility.swap/swap_array.pass.cpp +++ b/libcxx/test/std/utilities/utility/utility.swap/swap_array.pass.cpp @@ -54,7 +54,7 @@ constexpr bool can_swap() { #endif -int main() +int main(int, char**) { { int i[3] = {1, 2, 3}; @@ -97,4 +97,6 @@ int main() static_assert(noexcept(std::swap(ma, ma)), ""); } #endif + + return 0; } diff --git a/libcxx/test/std/utilities/variant/variant.bad_variant_access/bad_variant_access.pass.cpp b/libcxx/test/std/utilities/variant/variant.bad_variant_access/bad_variant_access.pass.cpp index 1585e1745baeb..4cb79a22c7ae7 100644 --- a/libcxx/test/std/utilities/variant/variant.bad_variant_access/bad_variant_access.pass.cpp +++ b/libcxx/test/std/utilities/variant/variant.bad_variant_access/bad_variant_access.pass.cpp @@ -9,13 +9,7 @@ // UNSUPPORTED: c++98, c++03, c++11, c++14 -// XFAIL: availability=macosx10.13 -// XFAIL: availability=macosx10.12 -// XFAIL: availability=macosx10.11 -// XFAIL: availability=macosx10.10 -// XFAIL: availability=macosx10.9 -// XFAIL: availability=macosx10.8 -// XFAIL: availability=macosx10.7 +// XFAIL: dylib-has-no-bad_variant_access // @@ -35,11 +29,13 @@ #include #include -int main() { +int main(int, char**) { static_assert(std::is_base_of::value, ""); static_assert(noexcept(std::bad_variant_access{}), "must be noexcept"); static_assert(noexcept(std::bad_variant_access{}.what()), "must be noexcept"); std::bad_variant_access ex; assert(ex.what()); + + return 0; } diff --git a/libcxx/test/std/utilities/variant/variant.general/nothing_to_do.pass.cpp b/libcxx/test/std/utilities/variant/variant.general/nothing_to_do.pass.cpp index 0c118a0f5f525..8002e55766c9c 100644 --- a/libcxx/test/std/utilities/variant/variant.general/nothing_to_do.pass.cpp +++ b/libcxx/test/std/utilities/variant/variant.general/nothing_to_do.pass.cpp @@ -7,4 +7,6 @@ // //===----------------------------------------------------------------------===// -int main() {} +int main(int, char**) { + return 0; +} diff --git a/libcxx/test/std/utilities/variant/variant.get/get_if_index.pass.cpp b/libcxx/test/std/utilities/variant/variant.get/get_if_index.pass.cpp index 505a8cb8e6572..5210c5f9d8434 100644 --- a/libcxx/test/std/utilities/variant/variant.get/get_if_index.pass.cpp +++ b/libcxx/test/std/utilities/variant/variant.get/get_if_index.pass.cpp @@ -125,7 +125,9 @@ void test_get_if() { #endif } -int main() { +int main(int, char**) { test_const_get_if(); test_get_if(); + + return 0; } diff --git a/libcxx/test/std/utilities/variant/variant.get/get_if_type.pass.cpp b/libcxx/test/std/utilities/variant/variant.get/get_if_type.pass.cpp index 3cb0fc7054e5b..e7c9671f95c59 100644 --- a/libcxx/test/std/utilities/variant/variant.get/get_if_type.pass.cpp +++ b/libcxx/test/std/utilities/variant/variant.get/get_if_type.pass.cpp @@ -123,7 +123,9 @@ void test_get_if() { #endif } -int main() { +int main(int, char**) { test_const_get_if(); test_get_if(); + + return 0; } diff --git a/libcxx/test/std/utilities/variant/variant.get/get_index.pass.cpp b/libcxx/test/std/utilities/variant/variant.get/get_index.pass.cpp index a5a629adb9617..4b04929a6fcef 100644 --- a/libcxx/test/std/utilities/variant/variant.get/get_index.pass.cpp +++ b/libcxx/test/std/utilities/variant/variant.get/get_index.pass.cpp @@ -9,13 +9,7 @@ // UNSUPPORTED: c++98, c++03, c++11, c++14 -// XFAIL: availability=macosx10.13 -// XFAIL: availability=macosx10.12 -// XFAIL: availability=macosx10.11 -// XFAIL: availability=macosx10.10 -// XFAIL: availability=macosx10.9 -// XFAIL: availability=macosx10.8 -// XFAIL: availability=macosx10.7 +// XFAIL: dylib-has-no-bad_variant_access && !libcpp-no-exceptions // @@ -285,10 +279,12 @@ void test_throws_for_all_value_categories() { #endif } -int main() { +int main(int, char**) { test_const_lvalue_get(); test_lvalue_get(); test_rvalue_get(); test_const_rvalue_get(); test_throws_for_all_value_categories(); + + return 0; } diff --git a/libcxx/test/std/utilities/variant/variant.get/get_type.pass.cpp b/libcxx/test/std/utilities/variant/variant.get/get_type.pass.cpp index b4cae10270563..316213ed2fa26 100644 --- a/libcxx/test/std/utilities/variant/variant.get/get_type.pass.cpp +++ b/libcxx/test/std/utilities/variant/variant.get/get_type.pass.cpp @@ -9,13 +9,7 @@ // UNSUPPORTED: c++98, c++03, c++11, c++14 -// XFAIL: availability=macosx10.13 -// XFAIL: availability=macosx10.12 -// XFAIL: availability=macosx10.11 -// XFAIL: availability=macosx10.10 -// XFAIL: availability=macosx10.9 -// XFAIL: availability=macosx10.8 -// XFAIL: availability=macosx10.7 +// XFAIL: dylib-has-no-bad_variant_access && !libcpp-no-exceptions // @@ -285,10 +279,12 @@ void test_throws_for_all_value_categories() { #endif } -int main() { +int main(int, char**) { test_const_lvalue_get(); test_lvalue_get(); test_rvalue_get(); test_const_rvalue_get(); test_throws_for_all_value_categories(); + + return 0; } diff --git a/libcxx/test/std/utilities/variant/variant.get/holds_alternative.pass.cpp b/libcxx/test/std/utilities/variant/variant.get/holds_alternative.pass.cpp index 3e9cfbe9c471d..b37462069df4f 100644 --- a/libcxx/test/std/utilities/variant/variant.get/holds_alternative.pass.cpp +++ b/libcxx/test/std/utilities/variant/variant.get/holds_alternative.pass.cpp @@ -17,7 +17,7 @@ #include "test_macros.h" #include -int main() { +int main(int, char**) { { using V = std::variant; constexpr V v; @@ -34,4 +34,6 @@ int main() { const V v; ASSERT_NOEXCEPT(std::holds_alternative(v)); } + + return 0; } diff --git a/libcxx/test/std/utilities/variant/variant.hash/enabled_hash.pass.cpp b/libcxx/test/std/utilities/variant/variant.hash/enabled_hash.pass.cpp index 404f3e7e5b4f5..7e9ffbfa06ebe 100644 --- a/libcxx/test/std/utilities/variant/variant.hash/enabled_hash.pass.cpp +++ b/libcxx/test/std/utilities/variant/variant.hash/enabled_hash.pass.cpp @@ -17,6 +17,8 @@ #include "poisoned_hash_helper.hpp" -int main() { +int main(int, char**) { test_library_hash_specializations_available(); + + return 0; } diff --git a/libcxx/test/std/utilities/variant/variant.hash/hash.pass.cpp b/libcxx/test/std/utilities/variant/variant.hash/hash.pass.cpp index 5acf168ad8c7a..edda8d21a2475 100644 --- a/libcxx/test/std/utilities/variant/variant.hash/hash.pass.cpp +++ b/libcxx/test/std/utilities/variant/variant.hash/hash.pass.cpp @@ -150,9 +150,11 @@ void test_hash_variant_enabled() { } } -int main() { +int main(int, char**) { test_hash_variant(); test_hash_variant_duplicate_elements(); test_hash_monostate(); test_hash_variant_enabled(); + + return 0; } diff --git a/libcxx/test/std/utilities/variant/variant.helpers/variant_alternative.fail.cpp b/libcxx/test/std/utilities/variant/variant.helpers/variant_alternative.fail.cpp index f7db0d86bee3b..48d5e14e260fe 100644 --- a/libcxx/test/std/utilities/variant/variant.helpers/variant_alternative.fail.cpp +++ b/libcxx/test/std/utilities/variant/variant.helpers/variant_alternative.fail.cpp @@ -25,7 +25,9 @@ #include #include -int main() { +int main(int, char**) { using V = std::variant; std::variant_alternative<4, V>::type foo; // expected-error@variant:* {{Index out of bounds in std::variant_alternative<>}} + + return 0; } diff --git a/libcxx/test/std/utilities/variant/variant.helpers/variant_alternative.pass.cpp b/libcxx/test/std/utilities/variant/variant.helpers/variant_alternative.pass.cpp index 841f65cb127dd..7db07b6b0d4fe 100644 --- a/libcxx/test/std/utilities/variant/variant.helpers/variant_alternative.pass.cpp +++ b/libcxx/test/std/utilities/variant/variant.helpers/variant_alternative.pass.cpp @@ -55,7 +55,7 @@ template void test() { ""); } -int main() { +int main(int, char**) { { using V = std::variant; test(); @@ -73,4 +73,6 @@ int main() { test(); } #endif + + return 0; } diff --git a/libcxx/test/std/utilities/variant/variant.helpers/variant_size.pass.cpp b/libcxx/test/std/utilities/variant/variant.helpers/variant_size.pass.cpp index f7e200b241a5a..fb027fb6380a9 100644 --- a/libcxx/test/std/utilities/variant/variant.helpers/variant_size.pass.cpp +++ b/libcxx/test/std/utilities/variant/variant.helpers/variant_size.pass.cpp @@ -36,8 +36,10 @@ template void test() { ""); }; -int main() { +int main(int, char**) { test, 0>(); test, 1>(); test, 4>(); + + return 0; } diff --git a/libcxx/test/std/utilities/variant/variant.monostate.relops/relops.pass.cpp b/libcxx/test/std/utilities/variant/variant.monostate.relops/relops.pass.cpp index 2df4b2bacf5c8..255f6d0342ec7 100644 --- a/libcxx/test/std/utilities/variant/variant.monostate.relops/relops.pass.cpp +++ b/libcxx/test/std/utilities/variant/variant.monostate.relops/relops.pass.cpp @@ -23,7 +23,7 @@ #include #include -int main() { +int main(int, char**) { using M = std::monostate; constexpr M m1{}; constexpr M m2{}; @@ -51,4 +51,6 @@ int main() { static_assert((m1 != m2) == false, ""); ASSERT_NOEXCEPT(m1 != m2); } + + return 0; } diff --git a/libcxx/test/std/utilities/variant/variant.monostate/monostate.pass.cpp b/libcxx/test/std/utilities/variant/variant.monostate/monostate.pass.cpp index 1d7bcaca4db56..1ba75a7790794 100644 --- a/libcxx/test/std/utilities/variant/variant.monostate/monostate.pass.cpp +++ b/libcxx/test/std/utilities/variant/variant.monostate/monostate.pass.cpp @@ -16,7 +16,7 @@ #include #include -int main() { +int main(int, char**) { using M = std::monostate; static_assert(std::is_trivially_default_constructible::value, ""); static_assert(std::is_trivially_copy_constructible::value, ""); @@ -24,4 +24,6 @@ int main() { static_assert(std::is_trivially_destructible::value, ""); constexpr M m{}; ((void)m); + + return 0; } diff --git a/libcxx/test/std/utilities/variant/variant.relops/relops.pass.cpp b/libcxx/test/std/utilities/variant/variant.relops/relops.pass.cpp index 1950b5a383da5..ed32215ffdcd8 100644 --- a/libcxx/test/std/utilities/variant/variant.relops/relops.pass.cpp +++ b/libcxx/test/std/utilities/variant/variant.relops/relops.pass.cpp @@ -269,7 +269,9 @@ void test_relational() { #endif } -int main() { +int main(int, char**) { test_equality(); test_relational(); + + return 0; } diff --git a/libcxx/test/std/utilities/variant/variant.relops/relops_bool_conv.fail.cpp b/libcxx/test/std/utilities/variant/variant.relops/relops_bool_conv.fail.cpp index d03a6b5d5b128..e46893465bc07 100644 --- a/libcxx/test/std/utilities/variant/variant.relops/relops_bool_conv.fail.cpp +++ b/libcxx/test/std/utilities/variant/variant.relops/relops_bool_conv.fail.cpp @@ -72,7 +72,7 @@ inline constexpr MyBoolExplicit operator>=(const ComparesToMyBoolExplicit& LHS, } -int main() { +int main(int, char**) { using V = std::variant; V v1(42); V v2(101); @@ -84,4 +84,6 @@ int main() { (void)(v1 <= v2); // expected-note {{here}} (void)(v1 > v2); // expected-note {{here}} (void)(v1 >= v2); // expected-note {{here}} + + return 0; } diff --git a/libcxx/test/std/utilities/variant/variant.synopsis/variant_npos.pass.cpp b/libcxx/test/std/utilities/variant/variant.synopsis/variant_npos.pass.cpp index aadda7eacbb44..310b6980c1adb 100644 --- a/libcxx/test/std/utilities/variant/variant.synopsis/variant_npos.pass.cpp +++ b/libcxx/test/std/utilities/variant/variant.synopsis/variant_npos.pass.cpp @@ -15,6 +15,8 @@ #include -int main() { +int main(int, char**) { static_assert(std::variant_npos == static_cast(-1), ""); + + return 0; } diff --git a/libcxx/test/std/utilities/variant/variant.variant/variant.assign/T.pass.cpp b/libcxx/test/std/utilities/variant/variant.variant/variant.assign/T.pass.cpp index 67deb3f2c62f3..02498b1acdeb6 100644 --- a/libcxx/test/std/utilities/variant/variant.variant/variant.assign/T.pass.cpp +++ b/libcxx/test/std/utilities/variant/variant.variant/variant.assign/T.pass.cpp @@ -9,13 +9,7 @@ // UNSUPPORTED: c++98, c++03, c++11, c++14 -// XFAIL: availability=macosx10.13 -// XFAIL: availability=macosx10.12 -// XFAIL: availability=macosx10.11 -// XFAIL: availability=macosx10.10 -// XFAIL: availability=macosx10.9 -// XFAIL: availability=macosx10.8 -// XFAIL: availability=macosx10.7 +// XFAIL: dylib-has-no-bad_variant_access && !libcpp-no-exceptions // @@ -254,10 +248,12 @@ void test_T_assignment_performs_assignment() { #endif // TEST_HAS_NO_EXCEPTIONS } -int main() { +int main(int, char**) { test_T_assignment_basic(); test_T_assignment_performs_construction(); test_T_assignment_performs_assignment(); test_T_assignment_noexcept(); test_T_assignment_sfinae(); + + return 0; } diff --git a/libcxx/test/std/utilities/variant/variant.variant/variant.assign/copy.pass.cpp b/libcxx/test/std/utilities/variant/variant.variant/variant.assign/copy.pass.cpp index 6a59989ddad11..820d81e71e63e 100644 --- a/libcxx/test/std/utilities/variant/variant.variant/variant.assign/copy.pass.cpp +++ b/libcxx/test/std/utilities/variant/variant.variant/variant.assign/copy.pass.cpp @@ -13,13 +13,7 @@ // XFAIL: clang-3.5, clang-3.6, clang-3.7, clang-3.8 // XFAIL: apple-clang-6, apple-clang-7, apple-clang-8.0 -// XFAIL: availability=macosx10.13 -// XFAIL: availability=macosx10.12 -// XFAIL: availability=macosx10.11 -// XFAIL: availability=macosx10.10 -// XFAIL: availability=macosx10.9 -// XFAIL: availability=macosx10.8 -// XFAIL: availability=macosx10.7 +// XFAIL: dylib-has-no-bad_variant_access && !libcpp-no-exceptions // @@ -590,7 +584,7 @@ void test_constexpr_copy_assignment() { #endif // > C++17 } -int main() { +int main(int, char**) { test_copy_assignment_empty_empty(); test_copy_assignment_non_empty_empty(); test_copy_assignment_empty_non_empty(); @@ -599,4 +593,6 @@ int main() { test_copy_assignment_sfinae(); test_copy_assignment_not_noexcept(); test_constexpr_copy_assignment(); + + return 0; } diff --git a/libcxx/test/std/utilities/variant/variant.variant/variant.assign/move.pass.cpp b/libcxx/test/std/utilities/variant/variant.variant/variant.assign/move.pass.cpp index 833883d294fb8..990e10c0f0969 100644 --- a/libcxx/test/std/utilities/variant/variant.variant/variant.assign/move.pass.cpp +++ b/libcxx/test/std/utilities/variant/variant.variant/variant.assign/move.pass.cpp @@ -13,13 +13,7 @@ // XFAIL: clang-3.5, clang-3.6, clang-3.7, clang-3.8 // XFAIL: apple-clang-6, apple-clang-7, apple-clang-8.0 -// XFAIL: availability=macosx10.13 -// XFAIL: availability=macosx10.12 -// XFAIL: availability=macosx10.11 -// XFAIL: availability=macosx10.10 -// XFAIL: availability=macosx10.9 -// XFAIL: availability=macosx10.8 -// XFAIL: availability=macosx10.7 +// XFAIL: dylib-has-no-bad_variant_access && !libcpp-no-exceptions // @@ -506,7 +500,7 @@ void test_constexpr_move_assignment() { #endif // > C++17 } -int main() { +int main(int, char**) { test_move_assignment_empty_empty(); test_move_assignment_non_empty_empty(); test_move_assignment_empty_non_empty(); @@ -515,4 +509,6 @@ int main() { test_move_assignment_sfinae(); test_move_assignment_noexcept(); test_constexpr_move_assignment(); + + return 0; } diff --git a/libcxx/test/std/utilities/variant/variant.variant/variant.ctor/T.pass.cpp b/libcxx/test/std/utilities/variant/variant.variant/variant.ctor/T.pass.cpp index 7357b9b56c0ed..73bd2c6283d30 100644 --- a/libcxx/test/std/utilities/variant/variant.variant/variant.ctor/T.pass.cpp +++ b/libcxx/test/std/utilities/variant/variant.variant/variant.ctor/T.pass.cpp @@ -8,17 +8,10 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++98, c++03, c++11, c++14 +// XFAIL: dylib-has-no-bad_variant_access && !libcpp-no-exceptions // -// XFAIL: availability=macosx10.13 -// XFAIL: availability=macosx10.12 -// XFAIL: availability=macosx10.11 -// XFAIL: availability=macosx10.10 -// XFAIL: availability=macosx10.9 -// XFAIL: availability=macosx10.8 -// XFAIL: availability=macosx10.7 - // template class variant; // template constexpr variant(T&&) noexcept(see below); @@ -126,8 +119,10 @@ void test_T_ctor_basic() { #endif } -int main() { +int main(int, char**) { test_T_ctor_basic(); test_T_ctor_noexcept(); test_T_ctor_sfinae(); + + return 0; } diff --git a/libcxx/test/std/utilities/variant/variant.variant/variant.ctor/copy.pass.cpp b/libcxx/test/std/utilities/variant/variant.variant/variant.ctor/copy.pass.cpp index b6471052f64c8..4cd210d3ddd7e 100644 --- a/libcxx/test/std/utilities/variant/variant.variant/variant.ctor/copy.pass.cpp +++ b/libcxx/test/std/utilities/variant/variant.variant/variant.ctor/copy.pass.cpp @@ -9,13 +9,7 @@ // UNSUPPORTED: c++98, c++03, c++11, c++14 -// XFAIL: availability=macosx10.13 -// XFAIL: availability=macosx10.12 -// XFAIL: availability=macosx10.11 -// XFAIL: availability=macosx10.10 -// XFAIL: availability=macosx10.9 -// XFAIL: availability=macosx10.8 -// XFAIL: availability=macosx10.7 +// XFAIL: dylib-has-no-bad_variant_access && !libcpp-no-exceptions // @@ -260,7 +254,7 @@ void test_constexpr_copy_ctor() { #endif // > C++17 } -int main() { +int main(int, char**) { test_copy_ctor_basic(); test_copy_ctor_valueless_by_exception(); test_copy_ctor_sfinae(); @@ -274,4 +268,6 @@ int main() { (void) v2; } #endif + + return 0; } diff --git a/libcxx/test/std/utilities/variant/variant.variant/variant.ctor/default.pass.cpp b/libcxx/test/std/utilities/variant/variant.variant/variant.ctor/default.pass.cpp index ec6eb289ba699..579ae4d9fe28c 100644 --- a/libcxx/test/std/utilities/variant/variant.variant/variant.ctor/default.pass.cpp +++ b/libcxx/test/std/utilities/variant/variant.variant/variant.ctor/default.pass.cpp @@ -9,13 +9,7 @@ // UNSUPPORTED: c++98, c++03, c++11, c++14 -// XFAIL: availability=macosx10.13 -// XFAIL: availability=macosx10.12 -// XFAIL: availability=macosx10.11 -// XFAIL: availability=macosx10.10 -// XFAIL: availability=macosx10.9 -// XFAIL: availability=macosx10.8 -// XFAIL: availability=macosx10.7 +// XFAIL: dylib-has-no-bad_variant_access && !libcpp-no-exceptions // @@ -122,9 +116,11 @@ void test_default_ctor_basic() { } } -int main() { +int main(int, char**) { test_default_ctor_basic(); test_default_ctor_sfinae(); test_default_ctor_noexcept(); test_default_ctor_throws(); + + return 0; } diff --git a/libcxx/test/std/utilities/variant/variant.variant/variant.ctor/in_place_index_args.pass.cpp b/libcxx/test/std/utilities/variant/variant.variant/variant.ctor/in_place_index_args.pass.cpp index a268adcea50c0..ac736fb3a4418 100644 --- a/libcxx/test/std/utilities/variant/variant.variant/variant.ctor/in_place_index_args.pass.cpp +++ b/libcxx/test/std/utilities/variant/variant.variant/variant.ctor/in_place_index_args.pass.cpp @@ -9,13 +9,7 @@ // UNSUPPORTED: c++98, c++03, c++11, c++14 -// XFAIL: availability=macosx10.13 -// XFAIL: availability=macosx10.12 -// XFAIL: availability=macosx10.11 -// XFAIL: availability=macosx10.10 -// XFAIL: availability=macosx10.9 -// XFAIL: availability=macosx10.8 -// XFAIL: availability=macosx10.7 +// XFAIL: dylib-has-no-bad_variant_access && !libcpp-no-exceptions // @@ -104,7 +98,9 @@ void test_ctor_basic() { } } -int main() { +int main(int, char**) { test_ctor_basic(); test_ctor_sfinae(); + + return 0; } diff --git a/libcxx/test/std/utilities/variant/variant.variant/variant.ctor/in_place_index_init_list_args.pass.cpp b/libcxx/test/std/utilities/variant/variant.variant/variant.ctor/in_place_index_init_list_args.pass.cpp index 9c7e3faf86272..179b6635309d0 100644 --- a/libcxx/test/std/utilities/variant/variant.variant/variant.ctor/in_place_index_init_list_args.pass.cpp +++ b/libcxx/test/std/utilities/variant/variant.variant/variant.ctor/in_place_index_init_list_args.pass.cpp @@ -8,17 +8,10 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++98, c++03, c++11, c++14 +// XFAIL: dylib-has-no-bad_variant_access && !libcpp-no-exceptions // -// XFAIL: availability=macosx10.13 -// XFAIL: availability=macosx10.12 -// XFAIL: availability=macosx10.11 -// XFAIL: availability=macosx10.10 -// XFAIL: availability=macosx10.9 -// XFAIL: availability=macosx10.8 -// XFAIL: availability=macosx10.7 - // template class variant; // template @@ -110,7 +103,9 @@ void test_ctor_basic() { } } -int main() { +int main(int, char**) { test_ctor_basic(); test_ctor_sfinae(); + + return 0; } diff --git a/libcxx/test/std/utilities/variant/variant.variant/variant.ctor/in_place_type_args.pass.cpp b/libcxx/test/std/utilities/variant/variant.variant/variant.ctor/in_place_type_args.pass.cpp index 05b2a29ce8f25..430ddca3c69c9 100644 --- a/libcxx/test/std/utilities/variant/variant.variant/variant.ctor/in_place_type_args.pass.cpp +++ b/libcxx/test/std/utilities/variant/variant.variant/variant.ctor/in_place_type_args.pass.cpp @@ -9,13 +9,7 @@ // UNSUPPORTED: c++98, c++03, c++11, c++14 -// XFAIL: availability=macosx10.13 -// XFAIL: availability=macosx10.12 -// XFAIL: availability=macosx10.11 -// XFAIL: availability=macosx10.10 -// XFAIL: availability=macosx10.9 -// XFAIL: availability=macosx10.8 -// XFAIL: availability=macosx10.7 +// XFAIL: dylib-has-no-bad_variant_access && !libcpp-no-exceptions // @@ -114,7 +108,9 @@ void test_ctor_basic() { } } -int main() { +int main(int, char**) { test_ctor_basic(); test_ctor_sfinae(); + + return 0; } diff --git a/libcxx/test/std/utilities/variant/variant.variant/variant.ctor/in_place_type_init_list_args.pass.cpp b/libcxx/test/std/utilities/variant/variant.variant/variant.ctor/in_place_type_init_list_args.pass.cpp index c3f3e58d3464a..46dab74e810f9 100644 --- a/libcxx/test/std/utilities/variant/variant.variant/variant.ctor/in_place_type_init_list_args.pass.cpp +++ b/libcxx/test/std/utilities/variant/variant.variant/variant.ctor/in_place_type_init_list_args.pass.cpp @@ -8,17 +8,10 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++98, c++03, c++11, c++14 +// XFAIL: dylib-has-no-bad_variant_access && !libcpp-no-exceptions // -// XFAIL: availability=macosx10.13 -// XFAIL: availability=macosx10.12 -// XFAIL: availability=macosx10.11 -// XFAIL: availability=macosx10.10 -// XFAIL: availability=macosx10.9 -// XFAIL: availability=macosx10.8 -// XFAIL: availability=macosx10.7 - // template class variant; // template @@ -111,7 +104,9 @@ void test_ctor_basic() { } } -int main() { +int main(int, char**) { test_ctor_basic(); test_ctor_sfinae(); + + return 0; } diff --git a/libcxx/test/std/utilities/variant/variant.variant/variant.ctor/move.pass.cpp b/libcxx/test/std/utilities/variant/variant.variant/variant.ctor/move.pass.cpp index ecb4a72075531..d06b638e69044 100644 --- a/libcxx/test/std/utilities/variant/variant.variant/variant.ctor/move.pass.cpp +++ b/libcxx/test/std/utilities/variant/variant.variant/variant.ctor/move.pass.cpp @@ -9,13 +9,7 @@ // UNSUPPORTED: c++98, c++03, c++11, c++14 -// XFAIL: availability=macosx10.13 -// XFAIL: availability=macosx10.12 -// XFAIL: availability=macosx10.11 -// XFAIL: availability=macosx10.10 -// XFAIL: availability=macosx10.9 -// XFAIL: availability=macosx10.8 -// XFAIL: availability=macosx10.7 +// XFAIL: dylib-has-no-bad_variant_access && !libcpp-no-exceptions // @@ -331,10 +325,12 @@ void test_constexpr_move_ctor() { #endif // > C++17 } -int main() { +int main(int, char**) { test_move_ctor_basic(); test_move_ctor_valueless_by_exception(); test_move_noexcept(); test_move_ctor_sfinae(); test_constexpr_move_ctor(); + + return 0; } diff --git a/libcxx/test/std/utilities/variant/variant.variant/variant.dtor/dtor.pass.cpp b/libcxx/test/std/utilities/variant/variant.variant/variant.dtor/dtor.pass.cpp index 8ced5321b69b2..b26ab0c29bf1a 100644 --- a/libcxx/test/std/utilities/variant/variant.variant/variant.dtor/dtor.pass.cpp +++ b/libcxx/test/std/utilities/variant/variant.variant/variant.dtor/dtor.pass.cpp @@ -44,7 +44,7 @@ struct TDtor { static_assert(!std::is_trivially_copy_constructible::value, ""); static_assert(std::is_trivially_destructible::value, ""); -int main() { +int main(int, char**) { { using V = std::variant; static_assert(std::is_trivially_destructible::value, ""); @@ -71,4 +71,6 @@ int main() { assert(NonTDtor::count == 0); assert(NonTDtor1::count == 1); } + + return 0; } diff --git a/libcxx/test/std/utilities/variant/variant.variant/variant.mod/emplace_index_args.pass.cpp b/libcxx/test/std/utilities/variant/variant.variant/variant.mod/emplace_index_args.pass.cpp index ea84ac940724f..95f16ac2dd8e3 100644 --- a/libcxx/test/std/utilities/variant/variant.variant/variant.mod/emplace_index_args.pass.cpp +++ b/libcxx/test/std/utilities/variant/variant.variant/variant.mod/emplace_index_args.pass.cpp @@ -9,13 +9,7 @@ // UNSUPPORTED: c++98, c++03, c++11, c++14 -// XFAIL: availability=macosx10.13 -// XFAIL: availability=macosx10.12 -// XFAIL: availability=macosx10.11 -// XFAIL: availability=macosx10.10 -// XFAIL: availability=macosx10.9 -// XFAIL: availability=macosx10.8 -// XFAIL: availability=macosx10.7 +// XFAIL: dylib-has-no-bad_variant_access && !libcpp-no-exceptions // @@ -159,7 +153,9 @@ void test_basic() { #endif } -int main() { +int main(int, char**) { test_basic(); test_emplace_sfinae(); + + return 0; } diff --git a/libcxx/test/std/utilities/variant/variant.variant/variant.mod/emplace_index_init_list_args.pass.cpp b/libcxx/test/std/utilities/variant/variant.variant/variant.mod/emplace_index_init_list_args.pass.cpp index 13e3c927c28ec..aee3c3fa11f3f 100644 --- a/libcxx/test/std/utilities/variant/variant.variant/variant.mod/emplace_index_init_list_args.pass.cpp +++ b/libcxx/test/std/utilities/variant/variant.variant/variant.mod/emplace_index_init_list_args.pass.cpp @@ -9,13 +9,7 @@ // UNSUPPORTED: c++98, c++03, c++11, c++14 -// XFAIL: availability=macosx10.13 -// XFAIL: availability=macosx10.12 -// XFAIL: availability=macosx10.11 -// XFAIL: availability=macosx10.10 -// XFAIL: availability=macosx10.9 -// XFAIL: availability=macosx10.8 -// XFAIL: availability=macosx10.7 +// XFAIL: dylib-has-no-bad_variant_access && !libcpp-no-exceptions // @@ -92,7 +86,9 @@ void test_basic() { assert(&ref3 == &std::get<1>(v)); } -int main() { +int main(int, char**) { test_basic(); test_emplace_sfinae(); + + return 0; } diff --git a/libcxx/test/std/utilities/variant/variant.variant/variant.mod/emplace_type_args.pass.cpp b/libcxx/test/std/utilities/variant/variant.variant/variant.mod/emplace_type_args.pass.cpp index 7c9034f10a759..929806a099c0f 100644 --- a/libcxx/test/std/utilities/variant/variant.variant/variant.mod/emplace_type_args.pass.cpp +++ b/libcxx/test/std/utilities/variant/variant.variant/variant.mod/emplace_type_args.pass.cpp @@ -9,13 +9,7 @@ // UNSUPPORTED: c++98, c++03, c++11, c++14 -// XFAIL: availability=macosx10.13 -// XFAIL: availability=macosx10.12 -// XFAIL: availability=macosx10.11 -// XFAIL: availability=macosx10.10 -// XFAIL: availability=macosx10.9 -// XFAIL: availability=macosx10.8 -// XFAIL: availability=macosx10.7 +// XFAIL: dylib-has-no-bad_variant_access && !libcpp-no-exceptions // @@ -159,7 +153,9 @@ void test_basic() { #endif } -int main() { +int main(int, char**) { test_basic(); test_emplace_sfinae(); + + return 0; } diff --git a/libcxx/test/std/utilities/variant/variant.variant/variant.mod/emplace_type_init_list_args.pass.cpp b/libcxx/test/std/utilities/variant/variant.variant/variant.mod/emplace_type_init_list_args.pass.cpp index 85cd25d04decb..9cb9674f47d53 100644 --- a/libcxx/test/std/utilities/variant/variant.variant/variant.mod/emplace_type_init_list_args.pass.cpp +++ b/libcxx/test/std/utilities/variant/variant.variant/variant.mod/emplace_type_init_list_args.pass.cpp @@ -9,13 +9,7 @@ // UNSUPPORTED: c++98, c++03, c++11, c++14 -// XFAIL: availability=macosx10.13 -// XFAIL: availability=macosx10.12 -// XFAIL: availability=macosx10.11 -// XFAIL: availability=macosx10.10 -// XFAIL: availability=macosx10.9 -// XFAIL: availability=macosx10.8 -// XFAIL: availability=macosx10.7 +// XFAIL: dylib-has-no-bad_variant_access && !libcpp-no-exceptions // @@ -92,7 +86,9 @@ void test_basic() { assert(&ref3 == &std::get(v)); } -int main() { +int main(int, char**) { test_basic(); test_emplace_sfinae(); + + return 0; } diff --git a/libcxx/test/std/utilities/variant/variant.variant/variant.status/index.pass.cpp b/libcxx/test/std/utilities/variant/variant.variant/variant.status/index.pass.cpp index 0afa10138e3f3..6d463ad2788e9 100644 --- a/libcxx/test/std/utilities/variant/variant.variant/variant.status/index.pass.cpp +++ b/libcxx/test/std/utilities/variant/variant.variant/variant.status/index.pass.cpp @@ -25,7 +25,7 @@ #include "variant_test_helpers.hpp" -int main() { +int main(int, char**) { { using V = std::variant; constexpr V v; @@ -57,4 +57,6 @@ int main() { assert(v.index() == std::variant_npos); } #endif + + return 0; } diff --git a/libcxx/test/std/utilities/variant/variant.variant/variant.status/valueless_by_exception.pass.cpp b/libcxx/test/std/utilities/variant/variant.variant/variant.status/valueless_by_exception.pass.cpp index 147f380a19ff8..2cb730cb0ff9c 100644 --- a/libcxx/test/std/utilities/variant/variant.variant/variant.status/valueless_by_exception.pass.cpp +++ b/libcxx/test/std/utilities/variant/variant.variant/variant.status/valueless_by_exception.pass.cpp @@ -25,7 +25,7 @@ #include "variant_test_helpers.hpp" -int main() { +int main(int, char**) { { using V = std::variant; constexpr V v; @@ -50,4 +50,6 @@ int main() { assert(v.valueless_by_exception()); } #endif + + return 0; } diff --git a/libcxx/test/std/utilities/variant/variant.variant/variant.swap/swap.pass.cpp b/libcxx/test/std/utilities/variant/variant.variant/variant.swap/swap.pass.cpp index e05cd13e69f40..8443f1e8e23da 100644 --- a/libcxx/test/std/utilities/variant/variant.variant/variant.swap/swap.pass.cpp +++ b/libcxx/test/std/utilities/variant/variant.variant/variant.swap/swap.pass.cpp @@ -9,13 +9,7 @@ // UNSUPPORTED: c++98, c++03, c++11, c++14 -// XFAIL: availability=macosx10.13 -// XFAIL: availability=macosx10.12 -// XFAIL: availability=macosx10.11 -// XFAIL: availability=macosx10.10 -// XFAIL: availability=macosx10.9 -// XFAIL: availability=macosx10.8 -// XFAIL: availability=macosx10.7 +// XFAIL: dylib-has-no-bad_variant_access && !libcpp-no-exceptions // @@ -589,10 +583,12 @@ void test_swap_noexcept() { template class std::variant; #endif -int main() { +int main(int, char**) { test_swap_valueless_by_exception(); test_swap_same_alternative(); test_swap_different_alternatives(); test_swap_sfinae(); test_swap_noexcept(); + + return 0; } diff --git a/libcxx/test/std/utilities/variant/variant.variant/variant_array.fail.cpp b/libcxx/test/std/utilities/variant/variant.variant/variant_array.fail.cpp index a9caeb8b2dbbe..ce79e9c425430 100644 --- a/libcxx/test/std/utilities/variant/variant.variant/variant_array.fail.cpp +++ b/libcxx/test/std/utilities/variant/variant.variant/variant_array.fail.cpp @@ -23,10 +23,12 @@ #include "variant_test_helpers.hpp" #include "test_convertible.hpp" -int main() +int main(int, char**) { // expected-error@variant:* 3 {{static_assert failed}} std::variant v; // expected-note {{requested here}} std::variant v2; // expected-note {{requested here}} std::variant v3; // expected-note {{requested here}} + + return 0; } diff --git a/libcxx/test/std/utilities/variant/variant.variant/variant_empty.fail.cpp b/libcxx/test/std/utilities/variant/variant.variant/variant_empty.fail.cpp index 85a10eff9af0b..3b93cb0ab70e4 100644 --- a/libcxx/test/std/utilities/variant/variant.variant/variant_empty.fail.cpp +++ b/libcxx/test/std/utilities/variant/variant.variant/variant_empty.fail.cpp @@ -18,8 +18,10 @@ #include "test_macros.h" #include "variant_test_helpers.hpp" -int main() +int main(int, char**) { // expected-error@variant:* 1 {{static_assert failed}} std::variant<> v; // expected-note {{requested here}} + + return 0; } diff --git a/libcxx/test/std/utilities/variant/variant.variant/variant_reference.fail.cpp b/libcxx/test/std/utilities/variant/variant.variant/variant_reference.fail.cpp index e659f47600a9d..7c2c466908350 100644 --- a/libcxx/test/std/utilities/variant/variant.variant/variant_reference.fail.cpp +++ b/libcxx/test/std/utilities/variant/variant.variant/variant_reference.fail.cpp @@ -18,10 +18,12 @@ #include "test_macros.h" #include "variant_test_helpers.hpp" -int main() +int main(int, char**) { // expected-error@variant:* 3 {{static_assert failed}} std::variant v; // expected-note {{requested here}} std::variant v2; // expected-note {{requested here}} std::variant v3; // expected-note {{requested here}} + + return 0; } diff --git a/libcxx/test/std/utilities/variant/variant.variant/variant_void.fail.cpp b/libcxx/test/std/utilities/variant/variant.variant/variant_void.fail.cpp index ce0675d73c6b5..27e9c399f8d0f 100644 --- a/libcxx/test/std/utilities/variant/variant.variant/variant_void.fail.cpp +++ b/libcxx/test/std/utilities/variant/variant.variant/variant_void.fail.cpp @@ -23,10 +23,12 @@ #include "variant_test_helpers.hpp" #include "test_convertible.hpp" -int main() +int main(int, char**) { // expected-error@variant:* 3 {{static_assert failed}} std::variant v; // expected-note {{requested here}} std::variant v2; // expected-note {{requested here}} std::variant v3; // expected-note {{requested here}} + + return 0; } diff --git a/libcxx/test/std/utilities/variant/variant.visit/visit.pass.cpp b/libcxx/test/std/utilities/variant/variant.visit/visit.pass.cpp index 198f310e9af49..11e26d097d41e 100644 --- a/libcxx/test/std/utilities/variant/variant.visit/visit.pass.cpp +++ b/libcxx/test/std/utilities/variant/variant.visit/visit.pass.cpp @@ -9,13 +9,7 @@ // UNSUPPORTED: c++98, c++03, c++11, c++14 -// XFAIL: availability=macosx10.13 -// XFAIL: availability=macosx10.12 -// XFAIL: availability=macosx10.11 -// XFAIL: availability=macosx10.10 -// XFAIL: availability=macosx10.9 -// XFAIL: availability=macosx10.8 -// XFAIL: availability=macosx10.7 +// XFAIL: dylib-has-no-bad_variant_access && !libcpp-no-exceptions // // template @@ -310,10 +304,12 @@ void test_caller_accepts_nonconst() { std::visit(Visitor{}, v); } -int main() { +int main(int, char**) { test_call_operator_forwarding(); test_argument_forwarding(); test_constexpr(); test_exceptions(); test_caller_accepts_nonconst(); + + return 0; } diff --git a/libcxx/test/support/nothing_to_do.pass.cpp b/libcxx/test/support/nothing_to_do.pass.cpp index 1b23133240825..f54d71c86da9a 100644 --- a/libcxx/test/support/nothing_to_do.pass.cpp +++ b/libcxx/test/support/nothing_to_do.pass.cpp @@ -7,7 +7,9 @@ // //===----------------------------------------------------------------------===// -int main() +int main(int, char**) { + + return 0; } diff --git a/libcxx/test/support/test.support/test_convertible_header.pass.cpp b/libcxx/test/support/test.support/test_convertible_header.pass.cpp index 0158dfe62cebd..f2923d50cd41a 100644 --- a/libcxx/test/support/test.support/test_convertible_header.pass.cpp +++ b/libcxx/test/support/test.support/test_convertible_header.pass.cpp @@ -62,6 +62,8 @@ struct ExplicitArgs { }; static_assert(!test_convertible(), "Must not be convertible"); -int main() { +int main(int, char**) { // Nothing to do + + return 0; } diff --git a/libcxx/test/support/test.support/test_demangle.pass.cpp b/libcxx/test/support/test.support/test_demangle.pass.cpp index 5c62ecbb1182c..2f1b16be9bb93 100644 --- a/libcxx/test/support/test.support/test_demangle.pass.cpp +++ b/libcxx/test/support/test.support/test_demangle.pass.cpp @@ -14,7 +14,7 @@ struct MyType {}; template struct ArgumentListID {}; -int main() { +int main(int, char**) { struct { const char* raw; const char* expect; @@ -34,4 +34,6 @@ int main() { assert(demangle(raw) == expect); #endif } + + return 0; } diff --git a/libcxx/test/support/test.support/test_macros_header_exceptions.fail.cpp b/libcxx/test/support/test.support/test_macros_header_exceptions.fail.cpp index 66a01c9673b0f..b120aabc02f99 100644 --- a/libcxx/test/support/test.support/test_macros_header_exceptions.fail.cpp +++ b/libcxx/test/support/test.support/test_macros_header_exceptions.fail.cpp @@ -12,7 +12,7 @@ #include "test_macros.h" -int main() { +int main(int, char**) { #if defined(TEST_HAS_NO_EXCEPTIONS) try { ((void)0); } catch (...) {} // expected-error {{exceptions disabled}} #else @@ -20,4 +20,6 @@ int main() { #error exceptions enabled // expected-error@-1 {{exceptions enabled}} #endif + + return 0; } diff --git a/libcxx/test/support/test.support/test_macros_header_exceptions.pass.cpp b/libcxx/test/support/test.support/test_macros_header_exceptions.pass.cpp index 274cad82e33b9..ccdf257dceb48 100644 --- a/libcxx/test/support/test.support/test_macros_header_exceptions.pass.cpp +++ b/libcxx/test/support/test.support/test_macros_header_exceptions.pass.cpp @@ -18,6 +18,8 @@ #error macro defined unexpectedly #endif -int main() { +int main(int, char**) { try { ((void)0); } catch (...) {} + + return 0; } diff --git a/libcxx/test/support/test.support/test_macros_header_rtti.fail.cpp b/libcxx/test/support/test.support/test_macros_header_rtti.fail.cpp index 4096ce43f1093..b2f3177af809e 100644 --- a/libcxx/test/support/test.support/test_macros_header_rtti.fail.cpp +++ b/libcxx/test/support/test.support/test_macros_header_rtti.fail.cpp @@ -15,7 +15,7 @@ struct A { virtual ~A() {} }; struct B : A {}; -int main() { +int main(int, char**) { #if defined(TEST_HAS_NO_RTTI) A* ptr = new B; (void)dynamic_cast(ptr); // expected-error{{cannot use dynamic_cast}} @@ -25,4 +25,6 @@ int main() { #error RTTI enabled // expected-error@-1{{RTTI enabled}} #endif + + return 0; } diff --git a/libcxx/test/support/test.support/test_macros_header_rtti.pass.cpp b/libcxx/test/support/test.support/test_macros_header_rtti.pass.cpp index 9461579939f41..e38545f9b9cb8 100644 --- a/libcxx/test/support/test.support/test_macros_header_rtti.pass.cpp +++ b/libcxx/test/support/test.support/test_macros_header_rtti.pass.cpp @@ -21,8 +21,10 @@ struct A { virtual ~A() {} }; struct B : A {}; -int main() { +int main(int, char**) { A* ptr = new B; (void)dynamic_cast(ptr); delete ptr; + + return 0; } diff --git a/libcxx/test/support/test.support/test_poisoned_hash_helper.pass.cpp b/libcxx/test/support/test.support/test_poisoned_hash_helper.pass.cpp index f94f96368eeb2..692854b3d26ed 100644 --- a/libcxx/test/support/test.support/test_poisoned_hash_helper.pass.cpp +++ b/libcxx/test/support/test.support/test_poisoned_hash_helper.pass.cpp @@ -24,6 +24,8 @@ template struct has_complete_hash { enum { value = is_complete >() }; }; -int main() { +int main(int, char**) { static_assert(LibraryHashTypes::assertTrait(), ""); + + return 0; } diff --git a/libcxx/test/support/test.workarounds/c1xx_broken_is_trivially_copyable.pass.cpp b/libcxx/test/support/test.workarounds/c1xx_broken_is_trivially_copyable.pass.cpp index 40e50c14e22a0..1b2fd1462e291 100644 --- a/libcxx/test/support/test.workarounds/c1xx_broken_is_trivially_copyable.pass.cpp +++ b/libcxx/test/support/test.workarounds/c1xx_broken_is_trivially_copyable.pass.cpp @@ -25,10 +25,12 @@ struct S { S& operator=(S&&) = delete; }; -int main() { +int main(int, char**) { #if defined(TEST_WORKAROUND_C1XX_BROKEN_IS_TRIVIALLY_COPYABLE) static_assert(!std::is_trivially_copyable::value, ""); #else static_assert(std::is_trivially_copyable::value, ""); #endif + + return 0; } diff --git a/libcxx/test/support/test.workarounds/c1xx_broken_za_ctor_check.pass.cpp b/libcxx/test/support/test.workarounds/c1xx_broken_za_ctor_check.pass.cpp index 27f1fb640dee7..688a0f798c36a 100644 --- a/libcxx/test/support/test.workarounds/c1xx_broken_za_ctor_check.pass.cpp +++ b/libcxx/test/support/test.workarounds/c1xx_broken_za_ctor_check.pass.cpp @@ -31,10 +31,12 @@ template auto test(int) -> decltype(PushFront(std::declval()), std::true_type{}); auto test(long) -> std::false_type; -int main() { +int main(int, char**) { #if defined(TEST_WORKAROUND_C1XX_BROKEN_ZA_CTOR_CHECK) static_assert(!decltype(test(0))::value, ""); #else static_assert(decltype(test(0))::value, ""); #endif + + return 0; } diff --git a/libcxx/utils/ci/macos-backdeployment.sh b/libcxx/utils/ci/macos-backdeployment.sh index 1f01fa397c9ab..c3f6376f27211 100755 --- a/libcxx/utils/ci/macos-backdeployment.sh +++ b/libcxx/utils/ci/macos-backdeployment.sh @@ -12,7 +12,7 @@ This script is used to continually test the back-deployment use case of libc++ a --libcxxabi-root Full path to the root of the libc++abi repository to test. --std Version of the C++ Standard to run the tests under (c++03, c++11, etc..). --arch Architecture to build the tests for (32, 64). - --deployment-target The deployment target to run the tests for. This should be a version number of MacOS (e.g. 10.12). All MacOS versions until and including 10.7 are supported. + --deployment-target The deployment target to run the tests for. This should be a version number of MacOS (e.g. 10.12). All MacOS versions until and including 10.9 are supported. --sdk-version The version of the SDK to test with. This should be a version number of MacOS (e.g. 10.12). We'll link against the libc++ dylib in that SDK, but we'll run against the one on the given deployment target. [--lit-args] Additional arguments to pass to lit (optional). If there are multiple arguments, quote them to pass them as a single argument to this script. [--no-cleanup] Do not cleanup the temporary directory that was used for testing at the end. This can be useful to debug failures. Make sure to clean up manually after. diff --git a/libcxx/utils/ci/macos-trunk.sh b/libcxx/utils/ci/macos-trunk.sh index b365cc6d8e36c..b64633387b209 100755 --- a/libcxx/utils/ci/macos-trunk.sh +++ b/libcxx/utils/ci/macos-trunk.sh @@ -8,13 +8,14 @@ $(basename ${0}) [-h|--help] --libcxx-root --libcxxabi-root 17 -int main() {{}} +int main(int, char**) {{ return 0; }} """.format(script_name=script_name, header=h, test_tags=test_tags, diff --git a/libcxx/utils/libcxx/sym_check/extract.py b/libcxx/utils/libcxx/sym_check/extract.py index 1012c6b11b200..6089ec2342a56 100644 --- a/libcxx/utils/libcxx/sym_check/extract.py +++ b/libcxx/utils/libcxx/sym_check/extract.py @@ -10,6 +10,7 @@ extract - A set of function that extract symbol lists from shared libraries. """ import distutils.spawn +import os.path import sys import re @@ -30,7 +31,7 @@ def find_tool(): """ return distutils.spawn.find_executable('nm') - def __init__(self): + def __init__(self, static_lib): """ Initialize the nm executable and flags that will be used to extract symbols from shared libraries. @@ -40,8 +41,10 @@ def __init__(self): # ERROR no NM found print("ERROR: Could not find nm") sys.exit(1) + self.static_lib = static_lib self.flags = ['-P', '-g'] + def extract(self, lib): """ Extract symbols from a library and return the results as a dict of @@ -53,7 +56,7 @@ def extract(self, lib): raise RuntimeError('Failed to run %s on %s' % (self.nm_exe, lib)) fmt_syms = (self._extract_sym(l) for l in out.splitlines() if l.strip()) - # Cast symbol to string. + # Cast symbol to string. final_syms = (repr(s) for s in fmt_syms if self._want_sym(s)) # Make unique and sort strings. tmp_list = list(sorted(set(final_syms))) @@ -116,7 +119,7 @@ def find_tool(): """ return distutils.spawn.find_executable('readelf') - def __init__(self): + def __init__(self, static_lib): """ Initialize the readelf executable and flags that will be used to extract symbols from shared libraries. @@ -126,6 +129,8 @@ def __init__(self): # ERROR no NM found print("ERROR: Could not find readelf") sys.exit(1) + # TODO: Support readelf for reading symbols from archives + assert not static_lib and "RealElf does not yet support static libs" self.flags = ['--wide', '--symbols'] def extract(self, lib): @@ -180,14 +185,17 @@ def get_dynsym_table(self, out): return lines[start:end] -def extract_symbols(lib_file): +def extract_symbols(lib_file, static_lib=None): """ - Extract and return a list of symbols extracted from a dynamic library. - The symbols are extracted using NM. They are then filtered and formated. - Finally they symbols are made unique. + Extract and return a list of symbols extracted from a static or dynamic + library. The symbols are extracted using NM or readelf. They are then + filtered and formated. Finally they symbols are made unique. """ - if ReadElfExtractor.find_tool(): - extractor = ReadElfExtractor() + if static_lib is None: + _, ext = os.path.splitext(lib_file) + static_lib = True if ext in ['.a'] else False + if ReadElfExtractor.find_tool() and not static_lib: + extractor = ReadElfExtractor(static_lib=static_lib) else: - extractor = NMExtractor() + extractor = NMExtractor(static_lib=static_lib) return extractor.extract(lib_file) diff --git a/libcxx/utils/libcxx/sym_check/util.py b/libcxx/utils/libcxx/sym_check/util.py index c6f7e90f3934a..0ebde9034cab6 100644 --- a/libcxx/utils/libcxx/sym_check/util.py +++ b/libcxx/utils/libcxx/sym_check/util.py @@ -11,6 +11,7 @@ import sys import re import libcxx.util +from pprint import pformat def read_syms_from_list(slist): @@ -38,17 +39,20 @@ def read_blacklist(filename): return lines -def write_syms(sym_list, out=None, names_only=False): +def write_syms(sym_list, out=None, names_only=False, filter=None): """ Write a list of symbols to the file named by out. """ out_str = '' out_list = sym_list out_list.sort(key=lambda x: x['name']) + if filter is not None: + out_list = filter(out_list) if names_only: - out_list = [sym['name'] for sym in sym_list] + out_list = [sym['name'] for sym in out_list] for sym in out_list: - out_str += '%s\n' % sym + # Use pformat for consistent ordering of keys. + out_str += pformat(sym, width=100000) + '\n' if out is None: sys.stdout.write(out_str) else: @@ -240,10 +244,11 @@ def adjust_mangled_name(name): '_ZTSy' ] -def is_stdlib_symbol_name(name): +def is_stdlib_symbol_name(name, sym): name = adjust_mangled_name(name) if re.search("@GLIBC|@GCC", name): - return False + # Only when symbol is defined do we consider it ours + return sym['is_defined'] if re.search('(St[0-9])|(__cxa)|(__cxxabi)', name): return True if name in new_delete_std_symbols: @@ -259,8 +264,7 @@ def filter_stdlib_symbols(syms): other_symbols = [] for s in syms: canon_name = adjust_mangled_name(s['name']) - if not is_stdlib_symbol_name(canon_name): - assert not s['is_defined'] and "found defined non-std symbol" + if not is_stdlib_symbol_name(canon_name, s): other_symbols += [s] else: stdlib_symbols += [s] diff --git a/libcxx/utils/libcxx/test/config.py b/libcxx/utils/libcxx/test/config.py index aba1ada90642e..999c5acab3b7b 100644 --- a/libcxx/utils/libcxx/test/config.py +++ b/libcxx/utils/libcxx/test/config.py @@ -281,9 +281,15 @@ def configure_obj_root(self): self.project_obj_root = self.get_lit_conf('project_obj_root') self.libcxx_obj_root = self.get_lit_conf('libcxx_obj_root') if not self.libcxx_obj_root and self.project_obj_root is not None: - possible_root = os.path.join(self.project_obj_root, 'projects', 'libcxx') - if os.path.isdir(possible_root): - self.libcxx_obj_root = possible_root + possible_roots = [ + os.path.join(self.project_obj_root, 'libcxx'), + os.path.join(self.project_obj_root, 'projects', 'libcxx'), + os.path.join(self.project_obj_root, 'runtimes', 'libcxx'), + ] + for possible_root in possible_roots: + if os.path.isdir(possible_root): + self.libcxx_obj_root = possible_root + break else: self.libcxx_obj_root = self.project_obj_root @@ -547,10 +553,10 @@ def configure_default_compile_flags(self): self.cxx.flags += ['-v'] sysroot = self.get_lit_conf('sysroot') if sysroot: - self.cxx.flags += ['--sysroot', sysroot] + self.cxx.flags += ['--sysroot=' + sysroot] gcc_toolchain = self.get_lit_conf('gcc_toolchain') if gcc_toolchain: - self.cxx.flags += ['-gcc-toolchain', gcc_toolchain] + self.cxx.flags += ['--gcc-toolchain=' + gcc_toolchain] # NOTE: the _DEBUG definition must preceed the triple check because for # the Windows build of libc++, the forced inclusion of a header requires # that _DEBUG is defined. Incorrect ordering will result in -target @@ -559,8 +565,8 @@ def configure_default_compile_flags(self): self.cxx.compile_flags += ['-D_DEBUG'] if self.use_target: if not self.cxx.addFlagIfSupported( - ['-target', self.config.target_triple]): - self.lit_config.warning('use_target is true but -target is '\ + ['--target=' + self.config.target_triple]): + self.lit_config.warning('use_target is true but --target is '\ 'not supported by the compiler') if self.use_deployment: arch, name, version = self.config.deployment @@ -933,7 +939,7 @@ def configure_sanitizer(self): def add_ubsan(): self.cxx.flags += ['-fsanitize=undefined', - '-fno-sanitize=vptr,function,float-divide-by-zero', + '-fno-sanitize=float-divide-by-zero', '-fno-sanitize-recover=all'] self.exec_env['UBSAN_OPTIONS'] = 'print_stacktrace=1' self.config.available_features.add('ubsan') @@ -1143,6 +1149,25 @@ def configure_deployment(self): self.lit_config.note( "computed target_triple as: %r" % self.config.target_triple) + # If we're testing a system libc++ as opposed to the upstream LLVM one, + # take the version of the system libc++ into account to compute which + # features are enabled/disabled. Otherwise, disable availability markup, + # which is not relevant for non-shipped flavors of libc++. + if self.use_system_cxx_lib: + # Throwing bad_optional_access, bad_variant_access and bad_any_cast is + # supported starting in macosx10.14. + if name == 'macosx' and version in ('10.%s' % v for v in range(7, 14)): + self.config.available_features.add('dylib-has-no-bad_optional_access') + self.lit_config.note("throwing bad_optional_access is not supported by the deployment target") + + self.config.available_features.add('dylib-has-no-bad_variant_access') + self.lit_config.note("throwing bad_variant_access is not supported by the deployment target") + + self.config.available_features.add('dylib-has-no-bad_any_cast') + self.lit_config.note("throwing bad_any_cast is not supported by the deployment target") + else: + self.cxx.flags += ['-D_LIBCPP_DISABLE_AVAILABILITY'] + def configure_env(self): self.target_info.configure_env(self.exec_env) diff --git a/libcxx/utils/libcxx/test/target_info.py b/libcxx/utils/libcxx/test/target_info.py index fb450805f276b..2ea24d62ebcc1 100644 --- a/libcxx/utils/libcxx/test/target_info.py +++ b/libcxx/utils/libcxx/test/target_info.py @@ -251,8 +251,10 @@ def add_cxx_link_flags(self, flags): flags += ['-lunwind', '-ldl'] else: flags += ['-lgcc_s'] - compiler_rt = self.full_config.get_lit_bool('compiler_rt', False) - if not compiler_rt: + builtins_lib = self.full_config.get_lit_conf('builtins_library') + if builtins_lib: + flags += [builtins_lib] + else: flags += ['-lgcc'] use_libatomic = self.full_config.get_lit_bool('use_libatomic', False) if use_libatomic: diff --git a/libcxx/utils/merge_archives.py b/libcxx/utils/merge_archives.py index a307494d87abd..e57afab201f3f 100755 --- a/libcxx/utils/merge_archives.py +++ b/libcxx/utils/merge_archives.py @@ -78,6 +78,7 @@ def execute_command_verbose(cmd, cwd=None, verbose=False): sys.stderr.write('%s\n' % report) if exitCode != 0: exit_with_cleanups(exitCode) + return out def main(): parser = ArgumentParser( @@ -119,15 +120,15 @@ def main(): global temp_directory_root temp_directory_root = tempfile.mkdtemp('.libcxx.merge.archives') + files = [] for arc in archives: - execute_command_verbose([ar_exe, 'x', arc], cwd=temp_directory_root, - verbose=args.verbose) - - files = glob.glob(os.path.join(temp_directory_root, '*.o*')) - if not files: - print_and_exit('Failed to glob for %s' % temp_directory_root) - cmd = [ar_exe, 'qcs', args.output] + files - execute_command_verbose(cmd, cwd=temp_directory_root, verbose=args.verbose) + execute_command_verbose([ar_exe, 'x', arc], + cwd=temp_directory_root, verbose=args.verbose) + out = execute_command_verbose([ar_exe, 't', arc]) + files.extend(out.splitlines()) + + execute_command_verbose([ar_exe, 'rcsD', args.output] + files, + cwd=temp_directory_root, verbose=args.verbose) if __name__ == '__main__': diff --git a/libcxx/utils/sym_extract.py b/libcxx/utils/sym_extract.py index 156e8830ed4d5..987c207c1e412 100755 --- a/libcxx/utils/sym_extract.py +++ b/libcxx/utils/sym_extract.py @@ -27,14 +27,27 @@ def main(): parser.add_argument('--only-stdlib-symbols', dest='only_stdlib', help="Filter all symbols not related to the stdlib", action='store_true', default=False) + parser.add_argument('--defined-only', dest='defined_only', + help="Filter all symbols that are not defined", + action='store_true', default=False) + parser.add_argument('--undefined-only', dest='undefined_only', + help="Filter all symbols that are defined", + action='store_true', default=False) + args = parser.parse_args() + assert not (args.undefined_only and args.defined_only) 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) + filter = lambda x: x + if args.defined_only: + filter = lambda l: list([x for x in l if x['is_defined']]) + if args.undefined_only: + filter = lambda l: list([x for x in l if not x['is_defined']]) + util.write_syms(syms, out=args.output, names_only=args.names_only, filter=filter) if __name__ == '__main__': diff --git a/libcxx/www/cxx1z_status.html b/libcxx/www/cxx1z_status.html index 823c37b587cb8..68a5d1ab919aa 100644 --- a/libcxx/www/cxx1z_status.html +++ b/libcxx/www/cxx1z_status.html @@ -159,7 +159,7 @@

    Paper Status

    P0558R1LWGResolving atomic<T> named base class inconsistenciesKona P0574R1LWGAlgorithm Complexity Constraints and Parallel OverloadsKona P0599R1LWGnoexcept for hash functionsKonaComplete5.0 - P0604R0LWGResolving GB 55, US 84, US 85, US 86Kona + P0604R0LWGResolving GB 55, US 84, US 85, US 86KonaComplete P0607R0LWGInline Variables for the Standard LibraryKonaIn Progress6.0 P0618R0LWGDeprecating <codecvt>Kona P0623R0LWGFinal C++17 Parallel Algorithms FixesKona @@ -422,7 +422,7 @@

    Library Working group Issues Status

    2740constexpr optional::operator->IssaquahComplete 2742Inconsistent string interface taking string_viewIssaquahComplete 2744any's in_place constructorsIssaquahComplete - 2745[fund.ts.v2] Implementability of LWG 2451Issaquah + 2745[fund.ts.v2] Implementability of LWG 2451IssaquahComplete 2747Possibly redundant std::move in [alg.foreach]IssaquahComplete 2748swappable traits for optionalsIssaquahComplete 2749swappable traits for variantsIssaquahComplete @@ -503,7 +503,7 @@

    Library Working group Issues Status

    -

    Last Updated: 3-Aug-2018

    +

    Last Updated: 26-Feb-2018

    diff --git a/libcxx/www/cxx2a_status.html b/libcxx/www/cxx2a_status.html index 36bc659c91209..67f1e2f81e7aa 100644 --- a/libcxx/www/cxx2a_status.html +++ b/libcxx/www/cxx2a_status.html @@ -61,7 +61,7 @@

    Paper Status

    P0053R7LWGC++ Synchronized Buffered OstreamAlbuquerque P0202R3LWGAdd constexpr modifiers to functions in <algorithm> and <utility> HeadersAlbuquerqueIn Progress7.0 P0415R1LWGConstexpr for std::complexAlbuquerqueIn Progress7.0 - P0439R0LWGMake std::memory_order a scoped enumerationAlbuquerque + P0439R0LWGMake std::memory_order a scoped enumerationAlbuquerqueComplete P0457R2LWGString Prefix and Suffix CheckingAlbuquerqueComplete6.0 P0550R2LWGTransformation Trait remove_cvrefAlbuquerqueComplete6.0 P0600R1LWGnodiscard in the LibraryAlbuquerqueIn Progress7.0 @@ -69,7 +69,7 @@

    Paper Status

    P0653R2LWGUtility to convert a pointer to a raw pointerAlbuquerqueComplete6.0 P0718R2LWGAtomic shared_ptrAlbuquerque P0767R1CWGDeprecate PODAlbuquerqueComplete7.0 - P0768R1CWGLibrary Support for the Spaceship (Comparison) OperatorAlbuquerque + P0768R1CWGLibrary Support for the Spaceship (Comparison) OperatorAlbuquerqueComplete P0777R1LWGTreating Unnecessary decayAlbuquerqueComplete7.0 P0122R7LWG<span>JacksonvilleComplete7.0 P0355R7LWGExtending chrono to Calendars and Time ZonesJacksonvilleIn progress @@ -92,7 +92,7 @@

    Paper Status

    P0619R4LWGReviewing Deprecated Facilities of C++17 for C++20Rapperswil P0646R1LWGImproving the Return Value of Erase-Like AlgorithmsRapperswil P0722R3CWGEfficient sized delete for variable sized classesRapperswil - P0758R1LWGImplicit conversion traits and utility functionsRapperswil + P0758R1LWGImplicit conversion traits and utility functionsRapperswilComplete P0759R1LWGfpos RequirementsRapperswil P0769R2LWGAdd shift to <algorithm>Rapperswil P0788R3LWGStandard Library Specification in a Concepts and Contracts WorldRapperswil @@ -137,6 +137,25 @@

    Paper Status

    P1285R0LWGImproving Completeness Requirements for Type TraitsSan Diego P1353R0CWGMissing feature test macrosSan Diego + + P0339R6LWGpolymorphic_allocator<> as a vocabulary typeKona + P0340R3LWGMaking std::underlying_type SFINAE-friendlyKona + P0738R2LWGI Stream, You Stream, We All Stream for istream_iteratorKona + P0811R3LWGWell-behaved interpolation for numbers and pointersKona + P0920R2LWGPrecalculated hash values in lookupKona + P1001R2LWGTarget Vectorization Policies from Parallelism V2 TS to C++20Kona + P1024R3LWGUsability Enhancements for std::spanKonaComplete9.0 + P1164R1LWGMake create_directory() IntuitiveKona + P1227R2LWGSigned ssize() functions, unsigned size() functions KonaComplete9.0 + P1252R2LWGRanges Design CleanupKona + P1286R2CWGContra CWG DR1778Kona + P1357R1LWGTraits for [Un]bounded ArraysKonaComplete9.0 + P1458R1LWGMandating the Standard Library: Clause 16 - Language support libraryKona + P1459R1LWGMandating the Standard Library: Clause 18 - Diagnostics libraryKona + P1462R1LWGMandating the Standard Library: Clause 20 - Strings libraryKona + P1463R1LWGMandating the Standard Library: Clause 21 - Containers libraryKona + P1464R1LWGMandating the Standard Library: Clause 22 - Iterators libraryKona + @@ -272,7 +291,7 @@

    Library Working group Issues Status

    3065LWG 2989 missed that all path's other operators should be hidden friends as wellSan DiegoComplete 3096path::lexically_relative is confused by trailing slashesSan DiegoComplete 3116OUTERMOST_ALLOC_TRAITS needs remove_reference_tSan Diego - 3122__cpp_lib_chrono_udls was accidentally droppedSan DiegoWe've already made the update; but we don't support all the test macros. When we do, this will be closed + 3122__cpp_lib_chrono_udls was accidentally droppedSan DiegoComplete 3127basic_osyncstream::rdbuf needs a const_castSan Diego 3128strstream::rdbuf needs a const_castSan DiegoNothing to do 3129regex_token_iterator constructor uses wrong pointer arithmeticSan Diego @@ -280,17 +299,31 @@

    Library Working group Issues Status

    3131addressof all the thingsSan Diego 3132Library needs to ban macros named expects or ensuresSan DiegoNothing to do 3134[fund.ts.v3] LFTSv3 contains extraneous [meta] variable templates that should have been deleted by P09961San DiegoResolved by P1210R0 - 3137Header for __cpp_lib_to_charsSan DiegoWe've already made the update; but we don't support all the test macros. When we do, this will be closed + 3137Header for __cpp_lib_to_charsSan DiegoComplete 3145file_clock breaks ABI for C++17 implementationsSan DiegoComplete 3147Definitions of "likely" and "unlikely" are likely to cause problemsSan Diego 3148<concepts> should be freestandingSan Diego 3153Common and common_type have too little in commonSan Diego 3154Common and CommonReference have a common defectSan Diego + + 3012atomic<T> is unimplementable for non-is_trivially_copy_constructible TKona + 3040basic_string_view::starts_with Effects are incorrectKonaComplete + 3077(push|emplace)_back should invalidate the end iteratorKonaNothing to do + 3087One final &x in §[list.ops]KonaNothing to do + 3101span's Container constructors need another constraintKonaComplete + 3112system_error and filesystem_error constructors taking a string may not be able to meet their postconditionsKona + 3119Program-definedness of closure typesKonaNothing to do + 3133Modernizing numeric type requirementsKona + 3144span does not have a const_pointer typedefKonaComplete + 3173Enable CTAD for ref-viewKona + 3179subrange should always model RangeKona + 3180Inconsistently named return type for ranges::minmax_elementKona + 3182Specification of Same could be clearerKona -

    Last Updated: 28-Nov-2018

    +

    Last Updated: 27-Feb-2018

    diff --git a/libcxxabi/CMakeLists.txt b/libcxxabi/CMakeLists.txt index 664e1fed034e8..b77422847ab65 100644 --- a/libcxxabi/CMakeLists.txt +++ b/libcxxabi/CMakeLists.txt @@ -17,7 +17,7 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ) -if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) +if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR OR LIBCXXABI_STANDALONE_BUILD) project(libcxxabi CXX C) set(PACKAGE_NAME libcxxabi) @@ -231,12 +231,22 @@ include(HandleLibcxxabiFlags) # Configure target flags add_target_flags_if(LIBCXXABI_BUILD_32_BITS "-m32") -add_target_flags_if(LIBCXXABI_TARGET_TRIPLE - "--target=${LIBCXXABI_TARGET_TRIPLE}") -add_target_flags_if(LIBCXXABI_GCC_TOOLCHAIN - "--gcc-toolchain=${LIBCXXABI_GCC_TOOLCHAIN}") -add_target_flags_if(LIBCXXABI_SYSROOT - "--sysroot=${LIBCXXABI_SYSROOT}") + +if(LIBCXXABI_TARGET_TRIPLE) + add_target_flags("--target=${LIBCXXABI_TARGET_TRIPLE}") +elseif(CMAKE_CXX_COMPILER_TARGET) + set(LIBCXXABI_TARGET_TRIPLE "${CMAKE_CXX_COMPILER_TARGET}") +endif() +if(LIBCXX_GCC_TOOLCHAIN) + add_target_flags("--gcc-toolchain=${LIBCXXABI_GCC_TOOLCHAIN}") +elseif(CMAKE_CXX_COMPILER_EXTERNAL_TOOLCHAIN) + set(LIBCXXABI_GCC_TOOLCHAIN "${CMAKE_CXX_COMPILER_EXTERNAL_TOOLCHAIN}") +endif() +if(LIBCXXABI_SYSROOT) + add_target_flags("--sysroot=${LIBCXXABI_SYSROOT}") +elseif(CMAKE_SYSROOT) + set(LIBCXXABI_SYSROOT "${CMAKE_SYSROOT}") +endif() if (LIBCXXABI_TARGET_TRIPLE) set(TARGET_TRIPLE "${LIBCXXABI_TARGET_TRIPLE}") @@ -252,10 +262,6 @@ if (LIBCXXABI_HAS_NOSTDINCXX_FLAG) string(REPLACE "-stdlib=libstdc++" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") endif() -if (LIBCXXABI_USE_COMPILER_RT) - list(APPEND LIBCXXABI_LINK_FLAGS "-rtlib=compiler-rt") -endif() - # Let the library headers know they are currently being used to build the # library. add_definitions(-D_LIBCXXABI_BUILDING_LIBRARY) diff --git a/libcxxabi/cmake/Modules/HandleOutOfTreeLLVM.cmake b/libcxxabi/cmake/Modules/HandleOutOfTreeLLVM.cmake index 3296c0c80887f..4420aca2a14a1 100644 --- a/libcxxabi/cmake/Modules/HandleOutOfTreeLLVM.cmake +++ b/libcxxabi/cmake/Modules/HandleOutOfTreeLLVM.cmake @@ -93,10 +93,7 @@ macro(configure_out_of_tree_llvm) endif() endif() if (LLVM_FOUND) - # Enable warnings, otherwise -w gets added to the cflags by HandleLLVMOptions. - set(LLVM_ENABLE_WARNINGS ON) include(AddLLVM OPTIONAL) - include(HandleLLVMOptions OPTIONAL) endif() # LLVM Options -------------------------------------------------------------- diff --git a/libcxxabi/src/CMakeLists.txt b/libcxxabi/src/CMakeLists.txt index 66151b1250e84..b05178af4c22e 100644 --- a/libcxxabi/src/CMakeLists.txt +++ b/libcxxabi/src/CMakeLists.txt @@ -189,7 +189,7 @@ if (LIBCXXABI_ENABLE_SHARED) if(COMMAND llvm_setup_rpath) llvm_setup_rpath(cxxabi_shared) endif() - target_link_libraries(cxxabi_shared PRIVATE ${LIBCXXABI_LIBRARIES} ${LIBCXXABI_SHARED_LIBRARIES}) + target_link_libraries(cxxabi_shared PRIVATE ${LIBCXXABI_SHARED_LIBRARIES} ${LIBCXXABI_LIBRARIES}) set_target_properties(cxxabi_shared PROPERTIES CXX_EXTENSIONS @@ -226,7 +226,7 @@ if (LIBCXXABI_ENABLE_STATIC) endif() endif() add_library(cxxabi_static STATIC ${cxxabi_static_sources}) - target_link_libraries(cxxabi_static PRIVATE ${LIBCXXABI_LIBRARIES} ${LIBCXXABI_STATIC_LIBRARIES}) + target_link_libraries(cxxabi_static PRIVATE ${LIBCXXABI_STATIC_LIBRARIES} ${LIBCXXABI_LIBRARIES}) set_target_properties(cxxabi_static PROPERTIES CXX_EXTENSIONS diff --git a/libcxxabi/test/CMakeLists.txt b/libcxxabi/test/CMakeLists.txt index 5e51c444e0054..01fae1357db3a 100644 --- a/libcxxabi/test/CMakeLists.txt +++ b/libcxxabi/test/CMakeLists.txt @@ -17,6 +17,7 @@ pythonize_bool(LIBCXXABI_ENABLE_SHARED) pythonize_bool(LIBCXXABI_ENABLE_THREADS) pythonize_bool(LIBCXXABI_ENABLE_EXCEPTIONS) pythonize_bool(LIBCXXABI_USE_LLVM_UNWINDER) +pythonize_bool(LIBCXXABI_USE_COMPILER_RT) pythonize_bool(LIBCXXABI_BUILD_EXTERNAL_THREAD_LIBRARY) set(LIBCXXABI_TARGET_INFO "libcxx.test.target_info.LocalTI" CACHE STRING "TargetInfo to use when setting up test environment.") diff --git a/libcxxabi/test/lit.site.cfg.in b/libcxxabi/test/lit.site.cfg.in index 75cb76e2557ff..4abb8edeea073 100644 --- a/libcxxabi/test/lit.site.cfg.in +++ b/libcxxabi/test/lit.site.cfg.in @@ -8,22 +8,23 @@ config.libcxx_src_root = "@LIBCXXABI_LIBCXX_PATH@" config.cxx_headers = "@LIBCXXABI_LIBCXX_INCLUDES@" config.libunwind_headers = "@LIBCXXABI_LIBUNWIND_INCLUDES_INTERNAL@" config.cxx_library_root = "@LIBCXXABI_LIBCXX_LIBRARY_PATH@" -config.llvm_unwinder = "@LIBCXXABI_USE_LLVM_UNWINDER@" -config.enable_threads = "@LIBCXXABI_ENABLE_THREADS@" +config.llvm_unwinder = @LIBCXXABI_USE_LLVM_UNWINDER@ +config.builtins_library = "@LIBCXXABI_BUILTINS_LIBRARY@" +config.enable_threads = @LIBCXXABI_ENABLE_THREADS@ config.use_sanitizer = "@LLVM_USE_SANITIZER@" config.sanitizer_library = "@LIBCXXABI_SANITIZER_LIBRARY@" -config.enable_32bit = "@LIBCXXABI_BUILD_32_BITS@" +config.enable_32bit = @LIBCXXABI_BUILD_32_BITS@ config.target_info = "@LIBCXXABI_TARGET_INFO@" config.executor = "@LIBCXXABI_EXECUTOR@" -config.libcxxabi_shared = "@LIBCXXABI_ENABLE_SHARED@" -config.enable_shared = "@LIBCXX_ENABLE_SHARED@" -config.enable_exceptions = "@LIBCXXABI_ENABLE_EXCEPTIONS@" +config.libcxxabi_shared = @LIBCXXABI_ENABLE_SHARED@ +config.enable_shared = @LIBCXX_ENABLE_SHARED@ +config.enable_exceptions = @LIBCXXABI_ENABLE_EXCEPTIONS@ config.host_triple = "@LLVM_HOST_TRIPLE@" config.target_triple = "@TARGET_TRIPLE@" -config.use_target = len("@LIBCXXABI_TARGET_TRIPLE@") > 0 +config.use_target = bool("@LIBCXXABI_TARGET_TRIPLE@") config.sysroot = "@LIBCXXABI_SYSROOT@" config.gcc_toolchain = "@LIBCXXABI_GCC_TOOLCHAIN@" -config.cxx_ext_threads = "@LIBCXXABI_BUILD_EXTERNAL_THREAD_LIBRARY@" +config.cxx_ext_threads = @LIBCXXABI_BUILD_EXTERNAL_THREAD_LIBRARY@ # Let the main config do the real work. lit_config.load_config(config, "@LIBCXXABI_SOURCE_DIR@/test/lit.cfg") diff --git a/libunwind/CMakeLists.txt b/libunwind/CMakeLists.txt index 41b990f81c49b..debc84786912a 100644 --- a/libunwind/CMakeLists.txt +++ b/libunwind/CMakeLists.txt @@ -115,7 +115,6 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}) set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}) else() - set(LLVM_MAIN_SRC_DIR "${CMAKE_SOURCE_DIR}" CACHE PATH "Path to LLVM source tree") set(LLVM_LIT "${CMAKE_SOURCE_DIR}/utils/lit/lit.py") endif() @@ -215,22 +214,38 @@ macro(unwind_append_if list condition var) endif() endmacro() -macro(add_target_flags_if condition var) +macro(add_target_flags) + foreach(value ${ARGN}) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${value}") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${value}") + list(APPEND LIBUNWIND_COMPILE_FLAGS ${value}) + list(APPEND LIBUNWIND_LINK_FLAGS ${value}) + endforeach() +endmacro() + +macro(add_target_flags_if condition) if (${condition}) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${var}") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${var}") - list(APPEND LIBUNWIND_COMPILE_FLAGS ${var}) - list(APPEND LIBUNWIND_LINK_FLAGS ${var}) + add_target_flags(${ARGN}) endif() endmacro() add_target_flags_if(LIBUNWIND_BUILD_32_BITS "-m32") -add_target_flags_if(LIBUNWIND_TARGET_TRIPLE - "--target=${LIBUNWIND_TARGET_TRIPLE}") -add_target_flags_if(LIBUNWIND_GCC_TOOLCHAIN - "--gcc-toolchain=${LIBUNWIND_GCC_TOOLCHAIN}") -add_target_flags_if(LIBUNWIND_SYSROOT - "--sysroot=${LIBUNWIND_SYSROOT}") + +if(LIBUNWIND_TARGET_TRIPLE) + add_target_flags("--target=${LIBUNWIND_TARGET_TRIPLE}") +elseif(CMAKE_CXX_COMPILER_TARGET) + set(LIBUNWIND_TARGET_TRIPLE "${CMAKE_CXX_COMPILER_TARGET}") +endif() +if(LIBUNWIND_GCC_TOOLCHAIN) + add_target_flags("--gcc-toolchain=${LIBUNWIND_GCC_TOOLCHAIN}") +elseif(CMAKE_CXX_COMPILER_EXTERNAL_TOOLCHAIN) + set(LIBUNWIND_GCC_TOOLCHAIN "${CMAKE_CXX_COMPILER_EXTERNAL_TOOLCHAIN}") +endif() +if(LIBUNWIND_SYSROOT) + add_target_flags("--sysroot=${LIBUNWIND_SYSROOT}") +elseif(CMAKE_SYSROOT) + set(LIBUNWIND_SYSROOT "${CMAKE_SYSROOT}") +endif() if (LIBUNWIND_TARGET_TRIPLE) set(TARGET_TRIPLE "${LIBUNWIND_TARGET_TRIPLE}") diff --git a/libunwind/test/CMakeLists.txt b/libunwind/test/CMakeLists.txt index 97917b820a396..d902e3e829410 100644 --- a/libunwind/test/CMakeLists.txt +++ b/libunwind/test/CMakeLists.txt @@ -16,6 +16,7 @@ pythonize_bool(LIBCXX_ENABLE_SHARED) pythonize_bool(LIBUNWIND_ENABLE_SHARED) pythonize_bool(LIBUNWIND_ENABLE_THREADS) pythonize_bool(LIBUNWIND_ENABLE_EXCEPTIONS) +pythonize_bool(LIBUNWIND_USE_COMPILER_RT) pythonize_bool(LIBUNWIND_BUILD_EXTERNAL_THREAD_LIBRARY) set(LIBUNWIND_TARGET_INFO "libcxx.test.target_info.LocalTI" CACHE STRING "TargetInfo to use when setting up test environment.") diff --git a/libunwind/test/lit.site.cfg.in b/libunwind/test/lit.site.cfg.in index 8e3bb72e0a479..34da72ac10684 100644 --- a/libunwind/test/lit.site.cfg.in +++ b/libunwind/test/lit.site.cfg.in @@ -7,23 +7,24 @@ config.abi_library_path = "@LIBUNWIND_LIBRARY_DIR@" config.libcxx_src_root = "@LIBUNWIND_LIBCXX_PATH@" config.libunwind_headers = "@LIBUNWIND_SOURCE_DIR@/include" config.cxx_library_root = "@LIBUNWIND_LIBCXX_LIBRARY_PATH@" -config.llvm_unwinder = "1" -config.enable_threads = "@LIBUNWIND_ENABLE_THREADS@" +config.llvm_unwinder = True +config.builtins_library = "@LIBUNWIND_BUILTINS_LIBRARY@" +config.enable_threads = @LIBUNWIND_ENABLE_THREADS@ config.use_sanitizer = "@LLVM_USE_SANITIZER@" -config.enable_32bit = "@LIBUNWIND_BUILD_32_BITS@" +config.enable_32bit = @LIBUNWIND_BUILD_32_BITS@ config.target_info = "@LIBUNWIND_TARGET_INFO@" config.test_linker_flags = "@LIBUNWIND_TEST_LINKER_FLAGS@" config.test_compiler_flags = "@LIBUNWIND_TEST_COMPILER_FLAGS@" config.executor = "@LIBUNWIND_EXECUTOR@" -config.libunwind_shared = "@LIBUNWIND_ENABLE_SHARED@" -config.enable_shared = "@LIBCXX_ENABLE_SHARED@" -config.enable_exceptions = "@LIBUNWIND_ENABLE_EXCEPTIONS@" +config.libunwind_shared = @LIBUNWIND_ENABLE_SHARED@ +config.enable_shared = @LIBCXX_ENABLE_SHARED@ +config.enable_exceptions = @LIBUNWIND_ENABLE_EXCEPTIONS@ config.host_triple = "@LLVM_HOST_TRIPLE@" config.target_triple = "@TARGET_TRIPLE@" -config.use_target = len("@LIBUNWIND_TARGET_TRIPLE@") > 0 +config.use_target = bool("@LIBUNWIND_TARGET_TRIPLE@") config.sysroot = "@LIBUNWIND_SYSROOT@" config.gcc_toolchain = "@LIBUNWIND_GCC_TOOLCHAIN@" -config.cxx_ext_threads = "@LIBUNWIND_BUILD_EXTERNAL_THREAD_LIBRARY@" +config.cxx_ext_threads = @LIBUNWIND_BUILD_EXTERNAL_THREAD_LIBRARY@ # Let the main config do the real work. lit_config.load_config(config, "@LIBUNWIND_SOURCE_DIR@/test/lit.cfg") diff --git a/lld/COFF/Chunks.cpp b/lld/COFF/Chunks.cpp index 8c73bda7ceb5a..4f12ecb3d87ba 100644 --- a/lld/COFF/Chunks.cpp +++ b/lld/COFF/Chunks.cpp @@ -594,6 +594,40 @@ ArrayRef SectionChunk::getContents() const { return A; } +ArrayRef SectionChunk::consumeDebugMagic() { + assert(isCodeView()); + return consumeDebugMagic(getContents(), SectionName); +} + +ArrayRef SectionChunk::consumeDebugMagic(ArrayRef Data, + StringRef SectionName) { + if (Data.empty()) + return {}; + + // First 4 bytes are section magic. + if (Data.size() < 4) + fatal("the section is too short: " + SectionName); + + if (!SectionName.startswith(".debug$")) + fatal("invalid section: " + SectionName); + + unsigned Magic = support::endian::read32le(Data.data()); + unsigned ExpectedMagic = SectionName == ".debug$H" + ? DEBUG_HASHES_SECTION_MAGIC + : DEBUG_SECTION_MAGIC; + if (Magic != ExpectedMagic) + fatal("section: " + SectionName + " has an invalid magic: " + Twine(Magic)); + return Data.slice(4); +} + +SectionChunk *SectionChunk::findByName(ArrayRef Sections, + StringRef Name) { + for (SectionChunk *C : Sections) + if (C->getSectionName() == Name) + return C; + return nullptr; +} + void SectionChunk::replace(SectionChunk *Other) { Alignment = std::max(Alignment, Other->Alignment); Other->Repl = Repl; diff --git a/lld/COFF/Chunks.h b/lld/COFF/Chunks.h index 954c753aaba6d..8939853ba0df1 100644 --- a/lld/COFF/Chunks.h +++ b/lld/COFF/Chunks.h @@ -108,6 +108,8 @@ class Chunk { // The alignment of this chunk. The writer uses the value. uint32_t Alignment = 1; + virtual bool isHotPatchable() const { return false; } + protected: Chunk(Kind K = OtherKind) : ChunkKind(K) {} const Kind ChunkKind; @@ -205,6 +207,16 @@ class SectionChunk final : public Chunk { // The section ID this chunk belongs to in its Obj. uint32_t getSectionNumber() const; + ArrayRef consumeDebugMagic(); + + static ArrayRef consumeDebugMagic(ArrayRef Data, + StringRef SectionName); + + static SectionChunk *findByName(ArrayRef Sections, + StringRef Name); + + bool isHotPatchable() const override { return File->HotPatchable; } + // A pointer pointing to a replacement for this chunk. // Initially it points to "this" object. If this chunk is merged // with other chunk by ICF, it points to another chunk, @@ -321,6 +333,8 @@ class ImportThunkChunkX64 : public Chunk { size_t getSize() const override { return sizeof(ImportThunkX86); } void writeTo(uint8_t *Buf) const override; + bool isHotPatchable() const override { return true; } + private: Defined *ImpSymbol; }; @@ -332,6 +346,8 @@ class ImportThunkChunkX86 : public Chunk { void getBaserels(std::vector *Res) override; void writeTo(uint8_t *Buf) const override; + bool isHotPatchable() const override { return true; } + private: Defined *ImpSymbol; }; @@ -343,6 +359,8 @@ class ImportThunkChunkARM : public Chunk { void getBaserels(std::vector *Res) override; void writeTo(uint8_t *Buf) const override; + bool isHotPatchable() const override { return true; } + private: Defined *ImpSymbol; }; @@ -353,6 +371,8 @@ class ImportThunkChunkARM64 : public Chunk { size_t getSize() const override { return sizeof(ImportThunkARM64); } void writeTo(uint8_t *Buf) const override; + bool isHotPatchable() const override { return true; } + private: Defined *ImpSymbol; }; diff --git a/lld/COFF/Config.h b/lld/COFF/Config.h index 31e6afaa34980..fefec40d3da9c 100644 --- a/lld/COFF/Config.h +++ b/lld/COFF/Config.h @@ -185,6 +185,7 @@ struct Configuration { uint32_t MajorOSVersion = 6; uint32_t MinorOSVersion = 0; uint32_t Timestamp = 0; + uint32_t FunctionPadMin = 0; bool DynamicBase = true; bool AllowBind = true; bool NxCompat = true; diff --git a/lld/COFF/Driver.cpp b/lld/COFF/Driver.cpp index 838936c11ddc5..564f6c16d5ee4 100644 --- a/lld/COFF/Driver.cpp +++ b/lld/COFF/Driver.cpp @@ -19,6 +19,7 @@ #include "lld/Common/Driver.h" #include "lld/Common/ErrorHandler.h" #include "lld/Common/Memory.h" +#include "lld/Common/Threads.h" #include "lld/Common/Timer.h" #include "lld/Common/Version.h" #include "llvm/ADT/Optional.h" @@ -224,23 +225,33 @@ void LinkerDriver::addArchiveBuffer(MemoryBufferRef MB, StringRef SymName, void LinkerDriver::enqueueArchiveMember(const Archive::Child &C, StringRef SymName, StringRef ParentName) { + + auto ReportBufferError = [=](Error &&E, + StringRef ChildName) { + fatal("could not get the buffer for the member defining symbol " + + SymName + ": " + ParentName + "(" + ChildName + "): " + + toString(std::move(E))); + }; + if (!C.getParent()->isThin()) { - MemoryBufferRef MB = CHECK( - C.getMemoryBufferRef(), - "could not get the buffer for the member defining symbol " + SymName); + Expected MBOrErr = C.getMemoryBufferRef(); + if (!MBOrErr) + ReportBufferError(MBOrErr.takeError(), check(C.getFullName())); + MemoryBufferRef MB = MBOrErr.get(); enqueueTask([=]() { Driver->addArchiveBuffer(MB, SymName, ParentName); }); return; } - auto Future = std::make_shared>(createFutureForFile( - CHECK(C.getFullName(), - "could not get the filename for the member defining symbol " + - SymName))); + std::string ChildName = CHECK( + C.getFullName(), + "could not get the filename for the member defining symbol " + + SymName); + auto Future = std::make_shared>( + createFutureForFile(ChildName)); enqueueTask([=]() { auto MBOrErr = Future->get(); if (MBOrErr.second) - fatal("could not get the buffer for the member defining " + SymName + - ": " + MBOrErr.second.message()); + ReportBufferError(errorCodeToError(MBOrErr.second), ChildName); Driver->addArchiveBuffer(takeBuffer(std::move(MBOrErr.first)), SymName, ParentName); }); @@ -897,6 +908,44 @@ static void parsePDBAltPath(StringRef AltPath) { Config->PDBAltPath = Buf; } +// In MinGW, if no symbols are chosen to be exported, then all symbols are +// automatically exported by default. This behavior can be forced by the +// -export-all-symbols option, so that it happens even when exports are +// explicitly specified. The automatic behavior can be disabled using the +// -exclude-all-symbols option, so that lld-link behaves like link.exe rather +// than MinGW in the case that nothing is explicitly exported. +void LinkerDriver::maybeExportMinGWSymbols(const opt::InputArgList &Args) { + if (!Config->DLL) + return; + + if (!Args.hasArg(OPT_export_all_symbols)) { + if (!Config->Exports.empty()) + return; + if (Args.hasArg(OPT_exclude_all_symbols)) + return; + } + + AutoExporter Exporter; + + for (auto *Arg : Args.filtered(OPT_wholearchive_file)) + if (Optional Path = doFindFile(Arg->getValue())) + Exporter.addWholeArchive(*Path); + + Symtab->forEachSymbol([&](Symbol *S) { + auto *Def = dyn_cast(S); + if (!Exporter.shouldExport(Def)) + return; + + Export E; + E.Name = Def->getName(); + E.Sym = Def; + if (Chunk *C = Def->getChunk()) + if (!(C->getOutputCharacteristics() & IMAGE_SCN_MEM_EXECUTE)) + E.Data = true; + Config->Exports.push_back(E); + }); +} + void LinkerDriver::link(ArrayRef ArgsArr) { // If the first command line argument is "/lib", link.exe acts like lib.exe. // We call our own implementation of lib.exe that understands bitcode files. @@ -939,6 +988,8 @@ void LinkerDriver::link(ArrayRef ArgsArr) { return; } + lld::ThreadsEnabled = Args.hasFlag(OPT_threads, OPT_threads_no, true); + if (Args.hasArg(OPT_show_timing)) Config->ShowTiming = true; @@ -1325,14 +1376,10 @@ void LinkerDriver::link(ArrayRef ArgsArr) { return; std::set WholeArchives; - AutoExporter Exporter; - for (auto *Arg : Args.filtered(OPT_wholearchive_file)) { - if (Optional Path = doFindFile(Arg->getValue())) { + for (auto *Arg : Args.filtered(OPT_wholearchive_file)) + if (Optional Path = doFindFile(Arg->getValue())) if (Optional ID = getUniqueID(*Path)) WholeArchives.insert(*ID); - Exporter.addWholeArchive(*Path); - } - } // A predicate returning true if a given path is an argument for // /wholearchive:, or /wholearchive is enabled globally. @@ -1374,6 +1421,10 @@ void LinkerDriver::link(ArrayRef ArgsArr) { } Config->Wordsize = Config->is64() ? 8 : 4; + // Handle /functionpadmin + for (auto *Arg : Args.filtered(OPT_functionpadmin, OPT_functionpadmin_opt)) + parseFunctionPadMin(Arg, Config->Machine); + // Input files can be Windows resource files (.res files). We use // WindowsResource to convert resource files to a regular COFF file, // then link the resulting file normally. @@ -1596,23 +1647,8 @@ void LinkerDriver::link(ArrayRef ArgsArr) { // In MinGW, all symbols are automatically exported if no symbols // are chosen to be exported. - if (Config->DLL && ((Config->MinGW && Config->Exports.empty()) || - Args.hasArg(OPT_export_all_symbols))) { - Exporter.initSymbolExcludes(); - - Symtab->forEachSymbol([=](Symbol *S) { - auto *Def = dyn_cast(S); - if (!Exporter.shouldExport(Def)) - return; - Export E; - E.Name = Def->getName(); - E.Sym = Def; - if (Def->getChunk() && - !(Def->getChunk()->getOutputCharacteristics() & IMAGE_SCN_MEM_EXECUTE)) - E.Data = true; - Config->Exports.push_back(E); - }); - } + if (Config->MinGW) + maybeExportMinGWSymbols(Args); // Windows specific -- when we are creating a .dll file, we also // need to create a .lib file. diff --git a/lld/COFF/Driver.h b/lld/COFF/Driver.h index a792986a5f842..51a21db0d15fc 100644 --- a/lld/COFF/Driver.h +++ b/lld/COFF/Driver.h @@ -96,6 +96,8 @@ class LinkerDriver { // Library search path. The first element is always "" (current directory). std::vector SearchPaths; + void maybeExportMinGWSymbols(const llvm::opt::InputArgList &Args); + // We don't want to add the same file more than once. // Files are uniquified by their filesystem and file number. std::set VisitedFiles; @@ -156,6 +158,9 @@ void parseMerge(StringRef); void parseSection(StringRef); void parseAligncomm(StringRef); +// Parses a string in the form of "[:]" +void parseFunctionPadMin(llvm::opt::Arg *A, llvm::COFF::MachineTypes Machine); + // Parses a string in the form of "EMBED[,=]|NO". void parseManifest(StringRef Arg); diff --git a/lld/COFF/DriverUtils.cpp b/lld/COFF/DriverUtils.cpp index c022f93e632ae..b790c1b3b78be 100644 --- a/lld/COFF/DriverUtils.cpp +++ b/lld/COFF/DriverUtils.cpp @@ -249,6 +249,27 @@ void parseAligncomm(StringRef S) { Config->AlignComm[Name] = std::max(Config->AlignComm[Name], 1 << V); } +// Parses /functionpadmin option argument. +void parseFunctionPadMin(llvm::opt::Arg *A, llvm::COFF::MachineTypes Machine) { + StringRef Arg = A->getNumValues() ? A->getValue() : ""; + if (!Arg.empty()) { + // Optional padding in bytes is given. + if (Arg.getAsInteger(0, Config->FunctionPadMin)) + error("/functionpadmin: invalid argument: " + Arg); + return; + } + // No optional argument given. + // Set default padding based on machine, similar to link.exe. + // There is no default padding for ARM platforms. + if (Machine == I386) { + Config->FunctionPadMin = 5; + } else if (Machine == AMD64) { + Config->FunctionPadMin = 6; + } else { + error("/functionpadmin: invalid argument for this machine: " + Arg); + } +} + // Parses a string in the form of "EMBED[,=]|NO". // Results are directly written to Config. void parseManifest(StringRef Arg) { diff --git a/lld/COFF/InputFiles.cpp b/lld/COFF/InputFiles.cpp index ba46184a62f2d..b0fbaeff374c0 100644 --- a/lld/COFF/InputFiles.cpp +++ b/lld/COFF/InputFiles.cpp @@ -19,6 +19,9 @@ #include "llvm/ADT/Triple.h" #include "llvm/ADT/Twine.h" #include "llvm/BinaryFormat/COFF.h" +#include "llvm/DebugInfo/CodeView/DebugSubsectionRecord.h" +#include "llvm/DebugInfo/CodeView/SymbolDeserializer.h" +#include "llvm/DebugInfo/CodeView/SymbolRecord.h" #include "llvm/Object/Binary.h" #include "llvm/Object/COFF.h" #include "llvm/Support/Casting.h" @@ -34,6 +37,7 @@ using namespace llvm; using namespace llvm::COFF; +using namespace llvm::codeview; using namespace llvm::object; using namespace llvm::support::endian; @@ -124,6 +128,7 @@ void ObjFile::parse() { // Read section and symbol tables. initializeChunks(); initializeSymbols(); + initializeFlags(); } const coff_section* ObjFile::getSection(uint32_t I) { @@ -384,6 +389,107 @@ Symbol *ObjFile::createUndefined(COFFSymbolRef Sym) { return Symtab->addUndefined(Name, this, Sym.isWeakExternal()); } +void ObjFile::handleComdatSelection(COFFSymbolRef Sym, COMDATType &Selection, + bool &Prevailing, DefinedRegular *Leader) { + if (Prevailing) + return; + // There's already an existing comdat for this symbol: `Leader`. + // Use the comdats's selection field to determine if the new + // symbol in `Sym` should be discarded, produce a duplicate symbol + // error, etc. + + SectionChunk *LeaderChunk = nullptr; + COMDATType LeaderSelection = IMAGE_COMDAT_SELECT_ANY; + + if (Leader->Data) { + LeaderChunk = Leader->getChunk(); + LeaderSelection = LeaderChunk->Selection; + } else { + // FIXME: comdats from LTO files don't know their selection; treat them + // as "any". + Selection = LeaderSelection; + } + + if ((Selection == IMAGE_COMDAT_SELECT_ANY && + LeaderSelection == IMAGE_COMDAT_SELECT_LARGEST) || + (Selection == IMAGE_COMDAT_SELECT_LARGEST && + LeaderSelection == IMAGE_COMDAT_SELECT_ANY)) { + // cl.exe picks "any" for vftables when building with /GR- and + // "largest" when building with /GR. To be able to link object files + // compiled with each flag, "any" and "largest" are merged as "largest". + LeaderSelection = Selection = IMAGE_COMDAT_SELECT_LARGEST; + } + + // Other than that, comdat selections must match. This is a bit more + // strict than link.exe which allows merging "any" and "largest" if "any" + // is the first symbol the linker sees, and it allows merging "largest" + // with everything (!) if "largest" is the first symbol the linker sees. + // Making this symmetric independent of which selection is seen first + // seems better though. + // (This behavior matches ModuleLinker::getComdatResult().) + if (Selection != LeaderSelection) { + log(("conflicting comdat type for " + toString(*Leader) + ": " + + Twine((int)LeaderSelection) + " in " + toString(Leader->getFile()) + + " and " + Twine((int)Selection) + " in " + toString(this)) + .str()); + Symtab->reportDuplicate(Leader, this); + return; + } + + switch (Selection) { + case IMAGE_COMDAT_SELECT_NODUPLICATES: + Symtab->reportDuplicate(Leader, this); + break; + + case IMAGE_COMDAT_SELECT_ANY: + // Nothing to do. + break; + + case IMAGE_COMDAT_SELECT_SAME_SIZE: + if (LeaderChunk->getSize() != getSection(Sym)->SizeOfRawData) + Symtab->reportDuplicate(Leader, this); + break; + + case IMAGE_COMDAT_SELECT_EXACT_MATCH: { + SectionChunk NewChunk(this, getSection(Sym)); + // link.exe only compares section contents here and doesn't complain + // if the two comdat sections have e.g. different alignment. + // Match that. + if (LeaderChunk->getContents() != NewChunk.getContents()) + Symtab->reportDuplicate(Leader, this); + break; + } + + case IMAGE_COMDAT_SELECT_ASSOCIATIVE: + // createDefined() is never called for IMAGE_COMDAT_SELECT_ASSOCIATIVE. + // (This means lld-link doesn't produce duplicate symbol errors for + // associative comdats while link.exe does, but associate comdats + // are never extern in practice.) + llvm_unreachable("createDefined not called for associative comdats"); + + case IMAGE_COMDAT_SELECT_LARGEST: + if (LeaderChunk->getSize() < getSection(Sym)->SizeOfRawData) { + // Replace the existing comdat symbol with the new one. + StringRef Name; + COFFObj->getSymbolName(Sym, Name); + // FIXME: This is incorrect: With /opt:noref, the previous sections + // make it into the final executable as well. Correct handling would + // be to undo reading of the whole old section that's being replaced, + // or doing one pass that determines what the final largest comdat + // is for all IMAGE_COMDAT_SELECT_LARGEST comdats and then reading + // only the largest one. + replaceSymbol(Leader, this, Name, /*IsCOMDAT*/ true, + /*IsExternal*/ true, Sym.getGeneric(), + nullptr); + Prevailing = true; + } + break; + + case IMAGE_COMDAT_SELECT_NEWEST: + llvm_unreachable("should have been rejected earlier"); + } +} + Optional ObjFile::createDefined( COFFSymbolRef Sym, std::vector &ComdatDefs, @@ -463,104 +569,8 @@ Optional ObjFile::createDefined( } COMDATType Selection = (COMDATType)Def->Selection; - if (!Prevailing && Leader->isCOMDAT()) { - // There's already an existing comdat for this symbol: `Leader`. - // Use the comdats's selection field to determine if the new - // symbol in `Sym` should be discarded, produce a duplicate symbol - // error, etc. - - SectionChunk *LeaderChunk = nullptr; - COMDATType LeaderSelection = IMAGE_COMDAT_SELECT_ANY; - - if (Leader->Data) { - LeaderChunk = Leader->getChunk(); - LeaderSelection = LeaderChunk->Selection; - } else { - // FIXME: comdats from LTO files don't know their selection; treat them - // as "any". - Selection = LeaderSelection; - } - - if ((Selection == IMAGE_COMDAT_SELECT_ANY && - LeaderSelection == IMAGE_COMDAT_SELECT_LARGEST) || - (Selection == IMAGE_COMDAT_SELECT_LARGEST && - LeaderSelection == IMAGE_COMDAT_SELECT_ANY)) { - // cl.exe picks "any" for vftables when building with /GR- and - // "largest" when building with /GR. To be able to link object files - // compiled with each flag, "any" and "largest" are merged as "largest". - LeaderSelection = Selection = IMAGE_COMDAT_SELECT_LARGEST; - } - - // Other than that, comdat selections must match. This is a bit more - // strict than link.exe which allows merging "any" and "largest" if "any" - // is the first symbol the linker sees, and it allows merging "largest" - // with everything (!) if "largest" is the first symbol the linker sees. - // Making this symmetric independent of which selection is seen first - // seems better though. - // (This behavior matches ModuleLinker::getComdatResult().) - if (Selection != LeaderSelection) { - std::string Msg = ("conflicting comdat type for " + toString(*Leader) + - ": " + Twine((int)LeaderSelection) + " in " + - toString(Leader->getFile()) + " and " + - Twine((int)Selection) + " in " + toString(this)) - .str(); - if (Config->ForceMultiple) - warn(Msg); - else - error(Msg); - } - - switch (Selection) { - case IMAGE_COMDAT_SELECT_NODUPLICATES: - Symtab->reportDuplicate(Leader, this); - break; - - case IMAGE_COMDAT_SELECT_ANY: - // Nothing to do. - break; - - case IMAGE_COMDAT_SELECT_SAME_SIZE: - if (LeaderChunk->getSize() != getSection(SectionNumber)->SizeOfRawData) - Symtab->reportDuplicate(Leader, this); - break; - - case IMAGE_COMDAT_SELECT_EXACT_MATCH: { - SectionChunk NewChunk(this, getSection(SectionNumber)); - // link.exe only compares section contents here and doesn't complain - // if the two comdat sections have e.g. different alignment. - // Match that. - if (LeaderChunk->getContents() != NewChunk.getContents()) - Symtab->reportDuplicate(Leader, this); - break; - } - - case IMAGE_COMDAT_SELECT_ASSOCIATIVE: - // createDefined() is never called for IMAGE_COMDAT_SELECT_ASSOCIATIVE. - // (This means lld-link doesn't produce duplicate symbol errors for - // associative comdats while link.exe does, but associate comdats - // are never extern in practice.) - llvm_unreachable("createDefined not called for associative comdats"); - - case IMAGE_COMDAT_SELECT_LARGEST: - if (LeaderChunk->getSize() < getSection(SectionNumber)->SizeOfRawData) { - // Replace the existing comdat symbol with the new one. - // FIXME: This is incorrect: With /opt:noref, the previous sections - // make it into the final executable as well. Correct handling would - // be to undo reading of the whole old section that's being replaced, - // or doing one pass that determines what the final largest comdat - // is for all IMAGE_COMDAT_SELECT_LARGEST comdats and then reading - // only the largest one. - replaceSymbol( - Leader, this, GetName(), /*IsCOMDAT*/ true, - /*IsExternal*/ true, Sym.getGeneric(), nullptr); - Prevailing = true; - } - break; - - case IMAGE_COMDAT_SELECT_NEWEST: - llvm_unreachable("should have been rejected earlier"); - } - } + if (Leader->isCOMDAT()) + handleComdatSelection(Sym, Selection, Prevailing, Leader); if (Prevailing) { SectionChunk *C = readSection(SectionNumber, Def, GetName()); @@ -593,6 +603,59 @@ MachineTypes ObjFile::getMachineType() { return IMAGE_FILE_MACHINE_UNKNOWN; } +ArrayRef ObjFile::getDebugSection(StringRef SecName) { + if (SectionChunk *Sec = SectionChunk::findByName(DebugChunks, SecName)) + return Sec->consumeDebugMagic(); + return {}; +} + +// OBJ files systematically store critical informations in a .debug$S stream, +// even if the TU was compiled with no debug info. At least two records are +// always there. S_OBJNAME stores a 32-bit signature, which is loaded into the +// PCHSignature member. S_COMPILE3 stores compile-time cmd-line flags. This is +// currently used to initialize the HotPatchable member. +void ObjFile::initializeFlags() { + ArrayRef Data = getDebugSection(".debug$S"); + if (Data.empty()) + return; + + DebugSubsectionArray Subsections; + + BinaryStreamReader Reader(Data, support::little); + ExitOnError ExitOnErr; + ExitOnErr(Reader.readArray(Subsections, Data.size())); + + for (const DebugSubsectionRecord &SS : Subsections) { + if (SS.kind() != DebugSubsectionKind::Symbols) + continue; + + unsigned Offset = 0; + + // Only parse the first two records. We are only looking for S_OBJNAME + // and S_COMPILE3, and they usually appear at the beginning of the + // stream. + for (unsigned I = 0; I < 2; ++I) { + Expected Sym = readSymbolFromStream(SS.getRecordData(), Offset); + if (!Sym) { + consumeError(Sym.takeError()); + return; + } + if (Sym->kind() == SymbolKind::S_COMPILE3) { + auto CS = + cantFail(SymbolDeserializer::deserializeAs(Sym.get())); + HotPatchable = + (CS.Flags & CompileSym3Flags::HotPatch) != CompileSym3Flags::None; + } + if (Sym->kind() == SymbolKind::S_OBJNAME) { + auto ObjName = cantFail(SymbolDeserializer::deserializeAs( + Sym.get())); + PCHSignature = ObjName.Signature; + } + Offset += Sym->length(); + } + } +} + StringRef ltrim1(StringRef S, const char *Chars) { if (!S.empty() && strchr(Chars, S[0])) return S.substr(1); @@ -683,6 +746,8 @@ void BitcodeFile::parse() { Sym = Symtab->addRegular(this, SymName); } Symbols.push_back(Sym); + if (ObjSym.isUsed()) + Config->GCRoot.push_back(Sym); } Directives = Obj->getCOFFLinkerOpts(); } diff --git a/lld/COFF/InputFiles.h b/lld/COFF/InputFiles.h index 6bf0af3c42463..78a95014d445b 100644 --- a/lld/COFF/InputFiles.h +++ b/lld/COFF/InputFiles.h @@ -46,6 +46,7 @@ class Chunk; class Defined; class DefinedImportData; class DefinedImportThunk; +class DefinedRegular; class Lazy; class SectionChunk; class Symbol; @@ -116,6 +117,8 @@ class ObjFile : public InputFile { ArrayRef getGuardLJmpChunks() { return GuardLJmpChunks; } ArrayRef getSymbols() { return Symbols; } + ArrayRef getDebugSection(StringRef SecName); + // Returns a Symbol object for the SymbolIndex'th symbol in the // underlying object file. Symbol *getSymbol(uint32_t SymbolIndex) { @@ -155,11 +158,18 @@ class ObjFile : public InputFile { // precompiled object. Any difference indicates out-of-date objects. llvm::Optional PCHSignature; + // Tells whether this file was compiled with /hotpatch + bool HotPatchable = false; + private: const coff_section* getSection(uint32_t I); + const coff_section *getSection(COFFSymbolRef Sym) { + return getSection(Sym.getSectionNumber()); + } void initializeChunks(); void initializeSymbols(); + void initializeFlags(); SectionChunk * readSection(uint32_t SectionNumber, @@ -183,6 +193,16 @@ class ObjFile : public InputFile { COFFSymbolRef Sym, const llvm::object::coff_aux_section_definition *Def, const llvm::DenseMap &PrevailingSectionMap); + // Given a new symbol Sym with comdat selection Selection, if the new + // symbol is not (yet) Prevailing and the existing comdat leader set to + // Leader, emits a diagnostic if the new symbol and its selection doesn't + // match the existing symbol and its selection. If either old or new + // symbol have selection IMAGE_COMDAT_SELECT_LARGEST, Sym might replace + // the existing leader. In that case, Prevailing is set to true. + void handleComdatSelection(COFFSymbolRef Sym, + llvm::COFF::COMDATType &Selection, + bool &Prevailing, DefinedRegular *Leader); + llvm::Optional createDefined(COFFSymbolRef Sym, std::vector diff --git a/lld/COFF/MapFile.cpp b/lld/COFF/MapFile.cpp index f8cdcc14191fe..5e1a3d005aae7 100644 --- a/lld/COFF/MapFile.cpp +++ b/lld/COFF/MapFile.cpp @@ -23,7 +23,7 @@ #include "Symbols.h" #include "Writer.h" #include "lld/Common/ErrorHandler.h" -#include "llvm/Support/Parallel.h" +#include "lld/Common/Threads.h" #include "llvm/Support/raw_ostream.h" using namespace llvm; @@ -75,7 +75,7 @@ static SymbolMapTy getSectionSyms(ArrayRef Syms) { static DenseMap getSymbolStrings(ArrayRef Syms) { std::vector Str(Syms.size()); - for_each_n(parallel::par, (size_t)0, Syms.size(), [&](size_t I) { + parallelForEachN((size_t)0, Syms.size(), [&](size_t I) { raw_string_ostream OS(Str[I]); writeHeader(OS, Syms[I]->getRVA(), 0, 0); OS << Indent16 << toString(*Syms[I]); diff --git a/lld/COFF/MinGW.cpp b/lld/COFF/MinGW.cpp index ee9833edf55ca..9d3815d2e6e9d 100644 --- a/lld/COFF/MinGW.cpp +++ b/lld/COFF/MinGW.cpp @@ -18,7 +18,34 @@ using namespace lld::coff; using namespace llvm; using namespace llvm::COFF; -void AutoExporter::initSymbolExcludes() { +AutoExporter::AutoExporter() { + ExcludeLibs = { + "libgcc", + "libgcc_s", + "libstdc++", + "libmingw32", + "libmingwex", + "libg2c", + "libsupc++", + "libobjc", + "libgcj", + "libclang_rt.builtins", + "libclang_rt.builtins-aarch64", + "libclang_rt.builtins-arm", + "libclang_rt.builtins-i386", + "libclang_rt.builtins-x86_64", + "libc++", + "libc++abi", + "libunwind", + "libmsvcrt", + "libucrtbase", + }; + + ExcludeObjects = { + "crt0.o", "crt1.o", "crt1u.o", "crt2.o", "crt2u.o", "dllcrt1.o", + "dllcrt2.o", "gcrt0.o", "gcrt1.o", "gcrt2.o", "crtbegin.o", "crtend.o", + }; + ExcludeSymbolPrefixes = { // Import symbols "__imp_", @@ -31,10 +58,12 @@ void AutoExporter::initSymbolExcludes() { // Artifical symbols such as .refptr ".", }; + ExcludeSymbolSuffixes = { "_iname", "_NULL_THUNK_DATA", }; + if (Config->Machine == I386) { ExcludeSymbols = { "__NULL_IMPORT_DESCRIPTOR", @@ -72,44 +101,6 @@ void AutoExporter::initSymbolExcludes() { } } -AutoExporter::AutoExporter() { - ExcludeLibs = { - "libgcc", - "libgcc_s", - "libstdc++", - "libmingw32", - "libmingwex", - "libg2c", - "libsupc++", - "libobjc", - "libgcj", - "libclang_rt.builtins", - "libclang_rt.builtins-aarch64", - "libclang_rt.builtins-arm", - "libclang_rt.builtins-i386", - "libclang_rt.builtins-x86_64", - "libc++", - "libc++abi", - "libunwind", - "libmsvcrt", - "libucrtbase", - }; - ExcludeObjects = { - "crt0.o", - "crt1.o", - "crt1u.o", - "crt2.o", - "crt2u.o", - "dllcrt1.o", - "dllcrt2.o", - "gcrt0.o", - "gcrt1.o", - "gcrt2.o", - "crtbegin.o", - "crtend.o", - }; -} - void AutoExporter::addWholeArchive(StringRef Path) { StringRef LibName = sys::path::filename(Path); // Drop the file extension, to match the processing below. diff --git a/lld/COFF/MinGW.h b/lld/COFF/MinGW.h index 51448ddbd8d8f..fde9eeb939272 100644 --- a/lld/COFF/MinGW.h +++ b/lld/COFF/MinGW.h @@ -22,8 +22,6 @@ class AutoExporter { public: AutoExporter(); - void initSymbolExcludes(); - void addWholeArchive(StringRef Path); llvm::StringSet<> ExcludeSymbols; diff --git a/lld/COFF/Options.td b/lld/COFF/Options.td index acf1bc5c8b1dc..08a706a437f50 100644 --- a/lld/COFF/Options.td +++ b/lld/COFF/Options.td @@ -32,6 +32,8 @@ def errorlimit : P<"errorlimit", def export : P<"export", "Export a function">; // No help text because /failifmismatch is not intended to be used by the user. def failifmismatch : P<"failifmismatch", "">; +def functionpadmin : F<"functionpadmin">; +def functionpadmin_opt : P<"functionpadmin", "Prepares an image for hotpatching">; def guard : P<"guard", "Control flow guard">; def heap : P<"heap", "Size of the heap">; def ignore : P<"ignore", "Specify warning codes to ignore">; @@ -150,6 +152,7 @@ def help : F<"help">; def help_q : Flag<["/?", "-?"], "">, Alias; // LLD extensions +def exclude_all_symbols : F<"exclude-all-symbols">; def export_all_symbols : F<"export-all-symbols">; def kill_at : F<"kill-at">; def lldmingw : F<"lldmingw">; @@ -160,6 +163,9 @@ def rsp_quoting : Joined<["--"], "rsp-quoting=">, HelpText<"Quoting style for response files, 'windows' (default) or 'posix'">; def dash_dash_version : Flag<["--"], "version">, HelpText<"Print version information">; +defm threads: B<"threads", + "Run the linker multi-threaded (default)", + "Do not run the linker multi-threaded">; // Flags for debugging def lldmap : F<"lldmap">; @@ -177,7 +183,6 @@ multiclass QB { def _no : F; } -def functionpadmin : F<"functionpadmin">; def ignoreidl : F<"ignoreidl">; def nologo : F<"nologo">; def throwingnew : F<"throwingnew">; diff --git a/lld/COFF/PDB.cpp b/lld/COFF/PDB.cpp index e8acc1812761c..a49ac51b69787 100644 --- a/lld/COFF/PDB.cpp +++ b/lld/COFF/PDB.cpp @@ -15,6 +15,7 @@ #include "Writer.h" #include "lld/Common/ErrorHandler.h" #include "lld/Common/Timer.h" +#include "lld/Common/Threads.h" #include "llvm/DebugInfo/CodeView/DebugFrameDataSubsection.h" #include "llvm/DebugInfo/CodeView/DebugSubsectionRecord.h" #include "llvm/DebugInfo/CodeView/GlobalTypeTableBuilder.h" @@ -52,7 +53,6 @@ #include "llvm/Support/Errc.h" #include "llvm/Support/FormatVariadic.h" #include "llvm/Support/JamCRC.h" -#include "llvm/Support/Parallel.h" #include "llvm/Support/Path.h" #include "llvm/Support/ScopedPrinter.h" #include @@ -287,43 +287,25 @@ static void pdbMakeAbsolute(SmallVectorImpl &FileName) { // It's not absolute in any path syntax. Relative paths necessarily refer to // the local file system, so we can make it native without ending up with a // nonsensical path. - sys::path::native(FileName); if (Config->PDBSourcePath.empty()) { + sys::path::native(FileName); sys::fs::make_absolute(FileName); return; } - // Only apply native and dot removal to the relative file path. We want to - // leave the path the user specified untouched since we assume they specified - // it for a reason. - sys::path::remove_dots(FileName, /*remove_dot_dots=*/true); + // Try to guess whether /PDBSOURCEPATH is a unix path or a windows path. + // Since PDB's are more of a Windows thing, we make this conservative and only + // decide that it's a unix path if we're fairly certain. Specifically, if + // it starts with a forward slash. SmallString<128> AbsoluteFileName = Config->PDBSourcePath; - sys::path::append(AbsoluteFileName, FileName); - FileName = std::move(AbsoluteFileName); -} - -static SectionChunk *findByName(ArrayRef Sections, - StringRef Name) { - for (SectionChunk *C : Sections) - if (C->getSectionName() == Name) - return C; - return nullptr; -} + sys::path::Style GuessedStyle = AbsoluteFileName.startswith("/") + ? sys::path::Style::posix + : sys::path::Style::windows; + sys::path::append(AbsoluteFileName, GuessedStyle, FileName); + sys::path::native(AbsoluteFileName, GuessedStyle); + sys::path::remove_dots(AbsoluteFileName, true, GuessedStyle); -static ArrayRef consumeDebugMagic(ArrayRef Data, - StringRef SecName) { - // First 4 bytes are section magic. - if (Data.size() < 4) - fatal(SecName + " too short"); - if (support::endian::read32le(Data.data()) != COFF::DEBUG_SECTION_MAGIC) - fatal(SecName + " has an invalid magic"); - return Data.slice(4); -} - -static ArrayRef getDebugSection(ObjFile *File, StringRef SecName) { - if (SectionChunk *Sec = findByName(File->getDebugChunks(), SecName)) - return consumeDebugMagic(Sec->getContents(), SecName); - return {}; + FileName = std::move(AbsoluteFileName); } // A COFF .debug$H section is currently a clang extension. This function checks @@ -343,7 +325,8 @@ static bool canUseDebugH(ArrayRef DebugH) { } static Optional> getDebugH(ObjFile *File) { - SectionChunk *Sec = findByName(File->getDebugChunks(), ".debug$H"); + SectionChunk *Sec = + SectionChunk::findByName(File->getDebugChunks(), ".debug$H"); if (!Sec) return llvm::None; ArrayRef Contents = Sec->getContents(); @@ -375,51 +358,17 @@ static void addTypeInfo(pdb::TpiStreamBuilder &TpiBuilder, }); } -// OBJs usually start their symbol stream with a S_OBJNAME record. This record -// also contains the signature/key of the current PCH session. The signature -// must be same for all objects which depend on the precompiled object. -// Recompiling the precompiled headers will generate a new PCH key and thus -// invalidate all the dependent objects. -static uint32_t extractPCHSignature(ObjFile *File) { - auto DbgIt = find_if(File->getDebugChunks(), [](SectionChunk *C) { - return C->getSectionName() == ".debug$S"; - }); - if (!DbgIt) - return 0; - - ArrayRef Contents = - consumeDebugMagic((*DbgIt)->getContents(), ".debug$S"); - DebugSubsectionArray Subsections; - BinaryStreamReader Reader(Contents, support::little); - ExitOnErr(Reader.readArray(Subsections, Contents.size())); - - for (const DebugSubsectionRecord &SS : Subsections) { - if (SS.kind() != DebugSubsectionKind::Symbols) - continue; - - // If it's there, the S_OBJNAME record shall come first in the stream. - Expected Sym = readSymbolFromStream(SS.getRecordData(), 0); - if (!Sym) { - consumeError(Sym.takeError()); - continue; - } - if (auto ObjName = SymbolDeserializer::deserializeAs(Sym.get())) - return ObjName->Signature; - } - return 0; -} - Expected PDBLinker::mergeDebugT(ObjFile *File, CVIndexMap *ObjectIndexMap) { ScopedTimer T(TypeMergingTimer); bool IsPrecompiledHeader = false; - ArrayRef Data = getDebugSection(File, ".debug$T"); + ArrayRef Data = File->getDebugSection(".debug$T"); if (Data.empty()) { // Try again, Microsoft precompiled headers use .debug$P instead of // .debug$T - Data = getDebugSection(File, ".debug$P"); + Data = File->getDebugSection(".debug$P"); IsPrecompiledHeader = true; } if (Data.empty()) @@ -428,7 +377,7 @@ PDBLinker::mergeDebugT(ObjFile *File, CVIndexMap *ObjectIndexMap) { // Precompiled headers objects need to save the index map for further // reference by other objects which use the precompiled headers. if (IsPrecompiledHeader) { - uint32_t PCHSignature = extractPCHSignature(File); + uint32_t PCHSignature = File->PCHSignature.getValueOr(0); if (PCHSignature == 0) fatal("No signature found for the precompiled headers OBJ (" + File->getName() + ")"); @@ -1170,7 +1119,7 @@ translateStringTableIndex(uint32_t ObjIndex, void DebugSHandler::handleDebugS(lld::coff::SectionChunk &DebugS) { DebugSubsectionArray Subsections; - ArrayRef RelocatedDebugContents = consumeDebugMagic( + ArrayRef RelocatedDebugContents = SectionChunk::consumeDebugMagic( relocateDebugChunk(Linker.Alloc, DebugS), DebugS.getSectionName()); BinaryStreamReader Reader(RelocatedDebugContents, support::little); @@ -1391,10 +1340,9 @@ void PDBLinker::addObjectsToPDB() { if (!Publics.empty()) { // Sort the public symbols and add them to the stream. - sort(parallel::par, Publics.begin(), Publics.end(), - [](const PublicSym32 &L, const PublicSym32 &R) { - return L.Name < R.Name; - }); + parallelSort(Publics, [](const PublicSym32 &L, const PublicSym32 &R) { + return L.Name < R.Name; + }); for (const PublicSym32 &Pub : Publics) GsiBuilder.addPublicSymbol(Pub); } @@ -1670,7 +1618,7 @@ static bool findLineTable(const SectionChunk *C, uint32_t Addr, } ArrayRef Contents = - consumeDebugMagic(DbgC->getContents(), ".debug$S"); + SectionChunk::consumeDebugMagic(DbgC->getContents(), ".debug$S"); DebugSubsectionArray Subsections; BinaryStreamReader Reader(Contents, support::little); ExitOnErr(Reader.readArray(Subsections, Contents.size())); diff --git a/lld/COFF/Writer.cpp b/lld/COFF/Writer.cpp index 8eda9604f0bc0..678dd66bfa6f0 100644 --- a/lld/COFF/Writer.cpp +++ b/lld/COFF/Writer.cpp @@ -16,6 +16,7 @@ #include "Symbols.h" #include "lld/Common/ErrorHandler.h" #include "lld/Common/Memory.h" +#include "lld/Common/Threads.h" #include "lld/Common/Timer.h" #include "llvm/ADT/DenseMap.h" #include "llvm/ADT/STLExtras.h" @@ -159,15 +160,12 @@ class CVDebugRecordChunk : public Chunk { // PartialSection represents a group of chunks that contribute to an // OutputSection. Collating a collection of PartialSections of same name and // characteristics constitutes the OutputSection. -class PartialSection { +class PartialSectionKey { public: - PartialSection(StringRef N, uint32_t Chars) - : Name(N), Characteristics(Chars) {} StringRef Name; unsigned Characteristics; - std::vector Chunks; - bool operator<(const PartialSection &Other) const { + bool operator<(const PartialSectionKey &Other) const { int C = Name.compare(Other.Name); if (C == 1) return false; @@ -177,10 +175,13 @@ class PartialSection { } }; -struct PartialLess { - bool operator()(PartialSection *L, PartialSection *R) const { - return *L < *R; - } +class PartialSection { +public: + PartialSection(StringRef N, uint32_t Chars) + : Name(N), Characteristics(Chars) {} + StringRef Name; + unsigned Characteristics; + std::vector Chunks; }; // The writer writes a SymbolTable result to a file. @@ -234,7 +235,7 @@ class Writer { uint32_t getSizeOfInitializedData(); std::unique_ptr &Buffer; - std::set PartialSections; + std::map PartialSections; std::vector OutputSections; std::vector Strtab; std::vector OutputSymtab; @@ -628,7 +629,8 @@ bool Writer::fixGnuImportChunks() { // Make sure all .idata$* section chunks are mapped as RDATA in order to // be sorted into the same sections as our own synthesized .idata chunks. - for (PartialSection *PSec : PartialSections) { + for (auto It : PartialSections) { + PartialSection *PSec = It.second; if (!PSec->Name.startswith(".idata")) continue; if (PSec->Characteristics == RDATA) @@ -642,7 +644,8 @@ bool Writer::fixGnuImportChunks() { bool HasIdata = false; // Sort all .idata$* chunks, grouping chunks from the same library, // with alphabetical ordering of the object fils within a library. - for (PartialSection *PSec : PartialSections) { + for (auto It : PartialSections) { + PartialSection *PSec = It.second; if (!PSec->Name.startswith(".idata")) continue; @@ -773,8 +776,8 @@ void Writer::createSections() { // Process an /order option. if (!Config->Order.empty()) - for (PartialSection *PSec : PartialSections) - sortBySectionOrder(PSec->Chunks); + for (auto It : PartialSections) + sortBySectionOrder(It.second->Chunks); if (HasIdata) locateImportTables(); @@ -783,7 +786,8 @@ void Writer::createSections() { // '$' and all following characters in input section names are // discarded when determining output section. So, .text$foo // contributes to .text, for example. See PE/COFF spec 3.2. - for (PartialSection *PSec : PartialSections) { + for (auto It : PartialSections) { + PartialSection *PSec = It.second; StringRef Name = getOutputSectionName(PSec->Name); uint32_t OutChars = PSec->Characteristics; @@ -1093,8 +1097,7 @@ void Writer::mergeSections() { // Visits all sections to initialize their relocation targets. void Writer::readRelocTargets() { for (OutputSection *Sec : OutputSections) - for_each(parallel::par, Sec->Chunks.begin(), Sec->Chunks.end(), - [&](Chunk *C) { C->readRelocTargets(); }); + parallelForEach(Sec->Chunks, [&](Chunk *C) { C->readRelocTargets(); }); } // Visits all sections to assign incremental, non-overlapping RVAs and @@ -1114,7 +1117,18 @@ void Writer::assignAddresses() { addBaserels(); uint64_t RawSize = 0, VirtualSize = 0; Sec->Header.VirtualAddress = RVA; + + // If /FUNCTIONPADMIN is used, functions are padded in order to create a + // hotpatchable image. + const bool IsCodeSection = + (Sec->Header.Characteristics & IMAGE_SCN_CNT_CODE) && + (Sec->Header.Characteristics & IMAGE_SCN_MEM_READ) && + (Sec->Header.Characteristics & IMAGE_SCN_MEM_EXECUTE); + uint32_t Padding = IsCodeSection ? Config->FunctionPadMin : 0; + for (Chunk *C : Sec->Chunks) { + if (Padding && C->isHotPatchable()) + VirtualSize += Padding; VirtualSize = alignTo(VirtualSize, C->Alignment); C->setRVA(RVA + VirtualSize); C->OutputSectionOff = VirtualSize; @@ -1376,19 +1390,47 @@ static void addSymbolToRVASet(SymbolRVASet &RVASet, Defined *S) { // symbol in an executable section. static void maybeAddAddressTakenFunction(SymbolRVASet &AddressTakenSyms, Symbol *S) { - auto *D = dyn_cast_or_null(S); - - // Ignore undefined symbols and references to non-functions (e.g. globals and - // labels). - if (!D || - D->getCOFFSymbol().getComplexType() != COFF::IMAGE_SYM_DTYPE_FUNCTION) + if (!S) return; - // Mark the symbol as address taken if it's in an executable section. - Chunk *RefChunk = D->getChunk(); - OutputSection *OS = RefChunk ? RefChunk->getOutputSection() : nullptr; - if (OS && OS->Header.Characteristics & IMAGE_SCN_MEM_EXECUTE) - addSymbolToRVASet(AddressTakenSyms, D); + switch (S->kind()) { + case Symbol::DefinedLocalImportKind: + case Symbol::DefinedImportDataKind: + // Defines an __imp_ pointer, so it is data, so it is ignored. + break; + case Symbol::DefinedCommonKind: + // Common is always data, so it is ignored. + break; + case Symbol::DefinedAbsoluteKind: + case Symbol::DefinedSyntheticKind: + // Absolute is never code, synthetic generally isn't and usually isn't + // determinable. + break; + case Symbol::LazyKind: + case Symbol::UndefinedKind: + // Undefined symbols resolve to zero, so they don't have an RVA. Lazy + // symbols shouldn't have relocations. + break; + + case Symbol::DefinedImportThunkKind: + // Thunks are always code, include them. + addSymbolToRVASet(AddressTakenSyms, cast(S)); + break; + + case Symbol::DefinedRegularKind: { + // This is a regular, defined, symbol from a COFF file. Mark the symbol as + // address taken if the symbol type is function and it's in an executable + // section. + auto *D = cast(S); + if (D->getCOFFSymbol().getComplexType() == COFF::IMAGE_SYM_DTYPE_FUNCTION) { + Chunk *RefChunk = D->getChunk(); + OutputSection *OS = RefChunk ? RefChunk->getOutputSection() : nullptr; + if (OS && OS->Header.Characteristics & IMAGE_SCN_MEM_EXECUTE) + addSymbolToRVASet(AddressTakenSyms, D); + } + break; + } + } } // Visit all relocations from all section contributions of this object file and @@ -1599,8 +1641,7 @@ void Writer::writeSections() { // ADD instructions). if (Sec->Header.Characteristics & IMAGE_SCN_CNT_CODE) memset(SecBuf, 0xCC, Sec->getRawSize()); - for_each(parallel::par, Sec->Chunks.begin(), Sec->Chunks.end(), - [&](Chunk *C) { C->writeTo(SecBuf); }); + parallelForEach(Sec->Chunks, [&](Chunk *C) { C->writeTo(SecBuf); }); } } @@ -1668,14 +1709,16 @@ void Writer::sortExceptionTable() { uint8_t *End = BufAddr(LastPdata) + LastPdata->getSize(); if (Config->Machine == AMD64) { struct Entry { ulittle32_t Begin, End, Unwind; }; - sort(parallel::par, (Entry *)Begin, (Entry *)End, - [](const Entry &A, const Entry &B) { return A.Begin < B.Begin; }); + parallelSort( + MutableArrayRef((Entry *)Begin, (Entry *)End), + [](const Entry &A, const Entry &B) { return A.Begin < B.Begin; }); return; } if (Config->Machine == ARMNT || Config->Machine == ARM64) { struct Entry { ulittle32_t Begin, Unwind; }; - sort(parallel::par, (Entry *)Begin, (Entry *)End, - [](const Entry &A, const Entry &B) { return A.Begin < B.Begin; }); + parallelSort( + MutableArrayRef((Entry *)Begin, (Entry *)End), + [](const Entry &A, const Entry &B) { return A.Begin < B.Begin; }); return; } errs() << "warning: don't know how to handle .pdata.\n"; @@ -1771,19 +1814,16 @@ void Writer::addBaserelBlocks(std::vector &V) { PartialSection *Writer::createPartialSection(StringRef Name, uint32_t OutChars) { - PartialSection *PSec = findPartialSection(Name, OutChars); + PartialSection *&PSec = PartialSections[{Name, OutChars}]; if (PSec) return PSec; PSec = make(Name, OutChars); - PartialSections.insert(PSec); return PSec; } PartialSection *Writer::findPartialSection(StringRef Name, uint32_t OutChars) { - auto It = find_if(PartialSections, [&](PartialSection *P) { - return P->Name == Name && P->Characteristics == OutChars; - }); + auto It = PartialSections.find({Name, OutChars}); if (It != PartialSections.end()) - return *It; + return It->second; return nullptr; } diff --git a/lld/Common/CMakeLists.txt b/lld/Common/CMakeLists.txt index a45fe209f06f3..29f38d0e7e679 100644 --- a/lld/Common/CMakeLists.txt +++ b/lld/Common/CMakeLists.txt @@ -2,6 +2,31 @@ if(NOT LLD_BUILT_STANDALONE) set(tablegen_deps intrinsics_gen) endif() +find_first_existing_vc_file("${LLVM_MAIN_SRC_DIR}" llvm_vc) +find_first_existing_vc_file("${LLD_SOURCE_DIR}" lld_vc) + +set(version_inc "${CMAKE_CURRENT_BINARY_DIR}/VCSVersion.inc") +set(generate_vcs_version_script "${LLVM_CMAKE_PATH}/GenerateVersionFromVCS.cmake") + +if(lld_vc) + set(lld_source_dir ${LLD_SOURCE_DIR}) +endif() + +add_custom_command(OUTPUT "${version_inc}" + DEPENDS "${lld_vc}" "${generate_vcs_version_script}" + COMMAND ${CMAKE_COMMAND} "-DNAMES=LLD" + "-DLLD_SOURCE_DIR=${LLD_SOURCE_DIR}" + "-DHEADER_FILE=${version_inc}" + -P "${generate_vcs_version_script}") + +# Mark the generated header as being generated. +set_source_files_properties("${version_inc}" + PROPERTIES GENERATED TRUE + HEADER_FILE_ONLY TRUE) + +set_property(SOURCE Version.cpp APPEND PROPERTY + COMPILE_DEFINITIONS "HAVE_VCS_VERSION_INC") + add_lld_library(lldCommon Args.cpp ErrorHandler.cpp @@ -11,6 +36,7 @@ add_lld_library(lldCommon TargetOptionsCommandFlags.cpp Threads.cpp Timer.cpp + VCSVersion.inc Version.cpp ADDITIONAL_HEADER_DIRS diff --git a/lld/Common/Reproduce.cpp b/lld/Common/Reproduce.cpp index cae85125b7e0f..ce33d367bf559 100644 --- a/lld/Common/Reproduce.cpp +++ b/lld/Common/Reproduce.cpp @@ -48,12 +48,6 @@ std::string lld::quote(StringRef S) { return S; } -std::string lld::rewritePath(StringRef S) { - if (fs::exists(S)) - return relativeToRoot(S); - return S; -} - std::string lld::toString(const opt::Arg &Arg) { std::string K = Arg.getSpelling(); if (Arg.getNumValues() == 0) diff --git a/lld/Common/Version.cpp b/lld/Common/Version.cpp index 41a3236efbbe4..ae10f2f28b229 100644 --- a/lld/Common/Version.cpp +++ b/lld/Common/Version.cpp @@ -12,31 +12,16 @@ #include "lld/Common/Version.h" -using namespace llvm; +#ifdef HAVE_VCS_VERSION_INC +#include "VCSVersion.inc" +#endif -// Returns an SVN repository path, which is usually "trunk". -static std::string getRepositoryPath() { - StringRef S = LLD_REPOSITORY_STRING; - size_t Pos = S.find("lld/"); - if (Pos != StringRef::npos) - return S.substr(Pos + 4); - return S; -} - -// Returns an SVN repository name, e.g., " (trunk 284614)" -// or an empty string if no repository info is available. -static std::string getRepository() { - std::string Repo = getRepositoryPath(); - std::string Rev = LLD_REVISION_STRING; - - if (Repo.empty() && Rev.empty()) - return ""; - if (!Repo.empty() && !Rev.empty()) - return " (" + Repo + " " + Rev + ")"; - return " (" + Repo + Rev + ")"; -} - -// Returns a version string, e.g., "LLD 4.0 (lld/trunk 284614)". +// Returns a version string, e.g.: +// lld 9.0.0 (https://github.com/llvm/llvm-project.git 9efdd7ac5e914d3c9fa1ef) std::string lld::getLLDVersion() { - return "LLD " + std::string(LLD_VERSION_STRING) + getRepository(); +#if defined(LLD_REPOSITORY) && defined(LLD_REVISION) + return "LLD " LLD_VERSION_STRING " (" LLD_REPOSITORY " " LLD_REVISION ")"; +#else + return "LLD " LLD_VERSION_STRING; +#endif } diff --git a/lld/ELF/Arch/AMDGPU.cpp b/lld/ELF/Arch/AMDGPU.cpp index 4d863fad81e76..1798a2997db5b 100644 --- a/lld/ELF/Arch/AMDGPU.cpp +++ b/lld/ELF/Arch/AMDGPU.cpp @@ -74,7 +74,7 @@ void AMDGPU::relocateOne(uint8_t *Loc, RelType Type, uint64_t Val) const { write32le(Loc, Val >> 32); break; default: - error(getErrorLocation(Loc) + "unrecognized reloc " + Twine(Type)); + llvm_unreachable("unknown relocation"); } } @@ -94,7 +94,9 @@ RelExpr AMDGPU::getRelExpr(RelType Type, const Symbol &S, case R_AMDGPU_GOTPCREL32_HI: return R_GOT_PC; default: - return R_INVALID; + error(getErrorLocation(Loc) + "unknown relocation (" + Twine(Type) + + ") against symbol " + toString(S)); + return R_NONE; } } diff --git a/lld/ELF/Arch/Mips.cpp b/lld/ELF/Arch/Mips.cpp index a6d7e190980ef..694515717e77b 100644 --- a/lld/ELF/Arch/Mips.cpp +++ b/lld/ELF/Arch/Mips.cpp @@ -175,7 +175,9 @@ RelExpr MIPS::getRelExpr(RelType Type, const Symbol &S, case R_MIPS_NONE: return R_NONE; default: - return R_INVALID; + error(getErrorLocation(Loc) + "unknown relocation (" + Twine(Type) + + ") against symbol " + toString(S)); + return R_NONE; } } @@ -345,8 +347,8 @@ bool MIPS::needsThunk(RelExpr Expr, RelType Type, const InputFile *File, // we cannot make the jump directly and need to create a small stubs // to save the target function address. // See page 3-38 ftp://www.linux-mips.org/pub/linux/mips/doc/ABI/mipsabi.pdf - if (Type != R_MIPS_26 && Type != R_MICROMIPS_26_S1 && - Type != R_MICROMIPS_PC26_S1) + if (Type != R_MIPS_26 && Type != R_MIPS_PC26_S2 && + Type != R_MICROMIPS_26_S1 && Type != R_MICROMIPS_PC26_S1) return false; auto *F = dyn_cast_or_null>(File); if (!F) @@ -458,6 +460,65 @@ calculateMipsRelChain(uint8_t *Loc, RelType Type, uint64_t Val) { return std::make_pair(Type & 0xff, Val); } +static bool isBranchReloc(RelType Type) { + return Type == R_MIPS_26 || Type == R_MIPS_PC26_S2 || + Type == R_MIPS_PC21_S2 || Type == R_MIPS_PC16; +} + +static bool isMicroBranchReloc(RelType Type) { + return Type == R_MICROMIPS_26_S1 || Type == R_MICROMIPS_PC16_S1 || + Type == R_MICROMIPS_PC10_S1 || Type == R_MICROMIPS_PC7_S1; +} + +template +static uint64_t fixupCrossModeJump(uint8_t *Loc, RelType Type, uint64_t Val) { + // Here we need to detect jump/branch from regular MIPS code + // to a microMIPS target and vice versa. In that cases jump + // instructions need to be replaced by their "cross-mode" + // equivalents. + const endianness E = ELFT::TargetEndianness; + bool IsMicroTgt = Val & 0x1; + bool IsCrossJump = (IsMicroTgt && isBranchReloc(Type)) || + (!IsMicroTgt && isMicroBranchReloc(Type)); + if (!IsCrossJump) + return Val; + + switch (Type) { + case R_MIPS_26: { + uint32_t Inst = read32(Loc) >> 26; + if (Inst == 0x3 || Inst == 0x1d) { // JAL or JALX + writeValue(Loc, 0x1d << 26, 32, 0); + return Val; + } + break; + } + case R_MICROMIPS_26_S1: { + uint32_t Inst = readShuffle(Loc) >> 26; + if (Inst == 0x3d || Inst == 0x3c) { // JAL32 or JALX32 + Val >>= 1; + writeShuffleValue(Loc, 0x3c << 26, 32, 0); + return Val; + } + break; + } + case R_MIPS_PC26_S2: + case R_MIPS_PC21_S2: + case R_MIPS_PC16: + case R_MICROMIPS_PC16_S1: + case R_MICROMIPS_PC10_S1: + case R_MICROMIPS_PC7_S1: + // FIXME (simon): Support valid branch relocations. + break; + default: + llvm_unreachable("unexpected jump/branch relocation"); + } + + error(getErrorLocation(Loc) + + "unsupported jump/branch instruction between ISA modes referenced by " + + toString(Type) + " relocation"); + return Val; +} + template void MIPS::relocateOne(uint8_t *Loc, RelType Type, uint64_t Val) const { const endianness E = ELFT::TargetEndianness; @@ -465,6 +526,9 @@ void MIPS::relocateOne(uint8_t *Loc, RelType Type, uint64_t Val) const { if (ELFT::Is64Bits || Config->MipsN32Abi) std::tie(Type, Val) = calculateMipsRelChain(Loc, Type, Val); + // Detect cross-mode jump/branch and fix instruction. + Val = fixupCrossModeJump(Loc, Type, Val); + // Thread pointer and DRP offsets from the start of TLS data area. // https://www.linux-mips.org/wiki/NPTL if (Type == R_MIPS_TLS_DTPREL_HI16 || Type == R_MIPS_TLS_DTPREL_LO16 || @@ -631,7 +695,7 @@ void MIPS::relocateOne(uint8_t *Loc, RelType Type, uint64_t Val) const { writeShuffleValue(Loc, Val, 23, 2); break; default: - error(getErrorLocation(Loc) + "unrecognized reloc " + Twine(Type)); + llvm_unreachable("unknown relocation"); } } diff --git a/lld/ELF/Arch/PPC64.cpp b/lld/ELF/Arch/PPC64.cpp index e3df5b1141294..4f5aa45aac6c3 100644 --- a/lld/ELF/Arch/PPC64.cpp +++ b/lld/ELF/Arch/PPC64.cpp @@ -98,19 +98,16 @@ unsigned elf::getPPC64GlobalEntryToLocalEntryOffset(uint8_t StOther) { return 0; } -bool elf::isPPC64SmallCodeModelReloc(RelType Type) { - // List is not yet complete, at the very least the got based tls related - // relocations need to be added, and we need to determine how the section - // sorting interacts with the thread pointer and dynamic thread pointer - // relative tls relocations. - return Type == R_PPC64_GOT16 || Type == R_PPC64_TOC16 || - Type == R_PPC64_TOC16_DS; +bool elf::isPPC64SmallCodeModelTocReloc(RelType Type) { + // The only small code model relocations that access the .toc section. + return Type == R_PPC64_TOC16 || Type == R_PPC64_TOC16_DS; } namespace { class PPC64 final : public TargetInfo { public: PPC64(); + int getTlsGdRelaxSkip(RelType Type) const override; uint32_t calcEFlags() const override; RelExpr getRelExpr(RelType Type, const Symbol &S, const uint8_t *Loc) const override; @@ -241,6 +238,20 @@ PPC64::PPC64() { write32(TrapInstr.data(), 0x7fe00008); } +int PPC64::getTlsGdRelaxSkip(RelType Type) const { + // A __tls_get_addr call instruction is marked with 2 relocations: + // + // R_PPC64_TLSGD / R_PPC64_TLSLD: marker relocation + // R_PPC64_REL24: __tls_get_addr + // + // After the relaxation we no longer call __tls_get_addr and should skip both + // relocations to not create a false dependence on __tls_get_addr being + // defined. + if (Type == R_PPC64_TLSGD || Type == R_PPC64_TLSLD) + return 2; + return 1; +} + static uint32_t getEFlags(InputFile *File) { if (Config->EKind == ELF64BEKind) return cast>(File)->getObj().getHeader()->e_flags; diff --git a/lld/ELF/Arch/SPARCV9.cpp b/lld/ELF/Arch/SPARCV9.cpp index 50017d0bb7d45..556cd81966716 100644 --- a/lld/ELF/Arch/SPARCV9.cpp +++ b/lld/ELF/Arch/SPARCV9.cpp @@ -68,7 +68,9 @@ RelExpr SPARCV9::getRelExpr(RelType Type, const Symbol &S, case R_SPARC_NONE: return R_NONE; default: - return R_INVALID; + error(getErrorLocation(Loc) + "unknown relocation (" + Twine(Type) + + ") against symbol " + toString(S)); + return R_NONE; } } @@ -118,7 +120,7 @@ void SPARCV9::relocateOne(uint8_t *Loc, RelType Type, uint64_t Val) const { write64be(Loc, Val); break; default: - error(getErrorLocation(Loc) + "unrecognized reloc " + Twine(Type)); + llvm_unreachable("unknown relocation"); } } diff --git a/lld/ELF/Arch/X86.cpp b/lld/ELF/Arch/X86.cpp index 76e56ea431b04..645e89c0678ec 100644 --- a/lld/ELF/Arch/X86.cpp +++ b/lld/ELF/Arch/X86.cpp @@ -23,6 +23,7 @@ namespace { class X86 : public TargetInfo { public: X86(); + int getTlsGdRelaxSkip(RelType Type) const override; RelExpr getRelExpr(RelType Type, const Symbol &S, const uint8_t *Loc) const override; int64_t getImplicitAddend(const uint8_t *Buf, RelType Type) const override; @@ -58,7 +59,6 @@ X86::X86() { GotPltEntrySize = 4; PltEntrySize = 16; PltHeaderSize = 16; - TlsGdRelaxSkip = 2; TrapInstr = {0xcc, 0xcc, 0xcc, 0xcc}; // 0xcc = INT3 // Align to the non-PAE large page size (known as a superpage or huge page). @@ -66,10 +66,20 @@ X86::X86() { DefaultImageBase = 0x400000; } -static bool hasBaseReg(uint8_t ModRM) { return (ModRM & 0xc7) != 0x5; } +int X86::getTlsGdRelaxSkip(RelType Type) const { + return 2; +} RelExpr X86::getRelExpr(RelType Type, const Symbol &S, const uint8_t *Loc) const { + // There are 4 different TLS variable models with varying degrees of + // flexibility and performance. LocalExec and InitialExec models are fast but + // less-flexible models. If they are in use, we set DF_STATIC_TLS flag in the + // dynamic section to let runtime know about that. + if (Type == R_386_TLS_LE || Type == R_386_TLS_LE_32 || Type == R_386_TLS_IE || + Type == R_386_TLS_GOTIE) + Config->HasStaticTlsModel = true; + switch (Type) { case R_386_8: case R_386_16: @@ -107,14 +117,14 @@ RelExpr X86::getRelExpr(RelType Type, const Symbol &S, // load an GOT address to a register, which is usually %ebx. // // So, there are two ways to refer to symbol foo's GOT entry: foo@GOT or - // foo@GOT(%reg). + // foo@GOT(%ebx). // // foo@GOT is not usable in PIC. If we are creating a PIC output and if we // find such relocation, we should report an error. foo@GOT is resolved to // an *absolute* address of foo's GOT entry, because both GOT address and // foo's offset are known. In other words, it's G + A. // - // foo@GOT(%reg) needs to be resolved to a *relative* offset from a GOT to + // foo@GOT(%ebx) needs to be resolved to a *relative* offset from a GOT to // foo's GOT entry in the table, because GOT address is not known but foo's // offset in the table is known. It's G + A - GOT. // @@ -122,12 +132,12 @@ RelExpr X86::getRelExpr(RelType Type, const Symbol &S, // different use cases. In order to distinguish them, we have to read a // machine instruction. // - // The following code implements it. We assume that Loc[0] is the first - // byte of a displacement or an immediate field of a valid machine + // The following code implements it. We assume that Loc[0] is the first byte + // of a displacement or an immediate field of a valid machine // instruction. That means a ModRM byte is at Loc[-1]. By taking a look at - // the byte, we can determine whether the instruction is register-relative - // (i.e. it was generated for foo@GOT(%reg)) or absolute (i.e. foo@GOT). - return hasBaseReg(Loc[-1]) ? R_GOT_FROM_END : R_GOT; + // the byte, we can determine whether the instruction uses the operand as an + // absolute address (R_GOT) or a register-relative address (R_GOT_FROM_END). + return (Loc[-1] & 0xc7) == 0x5 ? R_GOT : R_GOT_FROM_END; case R_386_TLS_GOTIE: return R_GOT_FROM_END; case R_386_GOTOFF: @@ -139,7 +149,9 @@ RelExpr X86::getRelExpr(RelType Type, const Symbol &S, case R_386_NONE: return R_NONE; default: - return R_INVALID; + error(getErrorLocation(Loc) + "unknown relocation (" + Twine(Type) + + ") against symbol " + toString(S)); + return R_NONE; } } @@ -308,7 +320,7 @@ void X86::relocateOne(uint8_t *Loc, RelType Type, uint64_t Val) const { write32le(Loc, Val); break; default: - error(getErrorLocation(Loc) + "unrecognized reloc " + Twine(Type)); + llvm_unreachable("unknown relocation"); } } diff --git a/lld/ELF/Arch/X86_64.cpp b/lld/ELF/Arch/X86_64.cpp index 9c76dd905c845..05340f38c65b1 100644 --- a/lld/ELF/Arch/X86_64.cpp +++ b/lld/ELF/Arch/X86_64.cpp @@ -25,6 +25,7 @@ namespace { template class X86_64 : public TargetInfo { public: X86_64(); + int getTlsGdRelaxSkip(RelType Type) const override; RelExpr getRelExpr(RelType Type, const Symbol &S, const uint8_t *Loc) const override; RelType getDynRel(RelType Type) const override; @@ -65,7 +66,6 @@ template X86_64::X86_64() { GotPltEntrySize = 8; PltEntrySize = 16; PltHeaderSize = 16; - TlsGdRelaxSkip = 2; TrapInstr = {0xcc, 0xcc, 0xcc, 0xcc}; // 0xcc = INT3 // Align to the large page size (known as a superpage or huge page). @@ -73,9 +73,17 @@ template X86_64::X86_64() { DefaultImageBase = 0x200000; } +template +int X86_64::getTlsGdRelaxSkip(RelType Type) const { + return 2; +} + template RelExpr X86_64::getRelExpr(RelType Type, const Symbol &S, const uint8_t *Loc) const { + if (Type == R_X86_64_GOTTPOFF) + Config->HasStaticTlsModel = true; + switch (Type) { case R_X86_64_8: case R_X86_64_16: @@ -96,6 +104,8 @@ RelExpr X86_64::getRelExpr(RelType Type, const Symbol &S, return R_SIZE; case R_X86_64_PLT32: return R_PLT_PC; + case R_X86_64_PC8: + case R_X86_64_PC16: case R_X86_64_PC32: case R_X86_64_PC64: return R_PC; @@ -115,7 +125,9 @@ RelExpr X86_64::getRelExpr(RelType Type, const Symbol &S, case R_X86_64_NONE: return R_NONE; default: - return R_INVALID; + error(getErrorLocation(Loc) + "unknown relocation (" + Twine(Type) + + ") against symbol " + toString(S)); + return R_NONE; } } @@ -317,10 +329,18 @@ void X86_64::relocateOne(uint8_t *Loc, RelType Type, uint64_t Val) const { checkUInt(Loc, Val, 8, Type); *Loc = Val; break; + case R_X86_64_PC8: + checkInt(Loc, Val, 8, Type); + *Loc = Val; + break; case R_X86_64_16: checkUInt(Loc, Val, 16, Type); write16le(Loc, Val); break; + case R_X86_64_PC16: + checkInt(Loc, Val, 16, Type); + write16le(Loc, Val); + break; case R_X86_64_32: checkUInt(Loc, Val, 32, Type); write32le(Loc, Val); @@ -353,7 +373,7 @@ void X86_64::relocateOne(uint8_t *Loc, RelType Type, uint64_t Val) const { write64le(Loc, Val); break; default: - error(getErrorLocation(Loc) + "unrecognized reloc " + Twine(Type)); + llvm_unreachable("unknown relocation"); } } diff --git a/lld/ELF/Bits.h b/lld/ELF/Bits.h deleted file mode 100644 index 7686a9e626a02..0000000000000 --- a/lld/ELF/Bits.h +++ /dev/null @@ -1,34 +0,0 @@ -//===- Bits.h ---------------------------------------------------*- C++ -*-===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - -#ifndef LLD_ELF_BITS_H -#define LLD_ELF_BITS_H - -#include "Config.h" -#include "llvm/Support/Endian.h" - -namespace lld { -namespace elf { - -inline uint64_t readUint(uint8_t *Buf) { - if (Config->Is64) - return llvm::support::endian::read64(Buf, Config->Endianness); - return llvm::support::endian::read32(Buf, Config->Endianness); -} - -inline void writeUint(uint8_t *Buf, uint64_t Val) { - if (Config->Is64) - llvm::support::endian::write64(Buf, Val, Config->Endianness); - else - llvm::support::endian::write32(Buf, Val, Config->Endianness); -} - -} // namespace elf -} // namespace lld - -#endif diff --git a/lld/ELF/Config.h b/lld/ELF/Config.h index 8943ced3cb250..4e6c44f5db33d 100644 --- a/lld/ELF/Config.h +++ b/lld/ELF/Config.h @@ -17,6 +17,7 @@ #include "llvm/Support/CachePruning.h" #include "llvm/Support/CodeGen.h" #include "llvm/Support/Endian.h" +#include #include namespace lld { @@ -253,6 +254,20 @@ struct Configuration { // if that's true.) bool IsMips64EL; + // True if we need to set the DF_STATIC_TLS flag to an output file, + // which works as a hint to the dynamic loader that the file contains + // code compiled with the static TLS model. The thread-local variable + // compiled with the static TLS model is faster but less flexible, and + // it may not be loaded using dlopen(). + // + // We set this flag to true when we see a relocation for the static TLS + // model. Once this becomes true, it will never become false. + // + // Since the flag is updated by multi-threaded code, we use std::atomic. + // (Writing to a variable is not considered thread-safe even if the + // variable is boolean and we always set the same value from all threads.) + std::atomic HasStaticTlsModel{false}; + // Holds set of ELF header flags for the target. uint32_t EFlags = 0; diff --git a/lld/ELF/Driver.cpp b/lld/ELF/Driver.cpp index b6794fc529cbd..784efb363cf1e 100644 --- a/lld/ELF/Driver.cpp +++ b/lld/ELF/Driver.cpp @@ -129,7 +129,7 @@ static std::tuple parseEmulation(StringRef Emul) { .Cases("elf32btsmip", "elf32btsmipn32", {ELF32BEKind, EM_MIPS}) .Cases("elf32ltsmip", "elf32ltsmipn32", {ELF32LEKind, EM_MIPS}) .Case("elf32lriscv", {ELF32LEKind, EM_RISCV}) - .Case("elf32ppc", {ELF32BEKind, EM_PPC}) + .Cases("elf32ppc", "elf32ppclinux", {ELF32BEKind, EM_PPC}) .Case("elf64btsmip", {ELF64BEKind, EM_MIPS}) .Case("elf64ltsmip", {ELF64LEKind, EM_MIPS}) .Case("elf64lriscv", {ELF64LEKind, EM_RISCV}) @@ -370,6 +370,7 @@ void LinkerDriver::main(ArrayRef ArgsArr) { // Interpret this flag early because error() depends on them. errorHandler().ErrorLimit = args::getInteger(Args, OPT_error_limit, 20); + checkZOptions(Args); // Handle -help if (Args.hasArg(OPT_help)) { @@ -410,7 +411,6 @@ void LinkerDriver::main(ArrayRef ArgsArr) { } readConfigs(Args); - checkZOptions(Args); // The behavior of -v or --version is a bit strange, but this is // needed for compatibility with GNU linkers. @@ -1443,8 +1443,6 @@ static const char *LibcallRoutineNames[] = { // all linker scripts have already been parsed. template void LinkerDriver::link(opt::InputArgList &Args) { Target = getTarget(); - InX::VerSym = nullptr; - InX::VerNeed = nullptr; Config->MaxPageSize = getMaxPageSize(Args); Config->ImageBase = getImageBase(Args); diff --git a/lld/ELF/DriverUtils.cpp b/lld/ELF/DriverUtils.cpp index 4f2ef4d9b55d9..3d62dd54d4ac0 100644 --- a/lld/ELF/DriverUtils.cpp +++ b/lld/ELF/DriverUtils.cpp @@ -151,6 +151,12 @@ void elf::printHelp() { outs() << Config->ProgName << ": supported targets: elf\n"; } +static std::string rewritePath(StringRef S) { + if (fs::exists(S)) + return relativeToRoot(S); + return S; +} + // Reconstructs command line arguments so that so that you can re-run // the same command with the same inputs. This is for --reproduce. std::string elf::createResponseFile(const opt::InputArgList &Args) { diff --git a/lld/ELF/Filesystem.cpp b/lld/ELF/Filesystem.cpp index 957534a0a41f7..5c8475fbdd055 100644 --- a/lld/ELF/Filesystem.cpp +++ b/lld/ELF/Filesystem.cpp @@ -58,9 +58,26 @@ void elf::unlinkAsync(StringRef Path) { std::error_code EC = sys::fs::openFileForRead(Path, FD); sys::fs::remove(Path); + if (EC) + return; + // close and therefore remove TempPath in background. - if (!EC) - std::thread([=] { ::close(FD); }).detach(); + std::mutex M; + std::condition_variable CV; + bool Started = false; + std::thread([&, FD] { + { + std::lock_guard L(M); + Started = true; + CV.notify_all(); + } + ::close(FD); + }).detach(); + + // GLIBC 2.26 and earlier have race condition that crashes an entire process + // if the main thread calls exit(2) while other thread is starting up. + std::unique_lock L(M); + CV.wait(L, [&] { return Started; }); #endif } diff --git a/lld/ELF/InputFiles.cpp b/lld/ELF/InputFiles.cpp index c3e5b2f4878ae..ed7d0e98e82f5 100644 --- a/lld/ELF/InputFiles.cpp +++ b/lld/ELF/InputFiles.cpp @@ -205,14 +205,25 @@ Optional ObjFile::getDILineInfo(InputSectionBase *S, uint64_t Offset) { llvm::call_once(InitDwarfLine, [this]() { initializeDwarf(); }); + // Detect SectionIndex for specified section. + uint64_t SectionIndex = object::SectionedAddress::UndefSection; + ArrayRef Sections = S->File->getSections(); + for (uint64_t CurIndex = 0; CurIndex < Sections.size(); ++CurIndex) { + if (S == Sections[CurIndex]) { + SectionIndex = CurIndex; + break; + } + } + // Use fake address calcuated by adding section file offset and offset in // section. See comments for ObjectInfo class. DILineInfo Info; - for (const llvm::DWARFDebugLine::LineTable *LT : LineTables) + for (const llvm::DWARFDebugLine::LineTable *LT : LineTables) { if (LT->getFileLineInfoForAddress( - S->getOffsetInFile() + Offset, nullptr, + {S->getOffsetInFile() + Offset, SectionIndex}, nullptr, DILineInfoSpecifier::FileLineInfoKind::AbsoluteFilePath, Info)) return Info; + } return None; } @@ -239,6 +250,7 @@ ELFFileBase::ELFFileBase(Kind K, MemoryBufferRef MB) : InputFile(K, MB) { EMachine = getObj().getHeader()->e_machine; OSABI = getObj().getHeader()->e_ident[llvm::ELF::EI_OSABI]; + ABIVersion = getObj().getHeader()->e_ident[llvm::ELF::EI_ABIVERSION]; } template diff --git a/lld/ELF/InputFiles.h b/lld/ELF/InputFiles.h index 07f85e89b7b46..b786042d13bc6 100644 --- a/lld/ELF/InputFiles.h +++ b/lld/ELF/InputFiles.h @@ -103,6 +103,7 @@ class InputFile { ELFKind EKind = ELFNoneKind; uint16_t EMachine = llvm::ELF::EM_NONE; uint8_t OSABI = 0; + uint8_t ABIVersion = 0; // Cache for toString(). Only toString() should use this member. mutable std::string ToStringCache; @@ -114,14 +115,15 @@ class InputFile { bool JustSymbols = false; // On PPC64 we need to keep track of which files contain small code model - // relocations. To minimize the chance of a relocation overflow files that do - // contain small code model relocations should have their .toc sections sorted - // closer to the .got section than files that do not contain any small code - // model relocations. Thats because the toc-pointer is defined to point at - // .got + 0x8000 and the instructions used with small code model relocations - // support immediates in the range [-0x8000, 0x7FFC], making the addressable - // range relative to the toc pointer [.got, .got + 0xFFFC]. - bool PPC64SmallCodeModelRelocs = false; + // relocations that access the .toc section. To minimize the chance of a + // relocation overflow, files that do contain said relocations should have + // their .toc sections sorted closer to the .got section than files that do + // not contain any small code model relocations. Thats because the toc-pointer + // is defined to point at .got + 0x8000 and the instructions used with small + // code model relocations support immediates in the range [-0x8000, 0x7FFC], + // making the addressable range relative to the toc pointer + // [.got, .got + 0xFFFC]. + bool PPC64SmallCodeModelTocRelocs = false; // GroupId is used for --warn-backrefs which is an optional error // checking feature. All files within the same --{start,end}-group or diff --git a/lld/ELF/InputSection.cpp b/lld/ELF/InputSection.cpp index 78f4812a5416c..f1902800c3319 100644 --- a/lld/ELF/InputSection.cpp +++ b/lld/ELF/InputSection.cpp @@ -76,7 +76,7 @@ InputSectionBase::InputSectionBase(InputFile *File, uint64_t Flags, // no alignment constraits. uint32_t V = std::max(Alignment, 1); if (!isPowerOf2_64(V)) - fatal(toString(File) + ": section sh_addralign is not a power of 2"); + fatal(toString(this) + ": sh_addralign is not a power of 2"); this->Alignment = V; // In ELF, each section can be compressed by zlib, and if compressed, @@ -557,10 +557,16 @@ static Relocation *getRISCVPCRelHi20(const Symbol *Sym, uint64_t Addend) { // Relocations are sorted by offset, so we can use std::equal_range to do // binary search. - auto Range = std::equal_range(IS->Relocations.begin(), IS->Relocations.end(), - D->Value, RelocationOffsetComparator{}); - for (auto It = std::get<0>(Range); It != std::get<1>(Range); ++It) - if (isRelExprOneOf(It->Expr)) + Relocation R; + R.Offset = D->Value; + auto Range = + std::equal_range(IS->Relocations.begin(), IS->Relocations.end(), R, + [](const Relocation &LHS, const Relocation &RHS) { + return LHS.Offset < RHS.Offset; + }); + + for (auto It = Range.first; It != Range.second; ++It) + if (It->Expr == R_PC) return &*It; error("R_RISCV_PCREL_LO12 relocation points to " + IS->getObjMsg(D->Value) + @@ -600,8 +606,6 @@ static int64_t getTlsTpOffset() { static uint64_t getRelocTargetVA(const InputFile *File, RelType Type, int64_t A, uint64_t P, const Symbol &Sym, RelExpr Expr) { switch (Expr) { - case R_INVALID: - return 0; case R_ABS: case R_RELAX_TLS_LD_TO_LE_ABS: case R_RELAX_GOT_PC_NOPIC: @@ -611,7 +615,6 @@ static uint64_t getRelocTargetVA(const InputFile *File, RelType Type, int64_t A, case R_ARM_SBREL: return Sym.getVA(A) - getARMStaticBase(Sym); case R_GOT: - case R_GOT_PLT: case R_RELAX_TLS_GD_TO_IE_ABS: return Sym.getGotVA() + A; case R_GOTONLY_PC: @@ -630,7 +633,6 @@ static uint64_t getRelocTargetVA(const InputFile *File, RelType Type, int64_t A, case R_RELAX_TLS_GD_TO_IE_GOT_OFF: return Sym.getGotOffset() + A; case R_AARCH64_GOT_PAGE_PC: - case R_AARCH64_GOT_PAGE_PC_PLT: case R_AARCH64_RELAX_TLS_GD_TO_IE_PAGE_PC: return getAArch64Page(Sym.getGotVA() + A) - getAArch64Page(P); case R_GOT_PC: @@ -680,10 +682,6 @@ static uint64_t getRelocTargetVA(const InputFile *File, RelType Type, int64_t A, uint64_t Val = Sym.isUndefWeak() ? P + A : Sym.getVA(A); return getAArch64Page(Val) - getAArch64Page(P); } - case R_AARCH64_PLT_PAGE_PC: { - uint64_t Val = Sym.isUndefWeak() ? P + A : Sym.getPltVA() + A; - return getAArch64Page(Val) - getAArch64Page(P); - } case R_RISCV_PC_INDIRECT: { if (const Relocation *HiRel = getRISCVPCRelHi20(&Sym, A)) return getRelocTargetVA(File, HiRel->Type, HiRel->Addend, Sym.getVA(), diff --git a/lld/ELF/LTO.cpp b/lld/ELF/LTO.cpp index 6eecb79329a1b..e0011f7026192 100644 --- a/lld/ELF/LTO.cpp +++ b/lld/ELF/LTO.cpp @@ -276,20 +276,23 @@ std::vector BitcodeCompiler::compile() { if (!Config->ThinLTOCacheDir.empty()) pruneCache(Config->ThinLTOCacheDir, Config->ThinLTOCachePolicy); - std::vector Ret; - for (unsigned I = 0; I != MaxTasks; ++I) { - if (Buf[I].empty()) - continue; - if (Config->SaveTemps) { - if (I == 0) - saveBuffer(Buf[I], Config->OutputFile + ".lto.o"); - else - saveBuffer(Buf[I], Config->OutputFile + Twine(I) + ".lto.o"); - } - InputFile *Obj = createObjectFile(MemoryBufferRef(Buf[I], "lto.tmp")); - Ret.push_back(Obj); + if (!Config->LTOObjPath.empty()) { + saveBuffer(Buf[0], Config->LTOObjPath); + for (unsigned I = 1; I != MaxTasks; ++I) + saveBuffer(Buf[I], Config->LTOObjPath + Twine(I)); + } + + if (Config->SaveTemps) { + saveBuffer(Buf[0], Config->OutputFile + ".lto.o"); + for (unsigned I = 1; I != MaxTasks; ++I) + saveBuffer(Buf[I], Config->OutputFile + Twine(I) + ".lto.o"); } + std::vector Ret; + for (unsigned I = 0; I != MaxTasks; ++I) + if (!Buf[I].empty()) + Ret.push_back(createObjectFile(MemoryBufferRef(Buf[I], "lto.tmp"))); + for (std::unique_ptr &File : Files) if (File) Ret.push_back(createObjectFile(*File)); diff --git a/lld/ELF/Options.td b/lld/ELF/Options.td index 1792d5ec83b33..831f761f80195 100644 --- a/lld/ELF/Options.td +++ b/lld/ELF/Options.td @@ -30,7 +30,7 @@ def Bstatic: F<"Bstatic">, HelpText<"Do not link against shared libraries">; def build_id: F<"build-id">, HelpText<"Alias for --build-id=fast">; def build_id_eq: J<"build-id=">, HelpText<"Generate build ID note">, - MetaVarName<"[fast,md5,sha,uuid,0x]">; + MetaVarName<"[fast,md5,sha1,uuid,0x]">; defm check_sections: B<"check-sections", "Check section addresses for overlaps (default)", @@ -504,7 +504,9 @@ def: F<"no-copy-dt-needed-entries">; def: F<"no-ctors-in-init-array">; def: F<"no-keep-memory">; def: F<"no-mmap-output-file">; +def: F<"no-pipeline-knowledge">; def: F<"no-warn-mismatch">; +def: Flag<["-"], "p">; def: Separate<["--", "-"], "rpath-link">; def: J<"rpath-link=">; def: F<"sort-common">; diff --git a/lld/ELF/OutputSections.cpp b/lld/ELF/OutputSections.cpp index 6c40e45b7917e..8614a6097e0db 100644 --- a/lld/ELF/OutputSections.cpp +++ b/lld/ELF/OutputSections.cpp @@ -30,6 +30,7 @@ using namespace llvm::ELF; using namespace lld; using namespace lld::elf; +uint8_t *Out::BufferStart; uint8_t Out::First; PhdrEntry *Out::TlsPhdr; OutputSection *Out::ElfHeader; @@ -222,8 +223,6 @@ template void OutputSection::writeTo(uint8_t *Buf) { if (Type == SHT_NOBITS) return; - Loc = Buf; - // If -compress-debug-section is specified and if this is a debug seciton, // we've already compressed section contents. If that's the case, // just write it down. @@ -264,7 +263,6 @@ template void OutputSection::writeTo(uint8_t *Buf) { writeInt(Buf + Data->Offset, Data->Expression().getValue(), Data->Size); } -template static void finalizeShtGroup(OutputSection *OS, InputSection *Section) { assert(Config->Relocatable); @@ -275,12 +273,11 @@ static void finalizeShtGroup(OutputSection *OS, // sh_info then contain index of an entry in symbol table section which // provides signature of the section group. - ObjFile *Obj = Section->getFile(); - ArrayRef Symbols = Obj->getSymbols(); + ArrayRef Symbols = Section->File->getSymbols(); OS->Info = In.SymTab->getSymbolIndex(Symbols[Section->Info]); } -template void OutputSection::finalize() { +void OutputSection::finalize() { if (Type == SHT_NOBITS) for (BaseCommand *Base : SectionCommands) if (isa(Base)) @@ -299,7 +296,7 @@ template void OutputSection::finalize() { } if (Type == SHT_GROUP) { - finalizeShtGroup(this, First); + finalizeShtGroup(this, First); return; } @@ -429,8 +426,3 @@ template void OutputSection::maybeCompress(); template void OutputSection::maybeCompress(); template void OutputSection::maybeCompress(); template void OutputSection::maybeCompress(); - -template void OutputSection::finalize(); -template void OutputSection::finalize(); -template void OutputSection::finalize(); -template void OutputSection::finalize(); diff --git a/lld/ELF/OutputSections.h b/lld/ELF/OutputSections.h index 2ea7de6e8170e..3a76607dc971c 100644 --- a/lld/ELF/OutputSections.h +++ b/lld/ELF/OutputSections.h @@ -82,9 +82,6 @@ class OutputSection final : public BaseCommand, public SectionBase { void addSection(InputSection *IS); - // Location in the output buffer. - uint8_t *Loc = nullptr; - // The following members are normally only used in linker scripts. MemoryRegion *MemRegion = nullptr; MemoryRegion *LMARegion = nullptr; @@ -104,7 +101,7 @@ class OutputSection final : public BaseCommand, public SectionBase { bool ExpressionsUseSymbols = false; bool InOverlay = false; - template void finalize(); + void finalize(); template void writeTo(uint8_t *Buf); template void maybeCompress(); @@ -128,6 +125,7 @@ std::vector getInputSections(OutputSection* OS); // globally accessible. Writer initializes them, so don't use them // until Writer is initialized. struct Out { + static uint8_t *BufferStart; static uint8_t First; static PhdrEntry *TlsPhdr; static OutputSection *ElfHeader; diff --git a/lld/ELF/Relocations.cpp b/lld/ELF/Relocations.cpp index 884257280284a..5d0d84dac3472 100644 --- a/lld/ELF/Relocations.cpp +++ b/lld/ELF/Relocations.cpp @@ -93,6 +93,38 @@ static std::string getLocation(InputSectionBase &S, const Symbol &Sym, return Msg + S.getObjMsg(Off); } +namespace { +// Build a bitmask with one bit set for each RelExpr. +// +// Constexpr function arguments can't be used in static asserts, so we +// use template arguments to build the mask. +// But function template partial specializations don't exist (needed +// for base case of the recursion), so we need a dummy struct. +template struct RelExprMaskBuilder { + static inline uint64_t build() { return 0; } +}; + +// Specialization for recursive case. +template +struct RelExprMaskBuilder { + static inline uint64_t build() { + static_assert(0 <= Head && Head < 64, + "RelExpr is too large for 64-bit mask!"); + return (uint64_t(1) << Head) | RelExprMaskBuilder::build(); + } +}; +} // namespace + +// Return true if `Expr` is one of `Exprs`. +// There are fewer than 64 RelExpr's, so we can represent any set of +// RelExpr's as a constant bit mask and test for membership with a +// couple cheap bitwise operations. +template bool oneof(RelExpr Expr) { + assert(0 <= Expr && (int)Expr < 64 && + "RelExpr is too large for 64-bit mask!"); + return (uint64_t(1) << Expr) & RelExprMaskBuilder::build(); +} + // This function is similar to the `handleTlsRelocation`. MIPS does not // support any relaxations for TLS relocations so by factoring out MIPS // handling in to the separate function we can simplify the code and do not @@ -186,7 +218,7 @@ handleTlsRelocation(RelType Type, Symbol &Sym, InputSectionBase &C, if (Config->EMachine == EM_MIPS) return handleMipsTlsRelocation(Type, Sym, C, Offset, Addend, Expr); - if (isRelExprOneOf(Expr) && + if (oneof(Expr) && Config->Shared) { if (In.Got->addDynTlsEntry(Sym)) { uint64_t Off = In.Got->getGlobalDynOffset(Sym); @@ -198,14 +230,14 @@ handleTlsRelocation(RelType Type, Symbol &Sym, InputSectionBase &C, return 1; } - if (isRelExprOneOf(Expr)) { + if (oneof( + Expr)) { // Local-Dynamic relocs can be relaxed to Local-Exec. if (!Config->Shared) { C.Relocations.push_back( {Target->adjustRelaxExpr(Type, nullptr, R_RELAX_TLS_LD_TO_LE), Type, Offset, Addend, &Sym}); - return Target->TlsGdRelaxSkip; + return Target->getTlsGdRelaxSkip(Type); } if (Expr == R_TLSLD_HINT) return 1; @@ -242,8 +274,8 @@ handleTlsRelocation(RelType Type, Symbol &Sym, InputSectionBase &C, return 1; } - if (isRelExprOneOf(Expr)) { + if (oneof(Expr)) { if (Config->Shared) { if (In.Got->addDynTlsEntry(Sym)) { uint64_t Off = In.Got->getGlobalDynOffset(Sym); @@ -278,13 +310,13 @@ handleTlsRelocation(RelType Type, Symbol &Sym, InputSectionBase &C, {Target->adjustRelaxExpr(Type, nullptr, R_RELAX_TLS_GD_TO_LE), Type, Offset, Addend, &Sym}); } - return Target->TlsGdRelaxSkip; + return Target->getTlsGdRelaxSkip(Type); } // Initial-Exec relocs can be relaxed to Local-Exec if the symbol is locally // defined. - if (isRelExprOneOf(Expr) && + if (oneof(Expr) && !Config->Shared && !Sym.IsPreemptible) { C.Relocations.push_back({R_RELAX_TLS_IE_TO_LE, Type, Offset, Addend, &Sym}); return 1; @@ -336,26 +368,23 @@ static bool isAbsoluteValue(const Symbol &Sym) { // Returns true if Expr refers a PLT entry. static bool needsPlt(RelExpr Expr) { - return isRelExprOneOf(Expr); + return oneof(Expr); } // Returns true if Expr refers a GOT entry. Note that this function // returns false for TLS variables even though they need GOT, because // TLS variables uses GOT differently than the regular variables. static bool needsGot(RelExpr Expr) { - return isRelExprOneOf(Expr); + return oneof(Expr); } // True if this expression is of the form Sym - X, where X is a position in the // file (PC, or GOT for example). static bool isRelExpr(RelExpr Expr) { - return isRelExprOneOf(Expr); + return oneof(Expr); } // Returns true if a given relocation can be computed at link-time. @@ -370,19 +399,18 @@ static bool isRelExpr(RelExpr Expr) { static bool isStaticLinkTimeConstant(RelExpr E, RelType Type, const Symbol &Sym, InputSectionBase &S, uint64_t RelOff) { // These expressions always compute a constant - if (isRelExprOneOf(E)) + if (oneof(E)) return true; // These never do, except if the entire file is position dependent or if // only the low bits are used. - if (E == R_GOT || E == R_GOT_PLT || E == R_PLT || E == R_TLSDESC) + if (E == R_GOT || E == R_PLT || E == R_TLSDESC) return Target->usesOnlyLowPageBits(Type) || !Config->Pic; if (Sym.IsPreemptible) @@ -428,14 +456,8 @@ static RelExpr toPlt(RelExpr Expr) { return R_PPC_CALL_PLT; case R_PC: return R_PLT_PC; - case R_AARCH64_PAGE_PC: - return R_AARCH64_PLT_PAGE_PC; - case R_AARCH64_GOT_PAGE_PC: - return R_AARCH64_GOT_PAGE_PC_PLT; case R_ABS: return R_PLT; - case R_GOT: - return R_GOT_PLT; default: return Expr; } @@ -767,14 +789,7 @@ static void addPltEntry(PltSection *Plt, GotPltSection *GotPlt, template static void addGotEntry(Symbol &Sym) { In.Got->addEntry(Sym); - RelExpr Expr; - if (Sym.isTls()) - Expr = R_TLS; - else if (Sym.isGnuIFunc()) - Expr = R_PLT; - else - Expr = R_ABS; - + RelExpr Expr = Sym.isTls() ? R_TLS : R_ABS; uint64_t Off = Sym.getGotOffset(); // If a GOT slot value can be calculated at link-time, which is now, @@ -969,6 +984,15 @@ static void processRelocAux(InputSectionBase &Sec, RelExpr Expr, RelType Type, getLocation(Sec, Sym, Offset)); } +struct IRelativeReloc { + RelType Type; + InputSectionBase *Sec; + uint64_t Offset; + Symbol *Sym; +}; + +static std::vector IRelativeRelocs; + template static void scanReloc(InputSectionBase &Sec, OffsetGetter &GetOffset, RelTy *&I, RelTy *End) { @@ -997,44 +1021,49 @@ static void scanReloc(InputSectionBase &Sec, OffsetGetter &GetOffset, RelTy *&I, RelExpr Expr = Target->getRelExpr(Type, Sym, RelocatedAddr); // Ignore "hint" relocations because they are only markers for relaxation. - if (isRelExprOneOf(Expr)) + if (oneof(Expr)) return; - if (Config->EMachine == EM_PPC64 && isPPC64SmallCodeModelReloc(Type)) - Sec.File->PPC64SmallCodeModelRelocs = true; + // We can separate the small code model relocations into 2 categories: + // 1) Those that access the compiler generated .toc sections. + // 2) Those that access the linker allocated got entries. + // lld allocates got entries to symbols on demand. Since we don't try to sort + // the got entries in any way, we don't have to track which objects have + // got-based small code model relocs. The .toc sections get placed after the + // end of the linker allocated .got section and we do sort those so sections + // addressed with small code model relocations come first. + if (Config->EMachine == EM_PPC64 && isPPC64SmallCodeModelTocReloc(Type)) + Sec.File->PPC64SmallCodeModelTocRelocs = true; + + if (Sym.isGnuIFunc() && !Config->ZText && Config->WarnIfuncTextrel) { + warn("using ifunc symbols when text relocations are allowed may produce " + "a binary that will segfault, if the object file is linked with " + "old version of glibc (glibc 2.28 and earlier). If this applies to " + "you, consider recompiling the object files without -fPIC and " + "without -Wl,-z,notext option. Use -no-warn-ifunc-textrel to " + "turn off this warning." + + getLocation(Sec, Sym, Offset)); + } - // Strenghten or relax relocations. - // - // GNU ifunc symbols must be accessed via PLT because their addresses - // are determined by runtime. + // Relax relocations. // - // On the other hand, if we know that a PLT entry will be resolved within - // the same ELF module, we can skip PLT access and directly jump to the - // destination function. For example, if we are linking a main exectuable, - // all dynamic symbols that can be resolved within the executable will - // actually be resolved that way at runtime, because the main exectuable - // is always at the beginning of a search list. We can leverage that fact. - if (Sym.isGnuIFunc()) { - if (!Config->ZText && Config->WarnIfuncTextrel) { - warn("using ifunc symbols when text relocations are allowed may produce " - "a binary that will segfault, if the object file is linked with " - "old version of glibc (glibc 2.28 and earlier). If this applies to " - "you, consider recompiling the object files without -fPIC and " - "without -Wl,-z,notext option. Use -no-warn-ifunc-textrel to " - "turn off this warning." + - getLocation(Sec, Sym, Offset)); - } - Expr = toPlt(Expr); - } else if (!Sym.IsPreemptible && Expr == R_GOT_PC && !isAbsoluteValue(Sym)) { - Expr = Target->adjustRelaxExpr(Type, RelocatedAddr, Expr); - } else if (!Sym.IsPreemptible) { - Expr = fromPlt(Expr); + // If we know that a PLT entry will be resolved within the same ELF module, we + // can skip PLT access and directly jump to the destination function. For + // example, if we are linking a main exectuable, all dynamic symbols that can + // be resolved within the executable will actually be resolved that way at + // runtime, because the main exectuable is always at the beginning of a search + // list. We can leverage that fact. + if (!Sym.IsPreemptible && !Sym.isGnuIFunc()) { + if (Expr == R_GOT_PC && !isAbsoluteValue(Sym)) + Expr = Target->adjustRelaxExpr(Type, RelocatedAddr, Expr); + else + Expr = fromPlt(Expr); } // This relocation does not require got entry, but it is relative to got and // needs it to be created. Here we request for that. - if (isRelExprOneOf(Expr)) + if (oneof(Expr)) In.Got->HasGotOffRel = true; // Read an addend. @@ -1048,28 +1077,136 @@ static void scanReloc(InputSectionBase &Sec, OffsetGetter &GetOffset, RelTy *&I, return; } - // If a relocation needs PLT, we create PLT and GOTPLT slots for the symbol. - if (needsPlt(Expr) && !Sym.isInPlt()) { - if (Sym.isGnuIFunc() && !Sym.IsPreemptible) - addPltEntry(In.Iplt, In.IgotPlt, In.RelaIplt, Target->IRelativeRel, - Sym); - else + // Non-preemptible ifuncs require special handling. First, handle the usual + // case where the symbol isn't one of these. + if (!Sym.isGnuIFunc() || Sym.IsPreemptible) { + // If a relocation needs PLT, we create PLT and GOTPLT slots for the symbol. + if (needsPlt(Expr) && !Sym.isInPlt()) addPltEntry(In.Plt, In.GotPlt, In.RelaPlt, Target->PltRel, Sym); - } - // Create a GOT slot if a relocation needs GOT. - if (needsGot(Expr)) { - if (Config->EMachine == EM_MIPS) { - // MIPS ABI has special rules to process GOT entries and doesn't - // require relocation entries for them. A special case is TLS - // relocations. In that case dynamic loader applies dynamic - // relocations to initialize TLS GOT entries. - // See "Global Offset Table" in Chapter 5 in the following document - // for detailed description: - // ftp://www.linux-mips.org/pub/linux/mips/doc/ABI/mipsabi.pdf - In.MipsGot->addEntry(*Sec.File, Sym, Addend, Expr); - } else if (!Sym.isInGot()) { - addGotEntry(Sym); + // Create a GOT slot if a relocation needs GOT. + if (needsGot(Expr)) { + if (Config->EMachine == EM_MIPS) { + // MIPS ABI has special rules to process GOT entries and doesn't + // require relocation entries for them. A special case is TLS + // relocations. In that case dynamic loader applies dynamic + // relocations to initialize TLS GOT entries. + // See "Global Offset Table" in Chapter 5 in the following document + // for detailed description: + // ftp://www.linux-mips.org/pub/linux/mips/doc/ABI/mipsabi.pdf + In.MipsGot->addEntry(*Sec.File, Sym, Addend, Expr); + } else if (!Sym.isInGot()) { + addGotEntry(Sym); + } + } + } else { + // Handle a reference to a non-preemptible ifunc. These are special in a + // few ways: + // + // - Unlike most non-preemptible symbols, non-preemptible ifuncs do not have + // a fixed value. But assuming that all references to the ifunc are + // GOT-generating or PLT-generating, the handling of an ifunc is + // relatively straightforward. We create a PLT entry in Iplt, which is + // usually at the end of .plt, which makes an indirect call using a + // matching GOT entry in IgotPlt, which is usually at the end of .got.plt. + // The GOT entry is relocated using an IRELATIVE relocation in RelaIplt, + // which is usually at the end of .rela.plt. Unlike most relocations in + // .rela.plt, which may be evaluated lazily without -z now, dynamic + // loaders evaluate IRELATIVE relocs eagerly, which means that for + // IRELATIVE relocs only, GOT-generating relocations can point directly to + // .got.plt without requiring a separate GOT entry. + // + // - Despite the fact that an ifunc does not have a fixed value, compilers + // that are not passed -fPIC will assume that they do, and will emit + // direct (non-GOT-generating, non-PLT-generating) relocations to the + // symbol. This means that if a direct relocation to the symbol is + // seen, the linker must set a value for the symbol, and this value must + // be consistent no matter what type of reference is made to the symbol. + // This can be done by creating a PLT entry for the symbol in the way + // described above and making it canonical, that is, making all references + // point to the PLT entry instead of the resolver. In lld we also store + // the address of the PLT entry in the dynamic symbol table, which means + // that the symbol will also have the same value in other modules. + // Because the value loaded from the GOT needs to be consistent with + // the value computed using a direct relocation, a non-preemptible ifunc + // may end up with two GOT entries, one in .got.plt that points to the + // address returned by the resolver and is used only by the PLT entry, + // and another in .got that points to the PLT entry and is used by + // GOT-generating relocations. + // + // - The fact that these symbols do not have a fixed value makes them an + // exception to the general rule that a statically linked executable does + // not require any form of dynamic relocation. To handle these relocations + // correctly, the IRELATIVE relocations are stored in an array which a + // statically linked executable's startup code must enumerate using the + // linker-defined symbols __rela?_iplt_{start,end}. + // + // - An absolute relocation to a non-preemptible ifunc (such as a global + // variable containing a pointer to the ifunc) needs to be relocated in + // the exact same way as a GOT entry, so we can avoid needing to make the + // PLT entry canonical by translating such relocations into IRELATIVE + // relocations in the RelaIplt. + if (!Sym.isInPlt()) { + // Create PLT and GOTPLT slots for the symbol. + Sym.IsInIplt = true; + + // Create a copy of the symbol to use as the target of the IRELATIVE + // relocation in the IgotPlt. This is in case we make the PLT canonical + // later, which would overwrite the original symbol. + // + // FIXME: Creating a copy of the symbol here is a bit of a hack. All + // that's really needed to create the IRELATIVE is the section and value, + // so ideally we should just need to copy those. + auto *DirectSym = make(cast(Sym)); + addPltEntry(In.Iplt, In.IgotPlt, In.RelaIplt, Target->IRelativeRel, + *DirectSym); + Sym.PltIndex = DirectSym->PltIndex; + } + if (Expr == R_ABS && Addend == 0 && (Sec.Flags & SHF_WRITE)) { + // We might be able to represent this as an IRELATIVE. But we don't know + // yet whether some later relocation will make the symbol point to a + // canonical PLT, which would make this either a dynamic RELATIVE (PIC) or + // static (non-PIC) relocation. So we keep a record of the information + // required to process the relocation, and after scanRelocs() has been + // called on all relocations, the relocation is resolved by + // addIRelativeRelocs(). + IRelativeRelocs.push_back({Type, &Sec, Offset, &Sym}); + return; + } + if (needsGot(Expr)) { + // Redirect GOT accesses to point to the Igot. + // + // This field is also used to keep track of whether we ever needed a GOT + // entry. If we did and we make the PLT canonical later, we'll need to + // create a GOT entry pointing to the PLT entry for Sym. + Sym.GotInIgot = true; + } else if (!needsPlt(Expr)) { + // Make the ifunc's PLT entry canonical by changing the value of its + // symbol to redirect all references to point to it. + unsigned EntryOffset = Sym.PltIndex * Target->PltEntrySize; + if (Config->ZRetpolineplt) + EntryOffset += Target->PltHeaderSize; + + auto &D = cast(Sym); + D.Section = In.Iplt; + D.Value = EntryOffset; + D.Size = 0; + // It's important to set the symbol type here so that dynamic loaders + // don't try to call the PLT as if it were an ifunc resolver. + D.Type = STT_FUNC; + + if (Sym.GotInIgot) { + // We previously encountered a GOT generating reference that we + // redirected to the Igot. Now that the PLT entry is canonical we must + // clear the redirection to the Igot and add a GOT entry. As we've + // changed the symbol type to STT_FUNC future GOT generating references + // will naturally use this GOT entry. + // + // We don't need to worry about creating a MIPS GOT here because ifuncs + // aren't a thing on MIPS. + Sym.GotInIgot = false; + addGotEntry(Sym); + } } } @@ -1089,7 +1226,9 @@ static void scanRelocs(InputSectionBase &Sec, ArrayRef Rels) { // Sort relocations by offset to binary search for R_RISCV_PCREL_HI20 if (Config->EMachine == EM_RISCV) std::stable_sort(Sec.Relocations.begin(), Sec.Relocations.end(), - RelocationOffsetComparator{}); + [](const Relocation &LHS, const Relocation &RHS) { + return LHS.Offset < RHS.Offset; + }); } template void elf::scanRelocations(InputSectionBase &S) { @@ -1099,6 +1238,21 @@ template void elf::scanRelocations(InputSectionBase &S) { scanRelocs(S, S.rels()); } +// Figure out which representation to use for any absolute relocs to +// non-preemptible ifuncs that we visited during scanRelocs(). +void elf::addIRelativeRelocs() { + for (IRelativeReloc &R : IRelativeRelocs) { + if (R.Sym->Type == STT_GNU_IFUNC) + In.RelaIplt->addReloc( + {Target->IRelativeRel, R.Sec, R.Offset, true, R.Sym, 0}); + else if (Config->Pic) + addRelativeReloc(R.Sec, R.Offset, R.Sym, 0, R_ABS, R.Type); + else + R.Sec->Relocations.push_back({R_ABS, R.Type, R.Offset, 0, R.Sym}); + } + IRelativeRelocs.clear(); +} + static bool mergeCmp(const InputSection *A, const InputSection *B) { // std::merge requires a strict weak ordering. if (A->OutSecOff < B->OutSecOff) diff --git a/lld/ELF/Relocations.h b/lld/ELF/Relocations.h index 41a2d45357450..b7de8a8367b25 100644 --- a/lld/ELF/Relocations.h +++ b/lld/ELF/Relocations.h @@ -29,23 +29,9 @@ typedef uint32_t RelType; // from files are converted to these types so that the main code // doesn't have to know about architecture-specific details. enum RelExpr { - R_INVALID, R_ABS, R_ADDEND, - R_AARCH64_GOT_PAGE_PC, - // The expression is used for IFUNC support. Describes PC-relative - // address of the memory page of GOT entry. This entry is used for - // a redirection to IPLT. - R_AARCH64_GOT_PAGE_PC_PLT, - R_AARCH64_RELAX_TLS_GD_TO_IE_PAGE_PC, - R_AARCH64_PAGE_PC, - R_AARCH64_PLT_PAGE_PC, - R_AARCH64_TLSDESC_PAGE, - R_ARM_SBREL, R_GOT, - // The expression is used for IFUNC support. Evaluates to GOT entry, - // containing redirection to the IPLT. - R_GOT_PLT, R_GOTONLY_PC, R_GOTONLY_PC_FROM_END, R_GOTREL, @@ -53,24 +39,12 @@ enum RelExpr { R_GOT_FROM_END, R_GOT_OFF, R_GOT_PC, - R_HEXAGON_GOT, R_HINT, - R_MIPS_GOTREL, - R_MIPS_GOT_GP, - R_MIPS_GOT_GP_PC, - R_MIPS_GOT_LOCAL_PAGE, - R_MIPS_GOT_OFF, - R_MIPS_GOT_OFF32, - R_MIPS_TLSGD, - R_MIPS_TLSLD, R_NEG_TLS, R_NONE, R_PC, R_PLT, R_PLT_PC, - R_PPC_CALL, - R_PPC_CALL_PLT, - R_PPC_TOC, R_RELAX_GOT_PC, R_RELAX_GOT_PC_NOPIC, R_RELAX_TLS_GD_TO_IE, @@ -82,7 +56,6 @@ enum RelExpr { R_RELAX_TLS_IE_TO_LE, R_RELAX_TLS_LD_TO_LE, R_RELAX_TLS_LD_TO_LE_ABS, - R_RISCV_PC_INDIRECT, R_SIZE, R_TLS, R_TLSDESC, @@ -96,38 +69,32 @@ enum RelExpr { R_TLSLD_GOT_OFF, R_TLSLD_HINT, R_TLSLD_PC, -}; - -// Build a bitmask with one bit set for each RelExpr. -// -// Constexpr function arguments can't be used in static asserts, so we -// use template arguments to build the mask. -// But function template partial specializations don't exist (needed -// for base case of the recursion), so we need a dummy struct. -template struct RelExprMaskBuilder { - static inline uint64_t build() { return 0; } -}; -// Specialization for recursive case. -template -struct RelExprMaskBuilder { - static inline uint64_t build() { - static_assert(0 <= Head && Head < 64, - "RelExpr is too large for 64-bit mask!"); - return (uint64_t(1) << Head) | RelExprMaskBuilder::build(); - } + // The following is abstract relocation types used for only one target. + // + // Even though RelExpr is intended to be a target-neutral representation + // of a relocation type, there are some relocations whose semantics are + // unique to a target. Such relocation are marked with R_. + R_AARCH64_GOT_PAGE_PC, + R_AARCH64_PAGE_PC, + R_AARCH64_RELAX_TLS_GD_TO_IE_PAGE_PC, + R_AARCH64_TLSDESC_PAGE, + R_ARM_SBREL, + R_HEXAGON_GOT, + R_MIPS_GOTREL, + R_MIPS_GOT_GP, + R_MIPS_GOT_GP_PC, + R_MIPS_GOT_LOCAL_PAGE, + R_MIPS_GOT_OFF, + R_MIPS_GOT_OFF32, + R_MIPS_TLSGD, + R_MIPS_TLSLD, + R_PPC_CALL, + R_PPC_CALL_PLT, + R_PPC_TOC, + R_RISCV_PC_INDIRECT, }; -// Return true if `Expr` is one of `Exprs`. -// There are fewer than 64 RelExpr's, so we can represent any set of -// RelExpr's as a constant bit mask and test for membership with a -// couple cheap bitwise operations. -template bool isRelExprOneOf(RelExpr Expr) { - assert(0 <= Expr && (int)Expr < 64 && - "RelExpr is too large for 64-bit mask!"); - return (uint64_t(1) << Expr) & RelExprMaskBuilder::build(); -} - // Architecture-neutral representation of relocation. struct Relocation { RelExpr Expr; @@ -137,23 +104,10 @@ struct Relocation { Symbol *Sym; }; -struct RelocationOffsetComparator { - bool operator()(const Relocation &Lhs, const Relocation &Rhs) { - return Lhs.Offset < Rhs.Offset; - } - - // For std::lower_bound, std::upper_bound, std::equal_range. - bool operator()(const Relocation &Rel, uint64_t Val) { - return Rel.Offset < Val; - } - - bool operator()(uint64_t Val, const Relocation &Rel) { - return Val < Rel.Offset; - } -}; - template void scanRelocations(InputSectionBase &); +void addIRelativeRelocs(); + class ThunkSection; class Thunk; struct InputSectionDescription; diff --git a/lld/ELF/ScriptParser.cpp b/lld/ELF/ScriptParser.cpp index a33e92b07001b..96ab5cc60e886 100644 --- a/lld/ELF/ScriptParser.cpp +++ b/lld/ELF/ScriptParser.cpp @@ -329,7 +329,7 @@ void ScriptParser::readEntry() { void ScriptParser::readExtern() { expect("("); while (!errorCount() && !consume(")")) - Config->Undefined.push_back(next()); + Config->Undefined.push_back(unquote(next())); } void ScriptParser::readGroup() { @@ -391,10 +391,11 @@ static std::pair parseBfdName(StringRef S) { .Case("elf32-x86-64", {ELF32LEKind, EM_X86_64}) .Case("elf64-aarch64", {ELF64LEKind, EM_AARCH64}) .Case("elf64-littleaarch64", {ELF64LEKind, EM_AARCH64}) + .Case("elf32-powerpc", {ELF32BEKind, EM_PPC}) .Case("elf64-powerpc", {ELF64BEKind, EM_PPC64}) .Case("elf64-powerpcle", {ELF64LEKind, EM_PPC64}) .Case("elf64-x86-64", {ELF64LEKind, EM_X86_64}) - .Case("elf32-tradbigmips", {ELF32BEKind, EM_MIPS}) + .Cases("elf32-tradbigmips", "elf32-bigmips", {ELF32BEKind, EM_MIPS}) .Case("elf32-ntradbigmips", {ELF32BEKind, EM_MIPS}) .Case("elf32-tradlittlemips", {ELF32LEKind, EM_MIPS}) .Case("elf32-ntradlittlemips", {ELF32LEKind, EM_MIPS}) diff --git a/lld/ELF/Symbols.cpp b/lld/ELF/Symbols.cpp index 52fa72afaf5d7..a1986d8df55b3 100644 --- a/lld/ELF/Symbols.cpp +++ b/lld/ELF/Symbols.cpp @@ -89,6 +89,19 @@ static uint64_t getSymVA(const Symbol &Sym, int64_t &Addend) { // understanding of the linker. uint64_t VA = IS->getVA(Offset); + // MIPS relocatable files can mix regular and microMIPS code. + // Linker needs to distinguish such code. To do so microMIPS + // symbols has the `STO_MIPS_MICROMIPS` flag in the `st_other` + // field. Unfortunately, the `MIPS::relocateOne()` method has + // a symbol value only. To pass type of the symbol (regular/microMIPS) + // to that routine as well as other places where we write + // a symbol value as-is (.dynamic section, `Elf_Ehdr::e_entry` + // field etc) do the same trick as compiler uses to mark microMIPS + // for CPU - set the less-significant bit. + if (Config->EMachine == EM_MIPS && isMicroMips() && + ((Sym.StOther & STO_MIPS_MICROMIPS) || Sym.NeedsPltAddr)) + VA |= 1; + if (D.isTls() && !Config->Relocatable) { // Use the address of the TLS segment's first section rather than the // segment's address, because segment addresses aren't initialized until @@ -120,20 +133,24 @@ uint64_t Symbol::getVA(int64_t Addend) const { return OutVA + Addend; } -uint64_t Symbol::getGotVA() const { return In.Got->getVA() + getGotOffset(); } +uint64_t Symbol::getGotVA() const { + if (GotInIgot) + return In.IgotPlt->getVA() + getGotPltOffset(); + return In.Got->getVA() + getGotOffset(); +} uint64_t Symbol::getGotOffset() const { return GotIndex * Target->GotEntrySize; } uint64_t Symbol::getGotPltVA() const { - if (this->IsInIgot) + if (IsInIplt) return In.IgotPlt->getVA() + getGotPltOffset(); return In.GotPlt->getVA() + getGotPltOffset(); } uint64_t Symbol::getGotPltOffset() const { - if (IsInIgot) + if (IsInIplt) return PltIndex * Target->GotPltEntrySize; return (PltIndex + Target->GotPltHeaderEntriesNum) * Target->GotPltEntrySize; } @@ -145,7 +162,14 @@ uint64_t Symbol::getPPC64LongBranchOffset() const { uint64_t Symbol::getPltVA() const { PltSection *Plt = IsInIplt ? In.Iplt : In.Plt; - return Plt->getVA() + Plt->HeaderSize + PltIndex * Target->PltEntrySize; + uint64_t OutVA = + Plt->getVA() + Plt->HeaderSize + PltIndex * Target->PltEntrySize; + // While linking microMIPS code PLT code are always microMIPS + // code. Set the less-significant bit to track that fact. + // See detailed comment in the `getSymVA` function. + if (Config->EMachine == EM_MIPS && isMicroMips()) + OutVA |= 1; + return OutVA; } uint64_t Symbol::getPPC64LongBranchTableVA() const { diff --git a/lld/ELF/Symbols.h b/lld/ELF/Symbols.h index 1694ef4ab5370..fc48b09bacea8 100644 --- a/lld/ELF/Symbols.h +++ b/lld/ELF/Symbols.h @@ -181,7 +181,7 @@ class Symbol { uint8_t StOther, uint8_t Type) : File(File), NameData(Name.Data), NameSize(Name.Size), Binding(Binding), Type(Type), StOther(StOther), SymbolKind(K), NeedsPltAddr(false), - IsInIplt(false), IsInIgot(false), IsPreemptible(false), + IsInIplt(false), GotInIgot(false), IsPreemptible(false), Used(!Config->GcSections), NeedsTocRestore(false), ScriptDefined(false) {} @@ -190,11 +190,13 @@ class Symbol { // For SharedSymbol only. unsigned NeedsPltAddr : 1; - // True if this symbol is in the Iplt sub-section of the Plt. + // True if this symbol is in the Iplt sub-section of the Plt and the Igot + // sub-section of the .got.plt or .got. unsigned IsInIplt : 1; - // True if this symbol is in the Igot sub-section of the .got.plt or .got. - unsigned IsInIgot : 1; + // True if this symbol needs a GOT entry and its GOT entry is actually in + // Igot. This will be true only for certain non-preemptible ifuncs. + unsigned GotInIgot : 1; // True if this symbol is preemptible at load time. unsigned IsPreemptible : 1; diff --git a/lld/ELF/SyntheticSections.cpp b/lld/ELF/SyntheticSections.cpp index 507359847537b..a31ef9ad50e92 100644 --- a/lld/ELF/SyntheticSections.cpp +++ b/lld/ELF/SyntheticSections.cpp @@ -14,7 +14,6 @@ //===----------------------------------------------------------------------===// #include "SyntheticSections.h" -#include "Bits.h" #include "Config.h" #include "InputFiles.h" #include "LinkerScript.h" @@ -58,6 +57,17 @@ using llvm::support::endian::write64le; constexpr size_t MergeNoTailSection::NumShards; +static uint64_t readUint(uint8_t *Buf) { + return Config->Is64 ? read64(Buf) : read32(Buf); +} + +static void writeUint(uint8_t *Buf, uint64_t Val) { + if (Config->Is64) + write64(Buf, Val); + else + write32(Buf, Val); +} + // Returns an LLD version string. static ArrayRef getVersion() { // Check LLD_VERSION first for ease of testing. @@ -499,7 +509,7 @@ void EhFrameSection::finalizeContents() { // to get an FDE from an address to which FDE is applied. This function // returns a list of such pairs. std::vector EhFrameSection::getFdeData() const { - uint8_t *Buf = getParent()->Loc + OutSecOff; + uint8_t *Buf = Out::BufferStart + getParent()->Offset + OutSecOff; std::vector Ret; uint64_t VA = In.EhFrameHdr->getVA(); @@ -585,6 +595,9 @@ void EhFrameSection::writeTo(uint8_t *Buf) { // getOffset() takes care of discontiguous section pieces. for (EhInputSection *S : Sections) S->relocateAlloc(Buf, nullptr); + + if (In.EhFrameHdr && In.EhFrameHdr->getParent()) + In.EhFrameHdr->write(); } GotSection::GotSection() @@ -806,7 +819,7 @@ bool MipsGotSection::updateAllocSize() { return false; } -template void MipsGotSection::build() { +void MipsGotSection::build() { if (Gots.empty()) return; @@ -1028,11 +1041,8 @@ void MipsGotSection::writeTo(uint8_t *Buf) { for (const FileGot &G : Gots) { auto Write = [&](size_t I, const Symbol *S, int64_t A) { uint64_t VA = A; - if (S) { + if (S) VA = S->getVA(A); - if (S->StOther & STO_MIPS_MICROMIPS) - VA |= 1; - } writeUint(Buf + I * Config->Wordsize, VA); }; // Write 'page address' entries to the local part of the GOT. @@ -1132,7 +1142,6 @@ IgotPltSection::IgotPltSection() Target->GotPltEntrySize, getIgotPltName()) {} void IgotPltSection::addEntry(Symbol &Sym) { - Sym.IsInIgot = true; assert(Sym.PltIndex == Entries.size()); Entries.push_back(&Sym); } @@ -1295,6 +1304,8 @@ template void DynamicSection::finalizeContents() { } if (!Config->ZText) DtFlags |= DF_TEXTREL; + if (Config->HasStaticTlsModel) + DtFlags |= DF_STATIC_TLS; if (DtFlags) addInt(DT_FLAGS, DtFlags); @@ -1394,16 +1405,16 @@ template void DynamicSection::finalizeContents() { if (B->isDefined()) addSym(DT_FINI, B); - bool HasVerNeed = InX::VerNeed->getNeedNum() != 0; + bool HasVerNeed = In.VerNeed->getNeedNum() != 0; if (HasVerNeed || In.VerDef) - addInSec(DT_VERSYM, InX::VerSym); + addInSec(DT_VERSYM, In.VerSym); if (In.VerDef) { addInSec(DT_VERDEF, In.VerDef); addInt(DT_VERDEFNUM, getVerDefNum()); } if (HasVerNeed) { - addInSec(DT_VERNEED, InX::VerNeed); - addInt(DT_VERNEEDNUM, InX::VerNeed->getNeedNum()); + addInSec(DT_VERNEED, In.VerNeed); + addInt(DT_VERNEEDNUM, In.VerNeed->getNeedNum()); } if (Config->EMachine == EM_MIPS) { @@ -1506,9 +1517,8 @@ void RelocationBaseSection::finalizeContents() { // When linking glibc statically, .rel{,a}.plt contains R_*_IRELATIVE // relocations due to IFUNC (e.g. strcpy). sh_link will be set to 0 in that // case. - InputSection *SymTab = Config->Relocatable ? In.SymTab : In.DynSymTab; - if (SymTab && SymTab->getParent()) - getParent()->Link = SymTab->getParent()->SectionIndex; + if (In.DynSymTab && In.DynSymTab->getParent()) + getParent()->Link = In.DynSymTab->getParent()->SectionIndex; else getParent()->Link = 0; @@ -2000,6 +2010,11 @@ template void SymbolTableSection::writeTo(uint8_t *Buf) { ESym->setVisibility(Sym->Visibility); } + // The 3 most significant bits of st_other are used by OpenPOWER ABI. + // See getPPC64GlobalEntryToLocalEntryOffset() for more details. + if (Config->EMachine == EM_PPC64) + ESym->st_other |= Sym->StOther & 0xe0; + ESym->st_name = Ent.StrTabOffset; ESym->st_shndx = getSymSectionIndex(Ent.Sym); @@ -2036,14 +2051,17 @@ template void SymbolTableSection::writeTo(uint8_t *Buf) { if (Sym->isInPlt() && Sym->NeedsPltAddr) ESym->st_other |= STO_MIPS_PLT; if (isMicroMips()) { - // Set STO_MIPS_MICROMIPS flag and less-significant bit for - // a defined microMIPS symbol and symbol should point to its - // PLT entry (in case of microMIPS, PLT entries always contain - // microMIPS code). + // We already set the less-significant bit for symbols + // marked by the `STO_MIPS_MICROMIPS` flag and for microMIPS PLT + // records. That allows us to distinguish such symbols in + // the `MIPS::relocateOne()` routine. Now we should + // clear that bit for non-dynamic symbol table, so tools + // like `objdump` will be able to deal with a correct + // symbol position. if (Sym->isDefined() && ((Sym->StOther & STO_MIPS_MICROMIPS) || Sym->NeedsPltAddr)) { - if (StrTabSec.isDynamic()) - ESym->st_value |= 1; + if (!StrTabSec.isDynamic()) + ESym->st_value &= ~1; ESym->st_other |= STO_MIPS_MICROMIPS; } } @@ -2332,10 +2350,8 @@ void PltSection::writeTo(uint8_t *Buf) { template void PltSection::addEntry(Symbol &Sym) { Sym.PltIndex = Entries.size(); RelocationBaseSection *PltRelocSection = In.RelaPlt; - if (IsIplt) { + if (IsIplt) PltRelocSection = In.RelaIplt; - Sym.IsInIplt = true; - } unsigned RelOff = static_cast *>(PltRelocSection)->getRelocOffset(); Entries.push_back(std::make_pair(&Sym, RelOff)); @@ -2654,11 +2670,20 @@ bool GdbIndexSection::empty() const { return Chunks.empty(); } EhFrameHeader::EhFrameHeader() : SyntheticSection(SHF_ALLOC, SHT_PROGBITS, 4, ".eh_frame_hdr") {} +void EhFrameHeader::writeTo(uint8_t *Buf) { + // Unlike most sections, the EhFrameHeader section is written while writing + // another section, namely EhFrameSection, which calls the write() function + // below from its writeTo() function. This is necessary because the contents + // of EhFrameHeader depend on the relocated contents of EhFrameSection and we + // don't know which order the sections will be written in. +} + // .eh_frame_hdr contains a binary search table of pointers to FDEs. // Each entry of the search table consists of two values, // the starting PC from where FDEs covers, and the FDE's address. // It is sorted by PC. -void EhFrameHeader::writeTo(uint8_t *Buf) { +void EhFrameHeader::write() { + uint8_t *Buf = Out::BufferStart + getParent()->Offset + OutSecOff; typedef EhFrameSection::FdeData FdeData; std::vector Fdes = In.EhFrame->getFdeData(); @@ -2744,24 +2769,23 @@ size_t VersionDefinitionSection::getSize() const { } // .gnu.version is a table where each entry is 2 byte long. -template -VersionTableSection::VersionTableSection() +VersionTableSection::VersionTableSection() : SyntheticSection(SHF_ALLOC, SHT_GNU_versym, sizeof(uint16_t), ".gnu.version") { this->Entsize = 2; } -template void VersionTableSection::finalizeContents() { +void VersionTableSection::finalizeContents() { // At the moment of june 2016 GNU docs does not mention that sh_link field // should be set, but Sun docs do. Also readelf relies on this field. getParent()->Link = In.DynSymTab->getParent()->SectionIndex; } -template size_t VersionTableSection::getSize() const { +size_t VersionTableSection::getSize() const { return (In.DynSymTab->getSymbols().size() + 1) * 2; } -template void VersionTableSection::writeTo(uint8_t *Buf) { +void VersionTableSection::writeTo(uint8_t *Buf) { Buf += 2; for (const SymbolTableEntry &S : In.DynSymTab->getSymbols()) { write16(Buf, S.Sym->VersionId); @@ -2769,12 +2793,11 @@ template void VersionTableSection::writeTo(uint8_t *Buf) { } } -template bool VersionTableSection::empty() const { - return !In.VerDef && InX::VerNeed->empty(); +bool VersionTableSection::empty() const { + return !In.VerDef && In.VerNeed->empty(); } -template -VersionNeedSection::VersionNeedSection() +VersionNeedBaseSection::VersionNeedBaseSection() : SyntheticSection(SHF_ALLOC, SHT_GNU_verneed, sizeof(uint32_t), ".gnu.version_r") { // Identifiers in verneed section start at 2 because 0 and 1 are reserved @@ -3169,11 +3192,6 @@ template void PltSection::addEntry(Symbol &Sym); template void PltSection::addEntry(Symbol &Sym); template void PltSection::addEntry(Symbol &Sym); -template void MipsGotSection::build(); -template void MipsGotSection::build(); -template void MipsGotSection::build(); -template void MipsGotSection::build(); - template class elf::MipsAbiFlagsSection; template class elf::MipsAbiFlagsSection; template class elf::MipsAbiFlagsSection; @@ -3214,11 +3232,6 @@ template class elf::SymbolTableSection; template class elf::SymbolTableSection; template class elf::SymbolTableSection; -template class elf::VersionTableSection; -template class elf::VersionTableSection; -template class elf::VersionTableSection; -template class elf::VersionTableSection; - template class elf::VersionNeedSection; template class elf::VersionNeedSection; template class elf::VersionNeedSection; diff --git a/lld/ELF/SyntheticSections.h b/lld/ELF/SyntheticSections.h index 90e1e12d94882..d160d3a96f645 100644 --- a/lld/ELF/SyntheticSections.h +++ b/lld/ELF/SyntheticSections.h @@ -190,7 +190,7 @@ class MipsGotSection final : public SyntheticSection { // Join separate GOTs built for each input file to generate // primary and optional multiple secondary GOTs. - template void build(); + void build(); void addEntry(InputFile &File, Symbol &Sym, int64_t Addend, RelExpr Expr); void addDynTlsEntry(InputFile &File, Symbol &Sym); @@ -743,6 +743,7 @@ class GdbIndexSection final : public SyntheticSection { class EhFrameHeader final : public SyntheticSection { public: EhFrameHeader(); + void write(); void writeTo(uint8_t *Buf) override; size_t getSize() const override; bool empty() const override; @@ -776,7 +777,6 @@ class VersionDefinitionSection final : public SyntheticSection { // identifier defined in the either .gnu.version_r or .gnu.version_d section. // The values 0 and 1 are reserved. All other values are used for versions in // the own object or in any of the dependencies. -template class VersionTableSection final : public SyntheticSection { public: VersionTableSection(); @@ -786,12 +786,24 @@ class VersionTableSection final : public SyntheticSection { bool empty() const override; }; +class VersionNeedBaseSection : public SyntheticSection { +protected: + // The next available version identifier. + unsigned NextIndex; + +public: + VersionNeedBaseSection(); + virtual void addSymbol(Symbol *Sym) = 0; + virtual size_t getNeedNum() const = 0; +}; + // The .gnu.version_r section defines the version identifiers used by // .gnu.version. It contains a linked list of Elf_Verneed data structures. Each // Elf_Verneed specifies the version requirements for a single DSO, and contains // a reference to a linked list of Elf_Vernaux data structures which define the // mapping from version identifiers to version names. -template class VersionNeedSection final : public SyntheticSection { +template +class VersionNeedSection final : public VersionNeedBaseSection { typedef typename ELFT::Verneed Elf_Verneed; typedef typename ELFT::Vernaux Elf_Vernaux; @@ -799,16 +811,12 @@ template class VersionNeedSection final : public SyntheticSection { // string table offsets of their sonames. std::vector *, size_t>> Needed; - // The next available version identifier. - unsigned NextIndex; - public: - VersionNeedSection(); - void addSymbol(Symbol *Sym); + void addSymbol(Symbol *Sym) override; void finalizeContents() override; void writeTo(uint8_t *Buf) override; size_t getSize() const override; - size_t getNeedNum() const { return Needed.size(); } + size_t getNeedNum() const override { return Needed.size(); } bool empty() const override; }; @@ -1007,8 +1015,6 @@ struct InStruct { SymbolTableBaseSection *DynSymTab; GnuHashTableSection *GnuHashTab; HashTableSection *HashTab; - InputSection *Interp; - GdbIndexSection *GdbIndex; GotSection *Got; GotPltSection *GotPlt; IgotPltSection *IgotPlt; @@ -1026,17 +1032,12 @@ struct InStruct { SymbolTableBaseSection *SymTab; SymtabShndxSection *SymTabShndx; VersionDefinitionSection *VerDef; + VersionNeedBaseSection *VerNeed; + VersionTableSection *VerSym; }; extern InStruct In; -template struct InX { - static VersionTableSection *VerSym; - static VersionNeedSection *VerNeed; -}; - -template VersionTableSection *InX::VerSym; -template VersionNeedSection *InX::VerNeed; } // namespace elf } // namespace lld diff --git a/lld/ELF/Target.cpp b/lld/ELF/Target.cpp index f902d678a9398..66f438cdd094c 100644 --- a/lld/ELF/Target.cpp +++ b/lld/ELF/Target.cpp @@ -98,7 +98,7 @@ template static ErrorPlace getErrPlace(const uint8_t *Loc) { if (!IS->getParent()) continue; - uint8_t *ISLoc = IS->getParent()->Loc + IS->OutSecOff; + uint8_t *ISLoc = Out::BufferStart + IS->getParent()->Offset + IS->OutSecOff; if (ISLoc <= Loc && Loc < ISLoc + IS->getSize()) return {IS, IS->template getLocation(Loc - ISLoc) + ": "}; } diff --git a/lld/ELF/Target.h b/lld/ELF/Target.h index ace0705ad82bb..c7d29b63b47d6 100644 --- a/lld/ELF/Target.h +++ b/lld/ELF/Target.h @@ -32,6 +32,7 @@ class TargetInfo { virtual void writeGotPlt(uint8_t *Buf, const Symbol &S) const {}; virtual void writeIgotPlt(uint8_t *Buf, const Symbol &S) const; virtual int64_t getImplicitAddend(const uint8_t *Buf, RelType Type) const; + virtual int getTlsGdRelaxSkip(RelType Type) const { return 1; } // If lazy binding is supported, the first entry of the PLT has code // to call the dynamic linker to resolve PLT entries the first time @@ -80,7 +81,6 @@ class TargetInfo { virtual ~TargetInfo(); - unsigned TlsGdRelaxSkip = 1; unsigned PageSize = 4096; unsigned DefaultMaxPageSize = 4096; @@ -176,7 +176,9 @@ static inline std::string getErrorLocation(const uint8_t *Loc) { // to the local entry-point. unsigned getPPC64GlobalEntryToLocalEntryOffset(uint8_t StOther); -bool isPPC64SmallCodeModelReloc(RelType Type); +// Returns true if a relocation is a small code model relocation that accesses +// the .toc section. +bool isPPC64SmallCodeModelTocReloc(RelType Type); uint64_t getPPC64TocBase(); uint64_t getAArch64Page(uint64_t Expr); diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp index 6465a619d061f..705ce0f65ba97 100644 --- a/lld/ELF/Writer.cpp +++ b/lld/ELF/Writer.cpp @@ -60,7 +60,8 @@ template class Writer { std::vector createPhdrs(); void removeEmptyPTLoad(); - void addPtArmExid(std::vector &Phdrs); + void addPhdrForSection(std::vector &Phdrs, unsigned ShType, + unsigned PType, unsigned PFlags); void assignFileOffsets(); void assignFileOffsetsBinary(); void setPhdrs(); @@ -288,10 +289,8 @@ template static void createSyntheticSections() { Out::ProgramHeaders = make("", 0, SHF_ALLOC); Out::ProgramHeaders->Alignment = Config->Wordsize; - if (needsInterpSection()) { - In.Interp = createInterpSection(); - Add(In.Interp); - } + if (needsInterpSection()) + Add(createInterpSection()); if (Config->Strip != StripPolicy::All) { In.StrTab = make(".strtab", false); @@ -333,16 +332,16 @@ template static void createSyntheticSections() { In.DynSymTab = make>(*In.DynStrTab); Add(In.DynSymTab); - InX::VerSym = make>(); - Add(InX::VerSym); + In.VerSym = make(); + Add(In.VerSym); if (!Config->VersionDefinitions.empty()) { In.VerDef = make(); Add(In.VerDef); } - InX::VerNeed = make>(); - Add(InX::VerNeed); + In.VerNeed = make>(); + Add(In.VerNeed); if (Config->GnuHash) { In.GnuHashTab = make(); @@ -384,10 +383,8 @@ template static void createSyntheticSections() { In.IgotPlt = make(); Add(In.IgotPlt); - if (Config->GdbIndex) { - In.GdbIndex = GdbIndexSection::create(); - Add(In.GdbIndex); - } + if (Config->GdbIndex) + Add(GdbIndexSection::create()); // We always need to add rel[a].plt to output if it has entries. // Even for static linking it can contain R_[*]_IRELATIVE relocations. @@ -1262,8 +1259,8 @@ static void sortSection(OutputSection *Sec, auto *ISD = cast(Sec->SectionCommands[0]); std::stable_sort(ISD->Sections.begin(), ISD->Sections.end(), [](const InputSection *A, const InputSection *B) -> bool { - return A->File->PPC64SmallCodeModelRelocs && - !B->File->PPC64SmallCodeModelRelocs; + return A->File->PPC64SmallCodeModelTocRelocs && + !B->File->PPC64SmallCodeModelTocRelocs; }); return; } @@ -1677,6 +1674,8 @@ template void Writer::finalizeSections() { if (!Config->Relocatable) forEachRelSec(scanRelocations); + addIRelativeRelocs(); + if (In.Plt && !In.Plt->empty()) In.Plt->addSymbols(); if (In.Iplt && !In.Iplt->empty()) @@ -1715,7 +1714,7 @@ template void Writer::finalizeSections() { In.DynSymTab->addSymbol(Sym); if (auto *File = dyn_cast_or_null>(Sym->File)) if (File->IsNeeded && !Sym->isUndefined()) - InX::VerNeed->addSymbol(Sym); + In.VerNeed->addSymbol(Sym); } } @@ -1724,7 +1723,7 @@ template void Writer::finalizeSections() { return; if (In.MipsGot) - In.MipsGot->build(); + In.MipsGot->build(); removeUnusedSyntheticSections(); @@ -1759,7 +1758,16 @@ template void Writer::finalizeSections() { // image base and the dynamic section on mips includes the image base. if (!Config->Relocatable && !Config->OFormatBinary) { Phdrs = Script->hasPhdrsCommands() ? Script->createPhdrs() : createPhdrs(); - addPtArmExid(Phdrs); + if (Config->EMachine == EM_ARM) { + // PT_ARM_EXIDX is the ARM EHABI equivalent of PT_GNU_EH_FRAME + addPhdrForSection(Phdrs, SHT_ARM_EXIDX, PT_ARM_EXIDX, PF_R); + } + if (Config->EMachine == EM_MIPS) { + // Add separate segments for MIPS-specific sections. + addPhdrForSection(Phdrs, SHT_MIPS_REGINFO, PT_MIPS_REGINFO, PF_R); + addPhdrForSection(Phdrs, SHT_MIPS_OPTIONS, PT_MIPS_OPTIONS, PF_R); + addPhdrForSection(Phdrs, SHT_MIPS_ABIFLAGS, PT_MIPS_ABIFLAGS, PF_R); + } Out::ProgramHeaders->Size = sizeof(Elf_Phdr) * Phdrs.size(); // Find the TLS segment. This happens before the section layout loop so that @@ -1796,8 +1804,8 @@ template void Writer::finalizeSections() { finalizeSynthetic(In.Plt); finalizeSynthetic(In.Iplt); finalizeSynthetic(In.EhFrameHdr); - finalizeSynthetic(InX::VerSym); - finalizeSynthetic(InX::VerNeed); + finalizeSynthetic(In.VerSym); + finalizeSynthetic(In.VerNeed); finalizeSynthetic(In.Dynamic); if (!Script->HasSectionsCommand && !Config->Relocatable) @@ -1827,7 +1835,7 @@ template void Writer::finalizeSections() { // at the end because some tags like RELSZ depend on result // of finalizing other sections. for (OutputSection *Sec : OutputSections) - Sec->finalize(); + Sec->finalize(); } // Ensure data sections are not mixed with executable sections when @@ -2055,19 +2063,17 @@ template std::vector Writer::createPhdrs() { } template -void Writer::addPtArmExid(std::vector &Phdrs) { - if (Config->EMachine != EM_ARM) - return; - auto I = llvm::find_if(OutputSections, [](OutputSection *Cmd) { - return Cmd->Type == SHT_ARM_EXIDX; - }); +void Writer::addPhdrForSection(std::vector &Phdrs, + unsigned ShType, unsigned PType, + unsigned PFlags) { + auto I = llvm::find_if( + OutputSections, [=](OutputSection *Cmd) { return Cmd->Type == ShType; }); if (I == OutputSections.end()) return; - // PT_ARM_EXIDX is the ARM EHABI equivalent of PT_GNU_EH_FRAME - PhdrEntry *ARMExidx = make(PT_ARM_EXIDX, PF_R); - ARMExidx->add(*I); - Phdrs.push_back(ARMExidx); + PhdrEntry *Entry = make(PType, PFlags); + Entry->add(*I); + Phdrs.push_back(Entry); } // The first section of each PT_LOAD, the first section in PT_GNU_RELRO and the @@ -2382,23 +2388,33 @@ static uint16_t getELFType() { static uint8_t getAbiVersion() { // MIPS non-PIC executable gets ABI version 1. - if (Config->EMachine == EM_MIPS && getELFType() == ET_EXEC && - (Config->EFlags & (EF_MIPS_PIC | EF_MIPS_CPIC)) == EF_MIPS_CPIC) - return 1; + if (Config->EMachine == EM_MIPS) { + if (getELFType() == ET_EXEC && + (Config->EFlags & (EF_MIPS_PIC | EF_MIPS_CPIC)) == EF_MIPS_CPIC) + return 1; + return 0; + } + + if (Config->EMachine == EM_AMDGPU) { + uint8_t Ver = ObjectFiles[0]->ABIVersion; + for (InputFile *File : makeArrayRef(ObjectFiles).slice(1)) + if (File->ABIVersion != Ver) + error("incompatible ABI version: " + toString(File)); + return Ver; + } + return 0; } template void Writer::writeHeader() { - uint8_t *Buf = Buffer->getBufferStart(); - // For executable segments, the trap instructions are written before writing // the header. Setting Elf header bytes to zero ensures that any unused bytes // in header are zero-cleared, instead of having trap instructions. - memset(Buf, 0, sizeof(Elf_Ehdr)); - memcpy(Buf, "\177ELF", 4); + memset(Out::BufferStart, 0, sizeof(Elf_Ehdr)); + memcpy(Out::BufferStart, "\177ELF", 4); // Write the ELF header. - auto *EHdr = reinterpret_cast(Buf); + auto *EHdr = reinterpret_cast(Out::BufferStart); EHdr->e_ident[EI_CLASS] = Config->Is64 ? ELFCLASS64 : ELFCLASS32; EHdr->e_ident[EI_DATA] = Config->IsLE ? ELFDATA2LSB : ELFDATA2MSB; EHdr->e_ident[EI_VERSION] = EV_CURRENT; @@ -2420,7 +2436,7 @@ template void Writer::writeHeader() { } // Write the program header table. - auto *HBuf = reinterpret_cast(Buf + EHdr->e_phoff); + auto *HBuf = reinterpret_cast(Out::BufferStart + EHdr->e_phoff); for (PhdrEntry *P : Phdrs) { HBuf->p_type = P->p_type; HBuf->p_flags = P->p_flags; @@ -2442,7 +2458,7 @@ template void Writer::writeHeader() { // the value. The sentinel values and fields are: // e_shnum = 0, SHdrs[0].sh_size = number of sections. // e_shstrndx = SHN_XINDEX, SHdrs[0].sh_link = .shstrtab section index. - auto *SHdrs = reinterpret_cast(Buf + EHdr->e_shoff); + auto *SHdrs = reinterpret_cast(Out::BufferStart + EHdr->e_shoff); size_t Num = OutputSections.size() + 1; if (Num >= SHN_LORESERVE) SHdrs->sh_size = Num; @@ -2464,7 +2480,7 @@ template void Writer::writeHeader() { // Open a result file. template void Writer::openFile() { uint64_t MaxSize = Config->Is64 ? INT64_MAX : UINT32_MAX; - if (MaxSize < FileSize) { + if (FileSize != size_t(FileSize) || MaxSize < FileSize) { error("output file too large: " + Twine(FileSize) + " bytes"); return; } @@ -2476,18 +2492,19 @@ template void Writer::openFile() { Expected> BufferOrErr = FileOutputBuffer::create(Config->OutputFile, FileSize, Flags); - if (!BufferOrErr) + if (!BufferOrErr) { error("failed to open " + Config->OutputFile + ": " + llvm::toString(BufferOrErr.takeError())); - else - Buffer = std::move(*BufferOrErr); + return; + } + Buffer = std::move(*BufferOrErr); + Out::BufferStart = Buffer->getBufferStart(); } template void Writer::writeSectionsBinary() { - uint8_t *Buf = Buffer->getBufferStart(); for (OutputSection *Sec : OutputSections) if (Sec->Flags & SHF_ALLOC) - Sec->writeTo(Buf + Sec->Offset); + Sec->writeTo(Out::BufferStart + Sec->Offset); } static void fillTrap(uint8_t *I, uint8_t *End) { @@ -2506,11 +2523,12 @@ template void Writer::writeTrapInstr() { return; // Fill the last page. - uint8_t *Buf = Buffer->getBufferStart(); for (PhdrEntry *P : Phdrs) if (P->p_type == PT_LOAD && (P->p_flags & PF_X)) - fillTrap(Buf + alignDown(P->p_offset + P->p_filesz, Target->PageSize), - Buf + alignTo(P->p_offset + P->p_filesz, Target->PageSize)); + fillTrap(Out::BufferStart + + alignDown(P->p_offset + P->p_filesz, Target->PageSize), + Out::BufferStart + + alignTo(P->p_offset + P->p_filesz, Target->PageSize)); // Round up the file size of the last segment to the page boundary iff it is // an executable segment to ensure that other tools don't accidentally @@ -2526,27 +2544,16 @@ template void Writer::writeTrapInstr() { // Write section contents to a mmap'ed file. template void Writer::writeSections() { - uint8_t *Buf = Buffer->getBufferStart(); - - OutputSection *EhFrameHdr = nullptr; - if (In.EhFrameHdr && !In.EhFrameHdr->empty()) - EhFrameHdr = In.EhFrameHdr->getParent(); - // In -r or -emit-relocs mode, write the relocation sections first as in // ELf_Rel targets we might find out that we need to modify the relocated // section while doing it. for (OutputSection *Sec : OutputSections) if (Sec->Type == SHT_REL || Sec->Type == SHT_RELA) - Sec->writeTo(Buf + Sec->Offset); + Sec->writeTo(Out::BufferStart + Sec->Offset); for (OutputSection *Sec : OutputSections) - if (Sec != EhFrameHdr && Sec->Type != SHT_REL && Sec->Type != SHT_RELA) - Sec->writeTo(Buf + Sec->Offset); - - // The .eh_frame_hdr depends on .eh_frame section contents, therefore - // it should be written after .eh_frame is written. - if (EhFrameHdr) - EhFrameHdr->writeTo(Buf + EhFrameHdr->Offset); + if (Sec->Type != SHT_REL && Sec->Type != SHT_RELA) + Sec->writeTo(Out::BufferStart + Sec->Offset); } template void Writer::writeBuildId() { @@ -2554,9 +2561,7 @@ template void Writer::writeBuildId() { return; // Compute a hash of all sections of the output file. - uint8_t *Start = Buffer->getBufferStart(); - uint8_t *End = Start + FileSize; - In.BuildId->writeBuildId({Start, End}); + In.BuildId->writeBuildId({Out::BufferStart, size_t(FileSize)}); } template void elf::writeResult(); diff --git a/lld/MinGW/Driver.cpp b/lld/MinGW/Driver.cpp index 723a779b6e83c..55e9416bd8d5d 100644 --- a/lld/MinGW/Driver.cpp +++ b/lld/MinGW/Driver.cpp @@ -176,6 +176,8 @@ bool mingw::link(ArrayRef ArgsArr, raw_ostream &Diag) { Add("-dll"); if (Args.hasArg(OPT_verbose)) Add("-verbose"); + if (Args.hasArg(OPT_exclude_all_symbols)) + Add("-exclude-all-symbols"); if (Args.hasArg(OPT_export_all_symbols)) Add("-export-all-symbols"); if (Args.hasArg(OPT_large_address_aware)) @@ -187,6 +189,9 @@ bool mingw::link(ArrayRef ArgsArr, raw_ostream &Diag) { Args.getLastArgValue(OPT_m) != "arm64pe" && !Args.hasArg(OPT_dynamicbase)) Add("-dynamicbase:no"); + if (Args.hasFlag(OPT_no_insert_timestamp, OPT_insert_timestamp, false)) + Add("-timestamp:0"); + if (Args.hasFlag(OPT_gc_sections, OPT_no_gc_sections, false)) Add("-opt:ref"); else diff --git a/lld/MinGW/Options.td b/lld/MinGW/Options.td index 4dc613319093a..67698056bbf74 100644 --- a/lld/MinGW/Options.td +++ b/lld/MinGW/Options.td @@ -11,17 +11,23 @@ def Bstatic: F<"Bstatic">, HelpText<"Do not link against shared libraries">; def dynamicbase: F<"dynamicbase">, HelpText<"Enable ASLR">; def entry: S<"entry">, MetaVarName<"">, HelpText<"Name of entry point symbol">; +def exclude_all_symbols: F<"exclude-all-symbols">, + HelpText<"Don't automatically export any symbols">; def export_all_symbols: F<"export-all-symbols">, HelpText<"Export all symbols even if a def file or dllexport attributes are used">; def gc_sections: F<"gc-sections">, HelpText<"Remove unused sections">; def icf: J<"icf=">, HelpText<"Identical code folding">; def image_base: S<"image-base">, HelpText<"Base address of the program">; +def insert_timestamp: F<"insert-timestamp">, + HelpText<"Include PE header timestamp">; def kill_at: F<"kill-at">, HelpText<"Remove @n from exported symbols">; def l: JoinedOrSeparate<["-"], "l">, MetaVarName<"">, HelpText<"Root name of library to use">; def m: JoinedOrSeparate<["-"], "m">, HelpText<"Set target emulation">; def map: S<"Map">, HelpText<"Output a linker map">; def map_eq: J<"Map=">, Alias; +def no_insert_timestamp: F<"no-insert-timestamp">, + HelpText<"Don't include PE header timestamp">; def no_whole_archive: F<"no-whole-archive">, HelpText<"No longer include all object files for following archives">; def large_address_aware: Flag<["--"], "large-address-aware">, diff --git a/lld/docs/ReleaseNotes.rst b/lld/docs/ReleaseNotes.rst index 0b3cee5eec403..7b6dbdffbbef5 100644 --- a/lld/docs/ReleaseNotes.rst +++ b/lld/docs/ReleaseNotes.rst @@ -29,6 +29,9 @@ ELF Improvements COFF Improvements ----------------- +* lld-link now correctly reports duplicate symbol errors for obj files + that were compiled with /Gy. + * ... MinGW Improvements diff --git a/lld/docs/WebAssembly.rst b/lld/docs/WebAssembly.rst index 424c1a10c7e73..7858e0d2af9e6 100644 --- a/lld/docs/WebAssembly.rst +++ b/lld/docs/WebAssembly.rst @@ -11,8 +11,7 @@ Object file format ------------------ The format the input object files that lld expects is specified as part of the -the WebAssembly tool conventions -https://github.com/WebAssembly/tool-conventions/blob/master/Linking.md. +the WebAssembly tool conventions on linking_. This is object format that the llvm will produce when run with the ``wasm32-unknown-unknown`` target. To build llvm with WebAssembly support @@ -88,10 +87,52 @@ WebAssembly-specific options: By default the function table is neither imported nor exported, but defined for internal use only. -When building shared libraries symbols are exported if they are marked -as ``visibility=default``. When building executables only the entry point is -exported by default. In addition any symbol included on the command line via -``--export`` is also exported. +Bahaviour +--------- + +In general, where possible, the WebAssembly linker attempts to emulate the +behavior of a traditional ELF linker, and in particular the ELF port of lld. +For more specific details on how this is achieved see the tool conventions on +linking_. + +Function Signatrues +~~~~~~~~~~~~~~~~~~~ + +One way in which the WebAssembly linker differs from traditional native linkers +is that function signature checking is strict in WebAssembly. It is a +validation error for a module to contain to call site that doesn't agree with +the target signature. Even though this is undefined behavior in C/C++ its not +uncommon to find this in real world C/C++ programs. For example, a call site in +one complication unit which calls a function defined in another complication +unit but with too many arguments. + +In order not to generate such invalid modules lld has two modes of handling such +mismatches: it can simply error out or it can create stub functions that will +trap at runtime (functions that contain only an ``unreachable`` instruction) +and use these stub functions at the otherwise invalid call sites. + +The the default befviour is to generate these stub function and to produce +a warning. The ``--falal-warnings`` flag can be used to disable this behaviour +and error out if mismatched are found. + +Imports and Exports +~~~~~~~~~~~~~~~~~~~ + +When building a shared library any symbols marked as ``visibility=default`` will +be exported. When building an executable, only the entry point and symbols +flagged as ``WASM_SYMBOL_EXPORTED`` are exported by default. In LLVM the +``WASM_SYMBOL_EXPORTED`` flag is applied to any symbol in the ``llvm.used`` list +which corresponds to ``__attribute__((used))`` in C/C++ sources. + +In addition, symbols can be exported via the linker command line using +``--export``. + +Finally, just like with native ELF linker the ``--export-dynamic`` flag can be +used to export symbol in the executable which are marked as +``visibility=default``. + +Garbage Collection +~~~~~~~~~~~~~~~~~~ Since WebAssembly is designed with size in mind the linker defaults to ``--gc-sections`` which means that all unused functions and data segments will @@ -103,6 +144,18 @@ The symbols which are preserved by default are: - Any symbol which is to be exported. - Any symbol transitively referenced by the above. +Weak Undefined Functions +~~~~~~~~~~~~~~~~~~~~~~~~ + +On native platforms, calls to weak undefined functions end up as calls to the +null function pointer. With WebAssembly, direct calls must reference a defined +function (with the correct signature). In order to handle this case the linker +will generate function a stub containing only the ``unreachable`` instruction +and use this for any direct references to an undefined weak function. + +For example a runtime call to a weak undefined function ``foo`` will up trapping +on ``unreachable`` inside and linker-generated function called +``undefined:foo``. Missing features ---------------- @@ -112,3 +165,5 @@ Missing features - No support for creating shared libraries. The spec for shared libraries in WebAssembly is still in flux: https://github.com/WebAssembly/tool-conventions/blob/master/DynamicLinking.md + +.. _linking: https://github.com/WebAssembly/tool-conventions/blob/master/Linking.md diff --git a/lld/docs/index.rst b/lld/docs/index.rst index db8ea1cd53aac..8b3f70e1d457f 100644 --- a/lld/docs/index.rst +++ b/lld/docs/index.rst @@ -173,4 +173,5 @@ document soon. AtomLLD WebAssembly windows_support + missingkeyfunction ReleaseNotes diff --git a/lld/docs/ld.lld.1 b/lld/docs/ld.lld.1 index 591e165b5e136..2e499bac81ead 100644 --- a/lld/docs/ld.lld.1 +++ b/lld/docs/ld.lld.1 @@ -4,7 +4,7 @@ .\" .\" This man page documents only lld's ELF linking support, obtained originally .\" from FreeBSD. -.Dd September 26, 2018 +.Dd February 26, 2019 .Dt LD.LLD 1 .Os .Sh NAME @@ -217,6 +217,15 @@ Enable identical code folding. Enable safe identical code folding. .It Fl -icf Ns = Ns Cm none Disable identical code folding. +.It Fl -ignore-data-address-equality +Ignore address equality of data. C/C++ requires each data to have a unique +address. This option allows lld to do unsafe optimization that breaks the +requirement: create copies of read-only data or merge two or more read-only data +that happen to have the same value. +.It Fl -ignore-function-address-equality +Ignore address equality of functions. This option allows non-PIC calls to a +function with non-default visibility in a shared object. The function may have +different addresses within the executable and within the shared object. .It Fl -image-base Ns = Ns Ar value Set the base address to .Ar value . @@ -266,6 +275,8 @@ section. Disable garbage collection of unused sections. .It Fl -no-gnu-unique Disable STB_GNU_UNIQUE symbol binding. +.It Fl -no-merge-exidx-entries +Disable merging .ARM.exidx entries. .It Fl -no-rosegment Do not put read-only non-executable sections in their own segment. .It Fl -no-threads @@ -274,9 +285,11 @@ Do not run the linker multi-threaded. Report version scripts that refer undefined symbols. .It Fl -no-undefined Report unresolved symbols even if the linker is creating a shared library. +.It Fl -no-warn-symbol-ordering +Do not warn about problems with the symbol ordering file or call graph profile. .It Fl -no-whole-archive Restores the default behavior of loading archive members. -.It Fl -no-pie +.It Fl -no-pie , Fl -no-pic-executable Do not create a position independent executable. .It Fl -noinhibit-exec Retain the executable output file whenever it is still usable. @@ -318,9 +331,51 @@ Write optimization remarks in YAML format to .Ar file . .It Fl -opt-remarks-with-hotness Include hotness information in the optimization remarks file. +.It Fl -orphan-handling Ns = Ns Ar mode +Control how orphan sections are handled. An orphan section is one not +specifically mentioned in a linker script. +.Ar mode +may be: +.Pp +.Bl -tag -width 2n -compact +.It Cm place +Place orphan sections in suitable output sections. +.It Cm warn +Place orphan sections as for +.Cm place +and also report a warning. +.It Cm error +Place orphan sections as for +.Cm place +and also report an error. +.El +.Pp +.Cm place +is the default. +.It Fl -pack-dyn-relocs Ns = Ns Ar format +Pack dynamic relocations in the given format. +.Ar format +may be: +.Pp +.Bl -tag -width 2n -compact +.It Cm none +Don't pack. Dynamic relocations are encoded in SHT_REL(A). +.It Cm android +Pack dynamic relocations in SHT_ANDROID_REL(A). +.It Cm relr +Pack relative relocations in SHT_RELR, and the rest of dynamic relocations in SHT_REL(A). +.It Cm android+relr +Pack relative relocations in SHT_RELR, and the rest of dynamic relocations in SHT_ANDROID_REL(A). +.El +.Pp +.Cm none +is the default. If +.Fl -use-android-relr-tags +is specified, use SHT_ANDROID_RELR instead of SHT_RELR. +.Pp .It Fl -pic-veneer Always generate position independent thunks. -.It Fl -pie +.It Fl -pie , Fl -pic-executable Create a position independent executable. .It Fl -print-gc-sections List removed unused sections. @@ -439,6 +494,8 @@ Force to be an undefined symbol during linking. .It Fl -unresolved-symbols Ns = Ns Ar value Determine how to handle unresolved symbols. +.It Fl -use-android-relr-tags +Use SHT_ANDROID_RELR / DT_ANDROID_RELR* tags instead of SHT_RELR / DT_RELR*. .It Fl v Display the version number and proceed with linking if object files are specified. diff --git a/lld/docs/missingkeyfunction.rst b/lld/docs/missingkeyfunction.rst index 410c749c3b036..02196becd57a2 100644 --- a/lld/docs/missingkeyfunction.rst +++ b/lld/docs/missingkeyfunction.rst @@ -1,26 +1,27 @@ -Missing Key Method -================== +Missing Key Function +==================== If your build failed with a linker error something like this:: foo.cc:28: error: undefined reference to 'vtable for C' - the vtable symbol may be undefined because the class is missing its key function (see https://lld.llvm.org/missingkeyfunction) + the vtable symbol may be undefined because the class is missing its key function + (see https://lld.llvm.org/missingkeyfunction) it's likely that your class C has a key function (defined by the ABI as the first -non-pure, non-inline, virtual method), but you haven't actually defined it. +non-pure, non-inline, virtual function), but you haven't actually defined it. When a class has a key function, the compiler emits the vtable (and some other things as well) only in the translation unit that defines that key function. Thus, if you're missing the key function, you'll also be missing the vtable. If no other -function calls your missing method, you won't see any undefined reference errors +function calls your missing function, you won't see any undefined reference errors for it, but you will see undefined references to the vtable symbol. -When a class has no non-pure, non-inline, virtual methods, there is no key -method, and the compiler is forced to emit the vtable in every translation unit +When a class has no non-pure, non-inline, virtual functions, there is no key +function, and the compiler is forced to emit the vtable in every translation unit that references the class. In this case, it is emitted in a COMDAT section, which allows the linker to eliminate all duplicate copies. This is still wasteful in terms of object file size and link time, so it's always advisable to -ensure there is at least one eligible method that can serve as the key function. +ensure there is at least one eligible function that can serve as the key function. Here are the most common mistakes that lead to this error: @@ -36,8 +37,8 @@ Say you have a base class declared in a header file:: ... }; -Here, ``~B`` is the first non-pure, non-inline, virtual method, so it is the key -method. If you forget to define ``B::~B`` in your source file, the compiler will +Here, ``~B`` is the first non-pure, non-inline, virtual function, so it is the key +function. If you forget to define ``B::~B`` in your source file, the compiler will not emit the vtable for ``B``, and you'll get an undefined reference to "vtable for B". @@ -47,9 +48,9 @@ the first eligible key function and it's easy to forget to implement them. It's also more likely that you won't have any direct references to the destructor, so you won't see any undefined reference errors that point directly to the problem. -The solution in this case is to implement the missing method. +The solution in this case is to implement the missing function. -Forgetting to declare a virtual method in an abstract class as pure +Forgetting to declare a virtual function in an abstract class as pure ------------------------------------------------------------------- Say you have an abstract base class declared in a header file:: @@ -65,18 +66,18 @@ Say you have an abstract base class declared in a header file:: }; This base class is intended to be abstract, but you forgot to mark one of the -methods pure. Here, ``A::bar``, being non-pure, is nominated as the key function, +functions pure. Here, ``A::bar``, being non-pure, is nominated as the key function, and as a result, the vtable for ``A`` is not emitted, because the compiler is waiting for a translation unit that defines ``A::bar``. The solution in this case is to add the missing ``= 0`` to the declaration of ``A::bar``. -Key method is defined, but the linker doesn't see it +Key function is defined, but the linker doesn't see it ---------------------------------------------------- It's also possible that you have defined the key function somewhere, but the -object file containing the definition of that method isn't being linked into +object file containing the definition of that function isn't being linked into your application. The solution in this case is to check your dependencies to make sure that diff --git a/lld/include/lld/Common/Reproduce.h b/lld/include/lld/Common/Reproduce.h index ac7a822cf2a5a..3ebd11df09bea 100644 --- a/lld/include/lld/Common/Reproduce.h +++ b/lld/include/lld/Common/Reproduce.h @@ -27,10 +27,6 @@ std::string relativeToRoot(StringRef Path); // Quote a given string if it contains a space character. std::string quote(StringRef S); -// Rewrite the given path if a file exists with that pathname, otherwise -// returns the original path. -std::string rewritePath(StringRef S); - // Returns the string form of the given argument. std::string toString(const llvm::opt::Arg &Arg); } diff --git a/lld/include/lld/Common/Threads.h b/lld/include/lld/Common/Threads.h index e356fcd23a1c8..fba0e934b580e 100644 --- a/lld/include/lld/Common/Threads.h +++ b/lld/include/lld/Common/Threads.h @@ -80,6 +80,13 @@ inline void parallelForEachN(size_t Begin, size_t End, for_each_n(llvm::parallel::seq, Begin, End, Fn); } +template void parallelSort(R &&Range, FuncTy Fn) { + if (ThreadsEnabled) + sort(llvm::parallel::par, std::begin(Range), std::end(Range), Fn); + else + sort(llvm::parallel::seq, std::begin(Range), std::end(Range), Fn); +} + } // namespace lld #endif diff --git a/lld/test/COFF/comdat-selection.s b/lld/test/COFF/comdat-selection.s index 4926173abd426..988d9bd9516dc 100644 --- a/lld/test/COFF/comdat-selection.s +++ b/lld/test/COFF/comdat-selection.s @@ -73,13 +73,21 @@ symbol: # lld-link rejects all comdat selection type mismatches. Spot-test just a few # combinations. -# RUN: not lld-link /dll /noentry /nodefaultlib %t.discard.obj %t.one_only.obj 2>&1 | FileCheck --check-prefix=DISCARDONE %s -# DISCARDONE: lld-link: error: conflicting comdat type for symbol: 2 in -# RUN: lld-link /force /dll /noentry /nodefaultlib %t.discard.obj %t.one_only.obj 2>&1 | FileCheck --check-prefix=DISCARDONEFORCE %s -# DISCARDONEFORCE: lld-link: warning: conflicting comdat type for symbol: 2 in - -# RUN: not lld-link /dll /noentry /nodefaultlib %t.same_contents.obj %t.same_size.obj 2>&1 | FileCheck --check-prefix=CONTENTSSIZE %s -# CONTENTSSIZE: lld-link: error: conflicting comdat type for symbol: 4 in +# RUN: not lld-link /verbose /dll /noentry /nodefaultlib %t.discard.obj %t.one_only.obj 2>&1 | FileCheck --check-prefix=DISCARDONE %s +# DISCARDONE: lld-link: conflicting comdat type for symbol: 2 in +# DISCARDONE: lld-link: error: duplicate symbol: symbol +# RUN: lld-link /verbose /force /dll /noentry /nodefaultlib %t.discard.obj %t.one_only.obj 2>&1 | FileCheck --check-prefix=DISCARDONEFORCE %s +# DISCARDONEFORCE: lld-link: conflicting comdat type for symbol: 2 in +# DISCARDONEFORCE: lld-link: warning: duplicate symbol: symbol + +# Make sure the error isn't depending on the order of .obj files. +# RUN: not lld-link /verbose /dll /noentry /nodefaultlib %t.one_only.obj %t.discard.obj 2>&1 | FileCheck --check-prefix=ONEDISCARD %s +# ONEDISCARD: lld-link: conflicting comdat type for symbol: 1 in +# ONEDISCARD: lld-link: error: duplicate symbol: symbol + +# RUN: not lld-link /verbose /dll /noentry /nodefaultlib %t.same_contents.obj %t.same_size.obj 2>&1 | FileCheck --check-prefix=CONTENTSSIZE %s +# CONTENTSSIZE: lld-link: conflicting comdat type for symbol: 4 in +# CONTENTSSIZE: lld-link: error: duplicate symbol: symbol # Check that linking one 'discard' and one 'largest' has the effect of # 'largest'. @@ -94,5 +102,6 @@ symbol: # These cases are accepted by link.exe but not by lld-link. -# RUN: not lld-link /dll /noentry /nodefaultlib %t.largest.obj %t.one_only.obj 2>&1 | FileCheck --check-prefix=LARGESTONE %s -# LARGESTONE: lld-link: error: conflicting comdat type for symbol: 6 in +# RUN: not lld-link /verbose /dll /noentry /nodefaultlib %t.largest.obj %t.one_only.obj 2>&1 | FileCheck --check-prefix=LARGESTONE %s +# LARGESTONE: lld-link: conflicting comdat type for symbol: 6 in +# LARGESTONE: lld-link: error: duplicate symbol: symbol diff --git a/lld/test/COFF/crt-dyn-initializer-order.test b/lld/test/COFF/crt-dyn-initializer-order.test index 963b0657793b5..40f2e0ca1e526 100644 --- a/lld/test/COFF/crt-dyn-initializer-order.test +++ b/lld/test/COFF/crt-dyn-initializer-order.test @@ -1,100 +1,100 @@ -# // a.cpp -# #include -# #include -# -# template struct TemplatedObject { -# static std::vector *> Instances; -# TemplatedObject() { Instances.push_back(this); } -# }; -# -# using Object = TemplatedObject<0>; -# template <> std::vector Object::Instances{}; -# Object idle{}; -# -# int main() { -# if (Object::Instances.size() == 0) -# std::cout << "It's broken" << std::endl; -# else -# std::cout << "It works!" << std::endl; -# return 0; -# } -# // using `clang-cl /c a.cpp | lld-link a.obj` works -# // using `cl /c a.cpp | lld-link a.obj` fails without lld/COFF/Writer.cpp/Writer::sortSectionChunks() - -# RUN: yaml2obj %s > %t.obj -# RUN: yaml2obj %S/Inputs/crt-dyn-initializer-order_1.yaml > %t1.obj -# RUN: yaml2obj %S/Inputs/crt-dyn-initializer-order_2.yaml > %t2.obj - -# CHECK: Name: .CRT -# CHECK: Characteristics [ -# CHECK-NEXT: IMAGE_SCN_CNT_INITIALIZED_DATA -# CHECK-NEXT: IMAGE_SCN_MEM_READ -# CHECK-NEXT: ] -# CHECK-NEXT: SectionData ( - -# RUN: lld-link /out:%t.dll /entry:__ImageBase /dll %t.obj %t1.obj %t2.obj -# RUN: llvm-readobj -sections -section-data %t.dll | FileCheck %s --check-prefixes CHECK,CASE1 -# CASE1-NEXT: 01020304 55701011 1205 - -# RUN: lld-link /out:%t.dll /entry:__ImageBase /dll %t.obj %t2.obj %t1.obj -# RUN: llvm-readobj -sections -section-data %t.dll | FileCheck %s --check-prefixes CHECK,CASE2 -# CASE2-NEXT: 01020304 10111255 7005 - -# RUN: lld-link /out:%t.dll /entry:__ImageBase /dll %t1.obj %t2.obj %t.obj -# RUN: llvm-readobj -sections -section-data %t.dll | FileCheck %s --check-prefixes CHECK,CASE3 -# CASE3-NEXT: 01557010 11120203 0405 - -# RUN: lld-link /out:%t.dll /entry:__ImageBase /dll %t1.obj %t.obj %t2.obj -# RUN: llvm-readobj -sections -section-data %t.dll | FileCheck %s --check-prefixes CHECK,CASE4 -# CASE4-NEXT: 01557002 03041011 1205 - -# RUN: lld-link /out:%t.dll /entry:__ImageBase /dll %t2.obj %t1.obj %t.obj -# RUN: llvm-readobj -sections -section-data %t.dll | FileCheck %s --check-prefixes CHECK,CASE5 -# CASE5-NEXT: 01101112 55700203 0405 - -# RUN: lld-link /out:%t.dll /entry:__ImageBase /dll %t2.obj %t.obj %t1.obj -# RUN: llvm-readobj -sections -section-data %t.dll | FileCheck %s --check-prefixes CHECK,CASE6 -# CASE6-NEXT: 01101112 02030455 7005 - -# CHECK-NEXT: ) - ---- !COFF -header: - Machine: IMAGE_FILE_MACHINE_AMD64 - Characteristics: [ ] -sections: - - Name: '.CRT$XCA' - Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ] - Alignment: 1 - SectionData: 01 - - Name: '.CRT$XCU' - Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ] - Alignment: 1 - SectionData: 02 - - Name: '.CRT$XCU' - Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_LNK_COMDAT ] - Alignment: 1 - SectionData: 03 - - Name: '.CRT$XCU' - Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ] - Alignment: 1 - SectionData: 04 - - Name: '.CRT$XCZ' - Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ] - Alignment: 1 - SectionData: 05 -symbols: - - Name: '.CRT$XCU' - Value: 0 - SectionNumber: 3 - SimpleType: IMAGE_SYM_TYPE_NULL - ComplexType: IMAGE_SYM_DTYPE_NULL - StorageClass: IMAGE_SYM_CLASS_STATIC - SectionDefinition: - Length: 1 - NumberOfRelocations: 0 - NumberOfLinenumbers: 0 - CheckSum: 1 - Number: 2 - Selection: IMAGE_COMDAT_SELECT_ASSOCIATIVE -... +# // a.cpp +# #include +# #include +# +# template struct TemplatedObject { +# static std::vector *> Instances; +# TemplatedObject() { Instances.push_back(this); } +# }; +# +# using Object = TemplatedObject<0>; +# template <> std::vector Object::Instances{}; +# Object idle{}; +# +# int main() { +# if (Object::Instances.size() == 0) +# std::cout << "It's broken" << std::endl; +# else +# std::cout << "It works!" << std::endl; +# return 0; +# } +# // using `clang-cl /c a.cpp | lld-link a.obj` works +# // using `cl /c a.cpp | lld-link a.obj` fails without lld/COFF/Writer.cpp/Writer::sortSectionChunks() + +# RUN: yaml2obj %s > %t.obj +# RUN: yaml2obj %S/Inputs/crt-dyn-initializer-order_1.yaml > %t1.obj +# RUN: yaml2obj %S/Inputs/crt-dyn-initializer-order_2.yaml > %t2.obj + +# CHECK: Name: .CRT +# CHECK: Characteristics [ +# CHECK-NEXT: IMAGE_SCN_CNT_INITIALIZED_DATA +# CHECK-NEXT: IMAGE_SCN_MEM_READ +# CHECK-NEXT: ] +# CHECK-NEXT: SectionData ( + +# RUN: lld-link /out:%t.dll /entry:__ImageBase /dll %t.obj %t1.obj %t2.obj +# RUN: llvm-readobj -sections -section-data %t.dll | FileCheck %s --check-prefixes CHECK,CASE1 +# CASE1-NEXT: 01020304 55701011 1205 + +# RUN: lld-link /out:%t.dll /entry:__ImageBase /dll %t.obj %t2.obj %t1.obj +# RUN: llvm-readobj -sections -section-data %t.dll | FileCheck %s --check-prefixes CHECK,CASE2 +# CASE2-NEXT: 01020304 10111255 7005 + +# RUN: lld-link /out:%t.dll /entry:__ImageBase /dll %t1.obj %t2.obj %t.obj +# RUN: llvm-readobj -sections -section-data %t.dll | FileCheck %s --check-prefixes CHECK,CASE3 +# CASE3-NEXT: 01557010 11120203 0405 + +# RUN: lld-link /out:%t.dll /entry:__ImageBase /dll %t1.obj %t.obj %t2.obj +# RUN: llvm-readobj -sections -section-data %t.dll | FileCheck %s --check-prefixes CHECK,CASE4 +# CASE4-NEXT: 01557002 03041011 1205 + +# RUN: lld-link /out:%t.dll /entry:__ImageBase /dll %t2.obj %t1.obj %t.obj +# RUN: llvm-readobj -sections -section-data %t.dll | FileCheck %s --check-prefixes CHECK,CASE5 +# CASE5-NEXT: 01101112 55700203 0405 + +# RUN: lld-link /out:%t.dll /entry:__ImageBase /dll %t2.obj %t.obj %t1.obj +# RUN: llvm-readobj -sections -section-data %t.dll | FileCheck %s --check-prefixes CHECK,CASE6 +# CASE6-NEXT: 01101112 02030455 7005 + +# CHECK-NEXT: ) + +--- !COFF +header: + Machine: IMAGE_FILE_MACHINE_AMD64 + Characteristics: [ ] +sections: + - Name: '.CRT$XCA' + Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ] + Alignment: 1 + SectionData: 01 + - Name: '.CRT$XCU' + Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ] + Alignment: 1 + SectionData: 02 + - Name: '.CRT$XCU' + Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_LNK_COMDAT ] + Alignment: 1 + SectionData: 03 + - Name: '.CRT$XCU' + Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ] + Alignment: 1 + SectionData: 04 + - Name: '.CRT$XCZ' + Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ] + Alignment: 1 + SectionData: 05 +symbols: + - Name: '.CRT$XCU' + Value: 0 + SectionNumber: 3 + SimpleType: IMAGE_SYM_TYPE_NULL + ComplexType: IMAGE_SYM_DTYPE_NULL + StorageClass: IMAGE_SYM_CLASS_STATIC + SectionDefinition: + Length: 1 + NumberOfRelocations: 0 + NumberOfLinenumbers: 0 + CheckSum: 1 + Number: 2 + Selection: IMAGE_COMDAT_SELECT_ASSOCIATIVE +... diff --git a/lld/test/COFF/exclude-all.s b/lld/test/COFF/exclude-all.s new file mode 100644 index 0000000000000..9e19060157b13 --- /dev/null +++ b/lld/test/COFF/exclude-all.s @@ -0,0 +1,31 @@ +# REQUIRES: x86 + +# RUN: llvm-mc -triple=i686-windows-gnu %s -filetype=obj -o %t.obj + +# RUN: lld-link -lldmingw -exclude-all-symbols -dll -out:%t.dll -entry:DllMainCRTStartup@12 %t.obj +# RUN: llvm-readobj -coff-exports %t.dll | FileCheck %s -check-prefix=NO-EXPORTS + +# NO-EXPORTS-NOT: Name: + +.global _foobar +.global _DllMainCRTStartup@12 +.global _dataSym +.text +_DllMainCRTStartup@12: + ret +_foobar: + ret +.data +_dataSym: + .int 4 + +# Test specifying -exclude-all-symbols, on an object file that contains +# dllexport directive for some of the symbols. In this case, the dllexported +# symbols are still exported. + +# RUN: yaml2obj < %p/Inputs/export.yaml > %t.obj +# +# RUN: lld-link -out:%t.dll -dll %t.obj -lldmingw -exclude-all-symbols -output-def:%t.def +# RUN: llvm-readobj -coff-exports %t.dll | FileCheck -check-prefix=DLLEXPORT %s + +# DLLEXPORT: Name: exportfn3 diff --git a/lld/test/COFF/functionpadmin.test b/lld/test/COFF/functionpadmin.test new file mode 100644 index 0000000000000..8b4f226846f72 --- /dev/null +++ b/lld/test/COFF/functionpadmin.test @@ -0,0 +1,147 @@ +// ---- precomp-a.obj - x86_64, hotpatch +RUN: lld-link %S/Inputs/precomp-a.obj /out:%t.exe /nodefaultlib /force +RUN: llvm-objdump -s %t.exe | FileCheck %s --check-prefix BASE + +RUN: lld-link %S/Inputs/precomp-a.obj /out:%t.exe /nodefaultlib /force /functionpadmin +RUN: llvm-objdump -s %t.exe | FileCheck %s --check-prefix PADDED + +RUN: lld-link %S/Inputs/precomp-a.obj /out:%t.exe /nodefaultlib /force /functionpadmin:17 +RUN: llvm-objdump -s %t.exe | FileCheck %s --check-prefix PADDED-MORE + +// ---- Many arguments +RUN: lld-link %S/Inputs/precomp-a.obj /out:%t.exe /nodefaultlib /force /functionpadmin:17 /functionpadmin +RUN: llvm-objdump -s %t.exe | FileCheck %s --check-prefix PADDED + +RUN: lld-link %S/Inputs/precomp-a.obj /out:%t.exe /nodefaultlib /force /functionpadmin /functionpadmin:17 +RUN: llvm-objdump -s %t.exe | FileCheck %s --check-prefix PADDED-MORE + +RUN: not lld-link %S/Inputs/precomp-a.obj /out:%t.exe /nodefaultlib /force /functionpadmin:zz 2>&1 | FileCheck %s --check-prefix FAIL + +// ---- precomp-a.obj, precomp-b.obj - x86_64, hotpatch - Ensure several functions are properly padded +RUN: lld-link %S/Inputs/precomp-a.obj %S/Inputs/precomp-b.obj %S/Inputs/precomp.obj /out:%t.exe /nodefaultlib /force +RUN: llvm-objdump -s %t.exe | FileCheck %s --check-prefix MULTI-BASE + +RUN: lld-link %S/Inputs/precomp-a.obj %S/Inputs/precomp-b.obj %S/Inputs/precomp.obj /out:%t.exe /nodefaultlib /force /functionpadmin +RUN: llvm-objdump -s %t.exe | FileCheck %s --check-prefix MULTI-BASE-PADDED + +RUN: lld-link %S/Inputs/precomp-a.obj %S/Inputs/precomp-b.obj %S/Inputs/precomp.obj /out:%t.exe /nodefaultlib /force /functionpadmin:17 +RUN: llvm-objdump -s %t.exe | FileCheck %s --check-prefix MULTI-BASE-PADDED-MORE + +// ---- pdb-diff.obj - x86, no hotpatch - No padding is applied +RUN: lld-link %S/Inputs/pdb-diff.obj /out:%t.exe /nodefaultlib /force /functionpadmin +RUN: llvm-objdump -s %t.exe | FileCheck %s --check-prefix NO-HOTPATCH + +// ---- hello64.obj - MASM, x86_64, no hotpatch - No padding is applied +RUN: lld-link %S/Inputs/hello64.obj /out:%t.exe /nodefaultlib /force /functionpadmin +RUN: llvm-objdump -s %t.exe | FileCheck %s --check-prefix HELLO + +// ---- std64.lib - Import library, x86_64 - Ensure thunks are padded +RUN: lld-link %S/Inputs/std64.lib /entry:ExitProcess /out:%t.exe /nodefaultlib /force /subsystem:console +RUN: llvm-objdump -s %t.exe | FileCheck %s --check-prefix THUNKS-NO-PAD +RUN: llvm-readobj --file-headers %t.exe | FileCheck %s --check-prefix THUNKS-NO-PAD-ENTRY + +RUN: lld-link %S/Inputs/std64.lib /entry:ExitProcess /out:%t.exe /nodefaultlib /force /functionpadmin /subsystem:console +RUN: llvm-objdump -s %t.exe | FileCheck %s --check-prefix THUNKS-PAD +RUN: llvm-readobj --file-headers %t.exe | FileCheck %s --check-prefix THUNKS-PAD-ENTRY + +BASE: Contents of section .text: +BASE-NEXT: 140001000 4883ec28 b161e8f5 efffbf33 c04883c4 H..(.a.....3.H.. +BASE-NEXT: 140001010 28c3 (. +BASE-NEXT: Contents of section .rdata: +BASE-NEXT: 140002000 01040100 04420000 .....B.. +BASE-NEXT: Contents of section .pdata: +BASE-NEXT: 140003000 00100000 12100000 00200000 ......... .. + +PADDED: Contents of section .text: +PADDED-NEXT: 140001000 cccccccc cccccccc cccccccc cccccccc ................ +PADDED-NEXT: 140001010 4883ec28 b161e8e5 efffbf33 c04883c4 H..(.a.....3.H.. +PADDED-NEXT: 140001020 28c3 (. +PADDED-NEXT: Contents of section .rdata: +PADDED-NEXT: 140002000 01040100 04420000 .....B.. +PADDED-NEXT: Contents of section .pdata: +PADDED-NEXT: 140003000 10100000 22100000 00200000 ....".... .. + +PADDED-MORE: Contents of section .text: +PADDED-MORE-NEXT: 140001000 cccccccc cccccccc cccccccc cccccccc ................ +PADDED-MORE-NEXT: 140001010 cccccccc cccccccc cccccccc cccccccc ................ +PADDED-MORE-NEXT: 140001020 4883ec28 b161e8d5 efffbf33 c04883c4 H..(.a.....3.H.. +PADDED-MORE-NEXT: 140001030 28c3 (. +PADDED-MORE-NEXT: Contents of section .rdata: +PADDED-MORE-NEXT: 140002000 01040100 04420000 .....B.. +PADDED-MORE-NEXT: Contents of section .pdata: +PADDED-MORE-NEXT: 140003000 20100000 32100000 00200000 ...2.... .. + +FAIL: lld-link: error: /functionpadmin: invalid argument: zz + +MULTI-BASE: Contents of section .text: +MULTI-BASE-NEXT: 140001000 4883ec28 b161e815 00000033 c04883c4 H..(.a.....3.H.. +MULTI-BASE-NEXT: 140001010 28c3cccc cccccccc cccccccc cccccccc (............... +MULTI-BASE-NEXT: 140001020 884c2408 0fbe4424 08c3 .L$...D$.. +MULTI-BASE-NEXT: Contents of section .rdata: +MULTI-BASE-NEXT: 140002000 01040100 04420000 .....B.. +MULTI-BASE-NEXT: Contents of section .pdata: +MULTI-BASE-NEXT: 140004000 00100000 12100000 00200000 ......... .. + +MULTI-BASE-PADDED: Contents of section .text: +MULTI-BASE-PADDED-NEXT: 140001000 cccccccc cccccccc cccccccc cccccccc ................ +MULTI-BASE-PADDED-NEXT: 140001010 4883ec28 b161e815 00000033 c04883c4 H..(.a.....3.H.. +MULTI-BASE-PADDED-NEXT: 140001020 28c3cccc cccccccc cccccccc cccccccc (............... +MULTI-BASE-PADDED-NEXT: 140001030 884c2408 0fbe4424 08c3 .L$...D$.. +MULTI-BASE-PADDED-NEXT: Contents of section .rdata: +MULTI-BASE-PADDED-NEXT: 140002000 01040100 04420000 .....B.. +MULTI-BASE-PADDED-NEXT: Contents of section .pdata: +MULTI-BASE-PADDED-NEXT: 140004000 10100000 22100000 00200000 ....".... .. + +MULTI-BASE-PADDED-MORE: Contents of section .text: +MULTI-BASE-PADDED-MORE-NEXT: 140001000 cccccccc cccccccc cccccccc cccccccc ................ +MULTI-BASE-PADDED-MORE-NEXT: 140001010 cccccccc cccccccc cccccccc cccccccc ................ +MULTI-BASE-PADDED-MORE-NEXT: 140001020 4883ec28 b161e825 00000033 c04883c4 H..(.a.%...3.H.. +MULTI-BASE-PADDED-MORE-NEXT: 140001030 28c3cccc cccccccc cccccccc cccccccc (............... +MULTI-BASE-PADDED-MORE-NEXT: 140001040 cccccccc cccccccc cccccccc cccccccc ................ +MULTI-BASE-PADDED-MORE-NEXT: 140001050 884c2408 0fbe4424 08c3 .L$...D$.. +MULTI-BASE-PADDED-MORE-NEXT: Contents of section .rdata: +MULTI-BASE-PADDED-MORE-NEXT: 140002000 01040100 04420000 .....B.. +MULTI-BASE-PADDED-MORE-NEXT: Contents of section .pdata: +MULTI-BASE-PADDED-MORE-NEXT: 140004000 20100000 32100000 00200000 ...2.... .. + + +NO-HOTPATCH: Contents of section .text: +NO-HOTPATCH-NEXT: 401000 558becb8 2a000000 5dc3 U...*...]. + +HELLO: Contents of section .text: +HELLO-NEXT: 140001000 4883ec28 48c7c100 00000048 8d15f40f H..(H......H.... +HELLO-NEXT: 140001010 00004c8d 05e70f00 0041b900 000000e8 ..L......A...... +HELLO-NEXT: 140001020 dcefffbf b9000000 00e8d2ef ffbfe8cd ................ +HELLO-NEXT: 140001030 efffbf ... +HELLO-NEXT: Contents of section .data: +HELLO-NEXT: 140002000 48656c6c 6f004865 6c6c6f20 576f726c Hello.Hello Worl +HELLO-NEXT: 140002010 642100 d!. + +THUNKS-NO-PAD: Contents of section .text: +THUNKS-NO-PAD-NEXT: 140001000 ff253210 0000 .%2... +THUNKS-NO-PAD-NEXT: Contents of section .rdata: +THUNKS-NO-PAD-NEXT: 140002000 28200000 00000000 00000000 56200000 ( ..........V .. +THUNKS-NO-PAD-NEXT: 140002010 38200000 00000000 00000000 00000000 8 .............. +THUNKS-NO-PAD-NEXT: 140002020 00000000 00000000 48200000 00000000 ........H ...... +THUNKS-NO-PAD-NEXT: 140002030 00000000 00000000 48200000 00000000 ........H ...... +THUNKS-NO-PAD-NEXT: 140002040 00000000 00000000 00004578 69745072 ..........ExitPr +THUNKS-NO-PAD-NEXT: 140002050 6f636573 73007374 6436342e 646c6c00 ocess.std64.dll. + +THUNKS-NO-PAD-ENTRY-LABEL: ImageOptionalHeader { +THUNKS-NO-PAD-ENTRY: AddressOfEntryPoint: 0x1000 +THUNKS-NO-PAD-ENTRY-NEXT: BaseOfCode: 0x1000 + +THUNKS-PAD: Contents of section .text: +THUNKS-PAD-NEXT: 140001000 cccccccc cccccccc cccccccc cccccccc ................ +THUNKS-PAD-NEXT: 140001010 ff252210 0000 .%"... +THUNKS-PAD-NEXT: Contents of section .rdata: +THUNKS-PAD-NEXT: 140002000 28200000 00000000 00000000 56200000 ( ..........V .. +THUNKS-PAD-NEXT: 140002010 38200000 00000000 00000000 00000000 8 .............. +THUNKS-PAD-NEXT: 140002020 00000000 00000000 48200000 00000000 ........H ...... +THUNKS-PAD-NEXT: 140002030 00000000 00000000 48200000 00000000 ........H ...... +THUNKS-PAD-NEXT: 140002040 00000000 00000000 00004578 69745072 ..........ExitPr +THUNKS-PAD-NEXT: 140002050 6f636573 73007374 6436342e 646c6c00 ocess.std64.dll. + +THUNKS-PAD-ENTRY-LABEL: ImageOptionalHeader { +THUNKS-PAD-ENTRY: AddressOfEntryPoint: 0x1010 +THUNKS-PAD-ENTRY-NEXT: BaseOfCode: 0x1000 diff --git a/lld/test/COFF/guardcf-thunk.s b/lld/test/COFF/guardcf-thunk.s new file mode 100644 index 0000000000000..0969c580ac9f6 --- /dev/null +++ b/lld/test/COFF/guardcf-thunk.s @@ -0,0 +1,43 @@ +# REQUIRES: x86 + +# Make a DLL that exports exportfn1. +# RUN: yaml2obj < %p/Inputs/export.yaml > %t.obj +# RUN: lld-link /out:%t.dll /dll %t.obj /export:exportfn1 /implib:%t.lib + +# Make an obj that takes the address of that exported function. +# RUN: llvm-mc -filetype=obj -triple=x86_64-windows-msvc %s -o %t2.obj +# RUN: lld-link -entry:main -guard:cf %t2.obj %t.lib -nodefaultlib -out:%t.exe +# RUN: llvm-readobj -coff-load-config %t.exe | FileCheck %s + +# Check that the gfids table contains *exactly* two entries, one for exportfn1 +# and one for main. +# CHECK: GuardFidTable [ +# CHECK-NEXT: 0x{{[0-9A-Fa-f]+0$}} +# CHECK-NEXT: 0x{{[0-9A-Fa-f]+0$}} +# CHECK-NEXT: ] + + + .def @feat.00; + .scl 3; + .type 0; + .endef + .globl @feat.00 +@feat.00 = 0x001 + + .section .text,"rx" + .def main; .scl 2; .type 32; .endef + .global main +main: + leaq exportfn1(%rip), %rax + retq + + .section .rdata,"dr" +.globl _load_config_used +_load_config_used: + .long 256 + .fill 124, 1, 0 + .quad __guard_fids_table + .quad __guard_fids_count + .long __guard_flags + .fill 128, 1, 0 + diff --git a/lld/test/COFF/pdb-globals.test b/lld/test/COFF/pdb-globals.test index ee9c0ef2efee9..00909fa317bbe 100644 --- a/lld/test/COFF/pdb-globals.test +++ b/lld/test/COFF/pdb-globals.test @@ -2,6 +2,11 @@ RUN: yaml2obj %S/Inputs/pdb-globals.yaml > %t.obj RUN: lld-link /debug /nodefaultlib /entry:main /out:%t.exe /pdb:%t.pdb %t.obj RUN: llvm-pdbutil dump -symbols -globals %t.pdb | FileCheck %s +RUN: lld-link /debug /nodefaultlib /entry:main /out:%t.exe /pdb:%t.pdb %t.obj /threads +RUN: llvm-pdbutil dump -symbols -globals %t.pdb | FileCheck %s +RUN: lld-link /debug /nodefaultlib /entry:main /out:%t.exe /pdb:%t.pdb %t.obj /threads:no +RUN: llvm-pdbutil dump -symbols -globals %t.pdb | FileCheck %s + # Test that we correctly distribute symbols between the globals and module # symbol streams. Specifically: # * S_UDT, S_GDATA32, and S_CONSTANT end up in the globals stream, and are diff --git a/lld/test/COFF/pdb-relative-source-lines.test b/lld/test/COFF/pdb-relative-source-lines.test index 865d7a6d8a0a4..547056785962a 100644 --- a/lld/test/COFF/pdb-relative-source-lines.test +++ b/lld/test/COFF/pdb-relative-source-lines.test @@ -37,26 +37,26 @@ RUN: llvm-pdbutil pdb2yaml -modules -module-files -module-syms -subsections=line RUN: ./lld-link -debug "-pdbsourcepath:/usr/src" -entry:main -nodefaultlib -out:out.exe -pdb:out.pdb pdb_lines_1_relative.obj pdb_lines_2_relative.obj RUN: llvm-pdbutil pdb2yaml -modules -module-files -module-syms -subsections=lines,fc %t/out.pdb | FileCheck --check-prefix=POSIX %s -CHECK-LABEL: - Module: 'c:\src{{[\\/]}}pdb_lines_1_relative.obj' -CHECK-NEXT: ObjFile: 'c:\src{{[\\/]}}pdb_lines_1_relative.obj' +CHECK-LABEL: - Module: 'c:\src\pdb_lines_1_relative.obj' +CHECK-NEXT: ObjFile: 'c:\src\pdb_lines_1_relative.obj' CHECK: SourceFiles: -CHECK-NEXT: - 'c:\src{{[\\/]}}pdb_lines_1.c' -CHECK-NEXT: - 'c:\src{{[\\/]}}foo.h' +CHECK-NEXT: - 'c:\src\pdb_lines_1.c' +CHECK-NEXT: - 'c:\src\foo.h' CHECK: Subsections: -CHECK: - FileName: 'c:\src{{[\\/]}}pdb_lines_1.c' -CHECK: - FileName: 'c:\src{{[\\/]}}foo.h' +CHECK: - FileName: 'c:\src\pdb_lines_1.c' +CHECK: - FileName: 'c:\src\foo.h' CHECK: - !FileChecksums -CHECK: - FileName: 'c:\src{{[\\/]}}pdb_lines_1.c' -CHECK: - FileName: 'c:\src{{[\\/]}}foo.h' +CHECK: - FileName: 'c:\src\pdb_lines_1.c' +CHECK: - FileName: 'c:\src\foo.h' -CHECK-LABEL: - Module: 'c:\src{{[\\/]}}pdb_lines_2_relative.obj' -CHECK-NEXT: ObjFile: 'c:\src{{[\\/]}}pdb_lines_2_relative.obj' +CHECK-LABEL: - Module: 'c:\src\pdb_lines_2_relative.obj' +CHECK-NEXT: ObjFile: 'c:\src\pdb_lines_2_relative.obj' CHECK: SourceFiles: -CHECK-NEXT: - 'c:\src{{[\\/]}}pdb_lines_2.c' +CHECK-NEXT: - 'c:\src\pdb_lines_2.c' CHECK: Subsections: -CHECK: - FileName: 'c:\src{{[\\/]}}pdb_lines_2.c' +CHECK: - FileName: 'c:\src\pdb_lines_2.c' CHECK: - !FileChecksums -CHECK: - FileName: 'c:\src{{[\\/]}}pdb_lines_2.c' +CHECK: - FileName: 'c:\src\pdb_lines_2.c' CHECK-LABEL: - Kind: S_ENVBLOCK CHECK-NEXT: EnvBlockSym: @@ -64,33 +64,33 @@ CHECK-NEXT: Entries: CHECK-NEXT: - cwd CHECK-NEXT: - 'c:\src' CHECK-NEXT: - exe -CHECK-NEXT: - 'c:\src{{[\\/]}}lld-link' +CHECK-NEXT: - 'c:\src\lld-link' CHECK-NEXT: - pdb -CHECK-NEXT: - 'c:\src{{[\\/]}}out.pdb' +CHECK-NEXT: - 'c:\src\out.pdb' CHECK-NEXT: - cmd CHECK-NEXT: - '-debug -pdbsourcepath:c:\src -entry:main -nodefaultlib -out:out.exe -pdb:out.pdb pdb_lines_1_relative.obj pdb_lines_2_relative.obj' -POSIX-LABEL: - Module: '/usr/src{{[\\/]}}pdb_lines_1_relative.obj' -POSIX-NEXT: ObjFile: '/usr/src{{[\\/]}}pdb_lines_1_relative.obj' +POSIX-LABEL: - Module: '/usr/src/pdb_lines_1_relative.obj' +POSIX-NEXT: ObjFile: '/usr/src/pdb_lines_1_relative.obj' POSIX: SourceFiles: -POSIX-NEXT: - '/usr/src{{[\\/]}}pdb_lines_1.c' -POSIX-NEXT: - '/usr/src{{[\\/]}}foo.h' +POSIX-NEXT: - '/usr/src/pdb_lines_1.c' +POSIX-NEXT: - '/usr/src/foo.h' POSIX: Subsections: -POSIX: - FileName: '/usr/src{{[\\/]}}pdb_lines_1.c' -POSIX: - FileName: '/usr/src{{[\\/]}}foo.h' +POSIX: - FileName: '/usr/src/pdb_lines_1.c' +POSIX: - FileName: '/usr/src/foo.h' POSIX: - !FileChecksums -POSIX: - FileName: '/usr/src{{[\\/]}}pdb_lines_1.c' -POSIX: - FileName: '/usr/src{{[\\/]}}foo.h' +POSIX: - FileName: '/usr/src/pdb_lines_1.c' +POSIX: - FileName: '/usr/src/foo.h' -POSIX-LABEL: - Module: '/usr/src{{[\\/]}}pdb_lines_2_relative.obj' -POSIX-NEXT: ObjFile: '/usr/src{{[\\/]}}pdb_lines_2_relative.obj' +POSIX-LABEL: - Module: '/usr/src/pdb_lines_2_relative.obj' +POSIX-NEXT: ObjFile: '/usr/src/pdb_lines_2_relative.obj' POSIX: SourceFiles: -POSIX-NEXT: - '/usr/src{{[\\/]}}pdb_lines_2.c' +POSIX-NEXT: - '/usr/src/pdb_lines_2.c' POSIX: Subsections: -POSIX: - FileName: '/usr/src{{[\\/]}}pdb_lines_2.c' +POSIX: - FileName: '/usr/src/pdb_lines_2.c' POSIX: - !FileChecksums -POSIX: - FileName: '/usr/src{{[\\/]}}pdb_lines_2.c' +POSIX: - FileName: '/usr/src/pdb_lines_2.c' POSIX-LABEL: - Kind: S_ENVBLOCK POSIX-NEXT: EnvBlockSym: @@ -98,8 +98,8 @@ POSIX-NEXT: Entries: POSIX-NEXT: - cwd POSIX-NEXT: - '/usr/src' POSIX-NEXT: - exe -POSIX-NEXT: - '/usr/src{{[\\/]}}lld-link' +POSIX-NEXT: - '/usr/src/lld-link' POSIX-NEXT: - pdb -POSIX-NEXT: - '/usr/src{{[\\/]}}out.pdb' +POSIX-NEXT: - '/usr/src/out.pdb' POSIX-NEXT: - cmd POSIX-NEXT: - '-debug -pdbsourcepath:/usr/src -entry:main -nodefaultlib -out:out.exe -pdb:out.pdb pdb_lines_1_relative.obj pdb_lines_2_relative.obj' diff --git a/lld/test/COFF/precomp-link.test b/lld/test/COFF/precomp-link.test index b60b0b2f1d773..7ba747e26d4a8 100644 --- a/lld/test/COFF/precomp-link.test +++ b/lld/test/COFF/precomp-link.test @@ -1,42 +1,42 @@ -RUN: lld-link %S/Inputs/precomp-a.obj %S/Inputs/precomp-b.obj %S/Inputs/precomp.obj /nodefaultlib /entry:main /debug /pdb:%t.pdb /out:%t.exe /opt:ref /opt:icf -RUN: llvm-pdbutil dump -types %t.pdb | FileCheck %s - -RUN: lld-link %S/Inputs/precomp.obj %S/Inputs/precomp-a.obj %S/Inputs/precomp-b.obj /nodefaultlib /entry:main /debug /pdb:%t.pdb /out:%t.exe /opt:ref /opt:icf -RUN: llvm-pdbutil dump -types %t.pdb | FileCheck %s - -RUN: lld-link %S/Inputs/precomp-a.obj %S/Inputs/precomp-invalid.obj %S/Inputs/precomp.obj /nodefaultlib /entry:main /debug /pdb:%t.pdb /out:%t.exe /opt:ref /opt:icf 2>&1 | FileCheck %s -check-prefix FAILURE - -RUN: not lld-link %S/Inputs/precomp-a.obj %S/Inputs/precomp-b.obj /nodefaultlib /entry:main /debug /pdb:%t.pdb /out:%t.exe /opt:ref /opt:icf 2>&1 | FileCheck %s -check-prefix FAILURE-MISSING-PRECOMPOBJ - -FAILURE: warning: Cannot use debug info for 'precomp-invalid.obj' [LNK4099] -FAILURE-NEXT: failed to load reference '{{.*}}precomp.obj': The signature does not match; the file(s) might be out of date. - -FAILURE-MISSING-PRECOMPOBJ: warning: Cannot use debug info for 'precomp-a.obj' [LNK4099] -FAILURE-MISSING-PRECOMPOBJ-NEXT: failed to load reference '{{.*}}precomp.obj': The path to this file must be provided on the command-line - -CHECK: Types (TPI Stream) -CHECK-NOT: LF_PRECOMP -CHECK-NOT: LF_ENDPRECOMP - -// precomp.h -#pragma once -int Function(char A); - -// precomp.cpp -#include "precomp.h" - -// a.cpp -#include "precomp.h" -int main(void) { - Function('a'); - return 0; -} - -// b.cpp -#include "precomp.h" -int Function(char a) { - return (int)a; -} - -// cl.exe precomp.cpp /Z7 /Ycprecomp.h /c -// cl.exe a.cpp b.cpp /Z7 /Yuprecomp.h /c +RUN: lld-link %S/Inputs/precomp-a.obj %S/Inputs/precomp-b.obj %S/Inputs/precomp.obj /nodefaultlib /entry:main /debug /pdb:%t.pdb /out:%t.exe /opt:ref /opt:icf +RUN: llvm-pdbutil dump -types %t.pdb | FileCheck %s + +RUN: lld-link %S/Inputs/precomp.obj %S/Inputs/precomp-a.obj %S/Inputs/precomp-b.obj /nodefaultlib /entry:main /debug /pdb:%t.pdb /out:%t.exe /opt:ref /opt:icf +RUN: llvm-pdbutil dump -types %t.pdb | FileCheck %s + +RUN: lld-link %S/Inputs/precomp-a.obj %S/Inputs/precomp-invalid.obj %S/Inputs/precomp.obj /nodefaultlib /entry:main /debug /pdb:%t.pdb /out:%t.exe /opt:ref /opt:icf 2>&1 | FileCheck %s -check-prefix FAILURE + +RUN: not lld-link %S/Inputs/precomp-a.obj %S/Inputs/precomp-b.obj /nodefaultlib /entry:main /debug /pdb:%t.pdb /out:%t.exe /opt:ref /opt:icf 2>&1 | FileCheck %s -check-prefix FAILURE-MISSING-PRECOMPOBJ + +FAILURE: warning: Cannot use debug info for 'precomp-invalid.obj' [LNK4099] +FAILURE-NEXT: failed to load reference '{{.*}}precomp.obj': The signature does not match; the file(s) might be out of date. + +FAILURE-MISSING-PRECOMPOBJ: warning: Cannot use debug info for 'precomp-a.obj' [LNK4099] +FAILURE-MISSING-PRECOMPOBJ-NEXT: failed to load reference '{{.*}}precomp.obj': The path to this file must be provided on the command-line + +CHECK: Types (TPI Stream) +CHECK-NOT: LF_PRECOMP +CHECK-NOT: LF_ENDPRECOMP + +// precomp.h +#pragma once +int Function(char A); + +// precomp.cpp +#include "precomp.h" + +// a.cpp +#include "precomp.h" +int main(void) { + Function('a'); + return 0; +} + +// b.cpp +#include "precomp.h" +int Function(char a) { + return (int)a; +} + +// cl.exe precomp.cpp /Z7 /Ycprecomp.h /c +// cl.exe a.cpp b.cpp /Z7 /Yuprecomp.h /c diff --git a/lld/test/COFF/s_udt.s b/lld/test/COFF/s_udt.s index 8ad342e4e3d21..900948aa8b53b 100644 --- a/lld/test/COFF/s_udt.s +++ b/lld/test/COFF/s_udt.s @@ -27,450 +27,450 @@ # CHECK-NEXT: ============================================================ # CHECK: {{.*}} | S_GPROC32 [size = 44] `main` # CHECK-NEXT: parent = 0, end = 252, addr = 0001:0000, code size = 52 -# CHECK-NEXT: type = `0x1002 (int (int, char**))`, debug start = 0, debug end = 0, flags = none +# CHECK-NEXT: type = `0x1002 (int (int, char**))`, debug start = 0, debug end = 0, flags = none # CHECK-NOT: {{.*}} | S_END # CHECK: {{.*}} | S_UDT [size = 28] `main::LocalTypedef` # CHECK-NEXT: original type = 0x1004 -# CHECK: {{.*}} | S_END [size = 4] - -# source code to re-generate: -# clang-cl /Z7 /GS- /GR- /c foo.cpp -# -# struct Struct { -# int x; -# }; -# -# using IntTypedef = int; -# using StructTypedef = Struct; -# Struct S; -# StructTypedef SS; -# IntTypedef I; -# -# int main(int argc, char **argv) { -# using LocalTypedef = Struct*; -# LocalTypedef SPtr; -# return I + S.x + SS.x + SPtr->x; +# CHECK: {{.*}} | S_END [size = 4] + +# source code to re-generate: +# clang-cl /Z7 /GS- /GR- /c foo.cpp +# +# struct Struct { +# int x; +# }; +# +# using IntTypedef = int; +# using StructTypedef = Struct; +# Struct S; +# StructTypedef SS; +# IntTypedef I; +# +# int main(int argc, char **argv) { +# using LocalTypedef = Struct*; +# LocalTypedef SPtr; +# return I + S.x + SS.x + SPtr->x; # } - .text - .def @feat.00; - .scl 3; - .type 0; - .endef - .globl @feat.00 -.set @feat.00, 0 - .intel_syntax noprefix - .def main; - .scl 2; - .type 32; - .endef - .globl main # -- Begin function main - .p2align 4, 0x90 -main: # @main -.Lfunc_begin0: - .cv_func_id 0 - .cv_file 1 "D:\\src\\llvmbuild\\cl\\Debug\\x64\\foo.cpp" "2B62298EE3EEF94E1D81FDFE18BD46A6" 1 - .cv_loc 0 1 12 0 # foo.cpp:12:0 -.seh_proc main -# %bb.0: # %entry - sub rsp, 32 - .seh_stackalloc 32 - .seh_endprologue - mov dword ptr [rsp + 28], 0 - mov qword ptr [rsp + 16], rdx - mov dword ptr [rsp + 12], ecx -.Ltmp0: - .cv_loc 0 1 15 0 # foo.cpp:15:0 - mov ecx, dword ptr [rip + "?I@@3HA"] - add ecx, dword ptr [rip + "?S@@3UStruct@@A"] - add ecx, dword ptr [rip + "?SS@@3UStruct@@A"] - mov rdx, qword ptr [rsp] - add ecx, dword ptr [rdx] - mov eax, ecx - add rsp, 32 - ret -.Ltmp1: -.Lfunc_end0: - .seh_handlerdata - .text - .seh_endproc - # -- End function - .bss - .globl "?S@@3UStruct@@A" # @"?S@@3UStruct@@A" - .p2align 2 -"?S@@3UStruct@@A": - .zero 4 - - .globl "?SS@@3UStruct@@A" # @"?SS@@3UStruct@@A" - .p2align 2 -"?SS@@3UStruct@@A": - .zero 4 - - .globl "?I@@3HA" # @"?I@@3HA" - .p2align 2 -"?I@@3HA": - .long 0 # 0x0 - - .section .drectve,"yn" - .ascii " /DEFAULTLIB:libcmt.lib" - .ascii " /DEFAULTLIB:oldnames.lib" - .section .debug$S,"dr" - .p2align 2 - .long 4 # Debug section magic - .long 241 - .long .Ltmp3-.Ltmp2 # Subsection size -.Ltmp2: - .short .Ltmp5-.Ltmp4 # Record length -.Ltmp4: - .short 4412 # Record kind: S_COMPILE3 - .long 1 # Flags and language - .short 208 # CPUType - .short 8 # Frontend version - .short 0 - .short 0 - .short 0 - .short 8000 # Backend version - .short 0 - .short 0 - .short 0 - .asciz "clang version 8.0.0 " # Null-terminated compiler version string -.Ltmp5: -.Ltmp3: - .p2align 2 - .long 241 # Symbol subsection for main - .long .Ltmp7-.Ltmp6 # Subsection size -.Ltmp6: - .short .Ltmp9-.Ltmp8 # Record length -.Ltmp8: - .short 4423 # Record kind: S_GPROC32_ID - .long 0 # PtrParent - .long 0 # PtrEnd - .long 0 # PtrNext - .long .Lfunc_end0-main # Code size - .long 0 # Offset after prologue - .long 0 # Offset before epilogue - .long 4099 # Function type index - .secrel32 main # Function section relative address - .secidx main # Function section index - .byte 0 # Flags - .asciz "main" # Function name -.Ltmp9: - .short .Ltmp11-.Ltmp10 # Record length -.Ltmp10: - .short 4114 # Record kind: S_FRAMEPROC - .long 32 # FrameSize - .long 0 # Padding - .long 0 # Offset of padding - .long 0 # Bytes of callee saved registers - .long 0 # Exception handler offset - .short 0 # Exception handler section - .long 81920 # Flags (defines frame register) -.Ltmp11: - .short .Ltmp13-.Ltmp12 # Record length -.Ltmp12: - .short 4414 # Record kind: S_LOCAL - .long 116 # TypeIndex - .short 1 # Flags - .asciz "argc" -.Ltmp13: - .cv_def_range .Ltmp0 .Ltmp1, "B\021\f\000\000\000" - .short .Ltmp15-.Ltmp14 # Record length -.Ltmp14: - .short 4414 # Record kind: S_LOCAL - .long 4096 # TypeIndex - .short 1 # Flags - .asciz "argv" -.Ltmp15: - .cv_def_range .Ltmp0 .Ltmp1, "B\021\020\000\000\000" - .short .Ltmp17-.Ltmp16 # Record length -.Ltmp16: - .short 4414 # Record kind: S_LOCAL - .long 4101 # TypeIndex - .short 0 # Flags - .asciz "SPtr" -.Ltmp17: - .cv_def_range .Ltmp0 .Ltmp1, "B\021\000\000\000\000" - .short .Ltmp19-.Ltmp18 # Record length -.Ltmp18: - .short 4360 # Record kind: S_UDT - .long 4101 # Type - .asciz "main::LocalTypedef" -.Ltmp19: - .short 2 # Record length - .short 4431 # Record kind: S_PROC_ID_END -.Ltmp7: - .p2align 2 - .cv_linetable 0, main, .Lfunc_end0 - .long 241 # Symbol subsection for globals - .long .Ltmp21-.Ltmp20 # Subsection size -.Ltmp20: - .short .Ltmp23-.Ltmp22 # Record length -.Ltmp22: - .short 4365 # Record kind: S_GDATA32 - .long 4103 # Type - .secrel32 "?S@@3UStruct@@A" # DataOffset - .secidx "?S@@3UStruct@@A" # Segment - .asciz "S" # Name -.Ltmp23: - .short .Ltmp25-.Ltmp24 # Record length -.Ltmp24: - .short 4365 # Record kind: S_GDATA32 - .long 4100 # Type - .secrel32 "?SS@@3UStruct@@A" # DataOffset - .secidx "?SS@@3UStruct@@A" # Segment - .asciz "SS" # Name -.Ltmp25: - .short .Ltmp27-.Ltmp26 # Record length -.Ltmp26: - .short 4365 # Record kind: S_GDATA32 - .long 116 # Type - .secrel32 "?I@@3HA" # DataOffset - .secidx "?I@@3HA" # Segment - .asciz "I" # Name -.Ltmp27: -.Ltmp21: - .p2align 2 - .long 241 - .long .Ltmp29-.Ltmp28 # Subsection size -.Ltmp28: - .short .Ltmp31-.Ltmp30 # Record length -.Ltmp30: - .short 4360 # Record kind: S_UDT - .long 4103 # Type - .asciz "Struct" -.Ltmp31: - .short .Ltmp33-.Ltmp32 # Record length -.Ltmp32: - .short 4360 # Record kind: S_UDT - .long 4100 # Type - .asciz "StructTypedef" -.Ltmp33: - .short .Ltmp35-.Ltmp34 # Record length -.Ltmp34: - .short 4360 # Record kind: S_UDT - .long 116 # Type - .asciz "IntTypedef" -.Ltmp35: -.Ltmp29: - .p2align 2 - .cv_filechecksums # File index to string table offset subsection - .cv_stringtable # String table - .long 241 - .long .Ltmp37-.Ltmp36 # Subsection size -.Ltmp36: - .short 6 # Record length - .short 4428 # Record kind: S_BUILDINFO - .long 4108 # LF_BUILDINFO index -.Ltmp37: - .p2align 2 - .section .debug$T,"dr" - .p2align 2 - .long 4 # Debug section magic - # Pointer (0x1000) { - # TypeLeafKind: LF_POINTER (0x1002) - # PointeeType: char* (0x670) - # PtrType: Near64 (0xC) - # PtrMode: Pointer (0x0) - # IsFlat: 0 - # IsConst: 0 - # IsVolatile: 0 - # IsUnaligned: 0 - # IsRestrict: 0 - # IsThisPtr&: 0 - # IsThisPtr&&: 0 - # SizeOf: 8 - # } - .byte 0x0a, 0x00, 0x02, 0x10 - .byte 0x70, 0x06, 0x00, 0x00 - .byte 0x0c, 0x00, 0x01, 0x00 - # ArgList (0x1001) { - # TypeLeafKind: LF_ARGLIST (0x1201) - # NumArgs: 2 - # Arguments [ - # ArgType: int (0x74) - # ArgType: char** (0x1000) - # ] - # } - .byte 0x0e, 0x00, 0x01, 0x12 - .byte 0x02, 0x00, 0x00, 0x00 - .byte 0x74, 0x00, 0x00, 0x00 - .byte 0x00, 0x10, 0x00, 0x00 - # Procedure (0x1002) { - # TypeLeafKind: LF_PROCEDURE (0x1008) - # ReturnType: int (0x74) - # CallingConvention: NearC (0x0) - # FunctionOptions [ (0x0) - # ] - # NumParameters: 2 - # ArgListType: (int, char**) (0x1001) - # } - .byte 0x0e, 0x00, 0x08, 0x10 - .byte 0x74, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x02, 0x00 - .byte 0x01, 0x10, 0x00, 0x00 - # FuncId (0x1003) { - # TypeLeafKind: LF_FUNC_ID (0x1601) - # ParentScope: 0x0 - # FunctionType: int (int, char**) (0x1002) - # Name: main - # } - .byte 0x12, 0x00, 0x01, 0x16 - .byte 0x00, 0x00, 0x00, 0x00 - .byte 0x02, 0x10, 0x00, 0x00 - .byte 0x6d, 0x61, 0x69, 0x6e - .byte 0x00, 0xf3, 0xf2, 0xf1 - # Struct (0x1004) { - # TypeLeafKind: LF_STRUCTURE (0x1505) - # MemberCount: 0 - # Properties [ (0x280) - # ForwardReference (0x80) - # HasUniqueName (0x200) - # ] - # FieldList: 0x0 - # DerivedFrom: 0x0 - # VShape: 0x0 - # SizeOf: 0 - # Name: Struct - # LinkageName: .?AUStruct@@ - # } - .byte 0x2a, 0x00, 0x05, 0x15 - .byte 0x00, 0x00, 0x80, 0x02 - .byte 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x53, 0x74 - .byte 0x72, 0x75, 0x63, 0x74 - .byte 0x00, 0x2e, 0x3f, 0x41 - .byte 0x55, 0x53, 0x74, 0x72 - .byte 0x75, 0x63, 0x74, 0x40 - .byte 0x40, 0x00, 0xf2, 0xf1 - # Pointer (0x1005) { - # TypeLeafKind: LF_POINTER (0x1002) - # PointeeType: Struct (0x1004) - # PtrType: Near64 (0xC) - # PtrMode: Pointer (0x0) - # IsFlat: 0 - # IsConst: 0 - # IsVolatile: 0 - # IsUnaligned: 0 - # IsRestrict: 0 - # IsThisPtr&: 0 - # IsThisPtr&&: 0 - # SizeOf: 8 - # } - .byte 0x0a, 0x00, 0x02, 0x10 - .byte 0x04, 0x10, 0x00, 0x00 - .byte 0x0c, 0x00, 0x01, 0x00 - # FieldList (0x1006) { - # TypeLeafKind: LF_FIELDLIST (0x1203) - # DataMember { - # TypeLeafKind: LF_MEMBER (0x150D) - # AccessSpecifier: Public (0x3) - # Type: int (0x74) - # FieldOffset: 0x0 - # Name: x - # } - # } - .byte 0x0e, 0x00, 0x03, 0x12 - .byte 0x0d, 0x15, 0x03, 0x00 - .byte 0x74, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x78, 0x00 - # Struct (0x1007) { - # TypeLeafKind: LF_STRUCTURE (0x1505) - # MemberCount: 1 - # Properties [ (0x200) - # HasUniqueName (0x200) - # ] - # FieldList: (0x1006) - # DerivedFrom: 0x0 - # VShape: 0x0 - # SizeOf: 4 - # Name: Struct - # LinkageName: .?AUStruct@@ - # } - .byte 0x2a, 0x00, 0x05, 0x15 - .byte 0x01, 0x00, 0x00, 0x02 - .byte 0x06, 0x10, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00 - .byte 0x04, 0x00, 0x53, 0x74 - .byte 0x72, 0x75, 0x63, 0x74 - .byte 0x00, 0x2e, 0x3f, 0x41 - .byte 0x55, 0x53, 0x74, 0x72 - .byte 0x75, 0x63, 0x74, 0x40 - .byte 0x40, 0x00, 0xf2, 0xf1 - # StringId (0x1008) { - # TypeLeafKind: LF_STRING_ID (0x1605) - # Id: 0x0 - # StringData: D:\src\llvmbuild\cl\Debug\x64\foo.cpp - # } - .byte 0x2e, 0x00, 0x05, 0x16 - .byte 0x00, 0x00, 0x00, 0x00 - .byte 0x44, 0x3a, 0x5c, 0x73 - .byte 0x72, 0x63, 0x5c, 0x6c - .byte 0x6c, 0x76, 0x6d, 0x62 - .byte 0x75, 0x69, 0x6c, 0x64 - .byte 0x5c, 0x63, 0x6c, 0x5c - .byte 0x44, 0x65, 0x62, 0x75 - .byte 0x67, 0x5c, 0x78, 0x36 - .byte 0x34, 0x5c, 0x66, 0x6f - .byte 0x6f, 0x2e, 0x63, 0x70 - .byte 0x70, 0x00, 0xf2, 0xf1 - # UdtSourceLine (0x1009) { - # TypeLeafKind: LF_UDT_SRC_LINE (0x1606) - # UDT: Struct (0x1007) - # SourceFile: D:\src\llvmbuild\cl\Debug\x64\foo.cpp (0x1008) - # LineNumber: 1 - # } - .byte 0x0e, 0x00, 0x06, 0x16 - .byte 0x07, 0x10, 0x00, 0x00 - .byte 0x08, 0x10, 0x00, 0x00 - .byte 0x01, 0x00, 0x00, 0x00 - # StringId (0x100A) { - # TypeLeafKind: LF_STRING_ID (0x1605) - # Id: 0x0 - # StringData: D:\\src\\llvmbuild\\cl\\Debug\\x64 - # } - .byte 0x2a, 0x00, 0x05, 0x16 - .byte 0x00, 0x00, 0x00, 0x00 - .byte 0x44, 0x3a, 0x5c, 0x5c - .byte 0x73, 0x72, 0x63, 0x5c - .byte 0x5c, 0x6c, 0x6c, 0x76 - .byte 0x6d, 0x62, 0x75, 0x69 - .byte 0x6c, 0x64, 0x5c, 0x5c - .byte 0x63, 0x6c, 0x5c, 0x5c - .byte 0x44, 0x65, 0x62, 0x75 - .byte 0x67, 0x5c, 0x5c, 0x78 - .byte 0x36, 0x34, 0x00, 0xf1 - # StringId (0x100B) { - # TypeLeafKind: LF_STRING_ID (0x1605) - # Id: 0x0 - # StringData: foo.cpp - # } - .byte 0x0e, 0x00, 0x05, 0x16 - .byte 0x00, 0x00, 0x00, 0x00 - .byte 0x66, 0x6f, 0x6f, 0x2e - .byte 0x63, 0x70, 0x70, 0x00 - # BuildInfo (0x100C) { - # TypeLeafKind: LF_BUILDINFO (0x1603) - # NumArgs: 5 - # Arguments [ - # ArgType: D:\\src\\llvmbuild\\cl\\Debug\\x64 (0x100A) - # ArgType: 0x0 - # ArgType: foo.cpp (0x100B) - # ArgType: 0x0 - # ArgType: 0x0 - # ] - # } - .byte 0x1a, 0x00, 0x03, 0x16 - .byte 0x05, 0x00, 0x0a, 0x10 - .byte 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x0b, 0x10 - .byte 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0xf2, 0xf1 - - .addrsig - .addrsig_sym "?S@@3UStruct@@A" - .addrsig_sym "?SS@@3UStruct@@A" - .addrsig_sym "?I@@3HA" + .text + .def @feat.00; + .scl 3; + .type 0; + .endef + .globl @feat.00 +.set @feat.00, 0 + .intel_syntax noprefix + .def main; + .scl 2; + .type 32; + .endef + .globl main # -- Begin function main + .p2align 4, 0x90 +main: # @main +.Lfunc_begin0: + .cv_func_id 0 + .cv_file 1 "D:\\src\\llvmbuild\\cl\\Debug\\x64\\foo.cpp" "2B62298EE3EEF94E1D81FDFE18BD46A6" 1 + .cv_loc 0 1 12 0 # foo.cpp:12:0 +.seh_proc main +# %bb.0: # %entry + sub rsp, 32 + .seh_stackalloc 32 + .seh_endprologue + mov dword ptr [rsp + 28], 0 + mov qword ptr [rsp + 16], rdx + mov dword ptr [rsp + 12], ecx +.Ltmp0: + .cv_loc 0 1 15 0 # foo.cpp:15:0 + mov ecx, dword ptr [rip + "?I@@3HA"] + add ecx, dword ptr [rip + "?S@@3UStruct@@A"] + add ecx, dword ptr [rip + "?SS@@3UStruct@@A"] + mov rdx, qword ptr [rsp] + add ecx, dword ptr [rdx] + mov eax, ecx + add rsp, 32 + ret +.Ltmp1: +.Lfunc_end0: + .seh_handlerdata + .text + .seh_endproc + # -- End function + .bss + .globl "?S@@3UStruct@@A" # @"?S@@3UStruct@@A" + .p2align 2 +"?S@@3UStruct@@A": + .zero 4 + + .globl "?SS@@3UStruct@@A" # @"?SS@@3UStruct@@A" + .p2align 2 +"?SS@@3UStruct@@A": + .zero 4 + + .globl "?I@@3HA" # @"?I@@3HA" + .p2align 2 +"?I@@3HA": + .long 0 # 0x0 + + .section .drectve,"yn" + .ascii " /DEFAULTLIB:libcmt.lib" + .ascii " /DEFAULTLIB:oldnames.lib" + .section .debug$S,"dr" + .p2align 2 + .long 4 # Debug section magic + .long 241 + .long .Ltmp3-.Ltmp2 # Subsection size +.Ltmp2: + .short .Ltmp5-.Ltmp4 # Record length +.Ltmp4: + .short 4412 # Record kind: S_COMPILE3 + .long 1 # Flags and language + .short 208 # CPUType + .short 8 # Frontend version + .short 0 + .short 0 + .short 0 + .short 8000 # Backend version + .short 0 + .short 0 + .short 0 + .asciz "clang version 8.0.0 " # Null-terminated compiler version string +.Ltmp5: +.Ltmp3: + .p2align 2 + .long 241 # Symbol subsection for main + .long .Ltmp7-.Ltmp6 # Subsection size +.Ltmp6: + .short .Ltmp9-.Ltmp8 # Record length +.Ltmp8: + .short 4423 # Record kind: S_GPROC32_ID + .long 0 # PtrParent + .long 0 # PtrEnd + .long 0 # PtrNext + .long .Lfunc_end0-main # Code size + .long 0 # Offset after prologue + .long 0 # Offset before epilogue + .long 4099 # Function type index + .secrel32 main # Function section relative address + .secidx main # Function section index + .byte 0 # Flags + .asciz "main" # Function name +.Ltmp9: + .short .Ltmp11-.Ltmp10 # Record length +.Ltmp10: + .short 4114 # Record kind: S_FRAMEPROC + .long 32 # FrameSize + .long 0 # Padding + .long 0 # Offset of padding + .long 0 # Bytes of callee saved registers + .long 0 # Exception handler offset + .short 0 # Exception handler section + .long 81920 # Flags (defines frame register) +.Ltmp11: + .short .Ltmp13-.Ltmp12 # Record length +.Ltmp12: + .short 4414 # Record kind: S_LOCAL + .long 116 # TypeIndex + .short 1 # Flags + .asciz "argc" +.Ltmp13: + .cv_def_range .Ltmp0 .Ltmp1, "B\021\f\000\000\000" + .short .Ltmp15-.Ltmp14 # Record length +.Ltmp14: + .short 4414 # Record kind: S_LOCAL + .long 4096 # TypeIndex + .short 1 # Flags + .asciz "argv" +.Ltmp15: + .cv_def_range .Ltmp0 .Ltmp1, "B\021\020\000\000\000" + .short .Ltmp17-.Ltmp16 # Record length +.Ltmp16: + .short 4414 # Record kind: S_LOCAL + .long 4101 # TypeIndex + .short 0 # Flags + .asciz "SPtr" +.Ltmp17: + .cv_def_range .Ltmp0 .Ltmp1, "B\021\000\000\000\000" + .short .Ltmp19-.Ltmp18 # Record length +.Ltmp18: + .short 4360 # Record kind: S_UDT + .long 4101 # Type + .asciz "main::LocalTypedef" +.Ltmp19: + .short 2 # Record length + .short 4431 # Record kind: S_PROC_ID_END +.Ltmp7: + .p2align 2 + .cv_linetable 0, main, .Lfunc_end0 + .long 241 # Symbol subsection for globals + .long .Ltmp21-.Ltmp20 # Subsection size +.Ltmp20: + .short .Ltmp23-.Ltmp22 # Record length +.Ltmp22: + .short 4365 # Record kind: S_GDATA32 + .long 4103 # Type + .secrel32 "?S@@3UStruct@@A" # DataOffset + .secidx "?S@@3UStruct@@A" # Segment + .asciz "S" # Name +.Ltmp23: + .short .Ltmp25-.Ltmp24 # Record length +.Ltmp24: + .short 4365 # Record kind: S_GDATA32 + .long 4100 # Type + .secrel32 "?SS@@3UStruct@@A" # DataOffset + .secidx "?SS@@3UStruct@@A" # Segment + .asciz "SS" # Name +.Ltmp25: + .short .Ltmp27-.Ltmp26 # Record length +.Ltmp26: + .short 4365 # Record kind: S_GDATA32 + .long 116 # Type + .secrel32 "?I@@3HA" # DataOffset + .secidx "?I@@3HA" # Segment + .asciz "I" # Name +.Ltmp27: +.Ltmp21: + .p2align 2 + .long 241 + .long .Ltmp29-.Ltmp28 # Subsection size +.Ltmp28: + .short .Ltmp31-.Ltmp30 # Record length +.Ltmp30: + .short 4360 # Record kind: S_UDT + .long 4103 # Type + .asciz "Struct" +.Ltmp31: + .short .Ltmp33-.Ltmp32 # Record length +.Ltmp32: + .short 4360 # Record kind: S_UDT + .long 4100 # Type + .asciz "StructTypedef" +.Ltmp33: + .short .Ltmp35-.Ltmp34 # Record length +.Ltmp34: + .short 4360 # Record kind: S_UDT + .long 116 # Type + .asciz "IntTypedef" +.Ltmp35: +.Ltmp29: + .p2align 2 + .cv_filechecksums # File index to string table offset subsection + .cv_stringtable # String table + .long 241 + .long .Ltmp37-.Ltmp36 # Subsection size +.Ltmp36: + .short 6 # Record length + .short 4428 # Record kind: S_BUILDINFO + .long 4108 # LF_BUILDINFO index +.Ltmp37: + .p2align 2 + .section .debug$T,"dr" + .p2align 2 + .long 4 # Debug section magic + # Pointer (0x1000) { + # TypeLeafKind: LF_POINTER (0x1002) + # PointeeType: char* (0x670) + # PtrType: Near64 (0xC) + # PtrMode: Pointer (0x0) + # IsFlat: 0 + # IsConst: 0 + # IsVolatile: 0 + # IsUnaligned: 0 + # IsRestrict: 0 + # IsThisPtr&: 0 + # IsThisPtr&&: 0 + # SizeOf: 8 + # } + .byte 0x0a, 0x00, 0x02, 0x10 + .byte 0x70, 0x06, 0x00, 0x00 + .byte 0x0c, 0x00, 0x01, 0x00 + # ArgList (0x1001) { + # TypeLeafKind: LF_ARGLIST (0x1201) + # NumArgs: 2 + # Arguments [ + # ArgType: int (0x74) + # ArgType: char** (0x1000) + # ] + # } + .byte 0x0e, 0x00, 0x01, 0x12 + .byte 0x02, 0x00, 0x00, 0x00 + .byte 0x74, 0x00, 0x00, 0x00 + .byte 0x00, 0x10, 0x00, 0x00 + # Procedure (0x1002) { + # TypeLeafKind: LF_PROCEDURE (0x1008) + # ReturnType: int (0x74) + # CallingConvention: NearC (0x0) + # FunctionOptions [ (0x0) + # ] + # NumParameters: 2 + # ArgListType: (int, char**) (0x1001) + # } + .byte 0x0e, 0x00, 0x08, 0x10 + .byte 0x74, 0x00, 0x00, 0x00 + .byte 0x00, 0x00, 0x02, 0x00 + .byte 0x01, 0x10, 0x00, 0x00 + # FuncId (0x1003) { + # TypeLeafKind: LF_FUNC_ID (0x1601) + # ParentScope: 0x0 + # FunctionType: int (int, char**) (0x1002) + # Name: main + # } + .byte 0x12, 0x00, 0x01, 0x16 + .byte 0x00, 0x00, 0x00, 0x00 + .byte 0x02, 0x10, 0x00, 0x00 + .byte 0x6d, 0x61, 0x69, 0x6e + .byte 0x00, 0xf3, 0xf2, 0xf1 + # Struct (0x1004) { + # TypeLeafKind: LF_STRUCTURE (0x1505) + # MemberCount: 0 + # Properties [ (0x280) + # ForwardReference (0x80) + # HasUniqueName (0x200) + # ] + # FieldList: 0x0 + # DerivedFrom: 0x0 + # VShape: 0x0 + # SizeOf: 0 + # Name: Struct + # LinkageName: .?AUStruct@@ + # } + .byte 0x2a, 0x00, 0x05, 0x15 + .byte 0x00, 0x00, 0x80, 0x02 + .byte 0x00, 0x00, 0x00, 0x00 + .byte 0x00, 0x00, 0x00, 0x00 + .byte 0x00, 0x00, 0x00, 0x00 + .byte 0x00, 0x00, 0x53, 0x74 + .byte 0x72, 0x75, 0x63, 0x74 + .byte 0x00, 0x2e, 0x3f, 0x41 + .byte 0x55, 0x53, 0x74, 0x72 + .byte 0x75, 0x63, 0x74, 0x40 + .byte 0x40, 0x00, 0xf2, 0xf1 + # Pointer (0x1005) { + # TypeLeafKind: LF_POINTER (0x1002) + # PointeeType: Struct (0x1004) + # PtrType: Near64 (0xC) + # PtrMode: Pointer (0x0) + # IsFlat: 0 + # IsConst: 0 + # IsVolatile: 0 + # IsUnaligned: 0 + # IsRestrict: 0 + # IsThisPtr&: 0 + # IsThisPtr&&: 0 + # SizeOf: 8 + # } + .byte 0x0a, 0x00, 0x02, 0x10 + .byte 0x04, 0x10, 0x00, 0x00 + .byte 0x0c, 0x00, 0x01, 0x00 + # FieldList (0x1006) { + # TypeLeafKind: LF_FIELDLIST (0x1203) + # DataMember { + # TypeLeafKind: LF_MEMBER (0x150D) + # AccessSpecifier: Public (0x3) + # Type: int (0x74) + # FieldOffset: 0x0 + # Name: x + # } + # } + .byte 0x0e, 0x00, 0x03, 0x12 + .byte 0x0d, 0x15, 0x03, 0x00 + .byte 0x74, 0x00, 0x00, 0x00 + .byte 0x00, 0x00, 0x78, 0x00 + # Struct (0x1007) { + # TypeLeafKind: LF_STRUCTURE (0x1505) + # MemberCount: 1 + # Properties [ (0x200) + # HasUniqueName (0x200) + # ] + # FieldList: (0x1006) + # DerivedFrom: 0x0 + # VShape: 0x0 + # SizeOf: 4 + # Name: Struct + # LinkageName: .?AUStruct@@ + # } + .byte 0x2a, 0x00, 0x05, 0x15 + .byte 0x01, 0x00, 0x00, 0x02 + .byte 0x06, 0x10, 0x00, 0x00 + .byte 0x00, 0x00, 0x00, 0x00 + .byte 0x00, 0x00, 0x00, 0x00 + .byte 0x04, 0x00, 0x53, 0x74 + .byte 0x72, 0x75, 0x63, 0x74 + .byte 0x00, 0x2e, 0x3f, 0x41 + .byte 0x55, 0x53, 0x74, 0x72 + .byte 0x75, 0x63, 0x74, 0x40 + .byte 0x40, 0x00, 0xf2, 0xf1 + # StringId (0x1008) { + # TypeLeafKind: LF_STRING_ID (0x1605) + # Id: 0x0 + # StringData: D:\src\llvmbuild\cl\Debug\x64\foo.cpp + # } + .byte 0x2e, 0x00, 0x05, 0x16 + .byte 0x00, 0x00, 0x00, 0x00 + .byte 0x44, 0x3a, 0x5c, 0x73 + .byte 0x72, 0x63, 0x5c, 0x6c + .byte 0x6c, 0x76, 0x6d, 0x62 + .byte 0x75, 0x69, 0x6c, 0x64 + .byte 0x5c, 0x63, 0x6c, 0x5c + .byte 0x44, 0x65, 0x62, 0x75 + .byte 0x67, 0x5c, 0x78, 0x36 + .byte 0x34, 0x5c, 0x66, 0x6f + .byte 0x6f, 0x2e, 0x63, 0x70 + .byte 0x70, 0x00, 0xf2, 0xf1 + # UdtSourceLine (0x1009) { + # TypeLeafKind: LF_UDT_SRC_LINE (0x1606) + # UDT: Struct (0x1007) + # SourceFile: D:\src\llvmbuild\cl\Debug\x64\foo.cpp (0x1008) + # LineNumber: 1 + # } + .byte 0x0e, 0x00, 0x06, 0x16 + .byte 0x07, 0x10, 0x00, 0x00 + .byte 0x08, 0x10, 0x00, 0x00 + .byte 0x01, 0x00, 0x00, 0x00 + # StringId (0x100A) { + # TypeLeafKind: LF_STRING_ID (0x1605) + # Id: 0x0 + # StringData: D:\\src\\llvmbuild\\cl\\Debug\\x64 + # } + .byte 0x2a, 0x00, 0x05, 0x16 + .byte 0x00, 0x00, 0x00, 0x00 + .byte 0x44, 0x3a, 0x5c, 0x5c + .byte 0x73, 0x72, 0x63, 0x5c + .byte 0x5c, 0x6c, 0x6c, 0x76 + .byte 0x6d, 0x62, 0x75, 0x69 + .byte 0x6c, 0x64, 0x5c, 0x5c + .byte 0x63, 0x6c, 0x5c, 0x5c + .byte 0x44, 0x65, 0x62, 0x75 + .byte 0x67, 0x5c, 0x5c, 0x78 + .byte 0x36, 0x34, 0x00, 0xf1 + # StringId (0x100B) { + # TypeLeafKind: LF_STRING_ID (0x1605) + # Id: 0x0 + # StringData: foo.cpp + # } + .byte 0x0e, 0x00, 0x05, 0x16 + .byte 0x00, 0x00, 0x00, 0x00 + .byte 0x66, 0x6f, 0x6f, 0x2e + .byte 0x63, 0x70, 0x70, 0x00 + # BuildInfo (0x100C) { + # TypeLeafKind: LF_BUILDINFO (0x1603) + # NumArgs: 5 + # Arguments [ + # ArgType: D:\\src\\llvmbuild\\cl\\Debug\\x64 (0x100A) + # ArgType: 0x0 + # ArgType: foo.cpp (0x100B) + # ArgType: 0x0 + # ArgType: 0x0 + # ] + # } + .byte 0x1a, 0x00, 0x03, 0x16 + .byte 0x05, 0x00, 0x0a, 0x10 + .byte 0x00, 0x00, 0x00, 0x00 + .byte 0x00, 0x00, 0x0b, 0x10 + .byte 0x00, 0x00, 0x00, 0x00 + .byte 0x00, 0x00, 0x00, 0x00 + .byte 0x00, 0x00, 0xf2, 0xf1 + + .addrsig + .addrsig_sym "?S@@3UStruct@@A" + .addrsig_sym "?SS@@3UStruct@@A" + .addrsig_sym "?I@@3HA" diff --git a/lld/test/COFF/used-lto.ll b/lld/test/COFF/used-lto.ll new file mode 100644 index 0000000000000..c269fbac85d72 --- /dev/null +++ b/lld/test/COFF/used-lto.ll @@ -0,0 +1,15 @@ +; REQUIRES: x86 +; RUN: llvm-as -o %t.obj %s +; RUN: lld-link -dll -debug -opt:ref -noentry -out:%t.dll %t.obj +; RUN: llvm-pdbutil dump -publics %t.pdb | FileCheck %s + +; CHECK: S_PUB32 {{.*}} `foo` + +target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128" +target triple = "x86_64-pc-windows-msvc" + +@llvm.used = appending global [1 x i8*] [i8* bitcast (void ()* @foo to i8*)], section "llvm.metadata" + +define void @foo() { + ret void +} diff --git a/lld/test/ELF/Inputs/gnu-ifunc-canon-ro-abs.s b/lld/test/ELF/Inputs/gnu-ifunc-canon-ro-abs.s new file mode 100644 index 0000000000000..3c09bd6023aef --- /dev/null +++ b/lld/test/ELF/Inputs/gnu-ifunc-canon-ro-abs.s @@ -0,0 +1,2 @@ +.rodata +.8byte ifunc diff --git a/lld/test/ELF/Inputs/gnu-ifunc-canon-ro-pcrel.s b/lld/test/ELF/Inputs/gnu-ifunc-canon-ro-pcrel.s new file mode 100644 index 0000000000000..c173d3d72d186 --- /dev/null +++ b/lld/test/ELF/Inputs/gnu-ifunc-canon-ro-pcrel.s @@ -0,0 +1,2 @@ +.rodata +.4byte ifunc - . diff --git a/lld/test/ELF/Inputs/gnu-ifunc-canon-rw-addend.s b/lld/test/ELF/Inputs/gnu-ifunc-canon-rw-addend.s new file mode 100644 index 0000000000000..7f369d39344ed --- /dev/null +++ b/lld/test/ELF/Inputs/gnu-ifunc-canon-rw-addend.s @@ -0,0 +1,2 @@ +.data +.8byte ifunc + 1 diff --git a/lld/test/ELF/Inputs/i386-static-tls-model1.s b/lld/test/ELF/Inputs/i386-static-tls-model1.s new file mode 100644 index 0000000000000..d287fb64eee60 --- /dev/null +++ b/lld/test/ELF/Inputs/i386-static-tls-model1.s @@ -0,0 +1,9 @@ +.section ".tdata", "awT", @progbits +.globl var +var: + +.section .foo, "aw" +.global _start +_start: + movl $var@tpoff, %edx # R_386_TLS_LE_32 + movl %gs:0, %ecx diff --git a/lld/test/ELF/Inputs/i386-static-tls-model2.s b/lld/test/ELF/Inputs/i386-static-tls-model2.s new file mode 100644 index 0000000000000..2c01cee42ddfd --- /dev/null +++ b/lld/test/ELF/Inputs/i386-static-tls-model2.s @@ -0,0 +1,9 @@ +.section ".tdata", "awT", @progbits +.globl var +var: + +.section .foo, "aw" +.global _start +_start: + movl %gs:0, %eax + addl var@gotntpoff(%ebx), %eax # R_386_TLS_GOTIE diff --git a/lld/test/ELF/Inputs/i386-static-tls-model3.s b/lld/test/ELF/Inputs/i386-static-tls-model3.s new file mode 100644 index 0000000000000..fd18fceb71caa --- /dev/null +++ b/lld/test/ELF/Inputs/i386-static-tls-model3.s @@ -0,0 +1,9 @@ +.section ".tdata", "awT", @progbits +.globl var +var: + +.section .foo, "aw" +.global _start +_start: + movl %gs:0, %eax + addl var@indntpoff, %eax # R_386_TLS_IE diff --git a/lld/test/ELF/Inputs/i386-static-tls-model4.s b/lld/test/ELF/Inputs/i386-static-tls-model4.s new file mode 100644 index 0000000000000..6006518bfd7ce --- /dev/null +++ b/lld/test/ELF/Inputs/i386-static-tls-model4.s @@ -0,0 +1,9 @@ +.section ".tdata", "awT", @progbits +.globl var +var: + +.section .foo, "aw" +.global _start +_start: + movl %gs:0, %eax + leal var@ntpoff(%eax), %eax # R_386_TLS_LE diff --git a/lld/test/ELF/Inputs/print-icf.s b/lld/test/ELF/Inputs/print-icf.s index a67bee2f185c5..df9bcbc0989d7 100644 --- a/lld/test/ELF/Inputs/print-icf.s +++ b/lld/test/ELF/Inputs/print-icf.s @@ -1,9 +1,9 @@ -.section .text.f6, "ax" -f6: - mov $60, %rax - mov $42, %rdi - syscall - - .section .text.f7, "ax" -f7: - mov $0, %rax +.section .text.f6, "ax" +f6: + mov $60, %rax + mov $42, %rdi + syscall + + .section .text.f7, "ax" +f7: + mov $0, %rax diff --git a/lld/test/ELF/Inputs/x86-64-pcrel.s b/lld/test/ELF/Inputs/x86-64-pcrel.s new file mode 100644 index 0000000000000..dea824ae719b7 --- /dev/null +++ b/lld/test/ELF/Inputs/x86-64-pcrel.s @@ -0,0 +1,8 @@ +.globl foo +foo: + +.word _start - foo +.fill 14,1,0xcc + +.byte _start - foo +.fill 15,1,0xcc diff --git a/lld/test/ELF/aarch64-gnu-ifunc-address-pie.s b/lld/test/ELF/aarch64-gnu-ifunc-address-pie.s index 3db9070dbd07b..53cede9bddb85 100644 --- a/lld/test/ELF/aarch64-gnu-ifunc-address-pie.s +++ b/lld/test/ELF/aarch64-gnu-ifunc-address-pie.s @@ -12,6 +12,9 @@ .globl myfunc .type myfunc,@gnu_indirect_function myfunc: +.globl myfunc_resolver +.type myfunc_resolver,@function +myfunc_resolver: ret .text @@ -22,7 +25,7 @@ main: add x8, x8, :lo12: myfunc ret -# CHECK: 0000000000010000 myfunc: +# CHECK: 0000000000010000 myfunc_resolver: # CHECK-NEXT: 10000: c0 03 5f d6 ret # CHECK: 0000000000010004 main: # CHECK-NEXT: 10004: 08 00 00 90 adrp x8, #0 @@ -31,7 +34,7 @@ main: # x8 = 0x10010 = .plt for myfunc # CHECK-NEXT: 1000c: c0 03 5f d6 ret # CHECK-NEXT: Disassembly of section .plt: -# CHECK-NEXT: 0000000000010010 .plt: +# CHECK-NEXT: 0000000000010010 myfunc: # CHECK-NEXT: 10010: 90 00 00 90 adrp x16, #65536 # CHECK-NEXT: 10014: 11 02 40 f9 ldr x17, [x16] # CHECK-NEXT: 10018: 10 02 00 91 add x16, x16, #0 diff --git a/lld/test/ELF/aarch64-gnu-ifunc-address.s b/lld/test/ELF/aarch64-gnu-ifunc-address.s index 9321fe35e5361..e0e4daf79048c 100644 --- a/lld/test/ELF/aarch64-gnu-ifunc-address.s +++ b/lld/test/ELF/aarch64-gnu-ifunc-address.s @@ -21,20 +21,17 @@ main: ldr x8, [x8, :got_lo12:myfunc] ret # CHECK: 0000000000010004 main: -# x8 = 0x30000 -# CHECK-NEXT: 10004: 08 01 00 90 adrp x8, #131072 -# x8 = 0x300e0 = .got entry for myfunc with R_AARCH64_GLOB_DAT -# CHECK-NEXT: 10008: 08 71 40 f9 ldr x8, [x8, #224] +# x8 = 0x20000 +# CHECK-NEXT: 10004: 88 00 00 90 adrp x8, #65536 +# x8 = 0x200a0 = .got entry for myfunc with R_AARCH64_GLOB_DAT +# CHECK-NEXT: 10008: 08 51 40 f9 ldr x8, [x8, #160] # CHECK-NEXT: 1000c: c0 03 5f d6 ret # CHECK: Disassembly of section .got: -# CHECK-NEXT: 00000000000300e0 .got: +# CHECK-NEXT: 00000000000200a0 .got: # CHECK-RELOCS: Relocations [ # CHECK-RELOCS-NEXT: Section {{.*}} .rela.dyn { -# CHECK-RELOCS-NEXT: 0x300E0 R_AARCH64_GLOB_DAT myfunc 0x0 -# CHECK-RELOCS-NEXT: } -# CHECK-RELOCS-NEXT: Section {{.*}} .rela.plt { -# CHECK-RELOCS-NEXT: 0x20018 R_AARCH64_JUMP_SLOT myfunc 0x0 +# CHECK-RELOCS-NEXT: 0x200A0 R_AARCH64_GLOB_DAT myfunc 0x0 # CHECK-RELOCS-NEXT: } # CHECK-RELOCS-NEXT: ] diff --git a/lld/test/ELF/aarch64-gnu-ifunc2.s b/lld/test/ELF/aarch64-gnu-ifunc2.s index 2caff3f145860..f83a3b3882efd 100644 --- a/lld/test/ELF/aarch64-gnu-ifunc2.s +++ b/lld/test/ELF/aarch64-gnu-ifunc2.s @@ -9,8 +9,8 @@ # CHECK-NEXT: 210000: # CHECK: main: -# adrp x8, 0x230000, 0x230000 == address in .got -# CHECK-NEXT: 210004: {{.*}} adrp x8, #131072 +# adrp x8, 0x220000, 0x220000 == address in .got.plt +# CHECK-NEXT: 210004: {{.*}} adrp x8, #65536 # CHECK-NEXT: 210008: {{.*}} ldr x8, [x8] # CHECK-NEXT: 21000c: {{.*}} ret @@ -26,11 +26,6 @@ # CHECK-NEXT: .got.plt: # CHECK-NEXT: 220000: -# CHECK: Disassembly of section .got: -# CHECK-NEXT: .got: -# 0x210010 == address in .plt -# CHECK-NEXT: 230000: 10 00 21 00 - # RELOC: Relocations [ # RELOC-NEXT: Section {{.*}} .rela.plt { # RELOC-NEXT: 0x220000 R_AARCH64_IRELATIVE - 0x210000 diff --git a/lld/test/ELF/aarch64-gnu-ifunc3.s b/lld/test/ELF/aarch64-gnu-ifunc3.s index 11d5631b8578f..5d863e2f941f2 100644 --- a/lld/test/ELF/aarch64-gnu-ifunc3.s +++ b/lld/test/ELF/aarch64-gnu-ifunc3.s @@ -11,6 +11,9 @@ .globl myfunc .type myfunc,@gnu_indirect_function myfunc: +.globl myfunc_resolver +.type myfunc_resolver,@function +myfunc_resolver: ret .text @@ -22,7 +25,7 @@ _start: ret # CHECK: Disassembly of section .text: -# CHECK-NEXT: myfunc: +# CHECK-NEXT: myfunc_resolver: # CHECK-NEXT: 210000: c0 03 5f d6 ret # CHECK: _start: # adrp x8, 0x210000 + 0x10 from add == .plt entry @@ -30,7 +33,7 @@ _start: # CHECK-NEXT: 210008: 08 41 00 91 add x8, x8, #16 # CHECK-NEXT: 21000c: c0 03 5f d6 ret # CHECK-NEXT: Disassembly of section .plt: -# CHECK-NEXT: .plt: +# CHECK-NEXT: myfunc: # adrp x16, 0x220000, 0x220000 == address in .got.plt # CHECK-NEXT: 210010: 90 00 00 90 adrp x16, #65536 # CHECK-NEXT: 210014: 11 02 40 f9 ldr x17, [x16] diff --git a/lld/test/ELF/allow-shlib-undefined.s b/lld/test/ELF/allow-shlib-undefined.s index c96261fc400c4..5b09681f2e9d0 100644 --- a/lld/test/ELF/allow-shlib-undefined.s +++ b/lld/test/ELF/allow-shlib-undefined.s @@ -1,5 +1,4 @@ # REQUIRES: x86 -# --allow-shlib-undefined is set by default # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux \ diff --git a/lld/test/ELF/amdgpu-abi-version-err.s b/lld/test/ELF/amdgpu-abi-version-err.s new file mode 100644 index 0000000000000..a670ec75bf1f0 --- /dev/null +++ b/lld/test/ELF/amdgpu-abi-version-err.s @@ -0,0 +1,10 @@ +# REQUIRES: amdgpu +# RUN: llvm-mc -triple amdgcn-amd-amdhsa -mcpu=gfx900 -filetype=obj %s -o %t-0.o +# RUN: llvm-mc -triple amdgcn-amd-amdhsa -mcpu=gfx900 -mattr=-code-object-v3 -filetype=obj %s -o %t-1.o +# RUN: not ld.lld -shared %t-0.o %t-1.o -o %t.so 2>&1 | FileCheck %s + +# CHECK: ld.lld: error: incompatible ABI version: {{.*}}-1.o + +.text + s_nop 0x0 + s_endpgm diff --git a/lld/test/ELF/amdgpu-abi-version.s b/lld/test/ELF/amdgpu-abi-version.s new file mode 100644 index 0000000000000..4a6bf2d813230 --- /dev/null +++ b/lld/test/ELF/amdgpu-abi-version.s @@ -0,0 +1,11 @@ +# REQUIRES: amdgpu +# RUN: llvm-mc -triple amdgcn-amd-amdhsa -mcpu=gfx900 -filetype=obj %s -o %t.o +# RUN: ld.lld -shared %t.o -o %t.so +# RUN: llvm-readobj -file-headers %t.so | FileCheck %s + +# CHECK: OS/ABI: AMDGPU_HSA (0x40) +# CHECK: ABIVersion: 1 + +.text + s_nop 0x0 + s_endpgm diff --git a/lld/test/ELF/archive-thin-missing-member.s b/lld/test/ELF/archive-thin-missing-member.s new file mode 100644 index 0000000000000..d96fbc45415b1 --- /dev/null +++ b/lld/test/ELF/archive-thin-missing-member.s @@ -0,0 +1,24 @@ +# REQUIRES: x86 + +# RUN: rm -f %t-no-syms.a +# RUN: rm -f %t-syms.a +# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o +# RUN: llvm-ar rcTS %t-no-syms.a %t.o +# RUN: llvm-ar rcT %t-syms.a %t.o +# RUN: rm %t.o + +# Test error when loading symbols from missing thin archive member. +# RUN: not ld.lld %t-no-syms.a -o /dev/null 2>&1 | FileCheck %s --check-prefix=ERR1 +# ERR1: {{.*}}-no-syms.a: could not get the buffer for a child of the archive: '{{.*}}.o': {{[Nn]}}o such file or directory + +# Test error when thin archive has symbol table but member is missing. +# RUN: not ld.lld -m elf_amd64_fbsd %t-syms.a -o /dev/null 2>&1 | FileCheck %s --check-prefix=ERR2 +# ERR2: {{.*}}-syms.a: could not get the buffer for the member defining symbol _start: '{{.*}}.o': {{[Nn]}}o such file or directory + +# Test error when thin archive is linked using --whole-archive but member is missing. +# RUN: not ld.lld --whole-archive %t-syms.a -o /dev/null 2>&1 | FileCheck %s --check-prefix=ERR3 +# ERR3: {{.*}}-syms.a: could not get the buffer for a child of the archive: '{{.*}}.o': {{[Nn]}}o such file or directory + +.global _start +_start: + nop diff --git a/lld/test/ELF/arm-thunk-multipass-plt.s b/lld/test/ELF/arm-thunk-multipass-plt.s new file mode 100644 index 0000000000000..90ec3a52e4a73 --- /dev/null +++ b/lld/test/ELF/arm-thunk-multipass-plt.s @@ -0,0 +1,94 @@ +// REQUIRES: arm +// RUN: llvm-mc -arm-add-build-attributes -filetype=obj -triple=armv5-none-linux-gnueabi %s -o %t +// RUN: ld.lld %t -o %t2 --shared 2>&1 +// RUN: llvm-objdump --start-address=7340044 --stop-address=7340048 --triple=armv5-none-linux-gnueabi -d %t2 | FileCheck %s +// RUN: llvm-objdump --start-address=8388620 --stop-address=8388624 --triple=thumbv5-none-linux-gnueabi -d %t2 | FileCheck %s -check-prefix=CHECK-CALL +// RUN: llvm-objdump --start-address=13631520 --stop-address=13631584 --triple=armv5-none-linux-gnueabi -d %t2 | FileCheck %s -check-prefix=CHECK-PLT +// When we create a thunk to a PLT entry the relocation is redirected to the +// Thunk, changing its expression to a non-PLT equivalent. If the thunk +// becomes unusable we need to restore the relocation expression to the PLT +// form so that when we create a new thunk it targets the PLT. + +// Test case that checks the case: +// - Thunk is created on pass 1 to a PLT entry for preemptible +// - Some other Thunk added in the same pass moves the thunk to +// preemptible out of range of its caller. +// - New Thunk is created on pass 2 to PLT entry for preemptible + + .globl preemptible + .globl preemptible2 +.section .text.01, "ax", %progbits +.balign 0x100000 + .thumb + .globl needsplt + .type needsplt, %function +needsplt: + bl preemptible + .section .text.02, "ax", %progbits + .space (1024 * 1024) + + .section .text.03, "ax", %progbits + .space (1024 * 1024) + + .section .text.04, "ax", %progbits + .space (1024 * 1024) + + .section .text.05, "ax", %progbits + .space (1024 * 1024) + + .section .text.06, "ax", %progbits + .space (1024 * 1024) + + .section .text.07, "ax", %progbits + .space (1024 * 1024) +// 0x70000c + 8 + 0x60002c = 0xd00040 = preemptible@plt +// CHECK: 000000000070000c __ARMV5PILongThunk_preemptible: +// CHECK-NEXT: 70000c: 0b 00 18 ea b #6291500 + + .section .text.08, "ax", %progbits + .space (1024 * 1024) - 4 + + .section .text.10, "ax", %progbits + .balign 2 + bl preemptible + bl preemptible2 +// 0x80000c + 4 - 100004 = 0x70000c = __ARMv5PILongThunk_preemptible +// CHECK-CALL: 80000c: ff f6 fe ef blx #-1048580 + .balign 2 + .globl preemptible + .type preemptible, %function +preemptible: + bx lr + .globl preemptible2 + .type preemptible2, %function +preemptible2: + bx lr + + + .section .text.11, "ax", %progbits + .space (5 * 1024 * 1024) + + +// CHECK-PLT: Disassembly of section .plt: +// CHECK-PLT-NEXT: 0000000000d00020 $a: +// CHECK-PLT-NEXT: d00020: 04 e0 2d e5 str lr, [sp, #-4]! +// CHECK-PLT-NEXT: d00024: 00 e6 8f e2 add lr, pc, #0, #12 +// CHECK-PLT-NEXT: d00028: 00 ea 8e e2 add lr, lr, #0, #20 +// CHECK-PLT-NEXT: d0002c: dc ff be e5 ldr pc, [lr, #4060]! +// CHECK-PLT: 0000000000d00030 $d: +// CHECK-PLT-NEXT: d00030: d4 d4 d4 d4 .word 0xd4d4d4d4 +// CHECK-PLT-NEXT: d00034: d4 d4 d4 d4 .word 0xd4d4d4d4 +// CHECK-PLT-NEXT: d00038: d4 d4 d4 d4 .word 0xd4d4d4d4 +// CHECK-PLT-NEXT: d0003c: d4 d4 d4 d4 .word 0xd4d4d4d4 +// CHECK-PLT: 0000000000d00040 $a: +// CHECK-PLT-NEXT: d00040: 00 c6 8f e2 add r12, pc, #0, #12 +// CHECK-PLT-NEXT: d00044: 00 ca 8c e2 add r12, r12, #0, #20 +// CHECK-PLT-NEXT: d00048: c4 ff bc e5 ldr pc, [r12, #4036]! +// CHECK-PLT: 0000000000d0004c $d: +// CHECK-PLT-NEXT: d0004c: d4 d4 d4 d4 .word 0xd4d4d4d4 +// CHECK-PLT: 0000000000d00050 $a: +// CHECK-PLT-NEXT: d00050: 00 c6 8f e2 add r12, pc, #0, #12 +// CHECK-PLT-NEXT: d00054: 00 ca 8c e2 add r12, r12, #0, #20 +// CHECK-PLT-NEXT: d00058: b8 ff bc e5 ldr pc, [r12, #4024]! +// CHECK-PLT: 0000000000d0005c $d: +// CHECK-PLT-NEXT: d0005c: d4 d4 d4 d4 .word 0xd4d4d4d4 diff --git a/lld/test/ELF/arm-v4bx.test b/lld/test/ELF/arm-v4bx.test index 1b39a431417be..9d9921d18c615 100644 --- a/lld/test/ELF/arm-v4bx.test +++ b/lld/test/ELF/arm-v4bx.test @@ -27,7 +27,6 @@ Sections: Info: .text Relocations: - Offset: 0x0000000000000000 - Symbol: '' Type: R_ARM_V4BX Symbols: Global: diff --git a/lld/test/ELF/basic-mips.s b/lld/test/ELF/basic-mips.s index 9ecabff47f6a2..3b58c712e37e1 100644 --- a/lld/test/ELF/basic-mips.s +++ b/lld/test/ELF/basic-mips.s @@ -34,7 +34,7 @@ __start: # CHECK-NEXT: ] # CHECK-NEXT: HeaderSize: 52 # CHECK-NEXT: ProgramHeaderEntrySize: 32 -# CHECK-NEXT: ProgramHeaderCount: 5 +# CHECK-NEXT: ProgramHeaderCount: 7 # CHECK-NEXT: SectionHeaderEntrySize: 40 # CHECK-NEXT: SectionHeaderCount: 11 # CHECK-NEXT: StringTableSectionIndex: 9 @@ -61,8 +61,8 @@ __start: # CHECK-NEXT: Flags [ (0x2) # CHECK-NEXT: SHF_ALLOC (0x2) # CHECK-NEXT: ] -# CHECK-NEXT: Address: 0x100D8 -# CHECK-NEXT: Offset: 0xD8 +# CHECK-NEXT: Address: 0x10118 +# CHECK-NEXT: Offset: 0x118 # CHECK-NEXT: Size: 24 # CHECK-NEXT: Link: 0 # CHECK-NEXT: Info: 0 @@ -76,8 +76,8 @@ __start: # CHECK-NEXT: Flags [ (0x2) # CHECK-NEXT: SHF_ALLOC (0x2) # CHECK-NEXT: ] -# CHECK-NEXT: Address: 0x100F0 -# CHECK-NEXT: Offset: 0xF0 +# CHECK-NEXT: Address: 0x10130 +# CHECK-NEXT: Offset: 0x130 # CHECK-NEXT: Size: 24 # CHECK-NEXT: Link: 0 # CHECK-NEXT: Info: 0 @@ -245,8 +245,8 @@ __start: # CHECK-NEXT: Offset: 0x34 # CHECK-NEXT: VirtualAddress: 0x10034 # CHECK-NEXT: PhysicalAddress: 0x10034 -# CHECK-NEXT: FileSize: 160 -# CHECK-NEXT: MemSize: 160 +# CHECK-NEXT: FileSize: 224 +# CHECK-NEXT: MemSize: 224 # CHECK-NEXT: Flags [ (0x4) # CHECK-NEXT: PF_R (0x4) # CHECK-NEXT: ] @@ -257,8 +257,8 @@ __start: # CHECK-NEXT: Offset: 0x0 # CHECK-NEXT: VirtualAddress: 0x10000 # CHECK-NEXT: PhysicalAddress: 0x10000 -# CHECK-NEXT: FileSize: 264 -# CHECK-NEXT: MemSize: 264 +# CHECK-NEXT: FileSize: 328 +# CHECK-NEXT: MemSize: 328 # CHECK-NEXT: Flags [ (0x4) # CHECK-NEXT: PF_R (0x4) # CHECK-NEXT: ] @@ -291,16 +291,40 @@ __start: # CHECK-NEXT: Alignment: 65536 # CHECK-NEXT: } # CHECK-NEXT: ProgramHeader { -# CHECK-NEXT: Type: PT_GNU_STACK -# CHECK-NEXT: Offset: 0x0 -# CHECK-NEXT: VirtualAddress: 0x0 -# CHECK-NEXT: PhysicalAddress: 0x0 -# CHECK-NEXT: FileSize: 0 -# CHECK-NEXT: MemSize: 0 -# CHECK-NEXT: Flags [ -# CHECK-NEXT: PF_R -# CHECK-NEXT: PF_W -# CHECK-NEXT: ] -# CHECK-NEXT: Alignment: 0 -# CHECK-NEXT: } -# CHECK-NEXT:] +# CHECK-NEXT: Type: PT_GNU_STACK +# CHECK-NEXT: Offset: 0x0 +# CHECK-NEXT: VirtualAddress: 0x0 +# CHECK-NEXT: PhysicalAddress: 0x0 +# CHECK-NEXT: FileSize: 0 +# CHECK-NEXT: MemSize: 0 +# CHECK-NEXT: Flags [ +# CHECK-NEXT: PF_R +# CHECK-NEXT: PF_W +# CHECK-NEXT: ] +# CHECK-NEXT: Alignment: 0 +# CHECK-NEXT: } +# CHECK-NEXT: ProgramHeader { +# CHECK-NEXT: Type: PT_MIPS_REGINFO +# CHECK-NEXT: Offset: 0x130 +# CHECK-NEXT: VirtualAddress: 0x10130 +# CHECK-NEXT: PhysicalAddress: 0x10130 +# CHECK-NEXT: FileSize: 24 +# CHECK-NEXT: MemSize: 24 +# CHECK-NEXT: Flags [ (0x4) +# CHECK-NEXT: PF_R (0x4) +# CHECK-NEXT: ] +# CHECK-NEXT: Alignment: 4 +# CHECK-NEXT: } +# CHECK-NEXT: ProgramHeader { +# CHECK-NEXT: Type: PT_MIPS_ABIFLAGS +# CHECK-NEXT: Offset: 0x118 +# CHECK-NEXT: VirtualAddress: 0x10118 +# CHECK-NEXT: PhysicalAddress: 0x10118 +# CHECK-NEXT: FileSize: 24 +# CHECK-NEXT: MemSize: 24 +# CHECK-NEXT: Flags [ (0x4) +# CHECK-NEXT: PF_R (0x4) +# CHECK-NEXT: ] +# CHECK-NEXT: Alignment: 8 +# CHECK-NEXT: } +# CHECK-NEXT: ] diff --git a/lld/test/ELF/debug-line-obj.s b/lld/test/ELF/debug-line-obj.s new file mode 100644 index 0000000000000..615673b4c5ad1 --- /dev/null +++ b/lld/test/ELF/debug-line-obj.s @@ -0,0 +1,177 @@ +# REQUIRES: x86 +# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux -dwarf-version=5 %s -o %t.o +# RUN: not ld.lld %t.o -o %t1 2>&1 | FileCheck %s + +# When compiling with -ffunction-sections, .debug_line may contain descriptions +# of locations from the different text sections. Until relocated such +# descriptions might contain overlapping offsets. Check LLD is able to report +# the error locations correctly in this case. + +# CHECK: error: undefined symbol: foo() +# CHECK-NEXT: >>> referenced by test.cpp:2 +# CHECK-NEXT: >>> {{.*}}.o:(bar()) +# CHECK: error: undefined symbol: foo() +# CHECK-NEXT: >>> referenced by test.cpp:3 +# CHECK-NEXT: >>> {{.*}}.o:(baz()) + +# The code below is the reduced version of the output +# from the following invocation and source: +# +# // test.cpp: +# int foo(); +# int bar() { return foo(); } +# int baz() { return foo(); } +# +# clang -gdwarf-5 -ffunction-sections test.cpp -o test.s -S + +.text +.file "test.cpp" +.section .text._Z3barv,"ax",@progbits +.globl _Z3barv +.type _Z3barv,@function +_Z3barv: +.Lfunc_begin0: + .file 0 "/path" "test.cpp" md5 0x9ff11a8404ab4d032ee2dd4f5f8c4140 + .file 1 "test.cpp" md5 0x9ff11a8404ab4d032ee2dd4f5f8c4140 + .loc 1 2 0 # test.cpp:2:0 + .loc 1 2 20 prologue_end # test.cpp:2:20 + callq _Z3foov + .loc 1 2 13 is_stmt 0 # test.cpp:2:13 +.Lfunc_end0: +.size _Z3barv, .Lfunc_end0-_Z3barv + # -- End function +.section .text._Z3bazv,"ax",@progbits +.globl _Z3bazv # -- Begin function _Z3bazv + .type _Z3bazv,@function +_Z3bazv: # @_Z3bazv +.Lfunc_begin1: + .loc 1 3 0 is_stmt 1 # test.cpp:3:0 + .loc 1 3 20 prologue_end # test.cpp:3:20 + callq _Z3foov + .loc 1 3 13 is_stmt 0 # test.cpp:3:13 +.Lfunc_end1: + .size _Z3bazv, .Lfunc_end1-_Z3bazv + +.section .debug_str,"MS",@progbits,1 +.Linfo_string0: + .asciz "stub" + +.section .debug_str_offsets,"",@progbits + .long 8 + .short 5 + .short 0 +.Lstr_offsets_base0: + .long .Linfo_string0 + +.section .debug_abbrev,"",@progbits + .byte 1 # Abbreviation Code + .byte 17 # DW_TAG_compile_unit + .byte 1 # DW_CHILDREN_yes + .byte 37 # DW_AT_producer + .byte 37 # DW_FORM_strx1 + .byte 19 # DW_AT_language + .byte 5 # DW_FORM_data2 + .byte 3 # DW_AT_name + .byte 37 # DW_FORM_strx1 + .byte 114 # DW_AT_str_offsets_base + .byte 23 # DW_FORM_sec_offset + .byte 16 # DW_AT_stmt_list + .byte 23 # DW_FORM_sec_offset + .byte 27 # DW_AT_comp_dir + .byte 37 # DW_FORM_strx1 + .byte 115 # DW_AT_addr_base + .byte 23 # DW_FORM_sec_offset + .byte 17 # DW_AT_low_pc + .byte 1 # DW_FORM_addr + .byte 85 # DW_AT_ranges + .byte 35 # DW_FORM_rnglistx + .byte 116 # DW_AT_rnglists_base + .byte 23 # DW_FORM_sec_offset + .byte 0 # EOM(1) + .byte 0 # EOM(2) + .byte 2 # Abbreviation Code + .byte 46 # DW_TAG_subprogram + .byte 0 # DW_CHILDREN_no + .byte 17 # DW_AT_low_pc + .byte 27 # DW_FORM_addrx + .byte 18 # DW_AT_high_pc + .byte 6 # DW_FORM_data4 + .byte 64 # DW_AT_frame_base + .byte 24 # DW_FORM_exprloc + .byte 110 # DW_AT_linkage_name + .byte 37 # DW_FORM_strx1 + .byte 3 # DW_AT_name + .byte 37 # DW_FORM_strx1 + .byte 58 # DW_AT_decl_file + .byte 11 # DW_FORM_data1 + .byte 59 # DW_AT_decl_line + .byte 11 # DW_FORM_data1 + .byte 73 # DW_AT_type + .byte 19 # DW_FORM_ref4 + .byte 63 # DW_AT_external + .byte 25 # DW_FORM_flag_present + .byte 0 # EOM(1) + .byte 0 # EOM(2) + .byte 3 # Abbreviation Code + .byte 36 # DW_TAG_base_type + .byte 0 # DW_CHILDREN_no + .byte 3 # DW_AT_name + .byte 37 # DW_FORM_strx1 + .byte 62 # DW_AT_encoding + .byte 11 # DW_FORM_data1 + .byte 11 # DW_AT_byte_size + .byte 11 # DW_FORM_data1 + .byte 0 # EOM(1) + .byte 0 # EOM(2) + .byte 0 # EOM(3) + +.section .debug_info,"",@progbits +.Lcu_begin0: + .long .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit +.Ldebug_info_start0: + .short 5 # DWARF version number + .byte 1 # DWARF Unit Type + .byte 8 # Address Size (in bytes) + .long .debug_abbrev # Offset Into Abbrev. Section + .byte 1 # Abbrev [1] 0xc:0x44 DW_TAG_compile_unit + .byte 0 # DW_AT_producer + .short 4 # DW_AT_language + .byte 0 # DW_AT_name + .long .Lstr_offsets_base0 # DW_AT_str_offsets_base + .long .Lline_table_start0 # DW_AT_stmt_list + .byte 2 # DW_AT_comp_dir + .long 0 # DW_AT_addr_base + .quad 0 # DW_AT_low_pc + .byte 0 # DW_AT_ranges + .long 0 # DW_AT_rnglists_base + .byte 2 # Abbrev [2] 0x2b:0x10 DW_TAG_subprogram + .byte 0 # DW_AT_low_pc + .long .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc + .byte 1 # DW_AT_frame_base + .byte 86 + .byte 3 # DW_AT_linkage_name + .byte 0 # DW_AT_name + .byte 1 # DW_AT_decl_file + .byte 2 # DW_AT_decl_line + .long 75 # DW_AT_type + # DW_AT_external + .byte 2 # Abbrev [2] 0x3b:0x10 DW_TAG_subprogram + .byte 1 # DW_AT_low_pc + .long .Lfunc_end1-.Lfunc_begin1 # DW_AT_high_pc + .byte 1 # DW_AT_frame_base + .byte 86 + .byte 6 # DW_AT_linkage_name + .byte 0 # DW_AT_name + .byte 1 # DW_AT_decl_file + .byte 3 # DW_AT_decl_line + .long 75 # DW_AT_type + # DW_AT_external + .byte 3 # Abbrev [3] 0x4b:0x4 DW_TAG_base_type + .byte 0 # DW_AT_name + .byte 5 # DW_AT_encoding + .byte 4 # DW_AT_byte_size + .byte 0 # End Of Children Mark +.Ldebug_info_end0: + +.section .debug_line,"",@progbits +.Lline_table_start0: diff --git a/lld/test/ELF/driver.test b/lld/test/ELF/driver.test index 585800a3b0b54..cc3e7898f09be 100644 --- a/lld/test/ELF/driver.test +++ b/lld/test/ELF/driver.test @@ -60,6 +60,7 @@ # ERR9: cannot open output file utput=/no/such/file # RUN: not ld.lld %t -z foo 2>&1 | FileCheck -check-prefix=ERR10 %s +# RUN: not ld.lld %t -z foo --version 2>&1 | FileCheck -check-prefix=ERR10 %s # ERR10: unknown -z value: foo ## Check we report "unknown -z value" error even with -v. diff --git a/lld/test/ELF/eh-frame-hdr-abs-fde.s b/lld/test/ELF/eh-frame-hdr-abs-fde.s index 7f75058d4b358..d597ee94b463d 100644 --- a/lld/test/ELF/eh-frame-hdr-abs-fde.s +++ b/lld/test/ELF/eh-frame-hdr-abs-fde.s @@ -1,23 +1,23 @@ -# REQUIRES: mips +# REQUIRES: x86 # Check reading PC values of FDEs and writing lookup table in the .eh_frame_hdr # if CIE augmentation string has 'L' token and PC values are encoded using # absolute (not relative) format. -# RUN: llvm-mc -filetype=obj -triple=mips-unknown-linux %s -o %t.o +# RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux %s -o %t.o # RUN: ld.lld --eh-frame-hdr %t.o -o %t # RUN: llvm-objdump -s -dwarf=frames %t | FileCheck %s # CHECK: Contents of section .eh_frame_hdr: -# CHECK-NEXT: 10128 011b033b 00000010 00000001 0000fed8 -# ^-- 0x20000 - 0x10138 -# .text - .eh_frame_hdr -# CHECK-NEXT: 10138 0000002c +# CHECK-NEXT: 200190 011b033b 14000000 01000000 700e0000 +# ^-- 0x201000 - 0x200190 +# .text - .eh_frame_hdr +# CHECK-NEXT: 2001a0 30000000 # CHECK: Contents of section .text: -# CHECK-NEXT: 20000 00000000 +# CHECK-NEXT: 201000 90 # CHECK: Augmentation: "zLR" -# CHECK: Augmentation data: 00 0B -# ^-- DW_EH_PE_udata4 | DW_EH_PE_signed +# CHECK: Augmentation data: 00 1B +# ^-- DW_EH_PE_pcrel | DW_EH_PE_udata4 | DW_EH_PE_signed .text .globl __start diff --git a/lld/test/ELF/emulation-mips.s b/lld/test/ELF/emulation-mips.s index 42d0dd973eb36..6d7a1198b761f 100644 --- a/lld/test/ELF/emulation-mips.s +++ b/lld/test/ELF/emulation-mips.s @@ -7,6 +7,9 @@ # RUN: echo 'OUTPUT_FORMAT(elf32-tradbigmips)' > %tmips.script # RUN: ld.lld %tmips.script -e _start %tmips -o %t4mips # RUN: llvm-readobj -file-headers %t4mips | FileCheck --check-prefix=MIPS %s +# RUN: echo 'OUTPUT_FORMAT(elf32-bigmips)' > %tmips2.script +# RUN: ld.lld %tmips2.script -e _start %tmips -o %t5mips +# RUN: llvm-readobj -file-headers %t5mips | FileCheck --check-prefix=MIPS %s # MIPS: ElfHeader { # MIPS-NEXT: Ident { # MIPS-NEXT: Magic: (7F 45 4C 46) diff --git a/lld/test/ELF/emulation-ppc.s b/lld/test/ELF/emulation-ppc.s index 843e77604779b..4c8beb10159e6 100644 --- a/lld/test/ELF/emulation-ppc.s +++ b/lld/test/ELF/emulation-ppc.s @@ -103,5 +103,42 @@ # PPC64LE-NEXT: StringTableSectionIndex: # PPC64LE-NEXT: } +# RUN: llvm-mc -filetype=obj -triple=powerpc-unknown-linux %s -o %tppc32 +# RUN: ld.lld -m elf32ppc %tppc32 -o %t2ppc32 +# RUN: llvm-readobj -file-headers %t2ppc32 | FileCheck --check-prefix=PPC32 %s +# RUN: ld.lld %tppc32 -o %t3ppc32 +# RUN: llvm-readobj -file-headers %t3ppc32 | FileCheck --check-prefix=PPC32 %s +# RUN: echo 'OUTPUT_FORMAT(elf32-powerpc)' > %tppc32.script +# RUN: ld.lld %tppc32.script %tppc32 -o %t4ppc32 +# RUN: llvm-readobj -file-headers %t4ppc32 | FileCheck --check-prefix=PPC32 %s +# RUN: ld.lld -m elf32ppclinux %tppc32 -o %t5ppc32 +# RUN: llvm-readobj -file-headers %t5ppc32 | FileCheck --check-prefix=PPC32 %s + +# PPC32: ElfHeader { +# PPC32-NEXT: Ident { +# PPC32-NEXT: Magic: (7F 45 4C 46) +# PPC32-NEXT: Class: 32-bit (0x1) +# PPC32-NEXT: DataEncoding: BigEndian (0x2) +# PPC32-NEXT: FileVersion: 1 +# PPC32-NEXT: OS/ABI: SystemV (0x0) +# PPC32-NEXT: ABIVersion: 0 +# PPC32-NEXT: Unused: (00 00 00 00 00 00 00) +# PPC32-NEXT: } +# PPC32-NEXT: Type: Executable (0x2) +# PPC32-NEXT: Machine: EM_PPC (0x14) +# PPC32-NEXT: Version: 1 +# PPC32-NEXT: Entry: +# PPC32-NEXT: ProgramHeaderOffset: 0x34 +# PPC32-NEXT: SectionHeaderOffset: +# PPC32-NEXT: Flags [ (0x0) +# PPC32-NEXT: ] +# PPC32-NEXT: HeaderSize: 52 +# PPC32-NEXT: ProgramHeaderEntrySize: 32 +# PPC32-NEXT: ProgramHeaderCount: +# PPC32-NEXT: SectionHeaderEntrySize: 40 +# PPC32-NEXT: SectionHeaderCount: +# PPC32-NEXT: StringTableSectionIndex: +# PPC32-NEXT: } + .globl _start _start: diff --git a/lld/test/ELF/gnu-ifunc-canon.s b/lld/test/ELF/gnu-ifunc-canon.s new file mode 100644 index 0000000000000..c14e137cc64e2 --- /dev/null +++ b/lld/test/ELF/gnu-ifunc-canon.s @@ -0,0 +1,92 @@ +// REQUIRES: x86 +// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o +// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %S/Inputs/gnu-ifunc-canon-ro-pcrel.s -o %t-ro-pcrel.o +// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %S/Inputs/gnu-ifunc-canon-ro-abs.s -o %t-ro-abs.o +// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %S/Inputs/gnu-ifunc-canon-rw-addend.s -o %t-rw-addend.o +// RUN: ld.lld %t.o -o %t1 +// RUN: llvm-readobj -relocs %t1 | FileCheck --check-prefix=IREL2 %s +// RUN: ld.lld %t.o %t-ro-pcrel.o -o %t2 +// RUN: llvm-readobj -relocs %t2 | FileCheck --check-prefix=IREL1 %s +// RUN: ld.lld %t.o %t-ro-abs.o -o %t3 +// RUN: llvm-readobj -relocs %t3 | FileCheck --check-prefix=IREL1 %s +// RUN: ld.lld %t.o %t-rw-addend.o -o %t4 +// RUN: llvm-readobj -relocs %t4 | FileCheck --check-prefix=IREL1 %s +// RUN: llvm-objdump -s %t4 | FileCheck --check-prefix=DUMP %s +// RUN: ld.lld %t.o %t-rw-addend.o -o %t4a -z retpolineplt +// RUN: llvm-readobj -relocs %t4a | FileCheck --check-prefix=IREL1 %s +// RUN: llvm-objdump -s %t4a | FileCheck --check-prefix=DUMP2 %s +// RUN: ld.lld %t-ro-pcrel.o %t.o -o %t5 +// RUN: llvm-readobj -relocs %t5 | FileCheck --check-prefix=IREL1 %s +// RUN: ld.lld %t-ro-abs.o %t.o -o %t6 +// RUN: llvm-readobj -relocs %t6 | FileCheck --check-prefix=IREL1 %s +// RUN: ld.lld %t-rw-addend.o %t.o -o %t7 +// RUN: llvm-readobj -relocs %t7 | FileCheck --check-prefix=IREL1 %s +// RUN: ld.lld %t.o -o %t8 -pie +// RUN: llvm-readobj -relocs %t8 | FileCheck --check-prefix=IREL2 %s +// RUN: ld.lld %t.o %t-ro-pcrel.o -o %t9 -pie +// RUN: llvm-readobj -relocs %t9 | FileCheck --check-prefix=IREL1-REL2 %s +// RUN: ld.lld %t.o %t-rw-addend.o -o %t10 -pie +// RUN: llvm-readobj -relocs %t10 | FileCheck --check-prefix=IREL1-REL3 %s +// RUN: ld.lld %t-ro-pcrel.o %t.o -o %t11 -pie +// RUN: llvm-readobj -relocs %t11 | FileCheck --check-prefix=IREL1-REL2 %s +// RUN: ld.lld %t-rw-addend.o %t.o -o %t12 -pie +// RUN: llvm-readobj -relocs %t12 | FileCheck --check-prefix=IREL1-REL3 %s + +// Two relocs, one for the GOT and the other for .data. +// IREL2-NOT: R_X86_64_ +// IREL2: .rela.plt +// IREL2-NEXT: R_X86_64_IRELATIVE +// IREL2-NEXT: R_X86_64_IRELATIVE +// IREL2-NOT: R_X86_64_ + +// One reloc for the canonical PLT. +// IREL1-NOT: R_X86_64_ +// IREL1: .rela.plt +// IREL1-NEXT: R_X86_64_IRELATIVE +// IREL1-NOT: R_X86_64_ + +// One reloc for the canonical PLT and two RELATIVE relocations pointing to it, +// one in the GOT and one in .data. +// IREL1-REL2-NOT: R_X86_64_ +// IREL1-REL2: .rela.dyn +// IREL1-REL2-NEXT: R_X86_64_RELATIVE +// IREL1-REL2-NEXT: R_X86_64_RELATIVE +// IREL1-REL2: .rela.plt +// IREL1-REL2-NEXT: R_X86_64_IRELATIVE +// IREL1-REL2-NOT: R_X86_64_ + +// One reloc for the canonical PLT and three RELATIVE relocations pointing to it, +// one in the GOT and two in .data. +// IREL1-REL3-NOT: R_X86_64_ +// IREL1-REL3: .rela.dyn +// IREL1-REL3-NEXT: R_X86_64_RELATIVE +// IREL1-REL3-NEXT: R_X86_64_RELATIVE +// IREL1-REL3-NEXT: R_X86_64_RELATIVE +// IREL1-REL3: .rela.plt +// IREL1-REL3-NEXT: R_X86_64_IRELATIVE +// IREL1-REL3-NOT: R_X86_64_ + +// Make sure the static relocations look right, both with and without headers. +// DUMP: Contents of section .plt: +// DUMP-NEXT: 201010 +// DUMP: Contents of section .data: +// DUMP-NEXT: 202000 10102000 00000000 11102000 00000000 +// DUMP: Contents of section .got: +// DUMP-NEXT: 203000 10102000 00000000 + +// DUMP2: Contents of section .plt: +// DUMP2-NEXT: 201010 +// DUMP2: Contents of section .data: +// DUMP2-NEXT: 202000 40102000 00000000 41102000 00000000 +// DUMP2: Contents of section .got: +// DUMP2-NEXT: 203000 40102000 00000000 + +lea ifunc@gotpcrel(%rip), %rbx + +.type ifunc STT_GNU_IFUNC +.globl ifunc +ifunc: +ret + +.data +.8byte ifunc diff --git a/lld/test/ELF/gnu-ifunc-i386.s b/lld/test/ELF/gnu-ifunc-i386.s index bfc1587f01143..ac41dbdd5d1d4 100644 --- a/lld/test/ELF/gnu-ifunc-i386.s +++ b/lld/test/ELF/gnu-ifunc-i386.s @@ -70,28 +70,46 @@ // CHECK-NEXT: } // CHECK-NEXT: Symbol { // CHECK-NEXT: Name: bar +// CHECK-NEXT: Value: 0x401030 +// CHECK-NEXT: Size: 0 +// CHECK-NEXT: Binding: Global +// CHECK-NEXT: Type: Function +// CHECK-NEXT: Other: 0 +// CHECK-NEXT: Section: .plt +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: bar_resolver // CHECK-NEXT: Value: 0x401001 // CHECK-NEXT: Size: 0 // CHECK-NEXT: Binding: Global -// CHECK-NEXT: Type: GNU_IFunc +// CHECK-NEXT: Type: Function // CHECK-NEXT: Other: 0 // CHECK-NEXT: Section: .text // CHECK-NEXT: } // CHECK-NEXT: Symbol { // CHECK-NEXT: Name: foo +// CHECK-NEXT: Value: 0x401020 +// CHECK-NEXT: Size: 0 +// CHECK-NEXT: Binding: Global +// CHECK-NEXT: Type: Function +// CHECK-NEXT: Other: 0 +// CHECK-NEXT: Section: .plt +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: foo_resolver // CHECK-NEXT: Value: 0x401000 // CHECK-NEXT: Size: 0 // CHECK-NEXT: Binding: Global -// CHECK-NEXT: Type: GNU_IFunc +// CHECK-NEXT: Type: Function // CHECK-NEXT: Other: 0 // CHECK-NEXT: Section: .text // CHECK-NEXT: } // CHECK-NEXT:] // DISASM: Disassembly of section .text: -// DISASM-NEXT: foo: +// DISASM-NEXT: foo_resolver: // DISASM-NEXT: 401000: c3 retl -// DISASM: bar: +// DISASM: bar_resolver: // DISASM-NEXT: 401001: c3 retl // DISASM: _start: // DISASM-NEXT: 401002: e8 19 00 00 00 calll 25 @@ -99,10 +117,11 @@ // DISASM-NEXT: 40100c: ba d4 00 40 00 movl $4194516, %edx // DISASM-NEXT: 401011: ba e4 00 40 00 movl $4194532, %edx // DISASM-NEXT: Disassembly of section .plt: -// DISASM-NEXT: .plt: +// DISASM-NEXT: foo: // DISASM-NEXT: 401020: ff 25 00 20 40 00 jmpl *4202496 // DISASM-NEXT: 401026: 68 10 00 00 00 pushl $16 // DISASM-NEXT: 40102b: e9 e0 ff ff ff jmp -32 <_start+0xe> +// DISASM: bar: // DISASM-NEXT: 401030: ff 25 04 20 40 00 jmpl *4202500 // DISASM-NEXT: 401036: 68 18 00 00 00 pushl $24 // DISASM-NEXT: 40103b: e9 d0 ff ff ff jmp -48 <_start+0xe> @@ -111,11 +130,17 @@ .type foo STT_GNU_IFUNC .globl foo foo: +.type foo_resolver STT_FUNC +.globl foo_resolver +foo_resolver: ret .type bar STT_GNU_IFUNC .globl bar bar: +.type bar_resolver STT_FUNC +.globl bar_resolver +bar_resolver: ret .globl _start diff --git a/lld/test/ELF/i386-static-tls-model.s b/lld/test/ELF/i386-static-tls-model.s new file mode 100644 index 0000000000000..a6dbc6db912c2 --- /dev/null +++ b/lld/test/ELF/i386-static-tls-model.s @@ -0,0 +1,20 @@ +# REQUIRES: x86 + +# RUN: llvm-mc -filetype=obj -triple=i686-pc-linux %S/Inputs/i386-static-tls-model1.s -o %t.o +# RUN: ld.lld %t.o -o %t1 -shared +# RUN: llvm-readobj -dynamic-table %t1 | FileCheck %s + +# RUN: llvm-mc -filetype=obj -triple=i686-pc-linux %S/Inputs/i386-static-tls-model2.s -o %t.o +# RUN: ld.lld %t.o -o %t2 -shared +# RUN: llvm-readobj -dynamic-table %t2 | FileCheck %s + +# RUN: llvm-mc -filetype=obj -triple=i686-pc-linux %S/Inputs/i386-static-tls-model3.s -o %t.o +# RUN: ld.lld %t.o -o %t3 -shared +# RUN: llvm-readobj -dynamic-table %t3 | FileCheck %s + +# RUN: llvm-mc -filetype=obj -triple=i686-pc-linux %S/Inputs/i386-static-tls-model4.s -o %t.o +# RUN: ld.lld %t.o -o %t4 -shared +# RUN: llvm-readobj -dynamic-table %t4 | FileCheck %s + +# CHECK: DynamicSection [ +# CHECK: FLAGS STATIC_TLS diff --git a/lld/test/ELF/i386-tls-ie-shared.s b/lld/test/ELF/i386-tls-ie-shared.s index 9e5ed1bcc462d..0e9694fd5fc12 100644 --- a/lld/test/ELF/i386-tls-ie-shared.s +++ b/lld/test/ELF/i386-tls-ie-shared.s @@ -14,8 +14,8 @@ // GOTRELSHARED-NEXT: SHF_ALLOC // GOTRELSHARED-NEXT: SHF_WRITE // GOTRELSHARED-NEXT: ] -// GOTRELSHARED-NEXT: Address: 0x2058 -// GOTRELSHARED-NEXT: Offset: 0x2058 +// GOTRELSHARED-NEXT: Address: 0x2060 +// GOTRELSHARED-NEXT: Offset: 0x2060 // GOTRELSHARED-NEXT: Size: 16 // GOTRELSHARED-NEXT: Link: 0 // GOTRELSHARED-NEXT: Info: 0 @@ -32,36 +32,36 @@ // GOTRELSHARED-NEXT: 0x102D R_386_RELATIVE - 0x0 // GOTRELSHARED-NEXT: 0x1036 R_386_RELATIVE - 0x0 // GOTRELSHARED-NEXT: 0x103F R_386_RELATIVE - 0x0 -// GOTRELSHARED-NEXT: 0x2058 R_386_TLS_TPOFF tlslocal0 0x0 -// GOTRELSHARED-NEXT: 0x205C R_386_TLS_TPOFF tlslocal1 0x0 -// GOTRELSHARED-NEXT: 0x2060 R_386_TLS_TPOFF tlsshared0 0x0 -// GOTRELSHARED-NEXT: 0x2064 R_386_TLS_TPOFF tlsshared1 0x0 +// GOTRELSHARED-NEXT: 0x2060 R_386_TLS_TPOFF tlslocal0 0x0 +// GOTRELSHARED-NEXT: 0x2064 R_386_TLS_TPOFF tlslocal1 0x0 +// GOTRELSHARED-NEXT: 0x2068 R_386_TLS_TPOFF tlsshared0 0x0 +// GOTRELSHARED-NEXT: 0x206C R_386_TLS_TPOFF tlsshared1 0x0 // GOTRELSHARED-NEXT: } // GOTRELSHARED-NEXT: ] // GOTRELSHARED: 0x6FFFFFFA RELCOUNT 8 // DISASMSHARED: Disassembly of section test: // DISASMSHARED-NEXT: _start: -// (.got)[0] = 0x2058 = 8280 -// (.got)[1] = 0x205C = 8284 -// (.got)[2] = 0x2060 = 8288 -// (.got)[3] = 0x2064 = 8292 -// DISASMSHARED-NEXT: 1000: 8b 0d 58 20 00 00 movl 8280, %ecx -// DISASMSHARED-NEXT: 1006: 65 8b 01 movl %gs:(%ecx), %eax -// DISASMSHARED-NEXT: 1009: a1 58 20 00 00 movl 8280, %eax -// DISASMSHARED-NEXT: 100e: 65 8b 00 movl %gs:(%eax), %eax -// DISASMSHARED-NEXT: 1011: 03 0d 58 20 00 00 addl 8280, %ecx -// DISASMSHARED-NEXT: 1017: 65 8b 01 movl %gs:(%ecx), %eax -// DISASMSHARED-NEXT: 101a: 8b 0d 5c 20 00 00 movl 8284, %ecx -// DISASMSHARED-NEXT: 1020: 65 8b 01 movl %gs:(%ecx), %eax -// DISASMSHARED-NEXT: 1023: a1 5c 20 00 00 movl 8284, %eax -// DISASMSHARED-NEXT: 1028: 65 8b 00 movl %gs:(%eax), %eax -// DISASMSHARED-NEXT: 102b: 03 0d 5c 20 00 00 addl 8284, %ecx -// DISASMSHARED-NEXT: 1031: 65 8b 01 movl %gs:(%ecx), %eax -// DISASMSHARED-NEXT: 1034: 8b 0d 60 20 00 00 movl 8288, %ecx -// DISASMSHARED-NEXT: 103a: 65 8b 01 movl %gs:(%ecx), %eax -// DISASMSHARED-NEXT: 103d: 03 0d 64 20 00 00 addl 8292, %ecx -// DISASMSHARED-NEXT: 1043: 65 8b 01 movl %gs:(%ecx), %eax +// (.got)[0] = 0x2060 = 8288 +// (.got)[1] = 0x2064 = 8292 +// (.got)[2] = 0x2068 = 8296 +// (.got)[3] = 0x206C = 8300 +// DISASMSHARED-NEXT: 1000: {{.*}} movl 8288, %ecx +// DISASMSHARED-NEXT: 1006: {{.*}} movl %gs:(%ecx), %eax +// DISASMSHARED-NEXT: 1009: {{.*}} movl 8288, %eax +// DISASMSHARED-NEXT: 100e: {{.*}} movl %gs:(%eax), %eax +// DISASMSHARED-NEXT: 1011: {{.*}} addl 8288, %ecx +// DISASMSHARED-NEXT: 1017: {{.*}} movl %gs:(%ecx), %eax +// DISASMSHARED-NEXT: 101a: {{.*}} movl 8292, %ecx +// DISASMSHARED-NEXT: 1020: {{.*}} movl %gs:(%ecx), %eax +// DISASMSHARED-NEXT: 1023: {{.*}} movl 8292, %eax +// DISASMSHARED-NEXT: 1028: {{.*}} movl %gs:(%eax), %eax +// DISASMSHARED-NEXT: 102b: {{.*}} addl 8292, %ecx +// DISASMSHARED-NEXT: 1031: {{.*}} movl %gs:(%ecx), %eax +// DISASMSHARED-NEXT: 1034: {{.*}} movl 8296, %ecx +// DISASMSHARED-NEXT: 103a: {{.*}} movl %gs:(%ecx), %eax +// DISASMSHARED-NEXT: 103d: {{.*}} addl 8300, %ecx +// DISASMSHARED-NEXT: 1043: {{.*}} movl %gs:(%ecx), %eax .type tlslocal0,@object .section .tbss,"awT",@nobits diff --git a/lld/test/ELF/icf10.test b/lld/test/ELF/icf10.test index 96b4caf2f2e5a..20963b2979d86 100644 --- a/lld/test/ELF/icf10.test +++ b/lld/test/ELF/icf10.test @@ -28,7 +28,6 @@ Sections: Info: .text.foo Relocations: - Offset: 0x0000000000000000 - Symbol: '' Type: R_X86_64_NONE - Name: .rela.text.bar Type: SHT_RELA @@ -36,5 +35,4 @@ Sections: Info: .text.bar Relocations: - Offset: 0x0000000000000001 - Symbol: '' Type: R_X86_64_NONE diff --git a/lld/test/ELF/icf11.test b/lld/test/ELF/icf11.test index 8c3aa93568d7f..edda386909ac1 100644 --- a/lld/test/ELF/icf11.test +++ b/lld/test/ELF/icf11.test @@ -33,7 +33,6 @@ Sections: Info: .text.foo Relocations: - Offset: 0x0000000000000000 - Symbol: '' Type: R_X86_64_NONE - Name: .rela.text.bar Type: SHT_RELA diff --git a/lld/test/ELF/invalid/Inputs/section-alignment-notpow2.elf b/lld/test/ELF/invalid/Inputs/section-alignment-notpow2.elf deleted file mode 100644 index 59d4de7e73032..0000000000000 Binary files a/lld/test/ELF/invalid/Inputs/section-alignment-notpow2.elf and /dev/null differ diff --git a/lld/test/ELF/invalid/Inputs/symtab-sh_info.elf b/lld/test/ELF/invalid/Inputs/symtab-sh_info.elf deleted file mode 100644 index aa63d582d757c..0000000000000 Binary files a/lld/test/ELF/invalid/Inputs/symtab-sh_info.elf and /dev/null differ diff --git a/lld/test/ELF/invalid/Inputs/symtab-sh_info2.elf b/lld/test/ELF/invalid/Inputs/symtab-sh_info2.elf deleted file mode 100644 index 4fea12cf20333..0000000000000 Binary files a/lld/test/ELF/invalid/Inputs/symtab-sh_info2.elf and /dev/null differ diff --git a/lld/test/ELF/invalid/Inputs/symtab-sh_info3.elf b/lld/test/ELF/invalid/Inputs/symtab-sh_info3.elf deleted file mode 100644 index ca889fbca1aaa..0000000000000 Binary files a/lld/test/ELF/invalid/Inputs/symtab-sh_info3.elf and /dev/null differ diff --git a/lld/test/ELF/invalid/Inputs/tls-symbol.elf b/lld/test/ELF/invalid/Inputs/tls-symbol.elf deleted file mode 100644 index 78c759897ddcc..0000000000000 Binary files a/lld/test/ELF/invalid/Inputs/tls-symbol.elf and /dev/null differ diff --git a/lld/test/ELF/invalid/Inputs/undefined-local-symbol-in-dso.so b/lld/test/ELF/invalid/Inputs/undefined-local-symbol-in-dso.so deleted file mode 100755 index b88427351197b..0000000000000 Binary files a/lld/test/ELF/invalid/Inputs/undefined-local-symbol-in-dso.so and /dev/null differ diff --git a/lld/test/ELF/invalid/invalid-debug-relocations.test b/lld/test/ELF/invalid/invalid-debug-relocations.test index 9c86b67430933..2940420f8cdc1 100644 --- a/lld/test/ELF/invalid/invalid-debug-relocations.test +++ b/lld/test/ELF/invalid/invalid-debug-relocations.test @@ -2,7 +2,7 @@ # RUN: yaml2obj %s -o %t.o # RUN: not ld.lld -gdb-index %t.o -o %t.exe 2>&1 | FileCheck %s -# CHECK: error: {{.*}}invalid-debug-relocations.test.tmp.o:(.debug_info+0x0): has non-ABS relocation Unknown (255) against symbol '_start' +# CHECK: error: {{.*}}invalid-debug-relocations.test.tmp.o:(.debug_info+0x0): unknown relocation (255) against symbol _start !ELF FileHeader: diff --git a/lld/test/ELF/invalid/invalid-elf.test b/lld/test/ELF/invalid/invalid-elf.test index 80c8f41eb61d7..722569f04985f 100644 --- a/lld/test/ELF/invalid/invalid-elf.test +++ b/lld/test/ELF/invalid/invalid-elf.test @@ -9,10 +9,6 @@ # RUN: FileCheck --check-prefix=INVALID-FILE-CLASS %s # INVALID-FILE-CLASS: test.o: invalid file class -# RUN: not ld.lld %p/Inputs/symtab-sh_info.elf -o %t2 2>&1 | \ -# RUN: FileCheck --check-prefix=INVALID-SYMTAB-SHINFO %s -# INVALID-SYMTAB-SHINFO: invalid sh_info in symbol table - # RUN: not ld.lld %p/Inputs/binding.elf -o %t2 2>&1 | \ # RUN: FileCheck --check-prefix=INVALID-BINDING %s # INVALID-BINDING: unexpected binding diff --git a/lld/test/ELF/invalid/invalid-relocation-x64.test b/lld/test/ELF/invalid/invalid-relocation-x64.test index a9b3164156975..3a8d610497148 100644 --- a/lld/test/ELF/invalid/invalid-relocation-x64.test +++ b/lld/test/ELF/invalid/invalid-relocation-x64.test @@ -3,8 +3,8 @@ # RUN: echo ".global foo; foo:" > %t2.s # RUN: llvm-mc %t2.s -o %t2.o -filetype=obj -triple x86_64-pc-linux # RUN: not ld.lld %t1.o %t2.o -o /dev/null 2>&1 | FileCheck %s -# CHECK: error: unrecognized reloc 152 -# CHECK: error: unrecognized reloc 153 +# CHECK: error: unknown relocation (152) against symbol foo +# CHECK: error: unknown relocation (153) against symbol foo !ELF FileHeader: diff --git a/lld/test/ELF/invalid/invalid-soname.test b/lld/test/ELF/invalid/invalid-soname.test index 8641465acd505..bf4b33c87d06b 100644 --- a/lld/test/ELF/invalid/invalid-soname.test +++ b/lld/test/ELF/invalid/invalid-soname.test @@ -14,5 +14,8 @@ Sections: - Name: .test Type: SHT_DYNAMIC Flags: [ SHF_ALLOC ] - Content: "0e000000000000000000000000000001" Link: .strtab + EntSize: 0x0000000000000010 + Entries: + - Tag: DT_SONAME + Value: 0x0100000000000000 diff --git a/lld/test/ELF/invalid/reloc-section-reordered.test b/lld/test/ELF/invalid/reloc-section-reordered.test index 7ff4ed6e8adec..3de567f467fa3 100644 --- a/lld/test/ELF/invalid/reloc-section-reordered.test +++ b/lld/test/ELF/invalid/reloc-section-reordered.test @@ -28,3 +28,8 @@ Sections: Flags: [ SHF_ALLOC, SHF_EXECINSTR ] AddressAlign: 0x04 Content: "FFFFFFFFFFFFFFFF" +Symbols: + Local: + - Name: .text + Type: STT_SECTION + Section: .text diff --git a/lld/test/ELF/invalid/section-alignment2.s b/lld/test/ELF/invalid/section-alignment2.s index 879ba8c03c144..df997d2f5f7e2 100644 --- a/lld/test/ELF/invalid/section-alignment2.s +++ b/lld/test/ELF/invalid/section-alignment2.s @@ -1,5 +1,16 @@ -## section-alignment-notpow2.elf has section alignment -## 0xFFFFFFFF which is not a power of 2. -# RUN: not ld.lld %p/Inputs/section-alignment-notpow2.elf -o /dev/null 2>&1 | \ -# RUN: FileCheck %s -# CHECK: section sh_addralign is not a power of 2 +# RUN: yaml2obj %s -o %t.o +# RUN: not ld.lld %t.o -o %tout 2>&1 | FileCheck %s + +# CHECK: error: {{.*}}.o:(.text): sh_addralign is not a power of 2 + +!ELF +FileHeader: + Class: ELFCLASS64 + Data: ELFDATA2LSB + Type: ET_REL + Machine: EM_X86_64 +Sections: + - Name: .text + Type: SHT_PROGBITS + Flags: [ SHF_ALLOC, SHF_EXECINSTR ] + AddressAlign: 0x3 diff --git a/lld/test/ELF/invalid/symtab-sh-info.s b/lld/test/ELF/invalid/symtab-sh-info.s index 3522ae550c08a..dc99c71276526 100644 --- a/lld/test/ELF/invalid/symtab-sh-info.s +++ b/lld/test/ELF/invalid/symtab-sh-info.s @@ -1,9 +1,59 @@ -## sh_info contains zero value. First entry in a symbol table is always completely zeroed, -## so sh_info should be at least 1 in a valid ELF. -# RUN: not ld.lld %p/Inputs/symtab-sh_info2.elf -o %t2 2>&1 | FileCheck %s -# CHECK: invalid sh_info in symbol table - -## sh_info contains invalid value saying non-local symbol is local. -# RUN: not ld.lld %p/Inputs/symtab-sh_info3.elf -o %t2 2>&1 | \ -# RUN: FileCheck --check-prefix=INVALID-SYMTAB-SHINFO %s -# INVALID-SYMTAB-SHINFO: broken object: getLocalSymbols returns a non-local symbol +## .symtab's sh_info contains zero value. First entry in a .symtab is a +## zero entry that must exist in a valid object, so sh_info can't be null. +## Check we report a proper error for that case. +# RUN: yaml2obj -docnum=1 %s -o %t.o +# RUN: not ld.lld %t.o -o %t2 2>&1 | FileCheck %s --check-prefix=ERR1 +# ERR1: invalid sh_info in symbol table + +--- !ELF +FileHeader: + Class: ELFCLASS64 + Data: ELFDATA2LSB + Type: ET_REL + Machine: EM_X86_64 +Sections: + - Name: .symtab + Info: 0 + Type: SHT_SYMTAB +Symbols: + Global: + - Name: foo + +## sh_info has value 2 what says that non-local symbol `foo` is local. +## Check we report this case. +# RUN: yaml2obj -docnum=2 %s -o %t.o +# RUN: not ld.lld %t.o -o %t2 2>&1 | FileCheck --check-prefix=ERR2 %s +# ERR2: broken object: getLocalSymbols returns a non-local symbol + +--- !ELF +FileHeader: + Class: ELFCLASS64 + Data: ELFDATA2LSB + Type: ET_REL + Machine: EM_X86_64 +Sections: + - Name: .symtab + Info: 2 + Type: SHT_SYMTAB +Symbols: + Global: + - Name: foo + +## sh_info has value 0xff what is larger than number of symbols in a .symtab. +## Check we report this case. +# RUN: yaml2obj -docnum=3 %s -o %t.o +# RUN: not ld.lld %t.o -o %t2 2>&1 | FileCheck --check-prefix=ERR1 %s + +--- !ELF +FileHeader: + Class: ELFCLASS64 + Data: ELFDATA2LSB + Type: ET_REL + Machine: EM_X86_64 +Sections: + - Name: .symtab + Info: 0xff + Type: SHT_SYMTAB +Symbols: + Global: + - Name: foo diff --git a/lld/test/ELF/invalid/tls-symbol.s b/lld/test/ELF/invalid/tls-symbol.s index 99c47dc13023a..d036859cee693 100644 --- a/lld/test/ELF/invalid/tls-symbol.s +++ b/lld/test/ELF/invalid/tls-symbol.s @@ -1,5 +1,24 @@ -# REQUIRES: x86 - ## The test file contains an STT_TLS symbol but has no TLS section. -# RUN: not ld.lld %S/Inputs/tls-symbol.elf -o /dev/null 2>&1 | FileCheck %s +## Check we report an error properly. + +# RUN: yaml2obj %s -o %t.o +# RUN: not ld.lld %t.o -o /dev/null 2>&1 | FileCheck %s + # CHECK: has an STT_TLS symbol but doesn't have an SHF_TLS section + +--- !ELF +FileHeader: + Class: ELFCLASS64 + Data: ELFDATA2LSB + Type: ET_REL + Machine: EM_X86_64 +Sections: + - Name: .text + Type: SHT_PROGBITS + Flags: [ SHF_ALLOC, SHF_EXECINSTR ] + Content: '' +Symbols: + Global: + - Name: bar + Type: STT_TLS + Section: .text diff --git a/lld/test/ELF/invalid/undefined-local-symbol-in-dso.test b/lld/test/ELF/invalid/undefined-local-symbol-in-dso.test index a9c30f30db6f3..dae19542a6ef1 100644 --- a/lld/test/ELF/invalid/undefined-local-symbol-in-dso.test +++ b/lld/test/ELF/invalid/undefined-local-symbol-in-dso.test @@ -8,59 +8,20 @@ # STB_LOCAL is a nonsensical combination. Nevertheless, we should warn on such # input files instead of crashing. -# We've found actual broken DSOs of this sort in the wild, but for this test, we -# created a reduced broken input file. There are no tools capable of producing a -# broken DSO of this nature, so instead we created a valid DSO with an undefined -# global symbol in the dynamic symbol table and then manually edited the binary -# to make that symbol local. The valid DSO was created as follows: - -``` -% cat undef.s -.hidden bar -bar: - movq foo@GOT, %rax - -% llvm-mc -triple=x86_64-linux-gnu -filetype=obj -o undef.o undef.s -% ld.lld --no-rosegment -shared -o undefined-local-symbol-in-dso.so undef.o -% strip undef.so -``` - -# (--no-rosegment and stripping are unnecessary; they just produce a smaller -# binary) - -# This DSO should only have a single dynamic symbol table entry for foo, and -# then we can use a small C program to modify that symbol table entry to be -# STB_LOCAL instead of STB_GLOBAL. - -``` -#include -#include - -int main(int argc, char *argv[]) { - FILE *F = fopen(argv[1], "rb+"); - - Elf64_Ehdr Ehdr; - fread(&Ehdr, sizeof(Ehdr), 1, F); - fseek(F, Ehdr.e_shoff, SEEK_SET); - - Elf64_Shdr Shdr; - do { - fread(&Shdr, sizeof(Shdr), 1, F); - } while (Shdr.sh_type != SHT_DYNSYM); - - Elf64_Sym Sym; - fseek(F, Shdr.sh_offset + sizeof(Elf64_Sym), SEEK_SET); - fread(&Sym, sizeof(Sym), 1, F); - Sym.st_info = STB_LOCAL << 4 | ELF64_ST_TYPE(Sym.st_info); - fseek(F, Shdr.sh_offset + sizeof(Elf64_Sym), SEEK_SET); - fwrite(&Sym, sizeof(Sym), 1, F); - fclose(F); -} -``` - -# (the C program just takes its input DSO and modifies the binding of the first -# dynamic symbol table entry to be STB_LOCAL instead of STB_GLOBAL) - -# RUN: ld.lld %p/Inputs/undefined-local-symbol-in-dso.so -o %t 2>&1 | \ -# RUN: FileCheck -check-prefix=WARN %s -# WARN: found local symbol 'foo' in global part of symbol table in file {{.*}}undefined-local-symbol-in-dso.so +# RUN: yaml2obj %s -o %t.so +# RUN: ld.lld %t.so -o %t 2>&1 | FileCheck -check-prefix=WARN %s +# WARN: found local symbol 'foo' in global part of symbol table in file {{.*}}.so + +--- !ELF +FileHeader: + Class: ELFCLASS64 + Data: ELFDATA2LSB + Type: ET_DYN + Machine: EM_X86_64 +Sections: + - Name: .dynsym + Info: 1 + Type: SHT_SYMTAB +DynamicSymbols: + Local: + - Name: foo diff --git a/lld/test/ELF/invalid/verdef-no-symtab.test b/lld/test/ELF/invalid/verdef-no-symtab.test index 5b5c32e4ff5c3..536515dbab666 100644 --- a/lld/test/ELF/invalid/verdef-no-symtab.test +++ b/lld/test/ELF/invalid/verdef-no-symtab.test @@ -14,13 +14,6 @@ Sections: Type: SHT_GNU_versym Flags: [ SHF_ALLOC, SHF_EXECINSTR ] AddressAlign: 0x1 - Content: "00000000" - - - Name: .verdef - Type: SHT_GNU_verdef - Flags: [ SHF_ALLOC, SHF_EXECINSTR ] - AddressAlign: 0x1 - Content: "00000000" - + Entries: [ 0 ] # CHECK: SHT_GNU_versym should be associated with symbol table diff --git a/lld/test/ELF/linkerscript/eh-frame-merge.s b/lld/test/ELF/linkerscript/eh-frame-merge.s new file mode 100644 index 0000000000000..92175dba324e6 --- /dev/null +++ b/lld/test/ELF/linkerscript/eh-frame-merge.s @@ -0,0 +1,20 @@ +# REQUIRES: x86 +# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o +# RUN: echo "SECTIONS { .eh_frame_hdr : { *(.eh_frame_hdr) *(.eh_frame) } }" > %t.script +# RUN: ld.lld -o %t --no-threads --eh-frame-hdr --script %t.script %t.o +# RUN: llvm-readobj -s -u %t | FileCheck %s + +# CHECK: Name: .dah +# CHECK-NOT: Section +# CHECK: Address: 0x4D + +# CHECK: initial_location: 0x4d + +.global _start +_start: + nop + +.section .dah,"ax",@progbits +.cfi_startproc + nop +.cfi_endproc diff --git a/lld/test/ELF/linkerscript/linkerscript.s b/lld/test/ELF/linkerscript/linkerscript.s index 39d2d4620a4f2..5e1cf27f0762c 100644 --- a/lld/test/ELF/linkerscript/linkerscript.s +++ b/lld/test/ELF/linkerscript/linkerscript.s @@ -3,7 +3,7 @@ # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux \ # RUN: %p/Inputs/libsearch-st.s -o %t2.o -# RUN: echo "EXTERN( undef undef2 )" > %t.script +# RUN: echo "EXTERN( undef undef2 \"undef3\" \"undef4@@other\")" > %t.script # RUN: ld.lld %t -o %t2 %t.script # RUN: llvm-readobj %t2 > /dev/null diff --git a/lld/test/ELF/linkerscript/output-too-large-32bit.s b/lld/test/ELF/linkerscript/output-too-large-32bit.s new file mode 100644 index 0000000000000..a6224c4077a2b --- /dev/null +++ b/lld/test/ELF/linkerscript/output-too-large-32bit.s @@ -0,0 +1,11 @@ +# REQUIRES: x86 && !llvm-64-bits + +# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o +# RUN: echo "SECTIONS { .text : { . = 0x6fffffffffffffff; *(.text*); } }" > %t.script +# RUN: not ld.lld --no-check-sections --script %t.script %t.o -o /dev/null 2>&1 | FileCheck %s + +# CHECK: output file too large + +.global _start +_start: + nop diff --git a/lld/test/ELF/linkerscript/segment-none.s b/lld/test/ELF/linkerscript/segment-none.s index 36d09e7764780..85739747ac9c5 100644 --- a/lld/test/ELF/linkerscript/segment-none.s +++ b/lld/test/ELF/linkerscript/segment-none.s @@ -23,7 +23,7 @@ # CHECK: Section to Segment mapping: # CHECK-NEXT: Segment Sections... -# CHECK-NOT: .foo +# CHECK: None {{.*}}.foo # DEFINED: Section to Segment mapping: # DEFINED-NEXT: Segment Sections... diff --git a/lld/test/ELF/lto/Inputs/obj-path.ll b/lld/test/ELF/lto/Inputs/obj-path.ll new file mode 100644 index 0000000000000..31c72ec4653a6 --- /dev/null +++ b/lld/test/ELF/lto/Inputs/obj-path.ll @@ -0,0 +1,7 @@ +target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" +target triple = "x86_64-unknown-linux-gnu" + +define void @g() { +entry: + ret void +} diff --git a/lld/test/ELF/lto/obj-path.ll b/lld/test/ELF/lto/obj-path.ll new file mode 100644 index 0000000000000..0e594ab754c8f --- /dev/null +++ b/lld/test/ELF/lto/obj-path.ll @@ -0,0 +1,35 @@ +; REQUIRES: x86 + +; RUN: opt -module-summary %s -o %t1.o +; RUN: opt -module-summary %p/Inputs/obj-path.ll -o %t2.o + +; Test to ensure that obj-path creates the ELF file. +; RUN: rm -f %t4.o +; RUN: ld.lld --plugin-opt=obj-path=%t4.o -shared %t1.o %t2.o -o %t3 +; RUN: llvm-readobj -t %t3 | FileCheck %s +; RUN: llvm-readobj -h %t4.o1 | FileCheck %s -check-prefix=ELF1 +; RUN: llvm-readobj -h %t4.o2 | FileCheck %s -check-prefix=ELF2 +; RUN: llvm-nm %t4.o1 2>&1 | FileCheck %s -check-prefix=NM1 +; RUN: llvm-nm %t4.o2 2>&1 | FileCheck %s -check-prefix=NM2 + +; CHECK: Name: g +; CHECK-NEXT: Value: 0x1010 +; CHECK: Name: f +; CHECK-NEXT: Value: 0x1000 + +; NM1: T f +; ELF1: Format: ELF64-x86-64 + +; NM2: T g +; ELF2: Format: ELF64-x86-64 + +target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" +target triple = "x86_64-unknown-linux-gnu" + +declare void @g(...) + +define void @f() { +entry: + call void (...) @g() + ret void +} diff --git a/lld/test/ELF/lto/thinlto-cant-write-index.ll b/lld/test/ELF/lto/thinlto-cant-write-index.ll index 94f2a45c2743f..784fbafd2a487 100644 --- a/lld/test/ELF/lto/thinlto-cant-write-index.ll +++ b/lld/test/ELF/lto/thinlto-cant-write-index.ll @@ -7,8 +7,9 @@ ; Ensure lld generates error if unable to write to index files ; RUN: rm -f %t2.o.thinlto.bc ; RUN: touch %t2.o.thinlto.bc -; RUN: chmod 400 %t2.o.thinlto.bc +; RUN: chmod u-w %t2.o.thinlto.bc ; RUN: not ld.lld --plugin-opt=thinlto-index-only -shared %t1.o %t2.o -o %t3 2>&1 | FileCheck %s +; RUN: chmod u+w %t2.o.thinlto.bc ; CHECK: cannot open {{.*}}2.o.thinlto.bc: {{P|p}}ermission denied target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" diff --git a/lld/test/ELF/mips-got-relocs.s b/lld/test/ELF/mips-got-relocs.s index 0465b08b9ed48..ef5b11f076312 100644 --- a/lld/test/ELF/mips-got-relocs.s +++ b/lld/test/ELF/mips-got-relocs.s @@ -3,33 +3,25 @@ # RUN: llvm-mc -filetype=obj -triple=mips-unknown-linux %s -o %t-be.o # RUN: ld.lld %t-be.o -o %t-be.exe -# RUN: llvm-objdump -section-headers -t %t-be.exe | FileCheck -check-prefix=EXE_SYM %s -# RUN: llvm-objdump -s -section=.got %t-be.exe | FileCheck -check-prefix=EXE_GOT_BE %s -# RUN: llvm-objdump -d %t-be.exe | FileCheck -check-prefix=EXE_DIS_BE %s -# RUN: llvm-readobj -relocations %t-be.exe | FileCheck -check-prefix=NORELOC %s -# RUN: llvm-readobj -sections %t-be.exe | FileCheck -check-prefix=SHFLAGS %s +# RUN: llvm-readobj -sections -relocations -symbols -mips-plt-got %t-be.exe \ +# RUN: | FileCheck -check-prefixes=ELF,EXE %s +# RUN: llvm-objdump -d %t-be.exe | FileCheck -check-prefix=DIS %s # RUN: llvm-mc -filetype=obj -triple=mipsel-unknown-linux %s -o %t-el.o # RUN: ld.lld %t-el.o -o %t-el.exe -# RUN: llvm-objdump -section-headers -t %t-el.exe | FileCheck -check-prefix=EXE_SYM %s -# RUN: llvm-objdump -s -section=.got %t-el.exe | FileCheck -check-prefix=EXE_GOT_EL %s -# RUN: llvm-objdump -d %t-el.exe | FileCheck -check-prefix=EXE_DIS_EL %s -# RUN: llvm-readobj -relocations %t-el.exe | FileCheck -check-prefix=NORELOC %s -# RUN: llvm-readobj -sections %t-el.exe | FileCheck -check-prefix=SHFLAGS %s +# RUN: llvm-readobj -sections -relocations -symbols -mips-plt-got %t-el.exe \ +# RUN: | FileCheck -check-prefixes=ELF,EXE %s +# RUN: llvm-objdump -d %t-el.exe | FileCheck -check-prefix=DIS %s # RUN: ld.lld -shared %t-be.o -o %t-be.so -# RUN: llvm-objdump -section-headers -t %t-be.so | FileCheck -check-prefix=DSO_SYM %s -# RUN: llvm-objdump -s -section=.got %t-be.so | FileCheck -check-prefix=DSO_GOT_BE %s -# RUN: llvm-objdump -d %t-be.so | FileCheck -check-prefix=DSO_DIS_BE %s -# RUN: llvm-readobj -relocations %t-be.so | FileCheck -check-prefix=NORELOC %s -# RUN: llvm-readobj -sections %t-be.so | FileCheck -check-prefix=SHFLAGS %s +# RUN: llvm-readobj -sections -relocations -symbols -mips-plt-got %t-be.so \ +# RUN: | FileCheck -check-prefixes=ELF,DSO %s +# RUN: llvm-objdump -d %t-be.so | FileCheck -check-prefix=DIS %s # RUN: ld.lld -shared %t-el.o -o %t-el.so -# RUN: llvm-objdump -section-headers -t %t-el.so | FileCheck -check-prefix=DSO_SYM %s -# RUN: llvm-objdump -s -section=.got %t-el.so | FileCheck -check-prefix=DSO_GOT_EL %s -# RUN: llvm-objdump -d %t-el.so | FileCheck -check-prefix=DSO_DIS_EL %s -# RUN: llvm-readobj -relocations %t-el.so | FileCheck -check-prefix=NORELOC %s -# RUN: llvm-readobj -sections %t-el.so | FileCheck -check-prefix=SHFLAGS %s +# RUN: llvm-readobj -sections -relocations -symbols -mips-plt-got %t-el.so \ +# RUN: | FileCheck -check-prefixes=ELF,DSO %s +# RUN: llvm-objdump -d %t-el.so | FileCheck -check-prefix=DIS %s .text .globl __start @@ -43,57 +35,32 @@ __start: v1: .word 0 -# EXE_SYM: Sections: -# EXE_SYM: .got 0000000c 0000000000030010 DATA -# EXE_SYM: SYMBOL TABLE: -# EXE_SYM: 00038000 .got 00000000 .hidden _gp -# ^-- .got + GP offset (0x7ff0) -# EXE_SYM: 00030000 g O .data 00000004 v1 - - -# EXE_GOT_BE: Contents of section .got: -# EXE_GOT_BE: 30010 00000000 80000000 00030000 -# ^ ^ ^-- v1 (0x30000) -# | +-- Module pointer (0x80000000) -# +-- Lazy resolver (0x0) - -# EXE_GOT_EL: Contents of section .got: -# EXE_GOT_EL: 30010 00000000 00000080 00000300 -# ^ ^ ^-- v1 (0x30000) -# | +-- Module pointer (0x80000000) -# +-- Lazy resolver (0x0) - -# v1GotAddr (0x3000c) - _gp (0x37ff4) = -0x7fe8 => 0x8018 = 32792 -# EXE_DIS_BE: 20000: 3c 02 80 18 lui $2, 32792 -# EXE_DIS_EL: 20000: 18 80 02 3c lui $2, 32792 - -# DSO_SYM: Sections: -# DSO_SYM: .got 0000000c 0000000000020010 DATA -# DSO_SYM: SYMBOL TABLE: -# DSO_SYM: 00028000 .got 00000000 .hidden _gp -# ^-- .got + GP offset (0x7ff0) -# DSO_SYM: 00020000 g O .data 00000004 v1 - -# DSO_GOT_BE: Contents of section .got: -# DSO_GOT_BE: 20010 00000000 80000000 00020000 -# ^ ^ ^-- v1 (0x20000) -# | +-- Module pointer (0x80000000) -# +-- Lazy resolver (0x0) - -# DSO_GOT_EL: Contents of section .got: -# DSO_GOT_EL: 20010 00000000 00000080 00000200 -# ^ ^ ^-- v1 (0x20000) -# | +-- Module pointer (0x80000000) -# +-- Lazy resolver (0x0) - -# v1GotAddr (0x2000c) - _gp (0x27ff4) = -0x7fe8 => 0x8018 = 32792 -# DSO_DIS_BE: 10000: 3c 02 80 18 lui $2, 32792 -# DSO_DIS_EL: 10000: 18 80 02 3c lui $2, 32792 - -# NORELOC: Relocations [ -# NORELOC-NEXT: ] - -# SHFLAGS: Name: .got -# SHFLAGS-NEXT: Type: SHT_PROGBITS -# SHFLAGS-NEXT: Flags [ (0x10000003) -# ^-- SHF_MIPS_GPREL | SHF_ALLOC | SHF_WRITE +# ELF: Section { +# ELF: Name: .got +# ELF: Flags [ +# ELF-NEXT: SHF_ALLOC +# ELF-NEXT: SHF_MIPS_GPREL +# ELF-NEXT: SHF_WRITE +# ELF-NEXT: ] +# +# ELF: Relocations [ +# ELF-NEXT: ] +# +# ELF: Symbol { +# ELF: Name: v1 +# ELF-NEXT: Value: 0x[[V1:[0-9A-F]+]] +# +# ELF: {{.*}} GOT { +# EXE-NEXT: Canonical gp value: 0x38000 +# DSO-NEXT: Canonical gp value: 0x28000 +# +# ELF: Entry { +# EXE: Address: 0x30018 +# DSO: Address: 0x20018 +# ELF-NEXT: Access: -32744 +# ELF-NEXT: Initial: 0x[[V1]] + +# "v1 GOT entry address" - _gp +# exe: 0x30018 - 0x38000 = -0x7fe8 == 0x8018 == 32792 +# dso: 0x20018 - 0x28000 = -0x7fe8 == 0x8018 == 32792 +# DIS: {{.*}} lui $2, 32792 diff --git a/lld/test/ELF/mips-got-string.s b/lld/test/ELF/mips-got-string.s index cfdd0daf68dd0..5c8d750164186 100644 --- a/lld/test/ELF/mips-got-string.s +++ b/lld/test/ELF/mips-got-string.s @@ -7,7 +7,7 @@ # CHECK: Symbol { # CHECK: Name: $.str -# CHECK-NEXT: Value: 0x1B1 +# CHECK-NEXT: Value: 0x1F1 # CHECK: } # CHECK: Local entries [ diff --git a/lld/test/ELF/mips-micro-bad-cross-calls.s b/lld/test/ELF/mips-micro-bad-cross-calls.s new file mode 100644 index 0000000000000..63f7e407ed806 --- /dev/null +++ b/lld/test/ELF/mips-micro-bad-cross-calls.s @@ -0,0 +1,15 @@ +# REQUIRES: mips +# Check error message for invalid cross-mode branch instructions. + +# RUN: llvm-mc -filetype=obj -triple=mips-unknown-linux \ +# RUN: %S/Inputs/mips-dynamic.s -o %t2.o +# RUN: llvm-mc -filetype=obj -triple=mips-unknown-linux %s -o %t1.o +# RUN: not ld.lld -o %t.exe %t1.o %t2.o 2>&1 | FileCheck %s + +# CHECK: (.text+0x0): unsupported jump/branch instruction between ISA modes referenced by R_MICROMIPS_PC10_S1 relocation + + .text + .set micromips + .global __start +__start: + b16 foo0 diff --git a/lld/test/ELF/mips-micro-cross-calls.s b/lld/test/ELF/mips-micro-cross-calls.s new file mode 100644 index 0000000000000..fc9dd0aeb8e4a --- /dev/null +++ b/lld/test/ELF/mips-micro-cross-calls.s @@ -0,0 +1,44 @@ +# REQUIRES: mips +# Check various cases of microMIPS - regular code cross-calls. + +# RUN: llvm-mc -filetype=obj -triple=mips-unknown-linux \ +# RUN: -mattr=micromips %s -o %t-eb.o +# RUN: llvm-mc -filetype=obj -triple=mips-unknown-linux \ +# RUN: -position-independent -mattr=micromips \ +# RUN: %S/Inputs/mips-micro.s -o %t-eb-pic.o +# RUN: ld.lld -o %t-eb.exe %t-eb.o %t-eb-pic.o +# RUN: llvm-objdump -d -mattr=-micromips %t-eb.exe \ +# RUN: | FileCheck --check-prefix=REG %s +# RUN: llvm-objdump -d -mattr=+micromips %t-eb.exe \ +# RUN: | FileCheck --check-prefix=MICRO %s + +# REG: __start: +# REG-NEXT: 20000: 74 00 80 04 jalx 131088 +# REG-NEXT: 20004: 00 00 00 00 nop +# REG-NEXT: 20008: 74 00 80 08 jalx 131104 <__microLA25Thunk_foo> + +# REG: __LA25Thunk_bar: +# REG-NEXT: 20030: 3c 19 00 02 lui $25, 2 +# REG-NEXT: 20034: 08 00 80 11 j 131140 + +# MICRO: micro: +# MICRO-NEXT: 20010: f0 00 80 00 jalx 65536 +# MICRO-NEXT: 20014: 00 00 00 00 nop +# MICRO-NEXT: 20018: f0 00 80 0c jalx 65560 + +# MICRO: __microLA25Thunk_foo: +# MICRO-NEXT: 20020: 41 b9 00 02 lui $25, 2 +# MICRO-NEXT: 20024: d4 01 00 20 j 131136 + + .text + .set nomicromips + .global __start +__start: + jal micro + jal foo + + .set micromips + .global micro +micro: + jal __start + jal bar diff --git a/lld/test/ELF/mips-micro-plt.s b/lld/test/ELF/mips-micro-plt.s index 24e90ae49a863..63f50fc74e0f1 100644 --- a/lld/test/ELF/mips-micro-plt.s +++ b/lld/test/ELF/mips-micro-plt.s @@ -87,9 +87,9 @@ # ASM: __start: # ASM-NEXT: 20000: fd 1c 80 18 lw $8, -32744($gp) -# ASM-NEXT: 20004: 11 08 00 10 addi $8, $8, 16 +# ASM-NEXT: 20004: 11 08 00 11 addi $8, $8, 17 # ASM-NEXT: 20008: 41 a8 00 02 lui $8, 2 -# ASM-NEXT: 2000c: 11 08 00 40 addi $8, $8, 64 +# ASM-NEXT: 2000c: 11 08 00 41 addi $8, $8, 65 # # ASM: foo: # ASM-NEXT: 20010: f4 01 00 20 jal 131136 diff --git a/lld/test/ELF/mips-micro-relocs.s b/lld/test/ELF/mips-micro-relocs.s index b539aa9467634..c6850fcca96ab 100644 --- a/lld/test/ELF/mips-micro-relocs.s +++ b/lld/test/ELF/mips-micro-relocs.s @@ -6,20 +6,22 @@ # RUN: llvm-mc -filetype=obj -triple=mips-unknown-linux \ # RUN: -mattr=micromips %s -o %t2eb.o # RUN: ld.lld -o %teb.exe %t1eb.o %t2eb.o -# RUN: llvm-objdump -d -t -mattr=micromips %teb.exe \ +# RUN: llvm-objdump -d -t -s -mattr=micromips %teb.exe \ # RUN: | FileCheck --check-prefixes=EB,SYM %s +# RUN: llvm-readobj -h %teb.exe | FileCheck --check-prefix=ELF %s # RUN: llvm-mc -filetype=obj -triple=mipsel-unknown-linux \ # RUN: -mattr=micromips %S/Inputs/mips-micro.s -o %t1el.o # RUN: llvm-mc -filetype=obj -triple=mipsel-unknown-linux \ # RUN: -mattr=micromips %s -o %t2el.o # RUN: ld.lld -o %tel.exe %t1el.o %t2el.o -# RUN: llvm-objdump -d -t -mattr=micromips %tel.exe \ +# RUN: llvm-objdump -d -t -s -mattr=micromips %tel.exe \ # RUN: | FileCheck --check-prefixes=EL,SYM %s +# RUN: llvm-readobj -h %tel.exe | FileCheck --check-prefix=ELF %s # EB: __start: # EB-NEXT: 20010: 41 a3 00 01 lui $3, 1 -# EB-NEXT: 20014: 30 63 7f df addiu $3, $3, 32735 +# EB-NEXT: 20014: 30 63 7f ef addiu $3, $3, 32751 # EB-NEXT: 20018: fc 7c 80 18 lw $3, -32744($gp) # EB-NEXT: 2001c: fc 63 80 18 lw $3, -32744($3) # EB-NEXT: 20020: 8f 70 beqz16 $6, -32 @@ -28,9 +30,15 @@ # EB-NEXT: 20028: 00 00 00 00 nop # EB-NEXT: 2002c: 94 00 ff e8 b -44 +# EB: Contents of section .data: +# EB-NEXT: 30000 fffe8011 + +# EB: Contents of section .debug_info +# EB-NEXT: 0000 00020011 + # EL: __start: # EL-NEXT: 20010: a3 41 01 00 lui $3, 1 -# EL-NEXT: 20014: 63 30 df 7f addiu $3, $3, 32735 +# EL-NEXT: 20014: 63 30 ef 7f addiu $3, $3, 32751 # EL-NEXT: 20018: 7c fc 18 80 lw $3, -32744($gp) # EL-NEXT: 2001c: 63 fc 18 80 lw $3, -32744($3) # EL-NEXT: 20020: 70 8f beqz16 $6, -32 @@ -39,10 +47,19 @@ # EL-NEXT: 20028: 00 00 00 00 nop # EL-NEXT: 2002c: 00 94 e8 ff b -44 -# SYM: 00037ff0 .got 00000000 .hidden _gp +# EL: Contents of section .data: +# EL-NEXT: 30000 1180feff + +# EL: Contents of section .debug_info +# EL-NEXT: 0000 11000200 + +# SYM: 00038000 .got 00000000 .hidden _gp # SYM: 00020000 g F .text 00000000 foo # SYM: 00020010 .text 00000000 __start +# ELF: ElfHeader { +# ELF: Entry: 0x20011 + .text .set micromips .global __start @@ -56,3 +73,9 @@ __start: beqz16 $6, foo # R_MICROMIPS_PC7_S1 b16 foo # R_MICROMIPS_PC10_S1 b foo # R_MICROMIPS_PC16_S1 + + .data + .gpword __start # R_MIPS_GPREL32 + + .section .debug_info + .word __start # R_MIPS_32 diff --git a/lld/test/ELF/mips-npic-call-pic.s b/lld/test/ELF/mips-npic-call-pic.s index 5921c9f510fcc..1627d94c60313 100644 --- a/lld/test/ELF/mips-npic-call-pic.s +++ b/lld/test/ELF/mips-npic-call-pic.s @@ -2,16 +2,29 @@ # Check LA25 stubs creation. This stub code is necessary when # non-PIC code calls PIC function. -# RUN: llvm-mc -filetype=obj -triple=mips-unknown-linux \ +# RUN: llvm-mc -filetype=obj -triple=mips-unknown-linux -mcpu=mips32r2 \ # RUN: %p/Inputs/mips-fpic.s -o %t-fpic.o -# RUN: llvm-mc -filetype=obj -triple=mips-unknown-linux \ +# RUN: llvm-mc -filetype=obj -triple=mips-unknown-linux -mcpu=mips32r2 \ # RUN: %p/Inputs/mips-fnpic.s -o %t-fnpic.o -# RUN: ld.lld -r %t-fpic.o %t-fnpic.o -o %t-sto-pic.o -# RUN: llvm-mc -filetype=obj -triple=mips-unknown-linux \ -# RUN: %p/Inputs/mips-pic.s -o %t-pic.o -# RUN: llvm-mc -filetype=obj -triple=mips-unknown-linux %s -o %t-npic.o -# RUN: ld.lld %t-npic.o %t-pic.o %t-sto-pic.o -o %t.exe -# RUN: llvm-objdump -d %t.exe | FileCheck %s +# RUN: ld.lld -r %t-fpic.o %t-fnpic.o -o %t-sto-pic-r2.o +# RUN: llvm-mc -filetype=obj -triple=mips-unknown-linux -mcpu=mips32r2 \ +# RUN: %p/Inputs/mips-pic.s -o %t-pic-r2.o +# RUN: llvm-mc -filetype=obj -triple=mips-unknown-linux -mcpu=mips32r2 \ +# RUN: %s -o %t-npic-r2.o +# RUN: ld.lld %t-npic-r2.o %t-pic-r2.o %t-sto-pic-r2.o -o %t-r2.exe +# RUN: llvm-objdump -d %t-r2.exe | FileCheck --check-prefixes=CHECK,R2 %s + +# RUN: llvm-mc -filetype=obj -triple=mips-unknown-linux -mcpu=mips32r6 \ +# RUN: %p/Inputs/mips-fpic.s -o %t-fpic.o +# RUN: llvm-mc -filetype=obj -triple=mips-unknown-linux -mcpu=mips32r6 \ +# RUN: %p/Inputs/mips-fnpic.s -o %t-fnpic.o +# RUN: ld.lld -r %t-fpic.o %t-fnpic.o -o %t-sto-pic-r6.o +# RUN: llvm-mc -filetype=obj -triple=mips-unknown-linux -mcpu=mips32r6 \ +# RUN: %p/Inputs/mips-pic.s -o %t-pic-r6.o +# RUN: llvm-mc -filetype=obj -triple=mips-unknown-linux -mcpu=mips32r6 \ +# RUN: %s -o %t-npic-r6.o +# RUN: ld.lld %t-npic-r6.o %t-pic-r6.o %t-sto-pic-r6.o -o %t-r6.exe +# RUN: llvm-objdump -d %t-r6.exe | FileCheck --check-prefixes=CHECK,R6 %s # CHECK: Disassembly of section .text: # CHECK-NEXT: __start: @@ -29,13 +42,15 @@ # CHECK-NEXT: 2002c: 00 00 00 00 nop # # CHECK: __LA25Thunk_foo1a: -# CHECK-NEXT: 20030: 3c 19 00 02 lui $25, 2 -# CHECK-NEXT: 20034: 08 00 80 14 j 131152 +# R2: 20030: 3c 19 00 02 lui $25, 2 +# R6: 20030: 3c 19 00 02 aui $25, $zero, 2 +# CHECK: 20034: 08 00 80 14 j 131152 # CHECK-NEXT: 20038: 27 39 00 50 addiu $25, $25, 80 # CHECK-NEXT: 2003c: 00 00 00 00 nop # CHECK: __LA25Thunk_foo1b: -# CHECK-NEXT: 20040: 3c 19 00 02 lui $25, 2 +# R2: 20040: 3c 19 00 02 lui $25, 2 +# R6: 20040: 3c 19 00 02 aui $25, $zero, 2 # CHECK-NEXT: 20044: 08 00 80 15 j 131156 # CHECK-NEXT: 20048: 27 39 00 54 addiu $25, $25, 84 # CHECK-NEXT: 2004c: 00 00 00 00 nop @@ -47,7 +62,8 @@ # CHECK-NEXT: 20054: 00 00 00 00 nop # CHECK: __LA25Thunk_foo2: -# CHECK-NEXT: 20058: 3c 19 00 02 lui $25, 2 +# R2: 20058: 3c 19 00 02 lui $25, 2 +# R6: 20058: 3c 19 00 02 aui $25, $zero, 2 # CHECK-NEXT: 2005c: 08 00 80 1c j 131184 # CHECK-NEXT: 20060: 27 39 00 70 addiu $25, $25, 112 # CHECK-NEXT: 20064: 00 00 00 00 nop @@ -56,7 +72,8 @@ # CHECK-NEXT: 20070: 00 00 00 00 nop # CHECK: __LA25Thunk_fpic: -# CHECK-NEXT: 20074: 3c 19 00 02 lui $25, 2 +# R2: 20074: 3c 19 00 02 lui $25, 2 +# R6: 20074: 3c 19 00 02 aui $25, $zero, 2 # CHECK-NEXT: 20078: 08 00 80 24 j 131216 # CHECK-NEXT: 2007c: 27 39 00 90 addiu $25, $25, 144 # CHECK-NEXT: 20080: 00 00 00 00 nop @@ -70,19 +87,24 @@ # Make sure the thunks are created properly no matter how # objects are laid out. # -# RUN: ld.lld %t-pic.o %t-npic.o %t-sto-pic.o -o %t.exe -# RUN: llvm-objdump -d %t.exe | FileCheck -check-prefix=REVERSE %s +# RUN: ld.lld %t-pic-r2.o %t-npic-r2.o %t-sto-pic-r2.o -o %t.exe +# RUN: llvm-objdump -d %t.exe | FileCheck -check-prefixes=REVERSE,REV-R2 %s +# +# RUN: ld.lld %t-pic-r6.o %t-npic-r6.o %t-sto-pic-r6.o -o %t.exe +# RUN: llvm-objdump -d %t.exe | FileCheck -check-prefixes=REVERSE,REV-R6 %s # REVERSE: Disassembly of section .text: # REVERSE-NEXT: __LA25Thunk_foo1a: -# REVERSE-NEXT: 20000: 3c 19 00 02 lui $25, 2 -# REVERSE-NEXT: 20004: 08 00 80 08 j 131104 +# REV-R2: 20000: 3c 19 00 02 lui $25, 2 +# REV-R6: 20000: 3c 19 00 02 aui $25, $zero, 2 +# REVERSE: 20004: 08 00 80 08 j 131104 # REVERSE-NEXT: 20008: 27 39 00 20 addiu $25, $25, 32 # REVERSE-NEXT: 2000c: 00 00 00 00 nop # REVERSE: __LA25Thunk_foo1b: -# REVERSE-NEXT: 20010: 3c 19 00 02 lui $25, 2 -# REVERSE-NEXT: 20014: 08 00 80 09 j 131108 +# REV-R2: 20010: 3c 19 00 02 lui $25, 2 +# REV-R6: 20010: 3c 19 00 02 aui $25, $zero, 2 +# REVERSE: 20014: 08 00 80 09 j 131108 # REVERSE-NEXT: 20018: 27 39 00 24 addiu $25, $25, 36 # REVERSE-NEXT: 2001c: 00 00 00 00 nop @@ -93,8 +115,9 @@ # REVERSE-NEXT: 20024: 00 00 00 00 nop # REVERSE: __LA25Thunk_foo2: -# REVERSE-NEXT: 20028: 3c 19 00 02 lui $25, 2 -# REVERSE-NEXT: 2002c: 08 00 80 10 j 131136 +# REV-R2: 20028: 3c 19 00 02 lui $25, 2 +# REV-R6: 20028: 3c 19 00 02 aui $25, $zero, 2 +# REVERSE: 2002c: 08 00 80 10 j 131136 # REVERSE-NEXT: 20030: 27 39 00 40 addiu $25, $25, 64 # REVERSE-NEXT: 20034: 00 00 00 00 nop @@ -116,8 +139,9 @@ # REVERSE-NEXT: 2007c: 00 00 00 00 nop # REVERSE: __LA25Thunk_fpic: -# REVERSE-NEXT: 20080: 3c 19 00 02 lui $25, 2 -# REVERSE-NEXT: 20084: 08 00 80 24 j 131216 +# REV-R2: 20080: 3c 19 00 02 lui $25, 2 +# REV-R6: 20080: 3c 19 00 02 aui $25, $zero, 2 +# REVERSE: 20084: 08 00 80 24 j 131216 # REVERSE-NEXT: 20088: 27 39 00 90 addiu $25, $25, 144 # REVERSE-NEXT: 2008c: 00 00 00 00 nop diff --git a/lld/test/ELF/mips-options.s b/lld/test/ELF/mips-options.s index ad634171eff7a..e62ea72c308be 100644 --- a/lld/test/ELF/mips-options.s +++ b/lld/test/ELF/mips-options.s @@ -8,7 +8,7 @@ # RUN: . = 0x100000000; \ # RUN: .got : { *(.got) } }" > %t.rel.script # RUN: ld.lld %t1.o %t2.o --gc-sections --script %t.rel.script -shared -o %t.so -# RUN: llvm-readobj -symbols -mips-options %t.so | FileCheck %s +# RUN: llvm-readobj -program-headers -symbols -mips-options %t.so | FileCheck %s .text .globl __start @@ -18,6 +18,19 @@ __start: # CHECK: Name: _gp # CHECK-NEXT: Value: 0x[[GP:[0-9A-F]+]] +# CHECK: ProgramHeader { +# CHECK: Type: PT_MIPS_OPTIONS +# CHECK-NEXT: Offset: +# CHECK-NEXT: VirtualAddress: +# CHECK-NEXT: PhysicalAddress: +# CHECK-NEXT: FileSize: +# CHECK-NEXT: MemSize: +# CHECK-NEXT: Flags [ +# CHECK-NEXT: PF_R +# CHECK-NEXT: ] +# CHECK-NEXT: Alignment: 8 +# CHECK-NEXT: } + # CHECK: MIPS Options { # CHECK-NEXT: ODK_REGINFO { # CHECK-NEXT: GP: 0x[[GP]] diff --git a/lld/test/ELF/ppc64-bsymbolic-toc-restore.s b/lld/test/ELF/ppc64-bsymbolic-toc-restore.s index 49d347c489927..b7d9edd45d433 100644 --- a/lld/test/ELF/ppc64-bsymbolic-toc-restore.s +++ b/lld/test/ELF/ppc64-bsymbolic-toc-restore.s @@ -53,7 +53,7 @@ caller: # CHECK-LABEL: caller # CHECK: bl .+44 # CHECK-NEXT: mr 31, 3 -# CHECK-NEXT: bl .+67108816 +# CHECK-NEXT: bl .-48 # CHECK-NEXT: ld 2, 24(1) # CHECK-NEXT: add 3, 3, 31 # CHECK-NEXT: addi 1, 1, 32 diff --git a/lld/test/ELF/ppc64-call-reach.s b/lld/test/ELF/ppc64-call-reach.s index a02bfa8299335..e32497b358fcd 100644 --- a/lld/test/ELF/ppc64-call-reach.s +++ b/lld/test/ELF/ppc64-call-reach.s @@ -62,7 +62,7 @@ test: # CHECK: 10010024: {{.*}} b .+33554428 # NEGOFFSET-LABEL: test -# NEGOFFSET: 10010014: {{.*}} bl .+33554432 +# NEGOFFSET: 10010014: {{.*}} bl .-33554432 # NEGOFFSET: 10010024: {{.*}} b .+33554432 # .branch_lt[0] @@ -83,7 +83,7 @@ test: # the offset is interpreted as a signed 26 bit value so 67108812 is actually # -52. # THUNK-LABEL: test: -# THUNK: 10010034: {{.*}} bl .+67108812 +# THUNK: 10010034: {{.*}} bl .-52 # THUNK: 10010044: {{.*}} b .+67108812 # The offset from the TOC to the .branch_lt section is (-1 << 16) - 32768. diff --git a/lld/test/ELF/ppc64-gd-to-ie.s b/lld/test/ELF/ppc64-gd-to-ie.s index 121032cafdc8c..a11024a58d4cd 100644 --- a/lld/test/ELF/ppc64-gd-to-ie.s +++ b/lld/test/ELF/ppc64-gd-to-ie.s @@ -69,10 +69,6 @@ other_reg: mtlr 0 blr - .globl __tls_get_addr - .type __tls_get_addr,@function -__tls_get_addr: - # CheckGot: .got 00000018 00000000100200c0 DATA # .got is at 0x100200c0 so the toc-base is 100280c0. diff --git a/lld/test/ELF/ppc64-ifunc.s b/lld/test/ELF/ppc64-ifunc.s index 6f2d3318b9c28..bd7f761973de2 100644 --- a/lld/test/ELF/ppc64-ifunc.s +++ b/lld/test/ELF/ppc64-ifunc.s @@ -42,9 +42,9 @@ # CHECK: _start: # CHECK-NEXT: addis 2, 12, 2 # CHECK-NEXT: addi 2, 2, -32588 -# CHECK-NEXT: bl .+67108812 +# CHECK-NEXT: bl .-52 # CHECK-NEXT: ld 2, 24(1) -# CHECK-NEXT: bl .+67108824 +# CHECK-NEXT: bl .-40 # CHECK-NEXT: ld 2, 24(1) # Check tocbase diff --git a/lld/test/ELF/ppc64-local-dynamic.s b/lld/test/ELF/ppc64-local-dynamic.s index 6ed3b0fd8f076..8a23863f67dee 100644 --- a/lld/test/ELF/ppc64-local-dynamic.s +++ b/lld/test/ELF/ppc64-local-dynamic.s @@ -113,7 +113,7 @@ k: // Dis: test: // Dis: addis 3, 2, 0 // Dis-NEXT: addi 3, 3, -32760 -// Dis-NEXT: bl .+67108804 +// Dis-NEXT: bl .-60 // Dis-NEXT: ld 2, 24(1) // Dis-NEXT: addis 3, 3, 0 // Dis-NEXT: lwa 3, -32768(3) diff --git a/lld/test/ELF/ppc64-local-entry.s b/lld/test/ELF/ppc64-local-entry.s new file mode 100644 index 0000000000000..2a2295169b958 --- /dev/null +++ b/lld/test/ELF/ppc64-local-entry.s @@ -0,0 +1,47 @@ +# REQUIRES: ppc + +# RUN: llvm-mc -filetype=obj -triple=powerpc64 %s -o %t +# RUN: ld.lld -r %t -o %t2 +# RUN: llvm-objdump -s -section=.symtab %t2 | FileCheck %s + +.text +.abiversion 2 +.globl _start +.p2align 2 +.type _start,@function + +_start: +.Lfunc_begin0: +.Lfunc_gep0: + addis 2, 12, .TOC.-.Lfunc_gep0@ha + addi 2, 2, .TOC.-.Lfunc_gep0@l +.Lfunc_lep0: + .localentry _start, .Lfunc_lep0-.Lfunc_gep0 + # The code below is not important, it just needs to access some + # global data or function, in order to use the TOC. + # In this case, it performs the following: + # g += 10; + # Also note that this code is not intended to be run, but only + # to check if the linker will preserve the localentry info. + addis 3, 2, g@toc@ha + addi 3, 3, g@toc@l + lwz 4, 0(3) + addi 4, 4, 10 + stw 4, 0(3) + blr + .long 0 + .quad 0 +.Lfunc_end0: + .size _start, .Lfunc_end0-.Lfunc_begin0 + + .type g,@object # @g + .lcomm g,4,4 + +// We expect the st_other byte to be 0x60: +// localentry = 011 (gep + 2 instructions), reserved = 000, +// visibility = 00 (STV_DEFAULT) +// Currently, llvm-objdump does not support displaying +// st_other's PPC64 specific flags, thus we check the +// result of the hexdump of .symtab section. + +// CHECK: 0070 00000000 00000000 00000009 12600001 diff --git a/lld/test/ELF/ppc64-plt-stub.s b/lld/test/ELF/ppc64-plt-stub.s index a644f487b8bed..95e28a5850a9e 100644 --- a/lld/test/ELF/ppc64-plt-stub.s +++ b/lld/test/ELF/ppc64-plt-stub.s @@ -22,7 +22,7 @@ // CHECK: _start: -// CHECK: bl .+67108824 +// CHECK: bl .-40 .text .abiversion 2 .globl _start diff --git a/lld/test/ELF/ppc64-rel-calls.s b/lld/test/ELF/ppc64-rel-calls.s index 4c79498dc56bd..8423eb43f2199 100644 --- a/lld/test/ELF/ppc64-rel-calls.s +++ b/lld/test/ELF/ppc64-rel-calls.s @@ -30,9 +30,8 @@ bar: nop blr -# FIXME: The printing here is misleading, the branch offset here is negative. -# CHECK: 1001000c: {{.*}} bl .+67108852 +# CHECK: 1001000c: {{.*}} bl .-12 # CHECK: 10010010: {{.*}} nop -# CHECK: 10010014: {{.*}} bl .+67108844 +# CHECK: 10010014: {{.*}} bl .-20 # CHECK: 10010018: {{.*}} nop # CHECK: 1001001c: {{.*}} blr diff --git a/lld/test/ELF/ppc64-tls-gd-le.s b/lld/test/ELF/ppc64-tls-gd-le.s index 7907d1104a2b8..78bffb2c41181 100644 --- a/lld/test/ELF/ppc64-tls-gd-le.s +++ b/lld/test/ELF/ppc64-tls-gd-le.s @@ -50,10 +50,6 @@ _start: # @_start .Lfunc_end0: .size _start, .Lfunc_end0-.Lfunc_begin0 -.globl __tls_get_addr -.type __tls_get_addr,@function -__tls_get_addr: - # -- End function .type a,@object # @a .section .tdata,"awT",@progbits diff --git a/lld/test/ELF/ppc64-tls-ld-le.s b/lld/test/ELF/ppc64-tls-ld-le.s index b684515e8b041..572de08322f3a 100644 --- a/lld/test/ELF/ppc64-tls-ld-le.s +++ b/lld/test/ELF/ppc64-tls-ld-le.s @@ -52,9 +52,7 @@ _start: # @_start .Lfunc_end0: .size _start, .Lfunc_end0-.Lfunc_begin0 # -- End function -.globl __tls_get_addr -.type __tls_get_addr,@function -__tls_get_addr: + .type a,@object # @a .section .tdata,"awT",@progbits .p2align 2 diff --git a/lld/test/ELF/ppc64-toc-restore-recursive-call.s b/lld/test/ELF/ppc64-toc-restore-recursive-call.s index 4bedcfecf3830..d194ada842050 100644 --- a/lld/test/ELF/ppc64-toc-restore-recursive-call.s +++ b/lld/test/ELF/ppc64-toc-restore-recursive-call.s @@ -18,7 +18,7 @@ # CHECK-NEXT: 10000: # CHECK-LABEL: recursive_func # CHECK-NEXT: 10014: -# CHECK: 1003c: {{[0-9a-fA-F ]+}} bl .+67108804 +# CHECK: 1003c: {{.*}} bl .-60 # CHECK-NEXT: ld 2, 24(1) .abiversion 2 diff --git a/lld/test/ELF/ppc64-toc-restore.s b/lld/test/ELF/ppc64-toc-restore.s index d9e06ca6e5968..8c262076bce5a 100644 --- a/lld/test/ELF/ppc64-toc-restore.s +++ b/lld/test/ELF/ppc64-toc-restore.s @@ -32,10 +32,10 @@ _start: // CHECK: Disassembly of section .text: // CHECK: _start: -// CHECK: 1001001c: {{.*}} bl .+67108836 +// CHECK: 1001001c: {{.*}} bl .-28 // CHECK-NOT: 10010020: {{.*}} nop // CHECK: 10010020: {{.*}} ld 2, 24(1) -// CHECK: 10010024: {{.*}} bl .+67108848 +// CHECK: 10010024: {{.*}} bl .-16 // CHECK-NOT: 10010028: {{.*}} nop // CHECK-NOT: 10010028: {{.*}} ld 2, 24(1) @@ -68,5 +68,5 @@ last: bl foo nop // CHECK: last: -// CHECK: 10010038: {{.*}} bl .+67108808 +// CHECK: 10010038: {{.*}} bl .-56 // CHECK-NEXT: 1001003c: {{.*}} ld 2, 24(1) diff --git a/lld/test/ELF/relocatable-rel-iplt.s b/lld/test/ELF/relocatable-rel-iplt.s index 773a09f528156..85029621915d6 100644 --- a/lld/test/ELF/relocatable-rel-iplt.s +++ b/lld/test/ELF/relocatable-rel-iplt.s @@ -14,7 +14,7 @@ // CHECK-NEXT: Section: Undefined (0x0) // CHECK-NEXT: } // CHECK-NEXT: Symbol { -// CHECK-NEXT: Name: (0) +// CHECK-NEXT: Name: .text (0) // CHECK-NEXT: Value: 0x0 // CHECK-NEXT: Size: 0 // CHECK-NEXT: Binding: Local (0x0) diff --git a/lld/test/ELF/relocatable-symbol-name.s b/lld/test/ELF/relocatable-symbol-name.s index d8a85dd4b815b..7895518c70498 100644 --- a/lld/test/ELF/relocatable-symbol-name.s +++ b/lld/test/ELF/relocatable-symbol-name.s @@ -17,7 +17,7 @@ # CHECK-NEXT: Section: # CHECK-NEXT: } # CHECK-NEXT: Symbol { -# CHECK-NEXT: Name: (0) +# CHECK-NEXT: Name: .text (0) # CHECK-NEXT: Value: # CHECK-NEXT: Size: # CHECK-NEXT: Binding: diff --git a/lld/test/ELF/relocation-dtrace.test b/lld/test/ELF/relocation-dtrace.test index 9007a265bfaa8..7f4d3ac26c912 100644 --- a/lld/test/ELF/relocation-dtrace.test +++ b/lld/test/ELF/relocation-dtrace.test @@ -20,5 +20,4 @@ Sections: Info: .text Relocations: - Offset: 0x0000000000000000 - Symbol: '' Type: R_X86_64_NONE diff --git a/lld/test/ELF/relocation-none-aarch64.test b/lld/test/ELF/relocation-none-aarch64.test index e77989a54a83e..bdf4cb1437b2f 100644 --- a/lld/test/ELF/relocation-none-aarch64.test +++ b/lld/test/ELF/relocation-none-aarch64.test @@ -20,5 +20,4 @@ Sections: Info: .text Relocations: - Offset: 0 - Symbol: '' Type: R_AARCH64_NONE diff --git a/lld/test/ELF/relocation-none-i686.test b/lld/test/ELF/relocation-none-i686.test index 82dc4e608c037..5e98676522271 100644 --- a/lld/test/ELF/relocation-none-i686.test +++ b/lld/test/ELF/relocation-none-i686.test @@ -19,5 +19,4 @@ Sections: Info: .text Relocations: - Offset: 0x0000000000000000 - Symbol: '' Type: R_386_NONE diff --git a/lld/test/ELF/silent-ignore.test b/lld/test/ELF/silent-ignore.test index adfc2442d4ed4..018fa27b2e296 100644 --- a/lld/test/ELF/silent-ignore.test +++ b/lld/test/ELF/silent-ignore.test @@ -6,8 +6,10 @@ RUN: -no-allow-shlib-undefined \ RUN: -no-copy-dt-needed-entries \ RUN: -no-ctors-in-init-array \ RUN: -no-keep-memory \ +RUN: -no-pipeline-knowledge \ RUN: -no-warn-common \ RUN: -no-warn-mismatch \ +RUN: -p \ RUN: -sort-common \ RUN: -stats \ RUN: -warn-execstack \ diff --git a/lld/test/ELF/tls-dynamic-i686.s b/lld/test/ELF/tls-dynamic-i686.s index 1b13f26cc134f..dc651d09b2efc 100644 --- a/lld/test/ELF/tls-dynamic-i686.s +++ b/lld/test/ELF/tls-dynamic-i686.s @@ -56,8 +56,8 @@ addl tls1@gotntpoff(%ebx),%eax // CHECK-NEXT: SHF_ALLOC // CHECK-NEXT: SHF_WRITE // CHECK-NEXT: ] -// CHECK-NEXT: Address: 0x3068 -// CHECK-NEXT: Offset: 0x3068 +// CHECK-NEXT: Address: 0x3070 +// CHECK-NEXT: Offset: 0x3070 // CHECK-NEXT: Size: 32 // CHECK-NEXT: Link: 0 // CHECK-NEXT: Info: 0 @@ -66,13 +66,13 @@ addl tls1@gotntpoff(%ebx),%eax // CHECK: Relocations [ // CHECK: Section ({{.+}}) .rel.dyn { -// CHECK-NEXT: 0x3078 R_386_TLS_DTPMOD32 - 0x0 -// CHECK-NEXT: 0x3068 R_386_TLS_DTPMOD32 tls0 0x0 -// CHECK-NEXT: 0x306C R_386_TLS_DTPOFF32 tls0 0x0 -// CHECK-NEXT: 0x3080 R_386_TLS_TPOFF tls0 0x0 -// CHECK-NEXT: 0x3070 R_386_TLS_DTPMOD32 tls1 0x0 -// CHECK-NEXT: 0x3074 R_386_TLS_DTPOFF32 tls1 0x0 -// CHECK-NEXT: 0x3084 R_386_TLS_TPOFF tls1 0x0 +// CHECK-NEXT: 0x3080 R_386_TLS_DTPMOD32 - 0x0 +// CHECK-NEXT: 0x3070 R_386_TLS_DTPMOD32 tls0 0x0 +// CHECK-NEXT: 0x3074 R_386_TLS_DTPOFF32 tls0 0x0 +// CHECK-NEXT: 0x3088 R_386_TLS_TPOFF tls0 0x0 +// CHECK-NEXT: 0x3078 R_386_TLS_DTPMOD32 tls1 0x0 +// CHECK-NEXT: 0x307C R_386_TLS_DTPOFF32 tls1 0x0 +// CHECK-NEXT: 0x308C R_386_TLS_TPOFF tls1 0x0 // CHECK-NEXT: } // DIS: Disassembly of section .text: @@ -80,20 +80,20 @@ addl tls1@gotntpoff(%ebx),%eax // General dynamic model: // -32 and -24 are first and second GOT entries offsets. // Each one is a pair of records. -// DIS-NEXT: 1000: 8d 04 1d e0 ff ff ff leal -32(,%ebx), %eax -// DIS-NEXT: 1007: e8 64 00 00 00 calll 100 -// DIS-NEXT: 100c: 8d 04 1d e8 ff ff ff leal -24(,%ebx), %eax -// DIS-NEXT: 1013: e8 58 00 00 00 calll 88 +// DIS-NEXT: 1000: {{.*}} leal -32(,%ebx), %eax +// DIS-NEXT: 1007: {{.*}} calll 100 +// DIS-NEXT: 100c: {{.*}} leal -24(,%ebx), %eax +// DIS-NEXT: 1013: {{.*}} calll 88 // Local dynamic model: // -16 is a local module tls index offset. -// DIS-NEXT: 1018: 8d 83 f0 ff ff ff leal -16(%ebx), %eax -// DIS-NEXT: 101e: e8 4d 00 00 00 calll 77 -// DIS-NEXT: 1023: 8d 90 08 00 00 00 leal 8(%eax), %edx -// DIS-NEXT: 1029: 8d 83 f0 ff ff ff leal -16(%ebx), %eax -// DIS-NEXT: 102f: e8 3c 00 00 00 calll 60 -// DIS-NEXT: 1034: 8d 90 0c 00 00 00 leal 12(%eax), %edx +// DIS-NEXT: 1018: {{.*}} leal -16(%ebx), %eax +// DIS-NEXT: 101e: {{.*}} calll 77 +// DIS-NEXT: 1023: {{.*}} leal 8(%eax), %edx +// DIS-NEXT: 1029: {{.*}} leal -16(%ebx), %eax +// DIS-NEXT: 102f: {{.*}} calll 60 +// DIS-NEXT: 1034: {{.*}} leal 12(%eax), %edx // Initial exec model: -// DIS-NEXT: 103a: 65 a1 00 00 00 00 movl %gs:0, %eax -// DIS-NEXT: 1040: 03 83 f8 ff ff ff addl -8(%ebx), %eax -// DIS-NEXT: 1046: 65 a1 00 00 00 00 movl %gs:0, %eax -// DIS-NEXT: 104c: 03 83 fc ff ff ff addl -4(%ebx), %eax +// DIS-NEXT: 103a: {{.*}} movl %gs:0, %eax +// DIS-NEXT: 1040: {{.*}} addl -8(%ebx), %eax +// DIS-NEXT: 1046: {{.*}} movl %gs:0, %eax +// DIS-NEXT: 104c: {{.*}} addl -4(%ebx), %eax diff --git a/lld/test/ELF/tls-dynamic.s b/lld/test/ELF/tls-dynamic.s index 167f7687451e0..c4190a26df207 100644 --- a/lld/test/ELF/tls-dynamic.s +++ b/lld/test/ELF/tls-dynamic.s @@ -48,28 +48,28 @@ c: // CHECK-NEXT: SHF_ALLOC // CHECK-NEXT: SHF_WRITE // CHECK-NEXT: ] -// CHECK-NEXT: Address: 0x30D0 +// CHECK-NEXT: Address: 0x30E0 // CHECK-NEXT: Offset: // CHECK-NEXT: Size: 40 // CHECK: Relocations [ // CHECK: Section ({{.+}}) .rela.dyn { -// CHECK-NEXT: 0x30D0 R_X86_64_DTPMOD64 - 0x0 -// CHECK-NEXT: 0x30E0 R_X86_64_DTPMOD64 c 0x0 -// CHECK-NEXT: 0x30E8 R_X86_64_DTPOFF64 c 0x0 -// CHECK-NEXT: 0x30F0 R_X86_64_TPOFF64 c 0x0 +// CHECK-NEXT: 0x30E0 R_X86_64_DTPMOD64 - 0x0 +// CHECK-NEXT: 0x30F0 R_X86_64_DTPMOD64 c 0x0 +// CHECK-NEXT: 0x30F8 R_X86_64_DTPOFF64 c 0x0 +// CHECK-NEXT: 0x3100 R_X86_64_TPOFF64 c 0x0 // CHECK-NEXT: } -// 4297 = (0x20D0 + -4) - (0x1000 + 3) // PC relative offset to got entry. -// 4285 = (0x20D0 + -4) - (0x100c + 3) // PC relative offset to got entry. -// 4267 = (0x20E0 + -4) - (0x102e + 3) // PC relative offset to got entry. -// 4263 = (0x20F0 + -4) - (0x1042 + 3) // PC relative offset to got entry. +// 8409 = (0x30E0 + -4) - (0x1000 + 3) // PC relative offset to got entry. +// 8397 = (0x30F0 + -4) - (0x100c + 3) // PC relative offset to got entry. +// 8379 = (0x30F8 + -4) - (0x102e + 3) // PC relative offset to got entry. +// 8375 = (0x3100 + -4) - (0x1042 + 3) // PC relative offset to got entry. // DIS: Disassembly of section .text: // DIS-NEXT: .text: -// DIS-NEXT: 1000: {{.+}} leaq 8393(%rip), %rdi +// DIS-NEXT: 1000: {{.+}} leaq 8409(%rip), %rdi // DIS-NEXT: 1007: {{.+}} callq -// DIS-NEXT: 100c: {{.+}} leaq 8381(%rip), %rdi +// DIS-NEXT: 100c: {{.+}} leaq 8397(%rip), %rdi // DIS-NEXT: 1013: {{.+}} callq // DIS-NEXT: 1018: {{.+}} leaq (%rax), %rcx // DIS-NEXT: 101f: {{.+}} leaq 4(%rax), %rcx @@ -77,10 +77,10 @@ c: // DIS-NEXT: 1028: 00 00 // DIS-NEXT: 102a: 00 00 // DIS-NEXT: 102c: 00 00 -// DIS-NEXT: 102e: {{.+}} leaq 8363(%rip), %rdi +// DIS-NEXT: 102e: {{.+}} leaq 8379(%rip), %rdi // DIS-NEXT: 1035: {{.+}} callq // DIS-NEXT: 103b: {{.+}} leaq (%rax), %rcx -// DIS-NEXT: 1042: {{.+}} movq 8359(%rip), %rax +// DIS-NEXT: 1042: {{.+}} movq 8375(%rip), %rax // DIS-NEXT: 1049: {{.+}} movq %fs:(%rax), %rax // DIS-NEXT: 104d: {{.+}} movabsq $0, %rax // DIS-NEXT: 1057: {{.+}} movabsq $4, %rax diff --git a/lld/test/ELF/tls-got.s b/lld/test/ELF/tls-got.s index bedaaebeeb3cb..d9de24e394976 100644 --- a/lld/test/ELF/tls-got.s +++ b/lld/test/ELF/tls-got.s @@ -15,7 +15,7 @@ // CHECK-NEXT: SHF_WRITE // CHECK-NEXT: ] // CHECK-NEXT: Address: [[ADDR:.*]] -// CHECK-NEXT: Offset: 0x20B0 +// CHECK-NEXT: Offset: 0x20C0 // CHECK-NEXT: Size: 16 // CHECK-NEXT: Link: 0 // CHECK-NEXT: Info: 0 @@ -25,23 +25,23 @@ // CHECK: Relocations [ // CHECK-NEXT: Section (4) .rela.dyn { -// CHECK-NEXT: 0x2020B8 R_X86_64_TPOFF64 tls0 0x0 -// CHECK-NEXT: 0x2020B0 R_X86_64_TPOFF64 tls1 0x0 +// CHECK-NEXT: 0x2020C8 R_X86_64_TPOFF64 tls0 0x0 +// CHECK-NEXT: [[ADDR]] R_X86_64_TPOFF64 tls1 0x0 // CHECK-NEXT: } // CHECK-NEXT: ] -//0x201000 + 4265 + 7 = 0x2020B0 -//0x20100A + 4263 + 7 = 0x2020B8 -//0x201014 + 4253 + 7 = 0x2020B8 +//0x201000 + 4281 + 7 = 0x2020C0 +//0x20100A + 4279 + 7 = 0x2020C8 +//0x201014 + 4269 + 7 = 0x2020C8 //DISASM: Disassembly of section .text: //DISASM-NEXT: main: -//DISASM-NEXT: 201000: 48 8b 05 a9 10 00 00 movq 4265(%rip), %rax -//DISASM-NEXT: 201007: 64 8b 00 movl %fs:(%rax), %eax -//DISASM-NEXT: 20100a: 48 8b 05 a7 10 00 00 movq 4263(%rip), %rax -//DISASM-NEXT: 201011: 64 8b 00 movl %fs:(%rax), %eax -//DISASM-NEXT: 201014: 48 8b 05 9d 10 00 00 movq 4253(%rip), %rax -//DISASM-NEXT: 20101b: 64 8b 00 movl %fs:(%rax), %eax -//DISASM-NEXT: 20101e: c3 retq +//DISASM-NEXT: 201000: {{.*}} movq 4281(%rip), %rax +//DISASM-NEXT: 201007: {{.*}} movl %fs:(%rax), %eax +//DISASM-NEXT: 20100a: {{.*}} movq 4279(%rip), %rax +//DISASM-NEXT: 201011: {{.*}} movl %fs:(%rax), %eax +//DISASM-NEXT: 201014: {{.*}} movq 4269(%rip), %rax +//DISASM-NEXT: 20101b: {{.*}} movl %fs:(%rax), %eax +//DISASM-NEXT: 20101e: {{.*}} retq .section .tdata,"awT",@progbits diff --git a/lld/test/ELF/tls-initial-exec-local.s b/lld/test/ELF/tls-initial-exec-local.s index e65fb294bc179..67fe9095d7e4e 100644 --- a/lld/test/ELF/tls-initial-exec-local.s +++ b/lld/test/ELF/tls-initial-exec-local.s @@ -10,21 +10,21 @@ // CHECK-NEXT: SHF_ALLOC (0x2) // CHECK-NEXT: SHF_WRITE (0x1) // CHECK-NEXT: ] -// CHECK-NEXT: Address: 0x2090 +// CHECK-NEXT: Address: 0x20A0 // CHECK: Relocations [ // CHECK-NEXT: Section ({{.*}}) .rela.dyn { -// CHECK-NEXT: 0x2090 R_X86_64_TPOFF64 - 0x0 -// CHECK-NEXT: 0x2098 R_X86_64_TPOFF64 - 0x4 +// CHECK-NEXT: 0x20A0 R_X86_64_TPOFF64 - 0x0 +// CHECK-NEXT: 0x20A8 R_X86_64_TPOFF64 - 0x4 // CHECK-NEXT: } // CHECK-NEXT: ] -// 0x1007 + 4233 = 0x2090 -// 0x100e + 4234 = 0x2098 +// 0x1007 + 4249 = 0x20A0 +// 0x100e + 4250 = 0x20A8 // DISASM: Disassembly of section .text: // DISASM-NEXT: .text: -// DISASM-NEXT: 1000: {{.*}} addq 4233(%rip), %rax -// DISASM-NEXT: 1007: {{.*}} addq 4234(%rip), %rax +// DISASM-NEXT: 1000: {{.*}} addq 4249(%rip), %rax +// DISASM-NEXT: 1007: {{.*}} addq 4250(%rip), %rax addq foo@GOTTPOFF(%rip), %rax addq bar@GOTTPOFF(%rip), %rax diff --git a/lld/test/ELF/tls-opt-iele-i686-nopic.s b/lld/test/ELF/tls-opt-iele-i686-nopic.s index 704928b2b4dd4..9b97264a0cf61 100644 --- a/lld/test/ELF/tls-opt-iele-i686-nopic.s +++ b/lld/test/ELF/tls-opt-iele-i686-nopic.s @@ -14,8 +14,8 @@ // GOTREL-NEXT: SHF_ALLOC // GOTREL-NEXT: SHF_WRITE // GOTREL-NEXT: ] -// GOTREL-NEXT: Address: 0x402058 -// GOTREL-NEXT: Offset: 0x2058 +// GOTREL-NEXT: Address: 0x402060 +// GOTREL-NEXT: Offset: 0x2060 // GOTREL-NEXT: Size: 8 // GOTREL-NEXT: Link: 0 // GOTREL-NEXT: Info: 0 @@ -24,8 +24,8 @@ // GOTREL-NEXT: } // GOTREL: Relocations [ // GOTREL-NEXT: Section ({{.*}}) .rel.dyn { -// GOTREL-NEXT: 0x402058 R_386_TLS_TPOFF tlsshared0 0x0 -// GOTREL-NEXT: 0x40205C R_386_TLS_TPOFF tlsshared1 0x0 +// GOTREL-NEXT: 0x402060 R_386_TLS_TPOFF tlsshared0 0x0 +// GOTREL-NEXT: 0x402064 R_386_TLS_TPOFF tlsshared1 0x0 // GOTREL-NEXT: } // GOTREL-NEXT: ] @@ -33,24 +33,24 @@ // DISASM-NEXT: _start: // 4294967288 = 0xFFFFFFF8 // 4294967292 = 0xFFFFFFFC -// 4202584 = (.got)[0] = 0x402058 -// 4202588 = (.got)[1] = 0x40205C -// DISASM-NEXT: 401000: c7 c1 f8 ff ff ff movl $4294967288, %ecx -// DISASM-NEXT: 401006: 65 8b 01 movl %gs:(%ecx), %eax -// DISASM-NEXT: 401009: b8 f8 ff ff ff movl $4294967288, %eax -// DISASM-NEXT: 40100e: 65 8b 00 movl %gs:(%eax), %eax -// DISASM-NEXT: 401011: 81 c1 f8 ff ff ff addl $4294967288, %ecx -// DISASM-NEXT: 401017: 65 8b 01 movl %gs:(%ecx), %eax -// DISASM-NEXT: 40101a: c7 c1 fc ff ff ff movl $4294967292, %ecx -// DISASM-NEXT: 401020: 65 8b 01 movl %gs:(%ecx), %eax -// DISASM-NEXT: 401023: b8 fc ff ff ff movl $4294967292, %eax -// DISASM-NEXT: 401028: 65 8b 00 movl %gs:(%eax), %eax -// DISASM-NEXT: 40102b: 81 c1 fc ff ff ff addl $4294967292, %ecx -// DISASM-NEXT: 401031: 65 8b 01 movl %gs:(%ecx), %eax -// DISASM-NEXT: 401034: 8b 0d 58 20 40 00 movl 4202584, %ecx -// DISASM-NEXT: 40103a: 65 8b 01 movl %gs:(%ecx), %eax -// DISASM-NEXT: 40103d: 03 0d 5c 20 40 00 addl 4202588, %ecx -// DISASM-NEXT: 401043: 65 8b 01 movl %gs:(%ecx), %eax +// 4202592 = (.got)[0] = 0x402060 +// 4202596 = (.got)[1] = 0x402064 +// DISASM-NEXT: 401000: {{.*}} movl $4294967288, %ecx +// DISASM-NEXT: 401006: {{.*}} movl %gs:(%ecx), %eax +// DISASM-NEXT: 401009: {{.*}} movl $4294967288, %eax +// DISASM-NEXT: 40100e: {{.*}} movl %gs:(%eax), %eax +// DISASM-NEXT: 401011: {{.*}} addl $4294967288, %ecx +// DISASM-NEXT: 401017: {{.*}} movl %gs:(%ecx), %eax +// DISASM-NEXT: 40101a: {{.*}} movl $4294967292, %ecx +// DISASM-NEXT: 401020: {{.*}} movl %gs:(%ecx), %eax +// DISASM-NEXT: 401023: {{.*}} movl $4294967292, %eax +// DISASM-NEXT: 401028: {{.*}} movl %gs:(%eax), %eax +// DISASM-NEXT: 40102b: {{.*}} addl $4294967292, %ecx +// DISASM-NEXT: 401031: {{.*}} movl %gs:(%ecx), %eax +// DISASM-NEXT: 401034: {{.*}} movl 4202592, %ecx +// DISASM-NEXT: 40103a: {{.*}} movl %gs:(%ecx), %eax +// DISASM-NEXT: 40103d: {{.*}} addl 4202596, %ecx +// DISASM-NEXT: 401043: {{.*}} movl %gs:(%ecx), %eax .type tlslocal0,@object .section .tbss,"awT",@nobits diff --git a/lld/test/ELF/trace.s b/lld/test/ELF/trace.s index 4374d93da6485..43876adbc437e 100644 --- a/lld/test/ELF/trace.s +++ b/lld/test/ELF/trace.s @@ -6,4 +6,4 @@ # CHECK: {{.*}}.foo.o ## Check --trace alias -# RUN: ld.lld -shared %t.foo.o -o %t.so -t 2>&1 | FileCheck %s +# RUN: ld.lld -shared %t.foo.o -o %t.so --trace 2>&1 | FileCheck %s diff --git a/lld/test/ELF/undef-broken-debug.test b/lld/test/ELF/undef-broken-debug.test index c3405ad0b9ed3..3ed4c2bcbacfe 100644 --- a/lld/test/ELF/undef-broken-debug.test +++ b/lld/test/ELF/undef-broken-debug.test @@ -62,6 +62,13 @@ Sections: Content: '0111001017000000' Symbols: + Local: + - Name: .debug_abbrev + Type: STT_SECTION + Section: .debug_abbrev + - Name: .debug_line + Type: STT_SECTION + Section: .debug_line Global: - Name: _start Section: .text diff --git a/lld/test/ELF/undefined-opt.s b/lld/test/ELF/undefined-opt.s index 9e93e0fdce4d8..2689954276776 100644 --- a/lld/test/ELF/undefined-opt.s +++ b/lld/test/ELF/undefined-opt.s @@ -40,7 +40,7 @@ # TWO-UNDEFINED: Name: zed # TWO-UNDEFINED: ] # Now the same logic but linker script is used to set undefines -# RUN: echo "EXTERN( bar abs )" > %t.script +# RUN: echo "EXTERN( bar \"abs\" )" > %t.script # RUN: ld.lld -o %t3 %t.o %tar.a %t.script # RUN: llvm-readobj --symbols %t3 | FileCheck --check-prefix=TWO-UNDEFINED %s diff --git a/lld/test/ELF/x86-64-pcrel.s b/lld/test/ELF/x86-64-pcrel.s new file mode 100644 index 0000000000000..8129c9cab2da6 --- /dev/null +++ b/lld/test/ELF/x86-64-pcrel.s @@ -0,0 +1,23 @@ +// REQUIRES: x86 + +// This is a test for R_X86_64_PC8 and R_X86_64_PC16. + +// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t1.o +// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %p/Inputs/x86-64-pcrel.s -o %t2.o +// RUN: ld.lld -o %t.exe %t1.o %t2.o +// RUN: llvm-objdump -s %t.exe | FileCheck %s + +// CHECK: Contents of section .text: +// CHECK-NEXT: 2000cccc cccccccc cccccccc cccccccc +// CHECK-NEXT: 20cccccc cccccccc cccccccc cccccccc +// CHECK-NEXT: e0ffcccc cccccccc cccccccc cccccccc +// CHECK-NEXT: e0cccccc cccccccc cccccccc cccccccc + +.globl _start +_start: + +.word foo - _start +.fill 14,1,0xcc + +.byte foo - _start +.fill 15,1,0xcc diff --git a/lld/test/ELF/x86-64-static-tls-model.s b/lld/test/ELF/x86-64-static-tls-model.s new file mode 100644 index 0000000000000..9781d795e64bb --- /dev/null +++ b/lld/test/ELF/x86-64-static-tls-model.s @@ -0,0 +1,18 @@ +# REQUIRES: x86 + +## In this test R_X86_64_GOTTPOFF is a IE relocation (static TLS model), +## test check we add STATIC_TLS flag. + +# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o +# RUN: ld.lld %t.o -o %t1 -shared +# RUN: llvm-readobj -dynamic-table %t1 | FileCheck %s + +# CHECK: DynamicSection [ +# CHECK: FLAGS STATIC_TLS + +.section ".tdata", "awT", @progbits +.globl var +var: + +movq var@GOTTPOFF(%rip), %rax # R_X86_64_GOTTPOFF +movl %fs:0(%rax), %eax diff --git a/lld/test/MinGW/driver.test b/lld/test/MinGW/driver.test index 3222bb1115b85..15c67dbc73c85 100644 --- a/lld/test/MinGW/driver.test +++ b/lld/test/MinGW/driver.test @@ -74,6 +74,9 @@ WHOLE-ARCHIVE: foo.o -wholearchive:bar.a baz.a RUN: ld.lld -### -m i386pep foo.o | FileCheck -check-prefix MINGW-FLAG %s MINGW-FLAG: -lldmingw +RUN: ld.lld -### -m i386pep foo.o --exclude-all-symbols | FileCheck -check-prefix EXCLUDE-ALL %s +EXCLUDE-ALL: -exclude-all-symbols + RUN: ld.lld -### -m i386pep foo.o --export-all-symbols | FileCheck -check-prefix EXPORT-ALL %s EXPORT-ALL: -export-all-symbols @@ -151,3 +154,9 @@ REQUIRE-DEFINED: -include:_foo -include:_bar -include:_baz -include:_foo2 RUN: ld.lld -### -m i386pep foo.o -Llibpath | FileCheck -check-prefix LIBPATH %s LIBPATH: -libpath:libpath + +RUN: ld.lld -### -m i386pep foo.o --no-insert-timestamp | FileCheck -check-prefix NOTIMESTAMP %s +RUN: ld.lld -### -m i386pep foo.o --insert-timestamp --no-insert-timestamp | FileCheck -check-prefix NOTIMESTAMP %s +NOTIMESTAMP: -timestamp:0 +RUN: ld.lld -### -m i386pep foo.o --no-insert-timestamp --insert-timestamp | FileCheck -check-prefix TIMESTAMP %s +TIMESTAMP-NOT: -timestamp:0 diff --git a/lld/test/lit.cfg.py b/lld/test/lit.cfg.py index 350b40a100811..267f8c5178584 100644 --- a/lld/test/lit.cfg.py +++ b/lld/test/lit.cfg.py @@ -97,6 +97,9 @@ if config.have_dia_sdk: config.available_features.add("diasdk") +if config.sizeof_void_p == 8: + config.available_features.add("llvm-64-bits") + tar_executable = lit.util.which('tar', config.environment['PATH']) if tar_executable: tar_version = subprocess.Popen( diff --git a/lld/test/lit.site.cfg.py.in b/lld/test/lit.site.cfg.py.in index 07ffc2303e114..02840f8d6a303 100644 --- a/lld/test/lit.site.cfg.py.in +++ b/lld/test/lit.site.cfg.py.in @@ -15,6 +15,7 @@ config.lld_tools_dir = "@LLVM_RUNTIME_OUTPUT_INTDIR@" config.target_triple = "@TARGET_TRIPLE@" config.python_executable = "@PYTHON_EXECUTABLE@" config.have_zlib = @HAVE_LIBZ@ +config.sizeof_void_p = @CMAKE_SIZEOF_VOID_P@ # Support substitution of the tools and libs dirs with user parameters. This is # used when we can't determine the tool dir at configuration time. diff --git a/lld/test/wasm/Inputs/call-ret32.ll b/lld/test/wasm/Inputs/call-ret32.ll new file mode 100644 index 0000000000000..90cbf9684573c --- /dev/null +++ b/lld/test/wasm/Inputs/call-ret32.ll @@ -0,0 +1,11 @@ +target triple = "wasm32-unknown-unknown" + +@ret32_address = global i32 (float)* @ret32, align 4 + +define hidden i32* @call_ret32() { +entry: + %call1 = call i32 @ret32(float 0.000000e+00) + ret i32* bitcast (i32 (float)** @ret32_address to i32*) +} + +declare i32 @ret32(float) diff --git a/lld/test/wasm/Inputs/globals.yaml b/lld/test/wasm/Inputs/globals.yaml index a2c4602294efa..6f632262785d3 100644 --- a/lld/test/wasm/Inputs/globals.yaml +++ b/lld/test/wasm/Inputs/globals.yaml @@ -29,7 +29,7 @@ Sections: Locals: Body: 2381808080000B Relocations: - - Type: R_WEBASSEMBLY_GLOBAL_INDEX_LEB + - Type: R_WASM_GLOBAL_INDEX_LEB Index: 1 Offset: 0x00000004 - Type: CUSTOM diff --git a/lld/test/wasm/Inputs/undefined-globals.yaml b/lld/test/wasm/Inputs/undefined-globals.yaml index 49cf8811f8129..fd5a2361c9f55 100644 --- a/lld/test/wasm/Inputs/undefined-globals.yaml +++ b/lld/test/wasm/Inputs/undefined-globals.yaml @@ -27,7 +27,7 @@ Sections: Locals: Body: 2381808080000B Relocations: - - Type: R_WEBASSEMBLY_GLOBAL_INDEX_LEB + - Type: R_WASM_GLOBAL_INDEX_LEB Index: 1 Offset: 0x00000004 - Type: CUSTOM diff --git a/lld/test/wasm/alias.ll b/lld/test/wasm/alias.ll index 358582ea1520e..a7268ad4397af 100644 --- a/lld/test/wasm/alias.ll +++ b/lld/test/wasm/alias.ll @@ -22,7 +22,7 @@ entry: ; CHECK-NEXT: ReturnType: NORESULT ; CHECK-NEXT: ParamTypes: ; CHECK-NEXT: - Type: FUNCTION -; CHECK-NEXT: FunctionTypes: [ 0, 0 ] +; CHECK-NEXT: FunctionTypes: [ 0 ] ; CHECK-NEXT: - Type: TABLE ; CHECK-NEXT: Tables: ; CHECK-NEXT: - ElemType: FUNCREF @@ -66,23 +66,18 @@ entry: ; CHECK-NEXT: Index: 2 ; CHECK-NEXT: - Name: _start ; CHECK-NEXT: Kind: FUNCTION -; CHECK-NEXT: Index: 1 +; CHECK-NEXT: Index: 0 ; CHECK-NEXT: - Name: start_alias ; CHECK-NEXT: Kind: FUNCTION -; CHECK-NEXT: Index: 1 +; CHECK-NEXT: Index: 0 ; CHECK-NEXT: - Type: CODE ; CHECK-NEXT: Functions: ; CHECK-NEXT: - Index: 0 ; CHECK-NEXT: Locals: ; CHECK-NEXT: Body: 0B -; CHECK-NEXT: - Index: 1 -; CHECK-NEXT: Locals: -; CHECK-NEXT: Body: 0B ; CHECK-NEXT: - Type: CUSTOM ; CHECK-NEXT: Name: name ; CHECK-NEXT: FunctionNames: ; CHECK-NEXT: - Index: 0 -; CHECK-NEXT: Name: __wasm_call_ctors -; CHECK-NEXT: - Index: 1 ; CHECK-NEXT: Name: _start ; CHECK-NEXT: ... diff --git a/lld/test/wasm/archive-export.ll b/lld/test/wasm/archive-export.ll index 37256ce37244b..750b999866c04 100644 --- a/lld/test/wasm/archive-export.ll +++ b/lld/test/wasm/archive-export.ll @@ -22,16 +22,16 @@ CHECK-NEXT: Kind: GLOBAL CHECK-NEXT: Index: 2 CHECK-NEXT: - Name: foo CHECK-NEXT: Kind: FUNCTION -CHECK-NEXT: Index: 2 +CHECK-NEXT: Index: 1 CHECK-NEXT: - Name: bar CHECK-NEXT: Kind: FUNCTION -CHECK-NEXT: Index: 3 +CHECK-NEXT: Index: 2 CHECK-NEXT: - Name: archive2_symbol CHECK-NEXT: Kind: FUNCTION -CHECK-NEXT: Index: 4 +CHECK-NEXT: Index: 3 CHECK-NEXT: - Name: _start CHECK-NEXT: Kind: FUNCTION -CHECK-NEXT: Index: 1 +CHECK-NEXT: Index: 0 CHECK-NEXT: - Type: CODE NOEXPORT: Exports: @@ -46,5 +46,5 @@ NOEXPORT-NEXT: Kind: GLOBAL NOEXPORT-NEXT: Index: 2 NOEXPORT-NEXT: - Name: _start NOEXPORT-NEXT: Kind: FUNCTION -NOEXPORT-NEXT: Index: 1 +NOEXPORT-NEXT: Index: 0 NOEXPORT-NEXT: - Type: CODE diff --git a/lld/test/wasm/archive-weak-undefined.ll b/lld/test/wasm/archive-weak-undefined.ll index 3b92612c4942e..0285724e5b86c 100644 --- a/lld/test/wasm/archive-weak-undefined.ll +++ b/lld/test/wasm/archive-weak-undefined.ll @@ -15,5 +15,5 @@ entry: ret void } -; CHECK: Name: undefined function ret32 +; CHECK: Name: 'undefined:ret32' ; CHECK-NOT: Name: ret32 diff --git a/lld/test/wasm/call-indirect.ll b/lld/test/wasm/call-indirect.ll index 7f8fe474f414d..bbc6c0bcaa5e4 100644 --- a/lld/test/wasm/call-indirect.ll +++ b/lld/test/wasm/call-indirect.ll @@ -57,7 +57,7 @@ define void @call_ptr(i64 (i64)* %arg) { ; CHECK-NEXT: ParamTypes: ; CHECK-NEXT: - I32 ; CHECK-NEXT: - Type: FUNCTION -; CHECK-NEXT: FunctionTypes: [ 3, 0, 3, 1, 3, 4 ] +; CHECK-NEXT: FunctionTypes: [ 0, 3, 1, 3, 4 ] ; CHECK-NEXT: - Type: TABLE ; CHECK-NEXT: Tables: ; CHECK-NEXT: - ElemType: FUNCREF @@ -107,54 +107,51 @@ define void @call_ptr(i64 (i64)* %arg) { ; CHECK-NEXT: Index: 2 ; CHECK-NEXT: - Name: bar ; CHECK-NEXT: Kind: FUNCTION -; CHECK-NEXT: Index: 1 +; CHECK-NEXT: Index: 0 ; CHECK-NEXT: - Name: call_bar_indirect ; CHECK-NEXT: Kind: FUNCTION -; CHECK-NEXT: Index: 2 +; CHECK-NEXT: Index: 1 ; CHECK-NEXT: - Name: foo ; CHECK-NEXT: Kind: FUNCTION -; CHECK-NEXT: Index: 3 +; CHECK-NEXT: Index: 2 ; CHECK-NEXT: - Name: _start ; CHECK-NEXT: Kind: FUNCTION -; CHECK-NEXT: Index: 4 +; CHECK-NEXT: Index: 3 ; CHECK-NEXT: - Name: indirect_func ; CHECK-NEXT: Kind: GLOBAL ; CHECK-NEXT: Index: 3 ; CHECK-NEXT: - Name: call_ptr ; CHECK-NEXT: Kind: FUNCTION -; CHECK-NEXT: Index: 5 +; CHECK-NEXT: Index: 4 ; CHECK-NEXT: - Type: ELEM ; CHECK-NEXT: Segments: ; CHECK-NEXT: - Offset: ; CHECK-NEXT: Opcode: I32_CONST ; CHECK-NEXT: Value: 1 -; CHECK-NEXT: Functions: [ 1, 3 ] +; CHECK-NEXT: Functions: [ 0, 2 ] ; CHECK-NEXT: - Type: CODE ; CHECK-NEXT: Functions: ; CHECK-NEXT: - Index: 0 ; CHECK-NEXT: Locals: -; CHECK-NEXT: Body: 0B -; CHECK-NEXT: - Index: 1 -; CHECK-NEXT: Locals: ; CHECK-NEXT: Body: 42010B -; CHECK-NEXT: - Index: 2 +; CHECK-NEXT: - Index: 1 ; CHECK-NEXT: Locals: ; CHECK-NEXT: - Type: I32 ; CHECK-NEXT: Count: 1 ; CHECK-NEXT: Body: 4100280284888080002100410028028088808000118080808000001A2000118180808000001A0B -; CHECK-NEXT: - Index: 3 +; CHECK-NEXT: - Index: 2 ; CHECK-NEXT: Locals: ; CHECK-NEXT: Body: 41020B -; CHECK-NEXT: - Index: 4 +; CHECK-NEXT: - Index: 3 ; CHECK-NEXT: Locals: ; CHECK-NEXT: Body: 410028028888808000118180808000001A0B -; CHECK-NEXT: - Index: 5 +; CHECK-NEXT: - Index: 4 ; CHECK-NEXT: Locals: ; CHECK-NEXT: Body: 42012000118280808000001A0B ; CHECK-NEXT: - Type: DATA ; CHECK-NEXT: Segments: ; CHECK-NEXT: - SectionOffset: 7 -; CHECK-NEXT: MemoryIndex: 0 +; CHECK-NEXT: InitFlags: 0 ; CHECK-NEXT: Offset: ; CHECK-NEXT: Opcode: I32_CONST ; CHECK-NEXT: Value: 1024 @@ -163,15 +160,13 @@ define void @call_ptr(i64 (i64)* %arg) { ; CHECK-NEXT: Name: name ; CHECK-NEXT: FunctionNames: ; CHECK-NEXT: - Index: 0 -; CHECK-NEXT: Name: __wasm_call_ctors -; CHECK-NEXT: - Index: 1 ; CHECK-NEXT: Name: bar -; CHECK-NEXT: - Index: 2 +; CHECK-NEXT: - Index: 1 ; CHECK-NEXT: Name: call_bar_indirect -; CHECK-NEXT: - Index: 3 +; CHECK-NEXT: - Index: 2 ; CHECK-NEXT: Name: foo -; CHECK-NEXT: - Index: 4 +; CHECK-NEXT: - Index: 3 ; CHECK-NEXT: Name: _start -; CHECK-NEXT: - Index: 5 +; CHECK-NEXT: - Index: 4 ; CHECK-NEXT: Name: call_ptr ; CHECK-NEXT: ... diff --git a/lld/test/wasm/comdats.ll b/lld/test/wasm/comdats.ll index 9baea22050efb..1dfedbb7a66ee 100644 --- a/lld/test/wasm/comdats.ll +++ b/lld/test/wasm/comdats.ll @@ -53,46 +53,43 @@ entry: ; CHECK-NEXT: Index: 2 ; CHECK-NEXT: - Name: _start ; CHECK-NEXT: Kind: FUNCTION -; CHECK-NEXT: Index: 1 +; CHECK-NEXT: Index: 0 ; CHECK-NEXT: - Name: inlineFn ; CHECK-NEXT: Kind: FUNCTION -; CHECK-NEXT: Index: 2 +; CHECK-NEXT: Index: 1 ; CHECK-NEXT: - Name: constantData ; CHECK-NEXT: Kind: GLOBAL ; CHECK-NEXT: Index: 3 ; CHECK-NEXT: - Name: callInline1 ; CHECK-NEXT: Kind: FUNCTION -; CHECK-NEXT: Index: 3 +; CHECK-NEXT: Index: 2 ; CHECK-NEXT: - Name: callInline2 ; CHECK-NEXT: Kind: FUNCTION -; CHECK-NEXT: Index: 4 +; CHECK-NEXT: Index: 3 ; CHECK-NEXT: - Type: ELEM ; CHECK-NEXT: Segments: ; CHECK-NEXT: - Offset: ; CHECK-NEXT: Opcode: I32_CONST ; CHECK-NEXT: Value: 1 -; CHECK-NEXT: Functions: [ 2 ] +; CHECK-NEXT: Functions: [ 1 ] ; CHECK-NEXT: - Type: CODE ; CHECK-NEXT: Functions: ; CHECK-NEXT: - Index: 0 ; CHECK-NEXT: Locals: -; CHECK-NEXT: Body: 0B +; CHECK-NEXT: Body: 1081808080001A0B ; CHECK-NEXT: - Index: 1 ; CHECK-NEXT: Locals: -; CHECK-NEXT: Body: 1082808080001A0B -; CHECK-NEXT: - Index: 2 -; CHECK-NEXT: Locals: ; CHECK-NEXT: Body: 4180888080000B -; CHECK-NEXT: - Index: 3 +; CHECK-NEXT: - Index: 2 ; CHECK-NEXT: Locals: ; CHECK-NEXT: Body: 4181808080000B -; CHECK-NEXT: - Index: 4 +; CHECK-NEXT: - Index: 3 ; CHECK-NEXT: Locals: ; CHECK-NEXT: Body: 4181808080000B ; CHECK-NEXT: - Type: DATA ; CHECK-NEXT: Segments: ; CHECK-NEXT: - SectionOffset: 7 -; CHECK-NEXT: MemoryIndex: 0 +; CHECK-NEXT: InitFlags: 0 ; CHECK-NEXT: Offset: ; CHECK-NEXT: Opcode: I32_CONST ; CHECK-NEXT: Value: 1024 diff --git a/lld/test/wasm/cxx-mangling.ll b/lld/test/wasm/cxx-mangling.ll index e1f4ea4950a64..854383b43726b 100644 --- a/lld/test/wasm/cxx-mangling.ll +++ b/lld/test/wasm/cxx-mangling.ll @@ -34,35 +34,30 @@ define void @_start() { ; CHECK-NEXT: Index: 2 ; CHECK-NEXT: - Name: _Z3fooi ; CHECK-NEXT: Kind: FUNCTION -; CHECK-NEXT: Index: 2 +; CHECK-NEXT: Index: 1 ; CHECK-NEXT: - Name: _start ; CHECK-NEXT: Kind: FUNCTION -; CHECK-NEXT: Index: 3 +; CHECK-NEXT: Index: 2 ; CHECK-NEXT: - Type: CODE ; CHECK-NEXT: Functions: ; CHECK-NEXT: - Index: 0 ; CHECK-NEXT: Locals: -; CHECK-NEXT: Body: 0B -; CHECK-NEXT: - Index: 1 -; CHECK-NEXT: Locals: ; CHECK-NEXT: Body: 000B -; CHECK-NEXT: - Index: 2 +; CHECK-NEXT: - Index: 1 ; CHECK-NEXT: Locals: ; CHECK-NEXT: Body: 0B -; CHECK-NEXT: - Index: 3 +; CHECK-NEXT: - Index: 2 ; CHECK-NEXT: Locals: -; CHECK-NEXT: Body: 410110828080800041011081808080000B +; CHECK-NEXT: Body: 410110818080800041011080808080000B ; CHECK-NEXT: - Type: CUSTOM ; CHECK-NEXT: Name: name ; CHECK-NEXT: FunctionNames: ; CHECK-NEXT: - Index: 0 -; CHECK-NEXT: Name: __wasm_call_ctors +; DEMANGLE-NEXT: Name: 'undefined:bar(int)' +; MANGLE-NEXT: Name: 'undefined:_Z3bari' ; CHECK-NEXT: - Index: 1 -; DEMANGLE-NEXT: Name: 'undefined function bar(int)' -; MANGLE-NEXT: Name: undefined function _Z3bari -; CHECK-NEXT: - Index: 2 ; DEMANGLE-NEXT: Name: 'foo(int)' ; MANGLE-NEXT: Name: _Z3fooi -; CHECK-NEXT: - Index: 3 +; CHECK-NEXT: - Index: 2 ; CHECK-NEXT: Name: _start ; CHECK-NEXT: ... diff --git a/lld/test/wasm/data-layout.ll b/lld/test/wasm/data-layout.ll index 7c215efb0d8f4..4feaf8c0e4cea 100644 --- a/lld/test/wasm/data-layout.ll +++ b/lld/test/wasm/data-layout.ll @@ -37,20 +37,20 @@ target triple = "wasm32-unknown-unknown" ; CHECK: - Type: DATA ; CHECK-NEXT: Segments: ; CHECK-NEXT: - SectionOffset: 7 -; CHECK-NEXT: MemoryIndex: 0 +; CHECK-NEXT: InitFlags: 0 ; CHECK-NEXT: Offset: ; CHECK-NEXT: Opcode: I32_CONST ; CHECK-NEXT: Value: 1024 ; CHECK-NEXT: Content: '0100000000000000000000000000000003000000000000002804000024040000' ; CHECK-NEXT: - SectionOffset: 45 -; CHECK-NEXT: MemoryIndex: 0 +; CHECK-NEXT: InitFlags: 0 ; CHECK-NEXT: Offset: ; CHECK-NEXT: Opcode: I32_CONST ; CHECK-NEXT: Value: 1056 ; CHECK-NEXT: Content: '0000000000000000' ; CHECK-NEXT: - SectionOffset: 59 -; CHECK-NEXT: MemoryIndex: 0 -; CHECK-NEXT: Offset: +; CHECK-NEXT: InitFlags: 0 +; CHECK-NEXT: Offset: ; CHECK-NEXT: Opcode: I32_CONST ; CHECK-NEXT: Value: 1064 ; CHECK-NEXT: Content: 68656C6C6F0A00 @@ -84,46 +84,46 @@ target triple = "wasm32-unknown-unknown" ; RELOC: - Type: DATA ; RELOC-NEXT: Relocations: -; RELOC-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_I32 +; RELOC-NEXT: - Type: R_WASM_MEMORY_ADDR_I32 ; RELOC-NEXT: Index: 3 ; RELOC-NEXT: Offset: 0x00000018 -; RELOC-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_I32 +; RELOC-NEXT: - Type: R_WASM_MEMORY_ADDR_I32 ; RELOC-NEXT: Index: 4 ; RELOC-NEXT: Offset: 0x0000002E ; RELOC-NEXT: Addend: 4 ; RELOC-NEXT: Segments: ; RELOC-NEXT: - SectionOffset: 6 -; RELOC-NEXT: MemoryIndex: 0 +; RELOC-NEXT: InitFlags: 0 ; RELOC-NEXT: Offset: ; RELOC-NEXT: Opcode: I32_CONST ; RELOC-NEXT: Value: 0 ; RELOC-NEXT: Content: '01000000' ; RELOC-NEXT: - SectionOffset: 15 -; RELOC-NEXT: MemoryIndex: 0 +; RELOC-NEXT: InitFlags: 0 ; RELOC-NEXT: Offset: ; RELOC-NEXT: Opcode: I32_CONST ; RELOC-NEXT: Value: 16 ; RELOC-NEXT: Content: '03000000' ; RELOC-NEXT: - SectionOffset: 24 -; RELOC-NEXT: MemoryIndex: 0 +; RELOC-NEXT: InitFlags: 0 ; RELOC-NEXT: Offset: ; RELOC-NEXT: Opcode: I32_CONST ; RELOC-NEXT: Value: 24 ; RELOC-NEXT: Content: '28000000' ; RELOC-NEXT: - SectionOffset: 33 -; RELOC-NEXT: MemoryIndex: 0 -; RELOC-NEXT: Offset: +; RELOC-NEXT: InitFlags: 0 +; RELOC-NEXT: Offset: ; RELOC-NEXT: Opcode: I32_CONST ; RELOC-NEXT: Value: 28 ; RELOC-NEXT: Content: '0000000000000000' ; RELOC-NEXT: - SectionOffset: 46 -; RELOC-NEXT: MemoryIndex: 0 -; RELOC-NEXT: Offset: +; RELOC-NEXT: InitFlags: 0 +; RELOC-NEXT: Offset: ; RELOC-NEXT: Opcode: I32_CONST ; RELOC-NEXT: Value: 36 ; RELOC-NEXT: Content: '20000000' ; RELOC-NEXT: - SectionOffset: 55 -; RELOC-NEXT: MemoryIndex: 0 +; RELOC-NEXT: InitFlags: 0 ; RELOC-NEXT: Offset: ; RELOC-NEXT: Opcode: I32_CONST ; RELOC-NEXT: Value: 40 diff --git a/lld/test/wasm/entry.ll b/lld/test/wasm/entry.ll index 30fff9a2bdcb2..a2fba3e98e732 100644 --- a/lld/test/wasm/entry.ll +++ b/lld/test/wasm/entry.ll @@ -25,7 +25,7 @@ entry: ; CHECK-NEXT: Index: 2 ; CHECK-NEXT: - Name: entry ; CHECK-NEXT: Kind: FUNCTION -; CHECK-NEXT: Index: 1 +; CHECK-NEXT: Index: 0 ; CHECK-NEXT: - Type: ; The __wasm_call_ctors is somewhat special since its created by the linker. diff --git a/lld/test/wasm/export.ll b/lld/test/wasm/export.ll index 519aafebbe232..feda87f4d58b1 100644 --- a/lld/test/wasm/export.ll +++ b/lld/test/wasm/export.ll @@ -3,13 +3,29 @@ ; RUN: wasm-ld --export=hidden_function -o %t.wasm %t.o ; RUN: obj2yaml %t.wasm | FileCheck %s +@llvm.used = appending global [1 x i8*] [i8* bitcast (i32 ()* @used_function to i8*)], section "llvm.metadata" + target triple = "wasm32-unknown-unknown" +; Not exported by default, but forced via commandline define hidden i32 @hidden_function() local_unnamed_addr { entry: ret i32 0 } +; Not exported by default +define i32 @default_function() local_unnamed_addr { +entry: + ret i32 0 +} + +; Exported because its part of llvm.used +define i32 @used_function() local_unnamed_addr { +entry: + ret i32 0 +} + +; Exported by default define void @_start() local_unnamed_addr { entry: ret void @@ -17,6 +33,8 @@ entry: ; CHECK-ERROR: error: symbol exported via --export not found: missing +; CHECK-NOT: - Name: default_function + ; CHECK: - Type: EXPORT ; CHECK-NEXT: Exports: ; CHECK-NEXT: - Name: memory @@ -30,6 +48,9 @@ entry: ; CHECK-NEXT: Index: 2 ; CHECK-NEXT: - Name: hidden_function ; CHECK-NEXT: Kind: FUNCTION +; CHECK-NEXT: Index: 0 +; CHECK-NEXT: - Name: used_function +; CHECK-NEXT: Kind: FUNCTION ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: - Name: _start ; CHECK-NEXT: Kind: FUNCTION diff --git a/lld/test/wasm/fatal-warnings.ll b/lld/test/wasm/fatal-warnings.ll index 0007dc203f02b..d338420ef09c3 100644 --- a/lld/test/wasm/fatal-warnings.ll +++ b/lld/test/wasm/fatal-warnings.ll @@ -1,7 +1,7 @@ ; RUN: llc -filetype=obj %s -o %t.main.o ; RUN: llc -filetype=obj %p/Inputs/ret32.ll -o %t.ret32.o -; RUN: lld -flavor wasm -o %t.wasm %t.main.o %t.ret32.o 2>&1 | FileCheck %s -check-prefix=CHECK-WARN -; RUN: not lld -flavor wasm --fatal-warnings -o %t.wasm %t.main.o %t.ret32.o 2>&1 | FileCheck %s -check-prefix=CHECK-FATAL +; RUN: wasm-ld -o %t.wasm %t.main.o %t.ret32.o 2>&1 | FileCheck %s -check-prefix=CHECK-WARN +; RUN: not wasm-ld --fatal-warnings -o %t.wasm %t.main.o %t.ret32.o 2>&1 | FileCheck %s -check-prefix=CHECK-FATAL ; CHECK-WARN: warning: function signature mismatch: ret32 ; CHECK-FATAL: error: function signature mismatch: ret32 diff --git a/lld/test/wasm/function-imports-first.ll b/lld/test/wasm/function-imports-first.ll index 00c73741b066f..04583bb548172 100644 --- a/lld/test/wasm/function-imports-first.ll +++ b/lld/test/wasm/function-imports-first.ll @@ -24,25 +24,20 @@ declare i32 @ret32(float) local_unnamed_addr #1 ; CHECK-NEXT: ParamTypes: ; CHECK-NEXT: - F32 ; CHECK: - Type: FUNCTION -; CHECK-NEXT: FunctionTypes: [ 0, 0, 1 ] +; CHECK-NEXT: FunctionTypes: [ 0, 1 ] ; CHECK: - Type: CODE ; CHECK-NEXT: Functions: ; CHECK-NEXT: - Index: 0 ; CHECK-NEXT: Locals: -; CHECK-NEXT: Body: 0B +; CHECK-NEXT: Body: 43000000001081808080001A0B ; CHECK-NEXT: - Index: 1 ; CHECK-NEXT: Locals: -; CHECK-NEXT: Body: 43000000001082808080001A0B -; CHECK-NEXT: - Index: 2 -; CHECK-NEXT: Locals: ; CHECK-NEXT: Body: 41000B ; CHECK-NEXT: - Type: CUSTOM ; CHECK-NEXT: Name: name ; CHECK-NEXT: FunctionNames: ; CHECK-NEXT: - Index: 0 -; CHECK-NEXT: Name: __wasm_call_ctors -; CHECK-NEXT: - Index: 1 ; CHECK-NEXT: Name: _start -; CHECK-NEXT: - Index: 2 +; CHECK-NEXT: - Index: 1 ; CHECK-NEXT: Name: ret32 ; CHECK-NEXT: ... diff --git a/lld/test/wasm/function-imports.ll b/lld/test/wasm/function-imports.ll index a2c6405b0565e..a21f6b509e2ff 100644 --- a/lld/test/wasm/function-imports.ll +++ b/lld/test/wasm/function-imports.ll @@ -18,25 +18,22 @@ declare i32 @ret32(float) local_unnamed_addr #1 ; CHECK: - Type: TYPE ; CHECK-NEXT: Signatures: ; CHECK-NEXT: - Index: 0 -; CHECK-NEXT: ReturnType: NORESULT -; CHECK-NEXT: ParamTypes: -; CHECK-NEXT: - Index: 1 ; CHECK-NEXT: ReturnType: I32 ; CHECK-NEXT: ParamTypes: ; CHECK-NEXT: - F32 +; CHECK-NEXT: - Index: 1 +; CHECK-NEXT: ReturnType: NORESULT +; CHECK-NEXT: ParamTypes: ; CHECK-NEXT: - Type: FUNCTION -; CHECK-NEXT: FunctionTypes: [ 0, 1, 0 ] +; CHECK-NEXT: FunctionTypes: [ 0, 1 ] ; CHECK: - Type: CODE ; CHECK-NEXT: Functions: ; CHECK: - Index: 0 ; CHECK: - Index: 1 -; CHECK: - Index: 2 ; CHECK: Name: name ; CHECK-NEXT: FunctionNames: ; CHECK-NEXT: - Index: 0 -; CHECK-NEXT: Name: __wasm_call_ctors -; CHECK-NEXT: - Index: 1 ; CHECK-NEXT: Name: ret32 -; CHECK-NEXT: - Index: 2 +; CHECK-NEXT: - Index: 1 ; CHECK-NEXT: Name: _start ; CHECK-NEXT: ... diff --git a/lld/test/wasm/gc-imports.ll b/lld/test/wasm/gc-imports.ll index fbcb74dbdd3e3..68d403765916b 100644 --- a/lld/test/wasm/gc-imports.ll +++ b/lld/test/wasm/gc-imports.ll @@ -43,10 +43,8 @@ entry: ; CHECK-NEXT: - Index: 0 ; CHECK-NEXT: Name: used_undef_function ; CHECK-NEXT: - Index: 1 -; CHECK-NEXT: Name: __wasm_call_ctors -; CHECK-NEXT: - Index: 2 ; CHECK-NEXT: Name: _start -; CHECK-NEXT: - Index: 3 +; CHECK-NEXT: - Index: 2 ; CHECK-NEXT: Name: use_undef_global ; CHECK-NEXT: ... diff --git a/lld/test/wasm/gc-sections.ll b/lld/test/wasm/gc-sections.ll index 57b69738a6f3c..fbb4b2be17e26 100644 --- a/lld/test/wasm/gc-sections.ll +++ b/lld/test/wasm/gc-sections.ll @@ -38,10 +38,10 @@ entry: ; CHECK: - Type: TYPE ; CHECK-NEXT: Signatures: ; CHECK-NEXT: - Index: 0 -; CHECK-NEXT: ReturnType: NORESULT +; CHECK-NEXT: ReturnType: I32 ; CHECK-NEXT: ParamTypes: ; CHECK-NEXT: - Index: 1 -; CHECK-NEXT: ReturnType: I32 +; CHECK-NEXT: ReturnType: NORESULT ; CHECK-NEXT: ParamTypes: ; CHECK-NEXT: - Index: 2 ; CHECK-NEXT: ReturnType: I64 @@ -66,8 +66,8 @@ entry: ; CHECK: - Type: DATA ; CHECK-NEXT: Segments: ; CHECK-NEXT: - SectionOffset: 7 -; CHECK-NEXT: MemoryIndex: 0 -; CHECK-NEXT: Offset: +; CHECK-NEXT: InitFlags: 0 +; CHECK-NEXT: Offset: ; CHECK-NEXT: Opcode: I32_CONST ; CHECK-NEXT: Value: 1024 ; CHECK-NEXT: Content: '02000000' @@ -75,12 +75,10 @@ entry: ; CHECK-NEXT: Name: name ; CHECK-NEXT: FunctionNames: ; CHECK-NEXT: - Index: 0 -; CHECK-NEXT: Name: __wasm_call_ctors -; CHECK-NEXT: - Index: 1 ; CHECK-NEXT: Name: used_function -; CHECK-NEXT: - Index: 2 +; CHECK-NEXT: - Index: 1 ; CHECK-NEXT: Name: _start -; CHECK-NEXT: - Index: 3 +; CHECK-NEXT: - Index: 2 ; CHECK-NEXT: Name: use_global ; CHECK-NEXT: ... @@ -129,8 +127,8 @@ entry: ; NO-GC: - Type: DATA ; NO-GC-NEXT: Segments: ; NO-GC-NEXT: - SectionOffset: 7 -; NO-GC-NEXT: MemoryIndex: 0 -; NO-GC-NEXT: Offset: +; NO-GC-NEXT: InitFlags: 0 +; NO-GC-NEXT: Offset: ; NO-GC-NEXT: Opcode: I32_CONST ; NO-GC-NEXT: Value: 1024 ; NO-GC-NEXT: Content: '010000000000000002000000' diff --git a/lld/test/wasm/import-names.ll b/lld/test/wasm/import-names.ll new file mode 100644 index 0000000000000..a3953d3356198 --- /dev/null +++ b/lld/test/wasm/import-names.ll @@ -0,0 +1,27 @@ +; RUN: llc -filetype=obj %s -o %t.o +; RUN: wasm-ld --allow-undefined -o %t.wasm %t.o +; RUN: obj2yaml %t.wasm | FileCheck %s + +target triple = "wasm32-unknown-unknown" + +declare void @f0() #0 + +define void @_start() { + call void @f0() + ret void +} + +attributes #0 = { "wasm-import-module"="somewhere" "wasm-import-name"="something" } + +; CHECK: - Type: IMPORT +; CHECK-NEXT: Imports: +; CHECK-NEXT: - Module: somewhere +; CHECK-NEXT: Field: something +; CHECK-NEXT: Kind: FUNCTION +; CHECK-NEXT: SigIndex: 0 + +; CHECK: - Type: CUSTOM +; CHECK-NEXT: Name: name +; CHECK-NEXT: FunctionNames: +; CHECK-NEXT: - Index: 0 +; CHECK-NEXT: Name: f0 diff --git a/lld/test/wasm/init-fini-gc.ll b/lld/test/wasm/init-fini-gc.ll new file mode 100644 index 0000000000000..4b2c14bd68585 --- /dev/null +++ b/lld/test/wasm/init-fini-gc.ll @@ -0,0 +1,48 @@ +; RUN: llc -filetype=obj -o %t.o %s +; RUN: wasm-ld %t.o -o %t.wasm +; RUN: obj2yaml %t.wasm | FileCheck %s + +; RUN: wasm-ld %t.o -o %t.wasm +; RUN: obj2yaml %t.wasm | FileCheck %s + +; RUN: wasm-ld --export=__wasm_call_ctors %t.o -o %t.export.wasm +; RUN: obj2yaml %t.export.wasm | FileCheck %s -check-prefix=EXPORT + +; Test that the __wasm_call_ctor function if not referenced + +target triple = "wasm32-unknown-unknown" + +define hidden void @_start() { +entry: + ret void +} + +define hidden void @func1() { +entry: + ret void +} + +define hidden void @func2() { +entry: + ret void +} + +define i32 @__cxa_atexit(i32 %func, i32 %arg, i32 %dso_handle) { + ret i32 0 +} + +@llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [ + { i32, void ()*, i8* } { i32 1, void ()* @func1, i8* null } +] + +@llvm.global_dtors = appending global [1 x { i32, void ()*, i8* }] [ + { i32, void ()*, i8* } { i32 1, void ()* @func2, i8* null } +] + +; CHECK-NOT: __cxa_atexit +; CHECK-NOT: __wasm_call_ctors + +; EXPORT: __wasm_call_ctors +; EXPORT: func1 +; EXPORT: func2 +; EXPORT: __cxa_atexit diff --git a/lld/test/wasm/init-fini.ll b/lld/test/wasm/init-fini.ll index b17020b177c71..57be1a60d2d00 100644 --- a/lld/test/wasm/init-fini.ll +++ b/lld/test/wasm/init-fini.ll @@ -25,6 +25,7 @@ entry: declare hidden void @externCtor() declare hidden void @externDtor() +declare hidden void @__wasm_call_ctors() define i32 @__cxa_atexit(i32 %func, i32 %arg, i32 %dso_handle) { ret i32 0 @@ -32,6 +33,7 @@ define i32 @__cxa_atexit(i32 %func, i32 %arg, i32 %dso_handle) { define hidden void @_start() { entry: + call void @__wasm_call_ctors(); ret void } @@ -75,7 +77,7 @@ entry: ; CHECK-NEXT: Body: 10031004100A100F1012100F10141003100C100F10161001100E0B ; CHECK: - Index: 22 ; CHECK-NEXT: Locals: -; CHECK-NEXT: Body: 024041868080800041004180888080001087808080000D000F0B00000B +; CHECK-NEXT: Body: 02404186808080004100418088808000108780808000450D0000000B0B ; CHECK-NEXT: - Type: CUSTOM ; CHECK-NEXT: Name: name ; CHECK-NEXT: FunctionNames: @@ -127,202 +129,22 @@ entry: ; CHECK-NEXT: Name: .Lregister_call_dtors.2002 ; CHECK-NEXT: ... - ; RUN: wasm-ld -r %t.o %t.global-ctor-dtor.o -o %t.reloc.wasm -; RUN: obj2yaml %t.reloc.wasm | FileCheck -check-prefix=RELOC %s +; RUN: llvm-readobj --symbols --sections %t.reloc.wasm | FileCheck -check-prefix=RELOC %s -; RELOC: SymbolTable: -; RELOC-NEXT: - Index: 0 -; RELOC-NEXT: Kind: FUNCTION -; RELOC-NEXT: Name: func1 -; RELOC-NEXT: Flags: [ VISIBILITY_HIDDEN ] -; RELOC-NEXT: Function: 2 -; RELOC-NEXT: - Index: 1 -; RELOC-NEXT: Kind: FUNCTION -; RELOC-NEXT: Name: func2 -; RELOC-NEXT: Flags: [ VISIBILITY_HIDDEN ] -; RELOC-NEXT: Function: 3 -; RELOC-NEXT: - Index: 2 -; RELOC-NEXT: Kind: FUNCTION -; RELOC-NEXT: Name: func3 -; RELOC-NEXT: Flags: [ VISIBILITY_HIDDEN ] -; RELOC-NEXT: Function: 4 -; RELOC-NEXT: - Index: 3 -; RELOC-NEXT: Kind: FUNCTION -; RELOC-NEXT: Name: func4 -; RELOC-NEXT: Flags: [ VISIBILITY_HIDDEN ] -; RELOC-NEXT: Function: 5 -; RELOC-NEXT: - Index: 4 -; RELOC-NEXT: Kind: FUNCTION -; RELOC-NEXT: Name: __cxa_atexit -; RELOC-NEXT: Flags: [ ] -; RELOC-NEXT: Function: 6 -; RELOC-NEXT: - Index: 5 -; RELOC-NEXT: Kind: FUNCTION -; RELOC-NEXT: Name: _start -; RELOC-NEXT: Flags: [ VISIBILITY_HIDDEN ] -; RELOC-NEXT: Function: 7 -; RELOC-NEXT: - Index: 6 -; RELOC-NEXT: Kind: DATA -; RELOC-NEXT: Name: __dso_handle -; RELOC-NEXT: Flags: [ BINDING_WEAK, VISIBILITY_HIDDEN, UNDEFINED ] -; RELOC-NEXT: - Index: 7 -; RELOC-NEXT: Kind: FUNCTION -; RELOC-NEXT: Name: externDtor -; RELOC-NEXT: Flags: [ VISIBILITY_HIDDEN, UNDEFINED ] -; RELOC-NEXT: Function: 0 -; RELOC-NEXT: - Index: 8 -; RELOC-NEXT: Kind: FUNCTION -; RELOC-NEXT: Name: externCtor -; RELOC-NEXT: Flags: [ VISIBILITY_HIDDEN, UNDEFINED ] -; RELOC-NEXT: Function: 1 -; RELOC-NEXT: - Index: 9 -; RELOC-NEXT: Kind: FUNCTION -; RELOC-NEXT: Name: myctor -; RELOC-NEXT: Flags: [ VISIBILITY_HIDDEN ] -; RELOC-NEXT: Function: 14 -; RELOC-NEXT: - Index: 10 -; RELOC-NEXT: Kind: FUNCTION -; RELOC-NEXT: Name: mydtor -; RELOC-NEXT: Flags: [ VISIBILITY_HIDDEN ] -; RELOC-NEXT: Function: 15 -; RELOC-NEXT: - Index: 11 -; RELOC-NEXT: Kind: GLOBAL -; RELOC-NEXT: Name: __stack_pointer -; RELOC-NEXT: Flags: [ UNDEFINED ] -; RELOC-NEXT: Global: 0 -; RELOC-NEXT: - Index: 12 -; RELOC-NEXT: Kind: FUNCTION -; RELOC-NEXT: Name: .Lcall_dtors.101 -; RELOC-NEXT: Flags: [ BINDING_LOCAL ] -; RELOC-NEXT: Function: 8 -; RELOC-NEXT: - Index: 13 -; RELOC-NEXT: Kind: FUNCTION -; RELOC-NEXT: Name: .Lregister_call_dtors.101 -; RELOC-NEXT: Flags: [ BINDING_LOCAL ] -; RELOC-NEXT: Function: 9 -; RELOC-NEXT: - Index: 14 -; RELOC-NEXT: Kind: FUNCTION -; RELOC-NEXT: Name: .Lcall_dtors.1001 -; RELOC-NEXT: Flags: [ BINDING_LOCAL ] -; RELOC-NEXT: Function: 10 -; RELOC-NEXT: - Index: 15 -; RELOC-NEXT: Kind: FUNCTION -; RELOC-NEXT: Name: .Lregister_call_dtors.1001 -; RELOC-NEXT: Flags: [ BINDING_LOCAL ] -; RELOC-NEXT: Function: 11 -; RELOC-NEXT: - Index: 16 -; RELOC-NEXT: Kind: FUNCTION -; RELOC-NEXT: Name: .Lcall_dtors.4000 -; RELOC-NEXT: Flags: [ BINDING_LOCAL ] -; RELOC-NEXT: Function: 12 -; RELOC-NEXT: - Index: 17 -; RELOC-NEXT: Kind: FUNCTION -; RELOC-NEXT: Name: .Lregister_call_dtors.4000 -; RELOC-NEXT: Flags: [ BINDING_LOCAL ] -; RELOC-NEXT: Function: 13 -; RELOC-NEXT: - Index: 18 -; RELOC-NEXT: Kind: FUNCTION -; RELOC-NEXT: Name: .Lcall_dtors.101 -; RELOC-NEXT: Flags: [ BINDING_LOCAL ] -; RELOC-NEXT: Function: 16 -; RELOC-NEXT: - Index: 19 -; RELOC-NEXT: Kind: FUNCTION -; RELOC-NEXT: Name: .Lregister_call_dtors.101 -; RELOC-NEXT: Flags: [ BINDING_LOCAL ] -; RELOC-NEXT: Function: 17 -; RELOC-NEXT: - Index: 20 -; RELOC-NEXT: Kind: FUNCTION -; RELOC-NEXT: Name: .Lcall_dtors.202 -; RELOC-NEXT: Flags: [ BINDING_LOCAL ] -; RELOC-NEXT: Function: 18 -; RELOC-NEXT: - Index: 21 -; RELOC-NEXT: Kind: FUNCTION -; RELOC-NEXT: Name: .Lregister_call_dtors.202 -; RELOC-NEXT: Flags: [ BINDING_LOCAL ] -; RELOC-NEXT: Function: 19 -; RELOC-NEXT: - Index: 22 -; RELOC-NEXT: Kind: FUNCTION -; RELOC-NEXT: Name: .Lcall_dtors.2002 -; RELOC-NEXT: Flags: [ BINDING_LOCAL ] -; RELOC-NEXT: Function: 20 -; RELOC-NEXT: - Index: 23 -; RELOC-NEXT: Kind: FUNCTION -; RELOC-NEXT: Name: .Lregister_call_dtors.2002 -; RELOC-NEXT: Flags: [ BINDING_LOCAL ] -; RELOC-NEXT: Function: 21 -; RELOC-NEXT: InitFunctions: -; RELOC-NEXT: - Priority: 101 -; RELOC-NEXT: Symbol: 0 -; RELOC-NEXT: - Priority: 101 -; RELOC-NEXT: Symbol: 1 -; RELOC-NEXT: - Priority: 101 -; RELOC-NEXT: Symbol: 13 -; RELOC-NEXT: - Priority: 101 -; RELOC-NEXT: Symbol: 9 -; RELOC-NEXT: - Priority: 101 -; RELOC-NEXT: Symbol: 19 -; RELOC-NEXT: - Priority: 202 -; RELOC-NEXT: Symbol: 9 -; RELOC-NEXT: - Priority: 202 -; RELOC-NEXT: Symbol: 21 -; RELOC-NEXT: - Priority: 1001 -; RELOC-NEXT: Symbol: 0 -; RELOC-NEXT: - Priority: 1001 -; RELOC-NEXT: Symbol: 15 -; RELOC-NEXT: - Priority: 2002 -; RELOC-NEXT: Symbol: 9 -; RELOC-NEXT: - Priority: 2002 -; RELOC-NEXT: Symbol: 23 -; RELOC-NEXT: - Priority: 4000 -; RELOC-NEXT: Symbol: 8 -; RELOC-NEXT: - Priority: 4000 -; RELOC-NEXT: Symbol: 17 -; RELOC-NEXT: - Type: CUSTOM -; RELOC-NEXT: Name: name -; RELOC-NEXT: FunctionNames: -; RELOC-NEXT: - Index: 0 -; RELOC-NEXT: Name: externDtor -; RELOC-NEXT: - Index: 1 -; RELOC-NEXT: Name: externCtor -; RELOC-NEXT: - Index: 2 -; RELOC-NEXT: Name: func1 -; RELOC-NEXT: - Index: 3 -; RELOC-NEXT: Name: func2 -; RELOC-NEXT: - Index: 4 -; RELOC-NEXT: Name: func3 -; RELOC-NEXT: - Index: 5 -; RELOC-NEXT: Name: func4 -; RELOC-NEXT: - Index: 6 -; RELOC-NEXT: Name: __cxa_atexit -; RELOC-NEXT: - Index: 7 -; RELOC-NEXT: Name: _start -; RELOC-NEXT: - Index: 8 -; RELOC-NEXT: Name: .Lcall_dtors.101 -; RELOC-NEXT: - Index: 9 -; RELOC-NEXT: Name: .Lregister_call_dtors.101 -; RELOC-NEXT: - Index: 10 -; RELOC-NEXT: Name: .Lcall_dtors.1001 -; RELOC-NEXT: - Index: 11 -; RELOC-NEXT: Name: .Lregister_call_dtors.1001 -; RELOC-NEXT: - Index: 12 -; RELOC-NEXT: Name: .Lcall_dtors.4000 -; RELOC-NEXT: - Index: 13 -; RELOC-NEXT: Name: .Lregister_call_dtors.4000 -; RELOC-NEXT: - Index: 14 -; RELOC-NEXT: Name: myctor -; RELOC-NEXT: - Index: 15 -; RELOC-NEXT: Name: mydtor -; RELOC-NEXT: - Index: 16 -; RELOC-NEXT: Name: .Lcall_dtors.101 -; RELOC-NEXT: - Index: 17 -; RELOC-NEXT: Name: .Lregister_call_dtors.101 -; RELOC-NEXT: - Index: 18 -; RELOC-NEXT: Name: .Lcall_dtors.202 -; RELOC-NEXT: - Index: 19 -; RELOC-NEXT: Name: .Lregister_call_dtors.202 -; RELOC-NEXT: - Index: 20 -; RELOC-NEXT: Name: .Lcall_dtors.2002 -; RELOC-NEXT: - Index: 21 -; RELOC-NEXT: Name: .Lregister_call_dtors.2002 -; RELOC-NEXT: ... +; RELOC: Name: linking +; RELOC-NEXT: InitFunctions [ +; RELOC-NEXT: 0 (priority=101) +; RELOC-NEXT: 1 (priority=101) +; RELOC-NEXT: 14 (priority=101) +; RELOC-NEXT: 10 (priority=101) +; RELOC-NEXT: 20 (priority=101) +; RELOC-NEXT: 10 (priority=202) +; RELOC-NEXT: 22 (priority=202) +; RELOC-NEXT: 0 (priority=1001) +; RELOC-NEXT: 16 (priority=1001) +; RELOC-NEXT: 10 (priority=2002) +; RELOC-NEXT: 24 (priority=2002) +; RELOC-NEXT: 9 (priority=4000) +; RELOC-NEXT: 18 (priority=4000) +; RELOC-NEXT: ] diff --git a/lld/test/wasm/local-symbols.ll b/lld/test/wasm/local-symbols.ll index dd92b4ec9bc5d..284b8423cb9f0 100644 --- a/lld/test/wasm/local-symbols.ll +++ b/lld/test/wasm/local-symbols.ll @@ -27,13 +27,13 @@ entry: ; CHECK-NEXT: - Type: TYPE ; CHECK-NEXT: Signatures: ; CHECK-NEXT: - Index: 0 -; CHECK-NEXT: ReturnType: NORESULT +; CHECK-NEXT: ReturnType: I32 ; CHECK-NEXT: ParamTypes: ; CHECK-NEXT: - Index: 1 -; CHECK-NEXT: ReturnType: I32 +; CHECK-NEXT: ReturnType: NORESULT ; CHECK-NEXT: ParamTypes: ; CHECK-NEXT: - Type: FUNCTION -; CHECK-NEXT: FunctionTypes: [ 0, 1, 0 ] +; CHECK-NEXT: FunctionTypes: [ 0, 1 ] ; CHECK-NEXT: - Type: TABLE ; CHECK-NEXT: Tables: ; CHECK-NEXT: - ElemType: FUNCREF @@ -83,7 +83,7 @@ entry: ; CHECK-NEXT: Index: 2 ; CHECK-NEXT: - Name: _start ; CHECK-NEXT: Kind: FUNCTION -; CHECK-NEXT: Index: 2 +; CHECK-NEXT: Index: 1 ; CHECK-NEXT: - Name: foo ; CHECK-NEXT: Kind: GLOBAL ; CHECK-NEXT: Index: 3 @@ -91,17 +91,14 @@ entry: ; CHECK-NEXT: Functions: ; CHECK-NEXT: - Index: 0 ; CHECK-NEXT: Locals: -; CHECK-NEXT: Body: 0B -; CHECK-NEXT: - Index: 1 -; CHECK-NEXT: Locals: ; CHECK-NEXT: Body: 4100280284888080000B -; CHECK-NEXT: - Index: 2 +; CHECK-NEXT: - Index: 1 ; CHECK-NEXT: Locals: -; CHECK-NEXT: Body: 1081808080001A0B +; CHECK-NEXT: Body: 1080808080001A0B ; CHECK-NEXT: - Type: DATA ; CHECK-NEXT: Segments: ; CHECK-NEXT: - SectionOffset: 7 -; CHECK-NEXT: MemoryIndex: 0 +; CHECK-NEXT: InitFlags: 0 ; CHECK-NEXT: Offset: ; CHECK-NEXT: Opcode: I32_CONST ; CHECK-NEXT: Value: 1024 @@ -110,9 +107,7 @@ entry: ; CHECK-NEXT: Name: name ; CHECK-NEXT: FunctionNames: ; CHECK-NEXT: - Index: 0 -; CHECK-NEXT: Name: __wasm_call_ctors -; CHECK-NEXT: - Index: 1 ; CHECK-NEXT: Name: baz -; CHECK-NEXT: - Index: 2 +; CHECK-NEXT: - Index: 1 ; CHECK-NEXT: Name: _start ; CHECK-NEXT: ... diff --git a/lld/test/wasm/locals-duplicate.test b/lld/test/wasm/locals-duplicate.test index 74383bf429f69..28d7fd7883f4a 100644 --- a/lld/test/wasm/locals-duplicate.test +++ b/lld/test/wasm/locals-duplicate.test @@ -10,14 +10,11 @@ ; CHECK-NEXT: - Type: TYPE ; CHECK-NEXT: Signatures: ; CHECK-NEXT: - Index: 0 -; CHECK-NEXT: ReturnType: NORESULT -; CHECK-NEXT: ParamTypes: -; CHECK-NEXT: - Index: 1 ; CHECK-NEXT: ReturnType: I32 ; CHECK-NEXT: ParamTypes: ; CHECK-NEXT: - Type: FUNCTION -; CHECK-NEXT: FunctionTypes: [ 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -; CHECK-NEXT: 1, 1, 1 ] +; CHECK-NEXT: FunctionTypes: [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +; CHECK-NEXT: 0, 0 ] ; CHECK-NEXT: - Type: TABLE ; CHECK-NEXT: Tables: ; CHECK-NEXT: - ElemType: FUNCREF @@ -73,63 +70,63 @@ ; CHECK-NEXT: Index: 2 ; CHECK-NEXT: - Name: colliding_func2 ; CHECK-NEXT: Kind: FUNCTION -; CHECK-NEXT: Index: 2 +; CHECK-NEXT: Index: 1 ; CHECK-NEXT: - Name: get_global1A ; CHECK-NEXT: Kind: FUNCTION -; CHECK-NEXT: Index: 4 +; CHECK-NEXT: Index: 3 ; CHECK-NEXT: - Name: get_global2A ; CHECK-NEXT: Kind: FUNCTION -; CHECK-NEXT: Index: 5 +; CHECK-NEXT: Index: 4 ; CHECK-NEXT: - Name: colliding_global2 ; CHECK-NEXT: Kind: GLOBAL ; CHECK-NEXT: Index: 3 ; CHECK-NEXT: - Name: get_global3A ; CHECK-NEXT: Kind: FUNCTION -; CHECK-NEXT: Index: 6 +; CHECK-NEXT: Index: 5 ; CHECK-NEXT: - Name: get_func1A ; CHECK-NEXT: Kind: FUNCTION -; CHECK-NEXT: Index: 7 +; CHECK-NEXT: Index: 6 ; CHECK-NEXT: - Name: get_func2A ; CHECK-NEXT: Kind: FUNCTION -; CHECK-NEXT: Index: 8 +; CHECK-NEXT: Index: 7 ; CHECK-NEXT: - Name: get_func3A ; CHECK-NEXT: Kind: FUNCTION -; CHECK-NEXT: Index: 9 +; CHECK-NEXT: Index: 8 ; CHECK-NEXT: - Name: colliding_func1 ; CHECK-NEXT: Kind: FUNCTION -; CHECK-NEXT: Index: 10 +; CHECK-NEXT: Index: 9 ; CHECK-NEXT: - Name: get_global1B ; CHECK-NEXT: Kind: FUNCTION -; CHECK-NEXT: Index: 13 +; CHECK-NEXT: Index: 12 ; CHECK-NEXT: - Name: colliding_global1 ; CHECK-NEXT: Kind: GLOBAL ; CHECK-NEXT: Index: 4 ; CHECK-NEXT: - Name: get_global2B ; CHECK-NEXT: Kind: FUNCTION -; CHECK-NEXT: Index: 14 +; CHECK-NEXT: Index: 13 ; CHECK-NEXT: - Name: get_global3B ; CHECK-NEXT: Kind: FUNCTION -; CHECK-NEXT: Index: 15 +; CHECK-NEXT: Index: 14 ; CHECK-NEXT: - Name: get_func1B ; CHECK-NEXT: Kind: FUNCTION -; CHECK-NEXT: Index: 16 +; CHECK-NEXT: Index: 15 ; CHECK-NEXT: - Name: get_func2B ; CHECK-NEXT: Kind: FUNCTION -; CHECK-NEXT: Index: 17 +; CHECK-NEXT: Index: 16 ; CHECK-NEXT: - Name: get_func3B ; CHECK-NEXT: Kind: FUNCTION -; CHECK-NEXT: Index: 18 +; CHECK-NEXT: Index: 17 ; CHECK-NEXT: - Type: ELEM ; CHECK-NEXT: Segments: ; CHECK-NEXT: - Offset: ; CHECK-NEXT: Opcode: I32_CONST ; CHECK-NEXT: Value: 1 -; CHECK-NEXT: Functions: [ 1, 2, 3, 10, 11, 12 ] +; CHECK-NEXT: Functions: [ 0, 1, 2, 9, 10, 11 ] ; CHECK-NEXT: - Type: CODE ; CHECK-NEXT: Functions: ; CHECK-NEXT: - Index: 0 ; CHECK-NEXT: Locals: -; CHECK-NEXT: Body: 0B +; CHECK-NEXT: Body: 41020B ; CHECK-NEXT: - Index: 1 ; CHECK-NEXT: Locals: ; CHECK-NEXT: Body: 41020B @@ -138,25 +135,25 @@ ; CHECK-NEXT: Body: 41020B ; CHECK-NEXT: - Index: 3 ; CHECK-NEXT: Locals: -; CHECK-NEXT: Body: 41020B +; CHECK-NEXT: Body: 4180888080000B ; CHECK-NEXT: - Index: 4 ; CHECK-NEXT: Locals: -; CHECK-NEXT: Body: 4180888080000B +; CHECK-NEXT: Body: 4184888080000B ; CHECK-NEXT: - Index: 5 ; CHECK-NEXT: Locals: -; CHECK-NEXT: Body: 4184888080000B +; CHECK-NEXT: Body: 4188888080000B ; CHECK-NEXT: - Index: 6 ; CHECK-NEXT: Locals: -; CHECK-NEXT: Body: 4188888080000B +; CHECK-NEXT: Body: 4181808080000B ; CHECK-NEXT: - Index: 7 ; CHECK-NEXT: Locals: -; CHECK-NEXT: Body: 4181808080000B +; CHECK-NEXT: Body: 4182808080000B ; CHECK-NEXT: - Index: 8 ; CHECK-NEXT: Locals: -; CHECK-NEXT: Body: 4182808080000B +; CHECK-NEXT: Body: 4183808080000B ; CHECK-NEXT: - Index: 9 ; CHECK-NEXT: Locals: -; CHECK-NEXT: Body: 4183808080000B +; CHECK-NEXT: Body: 41020B ; CHECK-NEXT: - Index: 10 ; CHECK-NEXT: Locals: ; CHECK-NEXT: Body: 41020B @@ -165,29 +162,26 @@ ; CHECK-NEXT: Body: 41020B ; CHECK-NEXT: - Index: 12 ; CHECK-NEXT: Locals: -; CHECK-NEXT: Body: 41020B -; CHECK-NEXT: - Index: 13 -; CHECK-NEXT: Locals: ; CHECK-NEXT: Body: 418C888080000B -; CHECK-NEXT: - Index: 14 +; CHECK-NEXT: - Index: 13 ; CHECK-NEXT: Locals: ; CHECK-NEXT: Body: 4190888080000B -; CHECK-NEXT: - Index: 15 +; CHECK-NEXT: - Index: 14 ; CHECK-NEXT: Locals: ; CHECK-NEXT: Body: 4194888080000B -; CHECK-NEXT: - Index: 16 +; CHECK-NEXT: - Index: 15 ; CHECK-NEXT: Locals: ; CHECK-NEXT: Body: 4184808080000B -; CHECK-NEXT: - Index: 17 +; CHECK-NEXT: - Index: 16 ; CHECK-NEXT: Locals: ; CHECK-NEXT: Body: 4185808080000B -; CHECK-NEXT: - Index: 18 +; CHECK-NEXT: - Index: 17 ; CHECK-NEXT: Locals: ; CHECK-NEXT: Body: 4186808080000B ; CHECK-NEXT: - Type: DATA ; CHECK-NEXT: Segments: ; CHECK-NEXT: - SectionOffset: 7 -; CHECK-NEXT: MemoryIndex: 0 +; CHECK-NEXT: InitFlags: 0 ; CHECK-NEXT: Offset: ; CHECK-NEXT: Opcode: I32_CONST ; CHECK-NEXT: Value: 1024 @@ -196,42 +190,40 @@ ; CHECK-NEXT: Name: name ; CHECK-NEXT: FunctionNames: ; CHECK-NEXT: - Index: 0 -; CHECK-NEXT: Name: __wasm_call_ctors -; CHECK-NEXT: - Index: 1 ; CHECK-NEXT: Name: colliding_func1 -; CHECK-NEXT: - Index: 2 +; CHECK-NEXT: - Index: 1 ; CHECK-NEXT: Name: colliding_func2 -; CHECK-NEXT: - Index: 3 +; CHECK-NEXT: - Index: 2 ; CHECK-NEXT: Name: colliding_func3 -; CHECK-NEXT: - Index: 4 +; CHECK-NEXT: - Index: 3 ; CHECK-NEXT: Name: get_global1A -; CHECK-NEXT: - Index: 5 +; CHECK-NEXT: - Index: 4 ; CHECK-NEXT: Name: get_global2A -; CHECK-NEXT: - Index: 6 +; CHECK-NEXT: - Index: 5 ; CHECK-NEXT: Name: get_global3A -; CHECK-NEXT: - Index: 7 +; CHECK-NEXT: - Index: 6 ; CHECK-NEXT: Name: get_func1A -; CHECK-NEXT: - Index: 8 +; CHECK-NEXT: - Index: 7 ; CHECK-NEXT: Name: get_func2A -; CHECK-NEXT: - Index: 9 +; CHECK-NEXT: - Index: 8 ; CHECK-NEXT: Name: get_func3A -; CHECK-NEXT: - Index: 10 +; CHECK-NEXT: - Index: 9 ; CHECK-NEXT: Name: colliding_func1 -; CHECK-NEXT: - Index: 11 +; CHECK-NEXT: - Index: 10 ; CHECK-NEXT: Name: colliding_func2 -; CHECK-NEXT: - Index: 12 +; CHECK-NEXT: - Index: 11 ; CHECK-NEXT: Name: colliding_func3 -; CHECK-NEXT: - Index: 13 +; CHECK-NEXT: - Index: 12 ; CHECK-NEXT: Name: get_global1B -; CHECK-NEXT: - Index: 14 +; CHECK-NEXT: - Index: 13 ; CHECK-NEXT: Name: get_global2B -; CHECK-NEXT: - Index: 15 +; CHECK-NEXT: - Index: 14 ; CHECK-NEXT: Name: get_global3B -; CHECK-NEXT: - Index: 16 +; CHECK-NEXT: - Index: 15 ; CHECK-NEXT: Name: get_func1B -; CHECK-NEXT: - Index: 17 +; CHECK-NEXT: - Index: 16 ; CHECK-NEXT: Name: get_func2B -; CHECK-NEXT: - Index: 18 +; CHECK-NEXT: - Index: 17 ; CHECK-NEXT: Name: get_func3B ; CHECK-NEXT: ... @@ -269,40 +261,40 @@ ; RELOC-NEXT: Functions: [ 0, 1, 2, 9, 10, 11 ] ; RELOC-NEXT: - Type: CODE ; RELOC-NEXT: Relocations: -; RELOC-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_SLEB +; RELOC-NEXT: - Type: R_WASM_MEMORY_ADDR_SLEB ; RELOC-NEXT: Index: 18 ; RELOC-NEXT: Offset: 0x00000013 -; RELOC-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_SLEB +; RELOC-NEXT: - Type: R_WASM_MEMORY_ADDR_SLEB ; RELOC-NEXT: Index: 3 ; RELOC-NEXT: Offset: 0x0000001C -; RELOC-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_SLEB +; RELOC-NEXT: - Type: R_WASM_MEMORY_ADDR_SLEB ; RELOC-NEXT: Index: 19 ; RELOC-NEXT: Offset: 0x00000025 -; RELOC-NEXT: - Type: R_WEBASSEMBLY_TABLE_INDEX_SLEB +; RELOC-NEXT: - Type: R_WASM_TABLE_INDEX_SLEB ; RELOC-NEXT: Index: 16 ; RELOC-NEXT: Offset: 0x0000002E -; RELOC-NEXT: - Type: R_WEBASSEMBLY_TABLE_INDEX_SLEB +; RELOC-NEXT: - Type: R_WASM_TABLE_INDEX_SLEB ; RELOC-NEXT: Index: 0 ; RELOC-NEXT: Offset: 0x00000037 -; RELOC-NEXT: - Type: R_WEBASSEMBLY_TABLE_INDEX_SLEB +; RELOC-NEXT: - Type: R_WASM_TABLE_INDEX_SLEB ; RELOC-NEXT: Index: 17 ; RELOC-NEXT: Offset: 0x00000040 -; RELOC-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_SLEB +; RELOC-NEXT: - Type: R_WASM_MEMORY_ADDR_SLEB ; RELOC-NEXT: Index: 10 ; RELOC-NEXT: Offset: 0x00000058 -; RELOC-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_SLEB +; RELOC-NEXT: - Type: R_WASM_MEMORY_ADDR_SLEB ; RELOC-NEXT: Index: 22 ; RELOC-NEXT: Offset: 0x00000061 -; RELOC-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_SLEB +; RELOC-NEXT: - Type: R_WASM_MEMORY_ADDR_SLEB ; RELOC-NEXT: Index: 23 ; RELOC-NEXT: Offset: 0x0000006A -; RELOC-NEXT: - Type: R_WEBASSEMBLY_TABLE_INDEX_SLEB +; RELOC-NEXT: - Type: R_WASM_TABLE_INDEX_SLEB ; RELOC-NEXT: Index: 8 ; RELOC-NEXT: Offset: 0x00000073 -; RELOC-NEXT: - Type: R_WEBASSEMBLY_TABLE_INDEX_SLEB +; RELOC-NEXT: - Type: R_WASM_TABLE_INDEX_SLEB ; RELOC-NEXT: Index: 20 ; RELOC-NEXT: Offset: 0x0000007C -; RELOC-NEXT: - Type: R_WEBASSEMBLY_TABLE_INDEX_SLEB +; RELOC-NEXT: - Type: R_WASM_TABLE_INDEX_SLEB ; RELOC-NEXT: Index: 21 ; RELOC-NEXT: Offset: 0x00000085 ; RELOC-NEXT: Functions: @@ -363,19 +355,19 @@ ; RELOC-NEXT: - Type: DATA ; RELOC-NEXT: Segments: ; RELOC-NEXT: - SectionOffset: 6 -; RELOC-NEXT: MemoryIndex: 0 +; RELOC-NEXT: InitFlags: 0 ; RELOC-NEXT: Offset: ; RELOC-NEXT: Opcode: I32_CONST ; RELOC-NEXT: Value: 0 ; RELOC-NEXT: Content: '0000000000000000' ; RELOC-NEXT: - SectionOffset: 19 -; RELOC-NEXT: MemoryIndex: 0 +; RELOC-NEXT: InitFlags: 0 ; RELOC-NEXT: Offset: ; RELOC-NEXT: Opcode: I32_CONST ; RELOC-NEXT: Value: 8 ; RELOC-NEXT: Content: '0000000000000000' ; RELOC-NEXT: - SectionOffset: 32 -; RELOC-NEXT: MemoryIndex: 0 +; RELOC-NEXT: InitFlags: 0 ; RELOC-NEXT: Offset: ; RELOC-NEXT: Opcode: I32_CONST ; RELOC-NEXT: Value: 16 diff --git a/lld/test/wasm/lto/archive.ll b/lld/test/wasm/lto/archive.ll index ab067d8cdce46..89863bfea7032 100644 --- a/lld/test/wasm/lto/archive.ll +++ b/lld/test/wasm/lto/archive.ll @@ -18,8 +18,6 @@ declare void @f() ; CHECK: Name: name ; CHECK-NEXT: FunctionNames: ; CHECK-NEXT: - Index: 0 -; CHECK-NEXT: Name: __wasm_call_ctors -; CHECK-NEXT: - Index: 1 ; CHECK-NEXT: Name: _start -; CHECK-NEXT: - Index: 2 +; CHECK-NEXT: - Index: 1 ; CHECK-NEXT: Name: f diff --git a/lld/test/wasm/lto/atomics.ll b/lld/test/wasm/lto/atomics.ll index a5a82ae2a5fca..00340f12b2b50 100644 --- a/lld/test/wasm/lto/atomics.ll +++ b/lld/test/wasm/lto/atomics.ll @@ -1,7 +1,8 @@ ; RUN: llvm-as %s -o %t.o ; RUN: wasm-ld %t.o -o %t.wasm -lto-O0 -; Atomic operations with fail to compile if the ThreadModel is not -; correctly set to Single (i.e. if atomics are not lowered to regular ops). + +; Atomic operations will not fail to compile if atomics are not +; enabled because LLVM atomics will be lowered to regular ops. target datalayout = "e-m:e-p:32:32-i64:64-n32:64-S128" target triple = "wasm32-unknown-unknown-wasm" diff --git a/lld/test/wasm/lto/export.ll b/lld/test/wasm/lto/export.ll index 0ff0be504eda6..9a1b6dad68c03 100644 --- a/lld/test/wasm/lto/export.ll +++ b/lld/test/wasm/lto/export.ll @@ -31,8 +31,8 @@ entry: ; CHECK-NEXT: Index: 2 ; CHECK-NEXT: - Name: hidden_function ; CHECK-NEXT: Kind: FUNCTION -; CHECK-NEXT: Index: 1 +; CHECK-NEXT: Index: 0 ; CHECK-NEXT: - Name: _start ; CHECK-NEXT: Kind: FUNCTION -; CHECK-NEXT: Index: 2 +; CHECK-NEXT: Index: 1 ; CHECK-NEXT: - Type: CODE diff --git a/lld/test/wasm/lto/lto-start.ll b/lld/test/wasm/lto/lto-start.ll index 6e8f99c95308a..d21079577322d 100644 --- a/lld/test/wasm/lto/lto-start.ll +++ b/lld/test/wasm/lto/lto-start.ll @@ -6,8 +6,6 @@ ; CHECK-NEXT: Name: name ; CHECK-NEXT: FunctionNames: ; CHECK-NEXT: - Index: 0 -; CHECK-NEXT: Name: __wasm_call_ctors -; CHECK-NEXT: - Index: 1 ; CHECK-NEXT: Name: _start target datalayout = "e-m:e-p:32:32-i64:64-n32:64-S128" diff --git a/lld/test/wasm/lto/opt-level.ll b/lld/test/wasm/lto/opt-level.ll index b7e6a4cdc70a3..f6156e725c7d1 100644 --- a/lld/test/wasm/lto/opt-level.ll +++ b/lld/test/wasm/lto/opt-level.ll @@ -7,11 +7,11 @@ ; RUN: obj2yaml %t2a | FileCheck --check-prefix=CHECK-O2 %s ; Reject invalid optimization levels. -; RUN: not ld.lld -o %t3 -e main --lto-O6 %t.o 2>&1 | \ +; RUN: not wasm-ld -o %t3 -e main --lto-O6 %t.o 2>&1 | \ ; RUN: FileCheck --check-prefix=INVALID %s ; INVALID: invalid optimization level for LTO: 6 -; RUN: not ld.lld -o %t3 -m elf_x86_64 -e main --lto-O-1 %t.o 2>&1 | \ +; RUN: not wasm-ld -o %t3 -m elf_x86_64 -e main --lto-O-1 %t.o 2>&1 | \ ; RUN: FileCheck --check-prefix=INVALIDNEGATIVE %s ; INVALIDNEGATIVE: invalid optimization level for LTO: 4294967295 diff --git a/lld/test/wasm/lto/signature-mismatch.ll b/lld/test/wasm/lto/signature-mismatch.ll index e48bb39cd8d97..e12d91866023a 100644 --- a/lld/test/wasm/lto/signature-mismatch.ll +++ b/lld/test/wasm/lto/signature-mismatch.ll @@ -15,5 +15,6 @@ define void @_start() { ret void } +; CHECK: error: function signature mismatch: f ; CHECK: >>> defined as (i32) -> void in {{.*}}signature-mismatch.ll.tmp1.o ; CHECK: >>> defined as () -> void in lto.tmp diff --git a/lld/test/wasm/lto/used.ll b/lld/test/wasm/lto/used.ll index 8bf840366cc5f..15e6b41a73cf7 100644 --- a/lld/test/wasm/lto/used.ll +++ b/lld/test/wasm/lto/used.ll @@ -28,7 +28,7 @@ return: ; CHECK: - Type: DATA ; CHECK-NEXT: Segments: ; CHECK-NEXT: - SectionOffset: 7 -; CHECK-NEXT: MemoryIndex: 0 +; CHECK-NEXT: InitFlags: 0 ; CHECK-NEXT: Offset: ; CHECK-NEXT: Opcode: I32_CONST ; CHECK-NEXT: Value: 1024 @@ -38,8 +38,6 @@ return: ; CHECK-NEXT: Name: name ; CHECK-NEXT: FunctionNames: ; CHECK-NEXT: - Index: 0 -; CHECK-NEXT: Name: __wasm_call_ctors -; CHECK-NEXT: - Index: 1 ; CHECK-NEXT: Name: _start -; CHECK-NEXT: - Index: 2 +; CHECK-NEXT: - Index: 1 ; CHECK-NEXT: Name: bar diff --git a/lld/test/wasm/lto/weak-undefined.ll b/lld/test/wasm/lto/weak-undefined.ll index 54b302ec2d366..5eb405afa2e65 100644 --- a/lld/test/wasm/lto/weak-undefined.ll +++ b/lld/test/wasm/lto/weak-undefined.ll @@ -17,4 +17,4 @@ entry: ret void } -; CHECK: Name: undefined function foo +; CHECK: Name: 'undefined:foo' diff --git a/lld/test/wasm/lto/weak.ll b/lld/test/wasm/lto/weak.ll index 03a017c1a1833..61705d0f48829 100644 --- a/lld/test/wasm/lto/weak.ll +++ b/lld/test/wasm/lto/weak.ll @@ -12,5 +12,8 @@ define weak void @f() { ; CHECK: Symbol { ; CHECK-NEXT: Name: f ; CHECK-NEXT: Type: FUNCTION (0x0) -; CHECK-NEXT: Flags: 0x1 +; CHECK-NEXT: Flags [ (0x1) +; CHECK-NEXT: BINDING_WEAK (0x1) +; CHECK-NEXT: ] +; CHECK-NEXT: ElementIndex: 0x0 ; CHECK-NEXT: } diff --git a/lld/test/wasm/many-functions.ll b/lld/test/wasm/many-functions.ll index e2191bed9ed60..9ecb38d92df11 100644 --- a/lld/test/wasm/many-functions.ll +++ b/lld/test/wasm/many-functions.ll @@ -18,394 +18,394 @@ entry: ; CHECK: - Type: CODE ; CHECK-NEXT: Relocations: -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x00000008 -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x00000014 -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x00000020 -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x0000002C -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x00000038 -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x00000044 -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x00000050 -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x0000005C -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x00000068 -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x00000074 -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x00000080 -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x0000008C -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x00000098 -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x000000A4 -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x000000B0 -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x000000BC -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x000000C8 -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x000000D4 -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x000000E0 -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x000000EC -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x000000F8 -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x00000104 -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x00000110 -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x0000011C -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x00000128 -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x00000134 -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x00000140 -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x0000014C -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x00000158 -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x00000164 -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x00000170 -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x0000017C -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x00000188 -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x00000194 -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x000001A0 -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x000001AC -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x000001B8 -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x000001C4 -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x000001D0 -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x000001DC -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x000001E8 -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x000001F4 -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x00000200 -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x0000020C -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x00000218 -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x00000224 -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x00000230 -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x0000023C -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x00000248 -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x00000254 -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x00000260 -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x0000026C -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x00000278 -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x00000284 -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x00000290 -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x0000029C -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x000002A8 -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x000002B4 -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x000002C0 -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x000002CC -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x000002D8 -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x000002E4 -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x000002F0 -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x000002FC -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x00000308 -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x00000314 -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x00000320 -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x0000032C -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x00000338 -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x00000344 -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x00000350 -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x0000035C -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x00000368 -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x00000374 -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x00000380 -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x0000038C -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x00000398 -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x000003A4 -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x000003B0 -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x000003BC -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x000003C8 -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x000003D4 -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x000003E0 -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x000003EC -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x000003F8 -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x00000404 -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x00000410 -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x0000041C -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x00000428 -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x00000434 -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x00000440 -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x0000044C -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x00000458 -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x00000464 -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x00000470 -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x0000047C -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x00000488 -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x00000494 -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x000004A0 -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x000004AC -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x000004B8 -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x000004C4 -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x000004D0 -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x000004DC -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x000004E8 -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x000004F4 -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x00000500 -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x0000050C -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x00000518 -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x00000524 -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x00000530 -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x0000053C -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x00000548 -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x00000554 -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x00000560 -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x0000056C -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x00000578 -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x00000584 -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x00000590 -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x0000059C -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x000005A8 -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x000005B4 -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x000005C0 -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x000005CC -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x000005D8 -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x000005E4 -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x000005F0 -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 129 ; CHECK-NEXT: Offset: 0x000005FC -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB ; CHECK-NEXT: Index: 129 ; CHECK-NEXT: Offset: 0x00000608 -; CHECK-NEXT: - Type: R_WEBASSEMBLY_FUNCTION_INDEX_LEB +; CHECK-NEXT: - Type: R_WASM_FUNCTION_INDEX_LEB ; CHECK-NEXT: Index: 131 ; CHECK-NEXT: Offset: 0x00000611 ; CHECK-NEXT: Functions: @@ -802,13 +802,13 @@ entry: ; CHECK-NEXT: - Type: DATA ; CHECK-NEXT: Segments: ; CHECK-NEXT: - SectionOffset: 6 -; CHECK-NEXT: MemoryIndex: 0 +; CHECK-NEXT: InitFlags: 0 ; CHECK-NEXT: Offset: ; CHECK-NEXT: Opcode: I32_CONST ; CHECK-NEXT: Value: 0 ; CHECK-NEXT: Content: '01000000' ; CHECK-NEXT: - SectionOffset: 15 -; CHECK-NEXT: MemoryIndex: 0 +; CHECK-NEXT: InitFlags: 0 ; CHECK-NEXT: Offset: ; CHECK-NEXT: Opcode: I32_CONST ; CHECK-NEXT: Value: 4 diff --git a/lld/test/wasm/reloc-addend.ll b/lld/test/wasm/reloc-addend.ll index f678a3d4b6171..fc00b8ebc31cf 100644 --- a/lld/test/wasm/reloc-addend.ll +++ b/lld/test/wasm/reloc-addend.ll @@ -13,7 +13,7 @@ target triple = "wasm32-unknown-unknown" ; CHECK: - Type: DATA ; CHECK-NEXT: Relocations: -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_I32 +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_I32 ; CHECK-NEXT: Index: 0 ; CHECK-NEXT: Offset: 0x0000013D ; CHECK-NEXT: Addend: 64 diff --git a/lld/test/wasm/relocatable.ll b/lld/test/wasm/relocatable.ll index c503afa812324..67f8ac0d8bec7 100644 --- a/lld/test/wasm/relocatable.ll +++ b/lld/test/wasm/relocatable.ll @@ -79,19 +79,19 @@ entry: ; CHECK-NEXT: Functions: [ 4, 1, 2 ] ; CHECK-NEXT: - Type: CODE ; CHECK-NEXT: Relocations: -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_SLEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_SLEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x00000004 -; CHECK-NEXT: - Type: R_WEBASSEMBLY_FUNCTION_INDEX_LEB +; CHECK-NEXT: - Type: R_WASM_FUNCTION_INDEX_LEB ; CHECK-NEXT: Index: 2 ; CHECK-NEXT: Offset: 0x0000000A -; CHECK-NEXT: - Type: R_WEBASSEMBLY_FUNCTION_INDEX_LEB +; CHECK-NEXT: - Type: R_WASM_FUNCTION_INDEX_LEB ; CHECK-NEXT: Index: 4 ; CHECK-NEXT: Offset: 0x00000013 -; CHECK-NEXT: - Type: R_WEBASSEMBLY_FUNCTION_INDEX_LEB +; CHECK-NEXT: - Type: R_WASM_FUNCTION_INDEX_LEB ; CHECK-NEXT: Index: 5 ; CHECK-NEXT: Offset: 0x0000001A -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_SLEB +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_SLEB ; CHECK-NEXT: Index: 7 ; CHECK-NEXT: Offset: 0x00000026 ; CHECK-NEXT: Functions: @@ -106,51 +106,51 @@ entry: ; CHECK-NEXT: Body: 419C808080000B ; CHECK-NEXT: - Type: DATA ; CHECK-NEXT: Relocations: -; CHECK-NEXT: - Type: R_WEBASSEMBLY_TABLE_INDEX_I32 +; CHECK-NEXT: - Type: R_WASM_TABLE_INDEX_I32 ; CHECK-NEXT: Index: 3 ; CHECK-NEXT: Offset: 0x00000012 -; CHECK-NEXT: - Type: R_WEBASSEMBLY_TABLE_INDEX_I32 +; CHECK-NEXT: - Type: R_WASM_TABLE_INDEX_I32 ; CHECK-NEXT: Index: 4 ; CHECK-NEXT: Offset: 0x0000001B -; CHECK-NEXT: - Type: R_WEBASSEMBLY_TABLE_INDEX_I32 +; CHECK-NEXT: - Type: R_WASM_TABLE_INDEX_I32 ; CHECK-NEXT: Index: 5 ; CHECK-NEXT: Offset: 0x00000024 -; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_I32 +; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_I32 ; CHECK-NEXT: Index: 12 ; CHECK-NEXT: Offset: 0x0000002D ; CHECK-NEXT: Segments: ; CHECK-NEXT: - SectionOffset: 6 -; CHECK-NEXT: MemoryIndex: 0 +; CHECK-NEXT: InitFlags: 0 ; CHECK-NEXT: Offset: ; CHECK-NEXT: Opcode: I32_CONST ; CHECK-NEXT: Value: 0 ; CHECK-NEXT: Content: 68656C6C6F0A00 ; CHECK-NEXT: - SectionOffset: 18 -; CHECK-NEXT: MemoryIndex: 0 +; CHECK-NEXT: InitFlags: 0 ; CHECK-NEXT: Offset: ; CHECK-NEXT: Opcode: I32_CONST ; CHECK-NEXT: Value: 8 ; CHECK-NEXT: Content: '01000000' ; CHECK-NEXT: - SectionOffset: 27 -; CHECK-NEXT: MemoryIndex: 0 +; CHECK-NEXT: InitFlags: 0 ; CHECK-NEXT: Offset: ; CHECK-NEXT: Opcode: I32_CONST ; CHECK-NEXT: Value: 12 ; CHECK-NEXT: Content: '02000000' ; CHECK-NEXT: - SectionOffset: 36 -; CHECK-NEXT: MemoryIndex: 0 +; CHECK-NEXT: InitFlags: 0 ; CHECK-NEXT: Offset: ; CHECK-NEXT: Opcode: I32_CONST ; CHECK-NEXT: Value: 16 ; CHECK-NEXT: Content: '03000000' ; CHECK-NEXT: - SectionOffset: 45 -; CHECK-NEXT: MemoryIndex: 0 +; CHECK-NEXT: InitFlags: 0 ; CHECK-NEXT: Offset: ; CHECK-NEXT: Opcode: I32_CONST ; CHECK-NEXT: Value: 24 ; CHECK-NEXT: Content: '00000000' ; CHECK-NEXT: - SectionOffset: 54 -; CHECK-NEXT: MemoryIndex: 0 +; CHECK-NEXT: InitFlags: 0 ; CHECK-NEXT: Offset: ; CHECK-NEXT: Opcode: I32_CONST ; CHECK-NEXT: Value: 28 diff --git a/lld/test/wasm/shared.ll b/lld/test/wasm/shared.ll index f3abd11727783..54b445891aa26 100644 --- a/lld/test/wasm/shared.ll +++ b/lld/test/wasm/shared.ll @@ -68,14 +68,14 @@ declare void @func_external() ; CHECK-NEXT: - Offset: ; CHECK-NEXT: Opcode: GLOBAL_GET ; CHECK-NEXT: Index: 2 -; CHECK-NEXT: Functions: [ 2, 0 ] +; CHECK-NEXT: Functions: [ 1, 0 ] ; check the data segment initialized with __memory_base global as offset ; CHECK: - Type: DATA ; CHECK-NEXT: Segments: ; CHECK-NEXT: - SectionOffset: 6 -; CHECK-NEXT: MemoryIndex: 0 +; CHECK-NEXT: InitFlags: 0 ; CHECK-NEXT: Offset: ; CHECK-NEXT: Opcode: GLOBAL_GET ; CHECK-NEXT: Index: 1 diff --git a/lld/test/wasm/signature-mismatch-export.ll b/lld/test/wasm/signature-mismatch-export.ll new file mode 100644 index 0000000000000..7e4d3a6a95b40 --- /dev/null +++ b/lld/test/wasm/signature-mismatch-export.ll @@ -0,0 +1,30 @@ +; RUN: llc -filetype=obj %p/Inputs/ret32.ll -o %t.ret32.o +; RUN: llc -filetype=obj %s -o %t.main.o +; RUN: wasm-ld --export=ret32 -o %t.wasm %t.main.o %t.ret32.o +; RUN: obj2yaml %t.wasm | FileCheck %s + +target triple = "wasm32-unknown-unknown" + +declare i32 @ret32(i32) + +define void @_start() { +entry: + %call1 = call i32 @ret32(i32 0) + ret void +} + +; CHECK: - Type: EXPORT +; CHECK: - Name: ret32 +; CHECK-NEXT: Kind: FUNCTION +; CHECK-NEXT: Index: 2 + +; CHECK: - Type: CUSTOM +; CHECK-NEXT: Name: name +; CHECK-NEXT: FunctionNames: +; CHECK-NEXT: - Index: 0 +; CHECK-NEXT: Name: 'unreachable:ret32' +; CHECK-NEXT: - Index: 1 +; CHECK-NEXT: Name: _start +; CHECK-NEXT: - Index: 2 +; CHECK-NEXT: Name: ret32 +; CHECK-NEXT: ... diff --git a/lld/test/wasm/signature-mismatch.ll b/lld/test/wasm/signature-mismatch.ll index 8f13d644a7ce5..878ca53bb46c1 100644 --- a/lld/test/wasm/signature-mismatch.ll +++ b/lld/test/wasm/signature-mismatch.ll @@ -1,26 +1,51 @@ ; RUN: llc -filetype=obj %p/Inputs/ret32.ll -o %t.ret32.o +; RUN: llc -filetype=obj %p/Inputs/call-ret32.ll -o %t.call.o ; RUN: llc -filetype=obj %s -o %t.main.o -; RUN: not wasm-ld --fatal-warnings -o %t.wasm %t.main.o %t.ret32.o 2>&1 | FileCheck %s -; Run the test again by with the object files in the other order to verify -; the check works when the undefined symbol is resolved by an existing defined -; one. -; RUN: not wasm-ld --fatal-warnings -o %t.wasm %t.ret32.o %t.main.o 2>&1 | FileCheck %s -check-prefix=REVERSE +; RUN: wasm-ld --export=call_ret32 --export=ret32 -o %t.wasm %t.main.o %t.ret32.o %t.call.o 2>&1 | FileCheck %s -check-prefix=WARN +; RUN: obj2yaml %t.wasm | FileCheck %s -check-prefix=YAML +; RUN: not wasm-ld --fatal-warnings -o %t.wasm %t.main.o %t.ret32.o %t.call.o 2>&1 | FileCheck %s -check-prefix=ERROR target triple = "wasm32-unknown-unknown" +@ret32_address_main = global i32 (i32, i64, i32)* @ret32, align 4 + ; Function Attrs: nounwind -define hidden void @_start() local_unnamed_addr #0 { +define hidden void @_start() local_unnamed_addr { entry: - %call = tail call i32 @ret32(i32 1, i64 2, i32 3) #2 + %call1 = call i32 @ret32(i32 1, i64 2, i32 3) + %addr = load i32 (i32, i64, i32)*, i32 (i32, i64, i32)** @ret32_address_main, align 4 + %call2 = call i32 %addr(i32 1, i64 2, i32 3) ret void } -declare i32 @ret32(i32, i64, i32) local_unnamed_addr #1 +declare i32 @ret32(i32, i64, i32) local_unnamed_addr + +; WARN: warning: function signature mismatch: ret32 +; WARN-NEXT: >>> defined as (i32, i64, i32) -> i32 in {{.*}}.main.o +; WARN-NEXT: >>> defined as (f32) -> i32 in {{.*}}.ret32.o + +; ERROR: error: function signature mismatch: ret32 +; ERROR-NEXT: >>> defined as (i32, i64, i32) -> i32 in {{.*}}.main.o +; ERROR-NEXT: >>> defined as (f32) -> i32 in {{.*}}.ret32.o + +; YAML: - Type: EXPORT +; YAML: - Name: ret32 +; YAML-NEXT: Kind: FUNCTION +; YAML-NEXT: Index: 2 +; YAML-NEXT: - Name: call_ret32 +; YAML-NEXT: Kind: FUNCTION +; YAML-NEXT: Index: 3 -; CHECK: error: function signature mismatch: ret32 -; CHECK-NEXT: >>> defined as (i32, i64, i32) -> i32 in {{.*}}.main.o -; CHECK-NEXT: >>> defined as (f32) -> i32 in {{.*}}.ret32.o +; YAML: - Type: CUSTOM +; YAML-NEXT: Name: name +; YAML-NEXT: FunctionNames: +; YAML-NEXT: - Index: 0 +; YAML-NEXT: Name: 'unreachable:ret32' +; YAML-NEXT: - Index: 1 +; YAML-NEXT: Name: _start +; YAML-NEXT: - Index: 2 +; YAML-NEXT: Name: ret32 +; YAML-NEXT: - Index: 3 +; YAML-NEXT: Name: call_ret32 +; YAML-NEXT: ... -; REVERSE: error: function signature mismatch: ret32 -; REVERSE-NEXT: >>> defined as (f32) -> i32 in {{.*}}.ret32.o -; REVERSE-NEXT: >>> defined as (i32, i64, i32) -> i32 in {{.*}}.main.o diff --git a/lld/test/wasm/stack-pointer.ll b/lld/test/wasm/stack-pointer.ll index 6851214fe91a3..30501baf84ad4 100644 --- a/lld/test/wasm/stack-pointer.ll +++ b/lld/test/wasm/stack-pointer.ll @@ -41,7 +41,7 @@ entry: ; CHECK-NEXT: - Initial: 0x00000000 ; CHECK-NEXT: - Type: CODE ; CHECK-NEXT: Relocations: -; CHECK-NEXT: - Type: R_WEBASSEMBLY_GLOBAL_INDEX_LEB +; CHECK-NEXT: - Type: R_WASM_GLOBAL_INDEX_LEB ; CHECK-NEXT: Index: 1 ; CHECK-NEXT: Offset: 0x00000004 ; CHECK-NEXT: Functions: diff --git a/lld/test/wasm/trace-symbol.ll b/lld/test/wasm/trace-symbol.ll new file mode 100644 index 0000000000000..649b425f41525 --- /dev/null +++ b/lld/test/wasm/trace-symbol.ll @@ -0,0 +1,23 @@ +; RUN: llc -filetype=obj %p/Inputs/ret32.ll -o %t.ret32.o +; RUN: llc -filetype=obj -o %t.o %s +; RUN: wasm-ld -o %t.wasm %t.o %t.ret32.o -y ret32 -y _start 2>&1 | FileCheck %s -check-prefix=BOTH + +; check alias +; RUN: wasm-ld -o %t.wasm %t.o %t.ret32.o -trace-symbol=_start 2>&1 | FileCheck %s -check-prefixes=JUST-START + +target triple = "wasm32-unknown-unknown" + +declare i32 @ret32(float %arg) + +define void @_start() { +entry: + %call1 = call i32 @ret32(float 0.0) + ret void +} + +; BOTH: .o: definition of _start +; BOTH: .o: reference to ret32 +; BOTH: .ret32.o: definition of ret32 + +; JUST-START: .o: definition of _start +; JUST-START-NOT: ret32 diff --git a/lld/test/wasm/trace.test b/lld/test/wasm/trace.test new file mode 100644 index 0000000000000..023a2ccb2cc0d --- /dev/null +++ b/lld/test/wasm/trace.test @@ -0,0 +1,8 @@ +RUN: llc -filetype=obj %p/Inputs/start.ll -o %t.foo.o + +# Check -t +RUN: wasm-ld %t.foo.o -o %t.t.out.wasm -t 2>&1 | FileCheck %s +CHECK: {{.*}}.foo.o + +# Check --trace alias +RUN: wasm-ld %t.foo.o -o %t.trace.out.wasm --trace 2>&1 | FileCheck %s diff --git a/lld/test/wasm/undefined-weak-call.ll b/lld/test/wasm/undefined-weak-call.ll index 0b7d0c769d475..a95a32b0f30f0 100644 --- a/lld/test/wasm/undefined-weak-call.ll +++ b/lld/test/wasm/undefined-weak-call.ll @@ -42,7 +42,7 @@ define i32 @callWeakFuncs() { ; CHECK-NEXT: ReturnType: I32 ; CHECK-NEXT: ParamTypes: ; CHECK-NEXT: - Type: FUNCTION -; CHECK-NEXT: FunctionTypes: [ 0, 0, 0, 1, 2 ] +; CHECK-NEXT: FunctionTypes: [ 0, 0, 1, 2 ] ; CHECK-NEXT: - Type: TABLE ; CHECK-NEXT: Tables: ; CHECK-NEXT: - ElemType: FUNCREF @@ -86,12 +86,12 @@ define i32 @callWeakFuncs() { ; CHECK-NEXT: Index: 2 ; CHECK-NEXT: - Name: callWeakFuncs ; CHECK-NEXT: Kind: FUNCTION -; CHECK-NEXT: Index: 4 +; CHECK-NEXT: Index: 3 ; CHECK-NEXT: - Type: CODE ; CHECK-NEXT: Functions: ; CHECK-NEXT: - Index: 0 ; CHECK-NEXT: Locals: -; CHECK-NEXT: Body: 0B +; CHECK-NEXT: Body: 000B ; CHECK-NEXT: - Index: 1 ; CHECK-NEXT: Locals: ; CHECK-NEXT: Body: 000B @@ -100,21 +100,16 @@ define i32 @callWeakFuncs() { ; CHECK-NEXT: Body: 000B ; CHECK-NEXT: - Index: 3 ; CHECK-NEXT: Locals: -; CHECK-NEXT: Body: 000B -; CHECK-NEXT: - Index: 4 -; CHECK-NEXT: Locals: -; CHECK-NEXT: Body: 10818080800010828080800041021083808080004180808080004180808080006A0B +; CHECK-NEXT: Body: 10808080800010818080800041021082808080004180808080004180808080006A0B ; CHECK-NEXT: - Type: CUSTOM ; CHECK-NEXT: Name: name ; CHECK-NEXT: FunctionNames: ; CHECK-NEXT: - Index: 0 -; CHECK-NEXT: Name: __wasm_call_ctors +; CHECK-NEXT: Name: 'undefined:weakFunc1' ; CHECK-NEXT: - Index: 1 -; CHECK-NEXT: Name: undefined function weakFunc1 +; CHECK-NEXT: Name: 'undefined:weakFunc2' ; CHECK-NEXT: - Index: 2 -; CHECK-NEXT: Name: undefined function weakFunc2 +; CHECK-NEXT: Name: 'undefined:weakFunc3' ; CHECK-NEXT: - Index: 3 -; CHECK-NEXT: Name: undefined function weakFunc3 -; CHECK-NEXT: - Index: 4 ; CHECK-NEXT: Name: callWeakFuncs ; CHECK-NEXT: ... diff --git a/lld/test/wasm/visibility-hidden.ll b/lld/test/wasm/visibility-hidden.ll index b4fe0b53ba21a..64ed0112bc757 100644 --- a/lld/test/wasm/visibility-hidden.ll +++ b/lld/test/wasm/visibility-hidden.ll @@ -51,13 +51,13 @@ entry: ; CHECK-NEXT: Index: 2 ; CHECK-NEXT: - Name: objectDefault ; CHECK-NEXT: Kind: FUNCTION -; CHECK-NEXT: Index: 2 +; CHECK-NEXT: Index: 1 ; CHECK-NEXT: - Name: _start ; CHECK-NEXT: Kind: FUNCTION -; CHECK-NEXT: Index: 3 +; CHECK-NEXT: Index: 2 ; CHECK-NEXT: - Name: archiveDefault ; CHECK-NEXT: Kind: FUNCTION -; CHECK-NEXT: Index: 5 +; CHECK-NEXT: Index: 4 ; CHECK-NEXT: - Type: @@ -74,5 +74,5 @@ entry: ; NO-DEFAULT-NEXT: Index: 2 ; NO-DEFAULT-NEXT: - Name: _start ; NO-DEFAULT-NEXT: Kind: FUNCTION -; NO-DEFAULT-NEXT: Index: 3 +; NO-DEFAULT-NEXT: Index: 2 ; NO-DEFAULT-NEXT: - Type: diff --git a/lld/test/wasm/weak-alias-overide.ll b/lld/test/wasm/weak-alias-overide.ll index 7fefad0fb04a0..0338f43f1ffac 100644 --- a/lld/test/wasm/weak-alias-overide.ll +++ b/lld/test/wasm/weak-alias-overide.ll @@ -26,13 +26,13 @@ entry: ; CHECK-NEXT: - Type: TYPE ; CHECK-NEXT: Signatures: ; CHECK-NEXT: - Index: 0 -; CHECK-NEXT: ReturnType: NORESULT +; CHECK-NEXT: ReturnType: I32 ; CHECK-NEXT: ParamTypes: ; CHECK-NEXT: - Index: 1 -; CHECK-NEXT: ReturnType: I32 +; CHECK-NEXT: ReturnType: NORESULT ; CHECK-NEXT: ParamTypes: ; CHECK-NEXT: - Type: FUNCTION -; CHECK-NEXT: FunctionTypes: [ 0, 1, 0, 1, 1, 1, 1, 1 ] +; CHECK-NEXT: FunctionTypes: [ 0, 1, 0, 0, 0, 0, 0 ] ; CHECK-NEXT: - Type: TABLE ; CHECK-NEXT: Tables: ; CHECK-NEXT: - ElemType: FUNCREF @@ -76,78 +76,73 @@ entry: ; CHECK-NEXT: Index: 2 ; CHECK-NEXT: - Name: alias_fn ; CHECK-NEXT: Kind: FUNCTION -; CHECK-NEXT: Index: 1 +; CHECK-NEXT: Index: 0 ; CHECK-NEXT: - Name: _start ; CHECK-NEXT: Kind: FUNCTION -; CHECK-NEXT: Index: 2 +; CHECK-NEXT: Index: 1 ; CHECK-NEXT: - Name: direct_fn ; CHECK-NEXT: Kind: FUNCTION -; CHECK-NEXT: Index: 3 +; CHECK-NEXT: Index: 2 ; CHECK-NEXT: - Name: call_direct ; CHECK-NEXT: Kind: FUNCTION -; CHECK-NEXT: Index: 4 +; CHECK-NEXT: Index: 3 ; CHECK-NEXT: - Name: call_alias ; CHECK-NEXT: Kind: FUNCTION -; CHECK-NEXT: Index: 5 +; CHECK-NEXT: Index: 4 ; CHECK-NEXT: - Name: call_alias_ptr ; CHECK-NEXT: Kind: FUNCTION -; CHECK-NEXT: Index: 6 +; CHECK-NEXT: Index: 5 ; CHECK-NEXT: - Name: call_direct_ptr ; CHECK-NEXT: Kind: FUNCTION -; CHECK-NEXT: Index: 7 +; CHECK-NEXT: Index: 6 ; CHECK-NEXT: - Type: ELEM ; CHECK-NEXT: Segments: ; CHECK-NEXT: - Offset: ; CHECK-NEXT: Opcode: I32_CONST ; CHECK-NEXT: Value: 1 -; CHECK-NEXT: Functions: [ 1, 3 ] +; CHECK-NEXT: Functions: [ 0, 2 ] ; CHECK-NEXT: - Type: CODE ; CHECK-NEXT: Functions: ; CHECK-NEXT: - Index: 0 ; CHECK-NEXT: Locals: -; CHECK-NEXT: Body: 0B +; CHECK-NEXT: Body: 41010B ; CHECK-NEXT: - Index: 1 ; CHECK-NEXT: Locals: -; CHECK-NEXT: Body: 41010B +; CHECK-NEXT: Body: 1080808080001A0B ; CHECK-NEXT: - Index: 2 ; CHECK-NEXT: Locals: -; CHECK-NEXT: Body: 1081808080001A0B +; CHECK-NEXT: Body: 41000B ; CHECK-NEXT: - Index: 3 ; CHECK-NEXT: Locals: -; CHECK-NEXT: Body: 41000B +; CHECK-NEXT: Body: 1082808080000B ; CHECK-NEXT: - Index: 4 ; CHECK-NEXT: Locals: -; CHECK-NEXT: Body: 1083808080000B +; CHECK-NEXT: Body: 1080808080000B ; CHECK-NEXT: - Index: 5 ; CHECK-NEXT: Locals: -; CHECK-NEXT: Body: 1081808080000B -; CHECK-NEXT: - Index: 6 -; CHECK-NEXT: Locals: ; CHECK-NEXT: - Type: I32 ; CHECK-NEXT: Count: 2 -; CHECK-NEXT: Body: 23808080800041106B220024808080800020004181808080003602081081808080002101200041106A24808080800020010B -; CHECK-NEXT: - Index: 7 +; CHECK-NEXT: Body: 23808080800041106B220024808080800020004181808080003602081080808080002101200041106A24808080800020010B +; CHECK-NEXT: - Index: 6 ; CHECK-NEXT: Locals: ; CHECK-NEXT: - Type: I32 ; CHECK-NEXT: Count: 2 -; CHECK-NEXT: Body: 23808080800041106B220024808080800020004182808080003602081083808080002101200041106A24808080800020010B +; CHECK-NEXT: Body: 23808080800041106B220024808080800020004182808080003602081082808080002101200041106A24808080800020010B ; CHECK-NEXT: - Type: CUSTOM ; CHECK-NEXT: Name: name ; CHECK-NEXT: FunctionNames: ; CHECK-NEXT: - Index: 0 -; CHECK-NEXT: Name: __wasm_call_ctors -; CHECK-NEXT: - Index: 1 ; CHECK-NEXT: Name: alias_fn -; CHECK-NEXT: - Index: 2 +; CHECK-NEXT: - Index: 1 ; CHECK-NEXT: Name: _start -; CHECK-NEXT: - Index: 3 +; CHECK-NEXT: - Index: 2 ; CHECK-NEXT: Name: direct_fn -; CHECK-NEXT: - Index: 4 +; CHECK-NEXT: - Index: 3 ; CHECK-NEXT: Name: call_direct -; CHECK-NEXT: - Index: 5 +; CHECK-NEXT: - Index: 4 ; CHECK-NEXT: Name: call_alias -; CHECK-NEXT: - Index: 6 +; CHECK-NEXT: - Index: 5 ; CHECK-NEXT: Name: call_alias_ptr -; CHECK-NEXT: - Index: 7 +; CHECK-NEXT: - Index: 6 ; CHECK-NEXT: Name: call_direct_ptr ; CHECK-NEXT: ... diff --git a/lld/test/wasm/weak-alias.ll b/lld/test/wasm/weak-alias.ll index a925c10ccda41..6e29ad08bafbe 100644 --- a/lld/test/wasm/weak-alias.ll +++ b/lld/test/wasm/weak-alias.ll @@ -29,7 +29,7 @@ entry: ; CHECK-NEXT: ReturnType: I32 ; CHECK-NEXT: ParamTypes: ; CHECK-NEXT: - Type: FUNCTION -; CHECK-NEXT: FunctionTypes: [ 0, 0, 1, 1, 1, 1, 1 ] +; CHECK-NEXT: FunctionTypes: [ 0, 1, 1, 1, 1, 1 ] ; CHECK-NEXT: - Type: TABLE ; CHECK-NEXT: Tables: ; CHECK-NEXT: - ElemType: FUNCREF @@ -73,74 +73,69 @@ entry: ; CHECK-NEXT: Index: 2 ; CHECK-NEXT: - Name: _start ; CHECK-NEXT: Kind: FUNCTION -; CHECK-NEXT: Index: 1 +; CHECK-NEXT: Index: 0 ; CHECK-NEXT: - Name: alias_fn ; CHECK-NEXT: Kind: FUNCTION -; CHECK-NEXT: Index: 2 +; CHECK-NEXT: Index: 1 ; CHECK-NEXT: - Name: direct_fn ; CHECK-NEXT: Kind: FUNCTION -; CHECK-NEXT: Index: 2 +; CHECK-NEXT: Index: 1 ; CHECK-NEXT: - Name: call_direct ; CHECK-NEXT: Kind: FUNCTION -; CHECK-NEXT: Index: 3 +; CHECK-NEXT: Index: 2 ; CHECK-NEXT: - Name: call_alias ; CHECK-NEXT: Kind: FUNCTION -; CHECK-NEXT: Index: 4 +; CHECK-NEXT: Index: 3 ; CHECK-NEXT: - Name: call_alias_ptr ; CHECK-NEXT: Kind: FUNCTION -; CHECK-NEXT: Index: 5 +; CHECK-NEXT: Index: 4 ; CHECK-NEXT: - Name: call_direct_ptr ; CHECK-NEXT: Kind: FUNCTION -; CHECK-NEXT: Index: 6 +; CHECK-NEXT: Index: 5 ; CHECK-NEXT: - Type: ELEM ; CHECK-NEXT: Segments: ; CHECK-NEXT: - Offset: ; CHECK-NEXT: Opcode: I32_CONST ; CHECK-NEXT: Value: 1 -; CHECK-NEXT: Functions: [ 2 ] +; CHECK-NEXT: Functions: [ 1 ] ; CHECK-NEXT: - Type: CODE ; CHECK-NEXT: Functions: ; CHECK-NEXT: - Index: 0 ; CHECK-NEXT: Locals: -; CHECK-NEXT: Body: 0B +; CHECK-NEXT: Body: 1081808080001A0B ; CHECK-NEXT: - Index: 1 ; CHECK-NEXT: Locals: -; CHECK-NEXT: Body: 1082808080001A0B +; CHECK-NEXT: Body: 41000B ; CHECK-NEXT: - Index: 2 ; CHECK-NEXT: Locals: -; CHECK-NEXT: Body: 41000B +; CHECK-NEXT: Body: 1081808080000B ; CHECK-NEXT: - Index: 3 ; CHECK-NEXT: Locals: -; CHECK-NEXT: Body: 1082808080000B +; CHECK-NEXT: Body: 1081808080000B ; CHECK-NEXT: - Index: 4 ; CHECK-NEXT: Locals: -; CHECK-NEXT: Body: 1082808080000B -; CHECK-NEXT: - Index: 5 -; CHECK-NEXT: Locals: ; CHECK-NEXT: - Type: I32 ; CHECK-NEXT: Count: 2 -; CHECK-NEXT: Body: 23808080800041106B220024808080800020004181808080003602081082808080002101200041106A24808080800020010B -; CHECK-NEXT: - Index: 6 +; CHECK-NEXT: Body: 23808080800041106B220024808080800020004181808080003602081081808080002101200041106A24808080800020010B +; CHECK-NEXT: - Index: 5 ; CHECK-NEXT: Locals: ; CHECK-NEXT: - Type: I32 ; CHECK-NEXT: Count: 2 -; CHECK-NEXT: Body: 23808080800041106B220024808080800020004181808080003602081082808080002101200041106A24808080800020010B +; CHECK-NEXT: Body: 23808080800041106B220024808080800020004181808080003602081081808080002101200041106A24808080800020010B ; CHECK-NEXT: - Type: CUSTOM ; CHECK-NEXT: Name: name ; CHECK-NEXT: FunctionNames: ; CHECK-NEXT: - Index: 0 -; CHECK-NEXT: Name: __wasm_call_ctors -; CHECK-NEXT: - Index: 1 ; CHECK-NEXT: Name: _start -; CHECK-NEXT: - Index: 2 +; CHECK-NEXT: - Index: 1 ; CHECK-NEXT: Name: direct_fn -; CHECK-NEXT: - Index: 3 +; CHECK-NEXT: - Index: 2 ; CHECK-NEXT: Name: call_direct -; CHECK-NEXT: - Index: 4 +; CHECK-NEXT: - Index: 3 ; CHECK-NEXT: Name: call_alias -; CHECK-NEXT: - Index: 5 +; CHECK-NEXT: - Index: 4 ; CHECK-NEXT: Name: call_alias_ptr -; CHECK-NEXT: - Index: 6 +; CHECK-NEXT: - Index: 5 ; CHECK-NEXT: Name: call_direct_ptr ; CHECK-NEXT: ... @@ -186,43 +181,43 @@ entry: ; RELOC-NEXT: Functions: [ 1 ] ; RELOC-NEXT: - Type: CODE ; RELOC-NEXT: Relocations: -; RELOC-NEXT: - Type: R_WEBASSEMBLY_FUNCTION_INDEX_LEB +; RELOC-NEXT: - Type: R_WASM_FUNCTION_INDEX_LEB ; RELOC-NEXT: Index: 1 ; RELOC-NEXT: Offset: 0x00000004 -; RELOC-NEXT: - Type: R_WEBASSEMBLY_FUNCTION_INDEX_LEB +; RELOC-NEXT: - Type: R_WASM_FUNCTION_INDEX_LEB ; RELOC-NEXT: Index: 2 ; RELOC-NEXT: Offset: 0x00000013 -; RELOC-NEXT: - Type: R_WEBASSEMBLY_FUNCTION_INDEX_LEB +; RELOC-NEXT: - Type: R_WASM_FUNCTION_INDEX_LEB ; RELOC-NEXT: Index: 1 ; RELOC-NEXT: Offset: 0x0000001C -; RELOC-NEXT: - Type: R_WEBASSEMBLY_GLOBAL_INDEX_LEB +; RELOC-NEXT: - Type: R_WASM_GLOBAL_INDEX_LEB ; RELOC-NEXT: Index: 6 ; RELOC-NEXT: Offset: 0x00000027 -; RELOC-NEXT: - Type: R_WEBASSEMBLY_GLOBAL_INDEX_LEB +; RELOC-NEXT: - Type: R_WASM_GLOBAL_INDEX_LEB ; RELOC-NEXT: Index: 6 ; RELOC-NEXT: Offset: 0x00000032 -; RELOC-NEXT: - Type: R_WEBASSEMBLY_TABLE_INDEX_SLEB +; RELOC-NEXT: - Type: R_WASM_TABLE_INDEX_SLEB ; RELOC-NEXT: Index: 1 ; RELOC-NEXT: Offset: 0x0000003A -; RELOC-NEXT: - Type: R_WEBASSEMBLY_FUNCTION_INDEX_LEB +; RELOC-NEXT: - Type: R_WASM_FUNCTION_INDEX_LEB ; RELOC-NEXT: Index: 1 ; RELOC-NEXT: Offset: 0x00000043 -; RELOC-NEXT: - Type: R_WEBASSEMBLY_GLOBAL_INDEX_LEB +; RELOC-NEXT: - Type: R_WASM_GLOBAL_INDEX_LEB ; RELOC-NEXT: Index: 6 ; RELOC-NEXT: Offset: 0x00000050 -; RELOC-NEXT: - Type: R_WEBASSEMBLY_GLOBAL_INDEX_LEB +; RELOC-NEXT: - Type: R_WASM_GLOBAL_INDEX_LEB ; RELOC-NEXT: Index: 6 ; RELOC-NEXT: Offset: 0x0000005D -; RELOC-NEXT: - Type: R_WEBASSEMBLY_GLOBAL_INDEX_LEB +; RELOC-NEXT: - Type: R_WASM_GLOBAL_INDEX_LEB ; RELOC-NEXT: Index: 6 ; RELOC-NEXT: Offset: 0x00000068 -; RELOC-NEXT: - Type: R_WEBASSEMBLY_TABLE_INDEX_SLEB +; RELOC-NEXT: - Type: R_WASM_TABLE_INDEX_SLEB ; RELOC-NEXT: Index: 2 ; RELOC-NEXT: Offset: 0x00000070 -; RELOC-NEXT: - Type: R_WEBASSEMBLY_FUNCTION_INDEX_LEB +; RELOC-NEXT: - Type: R_WASM_FUNCTION_INDEX_LEB ; RELOC-NEXT: Index: 2 ; RELOC-NEXT: Offset: 0x00000079 -; RELOC-NEXT: - Type: R_WEBASSEMBLY_GLOBAL_INDEX_LEB +; RELOC-NEXT: - Type: R_WASM_GLOBAL_INDEX_LEB ; RELOC-NEXT: Index: 6 ; RELOC-NEXT: Offset: 0x00000086 ; RELOC-NEXT: Functions: diff --git a/lld/test/wasm/weak-symbols.ll b/lld/test/wasm/weak-symbols.ll index 41ade7c1aa0ea..4fa9fa3d0d09e 100644 --- a/lld/test/wasm/weak-symbols.ll +++ b/lld/test/wasm/weak-symbols.ll @@ -29,7 +29,7 @@ entry: ; CHECK-NEXT: ReturnType: I32 ; CHECK-NEXT: ParamTypes: ; CHECK-NEXT: - Type: FUNCTION -; CHECK-NEXT: FunctionTypes: [ 0, 0, 1, 1, 1 ] +; CHECK-NEXT: FunctionTypes: [ 0, 1, 1, 1 ] ; CHECK-NEXT: - Type: TABLE ; CHECK-NEXT: Tables: ; CHECK-NEXT: - ElemType: FUNCREF @@ -79,46 +79,43 @@ entry: ; CHECK-NEXT: Index: 2 ; CHECK-NEXT: - Name: _start ; CHECK-NEXT: Kind: FUNCTION -; CHECK-NEXT: Index: 1 +; CHECK-NEXT: Index: 0 ; CHECK-NEXT: - Name: weakFn ; CHECK-NEXT: Kind: FUNCTION -; CHECK-NEXT: Index: 2 +; CHECK-NEXT: Index: 1 ; CHECK-NEXT: - Name: exportWeak1 ; CHECK-NEXT: Kind: FUNCTION -; CHECK-NEXT: Index: 3 +; CHECK-NEXT: Index: 2 ; CHECK-NEXT: - Name: weakGlobal ; CHECK-NEXT: Kind: GLOBAL ; CHECK-NEXT: Index: 3 ; CHECK-NEXT: - Name: exportWeak2 ; CHECK-NEXT: Kind: FUNCTION -; CHECK-NEXT: Index: 4 +; CHECK-NEXT: Index: 3 ; CHECK-NEXT: - Type: ELEM ; CHECK-NEXT: Segments: ; CHECK-NEXT: - Offset: ; CHECK-NEXT: Opcode: I32_CONST ; CHECK-NEXT: Value: 1 -; CHECK-NEXT: Functions: [ 2 ] +; CHECK-NEXT: Functions: [ 1 ] ; CHECK-NEXT: - Type: CODE ; CHECK-NEXT: Functions: ; CHECK-NEXT: - Index: 0 ; CHECK-NEXT: Locals: -; CHECK-NEXT: Body: 0B +; CHECK-NEXT: Body: 1081808080001A0B ; CHECK-NEXT: - Index: 1 ; CHECK-NEXT: Locals: -; CHECK-NEXT: Body: 1082808080001A0B -; CHECK-NEXT: - Index: 2 -; CHECK-NEXT: Locals: ; CHECK-NEXT: Body: 41010B -; CHECK-NEXT: - Index: 3 +; CHECK-NEXT: - Index: 2 ; CHECK-NEXT: Locals: ; CHECK-NEXT: Body: 4181808080000B -; CHECK-NEXT: - Index: 4 +; CHECK-NEXT: - Index: 3 ; CHECK-NEXT: Locals: ; CHECK-NEXT: Body: 4181808080000B ; CHECK-NEXT: - Type: DATA ; CHECK-NEXT: Segments: ; CHECK-NEXT: - SectionOffset: 7 -; CHECK-NEXT: MemoryIndex: 0 +; CHECK-NEXT: InitFlags: 0 ; CHECK-NEXT: Offset: ; CHECK-NEXT: Opcode: I32_CONST ; CHECK-NEXT: Value: 1024 @@ -127,13 +124,11 @@ entry: ; CHECK-NEXT: Name: name ; CHECK-NEXT: FunctionNames: ; CHECK-NEXT: - Index: 0 -; CHECK-NEXT: Name: __wasm_call_ctors -; CHECK-NEXT: - Index: 1 ; CHECK-NEXT: Name: _start -; CHECK-NEXT: - Index: 2 +; CHECK-NEXT: - Index: 1 ; CHECK-NEXT: Name: weakFn -; CHECK-NEXT: - Index: 3 +; CHECK-NEXT: - Index: 2 ; CHECK-NEXT: Name: exportWeak1 -; CHECK-NEXT: - Index: 4 +; CHECK-NEXT: - Index: 3 ; CHECK-NEXT: Name: exportWeak2 ; CHECK-NEXT: ... diff --git a/lld/test/wasm/weak-undefined.ll b/lld/test/wasm/weak-undefined.ll index 41e992e5ea472..290ee81ec8cd2 100644 --- a/lld/test/wasm/weak-undefined.ll +++ b/lld/test/wasm/weak-undefined.ll @@ -34,13 +34,13 @@ entry: ; CHECK-NEXT: - Type: TYPE ; CHECK-NEXT: Signatures: ; CHECK-NEXT: - Index: 0 -; CHECK-NEXT: ReturnType: NORESULT +; CHECK-NEXT: ReturnType: I32 ; CHECK-NEXT: ParamTypes: ; CHECK-NEXT: - Index: 1 -; CHECK-NEXT: ReturnType: I32 +; CHECK-NEXT: ReturnType: NORESULT ; CHECK-NEXT: ParamTypes: ; CHECK-NEXT: - Type: FUNCTION -; CHECK-NEXT: FunctionTypes: [ 0, 1, 1, 0 ] +; CHECK-NEXT: FunctionTypes: [ 0, 0, 1 ] ; CHECK-NEXT: - Type: TABLE ; CHECK-NEXT: Tables: ; CHECK-NEXT: - ElemType: FUNCREF @@ -84,19 +84,16 @@ entry: ; CHECK-NEXT: Index: 2 ; CHECK-NEXT: - Name: _start ; CHECK-NEXT: Kind: FUNCTION -; CHECK-NEXT: Index: 3 +; CHECK-NEXT: Index: 2 ; CHECK-NEXT: - Type: CODE ; CHECK-NEXT: Functions: ; CHECK-NEXT: - Index: 0 ; CHECK-NEXT: Locals: -; CHECK-NEXT: Body: 0B +; CHECK-NEXT: Body: 4180808080000B ; CHECK-NEXT: - Index: 1 ; CHECK-NEXT: Locals: ; CHECK-NEXT: Body: 4180808080000B ; CHECK-NEXT: - Index: 2 ; CHECK-NEXT: Locals: -; CHECK-NEXT: Body: 4180808080000B -; CHECK-NEXT: - Index: 3 -; CHECK-NEXT: Locals: -; CHECK-NEXT: Body: 1082808080001A1081808080001A0B +; CHECK-NEXT: Body: 1081808080001A1080808080001A0B ; CHECK-NEXT: ... diff --git a/lld/wasm/Config.h b/lld/wasm/Config.h index 3897ef65b8d71..c5f22eb537dd3 100644 --- a/lld/wasm/Config.h +++ b/lld/wasm/Config.h @@ -38,6 +38,7 @@ struct Configuration { bool StripAll; bool StripDebug; bool StackFirst; + bool Trace; uint32_t GlobalBase; uint32_t InitialMemory; uint32_t MaxMemory; diff --git a/lld/wasm/Driver.cpp b/lld/wasm/Driver.cpp index 860d9f5fe65e0..d3286af258b1f 100644 --- a/lld/wasm/Driver.cpp +++ b/lld/wasm/Driver.cpp @@ -286,53 +286,6 @@ static StringRef getEntry(opt::InputArgList &Args, StringRef Default) { return Arg->getValue(); } -static const uint8_t UnreachableFn[] = { - 0x03 /* ULEB length */, 0x00 /* ULEB num locals */, - 0x00 /* opcode unreachable */, 0x0b /* opcode end */ -}; - -// For weak undefined functions, there may be "call" instructions that reference -// the symbol. In this case, we need to synthesise a dummy/stub function that -// will abort at runtime, so that relocations can still provided an operand to -// the call instruction that passes Wasm validation. -static void handleWeakUndefines() { - for (Symbol *Sym : Symtab->getSymbols()) { - if (!Sym->isUndefWeak()) - continue; - - const WasmSignature *Sig = nullptr; - - if (auto *FuncSym = dyn_cast(Sym)) { - // It is possible for undefined functions not to have a signature (eg. if - // added via "--undefined"), but weak undefined ones do have a signature. - assert(FuncSym->Signature); - Sig = FuncSym->Signature; - } else if (auto *LazySym = dyn_cast(Sym)) { - // Lazy symbols may not be functions and therefore can have a null - // signature. - Sig = LazySym->Signature; - } - - if (!Sig) - continue; - - - // Add a synthetic dummy for weak undefined functions. These dummies will - // be GC'd if not used as the target of any "call" instructions. - std::string SymName = toString(*Sym); - StringRef DebugName = Saver.save("undefined function " + SymName); - auto *Func = make(*Sig, Sym->getName(), DebugName); - Func->setBody(UnreachableFn); - // Ensure it compares equal to the null pointer, and so that table relocs - // don't pull in the stub body (only call-operand relocs should do that). - Func->setTableIndex(0); - Symtab->SyntheticFunctions.emplace_back(Func); - // Hide our dummy to prevent export. - uint32_t Flags = WASM_SYMBOL_VISIBILITY_HIDDEN; - replaceSymbol(Sym, Sym->getName(), Flags, nullptr, Func); - } -} - // Some Config members do not directly correspond to any particular // command line options, but computed based on other Config values. // This function initialize such members. See Config.h for the details @@ -371,6 +324,7 @@ static void setConfigs(opt::InputArgList &Args) { Config->StripAll = Args.hasArg(OPT_strip_all); Config->StripDebug = Args.hasArg(OPT_strip_debug); Config->StackFirst = Args.hasArg(OPT_stack_first); + Config->Trace = Args.hasArg(OPT_trace); Config->ThinLTOCacheDir = Args.getLastArgValue(OPT_thinlto_cache_dir); Config->ThinLTOCachePolicy = CHECK( parseCachePruningPolicy(Args.getLastArgValue(OPT_thinlto_cache_policy)), @@ -442,7 +396,9 @@ static Symbol *handleUndefined(StringRef Name) { static UndefinedGlobal * createUndefinedGlobal(StringRef Name, llvm::wasm::WasmGlobalType *Type) { auto *Sym = - cast(Symtab->addUndefinedGlobal(Name, 0, nullptr, Type)); + cast(Symtab->addUndefinedGlobal(Name, Name, + DefaultModule, 0, + nullptr, Type)); Config->AllowUndefinedSymbols.insert(Sym->getName()); Sym->IsUsedInRegularObj = true; return Sym; @@ -556,6 +512,10 @@ void LinkerDriver::link(ArrayRef ArgsArr) { Config->AllowUndefined = true; } + // Handle --trace-symbol. + for (auto *Arg : Args.filtered(OPT_trace_symbol)) + Symtab->trace(Arg->getValue()); + if (!Config->Relocatable) createSyntheticSymbols(); @@ -574,17 +534,6 @@ void LinkerDriver::link(ArrayRef ArgsArr) { for (auto *Arg : Args.filtered(OPT_undefined)) handleUndefined(Arg->getValue()); - // Handle the `--export ` options - // This works like --undefined but also exports the symbol if its found - for (auto *Arg : Args.filtered(OPT_export)) { - Symbol *Sym = handleUndefined(Arg->getValue()); - if (Sym && Sym->isDefined()) - Sym->ForceExport = true; - else if (!Config->AllowUndefined) - error(Twine("symbol exported via --export not found: ") + - Arg->getValue()); - } - Symbol *EntrySym = nullptr; if (!Config->Relocatable) { if (!Config->Shared && !Config->Entry.empty()) { @@ -595,25 +544,46 @@ void LinkerDriver::link(ArrayRef ArgsArr) { error("entry symbol not defined (pass --no-entry to supress): " + Config->Entry); } - - // Make sure we have resolved all symbols. - if (!Config->AllowUndefined) - Symtab->reportRemainingUndefines(); } if (errorCount()) return; + // Handle the `--export ` options + // This works like --undefined but also exports the symbol if its found + for (auto *Arg : Args.filtered(OPT_export)) + handleUndefined(Arg->getValue()); + // Do link-time optimization if given files are LLVM bitcode files. // This compiles bitcode files into real object files. Symtab->addCombinedLTOObject(); if (errorCount()) return; - // Add synthetic dummies for weak undefined functions. Must happen - // after LTO otherwise functions may not yet have signatures. - if (!Config->Relocatable) - handleWeakUndefines(); + // Resolve any variant symbols that were created due to signature + // mismatchs. + Symtab->handleSymbolVariants(); + if (errorCount()) + return; + + for (auto *Arg : Args.filtered(OPT_export)) { + Symbol *Sym = Symtab->find(Arg->getValue()); + if (Sym && Sym->isDefined()) + Sym->ForceExport = true; + else if (!Config->AllowUndefined) + error(Twine("symbol exported via --export not found: ") + + Arg->getValue()); + } + + if (!Config->Relocatable) { + // Add synthetic dummies for weak undefined functions. Must happen + // after LTO otherwise functions may not yet have signatures. + Symtab->handleWeakUndefines(); + + // Make sure we have resolved all symbols. + if (!Config->AllowUndefined) + Symtab->reportRemainingUndefines(); + } if (EntrySym) EntrySym->setHidden(false); diff --git a/lld/wasm/InputChunks.cpp b/lld/wasm/InputChunks.cpp index f2cd310dd2317..238c111ea390a 100644 --- a/lld/wasm/InputChunks.cpp +++ b/lld/wasm/InputChunks.cpp @@ -22,7 +22,7 @@ using namespace llvm::support::endian; using namespace lld; using namespace lld::wasm; -static StringRef ReloctTypeToString(uint8_t RelocType) { +static StringRef reloctTypeToString(uint8_t RelocType) { switch (RelocType) { #define WASM_RELOC(NAME, REL) \ case REL: \ @@ -51,21 +51,21 @@ void InputChunk::verifyRelocTargets() const { uint32_t Offset = Rel.Offset - getInputSectionOffset(); const uint8_t *Loc = data().data() + Offset; switch (Rel.Type) { - case R_WEBASSEMBLY_TYPE_INDEX_LEB: - case R_WEBASSEMBLY_FUNCTION_INDEX_LEB: - case R_WEBASSEMBLY_GLOBAL_INDEX_LEB: - case R_WEBASSEMBLY_EVENT_INDEX_LEB: - case R_WEBASSEMBLY_MEMORY_ADDR_LEB: + case R_WASM_TYPE_INDEX_LEB: + case R_WASM_FUNCTION_INDEX_LEB: + case R_WASM_GLOBAL_INDEX_LEB: + case R_WASM_EVENT_INDEX_LEB: + case R_WASM_MEMORY_ADDR_LEB: ExistingValue = decodeULEB128(Loc, &BytesRead); break; - case R_WEBASSEMBLY_TABLE_INDEX_SLEB: - case R_WEBASSEMBLY_MEMORY_ADDR_SLEB: + case R_WASM_TABLE_INDEX_SLEB: + case R_WASM_MEMORY_ADDR_SLEB: ExistingValue = static_cast(decodeSLEB128(Loc, &BytesRead)); break; - case R_WEBASSEMBLY_TABLE_INDEX_I32: - case R_WEBASSEMBLY_MEMORY_ADDR_I32: - case R_WEBASSEMBLY_FUNCTION_OFFSET_I32: - case R_WEBASSEMBLY_SECTION_OFFSET_I32: + case R_WASM_TABLE_INDEX_I32: + case R_WASM_MEMORY_ADDR_I32: + case R_WASM_FUNCTION_OFFSET_I32: + case R_WASM_SECTION_OFFSET_I32: ExistingValue = static_cast(read32le(Loc)); break; default: @@ -76,7 +76,7 @@ void InputChunk::verifyRelocTargets() const { warn("expected LEB at relocation site be 5-byte padded"); uint32_t ExpectedValue = File->calcExpectedValue(Rel); if (ExpectedValue != ExistingValue) - warn("unexpected existing value for " + ReloctTypeToString(Rel.Type) + + warn("unexpected existing value for " + reloctTypeToString(Rel.Type) + ": existing=" + Twine(ExistingValue) + " expected=" + Twine(ExpectedValue)); } @@ -102,27 +102,27 @@ void InputChunk::writeTo(uint8_t *Buf) const { for (const WasmRelocation &Rel : Relocations) { uint8_t *Loc = Buf + Rel.Offset + Off; uint32_t Value = File->calcNewValue(Rel); - LLVM_DEBUG(dbgs() << "apply reloc: type=" << ReloctTypeToString(Rel.Type) + LLVM_DEBUG(dbgs() << "apply reloc: type=" << reloctTypeToString(Rel.Type) << " addend=" << Rel.Addend << " index=" << Rel.Index << " value=" << Value << " offset=" << Rel.Offset << "\n"); switch (Rel.Type) { - case R_WEBASSEMBLY_TYPE_INDEX_LEB: - case R_WEBASSEMBLY_FUNCTION_INDEX_LEB: - case R_WEBASSEMBLY_GLOBAL_INDEX_LEB: - case R_WEBASSEMBLY_EVENT_INDEX_LEB: - case R_WEBASSEMBLY_MEMORY_ADDR_LEB: + case R_WASM_TYPE_INDEX_LEB: + case R_WASM_FUNCTION_INDEX_LEB: + case R_WASM_GLOBAL_INDEX_LEB: + case R_WASM_EVENT_INDEX_LEB: + case R_WASM_MEMORY_ADDR_LEB: encodeULEB128(Value, Loc, 5); break; - case R_WEBASSEMBLY_TABLE_INDEX_SLEB: - case R_WEBASSEMBLY_MEMORY_ADDR_SLEB: + case R_WASM_TABLE_INDEX_SLEB: + case R_WASM_MEMORY_ADDR_SLEB: encodeSLEB128(static_cast(Value), Loc, 5); break; - case R_WEBASSEMBLY_TABLE_INDEX_I32: - case R_WEBASSEMBLY_MEMORY_ADDR_I32: - case R_WEBASSEMBLY_FUNCTION_OFFSET_I32: - case R_WEBASSEMBLY_SECTION_OFFSET_I32: + case R_WASM_TABLE_INDEX_I32: + case R_WASM_MEMORY_ADDR_I32: + case R_WASM_FUNCTION_OFFSET_I32: + case R_WASM_SECTION_OFFSET_I32: write32le(Loc, Value); break; default: @@ -148,11 +148,11 @@ void InputChunk::writeRelocations(raw_ostream &OS) const { writeUleb128(OS, File->calcNewIndex(Rel), "reloc index"); switch (Rel.Type) { - case R_WEBASSEMBLY_MEMORY_ADDR_LEB: - case R_WEBASSEMBLY_MEMORY_ADDR_SLEB: - case R_WEBASSEMBLY_MEMORY_ADDR_I32: - case R_WEBASSEMBLY_FUNCTION_OFFSET_I32: - case R_WEBASSEMBLY_SECTION_OFFSET_I32: + case R_WASM_MEMORY_ADDR_LEB: + case R_WASM_MEMORY_ADDR_SLEB: + case R_WASM_MEMORY_ADDR_I32: + case R_WASM_FUNCTION_OFFSET_I32: + case R_WASM_SECTION_OFFSET_I32: writeSleb128(OS, File->calcNewAddend(Rel), "reloc addend"); break; } @@ -178,14 +178,14 @@ void InputFunction::setTableIndex(uint32_t Index) { static unsigned writeCompressedReloc(uint8_t *Buf, const WasmRelocation &Rel, uint32_t Value) { switch (Rel.Type) { - case R_WEBASSEMBLY_TYPE_INDEX_LEB: - case R_WEBASSEMBLY_FUNCTION_INDEX_LEB: - case R_WEBASSEMBLY_GLOBAL_INDEX_LEB: - case R_WEBASSEMBLY_EVENT_INDEX_LEB: - case R_WEBASSEMBLY_MEMORY_ADDR_LEB: + case R_WASM_TYPE_INDEX_LEB: + case R_WASM_FUNCTION_INDEX_LEB: + case R_WASM_GLOBAL_INDEX_LEB: + case R_WASM_EVENT_INDEX_LEB: + case R_WASM_MEMORY_ADDR_LEB: return encodeULEB128(Value, Buf); - case R_WEBASSEMBLY_TABLE_INDEX_SLEB: - case R_WEBASSEMBLY_MEMORY_ADDR_SLEB: + case R_WASM_TABLE_INDEX_SLEB: + case R_WASM_MEMORY_ADDR_SLEB: return encodeSLEB128(static_cast(Value), Buf); default: llvm_unreachable("unexpected relocation type"); @@ -194,13 +194,13 @@ static unsigned writeCompressedReloc(uint8_t *Buf, const WasmRelocation &Rel, static unsigned getRelocWidthPadded(const WasmRelocation &Rel) { switch (Rel.Type) { - case R_WEBASSEMBLY_TYPE_INDEX_LEB: - case R_WEBASSEMBLY_FUNCTION_INDEX_LEB: - case R_WEBASSEMBLY_GLOBAL_INDEX_LEB: - case R_WEBASSEMBLY_EVENT_INDEX_LEB: - case R_WEBASSEMBLY_MEMORY_ADDR_LEB: - case R_WEBASSEMBLY_TABLE_INDEX_SLEB: - case R_WEBASSEMBLY_MEMORY_ADDR_SLEB: + case R_WASM_TYPE_INDEX_LEB: + case R_WASM_FUNCTION_INDEX_LEB: + case R_WASM_GLOBAL_INDEX_LEB: + case R_WASM_EVENT_INDEX_LEB: + case R_WASM_MEMORY_ADDR_LEB: + case R_WASM_TABLE_INDEX_SLEB: + case R_WASM_MEMORY_ADDR_SLEB: return 5; default: llvm_unreachable("unexpected relocation type"); diff --git a/lld/wasm/InputFiles.cpp b/lld/wasm/InputFiles.cpp index 95aa26849497b..2a5c10e39098c 100644 --- a/lld/wasm/InputFiles.cpp +++ b/lld/wasm/InputFiles.cpp @@ -65,7 +65,7 @@ void ObjFile::dumpInfo() const { // relocation and returns relocated index (i.e. translates from the input // symbol/type space to the output symbol/type space). uint32_t ObjFile::calcNewIndex(const WasmRelocation &Reloc) const { - if (Reloc.Type == R_WEBASSEMBLY_TYPE_INDEX_LEB) { + if (Reloc.Type == R_WASM_TYPE_INDEX_LEB) { assert(TypeIsUsed[Reloc.Index]); return TypeMap[Reloc.Index]; } @@ -76,12 +76,12 @@ uint32_t ObjFile::calcNewIndex(const WasmRelocation &Reloc) const { // relocation and returns updated addend by offset in the output section. uint32_t ObjFile::calcNewAddend(const WasmRelocation &Reloc) const { switch (Reloc.Type) { - case R_WEBASSEMBLY_MEMORY_ADDR_LEB: - case R_WEBASSEMBLY_MEMORY_ADDR_SLEB: - case R_WEBASSEMBLY_MEMORY_ADDR_I32: - case R_WEBASSEMBLY_FUNCTION_OFFSET_I32: + case R_WASM_MEMORY_ADDR_LEB: + case R_WASM_MEMORY_ADDR_SLEB: + case R_WASM_MEMORY_ADDR_I32: + case R_WASM_FUNCTION_OFFSET_I32: return Reloc.Addend; - case R_WEBASSEMBLY_SECTION_OFFSET_I32: + case R_WASM_SECTION_OFFSET_I32: return getSectionSymbol(Reloc.Index)->Section->OutputOffset + Reloc.Addend; default: llvm_unreachable("unexpected relocation type"); @@ -93,14 +93,14 @@ uint32_t ObjFile::calcNewAddend(const WasmRelocation &Reloc) const { // location. It is useful for catching bugs in the compiler and linker. uint32_t ObjFile::calcExpectedValue(const WasmRelocation &Reloc) const { switch (Reloc.Type) { - case R_WEBASSEMBLY_TABLE_INDEX_I32: - case R_WEBASSEMBLY_TABLE_INDEX_SLEB: { + case R_WASM_TABLE_INDEX_I32: + case R_WASM_TABLE_INDEX_SLEB: { const WasmSymbol &Sym = WasmObj->syms()[Reloc.Index]; return TableEntries[Sym.Info.ElementIndex]; } - case R_WEBASSEMBLY_MEMORY_ADDR_SLEB: - case R_WEBASSEMBLY_MEMORY_ADDR_I32: - case R_WEBASSEMBLY_MEMORY_ADDR_LEB: { + case R_WASM_MEMORY_ADDR_SLEB: + case R_WASM_MEMORY_ADDR_I32: + case R_WASM_MEMORY_ADDR_LEB: { const WasmSymbol &Sym = WasmObj->syms()[Reloc.Index]; if (Sym.isUndefined()) return 0; @@ -109,19 +109,19 @@ uint32_t ObjFile::calcExpectedValue(const WasmRelocation &Reloc) const { return Segment.Data.Offset.Value.Int32 + Sym.Info.DataRef.Offset + Reloc.Addend; } - case R_WEBASSEMBLY_FUNCTION_OFFSET_I32: + case R_WASM_FUNCTION_OFFSET_I32: if (auto *Sym = dyn_cast(getFunctionSymbol(Reloc.Index))) { return Sym->Function->getFunctionInputOffset() + Sym->Function->getFunctionCodeOffset() + Reloc.Addend; } return 0; - case R_WEBASSEMBLY_SECTION_OFFSET_I32: + case R_WASM_SECTION_OFFSET_I32: return Reloc.Addend; - case R_WEBASSEMBLY_TYPE_INDEX_LEB: + case R_WASM_TYPE_INDEX_LEB: return Reloc.Index; - case R_WEBASSEMBLY_FUNCTION_INDEX_LEB: - case R_WEBASSEMBLY_GLOBAL_INDEX_LEB: - case R_WEBASSEMBLY_EVENT_INDEX_LEB: { + case R_WASM_FUNCTION_INDEX_LEB: + case R_WASM_GLOBAL_INDEX_LEB: + case R_WASM_EVENT_INDEX_LEB: { const WasmSymbol &Sym = WasmObj->syms()[Reloc.Index]; return Sym.Info.ElementIndex; } @@ -133,32 +133,32 @@ uint32_t ObjFile::calcExpectedValue(const WasmRelocation &Reloc) const { // Translate from the relocation's index into the final linked output value. uint32_t ObjFile::calcNewValue(const WasmRelocation &Reloc) const { switch (Reloc.Type) { - case R_WEBASSEMBLY_TABLE_INDEX_I32: - case R_WEBASSEMBLY_TABLE_INDEX_SLEB: + case R_WASM_TABLE_INDEX_I32: + case R_WASM_TABLE_INDEX_SLEB: return getFunctionSymbol(Reloc.Index)->getTableIndex(); - case R_WEBASSEMBLY_MEMORY_ADDR_SLEB: - case R_WEBASSEMBLY_MEMORY_ADDR_I32: - case R_WEBASSEMBLY_MEMORY_ADDR_LEB: + case R_WASM_MEMORY_ADDR_SLEB: + case R_WASM_MEMORY_ADDR_I32: + case R_WASM_MEMORY_ADDR_LEB: if (auto *Sym = dyn_cast(getDataSymbol(Reloc.Index))) if (Sym->isLive()) return Sym->getVirtualAddress() + Reloc.Addend; return 0; - case R_WEBASSEMBLY_TYPE_INDEX_LEB: + case R_WASM_TYPE_INDEX_LEB: return TypeMap[Reloc.Index]; - case R_WEBASSEMBLY_FUNCTION_INDEX_LEB: + case R_WASM_FUNCTION_INDEX_LEB: return getFunctionSymbol(Reloc.Index)->getFunctionIndex(); - case R_WEBASSEMBLY_GLOBAL_INDEX_LEB: + case R_WASM_GLOBAL_INDEX_LEB: return getGlobalSymbol(Reloc.Index)->getGlobalIndex(); - case R_WEBASSEMBLY_EVENT_INDEX_LEB: + case R_WASM_EVENT_INDEX_LEB: return getEventSymbol(Reloc.Index)->getEventIndex(); - case R_WEBASSEMBLY_FUNCTION_OFFSET_I32: + case R_WASM_FUNCTION_OFFSET_I32: if (auto *Sym = dyn_cast(getFunctionSymbol(Reloc.Index))) { if (Sym->isLive()) return Sym->Function->OutputOffset + Sym->Function->getFunctionCodeOffset() + Reloc.Addend; } return 0; - case R_WEBASSEMBLY_SECTION_OFFSET_I32: + case R_WASM_SECTION_OFFSET_I32: return getSectionSymbol(Reloc.Index)->Section->OutputOffset + Reloc.Addend; default: llvm_unreachable("unknown relocation type"); @@ -378,12 +378,15 @@ Symbol *ObjFile::createUndefined(const WasmSymbol &Sym) { switch (Sym.Info.Kind) { case WASM_SYMBOL_TYPE_FUNCTION: - return Symtab->addUndefinedFunction(Name, Sym.Info.Module, Flags, this, + return Symtab->addUndefinedFunction(Name, Sym.Info.ImportName, + Sym.Info.ImportModule, Flags, this, Sym.Signature); case WASM_SYMBOL_TYPE_DATA: return Symtab->addUndefinedData(Name, Flags, this); case WASM_SYMBOL_TYPE_GLOBAL: - return Symtab->addUndefinedGlobal(Name, Flags, this, Sym.GlobalType); + return Symtab->addUndefinedGlobal(Name, Sym.Info.ImportName, + Sym.Info.ImportModule, Flags, this, + Sym.GlobalType); case WASM_SYMBOL_TYPE_SECTION: llvm_unreachable("section symbols cannot be undefined"); } @@ -447,7 +450,8 @@ static Symbol *createBitcodeSymbol(const lto::InputFile::Symbol &ObjSym, if (ObjSym.isUndefined()) { if (ObjSym.isExecutable()) - return Symtab->addUndefinedFunction(Name, kDefaultModule, Flags, &F, nullptr); + return Symtab->addUndefinedFunction(Name, Name, DefaultModule, Flags, &F, + nullptr); return Symtab->addUndefinedData(Name, Flags, &F); } diff --git a/lld/wasm/LTO.cpp b/lld/wasm/LTO.cpp index 0e76dc214edae..2b49bac5cf2f7 100644 --- a/lld/wasm/LTO.cpp +++ b/lld/wasm/LTO.cpp @@ -47,9 +47,6 @@ static std::unique_ptr createLTO() { C.Options.FunctionSections = true; C.Options.DataSections = true; - // Wasm currently only supports ThreadModel::Single - C.Options.ThreadModel = ThreadModel::Single; - C.DisableVerify = Config->DisableVerify; C.DiagHandler = diagnosticHandler; C.OptLevel = Config->LTOO; @@ -80,7 +77,8 @@ BitcodeCompiler::~BitcodeCompiler() = default; static void undefine(Symbol *S) { if (auto F = dyn_cast(S)) - replaceSymbol(F, F->getName(), kDefaultModule, 0, + replaceSymbol(F, F->getName(), F->getName(), + DefaultModule, 0, F->getFile(), F->Signature); else if (isa(S)) replaceSymbol(S, S->getName(), 0, S->getFile()); diff --git a/lld/wasm/MarkLive.cpp b/lld/wasm/MarkLive.cpp index e6db4c3e41fac..c3786da06cf6e 100644 --- a/lld/wasm/MarkLive.cpp +++ b/lld/wasm/MarkLive.cpp @@ -38,32 +38,42 @@ void lld::wasm::markLive() { LLVM_DEBUG(dbgs() << "markLive\n"); SmallVector Q; - auto Enqueue = [&](Symbol *Sym) { + std::function Enqueue = [&](Symbol *Sym) { if (!Sym || Sym->isLive()) return; LLVM_DEBUG(dbgs() << "markLive: " << Sym->getName() << "\n"); Sym->markLive(); if (InputChunk *Chunk = Sym->getChunk()) Q.push_back(Chunk); + + // The ctor functions are all referenced by the synthetic CallCtors + // function. However, this function does not contain relocations so we + // have to manually mark the ctors as live if CallCtors itself is live. + if (Sym == WasmSym::CallCtors) { + for (const ObjFile *Obj : Symtab->ObjectFiles) { + const WasmLinkingData &L = Obj->getWasmObj()->linkingData(); + for (const WasmInitFunc &F : L.InitFunctions) + Enqueue(Obj->getFunctionSymbol(F.Symbol)); + } + } }; // Add GC root symbols. if (!Config->Entry.empty()) Enqueue(Symtab->find(Config->Entry)); - Enqueue(WasmSym::CallCtors); // We need to preserve any exported symbol for (Symbol *Sym : Symtab->getSymbols()) if (Sym->isExported()) Enqueue(Sym); - // The ctor functions are all used in the synthetic __wasm_call_ctors - // function, but since this function is created in-place it doesn't contain - // relocations which mean we have to manually mark the ctors. - for (const ObjFile *Obj : Symtab->ObjectFiles) { - const WasmLinkingData &L = Obj->getWasmObj()->linkingData(); - for (const WasmInitFunc &F : L.InitFunctions) - Enqueue(Obj->getFunctionSymbol(F.Symbol)); + // For relocatable output, we need to preserve all the ctor functions + if (Config->Relocatable) { + for (const ObjFile *Obj : Symtab->ObjectFiles) { + const WasmLinkingData &L = Obj->getWasmObj()->linkingData(); + for (const WasmInitFunc &F : L.InitFunctions) + Enqueue(Obj->getFunctionSymbol(F.Symbol)); + } } // Follow relocations to mark all reachable chunks. @@ -71,7 +81,7 @@ void lld::wasm::markLive() { InputChunk *C = Q.pop_back_val(); for (const WasmRelocation Reloc : C->getRelocations()) { - if (Reloc.Type == R_WEBASSEMBLY_TYPE_INDEX_LEB) + if (Reloc.Type == R_WASM_TYPE_INDEX_LEB) continue; Symbol *Sym = C->File->getSymbol(Reloc.Index); @@ -82,9 +92,9 @@ void lld::wasm::markLive() { // zero is only reachable via "call", not via "call_indirect". The stub // functions used for weak-undefined symbols have this behaviour (compare // equal to null pointer, only reachable via direct call). - if (Reloc.Type == R_WEBASSEMBLY_TABLE_INDEX_SLEB || - Reloc.Type == R_WEBASSEMBLY_TABLE_INDEX_I32) { - FunctionSymbol *FuncSym = cast(Sym); + if (Reloc.Type == R_WASM_TABLE_INDEX_SLEB || + Reloc.Type == R_WASM_TABLE_INDEX_I32) { + auto *FuncSym = cast(Sym); if (FuncSym->hasTableIndex() && FuncSym->getTableIndex() == 0) continue; } diff --git a/lld/wasm/Options.td b/lld/wasm/Options.td index 3ed55b4bcda07..591d624e666dd 100644 --- a/lld/wasm/Options.td +++ b/lld/wasm/Options.td @@ -93,6 +93,10 @@ def strip_debug: F<"strip-debug">, HelpText<"Strip debugging information">; def threads: F<"threads">, HelpText<"Run the linker multi-threaded">; +def trace: F<"trace">, HelpText<"Print the names of the input files">; + +defm trace_symbol: Eq<"trace-symbol", "Trace references to symbols">; + defm undefined: Eq<"undefined", "Force undefined symbol during linking">; def v: Flag<["-"], "v">, HelpText<"Display the version number">; @@ -160,6 +164,8 @@ def: Flag<["-"], "m">, Alias; def: Flag<["-"], "r">, Alias; def: Flag<["-"], "s">, Alias, HelpText<"Alias for --strip-all">; def: Flag<["-"], "S">, Alias, HelpText<"Alias for --strip-debug">; +def: Flag<["-"], "t">, Alias, HelpText<"Alias for --trace">; +def: JoinedOrSeparate<["-"], "y">, Alias, HelpText<"Alias for --trace-symbol">; def: JoinedOrSeparate<["-"], "u">, Alias; // LTO-related options. diff --git a/lld/wasm/SymbolTable.cpp b/lld/wasm/SymbolTable.cpp index e45dc6bec715b..9315e72db23d9 100644 --- a/lld/wasm/SymbolTable.cpp +++ b/lld/wasm/SymbolTable.cpp @@ -28,6 +28,8 @@ SymbolTable *lld::wasm::Symtab; void SymbolTable::addFile(InputFile *File) { log("Processing: " + toString(File)); + if (Config->Trace) + message(toString(File)); File->parse(); // LLVM bitcode file @@ -73,21 +75,48 @@ void SymbolTable::reportRemainingUndefines() { } Symbol *SymbolTable::find(StringRef Name) { - return SymMap.lookup(CachedHashStringRef(Name)); + auto It = SymMap.find(CachedHashStringRef(Name)); + if (It == SymMap.end() || It->second == -1) + return nullptr; + return SymVector[It->second]; } -std::pair SymbolTable::insert(StringRef Name, InputFile *File) { - bool Inserted = false; - Symbol *&Sym = SymMap[CachedHashStringRef(Name)]; - if (!Sym) { - Sym = reinterpret_cast(make()); - Sym->IsUsedInRegularObj = false; - SymVector.emplace_back(Sym); - Inserted = true; +void SymbolTable::replace(StringRef Name, Symbol* Sym) { + auto It = SymMap.find(CachedHashStringRef(Name)); + SymVector[It->second] = Sym; +} + +std::pair SymbolTable::insertName(StringRef Name) { + bool Trace = false; + auto P = SymMap.insert({CachedHashStringRef(Name), (int)SymVector.size()}); + int &SymIndex = P.first->second; + bool IsNew = P.second; + if (SymIndex == -1) { + SymIndex = SymVector.size(); + Trace = true; + IsNew = true; } + + if (!IsNew) + return {SymVector[SymIndex], false}; + + Symbol *Sym = reinterpret_cast(make()); + Sym->IsUsedInRegularObj = false; + Sym->Traced = Trace; + SymVector.emplace_back(Sym); + return {Sym, true}; +} + +std::pair SymbolTable::insert(StringRef Name, + const InputFile *File) { + Symbol *S; + bool WasInserted; + std::tie(S, WasInserted) = insertName(Name); + if (!File || File->kind() == InputFile::ObjectKind) - Sym->IsUsedInRegularObj = true; - return {Sym, Inserted}; + S->IsUsedInRegularObj = true; + + return {S, WasInserted}; } static void reportTypeError(const Symbol *Existing, const InputFile *File, @@ -99,29 +128,19 @@ static void reportTypeError(const Symbol *Existing, const InputFile *File, } // Check the type of new symbol matches that of the symbol is replacing. -// For functions this can also involve verifying that the signatures match. -static void checkFunctionType(Symbol *Existing, const InputFile *File, - const WasmSignature *NewSig) { - auto ExistingFunction = dyn_cast(Existing); - if (!ExistingFunction) { - reportTypeError(Existing, File, WASM_SYMBOL_TYPE_FUNCTION); - return; - } - +// Returns true if the function types match, false is there is a singature +// mismatch. +bool signatureMatches(FunctionSymbol *Existing, const WasmSignature *NewSig) { if (!NewSig) - return; + return true; - const WasmSignature *OldSig = ExistingFunction->Signature; + const WasmSignature *OldSig = Existing->Signature; if (!OldSig) { - ExistingFunction->Signature = NewSig; - return; + Existing->Signature = NewSig; + return true; } - if (*NewSig != *OldSig) - warn("function signature mismatch: " + Existing->getName() + - "\n>>> defined as " + toString(*OldSig) + " in " + - toString(Existing->getFile()) + "\n>>> defined as " + - toString(*NewSig) + " in " + toString(File)); + return *NewSig == *OldSig; } static void checkGlobalType(const Symbol *Existing, const InputFile *File, @@ -231,26 +250,45 @@ Symbol *SymbolTable::addDefinedFunction(StringRef Name, uint32_t Flags, bool WasInserted; std::tie(S, WasInserted) = insert(Name, File); + auto Replace = [&](Symbol* Sym) { + // If the new defined function doesn't have signture (i.e. bitcode + // functions) but the old symbol does, then preserve the old signature + const WasmSignature *OldSig = S->getSignature(); + auto* NewSym = replaceSymbol(Sym, Name, Flags, File, Function); + if (!NewSym->Signature) + NewSym->Signature = OldSig; + }; + if (WasInserted || S->isLazy()) { - replaceSymbol(S, Name, Flags, File, Function); + Replace(S); return S; } - if (Function) - checkFunctionType(S, File, &Function->Signature); + auto ExistingFunction = dyn_cast(S); + if (!ExistingFunction) { + reportTypeError(S, File, WASM_SYMBOL_TYPE_FUNCTION); + return S; + } - if (shouldReplace(S, File, Flags)) { - // If the new defined function doesn't have signture (i.e. bitcode - // functions) but the old symbol does then preserve the old signature - const WasmSignature *OldSig = nullptr; - if (auto* F = dyn_cast(S)) - OldSig = F->Signature; - if (auto *L = dyn_cast(S)) - OldSig = L->Signature; - auto NewSym = replaceSymbol(S, Name, Flags, File, Function); - if (!NewSym->Signature) - NewSym->Signature = OldSig; + if (Function && !signatureMatches(ExistingFunction, &Function->Signature)) { + Symbol* Variant; + if (getFunctionVariant(S, &Function->Signature, File, &Variant)) + // New variant, always replace + Replace(Variant); + else if (shouldReplace(S, File, Flags)) + // Variant already exists, replace it after checking shouldReplace + Replace(Variant); + + // This variant we found take the place in the symbol table as the primary + // variant. + replace(Name, Variant); + return Variant; } + + // Existing function with matching signature. + if (shouldReplace(S, File, Flags)) + Replace(S); + return S; } @@ -263,15 +301,19 @@ Symbol *SymbolTable::addDefinedData(StringRef Name, uint32_t Flags, bool WasInserted; std::tie(S, WasInserted) = insert(Name, File); - if (WasInserted || S->isLazy()) { + auto Replace = [&]() { replaceSymbol(S, Name, Flags, File, Segment, Address, Size); + }; + + if (WasInserted || S->isLazy()) { + Replace(); return S; } checkDataType(S, File); if (shouldReplace(S, File, Flags)) - replaceSymbol(S, Name, Flags, File, Segment, Address, Size); + Replace(); return S; } @@ -283,15 +325,19 @@ Symbol *SymbolTable::addDefinedGlobal(StringRef Name, uint32_t Flags, bool WasInserted; std::tie(S, WasInserted) = insert(Name, File); - if (WasInserted || S->isLazy()) { + auto Replace = [&]() { replaceSymbol(S, Name, Flags, File, Global); + }; + + if (WasInserted || S->isLazy()) { + Replace(); return S; } checkGlobalType(S, File, &Global->getType()); if (shouldReplace(S, File, Flags)) - replaceSymbol(S, Name, Flags, File, Global); + Replace(); return S; } @@ -303,19 +349,24 @@ Symbol *SymbolTable::addDefinedEvent(StringRef Name, uint32_t Flags, bool WasInserted; std::tie(S, WasInserted) = insert(Name, File); - if (WasInserted || S->isLazy()) { + auto Replace = [&]() { replaceSymbol(S, Name, Flags, File, Event); + }; + + if (WasInserted || S->isLazy()) { + Replace(); return S; } checkEventType(S, File, &Event->getType(), &Event->Signature); if (shouldReplace(S, File, Flags)) - replaceSymbol(S, Name, Flags, File, Event); + Replace(); return S; } -Symbol *SymbolTable::addUndefinedFunction(StringRef Name, StringRef Module, +Symbol *SymbolTable::addUndefinedFunction(StringRef Name, StringRef ImportName, + StringRef ImportModule, uint32_t Flags, InputFile *File, const WasmSignature *Sig) { LLVM_DEBUG(dbgs() << "addUndefinedFunction: " << Name << @@ -325,12 +376,25 @@ Symbol *SymbolTable::addUndefinedFunction(StringRef Name, StringRef Module, bool WasInserted; std::tie(S, WasInserted) = insert(Name, File); + auto Replace = [&]() { + replaceSymbol(S, Name, ImportName, ImportModule, Flags, + File, Sig); + }; + if (WasInserted) - replaceSymbol(S, Name, Module, Flags, File, Sig); + Replace(); else if (auto *Lazy = dyn_cast(S)) Lazy->fetch(); - else - checkFunctionType(S, File, Sig); + else { + auto ExistingFunction = dyn_cast(S); + if (!ExistingFunction) { + reportTypeError(S, File, WASM_SYMBOL_TYPE_FUNCTION); + return S; + } + if (!signatureMatches(ExistingFunction, Sig)) + if (getFunctionVariant(S, Sig, File, &S)) + Replace(); + } return S; } @@ -352,7 +416,8 @@ Symbol *SymbolTable::addUndefinedData(StringRef Name, uint32_t Flags, return S; } -Symbol *SymbolTable::addUndefinedGlobal(StringRef Name, uint32_t Flags, +Symbol *SymbolTable::addUndefinedGlobal(StringRef Name, StringRef ImportName, + StringRef ImportModule, uint32_t Flags, InputFile *File, const WasmGlobalType *Type) { LLVM_DEBUG(dbgs() << "addUndefinedGlobal: " << Name << "\n"); @@ -362,7 +427,8 @@ Symbol *SymbolTable::addUndefinedGlobal(StringRef Name, uint32_t Flags, std::tie(S, WasInserted) = insert(Name, File); if (WasInserted) - replaceSymbol(S, Name, Flags, File, Type); + replaceSymbol(S, Name, ImportName, ImportModule, Flags, + File, Type); else if (auto *Lazy = dyn_cast(S)) Lazy->fetch(); else if (S->isDefined()) @@ -409,3 +475,159 @@ void SymbolTable::addLazy(ArchiveFile *File, const Archive::Symbol *Sym) { bool SymbolTable::addComdat(StringRef Name) { return Comdats.insert(CachedHashStringRef(Name)).second; } + +// The new signature doesn't match. Create a variant to the symbol with the +// signature encoded in the name and return that instead. These symbols are +// then unified later in handleSymbolVariants. +bool SymbolTable::getFunctionVariant(Symbol* Sym, const WasmSignature *Sig, + const InputFile *File, Symbol **Out) { + LLVM_DEBUG(dbgs() << "getFunctionVariant: " << Sym->getName() << " -> " + << " " << toString(*Sig) << "\n"); + Symbol *Variant = nullptr; + + // Linear search through symbol variants. Should never be more than two + // or three entries here. + auto &Variants = SymVariants[CachedHashStringRef(Sym->getName())]; + if (Variants.size() == 0) + Variants.push_back(Sym); + + for (Symbol* V : Variants) { + if (*V->getSignature() == *Sig) { + Variant = V; + break; + } + } + + bool WasAdded = !Variant; + if (WasAdded) { + // Create a new variant; + LLVM_DEBUG(dbgs() << "added new variant\n"); + Variant = reinterpret_cast(make()); + Variants.push_back(Variant); + } else { + LLVM_DEBUG(dbgs() << "variant already exists: " << toString(*Variant) << "\n"); + assert(*Variant->getSignature() == *Sig); + } + + *Out = Variant; + return WasAdded; +} + +// Set a flag for --trace-symbol so that we can print out a log message +// if a new symbol with the same name is inserted into the symbol table. +void SymbolTable::trace(StringRef Name) { + SymMap.insert({CachedHashStringRef(Name), -1}); +} + +static const uint8_t UnreachableFn[] = { + 0x03 /* ULEB length */, 0x00 /* ULEB num locals */, + 0x00 /* opcode unreachable */, 0x0b /* opcode end */ +}; + +// Replace the given symbol body with an unreachable function. +// This is used by handleWeakUndefines in order to generate a callable +// equivalent of an undefined function and also handleSymbolVariants for +// undefined functions that don't match the signature of the definition. +InputFunction *SymbolTable::replaceWithUnreachable(Symbol *Sym, + const WasmSignature &Sig, + StringRef DebugName) { + auto *Func = make(Sig, Sym->getName(), DebugName); + Func->setBody(UnreachableFn); + SyntheticFunctions.emplace_back(Func); + replaceSymbol(Sym, Sym->getName(), Sym->getFlags(), nullptr, + Func); + return Func; +} + +// For weak undefined functions, there may be "call" instructions that reference +// the symbol. In this case, we need to synthesise a dummy/stub function that +// will abort at runtime, so that relocations can still provided an operand to +// the call instruction that passes Wasm validation. +void SymbolTable::handleWeakUndefines() { + for (Symbol *Sym : getSymbols()) { + if (!Sym->isUndefWeak()) + continue; + + const WasmSignature *Sig = Sym->getSignature(); + if (!Sig) { + // It is possible for undefined functions not to have a signature (eg. if + // added via "--undefined"), but weak undefined ones do have a signature. + // Lazy symbols may not be functions and therefore Sig can still be null + // in some circumstantce. + assert(!isa(Sym)); + continue; + } + + // Add a synthetic dummy for weak undefined functions. These dummies will + // be GC'd if not used as the target of any "call" instructions. + StringRef DebugName = Saver.save("undefined:" + toString(*Sym)); + InputFunction* Func = replaceWithUnreachable(Sym, *Sig, DebugName); + // Ensure it compares equal to the null pointer, and so that table relocs + // don't pull in the stub body (only call-operand relocs should do that). + Func->setTableIndex(0); + // Hide our dummy to prevent export. + Sym->setHidden(true); + } +} + +static void reportFunctionSignatureMismatch(StringRef SymName, + FunctionSymbol *A, + FunctionSymbol *B, bool Error) { + std::string msg = ("function signature mismatch: " + SymName + + "\n>>> defined as " + toString(*A->Signature) + " in " + + toString(A->getFile()) + "\n>>> defined as " + + toString(*B->Signature) + " in " + toString(B->getFile())) + .str(); + if (Error) + error(msg); + else + warn(msg); +} + +// Remove any variant symbols that were created due to function signature +// mismatches. +void SymbolTable::handleSymbolVariants() { + for (auto Pair : SymVariants) { + // Push the initial symbol onto the list of variants. + StringRef SymName = Pair.first.val(); + std::vector &Variants = Pair.second; + +#ifndef NDEBUG + LLVM_DEBUG(dbgs() << "symbol with (" << Variants.size() + << ") variants: " << SymName << "\n"); + for (auto *S: Variants) { + auto *F = cast(S); + LLVM_DEBUG(dbgs() << " variant: " + F->getName() << " " + << toString(*F->Signature) << "\n"); + } +#endif + + // Find the one definition. + DefinedFunction *Defined = nullptr; + for (auto *Symbol : Variants) { + if (auto F = dyn_cast(Symbol)) { + Defined = F; + break; + } + } + + // If there are no definitions, and the undefined symbols disagree on + // the signature, there is not we can do since we don't know which one + // to use as the signature on the import. + if (!Defined) { + reportFunctionSignatureMismatch(SymName, + cast(Variants[0]), + cast(Variants[1]), true); + return; + } + + for (auto *Symbol : Variants) { + if (Symbol != Defined) { + auto *F = cast(Symbol); + reportFunctionSignatureMismatch(SymName, F, Defined, false); + StringRef DebugName = Saver.save("unreachable:" + toString(*F)); + replaceWithUnreachable(F, *F->Signature, DebugName); + } + } + } +} diff --git a/lld/wasm/SymbolTable.h b/lld/wasm/SymbolTable.h index f0bdd6cc01c8e..3d0529af41da9 100644 --- a/lld/wasm/SymbolTable.h +++ b/lld/wasm/SymbolTable.h @@ -46,8 +46,13 @@ class SymbolTable { void reportRemainingUndefines(); ArrayRef getSymbols() const { return SymVector; } + Symbol *find(StringRef Name); + void replace(StringRef Name, Symbol* Sym); + + void trace(StringRef Name); + Symbol *addDefinedFunction(StringRef Name, uint32_t Flags, InputFile *File, InputFunction *Function); Symbol *addDefinedData(StringRef Name, uint32_t Flags, InputFile *File, @@ -58,11 +63,13 @@ class SymbolTable { Symbol *addDefinedEvent(StringRef Name, uint32_t Flags, InputFile *File, InputEvent *E); - Symbol *addUndefinedFunction(StringRef Name, StringRef Module, uint32_t Flags, + Symbol *addUndefinedFunction(StringRef Name, StringRef ImportName, + StringRef ImportModule, uint32_t Flags, InputFile *File, const WasmSignature *Signature); Symbol *addUndefinedData(StringRef Name, uint32_t Flags, InputFile *File); - Symbol *addUndefinedGlobal(StringRef Name, uint32_t Flags, InputFile *File, - const WasmGlobalType *Type); + Symbol *addUndefinedGlobal(StringRef Name, StringRef ImportName, + StringRef ImportModule, uint32_t Flags, + InputFile *File, const WasmGlobalType *Type); void addLazy(ArchiveFile *F, const llvm::object::Archive::Symbol *Sym); @@ -74,12 +81,28 @@ class SymbolTable { DefinedFunction *addSyntheticFunction(StringRef Name, uint32_t Flags, InputFunction *Function); -private: - std::pair insert(StringRef Name, InputFile *File); + void handleSymbolVariants(); + void handleWeakUndefines(); - llvm::DenseMap SymMap; +private: + std::pair insert(StringRef Name, const InputFile *File); + std::pair insertName(StringRef Name); + + bool getFunctionVariant(Symbol* Sym, const WasmSignature *Sig, + const InputFile *File, Symbol **Out); + InputFunction *replaceWithUnreachable(Symbol *Sym, const WasmSignature &Sig, + StringRef DebugName); + + // Maps symbol names to index into the SymVector. -1 means that symbols + // is to not yet in the vector but it should have tracing enabled if it is + // ever added. + llvm::DenseMap SymMap; std::vector SymVector; + // For certain symbols types, e.g. function symbols, we allow for muliple + // variants of the same symbol with different signatures. + llvm::DenseMap> SymVariants; + llvm::DenseSet Comdats; // For LTO. diff --git a/lld/wasm/Symbols.cpp b/lld/wasm/Symbols.cpp index 0c3c0e06576c0..f8ea47176a3aa 100644 --- a/lld/wasm/Symbols.cpp +++ b/lld/wasm/Symbols.cpp @@ -45,6 +45,14 @@ WasmSymbolType Symbol::getWasmType() const { llvm_unreachable("invalid symbol kind"); } +const WasmSignature *Symbol::getSignature() const { + if (auto* F = dyn_cast(this)) + return F->Signature; + if (auto *L = dyn_cast(this)) + return L->Signature; + return nullptr; +} + InputChunk *Symbol::getChunk() const { if (auto *F = dyn_cast(this)) return F->Function; @@ -116,7 +124,7 @@ bool Symbol::isExported() const { if (Config->ExportDynamic && !isHidden()) return true; - return false; + return Flags & WASM_SYMBOL_EXPORTED; } uint32_t FunctionSymbol::getFunctionIndex() const { @@ -293,3 +301,16 @@ std::string lld::toString(wasm::Symbol::Kind Kind) { } llvm_unreachable("invalid symbol kind"); } + +// Print out a log message for --trace-symbol. +void lld::wasm::printTraceSymbol(Symbol *Sym) { + std::string S; + if (Sym->isUndefined()) + S = ": reference to "; + else if (Sym->isLazy()) + S = ": lazy definition of "; + else + S = ": definition of "; + + message(toString(Sym->getFile()) + S + Sym->getName()); +} diff --git a/lld/wasm/Symbols.h b/lld/wasm/Symbols.h index 652d0a9ef6a33..3ed9e7abf55fc 100644 --- a/lld/wasm/Symbols.h +++ b/lld/wasm/Symbols.h @@ -76,6 +76,8 @@ class Symbol { // Returns the file from which this symbol was created. InputFile *getFile() const { return File; } + uint32_t getFlags() const { return Flags; } + InputChunk *getChunk() const; // Indicates that the section or import for this symbol will be included in @@ -100,10 +102,16 @@ class Symbol { unsigned IsUsedInRegularObj : 1; unsigned ForceExport : 1; + // True if this symbol is specified by --trace-symbol option. + unsigned Traced : 1; + + const WasmSignature* getSignature() const; + protected: Symbol(StringRef Name, Kind K, uint32_t Flags, InputFile *F) - : IsUsedInRegularObj(false), ForceExport(false), Name(Name), - SymbolKind(K), Flags(Flags), File(F), Referenced(!Config->GcSections) {} + : IsUsedInRegularObj(false), ForceExport(false), Traced(false), + Name(Name), SymbolKind(K), Flags(Flags), File(F), + Referenced(!Config->GcSections) {} StringRef Name; Kind SymbolKind; @@ -155,17 +163,19 @@ class DefinedFunction : public FunctionSymbol { class UndefinedFunction : public FunctionSymbol { public: - UndefinedFunction(StringRef Name, StringRef Module, uint32_t Flags, + UndefinedFunction(StringRef Name, StringRef ImportName, + StringRef ImportModule, uint32_t Flags, InputFile *File = nullptr, const WasmSignature *Type = nullptr) : FunctionSymbol(Name, UndefinedFunctionKind, Flags, File, Type), - Module(Module) {} + ImportName(ImportName), ImportModule(ImportModule) {} static bool classof(const Symbol *S) { return S->kind() == UndefinedFunctionKind; } - StringRef Module; + StringRef ImportName; + StringRef ImportModule; }; class SectionSymbol : public Symbol { @@ -271,13 +281,18 @@ class DefinedGlobal : public GlobalSymbol { class UndefinedGlobal : public GlobalSymbol { public: - UndefinedGlobal(StringRef Name, uint32_t Flags, InputFile *File = nullptr, + UndefinedGlobal(StringRef Name, StringRef ImportName, StringRef ImportModule, + uint32_t Flags, InputFile *File = nullptr, const WasmGlobalType *Type = nullptr) - : GlobalSymbol(Name, UndefinedGlobalKind, Flags, File, Type) {} + : GlobalSymbol(Name, UndefinedGlobalKind, Flags, File, Type), + ImportName(ImportName), ImportModule(ImportModule) {} static bool classof(const Symbol *S) { return S->kind() == UndefinedGlobalKind; } + + StringRef ImportName; + StringRef ImportModule; }; // Wasm events are features that suspend the current execution and transfer the @@ -402,6 +417,8 @@ union SymbolUnion { alignas(SectionSymbol) char I[sizeof(SectionSymbol)]; }; +void printTraceSymbol(Symbol *Sym); + template T *replaceSymbol(Symbol *S, ArgT &&... Arg) { static_assert(std::is_trivially_destructible(), @@ -417,6 +434,13 @@ T *replaceSymbol(Symbol *S, ArgT &&... Arg) { T *S2 = new (S) T(std::forward(Arg)...); S2->IsUsedInRegularObj = SymCopy.IsUsedInRegularObj; S2->ForceExport = SymCopy.ForceExport; + S2->Traced = SymCopy.Traced; + + // Print out a log message if --trace-symbol was specified. + // This is for debugging. + if (S2->Traced) + printTraceSymbol(S2); + return S2; } diff --git a/lld/wasm/Writer.cpp b/lld/wasm/Writer.cpp index a1b40971ea0c2..879a1595361f6 100644 --- a/lld/wasm/Writer.cpp +++ b/lld/wasm/Writer.cpp @@ -39,9 +39,9 @@ using namespace llvm::wasm; using namespace lld; using namespace lld::wasm; -static constexpr int kStackAlignment = 16; -static constexpr const char *kFunctionTableName = "__indirect_function_table"; -const char *lld::wasm::kDefaultModule = "env"; +static constexpr int StackAlignment = 16; +static constexpr const char *FunctionTableName = "__indirect_function_table"; +const char *lld::wasm::DefaultModule = "env"; namespace { @@ -157,7 +157,7 @@ void Writer::createImportSection() { if (Config->ImportMemory) { WasmImport Import; - Import.Module = kDefaultModule; + Import.Module = DefaultModule; Import.Field = "memory"; Import.Kind = WASM_EXTERNAL_MEMORY; Import.Memory.Flags = 0; @@ -174,8 +174,8 @@ void Writer::createImportSection() { if (Config->ImportTable) { uint32_t TableSize = TableBase + IndirectFunctions.size(); WasmImport Import; - Import.Module = kDefaultModule; - Import.Field = kFunctionTableName; + Import.Module = DefaultModule; + Import.Field = FunctionTableName; Import.Kind = WASM_EXTERNAL_TABLE; Import.Table.ElemType = WASM_TYPE_FUNCREF; Import.Table.Limits = {0, TableSize, 0}; @@ -184,12 +184,17 @@ void Writer::createImportSection() { for (const Symbol *Sym : ImportedSymbols) { WasmImport Import; - if (auto *F = dyn_cast(Sym)) - Import.Module = F->Module; - else - Import.Module = kDefaultModule; + if (auto *F = dyn_cast(Sym)) { + Import.Field = F->ImportName; + Import.Module = F->ImportModule; + } else if (auto *G = dyn_cast(Sym)) { + Import.Field = G->ImportName; + Import.Module = G->ImportModule; + } else { + Import.Field = Sym->getName(); + Import.Module = DefaultModule; + } - Import.Field = Sym->getName(); if (auto *FunctionSym = dyn_cast(Sym)) { Import.Kind = WASM_EXTERNAL_FUNCTION; Import.SigIndex = lookupType(*FunctionSym->Signature); @@ -448,6 +453,13 @@ static uint32_t getWasmFlags(const Symbol *Sym) { Flags |= WASM_SYMBOL_VISIBILITY_HIDDEN; if (Sym->isUndefined()) Flags |= WASM_SYMBOL_UNDEFINED; + if (auto *F = dyn_cast(Sym)) { + if (F->getName() != F->ImportName) + Flags |= WASM_SYMBOL_EXPLICIT_NAME; + } else if (auto *G = dyn_cast(Sym)) { + if (G->getName() != G->ImportName) + Flags |= WASM_SYMBOL_EXPLICIT_NAME; + } return Flags; } @@ -513,15 +525,18 @@ void Writer::createLinkingSection() { if (auto *F = dyn_cast(Sym)) { writeUleb128(Sub.OS, F->getFunctionIndex(), "index"); - if (Sym->isDefined()) + if (Sym->isDefined() || + (Flags & WASM_SYMBOL_EXPLICIT_NAME) != 0) writeStr(Sub.OS, Sym->getName(), "sym name"); } else if (auto *G = dyn_cast(Sym)) { writeUleb128(Sub.OS, G->getGlobalIndex(), "index"); - if (Sym->isDefined()) + if (Sym->isDefined() || + (Flags & WASM_SYMBOL_EXPLICIT_NAME) != 0) writeStr(Sub.OS, Sym->getName(), "sym name"); } else if (auto *E = dyn_cast(Sym)) { writeUleb128(Sub.OS, E->getEventIndex(), "index"); - if (Sym->isDefined()) + if (Sym->isDefined() || + (Flags & WASM_SYMBOL_EXPLICIT_NAME) != 0) writeStr(Sub.OS, Sym->getName(), "sym name"); } else if (isa(Sym)) { writeStr(Sub.OS, Sym->getName(), "sym name"); @@ -709,9 +724,9 @@ void Writer::layoutMemory() { auto PlaceStack = [&]() { if (Config->Relocatable || Config->Shared) return; - MemoryPtr = alignTo(MemoryPtr, kStackAlignment); - if (Config->ZStackSize != alignTo(Config->ZStackSize, kStackAlignment)) - error("stack size must be " + Twine(kStackAlignment) + "-byte aligned"); + MemoryPtr = alignTo(MemoryPtr, StackAlignment); + if (Config->ZStackSize != alignTo(Config->ZStackSize, StackAlignment)) + error("stack size must be " + Twine(StackAlignment) + "-byte aligned"); log("mem: stack size = " + Twine(Config->ZStackSize)); log("mem: stack base = " + Twine(MemoryPtr)); MemoryPtr += Config->ZStackSize; @@ -864,7 +879,7 @@ void Writer::calculateExports() { Exports.push_back(WasmExport{"memory", WASM_EXTERNAL_MEMORY, 0}); if (!Config->Relocatable && Config->ExportTable) - Exports.push_back(WasmExport{kFunctionTableName, WASM_EXTERNAL_TABLE, 0}); + Exports.push_back(WasmExport{FunctionTableName, WASM_EXTERNAL_TABLE, 0}); unsigned FakeGlobalIndex = NumImportedGlobals + InputGlobals.size(); @@ -1019,14 +1034,14 @@ void Writer::assignIndexes() { ObjFile *File = Chunk->File; ArrayRef Types = File->getWasmObj()->types(); for (const WasmRelocation &Reloc : Chunk->getRelocations()) { - if (Reloc.Type == R_WEBASSEMBLY_TABLE_INDEX_I32 || - Reloc.Type == R_WEBASSEMBLY_TABLE_INDEX_SLEB) { + if (Reloc.Type == R_WASM_TABLE_INDEX_I32 || + Reloc.Type == R_WASM_TABLE_INDEX_SLEB) { FunctionSymbol *Sym = File->getFunctionSymbol(Reloc.Index); if (Sym->hasTableIndex() || !Sym->hasFunctionIndex()) continue; Sym->setTableIndex(TableIndex++); IndirectFunctions.emplace_back(Sym); - } else if (Reloc.Type == R_WEBASSEMBLY_TYPE_INDEX_LEB) { + } else if (Reloc.Type == R_WASM_TYPE_INDEX_LEB) { // Mark target type as live File->TypeMap[Reloc.Index] = registerType(Types[Reloc.Index]); File->TypeIsUsed[Reloc.Index] = true; @@ -1122,6 +1137,9 @@ static const int OPCODE_END = 0xb; // Create synthetic "__wasm_call_ctors" function based on ctor functions // in input object. void Writer::createCtorFunction() { + if (!WasmSym::CallCtors->isLive()) + return; + // First write the body's contents to a string. std::string BodyContent; { @@ -1150,10 +1168,14 @@ void Writer::createCtorFunction() { // This is then used either when creating the output linking section or to // synthesize the "__wasm_call_ctors" function. void Writer::calculateInitFunctions() { + if (!Config->Relocatable && !WasmSym::CallCtors->isLive()) + return; + for (ObjFile *File : Symtab->ObjectFiles) { const WasmLinkingData &L = File->getWasmObj()->linkingData(); for (const WasmInitFunc &F : L.InitFunctions) { FunctionSymbol *Sym = File->getFunctionSymbol(F.Symbol); + assert(Sym->isLive()); if (*Sym->Signature != WasmSignature{{}, {}}) error("invalid signature for init func: " + toString(*Sym)); InitFunctions.emplace_back(WasmInitEntry{Sym, F.Priority}); diff --git a/lld/wasm/Writer.h b/lld/wasm/Writer.h index cf3681ddf35d0..ebbd10944a2b2 100644 --- a/lld/wasm/Writer.h +++ b/lld/wasm/Writer.h @@ -14,7 +14,7 @@ namespace wasm { void writeResult(); -extern const char *kDefaultModule; +extern const char *DefaultModule; } // namespace wasm } // namespace lld diff --git a/lldb/CMakeLists.txt b/lldb/CMakeLists.txt index fdd84a6e7b76d..e9a4ed4000cd6 100644 --- a/lldb/CMakeLists.txt +++ b/lldb/CMakeLists.txt @@ -1,5 +1,9 @@ cmake_minimum_required(VERSION 3.4.3) +if(POLICY CMP0075) + cmake_policy(SET CMP0075 NEW) +endif() + # Add path for custom modules set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} @@ -18,16 +22,14 @@ else() add_definitions( -DLLDB_CONFIGURATION_RELEASE ) endif() -if (LLDB_DISABLE_LIBEDIT) - add_definitions( -DLLDB_DISABLE_LIBEDIT ) -else() - find_package(LibEdit REQUIRED) -endif() - if(APPLE) add_definitions(-DLLDB_USE_OS_LOG) endif() +if (WIN32) + add_definitions(-D_ENABLE_EXTENDED_ALIGNED_STORAGE) +endif() + add_subdirectory(docs) if (NOT LLDB_DISABLE_PYTHON) add_subdirectory(scripts) @@ -89,6 +91,10 @@ if(LLDB_INCLUDE_TESTS) list(APPEND LLDB_TEST_DEPS lldb-mi) endif() + if(TARGET lldb-instr) + list(APPEND LLDB_TEST_DEPS lldb-instr) + endif() + if(NOT LLDB_BUILT_STANDALONE) list(APPEND LLDB_TEST_DEPS yaml2obj) endif() @@ -120,7 +126,7 @@ if(LLDB_INCLUDE_TESTS) list(APPEND LLDB_TEST_DEPS dsymutil) endif() - add_custom_target(lldb-test-depends DEPENDS ${LLDB_TEST_DEPS}) + add_custom_target(lldb-test-deps DEPENDS ${LLDB_TEST_DEPS}) add_subdirectory(test) add_subdirectory(unittests) diff --git a/lldb/cmake/modules/AddLLDB.cmake b/lldb/cmake/modules/AddLLDB.cmake index 1adbe8c5d3e28..c0a89e46f0898 100644 --- a/lldb/cmake/modules/AddLLDB.cmake +++ b/lldb/cmake/modules/AddLLDB.cmake @@ -175,23 +175,25 @@ endfunction() # added as an extra RPATH below. # function(lldb_setup_framework_rpaths_in_tool name) - # In the build-tree, we know the exact path to the binary in the framework. - set(rpath_build_tree "$") - # The installed framework is relocatable and can be in different locations. - set(rpaths_install_tree "@loader_path/../../../SharedFrameworks") - list(APPEND rpaths_install_tree "@loader_path/../../System/Library/PrivateFrameworks") - list(APPEND rpaths_install_tree "@loader_path/../../Library/PrivateFrameworks") + set(rpaths_install_tree) if(LLDB_FRAMEWORK_INSTALL_DIR) - set(rpaths_install_tree "@loader_path/../${LLDB_FRAMEWORK_INSTALL_DIR}") + list(APPEND rpaths_install_tree "@loader_path/../${LLDB_FRAMEWORK_INSTALL_DIR}") endif() + list(APPEND rpaths_install_tree "@loader_path/../../../SharedFrameworks") + list(APPEND rpaths_install_tree "@loader_path/../../System/Library/PrivateFrameworks") + list(APPEND rpaths_install_tree "@loader_path/../../Library/PrivateFrameworks") + + # In the build-tree, we know the exact path to the framework directory. + get_target_property(framework_target_dir liblldb LIBRARY_OUTPUT_DIRECTORY) + # If LLDB_NO_INSTALL_DEFAULT_RPATH was NOT enabled (default), this overwrites # the default settings from llvm_setup_rpath(). set_target_properties(${name} PROPERTIES BUILD_WITH_INSTALL_RPATH OFF - BUILD_RPATH "${rpath_build_tree}" + BUILD_RPATH "${framework_target_dir}" INSTALL_RPATH "${rpaths_install_tree}" ) diff --git a/lldb/cmake/modules/LLDBConfig.cmake b/lldb/cmake/modules/LLDBConfig.cmake index eeddc589443c0..20b4aa809e552 100644 --- a/lldb/cmake/modules/LLDBConfig.cmake +++ b/lldb/cmake/modules/LLDBConfig.cmake @@ -1,4 +1,5 @@ include(CheckCXXSymbolExists) +include(CheckTypeSize) set(LLDB_PROJECT_ROOT ${CMAKE_CURRENT_SOURCE_DIR}) set(LLDB_SOURCE_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/source") @@ -55,8 +56,9 @@ if(LLDB_BUILD_FRAMEWORK) message(FATAL_ERROR "LLDB.framework can only be generated when targeting Apple platforms") endif() # CMake 3.6 did not correctly emit POST_BUILD commands for Apple Framework targets - if(CMAKE_VERSION VERSION_LESS 3.7) - message(FATAL_ERROR "LLDB_BUILD_FRAMEWORK is not supported on CMake < 3.7") + # CMake < 3.8 did not have the BUILD_RPATH target property + if(CMAKE_VERSION VERSION_LESS 3.8) + message(FATAL_ERROR "LLDB_BUILD_FRAMEWORK is not supported on CMake < 3.8") endif() set(LLDB_FRAMEWORK_VERSION A CACHE STRING "LLDB.framework version (default is A)") @@ -90,6 +92,29 @@ if (LLDB_DISABLE_CURSES) add_definitions( -DLLDB_DISABLE_CURSES ) endif() +if (LLDB_DISABLE_LIBEDIT) + add_definitions( -DLLDB_DISABLE_LIBEDIT ) +else() + find_package(LibEdit REQUIRED) + + # Check if we libedit capable of handling wide characters (built with + # '--enable-widec'). + set(CMAKE_REQUIRED_LIBRARIES ${libedit_LIBRARIES}) + set(CMAKE_REQUIRED_INCLUDES ${libedit_INCLUDE_DIRS}) + check_symbol_exists(el_winsertstr histedit.h LLDB_EDITLINE_USE_WCHAR) + set(CMAKE_EXTRA_INCLUDE_FILES histedit.h) + check_type_size(el_rfunc_t LLDB_EL_RFUNC_T_SIZE) + if (LLDB_EL_RFUNC_T_SIZE STREQUAL "") + set(LLDB_HAVE_EL_RFUNC_T 0) + else() + set(LLDB_HAVE_EL_RFUNC_T 1) + endif() + set(CMAKE_REQUIRED_LIBRARIES) + set(CMAKE_REQUIRED_INCLUDES) + set(CMAKE_EXTRA_INCLUDE_FILES) +endif() + + # On Windows, we can't use the normal FindPythonLibs module that comes with CMake, # for a number of reasons. # 1) Prior to MSVC 2015, it is only possible to embed Python if python itself was diff --git a/lldb/cmake/modules/LLDBFramework.cmake b/lldb/cmake/modules/LLDBFramework.cmake index 440061ada9341..147d3de527fa5 100644 --- a/lldb/cmake/modules/LLDBFramework.cmake +++ b/lldb/cmake/modules/LLDBFramework.cmake @@ -98,10 +98,10 @@ add_custom_command(TARGET lldb-framework-headers POST_BUILD # Copy vendor-specific headers from clang (without staging). if(NOT IOS AND NOT LLDB_BUILT_STANDALONE) - add_dependencies(lldb-framework clang-headers) + add_dependencies(lldb-framework clang-resource-headers) add_custom_command(TARGET lldb-framework POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_directory - $ + $ $/Resources/Clang/include COMMENT "LLDB.framework: copy clang vendor-specific headers" ) diff --git a/lldb/cmake/modules/LLDBGenerateConfig.cmake b/lldb/cmake/modules/LLDBGenerateConfig.cmake index 7586eda30d68b..33b7e98318e0f 100644 --- a/lldb/cmake/modules/LLDBGenerateConfig.cmake +++ b/lldb/cmake/modules/LLDBGenerateConfig.cmake @@ -4,7 +4,6 @@ include(CheckSymbolExists) include(CheckIncludeFile) include(CheckIncludeFiles) include(CheckLibraryExists) -include(CheckTypeSize) set(CMAKE_REQUIRED_DEFINITIONS -D_GNU_SOURCE) check_symbol_exists(ppoll poll.h HAVE_PPOLL) @@ -28,24 +27,6 @@ if(NOT UNIX) set(LLDB_DISABLE_POSIX 1) endif() -if (NOT LLDB_DISABLE_LIBEDIT) - # Check if we libedit capable of handling wide characters (built with - # '--enable-widec'). - set(CMAKE_REQUIRED_LIBRARIES ${libedit_LIBRARIES}) - set(CMAKE_REQUIRED_INCLUDES ${libedit_INCLUDE_DIRS}) - check_symbol_exists(el_winsertstr histedit.h LLDB_EDITLINE_USE_WCHAR) - set(CMAKE_EXTRA_INCLUDE_FILES histedit.h) - check_type_size(el_rfunc_t LLDB_EL_RFUNC_T_SIZE) - if (LLDB_EL_RFUNC_T_SIZE STREQUAL "") - set(LLDB_HAVE_EL_RFUNC_T 0) - else() - set(LLDB_HAVE_EL_RFUNC_T 1) - endif() - set(CMAKE_REQUIRED_LIBRARIES) - set(CMAKE_REQUIRED_INCLUDES) - set(CMAKE_EXTRA_INCLUDE_FILES) -endif() - if(NOT LLDB_CONFIG_HEADER_INPUT) set(LLDB_CONFIG_HEADER_INPUT ${LLDB_INCLUDE_ROOT}/lldb/Host/Config.h.cmake) endif() diff --git a/lldb/cmake/modules/LLDBStandalone.cmake b/lldb/cmake/modules/LLDBStandalone.cmake index 8101637095fae..13b479a8a52ea 100644 --- a/lldb/cmake/modules/LLDBStandalone.cmake +++ b/lldb/cmake/modules/LLDBStandalone.cmake @@ -20,9 +20,9 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) set(LLVM_CMAKE_PATH ${LLVM_CMAKE_DIR} CACHE PATH "Path to LLVM CMake modules") set(LLVM_MAIN_SRC_DIR ${LLVM_BUILD_MAIN_SRC_DIR} CACHE PATH "Path to LLVM source tree") - set(LLVM_MAIN_INCLUDE_DIR ${LLVM_BUILD_MAIN_INCLUDE_DIR} CACHE PATH "Path to llvm/include") - set(LLVM_LIBRARY_DIR ${LLVM_BUILD_LIBRARY_DIR} CACHE PATH "Path to llvm/lib") - set(LLVM_BINARY_DIR ${LLVM_BUILD_BINARY_DIR} CACHE PATH "Path to LLVM build tree") + set(LLVM_MAIN_INCLUDE_DIR ${LLVM_MAIN_INCLUDE_DIR} CACHE PATH "Path to llvm/include") + set(LLVM_LIBRARY_DIR ${LLVM_LIBRARY_DIR} CACHE PATH "Path to llvm/lib") + set(LLVM_BINARY_DIR ${LLVM_BINARY_DIR} CACHE PATH "Path to LLVM build tree") set(LLVM_DEFAULT_EXTERNAL_LIT ${LLVM_TOOLS_BINARY_DIR}/llvm-lit CACHE PATH "Path to llvm-lit") if(CMAKE_CROSSCOMPILING) diff --git a/lldb/docs/status/projects.rst b/lldb/docs/status/projects.rst index 5fdea58509e92..e32b9b0fe482e 100644 --- a/lldb/docs/status/projects.rst +++ b/lldb/docs/status/projects.rst @@ -394,3 +394,24 @@ remote memory and its function calling support is very rudimentary. It would be useful to unify these and make the IR interpreter -- both for LLVM and LLDB -- better. An alternate strategy would be simply to JIT into the current process but have callbacks for non-stack memory access. + +Teach lldb to predict exception propagation at the throw site +------------------------------------------------------------- + +There are a bunch of places in lldb where we need to know at the point where an +exception is thrown, what frame will catch the exception. + +For instance, if an expression throws an exception, we need to know whether the +exception will be caught in the course of the expression evaluation. If so it +would be safe to let the expression continue. But since we would destroy the +state of the thread if we let the exception escape the expression, we currently +stop the expression evaluation if we see a throw. If we knew where it would be +caught we could distinguish these two cases. + +Similarly, when you step over a call that throws, you want to stop at the throw +point if you know the exception will unwind past the frame you were stepping in, +but it would annoying to have the step abort every time an exception was thrown. +If we could predict the catching frame, we could do this right. + +And of course, this would be a useful piece of information to display when stopped +at a throw point. diff --git a/lldb/include/lldb/API/SBAddress.h b/lldb/include/lldb/API/SBAddress.h index e5db9d5e1c045..26bbe0384277a 100644 --- a/lldb/include/lldb/API/SBAddress.h +++ b/lldb/include/lldb/API/SBAddress.h @@ -114,7 +114,7 @@ class LLDB_API SBAddress { void SetAddress(const lldb_private::Address *lldb_object_ptr); private: - std::unique_ptr m_opaque_ap; + std::unique_ptr m_opaque_up; }; bool LLDB_API operator==(const SBAddress &lhs, const SBAddress &rhs); diff --git a/lldb/include/lldb/API/SBCommandInterpreter.h b/lldb/include/lldb/API/SBCommandInterpreter.h index eb0bb78a08594..36c50f48b0a46 100644 --- a/lldb/include/lldb/API/SBCommandInterpreter.h +++ b/lldb/include/lldb/API/SBCommandInterpreter.h @@ -255,8 +255,6 @@ class SBCommandInterpreter { private: friend class SBDebugger; - static void InitializeSWIG(); - lldb_private::CommandInterpreter *m_opaque_ptr; }; diff --git a/lldb/include/lldb/API/SBCommandReturnObject.h b/lldb/include/lldb/API/SBCommandReturnObject.h index f361ec51e8c6d..ac24c2e882acf 100644 --- a/lldb/include/lldb/API/SBCommandReturnObject.h +++ b/lldb/include/lldb/API/SBCommandReturnObject.h @@ -99,7 +99,7 @@ class LLDB_API SBCommandReturnObject { void SetLLDBObjectPtr(lldb_private::CommandReturnObject *ptr); private: - std::unique_ptr m_opaque_ap; + std::unique_ptr m_opaque_up; }; } // namespace lldb diff --git a/lldb/include/lldb/API/SBDebugger.h b/lldb/include/lldb/API/SBDebugger.h index 6bb3632a454f9..a3ac0e858d640 100644 --- a/lldb/include/lldb/API/SBDebugger.h +++ b/lldb/include/lldb/API/SBDebugger.h @@ -12,7 +12,6 @@ #include #include "lldb/API/SBDefines.h" -#include "lldb/API/SBInitializerOptions.h" #include "lldb/API/SBPlatform.h" namespace lldb { @@ -45,7 +44,8 @@ class LLDB_API SBDebugger { lldb::SBDebugger &operator=(const lldb::SBDebugger &rhs); static void Initialize(); - static lldb::SBError Initialize(SBInitializerOptions &options); + + static lldb::SBError InitializeWithErrorHandling(); static void Terminate(); diff --git a/lldb/include/lldb/API/SBDeclaration.h b/lldb/include/lldb/API/SBDeclaration.h index 09988df954ce3..56e1570b0e25d 100644 --- a/lldb/include/lldb/API/SBDeclaration.h +++ b/lldb/include/lldb/API/SBDeclaration.h @@ -61,7 +61,7 @@ class LLDB_API SBDeclaration { void SetDeclaration(const lldb_private::Declaration &lldb_object_ref); - std::unique_ptr m_opaque_ap; + std::unique_ptr m_opaque_up; }; } // namespace lldb diff --git a/lldb/include/lldb/API/SBDefines.h b/lldb/include/lldb/API/SBDefines.h index b45ae08107a67..fcbcffec9951a 100644 --- a/lldb/include/lldb/API/SBDefines.h +++ b/lldb/include/lldb/API/SBDefines.h @@ -50,7 +50,6 @@ class LLDB_API SBFileSpecList; class LLDB_API SBFrame; class LLDB_API SBFunction; class LLDB_API SBHostOS; -class LLDB_API SBInitializerOptions; class LLDB_API SBInstruction; class LLDB_API SBInstructionList; class LLDB_API SBLanguageRuntime; diff --git a/lldb/include/lldb/API/SBError.h b/lldb/include/lldb/API/SBError.h index 93d62a6d28918..bcfa9acf55c64 100644 --- a/lldb/include/lldb/API/SBError.h +++ b/lldb/include/lldb/API/SBError.h @@ -51,22 +51,23 @@ class LLDB_API SBError { bool GetDescription(lldb::SBStream &description); protected: + friend class SBBreakpoint; + friend class SBBreakpointLocation; + friend class SBBreakpointName; friend class SBCommandReturnObject; + friend class SBCommunication; friend class SBData; friend class SBDebugger; - friend class SBCommunication; friend class SBHostOS; friend class SBPlatform; friend class SBProcess; + friend class SBReproducer; friend class SBStructuredData; + friend class SBTarget; friend class SBThread; friend class SBTrace; - friend class SBTarget; friend class SBValue; friend class SBWatchpoint; - friend class SBBreakpoint; - friend class SBBreakpointLocation; - friend class SBBreakpointName; lldb_private::Status *get(); @@ -79,7 +80,7 @@ class LLDB_API SBError { void SetError(const lldb_private::Status &lldb_error); private: - std::unique_ptr m_opaque_ap; + std::unique_ptr m_opaque_up; void CreateIfNeeded(); }; diff --git a/lldb/include/lldb/API/SBExecutionContext.h b/lldb/include/lldb/API/SBExecutionContext.h index c9066cf794474..45c0b1b7f97b6 100644 --- a/lldb/include/lldb/API/SBExecutionContext.h +++ b/lldb/include/lldb/API/SBExecutionContext.h @@ -50,8 +50,6 @@ class LLDB_API SBExecutionContext { SBFrame GetFrame() const; protected: - ExecutionContextRefSP &GetSP() const; - void reset(lldb::ExecutionContextRefSP &event_sp); lldb_private::ExecutionContextRef *get() const; diff --git a/lldb/include/lldb/API/SBExpressionOptions.h b/lldb/include/lldb/API/SBExpressionOptions.h index 4ebc24486e8bb..7209ec47883e4 100644 --- a/lldb/include/lldb/API/SBExpressionOptions.h +++ b/lldb/include/lldb/API/SBExpressionOptions.h @@ -97,9 +97,6 @@ class LLDB_API SBExpressionOptions { void SetAllowJIT(bool allow); protected: - SBExpressionOptions( - lldb_private::EvaluateExpressionOptions &expression_options); - lldb_private::EvaluateExpressionOptions *get() const; lldb_private::EvaluateExpressionOptions &ref() const; @@ -110,7 +107,7 @@ class LLDB_API SBExpressionOptions { private: // This auto_pointer is made in the constructor and is always valid. - mutable std::unique_ptr m_opaque_ap; + mutable std::unique_ptr m_opaque_up; }; } // namespace lldb diff --git a/lldb/include/lldb/API/SBFileSpec.h b/lldb/include/lldb/API/SBFileSpec.h index c3e7d91441dee..3e81d59204434 100644 --- a/lldb/include/lldb/API/SBFileSpec.h +++ b/lldb/include/lldb/API/SBFileSpec.h @@ -58,7 +58,6 @@ class LLDB_API SBFileSpec { friend class SBDeclaration; friend class SBFileSpecList; friend class SBHostOS; - friend class SBInitializerOptions; friend class SBLaunchInfo; friend class SBLineEntry; friend class SBModule; @@ -82,7 +81,7 @@ class LLDB_API SBFileSpec { const lldb_private::FileSpec &ref() const; - std::unique_ptr m_opaque_ap; + std::unique_ptr m_opaque_up; }; } // namespace lldb diff --git a/lldb/include/lldb/API/SBFileSpecList.h b/lldb/include/lldb/API/SBFileSpecList.h index a0e3f2588e2dd..5a131509d2699 100644 --- a/lldb/include/lldb/API/SBFileSpecList.h +++ b/lldb/include/lldb/API/SBFileSpecList.h @@ -49,7 +49,7 @@ class LLDB_API SBFileSpecList { const lldb_private::FileSpecList &ref() const; - std::unique_ptr m_opaque_ap; + std::unique_ptr m_opaque_up; }; } // namespace lldb diff --git a/lldb/include/lldb/API/SBInitializerOptions.h b/lldb/include/lldb/API/SBInitializerOptions.h deleted file mode 100644 index 6128568970360..0000000000000 --- a/lldb/include/lldb/API/SBInitializerOptions.h +++ /dev/null @@ -1,42 +0,0 @@ -//===-- SBInitializerOptions.h ----------------------------------*- C++ -*-===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - -#ifndef LLDB_SBInitializerOptuions_h_ -#define LLDB_SBInitializerOptuions_h_ - -#include "lldb/API/SBDefines.h" -#include "lldb/API/SBFileSpec.h" - -namespace lldb_private { -struct InitializerOptions; -} - -namespace lldb { - -class LLDB_API SBInitializerOptions { -public: - SBInitializerOptions(); - SBInitializerOptions(const lldb::SBInitializerOptions &rhs); - ~SBInitializerOptions(); - const SBInitializerOptions &operator=(const lldb::SBInitializerOptions &rhs); - - void SetCaptureReproducer(bool b); - void SetReplayReproducer(bool b); - void SetReproducerPath(const char *path); - - lldb_private::InitializerOptions &ref() const; - -private: - friend class SBDebugger; - - std::unique_ptr m_opaque_up; -}; - -} // namespace lldb - -#endif // LLDB_SBInitializerOptuions_h_ diff --git a/lldb/include/lldb/API/SBLineEntry.h b/lldb/include/lldb/API/SBLineEntry.h index e4986c1693c24..11001aa13f62a 100644 --- a/lldb/include/lldb/API/SBLineEntry.h +++ b/lldb/include/lldb/API/SBLineEntry.h @@ -68,7 +68,7 @@ class LLDB_API SBLineEntry { void SetLineEntry(const lldb_private::LineEntry &lldb_object_ref); - std::unique_ptr m_opaque_ap; + std::unique_ptr m_opaque_up; }; } // namespace lldb diff --git a/lldb/include/lldb/API/SBMemoryRegionInfo.h b/lldb/include/lldb/API/SBMemoryRegionInfo.h index 5518e76bc334d..b3e9cc05b6658 100644 --- a/lldb/include/lldb/API/SBMemoryRegionInfo.h +++ b/lldb/include/lldb/API/SBMemoryRegionInfo.h @@ -104,7 +104,7 @@ class LLDB_API SBMemoryRegionInfo { // Unused. SBMemoryRegionInfo(const lldb_private::MemoryRegionInfo *lldb_object_ptr); - lldb::MemoryRegionInfoUP m_opaque_ap; + lldb::MemoryRegionInfoUP m_opaque_up; }; } // namespace lldb diff --git a/lldb/include/lldb/API/SBMemoryRegionInfoList.h b/lldb/include/lldb/API/SBMemoryRegionInfoList.h index c0fa47fc31e4b..5592efef4851e 100644 --- a/lldb/include/lldb/API/SBMemoryRegionInfoList.h +++ b/lldb/include/lldb/API/SBMemoryRegionInfoList.h @@ -47,7 +47,7 @@ class LLDB_API SBMemoryRegionInfoList { const lldb_private::MemoryRegionInfos &ref() const; - std::unique_ptr m_opaque_ap; + std::unique_ptr m_opaque_up; }; } // namespace lldb diff --git a/lldb/include/lldb/API/SBModuleSpec.h b/lldb/include/lldb/API/SBModuleSpec.h index 48d2e0871a4ea..e462bd98837d9 100644 --- a/lldb/include/lldb/API/SBModuleSpec.h +++ b/lldb/include/lldb/API/SBModuleSpec.h @@ -86,7 +86,7 @@ class LLDB_API SBModuleSpec { friend class SBModule; friend class SBTarget; - std::unique_ptr m_opaque_ap; + std::unique_ptr m_opaque_up; }; class SBModuleSpecList { @@ -116,7 +116,7 @@ class SBModuleSpecList { bool GetDescription(lldb::SBStream &description); private: - std::unique_ptr m_opaque_ap; + std::unique_ptr m_opaque_up; }; } // namespace lldb diff --git a/lldb/include/lldb/API/SBProcessInfo.h b/lldb/include/lldb/API/SBProcessInfo.h index 97e1cef6dabb4..8e67dd11aa8be 100644 --- a/lldb/include/lldb/API/SBProcessInfo.h +++ b/lldb/include/lldb/API/SBProcessInfo.h @@ -55,7 +55,7 @@ class LLDB_API SBProcessInfo { void SetProcessInfo(const lldb_private::ProcessInstanceInfo &proc_info_ref); - std::unique_ptr m_opaque_ap; + std::unique_ptr m_opaque_up; }; } // namespace lldb diff --git a/lldb/include/lldb/API/SBQueue.h b/lldb/include/lldb/API/SBQueue.h index ffa760ee03453..8b7570e02b36b 100644 --- a/lldb/include/lldb/API/SBQueue.h +++ b/lldb/include/lldb/API/SBQueue.h @@ -58,10 +58,6 @@ class LLDB_API SBQueue { void SetQueue(const lldb::QueueSP &queue_sp); - void FetchThreads(); - - void FetchItems(); - private: std::shared_ptr m_opaque_sp; }; diff --git a/lldb/include/lldb/API/SBReproducer.h b/lldb/include/lldb/API/SBReproducer.h new file mode 100644 index 0000000000000..97901a3bb6dd3 --- /dev/null +++ b/lldb/include/lldb/API/SBReproducer.h @@ -0,0 +1,27 @@ +//===-- SBReproducer.h ------------------------------------------*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#ifndef LLDB_API_SBREPRODUCER_H +#define LLDB_API_SBREPRODUCER_H + +#include "lldb/API/SBDefines.h" + +namespace lldb { + +/// The SBReproducer class is special because it bootstraps the capture and +/// replay of SB API calls. As a result we cannot rely on any other SB objects +/// in the interface or implementation of this class. +class LLDB_API SBReproducer { +public: + static const char *Capture(const char *path); + static const char *Replay(const char *path); +}; + +} // namespace lldb + +#endif diff --git a/lldb/include/lldb/API/SBSourceManager.h b/lldb/include/lldb/API/SBSourceManager.h index df4ca77087973..3d69aa25a9342 100644 --- a/lldb/include/lldb/API/SBSourceManager.h +++ b/lldb/include/lldb/API/SBSourceManager.h @@ -38,10 +38,8 @@ class LLDB_API SBSourceManager { friend class SBCommandInterpreter; friend class SBDebugger; - SBSourceManager(lldb_private::SourceManager *source_manager); - private: - std::unique_ptr m_opaque_ap; + std::unique_ptr m_opaque_up; }; } // namespace lldb diff --git a/lldb/include/lldb/API/SBStream.h b/lldb/include/lldb/API/SBStream.h index 240e8f91648f4..4a6eedcbf4627 100644 --- a/lldb/include/lldb/API/SBStream.h +++ b/lldb/include/lldb/API/SBStream.h @@ -94,7 +94,7 @@ class LLDB_API SBStream { private: DISALLOW_COPY_AND_ASSIGN(SBStream); - std::unique_ptr m_opaque_ap; + std::unique_ptr m_opaque_up; bool m_is_file; }; diff --git a/lldb/include/lldb/API/SBStringList.h b/lldb/include/lldb/API/SBStringList.h index 921710b8f5577..e10153ee30cca 100644 --- a/lldb/include/lldb/API/SBStringList.h +++ b/lldb/include/lldb/API/SBStringList.h @@ -55,7 +55,7 @@ class LLDB_API SBStringList { const lldb_private::StringList &operator*() const; private: - std::unique_ptr m_opaque_ap; + std::unique_ptr m_opaque_up; }; } // namespace lldb diff --git a/lldb/include/lldb/API/SBSymbolContext.h b/lldb/include/lldb/API/SBSymbolContext.h index e05a611946702..57578da9d840e 100644 --- a/lldb/include/lldb/API/SBSymbolContext.h +++ b/lldb/include/lldb/API/SBSymbolContext.h @@ -73,7 +73,7 @@ class LLDB_API SBSymbolContext { void SetSymbolContext(const lldb_private::SymbolContext *sc_ptr); private: - std::unique_ptr m_opaque_ap; + std::unique_ptr m_opaque_up; }; } // namespace lldb diff --git a/lldb/include/lldb/API/SBSymbolContextList.h b/lldb/include/lldb/API/SBSymbolContextList.h index 1200bd2348465..9ecb3ba27145b 100644 --- a/lldb/include/lldb/API/SBSymbolContextList.h +++ b/lldb/include/lldb/API/SBSymbolContextList.h @@ -48,7 +48,7 @@ class LLDB_API SBSymbolContextList { lldb_private::SymbolContextList &operator*() const; private: - std::unique_ptr m_opaque_ap; + std::unique_ptr m_opaque_up; }; } // namespace lldb diff --git a/lldb/include/lldb/API/SBTarget.h b/lldb/include/lldb/API/SBTarget.h index c341afa415402..e7066fcb18495 100644 --- a/lldb/include/lldb/API/SBTarget.h +++ b/lldb/include/lldb/API/SBTarget.h @@ -75,8 +75,6 @@ class LLDB_API SBTarget { /// /// @param[in] v /// A boolean to control the collection. - /// @return - /// void //------------------------------------------------------------------ void SetCollectingStats(bool v); diff --git a/lldb/include/lldb/API/SBType.h b/lldb/include/lldb/API/SBType.h index 89f72fd72b28d..1efef9ac51159 100644 --- a/lldb/include/lldb/API/SBType.h +++ b/lldb/include/lldb/API/SBType.h @@ -51,7 +51,7 @@ class LLDB_API SBTypeMember { const lldb_private::TypeMemberImpl &ref() const; - std::unique_ptr m_opaque_ap; + std::unique_ptr m_opaque_up; }; class SBTypeMemberFunction { @@ -244,7 +244,7 @@ class SBTypeList { uint32_t GetSize(); private: - std::unique_ptr m_opaque_ap; + std::unique_ptr m_opaque_up; friend class SBModule; friend class SBCompileUnit; }; diff --git a/lldb/include/lldb/API/SBTypeEnumMember.h b/lldb/include/lldb/API/SBTypeEnumMember.h index 99b12523fb335..974246b760c64 100644 --- a/lldb/include/lldb/API/SBTypeEnumMember.h +++ b/lldb/include/lldb/API/SBTypeEnumMember.h @@ -71,7 +71,7 @@ class SBTypeEnumMemberList { uint32_t GetSize(); private: - std::unique_ptr m_opaque_ap; + std::unique_ptr m_opaque_up; }; } // namespace lldb diff --git a/lldb/include/lldb/API/SBTypeSummary.h b/lldb/include/lldb/API/SBTypeSummary.h index e02720c7c727f..8dfd3dbd1ddee 100644 --- a/lldb/include/lldb/API/SBTypeSummary.h +++ b/lldb/include/lldb/API/SBTypeSummary.h @@ -49,7 +49,7 @@ class LLDB_API SBTypeSummaryOptions { void SetOptions(const lldb_private::TypeSummaryOptions *lldb_object_ptr); private: - std::unique_ptr m_opaque_ap; + std::unique_ptr m_opaque_up; }; class SBTypeSummary { diff --git a/lldb/include/lldb/API/SBValue.h b/lldb/include/lldb/API/SBValue.h index 444557a8c6c06..21364cf311242 100644 --- a/lldb/include/lldb/API/SBValue.h +++ b/lldb/include/lldb/API/SBValue.h @@ -306,6 +306,13 @@ class LLDB_API SBValue { bool GetExpressionPath(lldb::SBStream &description, bool qualify_cxx_base_classes); + lldb::SBValue EvaluateExpression(const char *expr) const; + lldb::SBValue EvaluateExpression(const char *expr, + const SBExpressionOptions &options) const; + lldb::SBValue EvaluateExpression(const char *expr, + const SBExpressionOptions &options, + const char *name) const; + SBValue(const lldb::ValueObjectSP &value_sp); //------------------------------------------------------------------ diff --git a/lldb/include/lldb/API/SBValueList.h b/lldb/include/lldb/API/SBValueList.h index 0af0870f10842..2b7514f1b547a 100644 --- a/lldb/include/lldb/API/SBValueList.h +++ b/lldb/include/lldb/API/SBValueList.h @@ -65,7 +65,7 @@ class LLDB_API SBValueList { ValueListImpl &ref(); - std::unique_ptr m_opaque_ap; + std::unique_ptr m_opaque_up; }; } // namespace lldb diff --git a/lldb/include/lldb/API/SBVariablesOptions.h b/lldb/include/lldb/API/SBVariablesOptions.h index ccc77c569a498..19bc79669b6ac 100644 --- a/lldb/include/lldb/API/SBVariablesOptions.h +++ b/lldb/include/lldb/API/SBVariablesOptions.h @@ -72,7 +72,7 @@ class LLDB_API SBVariablesOptions { void SetOptions(VariablesOptionsImpl *lldb_object_ptr); private: - std::unique_ptr m_opaque_ap; + std::unique_ptr m_opaque_up; }; } // namespace lldb diff --git a/lldb/include/lldb/Breakpoint/BreakpointLocation.h b/lldb/include/lldb/Breakpoint/BreakpointLocation.h index 03c0e7c68c52d..c9ec10fff5033 100644 --- a/lldb/include/lldb/Breakpoint/BreakpointLocation.h +++ b/lldb/include/lldb/Breakpoint/BreakpointLocation.h @@ -398,10 +398,10 @@ class BreakpointLocation bool m_is_indirect; Address m_address; ///< The address defining this location. Breakpoint &m_owner; ///< The breakpoint that produced this object. - std::unique_ptr m_options_ap; ///< Breakpoint options - ///pointer, nullptr if we're - ///using our breakpoint's - ///options. + std::unique_ptr m_options_up; ///< Breakpoint options + /// pointer, nullptr if we're + /// using our breakpoint's + /// options. lldb::BreakpointSiteSP m_bp_site_sp; ///< Our breakpoint site (it may be ///shared by more than one location.) lldb::UserExpressionSP m_user_expression_sp; ///< The compiled expression to diff --git a/lldb/include/lldb/Breakpoint/BreakpointOptions.h b/lldb/include/lldb/Breakpoint/BreakpointOptions.h index 5fe659b3d0739..57c2aec0b960d 100644 --- a/lldb/include/lldb/Breakpoint/BreakpointOptions.h +++ b/lldb/include/lldb/Breakpoint/BreakpointOptions.h @@ -442,7 +442,7 @@ friend class Breakpoint; bool m_one_shot; uint32_t m_ignore_count; // Number of times to ignore this breakpoint std::unique_ptr - m_thread_spec_ap; // Thread for which this breakpoint will take + m_thread_spec_up; // Thread for which this breakpoint will take std::string m_condition_text; // The condition to test. size_t m_condition_text_hash; // Its hash, so that locations know when the // condition is updated. diff --git a/lldb/include/lldb/Breakpoint/Watchpoint.h b/lldb/include/lldb/Breakpoint/Watchpoint.h index ea59e52ff18e1..4e72cdc3a4683 100644 --- a/lldb/include/lldb/Breakpoint/Watchpoint.h +++ b/lldb/include/lldb/Breakpoint/Watchpoint.h @@ -213,7 +213,7 @@ class Watchpoint : public std::enable_shared_from_this, // the callback machinery. bool m_being_created; - std::unique_ptr m_condition_ap; // The condition to test. + std::unique_ptr m_condition_up; // The condition to test. void SetID(lldb::watch_id_t id) { m_loc_id = id; } diff --git a/lldb/include/lldb/Breakpoint/WatchpointOptions.h b/lldb/include/lldb/Breakpoint/WatchpointOptions.h index 460a5684afac8..3b44abf868528 100644 --- a/lldb/include/lldb/Breakpoint/WatchpointOptions.h +++ b/lldb/include/lldb/Breakpoint/WatchpointOptions.h @@ -230,7 +230,7 @@ class WatchpointOptions { lldb::BatonSP m_callback_baton_sp; // This is the client data for the callback bool m_callback_is_synchronous; std::unique_ptr - m_thread_spec_ap; // Thread for which this watchpoint will take + m_thread_spec_up; // Thread for which this watchpoint will take }; } // namespace lldb_private diff --git a/lldb/include/lldb/Core/Debugger.h b/lldb/include/lldb/Core/Debugger.h index 726be36cb7893..c39779c1af46d 100644 --- a/lldb/include/lldb/Core/Debugger.h +++ b/lldb/include/lldb/Core/Debugger.h @@ -63,6 +63,11 @@ class SymbolContext; namespace lldb_private { class Target; } +namespace lldb_private { +namespace repro { +class DataRecorder; +} +} // namespace lldb_private namespace llvm { class raw_ostream; } @@ -129,7 +134,10 @@ class Debugger : public std::enable_shared_from_this, lldb::StreamFileSP GetErrorFile() { return m_error_file_sp; } - void SetInputFileHandle(FILE *fh, bool tranfer_ownership); + repro::DataRecorder *GetInputRecorder(); + + void SetInputFileHandle(FILE *fh, bool tranfer_ownership, + repro::DataRecorder *recorder = nullptr); void SetOutputFileHandle(FILE *fh, bool tranfer_ownership); @@ -144,8 +152,8 @@ class Debugger : public std::enable_shared_from_this, lldb::StreamSP GetAsyncErrorStream(); CommandInterpreter &GetCommandInterpreter() { - assert(m_command_interpreter_ap.get()); - return *m_command_interpreter_ap; + assert(m_command_interpreter_up.get()); + return *m_command_interpreter_up; } lldb::ListenerSP GetListener() { return m_listener_sp; } @@ -370,6 +378,9 @@ class Debugger : public std::enable_shared_from_this, lldb::StreamFileSP m_output_file_sp; lldb::StreamFileSP m_error_file_sp; + /// Used for shadowing the input file when capturing a reproducer. + repro::DataRecorder *m_input_recorder; + lldb::BroadcasterManagerSP m_broadcaster_manager_sp; // The debugger acts as a // broadcaster manager of // last resort. @@ -381,7 +392,7 @@ class Debugger : public std::enable_shared_from_this, PlatformList m_platform_list; lldb::ListenerSP m_listener_sp; - std::unique_ptr m_source_manager_ap; // This is a scratch + std::unique_ptr m_source_manager_up; // This is a scratch // source manager that we // return if we have no // targets. @@ -390,7 +401,7 @@ class Debugger : public std::enable_shared_from_this, // this debugger used this // shared // source file cache. - std::unique_ptr m_command_interpreter_ap; + std::unique_ptr m_command_interpreter_up; IOHandlerStack m_input_reader_stack; llvm::StringMap> m_log_streams; diff --git a/lldb/include/lldb/Core/FileSpecList.h b/lldb/include/lldb/Core/FileSpecList.h index b21ed975e91f5..8fac86bc050c7 100644 --- a/lldb/include/lldb/Core/FileSpecList.h +++ b/lldb/include/lldb/Core/FileSpecList.h @@ -37,15 +37,14 @@ class FileSpecList { //------------------------------------------------------------------ FileSpecList(); - //------------------------------------------------------------------ /// Copy constructor. - /// - /// Initialize this object with a copy of the file list from \a rhs. - /// - /// @param[in] rhs - /// A const reference to another file list object. - //------------------------------------------------------------------ - FileSpecList(const FileSpecList &rhs); + FileSpecList(const FileSpecList &rhs) = default; + + /// Move constructor + FileSpecList(FileSpecList &&rhs) = default; + + /// Initialize this object from a vector of FileSpecs + FileSpecList(std::vector &&rhs) : m_files(std::move(rhs)) {} //------------------------------------------------------------------ /// Destructor. @@ -63,7 +62,10 @@ class FileSpecList { /// @return /// A const reference to this object. //------------------------------------------------------------------ - const FileSpecList &operator=(const FileSpecList &rhs); + FileSpecList &operator=(const FileSpecList &rhs) = default; + + /// Move-assignment operator. + FileSpecList &operator=(FileSpecList &&rhs) = default; //------------------------------------------------------------------ /// Append a FileSpec object to the list. diff --git a/lldb/include/lldb/Core/IOHandler.h b/lldb/include/lldb/Core/IOHandler.h index 1e636e1edcf0a..2240c1e6800f7 100644 --- a/lldb/include/lldb/Core/IOHandler.h +++ b/lldb/include/lldb/Core/IOHandler.h @@ -13,6 +13,7 @@ #include "lldb/Utility/ConstString.h" #include "lldb/Utility/Flags.h" #include "lldb/Utility/Predicate.h" +#include "lldb/Utility/Reproducer.h" #include "lldb/Utility/Stream.h" #include "lldb/Utility/StringList.h" #include "lldb/lldb-defines.h" @@ -58,7 +59,8 @@ class IOHandler { IOHandler(Debugger &debugger, IOHandler::Type type, const lldb::StreamFileSP &input_sp, const lldb::StreamFileSP &output_sp, - const lldb::StreamFileSP &error_sp, uint32_t flags); + const lldb::StreamFileSP &error_sp, uint32_t flags, + repro::DataRecorder *data_recorder); virtual ~IOHandler(); @@ -169,6 +171,7 @@ class IOHandler { lldb::StreamFileSP m_input_sp; lldb::StreamFileSP m_output_sp; lldb::StreamFileSP m_error_sp; + repro::DataRecorder *m_data_recorder; Predicate m_popped; Flags m_flags; Type m_type; @@ -343,7 +346,8 @@ class IOHandlerEditline : public IOHandler { uint32_t line_number_start, // If non-zero show line numbers // starting at // 'line_number_start' - IOHandlerDelegate &delegate); + IOHandlerDelegate &delegate, + repro::DataRecorder *data_recorder); IOHandlerEditline(Debugger &debugger, IOHandler::Type type, const lldb::StreamFileSP &input_sp, @@ -355,7 +359,8 @@ class IOHandlerEditline : public IOHandler { uint32_t line_number_start, // If non-zero show line numbers // starting at // 'line_number_start' - IOHandlerDelegate &delegate); + IOHandlerDelegate &delegate, + repro::DataRecorder *data_recorder); IOHandlerEditline(Debugger &, IOHandler::Type, const char *, const char *, const char *, bool, bool, uint32_t, @@ -435,7 +440,7 @@ class IOHandlerEditline : public IOHandler { protected: #ifndef LLDB_DISABLE_LIBEDIT - std::unique_ptr m_editline_ap; + std::unique_ptr m_editline_up; #endif IOHandlerDelegate &m_delegate; std::string m_prompt; diff --git a/lldb/include/lldb/Core/Module.h b/lldb/include/lldb/Core/Module.h index f38823fc01115..f34c2376cda8b 100644 --- a/lldb/include/lldb/Core/Module.h +++ b/lldb/include/lldb/Core/Module.h @@ -693,6 +693,21 @@ class Module : public std::enable_shared_from_this, //------------------------------------------------------------------ virtual void SectionFileAddressesChanged(); + //------------------------------------------------------------------ + /// Returns a reference to the UnwindTable for this Module + /// + /// The UnwindTable contains FuncUnwinders objects for any function in this + /// Module. If a FuncUnwinders object hasn't been created yet (i.e. the + /// function has yet to be unwound in a stack walk), it will be created when + /// requested. Specifically, we do not create FuncUnwinders objects for + /// functions until they are needed. + /// + /// @return + /// Returns the unwind table for this module. If this object has no + /// associated object file, an empty UnwindTable is returned. + //------------------------------------------------------------------ + UnwindTable &GetUnwindTable() { return m_unwind_table; } + llvm::VersionTuple GetVersion(); //------------------------------------------------------------------ @@ -1090,8 +1105,10 @@ class Module : public std::enable_shared_from_this, lldb::ObjectFileSP m_objfile_sp; ///< A shared pointer to the object file ///parser for this module as it may or may ///not be shared with the SymbolFile + UnwindTable m_unwind_table{*this}; ///< Table of FuncUnwinders objects created + /// for this Module's functions lldb::SymbolVendorUP - m_symfile_ap; ///< A pointer to the symbol vendor for this module. + m_symfile_up; ///< A pointer to the symbol vendor for this module. std::vector m_old_symfiles; ///< If anyone calls Module::SetSymbolFileFileSpec() and ///changes the symbol file, @@ -1103,9 +1120,9 @@ class Module : public std::enable_shared_from_this, ///when you have debug info for a module ///that doesn't match where the sources ///currently are - lldb::SectionListUP m_sections_ap; ///< Unified section list for module that - ///is used by the ObjectFile and and - ///ObjectFile instances for the debug info + lldb::SectionListUP m_sections_up; ///< Unified section list for module that + /// is used by the ObjectFile and and + /// ObjectFile instances for the debug info std::atomic m_did_load_objfile{false}; std::atomic m_did_load_symbol_vendor{false}; diff --git a/lldb/include/lldb/Core/RangeMap.h b/lldb/include/lldb/Core/RangeMap.h index 7d99c81bf52af..b2a49f447e086 100644 --- a/lldb/include/lldb/Core/RangeMap.h +++ b/lldb/include/lldb/Core/RangeMap.h @@ -715,6 +715,7 @@ class RangeDataVector { // Clients must ensure that "i" is a valid index prior to calling this // function + Entry &GetEntryRef(size_t i) { return m_entries[i]; } const Entry &GetEntryRef(size_t i) const { return m_entries[i]; } static bool BaseLessThan(const Entry &lhs, const Entry &rhs) { diff --git a/lldb/include/lldb/Core/ValueObjectSyntheticFilter.h b/lldb/include/lldb/Core/ValueObjectSyntheticFilter.h index 746cd7b75483e..6242ec7dbbf01 100644 --- a/lldb/include/lldb/Core/ValueObjectSyntheticFilter.h +++ b/lldb/include/lldb/Core/ValueObjectSyntheticFilter.h @@ -141,7 +141,7 @@ class ValueObjectSynthetic : public ValueObject { // we need to hold on to the SyntheticChildren because someone might delete // the type binding while we are alive lldb::SyntheticChildrenSP m_synth_sp; - std::unique_ptr m_synth_filter_ap; + std::unique_ptr m_synth_filter_up; typedef ThreadSafeSTLMap ByIndexMap; typedef ThreadSafeSTLMap NameToIndexMap; diff --git a/lldb/include/lldb/Expression/ExpressionSourceCode.h b/lldb/include/lldb/Expression/ExpressionSourceCode.h index bb5b29abdce0f..f8785ba6581a3 100644 --- a/lldb/include/lldb/Expression/ExpressionSourceCode.h +++ b/lldb/include/lldb/Expression/ExpressionSourceCode.h @@ -36,7 +36,8 @@ class ExpressionSourceCode { const char *GetName() const { return m_name.c_str(); } bool GetText(std::string &text, lldb::LanguageType wrapping_language, - bool static_method, ExecutionContext &exe_ctx) const; + bool static_method, ExecutionContext &exe_ctx, + bool add_locals) const; // Given a string returned by GetText, find the beginning and end of the body // passed to CreateWrapped. Return true if the bounds could be found. This diff --git a/lldb/include/lldb/Expression/IRExecutionUnit.h b/lldb/include/lldb/Expression/IRExecutionUnit.h index 2dd0a65e28a5a..98813b2a956f5 100644 --- a/lldb/include/lldb/Expression/IRExecutionUnit.h +++ b/lldb/include/lldb/Expression/IRExecutionUnit.h @@ -62,8 +62,8 @@ class IRExecutionUnit : public std::enable_shared_from_this, //------------------------------------------------------------------ /// Constructor //------------------------------------------------------------------ - IRExecutionUnit(std::unique_ptr &context_ap, - std::unique_ptr &module_ap, ConstString &name, + IRExecutionUnit(std::unique_ptr &context_up, + std::unique_ptr &module_up, ConstString &name, const lldb::TargetSP &target_sp, const SymbolContext &sym_ctx, std::vector &cpu_features); @@ -336,13 +336,13 @@ class IRExecutionUnit : public std::enable_shared_from_this, bool AbortOnFailure = true) override; private: - std::unique_ptr m_default_mm_ap; ///< The memory - ///allocator to use - ///in actually - ///creating space. - ///All calls are - ///passed through to - ///it. + std::unique_ptr m_default_mm_up; ///< The memory + /// allocator to use + /// in actually + /// creating space. + /// All calls are + /// passed through to + /// it. IRExecutionUnit &m_parent; ///< The execution unit this is a proxy for. }; @@ -392,11 +392,11 @@ class IRExecutionUnit : public std::enable_shared_from_this, typedef std::vector RecordVector; RecordVector m_records; - std::unique_ptr m_context_ap; - std::unique_ptr m_execution_engine_ap; - std::unique_ptr m_object_cache_ap; + std::unique_ptr m_context_up; + std::unique_ptr m_execution_engine_up; + std::unique_ptr m_object_cache_up; std::unique_ptr - m_module_ap; ///< Holder for the module until it's been handed off + m_module_up; ///< Holder for the module until it's been handed off llvm::Module *m_module; ///< Owned by the execution engine std::vector m_cpu_features; std::vector m_jitted_functions; ///< A vector of all functions diff --git a/lldb/include/lldb/Expression/LLVMUserExpression.h b/lldb/include/lldb/Expression/LLVMUserExpression.h index e74af889a71ca..e2e8b1affa859 100644 --- a/lldb/include/lldb/Expression/LLVMUserExpression.h +++ b/lldb/include/lldb/Expression/LLVMUserExpression.h @@ -97,9 +97,9 @@ class LLVMUserExpression : public UserExpression { std::shared_ptr m_execution_unit_sp; ///< The execution unit the expression is stored in. - std::unique_ptr m_materializer_ap; ///< The materializer to use - ///when running the - ///expression. + std::unique_ptr m_materializer_up; ///< The materializer to use + /// when running the + /// expression. lldb::ModuleWP m_jit_module_wp; bool m_enforce_valid_object; ///< True if the expression parser should enforce ///the presence of a valid class pointer diff --git a/lldb/include/lldb/Expression/UserExpression.h b/lldb/include/lldb/Expression/UserExpression.h index e2fa5b3f1dc64..9954f020b3fd6 100644 --- a/lldb/include/lldb/Expression/UserExpression.h +++ b/lldb/include/lldb/Expression/UserExpression.h @@ -261,10 +261,6 @@ class UserExpression : public Expression { /// Filled in with an error in case the expression evaluation /// fails to parse, run, or evaluated. /// - /// @param[in] line_offset - /// The offset of the first line of the expression from the "beginning" of - /// a virtual source file used for error reporting and debug info. - /// /// @param[out] fixed_expression /// If non-nullptr, the fixed expression is copied into the provided /// string. @@ -272,6 +268,16 @@ class UserExpression : public Expression { /// @param[out] jit_module_sp_ptr /// If non-nullptr, used to persist the generated IR module. /// + /// @param[in] ctx_obj + /// If specified, then the expression will be evaluated in the context of + /// this object. It means that the context object's address will be + /// treated as `this` for the expression (the expression will be + /// evaluated as if it was inside of a method of the context object's + /// class, and its `this` parameter were pointing to the context object). + /// The parameter makes sense for class and union types only. + /// Currently there is a limitation: the context object must be located + /// in the debuggee process' memory (and have the load address). + /// /// @result /// A Process::ExpressionResults value. eExpressionCompleted for /// success. @@ -280,8 +286,9 @@ class UserExpression : public Expression { Evaluate(ExecutionContext &exe_ctx, const EvaluateExpressionOptions &options, llvm::StringRef expr_cstr, llvm::StringRef expr_prefix, lldb::ValueObjectSP &result_valobj_sp, Status &error, - uint32_t line_offset = 0, std::string *fixed_expression = nullptr, - lldb::ModuleSP *jit_module_sp_ptr = nullptr); + std::string *fixed_expression = nullptr, + lldb::ModuleSP *jit_module_sp_ptr = nullptr, + ValueObject *ctx_obj = nullptr); static const Status::ValueType kNoResult = 0x1001; ///< ValueObject::GetError() returns this if there is no result diff --git a/lldb/include/lldb/Host/File.h b/lldb/include/lldb/Host/File.h index 8e3d97178e7c4..143ea829c5ec0 100644 --- a/lldb/include/lldb/Host/File.h +++ b/lldb/include/lldb/Host/File.h @@ -14,6 +14,7 @@ #include "lldb/Utility/Status.h" #include "lldb/lldb-private.h" +#include #include #include #include @@ -420,6 +421,7 @@ class File : public IOObject { LazyBool m_is_interactive; LazyBool m_is_real_terminal; LazyBool m_supports_colors; + std::mutex offset_access_mutex; private: DISALLOW_COPY_AND_ASSIGN(File); diff --git a/lldb/include/lldb/Target/FileAction.h b/lldb/include/lldb/Host/FileAction.h similarity index 94% rename from lldb/include/lldb/Target/FileAction.h rename to lldb/include/lldb/Host/FileAction.h index fc5abb19a4cb8..4d333bb327a54 100644 --- a/lldb/include/lldb/Target/FileAction.h +++ b/lldb/include/lldb/Host/FileAction.h @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#ifndef liblldb_Target_FileAction_h -#define liblldb_Target_FileAction_h +#ifndef LLDB_HOST_FILEACTION_H +#define LLDB_HOST_FILEACTION_H #include "lldb/Utility/FileSpec.h" #include diff --git a/lldb/include/lldb/Host/FileSystem.h b/lldb/include/lldb/Host/FileSystem.h index c8da1d1f1657f..80621a38da1a6 100644 --- a/lldb/include/lldb/Host/FileSystem.h +++ b/lldb/include/lldb/Host/FileSystem.h @@ -64,7 +64,8 @@ class FileSystem { int Open(const char *path, int flags, int mode); Status Open(File &File, const FileSpec &file_spec, uint32_t options, - uint32_t permissions = lldb::eFilePermissionsFileDefault); + uint32_t permissions = lldb::eFilePermissionsFileDefault, + bool should_close_fd = true); /// Get a directory iterator. /// @{ @@ -180,6 +181,10 @@ class FileSystem { llvm::ErrorOr GetExternalPath(const llvm::Twine &path); llvm::ErrorOr GetExternalPath(const FileSpec &file_spec); + llvm::IntrusiveRefCntPtr GetVirtualFileSystem() { + return m_fs; + } + private: static llvm::Optional &InstanceImpl(); llvm::IntrusiveRefCntPtr m_fs; diff --git a/lldb/include/lldb/Host/Host.h b/lldb/include/lldb/Host/Host.h index 21e1c5bf96f79..ab4b051ac9455 100644 --- a/lldb/include/lldb/Host/Host.h +++ b/lldb/include/lldb/Host/Host.h @@ -26,6 +26,9 @@ namespace lldb_private { class FileAction; class ProcessLaunchInfo; +class ProcessInstanceInfo; +class ProcessInstanceInfoList; +class ProcessInstanceInfoMatch; //---------------------------------------------------------------------- // Exit Type for inferior processes @@ -206,9 +209,9 @@ class Host { //------------------------------------------------------------------ /// Perform expansion of the command-line for this launch info This can /// potentially involve wildcard expansion - // environment variable replacement, and whatever other - // argument magic the platform defines as part of its typical - // user experience + /// environment variable replacement, and whatever other + /// argument magic the platform defines as part of its typical + /// user experience //------------------------------------------------------------------ static Status ShellExpandArguments(ProcessLaunchInfo &launch_info); diff --git a/lldb/include/lldb/Host/HostInfoBase.h b/lldb/include/lldb/Host/HostInfoBase.h index 6a5ad207d02ae..f322012906b7a 100644 --- a/lldb/include/lldb/Host/HostInfoBase.h +++ b/lldb/include/lldb/Host/HostInfoBase.h @@ -11,8 +11,8 @@ #include "lldb/Utility/ArchSpec.h" #include "lldb/Utility/FileSpec.h" +#include "lldb/Utility/UserIDResolver.h" #include "lldb/lldb-enumerations.h" - #include "llvm/ADT/StringRef.h" #include diff --git a/lldb/include/lldb/Target/ProcessLaunchInfo.h b/lldb/include/lldb/Host/ProcessLaunchInfo.h similarity index 98% rename from lldb/include/lldb/Target/ProcessLaunchInfo.h rename to lldb/include/lldb/Host/ProcessLaunchInfo.h index 87ebe336887ca..94d0108f74759 100644 --- a/lldb/include/lldb/Target/ProcessLaunchInfo.h +++ b/lldb/include/lldb/Host/ProcessLaunchInfo.h @@ -15,11 +15,11 @@ // LLDB Headers #include "lldb/Utility/Flags.h" +#include "lldb/Host/FileAction.h" #include "lldb/Host/Host.h" #include "lldb/Host/PseudoTerminal.h" -#include "lldb/Target/FileAction.h" -#include "lldb/Target/ProcessInfo.h" #include "lldb/Utility/FileSpec.h" +#include "lldb/Utility/ProcessInfo.h" namespace lldb_private { diff --git a/lldb/include/lldb/Host/Terminal.h b/lldb/include/lldb/Host/Terminal.h index fc615a9130cc1..ea0570755c1dd 100644 --- a/lldb/include/lldb/Host/Terminal.h +++ b/lldb/include/lldb/Host/Terminal.h @@ -139,7 +139,7 @@ class TerminalState { int m_tflags; ///< Cached tflags information. #ifdef LLDB_CONFIG_TERMIOS_SUPPORTED std::unique_ptr - m_termios_ap; ///< Cached terminal state information. + m_termios_up; ///< Cached terminal state information. #endif lldb::pid_t m_process_group; ///< Cached process group information. }; diff --git a/lldb/include/lldb/Host/posix/HostInfoPosix.h b/lldb/include/lldb/Host/posix/HostInfoPosix.h index af2ad649643c0..a3fbe49560c8b 100644 --- a/lldb/include/lldb/Host/posix/HostInfoPosix.h +++ b/lldb/include/lldb/Host/posix/HostInfoPosix.h @@ -14,14 +14,14 @@ namespace lldb_private { +class UserIDResolver; + class HostInfoPosix : public HostInfoBase { friend class HostInfoBase; public: static size_t GetPageSize(); static bool GetHostname(std::string &s); - static const char *LookupUserName(uint32_t uid, std::string &user_name); - static const char *LookupGroupName(uint32_t gid, std::string &group_name); static uint32_t GetUserID(); static uint32_t GetGroupID(); @@ -35,6 +35,8 @@ class HostInfoPosix : public HostInfoBase { static bool ComputePathRelativeToLibrary(FileSpec &file_spec, llvm::StringRef dir); + static UserIDResolver &GetUserIDResolver(); + protected: static bool ComputeSupportExeDirectory(FileSpec &file_spec); static bool ComputeHeaderDirectory(FileSpec &file_spec); diff --git a/lldb/include/lldb/Host/windows/HostInfoWindows.h b/lldb/include/lldb/Host/windows/HostInfoWindows.h index 3f0810527dc15..209d9da082149 100644 --- a/lldb/include/lldb/Host/windows/HostInfoWindows.h +++ b/lldb/include/lldb/Host/windows/HostInfoWindows.h @@ -14,6 +14,7 @@ #include "llvm/Support/VersionTuple.h" namespace lldb_private { +class UserIDResolver; class HostInfoWindows : public HostInfoBase { friend class HostInfoBase; @@ -28,6 +29,7 @@ class HostInfoWindows : public HostInfoBase { static void Terminate(); static size_t GetPageSize(); + static UserIDResolver &GetUserIDResolver(); static llvm::VersionTuple GetOSVersion(); static bool GetOSBuildString(std::string &s); diff --git a/lldb/include/lldb/Host/windows/PipeWindows.h b/lldb/include/lldb/Host/windows/PipeWindows.h index e5281d4d5edfa..fd5bb795945a6 100644 --- a/lldb/include/lldb/Host/windows/PipeWindows.h +++ b/lldb/include/lldb/Host/windows/PipeWindows.h @@ -48,8 +48,8 @@ class PipeWindows : public PipeBase { bool CanRead() const override; bool CanWrite() const override; - lldb::pipe_t GetReadPipe() const { return lldb::pipe_t(m_read); } - lldb::pipe_t GetWritePipe() const { return lldb::pipe_t(m_write); } + lldb::pipe_t GetReadPipe() const override { return lldb::pipe_t(m_read); } + lldb::pipe_t GetWritePipe() const override { return lldb::pipe_t(m_write); } int GetReadFileDescriptor() const override; int GetWriteFileDescriptor() const override; diff --git a/lldb/include/lldb/Initialization/SystemInitializer.h b/lldb/include/lldb/Initialization/SystemInitializer.h index ec699bd65ce17..e616ad1ee811d 100644 --- a/lldb/include/lldb/Initialization/SystemInitializer.h +++ b/lldb/include/lldb/Initialization/SystemInitializer.h @@ -15,18 +15,12 @@ namespace lldb_private { -struct InitializerOptions { - bool reproducer_capture = false; - bool reproducer_replay = false; - std::string reproducer_path; -}; - class SystemInitializer { public: SystemInitializer(); virtual ~SystemInitializer(); - virtual llvm::Error Initialize(const InitializerOptions &options) = 0; + virtual llvm::Error Initialize() = 0; virtual void Terminate() = 0; }; } diff --git a/lldb/include/lldb/Initialization/SystemInitializerCommon.h b/lldb/include/lldb/Initialization/SystemInitializerCommon.h index 785ae0459e0b5..83b24c0c67013 100644 --- a/lldb/include/lldb/Initialization/SystemInitializerCommon.h +++ b/lldb/include/lldb/Initialization/SystemInitializerCommon.h @@ -27,7 +27,7 @@ class SystemInitializerCommon : public SystemInitializer { SystemInitializerCommon(); ~SystemInitializerCommon() override; - llvm::Error Initialize(const InitializerOptions &options) override; + llvm::Error Initialize() override; void Terminate() override; }; diff --git a/lldb/include/lldb/Initialization/SystemLifetimeManager.h b/lldb/include/lldb/Initialization/SystemLifetimeManager.h index b176d394b43ec..2e99b86dbdbd0 100644 --- a/lldb/include/lldb/Initialization/SystemLifetimeManager.h +++ b/lldb/include/lldb/Initialization/SystemLifetimeManager.h @@ -24,7 +24,6 @@ class SystemLifetimeManager { ~SystemLifetimeManager(); llvm::Error Initialize(std::unique_ptr initializer, - const InitializerOptions &options, LoadPluginCallbackType plugin_callback); void Terminate(); diff --git a/lldb/include/lldb/Symbol/ClangASTContext.h b/lldb/include/lldb/Symbol/ClangASTContext.h index 50c8d4bb165ab..d33a7d89c9647 100644 --- a/lldb/include/lldb/Symbol/ClangASTContext.h +++ b/lldb/include/lldb/Symbol/ClangASTContext.h @@ -121,7 +121,7 @@ class ClangASTContext : public TypeSystem { bool HasExternalSource(); void SetExternalSource( - llvm::IntrusiveRefCntPtr &ast_source_ap); + llvm::IntrusiveRefCntPtr &ast_source_up); void RemoveExternalSource(); @@ -1018,22 +1018,22 @@ class ClangASTContext : public TypeSystem { //------------------------------------------------------------------ // clang-format off std::string m_target_triple; - std::unique_ptr m_ast_ap; - std::unique_ptr m_language_options_ap; - std::unique_ptr m_file_manager_ap; - std::unique_ptr m_file_system_options_ap; - std::unique_ptr m_source_manager_ap; - std::unique_ptr m_diagnostics_engine_ap; - std::unique_ptr m_diagnostic_consumer_ap; + std::unique_ptr m_ast_up; + std::unique_ptr m_language_options_up; + std::unique_ptr m_file_manager_up; + std::unique_ptr m_file_system_options_up; + std::unique_ptr m_source_manager_up; + std::unique_ptr m_diagnostics_engine_up; + std::unique_ptr m_diagnostic_consumer_up; std::shared_ptr m_target_options_rp; - std::unique_ptr m_target_info_ap; - std::unique_ptr m_identifier_table_ap; - std::unique_ptr m_selector_table_ap; - std::unique_ptr m_builtins_ap; - std::unique_ptr m_dwarf_ast_parser_ap; - std::unique_ptr m_pdb_ast_parser_ap; - std::unique_ptr m_scratch_ast_source_ap; - std::unique_ptr m_mangle_ctx_ap; + std::unique_ptr m_target_info_up; + std::unique_ptr m_identifier_table_up; + std::unique_ptr m_selector_table_up; + std::unique_ptr m_builtins_up; + std::unique_ptr m_dwarf_ast_parser_up; + std::unique_ptr m_pdb_ast_parser_up; + std::unique_ptr m_scratch_ast_source_up; + std::unique_ptr m_mangle_ctx_up; CompleteTagDeclCallback m_callback_tag_decl; CompleteObjCInterfaceDeclCallback m_callback_objc_decl; void * m_callback_baton; @@ -1060,7 +1060,8 @@ class ClangASTContextForExpressions : public ClangASTContext { GetUserExpression(llvm::StringRef expr, llvm::StringRef prefix, lldb::LanguageType language, Expression::ResultType desired_type, - const EvaluateExpressionOptions &options) override; + const EvaluateExpressionOptions &options, + ValueObject *ctx_obj) override; FunctionCaller *GetFunctionCaller(const CompilerType &return_type, const Address &function_address, diff --git a/lldb/include/lldb/Symbol/ClangASTImporter.h b/lldb/include/lldb/Symbol/ClangASTImporter.h index 96641daccde6d..ab66e753e9c87 100644 --- a/lldb/include/lldb/Symbol/ClangASTImporter.h +++ b/lldb/include/lldb/Symbol/ClangASTImporter.h @@ -21,6 +21,7 @@ #include "clang/Basic/FileManager.h" #include "clang/Basic/FileSystemOptions.h" +#include "lldb/Host/FileSystem.h" #include "lldb/Symbol/CompilerDeclContext.h" #include "lldb/lldb-types.h" @@ -93,7 +94,9 @@ class ClangASTImporter { vbase_offsets; }; - ClangASTImporter() : m_file_manager(clang::FileSystemOptions()) {} + ClangASTImporter() + : m_file_manager(clang::FileSystemOptions(), + FileSystem::Instance().GetVirtualFileSystem()) {} clang::QualType CopyType(clang::ASTContext *dst_ctx, clang::ASTContext *src_ctx, clang::QualType type); diff --git a/lldb/include/lldb/Symbol/CompileUnit.h b/lldb/include/lldb/Symbol/CompileUnit.h index 1bc78c6c2e1a4..556fee0a7e828 100644 --- a/lldb/include/lldb/Symbol/CompileUnit.h +++ b/lldb/include/lldb/Symbol/CompileUnit.h @@ -13,6 +13,7 @@ #include "lldb/Core/ModuleChild.h" #include "lldb/Symbol/DebugMacros.h" #include "lldb/Symbol/Function.h" +#include "lldb/Symbol/SourceModule.h" #include "lldb/Utility/Stream.h" #include "lldb/Utility/UserID.h" #include "lldb/lldb-enumerations.h" @@ -266,7 +267,7 @@ class CompileUnit : public std::enable_shared_from_this, /// @return /// A list of imported module names. //------------------------------------------------------------------ - const std::vector &GetImportedModules(); + const std::vector &GetImportedModules(); //------------------------------------------------------------------ /// Get the SymbolFile plug-in user data. @@ -414,28 +415,29 @@ class CompileUnit : public std::enable_shared_from_this, size_t GetNumFunctions() const { return m_functions_by_uid.size(); } protected: - void *m_user_data; ///< User data for the SymbolFile parser to store - ///information into. - lldb::LanguageType - m_language; ///< The programming language enumeration value. - Flags m_flags; ///< Compile unit flags that help with partial parsing. - + /// User data for the SymbolFile parser to store information into. + void *m_user_data; + /// The programming language enumeration value. + lldb::LanguageType m_language; + /// Compile unit flags that help with partial parsing. + Flags m_flags; /// Maps UIDs to functions. llvm::DenseMap m_functions_by_uid; - std::vector m_imported_modules; ///< All modules, including the - ///current module, imported by - ///this - ///< compile unit. - FileSpecList m_support_files; ///< Files associated with this compile unit's - ///line table and declarations. - std::unique_ptr - m_line_table_ap; ///< Line table that will get parsed on demand. - DebugMacrosSP - m_debug_macros_sp; ///< Debug macros that will get parsed on demand. - lldb::VariableListSP m_variables; ///< Global and static variable list that - ///will get parsed on demand. - lldb_private::LazyBool m_is_optimized; /// eLazyBoolYes if this compile unit - /// was compiled with optimization. + /// All modules, including the current module, imported by this + /// compile unit. + std::vector m_imported_modules; + /// Files associated with this compile unit's line table and + /// declarations. + FileSpecList m_support_files; + /// Line table that will get parsed on demand. + std::unique_ptr m_line_table_up; + /// Debug macros that will get parsed on demand. + DebugMacrosSP m_debug_macros_sp; + /// Global and static variable list that will get parsed on demand. + lldb::VariableListSP m_variables; + /// eLazyBoolYes if this compile unit was compiled with + /// optimization. + lldb_private::LazyBool m_is_optimized; private: enum { diff --git a/lldb/include/lldb/Host/Symbols.h b/lldb/include/lldb/Symbol/LocateSymbolFile.h similarity index 100% rename from lldb/include/lldb/Host/Symbols.h rename to lldb/include/lldb/Symbol/LocateSymbolFile.h diff --git a/lldb/include/lldb/Symbol/ObjectFile.h b/lldb/include/lldb/Symbol/ObjectFile.h index 21bea80dcb604..10feae761f410 100644 --- a/lldb/include/lldb/Symbol/ObjectFile.h +++ b/lldb/include/lldb/Symbol/ObjectFile.h @@ -408,10 +408,10 @@ class ObjectFile : public std::enable_shared_from_this, /// bytes for the object file (or memory for memory based object files). /// /// @return - /// Returns \b true if a UUID was successfully extracted into - /// \a uuid, \b false otherwise. + /// The object file's UUID. In case of an error, an empty UUID is + /// returned. //------------------------------------------------------------------ - virtual bool GetUUID(lldb_private::UUID *uuid) = 0; + virtual UUID GetUUID() = 0; //------------------------------------------------------------------ /// Gets the symbol file spec list for this object file. @@ -477,20 +477,6 @@ class ObjectFile : public std::enable_shared_from_this, //------------------------------------------------------------------ virtual bool ParseHeader() = 0; - //------------------------------------------------------------------ - /// Returns a reference to the UnwindTable for this ObjectFile - /// - /// The UnwindTable contains FuncUnwinders objects for any function in this - /// ObjectFile. If a FuncUnwinders object hasn't been created yet (i.e. the - /// function has yet to be unwound in a stack walk), it will be created when - /// requested. Specifically, we do not create FuncUnwinders objects for - /// functions until they are needed. - /// - /// @return - /// Returns the unwind table for this object file. - //------------------------------------------------------------------ - virtual lldb_private::UnwindTable &GetUnwindTable() { return m_unwind_table; } - //------------------------------------------------------------------ /// Returns if the function bounds for symbols in this symbol file are /// likely accurate. @@ -774,13 +760,10 @@ class ObjectFile : public std::enable_shared_from_this, ///determined). DataExtractor m_data; ///< The data for this object file so things can be parsed lazily. - lldb_private::UnwindTable m_unwind_table; /// < Table of FuncUnwinders objects - /// created for this ObjectFile's - /// functions lldb::ProcessWP m_process_wp; const lldb::addr_t m_memory_addr; - std::unique_ptr m_sections_ap; - std::unique_ptr m_symtab_ap; + std::unique_ptr m_sections_up; + std::unique_ptr m_symtab_up; uint32_t m_synthetic_symbol_idx; //------------------------------------------------------------------ diff --git a/lldb/include/lldb/Symbol/SourceModule.h b/lldb/include/lldb/Symbol/SourceModule.h new file mode 100644 index 0000000000000..b12ff01a5198d --- /dev/null +++ b/lldb/include/lldb/Symbol/SourceModule.h @@ -0,0 +1,27 @@ +//===-- SourceModule.h ------------------------------------------*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#ifndef liblldb_SourceModule_h_ +#define liblldb_SourceModule_h_ + +#include "lldb/Utility/ConstString.h" +#include + +namespace lldb_private { + +/// Information needed to import a source-language module. +struct SourceModule { + /// Something like "Module.Submodule". + std::vector path; + ConstString search_path; + ConstString sysroot; +}; + +} // namespace lldb_private + +#endif diff --git a/lldb/include/lldb/Symbol/SymbolContext.h b/lldb/include/lldb/Symbol/SymbolContext.h index 6e674faed40f4..de4c03fe0d1d4 100644 --- a/lldb/include/lldb/Symbol/SymbolContext.h +++ b/lldb/include/lldb/Symbol/SymbolContext.h @@ -419,12 +419,12 @@ class SymbolContextSpecifier { lldb::TargetSP m_target_sp; std::string m_module_spec; lldb::ModuleSP m_module_sp; - std::unique_ptr m_file_spec_ap; + std::unique_ptr m_file_spec_up; size_t m_start_line; size_t m_end_line; std::string m_function_spec; std::string m_class_name; - std::unique_ptr m_address_range_ap; + std::unique_ptr m_address_range_up; uint32_t m_type; // Or'ed bits from SpecificationType }; diff --git a/lldb/include/lldb/Symbol/SymbolFile.h b/lldb/include/lldb/Symbol/SymbolFile.h index bdcebe16e4eb2..b77f167c22570 100644 --- a/lldb/include/lldb/Symbol/SymbolFile.h +++ b/lldb/include/lldb/Symbol/SymbolFile.h @@ -14,6 +14,7 @@ #include "lldb/Symbol/CompilerDeclContext.h" #include "lldb/Symbol/CompilerType.h" #include "lldb/Symbol/Function.h" +#include "lldb/Symbol/SourceModule.h" #include "lldb/Symbol/Type.h" #include "lldb/lldb-private.h" @@ -135,7 +136,7 @@ class SymbolFile : public PluginInterface { virtual bool ParseImportedModules(const SymbolContext &sc, - std::vector &imported_modules) = 0; + std::vector &imported_modules) = 0; virtual size_t ParseBlocksRecursive(Function &func) = 0; virtual size_t ParseVariablesForContext(const SymbolContext &sc) = 0; virtual Type *ResolveTypeUID(lldb::user_id_t type_uid) = 0; diff --git a/lldb/include/lldb/Symbol/SymbolVendor.h b/lldb/include/lldb/Symbol/SymbolVendor.h index c4e4a8b32b3ac..27b2ac99af04c 100644 --- a/lldb/include/lldb/Symbol/SymbolVendor.h +++ b/lldb/include/lldb/Symbol/SymbolVendor.h @@ -13,6 +13,7 @@ #include "lldb/Core/ModuleChild.h" #include "lldb/Core/PluginInterface.h" +#include "lldb/Symbol/SourceModule.h" #include "lldb/Symbol/TypeList.h" #include "lldb/Symbol/TypeMap.h" #include "lldb/lldb-private.h" @@ -60,8 +61,9 @@ class SymbolVendor : public ModuleChild, public PluginInterface { virtual size_t ParseTypes(CompileUnit &comp_unit); - virtual bool ParseImportedModules(const SymbolContext &sc, - std::vector &imported_modules); + virtual bool + ParseImportedModules(const SymbolContext &sc, + std::vector &imported_modules); virtual size_t ParseBlocksRecursive(Function &func); @@ -124,7 +126,7 @@ class SymbolVendor : public ModuleChild, public PluginInterface { virtual size_t GetTypes(SymbolContextScope *sc_scope, lldb::TypeClass type_mask, TypeList &type_list); - SymbolFile *GetSymbolFile() { return m_sym_file_ap.get(); } + SymbolFile *GetSymbolFile() { return m_sym_file_up.get(); } FileSpec GetMainFileSpec() const; @@ -161,7 +163,7 @@ class SymbolVendor : public ModuleChild, public PluginInterface { // case it isn't the same as the module // object file (debug symbols in a separate // file) - std::unique_ptr m_sym_file_ap; // A single symbol file. Subclasses + std::unique_ptr m_sym_file_up; // A single symbol file. Subclasses // can add more of these if needed. Symtab *m_symtab; // Save a symtab once to not pass it through `AddSymbols` of // the symbol file each time when it is needed diff --git a/lldb/include/lldb/Symbol/TypeSystem.h b/lldb/include/lldb/Symbol/TypeSystem.h index 520916fb114ff..2e1d83083cdc9 100644 --- a/lldb/include/lldb/Symbol/TypeSystem.h +++ b/lldb/include/lldb/Symbol/TypeSystem.h @@ -449,7 +449,8 @@ class TypeSystem : public PluginInterface { GetUserExpression(llvm::StringRef expr, llvm::StringRef prefix, lldb::LanguageType language, Expression::ResultType desired_type, - const EvaluateExpressionOptions &options) { + const EvaluateExpressionOptions &options, + ValueObject *ctx_obj) { return nullptr; } diff --git a/lldb/include/lldb/Symbol/UnwindTable.h b/lldb/include/lldb/Symbol/UnwindTable.h index 8ca4a4de9ec53..c0a37ab4f193c 100644 --- a/lldb/include/lldb/Symbol/UnwindTable.h +++ b/lldb/include/lldb/Symbol/UnwindTable.h @@ -22,7 +22,9 @@ namespace lldb_private { class UnwindTable { public: - UnwindTable(ObjectFile &objfile); + /// Create an Unwind table using the data in the given module. + explicit UnwindTable(Module &module); + ~UnwindTable(); lldb_private::DWARFCallFrameInfo *GetEHFrameInfo(); @@ -62,7 +64,7 @@ class UnwindTable { typedef collection::iterator iterator; typedef collection::const_iterator const_iterator; - ObjectFile &m_object_file; + Module &m_module; collection m_unwinds; bool m_initialized; // delay some initialization until ObjectFile is set up diff --git a/lldb/include/lldb/Target/ABI.h b/lldb/include/lldb/Target/ABI.h index 9d7996aa7e938..b2e1a1279ab59 100644 --- a/lldb/include/lldb/Target/ABI.h +++ b/lldb/include/lldb/Target/ABI.h @@ -34,7 +34,7 @@ class ABI : public PluginInterface { size_t size; /* size in bytes of this argument */ lldb::addr_t value; /* literal value */ - std::unique_ptr data_ap; /* host data pointer */ + std::unique_ptr data_up; /* host data pointer */ }; ~ABI() override; diff --git a/lldb/include/lldb/Target/ObjCLanguageRuntime.h b/lldb/include/lldb/Target/ObjCLanguageRuntime.h index ac0d28439545d..1e8a110776c95 100644 --- a/lldb/include/lldb/Target/ObjCLanguageRuntime.h +++ b/lldb/include/lldb/Target/ObjCLanguageRuntime.h @@ -151,7 +151,7 @@ class ObjCLanguageRuntime : public LanguageRuntime { const char *name, bool for_expression) = 0; protected: - std::unique_ptr m_scratch_ast_ctx_ap; + std::unique_ptr m_scratch_ast_ctx_up; }; class ObjCExceptionPrecondition : public Breakpoint::BreakpointPrecondition { diff --git a/lldb/include/lldb/Target/Platform.h b/lldb/include/lldb/Target/Platform.h index a69fdbe6727bf..248bf1396ceff 100644 --- a/lldb/include/lldb/Target/Platform.h +++ b/lldb/include/lldb/Target/Platform.h @@ -23,12 +23,17 @@ #include "lldb/Utility/ConstString.h" #include "lldb/Utility/FileSpec.h" #include "lldb/Utility/Timeout.h" +#include "lldb/Utility/UserIDResolver.h" #include "lldb/lldb-private-forward.h" #include "lldb/lldb-public.h" #include "llvm/Support/VersionTuple.h" namespace lldb_private { +class ProcessInstanceInfo; +class ProcessInstanceInfoList; +class ProcessInstanceInfoMatch; + class ModuleCache; enum MmapFlags { eMmapFlagsPrivate = 1, eMmapFlagsAnon = 2 }; @@ -276,9 +281,7 @@ class Platform : public PluginInterface { virtual bool SetRemoteWorkingDirectory(const FileSpec &working_dir); - virtual const char *GetUserName(uint32_t uid); - - virtual const char *GetGroupName(uint32_t gid); + virtual UserIDResolver &GetUserIDResolver() = 0; //------------------------------------------------------------------ /// Locate a file for a platform. @@ -364,9 +367,9 @@ class Platform : public PluginInterface { //------------------------------------------------------------------ /// Perform expansion of the command-line for this launch info This can /// potentially involve wildcard expansion - // environment variable replacement, and whatever other - // argument magic the platform defines as part of its typical - // user experience + /// environment variable replacement, and whatever other + /// argument magic the platform defines as part of its typical + /// user experience //------------------------------------------------------------------ virtual Status ShellExpandArguments(ProcessLaunchInfo &launch_info); @@ -916,8 +919,6 @@ class Platform : public PluginInterface { // Mutex for modifying Platform data structures that should only be used for // non-reentrant code std::mutex m_mutex; - IDToNameMap m_uid_map; - IDToNameMap m_gid_map; size_t m_max_uid_name_len; size_t m_max_gid_name_len; bool m_supports_rsync; @@ -946,68 +947,6 @@ class Platform : public PluginInterface { //------------------------------------------------------------------ virtual void CalculateTrapHandlerSymbolNames() = 0; - const char *GetCachedUserName(uint32_t uid) { - std::lock_guard guard(m_mutex); - // return the empty string if our string is NULL so we can tell when things - // were in the negative cached (didn't find a valid user name, don't keep - // trying) - const auto pos = m_uid_map.find(uid); - return ((pos != m_uid_map.end()) ? pos->second.AsCString("") : nullptr); - } - - const char *SetCachedUserName(uint32_t uid, const char *name, - size_t name_len) { - std::lock_guard guard(m_mutex); - ConstString const_name(name); - m_uid_map[uid] = const_name; - if (m_max_uid_name_len < name_len) - m_max_uid_name_len = name_len; - // Const strings lives forever in our const string pool, so we can return - // the const char * - return const_name.GetCString(); - } - - void SetUserNameNotFound(uint32_t uid) { - std::lock_guard guard(m_mutex); - m_uid_map[uid] = ConstString(); - } - - void ClearCachedUserNames() { - std::lock_guard guard(m_mutex); - m_uid_map.clear(); - } - - const char *GetCachedGroupName(uint32_t gid) { - std::lock_guard guard(m_mutex); - // return the empty string if our string is NULL so we can tell when things - // were in the negative cached (didn't find a valid group name, don't keep - // trying) - const auto pos = m_gid_map.find(gid); - return ((pos != m_gid_map.end()) ? pos->second.AsCString("") : nullptr); - } - - const char *SetCachedGroupName(uint32_t gid, const char *name, - size_t name_len) { - std::lock_guard guard(m_mutex); - ConstString const_name(name); - m_gid_map[gid] = const_name; - if (m_max_gid_name_len < name_len) - m_max_gid_name_len = name_len; - // Const strings lives forever in our const string pool, so we can return - // the const char * - return const_name.GetCString(); - } - - void SetGroupNameNotFound(uint32_t gid) { - std::lock_guard guard(m_mutex); - m_gid_map[gid] = ConstString(); - } - - void ClearCachedGroupNames() { - std::lock_guard guard(m_mutex); - m_gid_map.clear(); - } - Status GetCachedExecutable(ModuleSpec &module_spec, lldb::ModuleSP &module_sp, const FileSpecList *module_search_paths_ptr, Platform &remote_platform); diff --git a/lldb/include/lldb/Target/Process.h b/lldb/include/lldb/Target/Process.h index 0be1548f477fd..e86a8a1ad1725 100644 --- a/lldb/include/lldb/Target/Process.h +++ b/lldb/include/lldb/Target/Process.h @@ -28,14 +28,13 @@ #include "lldb/Core/ThreadSafeValue.h" #include "lldb/Core/UserSettingsController.h" #include "lldb/Host/HostThread.h" +#include "lldb/Host/ProcessLaunchInfo.h" #include "lldb/Host/ProcessRunLock.h" #include "lldb/Interpreter/Options.h" #include "lldb/Symbol/ObjectFile.h" #include "lldb/Target/ExecutionContextScope.h" #include "lldb/Target/InstrumentationRuntime.h" #include "lldb/Target/Memory.h" -#include "lldb/Target/ProcessInfo.h" -#include "lldb/Target/ProcessLaunchInfo.h" #include "lldb/Target/QueueList.h" #include "lldb/Target/ThreadList.h" #include "lldb/Utility/ArchSpec.h" @@ -43,9 +42,11 @@ #include "lldb/Utility/Event.h" #include "lldb/Utility/Listener.h" #include "lldb/Utility/NameMatches.h" +#include "lldb/Utility/ProcessInfo.h" #include "lldb/Utility/Status.h" #include "lldb/Utility/StructuredData.h" #include "lldb/Utility/TraceOptions.h" +#include "lldb/Utility/UserIDResolver.h" #include "lldb/lldb-private.h" #include "llvm/ADT/ArrayRef.h" @@ -107,63 +108,6 @@ class ProcessProperties : public Properties { typedef std::shared_ptr ProcessPropertiesSP; -//---------------------------------------------------------------------- -// ProcessInstanceInfo -// -// Describes an existing process and any discoverable information that pertains -// to that process. -//---------------------------------------------------------------------- -class ProcessInstanceInfo : public ProcessInfo { -public: - ProcessInstanceInfo() - : ProcessInfo(), m_euid(UINT32_MAX), m_egid(UINT32_MAX), - m_parent_pid(LLDB_INVALID_PROCESS_ID) {} - - ProcessInstanceInfo(const char *name, const ArchSpec &arch, lldb::pid_t pid) - : ProcessInfo(name, arch, pid), m_euid(UINT32_MAX), m_egid(UINT32_MAX), - m_parent_pid(LLDB_INVALID_PROCESS_ID) {} - - void Clear() { - ProcessInfo::Clear(); - m_euid = UINT32_MAX; - m_egid = UINT32_MAX; - m_parent_pid = LLDB_INVALID_PROCESS_ID; - } - - uint32_t GetEffectiveUserID() const { return m_euid; } - - uint32_t GetEffectiveGroupID() const { return m_egid; } - - bool EffectiveUserIDIsValid() const { return m_euid != UINT32_MAX; } - - bool EffectiveGroupIDIsValid() const { return m_egid != UINT32_MAX; } - - void SetEffectiveUserID(uint32_t uid) { m_euid = uid; } - - void SetEffectiveGroupID(uint32_t gid) { m_egid = gid; } - - lldb::pid_t GetParentProcessID() const { return m_parent_pid; } - - void SetParentProcessID(lldb::pid_t pid) { m_parent_pid = pid; } - - bool ParentProcessIDIsValid() const { - return m_parent_pid != LLDB_INVALID_PROCESS_ID; - } - - void Dump(Stream &s, Platform *platform) const; - - static void DumpTableHeader(Stream &s, Platform *platform, bool show_args, - bool verbose); - - void DumpAsTableRow(Stream &s, Platform *platform, bool show_args, - bool verbose) const; - -protected: - uint32_t m_euid; - uint32_t m_egid; - lldb::pid_t m_parent_pid; -}; - //---------------------------------------------------------------------- // ProcessAttachInfo // @@ -298,94 +242,6 @@ class ProcessLaunchCommandOptions : public Options { lldb_private::LazyBool disable_aslr; }; -//---------------------------------------------------------------------- -// ProcessInstanceInfoMatch -// -// A class to help matching one ProcessInstanceInfo to another. -//---------------------------------------------------------------------- - -class ProcessInstanceInfoMatch { -public: - ProcessInstanceInfoMatch() - : m_match_info(), m_name_match_type(NameMatch::Ignore), - m_match_all_users(false) {} - - ProcessInstanceInfoMatch(const char *process_name, - NameMatch process_name_match_type) - : m_match_info(), m_name_match_type(process_name_match_type), - m_match_all_users(false) { - m_match_info.GetExecutableFile().SetFile(process_name, - FileSpec::Style::native); - } - - ProcessInstanceInfo &GetProcessInfo() { return m_match_info; } - - const ProcessInstanceInfo &GetProcessInfo() const { return m_match_info; } - - bool GetMatchAllUsers() const { return m_match_all_users; } - - void SetMatchAllUsers(bool b) { m_match_all_users = b; } - - NameMatch GetNameMatchType() const { return m_name_match_type; } - - void SetNameMatchType(NameMatch name_match_type) { - m_name_match_type = name_match_type; - } - - bool NameMatches(const char *process_name) const; - - bool Matches(const ProcessInstanceInfo &proc_info) const; - - bool MatchAllProcesses() const; - void Clear(); - -protected: - ProcessInstanceInfo m_match_info; - NameMatch m_name_match_type; - bool m_match_all_users; -}; - -class ProcessInstanceInfoList { -public: - ProcessInstanceInfoList() = default; - - void Clear() { m_infos.clear(); } - - size_t GetSize() { return m_infos.size(); } - - void Append(const ProcessInstanceInfo &info) { m_infos.push_back(info); } - - const char *GetProcessNameAtIndex(size_t idx) { - return ((idx < m_infos.size()) ? m_infos[idx].GetName() : nullptr); - } - - size_t GetProcessNameLengthAtIndex(size_t idx) { - return ((idx < m_infos.size()) ? m_infos[idx].GetNameLength() : 0); - } - - lldb::pid_t GetProcessIDAtIndex(size_t idx) { - return ((idx < m_infos.size()) ? m_infos[idx].GetProcessID() : 0); - } - - bool GetInfoAtIndex(size_t idx, ProcessInstanceInfo &info) { - if (idx < m_infos.size()) { - info = m_infos[idx]; - return true; - } - return false; - } - - // You must ensure "idx" is valid before calling this function - const ProcessInstanceInfo &GetProcessInfoAtIndex(size_t idx) const { - assert(idx < m_infos.size()); - return m_infos[idx]; - } - -protected: - typedef std::vector collection; - collection m_infos; -}; - // This class tracks the Modification state of the process. Things that can // currently modify the program are running the program (which will up the // StopID) and writing memory (which will up the MemoryID.) @@ -2520,9 +2376,13 @@ class Process : public std::enable_shared_from_this, //------------------------------------------------------------------ void RestoreProcessEvents(); + bool StateChangedIsHijackedForSynchronousResume(); + + bool StateChangedIsExternallyHijacked(); + const lldb::ABISP &GetABI(); - OperatingSystem *GetOperatingSystem() { return m_os_ap.get(); } + OperatingSystem *GetOperatingSystem() { return m_os_up.get(); } virtual LanguageRuntime *GetLanguageRuntime(lldb::LanguageType language, bool retry_if_null = true); @@ -2537,7 +2397,7 @@ class Process : public std::enable_shared_from_this, bool IsRunning() const; DynamicCheckerFunctions *GetDynamicCheckers() { - return m_dynamic_checkers_ap.get(); + return m_dynamic_checkers_up.get(); } void SetDynamicCheckers(DynamicCheckerFunctions *dynamic_checkers); @@ -2918,10 +2778,10 @@ class Process : public std::enable_shared_from_this, }; void SetNextEventAction(Process::NextEventAction *next_event_action) { - if (m_next_event_action_ap.get()) - m_next_event_action_ap->HandleBeingUnshipped(); + if (m_next_event_action_up.get()) + m_next_event_action_up->HandleBeingUnshipped(); - m_next_event_action_ap.reset(next_event_action); + m_next_event_action_up.reset(next_event_action); } // This is the completer for Attaching: @@ -3070,15 +2930,15 @@ class Process : public std::enable_shared_from_this, BreakpointSiteList m_breakpoint_site_list; ///< This is the list of breakpoint ///locations we intend to insert in ///the target. - lldb::DynamicLoaderUP m_dyld_ap; - lldb::JITLoaderListUP m_jit_loaders_ap; - lldb::DynamicCheckerFunctionsUP m_dynamic_checkers_ap; ///< The functions used - ///by the expression - ///parser to validate - ///data that - ///expressions use. - lldb::OperatingSystemUP m_os_ap; - lldb::SystemRuntimeUP m_system_runtime_ap; + lldb::DynamicLoaderUP m_dyld_up; + lldb::JITLoaderListUP m_jit_loaders_up; + lldb::DynamicCheckerFunctionsUP m_dynamic_checkers_up; ///< The functions used + /// by the expression + /// parser to validate + /// data that + /// expressions use. + lldb::OperatingSystemUP m_os_up; + lldb::SystemRuntimeUP m_system_runtime_up; lldb::UnixSignalsSP m_unix_signals_sp; /// This is the current signal set for this process. lldb::ABISP m_abi_sp; @@ -3098,7 +2958,7 @@ class Process : public std::enable_shared_from_this, /// with an explicit call to Kill or Detach? LanguageRuntimeCollection m_language_runtimes; InstrumentationRuntimeCollection m_instrumentation_runtimes; - std::unique_ptr m_next_event_action_ap; + std::unique_ptr m_next_event_action_up; std::vector m_pre_resume_actions; ProcessRunLock m_public_run_lock; ProcessRunLock m_private_run_lock; @@ -3211,8 +3071,6 @@ class Process : public std::enable_shared_from_this, virtual Status UpdateAutomaticSignalFiltering(); - bool StateChangedIsExternallyHijacked(); - void LoadOperatingSystemPlugin(bool flush); private: diff --git a/lldb/include/lldb/Target/ProcessInfo.h b/lldb/include/lldb/Target/ProcessInfo.h deleted file mode 100644 index 818e29ef357e6..0000000000000 --- a/lldb/include/lldb/Target/ProcessInfo.h +++ /dev/null @@ -1,101 +0,0 @@ -//===-- ProcessInfo.h -------------------------------------------*- C++ -*-===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - -#ifndef liblldb_ProcessInfo_h_ -#define liblldb_ProcessInfo_h_ - -// LLDB headers -#include "lldb/Utility/ArchSpec.h" -#include "lldb/Utility/Args.h" -#include "lldb/Utility/Environment.h" -#include "lldb/Utility/FileSpec.h" - -namespace lldb_private { -//---------------------------------------------------------------------- -// ProcessInfo -// -// A base class for information for a process. This can be used to fill -// out information for a process prior to launching it, or it can be used for -// an instance of a process and can be filled in with the existing values for -// that process. -//---------------------------------------------------------------------- -class ProcessInfo { -public: - ProcessInfo(); - - ProcessInfo(const char *name, const ArchSpec &arch, lldb::pid_t pid); - - void Clear(); - - const char *GetName() const; - - size_t GetNameLength() const; - - FileSpec &GetExecutableFile() { return m_executable; } - - void SetExecutableFile(const FileSpec &exe_file, - bool add_exe_file_as_first_arg); - - const FileSpec &GetExecutableFile() const { return m_executable; } - - uint32_t GetUserID() const { return m_uid; } - - uint32_t GetGroupID() const { return m_gid; } - - bool UserIDIsValid() const { return m_uid != UINT32_MAX; } - - bool GroupIDIsValid() const { return m_gid != UINT32_MAX; } - - void SetUserID(uint32_t uid) { m_uid = uid; } - - void SetGroupID(uint32_t gid) { m_gid = gid; } - - ArchSpec &GetArchitecture() { return m_arch; } - - const ArchSpec &GetArchitecture() const { return m_arch; } - - void SetArchitecture(const ArchSpec &arch) { m_arch = arch; } - - lldb::pid_t GetProcessID() const { return m_pid; } - - void SetProcessID(lldb::pid_t pid) { m_pid = pid; } - - bool ProcessIDIsValid() const { return m_pid != LLDB_INVALID_PROCESS_ID; } - - void Dump(Stream &s, Platform *platform) const; - - Args &GetArguments() { return m_arguments; } - - const Args &GetArguments() const { return m_arguments; } - - llvm::StringRef GetArg0() const; - - void SetArg0(llvm::StringRef arg); - - void SetArguments(const Args &args, bool first_arg_is_executable); - - void SetArguments(char const **argv, bool first_arg_is_executable); - - Environment &GetEnvironment() { return m_environment; } - const Environment &GetEnvironment() const { return m_environment; } - -protected: - FileSpec m_executable; - std::string m_arg0; // argv[0] if supported. If empty, then use m_executable. - // Not all process plug-ins support specifying an argv[0] that differs from - // the resolved platform executable (which is in m_executable) - Args m_arguments; // All program arguments except argv[0] - Environment m_environment; - uint32_t m_uid; - uint32_t m_gid; - ArchSpec m_arch; - lldb::pid_t m_pid; -}; -} - -#endif // #ifndef liblldb_ProcessInfo_h_ diff --git a/lldb/include/lldb/Target/RemoteAwarePlatform.h b/lldb/include/lldb/Target/RemoteAwarePlatform.h new file mode 100644 index 0000000000000..524332f948a54 --- /dev/null +++ b/lldb/include/lldb/Target/RemoteAwarePlatform.h @@ -0,0 +1,97 @@ +//===-- RemoteAwarePlatform.h -----------------------------------*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#ifndef LLDB_TARGET_REMOTEAWAREPLATFORM_H +#define LLDB_TARGET_REMOTEAWAREPLATFORM_H + +#include "lldb/Target/Platform.h" + +namespace lldb_private { + +/// A base class for platforms which automatically want to be able to forward +/// operations to a remote platform instance (such as PlatformRemoteGDBServer). +class RemoteAwarePlatform : public Platform { +public: + using Platform::Platform; + + bool GetModuleSpec(const FileSpec &module_file_spec, const ArchSpec &arch, + ModuleSpec &module_spec) override; + + lldb::user_id_t OpenFile(const FileSpec &file_spec, uint32_t flags, + uint32_t mode, Status &error) override; + + bool CloseFile(lldb::user_id_t fd, Status &error) override; + + uint64_t ReadFile(lldb::user_id_t fd, uint64_t offset, void *dst, + uint64_t dst_len, Status &error) override; + + uint64_t WriteFile(lldb::user_id_t fd, uint64_t offset, const void *src, + uint64_t src_len, Status &error) override; + + lldb::user_id_t GetFileSize(const FileSpec &file_spec) override; + + Status CreateSymlink(const FileSpec &src, const FileSpec &dst) override; + + bool GetFileExists(const FileSpec &file_spec) override; + + Status Unlink(const FileSpec &file_spec) override; + + FileSpec GetRemoteWorkingDirectory() override; + + bool SetRemoteWorkingDirectory(const FileSpec &working_dir) override; + + Status MakeDirectory(const FileSpec &file_spec, uint32_t mode) override; + + Status GetFilePermissions(const FileSpec &file_spec, + uint32_t &file_permissions) override; + + Status SetFilePermissions(const FileSpec &file_spec, + uint32_t file_permissions) override; + + bool CalculateMD5(const FileSpec &file_spec, uint64_t &low, + uint64_t &high) override; + + Status GetFileWithUUID(const FileSpec &platform_file, const UUID *uuid, + FileSpec &local_file) override; + + bool GetRemoteOSVersion() override; + bool GetRemoteOSBuildString(std::string &s) override; + bool GetRemoteOSKernelDescription(std::string &s) override; + ArchSpec GetRemoteSystemArchitecture() override; + + Status RunShellCommand(const char *command, const FileSpec &working_dir, + int *status_ptr, int *signo_ptr, + std::string *command_output, + const Timeout &timeout) override; + + const char *GetHostname() override; + UserIDResolver &GetUserIDResolver() override; + lldb_private::Environment GetEnvironment() override; + + bool IsConnected() const override; + + bool GetProcessInfo(lldb::pid_t pid, ProcessInstanceInfo &proc_info) override; + uint32_t FindProcesses(const ProcessInstanceInfoMatch &match_info, + ProcessInstanceInfoList &process_infos) override; + + lldb::ProcessSP ConnectProcess(llvm::StringRef connect_url, + llvm::StringRef plugin_name, + Debugger &debugger, Target *target, + Status &error) override; + + Status LaunchProcess(ProcessLaunchInfo &launch_info) override; + + Status KillProcess(const lldb::pid_t pid) override; + +protected: + lldb::PlatformSP m_remote_platform_sp; +}; + +} // namespace lldb_private + +#endif // LLDB_TARGET_REMOTEAWAREPLATFORM_H diff --git a/lldb/include/lldb/Target/StackFrameList.h b/lldb/include/lldb/Target/StackFrameList.h index 732a325d41072..696e76eef031e 100644 --- a/lldb/include/lldb/Target/StackFrameList.h +++ b/lldb/include/lldb/Target/StackFrameList.h @@ -91,7 +91,7 @@ class StackFrameList { bool SetFrameAtIndex(uint32_t idx, lldb::StackFrameSP &frame_sp); - static void Merge(std::unique_ptr &curr_ap, + static void Merge(std::unique_ptr &curr_up, lldb::StackFrameListSP &prev_sp); void GetFramesUpTo(uint32_t end_idx); diff --git a/lldb/include/lldb/Target/StackFrameRecognizer.h b/lldb/include/lldb/Target/StackFrameRecognizer.h index 774226990d11d..7fcdc8f859976 100644 --- a/lldb/include/lldb/Target/StackFrameRecognizer.h +++ b/lldb/include/lldb/Target/StackFrameRecognizer.h @@ -9,6 +9,7 @@ #ifndef liblldb_StackFrameRecognizer_h_ #define liblldb_StackFrameRecognizer_h_ +#include "lldb/Core/ValueObject.h" #include "lldb/Core/ValueObjectList.h" #include "lldb/Symbol/VariableList.h" #include "lldb/Utility/StructuredData.h" @@ -123,6 +124,42 @@ class StackFrameRecognizerManager { static lldb::RecognizedStackFrameSP RecognizeFrame(lldb::StackFrameSP frame); }; +/// @class ValueObjectRecognizerSynthesizedValue +/// +/// ValueObject subclass that presents the passed ValueObject as a recognized +/// value with the specified ValueType. Frame recognizers should return +/// instances of this class as the returned objects in GetRecognizedArguments(). + +class ValueObjectRecognizerSynthesizedValue : public ValueObject { + public: + static lldb::ValueObjectSP Create(ValueObject &parent, lldb::ValueType type) { + return (new ValueObjectRecognizerSynthesizedValue(parent, type))->GetSP(); + } + ValueObjectRecognizerSynthesizedValue(ValueObject &parent, + lldb::ValueType type) + : ValueObject(parent), m_type(type) { + SetName(parent.GetName()); + } + + uint64_t GetByteSize() override { return m_parent->GetByteSize(); } + lldb::ValueType GetValueType() const override { return m_type; } + bool UpdateValue() override { + if (!m_parent->UpdateValueIfNeeded()) return false; + m_value = m_parent->GetValue(); + return true; + } + size_t CalculateNumChildren(uint32_t max = UINT32_MAX) override { + return m_parent->GetNumChildren(max); + } + CompilerType GetCompilerTypeImpl() override { + return m_parent->GetCompilerType(); + } + bool IsSynthetic() override { return true; } + + private: + lldb::ValueType m_type; +}; + } // namespace lldb_private #endif // liblldb_StackFrameRecognizer_h_ diff --git a/lldb/include/lldb/Target/Target.h b/lldb/include/lldb/Target/Target.h index f86a2625709a6..5370b170451d4 100644 --- a/lldb/include/lldb/Target/Target.h +++ b/lldb/include/lldb/Target/Target.h @@ -23,10 +23,10 @@ #include "lldb/Core/ModuleList.h" #include "lldb/Core/UserSettingsController.h" #include "lldb/Expression/Expression.h" +#include "lldb/Host/ProcessLaunchInfo.h" #include "lldb/Symbol/TypeSystem.h" #include "lldb/Target/ExecutionContextScope.h" #include "lldb/Target/PathMappingList.h" -#include "lldb/Target/ProcessLaunchInfo.h" #include "lldb/Target/SectionLoadHistory.h" #include "lldb/Utility/ArchSpec.h" #include "lldb/Utility/Broadcaster.h" @@ -1043,7 +1043,8 @@ class Target : public std::enable_shared_from_this, UserExpression *GetUserExpressionForLanguage( llvm::StringRef expr, llvm::StringRef prefix, lldb::LanguageType language, Expression::ResultType desired_type, - const EvaluateExpressionOptions &options, Status &error); + const EvaluateExpressionOptions &options, + ValueObject *ctx_obj, Status &error); // Creates a FunctionCaller for the given language, the rest of the // parameters have the same meaning as for the FunctionCaller constructor. @@ -1107,7 +1108,8 @@ class Target : public std::enable_shared_from_this, llvm::StringRef expression, ExecutionContextScope *exe_scope, lldb::ValueObjectSP &result_valobj_sp, const EvaluateExpressionOptions &options = EvaluateExpressionOptions(), - std::string *fixed_expression = nullptr); + std::string *fixed_expression = nullptr, + ValueObject *ctx_obj = nullptr); lldb::ExpressionVariableSP GetPersistentVariable(const ConstString &name); @@ -1145,20 +1147,25 @@ class Target : public std::enable_shared_from_this, // and is responsible for deleting it when we're done. void SetThreadSpecifier(ThreadSpec *specifier); - ThreadSpec *GetThreadSpecifier() { return m_thread_spec_ap.get(); } + ThreadSpec *GetThreadSpecifier() { return m_thread_spec_up.get(); } bool IsActive() { return m_active; } void SetIsActive(bool is_active) { m_active = is_active; } + void SetAutoContinue(bool auto_continue) {m_auto_continue = auto_continue;} + + bool GetAutoContinue() const { return m_auto_continue; } + void GetDescription(Stream *s, lldb::DescriptionLevel level) const; private: lldb::TargetSP m_target_sp; StringList m_commands; lldb::SymbolContextSpecifierSP m_specifier_sp; - std::unique_ptr m_thread_spec_ap; - bool m_active; + std::unique_ptr m_thread_spec_up; + bool m_active = true; + bool m_auto_continue = false; // Use CreateStopHook to make a new empty stop hook. The GetCommandPointer // and fill it with commands, and SetSpecifier to set the specifier shared @@ -1295,9 +1302,9 @@ class Target : public std::enable_shared_from_this, REPLMap m_repl_map; lldb::ClangASTImporterSP m_ast_importer_sp; - lldb::ClangModulesDeclVendorUP m_clang_modules_decl_vendor_ap; + lldb::ClangModulesDeclVendorUP m_clang_modules_decl_vendor_up; - lldb::SourceManagerUP m_source_manager_ap; + lldb::SourceManagerUP m_source_manager_up; typedef std::map StopHookCollection; StopHookCollection m_stop_hooks; diff --git a/lldb/include/lldb/Target/Thread.h b/lldb/include/lldb/Target/Thread.h index 3fef14a9e4e74..2da1fc74b4642 100644 --- a/lldb/include/lldb/Target/Thread.h +++ b/lldb/include/lldb/Target/Thread.h @@ -1347,7 +1347,7 @@ class Thread : public std::enable_shared_from_this, ///thread plan logic for the current ///resume. /// It gets set in Thread::ShouldResume. - std::unique_ptr m_unwinder_ap; + std::unique_ptr m_unwinder_up; bool m_destroy_called; // This is used internally to make sure derived Thread // classes call DestroyThread. LazyBool m_override_should_notify; diff --git a/lldb/include/lldb/Target/ThreadPlanStepInRange.h b/lldb/include/lldb/Target/ThreadPlanStepInRange.h index 0591029f44e28..a120c98fb36e1 100644 --- a/lldb/include/lldb/Target/ThreadPlanStepInRange.h +++ b/lldb/include/lldb/Target/ThreadPlanStepInRange.h @@ -92,7 +92,7 @@ class ThreadPlanStepInRange : public ThreadPlanStepRange, // for the ThreadPlanStepThrough. lldb::ThreadPlanSP m_sub_plan_sp; // Keep track of the last plan we were // running. If it fails, we should stop. - std::unique_ptr m_avoid_regexp_ap; + std::unique_ptr m_avoid_regexp_up; bool m_step_past_prologue; // FIXME: For now hard-coded to true, we could put // a switch in for this if there's // demand for that. diff --git a/lldb/include/lldb/Utility/ArchSpec.h b/lldb/include/lldb/Utility/ArchSpec.h index 89eb3ef3d60e4..d8b06aeb1dd1a 100644 --- a/lldb/include/lldb/Utility/ArchSpec.h +++ b/lldb/include/lldb/Utility/ArchSpec.h @@ -376,20 +376,10 @@ class ArchSpec { return !m_triple.getVendorName().empty(); } - bool TripleVendorIsUnspecifiedUnknown() const { - return m_triple.getVendor() == llvm::Triple::UnknownVendor && - m_triple.getVendorName().empty(); - } - bool TripleOSWasSpecified() const { return !m_triple.getOSName().empty(); } bool TripleEnvironmentWasSpecified() const { - return !m_triple.getEnvironmentName().empty(); - } - - bool TripleOSIsUnspecifiedUnknown() const { - return m_triple.getOS() == llvm::Triple::UnknownOS && - m_triple.getOSName().empty(); + return m_triple.hasEnvironment(); } //------------------------------------------------------------------ diff --git a/lldb/include/lldb/Utility/FileSpec.h b/lldb/include/lldb/Utility/FileSpec.h index 21fc990ba3c79..61d13c7e313e7 100644 --- a/lldb/include/lldb/Utility/FileSpec.h +++ b/lldb/include/lldb/Utility/FileSpec.h @@ -242,6 +242,13 @@ class FileSpec { static bool Equal(const FileSpec &a, const FileSpec &b, bool full); + /// Attempt to guess path style for a given path string. It returns a style, + /// if it was able to make a reasonable guess, or None if it wasn't. The guess + /// will be correct if the input path was a valid absolute path on the system + /// which produced it. On other paths the result of this function is + /// unreliable (e.g. "c:\foo.txt" is a valid relative posix path). + static llvm::Optional